@vtj/pro 0.18.8 → 0.18.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{Editor-VZdiHFNS-C4YkwEzc.js → Editor-VZdiHFNS-D9NWfPEa.js} +1 -1
- package/dist/assets/{auth-_0cifl7m.js → auth-BqmXplBV.js} +1 -1
- package/dist/assets/{index-fbV73XM9.js → index-DQSVTMqJ.js} +1 -1
- package/dist/assets/{index-B4Vip_WM.js → index-Dan57dsA.js} +2 -2
- package/dist/assets/{page-qMhnPnAy.js → page-C7pPrUcX.js} +1 -1
- package/dist/assets/{preview-BuLNwWxz.js → preview-BniwiEaA.js} +1 -1
- package/dist/assets/{utils-BjLUSu4S.js → utils-D72zsg26.js} +1 -1
- package/dist/index.html +3 -3
- package/dist/uni/assets/{index-DLgf4W0-.js → index-DM2VgRQy.js} +1 -1
- package/dist/uni/index.html +1 -1
- package/package.json +12 -12
|
@@ -96,7 +96,7 @@ Minimum version required to store current data is: `+L+`.
|
|
|
96
96
|
`;return a.evaluate(i)}Object.defineProperty(ah,"__IS_FUNCTION_FUNC",{value:!0,writable:!1,enumerable:!1,configurable:!1});let d0=class{constructor(e){this.value=e}};class $a{constructor(e){this.value=e}}let oa=class{constructor(e){this.value=e}};class Fi{constructor(e,n=null,r){this.name=r,this.parent=n,this.data=e,this.labelStack=[]}}function Tl(){}function cG(t=null,e){return new Fi(Object.create(null),t,e)}function uG(t){return Object.create(t)}const L0={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:rh,Function:ah};typeof JSON<"u"&&(L0.JSON=JSON);typeof Promise<"u"&&(L0.Promise=Promise);typeof Set<"u"&&(L0.Set=Set);typeof Map<"u"&&(L0.Map=Map);typeof Symbol<"u"&&(L0.Symbol=Symbol);typeof Proxy<"u"&&(L0.Proxy=Proxy);typeof WeakMap<"u"&&(L0.WeakMap=WeakMap);typeof WeakSet<"u"&&(L0.WeakSet=WeakSet);typeof Reflect<"u"&&(L0.Reflect=Reflect);let Z0=class Jo{constructor(e=Jo.global,n={}){this.sourceList=[],this.collectDeclVars=Object.create(null),this.collectDeclFuncs=Object.create(null),this.isVarDeclMode=!1,this.lastExecNode=null,this.isRunning=!1,this.options={ecmaVersion:n.ecmaVersion||Jo.ecmaVersion,timeout:n.timeout||0,rootContext:n.rootContext,globalContextInFunction:n.globalContextInFunction===void 0?Jo.globalContextInFunction:n.globalContextInFunction,_initEnv:n._initEnv},this.context=e||Object.create(null),this.callStack=[],this.initEnvironment(this.context)}initEnvironment(e){let n;if(e instanceof Fi)n=e;else{let a=null;const i=this.createSuperScope(e);this.options.rootContext&&(a=new Fi(uG(this.options.rootContext),i,_6)),n=new Fi(e,a||i,C6)}this.globalScope=n,this.currentScope=this.globalScope,this.globalContext=n.data,this.currentContext=n.data,this.collectDeclVars=Object.create(null),this.collectDeclFuncs=Object.create(null),this.execStartTime=Date.now(),this.execEndTime=this.execStartTime;const r=this.options._initEnv;r&&r.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 sC||e instanceof Gr||e instanceof oG}createSuperScope(e){let n=Object.assign({},L0);return Object.keys(n).forEach(r=>{r in e&&delete n[r]}),new Fi(n,null,x6)}setCurrentContext(e){this.currentContext=e}setCurrentScope(e){this.currentScope=e}evaluate(e=""){let n;if(e)return n=nG(e,{ranges:!0,locations:!0,ecmaVersion:this.options.ecmaVersion||Jo.ecmaVersion}),this.evaluateNode(n,e)}appendCode(e){return this.evaluate(e)}evaluateNode(e,n=""){this.value=void 0,this.source=n,this.sourceList.push(n),this.isRunning=!0,this.execStartTime=Date.now(),this.execEndTime=this.execStartTime,this.collectDeclVars=Object.create(null),this.collectDeclFuncs=Object.create(null);const r=this.getCurrentScope(),a=this.getCurrentContext(),i=r.labelStack.concat([]),o=this.callStack.concat([]),s=()=>{this.setCurrentScope(r),this.setCurrentContext(a),r.labelStack=i,this.callStack=o};try{const l=this.createClosure(e);this.addDeclarationsToScope(this.collectDeclVars,this.collectDeclFuncs,this.getCurrentScope()),l()}catch(l){throw l}finally{s(),this.execEndTime=Date.now()}return this.isRunning=!1,this.getValue()}createErrorMessage(e,n,r){let a=e[1].replace("%0",String(n));return r!==null&&(a+=this.getNodePosition(r||this.lastExecNode)),a}createError(e,n){return new n(e)}createThrowError(e,n){return this.createError(e,n)}createInternalThrowError(e,n,r){return this.createError(this.createErrorMessage(e,n,r),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 n;switch(e.type){case"BinaryExpression":n=this.binaryExpressionHandler(e);break;case"LogicalExpression":n=this.logicalExpressionHandler(e);break;case"UnaryExpression":n=this.unaryExpressionHandler(e);break;case"UpdateExpression":n=this.updateExpressionHandler(e);break;case"ObjectExpression":n=this.objectExpressionHandler(e);break;case"ArrayExpression":n=this.arrayExpressionHandler(e);break;case"CallExpression":n=this.callExpressionHandler(e);break;case"NewExpression":n=this.newExpressionHandler(e);break;case"MemberExpression":n=this.memberExpressionHandler(e);break;case"ThisExpression":n=this.thisExpressionHandler(e);break;case"SequenceExpression":n=this.sequenceExpressionHandler(e);break;case"Literal":n=this.literalHandler(e);break;case"Identifier":n=this.identifierHandler(e);break;case"AssignmentExpression":n=this.assignmentExpressionHandler(e);break;case"FunctionDeclaration":n=this.functionDeclarationHandler(e);break;case"VariableDeclaration":n=this.variableDeclarationHandler(e);break;case"BlockStatement":case"Program":n=this.programHandler(e);break;case"ExpressionStatement":n=this.expressionStatementHandler(e);break;case"EmptyStatement":n=this.emptyStatementHandler(e);break;case"ReturnStatement":n=this.returnStatementHandler(e);break;case"FunctionExpression":n=this.functionExpressionHandler(e);break;case"IfStatement":n=this.ifStatementHandler(e);break;case"ConditionalExpression":n=this.conditionalExpressionHandler(e);break;case"ForStatement":n=this.forStatementHandler(e);break;case"WhileStatement":n=this.whileStatementHandler(e);break;case"DoWhileStatement":n=this.doWhileStatementHandler(e);break;case"ForInStatement":n=this.forInStatementHandler(e);break;case"WithStatement":n=this.withStatementHandler(e);break;case"ThrowStatement":n=this.throwStatementHandler(e);break;case"TryStatement":n=this.tryStatementHandler(e);break;case"ContinueStatement":n=this.continueStatementHandler(e);break;case"BreakStatement":n=this.breakStatementHandler(e);break;case"SwitchStatement":n=this.switchStatementHandler(e);break;case"LabeledStatement":n=this.labeledStatementHandler(e);break;case"DebuggerStatement":n=this.debuggerStatementHandler(e);break;default:throw this.createInternalThrowError(Fn.NodeTypeSyntaxError,e.type,e)}return(...r)=>{const a=this.options.timeout;if(a&&a>0&&this.checkTimeout())throw this.createInternalThrowError(Fn.ExecutionTimeOutError,a,null);return this.lastExecNode=e,n(...r)}}binaryExpressionHandler(e){const n=this.createClosure(e.left),r=this.createClosure(e.right);return()=>{const a=n(),i=r();switch(e.operator){case"==":return a==i;case"!=":return a!=i;case"===":return a===i;case"!==":return a!==i;case"<":return a<i;case"<=":return a<=i;case">":return a>i;case">=":return a>=i;case"<<":return a<<i;case">>":return a>>i;case">>>":return a>>>i;case"+":return a+i;case"-":return a-i;case"*":return a*i;case"**":return Math.pow(a,i);case"/":return a/i;case"%":return a%i;case"|":return a|i;case"^":return a^i;case"&":return a&i;case"in":return a in i;case"instanceof":return a instanceof i;default:throw this.createInternalThrowError(Fn.BinaryOperatorSyntaxError,e.operator,e)}}}logicalExpressionHandler(e){const n=this.createClosure(e.left),r=this.createClosure(e.right);return()=>{switch(e.operator){case"||":return n()||r();case"&&":return n()&&r();default:throw this.createInternalThrowError(Fn.LogicalOperatorSyntaxError,e.operator,e)}}}unaryExpressionHandler(e){switch(e.operator){case"delete":const n=this.createObjectGetter(e.argument),r=this.createNameGetter(e.argument);return()=>{let i=n();const o=r();return delete i[o]};default:let a;if(e.operator==="typeof"&&e.argument.type==="Identifier"){const i=this.createObjectGetter(e.argument),o=this.createNameGetter(e.argument);a=()=>i()[o()]}else a=this.createClosure(e.argument);return()=>{const i=a();switch(e.operator){case"-":return-i;case"+":return+i;case"!":return!i;case"~":return~i;case"void":return;case"typeof":return typeof i;default:throw this.createInternalThrowError(Fn.UnaryOperatorSyntaxError,e.operator,e)}}}}updateExpressionHandler(e){const n=this.createObjectGetter(e.argument),r=this.createNameGetter(e.argument);return()=>{const a=n(),i=r();switch(this.assertVariable(a,i,e),e.operator){case"++":return e.prefix?++a[i]:a[i]++;case"--":return e.prefix?--a[i]:a[i]--;default:throw this.createInternalThrowError(Fn.UpdateOperatorSyntaxError,e.operator,e)}}}objectExpressionHandler(e){const n=[];function r(i){return i.type==="Identifier"?i.name:i.type==="Literal"?i.value:this.throwError(Fn.ObjectStructureSyntaxError,i.type,i)}const a=Object.create(null);return e.properties.forEach(i=>{const o=i.kind,s=r(i.key);(!a[s]||o==="init")&&(a[s]={}),a[s][o]=this.createClosure(i.value),n.push({key:s,property:i})}),()=>{const i={},o=n.length;for(let s=0;s<o;s++){const l=n[s],c=l.key,u=a[c],d=u.init?u.init():void 0,p=u.get?u.get():function(){},h=u.set?u.set():function(g){};if("set"in u||"get"in u)Object.defineProperty(i,c,{configurable:!0,enumerable:!0,get:p,set:h});else{const g=l.property,m=g.kind;g.key.type==="Identifier"&&g.value.type==="FunctionExpression"&&m==="init"&&!g.value.id&&b6(d,g.key.name),i[c]=d}}return i}}arrayExpressionHandler(e){const n=e.elements.map(r=>r&&this.createClosure(r));return()=>{const r=n.length,a=Array(r);for(let i=0;i<r;i++){const o=n[i];o&&(a[i]=o())}return a}}safeObjectGet(e,n,r){return e[n]}createCallFunctionGetter(e){switch(e.type){case"MemberExpression":const n=this.createClosure(e.object),r=this.createMemberKeyGetter(e),a=this.source;return()=>{const o=n(),s=r(),l=this.safeObjectGet(o,s,e);if(!l||!L1(l)){const c=a.slice(e.start,e.end);throw this.createInternalThrowError(Fn.FunctionUndefinedReferenceError,c,e)}return l.__IS_EVAL_FUNC?c=>l(new da(this),c,!0):l.__IS_FUNCTION_FUNC?(...c)=>l(new da(this),...c):l.bind(o)};default:const i=this.createClosure(e);return()=>{let o="";e.type==="Identifier"&&(o=e.name);const s=i();if(!s||!L1(s))throw this.createInternalThrowError(Fn.FunctionUndefinedReferenceError,o,e);if(e.type==="Identifier"&&s.__IS_EVAL_FUNC&&o==="eval")return c=>{const u=this.getScopeFromName(o,this.getCurrentScope()),d=u.name===x6||u.name===C6||u.name===_6;return s(new da(this),c,!d)};if(s.__IS_EVAL_FUNC)return c=>s(new da(this),c,!0);if(s.__IS_FUNCTION_FUNC)return(...c)=>s(new da(this),...c);let l=this.options.globalContextInFunction;if(e.type==="Identifier"){const c=this.getIdentifierScope(e);c.name===w6&&(l=c.data)}return s.bind(l)}}}callExpressionHandler(e){const n=this.createCallFunctionGetter(e.callee),r=e.arguments.map(a=>this.createClosure(a));return()=>n()(...r.map(a=>a()))}functionExpressionHandler(e){const n=this,r=this.source,a=this.collectDeclVars,i=this.collectDeclFuncs;this.collectDeclVars=Object.create(null),this.collectDeclFuncs=Object.create(null);const o=e.id?e.id.name:"",s=e.params.length,l=e.params.map(p=>this.createParamNameGetter(p)),c=this.createClosure(e.body),u=this.collectDeclVars,d=this.collectDeclFuncs;return this.collectDeclVars=a,this.collectDeclFuncs=i,()=>{const p=n.getCurrentScope(),h=function(...g){n.callStack.push(`${o}`);const m=n.getCurrentScope(),v=cG(p,`FunctionScope(${o})`);n.setCurrentScope(v),n.addDeclarationsToScope(u,d,v),o&&(v.data[o]=h),v.data.arguments=arguments,l.forEach((x,_)=>{v.data[x()]=g[_]});const b=n.getCurrentContext();n.setCurrentContext(this);const y=c();if(n.setCurrentContext(b),n.setCurrentScope(m),n.callStack.pop(),y instanceof d0)return y.value};return b6(h,o),Object.defineProperty(h,"length",{value:s,writable:!1,enumerable:!1,configurable:!0}),Object.defineProperty(h,"toString",{value:()=>r.slice(e.start,e.end),writable:!0,configurable:!0,enumerable:!1}),Object.defineProperty(h,"valueOf",{value:()=>r.slice(e.start,e.end),writable:!0,configurable:!0,enumerable:!1}),h}}newExpressionHandler(e){const n=this.source,r=this.createClosure(e.callee),a=e.arguments.map(i=>this.createClosure(i));return()=>{const i=r();if(!L1(i)||i.__IS_EVAL_FUNC){const o=e.callee,s=n.slice(o.start,o.end);throw this.createInternalThrowError(Fn.IsNotConstructor,s,e)}return i.__IS_FUNCTION_FUNC?i(new da(this),...a.map(o=>o())):new i(...a.map(o=>o()))}}memberExpressionHandler(e){const n=this.createClosure(e.object),r=this.createMemberKeyGetter(e);return()=>{const a=n();let i=r();return a[i]}}thisExpressionHandler(e){return()=>this.getCurrentContext()}sequenceExpressionHandler(e){const n=e.expressions.map(r=>this.createClosure(r));return()=>{let r;const a=n.length;for(let i=0;i<a;i++){const o=n[i];r=o()}return r}}literalHandler(e){return()=>e.regex?new RegExp(e.regex.pattern,e.regex.flags):e.value}identifierHandler(e){return()=>{const n=this.getCurrentScope(),r=this.getScopeDataFromName(e.name,n);return this.assertVariable(r,e.name,e),r[e.name]}}getIdentifierScope(e){const n=this.getCurrentScope();return this.getScopeFromName(e.name,n)}assignmentExpressionHandler(e){e.left.type==="Identifier"&&e.right.type==="FunctionExpression"&&!e.right.id&&(e.right.id={type:"Identifier",name:e.left.name});const n=this.createObjectGetter(e.left),r=this.createNameGetter(e.left),a=this.createClosure(e.right);return()=>{const i=n(),o=r(),s=a();switch(e.operator!=="="&&this.assertVariable(i,o,e),e.operator){case"=":return i[o]=s;case"+=":return i[o]+=s;case"-=":return i[o]-=s;case"*=":return i[o]*=s;case"**=":return i[o]=Math.pow(i[o],s);case"/=":return i[o]/=s;case"%=":return i[o]%=s;case"<<=":return i[o]<<=s;case">>=":return i[o]>>=s;case">>>=":return i[o]>>>=s;case"&=":return i[o]&=s;case"^=":return i[o]^=s;case"|=":return i[o]|=s;default:throw this.createInternalThrowError(Fn.AssignmentExpressionSyntaxError,e.type,e)}}}functionDeclarationHandler(e){if(e.id){const n=this.functionExpressionHandler(e);Object.defineProperty(n,"isFunctionDeclareClosure",{value:!0,writable:!1,configurable:!1,enumerable:!1}),this.funcDeclaration(e.id.name,n)}return()=>Tn}getVariableName(e){if(e.type==="Identifier")return e.name;throw this.createInternalThrowError(Fn.VariableTypeSyntaxError,e.type,e)}variableDeclarationHandler(e){let n;const r=[];for(let a=0;a<e.declarations.length;a++){const i=e.declarations[a];this.varDeclaration(this.getVariableName(i.id)),i.init&&r.push({type:"AssignmentExpression",operator:"=",left:i.id,right:i.init})}return r.length&&(n=this.createClosure({type:"BlockStatement",body:r})),()=>{if(n){const a=this.isVarDeclMode;this.isVarDeclMode=!0,n(),this.isVarDeclMode=a}return Tn}}assertVariable(e,n,r){if(e===this.globalScope.data&&!(n in e))throw this.createInternalThrowError(Fn.VariableUndefinedReferenceError,n,r)}programHandler(e){const n=e.body.map(r=>this.createClosure(r));return()=>{let r=Tn;for(let a=0;a<n.length;a++){const i=n[a],o=this.setValue(i());if(o!==Tn&&(r=o,r instanceof d0||r instanceof $a||r instanceof oa||r===Di||r===Ri))break}return r}}expressionStatementHandler(e){return this.createClosure(e.expression)}emptyStatementHandler(e){return()=>Tn}returnStatementHandler(e){const n=e.argument?this.createClosure(e.argument):Tl;return()=>new d0(n())}ifStatementHandler(e){const n=this.createClosure(e.test),r=this.createClosure(e.consequent),a=e.alternate?this.createClosure(e.alternate):(()=>Tn);return()=>n()?r():a()}conditionalExpressionHandler(e){return this.ifStatementHandler(e)}forStatementHandler(e){let n=Tl,r=e.test?this.createClosure(e.test):()=>!0,a=Tl;const i=this.createClosure(e.body);return e.type==="ForStatement"&&(n=e.init?this.createClosure(e.init):n,a=e.update?this.createClosure(e.update):Tl),o=>{let s,l=Tn,c=e.type==="DoWhileStatement";for(o&&o.type==="LabeledStatement"&&(s=o.label.name),n();c||r();a()){c=!1;const u=this.setValue(i());if(!(u===Tn||u===Ri)){if(u===Di)break;if(l=u,l instanceof oa&&l.value===s){l=Tn;continue}if(l instanceof d0||l instanceof $a||l instanceof oa)break}}return l}}whileStatementHandler(e){return this.forStatementHandler(e)}doWhileStatementHandler(e){return this.forStatementHandler(e)}forInStatementHandler(e){let n=e.left;const r=this.createClosure(e.right),a=this.createClosure(e.body);return e.left.type==="VariableDeclaration"&&(this.createClosure(e.left)(),n=e.left.declarations[0].id),i=>{let o,s=Tn,l;i&&i.type==="LabeledStatement"&&(o=i.label.name);const c=r();for(l in c){this.assignmentExpressionHandler({type:"AssignmentExpression",operator:"=",left:n,right:{type:"Literal",value:l}})();const u=this.setValue(a());if(!(u===Tn||u===Ri)){if(u===Di)break;if(s=u,s instanceof oa&&s.value===o){s=Tn;continue}if(s instanceof d0||s instanceof $a||s instanceof oa)break}}return s}}withStatementHandler(e){const n=this.createClosure(e.object),r=this.createClosure(e.body);return()=>{const a=n(),i=this.getCurrentScope(),o=new Fi(a,i,w6);this.setCurrentScope(o);const s=this.setValue(r());return this.setCurrentScope(i),s}}throwStatementHandler(e){const n=this.createClosure(e.argument);return()=>{throw this.setValue(void 0),n()}}tryStatementHandler(e){const n=this.createClosure(e.block),r=e.handler?this.catchClauseHandler(e.handler):null,a=e.finalizer?this.createClosure(e.finalizer):null;return()=>{const i=this.getCurrentScope(),o=this.getCurrentContext(),s=i.labelStack.concat([]),l=this.callStack.concat([]);let c=Tn,u,d;const p=()=>{this.setCurrentScope(i),this.setCurrentContext(o),i.labelStack=s,this.callStack=l};try{c=this.setValue(n()),c instanceof d0&&(u=c)}catch(h){if(p(),this.isInterruptThrow(h))throw h;if(r)try{c=this.setValue(r(h)),c instanceof d0&&(u=c)}catch(g){if(p(),this.isInterruptThrow(g))throw g;d=g}}if(a)try{c=a(),c instanceof d0&&(u=c)}catch(h){if(p(),this.isInterruptThrow(h))throw h;d=h}if(d)throw d;return u||c}}catchClauseHandler(e){const n=this.createParamNameGetter(e.param),r=this.createClosure(e.body);return a=>{let i;const o=this.getCurrentScope().data,s=n(),l=lG.call(o,s),c=o[s];return o[s]=a,i=r(),l?o[s]=c:delete o[s],i}}continueStatementHandler(e){return()=>e.label?new oa(e.label.name):Ri}breakStatementHandler(e){return()=>e.label?new $a(e.label.name):Di}switchStatementHandler(e){const n=this.createClosure(e.discriminant),r=e.cases.map(a=>this.switchCaseHandler(a));return()=>{const a=n();let i=!1,o,s,l=0,c=!1;for(let u=0;u<2;u++){for(let d=l;d<r.length;d++){const p=r[d](),h=p.testClosure();if(!c&&h===y6&&(c=!0,l=d),i||h===a){if(i=!0,s=this.setValue(p.bodyClosure()),s===Tn)continue;if(s===Di||(o=s,o instanceof d0||o instanceof $a||o instanceof oa||o===Ri))break}}if(!i&&c)i=!0;else break}return o}}switchCaseHandler(e){const n=e.test?this.createClosure(e.test):()=>y6,r=this.createClosure({type:"BlockStatement",body:e.consequent});return()=>({testClosure:n,bodyClosure:r})}labeledStatementHandler(e){const n=e.label.name,r=this.createClosure(e.body);return()=>{let a;const i=this.getCurrentScope();return i.labelStack.push(n),a=r(e),a instanceof $a&&a.value===n&&(a=Tn),i.labelStack.pop(),a}}debuggerStatementHandler(e){return()=>{debugger;return Tn}}createParamNameGetter(e){if(e.type==="Identifier")return()=>e.name;throw this.createInternalThrowError(Fn.ParamTypeSyntaxError,e.type,e)}createObjectKeyGetter(e){let n;return e.type==="Identifier"?n=()=>e.name:n=this.createClosure(e),function(){return n()}}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(Fn.AssignmentTypeSyntaxError,e.type,e)}}createNameGetter(e){switch(e.type){case"Identifier":return()=>e.name;case"MemberExpression":return this.createMemberKeyGetter(e);default:throw this.createInternalThrowError(Fn.AssignmentTypeSyntaxError,e.type,e)}}varDeclaration(e){const n=this.collectDeclVars;n[e]=void 0}funcDeclaration(e,n){const r=this.collectDeclFuncs;r[e]=n}addDeclarationsToScope(e,n,r){const a=r.data;for(let i in n){const o=n[i];a[i]=o&&o()}for(let i in e)i in a||(a[i]=void 0)}getScopeValue(e,n){return this.getScopeFromName(e,n).data[e]}getScopeDataFromName(e,n){return this.getScopeFromName(e,n).data}getScopeFromName(e,n){let r=n;do if(e in r.data)return r;while(r=r.parent);return this.globalScope}setValue(e){const n=this.callStack.length;return this.isVarDeclMode||n||e===Tn||e===Di||e===Ri||e instanceof $a||e instanceof oa||(this.value=e instanceof d0?e.value:e),e}getValue(){return this.value}};Z0.version=sG;Z0.eval=rh;Z0.Function=ah;Z0.ecmaVersion=5;Z0.globalContextInFunction=void 0;Z0.global=Object.create(null);const dG=(()=>{try{return new Function("return 1")(),!0}catch(t){return!1}})();function A2(t){if(typeof globalThis>"u")return;const e=globalThis[0]||globalThis;if(e.__simulator__)try{const n=e.__simulator__.engine.provider.errorHandler;n&&n(t)}catch(n){}}function pG(t,e){return new Z0(e,{rootContext:e,globalContextInFunction:e}).evaluate(`(function($scope){ ${t} }).call(this, this)`)}function Pr(t,e,n=!1,r=!1,a=!1){var i;try{const o=['"use strict";',"var __self = arguments[0];"];o.push("return ");let s=(t.value||"").trim();a||(s=s.replace(/this(\W|$)/g,(c,u)=>`__self${u}`)),s=o.join(`
|
|
97
97
|
`)+s;const l=a?`
|
|
98
98
|
${s}
|
|
99
|
-
`:`with(${n?"{}":"$scope || {}"}) { ${s} }`;return dG?new Function("$scope",l)(e):pG(l,e)}catch(o){if(er.error("parseExpression.error",o,t,(i=e==null?void 0:e.__self)!=null?i:e),A2(o),r)throw o}}function tr(t,e,n=!1,r=!1,a=!1){var o;const i=Pr(t,e,n,r,a);if(typeof i!="function"&&(er.error("parseFunction.error","not a function",t,(o=e==null?void 0:e.__self)!=null?o:e),r))throw new Error(`"${t.value}" not a function`);return i}function Dt(t){return t&&t.type==="JSExpression"}function En(t){return typeof t=="object"&&t&&t.type==="JSFunction"}function lC(t){return Dt(t)||En(t)}function G0(t){return lC(t)?t.value.startsWith("{")?`(${t.value})`:t.value:JSON.stringify(t)}const hG={session:!1,authKey:"Authorization",storageKey:"ACCESS_STORAGE",storagePrefix:"__VTJ_",unauthorized:void 0,auth:"/#/login",redirectParam:"r",unauthorizedCode:401,unauthorizedMessage:"登录已经失效,请重新登录!",noPermissionMessage:"无权限访问该页面",appName:"",statusKey:"code"},ih=Symbol("access");let il=class{constructor(e){X(this,"options");X(this,"data",null);X(this,"mode",Qt.Raw);X(this,"interceptResponse",!0);X(this,"isTipShowing",!1);this.options=Object.assign({},hG,e),this.loadData()}enableIntercept(){this.interceptResponse=!0}disableIntercept(){this.interceptResponse=!1}connect(e){const{mode:n,router:r,request:a}=e;this.mode=n,r&&this.mode!==Qt.Design&&this.setGuard(r),a&&this.setRequest(a)}login(e){const{storageKey:n,storagePrefix:r,session:a,authKey:i}=this.options;this.setData(e),this.data&&(cr.save(n,e,{type:"local",prefix:r}),a&&s1.set(i,this.data.token))}clear(){const{storageKey:e,storagePrefix:n,session:r,authKey:a}=this.options;this.data=null,cr.remove(e,{type:"local",prefix:n}),r&&s1.remove(a)}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:n}=this.options,{permissions:r={}}=this.data||{};if(typeof e=="function")return e(r);const a=F0(e);return Array.isArray(r)?a.every(i=>r.includes(i)||r.includes(n+"."+i)):a.every(i=>r[i]||r[n+"."+i])}some(e){const{appName:n}=this.options,{permissions:r={}}=this.data||{},a=F0(e);return Array.isArray(r)?a.some(i=>r.includes(i)||r.includes(n+"."+i)):a.some(i=>r[i]||r[n+"."+i])}install(e){e.config.globalProperties.$access=this,e.provide(ih,this)}isAuthPath(e){const{auth:n,isAuth:r}=this.options;if(r)return r(e);if(e.path&&typeof n=="string"){const a=n.split("#")[1]||n;return e.path===a}return!1}toLogin(){const{auth:e,redirectParam:n}=this.options;if(!e)return;const r=n?`?${n}=${encodeURIComponent(location.href)}`:"";typeof e=="function"?e(r):location.href=n?`${e}${r}`:e}setData(e){const{privateKey:n}=this.options;if(Array.isArray(e)&&n){const r=e.map(a=>og(a,n));try{this.data=JSON.parse(r.join(""))}catch(a){console.warn(a)}return}if(typeof e=="string")try{const r=n?og(e,n):e;r?this.data=JSON.parse(r):console.warn("RSA解密失败或登录信息缺失")}catch(r){console.warn(r)}else this.data=e}loadData(){const{storageKey:e,storagePrefix:n}=this.options,r=cr.get(e,{type:"local",prefix:n});this.setData(r||null)}isLogined(){const{session:e,authKey:n}=this.options;return e&&n?!!s1.get(n):!!this.getToken()}hasRoutePermission(e){if(e.name===Zi){const n=e.params.id;return n&&this.can(n)}return e.meta.__vtj__?this.can(e.meta.__vtj__):e.meta.permission?this.can(e.meta.permission):!0}setGuard(e){e.beforeEach((n,r,a)=>this.guard(n,a))}guard(e,n){return V(this,null,function*(){if(this.isWhiteList(e)||this.isAuthPath(e))return n();if(this.isLogined()){if(this.hasRoutePermission(e))return n();{const{noPermissionMessage:r="无权限访问",unauthorized:a=!1}=this.options;return yield this.showTip(r),jn(a)?(a(),n(!1)):sr(a)?n(a):n(!1)}}n(!1),yield Le(0),this.toLogin()})}isWhiteList(e){const{whiteList:n}=this.options;return n?Array.isArray(n)?n.some(r=>e.fullPath.startsWith(r)):n(e):!1}isUnauthorized(e){var a;const{unauthorizedCode:n=401,statusKey:r="code"}=this.options;return e.status===n||((a=e.data)==null?void 0:a[r])===n}showUnauthorizedAlert(e){return V(this,null,function*(){const{unauthorizedMessage:n="登录已失效"}=this.options;this.isUnauthorized(e)&&(yield this.showTip(n))&&this.toLogin()})}showTip(e){return V(this,null,function*(){var r,a,i,o;const{alert:n}=this.options;return this.isTipShowing?!1:n?(this.isTipShowing=!0,yield Le(150),yield(a=(r=n(e,{title:"提示",type:"warning"}))==null?void 0:r.catch(()=>!0))==null?void 0:a.finally(()=>{this.isTipShowing=!1})):((o=(i=globalThis.alert)==null?void 0:i.call(globalThis,e))!=null||console.warn(e),!0)})}setRequest(e){e.useRequest(n=>{var r,a;return(r=this.data)!=null&&r.token&&(n.headers[this.options.authKey]=(a=this.data)==null?void 0:a.token),n}),e.useResponse(n=>V(this,null,function*(){return this.interceptResponse&&(yield this.showUnauthorizedAlert(n)),n}),n=>V(this,null,function*(){if(!this.interceptResponse)return Promise.reject(n);const r=n.response||n||{};return yield this.showUnauthorizedAlert(r),Promise.reject(n)}))}};function cC(){return zr(ih,null)}function fG(t={}){const{notify:e,loading:n,settings:r={},Startup:a,access:i,useTitle:o,alert:s}=t;let l=null;return{request:M3({adapter:t.axiosAdapter,settings:G({type:"form",validSuccess:!1,originResponse:!0,loading:!0,validate:c=>{var u,d;return((u=c.data)==null?void 0:u.code)===0||!!((d=c.data)!=null&&d.success)},failMessage:!0,showError:c=>{e&&e(c||"未知错误")},showLoading:()=>{l&&l.close(),n&&(l=n())},hideLoading:()=>{l&&(l.close(),l=null)}},r)}),jsonp:m0,notify:e,loading:n,useTitle:o,alert:s,startupComponent:a,access:i?new il(G({alert:s},i)):void 0}}function gG(t={}){return new il(t)}function oh(t,e){const{jsonp:n,request:r}=e;if(t.method==="jsonp")return(a={})=>n(t.url,fe(G({},t.jsonpOptions),{query:a}));{const a=t.headers?Pr(t.headers,{},!0):void 0,i={url:t.url,method:t.method,settings:fe(G({},t.settings),{headers:a})};return(o,s)=>(delete i.data,r.send(lr(i,s||{},{data:o})))}}function uC(t,e){const{metaQuery:n}=e;if(!n)return;const{code:r,queryCode:a}=t;return(i,o)=>{if(!n){console.warn("adapter.metaQuery is not defined!");return}return n(r,a,i,o)}}function sh(t=[],e=[],n){const r={};for(const a of t){const i=oh(a,n);r[a.id]=i,r[a.name]=i}for(const a of e)r[a.id]=uC(a,n);return r}function lh(){return V(this,arguments,function*(t=[],e=globalThis){const n=oo(e);n&&(Tc(e),t.forEach(r=>dC(n,r)))})}function ch(t,e=globalThis){const n=En(t.mockTemplate)&&t.mockTemplate.value?tr(t.mockTemplate,{},!0):void 0,r=oo(e);return(...a)=>V(null,null,function*(){let i={};if(n)try{i=yield n.apply(n,a)}catch(o){er.warn("模拟数据模版异常",o)}return r==null?void 0:r.mock(i)})}function dC(t,e){if(!e.mock)return;const{url:n,mockTemplate:r,method:a="get",settings:i={}}=e;if(n&&r)try{const o=no(n)?new URL(n).pathname:n,s=V3(`(.*)${o}`,[],{end:!1}),l=new RegExp(s.source+"([?#].*)?$",s.flags),c=xP(o,{decode:decodeURIComponent}),u=Pr(r,{},!0);t.mock(l,a.toLowerCase(),d=>{var b;const p=si.parse(d.url)||{},h=i.type||"form";let g=d.body instanceof FormData?NP(d.body):d.body;if(typeof g=="string")if(h==="json")try{g=JSON.parse(g)}catch(y){console.warn("[Mock.mock]",y)}else g=si.parse(g);const m=no(d.url)?new URL(d.url).pathname:d.url.split("?")[0],v=(b=c(m))==null?void 0:b.params;Object.assign(d,{data:g,params:v,query:p});try{return t.mock(u(d))}catch(y){return console.warn("[mockApi]",l,d,y),null}})}catch(o){console.warn("mockApi",o)}}function Tc(t=globalThis){const e=oo(t);e&&(e._mocked={})}let pC=class{constructor(e){X(this,"__id",null);X(this,"__mode");X(this,"__instance",null);X(this,"__contextRefs",{});X(this,"__refs",{});X(this,"__refCaches",{});X(this,"context",{});X(this,"state",{});X(this,"props",{});X(this,"$props",{});X(this,"$state",{});X(this,"$refs",{});X(this,"$el",null);X(this,"$emit",null);X(this,"$nextTick",null);X(this,"$parent",null);X(this,"$root",null);X(this,"$attrs",null);X(this,"$slots",null);X(this,"$watch",null);X(this,"$options",null);X(this,"$forceUpdate",null);X(this,"$components",{});X(this,"$libs",{});X(this,"$apis",{});X(this,"$provider",null);X(this,"$uni",null);X(this,"$getApp",null);X(this,"__transform",{});const{mode:n,dsl:r,attrs:a}=e;this.__mode=n,r&&(this.__id=r.id||null,this.__transform=r.transform||{}),a&&Object.assign(this,a)}setup(e,n=$2){var o,s,l,c;const r=n.getCurrentInstance();if(!r)return;this.__refs={},this.__refCaches={},this.$refs={},this.context={},this.__contextRefs={},this.__instance=r.proxy;const{state:a}=this,i=r.appContext.config.globalProperties;Object.assign(this,i,e||{}),this.$uni=(s=(o=this.$libs.UniH5)==null?void 0:o.uni)!=null?s:null,this.$getApp=(c=(l=this.$libs.UniH5)==null?void 0:l.getApp)!=null?c:null,this.$state=this.state=a,this.__proxy(),n.onMounted(()=>{this.__proxy()}),n.onUnmounted(()=>{this.__cleanup()}),n.onBeforeUpdate(()=>{if(this.__proxy(),this.$props)for(const u of Object.keys(this.$props))this[u]=this.$props[u];this.__reset()})}__proxy(){if(!this.__instance)return;const e=this.__instance;Tu.forEach(n=>{var r;this[n]=e[n]||((r=e._)==null?void 0:r[n.replace("$","")])||null})}__cleanup(){Tu.forEach(e=>{this[e]=null}),this.__reset()}__reset(){this.__refs={},this.__refCaches={},this.$refs={},this.__contextRefs={},this.context={}}__parseFunction(e){var n;if(e)if(this.__mode===Qt.Runtime){const{id:r,type:a}=e,i=r&&(n=this.__transform[r])!=null?n:e.value;return tr({type:a,value:i},this)}else return tr(e,this)}__parseExpression(e){var n;if(e)if(this.__mode===Qt.Runtime){const{id:r,type:a}=e,i=r&&(n=this.__transform[r])!=null?n:e.value;return Pr({type:a,value:i},this)}else return Pr(e,this)}__ref(e=null,n){if(this.__mode===Qt.VNode)return;e&&e!==this.__id&&(this.__contextRefs[e]=this);let r=e?this.__refCaches[e]:null;return r||(r=a=>V(this,null,function*(){var o,s;yield Le(0);let i=(a==null?void 0:a.$vtjEl)||(a==null?void 0:a.$el)||((s=(o=a==null?void 0:a._)==null?void 0:o.vnode)==null?void 0:s.el)||a;if(!i){typeof n=="string"&&(delete this.$refs[n],this[n]&&zn(this[n])&&(this[n].value=null),e&&delete this.__refs[e]);return}return i.nodeType===3&&i.nextSibling&&(i=i.nextSibling),i.__vtj__=e,Qt.Design===this.__mode&&(i.__context__=this,i.draggable=!0),e&&(this.__refs[e]=this.__getRefEl(this.__refs,e,a)),typeof n=="function"?n(a):n&&(this.$refs[n]=this.__getRefEl(this.$refs,n,a),this[n]&&zn(this[n])&&(this[n].value=this.$refs[n])),a}),e&&(this.__refCaches[e]=r),r)}__getRefEl(e,n,r){const a=e[n];if(a&&r!==a){const i=new Set([].concat(a,r));return Array.from(i)}else return r}__clone(e={}){const n=G(G({},this.context),e),r=fe(G({},n),{context:n});return r.context.__proto__=this.context,r.__proto__=this,r}};function T2(t){var p,g;const{Vue:e=$2,UniApp:n={},mode:r=Qt.Runtime,components:a={},libs:i={},apis:o={},loader:s}=t,l=e.computed(()=>t.dsl),c={$components:a,$libs:i,$apis:o},u=new pC({mode:r,dsl:l.value,attrs:c}),d=e.defineComponent(G({name:l.value.name,__scopeId:l.value.id?`data-v-${l.value.id}`:void 0,props:G({},vG((p=l.value.props)!=null?p:[],u)),setup(){return V(this,arguments,function*(m={}){var M,A,L,$,R,z,F,j,D;u.$props=u.props=m,l.value.id&&nl(t.window||globalThis,l.value.id,l.value.css||"",!0);const v=l.value.apiMode==="composition";u.$state=u.state=bG(e,(M=l.value.state)!=null?M:{},u);const b=v?CG(e,(A=l.value.refs)!=null?A:{},u):{},y=v?kG(e,(L=l.value.reactives)!=null?L:{},u):{},x=yG(e,($=l.value.computed)!=null?$:{},u),_=wG((R=l.value.methods)!=null?R:{},u),C=xG(e,l.value.inject,u),w=hC(l.value.dataSources||{},u);let k={};v&&(k=EG((z=l.value.composables)!=null?z:[],u));const I=G(G(G(G(G(G(G(G({},m),b),y),C),x),_),w),k);if(u.setup(I,e),_G(e,(F=l.value.watch)!=null?F:[],u),v){if(yield IG(e,(j=l.value.lifeCycles)!=null?j:{},u,n),l.value.setup){const P=u.__parseFunction(l.value.setup);if(jn(P))try{yield P()}catch(Q){console.warn("[VTJ] Composition setup 执行失败",Q)}}SG(e,(D=l.value.provide)!=null?D:{},u)}return G(G(G(G(G({vtj:u,state:u.state,$state:u.$state},m),b),y),x),_)})},emits:mG(l.value.emits),expose:["vtj",...l.value.expose||[]],render(){const m=l.value;if(m.refs)for(const b of Object.keys(m.refs))this[b];if(m.reactives)for(const b of Object.keys(m.reactives)){const y=this[b];if(y&&typeof y=="object")for(const x of Object.keys(y))y[x]}if(m.state){const b=this.state;for(const y of Object.keys(m.state))b[y]}if(m.computed)for(const b of Object.keys(m.computed))this[b];if(m.inject)for(const b of m.inject)this[b.name];if(!m.nodes)return null;const v=m.nodes||[];if(v.length===1)return hi(v[0],u,e,s,v);{const b=v.map(y=>hi(y,u,e,s,v)).flat();return e.createVNode("div",{},b)}}},l.value.apiMode!=="composition"?AG((g=l.value.lifeCycles)!=null?g:{},u):{}));return{renderer:e.markRaw(d),context:u}}function mG(t=[]){return t.map(e=>sr(e)?e:e.name)}function vG(t=[],e){const n=r=>r?(Array.isArray(r)?r:[r]).map(a=>Pp[a]):void 0;return t.map(r=>sr(r)?{name:r}:{name:r.name,type:r.type,required:r.required,default:Dt(r.default)?e.__parseExpression(r.default):r.default}).reduce((r,a)=>(r[a.name]={type:n(a.type),required:a.required,default:a.default},r),{})}function bG(t,e,n){return t.reactive(Object.keys(e||{}).reduce((r,a)=>{let i=e[a];return Dt(i)?i=n.__parseExpression(i):En(i)&&(i=n.__parseFunction(i)),r[a]=i,r},{}))}function yG(t,e,n){return Object.entries(e!=null?e:{}).reduce((r,[a,i])=>(En(i)?r[a]=t.computed(n.__parseFunction(i)):r[a]=t.computed(n.__parseExpression(i)),r),{})}function wG(t,e){return Object.entries(t!=null?t:{}).reduce((n,[r,a])=>(n[r]=e.__parseFunction(a),n),{})}function xG(t,e=[],n){return e.reduce((r,a)=>{var c;const{name:i,from:o}=a||{},s=Dt(o)?n.__parseExpression(o)||i:o!=null?o:i,l=Dt(a.default)?n.__parseExpression(a.default):(c=a.default)!=null?c:null;return r[i]=t.inject(s,l),r},{})}function hC(t,e){return Object.keys(t).reduce((n,r)=>{const a=t[r];if(a.type==="mock")n[r]=ch(a);else if(a.ref){const i=e.$apis[a.ref],o=En(a.transform)?a.transform.value?e.__parseFunction(a.transform):void 0:a.transform;n[r]=(...s)=>V(null,null,function*(){const l=yield i.apply(e,s);return o?o(l):l})}return n},{})}function _G(t,e=[],n){e.forEach(r=>{t.watch(n.__parseExpression(r.source),n.__parseFunction(r.handler),{deep:r.deep,immediate:r.immediate,flush:r.flush})})}function CG(t,e,n){return Object.entries(e).reduce((r,[a,i])=>{const o=Dt(i)?n.__parseExpression(i):i;return r[a]=t.ref(o),r},{})}function kG(t,e,n){return Object.entries(e).reduce((r,[a,i])=>{const o=Dt(i)?n.__parseExpression(i):i;return r[a]=t.reactive(o!=null?o:{}),r},{})}function EG(t,e){return t.reduce((n,r)=>{try{let a;if(Dt(r.composable)?a=e.__parseExpression(r.composable):sr(r.composable)&&(a=e.$libs[r.composable]),jn(a)){const i=(r.args||[]).map(s=>Dt(s)?e.__parseExpression(s):s),o=a(...i);if(r.destructure&&r.destructure.length>0)for(const s of r.destructure)n[s]=o==null?void 0:o[s];else n[r.name]=o}}catch(a){e.__mode===Qt.Design&&(console.warn("[VTJ] composable 执行失败,已降级处理",a),n[r.name]={})}return n},{})}function SG(t,e,n){Object.entries(e).forEach(([r,a])=>{let i=a;Dt(a)?i=n.__parseExpression(a):En(a)&&(i=n.__parseFunction(a)),t.provide(r,i)})}function IG(a,i,o){return V(this,arguments,function*(t,e,n,r={}){const s={beforeMount:"onBeforeMount",mounted:"onMounted",beforeUpdate:"onBeforeUpdate",updated:"onUpdated",beforeUnmount:"onBeforeUnmount",unmounted:"onUnmounted",errorCaptured:"onErrorCaptured",renderTracked:"onRenderTracked",renderTriggered:"onRenderTriggered",activated:"onActivated",deactivated:"onDeactivated"};for(const[l,c]of Object.entries(e)){if(l==="created"||l==="beforeCreate"){const p=n.__parseFunction(c);if(jn(p))try{yield p()}catch(h){console.warn(`[VTJ] Composition 生命周期 "${l}" 执行失败`,h),A2(h)}continue}const u=s[l]||l,d=t[u]||r[u];if(d&&jn(d)){const p=n.__parseFunction(c);jn(p)&&d(()=>V(null,null,function*(){try{yield Le(0),yield p()}catch(h){console.warn(`[VTJ] Composition 生命周期 "${l}" 执行失败`,h),A2(h)}}))}else console.warn(`[VTJ] 无效的 Composition 生命周期钩子 "${l}"`)}})}function AG(t,e){return Object.entries(t!=null?t:{}).reduce((n,[r,a])=>{const i=e.__parseFunction(a);return n[r]=()=>V(null,null,function*(){jn(i)&&(yield Le(0),yield i())}),n},{})}class TG{constructor(){X(this,"__props",{});X(this,"__events",{});X(this,"__nodes",{})}setProps(e,n){this.__props[e]=n}getProps(e){return this.__props[e]}loadProps(e,n){return(e?this.getProps(e):null)||(e&&this.setProps(e,n),n)}setEvents(e,n){}getEvents(e){return this.__events[e]}loadEvents(e,n){return(e?this.getEvents(e):null)||(e&&this.setEvents(e,n),n)}setNode(e,n){this.__nodes[e]=n}getNode(e){return this.__nodes[e]}loadNode(e,n){return(e?this.getNode(e):null)||(e&&this.setNode(e,n),n)}isEqual(e,n){return oi(e,n)}isNodeEqual(e,n){if(e===n)return!0;if(!e||!n)return!1;const r=s=>!s||typeof s!="object"?[]:Object.keys(s).filter(l=>jn(s[l])),a=s=>{if(!s||typeof s!="object")return s;const l={};for(const c in s)if(Object.prototype.hasOwnProperty.call(s,c)){const u=s[c];jn(u)||(l[c]=u)}return l},i=r(e).sort(),o=r(n).sort();return oi(i,o)?oi(a(e),a(n)):!1}clear(){this.__props={},this.__events={},this.__nodes={}}}const ri=new TG,fC=new TP;let O1=[],Ya={},qo={};const gC=(t,e)=>e;function uh(n){return V(this,arguments,function*(t,e=globalThis){const{urls:r=[],library:a}=t,i=r.filter(s=>tl(s));if(i.length===0||!a)return null;const o=r.filter(s=>el(s));return o.length&&Gp(o,e),yield Jp(i,a,e).catch(s=>(console.warn("loadScriptUrl error",i,a,s),null))})}function V2(t){const{getDsl:e,getDslByUrl:n,options:r}=t;return r.window&&(O1.forEach(a=>{delete r.window[a]}),O1=[]),(a,i,o,s=$2)=>{if(!o||typeof o=="string")return i;let l="";if(o.type==="Schema"&&o.id)return l=o.id+"_"+a,qo[l]||(qo[l]=s.defineAsyncComponent(()=>V(null,null,function*(){const c=Ya[o.id]||(yield fC.add(o.id,()=>e(o.id)));return c&&(c.name=i,Ya[o.id]=c),c?T2(fe(G({Vue:s,mode:Qt.Runtime},r),{dsl:Xn(c),loader:V2(t)})).renderer:null})));if(o.type==="UrlSchema"&&o.url)return l=o.url+"_"+a,qo[l]||(qo[l]=s.defineAsyncComponent(()=>V(null,null,function*(){const c=Ya[o.url]||(yield n(o.url));return c&&(c.name=i,Ya[o.url]=c),c?T2(fe(G({},r),{Vue:s,dsl:Xn(c),mode:Qt.Runtime,loader:V2(t)})).renderer:null})));if(o.type==="Plugin"){let c=o.library?Ya[o.library]:null;return c||(o.library&&O1.push(o.library),c=Ya[o.library||Symbol()]=s.defineAsyncComponent(()=>V(null,null,function*(){return(yield uh(o,r.window))||(console.warn("getPlugin result is null",o),null)})),c)}return i}}function Ru(){Ya={},qo={},fC.clearAllCache(),ri.clear()}function hi(t,e,n=$2,r=gC,a=[],i=!1,o=0){var _;if(!t||!t.name||t.invisible)return null;const s=(_=n.getCurrentInstance())==null?void 0:_.appContext,{id:l=null,directives:c=[]}=t,{vIf:u,vElseIf:d,vElse:p,vFor:h,vShow:g,vModels:m,vBind:v,vHtml:b,others:y}=mC(c);if(!i&&(d||p))return null;if(u&&!MG(u,e))return zG(t,e,n,r,a);const x=(C,w=0)=>{var Q,ee,Y,Z;const k=C.$components,I=(()=>{var re,$e,nt,gt;if(t.name==="component")return LG(C,(re=t.props)==null?void 0:re.is);if(t.name==="slot")return t.name;const te=r(`${t.id}_${w}`,t.name,t.from,n);return sr(te)?I_(te)||A_(te)?te:(gt=(nt=k[te])!=null?nt:($e=s==null?void 0:s.app)==null?void 0:$e.component(te))!=null?gt:te:te})(),M=OG(l,(Q=t.props)!=null?Q:{},C),A=jG(n,t.id,(ee=t.events)!=null?ee:{},C);if(t.name==="slot")return NG(n,t,M,C,r);v&&Object.assign(M,C.__parseExpression(v.value)),g&&(M.style=Object.assign((Y=M.style)!=null?Y:{},PG(g,C))),b&&Object.assign(M,HG(b,C)),m.forEach(te=>{_c.includes(t.name)?Object.assign(M,$G(te,C)):Object.assign(M,FG(n,te,C))});const L=UG(n,(Z=t.children)!=null?Z:[],C,r,t),$=C!=null&&C.__id?`data-v-${C.__id}`:void 0,R=$?{[$]:""}:{},z=C.__mode===Qt.Design?{"data-vtj":l}:{},F=`${l}_${w}`,j=G(G(G({key:F},R),z),M);ri.isNodeEqual(j,ri.getNode(F))||ri.setNode(F,j);let D=n.createVNode(I,G(G({},ri.getNode(F)||j),A),L);const P=s?VG(s,y,C):[];return P.length&&(D=n.withDirectives(D,P)),D};return h?qG(h,x,e):x(e,o)}function VG(t,e,n){const r=t.app;return e.map(a=>{const i=typeof a.name=="string"?r.directive(a.name):n.__parseExpression(a.name);if(!i)return null;const o=[i];return a.value&&o.push(n.__parseExpression(a.value)),a.arg&&o.push(a.arg),a.modifiers&&o.push(a.modifiers),o}).filter(a=>!!a)}function mC(t=[]){const e=t.find(u=>br(u.name)==="vIf"),n=t.find(u=>br(u.name)==="vElseIf"),r=t.find(u=>br(u.name)==="vElse"),a=t.find(u=>br(u.name)==="vFor"),i=t.find(u=>br(u.name)==="vShow"),o=t.find(u=>br(u.name)==="vBind"),s=t.find(u=>br(u.name)==="vHtml"),l=t.filter(u=>br(u.name)==="vModel"),c=t.filter(u=>!Bp.includes(br(u.name)));return{vIf:e,vElseIf:n,vElse:r,vFor:a,vShow:i,vModels:l,vBind:o,others:c,vHtml:s}}function MG(t,e){return!!e.__parseExpression(t.value)}function LG(t,e){return e?Dt(e)?t.__parseExpression(e):e:"div"}function OG(t,e,n){const r=ju(e,n);return r.ref=n.__ref(t,r.ref),r}function ju(t,e){return Dt(t)?e.__parseExpression(t):En(t)?e.__parseFunction(t):Array.isArray(t)?t.map(n=>ju(n,e)):typeof t=="object"?Object.keys(t||{}).reduce((n,r)=>{let a=t[r];return n[r]=ju(a,e),n},{}):t}function DG(t,e){return n=>{var r;((r=n==null?void 0:n.key)==null?void 0:r.toLowerCase())===e.toLowerCase()&&t(n)}}function RG(t){return T_(t.value)?t:V_(t.value)?{type:"JSFunction",value:`(...args) => (() => {
|
|
99
|
+
`:`with(${n?"{}":"$scope || {}"}) { ${s} }`;return dG?new Function("$scope",l)(e):pG(l,e)}catch(o){if(er.error("parseExpression.error",o,t,(i=e==null?void 0:e.__self)!=null?i:e),o&&(o.info=t.value),A2(o),r)throw o}}function tr(t,e,n=!1,r=!1,a=!1){var o;const i=Pr(t,e,n,r,a);if(typeof i!="function"&&(er.error("parseFunction.error","not a function",t,(o=e==null?void 0:e.__self)!=null?o:e),r))throw new Error(`"${t.value}" not a function`);return i}function Dt(t){return t&&t.type==="JSExpression"}function En(t){return typeof t=="object"&&t&&t.type==="JSFunction"}function lC(t){return Dt(t)||En(t)}function G0(t){return lC(t)?t.value.startsWith("{")?`(${t.value})`:t.value:JSON.stringify(t)}const hG={session:!1,authKey:"Authorization",storageKey:"ACCESS_STORAGE",storagePrefix:"__VTJ_",unauthorized:void 0,auth:"/#/login",redirectParam:"r",unauthorizedCode:401,unauthorizedMessage:"登录已经失效,请重新登录!",noPermissionMessage:"无权限访问该页面",appName:"",statusKey:"code"},ih=Symbol("access");let il=class{constructor(e){X(this,"options");X(this,"data",null);X(this,"mode",Qt.Raw);X(this,"interceptResponse",!0);X(this,"isTipShowing",!1);this.options=Object.assign({},hG,e),this.loadData()}enableIntercept(){this.interceptResponse=!0}disableIntercept(){this.interceptResponse=!1}connect(e){const{mode:n,router:r,request:a}=e;this.mode=n,r&&this.mode!==Qt.Design&&this.setGuard(r),a&&this.setRequest(a)}login(e){const{storageKey:n,storagePrefix:r,session:a,authKey:i}=this.options;this.setData(e),this.data&&(cr.save(n,e,{type:"local",prefix:r}),a&&s1.set(i,this.data.token))}clear(){const{storageKey:e,storagePrefix:n,session:r,authKey:a}=this.options;this.data=null,cr.remove(e,{type:"local",prefix:n}),r&&s1.remove(a)}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:n}=this.options,{permissions:r={}}=this.data||{};if(typeof e=="function")return e(r);const a=F0(e);return Array.isArray(r)?a.every(i=>r.includes(i)||r.includes(n+"."+i)):a.every(i=>r[i]||r[n+"."+i])}some(e){const{appName:n}=this.options,{permissions:r={}}=this.data||{},a=F0(e);return Array.isArray(r)?a.some(i=>r.includes(i)||r.includes(n+"."+i)):a.some(i=>r[i]||r[n+"."+i])}install(e){e.config.globalProperties.$access=this,e.provide(ih,this)}isAuthPath(e){const{auth:n,isAuth:r}=this.options;if(r)return r(e);if(e.path&&typeof n=="string"){const a=n.split("#")[1]||n;return e.path===a}return!1}toLogin(){const{auth:e,redirectParam:n}=this.options;if(!e)return;const r=n?`?${n}=${encodeURIComponent(location.href)}`:"";typeof e=="function"?e(r):location.href=n?`${e}${r}`:e}setData(e){const{privateKey:n}=this.options;if(Array.isArray(e)&&n){const r=e.map(a=>og(a,n));try{this.data=JSON.parse(r.join(""))}catch(a){console.warn(a)}return}if(typeof e=="string")try{const r=n?og(e,n):e;r?this.data=JSON.parse(r):console.warn("RSA解密失败或登录信息缺失")}catch(r){console.warn(r)}else this.data=e}loadData(){const{storageKey:e,storagePrefix:n}=this.options,r=cr.get(e,{type:"local",prefix:n});this.setData(r||null)}isLogined(){const{session:e,authKey:n}=this.options;return e&&n?!!s1.get(n):!!this.getToken()}hasRoutePermission(e){if(e.name===Zi){const n=e.params.id;return n&&this.can(n)}return e.meta.__vtj__?this.can(e.meta.__vtj__):e.meta.permission?this.can(e.meta.permission):!0}setGuard(e){e.beforeEach((n,r,a)=>this.guard(n,a))}guard(e,n){return V(this,null,function*(){if(this.isWhiteList(e)||this.isAuthPath(e))return n();if(this.isLogined()){if(this.hasRoutePermission(e))return n();{const{noPermissionMessage:r="无权限访问",unauthorized:a=!1}=this.options;return yield this.showTip(r),jn(a)?(a(),n(!1)):sr(a)?n(a):n(!1)}}n(!1),yield Le(0),this.toLogin()})}isWhiteList(e){const{whiteList:n}=this.options;return n?Array.isArray(n)?n.some(r=>e.fullPath.startsWith(r)):n(e):!1}isUnauthorized(e){var a;const{unauthorizedCode:n=401,statusKey:r="code"}=this.options;return e.status===n||((a=e.data)==null?void 0:a[r])===n}showUnauthorizedAlert(e){return V(this,null,function*(){const{unauthorizedMessage:n="登录已失效"}=this.options;this.isUnauthorized(e)&&(yield this.showTip(n))&&this.toLogin()})}showTip(e){return V(this,null,function*(){var r,a,i,o;const{alert:n}=this.options;return this.isTipShowing?!1:n?(this.isTipShowing=!0,yield Le(150),yield(a=(r=n(e,{title:"提示",type:"warning"}))==null?void 0:r.catch(()=>!0))==null?void 0:a.finally(()=>{this.isTipShowing=!1})):((o=(i=globalThis.alert)==null?void 0:i.call(globalThis,e))!=null||console.warn(e),!0)})}setRequest(e){e.useRequest(n=>{var r,a;return(r=this.data)!=null&&r.token&&(n.headers[this.options.authKey]=(a=this.data)==null?void 0:a.token),n}),e.useResponse(n=>V(this,null,function*(){return this.interceptResponse&&(yield this.showUnauthorizedAlert(n)),n}),n=>V(this,null,function*(){if(!this.interceptResponse)return Promise.reject(n);const r=n.response||n||{};return yield this.showUnauthorizedAlert(r),Promise.reject(n)}))}};function cC(){return zr(ih,null)}function fG(t={}){const{notify:e,loading:n,settings:r={},Startup:a,access:i,useTitle:o,alert:s}=t;let l=null;return{request:M3({adapter:t.axiosAdapter,settings:G({type:"form",validSuccess:!1,originResponse:!0,loading:!0,validate:c=>{var u,d;return((u=c.data)==null?void 0:u.code)===0||!!((d=c.data)!=null&&d.success)},failMessage:!0,showError:c=>{e&&e(c||"未知错误")},showLoading:()=>{l&&l.close(),n&&(l=n())},hideLoading:()=>{l&&(l.close(),l=null)}},r)}),jsonp:m0,notify:e,loading:n,useTitle:o,alert:s,startupComponent:a,access:i?new il(G({alert:s},i)):void 0}}function gG(t={}){return new il(t)}function oh(t,e){const{jsonp:n,request:r}=e;if(t.method==="jsonp")return(a={})=>n(t.url,fe(G({},t.jsonpOptions),{query:a}));{const a=t.headers?Pr(t.headers,{},!0):void 0,i={url:t.url,method:t.method,settings:fe(G({},t.settings),{headers:a})};return(o,s)=>(delete i.data,r.send(lr(i,s||{},{data:o})))}}function uC(t,e){const{metaQuery:n}=e;if(!n)return;const{code:r,queryCode:a}=t;return(i,o)=>{if(!n){console.warn("adapter.metaQuery is not defined!");return}return n(r,a,i,o)}}function sh(t=[],e=[],n){const r={};for(const a of t){const i=oh(a,n);r[a.id]=i,r[a.name]=i}for(const a of e)r[a.id]=uC(a,n);return r}function lh(){return V(this,arguments,function*(t=[],e=globalThis){const n=oo(e);n&&(Tc(e),t.forEach(r=>dC(n,r)))})}function ch(t,e=globalThis){const n=En(t.mockTemplate)&&t.mockTemplate.value?tr(t.mockTemplate,{},!0):void 0,r=oo(e);return(...a)=>V(null,null,function*(){let i={};if(n)try{i=yield n.apply(n,a)}catch(o){er.warn("模拟数据模版异常",o)}return r==null?void 0:r.mock(i)})}function dC(t,e){if(!e.mock)return;const{url:n,mockTemplate:r,method:a="get",settings:i={}}=e;if(n&&r)try{const o=no(n)?new URL(n).pathname:n,s=V3(`(.*)${o}`,[],{end:!1}),l=new RegExp(s.source+"([?#].*)?$",s.flags),c=xP(o,{decode:decodeURIComponent}),u=Pr(r,{},!0);t.mock(l,a.toLowerCase(),d=>{var b;const p=si.parse(d.url)||{},h=i.type||"form";let g=d.body instanceof FormData?NP(d.body):d.body;if(typeof g=="string")if(h==="json")try{g=JSON.parse(g)}catch(y){console.warn("[Mock.mock]",y)}else g=si.parse(g);const m=no(d.url)?new URL(d.url).pathname:d.url.split("?")[0],v=(b=c(m))==null?void 0:b.params;Object.assign(d,{data:g,params:v,query:p});try{return t.mock(u(d))}catch(y){return console.warn("[mockApi]",l,d,y),null}})}catch(o){console.warn("mockApi",o)}}function Tc(t=globalThis){const e=oo(t);e&&(e._mocked={})}let pC=class{constructor(e){X(this,"__id",null);X(this,"__mode");X(this,"__instance",null);X(this,"__contextRefs",{});X(this,"__refs",{});X(this,"__refCaches",{});X(this,"context",{});X(this,"state",{});X(this,"props",{});X(this,"$props",{});X(this,"$state",{});X(this,"$refs",{});X(this,"$el",null);X(this,"$emit",null);X(this,"$nextTick",null);X(this,"$parent",null);X(this,"$root",null);X(this,"$attrs",null);X(this,"$slots",null);X(this,"$watch",null);X(this,"$options",null);X(this,"$forceUpdate",null);X(this,"$components",{});X(this,"$libs",{});X(this,"$apis",{});X(this,"$provider",null);X(this,"$uni",null);X(this,"$getApp",null);X(this,"__transform",{});const{mode:n,dsl:r,attrs:a}=e;this.__mode=n,r&&(this.__id=r.id||null,this.__transform=r.transform||{}),a&&Object.assign(this,a)}setup(e,n=$2){var o,s,l,c;const r=n.getCurrentInstance();if(!r)return;this.__refs={},this.__refCaches={},this.$refs={},this.context={},this.__contextRefs={},this.__instance=r.proxy;const{state:a}=this,i=r.appContext.config.globalProperties;Object.assign(this,i,e||{}),this.$uni=(s=(o=this.$libs.UniH5)==null?void 0:o.uni)!=null?s:null,this.$getApp=(c=(l=this.$libs.UniH5)==null?void 0:l.getApp)!=null?c:null,this.$state=this.state=a,this.__proxy(),n.onMounted(()=>{this.__proxy()}),n.onUnmounted(()=>{this.__cleanup()}),n.onBeforeUpdate(()=>{if(this.__proxy(),this.$props)for(const u of Object.keys(this.$props))this[u]=this.$props[u];this.__reset()})}__proxy(){if(!this.__instance)return;const e=this.__instance;Tu.forEach(n=>{var r;this[n]=e[n]||((r=e._)==null?void 0:r[n.replace("$","")])||null})}__cleanup(){Tu.forEach(e=>{this[e]=null}),this.__reset()}__reset(){this.__refs={},this.__refCaches={},this.$refs={},this.__contextRefs={},this.context={}}__parseFunction(e){var n;if(e)if(this.__mode===Qt.Runtime){const{id:r,type:a}=e,i=r&&(n=this.__transform[r])!=null?n:e.value;return tr({type:a,value:i},this)}else return tr(e,this)}__parseExpression(e){var n;if(e)if(this.__mode===Qt.Runtime){const{id:r,type:a}=e,i=r&&(n=this.__transform[r])!=null?n:e.value;return Pr({type:a,value:i},this)}else return Pr(e,this)}__ref(e=null,n){if(this.__mode===Qt.VNode)return;e&&e!==this.__id&&(this.__contextRefs[e]=this);let r=e?this.__refCaches[e]:null;return r||(r=a=>V(this,null,function*(){var o,s;yield Le(0);let i=(a==null?void 0:a.$vtjEl)||(a==null?void 0:a.$el)||((s=(o=a==null?void 0:a._)==null?void 0:o.vnode)==null?void 0:s.el)||a;if(!i){typeof n=="string"&&(delete this.$refs[n],this[n]&&zn(this[n])&&(this[n].value=null),e&&delete this.__refs[e]);return}return i.nodeType===3&&i.nextSibling&&(i=i.nextSibling),i.__vtj__=e,Qt.Design===this.__mode&&(i.__context__=this,i.draggable=!0),e&&(this.__refs[e]=this.__getRefEl(this.__refs,e,a)),typeof n=="function"?n(a):n&&(this.$refs[n]=this.__getRefEl(this.$refs,n,a),this[n]&&zn(this[n])&&(this[n].value=this.$refs[n])),a}),e&&(this.__refCaches[e]=r),r)}__getRefEl(e,n,r){const a=e[n];if(a&&r!==a){const i=new Set([].concat(a,r));return Array.from(i)}else return r}__clone(e={}){const n=G(G({},this.context),e),r=fe(G({},n),{context:n});return r.context.__proto__=this.context,r.__proto__=this,r}};function T2(t){var p,g;const{Vue:e=$2,UniApp:n={},mode:r=Qt.Runtime,components:a={},libs:i={},apis:o={},loader:s}=t,l=e.computed(()=>t.dsl),c={$components:a,$libs:i,$apis:o},u=new pC({mode:r,dsl:l.value,attrs:c}),d=e.defineComponent(G({name:l.value.name,__scopeId:l.value.id?`data-v-${l.value.id}`:void 0,props:G({},vG((p=l.value.props)!=null?p:[],u)),setup(){return V(this,arguments,function*(m={}){var M,A,L,$,R,z,F,j,D;u.$props=u.props=m,l.value.id&&nl(t.window||globalThis,l.value.id,l.value.css||"",!0);const v=l.value.apiMode==="composition";u.$state=u.state=bG(e,(M=l.value.state)!=null?M:{},u);const b=v?CG(e,(A=l.value.refs)!=null?A:{},u):{},y=v?kG(e,(L=l.value.reactives)!=null?L:{},u):{},x=yG(e,($=l.value.computed)!=null?$:{},u),_=wG((R=l.value.methods)!=null?R:{},u),C=xG(e,l.value.inject,u),w=hC(l.value.dataSources||{},u);let k={};v&&(k=EG((z=l.value.composables)!=null?z:[],u));const I=G(G(G(G(G(G(G(G({},m),b),y),C),x),_),w),k);if(u.setup(I,e),_G(e,(F=l.value.watch)!=null?F:[],u),v){if(yield IG(e,(j=l.value.lifeCycles)!=null?j:{},u,n),l.value.setup){const P=u.__parseFunction(l.value.setup);if(jn(P))try{yield P()}catch(Q){console.warn("[VTJ] Composition setup 执行失败",Q)}}SG(e,(D=l.value.provide)!=null?D:{},u)}return G(G(G(G(G({vtj:u,state:u.state,$state:u.$state},m),b),y),x),_)})},emits:mG(l.value.emits),expose:["vtj",...l.value.expose||[]],render(){const m=l.value;if(m.refs)for(const b of Object.keys(m.refs))this[b];if(m.reactives)for(const b of Object.keys(m.reactives)){const y=this[b];if(y&&typeof y=="object")for(const x of Object.keys(y))y[x]}if(m.state){const b=this.state;for(const y of Object.keys(m.state))b[y]}if(m.computed)for(const b of Object.keys(m.computed))this[b];if(m.inject)for(const b of m.inject)this[b.name];if(!m.nodes)return null;const v=m.nodes||[];if(v.length===1)return hi(v[0],u,e,s,v);{const b=v.map(y=>hi(y,u,e,s,v)).flat();return e.createVNode("div",{},b)}}},l.value.apiMode!=="composition"?AG((g=l.value.lifeCycles)!=null?g:{},u):{}));return{renderer:e.markRaw(d),context:u}}function mG(t=[]){return t.map(e=>sr(e)?e:e.name)}function vG(t=[],e){const n=r=>r?(Array.isArray(r)?r:[r]).map(a=>Pp[a]):void 0;return t.map(r=>sr(r)?{name:r}:{name:r.name,type:r.type,required:r.required,default:Dt(r.default)?e.__parseExpression(r.default):r.default}).reduce((r,a)=>(r[a.name]={type:n(a.type),required:a.required,default:a.default},r),{})}function bG(t,e,n){return t.reactive(Object.keys(e||{}).reduce((r,a)=>{let i=e[a];return Dt(i)?i=n.__parseExpression(i):En(i)&&(i=n.__parseFunction(i)),r[a]=i,r},{}))}function yG(t,e,n){return Object.entries(e!=null?e:{}).reduce((r,[a,i])=>(En(i)?r[a]=t.computed(n.__parseFunction(i)):r[a]=t.computed(n.__parseExpression(i)),r),{})}function wG(t,e){return Object.entries(t!=null?t:{}).reduce((n,[r,a])=>(n[r]=e.__parseFunction(a),n),{})}function xG(t,e=[],n){return e.reduce((r,a)=>{var c;const{name:i,from:o}=a||{},s=Dt(o)?n.__parseExpression(o)||i:o!=null?o:i,l=Dt(a.default)?n.__parseExpression(a.default):(c=a.default)!=null?c:null;return r[i]=t.inject(s,l),r},{})}function hC(t,e){return Object.keys(t).reduce((n,r)=>{const a=t[r];if(a.type==="mock")n[r]=ch(a);else if(a.ref){const i=e.$apis[a.ref],o=En(a.transform)?a.transform.value?e.__parseFunction(a.transform):void 0:a.transform;n[r]=(...s)=>V(null,null,function*(){const l=yield i.apply(e,s);return o?o(l):l})}return n},{})}function _G(t,e=[],n){e.forEach(r=>{t.watch(n.__parseExpression(r.source),n.__parseFunction(r.handler),{deep:r.deep,immediate:r.immediate,flush:r.flush})})}function CG(t,e,n){return Object.entries(e).reduce((r,[a,i])=>{const o=Dt(i)?n.__parseExpression(i):i;return r[a]=t.ref(o),r},{})}function kG(t,e,n){return Object.entries(e).reduce((r,[a,i])=>{const o=Dt(i)?n.__parseExpression(i):i;return r[a]=t.reactive(o!=null?o:{}),r},{})}function EG(t,e){return t.reduce((n,r)=>{try{let a;if(Dt(r.composable)?a=e.__parseExpression(r.composable):sr(r.composable)&&(a=e.$libs[r.composable]),jn(a)){const i=(r.args||[]).map(s=>Dt(s)?e.__parseExpression(s):s),o=a(...i);if(r.destructure&&r.destructure.length>0)for(const s of r.destructure)n[s]=o==null?void 0:o[s];else n[r.name]=o}}catch(a){e.__mode===Qt.Design&&(console.warn("[VTJ] composable 执行失败,已降级处理",a),n[r.name]={})}return n},{})}function SG(t,e,n){Object.entries(e).forEach(([r,a])=>{let i=a;Dt(a)?i=n.__parseExpression(a):En(a)&&(i=n.__parseFunction(a)),t.provide(r,i)})}function IG(a,i,o){return V(this,arguments,function*(t,e,n,r={}){const s={beforeMount:"onBeforeMount",mounted:"onMounted",beforeUpdate:"onBeforeUpdate",updated:"onUpdated",beforeUnmount:"onBeforeUnmount",unmounted:"onUnmounted",errorCaptured:"onErrorCaptured",renderTracked:"onRenderTracked",renderTriggered:"onRenderTriggered",activated:"onActivated",deactivated:"onDeactivated"};for(const[l,c]of Object.entries(e)){if(l==="created"||l==="beforeCreate"){const p=n.__parseFunction(c);if(jn(p))try{yield p()}catch(h){console.warn(`[VTJ] Composition 生命周期 "${l}" 执行失败`,h),A2(h)}continue}const u=s[l]||l,d=t[u]||r[u];if(d&&jn(d)){const p=n.__parseFunction(c);jn(p)&&d(()=>V(null,null,function*(){try{yield Le(0),yield p()}catch(h){console.warn(`[VTJ] Composition 生命周期 "${l}" 执行失败`,h),A2(h)}}))}else console.warn(`[VTJ] 无效的 Composition 生命周期钩子 "${l}"`)}})}function AG(t,e){return Object.entries(t!=null?t:{}).reduce((n,[r,a])=>{const i=e.__parseFunction(a);return n[r]=()=>V(null,null,function*(){jn(i)&&(yield Le(0),yield i())}),n},{})}class TG{constructor(){X(this,"__props",{});X(this,"__events",{});X(this,"__nodes",{})}setProps(e,n){this.__props[e]=n}getProps(e){return this.__props[e]}loadProps(e,n){return(e?this.getProps(e):null)||(e&&this.setProps(e,n),n)}setEvents(e,n){}getEvents(e){return this.__events[e]}loadEvents(e,n){return(e?this.getEvents(e):null)||(e&&this.setEvents(e,n),n)}setNode(e,n){this.__nodes[e]=n}getNode(e){return this.__nodes[e]}loadNode(e,n){return(e?this.getNode(e):null)||(e&&this.setNode(e,n),n)}isEqual(e,n){return oi(e,n)}isNodeEqual(e,n){if(e===n)return!0;if(!e||!n)return!1;const r=s=>!s||typeof s!="object"?[]:Object.keys(s).filter(l=>jn(s[l])),a=s=>{if(!s||typeof s!="object")return s;const l={};for(const c in s)if(Object.prototype.hasOwnProperty.call(s,c)){const u=s[c];jn(u)||(l[c]=u)}return l},i=r(e).sort(),o=r(n).sort();return oi(i,o)?oi(a(e),a(n)):!1}clear(){this.__props={},this.__events={},this.__nodes={}}}const ri=new TG,fC=new TP;let O1=[],Ya={},qo={};const gC=(t,e)=>e;function uh(n){return V(this,arguments,function*(t,e=globalThis){const{urls:r=[],library:a}=t,i=r.filter(s=>tl(s));if(i.length===0||!a)return null;const o=r.filter(s=>el(s));return o.length&&Gp(o,e),yield Jp(i,a,e).catch(s=>(console.warn("loadScriptUrl error",i,a,s),null))})}function V2(t){const{getDsl:e,getDslByUrl:n,options:r}=t;return r.window&&(O1.forEach(a=>{delete r.window[a]}),O1=[]),(a,i,o,s=$2)=>{if(!o||typeof o=="string")return i;let l="";if(o.type==="Schema"&&o.id)return l=o.id+"_"+a,qo[l]||(qo[l]=s.defineAsyncComponent(()=>V(null,null,function*(){const c=Ya[o.id]||(yield fC.add(o.id,()=>e(o.id)));return c&&(c.name=i,Ya[o.id]=c),c?T2(fe(G({Vue:s,mode:Qt.Runtime},r),{dsl:Xn(c),loader:V2(t)})).renderer:null})));if(o.type==="UrlSchema"&&o.url)return l=o.url+"_"+a,qo[l]||(qo[l]=s.defineAsyncComponent(()=>V(null,null,function*(){const c=Ya[o.url]||(yield n(o.url));return c&&(c.name=i,Ya[o.url]=c),c?T2(fe(G({},r),{Vue:s,dsl:Xn(c),mode:Qt.Runtime,loader:V2(t)})).renderer:null})));if(o.type==="Plugin"){let c=o.library?Ya[o.library]:null;return c||(o.library&&O1.push(o.library),c=Ya[o.library||Symbol()]=s.defineAsyncComponent(()=>V(null,null,function*(){return(yield uh(o,r.window))||(console.warn("getPlugin result is null",o),null)})),c)}return i}}function Ru(){Ya={},qo={},fC.clearAllCache(),ri.clear()}function hi(t,e,n=$2,r=gC,a=[],i=!1,o=0){var _;if(!t||!t.name||t.invisible)return null;const s=(_=n.getCurrentInstance())==null?void 0:_.appContext,{id:l=null,directives:c=[]}=t,{vIf:u,vElseIf:d,vElse:p,vFor:h,vShow:g,vModels:m,vBind:v,vHtml:b,others:y}=mC(c);if(!i&&(d||p))return null;if(u&&!MG(u,e))return zG(t,e,n,r,a);const x=(C,w=0)=>{var Q,ee,Y,Z;const k=C.$components,I=(()=>{var re,$e,nt,gt;if(t.name==="component")return LG(C,(re=t.props)==null?void 0:re.is);if(t.name==="slot")return t.name;const te=r(`${t.id}_${w}`,t.name,t.from,n);return sr(te)?I_(te)||A_(te)?te:(gt=(nt=k[te])!=null?nt:($e=s==null?void 0:s.app)==null?void 0:$e.component(te))!=null?gt:te:te})(),M=OG(l,(Q=t.props)!=null?Q:{},C),A=jG(n,t.id,(ee=t.events)!=null?ee:{},C);if(t.name==="slot")return NG(n,t,M,C,r);v&&Object.assign(M,C.__parseExpression(v.value)),g&&(M.style=Object.assign((Y=M.style)!=null?Y:{},PG(g,C))),b&&Object.assign(M,HG(b,C)),m.forEach(te=>{_c.includes(t.name)?Object.assign(M,$G(te,C)):Object.assign(M,FG(n,te,C))});const L=UG(n,(Z=t.children)!=null?Z:[],C,r,t),$=C!=null&&C.__id?`data-v-${C.__id}`:void 0,R=$?{[$]:""}:{},z=C.__mode===Qt.Design?{"data-vtj":l}:{},F=`${l}_${w}`,j=G(G(G({key:F},R),z),M);ri.isNodeEqual(j,ri.getNode(F))||ri.setNode(F,j);let D=n.createVNode(I,G(G({},ri.getNode(F)||j),A),L);const P=s?VG(s,y,C):[];return P.length&&(D=n.withDirectives(D,P)),D};return h?qG(h,x,e):x(e,o)}function VG(t,e,n){const r=t.app;return e.map(a=>{const i=typeof a.name=="string"?r.directive(a.name):n.__parseExpression(a.name);if(!i)return null;const o=[i];return a.value&&o.push(n.__parseExpression(a.value)),a.arg&&o.push(a.arg),a.modifiers&&o.push(a.modifiers),o}).filter(a=>!!a)}function mC(t=[]){const e=t.find(u=>br(u.name)==="vIf"),n=t.find(u=>br(u.name)==="vElseIf"),r=t.find(u=>br(u.name)==="vElse"),a=t.find(u=>br(u.name)==="vFor"),i=t.find(u=>br(u.name)==="vShow"),o=t.find(u=>br(u.name)==="vBind"),s=t.find(u=>br(u.name)==="vHtml"),l=t.filter(u=>br(u.name)==="vModel"),c=t.filter(u=>!Bp.includes(br(u.name)));return{vIf:e,vElseIf:n,vElse:r,vFor:a,vShow:i,vModels:l,vBind:o,others:c,vHtml:s}}function MG(t,e){return!!e.__parseExpression(t.value)}function LG(t,e){return e?Dt(e)?t.__parseExpression(e):e:"div"}function OG(t,e,n){const r=ju(e,n);return r.ref=n.__ref(t,r.ref),r}function ju(t,e){return Dt(t)?e.__parseExpression(t):En(t)?e.__parseFunction(t):Array.isArray(t)?t.map(n=>ju(n,e)):typeof t=="object"?Object.keys(t||{}).reduce((n,r)=>{let a=t[r];return n[r]=ju(a,e),n},{}):t}function DG(t,e){return n=>{var r;((r=n==null?void 0:n.key)==null?void 0:r.toLowerCase())===e.toLowerCase()&&t(n)}}function RG(t){return T_(t.value)?t:V_(t.value)?{type:"JSFunction",value:`(...args) => (() => {
|
|
100
100
|
return (($event) => {
|
|
101
101
|
${t.value}
|
|
102
102
|
}).apply(this, args);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var x=Object.defineProperty;var y=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var k=(o,e,t)=>e in o?x(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,u=(o,e)=>{for(var t in e||(e={}))A.call(e,t)&&k(o,t,e[t]);if(y)for(var t of y(e))I.call(e,t)&&k(o,t,e[t]);return o};var _=(o,e,t)=>new Promise((c,r)=>{var n=s=>{try{i(t.next(s))}catch(a){r(a)}},p=s=>{try{i(t.throw(s))}catch(a){r(a)}},i=s=>s.done?c(s.value):Promise.resolve(s.value).then(n,p);i((t=t.apply(o,e)).next())});import"./element-plus-_gYoEp33.js";import"./vxe-BulginLS.js";import{V as U,aI as E,ac as d,aJ as b,aK as B,W as q}from"./Editor-VZdiHFNS-
|
|
1
|
+
var x=Object.defineProperty;var y=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var k=(o,e,t)=>e in o?x(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,u=(o,e)=>{for(var t in e||(e={}))A.call(e,t)&&k(o,t,e[t]);if(y)for(var t of y(e))I.call(e,t)&&k(o,t,e[t]);return o};var _=(o,e,t)=>new Promise((c,r)=>{var n=s=>{try{i(t.next(s))}catch(a){r(a)}},p=s=>{try{i(t.throw(s))}catch(a){r(a)}},i=s=>s.done?c(s.value):Promise.resolve(s.value).then(n,p);i((t=t.apply(o,e)).next())});import"./element-plus-_gYoEp33.js";import"./vxe-BulginLS.js";import{V as U,aI as E,ac as d,aJ as b,aK as B,W as q}from"./Editor-VZdiHFNS-D9NWfPEa.js";import{useRoute as v}from"./vue-router-CDqTjrgM.js";import{y as w,az as f,I as R,D as C,u as l,E as V,U as $}from"./vue-fMktb-5o.js";import{_ as g}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./@vueuse-SvwMwBjL.js";import"./lodash-es-BxdYFYdv.js";import"./shared-Bc0G8KpM.js";import"./@element-plus-icons-vue-DA02k83P.js";import"./dayjs-CxR8wwn9.js";import"./monaco-editor-Bgo-w-Z8.js";import"./axios-Cc-15rbk.js";import"./html2canvas-DNSjNh3_.js";import"./mockjs-Cu-wxkKz.js";import"./marked--VTVY_DP.js";const K={class:"loading"},S=w({__name:"Auth",props:{remote:{},access:{},baseUrl:{default:"/"}},setup(o){return _(this,null,function*(){let e,t;const c=o,r=U(u(u({alert:d},E),c.access)),n=v(),p=a=>_(null,null,function*(){const h=`${c.remote||b}/api/open/user/${a}`,m=yield B(h).catch(()=>null);return m&&Array.isArray(m)?m:!m||!m.success?(yield d("登录失败"),null):m.data}),i=n.query.token,s=i?([e,t]=f(()=>p(i)),e=yield e,t(),e):null;if(s)try{r.login(s);const a=n.query.redirect;location.href=decodeURIComponent(a||c.baseUrl)}catch(a){location.reload()}else{[e,t]=f(()=>d("登录失败")),yield e,t();const a=n.query.redirect;location.href=decodeURIComponent(a||c.baseUrl)}return(a,h)=>(C(),R("div",K,"正在登录中..."))})}}),W=g(S,[["__scopeId","data-v-2cb061ca"]]),ee=w({__name:"auth",setup(o){return _(this,null,function*(){let e,t;const c=new q,r=([e,t]=f(()=>c.getExtension().catch(()=>null)),e=yield e,t(),e),n=r==null?void 0:r.remote,p=r==null?void 0:r.__ACCESS__;return(i,s)=>l(n)?(C(),V(l(W),{key:0,remote:l(n),access:l(p)},null,8,["remote","access"])):$("",!0)})}});export{ee as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var q=Object.defineProperty;var P=Object.getOwnPropertySymbols;var H=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var C=(n,e,t)=>e in n?q(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,$=(n,e)=>{for(var t in e||(e={}))H.call(e,t)&&C(n,t,e[t]);if(P)for(var t of P(e))N.call(e,t)&&C(n,t,e[t]);return n};var d=(n,e,t)=>new Promise((_,r)=>{var l=o=>{try{i(t.next(o))}catch(p){r(p)}},s=o=>{try{i(t.throw(o))}catch(p){r(p)}},i=o=>o.done?_(o.value):Promise.resolve(o.value).then(l,s);i((t=t.apply(n,e)).next())});import{useRoute as j}from"./vue-router-CDqTjrgM.js";import{y as z}from"./@vueuse-SvwMwBjL.js";import{W as D,U as J,R as G,V as K,o as E,l as L,d as v}from"./Editor-VZdiHFNS-
|
|
1
|
+
var q=Object.defineProperty;var P=Object.getOwnPropertySymbols;var H=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var C=(n,e,t)=>e in n?q(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,$=(n,e)=>{for(var t in e||(e={}))H.call(e,t)&&C(n,t,e[t]);if(P)for(var t of P(e))N.call(e,t)&&C(n,t,e[t]);return n};var d=(n,e,t)=>new Promise((_,r)=>{var l=o=>{try{i(t.next(o))}catch(p){r(p)}},s=o=>{try{i(t.throw(o))}catch(p){r(p)}},i=o=>o.done?_(o.value):Promise.resolve(o.value).then(l,s);i((t=t.apply(n,e)).next())});import{useRoute as j}from"./vue-router-CDqTjrgM.js";import{y as z}from"./@vueuse-SvwMwBjL.js";import{W as D,U as J,R as G,V as K,o as E,l as L,d as v}from"./Editor-VZdiHFNS-D9NWfPEa.js";import"./element-plus-_gYoEp33.js";import"./vxe-BulginLS.js";import{E as M,a as S,n as A,l as O}from"./utils-D72zsg26.js";import{y as Q,az as B,e as X,I as Y,r as Z,D as ee}from"./vue-fMktb-5o.js";import{_ as te}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./monaco-editor-Bgo-w-Z8.js";import"./dayjs-CxR8wwn9.js";import"./axios-Cc-15rbk.js";import"./@element-plus-icons-vue-DA02k83P.js";import"./html2canvas-DNSjNh3_.js";import"./mockjs-Cu-wxkKz.js";import"./marked--VTVY_DP.js";import"./lodash-es-BxdYFYdv.js";import"./shared-Bc0G8KpM.js";const ae=Q({__name:"index",setup(n){return d(this,null,function*(){let e,t;const _=j(),r=Z(),l=new D(J(A)),s=([e,t]=B(()=>l.getExtension().catch(()=>null)),e=yield e,t(),e||{}),i=s?([e,t]=B(()=>new M(s).load()),e=yield e,t(),e):{},{__BASE_PATH__:o="/",history:p="hash",base:h="/",pageRouteName:w="page",remote:g,auth:R,checkVersion:k=!0,enhance:V,platform:W="web"}=s||{},F=G({loading:O,notify:A,useTitle:z,alert:S,access:s==null?void 0:s.access,settings:{proxyPath:`${g}/api/proxy`}}),I=K($({alert:S},s==null?void 0:s.__ACCESS__)),T=()=>p==="hash",U=a=>a==="/"?"":(a.startsWith("/")&&(a=a.substring(1)),a.endsWith("/")||(a=a+"/"),a);E.set("Switcher",{props:{onClick:a=>{const u=a.platform==="uniapp",c=location.pathname;let m=c===`${o}__vtj__/`?o:c;const f=a.currentFile;if(f&&f.type==="page"&&a.homepage!==f.id){const b=s.pageBasePath?`/${w}`:"",x=`${U(h)}${u?`pages${b}`:w}/${f.id}`;m=T()?`${m}#/${x}`:`${m}${x}`}window.open(m,"VTJProject")}}}),E.set("Previewer",{props:{path:(a,u)=>{const c=location.pathname;return u.platform==="uniapp"?`${c}uni/#/pages/${a.id}`:`${c}#/preview/${a.id}`}}});const y=new L($({container:r,service:l,materialPath:o,pageBasePath:h==="/"?"":h,adapter:F,access:I,remote:g,auth:R,checkVersion:k,enhance:V,project:{platform:W}},i));return y.ready(()=>d(null,null,function*(){yield v(300),y.openFile(_.query.id)})),X(()=>_.query.id,a=>d(null,null,function*(){yield v(300),y.openFile(a)})),(a,u)=>(ee(),Y("div",{class:"designer",ref_key:"container",ref:r},null,512))})}}),xe=te(ae,[["__scopeId","data-v-f41f19f5"]]);export{xe as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
2
|
-
import{y as _,E as p,u as s,af as d,D as m,K as u,aB as f,J as h,at as v}from"./vue-fMktb-5o.js";import{z as g,c as y}from"./element-plus-_gYoEp33.js";import"./dayjs-CxR8wwn9.js";import{_ as r}from"./monaco-editor-Bgo-w-Z8.js";import{createRouter as E,createWebHashHistory as O}from"./vue-router-CDqTjrgM.js";import"./@vueuse-SvwMwBjL.js";import"./lodash-es-BxdYFYdv.js";import"./shared-Bc0G8KpM.js";import"./@element-plus-icons-vue-DA02k83P.js";(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const a of t.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function n(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function i(e){if(e.ep)return;e.ep=!0;const t=n(e);fetch(e.href,t)}})();const P=_({__name:"app",setup(l){return(o,n)=>{const i=d("router-view");return m(),p(s(y),{locale:s(g)},{default:u(()=>[(m(),p(f,null,{default:u(()=>[h(i)]),_:1}))]),_:1},8,["locale"])}}}),L=[{path:"/",name:"home",component:()=>r(()=>import("./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-DQSVTMqJ.js","./vue-router-CDqTjrgM.js","./vue-fMktb-5o.js","./@vueuse-SvwMwBjL.js","./Editor-VZdiHFNS-D9NWfPEa.js","./monaco-editor-Bgo-w-Z8.js","./monaco-editor-C0wzwsn5.css","./element-plus-_gYoEp33.js","./lodash-es-BxdYFYdv.js","./shared-Bc0G8KpM.js","./@element-plus-icons-vue-DA02k83P.js","./dayjs-CxR8wwn9.js","./element-plus-Bw1qTWaj.css","./axios-Cc-15rbk.js","./vxe-BulginLS.js","./vxe-BAb1d5vW.css","./html2canvas-DNSjNh3_.js","./mockjs-Cu-wxkKz.js","./marked--VTVY_DP.js","./Editor-VZdiHFNS-C4uXNc6V.css","./utils-D72zsg26.js","./_plugin-vue_export-helper-DlAUqK2U.js","./index-Br68Req3.css","./preview-BniwiEaA.js","./page-C7pPrUcX.js","./uni-page--udw_bNq.js","./uni-page-Diqmj53r.css","./auth-BqmXplBV.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{y as _,E as p,u as s,af as d,D as m,K as u,aB as f,J as h,at as v}from"./vue-fMktb-5o.js";import{z as g,c as y}from"./element-plus-_gYoEp33.js";import"./dayjs-CxR8wwn9.js";import{_ as r}from"./monaco-editor-Bgo-w-Z8.js";import{createRouter as E,createWebHashHistory as O}from"./vue-router-CDqTjrgM.js";import"./@vueuse-SvwMwBjL.js";import"./lodash-es-BxdYFYdv.js";import"./shared-Bc0G8KpM.js";import"./@element-plus-icons-vue-DA02k83P.js";(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const a of t.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function n(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function i(e){if(e.ep)return;e.ep=!0;const t=n(e);fetch(e.href,t)}})();const P=_({__name:"app",setup(l){return(o,n)=>{const i=d("router-view");return m(),p(s(y),{locale:s(g)},{default:u(()=>[(m(),p(f,null,{default:u(()=>[h(i)]),_:1}))]),_:1},8,["locale"])}}}),L=[{path:"/",name:"home",component:()=>r(()=>import("./index-DQSVTMqJ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22]),import.meta.url)},{path:"/preview/:id",name:"preview",component:()=>r(()=>import("./preview-BniwiEaA.js"),__vite__mapDeps([23,5,6,1,2,7,3,8,9,10,11,12,14,15,4,13,16,17,18,19,20]),import.meta.url)},{path:"/page/:id",name:"page",component:()=>r(()=>import("./page-C7pPrUcX.js"),__vite__mapDeps([24,5,6,1,2,7,3,8,9,10,11,12,14,15,4,13,16,17,18,19,20]),import.meta.url),meta:{pure:!0}},{path:"/pages/:id",name:"pages",component:()=>r(()=>import("./uni-page--udw_bNq.js"),__vite__mapDeps([25,1,2,21,26]),import.meta.url),meta:{pure:!0}},{path:"/auth",name:"auth",component:()=>r(()=>import("./auth-BqmXplBV.js"),__vite__mapDeps([27,7,3,2,8,9,10,11,12,14,15,4,5,6,13,1,16,17,18,19,21]),import.meta.url)}],A=E({history:O(),routes:L}),c=v(P);c.use(A);c.mount("#app");
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./vue-router-CDqTjrgM.js","./vue-fMktb-5o.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var x=Object.defineProperty;var E=Object.getOwnPropertySymbols;var P=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable;var R=(o,t,e)=>t in o?x(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,y=(o,t)=>{for(var e in t||(t={}))P.call(t,e)&&R(o,e,t[e]);if(E)for(var e of E(t))h.call(t,e)&&R(o,e,t[e]);return o};var c=(o,t,e)=>new Promise((_,s)=>{var u=r=>{try{p(e.next(r))}catch(i){s(i)}},d=r=>{try{p(e.throw(r))}catch(i){s(i)}},p=r=>r.done?_(r.value):Promise.resolve(r.value).then(u,d);p((e=e.apply(o,t)).next())});import{_ as C}from"./monaco-editor-Bgo-w-Z8.js";import{useRoute as A}from"./vue-router-CDqTjrgM.js";import"./element-plus-_gYoEp33.js";import"./vxe-BulginLS.js";import{W as T,U as V,R as D,L,P as k,Y as B,T as I}from"./Editor-VZdiHFNS-
|
|
2
|
+
var x=Object.defineProperty;var E=Object.getOwnPropertySymbols;var P=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable;var R=(o,t,e)=>t in o?x(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,y=(o,t)=>{for(var e in t||(t={}))P.call(t,e)&&R(o,e,t[e]);if(E)for(var e of E(t))h.call(t,e)&&R(o,e,t[e]);return o};var c=(o,t,e)=>new Promise((_,s)=>{var u=r=>{try{p(e.next(r))}catch(i){s(i)}},d=r=>{try{p(e.throw(r))}catch(i){s(i)}},p=r=>r.done?_(r.value):Promise.resolve(r.value).then(u,d);p((e=e.apply(o,t)).next())});import{_ as C}from"./monaco-editor-Bgo-w-Z8.js";import{useRoute as A}from"./vue-router-CDqTjrgM.js";import"./element-plus-_gYoEp33.js";import"./vxe-BulginLS.js";import{W as T,U as V,R as D,L,P as k,Y as B,T as I}from"./Editor-VZdiHFNS-D9NWfPEa.js";import{a as S,n as g,l as U,E as O}from"./utils-D72zsg26.js";import{y as W}from"./@vueuse-SvwMwBjL.js";import{y as Y,az as w,e as z,E as H,S as N,U as b,r as j,D as q,g as F}from"./vue-fMktb-5o.js";import"./lodash-es-BxdYFYdv.js";import"./shared-Bc0G8KpM.js";import"./@element-plus-icons-vue-DA02k83P.js";import"./dayjs-CxR8wwn9.js";import"./axios-Cc-15rbk.js";import"./html2canvas-DNSjNh3_.js";import"./mockjs-Cu-wxkKz.js";import"./marked--VTVY_DP.js";const mt=Y({__name:"page",setup(o){return c(this,null,function*(){let t,e;const _=new T(V(g)),s=([t,e]=w(()=>_.getExtension().catch(()=>null)),t=yield t,e(),t),u=D({loading:U,notify:g,useTitle:W,alert:S,access:s==null?void 0:s.access}),d=s?([t,e]=w(()=>new O(s).load()),t=yield t,e(),t):{},{__BASE_PATH__:p="/"}=s||{},{provider:r,onReady:i}=L({mode:k.Runtime,service:_,materialPath:p,adapter:y(y({},u),d.adapter),dependencies:{Vue:()=>C(()=>import("./vue-fMktb-5o.js").then(a=>a.aA),[],import.meta.url),VueRouter:()=>C(()=>import("./vue-router-CDqTjrgM.js"),__vite__mapDeps([0,1]),import.meta.url)}}),l=A(),f=j(),n=F(),v=a=>c(null,null,function*(){f.value=yield r.getRenderComponent(l.params.id.toString(),m=>{I(a,l,m)})});return i(()=>c(null,null,function*(){const a=n==null?void 0:n.appContext.app;a&&(a.use(B),a.use(r),v(a))})),z(()=>l.params.id,a=>c(null,null,function*(){if(a){const m=n==null?void 0:n.appContext.app;if(!m)return;v(m)}})),(a,m)=>f.value?(q(),H(N(f.value),{key:0})):b("",!0)})}});export{mt as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./vue-router-CDqTjrgM.js","./vue-fMktb-5o.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var x=Object.defineProperty;var y=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable;var E=(o,e,t)=>e in o?x(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,d=(o,e)=>{for(var t in e||(e={}))A.call(e,t)&&E(o,t,e[t]);if(y)for(var t of y(e))P.call(e,t)&&E(o,t,e[t]);return o};var f=(o,e,t)=>new Promise((c,r)=>{var _=a=>{try{i(t.next(a))}catch(p){r(p)}},s=a=>{try{i(t.throw(a))}catch(p){r(p)}},i=a=>a.done?c(a.value):Promise.resolve(a.value).then(_,s);i((t=t.apply(o,e)).next())});import{_ as R}from"./monaco-editor-Bgo-w-Z8.js";import{useRoute as T}from"./vue-router-CDqTjrgM.js";import"./element-plus-_gYoEp33.js";import"./vxe-BulginLS.js";import{W as g,U as V,R as D,L,P as k,$ as B,Y as I,T as S}from"./Editor-VZdiHFNS-
|
|
2
|
+
var x=Object.defineProperty;var y=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable;var E=(o,e,t)=>e in o?x(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,d=(o,e)=>{for(var t in e||(e={}))A.call(e,t)&&E(o,t,e[t]);if(y)for(var t of y(e))P.call(e,t)&&E(o,t,e[t]);return o};var f=(o,e,t)=>new Promise((c,r)=>{var _=a=>{try{i(t.next(a))}catch(p){r(p)}},s=a=>{try{i(t.throw(a))}catch(p){r(p)}},i=a=>a.done?c(a.value):Promise.resolve(a.value).then(_,s);i((t=t.apply(o,e)).next())});import{_ as R}from"./monaco-editor-Bgo-w-Z8.js";import{useRoute as T}from"./vue-router-CDqTjrgM.js";import"./element-plus-_gYoEp33.js";import"./vxe-BulginLS.js";import{W as g,U as V,R as D,L,P as k,$ as B,Y as I,T as S}from"./Editor-VZdiHFNS-D9NWfPEa.js";import{a as U,n as w,l as O,E as W}from"./utils-D72zsg26.js";import{y as Y}from"./@vueuse-SvwMwBjL.js";import{y as $,az as h,E as z,S as H,U as N,r as b,D as j,g as q}from"./vue-fMktb-5o.js";import"./lodash-es-BxdYFYdv.js";import"./shared-Bc0G8KpM.js";import"./@element-plus-icons-vue-DA02k83P.js";import"./dayjs-CxR8wwn9.js";import"./axios-Cc-15rbk.js";import"./html2canvas-DNSjNh3_.js";import"./mockjs-Cu-wxkKz.js";import"./marked--VTVY_DP.js";const me=$({__name:"preview",setup(o){return f(this,null,function*(){let e,t;const c=new g(V(w)),r=([e,t]=h(()=>c.getExtension().catch(()=>null)),e=yield e,t(),e||{}),_=D({loading:O,notify:w,useTitle:Y,alert:U,access:r==null?void 0:r.access}),s=r?([e,t]=h(()=>new W(r).load()),e=yield e,t(),e):{},{__BASE_PATH__:i="/"}=r||{},{provider:a,onReady:p}=L({mode:k.Runtime,service:c,materialPath:i,adapter:d(d({},_),s.adapter),dependencies:{Vue:()=>R(()=>import("./vue-fMktb-5o.js").then(m=>m.aA),[],import.meta.url),VueRouter:()=>R(()=>import("./vue-router-CDqTjrgM.js"),__vite__mapDeps([0,1]),import.meta.url)}}),v=T(),u=b(),l=q();return p(()=>f(null,null,function*(){const m=yield B(r.enhance),n=l==null?void 0:l.appContext.app;n&&(s.install&&s.install(n),m&&n.use(m,a),n.use(I),n.use(a),u.value=yield a.getRenderComponent(v.params.id.toString(),C=>{S(n,v,C)}))})),(m,n)=>u.value?(j(),z(H(u.value),{key:0})):N("",!0)})}});export{me as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var T=Object.defineProperty;var p=Object.getOwnPropertySymbols;var u=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var g=(t,a,s)=>a in t?T(t,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[a]=s,_=(t,a)=>{for(var s in a||(a={}))u.call(a,s)&&g(t,s,a[s]);if(p)for(var s of p(a))I.call(a,s)&&g(t,s,a[s]);return t};var E=(t,a,s)=>g(t,typeof a!="symbol"?a+"":a,s);var S=(t,a,s)=>new Promise((o,n)=>{var e=r=>{try{i(s.next(r))}catch(l){n(l)}},c=r=>{try{i(s.throw(r))}catch(l){n(l)}},i=r=>r.done?o(r.value):Promise.resolve(r.value).then(e,c);i((s=s.apply(t,a)).next())});import{aA as d}from"./vue-fMktb-5o.js";import{X as m,a as A,s as h,y as f,f as V,c as b,r as P,Q as M,e as y,Z as R,n as D,l as N,b as B,g as K,h as k,x as L,k as x,i as w,j as H,K as G,m as W,p as v,q as Y,t as F,u as C,v as U,w as X,z as j,A as q,B as J,C as Z,D as $,E as z,F as Q,G as aa,S as sa,H as ea,I as ta,J as ra,M as na,N as ia,O as oa,_ as la,a0 as Ea,a1 as _a,a2 as ca,a3 as ga,a4 as pa,a5 as Sa,a6 as Oa,a7 as Ta,a8 as ua,a9 as Ia,aa as da,ab as ma,ac as Aa,ad as ha,ae as fa,af as Va,ag as ba,ah as Pa,ai as Ma,aj as ya,ak as Ra,al as Da,am as Na,an as Ba,ao as Ka,ap as ka,aq as La,ar as xa,as as wa,at as Ha,au as Ga,av as Wa,aw as va,ax as Ya,ay as Fa,az as Ca,o as Ua,aA as Xa,aB as ja,aC as qa,aD as Ja,aE as Za,aF as $a,aG as za,aH as Qa}from"./Editor-VZdiHFNS-
|
|
1
|
+
var T=Object.defineProperty;var p=Object.getOwnPropertySymbols;var u=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var g=(t,a,s)=>a in t?T(t,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[a]=s,_=(t,a)=>{for(var s in a||(a={}))u.call(a,s)&&g(t,s,a[s]);if(p)for(var s of p(a))I.call(a,s)&&g(t,s,a[s]);return t};var E=(t,a,s)=>g(t,typeof a!="symbol"?a+"":a,s);var S=(t,a,s)=>new Promise((o,n)=>{var e=r=>{try{i(s.next(r))}catch(l){n(l)}},c=r=>{try{i(s.throw(r))}catch(l){n(l)}},i=r=>r.done?o(r.value):Promise.resolve(r.value).then(e,c);i((s=s.apply(t,a)).next())});import{aA as d}from"./vue-fMktb-5o.js";import{X as m,a as A,s as h,y as f,f as V,c as b,r as P,Q as M,e as y,Z as R,n as D,l as N,b as B,g as K,h as k,x as L,k as x,i as w,j as H,K as G,m as W,p as v,q as Y,t as F,u as C,v as U,w as X,z as j,A as q,B as J,C as Z,D as $,E as z,F as Q,G as aa,S as sa,H as ea,I as ta,J as ra,M as na,N as ia,O as oa,_ as la,a0 as Ea,a1 as _a,a2 as ca,a3 as ga,a4 as pa,a5 as Sa,a6 as Oa,a7 as Ta,a8 as ua,a9 as Ia,aa as da,ab as ma,ac as Aa,ad as ha,ae as fa,af as Va,ag as ba,ah as Pa,ai as Ma,aj as ya,ak as Ra,al as Da,am as Na,an as Ba,ao as Ka,ap as ka,aq as La,ar as xa,as as wa,at as Ha,au as Ga,av as Wa,aw as va,ax as Ya,ay as Fa,az as Ca,o as Ua,aA as Xa,aB as ja,aC as qa,aD as Ja,aE as Za,aF as $a,aG as za,aH as Qa}from"./Editor-VZdiHFNS-D9NWfPEa.js";import{E as as,a as ss,b as es}from"./element-plus-_gYoEp33.js";import"./dayjs-CxR8wwn9.js";const ts=Object.freeze(Object.defineProperty({__proto__:null,API_METHOD_TYPES:m,ActionMenu:A,Assets:h,Binder:f,Box:V,CodeIncrementalUpdater:b,DEVTOOLS_DEP:P,DepsManager:M,Designer:y,EVENT_MODIFIERS:R,Editor:D,Engine:N,EventBinder:B,GET_TOKENS_LINK:K,HOT_KEYS_DEP:k,Icon:L,Item:x,KEYBOARD_EVENT_LIST:w,MAX_TOKENS:H,MOBILE_SIZE:G,MOUSE_EVENT_LIST:W,NAME_REGEX:v,NPM_REGISTRY_URL:Y,OpenApi:F,PAD_SIZE:C,Panel:U,REPORT_API:X,RegionType:j,RegionWrapper:q,Renderer:J,SAVE_BLOCK_FILE_FINISH:Z,SESSION_ID_KEY:$,STATE_KEY:z,SetterManager:Q,SetterView:aa,SetterWrapper:sa,Simulator:ea,Skeleton:ta,SkeletonWrapper:ra,SlotsPicker:na,State:ia,TOOL_CONFIGS:oa,Tabs:la,ToolRegistry:Ea,VERSION_REGEX:_a,VTJ_DESIGNER_VERSION:ca,VUE_DEVTOOLS_FRAME_STATE_KEY:ga,VUE_DEVTOOLS_OVERLAY_PATH:pa,VUE_DEVTOOLS_PATH:Sa,VariableBinder:Oa,Viewer:Ta,Viewport:ua,WidgetGroup:Ia,WidgetManager:da,WidgetWrapper:ma,alert:Aa,builtInDeps:ha,builtInMaterials:fa,builtInSetters:Va,builtInWidgets:ba,codeIncrementalUpdater:Pa,confirm:Ma,createSlotsPicker:ya,defaultSetter:Ra,depsManager:Da,engineKey:Na,expressionValidate:Ba,getClassProperties:Ka,loading:ka,message:La,normalizedStyle:xa,notify:wa,proxyContext:Ha,readJsonFile:Ga,regions:Wa,setterManager:va,setters:Ya,upgradeVersion:Fa,useEngine:Ca,widgetManager:Ua,widgets:Xa},Symbol.toStringTag,{value:"Module"}));class Es{constructor(a){E(this,"urls",[]);E(this,"library","");E(this,"params",[]);E(this,"__BASE_PATH__","/");this.config=a;const s=_(_(_({},qa),ts),ja),o={Vue:d,__VTJ_PRO__:s};for(const[l,O]of Object.entries(o))window[l]=O;const{extension:n,__BASE_PATH__:e="/"}=a||{},{urls:c=[],library:i,params:r=[]}=n||{};i&&(this.urls=c,this.library=i,this.params=r,this.__BASE_PATH__=e)}load(){return S(this,null,function*(){let a={};if(this.library){const s=this.__BASE_PATH__,o=this.urls.filter(e=>Ja(e)).map(e=>`${s}${e}`),n=this.urls.filter(e=>Za(e)).map(e=>`${s}${e}`);if($a(o),n.length){const e=yield za(n,this.library).catch(()=>null);e&&typeof e=="function"?a=e.call(e,this.config,...this.params):a=e||{}}}return Object.assign({},this.getEngineOptions(),a)})}getEngineOptions(){const a=["materialPath","pageBasePath","pageRouteName","remote","checkVersion","noMask","auth"];return Qa(this.config,a)}}function _s(){return es.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"})}function cs(t,a="",s="warning"){ss({title:a,message:t,type:s})}function gs(t,a){return as.alert(t,a)}export{Es as E,gs as a,_s as l,cs as n};
|
package/dist/index.html
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<meta http-equiv="Expires" content="0" />
|
|
12
12
|
<title>低代码设计器 - VTJ.PRO</title>
|
|
13
13
|
<script>
|
|
14
|
-
var __BUILD_TIME__ = '
|
|
14
|
+
var __BUILD_TIME__ = '1782279422607';
|
|
15
15
|
(function () {
|
|
16
16
|
const regex = /<!--{{(\d*)}}-->/;
|
|
17
17
|
window.fetch('?t=' + Date.now()).then(async (res) => {
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
});
|
|
28
28
|
})();
|
|
29
29
|
</script>
|
|
30
|
-
<!--{{
|
|
30
|
+
<!--{{1782279422607}}-->
|
|
31
31
|
|
|
32
|
-
<script type="module" crossorigin src="./assets/index-
|
|
32
|
+
<script type="module" crossorigin src="./assets/index-Dan57dsA.js"></script>
|
|
33
33
|
<link rel="modulepreload" crossorigin href="./assets/vue-fMktb-5o.js">
|
|
34
34
|
<link rel="modulepreload" crossorigin href="./assets/@vueuse-SvwMwBjL.js">
|
|
35
35
|
<link rel="modulepreload" crossorigin href="./assets/lodash-es-BxdYFYdv.js">
|
|
@@ -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);
|
package/dist/uni/index.html
CHANGED
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
<title></title>
|
|
45
45
|
<!--preload-links-->
|
|
46
46
|
<!--app-context-->
|
|
47
|
-
<script type="module" crossorigin src="./assets/index-
|
|
47
|
+
<script type="module" crossorigin src="./assets/index-DM2VgRQy.js"></script>
|
|
48
48
|
<link rel="modulepreload" crossorigin href="./assets/axios-Cc-15rbk.js">
|
|
49
49
|
<link rel="modulepreload" crossorigin href="./assets/vue-DefuvV9N.js">
|
|
50
50
|
<link rel="modulepreload" crossorigin href="./assets/@dcloudio-uni-shared-BN07FyFa.js">
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vtj/pro",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.18.
|
|
4
|
+
"version": "0.18.9",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"AI低代码",
|
|
7
7
|
"AI编程",
|
|
@@ -23,22 +23,22 @@
|
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"type": "module",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@vtj/
|
|
27
|
-
"@vtj/
|
|
28
|
-
"@vtj/
|
|
29
|
-
"@vtj/
|
|
30
|
-
"@vtj/
|
|
31
|
-
"@vtj/
|
|
26
|
+
"@vtj/designer": "~0.18.9",
|
|
27
|
+
"@vtj/core": "~0.18.9",
|
|
28
|
+
"@vtj/local": "~0.18.9",
|
|
29
|
+
"@vtj/renderer": "~0.18.9",
|
|
30
|
+
"@vtj/materials": "~0.18.9",
|
|
31
|
+
"@vtj/uni": "~0.18.9"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"vite-plugin-vue-devtools": "~8.0.2",
|
|
35
35
|
"vue": "~3.5.37",
|
|
36
36
|
"vue-router": "~4.6.0",
|
|
37
|
-
"@vtj/
|
|
38
|
-
"@vtj/
|
|
39
|
-
"@vtj/ui": "~0.18.
|
|
40
|
-
"@vtj/
|
|
41
|
-
"@vtj/
|
|
37
|
+
"@vtj/icons": "~0.18.9",
|
|
38
|
+
"@vtj/charts": "~0.18.9",
|
|
39
|
+
"@vtj/ui": "~0.18.9",
|
|
40
|
+
"@vtj/utils": "~0.18.9",
|
|
41
|
+
"@vtj/cli": "~0.13.0"
|
|
42
42
|
},
|
|
43
43
|
"exports": {
|
|
44
44
|
"./vite": {
|