@gudhub/core 1.2.4-beta.46 → 1.2.4-beta.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.parcel-cache/83e7562660f7cc15-BundleGraph +0 -0
- package/.parcel-cache/9a0d07555444f4da-AssetGraph +0 -0
- package/.parcel-cache/d3a1b9507cb44047-AssetGraph +0 -0
- package/.parcel-cache/data.mdb +0 -0
- package/.parcel-cache/dc1da35000e13623-RequestGraph +0 -0
- package/.parcel-cache/lock.mdb +0 -0
- package/.parcel-cache/snapshot-dc1da35000e13623.txt +130 -132
- package/GUDHUB/AppProcessor/AppProcessor.js +6 -20
- package/GUDHUB/ChunksManager/ChunksManager.test.js +3 -0
- package/GUDHUB/DataService/AppDataService.js +1 -200
- package/GUDHUB/DataService/ChunkDataService.js +0 -4
- package/GUDHUB/DataService/IndexedDB/IndexedDBAppService.js +225 -264
- package/GUDHUB/DataService/IndexedDB/IndexedDBChunkService.js +3 -227
- package/GUDHUB/DataService/IndexedDB/IndexedDBService.js +124 -302
- package/GUDHUB/DataService/IndexedDB/StoreManager/BaseStoreManager.js +9 -36
- package/GUDHUB/DataService/IndexedDB/StoreManager/managers.js +4 -40
- package/GUDHUB/DataService/IndexedDB/appRequestWorker.js +23 -88
- package/GUDHUB/DataService/IndexedDB/consts.js +1 -3
- package/GUDHUB/DataService/IndexedDB/init.js +1 -1
- package/GUDHUB/DataService/IndexedDB/storeManagerConf/init.js +1 -1
- package/GUDHUB/DataService/export.js +65 -13
- package/GUDHUB/DataService/httpService/AppHttpService.js +5 -15
- package/GUDHUB/DataService/httpService/ChunkHttpService.js +35 -37
- package/GUDHUB/DataService/utils.js +24 -127
- package/GUDHUB/GHConstructor/createAngularModuleInstance.js +7 -4
- package/GUDHUB/GHConstructor/createClassInstance.js +8 -3
- package/GUDHUB/ItemProcessor/ItemProcessor.js +0 -18
- package/GUDHUB/Storage/ModulesList.js +0 -7
- package/GUDHUB/Utils/Utils.js +0 -14
- package/GUDHUB/WebSocket/WebSocket.js +2 -2
- package/GUDHUB/api/AppApi.js +13 -13
- package/GUDHUB/api/ChunkApi.js +5 -5
- package/GUDHUB/config.js +11 -2
- package/GUDHUB/consts.js +6 -12
- package/GUDHUB/gudhub.js +7 -30
- package/GUDHUB/gudhubAppRequestWorker.js +1 -2
- package/dist/gudhub.es.js +451 -589
- package/dist/gudhub.umd.js +27 -27
- package/package.json +4 -2
- package/GUDHUB/ChunksManager/ChunksManager.js +0 -68
- package/indextest.html +0 -35
package/dist/gudhub.umd.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
(function(n,e){typeof exports=="object"&&typeof module<"u"?module.exports=e():typeof define=="function"&&define.amd?define(e):(n=typeof globalThis<"u"?globalThis:n||self,n.GudHub=e())})(this,function(){"use strict";var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function getAugmentedNamespace(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}),t}var axios$2={exports:{}},bind,hasRequiredBind;function requireBind(){return hasRequiredBind||(hasRequiredBind=1,bind=function(e,t){return function(){for(var i=new Array(arguments.length),a=0;a<i.length;a++)i[a]=arguments[a];return e.apply(t,i)}}),bind}var utils$1,hasRequiredUtils$1;function requireUtils$1(){if(hasRequiredUtils$1)return utils$1;hasRequiredUtils$1=1;var n=requireBind(),e=Object.prototype.toString;function t(x){return e.call(x)==="[object Array]"}function r(x){return typeof x>"u"}function i(x){return x!==null&&!r(x)&&x.constructor!==null&&!r(x.constructor)&&typeof x.constructor.isBuffer=="function"&&x.constructor.isBuffer(x)}function a(x){return e.call(x)==="[object ArrayBuffer]"}function s(x){return typeof FormData<"u"&&x instanceof FormData}function l(x){var D;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?D=ArrayBuffer.isView(x):D=x&&x.buffer&&x.buffer instanceof ArrayBuffer,D}function u(x){return typeof x=="string"}function o(x){return typeof x=="number"}function f(x){return x!==null&&typeof x=="object"}function d(x){if(e.call(x)!=="[object Object]")return!1;var D=Object.getPrototypeOf(x);return D===null||D===Object.prototype}function h(x){return e.call(x)==="[object Date]"}function y(x){return e.call(x)==="[object File]"}function m(x){return e.call(x)==="[object Blob]"}function v(x){return e.call(x)==="[object Function]"}function p(x){return f(x)&&v(x.pipe)}function E(x){return typeof URLSearchParams<"u"&&x instanceof URLSearchParams}function S(x){return x.trim?x.trim():x.replace(/^\s+|\s+$/g,"")}function w(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function g(x,D){if(!(x===null||typeof x>"u"))if(typeof x!="object"&&(x=[x]),t(x))for(var j=0,F=x.length;j<F;j++)D.call(null,x[j],j,x);else for(var
|
|
2
|
-
`),function(o){if(l=o.indexOf(":"),a=n.trim(o.substr(0,l)).toLowerCase(),s=n.trim(o.substr(l+1)),a){if(i[a]&&e.indexOf(a)>=0)return;a==="set-cookie"?i[a]=(i[a]?i[a]:[]).concat([s]):i[a]=i[a]?i[a]+", "+s:s}}),i},parseHeaders}var isURLSameOrigin,hasRequiredIsURLSameOrigin;function requireIsURLSameOrigin(){if(hasRequiredIsURLSameOrigin)return isURLSameOrigin;hasRequiredIsURLSameOrigin=1;var n=requireUtils$1();return isURLSameOrigin=n.isStandardBrowserEnv()?function(){var t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),i;function a(s){var l=s;return t&&(r.setAttribute("href",l),l=r.href),r.setAttribute("href",l),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return i=a(window.location.href),function(l){var u=n.isString(l)?a(l):l;return u.protocol===i.protocol&&u.host===i.host}}():function(){return function(){return!0}}(),isURLSameOrigin}var xhr,hasRequiredXhr;function requireXhr(){if(hasRequiredXhr)return xhr;hasRequiredXhr=1;var n=requireUtils$1(),e=requireSettle(),t=requireCookies(),r=requireBuildURL(),i=requireBuildFullPath(),a=requireParseHeaders(),s=requireIsURLSameOrigin(),l=requireCreateError();return xhr=function(o){return new Promise(function(d,h){var y=o.data,m=o.headers,v=o.responseType;n.isFormData(y)&&delete m["Content-Type"];var p=new XMLHttpRequest;if(o.auth){var E=o.auth.username||"",S=o.auth.password?unescape(encodeURIComponent(o.auth.password)):"";m.Authorization="Basic "+btoa(E+":"+S)}var w=i(o.baseURL,o.url);p.open(o.method.toUpperCase(),r(w,o.params,o.paramsSerializer),!0),p.timeout=o.timeout;function g(){if(p){var A="getAllResponseHeaders"in p?a(p.getAllResponseHeaders()):null,q=!v||v==="text"||v==="json"?p.responseText:p.response,x={data:q,status:p.status,statusText:p.statusText,headers:A,config:o,request:p};e(d,h,x),p=null}}if("onloadend"in p?p.onloadend=g:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(g)},p.onabort=function(){p&&(h(l("Request aborted",o,"ECONNABORTED",p)),p=null)},p.onerror=function(){h(l("Network Error",o,null,p)),p=null},p.ontimeout=function(){var q="timeout of "+o.timeout+"ms exceeded";o.timeoutErrorMessage&&(q=o.timeoutErrorMessage),h(l(q,o,o.transitional&&o.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",p)),p=null},n.isStandardBrowserEnv()){var b=(o.withCredentials||s(w))&&o.xsrfCookieName?t.read(o.xsrfCookieName):void 0;b&&(m[o.xsrfHeaderName]=b)}"setRequestHeader"in p&&n.forEach(m,function(q,x){typeof y>"u"&&x.toLowerCase()==="content-type"?delete m[x]:p.setRequestHeader(x,q)}),n.isUndefined(o.withCredentials)||(p.withCredentials=!!o.withCredentials),v&&v!=="json"&&(p.responseType=o.responseType),typeof o.onDownloadProgress=="function"&&p.addEventListener("progress",o.onDownloadProgress),typeof o.onUploadProgress=="function"&&p.upload&&p.upload.addEventListener("progress",o.onUploadProgress),o.cancelToken&&o.cancelToken.promise.then(function(q){p&&(p.abort(),h(q),p=null)}),y||(y=null),p.send(y)})},xhr}var defaults_1,hasRequiredDefaults;function requireDefaults(){if(hasRequiredDefaults)return defaults_1;hasRequiredDefaults=1;var n=requireUtils$1(),e=requireNormalizeHeaderName(),t=requireEnhanceError(),r={"Content-Type":"application/x-www-form-urlencoded"};function i(u,o){!n.isUndefined(u)&&n.isUndefined(u["Content-Type"])&&(u["Content-Type"]=o)}function a(){var u;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(u=requireXhr()),u}function s(u,o,f){if(n.isString(u))try{return(o||JSON.parse)(u),n.trim(u)}catch(d){if(d.name!=="SyntaxError")throw d}return(0,JSON.stringify)(u)}var l={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:a(),transformRequest:[function(o,f){return e(f,"Accept"),e(f,"Content-Type"),n.isFormData(o)||n.isArrayBuffer(o)||n.isBuffer(o)||n.isStream(o)||n.isFile(o)||n.isBlob(o)?o:n.isArrayBufferView(o)?o.buffer:n.isURLSearchParams(o)?(i(f,"application/x-www-form-urlencoded;charset=utf-8"),o.toString()):n.isObject(o)||f&&f["Content-Type"]==="application/json"?(i(f,"application/json"),s(o)):o}],transformResponse:[function(o){var f=this.transitional,d=f&&f.silentJSONParsing,h=f&&f.forcedJSONParsing,y=!d&&this.responseType==="json";if(y||h&&n.isString(o)&&o.length)try{return JSON.parse(o)}catch(m){if(y)throw m.name==="SyntaxError"?t(m,this,"E_JSON_PARSE"):m}return o}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(o){return o>=200&&o<300}};return l.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],function(o){l.headers[o]={}}),n.forEach(["post","put","patch"],function(o){l.headers[o]=n.merge(r)}),defaults_1=l,defaults_1}var transformData,hasRequiredTransformData;function requireTransformData(){if(hasRequiredTransformData)return transformData;hasRequiredTransformData=1;var n=requireUtils$1(),e=requireDefaults();return transformData=function(r,i,a){var s=this||e;return n.forEach(a,function(u){r=u.call(s,r,i)}),r},transformData}var isCancel,hasRequiredIsCancel;function requireIsCancel(){return hasRequiredIsCancel||(hasRequiredIsCancel=1,isCancel=function(e){return!!(e&&e.__CANCEL__)}),isCancel}var dispatchRequest,hasRequiredDispatchRequest;function requireDispatchRequest(){if(hasRequiredDispatchRequest)return dispatchRequest;hasRequiredDispatchRequest=1;var n=requireUtils$1(),e=requireTransformData(),t=requireIsCancel(),r=requireDefaults();function i(a){a.cancelToken&&a.cancelToken.throwIfRequested()}return dispatchRequest=function(s){i(s),s.headers=s.headers||{},s.data=e.call(s,s.data,s.headers,s.transformRequest),s.headers=n.merge(s.headers.common||{},s.headers[s.method]||{},s.headers),n.forEach(["delete","get","head","post","put","patch","common"],function(o){delete s.headers[o]});var l=s.adapter||r.adapter;return l(s).then(function(o){return i(s),o.data=e.call(s,o.data,o.headers,s.transformResponse),o},function(o){return t(o)||(i(s),o&&o.response&&(o.response.data=e.call(s,o.response.data,o.response.headers,s.transformResponse))),Promise.reject(o)})},dispatchRequest}var mergeConfig,hasRequiredMergeConfig;function requireMergeConfig(){if(hasRequiredMergeConfig)return mergeConfig;hasRequiredMergeConfig=1;var n=requireUtils$1();return mergeConfig=function(t,r){r=r||{};var i={},a=["url","method","data"],s=["headers","auth","proxy","params"],l=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],u=["validateStatus"];function o(y,m){return n.isPlainObject(y)&&n.isPlainObject(m)?n.merge(y,m):n.isPlainObject(m)?n.merge({},m):n.isArray(m)?m.slice():m}function f(y){n.isUndefined(r[y])?n.isUndefined(t[y])||(i[y]=o(void 0,t[y])):i[y]=o(t[y],r[y])}n.forEach(a,function(m){n.isUndefined(r[m])||(i[m]=o(void 0,r[m]))}),n.forEach(s,f),n.forEach(l,function(m){n.isUndefined(r[m])?n.isUndefined(t[m])||(i[m]=o(void 0,t[m])):i[m]=o(void 0,r[m])}),n.forEach(u,function(m){m in r?i[m]=o(t[m],r[m]):m in t&&(i[m]=o(void 0,t[m]))});var d=a.concat(s).concat(l).concat(u),h=Object.keys(t).concat(Object.keys(r)).filter(function(m){return d.indexOf(m)===-1});return n.forEach(h,f),i},mergeConfig}const _args=[["axios@0.21.4","/home/vitaly/Documents/work/gudhubclient/override_npm/gudhub"]],_from="axios@0.21.4",_id="axios@0.21.4",_inBundle=!1,_integrity="sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",_location="/axios",_phantomChildren={},_requested={type:"version",registry:!0,raw:"axios@0.21.4",name:"axios",escapedName:"axios",rawSpec:"0.21.4",saveSpec:null,fetchSpec:"0.21.4"},_requiredBy=["/"],_resolved="https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",_spec="0.21.4",_where="/home/vitaly/Documents/work/gudhubclient/override_npm/gudhub",author={name:"Matt Zabriskie"},browser$1={"./lib/adapters/http.js":"./lib/adapters/xhr.js"},bugs={url:"https://github.com/axios/axios/issues"},bundlesize=[{path:"./dist/axios.min.js",threshold:"5kB"}],dependencies={"follow-redirects":"^1.14.0"},description="Promise based HTTP client for the browser and node.js",devDependencies={coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},homepage="https://axios-http.com",jsdelivr="dist/axios.min.js",keywords=["xhr","http","ajax","promise","node"],license="MIT",main="index.js",name="axios",repository={type:"git",url:"git+https://github.com/axios/axios.git"},scripts={build:"NODE_ENV=production grunt build",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",examples:"node ./examples/server.js",fix:"eslint --fix lib/**/*.js",postversion:"git push && git push --tags",preversion:"npm test",start:"node ./sandbox/server.js",test:"grunt test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"},typings="./index.d.ts",unpkg="dist/axios.min.js",version="0.21.4",require$$0$1={_args,_from,_id,_inBundle,_integrity,_location,_phantomChildren,_requested,_requiredBy,_resolved,_spec,_where,author,browser:browser$1,bugs,bundlesize,dependencies,description,devDependencies,homepage,jsdelivr,keywords,license,main,name,repository,scripts,typings,unpkg,version};var validator,hasRequiredValidator;function requireValidator(){if(hasRequiredValidator)return validator;hasRequiredValidator=1;var n=require$$0$1,e={};["object","boolean","number","function","string","symbol"].forEach(function(s,l){e[s]=function(o){return typeof o===s||"a"+(l<1?"n ":" ")+s}});var t={},r=n.version.split(".");function i(s,l){for(var u=l?l.split("."):r,o=s.split("."),f=0;f<3;f++){if(u[f]>o[f])return!0;if(u[f]<o[f])return!1}return!1}e.transitional=function(l,u,o){var f=u&&i(u);function d(h,y){return"[Axios v"+n.version+"] Transitional option '"+h+"'"+y+(o?". "+o:"")}return function(h,y,m){if(l===!1)throw new Error(d(y," has been removed in "+u));return f&&!t[y]&&(t[y]=!0,console.warn(d(y," has been deprecated since v"+u+" and will be removed in the near future"))),l?l(h,y,m):!0}};function a(s,l,u){if(typeof s!="object")throw new TypeError("options must be an object");for(var o=Object.keys(s),f=o.length;f-- >0;){var d=o[f],h=l[d];if(h){var y=s[d],m=y===void 0||h(y,d,s);if(m!==!0)throw new TypeError("option "+d+" must be "+m);continue}if(u!==!0)throw Error("Unknown option "+d)}}return validator={isOlderVersion:i,assertOptions:a,validators:e},validator}var Axios_1,hasRequiredAxios$2;function requireAxios$2(){if(hasRequiredAxios$2)return Axios_1;hasRequiredAxios$2=1;var n=requireUtils$1(),e=requireBuildURL(),t=requireInterceptorManager(),r=requireDispatchRequest(),i=requireMergeConfig(),a=requireValidator(),s=a.validators;function l(u){this.defaults=u,this.interceptors={request:new t,response:new t}}return l.prototype.request=function(o){typeof o=="string"?(o=arguments[1]||{},o.url=arguments[0]):o=o||{},o=i(this.defaults,o),o.method?o.method=o.method.toLowerCase():this.defaults.method?o.method=this.defaults.method.toLowerCase():o.method="get";var f=o.transitional;f!==void 0&&a.assertOptions(f,{silentJSONParsing:s.transitional(s.boolean,"1.0.0"),forcedJSONParsing:s.transitional(s.boolean,"1.0.0"),clarifyTimeoutError:s.transitional(s.boolean,"1.0.0")},!1);var d=[],h=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(o)===!1||(h=h&&g.synchronous,d.unshift(g.fulfilled,g.rejected))});var y=[];this.interceptors.response.forEach(function(g){y.push(g.fulfilled,g.rejected)});var m;if(!h){var v=[r,void 0];for(Array.prototype.unshift.apply(v,d),v=v.concat(y),m=Promise.resolve(o);v.length;)m=m.then(v.shift(),v.shift());return m}for(var p=o;d.length;){var E=d.shift(),S=d.shift();try{p=E(p)}catch(w){S(w);break}}try{m=r(p)}catch(w){return Promise.reject(w)}for(;y.length;)m=m.then(y.shift(),y.shift());return m},l.prototype.getUri=function(o){return o=i(this.defaults,o),e(o.url,o.params,o.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],function(o){l.prototype[o]=function(f,d){return this.request(i(d||{},{method:o,url:f,data:(d||{}).data}))}}),n.forEach(["post","put","patch"],function(o){l.prototype[o]=function(f,d,h){return this.request(i(h||{},{method:o,url:f,data:d}))}}),Axios_1=l,Axios_1}var Cancel_1,hasRequiredCancel;function requireCancel(){if(hasRequiredCancel)return Cancel_1;hasRequiredCancel=1;function n(e){this.message=e}return n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,Cancel_1=n,Cancel_1}var CancelToken_1,hasRequiredCancelToken;function requireCancelToken(){if(hasRequiredCancelToken)return CancelToken_1;hasRequiredCancelToken=1;var n=requireCancel();function e(t){if(typeof t!="function")throw new TypeError("executor must be a function.");var r;this.promise=new Promise(function(s){r=s});var i=this;t(function(s){i.reason||(i.reason=new n(s),r(i.reason))})}return e.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},e.source=function(){var r,i=new e(function(s){r=s});return{token:i,cancel:r}},CancelToken_1=e,CancelToken_1}var spread,hasRequiredSpread;function requireSpread(){return hasRequiredSpread||(hasRequiredSpread=1,spread=function(e){return function(r){return e.apply(null,r)}}),spread}var isAxiosError,hasRequiredIsAxiosError;function requireIsAxiosError(){return hasRequiredIsAxiosError||(hasRequiredIsAxiosError=1,isAxiosError=function(e){return typeof e=="object"&&e.isAxiosError===!0}),isAxiosError}var hasRequiredAxios$1;function requireAxios$1(){if(hasRequiredAxios$1)return axios$2.exports;hasRequiredAxios$1=1;var n=requireUtils$1(),e=requireBind(),t=requireAxios$2(),r=requireMergeConfig(),i=requireDefaults();function a(l){var u=new t(l),o=e(t.prototype.request,u);return n.extend(o,t.prototype,u),n.extend(o,u),o}var s=a(i);return s.Axios=t,s.create=function(u){return a(r(s.defaults,u))},s.Cancel=requireCancel(),s.CancelToken=requireCancelToken(),s.isCancel=requireIsCancel(),s.all=function(u){return Promise.all(u)},s.spread=requireSpread(),s.isAxiosError=requireIsAxiosError(),axios$2.exports=s,axios$2.exports.default=s,axios$2.exports}var axios$1,hasRequiredAxios;function requireAxios(){return hasRequiredAxios||(hasRequiredAxios=1,axios$1=requireAxios$1()),axios$1}var axiosExports=requireAxios();const axios=getDefaultExportFromCjs(axiosExports);function filterFields(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).filter(e=>e.field_value!=null)}function convertObjToUrlParams(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const e=Object.entries(n);return e.length?"&".concat(e.map(t=>{let[r,i]=t;return"".concat(r,"=").concat(i)}).join("&")):""}var esErrors,hasRequiredEsErrors;function requireEsErrors(){return hasRequiredEsErrors||(hasRequiredEsErrors=1,esErrors=Error),esErrors}var _eval,hasRequired_eval;function require_eval(){return hasRequired_eval||(hasRequired_eval=1,_eval=EvalError),_eval}var range,hasRequiredRange;function requireRange(){return hasRequiredRange||(hasRequiredRange=1,range=RangeError),range}var ref,hasRequiredRef;function requireRef(){return hasRequiredRef||(hasRequiredRef=1,ref=ReferenceError),ref}var syntax,hasRequiredSyntax;function requireSyntax(){return hasRequiredSyntax||(hasRequiredSyntax=1,syntax=SyntaxError),syntax}var type,hasRequiredType;function requireType(){return hasRequiredType||(hasRequiredType=1,type=TypeError),type}var uri,hasRequiredUri;function requireUri(){return hasRequiredUri||(hasRequiredUri=1,uri=URIError),uri}var shams,hasRequiredShams;function requireShams(){return hasRequiredShams||(hasRequiredShams=1,shams=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),r=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;e[t]=i;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,t);if(s.value!==i||s.enumerable!==!0)return!1}return!0}),shams}var hasSymbols,hasRequiredHasSymbols;function requireHasSymbols(){if(hasRequiredHasSymbols)return hasSymbols;hasRequiredHasSymbols=1;var n=typeof Symbol<"u"&&Symbol,e=requireShams();return hasSymbols=function(){return typeof n!="function"||typeof Symbol!="function"||typeof n("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},hasSymbols}var hasProto,hasRequiredHasProto;function requireHasProto(){if(hasRequiredHasProto)return hasProto;hasRequiredHasProto=1;var n={__proto__:null,foo:{}},e=Object;return hasProto=function(){return{__proto__:n}.foo===n.foo&&!(n instanceof e)},hasProto}var implementation,hasRequiredImplementation;function requireImplementation(){if(hasRequiredImplementation)return implementation;hasRequiredImplementation=1;var n="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,r="[object Function]",i=function(u,o){for(var f=[],d=0;d<u.length;d+=1)f[d]=u[d];for(var h=0;h<o.length;h+=1)f[h+u.length]=o[h];return f},a=function(u,o){for(var f=[],d=o,h=0;d<u.length;d+=1,h+=1)f[h]=u[d];return f},s=function(l,u){for(var o="",f=0;f<l.length;f+=1)o+=l[f],f+1<l.length&&(o+=u);return o};return implementation=function(u){var o=this;if(typeof o!="function"||e.apply(o)!==r)throw new TypeError(n+o);for(var f=a(arguments,1),d,h=function(){if(this instanceof d){var E=o.apply(this,i(f,arguments));return Object(E)===E?E:this}return o.apply(u,i(f,arguments))},y=t(0,o.length-f.length),m=[],v=0;v<y;v++)m[v]="$"+v;if(d=Function("binder","return function ("+s(m,",")+"){ return binder.apply(this,arguments); }")(h),o.prototype){var p=function(){};p.prototype=o.prototype,d.prototype=new p,p.prototype=null}return d},implementation}var functionBind,hasRequiredFunctionBind;function requireFunctionBind(){if(hasRequiredFunctionBind)return functionBind;hasRequiredFunctionBind=1;var n=requireImplementation();return functionBind=Function.prototype.bind||n,functionBind}var hasown,hasRequiredHasown;function requireHasown(){if(hasRequiredHasown)return hasown;hasRequiredHasown=1;var n=Function.prototype.call,e=Object.prototype.hasOwnProperty,t=requireFunctionBind();return hasown=t.call(n,e),hasown}var getIntrinsic,hasRequiredGetIntrinsic;function requireGetIntrinsic(){if(hasRequiredGetIntrinsic)return getIntrinsic;hasRequiredGetIntrinsic=1;var n,e=requireEsErrors(),t=require_eval(),r=requireRange(),i=requireRef(),a=requireSyntax(),s=requireType(),l=requireUri(),u=Function,o=function(K){try{return u('"use strict"; return ('+K+").constructor;")()}catch{}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch{f=null}var d=function(){throw new s},h=f?function(){try{return arguments.callee,d}catch{try{return f(arguments,"callee").get}catch{return d}}}():d,y=requireHasSymbols()(),m=requireHasProto()(),v=Object.getPrototypeOf||(m?function(K){return K.__proto__}:null),p={},E=typeof Uint8Array>"u"||!v?n:v(Uint8Array),S={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?n:ArrayBuffer,"%ArrayIteratorPrototype%":y&&v?v([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":p,"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":p,"%AsyncIteratorPrototype%":p,"%Atomics%":typeof Atomics>"u"?n:Atomics,"%BigInt%":typeof BigInt>"u"?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":e,"%eval%":eval,"%EvalError%":t,"%Float32Array%":typeof Float32Array>"u"?n:Float32Array,"%Float64Array%":typeof Float64Array>"u"?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?n:FinalizationRegistry,"%Function%":u,"%GeneratorFunction%":p,"%Int8Array%":typeof Int8Array>"u"?n:Int8Array,"%Int16Array%":typeof Int16Array>"u"?n:Int16Array,"%Int32Array%":typeof Int32Array>"u"?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":y&&v?v(v([][Symbol.iterator]())):n,"%JSON%":typeof JSON=="object"?JSON:n,"%Map%":typeof Map>"u"?n:Map,"%MapIteratorPrototype%":typeof Map>"u"||!y||!v?n:v(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?n:Promise,"%Proxy%":typeof Proxy>"u"?n:Proxy,"%RangeError%":r,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?n:Set,"%SetIteratorPrototype%":typeof Set>"u"||!y||!v?n:v(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":y&&v?v(""[Symbol.iterator]()):n,"%Symbol%":y?Symbol:n,"%SyntaxError%":a,"%ThrowTypeError%":h,"%TypedArray%":E,"%TypeError%":s,"%Uint8Array%":typeof Uint8Array>"u"?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?n:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?n:WeakMap,"%WeakRef%":typeof WeakRef>"u"?n:WeakRef,"%WeakSet%":typeof WeakSet>"u"?n:WeakSet};if(v)try{null.error}catch(K){var w=v(v(K));S["%Error.prototype%"]=w}var g=function K(W){var te;if(W==="%AsyncFunction%")te=o("async function () {}");else if(W==="%GeneratorFunction%")te=o("function* () {}");else if(W==="%AsyncGeneratorFunction%")te=o("async function* () {}");else if(W==="%AsyncGenerator%"){var Z=K("%AsyncGeneratorFunction%");Z&&(te=Z.prototype)}else if(W==="%AsyncIteratorPrototype%"){var V=K("%AsyncGenerator%");V&&v&&(te=v(V.prototype))}return S[W]=te,te},b={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A=requireFunctionBind(),q=requireHasown(),x=A.call(Function.call,Array.prototype.concat),D=A.call(Function.apply,Array.prototype.splice),j=A.call(Function.call,String.prototype.replace),F=A.call(Function.call,String.prototype.slice),N=A.call(Function.call,RegExp.prototype.exec),B=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,U=/\\(\\)?/g,H=function(W){var te=F(W,0,1),Z=F(W,-1);if(te==="%"&&Z!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(Z==="%"&&te!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var V=[];return j(W,B,function(pe,C,k,$){V[V.length]=k?j($,U,"$1"):C||pe}),V},z=function(W,te){var Z=W,V;if(q(b,Z)&&(V=b[Z],Z="%"+V[0]+"%"),q(S,Z)){var pe=S[Z];if(pe===p&&(pe=g(Z)),typeof pe>"u"&&!te)throw new s("intrinsic "+W+" exists, but is not available. Please file an issue!");return{alias:V,name:Z,value:pe}}throw new a("intrinsic "+W+" does not exist!")};return getIntrinsic=function(W,te){if(typeof W!="string"||W.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof te!="boolean")throw new s('"allowMissing" argument must be a boolean');if(N(/^%?[^%]*%?$/,W)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Z=H(W),V=Z.length>0?Z[0]:"",pe=z("%"+V+"%",te),C=pe.name,k=pe.value,$=!1,Y=pe.alias;Y&&(V=Y[0],D(Z,x([0,1],Y)));for(var se=1,X=!0;se<Z.length;se+=1){var ne=Z[se],ue=F(ne,0,1),le=F(ne,-1);if((ue==='"'||ue==="'"||ue==="`"||le==='"'||le==="'"||le==="`")&&ue!==le)throw new a("property names with quotes must have matching quotes");if((ne==="constructor"||!X)&&($=!0),V+="."+ne,C="%"+V+"%",q(S,C))k=S[C];else if(k!=null){if(!(ne in k)){if(!te)throw new s("base intrinsic for "+W+" exists, but the property is not available.");return}if(f&&se+1>=Z.length){var me=f(k,ne);X=!!me,X&&"get"in me&&!("originalValue"in me.get)?k=me.get:k=k[ne]}else X=q(k,ne),k=k[ne];X&&!$&&(S[C]=k)}}return k},getIntrinsic}var callBind={exports:{}},esDefineProperty,hasRequiredEsDefineProperty;function requireEsDefineProperty(){if(hasRequiredEsDefineProperty)return esDefineProperty;hasRequiredEsDefineProperty=1;var n=requireGetIntrinsic(),e=n("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return esDefineProperty=e,esDefineProperty}var gopd,hasRequiredGopd;function requireGopd(){if(hasRequiredGopd)return gopd;hasRequiredGopd=1;var n=requireGetIntrinsic(),e=n("%Object.getOwnPropertyDescriptor%",!0);if(e)try{e([],"length")}catch{e=null}return gopd=e,gopd}var defineDataProperty,hasRequiredDefineDataProperty;function requireDefineDataProperty(){if(hasRequiredDefineDataProperty)return defineDataProperty;hasRequiredDefineDataProperty=1;var n=requireEsDefineProperty(),e=requireSyntax(),t=requireType(),r=requireGopd();return defineDataProperty=function(a,s,l){if(!a||typeof a!="object"&&typeof a!="function")throw new t("`obj` must be an object or a function`");if(typeof s!="string"&&typeof s!="symbol")throw new t("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new t("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new t("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new t("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new t("`loose`, if provided, must be a boolean");var u=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,f=arguments.length>5?arguments[5]:null,d=arguments.length>6?arguments[6]:!1,h=!!r&&r(a,s);if(n)n(a,s,{configurable:f===null&&h?h.configurable:!f,enumerable:u===null&&h?h.enumerable:!u,value:l,writable:o===null&&h?h.writable:!o});else if(d||!u&&!o&&!f)a[s]=l;else throw new e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},defineDataProperty}var hasPropertyDescriptors_1,hasRequiredHasPropertyDescriptors;function requireHasPropertyDescriptors(){if(hasRequiredHasPropertyDescriptors)return hasPropertyDescriptors_1;hasRequiredHasPropertyDescriptors=1;var n=requireEsDefineProperty(),e=function(){return!!n};return e.hasArrayLengthDefineBug=function(){if(!n)return null;try{return n([],"length",{value:1}).length!==1}catch{return!0}},hasPropertyDescriptors_1=e,hasPropertyDescriptors_1}var setFunctionLength,hasRequiredSetFunctionLength;function requireSetFunctionLength(){if(hasRequiredSetFunctionLength)return setFunctionLength;hasRequiredSetFunctionLength=1;var n=requireGetIntrinsic(),e=requireDefineDataProperty(),t=requireHasPropertyDescriptors()(),r=requireGopd(),i=requireType(),a=n("%Math.floor%");return setFunctionLength=function(l,u){if(typeof l!="function")throw new i("`fn` is not a function");if(typeof u!="number"||u<0||u>4294967295||a(u)!==u)throw new i("`length` must be a positive 32-bit integer");var o=arguments.length>2&&!!arguments[2],f=!0,d=!0;if("length"in l&&r){var h=r(l,"length");h&&!h.configurable&&(f=!1),h&&!h.writable&&(d=!1)}return(f||d||!o)&&(t?e(l,"length",u,!0,!0):e(l,"length",u)),l},setFunctionLength}var hasRequiredCallBind;function requireCallBind(){return hasRequiredCallBind||(hasRequiredCallBind=1,function(n){var e=requireFunctionBind(),t=requireGetIntrinsic(),r=requireSetFunctionLength(),i=requireType(),a=t("%Function.prototype.apply%"),s=t("%Function.prototype.call%"),l=t("%Reflect.apply%",!0)||e.call(s,a),u=requireEsDefineProperty(),o=t("%Math.max%");n.exports=function(h){if(typeof h!="function")throw new i("a function is required");var y=l(e,s,arguments);return r(y,1+o(0,h.length-(arguments.length-1)),!0)};var f=function(){return l(e,a,arguments)};u?u(n.exports,"apply",{value:f}):n.exports.apply=f}(callBind)),callBind.exports}var callBound,hasRequiredCallBound;function requireCallBound(){if(hasRequiredCallBound)return callBound;hasRequiredCallBound=1;var n=requireGetIntrinsic(),e=requireCallBind(),t=e(n("String.prototype.indexOf"));return callBound=function(i,a){var s=n(i,!!a);return typeof s=="function"&&t(i,".prototype.")>-1?e(s):s},callBound}const __viteBrowserExternal={},__viteBrowserExternal$1=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(__viteBrowserExternal$1);var objectInspect,hasRequiredObjectInspect;function requireObjectInspect(){if(hasRequiredObjectInspect)return objectInspect;hasRequiredObjectInspect=1;var n=typeof Map=="function"&&Map.prototype,e=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,t=n&&e&&typeof e.get=="function"?e.get:null,r=n&&Map.prototype.forEach,i=typeof Set=="function"&&Set.prototype,a=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,s=i&&a&&typeof a.get=="function"?a.get:null,l=i&&Set.prototype.forEach,u=typeof WeakMap=="function"&&WeakMap.prototype,o=u?WeakMap.prototype.has:null,f=typeof WeakSet=="function"&&WeakSet.prototype,d=f?WeakSet.prototype.has:null,h=typeof WeakRef=="function"&&WeakRef.prototype,y=h?WeakRef.prototype.deref:null,m=Boolean.prototype.valueOf,v=Object.prototype.toString,p=Function.prototype.toString,E=String.prototype.match,S=String.prototype.slice,w=String.prototype.replace,g=String.prototype.toUpperCase,b=String.prototype.toLowerCase,A=RegExp.prototype.test,q=Array.prototype.concat,x=Array.prototype.join,D=Array.prototype.slice,j=Math.floor,F=typeof BigInt=="function"?BigInt.prototype.valueOf:null,N=Object.getOwnPropertySymbols,B=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,U=typeof Symbol=="function"&&typeof Symbol.iterator=="object",H=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===U||!0)?Symbol.toStringTag:null,z=Object.prototype.propertyIsEnumerable,K=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(O){return O.__proto__}:null);function W(O,P){if(O===1/0||O===-1/0||O!==O||O&&O>-1e3&&O<1e3||A.call(/e/,P))return P;var G=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof O=="number"){var re=O<0?-j(-O):j(O);if(re!==O){var fe=String(re),ae=S.call(P,fe.length+1);return w.call(fe,G,"$&_")+"."+w.call(w.call(ae,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(P,G,"$&_")}var te=require$$0,Z=te.custom,V=le(Z)?Z:null;objectInspect=function O(P,G,re,fe){var ae=G||{};if(Se(ae,"quoteStyle")&&ae.quoteStyle!=="single"&&ae.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Se(ae,"maxStringLength")&&(typeof ae.maxStringLength=="number"?ae.maxStringLength<0&&ae.maxStringLength!==1/0:ae.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var qe=Se(ae,"customInspect")?ae.customInspect:!0;if(typeof qe!="boolean"&&qe!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Se(ae,"indent")&&ae.indent!==null&&ae.indent!==" "&&!(parseInt(ae.indent,10)===ae.indent&&ae.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Se(ae,"numericSeparator")&&typeof ae.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Ne=ae.numericSeparator;if(typeof P>"u")return"undefined";if(P===null)return"null";if(typeof P=="boolean")return P?"true":"false";if(typeof P=="string")return Oe(P,ae);if(typeof P=="number"){if(P===0)return 1/0/P>0?"0":"-0";var Ee=String(P);return Ne?W(P,Ee):Ee}if(typeof P=="bigint"){var Re=String(P)+"n";return Ne?W(P,Re):Re}var He=typeof ae.depth>"u"?5:ae.depth;if(typeof re>"u"&&(re=0),re>=He&&He>0&&typeof P=="object")return k(P)?"[Array]":"[Object]";var $e=J(ae,re);if(typeof fe>"u")fe=[];else if(ye(fe,P)>=0)return"[Circular]";function xe(ke,Ke,at){if(Ke&&(fe=D.call(fe),fe.push(Ke)),at){var it={depth:ae.depth};return Se(ae,"quoteStyle")&&(it.quoteStyle=ae.quoteStyle),O(ke,it,re+1,fe)}return O(ke,ae,re+1,fe)}if(typeof P=="function"&&!Y(P)){var Je=Te(P),Ye=M(P,xe);return"[Function"+(Je?": "+Je:" (anonymous)")+"]"+(Ye.length>0?" { "+x.call(Ye,", ")+" }":"")}if(le(P)){var Xe=U?w.call(String(P),/^(Symbol\(.*\))_[^)]*$/,"$1"):B.call(P);return typeof P=="object"&&!U?Ie(Xe):Xe}if(Me(P)){for(var Ue="<"+b.call(String(P.nodeName)),Qe=P.attributes||[],Ge=0;Ge<Qe.length;Ge++)Ue+=" "+Qe[Ge].name+"="+pe(C(Qe[Ge].value),"double",ae);return Ue+=">",P.childNodes&&P.childNodes.length&&(Ue+="..."),Ue+="</"+b.call(String(P.nodeName))+">",Ue}if(k(P)){if(P.length===0)return"[]";var Pe=M(P,xe);return $e&&!we(Pe)?"["+Q(Pe,$e)+"]":"[ "+x.call(Pe,", ")+" ]"}if(se(P)){var Ve=M(P,xe);return!("cause"in Error.prototype)&&"cause"in P&&!z.call(P,"cause")?"{ ["+String(P)+"] "+x.call(q.call("[cause]: "+xe(P.cause),Ve),", ")+" }":Ve.length===0?"["+String(P)+"]":"{ ["+String(P)+"] "+x.call(Ve,", ")+" }"}if(typeof P=="object"&&qe){if(V&&typeof P[V]=="function"&&te)return te(P,{depth:He-re});if(qe!=="symbol"&&typeof P.inspect=="function")return P.inspect()}if(Fe(P)){var rt=[];return r&&r.call(P,function(ke,Ke){rt.push(xe(Ke,P,!0)+" => "+xe(ke,P))}),ce("Map",t.call(P),rt,$e)}if(Be(P)){var nt=[];return l&&l.call(P,function(ke){nt.push(xe(ke,P))}),ce("Set",s.call(P),nt,$e)}if(ze(P))return ee("WeakMap");if(ie(P))return ee("WeakSet");if(je(P))return ee("WeakRef");if(ne(P))return Ie(xe(Number(P)));if(me(P))return Ie(xe(F.call(P)));if(ue(P))return Ie(m.call(P));if(X(P))return Ie(xe(String(P)));if(typeof window<"u"&&P===window)return"{ [object Window] }";if(P===commonjsGlobal)return"{ [object globalThis] }";if(!$(P)&&!Y(P)){var Ae=M(P,xe),he=K?K(P)===Object.prototype:P instanceof Object||P.constructor===Object,Ze=P instanceof Object?"":"null prototype",We=!he&&H&&Object(P)===P&&H in P?S.call(be(P),8,-1):Ze?"Object":"",Ce=he||typeof P.constructor!="function"?"":P.constructor.name?P.constructor.name+" ":"",et=Ce+(We||Ze?"["+x.call(q.call([],We||[],Ze||[]),": ")+"] ":"");return Ae.length===0?et+"{}":$e?et+"{"+Q(Ae,$e)+"}":et+"{ "+x.call(Ae,", ")+" }"}return String(P)};function pe(O,P,G){var re=(G.quoteStyle||P)==="double"?'"':"'";return re+O+re}function C(O){return w.call(String(O),/"/g,""")}function k(O){return be(O)==="[object Array]"&&(!H||!(typeof O=="object"&&H in O))}function $(O){return be(O)==="[object Date]"&&(!H||!(typeof O=="object"&&H in O))}function Y(O){return be(O)==="[object RegExp]"&&(!H||!(typeof O=="object"&&H in O))}function se(O){return be(O)==="[object Error]"&&(!H||!(typeof O=="object"&&H in O))}function X(O){return be(O)==="[object String]"&&(!H||!(typeof O=="object"&&H in O))}function ne(O){return be(O)==="[object Number]"&&(!H||!(typeof O=="object"&&H in O))}function ue(O){return be(O)==="[object Boolean]"&&(!H||!(typeof O=="object"&&H in O))}function le(O){if(U)return O&&typeof O=="object"&&O instanceof Symbol;if(typeof O=="symbol")return!0;if(!O||typeof O!="object"||!B)return!1;try{return B.call(O),!0}catch{}return!1}function me(O){if(!O||typeof O!="object"||!F)return!1;try{return F.call(O),!0}catch{}return!1}var ve=Object.prototype.hasOwnProperty||function(O){return O in this};function Se(O,P){return ve.call(O,P)}function be(O){return v.call(O)}function Te(O){if(O.name)return O.name;var P=E.call(p.call(O),/^function\s*([\w$]+)/);return P?P[1]:null}function ye(O,P){if(O.indexOf)return O.indexOf(P);for(var G=0,re=O.length;G<re;G++)if(O[G]===P)return G;return-1}function Fe(O){if(!t||!O||typeof O!="object")return!1;try{t.call(O);try{s.call(O)}catch{return!0}return O instanceof Map}catch{}return!1}function ze(O){if(!o||!O||typeof O!="object")return!1;try{o.call(O,o);try{d.call(O,d)}catch{return!0}return O instanceof WeakMap}catch{}return!1}function je(O){if(!y||!O||typeof O!="object")return!1;try{return y.call(O),!0}catch{}return!1}function Be(O){if(!s||!O||typeof O!="object")return!1;try{s.call(O);try{t.call(O)}catch{return!0}return O instanceof Set}catch{}return!1}function ie(O){if(!d||!O||typeof O!="object")return!1;try{d.call(O,d);try{o.call(O,o)}catch{return!0}return O instanceof WeakSet}catch{}return!1}function Me(O){return!O||typeof O!="object"?!1:typeof HTMLElement<"u"&&O instanceof HTMLElement?!0:typeof O.nodeName=="string"&&typeof O.getAttribute=="function"}function Oe(O,P){if(O.length>P.maxStringLength){var G=O.length-P.maxStringLength,re="... "+G+" more character"+(G>1?"s":"");return Oe(S.call(O,0,P.maxStringLength),P)+re}var fe=w.call(w.call(O,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Le);return pe(fe,"single",P)}function Le(O){var P=O.charCodeAt(0),G={8:"b",9:"t",10:"n",12:"f",13:"r"}[P];return G?"\\"+G:"\\x"+(P<16?"0":"")+g.call(P.toString(16))}function Ie(O){return"Object("+O+")"}function ee(O){return O+" { ? }"}function ce(O,P,G,re){var fe=re?Q(G,re):x.call(G,", ");return O+" ("+P+") {"+fe+"}"}function we(O){for(var P=0;P<O.length;P++)if(ye(O[P],`
|
|
3
|
-
`)>=0)return!1;return!0}function J(O,P){var G;if(O.indent===" ")G=" ";else if(typeof O.indent=="number"&&O.indent>0)G=x.call(Array(O.indent+1)," ");else return null;return{base:G,prev:x.call(Array(P+1),G)}}function
|
|
1
|
+
(function(n,e){typeof exports=="object"&&typeof module<"u"?module.exports=e():typeof define=="function"&&define.amd?define(e):(n=typeof globalThis<"u"?globalThis:n||self,n.GudHub=e())})(this,function(){"use strict";var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function getAugmentedNamespace(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}),t}var axios$2={exports:{}},bind,hasRequiredBind;function requireBind(){return hasRequiredBind||(hasRequiredBind=1,bind=function(e,t){return function(){for(var i=new Array(arguments.length),a=0;a<i.length;a++)i[a]=arguments[a];return e.apply(t,i)}}),bind}var utils$1,hasRequiredUtils$1;function requireUtils$1(){if(hasRequiredUtils$1)return utils$1;hasRequiredUtils$1=1;var n=requireBind(),e=Object.prototype.toString;function t(x){return e.call(x)==="[object Array]"}function r(x){return typeof x>"u"}function i(x){return x!==null&&!r(x)&&x.constructor!==null&&!r(x.constructor)&&typeof x.constructor.isBuffer=="function"&&x.constructor.isBuffer(x)}function a(x){return e.call(x)==="[object ArrayBuffer]"}function s(x){return typeof FormData<"u"&&x instanceof FormData}function l(x){var D;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?D=ArrayBuffer.isView(x):D=x&&x.buffer&&x.buffer instanceof ArrayBuffer,D}function u(x){return typeof x=="string"}function o(x){return typeof x=="number"}function f(x){return x!==null&&typeof x=="object"}function d(x){if(e.call(x)!=="[object Object]")return!1;var D=Object.getPrototypeOf(x);return D===null||D===Object.prototype}function h(x){return e.call(x)==="[object Date]"}function y(x){return e.call(x)==="[object File]"}function m(x){return e.call(x)==="[object Blob]"}function v(x){return e.call(x)==="[object Function]"}function p(x){return f(x)&&v(x.pipe)}function E(x){return typeof URLSearchParams<"u"&&x instanceof URLSearchParams}function S(x){return x.trim?x.trim():x.replace(/^\s+|\s+$/g,"")}function w(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function g(x,D){if(!(x===null||typeof x>"u"))if(typeof x!="object"&&(x=[x]),t(x))for(var j=0,F=x.length;j<F;j++)D.call(null,x[j],j,x);else for(var M in x)Object.prototype.hasOwnProperty.call(x,M)&&D.call(null,x[M],M,x)}function b(){var x={};function D(M,B){d(x[B])&&d(M)?x[B]=b(x[B],M):d(M)?x[B]=b({},M):t(M)?x[B]=M.slice():x[B]=M}for(var j=0,F=arguments.length;j<F;j++)g(arguments[j],D);return x}function A(x,D,j){return g(D,function(M,B){j&&typeof M=="function"?x[B]=n(M,j):x[B]=M}),x}function q(x){return x.charCodeAt(0)===65279&&(x=x.slice(1)),x}return utils$1={isArray:t,isArrayBuffer:a,isBuffer:i,isFormData:s,isArrayBufferView:l,isString:u,isNumber:o,isObject:f,isPlainObject:d,isUndefined:r,isDate:h,isFile:y,isBlob:m,isFunction:v,isStream:p,isURLSearchParams:E,isStandardBrowserEnv:w,forEach:g,merge:b,extend:A,trim:S,stripBOM:q},utils$1}var buildURL,hasRequiredBuildURL;function requireBuildURL(){if(hasRequiredBuildURL)return buildURL;hasRequiredBuildURL=1;var n=requireUtils$1();function e(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}return buildURL=function(r,i,a){if(!i)return r;var s;if(a)s=a(i);else if(n.isURLSearchParams(i))s=i.toString();else{var l=[];n.forEach(i,function(f,d){f===null||typeof f>"u"||(n.isArray(f)?d=d+"[]":f=[f],n.forEach(f,function(y){n.isDate(y)?y=y.toISOString():n.isObject(y)&&(y=JSON.stringify(y)),l.push(e(d)+"="+e(y))}))}),s=l.join("&")}if(s){var u=r.indexOf("#");u!==-1&&(r=r.slice(0,u)),r+=(r.indexOf("?")===-1?"?":"&")+s}return r},buildURL}var InterceptorManager_1,hasRequiredInterceptorManager;function requireInterceptorManager(){if(hasRequiredInterceptorManager)return InterceptorManager_1;hasRequiredInterceptorManager=1;var n=requireUtils$1();function e(){this.handlers=[]}return e.prototype.use=function(r,i,a){return this.handlers.push({fulfilled:r,rejected:i,synchronous:a?a.synchronous:!1,runWhen:a?a.runWhen:null}),this.handlers.length-1},e.prototype.eject=function(r){this.handlers[r]&&(this.handlers[r]=null)},e.prototype.forEach=function(r){n.forEach(this.handlers,function(a){a!==null&&r(a)})},InterceptorManager_1=e,InterceptorManager_1}var normalizeHeaderName,hasRequiredNormalizeHeaderName;function requireNormalizeHeaderName(){if(hasRequiredNormalizeHeaderName)return normalizeHeaderName;hasRequiredNormalizeHeaderName=1;var n=requireUtils$1();return normalizeHeaderName=function(t,r){n.forEach(t,function(a,s){s!==r&&s.toUpperCase()===r.toUpperCase()&&(t[r]=a,delete t[s])})},normalizeHeaderName}var enhanceError,hasRequiredEnhanceError;function requireEnhanceError(){return hasRequiredEnhanceError||(hasRequiredEnhanceError=1,enhanceError=function(e,t,r,i,a){return e.config=t,r&&(e.code=r),e.request=i,e.response=a,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}),enhanceError}var createError,hasRequiredCreateError;function requireCreateError(){if(hasRequiredCreateError)return createError;hasRequiredCreateError=1;var n=requireEnhanceError();return createError=function(t,r,i,a,s){var l=new Error(t);return n(l,r,i,a,s)},createError}var settle,hasRequiredSettle;function requireSettle(){if(hasRequiredSettle)return settle;hasRequiredSettle=1;var n=requireCreateError();return settle=function(t,r,i){var a=i.config.validateStatus;!i.status||!a||a(i.status)?t(i):r(n("Request failed with status code "+i.status,i.config,null,i.request,i))},settle}var cookies,hasRequiredCookies;function requireCookies(){if(hasRequiredCookies)return cookies;hasRequiredCookies=1;var n=requireUtils$1();return cookies=n.isStandardBrowserEnv()?function(){return{write:function(r,i,a,s,l,u){var o=[];o.push(r+"="+encodeURIComponent(i)),n.isNumber(a)&&o.push("expires="+new Date(a).toGMTString()),n.isString(s)&&o.push("path="+s),n.isString(l)&&o.push("domain="+l),u===!0&&o.push("secure"),document.cookie=o.join("; ")},read:function(r){var i=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),cookies}var isAbsoluteURL,hasRequiredIsAbsoluteURL;function requireIsAbsoluteURL(){return hasRequiredIsAbsoluteURL||(hasRequiredIsAbsoluteURL=1,isAbsoluteURL=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}),isAbsoluteURL}var combineURLs,hasRequiredCombineURLs;function requireCombineURLs(){return hasRequiredCombineURLs||(hasRequiredCombineURLs=1,combineURLs=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}),combineURLs}var buildFullPath,hasRequiredBuildFullPath;function requireBuildFullPath(){if(hasRequiredBuildFullPath)return buildFullPath;hasRequiredBuildFullPath=1;var n=requireIsAbsoluteURL(),e=requireCombineURLs();return buildFullPath=function(r,i){return r&&!n(i)?e(r,i):i},buildFullPath}var parseHeaders,hasRequiredParseHeaders;function requireParseHeaders(){if(hasRequiredParseHeaders)return parseHeaders;hasRequiredParseHeaders=1;var n=requireUtils$1(),e=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return parseHeaders=function(r){var i={},a,s,l;return r&&n.forEach(r.split(`
|
|
2
|
+
`),function(o){if(l=o.indexOf(":"),a=n.trim(o.substr(0,l)).toLowerCase(),s=n.trim(o.substr(l+1)),a){if(i[a]&&e.indexOf(a)>=0)return;a==="set-cookie"?i[a]=(i[a]?i[a]:[]).concat([s]):i[a]=i[a]?i[a]+", "+s:s}}),i},parseHeaders}var isURLSameOrigin,hasRequiredIsURLSameOrigin;function requireIsURLSameOrigin(){if(hasRequiredIsURLSameOrigin)return isURLSameOrigin;hasRequiredIsURLSameOrigin=1;var n=requireUtils$1();return isURLSameOrigin=n.isStandardBrowserEnv()?function(){var t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),i;function a(s){var l=s;return t&&(r.setAttribute("href",l),l=r.href),r.setAttribute("href",l),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return i=a(window.location.href),function(l){var u=n.isString(l)?a(l):l;return u.protocol===i.protocol&&u.host===i.host}}():function(){return function(){return!0}}(),isURLSameOrigin}var xhr,hasRequiredXhr;function requireXhr(){if(hasRequiredXhr)return xhr;hasRequiredXhr=1;var n=requireUtils$1(),e=requireSettle(),t=requireCookies(),r=requireBuildURL(),i=requireBuildFullPath(),a=requireParseHeaders(),s=requireIsURLSameOrigin(),l=requireCreateError();return xhr=function(o){return new Promise(function(d,h){var y=o.data,m=o.headers,v=o.responseType;n.isFormData(y)&&delete m["Content-Type"];var p=new XMLHttpRequest;if(o.auth){var E=o.auth.username||"",S=o.auth.password?unescape(encodeURIComponent(o.auth.password)):"";m.Authorization="Basic "+btoa(E+":"+S)}var w=i(o.baseURL,o.url);p.open(o.method.toUpperCase(),r(w,o.params,o.paramsSerializer),!0),p.timeout=o.timeout;function g(){if(p){var A="getAllResponseHeaders"in p?a(p.getAllResponseHeaders()):null,q=!v||v==="text"||v==="json"?p.responseText:p.response,x={data:q,status:p.status,statusText:p.statusText,headers:A,config:o,request:p};e(d,h,x),p=null}}if("onloadend"in p?p.onloadend=g:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(g)},p.onabort=function(){p&&(h(l("Request aborted",o,"ECONNABORTED",p)),p=null)},p.onerror=function(){h(l("Network Error",o,null,p)),p=null},p.ontimeout=function(){var q="timeout of "+o.timeout+"ms exceeded";o.timeoutErrorMessage&&(q=o.timeoutErrorMessage),h(l(q,o,o.transitional&&o.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",p)),p=null},n.isStandardBrowserEnv()){var b=(o.withCredentials||s(w))&&o.xsrfCookieName?t.read(o.xsrfCookieName):void 0;b&&(m[o.xsrfHeaderName]=b)}"setRequestHeader"in p&&n.forEach(m,function(q,x){typeof y>"u"&&x.toLowerCase()==="content-type"?delete m[x]:p.setRequestHeader(x,q)}),n.isUndefined(o.withCredentials)||(p.withCredentials=!!o.withCredentials),v&&v!=="json"&&(p.responseType=o.responseType),typeof o.onDownloadProgress=="function"&&p.addEventListener("progress",o.onDownloadProgress),typeof o.onUploadProgress=="function"&&p.upload&&p.upload.addEventListener("progress",o.onUploadProgress),o.cancelToken&&o.cancelToken.promise.then(function(q){p&&(p.abort(),h(q),p=null)}),y||(y=null),p.send(y)})},xhr}var defaults_1,hasRequiredDefaults;function requireDefaults(){if(hasRequiredDefaults)return defaults_1;hasRequiredDefaults=1;var n=requireUtils$1(),e=requireNormalizeHeaderName(),t=requireEnhanceError(),r={"Content-Type":"application/x-www-form-urlencoded"};function i(u,o){!n.isUndefined(u)&&n.isUndefined(u["Content-Type"])&&(u["Content-Type"]=o)}function a(){var u;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(u=requireXhr()),u}function s(u,o,f){if(n.isString(u))try{return(o||JSON.parse)(u),n.trim(u)}catch(d){if(d.name!=="SyntaxError")throw d}return(0,JSON.stringify)(u)}var l={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:a(),transformRequest:[function(o,f){return e(f,"Accept"),e(f,"Content-Type"),n.isFormData(o)||n.isArrayBuffer(o)||n.isBuffer(o)||n.isStream(o)||n.isFile(o)||n.isBlob(o)?o:n.isArrayBufferView(o)?o.buffer:n.isURLSearchParams(o)?(i(f,"application/x-www-form-urlencoded;charset=utf-8"),o.toString()):n.isObject(o)||f&&f["Content-Type"]==="application/json"?(i(f,"application/json"),s(o)):o}],transformResponse:[function(o){var f=this.transitional,d=f&&f.silentJSONParsing,h=f&&f.forcedJSONParsing,y=!d&&this.responseType==="json";if(y||h&&n.isString(o)&&o.length)try{return JSON.parse(o)}catch(m){if(y)throw m.name==="SyntaxError"?t(m,this,"E_JSON_PARSE"):m}return o}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(o){return o>=200&&o<300}};return l.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],function(o){l.headers[o]={}}),n.forEach(["post","put","patch"],function(o){l.headers[o]=n.merge(r)}),defaults_1=l,defaults_1}var transformData,hasRequiredTransformData;function requireTransformData(){if(hasRequiredTransformData)return transformData;hasRequiredTransformData=1;var n=requireUtils$1(),e=requireDefaults();return transformData=function(r,i,a){var s=this||e;return n.forEach(a,function(u){r=u.call(s,r,i)}),r},transformData}var isCancel,hasRequiredIsCancel;function requireIsCancel(){return hasRequiredIsCancel||(hasRequiredIsCancel=1,isCancel=function(e){return!!(e&&e.__CANCEL__)}),isCancel}var dispatchRequest,hasRequiredDispatchRequest;function requireDispatchRequest(){if(hasRequiredDispatchRequest)return dispatchRequest;hasRequiredDispatchRequest=1;var n=requireUtils$1(),e=requireTransformData(),t=requireIsCancel(),r=requireDefaults();function i(a){a.cancelToken&&a.cancelToken.throwIfRequested()}return dispatchRequest=function(s){i(s),s.headers=s.headers||{},s.data=e.call(s,s.data,s.headers,s.transformRequest),s.headers=n.merge(s.headers.common||{},s.headers[s.method]||{},s.headers),n.forEach(["delete","get","head","post","put","patch","common"],function(o){delete s.headers[o]});var l=s.adapter||r.adapter;return l(s).then(function(o){return i(s),o.data=e.call(s,o.data,o.headers,s.transformResponse),o},function(o){return t(o)||(i(s),o&&o.response&&(o.response.data=e.call(s,o.response.data,o.response.headers,s.transformResponse))),Promise.reject(o)})},dispatchRequest}var mergeConfig,hasRequiredMergeConfig;function requireMergeConfig(){if(hasRequiredMergeConfig)return mergeConfig;hasRequiredMergeConfig=1;var n=requireUtils$1();return mergeConfig=function(t,r){r=r||{};var i={},a=["url","method","data"],s=["headers","auth","proxy","params"],l=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],u=["validateStatus"];function o(y,m){return n.isPlainObject(y)&&n.isPlainObject(m)?n.merge(y,m):n.isPlainObject(m)?n.merge({},m):n.isArray(m)?m.slice():m}function f(y){n.isUndefined(r[y])?n.isUndefined(t[y])||(i[y]=o(void 0,t[y])):i[y]=o(t[y],r[y])}n.forEach(a,function(m){n.isUndefined(r[m])||(i[m]=o(void 0,r[m]))}),n.forEach(s,f),n.forEach(l,function(m){n.isUndefined(r[m])?n.isUndefined(t[m])||(i[m]=o(void 0,t[m])):i[m]=o(void 0,r[m])}),n.forEach(u,function(m){m in r?i[m]=o(t[m],r[m]):m in t&&(i[m]=o(void 0,t[m]))});var d=a.concat(s).concat(l).concat(u),h=Object.keys(t).concat(Object.keys(r)).filter(function(m){return d.indexOf(m)===-1});return n.forEach(h,f),i},mergeConfig}const _args=[["axios@0.21.4","/home/vitaly/Documents/work/gudhubclient/override_npm/gudhub"]],_from="axios@0.21.4",_id="axios@0.21.4",_inBundle=!1,_integrity="sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",_location="/axios",_phantomChildren={},_requested={type:"version",registry:!0,raw:"axios@0.21.4",name:"axios",escapedName:"axios",rawSpec:"0.21.4",saveSpec:null,fetchSpec:"0.21.4"},_requiredBy=["/"],_resolved="https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",_spec="0.21.4",_where="/home/vitaly/Documents/work/gudhubclient/override_npm/gudhub",author={name:"Matt Zabriskie"},browser$1={"./lib/adapters/http.js":"./lib/adapters/xhr.js"},bugs={url:"https://github.com/axios/axios/issues"},bundlesize=[{path:"./dist/axios.min.js",threshold:"5kB"}],dependencies={"follow-redirects":"^1.14.0"},description="Promise based HTTP client for the browser and node.js",devDependencies={coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},homepage="https://axios-http.com",jsdelivr="dist/axios.min.js",keywords=["xhr","http","ajax","promise","node"],license="MIT",main="index.js",name="axios",repository={type:"git",url:"git+https://github.com/axios/axios.git"},scripts={build:"NODE_ENV=production grunt build",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",examples:"node ./examples/server.js",fix:"eslint --fix lib/**/*.js",postversion:"git push && git push --tags",preversion:"npm test",start:"node ./sandbox/server.js",test:"grunt test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"},typings="./index.d.ts",unpkg="dist/axios.min.js",version="0.21.4",require$$0$1={_args,_from,_id,_inBundle,_integrity,_location,_phantomChildren,_requested,_requiredBy,_resolved,_spec,_where,author,browser:browser$1,bugs,bundlesize,dependencies,description,devDependencies,homepage,jsdelivr,keywords,license,main,name,repository,scripts,typings,unpkg,version};var validator,hasRequiredValidator;function requireValidator(){if(hasRequiredValidator)return validator;hasRequiredValidator=1;var n=require$$0$1,e={};["object","boolean","number","function","string","symbol"].forEach(function(s,l){e[s]=function(o){return typeof o===s||"a"+(l<1?"n ":" ")+s}});var t={},r=n.version.split(".");function i(s,l){for(var u=l?l.split("."):r,o=s.split("."),f=0;f<3;f++){if(u[f]>o[f])return!0;if(u[f]<o[f])return!1}return!1}e.transitional=function(l,u,o){var f=u&&i(u);function d(h,y){return"[Axios v"+n.version+"] Transitional option '"+h+"'"+y+(o?". "+o:"")}return function(h,y,m){if(l===!1)throw new Error(d(y," has been removed in "+u));return f&&!t[y]&&(t[y]=!0,console.warn(d(y," has been deprecated since v"+u+" and will be removed in the near future"))),l?l(h,y,m):!0}};function a(s,l,u){if(typeof s!="object")throw new TypeError("options must be an object");for(var o=Object.keys(s),f=o.length;f-- >0;){var d=o[f],h=l[d];if(h){var y=s[d],m=y===void 0||h(y,d,s);if(m!==!0)throw new TypeError("option "+d+" must be "+m);continue}if(u!==!0)throw Error("Unknown option "+d)}}return validator={isOlderVersion:i,assertOptions:a,validators:e},validator}var Axios_1,hasRequiredAxios$2;function requireAxios$2(){if(hasRequiredAxios$2)return Axios_1;hasRequiredAxios$2=1;var n=requireUtils$1(),e=requireBuildURL(),t=requireInterceptorManager(),r=requireDispatchRequest(),i=requireMergeConfig(),a=requireValidator(),s=a.validators;function l(u){this.defaults=u,this.interceptors={request:new t,response:new t}}return l.prototype.request=function(o){typeof o=="string"?(o=arguments[1]||{},o.url=arguments[0]):o=o||{},o=i(this.defaults,o),o.method?o.method=o.method.toLowerCase():this.defaults.method?o.method=this.defaults.method.toLowerCase():o.method="get";var f=o.transitional;f!==void 0&&a.assertOptions(f,{silentJSONParsing:s.transitional(s.boolean,"1.0.0"),forcedJSONParsing:s.transitional(s.boolean,"1.0.0"),clarifyTimeoutError:s.transitional(s.boolean,"1.0.0")},!1);var d=[],h=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(o)===!1||(h=h&&g.synchronous,d.unshift(g.fulfilled,g.rejected))});var y=[];this.interceptors.response.forEach(function(g){y.push(g.fulfilled,g.rejected)});var m;if(!h){var v=[r,void 0];for(Array.prototype.unshift.apply(v,d),v=v.concat(y),m=Promise.resolve(o);v.length;)m=m.then(v.shift(),v.shift());return m}for(var p=o;d.length;){var E=d.shift(),S=d.shift();try{p=E(p)}catch(w){S(w);break}}try{m=r(p)}catch(w){return Promise.reject(w)}for(;y.length;)m=m.then(y.shift(),y.shift());return m},l.prototype.getUri=function(o){return o=i(this.defaults,o),e(o.url,o.params,o.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],function(o){l.prototype[o]=function(f,d){return this.request(i(d||{},{method:o,url:f,data:(d||{}).data}))}}),n.forEach(["post","put","patch"],function(o){l.prototype[o]=function(f,d,h){return this.request(i(h||{},{method:o,url:f,data:d}))}}),Axios_1=l,Axios_1}var Cancel_1,hasRequiredCancel;function requireCancel(){if(hasRequiredCancel)return Cancel_1;hasRequiredCancel=1;function n(e){this.message=e}return n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,Cancel_1=n,Cancel_1}var CancelToken_1,hasRequiredCancelToken;function requireCancelToken(){if(hasRequiredCancelToken)return CancelToken_1;hasRequiredCancelToken=1;var n=requireCancel();function e(t){if(typeof t!="function")throw new TypeError("executor must be a function.");var r;this.promise=new Promise(function(s){r=s});var i=this;t(function(s){i.reason||(i.reason=new n(s),r(i.reason))})}return e.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},e.source=function(){var r,i=new e(function(s){r=s});return{token:i,cancel:r}},CancelToken_1=e,CancelToken_1}var spread,hasRequiredSpread;function requireSpread(){return hasRequiredSpread||(hasRequiredSpread=1,spread=function(e){return function(r){return e.apply(null,r)}}),spread}var isAxiosError,hasRequiredIsAxiosError;function requireIsAxiosError(){return hasRequiredIsAxiosError||(hasRequiredIsAxiosError=1,isAxiosError=function(e){return typeof e=="object"&&e.isAxiosError===!0}),isAxiosError}var hasRequiredAxios$1;function requireAxios$1(){if(hasRequiredAxios$1)return axios$2.exports;hasRequiredAxios$1=1;var n=requireUtils$1(),e=requireBind(),t=requireAxios$2(),r=requireMergeConfig(),i=requireDefaults();function a(l){var u=new t(l),o=e(t.prototype.request,u);return n.extend(o,t.prototype,u),n.extend(o,u),o}var s=a(i);return s.Axios=t,s.create=function(u){return a(r(s.defaults,u))},s.Cancel=requireCancel(),s.CancelToken=requireCancelToken(),s.isCancel=requireIsCancel(),s.all=function(u){return Promise.all(u)},s.spread=requireSpread(),s.isAxiosError=requireIsAxiosError(),axios$2.exports=s,axios$2.exports.default=s,axios$2.exports}var axios$1,hasRequiredAxios;function requireAxios(){return hasRequiredAxios||(hasRequiredAxios=1,axios$1=requireAxios$1()),axios$1}var axiosExports=requireAxios();const axios=getDefaultExportFromCjs(axiosExports);function filterFields(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).filter(e=>e.field_value!=null)}function convertObjToUrlParams(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const e=Object.entries(n);return e.length?"&".concat(e.map(t=>{let[r,i]=t;return"".concat(r,"=").concat(i)}).join("&")):""}var esErrors,hasRequiredEsErrors;function requireEsErrors(){return hasRequiredEsErrors||(hasRequiredEsErrors=1,esErrors=Error),esErrors}var _eval,hasRequired_eval;function require_eval(){return hasRequired_eval||(hasRequired_eval=1,_eval=EvalError),_eval}var range,hasRequiredRange;function requireRange(){return hasRequiredRange||(hasRequiredRange=1,range=RangeError),range}var ref,hasRequiredRef;function requireRef(){return hasRequiredRef||(hasRequiredRef=1,ref=ReferenceError),ref}var syntax,hasRequiredSyntax;function requireSyntax(){return hasRequiredSyntax||(hasRequiredSyntax=1,syntax=SyntaxError),syntax}var type,hasRequiredType;function requireType(){return hasRequiredType||(hasRequiredType=1,type=TypeError),type}var uri,hasRequiredUri;function requireUri(){return hasRequiredUri||(hasRequiredUri=1,uri=URIError),uri}var shams,hasRequiredShams;function requireShams(){return hasRequiredShams||(hasRequiredShams=1,shams=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),r=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;e[t]=i;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,t);if(s.value!==i||s.enumerable!==!0)return!1}return!0}),shams}var hasSymbols,hasRequiredHasSymbols;function requireHasSymbols(){if(hasRequiredHasSymbols)return hasSymbols;hasRequiredHasSymbols=1;var n=typeof Symbol<"u"&&Symbol,e=requireShams();return hasSymbols=function(){return typeof n!="function"||typeof Symbol!="function"||typeof n("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},hasSymbols}var hasProto,hasRequiredHasProto;function requireHasProto(){if(hasRequiredHasProto)return hasProto;hasRequiredHasProto=1;var n={__proto__:null,foo:{}},e=Object;return hasProto=function(){return{__proto__:n}.foo===n.foo&&!(n instanceof e)},hasProto}var implementation,hasRequiredImplementation;function requireImplementation(){if(hasRequiredImplementation)return implementation;hasRequiredImplementation=1;var n="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,r="[object Function]",i=function(u,o){for(var f=[],d=0;d<u.length;d+=1)f[d]=u[d];for(var h=0;h<o.length;h+=1)f[h+u.length]=o[h];return f},a=function(u,o){for(var f=[],d=o,h=0;d<u.length;d+=1,h+=1)f[h]=u[d];return f},s=function(l,u){for(var o="",f=0;f<l.length;f+=1)o+=l[f],f+1<l.length&&(o+=u);return o};return implementation=function(u){var o=this;if(typeof o!="function"||e.apply(o)!==r)throw new TypeError(n+o);for(var f=a(arguments,1),d,h=function(){if(this instanceof d){var E=o.apply(this,i(f,arguments));return Object(E)===E?E:this}return o.apply(u,i(f,arguments))},y=t(0,o.length-f.length),m=[],v=0;v<y;v++)m[v]="$"+v;if(d=Function("binder","return function ("+s(m,",")+"){ return binder.apply(this,arguments); }")(h),o.prototype){var p=function(){};p.prototype=o.prototype,d.prototype=new p,p.prototype=null}return d},implementation}var functionBind,hasRequiredFunctionBind;function requireFunctionBind(){if(hasRequiredFunctionBind)return functionBind;hasRequiredFunctionBind=1;var n=requireImplementation();return functionBind=Function.prototype.bind||n,functionBind}var hasown,hasRequiredHasown;function requireHasown(){if(hasRequiredHasown)return hasown;hasRequiredHasown=1;var n=Function.prototype.call,e=Object.prototype.hasOwnProperty,t=requireFunctionBind();return hasown=t.call(n,e),hasown}var getIntrinsic,hasRequiredGetIntrinsic;function requireGetIntrinsic(){if(hasRequiredGetIntrinsic)return getIntrinsic;hasRequiredGetIntrinsic=1;var n,e=requireEsErrors(),t=require_eval(),r=requireRange(),i=requireRef(),a=requireSyntax(),s=requireType(),l=requireUri(),u=Function,o=function(K){try{return u('"use strict"; return ('+K+").constructor;")()}catch{}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch{f=null}var d=function(){throw new s},h=f?function(){try{return arguments.callee,d}catch{try{return f(arguments,"callee").get}catch{return d}}}():d,y=requireHasSymbols()(),m=requireHasProto()(),v=Object.getPrototypeOf||(m?function(K){return K.__proto__}:null),p={},E=typeof Uint8Array>"u"||!v?n:v(Uint8Array),S={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?n:ArrayBuffer,"%ArrayIteratorPrototype%":y&&v?v([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":p,"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":p,"%AsyncIteratorPrototype%":p,"%Atomics%":typeof Atomics>"u"?n:Atomics,"%BigInt%":typeof BigInt>"u"?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":e,"%eval%":eval,"%EvalError%":t,"%Float32Array%":typeof Float32Array>"u"?n:Float32Array,"%Float64Array%":typeof Float64Array>"u"?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?n:FinalizationRegistry,"%Function%":u,"%GeneratorFunction%":p,"%Int8Array%":typeof Int8Array>"u"?n:Int8Array,"%Int16Array%":typeof Int16Array>"u"?n:Int16Array,"%Int32Array%":typeof Int32Array>"u"?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":y&&v?v(v([][Symbol.iterator]())):n,"%JSON%":typeof JSON=="object"?JSON:n,"%Map%":typeof Map>"u"?n:Map,"%MapIteratorPrototype%":typeof Map>"u"||!y||!v?n:v(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?n:Promise,"%Proxy%":typeof Proxy>"u"?n:Proxy,"%RangeError%":r,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?n:Set,"%SetIteratorPrototype%":typeof Set>"u"||!y||!v?n:v(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":y&&v?v(""[Symbol.iterator]()):n,"%Symbol%":y?Symbol:n,"%SyntaxError%":a,"%ThrowTypeError%":h,"%TypedArray%":E,"%TypeError%":s,"%Uint8Array%":typeof Uint8Array>"u"?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?n:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?n:WeakMap,"%WeakRef%":typeof WeakRef>"u"?n:WeakRef,"%WeakSet%":typeof WeakSet>"u"?n:WeakSet};if(v)try{null.error}catch(K){var w=v(v(K));S["%Error.prototype%"]=w}var g=function K(W){var te;if(W==="%AsyncFunction%")te=o("async function () {}");else if(W==="%GeneratorFunction%")te=o("function* () {}");else if(W==="%AsyncGeneratorFunction%")te=o("async function* () {}");else if(W==="%AsyncGenerator%"){var Z=K("%AsyncGeneratorFunction%");Z&&(te=Z.prototype)}else if(W==="%AsyncIteratorPrototype%"){var V=K("%AsyncGenerator%");V&&v&&(te=v(V.prototype))}return S[W]=te,te},b={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A=requireFunctionBind(),q=requireHasown(),x=A.call(Function.call,Array.prototype.concat),D=A.call(Function.apply,Array.prototype.splice),j=A.call(Function.call,String.prototype.replace),F=A.call(Function.call,String.prototype.slice),M=A.call(Function.call,RegExp.prototype.exec),B=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,U=/\\(\\)?/g,H=function(W){var te=F(W,0,1),Z=F(W,-1);if(te==="%"&&Z!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(Z==="%"&&te!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var V=[];return j(W,B,function(pe,C,k,$){V[V.length]=k?j($,U,"$1"):C||pe}),V},z=function(W,te){var Z=W,V;if(q(b,Z)&&(V=b[Z],Z="%"+V[0]+"%"),q(S,Z)){var pe=S[Z];if(pe===p&&(pe=g(Z)),typeof pe>"u"&&!te)throw new s("intrinsic "+W+" exists, but is not available. Please file an issue!");return{alias:V,name:Z,value:pe}}throw new a("intrinsic "+W+" does not exist!")};return getIntrinsic=function(W,te){if(typeof W!="string"||W.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof te!="boolean")throw new s('"allowMissing" argument must be a boolean');if(M(/^%?[^%]*%?$/,W)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Z=H(W),V=Z.length>0?Z[0]:"",pe=z("%"+V+"%",te),C=pe.name,k=pe.value,$=!1,Q=pe.alias;Q&&(V=Q[0],D(Z,x([0,1],Q)));for(var se=1,Y=!0;se<Z.length;se+=1){var ne=Z[se],ue=F(ne,0,1),le=F(ne,-1);if((ue==='"'||ue==="'"||ue==="`"||le==='"'||le==="'"||le==="`")&&ue!==le)throw new a("property names with quotes must have matching quotes");if((ne==="constructor"||!Y)&&($=!0),V+="."+ne,C="%"+V+"%",q(S,C))k=S[C];else if(k!=null){if(!(ne in k)){if(!te)throw new s("base intrinsic for "+W+" exists, but the property is not available.");return}if(f&&se+1>=Z.length){var me=f(k,ne);Y=!!me,Y&&"get"in me&&!("originalValue"in me.get)?k=me.get:k=k[ne]}else Y=q(k,ne),k=k[ne];Y&&!$&&(S[C]=k)}}return k},getIntrinsic}var callBind={exports:{}},esDefineProperty,hasRequiredEsDefineProperty;function requireEsDefineProperty(){if(hasRequiredEsDefineProperty)return esDefineProperty;hasRequiredEsDefineProperty=1;var n=requireGetIntrinsic(),e=n("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return esDefineProperty=e,esDefineProperty}var gopd,hasRequiredGopd;function requireGopd(){if(hasRequiredGopd)return gopd;hasRequiredGopd=1;var n=requireGetIntrinsic(),e=n("%Object.getOwnPropertyDescriptor%",!0);if(e)try{e([],"length")}catch{e=null}return gopd=e,gopd}var defineDataProperty,hasRequiredDefineDataProperty;function requireDefineDataProperty(){if(hasRequiredDefineDataProperty)return defineDataProperty;hasRequiredDefineDataProperty=1;var n=requireEsDefineProperty(),e=requireSyntax(),t=requireType(),r=requireGopd();return defineDataProperty=function(a,s,l){if(!a||typeof a!="object"&&typeof a!="function")throw new t("`obj` must be an object or a function`");if(typeof s!="string"&&typeof s!="symbol")throw new t("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new t("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new t("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new t("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new t("`loose`, if provided, must be a boolean");var u=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,f=arguments.length>5?arguments[5]:null,d=arguments.length>6?arguments[6]:!1,h=!!r&&r(a,s);if(n)n(a,s,{configurable:f===null&&h?h.configurable:!f,enumerable:u===null&&h?h.enumerable:!u,value:l,writable:o===null&&h?h.writable:!o});else if(d||!u&&!o&&!f)a[s]=l;else throw new e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},defineDataProperty}var hasPropertyDescriptors_1,hasRequiredHasPropertyDescriptors;function requireHasPropertyDescriptors(){if(hasRequiredHasPropertyDescriptors)return hasPropertyDescriptors_1;hasRequiredHasPropertyDescriptors=1;var n=requireEsDefineProperty(),e=function(){return!!n};return e.hasArrayLengthDefineBug=function(){if(!n)return null;try{return n([],"length",{value:1}).length!==1}catch{return!0}},hasPropertyDescriptors_1=e,hasPropertyDescriptors_1}var setFunctionLength,hasRequiredSetFunctionLength;function requireSetFunctionLength(){if(hasRequiredSetFunctionLength)return setFunctionLength;hasRequiredSetFunctionLength=1;var n=requireGetIntrinsic(),e=requireDefineDataProperty(),t=requireHasPropertyDescriptors()(),r=requireGopd(),i=requireType(),a=n("%Math.floor%");return setFunctionLength=function(l,u){if(typeof l!="function")throw new i("`fn` is not a function");if(typeof u!="number"||u<0||u>4294967295||a(u)!==u)throw new i("`length` must be a positive 32-bit integer");var o=arguments.length>2&&!!arguments[2],f=!0,d=!0;if("length"in l&&r){var h=r(l,"length");h&&!h.configurable&&(f=!1),h&&!h.writable&&(d=!1)}return(f||d||!o)&&(t?e(l,"length",u,!0,!0):e(l,"length",u)),l},setFunctionLength}var hasRequiredCallBind;function requireCallBind(){return hasRequiredCallBind||(hasRequiredCallBind=1,function(n){var e=requireFunctionBind(),t=requireGetIntrinsic(),r=requireSetFunctionLength(),i=requireType(),a=t("%Function.prototype.apply%"),s=t("%Function.prototype.call%"),l=t("%Reflect.apply%",!0)||e.call(s,a),u=requireEsDefineProperty(),o=t("%Math.max%");n.exports=function(h){if(typeof h!="function")throw new i("a function is required");var y=l(e,s,arguments);return r(y,1+o(0,h.length-(arguments.length-1)),!0)};var f=function(){return l(e,a,arguments)};u?u(n.exports,"apply",{value:f}):n.exports.apply=f}(callBind)),callBind.exports}var callBound,hasRequiredCallBound;function requireCallBound(){if(hasRequiredCallBound)return callBound;hasRequiredCallBound=1;var n=requireGetIntrinsic(),e=requireCallBind(),t=e(n("String.prototype.indexOf"));return callBound=function(i,a){var s=n(i,!!a);return typeof s=="function"&&t(i,".prototype.")>-1?e(s):s},callBound}const __viteBrowserExternal={},__viteBrowserExternal$1=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(__viteBrowserExternal$1);var objectInspect,hasRequiredObjectInspect;function requireObjectInspect(){if(hasRequiredObjectInspect)return objectInspect;hasRequiredObjectInspect=1;var n=typeof Map=="function"&&Map.prototype,e=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,t=n&&e&&typeof e.get=="function"?e.get:null,r=n&&Map.prototype.forEach,i=typeof Set=="function"&&Set.prototype,a=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,s=i&&a&&typeof a.get=="function"?a.get:null,l=i&&Set.prototype.forEach,u=typeof WeakMap=="function"&&WeakMap.prototype,o=u?WeakMap.prototype.has:null,f=typeof WeakSet=="function"&&WeakSet.prototype,d=f?WeakSet.prototype.has:null,h=typeof WeakRef=="function"&&WeakRef.prototype,y=h?WeakRef.prototype.deref:null,m=Boolean.prototype.valueOf,v=Object.prototype.toString,p=Function.prototype.toString,E=String.prototype.match,S=String.prototype.slice,w=String.prototype.replace,g=String.prototype.toUpperCase,b=String.prototype.toLowerCase,A=RegExp.prototype.test,q=Array.prototype.concat,x=Array.prototype.join,D=Array.prototype.slice,j=Math.floor,F=typeof BigInt=="function"?BigInt.prototype.valueOf:null,M=Object.getOwnPropertySymbols,B=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,U=typeof Symbol=="function"&&typeof Symbol.iterator=="object",H=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===U||!0)?Symbol.toStringTag:null,z=Object.prototype.propertyIsEnumerable,K=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(O){return O.__proto__}:null);function W(O,P){if(O===1/0||O===-1/0||O!==O||O&&O>-1e3&&O<1e3||A.call(/e/,P))return P;var G=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof O=="number"){var re=O<0?-j(-O):j(O);if(re!==O){var fe=String(re),ae=S.call(P,fe.length+1);return w.call(fe,G,"$&_")+"."+w.call(w.call(ae,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(P,G,"$&_")}var te=require$$0,Z=te.custom,V=le(Z)?Z:null;objectInspect=function O(P,G,re,fe){var ae=G||{};if(Se(ae,"quoteStyle")&&ae.quoteStyle!=="single"&&ae.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Se(ae,"maxStringLength")&&(typeof ae.maxStringLength=="number"?ae.maxStringLength<0&&ae.maxStringLength!==1/0:ae.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var qe=Se(ae,"customInspect")?ae.customInspect:!0;if(typeof qe!="boolean"&&qe!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Se(ae,"indent")&&ae.indent!==null&&ae.indent!==" "&&!(parseInt(ae.indent,10)===ae.indent&&ae.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Se(ae,"numericSeparator")&&typeof ae.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Me=ae.numericSeparator;if(typeof P>"u")return"undefined";if(P===null)return"null";if(typeof P=="boolean")return P?"true":"false";if(typeof P=="string")return Oe(P,ae);if(typeof P=="number"){if(P===0)return 1/0/P>0?"0":"-0";var Ee=String(P);return Me?W(P,Ee):Ee}if(typeof P=="bigint"){var Re=String(P)+"n";return Me?W(P,Re):Re}var He=typeof ae.depth>"u"?5:ae.depth;if(typeof re>"u"&&(re=0),re>=He&&He>0&&typeof P=="object")return k(P)?"[Array]":"[Object]";var $e=J(ae,re);if(typeof fe>"u")fe=[];else if(ye(fe,P)>=0)return"[Circular]";function xe(ke,Ke,at){if(Ke&&(fe=D.call(fe),fe.push(Ke)),at){var it={depth:ae.depth};return Se(ae,"quoteStyle")&&(it.quoteStyle=ae.quoteStyle),O(ke,it,re+1,fe)}return O(ke,ae,re+1,fe)}if(typeof P=="function"&&!Q(P)){var Je=Te(P),Qe=N(P,xe);return"[Function"+(Je?": "+Je:" (anonymous)")+"]"+(Qe.length>0?" { "+x.call(Qe,", ")+" }":"")}if(le(P)){var Ye=U?w.call(String(P),/^(Symbol\(.*\))_[^)]*$/,"$1"):B.call(P);return typeof P=="object"&&!U?Ie(Ye):Ye}if(Ne(P)){for(var Ue="<"+b.call(String(P.nodeName)),Xe=P.attributes||[],Ge=0;Ge<Xe.length;Ge++)Ue+=" "+Xe[Ge].name+"="+pe(C(Xe[Ge].value),"double",ae);return Ue+=">",P.childNodes&&P.childNodes.length&&(Ue+="..."),Ue+="</"+b.call(String(P.nodeName))+">",Ue}if(k(P)){if(P.length===0)return"[]";var Pe=N(P,xe);return $e&&!we(Pe)?"["+X(Pe,$e)+"]":"[ "+x.call(Pe,", ")+" ]"}if(se(P)){var Ve=N(P,xe);return!("cause"in Error.prototype)&&"cause"in P&&!z.call(P,"cause")?"{ ["+String(P)+"] "+x.call(q.call("[cause]: "+xe(P.cause),Ve),", ")+" }":Ve.length===0?"["+String(P)+"]":"{ ["+String(P)+"] "+x.call(Ve,", ")+" }"}if(typeof P=="object"&&qe){if(V&&typeof P[V]=="function"&&te)return te(P,{depth:He-re});if(qe!=="symbol"&&typeof P.inspect=="function")return P.inspect()}if(Fe(P)){var rt=[];return r&&r.call(P,function(ke,Ke){rt.push(xe(Ke,P,!0)+" => "+xe(ke,P))}),ce("Map",t.call(P),rt,$e)}if(Be(P)){var nt=[];return l&&l.call(P,function(ke){nt.push(xe(ke,P))}),ce("Set",s.call(P),nt,$e)}if(ze(P))return ee("WeakMap");if(ie(P))return ee("WeakSet");if(je(P))return ee("WeakRef");if(ne(P))return Ie(xe(Number(P)));if(me(P))return Ie(xe(F.call(P)));if(ue(P))return Ie(m.call(P));if(Y(P))return Ie(xe(String(P)));if(typeof window<"u"&&P===window)return"{ [object Window] }";if(P===commonjsGlobal)return"{ [object globalThis] }";if(!$(P)&&!Q(P)){var Ae=N(P,xe),he=K?K(P)===Object.prototype:P instanceof Object||P.constructor===Object,Ze=P instanceof Object?"":"null prototype",We=!he&&H&&Object(P)===P&&H in P?S.call(be(P),8,-1):Ze?"Object":"",Ce=he||typeof P.constructor!="function"?"":P.constructor.name?P.constructor.name+" ":"",et=Ce+(We||Ze?"["+x.call(q.call([],We||[],Ze||[]),": ")+"] ":"");return Ae.length===0?et+"{}":$e?et+"{"+X(Ae,$e)+"}":et+"{ "+x.call(Ae,", ")+" }"}return String(P)};function pe(O,P,G){var re=(G.quoteStyle||P)==="double"?'"':"'";return re+O+re}function C(O){return w.call(String(O),/"/g,""")}function k(O){return be(O)==="[object Array]"&&(!H||!(typeof O=="object"&&H in O))}function $(O){return be(O)==="[object Date]"&&(!H||!(typeof O=="object"&&H in O))}function Q(O){return be(O)==="[object RegExp]"&&(!H||!(typeof O=="object"&&H in O))}function se(O){return be(O)==="[object Error]"&&(!H||!(typeof O=="object"&&H in O))}function Y(O){return be(O)==="[object String]"&&(!H||!(typeof O=="object"&&H in O))}function ne(O){return be(O)==="[object Number]"&&(!H||!(typeof O=="object"&&H in O))}function ue(O){return be(O)==="[object Boolean]"&&(!H||!(typeof O=="object"&&H in O))}function le(O){if(U)return O&&typeof O=="object"&&O instanceof Symbol;if(typeof O=="symbol")return!0;if(!O||typeof O!="object"||!B)return!1;try{return B.call(O),!0}catch{}return!1}function me(O){if(!O||typeof O!="object"||!F)return!1;try{return F.call(O),!0}catch{}return!1}var ve=Object.prototype.hasOwnProperty||function(O){return O in this};function Se(O,P){return ve.call(O,P)}function be(O){return v.call(O)}function Te(O){if(O.name)return O.name;var P=E.call(p.call(O),/^function\s*([\w$]+)/);return P?P[1]:null}function ye(O,P){if(O.indexOf)return O.indexOf(P);for(var G=0,re=O.length;G<re;G++)if(O[G]===P)return G;return-1}function Fe(O){if(!t||!O||typeof O!="object")return!1;try{t.call(O);try{s.call(O)}catch{return!0}return O instanceof Map}catch{}return!1}function ze(O){if(!o||!O||typeof O!="object")return!1;try{o.call(O,o);try{d.call(O,d)}catch{return!0}return O instanceof WeakMap}catch{}return!1}function je(O){if(!y||!O||typeof O!="object")return!1;try{return y.call(O),!0}catch{}return!1}function Be(O){if(!s||!O||typeof O!="object")return!1;try{s.call(O);try{t.call(O)}catch{return!0}return O instanceof Set}catch{}return!1}function ie(O){if(!d||!O||typeof O!="object")return!1;try{d.call(O,d);try{o.call(O,o)}catch{return!0}return O instanceof WeakSet}catch{}return!1}function Ne(O){return!O||typeof O!="object"?!1:typeof HTMLElement<"u"&&O instanceof HTMLElement?!0:typeof O.nodeName=="string"&&typeof O.getAttribute=="function"}function Oe(O,P){if(O.length>P.maxStringLength){var G=O.length-P.maxStringLength,re="... "+G+" more character"+(G>1?"s":"");return Oe(S.call(O,0,P.maxStringLength),P)+re}var fe=w.call(w.call(O,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Le);return pe(fe,"single",P)}function Le(O){var P=O.charCodeAt(0),G={8:"b",9:"t",10:"n",12:"f",13:"r"}[P];return G?"\\"+G:"\\x"+(P<16?"0":"")+g.call(P.toString(16))}function Ie(O){return"Object("+O+")"}function ee(O){return O+" { ? }"}function ce(O,P,G,re){var fe=re?X(G,re):x.call(G,", ");return O+" ("+P+") {"+fe+"}"}function we(O){for(var P=0;P<O.length;P++)if(ye(O[P],`
|
|
3
|
+
`)>=0)return!1;return!0}function J(O,P){var G;if(O.indent===" ")G=" ";else if(typeof O.indent=="number"&&O.indent>0)G=x.call(Array(O.indent+1)," ");else return null;return{base:G,prev:x.call(Array(P+1),G)}}function X(O,P){if(O.length===0)return"";var G=`
|
|
4
4
|
`+P.prev+P.base;return G+x.call(O,","+G)+`
|
|
5
|
-
`+P.prev}function M(O,P){var G=k(O),re=[];if(G){re.length=O.length;for(var fe=0;fe<O.length;fe++)re[fe]=Se(O,fe)?P(O[fe],O):""}var ae=typeof N=="function"?N(O):[],qe;if(U){qe={};for(var Ne=0;Ne<ae.length;Ne++)qe["$"+ae[Ne]]=ae[Ne]}for(var Ee in O)Se(O,Ee)&&(G&&String(Number(Ee))===Ee&&Ee<O.length||U&&qe["$"+Ee]instanceof Symbol||(A.call(/[^\w$]/,Ee)?re.push(P(Ee,O)+": "+P(O[Ee],O)):re.push(Ee+": "+P(O[Ee],O))));if(typeof N=="function")for(var Re=0;Re<ae.length;Re++)z.call(O,ae[Re])&&re.push("["+P(ae[Re])+"]: "+P(O[ae[Re]],O));return re}return objectInspect}var sideChannel,hasRequiredSideChannel;function requireSideChannel(){if(hasRequiredSideChannel)return sideChannel;hasRequiredSideChannel=1;var n=requireGetIntrinsic(),e=requireCallBound(),t=requireObjectInspect(),r=requireType(),i=n("%WeakMap%",!0),a=n("%Map%",!0),s=e("WeakMap.prototype.get",!0),l=e("WeakMap.prototype.set",!0),u=e("WeakMap.prototype.has",!0),o=e("Map.prototype.get",!0),f=e("Map.prototype.set",!0),d=e("Map.prototype.has",!0),h=function(p,E){for(var S=p,w;(w=S.next)!==null;S=w)if(w.key===E)return S.next=w.next,w.next=p.next,p.next=w,w},y=function(p,E){var S=h(p,E);return S&&S.value},m=function(p,E,S){var w=h(p,E);w?w.value=S:p.next={key:E,next:p.next,value:S}},v=function(p,E){return!!h(p,E)};return sideChannel=function(){var E,S,w,g={assert:function(b){if(!g.has(b))throw new r("Side channel does not contain "+t(b))},get:function(b){if(i&&b&&(typeof b=="object"||typeof b=="function")){if(E)return s(E,b)}else if(a){if(S)return o(S,b)}else if(w)return y(w,b)},has:function(b){if(i&&b&&(typeof b=="object"||typeof b=="function")){if(E)return u(E,b)}else if(a){if(S)return d(S,b)}else if(w)return v(w,b);return!1},set:function(b,A){i&&b&&(typeof b=="object"||typeof b=="function")?(E||(E=new i),l(E,b,A)):a?(S||(S=new a),f(S,b,A)):(w||(w={key:{},next:null}),m(w,b,A))}};return g},sideChannel}var formats,hasRequiredFormats;function requireFormats(){if(hasRequiredFormats)return formats;hasRequiredFormats=1;var n=String.prototype.replace,e=/%20/g,t={RFC1738:"RFC1738",RFC3986:"RFC3986"};return formats={default:t.RFC3986,formatters:{RFC1738:function(r){return n.call(r,e,"+")},RFC3986:function(r){return String(r)}},RFC1738:t.RFC1738,RFC3986:t.RFC3986},formats}var utils,hasRequiredUtils;function requireUtils(){if(hasRequiredUtils)return utils;hasRequiredUtils=1;var n=requireFormats(),e=Object.prototype.hasOwnProperty,t=Array.isArray,r=function(){for(var v=[],p=0;p<256;++p)v.push("%"+((p<16?"0":"")+p.toString(16)).toUpperCase());return v}(),i=function(p){for(;p.length>1;){var E=p.pop(),S=E.obj[E.prop];if(t(S)){for(var w=[],g=0;g<S.length;++g)typeof S[g]<"u"&&w.push(S[g]);E.obj[E.prop]=w}}},a=function(p,E){for(var S=E&&E.plainObjects?Object.create(null):{},w=0;w<p.length;++w)typeof p[w]<"u"&&(S[w]=p[w]);return S},s=function v(p,E,S){if(!E)return p;if(typeof E!="object"){if(t(p))p.push(E);else if(p&&typeof p=="object")(S&&(S.plainObjects||S.allowPrototypes)||!e.call(Object.prototype,E))&&(p[E]=!0);else return[p,E];return p}if(!p||typeof p!="object")return[p].concat(E);var w=p;return t(p)&&!t(E)&&(w=a(p,S)),t(p)&&t(E)?(E.forEach(function(g,b){if(e.call(p,b)){var A=p[b];A&&typeof A=="object"&&g&&typeof g=="object"?p[b]=v(A,g,S):p.push(g)}else p[b]=g}),p):Object.keys(E).reduce(function(g,b){var A=E[b];return e.call(g,b)?g[b]=v(g[b],A,S):g[b]=A,g},w)},l=function(p,E){return Object.keys(E).reduce(function(S,w){return S[w]=E[w],S},p)},u=function(v,p,E){var S=v.replace(/\+/g," ");if(E==="iso-8859-1")return S.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(S)}catch{return S}},o=function(p,E,S,w,g){if(p.length===0)return p;var b=p;if(typeof p=="symbol"?b=Symbol.prototype.toString.call(p):typeof p!="string"&&(b=String(p)),S==="iso-8859-1")return escape(b).replace(/%u[0-9a-f]{4}/gi,function(D){return"%26%23"+parseInt(D.slice(2),16)+"%3B"});for(var A="",q=0;q<b.length;++q){var x=b.charCodeAt(q);if(x===45||x===46||x===95||x===126||x>=48&&x<=57||x>=65&&x<=90||x>=97&&x<=122||g===n.RFC1738&&(x===40||x===41)){A+=b.charAt(q);continue}if(x<128){A=A+r[x];continue}if(x<2048){A=A+(r[192|x>>6]+r[128|x&63]);continue}if(x<55296||x>=57344){A=A+(r[224|x>>12]+r[128|x>>6&63]+r[128|x&63]);continue}q+=1,x=65536+((x&1023)<<10|b.charCodeAt(q)&1023),A+=r[240|x>>18]+r[128|x>>12&63]+r[128|x>>6&63]+r[128|x&63]}return A},f=function(p){for(var E=[{obj:{o:p},prop:"o"}],S=[],w=0;w<E.length;++w)for(var g=E[w],b=g.obj[g.prop],A=Object.keys(b),q=0;q<A.length;++q){var x=A[q],D=b[x];typeof D=="object"&&D!==null&&S.indexOf(D)===-1&&(E.push({obj:b,prop:x}),S.push(D))}return i(E),p},d=function(p){return Object.prototype.toString.call(p)==="[object RegExp]"},h=function(p){return!p||typeof p!="object"?!1:!!(p.constructor&&p.constructor.isBuffer&&p.constructor.isBuffer(p))},y=function(p,E){return[].concat(p,E)},m=function(p,E){if(t(p)){for(var S=[],w=0;w<p.length;w+=1)S.push(E(p[w]));return S}return E(p)};return utils={arrayToObject:a,assign:l,combine:y,compact:f,decode:u,encode:o,isBuffer:h,isRegExp:d,maybeMap:m,merge:s},utils}var stringify_1,hasRequiredStringify;function requireStringify(){if(hasRequiredStringify)return stringify_1;hasRequiredStringify=1;var n=requireSideChannel(),e=requireUtils(),t=requireFormats(),r=Object.prototype.hasOwnProperty,i={brackets:function(p){return p+"[]"},comma:"comma",indices:function(p,E){return p+"["+E+"]"},repeat:function(p){return p}},a=Array.isArray,s=Array.prototype.push,l=function(v,p){s.apply(v,a(p)?p:[p])},u=Date.prototype.toISOString,o=t.default,f={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:e.encode,encodeValuesOnly:!1,format:o,formatter:t.formatters[o],indices:!1,serializeDate:function(p){return u.call(p)},skipNulls:!1,strictNullHandling:!1},d=function(p){return typeof p=="string"||typeof p=="number"||typeof p=="boolean"||typeof p=="symbol"||typeof p=="bigint"},h={},y=function v(p,E,S,w,g,b,A,q,x,D,j,F,N,B,U,H){for(var z=p,K=H,W=0,te=!1;(K=K.get(h))!==void 0&&!te;){var Z=K.get(p);if(W+=1,typeof Z<"u"){if(Z===W)throw new RangeError("Cyclic object value");te=!0}typeof K.get(h)>"u"&&(W=0)}if(typeof q=="function"?z=q(E,z):z instanceof Date?z=j(z):S==="comma"&&a(z)&&(z=e.maybeMap(z,function(le){return le instanceof Date?j(le):le})),z===null){if(g)return A&&!B?A(E,f.encoder,U,"key",F):E;z=""}if(d(z)||e.isBuffer(z)){if(A){var V=B?E:A(E,f.encoder,U,"key",F);return[N(V)+"="+N(A(z,f.encoder,U,"value",F))]}return[N(E)+"="+N(String(z))]}var pe=[];if(typeof z>"u")return pe;var C;if(S==="comma"&&a(z))B&&A&&(z=e.maybeMap(z,A)),C=[{value:z.length>0?z.join(",")||null:void 0}];else if(a(q))C=q;else{var k=Object.keys(z);C=x?k.sort(x):k}for(var $=w&&a(z)&&z.length===1?E+"[]":E,Y=0;Y<C.length;++Y){var se=C[Y],X=typeof se=="object"&&typeof se.value<"u"?se.value:z[se];if(!(b&&X===null)){var ne=a(z)?typeof S=="function"?S($,se):$:$+(D?"."+se:"["+se+"]");H.set(p,W);var ue=n();ue.set(h,H),l(pe,v(X,ne,S,w,g,b,S==="comma"&&B&&a(z)?null:A,q,x,D,j,F,N,B,U,ue))}}return pe},m=function(p){if(!p)return f;if(p.encoder!==null&&typeof p.encoder<"u"&&typeof p.encoder!="function")throw new TypeError("Encoder has to be a function.");var E=p.charset||f.charset;if(typeof p.charset<"u"&&p.charset!=="utf-8"&&p.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var S=t.default;if(typeof p.format<"u"){if(!r.call(t.formatters,p.format))throw new TypeError("Unknown format option provided.");S=p.format}var w=t.formatters[S],g=f.filter;return(typeof p.filter=="function"||a(p.filter))&&(g=p.filter),{addQueryPrefix:typeof p.addQueryPrefix=="boolean"?p.addQueryPrefix:f.addQueryPrefix,allowDots:typeof p.allowDots>"u"?f.allowDots:!!p.allowDots,charset:E,charsetSentinel:typeof p.charsetSentinel=="boolean"?p.charsetSentinel:f.charsetSentinel,delimiter:typeof p.delimiter>"u"?f.delimiter:p.delimiter,encode:typeof p.encode=="boolean"?p.encode:f.encode,encoder:typeof p.encoder=="function"?p.encoder:f.encoder,encodeValuesOnly:typeof p.encodeValuesOnly=="boolean"?p.encodeValuesOnly:f.encodeValuesOnly,filter:g,format:S,formatter:w,serializeDate:typeof p.serializeDate=="function"?p.serializeDate:f.serializeDate,skipNulls:typeof p.skipNulls=="boolean"?p.skipNulls:f.skipNulls,sort:typeof p.sort=="function"?p.sort:null,strictNullHandling:typeof p.strictNullHandling=="boolean"?p.strictNullHandling:f.strictNullHandling}};return stringify_1=function(v,p){var E=v,S=m(p),w,g;typeof S.filter=="function"?(g=S.filter,E=g("",E)):a(S.filter)&&(g=S.filter,w=g);var b=[];if(typeof E!="object"||E===null)return"";var A;p&&p.arrayFormat in i?A=p.arrayFormat:p&&"indices"in p?A=p.indices?"indices":"repeat":A="indices";var q=i[A];if(p&&"commaRoundTrip"in p&&typeof p.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var x=q==="comma"&&p&&p.commaRoundTrip;w||(w=Object.keys(E)),S.sort&&w.sort(S.sort);for(var D=n(),j=0;j<w.length;++j){var F=w[j];S.skipNulls&&E[F]===null||l(b,y(E[F],F,q,x,S.strictNullHandling,S.skipNulls,S.encode?S.encoder:null,S.filter,S.sort,S.allowDots,S.serializeDate,S.format,S.formatter,S.encodeValuesOnly,S.charset,D))}var N=b.join(S.delimiter),B=S.addQueryPrefix===!0?"?":"";return S.charsetSentinel&&(S.charset==="iso-8859-1"?B+="utf8=%26%2310003%3B&":B+="utf8=%E2%9C%93&"),N.length>0?B+N:""},stringify_1}var parse$1,hasRequiredParse;function requireParse(){if(hasRequiredParse)return parse$1;hasRequiredParse=1;var n=requireUtils(),e=Object.prototype.hasOwnProperty,t=Array.isArray,r={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},i=function(h){return h.replace(/&#(\d+);/g,function(y,m){return String.fromCharCode(parseInt(m,10))})},a=function(h,y){return h&&typeof h=="string"&&y.comma&&h.indexOf(",")>-1?h.split(","):h},s="utf8=%26%2310003%3B",l="utf8=%E2%9C%93",u=function(y,m){var v={__proto__:null},p=m.ignoreQueryPrefix?y.replace(/^\?/,""):y,E=m.parameterLimit===1/0?void 0:m.parameterLimit,S=p.split(m.delimiter,E),w=-1,g,b=m.charset;if(m.charsetSentinel)for(g=0;g<S.length;++g)S[g].indexOf("utf8=")===0&&(S[g]===l?b="utf-8":S[g]===s&&(b="iso-8859-1"),w=g,g=S.length);for(g=0;g<S.length;++g)if(g!==w){var A=S[g],q=A.indexOf("]="),x=q===-1?A.indexOf("="):q+1,D,j;x===-1?(D=m.decoder(A,r.decoder,b,"key"),j=m.strictNullHandling?null:""):(D=m.decoder(A.slice(0,x),r.decoder,b,"key"),j=n.maybeMap(a(A.slice(x+1),m),function(F){return m.decoder(F,r.decoder,b,"value")})),j&&m.interpretNumericEntities&&b==="iso-8859-1"&&(j=i(j)),A.indexOf("[]=")>-1&&(j=t(j)?[j]:j),e.call(v,D)?v[D]=n.combine(v[D],j):v[D]=j}return v},o=function(h,y,m,v){for(var p=v?y:a(y,m),E=h.length-1;E>=0;--E){var S,w=h[E];if(w==="[]"&&m.parseArrays)S=[].concat(p);else{S=m.plainObjects?Object.create(null):{};var g=w.charAt(0)==="["&&w.charAt(w.length-1)==="]"?w.slice(1,-1):w,b=parseInt(g,10);!m.parseArrays&&g===""?S={0:p}:!isNaN(b)&&w!==g&&String(b)===g&&b>=0&&m.parseArrays&&b<=m.arrayLimit?(S=[],S[b]=p):g!=="__proto__"&&(S[g]=p)}p=S}return p},f=function(y,m,v,p){if(y){var E=v.allowDots?y.replace(/\.([^.[]+)/g,"[$1]"):y,S=/(\[[^[\]]*])/,w=/(\[[^[\]]*])/g,g=v.depth>0&&S.exec(E),b=g?E.slice(0,g.index):E,A=[];if(b){if(!v.plainObjects&&e.call(Object.prototype,b)&&!v.allowPrototypes)return;A.push(b)}for(var q=0;v.depth>0&&(g=w.exec(E))!==null&&q<v.depth;){if(q+=1,!v.plainObjects&&e.call(Object.prototype,g[1].slice(1,-1))&&!v.allowPrototypes)return;A.push(g[1])}return g&&A.push("["+E.slice(g.index)+"]"),o(A,m,v,p)}},d=function(y){if(!y)return r;if(y.decoder!==null&&y.decoder!==void 0&&typeof y.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof y.charset<"u"&&y.charset!=="utf-8"&&y.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var m=typeof y.charset>"u"?r.charset:y.charset;return{allowDots:typeof y.allowDots>"u"?r.allowDots:!!y.allowDots,allowPrototypes:typeof y.allowPrototypes=="boolean"?y.allowPrototypes:r.allowPrototypes,allowSparse:typeof y.allowSparse=="boolean"?y.allowSparse:r.allowSparse,arrayLimit:typeof y.arrayLimit=="number"?y.arrayLimit:r.arrayLimit,charset:m,charsetSentinel:typeof y.charsetSentinel=="boolean"?y.charsetSentinel:r.charsetSentinel,comma:typeof y.comma=="boolean"?y.comma:r.comma,decoder:typeof y.decoder=="function"?y.decoder:r.decoder,delimiter:typeof y.delimiter=="string"||n.isRegExp(y.delimiter)?y.delimiter:r.delimiter,depth:typeof y.depth=="number"||y.depth===!1?+y.depth:r.depth,ignoreQueryPrefix:y.ignoreQueryPrefix===!0,interpretNumericEntities:typeof y.interpretNumericEntities=="boolean"?y.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof y.parameterLimit=="number"?y.parameterLimit:r.parameterLimit,parseArrays:y.parseArrays!==!1,plainObjects:typeof y.plainObjects=="boolean"?y.plainObjects:r.plainObjects,strictNullHandling:typeof y.strictNullHandling=="boolean"?y.strictNullHandling:r.strictNullHandling}};return parse$1=function(h,y){var m=d(y);if(h===""||h===null||typeof h>"u")return m.plainObjects?Object.create(null):{};for(var v=typeof h=="string"?u(h,m):h,p=m.plainObjects?Object.create(null):{},E=Object.keys(v),S=0;S<E.length;++S){var w=E[S],g=f(w,v[w],m,typeof h=="string");p=n.merge(p,g,m)}return m.allowSparse===!0?p:n.compact(p)},parse$1}var lib,hasRequiredLib;function requireLib(){if(hasRequiredLib)return lib;hasRequiredLib=1;var n=requireStringify(),e=requireParse(),t=requireFormats();return lib={formats:t,parse:e,stringify:n},lib}var libExports=requireLib();const qs=getDefaultExportFromCjs(libExports);class GudHubHttpsService{constructor(e){this.root=e,this.requestPromises=[]}init(e){this.getToken=e}async get(e){const t=await this.getToken(),r=this.getHashCode(e);if(this.requestPromises[r])return this.requestPromises[r].promise;const i=new Promise((a,s)=>{let l;e.externalResource?l=e.url:(l=this.root+e.url,l="".concat(l).concat(/\?/.test(l)?"&":"?","token=").concat(t).concat(convertObjToUrlParams(e.params))),axios.get(l,{validateStatus:function(u){return u<400}}).then(function(u){u.status!=200&&console.error("GUDHUB HTTP SERVICE: GET ERROR: ".concat(u.status),u),a(u.data)}).catch(function(u){console.error("GUDHUB HTTP SERVICE: GET ERROR: ".concat(u.response.status,`
|
|
5
|
+
`+P.prev}function N(O,P){var G=k(O),re=[];if(G){re.length=O.length;for(var fe=0;fe<O.length;fe++)re[fe]=Se(O,fe)?P(O[fe],O):""}var ae=typeof M=="function"?M(O):[],qe;if(U){qe={};for(var Me=0;Me<ae.length;Me++)qe["$"+ae[Me]]=ae[Me]}for(var Ee in O)Se(O,Ee)&&(G&&String(Number(Ee))===Ee&&Ee<O.length||U&&qe["$"+Ee]instanceof Symbol||(A.call(/[^\w$]/,Ee)?re.push(P(Ee,O)+": "+P(O[Ee],O)):re.push(Ee+": "+P(O[Ee],O))));if(typeof M=="function")for(var Re=0;Re<ae.length;Re++)z.call(O,ae[Re])&&re.push("["+P(ae[Re])+"]: "+P(O[ae[Re]],O));return re}return objectInspect}var sideChannel,hasRequiredSideChannel;function requireSideChannel(){if(hasRequiredSideChannel)return sideChannel;hasRequiredSideChannel=1;var n=requireGetIntrinsic(),e=requireCallBound(),t=requireObjectInspect(),r=requireType(),i=n("%WeakMap%",!0),a=n("%Map%",!0),s=e("WeakMap.prototype.get",!0),l=e("WeakMap.prototype.set",!0),u=e("WeakMap.prototype.has",!0),o=e("Map.prototype.get",!0),f=e("Map.prototype.set",!0),d=e("Map.prototype.has",!0),h=function(p,E){for(var S=p,w;(w=S.next)!==null;S=w)if(w.key===E)return S.next=w.next,w.next=p.next,p.next=w,w},y=function(p,E){var S=h(p,E);return S&&S.value},m=function(p,E,S){var w=h(p,E);w?w.value=S:p.next={key:E,next:p.next,value:S}},v=function(p,E){return!!h(p,E)};return sideChannel=function(){var E,S,w,g={assert:function(b){if(!g.has(b))throw new r("Side channel does not contain "+t(b))},get:function(b){if(i&&b&&(typeof b=="object"||typeof b=="function")){if(E)return s(E,b)}else if(a){if(S)return o(S,b)}else if(w)return y(w,b)},has:function(b){if(i&&b&&(typeof b=="object"||typeof b=="function")){if(E)return u(E,b)}else if(a){if(S)return d(S,b)}else if(w)return v(w,b);return!1},set:function(b,A){i&&b&&(typeof b=="object"||typeof b=="function")?(E||(E=new i),l(E,b,A)):a?(S||(S=new a),f(S,b,A)):(w||(w={key:{},next:null}),m(w,b,A))}};return g},sideChannel}var formats,hasRequiredFormats;function requireFormats(){if(hasRequiredFormats)return formats;hasRequiredFormats=1;var n=String.prototype.replace,e=/%20/g,t={RFC1738:"RFC1738",RFC3986:"RFC3986"};return formats={default:t.RFC3986,formatters:{RFC1738:function(r){return n.call(r,e,"+")},RFC3986:function(r){return String(r)}},RFC1738:t.RFC1738,RFC3986:t.RFC3986},formats}var utils,hasRequiredUtils;function requireUtils(){if(hasRequiredUtils)return utils;hasRequiredUtils=1;var n=requireFormats(),e=Object.prototype.hasOwnProperty,t=Array.isArray,r=function(){for(var v=[],p=0;p<256;++p)v.push("%"+((p<16?"0":"")+p.toString(16)).toUpperCase());return v}(),i=function(p){for(;p.length>1;){var E=p.pop(),S=E.obj[E.prop];if(t(S)){for(var w=[],g=0;g<S.length;++g)typeof S[g]<"u"&&w.push(S[g]);E.obj[E.prop]=w}}},a=function(p,E){for(var S=E&&E.plainObjects?Object.create(null):{},w=0;w<p.length;++w)typeof p[w]<"u"&&(S[w]=p[w]);return S},s=function v(p,E,S){if(!E)return p;if(typeof E!="object"){if(t(p))p.push(E);else if(p&&typeof p=="object")(S&&(S.plainObjects||S.allowPrototypes)||!e.call(Object.prototype,E))&&(p[E]=!0);else return[p,E];return p}if(!p||typeof p!="object")return[p].concat(E);var w=p;return t(p)&&!t(E)&&(w=a(p,S)),t(p)&&t(E)?(E.forEach(function(g,b){if(e.call(p,b)){var A=p[b];A&&typeof A=="object"&&g&&typeof g=="object"?p[b]=v(A,g,S):p.push(g)}else p[b]=g}),p):Object.keys(E).reduce(function(g,b){var A=E[b];return e.call(g,b)?g[b]=v(g[b],A,S):g[b]=A,g},w)},l=function(p,E){return Object.keys(E).reduce(function(S,w){return S[w]=E[w],S},p)},u=function(v,p,E){var S=v.replace(/\+/g," ");if(E==="iso-8859-1")return S.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(S)}catch{return S}},o=function(p,E,S,w,g){if(p.length===0)return p;var b=p;if(typeof p=="symbol"?b=Symbol.prototype.toString.call(p):typeof p!="string"&&(b=String(p)),S==="iso-8859-1")return escape(b).replace(/%u[0-9a-f]{4}/gi,function(D){return"%26%23"+parseInt(D.slice(2),16)+"%3B"});for(var A="",q=0;q<b.length;++q){var x=b.charCodeAt(q);if(x===45||x===46||x===95||x===126||x>=48&&x<=57||x>=65&&x<=90||x>=97&&x<=122||g===n.RFC1738&&(x===40||x===41)){A+=b.charAt(q);continue}if(x<128){A=A+r[x];continue}if(x<2048){A=A+(r[192|x>>6]+r[128|x&63]);continue}if(x<55296||x>=57344){A=A+(r[224|x>>12]+r[128|x>>6&63]+r[128|x&63]);continue}q+=1,x=65536+((x&1023)<<10|b.charCodeAt(q)&1023),A+=r[240|x>>18]+r[128|x>>12&63]+r[128|x>>6&63]+r[128|x&63]}return A},f=function(p){for(var E=[{obj:{o:p},prop:"o"}],S=[],w=0;w<E.length;++w)for(var g=E[w],b=g.obj[g.prop],A=Object.keys(b),q=0;q<A.length;++q){var x=A[q],D=b[x];typeof D=="object"&&D!==null&&S.indexOf(D)===-1&&(E.push({obj:b,prop:x}),S.push(D))}return i(E),p},d=function(p){return Object.prototype.toString.call(p)==="[object RegExp]"},h=function(p){return!p||typeof p!="object"?!1:!!(p.constructor&&p.constructor.isBuffer&&p.constructor.isBuffer(p))},y=function(p,E){return[].concat(p,E)},m=function(p,E){if(t(p)){for(var S=[],w=0;w<p.length;w+=1)S.push(E(p[w]));return S}return E(p)};return utils={arrayToObject:a,assign:l,combine:y,compact:f,decode:u,encode:o,isBuffer:h,isRegExp:d,maybeMap:m,merge:s},utils}var stringify_1,hasRequiredStringify;function requireStringify(){if(hasRequiredStringify)return stringify_1;hasRequiredStringify=1;var n=requireSideChannel(),e=requireUtils(),t=requireFormats(),r=Object.prototype.hasOwnProperty,i={brackets:function(p){return p+"[]"},comma:"comma",indices:function(p,E){return p+"["+E+"]"},repeat:function(p){return p}},a=Array.isArray,s=Array.prototype.push,l=function(v,p){s.apply(v,a(p)?p:[p])},u=Date.prototype.toISOString,o=t.default,f={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:e.encode,encodeValuesOnly:!1,format:o,formatter:t.formatters[o],indices:!1,serializeDate:function(p){return u.call(p)},skipNulls:!1,strictNullHandling:!1},d=function(p){return typeof p=="string"||typeof p=="number"||typeof p=="boolean"||typeof p=="symbol"||typeof p=="bigint"},h={},y=function v(p,E,S,w,g,b,A,q,x,D,j,F,M,B,U,H){for(var z=p,K=H,W=0,te=!1;(K=K.get(h))!==void 0&&!te;){var Z=K.get(p);if(W+=1,typeof Z<"u"){if(Z===W)throw new RangeError("Cyclic object value");te=!0}typeof K.get(h)>"u"&&(W=0)}if(typeof q=="function"?z=q(E,z):z instanceof Date?z=j(z):S==="comma"&&a(z)&&(z=e.maybeMap(z,function(le){return le instanceof Date?j(le):le})),z===null){if(g)return A&&!B?A(E,f.encoder,U,"key",F):E;z=""}if(d(z)||e.isBuffer(z)){if(A){var V=B?E:A(E,f.encoder,U,"key",F);return[M(V)+"="+M(A(z,f.encoder,U,"value",F))]}return[M(E)+"="+M(String(z))]}var pe=[];if(typeof z>"u")return pe;var C;if(S==="comma"&&a(z))B&&A&&(z=e.maybeMap(z,A)),C=[{value:z.length>0?z.join(",")||null:void 0}];else if(a(q))C=q;else{var k=Object.keys(z);C=x?k.sort(x):k}for(var $=w&&a(z)&&z.length===1?E+"[]":E,Q=0;Q<C.length;++Q){var se=C[Q],Y=typeof se=="object"&&typeof se.value<"u"?se.value:z[se];if(!(b&&Y===null)){var ne=a(z)?typeof S=="function"?S($,se):$:$+(D?"."+se:"["+se+"]");H.set(p,W);var ue=n();ue.set(h,H),l(pe,v(Y,ne,S,w,g,b,S==="comma"&&B&&a(z)?null:A,q,x,D,j,F,M,B,U,ue))}}return pe},m=function(p){if(!p)return f;if(p.encoder!==null&&typeof p.encoder<"u"&&typeof p.encoder!="function")throw new TypeError("Encoder has to be a function.");var E=p.charset||f.charset;if(typeof p.charset<"u"&&p.charset!=="utf-8"&&p.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var S=t.default;if(typeof p.format<"u"){if(!r.call(t.formatters,p.format))throw new TypeError("Unknown format option provided.");S=p.format}var w=t.formatters[S],g=f.filter;return(typeof p.filter=="function"||a(p.filter))&&(g=p.filter),{addQueryPrefix:typeof p.addQueryPrefix=="boolean"?p.addQueryPrefix:f.addQueryPrefix,allowDots:typeof p.allowDots>"u"?f.allowDots:!!p.allowDots,charset:E,charsetSentinel:typeof p.charsetSentinel=="boolean"?p.charsetSentinel:f.charsetSentinel,delimiter:typeof p.delimiter>"u"?f.delimiter:p.delimiter,encode:typeof p.encode=="boolean"?p.encode:f.encode,encoder:typeof p.encoder=="function"?p.encoder:f.encoder,encodeValuesOnly:typeof p.encodeValuesOnly=="boolean"?p.encodeValuesOnly:f.encodeValuesOnly,filter:g,format:S,formatter:w,serializeDate:typeof p.serializeDate=="function"?p.serializeDate:f.serializeDate,skipNulls:typeof p.skipNulls=="boolean"?p.skipNulls:f.skipNulls,sort:typeof p.sort=="function"?p.sort:null,strictNullHandling:typeof p.strictNullHandling=="boolean"?p.strictNullHandling:f.strictNullHandling}};return stringify_1=function(v,p){var E=v,S=m(p),w,g;typeof S.filter=="function"?(g=S.filter,E=g("",E)):a(S.filter)&&(g=S.filter,w=g);var b=[];if(typeof E!="object"||E===null)return"";var A;p&&p.arrayFormat in i?A=p.arrayFormat:p&&"indices"in p?A=p.indices?"indices":"repeat":A="indices";var q=i[A];if(p&&"commaRoundTrip"in p&&typeof p.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var x=q==="comma"&&p&&p.commaRoundTrip;w||(w=Object.keys(E)),S.sort&&w.sort(S.sort);for(var D=n(),j=0;j<w.length;++j){var F=w[j];S.skipNulls&&E[F]===null||l(b,y(E[F],F,q,x,S.strictNullHandling,S.skipNulls,S.encode?S.encoder:null,S.filter,S.sort,S.allowDots,S.serializeDate,S.format,S.formatter,S.encodeValuesOnly,S.charset,D))}var M=b.join(S.delimiter),B=S.addQueryPrefix===!0?"?":"";return S.charsetSentinel&&(S.charset==="iso-8859-1"?B+="utf8=%26%2310003%3B&":B+="utf8=%E2%9C%93&"),M.length>0?B+M:""},stringify_1}var parse$1,hasRequiredParse;function requireParse(){if(hasRequiredParse)return parse$1;hasRequiredParse=1;var n=requireUtils(),e=Object.prototype.hasOwnProperty,t=Array.isArray,r={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},i=function(h){return h.replace(/&#(\d+);/g,function(y,m){return String.fromCharCode(parseInt(m,10))})},a=function(h,y){return h&&typeof h=="string"&&y.comma&&h.indexOf(",")>-1?h.split(","):h},s="utf8=%26%2310003%3B",l="utf8=%E2%9C%93",u=function(y,m){var v={__proto__:null},p=m.ignoreQueryPrefix?y.replace(/^\?/,""):y,E=m.parameterLimit===1/0?void 0:m.parameterLimit,S=p.split(m.delimiter,E),w=-1,g,b=m.charset;if(m.charsetSentinel)for(g=0;g<S.length;++g)S[g].indexOf("utf8=")===0&&(S[g]===l?b="utf-8":S[g]===s&&(b="iso-8859-1"),w=g,g=S.length);for(g=0;g<S.length;++g)if(g!==w){var A=S[g],q=A.indexOf("]="),x=q===-1?A.indexOf("="):q+1,D,j;x===-1?(D=m.decoder(A,r.decoder,b,"key"),j=m.strictNullHandling?null:""):(D=m.decoder(A.slice(0,x),r.decoder,b,"key"),j=n.maybeMap(a(A.slice(x+1),m),function(F){return m.decoder(F,r.decoder,b,"value")})),j&&m.interpretNumericEntities&&b==="iso-8859-1"&&(j=i(j)),A.indexOf("[]=")>-1&&(j=t(j)?[j]:j),e.call(v,D)?v[D]=n.combine(v[D],j):v[D]=j}return v},o=function(h,y,m,v){for(var p=v?y:a(y,m),E=h.length-1;E>=0;--E){var S,w=h[E];if(w==="[]"&&m.parseArrays)S=[].concat(p);else{S=m.plainObjects?Object.create(null):{};var g=w.charAt(0)==="["&&w.charAt(w.length-1)==="]"?w.slice(1,-1):w,b=parseInt(g,10);!m.parseArrays&&g===""?S={0:p}:!isNaN(b)&&w!==g&&String(b)===g&&b>=0&&m.parseArrays&&b<=m.arrayLimit?(S=[],S[b]=p):g!=="__proto__"&&(S[g]=p)}p=S}return p},f=function(y,m,v,p){if(y){var E=v.allowDots?y.replace(/\.([^.[]+)/g,"[$1]"):y,S=/(\[[^[\]]*])/,w=/(\[[^[\]]*])/g,g=v.depth>0&&S.exec(E),b=g?E.slice(0,g.index):E,A=[];if(b){if(!v.plainObjects&&e.call(Object.prototype,b)&&!v.allowPrototypes)return;A.push(b)}for(var q=0;v.depth>0&&(g=w.exec(E))!==null&&q<v.depth;){if(q+=1,!v.plainObjects&&e.call(Object.prototype,g[1].slice(1,-1))&&!v.allowPrototypes)return;A.push(g[1])}return g&&A.push("["+E.slice(g.index)+"]"),o(A,m,v,p)}},d=function(y){if(!y)return r;if(y.decoder!==null&&y.decoder!==void 0&&typeof y.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof y.charset<"u"&&y.charset!=="utf-8"&&y.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var m=typeof y.charset>"u"?r.charset:y.charset;return{allowDots:typeof y.allowDots>"u"?r.allowDots:!!y.allowDots,allowPrototypes:typeof y.allowPrototypes=="boolean"?y.allowPrototypes:r.allowPrototypes,allowSparse:typeof y.allowSparse=="boolean"?y.allowSparse:r.allowSparse,arrayLimit:typeof y.arrayLimit=="number"?y.arrayLimit:r.arrayLimit,charset:m,charsetSentinel:typeof y.charsetSentinel=="boolean"?y.charsetSentinel:r.charsetSentinel,comma:typeof y.comma=="boolean"?y.comma:r.comma,decoder:typeof y.decoder=="function"?y.decoder:r.decoder,delimiter:typeof y.delimiter=="string"||n.isRegExp(y.delimiter)?y.delimiter:r.delimiter,depth:typeof y.depth=="number"||y.depth===!1?+y.depth:r.depth,ignoreQueryPrefix:y.ignoreQueryPrefix===!0,interpretNumericEntities:typeof y.interpretNumericEntities=="boolean"?y.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof y.parameterLimit=="number"?y.parameterLimit:r.parameterLimit,parseArrays:y.parseArrays!==!1,plainObjects:typeof y.plainObjects=="boolean"?y.plainObjects:r.plainObjects,strictNullHandling:typeof y.strictNullHandling=="boolean"?y.strictNullHandling:r.strictNullHandling}};return parse$1=function(h,y){var m=d(y);if(h===""||h===null||typeof h>"u")return m.plainObjects?Object.create(null):{};for(var v=typeof h=="string"?u(h,m):h,p=m.plainObjects?Object.create(null):{},E=Object.keys(v),S=0;S<E.length;++S){var w=E[S],g=f(w,v[w],m,typeof h=="string");p=n.merge(p,g,m)}return m.allowSparse===!0?p:n.compact(p)},parse$1}var lib,hasRequiredLib;function requireLib(){if(hasRequiredLib)return lib;hasRequiredLib=1;var n=requireStringify(),e=requireParse(),t=requireFormats();return lib={formats:t,parse:e,stringify:n},lib}var libExports=requireLib();const qs=getDefaultExportFromCjs(libExports);class GudHubHttpsService{constructor(e){this.root=e,this.requestPromises=[]}init(e){this.getToken=e}async get(e){const t=await this.getToken(),r=this.getHashCode(e);if(this.requestPromises[r])return this.requestPromises[r].promise;const i=new Promise((a,s)=>{let l;e.externalResource?l=e.url:(l=this.root+e.url,l="".concat(l).concat(/\?/.test(l)?"&":"?","token=").concat(t).concat(convertObjToUrlParams(e.params))),axios.get(l,{validateStatus:function(u){return u<400}}).then(function(u){u.status!=200&&console.error("GUDHUB HTTP SERVICE: GET ERROR: ".concat(u.status),u),a(u.data)}).catch(function(u){console.error("GUDHUB HTTP SERVICE: GET ERROR: ".concat(u.response.status,`
|
|
6
6
|
`),u),console.log("Request message: ",e),u.response&&u.response.data&&console.log("Error response data: ",u.response.data),s(u)})});return this.pushPromise(i,r),i}async post(e){const t=this.getHashCode(e);if(e.form.token=await this.getToken(),this.requestPromises[t])return this.requestPromises[t].promise;const r=new Promise((i,a)=>{axios.post(this.root+e.url,qs.stringify(e.form),{maxBodyLength:1/0,headers:e.headers||{"Content-Type":"application/x-www-form-urlencoded"},validateStatus:function(s){return s<400}}).then(function(s){s.status!=200&&console.error("GUDHUB HTTP SERVICE: POST ERROR: ".concat(s.status),s),i(s.data)}).catch(function(s){console.error("GUDHUB HTTP SERVICE: POST ERROR: ".concat(s.response.status,`
|
|
7
|
-
`),s),console.log("Request message: ",e),a(s)})});return this.pushPromise(r,t),r}axiosRequest(e){const t=this.getHashCode(e);if(this.requestPromises[t])return this.requestPromises[t].promise;let r=e.method?e.method.toLowerCase():"get",i=e.url,a=e.headers||{};e.form&&(a["Content-Type"]="application/x-www-form-urlencoded");const s=new Promise(async(l,u)=>{try{const{data:o}=await axios[r](i,r==="post"?qs.stringify(e.form)||e.body:{headers:a},r==="post"?{headers:a}:{});l(o)}catch(o){console.log("ERROR -> GUDHUB HTTP SERVICE -> SIMPLE POST :",o.message),console.log("Request message: ",e),u(o)}});return this.pushPromise(s,t),s}pushPromise(e,t){this.requestPromises[t]={promise:e,hesh:t,callback:e.then(()=>{this.destroyPromise(t)}).catch(r=>{this.destroyPromise(t)})}}destroyPromise(e){this.requestPromises=this.requestPromises.filter(t=>t.hesh!==e)}getHashCode(e){let t=0,r=qs.stringify(e);if(r.length==0)return t;for(let i=0;i<r.length;i++){let a=r.charCodeAt(i);t=(t<<5)-t+a,t=t&t}return"h"+t}}function createId(n){let e="";for(let t in n)n.hasOwnProperty(t)&&n[t]&&(e+="."+n[t]);return e?e.substring(1):"any"}function checkParams(n,e,t){return n==null||typeof n!="string"?(console.log(`Listener type is "undefined" or not have actual 'type' for subscribe`),!1):e==null||typeof e!="object"?(console.log(`Listener destination is "undefined" or not have actual 'type' for subscribe`),!1):typeof t!="function"?(console.log("Listener is not a function for subscribe!"),!1):!0}class PipeService{constructor(){this.subscribers={},this.messageBox={}}on(e,t,r){return checkParams(e,t,r)&&e.split(" ").map(i=>i+":"+createId(t)).forEach(i=>{this.subscribers[i]||(this.subscribers[i]=new Set),this.subscribers[i].add(r),this.checkMessageBox(i)}),this}emit(e,t,r,i){return e.split(" ").forEach(a=>{const s=a+":"+createId(t);let l=!1;if(this.subscribers[s]){if(this.subscribers[s].size==0)return this.messageBox[s]=[e,t,r,i,l],this;this.subscribers[s].forEach(function(u){u(null,r,i)})}else this.messageBox[s]=[e,t,r,i,l]}),this}onRoot(e,t,r){return this.on(e,t,r)}destroy(e,t,r){return e.split(" ").forEach(i=>{const a=i+":"+createId(t);this.subscribers[a]&&r&&this.subscribers[a].delete(r),this.subscribers[a]&&!r&&delete this.subscribers[a]}),this}checkMessageBox(e){this.cleanMesssageBox(),this.messageBox[e]&&setTimeout(()=>{this.messageBox[e]&&(this.emit(...this.messageBox[e]),this.messageBox[e][4]=!0)},0)}cleanMesssageBox(){for(let e in this.messageBox)this.messageBox[e][4]&&delete this.messageBox[e]}}var es_object_keys={},globalThis_1,hasRequiredGlobalThis;function requireGlobalThis(){if(hasRequiredGlobalThis)return globalThis_1;hasRequiredGlobalThis=1;var n=function(e){return e&&e.Math===Math&&e};return globalThis_1=n(typeof globalThis=="object"&&globalThis)||n(typeof window=="object"&&window)||n(typeof self=="object"&&self)||n(typeof commonjsGlobal=="object"&&commonjsGlobal)||n(typeof globalThis_1=="object"&&globalThis_1)||function(){return this}()||Function("return this")(),globalThis_1}var fails,hasRequiredFails;function requireFails(){return hasRequiredFails||(hasRequiredFails=1,fails=function(n){try{return!!n()}catch{return!0}}),fails}var functionBindNative,hasRequiredFunctionBindNative;function requireFunctionBindNative(){if(hasRequiredFunctionBindNative)return functionBindNative;hasRequiredFunctionBindNative=1;var n=requireFails();return functionBindNative=!n(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),functionBindNative}var functionApply,hasRequiredFunctionApply;function requireFunctionApply(){if(hasRequiredFunctionApply)return functionApply;hasRequiredFunctionApply=1;var n=requireFunctionBindNative(),e=Function.prototype,t=e.apply,r=e.call;return functionApply=typeof Reflect=="object"&&Reflect.apply||(n?r.bind(t):function(){return r.apply(t,arguments)}),functionApply}var functionUncurryThis,hasRequiredFunctionUncurryThis;function requireFunctionUncurryThis(){if(hasRequiredFunctionUncurryThis)return functionUncurryThis;hasRequiredFunctionUncurryThis=1;var n=requireFunctionBindNative(),e=Function.prototype,t=e.call,r=n&&e.bind.bind(t,t);return functionUncurryThis=n?r:function(i){return function(){return t.apply(i,arguments)}},functionUncurryThis}var classofRaw,hasRequiredClassofRaw;function requireClassofRaw(){if(hasRequiredClassofRaw)return classofRaw;hasRequiredClassofRaw=1;var n=requireFunctionUncurryThis(),e=n({}.toString),t=n("".slice);return classofRaw=function(r){return t(e(r),8,-1)},classofRaw}var functionUncurryThisClause,hasRequiredFunctionUncurryThisClause;function requireFunctionUncurryThisClause(){if(hasRequiredFunctionUncurryThisClause)return functionUncurryThisClause;hasRequiredFunctionUncurryThisClause=1;var n=requireClassofRaw(),e=requireFunctionUncurryThis();return functionUncurryThisClause=function(t){if(n(t)==="Function")return e(t)},functionUncurryThisClause}var isCallable,hasRequiredIsCallable;function requireIsCallable(){if(hasRequiredIsCallable)return isCallable;hasRequiredIsCallable=1;var n=typeof document=="object"&&document.all;return isCallable=typeof n>"u"&&n!==void 0?function(e){return typeof e=="function"||e===n}:function(e){return typeof e=="function"},isCallable}var objectGetOwnPropertyDescriptor={},descriptors,hasRequiredDescriptors;function requireDescriptors(){if(hasRequiredDescriptors)return descriptors;hasRequiredDescriptors=1;var n=requireFails();return descriptors=!n(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),descriptors}var functionCall,hasRequiredFunctionCall;function requireFunctionCall(){if(hasRequiredFunctionCall)return functionCall;hasRequiredFunctionCall=1;var n=requireFunctionBindNative(),e=Function.prototype.call;return functionCall=n?e.bind(e):function(){return e.apply(e,arguments)},functionCall}var objectPropertyIsEnumerable={},hasRequiredObjectPropertyIsEnumerable;function requireObjectPropertyIsEnumerable(){if(hasRequiredObjectPropertyIsEnumerable)return objectPropertyIsEnumerable;hasRequiredObjectPropertyIsEnumerable=1;var n={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,t=e&&!n.call({1:2},1);return objectPropertyIsEnumerable.f=t?function(i){var a=e(this,i);return!!a&&a.enumerable}:n,objectPropertyIsEnumerable}var createPropertyDescriptor,hasRequiredCreatePropertyDescriptor;function requireCreatePropertyDescriptor(){return hasRequiredCreatePropertyDescriptor||(hasRequiredCreatePropertyDescriptor=1,createPropertyDescriptor=function(n,e){return{enumerable:!(n&1),configurable:!(n&2),writable:!(n&4),value:e}}),createPropertyDescriptor}var indexedObject,hasRequiredIndexedObject;function requireIndexedObject(){if(hasRequiredIndexedObject)return indexedObject;hasRequiredIndexedObject=1;var n=requireFunctionUncurryThis(),e=requireFails(),t=requireClassofRaw(),r=Object,i=n("".split);return indexedObject=e(function(){return!r("z").propertyIsEnumerable(0)})?function(a){return t(a)==="String"?i(a,""):r(a)}:r,indexedObject}var isNullOrUndefined,hasRequiredIsNullOrUndefined;function requireIsNullOrUndefined(){return hasRequiredIsNullOrUndefined||(hasRequiredIsNullOrUndefined=1,isNullOrUndefined=function(n){return n==null}),isNullOrUndefined}var requireObjectCoercible,hasRequiredRequireObjectCoercible;function requireRequireObjectCoercible(){if(hasRequiredRequireObjectCoercible)return requireObjectCoercible;hasRequiredRequireObjectCoercible=1;var n=requireIsNullOrUndefined(),e=TypeError;return requireObjectCoercible=function(t){if(n(t))throw new e("Can't call method on "+t);return t},requireObjectCoercible}var toIndexedObject,hasRequiredToIndexedObject;function requireToIndexedObject(){if(hasRequiredToIndexedObject)return toIndexedObject;hasRequiredToIndexedObject=1;var n=requireIndexedObject(),e=requireRequireObjectCoercible();return toIndexedObject=function(t){return n(e(t))},toIndexedObject}var isObject$1,hasRequiredIsObject;function requireIsObject(){if(hasRequiredIsObject)return isObject$1;hasRequiredIsObject=1;var n=requireIsCallable();return isObject$1=function(e){return typeof e=="object"?e!==null:n(e)},isObject$1}var path,hasRequiredPath;function requirePath(){return hasRequiredPath||(hasRequiredPath=1,path={}),path}var getBuiltIn,hasRequiredGetBuiltIn;function requireGetBuiltIn(){if(hasRequiredGetBuiltIn)return getBuiltIn;hasRequiredGetBuiltIn=1;var n=requirePath(),e=requireGlobalThis(),t=requireIsCallable(),r=function(i){return t(i)?i:void 0};return getBuiltIn=function(i,a){return arguments.length<2?r(n[i])||r(e[i]):n[i]&&n[i][a]||e[i]&&e[i][a]},getBuiltIn}var objectIsPrototypeOf,hasRequiredObjectIsPrototypeOf;function requireObjectIsPrototypeOf(){if(hasRequiredObjectIsPrototypeOf)return objectIsPrototypeOf;hasRequiredObjectIsPrototypeOf=1;var n=requireFunctionUncurryThis();return objectIsPrototypeOf=n({}.isPrototypeOf),objectIsPrototypeOf}var environmentUserAgent,hasRequiredEnvironmentUserAgent;function requireEnvironmentUserAgent(){if(hasRequiredEnvironmentUserAgent)return environmentUserAgent;hasRequiredEnvironmentUserAgent=1;var n=requireGlobalThis(),e=n.navigator,t=e&&e.userAgent;return environmentUserAgent=t?String(t):"",environmentUserAgent}var environmentV8Version,hasRequiredEnvironmentV8Version;function requireEnvironmentV8Version(){if(hasRequiredEnvironmentV8Version)return environmentV8Version;hasRequiredEnvironmentV8Version=1;var n=requireGlobalThis(),e=requireEnvironmentUserAgent(),t=n.process,r=n.Deno,i=t&&t.versions||r&&r.version,a=i&&i.v8,s,l;return a&&(s=a.split("."),l=s[0]>0&&s[0]<4?1:+(s[0]+s[1])),!l&&e&&(s=e.match(/Edge\/(\d+)/),(!s||s[1]>=74)&&(s=e.match(/Chrome\/(\d+)/),s&&(l=+s[1]))),environmentV8Version=l,environmentV8Version}var symbolConstructorDetection,hasRequiredSymbolConstructorDetection;function requireSymbolConstructorDetection(){if(hasRequiredSymbolConstructorDetection)return symbolConstructorDetection;hasRequiredSymbolConstructorDetection=1;var n=requireEnvironmentV8Version(),e=requireFails(),t=requireGlobalThis(),r=t.String;return symbolConstructorDetection=!!Object.getOwnPropertySymbols&&!e(function(){var i=Symbol("symbol detection");return!r(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&n&&n<41}),symbolConstructorDetection}var useSymbolAsUid,hasRequiredUseSymbolAsUid;function requireUseSymbolAsUid(){if(hasRequiredUseSymbolAsUid)return useSymbolAsUid;hasRequiredUseSymbolAsUid=1;var n=requireSymbolConstructorDetection();return useSymbolAsUid=n&&!Symbol.sham&&typeof Symbol.iterator=="symbol",useSymbolAsUid}var isSymbol,hasRequiredIsSymbol;function requireIsSymbol(){if(hasRequiredIsSymbol)return isSymbol;hasRequiredIsSymbol=1;var n=requireGetBuiltIn(),e=requireIsCallable(),t=requireObjectIsPrototypeOf(),r=requireUseSymbolAsUid(),i=Object;return isSymbol=r?function(a){return typeof a=="symbol"}:function(a){var s=n("Symbol");return e(s)&&t(s.prototype,i(a))},isSymbol}var tryToString,hasRequiredTryToString;function requireTryToString(){if(hasRequiredTryToString)return tryToString;hasRequiredTryToString=1;var n=String;return tryToString=function(e){try{return n(e)}catch{return"Object"}},tryToString}var aCallable,hasRequiredACallable;function requireACallable(){if(hasRequiredACallable)return aCallable;hasRequiredACallable=1;var n=requireIsCallable(),e=requireTryToString(),t=TypeError;return aCallable=function(r){if(n(r))return r;throw new t(e(r)+" is not a function")},aCallable}var getMethod,hasRequiredGetMethod;function requireGetMethod(){if(hasRequiredGetMethod)return getMethod;hasRequiredGetMethod=1;var n=requireACallable(),e=requireIsNullOrUndefined();return getMethod=function(t,r){var i=t[r];return e(i)?void 0:n(i)},getMethod}var ordinaryToPrimitive,hasRequiredOrdinaryToPrimitive;function requireOrdinaryToPrimitive(){if(hasRequiredOrdinaryToPrimitive)return ordinaryToPrimitive;hasRequiredOrdinaryToPrimitive=1;var n=requireFunctionCall(),e=requireIsCallable(),t=requireIsObject(),r=TypeError;return ordinaryToPrimitive=function(i,a){var s,l;if(a==="string"&&e(s=i.toString)&&!t(l=n(s,i))||e(s=i.valueOf)&&!t(l=n(s,i))||a!=="string"&&e(s=i.toString)&&!t(l=n(s,i)))return l;throw new r("Can't convert object to primitive value")},ordinaryToPrimitive}var sharedStore={exports:{}},isPure,hasRequiredIsPure;function requireIsPure(){return hasRequiredIsPure||(hasRequiredIsPure=1,isPure=!0),isPure}var defineGlobalProperty,hasRequiredDefineGlobalProperty;function requireDefineGlobalProperty(){if(hasRequiredDefineGlobalProperty)return defineGlobalProperty;hasRequiredDefineGlobalProperty=1;var n=requireGlobalThis(),e=Object.defineProperty;return defineGlobalProperty=function(t,r){try{e(n,t,{value:r,configurable:!0,writable:!0})}catch{n[t]=r}return r},defineGlobalProperty}var hasRequiredSharedStore;function requireSharedStore(){if(hasRequiredSharedStore)return sharedStore.exports;hasRequiredSharedStore=1;var n=requireIsPure(),e=requireGlobalThis(),t=requireDefineGlobalProperty(),r="__core-js_shared__",i=sharedStore.exports=e[r]||t(r,{});return(i.versions||(i.versions=[])).push({version:"3.40.0",mode:n?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.40.0/LICENSE",source:"https://github.com/zloirock/core-js"}),sharedStore.exports}var shared,hasRequiredShared;function requireShared(){if(hasRequiredShared)return shared;hasRequiredShared=1;var n=requireSharedStore();return shared=function(e,t){return n[e]||(n[e]=t||{})},shared}var toObject,hasRequiredToObject;function requireToObject(){if(hasRequiredToObject)return toObject;hasRequiredToObject=1;var n=requireRequireObjectCoercible(),e=Object;return toObject=function(t){return e(n(t))},toObject}var hasOwnProperty_1,hasRequiredHasOwnProperty;function requireHasOwnProperty(){if(hasRequiredHasOwnProperty)return hasOwnProperty_1;hasRequiredHasOwnProperty=1;var n=requireFunctionUncurryThis(),e=requireToObject(),t=n({}.hasOwnProperty);return hasOwnProperty_1=Object.hasOwn||function(i,a){return t(e(i),a)},hasOwnProperty_1}var uid,hasRequiredUid;function requireUid(){if(hasRequiredUid)return uid;hasRequiredUid=1;var n=requireFunctionUncurryThis(),e=0,t=Math.random(),r=n(1 .toString);return uid=function(i){return"Symbol("+(i===void 0?"":i)+")_"+r(++e+t,36)},uid}var wellKnownSymbol,hasRequiredWellKnownSymbol;function requireWellKnownSymbol(){if(hasRequiredWellKnownSymbol)return wellKnownSymbol;hasRequiredWellKnownSymbol=1;var n=requireGlobalThis(),e=requireShared(),t=requireHasOwnProperty(),r=requireUid(),i=requireSymbolConstructorDetection(),a=requireUseSymbolAsUid(),s=n.Symbol,l=e("wks"),u=a?s.for||s:s&&s.withoutSetter||r;return wellKnownSymbol=function(o){return t(l,o)||(l[o]=i&&t(s,o)?s[o]:u("Symbol."+o)),l[o]},wellKnownSymbol}var toPrimitive$6,hasRequiredToPrimitive$5;function requireToPrimitive$5(){if(hasRequiredToPrimitive$5)return toPrimitive$6;hasRequiredToPrimitive$5=1;var n=requireFunctionCall(),e=requireIsObject(),t=requireIsSymbol(),r=requireGetMethod(),i=requireOrdinaryToPrimitive(),a=requireWellKnownSymbol(),s=TypeError,l=a("toPrimitive");return toPrimitive$6=function(u,o){if(!e(u)||t(u))return u;var f=r(u,l),d;if(f){if(o===void 0&&(o="default"),d=n(f,u,o),!e(d)||t(d))return d;throw new s("Can't convert object to primitive value")}return o===void 0&&(o="number"),i(u,o)},toPrimitive$6}var toPropertyKey$1,hasRequiredToPropertyKey;function requireToPropertyKey(){if(hasRequiredToPropertyKey)return toPropertyKey$1;hasRequiredToPropertyKey=1;var n=requireToPrimitive$5(),e=requireIsSymbol();return toPropertyKey$1=function(t){var r=n(t,"string");return e(r)?r:r+""},toPropertyKey$1}var documentCreateElement,hasRequiredDocumentCreateElement;function requireDocumentCreateElement(){if(hasRequiredDocumentCreateElement)return documentCreateElement;hasRequiredDocumentCreateElement=1;var n=requireGlobalThis(),e=requireIsObject(),t=n.document,r=e(t)&&e(t.createElement);return documentCreateElement=function(i){return r?t.createElement(i):{}},documentCreateElement}var ie8DomDefine,hasRequiredIe8DomDefine;function requireIe8DomDefine(){if(hasRequiredIe8DomDefine)return ie8DomDefine;hasRequiredIe8DomDefine=1;var n=requireDescriptors(),e=requireFails(),t=requireDocumentCreateElement();return ie8DomDefine=!n&&!e(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),ie8DomDefine}var hasRequiredObjectGetOwnPropertyDescriptor;function requireObjectGetOwnPropertyDescriptor(){if(hasRequiredObjectGetOwnPropertyDescriptor)return objectGetOwnPropertyDescriptor;hasRequiredObjectGetOwnPropertyDescriptor=1;var n=requireDescriptors(),e=requireFunctionCall(),t=requireObjectPropertyIsEnumerable(),r=requireCreatePropertyDescriptor(),i=requireToIndexedObject(),a=requireToPropertyKey(),s=requireHasOwnProperty(),l=requireIe8DomDefine(),u=Object.getOwnPropertyDescriptor;return objectGetOwnPropertyDescriptor.f=n?u:function(f,d){if(f=i(f),d=a(d),l)try{return u(f,d)}catch{}if(s(f,d))return r(!e(t.f,f,d),f[d])},objectGetOwnPropertyDescriptor}var isForced_1,hasRequiredIsForced;function requireIsForced(){if(hasRequiredIsForced)return isForced_1;hasRequiredIsForced=1;var n=requireFails(),e=requireIsCallable(),t=/#|\.prototype\./,r=function(u,o){var f=a[i(u)];return f===l?!0:f===s?!1:e(o)?n(o):!!o},i=r.normalize=function(u){return String(u).replace(t,".").toLowerCase()},a=r.data={},s=r.NATIVE="N",l=r.POLYFILL="P";return isForced_1=r,isForced_1}var functionBindContext,hasRequiredFunctionBindContext;function requireFunctionBindContext(){if(hasRequiredFunctionBindContext)return functionBindContext;hasRequiredFunctionBindContext=1;var n=requireFunctionUncurryThisClause(),e=requireACallable(),t=requireFunctionBindNative(),r=n(n.bind);return functionBindContext=function(i,a){return e(i),a===void 0?i:t?r(i,a):function(){return i.apply(a,arguments)}},functionBindContext}var objectDefineProperty={},v8PrototypeDefineBug,hasRequiredV8PrototypeDefineBug;function requireV8PrototypeDefineBug(){if(hasRequiredV8PrototypeDefineBug)return v8PrototypeDefineBug;hasRequiredV8PrototypeDefineBug=1;var n=requireDescriptors(),e=requireFails();return v8PrototypeDefineBug=n&&e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),v8PrototypeDefineBug}var anObject,hasRequiredAnObject;function requireAnObject(){if(hasRequiredAnObject)return anObject;hasRequiredAnObject=1;var n=requireIsObject(),e=String,t=TypeError;return anObject=function(r){if(n(r))return r;throw new t(e(r)+" is not an object")},anObject}var hasRequiredObjectDefineProperty;function requireObjectDefineProperty(){if(hasRequiredObjectDefineProperty)return objectDefineProperty;hasRequiredObjectDefineProperty=1;var n=requireDescriptors(),e=requireIe8DomDefine(),t=requireV8PrototypeDefineBug(),r=requireAnObject(),i=requireToPropertyKey(),a=TypeError,s=Object.defineProperty,l=Object.getOwnPropertyDescriptor,u="enumerable",o="configurable",f="writable";return objectDefineProperty.f=n?t?function(h,y,m){if(r(h),y=i(y),r(m),typeof h=="function"&&y==="prototype"&&"value"in m&&f in m&&!m[f]){var v=l(h,y);v&&v[f]&&(h[y]=m.value,m={configurable:o in m?m[o]:v[o],enumerable:u in m?m[u]:v[u],writable:!1})}return s(h,y,m)}:s:function(h,y,m){if(r(h),y=i(y),r(m),e)try{return s(h,y,m)}catch{}if("get"in m||"set"in m)throw new a("Accessors not supported");return"value"in m&&(h[y]=m.value),h},objectDefineProperty}var createNonEnumerableProperty,hasRequiredCreateNonEnumerableProperty;function requireCreateNonEnumerableProperty(){if(hasRequiredCreateNonEnumerableProperty)return createNonEnumerableProperty;hasRequiredCreateNonEnumerableProperty=1;var n=requireDescriptors(),e=requireObjectDefineProperty(),t=requireCreatePropertyDescriptor();return createNonEnumerableProperty=n?function(r,i,a){return e.f(r,i,t(1,a))}:function(r,i,a){return r[i]=a,r},createNonEnumerableProperty}var _export,hasRequired_export;function require_export(){if(hasRequired_export)return _export;hasRequired_export=1;var n=requireGlobalThis(),e=requireFunctionApply(),t=requireFunctionUncurryThisClause(),r=requireIsCallable(),i=requireObjectGetOwnPropertyDescriptor().f,a=requireIsForced(),s=requirePath(),l=requireFunctionBindContext(),u=requireCreateNonEnumerableProperty(),o=requireHasOwnProperty(),f=function(d){var h=function(y,m,v){if(this instanceof h){switch(arguments.length){case 0:return new d;case 1:return new d(y);case 2:return new d(y,m)}return new d(y,m,v)}return e(d,this,arguments)};return h.prototype=d.prototype,h};return _export=function(d,h){var y=d.target,m=d.global,v=d.stat,p=d.proto,E=m?n:v?n[y]:n[y]&&n[y].prototype,S=m?s:s[y]||u(s,y,{})[y],w=S.prototype,g,b,A,q,x,D,j,F,N;for(q in h)g=a(m?q:y+(v?".":"#")+q,d.forced),b=!g&&E&&o(E,q),D=S[q],b&&(d.dontCallGetSet?(N=i(E,q),j=N&&N.value):j=E[q]),x=b&&j?j:h[q],!(!g&&!p&&typeof D==typeof x)&&(d.bind&&b?F=l(x,n):d.wrap&&b?F=f(x):p&&r(x)?F=t(x):F=x,(d.sham||x&&x.sham||D&&D.sham)&&u(F,"sham",!0),u(S,q,F),p&&(A=y+"Prototype",o(s,A)||u(s,A,{}),u(s[A],q,x),d.real&&w&&(g||!w[q])&&u(w,q,x)))},_export}var mathTrunc,hasRequiredMathTrunc;function requireMathTrunc(){if(hasRequiredMathTrunc)return mathTrunc;hasRequiredMathTrunc=1;var n=Math.ceil,e=Math.floor;return mathTrunc=Math.trunc||function(r){var i=+r;return(i>0?e:n)(i)},mathTrunc}var toIntegerOrInfinity,hasRequiredToIntegerOrInfinity;function requireToIntegerOrInfinity(){if(hasRequiredToIntegerOrInfinity)return toIntegerOrInfinity;hasRequiredToIntegerOrInfinity=1;var n=requireMathTrunc();return toIntegerOrInfinity=function(e){var t=+e;return t!==t||t===0?0:n(t)},toIntegerOrInfinity}var toAbsoluteIndex,hasRequiredToAbsoluteIndex;function requireToAbsoluteIndex(){if(hasRequiredToAbsoluteIndex)return toAbsoluteIndex;hasRequiredToAbsoluteIndex=1;var n=requireToIntegerOrInfinity(),e=Math.max,t=Math.min;return toAbsoluteIndex=function(r,i){var a=n(r);return a<0?e(a+i,0):t(a,i)},toAbsoluteIndex}var toLength,hasRequiredToLength;function requireToLength(){if(hasRequiredToLength)return toLength;hasRequiredToLength=1;var n=requireToIntegerOrInfinity(),e=Math.min;return toLength=function(t){var r=n(t);return r>0?e(r,9007199254740991):0},toLength}var lengthOfArrayLike,hasRequiredLengthOfArrayLike;function requireLengthOfArrayLike(){if(hasRequiredLengthOfArrayLike)return lengthOfArrayLike;hasRequiredLengthOfArrayLike=1;var n=requireToLength();return lengthOfArrayLike=function(e){return n(e.length)},lengthOfArrayLike}var arrayIncludes,hasRequiredArrayIncludes;function requireArrayIncludes(){if(hasRequiredArrayIncludes)return arrayIncludes;hasRequiredArrayIncludes=1;var n=requireToIndexedObject(),e=requireToAbsoluteIndex(),t=requireLengthOfArrayLike(),r=function(i){return function(a,s,l){var u=n(a),o=t(u);if(o===0)return!i&&-1;var f=e(l,o),d;if(i&&s!==s){for(;o>f;)if(d=u[f++],d!==d)return!0}else for(;o>f;f++)if((i||f in u)&&u[f]===s)return i||f||0;return!i&&-1}};return arrayIncludes={includes:r(!0),indexOf:r(!1)},arrayIncludes}var hiddenKeys,hasRequiredHiddenKeys;function requireHiddenKeys(){return hasRequiredHiddenKeys||(hasRequiredHiddenKeys=1,hiddenKeys={}),hiddenKeys}var objectKeysInternal,hasRequiredObjectKeysInternal;function requireObjectKeysInternal(){if(hasRequiredObjectKeysInternal)return objectKeysInternal;hasRequiredObjectKeysInternal=1;var n=requireFunctionUncurryThis(),e=requireHasOwnProperty(),t=requireToIndexedObject(),r=requireArrayIncludes().indexOf,i=requireHiddenKeys(),a=n([].push);return objectKeysInternal=function(s,l){var u=t(s),o=0,f=[],d;for(d in u)!e(i,d)&&e(u,d)&&a(f,d);for(;l.length>o;)e(u,d=l[o++])&&(~r(f,d)||a(f,d));return f},objectKeysInternal}var enumBugKeys,hasRequiredEnumBugKeys;function requireEnumBugKeys(){return hasRequiredEnumBugKeys||(hasRequiredEnumBugKeys=1,enumBugKeys=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),enumBugKeys}var objectKeys,hasRequiredObjectKeys;function requireObjectKeys(){if(hasRequiredObjectKeys)return objectKeys;hasRequiredObjectKeys=1;var n=requireObjectKeysInternal(),e=requireEnumBugKeys();return objectKeys=Object.keys||function(r){return n(r,e)},objectKeys}var hasRequiredEs_object_keys;function requireEs_object_keys(){if(hasRequiredEs_object_keys)return es_object_keys;hasRequiredEs_object_keys=1;var n=require_export(),e=requireToObject(),t=requireObjectKeys(),r=requireFails(),i=r(function(){t(1)});return n({target:"Object",stat:!0,forced:i},{keys:function(s){return t(e(s))}}),es_object_keys}var keys$4,hasRequiredKeys$4;function requireKeys$4(){if(hasRequiredKeys$4)return keys$4;hasRequiredKeys$4=1,requireEs_object_keys();var n=requirePath();return keys$4=n.Object.keys,keys$4}var keys$3,hasRequiredKeys$3;function requireKeys$3(){if(hasRequiredKeys$3)return keys$3;hasRequiredKeys$3=1;var n=requireKeys$4();return keys$3=n,keys$3}var keys$2,hasRequiredKeys$2;function requireKeys$2(){if(hasRequiredKeys$2)return keys$2;hasRequiredKeys$2=1;var n=requireKeys$3();return keys$2=n,keys$2}var keys$1,hasRequiredKeys$1;function requireKeys$1(){if(hasRequiredKeys$1)return keys$1;hasRequiredKeys$1=1;var n=requireKeys$2();return keys$1=n,keys$1}var keys,hasRequiredKeys;function requireKeys(){return hasRequiredKeys||(hasRequiredKeys=1,keys=requireKeys$1()),keys}var keysExports=requireKeys();const _Object$keys=getDefaultExportFromCjs(keysExports);var es_symbol={},es_symbol_constructor={},toStringTagSupport,hasRequiredToStringTagSupport;function requireToStringTagSupport(){if(hasRequiredToStringTagSupport)return toStringTagSupport;hasRequiredToStringTagSupport=1;var n=requireWellKnownSymbol(),e=n("toStringTag"),t={};return t[e]="z",toStringTagSupport=String(t)==="[object z]",toStringTagSupport}var classof,hasRequiredClassof;function requireClassof(){if(hasRequiredClassof)return classof;hasRequiredClassof=1;var n=requireToStringTagSupport(),e=requireIsCallable(),t=requireClassofRaw(),r=requireWellKnownSymbol(),i=r("toStringTag"),a=Object,s=t(function(){return arguments}())==="Arguments",l=function(u,o){try{return u[o]}catch{}};return classof=n?t:function(u){var o,f,d;return u===void 0?"Undefined":u===null?"Null":typeof(f=l(o=a(u),i))=="string"?f:s?t(o):(d=t(o))==="Object"&&e(o.callee)?"Arguments":d},classof}var toString$1,hasRequiredToString;function requireToString(){if(hasRequiredToString)return toString$1;hasRequiredToString=1;var n=requireClassof(),e=String;return toString$1=function(t){if(n(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return e(t)},toString$1}var objectDefineProperties={},hasRequiredObjectDefineProperties;function requireObjectDefineProperties(){if(hasRequiredObjectDefineProperties)return objectDefineProperties;hasRequiredObjectDefineProperties=1;var n=requireDescriptors(),e=requireV8PrototypeDefineBug(),t=requireObjectDefineProperty(),r=requireAnObject(),i=requireToIndexedObject(),a=requireObjectKeys();return objectDefineProperties.f=n&&!e?Object.defineProperties:function(l,u){r(l);for(var o=i(u),f=a(u),d=f.length,h=0,y;d>h;)t.f(l,y=f[h++],o[y]);return l},objectDefineProperties}var html,hasRequiredHtml;function requireHtml(){if(hasRequiredHtml)return html;hasRequiredHtml=1;var n=requireGetBuiltIn();return html=n("document","documentElement"),html}var sharedKey,hasRequiredSharedKey;function requireSharedKey(){if(hasRequiredSharedKey)return sharedKey;hasRequiredSharedKey=1;var n=requireShared(),e=requireUid(),t=n("keys");return sharedKey=function(r){return t[r]||(t[r]=e(r))},sharedKey}var objectCreate,hasRequiredObjectCreate;function requireObjectCreate(){if(hasRequiredObjectCreate)return objectCreate;hasRequiredObjectCreate=1;var n=requireAnObject(),e=requireObjectDefineProperties(),t=requireEnumBugKeys(),r=requireHiddenKeys(),i=requireHtml(),a=requireDocumentCreateElement(),s=requireSharedKey(),l=">",u="<",o="prototype",f="script",d=s("IE_PROTO"),h=function(){},y=function(S){return u+f+l+S+u+"/"+f+l},m=function(S){S.write(y("")),S.close();var w=S.parentWindow.Object;return S=null,w},v=function(){var S=a("iframe"),w="java"+f+":",g;return S.style.display="none",i.appendChild(S),S.src=String(w),g=S.contentWindow.document,g.open(),g.write(y("document.F=Object")),g.close(),g.F},p,E=function(){try{p=new ActiveXObject("htmlfile")}catch{}E=typeof document<"u"?document.domain&&p?m(p):v():m(p);for(var S=t.length;S--;)delete E[o][t[S]];return E()};return r[d]=!0,objectCreate=Object.create||function(w,g){var b;return w!==null?(h[o]=n(w),b=new h,h[o]=null,b[d]=w):b=E(),g===void 0?b:e.f(b,g)},objectCreate}var objectGetOwnPropertyNames={},hasRequiredObjectGetOwnPropertyNames;function requireObjectGetOwnPropertyNames(){if(hasRequiredObjectGetOwnPropertyNames)return objectGetOwnPropertyNames;hasRequiredObjectGetOwnPropertyNames=1;var n=requireObjectKeysInternal(),e=requireEnumBugKeys(),t=e.concat("length","prototype");return objectGetOwnPropertyNames.f=Object.getOwnPropertyNames||function(i){return n(i,t)},objectGetOwnPropertyNames}var objectGetOwnPropertyNamesExternal={},arraySlice,hasRequiredArraySlice;function requireArraySlice(){if(hasRequiredArraySlice)return arraySlice;hasRequiredArraySlice=1;var n=requireFunctionUncurryThis();return arraySlice=n([].slice),arraySlice}var hasRequiredObjectGetOwnPropertyNamesExternal;function requireObjectGetOwnPropertyNamesExternal(){if(hasRequiredObjectGetOwnPropertyNamesExternal)return objectGetOwnPropertyNamesExternal;hasRequiredObjectGetOwnPropertyNamesExternal=1;var n=requireClassofRaw(),e=requireToIndexedObject(),t=requireObjectGetOwnPropertyNames().f,r=requireArraySlice(),i=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(s){try{return t(s)}catch{return r(i)}};return objectGetOwnPropertyNamesExternal.f=function(l){return i&&n(l)==="Window"?a(l):t(e(l))},objectGetOwnPropertyNamesExternal}var objectGetOwnPropertySymbols={},hasRequiredObjectGetOwnPropertySymbols;function requireObjectGetOwnPropertySymbols(){return hasRequiredObjectGetOwnPropertySymbols||(hasRequiredObjectGetOwnPropertySymbols=1,objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols),objectGetOwnPropertySymbols}var defineBuiltIn,hasRequiredDefineBuiltIn;function requireDefineBuiltIn(){if(hasRequiredDefineBuiltIn)return defineBuiltIn;hasRequiredDefineBuiltIn=1;var n=requireCreateNonEnumerableProperty();return defineBuiltIn=function(e,t,r,i){return i&&i.enumerable?e[t]=r:n(e,t,r),e},defineBuiltIn}var defineBuiltInAccessor,hasRequiredDefineBuiltInAccessor;function requireDefineBuiltInAccessor(){if(hasRequiredDefineBuiltInAccessor)return defineBuiltInAccessor;hasRequiredDefineBuiltInAccessor=1;var n=requireObjectDefineProperty();return defineBuiltInAccessor=function(e,t,r){return n.f(e,t,r)},defineBuiltInAccessor}var wellKnownSymbolWrapped={},hasRequiredWellKnownSymbolWrapped;function requireWellKnownSymbolWrapped(){if(hasRequiredWellKnownSymbolWrapped)return wellKnownSymbolWrapped;hasRequiredWellKnownSymbolWrapped=1;var n=requireWellKnownSymbol();return wellKnownSymbolWrapped.f=n,wellKnownSymbolWrapped}var wellKnownSymbolDefine,hasRequiredWellKnownSymbolDefine;function requireWellKnownSymbolDefine(){if(hasRequiredWellKnownSymbolDefine)return wellKnownSymbolDefine;hasRequiredWellKnownSymbolDefine=1;var n=requirePath(),e=requireHasOwnProperty(),t=requireWellKnownSymbolWrapped(),r=requireObjectDefineProperty().f;return wellKnownSymbolDefine=function(i){var a=n.Symbol||(n.Symbol={});e(a,i)||r(a,i,{value:t.f(i)})},wellKnownSymbolDefine}var symbolDefineToPrimitive,hasRequiredSymbolDefineToPrimitive;function requireSymbolDefineToPrimitive(){if(hasRequiredSymbolDefineToPrimitive)return symbolDefineToPrimitive;hasRequiredSymbolDefineToPrimitive=1;var n=requireFunctionCall(),e=requireGetBuiltIn(),t=requireWellKnownSymbol(),r=requireDefineBuiltIn();return symbolDefineToPrimitive=function(){var i=e("Symbol"),a=i&&i.prototype,s=a&&a.valueOf,l=t("toPrimitive");a&&!a[l]&&r(a,l,function(u){return n(s,this)},{arity:1})},symbolDefineToPrimitive}var objectToString,hasRequiredObjectToString;function requireObjectToString(){if(hasRequiredObjectToString)return objectToString;hasRequiredObjectToString=1;var n=requireToStringTagSupport(),e=requireClassof();return objectToString=n?{}.toString:function(){return"[object "+e(this)+"]"},objectToString}var setToStringTag,hasRequiredSetToStringTag;function requireSetToStringTag(){if(hasRequiredSetToStringTag)return setToStringTag;hasRequiredSetToStringTag=1;var n=requireToStringTagSupport(),e=requireObjectDefineProperty().f,t=requireCreateNonEnumerableProperty(),r=requireHasOwnProperty(),i=requireObjectToString(),a=requireWellKnownSymbol(),s=a("toStringTag");return setToStringTag=function(l,u,o,f){var d=o?l:l&&l.prototype;d&&(r(d,s)||e(d,s,{configurable:!0,value:u}),f&&!n&&t(d,"toString",i))},setToStringTag}var weakMapBasicDetection,hasRequiredWeakMapBasicDetection;function requireWeakMapBasicDetection(){if(hasRequiredWeakMapBasicDetection)return weakMapBasicDetection;hasRequiredWeakMapBasicDetection=1;var n=requireGlobalThis(),e=requireIsCallable(),t=n.WeakMap;return weakMapBasicDetection=e(t)&&/native code/.test(String(t)),weakMapBasicDetection}var internalState,hasRequiredInternalState;function requireInternalState(){if(hasRequiredInternalState)return internalState;hasRequiredInternalState=1;var n=requireWeakMapBasicDetection(),e=requireGlobalThis(),t=requireIsObject(),r=requireCreateNonEnumerableProperty(),i=requireHasOwnProperty(),a=requireSharedStore(),s=requireSharedKey(),l=requireHiddenKeys(),u="Object already initialized",o=e.TypeError,f=e.WeakMap,d,h,y,m=function(S){return y(S)?h(S):d(S,{})},v=function(S){return function(w){var g;if(!t(w)||(g=h(w)).type!==S)throw new o("Incompatible receiver, "+S+" required");return g}};if(n||a.state){var p=a.state||(a.state=new f);p.get=p.get,p.has=p.has,p.set=p.set,d=function(S,w){if(p.has(S))throw new o(u);return w.facade=S,p.set(S,w),w},h=function(S){return p.get(S)||{}},y=function(S){return p.has(S)}}else{var E=s("state");l[E]=!0,d=function(S,w){if(i(S,E))throw new o(u);return w.facade=S,r(S,E,w),w},h=function(S){return i(S,E)?S[E]:{}},y=function(S){return i(S,E)}}return internalState={set:d,get:h,has:y,enforce:m,getterFor:v},internalState}var isArray$1,hasRequiredIsArray;function requireIsArray(){if(hasRequiredIsArray)return isArray$1;hasRequiredIsArray=1;var n=requireClassofRaw();return isArray$1=Array.isArray||function(t){return n(t)==="Array"},isArray$1}var inspectSource,hasRequiredInspectSource;function requireInspectSource(){if(hasRequiredInspectSource)return inspectSource;hasRequiredInspectSource=1;var n=requireFunctionUncurryThis(),e=requireIsCallable(),t=requireSharedStore(),r=n(Function.toString);return e(t.inspectSource)||(t.inspectSource=function(i){return r(i)}),inspectSource=t.inspectSource,inspectSource}var isConstructor,hasRequiredIsConstructor;function requireIsConstructor(){if(hasRequiredIsConstructor)return isConstructor;hasRequiredIsConstructor=1;var n=requireFunctionUncurryThis(),e=requireFails(),t=requireIsCallable(),r=requireClassof(),i=requireGetBuiltIn(),a=requireInspectSource(),s=function(){},l=i("Reflect","construct"),u=/^\s*(?:class|function)\b/,o=n(u.exec),f=!u.test(s),d=function(m){if(!t(m))return!1;try{return l(s,[],m),!0}catch{return!1}},h=function(m){if(!t(m))return!1;switch(r(m)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return f||!!o(u,a(m))}catch{return!0}};return h.sham=!0,isConstructor=!l||e(function(){var y;return d(d.call)||!d(Object)||!d(function(){y=!0})||y})?h:d,isConstructor}var arraySpeciesConstructor,hasRequiredArraySpeciesConstructor;function requireArraySpeciesConstructor(){if(hasRequiredArraySpeciesConstructor)return arraySpeciesConstructor;hasRequiredArraySpeciesConstructor=1;var n=requireIsArray(),e=requireIsConstructor(),t=requireIsObject(),r=requireWellKnownSymbol(),i=r("species"),a=Array;return arraySpeciesConstructor=function(s){var l;return n(s)&&(l=s.constructor,e(l)&&(l===a||n(l.prototype))?l=void 0:t(l)&&(l=l[i],l===null&&(l=void 0))),l===void 0?a:l},arraySpeciesConstructor}var arraySpeciesCreate,hasRequiredArraySpeciesCreate;function requireArraySpeciesCreate(){if(hasRequiredArraySpeciesCreate)return arraySpeciesCreate;hasRequiredArraySpeciesCreate=1;var n=requireArraySpeciesConstructor();return arraySpeciesCreate=function(e,t){return new(n(e))(t===0?0:t)},arraySpeciesCreate}var arrayIteration,hasRequiredArrayIteration;function requireArrayIteration(){if(hasRequiredArrayIteration)return arrayIteration;hasRequiredArrayIteration=1;var n=requireFunctionBindContext(),e=requireFunctionUncurryThis(),t=requireIndexedObject(),r=requireToObject(),i=requireLengthOfArrayLike(),a=requireArraySpeciesCreate(),s=e([].push),l=function(u){var o=u===1,f=u===2,d=u===3,h=u===4,y=u===6,m=u===7,v=u===5||y;return function(p,E,S,w){for(var g=r(p),b=t(g),A=i(b),q=n(E,S),x=0,D=w||a,j=o?D(p,A):f||m?D(p,0):void 0,F,N;A>x;x++)if((v||x in b)&&(F=b[x],N=q(F,x,g),u))if(o)j[x]=N;else if(N)switch(u){case 3:return!0;case 5:return F;case 6:return x;case 2:s(j,F)}else switch(u){case 4:return!1;case 7:s(j,F)}return y?-1:d||h?h:j}};return arrayIteration={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)},arrayIteration}var hasRequiredEs_symbol_constructor;function requireEs_symbol_constructor(){if(hasRequiredEs_symbol_constructor)return es_symbol_constructor;hasRequiredEs_symbol_constructor=1;var n=require_export(),e=requireGlobalThis(),t=requireFunctionCall(),r=requireFunctionUncurryThis(),i=requireIsPure(),a=requireDescriptors(),s=requireSymbolConstructorDetection(),l=requireFails(),u=requireHasOwnProperty(),o=requireObjectIsPrototypeOf(),f=requireAnObject(),d=requireToIndexedObject(),h=requireToPropertyKey(),y=requireToString(),m=requireCreatePropertyDescriptor(),v=requireObjectCreate(),p=requireObjectKeys(),E=requireObjectGetOwnPropertyNames(),S=requireObjectGetOwnPropertyNamesExternal(),w=requireObjectGetOwnPropertySymbols(),g=requireObjectGetOwnPropertyDescriptor(),b=requireObjectDefineProperty(),A=requireObjectDefineProperties(),q=requireObjectPropertyIsEnumerable(),x=requireDefineBuiltIn(),D=requireDefineBuiltInAccessor(),j=requireShared(),F=requireSharedKey(),N=requireHiddenKeys(),B=requireUid(),U=requireWellKnownSymbol(),H=requireWellKnownSymbolWrapped(),z=requireWellKnownSymbolDefine(),K=requireSymbolDefineToPrimitive(),W=requireSetToStringTag(),te=requireInternalState(),Z=requireArrayIteration().forEach,V=F("hidden"),pe="Symbol",C="prototype",k=te.set,$=te.getterFor(pe),Y=Object[C],se=e.Symbol,X=se&&se[C],ne=e.RangeError,ue=e.TypeError,le=e.QObject,me=g.f,ve=b.f,Se=S.f,be=q.f,Te=r([].push),ye=j("symbols"),Fe=j("op-symbols"),ze=j("wks"),je=!le||!le[C]||!le[C].findChild,Be=function(Q,M,O){var P=me(Y,M);P&&delete Y[M],ve(Q,M,O),P&&Q!==Y&&ve(Y,M,P)},ie=a&&l(function(){return v(ve({},"a",{get:function(){return ve(this,"a",{value:7}).a}})).a!==7})?Be:ve,Me=function(Q,M){var O=ye[Q]=v(X);return k(O,{type:pe,tag:Q,description:M}),a||(O.description=M),O},Oe=function(M,O,P){M===Y&&Oe(Fe,O,P),f(M);var G=h(O);return f(P),u(ye,G)?(P.enumerable?(u(M,V)&&M[V][G]&&(M[V][G]=!1),P=v(P,{enumerable:m(0,!1)})):(u(M,V)||ve(M,V,m(1,v(null))),M[V][G]=!0),ie(M,G,P)):ve(M,G,P)},Le=function(M,O){f(M);var P=d(O),G=p(P).concat(J(P));return Z(G,function(re){(!a||t(ee,P,re))&&Oe(M,re,P[re])}),M},Ie=function(M,O){return O===void 0?v(M):Le(v(M),O)},ee=function(M){var O=h(M),P=t(be,this,O);return this===Y&&u(ye,O)&&!u(Fe,O)?!1:P||!u(this,O)||!u(ye,O)||u(this,V)&&this[V][O]?P:!0},ce=function(M,O){var P=d(M),G=h(O);if(!(P===Y&&u(ye,G)&&!u(Fe,G))){var re=me(P,G);return re&&u(ye,G)&&!(u(P,V)&&P[V][G])&&(re.enumerable=!0),re}},we=function(M){var O=Se(d(M)),P=[];return Z(O,function(G){!u(ye,G)&&!u(N,G)&&Te(P,G)}),P},J=function(Q){var M=Q===Y,O=Se(M?Fe:d(Q)),P=[];return Z(O,function(G){u(ye,G)&&(!M||u(Y,G))&&Te(P,ye[G])}),P};return s||(se=function(){if(o(X,this))throw new ue("Symbol is not a constructor");var M=!arguments.length||arguments[0]===void 0?void 0:y(arguments[0]),O=B(M),P=function(G){var re=this===void 0?e:this;re===Y&&t(P,Fe,G),u(re,V)&&u(re[V],O)&&(re[V][O]=!1);var fe=m(1,G);try{ie(re,O,fe)}catch(ae){if(!(ae instanceof ne))throw ae;Be(re,O,fe)}};return a&&je&&ie(Y,O,{configurable:!0,set:P}),Me(O,M)},X=se[C],x(X,"toString",function(){return $(this).tag}),x(se,"withoutSetter",function(Q){return Me(B(Q),Q)}),q.f=ee,b.f=Oe,A.f=Le,g.f=ce,E.f=S.f=we,w.f=J,H.f=function(Q){return Me(U(Q),Q)},a&&(D(X,"description",{configurable:!0,get:function(){return $(this).description}}),i||x(Y,"propertyIsEnumerable",ee,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!s,sham:!s},{Symbol:se}),Z(p(ze),function(Q){z(Q)}),n({target:pe,stat:!0,forced:!s},{useSetter:function(){je=!0},useSimple:function(){je=!1}}),n({target:"Object",stat:!0,forced:!s,sham:!a},{create:Ie,defineProperty:Oe,defineProperties:Le,getOwnPropertyDescriptor:ce}),n({target:"Object",stat:!0,forced:!s},{getOwnPropertyNames:we}),K(),W(se,pe),N[V]=!0,es_symbol_constructor}var es_symbol_for={},symbolRegistryDetection,hasRequiredSymbolRegistryDetection;function requireSymbolRegistryDetection(){if(hasRequiredSymbolRegistryDetection)return symbolRegistryDetection;hasRequiredSymbolRegistryDetection=1;var n=requireSymbolConstructorDetection();return symbolRegistryDetection=n&&!!Symbol.for&&!!Symbol.keyFor,symbolRegistryDetection}var hasRequiredEs_symbol_for;function requireEs_symbol_for(){if(hasRequiredEs_symbol_for)return es_symbol_for;hasRequiredEs_symbol_for=1;var n=require_export(),e=requireGetBuiltIn(),t=requireHasOwnProperty(),r=requireToString(),i=requireShared(),a=requireSymbolRegistryDetection(),s=i("string-to-symbol-registry"),l=i("symbol-to-string-registry");return n({target:"Symbol",stat:!0,forced:!a},{for:function(u){var o=r(u);if(t(s,o))return s[o];var f=e("Symbol")(o);return s[o]=f,l[f]=o,f}}),es_symbol_for}var es_symbol_keyFor={},hasRequiredEs_symbol_keyFor;function requireEs_symbol_keyFor(){if(hasRequiredEs_symbol_keyFor)return es_symbol_keyFor;hasRequiredEs_symbol_keyFor=1;var n=require_export(),e=requireHasOwnProperty(),t=requireIsSymbol(),r=requireTryToString(),i=requireShared(),a=requireSymbolRegistryDetection(),s=i("symbol-to-string-registry");return n({target:"Symbol",stat:!0,forced:!a},{keyFor:function(u){if(!t(u))throw new TypeError(r(u)+" is not a symbol");if(e(s,u))return s[u]}}),es_symbol_keyFor}var es_json_stringify={},getJsonReplacerFunction,hasRequiredGetJsonReplacerFunction;function requireGetJsonReplacerFunction(){if(hasRequiredGetJsonReplacerFunction)return getJsonReplacerFunction;hasRequiredGetJsonReplacerFunction=1;var n=requireFunctionUncurryThis(),e=requireIsArray(),t=requireIsCallable(),r=requireClassofRaw(),i=requireToString(),a=n([].push);return getJsonReplacerFunction=function(s){if(t(s))return s;if(e(s)){for(var l=s.length,u=[],o=0;o<l;o++){var f=s[o];typeof f=="string"?a(u,f):(typeof f=="number"||r(f)==="Number"||r(f)==="String")&&a(u,i(f))}var d=u.length,h=!0;return function(y,m){if(h)return h=!1,m;if(e(this))return m;for(var v=0;v<d;v++)if(u[v]===y)return m}}},getJsonReplacerFunction}var hasRequiredEs_json_stringify;function requireEs_json_stringify(){if(hasRequiredEs_json_stringify)return es_json_stringify;hasRequiredEs_json_stringify=1;var n=require_export(),e=requireGetBuiltIn(),t=requireFunctionApply(),r=requireFunctionCall(),i=requireFunctionUncurryThis(),a=requireFails(),s=requireIsCallable(),l=requireIsSymbol(),u=requireArraySlice(),o=requireGetJsonReplacerFunction(),f=requireSymbolConstructorDetection(),d=String,h=e("JSON","stringify"),y=i(/./.exec),m=i("".charAt),v=i("".charCodeAt),p=i("".replace),E=i(1 .toString),S=/[\uD800-\uDFFF]/g,w=/^[\uD800-\uDBFF]$/,g=/^[\uDC00-\uDFFF]$/,b=!f||a(function(){var D=e("Symbol")("stringify detection");return h([D])!=="[null]"||h({a:D})!=="{}"||h(Object(D))!=="{}"}),A=a(function(){return h("\uDF06\uD834")!=='"\\udf06\\ud834"'||h("\uDEAD")!=='"\\udead"'}),q=function(D,j){var F=u(arguments),N=o(j);if(!(!s(N)&&(D===void 0||l(D))))return F[1]=function(B,U){if(s(N)&&(U=r(N,this,d(B),U)),!l(U))return U},t(h,null,F)},x=function(D,j,F){var N=m(F,j-1),B=m(F,j+1);return y(w,D)&&!y(g,B)||y(g,D)&&!y(w,N)?"\\u"+E(v(D,0),16):D};return h&&n({target:"JSON",stat:!0,arity:3,forced:b||A},{stringify:function(j,F,N){var B=u(arguments),U=t(b?q:h,null,B);return A&&typeof U=="string"?p(U,S,x):U}}),es_json_stringify}var es_object_getOwnPropertySymbols={},hasRequiredEs_object_getOwnPropertySymbols;function requireEs_object_getOwnPropertySymbols(){if(hasRequiredEs_object_getOwnPropertySymbols)return es_object_getOwnPropertySymbols;hasRequiredEs_object_getOwnPropertySymbols=1;var n=require_export(),e=requireSymbolConstructorDetection(),t=requireFails(),r=requireObjectGetOwnPropertySymbols(),i=requireToObject(),a=!e||t(function(){r.f(1)});return n({target:"Object",stat:!0,forced:a},{getOwnPropertySymbols:function(l){var u=r.f;return u?u(i(l)):[]}}),es_object_getOwnPropertySymbols}var hasRequiredEs_symbol;function requireEs_symbol(){return hasRequiredEs_symbol||(hasRequiredEs_symbol=1,requireEs_symbol_constructor(),requireEs_symbol_for(),requireEs_symbol_keyFor(),requireEs_json_stringify(),requireEs_object_getOwnPropertySymbols()),es_symbol}var getOwnPropertySymbols$4,hasRequiredGetOwnPropertySymbols$4;function requireGetOwnPropertySymbols$4(){if(hasRequiredGetOwnPropertySymbols$4)return getOwnPropertySymbols$4;hasRequiredGetOwnPropertySymbols$4=1,requireEs_symbol();var n=requirePath();return getOwnPropertySymbols$4=n.Object.getOwnPropertySymbols,getOwnPropertySymbols$4}var getOwnPropertySymbols$3,hasRequiredGetOwnPropertySymbols$3;function requireGetOwnPropertySymbols$3(){if(hasRequiredGetOwnPropertySymbols$3)return getOwnPropertySymbols$3;hasRequiredGetOwnPropertySymbols$3=1;var n=requireGetOwnPropertySymbols$4();return getOwnPropertySymbols$3=n,getOwnPropertySymbols$3}var getOwnPropertySymbols$2,hasRequiredGetOwnPropertySymbols$2;function requireGetOwnPropertySymbols$2(){if(hasRequiredGetOwnPropertySymbols$2)return getOwnPropertySymbols$2;hasRequiredGetOwnPropertySymbols$2=1;var n=requireGetOwnPropertySymbols$3();return getOwnPropertySymbols$2=n,getOwnPropertySymbols$2}var getOwnPropertySymbols$1,hasRequiredGetOwnPropertySymbols$1;function requireGetOwnPropertySymbols$1(){if(hasRequiredGetOwnPropertySymbols$1)return getOwnPropertySymbols$1;hasRequiredGetOwnPropertySymbols$1=1;var n=requireGetOwnPropertySymbols$2();return getOwnPropertySymbols$1=n,getOwnPropertySymbols$1}var getOwnPropertySymbols,hasRequiredGetOwnPropertySymbols;function requireGetOwnPropertySymbols(){return hasRequiredGetOwnPropertySymbols||(hasRequiredGetOwnPropertySymbols=1,getOwnPropertySymbols=requireGetOwnPropertySymbols$1()),getOwnPropertySymbols}var getOwnPropertySymbolsExports=requireGetOwnPropertySymbols();const _Object$getOwnPropertySymbols=getDefaultExportFromCjs(getOwnPropertySymbolsExports);var es_array_filter={},arrayMethodHasSpeciesSupport,hasRequiredArrayMethodHasSpeciesSupport;function requireArrayMethodHasSpeciesSupport(){if(hasRequiredArrayMethodHasSpeciesSupport)return arrayMethodHasSpeciesSupport;hasRequiredArrayMethodHasSpeciesSupport=1;var n=requireFails(),e=requireWellKnownSymbol(),t=requireEnvironmentV8Version(),r=e("species");return arrayMethodHasSpeciesSupport=function(i){return t>=51||!n(function(){var a=[],s=a.constructor={};return s[r]=function(){return{foo:1}},a[i](Boolean).foo!==1})},arrayMethodHasSpeciesSupport}var hasRequiredEs_array_filter;function requireEs_array_filter(){if(hasRequiredEs_array_filter)return es_array_filter;hasRequiredEs_array_filter=1;var n=require_export(),e=requireArrayIteration().filter,t=requireArrayMethodHasSpeciesSupport(),r=t("filter");return n({target:"Array",proto:!0,forced:!r},{filter:function(a){return e(this,a,arguments.length>1?arguments[1]:void 0)}}),es_array_filter}var getBuiltInPrototypeMethod,hasRequiredGetBuiltInPrototypeMethod;function requireGetBuiltInPrototypeMethod(){if(hasRequiredGetBuiltInPrototypeMethod)return getBuiltInPrototypeMethod;hasRequiredGetBuiltInPrototypeMethod=1;var n=requireGlobalThis(),e=requirePath();return getBuiltInPrototypeMethod=function(t,r){var i=e[t+"Prototype"],a=i&&i[r];if(a)return a;var s=n[t],l=s&&s.prototype;return l&&l[r]},getBuiltInPrototypeMethod}var filter$6,hasRequiredFilter$5;function requireFilter$5(){if(hasRequiredFilter$5)return filter$6;hasRequiredFilter$5=1,requireEs_array_filter();var n=requireGetBuiltInPrototypeMethod();return filter$6=n("Array","filter"),filter$6}var filter$5,hasRequiredFilter$4;function requireFilter$4(){if(hasRequiredFilter$4)return filter$5;hasRequiredFilter$4=1;var n=requireObjectIsPrototypeOf(),e=requireFilter$5(),t=Array.prototype;return filter$5=function(r){var i=r.filter;return r===t||n(t,r)&&i===t.filter?e:i},filter$5}var filter$4,hasRequiredFilter$3;function requireFilter$3(){if(hasRequiredFilter$3)return filter$4;hasRequiredFilter$3=1;var n=requireFilter$4();return filter$4=n,filter$4}var filter$3,hasRequiredFilter$2;function requireFilter$2(){if(hasRequiredFilter$2)return filter$3;hasRequiredFilter$2=1;var n=requireFilter$3();return filter$3=n,filter$3}var filter$2,hasRequiredFilter$1;function requireFilter$1(){if(hasRequiredFilter$1)return filter$2;hasRequiredFilter$1=1;var n=requireFilter$2();return filter$2=n,filter$2}var filter$1,hasRequiredFilter;function requireFilter(){return hasRequiredFilter||(hasRequiredFilter=1,filter$1=requireFilter$1()),filter$1}var filterExports=requireFilter();const _filterInstanceProperty=getDefaultExportFromCjs(filterExports);var getOwnPropertyDescriptor$4={exports:{}},es_object_getOwnPropertyDescriptor={},hasRequiredEs_object_getOwnPropertyDescriptor;function requireEs_object_getOwnPropertyDescriptor(){if(hasRequiredEs_object_getOwnPropertyDescriptor)return es_object_getOwnPropertyDescriptor;hasRequiredEs_object_getOwnPropertyDescriptor=1;var n=require_export(),e=requireFails(),t=requireToIndexedObject(),r=requireObjectGetOwnPropertyDescriptor().f,i=requireDescriptors(),a=!i||e(function(){r(1)});return n({target:"Object",stat:!0,forced:a,sham:!i},{getOwnPropertyDescriptor:function(l,u){return r(t(l),u)}}),es_object_getOwnPropertyDescriptor}var hasRequiredGetOwnPropertyDescriptor$4;function requireGetOwnPropertyDescriptor$4(){if(hasRequiredGetOwnPropertyDescriptor$4)return getOwnPropertyDescriptor$4.exports;hasRequiredGetOwnPropertyDescriptor$4=1,requireEs_object_getOwnPropertyDescriptor();var n=requirePath(),e=n.Object,t=getOwnPropertyDescriptor$4.exports=function(i,a){return e.getOwnPropertyDescriptor(i,a)};return e.getOwnPropertyDescriptor.sham&&(t.sham=!0),getOwnPropertyDescriptor$4.exports}var getOwnPropertyDescriptor$3,hasRequiredGetOwnPropertyDescriptor$3;function requireGetOwnPropertyDescriptor$3(){if(hasRequiredGetOwnPropertyDescriptor$3)return getOwnPropertyDescriptor$3;hasRequiredGetOwnPropertyDescriptor$3=1;var n=requireGetOwnPropertyDescriptor$4();return getOwnPropertyDescriptor$3=n,getOwnPropertyDescriptor$3}var getOwnPropertyDescriptor$2,hasRequiredGetOwnPropertyDescriptor$2;function requireGetOwnPropertyDescriptor$2(){if(hasRequiredGetOwnPropertyDescriptor$2)return getOwnPropertyDescriptor$2;hasRequiredGetOwnPropertyDescriptor$2=1;var n=requireGetOwnPropertyDescriptor$3();return getOwnPropertyDescriptor$2=n,getOwnPropertyDescriptor$2}var getOwnPropertyDescriptor$1,hasRequiredGetOwnPropertyDescriptor$1;function requireGetOwnPropertyDescriptor$1(){if(hasRequiredGetOwnPropertyDescriptor$1)return getOwnPropertyDescriptor$1;hasRequiredGetOwnPropertyDescriptor$1=1;var n=requireGetOwnPropertyDescriptor$2();return getOwnPropertyDescriptor$1=n,getOwnPropertyDescriptor$1}var getOwnPropertyDescriptor,hasRequiredGetOwnPropertyDescriptor;function requireGetOwnPropertyDescriptor(){return hasRequiredGetOwnPropertyDescriptor||(hasRequiredGetOwnPropertyDescriptor=1,getOwnPropertyDescriptor=requireGetOwnPropertyDescriptor$1()),getOwnPropertyDescriptor}var getOwnPropertyDescriptorExports=requireGetOwnPropertyDescriptor();const _Object$getOwnPropertyDescriptor=getDefaultExportFromCjs(getOwnPropertyDescriptorExports);var es_array_push={},arraySetLength,hasRequiredArraySetLength;function requireArraySetLength(){if(hasRequiredArraySetLength)return arraySetLength;hasRequiredArraySetLength=1;var n=requireDescriptors(),e=requireIsArray(),t=TypeError,r=Object.getOwnPropertyDescriptor,i=n&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(a){return a instanceof TypeError}}();return arraySetLength=i?function(a,s){if(e(a)&&!r(a,"length").writable)throw new t("Cannot set read only .length");return a.length=s}:function(a,s){return a.length=s},arraySetLength}var doesNotExceedSafeInteger,hasRequiredDoesNotExceedSafeInteger;function requireDoesNotExceedSafeInteger(){if(hasRequiredDoesNotExceedSafeInteger)return doesNotExceedSafeInteger;hasRequiredDoesNotExceedSafeInteger=1;var n=TypeError,e=9007199254740991;return doesNotExceedSafeInteger=function(t){if(t>e)throw n("Maximum allowed index exceeded");return t},doesNotExceedSafeInteger}var hasRequiredEs_array_push;function requireEs_array_push(){if(hasRequiredEs_array_push)return es_array_push;hasRequiredEs_array_push=1;var n=require_export(),e=requireToObject(),t=requireLengthOfArrayLike(),r=requireArraySetLength(),i=requireDoesNotExceedSafeInteger(),a=requireFails(),s=a(function(){return[].push.call({length:4294967296},1)!==4294967297}),l=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(o){return o instanceof TypeError}},u=s||!l();return n({target:"Array",proto:!0,arity:1,forced:u},{push:function(f){var d=e(this),h=t(d),y=arguments.length;i(h+y);for(var m=0;m<y;m++)d[h]=arguments[m],h++;return r(d,h),h}}),es_array_push}var push$5,hasRequiredPush$5;function requirePush$5(){if(hasRequiredPush$5)return push$5;hasRequiredPush$5=1,requireEs_array_push();var n=requireGetBuiltInPrototypeMethod();return push$5=n("Array","push"),push$5}var push$4,hasRequiredPush$4;function requirePush$4(){if(hasRequiredPush$4)return push$4;hasRequiredPush$4=1;var n=requireObjectIsPrototypeOf(),e=requirePush$5(),t=Array.prototype;return push$4=function(r){var i=r.push;return r===t||n(t,r)&&i===t.push?e:i},push$4}var push$3,hasRequiredPush$3;function requirePush$3(){if(hasRequiredPush$3)return push$3;hasRequiredPush$3=1;var n=requirePush$4();return push$3=n,push$3}var push$2,hasRequiredPush$2;function requirePush$2(){if(hasRequiredPush$2)return push$2;hasRequiredPush$2=1;var n=requirePush$3();return push$2=n,push$2}var push$1,hasRequiredPush$1;function requirePush$1(){if(hasRequiredPush$1)return push$1;hasRequiredPush$1=1;var n=requirePush$2();return push$1=n,push$1}var push,hasRequiredPush;function requirePush(){return hasRequiredPush||(hasRequiredPush=1,push=requirePush$1()),push}var pushExports=requirePush();const _pushInstanceProperty=getDefaultExportFromCjs(pushExports);var es_array_forEach={},arrayMethodIsStrict,hasRequiredArrayMethodIsStrict;function requireArrayMethodIsStrict(){if(hasRequiredArrayMethodIsStrict)return arrayMethodIsStrict;hasRequiredArrayMethodIsStrict=1;var n=requireFails();return arrayMethodIsStrict=function(e,t){var r=[][e];return!!r&&n(function(){r.call(null,t||function(){return 1},1)})},arrayMethodIsStrict}var arrayForEach,hasRequiredArrayForEach;function requireArrayForEach(){if(hasRequiredArrayForEach)return arrayForEach;hasRequiredArrayForEach=1;var n=requireArrayIteration().forEach,e=requireArrayMethodIsStrict(),t=e("forEach");return arrayForEach=t?[].forEach:function(i){return n(this,i,arguments.length>1?arguments[1]:void 0)},arrayForEach}var hasRequiredEs_array_forEach;function requireEs_array_forEach(){if(hasRequiredEs_array_forEach)return es_array_forEach;hasRequiredEs_array_forEach=1;var n=require_export(),e=requireArrayForEach();return n({target:"Array",proto:!0,forced:[].forEach!==e},{forEach:e}),es_array_forEach}var forEach$5,hasRequiredForEach$5;function requireForEach$5(){if(hasRequiredForEach$5)return forEach$5;hasRequiredForEach$5=1,requireEs_array_forEach();var n=requireGetBuiltInPrototypeMethod();return forEach$5=n("Array","forEach"),forEach$5}var forEach$4,hasRequiredForEach$4;function requireForEach$4(){if(hasRequiredForEach$4)return forEach$4;hasRequiredForEach$4=1;var n=requireForEach$5();return forEach$4=n,forEach$4}var forEach$3,hasRequiredForEach$3;function requireForEach$3(){if(hasRequiredForEach$3)return forEach$3;hasRequiredForEach$3=1;var n=requireClassof(),e=requireHasOwnProperty(),t=requireObjectIsPrototypeOf(),r=requireForEach$4(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return forEach$3=function(s){var l=s.forEach;return s===i||t(i,s)&&l===i.forEach||e(a,n(s))?r:l},forEach$3}var forEach$2,hasRequiredForEach$2;function requireForEach$2(){if(hasRequiredForEach$2)return forEach$2;hasRequiredForEach$2=1;var n=requireForEach$3();return forEach$2=n,forEach$2}var forEach$1,hasRequiredForEach$1;function requireForEach$1(){if(hasRequiredForEach$1)return forEach$1;hasRequiredForEach$1=1;var n=requireForEach$2();return forEach$1=n,forEach$1}var forEach,hasRequiredForEach;function requireForEach(){return hasRequiredForEach||(hasRequiredForEach=1,forEach=requireForEach$1()),forEach}var forEachExports=requireForEach();const _forEachInstanceProperty=getDefaultExportFromCjs(forEachExports);var es_object_getOwnPropertyDescriptors={},ownKeys$1,hasRequiredOwnKeys;function requireOwnKeys(){if(hasRequiredOwnKeys)return ownKeys$1;hasRequiredOwnKeys=1;var n=requireGetBuiltIn(),e=requireFunctionUncurryThis(),t=requireObjectGetOwnPropertyNames(),r=requireObjectGetOwnPropertySymbols(),i=requireAnObject(),a=e([].concat);return ownKeys$1=n("Reflect","ownKeys")||function(l){var u=t.f(i(l)),o=r.f;return o?a(u,o(l)):u},ownKeys$1}var createProperty,hasRequiredCreateProperty;function requireCreateProperty(){if(hasRequiredCreateProperty)return createProperty;hasRequiredCreateProperty=1;var n=requireDescriptors(),e=requireObjectDefineProperty(),t=requireCreatePropertyDescriptor();return createProperty=function(r,i,a){n?e.f(r,i,t(0,a)):r[i]=a},createProperty}var hasRequiredEs_object_getOwnPropertyDescriptors;function requireEs_object_getOwnPropertyDescriptors(){if(hasRequiredEs_object_getOwnPropertyDescriptors)return es_object_getOwnPropertyDescriptors;hasRequiredEs_object_getOwnPropertyDescriptors=1;var n=require_export(),e=requireDescriptors(),t=requireOwnKeys(),r=requireToIndexedObject(),i=requireObjectGetOwnPropertyDescriptor(),a=requireCreateProperty();return n({target:"Object",stat:!0,sham:!e},{getOwnPropertyDescriptors:function(l){for(var u=r(l),o=i.f,f=t(u),d={},h=0,y,m;f.length>h;)m=o(u,y=f[h++]),m!==void 0&&a(d,y,m);return d}}),es_object_getOwnPropertyDescriptors}var getOwnPropertyDescriptors$4,hasRequiredGetOwnPropertyDescriptors$4;function requireGetOwnPropertyDescriptors$4(){if(hasRequiredGetOwnPropertyDescriptors$4)return getOwnPropertyDescriptors$4;hasRequiredGetOwnPropertyDescriptors$4=1,requireEs_object_getOwnPropertyDescriptors();var n=requirePath();return getOwnPropertyDescriptors$4=n.Object.getOwnPropertyDescriptors,getOwnPropertyDescriptors$4}var getOwnPropertyDescriptors$3,hasRequiredGetOwnPropertyDescriptors$3;function requireGetOwnPropertyDescriptors$3(){if(hasRequiredGetOwnPropertyDescriptors$3)return getOwnPropertyDescriptors$3;hasRequiredGetOwnPropertyDescriptors$3=1;var n=requireGetOwnPropertyDescriptors$4();return getOwnPropertyDescriptors$3=n,getOwnPropertyDescriptors$3}var getOwnPropertyDescriptors$2,hasRequiredGetOwnPropertyDescriptors$2;function requireGetOwnPropertyDescriptors$2(){if(hasRequiredGetOwnPropertyDescriptors$2)return getOwnPropertyDescriptors$2;hasRequiredGetOwnPropertyDescriptors$2=1;var n=requireGetOwnPropertyDescriptors$3();return getOwnPropertyDescriptors$2=n,getOwnPropertyDescriptors$2}var getOwnPropertyDescriptors$1,hasRequiredGetOwnPropertyDescriptors$1;function requireGetOwnPropertyDescriptors$1(){if(hasRequiredGetOwnPropertyDescriptors$1)return getOwnPropertyDescriptors$1;hasRequiredGetOwnPropertyDescriptors$1=1;var n=requireGetOwnPropertyDescriptors$2();return getOwnPropertyDescriptors$1=n,getOwnPropertyDescriptors$1}var getOwnPropertyDescriptors,hasRequiredGetOwnPropertyDescriptors;function requireGetOwnPropertyDescriptors(){return hasRequiredGetOwnPropertyDescriptors||(hasRequiredGetOwnPropertyDescriptors=1,getOwnPropertyDescriptors=requireGetOwnPropertyDescriptors$1()),getOwnPropertyDescriptors}var getOwnPropertyDescriptorsExports=requireGetOwnPropertyDescriptors();const _Object$getOwnPropertyDescriptors=getDefaultExportFromCjs(getOwnPropertyDescriptorsExports);var defineProperties$4={exports:{}},es_object_defineProperties={},hasRequiredEs_object_defineProperties;function requireEs_object_defineProperties(){if(hasRequiredEs_object_defineProperties)return es_object_defineProperties;hasRequiredEs_object_defineProperties=1;var n=require_export(),e=requireDescriptors(),t=requireObjectDefineProperties().f;return n({target:"Object",stat:!0,forced:Object.defineProperties!==t,sham:!e},{defineProperties:t}),es_object_defineProperties}var hasRequiredDefineProperties$4;function requireDefineProperties$4(){if(hasRequiredDefineProperties$4)return defineProperties$4.exports;hasRequiredDefineProperties$4=1,requireEs_object_defineProperties();var n=requirePath(),e=n.Object,t=defineProperties$4.exports=function(i,a){return e.defineProperties(i,a)};return e.defineProperties.sham&&(t.sham=!0),defineProperties$4.exports}var defineProperties$3,hasRequiredDefineProperties$3;function requireDefineProperties$3(){if(hasRequiredDefineProperties$3)return defineProperties$3;hasRequiredDefineProperties$3=1;var n=requireDefineProperties$4();return defineProperties$3=n,defineProperties$3}var defineProperties$2,hasRequiredDefineProperties$2;function requireDefineProperties$2(){if(hasRequiredDefineProperties$2)return defineProperties$2;hasRequiredDefineProperties$2=1;var n=requireDefineProperties$3();return defineProperties$2=n,defineProperties$2}var defineProperties$1,hasRequiredDefineProperties$1;function requireDefineProperties$1(){if(hasRequiredDefineProperties$1)return defineProperties$1;hasRequiredDefineProperties$1=1;var n=requireDefineProperties$2();return defineProperties$1=n,defineProperties$1}var defineProperties,hasRequiredDefineProperties;function requireDefineProperties(){return hasRequiredDefineProperties||(hasRequiredDefineProperties=1,defineProperties=requireDefineProperties$1()),defineProperties}var definePropertiesExports=requireDefineProperties();const _Object$defineProperties=getDefaultExportFromCjs(definePropertiesExports);var defineProperty$4={exports:{}},es_object_defineProperty={},hasRequiredEs_object_defineProperty;function requireEs_object_defineProperty(){if(hasRequiredEs_object_defineProperty)return es_object_defineProperty;hasRequiredEs_object_defineProperty=1;var n=require_export(),e=requireDescriptors(),t=requireObjectDefineProperty().f;return n({target:"Object",stat:!0,forced:Object.defineProperty!==t,sham:!e},{defineProperty:t}),es_object_defineProperty}var hasRequiredDefineProperty$4;function requireDefineProperty$4(){if(hasRequiredDefineProperty$4)return defineProperty$4.exports;hasRequiredDefineProperty$4=1,requireEs_object_defineProperty();var n=requirePath(),e=n.Object,t=defineProperty$4.exports=function(i,a,s){return e.defineProperty(i,a,s)};return e.defineProperty.sham&&(t.sham=!0),defineProperty$4.exports}var defineProperty$3,hasRequiredDefineProperty$3;function requireDefineProperty$3(){if(hasRequiredDefineProperty$3)return defineProperty$3;hasRequiredDefineProperty$3=1;var n=requireDefineProperty$4();return defineProperty$3=n,defineProperty$3}var defineProperty$2,hasRequiredDefineProperty$2;function requireDefineProperty$2(){if(hasRequiredDefineProperty$2)return defineProperty$2;hasRequiredDefineProperty$2=1;var n=requireDefineProperty$3();return defineProperty$2=n,defineProperty$2}var defineProperty$1,hasRequiredDefineProperty$1;function requireDefineProperty$1(){if(hasRequiredDefineProperty$1)return defineProperty$1;hasRequiredDefineProperty$1=1;var n=requireDefineProperty$2();return defineProperty$1=n,defineProperty$1}var defineProperty,hasRequiredDefineProperty;function requireDefineProperty(){return hasRequiredDefineProperty||(hasRequiredDefineProperty=1,defineProperty=requireDefineProperty$1()),defineProperty}var definePropertyExports=requireDefineProperty();const _Object$defineProperty=getDefaultExportFromCjs(definePropertyExports);var es_array_concat={},hasRequiredEs_array_concat;function requireEs_array_concat(){if(hasRequiredEs_array_concat)return es_array_concat;hasRequiredEs_array_concat=1;var n=require_export(),e=requireFails(),t=requireIsArray(),r=requireIsObject(),i=requireToObject(),a=requireLengthOfArrayLike(),s=requireDoesNotExceedSafeInteger(),l=requireCreateProperty(),u=requireArraySpeciesCreate(),o=requireArrayMethodHasSpeciesSupport(),f=requireWellKnownSymbol(),d=requireEnvironmentV8Version(),h=f("isConcatSpreadable"),y=d>=51||!e(function(){var p=[];return p[h]=!1,p.concat()[0]!==p}),m=function(p){if(!r(p))return!1;var E=p[h];return E!==void 0?!!E:t(p)},v=!y||!o("concat");return n({target:"Array",proto:!0,arity:1,forced:v},{concat:function(E){var S=i(this),w=u(S,0),g=0,b,A,q,x,D;for(b=-1,q=arguments.length;b<q;b++)if(D=b===-1?S:arguments[b],m(D))for(x=a(D),s(g+x),A=0;A<x;A++,g++)A in D&&l(w,g,D[A]);else s(g+1),l(w,g++,D);return w.length=g,w}}),es_array_concat}var es_symbol_asyncIterator={},hasRequiredEs_symbol_asyncIterator;function requireEs_symbol_asyncIterator(){if(hasRequiredEs_symbol_asyncIterator)return es_symbol_asyncIterator;hasRequiredEs_symbol_asyncIterator=1;var n=requireWellKnownSymbolDefine();return n("asyncIterator"),es_symbol_asyncIterator}var es_symbol_hasInstance={},hasRequiredEs_symbol_hasInstance;function requireEs_symbol_hasInstance(){if(hasRequiredEs_symbol_hasInstance)return es_symbol_hasInstance;hasRequiredEs_symbol_hasInstance=1;var n=requireWellKnownSymbolDefine();return n("hasInstance"),es_symbol_hasInstance}var es_symbol_isConcatSpreadable={},hasRequiredEs_symbol_isConcatSpreadable;function requireEs_symbol_isConcatSpreadable(){if(hasRequiredEs_symbol_isConcatSpreadable)return es_symbol_isConcatSpreadable;hasRequiredEs_symbol_isConcatSpreadable=1;var n=requireWellKnownSymbolDefine();return n("isConcatSpreadable"),es_symbol_isConcatSpreadable}var es_symbol_iterator={},hasRequiredEs_symbol_iterator;function requireEs_symbol_iterator(){if(hasRequiredEs_symbol_iterator)return es_symbol_iterator;hasRequiredEs_symbol_iterator=1;var n=requireWellKnownSymbolDefine();return n("iterator"),es_symbol_iterator}var es_symbol_match={},hasRequiredEs_symbol_match;function requireEs_symbol_match(){if(hasRequiredEs_symbol_match)return es_symbol_match;hasRequiredEs_symbol_match=1;var n=requireWellKnownSymbolDefine();return n("match"),es_symbol_match}var es_symbol_matchAll={},hasRequiredEs_symbol_matchAll;function requireEs_symbol_matchAll(){if(hasRequiredEs_symbol_matchAll)return es_symbol_matchAll;hasRequiredEs_symbol_matchAll=1;var n=requireWellKnownSymbolDefine();return n("matchAll"),es_symbol_matchAll}var es_symbol_replace={},hasRequiredEs_symbol_replace;function requireEs_symbol_replace(){if(hasRequiredEs_symbol_replace)return es_symbol_replace;hasRequiredEs_symbol_replace=1;var n=requireWellKnownSymbolDefine();return n("replace"),es_symbol_replace}var es_symbol_search={},hasRequiredEs_symbol_search;function requireEs_symbol_search(){if(hasRequiredEs_symbol_search)return es_symbol_search;hasRequiredEs_symbol_search=1;var n=requireWellKnownSymbolDefine();return n("search"),es_symbol_search}var es_symbol_species={},hasRequiredEs_symbol_species;function requireEs_symbol_species(){if(hasRequiredEs_symbol_species)return es_symbol_species;hasRequiredEs_symbol_species=1;var n=requireWellKnownSymbolDefine();return n("species"),es_symbol_species}var es_symbol_split={},hasRequiredEs_symbol_split;function requireEs_symbol_split(){if(hasRequiredEs_symbol_split)return es_symbol_split;hasRequiredEs_symbol_split=1;var n=requireWellKnownSymbolDefine();return n("split"),es_symbol_split}var es_symbol_toPrimitive={},hasRequiredEs_symbol_toPrimitive;function requireEs_symbol_toPrimitive(){if(hasRequiredEs_symbol_toPrimitive)return es_symbol_toPrimitive;hasRequiredEs_symbol_toPrimitive=1;var n=requireWellKnownSymbolDefine(),e=requireSymbolDefineToPrimitive();return n("toPrimitive"),e(),es_symbol_toPrimitive}var es_symbol_toStringTag={},hasRequiredEs_symbol_toStringTag;function requireEs_symbol_toStringTag(){if(hasRequiredEs_symbol_toStringTag)return es_symbol_toStringTag;hasRequiredEs_symbol_toStringTag=1;var n=requireGetBuiltIn(),e=requireWellKnownSymbolDefine(),t=requireSetToStringTag();return e("toStringTag"),t(n("Symbol"),"Symbol"),es_symbol_toStringTag}var es_symbol_unscopables={},hasRequiredEs_symbol_unscopables;function requireEs_symbol_unscopables(){if(hasRequiredEs_symbol_unscopables)return es_symbol_unscopables;hasRequiredEs_symbol_unscopables=1;var n=requireWellKnownSymbolDefine();return n("unscopables"),es_symbol_unscopables}var es_json_toStringTag={},hasRequiredEs_json_toStringTag;function requireEs_json_toStringTag(){if(hasRequiredEs_json_toStringTag)return es_json_toStringTag;hasRequiredEs_json_toStringTag=1;var n=requireGlobalThis(),e=requireSetToStringTag();return e(n.JSON,"JSON",!0),es_json_toStringTag}var symbol$4,hasRequiredSymbol$4;function requireSymbol$4(){if(hasRequiredSymbol$4)return symbol$4;hasRequiredSymbol$4=1,requireEs_array_concat(),requireEs_symbol(),requireEs_symbol_asyncIterator(),requireEs_symbol_hasInstance(),requireEs_symbol_isConcatSpreadable(),requireEs_symbol_iterator(),requireEs_symbol_match(),requireEs_symbol_matchAll(),requireEs_symbol_replace(),requireEs_symbol_search(),requireEs_symbol_species(),requireEs_symbol_split(),requireEs_symbol_toPrimitive(),requireEs_symbol_toStringTag(),requireEs_symbol_unscopables(),requireEs_json_toStringTag();var n=requirePath();return symbol$4=n.Symbol,symbol$4}var web_domCollections_iterator={},addToUnscopables,hasRequiredAddToUnscopables;function requireAddToUnscopables(){return hasRequiredAddToUnscopables||(hasRequiredAddToUnscopables=1,addToUnscopables=function(){}),addToUnscopables}var iterators,hasRequiredIterators;function requireIterators(){return hasRequiredIterators||(hasRequiredIterators=1,iterators={}),iterators}var functionName,hasRequiredFunctionName;function requireFunctionName(){if(hasRequiredFunctionName)return functionName;hasRequiredFunctionName=1;var n=requireDescriptors(),e=requireHasOwnProperty(),t=Function.prototype,r=n&&Object.getOwnPropertyDescriptor,i=e(t,"name"),a=i&&(function(){}).name==="something",s=i&&(!n||n&&r(t,"name").configurable);return functionName={EXISTS:i,PROPER:a,CONFIGURABLE:s},functionName}var correctPrototypeGetter,hasRequiredCorrectPrototypeGetter;function requireCorrectPrototypeGetter(){if(hasRequiredCorrectPrototypeGetter)return correctPrototypeGetter;hasRequiredCorrectPrototypeGetter=1;var n=requireFails();return correctPrototypeGetter=!n(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),correctPrototypeGetter}var objectGetPrototypeOf,hasRequiredObjectGetPrototypeOf;function requireObjectGetPrototypeOf(){if(hasRequiredObjectGetPrototypeOf)return objectGetPrototypeOf;hasRequiredObjectGetPrototypeOf=1;var n=requireHasOwnProperty(),e=requireIsCallable(),t=requireToObject(),r=requireSharedKey(),i=requireCorrectPrototypeGetter(),a=r("IE_PROTO"),s=Object,l=s.prototype;return objectGetPrototypeOf=i?s.getPrototypeOf:function(u){var o=t(u);if(n(o,a))return o[a];var f=o.constructor;return e(f)&&o instanceof f?f.prototype:o instanceof s?l:null},objectGetPrototypeOf}var iteratorsCore,hasRequiredIteratorsCore;function requireIteratorsCore(){if(hasRequiredIteratorsCore)return iteratorsCore;hasRequiredIteratorsCore=1;var n=requireFails(),e=requireIsCallable(),t=requireIsObject(),r=requireObjectCreate(),i=requireObjectGetPrototypeOf(),a=requireDefineBuiltIn(),s=requireWellKnownSymbol(),l=requireIsPure(),u=s("iterator"),o=!1,f,d,h;[].keys&&(h=[].keys(),"next"in h?(d=i(i(h)),d!==Object.prototype&&(f=d)):o=!0);var y=!t(f)||n(function(){var m={};return f[u].call(m)!==m});return y?f={}:l&&(f=r(f)),e(f[u])||a(f,u,function(){return this}),iteratorsCore={IteratorPrototype:f,BUGGY_SAFARI_ITERATORS:o},iteratorsCore}var iteratorCreateConstructor,hasRequiredIteratorCreateConstructor;function requireIteratorCreateConstructor(){if(hasRequiredIteratorCreateConstructor)return iteratorCreateConstructor;hasRequiredIteratorCreateConstructor=1;var n=requireIteratorsCore().IteratorPrototype,e=requireObjectCreate(),t=requireCreatePropertyDescriptor(),r=requireSetToStringTag(),i=requireIterators(),a=function(){return this};return iteratorCreateConstructor=function(s,l,u,o){var f=l+" Iterator";return s.prototype=e(n,{next:t(+!o,u)}),r(s,f,!1,!0),i[f]=a,s},iteratorCreateConstructor}var functionUncurryThisAccessor,hasRequiredFunctionUncurryThisAccessor;function requireFunctionUncurryThisAccessor(){if(hasRequiredFunctionUncurryThisAccessor)return functionUncurryThisAccessor;hasRequiredFunctionUncurryThisAccessor=1;var n=requireFunctionUncurryThis(),e=requireACallable();return functionUncurryThisAccessor=function(t,r,i){try{return n(e(Object.getOwnPropertyDescriptor(t,r)[i]))}catch{}},functionUncurryThisAccessor}var isPossiblePrototype,hasRequiredIsPossiblePrototype;function requireIsPossiblePrototype(){if(hasRequiredIsPossiblePrototype)return isPossiblePrototype;hasRequiredIsPossiblePrototype=1;var n=requireIsObject();return isPossiblePrototype=function(e){return n(e)||e===null},isPossiblePrototype}var aPossiblePrototype,hasRequiredAPossiblePrototype;function requireAPossiblePrototype(){if(hasRequiredAPossiblePrototype)return aPossiblePrototype;hasRequiredAPossiblePrototype=1;var n=requireIsPossiblePrototype(),e=String,t=TypeError;return aPossiblePrototype=function(r){if(n(r))return r;throw new t("Can't set "+e(r)+" as a prototype")},aPossiblePrototype}var objectSetPrototypeOf,hasRequiredObjectSetPrototypeOf;function requireObjectSetPrototypeOf(){if(hasRequiredObjectSetPrototypeOf)return objectSetPrototypeOf;hasRequiredObjectSetPrototypeOf=1;var n=requireFunctionUncurryThisAccessor(),e=requireIsObject(),t=requireRequireObjectCoercible(),r=requireAPossiblePrototype();return objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var i=!1,a={},s;try{s=n(Object.prototype,"__proto__","set"),s(a,[]),i=a instanceof Array}catch{}return function(u,o){return t(u),r(o),e(u)&&(i?s(u,o):u.__proto__=o),u}}():void 0),objectSetPrototypeOf}var iteratorDefine,hasRequiredIteratorDefine;function requireIteratorDefine(){if(hasRequiredIteratorDefine)return iteratorDefine;hasRequiredIteratorDefine=1;var n=require_export(),e=requireFunctionCall(),t=requireIsPure(),r=requireFunctionName(),i=requireIsCallable(),a=requireIteratorCreateConstructor(),s=requireObjectGetPrototypeOf(),l=requireObjectSetPrototypeOf(),u=requireSetToStringTag(),o=requireCreateNonEnumerableProperty(),f=requireDefineBuiltIn(),d=requireWellKnownSymbol(),h=requireIterators(),y=requireIteratorsCore(),m=r.PROPER,v=r.CONFIGURABLE,p=y.IteratorPrototype,E=y.BUGGY_SAFARI_ITERATORS,S=d("iterator"),w="keys",g="values",b="entries",A=function(){return this};return iteratorDefine=function(q,x,D,j,F,N,B){a(D,x,j);var U=function(k){if(k===F&&te)return te;if(!E&&k&&k in K)return K[k];switch(k){case w:return function(){return new D(this,k)};case g:return function(){return new D(this,k)};case b:return function(){return new D(this,k)}}return function(){return new D(this)}},H=x+" Iterator",z=!1,K=q.prototype,W=K[S]||K["@@iterator"]||F&&K[F],te=!E&&W||U(F),Z=x==="Array"&&K.entries||W,V,pe,C;if(Z&&(V=s(Z.call(new q)),V!==Object.prototype&&V.next&&(!t&&s(V)!==p&&(l?l(V,p):i(V[S])||f(V,S,A)),u(V,H,!0,!0),t&&(h[H]=A))),m&&F===g&&W&&W.name!==g&&(!t&&v?o(K,"name",g):(z=!0,te=function(){return e(W,this)})),F)if(pe={values:U(g),keys:N?te:U(w),entries:U(b)},B)for(C in pe)(E||z||!(C in K))&&f(K,C,pe[C]);else n({target:x,proto:!0,forced:E||z},pe);return(!t||B)&&K[S]!==te&&f(K,S,te,{name:F}),h[x]=te,pe},iteratorDefine}var createIterResultObject,hasRequiredCreateIterResultObject;function requireCreateIterResultObject(){return hasRequiredCreateIterResultObject||(hasRequiredCreateIterResultObject=1,createIterResultObject=function(n,e){return{value:n,done:e}}),createIterResultObject}var es_array_iterator,hasRequiredEs_array_iterator;function requireEs_array_iterator(){if(hasRequiredEs_array_iterator)return es_array_iterator;hasRequiredEs_array_iterator=1;var n=requireToIndexedObject(),e=requireAddToUnscopables(),t=requireIterators(),r=requireInternalState(),i=requireObjectDefineProperty().f,a=requireIteratorDefine(),s=requireCreateIterResultObject(),l=requireIsPure(),u=requireDescriptors(),o="Array Iterator",f=r.set,d=r.getterFor(o);es_array_iterator=a(Array,"Array",function(y,m){f(this,{type:o,target:n(y),index:0,kind:m})},function(){var y=d(this),m=y.target,v=y.index++;if(!m||v>=m.length)return y.target=null,s(void 0,!0);switch(y.kind){case"keys":return s(v,!1);case"values":return s(m[v],!1)}return s([v,m[v]],!1)},"values");var h=t.Arguments=t.Array;if(e("keys"),e("values"),e("entries"),!l&&u&&h.name!=="values")try{i(h,"name",{value:"values"})}catch{}return es_array_iterator}var domIterables,hasRequiredDomIterables;function requireDomIterables(){return hasRequiredDomIterables||(hasRequiredDomIterables=1,domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),domIterables}var hasRequiredWeb_domCollections_iterator;function requireWeb_domCollections_iterator(){if(hasRequiredWeb_domCollections_iterator)return web_domCollections_iterator;hasRequiredWeb_domCollections_iterator=1,requireEs_array_iterator();var n=requireDomIterables(),e=requireGlobalThis(),t=requireSetToStringTag(),r=requireIterators();for(var i in n)t(e[i],i),r[i]=r.Array;return web_domCollections_iterator}var symbol$3,hasRequiredSymbol$3;function requireSymbol$3(){if(hasRequiredSymbol$3)return symbol$3;hasRequiredSymbol$3=1;var n=requireSymbol$4();return requireWeb_domCollections_iterator(),symbol$3=n,symbol$3}var esnext_function_metadata={},hasRequiredEsnext_function_metadata;function requireEsnext_function_metadata(){if(hasRequiredEsnext_function_metadata)return esnext_function_metadata;hasRequiredEsnext_function_metadata=1;var n=requireWellKnownSymbol(),e=requireObjectDefineProperty().f,t=n("metadata"),r=Function.prototype;return r[t]===void 0&&e(r,t,{value:null}),esnext_function_metadata}var esnext_symbol_asyncDispose={},hasRequiredEsnext_symbol_asyncDispose;function requireEsnext_symbol_asyncDispose(){if(hasRequiredEsnext_symbol_asyncDispose)return esnext_symbol_asyncDispose;hasRequiredEsnext_symbol_asyncDispose=1;var n=requireWellKnownSymbolDefine();return n("asyncDispose"),esnext_symbol_asyncDispose}var esnext_symbol_dispose={},hasRequiredEsnext_symbol_dispose;function requireEsnext_symbol_dispose(){if(hasRequiredEsnext_symbol_dispose)return esnext_symbol_dispose;hasRequiredEsnext_symbol_dispose=1;var n=requireWellKnownSymbolDefine();return n("dispose"),esnext_symbol_dispose}var esnext_symbol_metadata={},hasRequiredEsnext_symbol_metadata;function requireEsnext_symbol_metadata(){if(hasRequiredEsnext_symbol_metadata)return esnext_symbol_metadata;hasRequiredEsnext_symbol_metadata=1;var n=requireWellKnownSymbolDefine();return n("metadata"),esnext_symbol_metadata}var symbol$2,hasRequiredSymbol$2;function requireSymbol$2(){if(hasRequiredSymbol$2)return symbol$2;hasRequiredSymbol$2=1;var n=requireSymbol$3();return requireEsnext_function_metadata(),requireEsnext_symbol_asyncDispose(),requireEsnext_symbol_dispose(),requireEsnext_symbol_metadata(),symbol$2=n,symbol$2}var esnext_symbol_isRegisteredSymbol={},symbolIsRegistered,hasRequiredSymbolIsRegistered;function requireSymbolIsRegistered(){if(hasRequiredSymbolIsRegistered)return symbolIsRegistered;hasRequiredSymbolIsRegistered=1;var n=requireGetBuiltIn(),e=requireFunctionUncurryThis(),t=n("Symbol"),r=t.keyFor,i=e(t.prototype.valueOf);return symbolIsRegistered=t.isRegisteredSymbol||function(s){try{return r(i(s))!==void 0}catch{return!1}},symbolIsRegistered}var hasRequiredEsnext_symbol_isRegisteredSymbol;function requireEsnext_symbol_isRegisteredSymbol(){if(hasRequiredEsnext_symbol_isRegisteredSymbol)return esnext_symbol_isRegisteredSymbol;hasRequiredEsnext_symbol_isRegisteredSymbol=1;var n=require_export(),e=requireSymbolIsRegistered();return n({target:"Symbol",stat:!0},{isRegisteredSymbol:e}),esnext_symbol_isRegisteredSymbol}var esnext_symbol_isWellKnownSymbol={},symbolIsWellKnown,hasRequiredSymbolIsWellKnown;function requireSymbolIsWellKnown(){if(hasRequiredSymbolIsWellKnown)return symbolIsWellKnown;hasRequiredSymbolIsWellKnown=1;for(var n=requireShared(),e=requireGetBuiltIn(),t=requireFunctionUncurryThis(),r=requireIsSymbol(),i=requireWellKnownSymbol(),a=e("Symbol"),s=a.isWellKnownSymbol,l=e("Object","getOwnPropertyNames"),u=t(a.prototype.valueOf),o=n("wks"),f=0,d=l(a),h=d.length;f<h;f++)try{var y=d[f];r(a[y])&&i(y)}catch{}return symbolIsWellKnown=function(v){if(s&&s(v))return!0;try{for(var p=u(v),E=0,S=l(o),w=S.length;E<w;E++)if(o[S[E]]==p)return!0}catch{}return!1},symbolIsWellKnown}var hasRequiredEsnext_symbol_isWellKnownSymbol;function requireEsnext_symbol_isWellKnownSymbol(){if(hasRequiredEsnext_symbol_isWellKnownSymbol)return esnext_symbol_isWellKnownSymbol;hasRequiredEsnext_symbol_isWellKnownSymbol=1;var n=require_export(),e=requireSymbolIsWellKnown();return n({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:e}),esnext_symbol_isWellKnownSymbol}var esnext_symbol_customMatcher={},hasRequiredEsnext_symbol_customMatcher;function requireEsnext_symbol_customMatcher(){if(hasRequiredEsnext_symbol_customMatcher)return esnext_symbol_customMatcher;hasRequiredEsnext_symbol_customMatcher=1;var n=requireWellKnownSymbolDefine();return n("customMatcher"),esnext_symbol_customMatcher}var esnext_symbol_observable={},hasRequiredEsnext_symbol_observable;function requireEsnext_symbol_observable(){if(hasRequiredEsnext_symbol_observable)return esnext_symbol_observable;hasRequiredEsnext_symbol_observable=1;var n=requireWellKnownSymbolDefine();return n("observable"),esnext_symbol_observable}var esnext_symbol_isRegistered={},hasRequiredEsnext_symbol_isRegistered;function requireEsnext_symbol_isRegistered(){if(hasRequiredEsnext_symbol_isRegistered)return esnext_symbol_isRegistered;hasRequiredEsnext_symbol_isRegistered=1;var n=require_export(),e=requireSymbolIsRegistered();return n({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:e}),esnext_symbol_isRegistered}var esnext_symbol_isWellKnown={},hasRequiredEsnext_symbol_isWellKnown;function requireEsnext_symbol_isWellKnown(){if(hasRequiredEsnext_symbol_isWellKnown)return esnext_symbol_isWellKnown;hasRequiredEsnext_symbol_isWellKnown=1;var n=require_export(),e=requireSymbolIsWellKnown();return n({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:e}),esnext_symbol_isWellKnown}var esnext_symbol_matcher={},hasRequiredEsnext_symbol_matcher;function requireEsnext_symbol_matcher(){if(hasRequiredEsnext_symbol_matcher)return esnext_symbol_matcher;hasRequiredEsnext_symbol_matcher=1;var n=requireWellKnownSymbolDefine();return n("matcher"),esnext_symbol_matcher}var esnext_symbol_metadataKey={},hasRequiredEsnext_symbol_metadataKey;function requireEsnext_symbol_metadataKey(){if(hasRequiredEsnext_symbol_metadataKey)return esnext_symbol_metadataKey;hasRequiredEsnext_symbol_metadataKey=1;var n=requireWellKnownSymbolDefine();return n("metadataKey"),esnext_symbol_metadataKey}var esnext_symbol_patternMatch={},hasRequiredEsnext_symbol_patternMatch;function requireEsnext_symbol_patternMatch(){if(hasRequiredEsnext_symbol_patternMatch)return esnext_symbol_patternMatch;hasRequiredEsnext_symbol_patternMatch=1;var n=requireWellKnownSymbolDefine();return n("patternMatch"),esnext_symbol_patternMatch}var esnext_symbol_replaceAll={},hasRequiredEsnext_symbol_replaceAll;function requireEsnext_symbol_replaceAll(){if(hasRequiredEsnext_symbol_replaceAll)return esnext_symbol_replaceAll;hasRequiredEsnext_symbol_replaceAll=1;var n=requireWellKnownSymbolDefine();return n("replaceAll"),esnext_symbol_replaceAll}var symbol$1,hasRequiredSymbol$1;function requireSymbol$1(){if(hasRequiredSymbol$1)return symbol$1;hasRequiredSymbol$1=1;var n=requireSymbol$2();return requireEsnext_symbol_isRegisteredSymbol(),requireEsnext_symbol_isWellKnownSymbol(),requireEsnext_symbol_customMatcher(),requireEsnext_symbol_observable(),requireEsnext_symbol_isRegistered(),requireEsnext_symbol_isWellKnown(),requireEsnext_symbol_matcher(),requireEsnext_symbol_metadataKey(),requireEsnext_symbol_patternMatch(),requireEsnext_symbol_replaceAll(),symbol$1=n,symbol$1}var symbol,hasRequiredSymbol;function requireSymbol(){return hasRequiredSymbol||(hasRequiredSymbol=1,symbol=requireSymbol$1()),symbol}var symbolExports=requireSymbol();const _Symbol=getDefaultExportFromCjs(symbolExports);var es_string_iterator={},stringMultibyte,hasRequiredStringMultibyte;function requireStringMultibyte(){if(hasRequiredStringMultibyte)return stringMultibyte;hasRequiredStringMultibyte=1;var n=requireFunctionUncurryThis(),e=requireToIntegerOrInfinity(),t=requireToString(),r=requireRequireObjectCoercible(),i=n("".charAt),a=n("".charCodeAt),s=n("".slice),l=function(u){return function(o,f){var d=t(r(o)),h=e(f),y=d.length,m,v;return h<0||h>=y?u?"":void 0:(m=a(d,h),m<55296||m>56319||h+1===y||(v=a(d,h+1))<56320||v>57343?u?i(d,h):m:u?s(d,h,h+2):(m-55296<<10)+(v-56320)+65536)}};return stringMultibyte={codeAt:l(!1),charAt:l(!0)},stringMultibyte}var hasRequiredEs_string_iterator;function requireEs_string_iterator(){if(hasRequiredEs_string_iterator)return es_string_iterator;hasRequiredEs_string_iterator=1;var n=requireStringMultibyte().charAt,e=requireToString(),t=requireInternalState(),r=requireIteratorDefine(),i=requireCreateIterResultObject(),a="String Iterator",s=t.set,l=t.getterFor(a);return r(String,"String",function(u){s(this,{type:a,string:e(u),index:0})},function(){var o=l(this),f=o.string,d=o.index,h;return d>=f.length?i(void 0,!0):(h=n(f,d),o.index+=h.length,i(h,!1))}),es_string_iterator}var iterator$4,hasRequiredIterator$4;function requireIterator$4(){if(hasRequiredIterator$4)return iterator$4;hasRequiredIterator$4=1,requireEs_array_iterator(),requireEs_string_iterator(),requireEs_symbol_iterator();var n=requireWellKnownSymbolWrapped();return iterator$4=n.f("iterator"),iterator$4}var iterator$3,hasRequiredIterator$3;function requireIterator$3(){if(hasRequiredIterator$3)return iterator$3;hasRequiredIterator$3=1;var n=requireIterator$4();return requireWeb_domCollections_iterator(),iterator$3=n,iterator$3}var iterator$2,hasRequiredIterator$2;function requireIterator$2(){if(hasRequiredIterator$2)return iterator$2;hasRequiredIterator$2=1;var n=requireIterator$3();return iterator$2=n,iterator$2}var iterator$1,hasRequiredIterator$1;function requireIterator$1(){if(hasRequiredIterator$1)return iterator$1;hasRequiredIterator$1=1;var n=requireIterator$2();return iterator$1=n,iterator$1}var iterator,hasRequiredIterator;function requireIterator(){return hasRequiredIterator||(hasRequiredIterator=1,iterator=requireIterator$1()),iterator}var iteratorExports=requireIterator();const _Symbol$iterator=getDefaultExportFromCjs(iteratorExports);function _typeof$1(n){"@babel/helpers - typeof";return _typeof$1=typeof _Symbol=="function"&&typeof _Symbol$iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof _Symbol=="function"&&e.constructor===_Symbol&&e!==_Symbol.prototype?"symbol":typeof e},_typeof$1(n)}var toPrimitive$5,hasRequiredToPrimitive$4;function requireToPrimitive$4(){if(hasRequiredToPrimitive$4)return toPrimitive$5;hasRequiredToPrimitive$4=1,requireEs_symbol_toPrimitive();var n=requireWellKnownSymbolWrapped();return toPrimitive$5=n.f("toPrimitive"),toPrimitive$5}var toPrimitive$4,hasRequiredToPrimitive$3;function requireToPrimitive$3(){if(hasRequiredToPrimitive$3)return toPrimitive$4;hasRequiredToPrimitive$3=1;var n=requireToPrimitive$4();return toPrimitive$4=n,toPrimitive$4}var toPrimitive$3,hasRequiredToPrimitive$2;function requireToPrimitive$2(){if(hasRequiredToPrimitive$2)return toPrimitive$3;hasRequiredToPrimitive$2=1;var n=requireToPrimitive$3();return toPrimitive$3=n,toPrimitive$3}var toPrimitive$2,hasRequiredToPrimitive$1;function requireToPrimitive$1(){if(hasRequiredToPrimitive$1)return toPrimitive$2;hasRequiredToPrimitive$1=1;var n=requireToPrimitive$2();return toPrimitive$2=n,toPrimitive$2}var toPrimitive$1,hasRequiredToPrimitive;function requireToPrimitive(){return hasRequiredToPrimitive||(hasRequiredToPrimitive=1,toPrimitive$1=requireToPrimitive$1()),toPrimitive$1}var toPrimitiveExports=requireToPrimitive();const _Symbol$toPrimitive=getDefaultExportFromCjs(toPrimitiveExports);function toPrimitive(n,e){if(_typeof$1(n)!="object"||!n)return n;var t=n[_Symbol$toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(_typeof$1(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function toPropertyKey(n){var e=toPrimitive(n,"string");return _typeof$1(e)=="symbol"?e:e+""}function _defineProperty(n,e,t){return(e=toPropertyKey(e))in n?_Object$defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function ownKeys(n,e){var t=_Object$keys(n);if(_Object$getOwnPropertySymbols){var r=_Object$getOwnPropertySymbols(n);e&&(r=_filterInstanceProperty(r).call(r,function(i){return _Object$getOwnPropertyDescriptor(n,i).enumerable})),_pushInstanceProperty(t).apply(t,r)}return t}function _objectSpread2(n){for(var e=1;e<arguments.length;e++){var t,r,i=arguments[e]!=null?arguments[e]:{};e%2?_forEachInstanceProperty(t=ownKeys(Object(i),!0)).call(t,function(a){_defineProperty(n,a,i[a])}):_Object$getOwnPropertyDescriptors?_Object$defineProperties(n,_Object$getOwnPropertyDescriptors(i)):_forEachInstanceProperty(r=ownKeys(Object(i))).call(r,function(a){_Object$defineProperty(n,a,_Object$getOwnPropertyDescriptor(i,a))})}return n}function generateModulesList(n,e,t){return[{data_type:"text",name:"Text",icon:"text_icon",url:e+"/"+n+"text_data.js",type:"gh_element",technology:"angular"},{data_type:"text_opt",name:"Options",icon:"option_gh_element",url:e+"/"+n+"text_options_data.js",type:"gh_element",technology:"angular"},{data_type:"number",name:"Number",icon:"number",url:e+"/"+n+"number_data.js",type:"gh_element",technology:"angular"},{data_type:"task_board",name:"Task Board",icon:"task_board",url:e+"/"+n+"task_board_data.js",type:"gh_element",technology:"angular"},{data_type:"visualizer",name:"visualizer",icon:"visualizer",url:e+"/"+n+"visualizer_data.js",type:"gh_element",technology:"angular"},{data_type:"enterprice_visualizer",name:"Enterprice Visualizer",icon:"visualizer",private:!0,url:e+"/"+n+"enterprice_visualizer_data.js",type:"gh_element",technology:"angular"},{data_type:"email",name:"Email",icon:"email",url:e+"/"+n+"email_data.js",type:"gh_element",technology:"angular"},{data_type:"date",name:"Date",icon:"date_gh_element",url:e+"/"+n+"date_data.js",type:"gh_element",technology:"angular"},{data_type:"radio_button",name:"Radio Button",icon:"radio_button_gh_element",url:e+"/"+n+"radio_button_data.js",type:"gh_element",technology:"angular"},{data_type:"radio_icon",name:"Radio icon",icon:"radio_icon_gh_element",url:e+"/"+n+"radio_icon_data.js",type:"gh_element",technology:"angular"},{data_type:"twilio_phone",name:"Twilio Phone",icon:"phone_twilio_gh_element",url:e+"/"+n+"twilio_phone_data.js",type:"gh_element",technology:"angular"},{data_type:"twilio_autodialer",name:"Twilio Auto Dialer",icon:"twilio_dialer",url:e+"/"+n+"twillio_autodialer_data.js",type:"gh_element",technology:"angular"},{data_type:"color",name:"Color",icon:"paint_gh_element",url:e+"/"+n+"color_data.js",type:"gh_element",technology:"angular"},{data_type:"charts",name:"Charts",icon:"graph_gh_element",url:e+"/"+n+"charts_data.js",type:"gh_element",technology:"angular"},{data_type:"funnel_chart",name:"Funnel chart",icon:"funnel_chart_gh_element",url:e+"/"+n+"funnel_chart_data.js",type:"gh_element",technology:"angular"},{data_type:"add_items_from_template",name:"Add items from template",icon:"contact_second",url:e+"/"+n+"add_items_from_template_data.js",type:"gh_element",technology:"angular"},{data_type:"item_ref",name:"Reference",icon:"reference",url:e+"/"+n+"itemRef_data.js",type:"gh_element",technology:"angular"},{data_type:"calendar",name:"Calendar",icon:"calendar",js:"https://gudhub.com/modules/FullCalendar-Gh-Element/dist/main.js?t=4",css:"https://gudhub.com/modules/FullCalendar-Gh-Element/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"data_ref",name:"Data Reference",icon:"data_reference",url:e+"/"+n+"data_ref_data.js",type:"gh_element",technology:"angular"},{data_type:"table",name:"Table",icon:"table",url:e+"/"+n+"table_data.js",type:"gh_element",technology:"angular"},{data_type:"tile",name:"Tile table",icon:"tile_table",url:e+"/"+n+"tile_data.js",type:"gh_element",technology:"angular"},{data_type:"file",name:"File",icon:"box",url:e+"/"+n+"file_data.js",type:"gh_element",technology:"angular"},{data_type:"image",name:"Image",icon:"image",url:e+"/"+n+"image_data.js",type:"gh_element",technology:"angular"},{data_type:"text_editor",name:"Text Editor",icon:"square",url:e+"/"+n+"text_editor_data.js",type:"gh_element",technology:"angular"},{data_type:"tinymse",name:"Text editor MSE",icon:"tag",url:e+"/"+n+"tinymse_data.js",type:"gh_element",technology:"angular"},{data_type:"duration",name:"Duration",icon:"number_gh_element",url:e+"/"+n+"duration_data.js",type:"gh_element",technology:"angular"},{data_type:"user",name:"User",icon:"user_gh_element",url:e+"/"+n+"user_data.js",type:"gh_element",technology:"angular"},{data_type:"app",name:"App",icon:"app",url:e+"/"+n+"application_data.js",type:"gh_element",technology:"angular"},{data_type:"field",name:"Field",icon:"field_gh_element",url:e+"/"+n+"field_data.js",type:"gh_element",technology:"angular"},{data_type:"available",name:"Available",icon:"availible_gh_element",url:e+"/"+n+"available_data.js",type:"gh_element",technology:"angular"},{data_type:"view_list",name:"View List",icon:"view_list",url:e+"/"+n+"view_list_data.js",type:"gh_element",technology:"angular"},{data_type:"calculator",name:"Calculator",icon:"calculator",url:e+"/"+n+"calculator_data.js",type:"gh_element",technology:"angular"},{data_type:"string_join",name:"String Joiner",icon:"string_join_gh_element",url:e+"/"+n+"string_joiner_data.js",type:"gh_element",technology:"angular"},{data_type:"signature",name:"Signature",icon:"signature",url:e+"/"+n+"signature_data.js",type:"gh_element",technology:"angular"},{data_type:"sendEmail",name:"Send Email",icon:"send_email_gh_element",url:e+"/"+n+"send_email_data.js",type:"gh_element",technology:"angular"},{data_type:"boolean",name:"Yes/No",icon:"boolen_gh_element",url:e+"/"+n+"boolean_data.js",type:"gh_element",technology:"angular"},{data_type:"product_gallery",name:"Product gallery",icon:"product_gallery",url:e+"/"+n+"product_gallery_data.js",type:"gh_element",technology:"angular"},{data_type:"online_inventory",name:"Online inventory",icon:"slab",url:e+"/"+n+"online_inventory_data.js",type:"gh_element",technology:"angular"},{data_type:"3d_edges",name:"3D Edges",icon:"3d_edges_gh_element",url:e+"/"+n+"3d_edges_data.js",type:"gh_element",technology:"angular"},{data_type:"color_list",name:"Color list",icon:"circular_gh_element",url:e+"/"+n+"color_list_data.js",type:"gh_element",technology:"angular"},{data_type:"go_to_link",name:"Go to Link",icon:"go_to_link",url:e+"/"+n+"go_to_link_data.js",type:"gh_element",technology:"angular"},{data_type:"go_to_view",name:"Go to View",icon:"go_to_view",url:e+"/"+n+"go_to_view_data.js",type:"gh_element",technology:"angular"},{data_type:"range",name:"Range",icon:"range_gh_element",url:e+"/"+n+"range_data.js",type:"gh_element",technology:"angular"},{data_type:"barcode",name:"Barcode",icon:"barcode_gh_element",url:e+"/"+n+"barcode_data.js",type:"gh_element",technology:"angular"},{data_type:"item_remote_add",name:"Item remote add",icon:"remote_add_gh_element",url:e+"/"+n+"item_remote_add_data.js",type:"gh_element",technology:"angular"},{data_type:"item_remote_update",name:"Item remote update",icon:"remote_update_gh_element",url:e+"/"+n+"item_remote_update_data.js",type:"gh_element",technology:"angular"},{data_type:"timeline",name:"Timeline",icon:"timeline",url:e+"/"+n+"timeline_data.js",type:"gh_element",technology:"angular"},{data_type:"delete_item",name:"Delete Item",icon:"rubbish",url:e+"/"+n+"delete_action.js",type:"gh_element",technology:"angular"},{data_type:"print_doc",name:"Print document",icon:"print",url:e+"/"+n+"print_doc_action.js",type:"gh_element",technology:"angular"},{data_type:"open_item",name:"Open Item",icon:"delete",private:!0,url:e+"/"+n+"open_item_action.js",type:"gh_element",technology:"angular"},{data_type:"edit_template",name:"Edit template",icon:"delete",private:!0,url:e+"/"+n+"edit_template_action.js",type:"gh_element",technology:"angular"},{data_type:"open_app",private:!0,name:"Open App",icon:"delete",url:e+"/"+n+"open_app_action.js",type:"gh_element",technology:"angular"},{data_type:"user_settings",private:!0,name:"User Settings",icon:"delete",url:e+"/"+n+"user_settings_action.js",type:"gh_element",technology:"angular"},{data_type:"app_sharing",name:"Sharing",icon:"sharing",url:e+"/"+n+"sharing_action.js",type:"gh_element",technology:"angular"},{data_type:"app_constructor",private:!0,name:"App constructor",icon:"app_constructor",url:e+"/"+n+"app_constructor_action.js",type:"gh_element",technology:"angular"},{data_type:"app_settings",name:"App Settings",icon:"configuration",url:e+"/"+n+"app_settings_action.js",type:"gh_element",technology:"angular"},{data_type:"export_csv",name:"Export CSV",icon:"export_csv",url:e+"/"+n+"export_csv.js",type:"gh_element",technology:"angular"},{data_type:"import_csv",name:"Import CSV",icon:"import_csv",url:e+"/"+n+"import_csv.js",type:"gh_element",technology:"angular"},{data_type:"add_items",name:"Add Items",icon:"plus",url:e+"/"+n+"add_items_action.js",type:"gh_element",technology:"angular"},{data_type:"update_items",name:"Update Items",icon:"update",url:e+"/"+n+"update_items_action.js",type:"gh_element",technology:"angular"},{data_type:"install_app",name:"Install",icon:"install",url:e+"/"+n+"install_app_action.js",type:"gh_element",technology:"angular"},{data_type:"search_action",name:"Search",icon:"search",url:e+"/"+n+"search_action.js",type:"gh_element",technology:"angular"},{data_type:"filter_table",name:"Table filter",icon:"filter",url:e+"/"+n+"filter_table_action.js",type:"gh_element",technology:"angular"},{data_type:"slider",name:"Slider",icon:"slider",url:e+"/"+n+"slider_data.js",type:"gh_element",technology:"angular"},{data_type:"clone_item",name:"Clone Item",icon:"double_plus",url:e+"/"+n+"clone_item_action.js",type:"gh_element",technology:"angular"},{data_type:"close",name:"Close",icon:"cross",url:e+"/"+n+"close_action.js",type:"gh_element",technology:"angular"},{data_type:"phone",name:"Phone",icon:"phone_thin",url:e+"/"+n+"phone_data.js",type:"gh_element",technology:"angular"},{data_type:"link",name:"Link",icon:"link_gh_element",url:e+"/"+n+"link_data.js",type:"gh_element",technology:"angular"},{data_type:"sheduling",name:"Sheduling",icon:"scheduling",url:e+"/"+n+"sheduling_data.js",type:"gh_element",technology:"angular"},{data_type:"qrcode",name:"QR Code",icon:"qr_code",url:e+"/"+n+"qrcode_data.js",type:"gh_element",technology:"angular"},{data_type:"graph2d",name:"Graph",icon:"graph",url:e+"/"+n+"graph2d_data.js",type:"gh_element",technology:"angular"},{data_type:"quote_tool",name:"Quote tool",icon:"quoters",url:e+"/"+n+"quote_tool_data.js",type:"gh_element",technology:"angular"},{data_type:"cards",name:"Cards",icon:"cards",url:e+"/"+n+"cards_data.js",type:"gh_element",technology:"angular"},{data_type:"jsonConstructor",name:"Json Constructor",icon:"button",url:e+"/"+n+"json_constructor_data.js",type:"gh_element",technology:"angular"},{data_type:"button",name:"Button",icon:"button",js:"https://gudhub.com/modules/button_action/button_action.js?t=1",type:"gh_element",technology:"class"},{data_type:"editorjs",name:"EditorJS",icon:"code_editor",js:"https://gudhub.com/modules/Editor-Js/dist/main.js?t=2",css:"https://gudhub.com/modules/Editor-Js/dist/style.css?t=2",type:"gh_element",technology:"class"},{data_type:"filter_advanced",name:"Filter Advanced",icon:"filter_advanced",url:e+"/"+n+"filter_advanced_data.js",type:"gh_element",technology:"angular"},{data_type:"code_editor",name:"Code Editor",icon:"code_editor",url:e+"/"+n+"code_editor_data.js",type:"gh_element",technology:"angular"},{data_type:"icon",name:"Icon",icon:"icon_gh_element",url:e+"/"+n+"icon_data.js",type:"gh_element",technology:"angular"},{data_type:"quoteRequest",name:"Quote Request",icon:"invoices",url:e+"/"+n+"quote_request_data.js",type:"gh_element",technology:"angular"},{data_type:"view_container",name:"View Container",icon:"pencil",url:e+"/"+n+"view_container_data.js",type:"gh_element",technology:"angular"},{data_type:"element_ref",name:"Element Reference",icon:"cloudSync_gh_element",url:e+"/"+n+"element_ref_data.js",type:"gh_element",technology:"angular"},{data_type:"quote_tool_objects_renderer",name:"Quote Tool Renderer",icon:"l_counter",url:e+"/"+n+"quote_tool_objects_renderer_data.js",type:"gh_element",technology:"angular"},{data_type:"quote_tool_objects_renderer_generator",name:"Quote Tool Parts Generator",icon:"l_counter_arrow",url:e+"/"+n+"quote_tool_objects_renderer_generator_data.js",type:"gh_element",technology:"angular"},{data_type:"trigger",name:"Trigger",icon:"job",url:e+"/"+n+"trigger_data.js",type:"gh_element",technology:"angular"},{data_type:"voting",name:"Voting",icon:"like_gh_element",url:e+"/"+n+"voting_data.js",type:"gh_element",technology:"angular"},{data_type:"view_tabs",name:"View Tab",icon:"tabs",url:e+"/"+n+"view_tabs.js",type:"gh_element",technology:"angular"},{data_type:"filter_tabs",name:"Filter Tabs",icon:"filter_tabs_gh_element",url:e+"/"+n+"filter_tabs.js",type:"gh_element",technology:"angular"},{data_type:"gps_coords",name:"GPS Coords",icon:"location_gh_element",url:e+"/"+n+"gps_coords.js",type:"gh_element",technology:"angular"},{data_type:"google_map",name:"Google Map",icon:"location",url:e+"/"+n+"google_map_data.js",type:"gh_element",technology:"angular"},{data_type:"data_migrations",name:"Data migrations",icon:"view_list_gh_element",url:e+"/"+n+"data_migrations.js",type:"gh_element",technology:"angular"},{data_type:"additional_settings",name:"Additional Settings",icon:"",private:!0,url:e+"/"+n+"gh_additional_settings_data.js",type:"gh_element",technology:"angular"},{data_type:"send_request",name:"Send Request",icon:"send_request_gh_element",url:e+"/"+n+"send_request_data.js",type:"gh_element",technology:"angular"},{data_type:"webcam",name:"Web camera",icon:"webcam_gh_element",url:e+"/"+n+"webcam_data.js",type:"gh_element",technology:"angular"},{data_type:"json_viewer",name:"JSON viewer",icon:"json_gh_element",url:e+"/"+n+"json_viewer_data.js",type:"gh_element",technology:"angular"},{data_type:"notifications",name:"Notifications",icon:"full_gh_element",url:e+"/"+n+"notifications_data.js",type:"gh_element",technology:"angular"},{data_type:"api",name:"API",icon:"job",url:e+"/"+n+"api_data.js",type:"gh_element",technology:"angular"},{data_type:"smart_input",name:"Smart Input",icon:"roket",url:e+"/"+n+"smart_input_data.js",type:"gh_element",technology:"angular"},{data_type:"json_editor",name:"JSON Editor",icon:"code",url:e+"/"+n+"json_editor_data.js",type:"gh_element",technology:"angular"},{data_type:"grapes_html_editor",name:"Grapes Html Editor",icon:"code_editor",url:e+"/"+n+"grapes_html_editor_data.js",type:"gh_element",technology:"angular"},{data_type:"quiz",name:"Quiz",icon:"quiz_gh_element",url:e+"/"+n+"quiz_data.js",type:"gh_element",technology:"angular"},{data_type:"password_input",name:"Password",icon:"lock_gh_element",url:e+"/"+n+"password_input_data.js",type:"gh_element",technology:"angular"},{data_type:"vs_code",name:"VS Code",icon:"code_editor",url:e+"/"+n+"vs_code_data.js",type:"gh_element",technology:"angular"},{data_type:"nested_list",name:"Nested List",icon:"scheduling",js:"https://gudhub.com/modules/Nested-List/dist/main.js?t=2",css:"https://gudhub.com/modules/Nested-List/dist/style.css?t=2",type:"gh_element",technology:"class"},{data_type:"countertop_smart_quote",name:"Countertop Smart Quote",icon:"quoters",url:e+"/"+n+"countertop_smart_quote_data.js",type:"gh_element",technology:"angular"},{data_type:"markdown_viewer",name:"Markdown viewer",icon:"code_editor",js:"https://gudhub.com/modules/markdown-it-gh-element/dist/main.js?t=1",css:"https://gudhub.com/modules/markdown-it-gh-element/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"html_viewer",name:"HTML Viewer",icon:"code_editor",js:"https://gudhub.com/modules/HTML-Viewer/dist/main.js?t=1",css:"https://gudhub.com/modules/HTML-Viewer/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"element_customizer",name:"Element Customizer",icon:"pencil",url:e+"/"+n+"element_customizer_data.js",type:"gh_element",technology:"angular"},{data_type:"task",name:"Task",icon:"table",url:e+"/"+n+"task_data.js",type:"gh_element",technology:"angular"},{data_type:"cron_picker",name:"Cron Picker",icon:"table",js:"https://gudhub.com/modules/Cron-Picker/dist/main.js?t=2",css:"https://gudhub.com/modules/Cron-Picker/dist/style.css?t=2",type:"gh_element",technology:"class"},{data_type:"balance_sheet",name:"Balance Sheet",icon:"table",js:"https://gudhub.com/modules/balance-sheet/dist/main.js?t=2",css:"https://gudhub.com/modules/balance-sheet/dist/style.css?t=2",type:"gh_element",technology:"class"},{data_type:"quote_form",name:"Quote Form",icon:"table",js:"https://gudhub.com/modules/countertop-quote-form/dist/main.js",css:"https://gudhub.com/modules/countertop-quote-form/dist/style.css",type:"gh_element",technology:"class"},{data_type:"static_nested_list",name:"Nested Filter",icon:"scheduling",js:"https://gudhub.com/modules/nested-filter/dist/main.js?t=1",css:"https://gudhub.com/modules/nested-filter/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"conversations",name:"Conversations",icon:"timeline",js:"https://gudhub.com/modules/conversation/dist/main.js?t=1",css:"https://gudhub.com/modules/conversation/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"study_journal",name:"Study Journal",icon:"timeline",js:"https://gudhub.com/modules/Study-Journal/dist/main.js?t=1",css:"https://gudhub.com/modules/Study-Journal/dist/style.css",type:"gh_element",technology:"class"},{data_type:"study_schedule",name:"Study Schedule",icon:"timeline",js:"https://gudhub.com/modules/Study-Schedule/dist/main.js?t=1",css:"https://gudhub.com/modules/Study-Schedule/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"avatar",name:"Avatar",icon:"user",js:"https://gudhub.com/modules/Gh-Avatar/dist/main.js?t=1",css:"https://gudhub.com/modules/Gh-Avatar/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"text_area",name:"Text Area",icon:"text_icon",js:"https://gudhub.com/modules/text-area-ghe/dist/main.js?t=3",css:"https://gudhub.com/modules/text-area-ghe/dist/style.css",type:"gh_element",technology:"class"},{data_type:"resource_calendar",name:"Resource Сalendar",icon:"calendar",url:e+"/"+n+"resource_calendar_data.js",type:"gh_element",technology:"angular"},{data_type:"visualizer_with_control_panel",name:"Visualizer With Control Panel",icon:"visualizer",url:e+"/"+n+"visualizer_with_control_panel_data.js",type:"gh_element",technology:"angular"},{data_type:"API",name:"API",url:e+"/"+t+"api_node.js",type:"automation",icon:"automation_api",private:!0},{data_type:"Calculator",name:"Calculator",url:e+"/"+t+"calculator.js",type:"automation",icon:"automation_calculator"},{data_type:"CompareItems",name:"Compare Items",url:e+"/"+t+"compare_items.js",type:"automation",icon:"automation_compare_items"},{data_type:"Constants",name:"Constants",url:e+"/"+t+"constants.js",type:"automation",icon:"automation_constants"},{data_type:"CreateFiles",name:"Create Files",url:e+"/"+t+"create_files.js",type:"automation",icon:"automation_create_files"},{data_type:"CreateItemsApi",name:"Create Items Api",url:e+"/"+t+"create_item_api.js",type:"automation",icon:"automation_create_items_api"},{data_type:"FileDuplicate",name:"File Duplicate",url:e+"/"+t+"file_duplicate.js",type:"automation",icon:"automation_file_duplicate"},{data_type:"Filter",name:"Filter",url:e+"/"+t+"filter_node.js",type:"automation",icon:"filter"},{data_type:"GetItemByItemRef",name:"Get Item By Item Ref",url:e+"/"+t+"get_item_by_item_ref.js",type:"automation",icon:"automation_get_item_by_item_ref"},{data_type:"GetItems",name:"Get Items",url:e+"/"+t+"get_items.js",type:"automation",icon:"automation_get_items"},{data_type:"GhElementNode",name:"Gh Element Node",url:e+"/"+t+"gh_element_node.js",type:"automation",icon:"automation_gh_element_node",private:!0,created_for:["GhElement"]},{data_type:"IfCondition",name:"If Condition",url:e+"/"+t+"if_condition.js",type:"automation",icon:"automation_if_condition"},{data_type:"ItemConstructor",name:"Item Constructor",url:e+"/"+t+"item_constructor.js",type:"automation",icon:"automation_item_constructor"},{data_type:"ItemDestructor",name:"Item Destructor",url:e+"/"+t+"item_destructor.js",type:"automation",icon:"automation_item_destructor"},{data_type:"JSONScheme",name:"JSON Scheme",url:e+"/"+t+"json_scheme.js",type:"automation",icon:"automation_json_scheme"},{data_type:"MergeItems",name:"Merge Items",url:e+"/"+t+"merge_items.js",type:"automation",icon:"automation_merge_items"},{data_type:"MessageConstructor",name:"Message Constructor",url:e+"/"+t+"message_constructor.js",type:"automation",icon:"automation_message_constructor"},{data_type:"ObjectToItem",name:"Object To Item",url:e+"/"+t+"obj_to_item.js",type:"automation",icon:"automation_object_to_item"},{data_type:"ObjectConstructor",name:"Object Constructor",url:e+"/"+t+"object_constructor.js",type:"automation",icon:"automation_object_constructor"},{data_type:"ObjectDestructor",name:"Object Destructor",url:e+"/"+t+"object_destructor.js",type:"automation",icon:"automation_object_destructor"},{data_type:"PopulateElement",name:"Populate Element",url:e+"/"+t+"populate_element.js",type:"automation",icon:"automation_populate_element",private:!0,created_for:["GhElement"]},{data_type:"PopulateItems",name:"Populate Items",url:e+"/"+t+"populate_items.js",type:"automation",icon:"automation_populate_items"},{data_type:"PopulateWithDate",name:"Populate With Date",url:e+"/"+t+"populate_with_date.js",type:"automation",icon:"automation_populate_with_date"},{data_type:"PopulateWithItemRef",name:"Populate with Item Ref",url:e+"/"+t+"populate_with_item_ref.js",type:"automation",icon:"automation_populate_with_item_ref"},{data_type:"PopUpForm",name:"Pop Up Form",url:e+"/"+t+"popup_form.js",type:"automation",icon:"automation_pop_up_form",private:!0,created_for:["Quiz","GhElement","SmartInput","Iterator"]},{data_type:"QuizForm",name:"Quiz Form",url:e+"/"+t+"quiz_form.js",type:"automation",icon:"automation_quiz_form",private:!0,created_for:["Quiz"]},{data_type:"QuizNode",name:"Quiz Node",url:e+"/"+t+"quiz_node.js",type:"automation",icon:"automation_quiz_node",private:!0},{data_type:"Request",name:"Request",url:e+"/"+t+"request_node.js",type:"automation",icon:"automation_request"},{data_type:"Response",name:"Response",url:e+"/"+t+"response_node.js",type:"automation",icon:"automation_response",private:!0,created_for:["API"]},{data_type:"SmartInput",name:"Smart Input",url:e+"/"+t+"smart_input.js",type:"automation",icon:"automation_smart_input",private:!0},{data_type:"Trigger",name:"Trigger",url:e+"/"+t+"trigger_node.js",type:"automation",icon:"automation_trigger",private:!0},{data_type:"TwilioSMS",name:"Twilio SMS",url:e+"/"+t+"twilio_sms.js",type:"automation",icon:"automation_twilio"},{data_type:"TwilioAuth",name:"Twilio Auth",url:e+"/"+t+"twilio_auth.js",type:"automation",icon:"table"},{data_type:"TwilioDevice",name:"Twilio Device",url:e+"/"+t+"twilio_device.js",type:"automation",icon:"table"},{data_type:"UpdateItemsApi",name:"Update Items Api",url:e+"/"+t+"update_items_api.js",type:"automation",icon:"automation_update_items_api"},{data_type:"GoogleCalendar",name:"Google Calendar",url:e+"/"+t+"google_calendar.js",type:"automation",icon:"calendar"},{data_type:"VerifyEmail",name:"Verify email",url:e+"/"+t+"verify_email.js",type:"automation",icon:"check_in_circle"},{data_type:"Iterator",name:"Iterator",url:e+"/"+t+"iterator.js",type:"automation",icon:"update"},{data_type:"IteratorInput",name:"Iterator Input",url:e+"/"+t+"iterator_input.js",type:"automation",icon:"arrow_right",private:!0},{data_type:"IteratorOutput",name:"Iterator Output",url:e+"/"+t+"iterator_output.js",type:"automation",icon:"arrow_right",private:!0},{data_type:"SendEmail",name:"Send email",url:e+"/"+t+"send_email.js",type:"automation",icon:"email"},{data_type:"FileReader",name:"File Reader",url:e+"/"+t+"file_reader.js",type:"automation",icon:"file"},{data_type:"WebsitesChecker",name:"Websites Checker",url:e+"/"+t+"websites_checker.js",type:"automation",icon:"world"},{data_type:"VoiceMachineDetection",name:"Voice Machine Detection",url:e+"/"+t+"voice_machine_detection.js",type:"automation",icon:"automation_calculator"},{data_type:"Task",name:"Task",url:e+"/"+t+"task.js",type:"automation",icon:"automation_calculator",private:!0},{data_type:"DeleteItems",name:"Delete Items",url:e+"/"+t+"delete_items.js",type:"automation",icon:"rubbish"},{data_type:"GoToItem",name:"Go To Item",url:e+"/"+t+"go_to_item.js",type:"automation",icon:"cursor_point"},{data_type:"FireWorks",name:"Fire Works",url:e+"/"+t+"fireworks_node.js",type:"automation",icon:"weeding_party"},{data_type:"SendMessage",name:"Send Message",url:e+"/"+t+"send_message.js",type:"automation",icon:"speech_bubble"},{data_type:"TurboSMS",name:"Turbo SMS",url:e+"/"+t+"turbo_sms.js",type:"automation",icon:"email"},{data_type:"JsCode",name:"Js Code",url:e+"/"+t+"js_code.js",type:"automation",icon:"code_editor"}]}class Storage{constructor(e,t,r){this.apps_list=[],this.users_list=[],this.user={},this.modulesList=generateModulesList(e,t,r),this.ghComponentsPromises=[]}getMainStorage(){return this}getAppsList(){return this.apps_list}getUser(){return this.user}getUsersList(){return this.users_list}getModulesList(e,t,r){return typeof e>"u"?this.modulesList:t==!1?this.modulesList.filter(i=>i.created_for?i.type===e&&i.private&&i.created_for.includes(r):i.type===e&&!i.private):this.modulesList.filter(i=>i.type===e)}getModuleUrl(e){return this.modulesList.find(t=>t.data_type==e)}setUser(e){this.user=e,this.users_list.push(e)}updateUser(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.avatar_128&&(e.avatar_128=e.avatar_128+"?"+new Date().getTime()),e.avatar_512&&(e.avatar_512=e.avatar_512+"?"+new Date().getTime()),this.user=_objectSpread2(_objectSpread2({},this.user),e),this.users_list=this.users_list.filter(t=>t.user_id!=e.user_id),this.users_list.push(this.user)}unsetUser(){this.user={}}getApp(e){for(let t=0;t<this.apps_list.length;t++)if(this.apps_list[t].app_id==e)return this.apps_list[t]}unsetApps(){this.apps_list=[]}updateApp(e){return this.apps_list=this.apps_list.map(t=>t.app_id==e.app_id?e:t),this.apps_list}deleteApp(e){return this.apps_list=this.apps_list.filter(t=>t.app_id!=e),this.apps_list}async updateItemsInApp(e,t){const r=await this.getApp(t);return r&&(r.items_list=updateItems(e,r.items_list,this.pipeService.emit.bind(this.pipeService),t),this.updateApp(r)),r}async addItemsToApp(e,t){const r=await this.getApp(t);return r&&(r.items_list.push(...e),this.updateApp(r),this.pipeService.emit("gh_items_update",{app_id:t},e)),r}async deleteItemsInApp(e,t){const r=await this.getApp(t);return r&&(r.items_list=r.items_list.filter(i=>!e.find(a=>a.item_id==i.item_id)),this.updateApp(r)),r}}var browser,hasRequiredBrowser;function requireBrowser(){return hasRequiredBrowser||(hasRequiredBrowser=1,browser=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}),browser}var browserExports=requireBrowser();const Websocket=getDefaultExportFromCjs(browserExports),IS_BROWSER_MAIN_THREAD=![typeof window,typeof document].includes("undefined"),IS_BROWSER_WORKER=typeof self=="object"&&typeof WorkerGlobalScope<"u",IS_BROWSER=IS_BROWSER_MAIN_THREAD||IS_BROWSER_WORKER;typeof process<"u"&&process.versions!=null&&process.versions.node!=null;class WebSocketApi{constructor(e,t){this.websocket=null,this.connected=!1,this.queue=[],this.url=e,this.auth=t,this.heartBeatTimeStemp=1e13,this.ALLOWED_HEART_BEAT_DELEY=12e3,this.firstHeartBeat=!0,this.reload=!0,this.isBrowser=IS_BROWSER}async addSubscription(e){const t=await this.auth.getToken(),r="token=".concat(t,"/~/app_id=").concat(e);this.connected&&this.websocket.send(r),this.queue.push(e)}async onOpen(){this.reload=!0,console.log("websocket opened"),this.connected=!0;const e=await this.auth.getToken();this.queue.forEach(t=>{const r="token=".concat(e,"/~/app_id=").concat(t);this.websocket.send(r)})}onError(e){console.log("websocket error: ",e),this.websocket.close()}onClose(){console.log("websocket close"),this.connected=!1;try{this.initWebSocket(this.onMassageHandler,this.refreshAppsHandler)}catch(e){console.log(e)}}async onMessage(e){const t=this.isBrowser?e.data:e;if(t.match(/HeartBeat/)){const r=new Date().getTime()-this.heartBeatTimeStemp;this.ALLOWED_HEART_BEAT_DELEY<r?await this.onConnectionLost():(this.websocket.send("HeartBeat"),this.heartBeatTimeStemp=new Date().getTime())}if(this.firstHeartBeat&&(this.connectionChecker(),this.firstHeartBeat=!1),t.match(/[{}]/)){let r=JSON.parse(t);const i=await this.auth.getToken();r.token!=i&&this.onMassageHandler(r)}}initWebSocket(e,t){this.onMassageHandler=e,this.refreshAppsHandler=t,this.isBrowser?(this.websocket=new WebSocket(this.url),this.websocket.onopen=this.onOpen.bind(this),this.websocket.onerror=this.onError.bind(this),this.websocket.onclose=this.onClose.bind(this),this.websocket.onmessage=this.onMessage.bind(this)):(this.websocket=new Websocket(this.url),this.websocket.on("open",this.onOpen),this.websocket.on("error",this.onError),this.websocket.on("close",this.onClose),this.websocket.on("message",this.onMessage)),console.log("websocket initialized")}connectionChecker(){setInterval(async()=>{let e=new Date().getTime()-this.heartBeatTimeStemp;this.ALLOWED_HEART_BEAT_DELEY<e&&await this.onConnectionLost()},1e3)}async onConnectionLost(){try{await this.auth.getVersion(),this.reload&&(this.reload=!1,console.log("Connected"),this.heartBeatTimeStemp=1e13,this.websocket.close())}catch(e){console.log(e)}}}const server_url="https://gudhub.com/GudHub_Test",wss_url="wss://gudhub.com/GudHub/ws/app/",node_server_url="https://gudhub.com/api/services/prod",async_modules_path="build/latest/async_modules_node/",automation_modules_path="build/latest/automation_modules/",file_server_url="https://gudhub.com",cache_chunk_requests=!0,cache_app_requests=!0;async function filterPreparation(n,e,t){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=[],a={variableMethodcurrent_app(){return[r.current_app_id||r.app_id]},variableMethodelement_app(){return[r.element_app_id]},variableMethodcurrent_item(){return["".concat(r.current_app_id||r.app_id,".").concat(r.item_id)]},variableMethoduser_id(){return[e.getUser().user_id]},variableMethoduser_email(l){return[e.getUser().username]},variableMethodtoday(l){const u=new Date,o=new Date(u.getFullYear(),u.getMonth(),u.getDate()),f=new Date(u.getFullYear(),u.getMonth(),u.getDate()+1);return[o.valueOf().toString()+":"+f.valueOf().toString()]},variableMethodvariable(l){return[r[l]]}};if(n)for(const l of n)if(l)switch(l.input_type){case"variable":l.valuesArray=[];for(const o of l==null?void 0:l.input_value.split(",")){const f=l.input_type+"Method"+o,d=a[f];typeof d=="function"?l.valuesArray?l.valuesArray.push(...d()):l.valuesArray=d():l.valuesArray?l.valuesArray.push(...a.variableMethodvariable(o)):l.valuesArray=a.variableMethodvariable(o)}i.push(l);break;case"field":const u=await s({app_id:r.current_app_id||r.app_id,item_id:r.item_id,field_id:l.input_value});u!=null&&l.valuesArray.push(u),i.push(l);break;default:i.push(l);break}else i.push(l);function s(l){return new Promise(u=>{t.on("gh_value_get",l,function o(f,d){t.destroy("gh_value_get",l,o),u(d)}).emit("gh_value_get",{},l)})}return i}function isArray(n){return Array.isArray?Array.isArray(n):getTag(n)==="[object Array]"}function baseToString(n){if(typeof n=="string")return n;let e=n+"";return e=="0"&&1/n==-1/0?"-0":e}function toString(n){return n==null?"":baseToString(n)}function isString(n){return typeof n=="string"}function isNumber(n){return typeof n=="number"}function isBoolean(n){return n===!0||n===!1||isObjectLike(n)&&getTag(n)=="[object Boolean]"}function isObject(n){return typeof n=="object"}function isObjectLike(n){return isObject(n)&&n!==null}function isDefined(n){return n!=null}function isBlank(n){return!n.trim().length}function getTag(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}const INCORRECT_INDEX_TYPE="Incorrect 'index' type",LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY=n=>"Invalid value for key ".concat(n),PATTERN_LENGTH_TOO_LARGE=n=>"Pattern length exceeds max of ".concat(n,"."),MISSING_KEY_PROPERTY=n=>"Missing ".concat(n," property in key"),INVALID_KEY_WEIGHT_VALUE=n=>"Property 'weight' in key '".concat(n,"' must be a positive integer"),hasOwn=Object.prototype.hasOwnProperty;class KeyStore{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(r=>{let i=createKey(r);t+=i.weight,this._keys.push(i),this._keyMap[i.id]=i,t+=i.weight}),this._keys.forEach(r=>{r.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function createKey(n){let e=null,t=null,r=null,i=1,a=null;if(isString(n)||isArray(n))r=n,e=createKeyPath(n),t=createKeyId(n);else{if(!hasOwn.call(n,"name"))throw new Error(MISSING_KEY_PROPERTY("name"));const s=n.name;if(r=s,hasOwn.call(n,"weight")&&(i=n.weight,i<=0))throw new Error(INVALID_KEY_WEIGHT_VALUE(s));e=createKeyPath(s),t=createKeyId(s),a=n.getFn}return{path:e,id:t,weight:i,src:r,getFn:a}}function createKeyPath(n){return isArray(n)?n:n.split(".")}function createKeyId(n){return isArray(n)?n.join("."):n}function get(n,e){let t=[],r=!1;const i=(a,s,l)=>{if(isDefined(a))if(!s[l])t.push(a);else{let u=s[l];const o=a[u];if(!isDefined(o))return;if(l===s.length-1&&(isString(o)||isNumber(o)||isBoolean(o)))t.push(toString(o));else if(isArray(o)){r=!0;for(let f=0,d=o.length;f<d;f+=1)i(o[f],s,l+1)}else s.length&&i(o,s,l+1)}};return i(n,isString(e)?e.split("."):e,0),r?t:t[0]}const MatchOptions={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},BasicOptions={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(n,e)=>n.score===e.score?n.idx<e.idx?-1:1:n.score<e.score?-1:1},FuzzyOptions={location:0,threshold:.6,distance:100},AdvancedOptions={useExtendedSearch:!1,getFn:get,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var Config=_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({},BasicOptions),MatchOptions),FuzzyOptions),AdvancedOptions);const SPACE=/[^ ]+/g;function norm(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3;const t=new Map,r=Math.pow(10,e);return{get(i){const a=i.match(SPACE).length;if(t.has(a))return t.get(a);const s=1/Math.pow(a,.5*n),l=parseFloat(Math.round(s*r)/r);return t.set(a,l),l},clear(){t.clear()}}}class FuseIndex{constructor(){let{getFn:e=Config.getFn,fieldNormWeight:t=Config.fieldNormWeight}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.norm=norm(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.docs=e}setIndexRecords(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.records=e}setKeys(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.keys=e,this._keysMap={},e.forEach((t,r)=>{this._keysMap[t.id]=r})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,isString(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){const t=this.size();isString(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,r=this.size();t<r;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!isDefined(e)||isBlank(e))return;let r={v:e,i:t,n:this.norm.get(e)};this.records.push(r)}_addObject(e,t){let r={i:t,$:{}};this.keys.forEach((i,a)=>{let s=i.getFn?i.getFn(e):this.getFn(e,i.path);if(isDefined(s)){if(isArray(s)){let l=[];const u=[{nestedArrIndex:-1,value:s}];for(;u.length;){const{nestedArrIndex:o,value:f}=u.pop();if(isDefined(f))if(isString(f)&&!isBlank(f)){let d={v:f,i:o,n:this.norm.get(f)};l.push(d)}else isArray(f)&&f.forEach((d,h)=>{u.push({nestedArrIndex:h,value:d})})}r.$[a]=l}else if(isString(s)&&!isBlank(s)){let l={v:s,n:this.norm.get(s)};r.$[a]=l}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function createIndex(n,e){let{getFn:t=Config.getFn,fieldNormWeight:r=Config.fieldNormWeight}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=new FuseIndex({getFn:t,fieldNormWeight:r});return i.setKeys(n.map(createKey)),i.setSources(e),i.create(),i}function parseIndex(n){let{getFn:e=Config.getFn,fieldNormWeight:t=Config.fieldNormWeight}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{keys:r,records:i}=n,a=new FuseIndex({getFn:e,fieldNormWeight:t});return a.setKeys(r),a.setIndexRecords(i),a}function computeScore$1(n){let{errors:e=0,currentLocation:t=0,expectedLocation:r=0,distance:i=Config.distance,ignoreLocation:a=Config.ignoreLocation}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const s=e/n.length;if(a)return s;const l=Math.abs(r-t);return i?s+l/i:l?1:s}function convertMaskToIndices(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Config.minMatchCharLength,t=[],r=-1,i=-1,a=0;for(let s=n.length;a<s;a+=1){let l=n[a];l&&r===-1?r=a:!l&&r!==-1&&(i=a-1,i-r+1>=e&&t.push([r,i]),r=-1)}return n[a-1]&&a-r>=e&&t.push([r,a-1]),t}const MAX_BITS=32;function search(n,e,t){let{location:r=Config.location,distance:i=Config.distance,threshold:a=Config.threshold,findAllMatches:s=Config.findAllMatches,minMatchCharLength:l=Config.minMatchCharLength,includeMatches:u=Config.includeMatches,ignoreLocation:o=Config.ignoreLocation}=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(e.length>MAX_BITS)throw new Error(PATTERN_LENGTH_TOO_LARGE(MAX_BITS));const f=e.length,d=n.length,h=Math.max(0,Math.min(r,d));let y=a,m=h;const v=l>1||u,p=v?Array(d):[];let E;for(;(E=n.indexOf(e,m))>-1;){let q=computeScore$1(e,{currentLocation:E,expectedLocation:h,distance:i,ignoreLocation:o});if(y=Math.min(q,y),m=E+f,v){let x=0;for(;x<f;)p[E+x]=1,x+=1}}m=-1;let S=[],w=1,g=f+d;const b=1<<f-1;for(let q=0;q<f;q+=1){let x=0,D=g;for(;x<D;)computeScore$1(e,{errors:q,currentLocation:h+D,expectedLocation:h,distance:i,ignoreLocation:o})<=y?x=D:g=D,D=Math.floor((g-x)/2+x);g=D;let j=Math.max(1,h-D+1),F=s?d:Math.min(h+D,d)+f,N=Array(F+2);N[F+1]=(1<<q)-1;for(let U=F;U>=j;U-=1){let H=U-1,z=t[n.charAt(H)];if(v&&(p[H]=+!!z),N[U]=(N[U+1]<<1|1)&z,q&&(N[U]|=(S[U+1]|S[U])<<1|1|S[U+1]),N[U]&b&&(w=computeScore$1(e,{errors:q,currentLocation:H,expectedLocation:h,distance:i,ignoreLocation:o}),w<=y)){if(y=w,m=H,m<=h)break;j=Math.max(1,2*h-m)}}if(computeScore$1(e,{errors:q+1,currentLocation:h,expectedLocation:h,distance:i,ignoreLocation:o})>y)break;S=N}const A={isMatch:m>=0,score:Math.max(.001,w)};if(v){const q=convertMaskToIndices(p,l);q.length?u&&(A.indices=q):A.isMatch=!1}return A}function createPatternAlphabet(n){let e={};for(let t=0,r=n.length;t<r;t+=1){const i=n.charAt(t);e[i]=(e[i]||0)|1<<r-t-1}return e}class BitapSearch{constructor(e){let{location:t=Config.location,threshold:r=Config.threshold,distance:i=Config.distance,includeMatches:a=Config.includeMatches,findAllMatches:s=Config.findAllMatches,minMatchCharLength:l=Config.minMatchCharLength,isCaseSensitive:u=Config.isCaseSensitive,ignoreLocation:o=Config.ignoreLocation}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.options={location:t,threshold:r,distance:i,includeMatches:a,findAllMatches:s,minMatchCharLength:l,isCaseSensitive:u,ignoreLocation:o},this.pattern=u?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const f=(h,y)=>{this.chunks.push({pattern:h,alphabet:createPatternAlphabet(h),startIndex:y})},d=this.pattern.length;if(d>MAX_BITS){let h=0;const y=d%MAX_BITS,m=d-y;for(;h<m;)f(this.pattern.substr(h,MAX_BITS),h),h+=MAX_BITS;if(y){const v=d-MAX_BITS;f(this.pattern.substr(v),v)}}else f(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,includeMatches:r}=this.options;if(t||(e=e.toLowerCase()),this.pattern===e){let m={isMatch:!0,score:0};return r&&(m.indices=[[0,e.length-1]]),m}const{location:i,distance:a,threshold:s,findAllMatches:l,minMatchCharLength:u,ignoreLocation:o}=this.options;let f=[],d=0,h=!1;this.chunks.forEach(m=>{let{pattern:v,alphabet:p,startIndex:E}=m;const{isMatch:S,score:w,indices:g}=search(e,v,p,{location:i+E,distance:a,threshold:s,findAllMatches:l,minMatchCharLength:u,includeMatches:r,ignoreLocation:o});S&&(h=!0),d+=w,S&&g&&(f=[...f,...g])});let y={isMatch:h,score:h?d/this.chunks.length:1};return h&&r&&(y.indices=f),y}}class BaseMatch{constructor(e){this.pattern=e}static isMultiMatch(e){return getMatch(e,this.multiRegex)}static isSingleMatch(e){return getMatch(e,this.singleRegex)}search(){}}function getMatch(n,e){const t=n.match(e);return t?t[1]:null}class ExactMatch extends BaseMatch{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class InverseExactMatch extends BaseMatch{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const r=e.indexOf(this.pattern)===-1;return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class PrefixExactMatch extends BaseMatch{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class InversePrefixExactMatch extends BaseMatch{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class SuffixExactMatch extends BaseMatch{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class InverseSuffixExactMatch extends BaseMatch{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class FuzzyMatch extends BaseMatch{constructor(e){let{location:t=Config.location,threshold:r=Config.threshold,distance:i=Config.distance,includeMatches:a=Config.includeMatches,findAllMatches:s=Config.findAllMatches,minMatchCharLength:l=Config.minMatchCharLength,isCaseSensitive:u=Config.isCaseSensitive,ignoreLocation:o=Config.ignoreLocation}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(e),this._bitapSearch=new BitapSearch(e,{location:t,threshold:r,distance:i,includeMatches:a,findAllMatches:s,minMatchCharLength:l,isCaseSensitive:u,ignoreLocation:o})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class IncludeMatch extends BaseMatch{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,r;const i=[],a=this.pattern.length;for(;(r=e.indexOf(this.pattern,t))>-1;)t=r+a,i.push([r,t-1]);const s=!!i.length;return{isMatch:s,score:s?0:1,indices:i}}}const searchers=[ExactMatch,IncludeMatch,PrefixExactMatch,InversePrefixExactMatch,InverseSuffixExactMatch,SuffixExactMatch,InverseExactMatch,FuzzyMatch],searchersLen=searchers.length,SPACE_RE=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,OR_TOKEN="|";function parseQuery(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return n.split(OR_TOKEN).map(t=>{let r=t.trim().split(SPACE_RE).filter(a=>a&&!!a.trim()),i=[];for(let a=0,s=r.length;a<s;a+=1){const l=r[a];let u=!1,o=-1;for(;!u&&++o<searchersLen;){const f=searchers[o];let d=f.isMultiMatch(l);d&&(i.push(new f(d,e)),u=!0)}if(!u)for(o=-1;++o<searchersLen;){const f=searchers[o];let d=f.isSingleMatch(l);if(d){i.push(new f(d,e));break}}}return i})}const MultiMatchSet=new Set([FuzzyMatch.type,IncludeMatch.type]);class ExtendedSearch{constructor(e){let{isCaseSensitive:t=Config.isCaseSensitive,includeMatches:r=Config.includeMatches,minMatchCharLength:i=Config.minMatchCharLength,ignoreLocation:a=Config.ignoreLocation,findAllMatches:s=Config.findAllMatches,location:l=Config.location,threshold:u=Config.threshold,distance:o=Config.distance}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.query=null,this.options={isCaseSensitive:t,includeMatches:r,minMatchCharLength:i,findAllMatches:s,ignoreLocation:a,location:l,threshold:u,distance:o},this.pattern=t?e:e.toLowerCase(),this.query=parseQuery(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:r,isCaseSensitive:i}=this.options;e=i?e:e.toLowerCase();let a=0,s=[],l=0;for(let u=0,o=t.length;u<o;u+=1){const f=t[u];s.length=0,a=0;for(let d=0,h=f.length;d<h;d+=1){const y=f[d],{isMatch:m,indices:v,score:p}=y.search(e);if(m){if(a+=1,l+=p,r){const E=y.constructor.type;MultiMatchSet.has(E)?s=[...s,...v]:s.push(v)}}else{l=0,a=0,s.length=0;break}}if(a){let d={isMatch:!0,score:l/a};return r&&(d.indices=s),d}}return{isMatch:!1,score:1}}}const registeredSearchers=[];function register(){registeredSearchers.push(...arguments)}function createSearcher(n,e){for(let t=0,r=registeredSearchers.length;t<r;t+=1){let i=registeredSearchers[t];if(i.condition(n,e))return new i(n,e)}return new BitapSearch(n,e)}const LogicalOperator={AND:"$and",OR:"$or"},KeyType={PATH:"$path",PATTERN:"$val"},isExpression=n=>!!(n[LogicalOperator.AND]||n[LogicalOperator.OR]),isPath=n=>!!n[KeyType.PATH],isLeaf=n=>!isArray(n)&&isObject(n)&&!isExpression(n),convertToExplicit=n=>({[LogicalOperator.AND]:Object.keys(n).map(e=>({[e]:n[e]}))});function parse(n,e){let{auto:t=!0}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=i=>{let a=Object.keys(i);const s=isPath(i);if(!s&&a.length>1&&!isExpression(i))return r(convertToExplicit(i));if(isLeaf(i)){const u=s?i[KeyType.PATH]:a[0],o=s?i[KeyType.PATTERN]:i[u];if(!isString(o))throw new Error(LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(u));const f={keyId:createKeyId(u),pattern:o};return t&&(f.searcher=createSearcher(o,e)),f}let l={children:[],operator:a[0]};return a.forEach(u=>{const o=i[u];isArray(o)&&o.forEach(f=>{l.children.push(r(f))})}),l};return isExpression(n)||(n=convertToExplicit(n)),r(n)}function computeScore(n,e){let{ignoreFieldNorm:t=Config.ignoreFieldNorm}=e;n.forEach(r=>{let i=1;r.matches.forEach(a=>{let{key:s,norm:l,score:u}=a;const o=s?s.weight:null;i*=Math.pow(u===0&&o?Number.EPSILON:u,(o||1)*(t?1:l))}),r.score=i})}function transformMatches(n,e){const t=n.matches;e.matches=[],isDefined(t)&&t.forEach(r=>{if(!isDefined(r.indices)||!r.indices.length)return;const{indices:i,value:a}=r;let s={indices:i,value:a};r.key&&(s.key=r.key.src),r.idx>-1&&(s.refIndex=r.idx),e.matches.push(s)})}function transformScore(n,e){e.score=n.score}function format(n,e){let{includeMatches:t=Config.includeMatches,includeScore:r=Config.includeScore}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=[];return t&&i.push(transformMatches),r&&i.push(transformScore),n.map(a=>{const{idx:s}=a,l={item:e[s],refIndex:s};return i.length&&i.forEach(u=>{u(a,l)}),l})}class Fuse{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;this.options=_objectSpread2(_objectSpread2({},Config),t),this.options.useExtendedSearch,this._keyStore=new KeyStore(this.options.keys),this.setCollection(e,r)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof FuseIndex))throw new Error(INCORRECT_INDEX_TYPE);this._myIndex=t||createIndex(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){isDefined(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:()=>!1;const t=[];for(let r=0,i=this._docs.length;r<i;r+=1){const a=this._docs[r];e(a,r)&&(this.removeAt(r),r-=1,i-=1,t.push(a))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e){let{limit:t=-1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{includeMatches:r,includeScore:i,shouldSort:a,sortFn:s,ignoreFieldNorm:l}=this.options;let u=isString(e)?isString(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return computeScore(u,{ignoreFieldNorm:l}),a&&u.sort(s),isNumber(t)&&t>-1&&(u=u.slice(0,t)),format(u,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e){const t=createSearcher(e,this.options),{records:r}=this._myIndex,i=[];return r.forEach(a=>{let{v:s,i:l,n:u}=a;if(!isDefined(s))return;const{isMatch:o,score:f,indices:d}=t.searchIn(s);o&&i.push({item:s,idx:l,matches:[{score:f,value:s,norm:u,indices:d}]})}),i}_searchLogical(e){const t=parse(e,this.options),r=(l,u,o)=>{if(!l.children){const{keyId:d,searcher:h}=l,y=this._findMatches({key:this._keyStore.get(d),value:this._myIndex.getValueForItemAtKeyId(u,d),searcher:h});return y&&y.length?[{idx:o,item:u,matches:y}]:[]}const f=[];for(let d=0,h=l.children.length;d<h;d+=1){const y=l.children[d],m=r(y,u,o);if(m.length)f.push(...m);else if(l.operator===LogicalOperator.AND)return[]}return f},i=this._myIndex.records,a={},s=[];return i.forEach(l=>{let{$:u,i:o}=l;if(isDefined(u)){let f=r(t,u,o);f.length&&(a[o]||(a[o]={idx:o,item:u,matches:[]},s.push(a[o])),f.forEach(d=>{let{matches:h}=d;a[o].matches.push(...h)}))}}),s}_searchObjectList(e){const t=createSearcher(e,this.options),{keys:r,records:i}=this._myIndex,a=[];return i.forEach(s=>{let{$:l,i:u}=s;if(!isDefined(l))return;let o=[];r.forEach((f,d)=>{o.push(...this._findMatches({key:f,value:l[d],searcher:t}))}),o.length&&a.push({idx:u,item:l,matches:o})}),a}_findMatches(e){let{key:t,value:r,searcher:i}=e;if(!isDefined(r))return[];let a=[];if(isArray(r))r.forEach(s=>{let{v:l,i:u,n:o}=s;if(!isDefined(l))return;const{isMatch:f,score:d,indices:h}=i.searchIn(l);f&&a.push({score:d,key:t,value:l,idx:u,norm:o,indices:h})});else{const{v:s,n:l}=r,{isMatch:u,score:o,indices:f}=i.searchIn(s);u&&a.push({score:o,key:t,value:s,norm:l,indices:f})}return a}}Fuse.version="6.6.2",Fuse.createIndex=createIndex,Fuse.parseIndex=parseIndex,Fuse.config=Config,Fuse.parseQuery=parse,register(ExtendedSearch);function getDistanceFromLatLonInKm(n,e){const[t,r,i]=n.split(":"),[a,s]=e.split(":"),l=6371,u=deg2rad(a-t),o=deg2rad(s-r),f=Math.sin(u/2)*Math.sin(u/2)+Math.cos(deg2rad(t))*Math.cos(deg2rad(a))*Math.sin(o/2)*Math.sin(o/2),d=2*Math.atan2(Math.sqrt(f),Math.sqrt(1-f)),h=l*d;return Number(i)>=h}function deg2rad(n){return n*(Math.PI/180)}function getDate$1(){let{type:n,date:e=0,match:t=!0}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(!r&&n)return!1;const i=new Date;let a=!0;switch(n){case"day":const s=getDateInMs(e),l=getDateInMs(e+1);a=s<=r&&r<l;break;case"days":if(e<0){const S=getDateInMs(1);a=getDateInMs(-6)<=r&&r<S}else{const S=getDateInMs(),w=getDateInMs(7);a=S<=r&&r<w}break;case"day_week":a=e===new Date(r).getDay();break;case"week":const u=i.getDate()-i.getDay(),o=e==-2?13:6,f=u+o,d=i.setDate(u+e*7),y=new Date().setDate(f+e*7),[m,v]=getWeek(d,y);a=m<=r&&r<=v;break;case"month":if(i.getFullYear()!==new Date(r).getFullYear())return!1;a=i.getMonth()+e===new Date(r).getMonth();break;case"year":a=i.getFullYear()+e===new Date(r).getFullYear();break;default:return!0}return t?a:!a}function getWeek(n,e){return[new Date(n),new Date(e)]}function getDateInMs(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;const e=new Date;return new Date(e.getFullYear(),e.getMonth(),e.getDate()+n).valueOf()}function searchValue(n,e){if(!(!n||!n.length))return e?n.filter(t=>t.fields.find(r=>r.index_value&&r.index_value.toLowerCase().indexOf(e.toLowerCase())!==-1)):n}const fuse=new Fuse([]);function isSimilarStrings(n,e){return fuse.setCollection(e),!!fuse.search(n).length}function filter(n,e){const t=new ItemsFilter;return!n||!n.length?[]:t.filter(e,n)}class Checker{changeBehavior(e){switch(e){case"contain_or":this._checkFn=function(t,r){return r.some(i=>t.some(a=>a.indexOf(i)!==-1))};break;case"contain_and":this._checkFn=function(t,r){return r.every(i=>t.some(a=>a.indexOf(i)!==-1))};break;case"not_contain_or":this._checkFn=function(t,r){return r.some(i=>t.every(a=>a.indexOf(i)===-1))};break;case"not_contain_and":this._checkFn=function(t,r){return r.every(i=>t.every(a=>a.indexOf(i)===-1))};break;case"equal_or":this._checkFn=function(t,r){return t.length?t.some(i=>r.some(a=>i==a)):!1};break;case"equal_and":this._checkFn=function(t,r){if(!t.length)return!1;let i=new Set(r);for(;t.length&&i.size;){let a=t.pop();i.has(a)&&i.delete(a)}return!i.size};break;case"not_equal_or":this._checkFn=function(t,r){if(!t.length)return!0;let i=new Set(r);for(;t.length&&i.size;){let a=t.pop();if(!i.has(a))return!0}return!1};break;case"not_equal_and":this._checkFn=function(t,r){let i=new Set(r);for(;t.length&&i.size;){let a=t.pop();if(i.has(a))return!1}return!0};break;case"bigger":this._checkFn=function(t,r){return r.some(i=>t.every(a=>a>i))};break;case"lower":this._checkFn=function(t,r){return r.some(i=>t.every(a=>a<i))};break;case"range":this._checkFn=function(t,r){return r.some(i=>t.every(a=>i.start<=a&&a<i.end))};break;case"value":this._checkFn=function(t,r){return r.some(i=>t.some(a=>a==i))};break;case"search":this._checkFn=function(t,r){return r.some(i=>isSimilarStrings(i,t))};break;case"phone_equal_or":this._checkFn=function(t,r){return t.length?r.some(i=>t.some(a=>a.replace(/[^0-9]/g,"").indexOf(i.replace(/[^0-9]/g,""))!==-1)):!1};break;case"distance":this._checkFn=function(t,r){return r.some(i=>t.some(a=>getDistanceFromLatLonInKm(i,a)))};break;case"date_in":case"date_out":this._checkFn=function(t,r){return r.some(i=>t.some(a=>getDate$1(i,a)))};break;case"recurring_date":this._checkFn=function(t,r){return r.some(i=>t.some(a=>gudhub.checkRecurringDate(a,i)))};break}return this}check(e){return this.changeBehavior(e.getCheckOption())._checkFn(e.getEntity(),e.getFilterValues())}}class NumberFetchStrategy{convert(e){return[Number(e)]}convertFilterValue(e){return Number(e)}}class RangeFetchStrategy extends NumberFetchStrategy{convertFilterValue(e){return{start:Number(e.split(":")[0]),end:Number(e.split(":")[1])}}}class StringFetchStrategy{convert(e){return String(e??"").toLowerCase().split(",")}convertFilterValue(e){return e===0?"0":String(e||"").toLowerCase()}}class dateFetchStrategy extends NumberFetchStrategy{convertFilterValue(e){const[t,r,i]=e.split(":");return{type:t,date:Number(r),match:!!Number(i)}}}class BooleanFetchStrategy{convert(e){return[String(!!e)]}convertFilterValue(e){return String(e)}}class RecurringDateStrategy{convert(e){return[Number(e)]}convertFilterValue(e){return String(e)}}class Aggregate{constructor(){this._strategies={stringStrategy:new StringFetchStrategy,numberStrategy:new NumberFetchStrategy,booleanStrategy:new BooleanFetchStrategy,rangeStrategy:new RangeFetchStrategy,dateStrategy:new dateFetchStrategy,recurringDateStrategy:new RecurringDateStrategy}}setStrategy(e){switch(this._checkOption=e,e){case"contain_or":case"contain_and":case"not_contain_or":case"not_contain_and":case"equal_or":case"equal_and":case"not_equal_or":case"not_equal_and":case"phone_equal_or":case"distance":case"search":this._currentStrategy=this._strategies.stringStrategy;break;case"bigger":case"lower":this._currentStrategy=this._strategies.numberStrategy;break;case"range":this._currentStrategy=this._strategies.rangeStrategy;break;case"date_in":case"date_out":this._currentStrategy=this._strategies.dateStrategy;break;case"value":this._currentStrategy=this._strategies.booleanStrategy;break;case"recurring_date":this._currentStrategy=this._strategies.recurringDateStrategy}return this}setEntity(e){return this._entity=this._currentStrategy.convert(e),this}getEntity(){return this._entity}setFilterValues(e){let t=Array.isArray(e)?e:[e];return this._filterValues=t.map(r=>this._currentStrategy.convertFilterValue(r)),this}getFilterValues(){return this._filterValues}getCheckOption(){return this._checkOption}}class ItemsFilter{constructor(){}filter(e,t){const r=this.checkIfAllFiltersHaveAndStrategy(e),i=[],a=e.filter(function(s){return s.valuesArray.length});for(let s of t){let l=!0;for(let u=0;u<a.length;u++){const o=a[u],f=s.fields.find(function(y){return o.field_id==y.field_id}),d=new Aggregate,h=new Checker;switch(d.setStrategy(o.search_type).setEntity(f&&f.field_value!=null?f.field_value:null).setFilterValues(o.valuesArray),o.boolean_strategy){case"and":l=l&&h.check(d);break;case"or":l=l||h.check(d);break;default:l=l&&h.check(d)}if(!l&&r)break}l&&i.push(s)}return i.length||e.length&&!i.length?i:t}checkIfAllFiltersHaveAndStrategy(e){return e.every(t=>!t.boolean_strategy||t.boolean_strategy=="and")}}function mergeFilters(n,e){const t=[];let r=[];if(n.length>0?n.forEach(i=>{r.push(i)}):r=e,r.length>0){r.forEach((i,a)=>{for(let s=0;s<e.length;s++)i.field_id==e[s].field_id&&(t.push(i.field_id),r[a]=gudhub.mergeObjects(e[s],i))});for(let i=0;i<e.length;i++)t.includes(e[i].field_id)||r.push(e[i])}return r}function commonjsRequire(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var jsonpath$1={exports:{}};/*! jsonpath 1.1.1 */var hasRequiredJsonpath;function requireJsonpath(){return hasRequiredJsonpath||(hasRequiredJsonpath=1,function(n,e){(function(t){n.exports=t()})(function(){return function t(r,i,a){function s(o,f){if(!i[o]){if(!r[o]){var d=typeof commonjsRequire=="function"&&commonjsRequire;if(!f&&d)return d(o,!0);if(l)return l(o,!0);var h=new Error("Cannot find module '"+o+"'");throw h.code="MODULE_NOT_FOUND",h}var y=i[o]={exports:{}};r[o][0].call(y.exports,function(m){var v=r[o][1][m];return s(v||m)},y,y.exports,t,r,i,a)}return i[o].exports}for(var l=typeof commonjsRequire=="function"&&commonjsRequire,u=0;u<a.length;u++)s(a[u]);return s}({"./aesprim":[function(t,r,i){(function(a,s){s(typeof i<"u"?i:a.esprima={})})(this,function(a){var s,l,u,o,f,d,h,y,m,v,p,E,S,w,g,b,A,q;s={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9},l={},l[s.BooleanLiteral]="Boolean",l[s.EOF]="<end>",l[s.Identifier]="Identifier",l[s.Keyword]="Keyword",l[s.NullLiteral]="Null",l[s.NumericLiteral]="Numeric",l[s.Punctuator]="Punctuator",l[s.StringLiteral]="String",l[s.RegularExpression]="RegularExpression",u=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="],o={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement"},f={Data:1,Get:2,Set:4},d={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode"},h={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")};function x(c,_){if(!c)throw new Error("ASSERT: "+_)}function D(c){return c>=48&&c<=57}function j(c){return"0123456789abcdefABCDEF".indexOf(c)>=0}function F(c){return"01234567".indexOf(c)>=0}function N(c){return c===32||c===9||c===11||c===12||c===160||c>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(c)>=0}function B(c){return c===10||c===13||c===8232||c===8233}function U(c){return c==64||c===36||c===95||c>=65&&c<=90||c>=97&&c<=122||c===92||c>=128&&h.NonAsciiIdentifierStart.test(String.fromCharCode(c))}function H(c){return c===36||c===95||c>=65&&c<=90||c>=97&&c<=122||c>=48&&c<=57||c===92||c>=128&&h.NonAsciiIdentifierPart.test(String.fromCharCode(c))}function z(c){switch(c){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0;default:return!1}}function K(c){switch(c){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}}function W(c){return c==="eval"||c==="arguments"}function te(c){if(v&&K(c))return!0;switch(c.length){case 2:return c==="if"||c==="in"||c==="do";case 3:return c==="var"||c==="for"||c==="new"||c==="try"||c==="let";case 4:return c==="this"||c==="else"||c==="case"||c==="void"||c==="with"||c==="enum";case 5:return c==="while"||c==="break"||c==="catch"||c==="throw"||c==="const"||c==="yield"||c==="class"||c==="super";case 6:return c==="return"||c==="typeof"||c==="delete"||c==="switch"||c==="export"||c==="import";case 7:return c==="default"||c==="finally"||c==="extends";case 8:return c==="function"||c==="continue"||c==="debugger";case 10:return c==="instanceof";default:return!1}}function Z(c,_,I,R,T){var L;x(typeof I=="number","Comment must have valid position"),!(A.lastCommentStart>=I)&&(A.lastCommentStart=I,L={type:c,value:_},q.range&&(L.range=[I,R]),q.loc&&(L.loc=T),q.comments.push(L),q.attachComment&&(q.leadingComments.push(L),q.trailingComments.push(L)))}function V(c){var _,I,R,T;for(_=p-c,I={start:{line:E,column:p-S-c}};p<w;)if(R=m.charCodeAt(p),++p,B(R)){q.comments&&(T=m.slice(_+c,p-1),I.end={line:E,column:p-S-1},Z("Line",T,_,p-1,I)),R===13&&m.charCodeAt(p)===10&&++p,++E,S=p;return}q.comments&&(T=m.slice(_+c,p),I.end={line:E,column:p-S},Z("Line",T,_,p,I))}function pe(){var c,_,I,R;for(q.comments&&(c=p-2,_={start:{line:E,column:p-S-2}});p<w;)if(I=m.charCodeAt(p),B(I))I===13&&m.charCodeAt(p+1)===10&&++p,++E,++p,S=p,p>=w&&ee({},d.UnexpectedToken,"ILLEGAL");else if(I===42){if(m.charCodeAt(p+1)===47){++p,++p,q.comments&&(R=m.slice(c+2,p-2),_.end={line:E,column:p-S},Z("Block",R,c,p,_));return}++p}else++p;ee({},d.UnexpectedToken,"ILLEGAL")}function C(){var c,_;for(_=p===0;p<w;)if(c=m.charCodeAt(p),N(c))++p;else if(B(c))++p,c===13&&m.charCodeAt(p)===10&&++p,++E,S=p,_=!0;else if(c===47)if(c=m.charCodeAt(p+1),c===47)++p,++p,V(2),_=!0;else if(c===42)++p,++p,pe();else break;else if(_&&c===45)if(m.charCodeAt(p+1)===45&&m.charCodeAt(p+2)===62)p+=3,V(3);else break;else if(c===60)if(m.slice(p+1,p+4)==="!--")++p,++p,++p,++p,V(4);else break;else break}function k(c){var _,I,R,T=0;for(I=c==="u"?4:2,_=0;_<I;++_)if(p<w&&j(m[p]))R=m[p++],T=T*16+"0123456789abcdef".indexOf(R.toLowerCase());else return"";return String.fromCharCode(T)}function $(){var c,_;for(c=m.charCodeAt(p++),_=String.fromCharCode(c),c===92&&(m.charCodeAt(p)!==117&&ee({},d.UnexpectedToken,"ILLEGAL"),++p,c=k("u"),(!c||c==="\\"||!U(c.charCodeAt(0)))&&ee({},d.UnexpectedToken,"ILLEGAL"),_=c);p<w&&(c=m.charCodeAt(p),!!H(c));)++p,_+=String.fromCharCode(c),c===92&&(_=_.substr(0,_.length-1),m.charCodeAt(p)!==117&&ee({},d.UnexpectedToken,"ILLEGAL"),++p,c=k("u"),(!c||c==="\\"||!H(c.charCodeAt(0)))&&ee({},d.UnexpectedToken,"ILLEGAL"),_+=c);return _}function Y(){var c,_;for(c=p++;p<w;){if(_=m.charCodeAt(p),_===92)return p=c,$();if(H(_))++p;else break}return m.slice(c,p)}function se(){var c,_,I;return c=p,_=m.charCodeAt(p)===92?$():Y(),_.length===1?I=s.Identifier:te(_)?I=s.Keyword:_==="null"?I=s.NullLiteral:_==="true"||_==="false"?I=s.BooleanLiteral:I=s.Identifier,{type:I,value:_,lineNumber:E,lineStart:S,start:c,end:p}}function X(){var c=p,_=m.charCodeAt(p),I,R=m[p],T,L,oe;switch(_){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++p,q.tokenize&&(_===40?q.openParenToken=q.tokens.length:_===123&&(q.openCurlyToken=q.tokens.length)),{type:s.Punctuator,value:String.fromCharCode(_),lineNumber:E,lineStart:S,start:c,end:p};default:if(I=m.charCodeAt(p+1),I===61)switch(_){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return p+=2,{type:s.Punctuator,value:String.fromCharCode(_)+String.fromCharCode(I),lineNumber:E,lineStart:S,start:c,end:p};case 33:case 61:return p+=2,m.charCodeAt(p)===61&&++p,{type:s.Punctuator,value:m.slice(c,p),lineNumber:E,lineStart:S,start:c,end:p}}}if(oe=m.substr(p,4),oe===">>>=")return p+=4,{type:s.Punctuator,value:oe,lineNumber:E,lineStart:S,start:c,end:p};if(L=oe.substr(0,3),L===">>>"||L==="<<="||L===">>=")return p+=3,{type:s.Punctuator,value:L,lineNumber:E,lineStart:S,start:c,end:p};if(T=L.substr(0,2),R===T[1]&&"+-<>&|".indexOf(R)>=0||T==="=>")return p+=2,{type:s.Punctuator,value:T,lineNumber:E,lineStart:S,start:c,end:p};if("<>=!+-*%&|^/".indexOf(R)>=0)return++p,{type:s.Punctuator,value:R,lineNumber:E,lineStart:S,start:c,end:p};ee({},d.UnexpectedToken,"ILLEGAL")}function ne(c){for(var _="";p<w&&j(m[p]);)_+=m[p++];return _.length===0&&ee({},d.UnexpectedToken,"ILLEGAL"),U(m.charCodeAt(p))&&ee({},d.UnexpectedToken,"ILLEGAL"),{type:s.NumericLiteral,value:parseInt("0x"+_,16),lineNumber:E,lineStart:S,start:c,end:p}}function ue(c){for(var _="0"+m[p++];p<w&&F(m[p]);)_+=m[p++];return(U(m.charCodeAt(p))||D(m.charCodeAt(p)))&&ee({},d.UnexpectedToken,"ILLEGAL"),{type:s.NumericLiteral,value:parseInt(_,8),octal:!0,lineNumber:E,lineStart:S,start:c,end:p}}function le(){var c,_,I;if(I=m[p],x(D(I.charCodeAt(0))||I===".","Numeric literal must start with a decimal digit or a decimal point"),_=p,c="",I!=="."){if(c=m[p++],I=m[p],c==="0"){if(I==="x"||I==="X")return++p,ne(_);if(F(I))return ue(_);I&&D(I.charCodeAt(0))&&ee({},d.UnexpectedToken,"ILLEGAL")}for(;D(m.charCodeAt(p));)c+=m[p++];I=m[p]}if(I==="."){for(c+=m[p++];D(m.charCodeAt(p));)c+=m[p++];I=m[p]}if(I==="e"||I==="E")if(c+=m[p++],I=m[p],(I==="+"||I==="-")&&(c+=m[p++]),D(m.charCodeAt(p)))for(;D(m.charCodeAt(p));)c+=m[p++];else ee({},d.UnexpectedToken,"ILLEGAL");return U(m.charCodeAt(p))&&ee({},d.UnexpectedToken,"ILLEGAL"),{type:s.NumericLiteral,value:parseFloat(c),lineNumber:E,lineStart:S,start:_,end:p}}function me(){var c="",_,I,R,T,L,oe,de=!1,_e,ge;for(_e=E,ge=S,_=m[p],x(_==="'"||_==='"',"String literal must starts with a quote"),I=p,++p;p<w;)if(R=m[p++],R===_){_="";break}else if(R==="\\")if(R=m[p++],!R||!B(R.charCodeAt(0)))switch(R){case"u":case"x":oe=p,L=k(R),L?c+=L:(p=oe,c+=R);break;case"n":c+=`
|
|
7
|
+
`),s),console.log("Request message: ",e),a(s)})});return this.pushPromise(r,t),r}axiosRequest(e){const t=this.getHashCode(e);if(this.requestPromises[t])return this.requestPromises[t].promise;let r=e.method?e.method.toLowerCase():"get",i=e.url,a=e.headers||{};e.form&&(a["Content-Type"]="application/x-www-form-urlencoded");const s=new Promise(async(l,u)=>{try{const{data:o}=await axios[r](i,r==="post"?qs.stringify(e.form)||e.body:{headers:a},r==="post"?{headers:a}:{});l(o)}catch(o){console.log("ERROR -> GUDHUB HTTP SERVICE -> SIMPLE POST :",o.message),console.log("Request message: ",e),u(o)}});return this.pushPromise(s,t),s}pushPromise(e,t){this.requestPromises[t]={promise:e,hesh:t,callback:e.then(()=>{this.destroyPromise(t)}).catch(r=>{this.destroyPromise(t)})}}destroyPromise(e){this.requestPromises=this.requestPromises.filter(t=>t.hesh!==e)}getHashCode(e){let t=0,r=qs.stringify(e);if(r.length==0)return t;for(let i=0;i<r.length;i++){let a=r.charCodeAt(i);t=(t<<5)-t+a,t=t&t}return"h"+t}}function createId(n){let e="";for(let t in n)n.hasOwnProperty(t)&&n[t]&&(e+="."+n[t]);return e?e.substring(1):"any"}function checkParams(n,e,t){return n==null||typeof n!="string"?(console.log(`Listener type is "undefined" or not have actual 'type' for subscribe`),!1):e==null||typeof e!="object"?(console.log(`Listener destination is "undefined" or not have actual 'type' for subscribe`),!1):typeof t!="function"?(console.log("Listener is not a function for subscribe!"),!1):!0}class PipeService{constructor(){this.subscribers={},this.messageBox={}}on(e,t,r){return checkParams(e,t,r)&&e.split(" ").map(i=>i+":"+createId(t)).forEach(i=>{this.subscribers[i]||(this.subscribers[i]=new Set),this.subscribers[i].add(r),this.checkMessageBox(i)}),this}emit(e,t,r,i){return e.split(" ").forEach(a=>{const s=a+":"+createId(t);let l=!1;if(this.subscribers[s]){if(this.subscribers[s].size==0)return this.messageBox[s]=[e,t,r,i,l],this;this.subscribers[s].forEach(function(u){u(null,r,i)})}else this.messageBox[s]=[e,t,r,i,l]}),this}onRoot(e,t,r){return this.on(e,t,r)}destroy(e,t,r){return e.split(" ").forEach(i=>{const a=i+":"+createId(t);this.subscribers[a]&&r&&this.subscribers[a].delete(r),this.subscribers[a]&&!r&&delete this.subscribers[a]}),this}checkMessageBox(e){this.cleanMesssageBox(),this.messageBox[e]&&setTimeout(()=>{this.messageBox[e]&&(this.emit(...this.messageBox[e]),this.messageBox[e][4]=!0)},0)}cleanMesssageBox(){for(let e in this.messageBox)this.messageBox[e][4]&&delete this.messageBox[e]}}var es_object_keys={},globalThis_1,hasRequiredGlobalThis;function requireGlobalThis(){if(hasRequiredGlobalThis)return globalThis_1;hasRequiredGlobalThis=1;var n=function(e){return e&&e.Math===Math&&e};return globalThis_1=n(typeof globalThis=="object"&&globalThis)||n(typeof window=="object"&&window)||n(typeof self=="object"&&self)||n(typeof commonjsGlobal=="object"&&commonjsGlobal)||n(typeof globalThis_1=="object"&&globalThis_1)||function(){return this}()||Function("return this")(),globalThis_1}var fails,hasRequiredFails;function requireFails(){return hasRequiredFails||(hasRequiredFails=1,fails=function(n){try{return!!n()}catch{return!0}}),fails}var functionBindNative,hasRequiredFunctionBindNative;function requireFunctionBindNative(){if(hasRequiredFunctionBindNative)return functionBindNative;hasRequiredFunctionBindNative=1;var n=requireFails();return functionBindNative=!n(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),functionBindNative}var functionApply,hasRequiredFunctionApply;function requireFunctionApply(){if(hasRequiredFunctionApply)return functionApply;hasRequiredFunctionApply=1;var n=requireFunctionBindNative(),e=Function.prototype,t=e.apply,r=e.call;return functionApply=typeof Reflect=="object"&&Reflect.apply||(n?r.bind(t):function(){return r.apply(t,arguments)}),functionApply}var functionUncurryThis,hasRequiredFunctionUncurryThis;function requireFunctionUncurryThis(){if(hasRequiredFunctionUncurryThis)return functionUncurryThis;hasRequiredFunctionUncurryThis=1;var n=requireFunctionBindNative(),e=Function.prototype,t=e.call,r=n&&e.bind.bind(t,t);return functionUncurryThis=n?r:function(i){return function(){return t.apply(i,arguments)}},functionUncurryThis}var classofRaw,hasRequiredClassofRaw;function requireClassofRaw(){if(hasRequiredClassofRaw)return classofRaw;hasRequiredClassofRaw=1;var n=requireFunctionUncurryThis(),e=n({}.toString),t=n("".slice);return classofRaw=function(r){return t(e(r),8,-1)},classofRaw}var functionUncurryThisClause,hasRequiredFunctionUncurryThisClause;function requireFunctionUncurryThisClause(){if(hasRequiredFunctionUncurryThisClause)return functionUncurryThisClause;hasRequiredFunctionUncurryThisClause=1;var n=requireClassofRaw(),e=requireFunctionUncurryThis();return functionUncurryThisClause=function(t){if(n(t)==="Function")return e(t)},functionUncurryThisClause}var isCallable,hasRequiredIsCallable;function requireIsCallable(){if(hasRequiredIsCallable)return isCallable;hasRequiredIsCallable=1;var n=typeof document=="object"&&document.all;return isCallable=typeof n>"u"&&n!==void 0?function(e){return typeof e=="function"||e===n}:function(e){return typeof e=="function"},isCallable}var objectGetOwnPropertyDescriptor={},descriptors,hasRequiredDescriptors;function requireDescriptors(){if(hasRequiredDescriptors)return descriptors;hasRequiredDescriptors=1;var n=requireFails();return descriptors=!n(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),descriptors}var functionCall,hasRequiredFunctionCall;function requireFunctionCall(){if(hasRequiredFunctionCall)return functionCall;hasRequiredFunctionCall=1;var n=requireFunctionBindNative(),e=Function.prototype.call;return functionCall=n?e.bind(e):function(){return e.apply(e,arguments)},functionCall}var objectPropertyIsEnumerable={},hasRequiredObjectPropertyIsEnumerable;function requireObjectPropertyIsEnumerable(){if(hasRequiredObjectPropertyIsEnumerable)return objectPropertyIsEnumerable;hasRequiredObjectPropertyIsEnumerable=1;var n={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,t=e&&!n.call({1:2},1);return objectPropertyIsEnumerable.f=t?function(i){var a=e(this,i);return!!a&&a.enumerable}:n,objectPropertyIsEnumerable}var createPropertyDescriptor,hasRequiredCreatePropertyDescriptor;function requireCreatePropertyDescriptor(){return hasRequiredCreatePropertyDescriptor||(hasRequiredCreatePropertyDescriptor=1,createPropertyDescriptor=function(n,e){return{enumerable:!(n&1),configurable:!(n&2),writable:!(n&4),value:e}}),createPropertyDescriptor}var indexedObject,hasRequiredIndexedObject;function requireIndexedObject(){if(hasRequiredIndexedObject)return indexedObject;hasRequiredIndexedObject=1;var n=requireFunctionUncurryThis(),e=requireFails(),t=requireClassofRaw(),r=Object,i=n("".split);return indexedObject=e(function(){return!r("z").propertyIsEnumerable(0)})?function(a){return t(a)==="String"?i(a,""):r(a)}:r,indexedObject}var isNullOrUndefined,hasRequiredIsNullOrUndefined;function requireIsNullOrUndefined(){return hasRequiredIsNullOrUndefined||(hasRequiredIsNullOrUndefined=1,isNullOrUndefined=function(n){return n==null}),isNullOrUndefined}var requireObjectCoercible,hasRequiredRequireObjectCoercible;function requireRequireObjectCoercible(){if(hasRequiredRequireObjectCoercible)return requireObjectCoercible;hasRequiredRequireObjectCoercible=1;var n=requireIsNullOrUndefined(),e=TypeError;return requireObjectCoercible=function(t){if(n(t))throw new e("Can't call method on "+t);return t},requireObjectCoercible}var toIndexedObject,hasRequiredToIndexedObject;function requireToIndexedObject(){if(hasRequiredToIndexedObject)return toIndexedObject;hasRequiredToIndexedObject=1;var n=requireIndexedObject(),e=requireRequireObjectCoercible();return toIndexedObject=function(t){return n(e(t))},toIndexedObject}var isObject$1,hasRequiredIsObject;function requireIsObject(){if(hasRequiredIsObject)return isObject$1;hasRequiredIsObject=1;var n=requireIsCallable();return isObject$1=function(e){return typeof e=="object"?e!==null:n(e)},isObject$1}var path,hasRequiredPath;function requirePath(){return hasRequiredPath||(hasRequiredPath=1,path={}),path}var getBuiltIn,hasRequiredGetBuiltIn;function requireGetBuiltIn(){if(hasRequiredGetBuiltIn)return getBuiltIn;hasRequiredGetBuiltIn=1;var n=requirePath(),e=requireGlobalThis(),t=requireIsCallable(),r=function(i){return t(i)?i:void 0};return getBuiltIn=function(i,a){return arguments.length<2?r(n[i])||r(e[i]):n[i]&&n[i][a]||e[i]&&e[i][a]},getBuiltIn}var objectIsPrototypeOf,hasRequiredObjectIsPrototypeOf;function requireObjectIsPrototypeOf(){if(hasRequiredObjectIsPrototypeOf)return objectIsPrototypeOf;hasRequiredObjectIsPrototypeOf=1;var n=requireFunctionUncurryThis();return objectIsPrototypeOf=n({}.isPrototypeOf),objectIsPrototypeOf}var environmentUserAgent,hasRequiredEnvironmentUserAgent;function requireEnvironmentUserAgent(){if(hasRequiredEnvironmentUserAgent)return environmentUserAgent;hasRequiredEnvironmentUserAgent=1;var n=requireGlobalThis(),e=n.navigator,t=e&&e.userAgent;return environmentUserAgent=t?String(t):"",environmentUserAgent}var environmentV8Version,hasRequiredEnvironmentV8Version;function requireEnvironmentV8Version(){if(hasRequiredEnvironmentV8Version)return environmentV8Version;hasRequiredEnvironmentV8Version=1;var n=requireGlobalThis(),e=requireEnvironmentUserAgent(),t=n.process,r=n.Deno,i=t&&t.versions||r&&r.version,a=i&&i.v8,s,l;return a&&(s=a.split("."),l=s[0]>0&&s[0]<4?1:+(s[0]+s[1])),!l&&e&&(s=e.match(/Edge\/(\d+)/),(!s||s[1]>=74)&&(s=e.match(/Chrome\/(\d+)/),s&&(l=+s[1]))),environmentV8Version=l,environmentV8Version}var symbolConstructorDetection,hasRequiredSymbolConstructorDetection;function requireSymbolConstructorDetection(){if(hasRequiredSymbolConstructorDetection)return symbolConstructorDetection;hasRequiredSymbolConstructorDetection=1;var n=requireEnvironmentV8Version(),e=requireFails(),t=requireGlobalThis(),r=t.String;return symbolConstructorDetection=!!Object.getOwnPropertySymbols&&!e(function(){var i=Symbol("symbol detection");return!r(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&n&&n<41}),symbolConstructorDetection}var useSymbolAsUid,hasRequiredUseSymbolAsUid;function requireUseSymbolAsUid(){if(hasRequiredUseSymbolAsUid)return useSymbolAsUid;hasRequiredUseSymbolAsUid=1;var n=requireSymbolConstructorDetection();return useSymbolAsUid=n&&!Symbol.sham&&typeof Symbol.iterator=="symbol",useSymbolAsUid}var isSymbol,hasRequiredIsSymbol;function requireIsSymbol(){if(hasRequiredIsSymbol)return isSymbol;hasRequiredIsSymbol=1;var n=requireGetBuiltIn(),e=requireIsCallable(),t=requireObjectIsPrototypeOf(),r=requireUseSymbolAsUid(),i=Object;return isSymbol=r?function(a){return typeof a=="symbol"}:function(a){var s=n("Symbol");return e(s)&&t(s.prototype,i(a))},isSymbol}var tryToString,hasRequiredTryToString;function requireTryToString(){if(hasRequiredTryToString)return tryToString;hasRequiredTryToString=1;var n=String;return tryToString=function(e){try{return n(e)}catch{return"Object"}},tryToString}var aCallable,hasRequiredACallable;function requireACallable(){if(hasRequiredACallable)return aCallable;hasRequiredACallable=1;var n=requireIsCallable(),e=requireTryToString(),t=TypeError;return aCallable=function(r){if(n(r))return r;throw new t(e(r)+" is not a function")},aCallable}var getMethod,hasRequiredGetMethod;function requireGetMethod(){if(hasRequiredGetMethod)return getMethod;hasRequiredGetMethod=1;var n=requireACallable(),e=requireIsNullOrUndefined();return getMethod=function(t,r){var i=t[r];return e(i)?void 0:n(i)},getMethod}var ordinaryToPrimitive,hasRequiredOrdinaryToPrimitive;function requireOrdinaryToPrimitive(){if(hasRequiredOrdinaryToPrimitive)return ordinaryToPrimitive;hasRequiredOrdinaryToPrimitive=1;var n=requireFunctionCall(),e=requireIsCallable(),t=requireIsObject(),r=TypeError;return ordinaryToPrimitive=function(i,a){var s,l;if(a==="string"&&e(s=i.toString)&&!t(l=n(s,i))||e(s=i.valueOf)&&!t(l=n(s,i))||a!=="string"&&e(s=i.toString)&&!t(l=n(s,i)))return l;throw new r("Can't convert object to primitive value")},ordinaryToPrimitive}var sharedStore={exports:{}},isPure,hasRequiredIsPure;function requireIsPure(){return hasRequiredIsPure||(hasRequiredIsPure=1,isPure=!0),isPure}var defineGlobalProperty,hasRequiredDefineGlobalProperty;function requireDefineGlobalProperty(){if(hasRequiredDefineGlobalProperty)return defineGlobalProperty;hasRequiredDefineGlobalProperty=1;var n=requireGlobalThis(),e=Object.defineProperty;return defineGlobalProperty=function(t,r){try{e(n,t,{value:r,configurable:!0,writable:!0})}catch{n[t]=r}return r},defineGlobalProperty}var hasRequiredSharedStore;function requireSharedStore(){if(hasRequiredSharedStore)return sharedStore.exports;hasRequiredSharedStore=1;var n=requireIsPure(),e=requireGlobalThis(),t=requireDefineGlobalProperty(),r="__core-js_shared__",i=sharedStore.exports=e[r]||t(r,{});return(i.versions||(i.versions=[])).push({version:"3.40.0",mode:n?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.40.0/LICENSE",source:"https://github.com/zloirock/core-js"}),sharedStore.exports}var shared,hasRequiredShared;function requireShared(){if(hasRequiredShared)return shared;hasRequiredShared=1;var n=requireSharedStore();return shared=function(e,t){return n[e]||(n[e]=t||{})},shared}var toObject,hasRequiredToObject;function requireToObject(){if(hasRequiredToObject)return toObject;hasRequiredToObject=1;var n=requireRequireObjectCoercible(),e=Object;return toObject=function(t){return e(n(t))},toObject}var hasOwnProperty_1,hasRequiredHasOwnProperty;function requireHasOwnProperty(){if(hasRequiredHasOwnProperty)return hasOwnProperty_1;hasRequiredHasOwnProperty=1;var n=requireFunctionUncurryThis(),e=requireToObject(),t=n({}.hasOwnProperty);return hasOwnProperty_1=Object.hasOwn||function(i,a){return t(e(i),a)},hasOwnProperty_1}var uid,hasRequiredUid;function requireUid(){if(hasRequiredUid)return uid;hasRequiredUid=1;var n=requireFunctionUncurryThis(),e=0,t=Math.random(),r=n(1 .toString);return uid=function(i){return"Symbol("+(i===void 0?"":i)+")_"+r(++e+t,36)},uid}var wellKnownSymbol,hasRequiredWellKnownSymbol;function requireWellKnownSymbol(){if(hasRequiredWellKnownSymbol)return wellKnownSymbol;hasRequiredWellKnownSymbol=1;var n=requireGlobalThis(),e=requireShared(),t=requireHasOwnProperty(),r=requireUid(),i=requireSymbolConstructorDetection(),a=requireUseSymbolAsUid(),s=n.Symbol,l=e("wks"),u=a?s.for||s:s&&s.withoutSetter||r;return wellKnownSymbol=function(o){return t(l,o)||(l[o]=i&&t(s,o)?s[o]:u("Symbol."+o)),l[o]},wellKnownSymbol}var toPrimitive$6,hasRequiredToPrimitive$5;function requireToPrimitive$5(){if(hasRequiredToPrimitive$5)return toPrimitive$6;hasRequiredToPrimitive$5=1;var n=requireFunctionCall(),e=requireIsObject(),t=requireIsSymbol(),r=requireGetMethod(),i=requireOrdinaryToPrimitive(),a=requireWellKnownSymbol(),s=TypeError,l=a("toPrimitive");return toPrimitive$6=function(u,o){if(!e(u)||t(u))return u;var f=r(u,l),d;if(f){if(o===void 0&&(o="default"),d=n(f,u,o),!e(d)||t(d))return d;throw new s("Can't convert object to primitive value")}return o===void 0&&(o="number"),i(u,o)},toPrimitive$6}var toPropertyKey$1,hasRequiredToPropertyKey;function requireToPropertyKey(){if(hasRequiredToPropertyKey)return toPropertyKey$1;hasRequiredToPropertyKey=1;var n=requireToPrimitive$5(),e=requireIsSymbol();return toPropertyKey$1=function(t){var r=n(t,"string");return e(r)?r:r+""},toPropertyKey$1}var documentCreateElement,hasRequiredDocumentCreateElement;function requireDocumentCreateElement(){if(hasRequiredDocumentCreateElement)return documentCreateElement;hasRequiredDocumentCreateElement=1;var n=requireGlobalThis(),e=requireIsObject(),t=n.document,r=e(t)&&e(t.createElement);return documentCreateElement=function(i){return r?t.createElement(i):{}},documentCreateElement}var ie8DomDefine,hasRequiredIe8DomDefine;function requireIe8DomDefine(){if(hasRequiredIe8DomDefine)return ie8DomDefine;hasRequiredIe8DomDefine=1;var n=requireDescriptors(),e=requireFails(),t=requireDocumentCreateElement();return ie8DomDefine=!n&&!e(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),ie8DomDefine}var hasRequiredObjectGetOwnPropertyDescriptor;function requireObjectGetOwnPropertyDescriptor(){if(hasRequiredObjectGetOwnPropertyDescriptor)return objectGetOwnPropertyDescriptor;hasRequiredObjectGetOwnPropertyDescriptor=1;var n=requireDescriptors(),e=requireFunctionCall(),t=requireObjectPropertyIsEnumerable(),r=requireCreatePropertyDescriptor(),i=requireToIndexedObject(),a=requireToPropertyKey(),s=requireHasOwnProperty(),l=requireIe8DomDefine(),u=Object.getOwnPropertyDescriptor;return objectGetOwnPropertyDescriptor.f=n?u:function(f,d){if(f=i(f),d=a(d),l)try{return u(f,d)}catch{}if(s(f,d))return r(!e(t.f,f,d),f[d])},objectGetOwnPropertyDescriptor}var isForced_1,hasRequiredIsForced;function requireIsForced(){if(hasRequiredIsForced)return isForced_1;hasRequiredIsForced=1;var n=requireFails(),e=requireIsCallable(),t=/#|\.prototype\./,r=function(u,o){var f=a[i(u)];return f===l?!0:f===s?!1:e(o)?n(o):!!o},i=r.normalize=function(u){return String(u).replace(t,".").toLowerCase()},a=r.data={},s=r.NATIVE="N",l=r.POLYFILL="P";return isForced_1=r,isForced_1}var functionBindContext,hasRequiredFunctionBindContext;function requireFunctionBindContext(){if(hasRequiredFunctionBindContext)return functionBindContext;hasRequiredFunctionBindContext=1;var n=requireFunctionUncurryThisClause(),e=requireACallable(),t=requireFunctionBindNative(),r=n(n.bind);return functionBindContext=function(i,a){return e(i),a===void 0?i:t?r(i,a):function(){return i.apply(a,arguments)}},functionBindContext}var objectDefineProperty={},v8PrototypeDefineBug,hasRequiredV8PrototypeDefineBug;function requireV8PrototypeDefineBug(){if(hasRequiredV8PrototypeDefineBug)return v8PrototypeDefineBug;hasRequiredV8PrototypeDefineBug=1;var n=requireDescriptors(),e=requireFails();return v8PrototypeDefineBug=n&&e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),v8PrototypeDefineBug}var anObject,hasRequiredAnObject;function requireAnObject(){if(hasRequiredAnObject)return anObject;hasRequiredAnObject=1;var n=requireIsObject(),e=String,t=TypeError;return anObject=function(r){if(n(r))return r;throw new t(e(r)+" is not an object")},anObject}var hasRequiredObjectDefineProperty;function requireObjectDefineProperty(){if(hasRequiredObjectDefineProperty)return objectDefineProperty;hasRequiredObjectDefineProperty=1;var n=requireDescriptors(),e=requireIe8DomDefine(),t=requireV8PrototypeDefineBug(),r=requireAnObject(),i=requireToPropertyKey(),a=TypeError,s=Object.defineProperty,l=Object.getOwnPropertyDescriptor,u="enumerable",o="configurable",f="writable";return objectDefineProperty.f=n?t?function(h,y,m){if(r(h),y=i(y),r(m),typeof h=="function"&&y==="prototype"&&"value"in m&&f in m&&!m[f]){var v=l(h,y);v&&v[f]&&(h[y]=m.value,m={configurable:o in m?m[o]:v[o],enumerable:u in m?m[u]:v[u],writable:!1})}return s(h,y,m)}:s:function(h,y,m){if(r(h),y=i(y),r(m),e)try{return s(h,y,m)}catch{}if("get"in m||"set"in m)throw new a("Accessors not supported");return"value"in m&&(h[y]=m.value),h},objectDefineProperty}var createNonEnumerableProperty,hasRequiredCreateNonEnumerableProperty;function requireCreateNonEnumerableProperty(){if(hasRequiredCreateNonEnumerableProperty)return createNonEnumerableProperty;hasRequiredCreateNonEnumerableProperty=1;var n=requireDescriptors(),e=requireObjectDefineProperty(),t=requireCreatePropertyDescriptor();return createNonEnumerableProperty=n?function(r,i,a){return e.f(r,i,t(1,a))}:function(r,i,a){return r[i]=a,r},createNonEnumerableProperty}var _export,hasRequired_export;function require_export(){if(hasRequired_export)return _export;hasRequired_export=1;var n=requireGlobalThis(),e=requireFunctionApply(),t=requireFunctionUncurryThisClause(),r=requireIsCallable(),i=requireObjectGetOwnPropertyDescriptor().f,a=requireIsForced(),s=requirePath(),l=requireFunctionBindContext(),u=requireCreateNonEnumerableProperty(),o=requireHasOwnProperty(),f=function(d){var h=function(y,m,v){if(this instanceof h){switch(arguments.length){case 0:return new d;case 1:return new d(y);case 2:return new d(y,m)}return new d(y,m,v)}return e(d,this,arguments)};return h.prototype=d.prototype,h};return _export=function(d,h){var y=d.target,m=d.global,v=d.stat,p=d.proto,E=m?n:v?n[y]:n[y]&&n[y].prototype,S=m?s:s[y]||u(s,y,{})[y],w=S.prototype,g,b,A,q,x,D,j,F,M;for(q in h)g=a(m?q:y+(v?".":"#")+q,d.forced),b=!g&&E&&o(E,q),D=S[q],b&&(d.dontCallGetSet?(M=i(E,q),j=M&&M.value):j=E[q]),x=b&&j?j:h[q],!(!g&&!p&&typeof D==typeof x)&&(d.bind&&b?F=l(x,n):d.wrap&&b?F=f(x):p&&r(x)?F=t(x):F=x,(d.sham||x&&x.sham||D&&D.sham)&&u(F,"sham",!0),u(S,q,F),p&&(A=y+"Prototype",o(s,A)||u(s,A,{}),u(s[A],q,x),d.real&&w&&(g||!w[q])&&u(w,q,x)))},_export}var mathTrunc,hasRequiredMathTrunc;function requireMathTrunc(){if(hasRequiredMathTrunc)return mathTrunc;hasRequiredMathTrunc=1;var n=Math.ceil,e=Math.floor;return mathTrunc=Math.trunc||function(r){var i=+r;return(i>0?e:n)(i)},mathTrunc}var toIntegerOrInfinity,hasRequiredToIntegerOrInfinity;function requireToIntegerOrInfinity(){if(hasRequiredToIntegerOrInfinity)return toIntegerOrInfinity;hasRequiredToIntegerOrInfinity=1;var n=requireMathTrunc();return toIntegerOrInfinity=function(e){var t=+e;return t!==t||t===0?0:n(t)},toIntegerOrInfinity}var toAbsoluteIndex,hasRequiredToAbsoluteIndex;function requireToAbsoluteIndex(){if(hasRequiredToAbsoluteIndex)return toAbsoluteIndex;hasRequiredToAbsoluteIndex=1;var n=requireToIntegerOrInfinity(),e=Math.max,t=Math.min;return toAbsoluteIndex=function(r,i){var a=n(r);return a<0?e(a+i,0):t(a,i)},toAbsoluteIndex}var toLength,hasRequiredToLength;function requireToLength(){if(hasRequiredToLength)return toLength;hasRequiredToLength=1;var n=requireToIntegerOrInfinity(),e=Math.min;return toLength=function(t){var r=n(t);return r>0?e(r,9007199254740991):0},toLength}var lengthOfArrayLike,hasRequiredLengthOfArrayLike;function requireLengthOfArrayLike(){if(hasRequiredLengthOfArrayLike)return lengthOfArrayLike;hasRequiredLengthOfArrayLike=1;var n=requireToLength();return lengthOfArrayLike=function(e){return n(e.length)},lengthOfArrayLike}var arrayIncludes,hasRequiredArrayIncludes;function requireArrayIncludes(){if(hasRequiredArrayIncludes)return arrayIncludes;hasRequiredArrayIncludes=1;var n=requireToIndexedObject(),e=requireToAbsoluteIndex(),t=requireLengthOfArrayLike(),r=function(i){return function(a,s,l){var u=n(a),o=t(u);if(o===0)return!i&&-1;var f=e(l,o),d;if(i&&s!==s){for(;o>f;)if(d=u[f++],d!==d)return!0}else for(;o>f;f++)if((i||f in u)&&u[f]===s)return i||f||0;return!i&&-1}};return arrayIncludes={includes:r(!0),indexOf:r(!1)},arrayIncludes}var hiddenKeys,hasRequiredHiddenKeys;function requireHiddenKeys(){return hasRequiredHiddenKeys||(hasRequiredHiddenKeys=1,hiddenKeys={}),hiddenKeys}var objectKeysInternal,hasRequiredObjectKeysInternal;function requireObjectKeysInternal(){if(hasRequiredObjectKeysInternal)return objectKeysInternal;hasRequiredObjectKeysInternal=1;var n=requireFunctionUncurryThis(),e=requireHasOwnProperty(),t=requireToIndexedObject(),r=requireArrayIncludes().indexOf,i=requireHiddenKeys(),a=n([].push);return objectKeysInternal=function(s,l){var u=t(s),o=0,f=[],d;for(d in u)!e(i,d)&&e(u,d)&&a(f,d);for(;l.length>o;)e(u,d=l[o++])&&(~r(f,d)||a(f,d));return f},objectKeysInternal}var enumBugKeys,hasRequiredEnumBugKeys;function requireEnumBugKeys(){return hasRequiredEnumBugKeys||(hasRequiredEnumBugKeys=1,enumBugKeys=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),enumBugKeys}var objectKeys,hasRequiredObjectKeys;function requireObjectKeys(){if(hasRequiredObjectKeys)return objectKeys;hasRequiredObjectKeys=1;var n=requireObjectKeysInternal(),e=requireEnumBugKeys();return objectKeys=Object.keys||function(r){return n(r,e)},objectKeys}var hasRequiredEs_object_keys;function requireEs_object_keys(){if(hasRequiredEs_object_keys)return es_object_keys;hasRequiredEs_object_keys=1;var n=require_export(),e=requireToObject(),t=requireObjectKeys(),r=requireFails(),i=r(function(){t(1)});return n({target:"Object",stat:!0,forced:i},{keys:function(s){return t(e(s))}}),es_object_keys}var keys$4,hasRequiredKeys$4;function requireKeys$4(){if(hasRequiredKeys$4)return keys$4;hasRequiredKeys$4=1,requireEs_object_keys();var n=requirePath();return keys$4=n.Object.keys,keys$4}var keys$3,hasRequiredKeys$3;function requireKeys$3(){if(hasRequiredKeys$3)return keys$3;hasRequiredKeys$3=1;var n=requireKeys$4();return keys$3=n,keys$3}var keys$2,hasRequiredKeys$2;function requireKeys$2(){if(hasRequiredKeys$2)return keys$2;hasRequiredKeys$2=1;var n=requireKeys$3();return keys$2=n,keys$2}var keys$1,hasRequiredKeys$1;function requireKeys$1(){if(hasRequiredKeys$1)return keys$1;hasRequiredKeys$1=1;var n=requireKeys$2();return keys$1=n,keys$1}var keys,hasRequiredKeys;function requireKeys(){return hasRequiredKeys||(hasRequiredKeys=1,keys=requireKeys$1()),keys}var keysExports=requireKeys();const _Object$keys=getDefaultExportFromCjs(keysExports);var es_symbol={},es_symbol_constructor={},toStringTagSupport,hasRequiredToStringTagSupport;function requireToStringTagSupport(){if(hasRequiredToStringTagSupport)return toStringTagSupport;hasRequiredToStringTagSupport=1;var n=requireWellKnownSymbol(),e=n("toStringTag"),t={};return t[e]="z",toStringTagSupport=String(t)==="[object z]",toStringTagSupport}var classof,hasRequiredClassof;function requireClassof(){if(hasRequiredClassof)return classof;hasRequiredClassof=1;var n=requireToStringTagSupport(),e=requireIsCallable(),t=requireClassofRaw(),r=requireWellKnownSymbol(),i=r("toStringTag"),a=Object,s=t(function(){return arguments}())==="Arguments",l=function(u,o){try{return u[o]}catch{}};return classof=n?t:function(u){var o,f,d;return u===void 0?"Undefined":u===null?"Null":typeof(f=l(o=a(u),i))=="string"?f:s?t(o):(d=t(o))==="Object"&&e(o.callee)?"Arguments":d},classof}var toString$1,hasRequiredToString;function requireToString(){if(hasRequiredToString)return toString$1;hasRequiredToString=1;var n=requireClassof(),e=String;return toString$1=function(t){if(n(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return e(t)},toString$1}var objectDefineProperties={},hasRequiredObjectDefineProperties;function requireObjectDefineProperties(){if(hasRequiredObjectDefineProperties)return objectDefineProperties;hasRequiredObjectDefineProperties=1;var n=requireDescriptors(),e=requireV8PrototypeDefineBug(),t=requireObjectDefineProperty(),r=requireAnObject(),i=requireToIndexedObject(),a=requireObjectKeys();return objectDefineProperties.f=n&&!e?Object.defineProperties:function(l,u){r(l);for(var o=i(u),f=a(u),d=f.length,h=0,y;d>h;)t.f(l,y=f[h++],o[y]);return l},objectDefineProperties}var html,hasRequiredHtml;function requireHtml(){if(hasRequiredHtml)return html;hasRequiredHtml=1;var n=requireGetBuiltIn();return html=n("document","documentElement"),html}var sharedKey,hasRequiredSharedKey;function requireSharedKey(){if(hasRequiredSharedKey)return sharedKey;hasRequiredSharedKey=1;var n=requireShared(),e=requireUid(),t=n("keys");return sharedKey=function(r){return t[r]||(t[r]=e(r))},sharedKey}var objectCreate,hasRequiredObjectCreate;function requireObjectCreate(){if(hasRequiredObjectCreate)return objectCreate;hasRequiredObjectCreate=1;var n=requireAnObject(),e=requireObjectDefineProperties(),t=requireEnumBugKeys(),r=requireHiddenKeys(),i=requireHtml(),a=requireDocumentCreateElement(),s=requireSharedKey(),l=">",u="<",o="prototype",f="script",d=s("IE_PROTO"),h=function(){},y=function(S){return u+f+l+S+u+"/"+f+l},m=function(S){S.write(y("")),S.close();var w=S.parentWindow.Object;return S=null,w},v=function(){var S=a("iframe"),w="java"+f+":",g;return S.style.display="none",i.appendChild(S),S.src=String(w),g=S.contentWindow.document,g.open(),g.write(y("document.F=Object")),g.close(),g.F},p,E=function(){try{p=new ActiveXObject("htmlfile")}catch{}E=typeof document<"u"?document.domain&&p?m(p):v():m(p);for(var S=t.length;S--;)delete E[o][t[S]];return E()};return r[d]=!0,objectCreate=Object.create||function(w,g){var b;return w!==null?(h[o]=n(w),b=new h,h[o]=null,b[d]=w):b=E(),g===void 0?b:e.f(b,g)},objectCreate}var objectGetOwnPropertyNames={},hasRequiredObjectGetOwnPropertyNames;function requireObjectGetOwnPropertyNames(){if(hasRequiredObjectGetOwnPropertyNames)return objectGetOwnPropertyNames;hasRequiredObjectGetOwnPropertyNames=1;var n=requireObjectKeysInternal(),e=requireEnumBugKeys(),t=e.concat("length","prototype");return objectGetOwnPropertyNames.f=Object.getOwnPropertyNames||function(i){return n(i,t)},objectGetOwnPropertyNames}var objectGetOwnPropertyNamesExternal={},arraySlice,hasRequiredArraySlice;function requireArraySlice(){if(hasRequiredArraySlice)return arraySlice;hasRequiredArraySlice=1;var n=requireFunctionUncurryThis();return arraySlice=n([].slice),arraySlice}var hasRequiredObjectGetOwnPropertyNamesExternal;function requireObjectGetOwnPropertyNamesExternal(){if(hasRequiredObjectGetOwnPropertyNamesExternal)return objectGetOwnPropertyNamesExternal;hasRequiredObjectGetOwnPropertyNamesExternal=1;var n=requireClassofRaw(),e=requireToIndexedObject(),t=requireObjectGetOwnPropertyNames().f,r=requireArraySlice(),i=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(s){try{return t(s)}catch{return r(i)}};return objectGetOwnPropertyNamesExternal.f=function(l){return i&&n(l)==="Window"?a(l):t(e(l))},objectGetOwnPropertyNamesExternal}var objectGetOwnPropertySymbols={},hasRequiredObjectGetOwnPropertySymbols;function requireObjectGetOwnPropertySymbols(){return hasRequiredObjectGetOwnPropertySymbols||(hasRequiredObjectGetOwnPropertySymbols=1,objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols),objectGetOwnPropertySymbols}var defineBuiltIn,hasRequiredDefineBuiltIn;function requireDefineBuiltIn(){if(hasRequiredDefineBuiltIn)return defineBuiltIn;hasRequiredDefineBuiltIn=1;var n=requireCreateNonEnumerableProperty();return defineBuiltIn=function(e,t,r,i){return i&&i.enumerable?e[t]=r:n(e,t,r),e},defineBuiltIn}var defineBuiltInAccessor,hasRequiredDefineBuiltInAccessor;function requireDefineBuiltInAccessor(){if(hasRequiredDefineBuiltInAccessor)return defineBuiltInAccessor;hasRequiredDefineBuiltInAccessor=1;var n=requireObjectDefineProperty();return defineBuiltInAccessor=function(e,t,r){return n.f(e,t,r)},defineBuiltInAccessor}var wellKnownSymbolWrapped={},hasRequiredWellKnownSymbolWrapped;function requireWellKnownSymbolWrapped(){if(hasRequiredWellKnownSymbolWrapped)return wellKnownSymbolWrapped;hasRequiredWellKnownSymbolWrapped=1;var n=requireWellKnownSymbol();return wellKnownSymbolWrapped.f=n,wellKnownSymbolWrapped}var wellKnownSymbolDefine,hasRequiredWellKnownSymbolDefine;function requireWellKnownSymbolDefine(){if(hasRequiredWellKnownSymbolDefine)return wellKnownSymbolDefine;hasRequiredWellKnownSymbolDefine=1;var n=requirePath(),e=requireHasOwnProperty(),t=requireWellKnownSymbolWrapped(),r=requireObjectDefineProperty().f;return wellKnownSymbolDefine=function(i){var a=n.Symbol||(n.Symbol={});e(a,i)||r(a,i,{value:t.f(i)})},wellKnownSymbolDefine}var symbolDefineToPrimitive,hasRequiredSymbolDefineToPrimitive;function requireSymbolDefineToPrimitive(){if(hasRequiredSymbolDefineToPrimitive)return symbolDefineToPrimitive;hasRequiredSymbolDefineToPrimitive=1;var n=requireFunctionCall(),e=requireGetBuiltIn(),t=requireWellKnownSymbol(),r=requireDefineBuiltIn();return symbolDefineToPrimitive=function(){var i=e("Symbol"),a=i&&i.prototype,s=a&&a.valueOf,l=t("toPrimitive");a&&!a[l]&&r(a,l,function(u){return n(s,this)},{arity:1})},symbolDefineToPrimitive}var objectToString,hasRequiredObjectToString;function requireObjectToString(){if(hasRequiredObjectToString)return objectToString;hasRequiredObjectToString=1;var n=requireToStringTagSupport(),e=requireClassof();return objectToString=n?{}.toString:function(){return"[object "+e(this)+"]"},objectToString}var setToStringTag,hasRequiredSetToStringTag;function requireSetToStringTag(){if(hasRequiredSetToStringTag)return setToStringTag;hasRequiredSetToStringTag=1;var n=requireToStringTagSupport(),e=requireObjectDefineProperty().f,t=requireCreateNonEnumerableProperty(),r=requireHasOwnProperty(),i=requireObjectToString(),a=requireWellKnownSymbol(),s=a("toStringTag");return setToStringTag=function(l,u,o,f){var d=o?l:l&&l.prototype;d&&(r(d,s)||e(d,s,{configurable:!0,value:u}),f&&!n&&t(d,"toString",i))},setToStringTag}var weakMapBasicDetection,hasRequiredWeakMapBasicDetection;function requireWeakMapBasicDetection(){if(hasRequiredWeakMapBasicDetection)return weakMapBasicDetection;hasRequiredWeakMapBasicDetection=1;var n=requireGlobalThis(),e=requireIsCallable(),t=n.WeakMap;return weakMapBasicDetection=e(t)&&/native code/.test(String(t)),weakMapBasicDetection}var internalState,hasRequiredInternalState;function requireInternalState(){if(hasRequiredInternalState)return internalState;hasRequiredInternalState=1;var n=requireWeakMapBasicDetection(),e=requireGlobalThis(),t=requireIsObject(),r=requireCreateNonEnumerableProperty(),i=requireHasOwnProperty(),a=requireSharedStore(),s=requireSharedKey(),l=requireHiddenKeys(),u="Object already initialized",o=e.TypeError,f=e.WeakMap,d,h,y,m=function(S){return y(S)?h(S):d(S,{})},v=function(S){return function(w){var g;if(!t(w)||(g=h(w)).type!==S)throw new o("Incompatible receiver, "+S+" required");return g}};if(n||a.state){var p=a.state||(a.state=new f);p.get=p.get,p.has=p.has,p.set=p.set,d=function(S,w){if(p.has(S))throw new o(u);return w.facade=S,p.set(S,w),w},h=function(S){return p.get(S)||{}},y=function(S){return p.has(S)}}else{var E=s("state");l[E]=!0,d=function(S,w){if(i(S,E))throw new o(u);return w.facade=S,r(S,E,w),w},h=function(S){return i(S,E)?S[E]:{}},y=function(S){return i(S,E)}}return internalState={set:d,get:h,has:y,enforce:m,getterFor:v},internalState}var isArray$1,hasRequiredIsArray;function requireIsArray(){if(hasRequiredIsArray)return isArray$1;hasRequiredIsArray=1;var n=requireClassofRaw();return isArray$1=Array.isArray||function(t){return n(t)==="Array"},isArray$1}var inspectSource,hasRequiredInspectSource;function requireInspectSource(){if(hasRequiredInspectSource)return inspectSource;hasRequiredInspectSource=1;var n=requireFunctionUncurryThis(),e=requireIsCallable(),t=requireSharedStore(),r=n(Function.toString);return e(t.inspectSource)||(t.inspectSource=function(i){return r(i)}),inspectSource=t.inspectSource,inspectSource}var isConstructor,hasRequiredIsConstructor;function requireIsConstructor(){if(hasRequiredIsConstructor)return isConstructor;hasRequiredIsConstructor=1;var n=requireFunctionUncurryThis(),e=requireFails(),t=requireIsCallable(),r=requireClassof(),i=requireGetBuiltIn(),a=requireInspectSource(),s=function(){},l=i("Reflect","construct"),u=/^\s*(?:class|function)\b/,o=n(u.exec),f=!u.test(s),d=function(m){if(!t(m))return!1;try{return l(s,[],m),!0}catch{return!1}},h=function(m){if(!t(m))return!1;switch(r(m)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return f||!!o(u,a(m))}catch{return!0}};return h.sham=!0,isConstructor=!l||e(function(){var y;return d(d.call)||!d(Object)||!d(function(){y=!0})||y})?h:d,isConstructor}var arraySpeciesConstructor,hasRequiredArraySpeciesConstructor;function requireArraySpeciesConstructor(){if(hasRequiredArraySpeciesConstructor)return arraySpeciesConstructor;hasRequiredArraySpeciesConstructor=1;var n=requireIsArray(),e=requireIsConstructor(),t=requireIsObject(),r=requireWellKnownSymbol(),i=r("species"),a=Array;return arraySpeciesConstructor=function(s){var l;return n(s)&&(l=s.constructor,e(l)&&(l===a||n(l.prototype))?l=void 0:t(l)&&(l=l[i],l===null&&(l=void 0))),l===void 0?a:l},arraySpeciesConstructor}var arraySpeciesCreate,hasRequiredArraySpeciesCreate;function requireArraySpeciesCreate(){if(hasRequiredArraySpeciesCreate)return arraySpeciesCreate;hasRequiredArraySpeciesCreate=1;var n=requireArraySpeciesConstructor();return arraySpeciesCreate=function(e,t){return new(n(e))(t===0?0:t)},arraySpeciesCreate}var arrayIteration,hasRequiredArrayIteration;function requireArrayIteration(){if(hasRequiredArrayIteration)return arrayIteration;hasRequiredArrayIteration=1;var n=requireFunctionBindContext(),e=requireFunctionUncurryThis(),t=requireIndexedObject(),r=requireToObject(),i=requireLengthOfArrayLike(),a=requireArraySpeciesCreate(),s=e([].push),l=function(u){var o=u===1,f=u===2,d=u===3,h=u===4,y=u===6,m=u===7,v=u===5||y;return function(p,E,S,w){for(var g=r(p),b=t(g),A=i(b),q=n(E,S),x=0,D=w||a,j=o?D(p,A):f||m?D(p,0):void 0,F,M;A>x;x++)if((v||x in b)&&(F=b[x],M=q(F,x,g),u))if(o)j[x]=M;else if(M)switch(u){case 3:return!0;case 5:return F;case 6:return x;case 2:s(j,F)}else switch(u){case 4:return!1;case 7:s(j,F)}return y?-1:d||h?h:j}};return arrayIteration={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)},arrayIteration}var hasRequiredEs_symbol_constructor;function requireEs_symbol_constructor(){if(hasRequiredEs_symbol_constructor)return es_symbol_constructor;hasRequiredEs_symbol_constructor=1;var n=require_export(),e=requireGlobalThis(),t=requireFunctionCall(),r=requireFunctionUncurryThis(),i=requireIsPure(),a=requireDescriptors(),s=requireSymbolConstructorDetection(),l=requireFails(),u=requireHasOwnProperty(),o=requireObjectIsPrototypeOf(),f=requireAnObject(),d=requireToIndexedObject(),h=requireToPropertyKey(),y=requireToString(),m=requireCreatePropertyDescriptor(),v=requireObjectCreate(),p=requireObjectKeys(),E=requireObjectGetOwnPropertyNames(),S=requireObjectGetOwnPropertyNamesExternal(),w=requireObjectGetOwnPropertySymbols(),g=requireObjectGetOwnPropertyDescriptor(),b=requireObjectDefineProperty(),A=requireObjectDefineProperties(),q=requireObjectPropertyIsEnumerable(),x=requireDefineBuiltIn(),D=requireDefineBuiltInAccessor(),j=requireShared(),F=requireSharedKey(),M=requireHiddenKeys(),B=requireUid(),U=requireWellKnownSymbol(),H=requireWellKnownSymbolWrapped(),z=requireWellKnownSymbolDefine(),K=requireSymbolDefineToPrimitive(),W=requireSetToStringTag(),te=requireInternalState(),Z=requireArrayIteration().forEach,V=F("hidden"),pe="Symbol",C="prototype",k=te.set,$=te.getterFor(pe),Q=Object[C],se=e.Symbol,Y=se&&se[C],ne=e.RangeError,ue=e.TypeError,le=e.QObject,me=g.f,ve=b.f,Se=S.f,be=q.f,Te=r([].push),ye=j("symbols"),Fe=j("op-symbols"),ze=j("wks"),je=!le||!le[C]||!le[C].findChild,Be=function(X,N,O){var P=me(Q,N);P&&delete Q[N],ve(X,N,O),P&&X!==Q&&ve(Q,N,P)},ie=a&&l(function(){return v(ve({},"a",{get:function(){return ve(this,"a",{value:7}).a}})).a!==7})?Be:ve,Ne=function(X,N){var O=ye[X]=v(Y);return k(O,{type:pe,tag:X,description:N}),a||(O.description=N),O},Oe=function(N,O,P){N===Q&&Oe(Fe,O,P),f(N);var G=h(O);return f(P),u(ye,G)?(P.enumerable?(u(N,V)&&N[V][G]&&(N[V][G]=!1),P=v(P,{enumerable:m(0,!1)})):(u(N,V)||ve(N,V,m(1,v(null))),N[V][G]=!0),ie(N,G,P)):ve(N,G,P)},Le=function(N,O){f(N);var P=d(O),G=p(P).concat(J(P));return Z(G,function(re){(!a||t(ee,P,re))&&Oe(N,re,P[re])}),N},Ie=function(N,O){return O===void 0?v(N):Le(v(N),O)},ee=function(N){var O=h(N),P=t(be,this,O);return this===Q&&u(ye,O)&&!u(Fe,O)?!1:P||!u(this,O)||!u(ye,O)||u(this,V)&&this[V][O]?P:!0},ce=function(N,O){var P=d(N),G=h(O);if(!(P===Q&&u(ye,G)&&!u(Fe,G))){var re=me(P,G);return re&&u(ye,G)&&!(u(P,V)&&P[V][G])&&(re.enumerable=!0),re}},we=function(N){var O=Se(d(N)),P=[];return Z(O,function(G){!u(ye,G)&&!u(M,G)&&Te(P,G)}),P},J=function(X){var N=X===Q,O=Se(N?Fe:d(X)),P=[];return Z(O,function(G){u(ye,G)&&(!N||u(Q,G))&&Te(P,ye[G])}),P};return s||(se=function(){if(o(Y,this))throw new ue("Symbol is not a constructor");var N=!arguments.length||arguments[0]===void 0?void 0:y(arguments[0]),O=B(N),P=function(G){var re=this===void 0?e:this;re===Q&&t(P,Fe,G),u(re,V)&&u(re[V],O)&&(re[V][O]=!1);var fe=m(1,G);try{ie(re,O,fe)}catch(ae){if(!(ae instanceof ne))throw ae;Be(re,O,fe)}};return a&&je&&ie(Q,O,{configurable:!0,set:P}),Ne(O,N)},Y=se[C],x(Y,"toString",function(){return $(this).tag}),x(se,"withoutSetter",function(X){return Ne(B(X),X)}),q.f=ee,b.f=Oe,A.f=Le,g.f=ce,E.f=S.f=we,w.f=J,H.f=function(X){return Ne(U(X),X)},a&&(D(Y,"description",{configurable:!0,get:function(){return $(this).description}}),i||x(Q,"propertyIsEnumerable",ee,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!s,sham:!s},{Symbol:se}),Z(p(ze),function(X){z(X)}),n({target:pe,stat:!0,forced:!s},{useSetter:function(){je=!0},useSimple:function(){je=!1}}),n({target:"Object",stat:!0,forced:!s,sham:!a},{create:Ie,defineProperty:Oe,defineProperties:Le,getOwnPropertyDescriptor:ce}),n({target:"Object",stat:!0,forced:!s},{getOwnPropertyNames:we}),K(),W(se,pe),M[V]=!0,es_symbol_constructor}var es_symbol_for={},symbolRegistryDetection,hasRequiredSymbolRegistryDetection;function requireSymbolRegistryDetection(){if(hasRequiredSymbolRegistryDetection)return symbolRegistryDetection;hasRequiredSymbolRegistryDetection=1;var n=requireSymbolConstructorDetection();return symbolRegistryDetection=n&&!!Symbol.for&&!!Symbol.keyFor,symbolRegistryDetection}var hasRequiredEs_symbol_for;function requireEs_symbol_for(){if(hasRequiredEs_symbol_for)return es_symbol_for;hasRequiredEs_symbol_for=1;var n=require_export(),e=requireGetBuiltIn(),t=requireHasOwnProperty(),r=requireToString(),i=requireShared(),a=requireSymbolRegistryDetection(),s=i("string-to-symbol-registry"),l=i("symbol-to-string-registry");return n({target:"Symbol",stat:!0,forced:!a},{for:function(u){var o=r(u);if(t(s,o))return s[o];var f=e("Symbol")(o);return s[o]=f,l[f]=o,f}}),es_symbol_for}var es_symbol_keyFor={},hasRequiredEs_symbol_keyFor;function requireEs_symbol_keyFor(){if(hasRequiredEs_symbol_keyFor)return es_symbol_keyFor;hasRequiredEs_symbol_keyFor=1;var n=require_export(),e=requireHasOwnProperty(),t=requireIsSymbol(),r=requireTryToString(),i=requireShared(),a=requireSymbolRegistryDetection(),s=i("symbol-to-string-registry");return n({target:"Symbol",stat:!0,forced:!a},{keyFor:function(u){if(!t(u))throw new TypeError(r(u)+" is not a symbol");if(e(s,u))return s[u]}}),es_symbol_keyFor}var es_json_stringify={},getJsonReplacerFunction,hasRequiredGetJsonReplacerFunction;function requireGetJsonReplacerFunction(){if(hasRequiredGetJsonReplacerFunction)return getJsonReplacerFunction;hasRequiredGetJsonReplacerFunction=1;var n=requireFunctionUncurryThis(),e=requireIsArray(),t=requireIsCallable(),r=requireClassofRaw(),i=requireToString(),a=n([].push);return getJsonReplacerFunction=function(s){if(t(s))return s;if(e(s)){for(var l=s.length,u=[],o=0;o<l;o++){var f=s[o];typeof f=="string"?a(u,f):(typeof f=="number"||r(f)==="Number"||r(f)==="String")&&a(u,i(f))}var d=u.length,h=!0;return function(y,m){if(h)return h=!1,m;if(e(this))return m;for(var v=0;v<d;v++)if(u[v]===y)return m}}},getJsonReplacerFunction}var hasRequiredEs_json_stringify;function requireEs_json_stringify(){if(hasRequiredEs_json_stringify)return es_json_stringify;hasRequiredEs_json_stringify=1;var n=require_export(),e=requireGetBuiltIn(),t=requireFunctionApply(),r=requireFunctionCall(),i=requireFunctionUncurryThis(),a=requireFails(),s=requireIsCallable(),l=requireIsSymbol(),u=requireArraySlice(),o=requireGetJsonReplacerFunction(),f=requireSymbolConstructorDetection(),d=String,h=e("JSON","stringify"),y=i(/./.exec),m=i("".charAt),v=i("".charCodeAt),p=i("".replace),E=i(1 .toString),S=/[\uD800-\uDFFF]/g,w=/^[\uD800-\uDBFF]$/,g=/^[\uDC00-\uDFFF]$/,b=!f||a(function(){var D=e("Symbol")("stringify detection");return h([D])!=="[null]"||h({a:D})!=="{}"||h(Object(D))!=="{}"}),A=a(function(){return h("\uDF06\uD834")!=='"\\udf06\\ud834"'||h("\uDEAD")!=='"\\udead"'}),q=function(D,j){var F=u(arguments),M=o(j);if(!(!s(M)&&(D===void 0||l(D))))return F[1]=function(B,U){if(s(M)&&(U=r(M,this,d(B),U)),!l(U))return U},t(h,null,F)},x=function(D,j,F){var M=m(F,j-1),B=m(F,j+1);return y(w,D)&&!y(g,B)||y(g,D)&&!y(w,M)?"\\u"+E(v(D,0),16):D};return h&&n({target:"JSON",stat:!0,arity:3,forced:b||A},{stringify:function(j,F,M){var B=u(arguments),U=t(b?q:h,null,B);return A&&typeof U=="string"?p(U,S,x):U}}),es_json_stringify}var es_object_getOwnPropertySymbols={},hasRequiredEs_object_getOwnPropertySymbols;function requireEs_object_getOwnPropertySymbols(){if(hasRequiredEs_object_getOwnPropertySymbols)return es_object_getOwnPropertySymbols;hasRequiredEs_object_getOwnPropertySymbols=1;var n=require_export(),e=requireSymbolConstructorDetection(),t=requireFails(),r=requireObjectGetOwnPropertySymbols(),i=requireToObject(),a=!e||t(function(){r.f(1)});return n({target:"Object",stat:!0,forced:a},{getOwnPropertySymbols:function(l){var u=r.f;return u?u(i(l)):[]}}),es_object_getOwnPropertySymbols}var hasRequiredEs_symbol;function requireEs_symbol(){return hasRequiredEs_symbol||(hasRequiredEs_symbol=1,requireEs_symbol_constructor(),requireEs_symbol_for(),requireEs_symbol_keyFor(),requireEs_json_stringify(),requireEs_object_getOwnPropertySymbols()),es_symbol}var getOwnPropertySymbols$4,hasRequiredGetOwnPropertySymbols$4;function requireGetOwnPropertySymbols$4(){if(hasRequiredGetOwnPropertySymbols$4)return getOwnPropertySymbols$4;hasRequiredGetOwnPropertySymbols$4=1,requireEs_symbol();var n=requirePath();return getOwnPropertySymbols$4=n.Object.getOwnPropertySymbols,getOwnPropertySymbols$4}var getOwnPropertySymbols$3,hasRequiredGetOwnPropertySymbols$3;function requireGetOwnPropertySymbols$3(){if(hasRequiredGetOwnPropertySymbols$3)return getOwnPropertySymbols$3;hasRequiredGetOwnPropertySymbols$3=1;var n=requireGetOwnPropertySymbols$4();return getOwnPropertySymbols$3=n,getOwnPropertySymbols$3}var getOwnPropertySymbols$2,hasRequiredGetOwnPropertySymbols$2;function requireGetOwnPropertySymbols$2(){if(hasRequiredGetOwnPropertySymbols$2)return getOwnPropertySymbols$2;hasRequiredGetOwnPropertySymbols$2=1;var n=requireGetOwnPropertySymbols$3();return getOwnPropertySymbols$2=n,getOwnPropertySymbols$2}var getOwnPropertySymbols$1,hasRequiredGetOwnPropertySymbols$1;function requireGetOwnPropertySymbols$1(){if(hasRequiredGetOwnPropertySymbols$1)return getOwnPropertySymbols$1;hasRequiredGetOwnPropertySymbols$1=1;var n=requireGetOwnPropertySymbols$2();return getOwnPropertySymbols$1=n,getOwnPropertySymbols$1}var getOwnPropertySymbols,hasRequiredGetOwnPropertySymbols;function requireGetOwnPropertySymbols(){return hasRequiredGetOwnPropertySymbols||(hasRequiredGetOwnPropertySymbols=1,getOwnPropertySymbols=requireGetOwnPropertySymbols$1()),getOwnPropertySymbols}var getOwnPropertySymbolsExports=requireGetOwnPropertySymbols();const _Object$getOwnPropertySymbols=getDefaultExportFromCjs(getOwnPropertySymbolsExports);var es_array_filter={},arrayMethodHasSpeciesSupport,hasRequiredArrayMethodHasSpeciesSupport;function requireArrayMethodHasSpeciesSupport(){if(hasRequiredArrayMethodHasSpeciesSupport)return arrayMethodHasSpeciesSupport;hasRequiredArrayMethodHasSpeciesSupport=1;var n=requireFails(),e=requireWellKnownSymbol(),t=requireEnvironmentV8Version(),r=e("species");return arrayMethodHasSpeciesSupport=function(i){return t>=51||!n(function(){var a=[],s=a.constructor={};return s[r]=function(){return{foo:1}},a[i](Boolean).foo!==1})},arrayMethodHasSpeciesSupport}var hasRequiredEs_array_filter;function requireEs_array_filter(){if(hasRequiredEs_array_filter)return es_array_filter;hasRequiredEs_array_filter=1;var n=require_export(),e=requireArrayIteration().filter,t=requireArrayMethodHasSpeciesSupport(),r=t("filter");return n({target:"Array",proto:!0,forced:!r},{filter:function(a){return e(this,a,arguments.length>1?arguments[1]:void 0)}}),es_array_filter}var getBuiltInPrototypeMethod,hasRequiredGetBuiltInPrototypeMethod;function requireGetBuiltInPrototypeMethod(){if(hasRequiredGetBuiltInPrototypeMethod)return getBuiltInPrototypeMethod;hasRequiredGetBuiltInPrototypeMethod=1;var n=requireGlobalThis(),e=requirePath();return getBuiltInPrototypeMethod=function(t,r){var i=e[t+"Prototype"],a=i&&i[r];if(a)return a;var s=n[t],l=s&&s.prototype;return l&&l[r]},getBuiltInPrototypeMethod}var filter$6,hasRequiredFilter$5;function requireFilter$5(){if(hasRequiredFilter$5)return filter$6;hasRequiredFilter$5=1,requireEs_array_filter();var n=requireGetBuiltInPrototypeMethod();return filter$6=n("Array","filter"),filter$6}var filter$5,hasRequiredFilter$4;function requireFilter$4(){if(hasRequiredFilter$4)return filter$5;hasRequiredFilter$4=1;var n=requireObjectIsPrototypeOf(),e=requireFilter$5(),t=Array.prototype;return filter$5=function(r){var i=r.filter;return r===t||n(t,r)&&i===t.filter?e:i},filter$5}var filter$4,hasRequiredFilter$3;function requireFilter$3(){if(hasRequiredFilter$3)return filter$4;hasRequiredFilter$3=1;var n=requireFilter$4();return filter$4=n,filter$4}var filter$3,hasRequiredFilter$2;function requireFilter$2(){if(hasRequiredFilter$2)return filter$3;hasRequiredFilter$2=1;var n=requireFilter$3();return filter$3=n,filter$3}var filter$2,hasRequiredFilter$1;function requireFilter$1(){if(hasRequiredFilter$1)return filter$2;hasRequiredFilter$1=1;var n=requireFilter$2();return filter$2=n,filter$2}var filter$1,hasRequiredFilter;function requireFilter(){return hasRequiredFilter||(hasRequiredFilter=1,filter$1=requireFilter$1()),filter$1}var filterExports=requireFilter();const _filterInstanceProperty=getDefaultExportFromCjs(filterExports);var getOwnPropertyDescriptor$4={exports:{}},es_object_getOwnPropertyDescriptor={},hasRequiredEs_object_getOwnPropertyDescriptor;function requireEs_object_getOwnPropertyDescriptor(){if(hasRequiredEs_object_getOwnPropertyDescriptor)return es_object_getOwnPropertyDescriptor;hasRequiredEs_object_getOwnPropertyDescriptor=1;var n=require_export(),e=requireFails(),t=requireToIndexedObject(),r=requireObjectGetOwnPropertyDescriptor().f,i=requireDescriptors(),a=!i||e(function(){r(1)});return n({target:"Object",stat:!0,forced:a,sham:!i},{getOwnPropertyDescriptor:function(l,u){return r(t(l),u)}}),es_object_getOwnPropertyDescriptor}var hasRequiredGetOwnPropertyDescriptor$4;function requireGetOwnPropertyDescriptor$4(){if(hasRequiredGetOwnPropertyDescriptor$4)return getOwnPropertyDescriptor$4.exports;hasRequiredGetOwnPropertyDescriptor$4=1,requireEs_object_getOwnPropertyDescriptor();var n=requirePath(),e=n.Object,t=getOwnPropertyDescriptor$4.exports=function(i,a){return e.getOwnPropertyDescriptor(i,a)};return e.getOwnPropertyDescriptor.sham&&(t.sham=!0),getOwnPropertyDescriptor$4.exports}var getOwnPropertyDescriptor$3,hasRequiredGetOwnPropertyDescriptor$3;function requireGetOwnPropertyDescriptor$3(){if(hasRequiredGetOwnPropertyDescriptor$3)return getOwnPropertyDescriptor$3;hasRequiredGetOwnPropertyDescriptor$3=1;var n=requireGetOwnPropertyDescriptor$4();return getOwnPropertyDescriptor$3=n,getOwnPropertyDescriptor$3}var getOwnPropertyDescriptor$2,hasRequiredGetOwnPropertyDescriptor$2;function requireGetOwnPropertyDescriptor$2(){if(hasRequiredGetOwnPropertyDescriptor$2)return getOwnPropertyDescriptor$2;hasRequiredGetOwnPropertyDescriptor$2=1;var n=requireGetOwnPropertyDescriptor$3();return getOwnPropertyDescriptor$2=n,getOwnPropertyDescriptor$2}var getOwnPropertyDescriptor$1,hasRequiredGetOwnPropertyDescriptor$1;function requireGetOwnPropertyDescriptor$1(){if(hasRequiredGetOwnPropertyDescriptor$1)return getOwnPropertyDescriptor$1;hasRequiredGetOwnPropertyDescriptor$1=1;var n=requireGetOwnPropertyDescriptor$2();return getOwnPropertyDescriptor$1=n,getOwnPropertyDescriptor$1}var getOwnPropertyDescriptor,hasRequiredGetOwnPropertyDescriptor;function requireGetOwnPropertyDescriptor(){return hasRequiredGetOwnPropertyDescriptor||(hasRequiredGetOwnPropertyDescriptor=1,getOwnPropertyDescriptor=requireGetOwnPropertyDescriptor$1()),getOwnPropertyDescriptor}var getOwnPropertyDescriptorExports=requireGetOwnPropertyDescriptor();const _Object$getOwnPropertyDescriptor=getDefaultExportFromCjs(getOwnPropertyDescriptorExports);var es_array_push={},arraySetLength,hasRequiredArraySetLength;function requireArraySetLength(){if(hasRequiredArraySetLength)return arraySetLength;hasRequiredArraySetLength=1;var n=requireDescriptors(),e=requireIsArray(),t=TypeError,r=Object.getOwnPropertyDescriptor,i=n&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(a){return a instanceof TypeError}}();return arraySetLength=i?function(a,s){if(e(a)&&!r(a,"length").writable)throw new t("Cannot set read only .length");return a.length=s}:function(a,s){return a.length=s},arraySetLength}var doesNotExceedSafeInteger,hasRequiredDoesNotExceedSafeInteger;function requireDoesNotExceedSafeInteger(){if(hasRequiredDoesNotExceedSafeInteger)return doesNotExceedSafeInteger;hasRequiredDoesNotExceedSafeInteger=1;var n=TypeError,e=9007199254740991;return doesNotExceedSafeInteger=function(t){if(t>e)throw n("Maximum allowed index exceeded");return t},doesNotExceedSafeInteger}var hasRequiredEs_array_push;function requireEs_array_push(){if(hasRequiredEs_array_push)return es_array_push;hasRequiredEs_array_push=1;var n=require_export(),e=requireToObject(),t=requireLengthOfArrayLike(),r=requireArraySetLength(),i=requireDoesNotExceedSafeInteger(),a=requireFails(),s=a(function(){return[].push.call({length:4294967296},1)!==4294967297}),l=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(o){return o instanceof TypeError}},u=s||!l();return n({target:"Array",proto:!0,arity:1,forced:u},{push:function(f){var d=e(this),h=t(d),y=arguments.length;i(h+y);for(var m=0;m<y;m++)d[h]=arguments[m],h++;return r(d,h),h}}),es_array_push}var push$5,hasRequiredPush$5;function requirePush$5(){if(hasRequiredPush$5)return push$5;hasRequiredPush$5=1,requireEs_array_push();var n=requireGetBuiltInPrototypeMethod();return push$5=n("Array","push"),push$5}var push$4,hasRequiredPush$4;function requirePush$4(){if(hasRequiredPush$4)return push$4;hasRequiredPush$4=1;var n=requireObjectIsPrototypeOf(),e=requirePush$5(),t=Array.prototype;return push$4=function(r){var i=r.push;return r===t||n(t,r)&&i===t.push?e:i},push$4}var push$3,hasRequiredPush$3;function requirePush$3(){if(hasRequiredPush$3)return push$3;hasRequiredPush$3=1;var n=requirePush$4();return push$3=n,push$3}var push$2,hasRequiredPush$2;function requirePush$2(){if(hasRequiredPush$2)return push$2;hasRequiredPush$2=1;var n=requirePush$3();return push$2=n,push$2}var push$1,hasRequiredPush$1;function requirePush$1(){if(hasRequiredPush$1)return push$1;hasRequiredPush$1=1;var n=requirePush$2();return push$1=n,push$1}var push,hasRequiredPush;function requirePush(){return hasRequiredPush||(hasRequiredPush=1,push=requirePush$1()),push}var pushExports=requirePush();const _pushInstanceProperty=getDefaultExportFromCjs(pushExports);var es_array_forEach={},arrayMethodIsStrict,hasRequiredArrayMethodIsStrict;function requireArrayMethodIsStrict(){if(hasRequiredArrayMethodIsStrict)return arrayMethodIsStrict;hasRequiredArrayMethodIsStrict=1;var n=requireFails();return arrayMethodIsStrict=function(e,t){var r=[][e];return!!r&&n(function(){r.call(null,t||function(){return 1},1)})},arrayMethodIsStrict}var arrayForEach,hasRequiredArrayForEach;function requireArrayForEach(){if(hasRequiredArrayForEach)return arrayForEach;hasRequiredArrayForEach=1;var n=requireArrayIteration().forEach,e=requireArrayMethodIsStrict(),t=e("forEach");return arrayForEach=t?[].forEach:function(i){return n(this,i,arguments.length>1?arguments[1]:void 0)},arrayForEach}var hasRequiredEs_array_forEach;function requireEs_array_forEach(){if(hasRequiredEs_array_forEach)return es_array_forEach;hasRequiredEs_array_forEach=1;var n=require_export(),e=requireArrayForEach();return n({target:"Array",proto:!0,forced:[].forEach!==e},{forEach:e}),es_array_forEach}var forEach$5,hasRequiredForEach$5;function requireForEach$5(){if(hasRequiredForEach$5)return forEach$5;hasRequiredForEach$5=1,requireEs_array_forEach();var n=requireGetBuiltInPrototypeMethod();return forEach$5=n("Array","forEach"),forEach$5}var forEach$4,hasRequiredForEach$4;function requireForEach$4(){if(hasRequiredForEach$4)return forEach$4;hasRequiredForEach$4=1;var n=requireForEach$5();return forEach$4=n,forEach$4}var forEach$3,hasRequiredForEach$3;function requireForEach$3(){if(hasRequiredForEach$3)return forEach$3;hasRequiredForEach$3=1;var n=requireClassof(),e=requireHasOwnProperty(),t=requireObjectIsPrototypeOf(),r=requireForEach$4(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return forEach$3=function(s){var l=s.forEach;return s===i||t(i,s)&&l===i.forEach||e(a,n(s))?r:l},forEach$3}var forEach$2,hasRequiredForEach$2;function requireForEach$2(){if(hasRequiredForEach$2)return forEach$2;hasRequiredForEach$2=1;var n=requireForEach$3();return forEach$2=n,forEach$2}var forEach$1,hasRequiredForEach$1;function requireForEach$1(){if(hasRequiredForEach$1)return forEach$1;hasRequiredForEach$1=1;var n=requireForEach$2();return forEach$1=n,forEach$1}var forEach,hasRequiredForEach;function requireForEach(){return hasRequiredForEach||(hasRequiredForEach=1,forEach=requireForEach$1()),forEach}var forEachExports=requireForEach();const _forEachInstanceProperty=getDefaultExportFromCjs(forEachExports);var es_object_getOwnPropertyDescriptors={},ownKeys$1,hasRequiredOwnKeys;function requireOwnKeys(){if(hasRequiredOwnKeys)return ownKeys$1;hasRequiredOwnKeys=1;var n=requireGetBuiltIn(),e=requireFunctionUncurryThis(),t=requireObjectGetOwnPropertyNames(),r=requireObjectGetOwnPropertySymbols(),i=requireAnObject(),a=e([].concat);return ownKeys$1=n("Reflect","ownKeys")||function(l){var u=t.f(i(l)),o=r.f;return o?a(u,o(l)):u},ownKeys$1}var createProperty,hasRequiredCreateProperty;function requireCreateProperty(){if(hasRequiredCreateProperty)return createProperty;hasRequiredCreateProperty=1;var n=requireDescriptors(),e=requireObjectDefineProperty(),t=requireCreatePropertyDescriptor();return createProperty=function(r,i,a){n?e.f(r,i,t(0,a)):r[i]=a},createProperty}var hasRequiredEs_object_getOwnPropertyDescriptors;function requireEs_object_getOwnPropertyDescriptors(){if(hasRequiredEs_object_getOwnPropertyDescriptors)return es_object_getOwnPropertyDescriptors;hasRequiredEs_object_getOwnPropertyDescriptors=1;var n=require_export(),e=requireDescriptors(),t=requireOwnKeys(),r=requireToIndexedObject(),i=requireObjectGetOwnPropertyDescriptor(),a=requireCreateProperty();return n({target:"Object",stat:!0,sham:!e},{getOwnPropertyDescriptors:function(l){for(var u=r(l),o=i.f,f=t(u),d={},h=0,y,m;f.length>h;)m=o(u,y=f[h++]),m!==void 0&&a(d,y,m);return d}}),es_object_getOwnPropertyDescriptors}var getOwnPropertyDescriptors$4,hasRequiredGetOwnPropertyDescriptors$4;function requireGetOwnPropertyDescriptors$4(){if(hasRequiredGetOwnPropertyDescriptors$4)return getOwnPropertyDescriptors$4;hasRequiredGetOwnPropertyDescriptors$4=1,requireEs_object_getOwnPropertyDescriptors();var n=requirePath();return getOwnPropertyDescriptors$4=n.Object.getOwnPropertyDescriptors,getOwnPropertyDescriptors$4}var getOwnPropertyDescriptors$3,hasRequiredGetOwnPropertyDescriptors$3;function requireGetOwnPropertyDescriptors$3(){if(hasRequiredGetOwnPropertyDescriptors$3)return getOwnPropertyDescriptors$3;hasRequiredGetOwnPropertyDescriptors$3=1;var n=requireGetOwnPropertyDescriptors$4();return getOwnPropertyDescriptors$3=n,getOwnPropertyDescriptors$3}var getOwnPropertyDescriptors$2,hasRequiredGetOwnPropertyDescriptors$2;function requireGetOwnPropertyDescriptors$2(){if(hasRequiredGetOwnPropertyDescriptors$2)return getOwnPropertyDescriptors$2;hasRequiredGetOwnPropertyDescriptors$2=1;var n=requireGetOwnPropertyDescriptors$3();return getOwnPropertyDescriptors$2=n,getOwnPropertyDescriptors$2}var getOwnPropertyDescriptors$1,hasRequiredGetOwnPropertyDescriptors$1;function requireGetOwnPropertyDescriptors$1(){if(hasRequiredGetOwnPropertyDescriptors$1)return getOwnPropertyDescriptors$1;hasRequiredGetOwnPropertyDescriptors$1=1;var n=requireGetOwnPropertyDescriptors$2();return getOwnPropertyDescriptors$1=n,getOwnPropertyDescriptors$1}var getOwnPropertyDescriptors,hasRequiredGetOwnPropertyDescriptors;function requireGetOwnPropertyDescriptors(){return hasRequiredGetOwnPropertyDescriptors||(hasRequiredGetOwnPropertyDescriptors=1,getOwnPropertyDescriptors=requireGetOwnPropertyDescriptors$1()),getOwnPropertyDescriptors}var getOwnPropertyDescriptorsExports=requireGetOwnPropertyDescriptors();const _Object$getOwnPropertyDescriptors=getDefaultExportFromCjs(getOwnPropertyDescriptorsExports);var defineProperties$4={exports:{}},es_object_defineProperties={},hasRequiredEs_object_defineProperties;function requireEs_object_defineProperties(){if(hasRequiredEs_object_defineProperties)return es_object_defineProperties;hasRequiredEs_object_defineProperties=1;var n=require_export(),e=requireDescriptors(),t=requireObjectDefineProperties().f;return n({target:"Object",stat:!0,forced:Object.defineProperties!==t,sham:!e},{defineProperties:t}),es_object_defineProperties}var hasRequiredDefineProperties$4;function requireDefineProperties$4(){if(hasRequiredDefineProperties$4)return defineProperties$4.exports;hasRequiredDefineProperties$4=1,requireEs_object_defineProperties();var n=requirePath(),e=n.Object,t=defineProperties$4.exports=function(i,a){return e.defineProperties(i,a)};return e.defineProperties.sham&&(t.sham=!0),defineProperties$4.exports}var defineProperties$3,hasRequiredDefineProperties$3;function requireDefineProperties$3(){if(hasRequiredDefineProperties$3)return defineProperties$3;hasRequiredDefineProperties$3=1;var n=requireDefineProperties$4();return defineProperties$3=n,defineProperties$3}var defineProperties$2,hasRequiredDefineProperties$2;function requireDefineProperties$2(){if(hasRequiredDefineProperties$2)return defineProperties$2;hasRequiredDefineProperties$2=1;var n=requireDefineProperties$3();return defineProperties$2=n,defineProperties$2}var defineProperties$1,hasRequiredDefineProperties$1;function requireDefineProperties$1(){if(hasRequiredDefineProperties$1)return defineProperties$1;hasRequiredDefineProperties$1=1;var n=requireDefineProperties$2();return defineProperties$1=n,defineProperties$1}var defineProperties,hasRequiredDefineProperties;function requireDefineProperties(){return hasRequiredDefineProperties||(hasRequiredDefineProperties=1,defineProperties=requireDefineProperties$1()),defineProperties}var definePropertiesExports=requireDefineProperties();const _Object$defineProperties=getDefaultExportFromCjs(definePropertiesExports);var defineProperty$4={exports:{}},es_object_defineProperty={},hasRequiredEs_object_defineProperty;function requireEs_object_defineProperty(){if(hasRequiredEs_object_defineProperty)return es_object_defineProperty;hasRequiredEs_object_defineProperty=1;var n=require_export(),e=requireDescriptors(),t=requireObjectDefineProperty().f;return n({target:"Object",stat:!0,forced:Object.defineProperty!==t,sham:!e},{defineProperty:t}),es_object_defineProperty}var hasRequiredDefineProperty$4;function requireDefineProperty$4(){if(hasRequiredDefineProperty$4)return defineProperty$4.exports;hasRequiredDefineProperty$4=1,requireEs_object_defineProperty();var n=requirePath(),e=n.Object,t=defineProperty$4.exports=function(i,a,s){return e.defineProperty(i,a,s)};return e.defineProperty.sham&&(t.sham=!0),defineProperty$4.exports}var defineProperty$3,hasRequiredDefineProperty$3;function requireDefineProperty$3(){if(hasRequiredDefineProperty$3)return defineProperty$3;hasRequiredDefineProperty$3=1;var n=requireDefineProperty$4();return defineProperty$3=n,defineProperty$3}var defineProperty$2,hasRequiredDefineProperty$2;function requireDefineProperty$2(){if(hasRequiredDefineProperty$2)return defineProperty$2;hasRequiredDefineProperty$2=1;var n=requireDefineProperty$3();return defineProperty$2=n,defineProperty$2}var defineProperty$1,hasRequiredDefineProperty$1;function requireDefineProperty$1(){if(hasRequiredDefineProperty$1)return defineProperty$1;hasRequiredDefineProperty$1=1;var n=requireDefineProperty$2();return defineProperty$1=n,defineProperty$1}var defineProperty,hasRequiredDefineProperty;function requireDefineProperty(){return hasRequiredDefineProperty||(hasRequiredDefineProperty=1,defineProperty=requireDefineProperty$1()),defineProperty}var definePropertyExports=requireDefineProperty();const _Object$defineProperty=getDefaultExportFromCjs(definePropertyExports);var es_array_concat={},hasRequiredEs_array_concat;function requireEs_array_concat(){if(hasRequiredEs_array_concat)return es_array_concat;hasRequiredEs_array_concat=1;var n=require_export(),e=requireFails(),t=requireIsArray(),r=requireIsObject(),i=requireToObject(),a=requireLengthOfArrayLike(),s=requireDoesNotExceedSafeInteger(),l=requireCreateProperty(),u=requireArraySpeciesCreate(),o=requireArrayMethodHasSpeciesSupport(),f=requireWellKnownSymbol(),d=requireEnvironmentV8Version(),h=f("isConcatSpreadable"),y=d>=51||!e(function(){var p=[];return p[h]=!1,p.concat()[0]!==p}),m=function(p){if(!r(p))return!1;var E=p[h];return E!==void 0?!!E:t(p)},v=!y||!o("concat");return n({target:"Array",proto:!0,arity:1,forced:v},{concat:function(E){var S=i(this),w=u(S,0),g=0,b,A,q,x,D;for(b=-1,q=arguments.length;b<q;b++)if(D=b===-1?S:arguments[b],m(D))for(x=a(D),s(g+x),A=0;A<x;A++,g++)A in D&&l(w,g,D[A]);else s(g+1),l(w,g++,D);return w.length=g,w}}),es_array_concat}var es_symbol_asyncIterator={},hasRequiredEs_symbol_asyncIterator;function requireEs_symbol_asyncIterator(){if(hasRequiredEs_symbol_asyncIterator)return es_symbol_asyncIterator;hasRequiredEs_symbol_asyncIterator=1;var n=requireWellKnownSymbolDefine();return n("asyncIterator"),es_symbol_asyncIterator}var es_symbol_hasInstance={},hasRequiredEs_symbol_hasInstance;function requireEs_symbol_hasInstance(){if(hasRequiredEs_symbol_hasInstance)return es_symbol_hasInstance;hasRequiredEs_symbol_hasInstance=1;var n=requireWellKnownSymbolDefine();return n("hasInstance"),es_symbol_hasInstance}var es_symbol_isConcatSpreadable={},hasRequiredEs_symbol_isConcatSpreadable;function requireEs_symbol_isConcatSpreadable(){if(hasRequiredEs_symbol_isConcatSpreadable)return es_symbol_isConcatSpreadable;hasRequiredEs_symbol_isConcatSpreadable=1;var n=requireWellKnownSymbolDefine();return n("isConcatSpreadable"),es_symbol_isConcatSpreadable}var es_symbol_iterator={},hasRequiredEs_symbol_iterator;function requireEs_symbol_iterator(){if(hasRequiredEs_symbol_iterator)return es_symbol_iterator;hasRequiredEs_symbol_iterator=1;var n=requireWellKnownSymbolDefine();return n("iterator"),es_symbol_iterator}var es_symbol_match={},hasRequiredEs_symbol_match;function requireEs_symbol_match(){if(hasRequiredEs_symbol_match)return es_symbol_match;hasRequiredEs_symbol_match=1;var n=requireWellKnownSymbolDefine();return n("match"),es_symbol_match}var es_symbol_matchAll={},hasRequiredEs_symbol_matchAll;function requireEs_symbol_matchAll(){if(hasRequiredEs_symbol_matchAll)return es_symbol_matchAll;hasRequiredEs_symbol_matchAll=1;var n=requireWellKnownSymbolDefine();return n("matchAll"),es_symbol_matchAll}var es_symbol_replace={},hasRequiredEs_symbol_replace;function requireEs_symbol_replace(){if(hasRequiredEs_symbol_replace)return es_symbol_replace;hasRequiredEs_symbol_replace=1;var n=requireWellKnownSymbolDefine();return n("replace"),es_symbol_replace}var es_symbol_search={},hasRequiredEs_symbol_search;function requireEs_symbol_search(){if(hasRequiredEs_symbol_search)return es_symbol_search;hasRequiredEs_symbol_search=1;var n=requireWellKnownSymbolDefine();return n("search"),es_symbol_search}var es_symbol_species={},hasRequiredEs_symbol_species;function requireEs_symbol_species(){if(hasRequiredEs_symbol_species)return es_symbol_species;hasRequiredEs_symbol_species=1;var n=requireWellKnownSymbolDefine();return n("species"),es_symbol_species}var es_symbol_split={},hasRequiredEs_symbol_split;function requireEs_symbol_split(){if(hasRequiredEs_symbol_split)return es_symbol_split;hasRequiredEs_symbol_split=1;var n=requireWellKnownSymbolDefine();return n("split"),es_symbol_split}var es_symbol_toPrimitive={},hasRequiredEs_symbol_toPrimitive;function requireEs_symbol_toPrimitive(){if(hasRequiredEs_symbol_toPrimitive)return es_symbol_toPrimitive;hasRequiredEs_symbol_toPrimitive=1;var n=requireWellKnownSymbolDefine(),e=requireSymbolDefineToPrimitive();return n("toPrimitive"),e(),es_symbol_toPrimitive}var es_symbol_toStringTag={},hasRequiredEs_symbol_toStringTag;function requireEs_symbol_toStringTag(){if(hasRequiredEs_symbol_toStringTag)return es_symbol_toStringTag;hasRequiredEs_symbol_toStringTag=1;var n=requireGetBuiltIn(),e=requireWellKnownSymbolDefine(),t=requireSetToStringTag();return e("toStringTag"),t(n("Symbol"),"Symbol"),es_symbol_toStringTag}var es_symbol_unscopables={},hasRequiredEs_symbol_unscopables;function requireEs_symbol_unscopables(){if(hasRequiredEs_symbol_unscopables)return es_symbol_unscopables;hasRequiredEs_symbol_unscopables=1;var n=requireWellKnownSymbolDefine();return n("unscopables"),es_symbol_unscopables}var es_json_toStringTag={},hasRequiredEs_json_toStringTag;function requireEs_json_toStringTag(){if(hasRequiredEs_json_toStringTag)return es_json_toStringTag;hasRequiredEs_json_toStringTag=1;var n=requireGlobalThis(),e=requireSetToStringTag();return e(n.JSON,"JSON",!0),es_json_toStringTag}var symbol$4,hasRequiredSymbol$4;function requireSymbol$4(){if(hasRequiredSymbol$4)return symbol$4;hasRequiredSymbol$4=1,requireEs_array_concat(),requireEs_symbol(),requireEs_symbol_asyncIterator(),requireEs_symbol_hasInstance(),requireEs_symbol_isConcatSpreadable(),requireEs_symbol_iterator(),requireEs_symbol_match(),requireEs_symbol_matchAll(),requireEs_symbol_replace(),requireEs_symbol_search(),requireEs_symbol_species(),requireEs_symbol_split(),requireEs_symbol_toPrimitive(),requireEs_symbol_toStringTag(),requireEs_symbol_unscopables(),requireEs_json_toStringTag();var n=requirePath();return symbol$4=n.Symbol,symbol$4}var web_domCollections_iterator={},addToUnscopables,hasRequiredAddToUnscopables;function requireAddToUnscopables(){return hasRequiredAddToUnscopables||(hasRequiredAddToUnscopables=1,addToUnscopables=function(){}),addToUnscopables}var iterators,hasRequiredIterators;function requireIterators(){return hasRequiredIterators||(hasRequiredIterators=1,iterators={}),iterators}var functionName,hasRequiredFunctionName;function requireFunctionName(){if(hasRequiredFunctionName)return functionName;hasRequiredFunctionName=1;var n=requireDescriptors(),e=requireHasOwnProperty(),t=Function.prototype,r=n&&Object.getOwnPropertyDescriptor,i=e(t,"name"),a=i&&(function(){}).name==="something",s=i&&(!n||n&&r(t,"name").configurable);return functionName={EXISTS:i,PROPER:a,CONFIGURABLE:s},functionName}var correctPrototypeGetter,hasRequiredCorrectPrototypeGetter;function requireCorrectPrototypeGetter(){if(hasRequiredCorrectPrototypeGetter)return correctPrototypeGetter;hasRequiredCorrectPrototypeGetter=1;var n=requireFails();return correctPrototypeGetter=!n(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),correctPrototypeGetter}var objectGetPrototypeOf,hasRequiredObjectGetPrototypeOf;function requireObjectGetPrototypeOf(){if(hasRequiredObjectGetPrototypeOf)return objectGetPrototypeOf;hasRequiredObjectGetPrototypeOf=1;var n=requireHasOwnProperty(),e=requireIsCallable(),t=requireToObject(),r=requireSharedKey(),i=requireCorrectPrototypeGetter(),a=r("IE_PROTO"),s=Object,l=s.prototype;return objectGetPrototypeOf=i?s.getPrototypeOf:function(u){var o=t(u);if(n(o,a))return o[a];var f=o.constructor;return e(f)&&o instanceof f?f.prototype:o instanceof s?l:null},objectGetPrototypeOf}var iteratorsCore,hasRequiredIteratorsCore;function requireIteratorsCore(){if(hasRequiredIteratorsCore)return iteratorsCore;hasRequiredIteratorsCore=1;var n=requireFails(),e=requireIsCallable(),t=requireIsObject(),r=requireObjectCreate(),i=requireObjectGetPrototypeOf(),a=requireDefineBuiltIn(),s=requireWellKnownSymbol(),l=requireIsPure(),u=s("iterator"),o=!1,f,d,h;[].keys&&(h=[].keys(),"next"in h?(d=i(i(h)),d!==Object.prototype&&(f=d)):o=!0);var y=!t(f)||n(function(){var m={};return f[u].call(m)!==m});return y?f={}:l&&(f=r(f)),e(f[u])||a(f,u,function(){return this}),iteratorsCore={IteratorPrototype:f,BUGGY_SAFARI_ITERATORS:o},iteratorsCore}var iteratorCreateConstructor,hasRequiredIteratorCreateConstructor;function requireIteratorCreateConstructor(){if(hasRequiredIteratorCreateConstructor)return iteratorCreateConstructor;hasRequiredIteratorCreateConstructor=1;var n=requireIteratorsCore().IteratorPrototype,e=requireObjectCreate(),t=requireCreatePropertyDescriptor(),r=requireSetToStringTag(),i=requireIterators(),a=function(){return this};return iteratorCreateConstructor=function(s,l,u,o){var f=l+" Iterator";return s.prototype=e(n,{next:t(+!o,u)}),r(s,f,!1,!0),i[f]=a,s},iteratorCreateConstructor}var functionUncurryThisAccessor,hasRequiredFunctionUncurryThisAccessor;function requireFunctionUncurryThisAccessor(){if(hasRequiredFunctionUncurryThisAccessor)return functionUncurryThisAccessor;hasRequiredFunctionUncurryThisAccessor=1;var n=requireFunctionUncurryThis(),e=requireACallable();return functionUncurryThisAccessor=function(t,r,i){try{return n(e(Object.getOwnPropertyDescriptor(t,r)[i]))}catch{}},functionUncurryThisAccessor}var isPossiblePrototype,hasRequiredIsPossiblePrototype;function requireIsPossiblePrototype(){if(hasRequiredIsPossiblePrototype)return isPossiblePrototype;hasRequiredIsPossiblePrototype=1;var n=requireIsObject();return isPossiblePrototype=function(e){return n(e)||e===null},isPossiblePrototype}var aPossiblePrototype,hasRequiredAPossiblePrototype;function requireAPossiblePrototype(){if(hasRequiredAPossiblePrototype)return aPossiblePrototype;hasRequiredAPossiblePrototype=1;var n=requireIsPossiblePrototype(),e=String,t=TypeError;return aPossiblePrototype=function(r){if(n(r))return r;throw new t("Can't set "+e(r)+" as a prototype")},aPossiblePrototype}var objectSetPrototypeOf,hasRequiredObjectSetPrototypeOf;function requireObjectSetPrototypeOf(){if(hasRequiredObjectSetPrototypeOf)return objectSetPrototypeOf;hasRequiredObjectSetPrototypeOf=1;var n=requireFunctionUncurryThisAccessor(),e=requireIsObject(),t=requireRequireObjectCoercible(),r=requireAPossiblePrototype();return objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var i=!1,a={},s;try{s=n(Object.prototype,"__proto__","set"),s(a,[]),i=a instanceof Array}catch{}return function(u,o){return t(u),r(o),e(u)&&(i?s(u,o):u.__proto__=o),u}}():void 0),objectSetPrototypeOf}var iteratorDefine,hasRequiredIteratorDefine;function requireIteratorDefine(){if(hasRequiredIteratorDefine)return iteratorDefine;hasRequiredIteratorDefine=1;var n=require_export(),e=requireFunctionCall(),t=requireIsPure(),r=requireFunctionName(),i=requireIsCallable(),a=requireIteratorCreateConstructor(),s=requireObjectGetPrototypeOf(),l=requireObjectSetPrototypeOf(),u=requireSetToStringTag(),o=requireCreateNonEnumerableProperty(),f=requireDefineBuiltIn(),d=requireWellKnownSymbol(),h=requireIterators(),y=requireIteratorsCore(),m=r.PROPER,v=r.CONFIGURABLE,p=y.IteratorPrototype,E=y.BUGGY_SAFARI_ITERATORS,S=d("iterator"),w="keys",g="values",b="entries",A=function(){return this};return iteratorDefine=function(q,x,D,j,F,M,B){a(D,x,j);var U=function(k){if(k===F&&te)return te;if(!E&&k&&k in K)return K[k];switch(k){case w:return function(){return new D(this,k)};case g:return function(){return new D(this,k)};case b:return function(){return new D(this,k)}}return function(){return new D(this)}},H=x+" Iterator",z=!1,K=q.prototype,W=K[S]||K["@@iterator"]||F&&K[F],te=!E&&W||U(F),Z=x==="Array"&&K.entries||W,V,pe,C;if(Z&&(V=s(Z.call(new q)),V!==Object.prototype&&V.next&&(!t&&s(V)!==p&&(l?l(V,p):i(V[S])||f(V,S,A)),u(V,H,!0,!0),t&&(h[H]=A))),m&&F===g&&W&&W.name!==g&&(!t&&v?o(K,"name",g):(z=!0,te=function(){return e(W,this)})),F)if(pe={values:U(g),keys:M?te:U(w),entries:U(b)},B)for(C in pe)(E||z||!(C in K))&&f(K,C,pe[C]);else n({target:x,proto:!0,forced:E||z},pe);return(!t||B)&&K[S]!==te&&f(K,S,te,{name:F}),h[x]=te,pe},iteratorDefine}var createIterResultObject,hasRequiredCreateIterResultObject;function requireCreateIterResultObject(){return hasRequiredCreateIterResultObject||(hasRequiredCreateIterResultObject=1,createIterResultObject=function(n,e){return{value:n,done:e}}),createIterResultObject}var es_array_iterator,hasRequiredEs_array_iterator;function requireEs_array_iterator(){if(hasRequiredEs_array_iterator)return es_array_iterator;hasRequiredEs_array_iterator=1;var n=requireToIndexedObject(),e=requireAddToUnscopables(),t=requireIterators(),r=requireInternalState(),i=requireObjectDefineProperty().f,a=requireIteratorDefine(),s=requireCreateIterResultObject(),l=requireIsPure(),u=requireDescriptors(),o="Array Iterator",f=r.set,d=r.getterFor(o);es_array_iterator=a(Array,"Array",function(y,m){f(this,{type:o,target:n(y),index:0,kind:m})},function(){var y=d(this),m=y.target,v=y.index++;if(!m||v>=m.length)return y.target=null,s(void 0,!0);switch(y.kind){case"keys":return s(v,!1);case"values":return s(m[v],!1)}return s([v,m[v]],!1)},"values");var h=t.Arguments=t.Array;if(e("keys"),e("values"),e("entries"),!l&&u&&h.name!=="values")try{i(h,"name",{value:"values"})}catch{}return es_array_iterator}var domIterables,hasRequiredDomIterables;function requireDomIterables(){return hasRequiredDomIterables||(hasRequiredDomIterables=1,domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),domIterables}var hasRequiredWeb_domCollections_iterator;function requireWeb_domCollections_iterator(){if(hasRequiredWeb_domCollections_iterator)return web_domCollections_iterator;hasRequiredWeb_domCollections_iterator=1,requireEs_array_iterator();var n=requireDomIterables(),e=requireGlobalThis(),t=requireSetToStringTag(),r=requireIterators();for(var i in n)t(e[i],i),r[i]=r.Array;return web_domCollections_iterator}var symbol$3,hasRequiredSymbol$3;function requireSymbol$3(){if(hasRequiredSymbol$3)return symbol$3;hasRequiredSymbol$3=1;var n=requireSymbol$4();return requireWeb_domCollections_iterator(),symbol$3=n,symbol$3}var esnext_function_metadata={},hasRequiredEsnext_function_metadata;function requireEsnext_function_metadata(){if(hasRequiredEsnext_function_metadata)return esnext_function_metadata;hasRequiredEsnext_function_metadata=1;var n=requireWellKnownSymbol(),e=requireObjectDefineProperty().f,t=n("metadata"),r=Function.prototype;return r[t]===void 0&&e(r,t,{value:null}),esnext_function_metadata}var esnext_symbol_asyncDispose={},hasRequiredEsnext_symbol_asyncDispose;function requireEsnext_symbol_asyncDispose(){if(hasRequiredEsnext_symbol_asyncDispose)return esnext_symbol_asyncDispose;hasRequiredEsnext_symbol_asyncDispose=1;var n=requireWellKnownSymbolDefine();return n("asyncDispose"),esnext_symbol_asyncDispose}var esnext_symbol_dispose={},hasRequiredEsnext_symbol_dispose;function requireEsnext_symbol_dispose(){if(hasRequiredEsnext_symbol_dispose)return esnext_symbol_dispose;hasRequiredEsnext_symbol_dispose=1;var n=requireWellKnownSymbolDefine();return n("dispose"),esnext_symbol_dispose}var esnext_symbol_metadata={},hasRequiredEsnext_symbol_metadata;function requireEsnext_symbol_metadata(){if(hasRequiredEsnext_symbol_metadata)return esnext_symbol_metadata;hasRequiredEsnext_symbol_metadata=1;var n=requireWellKnownSymbolDefine();return n("metadata"),esnext_symbol_metadata}var symbol$2,hasRequiredSymbol$2;function requireSymbol$2(){if(hasRequiredSymbol$2)return symbol$2;hasRequiredSymbol$2=1;var n=requireSymbol$3();return requireEsnext_function_metadata(),requireEsnext_symbol_asyncDispose(),requireEsnext_symbol_dispose(),requireEsnext_symbol_metadata(),symbol$2=n,symbol$2}var esnext_symbol_isRegisteredSymbol={},symbolIsRegistered,hasRequiredSymbolIsRegistered;function requireSymbolIsRegistered(){if(hasRequiredSymbolIsRegistered)return symbolIsRegistered;hasRequiredSymbolIsRegistered=1;var n=requireGetBuiltIn(),e=requireFunctionUncurryThis(),t=n("Symbol"),r=t.keyFor,i=e(t.prototype.valueOf);return symbolIsRegistered=t.isRegisteredSymbol||function(s){try{return r(i(s))!==void 0}catch{return!1}},symbolIsRegistered}var hasRequiredEsnext_symbol_isRegisteredSymbol;function requireEsnext_symbol_isRegisteredSymbol(){if(hasRequiredEsnext_symbol_isRegisteredSymbol)return esnext_symbol_isRegisteredSymbol;hasRequiredEsnext_symbol_isRegisteredSymbol=1;var n=require_export(),e=requireSymbolIsRegistered();return n({target:"Symbol",stat:!0},{isRegisteredSymbol:e}),esnext_symbol_isRegisteredSymbol}var esnext_symbol_isWellKnownSymbol={},symbolIsWellKnown,hasRequiredSymbolIsWellKnown;function requireSymbolIsWellKnown(){if(hasRequiredSymbolIsWellKnown)return symbolIsWellKnown;hasRequiredSymbolIsWellKnown=1;for(var n=requireShared(),e=requireGetBuiltIn(),t=requireFunctionUncurryThis(),r=requireIsSymbol(),i=requireWellKnownSymbol(),a=e("Symbol"),s=a.isWellKnownSymbol,l=e("Object","getOwnPropertyNames"),u=t(a.prototype.valueOf),o=n("wks"),f=0,d=l(a),h=d.length;f<h;f++)try{var y=d[f];r(a[y])&&i(y)}catch{}return symbolIsWellKnown=function(v){if(s&&s(v))return!0;try{for(var p=u(v),E=0,S=l(o),w=S.length;E<w;E++)if(o[S[E]]==p)return!0}catch{}return!1},symbolIsWellKnown}var hasRequiredEsnext_symbol_isWellKnownSymbol;function requireEsnext_symbol_isWellKnownSymbol(){if(hasRequiredEsnext_symbol_isWellKnownSymbol)return esnext_symbol_isWellKnownSymbol;hasRequiredEsnext_symbol_isWellKnownSymbol=1;var n=require_export(),e=requireSymbolIsWellKnown();return n({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:e}),esnext_symbol_isWellKnownSymbol}var esnext_symbol_customMatcher={},hasRequiredEsnext_symbol_customMatcher;function requireEsnext_symbol_customMatcher(){if(hasRequiredEsnext_symbol_customMatcher)return esnext_symbol_customMatcher;hasRequiredEsnext_symbol_customMatcher=1;var n=requireWellKnownSymbolDefine();return n("customMatcher"),esnext_symbol_customMatcher}var esnext_symbol_observable={},hasRequiredEsnext_symbol_observable;function requireEsnext_symbol_observable(){if(hasRequiredEsnext_symbol_observable)return esnext_symbol_observable;hasRequiredEsnext_symbol_observable=1;var n=requireWellKnownSymbolDefine();return n("observable"),esnext_symbol_observable}var esnext_symbol_isRegistered={},hasRequiredEsnext_symbol_isRegistered;function requireEsnext_symbol_isRegistered(){if(hasRequiredEsnext_symbol_isRegistered)return esnext_symbol_isRegistered;hasRequiredEsnext_symbol_isRegistered=1;var n=require_export(),e=requireSymbolIsRegistered();return n({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:e}),esnext_symbol_isRegistered}var esnext_symbol_isWellKnown={},hasRequiredEsnext_symbol_isWellKnown;function requireEsnext_symbol_isWellKnown(){if(hasRequiredEsnext_symbol_isWellKnown)return esnext_symbol_isWellKnown;hasRequiredEsnext_symbol_isWellKnown=1;var n=require_export(),e=requireSymbolIsWellKnown();return n({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:e}),esnext_symbol_isWellKnown}var esnext_symbol_matcher={},hasRequiredEsnext_symbol_matcher;function requireEsnext_symbol_matcher(){if(hasRequiredEsnext_symbol_matcher)return esnext_symbol_matcher;hasRequiredEsnext_symbol_matcher=1;var n=requireWellKnownSymbolDefine();return n("matcher"),esnext_symbol_matcher}var esnext_symbol_metadataKey={},hasRequiredEsnext_symbol_metadataKey;function requireEsnext_symbol_metadataKey(){if(hasRequiredEsnext_symbol_metadataKey)return esnext_symbol_metadataKey;hasRequiredEsnext_symbol_metadataKey=1;var n=requireWellKnownSymbolDefine();return n("metadataKey"),esnext_symbol_metadataKey}var esnext_symbol_patternMatch={},hasRequiredEsnext_symbol_patternMatch;function requireEsnext_symbol_patternMatch(){if(hasRequiredEsnext_symbol_patternMatch)return esnext_symbol_patternMatch;hasRequiredEsnext_symbol_patternMatch=1;var n=requireWellKnownSymbolDefine();return n("patternMatch"),esnext_symbol_patternMatch}var esnext_symbol_replaceAll={},hasRequiredEsnext_symbol_replaceAll;function requireEsnext_symbol_replaceAll(){if(hasRequiredEsnext_symbol_replaceAll)return esnext_symbol_replaceAll;hasRequiredEsnext_symbol_replaceAll=1;var n=requireWellKnownSymbolDefine();return n("replaceAll"),esnext_symbol_replaceAll}var symbol$1,hasRequiredSymbol$1;function requireSymbol$1(){if(hasRequiredSymbol$1)return symbol$1;hasRequiredSymbol$1=1;var n=requireSymbol$2();return requireEsnext_symbol_isRegisteredSymbol(),requireEsnext_symbol_isWellKnownSymbol(),requireEsnext_symbol_customMatcher(),requireEsnext_symbol_observable(),requireEsnext_symbol_isRegistered(),requireEsnext_symbol_isWellKnown(),requireEsnext_symbol_matcher(),requireEsnext_symbol_metadataKey(),requireEsnext_symbol_patternMatch(),requireEsnext_symbol_replaceAll(),symbol$1=n,symbol$1}var symbol,hasRequiredSymbol;function requireSymbol(){return hasRequiredSymbol||(hasRequiredSymbol=1,symbol=requireSymbol$1()),symbol}var symbolExports=requireSymbol();const _Symbol=getDefaultExportFromCjs(symbolExports);var es_string_iterator={},stringMultibyte,hasRequiredStringMultibyte;function requireStringMultibyte(){if(hasRequiredStringMultibyte)return stringMultibyte;hasRequiredStringMultibyte=1;var n=requireFunctionUncurryThis(),e=requireToIntegerOrInfinity(),t=requireToString(),r=requireRequireObjectCoercible(),i=n("".charAt),a=n("".charCodeAt),s=n("".slice),l=function(u){return function(o,f){var d=t(r(o)),h=e(f),y=d.length,m,v;return h<0||h>=y?u?"":void 0:(m=a(d,h),m<55296||m>56319||h+1===y||(v=a(d,h+1))<56320||v>57343?u?i(d,h):m:u?s(d,h,h+2):(m-55296<<10)+(v-56320)+65536)}};return stringMultibyte={codeAt:l(!1),charAt:l(!0)},stringMultibyte}var hasRequiredEs_string_iterator;function requireEs_string_iterator(){if(hasRequiredEs_string_iterator)return es_string_iterator;hasRequiredEs_string_iterator=1;var n=requireStringMultibyte().charAt,e=requireToString(),t=requireInternalState(),r=requireIteratorDefine(),i=requireCreateIterResultObject(),a="String Iterator",s=t.set,l=t.getterFor(a);return r(String,"String",function(u){s(this,{type:a,string:e(u),index:0})},function(){var o=l(this),f=o.string,d=o.index,h;return d>=f.length?i(void 0,!0):(h=n(f,d),o.index+=h.length,i(h,!1))}),es_string_iterator}var iterator$4,hasRequiredIterator$4;function requireIterator$4(){if(hasRequiredIterator$4)return iterator$4;hasRequiredIterator$4=1,requireEs_array_iterator(),requireEs_string_iterator(),requireEs_symbol_iterator();var n=requireWellKnownSymbolWrapped();return iterator$4=n.f("iterator"),iterator$4}var iterator$3,hasRequiredIterator$3;function requireIterator$3(){if(hasRequiredIterator$3)return iterator$3;hasRequiredIterator$3=1;var n=requireIterator$4();return requireWeb_domCollections_iterator(),iterator$3=n,iterator$3}var iterator$2,hasRequiredIterator$2;function requireIterator$2(){if(hasRequiredIterator$2)return iterator$2;hasRequiredIterator$2=1;var n=requireIterator$3();return iterator$2=n,iterator$2}var iterator$1,hasRequiredIterator$1;function requireIterator$1(){if(hasRequiredIterator$1)return iterator$1;hasRequiredIterator$1=1;var n=requireIterator$2();return iterator$1=n,iterator$1}var iterator,hasRequiredIterator;function requireIterator(){return hasRequiredIterator||(hasRequiredIterator=1,iterator=requireIterator$1()),iterator}var iteratorExports=requireIterator();const _Symbol$iterator=getDefaultExportFromCjs(iteratorExports);function _typeof$1(n){"@babel/helpers - typeof";return _typeof$1=typeof _Symbol=="function"&&typeof _Symbol$iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof _Symbol=="function"&&e.constructor===_Symbol&&e!==_Symbol.prototype?"symbol":typeof e},_typeof$1(n)}var toPrimitive$5,hasRequiredToPrimitive$4;function requireToPrimitive$4(){if(hasRequiredToPrimitive$4)return toPrimitive$5;hasRequiredToPrimitive$4=1,requireEs_symbol_toPrimitive();var n=requireWellKnownSymbolWrapped();return toPrimitive$5=n.f("toPrimitive"),toPrimitive$5}var toPrimitive$4,hasRequiredToPrimitive$3;function requireToPrimitive$3(){if(hasRequiredToPrimitive$3)return toPrimitive$4;hasRequiredToPrimitive$3=1;var n=requireToPrimitive$4();return toPrimitive$4=n,toPrimitive$4}var toPrimitive$3,hasRequiredToPrimitive$2;function requireToPrimitive$2(){if(hasRequiredToPrimitive$2)return toPrimitive$3;hasRequiredToPrimitive$2=1;var n=requireToPrimitive$3();return toPrimitive$3=n,toPrimitive$3}var toPrimitive$2,hasRequiredToPrimitive$1;function requireToPrimitive$1(){if(hasRequiredToPrimitive$1)return toPrimitive$2;hasRequiredToPrimitive$1=1;var n=requireToPrimitive$2();return toPrimitive$2=n,toPrimitive$2}var toPrimitive$1,hasRequiredToPrimitive;function requireToPrimitive(){return hasRequiredToPrimitive||(hasRequiredToPrimitive=1,toPrimitive$1=requireToPrimitive$1()),toPrimitive$1}var toPrimitiveExports=requireToPrimitive();const _Symbol$toPrimitive=getDefaultExportFromCjs(toPrimitiveExports);function toPrimitive(n,e){if(_typeof$1(n)!="object"||!n)return n;var t=n[_Symbol$toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(_typeof$1(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function toPropertyKey(n){var e=toPrimitive(n,"string");return _typeof$1(e)=="symbol"?e:e+""}function _defineProperty(n,e,t){return(e=toPropertyKey(e))in n?_Object$defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function ownKeys(n,e){var t=_Object$keys(n);if(_Object$getOwnPropertySymbols){var r=_Object$getOwnPropertySymbols(n);e&&(r=_filterInstanceProperty(r).call(r,function(i){return _Object$getOwnPropertyDescriptor(n,i).enumerable})),_pushInstanceProperty(t).apply(t,r)}return t}function _objectSpread2(n){for(var e=1;e<arguments.length;e++){var t,r,i=arguments[e]!=null?arguments[e]:{};e%2?_forEachInstanceProperty(t=ownKeys(Object(i),!0)).call(t,function(a){_defineProperty(n,a,i[a])}):_Object$getOwnPropertyDescriptors?_Object$defineProperties(n,_Object$getOwnPropertyDescriptors(i)):_forEachInstanceProperty(r=ownKeys(Object(i))).call(r,function(a){_Object$defineProperty(n,a,_Object$getOwnPropertyDescriptor(i,a))})}return n}function generateModulesList(n,e,t){return[{data_type:"text",name:"Text",icon:"text_icon",url:e+"/"+n+"text_data.js",type:"gh_element",technology:"angular"},{data_type:"text_opt",name:"Options",icon:"option_gh_element",url:e+"/"+n+"text_options_data.js",type:"gh_element",technology:"angular"},{data_type:"number",name:"Number",icon:"number",url:e+"/"+n+"number_data.js",type:"gh_element",technology:"angular"},{data_type:"task_board",name:"Task Board",icon:"task_board",url:e+"/"+n+"task_board_data.js",type:"gh_element",technology:"angular"},{data_type:"visualizer",name:"visualizer",icon:"visualizer",url:e+"/"+n+"visualizer_data.js",type:"gh_element",technology:"angular"},{data_type:"enterprice_visualizer",name:"Enterprice Visualizer",icon:"visualizer",private:!0,url:e+"/"+n+"enterprice_visualizer_data.js",type:"gh_element",technology:"angular"},{data_type:"email",name:"Email",icon:"email",url:e+"/"+n+"email_data.js",type:"gh_element",technology:"angular"},{data_type:"date",name:"Date",icon:"date_gh_element",url:e+"/"+n+"date_data.js",type:"gh_element",technology:"angular"},{data_type:"radio_button",name:"Radio Button",icon:"radio_button_gh_element",url:e+"/"+n+"radio_button_data.js",type:"gh_element",technology:"angular"},{data_type:"radio_icon",name:"Radio icon",icon:"radio_icon_gh_element",url:e+"/"+n+"radio_icon_data.js",type:"gh_element",technology:"angular"},{data_type:"twilio_phone",name:"Twilio Phone",icon:"phone_twilio_gh_element",url:e+"/"+n+"twilio_phone_data.js",type:"gh_element",technology:"angular"},{data_type:"twilio_autodialer",name:"Twilio Auto Dialer",icon:"twilio_dialer",url:e+"/"+n+"twillio_autodialer_data.js",type:"gh_element",technology:"angular"},{data_type:"color",name:"Color",icon:"paint_gh_element",url:e+"/"+n+"color_data.js",type:"gh_element",technology:"angular"},{data_type:"charts",name:"Charts",icon:"graph_gh_element",url:e+"/"+n+"charts_data.js",type:"gh_element",technology:"angular"},{data_type:"funnel_chart",name:"Funnel chart",icon:"funnel_chart_gh_element",url:e+"/"+n+"funnel_chart_data.js",type:"gh_element",technology:"angular"},{data_type:"add_items_from_template",name:"Add items from template",icon:"contact_second",url:e+"/"+n+"add_items_from_template_data.js",type:"gh_element",technology:"angular"},{data_type:"item_ref",name:"Reference",icon:"reference",url:e+"/"+n+"itemRef_data.js",type:"gh_element",technology:"angular"},{data_type:"calendar",name:"Calendar",icon:"calendar",js:"https://gudhub.com/modules/FullCalendar-Gh-Element/dist/main.js?t=4",css:"https://gudhub.com/modules/FullCalendar-Gh-Element/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"data_ref",name:"Data Reference",icon:"data_reference",url:e+"/"+n+"data_ref_data.js",type:"gh_element",technology:"angular"},{data_type:"table",name:"Table",icon:"table",url:e+"/"+n+"table_data.js",type:"gh_element",technology:"angular"},{data_type:"tile",name:"Tile table",icon:"tile_table",url:e+"/"+n+"tile_data.js",type:"gh_element",technology:"angular"},{data_type:"file",name:"File",icon:"box",url:e+"/"+n+"file_data.js",type:"gh_element",technology:"angular"},{data_type:"image",name:"Image",icon:"image",url:e+"/"+n+"image_data.js",type:"gh_element",technology:"angular"},{data_type:"text_editor",name:"Text Editor",icon:"square",url:e+"/"+n+"text_editor_data.js",type:"gh_element",technology:"angular"},{data_type:"tinymse",name:"Text editor MSE",icon:"tag",url:e+"/"+n+"tinymse_data.js",type:"gh_element",technology:"angular"},{data_type:"duration",name:"Duration",icon:"number_gh_element",url:e+"/"+n+"duration_data.js",type:"gh_element",technology:"angular"},{data_type:"user",name:"User",icon:"user_gh_element",url:e+"/"+n+"user_data.js",type:"gh_element",technology:"angular"},{data_type:"app",name:"App",icon:"app",url:e+"/"+n+"application_data.js",type:"gh_element",technology:"angular"},{data_type:"field",name:"Field",icon:"field_gh_element",url:e+"/"+n+"field_data.js",type:"gh_element",technology:"angular"},{data_type:"available",name:"Available",icon:"availible_gh_element",url:e+"/"+n+"available_data.js",type:"gh_element",technology:"angular"},{data_type:"view_list",name:"View List",icon:"view_list",url:e+"/"+n+"view_list_data.js",type:"gh_element",technology:"angular"},{data_type:"calculator",name:"Calculator",icon:"calculator",url:e+"/"+n+"calculator_data.js",type:"gh_element",technology:"angular"},{data_type:"string_join",name:"String Joiner",icon:"string_join_gh_element",url:e+"/"+n+"string_joiner_data.js",type:"gh_element",technology:"angular"},{data_type:"signature",name:"Signature",icon:"signature",url:e+"/"+n+"signature_data.js",type:"gh_element",technology:"angular"},{data_type:"sendEmail",name:"Send Email",icon:"send_email_gh_element",url:e+"/"+n+"send_email_data.js",type:"gh_element",technology:"angular"},{data_type:"boolean",name:"Yes/No",icon:"boolen_gh_element",url:e+"/"+n+"boolean_data.js",type:"gh_element",technology:"angular"},{data_type:"product_gallery",name:"Product gallery",icon:"product_gallery",url:e+"/"+n+"product_gallery_data.js",type:"gh_element",technology:"angular"},{data_type:"online_inventory",name:"Online inventory",icon:"slab",url:e+"/"+n+"online_inventory_data.js",type:"gh_element",technology:"angular"},{data_type:"3d_edges",name:"3D Edges",icon:"3d_edges_gh_element",url:e+"/"+n+"3d_edges_data.js",type:"gh_element",technology:"angular"},{data_type:"color_list",name:"Color list",icon:"circular_gh_element",url:e+"/"+n+"color_list_data.js",type:"gh_element",technology:"angular"},{data_type:"go_to_link",name:"Go to Link",icon:"go_to_link",url:e+"/"+n+"go_to_link_data.js",type:"gh_element",technology:"angular"},{data_type:"go_to_view",name:"Go to View",icon:"go_to_view",url:e+"/"+n+"go_to_view_data.js",type:"gh_element",technology:"angular"},{data_type:"range",name:"Range",icon:"range_gh_element",url:e+"/"+n+"range_data.js",type:"gh_element",technology:"angular"},{data_type:"barcode",name:"Barcode",icon:"barcode_gh_element",url:e+"/"+n+"barcode_data.js",type:"gh_element",technology:"angular"},{data_type:"item_remote_add",name:"Item remote add",icon:"remote_add_gh_element",url:e+"/"+n+"item_remote_add_data.js",type:"gh_element",technology:"angular"},{data_type:"item_remote_update",name:"Item remote update",icon:"remote_update_gh_element",url:e+"/"+n+"item_remote_update_data.js",type:"gh_element",technology:"angular"},{data_type:"timeline",name:"Timeline",icon:"timeline",url:e+"/"+n+"timeline_data.js",type:"gh_element",technology:"angular"},{data_type:"delete_item",name:"Delete Item",icon:"rubbish",url:e+"/"+n+"delete_action.js",type:"gh_element",technology:"angular"},{data_type:"print_doc",name:"Print document",icon:"print",url:e+"/"+n+"print_doc_action.js",type:"gh_element",technology:"angular"},{data_type:"open_item",name:"Open Item",icon:"delete",private:!0,url:e+"/"+n+"open_item_action.js",type:"gh_element",technology:"angular"},{data_type:"edit_template",name:"Edit template",icon:"delete",private:!0,url:e+"/"+n+"edit_template_action.js",type:"gh_element",technology:"angular"},{data_type:"open_app",private:!0,name:"Open App",icon:"delete",url:e+"/"+n+"open_app_action.js",type:"gh_element",technology:"angular"},{data_type:"user_settings",private:!0,name:"User Settings",icon:"delete",url:e+"/"+n+"user_settings_action.js",type:"gh_element",technology:"angular"},{data_type:"app_sharing",name:"Sharing",icon:"sharing",url:e+"/"+n+"sharing_action.js",type:"gh_element",technology:"angular"},{data_type:"app_constructor",private:!0,name:"App constructor",icon:"app_constructor",url:e+"/"+n+"app_constructor_action.js",type:"gh_element",technology:"angular"},{data_type:"app_settings",name:"App Settings",icon:"configuration",url:e+"/"+n+"app_settings_action.js",type:"gh_element",technology:"angular"},{data_type:"export_csv",name:"Export CSV",icon:"export_csv",url:e+"/"+n+"export_csv.js",type:"gh_element",technology:"angular"},{data_type:"import_csv",name:"Import CSV",icon:"import_csv",url:e+"/"+n+"import_csv.js",type:"gh_element",technology:"angular"},{data_type:"add_items",name:"Add Items",icon:"plus",url:e+"/"+n+"add_items_action.js",type:"gh_element",technology:"angular"},{data_type:"update_items",name:"Update Items",icon:"update",url:e+"/"+n+"update_items_action.js",type:"gh_element",technology:"angular"},{data_type:"install_app",name:"Install",icon:"install",url:e+"/"+n+"install_app_action.js",type:"gh_element",technology:"angular"},{data_type:"search_action",name:"Search",icon:"search",url:e+"/"+n+"search_action.js",type:"gh_element",technology:"angular"},{data_type:"filter_table",name:"Table filter",icon:"filter",url:e+"/"+n+"filter_table_action.js",type:"gh_element",technology:"angular"},{data_type:"slider",name:"Slider",icon:"slider",url:e+"/"+n+"slider_data.js",type:"gh_element",technology:"angular"},{data_type:"clone_item",name:"Clone Item",icon:"double_plus",url:e+"/"+n+"clone_item_action.js",type:"gh_element",technology:"angular"},{data_type:"close",name:"Close",icon:"cross",url:e+"/"+n+"close_action.js",type:"gh_element",technology:"angular"},{data_type:"phone",name:"Phone",icon:"phone_thin",url:e+"/"+n+"phone_data.js",type:"gh_element",technology:"angular"},{data_type:"link",name:"Link",icon:"link_gh_element",url:e+"/"+n+"link_data.js",type:"gh_element",technology:"angular"},{data_type:"sheduling",name:"Sheduling",icon:"scheduling",url:e+"/"+n+"sheduling_data.js",type:"gh_element",technology:"angular"},{data_type:"qrcode",name:"QR Code",icon:"qr_code",url:e+"/"+n+"qrcode_data.js",type:"gh_element",technology:"angular"},{data_type:"graph2d",name:"Graph",icon:"graph",url:e+"/"+n+"graph2d_data.js",type:"gh_element",technology:"angular"},{data_type:"quote_tool",name:"Quote tool",icon:"quoters",url:e+"/"+n+"quote_tool_data.js",type:"gh_element",technology:"angular"},{data_type:"cards",name:"Cards",icon:"cards",url:e+"/"+n+"cards_data.js",type:"gh_element",technology:"angular"},{data_type:"jsonConstructor",name:"Json Constructor",icon:"button",url:e+"/"+n+"json_constructor_data.js",type:"gh_element",technology:"angular"},{data_type:"button",name:"Button",icon:"button",js:"https://gudhub.com/modules/button_action/button_action.js?t=1",type:"gh_element",technology:"class"},{data_type:"editorjs",name:"EditorJS",icon:"code_editor",js:"https://gudhub.com/modules/Editor-Js/dist/main.js?t=2",css:"https://gudhub.com/modules/Editor-Js/dist/style.css?t=2",type:"gh_element",technology:"class"},{data_type:"filter_advanced",name:"Filter Advanced",icon:"filter_advanced",url:e+"/"+n+"filter_advanced_data.js",type:"gh_element",technology:"angular"},{data_type:"code_editor",name:"Code Editor",icon:"code_editor",url:e+"/"+n+"code_editor_data.js",type:"gh_element",technology:"angular"},{data_type:"icon",name:"Icon",icon:"icon_gh_element",url:e+"/"+n+"icon_data.js",type:"gh_element",technology:"angular"},{data_type:"quoteRequest",name:"Quote Request",icon:"invoices",url:e+"/"+n+"quote_request_data.js",type:"gh_element",technology:"angular"},{data_type:"view_container",name:"View Container",icon:"pencil",url:e+"/"+n+"view_container_data.js",type:"gh_element",technology:"angular"},{data_type:"element_ref",name:"Element Reference",icon:"cloudSync_gh_element",url:e+"/"+n+"element_ref_data.js",type:"gh_element",technology:"angular"},{data_type:"quote_tool_objects_renderer",name:"Quote Tool Renderer",icon:"l_counter",url:e+"/"+n+"quote_tool_objects_renderer_data.js",type:"gh_element",technology:"angular"},{data_type:"quote_tool_objects_renderer_generator",name:"Quote Tool Parts Generator",icon:"l_counter_arrow",url:e+"/"+n+"quote_tool_objects_renderer_generator_data.js",type:"gh_element",technology:"angular"},{data_type:"trigger",name:"Trigger",icon:"job",url:e+"/"+n+"trigger_data.js",type:"gh_element",technology:"angular"},{data_type:"voting",name:"Voting",icon:"like_gh_element",url:e+"/"+n+"voting_data.js",type:"gh_element",technology:"angular"},{data_type:"view_tabs",name:"View Tab",icon:"tabs",url:e+"/"+n+"view_tabs.js",type:"gh_element",technology:"angular"},{data_type:"filter_tabs",name:"Filter Tabs",icon:"filter_tabs_gh_element",url:e+"/"+n+"filter_tabs.js",type:"gh_element",technology:"angular"},{data_type:"gps_coords",name:"GPS Coords",icon:"location_gh_element",url:e+"/"+n+"gps_coords.js",type:"gh_element",technology:"angular"},{data_type:"google_map",name:"Google Map",icon:"location",url:e+"/"+n+"google_map_data.js",type:"gh_element",technology:"angular"},{data_type:"data_migrations",name:"Data migrations",icon:"view_list_gh_element",url:e+"/"+n+"data_migrations.js",type:"gh_element",technology:"angular"},{data_type:"additional_settings",name:"Additional Settings",icon:"",private:!0,url:e+"/"+n+"gh_additional_settings_data.js",type:"gh_element",technology:"angular"},{data_type:"send_request",name:"Send Request",icon:"send_request_gh_element",url:e+"/"+n+"send_request_data.js",type:"gh_element",technology:"angular"},{data_type:"webcam",name:"Web camera",icon:"webcam_gh_element",url:e+"/"+n+"webcam_data.js",type:"gh_element",technology:"angular"},{data_type:"json_viewer",name:"JSON viewer",icon:"json_gh_element",url:e+"/"+n+"json_viewer_data.js",type:"gh_element",technology:"angular"},{data_type:"notifications",name:"Notifications",icon:"full_gh_element",url:e+"/"+n+"notifications_data.js",type:"gh_element",technology:"angular"},{data_type:"api",name:"API",icon:"job",url:e+"/"+n+"api_data.js",type:"gh_element",technology:"angular"},{data_type:"smart_input",name:"Smart Input",icon:"roket",url:e+"/"+n+"smart_input_data.js",type:"gh_element",technology:"angular"},{data_type:"json_editor",name:"JSON Editor",icon:"code",url:e+"/"+n+"json_editor_data.js",type:"gh_element",technology:"angular"},{data_type:"grapes_html_editor",name:"Grapes Html Editor",icon:"code_editor",url:e+"/"+n+"grapes_html_editor_data.js",type:"gh_element",technology:"angular"},{data_type:"quiz",name:"Quiz",icon:"quiz_gh_element",url:e+"/"+n+"quiz_data.js",type:"gh_element",technology:"angular"},{data_type:"password_input",name:"Password",icon:"lock_gh_element",url:e+"/"+n+"password_input_data.js",type:"gh_element",technology:"angular"},{data_type:"vs_code",name:"VS Code",icon:"code_editor",url:e+"/"+n+"vs_code_data.js",type:"gh_element",technology:"angular"},{data_type:"nested_list",name:"Nested List",icon:"scheduling",js:"https://gudhub.com/modules/Nested-List/dist/main.js?t=2",css:"https://gudhub.com/modules/Nested-List/dist/style.css?t=2",type:"gh_element",technology:"class"},{data_type:"countertop_smart_quote",name:"Countertop Smart Quote",icon:"quoters",url:e+"/"+n+"countertop_smart_quote_data.js",type:"gh_element",technology:"angular"},{data_type:"markdown_viewer",name:"Markdown viewer",icon:"code_editor",js:"https://gudhub.com/modules/markdown-it-gh-element/dist/main.js?t=1",css:"https://gudhub.com/modules/markdown-it-gh-element/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"html_viewer",name:"HTML Viewer",icon:"code_editor",js:"https://gudhub.com/modules/HTML-Viewer/dist/main.js?t=1",css:"https://gudhub.com/modules/HTML-Viewer/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"element_customizer",name:"Element Customizer",icon:"pencil",url:e+"/"+n+"element_customizer_data.js",type:"gh_element",technology:"angular"},{data_type:"task",name:"Task",icon:"table",url:e+"/"+n+"task_data.js",type:"gh_element",technology:"angular"},{data_type:"cron_picker",name:"Cron Picker",icon:"table",js:"https://gudhub.com/modules/Cron-Picker/dist/main.js?t=2",css:"https://gudhub.com/modules/Cron-Picker/dist/style.css?t=2",type:"gh_element",technology:"class"},{data_type:"balance_sheet",name:"Balance Sheet",icon:"table",js:"https://gudhub.com/modules/balance-sheet/dist/main.js?t=2",css:"https://gudhub.com/modules/balance-sheet/dist/style.css?t=2",type:"gh_element",technology:"class"},{data_type:"quote_form",name:"Quote Form",icon:"table",js:"https://gudhub.com/modules/countertop-quote-form/dist/main.js",css:"https://gudhub.com/modules/countertop-quote-form/dist/style.css",type:"gh_element",technology:"class"},{data_type:"static_nested_list",name:"Nested Filter",icon:"scheduling",js:"https://gudhub.com/modules/nested-filter/dist/main.js?t=1",css:"https://gudhub.com/modules/nested-filter/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"conversations",name:"Conversations",icon:"timeline",js:"https://gudhub.com/modules/conversation/dist/main.js?t=1",css:"https://gudhub.com/modules/conversation/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"study_journal",name:"Study Journal",icon:"timeline",js:"https://gudhub.com/modules/Study-Journal/dist/main.js?t=1",css:"https://gudhub.com/modules/Study-Journal/dist/style.css",type:"gh_element",technology:"class"},{data_type:"study_schedule",name:"Study Schedule",icon:"timeline",js:"https://gudhub.com/modules/Study-Schedule/dist/main.js?t=1",css:"https://gudhub.com/modules/Study-Schedule/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"avatar",name:"Avatar",icon:"user",js:"https://gudhub.com/modules/Gh-Avatar/dist/main.js?t=1",css:"https://gudhub.com/modules/Gh-Avatar/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"text_area",name:"Text Area",icon:"text_icon",js:"https://gudhub.com/modules/text-area-ghe/dist/main.js?t=3",css:"https://gudhub.com/modules/text-area-ghe/dist/style.css",type:"gh_element",technology:"class"},{data_type:"resource_calendar",name:"Resource Сalendar",icon:"calendar",url:e+"/"+n+"resource_calendar_data.js",type:"gh_element",technology:"angular"},{data_type:"visualizer_with_control_panel",name:"Visualizer With Control Panel",icon:"visualizer",url:e+"/"+n+"visualizer_with_control_panel_data.js",type:"gh_element",technology:"angular"},{data_type:"API",name:"API",url:e+"/"+t+"api_node.js",type:"automation",icon:"automation_api",private:!0},{data_type:"Calculator",name:"Calculator",url:e+"/"+t+"calculator.js",type:"automation",icon:"automation_calculator"},{data_type:"CompareItems",name:"Compare Items",url:e+"/"+t+"compare_items.js",type:"automation",icon:"automation_compare_items"},{data_type:"Constants",name:"Constants",url:e+"/"+t+"constants.js",type:"automation",icon:"automation_constants"},{data_type:"CreateFiles",name:"Create Files",url:e+"/"+t+"create_files.js",type:"automation",icon:"automation_create_files"},{data_type:"CreateItemsApi",name:"Create Items Api",url:e+"/"+t+"create_item_api.js",type:"automation",icon:"automation_create_items_api"},{data_type:"FileDuplicate",name:"File Duplicate",url:e+"/"+t+"file_duplicate.js",type:"automation",icon:"automation_file_duplicate"},{data_type:"Filter",name:"Filter",url:e+"/"+t+"filter_node.js",type:"automation",icon:"filter"},{data_type:"GetItemByItemRef",name:"Get Item By Item Ref",url:e+"/"+t+"get_item_by_item_ref.js",type:"automation",icon:"automation_get_item_by_item_ref"},{data_type:"GetItems",name:"Get Items",url:e+"/"+t+"get_items.js",type:"automation",icon:"automation_get_items"},{data_type:"GhElementNode",name:"Gh Element Node",url:e+"/"+t+"gh_element_node.js",type:"automation",icon:"automation_gh_element_node",private:!0,created_for:["GhElement"]},{data_type:"IfCondition",name:"If Condition",url:e+"/"+t+"if_condition.js",type:"automation",icon:"automation_if_condition"},{data_type:"ItemConstructor",name:"Item Constructor",url:e+"/"+t+"item_constructor.js",type:"automation",icon:"automation_item_constructor"},{data_type:"ItemDestructor",name:"Item Destructor",url:e+"/"+t+"item_destructor.js",type:"automation",icon:"automation_item_destructor"},{data_type:"JSONScheme",name:"JSON Scheme",url:e+"/"+t+"json_scheme.js",type:"automation",icon:"automation_json_scheme"},{data_type:"MergeItems",name:"Merge Items",url:e+"/"+t+"merge_items.js",type:"automation",icon:"automation_merge_items"},{data_type:"MessageConstructor",name:"Message Constructor",url:e+"/"+t+"message_constructor.js",type:"automation",icon:"automation_message_constructor"},{data_type:"ObjectToItem",name:"Object To Item",url:e+"/"+t+"obj_to_item.js",type:"automation",icon:"automation_object_to_item"},{data_type:"ObjectConstructor",name:"Object Constructor",url:e+"/"+t+"object_constructor.js",type:"automation",icon:"automation_object_constructor"},{data_type:"ObjectDestructor",name:"Object Destructor",url:e+"/"+t+"object_destructor.js",type:"automation",icon:"automation_object_destructor"},{data_type:"PopulateElement",name:"Populate Element",url:e+"/"+t+"populate_element.js",type:"automation",icon:"automation_populate_element",private:!0,created_for:["GhElement"]},{data_type:"PopulateItems",name:"Populate Items",url:e+"/"+t+"populate_items.js",type:"automation",icon:"automation_populate_items"},{data_type:"PopulateWithDate",name:"Populate With Date",url:e+"/"+t+"populate_with_date.js",type:"automation",icon:"automation_populate_with_date"},{data_type:"PopulateWithItemRef",name:"Populate with Item Ref",url:e+"/"+t+"populate_with_item_ref.js",type:"automation",icon:"automation_populate_with_item_ref"},{data_type:"PopUpForm",name:"Pop Up Form",url:e+"/"+t+"popup_form.js",type:"automation",icon:"automation_pop_up_form",private:!0,created_for:["Quiz","GhElement","SmartInput","Iterator"]},{data_type:"QuizForm",name:"Quiz Form",url:e+"/"+t+"quiz_form.js",type:"automation",icon:"automation_quiz_form",private:!0,created_for:["Quiz"]},{data_type:"QuizNode",name:"Quiz Node",url:e+"/"+t+"quiz_node.js",type:"automation",icon:"automation_quiz_node",private:!0},{data_type:"Request",name:"Request",url:e+"/"+t+"request_node.js",type:"automation",icon:"automation_request"},{data_type:"Response",name:"Response",url:e+"/"+t+"response_node.js",type:"automation",icon:"automation_response",private:!0,created_for:["API"]},{data_type:"SmartInput",name:"Smart Input",url:e+"/"+t+"smart_input.js",type:"automation",icon:"automation_smart_input",private:!0},{data_type:"Trigger",name:"Trigger",url:e+"/"+t+"trigger_node.js",type:"automation",icon:"automation_trigger",private:!0},{data_type:"TwilioSMS",name:"Twilio SMS",url:e+"/"+t+"twilio_sms.js",type:"automation",icon:"automation_twilio"},{data_type:"TwilioAuth",name:"Twilio Auth",url:e+"/"+t+"twilio_auth.js",type:"automation",icon:"table"},{data_type:"TwilioDevice",name:"Twilio Device",url:e+"/"+t+"twilio_device.js",type:"automation",icon:"table"},{data_type:"UpdateItemsApi",name:"Update Items Api",url:e+"/"+t+"update_items_api.js",type:"automation",icon:"automation_update_items_api"},{data_type:"GoogleCalendar",name:"Google Calendar",url:e+"/"+t+"google_calendar.js",type:"automation",icon:"calendar"},{data_type:"VerifyEmail",name:"Verify email",url:e+"/"+t+"verify_email.js",type:"automation",icon:"check_in_circle"},{data_type:"Iterator",name:"Iterator",url:e+"/"+t+"iterator.js",type:"automation",icon:"update"},{data_type:"IteratorInput",name:"Iterator Input",url:e+"/"+t+"iterator_input.js",type:"automation",icon:"arrow_right",private:!0},{data_type:"IteratorOutput",name:"Iterator Output",url:e+"/"+t+"iterator_output.js",type:"automation",icon:"arrow_right",private:!0},{data_type:"SendEmail",name:"Send email",url:e+"/"+t+"send_email.js",type:"automation",icon:"email"},{data_type:"FileReader",name:"File Reader",url:e+"/"+t+"file_reader.js",type:"automation",icon:"file"},{data_type:"WebsitesChecker",name:"Websites Checker",url:e+"/"+t+"websites_checker.js",type:"automation",icon:"world"},{data_type:"VoiceMachineDetection",name:"Voice Machine Detection",url:e+"/"+t+"voice_machine_detection.js",type:"automation",icon:"automation_calculator"},{data_type:"Task",name:"Task",url:e+"/"+t+"task.js",type:"automation",icon:"automation_calculator",private:!0},{data_type:"DeleteItems",name:"Delete Items",url:e+"/"+t+"delete_items.js",type:"automation",icon:"rubbish"},{data_type:"GoToItem",name:"Go To Item",url:e+"/"+t+"go_to_item.js",type:"automation",icon:"cursor_point"},{data_type:"FireWorks",name:"Fire Works",url:e+"/"+t+"fireworks_node.js",type:"automation",icon:"weeding_party"},{data_type:"SendMessage",name:"Send Message",url:e+"/"+t+"send_message.js",type:"automation",icon:"speech_bubble"},{data_type:"TurboSMS",name:"Turbo SMS",url:e+"/"+t+"turbo_sms.js",type:"automation",icon:"email"}]}class Storage{constructor(e,t,r){this.apps_list=[],this.users_list=[],this.user={},this.modulesList=generateModulesList(e,t,r),this.ghComponentsPromises=[]}getMainStorage(){return this}getAppsList(){return this.apps_list}getUser(){return this.user}getUsersList(){return this.users_list}getModulesList(e,t,r){return typeof e>"u"?this.modulesList:t==!1?this.modulesList.filter(i=>i.created_for?i.type===e&&i.private&&i.created_for.includes(r):i.type===e&&!i.private):this.modulesList.filter(i=>i.type===e)}getModuleUrl(e){return this.modulesList.find(t=>t.data_type==e)}setUser(e){this.user=e,this.users_list.push(e)}updateUser(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.avatar_128&&(e.avatar_128=e.avatar_128+"?"+new Date().getTime()),e.avatar_512&&(e.avatar_512=e.avatar_512+"?"+new Date().getTime()),this.user=_objectSpread2(_objectSpread2({},this.user),e),this.users_list=this.users_list.filter(t=>t.user_id!=e.user_id),this.users_list.push(this.user)}unsetUser(){this.user={}}getApp(e){for(let t=0;t<this.apps_list.length;t++)if(this.apps_list[t].app_id==e)return this.apps_list[t]}unsetApps(){this.apps_list=[]}updateApp(e){return this.apps_list=this.apps_list.map(t=>t.app_id==e.app_id?e:t),this.apps_list}deleteApp(e){return this.apps_list=this.apps_list.filter(t=>t.app_id!=e),this.apps_list}async updateItemsInApp(e,t){const r=await this.getApp(t);return r&&(r.items_list=updateItems(e,r.items_list,this.pipeService.emit.bind(this.pipeService),t),this.updateApp(r)),r}async addItemsToApp(e,t){const r=await this.getApp(t);return r&&(r.items_list.push(...e),this.updateApp(r),this.pipeService.emit("gh_items_update",{app_id:t},e)),r}async deleteItemsInApp(e,t){const r=await this.getApp(t);return r&&(r.items_list=r.items_list.filter(i=>!e.find(a=>a.item_id==i.item_id)),this.updateApp(r)),r}}var browser,hasRequiredBrowser;function requireBrowser(){return hasRequiredBrowser||(hasRequiredBrowser=1,browser=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}),browser}var browserExports=requireBrowser();const Websocket=getDefaultExportFromCjs(browserExports),IS_BROWSER_MAIN_THREAD=typeof window<"u"&&typeof document<"u",IS_BROWSER_WORKER_THREAD=typeof self=="object"&&typeof WorkerGlobalScope<"u",IS_BROWSER=IS_BROWSER_MAIN_THREAD||IS_BROWSER_WORKER_THREAD;typeof process<"u"&&process.versions!=null&&process.versions.node!=null;class WebSocketApi{constructor(e,t){this.websocket=null,this.connected=!1,this.queue=[],this.url=e,this.auth=t,this.heartBeatTimeStemp=1e13,this.ALLOWED_HEART_BEAT_DELEY=12e3,this.firstHeartBeat=!0,this.reload=!0,this.isBrowser=IS_BROWSER_MAIN_THREAD}async addSubscription(e){const t=await this.auth.getToken(),r="token=".concat(t,"/~/app_id=").concat(e);this.connected&&this.websocket.send(r),this.queue.push(e)}async onOpen(){this.reload=!0,console.log("websocket opened"),this.connected=!0;const e=await this.auth.getToken();this.queue.forEach(t=>{const r="token=".concat(e,"/~/app_id=").concat(t);this.websocket.send(r)})}onError(e){console.log("websocket error: ",e),this.websocket.close()}onClose(){console.log("websocket close"),this.connected=!1;try{this.initWebSocket(this.onMassageHandler,this.refreshAppsHandler)}catch(e){console.log(e)}}async onMessage(e){const t=this.isBrowser?e.data:e;if(t.match(/HeartBeat/)){const r=new Date().getTime()-this.heartBeatTimeStemp;this.ALLOWED_HEART_BEAT_DELEY<r?await this.onConnectionLost():(this.websocket.send("HeartBeat"),this.heartBeatTimeStemp=new Date().getTime())}if(this.firstHeartBeat&&(this.connectionChecker(),this.firstHeartBeat=!1),t.match(/[{}]/)){let r=JSON.parse(t);const i=await this.auth.getToken();r.token!=i&&this.onMassageHandler(r)}}initWebSocket(e,t){this.onMassageHandler=e,this.refreshAppsHandler=t,this.isBrowser?(this.websocket=new WebSocket(this.url),this.websocket.onopen=this.onOpen.bind(this),this.websocket.onerror=this.onError.bind(this),this.websocket.onclose=this.onClose.bind(this),this.websocket.onmessage=this.onMessage.bind(this)):(this.websocket=new Websocket(this.url),this.websocket.on("open",this.onOpen),this.websocket.on("error",this.onError),this.websocket.on("close",this.onClose),this.websocket.on("message",this.onMessage)),console.log("websocket initialized")}connectionChecker(){setInterval(async()=>{let e=new Date().getTime()-this.heartBeatTimeStemp;this.ALLOWED_HEART_BEAT_DELEY<e&&await this.onConnectionLost()},1e3)}async onConnectionLost(){try{await this.auth.getVersion(),this.reload&&(this.reload=!1,console.log("Connected"),this.heartBeatTimeStemp=1e13,this.websocket.close())}catch(e){console.log(e)}}}const server_url="https://gudhub.com/GudHub_Test",wss_url="wss://gudhub.com/GudHub/ws/app/",node_server_url="https://gudhub.com/api/services/prod",async_modules_path="build/latest/async_modules_node/",automation_modules_path="build/latest/automation_modules/",file_server_url="https://gudhub.com",cache_chunk_requests=!0;let useWorkerToProcessRequestsData=!0;IS_BROWSER||(useWorkerToProcessRequestsData=!1);async function filterPreparation(n,e,t){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=[],a={variableMethodcurrent_app(){return[r.current_app_id||r.app_id]},variableMethodelement_app(){return[r.element_app_id]},variableMethodcurrent_item(){return["".concat(r.current_app_id||r.app_id,".").concat(r.item_id)]},variableMethoduser_id(){return[e.getUser().user_id]},variableMethoduser_email(l){return[e.getUser().username]},variableMethodtoday(l){const u=new Date,o=new Date(u.getFullYear(),u.getMonth(),u.getDate()),f=new Date(u.getFullYear(),u.getMonth(),u.getDate()+1);return[o.valueOf().toString()+":"+f.valueOf().toString()]},variableMethodvariable(l){return[r[l]]}};if(n)for(const l of n)if(l)switch(l.input_type){case"variable":l.valuesArray=[];for(const o of l==null?void 0:l.input_value.split(",")){const f=l.input_type+"Method"+o,d=a[f];typeof d=="function"?l.valuesArray?l.valuesArray.push(...d()):l.valuesArray=d():l.valuesArray?l.valuesArray.push(...a.variableMethodvariable(o)):l.valuesArray=a.variableMethodvariable(o)}i.push(l);break;case"field":const u=await s({app_id:r.current_app_id||r.app_id,item_id:r.item_id,field_id:l.input_value});u!=null&&l.valuesArray.push(u),i.push(l);break;default:i.push(l);break}else i.push(l);function s(l){return new Promise(u=>{t.on("gh_value_get",l,function o(f,d){t.destroy("gh_value_get",l,o),u(d)}).emit("gh_value_get",{},l)})}return i}function isArray(n){return Array.isArray?Array.isArray(n):getTag(n)==="[object Array]"}function baseToString(n){if(typeof n=="string")return n;let e=n+"";return e=="0"&&1/n==-1/0?"-0":e}function toString(n){return n==null?"":baseToString(n)}function isString(n){return typeof n=="string"}function isNumber(n){return typeof n=="number"}function isBoolean(n){return n===!0||n===!1||isObjectLike(n)&&getTag(n)=="[object Boolean]"}function isObject(n){return typeof n=="object"}function isObjectLike(n){return isObject(n)&&n!==null}function isDefined(n){return n!=null}function isBlank(n){return!n.trim().length}function getTag(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}const INCORRECT_INDEX_TYPE="Incorrect 'index' type",LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY=n=>"Invalid value for key ".concat(n),PATTERN_LENGTH_TOO_LARGE=n=>"Pattern length exceeds max of ".concat(n,"."),MISSING_KEY_PROPERTY=n=>"Missing ".concat(n," property in key"),INVALID_KEY_WEIGHT_VALUE=n=>"Property 'weight' in key '".concat(n,"' must be a positive integer"),hasOwn=Object.prototype.hasOwnProperty;class KeyStore{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(r=>{let i=createKey(r);t+=i.weight,this._keys.push(i),this._keyMap[i.id]=i,t+=i.weight}),this._keys.forEach(r=>{r.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function createKey(n){let e=null,t=null,r=null,i=1,a=null;if(isString(n)||isArray(n))r=n,e=createKeyPath(n),t=createKeyId(n);else{if(!hasOwn.call(n,"name"))throw new Error(MISSING_KEY_PROPERTY("name"));const s=n.name;if(r=s,hasOwn.call(n,"weight")&&(i=n.weight,i<=0))throw new Error(INVALID_KEY_WEIGHT_VALUE(s));e=createKeyPath(s),t=createKeyId(s),a=n.getFn}return{path:e,id:t,weight:i,src:r,getFn:a}}function createKeyPath(n){return isArray(n)?n:n.split(".")}function createKeyId(n){return isArray(n)?n.join("."):n}function get(n,e){let t=[],r=!1;const i=(a,s,l)=>{if(isDefined(a))if(!s[l])t.push(a);else{let u=s[l];const o=a[u];if(!isDefined(o))return;if(l===s.length-1&&(isString(o)||isNumber(o)||isBoolean(o)))t.push(toString(o));else if(isArray(o)){r=!0;for(let f=0,d=o.length;f<d;f+=1)i(o[f],s,l+1)}else s.length&&i(o,s,l+1)}};return i(n,isString(e)?e.split("."):e,0),r?t:t[0]}const MatchOptions={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},BasicOptions={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(n,e)=>n.score===e.score?n.idx<e.idx?-1:1:n.score<e.score?-1:1},FuzzyOptions={location:0,threshold:.6,distance:100},AdvancedOptions={useExtendedSearch:!1,getFn:get,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var Config=_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({},BasicOptions),MatchOptions),FuzzyOptions),AdvancedOptions);const SPACE=/[^ ]+/g;function norm(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3;const t=new Map,r=Math.pow(10,e);return{get(i){const a=i.match(SPACE).length;if(t.has(a))return t.get(a);const s=1/Math.pow(a,.5*n),l=parseFloat(Math.round(s*r)/r);return t.set(a,l),l},clear(){t.clear()}}}class FuseIndex{constructor(){let{getFn:e=Config.getFn,fieldNormWeight:t=Config.fieldNormWeight}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.norm=norm(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.docs=e}setIndexRecords(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.records=e}setKeys(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.keys=e,this._keysMap={},e.forEach((t,r)=>{this._keysMap[t.id]=r})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,isString(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){const t=this.size();isString(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,r=this.size();t<r;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!isDefined(e)||isBlank(e))return;let r={v:e,i:t,n:this.norm.get(e)};this.records.push(r)}_addObject(e,t){let r={i:t,$:{}};this.keys.forEach((i,a)=>{let s=i.getFn?i.getFn(e):this.getFn(e,i.path);if(isDefined(s)){if(isArray(s)){let l=[];const u=[{nestedArrIndex:-1,value:s}];for(;u.length;){const{nestedArrIndex:o,value:f}=u.pop();if(isDefined(f))if(isString(f)&&!isBlank(f)){let d={v:f,i:o,n:this.norm.get(f)};l.push(d)}else isArray(f)&&f.forEach((d,h)=>{u.push({nestedArrIndex:h,value:d})})}r.$[a]=l}else if(isString(s)&&!isBlank(s)){let l={v:s,n:this.norm.get(s)};r.$[a]=l}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function createIndex(n,e){let{getFn:t=Config.getFn,fieldNormWeight:r=Config.fieldNormWeight}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=new FuseIndex({getFn:t,fieldNormWeight:r});return i.setKeys(n.map(createKey)),i.setSources(e),i.create(),i}function parseIndex(n){let{getFn:e=Config.getFn,fieldNormWeight:t=Config.fieldNormWeight}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{keys:r,records:i}=n,a=new FuseIndex({getFn:e,fieldNormWeight:t});return a.setKeys(r),a.setIndexRecords(i),a}function computeScore$1(n){let{errors:e=0,currentLocation:t=0,expectedLocation:r=0,distance:i=Config.distance,ignoreLocation:a=Config.ignoreLocation}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const s=e/n.length;if(a)return s;const l=Math.abs(r-t);return i?s+l/i:l?1:s}function convertMaskToIndices(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Config.minMatchCharLength,t=[],r=-1,i=-1,a=0;for(let s=n.length;a<s;a+=1){let l=n[a];l&&r===-1?r=a:!l&&r!==-1&&(i=a-1,i-r+1>=e&&t.push([r,i]),r=-1)}return n[a-1]&&a-r>=e&&t.push([r,a-1]),t}const MAX_BITS=32;function search(n,e,t){let{location:r=Config.location,distance:i=Config.distance,threshold:a=Config.threshold,findAllMatches:s=Config.findAllMatches,minMatchCharLength:l=Config.minMatchCharLength,includeMatches:u=Config.includeMatches,ignoreLocation:o=Config.ignoreLocation}=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(e.length>MAX_BITS)throw new Error(PATTERN_LENGTH_TOO_LARGE(MAX_BITS));const f=e.length,d=n.length,h=Math.max(0,Math.min(r,d));let y=a,m=h;const v=l>1||u,p=v?Array(d):[];let E;for(;(E=n.indexOf(e,m))>-1;){let q=computeScore$1(e,{currentLocation:E,expectedLocation:h,distance:i,ignoreLocation:o});if(y=Math.min(q,y),m=E+f,v){let x=0;for(;x<f;)p[E+x]=1,x+=1}}m=-1;let S=[],w=1,g=f+d;const b=1<<f-1;for(let q=0;q<f;q+=1){let x=0,D=g;for(;x<D;)computeScore$1(e,{errors:q,currentLocation:h+D,expectedLocation:h,distance:i,ignoreLocation:o})<=y?x=D:g=D,D=Math.floor((g-x)/2+x);g=D;let j=Math.max(1,h-D+1),F=s?d:Math.min(h+D,d)+f,M=Array(F+2);M[F+1]=(1<<q)-1;for(let U=F;U>=j;U-=1){let H=U-1,z=t[n.charAt(H)];if(v&&(p[H]=+!!z),M[U]=(M[U+1]<<1|1)&z,q&&(M[U]|=(S[U+1]|S[U])<<1|1|S[U+1]),M[U]&b&&(w=computeScore$1(e,{errors:q,currentLocation:H,expectedLocation:h,distance:i,ignoreLocation:o}),w<=y)){if(y=w,m=H,m<=h)break;j=Math.max(1,2*h-m)}}if(computeScore$1(e,{errors:q+1,currentLocation:h,expectedLocation:h,distance:i,ignoreLocation:o})>y)break;S=M}const A={isMatch:m>=0,score:Math.max(.001,w)};if(v){const q=convertMaskToIndices(p,l);q.length?u&&(A.indices=q):A.isMatch=!1}return A}function createPatternAlphabet(n){let e={};for(let t=0,r=n.length;t<r;t+=1){const i=n.charAt(t);e[i]=(e[i]||0)|1<<r-t-1}return e}class BitapSearch{constructor(e){let{location:t=Config.location,threshold:r=Config.threshold,distance:i=Config.distance,includeMatches:a=Config.includeMatches,findAllMatches:s=Config.findAllMatches,minMatchCharLength:l=Config.minMatchCharLength,isCaseSensitive:u=Config.isCaseSensitive,ignoreLocation:o=Config.ignoreLocation}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.options={location:t,threshold:r,distance:i,includeMatches:a,findAllMatches:s,minMatchCharLength:l,isCaseSensitive:u,ignoreLocation:o},this.pattern=u?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const f=(h,y)=>{this.chunks.push({pattern:h,alphabet:createPatternAlphabet(h),startIndex:y})},d=this.pattern.length;if(d>MAX_BITS){let h=0;const y=d%MAX_BITS,m=d-y;for(;h<m;)f(this.pattern.substr(h,MAX_BITS),h),h+=MAX_BITS;if(y){const v=d-MAX_BITS;f(this.pattern.substr(v),v)}}else f(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,includeMatches:r}=this.options;if(t||(e=e.toLowerCase()),this.pattern===e){let m={isMatch:!0,score:0};return r&&(m.indices=[[0,e.length-1]]),m}const{location:i,distance:a,threshold:s,findAllMatches:l,minMatchCharLength:u,ignoreLocation:o}=this.options;let f=[],d=0,h=!1;this.chunks.forEach(m=>{let{pattern:v,alphabet:p,startIndex:E}=m;const{isMatch:S,score:w,indices:g}=search(e,v,p,{location:i+E,distance:a,threshold:s,findAllMatches:l,minMatchCharLength:u,includeMatches:r,ignoreLocation:o});S&&(h=!0),d+=w,S&&g&&(f=[...f,...g])});let y={isMatch:h,score:h?d/this.chunks.length:1};return h&&r&&(y.indices=f),y}}class BaseMatch{constructor(e){this.pattern=e}static isMultiMatch(e){return getMatch(e,this.multiRegex)}static isSingleMatch(e){return getMatch(e,this.singleRegex)}search(){}}function getMatch(n,e){const t=n.match(e);return t?t[1]:null}class ExactMatch extends BaseMatch{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class InverseExactMatch extends BaseMatch{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const r=e.indexOf(this.pattern)===-1;return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class PrefixExactMatch extends BaseMatch{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class InversePrefixExactMatch extends BaseMatch{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class SuffixExactMatch extends BaseMatch{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class InverseSuffixExactMatch extends BaseMatch{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class FuzzyMatch extends BaseMatch{constructor(e){let{location:t=Config.location,threshold:r=Config.threshold,distance:i=Config.distance,includeMatches:a=Config.includeMatches,findAllMatches:s=Config.findAllMatches,minMatchCharLength:l=Config.minMatchCharLength,isCaseSensitive:u=Config.isCaseSensitive,ignoreLocation:o=Config.ignoreLocation}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(e),this._bitapSearch=new BitapSearch(e,{location:t,threshold:r,distance:i,includeMatches:a,findAllMatches:s,minMatchCharLength:l,isCaseSensitive:u,ignoreLocation:o})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class IncludeMatch extends BaseMatch{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,r;const i=[],a=this.pattern.length;for(;(r=e.indexOf(this.pattern,t))>-1;)t=r+a,i.push([r,t-1]);const s=!!i.length;return{isMatch:s,score:s?0:1,indices:i}}}const searchers=[ExactMatch,IncludeMatch,PrefixExactMatch,InversePrefixExactMatch,InverseSuffixExactMatch,SuffixExactMatch,InverseExactMatch,FuzzyMatch],searchersLen=searchers.length,SPACE_RE=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,OR_TOKEN="|";function parseQuery(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return n.split(OR_TOKEN).map(t=>{let r=t.trim().split(SPACE_RE).filter(a=>a&&!!a.trim()),i=[];for(let a=0,s=r.length;a<s;a+=1){const l=r[a];let u=!1,o=-1;for(;!u&&++o<searchersLen;){const f=searchers[o];let d=f.isMultiMatch(l);d&&(i.push(new f(d,e)),u=!0)}if(!u)for(o=-1;++o<searchersLen;){const f=searchers[o];let d=f.isSingleMatch(l);if(d){i.push(new f(d,e));break}}}return i})}const MultiMatchSet=new Set([FuzzyMatch.type,IncludeMatch.type]);class ExtendedSearch{constructor(e){let{isCaseSensitive:t=Config.isCaseSensitive,includeMatches:r=Config.includeMatches,minMatchCharLength:i=Config.minMatchCharLength,ignoreLocation:a=Config.ignoreLocation,findAllMatches:s=Config.findAllMatches,location:l=Config.location,threshold:u=Config.threshold,distance:o=Config.distance}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.query=null,this.options={isCaseSensitive:t,includeMatches:r,minMatchCharLength:i,findAllMatches:s,ignoreLocation:a,location:l,threshold:u,distance:o},this.pattern=t?e:e.toLowerCase(),this.query=parseQuery(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:r,isCaseSensitive:i}=this.options;e=i?e:e.toLowerCase();let a=0,s=[],l=0;for(let u=0,o=t.length;u<o;u+=1){const f=t[u];s.length=0,a=0;for(let d=0,h=f.length;d<h;d+=1){const y=f[d],{isMatch:m,indices:v,score:p}=y.search(e);if(m){if(a+=1,l+=p,r){const E=y.constructor.type;MultiMatchSet.has(E)?s=[...s,...v]:s.push(v)}}else{l=0,a=0,s.length=0;break}}if(a){let d={isMatch:!0,score:l/a};return r&&(d.indices=s),d}}return{isMatch:!1,score:1}}}const registeredSearchers=[];function register(){registeredSearchers.push(...arguments)}function createSearcher(n,e){for(let t=0,r=registeredSearchers.length;t<r;t+=1){let i=registeredSearchers[t];if(i.condition(n,e))return new i(n,e)}return new BitapSearch(n,e)}const LogicalOperator={AND:"$and",OR:"$or"},KeyType={PATH:"$path",PATTERN:"$val"},isExpression=n=>!!(n[LogicalOperator.AND]||n[LogicalOperator.OR]),isPath=n=>!!n[KeyType.PATH],isLeaf=n=>!isArray(n)&&isObject(n)&&!isExpression(n),convertToExplicit=n=>({[LogicalOperator.AND]:Object.keys(n).map(e=>({[e]:n[e]}))});function parse(n,e){let{auto:t=!0}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=i=>{let a=Object.keys(i);const s=isPath(i);if(!s&&a.length>1&&!isExpression(i))return r(convertToExplicit(i));if(isLeaf(i)){const u=s?i[KeyType.PATH]:a[0],o=s?i[KeyType.PATTERN]:i[u];if(!isString(o))throw new Error(LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(u));const f={keyId:createKeyId(u),pattern:o};return t&&(f.searcher=createSearcher(o,e)),f}let l={children:[],operator:a[0]};return a.forEach(u=>{const o=i[u];isArray(o)&&o.forEach(f=>{l.children.push(r(f))})}),l};return isExpression(n)||(n=convertToExplicit(n)),r(n)}function computeScore(n,e){let{ignoreFieldNorm:t=Config.ignoreFieldNorm}=e;n.forEach(r=>{let i=1;r.matches.forEach(a=>{let{key:s,norm:l,score:u}=a;const o=s?s.weight:null;i*=Math.pow(u===0&&o?Number.EPSILON:u,(o||1)*(t?1:l))}),r.score=i})}function transformMatches(n,e){const t=n.matches;e.matches=[],isDefined(t)&&t.forEach(r=>{if(!isDefined(r.indices)||!r.indices.length)return;const{indices:i,value:a}=r;let s={indices:i,value:a};r.key&&(s.key=r.key.src),r.idx>-1&&(s.refIndex=r.idx),e.matches.push(s)})}function transformScore(n,e){e.score=n.score}function format(n,e){let{includeMatches:t=Config.includeMatches,includeScore:r=Config.includeScore}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=[];return t&&i.push(transformMatches),r&&i.push(transformScore),n.map(a=>{const{idx:s}=a,l={item:e[s],refIndex:s};return i.length&&i.forEach(u=>{u(a,l)}),l})}class Fuse{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;this.options=_objectSpread2(_objectSpread2({},Config),t),this.options.useExtendedSearch,this._keyStore=new KeyStore(this.options.keys),this.setCollection(e,r)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof FuseIndex))throw new Error(INCORRECT_INDEX_TYPE);this._myIndex=t||createIndex(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){isDefined(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:()=>!1;const t=[];for(let r=0,i=this._docs.length;r<i;r+=1){const a=this._docs[r];e(a,r)&&(this.removeAt(r),r-=1,i-=1,t.push(a))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e){let{limit:t=-1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{includeMatches:r,includeScore:i,shouldSort:a,sortFn:s,ignoreFieldNorm:l}=this.options;let u=isString(e)?isString(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return computeScore(u,{ignoreFieldNorm:l}),a&&u.sort(s),isNumber(t)&&t>-1&&(u=u.slice(0,t)),format(u,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e){const t=createSearcher(e,this.options),{records:r}=this._myIndex,i=[];return r.forEach(a=>{let{v:s,i:l,n:u}=a;if(!isDefined(s))return;const{isMatch:o,score:f,indices:d}=t.searchIn(s);o&&i.push({item:s,idx:l,matches:[{score:f,value:s,norm:u,indices:d}]})}),i}_searchLogical(e){const t=parse(e,this.options),r=(l,u,o)=>{if(!l.children){const{keyId:d,searcher:h}=l,y=this._findMatches({key:this._keyStore.get(d),value:this._myIndex.getValueForItemAtKeyId(u,d),searcher:h});return y&&y.length?[{idx:o,item:u,matches:y}]:[]}const f=[];for(let d=0,h=l.children.length;d<h;d+=1){const y=l.children[d],m=r(y,u,o);if(m.length)f.push(...m);else if(l.operator===LogicalOperator.AND)return[]}return f},i=this._myIndex.records,a={},s=[];return i.forEach(l=>{let{$:u,i:o}=l;if(isDefined(u)){let f=r(t,u,o);f.length&&(a[o]||(a[o]={idx:o,item:u,matches:[]},s.push(a[o])),f.forEach(d=>{let{matches:h}=d;a[o].matches.push(...h)}))}}),s}_searchObjectList(e){const t=createSearcher(e,this.options),{keys:r,records:i}=this._myIndex,a=[];return i.forEach(s=>{let{$:l,i:u}=s;if(!isDefined(l))return;let o=[];r.forEach((f,d)=>{o.push(...this._findMatches({key:f,value:l[d],searcher:t}))}),o.length&&a.push({idx:u,item:l,matches:o})}),a}_findMatches(e){let{key:t,value:r,searcher:i}=e;if(!isDefined(r))return[];let a=[];if(isArray(r))r.forEach(s=>{let{v:l,i:u,n:o}=s;if(!isDefined(l))return;const{isMatch:f,score:d,indices:h}=i.searchIn(l);f&&a.push({score:d,key:t,value:l,idx:u,norm:o,indices:h})});else{const{v:s,n:l}=r,{isMatch:u,score:o,indices:f}=i.searchIn(s);u&&a.push({score:o,key:t,value:s,norm:l,indices:f})}return a}}Fuse.version="6.6.2",Fuse.createIndex=createIndex,Fuse.parseIndex=parseIndex,Fuse.config=Config,Fuse.parseQuery=parse,register(ExtendedSearch);function getDistanceFromLatLonInKm(n,e){const[t,r,i]=n.split(":"),[a,s]=e.split(":"),l=6371,u=deg2rad(a-t),o=deg2rad(s-r),f=Math.sin(u/2)*Math.sin(u/2)+Math.cos(deg2rad(t))*Math.cos(deg2rad(a))*Math.sin(o/2)*Math.sin(o/2),d=2*Math.atan2(Math.sqrt(f),Math.sqrt(1-f)),h=l*d;return Number(i)>=h}function deg2rad(n){return n*(Math.PI/180)}function getDate$1(){let{type:n,date:e=0,match:t=!0}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(!r&&n)return!1;const i=new Date;let a=!0;switch(n){case"day":const s=getDateInMs(e),l=getDateInMs(e+1);a=s<=r&&r<l;break;case"days":if(e<0){const S=getDateInMs(1);a=getDateInMs(-6)<=r&&r<S}else{const S=getDateInMs(),w=getDateInMs(7);a=S<=r&&r<w}break;case"day_week":a=e===new Date(r).getDay();break;case"week":const u=i.getDate()-i.getDay(),o=e==-2?13:6,f=u+o,d=i.setDate(u+e*7),y=new Date().setDate(f+e*7),[m,v]=getWeek(d,y);a=m<=r&&r<=v;break;case"month":if(i.getFullYear()!==new Date(r).getFullYear())return!1;a=i.getMonth()+e===new Date(r).getMonth();break;case"year":a=i.getFullYear()+e===new Date(r).getFullYear();break;default:return!0}return t?a:!a}function getWeek(n,e){return[new Date(n),new Date(e)]}function getDateInMs(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;const e=new Date;return new Date(e.getFullYear(),e.getMonth(),e.getDate()+n).valueOf()}function searchValue(n,e){if(!(!n||!n.length))return e?n.filter(t=>t.fields.find(r=>r.index_value&&r.index_value.toLowerCase().indexOf(e.toLowerCase())!==-1)):n}const fuse=new Fuse([]);function isSimilarStrings(n,e){return fuse.setCollection(e),!!fuse.search(n).length}function filter(n,e){const t=new ItemsFilter;return!n||!n.length?[]:t.filter(e,n)}class Checker{changeBehavior(e){switch(e){case"contain_or":this._checkFn=function(t,r){return r.some(i=>t.some(a=>a.indexOf(i)!==-1))};break;case"contain_and":this._checkFn=function(t,r){return r.every(i=>t.some(a=>a.indexOf(i)!==-1))};break;case"not_contain_or":this._checkFn=function(t,r){return r.some(i=>t.every(a=>a.indexOf(i)===-1))};break;case"not_contain_and":this._checkFn=function(t,r){return r.every(i=>t.every(a=>a.indexOf(i)===-1))};break;case"equal_or":this._checkFn=function(t,r){return t.length?t.some(i=>r.some(a=>i==a)):!1};break;case"equal_and":this._checkFn=function(t,r){if(!t.length)return!1;let i=new Set(r);for(;t.length&&i.size;){let a=t.pop();i.has(a)&&i.delete(a)}return!i.size};break;case"not_equal_or":this._checkFn=function(t,r){if(!t.length)return!0;let i=new Set(r);for(;t.length&&i.size;){let a=t.pop();if(!i.has(a))return!0}return!1};break;case"not_equal_and":this._checkFn=function(t,r){let i=new Set(r);for(;t.length&&i.size;){let a=t.pop();if(i.has(a))return!1}return!0};break;case"bigger":this._checkFn=function(t,r){return r.some(i=>t.every(a=>a>i))};break;case"lower":this._checkFn=function(t,r){return r.some(i=>t.every(a=>a<i))};break;case"range":this._checkFn=function(t,r){return r.some(i=>t.every(a=>i.start<=a&&a<i.end))};break;case"value":this._checkFn=function(t,r){return r.some(i=>t.some(a=>a==i))};break;case"search":this._checkFn=function(t,r){return r.some(i=>isSimilarStrings(i,t))};break;case"phone_equal_or":this._checkFn=function(t,r){return t.length?r.some(i=>t.some(a=>a.replace(/[^0-9]/g,"").indexOf(i.replace(/[^0-9]/g,""))!==-1)):!1};break;case"distance":this._checkFn=function(t,r){return r.some(i=>t.some(a=>getDistanceFromLatLonInKm(i,a)))};break;case"date_in":case"date_out":this._checkFn=function(t,r){return r.some(i=>t.some(a=>getDate$1(i,a)))};break;case"recurring_date":this._checkFn=function(t,r){return r.some(i=>t.some(a=>gudhub.checkRecurringDate(a,i)))};break}return this}check(e){return this.changeBehavior(e.getCheckOption())._checkFn(e.getEntity(),e.getFilterValues())}}class NumberFetchStrategy{convert(e){return[Number(e)]}convertFilterValue(e){return Number(e)}}class RangeFetchStrategy extends NumberFetchStrategy{convertFilterValue(e){return{start:Number(e.split(":")[0]),end:Number(e.split(":")[1])}}}class StringFetchStrategy{convert(e){return String(e??"").toLowerCase().split(",")}convertFilterValue(e){return e===0?"0":String(e||"").toLowerCase()}}class dateFetchStrategy extends NumberFetchStrategy{convertFilterValue(e){const[t,r,i]=e.split(":");return{type:t,date:Number(r),match:!!Number(i)}}}class BooleanFetchStrategy{convert(e){return[String(!!e)]}convertFilterValue(e){return String(e)}}class RecurringDateStrategy{convert(e){return[Number(e)]}convertFilterValue(e){return String(e)}}class Aggregate{constructor(){this._strategies={stringStrategy:new StringFetchStrategy,numberStrategy:new NumberFetchStrategy,booleanStrategy:new BooleanFetchStrategy,rangeStrategy:new RangeFetchStrategy,dateStrategy:new dateFetchStrategy,recurringDateStrategy:new RecurringDateStrategy}}setStrategy(e){switch(this._checkOption=e,e){case"contain_or":case"contain_and":case"not_contain_or":case"not_contain_and":case"equal_or":case"equal_and":case"not_equal_or":case"not_equal_and":case"phone_equal_or":case"distance":case"search":this._currentStrategy=this._strategies.stringStrategy;break;case"bigger":case"lower":this._currentStrategy=this._strategies.numberStrategy;break;case"range":this._currentStrategy=this._strategies.rangeStrategy;break;case"date_in":case"date_out":this._currentStrategy=this._strategies.dateStrategy;break;case"value":this._currentStrategy=this._strategies.booleanStrategy;break;case"recurring_date":this._currentStrategy=this._strategies.recurringDateStrategy}return this}setEntity(e){return this._entity=this._currentStrategy.convert(e),this}getEntity(){return this._entity}setFilterValues(e){let t=Array.isArray(e)?e:[e];return this._filterValues=t.map(r=>this._currentStrategy.convertFilterValue(r)),this}getFilterValues(){return this._filterValues}getCheckOption(){return this._checkOption}}class ItemsFilter{constructor(){}filter(e,t){const r=this.checkIfAllFiltersHaveAndStrategy(e),i=[],a=e.filter(function(s){return s.valuesArray.length});for(let s of t){let l=!0;for(let u=0;u<a.length;u++){const o=a[u],f=s.fields.find(function(y){return o.field_id==y.field_id}),d=new Aggregate,h=new Checker;switch(d.setStrategy(o.search_type).setEntity(f&&f.field_value!=null?f.field_value:null).setFilterValues(o.valuesArray),o.boolean_strategy){case"and":l=l&&h.check(d);break;case"or":l=l||h.check(d);break;default:l=l&&h.check(d)}if(!l&&r)break}l&&i.push(s)}return i.length||e.length&&!i.length?i:t}checkIfAllFiltersHaveAndStrategy(e){return e.every(t=>!t.boolean_strategy||t.boolean_strategy=="and")}}function mergeFilters(n,e){const t=[];let r=[];if(n.length>0?n.forEach(i=>{r.push(i)}):r=e,r.length>0){r.forEach((i,a)=>{for(let s=0;s<e.length;s++)i.field_id==e[s].field_id&&(t.push(i.field_id),r[a]=gudhub.mergeObjects(e[s],i))});for(let i=0;i<e.length;i++)t.includes(e[i].field_id)||r.push(e[i])}return r}function commonjsRequire(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var jsonpath$1={exports:{}};/*! jsonpath 1.1.1 */var hasRequiredJsonpath;function requireJsonpath(){return hasRequiredJsonpath||(hasRequiredJsonpath=1,function(n,e){(function(t){n.exports=t()})(function(){return function t(r,i,a){function s(o,f){if(!i[o]){if(!r[o]){var d=typeof commonjsRequire=="function"&&commonjsRequire;if(!f&&d)return d(o,!0);if(l)return l(o,!0);var h=new Error("Cannot find module '"+o+"'");throw h.code="MODULE_NOT_FOUND",h}var y=i[o]={exports:{}};r[o][0].call(y.exports,function(m){var v=r[o][1][m];return s(v||m)},y,y.exports,t,r,i,a)}return i[o].exports}for(var l=typeof commonjsRequire=="function"&&commonjsRequire,u=0;u<a.length;u++)s(a[u]);return s}({"./aesprim":[function(t,r,i){(function(a,s){s(typeof i<"u"?i:a.esprima={})})(this,function(a){var s,l,u,o,f,d,h,y,m,v,p,E,S,w,g,b,A,q;s={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9},l={},l[s.BooleanLiteral]="Boolean",l[s.EOF]="<end>",l[s.Identifier]="Identifier",l[s.Keyword]="Keyword",l[s.NullLiteral]="Null",l[s.NumericLiteral]="Numeric",l[s.Punctuator]="Punctuator",l[s.StringLiteral]="String",l[s.RegularExpression]="RegularExpression",u=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="],o={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement"},f={Data:1,Get:2,Set:4},d={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode"},h={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")};function x(c,_){if(!c)throw new Error("ASSERT: "+_)}function D(c){return c>=48&&c<=57}function j(c){return"0123456789abcdefABCDEF".indexOf(c)>=0}function F(c){return"01234567".indexOf(c)>=0}function M(c){return c===32||c===9||c===11||c===12||c===160||c>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(c)>=0}function B(c){return c===10||c===13||c===8232||c===8233}function U(c){return c==64||c===36||c===95||c>=65&&c<=90||c>=97&&c<=122||c===92||c>=128&&h.NonAsciiIdentifierStart.test(String.fromCharCode(c))}function H(c){return c===36||c===95||c>=65&&c<=90||c>=97&&c<=122||c>=48&&c<=57||c===92||c>=128&&h.NonAsciiIdentifierPart.test(String.fromCharCode(c))}function z(c){switch(c){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0;default:return!1}}function K(c){switch(c){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}}function W(c){return c==="eval"||c==="arguments"}function te(c){if(v&&K(c))return!0;switch(c.length){case 2:return c==="if"||c==="in"||c==="do";case 3:return c==="var"||c==="for"||c==="new"||c==="try"||c==="let";case 4:return c==="this"||c==="else"||c==="case"||c==="void"||c==="with"||c==="enum";case 5:return c==="while"||c==="break"||c==="catch"||c==="throw"||c==="const"||c==="yield"||c==="class"||c==="super";case 6:return c==="return"||c==="typeof"||c==="delete"||c==="switch"||c==="export"||c==="import";case 7:return c==="default"||c==="finally"||c==="extends";case 8:return c==="function"||c==="continue"||c==="debugger";case 10:return c==="instanceof";default:return!1}}function Z(c,_,I,R,T){var L;x(typeof I=="number","Comment must have valid position"),!(A.lastCommentStart>=I)&&(A.lastCommentStart=I,L={type:c,value:_},q.range&&(L.range=[I,R]),q.loc&&(L.loc=T),q.comments.push(L),q.attachComment&&(q.leadingComments.push(L),q.trailingComments.push(L)))}function V(c){var _,I,R,T;for(_=p-c,I={start:{line:E,column:p-S-c}};p<w;)if(R=m.charCodeAt(p),++p,B(R)){q.comments&&(T=m.slice(_+c,p-1),I.end={line:E,column:p-S-1},Z("Line",T,_,p-1,I)),R===13&&m.charCodeAt(p)===10&&++p,++E,S=p;return}q.comments&&(T=m.slice(_+c,p),I.end={line:E,column:p-S},Z("Line",T,_,p,I))}function pe(){var c,_,I,R;for(q.comments&&(c=p-2,_={start:{line:E,column:p-S-2}});p<w;)if(I=m.charCodeAt(p),B(I))I===13&&m.charCodeAt(p+1)===10&&++p,++E,++p,S=p,p>=w&&ee({},d.UnexpectedToken,"ILLEGAL");else if(I===42){if(m.charCodeAt(p+1)===47){++p,++p,q.comments&&(R=m.slice(c+2,p-2),_.end={line:E,column:p-S},Z("Block",R,c,p,_));return}++p}else++p;ee({},d.UnexpectedToken,"ILLEGAL")}function C(){var c,_;for(_=p===0;p<w;)if(c=m.charCodeAt(p),M(c))++p;else if(B(c))++p,c===13&&m.charCodeAt(p)===10&&++p,++E,S=p,_=!0;else if(c===47)if(c=m.charCodeAt(p+1),c===47)++p,++p,V(2),_=!0;else if(c===42)++p,++p,pe();else break;else if(_&&c===45)if(m.charCodeAt(p+1)===45&&m.charCodeAt(p+2)===62)p+=3,V(3);else break;else if(c===60)if(m.slice(p+1,p+4)==="!--")++p,++p,++p,++p,V(4);else break;else break}function k(c){var _,I,R,T=0;for(I=c==="u"?4:2,_=0;_<I;++_)if(p<w&&j(m[p]))R=m[p++],T=T*16+"0123456789abcdef".indexOf(R.toLowerCase());else return"";return String.fromCharCode(T)}function $(){var c,_;for(c=m.charCodeAt(p++),_=String.fromCharCode(c),c===92&&(m.charCodeAt(p)!==117&&ee({},d.UnexpectedToken,"ILLEGAL"),++p,c=k("u"),(!c||c==="\\"||!U(c.charCodeAt(0)))&&ee({},d.UnexpectedToken,"ILLEGAL"),_=c);p<w&&(c=m.charCodeAt(p),!!H(c));)++p,_+=String.fromCharCode(c),c===92&&(_=_.substr(0,_.length-1),m.charCodeAt(p)!==117&&ee({},d.UnexpectedToken,"ILLEGAL"),++p,c=k("u"),(!c||c==="\\"||!H(c.charCodeAt(0)))&&ee({},d.UnexpectedToken,"ILLEGAL"),_+=c);return _}function Q(){var c,_;for(c=p++;p<w;){if(_=m.charCodeAt(p),_===92)return p=c,$();if(H(_))++p;else break}return m.slice(c,p)}function se(){var c,_,I;return c=p,_=m.charCodeAt(p)===92?$():Q(),_.length===1?I=s.Identifier:te(_)?I=s.Keyword:_==="null"?I=s.NullLiteral:_==="true"||_==="false"?I=s.BooleanLiteral:I=s.Identifier,{type:I,value:_,lineNumber:E,lineStart:S,start:c,end:p}}function Y(){var c=p,_=m.charCodeAt(p),I,R=m[p],T,L,oe;switch(_){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++p,q.tokenize&&(_===40?q.openParenToken=q.tokens.length:_===123&&(q.openCurlyToken=q.tokens.length)),{type:s.Punctuator,value:String.fromCharCode(_),lineNumber:E,lineStart:S,start:c,end:p};default:if(I=m.charCodeAt(p+1),I===61)switch(_){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return p+=2,{type:s.Punctuator,value:String.fromCharCode(_)+String.fromCharCode(I),lineNumber:E,lineStart:S,start:c,end:p};case 33:case 61:return p+=2,m.charCodeAt(p)===61&&++p,{type:s.Punctuator,value:m.slice(c,p),lineNumber:E,lineStart:S,start:c,end:p}}}if(oe=m.substr(p,4),oe===">>>=")return p+=4,{type:s.Punctuator,value:oe,lineNumber:E,lineStart:S,start:c,end:p};if(L=oe.substr(0,3),L===">>>"||L==="<<="||L===">>=")return p+=3,{type:s.Punctuator,value:L,lineNumber:E,lineStart:S,start:c,end:p};if(T=L.substr(0,2),R===T[1]&&"+-<>&|".indexOf(R)>=0||T==="=>")return p+=2,{type:s.Punctuator,value:T,lineNumber:E,lineStart:S,start:c,end:p};if("<>=!+-*%&|^/".indexOf(R)>=0)return++p,{type:s.Punctuator,value:R,lineNumber:E,lineStart:S,start:c,end:p};ee({},d.UnexpectedToken,"ILLEGAL")}function ne(c){for(var _="";p<w&&j(m[p]);)_+=m[p++];return _.length===0&&ee({},d.UnexpectedToken,"ILLEGAL"),U(m.charCodeAt(p))&&ee({},d.UnexpectedToken,"ILLEGAL"),{type:s.NumericLiteral,value:parseInt("0x"+_,16),lineNumber:E,lineStart:S,start:c,end:p}}function ue(c){for(var _="0"+m[p++];p<w&&F(m[p]);)_+=m[p++];return(U(m.charCodeAt(p))||D(m.charCodeAt(p)))&&ee({},d.UnexpectedToken,"ILLEGAL"),{type:s.NumericLiteral,value:parseInt(_,8),octal:!0,lineNumber:E,lineStart:S,start:c,end:p}}function le(){var c,_,I;if(I=m[p],x(D(I.charCodeAt(0))||I===".","Numeric literal must start with a decimal digit or a decimal point"),_=p,c="",I!=="."){if(c=m[p++],I=m[p],c==="0"){if(I==="x"||I==="X")return++p,ne(_);if(F(I))return ue(_);I&&D(I.charCodeAt(0))&&ee({},d.UnexpectedToken,"ILLEGAL")}for(;D(m.charCodeAt(p));)c+=m[p++];I=m[p]}if(I==="."){for(c+=m[p++];D(m.charCodeAt(p));)c+=m[p++];I=m[p]}if(I==="e"||I==="E")if(c+=m[p++],I=m[p],(I==="+"||I==="-")&&(c+=m[p++]),D(m.charCodeAt(p)))for(;D(m.charCodeAt(p));)c+=m[p++];else ee({},d.UnexpectedToken,"ILLEGAL");return U(m.charCodeAt(p))&&ee({},d.UnexpectedToken,"ILLEGAL"),{type:s.NumericLiteral,value:parseFloat(c),lineNumber:E,lineStart:S,start:_,end:p}}function me(){var c="",_,I,R,T,L,oe,de=!1,_e,ge;for(_e=E,ge=S,_=m[p],x(_==="'"||_==='"',"String literal must starts with a quote"),I=p,++p;p<w;)if(R=m[p++],R===_){_="";break}else if(R==="\\")if(R=m[p++],!R||!B(R.charCodeAt(0)))switch(R){case"u":case"x":oe=p,L=k(R),L?c+=L:(p=oe,c+=R);break;case"n":c+=`
|
|
8
8
|
`;break;case"r":c+="\r";break;case"t":c+=" ";break;case"b":c+="\b";break;case"f":c+="\f";break;case"v":c+="\v";break;default:F(R)?(T="01234567".indexOf(R),T!==0&&(de=!0),p<w&&F(m[p])&&(de=!0,T=T*8+"01234567".indexOf(m[p++]),"0123".indexOf(R)>=0&&p<w&&F(m[p])&&(T=T*8+"01234567".indexOf(m[p++]))),c+=String.fromCharCode(T)):c+=R;break}else++E,R==="\r"&&m[p]===`
|
|
9
|
-
`&&++p,S=p;else{if(B(R.charCodeAt(0)))break;c+=R}return _!==""&&ee({},d.UnexpectedToken,"ILLEGAL"),{type:s.StringLiteral,value:c,octal:de,startLineNumber:_e,startLineStart:ge,lineNumber:E,lineStart:S,start:I,end:p}}function ve(c,_){var I;try{I=new RegExp(c,_)}catch{ee({},d.InvalidRegExp)}return I}function Se(){var c,_,I,R,T;for(c=m[p],x(c==="/","Regular expression literal must start with a slash"),_=m[p++],I=!1,R=!1;p<w;)if(c=m[p++],_+=c,c==="\\")c=m[p++],B(c.charCodeAt(0))&&ee({},d.UnterminatedRegExp),_+=c;else if(B(c.charCodeAt(0)))ee({},d.UnterminatedRegExp);else if(I)c==="]"&&(I=!1);else if(c==="/"){R=!0;break}else c==="["&&(I=!0);return R||ee({},d.UnterminatedRegExp),T=_.substr(1,_.length-2),{value:T,literal:_}}function be(){var c,_,I,R;for(_="",I="";p<w&&(c=m[p],!!H(c.charCodeAt(0)));)if(++p,c==="\\"&&p<w)if(c=m[p],c==="u"){if(++p,R=p,c=k("u"),c)for(I+=c,_+="\\u";R<p;++R)_+=m[R];else p=R,I+="u",_+="\\u";ce({},d.UnexpectedToken,"ILLEGAL")}else _+="\\",ce({},d.UnexpectedToken,"ILLEGAL");else I+=c,_+=c;return{value:I,literal:_}}function Te(){var c,_,I,R;return b=null,C(),c=p,_=Se(),I=be(),R=ve(_.value,I.value),q.tokenize?{type:s.RegularExpression,value:R,lineNumber:E,lineStart:S,start:c,end:p}:{literal:_.literal+I.literal,value:R,start:c,end:p}}function ye(){var c,_,I,R;return C(),c=p,_={start:{line:E,column:p-S}},I=Te(),_.end={line:E,column:p-S},q.tokenize||(q.tokens.length>0&&(R=q.tokens[q.tokens.length-1],R.range[0]===c&&R.type==="Punctuator"&&(R.value==="/"||R.value==="/=")&&q.tokens.pop()),q.tokens.push({type:"RegularExpression",value:I.literal,range:[c,p],loc:_})),I}function Fe(c){return c.type===s.Identifier||c.type===s.Keyword||c.type===s.BooleanLiteral||c.type===s.NullLiteral}function ze(){var c,_;if(c=q.tokens[q.tokens.length-1],!c)return ye();if(c.type==="Punctuator"){if(c.value==="]")return X();if(c.value===")")return _=q.tokens[q.openParenToken-1],_&&_.type==="Keyword"&&(_.value==="if"||_.value==="while"||_.value==="for"||_.value==="with")?ye():X();if(c.value==="}"){if(q.tokens[q.openCurlyToken-3]&&q.tokens[q.openCurlyToken-3].type==="Keyword"){if(_=q.tokens[q.openCurlyToken-4],!_)return X()}else if(q.tokens[q.openCurlyToken-4]&&q.tokens[q.openCurlyToken-4].type==="Keyword"){if(_=q.tokens[q.openCurlyToken-5],!_)return ye()}else return X();return u.indexOf(_.value)>=0?X():ye()}return ye()}return c.type==="Keyword"?ye():X()}function je(){var c;return C(),p>=w?{type:s.EOF,lineNumber:E,lineStart:S,start:p,end:p}:(c=m.charCodeAt(p),U(c)?se():c===40||c===41||c===59?X():c===39||c===34?me():c===46?D(m.charCodeAt(p+1))?le():X():D(c)?le():q.tokenize&&c===47?ze():X())}function Be(){var c,_,I;return C(),c={start:{line:E,column:p-S}},_=je(),c.end={line:E,column:p-S},_.type!==s.EOF&&(I=m.slice(_.start,_.end),q.tokens.push({type:l[_.type],value:I,range:[_.start,_.end],loc:c})),_}function ie(){var c;return c=b,p=c.end,E=c.lineNumber,S=c.lineStart,b=typeof q.tokens<"u"?Be():je(),p=c.end,E=c.lineNumber,S=c.lineStart,c}function Me(){var c,_,I;c=p,_=E,I=S,b=typeof q.tokens<"u"?Be():je(),p=c,E=_,S=I}function Oe(c,_){this.line=c,this.column=_}function Le(c,_,I,R){this.start=new Oe(c,_),this.end=new Oe(I,R)}y={name:"SyntaxTree",processComment:function(c){var _,I;if(!(c.type===o.Program&&c.body.length>0)){for(q.trailingComments.length>0?q.trailingComments[0].range[0]>=c.range[1]?(I=q.trailingComments,q.trailingComments=[]):q.trailingComments.length=0:q.bottomRightStack.length>0&&q.bottomRightStack[q.bottomRightStack.length-1].trailingComments&&q.bottomRightStack[q.bottomRightStack.length-1].trailingComments[0].range[0]>=c.range[1]&&(I=q.bottomRightStack[q.bottomRightStack.length-1].trailingComments,delete q.bottomRightStack[q.bottomRightStack.length-1].trailingComments);q.bottomRightStack.length>0&&q.bottomRightStack[q.bottomRightStack.length-1].range[0]>=c.range[0];)_=q.bottomRightStack.pop();_?_.leadingComments&&_.leadingComments[_.leadingComments.length-1].range[1]<=c.range[0]&&(c.leadingComments=_.leadingComments,delete _.leadingComments):q.leadingComments.length>0&&q.leadingComments[q.leadingComments.length-1].range[1]<=c.range[0]&&(c.leadingComments=q.leadingComments,q.leadingComments=[]),I&&(c.trailingComments=I),q.bottomRightStack.push(c)}},markEnd:function(c,_){return q.range&&(c.range=[_.start,p]),q.loc&&(c.loc=new Le(_.startLineNumber===void 0?_.lineNumber:_.startLineNumber,_.start-(_.startLineStart===void 0?_.lineStart:_.startLineStart),E,p-S),this.postProcess(c)),q.attachComment&&this.processComment(c),c},postProcess:function(c){return q.source&&(c.loc.source=q.source),c},createArrayExpression:function(c){return{type:o.ArrayExpression,elements:c}},createAssignmentExpression:function(c,_,I){return{type:o.AssignmentExpression,operator:c,left:_,right:I}},createBinaryExpression:function(c,_,I){var R=c==="||"||c==="&&"?o.LogicalExpression:o.BinaryExpression;return{type:R,operator:c,left:_,right:I}},createBlockStatement:function(c){return{type:o.BlockStatement,body:c}},createBreakStatement:function(c){return{type:o.BreakStatement,label:c}},createCallExpression:function(c,_){return{type:o.CallExpression,callee:c,arguments:_}},createCatchClause:function(c,_){return{type:o.CatchClause,param:c,body:_}},createConditionalExpression:function(c,_,I){return{type:o.ConditionalExpression,test:c,consequent:_,alternate:I}},createContinueStatement:function(c){return{type:o.ContinueStatement,label:c}},createDebuggerStatement:function(){return{type:o.DebuggerStatement}},createDoWhileStatement:function(c,_){return{type:o.DoWhileStatement,body:c,test:_}},createEmptyStatement:function(){return{type:o.EmptyStatement}},createExpressionStatement:function(c){return{type:o.ExpressionStatement,expression:c}},createForStatement:function(c,_,I,R){return{type:o.ForStatement,init:c,test:_,update:I,body:R}},createForInStatement:function(c,_,I){return{type:o.ForInStatement,left:c,right:_,body:I,each:!1}},createFunctionDeclaration:function(c,_,I,R){return{type:o.FunctionDeclaration,id:c,params:_,defaults:I,body:R,rest:null,generator:!1,expression:!1}},createFunctionExpression:function(c,_,I,R){return{type:o.FunctionExpression,id:c,params:_,defaults:I,body:R,rest:null,generator:!1,expression:!1}},createIdentifier:function(c){return{type:o.Identifier,name:c}},createIfStatement:function(c,_,I){return{type:o.IfStatement,test:c,consequent:_,alternate:I}},createLabeledStatement:function(c,_){return{type:o.LabeledStatement,label:c,body:_}},createLiteral:function(c){return{type:o.Literal,value:c.value,raw:m.slice(c.start,c.end)}},createMemberExpression:function(c,_,I){return{type:o.MemberExpression,computed:c==="[",object:_,property:I}},createNewExpression:function(c,_){return{type:o.NewExpression,callee:c,arguments:_}},createObjectExpression:function(c){return{type:o.ObjectExpression,properties:c}},createPostfixExpression:function(c,_){return{type:o.UpdateExpression,operator:c,argument:_,prefix:!1}},createProgram:function(c){return{type:o.Program,body:c}},createProperty:function(c,_,I){return{type:o.Property,key:_,value:I,kind:c}},createReturnStatement:function(c){return{type:o.ReturnStatement,argument:c}},createSequenceExpression:function(c){return{type:o.SequenceExpression,expressions:c}},createSwitchCase:function(c,_){return{type:o.SwitchCase,test:c,consequent:_}},createSwitchStatement:function(c,_){return{type:o.SwitchStatement,discriminant:c,cases:_}},createThisExpression:function(){return{type:o.ThisExpression}},createThrowStatement:function(c){return{type:o.ThrowStatement,argument:c}},createTryStatement:function(c,_,I,R){return{type:o.TryStatement,block:c,guardedHandlers:_,handlers:I,finalizer:R}},createUnaryExpression:function(c,_){return c==="++"||c==="--"?{type:o.UpdateExpression,operator:c,argument:_,prefix:!0}:{type:o.UnaryExpression,operator:c,argument:_,prefix:!0}},createVariableDeclaration:function(c,_){return{type:o.VariableDeclaration,declarations:c,kind:_}},createVariableDeclarator:function(c,_){return{type:o.VariableDeclarator,id:c,init:_}},createWhileStatement:function(c,_){return{type:o.WhileStatement,test:c,body:_}},createWithStatement:function(c,_){return{type:o.WithStatement,object:c,body:_}}};function Ie(){var c,_,I,R;return c=p,_=E,I=S,C(),R=E!==_,p=c,E=_,S=I,R}function ee(c,_){var I,R=Array.prototype.slice.call(arguments,2),T=_.replace(/%(\d)/g,function(L,oe){return x(oe<R.length,"Message reference must be in range"),R[oe]});throw typeof c.lineNumber=="number"?(I=new Error("Line "+c.lineNumber+": "+T),I.index=c.start,I.lineNumber=c.lineNumber,I.column=c.start-S+1):(I=new Error("Line "+E+": "+T),I.index=p,I.lineNumber=E,I.column=p-S+1),I.description=T,I}function ce(){try{ee.apply(null,arguments)}catch(c){if(q.errors)q.errors.push(c);else throw c}}function we(c){if(c.type===s.EOF&&ee(c,d.UnexpectedEOS),c.type===s.NumericLiteral&&ee(c,d.UnexpectedNumber),c.type===s.StringLiteral&&ee(c,d.UnexpectedString),c.type===s.Identifier&&ee(c,d.UnexpectedIdentifier),c.type===s.Keyword){if(z(c.value))ee(c,d.UnexpectedReserved);else if(v&&K(c.value)){ce(c,d.StrictReservedWord);return}ee(c,d.UnexpectedToken,c.value)}ee(c,d.UnexpectedToken,c.value)}function J(c){var _=ie();(_.type!==s.Punctuator||_.value!==c)&&we(_)}function Q(c){var _=ie();(_.type!==s.Keyword||_.value!==c)&&we(_)}function M(c){return b.type===s.Punctuator&&b.value===c}function O(c){return b.type===s.Keyword&&b.value===c}function P(){var c;return b.type!==s.Punctuator?!1:(c=b.value,c==="="||c==="*="||c==="/="||c==="%="||c==="+="||c==="-="||c==="<<="||c===">>="||c===">>>="||c==="&="||c==="^="||c==="|=")}function G(){var c;if(m.charCodeAt(p)===59||M(";")){ie();return}c=E,C(),E===c&&b.type!==s.EOF&&!M("}")&&we(b)}function re(c){return c.type===o.Identifier||c.type===o.MemberExpression}function fe(){var c=[],_;for(_=b,J("[");!M("]");)M(",")?(ie(),c.push(null)):(c.push(Ae()),M("]")||J(","));return ie(),g.markEnd(g.createArrayExpression(c),_)}function ae(c,_){var I,R,T;return I=v,T=b,R=st(),_&&v&&W(c[0].name)&&ce(_,d.StrictParamName),v=I,g.markEnd(g.createFunctionExpression(null,c,[],R),T)}function qe(){var c,_;return _=b,c=ie(),c.type===s.StringLiteral||c.type===s.NumericLiteral?(v&&c.octal&&ce(c,d.StrictOctalLiteral),g.markEnd(g.createLiteral(c),_)):g.markEnd(g.createIdentifier(c.value),_)}function Ne(){var c,_,I,R,T,L;if(c=b,L=b,c.type===s.Identifier)return I=qe(),c.value==="get"&&!M(":")?(_=qe(),J("("),J(")"),R=ae([]),g.markEnd(g.createProperty("get",_,R),L)):c.value==="set"&&!M(":")?(_=qe(),J("("),c=b,c.type!==s.Identifier?(J(")"),ce(c,d.UnexpectedToken,c.value),R=ae([])):(T=[Ce()],J(")"),R=ae(T,c)),g.markEnd(g.createProperty("set",_,R),L)):(J(":"),R=Ae(),g.markEnd(g.createProperty("init",I,R),L));if(c.type===s.EOF||c.type===s.Punctuator)we(c);else return _=qe(),J(":"),R=Ae(),g.markEnd(g.createProperty("init",_,R),L)}function Ee(){var c=[],_,I,R,T,L={},oe=String,de;for(de=b,J("{");!M("}");)_=Ne(),_.key.type===o.Identifier?I=_.key.name:I=oe(_.key.value),T=_.kind==="init"?f.Data:_.kind==="get"?f.Get:f.Set,R="$"+I,Object.prototype.hasOwnProperty.call(L,R)?(L[R]===f.Data?v&&T===f.Data?ce({},d.StrictDuplicateProperty):T!==f.Data&&ce({},d.AccessorDataProperty):T===f.Data?ce({},d.AccessorDataProperty):L[R]&T&&ce({},d.AccessorGetSet),L[R]|=T):L[R]=T,c.push(_),M("}")||J(",");return J("}"),g.markEnd(g.createObjectExpression(c),de)}function Re(){var c;return J("("),c=he(),J(")"),c}function He(){var c,_,I,R;if(M("("))return Re();if(M("["))return fe();if(M("{"))return Ee();if(c=b.type,R=b,c===s.Identifier)I=g.createIdentifier(ie().value);else if(c===s.StringLiteral||c===s.NumericLiteral)v&&b.octal&&ce(b,d.StrictOctalLiteral),I=g.createLiteral(ie());else if(c===s.Keyword){if(O("function"))return qt();O("this")?(ie(),I=g.createThisExpression()):we(ie())}else c===s.BooleanLiteral?(_=ie(),_.value=_.value==="true",I=g.createLiteral(_)):c===s.NullLiteral?(_=ie(),_.value=null,I=g.createLiteral(_)):M("/")||M("/=")?(typeof q.tokens<"u"?I=g.createLiteral(ye()):I=g.createLiteral(Te()),Me()):we(ie());return g.markEnd(I,R)}function $e(){var c=[];if(J("("),!M(")"))for(;p<w&&(c.push(Ae()),!M(")"));)J(",");return J(")"),c}function xe(){var c,_;return _=b,c=ie(),Fe(c)||we(c),g.markEnd(g.createIdentifier(c.value),_)}function Je(){return J("."),xe()}function Ye(){var c;return J("["),c=he(),J("]"),c}function Xe(){var c,_,I;return I=b,Q("new"),c=Qe(),_=M("(")?$e():[],g.markEnd(g.createNewExpression(c,_),I)}function Ue(){var c,_,I,R,T;for(T=b,c=A.allowIn,A.allowIn=!0,_=O("new")?Xe():He(),A.allowIn=c;;){if(M("."))R=Je(),_=g.createMemberExpression(".",_,R);else if(M("("))I=$e(),_=g.createCallExpression(_,I);else if(M("["))R=Ye(),_=g.createMemberExpression("[",_,R);else break;g.markEnd(_,T)}return _}function Qe(){var c,_,I,R;for(R=b,c=A.allowIn,_=O("new")?Xe():He(),A.allowIn=c;M(".")||M("[");)M("[")?(I=Ye(),_=g.createMemberExpression("[",_,I)):(I=Je(),_=g.createMemberExpression(".",_,I)),g.markEnd(_,R);return _}function Ge(){var c,_,I=b;return c=Ue(),b.type===s.Punctuator&&(M("++")||M("--"))&&!Ie()&&(v&&c.type===o.Identifier&&W(c.name)&&ce({},d.StrictLHSPostfix),re(c)||ce({},d.InvalidLHSInAssignment),_=ie(),c=g.markEnd(g.createPostfixExpression(_.value,c),I)),c}function Pe(){var c,_,I;return b.type!==s.Punctuator&&b.type!==s.Keyword?_=Ge():M("++")||M("--")?(I=b,c=ie(),_=Pe(),v&&_.type===o.Identifier&&W(_.name)&&ce({},d.StrictLHSPrefix),re(_)||ce({},d.InvalidLHSInAssignment),_=g.createUnaryExpression(c.value,_),_=g.markEnd(_,I)):M("+")||M("-")||M("~")||M("!")?(I=b,c=ie(),_=Pe(),_=g.createUnaryExpression(c.value,_),_=g.markEnd(_,I)):O("delete")||O("void")||O("typeof")?(I=b,c=ie(),_=Pe(),_=g.createUnaryExpression(c.value,_),_=g.markEnd(_,I),v&&_.operator==="delete"&&_.argument.type===o.Identifier&&ce({},d.StrictDelete)):_=Ge(),_}function Ve(c,_){var I=0;if(c.type!==s.Punctuator&&c.type!==s.Keyword)return 0;switch(c.value){case"||":I=1;break;case"&&":I=2;break;case"|":I=3;break;case"^":I=4;break;case"&":I=5;break;case"==":case"!=":case"===":case"!==":I=6;break;case"<":case">":case"<=":case">=":case"instanceof":I=7;break;case"in":I=_?7:0;break;case"<<":case">>":case">>>":I=8;break;case"+":case"-":I=9;break;case"*":case"/":case"%":I=11;break}return I}function rt(){var c,_,I,R,T,L,oe,de,_e,ge;if(c=b,_e=Pe(),R=b,T=Ve(R,A.allowIn),T===0)return _e;for(R.prec=T,ie(),_=[c,b],oe=Pe(),L=[_e,R,oe];(T=Ve(b,A.allowIn))>0;){for(;L.length>2&&T<=L[L.length-2].prec;)oe=L.pop(),de=L.pop().value,_e=L.pop(),I=g.createBinaryExpression(de,_e,oe),_.pop(),c=_[_.length-1],g.markEnd(I,c),L.push(I);R=ie(),R.prec=T,L.push(R),_.push(b),I=Pe(),L.push(I)}for(ge=L.length-1,I=L[ge],_.pop();ge>1;)I=g.createBinaryExpression(L[ge-1].value,L[ge-2],I),ge-=2,c=_.pop(),g.markEnd(I,c);return I}function nt(){var c,_,I,R,T;return T=b,c=rt(),M("?")&&(ie(),_=A.allowIn,A.allowIn=!0,I=Ae(),A.allowIn=_,J(":"),R=Ae(),c=g.createConditionalExpression(c,I,R),g.markEnd(c,T)),c}function Ae(){var c,_,I,R,T;return c=b,T=b,R=_=nt(),P()&&(re(_)||ce({},d.InvalidLHSInAssignment),v&&_.type===o.Identifier&&W(_.name)&&ce(c,d.StrictLHSAssignment),c=ie(),I=Ae(),R=g.markEnd(g.createAssignmentExpression(c.value,_,I),T)),R}function he(){var c,_=b;if(c=Ae(),M(",")){for(c=g.createSequenceExpression([c]);p<w&&M(",");)ie(),c.expressions.push(Ae());g.markEnd(c,_)}return c}function Ze(){for(var c=[],_;p<w&&!(M("}")||(_=tt(),typeof _>"u"));)c.push(_);return c}function We(){var c,_;return _=b,J("{"),c=Ze(),J("}"),g.markEnd(g.createBlockStatement(c),_)}function Ce(){var c,_;return _=b,c=ie(),c.type!==s.Identifier&&we(c),g.markEnd(g.createIdentifier(c.value),_)}function et(c){var _=null,I,R;return R=b,I=Ce(),v&&W(I.name)&&ce({},d.StrictVarName),c==="const"?(J("="),_=Ae()):M("=")&&(ie(),_=Ae()),g.markEnd(g.createVariableDeclarator(I,_),R)}function ke(c){var _=[];do{if(_.push(et(c)),!M(","))break;ie()}while(p<w);return _}function Ke(){var c;return Q("var"),c=ke(),G(),g.createVariableDeclaration(c,"var")}function at(c){var _,I;return I=b,Q(c),_=ke(c),G(),g.markEnd(g.createVariableDeclaration(_,c),I)}function it(){return J(";"),g.createEmptyStatement()}function ct(){var c=he();return G(),g.createExpressionStatement(c)}function pt(){var c,_,I;return Q("if"),J("("),c=he(),J(")"),_=De(),O("else")?(ie(),I=De()):I=null,g.createIfStatement(c,_,I)}function dt(){var c,_,I;return Q("do"),I=A.inIteration,A.inIteration=!0,c=De(),A.inIteration=I,Q("while"),J("("),_=he(),J(")"),M(";")&&ie(),g.createDoWhileStatement(c,_)}function ft(){var c,_,I;return Q("while"),J("("),c=he(),J(")"),I=A.inIteration,A.inIteration=!0,_=De(),A.inIteration=I,g.createWhileStatement(c,_)}function ht(){var c,_,I;return I=b,c=ie(),_=ke(),g.markEnd(g.createVariableDeclaration(_,c.value),I)}function mt(){var c,_,I,R,T,L,oe;return c=_=I=null,Q("for"),J("("),M(";")?ie():(O("var")||O("let")?(A.allowIn=!1,c=ht(),A.allowIn=!0,c.declarations.length===1&&O("in")&&(ie(),R=c,T=he(),c=null)):(A.allowIn=!1,c=he(),A.allowIn=!0,O("in")&&(re(c)||ce({},d.InvalidLHSInForIn),ie(),R=c,T=he(),c=null)),typeof R>"u"&&J(";")),typeof R>"u"&&(M(";")||(_=he()),J(";"),M(")")||(I=he())),J(")"),oe=A.inIteration,A.inIteration=!0,L=De(),A.inIteration=oe,typeof R>"u"?g.createForStatement(c,_,I,L):g.createForInStatement(R,T,L)}function yt(){var c=null,_;return Q("continue"),m.charCodeAt(p)===59?(ie(),A.inIteration||ee({},d.IllegalContinue),g.createContinueStatement(null)):Ie()?(A.inIteration||ee({},d.IllegalContinue),g.createContinueStatement(null)):(b.type===s.Identifier&&(c=Ce(),_="$"+c.name,Object.prototype.hasOwnProperty.call(A.labelSet,_)||ee({},d.UnknownLabel,c.name)),G(),c===null&&!A.inIteration&&ee({},d.IllegalContinue),g.createContinueStatement(c))}function gt(){var c=null,_;return Q("break"),m.charCodeAt(p)===59?(ie(),A.inIteration||A.inSwitch||ee({},d.IllegalBreak),g.createBreakStatement(null)):Ie()?(A.inIteration||A.inSwitch||ee({},d.IllegalBreak),g.createBreakStatement(null)):(b.type===s.Identifier&&(c=Ce(),_="$"+c.name,Object.prototype.hasOwnProperty.call(A.labelSet,_)||ee({},d.UnknownLabel,c.name)),G(),c===null&&!(A.inIteration||A.inSwitch)&&ee({},d.IllegalBreak),g.createBreakStatement(c))}function _t(){var c=null;return Q("return"),A.inFunctionBody||ce({},d.IllegalReturn),m.charCodeAt(p)===32&&U(m.charCodeAt(p+1))?(c=he(),G(),g.createReturnStatement(c)):Ie()?g.createReturnStatement(null):(M(";")||!M("}")&&b.type!==s.EOF&&(c=he()),G(),g.createReturnStatement(c))}function vt(){var c,_;return v&&(C(),ce({},d.StrictModeWith)),Q("with"),J("("),c=he(),J(")"),_=De(),g.createWithStatement(c,_)}function bt(){var c,_=[],I,R;for(R=b,O("default")?(ie(),c=null):(Q("case"),c=he()),J(":");p<w&&!(M("}")||O("default")||O("case"));)I=De(),_.push(I);return g.markEnd(g.createSwitchCase(c,_),R)}function St(){var c,_,I,R,T;if(Q("switch"),J("("),c=he(),J(")"),J("{"),_=[],M("}"))return ie(),g.createSwitchStatement(c,_);for(R=A.inSwitch,A.inSwitch=!0,T=!1;p<w&&!M("}");)I=bt(),I.test===null&&(T&&ee({},d.MultipleDefaultsInSwitch),T=!0),_.push(I);return A.inSwitch=R,J("}"),g.createSwitchStatement(c,_)}function wt(){var c;return Q("throw"),Ie()&&ee({},d.NewlineAfterThrow),c=he(),G(),g.createThrowStatement(c)}function Et(){var c,_,I;return I=b,Q("catch"),J("("),M(")")&&we(b),c=Ce(),v&&W(c.name)&&ce({},d.StrictCatchVariable),J(")"),_=We(),g.markEnd(g.createCatchClause(c,_),I)}function At(){var c,_=[],I=null;return Q("try"),c=We(),O("catch")&&_.push(Et()),O("finally")&&(ie(),I=We()),_.length===0&&!I&&ee({},d.NoCatchOrFinally),g.createTryStatement(c,[],_,I)}function It(){return Q("debugger"),G(),g.createDebuggerStatement()}function De(){var c=b.type,_,I,R,T;if(c===s.EOF&&we(b),c===s.Punctuator&&b.value==="{")return We();if(T=b,c===s.Punctuator)switch(b.value){case";":return g.markEnd(it(),T);case"(":return g.markEnd(ct(),T)}if(c===s.Keyword)switch(b.value){case"break":return g.markEnd(gt(),T);case"continue":return g.markEnd(yt(),T);case"debugger":return g.markEnd(It(),T);case"do":return g.markEnd(dt(),T);case"for":return g.markEnd(mt(),T);case"function":return g.markEnd(ut(),T);case"if":return g.markEnd(pt(),T);case"return":return g.markEnd(_t(),T);case"switch":return g.markEnd(St(),T);case"throw":return g.markEnd(wt(),T);case"try":return g.markEnd(At(),T);case"var":return g.markEnd(Ke(),T);case"while":return g.markEnd(ft(),T);case"with":return g.markEnd(vt(),T)}return _=he(),_.type===o.Identifier&&M(":")?(ie(),R="$"+_.name,Object.prototype.hasOwnProperty.call(A.labelSet,R)&&ee({},d.Redeclaration,"Label",_.name),A.labelSet[R]=!0,I=De(),delete A.labelSet[R],g.markEnd(g.createLabeledStatement(_,I),T)):(G(),g.markEnd(g.createExpressionStatement(_),T))}function st(){var c,_=[],I,R,T,L,oe,de,_e,ge;for(ge=b,J("{");p<w&&!(b.type!==s.StringLiteral||(I=b,c=tt(),_.push(c),c.expression.type!==o.Literal));)R=m.slice(I.start+1,I.end-1),R==="use strict"?(v=!0,T&&ce(T,d.StrictOctalLiteral)):!T&&I.octal&&(T=I);for(L=A.labelSet,oe=A.inIteration,de=A.inSwitch,_e=A.inFunctionBody,A.labelSet={},A.inIteration=!1,A.inSwitch=!1,A.inFunctionBody=!0;p<w&&!(M("}")||(c=tt(),typeof c>"u"));)_.push(c);return J("}"),A.labelSet=L,A.inIteration=oe,A.inSwitch=de,A.inFunctionBody=_e,g.markEnd(g.createBlockStatement(_),ge)}function ot(c){var _,I=[],R,T,L,oe,de;if(J("("),!M(")"))for(L={};p<w&&(R=b,_=Ce(),oe="$"+R.value,v?(W(R.value)&&(T=R,de=d.StrictParamName),Object.prototype.hasOwnProperty.call(L,oe)&&(T=R,de=d.StrictParamDupe)):c||(W(R.value)?(c=R,de=d.StrictParamName):K(R.value)?(c=R,de=d.StrictReservedWord):Object.prototype.hasOwnProperty.call(L,oe)&&(c=R,de=d.StrictParamDupe)),I.push(_),L[oe]=!0,!M(")"));)J(",");return J(")"),{params:I,stricted:T,firstRestricted:c,message:de}}function ut(){var c,_=[],I,R,T,L,oe,de,_e,ge;return ge=b,Q("function"),R=b,c=Ce(),v?W(R.value)&&ce(R,d.StrictFunctionName):W(R.value)?(oe=R,de=d.StrictFunctionName):K(R.value)&&(oe=R,de=d.StrictReservedWord),L=ot(oe),_=L.params,T=L.stricted,oe=L.firstRestricted,L.message&&(de=L.message),_e=v,I=st(),v&&oe&&ee(oe,de),v&&T&&ce(T,de),v=_e,g.markEnd(g.createFunctionDeclaration(c,_,[],I),ge)}function qt(){var c,_=null,I,R,T,L,oe=[],de,_e,ge;return ge=b,Q("function"),M("(")||(c=b,_=Ce(),v?W(c.value)&&ce(c,d.StrictFunctionName):W(c.value)?(R=c,T=d.StrictFunctionName):K(c.value)&&(R=c,T=d.StrictReservedWord)),L=ot(R),oe=L.params,I=L.stricted,R=L.firstRestricted,L.message&&(T=L.message),_e=v,de=st(),v&&R&&ee(R,T),v&&I&&ce(I,T),v=_e,g.markEnd(g.createFunctionExpression(_,oe,[],de),ge)}function tt(){if(b.type===s.Keyword)switch(b.value){case"const":case"let":return at(b.value);case"function":return ut();default:return De()}if(b.type!==s.EOF)return De()}function xt(){for(var c,_=[],I,R,T;p<w&&(I=b,!(I.type!==s.StringLiteral||(c=tt(),_.push(c),c.expression.type!==o.Literal)));)R=m.slice(I.start+1,I.end-1),R==="use strict"?(v=!0,T&&ce(T,d.StrictOctalLiteral)):!T&&I.octal&&(T=I);for(;p<w&&(c=tt(),!(typeof c>"u"));)_.push(c);return _}function Ot(){var c,_;return C(),Me(),_=b,v=!1,c=xt(),g.markEnd(g.createProgram(c),_)}function lt(){var c,_,I,R=[];for(c=0;c<q.tokens.length;++c)_=q.tokens[c],I={type:_.type,value:_.value},q.range&&(I.range=_.range),q.loc&&(I.loc=_.loc),R.push(I);q.tokens=R}function Rt(c,_){var I,R,T;I=String,typeof c!="string"&&!(c instanceof String)&&(c=I(c)),g=y,m=c,p=0,E=m.length>0?1:0,S=0,w=m.length,b=null,A={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},q={},_=_||{},_.tokens=!0,q.tokens=[],q.tokenize=!0,q.openParenToken=-1,q.openCurlyToken=-1,q.range=typeof _.range=="boolean"&&_.range,q.loc=typeof _.loc=="boolean"&&_.loc,typeof _.comment=="boolean"&&_.comment&&(q.comments=[]),typeof _.tolerant=="boolean"&&_.tolerant&&(q.errors=[]);try{if(Me(),b.type===s.EOF)return q.tokens;for(R=ie();b.type!==s.EOF;)try{R=ie()}catch(L){if(R=b,q.errors){q.errors.push(L);break}else throw L}lt(),T=q.tokens,typeof q.comments<"u"&&(T.comments=q.comments),typeof q.errors<"u"&&(T.errors=q.errors)}catch(L){throw L}finally{q={}}return T}function Pt(c,_){var I,R;R=String,typeof c!="string"&&!(c instanceof String)&&(c=R(c)),g=y,m=c,p=0,E=m.length>0?1:0,S=0,w=m.length,b=null,A={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},q={},typeof _<"u"&&(q.range=typeof _.range=="boolean"&&_.range,q.loc=typeof _.loc=="boolean"&&_.loc,q.attachComment=typeof _.attachComment=="boolean"&&_.attachComment,q.loc&&_.source!==null&&_.source!==void 0&&(q.source=R(_.source)),typeof _.tokens=="boolean"&&_.tokens&&(q.tokens=[]),typeof _.comment=="boolean"&&_.comment&&(q.comments=[]),typeof _.tolerant=="boolean"&&_.tolerant&&(q.errors=[]),q.attachComment&&(q.range=!0,q.comments=[],q.bottomRightStack=[],q.trailingComments=[],q.leadingComments=[]));try{I=Ot(),typeof q.comments<"u"&&(I.comments=q.comments),typeof q.tokens<"u"&&(lt(),I.tokens=q.tokens),typeof q.errors<"u"&&(I.errors=q.errors)}catch(T){throw T}finally{q={}}return I}a.version="1.2.2",a.tokenize=Rt,a.parse=Pt,a.Syntax=function(){var c,_={};typeof Object.create=="function"&&(_=Object.create(null));for(c in o)o.hasOwnProperty(c)&&(_[c]=o[c]);return typeof Object.freeze=="function"&&Object.freeze(_),_}()})},{}],1:[function(t,r,i){(function(a){var s=function(){var l={trace:function(){},yy:{},symbols_:{error:2,JSON_PATH:3,DOLLAR:4,PATH_COMPONENTS:5,LEADING_CHILD_MEMBER_EXPRESSION:6,PATH_COMPONENT:7,MEMBER_COMPONENT:8,SUBSCRIPT_COMPONENT:9,CHILD_MEMBER_COMPONENT:10,DESCENDANT_MEMBER_COMPONENT:11,DOT:12,MEMBER_EXPRESSION:13,DOT_DOT:14,STAR:15,IDENTIFIER:16,SCRIPT_EXPRESSION:17,INTEGER:18,END:19,CHILD_SUBSCRIPT_COMPONENT:20,DESCENDANT_SUBSCRIPT_COMPONENT:21,"[":22,SUBSCRIPT:23,"]":24,SUBSCRIPT_EXPRESSION:25,SUBSCRIPT_EXPRESSION_LIST:26,SUBSCRIPT_EXPRESSION_LISTABLE:27,",":28,STRING_LITERAL:29,ARRAY_SLICE:30,FILTER_EXPRESSION:31,QQ_STRING:32,Q_STRING:33,$accept:0,$end:1},terminals_:{2:"error",4:"DOLLAR",12:"DOT",14:"DOT_DOT",15:"STAR",16:"IDENTIFIER",17:"SCRIPT_EXPRESSION",18:"INTEGER",19:"END",22:"[",24:"]",28:",",30:"ARRAY_SLICE",31:"FILTER_EXPRESSION",32:"QQ_STRING",33:"Q_STRING"},productions_:[0,[3,1],[3,2],[3,1],[3,2],[5,1],[5,2],[7,1],[7,1],[8,1],[8,1],[10,2],[6,1],[11,2],[13,1],[13,1],[13,1],[13,1],[13,1],[9,1],[9,1],[20,3],[21,4],[23,1],[23,1],[26,1],[26,3],[27,1],[27,1],[27,1],[25,1],[25,1],[25,1],[29,1],[29,1]],performAction:function(h,y,m,v,p,E,S){v.ast||(v.ast=u,u.initialize());var w=E.length-1;switch(p){case 1:return v.ast.set({expression:{type:"root",value:E[w]}}),v.ast.unshift(),v.ast.yield();case 2:return v.ast.set({expression:{type:"root",value:E[w-1]}}),v.ast.unshift(),v.ast.yield();case 3:return v.ast.unshift(),v.ast.yield();case 4:return v.ast.set({operation:"member",scope:"child",expression:{type:"identifier",value:E[w-1]}}),v.ast.unshift(),v.ast.yield();case 5:break;case 6:break;case 7:v.ast.set({operation:"member"}),v.ast.push();break;case 8:v.ast.set({operation:"subscript"}),v.ast.push();break;case 9:v.ast.set({scope:"child"});break;case 10:v.ast.set({scope:"descendant"});break;case 11:break;case 12:v.ast.set({scope:"child",operation:"member"});break;case 13:break;case 14:v.ast.set({expression:{type:"wildcard",value:E[w]}});break;case 15:v.ast.set({expression:{type:"identifier",value:E[w]}});break;case 16:v.ast.set({expression:{type:"script_expression",value:E[w]}});break;case 17:v.ast.set({expression:{type:"numeric_literal",value:parseInt(E[w])}});break;case 18:break;case 19:v.ast.set({scope:"child"});break;case 20:v.ast.set({scope:"descendant"});break;case 21:break;case 22:break;case 23:break;case 24:E[w].length>1?v.ast.set({expression:{type:"union",value:E[w]}}):this.$=E[w];break;case 25:this.$=[E[w]];break;case 26:this.$=E[w-2].concat(E[w]);break;case 27:this.$={expression:{type:"numeric_literal",value:parseInt(E[w])}},v.ast.set(this.$);break;case 28:this.$={expression:{type:"string_literal",value:E[w]}},v.ast.set(this.$);break;case 29:this.$={expression:{type:"slice",value:E[w]}},v.ast.set(this.$);break;case 30:this.$={expression:{type:"wildcard",value:E[w]}},v.ast.set(this.$);break;case 31:this.$={expression:{type:"script_expression",value:E[w]}},v.ast.set(this.$);break;case 32:this.$={expression:{type:"filter_expression",value:E[w]}},v.ast.set(this.$);break;case 33:this.$=E[w];break;case 34:this.$=E[w];break}},table:[{3:1,4:[1,2],6:3,13:4,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9]},{1:[3]},{1:[2,1],5:10,7:11,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,3],5:21,7:11,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,12],12:[2,12],14:[2,12],22:[2,12]},{1:[2,14],12:[2,14],14:[2,14],22:[2,14]},{1:[2,15],12:[2,15],14:[2,15],22:[2,15]},{1:[2,16],12:[2,16],14:[2,16],22:[2,16]},{1:[2,17],12:[2,17],14:[2,17],22:[2,17]},{1:[2,18],12:[2,18],14:[2,18],22:[2,18]},{1:[2,2],7:22,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,5],12:[2,5],14:[2,5],22:[2,5]},{1:[2,7],12:[2,7],14:[2,7],22:[2,7]},{1:[2,8],12:[2,8],14:[2,8],22:[2,8]},{1:[2,9],12:[2,9],14:[2,9],22:[2,9]},{1:[2,10],12:[2,10],14:[2,10],22:[2,10]},{1:[2,19],12:[2,19],14:[2,19],22:[2,19]},{1:[2,20],12:[2,20],14:[2,20],22:[2,20]},{13:23,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9]},{13:24,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9],22:[1,25]},{15:[1,29],17:[1,30],18:[1,33],23:26,25:27,26:28,27:32,29:34,30:[1,35],31:[1,31],32:[1,36],33:[1,37]},{1:[2,4],7:22,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,6],12:[2,6],14:[2,6],22:[2,6]},{1:[2,11],12:[2,11],14:[2,11],22:[2,11]},{1:[2,13],12:[2,13],14:[2,13],22:[2,13]},{15:[1,29],17:[1,30],18:[1,33],23:38,25:27,26:28,27:32,29:34,30:[1,35],31:[1,31],32:[1,36],33:[1,37]},{24:[1,39]},{24:[2,23]},{24:[2,24],28:[1,40]},{24:[2,30]},{24:[2,31]},{24:[2,32]},{24:[2,25],28:[2,25]},{24:[2,27],28:[2,27]},{24:[2,28],28:[2,28]},{24:[2,29],28:[2,29]},{24:[2,33],28:[2,33]},{24:[2,34],28:[2,34]},{24:[1,41]},{1:[2,21],12:[2,21],14:[2,21],22:[2,21]},{18:[1,33],27:42,29:34,30:[1,35],32:[1,36],33:[1,37]},{1:[2,22],12:[2,22],14:[2,22],22:[2,22]},{24:[2,26],28:[2,26]}],defaultActions:{27:[2,23],29:[2,30],30:[2,31],31:[2,32]},parseError:function(h,y){if(y.recoverable)this.trace(h);else throw new Error(h)},parse:function(h){var y=this,m=[0],v=[null],p=[],E=this.table,S="",w=0,g=0,b=2,A=1,q=p.slice.call(arguments,1);this.lexer.setInput(h),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var x=this.lexer.yylloc;p.push(x);var D=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"?this.parseError=this.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function j(){var V;return V=y.lexer.lex()||A,typeof V!="number"&&(V=y.symbols_[V]||V),V}for(var F,N,B,U,H={},z,K,W,te;;){if(N=m[m.length-1],this.defaultActions[N]?B=this.defaultActions[N]:((F===null||typeof F>"u")&&(F=j()),B=E[N]&&E[N][F]),typeof B>"u"||!B.length||!B[0]){var Z="";te=[];for(z in E[N])this.terminals_[z]&&z>b&&te.push("'"+this.terminals_[z]+"'");this.lexer.showPosition?Z="Parse error on line "+(w+1)+`:
|
|
9
|
+
`&&++p,S=p;else{if(B(R.charCodeAt(0)))break;c+=R}return _!==""&&ee({},d.UnexpectedToken,"ILLEGAL"),{type:s.StringLiteral,value:c,octal:de,startLineNumber:_e,startLineStart:ge,lineNumber:E,lineStart:S,start:I,end:p}}function ve(c,_){var I;try{I=new RegExp(c,_)}catch{ee({},d.InvalidRegExp)}return I}function Se(){var c,_,I,R,T;for(c=m[p],x(c==="/","Regular expression literal must start with a slash"),_=m[p++],I=!1,R=!1;p<w;)if(c=m[p++],_+=c,c==="\\")c=m[p++],B(c.charCodeAt(0))&&ee({},d.UnterminatedRegExp),_+=c;else if(B(c.charCodeAt(0)))ee({},d.UnterminatedRegExp);else if(I)c==="]"&&(I=!1);else if(c==="/"){R=!0;break}else c==="["&&(I=!0);return R||ee({},d.UnterminatedRegExp),T=_.substr(1,_.length-2),{value:T,literal:_}}function be(){var c,_,I,R;for(_="",I="";p<w&&(c=m[p],!!H(c.charCodeAt(0)));)if(++p,c==="\\"&&p<w)if(c=m[p],c==="u"){if(++p,R=p,c=k("u"),c)for(I+=c,_+="\\u";R<p;++R)_+=m[R];else p=R,I+="u",_+="\\u";ce({},d.UnexpectedToken,"ILLEGAL")}else _+="\\",ce({},d.UnexpectedToken,"ILLEGAL");else I+=c,_+=c;return{value:I,literal:_}}function Te(){var c,_,I,R;return b=null,C(),c=p,_=Se(),I=be(),R=ve(_.value,I.value),q.tokenize?{type:s.RegularExpression,value:R,lineNumber:E,lineStart:S,start:c,end:p}:{literal:_.literal+I.literal,value:R,start:c,end:p}}function ye(){var c,_,I,R;return C(),c=p,_={start:{line:E,column:p-S}},I=Te(),_.end={line:E,column:p-S},q.tokenize||(q.tokens.length>0&&(R=q.tokens[q.tokens.length-1],R.range[0]===c&&R.type==="Punctuator"&&(R.value==="/"||R.value==="/=")&&q.tokens.pop()),q.tokens.push({type:"RegularExpression",value:I.literal,range:[c,p],loc:_})),I}function Fe(c){return c.type===s.Identifier||c.type===s.Keyword||c.type===s.BooleanLiteral||c.type===s.NullLiteral}function ze(){var c,_;if(c=q.tokens[q.tokens.length-1],!c)return ye();if(c.type==="Punctuator"){if(c.value==="]")return Y();if(c.value===")")return _=q.tokens[q.openParenToken-1],_&&_.type==="Keyword"&&(_.value==="if"||_.value==="while"||_.value==="for"||_.value==="with")?ye():Y();if(c.value==="}"){if(q.tokens[q.openCurlyToken-3]&&q.tokens[q.openCurlyToken-3].type==="Keyword"){if(_=q.tokens[q.openCurlyToken-4],!_)return Y()}else if(q.tokens[q.openCurlyToken-4]&&q.tokens[q.openCurlyToken-4].type==="Keyword"){if(_=q.tokens[q.openCurlyToken-5],!_)return ye()}else return Y();return u.indexOf(_.value)>=0?Y():ye()}return ye()}return c.type==="Keyword"?ye():Y()}function je(){var c;return C(),p>=w?{type:s.EOF,lineNumber:E,lineStart:S,start:p,end:p}:(c=m.charCodeAt(p),U(c)?se():c===40||c===41||c===59?Y():c===39||c===34?me():c===46?D(m.charCodeAt(p+1))?le():Y():D(c)?le():q.tokenize&&c===47?ze():Y())}function Be(){var c,_,I;return C(),c={start:{line:E,column:p-S}},_=je(),c.end={line:E,column:p-S},_.type!==s.EOF&&(I=m.slice(_.start,_.end),q.tokens.push({type:l[_.type],value:I,range:[_.start,_.end],loc:c})),_}function ie(){var c;return c=b,p=c.end,E=c.lineNumber,S=c.lineStart,b=typeof q.tokens<"u"?Be():je(),p=c.end,E=c.lineNumber,S=c.lineStart,c}function Ne(){var c,_,I;c=p,_=E,I=S,b=typeof q.tokens<"u"?Be():je(),p=c,E=_,S=I}function Oe(c,_){this.line=c,this.column=_}function Le(c,_,I,R){this.start=new Oe(c,_),this.end=new Oe(I,R)}y={name:"SyntaxTree",processComment:function(c){var _,I;if(!(c.type===o.Program&&c.body.length>0)){for(q.trailingComments.length>0?q.trailingComments[0].range[0]>=c.range[1]?(I=q.trailingComments,q.trailingComments=[]):q.trailingComments.length=0:q.bottomRightStack.length>0&&q.bottomRightStack[q.bottomRightStack.length-1].trailingComments&&q.bottomRightStack[q.bottomRightStack.length-1].trailingComments[0].range[0]>=c.range[1]&&(I=q.bottomRightStack[q.bottomRightStack.length-1].trailingComments,delete q.bottomRightStack[q.bottomRightStack.length-1].trailingComments);q.bottomRightStack.length>0&&q.bottomRightStack[q.bottomRightStack.length-1].range[0]>=c.range[0];)_=q.bottomRightStack.pop();_?_.leadingComments&&_.leadingComments[_.leadingComments.length-1].range[1]<=c.range[0]&&(c.leadingComments=_.leadingComments,delete _.leadingComments):q.leadingComments.length>0&&q.leadingComments[q.leadingComments.length-1].range[1]<=c.range[0]&&(c.leadingComments=q.leadingComments,q.leadingComments=[]),I&&(c.trailingComments=I),q.bottomRightStack.push(c)}},markEnd:function(c,_){return q.range&&(c.range=[_.start,p]),q.loc&&(c.loc=new Le(_.startLineNumber===void 0?_.lineNumber:_.startLineNumber,_.start-(_.startLineStart===void 0?_.lineStart:_.startLineStart),E,p-S),this.postProcess(c)),q.attachComment&&this.processComment(c),c},postProcess:function(c){return q.source&&(c.loc.source=q.source),c},createArrayExpression:function(c){return{type:o.ArrayExpression,elements:c}},createAssignmentExpression:function(c,_,I){return{type:o.AssignmentExpression,operator:c,left:_,right:I}},createBinaryExpression:function(c,_,I){var R=c==="||"||c==="&&"?o.LogicalExpression:o.BinaryExpression;return{type:R,operator:c,left:_,right:I}},createBlockStatement:function(c){return{type:o.BlockStatement,body:c}},createBreakStatement:function(c){return{type:o.BreakStatement,label:c}},createCallExpression:function(c,_){return{type:o.CallExpression,callee:c,arguments:_}},createCatchClause:function(c,_){return{type:o.CatchClause,param:c,body:_}},createConditionalExpression:function(c,_,I){return{type:o.ConditionalExpression,test:c,consequent:_,alternate:I}},createContinueStatement:function(c){return{type:o.ContinueStatement,label:c}},createDebuggerStatement:function(){return{type:o.DebuggerStatement}},createDoWhileStatement:function(c,_){return{type:o.DoWhileStatement,body:c,test:_}},createEmptyStatement:function(){return{type:o.EmptyStatement}},createExpressionStatement:function(c){return{type:o.ExpressionStatement,expression:c}},createForStatement:function(c,_,I,R){return{type:o.ForStatement,init:c,test:_,update:I,body:R}},createForInStatement:function(c,_,I){return{type:o.ForInStatement,left:c,right:_,body:I,each:!1}},createFunctionDeclaration:function(c,_,I,R){return{type:o.FunctionDeclaration,id:c,params:_,defaults:I,body:R,rest:null,generator:!1,expression:!1}},createFunctionExpression:function(c,_,I,R){return{type:o.FunctionExpression,id:c,params:_,defaults:I,body:R,rest:null,generator:!1,expression:!1}},createIdentifier:function(c){return{type:o.Identifier,name:c}},createIfStatement:function(c,_,I){return{type:o.IfStatement,test:c,consequent:_,alternate:I}},createLabeledStatement:function(c,_){return{type:o.LabeledStatement,label:c,body:_}},createLiteral:function(c){return{type:o.Literal,value:c.value,raw:m.slice(c.start,c.end)}},createMemberExpression:function(c,_,I){return{type:o.MemberExpression,computed:c==="[",object:_,property:I}},createNewExpression:function(c,_){return{type:o.NewExpression,callee:c,arguments:_}},createObjectExpression:function(c){return{type:o.ObjectExpression,properties:c}},createPostfixExpression:function(c,_){return{type:o.UpdateExpression,operator:c,argument:_,prefix:!1}},createProgram:function(c){return{type:o.Program,body:c}},createProperty:function(c,_,I){return{type:o.Property,key:_,value:I,kind:c}},createReturnStatement:function(c){return{type:o.ReturnStatement,argument:c}},createSequenceExpression:function(c){return{type:o.SequenceExpression,expressions:c}},createSwitchCase:function(c,_){return{type:o.SwitchCase,test:c,consequent:_}},createSwitchStatement:function(c,_){return{type:o.SwitchStatement,discriminant:c,cases:_}},createThisExpression:function(){return{type:o.ThisExpression}},createThrowStatement:function(c){return{type:o.ThrowStatement,argument:c}},createTryStatement:function(c,_,I,R){return{type:o.TryStatement,block:c,guardedHandlers:_,handlers:I,finalizer:R}},createUnaryExpression:function(c,_){return c==="++"||c==="--"?{type:o.UpdateExpression,operator:c,argument:_,prefix:!0}:{type:o.UnaryExpression,operator:c,argument:_,prefix:!0}},createVariableDeclaration:function(c,_){return{type:o.VariableDeclaration,declarations:c,kind:_}},createVariableDeclarator:function(c,_){return{type:o.VariableDeclarator,id:c,init:_}},createWhileStatement:function(c,_){return{type:o.WhileStatement,test:c,body:_}},createWithStatement:function(c,_){return{type:o.WithStatement,object:c,body:_}}};function Ie(){var c,_,I,R;return c=p,_=E,I=S,C(),R=E!==_,p=c,E=_,S=I,R}function ee(c,_){var I,R=Array.prototype.slice.call(arguments,2),T=_.replace(/%(\d)/g,function(L,oe){return x(oe<R.length,"Message reference must be in range"),R[oe]});throw typeof c.lineNumber=="number"?(I=new Error("Line "+c.lineNumber+": "+T),I.index=c.start,I.lineNumber=c.lineNumber,I.column=c.start-S+1):(I=new Error("Line "+E+": "+T),I.index=p,I.lineNumber=E,I.column=p-S+1),I.description=T,I}function ce(){try{ee.apply(null,arguments)}catch(c){if(q.errors)q.errors.push(c);else throw c}}function we(c){if(c.type===s.EOF&&ee(c,d.UnexpectedEOS),c.type===s.NumericLiteral&&ee(c,d.UnexpectedNumber),c.type===s.StringLiteral&&ee(c,d.UnexpectedString),c.type===s.Identifier&&ee(c,d.UnexpectedIdentifier),c.type===s.Keyword){if(z(c.value))ee(c,d.UnexpectedReserved);else if(v&&K(c.value)){ce(c,d.StrictReservedWord);return}ee(c,d.UnexpectedToken,c.value)}ee(c,d.UnexpectedToken,c.value)}function J(c){var _=ie();(_.type!==s.Punctuator||_.value!==c)&&we(_)}function X(c){var _=ie();(_.type!==s.Keyword||_.value!==c)&&we(_)}function N(c){return b.type===s.Punctuator&&b.value===c}function O(c){return b.type===s.Keyword&&b.value===c}function P(){var c;return b.type!==s.Punctuator?!1:(c=b.value,c==="="||c==="*="||c==="/="||c==="%="||c==="+="||c==="-="||c==="<<="||c===">>="||c===">>>="||c==="&="||c==="^="||c==="|=")}function G(){var c;if(m.charCodeAt(p)===59||N(";")){ie();return}c=E,C(),E===c&&b.type!==s.EOF&&!N("}")&&we(b)}function re(c){return c.type===o.Identifier||c.type===o.MemberExpression}function fe(){var c=[],_;for(_=b,J("[");!N("]");)N(",")?(ie(),c.push(null)):(c.push(Ae()),N("]")||J(","));return ie(),g.markEnd(g.createArrayExpression(c),_)}function ae(c,_){var I,R,T;return I=v,T=b,R=st(),_&&v&&W(c[0].name)&&ce(_,d.StrictParamName),v=I,g.markEnd(g.createFunctionExpression(null,c,[],R),T)}function qe(){var c,_;return _=b,c=ie(),c.type===s.StringLiteral||c.type===s.NumericLiteral?(v&&c.octal&&ce(c,d.StrictOctalLiteral),g.markEnd(g.createLiteral(c),_)):g.markEnd(g.createIdentifier(c.value),_)}function Me(){var c,_,I,R,T,L;if(c=b,L=b,c.type===s.Identifier)return I=qe(),c.value==="get"&&!N(":")?(_=qe(),J("("),J(")"),R=ae([]),g.markEnd(g.createProperty("get",_,R),L)):c.value==="set"&&!N(":")?(_=qe(),J("("),c=b,c.type!==s.Identifier?(J(")"),ce(c,d.UnexpectedToken,c.value),R=ae([])):(T=[Ce()],J(")"),R=ae(T,c)),g.markEnd(g.createProperty("set",_,R),L)):(J(":"),R=Ae(),g.markEnd(g.createProperty("init",I,R),L));if(c.type===s.EOF||c.type===s.Punctuator)we(c);else return _=qe(),J(":"),R=Ae(),g.markEnd(g.createProperty("init",_,R),L)}function Ee(){var c=[],_,I,R,T,L={},oe=String,de;for(de=b,J("{");!N("}");)_=Me(),_.key.type===o.Identifier?I=_.key.name:I=oe(_.key.value),T=_.kind==="init"?f.Data:_.kind==="get"?f.Get:f.Set,R="$"+I,Object.prototype.hasOwnProperty.call(L,R)?(L[R]===f.Data?v&&T===f.Data?ce({},d.StrictDuplicateProperty):T!==f.Data&&ce({},d.AccessorDataProperty):T===f.Data?ce({},d.AccessorDataProperty):L[R]&T&&ce({},d.AccessorGetSet),L[R]|=T):L[R]=T,c.push(_),N("}")||J(",");return J("}"),g.markEnd(g.createObjectExpression(c),de)}function Re(){var c;return J("("),c=he(),J(")"),c}function He(){var c,_,I,R;if(N("("))return Re();if(N("["))return fe();if(N("{"))return Ee();if(c=b.type,R=b,c===s.Identifier)I=g.createIdentifier(ie().value);else if(c===s.StringLiteral||c===s.NumericLiteral)v&&b.octal&&ce(b,d.StrictOctalLiteral),I=g.createLiteral(ie());else if(c===s.Keyword){if(O("function"))return qt();O("this")?(ie(),I=g.createThisExpression()):we(ie())}else c===s.BooleanLiteral?(_=ie(),_.value=_.value==="true",I=g.createLiteral(_)):c===s.NullLiteral?(_=ie(),_.value=null,I=g.createLiteral(_)):N("/")||N("/=")?(typeof q.tokens<"u"?I=g.createLiteral(ye()):I=g.createLiteral(Te()),Ne()):we(ie());return g.markEnd(I,R)}function $e(){var c=[];if(J("("),!N(")"))for(;p<w&&(c.push(Ae()),!N(")"));)J(",");return J(")"),c}function xe(){var c,_;return _=b,c=ie(),Fe(c)||we(c),g.markEnd(g.createIdentifier(c.value),_)}function Je(){return J("."),xe()}function Qe(){var c;return J("["),c=he(),J("]"),c}function Ye(){var c,_,I;return I=b,X("new"),c=Xe(),_=N("(")?$e():[],g.markEnd(g.createNewExpression(c,_),I)}function Ue(){var c,_,I,R,T;for(T=b,c=A.allowIn,A.allowIn=!0,_=O("new")?Ye():He(),A.allowIn=c;;){if(N("."))R=Je(),_=g.createMemberExpression(".",_,R);else if(N("("))I=$e(),_=g.createCallExpression(_,I);else if(N("["))R=Qe(),_=g.createMemberExpression("[",_,R);else break;g.markEnd(_,T)}return _}function Xe(){var c,_,I,R;for(R=b,c=A.allowIn,_=O("new")?Ye():He(),A.allowIn=c;N(".")||N("[");)N("[")?(I=Qe(),_=g.createMemberExpression("[",_,I)):(I=Je(),_=g.createMemberExpression(".",_,I)),g.markEnd(_,R);return _}function Ge(){var c,_,I=b;return c=Ue(),b.type===s.Punctuator&&(N("++")||N("--"))&&!Ie()&&(v&&c.type===o.Identifier&&W(c.name)&&ce({},d.StrictLHSPostfix),re(c)||ce({},d.InvalidLHSInAssignment),_=ie(),c=g.markEnd(g.createPostfixExpression(_.value,c),I)),c}function Pe(){var c,_,I;return b.type!==s.Punctuator&&b.type!==s.Keyword?_=Ge():N("++")||N("--")?(I=b,c=ie(),_=Pe(),v&&_.type===o.Identifier&&W(_.name)&&ce({},d.StrictLHSPrefix),re(_)||ce({},d.InvalidLHSInAssignment),_=g.createUnaryExpression(c.value,_),_=g.markEnd(_,I)):N("+")||N("-")||N("~")||N("!")?(I=b,c=ie(),_=Pe(),_=g.createUnaryExpression(c.value,_),_=g.markEnd(_,I)):O("delete")||O("void")||O("typeof")?(I=b,c=ie(),_=Pe(),_=g.createUnaryExpression(c.value,_),_=g.markEnd(_,I),v&&_.operator==="delete"&&_.argument.type===o.Identifier&&ce({},d.StrictDelete)):_=Ge(),_}function Ve(c,_){var I=0;if(c.type!==s.Punctuator&&c.type!==s.Keyword)return 0;switch(c.value){case"||":I=1;break;case"&&":I=2;break;case"|":I=3;break;case"^":I=4;break;case"&":I=5;break;case"==":case"!=":case"===":case"!==":I=6;break;case"<":case">":case"<=":case">=":case"instanceof":I=7;break;case"in":I=_?7:0;break;case"<<":case">>":case">>>":I=8;break;case"+":case"-":I=9;break;case"*":case"/":case"%":I=11;break}return I}function rt(){var c,_,I,R,T,L,oe,de,_e,ge;if(c=b,_e=Pe(),R=b,T=Ve(R,A.allowIn),T===0)return _e;for(R.prec=T,ie(),_=[c,b],oe=Pe(),L=[_e,R,oe];(T=Ve(b,A.allowIn))>0;){for(;L.length>2&&T<=L[L.length-2].prec;)oe=L.pop(),de=L.pop().value,_e=L.pop(),I=g.createBinaryExpression(de,_e,oe),_.pop(),c=_[_.length-1],g.markEnd(I,c),L.push(I);R=ie(),R.prec=T,L.push(R),_.push(b),I=Pe(),L.push(I)}for(ge=L.length-1,I=L[ge],_.pop();ge>1;)I=g.createBinaryExpression(L[ge-1].value,L[ge-2],I),ge-=2,c=_.pop(),g.markEnd(I,c);return I}function nt(){var c,_,I,R,T;return T=b,c=rt(),N("?")&&(ie(),_=A.allowIn,A.allowIn=!0,I=Ae(),A.allowIn=_,J(":"),R=Ae(),c=g.createConditionalExpression(c,I,R),g.markEnd(c,T)),c}function Ae(){var c,_,I,R,T;return c=b,T=b,R=_=nt(),P()&&(re(_)||ce({},d.InvalidLHSInAssignment),v&&_.type===o.Identifier&&W(_.name)&&ce(c,d.StrictLHSAssignment),c=ie(),I=Ae(),R=g.markEnd(g.createAssignmentExpression(c.value,_,I),T)),R}function he(){var c,_=b;if(c=Ae(),N(",")){for(c=g.createSequenceExpression([c]);p<w&&N(",");)ie(),c.expressions.push(Ae());g.markEnd(c,_)}return c}function Ze(){for(var c=[],_;p<w&&!(N("}")||(_=tt(),typeof _>"u"));)c.push(_);return c}function We(){var c,_;return _=b,J("{"),c=Ze(),J("}"),g.markEnd(g.createBlockStatement(c),_)}function Ce(){var c,_;return _=b,c=ie(),c.type!==s.Identifier&&we(c),g.markEnd(g.createIdentifier(c.value),_)}function et(c){var _=null,I,R;return R=b,I=Ce(),v&&W(I.name)&&ce({},d.StrictVarName),c==="const"?(J("="),_=Ae()):N("=")&&(ie(),_=Ae()),g.markEnd(g.createVariableDeclarator(I,_),R)}function ke(c){var _=[];do{if(_.push(et(c)),!N(","))break;ie()}while(p<w);return _}function Ke(){var c;return X("var"),c=ke(),G(),g.createVariableDeclaration(c,"var")}function at(c){var _,I;return I=b,X(c),_=ke(c),G(),g.markEnd(g.createVariableDeclaration(_,c),I)}function it(){return J(";"),g.createEmptyStatement()}function ct(){var c=he();return G(),g.createExpressionStatement(c)}function pt(){var c,_,I;return X("if"),J("("),c=he(),J(")"),_=De(),O("else")?(ie(),I=De()):I=null,g.createIfStatement(c,_,I)}function dt(){var c,_,I;return X("do"),I=A.inIteration,A.inIteration=!0,c=De(),A.inIteration=I,X("while"),J("("),_=he(),J(")"),N(";")&&ie(),g.createDoWhileStatement(c,_)}function ft(){var c,_,I;return X("while"),J("("),c=he(),J(")"),I=A.inIteration,A.inIteration=!0,_=De(),A.inIteration=I,g.createWhileStatement(c,_)}function ht(){var c,_,I;return I=b,c=ie(),_=ke(),g.markEnd(g.createVariableDeclaration(_,c.value),I)}function mt(){var c,_,I,R,T,L,oe;return c=_=I=null,X("for"),J("("),N(";")?ie():(O("var")||O("let")?(A.allowIn=!1,c=ht(),A.allowIn=!0,c.declarations.length===1&&O("in")&&(ie(),R=c,T=he(),c=null)):(A.allowIn=!1,c=he(),A.allowIn=!0,O("in")&&(re(c)||ce({},d.InvalidLHSInForIn),ie(),R=c,T=he(),c=null)),typeof R>"u"&&J(";")),typeof R>"u"&&(N(";")||(_=he()),J(";"),N(")")||(I=he())),J(")"),oe=A.inIteration,A.inIteration=!0,L=De(),A.inIteration=oe,typeof R>"u"?g.createForStatement(c,_,I,L):g.createForInStatement(R,T,L)}function yt(){var c=null,_;return X("continue"),m.charCodeAt(p)===59?(ie(),A.inIteration||ee({},d.IllegalContinue),g.createContinueStatement(null)):Ie()?(A.inIteration||ee({},d.IllegalContinue),g.createContinueStatement(null)):(b.type===s.Identifier&&(c=Ce(),_="$"+c.name,Object.prototype.hasOwnProperty.call(A.labelSet,_)||ee({},d.UnknownLabel,c.name)),G(),c===null&&!A.inIteration&&ee({},d.IllegalContinue),g.createContinueStatement(c))}function gt(){var c=null,_;return X("break"),m.charCodeAt(p)===59?(ie(),A.inIteration||A.inSwitch||ee({},d.IllegalBreak),g.createBreakStatement(null)):Ie()?(A.inIteration||A.inSwitch||ee({},d.IllegalBreak),g.createBreakStatement(null)):(b.type===s.Identifier&&(c=Ce(),_="$"+c.name,Object.prototype.hasOwnProperty.call(A.labelSet,_)||ee({},d.UnknownLabel,c.name)),G(),c===null&&!(A.inIteration||A.inSwitch)&&ee({},d.IllegalBreak),g.createBreakStatement(c))}function _t(){var c=null;return X("return"),A.inFunctionBody||ce({},d.IllegalReturn),m.charCodeAt(p)===32&&U(m.charCodeAt(p+1))?(c=he(),G(),g.createReturnStatement(c)):Ie()?g.createReturnStatement(null):(N(";")||!N("}")&&b.type!==s.EOF&&(c=he()),G(),g.createReturnStatement(c))}function vt(){var c,_;return v&&(C(),ce({},d.StrictModeWith)),X("with"),J("("),c=he(),J(")"),_=De(),g.createWithStatement(c,_)}function bt(){var c,_=[],I,R;for(R=b,O("default")?(ie(),c=null):(X("case"),c=he()),J(":");p<w&&!(N("}")||O("default")||O("case"));)I=De(),_.push(I);return g.markEnd(g.createSwitchCase(c,_),R)}function St(){var c,_,I,R,T;if(X("switch"),J("("),c=he(),J(")"),J("{"),_=[],N("}"))return ie(),g.createSwitchStatement(c,_);for(R=A.inSwitch,A.inSwitch=!0,T=!1;p<w&&!N("}");)I=bt(),I.test===null&&(T&&ee({},d.MultipleDefaultsInSwitch),T=!0),_.push(I);return A.inSwitch=R,J("}"),g.createSwitchStatement(c,_)}function wt(){var c;return X("throw"),Ie()&&ee({},d.NewlineAfterThrow),c=he(),G(),g.createThrowStatement(c)}function Et(){var c,_,I;return I=b,X("catch"),J("("),N(")")&&we(b),c=Ce(),v&&W(c.name)&&ce({},d.StrictCatchVariable),J(")"),_=We(),g.markEnd(g.createCatchClause(c,_),I)}function At(){var c,_=[],I=null;return X("try"),c=We(),O("catch")&&_.push(Et()),O("finally")&&(ie(),I=We()),_.length===0&&!I&&ee({},d.NoCatchOrFinally),g.createTryStatement(c,[],_,I)}function It(){return X("debugger"),G(),g.createDebuggerStatement()}function De(){var c=b.type,_,I,R,T;if(c===s.EOF&&we(b),c===s.Punctuator&&b.value==="{")return We();if(T=b,c===s.Punctuator)switch(b.value){case";":return g.markEnd(it(),T);case"(":return g.markEnd(ct(),T)}if(c===s.Keyword)switch(b.value){case"break":return g.markEnd(gt(),T);case"continue":return g.markEnd(yt(),T);case"debugger":return g.markEnd(It(),T);case"do":return g.markEnd(dt(),T);case"for":return g.markEnd(mt(),T);case"function":return g.markEnd(ut(),T);case"if":return g.markEnd(pt(),T);case"return":return g.markEnd(_t(),T);case"switch":return g.markEnd(St(),T);case"throw":return g.markEnd(wt(),T);case"try":return g.markEnd(At(),T);case"var":return g.markEnd(Ke(),T);case"while":return g.markEnd(ft(),T);case"with":return g.markEnd(vt(),T)}return _=he(),_.type===o.Identifier&&N(":")?(ie(),R="$"+_.name,Object.prototype.hasOwnProperty.call(A.labelSet,R)&&ee({},d.Redeclaration,"Label",_.name),A.labelSet[R]=!0,I=De(),delete A.labelSet[R],g.markEnd(g.createLabeledStatement(_,I),T)):(G(),g.markEnd(g.createExpressionStatement(_),T))}function st(){var c,_=[],I,R,T,L,oe,de,_e,ge;for(ge=b,J("{");p<w&&!(b.type!==s.StringLiteral||(I=b,c=tt(),_.push(c),c.expression.type!==o.Literal));)R=m.slice(I.start+1,I.end-1),R==="use strict"?(v=!0,T&&ce(T,d.StrictOctalLiteral)):!T&&I.octal&&(T=I);for(L=A.labelSet,oe=A.inIteration,de=A.inSwitch,_e=A.inFunctionBody,A.labelSet={},A.inIteration=!1,A.inSwitch=!1,A.inFunctionBody=!0;p<w&&!(N("}")||(c=tt(),typeof c>"u"));)_.push(c);return J("}"),A.labelSet=L,A.inIteration=oe,A.inSwitch=de,A.inFunctionBody=_e,g.markEnd(g.createBlockStatement(_),ge)}function ot(c){var _,I=[],R,T,L,oe,de;if(J("("),!N(")"))for(L={};p<w&&(R=b,_=Ce(),oe="$"+R.value,v?(W(R.value)&&(T=R,de=d.StrictParamName),Object.prototype.hasOwnProperty.call(L,oe)&&(T=R,de=d.StrictParamDupe)):c||(W(R.value)?(c=R,de=d.StrictParamName):K(R.value)?(c=R,de=d.StrictReservedWord):Object.prototype.hasOwnProperty.call(L,oe)&&(c=R,de=d.StrictParamDupe)),I.push(_),L[oe]=!0,!N(")"));)J(",");return J(")"),{params:I,stricted:T,firstRestricted:c,message:de}}function ut(){var c,_=[],I,R,T,L,oe,de,_e,ge;return ge=b,X("function"),R=b,c=Ce(),v?W(R.value)&&ce(R,d.StrictFunctionName):W(R.value)?(oe=R,de=d.StrictFunctionName):K(R.value)&&(oe=R,de=d.StrictReservedWord),L=ot(oe),_=L.params,T=L.stricted,oe=L.firstRestricted,L.message&&(de=L.message),_e=v,I=st(),v&&oe&&ee(oe,de),v&&T&&ce(T,de),v=_e,g.markEnd(g.createFunctionDeclaration(c,_,[],I),ge)}function qt(){var c,_=null,I,R,T,L,oe=[],de,_e,ge;return ge=b,X("function"),N("(")||(c=b,_=Ce(),v?W(c.value)&&ce(c,d.StrictFunctionName):W(c.value)?(R=c,T=d.StrictFunctionName):K(c.value)&&(R=c,T=d.StrictReservedWord)),L=ot(R),oe=L.params,I=L.stricted,R=L.firstRestricted,L.message&&(T=L.message),_e=v,de=st(),v&&R&&ee(R,T),v&&I&&ce(I,T),v=_e,g.markEnd(g.createFunctionExpression(_,oe,[],de),ge)}function tt(){if(b.type===s.Keyword)switch(b.value){case"const":case"let":return at(b.value);case"function":return ut();default:return De()}if(b.type!==s.EOF)return De()}function xt(){for(var c,_=[],I,R,T;p<w&&(I=b,!(I.type!==s.StringLiteral||(c=tt(),_.push(c),c.expression.type!==o.Literal)));)R=m.slice(I.start+1,I.end-1),R==="use strict"?(v=!0,T&&ce(T,d.StrictOctalLiteral)):!T&&I.octal&&(T=I);for(;p<w&&(c=tt(),!(typeof c>"u"));)_.push(c);return _}function Ot(){var c,_;return C(),Ne(),_=b,v=!1,c=xt(),g.markEnd(g.createProgram(c),_)}function lt(){var c,_,I,R=[];for(c=0;c<q.tokens.length;++c)_=q.tokens[c],I={type:_.type,value:_.value},q.range&&(I.range=_.range),q.loc&&(I.loc=_.loc),R.push(I);q.tokens=R}function Rt(c,_){var I,R,T;I=String,typeof c!="string"&&!(c instanceof String)&&(c=I(c)),g=y,m=c,p=0,E=m.length>0?1:0,S=0,w=m.length,b=null,A={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},q={},_=_||{},_.tokens=!0,q.tokens=[],q.tokenize=!0,q.openParenToken=-1,q.openCurlyToken=-1,q.range=typeof _.range=="boolean"&&_.range,q.loc=typeof _.loc=="boolean"&&_.loc,typeof _.comment=="boolean"&&_.comment&&(q.comments=[]),typeof _.tolerant=="boolean"&&_.tolerant&&(q.errors=[]);try{if(Ne(),b.type===s.EOF)return q.tokens;for(R=ie();b.type!==s.EOF;)try{R=ie()}catch(L){if(R=b,q.errors){q.errors.push(L);break}else throw L}lt(),T=q.tokens,typeof q.comments<"u"&&(T.comments=q.comments),typeof q.errors<"u"&&(T.errors=q.errors)}catch(L){throw L}finally{q={}}return T}function Pt(c,_){var I,R;R=String,typeof c!="string"&&!(c instanceof String)&&(c=R(c)),g=y,m=c,p=0,E=m.length>0?1:0,S=0,w=m.length,b=null,A={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},q={},typeof _<"u"&&(q.range=typeof _.range=="boolean"&&_.range,q.loc=typeof _.loc=="boolean"&&_.loc,q.attachComment=typeof _.attachComment=="boolean"&&_.attachComment,q.loc&&_.source!==null&&_.source!==void 0&&(q.source=R(_.source)),typeof _.tokens=="boolean"&&_.tokens&&(q.tokens=[]),typeof _.comment=="boolean"&&_.comment&&(q.comments=[]),typeof _.tolerant=="boolean"&&_.tolerant&&(q.errors=[]),q.attachComment&&(q.range=!0,q.comments=[],q.bottomRightStack=[],q.trailingComments=[],q.leadingComments=[]));try{I=Ot(),typeof q.comments<"u"&&(I.comments=q.comments),typeof q.tokens<"u"&&(lt(),I.tokens=q.tokens),typeof q.errors<"u"&&(I.errors=q.errors)}catch(T){throw T}finally{q={}}return I}a.version="1.2.2",a.tokenize=Rt,a.parse=Pt,a.Syntax=function(){var c,_={};typeof Object.create=="function"&&(_=Object.create(null));for(c in o)o.hasOwnProperty(c)&&(_[c]=o[c]);return typeof Object.freeze=="function"&&Object.freeze(_),_}()})},{}],1:[function(t,r,i){(function(a){var s=function(){var l={trace:function(){},yy:{},symbols_:{error:2,JSON_PATH:3,DOLLAR:4,PATH_COMPONENTS:5,LEADING_CHILD_MEMBER_EXPRESSION:6,PATH_COMPONENT:7,MEMBER_COMPONENT:8,SUBSCRIPT_COMPONENT:9,CHILD_MEMBER_COMPONENT:10,DESCENDANT_MEMBER_COMPONENT:11,DOT:12,MEMBER_EXPRESSION:13,DOT_DOT:14,STAR:15,IDENTIFIER:16,SCRIPT_EXPRESSION:17,INTEGER:18,END:19,CHILD_SUBSCRIPT_COMPONENT:20,DESCENDANT_SUBSCRIPT_COMPONENT:21,"[":22,SUBSCRIPT:23,"]":24,SUBSCRIPT_EXPRESSION:25,SUBSCRIPT_EXPRESSION_LIST:26,SUBSCRIPT_EXPRESSION_LISTABLE:27,",":28,STRING_LITERAL:29,ARRAY_SLICE:30,FILTER_EXPRESSION:31,QQ_STRING:32,Q_STRING:33,$accept:0,$end:1},terminals_:{2:"error",4:"DOLLAR",12:"DOT",14:"DOT_DOT",15:"STAR",16:"IDENTIFIER",17:"SCRIPT_EXPRESSION",18:"INTEGER",19:"END",22:"[",24:"]",28:",",30:"ARRAY_SLICE",31:"FILTER_EXPRESSION",32:"QQ_STRING",33:"Q_STRING"},productions_:[0,[3,1],[3,2],[3,1],[3,2],[5,1],[5,2],[7,1],[7,1],[8,1],[8,1],[10,2],[6,1],[11,2],[13,1],[13,1],[13,1],[13,1],[13,1],[9,1],[9,1],[20,3],[21,4],[23,1],[23,1],[26,1],[26,3],[27,1],[27,1],[27,1],[25,1],[25,1],[25,1],[29,1],[29,1]],performAction:function(h,y,m,v,p,E,S){v.ast||(v.ast=u,u.initialize());var w=E.length-1;switch(p){case 1:return v.ast.set({expression:{type:"root",value:E[w]}}),v.ast.unshift(),v.ast.yield();case 2:return v.ast.set({expression:{type:"root",value:E[w-1]}}),v.ast.unshift(),v.ast.yield();case 3:return v.ast.unshift(),v.ast.yield();case 4:return v.ast.set({operation:"member",scope:"child",expression:{type:"identifier",value:E[w-1]}}),v.ast.unshift(),v.ast.yield();case 5:break;case 6:break;case 7:v.ast.set({operation:"member"}),v.ast.push();break;case 8:v.ast.set({operation:"subscript"}),v.ast.push();break;case 9:v.ast.set({scope:"child"});break;case 10:v.ast.set({scope:"descendant"});break;case 11:break;case 12:v.ast.set({scope:"child",operation:"member"});break;case 13:break;case 14:v.ast.set({expression:{type:"wildcard",value:E[w]}});break;case 15:v.ast.set({expression:{type:"identifier",value:E[w]}});break;case 16:v.ast.set({expression:{type:"script_expression",value:E[w]}});break;case 17:v.ast.set({expression:{type:"numeric_literal",value:parseInt(E[w])}});break;case 18:break;case 19:v.ast.set({scope:"child"});break;case 20:v.ast.set({scope:"descendant"});break;case 21:break;case 22:break;case 23:break;case 24:E[w].length>1?v.ast.set({expression:{type:"union",value:E[w]}}):this.$=E[w];break;case 25:this.$=[E[w]];break;case 26:this.$=E[w-2].concat(E[w]);break;case 27:this.$={expression:{type:"numeric_literal",value:parseInt(E[w])}},v.ast.set(this.$);break;case 28:this.$={expression:{type:"string_literal",value:E[w]}},v.ast.set(this.$);break;case 29:this.$={expression:{type:"slice",value:E[w]}},v.ast.set(this.$);break;case 30:this.$={expression:{type:"wildcard",value:E[w]}},v.ast.set(this.$);break;case 31:this.$={expression:{type:"script_expression",value:E[w]}},v.ast.set(this.$);break;case 32:this.$={expression:{type:"filter_expression",value:E[w]}},v.ast.set(this.$);break;case 33:this.$=E[w];break;case 34:this.$=E[w];break}},table:[{3:1,4:[1,2],6:3,13:4,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9]},{1:[3]},{1:[2,1],5:10,7:11,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,3],5:21,7:11,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,12],12:[2,12],14:[2,12],22:[2,12]},{1:[2,14],12:[2,14],14:[2,14],22:[2,14]},{1:[2,15],12:[2,15],14:[2,15],22:[2,15]},{1:[2,16],12:[2,16],14:[2,16],22:[2,16]},{1:[2,17],12:[2,17],14:[2,17],22:[2,17]},{1:[2,18],12:[2,18],14:[2,18],22:[2,18]},{1:[2,2],7:22,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,5],12:[2,5],14:[2,5],22:[2,5]},{1:[2,7],12:[2,7],14:[2,7],22:[2,7]},{1:[2,8],12:[2,8],14:[2,8],22:[2,8]},{1:[2,9],12:[2,9],14:[2,9],22:[2,9]},{1:[2,10],12:[2,10],14:[2,10],22:[2,10]},{1:[2,19],12:[2,19],14:[2,19],22:[2,19]},{1:[2,20],12:[2,20],14:[2,20],22:[2,20]},{13:23,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9]},{13:24,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9],22:[1,25]},{15:[1,29],17:[1,30],18:[1,33],23:26,25:27,26:28,27:32,29:34,30:[1,35],31:[1,31],32:[1,36],33:[1,37]},{1:[2,4],7:22,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,6],12:[2,6],14:[2,6],22:[2,6]},{1:[2,11],12:[2,11],14:[2,11],22:[2,11]},{1:[2,13],12:[2,13],14:[2,13],22:[2,13]},{15:[1,29],17:[1,30],18:[1,33],23:38,25:27,26:28,27:32,29:34,30:[1,35],31:[1,31],32:[1,36],33:[1,37]},{24:[1,39]},{24:[2,23]},{24:[2,24],28:[1,40]},{24:[2,30]},{24:[2,31]},{24:[2,32]},{24:[2,25],28:[2,25]},{24:[2,27],28:[2,27]},{24:[2,28],28:[2,28]},{24:[2,29],28:[2,29]},{24:[2,33],28:[2,33]},{24:[2,34],28:[2,34]},{24:[1,41]},{1:[2,21],12:[2,21],14:[2,21],22:[2,21]},{18:[1,33],27:42,29:34,30:[1,35],32:[1,36],33:[1,37]},{1:[2,22],12:[2,22],14:[2,22],22:[2,22]},{24:[2,26],28:[2,26]}],defaultActions:{27:[2,23],29:[2,30],30:[2,31],31:[2,32]},parseError:function(h,y){if(y.recoverable)this.trace(h);else throw new Error(h)},parse:function(h){var y=this,m=[0],v=[null],p=[],E=this.table,S="",w=0,g=0,b=2,A=1,q=p.slice.call(arguments,1);this.lexer.setInput(h),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var x=this.lexer.yylloc;p.push(x);var D=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"?this.parseError=this.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function j(){var V;return V=y.lexer.lex()||A,typeof V!="number"&&(V=y.symbols_[V]||V),V}for(var F,M,B,U,H={},z,K,W,te;;){if(M=m[m.length-1],this.defaultActions[M]?B=this.defaultActions[M]:((F===null||typeof F>"u")&&(F=j()),B=E[M]&&E[M][F]),typeof B>"u"||!B.length||!B[0]){var Z="";te=[];for(z in E[M])this.terminals_[z]&&z>b&&te.push("'"+this.terminals_[z]+"'");this.lexer.showPosition?Z="Parse error on line "+(w+1)+`:
|
|
10
10
|
`+this.lexer.showPosition()+`
|
|
11
|
-
Expecting `+te.join(", ")+", got '"+(this.terminals_[F]||F)+"'":Z="Parse error on line "+(w+1)+": Unexpected "+(F==A?"end of input":"'"+(this.terminals_[F]||F)+"'"),this.parseError(Z,{text:this.lexer.match,token:this.terminals_[F]||F,line:this.lexer.yylineno,loc:x,expected:te})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+
|
|
11
|
+
Expecting `+te.join(", ")+", got '"+(this.terminals_[F]||F)+"'":Z="Parse error on line "+(w+1)+": Unexpected "+(F==A?"end of input":"'"+(this.terminals_[F]||F)+"'"),this.parseError(Z,{text:this.lexer.match,token:this.terminals_[F]||F,line:this.lexer.yylineno,loc:x,expected:te})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+M+", token: "+F);switch(B[0]){case 1:m.push(F),v.push(this.lexer.yytext),p.push(this.lexer.yylloc),m.push(B[1]),F=null,g=this.lexer.yyleng,S=this.lexer.yytext,w=this.lexer.yylineno,x=this.lexer.yylloc;break;case 2:if(K=this.productions_[B[1]][1],H.$=v[v.length-K],H._$={first_line:p[p.length-(K||1)].first_line,last_line:p[p.length-1].last_line,first_column:p[p.length-(K||1)].first_column,last_column:p[p.length-1].last_column},D&&(H._$.range=[p[p.length-(K||1)].range[0],p[p.length-1].range[1]]),U=this.performAction.apply(H,[S,g,w,this.yy,B[1],v,p].concat(q)),typeof U<"u")return U;K&&(m=m.slice(0,-1*K*2),v=v.slice(0,-1*K),p=p.slice(0,-1*K)),m.push(this.productions_[B[1]][0]),v.push(H.$),p.push(H._$),W=E[m[m.length-2]][m[m.length-1]],m.push(W);break;case 3:return!0}}return!0}},u={initialize:function(){this._nodes=[],this._node={},this._stash=[]},set:function(d){for(var h in d)this._node[h]=d[h];return this._node},node:function(d){return arguments.length&&(this._node=d),this._node},push:function(){this._nodes.push(this._node),this._node={}},unshift:function(){this._nodes.unshift(this._node),this._node={}},yield:function(){var d=this._nodes;return this.initialize(),d}},o=function(){var d={EOF:1,parseError:function(y,m){if(this.yy.parser)this.yy.parser.parseError(y,m);else throw new Error(y)},setInput:function(h){return this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var y=h.match(/(?:\r\n?|\n).*/g);return y?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},unput:function(h){var y=h.length,m=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-y-1),this.offset-=y;var v=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),m.length-1&&(this.yylineno-=m.length-1);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:m?(m.length===v.length?this.yylloc.first_column:0)+v[v.length-m.length].length-m[0].length:this.yylloc.first_column-y},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-y]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
12
12
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(h){this.unput(this.match.slice(h))},pastInput:function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var h=this.pastInput(),y=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
|
|
13
13
|
`+y+"^"},test_match:function(h,y){var m,v,p;if(this.options.backtrack_lexer&&(p={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(p.yylloc.range=this.yylloc.range.slice(0))),v=h[0].match(/(?:\r\n?|\n).*/g),v&&(this.yylineno+=v.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:v?v[v.length-1].length-v[v.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(h[0].length),this.matched+=h[0],m=this.performAction.call(this,this.yy,this,y,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),m)return m;if(this._backtrack){for(var E in p)this[E]=p[E];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var h,y,m,v;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),E=0;E<p.length;E++)if(m=this._input.match(this.rules[p[E]]),m&&(!y||m[0].length>y[0].length)){if(y=m,v=E,this.options.backtrack_lexer){if(h=this.test_match(m,p[E]),h!==!1)return h;if(this._backtrack){y=!1;continue}else return!1}else if(!this.options.flex)break}return y?(h=this.test_match(y,p[v]),h!==!1?h:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
14
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var y=this.next();return y||this.lex()},begin:function(y){this.conditionStack.push(y)},popState:function(){var y=this.conditionStack.length-1;return y>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(y){return y=this.conditionStack.length-1-Math.abs(y||0),y>=0?this.conditionStack[y]:"INITIAL"},pushState:function(y){this.begin(y)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(y,m,v,p){switch(v){case 0:return 4;case 1:return 14;case 2:return 12;case 3:return 15;case 4:return 16;case 5:return 22;case 6:return 24;case 7:return 28;case 8:return 30;case 9:return 18;case 10:return m.yytext=m.yytext.substr(1,m.yyleng-2),32;case 11:return m.yytext=m.yytext.substr(1,m.yyleng-2),33;case 12:return 17;case 13:return 31}},rules:[/^(?:\$)/,/^(?:\.\.)/,/^(?:\.)/,/^(?:\*)/,/^(?:[a-zA-Z_]+[a-zA-Z0-9_]*)/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?:((-?(?:0|[1-9][0-9]*)))?\:((-?(?:0|[1-9][0-9]*)))?(\:((-?(?:0|[1-9][0-9]*)))?)?)/,/^(?:(-?(?:0|[1-9][0-9]*)))/,/^(?:"(?:\\["bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^"\\])*")/,/^(?:'(?:\\['bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^'\\])*')/,/^(?:\(.+?\)(?=\]))/,/^(?:\?\(.+?\)(?=\]))/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return d}();l.lexer=o;function f(){this.yy={}}return f.prototype=l,l.Parser=f,new f}();typeof t<"u"&&typeof i<"u"&&(i.parser=s,i.Parser=s.Parser,i.parse=function(){return s.parse.apply(s,arguments)},i.main=function(u){u[1]||(console.log("Usage: "+u[0]+" FILE"),a.exit(1));var o=t("fs").readFileSync(t("path").normalize(u[1]),"utf8");return i.parser.parse(o)},typeof r<"u"&&t.main===r&&i.main(a.argv.slice(1)))}).call(this,t("_process"))},{_process:14,fs:12,path:13}],2:[function(t,r,i){r.exports={identifier:"[a-zA-Z_]+[a-zA-Z0-9_]*",integer:"-?(?:0|[1-9][0-9]*)",qq_string:'"(?:\\\\["bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^"\\\\])*"',q_string:"'(?:\\\\['bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^'\\\\])*'"}},{}],3:[function(t,r,i){var a=t("./dict"),s=t("fs"),l={lex:{macros:{esc:"\\\\",int:a.integer},rules:[["\\$","return 'DOLLAR'"],["\\.\\.","return 'DOT_DOT'"],["\\.","return 'DOT'"],["\\*","return 'STAR'"],[a.identifier,"return 'IDENTIFIER'"],["\\[","return '['"],["\\]","return ']'"],[",","return ','"],["({int})?\\:({int})?(\\:({int})?)?","return 'ARRAY_SLICE'"],["{int}","return 'INTEGER'"],[a.qq_string,"yytext = yytext.substr(1,yyleng-2); return 'QQ_STRING';"],[a.q_string,"yytext = yytext.substr(1,yyleng-2); return 'Q_STRING';"],["\\(.+?\\)(?=\\])","return 'SCRIPT_EXPRESSION'"],["\\?\\(.+?\\)(?=\\])","return 'FILTER_EXPRESSION'"]]},start:"JSON_PATH",bnf:{JSON_PATH:[["DOLLAR",'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()'],["DOLLAR PATH_COMPONENTS",'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()'],["LEADING_CHILD_MEMBER_EXPRESSION","yy.ast.unshift(); return yy.ast.yield()"],["LEADING_CHILD_MEMBER_EXPRESSION PATH_COMPONENTS",'yy.ast.set({ operation: "member", scope: "child", expression: { type: "identifier", value: $1 }}); yy.ast.unshift(); return yy.ast.yield()']],PATH_COMPONENTS:[["PATH_COMPONENT",""],["PATH_COMPONENTS PATH_COMPONENT",""]],PATH_COMPONENT:[["MEMBER_COMPONENT",'yy.ast.set({ operation: "member" }); yy.ast.push()'],["SUBSCRIPT_COMPONENT",'yy.ast.set({ operation: "subscript" }); yy.ast.push() ']],MEMBER_COMPONENT:[["CHILD_MEMBER_COMPONENT",'yy.ast.set({ scope: "child" })'],["DESCENDANT_MEMBER_COMPONENT",'yy.ast.set({ scope: "descendant" })']],CHILD_MEMBER_COMPONENT:[["DOT MEMBER_EXPRESSION",""]],LEADING_CHILD_MEMBER_EXPRESSION:[["MEMBER_EXPRESSION",'yy.ast.set({ scope: "child", operation: "member" })']],DESCENDANT_MEMBER_COMPONENT:[["DOT_DOT MEMBER_EXPRESSION",""]],MEMBER_EXPRESSION:[["STAR",'yy.ast.set({ expression: { type: "wildcard", value: $1 } })'],["IDENTIFIER",'yy.ast.set({ expression: { type: "identifier", value: $1 } })'],["SCRIPT_EXPRESSION",'yy.ast.set({ expression: { type: "script_expression", value: $1 } })'],["INTEGER",'yy.ast.set({ expression: { type: "numeric_literal", value: parseInt($1) } })'],["END",""]],SUBSCRIPT_COMPONENT:[["CHILD_SUBSCRIPT_COMPONENT",'yy.ast.set({ scope: "child" })'],["DESCENDANT_SUBSCRIPT_COMPONENT",'yy.ast.set({ scope: "descendant" })']],CHILD_SUBSCRIPT_COMPONENT:[["[ SUBSCRIPT ]",""]],DESCENDANT_SUBSCRIPT_COMPONENT:[["DOT_DOT [ SUBSCRIPT ]",""]],SUBSCRIPT:[["SUBSCRIPT_EXPRESSION",""],["SUBSCRIPT_EXPRESSION_LIST",'$1.length > 1? yy.ast.set({ expression: { type: "union", value: $1 } }) : $$ = $1']],SUBSCRIPT_EXPRESSION_LIST:[["SUBSCRIPT_EXPRESSION_LISTABLE","$$ = [$1]"],["SUBSCRIPT_EXPRESSION_LIST , SUBSCRIPT_EXPRESSION_LISTABLE","$$ = $1.concat($3)"]],SUBSCRIPT_EXPRESSION_LISTABLE:[["INTEGER",'$$ = { expression: { type: "numeric_literal", value: parseInt($1) } }; yy.ast.set($$)'],["STRING_LITERAL",'$$ = { expression: { type: "string_literal", value: $1 } }; yy.ast.set($$)'],["ARRAY_SLICE",'$$ = { expression: { type: "slice", value: $1 } }; yy.ast.set($$)']],SUBSCRIPT_EXPRESSION:[["STAR",'$$ = { expression: { type: "wildcard", value: $1 } }; yy.ast.set($$)'],["SCRIPT_EXPRESSION",'$$ = { expression: { type: "script_expression", value: $1 } }; yy.ast.set($$)'],["FILTER_EXPRESSION",'$$ = { expression: { type: "filter_expression", value: $1 } }; yy.ast.set($$)']],STRING_LITERAL:[["QQ_STRING","$$ = $1"],["Q_STRING","$$ = $1"]]}};s.readFileSync&&(l.moduleInclude=s.readFileSync(t.resolve("../include/module.js")),l.actionInclude=s.readFileSync(t.resolve("../include/action.js"))),r.exports=l},{"./dict":2,fs:12}],4:[function(t,r,i){var a=t("./aesprim"),s=t("./slice"),l=t("static-eval"),u=t("underscore").uniq,o=function(){return this.initialize.apply(this,arguments)};o.prototype.initialize=function(){this.traverse=y(!0),this.descend=y()},o.prototype.keys=Object.keys,o.prototype.resolve=function(w){var g=[w.operation,w.scope,w.expression.type].join("-"),b=this._fns[g];if(!b)throw new Error("couldn't resolve key: "+g);return b.bind(this)},o.prototype.register=function(w,g){if(!g instanceof Function)throw new Error("handler must be a function");this._fns[w]=g},o.prototype._fns={"member-child-identifier":function(w,g){var b=w.expression.value,A=g.value;if(A instanceof Object&&b in A)return[{value:A[b],path:g.path.concat(b)}]},"member-descendant-identifier":v(function(w,g,b){return w==b}),"subscript-child-numeric_literal":m(function(w,g,b){return w===b}),"member-child-numeric_literal":m(function(w,g,b){return String(w)===String(b)}),"subscript-descendant-numeric_literal":v(function(w,g,b){return w===b}),"member-child-wildcard":m(function(){return!0}),"member-descendant-wildcard":v(function(){return!0}),"subscript-descendant-wildcard":v(function(){return!0}),"subscript-child-wildcard":m(function(){return!0}),"subscript-child-slice":function(w,g){if(d(g.value)){var b=w.expression.value.split(":").map(S),A=g.value.map(function(q,x){return{value:q,path:g.path.concat(x)}});return s.apply(null,[A].concat(b))}},"subscript-child-union":function(w,g){var b=[];return w.expression.value.forEach(function(A){var q={operation:"subscript",scope:"child",expression:A.expression},x=this.resolve(q),D=x(q,g);D&&(b=b.concat(D))},this),E(b)},"subscript-descendant-union":function(w,g,b){var A=t(".."),q=this,x=[],D=A.nodes(g,"$..*").slice(1);return D.forEach(function(j){x.length>=b||w.expression.value.forEach(function(F){var N={operation:"subscript",scope:"child",expression:F.expression},B=q.resolve(N),U=B(N,j);x=x.concat(U)})}),E(x)},"subscript-child-filter_expression":function(w,g,b){var A=w.expression.value.slice(2,-1),q=a.parse(A).body[0].expression,x=function(D,j){return p(q,{"@":j})};return this.descend(g,null,x,b)},"subscript-descendant-filter_expression":function(w,g,b){var A=w.expression.value.slice(2,-1),q=a.parse(A).body[0].expression,x=function(D,j){return p(q,{"@":j})};return this.traverse(g,null,x,b)},"subscript-child-script_expression":function(w,g){var b=w.expression.value.slice(1,-1);return f(g,b,"$[{{value}}]")},"member-child-script_expression":function(w,g){var b=w.expression.value.slice(1,-1);return f(g,b,"$.{{value}}")},"member-descendant-script_expression":function(w,g){var b=w.expression.value.slice(1,-1);return f(g,b,"$..value")}},o.prototype._fns["subscript-child-string_literal"]=o.prototype._fns["member-child-identifier"],o.prototype._fns["member-descendant-numeric_literal"]=o.prototype._fns["subscript-descendant-string_literal"]=o.prototype._fns["member-descendant-identifier"];function f(w,g,b){var A=t("./index"),q=a.parse(g).body[0].expression,x=p(q,{"@":w.value}),D=b.replace(/\{\{\s*value\s*\}\}/g,x),j=A.nodes(w.value,D);return j.forEach(function(F){F.path=w.path.concat(F.path.slice(1))}),j}function d(w){return Array.isArray(w)}function h(w){return w&&!(w instanceof Array)&&w instanceof Object}function y(w){return function(g,b,A,q){var x=g.value,D=g.path,j=[],F=(function(N,B){d(N)?(N.forEach(function(U,H){j.length>=q||A(H,U,b)&&j.push({path:B.concat(H),value:U})}),N.forEach(function(U,H){j.length>=q||w&&F(U,B.concat(H))})):h(N)&&(this.keys(N).forEach(function(U){j.length>=q||A(U,N[U],b)&&j.push({path:B.concat(U),value:N[U]})}),this.keys(N).forEach(function(U){j.length>=q||w&&F(N[U],B.concat(U))}))}).bind(this);return F(x,D),j}}function m(w){return function(g,b,A){return this.descend(b,g.expression.value,w,A)}}function v(w){return function(g,b,A){return this.traverse(b,g.expression.value,w,A)}}function p(){try{return l.apply(this,arguments)}catch{}}function E(w){return w=w.filter(function(g){return g}),u(w,function(g){return g.path.map(function(b){return String(b).replace("-","--")}).join("-")})}function S(w){var g=String(w);return g.match(/^-?[0-9]+$/)?parseInt(g):null}r.exports=o},{"..":"jsonpath","./aesprim":"./aesprim","./index":5,"./slice":7,"static-eval":15,underscore:12}],5:[function(t,r,i){var a=t("assert"),s=t("./dict"),l=t("./parser"),u=t("./handlers"),o=function(){this.initialize.apply(this,arguments)};o.prototype.initialize=function(){this.parser=new l,this.handlers=new u},o.prototype.parse=function(h){return a.ok(f(h),"we need a path"),this.parser.parse(h)},o.prototype.parent=function(h,y){a.ok(h instanceof Object,"obj needs to be an object"),a.ok(y,"we need a path");var m=this.nodes(h,y)[0];return m.path.pop(),this.value(h,m.path)},o.prototype.apply=function(h,y,m){a.ok(h instanceof Object,"obj needs to be an object"),a.ok(y,"we need a path"),a.equal(typeof m,"function","fn needs to be function");var v=this.nodes(h,y).sort(function(p,E){return E.path.length-p.path.length});return v.forEach(function(p){var E=p.path.pop(),S=this.value(h,this.stringify(p.path)),w=p.value=m.call(h,S[E]);S[E]=w},this),v},o.prototype.value=function(h,y,m){if(a.ok(h instanceof Object,"obj needs to be an object"),a.ok(y,"we need a path"),arguments.length>=3){var v=this.nodes(h,y).shift();if(!v)return this._vivify(h,y,m);var p=v.path.slice(-1).shift(),E=this.parent(h,this.stringify(v.path));E[p]=m}return this.query(h,this.stringify(y),1).shift()},o.prototype._vivify=function(h,y,m){var v=this;a.ok(h instanceof Object,"obj needs to be an object"),a.ok(y,"we need a path");var p=this.parser.parse(y).map(function(S){return S.expression.value}),E=function(S,w){var g=S.pop(),b=v.value(h,S);b||(E(S.concat(),typeof g=="string"?{}:[]),b=v.value(h,S)),b[g]=w};return E(p,m),this.query(h,y)[0]},o.prototype.query=function(h,y,m){a.ok(h instanceof Object,"obj needs to be an object"),a.ok(f(y),"we need a path");var v=this.nodes(h,y,m).map(function(p){return p.value});return v},o.prototype.paths=function(h,y,m){a.ok(h instanceof Object,"obj needs to be an object"),a.ok(y,"we need a path");var v=this.nodes(h,y,m).map(function(p){return p.path});return v},o.prototype.nodes=function(h,y,m){if(a.ok(h instanceof Object,"obj needs to be an object"),a.ok(y,"we need a path"),m===0)return[];var v=this.parser.parse(y),p=this.handlers,E=[{path:["$"],value:h}],S=[];return v.length&&v[0].expression.type=="root"&&v.shift(),v.length?(v.forEach(function(w,g){if(!(S.length>=m)){var b=p.resolve(w),A=[];E.forEach(function(q){if(!(S.length>=m)){var x=b(w,q,m);g==v.length-1?S=S.concat(x||[]):A=A.concat(x||[])}}),E=A}}),m?S.slice(0,m):S):E},o.prototype.stringify=function(h){a.ok(h,"we need a path");var y="$",m={"descendant-member":"..{{value}}","child-member":".{{value}}","descendant-subscript":"..[{{value}}]","child-subscript":"[{{value}}]"};return h=this._normalize(h),h.forEach(function(v){if(v.expression.type!="root"){var p=[v.scope,v.operation].join("-"),E=m[p],S;if(v.expression.type=="string_literal"?S=JSON.stringify(v.expression.value):S=v.expression.value,!E)throw new Error("couldn't find template "+p);y+=E.replace(/{{value}}/,S)}}),y},o.prototype._normalize=function(h){if(a.ok(h,"we need a path"),typeof h=="string")return this.parser.parse(h);if(Array.isArray(h)&&typeof h[0]=="string"){var y=[{expression:{type:"root",value:"$"}}];return h.forEach(function(m,v){if(!(m=="$"&&v===0))if(typeof m=="string"&&m.match("^"+s.identifier+"$"))y.push({operation:"member",scope:"child",expression:{value:m,type:"identifier"}});else{var p=typeof m=="number"?"numeric_literal":"string_literal";y.push({operation:"subscript",scope:"child",expression:{value:m,type:p}})}}),y}else if(Array.isArray(h)&&typeof h[0]=="object")return h;throw new Error("couldn't understand path "+h)};function f(h){return Object.prototype.toString.call(h)=="[object String]"}o.Handlers=u,o.Parser=l;var d=new o;d.JSONPath=o,r.exports=d},{"./dict":2,"./handlers":4,"./parser":6,assert:8}],6:[function(t,r,i){var a=t("./grammar"),s=t("../generated/parser"),l=function(){var u=new s.Parser,o=u.parseError;return u.yy.parseError=function(){u.yy.ast&&u.yy.ast.initialize(),o.apply(u,arguments)},u};l.grammar=a,r.exports=l},{"../generated/parser":1,"./grammar":3}],7:[function(t,r,i){r.exports=function(s,l,u,o){if(typeof l=="string")throw new Error("start cannot be a string");if(typeof u=="string")throw new Error("end cannot be a string");if(typeof o=="string")throw new Error("step cannot be a string");var f=s.length;if(o===0)throw new Error("step cannot be zero");if(o=o?a(o):1,l=l<0?f+l:l,u=u<0?f+u:u,l=a(l===0?0:l||(o>0?0:f-1)),u=a(u===0?0:u||(o>0?f:-1)),l=o>0?Math.max(0,l):Math.min(f,l),u=o>0?Math.min(u,f):Math.max(-1,u),o>0&&u<=l)return[];if(o<0&&l<=u)return[];for(var d=[],h=l;h!=u&&!(o<0&&h<=u||o>0&&h>=u);h+=o)d.push(s[h]);return d};function a(s){return String(s).match(/^[0-9]+$/)?parseInt(s):Number.isFinite(s)?parseInt(s,10):0}},{}],8:[function(t,r,i){var a=t("util/"),s=Array.prototype.slice,l=Object.prototype.hasOwnProperty,u=r.exports=y;u.AssertionError=function(b){this.name="AssertionError",this.actual=b.actual,this.expected=b.expected,this.operator=b.operator,b.message?(this.message=b.message,this.generatedMessage=!1):(this.message=d(this),this.generatedMessage=!0);var A=b.stackStartFunction||h;if(Error.captureStackTrace)Error.captureStackTrace(this,A);else{var q=new Error;if(q.stack){var x=q.stack,D=A.name,j=x.indexOf(`
|
|
14
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var y=this.next();return y||this.lex()},begin:function(y){this.conditionStack.push(y)},popState:function(){var y=this.conditionStack.length-1;return y>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(y){return y=this.conditionStack.length-1-Math.abs(y||0),y>=0?this.conditionStack[y]:"INITIAL"},pushState:function(y){this.begin(y)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(y,m,v,p){switch(v){case 0:return 4;case 1:return 14;case 2:return 12;case 3:return 15;case 4:return 16;case 5:return 22;case 6:return 24;case 7:return 28;case 8:return 30;case 9:return 18;case 10:return m.yytext=m.yytext.substr(1,m.yyleng-2),32;case 11:return m.yytext=m.yytext.substr(1,m.yyleng-2),33;case 12:return 17;case 13:return 31}},rules:[/^(?:\$)/,/^(?:\.\.)/,/^(?:\.)/,/^(?:\*)/,/^(?:[a-zA-Z_]+[a-zA-Z0-9_]*)/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?:((-?(?:0|[1-9][0-9]*)))?\:((-?(?:0|[1-9][0-9]*)))?(\:((-?(?:0|[1-9][0-9]*)))?)?)/,/^(?:(-?(?:0|[1-9][0-9]*)))/,/^(?:"(?:\\["bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^"\\])*")/,/^(?:'(?:\\['bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^'\\])*')/,/^(?:\(.+?\)(?=\]))/,/^(?:\?\(.+?\)(?=\]))/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return d}();l.lexer=o;function f(){this.yy={}}return f.prototype=l,l.Parser=f,new f}();typeof t<"u"&&typeof i<"u"&&(i.parser=s,i.Parser=s.Parser,i.parse=function(){return s.parse.apply(s,arguments)},i.main=function(u){u[1]||(console.log("Usage: "+u[0]+" FILE"),a.exit(1));var o=t("fs").readFileSync(t("path").normalize(u[1]),"utf8");return i.parser.parse(o)},typeof r<"u"&&t.main===r&&i.main(a.argv.slice(1)))}).call(this,t("_process"))},{_process:14,fs:12,path:13}],2:[function(t,r,i){r.exports={identifier:"[a-zA-Z_]+[a-zA-Z0-9_]*",integer:"-?(?:0|[1-9][0-9]*)",qq_string:'"(?:\\\\["bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^"\\\\])*"',q_string:"'(?:\\\\['bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^'\\\\])*'"}},{}],3:[function(t,r,i){var a=t("./dict"),s=t("fs"),l={lex:{macros:{esc:"\\\\",int:a.integer},rules:[["\\$","return 'DOLLAR'"],["\\.\\.","return 'DOT_DOT'"],["\\.","return 'DOT'"],["\\*","return 'STAR'"],[a.identifier,"return 'IDENTIFIER'"],["\\[","return '['"],["\\]","return ']'"],[",","return ','"],["({int})?\\:({int})?(\\:({int})?)?","return 'ARRAY_SLICE'"],["{int}","return 'INTEGER'"],[a.qq_string,"yytext = yytext.substr(1,yyleng-2); return 'QQ_STRING';"],[a.q_string,"yytext = yytext.substr(1,yyleng-2); return 'Q_STRING';"],["\\(.+?\\)(?=\\])","return 'SCRIPT_EXPRESSION'"],["\\?\\(.+?\\)(?=\\])","return 'FILTER_EXPRESSION'"]]},start:"JSON_PATH",bnf:{JSON_PATH:[["DOLLAR",'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()'],["DOLLAR PATH_COMPONENTS",'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()'],["LEADING_CHILD_MEMBER_EXPRESSION","yy.ast.unshift(); return yy.ast.yield()"],["LEADING_CHILD_MEMBER_EXPRESSION PATH_COMPONENTS",'yy.ast.set({ operation: "member", scope: "child", expression: { type: "identifier", value: $1 }}); yy.ast.unshift(); return yy.ast.yield()']],PATH_COMPONENTS:[["PATH_COMPONENT",""],["PATH_COMPONENTS PATH_COMPONENT",""]],PATH_COMPONENT:[["MEMBER_COMPONENT",'yy.ast.set({ operation: "member" }); yy.ast.push()'],["SUBSCRIPT_COMPONENT",'yy.ast.set({ operation: "subscript" }); yy.ast.push() ']],MEMBER_COMPONENT:[["CHILD_MEMBER_COMPONENT",'yy.ast.set({ scope: "child" })'],["DESCENDANT_MEMBER_COMPONENT",'yy.ast.set({ scope: "descendant" })']],CHILD_MEMBER_COMPONENT:[["DOT MEMBER_EXPRESSION",""]],LEADING_CHILD_MEMBER_EXPRESSION:[["MEMBER_EXPRESSION",'yy.ast.set({ scope: "child", operation: "member" })']],DESCENDANT_MEMBER_COMPONENT:[["DOT_DOT MEMBER_EXPRESSION",""]],MEMBER_EXPRESSION:[["STAR",'yy.ast.set({ expression: { type: "wildcard", value: $1 } })'],["IDENTIFIER",'yy.ast.set({ expression: { type: "identifier", value: $1 } })'],["SCRIPT_EXPRESSION",'yy.ast.set({ expression: { type: "script_expression", value: $1 } })'],["INTEGER",'yy.ast.set({ expression: { type: "numeric_literal", value: parseInt($1) } })'],["END",""]],SUBSCRIPT_COMPONENT:[["CHILD_SUBSCRIPT_COMPONENT",'yy.ast.set({ scope: "child" })'],["DESCENDANT_SUBSCRIPT_COMPONENT",'yy.ast.set({ scope: "descendant" })']],CHILD_SUBSCRIPT_COMPONENT:[["[ SUBSCRIPT ]",""]],DESCENDANT_SUBSCRIPT_COMPONENT:[["DOT_DOT [ SUBSCRIPT ]",""]],SUBSCRIPT:[["SUBSCRIPT_EXPRESSION",""],["SUBSCRIPT_EXPRESSION_LIST",'$1.length > 1? yy.ast.set({ expression: { type: "union", value: $1 } }) : $$ = $1']],SUBSCRIPT_EXPRESSION_LIST:[["SUBSCRIPT_EXPRESSION_LISTABLE","$$ = [$1]"],["SUBSCRIPT_EXPRESSION_LIST , SUBSCRIPT_EXPRESSION_LISTABLE","$$ = $1.concat($3)"]],SUBSCRIPT_EXPRESSION_LISTABLE:[["INTEGER",'$$ = { expression: { type: "numeric_literal", value: parseInt($1) } }; yy.ast.set($$)'],["STRING_LITERAL",'$$ = { expression: { type: "string_literal", value: $1 } }; yy.ast.set($$)'],["ARRAY_SLICE",'$$ = { expression: { type: "slice", value: $1 } }; yy.ast.set($$)']],SUBSCRIPT_EXPRESSION:[["STAR",'$$ = { expression: { type: "wildcard", value: $1 } }; yy.ast.set($$)'],["SCRIPT_EXPRESSION",'$$ = { expression: { type: "script_expression", value: $1 } }; yy.ast.set($$)'],["FILTER_EXPRESSION",'$$ = { expression: { type: "filter_expression", value: $1 } }; yy.ast.set($$)']],STRING_LITERAL:[["QQ_STRING","$$ = $1"],["Q_STRING","$$ = $1"]]}};s.readFileSync&&(l.moduleInclude=s.readFileSync(t.resolve("../include/module.js")),l.actionInclude=s.readFileSync(t.resolve("../include/action.js"))),r.exports=l},{"./dict":2,fs:12}],4:[function(t,r,i){var a=t("./aesprim"),s=t("./slice"),l=t("static-eval"),u=t("underscore").uniq,o=function(){return this.initialize.apply(this,arguments)};o.prototype.initialize=function(){this.traverse=y(!0),this.descend=y()},o.prototype.keys=Object.keys,o.prototype.resolve=function(w){var g=[w.operation,w.scope,w.expression.type].join("-"),b=this._fns[g];if(!b)throw new Error("couldn't resolve key: "+g);return b.bind(this)},o.prototype.register=function(w,g){if(!g instanceof Function)throw new Error("handler must be a function");this._fns[w]=g},o.prototype._fns={"member-child-identifier":function(w,g){var b=w.expression.value,A=g.value;if(A instanceof Object&&b in A)return[{value:A[b],path:g.path.concat(b)}]},"member-descendant-identifier":v(function(w,g,b){return w==b}),"subscript-child-numeric_literal":m(function(w,g,b){return w===b}),"member-child-numeric_literal":m(function(w,g,b){return String(w)===String(b)}),"subscript-descendant-numeric_literal":v(function(w,g,b){return w===b}),"member-child-wildcard":m(function(){return!0}),"member-descendant-wildcard":v(function(){return!0}),"subscript-descendant-wildcard":v(function(){return!0}),"subscript-child-wildcard":m(function(){return!0}),"subscript-child-slice":function(w,g){if(d(g.value)){var b=w.expression.value.split(":").map(S),A=g.value.map(function(q,x){return{value:q,path:g.path.concat(x)}});return s.apply(null,[A].concat(b))}},"subscript-child-union":function(w,g){var b=[];return w.expression.value.forEach(function(A){var q={operation:"subscript",scope:"child",expression:A.expression},x=this.resolve(q),D=x(q,g);D&&(b=b.concat(D))},this),E(b)},"subscript-descendant-union":function(w,g,b){var A=t(".."),q=this,x=[],D=A.nodes(g,"$..*").slice(1);return D.forEach(function(j){x.length>=b||w.expression.value.forEach(function(F){var M={operation:"subscript",scope:"child",expression:F.expression},B=q.resolve(M),U=B(M,j);x=x.concat(U)})}),E(x)},"subscript-child-filter_expression":function(w,g,b){var A=w.expression.value.slice(2,-1),q=a.parse(A).body[0].expression,x=function(D,j){return p(q,{"@":j})};return this.descend(g,null,x,b)},"subscript-descendant-filter_expression":function(w,g,b){var A=w.expression.value.slice(2,-1),q=a.parse(A).body[0].expression,x=function(D,j){return p(q,{"@":j})};return this.traverse(g,null,x,b)},"subscript-child-script_expression":function(w,g){var b=w.expression.value.slice(1,-1);return f(g,b,"$[{{value}}]")},"member-child-script_expression":function(w,g){var b=w.expression.value.slice(1,-1);return f(g,b,"$.{{value}}")},"member-descendant-script_expression":function(w,g){var b=w.expression.value.slice(1,-1);return f(g,b,"$..value")}},o.prototype._fns["subscript-child-string_literal"]=o.prototype._fns["member-child-identifier"],o.prototype._fns["member-descendant-numeric_literal"]=o.prototype._fns["subscript-descendant-string_literal"]=o.prototype._fns["member-descendant-identifier"];function f(w,g,b){var A=t("./index"),q=a.parse(g).body[0].expression,x=p(q,{"@":w.value}),D=b.replace(/\{\{\s*value\s*\}\}/g,x),j=A.nodes(w.value,D);return j.forEach(function(F){F.path=w.path.concat(F.path.slice(1))}),j}function d(w){return Array.isArray(w)}function h(w){return w&&!(w instanceof Array)&&w instanceof Object}function y(w){return function(g,b,A,q){var x=g.value,D=g.path,j=[],F=(function(M,B){d(M)?(M.forEach(function(U,H){j.length>=q||A(H,U,b)&&j.push({path:B.concat(H),value:U})}),M.forEach(function(U,H){j.length>=q||w&&F(U,B.concat(H))})):h(M)&&(this.keys(M).forEach(function(U){j.length>=q||A(U,M[U],b)&&j.push({path:B.concat(U),value:M[U]})}),this.keys(M).forEach(function(U){j.length>=q||w&&F(M[U],B.concat(U))}))}).bind(this);return F(x,D),j}}function m(w){return function(g,b,A){return this.descend(b,g.expression.value,w,A)}}function v(w){return function(g,b,A){return this.traverse(b,g.expression.value,w,A)}}function p(){try{return l.apply(this,arguments)}catch{}}function E(w){return w=w.filter(function(g){return g}),u(w,function(g){return g.path.map(function(b){return String(b).replace("-","--")}).join("-")})}function S(w){var g=String(w);return g.match(/^-?[0-9]+$/)?parseInt(g):null}r.exports=o},{"..":"jsonpath","./aesprim":"./aesprim","./index":5,"./slice":7,"static-eval":15,underscore:12}],5:[function(t,r,i){var a=t("assert"),s=t("./dict"),l=t("./parser"),u=t("./handlers"),o=function(){this.initialize.apply(this,arguments)};o.prototype.initialize=function(){this.parser=new l,this.handlers=new u},o.prototype.parse=function(h){return a.ok(f(h),"we need a path"),this.parser.parse(h)},o.prototype.parent=function(h,y){a.ok(h instanceof Object,"obj needs to be an object"),a.ok(y,"we need a path");var m=this.nodes(h,y)[0];return m.path.pop(),this.value(h,m.path)},o.prototype.apply=function(h,y,m){a.ok(h instanceof Object,"obj needs to be an object"),a.ok(y,"we need a path"),a.equal(typeof m,"function","fn needs to be function");var v=this.nodes(h,y).sort(function(p,E){return E.path.length-p.path.length});return v.forEach(function(p){var E=p.path.pop(),S=this.value(h,this.stringify(p.path)),w=p.value=m.call(h,S[E]);S[E]=w},this),v},o.prototype.value=function(h,y,m){if(a.ok(h instanceof Object,"obj needs to be an object"),a.ok(y,"we need a path"),arguments.length>=3){var v=this.nodes(h,y).shift();if(!v)return this._vivify(h,y,m);var p=v.path.slice(-1).shift(),E=this.parent(h,this.stringify(v.path));E[p]=m}return this.query(h,this.stringify(y),1).shift()},o.prototype._vivify=function(h,y,m){var v=this;a.ok(h instanceof Object,"obj needs to be an object"),a.ok(y,"we need a path");var p=this.parser.parse(y).map(function(S){return S.expression.value}),E=function(S,w){var g=S.pop(),b=v.value(h,S);b||(E(S.concat(),typeof g=="string"?{}:[]),b=v.value(h,S)),b[g]=w};return E(p,m),this.query(h,y)[0]},o.prototype.query=function(h,y,m){a.ok(h instanceof Object,"obj needs to be an object"),a.ok(f(y),"we need a path");var v=this.nodes(h,y,m).map(function(p){return p.value});return v},o.prototype.paths=function(h,y,m){a.ok(h instanceof Object,"obj needs to be an object"),a.ok(y,"we need a path");var v=this.nodes(h,y,m).map(function(p){return p.path});return v},o.prototype.nodes=function(h,y,m){if(a.ok(h instanceof Object,"obj needs to be an object"),a.ok(y,"we need a path"),m===0)return[];var v=this.parser.parse(y),p=this.handlers,E=[{path:["$"],value:h}],S=[];return v.length&&v[0].expression.type=="root"&&v.shift(),v.length?(v.forEach(function(w,g){if(!(S.length>=m)){var b=p.resolve(w),A=[];E.forEach(function(q){if(!(S.length>=m)){var x=b(w,q,m);g==v.length-1?S=S.concat(x||[]):A=A.concat(x||[])}}),E=A}}),m?S.slice(0,m):S):E},o.prototype.stringify=function(h){a.ok(h,"we need a path");var y="$",m={"descendant-member":"..{{value}}","child-member":".{{value}}","descendant-subscript":"..[{{value}}]","child-subscript":"[{{value}}]"};return h=this._normalize(h),h.forEach(function(v){if(v.expression.type!="root"){var p=[v.scope,v.operation].join("-"),E=m[p],S;if(v.expression.type=="string_literal"?S=JSON.stringify(v.expression.value):S=v.expression.value,!E)throw new Error("couldn't find template "+p);y+=E.replace(/{{value}}/,S)}}),y},o.prototype._normalize=function(h){if(a.ok(h,"we need a path"),typeof h=="string")return this.parser.parse(h);if(Array.isArray(h)&&typeof h[0]=="string"){var y=[{expression:{type:"root",value:"$"}}];return h.forEach(function(m,v){if(!(m=="$"&&v===0))if(typeof m=="string"&&m.match("^"+s.identifier+"$"))y.push({operation:"member",scope:"child",expression:{value:m,type:"identifier"}});else{var p=typeof m=="number"?"numeric_literal":"string_literal";y.push({operation:"subscript",scope:"child",expression:{value:m,type:p}})}}),y}else if(Array.isArray(h)&&typeof h[0]=="object")return h;throw new Error("couldn't understand path "+h)};function f(h){return Object.prototype.toString.call(h)=="[object String]"}o.Handlers=u,o.Parser=l;var d=new o;d.JSONPath=o,r.exports=d},{"./dict":2,"./handlers":4,"./parser":6,assert:8}],6:[function(t,r,i){var a=t("./grammar"),s=t("../generated/parser"),l=function(){var u=new s.Parser,o=u.parseError;return u.yy.parseError=function(){u.yy.ast&&u.yy.ast.initialize(),o.apply(u,arguments)},u};l.grammar=a,r.exports=l},{"../generated/parser":1,"./grammar":3}],7:[function(t,r,i){r.exports=function(s,l,u,o){if(typeof l=="string")throw new Error("start cannot be a string");if(typeof u=="string")throw new Error("end cannot be a string");if(typeof o=="string")throw new Error("step cannot be a string");var f=s.length;if(o===0)throw new Error("step cannot be zero");if(o=o?a(o):1,l=l<0?f+l:l,u=u<0?f+u:u,l=a(l===0?0:l||(o>0?0:f-1)),u=a(u===0?0:u||(o>0?f:-1)),l=o>0?Math.max(0,l):Math.min(f,l),u=o>0?Math.min(u,f):Math.max(-1,u),o>0&&u<=l)return[];if(o<0&&l<=u)return[];for(var d=[],h=l;h!=u&&!(o<0&&h<=u||o>0&&h>=u);h+=o)d.push(s[h]);return d};function a(s){return String(s).match(/^[0-9]+$/)?parseInt(s):Number.isFinite(s)?parseInt(s,10):0}},{}],8:[function(t,r,i){var a=t("util/"),s=Array.prototype.slice,l=Object.prototype.hasOwnProperty,u=r.exports=y;u.AssertionError=function(b){this.name="AssertionError",this.actual=b.actual,this.expected=b.expected,this.operator=b.operator,b.message?(this.message=b.message,this.generatedMessage=!1):(this.message=d(this),this.generatedMessage=!0);var A=b.stackStartFunction||h;if(Error.captureStackTrace)Error.captureStackTrace(this,A);else{var q=new Error;if(q.stack){var x=q.stack,D=A.name,j=x.indexOf(`
|
|
15
15
|
`+D);if(j>=0){var F=x.indexOf(`
|
|
16
|
-
`,j+1);x=x.substring(F+1)}this.stack=x}}},a.inherits(u.AssertionError,Error);function o(g,b){return a.isUndefined(b)?""+b:a.isNumber(b)&&!isFinite(b)||a.isFunction(b)||a.isRegExp(b)?b.toString():b}function f(g,b){return a.isString(g)?g.length<b?g:g.slice(0,b):g}function d(g){return f(JSON.stringify(g.actual,o),128)+" "+g.operator+" "+f(JSON.stringify(g.expected,o),128)}function h(g,b,A,q,x){throw new u.AssertionError({message:A,actual:g,expected:b,operator:q,stackStartFunction:x})}u.fail=h;function y(g,b){g||h(g,!0,b,"==",u.ok)}u.ok=y,u.equal=function(b,A,q){b!=A&&h(b,A,q,"==",u.equal)},u.notEqual=function(b,A,q){b==A&&h(b,A,q,"!=",u.notEqual)},u.deepEqual=function(b,A,q){m(b,A)||h(b,A,q,"deepEqual",u.deepEqual)};function m(g,b){if(g===b)return!0;if(a.isBuffer(g)&&a.isBuffer(b)){if(g.length!=b.length)return!1;for(var A=0;A<g.length;A++)if(g[A]!==b[A])return!1;return!0}else return a.isDate(g)&&a.isDate(b)?g.getTime()===b.getTime():a.isRegExp(g)&&a.isRegExp(b)?g.source===b.source&&g.global===b.global&&g.multiline===b.multiline&&g.lastIndex===b.lastIndex&&g.ignoreCase===b.ignoreCase:!a.isObject(g)&&!a.isObject(b)?g==b:p(g,b)}function v(g){return Object.prototype.toString.call(g)=="[object Arguments]"}function p(g,b){if(a.isNullOrUndefined(g)||a.isNullOrUndefined(b)||g.prototype!==b.prototype)return!1;if(a.isPrimitive(g)||a.isPrimitive(b))return g===b;var A=v(g),q=v(b);if(A&&!q||!A&&q)return!1;if(A)return g=s.call(g),b=s.call(b),m(g,b);var x=w(g),D=w(b),j,F;if(x.length!=D.length)return!1;for(x.sort(),D.sort(),F=x.length-1;F>=0;F--)if(x[F]!=D[F])return!1;for(F=x.length-1;F>=0;F--)if(j=x[F],!m(g[j],b[j]))return!1;return!0}u.notDeepEqual=function(b,A,q){m(b,A)&&h(b,A,q,"notDeepEqual",u.notDeepEqual)},u.strictEqual=function(b,A,q){b!==A&&h(b,A,q,"===",u.strictEqual)},u.notStrictEqual=function(b,A,q){b===A&&h(b,A,q,"!==",u.notStrictEqual)};function E(g,b){return!g||!b?!1:Object.prototype.toString.call(b)=="[object RegExp]"?b.test(g):g instanceof b?!0:b.call({},g)===!0}function S(g,b,A,q){var x;a.isString(A)&&(q=A,A=null);try{b()}catch(D){x=D}if(q=(A&&A.name?" ("+A.name+").":".")+(q?" "+q:"."),g&&!x&&h(x,A,"Missing expected exception"+q),!g&&E(x,A)&&h(x,A,"Got unwanted exception"+q),g&&x&&A&&!E(x,A)||!g&&x)throw x}u.throws=function(g,b,A){S.apply(this,[!0].concat(s.call(arguments)))},u.doesNotThrow=function(g,b){S.apply(this,[!1].concat(s.call(arguments)))},u.ifError=function(g){if(g)throw g};var w=Object.keys||function(g){var b=[];for(var A in g)l.call(g,A)&&b.push(A);return b}},{"util/":11}],9:[function(t,r,i){typeof Object.create=="function"?r.exports=function(s,l){s.super_=l,s.prototype=Object.create(l.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}})}:r.exports=function(s,l){s.super_=l;var u=function(){};u.prototype=l.prototype,s.prototype=new u,s.prototype.constructor=s}},{}],10:[function(t,r,i){r.exports=function(s){return s&&typeof s=="object"&&typeof s.copy=="function"&&typeof s.fill=="function"&&typeof s.readUInt8=="function"}},{}],11:[function(t,r,i){(function(a,s){var l=/%[sdj%]/g;i.format=function(C){if(!D(C)){for(var k=[],$=0;$<arguments.length;$++)k.push(f(arguments[$]));return k.join(" ")}for(var $=1,
|
|
17
|
-
`)>-1&&(
|
|
16
|
+
`,j+1);x=x.substring(F+1)}this.stack=x}}},a.inherits(u.AssertionError,Error);function o(g,b){return a.isUndefined(b)?""+b:a.isNumber(b)&&!isFinite(b)||a.isFunction(b)||a.isRegExp(b)?b.toString():b}function f(g,b){return a.isString(g)?g.length<b?g:g.slice(0,b):g}function d(g){return f(JSON.stringify(g.actual,o),128)+" "+g.operator+" "+f(JSON.stringify(g.expected,o),128)}function h(g,b,A,q,x){throw new u.AssertionError({message:A,actual:g,expected:b,operator:q,stackStartFunction:x})}u.fail=h;function y(g,b){g||h(g,!0,b,"==",u.ok)}u.ok=y,u.equal=function(b,A,q){b!=A&&h(b,A,q,"==",u.equal)},u.notEqual=function(b,A,q){b==A&&h(b,A,q,"!=",u.notEqual)},u.deepEqual=function(b,A,q){m(b,A)||h(b,A,q,"deepEqual",u.deepEqual)};function m(g,b){if(g===b)return!0;if(a.isBuffer(g)&&a.isBuffer(b)){if(g.length!=b.length)return!1;for(var A=0;A<g.length;A++)if(g[A]!==b[A])return!1;return!0}else return a.isDate(g)&&a.isDate(b)?g.getTime()===b.getTime():a.isRegExp(g)&&a.isRegExp(b)?g.source===b.source&&g.global===b.global&&g.multiline===b.multiline&&g.lastIndex===b.lastIndex&&g.ignoreCase===b.ignoreCase:!a.isObject(g)&&!a.isObject(b)?g==b:p(g,b)}function v(g){return Object.prototype.toString.call(g)=="[object Arguments]"}function p(g,b){if(a.isNullOrUndefined(g)||a.isNullOrUndefined(b)||g.prototype!==b.prototype)return!1;if(a.isPrimitive(g)||a.isPrimitive(b))return g===b;var A=v(g),q=v(b);if(A&&!q||!A&&q)return!1;if(A)return g=s.call(g),b=s.call(b),m(g,b);var x=w(g),D=w(b),j,F;if(x.length!=D.length)return!1;for(x.sort(),D.sort(),F=x.length-1;F>=0;F--)if(x[F]!=D[F])return!1;for(F=x.length-1;F>=0;F--)if(j=x[F],!m(g[j],b[j]))return!1;return!0}u.notDeepEqual=function(b,A,q){m(b,A)&&h(b,A,q,"notDeepEqual",u.notDeepEqual)},u.strictEqual=function(b,A,q){b!==A&&h(b,A,q,"===",u.strictEqual)},u.notStrictEqual=function(b,A,q){b===A&&h(b,A,q,"!==",u.notStrictEqual)};function E(g,b){return!g||!b?!1:Object.prototype.toString.call(b)=="[object RegExp]"?b.test(g):g instanceof b?!0:b.call({},g)===!0}function S(g,b,A,q){var x;a.isString(A)&&(q=A,A=null);try{b()}catch(D){x=D}if(q=(A&&A.name?" ("+A.name+").":".")+(q?" "+q:"."),g&&!x&&h(x,A,"Missing expected exception"+q),!g&&E(x,A)&&h(x,A,"Got unwanted exception"+q),g&&x&&A&&!E(x,A)||!g&&x)throw x}u.throws=function(g,b,A){S.apply(this,[!0].concat(s.call(arguments)))},u.doesNotThrow=function(g,b){S.apply(this,[!1].concat(s.call(arguments)))},u.ifError=function(g){if(g)throw g};var w=Object.keys||function(g){var b=[];for(var A in g)l.call(g,A)&&b.push(A);return b}},{"util/":11}],9:[function(t,r,i){typeof Object.create=="function"?r.exports=function(s,l){s.super_=l,s.prototype=Object.create(l.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}})}:r.exports=function(s,l){s.super_=l;var u=function(){};u.prototype=l.prototype,s.prototype=new u,s.prototype.constructor=s}},{}],10:[function(t,r,i){r.exports=function(s){return s&&typeof s=="object"&&typeof s.copy=="function"&&typeof s.fill=="function"&&typeof s.readUInt8=="function"}},{}],11:[function(t,r,i){(function(a,s){var l=/%[sdj%]/g;i.format=function(C){if(!D(C)){for(var k=[],$=0;$<arguments.length;$++)k.push(f(arguments[$]));return k.join(" ")}for(var $=1,Q=arguments,se=Q.length,Y=String(C).replace(l,function(ue){if(ue==="%%")return"%";if($>=se)return ue;switch(ue){case"%s":return String(Q[$++]);case"%d":return Number(Q[$++]);case"%j":try{return JSON.stringify(Q[$++])}catch{return"[Circular]"}default:return ue}}),ne=Q[$];$<se;ne=Q[++$])A(ne)||!B(ne)?Y+=" "+ne:Y+=" "+f(ne);return Y},i.deprecate=function(C,k){if(F(s.process))return function(){return i.deprecate(C,k).apply(this,arguments)};if(a.noDeprecation===!0)return C;var $=!1;function Q(){if(!$){if(a.throwDeprecation)throw new Error(k);a.traceDeprecation?console.trace(k):console.error(k),$=!0}return C.apply(this,arguments)}return Q};var u={},o;i.debuglog=function(C){if(F(o)&&(o=a.env.NODE_DEBUG||""),C=C.toUpperCase(),!u[C])if(new RegExp("\\b"+C+"\\b","i").test(o)){var k=a.pid;u[C]=function(){var $=i.format.apply(i,arguments);console.error("%s %d: %s",C,k,$)}}else u[C]=function(){};return u[C]};function f(C,k){var $={seen:[],stylize:h};return arguments.length>=3&&($.depth=arguments[2]),arguments.length>=4&&($.colors=arguments[3]),b(k)?$.showHidden=k:k&&i._extend($,k),F($.showHidden)&&($.showHidden=!1),F($.depth)&&($.depth=2),F($.colors)&&($.colors=!1),F($.customInspect)&&($.customInspect=!0),$.colors&&($.stylize=d),m($,C,$.depth)}i.inspect=f,f.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},f.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function d(C,k){var $=f.styles[k];return $?"\x1B["+f.colors[$][0]+"m"+C+"\x1B["+f.colors[$][1]+"m":C}function h(C,k){return C}function y(C){var k={};return C.forEach(function($,Q){k[$]=!0}),k}function m(C,k,$){if(C.customInspect&&k&&z(k.inspect)&&k.inspect!==i.inspect&&!(k.constructor&&k.constructor.prototype===k)){var Q=k.inspect($,C);return D(Q)||(Q=m(C,Q,$)),Q}var se=v(C,k);if(se)return se;var Y=Object.keys(k),ne=y(Y);if(C.showHidden&&(Y=Object.getOwnPropertyNames(k)),H(k)&&(Y.indexOf("message")>=0||Y.indexOf("description")>=0))return p(k);if(Y.length===0){if(z(k)){var ue=k.name?": "+k.name:"";return C.stylize("[Function"+ue+"]","special")}if(M(k))return C.stylize(RegExp.prototype.toString.call(k),"regexp");if(U(k))return C.stylize(Date.prototype.toString.call(k),"date");if(H(k))return p(k)}var le="",me=!1,ve=["{","}"];if(g(k)&&(me=!0,ve=["[","]"]),z(k)){var Se=k.name?": "+k.name:"";le=" [Function"+Se+"]"}if(M(k)&&(le=" "+RegExp.prototype.toString.call(k)),U(k)&&(le=" "+Date.prototype.toUTCString.call(k)),H(k)&&(le=" "+p(k)),Y.length===0&&(!me||k.length==0))return ve[0]+le+ve[1];if($<0)return M(k)?C.stylize(RegExp.prototype.toString.call(k),"regexp"):C.stylize("[Object]","special");C.seen.push(k);var be;return me?be=E(C,k,$,ne,Y):be=Y.map(function(Te){return S(C,k,$,ne,Te,me)}),C.seen.pop(),w(be,le,ve)}function v(C,k){if(F(k))return C.stylize("undefined","undefined");if(D(k)){var $="'"+JSON.stringify(k).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return C.stylize($,"string")}if(x(k))return C.stylize(""+k,"number");if(b(k))return C.stylize(""+k,"boolean");if(A(k))return C.stylize("null","null")}function p(C){return"["+Error.prototype.toString.call(C)+"]"}function E(C,k,$,Q,se){for(var Y=[],ne=0,ue=k.length;ne<ue;++ne)pe(k,String(ne))?Y.push(S(C,k,$,Q,String(ne),!0)):Y.push("");return se.forEach(function(le){le.match(/^\d+$/)||Y.push(S(C,k,$,Q,le,!0))}),Y}function S(C,k,$,Q,se,Y){var ne,ue,le;if(le=Object.getOwnPropertyDescriptor(k,se)||{value:k[se]},le.get?le.set?ue=C.stylize("[Getter/Setter]","special"):ue=C.stylize("[Getter]","special"):le.set&&(ue=C.stylize("[Setter]","special")),pe(Q,se)||(ne="["+se+"]"),ue||(C.seen.indexOf(le.value)<0?(A($)?ue=m(C,le.value,null):ue=m(C,le.value,$-1),ue.indexOf(`
|
|
17
|
+
`)>-1&&(Y?ue=ue.split(`
|
|
18
18
|
`).map(function(me){return" "+me}).join(`
|
|
19
19
|
`).substr(2):ue=`
|
|
20
20
|
`+ue.split(`
|
|
21
21
|
`).map(function(me){return" "+me}).join(`
|
|
22
|
-
`))):ue=C.stylize("[Circular]","special")),F(ne)){if(
|
|
23
|
-
`)>=0,se+
|
|
22
|
+
`))):ue=C.stylize("[Circular]","special")),F(ne)){if(Y&&se.match(/^\d+$/))return ue;ne=JSON.stringify(""+se),ne.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(ne=ne.substr(1,ne.length-2),ne=C.stylize(ne,"name")):(ne=ne.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ne=C.stylize(ne,"string"))}return ne+": "+ue}function w(C,k,$){var Q=C.reduce(function(se,Y){return Y.indexOf(`
|
|
23
|
+
`)>=0,se+Y.replace(/\u001b\[\d\d?m/g,"").length+1},0);return Q>60?$[0]+(k===""?"":k+`
|
|
24
24
|
`)+" "+C.join(`,
|
|
25
|
-
`)+" "+$[1]:$[0]+k+" "+C.join(", ")+" "+$[1]}function g(C){return Array.isArray(C)}i.isArray=g;function b(C){return typeof C=="boolean"}i.isBoolean=b;function A(C){return C===null}i.isNull=A;function q(C){return C==null}i.isNullOrUndefined=q;function x(C){return typeof C=="number"}i.isNumber=x;function D(C){return typeof C=="string"}i.isString=D;function j(C){return typeof C=="symbol"}i.isSymbol=j;function F(C){return C===void 0}i.isUndefined=F;function N(C){return B(C)&&W(C)==="[object RegExp]"}i.isRegExp=N;function B(C){return typeof C=="object"&&C!==null}i.isObject=B;function U(C){return B(C)&&W(C)==="[object Date]"}i.isDate=U;function H(C){return B(C)&&(W(C)==="[object Error]"||C instanceof Error)}i.isError=H;function z(C){return typeof C=="function"}i.isFunction=z;function K(C){return C===null||typeof C=="boolean"||typeof C=="number"||typeof C=="string"||typeof C=="symbol"||typeof C>"u"}i.isPrimitive=K,i.isBuffer=t("./support/isBuffer");function W(C){return Object.prototype.toString.call(C)}function te(C){return C<10?"0"+C.toString(10):C.toString(10)}var Z=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function V(){var C=new Date,k=[te(C.getHours()),te(C.getMinutes()),te(C.getSeconds())].join(":");return[C.getDate(),Z[C.getMonth()],k].join(" ")}i.log=function(){console.log("%s - %s",V(),i.format.apply(i,arguments))},i.inherits=t("inherits"),i._extend=function(C,k){if(!k||!B(k))return C;for(var $=Object.keys(k),Y=$.length;Y--;)C[$[Y]]=k[$[Y]];return C};function pe(C,k){return Object.prototype.hasOwnProperty.call(C,k)}}).call(this,t("_process"),typeof commonjsGlobal<"u"?commonjsGlobal:typeof self<"u"?self:typeof window<"u"?window:{})},{"./support/isBuffer":10,_process:14,inherits:9}],12:[function(t,r,i){},{}],13:[function(t,r,i){(function(a){function s(f,d){for(var h=0,y=f.length-1;y>=0;y--){var m=f[y];m==="."?f.splice(y,1):m===".."?(f.splice(y,1),h++):h&&(f.splice(y,1),h--)}if(d)for(;h--;h)f.unshift("..");return f}i.resolve=function(){for(var f="",d=!1,h=arguments.length-1;h>=-1&&!d;h--){var y=h>=0?arguments[h]:a.cwd();if(typeof y!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!y)continue;f=y+"/"+f,d=y.charAt(0)==="/"}return f=s(u(f.split("/"),function(m){return!!m}),!d).join("/"),(d?"/":"")+f||"."},i.normalize=function(f){var d=i.isAbsolute(f),h=o(f,-1)==="/";return f=s(u(f.split("/"),function(y){return!!y}),!d).join("/"),!f&&!d&&(f="."),f&&h&&(f+="/"),(d?"/":"")+f},i.isAbsolute=function(f){return f.charAt(0)==="/"},i.join=function(){var f=Array.prototype.slice.call(arguments,0);return i.normalize(u(f,function(d,h){if(typeof d!="string")throw new TypeError("Arguments to path.join must be strings");return d}).join("/"))},i.relative=function(f,d){f=i.resolve(f).substr(1),d=i.resolve(d).substr(1);function h(w){for(var g=0;g<w.length&&w[g]==="";g++);for(var b=w.length-1;b>=0&&w[b]==="";b--);return g>b?[]:w.slice(g,b-g+1)}for(var y=h(f.split("/")),m=h(d.split("/")),v=Math.min(y.length,m.length),p=v,E=0;E<v;E++)if(y[E]!==m[E]){p=E;break}for(var S=[],E=p;E<y.length;E++)S.push("..");return S=S.concat(m.slice(p)),S.join("/")},i.sep="/",i.delimiter=":",i.dirname=function(f){if(typeof f!="string"&&(f=f+""),f.length===0)return".";for(var d=f.charCodeAt(0),h=d===47,y=-1,m=!0,v=f.length-1;v>=1;--v)if(d=f.charCodeAt(v),d===47){if(!m){y=v;break}}else m=!1;return y===-1?h?"/":".":h&&y===1?"/":f.slice(0,y)};function l(f){typeof f!="string"&&(f=f+"");var d=0,h=-1,y=!0,m;for(m=f.length-1;m>=0;--m)if(f.charCodeAt(m)===47){if(!y){d=m+1;break}}else h===-1&&(y=!1,h=m+1);return h===-1?"":f.slice(d,h)}i.basename=function(f,d){var h=l(f);return d&&h.substr(-1*d.length)===d&&(h=h.substr(0,h.length-d.length)),h},i.extname=function(f){typeof f!="string"&&(f=f+"");for(var d=-1,h=0,y=-1,m=!0,v=0,p=f.length-1;p>=0;--p){var E=f.charCodeAt(p);if(E===47){if(!m){h=p+1;break}continue}y===-1&&(m=!1,y=p+1),E===46?d===-1?d=p:v!==1&&(v=1):d!==-1&&(v=-1)}return d===-1||y===-1||v===0||v===1&&d===y-1&&d===h+1?"":f.slice(d,y)};function u(f,d){if(f.filter)return f.filter(d);for(var h=[],y=0;y<f.length;y++)d(f[y],y,f)&&h.push(f[y]);return h}var o="ab".substr(-1)==="b"?function(f,d,h){return f.substr(d,h)}:function(f,d,h){return d<0&&(d=f.length+d),f.substr(d,h)}}).call(this,t("_process"))},{_process:14}],14:[function(t,r,i){var a=r.exports={},s,l;function u(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?s=setTimeout:s=u}catch{s=u}try{typeof clearTimeout=="function"?l=clearTimeout:l=o}catch{l=o}})();function f(g){if(s===setTimeout)return setTimeout(g,0);if((s===u||!s)&&setTimeout)return s=setTimeout,setTimeout(g,0);try{return s(g,0)}catch{try{return s.call(null,g,0)}catch{return s.call(this,g,0)}}}function d(g){if(l===clearTimeout)return clearTimeout(g);if((l===o||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(g);try{return l(g)}catch{try{return l.call(null,g)}catch{return l.call(this,g)}}}var h=[],y=!1,m,v=-1;function p(){!y||!m||(y=!1,m.length?h=m.concat(h):v=-1,h.length&&E())}function E(){if(!y){var g=f(p);y=!0;for(var b=h.length;b;){for(m=h,h=[];++v<b;)m&&m[v].run();v=-1,b=h.length}m=null,y=!1,d(g)}}a.nextTick=function(g){var b=new Array(arguments.length-1);if(arguments.length>1)for(var A=1;A<arguments.length;A++)b[A-1]=arguments[A];h.push(new S(g,b)),h.length===1&&!y&&f(E)};function S(g,b){this.fun=g,this.array=b}S.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={};function w(){}a.on=w,a.addListener=w,a.once=w,a.off=w,a.removeListener=w,a.removeAllListeners=w,a.emit=w,a.prependListener=w,a.prependOnceListener=w,a.listeners=function(g){return[]},a.binding=function(g){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(g){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],15:[function(t,r,i){var a=t("escodegen").generate;r.exports=function(s,l){l||(l={});var u={},o=function f(d,h){if(d.type==="Literal")return d.value;if(d.type==="UnaryExpression"){var y=f(d.argument);return d.operator==="+"?+y:d.operator==="-"?-y:d.operator==="~"?~y:d.operator==="!"?!y:u}else if(d.type==="ArrayExpression"){for(var m=[],v=0,p=d.elements.length;v<p;v++){var E=f(d.elements[v]);if(E===u)return u;m.push(E)}return m}else if(d.type==="ObjectExpression"){for(var S={},v=0;v<d.properties.length;v++){var w=d.properties[v],g=w.value===null?w.value:f(w.value);if(g===u)return u;S[w.key.value||w.key.name]=g}return S}else if(d.type==="BinaryExpression"||d.type==="LogicalExpression"){var p=f(d.left);if(p===u)return u;var b=f(d.right);if(b===u)return u;var A=d.operator;return A==="=="?p==b:A==="==="?p===b:A==="!="?p!=b:A==="!=="?p!==b:A==="+"?p+b:A==="-"?p-b:A==="*"?p*b:A==="/"?p/b:A==="%"?p%b:A==="<"?p<b:A==="<="?p<=b:A===">"?p>b:A===">="?p>=b:A==="|"?p|b:A==="&"?p&b:A==="^"?p^b:A==="&&"?p&&b:A==="||"?p||b:u}else{if(d.type==="Identifier")return{}.hasOwnProperty.call(l,d.name)?l[d.name]:u;if(d.type==="ThisExpression")return{}.hasOwnProperty.call(l,"this")?l.this:u;if(d.type==="CallExpression"){var q=f(d.callee);if(q===u||typeof q!="function")return u;var x=d.callee.object?f(d.callee.object):u;x===u&&(x=null);for(var D=[],v=0,p=d.arguments.length;v<p;v++){var E=f(d.arguments[v]);if(E===u)return u;D.push(E)}return q.apply(x,D)}else if(d.type==="MemberExpression"){var S=f(d.object);if(S===u||typeof S=="function")return u;if(d.property.type==="Identifier")return S[d.property.name];var w=f(d.property);return w===u?u:S[w]}else if(d.type==="ConditionalExpression"){var y=f(d.test);return y===u?u:f(y?d.consequent:d.alternate)}else if(d.type==="ExpressionStatement"){var y=f(d.expression);return y===u?u:y}else{if(d.type==="ReturnStatement")return f(d.argument);if(d.type==="FunctionExpression"){var j=d.body.body,F={};Object.keys(l).forEach(function(Z){F[Z]=l[Z]});for(var v=0;v<d.params.length;v++){var N=d.params[v];if(N.type=="Identifier")l[N.name]=null;else return u}for(var v in j)if(f(j[v])===u)return u;l=F;var B=Object.keys(l),U=B.map(function(Z){return l[Z]});return Function(B.join(", "),"return "+a(d)).apply(null,U)}else if(d.type==="TemplateLiteral"){for(var H="",v=0;v<d.expressions.length;v++)H+=f(d.quasis[v]),H+=f(d.expressions[v]);return H+=f(d.quasis[v]),H}else if(d.type==="TaggedTemplateExpression"){var z=f(d.tag),K=d.quasi,W=K.quasis.map(f),te=K.expressions.map(f);return z.apply(null,[W].concat(te))}else return d.type==="TemplateElement"?d.value.cooked:u}}}(s);return o===u?void 0:o}},{escodegen:12}],jsonpath:[function(t,r,i){r.exports=t("./lib/index")},{"./lib/index":5}]},{},["jsonpath"])("jsonpath")})}(jsonpath$1)),jsonpath$1.exports}var jsonpathExports=requireJsonpath();const jsonpath=getDefaultExportFromCjs(jsonpathExports);function jsonToItems(n,e){let t=[];return e.forEach(i=>{let a=[];try{a=jsonpath.paths(n,i.json_path),t.push({field_id:i.field_id,json_paths:a,json_paths_length:a.length})}catch(s){console.log(s)}}),t.sort((i,a)=>a.json_paths_length-i.json_paths_length),getPathForItems(t).map(i=>({fields:i.fields.map(a=>({field_id:a.field_id,field_value:jsonpath.value(n,a.json_path)}))}))}function bestMatch(n,e){let t=[];return e.forEach(r=>{t.push({path_to_compare:r,match_coefficient:0})}),n.forEach((r,i)=>{for(var a=0;a<t.length;a++)t[a].path_to_compare[i]==r&&(t[a].match_coefficient+=1/(i+1))}),t.sort((r,i)=>i.match_coefficient-r.match_coefficient),t[0].path_to_compare}function getPathForItems(n){let e=[];return n.length&&n[0].json_paths.forEach(t=>{let r={fields:[]};n.forEach(i=>{r.fields.push({field_id:i.field_id,json_path:bestMatch(t,i.json_paths)})}),e.push(r)}),e}function populateWithItemRef(n,e,t,r,i,a){let s=[];const l=function(u,o){let f=getFieldById(o,i);f&&(f.field_value=a+"."+u.item_id,s.push(o))};return t.forEach(u=>{n.forEach(o=>{compareTwoItemsByFieldId(o,u,e,r,l)})}),s}function mergeItems(n,e,t){let r=JSON.parse(JSON.stringify(n)),i=JSON.parse(JSON.stringify(e)),a=[];const s=function(f,d){a.push(mergeTwoItems(f,d))},l=function(f){a.push(f)},u=function(f){a.push(f)};return t?compareItemsByFieldId(r,i,t,s,l,u):compareItemsByItemId(r,i,s,l,u,function(f){a.push(f)}),a}function compareItems(n,e,t){const r=JSON.parse(JSON.stringify(n)),i=JSON.parse(JSON.stringify(e));let a={is_items_diff:!1,new_src_items:[],diff_src_items:[],same_items:[],trash_src_items:[]};const s=function(f){a.diff_src_items.push(f)},l=function(f){a.same_items.push(f)},u=function(f){a.new_src_items.push(f)},o=function(f){a.trash_src_items.push(f)};return t&&compareItemsByFieldId(r,i,t,s,l,u),t||compareItemsByItemId(r,i,s,l,u,null,o),a.is_items_diff=a.new_src_items.length>0||a.diff_src_items.length>0,a}function mergeTwoItems(n,e){return n.fields.forEach(t=>{let r=getFieldById(e,t.field_id);r?(r.field_value=t.field_value,t.history&&r.history&&(r.history=t.history.concat(r.history))):e.fields.push(t)}),e}function compareItemsByFieldId(n,e,t,r,i,a){n.forEach(s=>{let l=!0,u=getFieldById(s,t).field_value;e.forEach(o=>{let f=getFieldById(o,t).field_value;u==f&&(l=!1,compareTwoItems(s,o,r,i))}),l&&a(s)})}function compareItemsByItemId(n,e,t,r,i,a,s){let l=new ItemsMapper(e);if(n.forEach(u=>{let o=l.pullItemIndex(u.item_id);o!=null?compareTwoItems(u,e[o],t,r,s):(u.trash&&s(u),u.trash||i(u))}),a)for(const[u,o]of Object.entries(l.itemsMap))a(e[o])}function compareTwoItems(n,e,t,r,i){let a=!0;for(let s=0;s<n.fields.length;s++){let l=getFieldById(e,n.fields[s].field_id);l?l.field_value!=n.fields[s].field_value&&(a=a&&!1):a=a&&!1}a&&(n.trash&&i(n,e),n.trash||r(n,e)),a||(n.trash&&i(n,e),n.trash||t(n,e))}function compareTwoItemsByFieldId(n,e,t,r,i){let a=getFieldById(n,t).field_value,s=getFieldById(e,r).field_value;a==s&&i(n,e)}function getFieldById(n,e){let t=null;for(let r=0;r<n.fields.length;r++)e==n.fields[r].field_id&&(t=n.fields[r]);return t}class ItemsMapper{constructor(e){this._itemsMap={},e.forEach((t,r)=>{this._itemsMap[t.item_id]=r})}pullItemIndex(e){let t=this._itemsMap[e];return delete this._itemsMap[e],t}getItemIndex(e){return this._itemsMap[e]}get itemsMap(){return this._itemsMap}}function group(n,e){let t=[],r;n?r=n.split(","):t=e;let i=new Set;n&&e.forEach(s=>{let l="";r.forEach((u,o)=>{const f=s.fields.find(d=>d.field_id==u);f&&(l+=f.field_value),r.length-1==o&&a(l)&&t.push(s)})});function a(s){const l=!i.has(s);return l&&i.add(s),l}return t}function populateItems(n,e,t){var r=JSON.parse(JSON.stringify(n));return t?populateItemsAndKeepOtherValues(r,e):populateItemsAndEraseOtherValues(r,e)}function populateItemsAndKeepOtherValues(n,e){return n.forEach(t=>{e.forEach(r=>{let i=t.fields.find(a=>a.element_id==r.element_id);i?i.field_value=r.field_value:(r.field_id=r.element_id,t.fields.push(r))})}),n}function populateItemsAndEraseOtherValues(n,e){return n.forEach(t=>{t.fields=[].concat(e)}),n}var add$1={exports:{}},interopRequireDefault={exports:{}},hasRequiredInteropRequireDefault;function requireInteropRequireDefault(){return hasRequiredInteropRequireDefault||(hasRequiredInteropRequireDefault=1,function(n){function e(t){return t&&t.__esModule?t:{default:t}}n.exports=e,n.exports.__esModule=!0,n.exports.default=n.exports}(interopRequireDefault)),interopRequireDefault.exports}var _typeof={exports:{}},hasRequired_typeof;function require_typeof(){return hasRequired_typeof||(hasRequired_typeof=1,function(n){function e(t){"@babel/helpers - typeof";return n.exports=e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},n.exports.__esModule=!0,n.exports.default=n.exports,e(t)}n.exports=e,n.exports.__esModule=!0,n.exports.default=n.exports}(_typeof)),_typeof.exports}var addDays={exports:{}},toInteger={exports:{}},hasRequiredToInteger;function requireToInteger(){return hasRequiredToInteger||(hasRequiredToInteger=1,function(n,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(r){if(r===null||r===!0||r===!1)return NaN;var i=Number(r);return isNaN(i)?i:i<0?Math.ceil(i):Math.floor(i)}n.exports=e.default}(toInteger,toInteger.exports)),toInteger.exports}var toDate={exports:{}},requiredArgs={exports:{}},hasRequiredRequiredArgs;function requireRequiredArgs(){return hasRequiredRequiredArgs||(hasRequiredRequiredArgs=1,function(n,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(r,i){if(i.length<r)throw new TypeError(r+" argument"+(r>1?"s":"")+" required, but only "+i.length+" present")}n.exports=e.default}(requiredArgs,requiredArgs.exports)),requiredArgs.exports}var hasRequiredToDate;function requireToDate(){return hasRequiredToDate||(hasRequiredToDate=1,function(n,e){var t=requireInteropRequireDefault().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var r=t(require_typeof()),i=t(requireRequiredArgs());function a(s){(0,i.default)(1,arguments);var l=Object.prototype.toString.call(s);return s instanceof Date||(0,r.default)(s)==="object"&&l==="[object Date]"?new Date(s.getTime()):typeof s=="number"||l==="[object Number]"?new Date(s):((typeof s=="string"||l==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}n.exports=e.default}(toDate,toDate.exports)),toDate.exports}var hasRequiredAddDays;function requireAddDays(){return hasRequiredAddDays||(hasRequiredAddDays=1,function(n,e){var t=requireInteropRequireDefault().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var r=t(requireToInteger()),i=t(requireToDate()),a=t(requireRequiredArgs());function s(l,u){(0,a.default)(2,arguments);var o=(0,i.default)(l),f=(0,r.default)(u);return isNaN(f)?new Date(NaN):(f&&o.setDate(o.getDate()+f),o)}n.exports=e.default}(addDays,addDays.exports)),addDays.exports}var addMonths={exports:{}},hasRequiredAddMonths;function requireAddMonths(){return hasRequiredAddMonths||(hasRequiredAddMonths=1,function(n,e){var t=requireInteropRequireDefault().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var r=t(requireToInteger()),i=t(requireToDate()),a=t(requireRequiredArgs());function s(l,u){(0,a.default)(2,arguments);var o=(0,i.default)(l),f=(0,r.default)(u);if(isNaN(f))return new Date(NaN);if(!f)return o;var d=o.getDate(),h=new Date(o.getTime());h.setMonth(o.getMonth()+f+1,0);var y=h.getDate();return d>=y?h:(o.setFullYear(h.getFullYear(),h.getMonth(),d),o)}n.exports=e.default}(addMonths,addMonths.exports)),addMonths.exports}var hasRequiredAdd;function requireAdd(){return hasRequiredAdd||(hasRequiredAdd=1,function(n,e){var t=requireInteropRequireDefault().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=t(require_typeof()),i=t(requireAddDays()),a=t(requireAddMonths()),s=t(requireToDate()),l=t(requireRequiredArgs()),u=t(requireToInteger());function o(f,d){if((0,l.default)(2,arguments),!d||(0,r.default)(d)!=="object")return new Date(NaN);var h=d.years?(0,u.default)(d.years):0,y=d.months?(0,u.default)(d.months):0,m=d.weeks?(0,u.default)(d.weeks):0,v=d.days?(0,u.default)(d.days):0,p=d.hours?(0,u.default)(d.hours):0,E=d.minutes?(0,u.default)(d.minutes):0,S=d.seconds?(0,u.default)(d.seconds):0,w=(0,s.default)(f),g=y||h?(0,a.default)(w,y+h*12):w,b=v||m?(0,i.default)(g,v+m*7):g,A=E+p*60,q=S+A*60,x=q*1e3,D=new Date(b.getTime()+x);return D}n.exports=e.default}(add$1,add$1.exports)),add$1.exports}var addExports=requireAdd();const add=getDefaultExportFromCjs(addExports);var setDay$1={exports:{}},defaultOptions={},hasRequiredDefaultOptions;function requireDefaultOptions(){if(hasRequiredDefaultOptions)return defaultOptions;hasRequiredDefaultOptions=1,Object.defineProperty(defaultOptions,"__esModule",{value:!0}),defaultOptions.getDefaultOptions=e,defaultOptions.setDefaultOptions=t;var n={};function e(){return n}function t(r){n=r}return defaultOptions}var hasRequiredSetDay;function requireSetDay(){return hasRequiredSetDay||(hasRequiredSetDay=1,function(n,e){var t=requireInteropRequireDefault().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=u;var r=t(requireAddDays()),i=t(requireToDate()),a=t(requireToInteger()),s=t(requireRequiredArgs()),l=requireDefaultOptions();function u(o,f,d){var h,y,m,v,p,E,S,w;(0,s.default)(2,arguments);var g=(0,l.getDefaultOptions)(),b=(0,a.default)((h=(y=(m=(v=d==null?void 0:d.weekStartsOn)!==null&&v!==void 0?v:d==null||(p=d.locale)===null||p===void 0||(E=p.options)===null||E===void 0?void 0:E.weekStartsOn)!==null&&m!==void 0?m:g.weekStartsOn)!==null&&y!==void 0?y:(S=g.locale)===null||S===void 0||(w=S.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&h!==void 0?h:0);if(!(b>=0&&b<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var A=(0,i.default)(o),q=(0,a.default)(f),x=A.getDay(),D=q%7,j=(D+7)%7,F=7-b,N=q<0||q>6?q-(x+F)%7:(j+F)%7-(x+F)%7;return(0,r.default)(A,N)}n.exports=e.default}(setDay$1,setDay$1.exports)),setDay$1.exports}var setDayExports=requireSetDay();const setDay=getDefaultExportFromCjs(setDayExports);var isSameWeek$1={exports:{}},startOfWeek={exports:{}},hasRequiredStartOfWeek;function requireStartOfWeek(){return hasRequiredStartOfWeek||(hasRequiredStartOfWeek=1,function(n,e){var t=requireInteropRequireDefault().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var r=t(requireToDate()),i=t(requireToInteger()),a=t(requireRequiredArgs()),s=requireDefaultOptions();function l(u,o){var f,d,h,y,m,v,p,E;(0,a.default)(1,arguments);var S=(0,s.getDefaultOptions)(),w=(0,i.default)((f=(d=(h=(y=o==null?void 0:o.weekStartsOn)!==null&&y!==void 0?y:o==null||(m=o.locale)===null||m===void 0||(v=m.options)===null||v===void 0?void 0:v.weekStartsOn)!==null&&h!==void 0?h:S.weekStartsOn)!==null&&d!==void 0?d:(p=S.locale)===null||p===void 0||(E=p.options)===null||E===void 0?void 0:E.weekStartsOn)!==null&&f!==void 0?f:0);if(!(w>=0&&w<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=(0,r.default)(u),b=g.getDay(),A=(b<w?7:0)+b-w;return g.setDate(g.getDate()-A),g.setHours(0,0,0,0),g}n.exports=e.default}(startOfWeek,startOfWeek.exports)),startOfWeek.exports}var hasRequiredIsSameWeek;function requireIsSameWeek(){return hasRequiredIsSameWeek||(hasRequiredIsSameWeek=1,function(n,e){var t=requireInteropRequireDefault().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var r=t(requireStartOfWeek()),i=t(requireRequiredArgs());function a(s,l,u){(0,i.default)(2,arguments);var o=(0,r.default)(s,u),f=(0,r.default)(l,u);return o.getTime()===f.getTime()}n.exports=e.default}(isSameWeek$1,isSameWeek$1.exports)),isSameWeek$1.exports}var isSameWeekExports=requireIsSameWeek();const isSameWeek=getDefaultExportFromCjs(isSameWeekExports);function populateWithDate(n,e){return n.forEach(t=>{e.forEach(r=>{let i=t.fields.find(a=>a.element_id==r.element_id);i?r.data_range?(r.date_type.includes("calendar"),i.field_value="".concat(getStartDate(r.date_type),":").concat(getDate(r.date_type))):i.field_value=getDate(r.date_type):t.fields.push({field_id:r.element_id,element_id:r.element_id,field_value:getDate(r.date_type)})})}),n}function getStartDate(n){let e=new Date;function t(i){var a=i.getDay();let s;n.includes("week_current,current")&&(s=0),n.includes("week_next,future")&&(s=7),n.includes("week_past,past")&&(s=-7);let l=i.getDate()-a+s+(a==0?-6:1);return new Date(i.setDate(l))}function r(i){let a,s,l=Math.floor(i.getMonth()/3),u=i.getFullYear();return n.includes("quarter_current,current")&&(a=0,s=0),n.includes("quarter_next,future")&&(a=3,s=0),n.includes("quarter_past,past")&&(a=-3,s=0),new Date(u,l*3+a,1+s)}switch(n){case"week_current,current":return t(new Date).getTime();case"month_current,current":return new Date(e.getFullYear(),e.getMonth(),1).getTime();case"quarter_current,current":return r(new Date).getTime();case"year_current,current":return add(new Date(e.getFullYear(),0,1),{years:0}).getTime();case"week_next,future":return t(new Date).getTime();case"month_next,future":return new Date(e.getFullYear(),e.getMonth()+1,1).getTime();case"quarter_next,future":return r(new Date).getTime();case"year_next,future":return add(e,{days:0}).getTime();case"week_past,past":return t(new Date).getTime();case"month_past,past":return new Date(e.getFullYear(),e.getMonth()-1,1).getTime();case"quarter_past,past":return r(new Date).getTime();case"year_past,past":return add(e,{years:-1}).getTime();case"year_past,past,calendar":return add(new Date(e.getFullYear(),0,1),{years:-1}).getTime();case"year_future,future,calendar":return add(new Date(e.getFullYear()+1,0,1),{years:0}).getTime();case"today_current,current":return add(e,{days:0}).getTime();case"tomorrow,future":return add(e,{days:1}).getTime();case"7_days_future,future":return add(e,{days:0}).getTime();case"10_days_future,future":return add(e,{days:0}).getTime();case"14_days_future,future":return add(e,{days:0}).getTime();case"30_days_future,future":return add(e,{days:0}).getTime();case"yesterday,past":return add(e,{days:-1}).getTime();case"7_days_past,past":return add(e,{days:-7}).getTime();case"10_days_past,past":return add(e,{days:-10}).getTime();case"14_days_past,past":return add(e,{days:-14}).getTime();case"30_days_past,past":return add(e,{days:-30}).getTime()}}function getDate(n){var e=new Date;function t(l){l=new Date(l);var u=l.getDay(),o=l.getDate()-u+6+(u==0?6:1);return new Date(l.setDate(o))}function r(l){l=new Date(l);var u=l.getDay(),o=l.getDate()-u+13+(u==0?-6:1);return new Date(l.setDate(o))}function i(l){l=new Date(l);var u=l.getDay(),o=l.getDate()-u-1+(u==0?-6:1);return new Date(l.setDate(o))}let a=Math.floor(e.getMonth()/3),s=e.getFullYear();switch(n){case"next_day":return add(e,{days:1}).getTime();case"two_days_after":return add(e,{days:2}).getTime();case"three_days_after":return add(e,{days:3}).getTime();case"four_days_after":return add(e,{days:4}).getTime();case"next_week":return add(e,{weeks:1}).getTime();case"two_weeks_after":return add(e,{weeks:2}).getTime();case"three_weeks_after":return add(e,{weeks:3}).getTime();case"this_sunday":return setDay(e,0,{weekStartsOn:1});case"this_monday":return setDay(e,1,{weekStartsOn:1});case"this_tuesday":return setDay(e,2,{weekStartsOn:1});case"this_wednesday":return setDay(e,3,{weekStartsOn:1});case"this_thursday":return setDay(e,4,{weekStartsOn:1});case"this_friday":return setDay(e,5,{weekStartsOn:1});case"this_saturday":return setDay(e,6,{weekStartsOn:1});case"today_current,current":return add(e,{days:0}).getTime();case"tomorrow,future":return add(e,{days:1}).getTime();case"7_days_future,future":return add(e,{days:7}).getTime();case"10_days_future,future":return add(e,{days:10}).getTime();case"14_days_future,future":return add(e,{days:14}).getTime();case"30_days_future,future":return add(e,{days:30}).getTime();case"yesterday,past":return add(e,{days:-1}).getTime();case"7_days_past,past":return add(e,{days:0}).getTime();case"10_days_past,past":return add(e,{days:0}).getTime();case"14_days_past,past":return add(e,{days:0}).getTime();case"30_days_past,past":return add(e,{days:0}).getTime();case"year_future,future,calendar":return add(new Date(e.getFullYear()+1,0,0),{years:1}).getTime();case"year_past,past,calendar":return add(new Date(e.getFullYear(),0,0),{years:0}).getTime();case"week_current,current":return t(new Date).getTime();case"month_current,current":return new Date(e.getFullYear(),e.getMonth()+1,0).getTime();case"quarter_current,current":return new Date(s,(a+1)*3,0).getTime();case"year_current,current":return add(new Date(e.getFullYear()+1,0,0),{years:0}).getTime();case"week_next,future":return r(new Date).getTime();case"month_next,future":return new Date(e.getFullYear(),e.getMonth()+2,0).getTime();case"quarter_next,future":return new Date(s,(a+1)*3+3,0).getTime();case"year_next,future":return add(e,{years:1}).getTime();case"week_past,past":return i(new Date).getTime();case"month_past,past":return new Date(e.getFullYear(),e.getMonth(),0,0).getTime();case"quarter_past,past":return new Date(s,(a+1)*3-3,0).getTime();case"year_past,past":return add(e,{days:0}).getTime();case"now":default:return e.getTime()}}function checkRecurringDate(n,e){n=new Date(n);let t=new Date;switch(e){case"day":return n.getDate()+"."+n.getMonth()==t.getDate()+"."+t.getMonth();case"week":let r=new Date().getFullYear(),i=new Date(r,n.getMonth(),n.getDate());return isSameWeek(i,t);case"month":return n.getMonth()===t.getMonth();default:return!0}}function mergeObjects(n,e,t){return deepmerge(n,e,t)}function isMergeableObject(n){var e=n&&typeof n=="object";return e&&Object.prototype.toString.call(n)!=="[object RegExp]"&&Object.prototype.toString.call(n)!=="[object Date]"}function emptyTarget(n){return Array.isArray(n)?[]:{}}function cloneIfNecessary(n,e){var t=e&&e.clone===!0;return t&&isMergeableObject(n)?deepmerge(emptyTarget(n),n,e):n}function defaultArrayMerge(n,e,t){var r=n.slice();return e.forEach(function(i,a){typeof r[a]>"u"?r[a]=cloneIfNecessary(i,t):isMergeableObject(i)?r[a]=deepmerge(n[a],i,t):n.indexOf(i)===-1&&r.push(cloneIfNecessary(i,t))}),r}function mergeObject(n,e,t){var r={};return isMergeableObject(n)&&Object.keys(n).forEach(function(i){r[i]=cloneIfNecessary(n[i],t)}),Object.keys(e).forEach(function(i){!isMergeableObject(e[i])||!n[i]?r[i]=cloneIfNecessary(e[i],t):r[i]=deepmerge(n[i],e[i],t)}),r}function deepmerge(n,e,t){n=n!==void 0?n:{},e=e!==void 0?e:{};var r=Array.isArray(e),i=t||{arrayMerge:defaultArrayMerge},a=i.arrayMerge||defaultArrayMerge;return r?Array.isArray(n)?a(n,e,t):cloneIfNecessary(e,t):mergeObject(n,e,t)}deepmerge.all=function(e,t){if(!Array.isArray(e)||e.length<2)throw new Error("first argument should be an array with at least two elements");return e.reduce(function(r,i){return deepmerge(r,i,t)})};function mergeChunks$1(n){const e={};return n.forEach(t=>{t.items_list.forEach(r=>{const i=e[r.item_id];return i?(i.trash=r.trash,r.fields.forEach(a=>{let s=!0;i.fields=i.fields.map(l=>Number(l.field_id)===Number(a.field_id)?(s=!1,l.field_value!=a.field_value?_objectSpread2(_objectSpread2({},a),{},{history:a.history.concat(l.history)}):l):l),s&&i.fields.push(a)})):e[r.item_id]=r})}),Object.values(e)}self.onmessage=function(n){const e=mergeChunks$1(n.data);self.postMessage(e)};function mergeChunks(n){return mergeChunks$1(n)}function makeNestedList(n,e,t,r,i){let a=JSON.parse(JSON.stringify(n)),s=r||"children",l=i||!1,u;for(u=0;u<a.length;u++)a[u][t]&&a[u][t]!==0&&a.forEach(d=>{a[u][t]==d[e]?(d[s]||(d[s]=[]),d[s].push(a[u]),a.splice(u,1),u==0?u=0:u--):d[s]&&o(d)});function o(d){d[s].forEach(h=>{h[e]==a[u][t]?(h[s]||(h[s]=[]),h[s].push(a[u]),a.splice(u,1),u==0?u=0:u--):h[s]&&o(h)})}function f(d){d.sort((h,y)=>h[l]-y[l]),d.forEach(h=>{h[s]&&f(h[s])})}return l&&f(a),a}class FieldsOperator{constructor(e){this.gudhub=e}mergeFieldLists(e,t){let r=JSON.parse(JSON.stringify(e)),i=JSON.parse(JSON.stringify(t)),a=i.map(s=>s.field_id);return i.length?i.reduce((s,l)=>{let u=null;if(s.find((f,d)=>l.field_id==f.field_id?(u=d,!0):!1))s[u]=this.gudhub.util.mergeObjects(s[u],l);else{let f=l.data_model&&l.data_model.interpretation?l.data_model.interpretation.find(d=>d.src=="table")||{settings:{show_field:1}}:{settings:{show_field:1}};if(f.settings.show_field){let d=this.gudhub.util.mergeObjects({show:1},f),h=this.gudhub.util.mergeObjects(d,l);s.push(h)}}return s},r).filter(function(s){return s.show&&a.indexOf(s.field_id)!=-1}):[]}createFieldsListToView(e,t){const r=this;return new Promise(async i=>{let a=await this.gudhub.getFieldModels(e);if(t.length!==0){let l=[];t.forEach((u,o)=>{let f=a.find(d=>u.field_id==d.field_id);f&&(f.data_model.interpretation.find(d=>d.src=="table"),l.push({field_id:f.field_id,show:u.show,width:u.width?u.width:"150px"})),o+1==t.length&&s(l)})}else s(t);function s(l){let u=0;a.forEach((o,f)=>{l.find(h=>o.field_id==h.field_id)?(u==a.length-1&&i(l),u++):r.gudhub.ghconstructor.getInstance(o.data_type).then(h=>{if(h){let m=h.getTemplate().model.data_model.interpretation.find(v=>v.src=="table");m||(m={settings:{show_field:1}}),l.push({field_id:o.field_id,show:m.settings.show_field}),u==a.length-1&&i(l)}u++},function(y){u++})})}})}createFieldsListToViewWithDataType(e,t){return new Promise(async r=>{let i=[],a=await this.gudhub.getFieldModels(e),s=a.map(u=>+u.field_id);const l=[];i=a.reduce((u,o)=>(u.find((d,h)=>o.field_id==d.field_id)||(u.push({field_id:o.field_id,data_type:o.data_type}),l.push(new Promise(async d=>{const m=(await this.gudhub.ghconstructor.getInstance(o.data_type)).getTemplate().model.data_model.interpretation.find(v=>v.src=="table")||{settings:{show_field:1}};u.find(v=>v.field_id==o.field_id).show=m.settings.show_field,d(!0)}))),u),t),Promise.all(l).then(()=>{i=i.filter(u=>s.indexOf(u.field_id)!=-1),r(i)})})}}class ItemsSelection{constructor(e){this.gudhub=e,this.selectedItems={}}async selectItems(e,t){if(!this.selectedItems.hasOwnProperty(e)){this.selectedItems[e]={items:[],app:[]};let a=await this.gudhub.getApp(e);this.selectedItems[e].app=a}let r=this.selectedItems[e],i=r.items.map(a=>a.item_id);t.forEach(a=>{i.indexOf(a.item_id)!=-1?r.items.splice(i.indexOf(a.item_id),1):r.items[r.items.length]=a})}getSelectedItems(e){return this.selectedItems[e]?this.selectedItems[e]:{items:[],app:[]}}clearSelectedItems(e){this.selectedItems[e]&&(this.selectedItems[e].items=[])}isItemSelected(e,t){let r=this.getSelectedItems(e);return r!==null?(r=r.items.map(i=>i.item_id),r.indexOf(t)!=-1):!1}}function compare_items_lists_Worker(){return`function createList(items) {
|
|
25
|
+
`)+" "+$[1]:$[0]+k+" "+C.join(", ")+" "+$[1]}function g(C){return Array.isArray(C)}i.isArray=g;function b(C){return typeof C=="boolean"}i.isBoolean=b;function A(C){return C===null}i.isNull=A;function q(C){return C==null}i.isNullOrUndefined=q;function x(C){return typeof C=="number"}i.isNumber=x;function D(C){return typeof C=="string"}i.isString=D;function j(C){return typeof C=="symbol"}i.isSymbol=j;function F(C){return C===void 0}i.isUndefined=F;function M(C){return B(C)&&W(C)==="[object RegExp]"}i.isRegExp=M;function B(C){return typeof C=="object"&&C!==null}i.isObject=B;function U(C){return B(C)&&W(C)==="[object Date]"}i.isDate=U;function H(C){return B(C)&&(W(C)==="[object Error]"||C instanceof Error)}i.isError=H;function z(C){return typeof C=="function"}i.isFunction=z;function K(C){return C===null||typeof C=="boolean"||typeof C=="number"||typeof C=="string"||typeof C=="symbol"||typeof C>"u"}i.isPrimitive=K,i.isBuffer=t("./support/isBuffer");function W(C){return Object.prototype.toString.call(C)}function te(C){return C<10?"0"+C.toString(10):C.toString(10)}var Z=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function V(){var C=new Date,k=[te(C.getHours()),te(C.getMinutes()),te(C.getSeconds())].join(":");return[C.getDate(),Z[C.getMonth()],k].join(" ")}i.log=function(){console.log("%s - %s",V(),i.format.apply(i,arguments))},i.inherits=t("inherits"),i._extend=function(C,k){if(!k||!B(k))return C;for(var $=Object.keys(k),Q=$.length;Q--;)C[$[Q]]=k[$[Q]];return C};function pe(C,k){return Object.prototype.hasOwnProperty.call(C,k)}}).call(this,t("_process"),typeof commonjsGlobal<"u"?commonjsGlobal:typeof self<"u"?self:typeof window<"u"?window:{})},{"./support/isBuffer":10,_process:14,inherits:9}],12:[function(t,r,i){},{}],13:[function(t,r,i){(function(a){function s(f,d){for(var h=0,y=f.length-1;y>=0;y--){var m=f[y];m==="."?f.splice(y,1):m===".."?(f.splice(y,1),h++):h&&(f.splice(y,1),h--)}if(d)for(;h--;h)f.unshift("..");return f}i.resolve=function(){for(var f="",d=!1,h=arguments.length-1;h>=-1&&!d;h--){var y=h>=0?arguments[h]:a.cwd();if(typeof y!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!y)continue;f=y+"/"+f,d=y.charAt(0)==="/"}return f=s(u(f.split("/"),function(m){return!!m}),!d).join("/"),(d?"/":"")+f||"."},i.normalize=function(f){var d=i.isAbsolute(f),h=o(f,-1)==="/";return f=s(u(f.split("/"),function(y){return!!y}),!d).join("/"),!f&&!d&&(f="."),f&&h&&(f+="/"),(d?"/":"")+f},i.isAbsolute=function(f){return f.charAt(0)==="/"},i.join=function(){var f=Array.prototype.slice.call(arguments,0);return i.normalize(u(f,function(d,h){if(typeof d!="string")throw new TypeError("Arguments to path.join must be strings");return d}).join("/"))},i.relative=function(f,d){f=i.resolve(f).substr(1),d=i.resolve(d).substr(1);function h(w){for(var g=0;g<w.length&&w[g]==="";g++);for(var b=w.length-1;b>=0&&w[b]==="";b--);return g>b?[]:w.slice(g,b-g+1)}for(var y=h(f.split("/")),m=h(d.split("/")),v=Math.min(y.length,m.length),p=v,E=0;E<v;E++)if(y[E]!==m[E]){p=E;break}for(var S=[],E=p;E<y.length;E++)S.push("..");return S=S.concat(m.slice(p)),S.join("/")},i.sep="/",i.delimiter=":",i.dirname=function(f){if(typeof f!="string"&&(f=f+""),f.length===0)return".";for(var d=f.charCodeAt(0),h=d===47,y=-1,m=!0,v=f.length-1;v>=1;--v)if(d=f.charCodeAt(v),d===47){if(!m){y=v;break}}else m=!1;return y===-1?h?"/":".":h&&y===1?"/":f.slice(0,y)};function l(f){typeof f!="string"&&(f=f+"");var d=0,h=-1,y=!0,m;for(m=f.length-1;m>=0;--m)if(f.charCodeAt(m)===47){if(!y){d=m+1;break}}else h===-1&&(y=!1,h=m+1);return h===-1?"":f.slice(d,h)}i.basename=function(f,d){var h=l(f);return d&&h.substr(-1*d.length)===d&&(h=h.substr(0,h.length-d.length)),h},i.extname=function(f){typeof f!="string"&&(f=f+"");for(var d=-1,h=0,y=-1,m=!0,v=0,p=f.length-1;p>=0;--p){var E=f.charCodeAt(p);if(E===47){if(!m){h=p+1;break}continue}y===-1&&(m=!1,y=p+1),E===46?d===-1?d=p:v!==1&&(v=1):d!==-1&&(v=-1)}return d===-1||y===-1||v===0||v===1&&d===y-1&&d===h+1?"":f.slice(d,y)};function u(f,d){if(f.filter)return f.filter(d);for(var h=[],y=0;y<f.length;y++)d(f[y],y,f)&&h.push(f[y]);return h}var o="ab".substr(-1)==="b"?function(f,d,h){return f.substr(d,h)}:function(f,d,h){return d<0&&(d=f.length+d),f.substr(d,h)}}).call(this,t("_process"))},{_process:14}],14:[function(t,r,i){var a=r.exports={},s,l;function u(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?s=setTimeout:s=u}catch{s=u}try{typeof clearTimeout=="function"?l=clearTimeout:l=o}catch{l=o}})();function f(g){if(s===setTimeout)return setTimeout(g,0);if((s===u||!s)&&setTimeout)return s=setTimeout,setTimeout(g,0);try{return s(g,0)}catch{try{return s.call(null,g,0)}catch{return s.call(this,g,0)}}}function d(g){if(l===clearTimeout)return clearTimeout(g);if((l===o||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(g);try{return l(g)}catch{try{return l.call(null,g)}catch{return l.call(this,g)}}}var h=[],y=!1,m,v=-1;function p(){!y||!m||(y=!1,m.length?h=m.concat(h):v=-1,h.length&&E())}function E(){if(!y){var g=f(p);y=!0;for(var b=h.length;b;){for(m=h,h=[];++v<b;)m&&m[v].run();v=-1,b=h.length}m=null,y=!1,d(g)}}a.nextTick=function(g){var b=new Array(arguments.length-1);if(arguments.length>1)for(var A=1;A<arguments.length;A++)b[A-1]=arguments[A];h.push(new S(g,b)),h.length===1&&!y&&f(E)};function S(g,b){this.fun=g,this.array=b}S.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={};function w(){}a.on=w,a.addListener=w,a.once=w,a.off=w,a.removeListener=w,a.removeAllListeners=w,a.emit=w,a.prependListener=w,a.prependOnceListener=w,a.listeners=function(g){return[]},a.binding=function(g){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(g){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],15:[function(t,r,i){var a=t("escodegen").generate;r.exports=function(s,l){l||(l={});var u={},o=function f(d,h){if(d.type==="Literal")return d.value;if(d.type==="UnaryExpression"){var y=f(d.argument);return d.operator==="+"?+y:d.operator==="-"?-y:d.operator==="~"?~y:d.operator==="!"?!y:u}else if(d.type==="ArrayExpression"){for(var m=[],v=0,p=d.elements.length;v<p;v++){var E=f(d.elements[v]);if(E===u)return u;m.push(E)}return m}else if(d.type==="ObjectExpression"){for(var S={},v=0;v<d.properties.length;v++){var w=d.properties[v],g=w.value===null?w.value:f(w.value);if(g===u)return u;S[w.key.value||w.key.name]=g}return S}else if(d.type==="BinaryExpression"||d.type==="LogicalExpression"){var p=f(d.left);if(p===u)return u;var b=f(d.right);if(b===u)return u;var A=d.operator;return A==="=="?p==b:A==="==="?p===b:A==="!="?p!=b:A==="!=="?p!==b:A==="+"?p+b:A==="-"?p-b:A==="*"?p*b:A==="/"?p/b:A==="%"?p%b:A==="<"?p<b:A==="<="?p<=b:A===">"?p>b:A===">="?p>=b:A==="|"?p|b:A==="&"?p&b:A==="^"?p^b:A==="&&"?p&&b:A==="||"?p||b:u}else{if(d.type==="Identifier")return{}.hasOwnProperty.call(l,d.name)?l[d.name]:u;if(d.type==="ThisExpression")return{}.hasOwnProperty.call(l,"this")?l.this:u;if(d.type==="CallExpression"){var q=f(d.callee);if(q===u||typeof q!="function")return u;var x=d.callee.object?f(d.callee.object):u;x===u&&(x=null);for(var D=[],v=0,p=d.arguments.length;v<p;v++){var E=f(d.arguments[v]);if(E===u)return u;D.push(E)}return q.apply(x,D)}else if(d.type==="MemberExpression"){var S=f(d.object);if(S===u||typeof S=="function")return u;if(d.property.type==="Identifier")return S[d.property.name];var w=f(d.property);return w===u?u:S[w]}else if(d.type==="ConditionalExpression"){var y=f(d.test);return y===u?u:f(y?d.consequent:d.alternate)}else if(d.type==="ExpressionStatement"){var y=f(d.expression);return y===u?u:y}else{if(d.type==="ReturnStatement")return f(d.argument);if(d.type==="FunctionExpression"){var j=d.body.body,F={};Object.keys(l).forEach(function(Z){F[Z]=l[Z]});for(var v=0;v<d.params.length;v++){var M=d.params[v];if(M.type=="Identifier")l[M.name]=null;else return u}for(var v in j)if(f(j[v])===u)return u;l=F;var B=Object.keys(l),U=B.map(function(Z){return l[Z]});return Function(B.join(", "),"return "+a(d)).apply(null,U)}else if(d.type==="TemplateLiteral"){for(var H="",v=0;v<d.expressions.length;v++)H+=f(d.quasis[v]),H+=f(d.expressions[v]);return H+=f(d.quasis[v]),H}else if(d.type==="TaggedTemplateExpression"){var z=f(d.tag),K=d.quasi,W=K.quasis.map(f),te=K.expressions.map(f);return z.apply(null,[W].concat(te))}else return d.type==="TemplateElement"?d.value.cooked:u}}}(s);return o===u?void 0:o}},{escodegen:12}],jsonpath:[function(t,r,i){r.exports=t("./lib/index")},{"./lib/index":5}]},{},["jsonpath"])("jsonpath")})}(jsonpath$1)),jsonpath$1.exports}var jsonpathExports=requireJsonpath();const jsonpath=getDefaultExportFromCjs(jsonpathExports);function jsonToItems(n,e){let t=[];return e.forEach(i=>{let a=[];try{a=jsonpath.paths(n,i.json_path),t.push({field_id:i.field_id,json_paths:a,json_paths_length:a.length})}catch(s){console.log(s)}}),t.sort((i,a)=>a.json_paths_length-i.json_paths_length),getPathForItems(t).map(i=>({fields:i.fields.map(a=>({field_id:a.field_id,field_value:jsonpath.value(n,a.json_path)}))}))}function bestMatch(n,e){let t=[];return e.forEach(r=>{t.push({path_to_compare:r,match_coefficient:0})}),n.forEach((r,i)=>{for(var a=0;a<t.length;a++)t[a].path_to_compare[i]==r&&(t[a].match_coefficient+=1/(i+1))}),t.sort((r,i)=>i.match_coefficient-r.match_coefficient),t[0].path_to_compare}function getPathForItems(n){let e=[];return n.length&&n[0].json_paths.forEach(t=>{let r={fields:[]};n.forEach(i=>{r.fields.push({field_id:i.field_id,json_path:bestMatch(t,i.json_paths)})}),e.push(r)}),e}function populateWithItemRef(n,e,t,r,i,a){let s=[];const l=function(u,o){let f=getFieldById(o,i);f&&(f.field_value=a+"."+u.item_id,s.push(o))};return t.forEach(u=>{n.forEach(o=>{compareTwoItemsByFieldId(o,u,e,r,l)})}),s}function mergeItems(n,e,t){let r=JSON.parse(JSON.stringify(n)),i=JSON.parse(JSON.stringify(e)),a=[];const s=function(f,d){a.push(mergeTwoItems(f,d))},l=function(f){a.push(f)},u=function(f){a.push(f)};return t?compareItemsByFieldId(r,i,t,s,l,u):compareItemsByItemId(r,i,s,l,u,function(f){a.push(f)}),a}function compareItems(n,e,t){const r=JSON.parse(JSON.stringify(n)),i=JSON.parse(JSON.stringify(e));let a={is_items_diff:!1,new_src_items:[],diff_src_items:[],same_items:[],trash_src_items:[]};const s=function(f){a.diff_src_items.push(f)},l=function(f){a.same_items.push(f)},u=function(f){a.new_src_items.push(f)},o=function(f){a.trash_src_items.push(f)};return t&&compareItemsByFieldId(r,i,t,s,l,u),t||compareItemsByItemId(r,i,s,l,u,null,o),a.is_items_diff=a.new_src_items.length>0||a.diff_src_items.length>0,a}function mergeTwoItems(n,e){return n.fields.forEach(t=>{let r=getFieldById(e,t.field_id);r?(r.field_value=t.field_value,t.history&&r.history&&(r.history=t.history.concat(r.history))):e.fields.push(t)}),e}function compareItemsByFieldId(n,e,t,r,i,a){n.forEach(s=>{let l=!0,u=getFieldById(s,t).field_value;e.forEach(o=>{let f=getFieldById(o,t).field_value;u==f&&(l=!1,compareTwoItems(s,o,r,i))}),l&&a(s)})}function compareItemsByItemId(n,e,t,r,i,a,s){let l=new ItemsMapper(e);if(n.forEach(u=>{let o=l.pullItemIndex(u.item_id);o!=null?compareTwoItems(u,e[o],t,r,s):(u.trash&&s(u),u.trash||i(u))}),a)for(const[u,o]of Object.entries(l.itemsMap))a(e[o])}function compareTwoItems(n,e,t,r,i){let a=!0;for(let s=0;s<n.fields.length;s++){let l=getFieldById(e,n.fields[s].field_id);l?l.field_value!=n.fields[s].field_value&&(a=a&&!1):a=a&&!1}a&&(n.trash&&i(n,e),n.trash||r(n,e)),a||(n.trash&&i(n,e),n.trash||t(n,e))}function compareTwoItemsByFieldId(n,e,t,r,i){let a=getFieldById(n,t).field_value,s=getFieldById(e,r).field_value;a==s&&i(n,e)}function getFieldById(n,e){let t=null;for(let r=0;r<n.fields.length;r++)e==n.fields[r].field_id&&(t=n.fields[r]);return t}class ItemsMapper{constructor(e){this._itemsMap={},e.forEach((t,r)=>{this._itemsMap[t.item_id]=r})}pullItemIndex(e){let t=this._itemsMap[e];return delete this._itemsMap[e],t}getItemIndex(e){return this._itemsMap[e]}get itemsMap(){return this._itemsMap}}function group(n,e){let t=[],r;n?r=n.split(","):t=e;let i=new Set;n&&e.forEach(s=>{let l="";r.forEach((u,o)=>{const f=s.fields.find(d=>d.field_id==u);f&&(l+=f.field_value),r.length-1==o&&a(l)&&t.push(s)})});function a(s){const l=!i.has(s);return l&&i.add(s),l}return t}function populateItems(n,e,t){var r=JSON.parse(JSON.stringify(n));return t?populateItemsAndKeepOtherValues(r,e):populateItemsAndEraseOtherValues(r,e)}function populateItemsAndKeepOtherValues(n,e){return n.forEach(t=>{e.forEach(r=>{let i=t.fields.find(a=>a.element_id==r.element_id);i?i.field_value=r.field_value:(r.field_id=r.element_id,t.fields.push(r))})}),n}function populateItemsAndEraseOtherValues(n,e){return n.forEach(t=>{t.fields=[].concat(e)}),n}var add$1={exports:{}},interopRequireDefault={exports:{}},hasRequiredInteropRequireDefault;function requireInteropRequireDefault(){return hasRequiredInteropRequireDefault||(hasRequiredInteropRequireDefault=1,function(n){function e(t){return t&&t.__esModule?t:{default:t}}n.exports=e,n.exports.__esModule=!0,n.exports.default=n.exports}(interopRequireDefault)),interopRequireDefault.exports}var _typeof={exports:{}},hasRequired_typeof;function require_typeof(){return hasRequired_typeof||(hasRequired_typeof=1,function(n){function e(t){"@babel/helpers - typeof";return n.exports=e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},n.exports.__esModule=!0,n.exports.default=n.exports,e(t)}n.exports=e,n.exports.__esModule=!0,n.exports.default=n.exports}(_typeof)),_typeof.exports}var addDays={exports:{}},toInteger={exports:{}},hasRequiredToInteger;function requireToInteger(){return hasRequiredToInteger||(hasRequiredToInteger=1,function(n,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(r){if(r===null||r===!0||r===!1)return NaN;var i=Number(r);return isNaN(i)?i:i<0?Math.ceil(i):Math.floor(i)}n.exports=e.default}(toInteger,toInteger.exports)),toInteger.exports}var toDate={exports:{}},requiredArgs={exports:{}},hasRequiredRequiredArgs;function requireRequiredArgs(){return hasRequiredRequiredArgs||(hasRequiredRequiredArgs=1,function(n,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(r,i){if(i.length<r)throw new TypeError(r+" argument"+(r>1?"s":"")+" required, but only "+i.length+" present")}n.exports=e.default}(requiredArgs,requiredArgs.exports)),requiredArgs.exports}var hasRequiredToDate;function requireToDate(){return hasRequiredToDate||(hasRequiredToDate=1,function(n,e){var t=requireInteropRequireDefault().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var r=t(require_typeof()),i=t(requireRequiredArgs());function a(s){(0,i.default)(1,arguments);var l=Object.prototype.toString.call(s);return s instanceof Date||(0,r.default)(s)==="object"&&l==="[object Date]"?new Date(s.getTime()):typeof s=="number"||l==="[object Number]"?new Date(s):((typeof s=="string"||l==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}n.exports=e.default}(toDate,toDate.exports)),toDate.exports}var hasRequiredAddDays;function requireAddDays(){return hasRequiredAddDays||(hasRequiredAddDays=1,function(n,e){var t=requireInteropRequireDefault().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var r=t(requireToInteger()),i=t(requireToDate()),a=t(requireRequiredArgs());function s(l,u){(0,a.default)(2,arguments);var o=(0,i.default)(l),f=(0,r.default)(u);return isNaN(f)?new Date(NaN):(f&&o.setDate(o.getDate()+f),o)}n.exports=e.default}(addDays,addDays.exports)),addDays.exports}var addMonths={exports:{}},hasRequiredAddMonths;function requireAddMonths(){return hasRequiredAddMonths||(hasRequiredAddMonths=1,function(n,e){var t=requireInteropRequireDefault().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var r=t(requireToInteger()),i=t(requireToDate()),a=t(requireRequiredArgs());function s(l,u){(0,a.default)(2,arguments);var o=(0,i.default)(l),f=(0,r.default)(u);if(isNaN(f))return new Date(NaN);if(!f)return o;var d=o.getDate(),h=new Date(o.getTime());h.setMonth(o.getMonth()+f+1,0);var y=h.getDate();return d>=y?h:(o.setFullYear(h.getFullYear(),h.getMonth(),d),o)}n.exports=e.default}(addMonths,addMonths.exports)),addMonths.exports}var hasRequiredAdd;function requireAdd(){return hasRequiredAdd||(hasRequiredAdd=1,function(n,e){var t=requireInteropRequireDefault().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=t(require_typeof()),i=t(requireAddDays()),a=t(requireAddMonths()),s=t(requireToDate()),l=t(requireRequiredArgs()),u=t(requireToInteger());function o(f,d){if((0,l.default)(2,arguments),!d||(0,r.default)(d)!=="object")return new Date(NaN);var h=d.years?(0,u.default)(d.years):0,y=d.months?(0,u.default)(d.months):0,m=d.weeks?(0,u.default)(d.weeks):0,v=d.days?(0,u.default)(d.days):0,p=d.hours?(0,u.default)(d.hours):0,E=d.minutes?(0,u.default)(d.minutes):0,S=d.seconds?(0,u.default)(d.seconds):0,w=(0,s.default)(f),g=y||h?(0,a.default)(w,y+h*12):w,b=v||m?(0,i.default)(g,v+m*7):g,A=E+p*60,q=S+A*60,x=q*1e3,D=new Date(b.getTime()+x);return D}n.exports=e.default}(add$1,add$1.exports)),add$1.exports}var addExports=requireAdd();const add=getDefaultExportFromCjs(addExports);var setDay$1={exports:{}},defaultOptions={},hasRequiredDefaultOptions;function requireDefaultOptions(){if(hasRequiredDefaultOptions)return defaultOptions;hasRequiredDefaultOptions=1,Object.defineProperty(defaultOptions,"__esModule",{value:!0}),defaultOptions.getDefaultOptions=e,defaultOptions.setDefaultOptions=t;var n={};function e(){return n}function t(r){n=r}return defaultOptions}var hasRequiredSetDay;function requireSetDay(){return hasRequiredSetDay||(hasRequiredSetDay=1,function(n,e){var t=requireInteropRequireDefault().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=u;var r=t(requireAddDays()),i=t(requireToDate()),a=t(requireToInteger()),s=t(requireRequiredArgs()),l=requireDefaultOptions();function u(o,f,d){var h,y,m,v,p,E,S,w;(0,s.default)(2,arguments);var g=(0,l.getDefaultOptions)(),b=(0,a.default)((h=(y=(m=(v=d==null?void 0:d.weekStartsOn)!==null&&v!==void 0?v:d==null||(p=d.locale)===null||p===void 0||(E=p.options)===null||E===void 0?void 0:E.weekStartsOn)!==null&&m!==void 0?m:g.weekStartsOn)!==null&&y!==void 0?y:(S=g.locale)===null||S===void 0||(w=S.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&h!==void 0?h:0);if(!(b>=0&&b<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var A=(0,i.default)(o),q=(0,a.default)(f),x=A.getDay(),D=q%7,j=(D+7)%7,F=7-b,M=q<0||q>6?q-(x+F)%7:(j+F)%7-(x+F)%7;return(0,r.default)(A,M)}n.exports=e.default}(setDay$1,setDay$1.exports)),setDay$1.exports}var setDayExports=requireSetDay();const setDay=getDefaultExportFromCjs(setDayExports);var isSameWeek$1={exports:{}},startOfWeek={exports:{}},hasRequiredStartOfWeek;function requireStartOfWeek(){return hasRequiredStartOfWeek||(hasRequiredStartOfWeek=1,function(n,e){var t=requireInteropRequireDefault().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var r=t(requireToDate()),i=t(requireToInteger()),a=t(requireRequiredArgs()),s=requireDefaultOptions();function l(u,o){var f,d,h,y,m,v,p,E;(0,a.default)(1,arguments);var S=(0,s.getDefaultOptions)(),w=(0,i.default)((f=(d=(h=(y=o==null?void 0:o.weekStartsOn)!==null&&y!==void 0?y:o==null||(m=o.locale)===null||m===void 0||(v=m.options)===null||v===void 0?void 0:v.weekStartsOn)!==null&&h!==void 0?h:S.weekStartsOn)!==null&&d!==void 0?d:(p=S.locale)===null||p===void 0||(E=p.options)===null||E===void 0?void 0:E.weekStartsOn)!==null&&f!==void 0?f:0);if(!(w>=0&&w<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=(0,r.default)(u),b=g.getDay(),A=(b<w?7:0)+b-w;return g.setDate(g.getDate()-A),g.setHours(0,0,0,0),g}n.exports=e.default}(startOfWeek,startOfWeek.exports)),startOfWeek.exports}var hasRequiredIsSameWeek;function requireIsSameWeek(){return hasRequiredIsSameWeek||(hasRequiredIsSameWeek=1,function(n,e){var t=requireInteropRequireDefault().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var r=t(requireStartOfWeek()),i=t(requireRequiredArgs());function a(s,l,u){(0,i.default)(2,arguments);var o=(0,r.default)(s,u),f=(0,r.default)(l,u);return o.getTime()===f.getTime()}n.exports=e.default}(isSameWeek$1,isSameWeek$1.exports)),isSameWeek$1.exports}var isSameWeekExports=requireIsSameWeek();const isSameWeek=getDefaultExportFromCjs(isSameWeekExports);function populateWithDate(n,e){return n.forEach(t=>{e.forEach(r=>{let i=t.fields.find(a=>a.element_id==r.element_id);i?r.data_range?(r.date_type.includes("calendar"),i.field_value="".concat(getStartDate(r.date_type),":").concat(getDate(r.date_type))):i.field_value=getDate(r.date_type):t.fields.push({field_id:r.element_id,element_id:r.element_id,field_value:getDate(r.date_type)})})}),n}function getStartDate(n){let e=new Date;function t(i){var a=i.getDay();let s;n.includes("week_current,current")&&(s=0),n.includes("week_next,future")&&(s=7),n.includes("week_past,past")&&(s=-7);let l=i.getDate()-a+s+(a==0?-6:1);return new Date(i.setDate(l))}function r(i){let a,s,l=Math.floor(i.getMonth()/3),u=i.getFullYear();return n.includes("quarter_current,current")&&(a=0,s=0),n.includes("quarter_next,future")&&(a=3,s=0),n.includes("quarter_past,past")&&(a=-3,s=0),new Date(u,l*3+a,1+s)}switch(n){case"week_current,current":return t(new Date).getTime();case"month_current,current":return new Date(e.getFullYear(),e.getMonth(),1).getTime();case"quarter_current,current":return r(new Date).getTime();case"year_current,current":return add(new Date(e.getFullYear(),0,1),{years:0}).getTime();case"week_next,future":return t(new Date).getTime();case"month_next,future":return new Date(e.getFullYear(),e.getMonth()+1,1).getTime();case"quarter_next,future":return r(new Date).getTime();case"year_next,future":return add(e,{days:0}).getTime();case"week_past,past":return t(new Date).getTime();case"month_past,past":return new Date(e.getFullYear(),e.getMonth()-1,1).getTime();case"quarter_past,past":return r(new Date).getTime();case"year_past,past":return add(e,{years:-1}).getTime();case"year_past,past,calendar":return add(new Date(e.getFullYear(),0,1),{years:-1}).getTime();case"year_future,future,calendar":return add(new Date(e.getFullYear()+1,0,1),{years:0}).getTime();case"today_current,current":return add(e,{days:0}).getTime();case"tomorrow,future":return add(e,{days:1}).getTime();case"7_days_future,future":return add(e,{days:0}).getTime();case"10_days_future,future":return add(e,{days:0}).getTime();case"14_days_future,future":return add(e,{days:0}).getTime();case"30_days_future,future":return add(e,{days:0}).getTime();case"yesterday,past":return add(e,{days:-1}).getTime();case"7_days_past,past":return add(e,{days:-7}).getTime();case"10_days_past,past":return add(e,{days:-10}).getTime();case"14_days_past,past":return add(e,{days:-14}).getTime();case"30_days_past,past":return add(e,{days:-30}).getTime()}}function getDate(n){var e=new Date;function t(l){l=new Date(l);var u=l.getDay(),o=l.getDate()-u+6+(u==0?6:1);return new Date(l.setDate(o))}function r(l){l=new Date(l);var u=l.getDay(),o=l.getDate()-u+13+(u==0?-6:1);return new Date(l.setDate(o))}function i(l){l=new Date(l);var u=l.getDay(),o=l.getDate()-u-1+(u==0?-6:1);return new Date(l.setDate(o))}let a=Math.floor(e.getMonth()/3),s=e.getFullYear();switch(n){case"next_day":return add(e,{days:1}).getTime();case"two_days_after":return add(e,{days:2}).getTime();case"three_days_after":return add(e,{days:3}).getTime();case"four_days_after":return add(e,{days:4}).getTime();case"next_week":return add(e,{weeks:1}).getTime();case"two_weeks_after":return add(e,{weeks:2}).getTime();case"three_weeks_after":return add(e,{weeks:3}).getTime();case"this_sunday":return setDay(e,0,{weekStartsOn:1});case"this_monday":return setDay(e,1,{weekStartsOn:1});case"this_tuesday":return setDay(e,2,{weekStartsOn:1});case"this_wednesday":return setDay(e,3,{weekStartsOn:1});case"this_thursday":return setDay(e,4,{weekStartsOn:1});case"this_friday":return setDay(e,5,{weekStartsOn:1});case"this_saturday":return setDay(e,6,{weekStartsOn:1});case"today_current,current":return add(e,{days:0}).getTime();case"tomorrow,future":return add(e,{days:1}).getTime();case"7_days_future,future":return add(e,{days:7}).getTime();case"10_days_future,future":return add(e,{days:10}).getTime();case"14_days_future,future":return add(e,{days:14}).getTime();case"30_days_future,future":return add(e,{days:30}).getTime();case"yesterday,past":return add(e,{days:-1}).getTime();case"7_days_past,past":return add(e,{days:0}).getTime();case"10_days_past,past":return add(e,{days:0}).getTime();case"14_days_past,past":return add(e,{days:0}).getTime();case"30_days_past,past":return add(e,{days:0}).getTime();case"year_future,future,calendar":return add(new Date(e.getFullYear()+1,0,0),{years:1}).getTime();case"year_past,past,calendar":return add(new Date(e.getFullYear(),0,0),{years:0}).getTime();case"week_current,current":return t(new Date).getTime();case"month_current,current":return new Date(e.getFullYear(),e.getMonth()+1,0).getTime();case"quarter_current,current":return new Date(s,(a+1)*3,0).getTime();case"year_current,current":return add(new Date(e.getFullYear()+1,0,0),{years:0}).getTime();case"week_next,future":return r(new Date).getTime();case"month_next,future":return new Date(e.getFullYear(),e.getMonth()+2,0).getTime();case"quarter_next,future":return new Date(s,(a+1)*3+3,0).getTime();case"year_next,future":return add(e,{years:1}).getTime();case"week_past,past":return i(new Date).getTime();case"month_past,past":return new Date(e.getFullYear(),e.getMonth(),0,0).getTime();case"quarter_past,past":return new Date(s,(a+1)*3-3,0).getTime();case"year_past,past":return add(e,{days:0}).getTime();case"now":default:return e.getTime()}}function checkRecurringDate(n,e){n=new Date(n);let t=new Date;switch(e){case"day":return n.getDate()+"."+n.getMonth()==t.getDate()+"."+t.getMonth();case"week":let r=new Date().getFullYear(),i=new Date(r,n.getMonth(),n.getDate());return isSameWeek(i,t);case"month":return n.getMonth()===t.getMonth();default:return!0}}function mergeObjects(n,e,t){return deepmerge(n,e,t)}function isMergeableObject(n){var e=n&&typeof n=="object";return e&&Object.prototype.toString.call(n)!=="[object RegExp]"&&Object.prototype.toString.call(n)!=="[object Date]"}function emptyTarget(n){return Array.isArray(n)?[]:{}}function cloneIfNecessary(n,e){var t=e&&e.clone===!0;return t&&isMergeableObject(n)?deepmerge(emptyTarget(n),n,e):n}function defaultArrayMerge(n,e,t){var r=n.slice();return e.forEach(function(i,a){typeof r[a]>"u"?r[a]=cloneIfNecessary(i,t):isMergeableObject(i)?r[a]=deepmerge(n[a],i,t):n.indexOf(i)===-1&&r.push(cloneIfNecessary(i,t))}),r}function mergeObject(n,e,t){var r={};return isMergeableObject(n)&&Object.keys(n).forEach(function(i){r[i]=cloneIfNecessary(n[i],t)}),Object.keys(e).forEach(function(i){!isMergeableObject(e[i])||!n[i]?r[i]=cloneIfNecessary(e[i],t):r[i]=deepmerge(n[i],e[i],t)}),r}function deepmerge(n,e,t){n=n!==void 0?n:{},e=e!==void 0?e:{};var r=Array.isArray(e),i=t||{arrayMerge:defaultArrayMerge},a=i.arrayMerge||defaultArrayMerge;return r?Array.isArray(n)?a(n,e,t):cloneIfNecessary(e,t):mergeObject(n,e,t)}deepmerge.all=function(e,t){if(!Array.isArray(e)||e.length<2)throw new Error("first argument should be an array with at least two elements");return e.reduce(function(r,i){return deepmerge(r,i,t)})};function mergeChunks$1(n){const e={};return n.forEach(t=>{t.items_list.forEach(r=>{const i=e[r.item_id];return i?(i.trash=r.trash,r.fields.forEach(a=>{let s=!0;i.fields=i.fields.map(l=>Number(l.field_id)===Number(a.field_id)?(s=!1,l.field_value!=a.field_value?_objectSpread2(_objectSpread2({},a),{},{history:a.history.concat(l.history)}):l):l),s&&i.fields.push(a)})):e[r.item_id]=r})}),Object.values(e)}self.onmessage=function(n){const e=mergeChunks$1(n.data);self.postMessage(e)};function mergeChunks(n){return mergeChunks$1(n)}function makeNestedList(n,e,t,r,i){let a=JSON.parse(JSON.stringify(n)),s=r||"children",l=i||!1,u;for(u=0;u<a.length;u++)a[u][t]&&a[u][t]!==0&&a.forEach(d=>{a[u][t]==d[e]?(d[s]||(d[s]=[]),d[s].push(a[u]),a.splice(u,1),u==0?u=0:u--):d[s]&&o(d)});function o(d){d[s].forEach(h=>{h[e]==a[u][t]?(h[s]||(h[s]=[]),h[s].push(a[u]),a.splice(u,1),u==0?u=0:u--):h[s]&&o(h)})}function f(d){d.sort((h,y)=>h[l]-y[l]),d.forEach(h=>{h[s]&&f(h[s])})}return l&&f(a),a}class FieldsOperator{constructor(e){this.gudhub=e}mergeFieldLists(e,t){let r=JSON.parse(JSON.stringify(e)),i=JSON.parse(JSON.stringify(t)),a=i.map(s=>s.field_id);return i.length?i.reduce((s,l)=>{let u=null;if(s.find((f,d)=>l.field_id==f.field_id?(u=d,!0):!1))s[u]=this.gudhub.util.mergeObjects(s[u],l);else{let f=l.data_model&&l.data_model.interpretation?l.data_model.interpretation.find(d=>d.src=="table")||{settings:{show_field:1}}:{settings:{show_field:1}};if(f.settings.show_field){let d=this.gudhub.util.mergeObjects({show:1},f),h=this.gudhub.util.mergeObjects(d,l);s.push(h)}}return s},r).filter(function(s){return s.show&&a.indexOf(s.field_id)!=-1}):[]}createFieldsListToView(e,t){const r=this;return new Promise(async i=>{let a=await this.gudhub.getFieldModels(e);if(t.length!==0){let l=[];t.forEach((u,o)=>{let f=a.find(d=>u.field_id==d.field_id);f&&(f.data_model.interpretation.find(d=>d.src=="table"),l.push({field_id:f.field_id,show:u.show,width:u.width?u.width:"150px"})),o+1==t.length&&s(l)})}else s(t);function s(l){let u=0;a.forEach((o,f)=>{l.find(h=>o.field_id==h.field_id)?(u==a.length-1&&i(l),u++):r.gudhub.ghconstructor.getInstance(o.data_type).then(h=>{if(h){let m=h.getTemplate().model.data_model.interpretation.find(v=>v.src=="table");m||(m={settings:{show_field:1}}),l.push({field_id:o.field_id,show:m.settings.show_field}),u==a.length-1&&i(l)}u++},function(y){u++})})}})}createFieldsListToViewWithDataType(e,t){return new Promise(async r=>{let i=[],a=await this.gudhub.getFieldModels(e),s=a.map(u=>+u.field_id);const l=[];i=a.reduce((u,o)=>(u.find((d,h)=>o.field_id==d.field_id)||(u.push({field_id:o.field_id,data_type:o.data_type}),l.push(new Promise(async d=>{const m=(await this.gudhub.ghconstructor.getInstance(o.data_type)).getTemplate().model.data_model.interpretation.find(v=>v.src=="table")||{settings:{show_field:1}};u.find(v=>v.field_id==o.field_id).show=m.settings.show_field,d(!0)}))),u),t),Promise.all(l).then(()=>{i=i.filter(u=>s.indexOf(u.field_id)!=-1),r(i)})})}}class ItemsSelection{constructor(e){this.gudhub=e,this.selectedItems={}}async selectItems(e,t){if(!this.selectedItems.hasOwnProperty(e)){this.selectedItems[e]={items:[],app:[]};let a=await this.gudhub.getApp(e);this.selectedItems[e].app=a}let r=this.selectedItems[e],i=r.items.map(a=>a.item_id);t.forEach(a=>{i.indexOf(a.item_id)!=-1?r.items.splice(i.indexOf(a.item_id),1):r.items[r.items.length]=a})}getSelectedItems(e){return this.selectedItems[e]?this.selectedItems[e]:{items:[],app:[]}}clearSelectedItems(e){this.selectedItems[e]&&(this.selectedItems[e].items=[])}isItemSelected(e,t){let r=this.getSelectedItems(e);return r!==null?(r=r.items.map(i=>i.item_id),r.indexOf(t)!=-1):!1}}function compare_items_lists_Worker(){return`function createList(items) {
|
|
26
26
|
return items.reduce(
|
|
27
27
|
(acc, item) => {
|
|
28
28
|
acc.list[item.item_id] = item;
|
|
@@ -94,23 +94,23 @@ Expecting `+te.join(", ")+", got '"+(this.terminals_[F]||F)+"'":Z="Parse error o
|
|
|
94
94
|
|
|
95
95
|
const diff = compareItemsLists(items_list1, items_list2);
|
|
96
96
|
self.postMessage({ diff });
|
|
97
|
-
});`}function compiler(n,e,t,r,i){async function a(h,y,m){let v=null;if(h.type==="array"&&(Number(h.is_static)?v=new Array(await u(h.childs,y,m)):v=await s(h,y,m)),h.type==="object"&&(Number(h.current_item)?v=await l(h,y):v=await u(h.childs,y,m)),h.type==="property"&&(v=await o(h,y,m)),typeof h=="object"&&typeof h.type>"u"){const p={};for(const E in h)if(h.hasOwnProperty(E)){const S=h[E],w=await a(S,y,m);p[E]=w[S.property_name]}return p}return{[h.property_name]:v}}async function s(h,y,m){const v=await t.gudhub.getApp(Number(h.app_id));let p=await d(h.filter,v.items_list,m,y);if(h.isSortable&&h.field_id_to_sort&&h.field_id_to_sort!==""){let S=p.flatMap(g=>{let b=g.fields.find(A=>A.field_id==h.field_id_to_sort);return!b||b.field_value==""?[]:g}),w=p.filter(g=>{if(!S.includes(g))return g});S=S.sort((g,b)=>h.sortType=="desc"?b.fields.find(A=>A.field_id==h.field_id_to_sort).field_value-g.fields.find(A=>A.field_id==h.field_id_to_sort).field_value:g.fields.find(A=>A.field_id==h.field_id_to_sort).field_value-b.fields.find(A=>A.field_id==h.field_id_to_sort).field_value),p=[...S,...w]}if(h.offset){let S;h.use_variables_for_limit_and_offset&&r?S=r[h.offset]:S=/^[0-9]+$/.test(h.offset)?h.offset:0,p=p.slice(S)}if(h.limit){let S;h.use_variables_for_limit_and_offset&&r?S=r[h.limit]:S=/^[0-9]+$/.test(h.limit)||0,S!==0&&(p=p.slice(0,S))}const E=p.map(async S=>u(h.childs,S,v.app_id));return Promise.all(E)}async function l(h,y){const m=await t.gudhub.getApp(h.app_id),v=m.items_list||[];return u(h.childs,y||v[0],m.app_id)}async function u(h,y,m){const v=await h.map(async E=>a(E,y,m));return(await Promise.all(v)).reduce((E,S)=>_objectSpread2(_objectSpread2({},E),S),{})}async function o(h,y,m){switch(h.property_type){case"static":return h.static_field_value;case"variable":switch(h.variable_type){case"app_id":return m;case"current_item":default:return"".concat(m,".").concat(y.item_id)}case"field_id":return h.field_id;case"function":return typeof h.function=="function"?h.function(y,m,t.gudhub,...h.args):await new Function("item, appId, gudhub","return (async "+h.function+")(item, appId, gudhub)")(y,m,t.gudhub);case"field_value":default:return!h.field_id&&h.name_space&&(h.field_id=await t.gudhub.getFieldIdByNameSpace(m,h.name_space)),Number(h.interpretation)?await t.gudhub.getInterpretationById(Number(m),Number(y.item_id),Number(h.field_id),"value"):await t.gudhub.getFieldValue(Number(m),Number(y.item_id),Number(h.field_id))}}async function f(h,y,m,v,p){const E=await t.gudhub.prefilter(JSON.parse(JSON.stringify(h)),_objectSpread2({element_app_id:y,app_id:m,item_id:v},r));return t.gudhub.filter(p,[...E,...h])}async function d(){let h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return h.length?f(h,m,m,v.item_id,y):[...y]}return a(n,e,i)}class AppsTemplateService{constructor(e){this.gudhub=e,this.appsConnectingMap={apps:[],fields:[],items:[],views:[]}}createAppsFromTemplate(e,t,r,i){const a=this;return new Promise(s=>{const u=100/(e.apps.length*6);let o=0;a.createApps(e,f=>{o+=1,r&&r.call(this,{percent:o*u,status:f})},i).then(f=>{a.createItems(f,t,d=>{typeof d=="string"?(o+=1,r&&r.call(this,{percent:o*u,status:d})):typeof d=="object"&&(r&&r.call(this,{status:"Done",apps:d}),s())},i)})})}createItems(e,t,r,i){return new Promise(async a=>{const s=t||1e5,l=this;let u=[],o=[];const{accesstoken:f}=await l.gudhub.req.axiosRequest({method:"POST",url:"https://gudhub.com/GudHub_Test/auth/login",form:{auth_key:"3HMOtCbC0M/1/1e4y4Uxo/Kh/aFN4V5LG2//5ixx7TZyiUfMb7IHAAHCj9PsLrOSDrZuuWkbX4BIX23f51H+eA=="}});e.forEach(d=>{o.push(new Promise(async h=>{let y;i?y=await l.gudhub.req.axiosRequest({url:"https://gudhub.com/GudHub_Test/api/app/get?token=".concat(f,"&app_id=").concat(l._searchOldAppId(d.app_id,l.appsConnectingMap.apps)),method:"GET"}):y=await l.gudhub.getApp(l._searchOldAppId(d.app_id,l.appsConnectingMap.apps)),r&&r.call(this,"GET APP: ".concat(y.app_name," (Items steps)"));let m=JSON.parse(JSON.stringify(y)),v=m.items_list.map(p=>({index_number:p.index_number,item_id:0,fields:[]})).filter((p,E)=>E<=s);l.gudhub.addNewItems(d.app_id,v).then(p=>{r&&r.call(this,"ADD NEW ITEMS: ".concat(y.app_name," (Items steps)")),d.items_list=p,l._updateMap(d.items_list,m.items_list),l._addFieldValue(m.items_list,d.items_list,l.appsConnectingMap),u.push(d),h()})}))}),Promise.all(o).then(()=>{u.forEach(d=>{d.items_list.forEach(h=>{h.fields.forEach(y=>{l.appsConnectingMap.fields.forEach(m=>{y.field_id===m.old_field_id&&(y.field_id=m.new_field_id,y.element_id=m.new_field_id)})})})}),l.deleteField(u),l.replaceValue(u,l.appsConnectingMap).then(()=>{const d=[];u.forEach(h=>{d.push(new Promise(y=>{let m=h.items_list.map(v=>(v.fields.forEach(p=>{delete p.data_id}),v));l.gudhub.updateItems(h.app_id,m).then(()=>{r&&r.call(this,"REPLACE VALUE: ".concat(h.app_name," (Items steps)")),y()})}))}),Promise.all(d).then(()=>{r.call(this,u),a()})})})})}deleteField(e){e.forEach(t=>{t.items_list.forEach(r=>{r.fields=r.fields.filter(i=>t.field_list.findIndex(a=>a.field_id==i.field_id)>-1)})})}replaceValue(e,t){return new Promise(async r=>{const i=[],a=this;e.forEach(s=>{s.field_list.forEach(l=>{l.data_type==="item_ref"&&a._replaceValueItemRef(s,l,t),i.push(new Promise(u=>{a.gudhub.ghconstructor.getInstance(l.data_type).then(o=>{if(typeof o>"u"){console.log("ERROR WHILE GETTING INSTANCE OF ",l.data_type),u({type:l.data_type});return}if(o.getTemplate().constructor=="file")return a.gudhub.util.fileInstallerHelper(s.app_id,s.items_list,l.field_id).then(f=>{u(f)});o.getTemplate().constructor=="document"?a.documentInstallerHelper(s.app_id,s.items_list,l.field_id).then(f=>{u(o)}):u(o)})}))})}),i.length>0?Promise.all(i).then(s=>{r(s)}):r(result)})}documentInstallerHelper(e,t,r){const i=this,a=[];return new Promise(async s=>{for(const l of t){const u=l.item_id,o=l.fields.find(f=>f.element_id===r);if(o&&o.field_value&&o.field_value.length>0){const f=await i.gudhub.getDocument({_id:o.field_value});if(f&&f.data){const d=await i.gudhub.createDocument({app_id:e,item_id:u,element_id:r,data:f.data});o.field_value=d._id,a.push(l)}}}s(a)})}_replaceValueItemRef(e,t,r){e.items_list.forEach(i=>{i.fields.forEach(a=>{if(a.field_id===t.field_id&&a.field_value){let s=a.field_value.split(",");s.forEach((l,u)=>{let o=l.split(".");r.apps.forEach(f=>{o[0]==f.old_app_id&&(o[0]=f.new_app_id)}),r.items.forEach(f=>{o[1]==f.old_item_id&&(o[1]=f.new_item_id)}),s[u]=o.join(".")}),a.field_value=s.join(",")}})})}_addFieldValue(e,t,r){t.forEach(i=>{r.items.forEach(a=>{i.item_id===a.new_item_id&&e.forEach(s=>{a.old_item_id===s.item_id&&(i.fields=s.fields)})})})}_updateMap(e,t){t.forEach(r=>{e.forEach(i=>{r.index_number===i.index_number&&this.appsConnectingMap.items.push({old_item_id:r.item_id,new_item_id:i.item_id})})})}_searchOldAppId(e,t){let r=0;return t.forEach(i=>{i.new_app_id===e&&(r=i.old_app_id)}),r}createApps(e,t,r){const i=this;let a={step_size:100/(e.apps.length*3),apps:[]};return new Promise(async s=>{let l={},u=[],o=[];const{accesstoken:f}=await i.gudhub.req.axiosRequest({method:"POST",url:"https://gudhub.com/GudHub_Test/auth/login",form:{auth_key:"3HMOtCbC0M/1/1e4y4Uxo/Kh/aFN4V5LG2//5ixx7TZyiUfMb7IHAAHCj9PsLrOSDrZuuWkbX4BIX23f51H+eA=="}});for(const d of e.apps){let h;r?h=await i.gudhub.req.axiosRequest({url:"https://gudhub.com/GudHub_Test/api/app/get?token=".concat(f,"&app_id=").concat(d),method:"GET"}):h=await i.gudhub.getApp(d),t&&t.call(this,"GET APP: ".concat(h.app_name," (App steps)"));let y=JSON.parse(JSON.stringify(h));l[y.app_id]=y,a.apps.push(y.icon);let m=i.prepareAppTemplate(y);m.app_name=m.app_name+" New",m.privacy=1,e.data_to_change&&(e.data_to_change.name&&(m.app_name=e.data_to_change.name),e.data_to_change.icon&&(m.icon=e.data_to_change.icon)),i.resetViewsIds(m),i.gudhub.createNewApp(m).then(v=>{t&&t.call(this,"CREATE NEW APP: ".concat(h.app_name," (App steps)")),u.push(v),i.mapApp(y,v,i.appsConnectingMap),e.apps.length==u.length&&(i.connectApps(u,i.appsConnectingMap,l),u.forEach(p=>{i.gudhub.updateApp(p).then(E=>{t&&t.call(this,"UPDATE APP: ".concat(h.app_name," (App steps)")),o.push(E),e.apps.length==o.length&&s(o)})}))})}})}mapApp(e,t,r){r.apps.push({old_app_id:e.app_id,new_app_id:t.app_id,old_view_init:e.view_init,new_view_init:t.view_init}),e.field_list.forEach(i=>{t.field_list.forEach(a=>{i.name_space==a.name_space&&r.fields.push({name_space:i.name_space,old_field_id:i.field_id,new_field_id:a.field_id})})}),e.views_list.forEach(i=>{t.views_list.forEach(a=>{i.name==a.name&&r.views.push({name:i.name,old_view_id:i.view_id,new_view_id:a.view_id})})})}crawling(e,t){let r=e===null?[]:Object.keys(e);const i=this;r.length>0&&r.forEach(a=>{let s=e[a];typeof s<"u"&&typeof e!="string"&&(t(a,s,e),i.crawling(s,t))})}resetViewsIds(e){e.view_init=0,this.crawling(e.views_list,function(t,r,i){(t=="view_id"||t=="container_id")&&(i[t]=0)})}connectApps(e,t,r){const i=this;return e.forEach(a=>{t.apps.forEach(s=>{a.view_init===s.new_view_init&&t.views.forEach(l=>{s.old_view_init===l.old_view_id&&(a.view_init=l.new_view_id)})}),i.crawling(a.field_list,function(s,l,u){if(s.indexOf("field_id")!==-1||s.indexOf("FieldId")!==-1||s.indexOf("destination_field")!==-1){let o=String(l).split(","),f=[];t.fields.forEach(d=>{o.forEach(h=>{h==d.old_field_id&&f.push(d.new_field_id)})}),f.length&&(u[s]=f.join(","))}if((s.indexOf("app_id")!=-1||s.indexOf("AppId")!=-1||s.indexOf("destination_app")!=-1)&&t.apps.forEach(o=>{l==o.old_app_id&&(u[s]=o.new_app_id)}),s.indexOf("view_id")!==-1&&t.views.forEach(o=>{l==o.old_view_id&&(u[s]=o.new_view_id)}),s.indexOf("src")!==-1&&isFinite(l)){const o="container_id",f=t.apps.find(h=>h.new_app_id===a.app_id).old_app_id,d=i.findPath(r[f].views_list,o,l);u[s]="".concat(i.getValueByPath(a.views_list,d,o))}if(s.indexOf("trigger")!==-1&&l.model&&l.model.nodes){const o=l.model.nodes,f=["inputs","outputs"];for(const d in o)f.forEach(h=>{const y=o[d];Object.keys(y[h]).filter(v=>v!==""&&!isNaN(v)).forEach(v=>{const p=t.fields.filter(E=>E.old_field_id==v);if(p.length!==0&&p[0].new_field_id){const E=p[0].new_field_id.toString(),S=y[h][v];S.connections.forEach(w=>{w.input==v&&(w.input=E),w.output==v&&(w.output=E)}),delete y[h][v],y[h][E]=S}})})}})}),e}getValueByPath(e,t,r){let i=e;return t.split(".").forEach(a=>{i=i[a]}),i[r]}findPath(e,t,r){const i=this;let a=!1,s=!1,l=[];return i.crawling(e,function(u,o,f){s&&l.reverse().forEach(d=>{s&&(d.delete=!0,d.parent===f&&(s=!1,l=l.filter(h=>!h.delete),l.reverse()))}),a||(typeof f[u]=="object"&&l.push({prop:u,parent:f}),o==r&&t===u?a=!0:Object.keys(f).pop()===u&&typeof f[u]!="object"&&(s=!0))}),l.map(u=>u.prop).join(".")}prepareAppTemplate(e){const t=this;let r=JSON.parse(JSON.stringify(e));return t.crawling(r.views_list,function(i,a,s){i=="element_id"&&(s.element_id=-Number(a),s.create_element=-Number(a))}),r.field_list.forEach(i=>{i.create_field=-Number(i.field_id),i.element_id=-Number(i.field_id),i.field_id=-Number(i.field_id),i.field_value=""}),r.items_list=[],delete r.app_id,delete r.icon.id,delete r.group_id,delete r.trash,delete r.last_update,delete r.file_list,r}}class FileHelper{constructor(e){this.gudhub=e}fileInstallerHelper(e,t,r){const i=this;return new Promise(a=>{const s=[[]];let l=Promise.resolve(),u=[];t.forEach(o=>{const f=o.item_id,d=o.fields.find(h=>h.element_id===r);d&&d.field_value&&d.field_value.split(".").forEach(y=>{const m={source:y,destination:{app_id:e,item_id:f,element_id:r}};s[s.length-1].length!==10?s[s.length-1].push(m):s.push([m])})}),s.forEach(o=>{l=l.then(()=>i.gudhub.duplicateFile(o)).then(f=>{u=[...u,...f]})}),l.then(()=>{t.forEach(o=>{const f=o.item_id,d=o.fields.find(h=>h.element_id===r);d&&d.field_value&&(d.field_value="",u.forEach(h=>{h.item_id===f&&(d.field_value=d.field_value.split(",").filter(y=>y).concat(h.file_id).join(","))}))}),a()})})}}function compareObjects(n,e){return JSON.stringify(n)===JSON.stringify(e)}async function dynamicPromiseAll(n){await Promise.all(n);let e=!0;for(const t of n){const r=await _checkPromiseStatus(t);if(r.state==="pending"){e=!1;break}if(r.state==="rejected")throw r.reason}return e?!0:dynamicPromiseAll(n)}function _checkPromiseStatus(n){const e={state:"pending"};return Promise.race([n,e]).then(t=>t===e?t:{state:"resolved",value:t},t=>({state:"rejected",reason:t}))}function sortItems(n,e){if(!n||!n.length)return[];if(!n[0].fields.length)return n;var t=e&&e.sort_field_id||n[0].fields[0].field_id;function r(i){for(var a=null,s=0;s<i.fields.length;s++)if(i.fields[s].field_id==t){a=i.fields[s].field_value;break}return a}return n.sort(function(i,a){var s=r(i),l=r(a);return s===null?-1:l===null?1:/^\d+$/.test(s)&&/^\d+$/.test(l)?Number(s)<Number(l)?-1:1:/^\d+$/.test(s)||/^\d+$/.test(l)?/^\d+$/.test(s)?-1:1:s.toLowerCase()>l.toLowerCase()?1:-1}),e&&e.descending?n.reverse():n}class Utils{constructor(e){this.gudhub=e,this.MergeFields=new FieldsOperator(e),this.ItemsSelection=new ItemsSelection(e),this.AppsTemplateService=new AppsTemplateService(e),this.FileHelper=new FileHelper(e)}prefilter(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return filterPreparation(e,this.gudhub.storage,this.gudhub.pipeService,t)}filter(e,t){return filter(e,t)}mergeFilters(e,t){return mergeFilters(e,t)}group(e,t){return group(e,t)}async getFilteredItems(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"",l=arguments.length>6?arguments[6]:void 0,u=arguments.length>7?arguments[7]:void 0;const o=await this.prefilter(t,{element_app_id:r,app_id:i,item_id:a}),f=this.filter(e,o);return this.group(s,f).filter(h=>l?searchValue([h],l).length===1:!0).filter(h=>u?searchValue([h],u).length===1:!0)}jsonToItems(e,t){return jsonToItems(e,t)}getDate(e){return getDate(e)}checkRecurringDate(e,t){return checkRecurringDate(e,t)}populateItems(e,t,r){return populateItems(e,t,r)}populateWithDate(e,t){return populateWithDate(e,t)}populateWithItemRef(e,t,r,i,a,s){return populateWithItemRef(e,t,r,i,a,s)}compareItems(e,t,r){return compareItems(e,t,r)}mergeItems(e,t,r){return mergeItems(e,t,r)}mergeObjects(e,t,r){return mergeObjects(e,t,r)}makeNestedList(e,t,r,i,a){return makeNestedList(e,t,r,i,a)}async mergeChunks(e){return mergeChunks(e)}mergeFieldLists(e,t){return this.MergeFields.mergeFieldLists(e,t)}createFieldsListToView(e,t){return this.MergeFields.createFieldsListToView(e,t)}createFieldsListToViewWithDataType(e,t){return this.MergeFields.createFieldsListToViewWithDataType(e,t)}selectItems(e,t){return this.ItemsSelection.selectItems(e,t)}getSelectedItems(e){return this.ItemsSelection.getSelectedItems(e)}clearSelectedItems(e){return this.ItemsSelection.clearSelectedItems(e)}isItemSelected(e,t){return this.ItemsSelection.isItemSelected(e,t)}jsonConstructor(e,t,r,i){return compiler(e,t,this,r,i)}fileInstallerHelper(e,t,r){return this.FileHelper.fileInstallerHelper(e,t,r)}createAppsFromTemplate(e,t,r,i){return this.AppsTemplateService.createAppsFromTemplate(e,t,r,i)}createApps(e){return this.AppsTemplateService.createApps(e)}createItems(e,t){return this.AppsTemplateService.createItems(e,t)}areViewListsEqual(e,t){let r=e.sort((a,s)=>a.view_id-s.view_id),i=t.sort((a,s)=>a.view_id-s.view_id);return this.compareObjects(r,i)}areFieldListsEqual(e,t){let r=e.sort((a,s)=>a.field_id-s.field_id),i=t.sort((a,s)=>a.field_id-s.field_id);return this.compareObjects(r,i)}compareObjects(e,t){return compareObjects(e,t)}compareAppsItemsLists(e,t,r){const i=new Blob([compare_items_lists_Worker()],{type:"application/javascript"});this.worker=new Worker(URL.createObjectURL(i)),this.worker.postMessage({items_list1:e,items_list2:t}),this.worker.addEventListener("message",a=>{const{diff:s}=a.data;r(s)})}dynamicPromiseAll(e){return dynamicPromiseAll(e)}sortItems(e,t){return sortItems(e,t)}debounce(e,t){let r;return function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];clearTimeout(r),r=setTimeout(()=>{e.apply(this,a)},t)}}}class Auth{constructor(e,t){this.req=e,this.storage=t}async login(){let{username:e,password:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=await this.loginApi(e,t);return this.storage.updateUser(r),r}async loginWithToken(e){const t=await this.loginWithTokenApi(e);return this.storage.updateUser(t),t}async logout(e){return await this.logoutApi(e)}async signup(e){return await this.signupApi(e)}async updateToken(e){return await this.updateTokenApi(e)}async updateUser(e){const t=await this.updateUserApi(e);return this.storage.updateUser(t),t}async updateAvatar(e){const t=await this.avatarUploadApi(e);return this.storage.updateUser(t),t}async getUsersList(e){return await this.getUsersListApi(e)}async loginApi(e,t){try{return await this.req.axiosRequest({method:"POST",url:"".concat(this.req.root,"/auth/login"),form:{username:e,password:t}})}catch(r){console.log(r)}}async loginWithTokenApi(e){try{return await this.req.axiosRequest({method:"POST",url:"".concat(this.req.root,"/auth/login?accesstoken=").concat(e)})}catch(t){console.log(t)}}async updateTokenApi(e){try{return await this.req.axiosRequest({method:"POST",url:"".concat(this.req.root,"/auth/login"),form:{auth_key:e}})}catch(t){console.log(t)}}logoutApi(e){return this.req.post({url:"/auth/logout",form:{token:e}})}signupApi(e){return this.req.axiosRequest({method:"POST",url:"".concat(this.req.root,"/auth/singup"),form:{user:JSON.stringify(e)}})}getUsersListApi(e){return this.req.get({url:"/auth/userlist",params:{keyword:e}})}updateUserApi(e){return this.req.post({url:"/auth/updateuser",form:{user:JSON.stringify(e)}})}avatarUploadApi(e){return this.req.post({url:"/auth/avatar-upload",form:{image:e}})}getUserByIdApi(e){return this.req.get({url:"/auth/getuserbyid",params:{id:e}})}getVersion(){return this.req.get({url:"/version"})}getUserFromStorage(e){return this.storage.getUsersList().find(t=>t.user_id==e)}saveUserToStorage(e){const t=this.storage.getUsersList(),r=t.find(i=>i.user_id==e.user_id);return r||(t.push(e),e)}async getUserById(e){let t=this.getUserFromStorage(e);if(!t){let r=await this.getUserByIdApi(e);if(!r)return null;t=this.getUserFromStorage(e),t||(this.saveUserToStorage(r),t=r)}return t}async getToken(){const e=new Date(this.storage.getUser().expirydate),t=new Date;let r=this.storage.getUser().accesstoken;if(e<t||!r){const i=await this.updateToken(this.storage.getUser().auth_key);this.storage.updateUser(i),r=i.accesstoken}return r}}let $q={when:function(n){return new Promise(e=>{e(n)})}},factoryReturns={};class AngularClass{module(){return angular}directive(){return angular}factory(e,t){try{typeof t=="object"?factoryReturns[e]=t[t.length-1]($q):factoryReturns[e]=t($q)}catch(r){console.log("Errror in data type: ",e),console.log(r)}return angular}service(){return angular}run(){return angular}filter(){return angular}controller(){return angular}value(){return angular}element(){return angular}injector(){return angular}invoke(){return angular}}let angular=new AngularClass;async function createAngularModuleInstance(gudhub,module_id,module_url,angularInjector,nodeWindow){try{let angularModule,importedClass;if(IS_BROWSER_MAIN_THREAD)if(window.angular){angularInjector.has(module_id)||await angularInjector.get("$ocLazyLoad").load(module_url),angularModule=await angularInjector.get(module_id);let module=await axios.get(module_url);module=module.data;try{eval(module)}catch(n){console.error("ERROR WHILE EVAL() IN GHCONSTRUCTOR. MODULE ID: ".concat(module_id)),console.log(n)}importedClass=factoryReturns[module_id]}else{let module=await axios.get(module_url);module=module.data;try{eval(module)}catch(n){console.log("Error while importing module: ".concat(module_id)),console.log(n)}importedClass=factoryReturns[module_id]}else{const n=new Proxy(nodeWindow,{get:(a,s)=>a[s],set:(a,s,l)=>(a[s]=l,global[s]=l,!0)});global.hasOwnProperty("window")||(global.window=n,global.document=nodeWindow.document,global.Element=nodeWindow.Element,global.CharacterData=nodeWindow.CharacterData,global.this=n,global.self=n,global.Blob=nodeWindow.Blob,global.Node=nodeWindow.Node,global.navigator=nodeWindow.navigator,global.HTMLElement=nodeWindow.HTMLElement,global.XMLHttpRequest=nodeWindow.XMLHttpRequest,global.WebSocket=nodeWindow.WebSocket,global.crypto=nodeWindow.crypto,global.DOMParser=nodeWindow.DOMParser,global.Symbol=nodeWindow.Symbol,global.document.queryCommandSupported=a=>!1,global.angular=angular);let t=(await axios.get(module_url)).data,r=encodeURIComponent(t);r="data:text/javascript;charset=utf-8,"+r;let i;try{i=await import(r)}catch(a){console.log("Error while importing module: ".concat(module_id)),console.log(a)}importedClass=new i.default}let result={type:module_id,getTemplate:function(n,e,t,r,i,a){let s=t!=="false";return importedClass.getTemplate(n,e,s,r,i,a)},getDefaultValue:function(n,e,t,r){return new Promise(async i=>{let a=importedClass.getDefaultValue;if(a){let s=await a(n,e,t,r);i(s)}else i(null)})},getSettings:function(n,e,t){return importedClass.getSettings(n,e,t)},filter:{getSearchOptions:function(n){let e=importedClass;return e.filter&&e.filter.getSearchOptions?importedClass.filter.getSearchOptions(n)||null:[]},getDropdownValues:function(){let n=importedClass;return n.filter&&n.filter.getDropdownValues?n.filter.getDropdownValues()||null:[]}},getInterpretation:function(n,e,t,r,i,a){return new Promise(async s=>{let l=importedClass;try{let u=await l.getInterpretation(gudhub,n,a,i,r,t),f=await(u.find(d=>d.id==e)||u.find(d=>d.id=="default")).content();s({html:f})}catch(u){console.log("ERROR IN ".concat(module_id),u),s({html:"<span>no interpretation</span>"})}})},getInterpretationsList:function(n,e,t,r){return importedClass.getInterpretation(n,e,t,r)},getInterpretatedValue:function(n,e,t,r){return new Promise(async i=>{let a=importedClass.getInterpretatedValue;if(a){let s=await a(n,e,t,r);i(s)}else i(n)})},onMessage:function(n,e,t){return new Promise(async r=>{const i=importedClass.onMessage;if(i){const a=await i(n,e,t);r(a)}r(null)})}};return IS_BROWSER_MAIN_THREAD&&(result.extendController=function(n){angularModule.getActionScope(n)},result.runAction=function(n){try{angularModule.runAction(n)}catch{}},result.getWindowScope=function(n){return angularModule.getWindowScope(n)},result.getWindowHTML=function(n){return angularModule.getWindowHTML(n)}),result}catch(n){console.log(n),console.log("Failed in createAngularModuleInstance (ghconstructor). Module id: ".concat(module_id,"."))}}async function createClassInstance(n,e,t,r,i){try{t||console.error("JS link must be provided for this data type - ".concat(e));let s=await(f=>(!IS_BROWSER_MAIN_THREAD&&!global.hasOwnProperty("window")&&(global.window=proxy,global.document=i.document,global.Element=i.Element,global.CharacterData=i.CharacterData,global.this=proxy,global.self=proxy,global.Blob=i.Blob,global.Node=i.Node,global.navigator=i.navigator,global.HTMLElement=i.HTMLElement,global.XMLHttpRequest=i.XMLHttpRequest,global.WebSocket=i.WebSocket,global.crypto=i.crypto,global.DOMParser=i.DOMParser,global.Symbol=i.Symbol,global.document.queryCommandSupported=d=>(console.log("QUERY COMMAND SUPPORTED: ",d),!1),global.angular=angular),new Promise(async d=>{let h=await axios.get(f).catch(v=>{console.log("Failed to fetch: ".concat(f," in ghconstructor. Module id: ").concat(e))}),m="data:text/javascript;charset=utf-8,"+encodeURIComponent(h.data);d(m)})))(t),l;try{l=await import(s)}catch(f){console.log("Error while importing module: ".concat(e)),console.log(f)}let u=new l.default(e);if(r&&IS_BROWSER_MAIN_THREAD){const f=document.createElement("link");f.href=r,f.setAttribute("data-module",e),f.setAttribute("rel","stylesheet"),document.getElementsByTagName("head")[0].appendChild(f)}return{type:e,getTemplate:function(f,d,h,y,m,v){let p=h!=="false";return u.getTemplate(f,d,p,y,m,v)},getDefaultValue:function(f,d,h,y){return new Promise(async m=>{let v=u.getDefaultValue;if(v){let p=await v(f,d,h,y);m(p)}else m(null)})},getSettings:function(f,d,h){return u.getSettings(f,d,h)},filter:{getSearchOptions:function(f){let d=u;return d.filter&&d.filter.getSearchOptions?u.filter.getSearchOptions(f):[]},getDropdownValues:function(){let f=u;return f.filter&&f.filter.getDropdownValues?f.filter.getDropdownValues():[]}},getInterpretation:function(f,d,h,y,m,v){return new Promise(async p=>{let E=u;try{let S=await E.getInterpretation(n,f,v,m,y,h),g=await(S.find(b=>b.id==d)||S.find(b=>b.id=="default")).content();p({html:g})}catch(S){console.log("ERROR IN ".concat(e),S),p({html:"<span>no interpretation</span>"})}})},getInterpretationsList:function(f,d,h,y){return u.getInterpretation(f,d,h,y)},getInterpretatedValue:function(f,d,h,y){return new Promise(async m=>{let v=u.getInterpretatedValue;if(v){let p=await v(f,d,h,y);m(p)}else m(f)})},onMessage:function(f,d,h){return new Promise(async y=>{const m=u.onMessage;if(m){const v=await m(f,d,h);y(v)}y(null)})},extendController:function(f){u.getActionScope(f)},runAction:function(f){try{u.runAction(f)}catch{}},getWindowScope:function(f){return u.getWindowScope(f)},getWindowHTML:function(f){return u.getWindowHTML(f)}}}catch(a){console.log(a),console.log("Failed in createClassInstance (ghconstructor). Module id: ".concat(e,". JS url: ").concat(t))}}class GHConstructor{constructor(e){this.gudhub=e,this.cache={},this.modulesQueue={},this.angularInjector,this.nodeWindow}async getInstance(e){return this.getCached(e)?this.getCached(e):(this.modulesQueue[e]?await this.modulesQueue[e]:(this.modulesQueue[e]=this.createInstance(e),await this.modulesQueue[e]),this.getCached(e))}pupToCache(e,t){this.cache[e]=t}getCached(e){return this.cache[e]}initAngularInjector(e){this.angularInjector=e}initJsdomWindow(e){this.nodeWindow=e}async createInstance(e){let t=this.gudhub.storage.getModuleUrl(e);if(!t){console.log("Cannot find module: ".concat(e));return}let r;return t.type==="gh_element"&&(t.technology==="angular"?r=await createAngularModuleInstance(this.gudhub,e,t.url,this.angularInjector,this.nodeWindow):t.technology==="class"&&(r=await createClassInstance(this.gudhub,e,t.js,t.css,this.nodeWindow))),r&&this.pupToCache(e,r),r}}class AppProcessor{constructor(e,t,r,i,a,s,l){this.storage=e,this.pipeService=t,this.req=r,this.ws=i,this.applistReceived=!1,this.activateSW=s,this.util=a,this.appListeners(),this.dataService=l,this.appRequestCache=new Map}async createNewAppApi(e){try{const t=await this.req.post({url:"/api/app/create",form:{app:JSON.stringify(e)}});return t.from_apps_list=!0,t}catch(t){return console.log(t),null}}async updateAppApi(e){try{return await this.req.post({url:"/api/app/update",form:{app:JSON.stringify(e)}})}catch(t){return console.log(t),null}}async deleteAppApi(e){try{return await this.req.post({url:"/api/app/delete",form:{app_id:e}})}catch(t){return console.log(t),null}}async getAppListApi(){try{return(await this.req.get({url:"/api/applist/get"})).apps_list.map(t=>(t.from_apps_list=!0,t))}catch(e){return console.log(e),null}}getAppListFromStorage(){return this.storage.getAppsList()}getAppFromStorage(e){const t=this.storage.getApp(e);return t&&t.field_list.length?t:null}addNewAppToStorage(e){return this.storage.getAppsList().push(e)}saveAppInStorage(e){e.items_object={};for(let r=0;r<e.items_list.length;r++){e.items_object[e.items_list[r].item_id]={};for(let i=0;i<e.items_list[r].fields.length;i++)e.items_object[e.items_list[r].item_id][e.items_list[r].fields[i].field_id]=e.items_list[r].fields[i]}const t=this.storage.getApp(e.app_id);return t?(e.from_apps_list=t.from_apps_list,e.permission=t.permission,this.storage.updateApp(e)):(e.from_apps_list=!1,this.addNewAppToStorage(e)),this.getAppFromStorage(e.app_id)}updateAppFieldsAndViews(e){const t=this.getAppFromStorage(e.app_id);e.items_list=t.items_list,e.file_list=t.file_list,e.from_apps_list=t.from_apps_list,e.items_object=t.items_object,this.storage.updateApp(e),this.pipeService.emit("gh_app_views_update",{app_id:e.app_id},e.views_list),e.field_list.forEach(r=>{this.pipeService.emit("gh_model_update",{app_id:e.app_id,field_id:r.field_id},r)})}updateAppInStorage(e){this.storage.getApp(e.app_id)?(this.storage.updateApp(e),this.pipeService.emit("gh_app_update",{app_id:e.app_id},e),this.pipeService.emit("gh_items_update",{app_id:e.app_id},e.items_list)):this.addNewAppToStorage(e)}deletingAppFromStorage(e){let t=this.storage.getAppsList();return t.forEach((r,i)=>{r.app_id==e&&t.splice(i)}),t}updateAppsListInStorage(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];for(const t of e){const r=this.storage.getApp(t.app_id);r?(r.from_apps_list=t.from_apps_list,r.permission=t.permission):this.addNewAppToStorage(t)}}async refreshApps(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];for(const t of e)if(t!=null)try{const r=await this.dataService.getApp(t);if(r){r.items_object={};for(let i=0;i<r.items_list.length;i++){r.items_object[r.items_list[i].item_id]={};for(let a=0;a<r.items_list[i].fields.length;a++)r.items_object[r.items_list[i].item_id][r.items_list[i].fields[a].field_id]=r.items_list[i].fields[a]}this.updateAppInStorage(r),this.pipeService.emit("gh_app_views_update",{app_id:r.app_id},r.views_list)}}catch(r){console.log(r)}console.log("Apps refreshed: ",JSON.stringify(e))}async refreshAppsList(){let e=this.getAppListFromStorage(),r=(await this.getAppListApi()).map(i=>_objectSpread2(_objectSpread2({},i),e.find(a=>a.app_id===i.app_id)));this.updateAppsListInStorage(r),this.pipeService.emit("gh_apps_list_refreshed",{})}async getAppsList(){let e=this.getAppListFromStorage();if(!this.applistReceived){let t=await this.getAppListApi();if(!t)return null;this.updateAppsListInStorage(t),this.applistReceived=!0,e=t}return e}async getAppInfo(e){const t=await this.getAppsList();return t?t.find(r=>r.app_id==e):null}async deleteApp(e){return await this.deleteAppApi(e),this.deletingAppFromStorage(e)}async getApp(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!e)return null;let r=this.getAppFromStorage(e);if(r)return r;if(this.appRequestCache.has(e))return this.appRequestCache.get(e);let i=this,a=new Promise(async(s,l)=>{try{let u=await i.dataService.getApp(e);u||l();//!!! temporary check !!!! if app has chanks property then we start getting it
|
|
98
|
-
let o=t?u:_objectSpread2(_objectSpread2({},u),{},{items_list:u.items_list.filter(f=>!f.trash)});o=t?o:_objectSpread2(_objectSpread2({},o),{},{field_list:o.field_list.filter(f=>!f.trash)}),s(o),i.saveAppInStorage(o),i.ws.addSubscription(e)}catch{l()}});return i.appRequestCache.set(e,a),a}async updateApp(e){if(!e.views_list||!e.views_list.length||!e.show){const r=await this.getApp(e.app_id);(!e.views_list||!e.views_list.length)&&(e.views_list=r.views_list),typeof e.show>"u"&&(e.show=r.show)}const t=await this.updateAppApi(e);return this.updateAppFieldsAndViews(t),t}async updateAppInfo(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.pipeService.emit("gh_app_info_update",{app_id:e.app_id},e),this.updateApp(e)}async createNewApp(e){const t=await this.createNewAppApi(e);return t.items_object={},this.addNewAppToStorage(t),t}async getAppViews(e){if(e)return(await this.getApp(e)).views_list}async handleAppChange(e,t,r){let i=this.util.areViewListsEqual(t.views_list,r.views_list),a=this.util.areFieldListsEqual(t.field_list,r.field_list);(i||a)&&this.updateAppFieldsAndViews({id:e,views_list:r.views_list,field_list:r.field_list})}clearAppProcessor(){this.getAppListPromises=null,this.getAppPromises={},this.applistReceived=!1}appListeners(){this.pipeService.onRoot("gh_app_get",{},async(e,t)=>{if(t&&t.app_id){const r=await this.getApp(t.app_id);this.pipeService.emit("gh_app_get",t,r)}}),this.pipeService.onRoot("gh_apps_list_get",{},async(e,t)=>{const r=await this.getAppsList();this.pipeService.emit("gh_apps_list_get",t,r)}),this.pipeService.onRoot("gh_delete_app",{},async(e,t)=>{const r=await this.deleteApp(t.app_id);this.pipeService.emit("gh_apps_list_update",{recipient:"all"},r)}),this.pipeService.onRoot("gh_app_update",{},async(e,t)=>{t.app.items_list=[],t.app.file_list=[];const r=await this.updateApp(t.app);this.pipeService.emit("gh_app_views_update",{app_id:r.app_id},r.views_list);const i=await this.getAppsList();this.pipeService.emit("gh_apps_list_update",{recipient:"all"},i),r.field_list.forEach(a=>{this.pipeService.emit("gh_model_update",{app_id:r.app_id,field_id:a.field_id},a)})}),this.pipeService.onRoot("gh_app_view_get",{},async(e,t)=>{if(t&&t.app_id){const r=await this.getApp(t.app_id);r.views_list.forEach((i,a)=>{i.view_id==t.view_id&&this.pipeService.emit("gh_app_view_get",t,r.views_list[a])})}}),this.pipeService.onRoot("gh_app_info_get",{},async(e,t)=>{const r=await this.getAppInfo(t.app_id);r&&this.pipeService.emit("gh_app_info_get",t,r)}),this.pipeService.onRoot("gh_app_info_update",{},async(e,t)=>{if(t&&t.app){const r=await this.updateAppInfo(t.app);this.pipeService.emit("gh_app_info_update",{app_id:t.app.app_id},r)}}),this.pipeService.onRoot("gh_app_create",{},async(e,t)=>{await this.createNewApp(t.app);const r=await this.getAppsList();this.pipeService.emit("gh_apps_list_update",{recipient:"all"},r)}),IS_BROWSER_MAIN_THREAD&&this.activateSW&&navigator.serviceWorker.addEventListener("message",async e=>{if(e.data.type==="refresh app"){const t=await this.getApp(e.data.payload.app_id);t&&this.util.compareAppsItemsLists(t.items_list,e.data.payload.items_list.filter(r=>!r.trash),r=>{let{diff_fields_items:i,diff_fields_items_Ids:a,diff_items:s,newItems:l,deletedItems:u}=r;(s.length||l.length||u.length)&&(this.pipeService.emit("gh_items_update",{app_id:e.data.payload.app_id},e.data.payload.items_list.filter(o=>!o.trash)),s.forEach(o=>this.pipeService.emit("gh_item_update",{app_id:e.data.payload.app_id,item_id:o.item_id},o))),a.forEach(o=>{const f=i[o];f&&f.forEach(d=>{this.pipeService.emit("gh_value_update",{app_id:e.data.payload.app_id,item_id:o,field_id:d.field_id},d.field_value)})})}),e.data.payload.items_list=await this.util.mergeChunks([t,e.data.payload]),this.saveAppInStorage(e.data.payload)}})}}class ItemProcessor{constructor(e,t,r,i,a){this.storage=e,this.pipeService=t,this.req=r,this.appProcessor=i,this.util=a,this.itemListeners()}async addItemsApi(e,t){try{return await this.req.post({url:"/api/items/add",form:{items:JSON.stringify(t),app_id:e}})}catch(r){return console.log(r),null}}async updateItemsApi(e,t){try{return await this.req.post({url:"/api/items/update",form:{items:JSON.stringify(t),app_id:e}})}catch(r){return console.log(r),null}}deleteItemsApi(e){try{const t=this.req.post({url:"/api/items/delete",form:{items_ids:JSON.stringify(e)}});return t.from_apps_list=!0,t}catch(t){return console.log(t),null}}async addItemsToStorage(e,t){const r=await this.appProcessor.getApp(e);return r&&(t.forEach(i=>{r.items_list.push(i),r.items_object[i.item_id]={};for(let a=0;a<i.fields.length;a++)r.items_object[i.item_id][i.fields[a].field_id]=i.fields[a];this.pipeService.emit("gh_item_update",{app_id:e},[i])}),this.pipeService.emit("gh_items_update",{app_id:e},r.items_list),this.storage.updateApp(r)),r}async updateItemsInStorage(e,t){this.pipeService.emit("gh_items_update",{app_id:e},t);const r=await this.appProcessor.getApp(e);return r&&t&&t.forEach(i=>{const a={app_id:e};this.pipeService.emit("gh_item_update",a,[i]),a.item_id=i.item_id,this.pipeService.emit("gh_item_update",a,i);const s=r.items_list.find(l=>l.item_id==i.item_id);s&&i.fields.forEach(l=>{const u=s.fields.find(o=>o.field_id==l.field_id);a.field_id=l.field_id,u?u.field_value!=l.field_value&&(u.field_value=l.field_value,r.items_object[s.item_id][u.field_id]=u,this.pipeService.emit("gh_value_update",a,l.field_value)):(s.fields.push(l),r.items_object[s.item_id][l.field_id]=l,this.pipeService.emit("gh_value_update",a,l.field_value))})}),t}handleItemsChange(e,t,r){let i=this.util.compareItems(t.items_list,r.items_list);this.updateItemsInStorage(e,i.diff_src_items),this.addItemsToStorage(e,i.new_src_items)}triggerItemsChange(e,t){this.updateItemsInStorage(e,t.diff_src_items),this.addItemsToStorage(e,t.new_src_items)}handleDiff(e,t){this.updateItemsInStorage(e,t.diff_src_items),this.addItemsToStorage(e,t.new_src_items),this.deleteItemsFromStorage(e,t.trash_src_items)}async deleteItemsFromStorage(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const r=await this.appProcessor.getApp(e);r&&(r.items_list=r.items_list.filter(i=>t.find(a=>i.item_id==a.item_id)?(delete r.items_object[i.item_id],!1):!0),this.pipeService.emit("gh_items_update",{app_id:e},r.items_list),this.storage.updateApp(r))}async getItems(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const r=await this.appProcessor.getApp(e,t);return r?r.items_list:null}async addNewItems(e,t){const r=t.map(a=>_objectSpread2(_objectSpread2({},a),{},{fields:filterFields(a.fields)})),i=await this.addItemsApi(e,r);return await this.addItemsToStorage(e,i),this.pipeService.emit("gh_items_add",{app_id:e},i),i}async updateItems(e,t){const r=t.map(a=>_objectSpread2(_objectSpread2({},a),{},{fields:filterFields(a.fields)})),i=await this.updateItemsApi(e,r);return await this.updateItemsInStorage(e,i)}async deleteItems(e,t){return this.deleteItemsApi(t).then(async r=>await this.deleteItemsFromStorage(e,r))}itemListeners(){this.pipeService.onRoot("gh_items_get",{},async(e,t)=>{if(t&&t.app_id){const r=await this.getItems(t.app_id);r?this.pipeService.emit("gh_items_get",t,r):this.pipeService.emit("gh_items_get",t,[])}}),this.pipeService.onRoot("gh_items_add",{},async(e,t)=>{if(t&&t.app_id&&t.items){const r=await this.addNewItems(t.app_id,t.items);r?this.pipeService.emit("gh_items_add",t,r):this.pipeService.emit("gh_items_add",t,[])}}),this.pipeService.onRoot("gh_items_update",{},async(e,t)=>{if(t&&t.app_id&&t.items){const r=await this.updateItems(t.app_id,t.items);r?this.pipeService.emit("gh_items_update",t,r):this.pipeService.emit("gh_items_update",t,[])}}),this.pipeService.onRoot("gh_item_get",{},async(e,t)=>{if(t&&t.app_id){const i=(await this.getItems(t.app_id)).find(a=>a.item_id==t.item_id);this.pipeService.emit("gh_item_get",t,i)}}),this.pipeService.onRoot("gh_filtered_items_get",{},async(e,t)=>{if(t&&t.element_app_id){const r=await this.getItems(t.element_app_id),i=await this.util.getFilteredItems(r,t.filters_list,t.element_app_id,t.app_id,t.item_id,t.field_groupe,t.search,t.search_params);this.pipeService.emit("gh_filtered_items_get",t,i)}}),this.pipeService.onRoot("gh_filter_items",{},async(e,t)=>{if(t&&t.items){const r=await this.util.getFilteredItems(t.items,t.filters_list,t.element_app_id,t.app_id,t.item_id,t.field_groupe,t.search,t.search_params);this.pipeService.emit("gh_filter_items",t,r)}})}}class FieldProcessor{constructor(e,t,r,i,a){this.storage=e,this.req=t,this.appProcessor=r,this.itemProcessor=i,this.pipeService=a,this.fieldListeners()}deleteFieldApi(e){return this.req.post({url:"/api/app/delete-field",form:{field_id:e}})}async updatedFieldApi(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=await this.appProcessor.getApp(e),i={app_id:e,app_name:r.app_name,group_id:r.group_id,icon:r.icon,field_list:r.field_list.map(a=>a.field_id==t.field_id?_objectSpread2(_objectSpread2({},a),t):a),views_list:r.views_list};return this.appProcessor.updateApp(i)}setFieldValueApi(e,t,r,i){const a=[{item_id:t,fields:[{field_id:r,field_value:i}]}];return this.itemProcessor.updateItems(e,a)}deleteFieldInStorage(e,t){const r=this.storage.getApp(e);return r.field_list=r.field_list.filter(i=>i.file_id!=t),r.items_list=r.items_list.map(i=>(i.fields=i.fields.filter(a=>a.field_id!=t),i)),this.storage.updateApp(r),!0}updateFieldInStorage(e,t){const r=this.storage.getApp(e);return r.field_list=r.field_list.map(i=>i.field_id==t.field_id?_objectSpread2(_objectSpread2({},i),t):i),this.storage.updateApp(r),t}updateFieldValue(e,t,r,i){const a=this.storage.getApp(e);return a.items_list.forEach(s=>{s.item_id==t&&s.fields.forEach(l=>{l.field_id==r&&(l.field_value=i,a.items_object[s.item_id][l.field_id]=l)})}),this.storage.updateApp(a),i}async getField(e,t){const r=await this.appProcessor.getApp(e);if(!r)return null;for(let i=0;i<r.field_list.length;i++)if(r.field_list[i].field_id==t)return r.field_list[i];return null}async getFieldIdByNameSpace(e,t){const r=await this.appProcessor.getApp(e);if(!r)return null;for(let i=0;i<r.field_list.length;i++)if(r.field_list[i].name_space==t)return r.field_list[i].field_id;return null}async getFieldModels(e){const t=await this.appProcessor.getApp(e);return t?t.field_list:null}async updateField(e,t){if(!e||!t)return;const r=await this.updatedFieldApi(e,t);return this.updateFieldInStorage(e,r)}async deleteField(e,t){return await this.deleteFieldApi(t),this.deleteFieldInStorage(e,t)}async getFieldValue(e,t,r){let i=null;const a=await this.appProcessor.getApp(e);try{i=a.items_object[t][r].field_value}catch{}return i}async setFieldValue(e,t,r,i){if(!(!e||!t||!r))return await this.setFieldValueApi(e,t,r,i),this.updateFieldValue(e,t,r,i)}fieldListeners(){this.pipeService.onRoot("gh_value_get",{},async(e,t)=>{if(t.app_id&&t.item_id&&t.field_id){let r=await this.getFieldValue(t.app_id,t.item_id,t.field_id);this.pipeService.emit("gh_value_get",t,r)}}),this.pipeService.onRoot("gh_value_set",{},async(e,t)=>{t.item_id&&(this.setFieldValue(t.app_id,t.item_id,t.field_id,t.new_value),delete t.new_value)}),this.pipeService.onRoot("gh_model_get",{},async(e,t)=>{try{let r=await this.getField(t.app_id,t.field_id);this.pipeService.emit("gh_model_get",t,r)}catch(r){console.log("Field model: ",r)}}),this.pipeService.onRoot("gh_model_update",{},async(e,t)=>{let r=await this.updateField(t.app_id,t.field_model);this.pipeService.emit("gh_model_update",{app_id:t.app_id,field_id:t.field_id},r)}),this.pipeService.onRoot("gh_models_get",{},async(e,t)=>{let r=await this.getFieldModels(t.app_id);this.pipeService.emit("gh_models_get",t,r)}),this.pipeService.onRoot("gh_model_delete",{},async(e,t)=>{let r=await this.deleteField(t.app_id,t.field_id);this.pipeService.emit("gh_model_delete",t,r)})}}class FileManager{constructor(e,t,r,i){this.storage=e,this.pipeService=t,this.req=r,this.appProcessor=i}async uploadFileApi(e,t,r){try{const i={"file-0":e,app_id:t,item_id:r};return await this.req.post({url:"/file/formupload",form:i})}catch(i){return console.log(i),null}}async uploadFileFromStringApi(e){try{return await this.req.post({url:"/file/upload",form:{file:JSON.stringify(e)}})}catch(t){return console.log(t),null}}async updateFileFromStringApi(e,t,r,i,a,s,l){try{const u={file_name:r,extension:i,file_id:t,format:a,source:e,alt:s,title:l};return await this.req.post({url:"/file/update",form:{file:JSON.stringify(u)}})}catch(u){return console.log(u),null}}async duplicateFileApi(e){return this.req.post({url:"/api/new/file/duplicate",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{files:JSON.stringify(e)}})}async downloadFileFromString(e,t){if(await this.isFileExists(e,t)){let r=await this.getFile(e,t),i=await this.req.get({url:r.url+"?timestamp="+r.last_update,externalResource:!0});return{file:r,data:i,type:"file"}}else return!1}async duplicateFile(e){let t=await this.duplicateFileApi(e);return t.forEach(r=>{this.addFileToStorage(r.app_id,r)}),t}async deleteFileApi(e){try{return await this.req.get({url:"/file/delete?file_id=".concat(e)})}catch(t){return console.log(t),null}}addFileToStorage(e,t){const r=this.storage.getApp(e);r&&(r.file_list.push(t),this.storage.updateApp(r),this.pipeService.emit("gh_file_upload",{app_id:e,item_id:t.item_id,file_id:t.file_id},t))}addFilesToStorage(e,t){const r=this.storage.getApp(e);r&&(r.file_list.push(...t),this.storage.updateApp(r),t.forEach(i=>{this.pipeService.emit("gh_file_upload",{app_id:e,item_id:i.item_id,file_id:i.file_id},i)}))}deleteFileFromStorage(e,t){const r=this.storage.getApp(t);if(r){let i;r.file_list=r.file_list.filter(a=>a.file_id!=e?!0:(i=a,!1)),this.storage.updateApp(r),this.pipeService.emit("gh_file_delete",{file_id:e},i)}}updateFileInStorage(e,t,r){const i=this.storage.getApp(t);i&&(i.file_list=i.file_list.map(a=>a.file_id==e?r:a),this.storage.updateApp(i),this.pipeService.emit("gh_file_update",{file_id:e}))}async getFile(e,t){const r=await this.appProcessor.getApp(e);return new Promise((i,a)=>{let s=r.file_list.find(l=>l.file_id==t);i(s||"")})}async getFiles(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const r=await this.appProcessor.getApp(e);return new Promise((i,a)=>{let s=r.file_list.filter(l=>t.some(u=>u==l.file_id));i(s||"")})}async uploadFile(e,t,r){const i=await this.uploadFileApi(e,t,r);return this.addFileToStorage(t,i),i}async uploadFileFromString(e){const t=await this.uploadFileFromStringApi(e);return this.addFileToStorage(t.app_id,t),t}async updateFileFromString(e,t,r,i,a,s,l){const u=await this.updateFileFromStringApi(e,t,r,i,a,s,l);return this.updateFileInStorage(t,u.app_id,u),u}async deleteFile(e,t){return await this.deleteFileApi(e),this.deleteFileFromStorage(e,t),!0}async isFileExists(e,t){let r=/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/;if(t){let i=await this.getFile(e,t);return i?r.test(i.url):!1}else return!1}}class DocumentManager{constructor(e,t){this.req=e,this.pipeService=t}createDocument(e){return this.emitDocumentInsert(e),this.req.post({url:"/api/new/document/insert-one",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{document:JSON.stringify(e)}})}emitDocumentInsert(e){const t=typeof e.data=="string"?JSON.parse(e.data):e.data;this.pipeService.emit("gh_document_insert_one",{app_id:e.app_id,item_id:e.item_id,element_id:e.element_id},t)}getDocument(e){return this.req.post({url:"/api/new/document/find-one",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{document:JSON.stringify(e)}})}getDocuments(e){return this.req.post({url:"/api/new/document/find",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{document:JSON.stringify(e)}})}deleteDocument(e){return this.req.post({url:"/api/new/document/remove-one",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{document:JSON.stringify(e)}})}}class Interpritate{constructor(e){this.gudhub=e}async getInterpretationObj(e,t,r,i,a,s){var l=[],u=t.data_model.interpretation.find(function(d){return d.src==r})||t.data_model.interpretation.find(function(d){return d.src=="table"})||{id:"default"},o=u;if(e.data_model&&e.data_model.interpretation){for(var f=0;f<e.data_model.interpretation.length;f++)(e.data_model.interpretation[f].src==r||e.data_model.interpretation[f].src==i)&&l.push(e.data_model.interpretation[f]);for(var f=0;f<l.length;f++)if(l[f].settings&&l[f].settings.condition_filter&&l[f].settings.filters_list.length>0){const h=await gudhub.getItem(s,a);if(h&&gudhub.filter([h],l[f].settings.filters_list).length>0){o=l[f];break}}else o=gudhub.mergeObjects(o,l[f])}return o}getInterpretation(e,t,r,i,a,s,l){const u=this;return new Promise(async(o,f)=>{var d=t&&t.data_type?t.data_type:r;d?gudhub.ghconstructor.getInstance(d).then(async function(h){if(h){var y=await u.getInterpretationObj(t,h.getTemplate().model,i,l,a,s);h.getInterpretation(e,y.id,d,t,a,s).then(function(m){o(gudhub.mergeObjects(m,y))},function(m){f()})}},function(h){}):console.error("Get Interpretation: data_type is undefined",r,t)})}async getInterpretationById(e,t,r,i){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:null,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,l=a??await this.gudhub.getFieldValue(e,t,r),u=s??await this.gudhub.getField(e,r);if(u==null)return"";const f=await(await this.gudhub.ghconstructor.getInstance(u.data_type)).getInterpretation(l,i,u.data_type,u,t,e);return f.html=="<span>no interpretation</span>"?l:f.html}}function WebsocketHandler(n,e){switch(e.api){case"/items/update":console.log("/items/update - ",e),n.itemProcessor.updateItemsInStorage(e.app_id,e.response);break;case"/items/add":console.log("/items/add - ",e),n.itemProcessor.addItemsToStorage(e.app_id,e.response);break;case"/items/delete":console.log("/items/delete - ",e),n.itemProcessor.deleteItemsFromStorage(e.app_id,e.response);break;case"/app/update":console.log("/app/update - ",e),n.appProcessor.updateAppFieldsAndViews(e.response);break;case"/file/delete":console.log("file/delete - ",e),n.fileManager.deleteFileFromStorage(e.response.file_id,e.app_id);break;case"/file/upload":console.log("file/upload - ",e),n.fileManager.addFileToStorage(e.app_id,e.response);break;case"/file/formupload":console.log("file/formupload - ",e);break;case"/file/update":n.fileManager.updateFileInStorage(e.response.file_id,e.response.app_id,e.response),console.log("file/update - ",e);break;case"/new/file/duplicate":n.fileManager.addFilesToStorage(e.app_id,e.response),console.log("new/file/duplicate - ",e);break;case"/api/new/document/insert-one":n.documentManager.emitDocumentInsert(e.response),console.log("/api/new/document/insert-one - ",e);break;case"/ws/emit-to-user":console.log("/ws/emit-to-user - ",e);break;case"/ws/broadcast-to-app-subscribers":console.log("/ws/broadcast-to-app-subscribers - ",e);const t=JSON.parse(e.response);if(!t.data_type)return;n.ghconstructor.getInstance(t.data_type).then(r=>{r.onMessage(e.app_id,e.user_id,t)});break;default:console.warn("WEBSOCKETS is not process this API:",e.api)}}class GroupManager{constructor(e,t){this.req=t,this.gudhub=e}async createGroupApi(e){try{const t={token:await this.gudhub.auth.getToken(),group_name:e};return await this.req.post({url:"/api/sharing-group/create-group",form:t})}catch(t){return console.log(t),null}}async updateGroupApi(e,t){try{const r={token:await this.gudhub.auth.getToken(),group_name:t,group_id:e};return await this.req.post({url:"/api/sharing-group/update-group",form:r})}catch(r){return console.log(r),null}}async deleteGroupApi(e){try{const t={token:await this.gudhub.auth.getToken(),group_id:e};return await this.req.post({url:"/api/sharing-group/delete-group",form:t})}catch(t){return console.log(t),null}}async addUserToGroupApi(e,t,r){try{const i={token:await this.gudhub.auth.getToken(),group_id:e,user_id:t,group_permission:r};return await this.req.post({url:"/api/sharing-group/add-user-to-group",form:i})}catch(i){return console.log(i),null}}async getUsersByGroupApi(e){try{const t={token:await this.gudhub.auth.getToken(),group_id:e};return await this.req.post({url:"/api/sharing-group/get-users-by-group",form:t})}catch(t){return console.log(t),null}}async updateUserInGroupApi(e,t,r){try{const i={token:await this.gudhub.auth.getToken(),user_id:e,group_id:t,group_permission:r};return await this.req.post({url:"/api/sharing-group/update-user-in-group",form:i})}catch(i){return console.log(i),null}}async deleteUserFromGroupApi(e,t){try{const r={token:await this.gudhub.auth.getToken(),user_id:e,group_id:t};return await this.req.post({url:"/api/sharing-group/delete-user-from-group",form:r})}catch(r){return console.log(r),null}}async getGroupsByUserApi(e){try{const t={token:await this.gudhub.auth.getToken(),user_id:e};return await this.req.post({url:"/api/sharing-group/get-groups-by-user",form:t})}catch(t){return console.log(t),null}}}class AppGroupSharing{constructor(e,t){this.req=t,this.gudhub=e}async addAppToGroupApi(e,t,r){try{const i={token:await this.gudhub.auth.getToken(),app_id:e,group_id:t,app_permission:r};return await this.req.post({url:"/api/sharing-group/add-app-to-group",form:i})}catch(i){return console.log(i),null}}async getAppsByGroupApi(e){try{const t={token:await this.gudhub.auth.getToken(),group_id:e};return await this.req.post({url:"/api/sharing-group/get-apps-by-group",form:t})}catch(t){return console.log(t),null}}async updateAppInGroupApi(e,t,r){try{const i={token:await this.gudhub.auth.getToken(),group_id:t,app_id:e,app_permission:r};return await this.req.post({url:"/api/sharing-group/update-app-in-group",form:i})}catch(i){return console.log(i),null}}async deleteAppFromGroupApi(e,t,r){try{const i={token:await this.gudhub.auth.getToken(),group_id:t,app_id:e,app_permission:r};return await this.req.post({url:"/api/sharing-group/delete-app-from-group",form:i})}catch(i){return console.log(i),null}}async getGroupsByAppApi(e){try{const t={token:await this.gudhub.auth.getToken(),app_id:e};return await this.req.post({url:"/api/sharing-group/get-groups-by-app",form:t})}catch(t){return console.log(t),null}}}class GroupSharing{constructor(e,t,r){this.req=t,this.gudhub=e,this.pipeService=r,this.groupManager=new GroupManager(e,t),this.appGroupSharing=new AppGroupSharing(e,t)}createGroup(e){return this.groupManager.createGroupApi(e)}updateGroup(e,t){return this.groupManager.updateGroupApi(e,t)}deleteGroup(e){return this.groupManager.deleteGroupApi(e)}async addUserToGroup(e,t,r){let i=await this.groupManager.addUserToGroupApi(e,t,r);return this.pipeService.emit("group_members_add",{app_id:"group_sharing"},i),i}getUsersByGroup(e){return this.groupManager.getUsersByGroupApi(e)}async updateUserInGroup(e,t,r){let i=await this.groupManager.updateUserInGroupApi(e,t,r);return this.pipeService.emit("group_members_update",{app_id:"group_sharing"},i),i}async deleteUserFromGroup(e,t){let r=await this.groupManager.deleteUserFromGroupApi(e,t);return this.pipeService.emit("group_members_delete",{app_id:"group_sharing"},r),r}getGroupsByUser(e){return this.groupManager.getGroupsByUserApi(e)}addAppToGroup(e,t,r){return this.appGroupSharing.addAppToGroupApi(e,t,r)}getAppsByGroup(e){return this.appGroupSharing.getAppsByGroupApi(e)}updateAppInGroup(e,t,r){return this.appGroupSharing.updateAppInGroupApi(e,t,r)}deleteAppFromGroup(e,t,r){return this.appGroupSharing.deleteAppFromGroupApi(e,t,r)}getGroupsByApp(e){return this.appGroupSharing.getGroupsByAppApi(e)}}class Sharing{constructor(e,t){this.req=t,this.gudhub=e}async add(e,t,r){try{const i={token:await this.gudhub.auth.getToken(),app_id:e,user_id:t,sharing_permission:r};return await this.req.post({url:"/sharing/add",form:i})}catch(i){return console.log(i),null}}async update(e,t,r){try{const i={token:await this.gudhub.auth.getToken(),app_id:e,user_id:t,sharing_permission:r};return await this.req.post({url:"/sharing/update",form:i})}catch(i){return console.log(i),null}}async delete(e,t){try{const r={token:await this.gudhub.auth.getToken(),app_id:e,user_id:t};return await this.req.post({url:"/sharing/delete",form:r})}catch(r){return console.log(r),null}}async getAppUsers(e){try{const t={token:await this.gudhub.auth.getToken(),app_id:e};return await this.req.post({url:"/sharing/get-app-users",form:t})}catch(t){return console.log(t),null}}async addInvitation(e,t){try{const r={token:await this.gudhub.auth.getToken(),guests_emails:e,apps:t};return await this.req.post({url:"/api/invitation/add",form:r})}catch(r){return console.log(r),null}}}class WebSocketEmitter{constructor(e){this.gudhub=e}async emitToUser(e,t){const r={user_id:e,data:typeof t=="object"?JSON.stringify(t):t};return await this.gudhub.req.post({url:"/ws/emit-to-user",form:r})}async broadcastToAppSubscribers(e,t,r){const i={app_id:e,data:JSON.stringify({data_type:t,data:r})};return await this.gudhub.req.post({url:"/ws/broadcast-to-app-subscribers",form:i})}}class DataService{}let AppDataService$1=class extends DataService{constructor(e,t,r){super(),this.chunkDataService=new ChunkDataService(e,chunkDataServiceConf,r),this.gudhub=r}isWithCache(){return!1}async processRequestedApp(e,t){if(!this.isWithCache()){let r=await this.chunkDataService.getMergedChunkForIDList(e,t.chunks);return r&&(t.items_list=await this.gudhub.util.mergeChunks([r,t])),t}throw new Error}},ChunkDataService$1=class extends DataService{getMergedChunkForIDList(e){}isWithCache(){return!1}};class AppAPI{constructor(e){this.req=e}async getApp(e){return this.req.get({url:"/api/app/get",params:{app_id:e}})}}let objectAssignWithOverride=function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];for(let i of t)if(i)for(let a of Object.keys(i)){const s=Object.getOwnPropertyDescriptor(i,a);s.enumerable&&Object.defineProperty(n,a,s)}};class HttpService{}class AppHttpService extends AppDataService$1{constructor(e,t,r){super(e,t,r),this.appApi=new AppAPI(e);let i=new HttpService(t);objectAssignWithOverride(this,i)}async getApp(e){let t=await this.appApi.getApp(e);return this.processRequestedApp(e,t)}async getAppWithoutProcessing(e){return this.appApi.getApp(e)}async putApp(e,t){}static[Symbol.hasInstance](e){try{return e instanceof AppHttpService||e instanceof HttpService}catch{return!1}}}const appsConf={store:"apps"},chunksConf={store:"chunks"},dbName="gudhub",chunksMergeConf={store:"chunksMergeCache"};class IndexedDBService{constructor(e){this.store=e.store,this.dbName=e.dbName,this.dbVersion=e.dbVersion,this.requestCache=new Map}}class IndexedDBManager{constructor(e,t){if(IndexedDBManager.dbNameToInstanceMap||(IndexedDBManager.dbNameToInstanceMap=new Map),IndexedDBManager.dbNameToInstanceMap.has(e))return IndexedDBManager.dbNameToInstanceMap.get(e);this.db=null,this.dbName=e,this.storeNameList=t,IndexedDBManager.dbNameToInstanceMap.set(e,this),this.db=null}async checkAndCreateStore(e){const r=(await indexedDB.databases()).find(s=>s.name===this.dbName);let i=!1,a=this;return r&&(i=await new Promise((s,l)=>{const u=indexedDB.open(a.dbName);u.onsuccess=function(o){const f=o.target.result,d=f.objectStoreNames.contains(e);f.close(),s(d)},u.onerror=function(o){l(o.target.error)}})),i?!0:new Promise((s,l)=>{const u=indexedDB.open(a.dbName,r?r.version+1:1);u.onupgradeneeded=function(o){const f=o.target.result;f.objectStoreNames.contains(e)||f.createObjectStore(e)},u.onsuccess=function(o){o.target.result.close(),s()},u.onerror=l})}async openDB(){if(this.db)return this.db;let e,t,r=new Promise((s,l)=>{e=s,t=l});for(let s of this.storeNameList)await this.checkAndCreateStore(s);let i=this;const a=indexedDB.open(this.dbName);return a.onsuccess=s=>{i.db=s.target.result,e(this.db)},a.onerror=t,r}async executeOperation(e,t){let r=await this.openDB();return new Promise((i,a)=>{const s=r.transaction(e,"readwrite"),l=s.objectStore(e);s.oncomplete=()=>i(),s.onerror=u=>a("Transaction failed: ".concat(u.target.error));try{t(l)}catch(u){a("Operation failed: ".concat(u.message))}})}async enqueueOperation(e,t){if(this.queue.push({storeName:e,operation:t}),!this.isProcessing){for(this.isProcessing=!0;this.queue.length>0;){const{storeName:r,operation:i}=this.queue.shift();try{await this.executeOperation(r,i)}catch(a){console.error("Operation failed:",a)}}this.isProcessing=!1}}async ensureStoreExists(e){}async createObjectStore(e){}}const gudhubIndexedDBManager=new IndexedDBManager(dbName,[appsConf.store,chunksConf.store,chunksMergeConf.store]);class ChunkAPI{constructor(e){this.req=e}async getChunk(e,t){return this.req.get({url:"".concat(this.req.root,"/api/get-items-chunk/").concat(e,"/").concat(t),method:"GET"})}async getLastChunk(e){return this.req.axiosRequest({url:"".concat(this.req.root,"/api/get-last-items-chunk/").concat(e),method:"GET"})}}class ChunkHttpService extends ChunkDataService$1{constructor(e,t){super(),this.chunkApi=new ChunkAPI(e);let r=new HttpService(t);objectAssignWithOverride(this,r)}async getChunk(e,t){return this.chunkApi.getChunk(e,t)}async getChunksForId(e){return[]}getCachedMergedChunk(e,t){}getMergedChunkForIDList(e,t){}putChunk(){}static[Symbol.hasInstance](e){try{return e instanceof ChunkHttpService||e instanceof HttpService}catch{return!1}}}class BaseStoreManager{constructor(e,t){this.dbManager=e,this.storeName=t}async addItem(e,t){return new Promise(async(r,i)=>{this.dbManager.executeOperation(this.storeName,a=>{const s=a.add(t,e);s.onsuccess=r,s.onerror=i})})}async putItem(e,t){return new Promise(async(r,i)=>{this.dbManager.executeOperation(this.storeName,a=>{const s=a.put(t,e);s.onsuccess=r,s.onerror=i})})}async hasItem(e){try{return!!await this.getItem(e)}catch{return!1}return new Promise(async(t,r)=>{this.dbManager.executeOperation(this.storeName,i=>{const a=i.get(e);a.onsuccess=()=>{const s=a.result;t(s)},a.onerror=r})})}async getItem(e){return new Promise(async(t,r)=>{this.dbManager.executeOperation(this.storeName,i=>{const a=i.get(e);a.onsuccess=()=>{const s=a.result;t(s)},a.onerror=r})})}async updateItem(e,t){return new Promise(async(r,i)=>{this.dbManager.executeOperation(this.storeName,a=>{const s=a.get(e);s.onsuccess=()=>{const l=s.result;Object.assign(l,t),a.put(l,e),r()},s.onerror=i})})}async deleteItem(e){return new Promise(async(t,r)=>{this.dbManager.executeOperation(this.storeName,i=>{const a=i.delete(e);a.onsuccess=t,a.onerror=r})})}}class AppStoreManager extends BaseStoreManager{constructor(){super(gudhubIndexedDBManager,appsConf.store)}async getApp(e){return this.getItem(e)}async addApp(e,t){return this.addItem(e,t)}async putApp(e,t){return this.putItem(e,t)}async hasApp(e){return this.hasItem(e)}async deleteApp(e){return this.deleteItem(e)}}class MergedChunksStoreManager extends BaseStoreManager{constructor(){super(gudhubIndexedDBManager,chunksMergeConf.store)}async get(e){return this.getItem(e)}async add(e,t){return this.addItem(e,t)}async put(e,t){return this.putItem(e,t)}async delete(e){return this.deleteItem(e)}}class IndexedDBChunkService extends ChunkDataService$1{constructor(e,t,r){super(e,t),this.dataService=new ChunkHttpService(e),this.requestCache=new Map,this.gudhub=r,this.storeManager=new MergedChunksStoreManager}static[Symbol.hasInstance](e){try{return e instanceof IndexedDBChunkService||e instanceof IndexedDBService}catch{return!1}}async getCachedMergedChunk(e,t){try{return(await this.storeManager.get(e)).mergedData}catch{const i=t.map(l=>this.dataService.getChunk(e,l)),a=await Promise.all(i);let s=await this.gudhub.util.mergeChunks(a);return this.putMergedChunks(e,{hashes:t,mergedData:{items_list:s}}),{items_list:s}}}isWithCache(){return!0}async getMergedChunkForApp(e){}async getMergedChunkForIDList(e,t){try{let r=!0,i=await this.storeManager.get(e);try{if(t.length<i.hashes.length)throw new Error;for(let u of i.hashes)t.indexOf(u)!=i.hashes.indexOf(u)&&(r=!1)}catch{r=!1}let a=[],s=[];if(t.length>i.hashes.length&&(a=t.slice(i.hashes.length)),r||(a=t),a.length>0){const u=a.map(o=>this.dataService.getChunk(e,o));s=await Promise.all(u)}let l;return r||(l=await this.gudhub.util.mergeChunks([...s])),r&&(l=await this.gudhub.util.mergeChunks([i.mergedData,...s])),a.length>0&&this.putMergedChunks(e,{hashes:t,mergedData:{items_list:l}}),{items_list:l}}catch{const i=t.map(l=>this.dataService.getChunk(e,l)),a=await Promise.all(i);let s=await this.gudhub.util.mergeChunks(a);return this.putMergedChunks(e,{hashes:t,mergedData:{items_list:s}}),{items_list:s}}}async putMergedChunks(e,t){return this.storeManager.put(e,t)}async putChunk(e,t){return this.storeManager.putChunk(e,t)}async getChunk(e,t){if(this.requestCache.has(t))return this.requestCache.get(t);try{let r=this.storeManager.getChunk(t);return self.requestCache.set(t,r),await r,r}catch{let i=this.dataService.getChunk(e,t);this.requestCache.set(t,i);let a=await i;return this.putChunk(t,a),i}}}const jsContent=`(function(){"use strict";(()=>{let Dt,qt,Or,jr;var oe=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};function G(n){return n&&n.__esModule?n.default:n}function Tr(n,e,t,r){Object.defineProperty(n,e,{get:t,set:r,enumerable:!0,configurable:!0})}var Bt={},_t={},A=oe.parcelRequire94c2;A==null&&((A=function(n){if(n in Bt)return Bt[n].exports;if(n in _t){var e=_t[n];delete _t[n];var t={id:n,exports:{}};return Bt[n]=t,e.call(t.exports,t,t.exports),t.exports}var r=Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}).register=function(n,e){_t[n]=e},oe.parcelRequire94c2=A);var L=A.register;L("1ufAB",function(n,e){var t=A("iEaqd"),r=A("iNZzY"),a=A("2VbXH"),i=A("6Mx50");function l(u){var o=new a(u),p=r(a.prototype.request,o);return t.extend(p,a.prototype,o),t.extend(p,o),p}var s=l(A("bM4se"));s.Axios=a,s.create=function(u){return l(i(s.defaults,u))},s.Cancel=A("g2liO"),s.CancelToken=A("14PRn"),s.isCancel=A("8kGOw"),s.all=function(u){return Promise.all(u)},s.spread=A("i3hBo"),s.isAxiosError=A("dhYWP"),n.exports=s,n.exports.default=s}),L("iEaqd",function(n,e){var t=A("iNZzY"),r=Object.prototype.toString;function a(I){return r.call(I)==="[object Array]"}function i(I){return I===void 0}function l(I){return I!==null&&!i(I)&&I.constructor!==null&&!i(I.constructor)&&typeof I.constructor.isBuffer=="function"&&I.constructor.isBuffer(I)}function s(I){return r.call(I)==="[object ArrayBuffer]"}function u(I){return typeof FormData<"u"&&I instanceof FormData}function o(I){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(I):I&&I.buffer&&I.buffer instanceof ArrayBuffer}function p(I){return typeof I=="string"}function m(I){return typeof I=="number"}function d(I){return I!==null&&typeof I=="object"}function y(I){if(r.call(I)!=="[object Object]")return!1;var F=Object.getPrototypeOf(I);return F===null||F===Object.prototype}function f(I){return r.call(I)==="[object Date]"}function S(I){return r.call(I)==="[object File]"}function v(I){return r.call(I)==="[object Blob]"}function w(I){return r.call(I)==="[object Function]"}function g(I){return d(I)&&w(I.pipe)}function _(I){return typeof URLSearchParams<"u"&&I instanceof URLSearchParams}function $(I){return I.trim?I.trim():I.replace(/^\\s+|\\s+$/g,"")}function x(){return(typeof navigator>"u"||navigator.product!=="ReactNative"&&navigator.product!=="NativeScript"&&navigator.product!=="NS")&&typeof window<"u"&&typeof document<"u"}function T(I,F){if(I!=null)if(typeof I!="object"&&(I=[I]),a(I))for(var C=0,B=I.length;C<B;C++)F.call(null,I[C],C,I);else for(var V in I)Object.prototype.hasOwnProperty.call(I,V)&&F.call(null,I[V],V,I)}function P(){var I={};function F(V,X){y(I[X])&&y(V)?I[X]=P(I[X],V):y(V)?I[X]=P({},V):a(V)?I[X]=V.slice():I[X]=V}for(var C=0,B=arguments.length;C<B;C++)T(arguments[C],F);return I}function D(I,F,C){return T(F,function(B,V){C&&typeof B=="function"?I[V]=t(B,C):I[V]=B}),I}function R(I){return I.charCodeAt(0)===65279&&(I=I.slice(1)),I}n.exports={isArray:a,isArrayBuffer:s,isBuffer:l,isFormData:u,isArrayBufferView:o,isString:p,isNumber:m,isObject:d,isPlainObject:y,isUndefined:i,isDate:f,isFile:S,isBlob:v,isFunction:w,isStream:g,isURLSearchParams:_,isStandardBrowserEnv:x,forEach:T,merge:P,extend:D,trim:$,stripBOM:R}}),L("iNZzY",function(n,e){n.exports=function(t,r){return function(){for(var a=Array(arguments.length),i=0;i<a.length;i++)a[i]=arguments[i];return t.apply(r,a)}}}),L("2VbXH",function(n,e){var t=A("iEaqd"),r=A("gWG2h"),a=A("4m3Da"),i=A("d4try"),l=A("6Mx50"),s=A("hiYAY"),u=s.validators;function o(p){this.defaults=p,this.interceptors={request:new a,response:new a}}o.prototype.request=function(p){typeof p=="string"?(p=arguments[1]||{},p.url=arguments[0]):p=p||{},(p=l(this.defaults,p)).method?p.method=p.method.toLowerCase():this.defaults.method?p.method=this.defaults.method.toLowerCase():p.method="get";var m,d=p.transitional;d!==void 0&&s.assertOptions(d,{silentJSONParsing:u.transitional(u.boolean,"1.0.0"),forcedJSONParsing:u.transitional(u.boolean,"1.0.0"),clarifyTimeoutError:u.transitional(u.boolean,"1.0.0")},!1);var y=[],f=!0;this.interceptors.request.forEach(function($){(typeof $.runWhen!="function"||$.runWhen(p)!==!1)&&(f=f&&$.synchronous,y.unshift($.fulfilled,$.rejected))});var S=[];if(this.interceptors.response.forEach(function($){S.push($.fulfilled,$.rejected)}),!f){var v=[i,void 0];for(Array.prototype.unshift.apply(v,y),v=v.concat(S),m=Promise.resolve(p);v.length;)m=m.then(v.shift(),v.shift());return m}for(var w=p;y.length;){var g=y.shift(),_=y.shift();try{w=g(w)}catch($){_($);break}}try{m=i(w)}catch($){return Promise.reject($)}for(;S.length;)m=m.then(S.shift(),S.shift());return m},o.prototype.getUri=function(p){return r((p=l(this.defaults,p)).url,p.params,p.paramsSerializer).replace(/^\\?/,"")},t.forEach(["delete","get","head","options"],function(p){o.prototype[p]=function(m,d){return this.request(l(d||{},{method:p,url:m,data:(d||{}).data}))}}),t.forEach(["post","put","patch"],function(p){o.prototype[p]=function(m,d,y){return this.request(l(y||{},{method:p,url:m,data:d}))}}),n.exports=o}),L("gWG2h",function(n,e){var t=A("iEaqd");function r(a){return encodeURIComponent(a).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}n.exports=function(a,i,l){if(!i)return a;if(l)s=l(i);else if(t.isURLSearchParams(i))s=i.toString();else{var s,u=[];t.forEach(i,function(p,m){p!=null&&(t.isArray(p)?m+="[]":p=[p],t.forEach(p,function(d){t.isDate(d)?d=d.toISOString():t.isObject(d)&&(d=JSON.stringify(d)),u.push(r(m)+"="+r(d))}))}),s=u.join("&")}if(s){var o=a.indexOf("#");o!==-1&&(a=a.slice(0,o)),a+=(a.indexOf("?")===-1?"?":"&")+s}return a}}),L("4m3Da",function(n,e){var t=A("iEaqd");function r(){this.handlers=[]}r.prototype.use=function(a,i,l){return this.handlers.push({fulfilled:a,rejected:i,synchronous:!!l&&l.synchronous,runWhen:l?l.runWhen:null}),this.handlers.length-1},r.prototype.eject=function(a){this.handlers[a]&&(this.handlers[a]=null)},r.prototype.forEach=function(a){t.forEach(this.handlers,function(i){i!==null&&a(i)})},n.exports=r}),L("d4try",function(n,e){var t=A("iEaqd"),r=A("gu59S"),a=A("8kGOw"),i=A("bM4se");function l(s){s.cancelToken&&s.cancelToken.throwIfRequested()}n.exports=function(s){return l(s),s.headers=s.headers||{},s.data=r.call(s,s.data,s.headers,s.transformRequest),s.headers=t.merge(s.headers.common||{},s.headers[s.method]||{},s.headers),t.forEach(["delete","get","head","post","put","patch","common"],function(u){delete s.headers[u]}),(s.adapter||i.adapter)(s).then(function(u){return l(s),u.data=r.call(s,u.data,u.headers,s.transformResponse),u},function(u){return!a(u)&&(l(s),u&&u.response&&(u.response.data=r.call(s,u.response.data,u.response.headers,s.transformResponse))),Promise.reject(u)})}}),L("gu59S",function(n,e){var t=A("iEaqd"),r=A("bM4se");n.exports=function(a,i,l){var s=this||r;return t.forEach(l,function(u){a=u.call(s,a,i)}),a}}),L("bM4se",function(n,e){var t=A("2dKjk"),r=A("iEaqd"),a=A("4xE2z"),i=A("9na6w"),l={"Content-Type":"application/x-www-form-urlencoded"};function s(p,m){!r.isUndefined(p)&&r.isUndefined(p["Content-Type"])&&(p["Content-Type"]=m)}function u(p,m,d){if(r.isString(p))try{return(m||JSON.parse)(p),r.trim(p)}catch(y){if(y.name!=="SyntaxError")throw y}return(0,JSON.stringify)(p)}var o={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:function(){var p;return(typeof XMLHttpRequest<"u"||t!==void 0&&Object.prototype.toString.call(t)==="[object process]")&&(p=A("kHaX1")),p}(),transformRequest:[function(p,m){return a(m,"Accept"),a(m,"Content-Type"),r.isFormData(p)||r.isArrayBuffer(p)||r.isBuffer(p)||r.isStream(p)||r.isFile(p)||r.isBlob(p)?p:r.isArrayBufferView(p)?p.buffer:r.isURLSearchParams(p)?(s(m,"application/x-www-form-urlencoded;charset=utf-8"),p.toString()):r.isObject(p)||m&&m["Content-Type"]==="application/json"?(s(m,"application/json"),u(p)):p}],transformResponse:[function(p){var m=this.transitional,d=m&&m.silentJSONParsing,y=m&&m.forcedJSONParsing,f=!d&&this.responseType==="json";if(f||y&&r.isString(p)&&p.length)try{return JSON.parse(p)}catch(S){if(f)throw S.name==="SyntaxError"?i(S,this,"E_JSON_PARSE"):S}return p}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(p){return p>=200&&p<300}};o.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],function(p){o.headers[p]={}}),r.forEach(["post","put","patch"],function(p){o.headers[p]=r.merge(l)}),n.exports=o}),L("2dKjk",function(n,e){var t,r,a,i=n.exports={};function l(){throw Error("setTimeout has not been defined")}function s(){throw Error("clearTimeout has not been defined")}function u(w){if(t===setTimeout)return setTimeout(w,0);if((t===l||!t)&&setTimeout)return t=setTimeout,setTimeout(w,0);try{return t(w,0)}catch{try{return t.call(null,w,0)}catch{return t.call(this,w,0)}}}function o(w){if(r===clearTimeout)return clearTimeout(w);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(w);try{return r(w)}catch{try{return r.call(null,w)}catch{return r.call(this,w)}}}(function(){try{t=typeof setTimeout=="function"?setTimeout:l}catch{t=l}try{r=typeof clearTimeout=="function"?clearTimeout:s}catch{r=s}})();var p=[],m=!1,d=-1;function y(){m&&a&&(m=!1,a.length?p=a.concat(p):d=-1,p.length&&f())}function f(){if(!m){var w=u(y);m=!0;for(var g=p.length;g;){for(a=p,p=[];++d<g;)a&&a[d].run();d=-1,g=p.length}a=null,m=!1,o(w)}}function S(w,g){this.fun=w,this.array=g}function v(){}i.nextTick=function(w){var g=Array(arguments.length-1);if(arguments.length>1)for(var _=1;_<arguments.length;_++)g[_-1]=arguments[_];p.push(new S(w,g)),p.length!==1||m||u(f)},S.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(w){return[]},i.binding=function(w){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(w){throw Error("process.chdir is not supported")},i.umask=function(){return 0}}),L("4xE2z",function(n,e){var t=A("iEaqd");n.exports=function(r,a){t.forEach(r,function(i,l){l!==a&&l.toUpperCase()===a.toUpperCase()&&(r[a]=i,delete r[l])})}}),L("9na6w",function(n,e){n.exports=function(t,r,a,i,l){return t.config=r,a&&(t.code=a),t.request=i,t.response=l,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}}),L("kHaX1",function(n,e){var t=A("iEaqd"),r=A("hAgIk"),a=A("gIEx2"),i=A("gWG2h"),l=A("e3Yo9"),s=A("lo19V"),u=A("eg6xZ"),o=A("iUqaj");n.exports=function(p){return new Promise(function(m,d){var y=p.data,f=p.headers,S=p.responseType;t.isFormData(y)&&delete f["Content-Type"];var v=new XMLHttpRequest;if(p.auth){var w=p.auth.username||"",g=p.auth.password?unescape(encodeURIComponent(p.auth.password)):"";f.Authorization="Basic "+btoa(w+":"+g)}var _=l(p.baseURL,p.url);function $(){if(v){var T="getAllResponseHeaders"in v?s(v.getAllResponseHeaders()):null,P=S&&S!=="text"&&S!=="json"?v.response:v.responseText,D={data:P,status:v.status,statusText:v.statusText,headers:T,config:p,request:v};r(m,d,D),v=null}}if(v.open(p.method.toUpperCase(),i(_,p.params,p.paramsSerializer),!0),v.timeout=p.timeout,"onloadend"in v?v.onloadend=$:v.onreadystatechange=function(){v&&v.readyState===4&&(v.status!==0||v.responseURL&&v.responseURL.indexOf("file:")===0)&&setTimeout($)},v.onabort=function(){v&&(d(o("Request aborted",p,"ECONNABORTED",v)),v=null)},v.onerror=function(){d(o("Network Error",p,null,v)),v=null},v.ontimeout=function(){var T="timeout of "+p.timeout+"ms exceeded";p.timeoutErrorMessage&&(T=p.timeoutErrorMessage),d(o(T,p,p.transitional&&p.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",v)),v=null},t.isStandardBrowserEnv()){var x=(p.withCredentials||u(_))&&p.xsrfCookieName?a.read(p.xsrfCookieName):void 0;x&&(f[p.xsrfHeaderName]=x)}"setRequestHeader"in v&&t.forEach(f,function(T,P){y===void 0&&P.toLowerCase()==="content-type"?delete f[P]:v.setRequestHeader(P,T)}),t.isUndefined(p.withCredentials)||(v.withCredentials=!!p.withCredentials),S&&S!=="json"&&(v.responseType=p.responseType),typeof p.onDownloadProgress=="function"&&v.addEventListener("progress",p.onDownloadProgress),typeof p.onUploadProgress=="function"&&v.upload&&v.upload.addEventListener("progress",p.onUploadProgress),p.cancelToken&&p.cancelToken.promise.then(function(T){v&&(v.abort(),d(T),v=null)}),y||(y=null),v.send(y)})}}),L("hAgIk",function(n,e){var t=A("iUqaj");n.exports=function(r,a,i){var l=i.config.validateStatus;!i.status||!l||l(i.status)?r(i):a(t("Request failed with status code "+i.status,i.config,null,i.request,i))}}),L("iUqaj",function(n,e){var t=A("9na6w");n.exports=function(r,a,i,l,s){return t(Error(r),a,i,l,s)}}),L("gIEx2",function(n,e){var t=A("iEaqd");n.exports=t.isStandardBrowserEnv()?function(){return{write:function(r,a,i,l,s,u){var o=[];o.push(r+"="+encodeURIComponent(a)),t.isNumber(i)&&o.push("expires="+new Date(i).toGMTString()),t.isString(l)&&o.push("path="+l),t.isString(s)&&o.push("domain="+s),u===!0&&o.push("secure"),document.cookie=o.join("; ")},read:function(r){var a=document.cookie.match(RegExp("(^|;\\\\s*)("+r+")=([^;]*)"));return a?decodeURIComponent(a[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()}),L("e3Yo9",function(n,e){var t=A("2rjk0"),r=A("5nGHC");n.exports=function(a,i){return a&&!t(i)?r(a,i):i}}),L("2rjk0",function(n,e){n.exports=function(t){return/^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(t)}}),L("5nGHC",function(n,e){n.exports=function(t,r){return r?t.replace(/\\/+$/,"")+"/"+r.replace(/^\\/+/,""):t}}),L("lo19V",function(n,e){var t=A("iEaqd"),r=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];n.exports=function(a){var i,l,s,u={};return a&&t.forEach(a.split(\`
|
|
99
|
-
\`),function(o){s=o.indexOf(":"),i=t.trim(o.substr(0,s)).toLowerCase(),l=t.trim(o.substr(s+1)),i&&!(u[i]&&r.indexOf(i)>=0)&&(i==="set-cookie"?u[i]=(u[i]?u[i]:[]).concat([l]):u[i]=u[i]?u[i]+", "+l:l)}),u}}),L("eg6xZ",function(n,e){var t=A("iEaqd");n.exports=t.isStandardBrowserEnv()?function(){var r,a=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");function l(s){var u=s;return a&&(i.setAttribute("href",u),u=i.href),i.setAttribute("href",u),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:i.pathname.charAt(0)==="/"?i.pathname:"/"+i.pathname}}return r=l(window.location.href),function(s){var u=t.isString(s)?l(s):s;return u.protocol===r.protocol&&u.host===r.host}}():function(){return function(){return!0}}()}),L("8kGOw",function(n,e){n.exports=function(t){return!!(t&&t.__CANCEL__)}}),L("6Mx50",function(n,e){var t=A("iEaqd");n.exports=function(r,a){a=a||{};var i={},l=["url","method","data"],s=["headers","auth","proxy","params"],u=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],o=["validateStatus"];function p(f,S){return t.isPlainObject(f)&&t.isPlainObject(S)?t.merge(f,S):t.isPlainObject(S)?t.merge({},S):t.isArray(S)?S.slice():S}function m(f){t.isUndefined(a[f])?t.isUndefined(r[f])||(i[f]=p(void 0,r[f])):i[f]=p(r[f],a[f])}t.forEach(l,function(f){t.isUndefined(a[f])||(i[f]=p(void 0,a[f]))}),t.forEach(s,m),t.forEach(u,function(f){t.isUndefined(a[f])?t.isUndefined(r[f])||(i[f]=p(void 0,r[f])):i[f]=p(void 0,a[f])}),t.forEach(o,function(f){f in a?i[f]=p(r[f],a[f]):f in r&&(i[f]=p(void 0,r[f]))});var d=l.concat(s).concat(u).concat(o),y=Object.keys(r).concat(Object.keys(a)).filter(function(f){return d.indexOf(f)===-1});return t.forEach(y,m),i}}),L("hiYAY",function(n,e){var t=A("bTAft"),r={};["object","boolean","number","function","string","symbol"].forEach(function(u,o){r[u]=function(p){return typeof p===u||"a"+(o<1?"n ":" ")+u}});var a={},i=t.version.split(".");function l(u,o){for(var p=o?o.split("."):i,m=u.split("."),d=0;d<3;d++){if(p[d]>m[d])return!0;if(p[d]<m[d])break}return!1}function s(u,o,p){if(typeof u!="object")throw TypeError("options must be an object");for(var m=Object.keys(u),d=m.length;d-- >0;){var y=m[d],f=o[y];if(f){var S=u[y],v=S===void 0||f(S,y,u);if(v!==!0)throw TypeError("option "+y+" must be "+v);continue}if(p!==!0)throw Error("Unknown option "+y)}}r.transitional=function(u,o,p){var m=o&&l(o);function d(y,f){return"[Axios v"+t.version+"] Transitional option '"+y+"'"+f+(p?". "+p:"")}return function(y,f,S){if(u===!1)throw Error(d(f," has been removed in "+o));return m&&!a[f]&&(a[f]=!0,console.warn(d(f," has been deprecated since v"+o+" and will be removed in the near future"))),!u||u(y,f,S)}},n.exports={isOlderVersion:l,assertOptions:s,validators:r}}),L("bTAft",function(n,e){n.exports=JSON.parse('{"_args":[["axios@0.21.4","/home/vitaly/Documents/work/gudhubclient/override_npm/gudhub"]],"_from":"axios@0.21.4","_id":"axios@0.21.4","_inBundle":false,"_integrity":"sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==","_location":"/axios","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"axios@0.21.4","name":"axios","escapedName":"axios","rawSpec":"0.21.4","saveSpec":null,"fetchSpec":"0.21.4"},"_requiredBy":["/"],"_resolved":"https://registry.npmjs.org/axios/-/axios-0.21.4.tgz","_spec":"0.21.4","_where":"/home/vitaly/Documents/work/gudhubclient/override_npm/gudhub","author":{"name":"Matt Zabriskie"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"bugs":{"url":"https://github.com/axios/axios/issues"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}],"dependencies":{"follow-redirects":"^1.14.0"},"description":"Promise based HTTP client for the browser and node.js","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"homepage":"https://axios-http.com","jsdelivr":"dist/axios.min.js","keywords":["xhr","http","ajax","promise","node"],"license":"MIT","main":"index.js","name":"axios","repository":{"type":"git","url":"git+https://github.com/axios/axios.git"},"scripts":{"build":"NODE_ENV=production grunt build","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","examples":"node ./examples/server.js","fix":"eslint --fix lib/**/*.js","postversion":"git push && git push --tags","preversion":"npm test","start":"node ./sandbox/server.js","test":"grunt test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"},"typings":"./index.d.ts","unpkg":"dist/axios.min.js","version":"0.21.4"}')}),L("g2liO",function(n,e){function t(r){this.message=r}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,n.exports=t}),L("14PRn",function(n,e){var t=A("g2liO");function r(a){if(typeof a!="function")throw TypeError("executor must be a function.");this.promise=new Promise(function(s){i=s});var i,l=this;a(function(s){l.reason||(l.reason=new t(s),i(l.reason))})}r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var a;return{token:new r(function(i){a=i}),cancel:a}},n.exports=r}),L("i3hBo",function(n,e){n.exports=function(t){return function(r){return t.apply(null,r)}}}),L("dhYWP",function(n,e){n.exports=function(t){return typeof t=="object"&&t.isAxiosError===!0}}),L("kfIQl",function(n,e){var t=typeof Symbol<"u"&&Symbol,r=A("lyEFc");n.exports=function(){return typeof t=="function"&&typeof Symbol=="function"&&typeof t("foo")=="symbol"&&typeof Symbol("bar")=="symbol"&&r()}}),L("lyEFc",function(n,e){n.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),a=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(a)!=="[object Symbol]")return!1;var i=42;for(r in t[r]=i,t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var l=Object.getOwnPropertySymbols(t);if(l.length!==1||l[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,r);if(s.value!==i||s.enumerable!==!0)return!1}return!0}}),L("bJ3CN",function(n,e){var t={__proto__:null,foo:{}},r=Object;n.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof r)}}),L("9cNUg",function(n,e){var t=A("hGGZx"),r=function(){return!!t};r.hasArrayLengthDefineBug=function(){if(!t)return null;try{return t([],"length",{value:1}).length!==1}catch{return!0}},n.exports=r}),L("hGGZx",function(n,e){var t=A("hMrGw")("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}n.exports=t}),L("hMrGw",function(n,e){var t=A("dUpie"),r=A("48xLS"),a=A("4Vqmv"),i=A("7x6DQ"),l=A("kPNod"),s=A("b9GfH"),u=A("8DBKi"),o=Function,p=function(H){try{return o('"use strict"; return ('+H+").constructor;")()}catch{}},m=Object.getOwnPropertyDescriptor;if(m)try{m({},"")}catch{m=null}var d=function(){throw new s},y=m?function(){try{return arguments.callee,d}catch{try{return m(arguments,"callee").get}catch{return d}}}():d,f=A("kfIQl")(),S=A("bJ3CN")(),v=Object.getPrototypeOf||(S?function(H){return H.__proto__}:null),w={},g=typeof Uint8Array<"u"&&v?v(Uint8Array):void 0,_={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":f&&v?v([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":w,"%AsyncGenerator%":w,"%AsyncGeneratorFunction%":w,"%AsyncIteratorPrototype%":w,"%Atomics%":typeof Atomics>"u"?void 0:Atomics,"%BigInt%":typeof BigInt>"u"?void 0:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?void 0:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?void 0:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":r,"%Float32Array%":typeof Float32Array>"u"?void 0:Float32Array,"%Float64Array%":typeof Float64Array>"u"?void 0:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?void 0:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":w,"%Int8Array%":typeof Int8Array>"u"?void 0:Int8Array,"%Int16Array%":typeof Int16Array>"u"?void 0:Int16Array,"%Int32Array%":typeof Int32Array>"u"?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f&&v?v(v([][Symbol.iterator]())):void 0,"%JSON%":typeof JSON=="object"?JSON:void 0,"%Map%":typeof Map>"u"?void 0:Map,"%MapIteratorPrototype%":typeof Map<"u"&&f&&v?v(new Map()[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?void 0:Promise,"%Proxy%":typeof Proxy>"u"?void 0:Proxy,"%RangeError%":a,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?void 0:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?void 0:Set,"%SetIteratorPrototype%":typeof Set<"u"&&f&&v?v(new Set()[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f&&v?v(""[Symbol.iterator]()):void 0,"%Symbol%":f?Symbol:void 0,"%SyntaxError%":l,"%ThrowTypeError%":y,"%TypedArray%":g,"%TypeError%":s,"%Uint8Array%":typeof Uint8Array>"u"?void 0:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?void 0:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?void 0:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>"u"?void 0:WeakMap,"%WeakRef%":typeof WeakRef>"u"?void 0:WeakRef,"%WeakSet%":typeof WeakSet>"u"?void 0:WeakSet};if(v)try{null.error}catch(H){var $=v(v(H));_["%Error.prototype%"]=$}var x=function H(ie){var ee;if(ie==="%AsyncFunction%")ee=p("async function () {}");else if(ie==="%GeneratorFunction%")ee=p("function* () {}");else if(ie==="%AsyncGeneratorFunction%")ee=p("async function* () {}");else if(ie==="%AsyncGenerator%"){var k=H("%AsyncGeneratorFunction%");k&&(ee=k.prototype)}else if(ie==="%AsyncIteratorPrototype%"){var O=H("%AsyncGenerator%");O&&v&&(ee=v(O.prototype))}return _[ie]=ee,ee},T={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},P=A("hweMw"),D=A("23C6u"),R=P.call(Function.call,Array.prototype.concat),I=P.call(Function.apply,Array.prototype.splice),F=P.call(Function.call,String.prototype.replace),C=P.call(Function.call,String.prototype.slice),B=P.call(Function.call,RegExp.prototype.exec),V=/[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g,X=/\\\\(\\\\)?/g,le=function(H){var ie=C(H,0,1),ee=C(H,-1);if(ie==="%"&&ee!=="%")throw new l("invalid intrinsic syntax, expected closing \`%\`");if(ee==="%"&&ie!=="%")throw new l("invalid intrinsic syntax, expected opening \`%\`");var k=[];return F(H,V,function(O,N,K,se){k[k.length]=K?F(se,X,"$1"):N||O}),k},ve=function(H,ie){var ee,k=H;if(D(T,k)&&(k="%"+(ee=T[k])[0]+"%"),D(_,k)){var O=_[k];if(O===w&&(O=x(k)),O===void 0&&!ie)throw new s("intrinsic "+H+" exists, but is not available. Please file an issue!");return{alias:ee,name:k,value:O}}throw new l("intrinsic "+H+" does not exist!")};n.exports=function(H,ie){if(typeof H!="string"||H.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ie!="boolean")throw new s('"allowMissing" argument must be a boolean');if(B(/^%?[^%]*%?$/,H)===null)throw new l("\`%\` may not be present anywhere but at the beginning and end of the intrinsic name");var ee=le(H),k=ee.length>0?ee[0]:"",O=ve("%"+k+"%",ie),N=O.name,K=O.value,se=!1,te=O.alias;te&&(k=te[0],I(ee,R([0,1],te)));for(var J=1,ce=!0;J<ee.length;J+=1){var re=ee[J],fe=C(re,0,1),ke=C(re,-1);if((fe==='"'||fe==="'"||fe==="\`"||ke==='"'||ke==="'"||ke==="\`")&&fe!==ke)throw new l("property names with quotes must have matching quotes");if(re!=="constructor"&&ce||(se=!0),k+="."+re,D(_,N="%"+k+"%"))K=_[N];else if(K!=null){if(!(re in K)){if(!ie)throw new s("base intrinsic for "+H+" exists, but the property is not available.");return}if(m&&J+1>=ee.length){var Ae=m(K,re);K=(ce=!!Ae)&&"get"in Ae&&!("originalValue"in Ae.get)?Ae.get:K[re]}else ce=D(K,re),K=K[re];ce&&!se&&(_[N]=K)}}return K}}),L("dUpie",function(n,e){n.exports=Error}),L("48xLS",function(n,e){n.exports=EvalError}),L("4Vqmv",function(n,e){n.exports=RangeError}),L("7x6DQ",function(n,e){n.exports=ReferenceError}),L("kPNod",function(n,e){n.exports=SyntaxError}),L("b9GfH",function(n,e){n.exports=TypeError}),L("8DBKi",function(n,e){n.exports=URIError}),L("hweMw",function(n,e){var t=A("2Eytq");n.exports=Function.prototype.bind||t}),L("2Eytq",function(n,e){var t="Function.prototype.bind called on incompatible ",r=Object.prototype.toString,a=Math.max,i="[object Function]",l=function(o,p){for(var m=[],d=0;d<o.length;d+=1)m[d]=o[d];for(var y=0;y<p.length;y+=1)m[y+o.length]=p[y];return m},s=function(o,p){for(var m=[],d=p,y=0;d<o.length;d+=1,y+=1)m[y]=o[d];return m},u=function(o,p){for(var m="",d=0;d<o.length;d+=1)m+=o[d],d+1<o.length&&(m+=p);return m};n.exports=function(o){var p,m=this;if(typeof m!="function"||r.apply(m)!==i)throw TypeError(t+m);for(var d=s(arguments,1),y=function(){if(this instanceof p){var g=m.apply(this,l(d,arguments));return Object(g)===g?g:this}return m.apply(o,l(d,arguments))},f=a(0,m.length-d.length),S=[],v=0;v<f;v++)S[v]="$"+v;if(p=Function("binder","return function ("+u(S,",")+"){ return binder.apply(this,arguments); }")(y),m.prototype){var w=function(){};w.prototype=m.prototype,p.prototype=new w,w.prototype=null}return p}}),L("23C6u",function(n,e){var t=Function.prototype.call,r=Object.prototype.hasOwnProperty,a=A("hweMw");n.exports=a.call(t,r)}),L("5ZWAZ",function(n,e){function t(r){return n.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},n.exports.__esModule=!0,n.exports.default=n.exports,t(r)}n.exports=t,n.exports.__esModule=!0,n.exports.default=n.exports}),L("fgq5y",function(n,e){var t=A("f3Ywx").default;Object.defineProperty(n.exports,"__esModule",{value:!0}),n.exports.default=l;var r=t(A("a9VQw")),a=t(A("glRwo")),i=t(A("ayR3G"));function l(s,u){(0,i.default)(2,arguments);var o=(0,a.default)(s),p=(0,r.default)(u);return isNaN(p)?new Date(NaN):(p&&o.setDate(o.getDate()+p),o)}n.exports=n.exports.default}),L("f3Ywx",function(n,e){function t(r){return r&&r.__esModule?r:{default:r}}n.exports=t,n.exports.__esModule=!0,n.exports.default=n.exports}),L("a9VQw",function(n,e){function t(r){if(r===null||r===!0||r===!1)return NaN;var a=Number(r);return isNaN(a)?a:a<0?Math.ceil(a):Math.floor(a)}Object.defineProperty(n.exports,"__esModule",{value:!0}),n.exports.default=t,n.exports=n.exports.default}),L("glRwo",function(n,e){var t=A("f3Ywx").default;Object.defineProperty(n.exports,"__esModule",{value:!0}),n.exports.default=i;var r=t(A("5ZWAZ")),a=t(A("ayR3G"));function i(l){(0,a.default)(1,arguments);var s=Object.prototype.toString.call(l);return l instanceof Date||(0,r.default)(l)==="object"&&s==="[object Date]"?new Date(l.getTime()):typeof l=="number"||s==="[object Number]"?new Date(l):((typeof l=="string"||s==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use \`parseISO\` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(Error().stack)),new Date(NaN))}n.exports=n.exports.default}),L("ayR3G",function(n,e){function t(r,a){if(a.length<r)throw TypeError(r+" argument"+(r>1?"s":"")+" required, but only "+a.length+" present")}Object.defineProperty(n.exports,"__esModule",{value:!0}),n.exports.default=t,n.exports=n.exports.default}),L("byyO9",function(n,e){var t=A("f3Ywx").default;Object.defineProperty(n.exports,"__esModule",{value:!0}),n.exports.default=l;var r=t(A("a9VQw")),a=t(A("glRwo")),i=t(A("ayR3G"));function l(s,u){(0,i.default)(2,arguments);var o=(0,a.default)(s),p=(0,r.default)(u);if(isNaN(p))return new Date(NaN);if(!p)return o;var m=o.getDate(),d=new Date(o.getTime());return d.setMonth(o.getMonth()+p+1,0),m>=d.getDate()?d:(o.setFullYear(d.getFullYear(),d.getMonth(),m),o)}n.exports=n.exports.default}),L("hLz6R",function(n,e){var t=A("f3Ywx").default;Object.defineProperty(n.exports,"__esModule",{value:!0}),n.exports.default=s;var r=t(A("glRwo")),a=t(A("a9VQw")),i=t(A("ayR3G")),l=A("lmyOi");function s(u,o){(0,i.default)(1,arguments);var p,m,d,y,f,S,v,w,g=(0,l.getDefaultOptions)(),_=(0,a.default)((p=(m=(d=(y=o==null?void 0:o.weekStartsOn)!==null&&y!==void 0?y:o==null||(f=o.locale)===null||f===void 0||(S=f.options)===null||S===void 0?void 0:S.weekStartsOn)!==null&&d!==void 0?d:g.weekStartsOn)!==null&&m!==void 0?m:(v=g.locale)===null||v===void 0||(w=v.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&p!==void 0?p:0);if(!(_>=0&&_<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");var $=(0,r.default)(u),x=$.getDay(),T=(x<_?7:0)+x-_;return $.setDate($.getDate()-T),$.setHours(0,0,0,0),$}n.exports=n.exports.default}),L("lmyOi",function(n,e){Object.defineProperty(n.exports,"__esModule",{value:!0}),n.exports.getDefaultOptions=r,n.exports.setDefaultOptions=a;var t={};function r(){return t}function a(i){t=i}}),L("kmcAT",function(n,e){A("akXK4"),A("5xozB")}),L("akXK4",function(n,e){n.exports=A("1ufAB")}),L("5xozB",function(n,e){Tr(n.exports,"IS_BROWSER_MAIN_THREAD",()=>r),Tr(n.exports,"IS_BROWSER",()=>i);var t=A("2dKjk");let r=![typeof window,typeof document].includes("undefined"),a=typeof self=="object"&&typeof WorkerGlobalScope<"u",i=r||a;t!==void 0&&t.versions!=null&&t.versions.node});let ia="https://gudhub.com/GudHub_Test",sa="wss://gudhub.com/GudHub/ws/app/",oa="https://gudhub.com/api/services/prod",la="build/latest/async_modules_node/",ca="build/latest/automation_modules/",ua="https://gudhub.com",pa=!0,da=!0;var Ee=A("5xozB");class Pr{}class Ut extends Pr{constructor(e,t,r){super(),this.chunkDataService=new qt(e,jr,r),this.gudhub=r}isWithCache(){return!1}async processRequestedApp(e,t){if(!this.isWithCache()){let r=await this.chunkDataService.getMergedChunkForIDList(e,t.chunks);return r&&(t.items_list=await this.gudhub.util.mergeChunks([r,t])),t}throw Error()}}class Cr extends Pr{getMergedChunkForIDList(e){}isWithCache(){return!1}}class fa{constructor(e){this.req=e}async getApp(e){return this.req.get({url:"/api/app/get",params:{app_id:e}})}}let Nr=(n,...e)=>{for(let t of e)if(t)for(let r of Object.keys(t)){let a=Object.getOwnPropertyDescriptor(t,r);a.enumerable&&Object.defineProperty(n,r,a)}};class bt{}class Qe extends Ut{constructor(e,t,r){super(e,t,r),this.appApi=new fa(e),Nr(this,new bt(t))}async getApp(e){let t=await this.appApi.getApp(e);return this.processRequestedApp(e,t)}async getAppWithoutProcessing(e){return this.appApi.getApp(e)}async putApp(e,t){}static[Symbol.hasInstance](e){try{return e instanceof Qe||e instanceof bt}catch{return!1}}}let vt={store:"apps"},Mr={store:"chunks"},ha="gudhub",wt={store:"chunksMergeCache"};class Gt{constructor(e){this.store=e.store,this.dbName=e.dbName,this.dbVersion=e.dbVersion,this.requestCache=new Map}}class We{constructor(e,t){if(We.dbNameToInstanceMap||(We.dbNameToInstanceMap=new Map),We.dbNameToInstanceMap.has(e))return We.dbNameToInstanceMap.get(e);this.db=null,this.dbName=e,this.storeNameList=t,We.dbNameToInstanceMap.set(e,this),this.db=null}async checkAndCreateStore(e){let t=(await indexedDB.databases()).find(i=>i.name===this.dbName),r=!1,a=this;return t&&(r=await new Promise((i,l)=>{let s=indexedDB.open(a.dbName);s.onsuccess=function(u){let o=u.target.result,p=o.objectStoreNames.contains(e);o.close(),i(p)},s.onerror=function(u){l(u.target.error)}})),!!r||new Promise((i,l)=>{let s=indexedDB.open(a.dbName,t?t.version+1:1);s.onupgradeneeded=function(u){let o=u.target.result;o.objectStoreNames.contains(e)||o.createObjectStore(e)},s.onsuccess=function(u){u.target.result.close(),i()},s.onerror=l})}async openDB(){let e,t;if(this.db)return this.db;let r=new Promise((l,s)=>{e=l,t=s});for(let l of this.storeNameList)await this.checkAndCreateStore(l);let a=this,i=indexedDB.open(this.dbName);return i.onsuccess=l=>{a.db=l.target.result,e(this.db)},i.onerror=t,r}async executeOperation(e,t){let r=await this.openDB();return new Promise((a,i)=>{let l=r.transaction(e,"readwrite"),s=l.objectStore(e);l.oncomplete=()=>a(),l.onerror=u=>i(\`Transaction failed: \${u.target.error}\`);try{t(s)}catch(u){i(\`Operation failed: \${u.message}\`)}})}async enqueueOperation(e,t){if(this.queue.push({storeName:e,operation:t}),!this.isProcessing){for(this.isProcessing=!0;this.queue.length>0;){let{storeName:r,operation:a}=this.queue.shift();try{await this.executeOperation(r,a)}catch(i){console.error("Operation failed:",i)}}this.isProcessing=!1}}async ensureStoreExists(e){}async createObjectStore(e){}}let Rr=new We(ha,[vt.store,Mr.store,wt.store]);class ma{constructor(e){this.req=e}async getChunk(e,t){return this.req.get({url:\`\${this.req.root}/api/get-items-chunk/\${e}/\${t}\`,method:"GET"})}async getLastChunk(e){return this.req.axiosRequest({url:\`\${this.req.root}/api/get-last-items-chunk/\${e}\`,method:"GET"})}}class $t extends Cr{constructor(e,t){super(),this.chunkApi=new ma(e),Nr(this,new bt(t))}async getChunk(e,t){return this.chunkApi.getChunk(e,t)}async getChunksForId(e){return[]}getCachedMergedChunk(e,t){}getMergedChunkForIDList(e,t){}putChunk(){}static[Symbol.hasInstance](e){try{return e instanceof $t||e instanceof bt}catch{return!1}}}class Fr{constructor(e,t){this.dbManager=e,this.storeName=t}async addItem(e,t){return new Promise(async(r,a)=>{this.dbManager.executeOperation(this.storeName,i=>{let l=i.add(t,e);l.onsuccess=r,l.onerror=a})})}async putItem(e,t){return new Promise(async(r,a)=>{this.dbManager.executeOperation(this.storeName,i=>{let l=i.put(t,e);l.onsuccess=r,l.onerror=a})})}async hasItem(e){try{return!!await this.getItem(e)}catch{return!1}return new Promise(async(t,r)=>{this.dbManager.executeOperation(this.storeName,a=>{let i=a.get(e);i.onsuccess=()=>{t(i.result)},i.onerror=r})})}async getItem(e){return new Promise(async(t,r)=>{this.dbManager.executeOperation(this.storeName,a=>{let i=a.get(e);i.onsuccess=()=>{t(i.result)},i.onerror=r})})}async updateItem(e,t){return new Promise(async(r,a)=>{this.dbManager.executeOperation(this.storeName,i=>{let l=i.get(e);l.onsuccess=()=>{let s=l.result;Object.assign(s,t),i.put(s,e),r()},l.onerror=a})})}async deleteItem(e){return new Promise(async(t,r)=>{this.dbManager.executeOperation(this.storeName,a=>{let i=a.delete(e);i.onsuccess=t,i.onerror=r})})}}class Lr extends Fr{constructor(){super(Rr,vt.store)}async getApp(e){return this.getItem(e)}async addApp(e,t){return this.addItem(e,t)}async putApp(e,t){return this.putItem(e,t)}async hasApp(e){return this.hasItem(e)}async deleteApp(e){return this.deleteItem(e)}}class ga extends Fr{constructor(){super(Rr,wt.store)}async get(e){return this.getItem(e)}async add(e,t){return this.addItem(e,t)}async put(e,t){return this.putItem(e,t)}async delete(e){return this.deleteItem(e)}}class at extends Cr{constructor(e,t,r){super(e,t),this.dataService=new $t(e),this.requestCache=new Map,this.gudhub=r,this.storeManager=new ga}static[Symbol.hasInstance](e){try{return e instanceof at||e instanceof Gt}catch{return!1}}async getCachedMergedChunk(e,t){try{return(await this.storeManager.get(e)).mergedData}catch{let a=t.map(s=>this.dataService.getChunk(e,s)),i=await Promise.all(a),l=await this.gudhub.util.mergeChunks(i);return this.putMergedChunks(e,{hashes:t,mergedData:{items_list:l}}),{items_list:l}}}isWithCache(){return!0}async getMergedChunkForApp(e){}async getMergedChunkForIDList(e,t){try{let r,a=!0,i=await this.storeManager.get(e);try{if(t.length<i.hashes.length)throw Error();for(let u of i.hashes)t.indexOf(u)!=i.hashes.indexOf(u)&&(a=!1)}catch{a=!1}let l=[],s=[];if(t.length>i.hashes.length&&(l=t.slice(i.hashes.length)),a||(l=t),l.length>0){let u=l.map(o=>this.dataService.getChunk(e,o));s=await Promise.all(u)}return a||(r=await this.gudhub.util.mergeChunks([...s])),a&&(r=await this.gudhub.util.mergeChunks([i.mergedData,...s])),l.length>0&&this.putMergedChunks(e,{hashes:t,mergedData:{items_list:r}}),{items_list:r}}catch{let a=t.map(s=>this.dataService.getChunk(e,s)),i=await Promise.all(a),l=await this.gudhub.util.mergeChunks(i);return this.putMergedChunks(e,{hashes:t,mergedData:{items_list:l}}),{items_list:l}}}async putMergedChunks(e,t){return this.storeManager.put(e,t)}async putChunk(e,t){return this.storeManager.putChunk(e,t)}async getChunk(e,t){if(this.requestCache.has(t))return this.requestCache.get(t);try{let r=this.storeManager.getChunk(t);return self.requestCache.set(t,r),await r,r}catch{let a=this.dataService.getChunk(e,t);this.requestCache.set(t,a);let i=await a;return this.putChunk(t,i),a}}}class Wt extends Ut{constructor(e,t,r){super(e,t,r),this.dataService=new Qe(e,t,r),this.requestCache=new Map,this.gudhub=r,this.chunkDataService=new at(e,wt,r),this.storeManager=new Lr}static[Symbol.hasInstance](e){try{return e instanceof Wt||e instanceof Gt}catch{return!1}}isWithCache(){return!1}async getAppWithoutProcessing(e){let t=await this.dataService.getAppWithoutProcessing(e);return await this.putApp(e,t),t}async getApp(e){let t=this,r=await this.dataService.getAppWithoutProcessing(e);return await t.processRequestedApp(e,r)}async getCached(e){return this.storeManager.getApp(e)}async putApp(e,t){return this.storeManager.putApp(e,t)}}class Ht extends Ut{constructor(e,t,r){super(e,t,r),this.dataService=new Qe(e,t,r),this.requestCache=new Map,this.gudhub=r,this.resolveFnMap=new Map,this.appRequestAndProcessWorker=new AppRequestWorkerScript,this.appRequestAndProcessWorker.postMessage({type:"init",gudhubSerialized:this.gudhub.serialized});let a=this;this.appRequestAndProcessWorker.onerror=function(i){},this.appRequestAndProcessWorker.onmessage=function(i){i.data.type=="requestApp"&&a.resolveFnMap.has(i.data.id)&&a.resolveFnMap.get(i.data.id)(i.data.data),i.data.type=="processData"&&(a.gudhub.itemProcessor.handleDiff(i.data.id,i.data.compareRes),(i.data.viewListChanged||i.data.fieldListChanged)&&a.gudhub.appProcessor.updateAppFieldsAndViews(i.data.newVersion))},this.storeManager=new Lr}static[Symbol.hasInstance](e){try{return e instanceof Ht||e instanceof Gt}catch{return!1}}isWithCache(){return!1}async getApp(e){if(this.requestCache.has(e))return this.requestCache.get(e);let t=this;await this.has(e);{let r=new Promise((a,i)=>{t.resolveFnMap.set(e,a)});return this.requestCache.set(e,r),this.appRequestAndProcessWorker.postMessage({type:"requestApp",id:e}),r}}async getCached(e){return this.storeManager.getApp(e)}async has(e){try{return this.storeManager.hasApp(e)}catch{}}async putApp(e,t){return this.storeManager.putApp(e,t)}}A("5xozB"),Ee.IS_BROWSER&&pa?(qt=at,jr=Mr):qt=$t,Ee.IS_BROWSER&&da?(Dt=Ht,Or=vt):Dt=Qe;var Ee=A("5xozB");class Dr{constructor(e,t,r,a,i,l,s){this.storage=e,this.pipeService=t,this.req=r,this.ws=a,this.applistReceived=!1,this.activateSW=l,this.util=i,this.appListeners(),this.dataService=s,this.appRequestCache=new Map}async createNewAppApi(e){try{let t=await this.req.post({url:"/api/app/create",form:{app:JSON.stringify(e)}});return t.from_apps_list=!0,t}catch(t){return console.log(t),null}}async updateAppApi(e){try{return await this.req.post({url:"/api/app/update",form:{app:JSON.stringify(e)}})}catch(t){return console.log(t),null}}async deleteAppApi(e){try{return await this.req.post({url:"/api/app/delete",form:{app_id:e}})}catch(t){return console.log(t),null}}async getAppListApi(){try{return(await this.req.get({url:"/api/applist/get"})).apps_list.map(e=>(e.from_apps_list=!0,e))}catch(e){return console.log(e),null}}getAppListFromStorage(){return this.storage.getAppsList()}getAppFromStorage(e){let t=this.storage.getApp(e);return t&&t.field_list.length?t:null}addNewAppToStorage(e){return this.storage.getAppsList().push(e)}saveAppInStorage(e){e.items_object={};for(let r=0;r<e.items_list.length;r++){e.items_object[e.items_list[r].item_id]={};for(let a=0;a<e.items_list[r].fields.length;a++)e.items_object[e.items_list[r].item_id][e.items_list[r].fields[a].field_id]=e.items_list[r].fields[a]}let t=this.storage.getApp(e.app_id);return t?(e.from_apps_list=t.from_apps_list,e.permission=t.permission,this.storage.updateApp(e)):(e.from_apps_list=!1,this.addNewAppToStorage(e)),this.getAppFromStorage(e.app_id)}updateAppFieldsAndViews(e){let t=this.getAppFromStorage(e.app_id);e.items_list=t.items_list,e.file_list=t.file_list,e.from_apps_list=t.from_apps_list,e.items_object=t.items_object,this.storage.updateApp(e),this.pipeService.emit("gh_app_views_update",{app_id:e.app_id},e.views_list),e.field_list.forEach(r=>{this.pipeService.emit("gh_model_update",{app_id:e.app_id,field_id:r.field_id},r)})}updateAppInStorage(e){this.storage.getApp(e.app_id)?(this.storage.updateApp(e),this.pipeService.emit("gh_app_update",{app_id:e.app_id},e),this.pipeService.emit("gh_items_update",{app_id:e.app_id},e.items_list)):this.addNewAppToStorage(e)}deletingAppFromStorage(e){let t=this.storage.getAppsList();return t.forEach((r,a)=>{r.app_id==e&&t.splice(a)}),t}updateAppsListInStorage(e=[]){for(let t of e){let r=this.storage.getApp(t.app_id);r?(r.from_apps_list=t.from_apps_list,r.permission=t.permission):this.addNewAppToStorage(t)}}async refreshApps(e=[]){for(let t of e)if(t!=null)try{let r=await this.dataService.getApp(t);if(r){r.items_object={};for(let a=0;a<r.items_list.length;a++){r.items_object[r.items_list[a].item_id]={};for(let i=0;i<r.items_list[a].fields.length;i++)r.items_object[r.items_list[a].item_id][r.items_list[a].fields[i].field_id]=r.items_list[a].fields[i]}this.updateAppInStorage(r),this.pipeService.emit("gh_app_views_update",{app_id:r.app_id},r.views_list)}}catch(r){console.log(r)}console.log("Apps refreshed: ",JSON.stringify(e))}async refreshAppsList(){let e=this.getAppListFromStorage(),t=(await this.getAppListApi()).map(r=>({...r,...e.find(a=>a.app_id===r.app_id)}));this.updateAppsListInStorage(t),this.pipeService.emit("gh_apps_list_refreshed",{})}async getAppsList(){let e=this.getAppListFromStorage();if(!this.applistReceived){let t=await this.getAppListApi();if(!t)return null;this.updateAppsListInStorage(t),this.applistReceived=!0,e=t}return e}async getAppInfo(e){let t=await this.getAppsList();return t?t.find(r=>r.app_id==e):null}async deleteApp(e){return await this.deleteAppApi(e),this.deletingAppFromStorage(e)}async getApp(e,t=!1){if(!e)return null;let r=this.getAppFromStorage(e);if(r)return r;if(this.appRequestCache.has(e))return this.appRequestCache.get(e);let a=this,i=new Promise(async(l,s)=>{try{let u=await a.dataService.getApp(e);u||s();let o=t?u:{...u,items_list:u.items_list.filter(p=>!p.trash)};o=t?o:{...o,field_list:o.field_list.filter(p=>!p.trash)},l(o),a.saveAppInStorage(o),a.ws.addSubscription(e)}catch{s()}});return a.appRequestCache.set(e,i),i}async updateApp(e){if(!e.views_list||!e.views_list.length||!e.show){let r=await this.getApp(e.app_id);e.views_list&&e.views_list.length||(e.views_list=r.views_list),e.show===void 0&&(e.show=r.show)}let t=await this.updateAppApi(e);return this.updateAppFieldsAndViews(t),t}async updateAppInfo(e={}){return this.pipeService.emit("gh_app_info_update",{app_id:e.app_id},e),this.updateApp(e)}async createNewApp(e){let t=await this.createNewAppApi(e);return t.items_object={},this.addNewAppToStorage(t),t}async getAppViews(e){if(e)return(await this.getApp(e)).views_list}async handleAppChange(e,t,r){let a=this.util.areViewListsEqual(t.views_list,r.views_list),i=this.util.areFieldListsEqual(t.field_list,r.field_list);(a||i)&&this.updateAppFieldsAndViews({id:e,views_list:r.views_list,field_list:r.field_list})}clearAppProcessor(){this.getAppListPromises=null,this.getAppPromises={},this.applistReceived=!1}appListeners(){this.pipeService.onRoot("gh_app_get",{},async(e,t)=>{if(t&&t.app_id){let r=await this.getApp(t.app_id);this.pipeService.emit("gh_app_get",t,r)}}),this.pipeService.onRoot("gh_apps_list_get",{},async(e,t)=>{let r=await this.getAppsList();this.pipeService.emit("gh_apps_list_get",t,r)}),this.pipeService.onRoot("gh_delete_app",{},async(e,t)=>{let r=await this.deleteApp(t.app_id);this.pipeService.emit("gh_apps_list_update",{recipient:"all"},r)}),this.pipeService.onRoot("gh_app_update",{},async(e,t)=>{t.app.items_list=[],t.app.file_list=[];let r=await this.updateApp(t.app);this.pipeService.emit("gh_app_views_update",{app_id:r.app_id},r.views_list);let a=await this.getAppsList();this.pipeService.emit("gh_apps_list_update",{recipient:"all"},a),r.field_list.forEach(i=>{this.pipeService.emit("gh_model_update",{app_id:r.app_id,field_id:i.field_id},i)})}),this.pipeService.onRoot("gh_app_view_get",{},async(e,t)=>{if(t&&t.app_id){let r=await this.getApp(t.app_id);r.views_list.forEach((a,i)=>{a.view_id==t.view_id&&this.pipeService.emit("gh_app_view_get",t,r.views_list[i])})}}),this.pipeService.onRoot("gh_app_info_get",{},async(e,t)=>{let r=await this.getAppInfo(t.app_id);r&&this.pipeService.emit("gh_app_info_get",t,r)}),this.pipeService.onRoot("gh_app_info_update",{},async(e,t)=>{if(t&&t.app){let r=await this.updateAppInfo(t.app);this.pipeService.emit("gh_app_info_update",{app_id:t.app.app_id},r)}}),this.pipeService.onRoot("gh_app_create",{},async(e,t)=>{await this.createNewApp(t.app);let r=await this.getAppsList();this.pipeService.emit("gh_apps_list_update",{recipient:"all"},r)}),Ee.IS_BROWSER_MAIN_THREAD&&this.activateSW&&navigator.serviceWorker.addEventListener("message",async e=>{if(e.data.type==="refresh app"){let t=await this.getApp(e.data.payload.app_id);t&&this.util.compareAppsItemsLists(t.items_list,e.data.payload.items_list.filter(r=>!r.trash),({diff_fields_items:r,diff_fields_items_Ids:a,diff_items:i,newItems:l,deletedItems:s})=>{(i.length||l.length||s.length)&&(this.pipeService.emit("gh_items_update",{app_id:e.data.payload.app_id},e.data.payload.items_list.filter(u=>!u.trash)),i.forEach(u=>this.pipeService.emit("gh_item_update",{app_id:e.data.payload.app_id,item_id:u.item_id},u))),a.forEach(u=>{let o=r[u];o&&o.forEach(p=>{this.pipeService.emit("gh_value_update",{app_id:e.data.payload.app_id,item_id:u,field_id:p.field_id},p.field_value)})})}),e.data.payload.items_list=await this.util.mergeChunks([t,e.data.payload]),this.saveAppInStorage(e.data.payload)}})}}var ht=A("akXK4");function qr(n=[]){return n.filter(e=>e.field_value!=null)}function ya(n={}){let e=Object.entries(n);return e.length?\`&\${e.map(([t,r])=>\`\${t}=\${r}\`).join("&")}\`:""}var St={},Br={},zt={},be=A("hMrGw"),He={},be=A("hMrGw"),it={},Vt=A("hweMw"),be=A("hMrGw"),Ur={},be=A("hMrGw"),Jt={},ot=A("hGGZx"),_a=A("kPNod"),we=A("b9GfH"),st={},be=A("hMrGw"),xt=be("%Object.getOwnPropertyDescriptor%",!0);if(xt)try{xt([],"length")}catch{xt=null}st=xt,Jt=function(n,e,t){if(!n||typeof n!="object"&&typeof n!="function")throw new we("\`obj\` must be an object or a function\`");if(typeof e!="string"&&typeof e!="symbol")throw new we("\`property\` must be a string or a symbol\`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new we("\`nonEnumerable\`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new we("\`nonWritable\`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new we("\`nonConfigurable\`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new we("\`loose\`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],s=!!st&&st(n,e);if(ot)ot(n,e,{configurable:i===null&&s?s.configurable:!i,enumerable:r===null&&s?s.enumerable:!r,value:t,writable:a===null&&s?s.writable:!a});else{if(!l&&(r||a||i))throw new _a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");n[e]=t}};var ba=A("9cNUg")(),we=A("b9GfH"),va=be("%Math.floor%");Ur=function(n,e){if(typeof n!="function")throw new we("\`fn\` is not a function");if(typeof e!="number"||e<0||e>4294967295||va(e)!==e)throw new we("\`length\` must be a positive 32-bit integer");var t=arguments.length>2&&!!arguments[2],r=!0,a=!0;if("length"in n&&st){var i=st(n,"length");i&&!i.configurable&&(r=!1),i&&!i.writable&&(a=!1)}return(r||a||!t)&&(ba?Jt(n,"length",e,!0,!0):Jt(n,"length",e)),n};var we=A("b9GfH"),Gr=be("%Function.prototype.apply%"),Wr=be("%Function.prototype.call%"),Hr=be("%Reflect.apply%",!0)||Vt.call(Wr,Gr),ot=A("hGGZx"),wa=be("%Math.max%");it=function(n){if(typeof n!="function")throw new we("a function is required");var e=Hr(Vt,Wr,arguments);return Ur(e,1+wa(0,n.length-(arguments.length-1)),!0)};var zr=function(){return Hr(Vt,Gr,arguments)};ot?ot(it,"apply",{value:zr}):it.apply=zr;var $a=it(be("String.prototype.indexOf"));He=function(n,e){var t=be(n,!!e);return typeof t=="function"&&$a(n,".prototype.")>-1?it(t):t};var Vr={},Yt=typeof Map=="function"&&Map.prototype,Qt=Object.getOwnPropertyDescriptor&&Yt?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Et=Yt&&Qt&&typeof Qt.get=="function"?Qt.get:null,Jr=Yt&&Map.prototype.forEach,Xt=typeof Set=="function"&&Set.prototype,Kt=Object.getOwnPropertyDescriptor&&Xt?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,kt=Xt&&Kt&&typeof Kt.get=="function"?Kt.get:null,Yr=Xt&&Set.prototype.forEach,Sa=typeof WeakMap=="function"&&WeakMap.prototype,lt=Sa?WeakMap.prototype.has:null,xa=typeof WeakSet=="function"&&WeakSet.prototype,ct=xa?WeakSet.prototype.has:null,Ea=typeof WeakRef=="function"&&WeakRef.prototype,Qr=Ea?WeakRef.prototype.deref:null,ka=Boolean.prototype.valueOf,Aa=Object.prototype.toString,Ia=Function.prototype.toString,Oa=String.prototype.match,Zt=String.prototype.slice,Fe=String.prototype.replace,ja=String.prototype.toUpperCase,Xr=String.prototype.toLowerCase,Kr=RegExp.prototype.test,Zr=Array.prototype.concat,Oe=Array.prototype.join,Ta=Array.prototype.slice,en=Math.floor,er=typeof BigInt=="function"?BigInt.prototype.valueOf:null,tr=Object.getOwnPropertySymbols,rr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Xe=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ge=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Xe||!0)?Symbol.toStringTag:null,tn=Object.prototype.propertyIsEnumerable,rn=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(n){return n.__proto__}:null);function nn(n,e){if(n===1/0||n===-1/0||n!=n||n&&n>-1e3&&n<1e3||Kr.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof n=="number"){var r=n<0?-en(-n):en(n);if(r!==n){var a=String(r),i=Zt.call(e,a.length+1);return Fe.call(a,t,"$&_")+"."+Fe.call(Fe.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Fe.call(e,t,"$&_")}var nr={},an=nr.custom,sn=cn(an)?an:null;function on(n,e,t){var r=(t.quoteStyle||e)==="double"?'"':"'";return r+n+r}function Pa(n){return Fe.call(String(n),/"/g,""")}function ar(n){return De(n)==="[object Array]"&&(!ge||!(typeof n=="object"&&ge in n))}function Ca(n){return De(n)==="[object Date]"&&(!ge||!(typeof n=="object"&&ge in n))}function ln(n){return De(n)==="[object RegExp]"&&(!ge||!(typeof n=="object"&&ge in n))}function Na(n){return De(n)==="[object Error]"&&(!ge||!(typeof n=="object"&&ge in n))}function Ma(n){return De(n)==="[object String]"&&(!ge||!(typeof n=="object"&&ge in n))}function Ra(n){return De(n)==="[object Number]"&&(!ge||!(typeof n=="object"&&ge in n))}function Fa(n){return De(n)==="[object Boolean]"&&(!ge||!(typeof n=="object"&&ge in n))}function cn(n){if(Xe)return n&&typeof n=="object"&&n instanceof Symbol;if(typeof n=="symbol")return!0;if(!n||typeof n!="object"||!rr)return!1;try{return rr.call(n),!0}catch{}return!1}function La(n){if(!n||typeof n!="object"||!er)return!1;try{return er.call(n),!0}catch{}return!1}Vr=function n(e,t,r,a){var i=t||{};if(Le(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw TypeError('option "quoteStyle" must be "single" or "double"');if(Le(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or \`null\`');var l=!Le(i,"customInspect")||i.customInspect;if(typeof l!="boolean"&&l!=="symbol")throw TypeError("option \\"customInspect\\", if provided, must be \`true\`, \`false\`, or \`'symbol'\`");if(Le(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw TypeError('option "indent" must be "\\\\t", an integer > 0, or \`null\`');if(Le(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw TypeError('option "numericSeparator", if provided, must be \`true\` or \`false\`');var s=i.numericSeparator;if(e===void 0)return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return pn(e,i);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var u=String(e);return s?nn(e,u):u}if(typeof e=="bigint"){var o=String(e)+"n";return s?nn(e,o):o}var p=i.depth===void 0?5:i.depth;if(r===void 0&&(r=0),r>=p&&p>0&&typeof e=="object")return ar(e)?"[Array]":"[Object]";var m=Ya(i,r);if(a===void 0)a=[];else if(un(a,e)>=0)return"[Circular]";function d(C,B,V){if(B&&(a=Ta.call(a)).push(B),V){var X={depth:i.depth};return Le(i,"quoteStyle")&&(X.quoteStyle=i.quoteStyle),n(C,X,r+1,a)}return n(C,i,r+1,a)}if(typeof e=="function"&&!ln(e)){var y=qa(e),f=At(e,d);return"[Function"+(y?": "+y:" (anonymous)")+"]"+(f.length>0?" { "+Oe.call(f,", ")+" }":"")}if(cn(e)){var S=Xe?Fe.call(String(e),/^(Symbol\\(.*\\))_[^)]*$/,"$1"):rr.call(e);return typeof e!="object"||Xe?S:ut(S)}if(za(e)){for(var v="<"+Xr.call(String(e.nodeName)),w=e.attributes||[],g=0;g<w.length;g++)v+=" "+w[g].name+"="+on(Pa(w[g].value),"double",i);return v+=">",e.childNodes&&e.childNodes.length&&(v+="..."),v+="</"+Xr.call(String(e.nodeName))+">"}if(ar(e)){if(e.length===0)return"[]";var _=At(e,d);return m&&!Ja(_)?"["+sr(_,m)+"]":"[ "+Oe.call(_,", ")+" ]"}if(Na(e)){var $=At(e,d);return"cause"in Error.prototype||!("cause"in e)||tn.call(e,"cause")?$.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Oe.call($,", ")+" }":"{ ["+String(e)+"] "+Oe.call(Zr.call("[cause]: "+d(e.cause),$),", ")+" }"}if(typeof e=="object"&&l){if(sn&&typeof e[sn]=="function"&&nr)return nr(e,{depth:p-r});if(l!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(Ba(e)){var x=[];return Jr&&Jr.call(e,function(C,B){x.push(d(B,e,!0)+" => "+d(C,e))}),dn("Map",Et.call(e),x,m)}if(Wa(e)){var T=[];return Yr&&Yr.call(e,function(C){T.push(d(C,e))}),dn("Set",kt.call(e),T,m)}if(Ua(e))return ir("WeakMap");if(Ha(e))return ir("WeakSet");if(Ga(e))return ir("WeakRef");if(Ra(e))return ut(d(Number(e)));if(La(e))return ut(d(er.call(e)));if(Fa(e))return ut(ka.call(e));if(Ma(e))return ut(d(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(e===oe)return"{ [object globalThis] }";if(!Ca(e)&&!ln(e)){var P=At(e,d),D=rn?rn(e)===Object.prototype:e instanceof Object||e.constructor===Object,R=e instanceof Object?"":"null prototype",I=!D&&ge&&Object(e)===e&&ge in e?Zt.call(De(e),8,-1):R?"Object":"",F=(D||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"")+(I||R?"["+Oe.call(Zr.call([],I||[],R||[]),": ")+"] ":"");return P.length===0?F+"{}":m?F+"{"+sr(P,m)+"}":F+"{ "+Oe.call(P,", ")+" }"}return String(e)};var Da=Object.prototype.hasOwnProperty||function(n){return n in this};function Le(n,e){return Da.call(n,e)}function De(n){return Aa.call(n)}function qa(n){if(n.name)return n.name;var e=Oa.call(Ia.call(n),/^function\\s*([\\w$]+)/);return e?e[1]:null}function un(n,e){if(n.indexOf)return n.indexOf(e);for(var t=0,r=n.length;t<r;t++)if(n[t]===e)return t;return-1}function Ba(n){if(!Et||!n||typeof n!="object")return!1;try{Et.call(n);try{kt.call(n)}catch{return!0}return n instanceof Map}catch{}return!1}function Ua(n){if(!lt||!n||typeof n!="object")return!1;try{lt.call(n,lt);try{ct.call(n,ct)}catch{return!0}return n instanceof WeakMap}catch{}return!1}function Ga(n){if(!Qr||!n||typeof n!="object")return!1;try{return Qr.call(n),!0}catch{}return!1}function Wa(n){if(!kt||!n||typeof n!="object")return!1;try{kt.call(n);try{Et.call(n)}catch{return!0}return n instanceof Set}catch{}return!1}function Ha(n){if(!ct||!n||typeof n!="object")return!1;try{ct.call(n,ct);try{lt.call(n,lt)}catch{return!0}return n instanceof WeakSet}catch{}return!1}function za(n){return!!n&&typeof n=="object"&&(typeof HTMLElement<"u"&&n instanceof HTMLElement||typeof n.nodeName=="string"&&typeof n.getAttribute=="function")}function pn(n,e){if(n.length>e.maxStringLength){var t=n.length-e.maxStringLength,r="... "+t+" more character"+(t>1?"s":"");return pn(Zt.call(n,0,e.maxStringLength),e)+r}return on(Fe.call(Fe.call(n,/(['\\\\])/g,"\\\\$1"),/[\\x00-\\x1f]/g,Va),"single",e)}function Va(n){var e=n.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\\\"+t:"\\\\x"+(e<16?"0":"")+ja.call(e.toString(16))}function ut(n){return"Object("+n+")"}function ir(n){return n+" { ? }"}function dn(n,e,t,r){return n+" ("+e+") {"+(r?sr(t,r):Oe.call(t,", "))+"}"}function Ja(n){for(var e=0;e<n.length;e++)if(un(n[e],\`
|
|
100
|
-
\`)>=0)return!1;return!0}function
|
|
101
|
-
\`+e.prev+e.base;return t+
|
|
102
|
-
\`+e.prev}function At(n,e){var t,r=ar(n),a=[];if(r){a.length=n.length;for(var i=0;i<n.length;i++)a[i]=Le(n,i)?e(n[i],n):""}var l=typeof tr=="function"?tr(n):[];if(Xe){t={};for(var s=0;s<l.length;s++)t["$"+l[s]]=l[s]}for(var u in n)if(Le(n,u)&&(!r||String(Number(u))!==u||!(u<n.length))){if(Xe&&t["$"+u]instanceof Symbol)continue;Kr.call(/[^\\w$]/,u)?a.push(e(u,n)+": "+e(n[u],n)):a.push(u+": "+e(n[u],n))}if(typeof tr=="function")for(var o=0;o<l.length;o++)tn.call(n,l[o])&&a.push("["+e(l[o])+"]: "+e(n[l[o]],n));return a}var we=A("b9GfH"),It=be("%WeakMap%",!0),Ot=be("%Map%",!0),Qa=He("WeakMap.prototype.get",!0),Xa=He("WeakMap.prototype.set",!0),Ka=He("WeakMap.prototype.has",!0),Za=He("Map.prototype.get",!0),ei=He("Map.prototype.set",!0),ti=He("Map.prototype.has",!0),or=function(n,e){for(var t,r=n;(t=r.next)!==null;r=t)if(t.key===e)return r.next=t.next,t.next=n.next,n.next=t,t},ri=function(n,e){var t=or(n,e);return t&&t.value},ni=function(n,e,t){var r=or(n,e);r?r.value=t:n.next={key:e,next:n.next,value:t}},ai=function(n,e){return!!or(n,e)};zt=function(){var n,e,t,r={assert:function(a){if(!r.has(a))throw new we("Side channel does not contain "+Vr(a))},get:function(a){if(It&&a&&(typeof a=="object"||typeof a=="function")){if(n)return Qa(n,a)}else if(Ot){if(e)return Za(e,a)}else if(t)return ri(t,a)},has:function(a){if(It&&a&&(typeof a=="object"||typeof a=="function")){if(n)return Ka(n,a)}else if(Ot){if(e)return ti(e,a)}else if(t)return ai(t,a);return!1},set:function(a,i){It&&a&&(typeof a=="object"||typeof a=="function")?(n||(n=new It),Xa(n,a,i)):Ot?(e||(e=new Ot),ei(e,a,i)):(t||(t={key:{},next:null}),ni(t,a,i))}};return r};var Se={},qe={},ii=String.prototype.replace,si=/%20/g,lr={RFC1738:"RFC1738",RFC3986:"RFC3986"};qe={default:lr.RFC3986,formatters:{RFC1738:function(n){return ii.call(n,si,"+")},RFC3986:function(n){return String(n)}},RFC1738:lr.RFC1738,RFC3986:lr.RFC3986};var cr=Object.prototype.hasOwnProperty,ze=Array.isArray,je=function(){for(var n=[],e=0;e<256;++e)n.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return n}(),oi=function(n){for(;n.length>1;){var e=n.pop(),t=e.obj[e.prop];if(ze(t)){for(var r=[],a=0;a<t.length;++a)t[a]!==void 0&&r.push(t[a]);e.obj[e.prop]=r}}},fn=function(n,e){for(var t=e&&e.plainObjects?Object.create(null):{},r=0;r<n.length;++r)n[r]!==void 0&&(t[r]=n[r]);return t},li=function n(e,t,r){if(!t)return e;if(typeof t!="object"){if(ze(e))e.push(t);else{if(!e||typeof e!="object")return[e,t];(r&&(r.plainObjects||r.allowPrototypes)||!cr.call(Object.prototype,t))&&(e[t]=!0)}return e}if(!e||typeof e!="object")return[e].concat(t);var a=e;return ze(e)&&!ze(t)&&(a=fn(e,r)),ze(e)&&ze(t)?(t.forEach(function(i,l){if(cr.call(e,l)){var s=e[l];s&&typeof s=="object"&&i&&typeof i=="object"?e[l]=n(s,i,r):e.push(i)}else e[l]=i}),e):Object.keys(t).reduce(function(i,l){var s=t[l];return cr.call(i,l)?i[l]=n(i[l],s,r):i[l]=s,i},a)},ci=function(n,e){return Object.keys(e).reduce(function(t,r){return t[r]=e[r],t},n)},ui=function(n,e,t){var r=n.replace(/\\+/g," ");if(t==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},pi=function(n,e,t,r,a){if(n.length===0)return n;var i=n;if(typeof n=="symbol"?i=Symbol.prototype.toString.call(n):typeof n!="string"&&(i=String(n)),t==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(o){return"%26%23"+parseInt(o.slice(2),16)+"%3B"});for(var l="",s=0;s<i.length;++s){var u=i.charCodeAt(s);if(u===45||u===46||u===95||u===126||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||a===qe.RFC1738&&(u===40||u===41)){l+=i.charAt(s);continue}if(u<128){l+=je[u];continue}if(u<2048){l+=je[192|u>>6]+je[128|63&u];continue}if(u<55296||u>=57344){l+=je[224|u>>12]+je[128|u>>6&63]+je[128|63&u];continue}s+=1,l+=je[240|(u=65536+((1023&u)<<10|1023&i.charCodeAt(s)))>>18]+je[128|u>>12&63]+je[128|u>>6&63]+je[128|63&u]}return l},di=function(n){for(var e=[{obj:{o:n},prop:"o"}],t=[],r=0;r<e.length;++r)for(var a=e[r],i=a.obj[a.prop],l=Object.keys(i),s=0;s<l.length;++s){var u=l[s],o=i[u];typeof o=="object"&&o!==null&&t.indexOf(o)===-1&&(e.push({obj:i,prop:u}),t.push(o))}return oi(e),n},fi=function(n){return Object.prototype.toString.call(n)==="[object RegExp]"},hi=function(n){return!!n&&typeof n=="object"&&!!(n.constructor&&n.constructor.isBuffer&&n.constructor.isBuffer(n))},mi=function(n,e){return[].concat(n,e)},gi=function(n,e){if(ze(n)){for(var t=[],r=0;r<n.length;r+=1)t.push(e(n[r]));return t}return e(n)};Se={arrayToObject:fn,assign:ci,combine:mi,compact:di,decode:ui,encode:pi,isBuffer:hi,isRegExp:fi,maybeMap:gi,merge:li};var yi=Object.prototype.hasOwnProperty,hn={brackets:function(n){return n+"[]"},comma:"comma",indices:function(n,e){return n+"["+e+"]"},repeat:function(n){return n}},Me=Array.isArray,_i=Array.prototype.push,mn=function(n,e){_i.apply(n,Me(e)?e:[e])},bi=Date.prototype.toISOString,gn=qe.default,ye={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Se.encode,encodeValuesOnly:!1,format:gn,formatter:qe.formatters[gn],indices:!1,serializeDate:function(n){return bi.call(n)},skipNulls:!1,strictNullHandling:!1},vi=function(n){return typeof n=="string"||typeof n=="number"||typeof n=="boolean"||typeof n=="symbol"||typeof n=="bigint"},ur={},wi=function n(e,t,r,a,i,l,s,u,o,p,m,d,y,f,S,v){for(var w,g=e,_=v,$=0,x=!1;(_=_.get(ur))!==void 0&&!x;){var T=_.get(e);if($+=1,T!==void 0){if(T===$)throw RangeError("Cyclic object value");x=!0}_.get(ur)===void 0&&($=0)}if(typeof u=="function"?g=u(t,g):g instanceof Date?g=m(g):r==="comma"&&Me(g)&&(g=Se.maybeMap(g,function(X){return X instanceof Date?m(X):X})),g===null){if(i)return s&&!f?s(t,ye.encoder,S,"key",d):t;g=""}if(vi(g)||Se.isBuffer(g))return s?[y(f?t:s(t,ye.encoder,S,"key",d))+"="+y(s(g,ye.encoder,S,"value",d))]:[y(t)+"="+y(String(g))];var P=[];if(g===void 0)return P;if(r==="comma"&&Me(g))f&&s&&(g=Se.maybeMap(g,s)),w=[{value:g.length>0?g.join(",")||null:void 0}];else if(Me(u))w=u;else{var D=Object.keys(g);w=o?D.sort(o):D}for(var R=a&&Me(g)&&g.length===1?t+"[]":t,I=0;I<w.length;++I){var F=w[I],C=typeof F=="object"&&F.value!==void 0?F.value:g[F];if(!l||C!==null){var B=Me(g)?typeof r=="function"?r(R,F):R:R+(p?"."+F:"["+F+"]");v.set(e,$);var V=zt();V.set(ur,v),mn(P,n(C,B,r,a,i,l,r==="comma"&&f&&Me(g)?null:s,u,o,p,m,d,y,f,S,V))}}return P},$i=function(n){if(!n)return ye;if(n.encoder!==null&&n.encoder!==void 0&&typeof n.encoder!="function")throw TypeError("Encoder has to be a function.");var e=n.charset||ye.charset;if(n.charset!==void 0&&n.charset!=="utf-8"&&n.charset!=="iso-8859-1")throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=qe.default;if(n.format!==void 0){if(!yi.call(qe.formatters,n.format))throw TypeError("Unknown format option provided.");t=n.format}var r=qe.formatters[t],a=ye.filter;return(typeof n.filter=="function"||Me(n.filter))&&(a=n.filter),{addQueryPrefix:typeof n.addQueryPrefix=="boolean"?n.addQueryPrefix:ye.addQueryPrefix,allowDots:n.allowDots===void 0?ye.allowDots:!!n.allowDots,charset:e,charsetSentinel:typeof n.charsetSentinel=="boolean"?n.charsetSentinel:ye.charsetSentinel,delimiter:n.delimiter===void 0?ye.delimiter:n.delimiter,encode:typeof n.encode=="boolean"?n.encode:ye.encode,encoder:typeof n.encoder=="function"?n.encoder:ye.encoder,encodeValuesOnly:typeof n.encodeValuesOnly=="boolean"?n.encodeValuesOnly:ye.encodeValuesOnly,filter:a,format:t,formatter:r,serializeDate:typeof n.serializeDate=="function"?n.serializeDate:ye.serializeDate,skipNulls:typeof n.skipNulls=="boolean"?n.skipNulls:ye.skipNulls,sort:typeof n.sort=="function"?n.sort:null,strictNullHandling:typeof n.strictNullHandling=="boolean"?n.strictNullHandling:ye.strictNullHandling}};Br=function(n,e){var t,r,a=n,i=$i(e);typeof i.filter=="function"?a=i.filter("",a):Me(i.filter)&&(t=i.filter);var l=[];if(typeof a!="object"||a===null)return"";r=e&&e.arrayFormat in hn?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var s=hn[r];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw TypeError("\`commaRoundTrip\` must be a boolean, or absent");var u=s==="comma"&&e&&e.commaRoundTrip;t||(t=Object.keys(a)),i.sort&&t.sort(i.sort);for(var o=zt(),p=0;p<t.length;++p){var m=t[p];i.skipNulls&&a[m]===null||mn(l,wi(a[m],m,s,u,i.strictNullHandling,i.skipNulls,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,o))}var d=l.join(i.delimiter),y=i.addQueryPrefix===!0?"?":"";return i.charsetSentinel&&(i.charset==="iso-8859-1"?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),d.length>0?y+d:""};var yn={},pr=Object.prototype.hasOwnProperty,Si=Array.isArray,de={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Se.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},xi=function(n){return n.replace(/&#(\\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},_n=function(n,e){return n&&typeof n=="string"&&e.comma&&n.indexOf(",")>-1?n.split(","):n},Ei="utf8=%26%2310003%3B",ki="utf8=%E2%9C%93",Ai=function(n,e){var t={__proto__:null},r=e.ignoreQueryPrefix?n.replace(/^\\?/,""):n,a=e.parameterLimit===1/0?void 0:e.parameterLimit,i=r.split(e.delimiter,a),l=-1,s=e.charset;if(e.charsetSentinel)for(u=0;u<i.length;++u)i[u].indexOf("utf8=")===0&&(i[u]===ki?s="utf-8":i[u]===Ei&&(s="iso-8859-1"),l=u,u=i.length);for(u=0;u<i.length;++u)if(u!==l){var u,o,p,m=i[u],d=m.indexOf("]="),y=d===-1?m.indexOf("="):d+1;y===-1?(o=e.decoder(m,de.decoder,s,"key"),p=e.strictNullHandling?null:""):(o=e.decoder(m.slice(0,y),de.decoder,s,"key"),p=Se.maybeMap(_n(m.slice(y+1),e),function(f){return e.decoder(f,de.decoder,s,"value")})),p&&e.interpretNumericEntities&&s==="iso-8859-1"&&(p=xi(p)),m.indexOf("[]=")>-1&&(p=Si(p)?[p]:p),pr.call(t,o)?t[o]=Se.combine(t[o],p):t[o]=p}return t},Ii=function(n,e,t,r){for(var a=r?e:_n(e,t),i=n.length-1;i>=0;--i){var l,s=n[i];if(s==="[]"&&t.parseArrays)l=[].concat(a);else{l=t.plainObjects?Object.create(null):{};var u=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,o=parseInt(u,10);t.parseArrays||u!==""?!isNaN(o)&&s!==u&&String(o)===u&&o>=0&&t.parseArrays&&o<=t.arrayLimit?(l=[])[o]=a:u!=="__proto__"&&(l[u]=a):l={0:a}}a=l}return a},Oi=function(n,e,t,r){if(n){var a=t.allowDots?n.replace(/\\.([^.[]+)/g,"[$1]"):n,i=/(\\[[^[\\]]*])/,l=/(\\[[^[\\]]*])/g,s=t.depth>0&&i.exec(a),u=s?a.slice(0,s.index):a,o=[];if(u){if(!t.plainObjects&&pr.call(Object.prototype,u)&&!t.allowPrototypes)return;o.push(u)}for(var p=0;t.depth>0&&(s=l.exec(a))!==null&&p<t.depth;){if(p+=1,!t.plainObjects&&pr.call(Object.prototype,s[1].slice(1,-1))&&!t.allowPrototypes)return;o.push(s[1])}return s&&o.push("["+a.slice(s.index)+"]"),Ii(o,e,t,r)}},ji=function(n){if(!n)return de;if(n.decoder!==null&&n.decoder!==void 0&&typeof n.decoder!="function")throw TypeError("Decoder has to be a function.");if(n.charset!==void 0&&n.charset!=="utf-8"&&n.charset!=="iso-8859-1")throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var e=n.charset===void 0?de.charset:n.charset;return{allowDots:n.allowDots===void 0?de.allowDots:!!n.allowDots,allowPrototypes:typeof n.allowPrototypes=="boolean"?n.allowPrototypes:de.allowPrototypes,allowSparse:typeof n.allowSparse=="boolean"?n.allowSparse:de.allowSparse,arrayLimit:typeof n.arrayLimit=="number"?n.arrayLimit:de.arrayLimit,charset:e,charsetSentinel:typeof n.charsetSentinel=="boolean"?n.charsetSentinel:de.charsetSentinel,comma:typeof n.comma=="boolean"?n.comma:de.comma,decoder:typeof n.decoder=="function"?n.decoder:de.decoder,delimiter:typeof n.delimiter=="string"||Se.isRegExp(n.delimiter)?n.delimiter:de.delimiter,depth:typeof n.depth=="number"||n.depth===!1?+n.depth:de.depth,ignoreQueryPrefix:n.ignoreQueryPrefix===!0,interpretNumericEntities:typeof n.interpretNumericEntities=="boolean"?n.interpretNumericEntities:de.interpretNumericEntities,parameterLimit:typeof n.parameterLimit=="number"?n.parameterLimit:de.parameterLimit,parseArrays:n.parseArrays!==!1,plainObjects:typeof n.plainObjects=="boolean"?n.plainObjects:de.plainObjects,strictNullHandling:typeof n.strictNullHandling=="boolean"?n.strictNullHandling:de.strictNullHandling}};yn=function(n,e){var t=ji(e);if(n===""||n==null)return t.plainObjects?Object.create(null):{};for(var r=typeof n=="string"?Ai(n,t):n,a=t.plainObjects?Object.create(null):{},i=Object.keys(r),l=0;l<i.length;++l){var s=i[l],u=Oi(s,r[s],t,typeof n=="string");a=Se.merge(a,u,t)}return t.allowSparse===!0?a:Se.compact(a)},St={formats:qe,parse:yn,stringify:Br};class Ti{constructor(e){this.root=e,this.requestPromises=[]}init(e){this.getToken=e}async get(e){let t=await this.getToken(),r=this.getHashCode(e);if(this.requestPromises[r])return this.requestPromises[r].promise;let a=new Promise((i,l)=>{let s;e.externalResource?s=e.url:(s=this.root+e.url,s=\`\${s}\${/\\?/.test(s)?"&":"?"}token=\${t}\${ya(e.params)}\`),G(ht).get(s,{validateStatus:function(u){return u<400}}).then(function(u){u.status!=200&&console.error(\`GUDHUB HTTP SERVICE: GET ERROR: \${u.status}\`,u),i(u.data)}).catch(function(u){console.error(\`GUDHUB HTTP SERVICE: GET ERROR: \${u.response.status}
|
|
103
|
-
\`,u),console.log("Request message: ",e),u.response&&u.response.data&&console.log("Error response data: ",u.response.data),l(u)})});return this.pushPromise(a,r),a}async post(e){let t=this.getHashCode(e);if(e.form.token=await this.getToken(),this.requestPromises[t])return this.requestPromises[t].promise;let r=new Promise((a,i)=>{G(
|
|
104
|
-
\`,l),console.log("Request message: ",e),i(l)})});return this.pushPromise(r,t),r}axiosRequest(e){let t=this.getHashCode(e);if(this.requestPromises[t])return this.requestPromises[t].promise;let r=e.method?e.method.toLowerCase():"get",a=e.url,i=e.headers||{};e.form&&(i["Content-Type"]="application/x-www-form-urlencoded");let l=new Promise(async(s,u)=>{try{let{data:o}=await G(ht)[r](a,r==="post"?G(St).stringify(e.form)||e.body:{headers:i},r==="post"?{headers:i}:{});s(o)}catch(o){console.log("ERROR -> GUDHUB HTTP SERVICE -> SIMPLE POST :",o.message),console.log("Request message: ",e),u(o)}});return this.pushPromise(l,t),l}pushPromise(e,t){this.requestPromises[t]={promise:e,hesh:t,callback:e.then(()=>{this.destroyPromise(t)}).catch(r=>{this.destroyPromise(t)})}}destroyPromise(e){this.requestPromises=this.requestPromises.filter(t=>t.hesh!==e)}getHashCode(e){let t=0,r=G(St).stringify(e);if(r.length==0)return t;for(let a=0;a<r.length;a++)t=(t<<5)-t+r.charCodeAt(a),t&=t;return"h"+t}}function dr(n){let e="";for(let t in n)n.hasOwnProperty(t)&&n[t]&&(e+="."+n[t]);return e?e.substring(1):"any"}function Pi(n,e,t){return n==null||typeof n!="string"?(console.log(\`Listener type is "undefined" or not have actual 'type' for subscribe\`),!1):e==null||typeof e!="object"?(console.log(\`Listener destination is "undefined" or not have actual 'type' for subscribe\`),!1):typeof t=="function"||(console.log("Listener is not a function for subscribe!"),!1)}class Ci{constructor(){this.subscribers={},this.messageBox={}}on(e,t,r){return Pi(e,t,r)&&e.split(" ").map(a=>a+":"+dr(t)).forEach(a=>{this.subscribers[a]||(this.subscribers[a]=new Set),this.subscribers[a].add(r),this.checkMessageBox(a)}),this}emit(e,t,r,a){return e.split(" ").forEach(i=>{let l=i+":"+dr(t),s=!1;if(this.subscribers[l]){if(this.subscribers[l].size==0)return this.messageBox[l]=[e,t,r,a,s],this;this.subscribers[l].forEach(function(u){u(null,r,a)})}else this.messageBox[l]=[e,t,r,a,s]}),this}onRoot(e,t,r){return this.on(e,t,r)}destroy(e,t,r){return e.split(" ").forEach(a=>{let i=a+":"+dr(t);this.subscribers[i]&&r&&this.subscribers[i].delete(r),this.subscribers[i]&&!r&&delete this.subscribers[i]}),this}checkMessageBox(e){this.cleanMesssageBox(),this.messageBox[e]&&setTimeout(()=>{this.messageBox[e]&&(this.emit(...this.messageBox[e]),this.messageBox[e][4]=!0)},0)}cleanMesssageBox(){for(let e in this.messageBox)this.messageBox[e][4]&&delete this.messageBox[e]}}function Ni(n,e,t){return[{data_type:"text",name:"Text",icon:"text_icon",url:e+"/"+n+"text_data.js",type:"gh_element",technology:"angular"},{data_type:"text_opt",name:"Options",icon:"option_gh_element",url:e+"/"+n+"text_options_data.js",type:"gh_element",technology:"angular"},{data_type:"number",name:"Number",icon:"number",url:e+"/"+n+"number_data.js",type:"gh_element",technology:"angular"},{data_type:"task_board",name:"Task Board",icon:"task_board",url:e+"/"+n+"task_board_data.js",type:"gh_element",technology:"angular"},{data_type:"visualizer",name:"visualizer",icon:"visualizer",url:e+"/"+n+"visualizer_data.js",type:"gh_element",technology:"angular"},{data_type:"enterprice_visualizer",name:"Enterprice Visualizer",icon:"visualizer",private:!0,url:e+"/"+n+"enterprice_visualizer_data.js",type:"gh_element",technology:"angular"},{data_type:"email",name:"Email",icon:"email",url:e+"/"+n+"email_data.js",type:"gh_element",technology:"angular"},{data_type:"date",name:"Date",icon:"date_gh_element",url:e+"/"+n+"date_data.js",type:"gh_element",technology:"angular"},{data_type:"radio_button",name:"Radio Button",icon:"radio_button_gh_element",url:e+"/"+n+"radio_button_data.js",type:"gh_element",technology:"angular"},{data_type:"radio_icon",name:"Radio icon",icon:"radio_icon_gh_element",url:e+"/"+n+"radio_icon_data.js",type:"gh_element",technology:"angular"},{data_type:"twilio_phone",name:"Twilio Phone",icon:"phone_twilio_gh_element",url:e+"/"+n+"twilio_phone_data.js",type:"gh_element",technology:"angular"},{data_type:"twilio_autodialer",name:"Twilio Auto Dialer",icon:"twilio_dialer",url:e+"/"+n+"twillio_autodialer_data.js",type:"gh_element",technology:"angular"},{data_type:"color",name:"Color",icon:"paint_gh_element",url:e+"/"+n+"color_data.js",type:"gh_element",technology:"angular"},{data_type:"charts",name:"Charts",icon:"graph_gh_element",url:e+"/"+n+"charts_data.js",type:"gh_element",technology:"angular"},{data_type:"funnel_chart",name:"Funnel chart",icon:"funnel_chart_gh_element",url:e+"/"+n+"funnel_chart_data.js",type:"gh_element",technology:"angular"},{data_type:"add_items_from_template",name:"Add items from template",icon:"contact_second",url:e+"/"+n+"add_items_from_template_data.js",type:"gh_element",technology:"angular"},{data_type:"item_ref",name:"Reference",icon:"reference",url:e+"/"+n+"itemRef_data.js",type:"gh_element",technology:"angular"},{data_type:"calendar",name:"Calendar",icon:"calendar",js:"https://gudhub.com/modules/FullCalendar-Gh-Element/dist/main.js?t=4",css:"https://gudhub.com/modules/FullCalendar-Gh-Element/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"data_ref",name:"Data Reference",icon:"data_reference",url:e+"/"+n+"data_ref_data.js",type:"gh_element",technology:"angular"},{data_type:"table",name:"Table",icon:"table",url:e+"/"+n+"table_data.js",type:"gh_element",technology:"angular"},{data_type:"tile",name:"Tile table",icon:"tile_table",url:e+"/"+n+"tile_data.js",type:"gh_element",technology:"angular"},{data_type:"file",name:"File",icon:"box",url:e+"/"+n+"file_data.js",type:"gh_element",technology:"angular"},{data_type:"image",name:"Image",icon:"image",url:e+"/"+n+"image_data.js",type:"gh_element",technology:"angular"},{data_type:"text_editor",name:"Text Editor",icon:"square",url:e+"/"+n+"text_editor_data.js",type:"gh_element",technology:"angular"},{data_type:"tinymse",name:"Text editor MSE",icon:"tag",url:e+"/"+n+"tinymse_data.js",type:"gh_element",technology:"angular"},{data_type:"duration",name:"Duration",icon:"number_gh_element",url:e+"/"+n+"duration_data.js",type:"gh_element",technology:"angular"},{data_type:"user",name:"User",icon:"user_gh_element",url:e+"/"+n+"user_data.js",type:"gh_element",technology:"angular"},{data_type:"app",name:"App",icon:"app",url:e+"/"+n+"application_data.js",type:"gh_element",technology:"angular"},{data_type:"field",name:"Field",icon:"field_gh_element",url:e+"/"+n+"field_data.js",type:"gh_element",technology:"angular"},{data_type:"available",name:"Available",icon:"availible_gh_element",url:e+"/"+n+"available_data.js",type:"gh_element",technology:"angular"},{data_type:"view_list",name:"View List",icon:"view_list",url:e+"/"+n+"view_list_data.js",type:"gh_element",technology:"angular"},{data_type:"calculator",name:"Calculator",icon:"calculator",url:e+"/"+n+"calculator_data.js",type:"gh_element",technology:"angular"},{data_type:"string_join",name:"String Joiner",icon:"string_join_gh_element",url:e+"/"+n+"string_joiner_data.js",type:"gh_element",technology:"angular"},{data_type:"signature",name:"Signature",icon:"signature",url:e+"/"+n+"signature_data.js",type:"gh_element",technology:"angular"},{data_type:"sendEmail",name:"Send Email",icon:"send_email_gh_element",url:e+"/"+n+"send_email_data.js",type:"gh_element",technology:"angular"},{data_type:"boolean",name:"Yes/No",icon:"boolen_gh_element",url:e+"/"+n+"boolean_data.js",type:"gh_element",technology:"angular"},{data_type:"product_gallery",name:"Product gallery",icon:"product_gallery",url:e+"/"+n+"product_gallery_data.js",type:"gh_element",technology:"angular"},{data_type:"online_inventory",name:"Online inventory",icon:"slab",url:e+"/"+n+"online_inventory_data.js",type:"gh_element",technology:"angular"},{data_type:"3d_edges",name:"3D Edges",icon:"3d_edges_gh_element",url:e+"/"+n+"3d_edges_data.js",type:"gh_element",technology:"angular"},{data_type:"color_list",name:"Color list",icon:"circular_gh_element",url:e+"/"+n+"color_list_data.js",type:"gh_element",technology:"angular"},{data_type:"go_to_link",name:"Go to Link",icon:"go_to_link",url:e+"/"+n+"go_to_link_data.js",type:"gh_element",technology:"angular"},{data_type:"go_to_view",name:"Go to View",icon:"go_to_view",url:e+"/"+n+"go_to_view_data.js",type:"gh_element",technology:"angular"},{data_type:"range",name:"Range",icon:"range_gh_element",url:e+"/"+n+"range_data.js",type:"gh_element",technology:"angular"},{data_type:"barcode",name:"Barcode",icon:"barcode_gh_element",url:e+"/"+n+"barcode_data.js",type:"gh_element",technology:"angular"},{data_type:"item_remote_add",name:"Item remote add",icon:"remote_add_gh_element",url:e+"/"+n+"item_remote_add_data.js",type:"gh_element",technology:"angular"},{data_type:"item_remote_update",name:"Item remote update",icon:"remote_update_gh_element",url:e+"/"+n+"item_remote_update_data.js",type:"gh_element",technology:"angular"},{data_type:"timeline",name:"Timeline",icon:"timeline",url:e+"/"+n+"timeline_data.js",type:"gh_element",technology:"angular"},{data_type:"delete_item",name:"Delete Item",icon:"rubbish",url:e+"/"+n+"delete_action.js",type:"gh_element",technology:"angular"},{data_type:"print_doc",name:"Print document",icon:"print",url:e+"/"+n+"print_doc_action.js",type:"gh_element",technology:"angular"},{data_type:"open_item",name:"Open Item",icon:"delete",private:!0,url:e+"/"+n+"open_item_action.js",type:"gh_element",technology:"angular"},{data_type:"edit_template",name:"Edit template",icon:"delete",private:!0,url:e+"/"+n+"edit_template_action.js",type:"gh_element",technology:"angular"},{data_type:"open_app",private:!0,name:"Open App",icon:"delete",url:e+"/"+n+"open_app_action.js",type:"gh_element",technology:"angular"},{data_type:"user_settings",private:!0,name:"User Settings",icon:"delete",url:e+"/"+n+"user_settings_action.js",type:"gh_element",technology:"angular"},{data_type:"app_sharing",name:"Sharing",icon:"sharing",url:e+"/"+n+"sharing_action.js",type:"gh_element",technology:"angular"},{data_type:"app_constructor",private:!0,name:"App constructor",icon:"app_constructor",url:e+"/"+n+"app_constructor_action.js",type:"gh_element",technology:"angular"},{data_type:"app_settings",name:"App Settings",icon:"configuration",url:e+"/"+n+"app_settings_action.js",type:"gh_element",technology:"angular"},{data_type:"export_csv",name:"Export CSV",icon:"export_csv",url:e+"/"+n+"export_csv.js",type:"gh_element",technology:"angular"},{data_type:"import_csv",name:"Import CSV",icon:"import_csv",url:e+"/"+n+"import_csv.js",type:"gh_element",technology:"angular"},{data_type:"add_items",name:"Add Items",icon:"plus",url:e+"/"+n+"add_items_action.js",type:"gh_element",technology:"angular"},{data_type:"update_items",name:"Update Items",icon:"update",url:e+"/"+n+"update_items_action.js",type:"gh_element",technology:"angular"},{data_type:"install_app",name:"Install",icon:"install",url:e+"/"+n+"install_app_action.js",type:"gh_element",technology:"angular"},{data_type:"search_action",name:"Search",icon:"search",url:e+"/"+n+"search_action.js",type:"gh_element",technology:"angular"},{data_type:"filter_table",name:"Table filter",icon:"filter",url:e+"/"+n+"filter_table_action.js",type:"gh_element",technology:"angular"},{data_type:"slider",name:"Slider",icon:"slider",url:e+"/"+n+"slider_data.js",type:"gh_element",technology:"angular"},{data_type:"clone_item",name:"Clone Item",icon:"double_plus",url:e+"/"+n+"clone_item_action.js",type:"gh_element",technology:"angular"},{data_type:"close",name:"Close",icon:"cross",url:e+"/"+n+"close_action.js",type:"gh_element",technology:"angular"},{data_type:"phone",name:"Phone",icon:"phone_thin",url:e+"/"+n+"phone_data.js",type:"gh_element",technology:"angular"},{data_type:"link",name:"Link",icon:"link_gh_element",url:e+"/"+n+"link_data.js",type:"gh_element",technology:"angular"},{data_type:"sheduling",name:"Sheduling",icon:"scheduling",url:e+"/"+n+"sheduling_data.js",type:"gh_element",technology:"angular"},{data_type:"qrcode",name:"QR Code",icon:"qr_code",url:e+"/"+n+"qrcode_data.js",type:"gh_element",technology:"angular"},{data_type:"graph2d",name:"Graph",icon:"graph",url:e+"/"+n+"graph2d_data.js",type:"gh_element",technology:"angular"},{data_type:"quote_tool",name:"Quote tool",icon:"quoters",url:e+"/"+n+"quote_tool_data.js",type:"gh_element",technology:"angular"},{data_type:"cards",name:"Cards",icon:"cards",url:e+"/"+n+"cards_data.js",type:"gh_element",technology:"angular"},{data_type:"jsonConstructor",name:"Json Constructor",icon:"button",url:e+"/"+n+"json_constructor_data.js",type:"gh_element",technology:"angular"},{data_type:"button",name:"Button",icon:"button",js:"https://gudhub.com/modules/button_action/button_action.js?t=1",type:"gh_element",technology:"class"},{data_type:"editorjs",name:"EditorJS",icon:"code_editor",js:"https://gudhub.com/modules/Editor-Js/dist/main.js?t=2",css:"https://gudhub.com/modules/Editor-Js/dist/style.css?t=2",type:"gh_element",technology:"class"},{data_type:"filter_advanced",name:"Filter Advanced",icon:"filter_advanced",url:e+"/"+n+"filter_advanced_data.js",type:"gh_element",technology:"angular"},{data_type:"code_editor",name:"Code Editor",icon:"code_editor",url:e+"/"+n+"code_editor_data.js",type:"gh_element",technology:"angular"},{data_type:"icon",name:"Icon",icon:"icon_gh_element",url:e+"/"+n+"icon_data.js",type:"gh_element",technology:"angular"},{data_type:"quoteRequest",name:"Quote Request",icon:"invoices",url:e+"/"+n+"quote_request_data.js",type:"gh_element",technology:"angular"},{data_type:"view_container",name:"View Container",icon:"pencil",url:e+"/"+n+"view_container_data.js",type:"gh_element",technology:"angular"},{data_type:"element_ref",name:"Element Reference",icon:"cloudSync_gh_element",url:e+"/"+n+"element_ref_data.js",type:"gh_element",technology:"angular"},{data_type:"quote_tool_objects_renderer",name:"Quote Tool Renderer",icon:"l_counter",url:e+"/"+n+"quote_tool_objects_renderer_data.js",type:"gh_element",technology:"angular"},{data_type:"quote_tool_objects_renderer_generator",name:"Quote Tool Parts Generator",icon:"l_counter_arrow",url:e+"/"+n+"quote_tool_objects_renderer_generator_data.js",type:"gh_element",technology:"angular"},{data_type:"trigger",name:"Trigger",icon:"job",url:e+"/"+n+"trigger_data.js",type:"gh_element",technology:"angular"},{data_type:"voting",name:"Voting",icon:"like_gh_element",url:e+"/"+n+"voting_data.js",type:"gh_element",technology:"angular"},{data_type:"view_tabs",name:"View Tab",icon:"tabs",url:e+"/"+n+"view_tabs.js",type:"gh_element",technology:"angular"},{data_type:"filter_tabs",name:"Filter Tabs",icon:"filter_tabs_gh_element",url:e+"/"+n+"filter_tabs.js",type:"gh_element",technology:"angular"},{data_type:"gps_coords",name:"GPS Coords",icon:"location_gh_element",url:e+"/"+n+"gps_coords.js",type:"gh_element",technology:"angular"},{data_type:"google_map",name:"Google Map",icon:"location",url:e+"/"+n+"google_map_data.js",type:"gh_element",technology:"angular"},{data_type:"data_migrations",name:"Data migrations",icon:"view_list_gh_element",url:e+"/"+n+"data_migrations.js",type:"gh_element",technology:"angular"},{data_type:"additional_settings",name:"Additional Settings",icon:"",private:!0,url:e+"/"+n+"gh_additional_settings_data.js",type:"gh_element",technology:"angular"},{data_type:"send_request",name:"Send Request",icon:"send_request_gh_element",url:e+"/"+n+"send_request_data.js",type:"gh_element",technology:"angular"},{data_type:"webcam",name:"Web camera",icon:"webcam_gh_element",url:e+"/"+n+"webcam_data.js",type:"gh_element",technology:"angular"},{data_type:"json_viewer",name:"JSON viewer",icon:"json_gh_element",url:e+"/"+n+"json_viewer_data.js",type:"gh_element",technology:"angular"},{data_type:"notifications",name:"Notifications",icon:"full_gh_element",url:e+"/"+n+"notifications_data.js",type:"gh_element",technology:"angular"},{data_type:"api",name:"API",icon:"job",url:e+"/"+n+"api_data.js",type:"gh_element",technology:"angular"},{data_type:"smart_input",name:"Smart Input",icon:"roket",url:e+"/"+n+"smart_input_data.js",type:"gh_element",technology:"angular"},{data_type:"json_editor",name:"JSON Editor",icon:"code",url:e+"/"+n+"json_editor_data.js",type:"gh_element",technology:"angular"},{data_type:"grapes_html_editor",name:"Grapes Html Editor",icon:"code_editor",url:e+"/"+n+"grapes_html_editor_data.js",type:"gh_element",technology:"angular"},{data_type:"quiz",name:"Quiz",icon:"quiz_gh_element",url:e+"/"+n+"quiz_data.js",type:"gh_element",technology:"angular"},{data_type:"password_input",name:"Password",icon:"lock_gh_element",url:e+"/"+n+"password_input_data.js",type:"gh_element",technology:"angular"},{data_type:"vs_code",name:"VS Code",icon:"code_editor",url:e+"/"+n+"vs_code_data.js",type:"gh_element",technology:"angular"},{data_type:"nested_list",name:"Nested List",icon:"scheduling",js:"https://gudhub.com/modules/Nested-List/dist/main.js?t=2",css:"https://gudhub.com/modules/Nested-List/dist/style.css?t=2",type:"gh_element",technology:"class"},{data_type:"countertop_smart_quote",name:"Countertop Smart Quote",icon:"quoters",url:e+"/"+n+"countertop_smart_quote_data.js",type:"gh_element",technology:"angular"},{data_type:"markdown_viewer",name:"Markdown viewer",icon:"code_editor",js:"https://gudhub.com/modules/markdown-it-gh-element/dist/main.js?t=1",css:"https://gudhub.com/modules/markdown-it-gh-element/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"html_viewer",name:"HTML Viewer",icon:"code_editor",js:"https://gudhub.com/modules/HTML-Viewer/dist/main.js?t=1",css:"https://gudhub.com/modules/HTML-Viewer/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"element_customizer",name:"Element Customizer",icon:"pencil",url:e+"/"+n+"element_customizer_data.js",type:"gh_element",technology:"angular"},{data_type:"task",name:"Task",icon:"table",url:e+"/"+n+"task_data.js",type:"gh_element",technology:"angular"},{data_type:"cron_picker",name:"Cron Picker",icon:"table",js:"https://gudhub.com/modules/Cron-Picker/dist/main.js?t=2",css:"https://gudhub.com/modules/Cron-Picker/dist/style.css?t=2",type:"gh_element",technology:"class"},{data_type:"balance_sheet",name:"Balance Sheet",icon:"table",js:"https://gudhub.com/modules/balance-sheet/dist/main.js?t=2",css:"https://gudhub.com/modules/balance-sheet/dist/style.css?t=2",type:"gh_element",technology:"class"},{data_type:"quote_form",name:"Quote Form",icon:"table",js:"https://gudhub.com/modules/countertop-quote-form/dist/main.js",css:"https://gudhub.com/modules/countertop-quote-form/dist/style.css",type:"gh_element",technology:"class"},{data_type:"static_nested_list",name:"Nested Filter",icon:"scheduling",js:"https://gudhub.com/modules/nested-filter/dist/main.js?t=1",css:"https://gudhub.com/modules/nested-filter/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"conversations",name:"Conversations",icon:"timeline",js:"https://gudhub.com/modules/conversation/dist/main.js?t=1",css:"https://gudhub.com/modules/conversation/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"study_journal",name:"Study Journal",icon:"timeline",js:"https://gudhub.com/modules/Study-Journal/dist/main.js?t=1",css:"https://gudhub.com/modules/Study-Journal/dist/style.css",type:"gh_element",technology:"class"},{data_type:"study_schedule",name:"Study Schedule",icon:"timeline",js:"https://gudhub.com/modules/Study-Schedule/dist/main.js?t=1",css:"https://gudhub.com/modules/Study-Schedule/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"avatar",name:"Avatar",icon:"user",js:"https://gudhub.com/modules/Gh-Avatar/dist/main.js?t=1",css:"https://gudhub.com/modules/Gh-Avatar/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"text_area",name:"Text Area",icon:"text_icon",js:"https://gudhub.com/modules/text-area-ghe/dist/main.js?t=3",css:"https://gudhub.com/modules/text-area-ghe/dist/style.css",type:"gh_element",technology:"class"},{data_type:"resource_calendar",name:"Resource Сalendar",icon:"calendar",url:e+"/"+n+"resource_calendar_data.js",type:"gh_element",technology:"angular"},{data_type:"visualizer_with_control_panel",name:"Visualizer With Control Panel",icon:"visualizer",url:e+"/"+n+"visualizer_with_control_panel_data.js",type:"gh_element",technology:"angular"},{data_type:"API",name:"API",url:e+"/"+t+"api_node.js",type:"automation",icon:"automation_api",private:!0},{data_type:"Calculator",name:"Calculator",url:e+"/"+t+"calculator.js",type:"automation",icon:"automation_calculator"},{data_type:"CompareItems",name:"Compare Items",url:e+"/"+t+"compare_items.js",type:"automation",icon:"automation_compare_items"},{data_type:"Constants",name:"Constants",url:e+"/"+t+"constants.js",type:"automation",icon:"automation_constants"},{data_type:"CreateFiles",name:"Create Files",url:e+"/"+t+"create_files.js",type:"automation",icon:"automation_create_files"},{data_type:"CreateItemsApi",name:"Create Items Api",url:e+"/"+t+"create_item_api.js",type:"automation",icon:"automation_create_items_api"},{data_type:"FileDuplicate",name:"File Duplicate",url:e+"/"+t+"file_duplicate.js",type:"automation",icon:"automation_file_duplicate"},{data_type:"Filter",name:"Filter",url:e+"/"+t+"filter_node.js",type:"automation",icon:"filter"},{data_type:"GetItemByItemRef",name:"Get Item By Item Ref",url:e+"/"+t+"get_item_by_item_ref.js",type:"automation",icon:"automation_get_item_by_item_ref"},{data_type:"GetItems",name:"Get Items",url:e+"/"+t+"get_items.js",type:"automation",icon:"automation_get_items"},{data_type:"GhElementNode",name:"Gh Element Node",url:e+"/"+t+"gh_element_node.js",type:"automation",icon:"automation_gh_element_node",private:!0,created_for:["GhElement"]},{data_type:"IfCondition",name:"If Condition",url:e+"/"+t+"if_condition.js",type:"automation",icon:"automation_if_condition"},{data_type:"ItemConstructor",name:"Item Constructor",url:e+"/"+t+"item_constructor.js",type:"automation",icon:"automation_item_constructor"},{data_type:"ItemDestructor",name:"Item Destructor",url:e+"/"+t+"item_destructor.js",type:"automation",icon:"automation_item_destructor"},{data_type:"JSONScheme",name:"JSON Scheme",url:e+"/"+t+"json_scheme.js",type:"automation",icon:"automation_json_scheme"},{data_type:"MergeItems",name:"Merge Items",url:e+"/"+t+"merge_items.js",type:"automation",icon:"automation_merge_items"},{data_type:"MessageConstructor",name:"Message Constructor",url:e+"/"+t+"message_constructor.js",type:"automation",icon:"automation_message_constructor"},{data_type:"ObjectToItem",name:"Object To Item",url:e+"/"+t+"obj_to_item.js",type:"automation",icon:"automation_object_to_item"},{data_type:"ObjectConstructor",name:"Object Constructor",url:e+"/"+t+"object_constructor.js",type:"automation",icon:"automation_object_constructor"},{data_type:"ObjectDestructor",name:"Object Destructor",url:e+"/"+t+"object_destructor.js",type:"automation",icon:"automation_object_destructor"},{data_type:"PopulateElement",name:"Populate Element",url:e+"/"+t+"populate_element.js",type:"automation",icon:"automation_populate_element",private:!0,created_for:["GhElement"]},{data_type:"PopulateItems",name:"Populate Items",url:e+"/"+t+"populate_items.js",type:"automation",icon:"automation_populate_items"},{data_type:"PopulateWithDate",name:"Populate With Date",url:e+"/"+t+"populate_with_date.js",type:"automation",icon:"automation_populate_with_date"},{data_type:"PopulateWithItemRef",name:"Populate with Item Ref",url:e+"/"+t+"populate_with_item_ref.js",type:"automation",icon:"automation_populate_with_item_ref"},{data_type:"PopUpForm",name:"Pop Up Form",url:e+"/"+t+"popup_form.js",type:"automation",icon:"automation_pop_up_form",private:!0,created_for:["Quiz","GhElement","SmartInput","Iterator"]},{data_type:"QuizForm",name:"Quiz Form",url:e+"/"+t+"quiz_form.js",type:"automation",icon:"automation_quiz_form",private:!0,created_for:["Quiz"]},{data_type:"QuizNode",name:"Quiz Node",url:e+"/"+t+"quiz_node.js",type:"automation",icon:"automation_quiz_node",private:!0},{data_type:"Request",name:"Request",url:e+"/"+t+"request_node.js",type:"automation",icon:"automation_request"},{data_type:"Response",name:"Response",url:e+"/"+t+"response_node.js",type:"automation",icon:"automation_response",private:!0,created_for:["API"]},{data_type:"SmartInput",name:"Smart Input",url:e+"/"+t+"smart_input.js",type:"automation",icon:"automation_smart_input",private:!0},{data_type:"Trigger",name:"Trigger",url:e+"/"+t+"trigger_node.js",type:"automation",icon:"automation_trigger",private:!0},{data_type:"TwilioSMS",name:"Twilio SMS",url:e+"/"+t+"twilio_sms.js",type:"automation",icon:"automation_twilio"},{data_type:"TwilioAuth",name:"Twilio Auth",url:e+"/"+t+"twilio_auth.js",type:"automation",icon:"table"},{data_type:"TwilioDevice",name:"Twilio Device",url:e+"/"+t+"twilio_device.js",type:"automation",icon:"table"},{data_type:"UpdateItemsApi",name:"Update Items Api",url:e+"/"+t+"update_items_api.js",type:"automation",icon:"automation_update_items_api"},{data_type:"GoogleCalendar",name:"Google Calendar",url:e+"/"+t+"google_calendar.js",type:"automation",icon:"calendar"},{data_type:"VerifyEmail",name:"Verify email",url:e+"/"+t+"verify_email.js",type:"automation",icon:"check_in_circle"},{data_type:"Iterator",name:"Iterator",url:e+"/"+t+"iterator.js",type:"automation",icon:"update"},{data_type:"IteratorInput",name:"Iterator Input",url:e+"/"+t+"iterator_input.js",type:"automation",icon:"arrow_right",private:!0},{data_type:"IteratorOutput",name:"Iterator Output",url:e+"/"+t+"iterator_output.js",type:"automation",icon:"arrow_right",private:!0},{data_type:"SendEmail",name:"Send email",url:e+"/"+t+"send_email.js",type:"automation",icon:"email"},{data_type:"FileReader",name:"File Reader",url:e+"/"+t+"file_reader.js",type:"automation",icon:"file"},{data_type:"WebsitesChecker",name:"Websites Checker",url:e+"/"+t+"websites_checker.js",type:"automation",icon:"world"},{data_type:"VoiceMachineDetection",name:"Voice Machine Detection",url:e+"/"+t+"voice_machine_detection.js",type:"automation",icon:"automation_calculator"},{data_type:"Task",name:"Task",url:e+"/"+t+"task.js",type:"automation",icon:"automation_calculator",private:!0},{data_type:"DeleteItems",name:"Delete Items",url:e+"/"+t+"delete_items.js",type:"automation",icon:"rubbish"},{data_type:"GoToItem",name:"Go To Item",url:e+"/"+t+"go_to_item.js",type:"automation",icon:"cursor_point"},{data_type:"FireWorks",name:"Fire Works",url:e+"/"+t+"fireworks_node.js",type:"automation",icon:"weeding_party"},{data_type:"SendMessage",name:"Send Message",url:e+"/"+t+"send_message.js",type:"automation",icon:"speech_bubble"},{data_type:"TurboSMS",name:"Turbo SMS",url:e+"/"+t+"turbo_sms.js",type:"automation",icon:"email"},{data_type:"JsCode",name:"Js Code",url:e+"/"+t+"js_code.js",type:"automation",icon:"code_editor"}]}class Mi{constructor(e,t,r){this.apps_list=[],this.users_list=[],this.user={},this.modulesList=Ni(e,t,r),this.ghComponentsPromises=[]}getMainStorage(){return this}getAppsList(){return this.apps_list}getUser(){return this.user}getUsersList(){return this.users_list}getModulesList(e,t,r){return e===void 0?this.modulesList:t==!1?this.modulesList.filter(a=>a.created_for?a.type===e&&a.private&&a.created_for.includes(r):a.type===e&&!a.private):this.modulesList.filter(a=>a.type===e)}getModuleUrl(e){return this.modulesList.find(t=>t.data_type==e)}setUser(e){this.user=e,this.users_list.push(e)}updateUser(e={}){e.avatar_128&&(e.avatar_128=e.avatar_128+"?"+new Date().getTime()),e.avatar_512&&(e.avatar_512=e.avatar_512+"?"+new Date().getTime()),this.user={...this.user,...e},this.users_list=this.users_list.filter(t=>t.user_id!=e.user_id),this.users_list.push(this.user)}unsetUser(){this.user={}}getApp(e){for(let t=0;t<this.apps_list.length;t++)if(this.apps_list[t].app_id==e)return this.apps_list[t]}unsetApps(){this.apps_list=[]}updateApp(e){return this.apps_list=this.apps_list.map(t=>t.app_id==e.app_id?e:t),this.apps_list}deleteApp(e){return this.apps_list=this.apps_list.filter(t=>t.app_id!=e),this.apps_list}async updateItemsInApp(e,t){let r=await this.getApp(t);return r&&(r.items_list=updateItems(e,r.items_list,this.pipeService.emit.bind(this.pipeService),t),this.updateApp(r)),r}async addItemsToApp(e,t){let r=await this.getApp(t);return r&&(r.items_list.push(...e),this.updateApp(r),this.pipeService.emit("gh_items_update",{app_id:t},e)),r}async deleteItemsInApp(e,t){let r=await this.getApp(t);return r&&(r.items_list=r.items_list.filter(a=>!e.find(i=>i.item_id==a.item_id)),this.updateApp(r)),r}}var bn={};bn=function(){throw Error("ws does not work in the browser. Browser clients must use the native WebSocket object")};var Ee=A("5xozB");class Ri{constructor(e,t){this.websocket=null,this.connected=!1,this.queue=[],this.url=e,this.auth=t,this.heartBeatTimeStemp=1e13,this.ALLOWED_HEART_BEAT_DELEY=12e3,this.firstHeartBeat=!0,this.reload=!0,this.isBrowser=Ee.IS_BROWSER}async addSubscription(e){let t=await this.auth.getToken(),r=\`token=\${t}/~/app_id=\${e}\`;this.connected&&this.websocket.send(r),this.queue.push(e)}async onOpen(){this.reload=!0,console.log("websocket opened"),this.connected=!0;let e=await this.auth.getToken();this.queue.forEach(t=>{let r=\`token=\${e}/~/app_id=\${t}\`;this.websocket.send(r)})}onError(e){console.log("websocket error: ",e),this.websocket.close()}onClose(){console.log("websocket close"),this.connected=!1;try{this.initWebSocket(this.onMassageHandler,this.refreshAppsHandler)}catch(e){console.log(e)}}async onMessage(e){let t=this.isBrowser?e.data:e;if(t.match(/HeartBeat/)){let r=new Date().getTime()-this.heartBeatTimeStemp;this.ALLOWED_HEART_BEAT_DELEY<r?await this.onConnectionLost():(this.websocket.send("HeartBeat"),this.heartBeatTimeStemp=new Date().getTime())}if(this.firstHeartBeat&&(this.connectionChecker(),this.firstHeartBeat=!1),t.match(/[{}]/)){let r=JSON.parse(t),a=await this.auth.getToken();r.token!=a&&this.onMassageHandler(r)}}initWebSocket(e,t){this.onMassageHandler=e,this.refreshAppsHandler=t,this.isBrowser?(this.websocket=new WebSocket(this.url),this.websocket.onopen=this.onOpen.bind(this),this.websocket.onerror=this.onError.bind(this),this.websocket.onclose=this.onClose.bind(this),this.websocket.onmessage=this.onMessage.bind(this)):(this.websocket=new(G(bn))(this.url),this.websocket.on("open",this.onOpen),this.websocket.on("error",this.onError),this.websocket.on("close",this.onClose),this.websocket.on("message",this.onMessage)),console.log("websocket initialized")}connectionChecker(){setInterval(async()=>{let e=new Date().getTime()-this.heartBeatTimeStemp;this.ALLOWED_HEART_BEAT_DELEY<e&&await this.onConnectionLost()},1e3)}async onConnectionLost(){try{await this.auth.getVersion(),this.reload&&(this.reload=!1,console.log("Connected"),this.heartBeatTimeStemp=1e13,this.websocket.close())}catch(e){console.log(e)}}}async function Fi(n,e,t,r={}){let a=[],i={variableMethodcurrent_app:()=>[r.current_app_id||r.app_id],variableMethodelement_app:()=>[r.element_app_id],variableMethodcurrent_item:()=>[\`\${r.current_app_id||r.app_id}.\${r.item_id}\`],variableMethoduser_id:()=>[e.getUser().user_id],variableMethoduser_email:s=>[e.getUser().username],variableMethodtoday(s){let u=new Date,o=new Date(u.getFullYear(),u.getMonth(),u.getDate()),p=new Date(u.getFullYear(),u.getMonth(),u.getDate()+1);return[o.valueOf().toString()+":"+p.valueOf().toString()]},variableMethodvariable:s=>[r[s]]};if(n)for(let s of n)if(s)switch(s.input_type){case"variable":for(let o of(s.valuesArray=[],s==null?void 0:s.input_value.split(","))){let p=i[s.input_type+"Method"+o];typeof p=="function"?s.valuesArray?s.valuesArray.push(...p()):s.valuesArray=p():s.valuesArray?s.valuesArray.push(...i.variableMethodvariable(o)):s.valuesArray=i.variableMethodvariable(o)}a.push(s);break;case"field":let u=await l({app_id:r.current_app_id||r.app_id,item_id:r.item_id,field_id:s.input_value});u!=null&&s.valuesArray.push(u),a.push(s);break;default:a.push(s)}else a.push(s);function l(s){return new Promise(u=>{t.on("gh_value_get",s,function o(p,m){t.destroy("gh_value_get",s,o),u(m)}).emit("gh_value_get",{},s)})}return a}function Re(n){return Array.isArray?Array.isArray(n):$n(n)==="[object Array]"}function Li(n){if(typeof n=="string")return n;let e=n+"";return e=="0"&&1/n==-1/0?"-0":e}function Di(n){return n==null?"":Li(n)}function Te(n){return typeof n=="string"}function vn(n){return typeof n=="number"}function qi(n){return n===!0||n===!1||Bi(n)&&$n(n)=="[object Boolean]"}function wn(n){return typeof n=="object"}function Bi(n){return wn(n)&&n!==null}function $e(n){return n!=null}function fr(n){return!n.trim().length}function $n(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}let Ui="Incorrect 'index' type",Gi=n=>\`Invalid value for key \${n}\`,Wi=n=>\`Pattern length exceeds max of \${n}.\`,Hi=n=>\`Missing \${n} property in key\`,zi=n=>\`Property 'weight' in key '\${n}' must be a positive integer\`,Sn=Object.prototype.hasOwnProperty;class Vi{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(r=>{let a=xn(r);t+=a.weight,this._keys.push(a),this._keyMap[a.id]=a,t+=a.weight}),this._keys.forEach(r=>{r.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function xn(n){let e=null,t=null,r=null,a=1,i=null;if(Te(n)||Re(n))r=n,e=En(n),t=hr(n);else{if(!Sn.call(n,"name"))throw Error(Hi("name"));let l=n.name;if(r=l,Sn.call(n,"weight")&&(a=n.weight)<=0)throw Error(zi(l));e=En(l),t=hr(l),i=n.getFn}return{path:e,id:t,weight:a,src:r,getFn:i}}function En(n){return Re(n)?n:n.split(".")}function hr(n){return Re(n)?n.join("."):n}function Ji(n,e){let t=[],r=!1,a=(i,l,s)=>{if($e(i))if(l[s]){let u=i[l[s]];if($e(u))if(s===l.length-1&&(Te(u)||vn(u)||qi(u)))t.push(Di(u));else if(Re(u)){r=!0;for(let o=0,p=u.length;o<p;o+=1)a(u[o],l,s+1)}else l.length&&a(u,l,s+1)}else t.push(i)};return a(n,Te(e)?e.split("."):e,0),r?t:t[0]}var W={...{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(n,e)=>n.score===e.score?n.idx<e.idx?-1:1:n.score<e.score?-1:1},...{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},...{location:0,threshold:.6,distance:100},...{useExtendedSearch:!1,getFn:Ji,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};let Yi=/[^ ]+/g;function Qi(n=1,e=3){let t=new Map,r=Math.pow(10,e);return{get(a){let i=a.match(Yi).length;if(t.has(i))return t.get(i);let l=parseFloat(Math.round(1/Math.pow(i,.5*n)*r)/r);return t.set(i,l),l},clear(){t.clear()}}}class mr{constructor({getFn:e=W.getFn,fieldNormWeight:t=W.fieldNormWeight}={}){this.norm=Qi(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((t,r)=>{this._keysMap[t.id]=r})}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,Te(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){let t=this.size();Te(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,r=this.size();t<r;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!$e(e)||fr(e))return;let r={v:e,i:t,n:this.norm.get(e)};this.records.push(r)}_addObject(e,t){let r={i:t,$:{}};this.keys.forEach((a,i)=>{let l=a.getFn?a.getFn(e):this.getFn(e,a.path);if($e(l)){if(Re(l)){let s=[],u=[{nestedArrIndex:-1,value:l}];for(;u.length;){let{nestedArrIndex:o,value:p}=u.pop();if($e(p))if(Te(p)&&!fr(p)){let m={v:p,i:o,n:this.norm.get(p)};s.push(m)}else Re(p)&&p.forEach((m,d)=>{u.push({nestedArrIndex:d,value:m})})}r.$[i]=s}else if(Te(l)&&!fr(l)){let s={v:l,n:this.norm.get(l)};r.$[i]=s}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function kn(n,e,{getFn:t=W.getFn,fieldNormWeight:r=W.fieldNormWeight}={}){let a=new mr({getFn:t,fieldNormWeight:r});return a.setKeys(n.map(xn)),a.setSources(e),a.create(),a}function Xi(n,{getFn:e=W.getFn,fieldNormWeight:t=W.fieldNormWeight}={}){let{keys:r,records:a}=n,i=new mr({getFn:e,fieldNormWeight:t});return i.setKeys(r),i.setIndexRecords(a),i}function jt(n,{errors:e=0,currentLocation:t=0,expectedLocation:r=0,distance:a=W.distance,ignoreLocation:i=W.ignoreLocation}={}){let l=e/n.length;if(i)return l;let s=Math.abs(r-t);return a?l+s/a:s?1:l}function Ki(n=[],e=W.minMatchCharLength){let t=[],r=-1,a=-1,i=0;for(let l=n.length;i<l;i+=1){let s=n[i];s&&r===-1?r=i:s||r===-1||((a=i-1)-r+1>=e&&t.push([r,a]),r=-1)}return n[i-1]&&i-r>=e&&t.push([r,i-1]),t}let Ve=32;function Zi(n,e,t,{location:r=W.location,distance:a=W.distance,threshold:i=W.threshold,findAllMatches:l=W.findAllMatches,minMatchCharLength:s=W.minMatchCharLength,includeMatches:u=W.includeMatches,ignoreLocation:o=W.ignoreLocation}={}){let p;if(e.length>Ve)throw Error(Wi(Ve));let m=e.length,d=n.length,y=Math.max(0,Math.min(r,d)),f=i,S=y,v=s>1||u,w=v?Array(d):[];for(;(p=n.indexOf(e,S))>-1;)if(f=Math.min(jt(e,{currentLocation:p,expectedLocation:y,distance:a,ignoreLocation:o}),f),S=p+m,v){let P=0;for(;P<m;)w[p+P]=1,P+=1}S=-1;let g=[],_=1,$=m+d,x=1<<m-1;for(let P=0;P<m;P+=1){let D=0,R=$;for(;D<R;)jt(e,{errors:P,currentLocation:y+R,expectedLocation:y,distance:a,ignoreLocation:o})<=f?D=R:$=R,R=Math.floor(($-D)/2+D);$=R;let I=Math.max(1,y-R+1),F=l?d:Math.min(y+R,d)+m,C=Array(F+2);C[F+1]=(1<<P)-1;for(let B=F;B>=I;B-=1){let V=B-1,X=t[n.charAt(V)];if(v&&(w[V]=+!!X),C[B]=(C[B+1]<<1|1)&X,P&&(C[B]|=(g[B+1]|g[B])<<1|1|g[B+1]),C[B]&x&&(_=jt(e,{errors:P,currentLocation:V,expectedLocation:y,distance:a,ignoreLocation:o}))<=f){if(f=_,(S=V)<=y)break;I=Math.max(1,2*y-S)}}if(jt(e,{errors:P+1,currentLocation:y,expectedLocation:y,distance:a,ignoreLocation:o})>f)break;g=C}let T={isMatch:S>=0,score:Math.max(.001,_)};if(v){let P=Ki(w,s);P.length?u&&(T.indices=P):T.isMatch=!1}return T}function es(n){let e={};for(let t=0,r=n.length;t<r;t+=1){let a=n.charAt(t);e[a]=(e[a]||0)|1<<r-t-1}return e}class An{constructor(e,{location:t=W.location,threshold:r=W.threshold,distance:a=W.distance,includeMatches:i=W.includeMatches,findAllMatches:l=W.findAllMatches,minMatchCharLength:s=W.minMatchCharLength,isCaseSensitive:u=W.isCaseSensitive,ignoreLocation:o=W.ignoreLocation}={}){if(this.options={location:t,threshold:r,distance:a,includeMatches:i,findAllMatches:l,minMatchCharLength:s,isCaseSensitive:u,ignoreLocation:o},this.pattern=u?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;let p=(d,y)=>{this.chunks.push({pattern:d,alphabet:es(d),startIndex:y})},m=this.pattern.length;if(m>Ve){let d=0,y=m%Ve,f=m-y;for(;d<f;)p(this.pattern.substr(d,Ve),d),d+=Ve;if(y){let S=m-Ve;p(this.pattern.substr(S),S)}}else p(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,includeMatches:r}=this.options;if(t||(e=e.toLowerCase()),this.pattern===e){let f={isMatch:!0,score:0};return r&&(f.indices=[[0,e.length-1]]),f}let{location:a,distance:i,threshold:l,findAllMatches:s,minMatchCharLength:u,ignoreLocation:o}=this.options,p=[],m=0,d=!1;this.chunks.forEach(({pattern:f,alphabet:S,startIndex:v})=>{let{isMatch:w,score:g,indices:_}=Zi(e,f,S,{location:a+v,distance:i,threshold:l,findAllMatches:s,minMatchCharLength:u,includeMatches:r,ignoreLocation:o});w&&(d=!0),m+=g,w&&_&&(p=[...p,..._])});let y={isMatch:d,score:d?m/this.chunks.length:1};return d&&r&&(y.indices=p),y}}class Be{constructor(e){this.pattern=e}static isMultiMatch(e){return In(e,this.multiRegex)}static isSingleMatch(e){return In(e,this.singleRegex)}search(){}}function In(n,e){let t=n.match(e);return t?t[1]:null}class ts extends Be{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class rs extends Be{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let t=e.indexOf(this.pattern)===-1;return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class ns extends Be{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\\^"(.*)"$/}static get singleRegex(){return/^\\^(.*)$/}search(e){let t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class as extends Be{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\\^"(.*)"$/}static get singleRegex(){return/^!\\^(.*)$/}search(e){let t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class is extends Be{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\\$$/}static get singleRegex(){return/^(.*)\\$$/}search(e){let t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class ss extends Be{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\\$$/}static get singleRegex(){return/^!(.*)\\$$/}search(e){let t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class On extends Be{constructor(e,{location:t=W.location,threshold:r=W.threshold,distance:a=W.distance,includeMatches:i=W.includeMatches,findAllMatches:l=W.findAllMatches,minMatchCharLength:s=W.minMatchCharLength,isCaseSensitive:u=W.isCaseSensitive,ignoreLocation:o=W.ignoreLocation}={}){super(e),this._bitapSearch=new An(e,{location:t,threshold:r,distance:a,includeMatches:i,findAllMatches:l,minMatchCharLength:s,isCaseSensitive:u,ignoreLocation:o})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class jn extends Be{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,r=0,a=[],i=this.pattern.length;for(;(t=e.indexOf(this.pattern,r))>-1;)r=t+i,a.push([t,r-1]);let l=!!a.length;return{isMatch:l,score:l?0:1,indices:a}}}let gr=[ts,jn,ns,as,ss,is,rs,On],Tn=gr.length,os=/ +(?=(?:[^\\"]*\\"[^\\"]*\\")*[^\\"]*$)/,ls="|";function cs(n,e={}){return n.split(ls).map(t=>{let r=t.trim().split(os).filter(i=>i&&!!i.trim()),a=[];for(let i=0,l=r.length;i<l;i+=1){let s=r[i],u=!1,o=-1;for(;!u&&++o<Tn;){let p=gr[o],m=p.isMultiMatch(s);m&&(a.push(new p(m,e)),u=!0)}if(!u)for(o=-1;++o<Tn;){let p=gr[o],m=p.isSingleMatch(s);if(m){a.push(new p(m,e));break}}}return a})}let us=new Set([On.type,jn.type]);class ps{constructor(e,{isCaseSensitive:t=W.isCaseSensitive,includeMatches:r=W.includeMatches,minMatchCharLength:a=W.minMatchCharLength,ignoreLocation:i=W.ignoreLocation,findAllMatches:l=W.findAllMatches,location:s=W.location,threshold:u=W.threshold,distance:o=W.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:r,minMatchCharLength:a,findAllMatches:l,ignoreLocation:i,location:s,threshold:u,distance:o},this.pattern=t?e:e.toLowerCase(),this.query=cs(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:r,isCaseSensitive:a}=this.options;e=a?e:e.toLowerCase();let i=0,l=[],s=0;for(let u=0,o=t.length;u<o;u+=1){let p=t[u];l.length=0,i=0;for(let m=0,d=p.length;m<d;m+=1){let y=p[m],{isMatch:f,indices:S,score:v}=y.search(e);if(f){if(i+=1,s+=v,r){let w=y.constructor.type;us.has(w)?l=[...l,...S]:l.push(S)}}else{s=0,i=0,l.length=0;break}}if(i){let m={isMatch:!0,score:s/i};return r&&(m.indices=l),m}}return{isMatch:!1,score:1}}}let yr=[];function ds(...n){yr.push(...n)}function _r(n,e){for(let t=0,r=yr.length;t<r;t+=1){let a=yr[t];if(a.condition(n,e))return new a(n,e)}return new An(n,e)}let Tt={AND:"$and",OR:"$or"},br={PATH:"$path",PATTERN:"$val"},vr=n=>!!(n[Tt.AND]||n[Tt.OR]),fs=n=>!!n[br.PATH],hs=n=>!Re(n)&&wn(n)&&!vr(n),Pn=n=>({[Tt.AND]:Object.keys(n).map(e=>({[e]:n[e]}))});function Cn(n,e,{auto:t=!0}={}){let r=a=>{let i=Object.keys(a),l=fs(a);if(!l&&i.length>1&&!vr(a))return r(Pn(a));if(hs(a)){let u=l?a[br.PATH]:i[0],o=l?a[br.PATTERN]:a[u];if(!Te(o))throw Error(Gi(u));let p={keyId:hr(u),pattern:o};return t&&(p.searcher=_r(o,e)),p}let s={children:[],operator:i[0]};return i.forEach(u=>{let o=a[u];Re(o)&&o.forEach(p=>{s.children.push(r(p))})}),s};return vr(n)||(n=Pn(n)),r(n)}function ms(n,{ignoreFieldNorm:e=W.ignoreFieldNorm}){n.forEach(t=>{let r=1;t.matches.forEach(({key:a,norm:i,score:l})=>{let s=a?a.weight:null;r*=Math.pow(l===0&&s?Number.EPSILON:l,(s||1)*(e?1:i))}),t.score=r})}function gs(n,e){let t=n.matches;e.matches=[],$e(t)&&t.forEach(r=>{if(!$e(r.indices)||!r.indices.length)return;let{indices:a,value:i}=r,l={indices:a,value:i};r.key&&(l.key=r.key.src),r.idx>-1&&(l.refIndex=r.idx),e.matches.push(l)})}function ys(n,e){e.score=n.score}function _s(n,e,{includeMatches:t=W.includeMatches,includeScore:r=W.includeScore}={}){let a=[];return t&&a.push(gs),r&&a.push(ys),n.map(i=>{let{idx:l}=i,s={item:e[l],refIndex:l};return a.length&&a.forEach(u=>{u(i,s)}),s})}class Ke{constructor(e,t={},r){this.options={...W,...t},this.options.useExtendedSearch,this._keyStore=new Vi(this.options.keys),this.setCollection(e,r)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof mr))throw Error(Ui);this._myIndex=t||kn(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){$e(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){let t=[];for(let r=0,a=this._docs.length;r<a;r+=1){let i=this._docs[r];e(i,r)&&(this.removeAt(r),r-=1,a-=1,t.push(i))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){let{includeMatches:r,includeScore:a,shouldSort:i,sortFn:l,ignoreFieldNorm:s}=this.options,u=Te(e)?Te(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return ms(u,{ignoreFieldNorm:s}),i&&u.sort(l),vn(t)&&t>-1&&(u=u.slice(0,t)),_s(u,this._docs,{includeMatches:r,includeScore:a})}_searchStringList(e){let t=_r(e,this.options),{records:r}=this._myIndex,a=[];return r.forEach(({v:i,i:l,n:s})=>{if(!$e(i))return;let{isMatch:u,score:o,indices:p}=t.searchIn(i);u&&a.push({item:i,idx:l,matches:[{score:o,value:i,norm:s,indices:p}]})}),a}_searchLogical(e){let t=Cn(e,this.options),r=(s,u,o)=>{if(!s.children){let{keyId:m,searcher:d}=s,y=this._findMatches({key:this._keyStore.get(m),value:this._myIndex.getValueForItemAtKeyId(u,m),searcher:d});return y&&y.length?[{idx:o,item:u,matches:y}]:[]}let p=[];for(let m=0,d=s.children.length;m<d;m+=1){let y=r(s.children[m],u,o);if(y.length)p.push(...y);else if(s.operator===Tt.AND)return[]}return p},a=this._myIndex.records,i={},l=[];return a.forEach(({$:s,i:u})=>{if($e(s)){let o=r(t,s,u);o.length&&(i[u]||(i[u]={idx:u,item:s,matches:[]},l.push(i[u])),o.forEach(({matches:p})=>{i[u].matches.push(...p)}))}}),l}_searchObjectList(e){let t=_r(e,this.options),{keys:r,records:a}=this._myIndex,i=[];return a.forEach(({$:l,i:s})=>{if(!$e(l))return;let u=[];r.forEach((o,p)=>{u.push(...this._findMatches({key:o,value:l[p],searcher:t}))}),u.length&&i.push({idx:s,item:l,matches:u})}),i}_findMatches({key:e,value:t,searcher:r}){if(!$e(t))return[];let a=[];if(Re(t))t.forEach(({v:i,i:l,n:s})=>{if(!$e(i))return;let{isMatch:u,score:o,indices:p}=r.searchIn(i);u&&a.push({score:o,key:e,value:i,idx:l,norm:s,indices:p})});else{let{v:i,n:l}=t,{isMatch:s,score:u,indices:o}=r.searchIn(i);s&&a.push({score:u,key:e,value:i,norm:l,indices:o})}return a}}function bs(n,e){let[t,r,a]=n.split(":"),[i,l]=e.split(":"),s=6371,u=Pt(i-t),o=Pt(l-r),p=Math.sin(u/2)*Math.sin(u/2)+Math.cos(Pt(t))*Math.cos(Pt(i))*Math.sin(o/2)*Math.sin(o/2),m=2*Math.atan2(Math.sqrt(p),Math.sqrt(1-p))*s;return Number(a)>=m}function Pt(n){return Math.PI/180*n}function vs({type:n,date:e=0,match:t=!0}={},r){if(!r&&n)return!1;let a=new Date,i=!0;switch(n){case"day":let l=Ze(e),s=Ze(e+1);i=l<=r&&r<s;break;case"days":if(e<0){let d=Ze(1);i=Ze(-6)<=r&&r<d}else{let d=Ze(),y=Ze(7);i=d<=r&&r<y}break;case"day_week":i=e===new Date(r).getDay();break;case"week":let u=a.getDate()-a.getDay(),o=u+(e==-2?13:6),[p,m]=ws(a.setDate(u+7*e),new Date().setDate(o+7*e));i=p<=r&&r<=m;break;case"month":if(a.getFullYear()!==new Date(r).getFullYear())return!1;i=a.getMonth()+e===new Date(r).getMonth();break;case"year":i=a.getFullYear()+e===new Date(r).getFullYear();break;default:return!0}return t?i:!i}function ws(n,e){return[new Date(n),new Date(e)]}function Ze(n=0){let e=new Date;return new Date(e.getFullYear(),e.getMonth(),e.getDate()+n).valueOf()}function Nn(n,e){if(n&&n.length)return e?n.filter(t=>t.fields.find(r=>r.index_value&&r.index_value.toLowerCase().indexOf(e.toLowerCase())!==-1)):n}Ke.version="6.6.2",Ke.createIndex=kn,Ke.parseIndex=Xi,Ke.config=W,Ke.parseQuery=Cn,ds(ps);let Mn=new Ke([]);function $s(n,e){return Mn.setCollection(e),!!Mn.search(n).length}function Ss(n,e){let t=new Ts;return n&&n.length?t.filter(e,n):[]}class xs{changeBehavior(e){switch(e){case"contain_or":this._checkFn=function(t,r){return r.some(a=>t.some(i=>i.indexOf(a)!==-1))};break;case"contain_and":this._checkFn=function(t,r){return r.every(a=>t.some(i=>i.indexOf(a)!==-1))};break;case"not_contain_or":this._checkFn=function(t,r){return r.some(a=>t.every(i=>i.indexOf(a)===-1))};break;case"not_contain_and":this._checkFn=function(t,r){return r.every(a=>t.every(i=>i.indexOf(a)===-1))};break;case"equal_or":this._checkFn=function(t,r){return!!t.length&&t.some(a=>r.some(i=>a==i))};break;case"equal_and":this._checkFn=function(t,r){if(!t.length)return!1;let a=new Set(r);for(;t.length&&a.size;){let i=t.pop();a.has(i)&&a.delete(i)}return!a.size};break;case"not_equal_or":this._checkFn=function(t,r){if(!t.length)return!0;let a=new Set(r);for(;t.length&&a.size;){let i=t.pop();if(!a.has(i))return!0}return!1};break;case"not_equal_and":this._checkFn=function(t,r){let a=new Set(r);for(;t.length&&a.size;){let i=t.pop();if(a.has(i))return!1}return!0};break;case"bigger":this._checkFn=function(t,r){return r.some(a=>t.every(i=>i>a))};break;case"lower":this._checkFn=function(t,r){return r.some(a=>t.every(i=>i<a))};break;case"range":this._checkFn=function(t,r){return r.some(a=>t.every(i=>a.start<=i&&i<a.end))};break;case"value":this._checkFn=function(t,r){return r.some(a=>t.some(i=>i==a))};break;case"search":this._checkFn=function(t,r){return r.some(a=>$s(a,t))};break;case"phone_equal_or":this._checkFn=function(t,r){return!!t.length&&r.some(a=>t.some(i=>i.replace(/[^0-9]/g,"").indexOf(a.replace(/[^0-9]/g,""))!==-1))};break;case"distance":this._checkFn=function(t,r){return r.some(a=>t.some(i=>bs(a,i)))};break;case"date_in":case"date_out":this._checkFn=function(t,r){return r.some(a=>t.some(i=>vs(a,i)))};break;case"recurring_date":this._checkFn=function(t,r){return r.some(a=>t.some(i=>gudhub.checkRecurringDate(i,a)))}}return this}check(e){return this.changeBehavior(e.getCheckOption())._checkFn(e.getEntity(),e.getFilterValues())}}class wr{convert(e){return[Number(e)]}convertFilterValue(e){return Number(e)}}class Es extends wr{convertFilterValue(e){return{start:Number(e.split(":")[0]),end:Number(e.split(":")[1])}}}class ks{convert(e){return String(e??"").toLowerCase().split(",")}convertFilterValue(e){return e===0?"0":String(e||"").toLowerCase()}}class As extends wr{convertFilterValue(e){let[t,r,a]=e.split(":");return{type:t,date:Number(r),match:!!Number(a)}}}class Is{convert(e){return[String(!!e)]}convertFilterValue(e){return String(e)}}class Os{convert(e){return[Number(e)]}convertFilterValue(e){return String(e)}}class js{constructor(){this._strategies={stringStrategy:new ks,numberStrategy:new wr,booleanStrategy:new Is,rangeStrategy:new Es,dateStrategy:new As,recurringDateStrategy:new Os}}setStrategy(e){switch(this._checkOption=e,e){case"contain_or":case"contain_and":case"not_contain_or":case"not_contain_and":case"equal_or":case"equal_and":case"not_equal_or":case"not_equal_and":case"phone_equal_or":case"distance":case"search":this._currentStrategy=this._strategies.stringStrategy;break;case"bigger":case"lower":this._currentStrategy=this._strategies.numberStrategy;break;case"range":this._currentStrategy=this._strategies.rangeStrategy;break;case"date_in":case"date_out":this._currentStrategy=this._strategies.dateStrategy;break;case"value":this._currentStrategy=this._strategies.booleanStrategy;break;case"recurring_date":this._currentStrategy=this._strategies.recurringDateStrategy}return this}setEntity(e){return this._entity=this._currentStrategy.convert(e),this}getEntity(){return this._entity}setFilterValues(e){let t=Array.isArray(e)?e:[e];return this._filterValues=t.map(r=>this._currentStrategy.convertFilterValue(r)),this}getFilterValues(){return this._filterValues}getCheckOption(){return this._checkOption}}class Ts{constructor(){}filter(e,t){let r=this.checkIfAllFiltersHaveAndStrategy(e),a=[],i=e.filter(function(l){return l.valuesArray.length});for(let l of t){let s=!0;for(let u=0;u<i.length;u++){let o=i[u],p=l.fields.find(function(y){return o.field_id==y.field_id}),m=new js,d=new xs;switch(m.setStrategy(o.search_type).setEntity(p&&p.field_value!=null?p.field_value:null).setFilterValues(o.valuesArray),o.boolean_strategy){case"and":default:s=s&&d.check(m);break;case"or":s=s||d.check(m)}if(!s&&r)break}s&&a.push(l)}return a.length||e.length&&!a.length?a:t}checkIfAllFiltersHaveAndStrategy(e){return e.every(t=>!t.boolean_strategy||t.boolean_strategy=="and")}}function Ps(n,e){let t=[],r=[];if(n.length>0?n.forEach(a=>{r.push(a)}):r=e,r.length>0){r.forEach((a,i)=>{for(let l=0;l<e.length;l++)a.field_id==e[l].field_id&&(t.push(a.field_id),r[i]=gudhub.mergeObjects(e[l],a))});for(let a=0;a<e.length;a++)t.includes(e[a].field_id)||r.push(e[a])}return r}var $r={};function Cs(n,e){let t=[];return e.forEach(r=>{let a=[];try{a=G($r).paths(n,r.json_path),t.push({field_id:r.field_id,json_paths:a,json_paths_length:a.length})}catch(i){console.log(i)}}),t.sort((r,a)=>a.json_paths_length-r.json_paths_length),Ms(t).map(r=>({fields:r.fields.map(a=>({field_id:a.field_id,field_value:G($r).value(n,a.json_path)}))}))}function Ns(n,e){let t=[];return e.forEach(r=>{t.push({path_to_compare:r,match_coefficient:0})}),n.forEach((r,a)=>{for(var i=0;i<t.length;i++)t[i].path_to_compare[a]==r&&(t[i].match_coefficient+=1/(a+1))}),t.sort((r,a)=>a.match_coefficient-r.match_coefficient),t[0].path_to_compare}function Ms(n){let e=[];return n.length&&n[0].json_paths.forEach(t=>{let r={fields:[]};n.forEach(a=>{r.fields.push({field_id:a.field_id,json_path:Ns(t,a.json_paths)})}),e.push(r)}),e}function Rs(n,e,t,r,a,i){let l=[],s=function(u,o){let p=Je(o,a);p&&(p.field_value=i+"."+u.item_id,l.push(o))};return t.forEach(u=>{n.forEach(o=>{qs(o,u,e,r,s)})}),l}function Fs(n,e,t){let r=JSON.parse(JSON.stringify(n)),a=JSON.parse(JSON.stringify(e)),i=[],l=function(p,m){i.push(Ds(p,m))},s=function(p){i.push(p)},u=function(p){i.push(p)};return t?Rn(r,a,t,l,s,u):Fn(r,a,l,s,u,function(p){i.push(p)}),i}function Ls(n,e,t){let r=JSON.parse(JSON.stringify(n)),a=JSON.parse(JSON.stringify(e)),i={is_items_diff:!1,new_src_items:[],diff_src_items:[],same_items:[],trash_src_items:[]},l=function(p){i.diff_src_items.push(p)},s=function(p){i.same_items.push(p)},u=function(p){i.new_src_items.push(p)},o=function(p){i.trash_src_items.push(p)};return t&&Rn(r,a,t,l,s,u),t||Fn(r,a,l,s,u,null,o),i.is_items_diff=i.new_src_items.length>0||i.diff_src_items.length>0,i}function Ds(n,e){return n.fields.forEach(t=>{let r=Je(e,t.field_id);r?(r.field_value=t.field_value,t.history&&r.history&&(r.history=t.history.concat(r.history))):e.fields.push(t)}),e}function Rn(n,e,t,r,a,i){n.forEach(l=>{let s=!0,u=Je(l,t).field_value;e.forEach(o=>{u==Je(o,t).field_value&&(s=!1,Ln(l,o,r,a))}),s&&i(l)})}function Fn(n,e,t,r,a,i,l){let s=new Bs(e);if(n.forEach(u=>{let o=s.pullItemIndex(u.item_id);o!=null?Ln(u,e[o],t,r,l):(u.trash&&l(u),u.trash||a(u))}),i)for(let[u,o]of Object.entries(s.itemsMap))i(e[o])}function Ln(n,e,t,r,a){let i=!0;for(let l=0;l<n.fields.length;l++){let s=Je(e,n.fields[l].field_id);s?s.field_value!=n.fields[l].field_value&&(i=i&&!1):i=i&&!1}i&&(n.trash&&a(n,e),n.trash||r(n,e)),i||(n.trash&&a(n,e),n.trash||t(n,e))}function qs(n,e,t,r,a){Je(n,t).field_value==Je(e,r).field_value&&a(n,e)}function Je(n,e){let t=null;for(let r=0;r<n.fields.length;r++)e==n.fields[r].field_id&&(t=n.fields[r]);return t}(function(n){$r=n()})(function(){return function n(e,t,r){function a(s,u){if(!t[s]){if(!e[s]){var o=void 0;if(!u&&o)return o(s,!0);if(i)return i(s,!0);var p=Error("Cannot find module '"+s+"'");throw p.code="MODULE_NOT_FOUND",p}var m=t[s]={exports:{}};e[s][0].call(m.exports,function(d){return a(e[s][1][d]||d)},m,m.exports,n,e,t,r)}return t[s].exports}for(var i=void 0,l=0;l<r.length;l++)a(r[l]);return a}({"./aesprim":[function(n,e,t){(function(r,a){a(t!==void 0?t:r.esprima={})})(this,function(r){var a,i,l,s,u,o,p,m,d,y,f,S,v,w,g,_,$,x;function T(c,h){if(!c)throw Error("ASSERT: "+h)}function P(c){return c>=48&&c<=57}function D(c){return"0123456789abcdefABCDEF".indexOf(c)>=0}function R(c){return"01234567".indexOf(c)>=0}function I(c){return c===32||c===9||c===11||c===12||c===160||c>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(c)>=0}function F(c){return c===10||c===13||c===8232||c===8233}function C(c){return c==64||c===36||c===95||c>=65&&c<=90||c>=97&&c<=122||c===92||c>=128&&p.NonAsciiIdentifierStart.test(String.fromCharCode(c))}function B(c){return c===36||c===95||c>=65&&c<=90||c>=97&&c<=122||c>=48&&c<=57||c===92||c>=128&&p.NonAsciiIdentifierPart.test(String.fromCharCode(c))}function V(c){switch(c){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0;default:return!1}}function X(c){switch(c){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}}function le(c){return c==="eval"||c==="arguments"}function ve(c){if(y&&X(c))return!0;switch(c.length){case 2:return c==="if"||c==="in"||c==="do";case 3:return c==="var"||c==="for"||c==="new"||c==="try"||c==="let";case 4:return c==="this"||c==="else"||c==="case"||c==="void"||c==="with"||c==="enum";case 5:return c==="while"||c==="break"||c==="catch"||c==="throw"||c==="const"||c==="yield"||c==="class"||c==="super";case 6:return c==="return"||c==="typeof"||c==="delete"||c==="switch"||c==="export"||c==="import";case 7:return c==="default"||c==="finally"||c==="extends";case 8:return c==="function"||c==="continue"||c==="debugger";case 10:return c==="instanceof";default:return!1}}function H(c,h,b,E,j){var M;T(typeof b=="number","Comment must have valid position"),!($.lastCommentStart>=b)&&($.lastCommentStart=b,M={type:c,value:h},x.range&&(M.range=[b,E]),x.loc&&(M.loc=j),x.comments.push(M),x.attachComment&&(x.leadingComments.push(M),x.trailingComments.push(M)))}function ie(c){var h,b,E,j;for(h=f-c,b={start:{line:S,column:f-v-c}};f<w;)if(E=d.charCodeAt(f),++f,F(E)){x.comments&&(j=d.slice(h+c,f-1),b.end={line:S,column:f-v-1},H("Line",j,h,f-1,b)),E===13&&d.charCodeAt(f)===10&&++f,++S,v=f;return}x.comments&&(j=d.slice(h+c,f),b.end={line:S,column:f-v},H("Line",j,h,f,b))}function ee(){var c,h,b,E;for(x.comments&&(c=f-2,h={start:{line:S,column:f-v-2}});f<w;)if(F(b=d.charCodeAt(f)))b===13&&d.charCodeAt(f+1)===10&&++f,++S,v=++f,f>=w&&Q({},o.UnexpectedToken,"ILLEGAL");else if(b===42){if(d.charCodeAt(f+1)===47){++f,++f,x.comments&&(E=d.slice(c+2,f-2),h.end={line:S,column:f-v},H("Block",E,c,f,h));return}++f}else++f;Q({},o.UnexpectedToken,"ILLEGAL")}function k(){var c,h;for(h=f===0;f<w;)if(I(c=d.charCodeAt(f)))++f;else if(F(c))++f,c===13&&d.charCodeAt(f)===10&&++f,++S,v=f,h=!0;else if(c===47)if((c=d.charCodeAt(f+1))===47)++f,++f,ie(2),h=!0;else if(c===42)++f,++f,ee();else break;else if(h&&c===45)if(d.charCodeAt(f+1)===45&&d.charCodeAt(f+2)===62)f+=3,ie(3);else break;else if(c===60)if(d.slice(f+1,f+4)==="!--")++f,++f,++f,++f,ie(4);else break;else break}function O(c){var h,b,E,j=0;for(h=0,b=c==="u"?4:2;h<b;++h){if(!(f<w&&D(d[f])))return"";E=d[f++],j=16*j+"0123456789abcdef".indexOf(E.toLowerCase())}return String.fromCharCode(j)}function N(){var c,h;for(h=String.fromCharCode(c=d.charCodeAt(f++)),c===92&&(d.charCodeAt(f)!==117&&Q({},o.UnexpectedToken,"ILLEGAL"),++f,(c=O("u"))&&c!=="\\\\"&&C(c.charCodeAt(0))||Q({},o.UnexpectedToken,"ILLEGAL"),h=c);f<w&&B(c=d.charCodeAt(f));)++f,h+=String.fromCharCode(c),c===92&&(h=h.substr(0,h.length-1),d.charCodeAt(f)!==117&&Q({},o.UnexpectedToken,"ILLEGAL"),++f,(c=O("u"))&&c!=="\\\\"&&B(c.charCodeAt(0))||Q({},o.UnexpectedToken,"ILLEGAL"),h+=c);return h}function K(){var c,h;for(c=f++;f<w;){if((h=d.charCodeAt(f))===92)return f=c,N();if(B(h))++f;else break}return d.slice(c,f)}function se(){var c,h;return c=f,{type:(h=d.charCodeAt(f)===92?N():K()).length===1?a.Identifier:ve(h)?a.Keyword:h==="null"?a.NullLiteral:h==="true"||h==="false"?a.BooleanLiteral:a.Identifier,value:h,lineNumber:S,lineStart:v,start:c,end:f}}function te(){var c,h,b,E,j=f,M=d.charCodeAt(f),z=d[f];switch(M){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++f,x.tokenize&&(M===40?x.openParenToken=x.tokens.length:M===123&&(x.openCurlyToken=x.tokens.length)),{type:a.Punctuator,value:String.fromCharCode(M),lineNumber:S,lineStart:v,start:j,end:f};default:if((c=d.charCodeAt(f+1))===61)switch(M){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return f+=2,{type:a.Punctuator,value:String.fromCharCode(M)+String.fromCharCode(c),lineNumber:S,lineStart:v,start:j,end:f};case 33:case 61:return f+=2,d.charCodeAt(f)===61&&++f,{type:a.Punctuator,value:d.slice(j,f),lineNumber:S,lineStart:v,start:j,end:f}}}return(E=d.substr(f,4))===">>>="?(f+=4,{type:a.Punctuator,value:E,lineNumber:S,lineStart:v,start:j,end:f}):(b=E.substr(0,3))===">>>"||b==="<<="||b===">>="?(f+=3,{type:a.Punctuator,value:b,lineNumber:S,lineStart:v,start:j,end:f}):z===(h=b.substr(0,2))[1]&&"+-<>&|".indexOf(z)>=0||h==="=>"?(f+=2,{type:a.Punctuator,value:h,lineNumber:S,lineStart:v,start:j,end:f}):"<>=!+-*%&|^/".indexOf(z)>=0?(++f,{type:a.Punctuator,value:z,lineNumber:S,lineStart:v,start:j,end:f}):void Q({},o.UnexpectedToken,"ILLEGAL")}function J(c){for(var h="";f<w&&D(d[f]);)h+=d[f++];return h.length===0&&Q({},o.UnexpectedToken,"ILLEGAL"),C(d.charCodeAt(f))&&Q({},o.UnexpectedToken,"ILLEGAL"),{type:a.NumericLiteral,value:parseInt("0x"+h,16),lineNumber:S,lineStart:v,start:c,end:f}}function ce(c){for(var h="0"+d[f++];f<w&&R(d[f]);)h+=d[f++];return(C(d.charCodeAt(f))||P(d.charCodeAt(f)))&&Q({},o.UnexpectedToken,"ILLEGAL"),{type:a.NumericLiteral,value:parseInt(h,8),octal:!0,lineNumber:S,lineStart:v,start:c,end:f}}function re(){var c,h,b;if(T(P((b=d[f]).charCodeAt(0))||b===".","Numeric literal must start with a decimal digit or a decimal point"),h=f,c="",b!=="."){if(c=d[f++],b=d[f],c==="0"){if(b==="x"||b==="X")return++f,J(h);if(R(b))return ce(h);b&&P(b.charCodeAt(0))&&Q({},o.UnexpectedToken,"ILLEGAL")}for(;P(d.charCodeAt(f));)c+=d[f++];b=d[f]}if(b==="."){for(c+=d[f++];P(d.charCodeAt(f));)c+=d[f++];b=d[f]}if(b==="e"||b==="E")if(c+=d[f++],((b=d[f])==="+"||b==="-")&&(c+=d[f++]),P(d.charCodeAt(f)))for(;P(d.charCodeAt(f));)c+=d[f++];else Q({},o.UnexpectedToken,"ILLEGAL");return C(d.charCodeAt(f))&&Q({},o.UnexpectedToken,"ILLEGAL"),{type:a.NumericLiteral,value:parseFloat(c),lineNumber:S,lineStart:v,start:h,end:f}}function fe(){var c,h,b,E,j,M,z,pe,ae="",_e=!1;for(z=S,pe=v,T((c=d[f])==="'"||c==='"',"String literal must starts with a quote"),h=f,++f;f<w;){if((b=d[f++])===c){c="";break}if(b==="\\\\")if((b=d[f++])&&F(b.charCodeAt(0)))++S,b==="\\r"&&d[f]===\`
|
|
97
|
+
});`}function compiler(n,e,t,r,i){async function a(h,y,m){let v=null;if(h.type==="array"&&(Number(h.is_static)?v=new Array(await u(h.childs,y,m)):v=await s(h,y,m)),h.type==="object"&&(Number(h.current_item)?v=await l(h,y):v=await u(h.childs,y,m)),h.type==="property"&&(v=await o(h,y,m)),typeof h=="object"&&typeof h.type>"u"){const p={};for(const E in h)if(h.hasOwnProperty(E)){const S=h[E],w=await a(S,y,m);p[E]=w[S.property_name]}return p}return{[h.property_name]:v}}async function s(h,y,m){const v=await t.gudhub.getApp(Number(h.app_id));let p=await d(h.filter,v.items_list,m,y);if(h.isSortable&&h.field_id_to_sort&&h.field_id_to_sort!==""){let S=p.flatMap(g=>{let b=g.fields.find(A=>A.field_id==h.field_id_to_sort);return!b||b.field_value==""?[]:g}),w=p.filter(g=>{if(!S.includes(g))return g});S=S.sort((g,b)=>h.sortType=="desc"?b.fields.find(A=>A.field_id==h.field_id_to_sort).field_value-g.fields.find(A=>A.field_id==h.field_id_to_sort).field_value:g.fields.find(A=>A.field_id==h.field_id_to_sort).field_value-b.fields.find(A=>A.field_id==h.field_id_to_sort).field_value),p=[...S,...w]}if(h.offset){let S;h.use_variables_for_limit_and_offset&&r?S=r[h.offset]:S=/^[0-9]+$/.test(h.offset)?h.offset:0,p=p.slice(S)}if(h.limit){let S;h.use_variables_for_limit_and_offset&&r?S=r[h.limit]:S=/^[0-9]+$/.test(h.limit)||0,S!==0&&(p=p.slice(0,S))}const E=p.map(async S=>u(h.childs,S,v.app_id));return Promise.all(E)}async function l(h,y){const m=await t.gudhub.getApp(h.app_id),v=m.items_list||[];return u(h.childs,y||v[0],m.app_id)}async function u(h,y,m){const v=await h.map(async E=>a(E,y,m));return(await Promise.all(v)).reduce((E,S)=>_objectSpread2(_objectSpread2({},E),S),{})}async function o(h,y,m){switch(h.property_type){case"static":return h.static_field_value;case"variable":switch(h.variable_type){case"app_id":return m;case"current_item":default:return"".concat(m,".").concat(y.item_id)}case"field_id":return h.field_id;case"function":return typeof h.function=="function"?h.function(y,m,t.gudhub,...h.args):await new Function("item, appId, gudhub","return (async "+h.function+")(item, appId, gudhub)")(y,m,t.gudhub);case"field_value":default:return!h.field_id&&h.name_space&&(h.field_id=await t.gudhub.getFieldIdByNameSpace(m,h.name_space)),Number(h.interpretation)?await t.gudhub.getInterpretationById(Number(m),Number(y.item_id),Number(h.field_id),"value"):await t.gudhub.getFieldValue(Number(m),Number(y.item_id),Number(h.field_id))}}async function f(h,y,m,v,p){const E=await t.gudhub.prefilter(JSON.parse(JSON.stringify(h)),_objectSpread2({element_app_id:y,app_id:m,item_id:v},r));return t.gudhub.filter(p,[...E,...h])}async function d(){let h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return h.length?f(h,m,m,v.item_id,y):[...y]}return a(n,e,i)}class AppsTemplateService{constructor(e){this.gudhub=e,this.appsConnectingMap={apps:[],fields:[],items:[],views:[]}}createAppsFromTemplate(e,t,r,i){const a=this;return new Promise(s=>{const u=100/(e.apps.length*6);let o=0;a.createApps(e,f=>{o+=1,r&&r.call(this,{percent:o*u,status:f})},i).then(f=>{a.createItems(f,t,d=>{typeof d=="string"?(o+=1,r&&r.call(this,{percent:o*u,status:d})):typeof d=="object"&&(r&&r.call(this,{status:"Done",apps:d}),s())},i)})})}createItems(e,t,r,i){return new Promise(async a=>{const s=t||1e5,l=this;let u=[],o=[];const{accesstoken:f}=await l.gudhub.req.axiosRequest({method:"POST",url:"https://gudhub.com/GudHub_Test/auth/login",form:{auth_key:"3HMOtCbC0M/1/1e4y4Uxo/Kh/aFN4V5LG2//5ixx7TZyiUfMb7IHAAHCj9PsLrOSDrZuuWkbX4BIX23f51H+eA=="}});e.forEach(d=>{o.push(new Promise(async h=>{let y;i?y=await l.gudhub.req.axiosRequest({url:"https://gudhub.com/GudHub_Test/api/app/get?token=".concat(f,"&app_id=").concat(l._searchOldAppId(d.app_id,l.appsConnectingMap.apps)),method:"GET"}):y=await l.gudhub.getApp(l._searchOldAppId(d.app_id,l.appsConnectingMap.apps)),r&&r.call(this,"GET APP: ".concat(y.app_name," (Items steps)"));let m=JSON.parse(JSON.stringify(y)),v=m.items_list.map(p=>({index_number:p.index_number,item_id:0,fields:[]})).filter((p,E)=>E<=s);l.gudhub.addNewItems(d.app_id,v).then(p=>{r&&r.call(this,"ADD NEW ITEMS: ".concat(y.app_name," (Items steps)")),d.items_list=p,l._updateMap(d.items_list,m.items_list),l._addFieldValue(m.items_list,d.items_list,l.appsConnectingMap),u.push(d),h()})}))}),Promise.all(o).then(()=>{u.forEach(d=>{d.items_list.forEach(h=>{h.fields.forEach(y=>{l.appsConnectingMap.fields.forEach(m=>{y.field_id===m.old_field_id&&(y.field_id=m.new_field_id,y.element_id=m.new_field_id)})})})}),l.deleteField(u),l.replaceValue(u,l.appsConnectingMap).then(()=>{const d=[];u.forEach(h=>{d.push(new Promise(y=>{let m=h.items_list.map(v=>(v.fields.forEach(p=>{delete p.data_id}),v));l.gudhub.updateItems(h.app_id,m).then(()=>{r&&r.call(this,"REPLACE VALUE: ".concat(h.app_name," (Items steps)")),y()})}))}),Promise.all(d).then(()=>{r.call(this,u),a()})})})})}deleteField(e){e.forEach(t=>{t.items_list.forEach(r=>{r.fields=r.fields.filter(i=>t.field_list.findIndex(a=>a.field_id==i.field_id)>-1)})})}replaceValue(e,t){return new Promise(async r=>{const i=[],a=this;e.forEach(s=>{s.field_list.forEach(l=>{l.data_type==="item_ref"&&a._replaceValueItemRef(s,l,t),i.push(new Promise(u=>{a.gudhub.ghconstructor.getInstance(l.data_type).then(o=>{if(typeof o>"u"){console.log("ERROR WHILE GETTING INSTANCE OF ",l.data_type),u({type:l.data_type});return}if(o.getTemplate().constructor=="file")return a.gudhub.util.fileInstallerHelper(s.app_id,s.items_list,l.field_id).then(f=>{u(f)});o.getTemplate().constructor=="document"?a.documentInstallerHelper(s.app_id,s.items_list,l.field_id).then(f=>{u(o)}):u(o)})}))})}),i.length>0?Promise.all(i).then(s=>{r(s)}):r(result)})}documentInstallerHelper(e,t,r){const i=this,a=[];return new Promise(async s=>{for(const l of t){const u=l.item_id,o=l.fields.find(f=>f.element_id===r);if(o&&o.field_value&&o.field_value.length>0){const f=await i.gudhub.getDocument({_id:o.field_value});if(f&&f.data){const d=await i.gudhub.createDocument({app_id:e,item_id:u,element_id:r,data:f.data});o.field_value=d._id,a.push(l)}}}s(a)})}_replaceValueItemRef(e,t,r){e.items_list.forEach(i=>{i.fields.forEach(a=>{if(a.field_id===t.field_id&&a.field_value){let s=a.field_value.split(",");s.forEach((l,u)=>{let o=l.split(".");r.apps.forEach(f=>{o[0]==f.old_app_id&&(o[0]=f.new_app_id)}),r.items.forEach(f=>{o[1]==f.old_item_id&&(o[1]=f.new_item_id)}),s[u]=o.join(".")}),a.field_value=s.join(",")}})})}_addFieldValue(e,t,r){t.forEach(i=>{r.items.forEach(a=>{i.item_id===a.new_item_id&&e.forEach(s=>{a.old_item_id===s.item_id&&(i.fields=s.fields)})})})}_updateMap(e,t){t.forEach(r=>{e.forEach(i=>{r.index_number===i.index_number&&this.appsConnectingMap.items.push({old_item_id:r.item_id,new_item_id:i.item_id})})})}_searchOldAppId(e,t){let r=0;return t.forEach(i=>{i.new_app_id===e&&(r=i.old_app_id)}),r}createApps(e,t,r){const i=this;let a={step_size:100/(e.apps.length*3),apps:[]};return new Promise(async s=>{let l={},u=[],o=[];const{accesstoken:f}=await i.gudhub.req.axiosRequest({method:"POST",url:"https://gudhub.com/GudHub_Test/auth/login",form:{auth_key:"3HMOtCbC0M/1/1e4y4Uxo/Kh/aFN4V5LG2//5ixx7TZyiUfMb7IHAAHCj9PsLrOSDrZuuWkbX4BIX23f51H+eA=="}});for(const d of e.apps){let h;r?h=await i.gudhub.req.axiosRequest({url:"https://gudhub.com/GudHub_Test/api/app/get?token=".concat(f,"&app_id=").concat(d),method:"GET"}):h=await i.gudhub.getApp(d),t&&t.call(this,"GET APP: ".concat(h.app_name," (App steps)"));let y=JSON.parse(JSON.stringify(h));l[y.app_id]=y,a.apps.push(y.icon);let m=i.prepareAppTemplate(y);m.app_name=m.app_name+" New",m.privacy=1,e.data_to_change&&(e.data_to_change.name&&(m.app_name=e.data_to_change.name),e.data_to_change.icon&&(m.icon=e.data_to_change.icon)),i.resetViewsIds(m),i.gudhub.createNewApp(m).then(v=>{t&&t.call(this,"CREATE NEW APP: ".concat(h.app_name," (App steps)")),u.push(v),i.mapApp(y,v,i.appsConnectingMap),e.apps.length==u.length&&(i.connectApps(u,i.appsConnectingMap,l),u.forEach(p=>{i.gudhub.updateApp(p).then(E=>{t&&t.call(this,"UPDATE APP: ".concat(h.app_name," (App steps)")),o.push(E),e.apps.length==o.length&&s(o)})}))})}})}mapApp(e,t,r){r.apps.push({old_app_id:e.app_id,new_app_id:t.app_id,old_view_init:e.view_init,new_view_init:t.view_init}),e.field_list.forEach(i=>{t.field_list.forEach(a=>{i.name_space==a.name_space&&r.fields.push({name_space:i.name_space,old_field_id:i.field_id,new_field_id:a.field_id})})}),e.views_list.forEach(i=>{t.views_list.forEach(a=>{i.name==a.name&&r.views.push({name:i.name,old_view_id:i.view_id,new_view_id:a.view_id})})})}crawling(e,t){let r=e===null?[]:Object.keys(e);const i=this;r.length>0&&r.forEach(a=>{let s=e[a];typeof s<"u"&&typeof e!="string"&&(t(a,s,e),i.crawling(s,t))})}resetViewsIds(e){e.view_init=0,this.crawling(e.views_list,function(t,r,i){(t=="view_id"||t=="container_id")&&(i[t]=0)})}connectApps(e,t,r){const i=this;return e.forEach(a=>{t.apps.forEach(s=>{a.view_init===s.new_view_init&&t.views.forEach(l=>{s.old_view_init===l.old_view_id&&(a.view_init=l.new_view_id)})}),i.crawling(a.field_list,function(s,l,u){if(s.indexOf("field_id")!==-1||s.indexOf("FieldId")!==-1||s.indexOf("destination_field")!==-1){let o=String(l).split(","),f=[];t.fields.forEach(d=>{o.forEach(h=>{h==d.old_field_id&&f.push(d.new_field_id)})}),f.length&&(u[s]=f.join(","))}if((s.indexOf("app_id")!=-1||s.indexOf("AppId")!=-1||s.indexOf("destination_app")!=-1)&&t.apps.forEach(o=>{l==o.old_app_id&&(u[s]=o.new_app_id)}),s.indexOf("view_id")!==-1&&t.views.forEach(o=>{l==o.old_view_id&&(u[s]=o.new_view_id)}),s.indexOf("src")!==-1&&isFinite(l)){const o="container_id",f=t.apps.find(h=>h.new_app_id===a.app_id).old_app_id,d=i.findPath(r[f].views_list,o,l);u[s]="".concat(i.getValueByPath(a.views_list,d,o))}if(s.indexOf("trigger")!==-1&&l.model&&l.model.nodes){const o=l.model.nodes,f=["inputs","outputs"];for(const d in o)f.forEach(h=>{const y=o[d];Object.keys(y[h]).filter(v=>v!==""&&!isNaN(v)).forEach(v=>{const p=t.fields.filter(E=>E.old_field_id==v);if(p.length!==0&&p[0].new_field_id){const E=p[0].new_field_id.toString(),S=y[h][v];S.connections.forEach(w=>{w.input==v&&(w.input=E),w.output==v&&(w.output=E)}),delete y[h][v],y[h][E]=S}})})}})}),e}getValueByPath(e,t,r){let i=e;return t.split(".").forEach(a=>{i=i[a]}),i[r]}findPath(e,t,r){const i=this;let a=!1,s=!1,l=[];return i.crawling(e,function(u,o,f){s&&l.reverse().forEach(d=>{s&&(d.delete=!0,d.parent===f&&(s=!1,l=l.filter(h=>!h.delete),l.reverse()))}),a||(typeof f[u]=="object"&&l.push({prop:u,parent:f}),o==r&&t===u?a=!0:Object.keys(f).pop()===u&&typeof f[u]!="object"&&(s=!0))}),l.map(u=>u.prop).join(".")}prepareAppTemplate(e){const t=this;let r=JSON.parse(JSON.stringify(e));return t.crawling(r.views_list,function(i,a,s){i=="element_id"&&(s.element_id=-Number(a),s.create_element=-Number(a))}),r.field_list.forEach(i=>{i.create_field=-Number(i.field_id),i.element_id=-Number(i.field_id),i.field_id=-Number(i.field_id),i.field_value=""}),r.items_list=[],delete r.app_id,delete r.icon.id,delete r.group_id,delete r.trash,delete r.last_update,delete r.file_list,r}}class FileHelper{constructor(e){this.gudhub=e}fileInstallerHelper(e,t,r){const i=this;return new Promise(a=>{const s=[[]];let l=Promise.resolve(),u=[];t.forEach(o=>{const f=o.item_id,d=o.fields.find(h=>h.element_id===r);d&&d.field_value&&d.field_value.split(".").forEach(y=>{const m={source:y,destination:{app_id:e,item_id:f,element_id:r}};s[s.length-1].length!==10?s[s.length-1].push(m):s.push([m])})}),s.forEach(o=>{l=l.then(()=>i.gudhub.duplicateFile(o)).then(f=>{u=[...u,...f]})}),l.then(()=>{t.forEach(o=>{const f=o.item_id,d=o.fields.find(h=>h.element_id===r);d&&d.field_value&&(d.field_value="",u.forEach(h=>{h.item_id===f&&(d.field_value=d.field_value.split(",").filter(y=>y).concat(h.file_id).join(","))}))}),a()})})}}function compareObjects(n,e){return JSON.stringify(n)===JSON.stringify(e)}async function dynamicPromiseAll(n){await Promise.all(n);let e=!0;for(const t of n){const r=await _checkPromiseStatus(t);if(r.state==="pending"){e=!1;break}if(r.state==="rejected")throw r.reason}return e?!0:dynamicPromiseAll(n)}function _checkPromiseStatus(n){const e={state:"pending"};return Promise.race([n,e]).then(t=>t===e?t:{state:"resolved",value:t},t=>({state:"rejected",reason:t}))}function sortItems(n,e){if(!n||!n.length)return[];if(!n[0].fields.length)return n;var t=e&&e.sort_field_id||n[0].fields[0].field_id;function r(i){for(var a=null,s=0;s<i.fields.length;s++)if(i.fields[s].field_id==t){a=i.fields[s].field_value;break}return a}return n.sort(function(i,a){var s=r(i),l=r(a);return s===null?-1:l===null?1:/^\d+$/.test(s)&&/^\d+$/.test(l)?Number(s)<Number(l)?-1:1:/^\d+$/.test(s)||/^\d+$/.test(l)?/^\d+$/.test(s)?-1:1:s.toLowerCase()>l.toLowerCase()?1:-1}),e&&e.descending?n.reverse():n}class Utils{constructor(e){this.gudhub=e,this.MergeFields=new FieldsOperator(e),this.ItemsSelection=new ItemsSelection(e),this.AppsTemplateService=new AppsTemplateService(e),this.FileHelper=new FileHelper(e)}prefilter(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return filterPreparation(e,this.gudhub.storage,this.gudhub.pipeService,t)}filter(e,t){return filter(e,t)}mergeFilters(e,t){return mergeFilters(e,t)}group(e,t){return group(e,t)}async getFilteredItems(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"",l=arguments.length>6?arguments[6]:void 0,u=arguments.length>7?arguments[7]:void 0;const o=await this.prefilter(t,{element_app_id:r,app_id:i,item_id:a}),f=this.filter(e,o);return this.group(s,f).filter(h=>l?searchValue([h],l).length===1:!0).filter(h=>u?searchValue([h],u).length===1:!0)}jsonToItems(e,t){return jsonToItems(e,t)}getDate(e){return getDate(e)}checkRecurringDate(e,t){return checkRecurringDate(e,t)}populateItems(e,t,r){return populateItems(e,t,r)}populateWithDate(e,t){return populateWithDate(e,t)}populateWithItemRef(e,t,r,i,a,s){return populateWithItemRef(e,t,r,i,a,s)}compareItems(e,t,r){return compareItems(e,t,r)}mergeItems(e,t,r){return mergeItems(e,t,r)}mergeObjects(e,t,r){return mergeObjects(e,t,r)}makeNestedList(e,t,r,i,a){return makeNestedList(e,t,r,i,a)}async mergeChunks(e){return mergeChunks(e)}mergeFieldLists(e,t){return this.MergeFields.mergeFieldLists(e,t)}createFieldsListToView(e,t){return this.MergeFields.createFieldsListToView(e,t)}createFieldsListToViewWithDataType(e,t){return this.MergeFields.createFieldsListToViewWithDataType(e,t)}selectItems(e,t){return this.ItemsSelection.selectItems(e,t)}getSelectedItems(e){return this.ItemsSelection.getSelectedItems(e)}clearSelectedItems(e){return this.ItemsSelection.clearSelectedItems(e)}isItemSelected(e,t){return this.ItemsSelection.isItemSelected(e,t)}jsonConstructor(e,t,r,i){return compiler(e,t,this,r,i)}fileInstallerHelper(e,t,r){return this.FileHelper.fileInstallerHelper(e,t,r)}createAppsFromTemplate(e,t,r,i){return this.AppsTemplateService.createAppsFromTemplate(e,t,r,i)}createApps(e){return this.AppsTemplateService.createApps(e)}createItems(e,t){return this.AppsTemplateService.createItems(e,t)}areViewListsEqual(e,t){let r=e.sort((a,s)=>a.view_id-s.view_id),i=t.sort((a,s)=>a.view_id-s.view_id);return this.compareObjects(r,i)}areFieldListsEqual(e,t){let r=e.sort((a,s)=>a.field_id-s.field_id),i=t.sort((a,s)=>a.field_id-s.field_id);return this.compareObjects(r,i)}compareObjects(e,t){return compareObjects(e,t)}compareAppsItemsLists(e,t,r){const i=new Blob([compare_items_lists_Worker()],{type:"application/javascript"});this.worker=new Worker(URL.createObjectURL(i)),this.worker.postMessage({items_list1:e,items_list2:t}),this.worker.addEventListener("message",a=>{const{diff:s}=a.data;r(s)})}dynamicPromiseAll(e){return dynamicPromiseAll(e)}sortItems(e,t){return sortItems(e,t)}debounce(e,t){let r;return function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];clearTimeout(r),r=setTimeout(()=>{e.apply(this,a)},t)}}}class Auth{constructor(e,t){this.req=e,this.storage=t}async login(){let{username:e,password:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=await this.loginApi(e,t);return this.storage.updateUser(r),r}async loginWithToken(e){const t=await this.loginWithTokenApi(e);return this.storage.updateUser(t),t}async logout(e){return await this.logoutApi(e)}async signup(e){return await this.signupApi(e)}async updateToken(e){return await this.updateTokenApi(e)}async updateUser(e){const t=await this.updateUserApi(e);return this.storage.updateUser(t),t}async updateAvatar(e){const t=await this.avatarUploadApi(e);return this.storage.updateUser(t),t}async getUsersList(e){return await this.getUsersListApi(e)}async loginApi(e,t){try{return await this.req.axiosRequest({method:"POST",url:"".concat(this.req.root,"/auth/login"),form:{username:e,password:t}})}catch(r){console.log(r)}}async loginWithTokenApi(e){try{return await this.req.axiosRequest({method:"POST",url:"".concat(this.req.root,"/auth/login?accesstoken=").concat(e)})}catch(t){console.log(t)}}async updateTokenApi(e){try{return await this.req.axiosRequest({method:"POST",url:"".concat(this.req.root,"/auth/login"),form:{auth_key:e}})}catch(t){console.log(t)}}logoutApi(e){return this.req.post({url:"/auth/logout",form:{token:e}})}signupApi(e){return this.req.axiosRequest({method:"POST",url:"".concat(this.req.root,"/auth/singup"),form:{user:JSON.stringify(e)}})}getUsersListApi(e){return this.req.get({url:"/auth/userlist",params:{keyword:e}})}updateUserApi(e){return this.req.post({url:"/auth/updateuser",form:{user:JSON.stringify(e)}})}avatarUploadApi(e){return this.req.post({url:"/auth/avatar-upload",form:{image:e}})}getUserByIdApi(e){return this.req.get({url:"/auth/getuserbyid",params:{id:e}})}getVersion(){return this.req.get({url:"/version"})}getUserFromStorage(e){return this.storage.getUsersList().find(t=>t.user_id==e)}saveUserToStorage(e){const t=this.storage.getUsersList(),r=t.find(i=>i.user_id==e.user_id);return r||(t.push(e),e)}async getUserById(e){let t=this.getUserFromStorage(e);if(!t){let r=await this.getUserByIdApi(e);if(!r)return null;t=this.getUserFromStorage(e),t||(this.saveUserToStorage(r),t=r)}return t}async getToken(){const e=new Date(this.storage.getUser().expirydate),t=new Date;let r=this.storage.getUser().accesstoken;if(e<t||!r){const i=await this.updateToken(this.storage.getUser().auth_key);this.storage.updateUser(i),r=i.accesstoken}return r}}let $q={when:function(n){return new Promise(e=>{e(n)})}},factoryReturns={};class AngularClass{module(){return angular}directive(){return angular}factory(e,t){try{typeof t=="object"?factoryReturns[e]=t[t.length-1]($q):factoryReturns[e]=t($q)}catch(r){console.log("Errror in data type: ",e),console.log(r)}return angular}service(){return angular}run(){return angular}filter(){return angular}controller(){return angular}value(){return angular}element(){return angular}injector(){return angular}invoke(){return angular}}let angular=new AngularClass;async function createAngularModuleInstance(gudhub,module_id,module_url,angularInjector,nodeWindow){try{let angularModule,importedClass;if(IS_BROWSER_MAIN_THREAD)if(window.angular){angularInjector.has(module_id)||await angularInjector.get("$ocLazyLoad").load(module_url),angularModule=await angularInjector.get(module_id);let module=await axios.get(module_url);module=module.data;try{eval(module)}catch(n){console.error("ERROR WHILE EVAL() IN GHCONSTRUCTOR. MODULE ID: ".concat(module_id)),console.log(n)}importedClass=factoryReturns[module_id]}else{let module=await axios.get(module_url);module=module.data;try{eval(module)}catch(n){console.log("Error while importing module: ".concat(module_id)),console.log(n)}importedClass=factoryReturns[module_id]}else{const n=new Proxy(nodeWindow,{get:(a,s)=>a[s],set:(a,s,l)=>(a[s]=l,global[s]=l,!0)});global.hasOwnProperty("window")||(global.window=n,global.document=nodeWindow.document,global.Element=nodeWindow.Element,global.CharacterData=nodeWindow.CharacterData,global.this=n,global.self=n,global.Blob=nodeWindow.Blob,global.Node=nodeWindow.Node,global.navigator=nodeWindow.navigator,global.HTMLElement=nodeWindow.HTMLElement,global.XMLHttpRequest=nodeWindow.XMLHttpRequest,global.WebSocket=nodeWindow.WebSocket,global.crypto=nodeWindow.crypto,global.DOMParser=nodeWindow.DOMParser,global.Symbol=nodeWindow.Symbol,global.document.queryCommandSupported=a=>!1,global.angular=angular);let t=(await axios.get(module_url)).data,r=encodeURIComponent(t);r="data:text/javascript;charset=utf-8,"+r;let i;try{i=await import(r)}catch(a){console.log("Error while importing module: ".concat(module_id)),console.log(a)}importedClass=new i.default}let result={type:module_id,getTemplate:function(n,e,t,r,i,a){let s=t!=="false";return importedClass.getTemplate(n,e,s,r,i,a)},getDefaultValue:function(n,e,t,r){return new Promise(async i=>{let a=importedClass.getDefaultValue;if(a){let s=await a(n,e,t,r);i(s)}else i(null)})},getSettings:function(n,e,t){return importedClass.getSettings(n,e,t)},filter:{getSearchOptions:function(n){let e=importedClass;return e.filter&&e.filter.getSearchOptions?importedClass.filter.getSearchOptions(n)||null:[]},getDropdownValues:function(){let n=importedClass;return n.filter&&n.filter.getDropdownValues?n.filter.getDropdownValues()||null:[]}},getInterpretation:function(n,e,t,r,i,a){return new Promise(async s=>{let l=importedClass;try{let u=await l.getInterpretation(gudhub,n,a,i,r,t),f=await(u.find(d=>d.id==e)||u.find(d=>d.id=="default")).content();s({html:f})}catch(u){console.log("ERROR IN ".concat(module_id),u),s({html:"<span>no interpretation</span>"})}})},getInterpretationsList:function(n,e,t,r){return importedClass.getInterpretation(n,e,t,r)},getInterpretatedValue:function(n,e,t,r){return new Promise(async i=>{let a=importedClass.getInterpretatedValue;if(a){let s=await a(n,e,t,r);i(s)}else i(n)})},onMessage:function(n,e,t){return new Promise(async r=>{const i=importedClass.onMessage;if(i){const a=await i(n,e,t);r(a)}r(null)})}};return IS_BROWSER_MAIN_THREAD&&(result.extendController=function(n){angularModule.getActionScope(n)},result.runAction=function(n){try{angularModule.runAction(n)}catch{}},result.getWindowScope=function(n){return angularModule.getWindowScope(n)},result.getWindowHTML=function(n){return angularModule.getWindowHTML(n)}),result}catch(n){console.log(n),console.log("Failed in createAngularModuleInstance (ghconstructor). Module id: ".concat(module_id,"."))}}async function createClassInstance(n,e,t,r,i){try{t||console.error("JS link must be provided for this data type - ".concat(e));let s=await(f=>(IS_BROWSER_MAIN_THREAD||(global.window=proxy,global.document=i.document,global.Element=i.Element,global.CharacterData=i.CharacterData,global.this=proxy,global.self=proxy,global.Blob=i.Blob,global.Node=i.Node,global.navigator=i.navigator,global.HTMLElement=i.HTMLElement,global.XMLHttpRequest=i.XMLHttpRequest,global.WebSocket=i.WebSocket,global.crypto=i.crypto,global.DOMParser=i.DOMParser,global.Symbol=i.Symbol,global.document.queryCommandSupported=d=>(console.log("QUERY COMMAND SUPPORTED: ",d),!1),global.angular=angular),new Promise(async d=>{let h=await axios.get(f).catch(v=>{console.log("Failed to fetch: ".concat(f," in ghconstructor. Module id: ").concat(e))}),m="data:text/javascript;charset=utf-8,"+encodeURIComponent(h.data);d(m)})))(t),l;try{l=await import(s)}catch(f){console.log("Error while importing module: ".concat(e)),console.log(f)}let u=new l.default(e);if(r&&IS_BROWSER){const f=document.createElement("link");f.href=r,f.setAttribute("data-module",e),f.setAttribute("rel","stylesheet"),document.getElementsByTagName("head")[0].appendChild(f)}return{type:e,getTemplate:function(f,d,h,y,m,v){let p=h!=="false";return u.getTemplate(f,d,p,y,m,v)},getDefaultValue:function(f,d,h,y){return new Promise(async m=>{let v=u.getDefaultValue;if(v){let p=await v(f,d,h,y);m(p)}else m(null)})},getSettings:function(f,d,h){return u.getSettings(f,d,h)},filter:{getSearchOptions:function(f){let d=u;return d.filter&&d.filter.getSearchOptions?u.filter.getSearchOptions(f):[]},getDropdownValues:function(){let f=u;return f.filter&&f.filter.getDropdownValues?f.filter.getDropdownValues():[]}},getInterpretation:function(f,d,h,y,m,v){return new Promise(async p=>{let E=u;try{let S=await E.getInterpretation(n,f,v,m,y,h),g=await(S.find(b=>b.id==d)||S.find(b=>b.id=="default")).content();p({html:g})}catch(S){console.log("ERROR IN ".concat(e),S),p({html:"<span>no interpretation</span>"})}})},getInterpretationsList:function(f,d,h,y){return u.getInterpretation(f,d,h,y)},getInterpretatedValue:function(f,d,h,y){return new Promise(async m=>{let v=u.getInterpretatedValue;if(v){let p=await v(f,d,h,y);m(p)}else m(f)})},onMessage:function(f,d,h){return new Promise(async y=>{const m=u.onMessage;if(m){const v=await m(f,d,h);y(v)}y(null)})},extendController:function(f){u.getActionScope(f)},runAction:function(f){try{u.runAction(f)}catch{}},getWindowScope:function(f){return u.getWindowScope(f)},getWindowHTML:function(f){return u.getWindowHTML(f)}}}catch(a){console.log(a),console.log("Failed in createClassInstance (ghconstructor). Module id: ".concat(e,". JS url: ").concat(t))}}class GHConstructor{constructor(e){this.gudhub=e,this.cache={},this.modulesQueue={},this.angularInjector,this.nodeWindow}async getInstance(e){return this.getCached(e)?this.getCached(e):(this.modulesQueue[e]?await this.modulesQueue[e]:(this.modulesQueue[e]=this.createInstance(e),await this.modulesQueue[e]),this.getCached(e))}pupToCache(e,t){this.cache[e]=t}getCached(e){return this.cache[e]}initAngularInjector(e){this.angularInjector=e}initJsdomWindow(e){this.nodeWindow=e}async createInstance(e){let t=this.gudhub.storage.getModuleUrl(e);if(!t){console.log("Cannot find module: ".concat(e));return}let r;return t.type==="gh_element"&&(t.technology==="angular"?r=await createAngularModuleInstance(this.gudhub,e,t.url,this.angularInjector,this.nodeWindow):t.technology==="class"&&(r=await createClassInstance(this.gudhub,e,t.js,t.css,this.nodeWindow))),r&&this.pupToCache(e,r),r}}class AppProcessor{constructor(e,t,r,i,a,s,l){this.storage=e,this.pipeService=t,this.req=r,this.ws=i,this.applistReceived=!1,this.activateSW=s,this.util=a,this.appListeners(),this.dataService=l,this.appRequestCache=new Map}async createNewAppApi(e){try{const t=await this.req.post({url:"/api/app/create",form:{app:JSON.stringify(e)}});return t.from_apps_list=!0,t}catch(t){return console.log(t),null}}async updateAppApi(e){try{return await this.req.post({url:"/api/app/update",form:{app:JSON.stringify(e)}})}catch(t){return console.log(t),null}}async deleteAppApi(e){try{return await this.req.post({url:"/api/app/delete",form:{app_id:e}})}catch(t){return console.log(t),null}}async getAppListApi(){try{return(await this.req.get({url:"/api/applist/get"})).apps_list.map(t=>(t.from_apps_list=!0,t))}catch(e){return console.log(e),null}}getAppListFromStorage(){return this.storage.getAppsList()}getAppFromStorage(e){const t=this.storage.getApp(e);return t&&t.field_list.length?t:null}addNewAppToStorage(e){return this.storage.getAppsList().push(e)}saveAppInStorage(e){e.items_object={};for(let r=0;r<e.items_list.length;r++){e.items_object[e.items_list[r].item_id]={};for(let i=0;i<e.items_list[r].fields.length;i++)e.items_object[e.items_list[r].item_id][e.items_list[r].fields[i].field_id]=e.items_list[r].fields[i]}const t=this.storage.getApp(e.app_id);return t?(e.from_apps_list=t.from_apps_list,e.permission=t.permission,this.storage.updateApp(e)):(e.from_apps_list=!1,this.addNewAppToStorage(e)),this.getAppFromStorage(e.app_id)}updateAppFieldsAndViews(e){const t=this.getAppFromStorage(e.app_id);e.items_list=t.items_list,e.file_list=t.file_list,e.from_apps_list=t.from_apps_list,e.items_object=t.items_object,this.storage.updateApp(e),this.pipeService.emit("gh_app_views_update",{app_id:e.app_id},e.views_list),e.field_list.forEach(r=>{this.pipeService.emit("gh_model_update",{app_id:e.app_id,field_id:r.field_id},r)})}updateAppInStorage(e){this.storage.getApp(e.app_id)?(this.storage.updateApp(e),this.pipeService.emit("gh_app_update",{app_id:e.app_id},e),this.pipeService.emit("gh_items_update",{app_id:e.app_id},e.items_list)):this.addNewAppToStorage(e)}deletingAppFromStorage(e){let t=this.storage.getAppsList();return t.forEach((r,i)=>{r.app_id==e&&t.splice(i)}),t}updateAppsListInStorage(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];for(const t of e){const r=this.storage.getApp(t.app_id);r?(r.from_apps_list=t.from_apps_list,r.permission=t.permission):this.addNewAppToStorage(t)}}async refreshApps(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];for(const t of e)if(t!=null)try{const r=await this.dataService.getApp(t);if(r){r.items_object={};for(let i=0;i<r.items_list.length;i++){r.items_object[r.items_list[i].item_id]={};for(let a=0;a<r.items_list[i].fields.length;a++)r.items_object[r.items_list[i].item_id][r.items_list[i].fields[a].field_id]=r.items_list[i].fields[a]}this.updateAppInStorage(r),this.pipeService.emit("gh_app_views_update",{app_id:r.app_id},r.views_list)}}catch(r){console.log(r)}console.log("Apps refreshed: ",JSON.stringify(e))}async refreshAppsList(){let e=this.getAppListFromStorage(),r=(await this.getAppListApi()).map(i=>_objectSpread2(_objectSpread2({},i),e.find(a=>a.app_id===i.app_id)));this.updateAppsListInStorage(r),this.pipeService.emit("gh_apps_list_refreshed",{})}async getAppsList(){let e=this.getAppListFromStorage();if(!this.applistReceived){let t=await this.getAppListApi();if(!t)return null;this.updateAppsListInStorage(t),this.applistReceived=!0,e=t}return e}async getAppInfo(e){const t=await this.getAppsList();return t?t.find(r=>r.app_id==e):null}async deleteApp(e){return await this.deleteAppApi(e),this.deletingAppFromStorage(e)}async getApp(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!e)return null;let r=this.getAppFromStorage(e);if(r)return r;if(this.appRequestCache.has(e))return this.appRequestCache.get(e);let i=this,a=new Promise(async(s,l)=>{try{let u=await i.dataService.getApp(e);u||l();//!!! temporary check !!!! if app has chanks property then we start getting it
|
|
98
|
+
let o=t?u:_objectSpread2(_objectSpread2({},u),{},{items_list:u.items_list.filter(f=>!f.trash)});o=t?o:_objectSpread2(_objectSpread2({},o),{},{field_list:o.field_list.filter(f=>!f.trash)}),s(o),i.saveAppInStorage(o),i.ws.addSubscription(e)}catch{l()}});return i.appRequestCache.set(e,a),a}async updateApp(e){if(!e.views_list||!e.views_list.length||!e.show){const r=await this.getApp(e.app_id);(!e.views_list||!e.views_list.length)&&(e.views_list=r.views_list),typeof e.show>"u"&&(e.show=r.show)}const t=await this.updateAppApi(e);return this.updateAppFieldsAndViews(t),t}async updateAppInfo(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.pipeService.emit("gh_app_info_update",{app_id:e.app_id},e),this.updateApp(e)}async createNewApp(e){const t=await this.createNewAppApi(e);return t.items_object={},this.addNewAppToStorage(t),t}async getAppViews(e){if(e)return(await this.getApp(e)).views_list}clearAppProcessor(){this.getAppListPromises=null,this.getAppPromises={},this.applistReceived=!1}appListeners(){this.pipeService.onRoot("gh_app_get",{},async(e,t)=>{if(t&&t.app_id){const r=await this.getApp(t.app_id);this.pipeService.emit("gh_app_get",t,r)}}),this.pipeService.onRoot("gh_apps_list_get",{},async(e,t)=>{const r=await this.getAppsList();this.pipeService.emit("gh_apps_list_get",t,r)}),this.pipeService.onRoot("gh_delete_app",{},async(e,t)=>{const r=await this.deleteApp(t.app_id);this.pipeService.emit("gh_apps_list_update",{recipient:"all"},r)}),this.pipeService.onRoot("gh_app_update",{},async(e,t)=>{t.app.items_list=[],t.app.file_list=[];const r=await this.updateApp(t.app);this.pipeService.emit("gh_app_views_update",{app_id:r.app_id},r.views_list);const i=await this.getAppsList();this.pipeService.emit("gh_apps_list_update",{recipient:"all"},i),r.field_list.forEach(a=>{this.pipeService.emit("gh_model_update",{app_id:r.app_id,field_id:a.field_id},a)})}),this.pipeService.onRoot("gh_app_view_get",{},async(e,t)=>{if(t&&t.app_id){const r=await this.getApp(t.app_id);r.views_list.forEach((i,a)=>{i.view_id==t.view_id&&this.pipeService.emit("gh_app_view_get",t,r.views_list[a])})}}),this.pipeService.onRoot("gh_app_info_get",{},async(e,t)=>{const r=await this.getAppInfo(t.app_id);r&&this.pipeService.emit("gh_app_info_get",t,r)}),this.pipeService.onRoot("gh_app_info_update",{},async(e,t)=>{if(t&&t.app){const r=await this.updateAppInfo(t.app);this.pipeService.emit("gh_app_info_update",{app_id:t.app.app_id},r)}}),this.pipeService.onRoot("gh_app_create",{},async(e,t)=>{await this.createNewApp(t.app);const r=await this.getAppsList();this.pipeService.emit("gh_apps_list_update",{recipient:"all"},r)}),IS_BROWSER_MAIN_THREAD&&this.activateSW&&navigator.serviceWorker.addEventListener("message",async e=>{if(e.data.type==="refresh app"){const t=await this.getApp(e.data.payload.app_id);t&&this.util.compareAppsItemsLists(t.items_list,e.data.payload.items_list.filter(r=>!r.trash),r=>{let{diff_fields_items:i,diff_fields_items_Ids:a,diff_items:s,newItems:l,deletedItems:u}=r;(s.length||l.length||u.length)&&(this.pipeService.emit("gh_items_update",{app_id:e.data.payload.app_id},e.data.payload.items_list.filter(o=>!o.trash)),s.forEach(o=>this.pipeService.emit("gh_item_update",{app_id:e.data.payload.app_id,item_id:o.item_id},o))),a.forEach(o=>{const f=i[o];f&&f.forEach(d=>{this.pipeService.emit("gh_value_update",{app_id:e.data.payload.app_id,item_id:o,field_id:d.field_id},d.field_value)})})}),e.data.payload.items_list=await this.util.mergeChunks([t,e.data.payload]),this.saveAppInStorage(e.data.payload)}})}}class ItemProcessor{constructor(e,t,r,i,a){this.storage=e,this.pipeService=t,this.req=r,this.appProcessor=i,this.util=a,this.itemListeners()}async addItemsApi(e,t){try{return await this.req.post({url:"/api/items/add",form:{items:JSON.stringify(t),app_id:e}})}catch(r){return console.log(r),null}}async updateItemsApi(e,t){try{return await this.req.post({url:"/api/items/update",form:{items:JSON.stringify(t),app_id:e}})}catch(r){return console.log(r),null}}deleteItemsApi(e){try{const t=this.req.post({url:"/api/items/delete",form:{items_ids:JSON.stringify(e)}});return t.from_apps_list=!0,t}catch(t){return console.log(t),null}}async addItemsToStorage(e,t){const r=await this.appProcessor.getApp(e);return r&&(t.forEach(i=>{r.items_list.push(i),r.items_object[i.item_id]={};for(let a=0;a<i.fields.length;a++)r.items_object[i.item_id][i.fields[a].field_id]=i.fields[a];this.pipeService.emit("gh_item_update",{app_id:e},[i])}),this.pipeService.emit("gh_items_update",{app_id:e},r.items_list),this.storage.updateApp(r)),r}async updateItemsInStorage(e,t){this.pipeService.emit("gh_items_update",{app_id:e},t);const r=await this.appProcessor.getApp(e);return r&&t&&t.forEach(i=>{const a={app_id:e};this.pipeService.emit("gh_item_update",a,[i]),a.item_id=i.item_id,this.pipeService.emit("gh_item_update",a,i);const s=r.items_list.find(l=>l.item_id==i.item_id);s&&i.fields.forEach(l=>{const u=s.fields.find(o=>o.field_id==l.field_id);a.field_id=l.field_id,u?u.field_value!=l.field_value&&(u.field_value=l.field_value,r.items_object[s.item_id][u.field_id]=u,this.pipeService.emit("gh_value_update",a,l.field_value)):(s.fields.push(l),r.items_object[s.item_id][l.field_id]=l,this.pipeService.emit("gh_value_update",a,l.field_value))})}),t}handleDiff(e,t){this.updateItemsInStorage(e,t.diff_src_items),this.addItemsToStorage(e,t.new_src_items),this.deleteItemsFromStorage(e,t.trash_src_items)}async deleteItemsFromStorage(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const r=await this.appProcessor.getApp(e);r&&(r.items_list=r.items_list.filter(i=>t.find(a=>i.item_id==a.item_id)?(delete r.items_object[i.item_id],!1):!0),this.pipeService.emit("gh_items_update",{app_id:e},r.items_list),this.storage.updateApp(r))}async getItems(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const r=await this.appProcessor.getApp(e,t);return r?r.items_list:null}async addNewItems(e,t){const r=t.map(a=>_objectSpread2(_objectSpread2({},a),{},{fields:filterFields(a.fields)})),i=await this.addItemsApi(e,r);return await this.addItemsToStorage(e,i),this.pipeService.emit("gh_items_add",{app_id:e},i),i}async updateItems(e,t){const r=t.map(a=>_objectSpread2(_objectSpread2({},a),{},{fields:filterFields(a.fields)})),i=await this.updateItemsApi(e,r);return await this.updateItemsInStorage(e,i)}async deleteItems(e,t){return this.deleteItemsApi(t).then(async r=>await this.deleteItemsFromStorage(e,r))}itemListeners(){this.pipeService.onRoot("gh_items_get",{},async(e,t)=>{if(t&&t.app_id){const r=await this.getItems(t.app_id);r?this.pipeService.emit("gh_items_get",t,r):this.pipeService.emit("gh_items_get",t,[])}}),this.pipeService.onRoot("gh_items_add",{},async(e,t)=>{if(t&&t.app_id&&t.items){const r=await this.addNewItems(t.app_id,t.items);r?this.pipeService.emit("gh_items_add",t,r):this.pipeService.emit("gh_items_add",t,[])}}),this.pipeService.onRoot("gh_items_update",{},async(e,t)=>{if(t&&t.app_id&&t.items){const r=await this.updateItems(t.app_id,t.items);r?this.pipeService.emit("gh_items_update",t,r):this.pipeService.emit("gh_items_update",t,[])}}),this.pipeService.onRoot("gh_item_get",{},async(e,t)=>{if(t&&t.app_id){const i=(await this.getItems(t.app_id)).find(a=>a.item_id==t.item_id);this.pipeService.emit("gh_item_get",t,i)}}),this.pipeService.onRoot("gh_filtered_items_get",{},async(e,t)=>{if(t&&t.element_app_id){const r=await this.getItems(t.element_app_id),i=await this.util.getFilteredItems(r,t.filters_list,t.element_app_id,t.app_id,t.item_id,t.field_groupe,t.search,t.search_params);this.pipeService.emit("gh_filtered_items_get",t,i)}}),this.pipeService.onRoot("gh_filter_items",{},async(e,t)=>{if(t&&t.items){const r=await this.util.getFilteredItems(t.items,t.filters_list,t.element_app_id,t.app_id,t.item_id,t.field_groupe,t.search,t.search_params);this.pipeService.emit("gh_filter_items",t,r)}})}}class FieldProcessor{constructor(e,t,r,i,a){this.storage=e,this.req=t,this.appProcessor=r,this.itemProcessor=i,this.pipeService=a,this.fieldListeners()}deleteFieldApi(e){return this.req.post({url:"/api/app/delete-field",form:{field_id:e}})}async updatedFieldApi(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=await this.appProcessor.getApp(e),i={app_id:e,app_name:r.app_name,group_id:r.group_id,icon:r.icon,field_list:r.field_list.map(a=>a.field_id==t.field_id?_objectSpread2(_objectSpread2({},a),t):a),views_list:r.views_list};return this.appProcessor.updateApp(i)}setFieldValueApi(e,t,r,i){const a=[{item_id:t,fields:[{field_id:r,field_value:i}]}];return this.itemProcessor.updateItems(e,a)}deleteFieldInStorage(e,t){const r=this.storage.getApp(e);return r.field_list=r.field_list.filter(i=>i.file_id!=t),r.items_list=r.items_list.map(i=>(i.fields=i.fields.filter(a=>a.field_id!=t),i)),this.storage.updateApp(r),!0}updateFieldInStorage(e,t){const r=this.storage.getApp(e);return r.field_list=r.field_list.map(i=>i.field_id==t.field_id?_objectSpread2(_objectSpread2({},i),t):i),this.storage.updateApp(r),t}updateFieldValue(e,t,r,i){const a=this.storage.getApp(e);return a.items_list.forEach(s=>{s.item_id==t&&s.fields.forEach(l=>{l.field_id==r&&(l.field_value=i,a.items_object[s.item_id][l.field_id]=l)})}),this.storage.updateApp(a),i}async getField(e,t){const r=await this.appProcessor.getApp(e);if(!r)return null;for(let i=0;i<r.field_list.length;i++)if(r.field_list[i].field_id==t)return r.field_list[i];return null}async getFieldIdByNameSpace(e,t){const r=await this.appProcessor.getApp(e);if(!r)return null;for(let i=0;i<r.field_list.length;i++)if(r.field_list[i].name_space==t)return r.field_list[i].field_id;return null}async getFieldModels(e){const t=await this.appProcessor.getApp(e);return t?t.field_list:null}async updateField(e,t){if(!e||!t)return;const r=await this.updatedFieldApi(e,t);return this.updateFieldInStorage(e,r)}async deleteField(e,t){return await this.deleteFieldApi(t),this.deleteFieldInStorage(e,t)}async getFieldValue(e,t,r){let i=null;const a=await this.appProcessor.getApp(e);try{i=a.items_object[t][r].field_value}catch{}return i}async setFieldValue(e,t,r,i){if(!(!e||!t||!r))return await this.setFieldValueApi(e,t,r,i),this.updateFieldValue(e,t,r,i)}fieldListeners(){this.pipeService.onRoot("gh_value_get",{},async(e,t)=>{if(t.app_id&&t.item_id&&t.field_id){let r=await this.getFieldValue(t.app_id,t.item_id,t.field_id);this.pipeService.emit("gh_value_get",t,r)}}),this.pipeService.onRoot("gh_value_set",{},async(e,t)=>{t.item_id&&(this.setFieldValue(t.app_id,t.item_id,t.field_id,t.new_value),delete t.new_value)}),this.pipeService.onRoot("gh_model_get",{},async(e,t)=>{try{let r=await this.getField(t.app_id,t.field_id);this.pipeService.emit("gh_model_get",t,r)}catch(r){console.log("Field model: ",r)}}),this.pipeService.onRoot("gh_model_update",{},async(e,t)=>{let r=await this.updateField(t.app_id,t.field_model);this.pipeService.emit("gh_model_update",{app_id:t.app_id,field_id:t.field_id},r)}),this.pipeService.onRoot("gh_models_get",{},async(e,t)=>{let r=await this.getFieldModels(t.app_id);this.pipeService.emit("gh_models_get",t,r)}),this.pipeService.onRoot("gh_model_delete",{},async(e,t)=>{let r=await this.deleteField(t.app_id,t.field_id);this.pipeService.emit("gh_model_delete",t,r)})}}class FileManager{constructor(e,t,r,i){this.storage=e,this.pipeService=t,this.req=r,this.appProcessor=i}async uploadFileApi(e,t,r){try{const i={"file-0":e,app_id:t,item_id:r};return await this.req.post({url:"/file/formupload",form:i})}catch(i){return console.log(i),null}}async uploadFileFromStringApi(e){try{return await this.req.post({url:"/file/upload",form:{file:JSON.stringify(e)}})}catch(t){return console.log(t),null}}async updateFileFromStringApi(e,t,r,i,a,s,l){try{const u={file_name:r,extension:i,file_id:t,format:a,source:e,alt:s,title:l};return await this.req.post({url:"/file/update",form:{file:JSON.stringify(u)}})}catch(u){return console.log(u),null}}async duplicateFileApi(e){return this.req.post({url:"/api/new/file/duplicate",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{files:JSON.stringify(e)}})}async downloadFileFromString(e,t){if(await this.isFileExists(e,t)){let r=await this.getFile(e,t),i=await this.req.get({url:r.url+"?timestamp="+r.last_update,externalResource:!0});return{file:r,data:i,type:"file"}}else return!1}async duplicateFile(e){let t=await this.duplicateFileApi(e);return t.forEach(r=>{this.addFileToStorage(r.app_id,r)}),t}async deleteFileApi(e){try{return await this.req.get({url:"/file/delete?file_id=".concat(e)})}catch(t){return console.log(t),null}}addFileToStorage(e,t){const r=this.storage.getApp(e);r&&(r.file_list.push(t),this.storage.updateApp(r),this.pipeService.emit("gh_file_upload",{app_id:e,item_id:t.item_id,file_id:t.file_id},t))}addFilesToStorage(e,t){const r=this.storage.getApp(e);r&&(r.file_list.push(...t),this.storage.updateApp(r),t.forEach(i=>{this.pipeService.emit("gh_file_upload",{app_id:e,item_id:i.item_id,file_id:i.file_id},i)}))}deleteFileFromStorage(e,t){const r=this.storage.getApp(t);if(r){let i;r.file_list=r.file_list.filter(a=>a.file_id!=e?!0:(i=a,!1)),this.storage.updateApp(r),this.pipeService.emit("gh_file_delete",{file_id:e},i)}}updateFileInStorage(e,t,r){const i=this.storage.getApp(t);i&&(i.file_list=i.file_list.map(a=>a.file_id==e?r:a),this.storage.updateApp(i),this.pipeService.emit("gh_file_update",{file_id:e}))}async getFile(e,t){const r=await this.appProcessor.getApp(e);return new Promise((i,a)=>{let s=r.file_list.find(l=>l.file_id==t);i(s||"")})}async getFiles(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const r=await this.appProcessor.getApp(e);return new Promise((i,a)=>{let s=r.file_list.filter(l=>t.some(u=>u==l.file_id));i(s||"")})}async uploadFile(e,t,r){const i=await this.uploadFileApi(e,t,r);return this.addFileToStorage(t,i),i}async uploadFileFromString(e){const t=await this.uploadFileFromStringApi(e);return this.addFileToStorage(t.app_id,t),t}async updateFileFromString(e,t,r,i,a,s,l){const u=await this.updateFileFromStringApi(e,t,r,i,a,s,l);return this.updateFileInStorage(t,u.app_id,u),u}async deleteFile(e,t){return await this.deleteFileApi(e),this.deleteFileFromStorage(e,t),!0}async isFileExists(e,t){let r=/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/;if(t){let i=await this.getFile(e,t);return i?r.test(i.url):!1}else return!1}}class DocumentManager{constructor(e,t){this.req=e,this.pipeService=t}createDocument(e){return this.emitDocumentInsert(e),this.req.post({url:"/api/new/document/insert-one",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{document:JSON.stringify(e)}})}emitDocumentInsert(e){const t=typeof e.data=="string"?JSON.parse(e.data):e.data;this.pipeService.emit("gh_document_insert_one",{app_id:e.app_id,item_id:e.item_id,element_id:e.element_id},t)}getDocument(e){return this.req.post({url:"/api/new/document/find-one",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{document:JSON.stringify(e)}})}getDocuments(e){return this.req.post({url:"/api/new/document/find",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{document:JSON.stringify(e)}})}deleteDocument(e){return this.req.post({url:"/api/new/document/remove-one",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{document:JSON.stringify(e)}})}}class Interpritate{constructor(e){this.gudhub=e}async getInterpretationObj(e,t,r,i,a,s){var l=[],u=t.data_model.interpretation.find(function(d){return d.src==r})||t.data_model.interpretation.find(function(d){return d.src=="table"})||{id:"default"},o=u;if(e.data_model&&e.data_model.interpretation){for(var f=0;f<e.data_model.interpretation.length;f++)(e.data_model.interpretation[f].src==r||e.data_model.interpretation[f].src==i)&&l.push(e.data_model.interpretation[f]);for(var f=0;f<l.length;f++)if(l[f].settings&&l[f].settings.condition_filter&&l[f].settings.filters_list.length>0){const h=await gudhub.getItem(s,a);if(h&&gudhub.filter([h],l[f].settings.filters_list).length>0){o=l[f];break}}else o=gudhub.mergeObjects(o,l[f])}return o}getInterpretation(e,t,r,i,a,s,l){const u=this;return new Promise(async(o,f)=>{var d=t&&t.data_type?t.data_type:r;d?gudhub.ghconstructor.getInstance(d).then(async function(h){if(h){var y=await u.getInterpretationObj(t,h.getTemplate().model,i,l,a,s);h.getInterpretation(e,y.id,d,t,a,s).then(function(m){o(gudhub.mergeObjects(m,y))},function(m){f()})}},function(h){}):console.error("Get Interpretation: data_type is undefined",r,t)})}async getInterpretationById(e,t,r,i){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:null,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,l=a??await this.gudhub.getFieldValue(e,t,r),u=s??await this.gudhub.getField(e,r);if(u==null)return"";const f=await(await this.gudhub.ghconstructor.getInstance(u.data_type)).getInterpretation(l,i,u.data_type,u,t,e);return f.html=="<span>no interpretation</span>"?l:f.html}}function WebsocketHandler(n,e){switch(e.api){case"/items/update":console.log("/items/update - ",e),n.itemProcessor.updateItemsInStorage(e.app_id,e.response);break;case"/items/add":console.log("/items/add - ",e),n.itemProcessor.addItemsToStorage(e.app_id,e.response);break;case"/items/delete":console.log("/items/delete - ",e),n.itemProcessor.deleteItemsFromStorage(e.app_id,e.response);break;case"/app/update":console.log("/app/update - ",e),n.appProcessor.updateAppFieldsAndViews(e.response);break;case"/file/delete":console.log("file/delete - ",e),n.fileManager.deleteFileFromStorage(e.response.file_id,e.app_id);break;case"/file/upload":console.log("file/upload - ",e),n.fileManager.addFileToStorage(e.app_id,e.response);break;case"/file/formupload":console.log("file/formupload - ",e);break;case"/file/update":n.fileManager.updateFileInStorage(e.response.file_id,e.response.app_id,e.response),console.log("file/update - ",e);break;case"/new/file/duplicate":n.fileManager.addFilesToStorage(e.app_id,e.response),console.log("new/file/duplicate - ",e);break;case"/api/new/document/insert-one":n.documentManager.emitDocumentInsert(e.response),console.log("/api/new/document/insert-one - ",e);break;case"/ws/emit-to-user":console.log("/ws/emit-to-user - ",e);break;case"/ws/broadcast-to-app-subscribers":console.log("/ws/broadcast-to-app-subscribers - ",e);const t=JSON.parse(e.response);if(!t.data_type)return;n.ghconstructor.getInstance(t.data_type).then(r=>{r.onMessage(e.app_id,e.user_id,t)});break;default:console.warn("WEBSOCKETS is not process this API:",e.api)}}class GroupManager{constructor(e,t){this.req=t,this.gudhub=e}async createGroupApi(e){try{const t={token:await this.gudhub.auth.getToken(),group_name:e};return await this.req.post({url:"/api/sharing-group/create-group",form:t})}catch(t){return console.log(t),null}}async updateGroupApi(e,t){try{const r={token:await this.gudhub.auth.getToken(),group_name:t,group_id:e};return await this.req.post({url:"/api/sharing-group/update-group",form:r})}catch(r){return console.log(r),null}}async deleteGroupApi(e){try{const t={token:await this.gudhub.auth.getToken(),group_id:e};return await this.req.post({url:"/api/sharing-group/delete-group",form:t})}catch(t){return console.log(t),null}}async addUserToGroupApi(e,t,r){try{const i={token:await this.gudhub.auth.getToken(),group_id:e,user_id:t,group_permission:r};return await this.req.post({url:"/api/sharing-group/add-user-to-group",form:i})}catch(i){return console.log(i),null}}async getUsersByGroupApi(e){try{const t={token:await this.gudhub.auth.getToken(),group_id:e};return await this.req.post({url:"/api/sharing-group/get-users-by-group",form:t})}catch(t){return console.log(t),null}}async updateUserInGroupApi(e,t,r){try{const i={token:await this.gudhub.auth.getToken(),user_id:e,group_id:t,group_permission:r};return await this.req.post({url:"/api/sharing-group/update-user-in-group",form:i})}catch(i){return console.log(i),null}}async deleteUserFromGroupApi(e,t){try{const r={token:await this.gudhub.auth.getToken(),user_id:e,group_id:t};return await this.req.post({url:"/api/sharing-group/delete-user-from-group",form:r})}catch(r){return console.log(r),null}}async getGroupsByUserApi(e){try{const t={token:await this.gudhub.auth.getToken(),user_id:e};return await this.req.post({url:"/api/sharing-group/get-groups-by-user",form:t})}catch(t){return console.log(t),null}}}class AppGroupSharing{constructor(e,t){this.req=t,this.gudhub=e}async addAppToGroupApi(e,t,r){try{const i={token:await this.gudhub.auth.getToken(),app_id:e,group_id:t,app_permission:r};return await this.req.post({url:"/api/sharing-group/add-app-to-group",form:i})}catch(i){return console.log(i),null}}async getAppsByGroupApi(e){try{const t={token:await this.gudhub.auth.getToken(),group_id:e};return await this.req.post({url:"/api/sharing-group/get-apps-by-group",form:t})}catch(t){return console.log(t),null}}async updateAppInGroupApi(e,t,r){try{const i={token:await this.gudhub.auth.getToken(),group_id:t,app_id:e,app_permission:r};return await this.req.post({url:"/api/sharing-group/update-app-in-group",form:i})}catch(i){return console.log(i),null}}async deleteAppFromGroupApi(e,t,r){try{const i={token:await this.gudhub.auth.getToken(),group_id:t,app_id:e,app_permission:r};return await this.req.post({url:"/api/sharing-group/delete-app-from-group",form:i})}catch(i){return console.log(i),null}}async getGroupsByAppApi(e){try{const t={token:await this.gudhub.auth.getToken(),app_id:e};return await this.req.post({url:"/api/sharing-group/get-groups-by-app",form:t})}catch(t){return console.log(t),null}}}class GroupSharing{constructor(e,t,r){this.req=t,this.gudhub=e,this.pipeService=r,this.groupManager=new GroupManager(e,t),this.appGroupSharing=new AppGroupSharing(e,t)}createGroup(e){return this.groupManager.createGroupApi(e)}updateGroup(e,t){return this.groupManager.updateGroupApi(e,t)}deleteGroup(e){return this.groupManager.deleteGroupApi(e)}async addUserToGroup(e,t,r){let i=await this.groupManager.addUserToGroupApi(e,t,r);return this.pipeService.emit("group_members_add",{app_id:"group_sharing"},i),i}getUsersByGroup(e){return this.groupManager.getUsersByGroupApi(e)}async updateUserInGroup(e,t,r){let i=await this.groupManager.updateUserInGroupApi(e,t,r);return this.pipeService.emit("group_members_update",{app_id:"group_sharing"},i),i}async deleteUserFromGroup(e,t){let r=await this.groupManager.deleteUserFromGroupApi(e,t);return this.pipeService.emit("group_members_delete",{app_id:"group_sharing"},r),r}getGroupsByUser(e){return this.groupManager.getGroupsByUserApi(e)}addAppToGroup(e,t,r){return this.appGroupSharing.addAppToGroupApi(e,t,r)}getAppsByGroup(e){return this.appGroupSharing.getAppsByGroupApi(e)}updateAppInGroup(e,t,r){return this.appGroupSharing.updateAppInGroupApi(e,t,r)}deleteAppFromGroup(e,t,r){return this.appGroupSharing.deleteAppFromGroupApi(e,t,r)}getGroupsByApp(e){return this.appGroupSharing.getGroupsByAppApi(e)}}class Sharing{constructor(e,t){this.req=t,this.gudhub=e}async add(e,t,r){try{const i={token:await this.gudhub.auth.getToken(),app_id:e,user_id:t,sharing_permission:r};return await this.req.post({url:"/sharing/add",form:i})}catch(i){return console.log(i),null}}async update(e,t,r){try{const i={token:await this.gudhub.auth.getToken(),app_id:e,user_id:t,sharing_permission:r};return await this.req.post({url:"/sharing/update",form:i})}catch(i){return console.log(i),null}}async delete(e,t){try{const r={token:await this.gudhub.auth.getToken(),app_id:e,user_id:t};return await this.req.post({url:"/sharing/delete",form:r})}catch(r){return console.log(r),null}}async getAppUsers(e){try{const t={token:await this.gudhub.auth.getToken(),app_id:e};return await this.req.post({url:"/sharing/get-app-users",form:t})}catch(t){return console.log(t),null}}async addInvitation(e,t){try{const r={token:await this.gudhub.auth.getToken(),guests_emails:e,apps:t};return await this.req.post({url:"/api/invitation/add",form:r})}catch(r){return console.log(r),null}}}class WebSocketEmitter{constructor(e){this.gudhub=e}async emitToUser(e,t){const r={user_id:e,data:typeof t=="object"?JSON.stringify(t):t};return await this.gudhub.req.post({url:"/ws/emit-to-user",form:r})}async broadcastToAppSubscribers(e,t,r){const i={app_id:e,data:JSON.stringify({data_type:t,data:r})};return await this.gudhub.req.post({url:"/ws/broadcast-to-app-subscribers",form:i})}}class DataService{}let AppDataService$1=class extends DataService{constructor(e,t,r){super(),this.chunkDataService=new ChunkDataService(e,chunkDataServiceConf,r),this.gudhub=r}isWithCache(){return!1}async processRequestedApp(e,t){if(!this.isWithCache()){let r=await this.chunkDataService.getMergedChunkForIDList(e,t.chunks);return r&&(t.items_list=await this.gudhub.util.mergeChunks([r,t])),t}}};class AppAPI{constructor(e){this.req=e}async getApp(e){return this.req.get({url:"/api/app/get",params:{app_id:e}})}}let objectAssignWithOverride=function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];for(let i of t)if(i)for(let a of Object.keys(i)){const s=Object.getOwnPropertyDescriptor(i,a);s.enumerable&&Object.defineProperty(n,a,s)}};class HttpService{}class AppHttpService extends AppDataService$1{constructor(e,t,r){super(e,t,r),this.appApi=new AppAPI(e);let i=new HttpService(t);objectAssignWithOverride(this,i)}async getApp(e){let t=await this.appApi.getApp(e);return this.processRequestedApp(e,t)}async getAppWithoutProcessing(e){return this.appApi.getApp(e)}async putApp(e,t){}static[Symbol.hasInstance](e){try{return e instanceof AppHttpService||e instanceof HttpService}catch{return!1}}}let ChunkDataService$1=class extends DataService{getMergedChunkForIDList(e){}isWithCache(){return!1}};class ChunkAPI{constructor(e){this.req=e}async getChunk(e,t){return this.req.get({url:"".concat(this.req.root,"/api/get-items-chunk/").concat(e,"/").concat(t),method:"GET"})}async getLastChunk(e){return this.req.axiosRequest({url:"".concat(this.req.root,"/api/get-last-items-chunk/").concat(e),method:"GET"})}}class ChunkHttpService extends ChunkDataService$1{constructor(e,t){super(),this.chunkApi=new ChunkAPI(e);let r=new HttpService(t);objectAssignWithOverride(this,r)}async getChunk(e,t){return this.chunkApi.getChunk(e,t)}async getChunksForId(e){return[]}getCachedMergedChunk(e,t){}getMergedChunkForIDList(e,t){}putChunk(){}static[Symbol.hasInstance](e){try{return e instanceof ChunkHttpService||e instanceof HttpService}catch{return!1}}}const appsConf={store:"apps"},chunksConf={store:"chunks"},dbName="gudhub",chunksMergeConf={store:"chunksMergeCache"};class StoreBackend{}class IndexedDBManager extends StoreBackend{constructor(e,t){if(IndexedDBManager.dbNameToInstanceMap||(IndexedDBManager.dbNameToInstanceMap=new Map),IndexedDBManager.dbNameToInstanceMap.has(e))return IndexedDBManager.dbNameToInstanceMap.get(e);this.db=null,this.dbName=e,this.storeNameList=t,IndexedDBManager.dbNameToInstanceMap.set(e,this)}async checkAndCreateStore(e){const r=(await indexedDB.databases()).find(s=>s.name===this.dbName);let i=!1,a=this;return r&&(i=await new Promise((s,l)=>{const u=indexedDB.open(a.dbName);u.onsuccess=function(o){const f=o.target.result,d=f.objectStoreNames.contains(e);f.close(),s(d)},u.onerror=function(o){l(o.target.error)}})),i?!0:new Promise((s,l)=>{const u=indexedDB.open(a.dbName,r?r.version+1:1);u.onupgradeneeded=function(o){const f=o.target.result;f.objectStoreNames.contains(e)||f.createObjectStore(e)},u.onsuccess=function(o){o.target.result.close(),s()},u.onerror=l})}async openDB(){if(this.db)return this.db;let e,t,r=new Promise((s,l)=>{e=s,t=l});for(let s of this.storeNameList)await this.checkAndCreateStore(s);let i=this;const a=indexedDB.open(this.dbName);return a.onsuccess=s=>{i.db=s.target.result,e(this.db)},a.onerror=t,r}async executeOperation(e,t){let r=await this.openDB();return new Promise((i,a)=>{const s=r.transaction(e,"readwrite"),l=s.objectStore(e);s.oncomplete=()=>i(),s.onerror=u=>a("Transaction failed: ".concat(u.target.error));try{t(l)}catch(u){a("Operation failed: ".concat(u.message))}})}}const indexedDBStoreBackendSingleton=new IndexedDBManager(dbName,[appsConf.store,chunksConf.store,chunksMergeConf.store]);class BaseStoreManager{constructor(e,t){this.storeBackend=e,this.storeName=t}async addItem(e,t){return new Promise(async(r,i)=>{this.storeBackend.executeOperation(this.storeName,a=>{const s=a.add(t,e);s.onsuccess=r,s.onerror=i})})}async putItem(e,t){return new Promise(async(r,i)=>{this.storeBackend.executeOperation(this.storeName,a=>{const s=a.put(t,e);s.onsuccess=r,s.onerror=i})})}async hasItem(e){try{return!!await this.getItem(e)}catch{return!1}}async getItem(e){return new Promise(async(t,r)=>{this.storeBackend.executeOperation(this.storeName,i=>{const a=i.get(e);a.onsuccess=()=>{const s=a.result;t(s)},a.onerror=r})})}async updateItem(e,t){return new Promise(async(r,i)=>{this.storeBackend.executeOperation(this.storeName,a=>{const s=a.get(e);s.onsuccess=()=>{const l=s.result;Object.assign(l,t),a.put(l,e),r()},s.onerror=i})})}async deleteItem(e){return new Promise(async(t,r)=>{this.storeBackend.executeOperation(this.storeName,i=>{const a=i.delete(e);a.onsuccess=t,a.onerror=r})})}}class AppStoreManager extends BaseStoreManager{constructor(){super(indexedDBStoreBackendSingleton,appsConf.store)}async getApp(e){return this.getItem(e)}async addApp(e,t){return this.addItem(e,t)}async putApp(e,t){return this.putItem(e,t)}async hasApp(e){return this.hasItem(e)}async deleteApp(e){return this.deleteItem(e)}}class MergedChunksStoreManager extends BaseStoreManager{constructor(){super(indexedDBStoreBackendSingleton,chunksMergeConf.store)}async get(e){return this.getItem(e)}async add(e,t){return this.addItem(e,t)}async put(e,t){return this.putItem(e,t)}async delete(e){return this.deleteItem(e)}}class IndexedDBChunkService extends ChunkDataService$1{constructor(e,t,r){super(e,t),this.dataService=new ChunkHttpService(e),this.requestCache=new Map,this.gudhub=r,this.storeManager=new MergedChunksStoreManager}static[Symbol.hasInstance](e){try{return e instanceof IndexedDBChunkService}catch{return!1}}async getCachedMergedChunk(e,t){try{return(await this.storeManager.get(e)).mergedData}catch{const i=t.map(l=>this.dataService.getChunk(e,l)),a=await Promise.all(i);let s=await this.gudhub.util.mergeChunks(a);return this.putMergedChunks(e,{hashes:t,mergedData:{items_list:s}}),{items_list:s}}}isWithCache(){return!0}async getMergedChunkForApp(e){}async getMergedChunkForIDList(e,t){try{let r=!0,i=await this.storeManager.get(e);try{if(t.length<i.hashes.length)throw new Error;for(let u of i.hashes)t.indexOf(u)!=i.hashes.indexOf(u)&&(r=!1)}catch{r=!1}let a=[],s=[];if(t.length>i.hashes.length&&(a=t.slice(i.hashes.length)),r||(a=t),a.length>0){const u=a.map(o=>this.dataService.getChunk(e,o));s=await Promise.all(u)}let l;return r||(l=await this.gudhub.util.mergeChunks([...s])),r&&(l=await this.gudhub.util.mergeChunks([i.mergedData,...s])),a.length>0&&this.putMergedChunks(e,{hashes:t,mergedData:{items_list:l}}),{items_list:l}}catch{const i=t.map(l=>this.dataService.getChunk(e,l)),a=await Promise.all(i);let s=await this.gudhub.util.mergeChunks(a);return this.putMergedChunks(e,{hashes:t,mergedData:{items_list:s}}),{items_list:s}}}async putMergedChunks(e,t){return this.storeManager.put(e,t)}}const jsContent=`(function(){"use strict";(()=>{let Ut,vt,Tr,Gt;var le=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};function G(n){return n&&n.__esModule?n.default:n}function Pr(n,e,t,r){Object.defineProperty(n,e,{get:t,set:r,enumerable:!0,configurable:!0})}var Wt={},wt={},A=le.parcelRequire94c2;A==null&&((A=function(n){if(n in Wt)return Wt[n].exports;if(n in wt){var e=wt[n];delete wt[n];var t={id:n,exports:{}};return Wt[n]=t,e.call(t.exports,t,t.exports),t.exports}var r=Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}).register=function(n,e){wt[n]=e},le.parcelRequire94c2=A);var L=A.register;L("1ufAB",function(n,e){var t=A("iEaqd"),r=A("iNZzY"),a=A("2VbXH"),i=A("6Mx50");function l(u){var o=new a(u),p=r(a.prototype.request,o);return t.extend(p,a.prototype,o),t.extend(p,o),p}var s=l(A("bM4se"));s.Axios=a,s.create=function(u){return l(i(s.defaults,u))},s.Cancel=A("g2liO"),s.CancelToken=A("14PRn"),s.isCancel=A("8kGOw"),s.all=function(u){return Promise.all(u)},s.spread=A("i3hBo"),s.isAxiosError=A("dhYWP"),n.exports=s,n.exports.default=s}),L("iEaqd",function(n,e){var t=A("iNZzY"),r=Object.prototype.toString;function a(I){return r.call(I)==="[object Array]"}function i(I){return I===void 0}function l(I){return I!==null&&!i(I)&&I.constructor!==null&&!i(I.constructor)&&typeof I.constructor.isBuffer=="function"&&I.constructor.isBuffer(I)}function s(I){return r.call(I)==="[object ArrayBuffer]"}function u(I){return typeof FormData<"u"&&I instanceof FormData}function o(I){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(I):I&&I.buffer&&I.buffer instanceof ArrayBuffer}function p(I){return typeof I=="string"}function m(I){return typeof I=="number"}function d(I){return I!==null&&typeof I=="object"}function y(I){if(r.call(I)!=="[object Object]")return!1;var F=Object.getPrototypeOf(I);return F===null||F===Object.prototype}function f(I){return r.call(I)==="[object Date]"}function S(I){return r.call(I)==="[object File]"}function v(I){return r.call(I)==="[object Blob]"}function w(I){return r.call(I)==="[object Function]"}function g(I){return d(I)&&w(I.pipe)}function _(I){return typeof URLSearchParams<"u"&&I instanceof URLSearchParams}function $(I){return I.trim?I.trim():I.replace(/^\\s+|\\s+$/g,"")}function x(){return(typeof navigator>"u"||navigator.product!=="ReactNative"&&navigator.product!=="NativeScript"&&navigator.product!=="NS")&&typeof window<"u"&&typeof document<"u"}function T(I,F){if(I!=null)if(typeof I!="object"&&(I=[I]),a(I))for(var C=0,B=I.length;C<B;C++)F.call(null,I[C],C,I);else for(var V in I)Object.prototype.hasOwnProperty.call(I,V)&&F.call(null,I[V],V,I)}function P(){var I={};function F(V,X){y(I[X])&&y(V)?I[X]=P(I[X],V):y(V)?I[X]=P({},V):a(V)?I[X]=V.slice():I[X]=V}for(var C=0,B=arguments.length;C<B;C++)T(arguments[C],F);return I}function D(I,F,C){return T(F,function(B,V){C&&typeof B=="function"?I[V]=t(B,C):I[V]=B}),I}function R(I){return I.charCodeAt(0)===65279&&(I=I.slice(1)),I}n.exports={isArray:a,isArrayBuffer:s,isBuffer:l,isFormData:u,isArrayBufferView:o,isString:p,isNumber:m,isObject:d,isPlainObject:y,isUndefined:i,isDate:f,isFile:S,isBlob:v,isFunction:w,isStream:g,isURLSearchParams:_,isStandardBrowserEnv:x,forEach:T,merge:P,extend:D,trim:$,stripBOM:R}}),L("iNZzY",function(n,e){n.exports=function(t,r){return function(){for(var a=Array(arguments.length),i=0;i<a.length;i++)a[i]=arguments[i];return t.apply(r,a)}}}),L("2VbXH",function(n,e){var t=A("iEaqd"),r=A("gWG2h"),a=A("4m3Da"),i=A("d4try"),l=A("6Mx50"),s=A("hiYAY"),u=s.validators;function o(p){this.defaults=p,this.interceptors={request:new a,response:new a}}o.prototype.request=function(p){typeof p=="string"?(p=arguments[1]||{},p.url=arguments[0]):p=p||{},(p=l(this.defaults,p)).method?p.method=p.method.toLowerCase():this.defaults.method?p.method=this.defaults.method.toLowerCase():p.method="get";var m,d=p.transitional;d!==void 0&&s.assertOptions(d,{silentJSONParsing:u.transitional(u.boolean,"1.0.0"),forcedJSONParsing:u.transitional(u.boolean,"1.0.0"),clarifyTimeoutError:u.transitional(u.boolean,"1.0.0")},!1);var y=[],f=!0;this.interceptors.request.forEach(function($){(typeof $.runWhen!="function"||$.runWhen(p)!==!1)&&(f=f&&$.synchronous,y.unshift($.fulfilled,$.rejected))});var S=[];if(this.interceptors.response.forEach(function($){S.push($.fulfilled,$.rejected)}),!f){var v=[i,void 0];for(Array.prototype.unshift.apply(v,y),v=v.concat(S),m=Promise.resolve(p);v.length;)m=m.then(v.shift(),v.shift());return m}for(var w=p;y.length;){var g=y.shift(),_=y.shift();try{w=g(w)}catch($){_($);break}}try{m=i(w)}catch($){return Promise.reject($)}for(;S.length;)m=m.then(S.shift(),S.shift());return m},o.prototype.getUri=function(p){return r((p=l(this.defaults,p)).url,p.params,p.paramsSerializer).replace(/^\\?/,"")},t.forEach(["delete","get","head","options"],function(p){o.prototype[p]=function(m,d){return this.request(l(d||{},{method:p,url:m,data:(d||{}).data}))}}),t.forEach(["post","put","patch"],function(p){o.prototype[p]=function(m,d,y){return this.request(l(y||{},{method:p,url:m,data:d}))}}),n.exports=o}),L("gWG2h",function(n,e){var t=A("iEaqd");function r(a){return encodeURIComponent(a).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}n.exports=function(a,i,l){if(!i)return a;if(l)s=l(i);else if(t.isURLSearchParams(i))s=i.toString();else{var s,u=[];t.forEach(i,function(p,m){p!=null&&(t.isArray(p)?m+="[]":p=[p],t.forEach(p,function(d){t.isDate(d)?d=d.toISOString():t.isObject(d)&&(d=JSON.stringify(d)),u.push(r(m)+"="+r(d))}))}),s=u.join("&")}if(s){var o=a.indexOf("#");o!==-1&&(a=a.slice(0,o)),a+=(a.indexOf("?")===-1?"?":"&")+s}return a}}),L("4m3Da",function(n,e){var t=A("iEaqd");function r(){this.handlers=[]}r.prototype.use=function(a,i,l){return this.handlers.push({fulfilled:a,rejected:i,synchronous:!!l&&l.synchronous,runWhen:l?l.runWhen:null}),this.handlers.length-1},r.prototype.eject=function(a){this.handlers[a]&&(this.handlers[a]=null)},r.prototype.forEach=function(a){t.forEach(this.handlers,function(i){i!==null&&a(i)})},n.exports=r}),L("d4try",function(n,e){var t=A("iEaqd"),r=A("gu59S"),a=A("8kGOw"),i=A("bM4se");function l(s){s.cancelToken&&s.cancelToken.throwIfRequested()}n.exports=function(s){return l(s),s.headers=s.headers||{},s.data=r.call(s,s.data,s.headers,s.transformRequest),s.headers=t.merge(s.headers.common||{},s.headers[s.method]||{},s.headers),t.forEach(["delete","get","head","post","put","patch","common"],function(u){delete s.headers[u]}),(s.adapter||i.adapter)(s).then(function(u){return l(s),u.data=r.call(s,u.data,u.headers,s.transformResponse),u},function(u){return!a(u)&&(l(s),u&&u.response&&(u.response.data=r.call(s,u.response.data,u.response.headers,s.transformResponse))),Promise.reject(u)})}}),L("gu59S",function(n,e){var t=A("iEaqd"),r=A("bM4se");n.exports=function(a,i,l){var s=this||r;return t.forEach(l,function(u){a=u.call(s,a,i)}),a}}),L("bM4se",function(n,e){var t=A("2dKjk"),r=A("iEaqd"),a=A("4xE2z"),i=A("9na6w"),l={"Content-Type":"application/x-www-form-urlencoded"};function s(p,m){!r.isUndefined(p)&&r.isUndefined(p["Content-Type"])&&(p["Content-Type"]=m)}function u(p,m,d){if(r.isString(p))try{return(m||JSON.parse)(p),r.trim(p)}catch(y){if(y.name!=="SyntaxError")throw y}return(0,JSON.stringify)(p)}var o={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:function(){var p;return(typeof XMLHttpRequest<"u"||t!==void 0&&Object.prototype.toString.call(t)==="[object process]")&&(p=A("kHaX1")),p}(),transformRequest:[function(p,m){return a(m,"Accept"),a(m,"Content-Type"),r.isFormData(p)||r.isArrayBuffer(p)||r.isBuffer(p)||r.isStream(p)||r.isFile(p)||r.isBlob(p)?p:r.isArrayBufferView(p)?p.buffer:r.isURLSearchParams(p)?(s(m,"application/x-www-form-urlencoded;charset=utf-8"),p.toString()):r.isObject(p)||m&&m["Content-Type"]==="application/json"?(s(m,"application/json"),u(p)):p}],transformResponse:[function(p){var m=this.transitional,d=m&&m.silentJSONParsing,y=m&&m.forcedJSONParsing,f=!d&&this.responseType==="json";if(f||y&&r.isString(p)&&p.length)try{return JSON.parse(p)}catch(S){if(f)throw S.name==="SyntaxError"?i(S,this,"E_JSON_PARSE"):S}return p}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(p){return p>=200&&p<300}};o.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],function(p){o.headers[p]={}}),r.forEach(["post","put","patch"],function(p){o.headers[p]=r.merge(l)}),n.exports=o}),L("2dKjk",function(n,e){var t,r,a,i=n.exports={};function l(){throw Error("setTimeout has not been defined")}function s(){throw Error("clearTimeout has not been defined")}function u(w){if(t===setTimeout)return setTimeout(w,0);if((t===l||!t)&&setTimeout)return t=setTimeout,setTimeout(w,0);try{return t(w,0)}catch{try{return t.call(null,w,0)}catch{return t.call(this,w,0)}}}function o(w){if(r===clearTimeout)return clearTimeout(w);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(w);try{return r(w)}catch{try{return r.call(null,w)}catch{return r.call(this,w)}}}(function(){try{t=typeof setTimeout=="function"?setTimeout:l}catch{t=l}try{r=typeof clearTimeout=="function"?clearTimeout:s}catch{r=s}})();var p=[],m=!1,d=-1;function y(){m&&a&&(m=!1,a.length?p=a.concat(p):d=-1,p.length&&f())}function f(){if(!m){var w=u(y);m=!0;for(var g=p.length;g;){for(a=p,p=[];++d<g;)a&&a[d].run();d=-1,g=p.length}a=null,m=!1,o(w)}}function S(w,g){this.fun=w,this.array=g}function v(){}i.nextTick=function(w){var g=Array(arguments.length-1);if(arguments.length>1)for(var _=1;_<arguments.length;_++)g[_-1]=arguments[_];p.push(new S(w,g)),p.length!==1||m||u(f)},S.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(w){return[]},i.binding=function(w){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(w){throw Error("process.chdir is not supported")},i.umask=function(){return 0}}),L("4xE2z",function(n,e){var t=A("iEaqd");n.exports=function(r,a){t.forEach(r,function(i,l){l!==a&&l.toUpperCase()===a.toUpperCase()&&(r[a]=i,delete r[l])})}}),L("9na6w",function(n,e){n.exports=function(t,r,a,i,l){return t.config=r,a&&(t.code=a),t.request=i,t.response=l,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}}),L("kHaX1",function(n,e){var t=A("iEaqd"),r=A("hAgIk"),a=A("gIEx2"),i=A("gWG2h"),l=A("e3Yo9"),s=A("lo19V"),u=A("eg6xZ"),o=A("iUqaj");n.exports=function(p){return new Promise(function(m,d){var y=p.data,f=p.headers,S=p.responseType;t.isFormData(y)&&delete f["Content-Type"];var v=new XMLHttpRequest;if(p.auth){var w=p.auth.username||"",g=p.auth.password?unescape(encodeURIComponent(p.auth.password)):"";f.Authorization="Basic "+btoa(w+":"+g)}var _=l(p.baseURL,p.url);function $(){if(v){var T="getAllResponseHeaders"in v?s(v.getAllResponseHeaders()):null,P=S&&S!=="text"&&S!=="json"?v.response:v.responseText,D={data:P,status:v.status,statusText:v.statusText,headers:T,config:p,request:v};r(m,d,D),v=null}}if(v.open(p.method.toUpperCase(),i(_,p.params,p.paramsSerializer),!0),v.timeout=p.timeout,"onloadend"in v?v.onloadend=$:v.onreadystatechange=function(){v&&v.readyState===4&&(v.status!==0||v.responseURL&&v.responseURL.indexOf("file:")===0)&&setTimeout($)},v.onabort=function(){v&&(d(o("Request aborted",p,"ECONNABORTED",v)),v=null)},v.onerror=function(){d(o("Network Error",p,null,v)),v=null},v.ontimeout=function(){var T="timeout of "+p.timeout+"ms exceeded";p.timeoutErrorMessage&&(T=p.timeoutErrorMessage),d(o(T,p,p.transitional&&p.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",v)),v=null},t.isStandardBrowserEnv()){var x=(p.withCredentials||u(_))&&p.xsrfCookieName?a.read(p.xsrfCookieName):void 0;x&&(f[p.xsrfHeaderName]=x)}"setRequestHeader"in v&&t.forEach(f,function(T,P){y===void 0&&P.toLowerCase()==="content-type"?delete f[P]:v.setRequestHeader(P,T)}),t.isUndefined(p.withCredentials)||(v.withCredentials=!!p.withCredentials),S&&S!=="json"&&(v.responseType=p.responseType),typeof p.onDownloadProgress=="function"&&v.addEventListener("progress",p.onDownloadProgress),typeof p.onUploadProgress=="function"&&v.upload&&v.upload.addEventListener("progress",p.onUploadProgress),p.cancelToken&&p.cancelToken.promise.then(function(T){v&&(v.abort(),d(T),v=null)}),y||(y=null),v.send(y)})}}),L("hAgIk",function(n,e){var t=A("iUqaj");n.exports=function(r,a,i){var l=i.config.validateStatus;!i.status||!l||l(i.status)?r(i):a(t("Request failed with status code "+i.status,i.config,null,i.request,i))}}),L("iUqaj",function(n,e){var t=A("9na6w");n.exports=function(r,a,i,l,s){return t(Error(r),a,i,l,s)}}),L("gIEx2",function(n,e){var t=A("iEaqd");n.exports=t.isStandardBrowserEnv()?function(){return{write:function(r,a,i,l,s,u){var o=[];o.push(r+"="+encodeURIComponent(a)),t.isNumber(i)&&o.push("expires="+new Date(i).toGMTString()),t.isString(l)&&o.push("path="+l),t.isString(s)&&o.push("domain="+s),u===!0&&o.push("secure"),document.cookie=o.join("; ")},read:function(r){var a=document.cookie.match(RegExp("(^|;\\\\s*)("+r+")=([^;]*)"));return a?decodeURIComponent(a[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()}),L("e3Yo9",function(n,e){var t=A("2rjk0"),r=A("5nGHC");n.exports=function(a,i){return a&&!t(i)?r(a,i):i}}),L("2rjk0",function(n,e){n.exports=function(t){return/^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(t)}}),L("5nGHC",function(n,e){n.exports=function(t,r){return r?t.replace(/\\/+$/,"")+"/"+r.replace(/^\\/+/,""):t}}),L("lo19V",function(n,e){var t=A("iEaqd"),r=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];n.exports=function(a){var i,l,s,u={};return a&&t.forEach(a.split(\`
|
|
99
|
+
\`),function(o){s=o.indexOf(":"),i=t.trim(o.substr(0,s)).toLowerCase(),l=t.trim(o.substr(s+1)),i&&!(u[i]&&r.indexOf(i)>=0)&&(i==="set-cookie"?u[i]=(u[i]?u[i]:[]).concat([l]):u[i]=u[i]?u[i]+", "+l:l)}),u}}),L("eg6xZ",function(n,e){var t=A("iEaqd");n.exports=t.isStandardBrowserEnv()?function(){var r,a=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");function l(s){var u=s;return a&&(i.setAttribute("href",u),u=i.href),i.setAttribute("href",u),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:i.pathname.charAt(0)==="/"?i.pathname:"/"+i.pathname}}return r=l(window.location.href),function(s){var u=t.isString(s)?l(s):s;return u.protocol===r.protocol&&u.host===r.host}}():function(){return function(){return!0}}()}),L("8kGOw",function(n,e){n.exports=function(t){return!!(t&&t.__CANCEL__)}}),L("6Mx50",function(n,e){var t=A("iEaqd");n.exports=function(r,a){a=a||{};var i={},l=["url","method","data"],s=["headers","auth","proxy","params"],u=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],o=["validateStatus"];function p(f,S){return t.isPlainObject(f)&&t.isPlainObject(S)?t.merge(f,S):t.isPlainObject(S)?t.merge({},S):t.isArray(S)?S.slice():S}function m(f){t.isUndefined(a[f])?t.isUndefined(r[f])||(i[f]=p(void 0,r[f])):i[f]=p(r[f],a[f])}t.forEach(l,function(f){t.isUndefined(a[f])||(i[f]=p(void 0,a[f]))}),t.forEach(s,m),t.forEach(u,function(f){t.isUndefined(a[f])?t.isUndefined(r[f])||(i[f]=p(void 0,r[f])):i[f]=p(void 0,a[f])}),t.forEach(o,function(f){f in a?i[f]=p(r[f],a[f]):f in r&&(i[f]=p(void 0,r[f]))});var d=l.concat(s).concat(u).concat(o),y=Object.keys(r).concat(Object.keys(a)).filter(function(f){return d.indexOf(f)===-1});return t.forEach(y,m),i}}),L("hiYAY",function(n,e){var t=A("bTAft"),r={};["object","boolean","number","function","string","symbol"].forEach(function(u,o){r[u]=function(p){return typeof p===u||"a"+(o<1?"n ":" ")+u}});var a={},i=t.version.split(".");function l(u,o){for(var p=o?o.split("."):i,m=u.split("."),d=0;d<3;d++){if(p[d]>m[d])return!0;if(p[d]<m[d])break}return!1}function s(u,o,p){if(typeof u!="object")throw TypeError("options must be an object");for(var m=Object.keys(u),d=m.length;d-- >0;){var y=m[d],f=o[y];if(f){var S=u[y],v=S===void 0||f(S,y,u);if(v!==!0)throw TypeError("option "+y+" must be "+v);continue}if(p!==!0)throw Error("Unknown option "+y)}}r.transitional=function(u,o,p){var m=o&&l(o);function d(y,f){return"[Axios v"+t.version+"] Transitional option '"+y+"'"+f+(p?". "+p:"")}return function(y,f,S){if(u===!1)throw Error(d(f," has been removed in "+o));return m&&!a[f]&&(a[f]=!0,console.warn(d(f," has been deprecated since v"+o+" and will be removed in the near future"))),!u||u(y,f,S)}},n.exports={isOlderVersion:l,assertOptions:s,validators:r}}),L("bTAft",function(n,e){n.exports=JSON.parse('{"_args":[["axios@0.21.4","/home/vitaly/Documents/work/gudhubclient/override_npm/gudhub"]],"_from":"axios@0.21.4","_id":"axios@0.21.4","_inBundle":false,"_integrity":"sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==","_location":"/axios","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"axios@0.21.4","name":"axios","escapedName":"axios","rawSpec":"0.21.4","saveSpec":null,"fetchSpec":"0.21.4"},"_requiredBy":["/"],"_resolved":"https://registry.npmjs.org/axios/-/axios-0.21.4.tgz","_spec":"0.21.4","_where":"/home/vitaly/Documents/work/gudhubclient/override_npm/gudhub","author":{"name":"Matt Zabriskie"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"bugs":{"url":"https://github.com/axios/axios/issues"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}],"dependencies":{"follow-redirects":"^1.14.0"},"description":"Promise based HTTP client for the browser and node.js","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"homepage":"https://axios-http.com","jsdelivr":"dist/axios.min.js","keywords":["xhr","http","ajax","promise","node"],"license":"MIT","main":"index.js","name":"axios","repository":{"type":"git","url":"git+https://github.com/axios/axios.git"},"scripts":{"build":"NODE_ENV=production grunt build","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","examples":"node ./examples/server.js","fix":"eslint --fix lib/**/*.js","postversion":"git push && git push --tags","preversion":"npm test","start":"node ./sandbox/server.js","test":"grunt test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"},"typings":"./index.d.ts","unpkg":"dist/axios.min.js","version":"0.21.4"}')}),L("g2liO",function(n,e){function t(r){this.message=r}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,n.exports=t}),L("14PRn",function(n,e){var t=A("g2liO");function r(a){if(typeof a!="function")throw TypeError("executor must be a function.");this.promise=new Promise(function(s){i=s});var i,l=this;a(function(s){l.reason||(l.reason=new t(s),i(l.reason))})}r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var a;return{token:new r(function(i){a=i}),cancel:a}},n.exports=r}),L("i3hBo",function(n,e){n.exports=function(t){return function(r){return t.apply(null,r)}}}),L("dhYWP",function(n,e){n.exports=function(t){return typeof t=="object"&&t.isAxiosError===!0}}),L("kfIQl",function(n,e){var t=typeof Symbol<"u"&&Symbol,r=A("lyEFc");n.exports=function(){return typeof t=="function"&&typeof Symbol=="function"&&typeof t("foo")=="symbol"&&typeof Symbol("bar")=="symbol"&&r()}}),L("lyEFc",function(n,e){n.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),a=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(a)!=="[object Symbol]")return!1;var i=42;for(r in t[r]=i,t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var l=Object.getOwnPropertySymbols(t);if(l.length!==1||l[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,r);if(s.value!==i||s.enumerable!==!0)return!1}return!0}}),L("bJ3CN",function(n,e){var t={__proto__:null,foo:{}},r=Object;n.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof r)}}),L("9cNUg",function(n,e){var t=A("hGGZx"),r=function(){return!!t};r.hasArrayLengthDefineBug=function(){if(!t)return null;try{return t([],"length",{value:1}).length!==1}catch{return!0}},n.exports=r}),L("hGGZx",function(n,e){var t=A("hMrGw")("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}n.exports=t}),L("hMrGw",function(n,e){var t=A("dUpie"),r=A("48xLS"),a=A("4Vqmv"),i=A("7x6DQ"),l=A("kPNod"),s=A("b9GfH"),u=A("8DBKi"),o=Function,p=function(H){try{return o('"use strict"; return ('+H+").constructor;")()}catch{}},m=Object.getOwnPropertyDescriptor;if(m)try{m({},"")}catch{m=null}var d=function(){throw new s},y=m?function(){try{return arguments.callee,d}catch{try{return m(arguments,"callee").get}catch{return d}}}():d,f=A("kfIQl")(),S=A("bJ3CN")(),v=Object.getPrototypeOf||(S?function(H){return H.__proto__}:null),w={},g=typeof Uint8Array<"u"&&v?v(Uint8Array):void 0,_={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":f&&v?v([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":w,"%AsyncGenerator%":w,"%AsyncGeneratorFunction%":w,"%AsyncIteratorPrototype%":w,"%Atomics%":typeof Atomics>"u"?void 0:Atomics,"%BigInt%":typeof BigInt>"u"?void 0:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?void 0:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?void 0:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":r,"%Float32Array%":typeof Float32Array>"u"?void 0:Float32Array,"%Float64Array%":typeof Float64Array>"u"?void 0:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?void 0:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":w,"%Int8Array%":typeof Int8Array>"u"?void 0:Int8Array,"%Int16Array%":typeof Int16Array>"u"?void 0:Int16Array,"%Int32Array%":typeof Int32Array>"u"?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f&&v?v(v([][Symbol.iterator]())):void 0,"%JSON%":typeof JSON=="object"?JSON:void 0,"%Map%":typeof Map>"u"?void 0:Map,"%MapIteratorPrototype%":typeof Map<"u"&&f&&v?v(new Map()[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?void 0:Promise,"%Proxy%":typeof Proxy>"u"?void 0:Proxy,"%RangeError%":a,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?void 0:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?void 0:Set,"%SetIteratorPrototype%":typeof Set<"u"&&f&&v?v(new Set()[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f&&v?v(""[Symbol.iterator]()):void 0,"%Symbol%":f?Symbol:void 0,"%SyntaxError%":l,"%ThrowTypeError%":y,"%TypedArray%":g,"%TypeError%":s,"%Uint8Array%":typeof Uint8Array>"u"?void 0:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?void 0:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?void 0:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>"u"?void 0:WeakMap,"%WeakRef%":typeof WeakRef>"u"?void 0:WeakRef,"%WeakSet%":typeof WeakSet>"u"?void 0:WeakSet};if(v)try{null.error}catch(H){var $=v(v(H));_["%Error.prototype%"]=$}var x=function H(ie){var ee;if(ie==="%AsyncFunction%")ee=p("async function () {}");else if(ie==="%GeneratorFunction%")ee=p("function* () {}");else if(ie==="%AsyncGeneratorFunction%")ee=p("async function* () {}");else if(ie==="%AsyncGenerator%"){var k=H("%AsyncGeneratorFunction%");k&&(ee=k.prototype)}else if(ie==="%AsyncIteratorPrototype%"){var O=H("%AsyncGenerator%");O&&v&&(ee=v(O.prototype))}return _[ie]=ee,ee},T={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},P=A("hweMw"),D=A("23C6u"),R=P.call(Function.call,Array.prototype.concat),I=P.call(Function.apply,Array.prototype.splice),F=P.call(Function.call,String.prototype.replace),C=P.call(Function.call,String.prototype.slice),B=P.call(Function.call,RegExp.prototype.exec),V=/[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g,X=/\\\\(\\\\)?/g,oe=function(H){var ie=C(H,0,1),ee=C(H,-1);if(ie==="%"&&ee!=="%")throw new l("invalid intrinsic syntax, expected closing \`%\`");if(ee==="%"&&ie!=="%")throw new l("invalid intrinsic syntax, expected opening \`%\`");var k=[];return F(H,V,function(O,N,K,se){k[k.length]=K?F(se,X,"$1"):N||O}),k},we=function(H,ie){var ee,k=H;if(D(T,k)&&(k="%"+(ee=T[k])[0]+"%"),D(_,k)){var O=_[k];if(O===w&&(O=x(k)),O===void 0&&!ie)throw new s("intrinsic "+H+" exists, but is not available. Please file an issue!");return{alias:ee,name:k,value:O}}throw new l("intrinsic "+H+" does not exist!")};n.exports=function(H,ie){if(typeof H!="string"||H.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ie!="boolean")throw new s('"allowMissing" argument must be a boolean');if(B(/^%?[^%]*%?$/,H)===null)throw new l("\`%\` may not be present anywhere but at the beginning and end of the intrinsic name");var ee=oe(H),k=ee.length>0?ee[0]:"",O=we("%"+k+"%",ie),N=O.name,K=O.value,se=!1,te=O.alias;te&&(k=te[0],I(ee,R([0,1],te)));for(var J=1,ce=!0;J<ee.length;J+=1){var re=ee[J],fe=C(re,0,1),Ae=C(re,-1);if((fe==='"'||fe==="'"||fe==="\`"||Ae==='"'||Ae==="'"||Ae==="\`")&&fe!==Ae)throw new l("property names with quotes must have matching quotes");if(re!=="constructor"&&ce||(se=!0),k+="."+re,D(_,N="%"+k+"%"))K=_[N];else if(K!=null){if(!(re in K)){if(!ie)throw new s("base intrinsic for "+H+" exists, but the property is not available.");return}if(m&&J+1>=ee.length){var Ie=m(K,re);K=(ce=!!Ie)&&"get"in Ie&&!("originalValue"in Ie.get)?Ie.get:K[re]}else ce=D(K,re),K=K[re];ce&&!se&&(_[N]=K)}}return K}}),L("dUpie",function(n,e){n.exports=Error}),L("48xLS",function(n,e){n.exports=EvalError}),L("4Vqmv",function(n,e){n.exports=RangeError}),L("7x6DQ",function(n,e){n.exports=ReferenceError}),L("kPNod",function(n,e){n.exports=SyntaxError}),L("b9GfH",function(n,e){n.exports=TypeError}),L("8DBKi",function(n,e){n.exports=URIError}),L("hweMw",function(n,e){var t=A("2Eytq");n.exports=Function.prototype.bind||t}),L("2Eytq",function(n,e){var t="Function.prototype.bind called on incompatible ",r=Object.prototype.toString,a=Math.max,i="[object Function]",l=function(o,p){for(var m=[],d=0;d<o.length;d+=1)m[d]=o[d];for(var y=0;y<p.length;y+=1)m[y+o.length]=p[y];return m},s=function(o,p){for(var m=[],d=p,y=0;d<o.length;d+=1,y+=1)m[y]=o[d];return m},u=function(o,p){for(var m="",d=0;d<o.length;d+=1)m+=o[d],d+1<o.length&&(m+=p);return m};n.exports=function(o){var p,m=this;if(typeof m!="function"||r.apply(m)!==i)throw TypeError(t+m);for(var d=s(arguments,1),y=function(){if(this instanceof p){var g=m.apply(this,l(d,arguments));return Object(g)===g?g:this}return m.apply(o,l(d,arguments))},f=a(0,m.length-d.length),S=[],v=0;v<f;v++)S[v]="$"+v;if(p=Function("binder","return function ("+u(S,",")+"){ return binder.apply(this,arguments); }")(y),m.prototype){var w=function(){};w.prototype=m.prototype,p.prototype=new w,w.prototype=null}return p}}),L("23C6u",function(n,e){var t=Function.prototype.call,r=Object.prototype.hasOwnProperty,a=A("hweMw");n.exports=a.call(t,r)}),L("5ZWAZ",function(n,e){function t(r){return n.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},n.exports.__esModule=!0,n.exports.default=n.exports,t(r)}n.exports=t,n.exports.__esModule=!0,n.exports.default=n.exports}),L("fgq5y",function(n,e){var t=A("f3Ywx").default;Object.defineProperty(n.exports,"__esModule",{value:!0}),n.exports.default=l;var r=t(A("a9VQw")),a=t(A("glRwo")),i=t(A("ayR3G"));function l(s,u){(0,i.default)(2,arguments);var o=(0,a.default)(s),p=(0,r.default)(u);return isNaN(p)?new Date(NaN):(p&&o.setDate(o.getDate()+p),o)}n.exports=n.exports.default}),L("f3Ywx",function(n,e){function t(r){return r&&r.__esModule?r:{default:r}}n.exports=t,n.exports.__esModule=!0,n.exports.default=n.exports}),L("a9VQw",function(n,e){function t(r){if(r===null||r===!0||r===!1)return NaN;var a=Number(r);return isNaN(a)?a:a<0?Math.ceil(a):Math.floor(a)}Object.defineProperty(n.exports,"__esModule",{value:!0}),n.exports.default=t,n.exports=n.exports.default}),L("glRwo",function(n,e){var t=A("f3Ywx").default;Object.defineProperty(n.exports,"__esModule",{value:!0}),n.exports.default=i;var r=t(A("5ZWAZ")),a=t(A("ayR3G"));function i(l){(0,a.default)(1,arguments);var s=Object.prototype.toString.call(l);return l instanceof Date||(0,r.default)(l)==="object"&&s==="[object Date]"?new Date(l.getTime()):typeof l=="number"||s==="[object Number]"?new Date(l):((typeof l=="string"||s==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use \`parseISO\` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(Error().stack)),new Date(NaN))}n.exports=n.exports.default}),L("ayR3G",function(n,e){function t(r,a){if(a.length<r)throw TypeError(r+" argument"+(r>1?"s":"")+" required, but only "+a.length+" present")}Object.defineProperty(n.exports,"__esModule",{value:!0}),n.exports.default=t,n.exports=n.exports.default}),L("byyO9",function(n,e){var t=A("f3Ywx").default;Object.defineProperty(n.exports,"__esModule",{value:!0}),n.exports.default=l;var r=t(A("a9VQw")),a=t(A("glRwo")),i=t(A("ayR3G"));function l(s,u){(0,i.default)(2,arguments);var o=(0,a.default)(s),p=(0,r.default)(u);if(isNaN(p))return new Date(NaN);if(!p)return o;var m=o.getDate(),d=new Date(o.getTime());return d.setMonth(o.getMonth()+p+1,0),m>=d.getDate()?d:(o.setFullYear(d.getFullYear(),d.getMonth(),m),o)}n.exports=n.exports.default}),L("hLz6R",function(n,e){var t=A("f3Ywx").default;Object.defineProperty(n.exports,"__esModule",{value:!0}),n.exports.default=s;var r=t(A("glRwo")),a=t(A("a9VQw")),i=t(A("ayR3G")),l=A("lmyOi");function s(u,o){(0,i.default)(1,arguments);var p,m,d,y,f,S,v,w,g=(0,l.getDefaultOptions)(),_=(0,a.default)((p=(m=(d=(y=o==null?void 0:o.weekStartsOn)!==null&&y!==void 0?y:o==null||(f=o.locale)===null||f===void 0||(S=f.options)===null||S===void 0?void 0:S.weekStartsOn)!==null&&d!==void 0?d:g.weekStartsOn)!==null&&m!==void 0?m:(v=g.locale)===null||v===void 0||(w=v.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&p!==void 0?p:0);if(!(_>=0&&_<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");var $=(0,r.default)(u),x=$.getDay(),T=(x<_?7:0)+x-_;return $.setDate($.getDate()-T),$.setHours(0,0,0,0),$}n.exports=n.exports.default}),L("lmyOi",function(n,e){Object.defineProperty(n.exports,"__esModule",{value:!0}),n.exports.getDefaultOptions=r,n.exports.setDefaultOptions=a;var t={};function r(){return t}function a(i){t=i}}),L("kmcAT",function(n,e){A("akXK4"),A("5xozB")}),L("akXK4",function(n,e){n.exports=A("1ufAB")}),L("5xozB",function(n,e){Pr(n.exports,"IS_BROWSER_MAIN_THREAD",()=>r),Pr(n.exports,"IS_BROWSER",()=>i);var t=A("2dKjk");let r=typeof window<"u"&&typeof document<"u",a=typeof self=="object"&&typeof WorkerGlobalScope<"u",i=r||a;t!==void 0&&t.versions!=null&&t.versions.node});var me=A("5xozB");let ca="https://gudhub.com/GudHub_Test",ua="wss://gudhub.com/GudHub/ws/app/",pa="https://gudhub.com/api/services/prod",da="build/latest/async_modules_node/",fa="build/latest/automation_modules/",ha="https://gudhub.com",Cr=!0,Nr=!1,Ke=!0;me.IS_BROWSER||(Ke=!1);var me=A("5xozB");class Mr{}class $t extends Mr{constructor(e,t,r){super(),this.chunkDataService=new vt(e,Gt,r),this.gudhub=r}isWithCache(){return!1}async processRequestedApp(e,t){if(!this.isWithCache()){let r=await this.chunkDataService.getMergedChunkForIDList(e,t.chunks);return r&&(t.items_list=await this.gudhub.util.mergeChunks([r,t])),t}}}class ma{constructor(e){this.req=e}async getApp(e){return this.req.get({url:"/api/app/get",params:{app_id:e}})}}let Rr=(n,...e)=>{for(let t of e)if(t)for(let r of Object.keys(t)){let a=Object.getOwnPropertyDescriptor(t,r);a.enumerable&&Object.defineProperty(n,r,a)}};class St{}class He extends $t{constructor(e,t,r){super(e,t,r),this.appApi=new ma(e),Rr(this,new St(t))}async getApp(e){let t=await this.appApi.getApp(e);return this.processRequestedApp(e,t)}async getAppWithoutProcessing(e){return this.appApi.getApp(e)}async putApp(e,t){}static[Symbol.hasInstance](e){try{return e instanceof He||e instanceof St}catch{return!1}}}class Fr extends Mr{getMergedChunkForIDList(e){}isWithCache(){return!1}}class ga{constructor(e){this.req=e}async getChunk(e,t){return this.req.get({url:\`\${this.req.root}/api/get-items-chunk/\${e}/\${t}\`,method:"GET"})}async getLastChunk(e){return this.req.axiosRequest({url:\`\${this.req.root}/api/get-last-items-chunk/\${e}\`,method:"GET"})}}class xt extends Fr{constructor(e,t){super(),this.chunkApi=new ga(e),Rr(this,new St(t))}async getChunk(e,t){return this.chunkApi.getChunk(e,t)}async getChunksForId(e){return[]}getCachedMergedChunk(e,t){}getMergedChunkForIDList(e,t){}putChunk(){}static[Symbol.hasInstance](e){try{return e instanceof xt||e instanceof St}catch{return!1}}}let Et={store:"apps"},Ht={store:"chunks"},ya="gudhub",zt={store:"chunksMergeCache"};class _a{}class ze extends _a{constructor(e,t){if(ze.dbNameToInstanceMap||(ze.dbNameToInstanceMap=new Map),ze.dbNameToInstanceMap.has(e))return ze.dbNameToInstanceMap.get(e);this.db=null,this.dbName=e,this.storeNameList=t,ze.dbNameToInstanceMap.set(e,this)}async checkAndCreateStore(e){let t=(await indexedDB.databases()).find(i=>i.name===this.dbName),r=!1,a=this;return t&&(r=await new Promise((i,l)=>{let s=indexedDB.open(a.dbName);s.onsuccess=function(u){let o=u.target.result,p=o.objectStoreNames.contains(e);o.close(),i(p)},s.onerror=function(u){l(u.target.error)}})),!!r||new Promise((i,l)=>{let s=indexedDB.open(a.dbName,t?t.version+1:1);s.onupgradeneeded=function(u){let o=u.target.result;o.objectStoreNames.contains(e)||o.createObjectStore(e)},s.onsuccess=function(u){u.target.result.close(),i()},s.onerror=l})}async openDB(){let e,t;if(this.db)return this.db;let r=new Promise((l,s)=>{e=l,t=s});for(let l of this.storeNameList)await this.checkAndCreateStore(l);let a=this,i=indexedDB.open(this.dbName);return i.onsuccess=l=>{a.db=l.target.result,e(this.db)},i.onerror=t,r}async executeOperation(e,t){let r=await this.openDB();return new Promise((a,i)=>{let l=r.transaction(e,"readwrite"),s=l.objectStore(e);l.oncomplete=()=>a(),l.onerror=u=>i(\`Transaction failed: \${u.target.error}\`);try{t(s)}catch(u){i(\`Operation failed: \${u.message}\`)}})}}let Lr=new ze(ya,[Et.store,Ht.store,zt.store]);class Dr{constructor(e,t){this.storeBackend=e,this.storeName=t}async addItem(e,t){return new Promise(async(r,a)=>{this.storeBackend.executeOperation(this.storeName,i=>{let l=i.add(t,e);l.onsuccess=r,l.onerror=a})})}async putItem(e,t){return new Promise(async(r,a)=>{this.storeBackend.executeOperation(this.storeName,i=>{let l=i.put(t,e);l.onsuccess=r,l.onerror=a})})}async hasItem(e){try{return!!await this.getItem(e)}catch{return!1}}async getItem(e){return new Promise(async(t,r)=>{this.storeBackend.executeOperation(this.storeName,a=>{let i=a.get(e);i.onsuccess=()=>{t(i.result)},i.onerror=r})})}async updateItem(e,t){return new Promise(async(r,a)=>{this.storeBackend.executeOperation(this.storeName,i=>{let l=i.get(e);l.onsuccess=()=>{let s=l.result;Object.assign(s,t),i.put(s,e),r()},l.onerror=a})})}async deleteItem(e){return new Promise(async(t,r)=>{this.storeBackend.executeOperation(this.storeName,a=>{let i=a.delete(e);i.onsuccess=t,i.onerror=r})})}}class qr extends Dr{constructor(){super(Lr,Et.store)}async getApp(e){return this.getItem(e)}async addApp(e,t){return this.addItem(e,t)}async putApp(e,t){return this.putItem(e,t)}async hasApp(e){return this.hasItem(e)}async deleteApp(e){return this.deleteItem(e)}}class ba extends Dr{constructor(){super(Lr,zt.store)}async get(e){return this.getItem(e)}async add(e,t){return this.addItem(e,t)}async put(e,t){return this.putItem(e,t)}async delete(e){return this.deleteItem(e)}}class st extends Fr{constructor(e,t,r){super(e,t),this.dataService=new xt(e),this.requestCache=new Map,this.gudhub=r,this.storeManager=new ba}static[Symbol.hasInstance](e){try{return e instanceof st}catch{return!1}}async getCachedMergedChunk(e,t){try{return(await this.storeManager.get(e)).mergedData}catch{let a=t.map(s=>this.dataService.getChunk(e,s)),i=await Promise.all(a),l=await this.gudhub.util.mergeChunks(i);return this.putMergedChunks(e,{hashes:t,mergedData:{items_list:l}}),{items_list:l}}}isWithCache(){return!0}async getMergedChunkForApp(e){}async getMergedChunkForIDList(e,t){try{let r,a=!0,i=await this.storeManager.get(e);try{if(t.length<i.hashes.length)throw Error();for(let u of i.hashes)t.indexOf(u)!=i.hashes.indexOf(u)&&(a=!1)}catch{a=!1}let l=[],s=[];if(t.length>i.hashes.length&&(l=t.slice(i.hashes.length)),a||(l=t),l.length>0){let u=l.map(o=>this.dataService.getChunk(e,o));s=await Promise.all(u)}return a||(r=await this.gudhub.util.mergeChunks([...s])),a&&(r=await this.gudhub.util.mergeChunks([i.mergedData,...s])),l.length>0&&this.putMergedChunks(e,{hashes:t,mergedData:{items_list:r}}),{items_list:r}}catch{let a=t.map(s=>this.dataService.getChunk(e,s)),i=await Promise.all(a),l=await this.gudhub.util.mergeChunks(i);return this.putMergedChunks(e,{hashes:t,mergedData:{items_list:l}}),{items_list:l}}}async putMergedChunks(e,t){return this.storeManager.put(e,t)}}let xe={INIT:1,REQUEST_APP:2,PROCESS_DATA:3,DECLINE_PROCESS_DATA_REQUEST:4};class Vt extends $t{constructor(e,t,r){super(e,t,r),this.dataService=new He(e,t,r),this.requestCache=new Map,this.gudhub=r,this.resolveFnMap=new Map,this.appRequestAndProcessWorker=new AppRequestWorkerScript,this.appRequestAndProcessWorker.postMessage({type:xe.INIT,gudhubSerialized:this.gudhub.serialized});let a=this;this.appRequestAndProcessWorker.onerror=function(i){},this.appRequestAndProcessWorker.onmessage=function(i){i.data.type==xe.REQUEST_APP&&a.resolveFnMap.has(i.data.id)&&a.resolveFnMap.get(i.data.id)(i.data.data),i.data.type==xe.PROCESS_DATA&&(a.gudhub.itemProcessor.handleDiff(i.data.id,i.data.compareRes),(i.data.viewListChanged||i.data.fieldListChanged)&&a.gudhub.appProcessor.updateAppFieldsAndViews(i.data.newVersion))},this.isWithCache(),this.storeManager=new qr}static[Symbol.hasInstance](e){try{return e instanceof Vt}catch{return!1}}isWithCache(){return!0}async getApp(e){if(this.requestCache.has(e))return this.requestCache.get(e);let t=this;await this.has(e);{let r=new Promise((a,i)=>{t.resolveFnMap.set(e,a)});return this.requestCache.set(e,r),this.appRequestAndProcessWorker.postMessage({type:xe.REQUEST_APP,id:e}),r}}async getCached(e){return this.storeManager.getApp(e)}async has(e){try{return this.storeManager.hasApp(e)}catch{}}async putApp(e,t){return this.storeManager.putApp(e,t)}}class Br extends $t{constructor(e,t,r){super(e,t,r),this.dataService=new He(e,null,r),this.requestCache=new Map,this.gudhub=r}isWithCache(){return!1}async getAppWithoutProcessing(e){let t=await this.dataService.getAppWithoutProcessing(e);return await this.putApp(e,t),t}async getApp(e){let t;if(this.requestCache.has(e))return this.requestCache.get(e);let r=new Promise((l,s)=>{t=l});this.requestCache.set(e,r);let a=await this.dataService.getAppWithoutProcessing(e),i=await this.processRequestedApp(e,a);return t(i),i}async has(e){return!1}async getCached(e){throw Error()}async putApp(e,t){throw Error()}}class va extends $t{constructor(e,t,r){super(e,t,r),this.dataService=new He(e,t,r),this.requestCache=new Map,this.gudhub=r,this.resolveFnMap=new Map,this.appRequestAndProcessWorker=new AppRequestWorkerScript,this.appRequestAndProcessWorker.postMessage({type:xe.INIT,gudhubSerialized:this.gudhub.serialized});let a=this;this.appRequestAndProcessWorker.onerror=function(i){},this.appRequestAndProcessWorker.onmessage=function(i){i.data.type==xe.REQUEST_APP&&a.resolveFnMap.has(i.data.id)&&a.resolveFnMap.get(i.data.id)(i.data.data),i.data.type==xe.PROCESS_DATA&&(a.gudhub.itemProcessor.handleDiff(i.data.id,i.data.compareRes),(i.data.viewListChanged||i.data.fieldListChanged)&&a.gudhub.appProcessor.updateAppFieldsAndViews(i.data.newVersion))},this.isWithCache(),this.storeManager=new qr}static[Symbol.hasInstance](e){try{return e instanceof Vt}catch{return!1}}isWithCache(){return!1}async getApp(e){if(this.requestCache.has(e))return this.requestCache.get(e);let t=new Promise((r,a)=>{self.resolveFnMap.set(e,r)});return this.requestCache.set(e,t),this.appRequestAndProcessWorker.postMessage({type:xe.REQUEST_APP,id:e}),t}async getCached(e){return this.storeManager.getApp(e)}async has(e){try{return this.storeManager.hasApp(e)}catch{}}async putApp(e,t){return this.storeManager.putApp(e,t)}}A("5xozB"),me.IS_BROWSER,me.IS_BROWSER&&Ke&&(Ut=va,Tr=Et),me.IS_BROWSER||(Ut=He),Ke&&(Ur=Br),me.IS_BROWSER&&Cr&&!Ke&&(vt=st,Gt=Ht),me.IS_BROWSER&&Cr&&Ke&&(vt=st,Gt=Ht),me.IS_BROWSER||(vt=xt);let Ur=Br,wa=st;var me=A("5xozB");class Gr{constructor(e,t,r,a,i,l,s){this.storage=e,this.pipeService=t,this.req=r,this.ws=a,this.applistReceived=!1,this.activateSW=l,this.util=i,this.appListeners(),this.dataService=s,this.appRequestCache=new Map}async createNewAppApi(e){try{let t=await this.req.post({url:"/api/app/create",form:{app:JSON.stringify(e)}});return t.from_apps_list=!0,t}catch(t){return console.log(t),null}}async updateAppApi(e){try{return await this.req.post({url:"/api/app/update",form:{app:JSON.stringify(e)}})}catch(t){return console.log(t),null}}async deleteAppApi(e){try{return await this.req.post({url:"/api/app/delete",form:{app_id:e}})}catch(t){return console.log(t),null}}async getAppListApi(){try{return(await this.req.get({url:"/api/applist/get"})).apps_list.map(e=>(e.from_apps_list=!0,e))}catch(e){return console.log(e),null}}getAppListFromStorage(){return this.storage.getAppsList()}getAppFromStorage(e){let t=this.storage.getApp(e);return t&&t.field_list.length?t:null}addNewAppToStorage(e){return this.storage.getAppsList().push(e)}saveAppInStorage(e){e.items_object={};for(let r=0;r<e.items_list.length;r++){e.items_object[e.items_list[r].item_id]={};for(let a=0;a<e.items_list[r].fields.length;a++)e.items_object[e.items_list[r].item_id][e.items_list[r].fields[a].field_id]=e.items_list[r].fields[a]}let t=this.storage.getApp(e.app_id);return t?(e.from_apps_list=t.from_apps_list,e.permission=t.permission,this.storage.updateApp(e)):(e.from_apps_list=!1,this.addNewAppToStorage(e)),this.getAppFromStorage(e.app_id)}updateAppFieldsAndViews(e){let t=this.getAppFromStorage(e.app_id);e.items_list=t.items_list,e.file_list=t.file_list,e.from_apps_list=t.from_apps_list,e.items_object=t.items_object,this.storage.updateApp(e),this.pipeService.emit("gh_app_views_update",{app_id:e.app_id},e.views_list),e.field_list.forEach(r=>{this.pipeService.emit("gh_model_update",{app_id:e.app_id,field_id:r.field_id},r)})}updateAppInStorage(e){this.storage.getApp(e.app_id)?(this.storage.updateApp(e),this.pipeService.emit("gh_app_update",{app_id:e.app_id},e),this.pipeService.emit("gh_items_update",{app_id:e.app_id},e.items_list)):this.addNewAppToStorage(e)}deletingAppFromStorage(e){let t=this.storage.getAppsList();return t.forEach((r,a)=>{r.app_id==e&&t.splice(a)}),t}updateAppsListInStorage(e=[]){for(let t of e){let r=this.storage.getApp(t.app_id);r?(r.from_apps_list=t.from_apps_list,r.permission=t.permission):this.addNewAppToStorage(t)}}async refreshApps(e=[]){for(let t of e)if(t!=null)try{let r=await this.dataService.getApp(t);if(r){r.items_object={};for(let a=0;a<r.items_list.length;a++){r.items_object[r.items_list[a].item_id]={};for(let i=0;i<r.items_list[a].fields.length;i++)r.items_object[r.items_list[a].item_id][r.items_list[a].fields[i].field_id]=r.items_list[a].fields[i]}this.updateAppInStorage(r),this.pipeService.emit("gh_app_views_update",{app_id:r.app_id},r.views_list)}}catch(r){console.log(r)}console.log("Apps refreshed: ",JSON.stringify(e))}async refreshAppsList(){let e=this.getAppListFromStorage(),t=(await this.getAppListApi()).map(r=>({...r,...e.find(a=>a.app_id===r.app_id)}));this.updateAppsListInStorage(t),this.pipeService.emit("gh_apps_list_refreshed",{})}async getAppsList(){let e=this.getAppListFromStorage();if(!this.applistReceived){let t=await this.getAppListApi();if(!t)return null;this.updateAppsListInStorage(t),this.applistReceived=!0,e=t}return e}async getAppInfo(e){let t=await this.getAppsList();return t?t.find(r=>r.app_id==e):null}async deleteApp(e){return await this.deleteAppApi(e),this.deletingAppFromStorage(e)}async getApp(e,t=!1){if(!e)return null;let r=this.getAppFromStorage(e);if(r)return r;if(this.appRequestCache.has(e))return this.appRequestCache.get(e);let a=this,i=new Promise(async(l,s)=>{try{let u=await a.dataService.getApp(e);u||s();let o=t?u:{...u,items_list:u.items_list.filter(p=>!p.trash)};o=t?o:{...o,field_list:o.field_list.filter(p=>!p.trash)},l(o),a.saveAppInStorage(o),a.ws.addSubscription(e)}catch{s()}});return a.appRequestCache.set(e,i),i}async updateApp(e){if(!e.views_list||!e.views_list.length||!e.show){let r=await this.getApp(e.app_id);e.views_list&&e.views_list.length||(e.views_list=r.views_list),e.show===void 0&&(e.show=r.show)}let t=await this.updateAppApi(e);return this.updateAppFieldsAndViews(t),t}async updateAppInfo(e={}){return this.pipeService.emit("gh_app_info_update",{app_id:e.app_id},e),this.updateApp(e)}async createNewApp(e){let t=await this.createNewAppApi(e);return t.items_object={},this.addNewAppToStorage(t),t}async getAppViews(e){if(e)return(await this.getApp(e)).views_list}clearAppProcessor(){this.getAppListPromises=null,this.getAppPromises={},this.applistReceived=!1}appListeners(){this.pipeService.onRoot("gh_app_get",{},async(e,t)=>{if(t&&t.app_id){let r=await this.getApp(t.app_id);this.pipeService.emit("gh_app_get",t,r)}}),this.pipeService.onRoot("gh_apps_list_get",{},async(e,t)=>{let r=await this.getAppsList();this.pipeService.emit("gh_apps_list_get",t,r)}),this.pipeService.onRoot("gh_delete_app",{},async(e,t)=>{let r=await this.deleteApp(t.app_id);this.pipeService.emit("gh_apps_list_update",{recipient:"all"},r)}),this.pipeService.onRoot("gh_app_update",{},async(e,t)=>{t.app.items_list=[],t.app.file_list=[];let r=await this.updateApp(t.app);this.pipeService.emit("gh_app_views_update",{app_id:r.app_id},r.views_list);let a=await this.getAppsList();this.pipeService.emit("gh_apps_list_update",{recipient:"all"},a),r.field_list.forEach(i=>{this.pipeService.emit("gh_model_update",{app_id:r.app_id,field_id:i.field_id},i)})}),this.pipeService.onRoot("gh_app_view_get",{},async(e,t)=>{if(t&&t.app_id){let r=await this.getApp(t.app_id);r.views_list.forEach((a,i)=>{a.view_id==t.view_id&&this.pipeService.emit("gh_app_view_get",t,r.views_list[i])})}}),this.pipeService.onRoot("gh_app_info_get",{},async(e,t)=>{let r=await this.getAppInfo(t.app_id);r&&this.pipeService.emit("gh_app_info_get",t,r)}),this.pipeService.onRoot("gh_app_info_update",{},async(e,t)=>{if(t&&t.app){let r=await this.updateAppInfo(t.app);this.pipeService.emit("gh_app_info_update",{app_id:t.app.app_id},r)}}),this.pipeService.onRoot("gh_app_create",{},async(e,t)=>{await this.createNewApp(t.app);let r=await this.getAppsList();this.pipeService.emit("gh_apps_list_update",{recipient:"all"},r)}),me.IS_BROWSER_MAIN_THREAD&&this.activateSW&&navigator.serviceWorker.addEventListener("message",async e=>{if(e.data.type==="refresh app"){let t=await this.getApp(e.data.payload.app_id);t&&this.util.compareAppsItemsLists(t.items_list,e.data.payload.items_list.filter(r=>!r.trash),({diff_fields_items:r,diff_fields_items_Ids:a,diff_items:i,newItems:l,deletedItems:s})=>{(i.length||l.length||s.length)&&(this.pipeService.emit("gh_items_update",{app_id:e.data.payload.app_id},e.data.payload.items_list.filter(u=>!u.trash)),i.forEach(u=>this.pipeService.emit("gh_item_update",{app_id:e.data.payload.app_id,item_id:u.item_id},u))),a.forEach(u=>{let o=r[u];o&&o.forEach(p=>{this.pipeService.emit("gh_value_update",{app_id:e.data.payload.app_id,item_id:u,field_id:p.field_id},p.field_value)})})}),e.data.payload.items_list=await this.util.mergeChunks([t,e.data.payload]),this.saveAppInStorage(e.data.payload)}})}}var gt=A("akXK4");function Wr(n=[]){return n.filter(e=>e.field_value!=null)}function $a(n={}){let e=Object.entries(n);return e.length?\`&\${e.map(([t,r])=>\`\${t}=\${r}\`).join("&")}\`:""}var kt={},Hr={},Jt={},ve=A("hMrGw"),Ve={},ve=A("hMrGw"),ot={},Qt=A("hweMw"),ve=A("hMrGw"),zr={},ve=A("hMrGw"),Yt={},ct=A("hGGZx"),Sa=A("kPNod"),$e=A("b9GfH"),lt={},ve=A("hMrGw"),At=ve("%Object.getOwnPropertyDescriptor%",!0);if(At)try{At([],"length")}catch{At=null}lt=At,Yt=function(n,e,t){if(!n||typeof n!="object"&&typeof n!="function")throw new $e("\`obj\` must be an object or a function\`");if(typeof e!="string"&&typeof e!="symbol")throw new $e("\`property\` must be a string or a symbol\`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new $e("\`nonEnumerable\`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new $e("\`nonWritable\`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new $e("\`nonConfigurable\`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new $e("\`loose\`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],s=!!lt&<(n,e);if(ct)ct(n,e,{configurable:i===null&&s?s.configurable:!i,enumerable:r===null&&s?s.enumerable:!r,value:t,writable:a===null&&s?s.writable:!a});else{if(!l&&(r||a||i))throw new Sa("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");n[e]=t}};var xa=A("9cNUg")(),$e=A("b9GfH"),Ea=ve("%Math.floor%");zr=function(n,e){if(typeof n!="function")throw new $e("\`fn\` is not a function");if(typeof e!="number"||e<0||e>4294967295||Ea(e)!==e)throw new $e("\`length\` must be a positive 32-bit integer");var t=arguments.length>2&&!!arguments[2],r=!0,a=!0;if("length"in n&<){var i=lt(n,"length");i&&!i.configurable&&(r=!1),i&&!i.writable&&(a=!1)}return(r||a||!t)&&(xa?Yt(n,"length",e,!0,!0):Yt(n,"length",e)),n};var $e=A("b9GfH"),Vr=ve("%Function.prototype.apply%"),Jr=ve("%Function.prototype.call%"),Qr=ve("%Reflect.apply%",!0)||Qt.call(Jr,Vr),ct=A("hGGZx"),ka=ve("%Math.max%");ot=function(n){if(typeof n!="function")throw new $e("a function is required");var e=Qr(Qt,Jr,arguments);return zr(e,1+ka(0,n.length-(arguments.length-1)),!0)};var Yr=function(){return Qr(Qt,Vr,arguments)};ct?ct(ot,"apply",{value:Yr}):ot.apply=Yr;var Aa=ot(ve("String.prototype.indexOf"));Ve=function(n,e){var t=ve(n,!!e);return typeof t=="function"&&Aa(n,".prototype.")>-1?ot(t):t};var Xr={},Xt=typeof Map=="function"&&Map.prototype,Kt=Object.getOwnPropertyDescriptor&&Xt?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,It=Xt&&Kt&&typeof Kt.get=="function"?Kt.get:null,Kr=Xt&&Map.prototype.forEach,Zt=typeof Set=="function"&&Set.prototype,er=Object.getOwnPropertyDescriptor&&Zt?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Ot=Zt&&er&&typeof er.get=="function"?er.get:null,Zr=Zt&&Set.prototype.forEach,Ia=typeof WeakMap=="function"&&WeakMap.prototype,ut=Ia?WeakMap.prototype.has:null,Oa=typeof WeakSet=="function"&&WeakSet.prototype,pt=Oa?WeakSet.prototype.has:null,ja=typeof WeakRef=="function"&&WeakRef.prototype,en=ja?WeakRef.prototype.deref:null,Ta=Boolean.prototype.valueOf,Pa=Object.prototype.toString,Ca=Function.prototype.toString,Na=String.prototype.match,tr=String.prototype.slice,De=String.prototype.replace,Ma=String.prototype.toUpperCase,tn=String.prototype.toLowerCase,rn=RegExp.prototype.test,nn=Array.prototype.concat,je=Array.prototype.join,Ra=Array.prototype.slice,an=Math.floor,rr=typeof BigInt=="function"?BigInt.prototype.valueOf:null,nr=Object.getOwnPropertySymbols,ar=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ze=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ye=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ze||!0)?Symbol.toStringTag:null,sn=Object.prototype.propertyIsEnumerable,on=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(n){return n.__proto__}:null);function ln(n,e){if(n===1/0||n===-1/0||n!=n||n&&n>-1e3&&n<1e3||rn.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof n=="number"){var r=n<0?-an(-n):an(n);if(r!==n){var a=String(r),i=tr.call(e,a.length+1);return De.call(a,t,"$&_")+"."+De.call(De.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return De.call(e,t,"$&_")}var ir={},cn=ir.custom,un=fn(cn)?cn:null;function pn(n,e,t){var r=(t.quoteStyle||e)==="double"?'"':"'";return r+n+r}function Fa(n){return De.call(String(n),/"/g,""")}function sr(n){return Be(n)==="[object Array]"&&(!ye||!(typeof n=="object"&&ye in n))}function La(n){return Be(n)==="[object Date]"&&(!ye||!(typeof n=="object"&&ye in n))}function dn(n){return Be(n)==="[object RegExp]"&&(!ye||!(typeof n=="object"&&ye in n))}function Da(n){return Be(n)==="[object Error]"&&(!ye||!(typeof n=="object"&&ye in n))}function qa(n){return Be(n)==="[object String]"&&(!ye||!(typeof n=="object"&&ye in n))}function Ba(n){return Be(n)==="[object Number]"&&(!ye||!(typeof n=="object"&&ye in n))}function Ua(n){return Be(n)==="[object Boolean]"&&(!ye||!(typeof n=="object"&&ye in n))}function fn(n){if(Ze)return n&&typeof n=="object"&&n instanceof Symbol;if(typeof n=="symbol")return!0;if(!n||typeof n!="object"||!ar)return!1;try{return ar.call(n),!0}catch{}return!1}function Ga(n){if(!n||typeof n!="object"||!rr)return!1;try{return rr.call(n),!0}catch{}return!1}Xr=function n(e,t,r,a){var i=t||{};if(qe(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw TypeError('option "quoteStyle" must be "single" or "double"');if(qe(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or \`null\`');var l=!qe(i,"customInspect")||i.customInspect;if(typeof l!="boolean"&&l!=="symbol")throw TypeError("option \\"customInspect\\", if provided, must be \`true\`, \`false\`, or \`'symbol'\`");if(qe(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw TypeError('option "indent" must be "\\\\t", an integer > 0, or \`null\`');if(qe(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw TypeError('option "numericSeparator", if provided, must be \`true\` or \`false\`');var s=i.numericSeparator;if(e===void 0)return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return mn(e,i);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var u=String(e);return s?ln(e,u):u}if(typeof e=="bigint"){var o=String(e)+"n";return s?ln(e,o):o}var p=i.depth===void 0?5:i.depth;if(r===void 0&&(r=0),r>=p&&p>0&&typeof e=="object")return sr(e)?"[Array]":"[Object]";var m=ei(i,r);if(a===void 0)a=[];else if(hn(a,e)>=0)return"[Circular]";function d(C,B,V){if(B&&(a=Ra.call(a)).push(B),V){var X={depth:i.depth};return qe(i,"quoteStyle")&&(X.quoteStyle=i.quoteStyle),n(C,X,r+1,a)}return n(C,i,r+1,a)}if(typeof e=="function"&&!dn(e)){var y=Ha(e),f=jt(e,d);return"[Function"+(y?": "+y:" (anonymous)")+"]"+(f.length>0?" { "+je.call(f,", ")+" }":"")}if(fn(e)){var S=Ze?De.call(String(e),/^(Symbol\\(.*\\))_[^)]*$/,"$1"):ar.call(e);return typeof e!="object"||Ze?S:dt(S)}if(Xa(e)){for(var v="<"+tn.call(String(e.nodeName)),w=e.attributes||[],g=0;g<w.length;g++)v+=" "+w[g].name+"="+pn(Fa(w[g].value),"double",i);return v+=">",e.childNodes&&e.childNodes.length&&(v+="..."),v+="</"+tn.call(String(e.nodeName))+">"}if(sr(e)){if(e.length===0)return"[]";var _=jt(e,d);return m&&!Za(_)?"["+lr(_,m)+"]":"[ "+je.call(_,", ")+" ]"}if(Da(e)){var $=jt(e,d);return"cause"in Error.prototype||!("cause"in e)||sn.call(e,"cause")?$.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+je.call($,", ")+" }":"{ ["+String(e)+"] "+je.call(nn.call("[cause]: "+d(e.cause),$),", ")+" }"}if(typeof e=="object"&&l){if(un&&typeof e[un]=="function"&&ir)return ir(e,{depth:p-r});if(l!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(za(e)){var x=[];return Kr&&Kr.call(e,function(C,B){x.push(d(B,e,!0)+" => "+d(C,e))}),gn("Map",It.call(e),x,m)}if(Qa(e)){var T=[];return Zr&&Zr.call(e,function(C){T.push(d(C,e))}),gn("Set",Ot.call(e),T,m)}if(Va(e))return or("WeakMap");if(Ya(e))return or("WeakSet");if(Ja(e))return or("WeakRef");if(Ba(e))return dt(d(Number(e)));if(Ga(e))return dt(d(rr.call(e)));if(Ua(e))return dt(Ta.call(e));if(qa(e))return dt(d(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(e===le)return"{ [object globalThis] }";if(!La(e)&&!dn(e)){var P=jt(e,d),D=on?on(e)===Object.prototype:e instanceof Object||e.constructor===Object,R=e instanceof Object?"":"null prototype",I=!D&&ye&&Object(e)===e&&ye in e?tr.call(Be(e),8,-1):R?"Object":"",F=(D||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"")+(I||R?"["+je.call(nn.call([],I||[],R||[]),": ")+"] ":"");return P.length===0?F+"{}":m?F+"{"+lr(P,m)+"}":F+"{ "+je.call(P,", ")+" }"}return String(e)};var Wa=Object.prototype.hasOwnProperty||function(n){return n in this};function qe(n,e){return Wa.call(n,e)}function Be(n){return Pa.call(n)}function Ha(n){if(n.name)return n.name;var e=Na.call(Ca.call(n),/^function\\s*([\\w$]+)/);return e?e[1]:null}function hn(n,e){if(n.indexOf)return n.indexOf(e);for(var t=0,r=n.length;t<r;t++)if(n[t]===e)return t;return-1}function za(n){if(!It||!n||typeof n!="object")return!1;try{It.call(n);try{Ot.call(n)}catch{return!0}return n instanceof Map}catch{}return!1}function Va(n){if(!ut||!n||typeof n!="object")return!1;try{ut.call(n,ut);try{pt.call(n,pt)}catch{return!0}return n instanceof WeakMap}catch{}return!1}function Ja(n){if(!en||!n||typeof n!="object")return!1;try{return en.call(n),!0}catch{}return!1}function Qa(n){if(!Ot||!n||typeof n!="object")return!1;try{Ot.call(n);try{It.call(n)}catch{return!0}return n instanceof Set}catch{}return!1}function Ya(n){if(!pt||!n||typeof n!="object")return!1;try{pt.call(n,pt);try{ut.call(n,ut)}catch{return!0}return n instanceof WeakSet}catch{}return!1}function Xa(n){return!!n&&typeof n=="object"&&(typeof HTMLElement<"u"&&n instanceof HTMLElement||typeof n.nodeName=="string"&&typeof n.getAttribute=="function")}function mn(n,e){if(n.length>e.maxStringLength){var t=n.length-e.maxStringLength,r="... "+t+" more character"+(t>1?"s":"");return mn(tr.call(n,0,e.maxStringLength),e)+r}return pn(De.call(De.call(n,/(['\\\\])/g,"\\\\$1"),/[\\x00-\\x1f]/g,Ka),"single",e)}function Ka(n){var e=n.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\\\"+t:"\\\\x"+(e<16?"0":"")+Ma.call(e.toString(16))}function dt(n){return"Object("+n+")"}function or(n){return n+" { ? }"}function gn(n,e,t,r){return n+" ("+e+") {"+(r?lr(t,r):je.call(t,", "))+"}"}function Za(n){for(var e=0;e<n.length;e++)if(hn(n[e],\`
|
|
100
|
+
\`)>=0)return!1;return!0}function ei(n,e){var t;if(n.indent===" ")t=" ";else{if(typeof n.indent!="number"||!(n.indent>0))return null;t=je.call(Array(n.indent+1)," ")}return{base:t,prev:je.call(Array(e+1),t)}}function lr(n,e){if(n.length===0)return"";var t=\`
|
|
101
|
+
\`+e.prev+e.base;return t+je.call(n,","+t)+\`
|
|
102
|
+
\`+e.prev}function jt(n,e){var t,r=sr(n),a=[];if(r){a.length=n.length;for(var i=0;i<n.length;i++)a[i]=qe(n,i)?e(n[i],n):""}var l=typeof nr=="function"?nr(n):[];if(Ze){t={};for(var s=0;s<l.length;s++)t["$"+l[s]]=l[s]}for(var u in n)if(qe(n,u)&&(!r||String(Number(u))!==u||!(u<n.length))){if(Ze&&t["$"+u]instanceof Symbol)continue;rn.call(/[^\\w$]/,u)?a.push(e(u,n)+": "+e(n[u],n)):a.push(u+": "+e(n[u],n))}if(typeof nr=="function")for(var o=0;o<l.length;o++)sn.call(n,l[o])&&a.push("["+e(l[o])+"]: "+e(n[l[o]],n));return a}var $e=A("b9GfH"),Tt=ve("%WeakMap%",!0),Pt=ve("%Map%",!0),ti=Ve("WeakMap.prototype.get",!0),ri=Ve("WeakMap.prototype.set",!0),ni=Ve("WeakMap.prototype.has",!0),ai=Ve("Map.prototype.get",!0),ii=Ve("Map.prototype.set",!0),si=Ve("Map.prototype.has",!0),cr=function(n,e){for(var t,r=n;(t=r.next)!==null;r=t)if(t.key===e)return r.next=t.next,t.next=n.next,n.next=t,t},oi=function(n,e){var t=cr(n,e);return t&&t.value},li=function(n,e,t){var r=cr(n,e);r?r.value=t:n.next={key:e,next:n.next,value:t}},ci=function(n,e){return!!cr(n,e)};Jt=function(){var n,e,t,r={assert:function(a){if(!r.has(a))throw new $e("Side channel does not contain "+Xr(a))},get:function(a){if(Tt&&a&&(typeof a=="object"||typeof a=="function")){if(n)return ti(n,a)}else if(Pt){if(e)return ai(e,a)}else if(t)return oi(t,a)},has:function(a){if(Tt&&a&&(typeof a=="object"||typeof a=="function")){if(n)return ni(n,a)}else if(Pt){if(e)return si(e,a)}else if(t)return ci(t,a);return!1},set:function(a,i){Tt&&a&&(typeof a=="object"||typeof a=="function")?(n||(n=new Tt),ri(n,a,i)):Pt?(e||(e=new Pt),ii(e,a,i)):(t||(t={key:{},next:null}),li(t,a,i))}};return r};var Ee={},Ue={},ui=String.prototype.replace,pi=/%20/g,ur={RFC1738:"RFC1738",RFC3986:"RFC3986"};Ue={default:ur.RFC3986,formatters:{RFC1738:function(n){return ui.call(n,pi,"+")},RFC3986:function(n){return String(n)}},RFC1738:ur.RFC1738,RFC3986:ur.RFC3986};var pr=Object.prototype.hasOwnProperty,Je=Array.isArray,Te=function(){for(var n=[],e=0;e<256;++e)n.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return n}(),di=function(n){for(;n.length>1;){var e=n.pop(),t=e.obj[e.prop];if(Je(t)){for(var r=[],a=0;a<t.length;++a)t[a]!==void 0&&r.push(t[a]);e.obj[e.prop]=r}}},yn=function(n,e){for(var t=e&&e.plainObjects?Object.create(null):{},r=0;r<n.length;++r)n[r]!==void 0&&(t[r]=n[r]);return t},fi=function n(e,t,r){if(!t)return e;if(typeof t!="object"){if(Je(e))e.push(t);else{if(!e||typeof e!="object")return[e,t];(r&&(r.plainObjects||r.allowPrototypes)||!pr.call(Object.prototype,t))&&(e[t]=!0)}return e}if(!e||typeof e!="object")return[e].concat(t);var a=e;return Je(e)&&!Je(t)&&(a=yn(e,r)),Je(e)&&Je(t)?(t.forEach(function(i,l){if(pr.call(e,l)){var s=e[l];s&&typeof s=="object"&&i&&typeof i=="object"?e[l]=n(s,i,r):e.push(i)}else e[l]=i}),e):Object.keys(t).reduce(function(i,l){var s=t[l];return pr.call(i,l)?i[l]=n(i[l],s,r):i[l]=s,i},a)},hi=function(n,e){return Object.keys(e).reduce(function(t,r){return t[r]=e[r],t},n)},mi=function(n,e,t){var r=n.replace(/\\+/g," ");if(t==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},gi=function(n,e,t,r,a){if(n.length===0)return n;var i=n;if(typeof n=="symbol"?i=Symbol.prototype.toString.call(n):typeof n!="string"&&(i=String(n)),t==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(o){return"%26%23"+parseInt(o.slice(2),16)+"%3B"});for(var l="",s=0;s<i.length;++s){var u=i.charCodeAt(s);if(u===45||u===46||u===95||u===126||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||a===Ue.RFC1738&&(u===40||u===41)){l+=i.charAt(s);continue}if(u<128){l+=Te[u];continue}if(u<2048){l+=Te[192|u>>6]+Te[128|63&u];continue}if(u<55296||u>=57344){l+=Te[224|u>>12]+Te[128|u>>6&63]+Te[128|63&u];continue}s+=1,l+=Te[240|(u=65536+((1023&u)<<10|1023&i.charCodeAt(s)))>>18]+Te[128|u>>12&63]+Te[128|u>>6&63]+Te[128|63&u]}return l},yi=function(n){for(var e=[{obj:{o:n},prop:"o"}],t=[],r=0;r<e.length;++r)for(var a=e[r],i=a.obj[a.prop],l=Object.keys(i),s=0;s<l.length;++s){var u=l[s],o=i[u];typeof o=="object"&&o!==null&&t.indexOf(o)===-1&&(e.push({obj:i,prop:u}),t.push(o))}return di(e),n},_i=function(n){return Object.prototype.toString.call(n)==="[object RegExp]"},bi=function(n){return!!n&&typeof n=="object"&&!!(n.constructor&&n.constructor.isBuffer&&n.constructor.isBuffer(n))},vi=function(n,e){return[].concat(n,e)},wi=function(n,e){if(Je(n)){for(var t=[],r=0;r<n.length;r+=1)t.push(e(n[r]));return t}return e(n)};Ee={arrayToObject:yn,assign:hi,combine:vi,compact:yi,decode:mi,encode:gi,isBuffer:bi,isRegExp:_i,maybeMap:wi,merge:fi};var $i=Object.prototype.hasOwnProperty,_n={brackets:function(n){return n+"[]"},comma:"comma",indices:function(n,e){return n+"["+e+"]"},repeat:function(n){return n}},Re=Array.isArray,Si=Array.prototype.push,bn=function(n,e){Si.apply(n,Re(e)?e:[e])},xi=Date.prototype.toISOString,vn=Ue.default,_e={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Ee.encode,encodeValuesOnly:!1,format:vn,formatter:Ue.formatters[vn],indices:!1,serializeDate:function(n){return xi.call(n)},skipNulls:!1,strictNullHandling:!1},Ei=function(n){return typeof n=="string"||typeof n=="number"||typeof n=="boolean"||typeof n=="symbol"||typeof n=="bigint"},dr={},ki=function n(e,t,r,a,i,l,s,u,o,p,m,d,y,f,S,v){for(var w,g=e,_=v,$=0,x=!1;(_=_.get(dr))!==void 0&&!x;){var T=_.get(e);if($+=1,T!==void 0){if(T===$)throw RangeError("Cyclic object value");x=!0}_.get(dr)===void 0&&($=0)}if(typeof u=="function"?g=u(t,g):g instanceof Date?g=m(g):r==="comma"&&Re(g)&&(g=Ee.maybeMap(g,function(X){return X instanceof Date?m(X):X})),g===null){if(i)return s&&!f?s(t,_e.encoder,S,"key",d):t;g=""}if(Ei(g)||Ee.isBuffer(g))return s?[y(f?t:s(t,_e.encoder,S,"key",d))+"="+y(s(g,_e.encoder,S,"value",d))]:[y(t)+"="+y(String(g))];var P=[];if(g===void 0)return P;if(r==="comma"&&Re(g))f&&s&&(g=Ee.maybeMap(g,s)),w=[{value:g.length>0?g.join(",")||null:void 0}];else if(Re(u))w=u;else{var D=Object.keys(g);w=o?D.sort(o):D}for(var R=a&&Re(g)&&g.length===1?t+"[]":t,I=0;I<w.length;++I){var F=w[I],C=typeof F=="object"&&F.value!==void 0?F.value:g[F];if(!l||C!==null){var B=Re(g)?typeof r=="function"?r(R,F):R:R+(p?"."+F:"["+F+"]");v.set(e,$);var V=Jt();V.set(dr,v),bn(P,n(C,B,r,a,i,l,r==="comma"&&f&&Re(g)?null:s,u,o,p,m,d,y,f,S,V))}}return P},Ai=function(n){if(!n)return _e;if(n.encoder!==null&&n.encoder!==void 0&&typeof n.encoder!="function")throw TypeError("Encoder has to be a function.");var e=n.charset||_e.charset;if(n.charset!==void 0&&n.charset!=="utf-8"&&n.charset!=="iso-8859-1")throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=Ue.default;if(n.format!==void 0){if(!$i.call(Ue.formatters,n.format))throw TypeError("Unknown format option provided.");t=n.format}var r=Ue.formatters[t],a=_e.filter;return(typeof n.filter=="function"||Re(n.filter))&&(a=n.filter),{addQueryPrefix:typeof n.addQueryPrefix=="boolean"?n.addQueryPrefix:_e.addQueryPrefix,allowDots:n.allowDots===void 0?_e.allowDots:!!n.allowDots,charset:e,charsetSentinel:typeof n.charsetSentinel=="boolean"?n.charsetSentinel:_e.charsetSentinel,delimiter:n.delimiter===void 0?_e.delimiter:n.delimiter,encode:typeof n.encode=="boolean"?n.encode:_e.encode,encoder:typeof n.encoder=="function"?n.encoder:_e.encoder,encodeValuesOnly:typeof n.encodeValuesOnly=="boolean"?n.encodeValuesOnly:_e.encodeValuesOnly,filter:a,format:t,formatter:r,serializeDate:typeof n.serializeDate=="function"?n.serializeDate:_e.serializeDate,skipNulls:typeof n.skipNulls=="boolean"?n.skipNulls:_e.skipNulls,sort:typeof n.sort=="function"?n.sort:null,strictNullHandling:typeof n.strictNullHandling=="boolean"?n.strictNullHandling:_e.strictNullHandling}};Hr=function(n,e){var t,r,a=n,i=Ai(e);typeof i.filter=="function"?a=i.filter("",a):Re(i.filter)&&(t=i.filter);var l=[];if(typeof a!="object"||a===null)return"";r=e&&e.arrayFormat in _n?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var s=_n[r];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw TypeError("\`commaRoundTrip\` must be a boolean, or absent");var u=s==="comma"&&e&&e.commaRoundTrip;t||(t=Object.keys(a)),i.sort&&t.sort(i.sort);for(var o=Jt(),p=0;p<t.length;++p){var m=t[p];i.skipNulls&&a[m]===null||bn(l,ki(a[m],m,s,u,i.strictNullHandling,i.skipNulls,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,o))}var d=l.join(i.delimiter),y=i.addQueryPrefix===!0?"?":"";return i.charsetSentinel&&(i.charset==="iso-8859-1"?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),d.length>0?y+d:""};var wn={},fr=Object.prototype.hasOwnProperty,Ii=Array.isArray,de={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Ee.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Oi=function(n){return n.replace(/&#(\\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},$n=function(n,e){return n&&typeof n=="string"&&e.comma&&n.indexOf(",")>-1?n.split(","):n},ji="utf8=%26%2310003%3B",Ti="utf8=%E2%9C%93",Pi=function(n,e){var t={__proto__:null},r=e.ignoreQueryPrefix?n.replace(/^\\?/,""):n,a=e.parameterLimit===1/0?void 0:e.parameterLimit,i=r.split(e.delimiter,a),l=-1,s=e.charset;if(e.charsetSentinel)for(u=0;u<i.length;++u)i[u].indexOf("utf8=")===0&&(i[u]===Ti?s="utf-8":i[u]===ji&&(s="iso-8859-1"),l=u,u=i.length);for(u=0;u<i.length;++u)if(u!==l){var u,o,p,m=i[u],d=m.indexOf("]="),y=d===-1?m.indexOf("="):d+1;y===-1?(o=e.decoder(m,de.decoder,s,"key"),p=e.strictNullHandling?null:""):(o=e.decoder(m.slice(0,y),de.decoder,s,"key"),p=Ee.maybeMap($n(m.slice(y+1),e),function(f){return e.decoder(f,de.decoder,s,"value")})),p&&e.interpretNumericEntities&&s==="iso-8859-1"&&(p=Oi(p)),m.indexOf("[]=")>-1&&(p=Ii(p)?[p]:p),fr.call(t,o)?t[o]=Ee.combine(t[o],p):t[o]=p}return t},Ci=function(n,e,t,r){for(var a=r?e:$n(e,t),i=n.length-1;i>=0;--i){var l,s=n[i];if(s==="[]"&&t.parseArrays)l=[].concat(a);else{l=t.plainObjects?Object.create(null):{};var u=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,o=parseInt(u,10);t.parseArrays||u!==""?!isNaN(o)&&s!==u&&String(o)===u&&o>=0&&t.parseArrays&&o<=t.arrayLimit?(l=[])[o]=a:u!=="__proto__"&&(l[u]=a):l={0:a}}a=l}return a},Ni=function(n,e,t,r){if(n){var a=t.allowDots?n.replace(/\\.([^.[]+)/g,"[$1]"):n,i=/(\\[[^[\\]]*])/,l=/(\\[[^[\\]]*])/g,s=t.depth>0&&i.exec(a),u=s?a.slice(0,s.index):a,o=[];if(u){if(!t.plainObjects&&fr.call(Object.prototype,u)&&!t.allowPrototypes)return;o.push(u)}for(var p=0;t.depth>0&&(s=l.exec(a))!==null&&p<t.depth;){if(p+=1,!t.plainObjects&&fr.call(Object.prototype,s[1].slice(1,-1))&&!t.allowPrototypes)return;o.push(s[1])}return s&&o.push("["+a.slice(s.index)+"]"),Ci(o,e,t,r)}},Mi=function(n){if(!n)return de;if(n.decoder!==null&&n.decoder!==void 0&&typeof n.decoder!="function")throw TypeError("Decoder has to be a function.");if(n.charset!==void 0&&n.charset!=="utf-8"&&n.charset!=="iso-8859-1")throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var e=n.charset===void 0?de.charset:n.charset;return{allowDots:n.allowDots===void 0?de.allowDots:!!n.allowDots,allowPrototypes:typeof n.allowPrototypes=="boolean"?n.allowPrototypes:de.allowPrototypes,allowSparse:typeof n.allowSparse=="boolean"?n.allowSparse:de.allowSparse,arrayLimit:typeof n.arrayLimit=="number"?n.arrayLimit:de.arrayLimit,charset:e,charsetSentinel:typeof n.charsetSentinel=="boolean"?n.charsetSentinel:de.charsetSentinel,comma:typeof n.comma=="boolean"?n.comma:de.comma,decoder:typeof n.decoder=="function"?n.decoder:de.decoder,delimiter:typeof n.delimiter=="string"||Ee.isRegExp(n.delimiter)?n.delimiter:de.delimiter,depth:typeof n.depth=="number"||n.depth===!1?+n.depth:de.depth,ignoreQueryPrefix:n.ignoreQueryPrefix===!0,interpretNumericEntities:typeof n.interpretNumericEntities=="boolean"?n.interpretNumericEntities:de.interpretNumericEntities,parameterLimit:typeof n.parameterLimit=="number"?n.parameterLimit:de.parameterLimit,parseArrays:n.parseArrays!==!1,plainObjects:typeof n.plainObjects=="boolean"?n.plainObjects:de.plainObjects,strictNullHandling:typeof n.strictNullHandling=="boolean"?n.strictNullHandling:de.strictNullHandling}};wn=function(n,e){var t=Mi(e);if(n===""||n==null)return t.plainObjects?Object.create(null):{};for(var r=typeof n=="string"?Pi(n,t):n,a=t.plainObjects?Object.create(null):{},i=Object.keys(r),l=0;l<i.length;++l){var s=i[l],u=Ni(s,r[s],t,typeof n=="string");a=Ee.merge(a,u,t)}return t.allowSparse===!0?a:Ee.compact(a)},kt={formats:Ue,parse:wn,stringify:Hr};class Ri{constructor(e){this.root=e,this.requestPromises=[]}init(e){this.getToken=e}async get(e){let t=await this.getToken(),r=this.getHashCode(e);if(this.requestPromises[r])return this.requestPromises[r].promise;let a=new Promise((i,l)=>{let s;e.externalResource?s=e.url:(s=this.root+e.url,s=\`\${s}\${/\\?/.test(s)?"&":"?"}token=\${t}\${$a(e.params)}\`),G(gt).get(s,{validateStatus:function(u){return u<400}}).then(function(u){u.status!=200&&console.error(\`GUDHUB HTTP SERVICE: GET ERROR: \${u.status}\`,u),i(u.data)}).catch(function(u){console.error(\`GUDHUB HTTP SERVICE: GET ERROR: \${u.response.status}
|
|
103
|
+
\`,u),console.log("Request message: ",e),u.response&&u.response.data&&console.log("Error response data: ",u.response.data),l(u)})});return this.pushPromise(a,r),a}async post(e){let t=this.getHashCode(e);if(e.form.token=await this.getToken(),this.requestPromises[t])return this.requestPromises[t].promise;let r=new Promise((a,i)=>{G(gt).post(this.root+e.url,G(kt).stringify(e.form),{maxBodyLength:1/0,headers:e.headers||{"Content-Type":"application/x-www-form-urlencoded"},validateStatus:function(l){return l<400}}).then(function(l){l.status!=200&&console.error(\`GUDHUB HTTP SERVICE: POST ERROR: \${l.status}\`,l),a(l.data)}).catch(function(l){console.error(\`GUDHUB HTTP SERVICE: POST ERROR: \${l.response.status}
|
|
104
|
+
\`,l),console.log("Request message: ",e),i(l)})});return this.pushPromise(r,t),r}axiosRequest(e){let t=this.getHashCode(e);if(this.requestPromises[t])return this.requestPromises[t].promise;let r=e.method?e.method.toLowerCase():"get",a=e.url,i=e.headers||{};e.form&&(i["Content-Type"]="application/x-www-form-urlencoded");let l=new Promise(async(s,u)=>{try{let{data:o}=await G(gt)[r](a,r==="post"?G(kt).stringify(e.form)||e.body:{headers:i},r==="post"?{headers:i}:{});s(o)}catch(o){console.log("ERROR -> GUDHUB HTTP SERVICE -> SIMPLE POST :",o.message),console.log("Request message: ",e),u(o)}});return this.pushPromise(l,t),l}pushPromise(e,t){this.requestPromises[t]={promise:e,hesh:t,callback:e.then(()=>{this.destroyPromise(t)}).catch(r=>{this.destroyPromise(t)})}}destroyPromise(e){this.requestPromises=this.requestPromises.filter(t=>t.hesh!==e)}getHashCode(e){let t=0,r=G(kt).stringify(e);if(r.length==0)return t;for(let a=0;a<r.length;a++)t=(t<<5)-t+r.charCodeAt(a),t&=t;return"h"+t}}function hr(n){let e="";for(let t in n)n.hasOwnProperty(t)&&n[t]&&(e+="."+n[t]);return e?e.substring(1):"any"}function Fi(n,e,t){return n==null||typeof n!="string"?(console.log(\`Listener type is "undefined" or not have actual 'type' for subscribe\`),!1):e==null||typeof e!="object"?(console.log(\`Listener destination is "undefined" or not have actual 'type' for subscribe\`),!1):typeof t=="function"||(console.log("Listener is not a function for subscribe!"),!1)}class Li{constructor(){this.subscribers={},this.messageBox={}}on(e,t,r){return Fi(e,t,r)&&e.split(" ").map(a=>a+":"+hr(t)).forEach(a=>{this.subscribers[a]||(this.subscribers[a]=new Set),this.subscribers[a].add(r),this.checkMessageBox(a)}),this}emit(e,t,r,a){return e.split(" ").forEach(i=>{let l=i+":"+hr(t),s=!1;if(this.subscribers[l]){if(this.subscribers[l].size==0)return this.messageBox[l]=[e,t,r,a,s],this;this.subscribers[l].forEach(function(u){u(null,r,a)})}else this.messageBox[l]=[e,t,r,a,s]}),this}onRoot(e,t,r){return this.on(e,t,r)}destroy(e,t,r){return e.split(" ").forEach(a=>{let i=a+":"+hr(t);this.subscribers[i]&&r&&this.subscribers[i].delete(r),this.subscribers[i]&&!r&&delete this.subscribers[i]}),this}checkMessageBox(e){this.cleanMesssageBox(),this.messageBox[e]&&setTimeout(()=>{this.messageBox[e]&&(this.emit(...this.messageBox[e]),this.messageBox[e][4]=!0)},0)}cleanMesssageBox(){for(let e in this.messageBox)this.messageBox[e][4]&&delete this.messageBox[e]}}function Di(n,e,t){return[{data_type:"text",name:"Text",icon:"text_icon",url:e+"/"+n+"text_data.js",type:"gh_element",technology:"angular"},{data_type:"text_opt",name:"Options",icon:"option_gh_element",url:e+"/"+n+"text_options_data.js",type:"gh_element",technology:"angular"},{data_type:"number",name:"Number",icon:"number",url:e+"/"+n+"number_data.js",type:"gh_element",technology:"angular"},{data_type:"task_board",name:"Task Board",icon:"task_board",url:e+"/"+n+"task_board_data.js",type:"gh_element",technology:"angular"},{data_type:"visualizer",name:"visualizer",icon:"visualizer",url:e+"/"+n+"visualizer_data.js",type:"gh_element",technology:"angular"},{data_type:"enterprice_visualizer",name:"Enterprice Visualizer",icon:"visualizer",private:!0,url:e+"/"+n+"enterprice_visualizer_data.js",type:"gh_element",technology:"angular"},{data_type:"email",name:"Email",icon:"email",url:e+"/"+n+"email_data.js",type:"gh_element",technology:"angular"},{data_type:"date",name:"Date",icon:"date_gh_element",url:e+"/"+n+"date_data.js",type:"gh_element",technology:"angular"},{data_type:"radio_button",name:"Radio Button",icon:"radio_button_gh_element",url:e+"/"+n+"radio_button_data.js",type:"gh_element",technology:"angular"},{data_type:"radio_icon",name:"Radio icon",icon:"radio_icon_gh_element",url:e+"/"+n+"radio_icon_data.js",type:"gh_element",technology:"angular"},{data_type:"twilio_phone",name:"Twilio Phone",icon:"phone_twilio_gh_element",url:e+"/"+n+"twilio_phone_data.js",type:"gh_element",technology:"angular"},{data_type:"twilio_autodialer",name:"Twilio Auto Dialer",icon:"twilio_dialer",url:e+"/"+n+"twillio_autodialer_data.js",type:"gh_element",technology:"angular"},{data_type:"color",name:"Color",icon:"paint_gh_element",url:e+"/"+n+"color_data.js",type:"gh_element",technology:"angular"},{data_type:"charts",name:"Charts",icon:"graph_gh_element",url:e+"/"+n+"charts_data.js",type:"gh_element",technology:"angular"},{data_type:"funnel_chart",name:"Funnel chart",icon:"funnel_chart_gh_element",url:e+"/"+n+"funnel_chart_data.js",type:"gh_element",technology:"angular"},{data_type:"add_items_from_template",name:"Add items from template",icon:"contact_second",url:e+"/"+n+"add_items_from_template_data.js",type:"gh_element",technology:"angular"},{data_type:"item_ref",name:"Reference",icon:"reference",url:e+"/"+n+"itemRef_data.js",type:"gh_element",technology:"angular"},{data_type:"calendar",name:"Calendar",icon:"calendar",js:"https://gudhub.com/modules/FullCalendar-Gh-Element/dist/main.js?t=4",css:"https://gudhub.com/modules/FullCalendar-Gh-Element/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"data_ref",name:"Data Reference",icon:"data_reference",url:e+"/"+n+"data_ref_data.js",type:"gh_element",technology:"angular"},{data_type:"table",name:"Table",icon:"table",url:e+"/"+n+"table_data.js",type:"gh_element",technology:"angular"},{data_type:"tile",name:"Tile table",icon:"tile_table",url:e+"/"+n+"tile_data.js",type:"gh_element",technology:"angular"},{data_type:"file",name:"File",icon:"box",url:e+"/"+n+"file_data.js",type:"gh_element",technology:"angular"},{data_type:"image",name:"Image",icon:"image",url:e+"/"+n+"image_data.js",type:"gh_element",technology:"angular"},{data_type:"text_editor",name:"Text Editor",icon:"square",url:e+"/"+n+"text_editor_data.js",type:"gh_element",technology:"angular"},{data_type:"tinymse",name:"Text editor MSE",icon:"tag",url:e+"/"+n+"tinymse_data.js",type:"gh_element",technology:"angular"},{data_type:"duration",name:"Duration",icon:"number_gh_element",url:e+"/"+n+"duration_data.js",type:"gh_element",technology:"angular"},{data_type:"user",name:"User",icon:"user_gh_element",url:e+"/"+n+"user_data.js",type:"gh_element",technology:"angular"},{data_type:"app",name:"App",icon:"app",url:e+"/"+n+"application_data.js",type:"gh_element",technology:"angular"},{data_type:"field",name:"Field",icon:"field_gh_element",url:e+"/"+n+"field_data.js",type:"gh_element",technology:"angular"},{data_type:"available",name:"Available",icon:"availible_gh_element",url:e+"/"+n+"available_data.js",type:"gh_element",technology:"angular"},{data_type:"view_list",name:"View List",icon:"view_list",url:e+"/"+n+"view_list_data.js",type:"gh_element",technology:"angular"},{data_type:"calculator",name:"Calculator",icon:"calculator",url:e+"/"+n+"calculator_data.js",type:"gh_element",technology:"angular"},{data_type:"string_join",name:"String Joiner",icon:"string_join_gh_element",url:e+"/"+n+"string_joiner_data.js",type:"gh_element",technology:"angular"},{data_type:"signature",name:"Signature",icon:"signature",url:e+"/"+n+"signature_data.js",type:"gh_element",technology:"angular"},{data_type:"sendEmail",name:"Send Email",icon:"send_email_gh_element",url:e+"/"+n+"send_email_data.js",type:"gh_element",technology:"angular"},{data_type:"boolean",name:"Yes/No",icon:"boolen_gh_element",url:e+"/"+n+"boolean_data.js",type:"gh_element",technology:"angular"},{data_type:"product_gallery",name:"Product gallery",icon:"product_gallery",url:e+"/"+n+"product_gallery_data.js",type:"gh_element",technology:"angular"},{data_type:"online_inventory",name:"Online inventory",icon:"slab",url:e+"/"+n+"online_inventory_data.js",type:"gh_element",technology:"angular"},{data_type:"3d_edges",name:"3D Edges",icon:"3d_edges_gh_element",url:e+"/"+n+"3d_edges_data.js",type:"gh_element",technology:"angular"},{data_type:"color_list",name:"Color list",icon:"circular_gh_element",url:e+"/"+n+"color_list_data.js",type:"gh_element",technology:"angular"},{data_type:"go_to_link",name:"Go to Link",icon:"go_to_link",url:e+"/"+n+"go_to_link_data.js",type:"gh_element",technology:"angular"},{data_type:"go_to_view",name:"Go to View",icon:"go_to_view",url:e+"/"+n+"go_to_view_data.js",type:"gh_element",technology:"angular"},{data_type:"range",name:"Range",icon:"range_gh_element",url:e+"/"+n+"range_data.js",type:"gh_element",technology:"angular"},{data_type:"barcode",name:"Barcode",icon:"barcode_gh_element",url:e+"/"+n+"barcode_data.js",type:"gh_element",technology:"angular"},{data_type:"item_remote_add",name:"Item remote add",icon:"remote_add_gh_element",url:e+"/"+n+"item_remote_add_data.js",type:"gh_element",technology:"angular"},{data_type:"item_remote_update",name:"Item remote update",icon:"remote_update_gh_element",url:e+"/"+n+"item_remote_update_data.js",type:"gh_element",technology:"angular"},{data_type:"timeline",name:"Timeline",icon:"timeline",url:e+"/"+n+"timeline_data.js",type:"gh_element",technology:"angular"},{data_type:"delete_item",name:"Delete Item",icon:"rubbish",url:e+"/"+n+"delete_action.js",type:"gh_element",technology:"angular"},{data_type:"print_doc",name:"Print document",icon:"print",url:e+"/"+n+"print_doc_action.js",type:"gh_element",technology:"angular"},{data_type:"open_item",name:"Open Item",icon:"delete",private:!0,url:e+"/"+n+"open_item_action.js",type:"gh_element",technology:"angular"},{data_type:"edit_template",name:"Edit template",icon:"delete",private:!0,url:e+"/"+n+"edit_template_action.js",type:"gh_element",technology:"angular"},{data_type:"open_app",private:!0,name:"Open App",icon:"delete",url:e+"/"+n+"open_app_action.js",type:"gh_element",technology:"angular"},{data_type:"user_settings",private:!0,name:"User Settings",icon:"delete",url:e+"/"+n+"user_settings_action.js",type:"gh_element",technology:"angular"},{data_type:"app_sharing",name:"Sharing",icon:"sharing",url:e+"/"+n+"sharing_action.js",type:"gh_element",technology:"angular"},{data_type:"app_constructor",private:!0,name:"App constructor",icon:"app_constructor",url:e+"/"+n+"app_constructor_action.js",type:"gh_element",technology:"angular"},{data_type:"app_settings",name:"App Settings",icon:"configuration",url:e+"/"+n+"app_settings_action.js",type:"gh_element",technology:"angular"},{data_type:"export_csv",name:"Export CSV",icon:"export_csv",url:e+"/"+n+"export_csv.js",type:"gh_element",technology:"angular"},{data_type:"import_csv",name:"Import CSV",icon:"import_csv",url:e+"/"+n+"import_csv.js",type:"gh_element",technology:"angular"},{data_type:"add_items",name:"Add Items",icon:"plus",url:e+"/"+n+"add_items_action.js",type:"gh_element",technology:"angular"},{data_type:"update_items",name:"Update Items",icon:"update",url:e+"/"+n+"update_items_action.js",type:"gh_element",technology:"angular"},{data_type:"install_app",name:"Install",icon:"install",url:e+"/"+n+"install_app_action.js",type:"gh_element",technology:"angular"},{data_type:"search_action",name:"Search",icon:"search",url:e+"/"+n+"search_action.js",type:"gh_element",technology:"angular"},{data_type:"filter_table",name:"Table filter",icon:"filter",url:e+"/"+n+"filter_table_action.js",type:"gh_element",technology:"angular"},{data_type:"slider",name:"Slider",icon:"slider",url:e+"/"+n+"slider_data.js",type:"gh_element",technology:"angular"},{data_type:"clone_item",name:"Clone Item",icon:"double_plus",url:e+"/"+n+"clone_item_action.js",type:"gh_element",technology:"angular"},{data_type:"close",name:"Close",icon:"cross",url:e+"/"+n+"close_action.js",type:"gh_element",technology:"angular"},{data_type:"phone",name:"Phone",icon:"phone_thin",url:e+"/"+n+"phone_data.js",type:"gh_element",technology:"angular"},{data_type:"link",name:"Link",icon:"link_gh_element",url:e+"/"+n+"link_data.js",type:"gh_element",technology:"angular"},{data_type:"sheduling",name:"Sheduling",icon:"scheduling",url:e+"/"+n+"sheduling_data.js",type:"gh_element",technology:"angular"},{data_type:"qrcode",name:"QR Code",icon:"qr_code",url:e+"/"+n+"qrcode_data.js",type:"gh_element",technology:"angular"},{data_type:"graph2d",name:"Graph",icon:"graph",url:e+"/"+n+"graph2d_data.js",type:"gh_element",technology:"angular"},{data_type:"quote_tool",name:"Quote tool",icon:"quoters",url:e+"/"+n+"quote_tool_data.js",type:"gh_element",technology:"angular"},{data_type:"cards",name:"Cards",icon:"cards",url:e+"/"+n+"cards_data.js",type:"gh_element",technology:"angular"},{data_type:"jsonConstructor",name:"Json Constructor",icon:"button",url:e+"/"+n+"json_constructor_data.js",type:"gh_element",technology:"angular"},{data_type:"button",name:"Button",icon:"button",js:"https://gudhub.com/modules/button_action/button_action.js?t=1",type:"gh_element",technology:"class"},{data_type:"editorjs",name:"EditorJS",icon:"code_editor",js:"https://gudhub.com/modules/Editor-Js/dist/main.js?t=2",css:"https://gudhub.com/modules/Editor-Js/dist/style.css?t=2",type:"gh_element",technology:"class"},{data_type:"filter_advanced",name:"Filter Advanced",icon:"filter_advanced",url:e+"/"+n+"filter_advanced_data.js",type:"gh_element",technology:"angular"},{data_type:"code_editor",name:"Code Editor",icon:"code_editor",url:e+"/"+n+"code_editor_data.js",type:"gh_element",technology:"angular"},{data_type:"icon",name:"Icon",icon:"icon_gh_element",url:e+"/"+n+"icon_data.js",type:"gh_element",technology:"angular"},{data_type:"quoteRequest",name:"Quote Request",icon:"invoices",url:e+"/"+n+"quote_request_data.js",type:"gh_element",technology:"angular"},{data_type:"view_container",name:"View Container",icon:"pencil",url:e+"/"+n+"view_container_data.js",type:"gh_element",technology:"angular"},{data_type:"element_ref",name:"Element Reference",icon:"cloudSync_gh_element",url:e+"/"+n+"element_ref_data.js",type:"gh_element",technology:"angular"},{data_type:"quote_tool_objects_renderer",name:"Quote Tool Renderer",icon:"l_counter",url:e+"/"+n+"quote_tool_objects_renderer_data.js",type:"gh_element",technology:"angular"},{data_type:"quote_tool_objects_renderer_generator",name:"Quote Tool Parts Generator",icon:"l_counter_arrow",url:e+"/"+n+"quote_tool_objects_renderer_generator_data.js",type:"gh_element",technology:"angular"},{data_type:"trigger",name:"Trigger",icon:"job",url:e+"/"+n+"trigger_data.js",type:"gh_element",technology:"angular"},{data_type:"voting",name:"Voting",icon:"like_gh_element",url:e+"/"+n+"voting_data.js",type:"gh_element",technology:"angular"},{data_type:"view_tabs",name:"View Tab",icon:"tabs",url:e+"/"+n+"view_tabs.js",type:"gh_element",technology:"angular"},{data_type:"filter_tabs",name:"Filter Tabs",icon:"filter_tabs_gh_element",url:e+"/"+n+"filter_tabs.js",type:"gh_element",technology:"angular"},{data_type:"gps_coords",name:"GPS Coords",icon:"location_gh_element",url:e+"/"+n+"gps_coords.js",type:"gh_element",technology:"angular"},{data_type:"google_map",name:"Google Map",icon:"location",url:e+"/"+n+"google_map_data.js",type:"gh_element",technology:"angular"},{data_type:"data_migrations",name:"Data migrations",icon:"view_list_gh_element",url:e+"/"+n+"data_migrations.js",type:"gh_element",technology:"angular"},{data_type:"additional_settings",name:"Additional Settings",icon:"",private:!0,url:e+"/"+n+"gh_additional_settings_data.js",type:"gh_element",technology:"angular"},{data_type:"send_request",name:"Send Request",icon:"send_request_gh_element",url:e+"/"+n+"send_request_data.js",type:"gh_element",technology:"angular"},{data_type:"webcam",name:"Web camera",icon:"webcam_gh_element",url:e+"/"+n+"webcam_data.js",type:"gh_element",technology:"angular"},{data_type:"json_viewer",name:"JSON viewer",icon:"json_gh_element",url:e+"/"+n+"json_viewer_data.js",type:"gh_element",technology:"angular"},{data_type:"notifications",name:"Notifications",icon:"full_gh_element",url:e+"/"+n+"notifications_data.js",type:"gh_element",technology:"angular"},{data_type:"api",name:"API",icon:"job",url:e+"/"+n+"api_data.js",type:"gh_element",technology:"angular"},{data_type:"smart_input",name:"Smart Input",icon:"roket",url:e+"/"+n+"smart_input_data.js",type:"gh_element",technology:"angular"},{data_type:"json_editor",name:"JSON Editor",icon:"code",url:e+"/"+n+"json_editor_data.js",type:"gh_element",technology:"angular"},{data_type:"grapes_html_editor",name:"Grapes Html Editor",icon:"code_editor",url:e+"/"+n+"grapes_html_editor_data.js",type:"gh_element",technology:"angular"},{data_type:"quiz",name:"Quiz",icon:"quiz_gh_element",url:e+"/"+n+"quiz_data.js",type:"gh_element",technology:"angular"},{data_type:"password_input",name:"Password",icon:"lock_gh_element",url:e+"/"+n+"password_input_data.js",type:"gh_element",technology:"angular"},{data_type:"vs_code",name:"VS Code",icon:"code_editor",url:e+"/"+n+"vs_code_data.js",type:"gh_element",technology:"angular"},{data_type:"nested_list",name:"Nested List",icon:"scheduling",js:"https://gudhub.com/modules/Nested-List/dist/main.js?t=2",css:"https://gudhub.com/modules/Nested-List/dist/style.css?t=2",type:"gh_element",technology:"class"},{data_type:"countertop_smart_quote",name:"Countertop Smart Quote",icon:"quoters",url:e+"/"+n+"countertop_smart_quote_data.js",type:"gh_element",technology:"angular"},{data_type:"markdown_viewer",name:"Markdown viewer",icon:"code_editor",js:"https://gudhub.com/modules/markdown-it-gh-element/dist/main.js?t=1",css:"https://gudhub.com/modules/markdown-it-gh-element/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"html_viewer",name:"HTML Viewer",icon:"code_editor",js:"https://gudhub.com/modules/HTML-Viewer/dist/main.js?t=1",css:"https://gudhub.com/modules/HTML-Viewer/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"element_customizer",name:"Element Customizer",icon:"pencil",url:e+"/"+n+"element_customizer_data.js",type:"gh_element",technology:"angular"},{data_type:"task",name:"Task",icon:"table",url:e+"/"+n+"task_data.js",type:"gh_element",technology:"angular"},{data_type:"cron_picker",name:"Cron Picker",icon:"table",js:"https://gudhub.com/modules/Cron-Picker/dist/main.js?t=2",css:"https://gudhub.com/modules/Cron-Picker/dist/style.css?t=2",type:"gh_element",technology:"class"},{data_type:"balance_sheet",name:"Balance Sheet",icon:"table",js:"https://gudhub.com/modules/balance-sheet/dist/main.js?t=2",css:"https://gudhub.com/modules/balance-sheet/dist/style.css?t=2",type:"gh_element",technology:"class"},{data_type:"quote_form",name:"Quote Form",icon:"table",js:"https://gudhub.com/modules/countertop-quote-form/dist/main.js",css:"https://gudhub.com/modules/countertop-quote-form/dist/style.css",type:"gh_element",technology:"class"},{data_type:"static_nested_list",name:"Nested Filter",icon:"scheduling",js:"https://gudhub.com/modules/nested-filter/dist/main.js?t=1",css:"https://gudhub.com/modules/nested-filter/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"conversations",name:"Conversations",icon:"timeline",js:"https://gudhub.com/modules/conversation/dist/main.js?t=1",css:"https://gudhub.com/modules/conversation/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"study_journal",name:"Study Journal",icon:"timeline",js:"https://gudhub.com/modules/Study-Journal/dist/main.js?t=1",css:"https://gudhub.com/modules/Study-Journal/dist/style.css",type:"gh_element",technology:"class"},{data_type:"study_schedule",name:"Study Schedule",icon:"timeline",js:"https://gudhub.com/modules/Study-Schedule/dist/main.js?t=1",css:"https://gudhub.com/modules/Study-Schedule/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"avatar",name:"Avatar",icon:"user",js:"https://gudhub.com/modules/Gh-Avatar/dist/main.js?t=1",css:"https://gudhub.com/modules/Gh-Avatar/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"text_area",name:"Text Area",icon:"text_icon",js:"https://gudhub.com/modules/text-area-ghe/dist/main.js?t=3",css:"https://gudhub.com/modules/text-area-ghe/dist/style.css",type:"gh_element",technology:"class"},{data_type:"resource_calendar",name:"Resource Сalendar",icon:"calendar",url:e+"/"+n+"resource_calendar_data.js",type:"gh_element",technology:"angular"},{data_type:"visualizer_with_control_panel",name:"Visualizer With Control Panel",icon:"visualizer",url:e+"/"+n+"visualizer_with_control_panel_data.js",type:"gh_element",technology:"angular"},{data_type:"API",name:"API",url:e+"/"+t+"api_node.js",type:"automation",icon:"automation_api",private:!0},{data_type:"Calculator",name:"Calculator",url:e+"/"+t+"calculator.js",type:"automation",icon:"automation_calculator"},{data_type:"CompareItems",name:"Compare Items",url:e+"/"+t+"compare_items.js",type:"automation",icon:"automation_compare_items"},{data_type:"Constants",name:"Constants",url:e+"/"+t+"constants.js",type:"automation",icon:"automation_constants"},{data_type:"CreateFiles",name:"Create Files",url:e+"/"+t+"create_files.js",type:"automation",icon:"automation_create_files"},{data_type:"CreateItemsApi",name:"Create Items Api",url:e+"/"+t+"create_item_api.js",type:"automation",icon:"automation_create_items_api"},{data_type:"FileDuplicate",name:"File Duplicate",url:e+"/"+t+"file_duplicate.js",type:"automation",icon:"automation_file_duplicate"},{data_type:"Filter",name:"Filter",url:e+"/"+t+"filter_node.js",type:"automation",icon:"filter"},{data_type:"GetItemByItemRef",name:"Get Item By Item Ref",url:e+"/"+t+"get_item_by_item_ref.js",type:"automation",icon:"automation_get_item_by_item_ref"},{data_type:"GetItems",name:"Get Items",url:e+"/"+t+"get_items.js",type:"automation",icon:"automation_get_items"},{data_type:"GhElementNode",name:"Gh Element Node",url:e+"/"+t+"gh_element_node.js",type:"automation",icon:"automation_gh_element_node",private:!0,created_for:["GhElement"]},{data_type:"IfCondition",name:"If Condition",url:e+"/"+t+"if_condition.js",type:"automation",icon:"automation_if_condition"},{data_type:"ItemConstructor",name:"Item Constructor",url:e+"/"+t+"item_constructor.js",type:"automation",icon:"automation_item_constructor"},{data_type:"ItemDestructor",name:"Item Destructor",url:e+"/"+t+"item_destructor.js",type:"automation",icon:"automation_item_destructor"},{data_type:"JSONScheme",name:"JSON Scheme",url:e+"/"+t+"json_scheme.js",type:"automation",icon:"automation_json_scheme"},{data_type:"MergeItems",name:"Merge Items",url:e+"/"+t+"merge_items.js",type:"automation",icon:"automation_merge_items"},{data_type:"MessageConstructor",name:"Message Constructor",url:e+"/"+t+"message_constructor.js",type:"automation",icon:"automation_message_constructor"},{data_type:"ObjectToItem",name:"Object To Item",url:e+"/"+t+"obj_to_item.js",type:"automation",icon:"automation_object_to_item"},{data_type:"ObjectConstructor",name:"Object Constructor",url:e+"/"+t+"object_constructor.js",type:"automation",icon:"automation_object_constructor"},{data_type:"ObjectDestructor",name:"Object Destructor",url:e+"/"+t+"object_destructor.js",type:"automation",icon:"automation_object_destructor"},{data_type:"PopulateElement",name:"Populate Element",url:e+"/"+t+"populate_element.js",type:"automation",icon:"automation_populate_element",private:!0,created_for:["GhElement"]},{data_type:"PopulateItems",name:"Populate Items",url:e+"/"+t+"populate_items.js",type:"automation",icon:"automation_populate_items"},{data_type:"PopulateWithDate",name:"Populate With Date",url:e+"/"+t+"populate_with_date.js",type:"automation",icon:"automation_populate_with_date"},{data_type:"PopulateWithItemRef",name:"Populate with Item Ref",url:e+"/"+t+"populate_with_item_ref.js",type:"automation",icon:"automation_populate_with_item_ref"},{data_type:"PopUpForm",name:"Pop Up Form",url:e+"/"+t+"popup_form.js",type:"automation",icon:"automation_pop_up_form",private:!0,created_for:["Quiz","GhElement","SmartInput","Iterator"]},{data_type:"QuizForm",name:"Quiz Form",url:e+"/"+t+"quiz_form.js",type:"automation",icon:"automation_quiz_form",private:!0,created_for:["Quiz"]},{data_type:"QuizNode",name:"Quiz Node",url:e+"/"+t+"quiz_node.js",type:"automation",icon:"automation_quiz_node",private:!0},{data_type:"Request",name:"Request",url:e+"/"+t+"request_node.js",type:"automation",icon:"automation_request"},{data_type:"Response",name:"Response",url:e+"/"+t+"response_node.js",type:"automation",icon:"automation_response",private:!0,created_for:["API"]},{data_type:"SmartInput",name:"Smart Input",url:e+"/"+t+"smart_input.js",type:"automation",icon:"automation_smart_input",private:!0},{data_type:"Trigger",name:"Trigger",url:e+"/"+t+"trigger_node.js",type:"automation",icon:"automation_trigger",private:!0},{data_type:"TwilioSMS",name:"Twilio SMS",url:e+"/"+t+"twilio_sms.js",type:"automation",icon:"automation_twilio"},{data_type:"TwilioAuth",name:"Twilio Auth",url:e+"/"+t+"twilio_auth.js",type:"automation",icon:"table"},{data_type:"TwilioDevice",name:"Twilio Device",url:e+"/"+t+"twilio_device.js",type:"automation",icon:"table"},{data_type:"UpdateItemsApi",name:"Update Items Api",url:e+"/"+t+"update_items_api.js",type:"automation",icon:"automation_update_items_api"},{data_type:"GoogleCalendar",name:"Google Calendar",url:e+"/"+t+"google_calendar.js",type:"automation",icon:"calendar"},{data_type:"VerifyEmail",name:"Verify email",url:e+"/"+t+"verify_email.js",type:"automation",icon:"check_in_circle"},{data_type:"Iterator",name:"Iterator",url:e+"/"+t+"iterator.js",type:"automation",icon:"update"},{data_type:"IteratorInput",name:"Iterator Input",url:e+"/"+t+"iterator_input.js",type:"automation",icon:"arrow_right",private:!0},{data_type:"IteratorOutput",name:"Iterator Output",url:e+"/"+t+"iterator_output.js",type:"automation",icon:"arrow_right",private:!0},{data_type:"SendEmail",name:"Send email",url:e+"/"+t+"send_email.js",type:"automation",icon:"email"},{data_type:"FileReader",name:"File Reader",url:e+"/"+t+"file_reader.js",type:"automation",icon:"file"},{data_type:"WebsitesChecker",name:"Websites Checker",url:e+"/"+t+"websites_checker.js",type:"automation",icon:"world"},{data_type:"VoiceMachineDetection",name:"Voice Machine Detection",url:e+"/"+t+"voice_machine_detection.js",type:"automation",icon:"automation_calculator"},{data_type:"Task",name:"Task",url:e+"/"+t+"task.js",type:"automation",icon:"automation_calculator",private:!0},{data_type:"DeleteItems",name:"Delete Items",url:e+"/"+t+"delete_items.js",type:"automation",icon:"rubbish"},{data_type:"GoToItem",name:"Go To Item",url:e+"/"+t+"go_to_item.js",type:"automation",icon:"cursor_point"},{data_type:"FireWorks",name:"Fire Works",url:e+"/"+t+"fireworks_node.js",type:"automation",icon:"weeding_party"},{data_type:"SendMessage",name:"Send Message",url:e+"/"+t+"send_message.js",type:"automation",icon:"speech_bubble"},{data_type:"TurboSMS",name:"Turbo SMS",url:e+"/"+t+"turbo_sms.js",type:"automation",icon:"email"}]}class qi{constructor(e,t,r){this.apps_list=[],this.users_list=[],this.user={},this.modulesList=Di(e,t,r),this.ghComponentsPromises=[]}getMainStorage(){return this}getAppsList(){return this.apps_list}getUser(){return this.user}getUsersList(){return this.users_list}getModulesList(e,t,r){return e===void 0?this.modulesList:t==!1?this.modulesList.filter(a=>a.created_for?a.type===e&&a.private&&a.created_for.includes(r):a.type===e&&!a.private):this.modulesList.filter(a=>a.type===e)}getModuleUrl(e){return this.modulesList.find(t=>t.data_type==e)}setUser(e){this.user=e,this.users_list.push(e)}updateUser(e={}){e.avatar_128&&(e.avatar_128=e.avatar_128+"?"+new Date().getTime()),e.avatar_512&&(e.avatar_512=e.avatar_512+"?"+new Date().getTime()),this.user={...this.user,...e},this.users_list=this.users_list.filter(t=>t.user_id!=e.user_id),this.users_list.push(this.user)}unsetUser(){this.user={}}getApp(e){for(let t=0;t<this.apps_list.length;t++)if(this.apps_list[t].app_id==e)return this.apps_list[t]}unsetApps(){this.apps_list=[]}updateApp(e){return this.apps_list=this.apps_list.map(t=>t.app_id==e.app_id?e:t),this.apps_list}deleteApp(e){return this.apps_list=this.apps_list.filter(t=>t.app_id!=e),this.apps_list}async updateItemsInApp(e,t){let r=await this.getApp(t);return r&&(r.items_list=updateItems(e,r.items_list,this.pipeService.emit.bind(this.pipeService),t),this.updateApp(r)),r}async addItemsToApp(e,t){let r=await this.getApp(t);return r&&(r.items_list.push(...e),this.updateApp(r),this.pipeService.emit("gh_items_update",{app_id:t},e)),r}async deleteItemsInApp(e,t){let r=await this.getApp(t);return r&&(r.items_list=r.items_list.filter(a=>!e.find(i=>i.item_id==a.item_id)),this.updateApp(r)),r}}var Sn={};Sn=function(){throw Error("ws does not work in the browser. Browser clients must use the native WebSocket object")};var me=A("5xozB");class Bi{constructor(e,t){this.websocket=null,this.connected=!1,this.queue=[],this.url=e,this.auth=t,this.heartBeatTimeStemp=1e13,this.ALLOWED_HEART_BEAT_DELEY=12e3,this.firstHeartBeat=!0,this.reload=!0,this.isBrowser=me.IS_BROWSER_MAIN_THREAD}async addSubscription(e){let t=await this.auth.getToken(),r=\`token=\${t}/~/app_id=\${e}\`;this.connected&&this.websocket.send(r),this.queue.push(e)}async onOpen(){this.reload=!0,console.log("websocket opened"),this.connected=!0;let e=await this.auth.getToken();this.queue.forEach(t=>{let r=\`token=\${e}/~/app_id=\${t}\`;this.websocket.send(r)})}onError(e){console.log("websocket error: ",e),this.websocket.close()}onClose(){console.log("websocket close"),this.connected=!1;try{this.initWebSocket(this.onMassageHandler,this.refreshAppsHandler)}catch(e){console.log(e)}}async onMessage(e){let t=this.isBrowser?e.data:e;if(t.match(/HeartBeat/)){let r=new Date().getTime()-this.heartBeatTimeStemp;this.ALLOWED_HEART_BEAT_DELEY<r?await this.onConnectionLost():(this.websocket.send("HeartBeat"),this.heartBeatTimeStemp=new Date().getTime())}if(this.firstHeartBeat&&(this.connectionChecker(),this.firstHeartBeat=!1),t.match(/[{}]/)){let r=JSON.parse(t),a=await this.auth.getToken();r.token!=a&&this.onMassageHandler(r)}}initWebSocket(e,t){this.onMassageHandler=e,this.refreshAppsHandler=t,this.isBrowser?(this.websocket=new WebSocket(this.url),this.websocket.onopen=this.onOpen.bind(this),this.websocket.onerror=this.onError.bind(this),this.websocket.onclose=this.onClose.bind(this),this.websocket.onmessage=this.onMessage.bind(this)):(this.websocket=new(G(Sn))(this.url),this.websocket.on("open",this.onOpen),this.websocket.on("error",this.onError),this.websocket.on("close",this.onClose),this.websocket.on("message",this.onMessage)),console.log("websocket initialized")}connectionChecker(){setInterval(async()=>{let e=new Date().getTime()-this.heartBeatTimeStemp;this.ALLOWED_HEART_BEAT_DELEY<e&&await this.onConnectionLost()},1e3)}async onConnectionLost(){try{await this.auth.getVersion(),this.reload&&(this.reload=!1,console.log("Connected"),this.heartBeatTimeStemp=1e13,this.websocket.close())}catch(e){console.log(e)}}}async function Ui(n,e,t,r={}){let a=[],i={variableMethodcurrent_app:()=>[r.current_app_id||r.app_id],variableMethodelement_app:()=>[r.element_app_id],variableMethodcurrent_item:()=>[\`\${r.current_app_id||r.app_id}.\${r.item_id}\`],variableMethoduser_id:()=>[e.getUser().user_id],variableMethoduser_email:s=>[e.getUser().username],variableMethodtoday(s){let u=new Date,o=new Date(u.getFullYear(),u.getMonth(),u.getDate()),p=new Date(u.getFullYear(),u.getMonth(),u.getDate()+1);return[o.valueOf().toString()+":"+p.valueOf().toString()]},variableMethodvariable:s=>[r[s]]};if(n)for(let s of n)if(s)switch(s.input_type){case"variable":for(let o of(s.valuesArray=[],s==null?void 0:s.input_value.split(","))){let p=i[s.input_type+"Method"+o];typeof p=="function"?s.valuesArray?s.valuesArray.push(...p()):s.valuesArray=p():s.valuesArray?s.valuesArray.push(...i.variableMethodvariable(o)):s.valuesArray=i.variableMethodvariable(o)}a.push(s);break;case"field":let u=await l({app_id:r.current_app_id||r.app_id,item_id:r.item_id,field_id:s.input_value});u!=null&&s.valuesArray.push(u),a.push(s);break;default:a.push(s)}else a.push(s);function l(s){return new Promise(u=>{t.on("gh_value_get",s,function o(p,m){t.destroy("gh_value_get",s,o),u(m)}).emit("gh_value_get",{},s)})}return a}function Fe(n){return Array.isArray?Array.isArray(n):kn(n)==="[object Array]"}function Gi(n){if(typeof n=="string")return n;let e=n+"";return e=="0"&&1/n==-1/0?"-0":e}function Wi(n){return n==null?"":Gi(n)}function Pe(n){return typeof n=="string"}function xn(n){return typeof n=="number"}function Hi(n){return n===!0||n===!1||zi(n)&&kn(n)=="[object Boolean]"}function En(n){return typeof n=="object"}function zi(n){return En(n)&&n!==null}function Se(n){return n!=null}function mr(n){return!n.trim().length}function kn(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}let Vi="Incorrect 'index' type",Ji=n=>\`Invalid value for key \${n}\`,Qi=n=>\`Pattern length exceeds max of \${n}.\`,Yi=n=>\`Missing \${n} property in key\`,Xi=n=>\`Property 'weight' in key '\${n}' must be a positive integer\`,An=Object.prototype.hasOwnProperty;class Ki{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(r=>{let a=In(r);t+=a.weight,this._keys.push(a),this._keyMap[a.id]=a,t+=a.weight}),this._keys.forEach(r=>{r.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function In(n){let e=null,t=null,r=null,a=1,i=null;if(Pe(n)||Fe(n))r=n,e=On(n),t=gr(n);else{if(!An.call(n,"name"))throw Error(Yi("name"));let l=n.name;if(r=l,An.call(n,"weight")&&(a=n.weight)<=0)throw Error(Xi(l));e=On(l),t=gr(l),i=n.getFn}return{path:e,id:t,weight:a,src:r,getFn:i}}function On(n){return Fe(n)?n:n.split(".")}function gr(n){return Fe(n)?n.join("."):n}function Zi(n,e){let t=[],r=!1,a=(i,l,s)=>{if(Se(i))if(l[s]){let u=i[l[s]];if(Se(u))if(s===l.length-1&&(Pe(u)||xn(u)||Hi(u)))t.push(Wi(u));else if(Fe(u)){r=!0;for(let o=0,p=u.length;o<p;o+=1)a(u[o],l,s+1)}else l.length&&a(u,l,s+1)}else t.push(i)};return a(n,Pe(e)?e.split("."):e,0),r?t:t[0]}var W={...{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(n,e)=>n.score===e.score?n.idx<e.idx?-1:1:n.score<e.score?-1:1},...{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},...{location:0,threshold:.6,distance:100},...{useExtendedSearch:!1,getFn:Zi,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};let es=/[^ ]+/g;function ts(n=1,e=3){let t=new Map,r=Math.pow(10,e);return{get(a){let i=a.match(es).length;if(t.has(i))return t.get(i);let l=parseFloat(Math.round(1/Math.pow(i,.5*n)*r)/r);return t.set(i,l),l},clear(){t.clear()}}}class yr{constructor({getFn:e=W.getFn,fieldNormWeight:t=W.fieldNormWeight}={}){this.norm=ts(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((t,r)=>{this._keysMap[t.id]=r})}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,Pe(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){let t=this.size();Pe(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,r=this.size();t<r;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!Se(e)||mr(e))return;let r={v:e,i:t,n:this.norm.get(e)};this.records.push(r)}_addObject(e,t){let r={i:t,$:{}};this.keys.forEach((a,i)=>{let l=a.getFn?a.getFn(e):this.getFn(e,a.path);if(Se(l)){if(Fe(l)){let s=[],u=[{nestedArrIndex:-1,value:l}];for(;u.length;){let{nestedArrIndex:o,value:p}=u.pop();if(Se(p))if(Pe(p)&&!mr(p)){let m={v:p,i:o,n:this.norm.get(p)};s.push(m)}else Fe(p)&&p.forEach((m,d)=>{u.push({nestedArrIndex:d,value:m})})}r.$[i]=s}else if(Pe(l)&&!mr(l)){let s={v:l,n:this.norm.get(l)};r.$[i]=s}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function jn(n,e,{getFn:t=W.getFn,fieldNormWeight:r=W.fieldNormWeight}={}){let a=new yr({getFn:t,fieldNormWeight:r});return a.setKeys(n.map(In)),a.setSources(e),a.create(),a}function rs(n,{getFn:e=W.getFn,fieldNormWeight:t=W.fieldNormWeight}={}){let{keys:r,records:a}=n,i=new yr({getFn:e,fieldNormWeight:t});return i.setKeys(r),i.setIndexRecords(a),i}function Ct(n,{errors:e=0,currentLocation:t=0,expectedLocation:r=0,distance:a=W.distance,ignoreLocation:i=W.ignoreLocation}={}){let l=e/n.length;if(i)return l;let s=Math.abs(r-t);return a?l+s/a:s?1:l}function ns(n=[],e=W.minMatchCharLength){let t=[],r=-1,a=-1,i=0;for(let l=n.length;i<l;i+=1){let s=n[i];s&&r===-1?r=i:s||r===-1||((a=i-1)-r+1>=e&&t.push([r,a]),r=-1)}return n[i-1]&&i-r>=e&&t.push([r,i-1]),t}let Qe=32;function as(n,e,t,{location:r=W.location,distance:a=W.distance,threshold:i=W.threshold,findAllMatches:l=W.findAllMatches,minMatchCharLength:s=W.minMatchCharLength,includeMatches:u=W.includeMatches,ignoreLocation:o=W.ignoreLocation}={}){let p;if(e.length>Qe)throw Error(Qi(Qe));let m=e.length,d=n.length,y=Math.max(0,Math.min(r,d)),f=i,S=y,v=s>1||u,w=v?Array(d):[];for(;(p=n.indexOf(e,S))>-1;)if(f=Math.min(Ct(e,{currentLocation:p,expectedLocation:y,distance:a,ignoreLocation:o}),f),S=p+m,v){let P=0;for(;P<m;)w[p+P]=1,P+=1}S=-1;let g=[],_=1,$=m+d,x=1<<m-1;for(let P=0;P<m;P+=1){let D=0,R=$;for(;D<R;)Ct(e,{errors:P,currentLocation:y+R,expectedLocation:y,distance:a,ignoreLocation:o})<=f?D=R:$=R,R=Math.floor(($-D)/2+D);$=R;let I=Math.max(1,y-R+1),F=l?d:Math.min(y+R,d)+m,C=Array(F+2);C[F+1]=(1<<P)-1;for(let B=F;B>=I;B-=1){let V=B-1,X=t[n.charAt(V)];if(v&&(w[V]=+!!X),C[B]=(C[B+1]<<1|1)&X,P&&(C[B]|=(g[B+1]|g[B])<<1|1|g[B+1]),C[B]&x&&(_=Ct(e,{errors:P,currentLocation:V,expectedLocation:y,distance:a,ignoreLocation:o}))<=f){if(f=_,(S=V)<=y)break;I=Math.max(1,2*y-S)}}if(Ct(e,{errors:P+1,currentLocation:y,expectedLocation:y,distance:a,ignoreLocation:o})>f)break;g=C}let T={isMatch:S>=0,score:Math.max(.001,_)};if(v){let P=ns(w,s);P.length?u&&(T.indices=P):T.isMatch=!1}return T}function is(n){let e={};for(let t=0,r=n.length;t<r;t+=1){let a=n.charAt(t);e[a]=(e[a]||0)|1<<r-t-1}return e}class Tn{constructor(e,{location:t=W.location,threshold:r=W.threshold,distance:a=W.distance,includeMatches:i=W.includeMatches,findAllMatches:l=W.findAllMatches,minMatchCharLength:s=W.minMatchCharLength,isCaseSensitive:u=W.isCaseSensitive,ignoreLocation:o=W.ignoreLocation}={}){if(this.options={location:t,threshold:r,distance:a,includeMatches:i,findAllMatches:l,minMatchCharLength:s,isCaseSensitive:u,ignoreLocation:o},this.pattern=u?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;let p=(d,y)=>{this.chunks.push({pattern:d,alphabet:is(d),startIndex:y})},m=this.pattern.length;if(m>Qe){let d=0,y=m%Qe,f=m-y;for(;d<f;)p(this.pattern.substr(d,Qe),d),d+=Qe;if(y){let S=m-Qe;p(this.pattern.substr(S),S)}}else p(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,includeMatches:r}=this.options;if(t||(e=e.toLowerCase()),this.pattern===e){let f={isMatch:!0,score:0};return r&&(f.indices=[[0,e.length-1]]),f}let{location:a,distance:i,threshold:l,findAllMatches:s,minMatchCharLength:u,ignoreLocation:o}=this.options,p=[],m=0,d=!1;this.chunks.forEach(({pattern:f,alphabet:S,startIndex:v})=>{let{isMatch:w,score:g,indices:_}=as(e,f,S,{location:a+v,distance:i,threshold:l,findAllMatches:s,minMatchCharLength:u,includeMatches:r,ignoreLocation:o});w&&(d=!0),m+=g,w&&_&&(p=[...p,..._])});let y={isMatch:d,score:d?m/this.chunks.length:1};return d&&r&&(y.indices=p),y}}class Ge{constructor(e){this.pattern=e}static isMultiMatch(e){return Pn(e,this.multiRegex)}static isSingleMatch(e){return Pn(e,this.singleRegex)}search(){}}function Pn(n,e){let t=n.match(e);return t?t[1]:null}class ss extends Ge{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class os extends Ge{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let t=e.indexOf(this.pattern)===-1;return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class ls extends Ge{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\\^"(.*)"$/}static get singleRegex(){return/^\\^(.*)$/}search(e){let t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class cs extends Ge{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\\^"(.*)"$/}static get singleRegex(){return/^!\\^(.*)$/}search(e){let t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class us extends Ge{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\\$$/}static get singleRegex(){return/^(.*)\\$$/}search(e){let t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class ps extends Ge{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\\$$/}static get singleRegex(){return/^!(.*)\\$$/}search(e){let t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class Cn extends Ge{constructor(e,{location:t=W.location,threshold:r=W.threshold,distance:a=W.distance,includeMatches:i=W.includeMatches,findAllMatches:l=W.findAllMatches,minMatchCharLength:s=W.minMatchCharLength,isCaseSensitive:u=W.isCaseSensitive,ignoreLocation:o=W.ignoreLocation}={}){super(e),this._bitapSearch=new Tn(e,{location:t,threshold:r,distance:a,includeMatches:i,findAllMatches:l,minMatchCharLength:s,isCaseSensitive:u,ignoreLocation:o})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class Nn extends Ge{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,r=0,a=[],i=this.pattern.length;for(;(t=e.indexOf(this.pattern,r))>-1;)r=t+i,a.push([t,r-1]);let l=!!a.length;return{isMatch:l,score:l?0:1,indices:a}}}let _r=[ss,Nn,ls,cs,ps,us,os,Cn],Mn=_r.length,ds=/ +(?=(?:[^\\"]*\\"[^\\"]*\\")*[^\\"]*$)/,fs="|";function hs(n,e={}){return n.split(fs).map(t=>{let r=t.trim().split(ds).filter(i=>i&&!!i.trim()),a=[];for(let i=0,l=r.length;i<l;i+=1){let s=r[i],u=!1,o=-1;for(;!u&&++o<Mn;){let p=_r[o],m=p.isMultiMatch(s);m&&(a.push(new p(m,e)),u=!0)}if(!u)for(o=-1;++o<Mn;){let p=_r[o],m=p.isSingleMatch(s);if(m){a.push(new p(m,e));break}}}return a})}let ms=new Set([Cn.type,Nn.type]);class gs{constructor(e,{isCaseSensitive:t=W.isCaseSensitive,includeMatches:r=W.includeMatches,minMatchCharLength:a=W.minMatchCharLength,ignoreLocation:i=W.ignoreLocation,findAllMatches:l=W.findAllMatches,location:s=W.location,threshold:u=W.threshold,distance:o=W.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:r,minMatchCharLength:a,findAllMatches:l,ignoreLocation:i,location:s,threshold:u,distance:o},this.pattern=t?e:e.toLowerCase(),this.query=hs(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:r,isCaseSensitive:a}=this.options;e=a?e:e.toLowerCase();let i=0,l=[],s=0;for(let u=0,o=t.length;u<o;u+=1){let p=t[u];l.length=0,i=0;for(let m=0,d=p.length;m<d;m+=1){let y=p[m],{isMatch:f,indices:S,score:v}=y.search(e);if(f){if(i+=1,s+=v,r){let w=y.constructor.type;ms.has(w)?l=[...l,...S]:l.push(S)}}else{s=0,i=0,l.length=0;break}}if(i){let m={isMatch:!0,score:s/i};return r&&(m.indices=l),m}}return{isMatch:!1,score:1}}}let br=[];function ys(...n){br.push(...n)}function vr(n,e){for(let t=0,r=br.length;t<r;t+=1){let a=br[t];if(a.condition(n,e))return new a(n,e)}return new Tn(n,e)}let Nt={AND:"$and",OR:"$or"},wr={PATH:"$path",PATTERN:"$val"},$r=n=>!!(n[Nt.AND]||n[Nt.OR]),_s=n=>!!n[wr.PATH],bs=n=>!Fe(n)&&En(n)&&!$r(n),Rn=n=>({[Nt.AND]:Object.keys(n).map(e=>({[e]:n[e]}))});function Fn(n,e,{auto:t=!0}={}){let r=a=>{let i=Object.keys(a),l=_s(a);if(!l&&i.length>1&&!$r(a))return r(Rn(a));if(bs(a)){let u=l?a[wr.PATH]:i[0],o=l?a[wr.PATTERN]:a[u];if(!Pe(o))throw Error(Ji(u));let p={keyId:gr(u),pattern:o};return t&&(p.searcher=vr(o,e)),p}let s={children:[],operator:i[0]};return i.forEach(u=>{let o=a[u];Fe(o)&&o.forEach(p=>{s.children.push(r(p))})}),s};return $r(n)||(n=Rn(n)),r(n)}function vs(n,{ignoreFieldNorm:e=W.ignoreFieldNorm}){n.forEach(t=>{let r=1;t.matches.forEach(({key:a,norm:i,score:l})=>{let s=a?a.weight:null;r*=Math.pow(l===0&&s?Number.EPSILON:l,(s||1)*(e?1:i))}),t.score=r})}function ws(n,e){let t=n.matches;e.matches=[],Se(t)&&t.forEach(r=>{if(!Se(r.indices)||!r.indices.length)return;let{indices:a,value:i}=r,l={indices:a,value:i};r.key&&(l.key=r.key.src),r.idx>-1&&(l.refIndex=r.idx),e.matches.push(l)})}function $s(n,e){e.score=n.score}function Ss(n,e,{includeMatches:t=W.includeMatches,includeScore:r=W.includeScore}={}){let a=[];return t&&a.push(ws),r&&a.push($s),n.map(i=>{let{idx:l}=i,s={item:e[l],refIndex:l};return a.length&&a.forEach(u=>{u(i,s)}),s})}class et{constructor(e,t={},r){this.options={...W,...t},this.options.useExtendedSearch,this._keyStore=new Ki(this.options.keys),this.setCollection(e,r)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof yr))throw Error(Vi);this._myIndex=t||jn(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){Se(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){let t=[];for(let r=0,a=this._docs.length;r<a;r+=1){let i=this._docs[r];e(i,r)&&(this.removeAt(r),r-=1,a-=1,t.push(i))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){let{includeMatches:r,includeScore:a,shouldSort:i,sortFn:l,ignoreFieldNorm:s}=this.options,u=Pe(e)?Pe(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return vs(u,{ignoreFieldNorm:s}),i&&u.sort(l),xn(t)&&t>-1&&(u=u.slice(0,t)),Ss(u,this._docs,{includeMatches:r,includeScore:a})}_searchStringList(e){let t=vr(e,this.options),{records:r}=this._myIndex,a=[];return r.forEach(({v:i,i:l,n:s})=>{if(!Se(i))return;let{isMatch:u,score:o,indices:p}=t.searchIn(i);u&&a.push({item:i,idx:l,matches:[{score:o,value:i,norm:s,indices:p}]})}),a}_searchLogical(e){let t=Fn(e,this.options),r=(s,u,o)=>{if(!s.children){let{keyId:m,searcher:d}=s,y=this._findMatches({key:this._keyStore.get(m),value:this._myIndex.getValueForItemAtKeyId(u,m),searcher:d});return y&&y.length?[{idx:o,item:u,matches:y}]:[]}let p=[];for(let m=0,d=s.children.length;m<d;m+=1){let y=r(s.children[m],u,o);if(y.length)p.push(...y);else if(s.operator===Nt.AND)return[]}return p},a=this._myIndex.records,i={},l=[];return a.forEach(({$:s,i:u})=>{if(Se(s)){let o=r(t,s,u);o.length&&(i[u]||(i[u]={idx:u,item:s,matches:[]},l.push(i[u])),o.forEach(({matches:p})=>{i[u].matches.push(...p)}))}}),l}_searchObjectList(e){let t=vr(e,this.options),{keys:r,records:a}=this._myIndex,i=[];return a.forEach(({$:l,i:s})=>{if(!Se(l))return;let u=[];r.forEach((o,p)=>{u.push(...this._findMatches({key:o,value:l[p],searcher:t}))}),u.length&&i.push({idx:s,item:l,matches:u})}),i}_findMatches({key:e,value:t,searcher:r}){if(!Se(t))return[];let a=[];if(Fe(t))t.forEach(({v:i,i:l,n:s})=>{if(!Se(i))return;let{isMatch:u,score:o,indices:p}=r.searchIn(i);u&&a.push({score:o,key:e,value:i,idx:l,norm:s,indices:p})});else{let{v:i,n:l}=t,{isMatch:s,score:u,indices:o}=r.searchIn(i);s&&a.push({score:u,key:e,value:i,norm:l,indices:o})}return a}}function xs(n,e){let[t,r,a]=n.split(":"),[i,l]=e.split(":"),s=6371,u=Mt(i-t),o=Mt(l-r),p=Math.sin(u/2)*Math.sin(u/2)+Math.cos(Mt(t))*Math.cos(Mt(i))*Math.sin(o/2)*Math.sin(o/2),m=2*Math.atan2(Math.sqrt(p),Math.sqrt(1-p))*s;return Number(a)>=m}function Mt(n){return Math.PI/180*n}function Es({type:n,date:e=0,match:t=!0}={},r){if(!r&&n)return!1;let a=new Date,i=!0;switch(n){case"day":let l=tt(e),s=tt(e+1);i=l<=r&&r<s;break;case"days":if(e<0){let d=tt(1);i=tt(-6)<=r&&r<d}else{let d=tt(),y=tt(7);i=d<=r&&r<y}break;case"day_week":i=e===new Date(r).getDay();break;case"week":let u=a.getDate()-a.getDay(),o=u+(e==-2?13:6),[p,m]=ks(a.setDate(u+7*e),new Date().setDate(o+7*e));i=p<=r&&r<=m;break;case"month":if(a.getFullYear()!==new Date(r).getFullYear())return!1;i=a.getMonth()+e===new Date(r).getMonth();break;case"year":i=a.getFullYear()+e===new Date(r).getFullYear();break;default:return!0}return t?i:!i}function ks(n,e){return[new Date(n),new Date(e)]}function tt(n=0){let e=new Date;return new Date(e.getFullYear(),e.getMonth(),e.getDate()+n).valueOf()}function Ln(n,e){if(n&&n.length)return e?n.filter(t=>t.fields.find(r=>r.index_value&&r.index_value.toLowerCase().indexOf(e.toLowerCase())!==-1)):n}et.version="6.6.2",et.createIndex=jn,et.parseIndex=rs,et.config=W,et.parseQuery=Fn,ys(gs);let Dn=new et([]);function As(n,e){return Dn.setCollection(e),!!Dn.search(n).length}function Is(n,e){let t=new Rs;return n&&n.length?t.filter(e,n):[]}class Os{changeBehavior(e){switch(e){case"contain_or":this._checkFn=function(t,r){return r.some(a=>t.some(i=>i.indexOf(a)!==-1))};break;case"contain_and":this._checkFn=function(t,r){return r.every(a=>t.some(i=>i.indexOf(a)!==-1))};break;case"not_contain_or":this._checkFn=function(t,r){return r.some(a=>t.every(i=>i.indexOf(a)===-1))};break;case"not_contain_and":this._checkFn=function(t,r){return r.every(a=>t.every(i=>i.indexOf(a)===-1))};break;case"equal_or":this._checkFn=function(t,r){return!!t.length&&t.some(a=>r.some(i=>a==i))};break;case"equal_and":this._checkFn=function(t,r){if(!t.length)return!1;let a=new Set(r);for(;t.length&&a.size;){let i=t.pop();a.has(i)&&a.delete(i)}return!a.size};break;case"not_equal_or":this._checkFn=function(t,r){if(!t.length)return!0;let a=new Set(r);for(;t.length&&a.size;){let i=t.pop();if(!a.has(i))return!0}return!1};break;case"not_equal_and":this._checkFn=function(t,r){let a=new Set(r);for(;t.length&&a.size;){let i=t.pop();if(a.has(i))return!1}return!0};break;case"bigger":this._checkFn=function(t,r){return r.some(a=>t.every(i=>i>a))};break;case"lower":this._checkFn=function(t,r){return r.some(a=>t.every(i=>i<a))};break;case"range":this._checkFn=function(t,r){return r.some(a=>t.every(i=>a.start<=i&&i<a.end))};break;case"value":this._checkFn=function(t,r){return r.some(a=>t.some(i=>i==a))};break;case"search":this._checkFn=function(t,r){return r.some(a=>As(a,t))};break;case"phone_equal_or":this._checkFn=function(t,r){return!!t.length&&r.some(a=>t.some(i=>i.replace(/[^0-9]/g,"").indexOf(a.replace(/[^0-9]/g,""))!==-1))};break;case"distance":this._checkFn=function(t,r){return r.some(a=>t.some(i=>xs(a,i)))};break;case"date_in":case"date_out":this._checkFn=function(t,r){return r.some(a=>t.some(i=>Es(a,i)))};break;case"recurring_date":this._checkFn=function(t,r){return r.some(a=>t.some(i=>gudhub.checkRecurringDate(i,a)))}}return this}check(e){return this.changeBehavior(e.getCheckOption())._checkFn(e.getEntity(),e.getFilterValues())}}class Sr{convert(e){return[Number(e)]}convertFilterValue(e){return Number(e)}}class js extends Sr{convertFilterValue(e){return{start:Number(e.split(":")[0]),end:Number(e.split(":")[1])}}}class Ts{convert(e){return String(e??"").toLowerCase().split(",")}convertFilterValue(e){return e===0?"0":String(e||"").toLowerCase()}}class Ps extends Sr{convertFilterValue(e){let[t,r,a]=e.split(":");return{type:t,date:Number(r),match:!!Number(a)}}}class Cs{convert(e){return[String(!!e)]}convertFilterValue(e){return String(e)}}class Ns{convert(e){return[Number(e)]}convertFilterValue(e){return String(e)}}class Ms{constructor(){this._strategies={stringStrategy:new Ts,numberStrategy:new Sr,booleanStrategy:new Cs,rangeStrategy:new js,dateStrategy:new Ps,recurringDateStrategy:new Ns}}setStrategy(e){switch(this._checkOption=e,e){case"contain_or":case"contain_and":case"not_contain_or":case"not_contain_and":case"equal_or":case"equal_and":case"not_equal_or":case"not_equal_and":case"phone_equal_or":case"distance":case"search":this._currentStrategy=this._strategies.stringStrategy;break;case"bigger":case"lower":this._currentStrategy=this._strategies.numberStrategy;break;case"range":this._currentStrategy=this._strategies.rangeStrategy;break;case"date_in":case"date_out":this._currentStrategy=this._strategies.dateStrategy;break;case"value":this._currentStrategy=this._strategies.booleanStrategy;break;case"recurring_date":this._currentStrategy=this._strategies.recurringDateStrategy}return this}setEntity(e){return this._entity=this._currentStrategy.convert(e),this}getEntity(){return this._entity}setFilterValues(e){let t=Array.isArray(e)?e:[e];return this._filterValues=t.map(r=>this._currentStrategy.convertFilterValue(r)),this}getFilterValues(){return this._filterValues}getCheckOption(){return this._checkOption}}class Rs{constructor(){}filter(e,t){let r=this.checkIfAllFiltersHaveAndStrategy(e),a=[],i=e.filter(function(l){return l.valuesArray.length});for(let l of t){let s=!0;for(let u=0;u<i.length;u++){let o=i[u],p=l.fields.find(function(y){return o.field_id==y.field_id}),m=new Ms,d=new Os;switch(m.setStrategy(o.search_type).setEntity(p&&p.field_value!=null?p.field_value:null).setFilterValues(o.valuesArray),o.boolean_strategy){case"and":default:s=s&&d.check(m);break;case"or":s=s||d.check(m)}if(!s&&r)break}s&&a.push(l)}return a.length||e.length&&!a.length?a:t}checkIfAllFiltersHaveAndStrategy(e){return e.every(t=>!t.boolean_strategy||t.boolean_strategy=="and")}}function Fs(n,e){let t=[],r=[];if(n.length>0?n.forEach(a=>{r.push(a)}):r=e,r.length>0){r.forEach((a,i)=>{for(let l=0;l<e.length;l++)a.field_id==e[l].field_id&&(t.push(a.field_id),r[i]=gudhub.mergeObjects(e[l],a))});for(let a=0;a<e.length;a++)t.includes(e[a].field_id)||r.push(e[a])}return r}var xr={};function Ls(n,e){let t=[];return e.forEach(r=>{let a=[];try{a=G(xr).paths(n,r.json_path),t.push({field_id:r.field_id,json_paths:a,json_paths_length:a.length})}catch(i){console.log(i)}}),t.sort((r,a)=>a.json_paths_length-r.json_paths_length),qs(t).map(r=>({fields:r.fields.map(a=>({field_id:a.field_id,field_value:G(xr).value(n,a.json_path)}))}))}function Ds(n,e){let t=[];return e.forEach(r=>{t.push({path_to_compare:r,match_coefficient:0})}),n.forEach((r,a)=>{for(var i=0;i<t.length;i++)t[i].path_to_compare[a]==r&&(t[i].match_coefficient+=1/(a+1))}),t.sort((r,a)=>a.match_coefficient-r.match_coefficient),t[0].path_to_compare}function qs(n){let e=[];return n.length&&n[0].json_paths.forEach(t=>{let r={fields:[]};n.forEach(a=>{r.fields.push({field_id:a.field_id,json_path:Ds(t,a.json_paths)})}),e.push(r)}),e}function Bs(n,e,t,r,a,i){let l=[],s=function(u,o){let p=Ye(o,a);p&&(p.field_value=i+"."+u.item_id,l.push(o))};return t.forEach(u=>{n.forEach(o=>{Hs(o,u,e,r,s)})}),l}function Us(n,e,t){let r=JSON.parse(JSON.stringify(n)),a=JSON.parse(JSON.stringify(e)),i=[],l=function(p,m){i.push(Ws(p,m))},s=function(p){i.push(p)},u=function(p){i.push(p)};return t?qn(r,a,t,l,s,u):Bn(r,a,l,s,u,function(p){i.push(p)}),i}function Gs(n,e,t){let r=JSON.parse(JSON.stringify(n)),a=JSON.parse(JSON.stringify(e)),i={is_items_diff:!1,new_src_items:[],diff_src_items:[],same_items:[],trash_src_items:[]},l=function(p){i.diff_src_items.push(p)},s=function(p){i.same_items.push(p)},u=function(p){i.new_src_items.push(p)},o=function(p){i.trash_src_items.push(p)};return t&&qn(r,a,t,l,s,u),t||Bn(r,a,l,s,u,null,o),i.is_items_diff=i.new_src_items.length>0||i.diff_src_items.length>0,i}function Ws(n,e){return n.fields.forEach(t=>{let r=Ye(e,t.field_id);r?(r.field_value=t.field_value,t.history&&r.history&&(r.history=t.history.concat(r.history))):e.fields.push(t)}),e}function qn(n,e,t,r,a,i){n.forEach(l=>{let s=!0,u=Ye(l,t).field_value;e.forEach(o=>{u==Ye(o,t).field_value&&(s=!1,Un(l,o,r,a))}),s&&i(l)})}function Bn(n,e,t,r,a,i,l){let s=new zs(e);if(n.forEach(u=>{let o=s.pullItemIndex(u.item_id);o!=null?Un(u,e[o],t,r,l):(u.trash&&l(u),u.trash||a(u))}),i)for(let[u,o]of Object.entries(s.itemsMap))i(e[o])}function Un(n,e,t,r,a){let i=!0;for(let l=0;l<n.fields.length;l++){let s=Ye(e,n.fields[l].field_id);s?s.field_value!=n.fields[l].field_value&&(i=i&&!1):i=i&&!1}i&&(n.trash&&a(n,e),n.trash||r(n,e)),i||(n.trash&&a(n,e),n.trash||t(n,e))}function Hs(n,e,t,r,a){Ye(n,t).field_value==Ye(e,r).field_value&&a(n,e)}function Ye(n,e){let t=null;for(let r=0;r<n.fields.length;r++)e==n.fields[r].field_id&&(t=n.fields[r]);return t}(function(n){xr=n()})(function(){return function n(e,t,r){function a(s,u){if(!t[s]){if(!e[s]){var o=void 0;if(!u&&o)return o(s,!0);if(i)return i(s,!0);var p=Error("Cannot find module '"+s+"'");throw p.code="MODULE_NOT_FOUND",p}var m=t[s]={exports:{}};e[s][0].call(m.exports,function(d){return a(e[s][1][d]||d)},m,m.exports,n,e,t,r)}return t[s].exports}for(var i=void 0,l=0;l<r.length;l++)a(r[l]);return a}({"./aesprim":[function(n,e,t){(function(r,a){a(t!==void 0?t:r.esprima={})})(this,function(r){var a,i,l,s,u,o,p,m,d,y,f,S,v,w,g,_,$,x;function T(c,h){if(!c)throw Error("ASSERT: "+h)}function P(c){return c>=48&&c<=57}function D(c){return"0123456789abcdefABCDEF".indexOf(c)>=0}function R(c){return"01234567".indexOf(c)>=0}function I(c){return c===32||c===9||c===11||c===12||c===160||c>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(c)>=0}function F(c){return c===10||c===13||c===8232||c===8233}function C(c){return c==64||c===36||c===95||c>=65&&c<=90||c>=97&&c<=122||c===92||c>=128&&p.NonAsciiIdentifierStart.test(String.fromCharCode(c))}function B(c){return c===36||c===95||c>=65&&c<=90||c>=97&&c<=122||c>=48&&c<=57||c===92||c>=128&&p.NonAsciiIdentifierPart.test(String.fromCharCode(c))}function V(c){switch(c){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0;default:return!1}}function X(c){switch(c){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}}function oe(c){return c==="eval"||c==="arguments"}function we(c){if(y&&X(c))return!0;switch(c.length){case 2:return c==="if"||c==="in"||c==="do";case 3:return c==="var"||c==="for"||c==="new"||c==="try"||c==="let";case 4:return c==="this"||c==="else"||c==="case"||c==="void"||c==="with"||c==="enum";case 5:return c==="while"||c==="break"||c==="catch"||c==="throw"||c==="const"||c==="yield"||c==="class"||c==="super";case 6:return c==="return"||c==="typeof"||c==="delete"||c==="switch"||c==="export"||c==="import";case 7:return c==="default"||c==="finally"||c==="extends";case 8:return c==="function"||c==="continue"||c==="debugger";case 10:return c==="instanceof";default:return!1}}function H(c,h,b,E,j){var M;T(typeof b=="number","Comment must have valid position"),!($.lastCommentStart>=b)&&($.lastCommentStart=b,M={type:c,value:h},x.range&&(M.range=[b,E]),x.loc&&(M.loc=j),x.comments.push(M),x.attachComment&&(x.leadingComments.push(M),x.trailingComments.push(M)))}function ie(c){var h,b,E,j;for(h=f-c,b={start:{line:S,column:f-v-c}};f<w;)if(E=d.charCodeAt(f),++f,F(E)){x.comments&&(j=d.slice(h+c,f-1),b.end={line:S,column:f-v-1},H("Line",j,h,f-1,b)),E===13&&d.charCodeAt(f)===10&&++f,++S,v=f;return}x.comments&&(j=d.slice(h+c,f),b.end={line:S,column:f-v},H("Line",j,h,f,b))}function ee(){var c,h,b,E;for(x.comments&&(c=f-2,h={start:{line:S,column:f-v-2}});f<w;)if(F(b=d.charCodeAt(f)))b===13&&d.charCodeAt(f+1)===10&&++f,++S,v=++f,f>=w&&Y({},o.UnexpectedToken,"ILLEGAL");else if(b===42){if(d.charCodeAt(f+1)===47){++f,++f,x.comments&&(E=d.slice(c+2,f-2),h.end={line:S,column:f-v},H("Block",E,c,f,h));return}++f}else++f;Y({},o.UnexpectedToken,"ILLEGAL")}function k(){var c,h;for(h=f===0;f<w;)if(I(c=d.charCodeAt(f)))++f;else if(F(c))++f,c===13&&d.charCodeAt(f)===10&&++f,++S,v=f,h=!0;else if(c===47)if((c=d.charCodeAt(f+1))===47)++f,++f,ie(2),h=!0;else if(c===42)++f,++f,ee();else break;else if(h&&c===45)if(d.charCodeAt(f+1)===45&&d.charCodeAt(f+2)===62)f+=3,ie(3);else break;else if(c===60)if(d.slice(f+1,f+4)==="!--")++f,++f,++f,++f,ie(4);else break;else break}function O(c){var h,b,E,j=0;for(h=0,b=c==="u"?4:2;h<b;++h){if(!(f<w&&D(d[f])))return"";E=d[f++],j=16*j+"0123456789abcdef".indexOf(E.toLowerCase())}return String.fromCharCode(j)}function N(){var c,h;for(h=String.fromCharCode(c=d.charCodeAt(f++)),c===92&&(d.charCodeAt(f)!==117&&Y({},o.UnexpectedToken,"ILLEGAL"),++f,(c=O("u"))&&c!=="\\\\"&&C(c.charCodeAt(0))||Y({},o.UnexpectedToken,"ILLEGAL"),h=c);f<w&&B(c=d.charCodeAt(f));)++f,h+=String.fromCharCode(c),c===92&&(h=h.substr(0,h.length-1),d.charCodeAt(f)!==117&&Y({},o.UnexpectedToken,"ILLEGAL"),++f,(c=O("u"))&&c!=="\\\\"&&B(c.charCodeAt(0))||Y({},o.UnexpectedToken,"ILLEGAL"),h+=c);return h}function K(){var c,h;for(c=f++;f<w;){if((h=d.charCodeAt(f))===92)return f=c,N();if(B(h))++f;else break}return d.slice(c,f)}function se(){var c,h;return c=f,{type:(h=d.charCodeAt(f)===92?N():K()).length===1?a.Identifier:we(h)?a.Keyword:h==="null"?a.NullLiteral:h==="true"||h==="false"?a.BooleanLiteral:a.Identifier,value:h,lineNumber:S,lineStart:v,start:c,end:f}}function te(){var c,h,b,E,j=f,M=d.charCodeAt(f),z=d[f];switch(M){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++f,x.tokenize&&(M===40?x.openParenToken=x.tokens.length:M===123&&(x.openCurlyToken=x.tokens.length)),{type:a.Punctuator,value:String.fromCharCode(M),lineNumber:S,lineStart:v,start:j,end:f};default:if((c=d.charCodeAt(f+1))===61)switch(M){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return f+=2,{type:a.Punctuator,value:String.fromCharCode(M)+String.fromCharCode(c),lineNumber:S,lineStart:v,start:j,end:f};case 33:case 61:return f+=2,d.charCodeAt(f)===61&&++f,{type:a.Punctuator,value:d.slice(j,f),lineNumber:S,lineStart:v,start:j,end:f}}}return(E=d.substr(f,4))===">>>="?(f+=4,{type:a.Punctuator,value:E,lineNumber:S,lineStart:v,start:j,end:f}):(b=E.substr(0,3))===">>>"||b==="<<="||b===">>="?(f+=3,{type:a.Punctuator,value:b,lineNumber:S,lineStart:v,start:j,end:f}):z===(h=b.substr(0,2))[1]&&"+-<>&|".indexOf(z)>=0||h==="=>"?(f+=2,{type:a.Punctuator,value:h,lineNumber:S,lineStart:v,start:j,end:f}):"<>=!+-*%&|^/".indexOf(z)>=0?(++f,{type:a.Punctuator,value:z,lineNumber:S,lineStart:v,start:j,end:f}):void Y({},o.UnexpectedToken,"ILLEGAL")}function J(c){for(var h="";f<w&&D(d[f]);)h+=d[f++];return h.length===0&&Y({},o.UnexpectedToken,"ILLEGAL"),C(d.charCodeAt(f))&&Y({},o.UnexpectedToken,"ILLEGAL"),{type:a.NumericLiteral,value:parseInt("0x"+h,16),lineNumber:S,lineStart:v,start:c,end:f}}function ce(c){for(var h="0"+d[f++];f<w&&R(d[f]);)h+=d[f++];return(C(d.charCodeAt(f))||P(d.charCodeAt(f)))&&Y({},o.UnexpectedToken,"ILLEGAL"),{type:a.NumericLiteral,value:parseInt(h,8),octal:!0,lineNumber:S,lineStart:v,start:c,end:f}}function re(){var c,h,b;if(T(P((b=d[f]).charCodeAt(0))||b===".","Numeric literal must start with a decimal digit or a decimal point"),h=f,c="",b!=="."){if(c=d[f++],b=d[f],c==="0"){if(b==="x"||b==="X")return++f,J(h);if(R(b))return ce(h);b&&P(b.charCodeAt(0))&&Y({},o.UnexpectedToken,"ILLEGAL")}for(;P(d.charCodeAt(f));)c+=d[f++];b=d[f]}if(b==="."){for(c+=d[f++];P(d.charCodeAt(f));)c+=d[f++];b=d[f]}if(b==="e"||b==="E")if(c+=d[f++],((b=d[f])==="+"||b==="-")&&(c+=d[f++]),P(d.charCodeAt(f)))for(;P(d.charCodeAt(f));)c+=d[f++];else Y({},o.UnexpectedToken,"ILLEGAL");return C(d.charCodeAt(f))&&Y({},o.UnexpectedToken,"ILLEGAL"),{type:a.NumericLiteral,value:parseFloat(c),lineNumber:S,lineStart:v,start:h,end:f}}function fe(){var c,h,b,E,j,M,z,pe,ae="",be=!1;for(z=S,pe=v,T((c=d[f])==="'"||c==='"',"String literal must starts with a quote"),h=f,++f;f<w;){if((b=d[f++])===c){c="";break}if(b==="\\\\")if((b=d[f++])&&F(b.charCodeAt(0)))++S,b==="\\r"&&d[f]===\`
|
|
105
105
|
\`&&++f,v=f;else switch(b){case"u":case"x":M=f,(j=O(b))?ae+=j:(f=M,ae+=b);break;case"n":ae+=\`
|
|
106
|
-
\`;break;case"r":ae+="\\r";break;case"t":ae+=" ";break;case"b":ae+="\\b";break;case"f":ae+="\\f";break;case"v":ae+="\\v";break;default:R(b)?((E="01234567".indexOf(b))!==0&&(_e=!0),f<w&&R(d[f])&&(_e=!0,E=8*E+"01234567".indexOf(d[f++]),"0123".indexOf(b)>=0&&f<w&&R(d[f])&&(E=8*E+"01234567".indexOf(d[f++]))),ae+=String.fromCharCode(E)):ae+=b}else{if(F(b.charCodeAt(0)))break;ae+=b}}return c!==""&&Q({},o.UnexpectedToken,"ILLEGAL"),{type:a.StringLiteral,value:ae,octal:_e,startLineNumber:z,startLineStart:pe,lineNumber:S,lineStart:v,start:h,end:f}}function ke(c,h){var b;try{b=new RegExp(c,h)}catch{Q({},o.InvalidRegExp)}return b}function Ae(){var c,h,b,E;for(T((c=d[f])==="/","Regular expression literal must start with a slash"),h=d[f++],b=!1,E=!1;f<w;)if(h+=c=d[f++],c==="\\\\")F((c=d[f++]).charCodeAt(0))&&Q({},o.UnterminatedRegExp),h+=c;else if(F(c.charCodeAt(0)))Q({},o.UnterminatedRegExp);else if(b)c==="]"&&(b=!1);else{if(c==="/"){E=!0;break}c==="["&&(b=!0)}return E||Q({},o.UnterminatedRegExp),{value:h.substr(1,h.length-2),literal:h}}function Sr(){var c,h,b,E;for(h="",b="";f<w&&B((c=d[f]).charCodeAt(0));)if(++f,c==="\\\\"&&f<w)if((c=d[f])==="u"){if(E=++f,c=O("u"))for(b+=c,h+="\\\\u";E<f;++E)h+=d[E];else f=E,b+="u",h+="\\\\u";ne({},o.UnexpectedToken,"ILLEGAL")}else h+="\\\\",ne({},o.UnexpectedToken,"ILLEGAL");else b+=c,h+=c;return{value:b,literal:h}}function zn(){var c,h,b,E;return _=null,k(),c=f,h=Ae(),b=Sr(),E=ke(h.value,b.value),x.tokenize?{type:a.RegularExpression,value:E,lineNumber:S,lineStart:v,start:c,end:f}:{literal:h.literal+b.literal,value:E,start:c,end:f}}function rt(){var c,h,b,E;return k(),c=f,h={start:{line:S,column:f-v}},b=zn(),h.end={line:S,column:f-v},x.tokenize||(x.tokens.length>0&&(E=x.tokens[x.tokens.length-1]).range[0]===c&&E.type==="Punctuator"&&(E.value==="/"||E.value==="/=")&&x.tokens.pop(),x.tokens.push({type:"RegularExpression",value:b.literal,range:[c,f],loc:h})),b}function Bo(c){return c.type===a.Identifier||c.type===a.Keyword||c.type===a.BooleanLiteral||c.type===a.NullLiteral}function Uo(){var c,h;if(!(c=x.tokens[x.tokens.length-1]))return rt();if(c.type==="Punctuator"){if(c.value==="]")return te();if(c.value===")")return(h=x.tokens[x.openParenToken-1])&&h.type==="Keyword"&&(h.value==="if"||h.value==="while"||h.value==="for"||h.value==="with")?rt():te();if(c.value==="}"){if(x.tokens[x.openCurlyToken-3]&&x.tokens[x.openCurlyToken-3].type==="Keyword"){if(!(h=x.tokens[x.openCurlyToken-4]))return te()}else{if(!x.tokens[x.openCurlyToken-4]||x.tokens[x.openCurlyToken-4].type!=="Keyword")return te();if(!(h=x.tokens[x.openCurlyToken-5]))return rt()}if(l.indexOf(h.value)>=0)return te()}return rt()}return c.type==="Keyword"?rt():te()}function xr(){var c;return k(),f>=w?{type:a.EOF,lineNumber:S,lineStart:v,start:f,end:f}:C(c=d.charCodeAt(f))?se():c===40||c===41||c===59?te():c===39||c===34?fe():c===46?P(d.charCodeAt(f+1))?re():te():P(c)?re():x.tokenize&&c===47?Uo():te()}function Vn(){var c,h,b;return k(),c={start:{line:S,column:f-v}},h=xr(),c.end={line:S,column:f-v},h.type!==a.EOF&&(b=d.slice(h.start,h.end),x.tokens.push({type:i[h.type],value:b,range:[h.start,h.end],loc:c})),h}function Y(){var c;return f=(c=_).end,S=c.lineNumber,v=c.lineStart,_=x.tokens!==void 0?Vn():xr(),f=c.end,S=c.lineNumber,v=c.lineStart,c}function Er(){var c,h,b;c=f,h=S,b=v,_=x.tokens!==void 0?Vn():xr(),f=c,S=h,v=b}function Jn(c,h){this.line=c,this.column=h}function Go(c,h,b,E){this.start=new Jn(c,h),this.end=new Jn(b,E)}function gt(){var c,h,b,E;return c=f,h=S,b=v,k(),E=S!==h,f=c,S=h,v=b,E}function Q(c,h){var b,E=Array.prototype.slice.call(arguments,2),j=h.replace(/%(\\d)/g,function(M,z){return T(z<E.length,"Message reference must be in range"),E[z]});throw typeof c.lineNumber=="number"?((b=Error("Line "+c.lineNumber+": "+j)).index=c.start,b.lineNumber=c.lineNumber,b.column=c.start-v+1):((b=Error("Line "+S+": "+j)).index=f,b.lineNumber=S,b.column=f-v+1),b.description=j,b}function ne(){try{Q.apply(null,arguments)}catch(c){if(x.errors)x.errors.push(c);else throw c}}function Pe(c){if(c.type===a.EOF&&Q(c,o.UnexpectedEOS),c.type===a.NumericLiteral&&Q(c,o.UnexpectedNumber),c.type===a.StringLiteral&&Q(c,o.UnexpectedString),c.type===a.Identifier&&Q(c,o.UnexpectedIdentifier),c.type===a.Keyword){if(V(c.value))Q(c,o.UnexpectedReserved);else if(y&&X(c.value)){ne(c,o.StrictReservedWord);return}Q(c,o.UnexpectedToken,c.value)}Q(c,o.UnexpectedToken,c.value)}function U(c){var h=Y();(h.type!==a.Punctuator||h.value!==c)&&Pe(h)}function ue(c){var h=Y();(h.type!==a.Keyword||h.value!==c)&&Pe(h)}function q(c){return _.type===a.Punctuator&&_.value===c}function me(c){return _.type===a.Keyword&&_.value===c}function Wo(){var c;return _.type===a.Punctuator&&((c=_.value)==="="||c==="*="||c==="/="||c==="%="||c==="+="||c==="-="||c==="<<="||c===">>="||c===">>>="||c==="&="||c==="^="||c==="|=")}function Ce(){var c;if(d.charCodeAt(f)===59||q(";")){Y();return}c=S,k(),S!==c||_.type===a.EOF||q("}")||Pe(_)}function Rt(c){return c.type===s.Identifier||c.type===s.MemberExpression}function Ho(){var c,h=[];for(c=_,U("[");!q("]");)q(",")?(Y(),h.push(null)):(h.push(Ie()),q("]")||U(","));return Y(),g.markEnd(g.createArrayExpression(h),c)}function kr(c,h){var b,E,j;return b=y,j=_,E=Ir(),h&&y&&le(c[0].name)&&ne(h,o.StrictParamName),y=b,g.markEnd(g.createFunctionExpression(null,c,[],E),j)}function Ft(){var c,h;return h=_,(c=Y()).type===a.StringLiteral||c.type===a.NumericLiteral?(y&&c.octal&&ne(c,o.StrictOctalLiteral),g.markEnd(g.createLiteral(c),h)):g.markEnd(g.createIdentifier(c.value),h)}function zo(){var c,h,b,E,j,M;return c=_,M=_,c.type===a.Identifier?(b=Ft(),c.value!=="get"||q(":")?c.value!=="set"||q(":")?(U(":"),E=Ie(),g.markEnd(g.createProperty("init",b,E),M)):(h=Ft(),U("("),(c=_).type!==a.Identifier?(U(")"),ne(c,o.UnexpectedToken,c.value),E=kr([])):(j=[Ge()],U(")"),E=kr(j,c)),g.markEnd(g.createProperty("set",h,E),M)):(h=Ft(),U("("),U(")"),E=kr([]),g.markEnd(g.createProperty("get",h,E),M))):c.type!==a.EOF&&c.type!==a.Punctuator?(h=Ft(),U(":"),E=Ie(),g.markEnd(g.createProperty("init",h,E),M)):void Pe(c)}function Vo(){var c,h,b,E,j,M=[],z={},pe=String;for(j=_,U("{");!q("}");)h=(c=zo()).key.type===s.Identifier?c.key.name:pe(c.key.value),E=c.kind==="init"?u.Data:c.kind==="get"?u.Get:u.Set,b="$"+h,Object.prototype.hasOwnProperty.call(z,b)?(z[b]===u.Data?y&&E===u.Data?ne({},o.StrictDuplicateProperty):E!==u.Data&&ne({},o.AccessorDataProperty):E===u.Data?ne({},o.AccessorDataProperty):z[b]&E&&ne({},o.AccessorGetSet),z[b]|=E):z[b]=E,M.push(c),q("}")||U(",");return U("}"),g.markEnd(g.createObjectExpression(M),j)}function Jo(){var c;return U("("),c=he(),U(")"),c}function Yn(){var c,h,b,E;if(q("("))return Jo();if(q("["))return Ho();if(q("{"))return Vo();if(c=_.type,E=_,c===a.Identifier)b=g.createIdentifier(Y().value);else if(c===a.StringLiteral||c===a.NumericLiteral)y&&_.octal&&ne(_,o.StrictOctalLiteral),b=g.createLiteral(Y());else if(c===a.Keyword){if(me("function"))return wl();me("this")?(Y(),b=g.createThisExpression()):Pe(Y())}else c===a.BooleanLiteral?((h=Y()).value=h.value==="true",b=g.createLiteral(h)):c===a.NullLiteral?((h=Y()).value=null,b=g.createLiteral(h)):q("/")||q("/=")?(b=x.tokens!==void 0?g.createLiteral(rt()):g.createLiteral(zn()),Er()):Pe(Y());return g.markEnd(b,E)}function Qn(){var c=[];if(U("("),!q(")"))for(;f<w&&(c.push(Ie()),!q(")"));)U(",");return U(")"),c}function Yo(){var c,h;return h=_,Bo(c=Y())||Pe(c),g.markEnd(g.createIdentifier(c.value),h)}function Xn(){return U("."),Yo()}function Kn(){var c;return U("["),c=he(),U("]"),c}function Zn(){var c,h,b;return b=_,ue("new"),c=Xo(),h=q("(")?Qn():[],g.markEnd(g.createNewExpression(c,h),b)}function Qo(){var c,h,b,E,j;for(j=_,c=$.allowIn,$.allowIn=!0,h=me("new")?Zn():Yn(),$.allowIn=c;;){if(q("."))E=Xn(),h=g.createMemberExpression(".",h,E);else if(q("("))b=Qn(),h=g.createCallExpression(h,b);else if(q("["))E=Kn(),h=g.createMemberExpression("[",h,E);else break;g.markEnd(h,j)}return h}function Xo(){var c,h,b,E;for(E=_,c=$.allowIn,h=me("new")?Zn():Yn(),$.allowIn=c;q(".")||q("[");)q("[")?(b=Kn(),h=g.createMemberExpression("[",h,b)):(b=Xn(),h=g.createMemberExpression(".",h,b)),g.markEnd(h,E);return h}function ea(){var c,h,b=_;return c=Qo(),_.type===a.Punctuator&&(q("++")||q("--"))&&!gt()&&(y&&c.type===s.Identifier&&le(c.name)&&ne({},o.StrictLHSPostfix),Rt(c)||ne({},o.InvalidLHSInAssignment),h=Y(),c=g.markEnd(g.createPostfixExpression(h.value,c),b)),c}function nt(){var c,h,b;return _.type!==a.Punctuator&&_.type!==a.Keyword?h=ea():q("++")||q("--")?(b=_,c=Y(),h=nt(),y&&h.type===s.Identifier&&le(h.name)&&ne({},o.StrictLHSPrefix),Rt(h)||ne({},o.InvalidLHSInAssignment),h=g.createUnaryExpression(c.value,h),h=g.markEnd(h,b)):q("+")||q("-")||q("~")||q("!")?(b=_,c=Y(),h=nt(),h=g.createUnaryExpression(c.value,h),h=g.markEnd(h,b)):me("delete")||me("void")||me("typeof")?(b=_,c=Y(),h=nt(),h=g.createUnaryExpression(c.value,h),h=g.markEnd(h,b),y&&h.operator==="delete"&&h.argument.type===s.Identifier&&ne({},o.StrictDelete)):h=ea(),h}function ta(c,h){var b=0;if(c.type!==a.Punctuator&&c.type!==a.Keyword)return 0;switch(c.value){case"||":b=1;break;case"&&":b=2;break;case"|":b=3;break;case"^":b=4;break;case"&":b=5;break;case"==":case"!=":case"===":case"!==":b=6;break;case"<":case">":case"<=":case">=":case"instanceof":b=7;break;case"in":b=h?7:0;break;case"<<":case">>":case">>>":b=8;break;case"+":case"-":b=9;break;case"*":case"/":case"%":b=11}return b}function Ko(){var c,h,b,E,j,M,z,pe,ae,_e;if(c=_,ae=nt(),(j=ta(E=_,$.allowIn))===0)return ae;for(E.prec=j,Y(),h=[c,_],M=[ae,E,z=nt()];(j=ta(_,$.allowIn))>0;){for(;M.length>2&&j<=M[M.length-2].prec;)z=M.pop(),pe=M.pop().value,ae=M.pop(),b=g.createBinaryExpression(pe,ae,z),h.pop(),c=h[h.length-1],g.markEnd(b,c),M.push(b);(E=Y()).prec=j,M.push(E),h.push(_),b=nt(),M.push(b)}for(_e=M.length-1,b=M[_e],h.pop();_e>1;)b=g.createBinaryExpression(M[_e-1].value,M[_e-2],b),_e-=2,c=h.pop(),g.markEnd(b,c);return b}function Zo(){var c,h,b,E,j;return j=_,c=Ko(),q("?")&&(Y(),h=$.allowIn,$.allowIn=!0,b=Ie(),$.allowIn=h,U(":"),E=Ie(),c=g.createConditionalExpression(c,b,E),g.markEnd(c,j)),c}function Ie(){var c,h,b,E,j;return c=_,j=_,E=h=Zo(),Wo()&&(Rt(h)||ne({},o.InvalidLHSInAssignment),y&&h.type===s.Identifier&&le(h.name)&&ne(c,o.StrictLHSAssignment),c=Y(),b=Ie(),E=g.markEnd(g.createAssignmentExpression(c.value,h,b),j)),E}function he(){var c,h=_;if(c=Ie(),q(",")){for(c=g.createSequenceExpression([c]);f<w&&q(",");)Y(),c.expressions.push(Ie());g.markEnd(c,h)}return c}function el(){for(var c,h=[];f<w&&!q("}")&&(c=yt())!==void 0;)h.push(c);return h}function Lt(){var c,h;return h=_,U("{"),c=el(),U("}"),g.markEnd(g.createBlockStatement(c),h)}function Ge(){var c,h;return h=_,(c=Y()).type!==a.Identifier&&Pe(c),g.markEnd(g.createIdentifier(c.value),h)}function tl(c){var h,b,E=null;return b=_,h=Ge(),y&&le(h.name)&&ne({},o.StrictVarName),c==="const"?(U("="),E=Ie()):q("=")&&(Y(),E=Ie()),g.markEnd(g.createVariableDeclarator(h,E),b)}function Ar(c){var h=[];do{if(h.push(tl(c)),!q(","))break;Y()}while(f<w);return h}function rl(){var c;return ue("var"),c=Ar(),Ce(),g.createVariableDeclaration(c,"var")}function nl(c){var h,b;return b=_,ue(c),h=Ar(c),Ce(),g.markEnd(g.createVariableDeclaration(h,c),b)}function al(){return U(";"),g.createEmptyStatement()}function il(){var c=he();return Ce(),g.createExpressionStatement(c)}function sl(){var c,h,b;return ue("if"),U("("),c=he(),U(")"),h=Ne(),me("else")?(Y(),b=Ne()):b=null,g.createIfStatement(c,h,b)}function ol(){var c,h,b;return ue("do"),b=$.inIteration,$.inIteration=!0,c=Ne(),$.inIteration=b,ue("while"),U("("),h=he(),U(")"),q(";")&&Y(),g.createDoWhileStatement(c,h)}function ll(){var c,h,b;return ue("while"),U("("),c=he(),U(")"),b=$.inIteration,$.inIteration=!0,h=Ne(),$.inIteration=b,g.createWhileStatement(c,h)}function cl(){var c,h,b;return b=_,c=Y(),h=Ar(),g.markEnd(g.createVariableDeclaration(h,c.value),b)}function ul(){var c,h,b,E,j,M,z;return c=h=b=null,ue("for"),U("("),q(";")?Y():(me("var")||me("let")?($.allowIn=!1,c=cl(),$.allowIn=!0,c.declarations.length===1&&me("in")&&(Y(),E=c,j=he(),c=null)):($.allowIn=!1,c=he(),$.allowIn=!0,me("in")&&(Rt(c)||ne({},o.InvalidLHSInForIn),Y(),E=c,j=he(),c=null)),E===void 0&&U(";")),E!==void 0||(q(";")||(h=he()),U(";"),q(")")||(b=he())),U(")"),z=$.inIteration,$.inIteration=!0,M=Ne(),$.inIteration=z,E===void 0?g.createForStatement(c,h,b,M):g.createForInStatement(E,j,M)}function pl(){var c,h=null;return ue("continue"),d.charCodeAt(f)===59?(Y(),$.inIteration||Q({},o.IllegalContinue),g.createContinueStatement(null)):gt()?($.inIteration||Q({},o.IllegalContinue),g.createContinueStatement(null)):(_.type!==a.Identifier||(c="$"+(h=Ge()).name,Object.prototype.hasOwnProperty.call($.labelSet,c)||Q({},o.UnknownLabel,h.name)),Ce(),h!==null||$.inIteration||Q({},o.IllegalContinue),g.createContinueStatement(h))}function dl(){var c,h=null;return ue("break"),d.charCodeAt(f)===59?(Y(),$.inIteration||$.inSwitch||Q({},o.IllegalBreak),g.createBreakStatement(null)):gt()?($.inIteration||$.inSwitch||Q({},o.IllegalBreak),g.createBreakStatement(null)):(_.type!==a.Identifier||(c="$"+(h=Ge()).name,Object.prototype.hasOwnProperty.call($.labelSet,c)||Q({},o.UnknownLabel,h.name)),Ce(),h!==null||$.inIteration||$.inSwitch||Q({},o.IllegalBreak),g.createBreakStatement(h))}function fl(){var c=null;return ue("return"),$.inFunctionBody||ne({},o.IllegalReturn),d.charCodeAt(f)===32&&C(d.charCodeAt(f+1))?(c=he(),Ce(),g.createReturnStatement(c)):gt()?g.createReturnStatement(null):(q(";")||q("}")||_.type===a.EOF||(c=he()),Ce(),g.createReturnStatement(c))}function hl(){var c,h;return y&&(k(),ne({},o.StrictModeWith)),ue("with"),U("("),c=he(),U(")"),h=Ne(),g.createWithStatement(c,h)}function ml(){var c,h,b,E=[];for(b=_,me("default")?(Y(),c=null):(ue("case"),c=he()),U(":");f<w&&!(q("}")||me("default")||me("case"));)h=Ne(),E.push(h);return g.markEnd(g.createSwitchCase(c,E),b)}function gl(){var c,h,b,E,j;if(ue("switch"),U("("),c=he(),U(")"),U("{"),h=[],q("}"))return Y(),g.createSwitchStatement(c,h);for(E=$.inSwitch,$.inSwitch=!0,j=!1;f<w&&!q("}");)(b=ml()).test===null&&(j&&Q({},o.MultipleDefaultsInSwitch),j=!0),h.push(b);return $.inSwitch=E,U("}"),g.createSwitchStatement(c,h)}function yl(){var c;return ue("throw"),gt()&&Q({},o.NewlineAfterThrow),c=he(),Ce(),g.createThrowStatement(c)}function _l(){var c,h,b;return b=_,ue("catch"),U("("),q(")")&&Pe(_),c=Ge(),y&&le(c.name)&&ne({},o.StrictCatchVariable),U(")"),h=Lt(),g.markEnd(g.createCatchClause(c,h),b)}function bl(){var c,h=[],b=null;return ue("try"),c=Lt(),me("catch")&&h.push(_l()),me("finally")&&(Y(),b=Lt()),h.length!==0||b||Q({},o.NoCatchOrFinally),g.createTryStatement(c,[],h,b)}function vl(){return ue("debugger"),Ce(),g.createDebuggerStatement()}function Ne(){var c,h,b,E,j=_.type;if(j===a.EOF&&Pe(_),j===a.Punctuator&&_.value==="{")return Lt();if(E=_,j===a.Punctuator)switch(_.value){case";":return g.markEnd(al(),E);case"(":return g.markEnd(il(),E)}if(j===a.Keyword)switch(_.value){case"break":return g.markEnd(dl(),E);case"continue":return g.markEnd(pl(),E);case"debugger":return g.markEnd(vl(),E);case"do":return g.markEnd(ol(),E);case"for":return g.markEnd(ul(),E);case"function":return g.markEnd(na(),E);case"if":return g.markEnd(sl(),E);case"return":return g.markEnd(fl(),E);case"switch":return g.markEnd(gl(),E);case"throw":return g.markEnd(yl(),E);case"try":return g.markEnd(bl(),E);case"var":return g.markEnd(rl(),E);case"while":return g.markEnd(ll(),E);case"with":return g.markEnd(hl(),E)}return(c=he()).type===s.Identifier&&q(":")?(Y(),b="$"+c.name,Object.prototype.hasOwnProperty.call($.labelSet,b)&&Q({},o.Redeclaration,"Label",c.name),$.labelSet[b]=!0,h=Ne(),delete $.labelSet[b],g.markEnd(g.createLabeledStatement(c,h),E)):(Ce(),g.markEnd(g.createExpressionStatement(c),E))}function Ir(){var c,h,b,E,j,M,z,pe,ae=[];for(pe=_,U("{");f<w&&_.type===a.StringLiteral&&(h=_,c=yt(),ae.push(c),c.expression.type===s.Literal);)d.slice(h.start+1,h.end-1)==="use strict"?(y=!0,b&&ne(b,o.StrictOctalLiteral)):!b&&h.octal&&(b=h);for(E=$.labelSet,j=$.inIteration,M=$.inSwitch,z=$.inFunctionBody,$.labelSet={},$.inIteration=!1,$.inSwitch=!1,$.inFunctionBody=!0;f<w&&!q("}")&&(c=yt())!==void 0;)ae.push(c);return U("}"),$.labelSet=E,$.inIteration=j,$.inSwitch=M,$.inFunctionBody=z,g.markEnd(g.createBlockStatement(ae),pe)}function ra(c){var h,b,E,j,M,z,pe=[];if(U("("),!q(")"))for(j={};f<w&&(b=_,h=Ge(),M="$"+b.value,y?(le(b.value)&&(E=b,z=o.StrictParamName),Object.prototype.hasOwnProperty.call(j,M)&&(E=b,z=o.StrictParamDupe)):!c&&(le(b.value)?(c=b,z=o.StrictParamName):X(b.value)?(c=b,z=o.StrictReservedWord):Object.prototype.hasOwnProperty.call(j,M)&&(c=b,z=o.StrictParamDupe)),pe.push(h),j[M]=!0,!q(")"));)U(",");return U(")"),{params:pe,stricted:E,firstRestricted:c,message:z}}function na(){var c,h,b,E,j,M,z,pe,ae,_e=[];return ae=_,ue("function"),b=_,c=Ge(),y?le(b.value)&&ne(b,o.StrictFunctionName):le(b.value)?(M=b,z=o.StrictFunctionName):X(b.value)&&(M=b,z=o.StrictReservedWord),_e=(j=ra(M)).params,E=j.stricted,M=j.firstRestricted,j.message&&(z=j.message),pe=y,h=Ir(),y&&M&&Q(M,z),y&&E&&ne(E,z),y=pe,g.markEnd(g.createFunctionDeclaration(c,_e,[],h),ae)}function wl(){var c,h,b,E,j,M,z,pe,ae=null,_e=[];return pe=_,ue("function"),!q("(")&&(c=_,ae=Ge(),y?le(c.value)&&ne(c,o.StrictFunctionName):le(c.value)?(b=c,E=o.StrictFunctionName):X(c.value)&&(b=c,E=o.StrictReservedWord)),_e=(j=ra(b)).params,h=j.stricted,b=j.firstRestricted,j.message&&(E=j.message),z=y,M=Ir(),y&&b&&Q(b,E),y&&h&&ne(h,E),y=z,g.markEnd(g.createFunctionExpression(ae,_e,[],M),pe)}function yt(){if(_.type===a.Keyword)switch(_.value){case"const":case"let":return nl(_.value);case"function":return na();default:return Ne()}if(_.type!==a.EOF)return Ne()}function $l(){for(var c,h,b,E=[];f<w&&(h=_).type===a.StringLiteral&&(E.push(c=yt()),c.expression.type===s.Literal);)d.slice(h.start+1,h.end-1)==="use strict"?(y=!0,b&&ne(b,o.StrictOctalLiteral)):!b&&h.octal&&(b=h);for(;f<w&&(c=yt())!==void 0;)E.push(c);return E}function Sl(){var c,h;return k(),Er(),h=_,y=!1,c=$l(),g.markEnd(g.createProgram(c),h)}function aa(){var c,h,b,E=[];for(c=0;c<x.tokens.length;++c)b={type:(h=x.tokens[c]).type,value:h.value},x.range&&(b.range=h.range),x.loc&&(b.loc=h.loc),E.push(b);x.tokens=E}function xl(c,h){var b,E,j;b=String,typeof c=="string"||c instanceof String||(c=b(c)),g=m,f=0,S=(d=c).length>0?1:0,v=0,w=d.length,_=null,$={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},x={},(h=h||{}).tokens=!0,x.tokens=[],x.tokenize=!0,x.openParenToken=-1,x.openCurlyToken=-1,x.range=typeof h.range=="boolean"&&h.range,x.loc=typeof h.loc=="boolean"&&h.loc,typeof h.comment=="boolean"&&h.comment&&(x.comments=[]),typeof h.tolerant=="boolean"&&h.tolerant&&(x.errors=[]);try{if(Er(),_.type===a.EOF)return x.tokens;for(E=Y();_.type!==a.EOF;)try{E=Y()}catch(M){if(E=_,x.errors){x.errors.push(M);break}throw M}aa(),j=x.tokens,x.comments!==void 0&&(j.comments=x.comments),x.errors!==void 0&&(j.errors=x.errors)}catch(M){throw M}finally{x={}}return j}function El(c,h){var b,E;E=String,typeof c=="string"||c instanceof String||(c=E(c)),g=m,f=0,S=(d=c).length>0?1:0,v=0,w=d.length,_=null,$={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},x={},h!==void 0&&(x.range=typeof h.range=="boolean"&&h.range,x.loc=typeof h.loc=="boolean"&&h.loc,x.attachComment=typeof h.attachComment=="boolean"&&h.attachComment,x.loc&&h.source!==null&&h.source!==void 0&&(x.source=E(h.source)),typeof h.tokens=="boolean"&&h.tokens&&(x.tokens=[]),typeof h.comment=="boolean"&&h.comment&&(x.comments=[]),typeof h.tolerant=="boolean"&&h.tolerant&&(x.errors=[]),x.attachComment&&(x.range=!0,x.comments=[],x.bottomRightStack=[],x.trailingComments=[],x.leadingComments=[]));try{b=Sl(),x.comments!==void 0&&(b.comments=x.comments),x.tokens!==void 0&&(aa(),b.tokens=x.tokens),x.errors!==void 0&&(b.errors=x.errors)}catch(j){throw j}finally{x={}}return b}(i={})[(a={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9}).BooleanLiteral]="Boolean",i[a.EOF]="<end>",i[a.Identifier]="Identifier",i[a.Keyword]="Keyword",i[a.NullLiteral]="Null",i[a.NumericLiteral]="Numeric",i[a.Punctuator]="Punctuator",i[a.StringLiteral]="String",i[a.RegularExpression]="RegularExpression",l=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="],s={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement"},u={Data:1,Get:2,Set:4},o={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode"},p={NonAsciiIdentifierStart:RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")},m={name:"SyntaxTree",processComment:function(c){var h,b;if(c.type!==s.Program||!(c.body.length>0)){for(x.trailingComments.length>0?x.trailingComments[0].range[0]>=c.range[1]?(b=x.trailingComments,x.trailingComments=[]):x.trailingComments.length=0:x.bottomRightStack.length>0&&x.bottomRightStack[x.bottomRightStack.length-1].trailingComments&&x.bottomRightStack[x.bottomRightStack.length-1].trailingComments[0].range[0]>=c.range[1]&&(b=x.bottomRightStack[x.bottomRightStack.length-1].trailingComments,delete x.bottomRightStack[x.bottomRightStack.length-1].trailingComments);x.bottomRightStack.length>0&&x.bottomRightStack[x.bottomRightStack.length-1].range[0]>=c.range[0];)h=x.bottomRightStack.pop();h?h.leadingComments&&h.leadingComments[h.leadingComments.length-1].range[1]<=c.range[0]&&(c.leadingComments=h.leadingComments,delete h.leadingComments):x.leadingComments.length>0&&x.leadingComments[x.leadingComments.length-1].range[1]<=c.range[0]&&(c.leadingComments=x.leadingComments,x.leadingComments=[]),b&&(c.trailingComments=b),x.bottomRightStack.push(c)}},markEnd:function(c,h){return x.range&&(c.range=[h.start,f]),x.loc&&(c.loc=new Go(h.startLineNumber===void 0?h.lineNumber:h.startLineNumber,h.start-(h.startLineStart===void 0?h.lineStart:h.startLineStart),S,f-v),this.postProcess(c)),x.attachComment&&this.processComment(c),c},postProcess:function(c){return x.source&&(c.loc.source=x.source),c},createArrayExpression:function(c){return{type:s.ArrayExpression,elements:c}},createAssignmentExpression:function(c,h,b){return{type:s.AssignmentExpression,operator:c,left:h,right:b}},createBinaryExpression:function(c,h,b){return{type:c==="||"||c==="&&"?s.LogicalExpression:s.BinaryExpression,operator:c,left:h,right:b}},createBlockStatement:function(c){return{type:s.BlockStatement,body:c}},createBreakStatement:function(c){return{type:s.BreakStatement,label:c}},createCallExpression:function(c,h){return{type:s.CallExpression,callee:c,arguments:h}},createCatchClause:function(c,h){return{type:s.CatchClause,param:c,body:h}},createConditionalExpression:function(c,h,b){return{type:s.ConditionalExpression,test:c,consequent:h,alternate:b}},createContinueStatement:function(c){return{type:s.ContinueStatement,label:c}},createDebuggerStatement:function(){return{type:s.DebuggerStatement}},createDoWhileStatement:function(c,h){return{type:s.DoWhileStatement,body:c,test:h}},createEmptyStatement:function(){return{type:s.EmptyStatement}},createExpressionStatement:function(c){return{type:s.ExpressionStatement,expression:c}},createForStatement:function(c,h,b,E){return{type:s.ForStatement,init:c,test:h,update:b,body:E}},createForInStatement:function(c,h,b){return{type:s.ForInStatement,left:c,right:h,body:b,each:!1}},createFunctionDeclaration:function(c,h,b,E){return{type:s.FunctionDeclaration,id:c,params:h,defaults:b,body:E,rest:null,generator:!1,expression:!1}},createFunctionExpression:function(c,h,b,E){return{type:s.FunctionExpression,id:c,params:h,defaults:b,body:E,rest:null,generator:!1,expression:!1}},createIdentifier:function(c){return{type:s.Identifier,name:c}},createIfStatement:function(c,h,b){return{type:s.IfStatement,test:c,consequent:h,alternate:b}},createLabeledStatement:function(c,h){return{type:s.LabeledStatement,label:c,body:h}},createLiteral:function(c){return{type:s.Literal,value:c.value,raw:d.slice(c.start,c.end)}},createMemberExpression:function(c,h,b){return{type:s.MemberExpression,computed:c==="[",object:h,property:b}},createNewExpression:function(c,h){return{type:s.NewExpression,callee:c,arguments:h}},createObjectExpression:function(c){return{type:s.ObjectExpression,properties:c}},createPostfixExpression:function(c,h){return{type:s.UpdateExpression,operator:c,argument:h,prefix:!1}},createProgram:function(c){return{type:s.Program,body:c}},createProperty:function(c,h,b){return{type:s.Property,key:h,value:b,kind:c}},createReturnStatement:function(c){return{type:s.ReturnStatement,argument:c}},createSequenceExpression:function(c){return{type:s.SequenceExpression,expressions:c}},createSwitchCase:function(c,h){return{type:s.SwitchCase,test:c,consequent:h}},createSwitchStatement:function(c,h){return{type:s.SwitchStatement,discriminant:c,cases:h}},createThisExpression:function(){return{type:s.ThisExpression}},createThrowStatement:function(c){return{type:s.ThrowStatement,argument:c}},createTryStatement:function(c,h,b,E){return{type:s.TryStatement,block:c,guardedHandlers:h,handlers:b,finalizer:E}},createUnaryExpression:function(c,h){return c==="++"||c==="--"?{type:s.UpdateExpression,operator:c,argument:h,prefix:!0}:{type:s.UnaryExpression,operator:c,argument:h,prefix:!0}},createVariableDeclaration:function(c,h){return{type:s.VariableDeclaration,declarations:c,kind:h}},createVariableDeclarator:function(c,h){return{type:s.VariableDeclarator,id:c,init:h}},createWhileStatement:function(c,h){return{type:s.WhileStatement,test:c,body:h}},createWithStatement:function(c,h){return{type:s.WithStatement,object:c,body:h}}},r.version="1.2.2",r.tokenize=xl,r.parse=El,r.Syntax=function(){var c,h={};for(c in typeof Object.create=="function"&&(h=Object.create(null)),s)s.hasOwnProperty(c)&&(h[c]=s[c]);return typeof Object.freeze=="function"&&Object.freeze(h),h}()})},{}],1:[function(n,e,t){(function(r){var a=function(){var i={trace:function(){},yy:{},symbols_:{error:2,JSON_PATH:3,DOLLAR:4,PATH_COMPONENTS:5,LEADING_CHILD_MEMBER_EXPRESSION:6,PATH_COMPONENT:7,MEMBER_COMPONENT:8,SUBSCRIPT_COMPONENT:9,CHILD_MEMBER_COMPONENT:10,DESCENDANT_MEMBER_COMPONENT:11,DOT:12,MEMBER_EXPRESSION:13,DOT_DOT:14,STAR:15,IDENTIFIER:16,SCRIPT_EXPRESSION:17,INTEGER:18,END:19,CHILD_SUBSCRIPT_COMPONENT:20,DESCENDANT_SUBSCRIPT_COMPONENT:21,"[":22,SUBSCRIPT:23,"]":24,SUBSCRIPT_EXPRESSION:25,SUBSCRIPT_EXPRESSION_LIST:26,SUBSCRIPT_EXPRESSION_LISTABLE:27,",":28,STRING_LITERAL:29,ARRAY_SLICE:30,FILTER_EXPRESSION:31,QQ_STRING:32,Q_STRING:33,$accept:0,$end:1},terminals_:{2:"error",4:"DOLLAR",12:"DOT",14:"DOT_DOT",15:"STAR",16:"IDENTIFIER",17:"SCRIPT_EXPRESSION",18:"INTEGER",19:"END",22:"[",24:"]",28:",",30:"ARRAY_SLICE",31:"FILTER_EXPRESSION",32:"QQ_STRING",33:"Q_STRING"},productions_:[0,[3,1],[3,2],[3,1],[3,2],[5,1],[5,2],[7,1],[7,1],[8,1],[8,1],[10,2],[6,1],[11,2],[13,1],[13,1],[13,1],[13,1],[13,1],[9,1],[9,1],[20,3],[21,4],[23,1],[23,1],[26,1],[26,3],[27,1],[27,1],[27,1],[25,1],[25,1],[25,1],[29,1],[29,1]],performAction:function(o,p,m,d,y,f,S){d.ast||(d.ast=l,l.initialize());var v=f.length-1;switch(y){case 1:return d.ast.set({expression:{type:"root",value:f[v]}}),d.ast.unshift(),d.ast.yield();case 2:return d.ast.set({expression:{type:"root",value:f[v-1]}}),d.ast.unshift(),d.ast.yield();case 3:return d.ast.unshift(),d.ast.yield();case 4:return d.ast.set({operation:"member",scope:"child",expression:{type:"identifier",value:f[v-1]}}),d.ast.unshift(),d.ast.yield();case 5:case 6:case 11:case 13:case 18:case 21:case 22:case 23:break;case 7:d.ast.set({operation:"member"}),d.ast.push();break;case 8:d.ast.set({operation:"subscript"}),d.ast.push();break;case 9:case 19:d.ast.set({scope:"child"});break;case 10:case 20:d.ast.set({scope:"descendant"});break;case 12:d.ast.set({scope:"child",operation:"member"});break;case 14:d.ast.set({expression:{type:"wildcard",value:f[v]}});break;case 15:d.ast.set({expression:{type:"identifier",value:f[v]}});break;case 16:d.ast.set({expression:{type:"script_expression",value:f[v]}});break;case 17:d.ast.set({expression:{type:"numeric_literal",value:parseInt(f[v])}});break;case 24:f[v].length>1?d.ast.set({expression:{type:"union",value:f[v]}}):this.$=f[v];break;case 25:this.$=[f[v]];break;case 26:this.$=f[v-2].concat(f[v]);break;case 27:this.$={expression:{type:"numeric_literal",value:parseInt(f[v])}},d.ast.set(this.$);break;case 28:this.$={expression:{type:"string_literal",value:f[v]}},d.ast.set(this.$);break;case 29:this.$={expression:{type:"slice",value:f[v]}},d.ast.set(this.$);break;case 30:this.$={expression:{type:"wildcard",value:f[v]}},d.ast.set(this.$);break;case 31:this.$={expression:{type:"script_expression",value:f[v]}},d.ast.set(this.$);break;case 32:this.$={expression:{type:"filter_expression",value:f[v]}},d.ast.set(this.$);break;case 33:case 34:this.$=f[v]}},table:[{3:1,4:[1,2],6:3,13:4,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9]},{1:[3]},{1:[2,1],5:10,7:11,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,3],5:21,7:11,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,12],12:[2,12],14:[2,12],22:[2,12]},{1:[2,14],12:[2,14],14:[2,14],22:[2,14]},{1:[2,15],12:[2,15],14:[2,15],22:[2,15]},{1:[2,16],12:[2,16],14:[2,16],22:[2,16]},{1:[2,17],12:[2,17],14:[2,17],22:[2,17]},{1:[2,18],12:[2,18],14:[2,18],22:[2,18]},{1:[2,2],7:22,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,5],12:[2,5],14:[2,5],22:[2,5]},{1:[2,7],12:[2,7],14:[2,7],22:[2,7]},{1:[2,8],12:[2,8],14:[2,8],22:[2,8]},{1:[2,9],12:[2,9],14:[2,9],22:[2,9]},{1:[2,10],12:[2,10],14:[2,10],22:[2,10]},{1:[2,19],12:[2,19],14:[2,19],22:[2,19]},{1:[2,20],12:[2,20],14:[2,20],22:[2,20]},{13:23,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9]},{13:24,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9],22:[1,25]},{15:[1,29],17:[1,30],18:[1,33],23:26,25:27,26:28,27:32,29:34,30:[1,35],31:[1,31],32:[1,36],33:[1,37]},{1:[2,4],7:22,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,6],12:[2,6],14:[2,6],22:[2,6]},{1:[2,11],12:[2,11],14:[2,11],22:[2,11]},{1:[2,13],12:[2,13],14:[2,13],22:[2,13]},{15:[1,29],17:[1,30],18:[1,33],23:38,25:27,26:28,27:32,29:34,30:[1,35],31:[1,31],32:[1,36],33:[1,37]},{24:[1,39]},{24:[2,23]},{24:[2,24],28:[1,40]},{24:[2,30]},{24:[2,31]},{24:[2,32]},{24:[2,25],28:[2,25]},{24:[2,27],28:[2,27]},{24:[2,28],28:[2,28]},{24:[2,29],28:[2,29]},{24:[2,33],28:[2,33]},{24:[2,34],28:[2,34]},{24:[1,41]},{1:[2,21],12:[2,21],14:[2,21],22:[2,21]},{18:[1,33],27:42,29:34,30:[1,35],32:[1,36],33:[1,37]},{1:[2,22],12:[2,22],14:[2,22],22:[2,22]},{24:[2,26],28:[2,26]}],defaultActions:{27:[2,23],29:[2,30],30:[2,31],31:[2,32]},parseError:function(o,p){if(p.recoverable)this.trace(o);else throw Error(o)},parse:function(o){var p=this,m=[0],d=[null],y=[],f=this.table,S="",v=0,w=0,g=0,_=2,$=1,x=y.slice.call(arguments,1);this.lexer.setInput(o),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,this.lexer.yylloc===void 0&&(this.lexer.yylloc={});var T=this.lexer.yylloc;y.push(T);var P=this.lexer.options&&this.lexer.options.ranges;function D(){var ee;return typeof(ee=p.lexer.lex()||$)!="number"&&(ee=p.symbols_[ee]||ee),ee}typeof this.yy.parseError=="function"?this.parseError=this.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var R,I,F,C,B,V,X,le,ve,H={};;){if(F=m[m.length-1],this.defaultActions[F]?C=this.defaultActions[F]:(R==null&&(R=D()),C=f[F]&&f[F][R]),C===void 0||!C.length||!C[0]){var ie="";for(V in ve=[],f[F])this.terminals_[V]&&V>_&&ve.push("'"+this.terminals_[V]+"'");ie=this.lexer.showPosition?"Parse error on line "+(v+1)+\`:
|
|
106
|
+
\`;break;case"r":ae+="\\r";break;case"t":ae+=" ";break;case"b":ae+="\\b";break;case"f":ae+="\\f";break;case"v":ae+="\\v";break;default:R(b)?((E="01234567".indexOf(b))!==0&&(be=!0),f<w&&R(d[f])&&(be=!0,E=8*E+"01234567".indexOf(d[f++]),"0123".indexOf(b)>=0&&f<w&&R(d[f])&&(E=8*E+"01234567".indexOf(d[f++]))),ae+=String.fromCharCode(E)):ae+=b}else{if(F(b.charCodeAt(0)))break;ae+=b}}return c!==""&&Y({},o.UnexpectedToken,"ILLEGAL"),{type:a.StringLiteral,value:ae,octal:be,startLineNumber:z,startLineStart:pe,lineNumber:S,lineStart:v,start:h,end:f}}function Ae(c,h){var b;try{b=new RegExp(c,h)}catch{Y({},o.InvalidRegExp)}return b}function Ie(){var c,h,b,E;for(T((c=d[f])==="/","Regular expression literal must start with a slash"),h=d[f++],b=!1,E=!1;f<w;)if(h+=c=d[f++],c==="\\\\")F((c=d[f++]).charCodeAt(0))&&Y({},o.UnterminatedRegExp),h+=c;else if(F(c.charCodeAt(0)))Y({},o.UnterminatedRegExp);else if(b)c==="]"&&(b=!1);else{if(c==="/"){E=!0;break}c==="["&&(b=!0)}return E||Y({},o.UnterminatedRegExp),{value:h.substr(1,h.length-2),literal:h}}function Er(){var c,h,b,E;for(h="",b="";f<w&&B((c=d[f]).charCodeAt(0));)if(++f,c==="\\\\"&&f<w)if((c=d[f])==="u"){if(E=++f,c=O("u"))for(b+=c,h+="\\\\u";E<f;++E)h+=d[E];else f=E,b+="u",h+="\\\\u";ne({},o.UnexpectedToken,"ILLEGAL")}else h+="\\\\",ne({},o.UnexpectedToken,"ILLEGAL");else b+=c,h+=c;return{value:b,literal:h}}function Yn(){var c,h,b,E;return _=null,k(),c=f,h=Ie(),b=Er(),E=Ae(h.value,b.value),x.tokenize?{type:a.RegularExpression,value:E,lineNumber:S,lineStart:v,start:c,end:f}:{literal:h.literal+b.literal,value:E,start:c,end:f}}function at(){var c,h,b,E;return k(),c=f,h={start:{line:S,column:f-v}},b=Yn(),h.end={line:S,column:f-v},x.tokenize||(x.tokens.length>0&&(E=x.tokens[x.tokens.length-1]).range[0]===c&&E.type==="Punctuator"&&(E.value==="/"||E.value==="/=")&&x.tokens.pop(),x.tokens.push({type:"RegularExpression",value:b.literal,range:[c,f],loc:h})),b}function zo(c){return c.type===a.Identifier||c.type===a.Keyword||c.type===a.BooleanLiteral||c.type===a.NullLiteral}function Vo(){var c,h;if(!(c=x.tokens[x.tokens.length-1]))return at();if(c.type==="Punctuator"){if(c.value==="]")return te();if(c.value===")")return(h=x.tokens[x.openParenToken-1])&&h.type==="Keyword"&&(h.value==="if"||h.value==="while"||h.value==="for"||h.value==="with")?at():te();if(c.value==="}"){if(x.tokens[x.openCurlyToken-3]&&x.tokens[x.openCurlyToken-3].type==="Keyword"){if(!(h=x.tokens[x.openCurlyToken-4]))return te()}else{if(!x.tokens[x.openCurlyToken-4]||x.tokens[x.openCurlyToken-4].type!=="Keyword")return te();if(!(h=x.tokens[x.openCurlyToken-5]))return at()}if(l.indexOf(h.value)>=0)return te()}return at()}return c.type==="Keyword"?at():te()}function kr(){var c;return k(),f>=w?{type:a.EOF,lineNumber:S,lineStart:v,start:f,end:f}:C(c=d.charCodeAt(f))?se():c===40||c===41||c===59?te():c===39||c===34?fe():c===46?P(d.charCodeAt(f+1))?re():te():P(c)?re():x.tokenize&&c===47?Vo():te()}function Xn(){var c,h,b;return k(),c={start:{line:S,column:f-v}},h=kr(),c.end={line:S,column:f-v},h.type!==a.EOF&&(b=d.slice(h.start,h.end),x.tokens.push({type:i[h.type],value:b,range:[h.start,h.end],loc:c})),h}function Q(){var c;return f=(c=_).end,S=c.lineNumber,v=c.lineStart,_=x.tokens!==void 0?Xn():kr(),f=c.end,S=c.lineNumber,v=c.lineStart,c}function Ar(){var c,h,b;c=f,h=S,b=v,_=x.tokens!==void 0?Xn():kr(),f=c,S=h,v=b}function Kn(c,h){this.line=c,this.column=h}function Jo(c,h,b,E){this.start=new Kn(c,h),this.end=new Kn(b,E)}function _t(){var c,h,b,E;return c=f,h=S,b=v,k(),E=S!==h,f=c,S=h,v=b,E}function Y(c,h){var b,E=Array.prototype.slice.call(arguments,2),j=h.replace(/%(\\d)/g,function(M,z){return T(z<E.length,"Message reference must be in range"),E[z]});throw typeof c.lineNumber=="number"?((b=Error("Line "+c.lineNumber+": "+j)).index=c.start,b.lineNumber=c.lineNumber,b.column=c.start-v+1):((b=Error("Line "+S+": "+j)).index=f,b.lineNumber=S,b.column=f-v+1),b.description=j,b}function ne(){try{Y.apply(null,arguments)}catch(c){if(x.errors)x.errors.push(c);else throw c}}function Ce(c){if(c.type===a.EOF&&Y(c,o.UnexpectedEOS),c.type===a.NumericLiteral&&Y(c,o.UnexpectedNumber),c.type===a.StringLiteral&&Y(c,o.UnexpectedString),c.type===a.Identifier&&Y(c,o.UnexpectedIdentifier),c.type===a.Keyword){if(V(c.value))Y(c,o.UnexpectedReserved);else if(y&&X(c.value)){ne(c,o.StrictReservedWord);return}Y(c,o.UnexpectedToken,c.value)}Y(c,o.UnexpectedToken,c.value)}function U(c){var h=Q();(h.type!==a.Punctuator||h.value!==c)&&Ce(h)}function ue(c){var h=Q();(h.type!==a.Keyword||h.value!==c)&&Ce(h)}function q(c){return _.type===a.Punctuator&&_.value===c}function ge(c){return _.type===a.Keyword&&_.value===c}function Qo(){var c;return _.type===a.Punctuator&&((c=_.value)==="="||c==="*="||c==="/="||c==="%="||c==="+="||c==="-="||c==="<<="||c===">>="||c===">>>="||c==="&="||c==="^="||c==="|=")}function Ne(){var c;if(d.charCodeAt(f)===59||q(";")){Q();return}c=S,k(),S!==c||_.type===a.EOF||q("}")||Ce(_)}function Dt(c){return c.type===s.Identifier||c.type===s.MemberExpression}function Yo(){var c,h=[];for(c=_,U("[");!q("]");)q(",")?(Q(),h.push(null)):(h.push(Oe()),q("]")||U(","));return Q(),g.markEnd(g.createArrayExpression(h),c)}function Ir(c,h){var b,E,j;return b=y,j=_,E=jr(),h&&y&&oe(c[0].name)&&ne(h,o.StrictParamName),y=b,g.markEnd(g.createFunctionExpression(null,c,[],E),j)}function qt(){var c,h;return h=_,(c=Q()).type===a.StringLiteral||c.type===a.NumericLiteral?(y&&c.octal&&ne(c,o.StrictOctalLiteral),g.markEnd(g.createLiteral(c),h)):g.markEnd(g.createIdentifier(c.value),h)}function Xo(){var c,h,b,E,j,M;return c=_,M=_,c.type===a.Identifier?(b=qt(),c.value!=="get"||q(":")?c.value!=="set"||q(":")?(U(":"),E=Oe(),g.markEnd(g.createProperty("init",b,E),M)):(h=qt(),U("("),(c=_).type!==a.Identifier?(U(")"),ne(c,o.UnexpectedToken,c.value),E=Ir([])):(j=[We()],U(")"),E=Ir(j,c)),g.markEnd(g.createProperty("set",h,E),M)):(h=qt(),U("("),U(")"),E=Ir([]),g.markEnd(g.createProperty("get",h,E),M))):c.type!==a.EOF&&c.type!==a.Punctuator?(h=qt(),U(":"),E=Oe(),g.markEnd(g.createProperty("init",h,E),M)):void Ce(c)}function Ko(){var c,h,b,E,j,M=[],z={},pe=String;for(j=_,U("{");!q("}");)h=(c=Xo()).key.type===s.Identifier?c.key.name:pe(c.key.value),E=c.kind==="init"?u.Data:c.kind==="get"?u.Get:u.Set,b="$"+h,Object.prototype.hasOwnProperty.call(z,b)?(z[b]===u.Data?y&&E===u.Data?ne({},o.StrictDuplicateProperty):E!==u.Data&&ne({},o.AccessorDataProperty):E===u.Data?ne({},o.AccessorDataProperty):z[b]&E&&ne({},o.AccessorGetSet),z[b]|=E):z[b]=E,M.push(c),q("}")||U(",");return U("}"),g.markEnd(g.createObjectExpression(M),j)}function Zo(){var c;return U("("),c=he(),U(")"),c}function Zn(){var c,h,b,E;if(q("("))return Zo();if(q("["))return Yo();if(q("{"))return Ko();if(c=_.type,E=_,c===a.Identifier)b=g.createIdentifier(Q().value);else if(c===a.StringLiteral||c===a.NumericLiteral)y&&_.octal&&ne(_,o.StrictOctalLiteral),b=g.createLiteral(Q());else if(c===a.Keyword){if(ge("function"))return kl();ge("this")?(Q(),b=g.createThisExpression()):Ce(Q())}else c===a.BooleanLiteral?((h=Q()).value=h.value==="true",b=g.createLiteral(h)):c===a.NullLiteral?((h=Q()).value=null,b=g.createLiteral(h)):q("/")||q("/=")?(b=x.tokens!==void 0?g.createLiteral(at()):g.createLiteral(Yn()),Ar()):Ce(Q());return g.markEnd(b,E)}function ea(){var c=[];if(U("("),!q(")"))for(;f<w&&(c.push(Oe()),!q(")"));)U(",");return U(")"),c}function el(){var c,h;return h=_,zo(c=Q())||Ce(c),g.markEnd(g.createIdentifier(c.value),h)}function ta(){return U("."),el()}function ra(){var c;return U("["),c=he(),U("]"),c}function na(){var c,h,b;return b=_,ue("new"),c=rl(),h=q("(")?ea():[],g.markEnd(g.createNewExpression(c,h),b)}function tl(){var c,h,b,E,j;for(j=_,c=$.allowIn,$.allowIn=!0,h=ge("new")?na():Zn(),$.allowIn=c;;){if(q("."))E=ta(),h=g.createMemberExpression(".",h,E);else if(q("("))b=ea(),h=g.createCallExpression(h,b);else if(q("["))E=ra(),h=g.createMemberExpression("[",h,E);else break;g.markEnd(h,j)}return h}function rl(){var c,h,b,E;for(E=_,c=$.allowIn,h=ge("new")?na():Zn(),$.allowIn=c;q(".")||q("[");)q("[")?(b=ra(),h=g.createMemberExpression("[",h,b)):(b=ta(),h=g.createMemberExpression(".",h,b)),g.markEnd(h,E);return h}function aa(){var c,h,b=_;return c=tl(),_.type===a.Punctuator&&(q("++")||q("--"))&&!_t()&&(y&&c.type===s.Identifier&&oe(c.name)&&ne({},o.StrictLHSPostfix),Dt(c)||ne({},o.InvalidLHSInAssignment),h=Q(),c=g.markEnd(g.createPostfixExpression(h.value,c),b)),c}function it(){var c,h,b;return _.type!==a.Punctuator&&_.type!==a.Keyword?h=aa():q("++")||q("--")?(b=_,c=Q(),h=it(),y&&h.type===s.Identifier&&oe(h.name)&&ne({},o.StrictLHSPrefix),Dt(h)||ne({},o.InvalidLHSInAssignment),h=g.createUnaryExpression(c.value,h),h=g.markEnd(h,b)):q("+")||q("-")||q("~")||q("!")?(b=_,c=Q(),h=it(),h=g.createUnaryExpression(c.value,h),h=g.markEnd(h,b)):ge("delete")||ge("void")||ge("typeof")?(b=_,c=Q(),h=it(),h=g.createUnaryExpression(c.value,h),h=g.markEnd(h,b),y&&h.operator==="delete"&&h.argument.type===s.Identifier&&ne({},o.StrictDelete)):h=aa(),h}function ia(c,h){var b=0;if(c.type!==a.Punctuator&&c.type!==a.Keyword)return 0;switch(c.value){case"||":b=1;break;case"&&":b=2;break;case"|":b=3;break;case"^":b=4;break;case"&":b=5;break;case"==":case"!=":case"===":case"!==":b=6;break;case"<":case">":case"<=":case">=":case"instanceof":b=7;break;case"in":b=h?7:0;break;case"<<":case">>":case">>>":b=8;break;case"+":case"-":b=9;break;case"*":case"/":case"%":b=11}return b}function nl(){var c,h,b,E,j,M,z,pe,ae,be;if(c=_,ae=it(),(j=ia(E=_,$.allowIn))===0)return ae;for(E.prec=j,Q(),h=[c,_],M=[ae,E,z=it()];(j=ia(_,$.allowIn))>0;){for(;M.length>2&&j<=M[M.length-2].prec;)z=M.pop(),pe=M.pop().value,ae=M.pop(),b=g.createBinaryExpression(pe,ae,z),h.pop(),c=h[h.length-1],g.markEnd(b,c),M.push(b);(E=Q()).prec=j,M.push(E),h.push(_),b=it(),M.push(b)}for(be=M.length-1,b=M[be],h.pop();be>1;)b=g.createBinaryExpression(M[be-1].value,M[be-2],b),be-=2,c=h.pop(),g.markEnd(b,c);return b}function al(){var c,h,b,E,j;return j=_,c=nl(),q("?")&&(Q(),h=$.allowIn,$.allowIn=!0,b=Oe(),$.allowIn=h,U(":"),E=Oe(),c=g.createConditionalExpression(c,b,E),g.markEnd(c,j)),c}function Oe(){var c,h,b,E,j;return c=_,j=_,E=h=al(),Qo()&&(Dt(h)||ne({},o.InvalidLHSInAssignment),y&&h.type===s.Identifier&&oe(h.name)&&ne(c,o.StrictLHSAssignment),c=Q(),b=Oe(),E=g.markEnd(g.createAssignmentExpression(c.value,h,b),j)),E}function he(){var c,h=_;if(c=Oe(),q(",")){for(c=g.createSequenceExpression([c]);f<w&&q(",");)Q(),c.expressions.push(Oe());g.markEnd(c,h)}return c}function il(){for(var c,h=[];f<w&&!q("}")&&(c=bt())!==void 0;)h.push(c);return h}function Bt(){var c,h;return h=_,U("{"),c=il(),U("}"),g.markEnd(g.createBlockStatement(c),h)}function We(){var c,h;return h=_,(c=Q()).type!==a.Identifier&&Ce(c),g.markEnd(g.createIdentifier(c.value),h)}function sl(c){var h,b,E=null;return b=_,h=We(),y&&oe(h.name)&&ne({},o.StrictVarName),c==="const"?(U("="),E=Oe()):q("=")&&(Q(),E=Oe()),g.markEnd(g.createVariableDeclarator(h,E),b)}function Or(c){var h=[];do{if(h.push(sl(c)),!q(","))break;Q()}while(f<w);return h}function ol(){var c;return ue("var"),c=Or(),Ne(),g.createVariableDeclaration(c,"var")}function ll(c){var h,b;return b=_,ue(c),h=Or(c),Ne(),g.markEnd(g.createVariableDeclaration(h,c),b)}function cl(){return U(";"),g.createEmptyStatement()}function ul(){var c=he();return Ne(),g.createExpressionStatement(c)}function pl(){var c,h,b;return ue("if"),U("("),c=he(),U(")"),h=Me(),ge("else")?(Q(),b=Me()):b=null,g.createIfStatement(c,h,b)}function dl(){var c,h,b;return ue("do"),b=$.inIteration,$.inIteration=!0,c=Me(),$.inIteration=b,ue("while"),U("("),h=he(),U(")"),q(";")&&Q(),g.createDoWhileStatement(c,h)}function fl(){var c,h,b;return ue("while"),U("("),c=he(),U(")"),b=$.inIteration,$.inIteration=!0,h=Me(),$.inIteration=b,g.createWhileStatement(c,h)}function hl(){var c,h,b;return b=_,c=Q(),h=Or(),g.markEnd(g.createVariableDeclaration(h,c.value),b)}function ml(){var c,h,b,E,j,M,z;return c=h=b=null,ue("for"),U("("),q(";")?Q():(ge("var")||ge("let")?($.allowIn=!1,c=hl(),$.allowIn=!0,c.declarations.length===1&&ge("in")&&(Q(),E=c,j=he(),c=null)):($.allowIn=!1,c=he(),$.allowIn=!0,ge("in")&&(Dt(c)||ne({},o.InvalidLHSInForIn),Q(),E=c,j=he(),c=null)),E===void 0&&U(";")),E!==void 0||(q(";")||(h=he()),U(";"),q(")")||(b=he())),U(")"),z=$.inIteration,$.inIteration=!0,M=Me(),$.inIteration=z,E===void 0?g.createForStatement(c,h,b,M):g.createForInStatement(E,j,M)}function gl(){var c,h=null;return ue("continue"),d.charCodeAt(f)===59?(Q(),$.inIteration||Y({},o.IllegalContinue),g.createContinueStatement(null)):_t()?($.inIteration||Y({},o.IllegalContinue),g.createContinueStatement(null)):(_.type!==a.Identifier||(c="$"+(h=We()).name,Object.prototype.hasOwnProperty.call($.labelSet,c)||Y({},o.UnknownLabel,h.name)),Ne(),h!==null||$.inIteration||Y({},o.IllegalContinue),g.createContinueStatement(h))}function yl(){var c,h=null;return ue("break"),d.charCodeAt(f)===59?(Q(),$.inIteration||$.inSwitch||Y({},o.IllegalBreak),g.createBreakStatement(null)):_t()?($.inIteration||$.inSwitch||Y({},o.IllegalBreak),g.createBreakStatement(null)):(_.type!==a.Identifier||(c="$"+(h=We()).name,Object.prototype.hasOwnProperty.call($.labelSet,c)||Y({},o.UnknownLabel,h.name)),Ne(),h!==null||$.inIteration||$.inSwitch||Y({},o.IllegalBreak),g.createBreakStatement(h))}function _l(){var c=null;return ue("return"),$.inFunctionBody||ne({},o.IllegalReturn),d.charCodeAt(f)===32&&C(d.charCodeAt(f+1))?(c=he(),Ne(),g.createReturnStatement(c)):_t()?g.createReturnStatement(null):(q(";")||q("}")||_.type===a.EOF||(c=he()),Ne(),g.createReturnStatement(c))}function bl(){var c,h;return y&&(k(),ne({},o.StrictModeWith)),ue("with"),U("("),c=he(),U(")"),h=Me(),g.createWithStatement(c,h)}function vl(){var c,h,b,E=[];for(b=_,ge("default")?(Q(),c=null):(ue("case"),c=he()),U(":");f<w&&!(q("}")||ge("default")||ge("case"));)h=Me(),E.push(h);return g.markEnd(g.createSwitchCase(c,E),b)}function wl(){var c,h,b,E,j;if(ue("switch"),U("("),c=he(),U(")"),U("{"),h=[],q("}"))return Q(),g.createSwitchStatement(c,h);for(E=$.inSwitch,$.inSwitch=!0,j=!1;f<w&&!q("}");)(b=vl()).test===null&&(j&&Y({},o.MultipleDefaultsInSwitch),j=!0),h.push(b);return $.inSwitch=E,U("}"),g.createSwitchStatement(c,h)}function $l(){var c;return ue("throw"),_t()&&Y({},o.NewlineAfterThrow),c=he(),Ne(),g.createThrowStatement(c)}function Sl(){var c,h,b;return b=_,ue("catch"),U("("),q(")")&&Ce(_),c=We(),y&&oe(c.name)&&ne({},o.StrictCatchVariable),U(")"),h=Bt(),g.markEnd(g.createCatchClause(c,h),b)}function xl(){var c,h=[],b=null;return ue("try"),c=Bt(),ge("catch")&&h.push(Sl()),ge("finally")&&(Q(),b=Bt()),h.length!==0||b||Y({},o.NoCatchOrFinally),g.createTryStatement(c,[],h,b)}function El(){return ue("debugger"),Ne(),g.createDebuggerStatement()}function Me(){var c,h,b,E,j=_.type;if(j===a.EOF&&Ce(_),j===a.Punctuator&&_.value==="{")return Bt();if(E=_,j===a.Punctuator)switch(_.value){case";":return g.markEnd(cl(),E);case"(":return g.markEnd(ul(),E)}if(j===a.Keyword)switch(_.value){case"break":return g.markEnd(yl(),E);case"continue":return g.markEnd(gl(),E);case"debugger":return g.markEnd(El(),E);case"do":return g.markEnd(dl(),E);case"for":return g.markEnd(ml(),E);case"function":return g.markEnd(oa(),E);case"if":return g.markEnd(pl(),E);case"return":return g.markEnd(_l(),E);case"switch":return g.markEnd(wl(),E);case"throw":return g.markEnd($l(),E);case"try":return g.markEnd(xl(),E);case"var":return g.markEnd(ol(),E);case"while":return g.markEnd(fl(),E);case"with":return g.markEnd(bl(),E)}return(c=he()).type===s.Identifier&&q(":")?(Q(),b="$"+c.name,Object.prototype.hasOwnProperty.call($.labelSet,b)&&Y({},o.Redeclaration,"Label",c.name),$.labelSet[b]=!0,h=Me(),delete $.labelSet[b],g.markEnd(g.createLabeledStatement(c,h),E)):(Ne(),g.markEnd(g.createExpressionStatement(c),E))}function jr(){var c,h,b,E,j,M,z,pe,ae=[];for(pe=_,U("{");f<w&&_.type===a.StringLiteral&&(h=_,c=bt(),ae.push(c),c.expression.type===s.Literal);)d.slice(h.start+1,h.end-1)==="use strict"?(y=!0,b&&ne(b,o.StrictOctalLiteral)):!b&&h.octal&&(b=h);for(E=$.labelSet,j=$.inIteration,M=$.inSwitch,z=$.inFunctionBody,$.labelSet={},$.inIteration=!1,$.inSwitch=!1,$.inFunctionBody=!0;f<w&&!q("}")&&(c=bt())!==void 0;)ae.push(c);return U("}"),$.labelSet=E,$.inIteration=j,$.inSwitch=M,$.inFunctionBody=z,g.markEnd(g.createBlockStatement(ae),pe)}function sa(c){var h,b,E,j,M,z,pe=[];if(U("("),!q(")"))for(j={};f<w&&(b=_,h=We(),M="$"+b.value,y?(oe(b.value)&&(E=b,z=o.StrictParamName),Object.prototype.hasOwnProperty.call(j,M)&&(E=b,z=o.StrictParamDupe)):!c&&(oe(b.value)?(c=b,z=o.StrictParamName):X(b.value)?(c=b,z=o.StrictReservedWord):Object.prototype.hasOwnProperty.call(j,M)&&(c=b,z=o.StrictParamDupe)),pe.push(h),j[M]=!0,!q(")"));)U(",");return U(")"),{params:pe,stricted:E,firstRestricted:c,message:z}}function oa(){var c,h,b,E,j,M,z,pe,ae,be=[];return ae=_,ue("function"),b=_,c=We(),y?oe(b.value)&&ne(b,o.StrictFunctionName):oe(b.value)?(M=b,z=o.StrictFunctionName):X(b.value)&&(M=b,z=o.StrictReservedWord),be=(j=sa(M)).params,E=j.stricted,M=j.firstRestricted,j.message&&(z=j.message),pe=y,h=jr(),y&&M&&Y(M,z),y&&E&&ne(E,z),y=pe,g.markEnd(g.createFunctionDeclaration(c,be,[],h),ae)}function kl(){var c,h,b,E,j,M,z,pe,ae=null,be=[];return pe=_,ue("function"),!q("(")&&(c=_,ae=We(),y?oe(c.value)&&ne(c,o.StrictFunctionName):oe(c.value)?(b=c,E=o.StrictFunctionName):X(c.value)&&(b=c,E=o.StrictReservedWord)),be=(j=sa(b)).params,h=j.stricted,b=j.firstRestricted,j.message&&(E=j.message),z=y,M=jr(),y&&b&&Y(b,E),y&&h&&ne(h,E),y=z,g.markEnd(g.createFunctionExpression(ae,be,[],M),pe)}function bt(){if(_.type===a.Keyword)switch(_.value){case"const":case"let":return ll(_.value);case"function":return oa();default:return Me()}if(_.type!==a.EOF)return Me()}function Al(){for(var c,h,b,E=[];f<w&&(h=_).type===a.StringLiteral&&(E.push(c=bt()),c.expression.type===s.Literal);)d.slice(h.start+1,h.end-1)==="use strict"?(y=!0,b&&ne(b,o.StrictOctalLiteral)):!b&&h.octal&&(b=h);for(;f<w&&(c=bt())!==void 0;)E.push(c);return E}function Il(){var c,h;return k(),Ar(),h=_,y=!1,c=Al(),g.markEnd(g.createProgram(c),h)}function la(){var c,h,b,E=[];for(c=0;c<x.tokens.length;++c)b={type:(h=x.tokens[c]).type,value:h.value},x.range&&(b.range=h.range),x.loc&&(b.loc=h.loc),E.push(b);x.tokens=E}function Ol(c,h){var b,E,j;b=String,typeof c=="string"||c instanceof String||(c=b(c)),g=m,f=0,S=(d=c).length>0?1:0,v=0,w=d.length,_=null,$={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},x={},(h=h||{}).tokens=!0,x.tokens=[],x.tokenize=!0,x.openParenToken=-1,x.openCurlyToken=-1,x.range=typeof h.range=="boolean"&&h.range,x.loc=typeof h.loc=="boolean"&&h.loc,typeof h.comment=="boolean"&&h.comment&&(x.comments=[]),typeof h.tolerant=="boolean"&&h.tolerant&&(x.errors=[]);try{if(Ar(),_.type===a.EOF)return x.tokens;for(E=Q();_.type!==a.EOF;)try{E=Q()}catch(M){if(E=_,x.errors){x.errors.push(M);break}throw M}la(),j=x.tokens,x.comments!==void 0&&(j.comments=x.comments),x.errors!==void 0&&(j.errors=x.errors)}catch(M){throw M}finally{x={}}return j}function jl(c,h){var b,E;E=String,typeof c=="string"||c instanceof String||(c=E(c)),g=m,f=0,S=(d=c).length>0?1:0,v=0,w=d.length,_=null,$={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},x={},h!==void 0&&(x.range=typeof h.range=="boolean"&&h.range,x.loc=typeof h.loc=="boolean"&&h.loc,x.attachComment=typeof h.attachComment=="boolean"&&h.attachComment,x.loc&&h.source!==null&&h.source!==void 0&&(x.source=E(h.source)),typeof h.tokens=="boolean"&&h.tokens&&(x.tokens=[]),typeof h.comment=="boolean"&&h.comment&&(x.comments=[]),typeof h.tolerant=="boolean"&&h.tolerant&&(x.errors=[]),x.attachComment&&(x.range=!0,x.comments=[],x.bottomRightStack=[],x.trailingComments=[],x.leadingComments=[]));try{b=Il(),x.comments!==void 0&&(b.comments=x.comments),x.tokens!==void 0&&(la(),b.tokens=x.tokens),x.errors!==void 0&&(b.errors=x.errors)}catch(j){throw j}finally{x={}}return b}(i={})[(a={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9}).BooleanLiteral]="Boolean",i[a.EOF]="<end>",i[a.Identifier]="Identifier",i[a.Keyword]="Keyword",i[a.NullLiteral]="Null",i[a.NumericLiteral]="Numeric",i[a.Punctuator]="Punctuator",i[a.StringLiteral]="String",i[a.RegularExpression]="RegularExpression",l=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="],s={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement"},u={Data:1,Get:2,Set:4},o={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode"},p={NonAsciiIdentifierStart:RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")},m={name:"SyntaxTree",processComment:function(c){var h,b;if(c.type!==s.Program||!(c.body.length>0)){for(x.trailingComments.length>0?x.trailingComments[0].range[0]>=c.range[1]?(b=x.trailingComments,x.trailingComments=[]):x.trailingComments.length=0:x.bottomRightStack.length>0&&x.bottomRightStack[x.bottomRightStack.length-1].trailingComments&&x.bottomRightStack[x.bottomRightStack.length-1].trailingComments[0].range[0]>=c.range[1]&&(b=x.bottomRightStack[x.bottomRightStack.length-1].trailingComments,delete x.bottomRightStack[x.bottomRightStack.length-1].trailingComments);x.bottomRightStack.length>0&&x.bottomRightStack[x.bottomRightStack.length-1].range[0]>=c.range[0];)h=x.bottomRightStack.pop();h?h.leadingComments&&h.leadingComments[h.leadingComments.length-1].range[1]<=c.range[0]&&(c.leadingComments=h.leadingComments,delete h.leadingComments):x.leadingComments.length>0&&x.leadingComments[x.leadingComments.length-1].range[1]<=c.range[0]&&(c.leadingComments=x.leadingComments,x.leadingComments=[]),b&&(c.trailingComments=b),x.bottomRightStack.push(c)}},markEnd:function(c,h){return x.range&&(c.range=[h.start,f]),x.loc&&(c.loc=new Jo(h.startLineNumber===void 0?h.lineNumber:h.startLineNumber,h.start-(h.startLineStart===void 0?h.lineStart:h.startLineStart),S,f-v),this.postProcess(c)),x.attachComment&&this.processComment(c),c},postProcess:function(c){return x.source&&(c.loc.source=x.source),c},createArrayExpression:function(c){return{type:s.ArrayExpression,elements:c}},createAssignmentExpression:function(c,h,b){return{type:s.AssignmentExpression,operator:c,left:h,right:b}},createBinaryExpression:function(c,h,b){return{type:c==="||"||c==="&&"?s.LogicalExpression:s.BinaryExpression,operator:c,left:h,right:b}},createBlockStatement:function(c){return{type:s.BlockStatement,body:c}},createBreakStatement:function(c){return{type:s.BreakStatement,label:c}},createCallExpression:function(c,h){return{type:s.CallExpression,callee:c,arguments:h}},createCatchClause:function(c,h){return{type:s.CatchClause,param:c,body:h}},createConditionalExpression:function(c,h,b){return{type:s.ConditionalExpression,test:c,consequent:h,alternate:b}},createContinueStatement:function(c){return{type:s.ContinueStatement,label:c}},createDebuggerStatement:function(){return{type:s.DebuggerStatement}},createDoWhileStatement:function(c,h){return{type:s.DoWhileStatement,body:c,test:h}},createEmptyStatement:function(){return{type:s.EmptyStatement}},createExpressionStatement:function(c){return{type:s.ExpressionStatement,expression:c}},createForStatement:function(c,h,b,E){return{type:s.ForStatement,init:c,test:h,update:b,body:E}},createForInStatement:function(c,h,b){return{type:s.ForInStatement,left:c,right:h,body:b,each:!1}},createFunctionDeclaration:function(c,h,b,E){return{type:s.FunctionDeclaration,id:c,params:h,defaults:b,body:E,rest:null,generator:!1,expression:!1}},createFunctionExpression:function(c,h,b,E){return{type:s.FunctionExpression,id:c,params:h,defaults:b,body:E,rest:null,generator:!1,expression:!1}},createIdentifier:function(c){return{type:s.Identifier,name:c}},createIfStatement:function(c,h,b){return{type:s.IfStatement,test:c,consequent:h,alternate:b}},createLabeledStatement:function(c,h){return{type:s.LabeledStatement,label:c,body:h}},createLiteral:function(c){return{type:s.Literal,value:c.value,raw:d.slice(c.start,c.end)}},createMemberExpression:function(c,h,b){return{type:s.MemberExpression,computed:c==="[",object:h,property:b}},createNewExpression:function(c,h){return{type:s.NewExpression,callee:c,arguments:h}},createObjectExpression:function(c){return{type:s.ObjectExpression,properties:c}},createPostfixExpression:function(c,h){return{type:s.UpdateExpression,operator:c,argument:h,prefix:!1}},createProgram:function(c){return{type:s.Program,body:c}},createProperty:function(c,h,b){return{type:s.Property,key:h,value:b,kind:c}},createReturnStatement:function(c){return{type:s.ReturnStatement,argument:c}},createSequenceExpression:function(c){return{type:s.SequenceExpression,expressions:c}},createSwitchCase:function(c,h){return{type:s.SwitchCase,test:c,consequent:h}},createSwitchStatement:function(c,h){return{type:s.SwitchStatement,discriminant:c,cases:h}},createThisExpression:function(){return{type:s.ThisExpression}},createThrowStatement:function(c){return{type:s.ThrowStatement,argument:c}},createTryStatement:function(c,h,b,E){return{type:s.TryStatement,block:c,guardedHandlers:h,handlers:b,finalizer:E}},createUnaryExpression:function(c,h){return c==="++"||c==="--"?{type:s.UpdateExpression,operator:c,argument:h,prefix:!0}:{type:s.UnaryExpression,operator:c,argument:h,prefix:!0}},createVariableDeclaration:function(c,h){return{type:s.VariableDeclaration,declarations:c,kind:h}},createVariableDeclarator:function(c,h){return{type:s.VariableDeclarator,id:c,init:h}},createWhileStatement:function(c,h){return{type:s.WhileStatement,test:c,body:h}},createWithStatement:function(c,h){return{type:s.WithStatement,object:c,body:h}}},r.version="1.2.2",r.tokenize=Ol,r.parse=jl,r.Syntax=function(){var c,h={};for(c in typeof Object.create=="function"&&(h=Object.create(null)),s)s.hasOwnProperty(c)&&(h[c]=s[c]);return typeof Object.freeze=="function"&&Object.freeze(h),h}()})},{}],1:[function(n,e,t){(function(r){var a=function(){var i={trace:function(){},yy:{},symbols_:{error:2,JSON_PATH:3,DOLLAR:4,PATH_COMPONENTS:5,LEADING_CHILD_MEMBER_EXPRESSION:6,PATH_COMPONENT:7,MEMBER_COMPONENT:8,SUBSCRIPT_COMPONENT:9,CHILD_MEMBER_COMPONENT:10,DESCENDANT_MEMBER_COMPONENT:11,DOT:12,MEMBER_EXPRESSION:13,DOT_DOT:14,STAR:15,IDENTIFIER:16,SCRIPT_EXPRESSION:17,INTEGER:18,END:19,CHILD_SUBSCRIPT_COMPONENT:20,DESCENDANT_SUBSCRIPT_COMPONENT:21,"[":22,SUBSCRIPT:23,"]":24,SUBSCRIPT_EXPRESSION:25,SUBSCRIPT_EXPRESSION_LIST:26,SUBSCRIPT_EXPRESSION_LISTABLE:27,",":28,STRING_LITERAL:29,ARRAY_SLICE:30,FILTER_EXPRESSION:31,QQ_STRING:32,Q_STRING:33,$accept:0,$end:1},terminals_:{2:"error",4:"DOLLAR",12:"DOT",14:"DOT_DOT",15:"STAR",16:"IDENTIFIER",17:"SCRIPT_EXPRESSION",18:"INTEGER",19:"END",22:"[",24:"]",28:",",30:"ARRAY_SLICE",31:"FILTER_EXPRESSION",32:"QQ_STRING",33:"Q_STRING"},productions_:[0,[3,1],[3,2],[3,1],[3,2],[5,1],[5,2],[7,1],[7,1],[8,1],[8,1],[10,2],[6,1],[11,2],[13,1],[13,1],[13,1],[13,1],[13,1],[9,1],[9,1],[20,3],[21,4],[23,1],[23,1],[26,1],[26,3],[27,1],[27,1],[27,1],[25,1],[25,1],[25,1],[29,1],[29,1]],performAction:function(o,p,m,d,y,f,S){d.ast||(d.ast=l,l.initialize());var v=f.length-1;switch(y){case 1:return d.ast.set({expression:{type:"root",value:f[v]}}),d.ast.unshift(),d.ast.yield();case 2:return d.ast.set({expression:{type:"root",value:f[v-1]}}),d.ast.unshift(),d.ast.yield();case 3:return d.ast.unshift(),d.ast.yield();case 4:return d.ast.set({operation:"member",scope:"child",expression:{type:"identifier",value:f[v-1]}}),d.ast.unshift(),d.ast.yield();case 5:case 6:case 11:case 13:case 18:case 21:case 22:case 23:break;case 7:d.ast.set({operation:"member"}),d.ast.push();break;case 8:d.ast.set({operation:"subscript"}),d.ast.push();break;case 9:case 19:d.ast.set({scope:"child"});break;case 10:case 20:d.ast.set({scope:"descendant"});break;case 12:d.ast.set({scope:"child",operation:"member"});break;case 14:d.ast.set({expression:{type:"wildcard",value:f[v]}});break;case 15:d.ast.set({expression:{type:"identifier",value:f[v]}});break;case 16:d.ast.set({expression:{type:"script_expression",value:f[v]}});break;case 17:d.ast.set({expression:{type:"numeric_literal",value:parseInt(f[v])}});break;case 24:f[v].length>1?d.ast.set({expression:{type:"union",value:f[v]}}):this.$=f[v];break;case 25:this.$=[f[v]];break;case 26:this.$=f[v-2].concat(f[v]);break;case 27:this.$={expression:{type:"numeric_literal",value:parseInt(f[v])}},d.ast.set(this.$);break;case 28:this.$={expression:{type:"string_literal",value:f[v]}},d.ast.set(this.$);break;case 29:this.$={expression:{type:"slice",value:f[v]}},d.ast.set(this.$);break;case 30:this.$={expression:{type:"wildcard",value:f[v]}},d.ast.set(this.$);break;case 31:this.$={expression:{type:"script_expression",value:f[v]}},d.ast.set(this.$);break;case 32:this.$={expression:{type:"filter_expression",value:f[v]}},d.ast.set(this.$);break;case 33:case 34:this.$=f[v]}},table:[{3:1,4:[1,2],6:3,13:4,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9]},{1:[3]},{1:[2,1],5:10,7:11,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,3],5:21,7:11,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,12],12:[2,12],14:[2,12],22:[2,12]},{1:[2,14],12:[2,14],14:[2,14],22:[2,14]},{1:[2,15],12:[2,15],14:[2,15],22:[2,15]},{1:[2,16],12:[2,16],14:[2,16],22:[2,16]},{1:[2,17],12:[2,17],14:[2,17],22:[2,17]},{1:[2,18],12:[2,18],14:[2,18],22:[2,18]},{1:[2,2],7:22,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,5],12:[2,5],14:[2,5],22:[2,5]},{1:[2,7],12:[2,7],14:[2,7],22:[2,7]},{1:[2,8],12:[2,8],14:[2,8],22:[2,8]},{1:[2,9],12:[2,9],14:[2,9],22:[2,9]},{1:[2,10],12:[2,10],14:[2,10],22:[2,10]},{1:[2,19],12:[2,19],14:[2,19],22:[2,19]},{1:[2,20],12:[2,20],14:[2,20],22:[2,20]},{13:23,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9]},{13:24,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9],22:[1,25]},{15:[1,29],17:[1,30],18:[1,33],23:26,25:27,26:28,27:32,29:34,30:[1,35],31:[1,31],32:[1,36],33:[1,37]},{1:[2,4],7:22,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,6],12:[2,6],14:[2,6],22:[2,6]},{1:[2,11],12:[2,11],14:[2,11],22:[2,11]},{1:[2,13],12:[2,13],14:[2,13],22:[2,13]},{15:[1,29],17:[1,30],18:[1,33],23:38,25:27,26:28,27:32,29:34,30:[1,35],31:[1,31],32:[1,36],33:[1,37]},{24:[1,39]},{24:[2,23]},{24:[2,24],28:[1,40]},{24:[2,30]},{24:[2,31]},{24:[2,32]},{24:[2,25],28:[2,25]},{24:[2,27],28:[2,27]},{24:[2,28],28:[2,28]},{24:[2,29],28:[2,29]},{24:[2,33],28:[2,33]},{24:[2,34],28:[2,34]},{24:[1,41]},{1:[2,21],12:[2,21],14:[2,21],22:[2,21]},{18:[1,33],27:42,29:34,30:[1,35],32:[1,36],33:[1,37]},{1:[2,22],12:[2,22],14:[2,22],22:[2,22]},{24:[2,26],28:[2,26]}],defaultActions:{27:[2,23],29:[2,30],30:[2,31],31:[2,32]},parseError:function(o,p){if(p.recoverable)this.trace(o);else throw Error(o)},parse:function(o){var p=this,m=[0],d=[null],y=[],f=this.table,S="",v=0,w=0,g=0,_=2,$=1,x=y.slice.call(arguments,1);this.lexer.setInput(o),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,this.lexer.yylloc===void 0&&(this.lexer.yylloc={});var T=this.lexer.yylloc;y.push(T);var P=this.lexer.options&&this.lexer.options.ranges;function D(){var ee;return typeof(ee=p.lexer.lex()||$)!="number"&&(ee=p.symbols_[ee]||ee),ee}typeof this.yy.parseError=="function"?this.parseError=this.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var R,I,F,C,B,V,X,oe,we,H={};;){if(F=m[m.length-1],this.defaultActions[F]?C=this.defaultActions[F]:(R==null&&(R=D()),C=f[F]&&f[F][R]),C===void 0||!C.length||!C[0]){var ie="";for(V in we=[],f[F])this.terminals_[V]&&V>_&&we.push("'"+this.terminals_[V]+"'");ie=this.lexer.showPosition?"Parse error on line "+(v+1)+\`:
|
|
107
107
|
\`+this.lexer.showPosition()+\`
|
|
108
|
-
Expecting \`+
|
|
108
|
+
Expecting \`+we.join(", ")+", got '"+(this.terminals_[R]||R)+"'":"Parse error on line "+(v+1)+": Unexpected "+(R==$?"end of input":"'"+(this.terminals_[R]||R)+"'"),this.parseError(ie,{text:this.lexer.match,token:this.terminals_[R]||R,line:this.lexer.yylineno,loc:T,expected:we})}if(C[0]instanceof Array&&C.length>1)throw Error("Parse Error: multiple actions possible at state: "+F+", token: "+R);switch(C[0]){case 1:m.push(R),d.push(this.lexer.yytext),y.push(this.lexer.yylloc),m.push(C[1]),R=null,I?(R=I,I=null):(w=this.lexer.yyleng,S=this.lexer.yytext,v=this.lexer.yylineno,T=this.lexer.yylloc,g>0);break;case 2:if(X=this.productions_[C[1]][1],H.$=d[d.length-X],H._$={first_line:y[y.length-(X||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(X||1)].first_column,last_column:y[y.length-1].last_column},P&&(H._$.range=[y[y.length-(X||1)].range[0],y[y.length-1].range[1]]),(B=this.performAction.apply(H,[S,w,v,this.yy,C[1],d,y].concat(x)))!==void 0)return B;X&&(m=m.slice(0,-1*X*2),d=d.slice(0,-1*X),y=y.slice(0,-1*X)),m.push(this.productions_[C[1]][0]),d.push(H.$),y.push(H._$),oe=f[m[m.length-2]][m[m.length-1]],m.push(oe);break;case 3:return!0}}return!0}},l={initialize:function(){this._nodes=[],this._node={},this._stash=[]},set:function(o){for(var p in o)this._node[p]=o[p];return this._node},node:function(o){return arguments.length&&(this._node=o),this._node},push:function(){this._nodes.push(this._node),this._node={}},unshift:function(){this._nodes.unshift(this._node),this._node={}},yield:function(){var o=this._nodes;return this.initialize(),o}},s=function(){return{EOF:1,parseError:function(o,p){if(this.yy.parser)this.yy.parser.parseError(o,p);else throw Error(o)},setInput:function(o){return this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var o=this._input[0];return this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o,o.match(/(?:\\r\\n?|\\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},unput:function(o){var p=o.length,m=o.split(/(?:\\r\\n?|\\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-p-1),this.offset-=p;var d=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),m.length-1&&(this.yylineno-=m.length-1);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:m?(m.length===d.length?this.yylloc.first_column:0)+d[d.length-m.length].length-m[0].length:this.yylloc.first_column-p},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-p]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+\`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
109
109
|
\`+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(o){this.unput(this.match.slice(o))},pastInput:function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\\n/g,"")},upcomingInput:function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\\n/g,"")},showPosition:function(){var o=this.pastInput(),p=Array(o.length+1).join("-");return o+this.upcomingInput()+\`
|
|
110
110
|
\`+p+"^"},test_match:function(o,p){var m,d,y;if(this.options.backtrack_lexer&&(y={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(y.yylloc.range=this.yylloc.range.slice(0))),(d=o[0].match(/(?:\\r\\n?|\\n).*/g))&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(o[0].length),this.matched+=o[0],m=this.performAction.call(this,this.yy,this,p,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),m)return m;if(this._backtrack)for(var f in y)this[f]=y[f];return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var o,p,m,d,y=this._currentRules(),f=0;f<y.length;f++)if((m=this._input.match(this.rules[y[f]]))&&(!p||m[0].length>p[0].length)){if(p=m,d=f,this.options.backtrack_lexer){if((o=this.test_match(m,y[f]))!==!1)return o;if(!this._backtrack)return!1;p=!1;continue}if(!this.options.flex)break}return p?(o=this.test_match(p,y[d]))!==!1&&o:this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+\`. Unrecognized text.
|
|
111
111
|
\`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(o){this.conditionStack.push(o)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(o){return(o=this.conditionStack.length-1-Math.abs(o||0))>=0?this.conditionStack[o]:"INITIAL"},pushState:function(o){this.begin(o)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(o,p,m,d){switch(m){case 0:return 4;case 1:return 14;case 2:return 12;case 3:return 15;case 4:return 16;case 5:return 22;case 6:return 24;case 7:return 28;case 8:return 30;case 9:return 18;case 10:return p.yytext=p.yytext.substr(1,p.yyleng-2),32;case 11:return p.yytext=p.yytext.substr(1,p.yyleng-2),33;case 12:return 17;case 13:return 31}},rules:[/^(?:\\$)/,/^(?:\\.\\.)/,/^(?:\\.)/,/^(?:\\*)/,/^(?:[a-zA-Z_]+[a-zA-Z0-9_]*)/,/^(?:\\[)/,/^(?:\\])/,/^(?:,)/,/^(?:((-?(?:0|[1-9][0-9]*)))?\\:((-?(?:0|[1-9][0-9]*)))?(\\:((-?(?:0|[1-9][0-9]*)))?)?)/,/^(?:(-?(?:0|[1-9][0-9]*)))/,/^(?:"(?:\\\\["bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^"\\\\])*")/,/^(?:'(?:\\\\['bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^'\\\\])*')/,/^(?:\\(.+?\\)(?=\\]))/,/^(?:\\?\\(.+?\\)(?=\\]))/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}}}();function u(){this.yy={}}return i.lexer=s,u.prototype=i,i.Parser=u,new u}();n!==void 0&&t!==void 0&&(t.parser=a,t.Parser=a.Parser,t.parse=function(){return a.parse.apply(a,arguments)},t.main=function(i){i[1]||(console.log("Usage: "+i[0]+" FILE"),r.exit(1));var l=n("fs").readFileSync(n("path").normalize(i[1]),"utf8");return t.parser.parse(l)},e!==void 0&&n.main===e&&t.main(r.argv.slice(1)))}).call(this,n("_process"))},{_process:14,fs:12,path:13}],2:[function(n,e,t){e.exports={identifier:"[a-zA-Z_]+[a-zA-Z0-9_]*",integer:"-?(?:0|[1-9][0-9]*)",qq_string:'"(?:\\\\\\\\["bfnrt/\\\\\\\\]|\\\\\\\\u[a-fA-F0-9]{4}|[^"\\\\\\\\])*"',q_string:"'(?:\\\\\\\\['bfnrt/\\\\\\\\]|\\\\\\\\u[a-fA-F0-9]{4}|[^'\\\\\\\\])*'"}},{}],3:[function(n,e,t){var r=n("./dict"),a=n("fs"),i={lex:{macros:{esc:"\\\\\\\\",int:r.integer},rules:[["\\\\$","return 'DOLLAR'"],["\\\\.\\\\.","return 'DOT_DOT'"],["\\\\.","return 'DOT'"],["\\\\*","return 'STAR'"],[r.identifier,"return 'IDENTIFIER'"],["\\\\[","return '['"],["\\\\]","return ']'"],[",","return ','"],["({int})?\\\\:({int})?(\\\\:({int})?)?","return 'ARRAY_SLICE'"],["{int}","return 'INTEGER'"],[r.qq_string,"yytext = yytext.substr(1,yyleng-2); return 'QQ_STRING';"],[r.q_string,"yytext = yytext.substr(1,yyleng-2); return 'Q_STRING';"],["\\\\(.+?\\\\)(?=\\\\])","return 'SCRIPT_EXPRESSION'"],["\\\\?\\\\(.+?\\\\)(?=\\\\])","return 'FILTER_EXPRESSION'"]]},start:"JSON_PATH",bnf:{JSON_PATH:[["DOLLAR",'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()'],["DOLLAR PATH_COMPONENTS",'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()'],["LEADING_CHILD_MEMBER_EXPRESSION","yy.ast.unshift(); return yy.ast.yield()"],["LEADING_CHILD_MEMBER_EXPRESSION PATH_COMPONENTS",'yy.ast.set({ operation: "member", scope: "child", expression: { type: "identifier", value: $1 }}); yy.ast.unshift(); return yy.ast.yield()']],PATH_COMPONENTS:[["PATH_COMPONENT",""],["PATH_COMPONENTS PATH_COMPONENT",""]],PATH_COMPONENT:[["MEMBER_COMPONENT",'yy.ast.set({ operation: "member" }); yy.ast.push()'],["SUBSCRIPT_COMPONENT",'yy.ast.set({ operation: "subscript" }); yy.ast.push() ']],MEMBER_COMPONENT:[["CHILD_MEMBER_COMPONENT",'yy.ast.set({ scope: "child" })'],["DESCENDANT_MEMBER_COMPONENT",'yy.ast.set({ scope: "descendant" })']],CHILD_MEMBER_COMPONENT:[["DOT MEMBER_EXPRESSION",""]],LEADING_CHILD_MEMBER_EXPRESSION:[["MEMBER_EXPRESSION",'yy.ast.set({ scope: "child", operation: "member" })']],DESCENDANT_MEMBER_COMPONENT:[["DOT_DOT MEMBER_EXPRESSION",""]],MEMBER_EXPRESSION:[["STAR",'yy.ast.set({ expression: { type: "wildcard", value: $1 } })'],["IDENTIFIER",'yy.ast.set({ expression: { type: "identifier", value: $1 } })'],["SCRIPT_EXPRESSION",'yy.ast.set({ expression: { type: "script_expression", value: $1 } })'],["INTEGER",'yy.ast.set({ expression: { type: "numeric_literal", value: parseInt($1) } })'],["END",""]],SUBSCRIPT_COMPONENT:[["CHILD_SUBSCRIPT_COMPONENT",'yy.ast.set({ scope: "child" })'],["DESCENDANT_SUBSCRIPT_COMPONENT",'yy.ast.set({ scope: "descendant" })']],CHILD_SUBSCRIPT_COMPONENT:[["[ SUBSCRIPT ]",""]],DESCENDANT_SUBSCRIPT_COMPONENT:[["DOT_DOT [ SUBSCRIPT ]",""]],SUBSCRIPT:[["SUBSCRIPT_EXPRESSION",""],["SUBSCRIPT_EXPRESSION_LIST",'$1.length > 1? yy.ast.set({ expression: { type: "union", value: $1 } }) : $$ = $1']],SUBSCRIPT_EXPRESSION_LIST:[["SUBSCRIPT_EXPRESSION_LISTABLE","$$ = [$1]"],["SUBSCRIPT_EXPRESSION_LIST , SUBSCRIPT_EXPRESSION_LISTABLE","$$ = $1.concat($3)"]],SUBSCRIPT_EXPRESSION_LISTABLE:[["INTEGER",'$$ = { expression: { type: "numeric_literal", value: parseInt($1) } }; yy.ast.set($$)'],["STRING_LITERAL",'$$ = { expression: { type: "string_literal", value: $1 } }; yy.ast.set($$)'],["ARRAY_SLICE",'$$ = { expression: { type: "slice", value: $1 } }; yy.ast.set($$)']],SUBSCRIPT_EXPRESSION:[["STAR",'$$ = { expression: { type: "wildcard", value: $1 } }; yy.ast.set($$)'],["SCRIPT_EXPRESSION",'$$ = { expression: { type: "script_expression", value: $1 } }; yy.ast.set($$)'],["FILTER_EXPRESSION",'$$ = { expression: { type: "filter_expression", value: $1 } }; yy.ast.set($$)']],STRING_LITERAL:[["QQ_STRING","$$ = $1"],["Q_STRING","$$ = $1"]]}};a.readFileSync&&(i.moduleInclude=a.readFileSync(n.resolve("../include/module.js")),i.actionInclude=a.readFileSync(n.resolve("../include/action.js"))),e.exports=i},{"./dict":2,fs:12}],4:[function(n,e,t){var r=n("./aesprim"),a=n("./slice"),i=n("static-eval"),l=n("underscore").uniq,s=function(){return this.initialize.apply(this,arguments)};function u(w,g,_){var $=n("./index"),x=f(r.parse(g).body[0].expression,{"@":w.value}),T=_.replace(/\\{\\{\\s*value\\s*\\}\\}/g,x),P=$.nodes(w.value,T);return P.forEach(function(D){D.path=w.path.concat(D.path.slice(1))}),P}function o(w){return Array.isArray(w)}function p(w){return w&&!(w instanceof Array)&&w instanceof Object}function m(w){return function(g,_,$,x){var T=g.value,P=g.path,D=[],R=(function(I,F){o(I)?(I.forEach(function(C,B){!(D.length>=x)&&$(B,C,_)&&D.push({path:F.concat(B),value:C})}),I.forEach(function(C,B){!(D.length>=x)&&w&&R(C,F.concat(B))})):p(I)&&(this.keys(I).forEach(function(C){!(D.length>=x)&&$(C,I[C],_)&&D.push({path:F.concat(C),value:I[C]})}),this.keys(I).forEach(function(C){!(D.length>=x)&&w&&R(I[C],F.concat(C))}))}).bind(this);return R(T,P),D}}function d(w){return function(g,_,$){return this.descend(_,g.expression.value,w,$)}}function y(w){return function(g,_,$){return this.traverse(_,g.expression.value,w,$)}}function f(){try{return i.apply(this,arguments)}catch{}}function S(w){return l(w=w.filter(function(g){return g}),function(g){return g.path.map(function(_){return String(_).replace("-","--")}).join("-")})}function v(w){var g=String(w);return g.match(/^-?[0-9]+$/)?parseInt(g):null}s.prototype.initialize=function(){this.traverse=m(!0),this.descend=m()},s.prototype.keys=Object.keys,s.prototype.resolve=function(w){var g=[w.operation,w.scope,w.expression.type].join("-"),_=this._fns[g];if(!_)throw Error("couldn't resolve key: "+g);return _.bind(this)},s.prototype.register=function(w,g){if(!g instanceof Function)throw Error("handler must be a function");this._fns[w]=g},s.prototype._fns={"member-child-identifier":function(w,g){var _=w.expression.value,$=g.value;if($ instanceof Object&&_ in $)return[{value:$[_],path:g.path.concat(_)}]},"member-descendant-identifier":y(function(w,g,_){return w==_}),"subscript-child-numeric_literal":d(function(w,g,_){return w===_}),"member-child-numeric_literal":d(function(w,g,_){return String(w)===String(_)}),"subscript-descendant-numeric_literal":y(function(w,g,_){return w===_}),"member-child-wildcard":d(function(){return!0}),"member-descendant-wildcard":y(function(){return!0}),"subscript-descendant-wildcard":y(function(){return!0}),"subscript-child-wildcard":d(function(){return!0}),"subscript-child-slice":function(w,g){if(o(g.value)){var _=w.expression.value.split(":").map(v),$=g.value.map(function(x,T){return{value:x,path:g.path.concat(T)}});return a.apply(null,[$].concat(_))}},"subscript-child-union":function(w,g){var _=[];return w.expression.value.forEach(function($){var x={operation:"subscript",scope:"child",expression:$.expression},T=this.resolve(x)(x,g);T&&(_=_.concat(T))},this),S(_)},"subscript-descendant-union":function(w,g,_){var $=n(".."),x=this,T=[];return $.nodes(g,"$..*").slice(1).forEach(function(P){T.length>=_||w.expression.value.forEach(function(D){var R={operation:"subscript",scope:"child",expression:D.expression},I=x.resolve(R)(R,P);T=T.concat(I)})}),S(T)},"subscript-child-filter_expression":function(w,g,_){var $=w.expression.value.slice(2,-1),x=r.parse($).body[0].expression,T=function(P,D){return f(x,{"@":D})};return this.descend(g,null,T,_)},"subscript-descendant-filter_expression":function(w,g,_){var $=w.expression.value.slice(2,-1),x=r.parse($).body[0].expression,T=function(P,D){return f(x,{"@":D})};return this.traverse(g,null,T,_)},"subscript-child-script_expression":function(w,g){return u(g,w.expression.value.slice(1,-1),"$[{{value}}]")},"member-child-script_expression":function(w,g){return u(g,w.expression.value.slice(1,-1),"$.{{value}}")},"member-descendant-script_expression":function(w,g){return u(g,w.expression.value.slice(1,-1),"$..value")}},s.prototype._fns["subscript-child-string_literal"]=s.prototype._fns["member-child-identifier"],s.prototype._fns["member-descendant-numeric_literal"]=s.prototype._fns["subscript-descendant-string_literal"]=s.prototype._fns["member-descendant-identifier"],e.exports=s},{"..":"jsonpath","./aesprim":"./aesprim","./index":5,"./slice":7,"static-eval":15,underscore:12}],5:[function(n,e,t){var r=n("assert"),a=n("./dict"),i=n("./parser"),l=n("./handlers"),s=function(){this.initialize.apply(this,arguments)};function u(p){return Object.prototype.toString.call(p)=="[object String]"}s.prototype.initialize=function(){this.parser=new i,this.handlers=new l},s.prototype.parse=function(p){return r.ok(u(p),"we need a path"),this.parser.parse(p)},s.prototype.parent=function(p,m){r.ok(p instanceof Object,"obj needs to be an object"),r.ok(m,"we need a path");var d=this.nodes(p,m)[0];return d.path.pop(),this.value(p,d.path)},s.prototype.apply=function(p,m,d){r.ok(p instanceof Object,"obj needs to be an object"),r.ok(m,"we need a path"),r.equal(typeof d,"function","fn needs to be function");var y=this.nodes(p,m).sort(function(f,S){return S.path.length-f.path.length});return y.forEach(function(f){var S=f.path.pop(),v=this.value(p,this.stringify(f.path)),w=f.value=d.call(p,v[S]);v[S]=w},this),y},s.prototype.value=function(p,m,d){if(r.ok(p instanceof Object,"obj needs to be an object"),r.ok(m,"we need a path"),arguments.length>=3){var y=this.nodes(p,m).shift();if(!y)return this._vivify(p,m,d);var f=y.path.slice(-1).shift();this.parent(p,this.stringify(y.path))[f]=d}return this.query(p,this.stringify(m),1).shift()},s.prototype._vivify=function(p,m,d){var y=this;r.ok(p instanceof Object,"obj needs to be an object"),r.ok(m,"we need a path");var f=this.parser.parse(m).map(function(v){return v.expression.value}),S=function(v,w){var g=v.pop(),_=y.value(p,v);_||(S(v.concat(),typeof g=="string"?{}:[]),_=y.value(p,v)),_[g]=w};return S(f,d),this.query(p,m)[0]},s.prototype.query=function(p,m,d){return r.ok(p instanceof Object,"obj needs to be an object"),r.ok(u(m),"we need a path"),this.nodes(p,m,d).map(function(y){return y.value})},s.prototype.paths=function(p,m,d){return r.ok(p instanceof Object,"obj needs to be an object"),r.ok(m,"we need a path"),this.nodes(p,m,d).map(function(y){return y.path})},s.prototype.nodes=function(p,m,d){if(r.ok(p instanceof Object,"obj needs to be an object"),r.ok(m,"we need a path"),d===0)return[];var y=this.parser.parse(m),f=this.handlers,S=[{path:["$"],value:p}],v=[];return y.length&&y[0].expression.type=="root"&&y.shift(),y.length?(y.forEach(function(w,g){if(!(v.length>=d)){var _=f.resolve(w),$=[];S.forEach(function(x){if(!(v.length>=d)){var T=_(w,x,d);g==y.length-1?v=v.concat(T||[]):$=$.concat(T||[])}}),S=$}}),d?v.slice(0,d):v):S},s.prototype.stringify=function(p){r.ok(p,"we need a path");var m="$",d={"descendant-member":"..{{value}}","child-member":".{{value}}","descendant-subscript":"..[{{value}}]","child-subscript":"[{{value}}]"};return(p=this._normalize(p)).forEach(function(y){if(y.expression.type!="root"){var f,S=[y.scope,y.operation].join("-"),v=d[S];if(f=y.expression.type=="string_literal"?JSON.stringify(y.expression.value):y.expression.value,!v)throw Error("couldn't find template "+S);m+=v.replace(/{{value}}/,f)}}),m},s.prototype._normalize=function(p){if(r.ok(p,"we need a path"),typeof p=="string")return this.parser.parse(p);if(Array.isArray(p)&&typeof p[0]=="string"){var m=[{expression:{type:"root",value:"$"}}];return p.forEach(function(d,y){if(d!="$"||y!==0)if(typeof d=="string"&&d.match("^"+a.identifier+"$"))m.push({operation:"member",scope:"child",expression:{value:d,type:"identifier"}});else{var f=typeof d=="number"?"numeric_literal":"string_literal";m.push({operation:"subscript",scope:"child",expression:{value:d,type:f}})}}),m}if(Array.isArray(p)&&typeof p[0]=="object")return p;throw Error("couldn't understand path "+p)},s.Handlers=l,s.Parser=i;var o=new s;o.JSONPath=s,e.exports=o},{"./dict":2,"./handlers":4,"./parser":6,assert:8}],6:[function(n,e,t){var r=n("./grammar"),a=n("../generated/parser"),i=function(){var l=new a.Parser,s=l.parseError;return l.yy.parseError=function(){l.yy.ast&&l.yy.ast.initialize(),s.apply(l,arguments)},l};i.grammar=r,e.exports=i},{"../generated/parser":1,"./grammar":3}],7:[function(n,e,t){e.exports=function(a,i,l,s){if(typeof i=="string")throw Error("start cannot be a string");if(typeof l=="string")throw Error("end cannot be a string");if(typeof s=="string")throw Error("step cannot be a string");var u=a.length;if(s===0)throw Error("step cannot be zero");if(s=s?r(s):1,i=i<0?u+i:i,l=l<0?u+l:l,i=r(i===0?0:i||(s>0?0:u-1)),l=r(l===0?0:l||(s>0?u:-1)),i=s>0?Math.max(0,i):Math.min(u,i),l=s>0?Math.min(l,u):Math.max(-1,l),s>0&&l<=i||s<0&&i<=l)return[];for(var o=[],p=i;p!=l&&(!(s<0)||!(p<=l))&&(!(s>0)||!(p>=l));p+=s)o.push(a[p]);return o};function r(a){return String(a).match(/^[0-9]+$/)?parseInt(a):Number.isFinite(a)?parseInt(a,10):0}},{}],8:[function(n,e,t){var r=n("util/"),a=Array.prototype.slice,i=Object.prototype.hasOwnProperty,l=e.exports=m;function s(g,_){return r.isUndefined(_)?""+_:r.isNumber(_)&&!isFinite(_)||r.isFunction(_)||r.isRegExp(_)?_.toString():_}function u(g,_){return r.isString(g)?g.length<_?g:g.slice(0,_):g}function o(g){return u(JSON.stringify(g.actual,s),128)+" "+g.operator+" "+u(JSON.stringify(g.expected,s),128)}function p(g,_,$,x,T){throw new l.AssertionError({message:$,actual:g,expected:_,operator:x,stackStartFunction:T})}function m(g,_){g||p(g,!0,_,"==",l.ok)}function d(g,_){if(g===_)return!0;if(r.isBuffer(g)&&r.isBuffer(_)){if(g.length!=_.length)return!1;for(var $=0;$<g.length;$++)if(g[$]!==_[$])return!1;return!0}return r.isDate(g)&&r.isDate(_)?g.getTime()===_.getTime():r.isRegExp(g)&&r.isRegExp(_)?g.source===_.source&&g.global===_.global&&g.multiline===_.multiline&&g.lastIndex===_.lastIndex&&g.ignoreCase===_.ignoreCase:r.isObject(g)||r.isObject(_)?f(g,_):g==_}function y(g){return Object.prototype.toString.call(g)=="[object Arguments]"}function f(g,_){if(r.isNullOrUndefined(g)||r.isNullOrUndefined(_)||g.prototype!==_.prototype)return!1;if(r.isPrimitive(g)||r.isPrimitive(_))return g===_;var $=y(g),x=y(_);if($&&!x||!$&&x)return!1;if($)return d(g=a.call(g),_=a.call(_));var T,P,D=w(g),R=w(_);if(D.length!=R.length)return!1;for(D.sort(),R.sort(),P=D.length-1;P>=0;P--)if(D[P]!=R[P])return!1;for(P=D.length-1;P>=0;P--)if(!d(g[T=D[P]],_[T]))return!1;return!0}function S(g,_){return!!g&&!!_&&(Object.prototype.toString.call(_)=="[object RegExp]"?_.test(g):g instanceof _||_.call({},g)===!0)}function v(g,_,$,x){var T;r.isString($)&&(x=$,$=null);try{_()}catch(P){T=P}if(x=($&&$.name?" ("+$.name+").":".")+(x?" "+x:"."),g&&!T&&p(T,$,"Missing expected exception"+x),!g&&S(T,$)&&p(T,$,"Got unwanted exception"+x),g&&T&&$&&!S(T,$)||!g&&T)throw T}l.AssertionError=function(g){this.name="AssertionError",this.actual=g.actual,this.expected=g.expected,this.operator=g.operator,g.message?(this.message=g.message,this.generatedMessage=!1):(this.message=o(this),this.generatedMessage=!0);var _=g.stackStartFunction||p;if(Error.captureStackTrace)Error.captureStackTrace(this,_);else{var $=Error();if($.stack){var x=$.stack,T=_.name,P=x.indexOf(\`
|
|
112
112
|
\`+T);if(P>=0){var D=x.indexOf(\`
|
|
113
|
-
\`,P+1);x=x.substring(D+1)}this.stack=x}}},r.inherits(l.AssertionError,Error),l.fail=p,l.ok=m,l.equal=function(g,_,$){g!=_&&p(g,_,$,"==",l.equal)},l.notEqual=function(g,_,$){g==_&&p(g,_,$,"!=",l.notEqual)},l.deepEqual=function(g,_,$){d(g,_)||p(g,_,$,"deepEqual",l.deepEqual)},l.notDeepEqual=function(g,_,$){d(g,_)&&p(g,_,$,"notDeepEqual",l.notDeepEqual)},l.strictEqual=function(g,_,$){g!==_&&p(g,_,$,"===",l.strictEqual)},l.notStrictEqual=function(g,_,$){g===_&&p(g,_,$,"!==",l.notStrictEqual)},l.throws=function(g,_,$){v.apply(this,[!0].concat(a.call(arguments)))},l.doesNotThrow=function(g,_){v.apply(this,[!1].concat(a.call(arguments)))},l.ifError=function(g){if(g)throw g};var w=Object.keys||function(g){var _=[];for(var $ in g)i.call(g,$)&&_.push($);return _}},{"util/":11}],9:[function(n,e,t){typeof Object.create=="function"?e.exports=function(r,a){r.super_=a,r.prototype=Object.create(a.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(r,a){r.super_=a;var i=function(){};i.prototype=a.prototype,r.prototype=new i,r.prototype.constructor=r}},{}],10:[function(n,e,t){e.exports=function(r){return r&&typeof r=="object"&&typeof r.copy=="function"&&typeof r.fill=="function"&&typeof r.readUInt8=="function"}},{}],11:[function(n,e,t){(function(r,a){var i,l=/%[sdj%]/g;t.format=function(k){if(!P(k)){for(var O=[],N=0;N<arguments.length;N++)O.push(u(arguments[N]));return O.join(" ")}for(var N=1,K=arguments,se=K.length,te=String(k).replace(l,function(re){if(re==="%%")return"%";if(N>=se)return re;switch(re){case"%s":return String(K[N++]);case"%d":return Number(K[N++]);case"%j":try{return JSON.stringify(K[N++])}catch{return"[Circular]"}default:return re}}),J=K[N];N<se;J=K[++N])$(J)||!F(J)?te+=" "+J:te+=" "+u(J);return te},t.deprecate=function(k,O){if(R(a.process))return function(){return t.deprecate(k,O).apply(this,arguments)};if(r.noDeprecation===!0)return k;var N=!1;return function(){if(!N){if(r.throwDeprecation)throw Error(O);r.traceDeprecation?console.trace(O):console.error(O),N=!0}return k.apply(this,arguments)}};var s={};function u(k,O){var N={seen:[],stylize:p};return arguments.length>=3&&(N.depth=arguments[2]),arguments.length>=4&&(N.colors=arguments[3]),_(O)?N.showHidden=O:O&&t._extend(N,O),R(N.showHidden)&&(N.showHidden=!1),R(N.depth)&&(N.depth=2),R(N.colors)&&(N.colors=!1),R(N.customInspect)&&(N.customInspect=!0),N.colors&&(N.stylize=o),d(N,k,N.depth)}function o(k,O){var N=u.styles[O];return N?"\\x1B["+u.colors[N][0]+"m"+k+"\\x1B["+u.colors[N][1]+"m":k}function p(k,O){return k}function m(k){var O={};return k.forEach(function(N,K){O[N]=!0}),O}function d(k,O,N){if(k.customInspect&&O&&V(O.inspect)&&O.inspect!==t.inspect&&!(O.constructor&&O.constructor.prototype===O)){var K,se=O.inspect(N,k);return P(se)||(se=d(k,se,N)),se}var te=y(k,O);if(te)return te;var J=Object.keys(O),ce=m(J);if(k.showHidden&&(J=Object.getOwnPropertyNames(O)),B(O)&&(J.indexOf("message")>=0||J.indexOf("description")>=0))return f(O);if(J.length===0){if(V(O)){var re=O.name?": "+O.name:"";return k.stylize("[Function"+re+"]","special")}if(I(O))return k.stylize(RegExp.prototype.toString.call(O),"regexp");if(C(O))return k.stylize(Date.prototype.toString.call(O),"date");if(B(O))return f(O)}var fe="",
|
|
113
|
+
\`,P+1);x=x.substring(D+1)}this.stack=x}}},r.inherits(l.AssertionError,Error),l.fail=p,l.ok=m,l.equal=function(g,_,$){g!=_&&p(g,_,$,"==",l.equal)},l.notEqual=function(g,_,$){g==_&&p(g,_,$,"!=",l.notEqual)},l.deepEqual=function(g,_,$){d(g,_)||p(g,_,$,"deepEqual",l.deepEqual)},l.notDeepEqual=function(g,_,$){d(g,_)&&p(g,_,$,"notDeepEqual",l.notDeepEqual)},l.strictEqual=function(g,_,$){g!==_&&p(g,_,$,"===",l.strictEqual)},l.notStrictEqual=function(g,_,$){g===_&&p(g,_,$,"!==",l.notStrictEqual)},l.throws=function(g,_,$){v.apply(this,[!0].concat(a.call(arguments)))},l.doesNotThrow=function(g,_){v.apply(this,[!1].concat(a.call(arguments)))},l.ifError=function(g){if(g)throw g};var w=Object.keys||function(g){var _=[];for(var $ in g)i.call(g,$)&&_.push($);return _}},{"util/":11}],9:[function(n,e,t){typeof Object.create=="function"?e.exports=function(r,a){r.super_=a,r.prototype=Object.create(a.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(r,a){r.super_=a;var i=function(){};i.prototype=a.prototype,r.prototype=new i,r.prototype.constructor=r}},{}],10:[function(n,e,t){e.exports=function(r){return r&&typeof r=="object"&&typeof r.copy=="function"&&typeof r.fill=="function"&&typeof r.readUInt8=="function"}},{}],11:[function(n,e,t){(function(r,a){var i,l=/%[sdj%]/g;t.format=function(k){if(!P(k)){for(var O=[],N=0;N<arguments.length;N++)O.push(u(arguments[N]));return O.join(" ")}for(var N=1,K=arguments,se=K.length,te=String(k).replace(l,function(re){if(re==="%%")return"%";if(N>=se)return re;switch(re){case"%s":return String(K[N++]);case"%d":return Number(K[N++]);case"%j":try{return JSON.stringify(K[N++])}catch{return"[Circular]"}default:return re}}),J=K[N];N<se;J=K[++N])$(J)||!F(J)?te+=" "+J:te+=" "+u(J);return te},t.deprecate=function(k,O){if(R(a.process))return function(){return t.deprecate(k,O).apply(this,arguments)};if(r.noDeprecation===!0)return k;var N=!1;return function(){if(!N){if(r.throwDeprecation)throw Error(O);r.traceDeprecation?console.trace(O):console.error(O),N=!0}return k.apply(this,arguments)}};var s={};function u(k,O){var N={seen:[],stylize:p};return arguments.length>=3&&(N.depth=arguments[2]),arguments.length>=4&&(N.colors=arguments[3]),_(O)?N.showHidden=O:O&&t._extend(N,O),R(N.showHidden)&&(N.showHidden=!1),R(N.depth)&&(N.depth=2),R(N.colors)&&(N.colors=!1),R(N.customInspect)&&(N.customInspect=!0),N.colors&&(N.stylize=o),d(N,k,N.depth)}function o(k,O){var N=u.styles[O];return N?"\\x1B["+u.colors[N][0]+"m"+k+"\\x1B["+u.colors[N][1]+"m":k}function p(k,O){return k}function m(k){var O={};return k.forEach(function(N,K){O[N]=!0}),O}function d(k,O,N){if(k.customInspect&&O&&V(O.inspect)&&O.inspect!==t.inspect&&!(O.constructor&&O.constructor.prototype===O)){var K,se=O.inspect(N,k);return P(se)||(se=d(k,se,N)),se}var te=y(k,O);if(te)return te;var J=Object.keys(O),ce=m(J);if(k.showHidden&&(J=Object.getOwnPropertyNames(O)),B(O)&&(J.indexOf("message")>=0||J.indexOf("description")>=0))return f(O);if(J.length===0){if(V(O)){var re=O.name?": "+O.name:"";return k.stylize("[Function"+re+"]","special")}if(I(O))return k.stylize(RegExp.prototype.toString.call(O),"regexp");if(C(O))return k.stylize(Date.prototype.toString.call(O),"date");if(B(O))return f(O)}var fe="",Ae=!1,Ie=["{","}"];return g(O)&&(Ae=!0,Ie=["[","]"]),V(O)&&(fe=" [Function"+(O.name?": "+O.name:"")+"]"),I(O)&&(fe=" "+RegExp.prototype.toString.call(O)),C(O)&&(fe=" "+Date.prototype.toUTCString.call(O)),B(O)&&(fe=" "+f(O)),J.length!==0||Ae&&O.length!=0?N<0?I(O)?k.stylize(RegExp.prototype.toString.call(O),"regexp"):k.stylize("[Object]","special"):(k.seen.push(O),K=Ae?S(k,O,N,ce,J):J.map(function(Er){return v(k,O,N,ce,Er,Ae)}),k.seen.pop(),w(K,fe,Ie)):Ie[0]+fe+Ie[1]}function y(k,O){if(R(O))return k.stylize("undefined","undefined");if(P(O)){var N="'"+JSON.stringify(O).replace(/^"|"$/g,"").replace(/'/g,"\\\\'").replace(/\\\\"/g,'"')+"'";return k.stylize(N,"string")}return T(O)?k.stylize(""+O,"number"):_(O)?k.stylize(""+O,"boolean"):$(O)?k.stylize("null","null"):void 0}function f(k){return"["+Error.prototype.toString.call(k)+"]"}function S(k,O,N,K,se){for(var te=[],J=0,ce=O.length;J<ce;++J)ee(O,String(J))?te.push(v(k,O,N,K,String(J),!0)):te.push("");return se.forEach(function(re){re.match(/^\\d+$/)||te.push(v(k,O,N,K,re,!0))}),te}function v(k,O,N,K,se,te){var J,ce,re;if((re=Object.getOwnPropertyDescriptor(O,se)||{value:O[se]}).get?ce=re.set?k.stylize("[Getter/Setter]","special"):k.stylize("[Getter]","special"):re.set&&(ce=k.stylize("[Setter]","special")),ee(K,se)||(J="["+se+"]"),!ce&&(0>k.seen.indexOf(re.value)?(ce=$(N)?d(k,re.value,null):d(k,re.value,N-1)).indexOf(\`
|
|
114
114
|
\`)>-1&&(ce=te?ce.split(\`
|
|
115
115
|
\`).map(function(fe){return" "+fe}).join(\`
|
|
116
116
|
\`).substr(2):\`
|
|
@@ -119,7 +119,7 @@ Expecting \`+ve.join(", ")+", got '"+(this.terminals_[R]||R)+"'":"Parse error on
|
|
|
119
119
|
\`)):ce=k.stylize("[Circular]","special")),R(J)){if(te&&se.match(/^\\d+$/))return ce;(J=JSON.stringify(""+se)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(J=J.substr(1,J.length-2),J=k.stylize(J,"name")):(J=J.replace(/'/g,"\\\\'").replace(/\\\\"/g,'"').replace(/(^"|"$)/g,"'"),J=k.stylize(J,"string"))}return J+": "+ce}function w(k,O,N){var K=0;return k.reduce(function(se,te){return K++,te.indexOf(\`
|
|
120
120
|
\`)>=0&&K++,se+te.replace(/\\u001b\\[\\d\\d?m/g,"").length+1},0)>60?N[0]+(O===""?"":O+\`
|
|
121
121
|
\`)+" "+k.join(\`,
|
|
122
|
-
\`)+" "+N[1]:N[0]+O+" "+k.join(", ")+" "+N[1]}function g(k){return Array.isArray(k)}function _(k){return typeof k=="boolean"}function $(k){return k===null}function x(k){return k==null}function T(k){return typeof k=="number"}function P(k){return typeof k=="string"}function D(k){return typeof k=="symbol"}function R(k){return k===void 0}function I(k){return F(k)&&le(k)==="[object RegExp]"}function F(k){return typeof k=="object"&&k!==null}function C(k){return F(k)&&le(k)==="[object Date]"}function B(k){return F(k)&&(le(k)==="[object Error]"||k instanceof Error)}function V(k){return typeof k=="function"}function X(k){return k===null||typeof k=="boolean"||typeof k=="number"||typeof k=="string"||typeof k=="symbol"||k===void 0}function le(k){return Object.prototype.toString.call(k)}function ve(k){return k<10?"0"+k.toString(10):k.toString(10)}t.debuglog=function(k){if(R(i)&&(i=r.env.NODE_DEBUG||""),!s[k=k.toUpperCase()])if(RegExp("\\\\b"+k+"\\\\b","i").test(i)){var O=r.pid;s[k]=function(){var N=t.format.apply(t,arguments);console.error("%s %d: %s",k,O,N)}}else s[k]=function(){};return s[k]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=g,t.isBoolean=_,t.isNull=$,t.isNullOrUndefined=x,t.isNumber=T,t.isString=P,t.isSymbol=D,t.isUndefined=R,t.isRegExp=I,t.isObject=F,t.isDate=C,t.isError=B,t.isFunction=V,t.isPrimitive=X,t.isBuffer=n("./support/isBuffer");var H=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ie(){var k=new Date,O=[ve(k.getHours()),ve(k.getMinutes()),ve(k.getSeconds())].join(":");return[k.getDate(),H[k.getMonth()],O].join(" ")}function ee(k,O){return Object.prototype.hasOwnProperty.call(k,O)}t.log=function(){console.log("%s - %s",ie(),t.format.apply(t,arguments))},t.inherits=n("inherits"),t._extend=function(k,O){if(!O||!F(O))return k;for(var N=Object.keys(O),K=N.length;K--;)k[N[K]]=O[N[K]];return k}}).call(this,n("_process"),oe!==void 0?oe:typeof self<"u"?self:typeof window<"u"?window:{})},{"./support/isBuffer":10,_process:14,inherits:9}],12:[function(n,e,t){},{}],13:[function(n,e,t){(function(r){function a(u,o){for(var p=0,m=u.length-1;m>=0;m--){var d=u[m];d==="."?u.splice(m,1):d===".."?(u.splice(m,1),p++):p&&(u.splice(m,1),p--)}if(o)for(;p--;p)u.unshift("..");return u}function i(u){typeof u!="string"&&(u+="");var o,p=0,m=-1,d=!0;for(o=u.length-1;o>=0;--o)if(u.charCodeAt(o)===47){if(!d){p=o+1;break}}else m===-1&&(d=!1,m=o+1);return m===-1?"":u.slice(p,m)}function l(u,o){if(u.filter)return u.filter(o);for(var p=[],m=0;m<u.length;m++)o(u[m],m,u)&&p.push(u[m]);return p}t.resolve=function(){for(var u="",o=!1,p=arguments.length-1;p>=-1&&!o;p--){var m=p>=0?arguments[p]:r.cwd();if(typeof m!="string")throw TypeError("Arguments to path.resolve must be strings");m&&(u=m+"/"+u,o=m.charAt(0)==="/")}return u=a(l(u.split("/"),function(d){return!!d}),!o).join("/"),(o?"/":"")+u||"."},t.normalize=function(u){var o=t.isAbsolute(u),p=s(u,-1)==="/";return(u=a(l(u.split("/"),function(m){return!!m}),!o).join("/"))||o||(u="."),u&&p&&(u+="/"),(o?"/":"")+u},t.isAbsolute=function(u){return u.charAt(0)==="/"},t.join=function(){var u=Array.prototype.slice.call(arguments,0);return t.normalize(l(u,function(o,p){if(typeof o!="string")throw TypeError("Arguments to path.join must be strings");return o}).join("/"))},t.relative=function(u,o){function p(w){for(var g=0;g<w.length&&w[g]==="";g++);for(var _=w.length-1;_>=0&&w[_]==="";_--);return g>_?[]:w.slice(g,_-g+1)}u=t.resolve(u).substr(1),o=t.resolve(o).substr(1);for(var m=p(u.split("/")),d=p(o.split("/")),y=Math.min(m.length,d.length),f=y,S=0;S<y;S++)if(m[S]!==d[S]){f=S;break}for(var v=[],S=f;S<m.length;S++)v.push("..");return(v=v.concat(d.slice(f))).join("/")},t.sep="/",t.delimiter=":",t.dirname=function(u){if(typeof u!="string"&&(u+=""),u.length===0)return".";for(var o=u.charCodeAt(0),p=o===47,m=-1,d=!0,y=u.length-1;y>=1;--y)if((o=u.charCodeAt(y))===47){if(!d){m=y;break}}else d=!1;return m===-1?p?"/":".":p&&m===1?"/":u.slice(0,m)},t.basename=function(u,o){var p=i(u);return o&&p.substr(-1*o.length)===o&&(p=p.substr(0,p.length-o.length)),p},t.extname=function(u){typeof u!="string"&&(u+="");for(var o=-1,p=0,m=-1,d=!0,y=0,f=u.length-1;f>=0;--f){var S=u.charCodeAt(f);if(S===47){if(!d){p=f+1;break}continue}m===-1&&(d=!1,m=f+1),S===46?o===-1?o=f:y!==1&&(y=1):o!==-1&&(y=-1)}return o===-1||m===-1||y===0||y===1&&o===m-1&&o===p+1?"":u.slice(o,m)};var s="ab".substr(-1)==="b"?function(u,o,p){return u.substr(o,p)}:function(u,o,p){return o<0&&(o=u.length+o),u.substr(o,p)}}).call(this,n("_process"))},{_process:14}],14:[function(n,e,t){var r,a,i,l=e.exports={};function s(){throw Error("setTimeout has not been defined")}function u(){throw Error("clearTimeout has not been defined")}function o(g){if(r===setTimeout)return setTimeout(g,0);if((r===s||!r)&&setTimeout)return r=setTimeout,setTimeout(g,0);try{return r(g,0)}catch{try{return r.call(null,g,0)}catch{return r.call(this,g,0)}}}function p(g){if(a===clearTimeout)return clearTimeout(g);if((a===u||!a)&&clearTimeout)return a=clearTimeout,clearTimeout(g);try{return a(g)}catch{try{return a.call(null,g)}catch{return a.call(this,g)}}}(function(){try{r=typeof setTimeout=="function"?setTimeout:s}catch{r=s}try{a=typeof clearTimeout=="function"?clearTimeout:u}catch{a=u}})();var m=[],d=!1,y=-1;function f(){d&&i&&(d=!1,i.length?m=i.concat(m):y=-1,m.length&&S())}function S(){if(!d){var g=o(f);d=!0;for(var _=m.length;_;){for(i=m,m=[];++y<_;)i&&i[y].run();y=-1,_=m.length}i=null,d=!1,p(g)}}function v(g,_){this.fun=g,this.array=_}function w(){}l.nextTick=function(g){var _=Array(arguments.length-1);if(arguments.length>1)for(var $=1;$<arguments.length;$++)_[$-1]=arguments[$];m.push(new v(g,_)),m.length!==1||d||o(S)},v.prototype.run=function(){this.fun.apply(null,this.array)},l.title="browser",l.browser=!0,l.env={},l.argv=[],l.version="",l.versions={},l.on=w,l.addListener=w,l.once=w,l.off=w,l.removeListener=w,l.removeAllListeners=w,l.emit=w,l.prependListener=w,l.prependOnceListener=w,l.listeners=function(g){return[]},l.binding=function(g){throw Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(g){throw Error("process.chdir is not supported")},l.umask=function(){return 0}},{}],15:[function(n,e,t){var r=n("escodegen").generate;e.exports=function(a,i){i||(i={});var l={},s=function u(o,p){if(o.type==="Literal")return o.value;if(o.type==="UnaryExpression"){var m=u(o.argument);return o.operator==="+"?+m:o.operator==="-"?-m:o.operator==="~"?~m:o.operator==="!"?!m:l}if(o.type==="ArrayExpression"){for(var d=[],y=0,f=o.elements.length;y<f;y++){var S=u(o.elements[y]);if(S===l)return l;d.push(S)}return d}if(o.type==="ObjectExpression"){for(var v={},y=0;y<o.properties.length;y++){var w=o.properties[y],g=w.value===null?w.value:u(w.value);if(g===l)return l;v[w.key.value||w.key.name]=g}return v}if(o.type==="BinaryExpression"||o.type==="LogicalExpression"){var f=u(o.left);if(f===l)return l;var _=u(o.right);if(_===l)return l;var $=o.operator;return $==="=="?f==_:$==="==="?f===_:$==="!="?f!=_:$==="!=="?f!==_:$==="+"?f+_:$==="-"?f-_:$==="*"?f*_:$==="/"?f/_:$==="%"?f%_:$==="<"?f<_:$==="<="?f<=_:$===">"?f>_:$===">="?f>=_:$==="|"?f|_:$==="&"?f&_:$==="^"?f^_:$==="&&"?f&&_:$==="||"?f||_:l}if(o.type==="Identifier")return{}.hasOwnProperty.call(i,o.name)?i[o.name]:l;if(o.type==="ThisExpression")return{}.hasOwnProperty.call(i,"this")?i.this:l;if(o.type==="CallExpression"){var x=u(o.callee);if(x===l||typeof x!="function")return l;var T=o.callee.object?u(o.callee.object):l;T===l&&(T=null);for(var P=[],y=0,f=o.arguments.length;y<f;y++){var S=u(o.arguments[y]);if(S===l)return l;P.push(S)}return x.apply(T,P)}else if(o.type==="MemberExpression"){var v=u(o.object);if(v===l||typeof v=="function")return l;if(o.property.type==="Identifier")return v[o.property.name];var w=u(o.property);return w===l?l:v[w]}else if(o.type==="ConditionalExpression"){var m=u(o.test);return m===l?l:u(m?o.consequent:o.alternate)}else if(o.type==="ExpressionStatement"){var m=u(o.expression);return m===l?l:m}else{if(o.type==="ReturnStatement")return u(o.argument);if(o.type==="FunctionExpression"){var D=o.body.body,R={};Object.keys(i).forEach(function(H){R[H]=i[H]});for(var y=0;y<o.params.length;y++){var I=o.params[y];if(I.type!="Identifier")return l;i[I.name]=null}for(var y in D)if(u(D[y])===l)return l;var F=Object.keys(i=R),C=F.map(function(H){return i[H]});return Function(F.join(", "),"return "+r(o)).apply(null,C)}else if(o.type==="TemplateLiteral"){for(var B="",y=0;y<o.expressions.length;y++)B+=u(o.quasis[y]),B+=u(o.expressions[y]);return B+u(o.quasis[y])}else if(o.type==="TaggedTemplateExpression"){var V=u(o.tag),X=o.quasi,le=X.quasis.map(u),ve=X.expressions.map(u);return V.apply(null,[le].concat(ve))}else return o.type==="TemplateElement"?o.value.cooked:l}}(a);return s===l?void 0:s}},{escodegen:12}],jsonpath:[function(n,e,t){e.exports=n("./lib/index")},{"./lib/index":5}]},{},["jsonpath"])("jsonpath")});class Bs{constructor(e){this._itemsMap={},e.forEach((t,r)=>{this._itemsMap[t.item_id]=r})}pullItemIndex(e){let t=this._itemsMap[e];return delete this._itemsMap[e],t}getItemIndex(e){return this._itemsMap[e]}get itemsMap(){return this._itemsMap}}function Us(n,e){let t,r=[];n?t=n.split(","):r=e;let a=new Set;function i(l){let s=!a.has(l);return s&&a.add(l),s}return n&&e.forEach(l=>{let s="";t.forEach((u,o)=>{let p=l.fields.find(m=>m.field_id==u);p&&(s+=p.field_value),t.length-1==o&&i(s)&&r.push(l)})}),r}function Gs(n,e,t){var r=JSON.parse(JSON.stringify(n));return t?Ws(r,e):Hs(r,e)}function Ws(n,e){return n.forEach(t=>{e.forEach(r=>{let a=t.fields.find(i=>i.element_id==r.element_id);a?a.field_value=r.field_value:(r.field_id=r.element_id,t.fields.push(r))})}),n}function Hs(n,e){return n.forEach(t=>{t.fields=[].concat(e)}),n}var Z={},dt=A("f3Ywx"),et=dt.default;Object.defineProperty(Z,"__esModule",{value:!0}),Z.default=Xs;var zs=et(A("5ZWAZ")),Vs=et(A("fgq5y")),Js=et(A("byyO9")),Ys=et(A("glRwo")),Qs=et(A("ayR3G")),Ye=et(A("a9VQw"));function Xs(n,e){if((0,Qs.default)(2,arguments),!e||(0,zs.default)(e)!=="object")return new Date(NaN);var t=e.years?(0,Ye.default)(e.years):0,r=e.months?(0,Ye.default)(e.months):0,a=e.weeks?(0,Ye.default)(e.weeks):0,i=e.days?(0,Ye.default)(e.days):0,l=e.hours?(0,Ye.default)(e.hours):0,s=e.minutes?(0,Ye.default)(e.minutes):0,u=e.seconds?(0,Ye.default)(e.seconds):0,o=(0,Ys.default)(n),p=r||t?(0,Js.default)(o,r+12*t):o,m=i||a?(0,Vs.default)(p,i+7*a):p,d=1e3*(u+60*(s+60*l));return new Date(m.getTime()+d)}Z=Z.default;var xe={},dt=A("f3Ywx"),Ct=dt.default;Object.defineProperty(xe,"__esModule",{value:!0}),xe.default=ro;var Ks=Ct(A("fgq5y")),Zs=Ct(A("glRwo")),Dn=Ct(A("a9VQw")),eo=Ct(A("ayR3G")),to=A("lmyOi");function ro(n,e,t){(0,eo.default)(2,arguments);var r,a,i,l,s,u,o,p,m=(0,to.getDefaultOptions)(),d=(0,Dn.default)((r=(a=(i=(l=t==null?void 0:t.weekStartsOn)!==null&&l!==void 0?l:t==null||(s=t.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&i!==void 0?i:m.weekStartsOn)!==null&&a!==void 0?a:(o=m.locale)===null||o===void 0||(p=o.options)===null||p===void 0?void 0:p.weekStartsOn)!==null&&r!==void 0?r:0);if(!(d>=0&&d<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");var y=(0,Zs.default)(n),f=(0,Dn.default)(e),S=y.getDay(),v=(f%7+7)%7,w=7-d,g=f<0||f>6?f-(S+w)%7:(v+w)%7-(S+w)%7;return(0,Ks.default)(y,g)}xe=xe.default;var pt={},dt=A("f3Ywx"),qn=dt.default;Object.defineProperty(pt,"__esModule",{value:!0}),pt.default=ao;var Bn=qn(A("hLz6R")),no=qn(A("ayR3G"));function ao(n,e,t){(0,no.default)(2,arguments);var r=(0,Bn.default)(n,t),a=(0,Bn.default)(e,t);return r.getTime()===a.getTime()}function io(n,e){return n.forEach(t=>{e.forEach(r=>{let a=t.fields.find(i=>i.element_id==r.element_id);a?r.data_range?(r.date_type.includes("calendar"),a.field_value=\`\${so(r.date_type)}:\${Nt(r.date_type)}\`):a.field_value=Nt(r.date_type):t.fields.push({field_id:r.element_id,element_id:r.element_id,field_value:Nt(r.date_type)})})}),n}function so(n){let e=new Date;function t(a){let i;var l=a.getDay();n.includes("week_current,current")&&(i=0),n.includes("week_next,future")&&(i=7),n.includes("week_past,past")&&(i=-7);let s=a.getDate()-l+i+(l==0?-6:1);return new Date(a.setDate(s))}function r(a){let i,l,s=Math.floor(a.getMonth()/3),u=a.getFullYear();return n.includes("quarter_current,current")&&(i=0,l=0),n.includes("quarter_next,future")&&(i=3,l=0),n.includes("quarter_past,past")&&(i=-3,l=0),new Date(u,3*s+i,1+l)}switch(n){case"week_current,current":case"week_next,future":case"week_past,past":return t(new Date).getTime();case"month_current,current":return new Date(e.getFullYear(),e.getMonth(),1).getTime();case"quarter_current,current":case"quarter_next,future":case"quarter_past,past":return r(new Date).getTime();case"year_current,current":return G(Z)(new Date(e.getFullYear(),0,1),{years:0}).getTime();case"month_next,future":return new Date(e.getFullYear(),e.getMonth()+1,1).getTime();case"year_next,future":case"today_current,current":case"7_days_future,future":case"10_days_future,future":case"14_days_future,future":case"30_days_future,future":return G(Z)(e,{days:0}).getTime();case"month_past,past":return new Date(e.getFullYear(),e.getMonth()-1,1).getTime();case"year_past,past":return G(Z)(e,{years:-1}).getTime();case"year_past,past,calendar":return G(Z)(new Date(e.getFullYear(),0,1),{years:-1}).getTime();case"year_future,future,calendar":return G(Z)(new Date(e.getFullYear()+1,0,1),{years:0}).getTime();case"tomorrow,future":return G(Z)(e,{days:1}).getTime();case"yesterday,past":return G(Z)(e,{days:-1}).getTime();case"7_days_past,past":return G(Z)(e,{days:-7}).getTime();case"10_days_past,past":return G(Z)(e,{days:-10}).getTime();case"14_days_past,past":return G(Z)(e,{days:-14}).getTime();case"30_days_past,past":return G(Z)(e,{days:-30}).getTime()}}function Nt(n){var e=new Date;function t(s){var u=(s=new Date(s)).getDay(),o=s.getDate()-u+6+(u==0?6:1);return new Date(s.setDate(o))}function r(s){var u=(s=new Date(s)).getDay(),o=s.getDate()-u+13+(u==0?-6:1);return new Date(s.setDate(o))}function a(s){var u=(s=new Date(s)).getDay(),o=s.getDate()-u-1+(u==0?-6:1);return new Date(s.setDate(o))}let i=Math.floor(e.getMonth()/3),l=e.getFullYear();switch(n){case"next_day":case"tomorrow,future":return G(Z)(e,{days:1}).getTime();case"two_days_after":return G(Z)(e,{days:2}).getTime();case"three_days_after":return G(Z)(e,{days:3}).getTime();case"four_days_after":return G(Z)(e,{days:4}).getTime();case"next_week":return G(Z)(e,{weeks:1}).getTime();case"two_weeks_after":return G(Z)(e,{weeks:2}).getTime();case"three_weeks_after":return G(Z)(e,{weeks:3}).getTime();case"this_sunday":return G(xe)(e,0,{weekStartsOn:1});case"this_monday":return G(xe)(e,1,{weekStartsOn:1});case"this_tuesday":return G(xe)(e,2,{weekStartsOn:1});case"this_wednesday":return G(xe)(e,3,{weekStartsOn:1});case"this_thursday":return G(xe)(e,4,{weekStartsOn:1});case"this_friday":return G(xe)(e,5,{weekStartsOn:1});case"this_saturday":return G(xe)(e,6,{weekStartsOn:1});case"today_current,current":case"7_days_past,past":case"10_days_past,past":case"14_days_past,past":case"30_days_past,past":case"year_past,past":return G(Z)(e,{days:0}).getTime();case"7_days_future,future":return G(Z)(e,{days:7}).getTime();case"10_days_future,future":return G(Z)(e,{days:10}).getTime();case"14_days_future,future":return G(Z)(e,{days:14}).getTime();case"30_days_future,future":return G(Z)(e,{days:30}).getTime();case"yesterday,past":return G(Z)(e,{days:-1}).getTime();case"year_future,future,calendar":return G(Z)(new Date(e.getFullYear()+1,0,0),{years:1}).getTime();case"year_past,past,calendar":return G(Z)(new Date(e.getFullYear(),0,0),{years:0}).getTime();case"week_current,current":return t(new Date).getTime();case"month_current,current":return new Date(e.getFullYear(),e.getMonth()+1,0).getTime();case"quarter_current,current":return new Date(l,(i+1)*3,0).getTime();case"year_current,current":return G(Z)(new Date(e.getFullYear()+1,0,0),{years:0}).getTime();case"week_next,future":return r(new Date).getTime();case"month_next,future":return new Date(e.getFullYear(),e.getMonth()+2,0).getTime();case"quarter_next,future":return new Date(l,(i+1)*3+3,0).getTime();case"year_next,future":return G(Z)(e,{years:1}).getTime();case"week_past,past":return a(new Date).getTime();case"month_past,past":return new Date(e.getFullYear(),e.getMonth(),0,0).getTime();case"quarter_past,past":return new Date(l,(i+1)*3-3,0).getTime();default:return e.getTime()}}function oo(n,e){n=new Date(n);let t=new Date;switch(e){case"day":return n.getDate()+"."+n.getMonth()==t.getDate()+"."+t.getMonth();case"week":let r=new Date(new Date().getFullYear(),n.getMonth(),n.getDate());return G(pt)(r,t);case"month":return n.getMonth()===t.getMonth();default:return!0}}function lo(n,e,t){return tt(n,e,t)}function Mt(n){return n&&typeof n=="object"&&Object.prototype.toString.call(n)!=="[object RegExp]"&&Object.prototype.toString.call(n)!=="[object Date]"}function co(n){return Array.isArray(n)?[]:{}}function ft(n,e){return e&&e.clone===!0&&Mt(n)?tt(co(n),n,e):n}function Un(n,e,t){var r=n.slice();return e.forEach(function(a,i){r[i]===void 0?r[i]=ft(a,t):Mt(a)?r[i]=tt(n[i],a,t):n.indexOf(a)===-1&&r.push(ft(a,t))}),r}function uo(n,e,t){var r={};return Mt(n)&&Object.keys(n).forEach(function(a){r[a]=ft(n[a],t)}),Object.keys(e).forEach(function(a){Mt(e[a])&&n[a]?r[a]=tt(n[a],e[a],t):r[a]=ft(e[a],t)}),r}function tt(n,e,t){n=n!==void 0?n:{};var r=Array.isArray(e=e!==void 0?e:{}),a=(t||{arrayMerge:Un}).arrayMerge||Un;return r?Array.isArray(n)?a(n,e,t):ft(e,t):uo(n,e,t)}function Gn(n){let e={};return n.forEach(t=>{t.items_list.forEach(r=>{let a=e[r.item_id];return a?(a.trash=r.trash,r.fields.forEach(i=>{let l=!0;a.fields=a.fields.map(s=>Number(s.field_id)===Number(i.field_id)&&(l=!1,s.field_value!=i.field_value)?{...i,history:i.history.concat(s.history)}:s),l&&a.fields.push(i)})):e[r.item_id]=r})}),Object.values(e)}function po(n){return Gn(n)}function fo(n,e,t,r,a){let i,l=JSON.parse(JSON.stringify(n)),s=r||"children",u=!!a&&a;for(i=0;i<l.length;i++)l[i][t]&&l[i][t]!==0&&l.forEach(m=>{l[i][t]==m[e]?(m[s]||(m[s]=[]),m[s].push(l[i]),l.splice(i,1),i==0?i=0:i--):m[s]&&o(m)});function o(m){m[s].forEach(d=>{d[e]==l[i][t]?(d[s]||(d[s]=[]),d[s].push(l[i]),l.splice(i,1),i==0?i=0:i--):d[s]&&o(d)})}function p(m){m.sort((d,y)=>d[u]-y[u]),m.forEach(d=>{d[s]&&p(d[s])})}return u&&p(l),l}pt=pt.default,tt.all=function(n,e){if(!Array.isArray(n)||n.length<2)throw Error("first argument should be an array with at least two elements");return n.reduce(function(t,r){return tt(t,r,e)})},self.onmessage=function(n){let e=Gn(n.data);self.postMessage(e)};class ho{constructor(e){this.gudhub=e}mergeFieldLists(e,t){let r=JSON.parse(JSON.stringify(e)),a=JSON.parse(JSON.stringify(t)),i=a.map(l=>l.field_id);return a.length?a.reduce((l,s)=>{let u=null;if(l.find((o,p)=>s.field_id==o.field_id&&(u=p,!0)))l[u]=this.gudhub.util.mergeObjects(l[u],s);else{let o=s.data_model&&s.data_model.interpretation&&s.data_model.interpretation.find(p=>p.src=="table")||{settings:{show_field:1}};if(o.settings.show_field){let p=this.gudhub.util.mergeObjects({show:1},o),m=this.gudhub.util.mergeObjects(p,s);l.push(m)}}return l},r).filter(function(l){return l.show&&i.indexOf(l.field_id)!=-1}):[]}createFieldsListToView(e,t){let r=this;return new Promise(async a=>{let i=await this.gudhub.getFieldModels(e);if(t.length!==0){let s=[];t.forEach((u,o)=>{let p=i.find(m=>u.field_id==m.field_id);p&&(p.data_model.interpretation.find(m=>m.src=="table"),s.push({field_id:p.field_id,show:u.show,width:u.width?u.width:"150px"})),o+1==t.length&&l(s)})}else l(t);function l(s){let u=0;i.forEach((o,p)=>{s.find(m=>o.field_id==m.field_id)?(u==i.length-1&&a(s),u++):r.gudhub.ghconstructor.getInstance(o.data_type).then(m=>{if(m){let d=m.getTemplate().model.data_model.interpretation.find(y=>y.src=="table");d||(d={settings:{show_field:1}}),s.push({field_id:o.field_id,show:d.settings.show_field}),u==i.length-1&&a(s)}u++},function(m){u++})})}})}createFieldsListToViewWithDataType(e,t){return new Promise(async r=>{let a=[],i=await this.gudhub.getFieldModels(e),l=i.map(u=>+u.field_id),s=[];a=i.reduce((u,o)=>(u.find((p,m)=>o.field_id==p.field_id)||(u.push({field_id:o.field_id,data_type:o.data_type}),s.push(new Promise(async p=>{let m=(await this.gudhub.ghconstructor.getInstance(o.data_type)).getTemplate().model.data_model.interpretation.find(d=>d.src=="table")||{settings:{show_field:1}};u.find(d=>d.field_id==o.field_id).show=m.settings.show_field,p(!0)}))),u),t),Promise.all(s).then(()=>{r(a=a.filter(u=>l.indexOf(u.field_id)!=-1))})})}}class mo{constructor(e){this.gudhub=e,this.selectedItems={}}async selectItems(e,t){if(!this.selectedItems.hasOwnProperty(e)){this.selectedItems[e]={items:[],app:[]};let i=await this.gudhub.getApp(e);this.selectedItems[e].app=i}let r=this.selectedItems[e],a=r.items.map(i=>i.item_id);t.forEach(i=>{a.indexOf(i.item_id)!=-1?r.items.splice(a.indexOf(i.item_id),1):r.items[r.items.length]=i})}getSelectedItems(e){return this.selectedItems[e]?this.selectedItems[e]:{items:[],app:[]}}clearSelectedItems(e){this.selectedItems[e]&&(this.selectedItems[e].items=[])}isItemSelected(e,t){let r=this.getSelectedItems(e);return r!==null&&(r=r.items.map(a=>a.item_id)).indexOf(t)!=-1}}function go(){return\`function createList(items) {
|
|
122
|
+
\`)+" "+N[1]:N[0]+O+" "+k.join(", ")+" "+N[1]}function g(k){return Array.isArray(k)}function _(k){return typeof k=="boolean"}function $(k){return k===null}function x(k){return k==null}function T(k){return typeof k=="number"}function P(k){return typeof k=="string"}function D(k){return typeof k=="symbol"}function R(k){return k===void 0}function I(k){return F(k)&&oe(k)==="[object RegExp]"}function F(k){return typeof k=="object"&&k!==null}function C(k){return F(k)&&oe(k)==="[object Date]"}function B(k){return F(k)&&(oe(k)==="[object Error]"||k instanceof Error)}function V(k){return typeof k=="function"}function X(k){return k===null||typeof k=="boolean"||typeof k=="number"||typeof k=="string"||typeof k=="symbol"||k===void 0}function oe(k){return Object.prototype.toString.call(k)}function we(k){return k<10?"0"+k.toString(10):k.toString(10)}t.debuglog=function(k){if(R(i)&&(i=r.env.NODE_DEBUG||""),!s[k=k.toUpperCase()])if(RegExp("\\\\b"+k+"\\\\b","i").test(i)){var O=r.pid;s[k]=function(){var N=t.format.apply(t,arguments);console.error("%s %d: %s",k,O,N)}}else s[k]=function(){};return s[k]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=g,t.isBoolean=_,t.isNull=$,t.isNullOrUndefined=x,t.isNumber=T,t.isString=P,t.isSymbol=D,t.isUndefined=R,t.isRegExp=I,t.isObject=F,t.isDate=C,t.isError=B,t.isFunction=V,t.isPrimitive=X,t.isBuffer=n("./support/isBuffer");var H=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ie(){var k=new Date,O=[we(k.getHours()),we(k.getMinutes()),we(k.getSeconds())].join(":");return[k.getDate(),H[k.getMonth()],O].join(" ")}function ee(k,O){return Object.prototype.hasOwnProperty.call(k,O)}t.log=function(){console.log("%s - %s",ie(),t.format.apply(t,arguments))},t.inherits=n("inherits"),t._extend=function(k,O){if(!O||!F(O))return k;for(var N=Object.keys(O),K=N.length;K--;)k[N[K]]=O[N[K]];return k}}).call(this,n("_process"),le!==void 0?le:typeof self<"u"?self:typeof window<"u"?window:{})},{"./support/isBuffer":10,_process:14,inherits:9}],12:[function(n,e,t){},{}],13:[function(n,e,t){(function(r){function a(u,o){for(var p=0,m=u.length-1;m>=0;m--){var d=u[m];d==="."?u.splice(m,1):d===".."?(u.splice(m,1),p++):p&&(u.splice(m,1),p--)}if(o)for(;p--;p)u.unshift("..");return u}function i(u){typeof u!="string"&&(u+="");var o,p=0,m=-1,d=!0;for(o=u.length-1;o>=0;--o)if(u.charCodeAt(o)===47){if(!d){p=o+1;break}}else m===-1&&(d=!1,m=o+1);return m===-1?"":u.slice(p,m)}function l(u,o){if(u.filter)return u.filter(o);for(var p=[],m=0;m<u.length;m++)o(u[m],m,u)&&p.push(u[m]);return p}t.resolve=function(){for(var u="",o=!1,p=arguments.length-1;p>=-1&&!o;p--){var m=p>=0?arguments[p]:r.cwd();if(typeof m!="string")throw TypeError("Arguments to path.resolve must be strings");m&&(u=m+"/"+u,o=m.charAt(0)==="/")}return u=a(l(u.split("/"),function(d){return!!d}),!o).join("/"),(o?"/":"")+u||"."},t.normalize=function(u){var o=t.isAbsolute(u),p=s(u,-1)==="/";return(u=a(l(u.split("/"),function(m){return!!m}),!o).join("/"))||o||(u="."),u&&p&&(u+="/"),(o?"/":"")+u},t.isAbsolute=function(u){return u.charAt(0)==="/"},t.join=function(){var u=Array.prototype.slice.call(arguments,0);return t.normalize(l(u,function(o,p){if(typeof o!="string")throw TypeError("Arguments to path.join must be strings");return o}).join("/"))},t.relative=function(u,o){function p(w){for(var g=0;g<w.length&&w[g]==="";g++);for(var _=w.length-1;_>=0&&w[_]==="";_--);return g>_?[]:w.slice(g,_-g+1)}u=t.resolve(u).substr(1),o=t.resolve(o).substr(1);for(var m=p(u.split("/")),d=p(o.split("/")),y=Math.min(m.length,d.length),f=y,S=0;S<y;S++)if(m[S]!==d[S]){f=S;break}for(var v=[],S=f;S<m.length;S++)v.push("..");return(v=v.concat(d.slice(f))).join("/")},t.sep="/",t.delimiter=":",t.dirname=function(u){if(typeof u!="string"&&(u+=""),u.length===0)return".";for(var o=u.charCodeAt(0),p=o===47,m=-1,d=!0,y=u.length-1;y>=1;--y)if((o=u.charCodeAt(y))===47){if(!d){m=y;break}}else d=!1;return m===-1?p?"/":".":p&&m===1?"/":u.slice(0,m)},t.basename=function(u,o){var p=i(u);return o&&p.substr(-1*o.length)===o&&(p=p.substr(0,p.length-o.length)),p},t.extname=function(u){typeof u!="string"&&(u+="");for(var o=-1,p=0,m=-1,d=!0,y=0,f=u.length-1;f>=0;--f){var S=u.charCodeAt(f);if(S===47){if(!d){p=f+1;break}continue}m===-1&&(d=!1,m=f+1),S===46?o===-1?o=f:y!==1&&(y=1):o!==-1&&(y=-1)}return o===-1||m===-1||y===0||y===1&&o===m-1&&o===p+1?"":u.slice(o,m)};var s="ab".substr(-1)==="b"?function(u,o,p){return u.substr(o,p)}:function(u,o,p){return o<0&&(o=u.length+o),u.substr(o,p)}}).call(this,n("_process"))},{_process:14}],14:[function(n,e,t){var r,a,i,l=e.exports={};function s(){throw Error("setTimeout has not been defined")}function u(){throw Error("clearTimeout has not been defined")}function o(g){if(r===setTimeout)return setTimeout(g,0);if((r===s||!r)&&setTimeout)return r=setTimeout,setTimeout(g,0);try{return r(g,0)}catch{try{return r.call(null,g,0)}catch{return r.call(this,g,0)}}}function p(g){if(a===clearTimeout)return clearTimeout(g);if((a===u||!a)&&clearTimeout)return a=clearTimeout,clearTimeout(g);try{return a(g)}catch{try{return a.call(null,g)}catch{return a.call(this,g)}}}(function(){try{r=typeof setTimeout=="function"?setTimeout:s}catch{r=s}try{a=typeof clearTimeout=="function"?clearTimeout:u}catch{a=u}})();var m=[],d=!1,y=-1;function f(){d&&i&&(d=!1,i.length?m=i.concat(m):y=-1,m.length&&S())}function S(){if(!d){var g=o(f);d=!0;for(var _=m.length;_;){for(i=m,m=[];++y<_;)i&&i[y].run();y=-1,_=m.length}i=null,d=!1,p(g)}}function v(g,_){this.fun=g,this.array=_}function w(){}l.nextTick=function(g){var _=Array(arguments.length-1);if(arguments.length>1)for(var $=1;$<arguments.length;$++)_[$-1]=arguments[$];m.push(new v(g,_)),m.length!==1||d||o(S)},v.prototype.run=function(){this.fun.apply(null,this.array)},l.title="browser",l.browser=!0,l.env={},l.argv=[],l.version="",l.versions={},l.on=w,l.addListener=w,l.once=w,l.off=w,l.removeListener=w,l.removeAllListeners=w,l.emit=w,l.prependListener=w,l.prependOnceListener=w,l.listeners=function(g){return[]},l.binding=function(g){throw Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(g){throw Error("process.chdir is not supported")},l.umask=function(){return 0}},{}],15:[function(n,e,t){var r=n("escodegen").generate;e.exports=function(a,i){i||(i={});var l={},s=function u(o,p){if(o.type==="Literal")return o.value;if(o.type==="UnaryExpression"){var m=u(o.argument);return o.operator==="+"?+m:o.operator==="-"?-m:o.operator==="~"?~m:o.operator==="!"?!m:l}if(o.type==="ArrayExpression"){for(var d=[],y=0,f=o.elements.length;y<f;y++){var S=u(o.elements[y]);if(S===l)return l;d.push(S)}return d}if(o.type==="ObjectExpression"){for(var v={},y=0;y<o.properties.length;y++){var w=o.properties[y],g=w.value===null?w.value:u(w.value);if(g===l)return l;v[w.key.value||w.key.name]=g}return v}if(o.type==="BinaryExpression"||o.type==="LogicalExpression"){var f=u(o.left);if(f===l)return l;var _=u(o.right);if(_===l)return l;var $=o.operator;return $==="=="?f==_:$==="==="?f===_:$==="!="?f!=_:$==="!=="?f!==_:$==="+"?f+_:$==="-"?f-_:$==="*"?f*_:$==="/"?f/_:$==="%"?f%_:$==="<"?f<_:$==="<="?f<=_:$===">"?f>_:$===">="?f>=_:$==="|"?f|_:$==="&"?f&_:$==="^"?f^_:$==="&&"?f&&_:$==="||"?f||_:l}if(o.type==="Identifier")return{}.hasOwnProperty.call(i,o.name)?i[o.name]:l;if(o.type==="ThisExpression")return{}.hasOwnProperty.call(i,"this")?i.this:l;if(o.type==="CallExpression"){var x=u(o.callee);if(x===l||typeof x!="function")return l;var T=o.callee.object?u(o.callee.object):l;T===l&&(T=null);for(var P=[],y=0,f=o.arguments.length;y<f;y++){var S=u(o.arguments[y]);if(S===l)return l;P.push(S)}return x.apply(T,P)}else if(o.type==="MemberExpression"){var v=u(o.object);if(v===l||typeof v=="function")return l;if(o.property.type==="Identifier")return v[o.property.name];var w=u(o.property);return w===l?l:v[w]}else if(o.type==="ConditionalExpression"){var m=u(o.test);return m===l?l:u(m?o.consequent:o.alternate)}else if(o.type==="ExpressionStatement"){var m=u(o.expression);return m===l?l:m}else{if(o.type==="ReturnStatement")return u(o.argument);if(o.type==="FunctionExpression"){var D=o.body.body,R={};Object.keys(i).forEach(function(H){R[H]=i[H]});for(var y=0;y<o.params.length;y++){var I=o.params[y];if(I.type!="Identifier")return l;i[I.name]=null}for(var y in D)if(u(D[y])===l)return l;var F=Object.keys(i=R),C=F.map(function(H){return i[H]});return Function(F.join(", "),"return "+r(o)).apply(null,C)}else if(o.type==="TemplateLiteral"){for(var B="",y=0;y<o.expressions.length;y++)B+=u(o.quasis[y]),B+=u(o.expressions[y]);return B+u(o.quasis[y])}else if(o.type==="TaggedTemplateExpression"){var V=u(o.tag),X=o.quasi,oe=X.quasis.map(u),we=X.expressions.map(u);return V.apply(null,[oe].concat(we))}else return o.type==="TemplateElement"?o.value.cooked:l}}(a);return s===l?void 0:s}},{escodegen:12}],jsonpath:[function(n,e,t){e.exports=n("./lib/index")},{"./lib/index":5}]},{},["jsonpath"])("jsonpath")});class zs{constructor(e){this._itemsMap={},e.forEach((t,r)=>{this._itemsMap[t.item_id]=r})}pullItemIndex(e){let t=this._itemsMap[e];return delete this._itemsMap[e],t}getItemIndex(e){return this._itemsMap[e]}get itemsMap(){return this._itemsMap}}function Vs(n,e){let t,r=[];n?t=n.split(","):r=e;let a=new Set;function i(l){let s=!a.has(l);return s&&a.add(l),s}return n&&e.forEach(l=>{let s="";t.forEach((u,o)=>{let p=l.fields.find(m=>m.field_id==u);p&&(s+=p.field_value),t.length-1==o&&i(s)&&r.push(l)})}),r}function Js(n,e,t){var r=JSON.parse(JSON.stringify(n));return t?Qs(r,e):Ys(r,e)}function Qs(n,e){return n.forEach(t=>{e.forEach(r=>{let a=t.fields.find(i=>i.element_id==r.element_id);a?a.field_value=r.field_value:(r.field_id=r.element_id,t.fields.push(r))})}),n}function Ys(n,e){return n.forEach(t=>{t.fields=[].concat(e)}),n}var Z={},ht=A("f3Ywx"),rt=ht.default;Object.defineProperty(Z,"__esModule",{value:!0}),Z.default=ro;var Xs=rt(A("5ZWAZ")),Ks=rt(A("fgq5y")),Zs=rt(A("byyO9")),eo=rt(A("glRwo")),to=rt(A("ayR3G")),Xe=rt(A("a9VQw"));function ro(n,e){if((0,to.default)(2,arguments),!e||(0,Xs.default)(e)!=="object")return new Date(NaN);var t=e.years?(0,Xe.default)(e.years):0,r=e.months?(0,Xe.default)(e.months):0,a=e.weeks?(0,Xe.default)(e.weeks):0,i=e.days?(0,Xe.default)(e.days):0,l=e.hours?(0,Xe.default)(e.hours):0,s=e.minutes?(0,Xe.default)(e.minutes):0,u=e.seconds?(0,Xe.default)(e.seconds):0,o=(0,eo.default)(n),p=r||t?(0,Zs.default)(o,r+12*t):o,m=i||a?(0,Ks.default)(p,i+7*a):p,d=1e3*(u+60*(s+60*l));return new Date(m.getTime()+d)}Z=Z.default;var ke={},ht=A("f3Ywx"),Rt=ht.default;Object.defineProperty(ke,"__esModule",{value:!0}),ke.default=oo;var no=Rt(A("fgq5y")),ao=Rt(A("glRwo")),Gn=Rt(A("a9VQw")),io=Rt(A("ayR3G")),so=A("lmyOi");function oo(n,e,t){(0,io.default)(2,arguments);var r,a,i,l,s,u,o,p,m=(0,so.getDefaultOptions)(),d=(0,Gn.default)((r=(a=(i=(l=t==null?void 0:t.weekStartsOn)!==null&&l!==void 0?l:t==null||(s=t.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&i!==void 0?i:m.weekStartsOn)!==null&&a!==void 0?a:(o=m.locale)===null||o===void 0||(p=o.options)===null||p===void 0?void 0:p.weekStartsOn)!==null&&r!==void 0?r:0);if(!(d>=0&&d<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");var y=(0,ao.default)(n),f=(0,Gn.default)(e),S=y.getDay(),v=(f%7+7)%7,w=7-d,g=f<0||f>6?f-(S+w)%7:(v+w)%7-(S+w)%7;return(0,no.default)(y,g)}ke=ke.default;var ft={},ht=A("f3Ywx"),Wn=ht.default;Object.defineProperty(ft,"__esModule",{value:!0}),ft.default=co;var Hn=Wn(A("hLz6R")),lo=Wn(A("ayR3G"));function co(n,e,t){(0,lo.default)(2,arguments);var r=(0,Hn.default)(n,t),a=(0,Hn.default)(e,t);return r.getTime()===a.getTime()}function uo(n,e){return n.forEach(t=>{e.forEach(r=>{let a=t.fields.find(i=>i.element_id==r.element_id);a?r.data_range?(r.date_type.includes("calendar"),a.field_value=\`\${po(r.date_type)}:\${Ft(r.date_type)}\`):a.field_value=Ft(r.date_type):t.fields.push({field_id:r.element_id,element_id:r.element_id,field_value:Ft(r.date_type)})})}),n}function po(n){let e=new Date;function t(a){let i;var l=a.getDay();n.includes("week_current,current")&&(i=0),n.includes("week_next,future")&&(i=7),n.includes("week_past,past")&&(i=-7);let s=a.getDate()-l+i+(l==0?-6:1);return new Date(a.setDate(s))}function r(a){let i,l,s=Math.floor(a.getMonth()/3),u=a.getFullYear();return n.includes("quarter_current,current")&&(i=0,l=0),n.includes("quarter_next,future")&&(i=3,l=0),n.includes("quarter_past,past")&&(i=-3,l=0),new Date(u,3*s+i,1+l)}switch(n){case"week_current,current":case"week_next,future":case"week_past,past":return t(new Date).getTime();case"month_current,current":return new Date(e.getFullYear(),e.getMonth(),1).getTime();case"quarter_current,current":case"quarter_next,future":case"quarter_past,past":return r(new Date).getTime();case"year_current,current":return G(Z)(new Date(e.getFullYear(),0,1),{years:0}).getTime();case"month_next,future":return new Date(e.getFullYear(),e.getMonth()+1,1).getTime();case"year_next,future":case"today_current,current":case"7_days_future,future":case"10_days_future,future":case"14_days_future,future":case"30_days_future,future":return G(Z)(e,{days:0}).getTime();case"month_past,past":return new Date(e.getFullYear(),e.getMonth()-1,1).getTime();case"year_past,past":return G(Z)(e,{years:-1}).getTime();case"year_past,past,calendar":return G(Z)(new Date(e.getFullYear(),0,1),{years:-1}).getTime();case"year_future,future,calendar":return G(Z)(new Date(e.getFullYear()+1,0,1),{years:0}).getTime();case"tomorrow,future":return G(Z)(e,{days:1}).getTime();case"yesterday,past":return G(Z)(e,{days:-1}).getTime();case"7_days_past,past":return G(Z)(e,{days:-7}).getTime();case"10_days_past,past":return G(Z)(e,{days:-10}).getTime();case"14_days_past,past":return G(Z)(e,{days:-14}).getTime();case"30_days_past,past":return G(Z)(e,{days:-30}).getTime()}}function Ft(n){var e=new Date;function t(s){var u=(s=new Date(s)).getDay(),o=s.getDate()-u+6+(u==0?6:1);return new Date(s.setDate(o))}function r(s){var u=(s=new Date(s)).getDay(),o=s.getDate()-u+13+(u==0?-6:1);return new Date(s.setDate(o))}function a(s){var u=(s=new Date(s)).getDay(),o=s.getDate()-u-1+(u==0?-6:1);return new Date(s.setDate(o))}let i=Math.floor(e.getMonth()/3),l=e.getFullYear();switch(n){case"next_day":case"tomorrow,future":return G(Z)(e,{days:1}).getTime();case"two_days_after":return G(Z)(e,{days:2}).getTime();case"three_days_after":return G(Z)(e,{days:3}).getTime();case"four_days_after":return G(Z)(e,{days:4}).getTime();case"next_week":return G(Z)(e,{weeks:1}).getTime();case"two_weeks_after":return G(Z)(e,{weeks:2}).getTime();case"three_weeks_after":return G(Z)(e,{weeks:3}).getTime();case"this_sunday":return G(ke)(e,0,{weekStartsOn:1});case"this_monday":return G(ke)(e,1,{weekStartsOn:1});case"this_tuesday":return G(ke)(e,2,{weekStartsOn:1});case"this_wednesday":return G(ke)(e,3,{weekStartsOn:1});case"this_thursday":return G(ke)(e,4,{weekStartsOn:1});case"this_friday":return G(ke)(e,5,{weekStartsOn:1});case"this_saturday":return G(ke)(e,6,{weekStartsOn:1});case"today_current,current":case"7_days_past,past":case"10_days_past,past":case"14_days_past,past":case"30_days_past,past":case"year_past,past":return G(Z)(e,{days:0}).getTime();case"7_days_future,future":return G(Z)(e,{days:7}).getTime();case"10_days_future,future":return G(Z)(e,{days:10}).getTime();case"14_days_future,future":return G(Z)(e,{days:14}).getTime();case"30_days_future,future":return G(Z)(e,{days:30}).getTime();case"yesterday,past":return G(Z)(e,{days:-1}).getTime();case"year_future,future,calendar":return G(Z)(new Date(e.getFullYear()+1,0,0),{years:1}).getTime();case"year_past,past,calendar":return G(Z)(new Date(e.getFullYear(),0,0),{years:0}).getTime();case"week_current,current":return t(new Date).getTime();case"month_current,current":return new Date(e.getFullYear(),e.getMonth()+1,0).getTime();case"quarter_current,current":return new Date(l,(i+1)*3,0).getTime();case"year_current,current":return G(Z)(new Date(e.getFullYear()+1,0,0),{years:0}).getTime();case"week_next,future":return r(new Date).getTime();case"month_next,future":return new Date(e.getFullYear(),e.getMonth()+2,0).getTime();case"quarter_next,future":return new Date(l,(i+1)*3+3,0).getTime();case"year_next,future":return G(Z)(e,{years:1}).getTime();case"week_past,past":return a(new Date).getTime();case"month_past,past":return new Date(e.getFullYear(),e.getMonth(),0,0).getTime();case"quarter_past,past":return new Date(l,(i+1)*3-3,0).getTime();default:return e.getTime()}}function fo(n,e){n=new Date(n);let t=new Date;switch(e){case"day":return n.getDate()+"."+n.getMonth()==t.getDate()+"."+t.getMonth();case"week":let r=new Date(new Date().getFullYear(),n.getMonth(),n.getDate());return G(ft)(r,t);case"month":return n.getMonth()===t.getMonth();default:return!0}}function ho(n,e,t){return nt(n,e,t)}function Lt(n){return n&&typeof n=="object"&&Object.prototype.toString.call(n)!=="[object RegExp]"&&Object.prototype.toString.call(n)!=="[object Date]"}function mo(n){return Array.isArray(n)?[]:{}}function mt(n,e){return e&&e.clone===!0&&Lt(n)?nt(mo(n),n,e):n}function zn(n,e,t){var r=n.slice();return e.forEach(function(a,i){r[i]===void 0?r[i]=mt(a,t):Lt(a)?r[i]=nt(n[i],a,t):n.indexOf(a)===-1&&r.push(mt(a,t))}),r}function go(n,e,t){var r={};return Lt(n)&&Object.keys(n).forEach(function(a){r[a]=mt(n[a],t)}),Object.keys(e).forEach(function(a){Lt(e[a])&&n[a]?r[a]=nt(n[a],e[a],t):r[a]=mt(e[a],t)}),r}function nt(n,e,t){n=n!==void 0?n:{};var r=Array.isArray(e=e!==void 0?e:{}),a=(t||{arrayMerge:zn}).arrayMerge||zn;return r?Array.isArray(n)?a(n,e,t):mt(e,t):go(n,e,t)}function Vn(n){let e={};return n.forEach(t=>{t.items_list.forEach(r=>{let a=e[r.item_id];return a?(a.trash=r.trash,r.fields.forEach(i=>{let l=!0;a.fields=a.fields.map(s=>Number(s.field_id)===Number(i.field_id)&&(l=!1,s.field_value!=i.field_value)?{...i,history:i.history.concat(s.history)}:s),l&&a.fields.push(i)})):e[r.item_id]=r})}),Object.values(e)}function yo(n){return Vn(n)}function _o(n,e,t,r,a){let i,l=JSON.parse(JSON.stringify(n)),s=r||"children",u=!!a&&a;for(i=0;i<l.length;i++)l[i][t]&&l[i][t]!==0&&l.forEach(m=>{l[i][t]==m[e]?(m[s]||(m[s]=[]),m[s].push(l[i]),l.splice(i,1),i==0?i=0:i--):m[s]&&o(m)});function o(m){m[s].forEach(d=>{d[e]==l[i][t]?(d[s]||(d[s]=[]),d[s].push(l[i]),l.splice(i,1),i==0?i=0:i--):d[s]&&o(d)})}function p(m){m.sort((d,y)=>d[u]-y[u]),m.forEach(d=>{d[s]&&p(d[s])})}return u&&p(l),l}ft=ft.default,nt.all=function(n,e){if(!Array.isArray(n)||n.length<2)throw Error("first argument should be an array with at least two elements");return n.reduce(function(t,r){return nt(t,r,e)})},self.onmessage=function(n){let e=Vn(n.data);self.postMessage(e)};class bo{constructor(e){this.gudhub=e}mergeFieldLists(e,t){let r=JSON.parse(JSON.stringify(e)),a=JSON.parse(JSON.stringify(t)),i=a.map(l=>l.field_id);return a.length?a.reduce((l,s)=>{let u=null;if(l.find((o,p)=>s.field_id==o.field_id&&(u=p,!0)))l[u]=this.gudhub.util.mergeObjects(l[u],s);else{let o=s.data_model&&s.data_model.interpretation&&s.data_model.interpretation.find(p=>p.src=="table")||{settings:{show_field:1}};if(o.settings.show_field){let p=this.gudhub.util.mergeObjects({show:1},o),m=this.gudhub.util.mergeObjects(p,s);l.push(m)}}return l},r).filter(function(l){return l.show&&i.indexOf(l.field_id)!=-1}):[]}createFieldsListToView(e,t){let r=this;return new Promise(async a=>{let i=await this.gudhub.getFieldModels(e);if(t.length!==0){let s=[];t.forEach((u,o)=>{let p=i.find(m=>u.field_id==m.field_id);p&&(p.data_model.interpretation.find(m=>m.src=="table"),s.push({field_id:p.field_id,show:u.show,width:u.width?u.width:"150px"})),o+1==t.length&&l(s)})}else l(t);function l(s){let u=0;i.forEach((o,p)=>{s.find(m=>o.field_id==m.field_id)?(u==i.length-1&&a(s),u++):r.gudhub.ghconstructor.getInstance(o.data_type).then(m=>{if(m){let d=m.getTemplate().model.data_model.interpretation.find(y=>y.src=="table");d||(d={settings:{show_field:1}}),s.push({field_id:o.field_id,show:d.settings.show_field}),u==i.length-1&&a(s)}u++},function(m){u++})})}})}createFieldsListToViewWithDataType(e,t){return new Promise(async r=>{let a=[],i=await this.gudhub.getFieldModels(e),l=i.map(u=>+u.field_id),s=[];a=i.reduce((u,o)=>(u.find((p,m)=>o.field_id==p.field_id)||(u.push({field_id:o.field_id,data_type:o.data_type}),s.push(new Promise(async p=>{let m=(await this.gudhub.ghconstructor.getInstance(o.data_type)).getTemplate().model.data_model.interpretation.find(d=>d.src=="table")||{settings:{show_field:1}};u.find(d=>d.field_id==o.field_id).show=m.settings.show_field,p(!0)}))),u),t),Promise.all(s).then(()=>{r(a=a.filter(u=>l.indexOf(u.field_id)!=-1))})})}}class vo{constructor(e){this.gudhub=e,this.selectedItems={}}async selectItems(e,t){if(!this.selectedItems.hasOwnProperty(e)){this.selectedItems[e]={items:[],app:[]};let i=await this.gudhub.getApp(e);this.selectedItems[e].app=i}let r=this.selectedItems[e],a=r.items.map(i=>i.item_id);t.forEach(i=>{a.indexOf(i.item_id)!=-1?r.items.splice(a.indexOf(i.item_id),1):r.items[r.items.length]=i})}getSelectedItems(e){return this.selectedItems[e]?this.selectedItems[e]:{items:[],app:[]}}clearSelectedItems(e){this.selectedItems[e]&&(this.selectedItems[e].items=[])}isItemSelected(e,t){let r=this.getSelectedItems(e);return r!==null&&(r=r.items.map(a=>a.item_id)).indexOf(t)!=-1}}function wo(){return\`function createList(items) {
|
|
123
123
|
return items.reduce(
|
|
124
124
|
(acc, item) => {
|
|
125
125
|
acc.list[item.item_id] = item;
|
|
@@ -191,5 +191,5 @@ Expecting \`+ve.join(", ")+", got '"+(this.terminals_[R]||R)+"'":"Parse error on
|
|
|
191
191
|
|
|
192
192
|
const diff = compareItemsLists(items_list1, items_list2);
|
|
193
193
|
self.postMessage({ diff });
|
|
194
|
-
});\`}function yo(n,e,t,r,a){async function i(d,y,f){let S=null;if(d.type==="array"&&(S=Number(d.is_static)?Array(await u(d.childs,y,f)):await l(d,y,f)),d.type==="object"&&(S=Number(d.current_item)?await s(d,y):await u(d.childs,y,f)),d.type==="property"&&(S=await o(d,y,f)),typeof d=="object"&&d.type===void 0){let v={};for(let w in d)if(d.hasOwnProperty(w)){let g=d[w],_=await i(g,y,f);v[w]=_[g.property_name]}return v}return{[d.property_name]:S}}async function l(d,y,f){let S=await t.gudhub.getApp(Number(d.app_id)),v=await m(d.filter,S.items_list,f,y);if(d.isSortable&&d.field_id_to_sort&&d.field_id_to_sort!==""){let w=v.flatMap(_=>{let $=_.fields.find(x=>x.field_id==d.field_id_to_sort);return $&&$.field_value!=""?_:[]}),g=v.filter(_=>{if(!w.includes(_))return _});v=[...w=w.sort((_,$)=>d.sortType=="desc"?$.fields.find(x=>x.field_id==d.field_id_to_sort).field_value-_.fields.find(x=>x.field_id==d.field_id_to_sort).field_value:_.fields.find(x=>x.field_id==d.field_id_to_sort).field_value-$.fields.find(x=>x.field_id==d.field_id_to_sort).field_value),...g]}if(d.offset){let w;w=d.use_variables_for_limit_and_offset&&r?r[d.offset]:/^[0-9]+$/.test(d.offset)?d.offset:0,v=v.slice(w)}if(d.limit){let w;(w=d.use_variables_for_limit_and_offset&&r?r[d.limit]:/^[0-9]+$/.test(d.limit)||0)!==0&&(v=v.slice(0,w))}return Promise.all(v.map(async w=>u(d.childs,w,S.app_id)))}async function s(d,y){let f=await t.gudhub.getApp(d.app_id),S=f.items_list||[];return u(d.childs,y||S[0],f.app_id)}async function u(d,y,f){let S=await d.map(async v=>i(v,y,f));return(await Promise.all(S)).reduce((v,w)=>({...v,...w}),{})}async function o(d,y,f){switch(d.property_type){case"static":return d.static_field_value;case"variable":return d.variable_type==="app_id"?f:\`\${f}.\${y.item_id}\`;case"field_id":return d.field_id;case"function":return typeof d.function=="function"?d.function(y,f,t.gudhub,...d.args):await Function("item, appId, gudhub","return (async "+d.function+")(item, appId, gudhub)")(y,f,t.gudhub);default:return!d.field_id&&d.name_space&&(d.field_id=await t.gudhub.getFieldIdByNameSpace(f,d.name_space)),Number(d.interpretation)?await t.gudhub.getInterpretationById(Number(f),Number(y.item_id),Number(d.field_id),"value"):await t.gudhub.getFieldValue(Number(f),Number(y.item_id),Number(d.field_id))}}async function p(d,y,f,S,v){let w=await t.gudhub.prefilter(JSON.parse(JSON.stringify(d)),{element_app_id:y,app_id:f,item_id:S,...r});return t.gudhub.filter(v,[...w,...d])}async function m(d=[],y=[],f="",S={}){return d.length?p(d,f,f,S.item_id,y):[...y]}return i(n,e,a)}class _o{constructor(e){this.gudhub=e,this.appsConnectingMap={apps:[],fields:[],items:[],views:[]}}createAppsFromTemplate(e,t,r,a){let i=this;return new Promise(l=>{let s=100/(6*e.apps.length),u=0;i.createApps(e,o=>{u+=1,r&&r.call(this,{percent:u*s,status:o})},a).then(o=>{i.createItems(o,t,p=>{typeof p=="string"?(u+=1,r&&r.call(this,{percent:u*s,status:p})):typeof p=="object"&&(r&&r.call(this,{status:"Done",apps:p}),l())},a)})})}createItems(e,t,r,a){return new Promise(async i=>{let l=t||1e5,s=this,u=[],o=[],{accesstoken:p}=await s.gudhub.req.axiosRequest({method:"POST",url:"https://gudhub.com/GudHub_Test/auth/login",form:{auth_key:"3HMOtCbC0M/1/1e4y4Uxo/Kh/aFN4V5LG2//5ixx7TZyiUfMb7IHAAHCj9PsLrOSDrZuuWkbX4BIX23f51H+eA=="}});e.forEach(m=>{o.push(new Promise(async d=>{let y;y=a?await s.gudhub.req.axiosRequest({url:\`https://gudhub.com/GudHub_Test/api/app/get?token=\${p}&app_id=\${s._searchOldAppId(m.app_id,s.appsConnectingMap.apps)}\`,method:"GET"}):await s.gudhub.getApp(s._searchOldAppId(m.app_id,s.appsConnectingMap.apps)),r&&r.call(this,\`GET APP: \${y.app_name} (Items steps)\`);let f=JSON.parse(JSON.stringify(y)),S=f.items_list.map(v=>({index_number:v.index_number,item_id:0,fields:[]})).filter((v,w)=>w<=l);s.gudhub.addNewItems(m.app_id,S).then(v=>{r&&r.call(this,\`ADD NEW ITEMS: \${y.app_name} (Items steps)\`),m.items_list=v,s._updateMap(m.items_list,f.items_list),s._addFieldValue(f.items_list,m.items_list,s.appsConnectingMap),u.push(m),d()})}))}),Promise.all(o).then(()=>{u.forEach(m=>{m.items_list.forEach(d=>{d.fields.forEach(y=>{s.appsConnectingMap.fields.forEach(f=>{y.field_id===f.old_field_id&&(y.field_id=f.new_field_id,y.element_id=f.new_field_id)})})})}),s.deleteField(u),s.replaceValue(u,s.appsConnectingMap).then(()=>{let m=[];u.forEach(d=>{m.push(new Promise(y=>{let f=d.items_list.map(S=>(S.fields.forEach(v=>{delete v.data_id}),S));s.gudhub.updateItems(d.app_id,f).then(()=>{r&&r.call(this,\`REPLACE VALUE: \${d.app_name} (Items steps)\`),y()})}))}),Promise.all(m).then(()=>{r.call(this,u),i()})})})})}deleteField(e){e.forEach(t=>{t.items_list.forEach(r=>{r.fields=r.fields.filter(a=>t.field_list.findIndex(i=>i.field_id==a.field_id)>-1)})})}replaceValue(e,t){return new Promise(async r=>{let a=[],i=this;e.forEach(l=>{l.field_list.forEach(s=>{s.data_type==="item_ref"&&i._replaceValueItemRef(l,s,t),a.push(new Promise(u=>{i.gudhub.ghconstructor.getInstance(s.data_type).then(o=>{if(o===void 0){console.log("ERROR WHILE GETTING INSTANCE OF ",s.data_type),u({type:s.data_type});return}if(o.getTemplate().constructor=="file")return i.gudhub.util.fileInstallerHelper(l.app_id,l.items_list,s.field_id).then(p=>{u(p)});o.getTemplate().constructor=="document"?i.documentInstallerHelper(l.app_id,l.items_list,s.field_id).then(p=>{u(o)}):u(o)})}))})}),a.length>0?Promise.all(a).then(l=>{r(l)}):r(result)})}documentInstallerHelper(e,t,r){let a=this,i=[];return new Promise(async l=>{for(let s of t){let u=s.item_id,o=s.fields.find(p=>p.element_id===r);if(o&&o.field_value&&o.field_value.length>0){let p=await a.gudhub.getDocument({_id:o.field_value});if(p&&p.data){let m=await a.gudhub.createDocument({app_id:e,item_id:u,element_id:r,data:p.data});o.field_value=m._id,i.push(s)}}}l(i)})}_replaceValueItemRef(e,t,r){e.items_list.forEach(a=>{a.fields.forEach(i=>{if(i.field_id===t.field_id&&i.field_value){let l=i.field_value.split(",");l.forEach((s,u)=>{let o=s.split(".");r.apps.forEach(p=>{o[0]==p.old_app_id&&(o[0]=p.new_app_id)}),r.items.forEach(p=>{o[1]==p.old_item_id&&(o[1]=p.new_item_id)}),l[u]=o.join(".")}),i.field_value=l.join(",")}})})}_addFieldValue(e,t,r){t.forEach(a=>{r.items.forEach(i=>{a.item_id===i.new_item_id&&e.forEach(l=>{i.old_item_id===l.item_id&&(a.fields=l.fields)})})})}_updateMap(e,t){t.forEach(r=>{e.forEach(a=>{r.index_number===a.index_number&&this.appsConnectingMap.items.push({old_item_id:r.item_id,new_item_id:a.item_id})})})}_searchOldAppId(e,t){let r=0;return t.forEach(a=>{a.new_app_id===e&&(r=a.old_app_id)}),r}createApps(e,t,r){let a=this,i={step_size:100/(3*e.apps.length),apps:[]};return new Promise(async l=>{let s={},u=[],o=[],{accesstoken:p}=await a.gudhub.req.axiosRequest({method:"POST",url:"https://gudhub.com/GudHub_Test/auth/login",form:{auth_key:"3HMOtCbC0M/1/1e4y4Uxo/Kh/aFN4V5LG2//5ixx7TZyiUfMb7IHAAHCj9PsLrOSDrZuuWkbX4BIX23f51H+eA=="}});for(let m of e.apps){let d;d=r?await a.gudhub.req.axiosRequest({url:\`https://gudhub.com/GudHub_Test/api/app/get?token=\${p}&app_id=\${m}\`,method:"GET"}):await a.gudhub.getApp(m),t&&t.call(this,\`GET APP: \${d.app_name} (App steps)\`);let y=JSON.parse(JSON.stringify(d));s[y.app_id]=y,i.apps.push(y.icon);let f=a.prepareAppTemplate(y);f.app_name=f.app_name+" New",f.privacy=1,e.data_to_change&&(e.data_to_change.name&&(f.app_name=e.data_to_change.name),e.data_to_change.icon&&(f.icon=e.data_to_change.icon)),a.resetViewsIds(f),a.gudhub.createNewApp(f).then(S=>{t&&t.call(this,\`CREATE NEW APP: \${d.app_name} (App steps)\`),u.push(S),a.mapApp(y,S,a.appsConnectingMap),e.apps.length==u.length&&(a.connectApps(u,a.appsConnectingMap,s),u.forEach(v=>{a.gudhub.updateApp(v).then(w=>{t&&t.call(this,\`UPDATE APP: \${d.app_name} (App steps)\`),o.push(w),e.apps.length==o.length&&l(o)})}))})}})}mapApp(e,t,r){r.apps.push({old_app_id:e.app_id,new_app_id:t.app_id,old_view_init:e.view_init,new_view_init:t.view_init}),e.field_list.forEach(a=>{t.field_list.forEach(i=>{a.name_space==i.name_space&&r.fields.push({name_space:a.name_space,old_field_id:a.field_id,new_field_id:i.field_id})})}),e.views_list.forEach(a=>{t.views_list.forEach(i=>{a.name==i.name&&r.views.push({name:a.name,old_view_id:a.view_id,new_view_id:i.view_id})})})}crawling(e,t){let r=e===null?[]:Object.keys(e),a=this;r.length>0&&r.forEach(i=>{let l=e[i];l!==void 0&&typeof e!="string"&&(t(i,l,e),a.crawling(l,t))})}resetViewsIds(e){e.view_init=0,this.crawling(e.views_list,function(t,r,a){(t=="view_id"||t=="container_id")&&(a[t]=0)})}connectApps(e,t,r){let a=this;return e.forEach(i=>{t.apps.forEach(l=>{i.view_init===l.new_view_init&&t.views.forEach(s=>{l.old_view_init===s.old_view_id&&(i.view_init=s.new_view_id)})}),a.crawling(i.field_list,function(l,s,u){if(l.indexOf("field_id")!==-1||l.indexOf("FieldId")!==-1||l.indexOf("destination_field")!==-1){let o=String(s).split(","),p=[];t.fields.forEach(m=>{o.forEach(d=>{d==m.old_field_id&&p.push(m.new_field_id)})}),p.length&&(u[l]=p.join(","))}if((l.indexOf("app_id")!=-1||l.indexOf("AppId")!=-1||l.indexOf("destination_app")!=-1)&&t.apps.forEach(o=>{s==o.old_app_id&&(u[l]=o.new_app_id)}),l.indexOf("view_id")!==-1&&t.views.forEach(o=>{s==o.old_view_id&&(u[l]=o.new_view_id)}),l.indexOf("src")!==-1&&isFinite(s)){let o="container_id",p=t.apps.find(d=>d.new_app_id===i.app_id).old_app_id,m=a.findPath(r[p].views_list,o,s);u[l]=\`\${a.getValueByPath(i.views_list,m,o)}\`}if(l.indexOf("trigger")!==-1&&s.model&&s.model.nodes){let o=s.model.nodes,p=["inputs","outputs"];for(let m in o)p.forEach(d=>{let y=o[m];Object.keys(y[d]).filter(f=>f!==""&&!isNaN(f)).forEach(f=>{let S=t.fields.filter(v=>v.old_field_id==f);if(S.length!==0&&S[0].new_field_id){let v=S[0].new_field_id.toString(),w=y[d][f];w.connections.forEach(g=>{g.input==f&&(g.input=v),g.output==f&&(g.output=v)}),delete y[d][f],y[d][v]=w}})})}})}),e}getValueByPath(e,t,r){let a=e;return t.split(".").forEach(i=>{a=a[i]}),a[r]}findPath(e,t,r){let a=this,i=!1,l=!1,s=[];return a.crawling(e,function(u,o,p){l&&s.reverse().forEach(m=>{l&&(m.delete=!0,m.parent===p&&(l=!1,(s=s.filter(d=>!d.delete)).reverse()))}),i||(typeof p[u]=="object"&&s.push({prop:u,parent:p}),o==r&&t===u?i=!0:Object.keys(p).pop()!==u||typeof p[u]=="object"||(l=!0))}),s.map(u=>u.prop).join(".")}prepareAppTemplate(e){let t=this,r=JSON.parse(JSON.stringify(e));return t.crawling(r.views_list,function(a,i,l){a=="element_id"&&(l.element_id=-Number(i),l.create_element=-Number(i))}),r.field_list.forEach(a=>{a.create_field=-Number(a.field_id),a.element_id=-Number(a.field_id),a.field_id=-Number(a.field_id),a.field_value=""}),r.items_list=[],delete r.app_id,delete r.icon.id,delete r.group_id,delete r.trash,delete r.last_update,delete r.file_list,r}}class bo{constructor(e){this.gudhub=e}fileInstallerHelper(e,t,r){let a=this;return new Promise(i=>{let l=[[]],s=Promise.resolve(),u=[];t.forEach(o=>{let p=o.item_id,m=o.fields.find(d=>d.element_id===r);m&&m.field_value&&m.field_value.split(".").forEach(d=>{let y={source:d,destination:{app_id:e,item_id:p,element_id:r}};l[l.length-1].length!==10?l[l.length-1].push(y):l.push([y])})}),l.forEach(o=>{s=s.then(()=>a.gudhub.duplicateFile(o)).then(p=>{u=[...u,...p]})}),s.then(()=>{t.forEach(o=>{let p=o.item_id,m=o.fields.find(d=>d.element_id===r);m&&m.field_value&&(m.field_value="",u.forEach(d=>{d.item_id===p&&(m.field_value=m.field_value.split(",").filter(y=>y).concat(d.file_id).join(","))}))}),i()})})}}function vo(n,e){return JSON.stringify(n)===JSON.stringify(e)}async function Wn(n){await Promise.all(n);let e=!0;for(let t of n){let r=await wo(t);if(r.state==="pending"){e=!1;break}if(r.state==="rejected")throw r.reason}return!!e||Wn(n)}function wo(n){let e={state:"pending"};return Promise.race([n,e]).then(t=>t===e?t:{state:"resolved",value:t},t=>({state:"rejected",reason:t}))}function $o(n,e){if(!n||!n.length)return[];if(!n[0].fields.length)return n;var t=e&&e.sort_field_id||n[0].fields[0].field_id;function r(a){for(var i=null,l=0;l<a.fields.length;l++)if(a.fields[l].field_id==t){i=a.fields[l].field_value;break}return i}return n.sort(function(a,i){var l=r(a),s=r(i);return l===null?-1:s===null?1:/^\\d+$/.test(l)&&/^\\d+$/.test(s)?Number(l)<Number(s)?-1:1:/^\\d+$/.test(l)||/^\\d+$/.test(s)?/^\\d+$/.test(l)?-1:1:l.toLowerCase()>s.toLowerCase()?1:-1}),e&&e.descending?n.reverse():n}class So{constructor(e){this.gudhub=e,this.MergeFields=new ho(e),this.ItemsSelection=new mo(e),this.AppsTemplateService=new _o(e),this.FileHelper=new bo(e)}prefilter(e,t={}){return Fi(e,this.gudhub.storage,this.gudhub.pipeService,t)}filter(e,t){return Ss(e,t)}mergeFilters(e,t){return Ps(e,t)}group(e,t){return Us(e,t)}async getFilteredItems(e=[],t=[],r,a,i,l="",s,u){let o=await this.prefilter(t,{element_app_id:r,app_id:a,item_id:i}),p=this.filter(e,o);return this.group(l,p).filter(m=>!s||Nn([m],s).length===1).filter(m=>!u||Nn([m],u).length===1)}jsonToItems(e,t){return Cs(e,t)}getDate(e){return Nt(e)}checkRecurringDate(e,t){return oo(e,t)}populateItems(e,t,r){return Gs(e,t,r)}populateWithDate(e,t){return io(e,t)}populateWithItemRef(e,t,r,a,i,l){return Rs(e,t,r,a,i,l)}compareItems(e,t,r){return Ls(e,t,r)}mergeItems(e,t,r){return Fs(e,t,r)}mergeObjects(e,t,r){return lo(e,t,r)}makeNestedList(e,t,r,a,i){return fo(e,t,r,a,i)}async mergeChunks(e){return po(e)}mergeFieldLists(e,t){return this.MergeFields.mergeFieldLists(e,t)}createFieldsListToView(e,t){return this.MergeFields.createFieldsListToView(e,t)}createFieldsListToViewWithDataType(e,t){return this.MergeFields.createFieldsListToViewWithDataType(e,t)}selectItems(e,t){return this.ItemsSelection.selectItems(e,t)}getSelectedItems(e){return this.ItemsSelection.getSelectedItems(e)}clearSelectedItems(e){return this.ItemsSelection.clearSelectedItems(e)}isItemSelected(e,t){return this.ItemsSelection.isItemSelected(e,t)}jsonConstructor(e,t,r,a){return yo(e,t,this,r,a)}fileInstallerHelper(e,t,r){return this.FileHelper.fileInstallerHelper(e,t,r)}createAppsFromTemplate(e,t,r,a){return this.AppsTemplateService.createAppsFromTemplate(e,t,r,a)}createApps(e){return this.AppsTemplateService.createApps(e)}createItems(e,t){return this.AppsTemplateService.createItems(e,t)}areViewListsEqual(e,t){let r=e.sort((i,l)=>i.view_id-l.view_id),a=t.sort((i,l)=>i.view_id-l.view_id);return this.compareObjects(r,a)}areFieldListsEqual(e,t){let r=e.sort((i,l)=>i.field_id-l.field_id),a=t.sort((i,l)=>i.field_id-l.field_id);return this.compareObjects(r,a)}compareObjects(e,t){return vo(e,t)}compareAppsItemsLists(e,t,r){let a=new Blob([go()],{type:"application/javascript"});this.worker=new Worker(URL.createObjectURL(a)),this.worker.postMessage({items_list1:e,items_list2:t}),this.worker.addEventListener("message",i=>{let{diff:l}=i.data;r(l)})}dynamicPromiseAll(e){return Wn(e)}sortItems(e,t){return $o(e,t)}debounce(e,t){let r;return function(...a){clearTimeout(r),r=setTimeout(()=>{e.apply(this,a)},t)}}}class xo{constructor(e,t){this.req=e,this.storage=t}async login({username:e,password:t}={}){let r=await this.loginApi(e,t);return this.storage.updateUser(r),r}async loginWithToken(e){let t=await this.loginWithTokenApi(e);return this.storage.updateUser(t),t}async logout(e){return await this.logoutApi(e)}async signup(e){return await this.signupApi(e)}async updateToken(e){return await this.updateTokenApi(e)}async updateUser(e){let t=await this.updateUserApi(e);return this.storage.updateUser(t),t}async updateAvatar(e){let t=await this.avatarUploadApi(e);return this.storage.updateUser(t),t}async getUsersList(e){return await this.getUsersListApi(e)}async loginApi(e,t){try{return await this.req.axiosRequest({method:"POST",url:\`\${this.req.root}/auth/login\`,form:{username:e,password:t}})}catch(r){console.log(r)}}async loginWithTokenApi(e){try{return await this.req.axiosRequest({method:"POST",url:\`\${this.req.root}/auth/login?accesstoken=\${e}\`})}catch(t){console.log(t)}}async updateTokenApi(e){try{return await this.req.axiosRequest({method:"POST",url:\`\${this.req.root}/auth/login\`,form:{auth_key:e}})}catch(t){console.log(t)}}logoutApi(e){return this.req.post({url:"/auth/logout",form:{token:e}})}signupApi(e){return this.req.axiosRequest({method:"POST",url:\`\${this.req.root}/auth/singup\`,form:{user:JSON.stringify(e)}})}getUsersListApi(e){return this.req.get({url:"/auth/userlist",params:{keyword:e}})}updateUserApi(e){return this.req.post({url:"/auth/updateuser",form:{user:JSON.stringify(e)}})}avatarUploadApi(e){return this.req.post({url:"/auth/avatar-upload",form:{image:e}})}getUserByIdApi(e){return this.req.get({url:"/auth/getuserbyid",params:{id:e}})}getVersion(){return this.req.get({url:"/version"})}getUserFromStorage(e){return this.storage.getUsersList().find(t=>t.user_id==e)}saveUserToStorage(e){let t=this.storage.getUsersList();return t.find(r=>r.user_id==e.user_id)||(t.push(e),e)}async getUserById(e){let t=this.getUserFromStorage(e);if(!t){let r=await this.getUserByIdApi(e);if(!r)return null;(t=this.getUserFromStorage(e))||(this.saveUserToStorage(r),t=r)}return t}async getToken(){let e=new Date(this.storage.getUser().expirydate),t=new Date,r=this.storage.getUser().accesstoken;if(e<t||!r){let a=await this.updateToken(this.storage.getUser().auth_key);this.storage.updateUser(a),r=a.accesstoken}return r}}var Eo=A("kmcAT"),ht=A("akXK4"),Ee=A("5xozB");async function ko(n,e,t,r,a){try{let i;t||console.error(\`JS link must be provided for this data type - \${e}\`);let l=o=>(Ee.IS_BROWSER_MAIN_THREAD||oe.hasOwnProperty("window")||(oe.window=proxy,oe.document=a.document,oe.Element=a.Element,oe.CharacterData=a.CharacterData,oe.this=proxy,oe.self=proxy,oe.Blob=a.Blob,oe.Node=a.Node,oe.navigator=a.navigator,oe.HTMLElement=a.HTMLElement,oe.XMLHttpRequest=a.XMLHttpRequest,oe.WebSocket=a.WebSocket,oe.crypto=a.crypto,oe.DOMParser=a.DOMParser,oe.Symbol=a.Symbol,oe.document.queryCommandSupported=p=>(console.log("QUERY COMMAND SUPPORTED: ",p),!1),oe.angular=angular),new Promise(async p=>{let m=await G(ht).get(o).catch(f=>{console.log(\`Failed to fetch: \${o} in ghconstructor. Module id: \${e}\`)}),d=encodeURIComponent(m.data),y="data:text/javascript;charset=utf-8,"+d;p(y)})),s=await l(t);try{i=await import(s)}catch(o){console.log(\`Error while importing module: \${e}\`),console.log(o)}let u=new i.default(e);if(r&&Ee.IS_BROWSER_MAIN_THREAD){let o=document.createElement("link");o.href=r,o.setAttribute("data-module",e),o.setAttribute("rel","stylesheet"),document.getElementsByTagName("head")[0].appendChild(o)}return{type:e,getTemplate:function(o,p,m,d,y,f){let S=m!=="false";return u.getTemplate(o,p,S,d,y,f)},getDefaultValue:function(o,p,m,d){return new Promise(async y=>{let f=u.getDefaultValue;if(f){let S=await f(o,p,m,d);y(S)}else y(null)})},getSettings:function(o,p,m){return u.getSettings(o,p,m)},filter:{getSearchOptions:function(o){let p=u;return p.filter&&p.filter.getSearchOptions?u.filter.getSearchOptions(o):[]},getDropdownValues:function(){let o=u;return o.filter&&o.filter.getDropdownValues?o.filter.getDropdownValues():[]}},getInterpretation:function(o,p,m,d,y,f){return new Promise(async S=>{let v=u;try{let w=await v.getInterpretation(n,o,f,y,d,m),g=w.find($=>$.id==p)||w.find($=>$.id=="default"),_=await g.content();S({html:_})}catch(w){console.log(\`ERROR IN \${e}\`,w),S({html:"<span>no interpretation</span>"})}})},getInterpretationsList:function(o,p,m,d){return u.getInterpretation(o,p,m,d)},getInterpretatedValue:function(o,p,m,d){return new Promise(async y=>{let f=u.getInterpretatedValue;if(f){let S=await f(o,p,m,d);y(S)}else y(o)})},onMessage:function(o,p,m){return new Promise(async d=>{let y=u.onMessage;if(y){let f=await y(o,p,m);d(f)}d(null)})},extendController:function(o){u.getActionScope(o)},runAction:function(o){try{u.runAction(o)}catch{}},getWindowScope:function(o){return u.getWindowScope(o)},getWindowHTML:function(o){return u.getWindowHTML(o)}}}catch(i){console.log(i),console.log(\`Failed in createClassInstance (ghconstructor). Module id: \${e}. JS url: \${t}\`)}}class Ao{constructor(e){this.gudhub=e,this.cache={},this.modulesQueue={},this.angularInjector,this.nodeWindow}async getInstance(e){return this.getCached(e)||(this.modulesQueue[e]||(this.modulesQueue[e]=this.createInstance(e)),await this.modulesQueue[e]),this.getCached(e)}pupToCache(e,t){this.cache[e]=t}getCached(e){return this.cache[e]}initAngularInjector(e){this.angularInjector=e}initJsdomWindow(e){this.nodeWindow=e}async createInstance(e){let t,r=this.gudhub.storage.getModuleUrl(e);if(!r){console.log(\`Cannot find module: \${e}\`);return}return r.type==="gh_element"&&(r.technology==="angular"?t=await G(Eo)(this.gudhub,e,r.url,this.angularInjector,this.nodeWindow):r.technology==="class"&&(t=await ko(this.gudhub,e,r.js,r.css,this.nodeWindow))),t&&this.pupToCache(e,t),t}}class Io{constructor(e,t,r,a,i){this.storage=e,this.pipeService=t,this.req=r,this.appProcessor=a,this.util=i,this.itemListeners()}async addItemsApi(e,t){try{return await this.req.post({url:"/api/items/add",form:{items:JSON.stringify(t),app_id:e}})}catch(r){return console.log(r),null}}async updateItemsApi(e,t){try{return await this.req.post({url:"/api/items/update",form:{items:JSON.stringify(t),app_id:e}})}catch(r){return console.log(r),null}}deleteItemsApi(e){try{let t=this.req.post({url:"/api/items/delete",form:{items_ids:JSON.stringify(e)}});return t.from_apps_list=!0,t}catch(t){return console.log(t),null}}async addItemsToStorage(e,t){let r=await this.appProcessor.getApp(e);return r&&(t.forEach(a=>{r.items_list.push(a),r.items_object[a.item_id]={};for(let i=0;i<a.fields.length;i++)r.items_object[a.item_id][a.fields[i].field_id]=a.fields[i];this.pipeService.emit("gh_item_update",{app_id:e},[a])}),this.pipeService.emit("gh_items_update",{app_id:e},r.items_list),this.storage.updateApp(r)),r}async updateItemsInStorage(e,t){this.pipeService.emit("gh_items_update",{app_id:e},t);let r=await this.appProcessor.getApp(e);return r&&t&&t.forEach(a=>{let i={app_id:e};this.pipeService.emit("gh_item_update",i,[a]),i.item_id=a.item_id,this.pipeService.emit("gh_item_update",i,a);let l=r.items_list.find(s=>s.item_id==a.item_id);l&&a.fields.forEach(s=>{let u=l.fields.find(o=>o.field_id==s.field_id);i.field_id=s.field_id,u?u.field_value!=s.field_value&&(u.field_value=s.field_value,r.items_object[l.item_id][u.field_id]=u,this.pipeService.emit("gh_value_update",i,s.field_value)):(l.fields.push(s),r.items_object[l.item_id][s.field_id]=s,this.pipeService.emit("gh_value_update",i,s.field_value))})}),t}handleItemsChange(e,t,r){let a=this.util.compareItems(t.items_list,r.items_list);this.updateItemsInStorage(e,a.diff_src_items),this.addItemsToStorage(e,a.new_src_items)}triggerItemsChange(e,t){this.updateItemsInStorage(e,t.diff_src_items),this.addItemsToStorage(e,t.new_src_items)}handleDiff(e,t){this.updateItemsInStorage(e,t.diff_src_items),this.addItemsToStorage(e,t.new_src_items),this.deleteItemsFromStorage(e,t.trash_src_items)}async deleteItemsFromStorage(e,t=[]){let r=await this.appProcessor.getApp(e);r&&(r.items_list=r.items_list.filter(a=>!t.find(i=>a.item_id==i.item_id)||(delete r.items_object[a.item_id],!1)),this.pipeService.emit("gh_items_update",{app_id:e},r.items_list),this.storage.updateApp(r))}async getItems(e,t=!1){let r=await this.appProcessor.getApp(e,t);return r?r.items_list:null}async addNewItems(e,t){let r=t.map(i=>({...i,fields:qr(i.fields)})),a=await this.addItemsApi(e,r);return await this.addItemsToStorage(e,a),this.pipeService.emit("gh_items_add",{app_id:e},a),a}async updateItems(e,t){let r=t.map(i=>({...i,fields:qr(i.fields)})),a=await this.updateItemsApi(e,r);return await this.updateItemsInStorage(e,a)}async deleteItems(e,t){return this.deleteItemsApi(t).then(async r=>await this.deleteItemsFromStorage(e,r))}itemListeners(){this.pipeService.onRoot("gh_items_get",{},async(e,t)=>{if(t&&t.app_id){let r=await this.getItems(t.app_id);r?this.pipeService.emit("gh_items_get",t,r):this.pipeService.emit("gh_items_get",t,[])}}),this.pipeService.onRoot("gh_items_add",{},async(e,t)=>{if(t&&t.app_id&&t.items){let r=await this.addNewItems(t.app_id,t.items);r?this.pipeService.emit("gh_items_add",t,r):this.pipeService.emit("gh_items_add",t,[])}}),this.pipeService.onRoot("gh_items_update",{},async(e,t)=>{if(t&&t.app_id&&t.items){let r=await this.updateItems(t.app_id,t.items);r?this.pipeService.emit("gh_items_update",t,r):this.pipeService.emit("gh_items_update",t,[])}}),this.pipeService.onRoot("gh_item_get",{},async(e,t)=>{if(t&&t.app_id){let r=(await this.getItems(t.app_id)).find(a=>a.item_id==t.item_id);this.pipeService.emit("gh_item_get",t,r)}}),this.pipeService.onRoot("gh_filtered_items_get",{},async(e,t)=>{if(t&&t.element_app_id){let r=await this.getItems(t.element_app_id),a=await this.util.getFilteredItems(r,t.filters_list,t.element_app_id,t.app_id,t.item_id,t.field_groupe,t.search,t.search_params);this.pipeService.emit("gh_filtered_items_get",t,a)}}),this.pipeService.onRoot("gh_filter_items",{},async(e,t)=>{if(t&&t.items){let r=await this.util.getFilteredItems(t.items,t.filters_list,t.element_app_id,t.app_id,t.item_id,t.field_groupe,t.search,t.search_params);this.pipeService.emit("gh_filter_items",t,r)}})}}class Oo{constructor(e,t,r,a,i){this.storage=e,this.req=t,this.appProcessor=r,this.itemProcessor=a,this.pipeService=i,this.fieldListeners()}deleteFieldApi(e){return this.req.post({url:"/api/app/delete-field",form:{field_id:e}})}async updatedFieldApi(e,t={}){let r=await this.appProcessor.getApp(e),a={app_id:e,app_name:r.app_name,group_id:r.group_id,icon:r.icon,field_list:r.field_list.map(i=>i.field_id==t.field_id?{...i,...t}:i),views_list:r.views_list};return this.appProcessor.updateApp(a)}setFieldValueApi(e,t,r,a){let i=[{item_id:t,fields:[{field_id:r,field_value:a}]}];return this.itemProcessor.updateItems(e,i)}deleteFieldInStorage(e,t){let r=this.storage.getApp(e);return r.field_list=r.field_list.filter(a=>a.file_id!=t),r.items_list=r.items_list.map(a=>(a.fields=a.fields.filter(i=>i.field_id!=t),a)),this.storage.updateApp(r),!0}updateFieldInStorage(e,t){let r=this.storage.getApp(e);return r.field_list=r.field_list.map(a=>a.field_id==t.field_id?{...a,...t}:a),this.storage.updateApp(r),t}updateFieldValue(e,t,r,a){let i=this.storage.getApp(e);return i.items_list.forEach(l=>{l.item_id==t&&l.fields.forEach(s=>{s.field_id==r&&(s.field_value=a,i.items_object[l.item_id][s.field_id]=s)})}),this.storage.updateApp(i),a}async getField(e,t){let r=await this.appProcessor.getApp(e);if(!r)return null;for(let a=0;a<r.field_list.length;a++)if(r.field_list[a].field_id==t)return r.field_list[a];return null}async getFieldIdByNameSpace(e,t){let r=await this.appProcessor.getApp(e);if(!r)return null;for(let a=0;a<r.field_list.length;a++)if(r.field_list[a].name_space==t)return r.field_list[a].field_id;return null}async getFieldModels(e){let t=await this.appProcessor.getApp(e);return t?t.field_list:null}async updateField(e,t){if(!e||!t)return;let r=await this.updatedFieldApi(e,t);return this.updateFieldInStorage(e,r)}async deleteField(e,t){return await this.deleteFieldApi(t),this.deleteFieldInStorage(e,t)}async getFieldValue(e,t,r){let a=null,i=await this.appProcessor.getApp(e);try{a=i.items_object[t][r].field_value}catch{}return a}async setFieldValue(e,t,r,a){if(e&&t&&r)return await this.setFieldValueApi(e,t,r,a),this.updateFieldValue(e,t,r,a)}fieldListeners(){this.pipeService.onRoot("gh_value_get",{},async(e,t)=>{if(t.app_id&&t.item_id&&t.field_id){let r=await this.getFieldValue(t.app_id,t.item_id,t.field_id);this.pipeService.emit("gh_value_get",t,r)}}),this.pipeService.onRoot("gh_value_set",{},async(e,t)=>{t.item_id&&(this.setFieldValue(t.app_id,t.item_id,t.field_id,t.new_value),delete t.new_value)}),this.pipeService.onRoot("gh_model_get",{},async(e,t)=>{try{let r=await this.getField(t.app_id,t.field_id);this.pipeService.emit("gh_model_get",t,r)}catch(r){console.log("Field model: ",r)}}),this.pipeService.onRoot("gh_model_update",{},async(e,t)=>{let r=await this.updateField(t.app_id,t.field_model);this.pipeService.emit("gh_model_update",{app_id:t.app_id,field_id:t.field_id},r)}),this.pipeService.onRoot("gh_models_get",{},async(e,t)=>{let r=await this.getFieldModels(t.app_id);this.pipeService.emit("gh_models_get",t,r)}),this.pipeService.onRoot("gh_model_delete",{},async(e,t)=>{let r=await this.deleteField(t.app_id,t.field_id);this.pipeService.emit("gh_model_delete",t,r)})}}class jo{constructor(e,t,r,a){this.storage=e,this.pipeService=t,this.req=r,this.appProcessor=a}async uploadFileApi(e,t,r){try{let a={"file-0":e,app_id:t,item_id:r};return await this.req.post({url:"/file/formupload",form:a})}catch(a){return console.log(a),null}}async uploadFileFromStringApi(e){try{return await this.req.post({url:"/file/upload",form:{file:JSON.stringify(e)}})}catch(t){return console.log(t),null}}async updateFileFromStringApi(e,t,r,a,i,l,s){try{let u={file_name:r,extension:a,file_id:t,format:i,source:e,alt:l,title:s};return await this.req.post({url:"/file/update",form:{file:JSON.stringify(u)}})}catch(u){return console.log(u),null}}async duplicateFileApi(e){return this.req.post({url:"/api/new/file/duplicate",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{files:JSON.stringify(e)}})}async downloadFileFromString(e,t){if(!await this.isFileExists(e,t))return!1;{let r=await this.getFile(e,t),a=await this.req.get({url:r.url+"?timestamp="+r.last_update,externalResource:!0});return{file:r,data:a,type:"file"}}}async duplicateFile(e){let t=await this.duplicateFileApi(e);return t.forEach(r=>{this.addFileToStorage(r.app_id,r)}),t}async deleteFileApi(e){try{return await this.req.get({url:\`/file/delete?file_id=\${e}\`})}catch(t){return console.log(t),null}}addFileToStorage(e,t){let r=this.storage.getApp(e);r&&(r.file_list.push(t),this.storage.updateApp(r),this.pipeService.emit("gh_file_upload",{app_id:e,item_id:t.item_id,file_id:t.file_id},t))}addFilesToStorage(e,t){let r=this.storage.getApp(e);r&&(r.file_list.push(...t),this.storage.updateApp(r),t.forEach(a=>{this.pipeService.emit("gh_file_upload",{app_id:e,item_id:a.item_id,file_id:a.file_id},a)}))}deleteFileFromStorage(e,t){let r=this.storage.getApp(t);if(r){let a;r.file_list=r.file_list.filter(i=>i.file_id!=e||(a=i,!1)),this.storage.updateApp(r),this.pipeService.emit("gh_file_delete",{file_id:e},a)}}updateFileInStorage(e,t,r){let a=this.storage.getApp(t);a&&(a.file_list=a.file_list.map(i=>i.file_id==e?r:i),this.storage.updateApp(a),this.pipeService.emit("gh_file_update",{file_id:e}))}async getFile(e,t){let r=await this.appProcessor.getApp(e);return new Promise((a,i)=>{a(r.file_list.find(l=>l.file_id==t)||"")})}async getFiles(e,t=[]){let r=await this.appProcessor.getApp(e);return new Promise((a,i)=>{a(r.file_list.filter(l=>t.some(s=>s==l.file_id))||"")})}async uploadFile(e,t,r){let a=await this.uploadFileApi(e,t,r);return this.addFileToStorage(t,a),a}async uploadFileFromString(e){let t=await this.uploadFileFromStringApi(e);return this.addFileToStorage(t.app_id,t),t}async updateFileFromString(e,t,r,a,i,l,s){let u=await this.updateFileFromStringApi(e,t,r,a,i,l,s);return this.updateFileInStorage(t,u.app_id,u),u}async deleteFile(e,t){return await this.deleteFileApi(e),this.deleteFileFromStorage(e,t),!0}async isFileExists(e,t){let r=/^(https?:\\/\\/)?([\\da-z\\.-]+)\\.([a-z\\.]{2,6})([\\/\\w \\.-]*)*\\/?$/;if(!t)return!1;{let a=await this.getFile(e,t);return!!a&&r.test(a.url)}}}class To{constructor(e,t){this.req=e,this.pipeService=t}createDocument(e){return this.emitDocumentInsert(e),this.req.post({url:"/api/new/document/insert-one",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{document:JSON.stringify(e)}})}emitDocumentInsert(e){let t=typeof e.data=="string"?JSON.parse(e.data):e.data;this.pipeService.emit("gh_document_insert_one",{app_id:e.app_id,item_id:e.item_id,element_id:e.element_id},t)}getDocument(e){return this.req.post({url:"/api/new/document/find-one",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{document:JSON.stringify(e)}})}getDocuments(e){return this.req.post({url:"/api/new/document/find",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{document:JSON.stringify(e)}})}deleteDocument(e){return this.req.post({url:"/api/new/document/remove-one",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{document:JSON.stringify(e)}})}}class Po{constructor(e){this.gudhub=e}async getInterpretationObj(e,t,r,a,i,l){var s=[],u=t.data_model.interpretation.find(function(p){return p.src==r})||t.data_model.interpretation.find(function(p){return p.src=="table"})||{id:"default"};if(e.data_model&&e.data_model.interpretation){for(var o=0;o<e.data_model.interpretation.length;o++)(e.data_model.interpretation[o].src==r||e.data_model.interpretation[o].src==a)&&s.push(e.data_model.interpretation[o]);for(var o=0;o<s.length;o++)if(s[o].settings&&s[o].settings.condition_filter&&s[o].settings.filters_list.length>0){let m=await gudhub.getItem(l,i);if(m&&gudhub.filter([m],s[o].settings.filters_list).length>0){u=s[o];break}}else u=gudhub.mergeObjects(u,s[o])}return u}getInterpretation(e,t,r,a,i,l,s){let u=this;return new Promise(async(o,p)=>{var m=t&&t.data_type?t.data_type:r;m?gudhub.ghconstructor.getInstance(m).then(async function(d){if(d){var y=await u.getInterpretationObj(t,d.getTemplate().model,a,s,i,l);d.getInterpretation(e,y.id,m,t,i,l).then(function(f){o(gudhub.mergeObjects(f,y))},function(f){p()})}},function(d){}):console.error("Get Interpretation: data_type is undefined",r,t)})}async getInterpretationById(e,t,r,a,i=null,l=null){let s=i??await this.gudhub.getFieldValue(e,t,r),u=l??await this.gudhub.getField(e,r);if(u==null)return"";let o=await this.gudhub.ghconstructor.getInstance(u.data_type),p=await o.getInterpretation(s,a,u.data_type,u,t,e);return p.html=="<span>no interpretation</span>"?s:p.html}}var Ee=A("5xozB");function Co(n,e){switch(e.api){case"/items/update":console.log("/items/update - ",e),n.itemProcessor.updateItemsInStorage(e.app_id,e.response);break;case"/items/add":console.log("/items/add - ",e),n.itemProcessor.addItemsToStorage(e.app_id,e.response);break;case"/items/delete":console.log("/items/delete - ",e),n.itemProcessor.deleteItemsFromStorage(e.app_id,e.response);break;case"/app/update":console.log("/app/update - ",e),n.appProcessor.updateAppFieldsAndViews(e.response);break;case"/file/delete":console.log("file/delete - ",e),n.fileManager.deleteFileFromStorage(e.response.file_id,e.app_id);break;case"/file/upload":console.log("file/upload - ",e),n.fileManager.addFileToStorage(e.app_id,e.response);break;case"/file/formupload":console.log("file/formupload - ",e);break;case"/file/update":n.fileManager.updateFileInStorage(e.response.file_id,e.response.app_id,e.response),console.log("file/update - ",e);break;case"/new/file/duplicate":n.fileManager.addFilesToStorage(e.app_id,e.response),console.log("new/file/duplicate - ",e);break;case"/api/new/document/insert-one":n.documentManager.emitDocumentInsert(e.response),console.log("/api/new/document/insert-one - ",e);break;case"/ws/emit-to-user":console.log("/ws/emit-to-user - ",e);break;case"/ws/broadcast-to-app-subscribers":console.log("/ws/broadcast-to-app-subscribers - ",e);let t=JSON.parse(e.response);if(!t.data_type)return;n.ghconstructor.getInstance(t.data_type).then(r=>{r.onMessage(e.app_id,e.user_id,t)});break;default:console.warn("WEBSOCKETS is not process this API:",e.api)}}class No{constructor(e,t){this.req=t,this.gudhub=e}async createGroupApi(e){try{let t={token:await this.gudhub.auth.getToken(),group_name:e};return await this.req.post({url:"/api/sharing-group/create-group",form:t})}catch(t){return console.log(t),null}}async updateGroupApi(e,t){try{let r={token:await this.gudhub.auth.getToken(),group_name:t,group_id:e};return await this.req.post({url:"/api/sharing-group/update-group",form:r})}catch(r){return console.log(r),null}}async deleteGroupApi(e){try{let t={token:await this.gudhub.auth.getToken(),group_id:e};return await this.req.post({url:"/api/sharing-group/delete-group",form:t})}catch(t){return console.log(t),null}}async addUserToGroupApi(e,t,r){try{let a={token:await this.gudhub.auth.getToken(),group_id:e,user_id:t,group_permission:r};return await this.req.post({url:"/api/sharing-group/add-user-to-group",form:a})}catch(a){return console.log(a),null}}async getUsersByGroupApi(e){try{let t={token:await this.gudhub.auth.getToken(),group_id:e};return await this.req.post({url:"/api/sharing-group/get-users-by-group",form:t})}catch(t){return console.log(t),null}}async updateUserInGroupApi(e,t,r){try{let a={token:await this.gudhub.auth.getToken(),user_id:e,group_id:t,group_permission:r};return await this.req.post({url:"/api/sharing-group/update-user-in-group",form:a})}catch(a){return console.log(a),null}}async deleteUserFromGroupApi(e,t){try{let r={token:await this.gudhub.auth.getToken(),user_id:e,group_id:t};return await this.req.post({url:"/api/sharing-group/delete-user-from-group",form:r})}catch(r){return console.log(r),null}}async getGroupsByUserApi(e){try{let t={token:await this.gudhub.auth.getToken(),user_id:e};return await this.req.post({url:"/api/sharing-group/get-groups-by-user",form:t})}catch(t){return console.log(t),null}}}class Mo{constructor(e,t){this.req=t,this.gudhub=e}async addAppToGroupApi(e,t,r){try{let a={token:await this.gudhub.auth.getToken(),app_id:e,group_id:t,app_permission:r};return await this.req.post({url:"/api/sharing-group/add-app-to-group",form:a})}catch(a){return console.log(a),null}}async getAppsByGroupApi(e){try{let t={token:await this.gudhub.auth.getToken(),group_id:e};return await this.req.post({url:"/api/sharing-group/get-apps-by-group",form:t})}catch(t){return console.log(t),null}}async updateAppInGroupApi(e,t,r){try{let a={token:await this.gudhub.auth.getToken(),group_id:t,app_id:e,app_permission:r};return await this.req.post({url:"/api/sharing-group/update-app-in-group",form:a})}catch(a){return console.log(a),null}}async deleteAppFromGroupApi(e,t,r){try{let a={token:await this.gudhub.auth.getToken(),group_id:t,app_id:e,app_permission:r};return await this.req.post({url:"/api/sharing-group/delete-app-from-group",form:a})}catch(a){return console.log(a),null}}async getGroupsByAppApi(e){try{let t={token:await this.gudhub.auth.getToken(),app_id:e};return await this.req.post({url:"/api/sharing-group/get-groups-by-app",form:t})}catch(t){return console.log(t),null}}}class Ro{constructor(e,t,r){this.req=t,this.gudhub=e,this.pipeService=r,this.groupManager=new No(e,t),this.appGroupSharing=new Mo(e,t)}createGroup(e){return this.groupManager.createGroupApi(e)}updateGroup(e,t){return this.groupManager.updateGroupApi(e,t)}deleteGroup(e){return this.groupManager.deleteGroupApi(e)}async addUserToGroup(e,t,r){let a=await this.groupManager.addUserToGroupApi(e,t,r);return this.pipeService.emit("group_members_add",{app_id:"group_sharing"},a),a}getUsersByGroup(e){return this.groupManager.getUsersByGroupApi(e)}async updateUserInGroup(e,t,r){let a=await this.groupManager.updateUserInGroupApi(e,t,r);return this.pipeService.emit("group_members_update",{app_id:"group_sharing"},a),a}async deleteUserFromGroup(e,t){let r=await this.groupManager.deleteUserFromGroupApi(e,t);return this.pipeService.emit("group_members_delete",{app_id:"group_sharing"},r),r}getGroupsByUser(e){return this.groupManager.getGroupsByUserApi(e)}addAppToGroup(e,t,r){return this.appGroupSharing.addAppToGroupApi(e,t,r)}getAppsByGroup(e){return this.appGroupSharing.getAppsByGroupApi(e)}updateAppInGroup(e,t,r){return this.appGroupSharing.updateAppInGroupApi(e,t,r)}deleteAppFromGroup(e,t,r){return this.appGroupSharing.deleteAppFromGroupApi(e,t,r)}getGroupsByApp(e){return this.appGroupSharing.getGroupsByAppApi(e)}}class Fo{constructor(e,t){this.req=t,this.gudhub=e}async add(e,t,r){try{let a={token:await this.gudhub.auth.getToken(),app_id:e,user_id:t,sharing_permission:r};return await this.req.post({url:"/sharing/add",form:a})}catch(a){return console.log(a),null}}async update(e,t,r){try{let a={token:await this.gudhub.auth.getToken(),app_id:e,user_id:t,sharing_permission:r};return await this.req.post({url:"/sharing/update",form:a})}catch(a){return console.log(a),null}}async delete(e,t){try{let r={token:await this.gudhub.auth.getToken(),app_id:e,user_id:t};return await this.req.post({url:"/sharing/delete",form:r})}catch(r){return console.log(r),null}}async getAppUsers(e){try{let t={token:await this.gudhub.auth.getToken(),app_id:e};return await this.req.post({url:"/sharing/get-app-users",form:t})}catch(t){return console.log(t),null}}async addInvitation(e,t){try{let r={token:await this.gudhub.auth.getToken(),guests_emails:e,apps:t};return await this.req.post({url:"/api/invitation/add",form:r})}catch(r){return console.log(r),null}}}class Lo{constructor(e){this.gudhub=e}async emitToUser(e,t){let r={user_id:e,data:typeof t=="object"?JSON.stringify(t):t};return await this.gudhub.req.post({url:"/ws/emit-to-user",form:r})}async broadcastToAppSubscribers(e,t,r){let a={app_id:e,data:JSON.stringify({data_type:t,data:r})};return await this.gudhub.req.post({url:"/ws/broadcast-to-app-subscribers",form:a})}}class Do{constructor(e,t={server_url:ia,wss_url:sa,node_server_url:oa,initWebsocket:!1,activateSW:!1,swLink:"",async_modules_path:la,file_server_url:ua,automation_modules_path:ca,accesstoken:this.accesstoken,expirydate:this.expirydate}){if(this.serialized={authKey:e,options:t},this.config=t,this.ghconstructor=new Ao(this),this.interpritate=new Po(this),this.pipeService=new Ci,this.storage=new Mi(t.async_modules_path,t.file_server_url,t.automation_modules_path),this.util=new So(this),this.req=new Ti(t.server_url),this.auth=new xo(this.req,this.storage),this.sharing=new Fo(this,this.req),this.groupSharing=new Ro(this,this.req,this.pipeService),e?this.storage.setUser({auth_key:e}):t.accesstoken&&t.expirydate&&this.storage.setUser({accesstoken:t.accesstoken,expirydate:t.expirydate}),this.req.init(this.auth.getToken.bind(this.auth)),this.ws=new Ri(t.wss_url,this.auth),this.initializeAppProcessor(),this.itemProcessor=new Io(this.storage,this.pipeService,this.req,this.appProcessor,this.util),this.fieldProcessor=new Oo(this.storage,this.req,this.appProcessor,this.itemProcessor,this.pipeService),this.fileManager=new jo(this.storage,this.pipeService,this.req,this.appProcessor),this.documentManager=new To(this.req,this.pipeService),this.websocketsemitter=new Lo(this),t.initWebsocket){let r=this;this.ws.initWebSocket(Co.bind(this,r),this.appProcessor.refreshApps.bind(this.appProcessor))}t.activateSW&&this.activateSW(t.swLink)}initializeAppProcessor(){this.appProcessor=new Dr(this.storage,this.pipeService,this.req,this.ws,this.util,this.config.activateSW,new Dt(this.req,Or,this))}async activateSW(e){if(Ee.IS_BROWSER_MAIN_THREAD&&"serviceWorker"in window.navigator)try{let t=await window.navigator.serviceWorker.register(e);t.update().then(()=>console.log("%cSW ->>> Service worker successful updated","display: inline-block ; background-color: #689f38 ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;")).catch(()=>console.warn("SW ->>> Service worker is not updated")),console.log("%cSW ->>> Service worker is registered","display: inline-block ; background-color: #689f38 ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;",t)}catch(t){console.warn("%cSW ->>> Service worker is not registered","display: inline-block ; background-color: #d32f2f ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;",t)}else console.log("%cSW ->>> ServiceWorkers not supported","display: inline-block ; background-color: #d32f2f ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;")}on(e,t,r){return this.pipeService.on(e,t,r),this}emit(e,t,r,a){return this.pipeService.emit(e,t,r,a),this}destroy(e,t,r){return this.pipeService.destroy(e,t,r),this}prefilter(e,t){return this.util.prefilter(e,t)}debounce(e,t){return this.util.debounce(e,t)}emitToUser(e,t){return this.websocketsemitter.emitToUser(e,t)}broadcastToAppSubscribers(e,t,r){return this.websocketsemitter.broadcastToAppSubscribers(e,t,r)}getInterpretation(e,t,r,a,i,l,s){return this.interpritate.getInterpretation(e,t,r,a,i,l,s)}getInterpretationById(e,t,r,a,i,l){return this.interpritate.getInterpretationById(e,t,r,a,i,l)}filter(e,t){return this.util.filter(e,t)}mergeFilters(e,t){return this.util.mergeFilters(e,t)}group(e,t){return this.util.group(e,t)}getFilteredItems(e,t,r={}){return this.util.getFilteredItems(e,t,r.element_app_id,r.app_id,r.item_id,r.field_group,r.search,r.search_params)}sortItems(e,t){return this.util.sortItems(e,t)}triggerAppChange(e,t,r){this.itemProcessor.handleItemsChange(e,t,r),this.appProcessor.handleAppChange(e,t,r)}triggerIemsChange(e,t){this.itemProcessor.triggerItemsChange(e,t)}jsonToItems(e,t){return this.util.jsonToItems(e,t)}getDate(e){return this.util.getDate(e)}populateWithDate(e,t){return this.util.populateWithDate(e,t)}checkRecurringDate(e,t){return this.util.checkRecurringDate(e,t)}populateItems(e,t,r){return this.util.populateItems(e,t,r)}populateWithItemRef(e,t,r,a,i,l){return this.util.populateWithItemRef(e,t,r,a,i,l)}compareItems(e,t,r){return this.util.compareItems(e,t,r)}mergeItems(e,t,r){return this.util.mergeItems(e,t,r)}mergeObjects(e,t){return this.util.mergeObjects(e,t)}makeNestedList(e,t,r,a,i){return this.util.makeNestedList(e,t,r,a,i)}jsonConstructor(e,t,r,a){return this.util.jsonConstructor(e,t,r,a)}getAppsList(){return this.appProcessor.getAppsList()}getAppInfo(e){return this.appProcessor.getAppInfo(e)}deleteApp(e){return this.appProcessor.deleteApp(e)}getApp(e){return this.appProcessor.getApp(e)}updateApp(e){return this.appProcessor.updateApp(e)}updateAppInfo(e){return this.appProcessor.updateAppInfo(e)}createNewApp(e){return this.appProcessor.createNewApp(e)}getItems(e){return this.itemProcessor.getItems(e)}async getItem(e,t){let r=await this.getItems(e);if(r)return r.find(a=>a.item_id==t)}addNewItems(e,t){return this.itemProcessor.addNewItems(e,t)}updateItems(e,t){return this.itemProcessor.updateItems(e,t)}deleteItems(e,t){return this.itemProcessor.deleteItems(e,t)}getField(e,t){return this.fieldProcessor.getField(e,t)}getFieldIdByNameSpace(e,t){return this.fieldProcessor.getFieldIdByNameSpace(e,t)}getFieldModels(e){return this.fieldProcessor.getFieldModels(e)}updateField(e,t){return this.fieldProcessor.updateField(e,t)}deleteField(e,t){return this.fieldProcessor.deleteField(e,t)}getFieldValue(e,t,r){return this.fieldProcessor.getFieldValue(e,t,r)}setFieldValue(e,t,r,a){return this.fieldProcessor.setFieldValue(e,t,r,a)}getFile(e,t){return this.fileManager.getFile(e,t)}getFiles(e,t){return this.fileManager.getFiles(e,t)}uploadFile(e,t,r){return this.fileManager.uploadFile(e,t,r)}uploadFileFromString(e,t,r,a,i,l,s){return this.fileManager.uploadFileFromString(e,t,r,a,i,l,s)}updateFileFromString(e,t,r,a,i,l,s){return this.fileManager.updateFileFromString(e,t,r,a,i,l,s)}deleteFile(e,t){return this.fileManager.deleteFile(e,t)}duplicateFile(e){return this.fileManager.duplicateFile(e)}downloadFileFromString(e,t){return this.fileManager.downloadFileFromString(e,t)}createDocument(e){return this.documentManager.createDocument(e)}getDocument(e){return this.documentManager.getDocument(e)}getDocuments(e){return this.documentManager.getDocuments(e)}deleteDocument(e){return this.documentManager.deleteDocument(e)}login(e){return this.auth.login(e)}loginWithToken(e){return this.auth.loginWithToken(e)}logout(e){return this.appProcessor.clearAppProcessor(),this.auth.logout(e)}signup(e){return this.auth.signup(e)}getUsersList(e){return this.auth.getUsersList(e)}updateToken(e){return this.auth.updateToken(e)}avatarUploadApi(e){return this.auth.avatarUploadApi(e)}getVersion(){return this.auth.getVersion()}getUserById(e){return this.auth.getUserById(e)}getToken(){return this.auth.getToken()}updateUser(e){return this.auth.updateUser(e)}updateAvatar(e){return this.auth.updateAvatar(e)}}class qo extends Do{initializeAppProcessor(){this.appProcessor=new Dr(this.storage,this.pipeService,this.req,this.ws,this.util,!1,new Qe(this.req,null,this))}}let Ue={},mt={},Hn={};self.onmessage=async function(n){if(n.data.type==="init"&&(n.data.gudhubSerialized.options.initWebsocket=!1,mt=new Wt((Ue=new qo(n.data.gudhubSerialized.authKey,n.data.gudhubSerialized.options)).req,vt,Ue),Hn=new at(Ue.req,wt,Ue)),n.data.type==="processData"){let e=await mt.getCached(n.data.id),t=e.chunks,r=await mt.getAppWithoutProcessing(n.data.id),a=!0;if(t.length!=r.chunks.length&&(a=!1),r.chunks.some(u=>!t.includes(u))&&(a=!1),!a){let u=await Hn.getCachedMergedChunk(n.data.id,e.chunks);u&&(e.items_list=await Ue.util.mergeChunks([u,e])),r=await mt.getApp(n.data.id)}let i=Ue.compareItems(r.items_list,e.items_list),l=Ue.util.areViewListsEqual(e.views_list,r.views_list),s=Ue.util.areFieldListsEqual(e.field_list,r.field_list);this.postMessage({id:n.data.id,compareRes:i,newVersion:r,type:n.data.type,viewListChanged:l,fieldListChanged:s})}if(n.data.type==="requestApp"){let e=await mt.getApp(n.data.id);this.postMessage({id:n.data.id,type:n.data.type,data:e})}}})()})();
|
|
195
|
-
`,blob=typeof self<"u"&&self.Blob&&new Blob([jsContent],{type:"text/javascript;charset=utf-8"});function WorkerWrapper(n){let e;try{if(e=blob&&(self.URL||self.webkitURL).createObjectURL(blob),!e)throw"";const t=new Worker(e,{name:n==null?void 0:n.name});return t.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),t}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(jsContent),{name:n==null?void 0:n.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class IndexedDBAppService extends AppDataService$1{constructor(e,t,r){super(e,t,r),this.dataService=new AppHttpService(e,t,r),this.requestCache=new Map,this.gudhub=r,this.resolveFnMap=new Map,this.appRequestAndProcessWorker=new WorkerWrapper,this.appRequestAndProcessWorker.postMessage({type:"init",gudhubSerialized:this.gudhub.serialized});let i=this;this.appRequestAndProcessWorker.onerror=function(a){},this.appRequestAndProcessWorker.onmessage=function(a){a.data.type=="requestApp"&&i.resolveFnMap.has(a.data.id)&&i.resolveFnMap.get(a.data.id)(a.data.data),a.data.type=="processData"&&(i.gudhub.itemProcessor.handleDiff(a.data.id,a.data.compareRes),(a.data.viewListChanged||a.data.fieldListChanged)&&i.gudhub.appProcessor.updateAppFieldsAndViews(a.data.newVersion))},this.storeManager=new AppStoreManager}static[Symbol.hasInstance](e){try{return e instanceof IndexedDBAppService||e instanceof IndexedDBService}catch{return!1}}isWithCache(){return!1}async getApp(e){if(this.requestCache.has(e))return this.requestCache.get(e);let t=this;await this.has(e);{let r=new Promise((i,a)=>{t.resolveFnMap.set(e,i)});return this.requestCache.set(e,r),this.appRequestAndProcessWorker.postMessage({type:"requestApp",id:e}),r}}async getCached(e){return this.storeManager.getApp(e)}async has(e){try{return this.storeManager.hasApp(e)}catch{debugger}}async putApp(e,t){return this.storeManager.putApp(e,t)}}let AppDataService,ChunkDataService,appDataServiceConf,chunkDataServiceConf;IS_BROWSER&&cache_chunk_requests?(ChunkDataService=IndexedDBChunkService,chunkDataServiceConf=chunksConf):ChunkDataService=ChunkHttpService,IS_BROWSER&&cache_app_requests?(AppDataService=IndexedDBAppService,appDataServiceConf=appsConf):AppDataService=AppHttpService;class GudHub{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{server_url,wss_url,node_server_url,initWebsocket:!1,activateSW:!1,swLink:"",async_modules_path,file_server_url,automation_modules_path,accesstoken:this.accesstoken,expirydate:this.expirydate};if(this.serialized={authKey:e,options:t},this.config=t,this.ghconstructor=new GHConstructor(this),this.interpritate=new Interpritate(this),this.pipeService=new PipeService,this.storage=new Storage(t.async_modules_path,t.file_server_url,t.automation_modules_path),this.util=new Utils(this),this.req=new GudHubHttpsService(t.server_url),this.auth=new Auth(this.req,this.storage),this.sharing=new Sharing(this,this.req),this.groupSharing=new GroupSharing(this,this.req,this.pipeService),e?this.storage.setUser({auth_key:e}):t.accesstoken&&t.expirydate&&this.storage.setUser({accesstoken:t.accesstoken,expirydate:t.expirydate}),this.req.init(this.auth.getToken.bind(this.auth)),this.ws=new WebSocketApi(t.wss_url,this.auth),this.initializeAppProcessor(),this.itemProcessor=new ItemProcessor(this.storage,this.pipeService,this.req,this.appProcessor,this.util),this.fieldProcessor=new FieldProcessor(this.storage,this.req,this.appProcessor,this.itemProcessor,this.pipeService),this.fileManager=new FileManager(this.storage,this.pipeService,this.req,this.appProcessor),this.documentManager=new DocumentManager(this.req,this.pipeService),this.websocketsemitter=new WebSocketEmitter(this),t.initWebsocket){const r=this;this.ws.initWebSocket(WebsocketHandler.bind(this,r),this.appProcessor.refreshApps.bind(this.appProcessor))}t.activateSW&&this.activateSW(t.swLink)}initializeAppProcessor(){this.appProcessor=new AppProcessor(this.storage,this.pipeService,this.req,this.ws,this.util,this.config.activateSW,new AppDataService(this.req,appDataServiceConf,this))}async activateSW(e){if(IS_BROWSER_MAIN_THREAD&&"serviceWorker"in window.navigator)try{const t=await window.navigator.serviceWorker.register(e);t.update().then(()=>console.log("%cSW ->>> Service worker successful updated","display: inline-block ; background-color: #689f38 ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;")).catch(()=>console.warn("SW ->>> Service worker is not updated")),console.log("%cSW ->>> Service worker is registered","display: inline-block ; background-color: #689f38 ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;",t)}catch(t){console.warn("%cSW ->>> Service worker is not registered","display: inline-block ; background-color: #d32f2f ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;",t)}else console.log("%cSW ->>> ServiceWorkers not supported","display: inline-block ; background-color: #d32f2f ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;")}on(e,t,r){return this.pipeService.on(e,t,r),this}emit(e,t,r,i){return this.pipeService.emit(e,t,r,i),this}destroy(e,t,r){return this.pipeService.destroy(e,t,r),this}prefilter(e,t){return this.util.prefilter(e,t)}debounce(e,t){return this.util.debounce(e,t)}emitToUser(e,t){return this.websocketsemitter.emitToUser(e,t)}broadcastToAppSubscribers(e,t,r){return this.websocketsemitter.broadcastToAppSubscribers(e,t,r)}getInterpretation(e,t,r,i,a,s,l){return this.interpritate.getInterpretation(e,t,r,i,a,s,l)}getInterpretationById(e,t,r,i,a,s){return this.interpritate.getInterpretationById(e,t,r,i,a,s)}filter(e,t){return this.util.filter(e,t)}mergeFilters(e,t){return this.util.mergeFilters(e,t)}group(e,t){return this.util.group(e,t)}getFilteredItems(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.util.getFilteredItems(e,t,r.element_app_id,r.app_id,r.item_id,r.field_group,r.search,r.search_params)}sortItems(e,t){return this.util.sortItems(e,t)}triggerAppChange(e,t,r){this.itemProcessor.handleItemsChange(e,t,r),this.appProcessor.handleAppChange(e,t,r)}triggerIemsChange(e,t){this.itemProcessor.triggerItemsChange(e,t)}jsonToItems(e,t){return this.util.jsonToItems(e,t)}getDate(e){return this.util.getDate(e)}populateWithDate(e,t){return this.util.populateWithDate(e,t)}checkRecurringDate(e,t){return this.util.checkRecurringDate(e,t)}populateItems(e,t,r){return this.util.populateItems(e,t,r)}populateWithItemRef(e,t,r,i,a,s){return this.util.populateWithItemRef(e,t,r,i,a,s)}compareItems(e,t,r){return this.util.compareItems(e,t,r)}mergeItems(e,t,r){return this.util.mergeItems(e,t,r)}mergeObjects(e,t){return this.util.mergeObjects(e,t)}makeNestedList(e,t,r,i,a){return this.util.makeNestedList(e,t,r,i,a)}jsonConstructor(e,t,r,i){return this.util.jsonConstructor(e,t,r,i)}getAppsList(){return this.appProcessor.getAppsList()}getAppInfo(e){return this.appProcessor.getAppInfo(e)}deleteApp(e){return this.appProcessor.deleteApp(e)}getApp(e){return this.appProcessor.getApp(e)}updateApp(e){return this.appProcessor.updateApp(e)}updateAppInfo(e){return this.appProcessor.updateAppInfo(e)}createNewApp(e){return this.appProcessor.createNewApp(e)}getItems(e){return this.itemProcessor.getItems(e)}async getItem(e,t){const r=await this.getItems(e);if(r)return r.find(i=>i.item_id==t)}addNewItems(e,t){return this.itemProcessor.addNewItems(e,t)}updateItems(e,t){return this.itemProcessor.updateItems(e,t)}deleteItems(e,t){return this.itemProcessor.deleteItems(e,t)}getField(e,t){return this.fieldProcessor.getField(e,t)}getFieldIdByNameSpace(e,t){return this.fieldProcessor.getFieldIdByNameSpace(e,t)}getFieldModels(e){return this.fieldProcessor.getFieldModels(e)}updateField(e,t){return this.fieldProcessor.updateField(e,t)}deleteField(e,t){return this.fieldProcessor.deleteField(e,t)}getFieldValue(e,t,r){return this.fieldProcessor.getFieldValue(e,t,r)}setFieldValue(e,t,r,i){return this.fieldProcessor.setFieldValue(e,t,r,i)}getFile(e,t){return this.fileManager.getFile(e,t)}getFiles(e,t){return this.fileManager.getFiles(e,t)}uploadFile(e,t,r){return this.fileManager.uploadFile(e,t,r)}uploadFileFromString(e,t,r,i,a,s,l){return this.fileManager.uploadFileFromString(e,t,r,i,a,s,l)}updateFileFromString(e,t,r,i,a,s,l){return this.fileManager.updateFileFromString(e,t,r,i,a,s,l)}deleteFile(e,t){return this.fileManager.deleteFile(e,t)}duplicateFile(e){return this.fileManager.duplicateFile(e)}downloadFileFromString(e,t){return this.fileManager.downloadFileFromString(e,t)}createDocument(e){return this.documentManager.createDocument(e)}getDocument(e){return this.documentManager.getDocument(e)}getDocuments(e){return this.documentManager.getDocuments(e)}deleteDocument(e){return this.documentManager.deleteDocument(e)}login(e){return this.auth.login(e)}loginWithToken(e){return this.auth.loginWithToken(e)}logout(e){return this.appProcessor.clearAppProcessor(),this.auth.logout(e)}signup(e){return this.auth.signup(e)}getUsersList(e){return this.auth.getUsersList(e)}updateToken(e){return this.auth.updateToken(e)}avatarUploadApi(e){return this.auth.avatarUploadApi(e)}getVersion(){return this.auth.getVersion()}getUserById(e){return this.auth.getUserById(e)}getToken(){return this.auth.getToken()}updateUser(e){return this.auth.updateUser(e)}updateAvatar(e){return this.auth.updateAvatar(e)}}return GudHub});
|
|
194
|
+
});\`}function $o(n,e,t,r,a){async function i(d,y,f){let S=null;if(d.type==="array"&&(S=Number(d.is_static)?Array(await u(d.childs,y,f)):await l(d,y,f)),d.type==="object"&&(S=Number(d.current_item)?await s(d,y):await u(d.childs,y,f)),d.type==="property"&&(S=await o(d,y,f)),typeof d=="object"&&d.type===void 0){let v={};for(let w in d)if(d.hasOwnProperty(w)){let g=d[w],_=await i(g,y,f);v[w]=_[g.property_name]}return v}return{[d.property_name]:S}}async function l(d,y,f){let S=await t.gudhub.getApp(Number(d.app_id)),v=await m(d.filter,S.items_list,f,y);if(d.isSortable&&d.field_id_to_sort&&d.field_id_to_sort!==""){let w=v.flatMap(_=>{let $=_.fields.find(x=>x.field_id==d.field_id_to_sort);return $&&$.field_value!=""?_:[]}),g=v.filter(_=>{if(!w.includes(_))return _});v=[...w=w.sort((_,$)=>d.sortType=="desc"?$.fields.find(x=>x.field_id==d.field_id_to_sort).field_value-_.fields.find(x=>x.field_id==d.field_id_to_sort).field_value:_.fields.find(x=>x.field_id==d.field_id_to_sort).field_value-$.fields.find(x=>x.field_id==d.field_id_to_sort).field_value),...g]}if(d.offset){let w;w=d.use_variables_for_limit_and_offset&&r?r[d.offset]:/^[0-9]+$/.test(d.offset)?d.offset:0,v=v.slice(w)}if(d.limit){let w;(w=d.use_variables_for_limit_and_offset&&r?r[d.limit]:/^[0-9]+$/.test(d.limit)||0)!==0&&(v=v.slice(0,w))}return Promise.all(v.map(async w=>u(d.childs,w,S.app_id)))}async function s(d,y){let f=await t.gudhub.getApp(d.app_id),S=f.items_list||[];return u(d.childs,y||S[0],f.app_id)}async function u(d,y,f){let S=await d.map(async v=>i(v,y,f));return(await Promise.all(S)).reduce((v,w)=>({...v,...w}),{})}async function o(d,y,f){switch(d.property_type){case"static":return d.static_field_value;case"variable":return d.variable_type==="app_id"?f:\`\${f}.\${y.item_id}\`;case"field_id":return d.field_id;case"function":return typeof d.function=="function"?d.function(y,f,t.gudhub,...d.args):await Function("item, appId, gudhub","return (async "+d.function+")(item, appId, gudhub)")(y,f,t.gudhub);default:return!d.field_id&&d.name_space&&(d.field_id=await t.gudhub.getFieldIdByNameSpace(f,d.name_space)),Number(d.interpretation)?await t.gudhub.getInterpretationById(Number(f),Number(y.item_id),Number(d.field_id),"value"):await t.gudhub.getFieldValue(Number(f),Number(y.item_id),Number(d.field_id))}}async function p(d,y,f,S,v){let w=await t.gudhub.prefilter(JSON.parse(JSON.stringify(d)),{element_app_id:y,app_id:f,item_id:S,...r});return t.gudhub.filter(v,[...w,...d])}async function m(d=[],y=[],f="",S={}){return d.length?p(d,f,f,S.item_id,y):[...y]}return i(n,e,a)}class So{constructor(e){this.gudhub=e,this.appsConnectingMap={apps:[],fields:[],items:[],views:[]}}createAppsFromTemplate(e,t,r,a){let i=this;return new Promise(l=>{let s=100/(6*e.apps.length),u=0;i.createApps(e,o=>{u+=1,r&&r.call(this,{percent:u*s,status:o})},a).then(o=>{i.createItems(o,t,p=>{typeof p=="string"?(u+=1,r&&r.call(this,{percent:u*s,status:p})):typeof p=="object"&&(r&&r.call(this,{status:"Done",apps:p}),l())},a)})})}createItems(e,t,r,a){return new Promise(async i=>{let l=t||1e5,s=this,u=[],o=[],{accesstoken:p}=await s.gudhub.req.axiosRequest({method:"POST",url:"https://gudhub.com/GudHub_Test/auth/login",form:{auth_key:"3HMOtCbC0M/1/1e4y4Uxo/Kh/aFN4V5LG2//5ixx7TZyiUfMb7IHAAHCj9PsLrOSDrZuuWkbX4BIX23f51H+eA=="}});e.forEach(m=>{o.push(new Promise(async d=>{let y;y=a?await s.gudhub.req.axiosRequest({url:\`https://gudhub.com/GudHub_Test/api/app/get?token=\${p}&app_id=\${s._searchOldAppId(m.app_id,s.appsConnectingMap.apps)}\`,method:"GET"}):await s.gudhub.getApp(s._searchOldAppId(m.app_id,s.appsConnectingMap.apps)),r&&r.call(this,\`GET APP: \${y.app_name} (Items steps)\`);let f=JSON.parse(JSON.stringify(y)),S=f.items_list.map(v=>({index_number:v.index_number,item_id:0,fields:[]})).filter((v,w)=>w<=l);s.gudhub.addNewItems(m.app_id,S).then(v=>{r&&r.call(this,\`ADD NEW ITEMS: \${y.app_name} (Items steps)\`),m.items_list=v,s._updateMap(m.items_list,f.items_list),s._addFieldValue(f.items_list,m.items_list,s.appsConnectingMap),u.push(m),d()})}))}),Promise.all(o).then(()=>{u.forEach(m=>{m.items_list.forEach(d=>{d.fields.forEach(y=>{s.appsConnectingMap.fields.forEach(f=>{y.field_id===f.old_field_id&&(y.field_id=f.new_field_id,y.element_id=f.new_field_id)})})})}),s.deleteField(u),s.replaceValue(u,s.appsConnectingMap).then(()=>{let m=[];u.forEach(d=>{m.push(new Promise(y=>{let f=d.items_list.map(S=>(S.fields.forEach(v=>{delete v.data_id}),S));s.gudhub.updateItems(d.app_id,f).then(()=>{r&&r.call(this,\`REPLACE VALUE: \${d.app_name} (Items steps)\`),y()})}))}),Promise.all(m).then(()=>{r.call(this,u),i()})})})})}deleteField(e){e.forEach(t=>{t.items_list.forEach(r=>{r.fields=r.fields.filter(a=>t.field_list.findIndex(i=>i.field_id==a.field_id)>-1)})})}replaceValue(e,t){return new Promise(async r=>{let a=[],i=this;e.forEach(l=>{l.field_list.forEach(s=>{s.data_type==="item_ref"&&i._replaceValueItemRef(l,s,t),a.push(new Promise(u=>{i.gudhub.ghconstructor.getInstance(s.data_type).then(o=>{if(o===void 0){console.log("ERROR WHILE GETTING INSTANCE OF ",s.data_type),u({type:s.data_type});return}if(o.getTemplate().constructor=="file")return i.gudhub.util.fileInstallerHelper(l.app_id,l.items_list,s.field_id).then(p=>{u(p)});o.getTemplate().constructor=="document"?i.documentInstallerHelper(l.app_id,l.items_list,s.field_id).then(p=>{u(o)}):u(o)})}))})}),a.length>0?Promise.all(a).then(l=>{r(l)}):r(result)})}documentInstallerHelper(e,t,r){let a=this,i=[];return new Promise(async l=>{for(let s of t){let u=s.item_id,o=s.fields.find(p=>p.element_id===r);if(o&&o.field_value&&o.field_value.length>0){let p=await a.gudhub.getDocument({_id:o.field_value});if(p&&p.data){let m=await a.gudhub.createDocument({app_id:e,item_id:u,element_id:r,data:p.data});o.field_value=m._id,i.push(s)}}}l(i)})}_replaceValueItemRef(e,t,r){e.items_list.forEach(a=>{a.fields.forEach(i=>{if(i.field_id===t.field_id&&i.field_value){let l=i.field_value.split(",");l.forEach((s,u)=>{let o=s.split(".");r.apps.forEach(p=>{o[0]==p.old_app_id&&(o[0]=p.new_app_id)}),r.items.forEach(p=>{o[1]==p.old_item_id&&(o[1]=p.new_item_id)}),l[u]=o.join(".")}),i.field_value=l.join(",")}})})}_addFieldValue(e,t,r){t.forEach(a=>{r.items.forEach(i=>{a.item_id===i.new_item_id&&e.forEach(l=>{i.old_item_id===l.item_id&&(a.fields=l.fields)})})})}_updateMap(e,t){t.forEach(r=>{e.forEach(a=>{r.index_number===a.index_number&&this.appsConnectingMap.items.push({old_item_id:r.item_id,new_item_id:a.item_id})})})}_searchOldAppId(e,t){let r=0;return t.forEach(a=>{a.new_app_id===e&&(r=a.old_app_id)}),r}createApps(e,t,r){let a=this,i={step_size:100/(3*e.apps.length),apps:[]};return new Promise(async l=>{let s={},u=[],o=[],{accesstoken:p}=await a.gudhub.req.axiosRequest({method:"POST",url:"https://gudhub.com/GudHub_Test/auth/login",form:{auth_key:"3HMOtCbC0M/1/1e4y4Uxo/Kh/aFN4V5LG2//5ixx7TZyiUfMb7IHAAHCj9PsLrOSDrZuuWkbX4BIX23f51H+eA=="}});for(let m of e.apps){let d;d=r?await a.gudhub.req.axiosRequest({url:\`https://gudhub.com/GudHub_Test/api/app/get?token=\${p}&app_id=\${m}\`,method:"GET"}):await a.gudhub.getApp(m),t&&t.call(this,\`GET APP: \${d.app_name} (App steps)\`);let y=JSON.parse(JSON.stringify(d));s[y.app_id]=y,i.apps.push(y.icon);let f=a.prepareAppTemplate(y);f.app_name=f.app_name+" New",f.privacy=1,e.data_to_change&&(e.data_to_change.name&&(f.app_name=e.data_to_change.name),e.data_to_change.icon&&(f.icon=e.data_to_change.icon)),a.resetViewsIds(f),a.gudhub.createNewApp(f).then(S=>{t&&t.call(this,\`CREATE NEW APP: \${d.app_name} (App steps)\`),u.push(S),a.mapApp(y,S,a.appsConnectingMap),e.apps.length==u.length&&(a.connectApps(u,a.appsConnectingMap,s),u.forEach(v=>{a.gudhub.updateApp(v).then(w=>{t&&t.call(this,\`UPDATE APP: \${d.app_name} (App steps)\`),o.push(w),e.apps.length==o.length&&l(o)})}))})}})}mapApp(e,t,r){r.apps.push({old_app_id:e.app_id,new_app_id:t.app_id,old_view_init:e.view_init,new_view_init:t.view_init}),e.field_list.forEach(a=>{t.field_list.forEach(i=>{a.name_space==i.name_space&&r.fields.push({name_space:a.name_space,old_field_id:a.field_id,new_field_id:i.field_id})})}),e.views_list.forEach(a=>{t.views_list.forEach(i=>{a.name==i.name&&r.views.push({name:a.name,old_view_id:a.view_id,new_view_id:i.view_id})})})}crawling(e,t){let r=e===null?[]:Object.keys(e),a=this;r.length>0&&r.forEach(i=>{let l=e[i];l!==void 0&&typeof e!="string"&&(t(i,l,e),a.crawling(l,t))})}resetViewsIds(e){e.view_init=0,this.crawling(e.views_list,function(t,r,a){(t=="view_id"||t=="container_id")&&(a[t]=0)})}connectApps(e,t,r){let a=this;return e.forEach(i=>{t.apps.forEach(l=>{i.view_init===l.new_view_init&&t.views.forEach(s=>{l.old_view_init===s.old_view_id&&(i.view_init=s.new_view_id)})}),a.crawling(i.field_list,function(l,s,u){if(l.indexOf("field_id")!==-1||l.indexOf("FieldId")!==-1||l.indexOf("destination_field")!==-1){let o=String(s).split(","),p=[];t.fields.forEach(m=>{o.forEach(d=>{d==m.old_field_id&&p.push(m.new_field_id)})}),p.length&&(u[l]=p.join(","))}if((l.indexOf("app_id")!=-1||l.indexOf("AppId")!=-1||l.indexOf("destination_app")!=-1)&&t.apps.forEach(o=>{s==o.old_app_id&&(u[l]=o.new_app_id)}),l.indexOf("view_id")!==-1&&t.views.forEach(o=>{s==o.old_view_id&&(u[l]=o.new_view_id)}),l.indexOf("src")!==-1&&isFinite(s)){let o="container_id",p=t.apps.find(d=>d.new_app_id===i.app_id).old_app_id,m=a.findPath(r[p].views_list,o,s);u[l]=\`\${a.getValueByPath(i.views_list,m,o)}\`}if(l.indexOf("trigger")!==-1&&s.model&&s.model.nodes){let o=s.model.nodes,p=["inputs","outputs"];for(let m in o)p.forEach(d=>{let y=o[m];Object.keys(y[d]).filter(f=>f!==""&&!isNaN(f)).forEach(f=>{let S=t.fields.filter(v=>v.old_field_id==f);if(S.length!==0&&S[0].new_field_id){let v=S[0].new_field_id.toString(),w=y[d][f];w.connections.forEach(g=>{g.input==f&&(g.input=v),g.output==f&&(g.output=v)}),delete y[d][f],y[d][v]=w}})})}})}),e}getValueByPath(e,t,r){let a=e;return t.split(".").forEach(i=>{a=a[i]}),a[r]}findPath(e,t,r){let a=this,i=!1,l=!1,s=[];return a.crawling(e,function(u,o,p){l&&s.reverse().forEach(m=>{l&&(m.delete=!0,m.parent===p&&(l=!1,(s=s.filter(d=>!d.delete)).reverse()))}),i||(typeof p[u]=="object"&&s.push({prop:u,parent:p}),o==r&&t===u?i=!0:Object.keys(p).pop()!==u||typeof p[u]=="object"||(l=!0))}),s.map(u=>u.prop).join(".")}prepareAppTemplate(e){let t=this,r=JSON.parse(JSON.stringify(e));return t.crawling(r.views_list,function(a,i,l){a=="element_id"&&(l.element_id=-Number(i),l.create_element=-Number(i))}),r.field_list.forEach(a=>{a.create_field=-Number(a.field_id),a.element_id=-Number(a.field_id),a.field_id=-Number(a.field_id),a.field_value=""}),r.items_list=[],delete r.app_id,delete r.icon.id,delete r.group_id,delete r.trash,delete r.last_update,delete r.file_list,r}}class xo{constructor(e){this.gudhub=e}fileInstallerHelper(e,t,r){let a=this;return new Promise(i=>{let l=[[]],s=Promise.resolve(),u=[];t.forEach(o=>{let p=o.item_id,m=o.fields.find(d=>d.element_id===r);m&&m.field_value&&m.field_value.split(".").forEach(d=>{let y={source:d,destination:{app_id:e,item_id:p,element_id:r}};l[l.length-1].length!==10?l[l.length-1].push(y):l.push([y])})}),l.forEach(o=>{s=s.then(()=>a.gudhub.duplicateFile(o)).then(p=>{u=[...u,...p]})}),s.then(()=>{t.forEach(o=>{let p=o.item_id,m=o.fields.find(d=>d.element_id===r);m&&m.field_value&&(m.field_value="",u.forEach(d=>{d.item_id===p&&(m.field_value=m.field_value.split(",").filter(y=>y).concat(d.file_id).join(","))}))}),i()})})}}function Eo(n,e){return JSON.stringify(n)===JSON.stringify(e)}async function Jn(n){await Promise.all(n);let e=!0;for(let t of n){let r=await ko(t);if(r.state==="pending"){e=!1;break}if(r.state==="rejected")throw r.reason}return!!e||Jn(n)}function ko(n){let e={state:"pending"};return Promise.race([n,e]).then(t=>t===e?t:{state:"resolved",value:t},t=>({state:"rejected",reason:t}))}function Ao(n,e){if(!n||!n.length)return[];if(!n[0].fields.length)return n;var t=e&&e.sort_field_id||n[0].fields[0].field_id;function r(a){for(var i=null,l=0;l<a.fields.length;l++)if(a.fields[l].field_id==t){i=a.fields[l].field_value;break}return i}return n.sort(function(a,i){var l=r(a),s=r(i);return l===null?-1:s===null?1:/^\\d+$/.test(l)&&/^\\d+$/.test(s)?Number(l)<Number(s)?-1:1:/^\\d+$/.test(l)||/^\\d+$/.test(s)?/^\\d+$/.test(l)?-1:1:l.toLowerCase()>s.toLowerCase()?1:-1}),e&&e.descending?n.reverse():n}class Io{constructor(e){this.gudhub=e,this.MergeFields=new bo(e),this.ItemsSelection=new vo(e),this.AppsTemplateService=new So(e),this.FileHelper=new xo(e)}prefilter(e,t={}){return Ui(e,this.gudhub.storage,this.gudhub.pipeService,t)}filter(e,t){return Is(e,t)}mergeFilters(e,t){return Fs(e,t)}group(e,t){return Vs(e,t)}async getFilteredItems(e=[],t=[],r,a,i,l="",s,u){let o=await this.prefilter(t,{element_app_id:r,app_id:a,item_id:i}),p=this.filter(e,o);return this.group(l,p).filter(m=>!s||Ln([m],s).length===1).filter(m=>!u||Ln([m],u).length===1)}jsonToItems(e,t){return Ls(e,t)}getDate(e){return Ft(e)}checkRecurringDate(e,t){return fo(e,t)}populateItems(e,t,r){return Js(e,t,r)}populateWithDate(e,t){return uo(e,t)}populateWithItemRef(e,t,r,a,i,l){return Bs(e,t,r,a,i,l)}compareItems(e,t,r){return Gs(e,t,r)}mergeItems(e,t,r){return Us(e,t,r)}mergeObjects(e,t,r){return ho(e,t,r)}makeNestedList(e,t,r,a,i){return _o(e,t,r,a,i)}async mergeChunks(e){return yo(e)}mergeFieldLists(e,t){return this.MergeFields.mergeFieldLists(e,t)}createFieldsListToView(e,t){return this.MergeFields.createFieldsListToView(e,t)}createFieldsListToViewWithDataType(e,t){return this.MergeFields.createFieldsListToViewWithDataType(e,t)}selectItems(e,t){return this.ItemsSelection.selectItems(e,t)}getSelectedItems(e){return this.ItemsSelection.getSelectedItems(e)}clearSelectedItems(e){return this.ItemsSelection.clearSelectedItems(e)}isItemSelected(e,t){return this.ItemsSelection.isItemSelected(e,t)}jsonConstructor(e,t,r,a){return $o(e,t,this,r,a)}fileInstallerHelper(e,t,r){return this.FileHelper.fileInstallerHelper(e,t,r)}createAppsFromTemplate(e,t,r,a){return this.AppsTemplateService.createAppsFromTemplate(e,t,r,a)}createApps(e){return this.AppsTemplateService.createApps(e)}createItems(e,t){return this.AppsTemplateService.createItems(e,t)}areViewListsEqual(e,t){let r=e.sort((i,l)=>i.view_id-l.view_id),a=t.sort((i,l)=>i.view_id-l.view_id);return this.compareObjects(r,a)}areFieldListsEqual(e,t){let r=e.sort((i,l)=>i.field_id-l.field_id),a=t.sort((i,l)=>i.field_id-l.field_id);return this.compareObjects(r,a)}compareObjects(e,t){return Eo(e,t)}compareAppsItemsLists(e,t,r){let a=new Blob([wo()],{type:"application/javascript"});this.worker=new Worker(URL.createObjectURL(a)),this.worker.postMessage({items_list1:e,items_list2:t}),this.worker.addEventListener("message",i=>{let{diff:l}=i.data;r(l)})}dynamicPromiseAll(e){return Jn(e)}sortItems(e,t){return Ao(e,t)}debounce(e,t){let r;return function(...a){clearTimeout(r),r=setTimeout(()=>{e.apply(this,a)},t)}}}class Oo{constructor(e,t){this.req=e,this.storage=t}async login({username:e,password:t}={}){let r=await this.loginApi(e,t);return this.storage.updateUser(r),r}async loginWithToken(e){let t=await this.loginWithTokenApi(e);return this.storage.updateUser(t),t}async logout(e){return await this.logoutApi(e)}async signup(e){return await this.signupApi(e)}async updateToken(e){return await this.updateTokenApi(e)}async updateUser(e){let t=await this.updateUserApi(e);return this.storage.updateUser(t),t}async updateAvatar(e){let t=await this.avatarUploadApi(e);return this.storage.updateUser(t),t}async getUsersList(e){return await this.getUsersListApi(e)}async loginApi(e,t){try{return await this.req.axiosRequest({method:"POST",url:\`\${this.req.root}/auth/login\`,form:{username:e,password:t}})}catch(r){console.log(r)}}async loginWithTokenApi(e){try{return await this.req.axiosRequest({method:"POST",url:\`\${this.req.root}/auth/login?accesstoken=\${e}\`})}catch(t){console.log(t)}}async updateTokenApi(e){try{return await this.req.axiosRequest({method:"POST",url:\`\${this.req.root}/auth/login\`,form:{auth_key:e}})}catch(t){console.log(t)}}logoutApi(e){return this.req.post({url:"/auth/logout",form:{token:e}})}signupApi(e){return this.req.axiosRequest({method:"POST",url:\`\${this.req.root}/auth/singup\`,form:{user:JSON.stringify(e)}})}getUsersListApi(e){return this.req.get({url:"/auth/userlist",params:{keyword:e}})}updateUserApi(e){return this.req.post({url:"/auth/updateuser",form:{user:JSON.stringify(e)}})}avatarUploadApi(e){return this.req.post({url:"/auth/avatar-upload",form:{image:e}})}getUserByIdApi(e){return this.req.get({url:"/auth/getuserbyid",params:{id:e}})}getVersion(){return this.req.get({url:"/version"})}getUserFromStorage(e){return this.storage.getUsersList().find(t=>t.user_id==e)}saveUserToStorage(e){let t=this.storage.getUsersList();return t.find(r=>r.user_id==e.user_id)||(t.push(e),e)}async getUserById(e){let t=this.getUserFromStorage(e);if(!t){let r=await this.getUserByIdApi(e);if(!r)return null;(t=this.getUserFromStorage(e))||(this.saveUserToStorage(r),t=r)}return t}async getToken(){let e=new Date(this.storage.getUser().expirydate),t=new Date,r=this.storage.getUser().accesstoken;if(e<t||!r){let a=await this.updateToken(this.storage.getUser().auth_key);this.storage.updateUser(a),r=a.accesstoken}return r}}var jo=A("kmcAT"),gt=A("akXK4"),me=A("5xozB");async function To(n,e,t,r,a){try{let i;t||console.error(\`JS link must be provided for this data type - \${e}\`);let l=o=>(me.IS_BROWSER_MAIN_THREAD||(le.window=proxy,le.document=a.document,le.Element=a.Element,le.CharacterData=a.CharacterData,le.this=proxy,le.self=proxy,le.Blob=a.Blob,le.Node=a.Node,le.navigator=a.navigator,le.HTMLElement=a.HTMLElement,le.XMLHttpRequest=a.XMLHttpRequest,le.WebSocket=a.WebSocket,le.crypto=a.crypto,le.DOMParser=a.DOMParser,le.Symbol=a.Symbol,le.document.queryCommandSupported=p=>(console.log("QUERY COMMAND SUPPORTED: ",p),!1),le.angular=angular),new Promise(async p=>{let m=await G(gt).get(o).catch(f=>{console.log(\`Failed to fetch: \${o} in ghconstructor. Module id: \${e}\`)}),d=encodeURIComponent(m.data),y="data:text/javascript;charset=utf-8,"+d;p(y)})),s=await l(t);try{i=await import(s)}catch(o){console.log(\`Error while importing module: \${e}\`),console.log(o)}let u=new i.default(e);if(r&&me.IS_BROWSER){let o=document.createElement("link");o.href=r,o.setAttribute("data-module",e),o.setAttribute("rel","stylesheet"),document.getElementsByTagName("head")[0].appendChild(o)}return{type:e,getTemplate:function(o,p,m,d,y,f){let S=m!=="false";return u.getTemplate(o,p,S,d,y,f)},getDefaultValue:function(o,p,m,d){return new Promise(async y=>{let f=u.getDefaultValue;if(f){let S=await f(o,p,m,d);y(S)}else y(null)})},getSettings:function(o,p,m){return u.getSettings(o,p,m)},filter:{getSearchOptions:function(o){let p=u;return p.filter&&p.filter.getSearchOptions?u.filter.getSearchOptions(o):[]},getDropdownValues:function(){let o=u;return o.filter&&o.filter.getDropdownValues?o.filter.getDropdownValues():[]}},getInterpretation:function(o,p,m,d,y,f){return new Promise(async S=>{let v=u;try{let w=await v.getInterpretation(n,o,f,y,d,m),g=w.find($=>$.id==p)||w.find($=>$.id=="default"),_=await g.content();S({html:_})}catch(w){console.log(\`ERROR IN \${e}\`,w),S({html:"<span>no interpretation</span>"})}})},getInterpretationsList:function(o,p,m,d){return u.getInterpretation(o,p,m,d)},getInterpretatedValue:function(o,p,m,d){return new Promise(async y=>{let f=u.getInterpretatedValue;if(f){let S=await f(o,p,m,d);y(S)}else y(o)})},onMessage:function(o,p,m){return new Promise(async d=>{let y=u.onMessage;if(y){let f=await y(o,p,m);d(f)}d(null)})},extendController:function(o){u.getActionScope(o)},runAction:function(o){try{u.runAction(o)}catch{}},getWindowScope:function(o){return u.getWindowScope(o)},getWindowHTML:function(o){return u.getWindowHTML(o)}}}catch(i){console.log(i),console.log(\`Failed in createClassInstance (ghconstructor). Module id: \${e}. JS url: \${t}\`)}}class Po{constructor(e){this.gudhub=e,this.cache={},this.modulesQueue={},this.angularInjector,this.nodeWindow}async getInstance(e){return this.getCached(e)||(this.modulesQueue[e]||(this.modulesQueue[e]=this.createInstance(e)),await this.modulesQueue[e]),this.getCached(e)}pupToCache(e,t){this.cache[e]=t}getCached(e){return this.cache[e]}initAngularInjector(e){this.angularInjector=e}initJsdomWindow(e){this.nodeWindow=e}async createInstance(e){let t,r=this.gudhub.storage.getModuleUrl(e);if(!r){console.log(\`Cannot find module: \${e}\`);return}return r.type==="gh_element"&&(r.technology==="angular"?t=await G(jo)(this.gudhub,e,r.url,this.angularInjector,this.nodeWindow):r.technology==="class"&&(t=await To(this.gudhub,e,r.js,r.css,this.nodeWindow))),t&&this.pupToCache(e,t),t}}class Co{constructor(e,t,r,a,i){this.storage=e,this.pipeService=t,this.req=r,this.appProcessor=a,this.util=i,this.itemListeners()}async addItemsApi(e,t){try{return await this.req.post({url:"/api/items/add",form:{items:JSON.stringify(t),app_id:e}})}catch(r){return console.log(r),null}}async updateItemsApi(e,t){try{return await this.req.post({url:"/api/items/update",form:{items:JSON.stringify(t),app_id:e}})}catch(r){return console.log(r),null}}deleteItemsApi(e){try{let t=this.req.post({url:"/api/items/delete",form:{items_ids:JSON.stringify(e)}});return t.from_apps_list=!0,t}catch(t){return console.log(t),null}}async addItemsToStorage(e,t){let r=await this.appProcessor.getApp(e);return r&&(t.forEach(a=>{r.items_list.push(a),r.items_object[a.item_id]={};for(let i=0;i<a.fields.length;i++)r.items_object[a.item_id][a.fields[i].field_id]=a.fields[i];this.pipeService.emit("gh_item_update",{app_id:e},[a])}),this.pipeService.emit("gh_items_update",{app_id:e},r.items_list),this.storage.updateApp(r)),r}async updateItemsInStorage(e,t){this.pipeService.emit("gh_items_update",{app_id:e},t);let r=await this.appProcessor.getApp(e);return r&&t&&t.forEach(a=>{let i={app_id:e};this.pipeService.emit("gh_item_update",i,[a]),i.item_id=a.item_id,this.pipeService.emit("gh_item_update",i,a);let l=r.items_list.find(s=>s.item_id==a.item_id);l&&a.fields.forEach(s=>{let u=l.fields.find(o=>o.field_id==s.field_id);i.field_id=s.field_id,u?u.field_value!=s.field_value&&(u.field_value=s.field_value,r.items_object[l.item_id][u.field_id]=u,this.pipeService.emit("gh_value_update",i,s.field_value)):(l.fields.push(s),r.items_object[l.item_id][s.field_id]=s,this.pipeService.emit("gh_value_update",i,s.field_value))})}),t}handleDiff(e,t){this.updateItemsInStorage(e,t.diff_src_items),this.addItemsToStorage(e,t.new_src_items),this.deleteItemsFromStorage(e,t.trash_src_items)}async deleteItemsFromStorage(e,t=[]){let r=await this.appProcessor.getApp(e);r&&(r.items_list=r.items_list.filter(a=>!t.find(i=>a.item_id==i.item_id)||(delete r.items_object[a.item_id],!1)),this.pipeService.emit("gh_items_update",{app_id:e},r.items_list),this.storage.updateApp(r))}async getItems(e,t=!1){let r=await this.appProcessor.getApp(e,t);return r?r.items_list:null}async addNewItems(e,t){let r=t.map(i=>({...i,fields:Wr(i.fields)})),a=await this.addItemsApi(e,r);return await this.addItemsToStorage(e,a),this.pipeService.emit("gh_items_add",{app_id:e},a),a}async updateItems(e,t){let r=t.map(i=>({...i,fields:Wr(i.fields)})),a=await this.updateItemsApi(e,r);return await this.updateItemsInStorage(e,a)}async deleteItems(e,t){return this.deleteItemsApi(t).then(async r=>await this.deleteItemsFromStorage(e,r))}itemListeners(){this.pipeService.onRoot("gh_items_get",{},async(e,t)=>{if(t&&t.app_id){let r=await this.getItems(t.app_id);r?this.pipeService.emit("gh_items_get",t,r):this.pipeService.emit("gh_items_get",t,[])}}),this.pipeService.onRoot("gh_items_add",{},async(e,t)=>{if(t&&t.app_id&&t.items){let r=await this.addNewItems(t.app_id,t.items);r?this.pipeService.emit("gh_items_add",t,r):this.pipeService.emit("gh_items_add",t,[])}}),this.pipeService.onRoot("gh_items_update",{},async(e,t)=>{if(t&&t.app_id&&t.items){let r=await this.updateItems(t.app_id,t.items);r?this.pipeService.emit("gh_items_update",t,r):this.pipeService.emit("gh_items_update",t,[])}}),this.pipeService.onRoot("gh_item_get",{},async(e,t)=>{if(t&&t.app_id){let r=(await this.getItems(t.app_id)).find(a=>a.item_id==t.item_id);this.pipeService.emit("gh_item_get",t,r)}}),this.pipeService.onRoot("gh_filtered_items_get",{},async(e,t)=>{if(t&&t.element_app_id){let r=await this.getItems(t.element_app_id),a=await this.util.getFilteredItems(r,t.filters_list,t.element_app_id,t.app_id,t.item_id,t.field_groupe,t.search,t.search_params);this.pipeService.emit("gh_filtered_items_get",t,a)}}),this.pipeService.onRoot("gh_filter_items",{},async(e,t)=>{if(t&&t.items){let r=await this.util.getFilteredItems(t.items,t.filters_list,t.element_app_id,t.app_id,t.item_id,t.field_groupe,t.search,t.search_params);this.pipeService.emit("gh_filter_items",t,r)}})}}class No{constructor(e,t,r,a,i){this.storage=e,this.req=t,this.appProcessor=r,this.itemProcessor=a,this.pipeService=i,this.fieldListeners()}deleteFieldApi(e){return this.req.post({url:"/api/app/delete-field",form:{field_id:e}})}async updatedFieldApi(e,t={}){let r=await this.appProcessor.getApp(e),a={app_id:e,app_name:r.app_name,group_id:r.group_id,icon:r.icon,field_list:r.field_list.map(i=>i.field_id==t.field_id?{...i,...t}:i),views_list:r.views_list};return this.appProcessor.updateApp(a)}setFieldValueApi(e,t,r,a){let i=[{item_id:t,fields:[{field_id:r,field_value:a}]}];return this.itemProcessor.updateItems(e,i)}deleteFieldInStorage(e,t){let r=this.storage.getApp(e);return r.field_list=r.field_list.filter(a=>a.file_id!=t),r.items_list=r.items_list.map(a=>(a.fields=a.fields.filter(i=>i.field_id!=t),a)),this.storage.updateApp(r),!0}updateFieldInStorage(e,t){let r=this.storage.getApp(e);return r.field_list=r.field_list.map(a=>a.field_id==t.field_id?{...a,...t}:a),this.storage.updateApp(r),t}updateFieldValue(e,t,r,a){let i=this.storage.getApp(e);return i.items_list.forEach(l=>{l.item_id==t&&l.fields.forEach(s=>{s.field_id==r&&(s.field_value=a,i.items_object[l.item_id][s.field_id]=s)})}),this.storage.updateApp(i),a}async getField(e,t){let r=await this.appProcessor.getApp(e);if(!r)return null;for(let a=0;a<r.field_list.length;a++)if(r.field_list[a].field_id==t)return r.field_list[a];return null}async getFieldIdByNameSpace(e,t){let r=await this.appProcessor.getApp(e);if(!r)return null;for(let a=0;a<r.field_list.length;a++)if(r.field_list[a].name_space==t)return r.field_list[a].field_id;return null}async getFieldModels(e){let t=await this.appProcessor.getApp(e);return t?t.field_list:null}async updateField(e,t){if(!e||!t)return;let r=await this.updatedFieldApi(e,t);return this.updateFieldInStorage(e,r)}async deleteField(e,t){return await this.deleteFieldApi(t),this.deleteFieldInStorage(e,t)}async getFieldValue(e,t,r){let a=null,i=await this.appProcessor.getApp(e);try{a=i.items_object[t][r].field_value}catch{}return a}async setFieldValue(e,t,r,a){if(e&&t&&r)return await this.setFieldValueApi(e,t,r,a),this.updateFieldValue(e,t,r,a)}fieldListeners(){this.pipeService.onRoot("gh_value_get",{},async(e,t)=>{if(t.app_id&&t.item_id&&t.field_id){let r=await this.getFieldValue(t.app_id,t.item_id,t.field_id);this.pipeService.emit("gh_value_get",t,r)}}),this.pipeService.onRoot("gh_value_set",{},async(e,t)=>{t.item_id&&(this.setFieldValue(t.app_id,t.item_id,t.field_id,t.new_value),delete t.new_value)}),this.pipeService.onRoot("gh_model_get",{},async(e,t)=>{try{let r=await this.getField(t.app_id,t.field_id);this.pipeService.emit("gh_model_get",t,r)}catch(r){console.log("Field model: ",r)}}),this.pipeService.onRoot("gh_model_update",{},async(e,t)=>{let r=await this.updateField(t.app_id,t.field_model);this.pipeService.emit("gh_model_update",{app_id:t.app_id,field_id:t.field_id},r)}),this.pipeService.onRoot("gh_models_get",{},async(e,t)=>{let r=await this.getFieldModels(t.app_id);this.pipeService.emit("gh_models_get",t,r)}),this.pipeService.onRoot("gh_model_delete",{},async(e,t)=>{let r=await this.deleteField(t.app_id,t.field_id);this.pipeService.emit("gh_model_delete",t,r)})}}class Mo{constructor(e,t,r,a){this.storage=e,this.pipeService=t,this.req=r,this.appProcessor=a}async uploadFileApi(e,t,r){try{let a={"file-0":e,app_id:t,item_id:r};return await this.req.post({url:"/file/formupload",form:a})}catch(a){return console.log(a),null}}async uploadFileFromStringApi(e){try{return await this.req.post({url:"/file/upload",form:{file:JSON.stringify(e)}})}catch(t){return console.log(t),null}}async updateFileFromStringApi(e,t,r,a,i,l,s){try{let u={file_name:r,extension:a,file_id:t,format:i,source:e,alt:l,title:s};return await this.req.post({url:"/file/update",form:{file:JSON.stringify(u)}})}catch(u){return console.log(u),null}}async duplicateFileApi(e){return this.req.post({url:"/api/new/file/duplicate",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{files:JSON.stringify(e)}})}async downloadFileFromString(e,t){if(!await this.isFileExists(e,t))return!1;{let r=await this.getFile(e,t),a=await this.req.get({url:r.url+"?timestamp="+r.last_update,externalResource:!0});return{file:r,data:a,type:"file"}}}async duplicateFile(e){let t=await this.duplicateFileApi(e);return t.forEach(r=>{this.addFileToStorage(r.app_id,r)}),t}async deleteFileApi(e){try{return await this.req.get({url:\`/file/delete?file_id=\${e}\`})}catch(t){return console.log(t),null}}addFileToStorage(e,t){let r=this.storage.getApp(e);r&&(r.file_list.push(t),this.storage.updateApp(r),this.pipeService.emit("gh_file_upload",{app_id:e,item_id:t.item_id,file_id:t.file_id},t))}addFilesToStorage(e,t){let r=this.storage.getApp(e);r&&(r.file_list.push(...t),this.storage.updateApp(r),t.forEach(a=>{this.pipeService.emit("gh_file_upload",{app_id:e,item_id:a.item_id,file_id:a.file_id},a)}))}deleteFileFromStorage(e,t){let r=this.storage.getApp(t);if(r){let a;r.file_list=r.file_list.filter(i=>i.file_id!=e||(a=i,!1)),this.storage.updateApp(r),this.pipeService.emit("gh_file_delete",{file_id:e},a)}}updateFileInStorage(e,t,r){let a=this.storage.getApp(t);a&&(a.file_list=a.file_list.map(i=>i.file_id==e?r:i),this.storage.updateApp(a),this.pipeService.emit("gh_file_update",{file_id:e}))}async getFile(e,t){let r=await this.appProcessor.getApp(e);return new Promise((a,i)=>{a(r.file_list.find(l=>l.file_id==t)||"")})}async getFiles(e,t=[]){let r=await this.appProcessor.getApp(e);return new Promise((a,i)=>{a(r.file_list.filter(l=>t.some(s=>s==l.file_id))||"")})}async uploadFile(e,t,r){let a=await this.uploadFileApi(e,t,r);return this.addFileToStorage(t,a),a}async uploadFileFromString(e){let t=await this.uploadFileFromStringApi(e);return this.addFileToStorage(t.app_id,t),t}async updateFileFromString(e,t,r,a,i,l,s){let u=await this.updateFileFromStringApi(e,t,r,a,i,l,s);return this.updateFileInStorage(t,u.app_id,u),u}async deleteFile(e,t){return await this.deleteFileApi(e),this.deleteFileFromStorage(e,t),!0}async isFileExists(e,t){let r=/^(https?:\\/\\/)?([\\da-z\\.-]+)\\.([a-z\\.]{2,6})([\\/\\w \\.-]*)*\\/?$/;if(!t)return!1;{let a=await this.getFile(e,t);return!!a&&r.test(a.url)}}}class Ro{constructor(e,t){this.req=e,this.pipeService=t}createDocument(e){return this.emitDocumentInsert(e),this.req.post({url:"/api/new/document/insert-one",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{document:JSON.stringify(e)}})}emitDocumentInsert(e){let t=typeof e.data=="string"?JSON.parse(e.data):e.data;this.pipeService.emit("gh_document_insert_one",{app_id:e.app_id,item_id:e.item_id,element_id:e.element_id},t)}getDocument(e){return this.req.post({url:"/api/new/document/find-one",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{document:JSON.stringify(e)}})}getDocuments(e){return this.req.post({url:"/api/new/document/find",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{document:JSON.stringify(e)}})}deleteDocument(e){return this.req.post({url:"/api/new/document/remove-one",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{document:JSON.stringify(e)}})}}class Fo{constructor(e){this.gudhub=e}async getInterpretationObj(e,t,r,a,i,l){var s=[],u=t.data_model.interpretation.find(function(p){return p.src==r})||t.data_model.interpretation.find(function(p){return p.src=="table"})||{id:"default"};if(e.data_model&&e.data_model.interpretation){for(var o=0;o<e.data_model.interpretation.length;o++)(e.data_model.interpretation[o].src==r||e.data_model.interpretation[o].src==a)&&s.push(e.data_model.interpretation[o]);for(var o=0;o<s.length;o++)if(s[o].settings&&s[o].settings.condition_filter&&s[o].settings.filters_list.length>0){let m=await gudhub.getItem(l,i);if(m&&gudhub.filter([m],s[o].settings.filters_list).length>0){u=s[o];break}}else u=gudhub.mergeObjects(u,s[o])}return u}getInterpretation(e,t,r,a,i,l,s){let u=this;return new Promise(async(o,p)=>{var m=t&&t.data_type?t.data_type:r;m?gudhub.ghconstructor.getInstance(m).then(async function(d){if(d){var y=await u.getInterpretationObj(t,d.getTemplate().model,a,s,i,l);d.getInterpretation(e,y.id,m,t,i,l).then(function(f){o(gudhub.mergeObjects(f,y))},function(f){p()})}},function(d){}):console.error("Get Interpretation: data_type is undefined",r,t)})}async getInterpretationById(e,t,r,a,i=null,l=null){let s=i??await this.gudhub.getFieldValue(e,t,r),u=l??await this.gudhub.getField(e,r);if(u==null)return"";let o=await this.gudhub.ghconstructor.getInstance(u.data_type),p=await o.getInterpretation(s,a,u.data_type,u,t,e);return p.html=="<span>no interpretation</span>"?s:p.html}}var me=A("5xozB");function Lo(n,e){switch(e.api){case"/items/update":console.log("/items/update - ",e),n.itemProcessor.updateItemsInStorage(e.app_id,e.response);break;case"/items/add":console.log("/items/add - ",e),n.itemProcessor.addItemsToStorage(e.app_id,e.response);break;case"/items/delete":console.log("/items/delete - ",e),n.itemProcessor.deleteItemsFromStorage(e.app_id,e.response);break;case"/app/update":console.log("/app/update - ",e),n.appProcessor.updateAppFieldsAndViews(e.response);break;case"/file/delete":console.log("file/delete - ",e),n.fileManager.deleteFileFromStorage(e.response.file_id,e.app_id);break;case"/file/upload":console.log("file/upload - ",e),n.fileManager.addFileToStorage(e.app_id,e.response);break;case"/file/formupload":console.log("file/formupload - ",e);break;case"/file/update":n.fileManager.updateFileInStorage(e.response.file_id,e.response.app_id,e.response),console.log("file/update - ",e);break;case"/new/file/duplicate":n.fileManager.addFilesToStorage(e.app_id,e.response),console.log("new/file/duplicate - ",e);break;case"/api/new/document/insert-one":n.documentManager.emitDocumentInsert(e.response),console.log("/api/new/document/insert-one - ",e);break;case"/ws/emit-to-user":console.log("/ws/emit-to-user - ",e);break;case"/ws/broadcast-to-app-subscribers":console.log("/ws/broadcast-to-app-subscribers - ",e);let t=JSON.parse(e.response);if(!t.data_type)return;n.ghconstructor.getInstance(t.data_type).then(r=>{r.onMessage(e.app_id,e.user_id,t)});break;default:console.warn("WEBSOCKETS is not process this API:",e.api)}}class Do{constructor(e,t){this.req=t,this.gudhub=e}async createGroupApi(e){try{let t={token:await this.gudhub.auth.getToken(),group_name:e};return await this.req.post({url:"/api/sharing-group/create-group",form:t})}catch(t){return console.log(t),null}}async updateGroupApi(e,t){try{let r={token:await this.gudhub.auth.getToken(),group_name:t,group_id:e};return await this.req.post({url:"/api/sharing-group/update-group",form:r})}catch(r){return console.log(r),null}}async deleteGroupApi(e){try{let t={token:await this.gudhub.auth.getToken(),group_id:e};return await this.req.post({url:"/api/sharing-group/delete-group",form:t})}catch(t){return console.log(t),null}}async addUserToGroupApi(e,t,r){try{let a={token:await this.gudhub.auth.getToken(),group_id:e,user_id:t,group_permission:r};return await this.req.post({url:"/api/sharing-group/add-user-to-group",form:a})}catch(a){return console.log(a),null}}async getUsersByGroupApi(e){try{let t={token:await this.gudhub.auth.getToken(),group_id:e};return await this.req.post({url:"/api/sharing-group/get-users-by-group",form:t})}catch(t){return console.log(t),null}}async updateUserInGroupApi(e,t,r){try{let a={token:await this.gudhub.auth.getToken(),user_id:e,group_id:t,group_permission:r};return await this.req.post({url:"/api/sharing-group/update-user-in-group",form:a})}catch(a){return console.log(a),null}}async deleteUserFromGroupApi(e,t){try{let r={token:await this.gudhub.auth.getToken(),user_id:e,group_id:t};return await this.req.post({url:"/api/sharing-group/delete-user-from-group",form:r})}catch(r){return console.log(r),null}}async getGroupsByUserApi(e){try{let t={token:await this.gudhub.auth.getToken(),user_id:e};return await this.req.post({url:"/api/sharing-group/get-groups-by-user",form:t})}catch(t){return console.log(t),null}}}class qo{constructor(e,t){this.req=t,this.gudhub=e}async addAppToGroupApi(e,t,r){try{let a={token:await this.gudhub.auth.getToken(),app_id:e,group_id:t,app_permission:r};return await this.req.post({url:"/api/sharing-group/add-app-to-group",form:a})}catch(a){return console.log(a),null}}async getAppsByGroupApi(e){try{let t={token:await this.gudhub.auth.getToken(),group_id:e};return await this.req.post({url:"/api/sharing-group/get-apps-by-group",form:t})}catch(t){return console.log(t),null}}async updateAppInGroupApi(e,t,r){try{let a={token:await this.gudhub.auth.getToken(),group_id:t,app_id:e,app_permission:r};return await this.req.post({url:"/api/sharing-group/update-app-in-group",form:a})}catch(a){return console.log(a),null}}async deleteAppFromGroupApi(e,t,r){try{let a={token:await this.gudhub.auth.getToken(),group_id:t,app_id:e,app_permission:r};return await this.req.post({url:"/api/sharing-group/delete-app-from-group",form:a})}catch(a){return console.log(a),null}}async getGroupsByAppApi(e){try{let t={token:await this.gudhub.auth.getToken(),app_id:e};return await this.req.post({url:"/api/sharing-group/get-groups-by-app",form:t})}catch(t){return console.log(t),null}}}class Bo{constructor(e,t,r){this.req=t,this.gudhub=e,this.pipeService=r,this.groupManager=new Do(e,t),this.appGroupSharing=new qo(e,t)}createGroup(e){return this.groupManager.createGroupApi(e)}updateGroup(e,t){return this.groupManager.updateGroupApi(e,t)}deleteGroup(e){return this.groupManager.deleteGroupApi(e)}async addUserToGroup(e,t,r){let a=await this.groupManager.addUserToGroupApi(e,t,r);return this.pipeService.emit("group_members_add",{app_id:"group_sharing"},a),a}getUsersByGroup(e){return this.groupManager.getUsersByGroupApi(e)}async updateUserInGroup(e,t,r){let a=await this.groupManager.updateUserInGroupApi(e,t,r);return this.pipeService.emit("group_members_update",{app_id:"group_sharing"},a),a}async deleteUserFromGroup(e,t){let r=await this.groupManager.deleteUserFromGroupApi(e,t);return this.pipeService.emit("group_members_delete",{app_id:"group_sharing"},r),r}getGroupsByUser(e){return this.groupManager.getGroupsByUserApi(e)}addAppToGroup(e,t,r){return this.appGroupSharing.addAppToGroupApi(e,t,r)}getAppsByGroup(e){return this.appGroupSharing.getAppsByGroupApi(e)}updateAppInGroup(e,t,r){return this.appGroupSharing.updateAppInGroupApi(e,t,r)}deleteAppFromGroup(e,t,r){return this.appGroupSharing.deleteAppFromGroupApi(e,t,r)}getGroupsByApp(e){return this.appGroupSharing.getGroupsByAppApi(e)}}class Uo{constructor(e,t){this.req=t,this.gudhub=e}async add(e,t,r){try{let a={token:await this.gudhub.auth.getToken(),app_id:e,user_id:t,sharing_permission:r};return await this.req.post({url:"/sharing/add",form:a})}catch(a){return console.log(a),null}}async update(e,t,r){try{let a={token:await this.gudhub.auth.getToken(),app_id:e,user_id:t,sharing_permission:r};return await this.req.post({url:"/sharing/update",form:a})}catch(a){return console.log(a),null}}async delete(e,t){try{let r={token:await this.gudhub.auth.getToken(),app_id:e,user_id:t};return await this.req.post({url:"/sharing/delete",form:r})}catch(r){return console.log(r),null}}async getAppUsers(e){try{let t={token:await this.gudhub.auth.getToken(),app_id:e};return await this.req.post({url:"/sharing/get-app-users",form:t})}catch(t){return console.log(t),null}}async addInvitation(e,t){try{let r={token:await this.gudhub.auth.getToken(),guests_emails:e,apps:t};return await this.req.post({url:"/api/invitation/add",form:r})}catch(r){return console.log(r),null}}}class Go{constructor(e){this.gudhub=e}async emitToUser(e,t){let r={user_id:e,data:typeof t=="object"?JSON.stringify(t):t};return await this.gudhub.req.post({url:"/ws/emit-to-user",form:r})}async broadcastToAppSubscribers(e,t,r){let a={app_id:e,data:JSON.stringify({data_type:t,data:r})};return await this.gudhub.req.post({url:"/ws/broadcast-to-app-subscribers",form:a})}}class Wo{constructor(e,t={server_url:ca,wss_url:ua,node_server_url:pa,initWebsocket:!1,activateSW:!1,swLink:"",async_modules_path:da,file_server_url:ha,automation_modules_path:fa,accesstoken:this.accesstoken,expirydate:this.expirydate}){if(this.serialized={authKey:e,options:t},this.config=t,this.ghconstructor=new Po(this),this.interpritate=new Fo(this),this.pipeService=new Li,this.storage=new qi(t.async_modules_path,t.file_server_url,t.automation_modules_path),this.util=new Io(this),this.req=new Ri(t.server_url),this.auth=new Oo(this.req,this.storage),this.sharing=new Uo(this,this.req),this.groupSharing=new Bo(this,this.req,this.pipeService),e?this.storage.setUser({auth_key:e}):t.accesstoken&&t.expirydate&&this.storage.setUser({accesstoken:t.accesstoken,expirydate:t.expirydate}),this.req.init(this.auth.getToken.bind(this.auth)),this.ws=new Bi(t.wss_url,this.auth),this.initializeAppProcessor(),this.itemProcessor=new Co(this.storage,this.pipeService,this.req,this.appProcessor,this.util),this.fieldProcessor=new No(this.storage,this.req,this.appProcessor,this.itemProcessor,this.pipeService),this.fileManager=new Mo(this.storage,this.pipeService,this.req,this.appProcessor),this.documentManager=new Ro(this.req,this.pipeService),this.websocketsemitter=new Go(this),t.initWebsocket){let r=this;this.ws.initWebSocket(Lo.bind(this,r),this.appProcessor.refreshApps.bind(this.appProcessor))}t.activateSW&&this.activateSW(t.swLink)}initializeAppProcessor(){this.appProcessor=new Gr(this.storage,this.pipeService,this.req,this.ws,this.util,this.config.activateSW,new Ut(this.req,Tr,this))}async activateSW(e){if(me.IS_BROWSER_MAIN_THREAD&&"serviceWorker"in window.navigator)try{let t=await window.navigator.serviceWorker.register(e);t.update().then(()=>console.log("%cSW ->>> Service worker successful updated","display: inline-block ; background-color: #689f38 ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;")).catch(()=>console.warn("SW ->>> Service worker is not updated")),console.log("%cSW ->>> Service worker is registered","display: inline-block ; background-color: #689f38 ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;",t)}catch(t){console.warn("%cSW ->>> Service worker is not registered","display: inline-block ; background-color: #d32f2f ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;",t)}else console.log("%cSW ->>> ServiceWorkers not supported","display: inline-block ; background-color: #d32f2f ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;")}on(e,t,r){return this.pipeService.on(e,t,r),this}emit(e,t,r,a){return this.pipeService.emit(e,t,r,a),this}destroy(e,t,r){return this.pipeService.destroy(e,t,r),this}prefilter(e,t){return this.util.prefilter(e,t)}debounce(e,t){return this.util.debounce(e,t)}emitToUser(e,t){return this.websocketsemitter.emitToUser(e,t)}broadcastToAppSubscribers(e,t,r){return this.websocketsemitter.broadcastToAppSubscribers(e,t,r)}getInterpretation(e,t,r,a,i,l,s){return this.interpritate.getInterpretation(e,t,r,a,i,l,s)}getInterpretationById(e,t,r,a,i,l){return this.interpritate.getInterpretationById(e,t,r,a,i,l)}filter(e,t){return this.util.filter(e,t)}mergeFilters(e,t){return this.util.mergeFilters(e,t)}group(e,t){return this.util.group(e,t)}getFilteredItems(e,t,r={}){return this.util.getFilteredItems(e,t,r.element_app_id,r.app_id,r.item_id,r.field_group,r.search,r.search_params)}sortItems(e,t){return this.util.sortItems(e,t)}jsonToItems(e,t){return this.util.jsonToItems(e,t)}getDate(e){return this.util.getDate(e)}populateWithDate(e,t){return this.util.populateWithDate(e,t)}checkRecurringDate(e,t){return this.util.checkRecurringDate(e,t)}populateItems(e,t,r){return this.util.populateItems(e,t,r)}populateWithItemRef(e,t,r,a,i,l){return this.util.populateWithItemRef(e,t,r,a,i,l)}compareItems(e,t,r){return this.util.compareItems(e,t,r)}mergeItems(e,t,r){return this.util.mergeItems(e,t,r)}mergeObjects(e,t){return this.util.mergeObjects(e,t)}makeNestedList(e,t,r,a,i){return this.util.makeNestedList(e,t,r,a,i)}jsonConstructor(e,t,r,a){return this.util.jsonConstructor(e,t,r,a)}getAppsList(){return this.appProcessor.getAppsList()}getAppInfo(e){return this.appProcessor.getAppInfo(e)}deleteApp(e){return this.appProcessor.deleteApp(e)}getApp(e){return this.appProcessor.getApp(e)}updateApp(e){return this.appProcessor.updateApp(e)}updateAppInfo(e){return this.appProcessor.updateAppInfo(e)}createNewApp(e){return this.appProcessor.createNewApp(e)}getItems(e){return this.itemProcessor.getItems(e)}async getItem(e,t){let r=await this.getItems(e);if(r)return r.find(a=>a.item_id==t)}addNewItems(e,t){return this.itemProcessor.addNewItems(e,t)}updateItems(e,t){return this.itemProcessor.updateItems(e,t)}deleteItems(e,t){return this.itemProcessor.deleteItems(e,t)}getField(e,t){return this.fieldProcessor.getField(e,t)}getFieldIdByNameSpace(e,t){return this.fieldProcessor.getFieldIdByNameSpace(e,t)}getFieldModels(e){return this.fieldProcessor.getFieldModels(e)}updateField(e,t){return this.fieldProcessor.updateField(e,t)}deleteField(e,t){return this.fieldProcessor.deleteField(e,t)}getFieldValue(e,t,r){return this.fieldProcessor.getFieldValue(e,t,r)}setFieldValue(e,t,r,a){return this.fieldProcessor.setFieldValue(e,t,r,a)}getFile(e,t){return this.fileManager.getFile(e,t)}getFiles(e,t){return this.fileManager.getFiles(e,t)}uploadFile(e,t,r){return this.fileManager.uploadFile(e,t,r)}uploadFileFromString(e,t,r,a,i,l,s){return this.fileManager.uploadFileFromString(e,t,r,a,i,l,s)}updateFileFromString(e,t,r,a,i,l,s){return this.fileManager.updateFileFromString(e,t,r,a,i,l,s)}deleteFile(e,t){return this.fileManager.deleteFile(e,t)}duplicateFile(e){return this.fileManager.duplicateFile(e)}downloadFileFromString(e,t){return this.fileManager.downloadFileFromString(e,t)}createDocument(e){return this.documentManager.createDocument(e)}getDocument(e){return this.documentManager.getDocument(e)}getDocuments(e){return this.documentManager.getDocuments(e)}deleteDocument(e){return this.documentManager.deleteDocument(e)}login(e){return this.auth.login(e)}loginWithToken(e){return this.auth.loginWithToken(e)}logout(e){return this.appProcessor.clearAppProcessor(),this.auth.logout(e)}signup(e){return this.auth.signup(e)}getUsersList(e){return this.auth.getUsersList(e)}updateToken(e){return this.auth.updateToken(e)}avatarUploadApi(e){return this.auth.avatarUploadApi(e)}getVersion(){return this.auth.getVersion()}getUserById(e){return this.auth.getUserById(e)}getToken(){return this.auth.getToken()}updateUser(e){return this.auth.updateUser(e)}updateAvatar(e){return this.auth.updateAvatar(e)}}class Ho extends Wo{initializeAppProcessor(){this.appProcessor=new Gr(this.storage,this.pipeService,this.req,this.ws,this.util,!1,new He(this.req,null,this))}}let Le={},yt={},Qn={};self.onmessage=async function(n){if(n.data.type===xe.INIT&&(n.data.gudhubSerialized.options.initWebsocket=!1,Le=new Ho(n.data.gudhubSerialized.authKey,n.data.gudhubSerialized.options),yt=new Ur(Le.req,Et,Le),Qn=new wa(Le.req,zt,Le)),n.data.type==xe.PROCESS_DATA){if(!n.data.usedCachedDataVersion){this.postMessage({id:n.data.id,type:xe.DECLINE_PROCESS_DATA_REQUEST});return}let e=await yt.getCached(n.data.id),t=e.chunks,r=await yt.getAppWithoutProcessing(n.data.id),a=!0;if(t.length!=r.chunks.length&&(a=!1),r.chunks.some(u=>!t.includes(u))&&(a=!1),!a){let u=await Qn.getCachedMergedChunk(n.data.id,e.chunks);u&&(e.items_list=await Le.util.mergeChunks([u,e])),r=await yt.getApp(n.data.id)}let i=Le.compareItems(r.items_list,e.items_list),l=Le.util.areViewListsEqual(e.views_list,r.views_list),s=Le.util.areFieldListsEqual(e.field_list,r.field_list);this.postMessage({id:n.data.id,compareRes:i,newVersion:r,type:n.data.type,viewListChanged:l,fieldListChanged:s})}if(n.data.type==xe.REQUEST_APP){let e=await yt.getApp(n.data.id);this.postMessage({id:n.data.id,type:n.data.type,data:e})}}})()})();
|
|
195
|
+
`,blob=typeof self<"u"&&self.Blob&&new Blob([jsContent],{type:"text/javascript;charset=utf-8"});function WorkerWrapper(n){let e;try{if(e=blob&&(self.URL||self.webkitURL).createObjectURL(blob),!e)throw"";const t=new Worker(e,{name:n==null?void 0:n.name});return t.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),t}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(jsContent),{name:n==null?void 0:n.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}let WORKER_EVENTS={INIT:1,REQUEST_APP:2,PROCESS_DATA:3,DECLINE_PROCESS_DATA_REQUEST:4};class IndexedDBAppService extends AppDataService$1{constructor(e,t,r){super(e,t,r),this.dataService=new AppHttpService(e,t,r),this.requestCache=new Map,this.gudhub=r,this.resolveFnMap=new Map,this.appRequestAndProcessWorker=new WorkerWrapper,this.appRequestAndProcessWorker.postMessage({type:WORKER_EVENTS.INIT,gudhubSerialized:this.gudhub.serialized});let i=this;this.appRequestAndProcessWorker.onerror=function(a){},this.appRequestAndProcessWorker.onmessage=function(a){a.data.type==WORKER_EVENTS.REQUEST_APP&&i.resolveFnMap.has(a.data.id)&&i.resolveFnMap.get(a.data.id)(a.data.data),a.data.type==WORKER_EVENTS.PROCESS_DATA&&(i.gudhub.itemProcessor.handleDiff(a.data.id,a.data.compareRes),(a.data.viewListChanged||a.data.fieldListChanged)&&i.gudhub.appProcessor.updateAppFieldsAndViews(a.data.newVersion))},this.isWithCache(),this.storeManager=new AppStoreManager}static[Symbol.hasInstance](e){try{return e instanceof IndexedDBAppService}catch{return!1}}isWithCache(){return!0}async getApp(e){if(this.requestCache.has(e))return this.requestCache.get(e);let t=this,r=await this.has(e);if(r=!1,r){let i=await this.getCached(e),a=await this.chunkDataService.getCachedMergedChunk(e,i.chunks);i.items_list=await this.gudhub.util.mergeChunks([a,i]);let s=Promise.resolve(i);return this.requestCache.set(e,s),this.appRequestAndProcessWorker.postMessage({type:WORKER_EVENTS.PROCESS_DATA,id:e}),s}else{let i=new Promise((a,s)=>{t.resolveFnMap.set(e,a)});return this.requestCache.set(e,i),this.appRequestAndProcessWorker.postMessage({type:WORKER_EVENTS.REQUEST_APP,id:e}),i}}async getCached(e){return this.storeManager.getApp(e)}async has(e){try{return this.storeManager.hasApp(e)}catch{debugger}}async putApp(e,t){return this.storeManager.putApp(e,t)}}class AppHttpWorkerService extends AppDataService$1{constructor(e,t,r){super(e,t,r),this.dataService=new AppHttpService(e,null,r),this.requestCache=new Map,this.gudhub=r}isWithCache(){return!1}async getAppWithoutProcessing(e){let t=await this.dataService.getAppWithoutProcessing(e);return await this.putApp(e,t),t}async getApp(e){if(this.requestCache.has(e))return this.requestCache.get(e);let t,r=new Promise((s,l)=>{t=s});this.requestCache.set(e,r);let i=await this.dataService.getAppWithoutProcessing(e),a=await this.processRequestedApp(e,i);return t(a),a}async has(e){return!1}async getCached(e){throw new Error}async putApp(e,t){throw new Error}}class AppThroughWebWorkerService extends AppDataService$1{constructor(e,t,r){super(e,t,r),this.dataService=new AppHttpService(e,t,r),this.requestCache=new Map,this.gudhub=r,this.resolveFnMap=new Map,this.appRequestAndProcessWorker=new WorkerWrapper,this.appRequestAndProcessWorker.postMessage({type:WORKER_EVENTS.INIT,gudhubSerialized:this.gudhub.serialized});let i=this;this.appRequestAndProcessWorker.onerror=function(a){},this.appRequestAndProcessWorker.onmessage=function(a){a.data.type==WORKER_EVENTS.REQUEST_APP&&i.resolveFnMap.has(a.data.id)&&i.resolveFnMap.get(a.data.id)(a.data.data),a.data.type==WORKER_EVENTS.PROCESS_DATA&&(i.gudhub.itemProcessor.handleDiff(a.data.id,a.data.compareRes),(a.data.viewListChanged||a.data.fieldListChanged)&&i.gudhub.appProcessor.updateAppFieldsAndViews(a.data.newVersion))},this.isWithCache(),this.storeManager=new AppStoreManager}static[Symbol.hasInstance](e){try{return e instanceof IndexedDBAppService}catch{return!1}}isWithCache(){return!1}async getApp(e){if(this.requestCache.has(e))return this.requestCache.get(e);let t=new Promise((r,i)=>{self.resolveFnMap.set(e,r)});return this.requestCache.set(e,t),this.appRequestAndProcessWorker.postMessage({type:WORKER_EVENTS.REQUEST_APP,id:e}),t}async getCached(e){return this.storeManager.getApp(e)}async has(e){try{return this.storeManager.hasApp(e)}catch{debugger}}async putApp(e,t){return this.storeManager.putApp(e,t)}}let AppDataService,ChunkDataService,appDataServiceConf,chunkDataServiceConf;IS_BROWSER&&useWorkerToProcessRequestsData&&(AppDataService=AppThroughWebWorkerService,appDataServiceConf=appsConf),IS_BROWSER||(AppDataService=AppHttpService),useWorkerToProcessRequestsData&&(AppDataServiceForWorker=AppHttpWorkerService),IS_BROWSER&&cache_chunk_requests&&!useWorkerToProcessRequestsData&&(ChunkDataService=IndexedDBChunkService,chunkDataServiceConf=chunksConf),IS_BROWSER&&cache_chunk_requests&&useWorkerToProcessRequestsData&&(ChunkDataService=IndexedDBChunkService,chunkDataServiceConf=chunksConf),IS_BROWSER||(ChunkDataService=ChunkHttpService);let AppDataServiceForWorker=AppHttpWorkerService;class GudHub{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{server_url,wss_url,node_server_url,initWebsocket:!1,activateSW:!1,swLink:"",async_modules_path,file_server_url,automation_modules_path,accesstoken:this.accesstoken,expirydate:this.expirydate};if(this.serialized={authKey:e,options:t},this.config=t,this.ghconstructor=new GHConstructor(this),this.interpritate=new Interpritate(this),this.pipeService=new PipeService,this.storage=new Storage(t.async_modules_path,t.file_server_url,t.automation_modules_path),this.util=new Utils(this),this.req=new GudHubHttpsService(t.server_url),this.auth=new Auth(this.req,this.storage),this.sharing=new Sharing(this,this.req),this.groupSharing=new GroupSharing(this,this.req,this.pipeService),e?this.storage.setUser({auth_key:e}):t.accesstoken&&t.expirydate&&this.storage.setUser({accesstoken:t.accesstoken,expirydate:t.expirydate}),this.req.init(this.auth.getToken.bind(this.auth)),this.ws=new WebSocketApi(t.wss_url,this.auth),this.initializeAppProcessor(),this.itemProcessor=new ItemProcessor(this.storage,this.pipeService,this.req,this.appProcessor,this.util),this.fieldProcessor=new FieldProcessor(this.storage,this.req,this.appProcessor,this.itemProcessor,this.pipeService),this.fileManager=new FileManager(this.storage,this.pipeService,this.req,this.appProcessor),this.documentManager=new DocumentManager(this.req,this.pipeService),this.websocketsemitter=new WebSocketEmitter(this),t.initWebsocket){const r=this;this.ws.initWebSocket(WebsocketHandler.bind(this,r),this.appProcessor.refreshApps.bind(this.appProcessor))}t.activateSW&&this.activateSW(t.swLink)}initializeAppProcessor(){this.appProcessor=new AppProcessor(this.storage,this.pipeService,this.req,this.ws,this.util,this.config.activateSW,new AppDataService(this.req,appDataServiceConf,this))}async activateSW(e){if(IS_BROWSER_MAIN_THREAD&&"serviceWorker"in window.navigator)try{const t=await window.navigator.serviceWorker.register(e);t.update().then(()=>console.log("%cSW ->>> Service worker successful updated","display: inline-block ; background-color: #689f38 ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;")).catch(()=>console.warn("SW ->>> Service worker is not updated")),console.log("%cSW ->>> Service worker is registered","display: inline-block ; background-color: #689f38 ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;",t)}catch(t){console.warn("%cSW ->>> Service worker is not registered","display: inline-block ; background-color: #d32f2f ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;",t)}else console.log("%cSW ->>> ServiceWorkers not supported","display: inline-block ; background-color: #d32f2f ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;")}on(e,t,r){return this.pipeService.on(e,t,r),this}emit(e,t,r,i){return this.pipeService.emit(e,t,r,i),this}destroy(e,t,r){return this.pipeService.destroy(e,t,r),this}prefilter(e,t){return this.util.prefilter(e,t)}debounce(e,t){return this.util.debounce(e,t)}emitToUser(e,t){return this.websocketsemitter.emitToUser(e,t)}broadcastToAppSubscribers(e,t,r){return this.websocketsemitter.broadcastToAppSubscribers(e,t,r)}getInterpretation(e,t,r,i,a,s,l){return this.interpritate.getInterpretation(e,t,r,i,a,s,l)}getInterpretationById(e,t,r,i,a,s){return this.interpritate.getInterpretationById(e,t,r,i,a,s)}filter(e,t){return this.util.filter(e,t)}mergeFilters(e,t){return this.util.mergeFilters(e,t)}group(e,t){return this.util.group(e,t)}getFilteredItems(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.util.getFilteredItems(e,t,r.element_app_id,r.app_id,r.item_id,r.field_group,r.search,r.search_params)}sortItems(e,t){return this.util.sortItems(e,t)}jsonToItems(e,t){return this.util.jsonToItems(e,t)}getDate(e){return this.util.getDate(e)}populateWithDate(e,t){return this.util.populateWithDate(e,t)}checkRecurringDate(e,t){return this.util.checkRecurringDate(e,t)}populateItems(e,t,r){return this.util.populateItems(e,t,r)}populateWithItemRef(e,t,r,i,a,s){return this.util.populateWithItemRef(e,t,r,i,a,s)}compareItems(e,t,r){return this.util.compareItems(e,t,r)}mergeItems(e,t,r){return this.util.mergeItems(e,t,r)}mergeObjects(e,t){return this.util.mergeObjects(e,t)}makeNestedList(e,t,r,i,a){return this.util.makeNestedList(e,t,r,i,a)}jsonConstructor(e,t,r,i){return this.util.jsonConstructor(e,t,r,i)}getAppsList(){return this.appProcessor.getAppsList()}getAppInfo(e){return this.appProcessor.getAppInfo(e)}deleteApp(e){return this.appProcessor.deleteApp(e)}getApp(e){return this.appProcessor.getApp(e)}updateApp(e){return this.appProcessor.updateApp(e)}updateAppInfo(e){return this.appProcessor.updateAppInfo(e)}createNewApp(e){return this.appProcessor.createNewApp(e)}getItems(e){return this.itemProcessor.getItems(e)}async getItem(e,t){const r=await this.getItems(e);if(r)return r.find(i=>i.item_id==t)}addNewItems(e,t){return this.itemProcessor.addNewItems(e,t)}updateItems(e,t){return this.itemProcessor.updateItems(e,t)}deleteItems(e,t){return this.itemProcessor.deleteItems(e,t)}getField(e,t){return this.fieldProcessor.getField(e,t)}getFieldIdByNameSpace(e,t){return this.fieldProcessor.getFieldIdByNameSpace(e,t)}getFieldModels(e){return this.fieldProcessor.getFieldModels(e)}updateField(e,t){return this.fieldProcessor.updateField(e,t)}deleteField(e,t){return this.fieldProcessor.deleteField(e,t)}getFieldValue(e,t,r){return this.fieldProcessor.getFieldValue(e,t,r)}setFieldValue(e,t,r,i){return this.fieldProcessor.setFieldValue(e,t,r,i)}getFile(e,t){return this.fileManager.getFile(e,t)}getFiles(e,t){return this.fileManager.getFiles(e,t)}uploadFile(e,t,r){return this.fileManager.uploadFile(e,t,r)}uploadFileFromString(e,t,r,i,a,s,l){return this.fileManager.uploadFileFromString(e,t,r,i,a,s,l)}updateFileFromString(e,t,r,i,a,s,l){return this.fileManager.updateFileFromString(e,t,r,i,a,s,l)}deleteFile(e,t){return this.fileManager.deleteFile(e,t)}duplicateFile(e){return this.fileManager.duplicateFile(e)}downloadFileFromString(e,t){return this.fileManager.downloadFileFromString(e,t)}createDocument(e){return this.documentManager.createDocument(e)}getDocument(e){return this.documentManager.getDocument(e)}getDocuments(e){return this.documentManager.getDocuments(e)}deleteDocument(e){return this.documentManager.deleteDocument(e)}login(e){return this.auth.login(e)}loginWithToken(e){return this.auth.loginWithToken(e)}logout(e){return this.appProcessor.clearAppProcessor(),this.auth.logout(e)}signup(e){return this.auth.signup(e)}getUsersList(e){return this.auth.getUsersList(e)}updateToken(e){return this.auth.updateToken(e)}avatarUploadApi(e){return this.auth.avatarUploadApi(e)}getVersion(){return this.auth.getVersion()}getUserById(e){return this.auth.getUserById(e)}getToken(){return this.auth.getToken()}updateUser(e){return this.auth.updateUser(e)}updateAvatar(e){return this.auth.updateAvatar(e)}}return GudHub});
|