text: /*!
   * w-serv-webdata-server v1.0.18
   * (c) 2018-2021 yuda-lyu(semisphere)
   * Released under the MIT License.
   */
  !function(t,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r(require("path"),require("fs"),require("events")):"function"==typeof define&&define.amd?define(["path","fs","events"],r):(t="undefined"!=typeof globalThis?globalThis:t||self)["w-serv-webdata-server"]=r(t.path,t.fs,t.events)}(this,(function(t,r,e){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=n(t),i=n(r),a=n(e),u=Array.isArray;function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function f(t){var r={exports:{}};return t(r,r.exports),r.exports}var l="object"==c(s)&&s&&s.Object===Object&&s,v="object"==("undefined"==typeof self?"undefined":c(self))&&self&&self.Object===Object&&self,h=l||v||Function("return this")(),p=h.Symbol,y=Object.prototype,d=y.hasOwnProperty,b=y.toString,g=p?p.toStringTag:void 0;var m=function(t){var r=d.call(t,g),e=t[g];try{t[g]=void 0;var n=!0}catch(t){}var o=b.call(t);return n&&(r?t[g]=e:delete t[g]),o},j=Object.prototype.toString;var _=function(t){return j.call(t)},w=p?p.toStringTag:void 0;var O=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":w&&w in Object(t)?m(t):_(t)};var S=function(t){return null!=t&&"object"==c(t)};var x=function(t){return"symbol"==c(t)||S(t)&&"[object Symbol]"==O(t)},$=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,T=/^\w*$/;var A=function(t,r){if(u(t))return!1;var e=c(t);return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!x(t))||(T.test(t)||!$.test(t)||null!=r&&t in Object(r))};var M=function(t){var r=c(t);return null!=t&&("object"==r||"function"==r)};var D,E=function(t){if(!M(t))return!1;var r=O(t);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r},k=h["__core-js_shared__"],L=(D=/[^.]+$/.exec(k&&k.keys&&k.keys.IE_PROTO||""))?"Symbol(src)_1."+D:"";var P=function(t){return!!L&&L in t},N=Function.prototype.toString;var F=function(t){if(null!=t){try{return N.call(t)}catch(t){}try{return t+""}catch(t){}}return""},I=/^\[object .+?Constructor\]$/,C=Function.prototype,z=Object.prototype,U=C.toString,W=z.hasOwnProperty,R=RegExp("^"+U.call(W).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Y=function(t){return!(!M(t)||P(t))&&(E(t)?R:I).test(F(t))};var B=function(t,r){return null==t?void 0:t[r]};var H=function(t,r){var e=B(t,r);return Y(e)?e:void 0},G=H(Object,"create");var V=function(){this.__data__=G?G(null):{},this.size=0};var J=function(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r},q=Object.prototype.hasOwnProperty;var Z=function(t){var r=this.__data__;if(G){var e=r[t];return"__lodash_hash_undefined__"===e?void 0:e}return q.call(r,t)?r[t]:void 0},Q=Object.prototype.hasOwnProperty;var K=function(t){var r=this.__data__;return G?void 0!==r[t]:Q.call(r,t)};var X=function(t,r){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=G&&void 0===r?"__lodash_hash_undefined__":r,this};function tt(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}tt.prototype.clear=V,tt.prototype.delete=J,tt.prototype.get=Z,tt.prototype.has=K,tt.prototype.set=X;var rt=tt;var et=function(){this.__data__=[],this.size=0};var nt=function(t,r){return t===r||t!=t&&r!=r};var ot=function(t,r){for(var e=t.length;e--;)if(nt(t[e][0],r))return e;return-1},it=Array.prototype.splice;var at=function(t){var r=this.__data__,e=ot(r,t);return!(e<0)&&(e==r.length-1?r.pop():it.call(r,e,1),--this.size,!0)};var ut=function(t){var r=this.__data__,e=ot(r,t);return e<0?void 0:r[e][1]};var ct=function(t){return ot(this.__data__,t)>-1};var st=function(t,r){var e=this.__data__,n=ot(e,t);return n<0?(++this.size,e.push([t,r])):e[n][1]=r,this};function ft(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}ft.prototype.clear=et,ft.prototype.delete=at,ft.prototype.get=ut,ft.prototype.has=ct,ft.prototype.set=st;var lt=ft,vt=H(h,"Map");var ht=function(){this.size=0,this.__data__={hash:new rt,map:new(vt||lt),string:new rt}};var pt=function(t){var r=c(t);return"string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t};var yt=function(t,r){var e=t.__data__;return pt(r)?e["string"==typeof r?"string":"hash"]:e.map};var dt=function(t){var r=yt(this,t).delete(t);return this.size-=r?1:0,r};var bt=function(t){return yt(this,t).get(t)};var gt=function(t){return yt(this,t).has(t)};var mt=function(t,r){var e=yt(this,t),n=e.size;return e.set(t,r),this.size+=e.size==n?0:1,this};function jt(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}jt.prototype.clear=ht,jt.prototype.delete=dt,jt.prototype.get=bt,jt.prototype.has=gt,jt.prototype.set=mt;var _t=jt;function wt(t,r){if("function"!=typeof t||null!=r&&"function"!=typeof r)throw new TypeError("Expected a function");var e=function e(){var n=arguments,o=r?r.apply(this,n):n[0],i=e.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return e.cache=i.set(o,a)||i,a};return e.cache=new(wt.Cache||_t),e}wt.Cache=_t;var Ot=wt;var St=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xt=/\\(\\)?/g,$t=function(t){var r=Ot(t,(function(t){return 500===e.size&&e.clear(),t})),e=r.cache;return r}((function(t){var r=[];return 46===t.charCodeAt(0)&&r.push(""),t.replace(St,(function(t,e,n,o){r.push(n?o.replace(xt,"$1"):e||t)})),r}));var Tt=function(t,r){for(var e=-1,n=null==t?0:t.length,o=Array(n);++e<n;)o[e]=r(t[e],e,t);return o},At=p?p.prototype:void 0,Mt=At?At.toString:void 0;var Dt=function t(r){if("string"==typeof r)return r;if(u(r))return Tt(r,t)+"";if(x(r))return Mt?Mt.call(r):"";var e=r+"";return"0"==e&&1/r==-Infinity?"-0":e};var Et=function(t){return null==t?"":Dt(t)};var kt=function(t,r){return u(t)?t:A(t,r)?[t]:$t(Et(t))};var Lt=function(t){if("string"==typeof t||x(t))return t;var r=t+"";return"0"==r&&1/t==-Infinity?"-0":r};var Pt=function(t,r){for(var e=0,n=(r=kt(r,t)).length;null!=t&&e<n;)t=t[Lt(r[e++])];return e&&e==n?t:void 0};var Nt=function(t,r,e){var n=null==t?void 0:Pt(t,r);return void 0===n?e:n};function Ft(t){return"[object Array]"===Object.prototype.toString.call(t)}function It(t){return"[object Object]"===Object.prototype.toString.call(t)}function Ct(t){var r=Object.prototype.toString.call(t);return"[object Function]"===r||"[object AsyncFunction]"===r}var zt=f((function(t){var r=Object.prototype.hasOwnProperty,e="~";function n(){}function o(t,r,e){this.fn=t,this.context=r,this.once=e||!1}function i(t,r,n,i,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var u=new o(n,i||t,a),c=e?e+r:r;return t._events[c]?t._events[c].fn?t._events[c]=[t._events[c],u]:t._events[c].push(u):(t._events[c]=u,t._eventsCount++),t}function a(t,r){0==--t._eventsCount?t._events=new n:delete t._events[r]}function u(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(e=!1)),u.prototype.eventNames=function(){var t,n,o=[];if(0===this._eventsCount)return o;for(n in t=this._events)r.call(t,n)&&o.push(e?n.slice(1):n);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(t)):o},u.prototype.listeners=function(t){var r=e?e+t:t,n=this._events[r];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,i=n.length,a=new Array(i);o<i;o++)a[o]=n[o].fn;return a},u.prototype.listenerCount=function(t){var r=e?e+t:t,n=this._events[r];return n?n.fn?1:n.length:0},u.prototype.emit=function(t,r,n,o,i,a){var u=e?e+t:t;if(!this._events[u])return!1;var c,s,f=this._events[u],l=arguments.length;if(f.fn){switch(f.once&&this.removeListener(t,f.fn,void 0,!0),l){case 1:return f.fn.call(f.context),!0;case 2:return f.fn.call(f.context,r),!0;case 3:return f.fn.call(f.context,r,n),!0;case 4:return f.fn.call(f.context,r,n,o),!0;case 5:return f.fn.call(f.context,r,n,o,i),!0;case 6:return f.fn.call(f.context,r,n,o,i,a),!0}for(s=1,c=new Array(l-1);s<l;s++)c[s-1]=arguments[s];f.fn.apply(f.context,c)}else{var v,h=f.length;for(s=0;s<h;s++)switch(f[s].once&&this.removeListener(t,f[s].fn,void 0,!0),l){case 1:f[s].fn.call(f[s].context);break;case 2:f[s].fn.call(f[s].context,r);break;case 3:f[s].fn.call(f[s].context,r,n);break;case 4:f[s].fn.call(f[s].context,r,n,o);break;default:if(!c)for(v=1,c=new Array(l-1);v<l;v++)c[v-1]=arguments[v];f[s].fn.apply(f[s].context,c)}}return!0},u.prototype.on=function(t,r,e){return i(this,t,r,e,!1)},u.prototype.once=function(t,r,e){return i(this,t,r,e,!0)},u.prototype.removeListener=function(t,r,n,o){var i=e?e+t:t;if(!this._events[i])return this;if(!r)return a(this,i),this;var u=this._events[i];if(u.fn)u.fn!==r||o&&!u.once||n&&u.context!==n||a(this,i);else{for(var c=0,s=[],f=u.length;c<f;c++)(u[c].fn!==r||o&&!u[c].once||n&&u[c].context!==n)&&s.push(u[c]);s.length?this._events[i]=1===s.length?s[0]:s:a(this,i)}return this},u.prototype.removeAllListeners=function(t){var r;return t?(r=e?e+t:t,this._events[r]&&a(this,r)):(this._events=new n,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=e,u.EventEmitter=u,t.exports=u}));function Ut(){return new zt}var Wt=function(t,r){for(var e=-1,n=null==t?0:t.length;++e<n&&!1!==r(t[e],e,t););return t};var Rt=function(t){return function(r,e,n){for(var o=-1,i=Object(r),a=n(r),u=a.length;u--;){var c=a[t?u:++o];if(!1===e(i[c],c,i))break}return r}}();var Yt=function(t,r){for(var e=-1,n=Array(t);++e<t;)n[e]=r(e);return n};var Bt=function(t){return S(t)&&"[object Arguments]"==O(t)},Ht=Object.prototype,Gt=Ht.hasOwnProperty,Vt=Ht.propertyIsEnumerable,Jt=Bt(function(){return arguments}())?Bt:function(t){return S(t)&&Gt.call(t,"callee")&&!Vt.call(t,"callee")};var qt=function(){return!1},Zt=f((function(t,r){var e=r&&!r.nodeType&&r,n=e&&t&&!t.nodeType&&t,o=n&&n.exports===e?h.Buffer:void 0,i=(o?o.isBuffer:void 0)||qt;t.exports=i})),Qt=/^(?:0|[1-9]\d*)$/;var Kt=function(t,r){var e=c(t);return!!(r=null==r?9007199254740991:r)&&("number"==e||"symbol"!=e&&Qt.test(t))&&t>-1&&t%1==0&&t<r};var Xt=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},tr={};tr["[object Float32Array]"]=tr["[object Float64Array]"]=tr["[object Int8Array]"]=tr["[object Int16Array]"]=tr["[object Int32Array]"]=tr["[object Uint8Array]"]=tr["[object Uint8ClampedArray]"]=tr["[object Uint16Array]"]=tr["[object Uint32Array]"]=!0,tr["[object Arguments]"]=tr["[object Array]"]=tr["[object ArrayBuffer]"]=tr["[object Boolean]"]=tr["[object DataView]"]=tr["[object Date]"]=tr["[object Error]"]=tr["[object Function]"]=tr["[object Map]"]=tr["[object Number]"]=tr["[object Object]"]=tr["[object RegExp]"]=tr["[object Set]"]=tr["[object String]"]=tr["[object WeakMap]"]=!1;var rr=function(t){return S(t)&&Xt(t.length)&&!!tr[O(t)]};var er=function(t){return function(r){return t(r)}},nr=f((function(t,r){var e=r&&!r.nodeType&&r,n=e&&t&&!t.nodeType&&t,o=n&&n.exports===e&&l.process,i=function(){try{var t=n&&n.require&&n.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=i})),or=nr&&nr.isTypedArray,ir=or?er(or):rr,ar=Object.prototype.hasOwnProperty;var ur=function(t,r){var e=u(t),n=!e&&Jt(t),o=!e&&!n&&Zt(t),i=!e&&!n&&!o&&ir(t),a=e||n||o||i,c=a?Yt(t.length,String):[],s=c.length;for(var f in t)!r&&!ar.call(t,f)||a&&("length"==f||o&&("offset"==f||"parent"==f)||i&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||Kt(f,s))||c.push(f);return c},cr=Object.prototype;var sr=function(t){var r=t&&t.constructor;return t===("function"==typeof r&&r.prototype||cr)};var fr=function(t,r){return function(e){return t(r(e))}},lr=fr(Object.keys,Object),vr=Object.prototype.hasOwnProperty;var hr=function(t){if(!sr(t))return lr(t);var r=[];for(var e in Object(t))vr.call(t,e)&&"constructor"!=e&&r.push(e);return r};var pr=function(t){return null!=t&&Xt(t.length)&&!E(t)};var yr=function(t){return pr(t)?ur(t):hr(t)};var dr=function(t,r){return function(e,n){if(null==e)return e;if(!pr(e))return t(e,n);for(var o=e.length,i=r?o:-1,a=Object(e);(r?i--:++i<o)&&!1!==n(a[i],i,a););return e}}((function(t,r){return t&&Rt(t,r,yr)}));var br=function(t){return t};var gr=function(t){return"function"==typeof t?t:br};var mr=function(t,r){return(u(t)?Wt:dr)(t,gr(r))},jr=H(h,"DataView"),_r=H(h,"Promise"),wr=H(h,"Set"),Or=H(h,"WeakMap"),Sr="[object Map]",xr="[object Promise]",$r="[object Set]",Tr="[object WeakMap]",Ar="[object DataView]",Mr=F(jr),Dr=F(vt),Er=F(_r),kr=F(wr),Lr=F(Or),Pr=O;(jr&&Pr(new jr(new ArrayBuffer(1)))!=Ar||vt&&Pr(new vt)!=Sr||_r&&Pr(_r.resolve())!=xr||wr&&Pr(new wr)!=$r||Or&&Pr(new Or)!=Tr)&&(Pr=function(t){var r=O(t),e="[object Object]"==r?t.constructor:void 0,n=e?F(e):"";if(n)switch(n){case Mr:return Ar;case Dr:return Sr;case Er:return xr;case kr:return $r;case Lr:return Tr}return r});var Nr=Pr;var Fr=function(t){return"string"==typeof t||!u(t)&&S(t)&&"[object String]"==O(t)};var Ir=function(t){return function(r){return null==r?void 0:r[t]}}("length"),Cr=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var zr=function(t){return Cr.test(t)},Ur="[\\ud800-\\udfff]",Wr="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Rr="\\ud83c[\\udffb-\\udfff]",Yr="[^\\ud800-\\udfff]",Br="(?:\\ud83c[\\udde6-\\uddff]){2}",Hr="[\\ud800-\\udbff][\\udc00-\\udfff]",Gr="(?:"+Wr+"|"+Rr+")"+"?",Vr="[\\ufe0e\\ufe0f]?",Jr=Vr+Gr+("(?:\\u200d(?:"+[Yr,Br,Hr].join("|")+")"+Vr+Gr+")*"),qr="(?:"+[Yr+Wr+"?",Wr,Br,Hr,Ur].join("|")+")",Zr=RegExp(Rr+"(?="+Rr+")|"+qr+Jr,"g");var Qr=function(t){for(var r=Zr.lastIndex=0;Zr.test(t);)++r;return r};var Kr=function(t){return zr(t)?Qr(t):Ir(t)};var Xr=function(t){if(null==t)return 0;if(pr(t))return Fr(t)?Kr(t):t.length;var r=Nr(t);return"[object Map]"==r||"[object Set]"==r?t.size:hr(t).length};var te=function(){this.__data__=new lt,this.size=0};var re=function(t){var r=this.__data__,e=r.delete(t);return this.size=r.size,e};var ee=function(t){return this.__data__.get(t)};var ne=function(t){return this.__data__.has(t)};var oe=function(t,r){var e=this.__data__;if(e instanceof lt){var n=e.__data__;if(!vt||n.length<199)return n.push([t,r]),this.size=++e.size,this;e=this.__data__=new _t(n)}return e.set(t,r),this.size=e.size,this};function ie(t){var r=this.__data__=new lt(t);this.size=r.size}ie.prototype.clear=te,ie.prototype.delete=re,ie.prototype.get=ee,ie.prototype.has=ne,ie.prototype.set=oe;var ae=ie,ue=function(){try{var t=H(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var ce=function(t,r,e){"__proto__"==r&&ue?ue(t,r,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[r]=e},se=Object.prototype.hasOwnProperty;var fe=function(t,r,e){var n=t[r];se.call(t,r)&&nt(n,e)&&(void 0!==e||r in t)||ce(t,r,e)};var le=function(t,r,e,n){var o=!e;e||(e={});for(var i=-1,a=r.length;++i<a;){var u=r[i],c=n?n(e[u],t[u],u,e,t):void 0;void 0===c&&(c=t[u]),o?ce(e,u,c):fe(e,u,c)}return e};var ve=function(t,r){return t&&le(r,yr(r),t)};var he=function(t){var r=[];if(null!=t)for(var e in Object(t))r.push(e);return r},pe=Object.prototype.hasOwnProperty;var ye=function(t){if(!M(t))return he(t);var r=sr(t),e=[];for(var n in t)("constructor"!=n||!r&&pe.call(t,n))&&e.push(n);return e};var de=function(t){return pr(t)?ur(t,!0):ye(t)};var be=function(t,r){return t&&le(r,de(r),t)},ge=f((function(t,r){var e=r&&!r.nodeType&&r,n=e&&t&&!t.nodeType&&t,o=n&&n.exports===e?h.Buffer:void 0,i=o?o.allocUnsafe:void 0;t.exports=function(t,r){if(r)return t.slice();var e=t.length,n=i?i(e):new t.constructor(e);return t.copy(n),n}}));var me=function(t,r){var e=-1,n=t.length;for(r||(r=Array(n));++e<n;)r[e]=t[e];return r};var je=function(t,r){for(var e=-1,n=null==t?0:t.length,o=0,i=[];++e<n;){var a=t[e];r(a,e,t)&&(i[o++]=a)}return i};var _e=function(){return[]},we=Object.prototype.propertyIsEnumerable,Oe=Object.getOwnPropertySymbols,Se=Oe?function(t){return null==t?[]:(t=Object(t),je(Oe(t),(function(r){return we.call(t,r)})))}:_e;var xe=function(t,r){return le(t,Se(t),r)};var $e=function(t,r){for(var e=-1,n=r.length,o=t.length;++e<n;)t[o+e]=r[e];return t},Te=fr(Object.getPrototypeOf,Object),Ae=Object.getOwnPropertySymbols?function(t){for(var r=[];t;)$e(r,Se(t)),t=Te(t);return r}:_e;var Me=function(t,r){return le(t,Ae(t),r)};var De=function(t,r,e){var n=r(t);return u(t)?n:$e(n,e(t))};var Ee=function(t){return De(t,yr,Se)};var ke=function(t){return De(t,de,Ae)},Le=Object.prototype.hasOwnProperty;var Pe=function(t){var r=t.length,e=new t.constructor(r);return r&&"string"==typeof t[0]&&Le.call(t,"index")&&(e.index=t.index,e.input=t.input),e},Ne=h.Uint8Array;var Fe=function(t){var r=new t.constructor(t.byteLength);return new Ne(r).set(new Ne(t)),r};var Ie=function(t,r){var e=r?Fe(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)},Ce=/\w*$/;var ze=function(t){var r=new t.constructor(t.source,Ce.exec(t));return r.lastIndex=t.lastIndex,r},Ue=p?p.prototype:void 0,We=Ue?Ue.valueOf:void 0;var Re=function(t){return We?Object(We.call(t)):{}};var Ye=function(t,r){var e=r?Fe(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)};var Be=function(t,r,e){var n=t.constructor;switch(r){case"[object ArrayBuffer]":return Fe(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return Ie(t,e);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Ye(t,e);case"[object Map]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return ze(t);case"[object Set]":return new n;case"[object Symbol]":return Re(t)}},He=Object.create,Ge=function(){function t(){}return function(r){if(!M(r))return{};if(He)return He(r);t.prototype=r;var e=new t;return t.prototype=void 0,e}}();var Ve=function(t){return"function"!=typeof t.constructor||sr(t)?{}:Ge(Te(t))};var Je=function(t){return S(t)&&"[object Map]"==Nr(t)},qe=nr&&nr.isMap,Ze=qe?er(qe):Je;var Qe=function(t){return S(t)&&"[object Set]"==Nr(t)},Ke=nr&&nr.isSet,Xe=Ke?er(Ke):Qe,tn="[object Arguments]",rn="[object Function]",en="[object Object]",nn={};nn[tn]=nn["[object Array]"]=nn["[object ArrayBuffer]"]=nn["[object DataView]"]=nn["[object Boolean]"]=nn["[object Date]"]=nn["[object Float32Array]"]=nn["[object Float64Array]"]=nn["[object Int8Array]"]=nn["[object Int16Array]"]=nn["[object Int32Array]"]=nn["[object Map]"]=nn["[object Number]"]=nn[en]=nn["[object RegExp]"]=nn["[object Set]"]=nn["[object String]"]=nn["[object Symbol]"]=nn["[object Uint8Array]"]=nn["[object Uint8ClampedArray]"]=nn["[object Uint16Array]"]=nn["[object Uint32Array]"]=!0,nn["[object Error]"]=nn[rn]=nn["[object WeakMap]"]=!1;var on=function t(r,e,n,o,i,a){var c,s=1&e,f=2&e,l=4&e;if(n&&(c=i?n(r,o,i,a):n(r)),void 0!==c)return c;if(!M(r))return r;var v=u(r);if(v){if(c=Pe(r),!s)return me(r,c)}else{var h=Nr(r),p=h==rn||"[object GeneratorFunction]"==h;if(Zt(r))return ge(r,s);if(h==en||h==tn||p&&!i){if(c=f||p?{}:Ve(r),!s)return f?Me(r,be(c,r)):xe(r,ve(c,r))}else{if(!nn[h])return i?r:{};c=Be(r,h,s)}}a||(a=new ae);var y=a.get(r);if(y)return y;a.set(r,c),Xe(r)?r.forEach((function(o){c.add(t(o,e,n,o,r,a))})):Ze(r)&&r.forEach((function(o,i){c.set(i,t(o,e,n,i,r,a))}));var d=v?void 0:(l?f?ke:Ee:f?de:yr)(r);return Wt(d||r,(function(o,i){d&&(o=r[i=o]),fe(c,i,t(o,e,n,i,r,a))})),c};var an=function(t){return on(t,5)},un=/\s/;var cn=function(t){for(var r=t.length;r--&&un.test(t.charAt(r)););return r},sn=/^\s+/;var fn=function(t){return t?t.slice(0,cn(t)+1).replace(sn,""):t},ln=/^[-+]0x[0-9a-f]+$/i,vn=/^0b[01]+$/i,hn=/^0o[0-7]+$/i,pn=parseInt;var yn=function(t){if("number"==typeof t)return t;if(x(t))return NaN;if(M(t)){var r="function"==typeof t.valueOf?t.valueOf():t;t=M(r)?r+"":r}if("string"!=typeof t)return 0===t?t:+t;t=fn(t);var e=vn.test(t);return e||hn.test(t)?pn(t.slice(2),e?2:8):ln.test(t)?NaN:+t},dn=1/0;var bn=function(t){return t?(t=yn(t))===dn||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0};var gn=function(t){var r=bn(t),e=r%1;return r==r?e?r-e:r:0};var mn=function(t){return"number"==typeof t&&t==gn(t)};function jn(t){return"[object String]"===Object.prototype.toString.call(t)}function _n(t){return!(!jn(t)||""===t)}function wn(t){var r=!1;return _n(t)?r=!isNaN(Number(t)):function(t){return"[object Number]"===Object.prototype.toString.call(t)}(t)&&(r=!0),r}function On(t){return wn(t)?bn(t):0}var Sn=h.isFinite,xn=Math.min;var $n=function(t){var r=Math[t];return function(t,e){if(t=yn(t),(e=null==e?0:xn(gn(e),292))&&Sn(t)){var n=(Et(t)+"e").split("e"),o=r(n[0]+"e"+(+n[1]+e));return+((n=(Et(o)+"e").split("e"))[0]+"e"+(+n[1]-e))}return r(t)}}("round");function Tn(t){if(!wn(t))return 0;t=On(t);var r=$n(t);return"0"===String(r)?0:r}function An(t){return!!function(t){return!!wn(t)&&(t=On(t),mn(t))}(t)&&Tn(t)>0}var Mn="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),Dn=Mn.length;function En(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32,r=[];t=An(t)?Tn(t):32;for(var e=0;e<t;e++)r[e]=Mn[0|Math.random()*Dn];var n=r.join("");return n}var kn=function(){return h.Date.now()},Ln=Math.max,Pn=Math.min;var Nn=function(t,r,e){var n,o,i,a,u,c,s=0,f=!1,l=!1,v=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function h(r){var e=n,i=o;return n=o=void 0,s=r,a=t.apply(i,e)}function p(t){return s=t,u=setTimeout(d,r),f?h(t):a}function y(t){var e=t-c;return void 0===c||e>=r||e<0||l&&t-s>=i}function d(){var t=kn();if(y(t))return b(t);u=setTimeout(d,function(t){var e=r-(t-c);return l?Pn(e,i-(t-s)):e}(t))}function b(t){return u=void 0,v&&n?h(t):(n=o=void 0,a)}function g(){var t=kn(),e=y(t);if(n=arguments,o=this,c=t,e){if(void 0===u)return p(c);if(l)return clearTimeout(u),u=setTimeout(d,r),h(c)}return void 0===u&&(u=setTimeout(d,r)),a}return r=yn(r)||0,M(e)&&(f=!!e.leading,i=(l="maxWait"in e)?Ln(yn(e.maxWait)||0,r):i,v="trailing"in e?!!e.trailing:v),g.cancel=function(){void 0!==u&&clearTimeout(u),s=0,n=c=o=u=void 0},g.flush=function(){return void 0===u?a:b(kn())},g};var Fn=function(t,r,e){(void 0!==e&&!nt(t[r],e)||void 0===e&&!(r in t))&&ce(t,r,e)};var In=function(t){return S(t)&&pr(t)},Cn=Function.prototype,zn=Object.prototype,Un=Cn.toString,Wn=zn.hasOwnProperty,Rn=Un.call(Object);var Yn=function(t){if(!S(t)||"[object Object]"!=O(t))return!1;var r=Te(t);if(null===r)return!0;var e=Wn.call(r,"constructor")&&r.constructor;return"function"==typeof e&&e instanceof e&&Un.call(e)==Rn};var Bn=function(t,r){if(("constructor"!==r||"function"!=typeof t[r])&&"__proto__"!=r)return t[r]};var Hn=function(t){return le(t,de(t))};var Gn=function(t,r,e,n,o,i,a){var c=Bn(t,e),s=Bn(r,e),f=a.get(s);if(f)Fn(t,e,f);else{var l=i?i(c,s,e+"",t,r,a):void 0,v=void 0===l;if(v){var h=u(s),p=!h&&Zt(s),y=!h&&!p&&ir(s);l=s,h||p||y?u(c)?l=c:In(c)?l=me(c):p?(v=!1,l=ge(s,!0)):y?(v=!1,l=Ye(s,!0)):l=[]:Yn(s)||Jt(s)?(l=c,Jt(c)?l=Hn(c):M(c)&&!E(c)||(l=Ve(s))):v=!1}v&&(a.set(s,l),o(l,s,n,i,a),a.delete(s)),Fn(t,e,l)}};var Vn=function t(r,e,n,o,i){r!==e&&Rt(e,(function(a,u){if(i||(i=new ae),M(a))Gn(r,e,u,n,t,o,i);else{var c=o?o(Bn(r,u),a,u+"",r,e,i):void 0;void 0===c&&(c=a),Fn(r,u,c)}}),de)};var Jn=function(t,r,e){switch(e.length){case 0:return t.call(r);case 1:return t.call(r,e[0]);case 2:return t.call(r,e[0],e[1]);case 3:return t.call(r,e[0],e[1],e[2])}return t.apply(r,e)},qn=Math.max;var Zn=function(t,r,e){return r=qn(void 0===r?t.length-1:r,0),function(){for(var n=arguments,o=-1,i=qn(n.length-r,0),a=Array(i);++o<i;)a[o]=n[r+o];o=-1;for(var u=Array(r+1);++o<r;)u[o]=n[o];return u[r]=e(a),Jn(t,this,u)}};var Qn=function(t){return function(){return t}},Kn=ue?function(t,r){return ue(t,"toString",{configurable:!0,enumerable:!1,value:Qn(r),writable:!0})}:br,Xn=Date.now;var to=function(t){var r=0,e=0;return function(){var n=Xn(),o=16-(n-e);if(e=n,o>0){if(++r>=800)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}(Kn);var ro=function(t,r){return to(Zn(t,r,br),t+"")};var eo=function(t,r,e){if(!M(e))return!1;var n=c(r);return!!("number"==n?pr(e)&&Kt(r,e.length):"string"==n&&r in e)&&nt(e[r],t)};var no=function(t){return ro((function(r,e){var n=-1,o=e.length,i=o>1?e[o-1]:void 0,a=o>2?e[2]:void 0;for(i=t.length>3&&"function"==typeof i?(o--,i):void 0,a&&eo(e[0],e[1],a)&&(i=o<3?void 0:i,o=1),r=Object(r);++n<o;){var u=e[n];u&&t(r,u,n,i)}return r}))}((function(t,r,e){Vn(t,r,e)})),oo=f((function(t,r){t.exports=function(){var t=1e3,r=6e4,e=36e5,n="millisecond",o="second",i="minute",a="hour",u="day",s="week",f="month",l="quarter",v="year",h="date",p="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,d=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},g=function(t,r,e){var n=String(t);return!n||n.length>=r?t:""+Array(r+1-n.length).join(e)+t},m={s:g,z:function(t){var r=-t.utcOffset(),e=Math.abs(r),n=Math.floor(e/60),o=e%60;return(r<=0?"+":"-")+g(n,2,"0")+":"+g(o,2,"0")},m:function t(r,e){if(r.date()<e.date())return-t(e,r);var n=12*(e.year()-r.year())+(e.month()-r.month()),o=r.clone().add(n,f),i=e-o<0,a=r.clone().add(n+(i?-1:1),f);return+(-(n+(e-o)/(i?o-a:a-o))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:f,y:v,w:s,d:u,D:h,h:a,m:i,s:o,ms:n,Q:l}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},j="en",_={};_[j]=b;var w=function(t){return t instanceof $},O=function(t,r,e){var n;if(!t)return j;if("string"==typeof t)_[t]&&(n=t),r&&(_[t]=r,n=t);else{var o=t.name;_[o]=t,n=o}return!e&&n&&(j=n),n||!e&&j},S=function(t,r){if(w(t))return t.clone();var e="object"==c(r)?r:{};return e.date=t,e.args=arguments,new $(e)},x=m;x.l=O,x.i=w,x.w=function(t,r){return S(t,{locale:r.$L,utc:r.$u,x:r.$x,$offset:r.$offset})};var $=function(){function c(t){this.$L=O(t.locale,null,!0),this.parse(t)}var b=c.prototype;return b.parse=function(t){this.$d=function(t){var r=t.date,e=t.utc;if(null===r)return new Date(NaN);if(x.u(r))return new Date;if(r instanceof Date)return new Date(r);if("string"==typeof r&&!/Z$/i.test(r)){var n=r.match(y);if(n){var o=n[2]-1||0,i=(n[7]||"0").substring(0,3);return e?new Date(Date.UTC(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)):new Date(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)}}return new Date(r)}(t),this.$x=t.x||{},this.init()},b.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},b.$utils=function(){return x},b.isValid=function(){return!(this.$d.toString()===p)},b.isSame=function(t,r){var e=S(t);return this.startOf(r)<=e&&e<=this.endOf(r)},b.isAfter=function(t,r){return S(t)<this.startOf(r)},b.isBefore=function(t,r){return this.endOf(r)<S(t)},b.$g=function(t,r,e){return x.u(t)?this[r]:this.set(e,t)},b.unix=function(){return Math.floor(this.valueOf()/1e3)},b.valueOf=function(){return this.$d.getTime()},b.startOf=function(t,r){var e=this,n=!!x.u(r)||r,c=x.p(t),l=function(t,r){var o=x.w(e.$u?Date.UTC(e.$y,r,t):new Date(e.$y,r,t),e);return n?o:o.endOf(u)},p=function(t,r){return x.w(e.toDate()[t].apply(e.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(r)),e)},y=this.$W,d=this.$M,b=this.$D,g="set"+(this.$u?"UTC":"");switch(c){case v:return n?l(1,0):l(31,11);case f:return n?l(1,d):l(0,d+1);case s:var m=this.$locale().weekStart||0,j=(y<m?y+7:y)-m;return l(n?b-j:b+(6-j),d);case u:case h:return p(g+"Hours",0);case a:return p(g+"Minutes",1);case i:return p(g+"Seconds",2);case o:return p(g+"Milliseconds",3);default:return this.clone()}},b.endOf=function(t){return this.startOf(t,!1)},b.$set=function(t,r){var e,c=x.p(t),s="set"+(this.$u?"UTC":""),l=(e={},e[u]=s+"Date",e[h]=s+"Date",e[f]=s+"Month",e[v]=s+"FullYear",e[a]=s+"Hours",e[i]=s+"Minutes",e[o]=s+"Seconds",e[n]=s+"Milliseconds",e)[c],p=c===u?this.$D+(r-this.$W):r;if(c===f||c===v){var y=this.clone().set(h,1);y.$d[l](p),y.init(),this.$d=y.set(h,Math.min(this.$D,y.daysInMonth())).$d}else l&&this.$d[l](p);return this.init(),this},b.set=function(t,r){return this.clone().$set(t,r)},b.get=function(t){return this[x.p(t)]()},b.add=function(n,c){var l,h=this;n=Number(n);var p=x.p(c),y=function(t){var r=S(h);return x.w(r.date(r.date()+Math.round(t*n)),h)};if(p===f)return this.set(f,this.$M+n);if(p===v)return this.set(v,this.$y+n);if(p===u)return y(1);if(p===s)return y(7);var d=(l={},l[i]=r,l[a]=e,l[o]=t,l)[p]||1,b=this.$d.getTime()+n*d;return x.w(b,this)},b.subtract=function(t,r){return this.add(-1*t,r)},b.format=function(t){var r=this,e=this.$locale();if(!this.isValid())return e.invalidDate||p;var n=t||"YYYY-MM-DDTHH:mm:ssZ",o=x.z(this),i=this.$H,a=this.$m,u=this.$M,c=e.weekdays,s=e.months,f=function(t,e,o,i){return t&&(t[e]||t(r,n))||o[e].substr(0,i)},l=function(t){return x.s(i%12||12,t,"0")},v=e.meridiem||function(t,r,e){var n=t<12?"AM":"PM";return e?n.toLowerCase():n},h={YY:String(this.$y).slice(-2),YYYY:this.$y,M:u+1,MM:x.s(u+1,2,"0"),MMM:f(e.monthsShort,u,s,3),MMMM:f(s,u),D:this.$D,DD:x.s(this.$D,2,"0"),d:String(this.$W),dd:f(e.weekdaysMin,this.$W,c,2),ddd:f(e.weekdaysShort,this.$W,c,3),dddd:c[this.$W],H:String(i),HH:x.s(i,2,"0"),h:l(1),hh:l(2),a:v(i,a,!0),A:v(i,a,!1),m:String(a),mm:x.s(a,2,"0"),s:String(this.$s),ss:x.s(this.$s,2,"0"),SSS:x.s(this.$ms,3,"0"),Z:o};return n.replace(d,(function(t,r){return r||h[t]||o.replace(":","")}))},b.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},b.diff=function(n,c,h){var p,y=x.p(c),d=S(n),b=(d.utcOffset()-this.utcOffset())*r,g=this-d,m=x.m(this,d);return m=(p={},p[v]=m/12,p[f]=m,p[l]=m/3,p[s]=(g-b)/6048e5,p[u]=(g-b)/864e5,p[a]=g/e,p[i]=g/r,p[o]=g/t,p)[y]||g,h?m:x.a(m)},b.daysInMonth=function(){return this.endOf(f).$D},b.$locale=function(){return _[this.$L]},b.locale=function(t,r){if(!t)return this.$L;var e=this.clone(),n=O(t,r,!0);return n&&(e.$L=n),e},b.clone=function(){return x.w(this.$d,this)},b.toDate=function(){return new Date(this.valueOf())},b.toJSON=function(){return this.isValid()?this.toISOString():null},b.toISOString=function(){return this.$d.toISOString()},b.toString=function(){return this.$d.toUTCString()},c}(),T=$.prototype;return S.prototype=T,[["$ms",n],["$s",o],["$m",i],["$H",a],["$W",u],["$M",f],["$y",v],["$D",h]].forEach((function(t){T[t[1]]=function(r){return this.$g(r,t[0],t[1])}})),S.extend=function(t,r){return t.$i||(t(r,$,S),t.$i=!0),S},S.locale=O,S.isDayjs=w,S.unix=function(t){return S(1e3*t)},S.en=_[j],S.Ls=_,S.p={},S}()}));function io(){return oo().format("YYYY-MM-DDTHH:mm:ssZ")}function ao(t){if(It(t)){for(var r in t)return!0;return!1}return!1}function uo(t){if(!_n(t))return{};var r={};try{r=JSON.parse(t)}catch(t){r={}}return r}function co(t){return"[object Undefined]"===Object.prototype.toString.call(t)}function so(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(co(t))return"";var e="";try{e=r?JSON.stringify(t,null,2):JSON.stringify(t)}catch(t){e=""}return e}var fo=o.default.resolve();function lo(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r={};t.fnTableTags||(t.fnTableTags="tableTags.json");var e="".concat(fo,"/").concat(t.fnTableTags),n=new a.default.EventEmitter;function o(t){for(var r=arguments.length,e=new Array(r>1?r-1:0),o=1;o<r;o++)e[o-1]=arguments[o];setTimeout((function(){n.emit.apply(n,[t].concat(e))}),1)}function u(){var t={};try{if(i.default.existsSync(e)){var r=uo(i.default.readFileSync(e,"utf8"));ao(r)&&(t=r)}}catch(t){o("error",{msg:"readTableTags catch",err:t})}return t}function c(){try{var t=so(r);i.default.writeFileSync(e,t,"utf8")}catch(t){o("error",{msg:"writeTableTags catch",err:t})}}function s(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"useInputFirst";r="useStorageFirst"===e?no(t,u()):"useInputOnly"===e?t:"useStorageOnly"===e?u():no(u(),t),c()}function f(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r=no(r,t),c()}function l(){return r}var v=Nn((function(){c(),o("changeTableTags",r)}),200);function h(t){r[t]=io()+"|"+En(6),v()}return n.readTableTags=u,n.writeTableTags=c,n.initTableTags=s,n.setTableTags=f,n.getTableTags=l,n.updateTableTag=h,n}function vo(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=Ut(),e=Nt(t,"instWConverServer",null);if(null===e)return r.emit("error","invalid opt.instWConverServer"),r;var n=Nt(t,"dbORMs",null);if(!It(n))return r.emit("error","invalid opt.dbORMs"),r;var o=Nt(t,"tableNames",null);if(!Ft(o))return r.emit("error","invalid opt.tableNames"),r;0===Xr(o)&&console.log("opt.tableNames.lenght = 0");var i=new lo;o=an(o);var a={};function u(t){var r={};return mr(o,(function(e){var n=e,o=t[e];r[n]=o})),r}return mr(o,(function(t){a[t]=En(6)})),i.initTableTags(a,"useInputOnly"),mr(o,(function(t){var r=n[t];if(!r)throw new Error("invalid dbORMs.".concat(t));r.on("change",(function(){i.updateTableTag(t)}))})),e.on("clientEnter",(function(t,r){e.deliver(t,{mode:"syncTable",data:i.readTableTags()})})),i.on("changeTableTags",(function(t){e.broadcast({mode:"syncTable",data:u(t)})})),i}function ho(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}function po(t){return function(t){if(Array.isArray(t))return ho(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,r){if(t){if("string"==typeof t)return ho(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?ho(t,r):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yo(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function bo(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void e(t)}u.done?r(c):Promise.resolve(c).then(n,o)}function go(t){return function(){var r=this,e=arguments;return new Promise((function(n,o){var i=t.apply(r,e);function a(t){bo(i,n,o,a,u,"next",t)}function u(t){bo(i,n,o,a,u,"throw",t)}a(void 0)}))}}var mo=f((function(t){var r=function(t){var r,e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function s(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{s({},"")}catch(t){s=function(t,r,e){return t[r]=e}}function f(t,r,e,n){var o=r&&r.prototype instanceof b?r:b,i=Object.create(o.prototype),a=new M(n||[]);return i._invoke=function(t,r,e){var n=v;return function(o,i){if(n===p)throw new Error("Generator is already running");if(n===y){if("throw"===o)throw i;return E()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var u=$(a,e);if(u){if(u===d)continue;return u}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(n===v)throw n=y,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n=p;var c=l(t,r,e);if("normal"===c.type){if(n=e.done?y:h,c.arg===d)continue;return{value:c.arg,done:e.done}}"throw"===c.type&&(n=y,e.method="throw",e.arg=c.arg)}}}(t,e,a),i}function l(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var v="suspendedStart",h="suspendedYield",p="executing",y="completed",d={};function b(){}function g(){}function m(){}var j={};j[i]=function(){return this};var _=Object.getPrototypeOf,w=_&&_(_(D([])));w&&w!==e&&n.call(w,i)&&(j=w);var O=m.prototype=b.prototype=Object.create(j);function S(t){["next","throw","return"].forEach((function(r){s(t,r,(function(t){return this._invoke(r,t)}))}))}function x(t,r){function e(o,i,a,u){var s=l(t[o],t,i);if("throw"!==s.type){var f=s.arg,v=f.value;return v&&"object"===c(v)&&n.call(v,"__await")?r.resolve(v.__await).then((function(t){e("next",t,a,u)}),(function(t){e("throw",t,a,u)})):r.resolve(v).then((function(t){f.value=t,a(f)}),(function(t){return e("throw",t,a,u)}))}u(s.arg)}var o;this._invoke=function(t,n){function i(){return new r((function(r,o){e(t,n,r,o)}))}return o=o?o.then(i,i):i()}}function $(t,e){var n=t.iterator[e.method];if(n===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=r,$(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function T(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function A(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function D(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function e(){for(;++o<t.length;)if(n.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=r,e.done=!0,e};return a.next=a}}return{next:E}}function E(){return{value:r,done:!0}}return g.prototype=O.constructor=m,m.constructor=g,g.displayName=s(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===g||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,s(t,u,"GeneratorFunction")),t.prototype=Object.create(O),t},t.awrap=function(t){return{__await:t}},S(x.prototype),x.prototype[a]=function(){return this},t.AsyncIterator=x,t.async=function(r,e,n,o,i){void 0===i&&(i=Promise);var a=new x(f(r,e,n,o),i);return t.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(O),s(O,u,"Generator"),O[i]=function(){return this},O.toString=function(){return"[object Generator]"},t.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=D,M.prototype={constructor:M,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function o(n,o){return u.type="throw",u.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),d},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),A(e),d}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;A(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:D(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),d}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}}));function jo(t){return!!co(t)||(!!function(t){return"[object Null]"===Object.prototype.toString.call(t)}(t)||(!!function(t){if(It(t)){for(var r in t)return!1;return!0}return!1}(t)||(!!function(t){return!(!jn(t)||""!==t)}(t)||!!function(t){return!!Ft(t)&&0===t.length}(t))))}function _o(t){return!!Ft(t)&&(0!==t.length&&(1!==t.length||!jo(t[0])))}function wo(t){var r,e=Object.prototype.toString.call(t);if(r="[object Promise]"===e)return!0;if("[object Function]"!==e)return!1;try{r="function"!=typeof t.subscribe&&"function"==typeof t.then}catch(t){}return r}function Oo(t,r){return!!It(t)&&(!(!_n(r)&&!wn(r))&&r in t)}function So(t){return _n(t)||wn(t)?String(t):""}function xo(){var t,r,e=new Promise((function(){t=arguments[0],r=arguments[1]}));return e.resolve=t,e.reject=r,e}function $o(t){return function(){var r=xo(),e=null,n=null;try{e=t.apply(this,arguments)}catch(t){n=t}return null!==n?r.resolve({state:"error",msg:n}):wo(e)?e.then((function(t){r.resolve({state:"success",msg:t})})).catch((function(t){"cancelled"===Nt(t,"reason")?r.resolve({state:"cancelled",msg:""}):r.resolve({state:"error",msg:t})})):r.resolve({state:"success",msg:e}),r}}function To(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}function Ao(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?To(Object(e),!0).forEach((function(r){yo(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):To(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}var Mo={},Do=null;function Eo(t,r,e){var n={};return mr(t,(function(t){mr(r,(function(r){var o="".concat(t,".").concat(r);n[o]=function(){var n=go(mo.mark((function n(o,i){var a;return mo.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e(o,t,r,i);case 2:return a=n.sent,n.abrupt("return",a);case 4:case"end":return n.stop()}}),n)})));return function(t,r){return n.apply(this,arguments)}}()}))})),n}function ko(t){return Lo.apply(this,arguments)}function Lo(){return(Lo=go(mo.mark((function t(r){var e,n,o,i,a,u,c,s,f;return mo.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=r.func,n=r.input,o=r.pm,i="",Oo(n,"__sysToken__")){t.next=5;break}return o.resolve({state:"error",msg:"invalid token"}),t.abrupt("return",o);case 5:if(i=So(n.__sysToken__),Oo(n,"__sysInputArgs__")){t.next=9;break}return o.resolve({state:"error",msg:"invalid input"}),t.abrupt("return",o);case 9:if(n=n.__sysInputArgs__,a="",!wo(u=Do(i))){t.next=18;break}return t.next=15,u;case 15:a=t.sent,t.next=19;break;case 18:a=u;case 19:if(_n(a)||(a=""),"getFuncList"!==e){t.next=24;break}return c={state:"success",msg:yr(Mo)},o.resolve(c),t.abrupt("return",o);case 24:if(Oo(Mo,e)){t.next=27;break}return o.resolve({state:"error",msg:"invalid func[".concat(e,"]")}),t.abrupt("return",o);case 27:return s=Mo[e],t.prev=28,t.next=31,$o(s).apply(void 0,[a].concat(po(n)));case 31:f=t.sent,o.resolve(f),t.next=38;break;case 35:t.prev=35,t.t0=t.catch(28),o.resolve({state:"error",msg:"無法識別func: ".concat(e)});case 38:return t.abrupt("return",o);case 39:case"end":return t.stop()}}),t,null,[[28,35]])})))).apply(this,arguments)}function Po(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=Ut(),e=Nt(t,"instWConverServer",null);if(null===e)return r.emit("error","invalid opt.instWConverServer"),r;Ct(Do=Nt(t,"cbGetUserIDFromToken",null))||(Do=function(){var t=go(mo.mark((function t(){return mo.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return","");case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}());var n=Nt(t,"operORM",null);if(!Ct(n))return r.emit("error","invalid opt.operORM"),r;var o=Nt(t,"tableNames",null);if(!Ft(o))return r.emit("error","invalid opt.tableNames"),r;var i=Nt(t,"methods",null);Ft(i)||(i=["select","insert","save","del"]);var a=Nt(t,"extFuncs",null),u=Nt(t,"hookBefores",null),c=Nt(t,"hookAfters",null);0===Xr(o)&&console.log("opt.tableNames.lenght = 0");var s=Eo(o=an(o),i,n);return It(a)&&mr(a,(function(t,r){s[r]=t})),Mo=s,e.on("execute",function(){var t=go(mo.mark((function t(e,n,o){var i,a,s;return mo.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i={func:e,input:n,pm:o},Ct(u))try{u(i)}catch(t){r.emit("error",t)}else _o(u)&&mr(u,(function(t){if(Ct(t))try{t(i)}catch(t){r.emit("error",t)}}));return t.next=4,ko(i).catch((function(t){r.emit("error",t)}));case 4:if(a=t.sent,s=Ao(Ao({},i),{},{output:a}),Ct(c))try{c(s)}catch(t){r.emit("error",t)}else _o(c)&&mr(c,(function(t){if(Ct(t))try{t(s)}catch(t){r.emit("error",t)}}));case 7:case"end":return t.stop()}}),t)})));return function(r,e,n){return t.apply(this,arguments)}}()),r}return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=Ut(),e=Nt(t,"instWConverServer",null);if(null===e)return r.emit("error","invalid opt.instWConverServer"),r;var n=Nt(t,"dbORMs",null);if(!It(n))return r.emit("error","invalid opt.dbORMs"),r;var o=Nt(t,"operORM",null);if(!Ct(o))return r.emit("error","invalid opt.operORM"),r;var i=Nt(t,"tableNamesExec",null);if(!Ft(i))return r.emit("error","invalid opt.tableNamesExec"),r;var a=Nt(t,"methodsExec",null);Ft(a)||(a=["select","insert","save","del"]);var u=Nt(t,"tableNamesSync",null);if(!Ft(u))return r.emit("error","invalid opt.tableNamesSync"),r;var c=Nt(t,"cbGetUserIDFromToken",null),s=Nt(t,"extFuncs",null),f=Nt(t,"hookBefores",null),l=Nt(t,"hookAfters",null),v=Po({instWConverServer:e,cbGetUserIDFromToken:c,operORM:o,tableNames:i,methods:a,extFuncs:s,hookBefores:f,hookAfters:l});v.on("error",(function(t){r.emit("error",t)}));var h=vo({instWConverServer:e,dbORMs:n,tableNames:u});return h.on("error",(function(t){r.emit("error",t)})),r}}));
  //# sourceMappingURL=w-serv-webdata-server.umd.js.map
  