pome-ui 2.0.0-preview48 → 2.0.0-preview49
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/package.json +1 -1
- package/pome-ui.dev.js +21 -4
- package/pome-ui.dev.min.js +11 -11
- package/pome-ui.js +21 -4
- package/pome-ui.min.js +1 -1
package/pome-ui.js
CHANGED
|
@@ -178,6 +178,17 @@ function build(options, exports) {
|
|
|
178
178
|
return _root;
|
|
179
179
|
};
|
|
180
180
|
|
|
181
|
+
function _findRoot(instance) {
|
|
182
|
+
var globalRoot = exports.root();
|
|
183
|
+
if (globalRoot) return globalRoot;
|
|
184
|
+
if (!instance) return null;
|
|
185
|
+
var current = instance;
|
|
186
|
+
while (current.parent) {
|
|
187
|
+
current = current.parent;
|
|
188
|
+
}
|
|
189
|
+
return current.proxy || current;
|
|
190
|
+
}
|
|
191
|
+
|
|
181
192
|
exports._rules = [];
|
|
182
193
|
|
|
183
194
|
function useRoutes(url) {
|
|
@@ -230,6 +241,12 @@ function build(options, exports) {
|
|
|
230
241
|
if (extraFn) {
|
|
231
242
|
extraFn.call(this, instance, opt);
|
|
232
243
|
}
|
|
244
|
+
if (!instance.$root) {
|
|
245
|
+
instance.$root = _findRoot(instance);
|
|
246
|
+
}
|
|
247
|
+
if (!instance.$parent) {
|
|
248
|
+
instance.$parent = (instance.parent && instance.parent.proxy) || instance.$root;
|
|
249
|
+
}
|
|
233
250
|
};
|
|
234
251
|
}
|
|
235
252
|
|
|
@@ -369,8 +386,8 @@ function build(options, exports) {
|
|
|
369
386
|
})
|
|
370
387
|
.then(function (component) {
|
|
371
388
|
_hookSetup(component, function (instance, comp) {
|
|
372
|
-
instance.$parent = parent ||
|
|
373
|
-
instance.$root =
|
|
389
|
+
instance.$parent = parent || _findRoot(instance);
|
|
390
|
+
instance.$root = _findRoot(instance) || parent;
|
|
374
391
|
instance.$view = url;
|
|
375
392
|
instance.$data = comp.data || function () { return {}; };
|
|
376
393
|
instance.$created = comp.created || function () { };
|
|
@@ -611,8 +628,8 @@ function build(options, exports) {
|
|
|
611
628
|
function Root(options, el, layout) {
|
|
612
629
|
options = options || {};
|
|
613
630
|
_hookSetup(options, function (instance) {
|
|
614
|
-
instance.$parent = parent ||
|
|
615
|
-
instance.$root =
|
|
631
|
+
instance.$parent = parent || _findRoot(instance);
|
|
632
|
+
instance.$root = _findRoot(instance) || parent;
|
|
616
633
|
instance.$onUpdating = options.onUpdating;
|
|
617
634
|
if (layout) {
|
|
618
635
|
instance.$layout = layout;
|
package/pome-ui.min.js
CHANGED
|
@@ -2,4 +2,4 @@ var Vue=function(e){"use strict";var n,r;let o,b,i,l,_,x,ae,C,w,T,k,A,$;function
|
|
|
2
2
|
`,-1),e.hoists.length)){let e=[Al,Nl,Pl,El,Rl].filter(e=>c.includes(e)).map(Sc).join(", ");i(`const { ${e} } = _Vue
|
|
3
3
|
`,-1)}(function(n,r){if(!n.length)return;r.pure=!0;let{push:i,newline:o}=r;o();for(let t=0;t<n.length;t++){let e=n[t];e&&(i(`const _hoisted_${t+1} = `),Tc(e,r),o())}r.pure=!1})(e.hoists,t),o(),i("return ")})(t,n);let h=(u?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(i(`function ${u?"ssrRender":"render"}(${h}) {`),s(),f&&(i("with (_ctx) {"),s(),d&&(i(`const { ${p.map(Sc).join(", ")} } = _Vue
|
|
4
4
|
`,-1),a())),t.components.length&&(xc(t.components,"component",n),(t.directives.length||t.temps>0)&&a()),t.directives.length&&(xc(t.directives,"directive",n),t.temps>0&&a()),t.temps>0){i("let ");for(let e=0;e<t.temps;e++)i(`${e>0?", ":""}_temp${e}`)}return(t.components.length||t.directives.length||t.temps)&&(i(`
|
|
5
|
-
`,0),a()),u||i("return "),t.codegenNode?Tc(t.codegenNode,n):i("null"),f&&(l(),i("}")),l(),i("}"),{ast:t,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}(o,i)}(e,Q({},du,t,{nodeTransforms:[bu,...Su,...t.nodeTransforms||[]],directiveTransforms:Q({},xu,t.directiveTransforms||{}),transformHoist:null}))}(t,i),s=Function(o)();return s._rc=!0,Cu[n]=s}return Do(wu),e.BaseTransition=ir,e.BaseTransitionPropsValidators=tr,e.Comment=se,e.DeprecationTypes=null,e.EffectScope=qe,e.ErrorCodes={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},e.ErrorTypeStrings=null,e.Fragment=oe,e.KeepAlive={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(u,{slots:p}){let i=Oo(),e=i.ctx,d=new Map,f=new Set,h=null,s=i.suspense,{renderer:{p:l,m:a,um:t,o:{createElement:n}}}=e,r=n("div");function o(e){Ir(e),t(e,i,s,!0)}function c(r){d.forEach((e,t)=>{let n=Ho(e.type);n&&!r(n)&&m(t)})}function m(e){let t=d.get(e);!t||h&&yo(t,h)?h&&Ir(h):o(t),d.delete(e),f.delete(e)}e.activate=(t,e,n,r,i)=>{let o=t.component;a(t,e,n,0,s),l(o.vnode,t,e,n,o,s,r,t.slotScopeIds,i),ie(()=>{o.isDeactivated=!1,o.a&&Se(o.a);let e=t.props&&t.props.onVnodeMounted;e&&Po(e,o.parent,t)},s)},e.deactivate=t=>{let n=t.component;Vi(n.m),Vi(n.a),a(t,r,null,1,s),ie(()=>{n.da&&Se(n.da);let e=t.props&&t.props.onVnodeUnmounted;e&&Po(e,n.parent,t),n.isDeactivated=!0},s)},Hi(()=>[u.include,u.exclude],([t,n])=>{t&&c(e=>Pr(t,e)),n&&c(e=>!Pr(n,e))},{flush:"post",deep:!0});let v=null,g=()=>{null!=v&&(eo(i.subTree.type)?ie(()=>{d.set(v,$r(i.subTree))},i.subTree.suspense):d.set(v,$r(i.subTree)))};return Dr(g),Vr(g),jr(()=>{d.forEach(e=>{let{subTree:t,suspense:n}=i,r=$r(t);if(e.type===r.type&&e.key===r.key){Ir(r);let e=r.component.da;e&&ie(e,n);return}o(e)})}),()=>{if(v=null,!p.default)return h=null;let e=p.default(),t=e[0];if(e.length>1)return h=null,e;if(!go(t)||!(4&t.shapeFlag)&&!(128&t.shapeFlag))return h=null,t;let n=$r(t);if(n.type===se)return h=null,n;let r=n.type,i=Ho(kr(n)?n.type.__asyncResolved||{}:r),{include:o,exclude:s,max:l}=u;if(o&&(!i||!Pr(o,i))||s&&i&&Pr(s,i))return n.shapeFlag&=-257,h=n,t;let a=null==n.key?r:n.key,c=d.get(a);return n.el&&(n=Co(n),128&t.shapeFlag&&(t.ssContent=n)),v=a,c?(n.el=c.el,n.component=c.component,n.transition&&cr(n,n.transition),n.shapeFlag|=512,f.delete(a),f.add(a)):(f.add(a),l&&f.size>parseInt(l,10)&&m(f.values().next().value)),n.shapeFlag|=256,h=n,eo(t.type)?t:n}}},e.ReactiveEffect=ze,e.Static=ao,e.Suspense={name:"Suspense",__isSuspense:!0,process(e,t,n,r,i,o,s,l,a,c){if(null==e)(function(e,t,n,r,i,o,s,l,a){let{p:c,o:{createElement:u}}=a,p=u("div"),d=e.suspense=ro(e,i,r,t,p,n,o,s,l,a);c(null,d.pendingBranch=e.ssContent,p,null,r,d,o,s),d.deps>0?(no(e,"onPending"),no(e,"onFallback"),c(null,e.ssFallback,t,n,r,null,o,s),so(d,e.ssFallback)):d.resolve(!1,!0)})(t,n,r,i,o,s,l,a,c);else{if(o&&o.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}(function(e,t,n,r,i,o,s,l,{p:a,um:c,o:{createElement:u}}){let p=t.suspense=e.suspense;p.vnode=t,t.el=e.el;let d=t.ssContent,f=t.ssFallback,{activeBranch:h,pendingBranch:m,isInFallback:v,isHydrating:g}=p;if(m)p.pendingBranch=d,yo(d,m)?(a(m,d,p.hiddenContainer,null,i,p,o,s,l),p.deps<=0?p.resolve():v&&!g&&(a(h,f,n,r,i,null,o,s,l),so(p,f))):(p.pendingId=to++,g?(p.isHydrating=!1,p.activeBranch=m):c(m,i,p),p.deps=0,p.effects.length=0,p.hiddenContainer=u("div"),v?(a(null,d,p.hiddenContainer,null,i,p,o,s,l),p.deps<=0?p.resolve():(a(h,f,n,r,i,null,o,s,l),so(p,f))):h&&yo(d,h)?(a(h,d,n,r,i,p,o,s,l),p.resolve(!0)):(a(null,d,p.hiddenContainer,null,i,p,o,s,l),p.deps<=0&&p.resolve()));else if(h&&yo(d,h))a(h,d,n,r,i,p,o,s,l),so(p,d);else if(no(t,"onPending"),p.pendingBranch=d,512&d.shapeFlag?p.pendingId=d.component.suspenseId:p.pendingId=to++,a(null,d,p.hiddenContainer,null,i,p,o,s,l),p.deps<=0)p.resolve();else{let{timeout:e,pendingId:t}=p;e>0?setTimeout(()=>{p.pendingId===t&&p.fallback(f)},e):0===e&&p.fallback(f)}})(e,t,n,r,i,s,l,a,c)}},hydrate:function(e,t,n,r,i,o,s,l,a){let c=t.suspense=ro(t,r,n,e.parentNode,document.createElement("div"),null,i,o,s,l,!0),u=a(e,c.pendingBranch=t.ssContent,n,c,o,s);return 0===c.deps&&c.resolve(!1,!0),u},normalize:function(e){let{shapeFlag:t,children:n}=e,r=32&t;e.ssContent=io(r?n.default:n),e.ssFallback=r?io(n.fallback):le(se)}},e.Teleport=Gn,e.Text=lo,e.TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},e.Transition=rs,e.TransitionGroup=Ws,e.TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},e.VueElement=Us,e.assertNumber=function(e,t){},e.callWithAsyncErrorHandling=bn,e.callWithErrorHandling=_n,e.camelize=ne,e.capitalize=_e,e.cloneVNode=Co,e.compatUtils=null,e.compile=wu,e.computed=qo,e.createApp=ml,e.createBlock=vo,e.createCommentVNode=function(e="",t=!1){return t?(uo(),vo(se,null,e)):le(se,null,e)},e.createElementBlock=function(e,t,n,r,i,o){return mo(So(e,t,n,r,i,o,!0))},e.createElementVNode=So,e.createHydrationRenderer=$i,e.createPropsRestProxy=function(t,n){let r={};for(let e in t)n.includes(e)||Object.defineProperty(r,e,{enumerable:!0,get:()=>t[e]});return r},e.createRenderer=function(e){return Mi(e)},e.createSSRApp=vl,e.createSlots=function(t,r){for(let e=0;e<r.length;e++){let n=r[e];if(Y(n))for(let e=0;e<n.length;e++)t[n[e].name]=n[e].fn;else n&&(t[n.name]=n.key?(...e)=>{let t=n.fn(...e);return t&&(t.key=n.key),t}:n.fn)}return t},e.createStaticVNode=function(e,t){let n=le(ao,null,e);return n.staticCount=t,n},e.createTextVNode=wo,e.createVNode=le,e.customRef=un,e.defineAsyncComponent=function(e){let o;ee(e)&&(e={loader:e});let{loader:n,loadingComponent:s,errorComponent:l,delay:a=200,hydrate:i,timeout:c,suspensible:u=!0,onError:r}=e,p=null,d=0,f=()=>(d++,p=null,h()),h=()=>{let t;return p||(t=p=n().catch(n=>{if(n=n instanceof Error?n:Error(String(n)),r)return new Promise((e,t)=>{r(n,()=>e(f()),()=>t(n),d+1)});throw n}).then(e=>t!==p&&p?p:(e&&(e.__esModule||"Module"===e[Symbol.toStringTag])&&(e=e.default),o=e,e)))};return pr({name:"AsyncComponentWrapper",__asyncLoader:h,__asyncHydrate(t,n,r){let e=i?()=>{let e=i(r,e=>function(n,r){if(_r(n)&&"["===n.data){let e=1,t=n.nextSibling;for(;t;){if(1===t.nodeType){if(!1===r(t))break}else if(_r(t)){if("]"===t.data){if(0==--e)break}else"["===t.data&&e++}t=t.nextSibling}}else r(n)}(t,e));e&&(n.bum||(n.bum=[])).push(e)}:r;o?e():h().then(()=>!n.isUnmounted&&e())},get __asyncResolved(){return o},setup(){let t=m;if(dr(t),o)return()=>Ar(o,t);let n=e=>{p=null,Sn(e,t,13,!l)};if(u&&t.suspense)return h().then(e=>()=>Ar(e,t)).catch(e=>(n(e),()=>l?le(l,{error:e}):null));let e=tn(!1),r=tn(),i=tn(!!a);return a&&setTimeout(()=>{i.value=!1},a),null!=c&&setTimeout(()=>{if(!e.value&&!r.value){let e=Error(`Async component timed out after ${c}ms.`);n(e),r.value=e}},c),h().then(()=>{e.value=!0,t.parent&&Nr(t.parent.vnode)&&t.parent.update()}).catch(e=>{n(e),r.value=e}),()=>e.value&&o?Ar(o,t):r.value&&l?le(l,{error:r.value}):s&&!i.value?le(s):void 0}})},e.defineComponent=pr,e.defineCustomElement=Fs,e.defineEmits=function(){return null},e.defineExpose=function(e){},e.defineModel=function(){},e.defineOptions=function(e){},e.defineProps=function(){return null},e.defineSSRCustomElement=(e,t)=>Fs(e,t,vl),e.defineSlots=function(){return null},e.devtools=void 0,e.effect=function(e,t){e.effect instanceof ze&&(e=e.effect.fn);let n=new ze(e);t&&Q(n,t);try{n.run()}catch(e){throw n.stop(),e}let r=n.run.bind(n);return r.effect=n,r},e.effectScope=function(e){return new qe(e)},e.getCurrentInstance=Oo,e.getCurrentScope=function(){return b},e.getCurrentWatcher=function(){return A},e.getTransitionRawChildren=ur,e.guardReactiveProps=xo,e.h=Wo,e.handleError=Sn,e.hasInjectionContext=function(){return!!(m||c||vi)},e.hydrate=(...e)=>{fl().hydrate(...e)},e.hydrateOnIdle=(n=1e4)=>e=>{let t=wr(e,{timeout:n});return()=>Tr(t)},e.hydrateOnInteraction=(o=[])=>(t,e)=>{O(o)&&(o=[o]);let n=!1,r=e=>{n||(n=!0,i(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},i=()=>{e(t=>{for(let e of o)t.removeEventListener(e,r)})};return e(t=>{for(let e of o)t.addEventListener(e,r,{once:!0})}),i},e.hydrateOnMediaQuery=n=>t=>{if(n){let e=matchMedia(n);if(!e.matches)return e.addEventListener("change",t,{once:!0}),()=>e.removeEventListener("change",t);t()}},e.hydrateOnVisible=t=>(n,e)=>{let r=new IntersectionObserver(t=>{for(let e of t)if(e.isIntersecting){r.disconnect(),n();break}},t);return e(e=>{if(e instanceof Element){if(function(e){let{top:t,left:n,bottom:r,right:i}=e.getBoundingClientRect(),{innerHeight:o,innerWidth:s}=window;return(t>0&&t<o||r>0&&r<o)&&(n>0&&n<s||i>0&&i<s)}(e))return n(),r.disconnect(),!1;r.observe(e)}}),()=>r.disconnect()},e.initCustomFormatter=function(){},e.initDirectivesForSSR=X,e.inject=yi,e.isMemoSame=zo,e.isProxy=Zt,e.isReactive=Jt,e.isReadonly=Xt,e.isRef=I,e.isRuntimeOnly=()=>!C,e.isShallow=Qt,e.isVNode=go,e.markRaw=Yt,e.mergeDefaults=function(e,n){let r=ri(e);for(let t in n){if(t.startsWith("__skip"))continue;let e=r[t];e?Y(e)||ee(e)?e=r[t]={type:e,default:n[t]}:e.default=n[t]:null===e&&(e=r[t]={default:n[t]}),e&&n[`__skip_${t}`]&&(e.skipFactory=!0)}return r},e.mergeModels=function(e,t){return e&&t?Y(e)&&Y(t)?e.concat(t):Q({},ri(e),ri(t)):e||t},e.mergeProps=No,e.nextTick=Pn,e.normalizeClass=Oe,e.normalizeProps=function(e){if(!e)return null;let{class:t,style:n}=e;return t&&!O(t)&&(e.class=Oe(t)),n&&(e.style=Ae(n)),e},e.normalizeStyle=Ae,e.onActivated=Er,e.onBeforeMount=Fr,e.onBeforeUnmount=jr,e.onBeforeUpdate=Ur,e.onDeactivated=Rr,e.onErrorCaptured=zr,e.onMounted=Dr,e.onRenderTracked=Wr,e.onRenderTriggered=qr,e.onScopeDispose=function(e,t=!1){b&&b.cleanups.push(e)},e.onServerPrefetch=Hr,e.onUnmounted=Br,e.onUpdated=Vr,e.onWatcherCleanup=gn,e.openBlock=uo,e.popScopeId=function(){Ln=null},e.provide=gi,e.proxyRefs=an,e.pushScopeId=function(e){Ln=e},e.queuePostFlushCb=On,e.reactive=Wt,e.readonly=Gt,e.ref=tn,e.registerRuntimeCompiler=Do,e.render=hl,e.renderList=function(r,i,e,t){let o;let s=e&&e[t],l=Y(r);if(l||O(r)){let e=l&&Jt(r),n=!1;e&&(n=!Qt(r),r=mt(r)),o=Array(r.length);for(let e=0,t=r.length;e<t;e++)o[e]=i(n?p(r[e]):r[e],e,void 0,s&&s[e])}else if("number"==typeof r){o=Array(r);for(let e=0;e<r;e++)o[e]=i(e+1,e,void 0,s&&s[e])}else if(te(r)){if(r[Symbol.iterator])o=Array.from(r,(e,t)=>i(e,t,void 0,s&&s[t]));else{let n=Object.keys(r);o=Array(n.length);for(let t=0,e=n.length;t<e;t++){let e=n[t];o[t]=i(r[e],e,t,s&&s[t])}}}else o=[];return e&&(e[t]=o),o},e.renderSlot=function(e,t,n={},r,i){if(c.ce||c.parent&&kr(c.parent)&&c.parent.ce)return"default"!==t&&(n.name=t),uo(),vo(oe,null,[le("slot",n,r&&r())],64);let o=e[t];o&&o._c&&(o._d=!1),uo();let s=o&&function t(e){return e.some(e=>!go(e)||!!(e.type!==se&&(e.type!==oe||t(e.children))))?e:null}(o(n)),l=n.key||s&&s.key,a=vo(oe,{key:(l&&!W(l)?l:`_${t}`)+(!s&&r?"_fb":"")},s||(r?r():[]),s&&1===e._?64:-2);return!i&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),o&&o._c&&(o._d=!0),a},e.resolveComponent=function(e,t){return Jr(Gr,e,!0,t)||e},e.resolveDirective=function(e){return Jr("directives",e)},e.resolveDynamicComponent=function(e){return O(e)?Jr(Gr,e,!1)||e:e||Kr},e.resolveFilter=null,e.resolveTransitionHooks=sr,e.setBlockTracking=ho,e.setDevtoolsHook=X,e.setTransitionHooks=cr,e.shallowReactive=zt,e.shallowReadonly=function(e){return Kt(e,!0,Ot,Vt,qt)},e.shallowRef=nn,e.ssrContextKey=ji,e.ssrUtils=null,e.stop=function(e){e.effect.stop()},e.toDisplayString=je,e.toHandlerKey=be,e.toHandlers=function(t,n){let r={};for(let e in t)r[n&&/[A-Z]/.test(e)?`on:${e}`:be(e)]=t[e];return r},e.toRaw=re,e.toRef=function(e,t,n){return I(e)?e:ee(e)?new dn(e):te(e)&&arguments.length>1?fn(e,t,n):tn(e)},e.toRefs=function(t){let n=Y(t)?Array(t.length):{};for(let e in t)n[e]=fn(t,e);return n},e.toValue=function(e){return ee(e)?e():sn(e)},e.transformVNodeArgs=function(e){},e.triggerRef=function(e){e.dep&&e.dep.trigger()},e.unref=sn,e.useAttrs=function(){return ni().attrs},e.useCssModule=function(e="$style"){return J},e.useCssVars=function(n){let r=Oo();if(!r)return;let t=r.ut=(t=n(r.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${r.uid}"]`)).forEach(e=>bs(e,t))},i=()=>{let e=n(r.proxy);r.ce?bs(r.ce,e):function t(n,r){if(128&n.shapeFlag){let e=n.suspense;n=e.activeBranch,e.pendingBranch&&!e.isHydrating&&e.effects.push(()=>{t(e.activeBranch,r)})}for(;n.component;)n=n.component.subTree;if(1&n.shapeFlag&&n.el)bs(n.el,r);else if(n.type===oe)n.children.forEach(e=>t(e,r));else if(n.type===ao){let{el:e,anchor:t}=n;for(;e&&(bs(e,r),e!==t);)e=e.nextSibling}}(r.subTree,e),t(e)};Ur(()=>{On(i)}),Dr(()=>{Hi(i,X,{flush:"post"});let e=new MutationObserver(i);e.observe(r.subTree.el.parentNode,{childList:!0}),Br(()=>e.disconnect())})},e.useHost=Vs,e.useId=function(){let e=Oo();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""},e.useModel=function(t,l,a=J){let c=Oo(),u=ne(l),p=ye(l),n=zi(t,u),r=un((e,r)=>{let i,o;let s=J;return Bi(()=>{let e=t[u];S(i,e)&&(i=e,r())}),{get:()=>(e(),a.get?a.get(i):i),set(e){let t=a.set?a.set(e):e;if(!S(t,i)&&!(s!==J&&S(e,s)))return;let n=c.vnode.props;n&&(l in n||u in n||p in n)&&(`onUpdate:${l}`in n||`onUpdate:${u}`in n||`onUpdate:${p}`in n)||(i=e,r()),c.emit(`update:${l}`,t),S(e,t)&&S(e,s)&&!S(t,o)&&r(),s=e,o=t}}});return r[Symbol.iterator]=()=>{let e=0;return{next:()=>e<2?{value:e++?n||J:r,done:!1}:{done:!0}}},r},e.useSSRContext=()=>{},e.useShadowRoot=function(){let e=Vs();return e&&e.shadowRoot},e.useSlots=function(){return ni().slots},e.useTemplateRef=function(e){let t=Oo(),n=nn(null);return t&&Object.defineProperty(t.refs===J?t.refs={}:t.refs,e,{enumerable:!0,get:()=>n.value,set:e=>n.value=e}),n},e.useTransitionState=Yn,e.vModelCheckbox=el,e.vModelDynamic={created(e,t,n){ll(e,t,n,null,"created")},mounted(e,t,n){ll(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){ll(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){ll(e,t,n,r,"updated")}},e.vModelRadio=nl,e.vModelSelect=rl,e.vModelText=Ys,e.vShow={beforeMount(e,{value:t},{transition:n}){e[vs]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):ys(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),ys(e,!0),r.enter(e)):r.leave(e,()=>{ys(e,!1)}):ys(e,t))},beforeUnmount(e,{value:t}){ys(e,t)}},e.version=Go,e.warn=X,e.watch=function(e,t,n){return Hi(e,t,n)},e.watchEffect=function(e,t){return Hi(e,null,t)},e.watchPostEffect=function(e,t){return Hi(e,null,{flush:"post"})},e.watchSyncEffect=Bi,e.withAsyncContext=function(e){let t=Oo(),n=e();return $o(),ue(n)&&(n=n.catch(e=>{throw Io(t),e})),[n,()=>Io(t)]},e.withCtx=Dn,e.withDefaults=function(e,t){return null},e.withDirectives=function(e,o){if(null===c)return e;let s=Bo(c),l=e.dirs||(e.dirs=[]);for(let i=0;i<o.length;i++){let[e,t,n,r=J]=o[i];e&&(ee(e)&&(e={mounted:e,updated:e}),e.deep&&yn(t),l.push({dir:e,instance:s,value:t,oldValue:void 0,arg:n,modifiers:r}))}return e},e.withKeys=(n,r)=>{let e=n._withKeys||(n._withKeys={}),t=r.join(".");return e[t]||(e[t]=e=>{if(!("key"in e))return;let t=ye(e.key);if(r.some(e=>e===t||ul[e]===t))return n(e)})},e.withMemo=function(e,t,n,r){let i=n[r];if(i&&zo(i,e))return i;let o=t();return o.memo=e.slice(),o.cacheIndex=r,n[r]=o},e.withModifiers=(t,r)=>{let e=t._withMods||(t._withMods={}),n=r.join(".");return e[n]||(e[n]=(n,...e)=>{for(let t=0;t<r.length;t++){let e=cl[r[t]];if(e&&e(n,r))return}return t(n,...e)})},e.withScopeId=e=>Dn,e}({});window.Vue=Vue;function build(options,exports){if(typeof exports=="undefined"){exports={}}var _options={resolveModulesParallelly:true,removeStyleWhenUnmount:false,preloadCss:true,mobile:function(){return false},httpGet:function(e){return fetch(e)},httpGetSync:function(e){if(useRelativePath){if(e.length&&e[0]=="/"){e=e.substr(1)}}var t=new XMLHttpRequest;t.open("get",e,false);t.send();return t.responseText},onNotFound:function(e,t){if(e.indexOf("/404")==0){throw"No not-found template found"}if(t){return Redirect("/404?"+_serializeOptionsToUrl(t))}else{return Redirect("/404")}},reuseContainerActiveView(e){return true},callCreatedWhenReuseContainerActiveView(e){return true},callMountedWhenReuseContainerActiveView(e){return true},callUnmountedWhenReuseContainerActiveView(e){return true},resetDataWhenReuseContainerActiveView(e){return true},generateTitle(e){return e.join(" - ")}};_combineObject(options,_options);var _cache={};var _css={};var _cssCloakInjected=false;function _ensureCssCloakStyle(){if(_cssCloakInjected)return;_cssCloakInjected=true;var e=document.createElement("style");e.textContent="._pome-css-cloak{visibility:hidden!important}";document.head.appendChild(e)}function _httpCached(e){return!!_cache[e]}function _httpGet(n){if(_cache[n]){return Promise.resolve(_cache[n])}var e=n;if(_options.version){if(n.indexOf("?")>0){e+="&"}else{e+="?"}e+="v="+_options.version}return _options.httpGet(e).then(function(e){if(e.status>300||e.status<200){return Promise.reject(e)}var t=e.text();_cache[n]=t;return Promise.resolve(t)}).catch(function(e){Promise.reject(e)})}function _httpExist(e){return _httpGet(e).then(function(){return Promise.resolve(true)}).catch(function(){return Promise.resolve(false)})}function _serializeOptionsToUrl(e){var t=Object.getOwnPropertyNames(e);var n="";for(var r=0;r<t.length;++r){n+=encodeURIComponent(t[r])+"="+encodeURIComponent(e[t[r]])+"&"}if(n[n.length-1]==="&"){n=n.substr(0,n.length-1)}return n}function _addHyphenBeforeUppercase(e){var t=e.replace(/([A-Z])/g,"-$1").toLowerCase();while(t.length&&t[0]=="-"){t=t.substr(1)}return t}function _sanitizeTemplate(e){if(!e instanceof String){return e}var t=[...e.matchAll(/(?<=:)[a-zA-Z0-9-_]{1,}(?=\=")/g)];for(var n=0;n<t.length;++n){var r=t[n].toString();var i=_addHyphenBeforeUppercase(r);e=e.replaceAll(":"+r+"=",":"+i+"=")}t=[...e.matchAll(/(?<=@)[a-zA-Z0-9-_]{1,}(?=\=")/g)];for(var n=0;n<t.length;++n){var r=t[n].toString();var i=_addHyphenBeforeUppercase(r);e=e.replaceAll("@"+r+"=","@"+i+"=")}return e}var _root=null;function root(){return _root}exports._rules=[];function useRoutes(e){var t=_options.httpGetSync(e);t=JSON.parse(t);if(!exports._rules){exports._rules={}}_combineObject(t,exports._rules)}function _combineObject(e,t){if(!e){return}var n=Object.getOwnPropertyNames(e);for(var r=0;r<n.length;++r){t[n[r]]=e[n[r]]}}function _chainHook(e,t,r){var i=e[t]||function(){};e[t]=function(){var t=this;var e=i.call(t);var n=e&&e instanceof Promise?e:Promise.resolve();return n.then(function(){var e;try{e=r.call(t)}catch(e){console.error(e)}return e&&e instanceof Promise?e:Promise.resolve()})}}function _hookSetup(r,i){var o=r.setup||function(){};r.setup=function(e,t){o(e,t);var n=Vue.getCurrentInstance();n.$app=exports;if(i){i.call(this,n,r)}}}function _hookData(e,t){var n=e.data||function(){return{}};e.data=function(){var e=n.call(this,exports);if(t){_combineObject(t,e);_parseQueryString(e)}return e}}function _createRequire(r){if(!PomeloModule)return undefined;return function(e,t,n){t=t||PomeloModule.getContainingFolder(r);return PomeloModule.require(e,t,n)}}function _getQueryString(){var e=window.location.search;if(window.location.hash.indexOf("?")>0){var t=window.location.hash.substr(window.location.hash.indexOf("?"));if(e){e+="&"+t.substr(1)}else{e=t}}return e}function _parseQueryString(e){var t=_getQueryString();if(!t){return}var n=t;if(n[0]=="?"){n=n.substr(1)}var r=n.split("&");for(var i=0;i<r.length;++i){var o=r[i].split("=");var s=decodeURIComponent(o[0]);var l=decodeURIComponent(o[1]);_fillObjectField(s,l,e)}}function _resolveModules(e,n){if(!e){return Promise.resolve()}if(_options.resolveModulesParallelly){var t=[];for(var r=0;r<e.length;++r){t.push(LoadScript(parseMacroPath(n,e[r])))}return Promise.all(t)}else{var i=Promise.resolve(null);var o=function(t){return function(e){return LoadScript(parseMacroPath(n,t))}};for(var r=0;r<e.length;++r){var s=e[r];i=i.then(o(s))}return i}}function _buildApp(url,params,mobile,parent){var componentObject={};return _httpGet(url+".js").then(function(js){var Page=function(e){componentObject=e};var require=_createRequire(url);eval(js+"\r\n//# sourceURL="+url+".js");hookMountedAndUnmounted(componentObject,url+(mobile?".m":""));return _resolveModules(componentObject.modules||[],url).then(function(){return Promise.resolve(componentObject)})}).then(function(o){var e=null;if(mobile){e=_httpExist(url+".m.html").then(function(e){return _httpGet(url+(e?".m.html":".html"))})}else{e=_httpGet(url+".html")}return e.then(function(e){if(!o.template){o.template=_sanitizeTemplate(e)}if(o.delayOpen){var t=(new DOMParser).parseFromString(o.template,"text/html");var n=t.querySelector("body").children;for(var r=0;r<n.length;++r){if(n[r].tagName.toUpperCase()!="DIV"){continue}if(n[r].getAttribute("v-if")!=null||n[r].getAttribute("v-else-if")||n[r].getAttribute("v-else")){continue}n[r].classList.add("_pome-ui-opened");n[r].classList.add("_pome-ui-opening")}var i=e.indexOf("<html")>=0?(new XMLSerializer).serializeToString(t):t.querySelector("body").innerHTML;o.template=i}_patchComponent(url,o);return Promise.resolve(o)})}).then(function(a){_hookSetup(a,function(e,t){e.$parent=parent||exports.root();e.$root=exports.root()||parent;e.$view=url;e.$data=t.data||function(){return{}};e.$created=t.created||function(){};e.$mounted=t.mounted||function(){};e.$unmounted=t.unmounted||function(){};e.$delayClose=t.delayClose||0;_attachContainer(e)});_hookData(a,params);return _resolveModules(a.modules,url).then(function(){var e=a.components||[];var s=a.directives||[];var l;var t=Promise.resolve();var n=url+(mobile?".m":"");if(_options.preloadCss&&a.style){t=appendCssReferenceAsync(n,a.style)}return Promise.all([t,_loadComponents(e,url)]).then(function(e){var t=e[1];var n=Vue.createApp(a);for(var r=0;r<t.length;++r){var i=t[r];n.component(i.name,i.options)}var o=n.mount||function(){};n.mount=function(e){n.proxy=o(e);return n.proxy};l=n;return _loadDirectives(s,url)}).then(function(e){for(var t=0;t<e.length;++t){var n=e[t];l.directive(n.name,n.options)}return Promise.resolve(l)})})})}function _replace(e,t,n){var r=e.indexOf(t);if(r<0){return e}var i=e.substr(0,r)+n+e.substr(r+t.length);return i}function sleep(t){return new Promise(function(e){setTimeout(function(){e()},t)})}function yield(){return sleep(0)}function _attachContainer(r){if(!r){console.warn("Invalid view model")}if(!r.$containers){r.$containers=[]}if(!r.$containers){r.$containers=[]}var n=r.$containers;r.$container=function(t){var e=n.filter(e=>e.selector==t)[0];if(!e){e={element:document.querySelector(t),selector:t,open:function(e,l){var t=_options.mobile();var a=null;if(r.proxy){a=r.proxy}if(r.$&&r.$.proxy){a=r.$.proxy}var n=Promise.resolve();if(!this.active||this.active.$view!=e||!_options.reuseContainerActiveView()){n=this.close()}var c=this;return n.then(function(){var n=Promise.resolve();l=generateParametersFromRoute(l);_parseQueryString(l);if(_options.reuseContainerActiveView()&&c.active?.$view==e){var r=function(t){if(!t||!t.active){return n}if(_options.callUnmountedWhenReuseContainerActiveView(t.active.$view)){n=n.then(function(){var e=t.active.$unmounted();if(e instanceof Promise){return e}else{return Promise.resolve()}})}n=n.then(function(){var e=t.active.$data();if(_options.resetDataWhenReuseContainerActiveView()){_combineObject(e,t.active)}_combineObject(l,t.active);return Promise.resolve()});if(_options.callCreatedWhenReuseContainerActiveView(t.active.$view)){n=n.then(function(){var e=t.active.$created();if(e instanceof Promise){return e}else{return Promise.resolve()}})}if(_options.callMountedWhenReuseContainerActiveView(t.active.$view)){n=n.then(function(){var e=t.active.$mounted();if(e instanceof Promise){return e}else{return Promise.resolve()}})}if(t.active.$containers&&t.active.$containers.length){for(var e=0;e<t.active.$containers.length;++e){r(t.active.$containers[e])}}return n.then(function(){t.active.$forceUpdate();return Promise.resolve(t.active)})};return Promise.resolve(r(c))}var i;var o=20;var s=function(){var e=new Promise(function(e,t){var n=i.mount(c.selector);if(n){c.active=n;return Promise.resolve(n)}if(--o>0){return sleep(50).then(function(){return s()})}else{return Promise.reject("Mount component to "+c.selector+" failed")}});return e};return _buildApp(e,l,t,a).then(function(e){i=e;return s()})})},close:async function(n=true){async function r(e){if(e.active&&e.active.$){if(n){for(var t=0;t<e.active.$containers.length;++t){r(e.active.$containers[t])}}if(e.active.$delayClose){try{if(e.active.$el){e.active.$el.classList?.add("_pome-ui-closing")}}catch(e){console.warn(e)}console.log(`sleeping ${e.active.$delayClose}ms...`);await sleep(e.active.$delayClose)}try{e.active.$.appContext.app.unmount()}catch(e){console.warn(e)}e.active=null}}await r(this)},active:null};n.push(e)}return e}}function Root(o,r,s){o=o||{};_hookSetup(o,function(e){e.$parent=parent||exports.root();e.$root=exports.root()||parent;e.$onUpdating=o.onUpdating;if(s){e.$layout=s;e.$view=s}_attachContainer(e)});return _resolveModules(o.modules,s).then(function(){var i;return _loadComponents(o.components||[],s).then(function(e){var t=Vue.createApp(o||{});for(var n=0;n<e.length;++n){var r=e[n];t.component(r.name,r.options)}i=t;return _loadDirectives(o.directives||[],s)}).then(function(e){for(var t=0;t<e.length;++t){var n=e[t];app.directive(n.name,n.options)}_root=i.mount(r);_root.$.proxy=_root})})}function mount(){function r(e){if(!e){return null}if(!e.getAttribute){return null}var t=e.getAttribute("target")||"_self";var n=e.getAttribute("static-link")||e.getAttribute("v-static")||e.getAttribute("pomelo-static");if(n==null&&t.toLowerCase()=="_self"&&e.tagName.toLowerCase()=="a"){return e.getAttribute("href")}return r(e.parentNode)}window.addEventListener("click",function(e){if(!e)return;var t=r(e.target);if(t){if(e.ctrlKey||e.metaKey){return}exports.redirect(t);e.preventDefault();return}});window.onpopstate=function(){UpdateLayout()};return UpdateLayout()}function UseConfig(e){_combineObject(e,_options)}function MapRoute(e,t){if(!exports._rules){exports._rules={}}exports._rules[e]=t}function ForceUpdate(e=exports.root()){if(!e)return;e.$forceUpdate();if(e.$containers){for(var t=0;t<e.$containers.length;++t){if(e.$containers[t].active){ForceUpdate(e.$containers[t].active)}}}}function MatchRoute(){function e(e,t,n){return e.replace(new RegExp(t,"g"),n)}function t(e){var t=[];if(!e){return t}var n=-1;var r=0;for(var i=0;i<e.length;++i){if(e[i]=="{"&&!r){n=i;r=0}else if(e[i]=="("){++r}else if(e[i]==")"){--r}else if(e[i]=="}"&&!r){t.push(e.substring(n,i+1))}}return t}function n(e){if(e[0]==="{"){return e.substr(1,e.length-2)}else{return e}}function r(e){return e.replace(/[-[\]{}()*+!<=:?.\/\\^$|#\s,]/g,"\\$&")}function i(e){var t=0;if(e){for(var n=0;n<e.length;++n){if(e[n]=="("){++t}if(e[n]=="?"&&n>0&&e[n-1]=="("){--t}}}return t}function o(){var e=window.location.hash;var t=e.indexOf("?");if(t==-1){return e}return e.substr(0,t)}var s=Object.getOwnPropertyNames(exports._rules);for(var l=0;l<s.length;++l){var a=s[l];var c=a[0]=="#";var u=exports._rules[s[l]];var p=t(a);var d=[];var f=[];for(var h=0;h<p.length;++h){var m=p[h];var v=n(m);regex="([^/]+)";if(v[0]=="*"){regex="(.*)";v=v.substr(1)}if(v.indexOf("=")>0){var g=v.substr(v.indexOf("=")+1);regex=`(${r(g)})`;d.push(v.substr(0,v.indexOf("=")))}else if(m.indexOf(":")>0){regex=m.substr(m.indexOf(":")+1);regex=regex.substr(0,regex.length-1);d.push(v.substr(0,v.indexOf(":")))}else{d.push(v)}f.push(i(regex));a=_replace(a,m,regex)}var y=new RegExp("^"+a+"$");var p=y.exec(c?o()||"#":window.location.pathname);if(p){var _={view:u,params:[]};var b=p;p=[];var S=0;for(var h=1;h<b.length;++h){p.push(b[h]);for(var v=0;v<f[S]-1;++v){++h}++S}var x=p.map(function(e){return decodeURIComponent(e)});for(var h=0;h<d.length;++h){_.params.push({key:d[h],value:x[h]})}return _}}return null}function _fillObjectField(e,t,n){if(!n){return}var r=e.split(".");for(var i=0;i<r.length-1;++i){if(!n[r[i]]){n[r[i]]={}}n=n[r[i]]}n[r[r.length-1]]=t}function _applyLayoutHtml(s){return _httpGet(s+(_options.mobile()?".m.html":".html")).then(function(e){var t=e.indexOf("<html");var n=e.indexOf(">",t);e=e.substr(n+1);var r=e.lastIndexOf("</html>");e=e.substr(0,r);e=_patchTemplate(s,e);document.querySelector("html").innerHTML=e;var i=(new Date).getTime();var o="pomelo-"+i;document.querySelector("body").innerHTML='<div id="'+o+'">'+document.querySelector("body").innerHTML+"</div>";return Promise.resolve(o)})}function generateParametersFromRoute(e={}){var t=null;t=MatchRoute();if(t==null){try{_options.onNotFound(window.location.pathname+window.location.search);return}catch(e){throw"No available route found."}}for(var n=0;n<t.params.length;++n){var r=t.params[n];_fillObjectField(r.key,r.value,e)}return e}function parseMacroPath(e,t){if(!t){t=""}if(t.indexOf("@")<0){return t}var n="/";var r=e.lastIndexOf("/");if(r>=0){n=e.substr(0,r)}t=t.replaceAll("@(view)",e).replaceAll("@(js)",e+".js").replaceAll("@(html)",e+".html").replaceAll("@(mobileHtml)",e+".m.html").replaceAll("@(css)",e+".css").replaceAll("@(mobileCss)",e+".m.css").replaceAll("@(less)",e+".less").replaceAll("@(mobileLess)",e+".m.less").replaceAll("@(mobileSass)",e+".m.sass").replaceAll("@(mobileScss)",e+".m.scss").replaceAll("@(containingFolder)",n);if(t.length&&t[0]!="/"&&t.indexOf("http")==-1){t=getContainingFolder(e)+t}return t}function appendCssReference(e,t){if(typeof t=="boolean"){var n=e+".css";if(_options.version){n+="?v="+_options.version}internalAppendCssReference(e,n)}else if(typeof t=="string"){var n=parseMacroPath(e,t);n=resolveRelativePath(n,getContainingFolder(e));if(_options.version){if(n.indexOf(">")<0){n+="?v="+_options.version}else{n+="&v="+_options.version}}internalAppendCssReference(e,n)}else if(t instanceof Array){for(var r=0;r<t.length;++r){if(typeof t[r]!="string"){continue}var n=parseMacroPath(e,t[r]);n=resolveRelativePath(n,getContainingFolder(e));if(_options.version){if(n.indexOf(">")<0){n+="?v="+_options.version}else{n+="&v="+_options.version}}internalAppendCssReference(e,n)}}else{throw"style type not supported"}}function getContainingFolder(e){if(!e){console.warn("getContainingFolder: absolutePath is invalid")}var t=e.lastIndexOf("/");if(t<0){return"/"}return e.substr(0,t)+"/"}function internalAppendCssReference(e,t){if(document.querySelectorAll('link[data-style="'+e+'"][href="'+t+'"]').length){return}var n=document.createElement("link");n.rel="stylesheet";n.type="text/"+getStyleSheetType(t);n.setAttribute("data-style",e);n.href=t;try{document.querySelector("head").appendChild(n)}catch(e){}}function internalAppendCssReferenceAsync(r,i){if(document.querySelectorAll('link[data-style="'+r+'"][href="'+i+'"]').length){return Promise.resolve()}return new Promise(function(t){var e=document.createElement("link");e.rel="stylesheet";e.type="text/"+getStyleSheetType(i);e.setAttribute("data-style",r);function n(){requestAnimationFrame(function(){t()})}e.onload=n;e.onerror=n;e.href=i;try{document.querySelector("head").appendChild(e)}catch(e){t()}})}function appendCssReferenceAsync(e,t){var n=[];if(typeof t=="boolean"){var r=e+".css";if(_options.version){r+="?v="+_options.version}n.push(internalAppendCssReferenceAsync(e,r))}else if(typeof t=="string"){var r=parseMacroPath(e,t);r=resolveRelativePath(r,getContainingFolder(e));if(_options.version){if(r.indexOf(">")<0){r+="?v="+_options.version}else{r+="&v="+_options.version}}n.push(internalAppendCssReferenceAsync(e,r))}else if(t instanceof Array){for(var i=0;i<t.length;++i){if(typeof t[i]!="string"){continue}var r=parseMacroPath(e,t[i]);r=resolveRelativePath(r,getContainingFolder(e));if(_options.version){if(r.indexOf(">")<0){r+="?v="+_options.version}else{r+="&v="+_options.version}}n.push(internalAppendCssReferenceAsync(e,r))}}return Promise.all(n)}function getStyleSheetType(e){var t=e.lastIndexOf("?");if(t>=0){e=e.substr(0,t)}var n=e.lastIndexOf(".");if(n<0){return null}return e.substr(n+1).toLowerCase()}function removeCssReference(e){if(!_options.removeStyleWhenUnmount){return}var t=document.querySelectorAll('link[data-style="'+e+'"]');if(t&&t.length){for(var n=0;n<t.length;++n){t[n].remove()}}}function hookMountedAndUnmounted(t,n){if(!t){return}if(!t.mounted){t.mounted=function(){}}if(!t.unmounted){t.unmounted=function(){}}if(!t.created){t.created=function(){}}if(t.style){var r=t.created;t.created=function(){if(!_css[n]){_css[n]=0}if(_css[n]==0){if(_options.preloadCss){this._cssLoadPromise=appendCssReferenceAsync(n,t.style)}else{appendCssReference(n,t.style)}}++_css[n];this.createdPromise=Promise.resolve();var e=r.call(this);if(e instanceof Promise){this.createdPromise=e}return e}}var i=t.mounted;t.mounted=function(){if(_options.preloadCss&&this._cssLoadPromise){_ensureCssCloakStyle();var e=this.$el;if(e&&e.nodeType===1){e.classList.add("_pome-css-cloak");this._cssLoadPromise.then(function(){e.classList.remove("_pome-css-cloak")})}}if(t.delayOpen){var n=this;(n.createdPromise||Promise.resolve()).then(function(){requestAnimationFrame(function(){requestAnimationFrame(function(){var e=n.$el.parentNode.querySelectorAll("._pome-ui-opening");for(var t=0;t<e.length;++t){e[t].classList.remove("_pome-ui-opening")}})});setTimeout(function(){var e=n.$el.parentNode.querySelectorAll("._pome-ui-opened");for(var t=0;t<e.length;++t){e[t].classList.remove("_pome-ui-opened")}},t.delayOpen)})}return i.call(this)};var e=t.unmounted;t.unmounted=function(){if(!_css[n]){return}--_css[n];if(_css[n]<=0){removeCssReference(n);delete _css[n]}return e.call(this)}}function pomeUiPassTitle(e){if(e){this.pomeUiSubTitles=e}var t=JSON.parse(JSON.stringify(this.pomeUiSubTitles));if(this.title){t.push(this.title)}if(this.$parent&&this.$parent!=window&&this.$parent.pomeUiPassTitle){this.$parent.pomeUiPassTitle(t)}else{document.querySelector("title").innerHTML=_options.generateTitle(t)}}function UpdateLayout(){var mobile=_options.mobile();var params={};var route=null;var layout=_options.layout;route=MatchRoute();params=generateParametersFromRoute();var _def;var viewName=route.view+(_options.mobile()?".m":"");return _httpGet(route.view+".js").then(function(def){_def=def;var modules=null;var _opt;var Page=function(e){_opt=e;layout=e.layout||layout;modules=e.modules};var require=_createRequire(route.view);def=eval(def+"\r\n//# sourceURL="+route.view+".js");hookMountedAndUnmounted(_opt,viewName);return _resolveModules(modules,viewName)}).then(function(){if(exports.root()&&exports.root().$layout){if(exports.root().$layout===layout){_parseQueryString(params);var fields=Object.getOwnPropertyNames(params);for(var i=0;i<fields.length;++i){var val=params[fields[i]];exports.root()[fields[i]]=val}return exports.root().$containers[0].open(route.view,params).then(function(){var e=Promise.resolve();if(typeof exports.root().$.$onUpdating=="function"){var t=exports.root().$.$onUpdating.call(exports.root());if(t instanceof Promise){e=e.then(()=>t)}}return e})}exports.root().$.appContext.app.unmount()}if(layout){var layoutName=layout+(mobile?".m":"");var _layoutHtml;return _httpGet(layoutName+".html").then(function(e){_layoutHtml=e;return _httpGet(layout+".js")}).then(function(js){var _opt=null;var Layout=function(e){_opt=e};var LayoutNext=function(e){_hookSetup(e);_opt.template=_sanitizeTemplate(_layoutHtml);_patchComponent(layout,_opt);_layoutHtml=_opt.template;var t=_layoutHtml.indexOf("<html");var n=_layoutHtml.indexOf(">",t);_layoutHtml=_layoutHtml.substr(n+1);var r=_layoutHtml.lastIndexOf("</html>");_layoutHtml=_layoutHtml.substr(0,r);document.querySelector("html").innerHTML=_layoutHtml;_hookData(e,params);var i=(new Date).getTime();var o="pomelo-"+i;var s="container-"+i;var l=document.querySelector("body").innerHTML.replace("<render-body></render-body>",'<div id="'+s+'"></div>');document.querySelector("body").innerHTML='<div id="'+o+'">'+l+"</div>";e.template=null;if(!e.mounted){e.mounted=function(){}}mountedFunc=e.mounted;e.mounted=function(){var e=this.$container("#"+s);e.open(route.view,params);return mountedFunc.call(this)};Root(e,"#"+o,layout)};var require=_createRequire(layout);eval(js+"\r\n//# sourceURL="+layout+".js");hookMountedAndUnmounted(_opt,layoutName);return _resolveModules(_opt.modules,layout).then(function(){LayoutNext(_opt);return Promise.resolve()})})}else{var viewName=route.view+(_options.mobile()?".m":"");return _applyLayoutHtml(route.view).then(function(appId){var _opt=null;var components=null;var Page=function(e){_opt=e};var PageNext=function(e){modules=e.modules;components=e.components||[];Root(e,"#"+appId,route.view)};var require=_createRequire(route.view);eval(_def+"\r\n//# sourceURL="+route.view+".js");if(!_opt){_opt={}}_hookData(_opt,params);hookMountedAndUnmounted(_opt,viewName);_patchComponent(viewName,_opt);return _resolveModules(_opt.modules,viewName).then(function(){PageNext(_opt);return Promise.resolve()})})}}).then(function(){ForceUpdate()}).catch(function(e){console.error(e)})}function Redirect(e){var t=null;var n=document.querySelector("title");if(n){t=n.innerText}window.history.pushState(null,t,e);UpdateLayout()}function Replace(e){var t=null;var n=document.querySelector("title");if(n){t=n.innerText}window.history.replaceState(null,t,e);UpdateLayout()}function LoadScript(url){if(_httpCached(url)){with(window){if(PomeloModule){var require=function(e,t,n){t=t||PomeloModule.getContainingFolder(url);return PomeloModule.require(e,t,n)}}eval(_cache[url]+"\r\n//# sourceURL="+url)}return Promise.resolve()}return _httpGet(url).then(function(js){with(window){if(PomeloModule){var require=function(e,t,n){t=t||PomeloModule.getContainingFolder(url);return PomeloModule.require(e,t,n)}}eval(js+"\r\n//# sourceURL="+url)}_cache[url]=js;return Promise.resolve()}).catch(e=>{console.error("Load module "+url+" failed.");console.error(e)})}function resolveRelativePathPlain(e){if(e.indexOf("./")==-1&&e.indexOf("../")==-1){return e}var t=e.lastIndexOf("../");if(t==0){return e}e=e.replaceAll("/./","/");if(e.indexOf("./")==0){e=e.substr(2)}if(t){var n=e.substr(0,t);var r=e.substr(t);return resolveRelativePath(r,n)}}function resolveRelativePath(e,t){if(e.length&&e[0]=="/"||e.indexOf("http")==0){return resolveRelativePathPlain(e)}if(e.length&&e[0]!="."){return resolveRelativePathPlain(t+e)}if(e.indexOf("./")==0){return resolveRelativePath(e.substr(2),t)}if(e.indexOf("../")==0){e=e.substr(3);t=getContainingFolder(t.substr(0,t.length-1));return resolveRelativePath(e,t)}}function _loadComponents(components,viewName){var ret=[];if(!components.length){return Promise.resolve(ret)}var workingDirectory=getContainingFolder(viewName||"/");return Promise.all(components.map(function(c){c=resolveRelativePath(parseMacroPath(viewName,c),workingDirectory);var componentPath=c;var _html;var _name;var _opt;return _httpGet(c+".html").then(function(e){_html=e;return _httpGet(c+".js")}).then(function(comJs){var Component=function(e,t){_opt=t;_name=e};var require=_createRequire(c);eval(comJs+"\r\n//# sourceURL="+c+".js");hookMountedAndUnmounted(_opt,c);if(!_opt.template){_opt.template=_sanitizeTemplate(_html)}_hookSetup(_opt);_patchComponent(c,_opt);_hookData(_opt);var cssPreloadPromise=Promise.resolve();if(_options.preloadCss&&_opt.style){cssPreloadPromise=appendCssReferenceAsync(c,_opt.style)}return Promise.all([cssPreloadPromise,_resolveModules(_opt.modules,c)])}).then(function(){var e=_opt.components||[];return _loadComponents(e,componentPath)}).then(function(t){ret.push({name:_name,options:_opt});for(var n=0;n<t.length;++n){if(!ret.some(function(e){return e.name==t[n].name})){ret.push(t[n])}}return Promise.resolve()})})).then(function(){return Promise.resolve(ret)})}function _loadDirectives(directives,viewName){var ret=[];if(!directives.length){return Promise.resolve(ret)}var workingDirectory=getContainingFolder(viewName||"/");var viewName;var subComponentRefs=[];return Promise.all(directives.map(function(c){c=resolveRelativePath(parseMacroPath(viewName,c),workingDirectory);viewName=c;var _name;var _opt;return _httpGet(c+".js").then(function(comJs){var Directive=function(e,t){_opt=t;_name=e};var require=_createRequire(c);eval(comJs+"\r\n//# sourceURL="+c+".js");ret.push({name:_name,options:_opt});return Promise.resolve()})})).then(function(){return Promise.resolve(ret)})}exports._addins=[];function _patchComponent(n,o){prepared=true;if(!o.data){o.data=function(){return{}}}if(!o.style){o.style=[]}if(!o.style instanceof Array){if(o.style instanceof String){o.style=[o.style]}else{o.style=["@(css)"]}}if(!o.components){o.components=[]}if(!o.created){o.created=function(){}}if(!o.mounted){o.mounted=function(){}}if(!o.unmounted){o.unmounted=function(){}}if(!o.destroyed){o.destroyed=function(){}}if(!o.watch){o.watch={}}if(!o.computed){o.computed={}}let r=o.data;o.data=function(e){var t=r.call(this,e);var n={pomeUiSubTitles:[]};_combineObject(n,t);return t};if(!o.methods){o.methods={}}o.methods.pomeUiPassTitle=pomeUiPassTitle;if(!o.watch){o.watch={}}if(!o.watch.title){o.watch.title=function(){}}_chainHook(o.watch,"title",function(){this.pomeUiPassTitle()});for(let t=0;t<exports._addins.length;++t){let e=exports._addins[t].view;let i=exports._addins[t].opt;if(e!="*"&&n!=e){continue}if(i.data){let r=o.data;o.data=function(e){var t=r.call(this,e);var n={};try{n=i.data.call(this,e)}catch(e){console.error(e)}_combineObject(n,t);return t}}if(i.style){if(i.style instanceof Boolean){i.style=["@(css)"]}if(i.style instanceof String){i.style=[i.style]}i.style.forEach(function(t){if(!o.style){o.style=[]}if(typeof o.style=="boolean"){o.style=["@(css)"]}if(!o.style.some(e=>e==t)){o.style.push(t)}})}if(i.components){i.components.forEach(function(t){if(!o.components.some(e=>e==t)){o.components.push(t)}})}if(i.layout){o.layout=i.layout}if(i.props){if(!o.props){o.props=[]}i.props.forEach(function(t){if(!o.props.some(e=>e==t)){o.props.push(t)}})}if(i.watch){var s=Object.getOwnPropertyNames(i.watch);s.forEach(function(n){var r=o.watch[n];o.watch[n]=function(e,t){r.invoke(this,e,t);try{i.watch[n].invoke(this,e,t)}catch(e){console.error(e)}}})}if(i.computed){var s=Object.getOwnPropertyNames(i.computed);s.forEach(function(e){o.computed[e]=i.computed[e]})}if(i.methods){var l=o.setup||function(e,t){};o.setup=function(e,t){l(e,t);var n={};var r=Object.getOwnPropertyNames(o.methods);r.forEach(function(e){n[e]=o.methods[e]});var i=Vue.getCurrentInstance();i.$baseMethods=n};var a=Object.getOwnPropertyNames(i.methods);a.forEach(function(e){o.methods[e]=i.methods[e]})}if(i.created){_chainHook(o,"created",i.created)}if(i.mounted){_chainHook(o,"mounted",i.mounted)}if(i.unmounted){_chainHook(o,"unmounted",i.unmounted)}if(i.destroyed){_chainHook(o,"destroyed",i.destroyed)}if(i.template){if(i.template instanceof Function){if(o.template){if(o.template.indexOf("<html")>=0){var c=(new DOMParser).parseFromString(_sanitizeTemplate(o.template),"text/html");i.template(c);o.template=(new XMLSerializer).serializeToString(c)}else{o.template=`<pome-ui-template>${o.template}</pome-ui-template>`;var c=(new DOMParser).parseFromString(_sanitizeTemplate(o.template),"text/html");i.template(c);o.template=(new XMLSerializer).serializeToString(c);o.template=o.template.substr(o.template.indexOf("<pome-ui-template>")+"<pome-ui-template>".length);o.template=o.template.substr(0,o.template.indexOf("</pome-ui-template>"))}}}else{o.template=i.template}}}_chainHook(o,"created",function(){this.pomeUiPassTitle()});_chainHook(o,"unmounted",function(){this.pomeUiPassTitle([])})}function _patchTemplate(r,i){for(let n=0;n<exports._addins.length;++n){let e=exports._addins[n].view;let t=exports._addins[n].opt;if(e!="*"&&r!=e){continue}if(t.template){if(t.template instanceof Function){if(i.indexOf("<html")>=0){var o=(new DOMParser).parseFromString(_sanitizeTemplate(i),"text/html");t.template(o);i=(new XMLSerializer).serializeToString(o)}else{i=`<pome-ui-template>${i}</pome-ui-template>`;var o=(new DOMParser).parseFromString(_sanitizeTemplate(i),"text/html");t.template(o);i=(new XMLSerializer).serializeToString(o);i=i.substr(i.indexOf("<pome-ui-template>")+"<pome-ui-template>".length);i=i.substr(0,i.indexOf("</pome-ui-template>"))}}else{i=t.template}}}return i}function UseAddin(addinUrl){var Addin=function(e,t){exports._addins.push({view:e,opt:t})};var js=_options.httpGetSync(addinUrl);eval(js)}function UseInlineAddin(script){var Addin=function(e,t){exports._addins.push({view:e,opt:t})};eval(script)}function Backward(){window.history.back()}exports.root=root;exports.useConfig=UseConfig;exports.mapRoute=MapRoute;exports.matchRoute=MatchRoute;exports.updateLayout=UpdateLayout;exports.redirect=Redirect;exports.replace=Replace;exports.backward=Backward;exports.loadScript=LoadScript;exports.forceUpdate=ForceUpdate;exports.mount=mount;exports.useRoutes=useRoutes;exports.useAddin=UseAddin;exports.useInlineAddin=UseInlineAddin;return exports}exports.build=build;
|
|
5
|
+
`,0),a()),u||i("return "),t.codegenNode?Tc(t.codegenNode,n):i("null"),f&&(l(),i("}")),l(),i("}"),{ast:t,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}(o,i)}(e,Q({},du,t,{nodeTransforms:[bu,...Su,...t.nodeTransforms||[]],directiveTransforms:Q({},xu,t.directiveTransforms||{}),transformHoist:null}))}(t,i),s=Function(o)();return s._rc=!0,Cu[n]=s}return Do(wu),e.BaseTransition=ir,e.BaseTransitionPropsValidators=tr,e.Comment=se,e.DeprecationTypes=null,e.EffectScope=qe,e.ErrorCodes={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},e.ErrorTypeStrings=null,e.Fragment=oe,e.KeepAlive={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(u,{slots:p}){let i=Oo(),e=i.ctx,d=new Map,f=new Set,h=null,s=i.suspense,{renderer:{p:l,m:a,um:t,o:{createElement:n}}}=e,r=n("div");function o(e){Ir(e),t(e,i,s,!0)}function c(r){d.forEach((e,t)=>{let n=Ho(e.type);n&&!r(n)&&m(t)})}function m(e){let t=d.get(e);!t||h&&yo(t,h)?h&&Ir(h):o(t),d.delete(e),f.delete(e)}e.activate=(t,e,n,r,i)=>{let o=t.component;a(t,e,n,0,s),l(o.vnode,t,e,n,o,s,r,t.slotScopeIds,i),ie(()=>{o.isDeactivated=!1,o.a&&Se(o.a);let e=t.props&&t.props.onVnodeMounted;e&&Po(e,o.parent,t)},s)},e.deactivate=t=>{let n=t.component;Vi(n.m),Vi(n.a),a(t,r,null,1,s),ie(()=>{n.da&&Se(n.da);let e=t.props&&t.props.onVnodeUnmounted;e&&Po(e,n.parent,t),n.isDeactivated=!0},s)},Hi(()=>[u.include,u.exclude],([t,n])=>{t&&c(e=>Pr(t,e)),n&&c(e=>!Pr(n,e))},{flush:"post",deep:!0});let v=null,g=()=>{null!=v&&(eo(i.subTree.type)?ie(()=>{d.set(v,$r(i.subTree))},i.subTree.suspense):d.set(v,$r(i.subTree)))};return Dr(g),Vr(g),jr(()=>{d.forEach(e=>{let{subTree:t,suspense:n}=i,r=$r(t);if(e.type===r.type&&e.key===r.key){Ir(r);let e=r.component.da;e&&ie(e,n);return}o(e)})}),()=>{if(v=null,!p.default)return h=null;let e=p.default(),t=e[0];if(e.length>1)return h=null,e;if(!go(t)||!(4&t.shapeFlag)&&!(128&t.shapeFlag))return h=null,t;let n=$r(t);if(n.type===se)return h=null,n;let r=n.type,i=Ho(kr(n)?n.type.__asyncResolved||{}:r),{include:o,exclude:s,max:l}=u;if(o&&(!i||!Pr(o,i))||s&&i&&Pr(s,i))return n.shapeFlag&=-257,h=n,t;let a=null==n.key?r:n.key,c=d.get(a);return n.el&&(n=Co(n),128&t.shapeFlag&&(t.ssContent=n)),v=a,c?(n.el=c.el,n.component=c.component,n.transition&&cr(n,n.transition),n.shapeFlag|=512,f.delete(a),f.add(a)):(f.add(a),l&&f.size>parseInt(l,10)&&m(f.values().next().value)),n.shapeFlag|=256,h=n,eo(t.type)?t:n}}},e.ReactiveEffect=ze,e.Static=ao,e.Suspense={name:"Suspense",__isSuspense:!0,process(e,t,n,r,i,o,s,l,a,c){if(null==e)(function(e,t,n,r,i,o,s,l,a){let{p:c,o:{createElement:u}}=a,p=u("div"),d=e.suspense=ro(e,i,r,t,p,n,o,s,l,a);c(null,d.pendingBranch=e.ssContent,p,null,r,d,o,s),d.deps>0?(no(e,"onPending"),no(e,"onFallback"),c(null,e.ssFallback,t,n,r,null,o,s),so(d,e.ssFallback)):d.resolve(!1,!0)})(t,n,r,i,o,s,l,a,c);else{if(o&&o.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}(function(e,t,n,r,i,o,s,l,{p:a,um:c,o:{createElement:u}}){let p=t.suspense=e.suspense;p.vnode=t,t.el=e.el;let d=t.ssContent,f=t.ssFallback,{activeBranch:h,pendingBranch:m,isInFallback:v,isHydrating:g}=p;if(m)p.pendingBranch=d,yo(d,m)?(a(m,d,p.hiddenContainer,null,i,p,o,s,l),p.deps<=0?p.resolve():v&&!g&&(a(h,f,n,r,i,null,o,s,l),so(p,f))):(p.pendingId=to++,g?(p.isHydrating=!1,p.activeBranch=m):c(m,i,p),p.deps=0,p.effects.length=0,p.hiddenContainer=u("div"),v?(a(null,d,p.hiddenContainer,null,i,p,o,s,l),p.deps<=0?p.resolve():(a(h,f,n,r,i,null,o,s,l),so(p,f))):h&&yo(d,h)?(a(h,d,n,r,i,p,o,s,l),p.resolve(!0)):(a(null,d,p.hiddenContainer,null,i,p,o,s,l),p.deps<=0&&p.resolve()));else if(h&&yo(d,h))a(h,d,n,r,i,p,o,s,l),so(p,d);else if(no(t,"onPending"),p.pendingBranch=d,512&d.shapeFlag?p.pendingId=d.component.suspenseId:p.pendingId=to++,a(null,d,p.hiddenContainer,null,i,p,o,s,l),p.deps<=0)p.resolve();else{let{timeout:e,pendingId:t}=p;e>0?setTimeout(()=>{p.pendingId===t&&p.fallback(f)},e):0===e&&p.fallback(f)}})(e,t,n,r,i,s,l,a,c)}},hydrate:function(e,t,n,r,i,o,s,l,a){let c=t.suspense=ro(t,r,n,e.parentNode,document.createElement("div"),null,i,o,s,l,!0),u=a(e,c.pendingBranch=t.ssContent,n,c,o,s);return 0===c.deps&&c.resolve(!1,!0),u},normalize:function(e){let{shapeFlag:t,children:n}=e,r=32&t;e.ssContent=io(r?n.default:n),e.ssFallback=r?io(n.fallback):le(se)}},e.Teleport=Gn,e.Text=lo,e.TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},e.Transition=rs,e.TransitionGroup=Ws,e.TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},e.VueElement=Us,e.assertNumber=function(e,t){},e.callWithAsyncErrorHandling=bn,e.callWithErrorHandling=_n,e.camelize=ne,e.capitalize=_e,e.cloneVNode=Co,e.compatUtils=null,e.compile=wu,e.computed=qo,e.createApp=ml,e.createBlock=vo,e.createCommentVNode=function(e="",t=!1){return t?(uo(),vo(se,null,e)):le(se,null,e)},e.createElementBlock=function(e,t,n,r,i,o){return mo(So(e,t,n,r,i,o,!0))},e.createElementVNode=So,e.createHydrationRenderer=$i,e.createPropsRestProxy=function(t,n){let r={};for(let e in t)n.includes(e)||Object.defineProperty(r,e,{enumerable:!0,get:()=>t[e]});return r},e.createRenderer=function(e){return Mi(e)},e.createSSRApp=vl,e.createSlots=function(t,r){for(let e=0;e<r.length;e++){let n=r[e];if(Y(n))for(let e=0;e<n.length;e++)t[n[e].name]=n[e].fn;else n&&(t[n.name]=n.key?(...e)=>{let t=n.fn(...e);return t&&(t.key=n.key),t}:n.fn)}return t},e.createStaticVNode=function(e,t){let n=le(ao,null,e);return n.staticCount=t,n},e.createTextVNode=wo,e.createVNode=le,e.customRef=un,e.defineAsyncComponent=function(e){let o;ee(e)&&(e={loader:e});let{loader:n,loadingComponent:s,errorComponent:l,delay:a=200,hydrate:i,timeout:c,suspensible:u=!0,onError:r}=e,p=null,d=0,f=()=>(d++,p=null,h()),h=()=>{let t;return p||(t=p=n().catch(n=>{if(n=n instanceof Error?n:Error(String(n)),r)return new Promise((e,t)=>{r(n,()=>e(f()),()=>t(n),d+1)});throw n}).then(e=>t!==p&&p?p:(e&&(e.__esModule||"Module"===e[Symbol.toStringTag])&&(e=e.default),o=e,e)))};return pr({name:"AsyncComponentWrapper",__asyncLoader:h,__asyncHydrate(t,n,r){let e=i?()=>{let e=i(r,e=>function(n,r){if(_r(n)&&"["===n.data){let e=1,t=n.nextSibling;for(;t;){if(1===t.nodeType){if(!1===r(t))break}else if(_r(t)){if("]"===t.data){if(0==--e)break}else"["===t.data&&e++}t=t.nextSibling}}else r(n)}(t,e));e&&(n.bum||(n.bum=[])).push(e)}:r;o?e():h().then(()=>!n.isUnmounted&&e())},get __asyncResolved(){return o},setup(){let t=m;if(dr(t),o)return()=>Ar(o,t);let n=e=>{p=null,Sn(e,t,13,!l)};if(u&&t.suspense)return h().then(e=>()=>Ar(e,t)).catch(e=>(n(e),()=>l?le(l,{error:e}):null));let e=tn(!1),r=tn(),i=tn(!!a);return a&&setTimeout(()=>{i.value=!1},a),null!=c&&setTimeout(()=>{if(!e.value&&!r.value){let e=Error(`Async component timed out after ${c}ms.`);n(e),r.value=e}},c),h().then(()=>{e.value=!0,t.parent&&Nr(t.parent.vnode)&&t.parent.update()}).catch(e=>{n(e),r.value=e}),()=>e.value&&o?Ar(o,t):r.value&&l?le(l,{error:r.value}):s&&!i.value?le(s):void 0}})},e.defineComponent=pr,e.defineCustomElement=Fs,e.defineEmits=function(){return null},e.defineExpose=function(e){},e.defineModel=function(){},e.defineOptions=function(e){},e.defineProps=function(){return null},e.defineSSRCustomElement=(e,t)=>Fs(e,t,vl),e.defineSlots=function(){return null},e.devtools=void 0,e.effect=function(e,t){e.effect instanceof ze&&(e=e.effect.fn);let n=new ze(e);t&&Q(n,t);try{n.run()}catch(e){throw n.stop(),e}let r=n.run.bind(n);return r.effect=n,r},e.effectScope=function(e){return new qe(e)},e.getCurrentInstance=Oo,e.getCurrentScope=function(){return b},e.getCurrentWatcher=function(){return A},e.getTransitionRawChildren=ur,e.guardReactiveProps=xo,e.h=Wo,e.handleError=Sn,e.hasInjectionContext=function(){return!!(m||c||vi)},e.hydrate=(...e)=>{fl().hydrate(...e)},e.hydrateOnIdle=(n=1e4)=>e=>{let t=wr(e,{timeout:n});return()=>Tr(t)},e.hydrateOnInteraction=(o=[])=>(t,e)=>{O(o)&&(o=[o]);let n=!1,r=e=>{n||(n=!0,i(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},i=()=>{e(t=>{for(let e of o)t.removeEventListener(e,r)})};return e(t=>{for(let e of o)t.addEventListener(e,r,{once:!0})}),i},e.hydrateOnMediaQuery=n=>t=>{if(n){let e=matchMedia(n);if(!e.matches)return e.addEventListener("change",t,{once:!0}),()=>e.removeEventListener("change",t);t()}},e.hydrateOnVisible=t=>(n,e)=>{let r=new IntersectionObserver(t=>{for(let e of t)if(e.isIntersecting){r.disconnect(),n();break}},t);return e(e=>{if(e instanceof Element){if(function(e){let{top:t,left:n,bottom:r,right:i}=e.getBoundingClientRect(),{innerHeight:o,innerWidth:s}=window;return(t>0&&t<o||r>0&&r<o)&&(n>0&&n<s||i>0&&i<s)}(e))return n(),r.disconnect(),!1;r.observe(e)}}),()=>r.disconnect()},e.initCustomFormatter=function(){},e.initDirectivesForSSR=X,e.inject=yi,e.isMemoSame=zo,e.isProxy=Zt,e.isReactive=Jt,e.isReadonly=Xt,e.isRef=I,e.isRuntimeOnly=()=>!C,e.isShallow=Qt,e.isVNode=go,e.markRaw=Yt,e.mergeDefaults=function(e,n){let r=ri(e);for(let t in n){if(t.startsWith("__skip"))continue;let e=r[t];e?Y(e)||ee(e)?e=r[t]={type:e,default:n[t]}:e.default=n[t]:null===e&&(e=r[t]={default:n[t]}),e&&n[`__skip_${t}`]&&(e.skipFactory=!0)}return r},e.mergeModels=function(e,t){return e&&t?Y(e)&&Y(t)?e.concat(t):Q({},ri(e),ri(t)):e||t},e.mergeProps=No,e.nextTick=Pn,e.normalizeClass=Oe,e.normalizeProps=function(e){if(!e)return null;let{class:t,style:n}=e;return t&&!O(t)&&(e.class=Oe(t)),n&&(e.style=Ae(n)),e},e.normalizeStyle=Ae,e.onActivated=Er,e.onBeforeMount=Fr,e.onBeforeUnmount=jr,e.onBeforeUpdate=Ur,e.onDeactivated=Rr,e.onErrorCaptured=zr,e.onMounted=Dr,e.onRenderTracked=Wr,e.onRenderTriggered=qr,e.onScopeDispose=function(e,t=!1){b&&b.cleanups.push(e)},e.onServerPrefetch=Hr,e.onUnmounted=Br,e.onUpdated=Vr,e.onWatcherCleanup=gn,e.openBlock=uo,e.popScopeId=function(){Ln=null},e.provide=gi,e.proxyRefs=an,e.pushScopeId=function(e){Ln=e},e.queuePostFlushCb=On,e.reactive=Wt,e.readonly=Gt,e.ref=tn,e.registerRuntimeCompiler=Do,e.render=hl,e.renderList=function(r,i,e,t){let o;let s=e&&e[t],l=Y(r);if(l||O(r)){let e=l&&Jt(r),n=!1;e&&(n=!Qt(r),r=mt(r)),o=Array(r.length);for(let e=0,t=r.length;e<t;e++)o[e]=i(n?p(r[e]):r[e],e,void 0,s&&s[e])}else if("number"==typeof r){o=Array(r);for(let e=0;e<r;e++)o[e]=i(e+1,e,void 0,s&&s[e])}else if(te(r)){if(r[Symbol.iterator])o=Array.from(r,(e,t)=>i(e,t,void 0,s&&s[t]));else{let n=Object.keys(r);o=Array(n.length);for(let t=0,e=n.length;t<e;t++){let e=n[t];o[t]=i(r[e],e,t,s&&s[t])}}}else o=[];return e&&(e[t]=o),o},e.renderSlot=function(e,t,n={},r,i){if(c.ce||c.parent&&kr(c.parent)&&c.parent.ce)return"default"!==t&&(n.name=t),uo(),vo(oe,null,[le("slot",n,r&&r())],64);let o=e[t];o&&o._c&&(o._d=!1),uo();let s=o&&function t(e){return e.some(e=>!go(e)||!!(e.type!==se&&(e.type!==oe||t(e.children))))?e:null}(o(n)),l=n.key||s&&s.key,a=vo(oe,{key:(l&&!W(l)?l:`_${t}`)+(!s&&r?"_fb":"")},s||(r?r():[]),s&&1===e._?64:-2);return!i&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),o&&o._c&&(o._d=!0),a},e.resolveComponent=function(e,t){return Jr(Gr,e,!0,t)||e},e.resolveDirective=function(e){return Jr("directives",e)},e.resolveDynamicComponent=function(e){return O(e)?Jr(Gr,e,!1)||e:e||Kr},e.resolveFilter=null,e.resolveTransitionHooks=sr,e.setBlockTracking=ho,e.setDevtoolsHook=X,e.setTransitionHooks=cr,e.shallowReactive=zt,e.shallowReadonly=function(e){return Kt(e,!0,Ot,Vt,qt)},e.shallowRef=nn,e.ssrContextKey=ji,e.ssrUtils=null,e.stop=function(e){e.effect.stop()},e.toDisplayString=je,e.toHandlerKey=be,e.toHandlers=function(t,n){let r={};for(let e in t)r[n&&/[A-Z]/.test(e)?`on:${e}`:be(e)]=t[e];return r},e.toRaw=re,e.toRef=function(e,t,n){return I(e)?e:ee(e)?new dn(e):te(e)&&arguments.length>1?fn(e,t,n):tn(e)},e.toRefs=function(t){let n=Y(t)?Array(t.length):{};for(let e in t)n[e]=fn(t,e);return n},e.toValue=function(e){return ee(e)?e():sn(e)},e.transformVNodeArgs=function(e){},e.triggerRef=function(e){e.dep&&e.dep.trigger()},e.unref=sn,e.useAttrs=function(){return ni().attrs},e.useCssModule=function(e="$style"){return J},e.useCssVars=function(n){let r=Oo();if(!r)return;let t=r.ut=(t=n(r.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${r.uid}"]`)).forEach(e=>bs(e,t))},i=()=>{let e=n(r.proxy);r.ce?bs(r.ce,e):function t(n,r){if(128&n.shapeFlag){let e=n.suspense;n=e.activeBranch,e.pendingBranch&&!e.isHydrating&&e.effects.push(()=>{t(e.activeBranch,r)})}for(;n.component;)n=n.component.subTree;if(1&n.shapeFlag&&n.el)bs(n.el,r);else if(n.type===oe)n.children.forEach(e=>t(e,r));else if(n.type===ao){let{el:e,anchor:t}=n;for(;e&&(bs(e,r),e!==t);)e=e.nextSibling}}(r.subTree,e),t(e)};Ur(()=>{On(i)}),Dr(()=>{Hi(i,X,{flush:"post"});let e=new MutationObserver(i);e.observe(r.subTree.el.parentNode,{childList:!0}),Br(()=>e.disconnect())})},e.useHost=Vs,e.useId=function(){let e=Oo();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""},e.useModel=function(t,l,a=J){let c=Oo(),u=ne(l),p=ye(l),n=zi(t,u),r=un((e,r)=>{let i,o;let s=J;return Bi(()=>{let e=t[u];S(i,e)&&(i=e,r())}),{get:()=>(e(),a.get?a.get(i):i),set(e){let t=a.set?a.set(e):e;if(!S(t,i)&&!(s!==J&&S(e,s)))return;let n=c.vnode.props;n&&(l in n||u in n||p in n)&&(`onUpdate:${l}`in n||`onUpdate:${u}`in n||`onUpdate:${p}`in n)||(i=e,r()),c.emit(`update:${l}`,t),S(e,t)&&S(e,s)&&!S(t,o)&&r(),s=e,o=t}}});return r[Symbol.iterator]=()=>{let e=0;return{next:()=>e<2?{value:e++?n||J:r,done:!1}:{done:!0}}},r},e.useSSRContext=()=>{},e.useShadowRoot=function(){let e=Vs();return e&&e.shadowRoot},e.useSlots=function(){return ni().slots},e.useTemplateRef=function(e){let t=Oo(),n=nn(null);return t&&Object.defineProperty(t.refs===J?t.refs={}:t.refs,e,{enumerable:!0,get:()=>n.value,set:e=>n.value=e}),n},e.useTransitionState=Yn,e.vModelCheckbox=el,e.vModelDynamic={created(e,t,n){ll(e,t,n,null,"created")},mounted(e,t,n){ll(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){ll(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){ll(e,t,n,r,"updated")}},e.vModelRadio=nl,e.vModelSelect=rl,e.vModelText=Ys,e.vShow={beforeMount(e,{value:t},{transition:n}){e[vs]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):ys(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),ys(e,!0),r.enter(e)):r.leave(e,()=>{ys(e,!1)}):ys(e,t))},beforeUnmount(e,{value:t}){ys(e,t)}},e.version=Go,e.warn=X,e.watch=function(e,t,n){return Hi(e,t,n)},e.watchEffect=function(e,t){return Hi(e,null,t)},e.watchPostEffect=function(e,t){return Hi(e,null,{flush:"post"})},e.watchSyncEffect=Bi,e.withAsyncContext=function(e){let t=Oo(),n=e();return $o(),ue(n)&&(n=n.catch(e=>{throw Io(t),e})),[n,()=>Io(t)]},e.withCtx=Dn,e.withDefaults=function(e,t){return null},e.withDirectives=function(e,o){if(null===c)return e;let s=Bo(c),l=e.dirs||(e.dirs=[]);for(let i=0;i<o.length;i++){let[e,t,n,r=J]=o[i];e&&(ee(e)&&(e={mounted:e,updated:e}),e.deep&&yn(t),l.push({dir:e,instance:s,value:t,oldValue:void 0,arg:n,modifiers:r}))}return e},e.withKeys=(n,r)=>{let e=n._withKeys||(n._withKeys={}),t=r.join(".");return e[t]||(e[t]=e=>{if(!("key"in e))return;let t=ye(e.key);if(r.some(e=>e===t||ul[e]===t))return n(e)})},e.withMemo=function(e,t,n,r){let i=n[r];if(i&&zo(i,e))return i;let o=t();return o.memo=e.slice(),o.cacheIndex=r,n[r]=o},e.withModifiers=(t,r)=>{let e=t._withMods||(t._withMods={}),n=r.join(".");return e[n]||(e[n]=(n,...e)=>{for(let t=0;t<r.length;t++){let e=cl[r[t]];if(e&&e(n,r))return}return t(n,...e)})},e.withScopeId=e=>Dn,e}({});window.Vue=Vue;function build(options,exports){if(typeof exports=="undefined"){exports={}}var _options={resolveModulesParallelly:true,removeStyleWhenUnmount:false,preloadCss:true,mobile:function(){return false},httpGet:function(e){return fetch(e)},httpGetSync:function(e){if(useRelativePath){if(e.length&&e[0]=="/"){e=e.substr(1)}}var t=new XMLHttpRequest;t.open("get",e,false);t.send();return t.responseText},onNotFound:function(e,t){if(e.indexOf("/404")==0){throw"No not-found template found"}if(t){return Redirect("/404?"+_serializeOptionsToUrl(t))}else{return Redirect("/404")}},reuseContainerActiveView(e){return true},callCreatedWhenReuseContainerActiveView(e){return true},callMountedWhenReuseContainerActiveView(e){return true},callUnmountedWhenReuseContainerActiveView(e){return true},resetDataWhenReuseContainerActiveView(e){return true},generateTitle(e){return e.join(" - ")}};_combineObject(options,_options);var _cache={};var _css={};var _cssCloakInjected=false;function _ensureCssCloakStyle(){if(_cssCloakInjected)return;_cssCloakInjected=true;var e=document.createElement("style");e.textContent="._pome-css-cloak{visibility:hidden!important}";document.head.appendChild(e)}function _httpCached(e){return!!_cache[e]}function _httpGet(n){if(_cache[n]){return Promise.resolve(_cache[n])}var e=n;if(_options.version){if(n.indexOf("?")>0){e+="&"}else{e+="?"}e+="v="+_options.version}return _options.httpGet(e).then(function(e){if(e.status>300||e.status<200){return Promise.reject(e)}var t=e.text();_cache[n]=t;return Promise.resolve(t)}).catch(function(e){Promise.reject(e)})}function _httpExist(e){return _httpGet(e).then(function(){return Promise.resolve(true)}).catch(function(){return Promise.resolve(false)})}function _serializeOptionsToUrl(e){var t=Object.getOwnPropertyNames(e);var n="";for(var r=0;r<t.length;++r){n+=encodeURIComponent(t[r])+"="+encodeURIComponent(e[t[r]])+"&"}if(n[n.length-1]==="&"){n=n.substr(0,n.length-1)}return n}function _addHyphenBeforeUppercase(e){var t=e.replace(/([A-Z])/g,"-$1").toLowerCase();while(t.length&&t[0]=="-"){t=t.substr(1)}return t}function _sanitizeTemplate(e){if(!e instanceof String){return e}var t=[...e.matchAll(/(?<=:)[a-zA-Z0-9-_]{1,}(?=\=")/g)];for(var n=0;n<t.length;++n){var r=t[n].toString();var i=_addHyphenBeforeUppercase(r);e=e.replaceAll(":"+r+"=",":"+i+"=")}t=[...e.matchAll(/(?<=@)[a-zA-Z0-9-_]{1,}(?=\=")/g)];for(var n=0;n<t.length;++n){var r=t[n].toString();var i=_addHyphenBeforeUppercase(r);e=e.replaceAll("@"+r+"=","@"+i+"=")}return e}var _root=null;function root(){return _root}function _findRoot(e){var t=exports.root();if(t)return t;if(!e)return null;var n=e;while(n.parent){n=n.parent}return n.proxy||n}exports._rules=[];function useRoutes(e){var t=_options.httpGetSync(e);t=JSON.parse(t);if(!exports._rules){exports._rules={}}_combineObject(t,exports._rules)}function _combineObject(e,t){if(!e){return}var n=Object.getOwnPropertyNames(e);for(var r=0;r<n.length;++r){t[n[r]]=e[n[r]]}}function _chainHook(e,t,r){var i=e[t]||function(){};e[t]=function(){var t=this;var e=i.call(t);var n=e&&e instanceof Promise?e:Promise.resolve();return n.then(function(){var e;try{e=r.call(t)}catch(e){console.error(e)}return e&&e instanceof Promise?e:Promise.resolve()})}}function _hookSetup(r,i){var o=r.setup||function(){};r.setup=function(e,t){o(e,t);var n=Vue.getCurrentInstance();n.$app=exports;if(i){i.call(this,n,r)}if(!n.$root){n.$root=_findRoot(n)}if(!n.$parent){n.$parent=n.parent&&n.parent.proxy||n.$root}}}function _hookData(e,t){var n=e.data||function(){return{}};e.data=function(){var e=n.call(this,exports);if(t){_combineObject(t,e);_parseQueryString(e)}return e}}function _createRequire(r){if(!PomeloModule)return undefined;return function(e,t,n){t=t||PomeloModule.getContainingFolder(r);return PomeloModule.require(e,t,n)}}function _getQueryString(){var e=window.location.search;if(window.location.hash.indexOf("?")>0){var t=window.location.hash.substr(window.location.hash.indexOf("?"));if(e){e+="&"+t.substr(1)}else{e=t}}return e}function _parseQueryString(e){var t=_getQueryString();if(!t){return}var n=t;if(n[0]=="?"){n=n.substr(1)}var r=n.split("&");for(var i=0;i<r.length;++i){var o=r[i].split("=");var s=decodeURIComponent(o[0]);var l=decodeURIComponent(o[1]);_fillObjectField(s,l,e)}}function _resolveModules(e,n){if(!e){return Promise.resolve()}if(_options.resolveModulesParallelly){var t=[];for(var r=0;r<e.length;++r){t.push(LoadScript(parseMacroPath(n,e[r])))}return Promise.all(t)}else{var i=Promise.resolve(null);var o=function(t){return function(e){return LoadScript(parseMacroPath(n,t))}};for(var r=0;r<e.length;++r){var s=e[r];i=i.then(o(s))}return i}}function _buildApp(url,params,mobile,parent){var componentObject={};return _httpGet(url+".js").then(function(js){var Page=function(e){componentObject=e};var require=_createRequire(url);eval(js+"\r\n//# sourceURL="+url+".js");hookMountedAndUnmounted(componentObject,url+(mobile?".m":""));return _resolveModules(componentObject.modules||[],url).then(function(){return Promise.resolve(componentObject)})}).then(function(o){var e=null;if(mobile){e=_httpExist(url+".m.html").then(function(e){return _httpGet(url+(e?".m.html":".html"))})}else{e=_httpGet(url+".html")}return e.then(function(e){if(!o.template){o.template=_sanitizeTemplate(e)}if(o.delayOpen){var t=(new DOMParser).parseFromString(o.template,"text/html");var n=t.querySelector("body").children;for(var r=0;r<n.length;++r){if(n[r].tagName.toUpperCase()!="DIV"){continue}if(n[r].getAttribute("v-if")!=null||n[r].getAttribute("v-else-if")||n[r].getAttribute("v-else")){continue}n[r].classList.add("_pome-ui-opened");n[r].classList.add("_pome-ui-opening")}var i=e.indexOf("<html")>=0?(new XMLSerializer).serializeToString(t):t.querySelector("body").innerHTML;o.template=i}_patchComponent(url,o);return Promise.resolve(o)})}).then(function(a){_hookSetup(a,function(e,t){e.$parent=parent||_findRoot(e);e.$root=_findRoot(e)||parent;e.$view=url;e.$data=t.data||function(){return{}};e.$created=t.created||function(){};e.$mounted=t.mounted||function(){};e.$unmounted=t.unmounted||function(){};e.$delayClose=t.delayClose||0;_attachContainer(e)});_hookData(a,params);return _resolveModules(a.modules,url).then(function(){var e=a.components||[];var s=a.directives||[];var l;var t=Promise.resolve();var n=url+(mobile?".m":"");if(_options.preloadCss&&a.style){t=appendCssReferenceAsync(n,a.style)}return Promise.all([t,_loadComponents(e,url)]).then(function(e){var t=e[1];var n=Vue.createApp(a);for(var r=0;r<t.length;++r){var i=t[r];n.component(i.name,i.options)}var o=n.mount||function(){};n.mount=function(e){n.proxy=o(e);return n.proxy};l=n;return _loadDirectives(s,url)}).then(function(e){for(var t=0;t<e.length;++t){var n=e[t];l.directive(n.name,n.options)}return Promise.resolve(l)})})})}function _replace(e,t,n){var r=e.indexOf(t);if(r<0){return e}var i=e.substr(0,r)+n+e.substr(r+t.length);return i}function sleep(t){return new Promise(function(e){setTimeout(function(){e()},t)})}function yield(){return sleep(0)}function _attachContainer(r){if(!r){console.warn("Invalid view model")}if(!r.$containers){r.$containers=[]}if(!r.$containers){r.$containers=[]}var n=r.$containers;r.$container=function(t){var e=n.filter(e=>e.selector==t)[0];if(!e){e={element:document.querySelector(t),selector:t,open:function(e,l){var t=_options.mobile();var a=null;if(r.proxy){a=r.proxy}if(r.$&&r.$.proxy){a=r.$.proxy}var n=Promise.resolve();if(!this.active||this.active.$view!=e||!_options.reuseContainerActiveView()){n=this.close()}var c=this;return n.then(function(){var n=Promise.resolve();l=generateParametersFromRoute(l);_parseQueryString(l);if(_options.reuseContainerActiveView()&&c.active?.$view==e){var r=function(t){if(!t||!t.active){return n}if(_options.callUnmountedWhenReuseContainerActiveView(t.active.$view)){n=n.then(function(){var e=t.active.$unmounted();if(e instanceof Promise){return e}else{return Promise.resolve()}})}n=n.then(function(){var e=t.active.$data();if(_options.resetDataWhenReuseContainerActiveView()){_combineObject(e,t.active)}_combineObject(l,t.active);return Promise.resolve()});if(_options.callCreatedWhenReuseContainerActiveView(t.active.$view)){n=n.then(function(){var e=t.active.$created();if(e instanceof Promise){return e}else{return Promise.resolve()}})}if(_options.callMountedWhenReuseContainerActiveView(t.active.$view)){n=n.then(function(){var e=t.active.$mounted();if(e instanceof Promise){return e}else{return Promise.resolve()}})}if(t.active.$containers&&t.active.$containers.length){for(var e=0;e<t.active.$containers.length;++e){r(t.active.$containers[e])}}return n.then(function(){t.active.$forceUpdate();return Promise.resolve(t.active)})};return Promise.resolve(r(c))}var i;var o=20;var s=function(){var e=new Promise(function(e,t){var n=i.mount(c.selector);if(n){c.active=n;return Promise.resolve(n)}if(--o>0){return sleep(50).then(function(){return s()})}else{return Promise.reject("Mount component to "+c.selector+" failed")}});return e};return _buildApp(e,l,t,a).then(function(e){i=e;return s()})})},close:async function(n=true){async function r(e){if(e.active&&e.active.$){if(n){for(var t=0;t<e.active.$containers.length;++t){r(e.active.$containers[t])}}if(e.active.$delayClose){try{if(e.active.$el){e.active.$el.classList?.add("_pome-ui-closing")}}catch(e){console.warn(e)}console.log(`sleeping ${e.active.$delayClose}ms...`);await sleep(e.active.$delayClose)}try{e.active.$.appContext.app.unmount()}catch(e){console.warn(e)}e.active=null}}await r(this)},active:null};n.push(e)}return e}}function Root(o,r,s){o=o||{};_hookSetup(o,function(e){e.$parent=parent||_findRoot(e);e.$root=_findRoot(e)||parent;e.$onUpdating=o.onUpdating;if(s){e.$layout=s;e.$view=s}_attachContainer(e)});return _resolveModules(o.modules,s).then(function(){var i;return _loadComponents(o.components||[],s).then(function(e){var t=Vue.createApp(o||{});for(var n=0;n<e.length;++n){var r=e[n];t.component(r.name,r.options)}i=t;return _loadDirectives(o.directives||[],s)}).then(function(e){for(var t=0;t<e.length;++t){var n=e[t];app.directive(n.name,n.options)}_root=i.mount(r);_root.$.proxy=_root})})}function mount(){function r(e){if(!e){return null}if(!e.getAttribute){return null}var t=e.getAttribute("target")||"_self";var n=e.getAttribute("static-link")||e.getAttribute("v-static")||e.getAttribute("pomelo-static");if(n==null&&t.toLowerCase()=="_self"&&e.tagName.toLowerCase()=="a"){return e.getAttribute("href")}return r(e.parentNode)}window.addEventListener("click",function(e){if(!e)return;var t=r(e.target);if(t){if(e.ctrlKey||e.metaKey){return}exports.redirect(t);e.preventDefault();return}});window.onpopstate=function(){UpdateLayout()};return UpdateLayout()}function UseConfig(e){_combineObject(e,_options)}function MapRoute(e,t){if(!exports._rules){exports._rules={}}exports._rules[e]=t}function ForceUpdate(e=exports.root()){if(!e)return;e.$forceUpdate();if(e.$containers){for(var t=0;t<e.$containers.length;++t){if(e.$containers[t].active){ForceUpdate(e.$containers[t].active)}}}}function MatchRoute(){function e(e,t,n){return e.replace(new RegExp(t,"g"),n)}function t(e){var t=[];if(!e){return t}var n=-1;var r=0;for(var i=0;i<e.length;++i){if(e[i]=="{"&&!r){n=i;r=0}else if(e[i]=="("){++r}else if(e[i]==")"){--r}else if(e[i]=="}"&&!r){t.push(e.substring(n,i+1))}}return t}function n(e){if(e[0]==="{"){return e.substr(1,e.length-2)}else{return e}}function r(e){return e.replace(/[-[\]{}()*+!<=:?.\/\\^$|#\s,]/g,"\\$&")}function i(e){var t=0;if(e){for(var n=0;n<e.length;++n){if(e[n]=="("){++t}if(e[n]=="?"&&n>0&&e[n-1]=="("){--t}}}return t}function o(){var e=window.location.hash;var t=e.indexOf("?");if(t==-1){return e}return e.substr(0,t)}var s=Object.getOwnPropertyNames(exports._rules);for(var l=0;l<s.length;++l){var a=s[l];var c=a[0]=="#";var u=exports._rules[s[l]];var p=t(a);var d=[];var f=[];for(var h=0;h<p.length;++h){var m=p[h];var v=n(m);regex="([^/]+)";if(v[0]=="*"){regex="(.*)";v=v.substr(1)}if(v.indexOf("=")>0){var g=v.substr(v.indexOf("=")+1);regex=`(${r(g)})`;d.push(v.substr(0,v.indexOf("=")))}else if(m.indexOf(":")>0){regex=m.substr(m.indexOf(":")+1);regex=regex.substr(0,regex.length-1);d.push(v.substr(0,v.indexOf(":")))}else{d.push(v)}f.push(i(regex));a=_replace(a,m,regex)}var y=new RegExp("^"+a+"$");var p=y.exec(c?o()||"#":window.location.pathname);if(p){var _={view:u,params:[]};var b=p;p=[];var S=0;for(var h=1;h<b.length;++h){p.push(b[h]);for(var v=0;v<f[S]-1;++v){++h}++S}var x=p.map(function(e){return decodeURIComponent(e)});for(var h=0;h<d.length;++h){_.params.push({key:d[h],value:x[h]})}return _}}return null}function _fillObjectField(e,t,n){if(!n){return}var r=e.split(".");for(var i=0;i<r.length-1;++i){if(!n[r[i]]){n[r[i]]={}}n=n[r[i]]}n[r[r.length-1]]=t}function _applyLayoutHtml(s){return _httpGet(s+(_options.mobile()?".m.html":".html")).then(function(e){var t=e.indexOf("<html");var n=e.indexOf(">",t);e=e.substr(n+1);var r=e.lastIndexOf("</html>");e=e.substr(0,r);e=_patchTemplate(s,e);document.querySelector("html").innerHTML=e;var i=(new Date).getTime();var o="pomelo-"+i;document.querySelector("body").innerHTML='<div id="'+o+'">'+document.querySelector("body").innerHTML+"</div>";return Promise.resolve(o)})}function generateParametersFromRoute(e={}){var t=null;t=MatchRoute();if(t==null){try{_options.onNotFound(window.location.pathname+window.location.search);return}catch(e){throw"No available route found."}}for(var n=0;n<t.params.length;++n){var r=t.params[n];_fillObjectField(r.key,r.value,e)}return e}function parseMacroPath(e,t){if(!t){t=""}if(t.indexOf("@")<0){return t}var n="/";var r=e.lastIndexOf("/");if(r>=0){n=e.substr(0,r)}t=t.replaceAll("@(view)",e).replaceAll("@(js)",e+".js").replaceAll("@(html)",e+".html").replaceAll("@(mobileHtml)",e+".m.html").replaceAll("@(css)",e+".css").replaceAll("@(mobileCss)",e+".m.css").replaceAll("@(less)",e+".less").replaceAll("@(mobileLess)",e+".m.less").replaceAll("@(mobileSass)",e+".m.sass").replaceAll("@(mobileScss)",e+".m.scss").replaceAll("@(containingFolder)",n);if(t.length&&t[0]!="/"&&t.indexOf("http")==-1){t=getContainingFolder(e)+t}return t}function appendCssReference(e,t){if(typeof t=="boolean"){var n=e+".css";if(_options.version){n+="?v="+_options.version}internalAppendCssReference(e,n)}else if(typeof t=="string"){var n=parseMacroPath(e,t);n=resolveRelativePath(n,getContainingFolder(e));if(_options.version){if(n.indexOf(">")<0){n+="?v="+_options.version}else{n+="&v="+_options.version}}internalAppendCssReference(e,n)}else if(t instanceof Array){for(var r=0;r<t.length;++r){if(typeof t[r]!="string"){continue}var n=parseMacroPath(e,t[r]);n=resolveRelativePath(n,getContainingFolder(e));if(_options.version){if(n.indexOf(">")<0){n+="?v="+_options.version}else{n+="&v="+_options.version}}internalAppendCssReference(e,n)}}else{throw"style type not supported"}}function getContainingFolder(e){if(!e){console.warn("getContainingFolder: absolutePath is invalid")}var t=e.lastIndexOf("/");if(t<0){return"/"}return e.substr(0,t)+"/"}function internalAppendCssReference(e,t){if(document.querySelectorAll('link[data-style="'+e+'"][href="'+t+'"]').length){return}var n=document.createElement("link");n.rel="stylesheet";n.type="text/"+getStyleSheetType(t);n.setAttribute("data-style",e);n.href=t;try{document.querySelector("head").appendChild(n)}catch(e){}}function internalAppendCssReferenceAsync(r,i){if(document.querySelectorAll('link[data-style="'+r+'"][href="'+i+'"]').length){return Promise.resolve()}return new Promise(function(t){var e=document.createElement("link");e.rel="stylesheet";e.type="text/"+getStyleSheetType(i);e.setAttribute("data-style",r);function n(){requestAnimationFrame(function(){t()})}e.onload=n;e.onerror=n;e.href=i;try{document.querySelector("head").appendChild(e)}catch(e){t()}})}function appendCssReferenceAsync(e,t){var n=[];if(typeof t=="boolean"){var r=e+".css";if(_options.version){r+="?v="+_options.version}n.push(internalAppendCssReferenceAsync(e,r))}else if(typeof t=="string"){var r=parseMacroPath(e,t);r=resolveRelativePath(r,getContainingFolder(e));if(_options.version){if(r.indexOf(">")<0){r+="?v="+_options.version}else{r+="&v="+_options.version}}n.push(internalAppendCssReferenceAsync(e,r))}else if(t instanceof Array){for(var i=0;i<t.length;++i){if(typeof t[i]!="string"){continue}var r=parseMacroPath(e,t[i]);r=resolveRelativePath(r,getContainingFolder(e));if(_options.version){if(r.indexOf(">")<0){r+="?v="+_options.version}else{r+="&v="+_options.version}}n.push(internalAppendCssReferenceAsync(e,r))}}return Promise.all(n)}function getStyleSheetType(e){var t=e.lastIndexOf("?");if(t>=0){e=e.substr(0,t)}var n=e.lastIndexOf(".");if(n<0){return null}return e.substr(n+1).toLowerCase()}function removeCssReference(e){if(!_options.removeStyleWhenUnmount){return}var t=document.querySelectorAll('link[data-style="'+e+'"]');if(t&&t.length){for(var n=0;n<t.length;++n){t[n].remove()}}}function hookMountedAndUnmounted(t,n){if(!t){return}if(!t.mounted){t.mounted=function(){}}if(!t.unmounted){t.unmounted=function(){}}if(!t.created){t.created=function(){}}if(t.style){var r=t.created;t.created=function(){if(!_css[n]){_css[n]=0}if(_css[n]==0){if(_options.preloadCss){this._cssLoadPromise=appendCssReferenceAsync(n,t.style)}else{appendCssReference(n,t.style)}}++_css[n];this.createdPromise=Promise.resolve();var e=r.call(this);if(e instanceof Promise){this.createdPromise=e}return e}}var i=t.mounted;t.mounted=function(){if(_options.preloadCss&&this._cssLoadPromise){_ensureCssCloakStyle();var e=this.$el;if(e&&e.nodeType===1){e.classList.add("_pome-css-cloak");this._cssLoadPromise.then(function(){e.classList.remove("_pome-css-cloak")})}}if(t.delayOpen){var n=this;(n.createdPromise||Promise.resolve()).then(function(){requestAnimationFrame(function(){requestAnimationFrame(function(){var e=n.$el.parentNode.querySelectorAll("._pome-ui-opening");for(var t=0;t<e.length;++t){e[t].classList.remove("_pome-ui-opening")}})});setTimeout(function(){var e=n.$el.parentNode.querySelectorAll("._pome-ui-opened");for(var t=0;t<e.length;++t){e[t].classList.remove("_pome-ui-opened")}},t.delayOpen)})}return i.call(this)};var e=t.unmounted;t.unmounted=function(){if(!_css[n]){return}--_css[n];if(_css[n]<=0){removeCssReference(n);delete _css[n]}return e.call(this)}}function pomeUiPassTitle(e){if(e){this.pomeUiSubTitles=e}var t=JSON.parse(JSON.stringify(this.pomeUiSubTitles));if(this.title){t.push(this.title)}if(this.$parent&&this.$parent!=window&&this.$parent.pomeUiPassTitle){this.$parent.pomeUiPassTitle(t)}else{document.querySelector("title").innerHTML=_options.generateTitle(t)}}function UpdateLayout(){var mobile=_options.mobile();var params={};var route=null;var layout=_options.layout;route=MatchRoute();params=generateParametersFromRoute();var _def;var viewName=route.view+(_options.mobile()?".m":"");return _httpGet(route.view+".js").then(function(def){_def=def;var modules=null;var _opt;var Page=function(e){_opt=e;layout=e.layout||layout;modules=e.modules};var require=_createRequire(route.view);def=eval(def+"\r\n//# sourceURL="+route.view+".js");hookMountedAndUnmounted(_opt,viewName);return _resolveModules(modules,viewName)}).then(function(){if(exports.root()&&exports.root().$layout){if(exports.root().$layout===layout){_parseQueryString(params);var fields=Object.getOwnPropertyNames(params);for(var i=0;i<fields.length;++i){var val=params[fields[i]];exports.root()[fields[i]]=val}return exports.root().$containers[0].open(route.view,params).then(function(){var e=Promise.resolve();if(typeof exports.root().$.$onUpdating=="function"){var t=exports.root().$.$onUpdating.call(exports.root());if(t instanceof Promise){e=e.then(()=>t)}}return e})}exports.root().$.appContext.app.unmount()}if(layout){var layoutName=layout+(mobile?".m":"");var _layoutHtml;return _httpGet(layoutName+".html").then(function(e){_layoutHtml=e;return _httpGet(layout+".js")}).then(function(js){var _opt=null;var Layout=function(e){_opt=e};var LayoutNext=function(e){_hookSetup(e);_opt.template=_sanitizeTemplate(_layoutHtml);_patchComponent(layout,_opt);_layoutHtml=_opt.template;var t=_layoutHtml.indexOf("<html");var n=_layoutHtml.indexOf(">",t);_layoutHtml=_layoutHtml.substr(n+1);var r=_layoutHtml.lastIndexOf("</html>");_layoutHtml=_layoutHtml.substr(0,r);document.querySelector("html").innerHTML=_layoutHtml;_hookData(e,params);var i=(new Date).getTime();var o="pomelo-"+i;var s="container-"+i;var l=document.querySelector("body").innerHTML.replace("<render-body></render-body>",'<div id="'+s+'"></div>');document.querySelector("body").innerHTML='<div id="'+o+'">'+l+"</div>";e.template=null;if(!e.mounted){e.mounted=function(){}}mountedFunc=e.mounted;e.mounted=function(){var e=this.$container("#"+s);e.open(route.view,params);return mountedFunc.call(this)};Root(e,"#"+o,layout)};var require=_createRequire(layout);eval(js+"\r\n//# sourceURL="+layout+".js");hookMountedAndUnmounted(_opt,layoutName);return _resolveModules(_opt.modules,layout).then(function(){LayoutNext(_opt);return Promise.resolve()})})}else{var viewName=route.view+(_options.mobile()?".m":"");return _applyLayoutHtml(route.view).then(function(appId){var _opt=null;var components=null;var Page=function(e){_opt=e};var PageNext=function(e){modules=e.modules;components=e.components||[];Root(e,"#"+appId,route.view)};var require=_createRequire(route.view);eval(_def+"\r\n//# sourceURL="+route.view+".js");if(!_opt){_opt={}}_hookData(_opt,params);hookMountedAndUnmounted(_opt,viewName);_patchComponent(viewName,_opt);return _resolveModules(_opt.modules,viewName).then(function(){PageNext(_opt);return Promise.resolve()})})}}).then(function(){ForceUpdate()}).catch(function(e){console.error(e)})}function Redirect(e){var t=null;var n=document.querySelector("title");if(n){t=n.innerText}window.history.pushState(null,t,e);UpdateLayout()}function Replace(e){var t=null;var n=document.querySelector("title");if(n){t=n.innerText}window.history.replaceState(null,t,e);UpdateLayout()}function LoadScript(url){if(_httpCached(url)){with(window){if(PomeloModule){var require=function(e,t,n){t=t||PomeloModule.getContainingFolder(url);return PomeloModule.require(e,t,n)}}eval(_cache[url]+"\r\n//# sourceURL="+url)}return Promise.resolve()}return _httpGet(url).then(function(js){with(window){if(PomeloModule){var require=function(e,t,n){t=t||PomeloModule.getContainingFolder(url);return PomeloModule.require(e,t,n)}}eval(js+"\r\n//# sourceURL="+url)}_cache[url]=js;return Promise.resolve()}).catch(e=>{console.error("Load module "+url+" failed.");console.error(e)})}function resolveRelativePathPlain(e){if(e.indexOf("./")==-1&&e.indexOf("../")==-1){return e}var t=e.lastIndexOf("../");if(t==0){return e}e=e.replaceAll("/./","/");if(e.indexOf("./")==0){e=e.substr(2)}if(t){var n=e.substr(0,t);var r=e.substr(t);return resolveRelativePath(r,n)}}function resolveRelativePath(e,t){if(e.length&&e[0]=="/"||e.indexOf("http")==0){return resolveRelativePathPlain(e)}if(e.length&&e[0]!="."){return resolveRelativePathPlain(t+e)}if(e.indexOf("./")==0){return resolveRelativePath(e.substr(2),t)}if(e.indexOf("../")==0){e=e.substr(3);t=getContainingFolder(t.substr(0,t.length-1));return resolveRelativePath(e,t)}}function _loadComponents(components,viewName){var ret=[];if(!components.length){return Promise.resolve(ret)}var workingDirectory=getContainingFolder(viewName||"/");return Promise.all(components.map(function(c){c=resolveRelativePath(parseMacroPath(viewName,c),workingDirectory);var componentPath=c;var _html;var _name;var _opt;return _httpGet(c+".html").then(function(e){_html=e;return _httpGet(c+".js")}).then(function(comJs){var Component=function(e,t){_opt=t;_name=e};var require=_createRequire(c);eval(comJs+"\r\n//# sourceURL="+c+".js");hookMountedAndUnmounted(_opt,c);if(!_opt.template){_opt.template=_sanitizeTemplate(_html)}_hookSetup(_opt);_patchComponent(c,_opt);_hookData(_opt);var cssPreloadPromise=Promise.resolve();if(_options.preloadCss&&_opt.style){cssPreloadPromise=appendCssReferenceAsync(c,_opt.style)}return Promise.all([cssPreloadPromise,_resolveModules(_opt.modules,c)])}).then(function(){var e=_opt.components||[];return _loadComponents(e,componentPath)}).then(function(t){ret.push({name:_name,options:_opt});for(var n=0;n<t.length;++n){if(!ret.some(function(e){return e.name==t[n].name})){ret.push(t[n])}}return Promise.resolve()})})).then(function(){return Promise.resolve(ret)})}function _loadDirectives(directives,viewName){var ret=[];if(!directives.length){return Promise.resolve(ret)}var workingDirectory=getContainingFolder(viewName||"/");var viewName;var subComponentRefs=[];return Promise.all(directives.map(function(c){c=resolveRelativePath(parseMacroPath(viewName,c),workingDirectory);viewName=c;var _name;var _opt;return _httpGet(c+".js").then(function(comJs){var Directive=function(e,t){_opt=t;_name=e};var require=_createRequire(c);eval(comJs+"\r\n//# sourceURL="+c+".js");ret.push({name:_name,options:_opt});return Promise.resolve()})})).then(function(){return Promise.resolve(ret)})}exports._addins=[];function _patchComponent(n,o){prepared=true;if(!o.data){o.data=function(){return{}}}if(!o.style){o.style=[]}if(!o.style instanceof Array){if(o.style instanceof String){o.style=[o.style]}else{o.style=["@(css)"]}}if(!o.components){o.components=[]}if(!o.created){o.created=function(){}}if(!o.mounted){o.mounted=function(){}}if(!o.unmounted){o.unmounted=function(){}}if(!o.destroyed){o.destroyed=function(){}}if(!o.watch){o.watch={}}if(!o.computed){o.computed={}}let r=o.data;o.data=function(e){var t=r.call(this,e);var n={pomeUiSubTitles:[]};_combineObject(n,t);return t};if(!o.methods){o.methods={}}o.methods.pomeUiPassTitle=pomeUiPassTitle;if(!o.watch){o.watch={}}if(!o.watch.title){o.watch.title=function(){}}_chainHook(o.watch,"title",function(){this.pomeUiPassTitle()});for(let t=0;t<exports._addins.length;++t){let e=exports._addins[t].view;let i=exports._addins[t].opt;if(e!="*"&&n!=e){continue}if(i.data){let r=o.data;o.data=function(e){var t=r.call(this,e);var n={};try{n=i.data.call(this,e)}catch(e){console.error(e)}_combineObject(n,t);return t}}if(i.style){if(i.style instanceof Boolean){i.style=["@(css)"]}if(i.style instanceof String){i.style=[i.style]}i.style.forEach(function(t){if(!o.style){o.style=[]}if(typeof o.style=="boolean"){o.style=["@(css)"]}if(!o.style.some(e=>e==t)){o.style.push(t)}})}if(i.components){i.components.forEach(function(t){if(!o.components.some(e=>e==t)){o.components.push(t)}})}if(i.layout){o.layout=i.layout}if(i.props){if(!o.props){o.props=[]}i.props.forEach(function(t){if(!o.props.some(e=>e==t)){o.props.push(t)}})}if(i.watch){var s=Object.getOwnPropertyNames(i.watch);s.forEach(function(n){var r=o.watch[n];o.watch[n]=function(e,t){r.invoke(this,e,t);try{i.watch[n].invoke(this,e,t)}catch(e){console.error(e)}}})}if(i.computed){var s=Object.getOwnPropertyNames(i.computed);s.forEach(function(e){o.computed[e]=i.computed[e]})}if(i.methods){var l=o.setup||function(e,t){};o.setup=function(e,t){l(e,t);var n={};var r=Object.getOwnPropertyNames(o.methods);r.forEach(function(e){n[e]=o.methods[e]});var i=Vue.getCurrentInstance();i.$baseMethods=n};var a=Object.getOwnPropertyNames(i.methods);a.forEach(function(e){o.methods[e]=i.methods[e]})}if(i.created){_chainHook(o,"created",i.created)}if(i.mounted){_chainHook(o,"mounted",i.mounted)}if(i.unmounted){_chainHook(o,"unmounted",i.unmounted)}if(i.destroyed){_chainHook(o,"destroyed",i.destroyed)}if(i.template){if(i.template instanceof Function){if(o.template){if(o.template.indexOf("<html")>=0){var c=(new DOMParser).parseFromString(_sanitizeTemplate(o.template),"text/html");i.template(c);o.template=(new XMLSerializer).serializeToString(c)}else{o.template=`<pome-ui-template>${o.template}</pome-ui-template>`;var c=(new DOMParser).parseFromString(_sanitizeTemplate(o.template),"text/html");i.template(c);o.template=(new XMLSerializer).serializeToString(c);o.template=o.template.substr(o.template.indexOf("<pome-ui-template>")+"<pome-ui-template>".length);o.template=o.template.substr(0,o.template.indexOf("</pome-ui-template>"))}}}else{o.template=i.template}}}_chainHook(o,"created",function(){this.pomeUiPassTitle()});_chainHook(o,"unmounted",function(){this.pomeUiPassTitle([])})}function _patchTemplate(r,i){for(let n=0;n<exports._addins.length;++n){let e=exports._addins[n].view;let t=exports._addins[n].opt;if(e!="*"&&r!=e){continue}if(t.template){if(t.template instanceof Function){if(i.indexOf("<html")>=0){var o=(new DOMParser).parseFromString(_sanitizeTemplate(i),"text/html");t.template(o);i=(new XMLSerializer).serializeToString(o)}else{i=`<pome-ui-template>${i}</pome-ui-template>`;var o=(new DOMParser).parseFromString(_sanitizeTemplate(i),"text/html");t.template(o);i=(new XMLSerializer).serializeToString(o);i=i.substr(i.indexOf("<pome-ui-template>")+"<pome-ui-template>".length);i=i.substr(0,i.indexOf("</pome-ui-template>"))}}else{i=t.template}}}return i}function UseAddin(addinUrl){var Addin=function(e,t){exports._addins.push({view:e,opt:t})};var js=_options.httpGetSync(addinUrl);eval(js)}function UseInlineAddin(script){var Addin=function(e,t){exports._addins.push({view:e,opt:t})};eval(script)}function Backward(){window.history.back()}exports.root=root;exports.useConfig=UseConfig;exports.mapRoute=MapRoute;exports.matchRoute=MatchRoute;exports.updateLayout=UpdateLayout;exports.redirect=Redirect;exports.replace=Replace;exports.backward=Backward;exports.loadScript=LoadScript;exports.forceUpdate=ForceUpdate;exports.mount=mount;exports.useRoutes=useRoutes;exports.useAddin=UseAddin;exports.useInlineAddin=UseInlineAddin;return exports}exports.build=build;
|