@vtj/pro 0.18.8 → 0.18.10

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.
Files changed (24) hide show
  1. package/dist/@vtj/materials/assets/antdv/index.umd.js +2 -2
  2. package/dist/@vtj/materials/assets/charts/index.umd.js +2 -2
  3. package/dist/@vtj/materials/assets/element/index.umd.js +2 -2
  4. package/dist/@vtj/materials/assets/icons/index.umd.js +2 -2
  5. package/dist/@vtj/materials/assets/ui/index.umd.js +2 -2
  6. package/dist/@vtj/materials/assets/uni-h5/index.umd.js +2 -2
  7. package/dist/@vtj/materials/assets/uni-ui/index.umd.js +2 -2
  8. package/dist/@vtj/materials/assets/vant/index.umd.js +2 -2
  9. package/dist/@vtj/materials/deps/@vtj/charts/index.umd.js +2 -2
  10. package/dist/@vtj/materials/deps/@vtj/icons/index.umd.js +2 -2
  11. package/dist/@vtj/materials/deps/@vtj/ui/index.umd.js +2 -2
  12. package/dist/@vtj/materials/deps/@vtj/utils/index.umd.js +2 -2
  13. package/dist/assets/{Editor-VZdiHFNS-C4YkwEzc.js → Editor-DMWpFVx6-dq3wRCB_.js} +14 -14
  14. package/dist/assets/{auth-_0cifl7m.js → auth-DAfAnoOu.js} +1 -1
  15. package/dist/assets/{index-fbV73XM9.js → index-B-dIOTCJ.js} +1 -1
  16. package/dist/assets/{index-B4Vip_WM.js → index-DQVIKZaw.js} +2 -2
  17. package/dist/assets/{page-qMhnPnAy.js → page-Q6MHhALL.js} +1 -1
  18. package/dist/assets/{preview-BuLNwWxz.js → preview-BteUjxg6.js} +1 -1
  19. package/dist/assets/{utils-BjLUSu4S.js → utils-DrVvRvK8.js} +1 -1
  20. package/dist/index.html +3 -3
  21. package/dist/uni/assets/{index-DLgf4W0-.js → index-CgLIp5RH.js} +7 -7
  22. package/dist/uni/index.html +1 -1
  23. package/package.json +11 -11
  24. /package/dist/assets/{Editor-VZdiHFNS-C4uXNc6V.css → Editor-DMWpFVx6-C4uXNc6V.css} +0 -0
@@ -46,21 +46,21 @@ function print() { __p += __j.call(arguments, '') }
46
46
  * Copyright (c) 2026, VTJ.PRO All rights reserved.
47
47
  * @name @vtj/core
48
48
  * @author CHC chenhuachun1549@dingtalk.com
49
- * @version 0.18.8
49
+ * @version 0.18.10
50
50
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
51
51
  */const Sm="VueMaterial",Em="VueRouterMaterial",Tm={[Sm]:["Transition","TransitionGroup","KeepAlive","Teleport","Suspense"],[Em]:["RouterView","RouterLink"]};let Cm=class{constructor(){H(this,"listeners",[]);H(this,"isReady",!1)}triggerReady(){this.isReady=!0;for(const e of this.listeners)e();this.listeners=[]}ready(e){this.isReady?e():this.listeners.push(e)}resetReady(){this.isReady=!1}};var Am=Object.defineProperty,Rm=(t,e,r)=>e in t?Am(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,we=(t,e,r)=>Rm(t,typeof e!="symbol"?e+"":e,r);(function(){if(typeof window>"u"||typeof EventTarget>"u")return;const t=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(e,r,n){typeof n!="boolean"&&(n=n||{},n.passive=!1),t.call(this,e,r,n)}})();/**!
52
52
  * Copyright (c) 2026, VTJ.PRO All rights reserved.
53
53
  * @name @vtj/utils
54
54
  * @author CHC chenhuachun1549@dingtalk.com
55
- * @version 0.18.8
55
+ * @version 0.18.10
56
56
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
57
57
  */const Im={form:"application/x-www-form-urlencoded",json:"application/json",data:"multipart/form-data"},km=["put","post","patch"],ws="Local-Request-Id",Om=100,Pm=300,Dm="/api/proxy";let Nm=class{constructor(e={}){we(this,"axios"),we(this,"settings"),we(this,"records",{}),we(this,"isLoading",!1),we(this,"stopSkipWarn"),we(this,"showLoading"),we(this,"showError"),this.settings=Object.assign({type:"form"},e.settings||{});const r=en(e,["settings","query"]);this.axios=di.create(Bt({headers:{"Content-Type":"application/x-www-form-urlencoded"},timeout:120*1e3},r)),this.setupSkipWarn(this.settings),this.showLoading=Yn(this.openLoading.bind(this),Om),this.showError=lg(this._showError.bind(this),Pm,{leading:!0,trailing:!1})}setConfig(e={}){this.settings=Bt(this.settings,e.settings||{});const r=en(e,["settings","query"]);this.axios.defaults=Bt(this.axios.defaults,r),this.setupSkipWarn(this.settings)}cancel(e,r="请求已取消"){if(e){const n=this.records[e];if(!n)return;n.source.cancel(r)}else for(const n of Object.values(this.records))n.source.cancel(r)}createHeaders(e,r,n){const i=r.injectHeaders?typeof r.headers=="function"?r.headers(e,n,r):r.headers||{}:{},s=U(U({"Content-Type":Im[r.type||"form"]},n.headers),i);return r.skipWarn&&(s[ws]=e),s}isJsonType(e){return Object.entries(e).some(([r,n])=>r.toLowerCase()==="content-type"&&String(n).includes("application/json"))}toFormData(e,r="data"){if(e instanceof FormData||e instanceof URLSearchParams)return e;const n=r==="data"?new FormData:new URLSearchParams;return Object.entries(e).forEach(([i,s])=>{n.append(i,s)}),n}createSendData(e,r,n,i,s={}){const{type:a,skipWarn:o}=e,{name:u="skipWarn"}=o||{};let{data:c,params:l={},method:h="get"}=r;const p=i?{[u]:!0}:{};return km.includes(h.toLowerCase())?(c=Object.assign(c||{},p),c=a!=="json"||!this.isJsonType(n)?this.toFormData(c,a):c,l=U({},s)):a==="form"?l=U(U(U({},c||{}),s),p):(c&&(a!=="json"||!this.isJsonType(n))&&(c=this.toFormData(c,a)),l=U(U({},s),p)),{data:c,params:l}}createUrl(e){let{url:r,params:n}=e;if(r){let i=Gt(r)?new URL(r).origin:"";const s=i?r.replace(i,""):r;try{const a=pm(s,{encode:encodeURIComponent});return i+a(n||{})}catch(a){console.warn("createUrl","pathToRegexpCompile error",r)}}return r}createProxy(e,r,n){if(!e.proxy)return{url:r,headers:n};const i=e.proxyPath||Dm,{protocol:s,host:a}=location||{},o=Gt(r)?r:`${s}//${a}${r}`;return n.Target=o,{url:i,headers:n}}openLoading(e){const{loading:r,showLoading:n}=e;r&&n&&Object.keys(this.records).length>0&&(this.isLoading=!0,n())}closeLoading(e){const{hideLoading:r}=e;this.isLoading=!1;const n=Object.keys(this.records);r&&n.length===0&&(this.isLoading=!1,r())}_showError(e,r){var s;const{failMessage:n,showError:i}=e;if(n&&i){const a=(s=r==null?void 0:r.response)==null?void 0:s.data,o=(a==null?void 0:a.message)||(a==null?void 0:a.msg)||(r==null?void 0:r.message)||(r==null?void 0:r.msg)||"未知错误";i(o,r)}}validResponse(e,r){const{validSuccess:n,validate:i}=e;return n&&i?!!i(r):!0}isSkipWarnResponse(e){return!!e.promise}send(e={},r=!1){const n=Bt({},this.settings,e.settings||{}),i=e.query||{},s=en(e,["settings","query"]),a=om(!1),o=di.CancelToken.source();this.records[a]={settings:n,config:s,source:o};const u=this.createUrl(s)||"",c=this.createHeaders(a,n,s),{url:l,headers:h}=this.createProxy(n,u,c),{data:p,params:f}=this.createSendData(n,s,h,r,i);return this.showLoading(n),new Promise((g,m)=>{this.axios(ce(U({cancelToken:o.token},s),{url:l,headers:h,data:p,params:f})).then(v=>{var w;return this.isSkipWarnResponse(v)?g(v.promise):this.validResponse(n,v)?g(n.originResponse?v:(w=v.data)==null?void 0:w.data):(this.showError(n,v.data),m(v.data))}).catch(v=>(this.showError(n,v),m(v))).finally(()=>{delete this.records[a],this.closeLoading(n)})})}useResponse(e,r){const{response:n}=this.axios.interceptors,i=n.use(e,r);return()=>n.eject(i)}useRequest(e,r){const{request:n}=this.axios.interceptors,i=n.use(e,r);return()=>n.eject(i)}setupSkipWarn(e){if(this.stopSkipWarn&&(this.stopSkipWarn(),this.stopSkipWarn=void 0),!e.skipWarn)return;const{code:r,executor:n,callback:i,complete:s}=e.skipWarn;this.stopSkipWarn=this.useResponse(a=>{const o=(a.config.headers||{})[ws],u=this.records[o];if(!u)return a;const{data:c}=a;if(!c||typeof c!="object")return a;if((c==null?void 0:c.code)===r){i&&i(a);const l=new Promise(n).then(()=>this.send(ce(U({},u.config),{settings:u.settings}),!0));l.catch(h=>h).finally(()=>{s&&s()}),a.promise=l}return a})}};function Xn(t={}){const e=new Nm(t),r=e.send.bind(e),n=e.cancel.bind(e),i=e.setConfig.bind(e),s=e.useRequest.bind(e),a=e.useResponse.bind(e);return Object.assign(r,ce(U({},e),{instance:e,send:r,cancel:n,setConfig:i,useRequest:s,useResponse:a}))}const Cn=Xn({settings:{injectHeaders:!0,loading:!0,originResponse:!0}}),An=typeof window<"u";function $m(t){const e={};return t?(t.forEach((r,n)=>{e[n]=typeof r=="string"?decodeURIComponent(r):r}),e):{}}class no{constructor(e={}){we(this,"options",{type:"cache",expired:0,prefix:"__VTJ_"}),we(this,"caches",{}),we(this,"types"),this.types={local:An?window.localStorage:this.caches,session:An?window.sessionStorage:this.caches,cache:this.caches},this.config(e)}config(e={}){this.options=Object.assign(this.options,e)}save(e,r,n={}){const{type:i,expired:s,prefix:a}=U(U({},this.options),n),o=Date.now(),u=a+e,c=this.types[i]||this.caches,l={value:r,timestamp:o,expired:s};c===this.caches?c[u]=l:c.setItem(u,JSON.stringify(l))}get(e,r={}){const{type:n,prefix:i}=U(U({},this.options),r),s=i+e,a=this.types[n]||this.caches;let o;if(a===this.caches)o=a[s];else{const h=a.getItem(s);if(h)try{o=JSON.parse(h)}catch(p){console.warn("[Storage] JSON.parse",p)}}if(!o)return null;const{value:u,timestamp:c,expired:l}=o;return l>0&&c+l<Date.now()?(this.remove(e,r),null):u}remove(e,r={}){const{type:n,prefix:i}=U(U({},this.options),r),s=this.types[n]||this.caches,a=i+e;s===this.caches?delete s[a]:s.removeItem(a)}clear(e={}){const{type:r}=U(U({},this.options),e),n=this.types[r]||this.caches;n===this.caches?this.caches={}:n.clear()}}const tn=new no;function io(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var yr={exports:{}},Bm=yr.exports,Ss;function Lm(){return Ss||(Ss=1,(function(t,e){(function(r,n){n(e,t)})(Bm,function(r,n){var i={timeout:5e3,jsonpCallback:"callback"};function s(){return"jsonp_"+Date.now()+"_"+Math.ceil(Math.random()*1e5)}function a(c){try{delete window[c]}catch(l){window[c]=void 0}}function o(c){var l=document.getElementById(c);l&&document.getElementsByTagName("head")[0].removeChild(l)}function u(c){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],h=c,p=l.timeout||i.timeout,f=l.jsonpCallback||i.jsonpCallback,g=void 0;return new Promise(function(m,v){var w=l.jsonpCallbackFunction||s(),y=f+"_"+w;window[w]=function(x){m({ok:!0,json:function(){return Promise.resolve(x)}}),g&&clearTimeout(g),o(y),a(w)},h+=h.indexOf("?")===-1?"?":"&";var _=document.createElement("script");_.setAttribute("src",""+h+f+"="+w),l.charset&&_.setAttribute("charset",l.charset),l.nonce&&_.setAttribute("nonce",l.nonce),l.referrerPolicy&&_.setAttribute("referrerPolicy",l.referrerPolicy),l.crossorigin&&_.setAttribute("crossorigin","true"),_.id=y,document.getElementsByTagName("head")[0].appendChild(_),g=setTimeout(function(){v(new Error("JSONP request to "+c+" timed out")),a(w),o(y),window[w]=function(){a(w)}},p),_.onerror=function(){v(new Error("JSONP request to "+c+" failed")),a(w),o(y),g&&clearTimeout(g)}})}n.exports=u})})(yr,yr.exports)),yr.exports}var Vm=Lm();const Mm=io(Vm);function jm(t){if(An){const{protocol:e,host:r,pathname:n}=location;return`${e}//${r}${t?n:""}`}else return null}function Fm(t=""){const e=t.match(Za);return e?e[0]:""}function so(t){const e=[];for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push([r,encodeURIComponent(t[r])].join("="));return e.join("&")}function Rn(t,e,r){const n={};t=(t||location.search).replace(/^[^]*\?/,""),e=e||"&",r=r||"=";let i;const s=new RegExp("(?:^|\\"+e+")([^\\"+r+"\\"+e+"]+)(?:\\"+r+"([^\\"+e+"]*))?","g");for(;(i=s.exec(t))!==null;)i[1]!==t&&(n[decodeURIComponent(i[1])]=decodeURIComponent(i[2]||""));return n}function ao(t,e){e=typeof e=="string"?Rn(e):e;const r=t.split("?")[0],n=Rn(t),i=Object.assign({},n,e),s=so(i);return s?[r,s].join("?"):t}const Ft=Object.freeze(Object.defineProperty({__proto__:null,append:ao,getCurrentHost:jm,getHost:Fm,parse:Rn,stringify:so},Symbol.toStringTag,{value:"Module"}));function oo(r){return j(this,arguments,function*(t,e={}){const{query:n={}}=e;t.includes("${")&&(t=cg(t)(n||{}));const i=ao(t,n);return yield(yield Mm(i,e)).json()})}var rn,Es;function Um(){if(Es)return rn;Es=1,rn=function(n,i,s){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("script");typeof i=="function"&&(s=i,i={}),i=i||{},s=s||function(){},o.type=i.type||"text/javascript",o.charset=i.charset||"utf8",o.async="async"in i?!!i.async:!0,o.src=n,i.attrs&&t(o,i.attrs),i.text&&(o.text=""+i.text);var u="onload"in o?e:r;u(o,s),o.onload||e(o,s),a.appendChild(o)};function t(n,i){for(var s in i)n.setAttribute(s,i[s])}function e(n,i){n.onload=function(){this.onerror=this.onload=null,i(null,n)},n.onerror=function(){this.onerror=this.onload=null,i(new Error("Failed to load "+this.src),n)}}function r(n,i){n.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,i(null,n))}}return rn}var Hm=Um();const qm=io(Hm);function Ts(t,e={}){return new Promise((r,n)=>{const{library:i}=e;qm(t,e,(s,a)=>{s?n(s):r(i?window[i]:void 0)})})}const Cs={debug:-1,log:0,info:0,warn:1,error:2},zm=function(t,e,r,n){return function(...i){if(e&&Cs[e]<=Cs[t]&&console[t].apply&&(n==="*"||r.startsWith(n)))return console[t].apply(console,Wm(i,r))}};function Wm(t,e){return e!=="*"&&(typeof t[0]=="string"?t[0]=`[${e}] ${t[0]}`:t=["["+e+"]"].concat(t)),t}function Gm(t,e){if(!t)return{targetLevel:e.level,targetBizName:e.bizName};if(~t.indexOf(":")){const r=t.split(":");return{targetLevel:r[0],targetBizName:r[1]}}return{targetLevel:t,targetBizName:"*"}}const Km={level:"warn",bizName:"*"};let Ym=class{constructor(e){we(this,"config"),we(this,"options"),this.options=U(U({},Km),e);const r=typeof location<"u"?location:{},n=(/__(?:logConf|logLevel)__=([^#/&]*)/.exec(r.href)||[])[1];this.config=Gm(n,e)}_log(e){const{targetLevel:r,targetBizName:n}=this.config,{bizName:i}=this.options;return zm(e,r,i,n)}debug(...e){return this._log("debug")(...e)}log(...e){return this._log("log")(...e)}info(...e){return this._log("info")(...e)}warn(...e){return this._log("warn")(...e)}error(...e){return this._log("error")(...e)}};function Jm(t){return new Ym(t)}const Ct=Jm({level:"log",bizName:"VTJ"});/*! js-cookie v3.0.8 | MIT */function hr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)n!=="__proto__"&&(t[n]=r[n])}return t}var Zm={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function In(t,e){function r(i,s,a){if(!(typeof document>"u")){a=hr({},e,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var o="";for(var u in a)a[u]&&(o+="; "+u,a[u]!==!0&&(o+="="+a[u].split(";")[0]));return document.cookie=i+"="+t.write(s,i)+o}}function n(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var s=document.cookie?document.cookie.split("; "):[],a={},o=0;o<s.length;o++){var u=s[o].split("="),c=u.slice(1).join("=");try{var l=decodeURIComponent(u[0]);if(l in a||(a[l]=t.read(c,l)),i===l)break}catch(h){}}return i?a[i]:a}}return Object.create({set:r,get:n,remove:function(i,s){r(i,"",hr({},s,{expires:-1}))},withAttributes:function(i){return In(this.converter,hr({},this.attributes,i))},withConverter:function(i){return In(hr({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var ei=In(Zm,{path:"/"});function Qm(t,e,r){ei.set(t,e,r)}function Xm(t){return ei.get(t)}function ev(t,e){ei.remove(t,e)}const nn=Object.freeze(Object.defineProperty({__proto__:null,get:Xm,remove:ev,set:Qm},Symbol.toStringTag,{value:"Module"}));/**!
58
58
  * Copyright (c) 2026, VTJ.PRO All rights reserved.
59
59
  * @name @vtj/renderer
60
60
  * @author CHC chenhuachun1549@dingtalk.com
61
- * @version 0.18.8
61
+ * @version 0.18.10
62
62
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
63
- */const sn="0.18.8";var ne=(t=>(t.Runtime="Runtime",t.Design="Design",t.Raw="Raw",t.VNode="VNode",t))(ne||{});const As=["$el","$emit","$nextTick","$parent","$root","$attrs","$slots","$watch","$props","$options","$forceUpdate"],tv=["vIf","vElseIf","vElse","vShow","vModel","vFor","vBind","vHtml"],rv={String,Number,Boolean,Array,Object,Function,Date},br="VtjPage",an="VtjHomepage",co="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot,svg".split(","),nv="component,slot".split(",");function pr(t,e){return t.map(r=>Gt(r)||r.startsWith("/")?r:`${e}${r}`)}function Or(t){return/\.css$/.test(t)}function Pr(t){return/\.js$/.test(t)}function iv(t){return/\.json$/.test(t)}function sv(t,e=!1){return e&&t.endsWith(".prod.js")?t.replace(".prod.js",".js"):t}function av(t,e,r=!1){const n=t.filter(p=>!!p.enabled),i=[],s=[],a=[],o=[],u={},c={},l=[],h={};return n.forEach(({urls:p,assetsUrl:f,library:g,assetsLibrary:m,localeLibrary:v})=>{p==null||p.forEach(w=>{Pr(w)&&i.push(sv(w,r)),Or(w)&&s.push(w)}),g&&(o.push(g),u[g]=pr(p||[],e),v&&(c[g]=v)),f&&a.push(f),m&&l.push(m),g&&m&&(h[m]=g)}),{scripts:pr(i,e),css:pr(s,e),materials:pr(a,e),libraryExports:o,materialExports:um(l),materialMapLibrary:h,libraryMap:u,libraryLocaleMap:c}}function ov(t,e){var s;const{name:r,parent:n,alias:i}=t;return n?(s=e[n])==null?void 0:s[i||r]:e[i||r]}function cv(t=[]){const e=t.filter(n=>Or(n)),r=t.filter(n=>Pr(n));return{css:e,js:r}}function uv(t,e){const r=c=>{const l=[];let h=0;for(;h<c.length;){if(/\s/.test(c[h])){h++;continue}if(c.substring(h,h+2)==="/*"){const w=c.indexOf("*/",h+2);if(w!==-1){h=w+2;continue}}if(c[h]==="@"){const w=h;for(;h<c.length&&c[h]!=="{"&&c[h]!==";";)h++;const y=c.substring(w,h).trim(),_=y.includes("@keyframes");if(c[h]===";")l.push({type:"simple-at-rule",content:c.substring(w,h+1)}),h++;else if(c[h]==="{"){const x=h+1;let S=1;for(h++;h<c.length&&S>0;)c[h]==="{"?S++:c[h]==="}"&&S--,h++;const b=c.substring(w,h),T=c.substring(x,h-1);l.push({type:_?"keyframes":"at-rule",rule:y,content:b,inner:T})}continue}const p=h;for(;h<c.length&&c[h]!=="{";)h++;if(h>=c.length)break;const f=c.substring(p,h).trim();if(!f){h++;continue}const g=h+1;let m=1;for(h++;h<c.length&&m>0;)c[h]==="{"?m++:c[h]==="}"&&m--,h++;const v=c.substring(g,h-1);l.push({type:"rule",selector:f,content:v.trim()})}return l},n=c=>{const l=c.trim();return/^(from|to|\d+(\.\d+)?%)$/.test(l)},i=c=>c.replace(/::v-deep\(/g,":deep(").replace(/::v-deep\s+/g,":deep(").replace(/\/deep\//g," ").replace(/>>>/g," ").replace(/(.*?):deep\(([^)]+)\)/g,(l,h,p)=>{const f=h.trim(),g=p.trim();return f?`${f}[${e}] ${g}`:g}),s=c=>{const l=c.trim();if(!l||l.includes(`[${e}]`)||/^(:root|:host|html|body)(\s|$|:|\.|\#|\[)/.test(l)||n(l))return l;const h=l.match(/^(.+?)((?:::?[\w-]+(?:\([^)]*\))?)*)\s*$/);if(h){const[,p,f=""]=h,g=p.trim();return g?`${g}[${e}]${f}`:l}return`${l}[${e}]`},a=c=>i(c).split(",").map(l=>s(l)).filter(l=>l.trim()).join(", "),o=c=>c.map(l=>{switch(l.type){case"simple-at-rule":return l.content;case"keyframes":return l.content;case"at-rule":try{const p=r(l.inner),f=o(p);return`${l.rule} { ${f} }`}catch(p){return l.content}case"rule":if(!l.selector||!l.content)return"";const h=a(l.selector);return h.trim()?`${h} { ${l.content} }`:"";default:return""}}).filter(l=>l.trim()).join(" "),u=c=>c.replace(/\s*{\s*/g," { ").replace(/\s*}\s*/g," } ").replace(/\s*;\s*/g,"; ").replace(/\s*,\s*/g,", ").replace(/\s+/g," ").replace(/^\s+|\s+$/g,"").replace(/\s*}\s*}/g," } }").trim();try{const c=t.replace(/\/\*(?!\s*!)[\s\S]*?\*\//g,"").replace(/^\s+|\s+$/gm,"").replace(/\n\s*\n/g,`
63
+ */const sn="0.18.10";var ne=(t=>(t.Runtime="Runtime",t.Design="Design",t.Raw="Raw",t.VNode="VNode",t))(ne||{});const As=["$el","$emit","$nextTick","$parent","$root","$attrs","$slots","$watch","$props","$options","$forceUpdate"],tv=["vIf","vElseIf","vElse","vShow","vModel","vFor","vBind","vHtml"],rv={String,Number,Boolean,Array,Object,Function,Date},br="VtjPage",an="VtjHomepage",co="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot,svg".split(","),nv="component,slot".split(",");function pr(t,e){return t.map(r=>Gt(r)||r.startsWith("/")?r:`${e}${r}`)}function Or(t){return/\.css$/.test(t)}function Pr(t){return/\.js$/.test(t)}function iv(t){return/\.json$/.test(t)}function sv(t,e=!1){return e&&t.endsWith(".prod.js")?t.replace(".prod.js",".js"):t}function av(t,e,r=!1){const n=t.filter(p=>!!p.enabled),i=[],s=[],a=[],o=[],u={},c={},l=[],h={};return n.forEach(({urls:p,assetsUrl:f,library:g,assetsLibrary:m,localeLibrary:v})=>{p==null||p.forEach(w=>{Pr(w)&&i.push(sv(w,r)),Or(w)&&s.push(w)}),g&&(o.push(g),u[g]=pr(p||[],e),v&&(c[g]=v)),f&&a.push(f),m&&l.push(m),g&&m&&(h[m]=g)}),{scripts:pr(i,e),css:pr(s,e),materials:pr(a,e),libraryExports:o,materialExports:um(l),materialMapLibrary:h,libraryMap:u,libraryLocaleMap:c}}function ov(t,e){var s;const{name:r,parent:n,alias:i}=t;return n?(s=e[n])==null?void 0:s[i||r]:e[i||r]}function cv(t=[]){const e=t.filter(n=>Or(n)),r=t.filter(n=>Pr(n));return{css:e,js:r}}function uv(t,e){const r=c=>{const l=[];let h=0;for(;h<c.length;){if(/\s/.test(c[h])){h++;continue}if(c.substring(h,h+2)==="/*"){const w=c.indexOf("*/",h+2);if(w!==-1){h=w+2;continue}}if(c[h]==="@"){const w=h;for(;h<c.length&&c[h]!=="{"&&c[h]!==";";)h++;const y=c.substring(w,h).trim(),_=y.includes("@keyframes");if(c[h]===";")l.push({type:"simple-at-rule",content:c.substring(w,h+1)}),h++;else if(c[h]==="{"){const x=h+1;let S=1;for(h++;h<c.length&&S>0;)c[h]==="{"?S++:c[h]==="}"&&S--,h++;const b=c.substring(w,h),T=c.substring(x,h-1);l.push({type:_?"keyframes":"at-rule",rule:y,content:b,inner:T})}continue}const p=h;for(;h<c.length&&c[h]!=="{";)h++;if(h>=c.length)break;const f=c.substring(p,h).trim();if(!f){h++;continue}const g=h+1;let m=1;for(h++;h<c.length&&m>0;)c[h]==="{"?m++:c[h]==="}"&&m--,h++;const v=c.substring(g,h-1);l.push({type:"rule",selector:f,content:v.trim()})}return l},n=c=>{const l=c.trim();return/^(from|to|\d+(\.\d+)?%)$/.test(l)},i=c=>c.replace(/::v-deep\(/g,":deep(").replace(/::v-deep\s+/g,":deep(").replace(/\/deep\//g," ").replace(/>>>/g," ").replace(/(.*?):deep\(([^)]+)\)/g,(l,h,p)=>{const f=h.trim(),g=p.trim();return f?`${f}[${e}] ${g}`:g}),s=c=>{const l=c.trim();if(!l||l.includes(`[${e}]`)||/^(:root|:host|html|body)(\s|$|:|\.|\#|\[)/.test(l)||n(l))return l;const h=l.match(/^(.+?)((?:::?[\w-]+(?:\([^)]*\))?)*)\s*$/);if(h){const[,p,f=""]=h,g=p.trim();return g?`${g}[${e}]${f}`:l}return`${l}[${e}]`},a=c=>i(c).split(",").map(l=>s(l)).filter(l=>l.trim()).join(", "),o=c=>c.map(l=>{switch(l.type){case"simple-at-rule":return l.content;case"keyframes":return l.content;case"at-rule":try{const p=r(l.inner),f=o(p);return`${l.rule} { ${f} }`}catch(p){return l.content}case"rule":if(!l.selector||!l.content)return"";const h=a(l.selector);return h.trim()?`${h} { ${l.content} }`:"";default:return""}}).filter(l=>l.trim()).join(" "),u=c=>c.replace(/\s*{\s*/g," { ").replace(/\s*}\s*/g," } ").replace(/\s*;\s*/g,"; ").replace(/\s*,\s*/g,", ").replace(/\s+/g," ").replace(/^\s+|\s+$/g,"").replace(/\s*}\s*}/g," } }").trim();try{const c=t.replace(/\/\*(?!\s*!)[\s\S]*?\*\//g,"").replace(/^\s+|\s+$/gm,"").replace(/\n\s*\n/g,`
64
64
  `),l=r(c),h=o(l);return u(h)}catch(c){return console.error("CSS scoping failed:",c),console.error("Input CSS:",t),t.replace(/\/\*[\s\S]*?\*\//g,"").replace(/(@keyframes\s+[^{]+\s*{[^{}]*(?:{[^}]*}[^{}]*)*})/g,l=>l).replace(/([^{}@]+)(?=\s*{)/g,l=>{const h=l.trim();return!h||h.startsWith("@")||h.includes(`[${e}]`)||n(h)?l:`${h}[${e}]`})}}const lv=750;function hv(t,e,r){let n;typeof t<"u"?n=t.innerWidth||t.document.documentElement.clientWidth:(console.warn("无法获取屏幕宽度,使用默认值375"),n=375);const i=lv;return e*n/i}function pv(t,e){let r=!1,n=!1,i=!1,s="";for(let a=0;a<e.length;a++){const o=e[a];if(o==="'"&&!n&&!i?r=!r:o==='"'&&!r&&!i?n=!n:e.substr(a,4).toLowerCase()==="url("&&!r&&!n?i=!0:o===")"&&i&&(i=!1),!r&&!n&&!i){const u=e.substr(a).match(/^(-?\d+(?:\.\d+)?)\s*rpx/);if(u){const c=u[1],l=parseFloat(c),h=`${hv(t,l).toFixed(6).replace(/\.?0+$/,"")}px`;s+=h,a+=u[0].length-1;continue}}s+=o}return s}function uo(t){return Ke(t)?t:JSON.stringify(t)}function Dr(t,e,r,n=!1){const i=t.CSSStyleSheet,s=n?`data-v-${e}`:e,a=t.__uniConfig?pv(t,r):r,o=n?uv(a,s):a,u=!!t.__uniConfig;if(i.prototype.replaceSync&&!u){const c=new i;c.id=e,c.replaceSync(o);const l=t.document,h=l.adoptedStyleSheets,p=Array.from(h).filter(f=>f.id!==e);l.adoptedStyleSheets=[...p,c]}else{const c=t.document;let l=c.getElementById(e);l?l.innerHTML=o:(l=c.createElement("style"),l.id=e,l.innerHTML=o,c.head.appendChild(l))}}function fv(t,e){return j(this,null,function*(){const r=yield globalThis.fetch(e).then(n=>n.text()).catch(()=>"");r&&Dr(globalThis,t,r)})}function lo(t,e=globalThis){const r=e.document,n=e.document.head;for(const i of t)if(!r.getElementById(i)){const s=r.createElement("link");s.rel="stylesheet",s.id=i,s.href=i,n.appendChild(s)}}function ho(n,i){return j(this,arguments,function*(t,e,r=globalThis){const s=r.document,a=r.document.head;let o=r[e];return o?o.default||o:new Promise((u,c)=>{for(const l of t){const h=s.createElement("script");h.src=l,h.onload=()=>{o=r[e],o?u(o.default||o):c(null)},h.onerror=p=>{c(p)},a.appendChild(h)}})})}function dv(t){return ve(t)&&Object.getOwnPropertyNames(t.prototype||{}).length===0||ve(t==null?void 0:t.install)}function gv(t){return nv.includes(t)}function mv(t){return co.includes(t)}function Yt(t=globalThis){const e=globalThis==null?void 0:globalThis.Mock;if(e)return e;const r=t==null?void 0:t.Mock;if(r&&globalThis)return globalThis.Mock=r,r}function vv(t){return/^\([\s\S]*\)/.test(t.trim())}function yv(t){return/\w+\([\s\S]*\)$/.test(t.trim())}function bv(t){return t.includes("=")}var on={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},cn="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",_v={5:cn,"5module":cn+" export import",6:cn+" const class extends export import super"},xv=/^in(stanceof)?$/,ti="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࣇऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-鿼ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞿꟂ-ꟊꟵ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",po="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿᫀᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",wv=new RegExp("["+ti+"]"),Sv=new RegExp("["+ti+po+"]");ti=po=null;var fo=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,107,20,28,22,13,52,76,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8952,286,50,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42717,35,4148,12,221,3,5761,15,7472,3104,541,1507,4938],Ev=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,419,13,1495,6,110,6,6,9,4759,9,787719,239];function kn(t,e){for(var r=65536,n=0;n<e.length;n+=2){if(r+=e[n],r>t)return!1;if(r+=e[n+1],r>=t)return!0}}function it(t,e){return t<65?t===36:t<91?!0:t<97?t===95:t<123?!0:t<=65535?t>=170&&wv.test(String.fromCharCode(t)):e===!1?!1:kn(t,fo)}function At(t,e){return t<48?t===36:t<58?!0:t<65?!1:t<91?!0:t<97?t===95:t<123?!0:t<=65535?t>=170&&Sv.test(String.fromCharCode(t)):e===!1?!1:kn(t,fo)||kn(t,Ev)}var X=function(t,e){e===void 0&&(e={}),this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop||null,this.updateContext=null};function _e(t,e){return new X(t,{beforeExpr:!0,binop:e})}var xe={beforeExpr:!0},be={startsExpr:!0},ri={};function Q(t,e){return e===void 0&&(e={}),e.keyword=t,ri[t]=new X(t,e)}var d={num:new X("num",be),regexp:new X("regexp",be),string:new X("string",be),name:new X("name",be),eof:new X("eof"),bracketL:new X("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new X("]"),braceL:new X("{",{beforeExpr:!0,startsExpr:!0}),braceR:new X("}"),parenL:new X("(",{beforeExpr:!0,startsExpr:!0}),parenR:new X(")"),comma:new X(",",xe),semi:new X(";",xe),colon:new X(":",xe),dot:new X("."),question:new X("?",xe),questionDot:new X("?."),arrow:new X("=>",xe),template:new X("template"),invalidTemplate:new X("invalidTemplate"),ellipsis:new X("...",xe),backQuote:new X("`",be),dollarBraceL:new X("${",{beforeExpr:!0,startsExpr:!0}),eq:new X("=",{beforeExpr:!0,isAssign:!0}),assign:new X("_=",{beforeExpr:!0,isAssign:!0}),incDec:new X("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new X("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:_e("||",1),logicalAND:_e("&&",2),bitwiseOR:_e("|",3),bitwiseXOR:_e("^",4),bitwiseAND:_e("&",5),equality:_e("==/!=/===/!==",6),relational:_e("</>/<=/>=",7),bitShift:_e("<</>>/>>>",8),plusMin:new X("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:_e("%",10),star:_e("*",10),slash:_e("/",10),starstar:new X("**",{beforeExpr:!0}),coalesce:_e("??",1),_break:Q("break"),_case:Q("case",xe),_catch:Q("catch"),_continue:Q("continue"),_debugger:Q("debugger"),_default:Q("default",xe),_do:Q("do",{isLoop:!0,beforeExpr:!0}),_else:Q("else",xe),_finally:Q("finally"),_for:Q("for",{isLoop:!0}),_function:Q("function",be),_if:Q("if"),_return:Q("return",xe),_switch:Q("switch"),_throw:Q("throw",xe),_try:Q("try"),_var:Q("var"),_const:Q("const"),_while:Q("while",{isLoop:!0}),_with:Q("with"),_new:Q("new",{beforeExpr:!0,startsExpr:!0}),_this:Q("this",be),_super:Q("super",be),_class:Q("class",be),_extends:Q("extends",xe),_export:Q("export"),_import:Q("import",be),_null:Q("null",be),_true:Q("true",be),_false:Q("false",be),_in:Q("in",{beforeExpr:!0,binop:7}),_instanceof:Q("instanceof",{beforeExpr:!0,binop:7}),_typeof:Q("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:Q("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:Q("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Re=/\r\n?|\n|\u2028|\u2029/,Jt=new RegExp(Re.source,"g");function er(t,e){return t===10||t===13||!e&&(t===8232||t===8233)}var go=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,Se=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,mo=Object.prototype,Tv=mo.hasOwnProperty,Cv=mo.toString;function Nr(t,e){return Tv.call(t,e)}var Rs=Array.isArray||(function(t){return Cv.call(t)==="[object Array]"});function ht(t){return new RegExp("^(?:"+t.replace(/ /g,"|")+")$")}var Zt=function(t,e){this.line=t,this.column=e};Zt.prototype.offset=function(t){return new Zt(this.line,this.column+t)};var $r=function(t,e,r){this.start=e,this.end=r,t.sourceFile!==null&&(this.source=t.sourceFile)};function vo(t,e){for(var r=1,n=0;;){Jt.lastIndex=n;var i=Jt.exec(t);if(i&&i.index<e)++r,n=i.index+i[0].length;else return new Zt(r,e-n)}}var On={ecmaVersion:10,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:!1,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1};function Av(t){var e={};for(var r in On)e[r]=t&&Nr(t,r)?t[r]:On[r];if(e.ecmaVersion>=2015&&(e.ecmaVersion-=2009),e.allowReserved==null&&(e.allowReserved=e.ecmaVersion<5),Rs(e.onToken)){var n=e.onToken;e.onToken=function(i){return n.push(i)}}return Rs(e.onComment)&&(e.onComment=Rv(e,e.onComment)),e}function Rv(t,e){return function(r,n,i,s,a,o){var u={type:r?"Block":"Line",value:n,start:i,end:s};t.locations&&(u.loc=new $r(this,a,o)),t.ranges&&(u.range=[i,s]),e.push(u)}}var Qt=1,tr=2,ni=Qt|tr,yo=4,bo=8,_o=16,xo=32,wo=64,So=128;function ii(t,e){return tr|(t?yo:0)|(e?bo:0)}var Is=0,si=1,He=2,Eo=3,To=4,Co=5,se=function(t,e,r){this.options=t=Av(t),this.sourceFile=t.sourceFile,this.keywords=ht(_v[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var n="";if(t.allowReserved!==!0){for(var i=t.ecmaVersion;!(n=on[i]);i--);t.sourceType==="module"&&(n+=" await")}this.reservedWords=ht(n);var s=(n?n+" ":"")+on.strict;this.reservedWordsStrict=ht(s),this.reservedWordsStrictBind=ht(s+" "+on.strictBind),this.input=String(e),this.containsEsc=!1,r?(this.pos=r,this.lineStart=this.input.lastIndexOf(`
65
65
  `,r-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(Re).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=d.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports={},this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(Qt),this.regexpState=null},gt={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0}};se.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};gt.inFunction.get=function(){return(this.currentVarScope().flags&tr)>0};gt.inGenerator.get=function(){return(this.currentVarScope().flags&bo)>0};gt.inAsync.get=function(){return(this.currentVarScope().flags&yo)>0};gt.allowSuper.get=function(){return(this.currentThisScope().flags&wo)>0};gt.allowDirectSuper.get=function(){return(this.currentThisScope().flags&So)>0};gt.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};se.prototype.inNonArrowFunction=function(){return(this.currentThisScope().flags&tr)>0};se.extend=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];for(var r=this,n=0;n<t.length;n++)r=t[n](r);return r};se.parse=function(t,e){return new this(e,t).parse()};se.parseExpressionAt=function(t,e,r){var n=new this(r,t,e);return n.nextToken(),n.parseExpression()};se.tokenizer=function(t,e){return new this(e,t)};Object.defineProperties(se.prototype,gt);var ge=se.prototype,Iv=/^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;ge.strictDirective=function(t){for(;;){Se.lastIndex=t,t+=Se.exec(this.input)[0].length;var e=Iv.exec(this.input.slice(t));if(!e)return!1;if((e[1]||e[2])==="use strict"){Se.lastIndex=t+e[0].length;var r=Se.exec(this.input),n=r.index+r[0].length,i=this.input.charAt(n);return i===";"||i==="}"||Re.test(r[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||i==="!"&&this.input.charAt(n+1)==="=")}t+=e[0].length,Se.lastIndex=t,t+=Se.exec(this.input)[0].length,this.input[t]===";"&&t++}};ge.eat=function(t){return this.type===t?(this.next(),!0):!1};ge.isContextual=function(t){return this.type===d.name&&this.value===t&&!this.containsEsc};ge.eatContextual=function(t){return this.isContextual(t)?(this.next(),!0):!1};ge.expectContextual=function(t){this.eatContextual(t)||this.unexpected()};ge.canInsertSemicolon=function(){return this.type===d.eof||this.type===d.braceR||Re.test(this.input.slice(this.lastTokEnd,this.start))};ge.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};ge.semicolon=function(){!this.eat(d.semi)&&!this.insertSemicolon()&&this.unexpected()};ge.afterTrailingComma=function(t,e){if(this.type===t)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),e||this.next(),!0};ge.expect=function(t){this.eat(t)||this.unexpected()};ge.unexpected=function(t){this.raise(t!=null?t:this.start,"Unexpected token")};function Br(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}ge.checkPatternErrors=function(t,e){if(t){t.trailingComma>-1&&this.raiseRecoverable(t.trailingComma,"Comma is not permitted after the rest element");var r=e?t.parenthesizedAssign:t.parenthesizedBind;r>-1&&this.raiseRecoverable(r,"Parenthesized pattern")}};ge.checkExpressionErrors=function(t,e){if(!t)return!1;var r=t.shorthandAssign,n=t.doubleProto;if(!e)return r>=0||n>=0;r>=0&&this.raise(r,"Shorthand property assignments are valid only in destructuring patterns"),n>=0&&this.raiseRecoverable(n,"Redefinition of __proto__ property")};ge.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")};ge.isSimpleAssignTarget=function(t){return t.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(t.expression):t.type==="Identifier"||t.type==="MemberExpression"};var K=se.prototype;K.parseTopLevel=function(t){var e={};for(t.body||(t.body=[]);this.type!==d.eof;){var r=this.parseStatement(null,!0,e);t.body.push(r)}if(this.inModule)for(var n=0,i=Object.keys(this.undefinedExports);n<i.length;n+=1){var s=i[n];this.raiseRecoverable(this.undefinedExports[s].start,"Export '"+s+"' is not defined")}return this.adaptDirectivePrologue(t.body),this.next(),t.sourceType=this.options.sourceType,this.finishNode(t,"Program")};var ai={kind:"loop"},kv={kind:"switch"};K.isLet=function(t){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;Se.lastIndex=this.pos;var e=Se.exec(this.input),r=this.pos+e[0].length,n=this.input.charCodeAt(r);if(n===91)return!0;if(t)return!1;if(n===123)return!0;if(it(n,!0)){for(var i=r+1;At(this.input.charCodeAt(i),!0);)++i;var s=this.input.slice(r,i);if(!xv.test(s))return!0}return!1};K.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;Se.lastIndex=this.pos;var t=Se.exec(this.input),e=this.pos+t[0].length;return!Re.test(this.input.slice(this.pos,e))&&this.input.slice(e,e+8)==="function"&&(e+8===this.input.length||!At(this.input.charAt(e+8)))};K.parseStatement=function(t,e,r){var n=this.type,i=this.startNode(),s;switch(this.isLet(t)&&(n=d._var,s="let"),n){case d._break:case d._continue:return this.parseBreakContinueStatement(i,n.keyword);case d._debugger:return this.parseDebuggerStatement(i);case d._do:return this.parseDoStatement(i);case d._for:return this.parseForStatement(i);case d._function:return t&&(this.strict||t!=="if"&&t!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(i,!1,!t);case d._class:return t&&this.unexpected(),this.parseClass(i,!0);case d._if:return this.parseIfStatement(i);case d._return:return this.parseReturnStatement(i);case d._switch:return this.parseSwitchStatement(i);case d._throw:return this.parseThrowStatement(i);case d._try:return this.parseTryStatement(i);case d._const:case d._var:return s=s||this.value,t&&s!=="var"&&this.unexpected(),this.parseVarStatement(i,s);case d._while:return this.parseWhileStatement(i);case d._with:return this.parseWithStatement(i);case d.braceL:return this.parseBlock(!0,i);case d.semi:return this.parseEmptyStatement(i);case d._export:case d._import:if(this.options.ecmaVersion>10&&n===d._import){Se.lastIndex=this.pos;var a=Se.exec(this.input),o=this.pos+a[0].length,u=this.input.charCodeAt(o);if(u===40||u===46)return this.parseExpressionStatement(i,this.parseExpression())}return this.options.allowImportExportEverywhere||(e||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),n===d._import?this.parseImport(i):this.parseExport(i,r);default:if(this.isAsyncFunction())return t&&this.unexpected(),this.next(),this.parseFunctionStatement(i,!0,!t);var c=this.value,l=this.parseExpression();return n===d.name&&l.type==="Identifier"&&this.eat(d.colon)?this.parseLabeledStatement(i,c,l,t):this.parseExpressionStatement(i,l)}};K.parseBreakContinueStatement=function(t,e){var r=e==="break";this.next(),this.eat(d.semi)||this.insertSemicolon()?t.label=null:this.type!==d.name?this.unexpected():(t.label=this.parseIdent(),this.semicolon());for(var n=0;n<this.labels.length;++n){var i=this.labels[n];if((t.label==null||i.name===t.label.name)&&(i.kind!=null&&(r||i.kind==="loop")||t.label&&r))break}return n===this.labels.length&&this.raise(t.start,"Unsyntactic "+e),this.finishNode(t,r?"BreakStatement":"ContinueStatement")};K.parseDebuggerStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")};K.parseDoStatement=function(t){return this.next(),this.labels.push(ai),t.body=this.parseStatement("do"),this.labels.pop(),this.expect(d._while),t.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(d.semi):this.semicolon(),this.finishNode(t,"DoWhileStatement")};K.parseForStatement=function(t){this.next();var e=this.options.ecmaVersion>=9&&(this.inAsync||!this.inFunction&&this.options.allowAwaitOutsideFunction)&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(ai),this.enterScope(0),this.expect(d.parenL),this.type===d.semi)return e>-1&&this.unexpected(e),this.parseFor(t,null);var r=this.isLet();if(this.type===d._var||this.type===d._const||r){var n=this.startNode(),i=r?"let":this.value;return this.next(),this.parseVar(n,!0,i),this.finishNode(n,"VariableDeclaration"),(this.type===d._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&n.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===d._in?e>-1&&this.unexpected(e):t.await=e>-1),this.parseForIn(t,n)):(e>-1&&this.unexpected(e),this.parseFor(t,n))}var s=new Br,a=this.parseExpression(!0,s);return this.type===d._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.options.ecmaVersion>=9&&(this.type===d._in?e>-1&&this.unexpected(e):t.await=e>-1),this.toAssignable(a,!1,s),this.checkLVal(a),this.parseForIn(t,a)):(this.checkExpressionErrors(s,!0),e>-1&&this.unexpected(e),this.parseFor(t,a))};K.parseFunctionStatement=function(t,e,r){return this.next(),this.parseFunction(t,Ut|(r?0:Pn),!1,e)};K.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(d._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")};K.parseReturnStatement=function(t){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(d.semi)||this.insertSemicolon()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")};K.parseSwitchStatement=function(t){this.next(),t.discriminant=this.parseParenExpression(),t.cases=[],this.expect(d.braceL),this.labels.push(kv),this.enterScope(0);for(var e,r=!1;this.type!==d.braceR;)if(this.type===d._case||this.type===d._default){var n=this.type===d._case;e&&this.finishNode(e,"SwitchCase"),t.cases.push(e=this.startNode()),e.consequent=[],this.next(),n?e.test=this.parseExpression():(r&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),r=!0,e.test=null),this.expect(d.colon)}else e||this.unexpected(),e.consequent.push(this.parseStatement(null));return this.exitScope(),e&&this.finishNode(e,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(t,"SwitchStatement")};K.parseThrowStatement=function(t){return this.next(),Re.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")};var Ov=[];K.parseTryStatement=function(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.type===d._catch){var e=this.startNode();if(this.next(),this.eat(d.parenL)){e.param=this.parseBindingAtom();var r=e.param.type==="Identifier";this.enterScope(r?xo:0),this.checkLVal(e.param,r?To:He),this.expect(d.parenR)}else this.options.ecmaVersion<10&&this.unexpected(),e.param=null,this.enterScope(0);e.body=this.parseBlock(!1),this.exitScope(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(d._finally)?this.parseBlock():null,!t.handler&&!t.finalizer&&this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")};K.parseVarStatement=function(t,e){return this.next(),this.parseVar(t,!1,e),this.semicolon(),this.finishNode(t,"VariableDeclaration")};K.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.labels.push(ai),t.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(t,"WhileStatement")};K.parseWithStatement=function(t){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),t.object=this.parseParenExpression(),t.body=this.parseStatement("with"),this.finishNode(t,"WithStatement")};K.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")};K.parseLabeledStatement=function(t,e,r,n){for(var i=0,s=this.labels;i<s.length;i+=1){var a=s[i];a.name===e&&this.raise(r.start,"Label '"+e+"' is already declared")}for(var o=this.type.isLoop?"loop":this.type===d._switch?"switch":null,u=this.labels.length-1;u>=0;u--){var c=this.labels[u];if(c.statementStart===t.start)c.statementStart=this.start,c.kind=o;else break}return this.labels.push({name:e,kind:o,statementStart:this.start}),t.body=this.parseStatement(n?n.indexOf("label")===-1?n+"label":n:"label"),this.labels.pop(),t.label=r,this.finishNode(t,"LabeledStatement")};K.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")};K.parseBlock=function(t,e,r){for(t===void 0&&(t=!0),e===void 0&&(e=this.startNode()),e.body=[],this.expect(d.braceL),t&&this.enterScope(0);this.type!==d.braceR;){var n=this.parseStatement(null);e.body.push(n)}return r&&(this.strict=!1),this.next(),t&&this.exitScope(),this.finishNode(e,"BlockStatement")};K.parseFor=function(t,e){return t.init=e,this.expect(d.semi),t.test=this.type===d.semi?null:this.parseExpression(),this.expect(d.semi),t.update=this.type===d.parenR?null:this.parseExpression(),this.expect(d.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,"ForStatement")};K.parseForIn=function(t,e){var r=this.type===d._in;return this.next(),e.type==="VariableDeclaration"&&e.declarations[0].init!=null&&(!r||this.options.ecmaVersion<8||this.strict||e.kind!=="var"||e.declarations[0].id.type!=="Identifier")?this.raise(e.start,(r?"for-in":"for-of")+" loop variable declaration may not have an initializer"):e.type==="AssignmentPattern"&&this.raise(e.start,"Invalid left-hand side in for-loop"),t.left=e,t.right=r?this.parseExpression():this.parseMaybeAssign(),this.expect(d.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,r?"ForInStatement":"ForOfStatement")};K.parseVar=function(t,e,r){for(t.declarations=[],t.kind=r;;){var n=this.startNode();if(this.parseVarId(n,r),this.eat(d.eq)?n.init=this.parseMaybeAssign(e):r==="const"&&!(this.type===d._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():n.id.type!=="Identifier"&&!(e&&(this.type===d._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):n.init=null,t.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(d.comma))break}return t};K.parseVarId=function(t,e){t.id=this.parseBindingAtom(),this.checkLVal(t.id,e==="var"?si:He,!1)};var Ut=1,Pn=2,Ao=4;K.parseFunction=function(t,e,r,n){this.initFunction(t),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!n)&&(this.type===d.star&&e&Pn&&this.unexpected(),t.generator=this.eat(d.star)),this.options.ecmaVersion>=8&&(t.async=!!n),e&Ut&&(t.id=e&Ao&&this.type!==d.name?null:this.parseIdent(),t.id&&!(e&Pn)&&this.checkLVal(t.id,this.strict||t.generator||t.async?this.treatFunctionsAsVar?si:He:Eo));var i=this.yieldPos,s=this.awaitPos,a=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ii(t.async,t.generator)),e&Ut||(t.id=this.type===d.name?this.parseIdent():null),this.parseFunctionParams(t),this.parseFunctionBody(t,r,!1),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=a,this.finishNode(t,e&Ut?"FunctionDeclaration":"FunctionExpression")};K.parseFunctionParams=function(t){this.expect(d.parenL),t.params=this.parseBindingList(d.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};K.parseClass=function(t,e){this.next();var r=this.strict;this.strict=!0,this.parseClassId(t,e),this.parseClassSuper(t);var n=this.startNode(),i=!1;for(n.body=[],this.expect(d.braceL);this.type!==d.braceR;){var s=this.parseClassElement(t.superClass!==null);s&&(n.body.push(s),s.type==="MethodDefinition"&&s.kind==="constructor"&&(i&&this.raise(s.start,"Duplicate constructor in the same class"),i=!0))}return this.strict=r,this.next(),t.body=this.finishNode(n,"ClassBody"),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")};K.parseClassElement=function(t){var e=this;if(this.eat(d.semi))return null;var r=this.startNode(),n=function(u,c){c===void 0&&(c=!1);var l=e.start,h=e.startLoc;return e.eatContextual(u)?e.type!==d.parenL&&(!c||!e.canInsertSemicolon())?!0:(r.key&&e.unexpected(),r.computed=!1,r.key=e.startNodeAt(l,h),r.key.name=u,e.finishNode(r.key,"Identifier"),!1):!1};r.kind="method",r.static=n("static");var i=this.eat(d.star),s=!1;i||(this.options.ecmaVersion>=8&&n("async",!0)?(s=!0,i=this.options.ecmaVersion>=9&&this.eat(d.star)):n("get")?r.kind="get":n("set")&&(r.kind="set")),r.key||this.parsePropertyName(r);var a=r.key,o=!1;return!r.computed&&!r.static&&(a.type==="Identifier"&&a.name==="constructor"||a.type==="Literal"&&a.value==="constructor")?(r.kind!=="method"&&this.raise(a.start,"Constructor can't have get/set modifier"),i&&this.raise(a.start,"Constructor can't be a generator"),s&&this.raise(a.start,"Constructor can't be an async method"),r.kind="constructor",o=t):r.static&&a.type==="Identifier"&&a.name==="prototype"&&this.raise(a.start,"Classes may not have a static property named prototype"),this.parseClassMethod(r,i,s,o),r.kind==="get"&&r.value.params.length!==0&&this.raiseRecoverable(r.value.start,"getter should have no params"),r.kind==="set"&&r.value.params.length!==1&&this.raiseRecoverable(r.value.start,"setter should have exactly one param"),r.kind==="set"&&r.value.params[0].type==="RestElement"&&this.raiseRecoverable(r.value.params[0].start,"Setter cannot use rest params"),r};K.parseClassMethod=function(t,e,r,n){return t.value=this.parseMethod(e,r,n),this.finishNode(t,"MethodDefinition")};K.parseClassId=function(t,e){this.type===d.name?(t.id=this.parseIdent(),e&&this.checkLVal(t.id,He,!1)):(e===!0&&this.unexpected(),t.id=null)};K.parseClassSuper=function(t){t.superClass=this.eat(d._extends)?this.parseExprSubscripts():null};K.parseExport=function(t,e){if(this.next(),this.eat(d.star))return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(t.exported=this.parseIdent(!0),this.checkExport(e,t.exported.name,this.lastTokStart)):t.exported=null),this.expectContextual("from"),this.type!==d.string&&this.unexpected(),t.source=this.parseExprAtom(),this.semicolon(),this.finishNode(t,"ExportAllDeclaration");if(this.eat(d._default)){this.checkExport(e,"default",this.lastTokStart);var r;if(this.type===d._function||(r=this.isAsyncFunction())){var n=this.startNode();this.next(),r&&this.next(),t.declaration=this.parseFunction(n,Ut|Ao,!1,r)}else if(this.type===d._class){var i=this.startNode();t.declaration=this.parseClass(i,"nullableID")}else t.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(t,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())t.declaration=this.parseStatement(null),t.declaration.type==="VariableDeclaration"?this.checkVariableExport(e,t.declaration.declarations):this.checkExport(e,t.declaration.id.name,t.declaration.id.start),t.specifiers=[],t.source=null;else{if(t.declaration=null,t.specifiers=this.parseExportSpecifiers(e),this.eatContextual("from"))this.type!==d.string&&this.unexpected(),t.source=this.parseExprAtom();else{for(var s=0,a=t.specifiers;s<a.length;s+=1){var o=a[s];this.checkUnreserved(o.local),this.checkLocalExport(o.local)}t.source=null}this.semicolon()}return this.finishNode(t,"ExportNamedDeclaration")};K.checkExport=function(t,e,r){t&&(Nr(t,e)&&this.raiseRecoverable(r,"Duplicate export '"+e+"'"),t[e]=!0)};K.checkPatternExport=function(t,e){var r=e.type;if(r==="Identifier")this.checkExport(t,e.name,e.start);else if(r==="ObjectPattern")for(var n=0,i=e.properties;n<i.length;n+=1){var s=i[n];this.checkPatternExport(t,s)}else if(r==="ArrayPattern")for(var a=0,o=e.elements;a<o.length;a+=1){var u=o[a];u&&this.checkPatternExport(t,u)}else r==="Property"?this.checkPatternExport(t,e.value):r==="AssignmentPattern"?this.checkPatternExport(t,e.left):r==="RestElement"?this.checkPatternExport(t,e.argument):r==="ParenthesizedExpression"&&this.checkPatternExport(t,e.expression)};K.checkVariableExport=function(t,e){if(t)for(var r=0,n=e;r<n.length;r+=1){var i=n[r];this.checkPatternExport(t,i.id)}};K.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};K.parseExportSpecifiers=function(t){var e=[],r=!0;for(this.expect(d.braceL);!this.eat(d.braceR);){if(r)r=!1;else if(this.expect(d.comma),this.afterTrailingComma(d.braceR))break;var n=this.startNode();n.local=this.parseIdent(!0),n.exported=this.eatContextual("as")?this.parseIdent(!0):n.local,this.checkExport(t,n.exported.name,n.exported.start),e.push(this.finishNode(n,"ExportSpecifier"))}return e};K.parseImport=function(t){return this.next(),this.type===d.string?(t.specifiers=Ov,t.source=this.parseExprAtom()):(t.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),t.source=this.type===d.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(t,"ImportDeclaration")};K.parseImportSpecifiers=function(){var t=[],e=!0;if(this.type===d.name){var r=this.startNode();if(r.local=this.parseIdent(),this.checkLVal(r.local,He),t.push(this.finishNode(r,"ImportDefaultSpecifier")),!this.eat(d.comma))return t}if(this.type===d.star){var n=this.startNode();return this.next(),this.expectContextual("as"),n.local=this.parseIdent(),this.checkLVal(n.local,He),t.push(this.finishNode(n,"ImportNamespaceSpecifier")),t}for(this.expect(d.braceL);!this.eat(d.braceR);){if(e)e=!1;else if(this.expect(d.comma),this.afterTrailingComma(d.braceR))break;var i=this.startNode();i.imported=this.parseIdent(!0),this.eatContextual("as")?i.local=this.parseIdent():(this.checkUnreserved(i.imported),i.local=i.imported),this.checkLVal(i.local,He),t.push(this.finishNode(i,"ImportSpecifier"))}return t};K.adaptDirectivePrologue=function(t){for(var e=0;e<t.length&&this.isDirectiveCandidate(t[e]);++e)t[e].directive=t[e].expression.raw.slice(1,-1)};K.isDirectiveCandidate=function(t){return t.type==="ExpressionStatement"&&t.expression.type==="Literal"&&typeof t.expression.value=="string"&&(this.input[t.start]==='"'||this.input[t.start]==="'")};var Ye=se.prototype;Ye.toAssignable=function(t,e,r){if(this.options.ecmaVersion>=6&&t)switch(t.type){case"Identifier":this.inAsync&&t.name==="await"&&this.raise(t.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern",r&&this.checkPatternErrors(r,!0);for(var n=0,i=t.properties;n<i.length;n+=1){var s=i[n];this.toAssignable(s,e),s.type==="RestElement"&&(s.argument.type==="ArrayPattern"||s.argument.type==="ObjectPattern")&&this.raise(s.argument.start,"Unexpected token")}break;case"Property":t.kind!=="init"&&this.raise(t.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(t.value,e);break;case"ArrayExpression":t.type="ArrayPattern",r&&this.checkPatternErrors(r,!0),this.toAssignableList(t.elements,e);break;case"SpreadElement":t.type="RestElement",this.toAssignable(t.argument,e),t.argument.type==="AssignmentPattern"&&this.raise(t.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":t.operator!=="="&&this.raise(t.left.end,"Only '=' operator can be used for specifying default value."),t.type="AssignmentPattern",delete t.operator,this.toAssignable(t.left,e);case"AssignmentPattern":break;case"ParenthesizedExpression":this.toAssignable(t.expression,e,r);break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!e)break;default:this.raise(t.start,"Assigning to rvalue")}else r&&this.checkPatternErrors(r,!0);return t};Ye.toAssignableList=function(t,e){for(var r=t.length,n=0;n<r;n++){var i=t[n];i&&this.toAssignable(i,e)}if(r){var s=t[r-1];this.options.ecmaVersion===6&&e&&s&&s.type==="RestElement"&&s.argument.type!=="Identifier"&&this.unexpected(s.argument.start)}return t};Ye.parseSpread=function(t){var e=this.startNode();return this.next(),e.argument=this.parseMaybeAssign(!1,t),this.finishNode(e,"SpreadElement")};Ye.parseRestBinding=function(){var t=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==d.name&&this.unexpected(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")};Ye.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case d.bracketL:var t=this.startNode();return this.next(),t.elements=this.parseBindingList(d.bracketR,!0,!0),this.finishNode(t,"ArrayPattern");case d.braceL:return this.parseObj(!0)}return this.parseIdent()};Ye.parseBindingList=function(t,e,r){for(var n=[],i=!0;!this.eat(t);)if(i?i=!1:this.expect(d.comma),e&&this.type===d.comma)n.push(null);else{if(r&&this.afterTrailingComma(t))break;if(this.type===d.ellipsis){var s=this.parseRestBinding();this.parseBindingListItem(s),n.push(s),this.type===d.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.expect(t);break}else{var a=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(a),n.push(a)}}return n};Ye.parseBindingListItem=function(t){return t};Ye.parseMaybeDefault=function(t,e,r){if(r=r||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(d.eq))return r;var n=this.startNodeAt(t,e);return n.left=r,n.right=this.parseMaybeAssign(),this.finishNode(n,"AssignmentPattern")};Ye.checkLVal=function(t,e,r){switch(e===void 0&&(e=Is),t.type){case"Identifier":e===He&&t.name==="let"&&this.raiseRecoverable(t.start,"let is disallowed as a lexically bound name"),this.strict&&this.reservedWordsStrictBind.test(t.name)&&this.raiseRecoverable(t.start,(e?"Binding ":"Assigning to ")+t.name+" in strict mode"),r&&(Nr(r,t.name)&&this.raiseRecoverable(t.start,"Argument name clash"),r[t.name]=!0),e!==Is&&e!==Co&&this.declareName(t.name,e,t.start);break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":e&&this.raiseRecoverable(t.start,"Binding member expression");break;case"ObjectPattern":for(var n=0,i=t.properties;n<i.length;n+=1){var s=i[n];this.checkLVal(s,e,r)}break;case"Property":this.checkLVal(t.value,e,r);break;case"ArrayPattern":for(var a=0,o=t.elements;a<o.length;a+=1){var u=o[a];u&&this.checkLVal(u,e,r)}break;case"AssignmentPattern":this.checkLVal(t.left,e,r);break;case"RestElement":this.checkLVal(t.argument,e,r);break;case"ParenthesizedExpression":this.checkLVal(t.expression,e,r);break;default:this.raise(t.start,(e?"Binding":"Assigning to")+" rvalue")}};var Y=se.prototype;Y.checkPropClash=function(t,e,r){if(!(this.options.ecmaVersion>=9&&t.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(t.computed||t.method||t.shorthand))){var n=t.key,i;switch(n.type){case"Identifier":i=n.name;break;case"Literal":i=String(n.value);break;default:return}var s=t.kind;if(this.options.ecmaVersion>=6){i==="__proto__"&&s==="init"&&(e.proto&&(r?r.doubleProto<0&&(r.doubleProto=n.start):this.raiseRecoverable(n.start,"Redefinition of __proto__ property")),e.proto=!0);return}i="$"+i;var a=e[i];if(a){var o;s==="init"?o=this.strict&&a.init||a.get||a.set:o=a.init||a[s],o&&this.raiseRecoverable(n.start,"Redefinition of property")}else a=e[i]={init:!1,get:!1,set:!1};a[s]=!0}};Y.parseExpression=function(t,e){var r=this.start,n=this.startLoc,i=this.parseMaybeAssign(t,e);if(this.type===d.comma){var s=this.startNodeAt(r,n);for(s.expressions=[i];this.eat(d.comma);)s.expressions.push(this.parseMaybeAssign(t,e));return this.finishNode(s,"SequenceExpression")}return i};Y.parseMaybeAssign=function(t,e,r){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(t);this.exprAllowed=!1}var n=!1,i=-1,s=-1;e?(i=e.parenthesizedAssign,s=e.trailingComma,e.parenthesizedAssign=e.trailingComma=-1):(e=new Br,n=!0);var a=this.start,o=this.startLoc;(this.type===d.parenL||this.type===d.name)&&(this.potentialArrowAt=this.start);var u=this.parseMaybeConditional(t,e);if(r&&(u=r.call(this,u,a,o)),this.type.isAssign){var c=this.startNodeAt(a,o);return c.operator=this.value,c.left=this.type===d.eq?this.toAssignable(u,!1,e):u,n||(e.parenthesizedAssign=e.trailingComma=e.doubleProto=-1),e.shorthandAssign>=c.left.start&&(e.shorthandAssign=-1),this.checkLVal(u),this.next(),c.right=this.parseMaybeAssign(t),this.finishNode(c,"AssignmentExpression")}else n&&this.checkExpressionErrors(e,!0);return i>-1&&(e.parenthesizedAssign=i),s>-1&&(e.trailingComma=s),u};Y.parseMaybeConditional=function(t,e){var r=this.start,n=this.startLoc,i=this.parseExprOps(t,e);if(this.checkExpressionErrors(e))return i;if(this.eat(d.question)){var s=this.startNodeAt(r,n);return s.test=i,s.consequent=this.parseMaybeAssign(),this.expect(d.colon),s.alternate=this.parseMaybeAssign(t),this.finishNode(s,"ConditionalExpression")}return i};Y.parseExprOps=function(t,e){var r=this.start,n=this.startLoc,i=this.parseMaybeUnary(e,!1);return this.checkExpressionErrors(e)||i.start===r&&i.type==="ArrowFunctionExpression"?i:this.parseExprOp(i,r,n,-1,t)};Y.parseExprOp=function(t,e,r,n,i){var s=this.type.binop;if(s!=null&&(!i||this.type!==d._in)&&s>n){var a=this.type===d.logicalOR||this.type===d.logicalAND,o=this.type===d.coalesce;o&&(s=d.logicalAND.binop);var u=this.value;this.next();var c=this.start,l=this.startLoc,h=this.parseExprOp(this.parseMaybeUnary(null,!1),c,l,s,i),p=this.buildBinary(e,r,t,h,u,a||o);return(a&&this.type===d.coalesce||o&&(this.type===d.logicalOR||this.type===d.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(p,e,r,n,i)}return t};Y.buildBinary=function(t,e,r,n,i,s){var a=this.startNodeAt(t,e);return a.left=r,a.operator=i,a.right=n,this.finishNode(a,s?"LogicalExpression":"BinaryExpression")};Y.parseMaybeUnary=function(t,e){var r=this.start,n=this.startLoc,i;if(this.isContextual("await")&&(this.inAsync||!this.inFunction&&this.options.allowAwaitOutsideFunction))i=this.parseAwait(),e=!0;else if(this.type.prefix){var s=this.startNode(),a=this.type===d.incDec;s.operator=this.value,s.prefix=!0,this.next(),s.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(t,!0),a?this.checkLVal(s.argument):this.strict&&s.operator==="delete"&&s.argument.type==="Identifier"?this.raiseRecoverable(s.start,"Deleting local variable in strict mode"):e=!0,i=this.finishNode(s,a?"UpdateExpression":"UnaryExpression")}else{if(i=this.parseExprSubscripts(t),this.checkExpressionErrors(t))return i;for(;this.type.postfix&&!this.canInsertSemicolon();){var o=this.startNodeAt(r,n);o.operator=this.value,o.prefix=!1,o.argument=i,this.checkLVal(i),this.next(),i=this.finishNode(o,"UpdateExpression")}}return!e&&this.eat(d.starstar)?this.buildBinary(r,n,i,this.parseMaybeUnary(null,!1),"**",!1):i};Y.parseExprSubscripts=function(t){var e=this.start,r=this.startLoc,n=this.parseExprAtom(t);if(n.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return n;var i=this.parseSubscripts(n,e,r);return t&&i.type==="MemberExpression"&&(t.parenthesizedAssign>=i.start&&(t.parenthesizedAssign=-1),t.parenthesizedBind>=i.start&&(t.parenthesizedBind=-1)),i};Y.parseSubscripts=function(t,e,r,n){for(var i=this.options.ecmaVersion>=8&&t.type==="Identifier"&&t.name==="async"&&this.lastTokEnd===t.end&&!this.canInsertSemicolon()&&t.end-t.start===5&&this.potentialArrowAt===t.start,s=!1;;){var a=this.parseSubscript(t,e,r,n,i,s);if(a.optional&&(s=!0),a===t||a.type==="ArrowFunctionExpression"){if(s){var o=this.startNodeAt(e,r);o.expression=a,a=this.finishNode(o,"ChainExpression")}return a}t=a}};Y.parseSubscript=function(t,e,r,n,i,s){var a=this.options.ecmaVersion>=11,o=a&&this.eat(d.questionDot);n&&o&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var u=this.eat(d.bracketL);if(u||o&&this.type!==d.parenL&&this.type!==d.backQuote||this.eat(d.dot)){var c=this.startNodeAt(e,r);c.object=t,c.property=u?this.parseExpression():this.parseIdent(this.options.allowReserved!=="never"),c.computed=!!u,u&&this.expect(d.bracketR),a&&(c.optional=o),t=this.finishNode(c,"MemberExpression")}else if(!n&&this.eat(d.parenL)){var l=new Br,h=this.yieldPos,p=this.awaitPos,f=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var g=this.parseExprList(d.parenR,this.options.ecmaVersion>=8,!1,l);if(i&&!o&&!this.canInsertSemicolon()&&this.eat(d.arrow))return this.checkPatternErrors(l,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=h,this.awaitPos=p,this.awaitIdentPos=f,this.parseArrowExpression(this.startNodeAt(e,r),g,!0);this.checkExpressionErrors(l,!0),this.yieldPos=h||this.yieldPos,this.awaitPos=p||this.awaitPos,this.awaitIdentPos=f||this.awaitIdentPos;var m=this.startNodeAt(e,r);m.callee=t,m.arguments=g,a&&(m.optional=o),t=this.finishNode(m,"CallExpression")}else if(this.type===d.backQuote){(o||s)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var v=this.startNodeAt(e,r);v.tag=t,v.quasi=this.parseTemplate({isTagged:!0}),t=this.finishNode(v,"TaggedTemplateExpression")}return t};Y.parseExprAtom=function(t){this.type===d.slash&&this.readRegexp();var e,r=this.potentialArrowAt===this.start;switch(this.type){case d._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),e=this.startNode(),this.next(),this.type===d.parenL&&!this.allowDirectSuper&&this.raise(e.start,"super() call outside constructor of a subclass"),this.type!==d.dot&&this.type!==d.bracketL&&this.type!==d.parenL&&this.unexpected(),this.finishNode(e,"Super");case d._this:return e=this.startNode(),this.next(),this.finishNode(e,"ThisExpression");case d.name:var n=this.start,i=this.startLoc,s=this.containsEsc,a=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!s&&a.name==="async"&&!this.canInsertSemicolon()&&this.eat(d._function))return this.parseFunction(this.startNodeAt(n,i),0,!1,!0);if(r&&!this.canInsertSemicolon()){if(this.eat(d.arrow))return this.parseArrowExpression(this.startNodeAt(n,i),[a],!1);if(this.options.ecmaVersion>=8&&a.name==="async"&&this.type===d.name&&!s)return a=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(d.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(n,i),[a],!0)}return a;case d.regexp:var o=this.value;return e=this.parseLiteral(o.value),e.regex={pattern:o.pattern,flags:o.flags},e;case d.num:case d.string:return this.parseLiteral(this.value);case d._null:case d._true:case d._false:return e=this.startNode(),e.value=this.type===d._null?null:this.type===d._true,e.raw=this.type.keyword,this.next(),this.finishNode(e,"Literal");case d.parenL:var u=this.start,c=this.parseParenAndDistinguishExpression(r);return t&&(t.parenthesizedAssign<0&&!this.isSimpleAssignTarget(c)&&(t.parenthesizedAssign=u),t.parenthesizedBind<0&&(t.parenthesizedBind=u)),c;case d.bracketL:return e=this.startNode(),this.next(),e.elements=this.parseExprList(d.bracketR,!0,!0,t),this.finishNode(e,"ArrayExpression");case d.braceL:return this.parseObj(!1,t);case d._function:return e=this.startNode(),this.next(),this.parseFunction(e,0);case d._class:return this.parseClass(this.startNode(),!1);case d._new:return this.parseNew();case d.backQuote:return this.parseTemplate();case d._import:return this.options.ecmaVersion>=11?this.parseExprImport():this.unexpected();default:this.unexpected()}};Y.parseExprImport=function(){var t=this.startNode();this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import");var e=this.parseIdent(!0);switch(this.type){case d.parenL:return this.parseDynamicImport(t);case d.dot:return t.meta=e,this.parseImportMeta(t);default:this.unexpected()}};Y.parseDynamicImport=function(t){if(this.next(),t.source=this.parseMaybeAssign(),!this.eat(d.parenR)){var e=this.start;this.eat(d.comma)&&this.eat(d.parenR)?this.raiseRecoverable(e,"Trailing comma is not allowed in import()"):this.unexpected(e)}return this.finishNode(t,"ImportExpression")};Y.parseImportMeta=function(t){this.next();var e=this.containsEsc;return t.property=this.parseIdent(!0),t.property.name!=="meta"&&this.raiseRecoverable(t.property.start,"The only valid meta property for import is 'import.meta'"),e&&this.raiseRecoverable(t.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&this.raiseRecoverable(t.start,"Cannot use 'import.meta' outside a module"),this.finishNode(t,"MetaProperty")};Y.parseLiteral=function(t){var e=this.startNode();return e.value=t,e.raw=this.input.slice(this.start,this.end),e.raw.charCodeAt(e.raw.length-1)===110&&(e.bigint=e.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(e,"Literal")};Y.parseParenExpression=function(){this.expect(d.parenL);var t=this.parseExpression();return this.expect(d.parenR),t};Y.parseParenAndDistinguishExpression=function(t){var e=this.start,r=this.startLoc,n,i=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var s=this.start,a=this.startLoc,o=[],u=!0,c=!1,l=new Br,h=this.yieldPos,p=this.awaitPos,f;for(this.yieldPos=0,this.awaitPos=0;this.type!==d.parenR;)if(u?u=!1:this.expect(d.comma),i&&this.afterTrailingComma(d.parenR,!0)){c=!0;break}else if(this.type===d.ellipsis){f=this.start,o.push(this.parseParenItem(this.parseRestBinding())),this.type===d.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}else o.push(this.parseMaybeAssign(!1,l,this.parseParenItem));var g=this.start,m=this.startLoc;if(this.expect(d.parenR),t&&!this.canInsertSemicolon()&&this.eat(d.arrow))return this.checkPatternErrors(l,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=h,this.awaitPos=p,this.parseParenArrowList(e,r,o);(!o.length||c)&&this.unexpected(this.lastTokStart),f&&this.unexpected(f),this.checkExpressionErrors(l,!0),this.yieldPos=h||this.yieldPos,this.awaitPos=p||this.awaitPos,o.length>1?(n=this.startNodeAt(s,a),n.expressions=o,this.finishNodeAt(n,"SequenceExpression",g,m)):n=o[0]}else n=this.parseParenExpression();if(this.options.preserveParens){var v=this.startNodeAt(e,r);return v.expression=n,this.finishNode(v,"ParenthesizedExpression")}else return n};Y.parseParenItem=function(t){return t};Y.parseParenArrowList=function(t,e,r){return this.parseArrowExpression(this.startNodeAt(t,e),r)};var Pv=[];Y.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var t=this.startNode(),e=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(d.dot)){t.meta=e;var r=this.containsEsc;return t.property=this.parseIdent(!0),t.property.name!=="target"&&this.raiseRecoverable(t.property.start,"The only valid meta property for new is 'new.target'"),r&&this.raiseRecoverable(t.start,"'new.target' must not contain escaped characters"),this.inNonArrowFunction()||this.raiseRecoverable(t.start,"'new.target' can only be used in functions"),this.finishNode(t,"MetaProperty")}var n=this.start,i=this.startLoc,s=this.type===d._import;return t.callee=this.parseSubscripts(this.parseExprAtom(),n,i,!0),s&&t.callee.type==="ImportExpression"&&this.raise(n,"Cannot use new with import()"),this.eat(d.parenL)?t.arguments=this.parseExprList(d.parenR,this.options.ecmaVersion>=8,!1):t.arguments=Pv,this.finishNode(t,"NewExpression")};Y.parseTemplateElement=function(t){var e=t.isTagged,r=this.startNode();return this.type===d.invalidTemplate?(e||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),r.value={raw:this.value,cooked:null}):r.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
66
66
  `),cooked:this.value},this.next(),r.tail=this.type===d.backQuote,this.finishNode(r,"TemplateElement")};Y.parseTemplate=function(t){t===void 0&&(t={});var e=t.isTagged;e===void 0&&(e=!1);var r=this.startNode();this.next(),r.expressions=[];var n=this.parseTemplateElement({isTagged:e});for(r.quasis=[n];!n.tail;)this.type===d.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(d.dollarBraceL),r.expressions.push(this.parseExpression()),this.expect(d.braceR),r.quasis.push(n=this.parseTemplateElement({isTagged:e}));return this.next(),this.finishNode(r,"TemplateLiteral")};Y.isAsyncProp=function(t){return!t.computed&&t.key.type==="Identifier"&&t.key.name==="async"&&(this.type===d.name||this.type===d.num||this.type===d.string||this.type===d.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===d.star)&&!Re.test(this.input.slice(this.lastTokEnd,this.start))};Y.parseObj=function(t,e){var r=this.startNode(),n=!0,i={};for(r.properties=[],this.next();!this.eat(d.braceR);){if(n)n=!1;else if(this.expect(d.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(d.braceR))break;var s=this.parseProperty(t,e);t||this.checkPropClash(s,i,e),r.properties.push(s)}return this.finishNode(r,t?"ObjectPattern":"ObjectExpression")};Y.parseProperty=function(t,e){var r=this.startNode(),n,i,s,a;if(this.options.ecmaVersion>=9&&this.eat(d.ellipsis))return t?(r.argument=this.parseIdent(!1),this.type===d.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(r,"RestElement")):(this.type===d.parenL&&e&&(e.parenthesizedAssign<0&&(e.parenthesizedAssign=this.start),e.parenthesizedBind<0&&(e.parenthesizedBind=this.start)),r.argument=this.parseMaybeAssign(!1,e),this.type===d.comma&&e&&e.trailingComma<0&&(e.trailingComma=this.start),this.finishNode(r,"SpreadElement"));this.options.ecmaVersion>=6&&(r.method=!1,r.shorthand=!1,(t||e)&&(s=this.start,a=this.startLoc),t||(n=this.eat(d.star)));var o=this.containsEsc;return this.parsePropertyName(r),!t&&!o&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(r)?(i=!0,n=this.options.ecmaVersion>=9&&this.eat(d.star),this.parsePropertyName(r,e)):i=!1,this.parsePropertyValue(r,t,n,i,s,a,e,o),this.finishNode(r,"Property")};Y.parsePropertyValue=function(t,e,r,n,i,s,a,o){if((r||n)&&this.type===d.colon&&this.unexpected(),this.eat(d.colon))t.value=e?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,a),t.kind="init";else if(this.options.ecmaVersion>=6&&this.type===d.parenL)e&&this.unexpected(),t.kind="init",t.method=!0,t.value=this.parseMethod(r,n);else if(!e&&!o&&this.options.ecmaVersion>=5&&!t.computed&&t.key.type==="Identifier"&&(t.key.name==="get"||t.key.name==="set")&&this.type!==d.comma&&this.type!==d.braceR&&this.type!==d.eq){(r||n)&&this.unexpected(),t.kind=t.key.name,this.parsePropertyName(t),t.value=this.parseMethod(!1);var u=t.kind==="get"?0:1;if(t.value.params.length!==u){var c=t.value.start;t.kind==="get"?this.raiseRecoverable(c,"getter should have no params"):this.raiseRecoverable(c,"setter should have exactly one param")}else t.kind==="set"&&t.value.params[0].type==="RestElement"&&this.raiseRecoverable(t.value.params[0].start,"Setter cannot use rest params")}else this.options.ecmaVersion>=6&&!t.computed&&t.key.type==="Identifier"?((r||n)&&this.unexpected(),this.checkUnreserved(t.key),t.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=i),t.kind="init",e?t.value=this.parseMaybeDefault(i,s,t.key):this.type===d.eq&&a?(a.shorthandAssign<0&&(a.shorthandAssign=this.start),t.value=this.parseMaybeDefault(i,s,t.key)):t.value=t.key,t.shorthand=!0):this.unexpected()};Y.parsePropertyName=function(t){if(this.options.ecmaVersion>=6){if(this.eat(d.bracketL))return t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(d.bracketR),t.key;t.computed=!1}return t.key=this.type===d.num||this.type===d.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};Y.initFunction=function(t){t.id=null,this.options.ecmaVersion>=6&&(t.generator=t.expression=!1),this.options.ecmaVersion>=8&&(t.async=!1)};Y.parseMethod=function(t,e,r){var n=this.startNode(),i=this.yieldPos,s=this.awaitPos,a=this.awaitIdentPos;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=t),this.options.ecmaVersion>=8&&(n.async=!!e),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ii(e,n.generator)|wo|(r?So:0)),this.expect(d.parenL),n.params=this.parseBindingList(d.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1,!0),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=a,this.finishNode(n,"FunctionExpression")};Y.parseArrowExpression=function(t,e,r){var n=this.yieldPos,i=this.awaitPos,s=this.awaitIdentPos;return this.enterScope(ii(r,!1)|_o),this.initFunction(t),this.options.ecmaVersion>=8&&(t.async=!!r),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,t.params=this.toAssignableList(e,!0),this.parseFunctionBody(t,!0,!1),this.yieldPos=n,this.awaitPos=i,this.awaitIdentPos=s,this.finishNode(t,"ArrowFunctionExpression")};Y.parseFunctionBody=function(t,e,r){var n=e&&this.type!==d.braceL,i=this.strict,s=!1;if(n)t.body=this.parseMaybeAssign(),t.expression=!0,this.checkParams(t,!1);else{var a=this.options.ecmaVersion>=7&&!this.isSimpleParamList(t.params);(!i||a)&&(s=this.strictDirective(this.end),s&&a&&this.raiseRecoverable(t.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var o=this.labels;this.labels=[],s&&(this.strict=!0),this.checkParams(t,!i&&!s&&!e&&!r&&this.isSimpleParamList(t.params)),this.strict&&t.id&&this.checkLVal(t.id,Co),t.body=this.parseBlock(!1,void 0,s&&!i),t.expression=!1,this.adaptDirectivePrologue(t.body.body),this.labels=o}this.exitScope()};Y.isSimpleParamList=function(t){for(var e=0,r=t;e<r.length;e+=1){var n=r[e];if(n.type!=="Identifier")return!1}return!0};Y.checkParams=function(t,e){for(var r={},n=0,i=t.params;n<i.length;n+=1){var s=i[n];this.checkLVal(s,si,e?null:r)}};Y.parseExprList=function(t,e,r,n){for(var i=[],s=!0;!this.eat(t);){if(s)s=!1;else if(this.expect(d.comma),e&&this.afterTrailingComma(t))break;var a=void 0;r&&this.type===d.comma?a=null:this.type===d.ellipsis?(a=this.parseSpread(n),n&&this.type===d.comma&&n.trailingComma<0&&(n.trailingComma=this.start)):a=this.parseMaybeAssign(!1,n),i.push(a)}return i};Y.checkUnreserved=function(t){var e=t.start,r=t.end,n=t.name;if(this.inGenerator&&n==="yield"&&this.raiseRecoverable(e,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&n==="await"&&this.raiseRecoverable(e,"Cannot use 'await' as identifier inside an async function"),this.keywords.test(n)&&this.raise(e,"Unexpected keyword '"+n+"'"),!(this.options.ecmaVersion<6&&this.input.slice(e,r).indexOf("\\")!==-1)){var i=this.strict?this.reservedWordsStrict:this.reservedWords;i.test(n)&&(!this.inAsync&&n==="await"&&this.raiseRecoverable(e,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(e,"The keyword '"+n+"' is reserved"))}};Y.parseIdent=function(t,e){var r=this.startNode();return this.type===d.name?r.name=this.value:this.type.keyword?(r.name=this.type.keyword,(r.name==="class"||r.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop()):this.unexpected(),this.next(!!t),this.finishNode(r,"Identifier"),t||(this.checkUnreserved(r),r.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=r.start)),r};Y.parseYield=function(t){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type===d.semi||this.canInsertSemicolon()||this.type!==d.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(d.star),e.argument=this.parseMaybeAssign(t)),this.finishNode(e,"YieldExpression")};Y.parseAwait=function(){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!1),this.finishNode(t,"AwaitExpression")};var Er=se.prototype;Er.raise=function(t,e){var r=vo(this.input,t);e+=" ("+r.line+":"+r.column+")";var n=new SyntaxError(e);throw n.pos=t,n.loc=r,n.raisedAt=this.pos,n};Er.raiseRecoverable=Er.raise;Er.curPosition=function(){if(this.options.locations)return new Zt(this.curLine,this.pos-this.lineStart)};var at=se.prototype,Dv=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};at.enterScope=function(t){this.scopeStack.push(new Dv(t))};at.exitScope=function(){this.scopeStack.pop()};at.treatFunctionsAsVarInScope=function(t){return t.flags&tr||!this.inModule&&t.flags&Qt};at.declareName=function(t,e,r){var n=!1;if(e===He){var i=this.currentScope();n=i.lexical.indexOf(t)>-1||i.functions.indexOf(t)>-1||i.var.indexOf(t)>-1,i.lexical.push(t),this.inModule&&i.flags&Qt&&delete this.undefinedExports[t]}else if(e===To){var s=this.currentScope();s.lexical.push(t)}else if(e===Eo){var a=this.currentScope();this.treatFunctionsAsVar?n=a.lexical.indexOf(t)>-1:n=a.lexical.indexOf(t)>-1||a.var.indexOf(t)>-1,a.functions.push(t)}else for(var o=this.scopeStack.length-1;o>=0;--o){var u=this.scopeStack[o];if(u.lexical.indexOf(t)>-1&&!(u.flags&xo&&u.lexical[0]===t)||!this.treatFunctionsAsVarInScope(u)&&u.functions.indexOf(t)>-1){n=!0;break}if(u.var.push(t),this.inModule&&u.flags&Qt&&delete this.undefinedExports[t],u.flags&ni)break}n&&this.raiseRecoverable(r,"Identifier '"+t+"' has already been declared")};at.checkLocalExport=function(t){this.scopeStack[0].lexical.indexOf(t.name)===-1&&this.scopeStack[0].var.indexOf(t.name)===-1&&(this.undefinedExports[t.name]=t)};at.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};at.currentVarScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(e.flags&ni)return e}};at.currentThisScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(e.flags&ni&&!(e.flags&_o))return e}};var oi=function(t,e,r){this.type="",this.start=e,this.end=0,t.options.locations&&(this.loc=new $r(t,r)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[e,0])},Lr=se.prototype;Lr.startNode=function(){return new oi(this,this.start,this.startLoc)};Lr.startNodeAt=function(t,e){return new oi(this,t,e)};function Ro(t,e,r,n){return t.type=e,t.end=r,this.options.locations&&(t.loc.end=n),this.options.ranges&&(t.range[1]=r),t}Lr.finishNode=function(t,e){return Ro.call(this,t,e,this.lastTokEnd,this.lastTokEndLoc)};Lr.finishNodeAt=function(t,e,r,n){return Ro.call(this,t,e,r,n)};var Ie=function(t,e,r,n,i){this.token=t,this.isExpr=!!e,this.preserveSpace=!!r,this.override=n,this.generator=!!i},ie={b_stat:new Ie("{",!1),b_expr:new Ie("{",!0),b_tmpl:new Ie("${",!1),p_stat:new Ie("(",!1),p_expr:new Ie("(",!0),q_tmpl:new Ie("`",!0,!0,function(t){return t.tryReadTemplateToken()}),f_stat:new Ie("function",!1),f_expr:new Ie("function",!0),f_expr_gen:new Ie("function",!0,!1,null,!0),f_gen:new Ie("function",!1,!1,null,!0)},Vr=se.prototype;Vr.initialContext=function(){return[ie.b_stat]};Vr.braceIsBlock=function(t){var e=this.curContext();return e===ie.f_expr||e===ie.f_stat?!0:t===d.colon&&(e===ie.b_stat||e===ie.b_expr)?!e.isExpr:t===d._return||t===d.name&&this.exprAllowed?Re.test(this.input.slice(this.lastTokEnd,this.start)):t===d._else||t===d.semi||t===d.eof||t===d.parenR||t===d.arrow?!0:t===d.braceL?e===ie.b_stat:t===d._var||t===d._const||t===d.name?!1:!this.exprAllowed};Vr.inGeneratorContext=function(){for(var t=this.context.length-1;t>=1;t--){var e=this.context[t];if(e.token==="function")return e.generator}return!1};Vr.updateContext=function(t){var e,r=this.type;r.keyword&&t===d.dot?this.exprAllowed=!1:(e=r.updateContext)?e.call(this,t):this.exprAllowed=r.beforeExpr};d.parenR.updateContext=d.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var t=this.context.pop();t===ie.b_stat&&this.curContext().token==="function"&&(t=this.context.pop()),this.exprAllowed=!t.isExpr};d.braceL.updateContext=function(t){this.context.push(this.braceIsBlock(t)?ie.b_stat:ie.b_expr),this.exprAllowed=!0};d.dollarBraceL.updateContext=function(){this.context.push(ie.b_tmpl),this.exprAllowed=!0};d.parenL.updateContext=function(t){var e=t===d._if||t===d._for||t===d._with||t===d._while;this.context.push(e?ie.p_stat:ie.p_expr),this.exprAllowed=!0};d.incDec.updateContext=function(){};d._function.updateContext=d._class.updateContext=function(t){t.beforeExpr&&t!==d.semi&&t!==d._else&&!(t===d._return&&Re.test(this.input.slice(this.lastTokEnd,this.start)))&&!((t===d.colon||t===d.braceL)&&this.curContext()===ie.b_stat)?this.context.push(ie.f_expr):this.context.push(ie.f_stat),this.exprAllowed=!1};d.backQuote.updateContext=function(){this.curContext()===ie.q_tmpl?this.context.pop():this.context.push(ie.q_tmpl),this.exprAllowed=!1};d.star.updateContext=function(t){if(t===d._function){var e=this.context.length-1;this.context[e]===ie.f_expr?this.context[e]=ie.f_expr_gen:this.context[e]=ie.f_gen}this.exprAllowed=!0};d.name.updateContext=function(t){var e=!1;this.options.ecmaVersion>=6&&t!==d.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(e=!0),this.exprAllowed=e};var Io="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",ko=Io+" Extended_Pictographic",Nv=ko,$v={9:Io,10:ko,11:Nv},ks="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",Oo="Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",Po=Oo+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Bv=Po+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Lv={9:Oo,10:Po,11:Bv},Do={};function ci(t){var e=Do[t]={binary:ht($v[t]+" "+ks),nonBinary:{General_Category:ht(ks),Script:ht(Lv[t])}};e.nonBinary.Script_Extensions=e.nonBinary.Script,e.nonBinary.gc=e.nonBinary.General_Category,e.nonBinary.sc=e.nonBinary.Script,e.nonBinary.scx=e.nonBinary.Script_Extensions}ci(9);ci(10);ci(11);var W=se.prototype,Je=function(t){this.parser=t,this.validFlags="gim"+(t.options.ecmaVersion>=6?"uy":"")+(t.options.ecmaVersion>=9?"s":""),this.unicodeProperties=Do[t.options.ecmaVersion>=11?11:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};Je.prototype.reset=function(t,e,r){var n=r.indexOf("u")!==-1;this.start=t|0,this.source=e+"",this.flags=r,this.switchU=n&&this.parser.options.ecmaVersion>=6,this.switchN=n&&this.parser.options.ecmaVersion>=9};Je.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};Je.prototype.at=function(t,e){e===void 0&&(e=!1);var r=this.source,n=r.length;if(t>=n)return-1;var i=r.charCodeAt(t);if(!(e||this.switchU)||i<=55295||i>=57344||t+1>=n)return i;var s=r.charCodeAt(t+1);return s>=56320&&s<=57343?(i<<10)+s-56613888:i};Je.prototype.nextIndex=function(t,e){e===void 0&&(e=!1);var r=this.source,n=r.length;if(t>=n)return n;var i=r.charCodeAt(t),s;return!(e||this.switchU)||i<=55295||i>=57344||t+1>=n||(s=r.charCodeAt(t+1))<56320||s>57343?t+1:t+2};Je.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)};Je.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)};Je.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)};Je.prototype.eat=function(t,e){return e===void 0&&(e=!1),this.current(e)===t?(this.advance(e),!0):!1};function Tr(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}W.validateRegExpFlags=function(t){for(var e=t.validFlags,r=t.flags,n=0;n<r.length;n++){var i=r.charAt(n);e.indexOf(i)===-1&&this.raise(t.start,"Invalid regular expression flag"),r.indexOf(i,n+1)>-1&&this.raise(t.start,"Duplicate regular expression flag")}};W.validateRegExpPattern=function(t){this.regexp_pattern(t),!t.switchN&&this.options.ecmaVersion>=9&&t.groupNames.length>0&&(t.switchN=!0,this.regexp_pattern(t))};W.regexp_pattern=function(t){t.pos=0,t.lastIntValue=0,t.lastStringValue="",t.lastAssertionIsQuantifiable=!1,t.numCapturingParens=0,t.maxBackReference=0,t.groupNames.length=0,t.backReferenceNames.length=0,this.regexp_disjunction(t),t.pos!==t.source.length&&(t.eat(41)&&t.raise("Unmatched ')'"),(t.eat(93)||t.eat(125))&&t.raise("Lone quantifier brackets")),t.maxBackReference>t.numCapturingParens&&t.raise("Invalid escape");for(var e=0,r=t.backReferenceNames;e<r.length;e+=1){var n=r[e];t.groupNames.indexOf(n)===-1&&t.raise("Invalid named capture referenced")}};W.regexp_disjunction=function(t){for(this.regexp_alternative(t);t.eat(124);)this.regexp_alternative(t);this.regexp_eatQuantifier(t,!0)&&t.raise("Nothing to repeat"),t.eat(123)&&t.raise("Lone quantifier brackets")};W.regexp_alternative=function(t){for(;t.pos<t.source.length&&this.regexp_eatTerm(t););};W.regexp_eatTerm=function(t){return this.regexp_eatAssertion(t)?(t.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(t)&&t.switchU&&t.raise("Invalid quantifier"),!0):(t.switchU?this.regexp_eatAtom(t):this.regexp_eatExtendedAtom(t))?(this.regexp_eatQuantifier(t),!0):!1};W.regexp_eatAssertion=function(t){var e=t.pos;if(t.lastAssertionIsQuantifiable=!1,t.eat(94)||t.eat(36))return!0;if(t.eat(92)){if(t.eat(66)||t.eat(98))return!0;t.pos=e}if(t.eat(40)&&t.eat(63)){var r=!1;if(this.options.ecmaVersion>=9&&(r=t.eat(60)),t.eat(61)||t.eat(33))return this.regexp_disjunction(t),t.eat(41)||t.raise("Unterminated group"),t.lastAssertionIsQuantifiable=!r,!0}return t.pos=e,!1};W.regexp_eatQuantifier=function(t,e){return e===void 0&&(e=!1),this.regexp_eatQuantifierPrefix(t,e)?(t.eat(63),!0):!1};W.regexp_eatQuantifierPrefix=function(t,e){return t.eat(42)||t.eat(43)||t.eat(63)||this.regexp_eatBracedQuantifier(t,e)};W.regexp_eatBracedQuantifier=function(t,e){var r=t.pos;if(t.eat(123)){var n=0,i=-1;if(this.regexp_eatDecimalDigits(t)&&(n=t.lastIntValue,t.eat(44)&&this.regexp_eatDecimalDigits(t)&&(i=t.lastIntValue),t.eat(125)))return i!==-1&&i<n&&!e&&t.raise("numbers out of order in {} quantifier"),!0;t.switchU&&!e&&t.raise("Incomplete quantifier"),t.pos=r}return!1};W.regexp_eatAtom=function(t){return this.regexp_eatPatternCharacters(t)||t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)};W.regexp_eatReverseSolidusAtomEscape=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatAtomEscape(t))return!0;t.pos=e}return!1};W.regexp_eatUncapturingGroup=function(t){var e=t.pos;if(t.eat(40)){if(t.eat(63)&&t.eat(58)){if(this.regexp_disjunction(t),t.eat(41))return!0;t.raise("Unterminated group")}t.pos=e}return!1};W.regexp_eatCapturingGroup=function(t){if(t.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(t):t.current()===63&&t.raise("Invalid group"),this.regexp_disjunction(t),t.eat(41))return t.numCapturingParens+=1,!0;t.raise("Unterminated group")}return!1};W.regexp_eatExtendedAtom=function(t){return t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)||this.regexp_eatInvalidBracedQuantifier(t)||this.regexp_eatExtendedPatternCharacter(t)};W.regexp_eatInvalidBracedQuantifier=function(t){return this.regexp_eatBracedQuantifier(t,!0)&&t.raise("Nothing to repeat"),!1};W.regexp_eatSyntaxCharacter=function(t){var e=t.current();return No(e)?(t.lastIntValue=e,t.advance(),!0):!1};function No(t){return t===36||t>=40&&t<=43||t===46||t===63||t>=91&&t<=94||t>=123&&t<=125}W.regexp_eatPatternCharacters=function(t){for(var e=t.pos,r=0;(r=t.current())!==-1&&!No(r);)t.advance();return t.pos!==e};W.regexp_eatExtendedPatternCharacter=function(t){var e=t.current();return e!==-1&&e!==36&&!(e>=40&&e<=43)&&e!==46&&e!==63&&e!==91&&e!==94&&e!==124?(t.advance(),!0):!1};W.regexp_groupSpecifier=function(t){if(t.eat(63)){if(this.regexp_eatGroupName(t)){t.groupNames.indexOf(t.lastStringValue)!==-1&&t.raise("Duplicate capture group name"),t.groupNames.push(t.lastStringValue);return}t.raise("Invalid group")}};W.regexp_eatGroupName=function(t){if(t.lastStringValue="",t.eat(60)){if(this.regexp_eatRegExpIdentifierName(t)&&t.eat(62))return!0;t.raise("Invalid capture group name")}return!1};W.regexp_eatRegExpIdentifierName=function(t){if(t.lastStringValue="",this.regexp_eatRegExpIdentifierStart(t)){for(t.lastStringValue+=Tr(t.lastIntValue);this.regexp_eatRegExpIdentifierPart(t);)t.lastStringValue+=Tr(t.lastIntValue);return!0}return!1};W.regexp_eatRegExpIdentifierStart=function(t){var e=t.pos,r=this.options.ecmaVersion>=11,n=t.current(r);return t.advance(r),n===92&&this.regexp_eatRegExpUnicodeEscapeSequence(t,r)&&(n=t.lastIntValue),Vv(n)?(t.lastIntValue=n,!0):(t.pos=e,!1)};function Vv(t){return it(t,!0)||t===36||t===95}W.regexp_eatRegExpIdentifierPart=function(t){var e=t.pos,r=this.options.ecmaVersion>=11,n=t.current(r);return t.advance(r),n===92&&this.regexp_eatRegExpUnicodeEscapeSequence(t,r)&&(n=t.lastIntValue),Mv(n)?(t.lastIntValue=n,!0):(t.pos=e,!1)};function Mv(t){return At(t,!0)||t===36||t===95||t===8204||t===8205}W.regexp_eatAtomEscape=function(t){return this.regexp_eatBackReference(t)||this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)||t.switchN&&this.regexp_eatKGroupName(t)?!0:(t.switchU&&(t.current()===99&&t.raise("Invalid unicode escape"),t.raise("Invalid escape")),!1)};W.regexp_eatBackReference=function(t){var e=t.pos;if(this.regexp_eatDecimalEscape(t)){var r=t.lastIntValue;if(t.switchU)return r>t.maxBackReference&&(t.maxBackReference=r),!0;if(r<=t.numCapturingParens)return!0;t.pos=e}return!1};W.regexp_eatKGroupName=function(t){if(t.eat(107)){if(this.regexp_eatGroupName(t))return t.backReferenceNames.push(t.lastStringValue),!0;t.raise("Invalid named reference")}return!1};W.regexp_eatCharacterEscape=function(t){return this.regexp_eatControlEscape(t)||this.regexp_eatCControlLetter(t)||this.regexp_eatZero(t)||this.regexp_eatHexEscapeSequence(t)||this.regexp_eatRegExpUnicodeEscapeSequence(t,!1)||!t.switchU&&this.regexp_eatLegacyOctalEscapeSequence(t)||this.regexp_eatIdentityEscape(t)};W.regexp_eatCControlLetter=function(t){var e=t.pos;if(t.eat(99)){if(this.regexp_eatControlLetter(t))return!0;t.pos=e}return!1};W.regexp_eatZero=function(t){return t.current()===48&&!Mr(t.lookahead())?(t.lastIntValue=0,t.advance(),!0):!1};W.regexp_eatControlEscape=function(t){var e=t.current();return e===116?(t.lastIntValue=9,t.advance(),!0):e===110?(t.lastIntValue=10,t.advance(),!0):e===118?(t.lastIntValue=11,t.advance(),!0):e===102?(t.lastIntValue=12,t.advance(),!0):e===114?(t.lastIntValue=13,t.advance(),!0):!1};W.regexp_eatControlLetter=function(t){var e=t.current();return $o(e)?(t.lastIntValue=e%32,t.advance(),!0):!1};function $o(t){return t>=65&&t<=90||t>=97&&t<=122}W.regexp_eatRegExpUnicodeEscapeSequence=function(t,e){e===void 0&&(e=!1);var r=t.pos,n=e||t.switchU;if(t.eat(117)){if(this.regexp_eatFixedHexDigits(t,4)){var i=t.lastIntValue;if(n&&i>=55296&&i<=56319){var s=t.pos;if(t.eat(92)&&t.eat(117)&&this.regexp_eatFixedHexDigits(t,4)){var a=t.lastIntValue;if(a>=56320&&a<=57343)return t.lastIntValue=(i-55296)*1024+(a-56320)+65536,!0}t.pos=s,t.lastIntValue=i}return!0}if(n&&t.eat(123)&&this.regexp_eatHexDigits(t)&&t.eat(125)&&jv(t.lastIntValue))return!0;n&&t.raise("Invalid unicode escape"),t.pos=r}return!1};function jv(t){return t>=0&&t<=1114111}W.regexp_eatIdentityEscape=function(t){if(t.switchU)return this.regexp_eatSyntaxCharacter(t)?!0:t.eat(47)?(t.lastIntValue=47,!0):!1;var e=t.current();return e!==99&&(!t.switchN||e!==107)?(t.lastIntValue=e,t.advance(),!0):!1};W.regexp_eatDecimalEscape=function(t){t.lastIntValue=0;var e=t.current();if(e>=49&&e<=57){do t.lastIntValue=10*t.lastIntValue+(e-48),t.advance();while((e=t.current())>=48&&e<=57);return!0}return!1};W.regexp_eatCharacterClassEscape=function(t){var e=t.current();if(Fv(e))return t.lastIntValue=-1,t.advance(),!0;if(t.switchU&&this.options.ecmaVersion>=9&&(e===80||e===112)){if(t.lastIntValue=-1,t.advance(),t.eat(123)&&this.regexp_eatUnicodePropertyValueExpression(t)&&t.eat(125))return!0;t.raise("Invalid property name")}return!1};function Fv(t){return t===100||t===68||t===115||t===83||t===119||t===87}W.regexp_eatUnicodePropertyValueExpression=function(t){var e=t.pos;if(this.regexp_eatUnicodePropertyName(t)&&t.eat(61)){var r=t.lastStringValue;if(this.regexp_eatUnicodePropertyValue(t)){var n=t.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(t,r,n),!0}}if(t.pos=e,this.regexp_eatLoneUnicodePropertyNameOrValue(t)){var i=t.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(t,i),!0}return!1};W.regexp_validateUnicodePropertyNameAndValue=function(t,e,r){Nr(t.unicodeProperties.nonBinary,e)||t.raise("Invalid property name"),t.unicodeProperties.nonBinary[e].test(r)||t.raise("Invalid property value")};W.regexp_validateUnicodePropertyNameOrValue=function(t,e){t.unicodeProperties.binary.test(e)||t.raise("Invalid property name")};W.regexp_eatUnicodePropertyName=function(t){var e=0;for(t.lastStringValue="";Bo(e=t.current());)t.lastStringValue+=Tr(e),t.advance();return t.lastStringValue!==""};function Bo(t){return $o(t)||t===95}W.regexp_eatUnicodePropertyValue=function(t){var e=0;for(t.lastStringValue="";Uv(e=t.current());)t.lastStringValue+=Tr(e),t.advance();return t.lastStringValue!==""};function Uv(t){return Bo(t)||Mr(t)}W.regexp_eatLoneUnicodePropertyNameOrValue=function(t){return this.regexp_eatUnicodePropertyValue(t)};W.regexp_eatCharacterClass=function(t){if(t.eat(91)){if(t.eat(94),this.regexp_classRanges(t),t.eat(93))return!0;t.raise("Unterminated character class")}return!1};W.regexp_classRanges=function(t){for(;this.regexp_eatClassAtom(t);){var e=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassAtom(t)){var r=t.lastIntValue;t.switchU&&(e===-1||r===-1)&&t.raise("Invalid character class"),e!==-1&&r!==-1&&e>r&&t.raise("Range out of order in character class")}}};W.regexp_eatClassAtom=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatClassEscape(t))return!0;if(t.switchU){var r=t.current();(r===99||Mo(r))&&t.raise("Invalid class escape"),t.raise("Invalid escape")}t.pos=e}var n=t.current();return n!==93?(t.lastIntValue=n,t.advance(),!0):!1};W.regexp_eatClassEscape=function(t){var e=t.pos;if(t.eat(98))return t.lastIntValue=8,!0;if(t.switchU&&t.eat(45))return t.lastIntValue=45,!0;if(!t.switchU&&t.eat(99)){if(this.regexp_eatClassControlLetter(t))return!0;t.pos=e}return this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)};W.regexp_eatClassControlLetter=function(t){var e=t.current();return Mr(e)||e===95?(t.lastIntValue=e%32,t.advance(),!0):!1};W.regexp_eatHexEscapeSequence=function(t){var e=t.pos;if(t.eat(120)){if(this.regexp_eatFixedHexDigits(t,2))return!0;t.switchU&&t.raise("Invalid escape"),t.pos=e}return!1};W.regexp_eatDecimalDigits=function(t){var e=t.pos,r=0;for(t.lastIntValue=0;Mr(r=t.current());)t.lastIntValue=10*t.lastIntValue+(r-48),t.advance();return t.pos!==e};function Mr(t){return t>=48&&t<=57}W.regexp_eatHexDigits=function(t){var e=t.pos,r=0;for(t.lastIntValue=0;Lo(r=t.current());)t.lastIntValue=16*t.lastIntValue+Vo(r),t.advance();return t.pos!==e};function Lo(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function Vo(t){return t>=65&&t<=70?10+(t-65):t>=97&&t<=102?10+(t-97):t-48}W.regexp_eatLegacyOctalEscapeSequence=function(t){if(this.regexp_eatOctalDigit(t)){var e=t.lastIntValue;if(this.regexp_eatOctalDigit(t)){var r=t.lastIntValue;e<=3&&this.regexp_eatOctalDigit(t)?t.lastIntValue=e*64+r*8+t.lastIntValue:t.lastIntValue=e*8+r}else t.lastIntValue=e;return!0}return!1};W.regexp_eatOctalDigit=function(t){var e=t.current();return Mo(e)?(t.lastIntValue=e-48,t.advance(),!0):(t.lastIntValue=0,!1)};function Mo(t){return t>=48&&t<=55}W.regexp_eatFixedHexDigits=function(t,e){var r=t.pos;t.lastIntValue=0;for(var n=0;n<e;++n){var i=t.current();if(!Lo(i))return t.pos=r,!1;t.lastIntValue=16*t.lastIntValue+Vo(i),t.advance()}return!0};var ui=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new $r(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},Z=se.prototype;Z.next=function(t){!t&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new ui(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};Z.getToken=function(){return this.next(),new ui(this)};typeof Symbol<"u"&&(Z[Symbol.iterator]=function(){var t=this;return{next:function(){var e=t.getToken();return{done:e.type===d.eof,value:e}}}});Z.curContext=function(){return this.context[this.context.length-1]};Z.nextToken=function(){var t=this.curContext();if((!t||!t.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(d.eof);if(t.override)return t.override(this);this.readToken(this.fullCharCodeAtPos())};Z.readToken=function(t){return it(t,this.options.ecmaVersion>=6)||t===92?this.readWord():this.getTokenFromCode(t)};Z.fullCharCodeAtPos=function(){var t=this.input.charCodeAt(this.pos);if(t<=55295||t>=57344)return t;var e=this.input.charCodeAt(this.pos+1);return(t<<10)+e-56613888};Z.skipBlockComment=function(){var t=this.options.onComment&&this.curPosition(),e=this.pos,r=this.input.indexOf("*/",this.pos+=2);if(r===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=r+2,this.options.locations){Jt.lastIndex=e;for(var n;(n=Jt.exec(this.input))&&n.index<this.pos;)++this.curLine,this.lineStart=n.index+n[0].length}this.options.onComment&&this.options.onComment(!0,this.input.slice(e+2,r),e,this.pos,t,this.curPosition())};Z.skipLineComment=function(t){for(var e=this.pos,r=this.options.onComment&&this.curPosition(),n=this.input.charCodeAt(this.pos+=t);this.pos<this.input.length&&!er(n);)n=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(e+t,this.pos),e,this.pos,r,this.curPosition())};Z.skipSpace=function(){e:for(;this.pos<this.input.length;){var t=this.input.charCodeAt(this.pos);switch(t){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(t>8&&t<14||t>=5760&&go.test(String.fromCharCode(t)))++this.pos;else break e}}};Z.finishToken=function(t,e){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var r=this.type;this.type=t,this.value=e,this.updateContext(r)};Z.readToken_dot=function(){var t=this.input.charCodeAt(this.pos+1);if(t>=48&&t<=57)return this.readNumber(!0);var e=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&t===46&&e===46?(this.pos+=3,this.finishToken(d.ellipsis)):(++this.pos,this.finishToken(d.dot))};Z.readToken_slash=function(){var t=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):t===61?this.finishOp(d.assign,2):this.finishOp(d.slash,1)};Z.readToken_mult_modulo_exp=function(t){var e=this.input.charCodeAt(this.pos+1),r=1,n=t===42?d.star:d.modulo;return this.options.ecmaVersion>=7&&t===42&&e===42&&(++r,n=d.starstar,e=this.input.charCodeAt(this.pos+2)),e===61?this.finishOp(d.assign,r+1):this.finishOp(n,r)};Z.readToken_pipe_amp=function(t){var e=this.input.charCodeAt(this.pos+1);if(e===t){if(this.options.ecmaVersion>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(d.assign,3)}return this.finishOp(t===124?d.logicalOR:d.logicalAND,2)}return e===61?this.finishOp(d.assign,2):this.finishOp(t===124?d.bitwiseOR:d.bitwiseAND,1)};Z.readToken_caret=function(){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(d.assign,2):this.finishOp(d.bitwiseXOR,1)};Z.readToken_plus_min=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?e===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||Re.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(d.incDec,2):e===61?this.finishOp(d.assign,2):this.finishOp(d.plusMin,1)};Z.readToken_lt_gt=function(t){var e=this.input.charCodeAt(this.pos+1),r=1;return e===t?(r=t===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+r)===61?this.finishOp(d.assign,r+1):this.finishOp(d.bitShift,r)):e===33&&t===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(e===61&&(r=2),this.finishOp(d.relational,r))};Z.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(d.equality,this.input.charCodeAt(this.pos+2)===61?3:2):t===61&&e===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(d.arrow)):this.finishOp(t===61?d.eq:d.prefix,1)};Z.readToken_question=function(){var t=this.options.ecmaVersion;if(t>=11){var e=this.input.charCodeAt(this.pos+1);if(e===46){var r=this.input.charCodeAt(this.pos+2);if(r<48||r>57)return this.finishOp(d.questionDot,2)}if(e===63){if(t>=12){var n=this.input.charCodeAt(this.pos+2);if(n===61)return this.finishOp(d.assign,3)}return this.finishOp(d.coalesce,2)}}return this.finishOp(d.question,1)};Z.getTokenFromCode=function(t){switch(t){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(d.parenL);case 41:return++this.pos,this.finishToken(d.parenR);case 59:return++this.pos,this.finishToken(d.semi);case 44:return++this.pos,this.finishToken(d.comma);case 91:return++this.pos,this.finishToken(d.bracketL);case 93:return++this.pos,this.finishToken(d.bracketR);case 123:return++this.pos,this.finishToken(d.braceL);case 125:return++this.pos,this.finishToken(d.braceR);case 58:return++this.pos,this.finishToken(d.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(d.backQuote);case 48:var e=this.input.charCodeAt(this.pos+1);if(e===120||e===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(e===111||e===79)return this.readRadixNumber(8);if(e===98||e===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(t);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(t);case 124:case 38:return this.readToken_pipe_amp(t);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(t);case 60:case 62:return this.readToken_lt_gt(t);case 61:case 33:return this.readToken_eq_excl(t);case 63:return this.readToken_question();case 126:return this.finishOp(d.prefix,1)}this.raise(this.pos,"Unexpected character '"+li(t)+"'")};Z.finishOp=function(t,e){var r=this.input.slice(this.pos,this.pos+e);return this.pos+=e,this.finishToken(t,r)};Z.readRegexp=function(){for(var t,e,r=this.pos;;){this.pos>=this.input.length&&this.raise(r,"Unterminated regular expression");var n=this.input.charAt(this.pos);if(Re.test(n)&&this.raise(r,"Unterminated regular expression"),t)t=!1;else{if(n==="[")e=!0;else if(n==="]"&&e)e=!1;else if(n==="/"&&!e)break;t=n==="\\"}++this.pos}var i=this.input.slice(r,this.pos);++this.pos;var s=this.pos,a=this.readWord1();this.containsEsc&&this.unexpected(s);var o=this.regexpState||(this.regexpState=new Je(this));o.reset(r,i,a),this.validateRegExpFlags(o),this.validateRegExpPattern(o);var u=null;try{u=new RegExp(i,a)}catch(c){}return this.finishToken(d.regexp,{pattern:i,flags:a,value:u})};Z.readInt=function(t,e,r){for(var n=this.options.ecmaVersion>=12&&e===void 0,i=r&&this.input.charCodeAt(this.pos)===48,s=this.pos,a=0,o=0,u=0,c=e!=null?e:1/0;u<c;++u,++this.pos){var l=this.input.charCodeAt(this.pos),h=void 0;if(n&&l===95){i&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),o===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),u===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),o=l;continue}if(l>=97?h=l-97+10:l>=65?h=l-65+10:l>=48&&l<=57?h=l-48:h=1/0,h>=t)break;o=l,a=a*t+h}return n&&o===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===s||e!=null&&this.pos-s!==e?null:a};function Hv(t,e){return e?parseInt(t,8):parseFloat(t.replace(/_/g,""))}function jo(t){return typeof BigInt!="function"?null:BigInt(t.replace(/_/g,""))}Z.readRadixNumber=function(t){var e=this.pos;this.pos+=2;var r=this.readInt(t);return r==null&&this.raise(this.start+2,"Expected number in radix "+t),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(r=jo(this.input.slice(e,this.pos)),++this.pos):it(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(d.num,r)};Z.readNumber=function(t){var e=this.pos;!t&&this.readInt(10,void 0,!0)===null&&this.raise(e,"Invalid number");var r=this.pos-e>=2&&this.input.charCodeAt(e)===48;r&&this.strict&&this.raise(e,"Invalid number");var n=this.input.charCodeAt(this.pos);if(!r&&!t&&this.options.ecmaVersion>=11&&n===110){var i=jo(this.input.slice(e,this.pos));return++this.pos,it(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(d.num,i)}r&&/[89]/.test(this.input.slice(e,this.pos))&&(r=!1),n===46&&!r&&(++this.pos,this.readInt(10),n=this.input.charCodeAt(this.pos)),(n===69||n===101)&&!r&&(n=this.input.charCodeAt(++this.pos),(n===43||n===45)&&++this.pos,this.readInt(10)===null&&this.raise(e,"Invalid number")),it(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var s=Hv(this.input.slice(e,this.pos),r);return this.finishToken(d.num,s)};Z.readCodePoint=function(){var t=this.input.charCodeAt(this.pos),e;if(t===123){this.options.ecmaVersion<6&&this.unexpected();var r=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(r,"Code point out of bounds")}else e=this.readHexChar(4);return e};function li(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}Z.readString=function(t){for(var e="",r=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var n=this.input.charCodeAt(this.pos);if(n===t)break;n===92?(e+=this.input.slice(r,this.pos),e+=this.readEscapedChar(!1),r=this.pos):(er(n,this.options.ecmaVersion>=10)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return e+=this.input.slice(r,this.pos++),this.finishToken(d.string,e)};var Fo={};Z.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(t){if(t===Fo)this.readInvalidTemplateToken();else throw t}this.inTemplateElement=!1};Z.invalidStringToken=function(t,e){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Fo;this.raise(t,e)};Z.readTmplToken=function(){for(var t="",e=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var r=this.input.charCodeAt(this.pos);if(r===96||r===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===d.template||this.type===d.invalidTemplate)?r===36?(this.pos+=2,this.finishToken(d.dollarBraceL)):(++this.pos,this.finishToken(d.backQuote)):(t+=this.input.slice(e,this.pos),this.finishToken(d.template,t));if(r===92)t+=this.input.slice(e,this.pos),t+=this.readEscapedChar(!0),e=this.pos;else if(er(r)){switch(t+=this.input.slice(e,this.pos),++this.pos,r){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:t+=`
@@ -72,7 +72,7 @@ function print() { __p += __j.call(arguments, '') }
72
72
  `;return i.evaluate(s)}Object.defineProperty(pi,"__IS_FUNCTION_FUNC",{value:!0,writable:!1,enumerable:!1,configurable:!1});let Ne=class{constructor(e){this.value=e}};class ut{constructor(e){this.value=e}}class Xe{constructor(e){this.value=e}}class Et{constructor(e,r=null,n){this.name=n,this.parent=r,this.data=e,this.labelStack=[]}}function fr(){}function Qv(t=null,e){return new Et(Object.create(null),t,e)}function Xv(t){return Object.create(t)}const je={NaN:NaN,Infinity:1/0,undefined:void 0,Object,Array,String,Boolean,Number,Date,RegExp,Error,URIError,TypeError,RangeError,SyntaxError,ReferenceError,Math,parseInt,parseFloat,isNaN,isFinite,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,escape,unescape,eval:hi,Function:pi};typeof JSON<"u"&&(je.JSON=JSON);typeof Promise<"u"&&(je.Promise=Promise);typeof Set<"u"&&(je.Set=Set);typeof Map<"u"&&(je.Map=Map);typeof Symbol<"u"&&(je.Symbol=Symbol);typeof Proxy<"u"&&(je.Proxy=Proxy);typeof WeakMap<"u"&&(je.WeakMap=WeakMap);typeof WeakSet<"u"&&(je.WeakSet=WeakSet);typeof Reflect<"u"&&(je.Reflect=Reflect);let Ze=class Vt{constructor(e=Vt.global,r={}){this.sourceList=[],this.collectDeclVars=Object.create(null),this.collectDeclFuncs=Object.create(null),this.isVarDeclMode=!1,this.lastExecNode=null,this.isRunning=!1,this.options={ecmaVersion:r.ecmaVersion||Vt.ecmaVersion,timeout:r.timeout||0,rootContext:r.rootContext,globalContextInFunction:r.globalContextInFunction===void 0?Vt.globalContextInFunction:r.globalContextInFunction,_initEnv:r._initEnv},this.context=e||Object.create(null),this.callStack=[],this.initEnvironment(this.context)}initEnvironment(e){let r;if(e instanceof Et)r=e;else{let i=null;const s=this.createSuperScope(e);this.options.rootContext&&(i=new Et(Xv(this.options.rootContext),s,$s)),r=new Et(e,i||s,Bs)}this.globalScope=r,this.currentScope=this.globalScope,this.globalContext=r.data,this.currentContext=r.data,this.collectDeclVars=Object.create(null),this.collectDeclFuncs=Object.create(null),this.execStartTime=Date.now(),this.execEndTime=this.execStartTime;const n=this.options._initEnv;n&&n.call(this)}getExecStartTime(){return this.execStartTime}getExecutionTime(){return this.execEndTime-this.execStartTime}setExecTimeout(e=0){this.options.timeout=e}getOptions(){return this.options}getGlobalScope(){return this.globalScope}getCurrentScope(){return this.currentScope}getCurrentContext(){return this.currentContext}isInterruptThrow(e){return e instanceof Uo||e instanceof ke||e instanceof Yv}createSuperScope(e){let r=Object.assign({},je);return Object.keys(r).forEach(n=>{n in e&&delete r[n]}),new Et(r,null,Ns)}setCurrentContext(e){this.currentContext=e}setCurrentScope(e){this.currentScope=e}evaluate(e=""){let r;if(e)return r=zv(e,{ranges:!0,locations:!0,ecmaVersion:this.options.ecmaVersion||Vt.ecmaVersion}),this.evaluateNode(r,e)}appendCode(e){return this.evaluate(e)}evaluateNode(e,r=""){this.value=void 0,this.source=r,this.sourceList.push(r),this.isRunning=!0,this.execStartTime=Date.now(),this.execEndTime=this.execStartTime,this.collectDeclVars=Object.create(null),this.collectDeclFuncs=Object.create(null);const n=this.getCurrentScope(),i=this.getCurrentContext(),s=n.labelStack.concat([]),a=this.callStack.concat([]),o=()=>{this.setCurrentScope(n),this.setCurrentContext(i),n.labelStack=s,this.callStack=a};try{const u=this.createClosure(e);this.addDeclarationsToScope(this.collectDeclVars,this.collectDeclFuncs,this.getCurrentScope()),u()}catch(u){throw u}finally{o(),this.execEndTime=Date.now()}return this.isRunning=!1,this.getValue()}createErrorMessage(e,r,n){let i=e[1].replace("%0",String(r));return n!==null&&(i+=this.getNodePosition(n||this.lastExecNode)),i}createError(e,r){return new r(e)}createThrowError(e,r){return this.createError(e,r)}createInternalThrowError(e,r,n){return this.createError(this.createErrorMessage(e,r,n),e[2])}checkTimeout(){if(!this.isRunning)return!1;const e=this.options.timeout||0;return Date.now()-this.execStartTime>e}getNodePosition(e){return e&&e.loc?` [${e.loc.start.line}:${e.loc.start.column}]`:""}createClosure(e){let r;switch(e.type){case"BinaryExpression":r=this.binaryExpressionHandler(e);break;case"LogicalExpression":r=this.logicalExpressionHandler(e);break;case"UnaryExpression":r=this.unaryExpressionHandler(e);break;case"UpdateExpression":r=this.updateExpressionHandler(e);break;case"ObjectExpression":r=this.objectExpressionHandler(e);break;case"ArrayExpression":r=this.arrayExpressionHandler(e);break;case"CallExpression":r=this.callExpressionHandler(e);break;case"NewExpression":r=this.newExpressionHandler(e);break;case"MemberExpression":r=this.memberExpressionHandler(e);break;case"ThisExpression":r=this.thisExpressionHandler(e);break;case"SequenceExpression":r=this.sequenceExpressionHandler(e);break;case"Literal":r=this.literalHandler(e);break;case"Identifier":r=this.identifierHandler(e);break;case"AssignmentExpression":r=this.assignmentExpressionHandler(e);break;case"FunctionDeclaration":r=this.functionDeclarationHandler(e);break;case"VariableDeclaration":r=this.variableDeclarationHandler(e);break;case"BlockStatement":case"Program":r=this.programHandler(e);break;case"ExpressionStatement":r=this.expressionStatementHandler(e);break;case"EmptyStatement":r=this.emptyStatementHandler(e);break;case"ReturnStatement":r=this.returnStatementHandler(e);break;case"FunctionExpression":r=this.functionExpressionHandler(e);break;case"IfStatement":r=this.ifStatementHandler(e);break;case"ConditionalExpression":r=this.conditionalExpressionHandler(e);break;case"ForStatement":r=this.forStatementHandler(e);break;case"WhileStatement":r=this.whileStatementHandler(e);break;case"DoWhileStatement":r=this.doWhileStatementHandler(e);break;case"ForInStatement":r=this.forInStatementHandler(e);break;case"WithStatement":r=this.withStatementHandler(e);break;case"ThrowStatement":r=this.throwStatementHandler(e);break;case"TryStatement":r=this.tryStatementHandler(e);break;case"ContinueStatement":r=this.continueStatementHandler(e);break;case"BreakStatement":r=this.breakStatementHandler(e);break;case"SwitchStatement":r=this.switchStatementHandler(e);break;case"LabeledStatement":r=this.labeledStatementHandler(e);break;case"DebuggerStatement":r=this.debuggerStatementHandler(e);break;default:throw this.createInternalThrowError(he.NodeTypeSyntaxError,e.type,e)}return(...n)=>{const i=this.options.timeout;if(i&&i>0&&this.checkTimeout())throw this.createInternalThrowError(he.ExecutionTimeOutError,i,null);return this.lastExecNode=e,r(...n)}}binaryExpressionHandler(e){const r=this.createClosure(e.left),n=this.createClosure(e.right);return()=>{const i=r(),s=n();switch(e.operator){case"==":return i==s;case"!=":return i!=s;case"===":return i===s;case"!==":return i!==s;case"<":return i<s;case"<=":return i<=s;case">":return i>s;case">=":return i>=s;case"<<":return i<<s;case">>":return i>>s;case">>>":return i>>>s;case"+":return i+s;case"-":return i-s;case"*":return i*s;case"**":return Math.pow(i,s);case"/":return i/s;case"%":return i%s;case"|":return i|s;case"^":return i^s;case"&":return i&s;case"in":return i in s;case"instanceof":return i instanceof s;default:throw this.createInternalThrowError(he.BinaryOperatorSyntaxError,e.operator,e)}}}logicalExpressionHandler(e){const r=this.createClosure(e.left),n=this.createClosure(e.right);return()=>{switch(e.operator){case"||":return r()||n();case"&&":return r()&&n();default:throw this.createInternalThrowError(he.LogicalOperatorSyntaxError,e.operator,e)}}}unaryExpressionHandler(e){switch(e.operator){case"delete":const r=this.createObjectGetter(e.argument),n=this.createNameGetter(e.argument);return()=>{let s=r();const a=n();return delete s[a]};default:let i;if(e.operator==="typeof"&&e.argument.type==="Identifier"){const s=this.createObjectGetter(e.argument),a=this.createNameGetter(e.argument);i=()=>s()[a()]}else i=this.createClosure(e.argument);return()=>{const s=i();switch(e.operator){case"-":return-s;case"+":return+s;case"!":return!s;case"~":return~s;case"void":return;case"typeof":return typeof s;default:throw this.createInternalThrowError(he.UnaryOperatorSyntaxError,e.operator,e)}}}}updateExpressionHandler(e){const r=this.createObjectGetter(e.argument),n=this.createNameGetter(e.argument);return()=>{const i=r(),s=n();switch(this.assertVariable(i,s,e),e.operator){case"++":return e.prefix?++i[s]:i[s]++;case"--":return e.prefix?--i[s]:i[s]--;default:throw this.createInternalThrowError(he.UpdateOperatorSyntaxError,e.operator,e)}}}objectExpressionHandler(e){const r=[];function n(s){return s.type==="Identifier"?s.name:s.type==="Literal"?s.value:this.throwError(he.ObjectStructureSyntaxError,s.type,s)}const i=Object.create(null);return e.properties.forEach(s=>{const a=s.kind,o=n(s.key);(!i[o]||a==="init")&&(i[o]={}),i[o][a]=this.createClosure(s.value),r.push({key:o,property:s})}),()=>{const s={},a=r.length;for(let o=0;o<a;o++){const u=r[o],c=u.key,l=i[c],h=l.init?l.init():void 0,p=l.get?l.get():function(){},f=l.set?l.set():function(g){};if("set"in l||"get"in l)Object.defineProperty(s,c,{configurable:!0,enumerable:!0,get:p,set:f});else{const g=u.property,m=g.kind;g.key.type==="Identifier"&&g.value.type==="FunctionExpression"&&m==="init"&&!g.value.id&&Os(h,g.key.name),s[c]=h}}return s}}arrayExpressionHandler(e){const r=e.elements.map(n=>n&&this.createClosure(n));return()=>{const n=r.length,i=Array(n);for(let s=0;s<n;s++){const a=r[s];a&&(i[s]=a())}return i}}safeObjectGet(e,r,n){return e[r]}createCallFunctionGetter(e){switch(e.type){case"MemberExpression":const r=this.createClosure(e.object),n=this.createMemberKeyGetter(e),i=this.source;return()=>{const a=r(),o=n(),u=this.safeObjectGet(a,o,e);if(!u||!un(u)){const c=i.slice(e.start,e.end);throw this.createInternalThrowError(he.FunctionUndefinedReferenceError,c,e)}return u.__IS_EVAL_FUNC?c=>u(new tt(this),c,!0):u.__IS_FUNCTION_FUNC?(...c)=>u(new tt(this),...c):u.bind(a)};default:const s=this.createClosure(e);return()=>{let a="";e.type==="Identifier"&&(a=e.name);const o=s();if(!o||!un(o))throw this.createInternalThrowError(he.FunctionUndefinedReferenceError,a,e);if(e.type==="Identifier"&&o.__IS_EVAL_FUNC&&a==="eval")return c=>{const l=this.getScopeFromName(a,this.getCurrentScope()),h=l.name===Ns||l.name===Bs||l.name===$s;return o(new tt(this),c,!h)};if(o.__IS_EVAL_FUNC)return c=>o(new tt(this),c,!0);if(o.__IS_FUNCTION_FUNC)return(...c)=>o(new tt(this),...c);let u=this.options.globalContextInFunction;if(e.type==="Identifier"){const c=this.getIdentifierScope(e);c.name===Ds&&(u=c.data)}return o.bind(u)}}}callExpressionHandler(e){const r=this.createCallFunctionGetter(e.callee),n=e.arguments.map(i=>this.createClosure(i));return()=>r()(...n.map(i=>i()))}functionExpressionHandler(e){const r=this,n=this.source,i=this.collectDeclVars,s=this.collectDeclFuncs;this.collectDeclVars=Object.create(null),this.collectDeclFuncs=Object.create(null);const a=e.id?e.id.name:"",o=e.params.length,u=e.params.map(p=>this.createParamNameGetter(p)),c=this.createClosure(e.body),l=this.collectDeclVars,h=this.collectDeclFuncs;return this.collectDeclVars=i,this.collectDeclFuncs=s,()=>{const p=r.getCurrentScope(),f=function(...g){r.callStack.push(`${a}`);const m=r.getCurrentScope(),v=Qv(p,`FunctionScope(${a})`);r.setCurrentScope(v),r.addDeclarationsToScope(l,h,v),a&&(v.data[a]=f),v.data.arguments=arguments,u.forEach((_,x)=>{v.data[_()]=g[x]});const w=r.getCurrentContext();r.setCurrentContext(this);const y=c();if(r.setCurrentContext(w),r.setCurrentScope(m),r.callStack.pop(),y instanceof Ne)return y.value};return Os(f,a),Object.defineProperty(f,"length",{value:o,writable:!1,enumerable:!1,configurable:!0}),Object.defineProperty(f,"toString",{value:()=>n.slice(e.start,e.end),writable:!0,configurable:!0,enumerable:!1}),Object.defineProperty(f,"valueOf",{value:()=>n.slice(e.start,e.end),writable:!0,configurable:!0,enumerable:!1}),f}}newExpressionHandler(e){const r=this.source,n=this.createClosure(e.callee),i=e.arguments.map(s=>this.createClosure(s));return()=>{const s=n();if(!un(s)||s.__IS_EVAL_FUNC){const a=e.callee,o=r.slice(a.start,a.end);throw this.createInternalThrowError(he.IsNotConstructor,o,e)}return s.__IS_FUNCTION_FUNC?s(new tt(this),...i.map(a=>a())):new s(...i.map(a=>a()))}}memberExpressionHandler(e){const r=this.createClosure(e.object),n=this.createMemberKeyGetter(e);return()=>{const i=r();let s=n();return i[s]}}thisExpressionHandler(e){return()=>this.getCurrentContext()}sequenceExpressionHandler(e){const r=e.expressions.map(n=>this.createClosure(n));return()=>{let n;const i=r.length;for(let s=0;s<i;s++){const a=r[s];n=a()}return n}}literalHandler(e){return()=>e.regex?new RegExp(e.regex.pattern,e.regex.flags):e.value}identifierHandler(e){return()=>{const r=this.getCurrentScope(),n=this.getScopeDataFromName(e.name,r);return this.assertVariable(n,e.name,e),n[e.name]}}getIdentifierScope(e){const r=this.getCurrentScope();return this.getScopeFromName(e.name,r)}assignmentExpressionHandler(e){e.left.type==="Identifier"&&e.right.type==="FunctionExpression"&&!e.right.id&&(e.right.id={type:"Identifier",name:e.left.name});const r=this.createObjectGetter(e.left),n=this.createNameGetter(e.left),i=this.createClosure(e.right);return()=>{const s=r(),a=n(),o=i();switch(e.operator!=="="&&this.assertVariable(s,a,e),e.operator){case"=":return s[a]=o;case"+=":return s[a]+=o;case"-=":return s[a]-=o;case"*=":return s[a]*=o;case"**=":return s[a]=Math.pow(s[a],o);case"/=":return s[a]/=o;case"%=":return s[a]%=o;case"<<=":return s[a]<<=o;case">>=":return s[a]>>=o;case">>>=":return s[a]>>>=o;case"&=":return s[a]&=o;case"^=":return s[a]^=o;case"|=":return s[a]|=o;default:throw this.createInternalThrowError(he.AssignmentExpressionSyntaxError,e.type,e)}}}functionDeclarationHandler(e){if(e.id){const r=this.functionExpressionHandler(e);Object.defineProperty(r,"isFunctionDeclareClosure",{value:!0,writable:!1,configurable:!1,enumerable:!1}),this.funcDeclaration(e.id.name,r)}return()=>ue}getVariableName(e){if(e.type==="Identifier")return e.name;throw this.createInternalThrowError(he.VariableTypeSyntaxError,e.type,e)}variableDeclarationHandler(e){let r;const n=[];for(let i=0;i<e.declarations.length;i++){const s=e.declarations[i];this.varDeclaration(this.getVariableName(s.id)),s.init&&n.push({type:"AssignmentExpression",operator:"=",left:s.id,right:s.init})}return n.length&&(r=this.createClosure({type:"BlockStatement",body:n})),()=>{if(r){const i=this.isVarDeclMode;this.isVarDeclMode=!0,r(),this.isVarDeclMode=i}return ue}}assertVariable(e,r,n){if(e===this.globalScope.data&&!(r in e))throw this.createInternalThrowError(he.VariableUndefinedReferenceError,r,n)}programHandler(e){const r=e.body.map(n=>this.createClosure(n));return()=>{let n=ue;for(let i=0;i<r.length;i++){const s=r[i],a=this.setValue(s());if(a!==ue&&(n=a,n instanceof Ne||n instanceof ut||n instanceof Xe||n===yt||n===bt))break}return n}}expressionStatementHandler(e){return this.createClosure(e.expression)}emptyStatementHandler(e){return()=>ue}returnStatementHandler(e){const r=e.argument?this.createClosure(e.argument):fr;return()=>new Ne(r())}ifStatementHandler(e){const r=this.createClosure(e.test),n=this.createClosure(e.consequent),i=e.alternate?this.createClosure(e.alternate):(()=>ue);return()=>r()?n():i()}conditionalExpressionHandler(e){return this.ifStatementHandler(e)}forStatementHandler(e){let r=fr,n=e.test?this.createClosure(e.test):()=>!0,i=fr;const s=this.createClosure(e.body);return e.type==="ForStatement"&&(r=e.init?this.createClosure(e.init):r,i=e.update?this.createClosure(e.update):fr),a=>{let o,u=ue,c=e.type==="DoWhileStatement";for(a&&a.type==="LabeledStatement"&&(o=a.label.name),r();c||n();i()){c=!1;const l=this.setValue(s());if(!(l===ue||l===bt)){if(l===yt)break;if(u=l,u instanceof Xe&&u.value===o){u=ue;continue}if(u instanceof Ne||u instanceof ut||u instanceof Xe)break}}return u}}whileStatementHandler(e){return this.forStatementHandler(e)}doWhileStatementHandler(e){return this.forStatementHandler(e)}forInStatementHandler(e){let r=e.left;const n=this.createClosure(e.right),i=this.createClosure(e.body);return e.left.type==="VariableDeclaration"&&(this.createClosure(e.left)(),r=e.left.declarations[0].id),s=>{let a,o=ue,u;s&&s.type==="LabeledStatement"&&(a=s.label.name);const c=n();for(u in c){this.assignmentExpressionHandler({type:"AssignmentExpression",operator:"=",left:r,right:{type:"Literal",value:u}})();const l=this.setValue(i());if(!(l===ue||l===bt)){if(l===yt)break;if(o=l,o instanceof Xe&&o.value===a){o=ue;continue}if(o instanceof Ne||o instanceof ut||o instanceof Xe)break}}return o}}withStatementHandler(e){const r=this.createClosure(e.object),n=this.createClosure(e.body);return()=>{const i=r(),s=this.getCurrentScope(),a=new Et(i,s,Ds);this.setCurrentScope(a);const o=this.setValue(n());return this.setCurrentScope(s),o}}throwStatementHandler(e){const r=this.createClosure(e.argument);return()=>{throw this.setValue(void 0),r()}}tryStatementHandler(e){const r=this.createClosure(e.block),n=e.handler?this.catchClauseHandler(e.handler):null,i=e.finalizer?this.createClosure(e.finalizer):null;return()=>{const s=this.getCurrentScope(),a=this.getCurrentContext(),o=s.labelStack.concat([]),u=this.callStack.concat([]);let c=ue,l,h;const p=()=>{this.setCurrentScope(s),this.setCurrentContext(a),s.labelStack=o,this.callStack=u};try{c=this.setValue(r()),c instanceof Ne&&(l=c)}catch(f){if(p(),this.isInterruptThrow(f))throw f;if(n)try{c=this.setValue(n(f)),c instanceof Ne&&(l=c)}catch(g){if(p(),this.isInterruptThrow(g))throw g;h=g}}if(i)try{c=i(),c instanceof Ne&&(l=c)}catch(f){if(p(),this.isInterruptThrow(f))throw f;h=f}if(h)throw h;return l||c}}catchClauseHandler(e){const r=this.createParamNameGetter(e.param),n=this.createClosure(e.body);return i=>{let s;const a=this.getCurrentScope().data,o=r(),u=Zv.call(a,o),c=a[o];return a[o]=i,s=n(),u?a[o]=c:delete a[o],s}}continueStatementHandler(e){return()=>e.label?new Xe(e.label.name):bt}breakStatementHandler(e){return()=>e.label?new ut(e.label.name):yt}switchStatementHandler(e){const r=this.createClosure(e.discriminant),n=e.cases.map(i=>this.switchCaseHandler(i));return()=>{const i=r();let s=!1,a,o,u=0,c=!1;for(let l=0;l<2;l++){for(let h=u;h<n.length;h++){const p=n[h](),f=p.testClosure();if(!c&&f===Ps&&(c=!0,u=h),s||f===i){if(s=!0,o=this.setValue(p.bodyClosure()),o===ue)continue;if(o===yt||(a=o,a instanceof Ne||a instanceof ut||a instanceof Xe||a===bt))break}}if(!s&&c)s=!0;else break}return a}}switchCaseHandler(e){const r=e.test?this.createClosure(e.test):()=>Ps,n=this.createClosure({type:"BlockStatement",body:e.consequent});return()=>({testClosure:r,bodyClosure:n})}labeledStatementHandler(e){const r=e.label.name,n=this.createClosure(e.body);return()=>{let i;const s=this.getCurrentScope();return s.labelStack.push(r),i=n(e),i instanceof ut&&i.value===r&&(i=ue),s.labelStack.pop(),i}}debuggerStatementHandler(e){return()=>{debugger;return ue}}createParamNameGetter(e){if(e.type==="Identifier")return()=>e.name;throw this.createInternalThrowError(he.ParamTypeSyntaxError,e.type,e)}createObjectKeyGetter(e){let r;return e.type==="Identifier"?r=()=>e.name:r=this.createClosure(e),function(){return r()}}createMemberKeyGetter(e){return e.computed?this.createClosure(e.property):this.createObjectKeyGetter(e.property)}createObjectGetter(e){switch(e.type){case"Identifier":return()=>this.getScopeDataFromName(e.name,this.getCurrentScope());case"MemberExpression":return this.createClosure(e.object);default:throw this.createInternalThrowError(he.AssignmentTypeSyntaxError,e.type,e)}}createNameGetter(e){switch(e.type){case"Identifier":return()=>e.name;case"MemberExpression":return this.createMemberKeyGetter(e);default:throw this.createInternalThrowError(he.AssignmentTypeSyntaxError,e.type,e)}}varDeclaration(e){const r=this.collectDeclVars;r[e]=void 0}funcDeclaration(e,r){const n=this.collectDeclFuncs;n[e]=r}addDeclarationsToScope(e,r,n){const i=n.data;for(let s in r){const a=r[s];i[s]=a&&a()}for(let s in e)s in i||(i[s]=void 0)}getScopeValue(e,r){return this.getScopeFromName(e,r).data[e]}getScopeDataFromName(e,r){return this.getScopeFromName(e,r).data}getScopeFromName(e,r){let n=r;do if(e in n.data)return n;while(n=n.parent);return this.globalScope}setValue(e){const r=this.callStack.length;return this.isVarDeclMode||r||e===ue||e===yt||e===bt||e instanceof ut||e instanceof Xe||(this.value=e instanceof Ne?e.value:e),e}getValue(){return this.value}};Ze.version=Jv;Ze.eval=hi;Ze.Function=pi;Ze.ecmaVersion=5;Ze.globalContextInFunction=void 0;Ze.global=Object.create(null);const ey=(()=>{try{return new Function("return 1")(),!0}catch(t){return!1}})();function Nn(t){if(typeof globalThis>"u")return;const e=globalThis[0]||globalThis;if(e.__simulator__)try{const r=e.__simulator__.engine.provider.errorHandler;r&&r(t)}catch(r){}}function ty(t,e){return new Ze(e,{rootContext:e,globalContextInFunction:e}).evaluate(`(function($scope){ ${t} }).call(this, this)`)}function Xt(t,e,r=!1,n=!1,i=!1){var s;try{const a=['"use strict";',"var __self = arguments[0];"];a.push("return ");let o=(t.value||"").trim();i||(o=o.replace(/this(\W|$)/g,(c,l)=>`__self${l}`)),o=a.join(`
73
73
  `)+o;const u=i?`
74
74
  ${o}
75
- `:`with(${r?"{}":"$scope || {}"}) { ${o} }`;return ey?new Function("$scope",u)(e):ty(u,e)}catch(a){if(Ct.error("parseExpression.error",a,t,(s=e==null?void 0:e.__self)!=null?s:e),Nn(a),n)throw a}}function Te(t,e,r=!1,n=!1,i=!1){var a;const s=Xt(t,e,r,n,i);if(typeof s!="function"&&(Ct.error("parseFunction.error","not a function",t,(a=e==null?void 0:e.__self)!=null?a:e),n))throw new Error(`"${t.value}" not a function`);return s}function le(t){return t&&t.type==="JSExpression"}function ye(t){return typeof t=="object"&&t&&t.type==="JSFunction"}const ry={session:!1,authKey:"Authorization",storageKey:"ACCESS_STORAGE",storagePrefix:"__VTJ_",unauthorized:void 0,auth:"/#/login",redirectParam:"r",unauthorizedCode:401,unauthorizedMessage:"登录已经失效,请重新登录!",noPermissionMessage:"无权限访问该页面",appName:"",statusKey:"code"},ny=Symbol("access");class Ho{constructor(e){H(this,"options");H(this,"data",null);H(this,"mode",ne.Raw);H(this,"interceptResponse",!0);H(this,"isTipShowing",!1);this.options=Object.assign({},ry,e),this.loadData()}enableIntercept(){this.interceptResponse=!0}disableIntercept(){this.interceptResponse=!1}connect(e){const{mode:r,router:n,request:i}=e;this.mode=r,n&&this.mode!==ne.Design&&this.setGuard(n),i&&this.setRequest(i)}login(e){const{storageKey:r,storagePrefix:n,session:i,authKey:s}=this.options;this.setData(e),this.data&&(tn.save(r,e,{type:"local",prefix:n}),i&&nn.set(s,this.data.token))}clear(){const{storageKey:e,storagePrefix:r,session:n,authKey:i}=this.options;this.data=null,tn.remove(e,{type:"local",prefix:r}),n&&nn.remove(i)}logout(){this.clear(),this.toLogin()}getData(){return this.data?this.data:(this.loadData(),this.data)}getToken(){var e;return this.data||this.loadData(),(e=this.data)==null?void 0:e.token}can(e){const{appName:r}=this.options,{permissions:n={}}=this.data||{};if(typeof e=="function")return e(n);const i=xs(e);return Array.isArray(n)?i.every(s=>n.includes(s)||n.includes(r+"."+s)):i.every(s=>n[s]||n[r+"."+s])}some(e){const{appName:r}=this.options,{permissions:n={}}=this.data||{},i=xs(e);return Array.isArray(n)?i.some(s=>n.includes(s)||n.includes(r+"."+s)):i.some(s=>n[s]||n[r+"."+s])}install(e){e.config.globalProperties.$access=this,e.provide(ny,this)}isAuthPath(e){const{auth:r,isAuth:n}=this.options;if(n)return n(e);if(e.path&&typeof r=="string"){const i=r.split("#")[1]||r;return e.path===i}return!1}toLogin(){const{auth:e,redirectParam:r}=this.options;if(!e)return;const n=r?`?${r}=${encodeURIComponent(location.href)}`:"";typeof e=="function"?e(n):location.href=r?`${e}${n}`:e}setData(e){const{privateKey:r}=this.options;if(Array.isArray(e)&&r){const n=e.map(i=>_s(i,r));try{this.data=JSON.parse(n.join(""))}catch(i){console.warn(i)}return}if(typeof e=="string")try{const n=r?_s(e,r):e;n?this.data=JSON.parse(n):console.warn("RSA解密失败或登录信息缺失")}catch(n){console.warn(n)}else this.data=e}loadData(){const{storageKey:e,storagePrefix:r}=this.options,n=tn.get(e,{type:"local",prefix:r});this.setData(n||null)}isLogined(){const{session:e,authKey:r}=this.options;return e&&r?!!nn.get(r):!!this.getToken()}hasRoutePermission(e){if(e.name===br){const r=e.params.id;return r&&this.can(r)}return e.meta.__vtj__?this.can(e.meta.__vtj__):e.meta.permission?this.can(e.meta.permission):!0}setGuard(e){e.beforeEach((r,n,i)=>this.guard(r,i))}guard(e,r){return j(this,null,function*(){if(this.isWhiteList(e)||this.isAuthPath(e))return r();if(this.isLogined()){if(this.hasRoutePermission(e))return r();{const{noPermissionMessage:n="无权限访问",unauthorized:i=!1}=this.options;return yield this.showTip(n),ve(i)?(i(),r(!1)):Ke(i)?r(i):r(!1)}}r(!1),yield Kt(0),this.toLogin()})}isWhiteList(e){const{whiteList:r}=this.options;return r?Array.isArray(r)?r.some(n=>e.fullPath.startsWith(n)):r(e):!1}isUnauthorized(e){var i;const{unauthorizedCode:r=401,statusKey:n="code"}=this.options;return e.status===r||((i=e.data)==null?void 0:i[n])===r}showUnauthorizedAlert(e){return j(this,null,function*(){const{unauthorizedMessage:r="登录已失效"}=this.options;this.isUnauthorized(e)&&(yield this.showTip(r))&&this.toLogin()})}showTip(e){return j(this,null,function*(){var n,i,s,a;const{alert:r}=this.options;return this.isTipShowing?!1:r?(this.isTipShowing=!0,yield Kt(150),yield(i=(n=r(e,{title:"提示",type:"warning"}))==null?void 0:n.catch(()=>!0))==null?void 0:i.finally(()=>{this.isTipShowing=!1})):((a=(s=globalThis.alert)==null?void 0:s.call(globalThis,e))!=null||console.warn(e),!0)})}setRequest(e){e.useRequest(r=>{var n,i;return(n=this.data)!=null&&n.token&&(r.headers[this.options.authKey]=(i=this.data)==null?void 0:i.token),r}),e.useResponse(r=>j(this,null,function*(){return this.interceptResponse&&(yield this.showUnauthorizedAlert(r)),r}),r=>j(this,null,function*(){if(!this.interceptResponse)return Promise.reject(r);const n=r.response||r||{};return yield this.showUnauthorizedAlert(n),Promise.reject(r)}))}}function iy(t={}){const{notify:e,loading:r,settings:n={},Startup:i,access:s,useTitle:a,alert:o}=t;let u=null;return{request:Xn({adapter:t.axiosAdapter,settings:U({type:"form",validSuccess:!1,originResponse:!0,loading:!0,validate:c=>{var l,h;return((l=c.data)==null?void 0:l.code)===0||!!((h=c.data)!=null&&h.success)},failMessage:!0,showError:c=>{e&&e(c||"未知错误")},showLoading:()=>{u&&u.close(),r&&(u=r())},hideLoading:()=>{u&&(u.close(),u=null)}},n)}),jsonp:oo,notify:e,loading:r,useTitle:a,alert:o,startupComponent:i,access:s?new Ho(U({alert:o},s)):void 0}}function sy(t,e){const{jsonp:r,request:n}=e;if(t.method==="jsonp")return(i={})=>r(t.url,ce(U({},t.jsonpOptions),{query:i}));{const i=t.headers?Xt(t.headers,{},!0):void 0,s={url:t.url,method:t.method,settings:ce(U({},t.settings),{headers:i})};return(a,o)=>(delete s.data,n.send(Bt(s,o||{},{data:a})))}}function ay(t,e){const{metaQuery:r}=e;if(!r)return;const{code:n,queryCode:i}=t;return(s,a)=>{if(!r){console.warn("adapter.metaQuery is not defined!");return}return r(n,i,s,a)}}function oy(t=[],e=[],r){const n={};for(const i of t){const s=sy(i,r);n[i.id]=s,n[i.name]=s}for(const i of e)n[i.id]=ay(i,r);return n}function cy(){return j(this,arguments,function*(t=[],e=globalThis){const r=Yt(e);r&&(qo(e),t.forEach(n=>ly(r,n)))})}function uy(t,e=globalThis){const r=ye(t.mockTemplate)&&t.mockTemplate.value?Te(t.mockTemplate,{},!0):void 0,n=Yt(e);return(...i)=>j(null,null,function*(){let s={};if(r)try{s=yield r.apply(r,i)}catch(a){Ct.warn("模拟数据模版异常",a)}return n==null?void 0:n.mock(s)})}function ly(t,e){if(!e.mock)return;const{url:r,mockTemplate:n,method:i="get",settings:s={}}=e;if(r&&n)try{const a=Gt(r)?new URL(r).pathname:r,o=Qn(`(.*)${a}`,[],{end:!1}),u=new RegExp(o.source+"([?#].*)?$",o.flags),c=dm(a,{decode:decodeURIComponent}),l=Xt(n,{},!0);t.mock(u,i.toLowerCase(),h=>{var w;const p=Ft.parse(h.url)||{},f=s.type||"form";let g=h.body instanceof FormData?$m(h.body):h.body;if(typeof g=="string")if(f==="json")try{g=JSON.parse(g)}catch(y){console.warn("[Mock.mock]",y)}else g=Ft.parse(g);const m=Gt(h.url)?new URL(h.url).pathname:h.url.split("?")[0],v=(w=c(m))==null?void 0:w.params;Object.assign(h,{data:g,params:v,query:p});try{return t.mock(l(h))}catch(y){return console.warn("[mockApi]",u,h,y),null}})}catch(a){console.warn("mockApi",a)}}function qo(t=globalThis){const e=Yt(t);e&&(e._mocked={})}class hy{constructor(e){H(this,"__id",null);H(this,"__mode");H(this,"__instance",null);H(this,"__contextRefs",{});H(this,"__refs",{});H(this,"__refCaches",{});H(this,"context",{});H(this,"state",{});H(this,"props",{});H(this,"$props",{});H(this,"$state",{});H(this,"$refs",{});H(this,"$el",null);H(this,"$emit",null);H(this,"$nextTick",null);H(this,"$parent",null);H(this,"$root",null);H(this,"$attrs",null);H(this,"$slots",null);H(this,"$watch",null);H(this,"$options",null);H(this,"$forceUpdate",null);H(this,"$components",{});H(this,"$libs",{});H(this,"$apis",{});H(this,"$provider",null);H(this,"$uni",null);H(this,"$getApp",null);H(this,"__transform",{});const{mode:r,dsl:n,attrs:i}=e;this.__mode=r,n&&(this.__id=n.id||null,this.__transform=n.transform||{}),i&&Object.assign(this,i)}setup(e,r=Cr){var a,o,u,c;const n=r.getCurrentInstance();if(!n)return;this.__refs={},this.__refCaches={},this.$refs={},this.context={},this.__contextRefs={},this.__instance=n.proxy;const{state:i}=this,s=n.appContext.config.globalProperties;Object.assign(this,s,e||{}),this.$uni=(o=(a=this.$libs.UniH5)==null?void 0:a.uni)!=null?o:null,this.$getApp=(c=(u=this.$libs.UniH5)==null?void 0:u.getApp)!=null?c:null,this.$state=this.state=i,this.__proxy(),r.onMounted(()=>{this.__proxy()}),r.onUnmounted(()=>{this.__cleanup()}),r.onBeforeUpdate(()=>{if(this.__proxy(),this.$props)for(const l of Object.keys(this.$props))this[l]=this.$props[l];this.__reset()})}__proxy(){if(!this.__instance)return;const e=this.__instance;As.forEach(r=>{var n;this[r]=e[r]||((n=e._)==null?void 0:n[r.replace("$","")])||null})}__cleanup(){As.forEach(e=>{this[e]=null}),this.__reset()}__reset(){this.__refs={},this.__refCaches={},this.$refs={},this.__contextRefs={},this.context={}}__parseFunction(e){var r;if(e)if(this.__mode===ne.Runtime){const{id:n,type:i}=e,s=n&&(r=this.__transform[n])!=null?r:e.value;return Te({type:i,value:s},this)}else return Te(e,this)}__parseExpression(e){var r;if(e)if(this.__mode===ne.Runtime){const{id:n,type:i}=e,s=n&&(r=this.__transform[n])!=null?r:e.value;return Xt({type:i,value:s},this)}else return Xt(e,this)}__ref(e=null,r){if(this.__mode===ne.VNode)return;e&&e!==this.__id&&(this.__contextRefs[e]=this);let n=e?this.__refCaches[e]:null;return n||(n=i=>j(this,null,function*(){var a,o;yield Kt(0);let s=(i==null?void 0:i.$vtjEl)||(i==null?void 0:i.$el)||((o=(a=i==null?void 0:i._)==null?void 0:a.vnode)==null?void 0:o.el)||i;if(!s){typeof r=="string"&&(delete this.$refs[r],this[r]&&mi(this[r])&&(this[r].value=null),e&&delete this.__refs[e]);return}return s.nodeType===3&&s.nextSibling&&(s=s.nextSibling),s.__vtj__=e,ne.Design===this.__mode&&(s.__context__=this,s.draggable=!0),e&&(this.__refs[e]=this.__getRefEl(this.__refs,e,i)),typeof r=="function"?r(i):r&&(this.$refs[r]=this.__getRefEl(this.$refs,r,i),this[r]&&mi(this[r])&&(this[r].value=this.$refs[r])),i}),e&&(this.__refCaches[e]=n),n)}__getRefEl(e,r,n){const i=e[r];if(i&&n!==i){const s=new Set([].concat(i,n));return Array.from(s)}else return n}__clone(e={}){const r=U(U({},this.context),e),n=ce(U({},r),{context:r});return n.context.__proto__=this.context,n.__proto__=this,n}}function $n(t){var p,g;const{Vue:e=Cr,UniApp:r={},mode:n=ne.Runtime,components:i={},libs:s={},apis:a={},loader:o}=t,u=e.computed(()=>t.dsl),c={$components:i,$libs:s,$apis:a},l=new hy({mode:n,dsl:u.value,attrs:c}),h=e.defineComponent(U({name:u.value.name,__scopeId:u.value.id?`data-v-${u.value.id}`:void 0,props:U({},fy((p=u.value.props)!=null?p:[],l)),setup(){return j(this,arguments,function*(m={}){var V,E,C,L,P,B,I,D,F;l.$props=l.props=m,u.value.id&&Dr(t.window||globalThis,u.value.id,u.value.css||"",!0);const v=u.value.apiMode==="composition";l.$state=l.state=dy(e,(V=u.value.state)!=null?V:{},l);const w=v?_y(e,(E=u.value.refs)!=null?E:{},l):{},y=v?xy(e,(C=u.value.reactives)!=null?C:{},l):{},_=gy(e,(L=u.value.computed)!=null?L:{},l),x=my((P=u.value.methods)!=null?P:{},l),S=vy(e,u.value.inject,l),b=yy(u.value.dataSources||{},l);let T={};v&&(T=wy((B=u.value.composables)!=null?B:[],l));const A=U(U(U(U(U(U(U(U({},m),w),y),S),_),x),b),T);if(l.setup(A,e),by(e,(I=u.value.watch)!=null?I:[],l),v){if(yield Ey(e,(D=u.value.lifeCycles)!=null?D:{},l,r),u.value.setup){const M=l.__parseFunction(u.value.setup);if(ve(M))try{yield M()}catch(q){console.warn("[VTJ] Composition setup 执行失败",q)}}Sy(e,(F=u.value.provide)!=null?F:{},l)}return U(U(U(U(U({vtj:l,state:l.state,$state:l.$state},m),w),y),_),x)})},emits:py(u.value.emits),expose:["vtj",...u.value.expose||[]],render(){const m=u.value;if(m.refs)for(const w of Object.keys(m.refs))this[w];if(m.reactives)for(const w of Object.keys(m.reactives)){const y=this[w];if(y&&typeof y=="object")for(const _ of Object.keys(y))y[_]}if(m.state){const w=this.state;for(const y of Object.keys(m.state))w[y]}if(m.computed)for(const w of Object.keys(m.computed))this[w];if(m.inject)for(const w of m.inject)this[w.name];if(!m.nodes)return null;const v=m.nodes||[];if(v.length===1)return Rt(v[0],l,e,o,v);{const w=v.map(y=>Rt(y,l,e,o,v)).flat();return e.createVNode("div",{},w)}}},u.value.apiMode!=="composition"?Ty((g=u.value.lifeCycles)!=null?g:{},l):{}));return{renderer:e.markRaw(h),context:l}}function py(t=[]){return t.map(e=>Ke(e)?e:e.name)}function fy(t=[],e){const r=n=>n?(Array.isArray(n)?n:[n]).map(i=>rv[i]):void 0;return t.map(n=>Ke(n)?{name:n}:{name:n.name,type:n.type,required:n.required,default:le(n.default)?e.__parseExpression(n.default):n.default}).reduce((n,i)=>(n[i.name]={type:r(i.type),required:i.required,default:i.default},n),{})}function dy(t,e,r){return t.reactive(Object.keys(e||{}).reduce((n,i)=>{let s=e[i];return le(s)?s=r.__parseExpression(s):ye(s)&&(s=r.__parseFunction(s)),n[i]=s,n},{}))}function gy(t,e,r){return Object.entries(e!=null?e:{}).reduce((n,[i,s])=>(ye(s)?n[i]=t.computed(r.__parseFunction(s)):n[i]=t.computed(r.__parseExpression(s)),n),{})}function my(t,e){return Object.entries(t!=null?t:{}).reduce((r,[n,i])=>(r[n]=e.__parseFunction(i),r),{})}function vy(t,e=[],r){return e.reduce((n,i)=>{var c;const{name:s,from:a}=i||{},o=le(a)?r.__parseExpression(a)||s:a!=null?a:s,u=le(i.default)?r.__parseExpression(i.default):(c=i.default)!=null?c:null;return n[s]=t.inject(o,u),n},{})}function yy(t,e){return Object.keys(t).reduce((r,n)=>{const i=t[n];if(i.type==="mock")r[n]=uy(i);else if(i.ref){const s=e.$apis[i.ref],a=ye(i.transform)?i.transform.value?e.__parseFunction(i.transform):void 0:i.transform;r[n]=(...o)=>j(null,null,function*(){const u=yield s.apply(e,o);return a?a(u):u})}return r},{})}function by(t,e=[],r){e.forEach(n=>{t.watch(r.__parseExpression(n.source),r.__parseFunction(n.handler),{deep:n.deep,immediate:n.immediate,flush:n.flush})})}function _y(t,e,r){return Object.entries(e).reduce((n,[i,s])=>{const a=le(s)?r.__parseExpression(s):s;return n[i]=t.ref(a),n},{})}function xy(t,e,r){return Object.entries(e).reduce((n,[i,s])=>{const a=le(s)?r.__parseExpression(s):s;return n[i]=t.reactive(a!=null?a:{}),n},{})}function wy(t,e){return t.reduce((r,n)=>{try{let i;if(le(n.composable)?i=e.__parseExpression(n.composable):Ke(n.composable)&&(i=e.$libs[n.composable]),ve(i)){const s=(n.args||[]).map(o=>le(o)?e.__parseExpression(o):o),a=i(...s);if(n.destructure&&n.destructure.length>0)for(const o of n.destructure)r[o]=a==null?void 0:a[o];else r[n.name]=a}}catch(i){e.__mode===ne.Design&&(console.warn("[VTJ] composable 执行失败,已降级处理",i),r[n.name]={})}return r},{})}function Sy(t,e,r){Object.entries(e).forEach(([n,i])=>{let s=i;le(i)?s=r.__parseExpression(i):ye(i)&&(s=r.__parseFunction(i)),t.provide(n,s)})}function Ey(i,s,a){return j(this,arguments,function*(t,e,r,n={}){const o={beforeMount:"onBeforeMount",mounted:"onMounted",beforeUpdate:"onBeforeUpdate",updated:"onUpdated",beforeUnmount:"onBeforeUnmount",unmounted:"onUnmounted",errorCaptured:"onErrorCaptured",renderTracked:"onRenderTracked",renderTriggered:"onRenderTriggered",activated:"onActivated",deactivated:"onDeactivated"};for(const[u,c]of Object.entries(e)){if(u==="created"||u==="beforeCreate"){const p=r.__parseFunction(c);if(ve(p))try{yield p()}catch(f){console.warn(`[VTJ] Composition 生命周期 "${u}" 执行失败`,f),Nn(f)}continue}const l=o[u]||u,h=t[l]||n[l];if(h&&ve(h)){const p=r.__parseFunction(c);ve(p)&&h(()=>j(null,null,function*(){try{yield Kt(0),yield p()}catch(f){console.warn(`[VTJ] Composition 生命周期 "${u}" 执行失败`,f),Nn(f)}}))}else console.warn(`[VTJ] 无效的 Composition 生命周期钩子 "${u}"`)}})}function Ty(t,e){return Object.entries(t!=null?t:{}).reduce((r,[n,i])=>{const s=e.__parseFunction(i);return r[n]=()=>j(null,null,function*(){ve(s)&&(yield Kt(0),yield s())}),r},{})}class Cy{constructor(){H(this,"__props",{});H(this,"__events",{});H(this,"__nodes",{})}setProps(e,r){this.__props[e]=r}getProps(e){return this.__props[e]}loadProps(e,r){return(e?this.getProps(e):null)||(e&&this.setProps(e,r),r)}setEvents(e,r){}getEvents(e){return this.__events[e]}loadEvents(e,r){return(e?this.getEvents(e):null)||(e&&this.setEvents(e,r),r)}setNode(e,r){this.__nodes[e]=r}getNode(e){return this.__nodes[e]}loadNode(e,r){return(e?this.getNode(e):null)||(e&&this.setNode(e,r),r)}isEqual(e,r){return zr(e,r)}isNodeEqual(e,r){if(e===r)return!0;if(!e||!r)return!1;const n=o=>!o||typeof o!="object"?[]:Object.keys(o).filter(u=>ve(o[u])),i=o=>{if(!o||typeof o!="object")return o;const u={};for(const c in o)if(Object.prototype.hasOwnProperty.call(o,c)){const l=o[c];ve(l)||(u[c]=l)}return u},s=n(e).sort(),a=n(r).sort();return zr(s,a)?zr(i(e),i(r)):!1}clear(){this.__props={},this.__events={},this.__nodes={}}}const dr=new Cy,Ay=new wm;let ln=[],_t={},gr={};const Ry=(t,e)=>e;function zo(r){return j(this,arguments,function*(t,e=globalThis){const{urls:n=[],library:i}=t,s=n.filter(o=>Pr(o));if(s.length===0||!i)return null;const a=n.filter(o=>Or(o));return a.length&&lo(a,e),yield ho(s,i,e).catch(o=>(console.warn("loadScriptUrl error",s,i,o),null))})}function Bn(t){const{getDsl:e,getDslByUrl:r,options:n}=t;return n.window&&(ln.forEach(i=>{delete n.window[i]}),ln=[]),(i,s,a,o=Cr)=>{if(!a||typeof a=="string")return s;let u="";if(a.type==="Schema"&&a.id)return u=a.id+"_"+i,gr[u]||(gr[u]=o.defineAsyncComponent(()=>j(null,null,function*(){const c=_t[a.id]||(yield Ay.add(a.id,()=>e(a.id)));return c&&(c.name=s,_t[a.id]=c),c?$n(ce(U({Vue:o,mode:ne.Runtime},n),{dsl:Yi(c),loader:Bn(t)})).renderer:null})));if(a.type==="UrlSchema"&&a.url)return u=a.url+"_"+i,gr[u]||(gr[u]=o.defineAsyncComponent(()=>j(null,null,function*(){const c=_t[a.url]||(yield r(a.url));return c&&(c.name=s,_t[a.url]=c),c?$n(ce(U({},n),{Vue:o,dsl:Yi(c),mode:ne.Runtime,loader:Bn(t)})).renderer:null})));if(a.type==="Plugin"){let c=a.library?_t[a.library]:null;return c||(a.library&&ln.push(a.library),c=_t[a.library||Symbol()]=o.defineAsyncComponent(()=>j(null,null,function*(){return(yield zo(a,n.window))||(console.warn("getPlugin result is null",a),null)})),c)}return s}}function Rt(t,e,r=Cr,n=Ry,i=[],s=!1,a=0){var x;if(!t||!t.name||t.invisible)return null;const o=(x=r.getCurrentInstance())==null?void 0:x.appContext,{id:u=null,directives:c=[]}=t,{vIf:l,vElseIf:h,vElse:p,vFor:f,vShow:g,vModels:m,vBind:v,vHtml:w,others:y}=Wo(c);if(!s&&(h||p))return null;if(l&&!ky(l,e))return By(t,e,r,n,i);const _=(S,b=0)=>{var q,z,R,N;const T=S.$components,A=(()=>{var $,pe,Fe,De;if(t.name==="component")return Oy(S,($=t.props)==null?void 0:$.is);if(t.name==="slot")return t.name;const k=n(`${t.id}_${b}`,t.name,t.from,r);return Ke(k)?gv(k)||mv(k)?k:(De=(Fe=T[k])!=null?Fe:(pe=o==null?void 0:o.app)==null?void 0:pe.component(k))!=null?De:k:k})(),V=Py(u,(q=t.props)!=null?q:{},S),E=$y(r,t.id,(z=t.events)!=null?z:{},S);if(t.name==="slot")return Ly(r,t,V,S,n);v&&Object.assign(V,S.__parseExpression(v.value)),g&&(V.style=Object.assign((R=V.style)!=null?R:{},My(g,S))),w&&Object.assign(V,jy(w,S)),m.forEach(k=>{co.includes(t.name)?Object.assign(V,Fy(k,S)):Object.assign(V,Uy(r,k,S))});const C=Hy(r,(N=t.children)!=null?N:[],S,n,t),L=S!=null&&S.__id?`data-v-${S.__id}`:void 0,P=L?{[L]:""}:{},B=S.__mode===ne.Design?{"data-vtj":u}:{},I=`${u}_${b}`,D=U(U(U({key:I},P),B),V);dr.isNodeEqual(D,dr.getNode(I))||dr.setNode(I,D);let F=r.createVNode(A,U(U({},dr.getNode(I)||D),E),C);const M=o?Iy(o,y,S):[];return M.length&&(F=r.withDirectives(F,M)),F};return f?Wy(f,_,e):_(e,a)}function Iy(t,e,r){const n=t.app;return e.map(i=>{const s=typeof i.name=="string"?n.directive(i.name):r.__parseExpression(i.name);if(!s)return null;const a=[s];return i.value&&a.push(r.__parseExpression(i.value)),i.arg&&a.push(i.arg),i.modifiers&&a.push(i.modifiers),a}).filter(i=>!!i)}function Wo(t=[]){const e=t.find(l=>$e(l.name)==="vIf"),r=t.find(l=>$e(l.name)==="vElseIf"),n=t.find(l=>$e(l.name)==="vElse"),i=t.find(l=>$e(l.name)==="vFor"),s=t.find(l=>$e(l.name)==="vShow"),a=t.find(l=>$e(l.name)==="vBind"),o=t.find(l=>$e(l.name)==="vHtml"),u=t.filter(l=>$e(l.name)==="vModel"),c=t.filter(l=>!tv.includes($e(l.name)));return{vIf:e,vElseIf:r,vElse:n,vFor:i,vShow:s,vModels:u,vBind:a,others:c,vHtml:o}}function ky(t,e){return!!e.__parseExpression(t.value)}function Oy(t,e){return e?le(e)?t.__parseExpression(e):e:"div"}function Py(t,e,r){const n=Ln(e,r);return n.ref=r.__ref(t,n.ref),n}function Ln(t,e){return le(t)?e.__parseExpression(t):ye(t)?e.__parseFunction(t):Array.isArray(t)?t.map(r=>Ln(r,e)):typeof t=="object"?Object.keys(t||{}).reduce((r,n)=>{let i=t[n];return r[n]=Ln(i,e),r},{}):t}function Dy(t,e){return r=>{var n;((n=r==null?void 0:r.key)==null?void 0:n.toLowerCase())===e.toLowerCase()&&t(r)}}function Ny(t){return vv(t.value)?t:yv(t.value)?{type:"JSFunction",value:`(...args) => (() => {
75
+ `:`with(${r?"{}":"$scope || {}"}) { ${o} }`;return ey?new Function("$scope",u)(e):ty(u,e)}catch(a){if(Ct.error("parseExpression.error",a,t,(s=e==null?void 0:e.__self)!=null?s:e),a&&(a.info=t.value),Nn(a),n)throw a}}function Te(t,e,r=!1,n=!1,i=!1){var a;const s=Xt(t,e,r,n,i);if(typeof s!="function"&&(Ct.error("parseFunction.error","not a function",t,(a=e==null?void 0:e.__self)!=null?a:e),n))throw new Error(`"${t.value}" not a function`);return s}function le(t){return t&&t.type==="JSExpression"}function ye(t){return typeof t=="object"&&t&&t.type==="JSFunction"}const ry={session:!1,authKey:"Authorization",storageKey:"ACCESS_STORAGE",storagePrefix:"__VTJ_",unauthorized:void 0,auth:"/#/login",redirectParam:"r",unauthorizedCode:401,unauthorizedMessage:"登录已经失效,请重新登录!",noPermissionMessage:"无权限访问该页面",appName:"",statusKey:"code"},ny=Symbol("access");class Ho{constructor(e){H(this,"options");H(this,"data",null);H(this,"mode",ne.Raw);H(this,"interceptResponse",!0);H(this,"isTipShowing",!1);this.options=Object.assign({},ry,e),this.loadData()}enableIntercept(){this.interceptResponse=!0}disableIntercept(){this.interceptResponse=!1}connect(e){const{mode:r,router:n,request:i}=e;this.mode=r,n&&this.mode!==ne.Design&&this.setGuard(n),i&&this.setRequest(i)}login(e){const{storageKey:r,storagePrefix:n,session:i,authKey:s}=this.options;this.setData(e),this.data&&(tn.save(r,e,{type:"local",prefix:n}),i&&nn.set(s,this.data.token))}clear(){const{storageKey:e,storagePrefix:r,session:n,authKey:i}=this.options;this.data=null,tn.remove(e,{type:"local",prefix:r}),n&&nn.remove(i)}logout(){this.clear(),this.toLogin()}getData(){return this.data?this.data:(this.loadData(),this.data)}getToken(){var e;return this.data||this.loadData(),(e=this.data)==null?void 0:e.token}can(e){const{appName:r}=this.options,{permissions:n={}}=this.data||{};if(typeof e=="function")return e(n);const i=xs(e);return Array.isArray(n)?i.every(s=>n.includes(s)||n.includes(r+"."+s)):i.every(s=>n[s]||n[r+"."+s])}some(e){const{appName:r}=this.options,{permissions:n={}}=this.data||{},i=xs(e);return Array.isArray(n)?i.some(s=>n.includes(s)||n.includes(r+"."+s)):i.some(s=>n[s]||n[r+"."+s])}install(e){e.config.globalProperties.$access=this,e.provide(ny,this)}isAuthPath(e){const{auth:r,isAuth:n}=this.options;if(n)return n(e);if(e.path&&typeof r=="string"){const i=r.split("#")[1]||r;return e.path===i}return!1}toLogin(){const{auth:e,redirectParam:r}=this.options;if(!e)return;const n=r?`?${r}=${encodeURIComponent(location.href)}`:"";typeof e=="function"?e(n):location.href=r?`${e}${n}`:e}setData(e){const{privateKey:r}=this.options;if(Array.isArray(e)&&r){const n=e.map(i=>_s(i,r));try{this.data=JSON.parse(n.join(""))}catch(i){console.warn(i)}return}if(typeof e=="string")try{const n=r?_s(e,r):e;n?this.data=JSON.parse(n):console.warn("RSA解密失败或登录信息缺失")}catch(n){console.warn(n)}else this.data=e}loadData(){const{storageKey:e,storagePrefix:r}=this.options,n=tn.get(e,{type:"local",prefix:r});this.setData(n||null)}isLogined(){const{session:e,authKey:r}=this.options;return e&&r?!!nn.get(r):!!this.getToken()}hasRoutePermission(e){if(e.name===br){const r=e.params.id;return r&&this.can(r)}return e.meta.__vtj__?this.can(e.meta.__vtj__):e.meta.permission?this.can(e.meta.permission):!0}setGuard(e){e.beforeEach((r,n,i)=>this.guard(r,i))}guard(e,r){return j(this,null,function*(){if(this.isWhiteList(e)||this.isAuthPath(e))return r();if(this.isLogined()){if(this.hasRoutePermission(e))return r();{const{noPermissionMessage:n="无权限访问",unauthorized:i=!1}=this.options;return yield this.showTip(n),ve(i)?(i(),r(!1)):Ke(i)?r(i):r(!1)}}r(!1),yield Kt(0),this.toLogin()})}isWhiteList(e){const{whiteList:r}=this.options;return r?Array.isArray(r)?r.some(n=>e.fullPath.startsWith(n)):r(e):!1}isUnauthorized(e){var i;const{unauthorizedCode:r=401,statusKey:n="code"}=this.options;return e.status===r||((i=e.data)==null?void 0:i[n])===r}showUnauthorizedAlert(e){return j(this,null,function*(){const{unauthorizedMessage:r="登录已失效"}=this.options;this.isUnauthorized(e)&&(yield this.showTip(r))&&this.toLogin()})}showTip(e){return j(this,null,function*(){var n,i,s,a;const{alert:r}=this.options;return this.isTipShowing?!1:r?(this.isTipShowing=!0,yield Kt(150),yield(i=(n=r(e,{title:"提示",type:"warning"}))==null?void 0:n.catch(()=>!0))==null?void 0:i.finally(()=>{this.isTipShowing=!1})):((a=(s=globalThis.alert)==null?void 0:s.call(globalThis,e))!=null||console.warn(e),!0)})}setRequest(e){e.useRequest(r=>{var n,i;return(n=this.data)!=null&&n.token&&(r.headers[this.options.authKey]=(i=this.data)==null?void 0:i.token),r}),e.useResponse(r=>j(this,null,function*(){return this.interceptResponse&&(yield this.showUnauthorizedAlert(r)),r}),r=>j(this,null,function*(){if(!this.interceptResponse)return Promise.reject(r);const n=r.response||r||{};return yield this.showUnauthorizedAlert(n),Promise.reject(r)}))}}function iy(t={}){const{notify:e,loading:r,settings:n={},Startup:i,access:s,useTitle:a,alert:o}=t;let u=null;return{request:Xn({adapter:t.axiosAdapter,settings:U({type:"form",validSuccess:!1,originResponse:!0,loading:!0,validate:c=>{var l,h;return((l=c.data)==null?void 0:l.code)===0||!!((h=c.data)!=null&&h.success)},failMessage:!0,showError:c=>{e&&e(c||"未知错误")},showLoading:()=>{u&&u.close(),r&&(u=r())},hideLoading:()=>{u&&(u.close(),u=null)}},n)}),jsonp:oo,notify:e,loading:r,useTitle:a,alert:o,startupComponent:i,access:s?new Ho(U({alert:o},s)):void 0}}function sy(t,e){const{jsonp:r,request:n}=e;if(t.method==="jsonp")return(i={})=>r(t.url,ce(U({},t.jsonpOptions),{query:i}));{const i=t.headers?Xt(t.headers,{},!0):void 0,s={url:t.url,method:t.method,settings:ce(U({},t.settings),{headers:i})};return(a,o)=>(delete s.data,n.send(Bt(s,o||{},{data:a})))}}function ay(t,e){const{metaQuery:r}=e;if(!r)return;const{code:n,queryCode:i}=t;return(s,a)=>{if(!r){console.warn("adapter.metaQuery is not defined!");return}return r(n,i,s,a)}}function oy(t=[],e=[],r){const n={};for(const i of t){const s=sy(i,r);n[i.id]=s,n[i.name]=s}for(const i of e)n[i.id]=ay(i,r);return n}function cy(){return j(this,arguments,function*(t=[],e=globalThis){const r=Yt(e);r&&(qo(e),t.forEach(n=>ly(r,n)))})}function uy(t,e=globalThis){const r=ye(t.mockTemplate)&&t.mockTemplate.value?Te(t.mockTemplate,{},!0):void 0,n=Yt(e);return(...i)=>j(null,null,function*(){let s={};if(r)try{s=yield r.apply(r,i)}catch(a){Ct.warn("模拟数据模版异常",a)}return n==null?void 0:n.mock(s)})}function ly(t,e){if(!e.mock)return;const{url:r,mockTemplate:n,method:i="get",settings:s={}}=e;if(r&&n)try{const a=Gt(r)?new URL(r).pathname:r,o=Qn(`(.*)${a}`,[],{end:!1}),u=new RegExp(o.source+"([?#].*)?$",o.flags),c=dm(a,{decode:decodeURIComponent}),l=Xt(n,{},!0);t.mock(u,i.toLowerCase(),h=>{var w;const p=Ft.parse(h.url)||{},f=s.type||"form";let g=h.body instanceof FormData?$m(h.body):h.body;if(typeof g=="string")if(f==="json")try{g=JSON.parse(g)}catch(y){console.warn("[Mock.mock]",y)}else g=Ft.parse(g);const m=Gt(h.url)?new URL(h.url).pathname:h.url.split("?")[0],v=(w=c(m))==null?void 0:w.params;Object.assign(h,{data:g,params:v,query:p});try{return t.mock(l(h))}catch(y){return console.warn("[mockApi]",u,h,y),null}})}catch(a){console.warn("mockApi",a)}}function qo(t=globalThis){const e=Yt(t);e&&(e._mocked={})}class hy{constructor(e){H(this,"__id",null);H(this,"__mode");H(this,"__instance",null);H(this,"__contextRefs",{});H(this,"__refs",{});H(this,"__refCaches",{});H(this,"context",{});H(this,"state",{});H(this,"props",{});H(this,"$props",{});H(this,"$state",{});H(this,"$refs",{});H(this,"$el",null);H(this,"$emit",null);H(this,"$nextTick",null);H(this,"$parent",null);H(this,"$root",null);H(this,"$attrs",null);H(this,"$slots",null);H(this,"$watch",null);H(this,"$options",null);H(this,"$forceUpdate",null);H(this,"$components",{});H(this,"$libs",{});H(this,"$apis",{});H(this,"$provider",null);H(this,"$uni",null);H(this,"$getApp",null);H(this,"__transform",{});const{mode:r,dsl:n,attrs:i}=e;this.__mode=r,n&&(this.__id=n.id||null,this.__transform=n.transform||{}),i&&Object.assign(this,i)}setup(e,r=Cr){var a,o,u,c;const n=r.getCurrentInstance();if(!n)return;this.__refs={},this.__refCaches={},this.$refs={},this.context={},this.__contextRefs={},this.__instance=n.proxy;const{state:i}=this,s=n.appContext.config.globalProperties;Object.assign(this,s,e||{}),this.$uni=(o=(a=this.$libs.UniH5)==null?void 0:a.uni)!=null?o:null,this.$getApp=(c=(u=this.$libs.UniH5)==null?void 0:u.getApp)!=null?c:null,this.$state=this.state=i,this.__proxy(),r.onMounted(()=>{this.__proxy()}),r.onUnmounted(()=>{this.__cleanup()}),r.onBeforeUpdate(()=>{if(this.__proxy(),this.$props)for(const l of Object.keys(this.$props))this[l]=this.$props[l];this.__reset()})}__proxy(){if(!this.__instance)return;const e=this.__instance;As.forEach(r=>{var n;this[r]=e[r]||((n=e._)==null?void 0:n[r.replace("$","")])||null})}__cleanup(){As.forEach(e=>{this[e]=null}),this.__reset()}__reset(){this.__refs={},this.__refCaches={},this.$refs={},this.__contextRefs={},this.context={}}__parseFunction(e){var r;if(e)if(this.__mode===ne.Runtime){const{id:n,type:i}=e,s=n&&(r=this.__transform[n])!=null?r:e.value;return Te({type:i,value:s},this)}else return Te(e,this)}__parseExpression(e){var r;if(e)if(this.__mode===ne.Runtime){const{id:n,type:i}=e,s=n&&(r=this.__transform[n])!=null?r:e.value;return Xt({type:i,value:s},this)}else return Xt(e,this)}__ref(e=null,r){if(this.__mode===ne.VNode)return;e&&e!==this.__id&&(this.__contextRefs[e]=this);let n=e?this.__refCaches[e]:null;return n||(n=i=>j(this,null,function*(){var a,o;yield Kt(0);let s=(i==null?void 0:i.$vtjEl)||(i==null?void 0:i.$el)||((o=(a=i==null?void 0:i._)==null?void 0:a.vnode)==null?void 0:o.el)||i;if(!s){typeof r=="string"&&(delete this.$refs[r],this[r]&&mi(this[r])&&(this[r].value=null),e&&delete this.__refs[e]);return}return s.nodeType===3&&s.nextSibling&&(s=s.nextSibling),s.__vtj__=e,ne.Design===this.__mode&&(s.__context__=this,s.draggable=!0),e&&(this.__refs[e]=this.__getRefEl(this.__refs,e,i)),typeof r=="function"?r(i):r&&(this.$refs[r]=this.__getRefEl(this.$refs,r,i),this[r]&&mi(this[r])&&(this[r].value=this.$refs[r])),i}),e&&(this.__refCaches[e]=n),n)}__getRefEl(e,r,n){const i=e[r];if(i&&n!==i){const s=new Set([].concat(i,n));return Array.from(s)}else return n}__clone(e={}){const r=U(U({},this.context),e),n=ce(U({},r),{context:r});return n.context.__proto__=this.context,n.__proto__=this,n}}function $n(t){var p,g;const{Vue:e=Cr,UniApp:r={},mode:n=ne.Runtime,components:i={},libs:s={},apis:a={},loader:o}=t,u=e.computed(()=>t.dsl),c={$components:i,$libs:s,$apis:a},l=new hy({mode:n,dsl:u.value,attrs:c}),h=e.defineComponent(U({name:u.value.name,__scopeId:u.value.id?`data-v-${u.value.id}`:void 0,props:U({},fy((p=u.value.props)!=null?p:[],l)),setup(){return j(this,arguments,function*(m={}){var V,E,C,L,P,B,I,D,F;l.$props=l.props=m,u.value.id&&Dr(t.window||globalThis,u.value.id,u.value.css||"",!0);const v=u.value.apiMode==="composition";l.$state=l.state=dy(e,(V=u.value.state)!=null?V:{},l);const w=v?_y(e,(E=u.value.refs)!=null?E:{},l):{},y=v?xy(e,(C=u.value.reactives)!=null?C:{},l):{},_=gy(e,(L=u.value.computed)!=null?L:{},l),x=my((P=u.value.methods)!=null?P:{},l),S=vy(e,u.value.inject,l),b=yy(u.value.dataSources||{},l);let T={};v&&(T=wy((B=u.value.composables)!=null?B:[],l));const A=U(U(U(U(U(U(U(U({},m),w),y),S),_),x),b),T);if(l.setup(A,e),by(e,(I=u.value.watch)!=null?I:[],l),v){if(yield Ey(e,(D=u.value.lifeCycles)!=null?D:{},l,r),u.value.setup){const M=l.__parseFunction(u.value.setup);if(ve(M))try{yield M()}catch(q){console.warn("[VTJ] Composition setup 执行失败",q)}}Sy(e,(F=u.value.provide)!=null?F:{},l)}return U(U(U(U(U({vtj:l,state:l.state,$state:l.$state},m),w),y),_),x)})},emits:py(u.value.emits),expose:["vtj",...u.value.expose||[]],render(){const m=u.value;if(m.refs)for(const w of Object.keys(m.refs))this[w];if(m.reactives)for(const w of Object.keys(m.reactives)){const y=this[w];if(y&&typeof y=="object")for(const _ of Object.keys(y))y[_]}if(m.state){const w=this.state;for(const y of Object.keys(m.state))w[y]}if(m.computed)for(const w of Object.keys(m.computed))this[w];if(m.inject)for(const w of m.inject)this[w.name];if(!m.nodes)return null;const v=m.nodes||[];if(v.length===1)return Rt(v[0],l,e,o,v);{const w=v.map(y=>Rt(y,l,e,o,v)).flat();return e.createVNode("div",{},w)}}},u.value.apiMode!=="composition"?Ty((g=u.value.lifeCycles)!=null?g:{},l):{}));return{renderer:e.markRaw(h),context:l}}function py(t=[]){return t.map(e=>Ke(e)?e:e.name)}function fy(t=[],e){const r=n=>n?(Array.isArray(n)?n:[n]).map(i=>rv[i]):void 0;return t.map(n=>Ke(n)?{name:n}:{name:n.name,type:n.type,required:n.required,default:le(n.default)?e.__parseExpression(n.default):n.default}).reduce((n,i)=>(n[i.name]={type:r(i.type),required:i.required,default:i.default},n),{})}function dy(t,e,r){return t.reactive(Object.keys(e||{}).reduce((n,i)=>{let s=e[i];return le(s)?s=r.__parseExpression(s):ye(s)&&(s=r.__parseFunction(s)),n[i]=s,n},{}))}function gy(t,e,r){return Object.entries(e!=null?e:{}).reduce((n,[i,s])=>(ye(s)?n[i]=t.computed(r.__parseFunction(s)):n[i]=t.computed(r.__parseExpression(s)),n),{})}function my(t,e){return Object.entries(t!=null?t:{}).reduce((r,[n,i])=>(r[n]=e.__parseFunction(i),r),{})}function vy(t,e=[],r){return e.reduce((n,i)=>{var c;const{name:s,from:a}=i||{},o=le(a)?r.__parseExpression(a)||s:a!=null?a:s,u=le(i.default)?r.__parseExpression(i.default):(c=i.default)!=null?c:null;return n[s]=t.inject(o,u),n},{})}function yy(t,e){return Object.keys(t).reduce((r,n)=>{const i=t[n];if(i.type==="mock")r[n]=uy(i);else if(i.ref){const s=e.$apis[i.ref],a=ye(i.transform)?i.transform.value?e.__parseFunction(i.transform):void 0:i.transform;r[n]=(...o)=>j(null,null,function*(){const u=yield s.apply(e,o);return a?a(u):u})}return r},{})}function by(t,e=[],r){e.forEach(n=>{t.watch(r.__parseExpression(n.source),r.__parseFunction(n.handler),{deep:n.deep,immediate:n.immediate,flush:n.flush})})}function _y(t,e,r){return Object.entries(e).reduce((n,[i,s])=>{const a=le(s)?r.__parseExpression(s):s;return n[i]=t.ref(a),n},{})}function xy(t,e,r){return Object.entries(e).reduce((n,[i,s])=>{const a=le(s)?r.__parseExpression(s):s;return n[i]=t.reactive(a!=null?a:{}),n},{})}function wy(t,e){return t.reduce((r,n)=>{try{let i;if(le(n.composable)?i=e.__parseExpression(n.composable):Ke(n.composable)&&(i=e.$libs[n.composable]),ve(i)){const s=(n.args||[]).map(o=>le(o)?e.__parseExpression(o):o),a=i(...s);if(n.destructure&&n.destructure.length>0)for(const o of n.destructure)r[o]=a==null?void 0:a[o];else r[n.name]=a}}catch(i){e.__mode===ne.Design&&(console.warn("[VTJ] composable 执行失败,已降级处理",i),r[n.name]={})}return r},{})}function Sy(t,e,r){Object.entries(e).forEach(([n,i])=>{let s=i;le(i)?s=r.__parseExpression(i):ye(i)&&(s=r.__parseFunction(i)),t.provide(n,s)})}function Ey(i,s,a){return j(this,arguments,function*(t,e,r,n={}){const o={beforeMount:"onBeforeMount",mounted:"onMounted",beforeUpdate:"onBeforeUpdate",updated:"onUpdated",beforeUnmount:"onBeforeUnmount",unmounted:"onUnmounted",errorCaptured:"onErrorCaptured",renderTracked:"onRenderTracked",renderTriggered:"onRenderTriggered",activated:"onActivated",deactivated:"onDeactivated"};for(const[u,c]of Object.entries(e)){if(u==="created"||u==="beforeCreate"){const p=r.__parseFunction(c);if(ve(p))try{yield p()}catch(f){console.warn(`[VTJ] Composition 生命周期 "${u}" 执行失败`,f),Nn(f)}continue}const l=o[u]||u,h=t[l]||n[l];if(h&&ve(h)){const p=r.__parseFunction(c);ve(p)&&h(()=>j(null,null,function*(){try{yield Kt(0),yield p()}catch(f){console.warn(`[VTJ] Composition 生命周期 "${u}" 执行失败`,f),Nn(f)}}))}else console.warn(`[VTJ] 无效的 Composition 生命周期钩子 "${u}"`)}})}function Ty(t,e){return Object.entries(t!=null?t:{}).reduce((r,[n,i])=>{const s=e.__parseFunction(i);return r[n]=()=>j(null,null,function*(){ve(s)&&(yield Kt(0),yield s())}),r},{})}class Cy{constructor(){H(this,"__props",{});H(this,"__events",{});H(this,"__nodes",{})}setProps(e,r){this.__props[e]=r}getProps(e){return this.__props[e]}loadProps(e,r){return(e?this.getProps(e):null)||(e&&this.setProps(e,r),r)}setEvents(e,r){}getEvents(e){return this.__events[e]}loadEvents(e,r){return(e?this.getEvents(e):null)||(e&&this.setEvents(e,r),r)}setNode(e,r){this.__nodes[e]=r}getNode(e){return this.__nodes[e]}loadNode(e,r){return(e?this.getNode(e):null)||(e&&this.setNode(e,r),r)}isEqual(e,r){return zr(e,r)}isNodeEqual(e,r){if(e===r)return!0;if(!e||!r)return!1;const n=o=>!o||typeof o!="object"?[]:Object.keys(o).filter(u=>ve(o[u])),i=o=>{if(!o||typeof o!="object")return o;const u={};for(const c in o)if(Object.prototype.hasOwnProperty.call(o,c)){const l=o[c];ve(l)||(u[c]=l)}return u},s=n(e).sort(),a=n(r).sort();return zr(s,a)?zr(i(e),i(r)):!1}clear(){this.__props={},this.__events={},this.__nodes={}}}const dr=new Cy,Ay=new wm;let ln=[],_t={},gr={};const Ry=(t,e)=>e;function zo(r){return j(this,arguments,function*(t,e=globalThis){const{urls:n=[],library:i}=t,s=n.filter(o=>Pr(o));if(s.length===0||!i)return null;const a=n.filter(o=>Or(o));return a.length&&lo(a,e),yield ho(s,i,e).catch(o=>(console.warn("loadScriptUrl error",s,i,o),null))})}function Bn(t){const{getDsl:e,getDslByUrl:r,options:n}=t;return n.window&&(ln.forEach(i=>{delete n.window[i]}),ln=[]),(i,s,a,o=Cr)=>{if(!a||typeof a=="string")return s;let u="";if(a.type==="Schema"&&a.id)return u=a.id+"_"+i,gr[u]||(gr[u]=o.defineAsyncComponent(()=>j(null,null,function*(){const c=_t[a.id]||(yield Ay.add(a.id,()=>e(a.id)));return c&&(c.name=s,_t[a.id]=c),c?$n(ce(U({Vue:o,mode:ne.Runtime},n),{dsl:Yi(c),loader:Bn(t)})).renderer:null})));if(a.type==="UrlSchema"&&a.url)return u=a.url+"_"+i,gr[u]||(gr[u]=o.defineAsyncComponent(()=>j(null,null,function*(){const c=_t[a.url]||(yield r(a.url));return c&&(c.name=s,_t[a.url]=c),c?$n(ce(U({},n),{Vue:o,dsl:Yi(c),mode:ne.Runtime,loader:Bn(t)})).renderer:null})));if(a.type==="Plugin"){let c=a.library?_t[a.library]:null;return c||(a.library&&ln.push(a.library),c=_t[a.library||Symbol()]=o.defineAsyncComponent(()=>j(null,null,function*(){return(yield zo(a,n.window))||(console.warn("getPlugin result is null",a),null)})),c)}return s}}function Rt(t,e,r=Cr,n=Ry,i=[],s=!1,a=0){var x;if(!t||!t.name||t.invisible)return null;const o=(x=r.getCurrentInstance())==null?void 0:x.appContext,{id:u=null,directives:c=[]}=t,{vIf:l,vElseIf:h,vElse:p,vFor:f,vShow:g,vModels:m,vBind:v,vHtml:w,others:y}=Wo(c);if(!s&&(h||p))return null;if(l&&!ky(l,e))return By(t,e,r,n,i);const _=(S,b=0)=>{var q,z,R,N;const T=S.$components,A=(()=>{var $,pe,Fe,De;if(t.name==="component")return Oy(S,($=t.props)==null?void 0:$.is);if(t.name==="slot")return t.name;const k=n(`${t.id}_${b}`,t.name,t.from,r);return Ke(k)?gv(k)||mv(k)?k:(De=(Fe=T[k])!=null?Fe:(pe=o==null?void 0:o.app)==null?void 0:pe.component(k))!=null?De:k:k})(),V=Py(u,(q=t.props)!=null?q:{},S),E=$y(r,t.id,(z=t.events)!=null?z:{},S);if(t.name==="slot")return Ly(r,t,V,S,n);v&&Object.assign(V,S.__parseExpression(v.value)),g&&(V.style=Object.assign((R=V.style)!=null?R:{},My(g,S))),w&&Object.assign(V,jy(w,S)),m.forEach(k=>{co.includes(t.name)?Object.assign(V,Fy(k,S)):Object.assign(V,Uy(r,k,S))});const C=Hy(r,(N=t.children)!=null?N:[],S,n,t),L=S!=null&&S.__id?`data-v-${S.__id}`:void 0,P=L?{[L]:""}:{},B=S.__mode===ne.Design?{"data-vtj":u}:{},I=`${u}_${b}`,D=U(U(U({key:I},P),B),V);dr.isNodeEqual(D,dr.getNode(I))||dr.setNode(I,D);let F=r.createVNode(A,U(U({},dr.getNode(I)||D),E),C);const M=o?Iy(o,y,S):[];return M.length&&(F=r.withDirectives(F,M)),F};return f?Wy(f,_,e):_(e,a)}function Iy(t,e,r){const n=t.app;return e.map(i=>{const s=typeof i.name=="string"?n.directive(i.name):r.__parseExpression(i.name);if(!s)return null;const a=[s];return i.value&&a.push(r.__parseExpression(i.value)),i.arg&&a.push(i.arg),i.modifiers&&a.push(i.modifiers),a}).filter(i=>!!i)}function Wo(t=[]){const e=t.find(l=>$e(l.name)==="vIf"),r=t.find(l=>$e(l.name)==="vElseIf"),n=t.find(l=>$e(l.name)==="vElse"),i=t.find(l=>$e(l.name)==="vFor"),s=t.find(l=>$e(l.name)==="vShow"),a=t.find(l=>$e(l.name)==="vBind"),o=t.find(l=>$e(l.name)==="vHtml"),u=t.filter(l=>$e(l.name)==="vModel"),c=t.filter(l=>!tv.includes($e(l.name)));return{vIf:e,vElseIf:r,vElse:n,vFor:i,vShow:s,vModels:u,vBind:a,others:c,vHtml:o}}function ky(t,e){return!!e.__parseExpression(t.value)}function Oy(t,e){return e?le(e)?t.__parseExpression(e):e:"div"}function Py(t,e,r){const n=Ln(e,r);return n.ref=r.__ref(t,n.ref),n}function Ln(t,e){return le(t)?e.__parseExpression(t):ye(t)?e.__parseFunction(t):Array.isArray(t)?t.map(r=>Ln(r,e)):typeof t=="object"?Object.keys(t||{}).reduce((r,n)=>{let i=t[n];return r[n]=Ln(i,e),r},{}):t}function Dy(t,e){return r=>{var n;((n=r==null?void 0:r.key)==null?void 0:n.toLowerCase())===e.toLowerCase()&&t(r)}}function Ny(t){return vv(t.value)?t:yv(t.value)?{type:"JSFunction",value:`(...args) => (() => {
76
76
  return (($event) => {
77
77
  ${t.value}
78
78
  }).apply(this, args);
@@ -80,10 +80,10 @@ ${o}
80
80
  ${t.value.value} = v?.target.value;
81
81
  }`:"(v) => {}"};return{[le(t.arg)?e.__parseExpression(t.arg):t.arg||"value"]:e.__parseExpression(t.value),onInput:e.__parseFunction(r)}}function Uy(t,e,r){var o;const n={type:"JSFunction",value:(o=e.value)!=null&&o.value?`(v) => {
82
82
  ${e.value.value} = v;
83
- }`:"(v) => {}"},i=r.__parseFunction(n),s=Go(le(e.modifiers)?r.__parseExpression(e.modifiers):e.modifiers),a=le(e.arg)?r.__parseExpression(e.arg):e.arg||"modelValue";return{[a]:r.__parseExpression(e.value),[`onUpdate:${a}`]:s.length&&i?t.withModifiers(i,s):i}}function Hy(t,e,r,n,i){if(!e)return null;if(Ke(e))return{default:()=>e};if(le(e))return{default:()=>uo(r.__parseExpression(e))};if(Array.isArray(e)&&e.length>0){const s=qy(e),a=(o,u)=>!o||!i?{}:i!=null&&i.id&&Object.keys(o).length?u?{[u]:o}:{[`scope_${i.id}`]:o}:u?{[u]:Object.create(null)}:{};return Object.entries(s).reduce((o,[u,{nodes:c,params:l,scope:h}])=>(o[u]=p=>{const f=l.length?lm(p!=null?p:{},l):a(p,h);return c.map((g,m)=>Rt(g,r.__clone(f),t,n,c,!1,m))},o),{})}return null}function qy(t){const e={};for(const r of t){const n=zy(r.slot),i=n.name;e[i]?(e[i].nodes.push(r),e[i].params=e[i].params.concat(n.params),e[i].scope=n.scope||""):e[i]={nodes:[r],params:n.params,scope:n.scope||""}}return e}function zy(t="default"){return Ke(t)?{name:t,params:[],scope:""}:U({params:[],scope:""},t)}function Wy(t,e,r){const{value:n,iterator:i}=t,{item:s="item",index:a="index"}=i||{};let o=r.__parseExpression(n)||[];return Number.isInteger(o)&&(o=new Array(o).fill(!0).map((u,c)=>c+1)),Array.isArray(o)?o.map((u,c)=>e(r.__clone({[s]:u,[a]:c}),c)):(console.warn("[vForRender]:",`${n==null?void 0:n.value} is not a Arrary`),[])}const hn=Ms({name:"VtjPageContainer",setup(){return j(this,null,function*(){const t=n1(),e=ac(),r=e.meta.__vtj__||e.params.id,n=r?t.getPage(r):t.getHomepage(),i=n?yield t.getRenderComponent(n.id):null,s=ic(Symbol());if(n){Object.assign(e.meta,n.meta||{},{cache:n.cache});const{useTitle:a}=t==null?void 0:t.adapter;if(a){const o=e.meta.title||n.title||"VTJ.PRO";a(o)}}return{provider:t,component:i,file:n,query:e.query,meta:e.meta,sid:s,route:e}})},render(){const{component:t,query:e,sid:r}=this;return t?fn(t,ce(U({},e),{key:r})):fn("div",{style:{padding:"10px"}},"找不到组件,组件不存在或未发布!")},activated(){this.meta.cache===!1&&(this.sid=Symbol())}}),Gy=Ms({name:"VtjStartupContainer",render(){return fn("div","page not found!")}});function Vn(t,e,r=[]){const n=[];for(const i of r){const{id:s,title:a,icon:o,children:u,hidden:c,layout:l}=i;if(l){const h=Vn(t,e,u||[]);n.push(...h)}else{const h={id:s,title:a,icon:o,hidden:c,url:`${t}/${e}/${s}`,children:u&&u.length?Vn(t,e,u):void 0};n.push(h)}}return n}function pn(t,e){const{id:r,title:n,meta:i}=t,{name:s="page",prefix:a="",component:o,routeMeta:u}=e;return{name:r,path:`${a}${s}/${r}`,component:o,meta:ce(U(U({title:n},u),i),{__vtj__:r})}}function Mn(t){const{name:e="page",prefix:r="",pages:n=[],component:i,loader:s,routeMeta:a,homepage:o}=t,u=[];for(const c of n){const{id:l,title:h,dir:p,layout:f,children:g,meta:m}=c;if(p){const v=Mn({name:e,prefix:r,component:i,routeMeta:a,homepage:o,loader:s,pages:g||[]});u.push(...v)}else if(f){const v=Mn({name:e,prefix:r,component:i,routeMeta:a,homepage:o,loader:s,pages:g||[]}),w={name:`layout_${l}`,path:r,component:()=>s(l),meta:ce(U(U({title:h},a),m),{__vtj__:l}),children:v};u.push(w),u.push(pn(c,t))}else if(u.push(pn(c,t)),o===l){const v=pn(c,t);v.path="",v.name=`home_${l}`,u.push(v)}}return u}function Ky(t={},e){const{css:r,store:n,enhance:i}=t,{window:s,app:a,library:o={},adapter:u,mode:c}=e,{Pinia:l}=o;a.config.globalProperties.$libs=o,Dr(s,"global-css",r||""),l&&n&&Yy(n,a,l),Zy(a,u,t),!u.access&&t.access&&Jy(t.access,a,c,u),Qy(a,t),i&&Xy(i,a,o)}function Yy(t,e,r){const n=r.createPinia();if(e.use(n),ye(t)&&t.value){const i=Te(t,{},!1,!1,!0),s=r.defineStore("$store",i(e)||{});e.config.globalProperties.$store=s()}}function Jy(t,e,r,n){if(ye(t)&&t.value){const i=Te(t,{},!1,!1,!0),{alert:s,request:a}=n,o=new Ho(U({alert:s,storagePrefix:"__VTJ_APP_"},i(e))),u=e.config.globalProperties.$router;o.connect({mode:r,router:u,request:a}),e.use(o)}}function Zy(t,e,r){if(!e.request)return;const{axios:n,request:i,response:s}=r;if(n&&ye(n)&&n.value){const a=Te(n,{},!1,!1,!0);e.request.setConfig(a(t))}if(i&&ye(i)&&i.value){const a=Te(i,{},!1,!1,!0),o=e.request;o.__unReq&&o.__unReq(),o.__unReq=e.request.useRequest(u=>a(u,t))}if(s&&ye(s)&&s.value){const a=Te(s,{},!1,!1,!0),o=e.request;o.__unRes&&o.__unRes(),o.__unRes=e.request.useResponse(u=>a(u,t))}}function Qy(t,e){const{beforeEach:r,afterEach:n}=e,i=t.config.globalProperties.$router;if(r&&ye(r)&&r.value){const s=Te(r,{},!1,!1,!0);i&&i.beforeEach((a,o,u)=>s(a,o,u,t))}if(n&&ye(n)&&n.value){const s=Te(n,{},!1,!1,!0);i&&i.afterEach((a,o,u)=>s(a,o,u,t))}}function Xy(t,e,r={}){ye(t)&&t.value&&Te(t,{},!1,!1,!0)(e,r)}function e1(t,e,r){if(!t||!e||!r)return;const{VueI18n:n}=e;if(n){const{locale:i,fallbackLocale:s,messages:a=[]}=r,o={};for(let c of a){const l=Object.keys(c).filter(h=>h!=="key");for(const h of l)o[h]||(o[h]={}),o[h][c.key]=c[h]}const u=n.createI18n({legacy:!1,locale:i,fallbackLocale:s,messages:o});t.use(u)}}const Ko=Symbol("Provider");class t1 extends Cm{constructor(r){super();H(this,"mode");H(this,"globals",{});H(this,"modules",{});H(this,"adapter",{request:Cn,jsonp:oo});H(this,"apis",{});H(this,"dependencies",{});H(this,"materials",{});H(this,"library",{});H(this,"libraryLocales",{});H(this,"libraryLocaleMap",{});H(this,"service");H(this,"project",null);H(this,"components",{});H(this,"nodeEnv","development");H(this,"env",{});H(this,"router",null);H(this,"materialPath","./");H(this,"urlDslCaches",{});H(this,"errorHandler",null);this.options=r;const{service:n,mode:i=ne.Raw,dependencies:s,materials:a,project:o={},adapter:u={},globals:c={},modules:l={},router:h=null,materialPath:p="./",nodeEnv:f="development"}=r;this.mode=i,this.modules=l,this.service=n,this.router=h,this.materialPath=p,this.nodeEnv=f,s&&(this.dependencies=s),a&&(this.materials=a),Object.assign(this.globals,c),Object.assign(this.adapter,u);const{access:g,request:m}=this.adapter;g&&g.connect({mode:i,router:h,request:m}),o&&i!==ne.Design?this.load(o):this.project=o}createMock(r){return(...n)=>j(null,null,function*(){let i={};if(r)try{i=yield r.apply(r,n)}catch(a){Ct.warn("模拟数据模版异常",a)}const s=Yt();return s||console.warn("[@vtj/renderer]","项目缺少mockjs, 你需要安装mockjs依赖,并在应用的 main.ts 中添加 mockjs 导入,确保 window.Mock 可用"),s==null?void 0:s.mock(i)})}load(r){return j(this,null,function*(){const{vtjDir:n=".vtj"}=this.options,i=this.modules[`${n}/projects/${r.id}.json`]||this.modules[`/src/${n}/projects/${r.id}.json`];if(this.project=i?yield i():yield this.service.init(r),!this.project)throw new Error("project is null");const{apis:s=[],meta:a=[],env:o=[]}=this.project,u=globalThis;u&&(u.CKEDITOR_VERSION=void 0),this.initEnv(o),this.mode===ne.Raw?yield this.loadDependencies(u):yield this.loadAssets(u),this.initMock(u),this.apis=oy(s,a,this.adapter),qo(u),cy(s,u),r.platform!=="uniapp"&&this.initRouter(),this.triggerReady()})}initMock(r){const n=Yt(r);n&&n.setup({timeout:"50-500"})}loadDependencies(){return j(this,arguments,function*(r={}){const n=Object.entries(this.dependencies);for(const[i,s]of n)r[i]||(r[i]=this.library[i]=yield s())})}loadAssets(){return j(this,arguments,function*(r={}){const{dependencies:n=[]}=this.project,{dependencies:i,library:s,components:a,materialPath:o,nodeEnv:u,libraryLocales:c}=this,{libraryExports:l,libraryMap:h,materials:p,materialExports:f,materialMapLibrary:g,libraryLocaleMap:m}=av(n,o,u==="development");Object.assign(this.libraryLocaleMap,m);for(const v of l){const w=i[v],y=r[v];if(y)s[v]=y;else if(w)r[v]=s[v]=yield w();else{const x=h[v]||[];for(const S of x)Or(S)&&(yield fv(S,Ft.append(S,{v:sn}))),Pr(S)&&(yield Ts(Ft.append(S,{v:sn})));s[v]=r[v]}const _=m[v];if(_){const x=i[_];c[_]=x?yield x():r[_]}}if(u==="development"){for(const w of p)yield Ts(Ft.append(w,{v:sn}));const v=this.materials||{};for(const w of f){const y=r[g[w]],_=(y==null?void 0:y.default)||y,x=Tm[w];if(x)_&&x.forEach(S=>{a[S]=_[S]});else{const S=v[w]?(yield v[w]()).default:r[w];S&&_&&(S.components||[]).forEach(b=>{a[b.name]=ov(b,_)})}}}})}initRouter(){const{router:r,project:n,options:i,adapter:s}=this;if(!r)return;const a=(n==null?void 0:n.platform)==="uniapp"?"pages":"page",{routeAppendTo:o,pageRouteName:u=a,routeMeta:c}=i,l=o?"":"/",h={path:`${l}${u}/:id`,name:br,component:hn},p=this.getHomepage(),f={path:l,name:an,component:p?hn:s.startupComponent||Gy,meta:c};if(r.hasRoute(br)&&r.removeRoute(br),r.hasRoute(an)&&r.removeRoute(an),i.enableStaticRoute){const g=(n==null?void 0:n.pages)||[];Mn({name:u,prefix:l,pages:g,component:hn,loader:this.getRenderComponent.bind(this),homepage:p==null?void 0:p.id}).forEach(m=>{o?r.addRoute(o,m):r.addRoute(m)}),p||(o?r.addRoute(o,f):r.addRoute(f))}else o?(r.addRoute(o,h),r.addRoute(o,f)):(r.addRoute(h),r.addRoute(f))}setErrorHandler(r){r.config.errorHandler=Yn((n,i,s)=>{const a=i==null?void 0:i.$options.name,o=typeof n=="string"?n:(n==null?void 0:n.message)||(n==null?void 0:n.msg)||"未知错误",u=`[ ${a} ] ${o} ${s}`;if(!["getComputedStyle","ResizeObserver"].some(c=>u.includes(c))){try{const c={message:u,err:n,instance:i,info:JSON.stringify(s),stack:n==null?void 0:n.stack};console.error("[VTJ Error]:",c,n==null?void 0:n.stack),this.errorHandler&&this.errorHandler(c)}catch(c){console.warn("[provider.setErrorHandler]",c)}this.adapter.notify&&this.adapter.notify(u,"组件渲染错误","error")}},200)}install(r){var o,u,c,l;const{libraryLocaleMap:n,libraryLocales:i}=this,{libraryOptions:s={}}=this.options,a=r.config.globalProperties.installed||{};for(const[h,p]of Object.entries(this.library))if(!a[h]&&dv(p)){const f={locale:i[n[h]]},g=s[h]||{},m=U(U({},f),g);r.use(p,m),a[h]=!0}r.provide(Ko,this),r.config.globalProperties.$provider=this,r.config.globalProperties.$apis=this.apis,r.config.globalProperties.$request=(o=this.adapter)==null?void 0:o.request,this.options.install&&r.use(this.options.install),this.adapter.access&&r.use(this.adapter.access),((u=this.project)==null?void 0:u.platform)!=="uniapp"&&this.mode!==ne.Design&&this.initGlobals(((c=this.project)==null?void 0:c.globals)||{},{app:r,window:globalThis,adapter:this.adapter,library:this.library,mode:this.mode}),this.mode!==ne.Design&&((l=this.project)!=null&&l.i18n)&&this.initI18n(r,this.library,this.project.i18n),this.options.enhance&&r.use(this.options.enhance,this),this.mode===ne.Design&&this.setErrorHandler(r),r.config.globalProperties.installed=a,this.setGlobals(r.config.globalProperties)}setGlobals(r={}){for(const[n,i]of Object.entries(r))this.globals[n]=i}getFile(r){const{blocks:n=[]}=this.project||{};return this.getPage(r)||n.find(i=>i.id===r)||null}getPage(r){const{pages:n=[]}=this.project||{},i=(s,a=[])=>{for(const o of a){if(o.id===s)return o;if(o.children&&o.children.length){const u=i(s,o.children);if(u)return u}}};return i(r,n)||null}getFirstPage(){const{pages:r=[]}=this.project||{};if(!r.length)return null;const n=(i=[])=>{for(const s of i){if(s.type==="page"&&!s.dir&&!s.layout)return s;if(s.children&&s.children.length){const a=n(s.children);if(a)return a}}};return n(r)||null}getMenus(r="page",n=""){var i;return Vn(n,r,((i=this.project)==null?void 0:i.pages)||[])}getHomepage(){const{homepage:r}=this.project||{};return r?this.getPage(r):this.getFirstPage()}getDsl(r){return j(this,null,function*(){const{vtjDir:n=".vtj"}=this.options,i=this.modules[`${n}/files/${r}.json`]||this.modules[`/src/${n}/files/${r}.json`];return i?yield i():this.service.getFile(r,this.project||void 0).catch(()=>null)})}getDslByUrl(r){return j(this,null,function*(){return this.urlDslCaches[r]||(this.adapter.request?this.urlDslCaches[r]=this.adapter.request.send({url:r,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(i=>i.data).catch(()=>null):null)})}createDslRenderer(r,n={}){const{library:i,components:s,mode:a,apis:o}=this,u=U({mode:a,Vue:i.Vue,UniApp:i.UniApp,components:s,libs:i,apis:o,window:globalThis},n),c=Bn({getDsl:l=>j(this,null,function*(){return(yield this.getDsl(l))||null}),getDslByUrl:l=>j(this,null,function*(){return(yield this.getDslByUrl(l))||null}),options:u});return $n(ce(U({},u),{dsl:r,loader:c}))}getRenderComponent(r,n){return j(this,null,function*(){var a;const i=this.getFile(r);if(!i)return Ct.warn(`Can not find file: ${r}`),null;if(n&&n(i),this.mode===ne.Raw){const{vtjRawDir:o=".vtj/vue"}=this.options,u=`${o}/${r}.vue`,c=this.modules[u]||this.modules[`/src/pages/${r}.vue`];return c?(a=yield c())==null?void 0:a.default:this.nodeEnv==="development"&&this.adapter.startupComponent||null}const s=yield this.getDsl(i.id);return s?this.createDslRenderer(s).renderer:(Ct.warn(`Can not find dsl: ${r}`),null)})}defineUrlSchemaComponent(r,n){return gi(()=>j(this,null,function*(){const i=yield this.getDslByUrl(r);return i?(i.name=n||i.name,this.createDslRenderer(i).renderer):null}))}definePluginComponent(r){return gi(()=>j(null,null,function*(){return yield zo(r,globalThis)}))}initGlobals(r,n){const i=Object.assign({adapter:this.adapter,window:globalThis},n);Ky(r,i)}initI18n(r,n,i){e1(r,n,i)}initEnv(r=[]){this.env=r.reduce((n,i)=>(n[i.name]=i[this.nodeEnv],n),{})}}function r1(t){const e=new t1(t);return{provider:e,onReady:r=>e.ready(r)}}function n1(t={}){const e=sc(Ko,null);if(!e)throw new Error("Can not find provider");if(e.nodeEnv==="development"){const{id:r,version:n}=t;r&&n&&j(null,null,function*(){const i=yield e.getDsl(r);(i==null?void 0:i.__VERSION__)!==n&&e.adapter.notify&&e.adapter.notify(`[ ${i==null?void 0:i.name} ] 组件源码版本与运行时版本不一致,请重新发布组件`,"版本不一致","warning")})}return e}function i1(t,e=""){return j(this,null,function*(){const{name:r,urls:n=[]}=t||{},i=n.map(o=>e+o),{css:s,js:a}=cv(i);if(s.length&&lo(s),a.length)return yield ho(a,r).catch(()=>{})})}const Yo={type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:t=>{var e;return((e=t.data)==null?void 0:e.code)===0}},s1=(t,e="/__vtj__/api/:type.json")=>(r,n,i)=>t.send({url:e,method:"post",params:{type:r},query:i,data:{type:r,data:n},settings:Yo}),a1=(t,e="/__vtj__/api/uploader.json")=>(r,n)=>j(null,null,function*(){return yield t.send({url:e,method:"post",data:{files:r,projectId:n},settings:ce(U({},Yo),{type:"data"})}).then(i=>i&&i[0]?i[0]:null).catch(()=>null)});function o1(t){return Xn({settings:{type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:e=>{var r;return((r=e.data)==null?void 0:r.code)===0},showError:e=>{t&&t(e||"未知错误")}}})}class c1{constructor(e=Cn){H(this,"api");H(this,"pluginCaches",{});H(this,"uploader");this.req=e,this.api=s1(e),this.uploader=a1(e)}getExtension(){return j(this,null,function*(){console.log("BaseService.getExtension")})}init(e){return j(this,null,function*(){return console.log("BaseService.init",e),{}})}saveProject(e,r){return j(this,null,function*(){return!!(yield this.api("saveProject",e,{type:r}).catch(()=>!1))})}saveMaterials(e,r){return j(this,null,function*(){return console.log("BaseService.saveMaterials",e,r),!1})}saveFile(e){return j(this,null,function*(){return console.log("BaseService.saveFile",e),!1})}getFile(e){return j(this,null,function*(){return console.log("BaseService.getFile",e),{}})}removeFile(e){return j(this,null,function*(){return console.log("BaseService.removeFile",e),!1})}saveHistory(e){return j(this,null,function*(){return console.log("BaseService.saveHistory",e),!1})}removeHistory(e){return j(this,null,function*(){return console.log("BaseService.removeHistory",e),!1})}getHistory(e){return j(this,null,function*(){return console.log("BaseService.getHistory",e),{}})}getHistoryItem(e,r){return j(this,null,function*(){return console.log("BaseService.getHistoryItem",e,r),{}})}saveHistoryItem(e,r){return j(this,null,function*(){return console.log("BaseService.saveHistoryItem",e,r),!1})}removeHistoryItem(e,r){return j(this,null,function*(){return console.log("BaseService.removeHistoryItem",e,r),!1})}publish(e){return j(this,null,function*(){return!!(yield this.api("publish",e).catch(()=>!1))})}publishFile(e,r){return j(this,null,function*(){return!!(yield this.api("publishFile",{project:e,file:r}).catch(()=>!1))})}genVueContent(e,r){return j(this,null,function*(){return yield this.api("genVueContent",{project:e,dsl:r}).catch(()=>"")})}parseVue(e,r){return j(this,null,function*(){return yield this.api("parseVue",U({project:e},r))})}createRawPage(e){return j(this,null,function*(){return yield this.api("createRawPage",e).catch(()=>"")})}removeRawPage(e){return j(this,null,function*(){return yield this.api("removeRawPage",e).catch(()=>"")})}uploadStaticFile(e,r){return j(this,null,function*(){return yield this.uploader(e,r).catch(()=>null)})}getStaticFiles(e){return j(this,null,function*(){return yield this.api("getStaticFiles",e).catch(()=>[])})}removeStaticFile(e,r){return j(this,null,function*(){return yield this.api("removeStaticFile",{name:e,projectId:r}).catch(()=>"")})}clearStaticFiles(e){return j(this,null,function*(){return yield this.api("clearStaticFiles",e).catch(()=>"")})}getPluginMaterial(e){return j(this,null,function*(){const{urls:r=[]}=e,n=r.filter(s=>iv(s))[0];return n?this.pluginCaches[n]||(this.pluginCaches[n]=Cn.send({url:n,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(s=>s.data).catch(()=>null)):null})}genSource(e){return j(this,null,function*(){return console.log("BaseService.genSource",e),""})}}new no({type:"local",expired:0,prefix:"__VTJ_"});class u1 extends c1{constructor(){super(...arguments);H(this,"getFileCaches",{})}getExtension(){return j(this,null,function*(){return yield this.api("getExtension",{}).catch(()=>{})})}init(r){return j(this,null,function*(){return(yield this.api("init",r).catch(()=>null))||{}})}saveProject(r,n){return j(this,null,function*(){return!!(yield this.api("saveProject",r,{type:n}).catch(()=>!1))})}saveMaterials(r,n){return j(this,null,function*(){return!!(yield this.api("saveMaterials",{project:r,materials:cm(n)}).catch(()=>!1))})}saveFile(r){return j(this,null,function*(){return!!(yield this.api("saveFile",r).catch(()=>!1))})}getFile(r){return j(this,null,function*(){return this.getFileCaches[r]||(this.getFileCaches[r]=this.api("getFile",r).catch(()=>null)).finally(()=>{delete this.getFileCaches[r]})})}removeFile(r){return j(this,null,function*(){return!!(yield this.api("removeFile",r).catch(()=>!1))})}saveHistory(r){return j(this,null,function*(){return!!(yield this.api("saveHistory",r).catch(()=>!1))})}removeHistory(r){return j(this,null,function*(){return!!(yield this.api("removeHistory",r).catch(()=>!1))})}getHistory(r){return j(this,null,function*(){return(yield this.api("getHistory",r).catch(()=>null))||{}})}getHistoryItem(r,n){return j(this,null,function*(){return(yield this.api("getHistoryItem",{fId:r,id:n}).catch(()=>null))||{}})}saveHistoryItem(r,n){return j(this,null,function*(){return!!(yield this.api("saveHistoryItem",{fId:r,item:n}).catch(()=>!1))})}removeHistoryItem(r,n){return j(this,null,function*(){return!!(yield this.api("removeHistoryItem",{fId:r,ids:n}).catch(()=>!1))})}}/**!
83
+ }`:"(v) => {}"},i=r.__parseFunction(n),s=Go(le(e.modifiers)?r.__parseExpression(e.modifiers):e.modifiers),a=le(e.arg)?r.__parseExpression(e.arg):e.arg||"modelValue";return{[a]:r.__parseExpression(e.value),[`onUpdate:${a}`]:s.length&&i?t.withModifiers(i,s):i}}function Hy(t,e,r,n,i){if(!e)return null;if(Ke(e))return{default:()=>e};if(le(e))return{default:()=>uo(r.__parseExpression(e))};if(Array.isArray(e)&&e.length>0){const s=qy(e),a=(o,u)=>!o||!i?{}:i!=null&&i.id&&Object.keys(o).length?u?{[u]:o}:{[`scope_${i.id}`]:o}:u?{[u]:Object.create(null)}:{};return Object.entries(s).reduce((o,[u,{nodes:c,params:l,scope:h}])=>(o[u]=p=>{const f=l.length?lm(p!=null?p:{},l):a(p,h);return c.map((g,m)=>Rt(g,r.__clone(f),t,n,c,!1,m))},o),{})}return null}function qy(t){const e={};for(const r of t){const n=zy(r.slot),i=n.name;e[i]?(e[i].nodes.push(r),e[i].params=e[i].params.concat(n.params),e[i].scope=n.scope||""):e[i]={nodes:[r],params:n.params,scope:n.scope||""}}return e}function zy(t="default"){return Ke(t)?{name:t,params:[],scope:""}:U({params:[],scope:""},t)}function Wy(t,e,r){const{value:n,iterator:i}=t,{item:s="item",index:a="index"}=i||{};let o=r.__parseExpression(n)||[];return Number.isInteger(o)&&(o=new Array(o).fill(!0).map((u,c)=>c+1)),Array.isArray(o)?o.map((u,c)=>e(r.__clone({[s]:u,[a]:c}),c)):(console.warn("[vForRender]:",`${n==null?void 0:n.value} is not a Arrary`),[])}const hn=Ms({name:"VtjPageContainer",setup(){return j(this,null,function*(){const t=n1(),e=ac(),r=e.meta.__vtj__||e.params.id,n=r?t.getPage(r):t.getHomepage(),i=n?yield t.getRenderComponent(n.id):null,s=ic(Symbol());if(n){Object.assign(e.meta,n.meta||{},{cache:n.cache});const{useTitle:a}=t==null?void 0:t.adapter;if(a){const o=e.meta.title||n.title||"VTJ.PRO";a(o)}}return{provider:t,component:i,file:n,query:e.query,meta:e.meta,sid:s,route:e}})},render(){const{component:t,query:e,sid:r}=this;return t?fn(t,ce(U({},e),{key:r})):fn("div",{style:{padding:"10px"}},"找不到组件,组件不存在或未发布!")},activated(){this.meta.cache===!1&&(this.sid=Symbol())}}),Gy=Ms({name:"VtjStartupContainer",render(){return fn("div","page not found!")}});function Vn(t,e,r=[]){const n=[];for(const i of r){const{id:s,title:a,icon:o,children:u,hidden:c,layout:l}=i;if(l){const h=Vn(t,e,u||[]);n.push(...h)}else{const h={id:s,title:a,icon:o,hidden:c,url:`${t}/${e}/${s}`,children:u&&u.length?Vn(t,e,u):void 0};n.push(h)}}return n}function pn(t,e){const{id:r,title:n,meta:i}=t,{name:s="page",prefix:a="",component:o,routeMeta:u}=e;return{name:r,path:`${a}${s}/${r}`,component:o,meta:ce(U(U({title:n},u),i),{__vtj__:r})}}function Mn(t){const{name:e="page",prefix:r="",pages:n=[],component:i,loader:s,routeMeta:a,homepage:o}=t,u=[];for(const c of n){const{id:l,title:h,dir:p,layout:f,children:g,meta:m}=c;if(p){const v=Mn({name:e,prefix:r,component:i,routeMeta:a,homepage:o,loader:s,pages:g||[]});u.push(...v)}else if(f){const v=Mn({name:e,prefix:r,component:i,routeMeta:a,homepage:o,loader:s,pages:g||[]}),w={name:`layout_${l}`,path:r,component:()=>s(l),meta:ce(U(U({title:h},a),m),{__vtj__:l}),children:v};u.push(w),u.push(pn(c,t))}else if(u.push(pn(c,t)),o===l){const v=pn(c,t);v.path="",v.name=`home_${l}`,u.push(v)}}return u}function Ky(t={},e){const{css:r,store:n,enhance:i}=t,{window:s,app:a,library:o={},adapter:u,mode:c}=e,{Pinia:l}=o;a.config.globalProperties.$libs=o,Dr(s,"global-css",r||""),l&&n&&Yy(n,a,l),Zy(a,u,t),!u.access&&t.access&&Jy(t.access,a,c,u),Qy(a,t),i&&Xy(i,a,o)}function Yy(t,e,r){if(!e.config.globalProperties.$pinia){const n=r.createPinia();e.use(n)}if(ye(t)&&t.value){const n=Te(t,{},!1,!1,!0),i=r.defineStore("$store",n(e)||{});e.config.globalProperties.$store=i()}}function Jy(t,e,r,n){if(ye(t)&&t.value){const i=Te(t,{},!1,!1,!0),{alert:s,request:a}=n,o=new Ho(U({alert:s,storagePrefix:"__VTJ_APP_"},i(e))),u=e.config.globalProperties.$router;o.connect({mode:r,router:u,request:a}),e.use(o)}}function Zy(t,e,r){if(!e.request)return;const{axios:n,request:i,response:s}=r;if(n&&ye(n)&&n.value){const a=Te(n,{},!1,!1,!0);e.request.setConfig(a(t))}if(i&&ye(i)&&i.value){const a=Te(i,{},!1,!1,!0),o=e.request;o.__unReq&&o.__unReq(),o.__unReq=e.request.useRequest(u=>a(u,t))}if(s&&ye(s)&&s.value){const a=Te(s,{},!1,!1,!0),o=e.request;o.__unRes&&o.__unRes(),o.__unRes=e.request.useResponse(u=>a(u,t))}}function Qy(t,e){const{beforeEach:r,afterEach:n}=e,i=t.config.globalProperties.$router;if(r&&ye(r)&&r.value){const s=Te(r,{},!1,!1,!0);i&&i.beforeEach((a,o,u)=>s(a,o,u,t))}if(n&&ye(n)&&n.value){const s=Te(n,{},!1,!1,!0);i&&i.afterEach((a,o,u)=>s(a,o,u,t))}}function Xy(t,e,r={}){ye(t)&&t.value&&Te(t,{},!1,!1,!0)(e,r)}function e1(t,e,r){if(!t||!e||!r)return;const{VueI18n:n}=e;if(n){const{locale:i,fallbackLocale:s,messages:a=[]}=r,o={};for(let c of a){const l=Object.keys(c).filter(h=>h!=="key");for(const h of l)o[h]||(o[h]={}),o[h][c.key]=c[h]}const u=n.createI18n({legacy:!1,locale:i,fallbackLocale:s,messages:o});t.use(u)}}const Ko=Symbol("Provider");class t1 extends Cm{constructor(r){super();H(this,"mode");H(this,"globals",{});H(this,"modules",{});H(this,"adapter",{request:Cn,jsonp:oo});H(this,"apis",{});H(this,"dependencies",{});H(this,"materials",{});H(this,"library",{});H(this,"libraryLocales",{});H(this,"libraryLocaleMap",{});H(this,"service");H(this,"project",null);H(this,"components",{});H(this,"nodeEnv","development");H(this,"env",{});H(this,"router",null);H(this,"materialPath","./");H(this,"urlDslCaches",{});H(this,"errorHandler",null);this.options=r;const{service:n,mode:i=ne.Raw,dependencies:s,materials:a,project:o={},adapter:u={},globals:c={},modules:l={},router:h=null,materialPath:p="./",nodeEnv:f="development"}=r;this.mode=i,this.modules=l,this.service=n,this.router=h,this.materialPath=p,this.nodeEnv=f,s&&(this.dependencies=s),a&&(this.materials=a),Object.assign(this.globals,c),Object.assign(this.adapter,u);const{access:g,request:m}=this.adapter;g&&g.connect({mode:i,router:h,request:m}),o&&i!==ne.Design?this.load(o):this.project=o}createMock(r){return(...n)=>j(null,null,function*(){let i={};if(r)try{i=yield r.apply(r,n)}catch(a){Ct.warn("模拟数据模版异常",a)}const s=Yt();return s||console.warn("[@vtj/renderer]","项目缺少mockjs, 你需要安装mockjs依赖,并在应用的 main.ts 中添加 mockjs 导入,确保 window.Mock 可用"),s==null?void 0:s.mock(i)})}load(r){return j(this,null,function*(){const{vtjDir:n=".vtj"}=this.options,i=this.modules[`${n}/projects/${r.id}.json`]||this.modules[`/src/${n}/projects/${r.id}.json`];if(this.project=i?yield i():yield this.service.init(r),!this.project)throw new Error("project is null");const{apis:s=[],meta:a=[],env:o=[]}=this.project,u=globalThis;u&&(u.CKEDITOR_VERSION=void 0),this.initEnv(o),this.mode===ne.Raw?yield this.loadDependencies(u):yield this.loadAssets(u),this.initMock(u),this.apis=oy(s,a,this.adapter),qo(u),cy(s,u),r.platform!=="uniapp"&&this.initRouter(),this.triggerReady()})}initMock(r){const n=Yt(r);n&&n.setup({timeout:"50-500"})}loadDependencies(){return j(this,arguments,function*(r={}){const n=Object.entries(this.dependencies);for(const[i,s]of n)r[i]||(r[i]=this.library[i]=yield s())})}loadAssets(){return j(this,arguments,function*(r={}){const{dependencies:n=[]}=this.project,{dependencies:i,library:s,components:a,materialPath:o,nodeEnv:u,libraryLocales:c}=this,{libraryExports:l,libraryMap:h,materials:p,materialExports:f,materialMapLibrary:g,libraryLocaleMap:m}=av(n,o,u==="development");Object.assign(this.libraryLocaleMap,m);for(const v of l){const w=i[v],y=r[v];if(y)s[v]=y;else if(w)r[v]=s[v]=yield w();else{const x=h[v]||[];for(const S of x)Or(S)&&(yield fv(S,Ft.append(S,{v:sn}))),Pr(S)&&(yield Ts(Ft.append(S,{v:sn})));s[v]=r[v]}const _=m[v];if(_){const x=i[_];c[_]=x?yield x():r[_]}}if(u==="development"){for(const w of p)yield Ts(Ft.append(w,{v:sn}));const v=this.materials||{};for(const w of f){const y=r[g[w]],_=(y==null?void 0:y.default)||y,x=Tm[w];if(x)_&&x.forEach(S=>{a[S]=_[S]});else{const S=v[w]?(yield v[w]()).default:r[w];S&&_&&(S.components||[]).forEach(b=>{a[b.name]=ov(b,_)})}}}})}initRouter(){const{router:r,project:n,options:i,adapter:s}=this;if(!r)return;const a=(n==null?void 0:n.platform)==="uniapp"?"pages":"page",{routeAppendTo:o,pageRouteName:u=a,routeMeta:c}=i,l=o?"":"/",h={path:`${l}${u}/:id`,name:br,component:hn},p=this.getHomepage(),f={path:l,name:an,component:p?hn:s.startupComponent||Gy,meta:c};if(r.hasRoute(br)&&r.removeRoute(br),r.hasRoute(an)&&r.removeRoute(an),i.enableStaticRoute){const g=(n==null?void 0:n.pages)||[];Mn({name:u,prefix:l,pages:g,component:hn,loader:this.getRenderComponent.bind(this),homepage:p==null?void 0:p.id}).forEach(m=>{o?r.addRoute(o,m):r.addRoute(m)}),p||(o?r.addRoute(o,f):r.addRoute(f))}else o?(r.addRoute(o,h),r.addRoute(o,f)):(r.addRoute(h),r.addRoute(f))}setErrorHandler(r){r.config.errorHandler=Yn((n,i,s)=>{const a=i==null?void 0:i.$options.name,o=typeof n=="string"?n:(n==null?void 0:n.message)||(n==null?void 0:n.msg)||"未知错误",u=`[ ${a} ] ${o} ${s}`;if(!["getComputedStyle","ResizeObserver"].some(c=>u.includes(c))){try{const c={message:u,err:n,instance:i,info:JSON.stringify(s),stack:n==null?void 0:n.stack};console.error("[VTJ Error]:",c,n==null?void 0:n.stack),this.errorHandler&&this.errorHandler(c)}catch(c){console.warn("[provider.setErrorHandler]",c)}this.adapter.notify&&this.adapter.notify(u,"组件渲染错误","error")}},200)}install(r){var o,u,c,l;const{libraryLocaleMap:n,libraryLocales:i}=this,{libraryOptions:s={}}=this.options,a=r.config.globalProperties.installed||{};for(const[h,p]of Object.entries(this.library))if(!a[h]&&dv(p)){const f={locale:i[n[h]]},g=s[h]||{},m=U(U({},f),g);r.use(p,m),a[h]=!0}r.provide(Ko,this),r.config.globalProperties.$provider=this,r.config.globalProperties.$apis=this.apis,r.config.globalProperties.$request=(o=this.adapter)==null?void 0:o.request,this.options.install&&r.use(this.options.install),this.adapter.access&&r.use(this.adapter.access),((u=this.project)==null?void 0:u.platform)!=="uniapp"&&this.mode!==ne.Design&&this.initGlobals(((c=this.project)==null?void 0:c.globals)||{},{app:r,window:globalThis,adapter:this.adapter,library:this.library,mode:this.mode}),this.mode!==ne.Design&&((l=this.project)!=null&&l.i18n)&&this.initI18n(r,this.library,this.project.i18n),this.options.enhance&&r.use(this.options.enhance,this),this.mode===ne.Design&&this.setErrorHandler(r),r.config.globalProperties.installed=a,this.setGlobals(r.config.globalProperties)}setGlobals(r={}){for(const[n,i]of Object.entries(r))this.globals[n]=i}getFile(r){const{blocks:n=[]}=this.project||{};return this.getPage(r)||n.find(i=>i.id===r)||null}getPage(r){const{pages:n=[]}=this.project||{},i=(s,a=[])=>{for(const o of a){if(o.id===s)return o;if(o.children&&o.children.length){const u=i(s,o.children);if(u)return u}}};return i(r,n)||null}getFirstPage(){const{pages:r=[]}=this.project||{};if(!r.length)return null;const n=(i=[])=>{for(const s of i){if(s.type==="page"&&!s.dir&&!s.layout)return s;if(s.children&&s.children.length){const a=n(s.children);if(a)return a}}};return n(r)||null}getMenus(r="page",n=""){var i;return Vn(n,r,((i=this.project)==null?void 0:i.pages)||[])}getHomepage(){const{homepage:r}=this.project||{};return r?this.getPage(r):this.getFirstPage()}getDsl(r){return j(this,null,function*(){const{vtjDir:n=".vtj"}=this.options,i=this.modules[`${n}/files/${r}.json`]||this.modules[`/src/${n}/files/${r}.json`];return i?yield i():this.service.getFile(r,this.project||void 0).catch(()=>null)})}getDslByUrl(r){return j(this,null,function*(){return this.urlDslCaches[r]||(this.adapter.request?this.urlDslCaches[r]=this.adapter.request.send({url:r,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(i=>i.data).catch(()=>null):null)})}createDslRenderer(r,n={}){const{library:i,components:s,mode:a,apis:o}=this,u=U({mode:a,Vue:i.Vue,UniApp:i.UniApp,components:s,libs:i,apis:o,window:globalThis},n),c=Bn({getDsl:l=>j(this,null,function*(){return(yield this.getDsl(l))||null}),getDslByUrl:l=>j(this,null,function*(){return(yield this.getDslByUrl(l))||null}),options:u});return $n(ce(U({},u),{dsl:r,loader:c}))}getRenderComponent(r,n){return j(this,null,function*(){var a;const i=this.getFile(r);if(!i)return Ct.warn(`Can not find file: ${r}`),null;if(n&&n(i),this.mode===ne.Raw){const{vtjRawDir:o=".vtj/vue"}=this.options,u=`${o}/${r}.vue`,c=this.modules[u]||this.modules[`/src/pages/${r}.vue`];return c?(a=yield c())==null?void 0:a.default:this.nodeEnv==="development"&&this.adapter.startupComponent||null}const s=yield this.getDsl(i.id);return s?this.createDslRenderer(s).renderer:(Ct.warn(`Can not find dsl: ${r}`),null)})}defineUrlSchemaComponent(r,n){return gi(()=>j(this,null,function*(){const i=yield this.getDslByUrl(r);return i?(i.name=n||i.name,this.createDslRenderer(i).renderer):null}))}definePluginComponent(r){return gi(()=>j(null,null,function*(){return yield zo(r,globalThis)}))}initGlobals(r,n){const i=Object.assign({adapter:this.adapter,window:globalThis},n);Ky(r,i)}initI18n(r,n,i){e1(r,n,i)}initEnv(r=[]){this.env=r.reduce((n,i)=>(n[i.name]=i[this.nodeEnv],n),{})}}function r1(t){const e=new t1(t);return{provider:e,onReady:r=>e.ready(r)}}function n1(t={}){const e=sc(Ko,null);if(!e)throw new Error("Can not find provider");if(e.nodeEnv==="development"){const{id:r,version:n}=t;r&&n&&j(null,null,function*(){const i=yield e.getDsl(r);(i==null?void 0:i.__VERSION__)!==n&&e.adapter.notify&&e.adapter.notify(`[ ${i==null?void 0:i.name} ] 组件源码版本与运行时版本不一致,请重新发布组件`,"版本不一致","warning")})}return e}function i1(t,e=""){return j(this,null,function*(){const{name:r,urls:n=[]}=t||{},i=n.map(o=>e+o),{css:s,js:a}=cv(i);if(s.length&&lo(s),a.length)return yield ho(a,r).catch(()=>{})})}const Yo={type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:t=>{var e;return((e=t.data)==null?void 0:e.code)===0}},s1=(t,e="/__vtj__/api/:type.json")=>(r,n,i)=>t.send({url:e,method:"post",params:{type:r},query:i,data:{type:r,data:n},settings:Yo}),a1=(t,e="/__vtj__/api/uploader.json")=>(r,n)=>j(null,null,function*(){return yield t.send({url:e,method:"post",data:{files:r,projectId:n},settings:ce(U({},Yo),{type:"data"})}).then(i=>i&&i[0]?i[0]:null).catch(()=>null)});function o1(t){return Xn({settings:{type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:e=>{var r;return((r=e.data)==null?void 0:r.code)===0},showError:e=>{t&&t(e||"未知错误")}}})}class c1{constructor(e=Cn){H(this,"api");H(this,"pluginCaches",{});H(this,"uploader");this.req=e,this.api=s1(e),this.uploader=a1(e)}getExtension(){return j(this,null,function*(){console.log("BaseService.getExtension")})}init(e){return j(this,null,function*(){return console.log("BaseService.init",e),{}})}saveProject(e,r){return j(this,null,function*(){return!!(yield this.api("saveProject",e,{type:r}).catch(()=>!1))})}saveMaterials(e,r){return j(this,null,function*(){return console.log("BaseService.saveMaterials",e,r),!1})}saveFile(e){return j(this,null,function*(){return console.log("BaseService.saveFile",e),!1})}getFile(e){return j(this,null,function*(){return console.log("BaseService.getFile",e),{}})}removeFile(e){return j(this,null,function*(){return console.log("BaseService.removeFile",e),!1})}saveHistory(e){return j(this,null,function*(){return console.log("BaseService.saveHistory",e),!1})}removeHistory(e){return j(this,null,function*(){return console.log("BaseService.removeHistory",e),!1})}getHistory(e){return j(this,null,function*(){return console.log("BaseService.getHistory",e),{}})}getHistoryItem(e,r){return j(this,null,function*(){return console.log("BaseService.getHistoryItem",e,r),{}})}saveHistoryItem(e,r){return j(this,null,function*(){return console.log("BaseService.saveHistoryItem",e,r),!1})}removeHistoryItem(e,r){return j(this,null,function*(){return console.log("BaseService.removeHistoryItem",e,r),!1})}publish(e){return j(this,null,function*(){return!!(yield this.api("publish",e).catch(()=>!1))})}publishFile(e,r){return j(this,null,function*(){return!!(yield this.api("publishFile",{project:e,file:r}).catch(()=>!1))})}genVueContent(e,r){return j(this,null,function*(){return yield this.api("genVueContent",{project:e,dsl:r}).catch(()=>"")})}parseVue(e,r){return j(this,null,function*(){return yield this.api("parseVue",U({project:e},r))})}createRawPage(e){return j(this,null,function*(){return yield this.api("createRawPage",e).catch(()=>"")})}removeRawPage(e){return j(this,null,function*(){return yield this.api("removeRawPage",e).catch(()=>"")})}uploadStaticFile(e,r){return j(this,null,function*(){return yield this.uploader(e,r).catch(()=>null)})}getStaticFiles(e){return j(this,null,function*(){return yield this.api("getStaticFiles",e).catch(()=>[])})}removeStaticFile(e,r){return j(this,null,function*(){return yield this.api("removeStaticFile",{name:e,projectId:r}).catch(()=>"")})}clearStaticFiles(e){return j(this,null,function*(){return yield this.api("clearStaticFiles",e).catch(()=>"")})}getPluginMaterial(e){return j(this,null,function*(){const{urls:r=[]}=e,n=r.filter(s=>iv(s))[0];return n?this.pluginCaches[n]||(this.pluginCaches[n]=Cn.send({url:n,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(s=>s.data).catch(()=>null)):null})}genSource(e){return j(this,null,function*(){return console.log("BaseService.genSource",e),""})}}new no({type:"local",expired:0,prefix:"__VTJ_"});class u1 extends c1{constructor(){super(...arguments);H(this,"getFileCaches",{})}getExtension(){return j(this,null,function*(){return yield this.api("getExtension",{}).catch(()=>{})})}init(r){return j(this,null,function*(){return(yield this.api("init",r).catch(()=>null))||{}})}saveProject(r,n){return j(this,null,function*(){return!!(yield this.api("saveProject",r,{type:n}).catch(()=>!1))})}saveMaterials(r,n){return j(this,null,function*(){return!!(yield this.api("saveMaterials",{project:r,materials:cm(n)}).catch(()=>!1))})}saveFile(r){return j(this,null,function*(){return!!(yield this.api("saveFile",r).catch(()=>!1))})}getFile(r){return j(this,null,function*(){return this.getFileCaches[r]||(this.getFileCaches[r]=this.api("getFile",r).catch(()=>null)).finally(()=>{delete this.getFileCaches[r]})})}removeFile(r){return j(this,null,function*(){return!!(yield this.api("removeFile",r).catch(()=>!1))})}saveHistory(r){return j(this,null,function*(){return!!(yield this.api("saveHistory",r).catch(()=>!1))})}removeHistory(r){return j(this,null,function*(){return!!(yield this.api("removeHistory",r).catch(()=>!1))})}getHistory(r){return j(this,null,function*(){return(yield this.api("getHistory",r).catch(()=>null))||{}})}getHistoryItem(r,n){return j(this,null,function*(){return(yield this.api("getHistoryItem",{fId:r,id:n}).catch(()=>null))||{}})}saveHistoryItem(r,n){return j(this,null,function*(){return!!(yield this.api("saveHistoryItem",{fId:r,item:n}).catch(()=>!1))})}removeHistoryItem(r,n){return j(this,null,function*(){return!!(yield this.api("removeHistoryItem",{fId:r,ids:n}).catch(()=>!1))})}}/**!
84
84
  * Copyright (c) 2026, VTJ.PRO All rights reserved.
85
85
  * @name @vtj/uni
86
86
  * @author CHC chenhuachun1549@dingtalk.com
87
- * @version 0.18.8
87
+ * @version 0.18.10
88
88
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
89
89
  */const l1=["onLaunch","onShow","onHide","onError","onPageNotFound","onUnhandledRejection","onThemeChange","onPageNotFound","onUniNViewMessage","onExit"],Ls="/pages",h1="VTJ",p1="__UNI__1FC118B",f1="VTJ移动跨端项目",d1="1.0.0",g1="100",m1=!1,v1={},y1={enable:!1},b1="3",_1={name:h1,appid:p1,description:f1,versionName:d1,versionCode:g1,transformPx:m1,"app-plus":{usingComponents:!0,nvueStyleCompiler:"uni-app",compilerVersion:3,splashscreen:{alwaysShowBeforeRender:!0,waiting:!0,autoclose:!0,delay:0},modules:{},distribute:{android:{permissions:['<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>','<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>','<uses-permission android:name="android.permission.VIBRATE"/>','<uses-permission android:name="android.permission.READ_LOGS"/>','<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>','<uses-feature android:name="android.hardware.camera.autofocus"/>','<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>','<uses-permission android:name="android.permission.CAMERA"/>','<uses-permission android:name="android.permission.GET_ACCOUNTS"/>','<uses-permission android:name="android.permission.READ_PHONE_STATE"/>','<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>','<uses-permission android:name="android.permission.WAKE_LOCK"/>','<uses-permission android:name="android.permission.FLASHLIGHT"/>','<uses-feature android:name="android.hardware.camera"/>','<uses-permission android:name="android.permission.WRITE_SETTINGS"/>']},ios:{},sdkConfigs:{},icons:{android:{hdpi:"src/static/logo.png",xhdpi:"src/static/logo.png",xxhdpi:"src/static/logo.png",xxxhdpi:"src/static/logo.png"}}}},quickapp:v1,"mp-weixin":{appid:"",setting:{urlCheck:!1},usingComponents:!0},"mp-alipay":{usingComponents:!0},"mp-baidu":{usingComponents:!0},"mp-toutiao":{usingComponents:!0},uniStatistics:y1,vueVersion:b1},x1=[],w1={navigationBarTextStyle:"black",navigationBarTitleText:"uni-app",navigationBarBackgroundColor:"#F8F8F8",backgroundColor:"#F8F8F8"},S1={autoscan:!0,custom:{"^uni-(.*)":"@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue"}},E1={pages:x1,globalStyle:w1,easycom:S1};function T1(t){let{manifestJson:e={},pagesJson:r={},routes:n=[]}=t;const i=n.map(s=>{const{path:a,style:o,needLogin:u}=s;return{path:a,style:o,needLogin:u}});return ce(U({},t),{manifestJson:Object.assign({},_1,e),pagesJson:Object.assign({},E1,r,{pages:i})})}const jn={navigationBarBackgroundColor:"backgroundColor",navigationBarTextStyle:"titleColor",navigationBarTitleText:"titleText",navigationStyle:"style",titleImage:"titleImage",titlePenetrate:"titlePenetrate",transparentTitle:"transparentTitle"};function Jo(t){const e={},r={black:"#000000",white:"#ffffff"};for(const n in t)jn[n]&&(e[jn[n]]=n==="navigationBarTextStyle"?r[t[n]]||r.black:t[n]);return e}function C1(t){const e={};for(const r in t)jn[r]||(e[r]=t[r]);return e}function A1(t){var e,r;return((r=(e=t.h5)==null?void 0:e.router)==null?void 0:r.mode)||"hash"}function R1(t){var e,r,n;return{topWindow:!!((e=t.topWindow)!=null&&e.path),leftWindow:!!((r=t.leftWindow)!=null&&r.path),rightWindow:!!((n=t.rightWindow)!=null&&n.path)}}function I1(t){const{pagesJson:e={}}=t,{globalStyle:r,pages:n=[]}=e;return!!(r!=null&&r.enablePullDownRefresh||n.find(i=>{var s;return!!((s=i.style)!=null&&s.enablePullDownRefresh)}))}function k1(t){const{pagesJson:e={}}=t,{globalStyle:r,pages:n=[]}=e;let i=!1;return(r==null?void 0:r.navigationStyle)==="custom"?(i=!0,n.find(s=>{var a;return((a=s.style)==null?void 0:a.navigationStyle)==="default"})&&(i=!1)):n.every(s=>{var a;return((a=s.style)==null?void 0:a.navigationStyle)==="custom"})&&(i=!0),i}function O1(t){var o;const e=k1(t),r={navigationBar:!1,navigationBarButtons:!1,navigationBarSearchInput:!1,navigationBarTransparent:!1},{pagesJson:n={}}=t,{globalStyle:i,pages:s=[]}=n;if(e)return r;r.navigationBar=!0;const a=(o=i==null?void 0:i.h5)==null?void 0:o.titleNView;return s.find(u=>{var c,l,h;return!!((h=(l=(c=u.style)==null?void 0:c.h5)==null?void 0:l.titleNView)!=null&&h.buttons.length)})&&(r.navigationBarButtons=!0),(a!=null&&a.searchInput||s.find(u=>{var c,l,h;return!!((h=(l=(c=u.style)==null?void 0:c.h5)==null?void 0:l.titleNView)!=null&&h.searchInput)}))&&(r.navigationBarSearchInput=!0),((a==null?void 0:a.type)==="transparent"||s.find(u=>{var c,l,h;return((h=(l=(c=u.style)==null?void 0:c.h5)==null?void 0:l.titleNView)==null?void 0:h.type)==="transparent"}))&&(r.navigationBarTransparent=!0),r}function P1(t,e=window){var p,f,g,m;const{pagesJson:r={},manifestJson:n={}}=t,{topWindow:i,leftWindow:s,rightWindow:a}=R1(r),{navigationBar:o,navigationBarButtons:u,navigationBarSearchInput:c,navigationBarTransparent:l}=O1(t),h={__VUE_OPTIONS_API__:!0,__VUE_PROD_DEVTOOLS__:!1,__VUE_PROD_HYDRATION_MISMATCH_DETAILS__:!1,__UNI_FEATURE_WX__:!1,__UNI_FEATURE_WXS__:!1,__UNI_FEATURE_RPX__:!1,__UNI_FEATURE_PROMISE__:!1,__UNI_FEATURE_LONGPRESS__:!1,__UNI_FEATURE_I18N_EN__:!1,__UNI_FEATURE_I18N_ES__:!1,__UNI_FEATURE_I18N_FR__:!1,__UNI_FEATURE_I18N_ZH_HANS__:!0,__UNI_FEATURE_I18N_ZH_HANT__:!1,__UNI_FEATURE_UNI_CLOUD__:!1,__UNI_FEATURE_I18N_LOCALE__:!1,__UNI_FEATURE_NVUE__:!1,__UNI_FEATURE_ROUTER_MODE__:A1(n),__UNI_FEATURE_PAGES__:!!((p=r.pages)!=null&&p.length),__UNI_FEATURE_TABBAR__:!!((g=(f=r.tabBar)==null?void 0:f.list)!=null&&g.length),__UNI_FEATURE_TABBAR_MIDBUTTON__:!!((m=r.tabBar)!=null&&m.midButton),__UNI_FEATURE_TOPWINDOW__:i,__UNI_FEATURE_LEFTWINDOW__:s,__UNI_FEATURE_RIGHTWINDOW__:a,__UNI_FEATURE_RESPONSIVE__:!1,__UNI_FEATURE_NAVIGATIONBAR__:o,__UNI_FEATURE_PULL_DOWN_REFRESH__:I1(t),__UNI_FEATURE_NAVIGATIONBAR_BUTTONS__:u,__UNI_FEATURE_NAVIGATIONBAR_SEARCHINPUT__:c,__UNI_FEATURE_NAVIGATIONBAR_TRANSPARENT__:l};Object.entries(h).forEach(([v,w])=>{e[v]=w})}const D1="5.07";function N1(t,e=window){var h,p;const{pagesJson:r={},manifestJson:n={}}=t,{easycom:i={}}=r,{appid:s="",name:a="",versionCode:o="",versionName:u=""}=n,c=r.globalStyle,l=((h=n.h5)==null?void 0:h.router)||{};e.__uniConfig={easycom:i,globalStyle:ce(U({},C1(c)),{navigationBar:Jo(c),isNVue:!1}),compilerVersion:D1,appId:s,appName:a,appVersion:u,appVersionCode:String(o),async:U({loading:"AsyncLoading",error:"AsyncError",delay:200,timeout:6e4,suspensible:!0},((p=n.h5)==null?void 0:p.async)||{}),debug:!1,networkTimeout:U({request:6e4,connectSocket:6e4,uploadFile:6e4,downloadFile:6e4},n.networkTimeout||{}),sdkConfigs:{},nvue:{"flex-direction":"column"},locale:"",fallbackLocale:"",locales:{},router:U({mode:"hash",base:"/",assets:"assets",routerBase:l.base||"/"},l),darkmode:!1,themeConfig:{},tabBar:r.tabBar?U({position:"bottom",color:"#7A7E83",selectedColor:"#3cc51f",borderStyle:"black",blurEffect:"none",fontSize:"10px",iconWidth:"24px",spacing:"3px",height:"50px",backgroundColor:"#ffffff",selectedIndex:0,shown:!0},r.tabBar):void 0}}function $1(t,e=window){const{UniServiceJSBridge:r,UniViewJSBridge:n,getApp:i,uni:s,getCurrentPages:a,upx2px:o,setupPage:u}=t;e.UniServiceJSBridge=r,e.UniViewJSBridge=n,e.getApp=i,e.uni=s,e.wx=s,e.getCurrentPages=a,e.upx2px=o,e.__setupPage=c=>u(c)}function B1(t,e,r){const{openBlock:n,createBlock:i,withCtx:s,createVNode:a}=t,{PageComponent:o,setupPage:u,getApp:c}=e;return{mpType:"page",setup(){return j(this,null,function*(){var m,v;const h=((v=(m=c())==null?void 0:m.$route)==null?void 0:v.query)||{},{loader:p,component:f}=r,g=p?yield p(r):f||{};return()=>(n(),i(o,null,{page:s(()=>[a(u(g),Object.assign({},h,{ref:"page"}),null,512)]),_:1}))})}}}function L1(t,e,r){var f;const{path:n,style:i={},meta:s={},home:a,id:o}=e,u=((f=t.tabBar)==null?void 0:f.list)||[],c=u.findIndex(g=>{var m;return g.pagePath===n||((m=g.pagePath)==null?void 0:m.endsWith(o))}),l=u[c],h=!!l,p=r===0;return U({isTabBar:h,tabBarIndex:c,isQuit:a!=null?a:p,isEntry:a!=null?a:p,navigationBar:U({type:"default"},Jo(i)),isNVue:!1,route:l?l.pagePath:n},s)}function V1(t,e,r,n,i=window){const s=r.map((a,o)=>{const u=L1(n,a,o),c=B1(t,e,a),{path:l}=a;return{path:l,alias:l,meta:u,component:{render(){return t.h(t.Suspense,[t.h(c)])}}}});i.__uniRoutes=s,i.__uniLayout={}}function M1(t,e,r=window){Dr(r,String(t),e)}function j1(t,e){e&&["View","ScrollView","Swiper","MovableArea","MovableView","CoverView","CoverImage","Icon","Text","RichText","Progress","Button","CheckboxGroup","Checkbox","Editor","Form","Input","Label","Picker","PickerView","RadioGroup","Radio","Slider","Switch","Textarea","Navigator","Image","Video","Map","Canvas","WebView","PickerViewColumn","ResizeSensor","SwiperItem"].forEach(r=>{const n=e[r];t.component(r,n)})}function F1(t){const e=T1(t),{Vue:r,App:n,UniH5:i,routes:s=[],pagesJson:a={},manifestJson:o={},window:u,css:c=""}=e;if(!i)return r.createApp(n);const{plugin:l,setupApp:h}=i;P1(e,u),N1(e,u),$1(i,u),V1(r,i,s,a,u),M1(o.appid||Date.now(),c,u);const p=r.createApp(h(n));return p.use(j1,i),p.use(l),p}function U1(t,e){const r={};return Object.entries(t).forEach(([n,i])=>{l1.includes(n)&&i&&(r[n]=e(i))}),r}function Vs(t,e){return()=>j(null,null,function*(){const r=yield t.getDsl(e);if(r){const{renderer:n}=t.createDslRenderer(r);return n}return null})}function H1(n){return j(this,arguments,function*(t,e=!1,r=Ls){var o,u,c;const i=((o=t.project)==null?void 0:o.pages)||[],s=[];for(const l of i){const h=((u=t.project)==null?void 0:u.homepage)===l.id;s.push({id:l.id,path:`${r}/${l.id}`,loader:Vs(t,l.id),style:U({navigationBarTitleText:l.title},l.style),needLogin:l.needLogin,home:h})}const a=s.find(l=>!!l.home)||s[0];if(a){const l=r===Ls?"/":r;s.unshift(ce(U({},a),{path:l}))}if(e){const l=((c=t.project)==null?void 0:c.blocks)||[];for(const h of l)s.push({id:h.id,path:`${r}/${h.id}`,loader:Vs(t,h.id),style:{navigationStyle:"custom"}})}return s})}function Fn(){if(typeof uni<"u")return uni;if(typeof globalThis<"u"&&globalThis.uni)return globalThis.uni;if(typeof window<"u"&&window.uni)return window.uni}function q1(){const t=Fn();return t!=null&&t.showLoading&&t.showLoading({title:"加载中...",mask:!0}),{close:()=>{const e=Fn();e!=null&&e.hideLoading&&e.hideLoading()}}}function Zo(t,e="",r="warning"){return j(this,null,function*(){const n=Fn();return n!=null&&n.showModal?n.showModal({title:e,content:t,showCancel:!1}):(typeof window<"u"&&window.alert(t),!0)})}function z1(t=ne.Runtime){let e={};t===ne.Runtime?e=Object.assign({}):e=Object.assign({});let r={};for(const[n,i]of Object.entries(e))r[n]=()=>Promise.resolve(i);return r}const W1=iy({loading:q1,notify:Zo}),Qo=new u1(o1(Zo)),G1=z1(),{provider:K1,onReady:Y1}=r1({nodeEnv:"production",mode:ne.Runtime,modules:G1,materialPath:"../",adapter:W1,service:Qo,dependencies:{Vue:()=>yi(()=>import("./@dcloudio-uni-h5-vue-DC2wuYrq.js").then(t=>t.x),__vite__mapDeps([0,1,2]),import.meta.url),VueRouter:()=>yi(()=>import("./vue-router-Br7a6pVO.js"),__vite__mapDeps([3,0,1,2]),import.meta.url)}}),J1=t=>j(null,null,function*(){const e=(yield Qo.getExtension().catch(()=>null))||{},r=top||window,n=yield i1(e.enhance,r.location.pathname),{Vue:i,UniH5:s}=window,a=t.project;if(!a)return;const o=a.uniConfig||{},u=U1(o,g=>Te(g,window,!1,!0)),{manifestJson:c,pagesJson:l,css:h}=o,p=yield H1(t,!0),f=F1({Vue:i,App:u,UniH5:s,routes:p,css:h,manifestJson:c,pagesJson:l});f.use(t),n&&f.use(n,t),f.mount(document.body)});Y1(()=>J1(K1));