pome-ui 2.0.0-preview38 → 2.0.0-preview39

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pome-ui",
3
- "version": "2.0.0-preview38",
3
+ "version": "2.0.0-preview39",
4
4
  "description": "Front-end MVC library",
5
5
  "main": "pome-ui.js",
6
6
  "bin": {
package/pome-ui.dev.js CHANGED
@@ -18232,6 +18232,28 @@ function build(options, exports) {
18232
18232
 
18233
18233
  return str;
18234
18234
  }
18235
+ function _addHyphenBeforeUppercase(str) {
18236
+ var ret = str.replace(/([A-Z])/g, '-$1').toLowerCase();
18237
+ while (ret.length && ret[0] == '-') {
18238
+ ret = ret.substr(1);
18239
+ }
18240
+ return ret;
18241
+ }
18242
+
18243
+ function _sanitizeTemplate(template) {
18244
+ if (!template instanceof String) {
18245
+ return template;
18246
+ }
18247
+
18248
+ var result = [...template.matchAll(/(?<=:)[a-zA-Z0-9-_]{1,}(?=\=")/g)];
18249
+ for (var i = 0; i < result.length; ++i) {
18250
+ var propertyName = result[i].toString();
18251
+ var sanitizedPropertyName = _addHyphenBeforeUppercase(propertyName);
18252
+ template = template.replaceAll(':' + propertyName + '=', ':' + sanitizedPropertyName + '=');
18253
+ }
18254
+
18255
+ return template;
18256
+ }
18235
18257
 
18236
18258
  var _root = null;
18237
18259
  function root() {
@@ -19826,12 +19848,12 @@ function build(options, exports) {
19826
19848
  if (addin.template instanceof Function) {
19827
19849
  if (opt.template) {
19828
19850
  if (opt.template.indexOf('<html') >= 0) {
19829
- var template = new DOMParser().parseFromString(opt.template, 'text/html');
19851
+ var template = new DOMParser().parseFromString(_sanitizeTemplate(opt.template), 'text/html');
19830
19852
  addin.template(template);
19831
19853
  opt.template = new XMLSerializer().serializeToString(template);
19832
19854
  } else {
19833
19855
  opt.template = `<pome-ui-template>${opt.template}</pome-ui-template>`
19834
- var template = new DOMParser().parseFromString(opt.template, 'text/html');
19856
+ var template = new DOMParser().parseFromString(_sanitizeTemplate(opt.template), 'text/html');
19835
19857
  addin.template(template);
19836
19858
  opt.template = new XMLSerializer().serializeToString(template);
19837
19859
  opt.template = opt.template.substr(opt.template.indexOf('<pome-ui-template>') + '<pome-ui-template>'.length);
@@ -19886,12 +19908,12 @@ function build(options, exports) {
19886
19908
  if (addin.template) {
19887
19909
  if (addin.template instanceof Function) {
19888
19910
  if (html.indexOf('<html') >= 0) {
19889
- var template = new DOMParser().parseFromString(html, 'text/html');
19911
+ var template = new DOMParser().parseFromString(_sanitizeTemplate(html), 'text/html');
19890
19912
  addin.template(template);
19891
19913
  html = new XMLSerializer().serializeToString(template);
19892
19914
  } else {
19893
19915
  html = `<pome-ui-template>${html}</pome-ui-template>`
19894
- var template = new DOMParser().parseFromString(html, 'text/html');
19916
+ var template = new DOMParser().parseFromString(_sanitizeTemplate(html), 'text/html');
19895
19917
  addin.template(template);
19896
19918
  html = new XMLSerializer().serializeToString(template);
19897
19919
  html = html.substr(html.indexOf('<pome-ui-template>') + '<pome-ui-template>'.length);
@@ -27,4 +27,4 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
27
27
  `,0);a()}if(!u){s(`return `)}if(t.codegenNode){Xh(t.codegenNode,n)}else{s(`null`)}if(d){l();s(`}`)}l();s(`}`);return{ast:t,code:n.code,preamble:``,map:n.map?n.map.toJSON():void 0}}function qh(e,t){const{ssr:n,prefixIdentifiers:o,push:s,newline:i,runtimeModuleName:r,runtimeGlobalName:l,ssrRuntimeModuleName:a}=t;const c=l;const u=Array.from(e.helpers);if(u.length>0){{s(`const _Vue = ${c}
28
28
  `,-1);if(e.hoists.length){const f=[dp,hp,mp,gp,vp].filter(e=>u.includes(e)).map(Vh).join(", ");s(`const { ${f} } = _Vue
29
29
  `,-1)}}}zh(e.hoists,t);i();s(`return `)}function Wh(n,o,{helper:e,push:s,newline:i,isTS:r}){const l=e(o==="component"?yp:_p);for(let t=0;t<n.length;t++){let e=n[t];const a=e.endsWith("__self");if(a){e=e.slice(0,-6)}s(`const ${Vd(e,o)} = ${l}(${JSON.stringify(e)}${a?`, true`:``})${r?`!`:``}`);if(t<n.length-1){i()}}}function zh(t,n){if(!t.length){return}n.pure=true;const{push:o,newline:s}=n;s();for(let e=0;e<t.length;e++){const i=t[e];if(i){o(`const _hoisted_${e+1} = `);Xh(i,n);s()}}n.pure=false}function Kh(e){return k(e)||e.type===4||e.type===2||e.type===5||e.type===8}function Gh(e,t){const n=e.length>3||e.some(e=>H(e)||!Kh(e));t.push(`[`);n&&t.indent();Jh(e,t,n);n&&t.deindent();t.push(`]`)}function Jh(t,n,o=false,s=true){const{push:i,newline:r}=n;for(let e=0;e<t.length;e++){const l=t[e];if(k(l)){i(l,-3)}else if(H(l)){Gh(l,n)}else{Xh(l,n)}if(e<t.length-1){if(o){s&&i(",");r()}else{s&&i(", ")}}}}function Xh(e,t){if(k(e)){t.push(e,-3);return}if(se(e)){t.push(t.helper(e));return}switch(e.type){case 1:case 9:case 11:$d(e.codegenNode!=null,`Codegen node is missing for element/if/for node. Apply appropriate transforms first.`);Xh(e.codegenNode,t);break;case 2:Yh(e,t);break;case 4:Qh(e,t);break;case 5:Zh(e,t);break;case 12:Xh(e.codegenNode,t);break;case 8:em(e,t);break;case 3:nm(e,t);break;case 13:om(e,t);break;case 14:im(e,t);break;case 15:rm(e,t);break;case 17:lm(e,t);break;case 18:am(e,t);break;case 19:cm(e,t);break;case 20:um(e,t);break;case 21:Jh(e.body,t,true,false);break;case 22:break;case 23:break;case 24:break;case 25:break;case 26:break;case 10:break;default:{$d(false,`unhandled codegen node type: ${e.type}`);const n=e;return n}}}function Yh(e,t){t.push(JSON.stringify(e.content),-3,e)}function Qh(e,t){const{content:n,isStatic:o}=e;t.push(o?JSON.stringify(n):n,-3,e)}function Zh(e,t){const{push:n,helper:o,pure:s}=t;if(s)n(Uh);n(`${o(Tp)}(`);Xh(e.content,t);n(`)`)}function em(t,n){for(let e=0;e<t.children.length;e++){const o=t.children[e];if(k(o)){n.push(o,-3)}else{Xh(o,n)}}}function tm(e,t){const{push:n}=t;if(e.type===8){n(`[`);em(e,t);n(`]`)}else if(e.isStatic){const o=yd(e.content)?e.content:JSON.stringify(e.content);n(o,-2,e)}else{n(`[${e.content}]`,-3,e)}}function nm(e,t){const{push:n,helper:o,pure:s}=t;if(s){n(Uh)}n(`${o(mp)}(${JSON.stringify(e.content)})`,-3,e)}function om(e,t){const{push:n,helper:o,pure:s}=t;const{tag:i,props:r,children:l,patchFlag:a,dynamicProps:c,directives:u,isBlock:f,disableTracking:p,isComponent:d}=e;let h;if(a){{if(a<0){h=a+` /* ${he[a]} */`}else{const g=Object.keys(he).map(Number).filter(e=>e>0&&a&e).map(e=>he[e]).join(`, `);h=a+` /* ${g} */`}}}if(u){n(o(wp)+`(`)}if(f){n(`(${o(up)}(${p?`true`:``}), `)}if(s){n(Uh)}const m=f?od(t.inSSR,d):nd(t.inSSR,d);n(o(m)+`(`,-2,e);Jh(sm([i,r,l,h,c]),t);n(`)`);if(f){n(`)`)}if(u){n(`, `);Xh(u,t);n(`)`)}}function sm(e){let t=e.length;while(t--){if(e[t]!=null)break}return e.slice(0,t+1).map(e=>e||`null`)}function im(e,t){const{push:n,helper:o,pure:s}=t;const i=k(e.callee)?e.callee:o(e.callee);if(s){n(Uh)}n(i+`(`,-2,e);Jh(e.arguments,t);n(`)`)}function rm(e,t){const{push:n,indent:o,deindent:s,newline:i}=t;const{properties:r}=e;if(!r.length){n(`{}`,-2,e);return}const l=r.length>1||r.some(e=>e.value.type!==4);n(l?`{`:`{ `);l&&o();for(let e=0;e<r.length;e++){const{key:a,value:c}=r[e];tm(a,t);n(`: `);Xh(c,t);if(e<r.length-1){n(`,`);i()}}l&&s();n(l?`}`:` }`)}function lm(e,t){Gh(e.elements,t)}function am(e,t){const{push:n,indent:o,deindent:s}=t;const{params:i,returns:r,body:l,newline:a,isSlot:c}=e;if(c){n(`_${qp[Dp]}(`)}n(`(`,-2,e);if(H(i)){Jh(i,t)}else if(i){Xh(i,t)}n(`) => `);if(a||l){n(`{`);o()}if(r){if(a){n(`return `)}if(H(r)){Gh(r,t)}else{Xh(r,t)}}else if(l){Xh(l,t)}if(a||l){s();n(`}`)}if(c){n(`)`)}}function cm(e,t){const{test:n,consequent:o,alternate:s,newline:i}=e;const{push:r,indent:l,deindent:a,newline:c}=t;if(n.type===4){const f=!yd(n.content);f&&r(`(`);Qh(n,t);f&&r(`)`)}else{r(`(`);Xh(n,t);r(`)`)}i&&l();t.indentLevel++;i||r(` `);r(`? `);Xh(o,t);t.indentLevel--;i&&c();i||r(` `);r(`: `);const u=s.type===19;if(!u){t.indentLevel++}Xh(s,t);if(!u){t.indentLevel--}i&&a(true)}function um(e,t){const{push:n,helper:o,indent:s,deindent:i,newline:r}=t;const{needPauseTracking:l,needArraySpread:a}=e;if(a){n(`[...(`)}n(`_cache[${e.index}] || (`);if(l){s();n(`${o(Fp)}(-1`);if(e.inVOnce)n(`, true`);n(`),`);r();n(`(`)}n(`_cache[${e.index}] = `);Xh(e.value,t);if(l){n(`).cacheIndex = ${e.index},`);r();n(`${o(Fp)}(1),`);r();n(`_cache[${e.index}]`);i()}n(`)`);if(a){n(`)]`)}}const fm=new RegExp("\\b"+"arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b")+"\\b");const pm=/'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g;function dm(n,o,e=false,t=false){const s=n.content;if(!s.trim()){return}try{new Function(t?` ${s} `:`return ${e?`(${s}) => {}`:`(${s})`}`)}catch(e){let t=e.message;const i=s.replace(pm,"").match(fm);if(i){t=`avoid using JavaScript keyword as property name: "${i[0]}"`}o.onError(G(45,n.loc,void 0,t))}}const hm=(t,n)=>{if(t.type===5){t.content=mm(t.content,n)}else if(t.type===1){const o=Ed(t,"memo");for(let e=0;e<t.props.length;e++){const s=t.props[e];if(s.type===7&&s.name!=="for"){const i=s.exp;const r=s.arg;if(i&&i.type===4&&!(s.name==="on"&&r)&&!(o&&r&&r.type===4&&r.content==="key")){s.exp=mm(i,n,s.name==="slot")}if(r&&r.type===4&&!r.isStatic){s.arg=mm(r,n)}}}}};function mm(e,t,n=false,o=false,s=Object.create(t.identifiers)){{{dm(e,t,n,o)}return e}}const gm=Dh(/^(if|else|else-if)$/,(e,t,l)=>{return vm(e,t,l,(t,n,o)=>{const e=l.parent.children;let s=e.indexOf(t);let i=0;while(s-- >=0){const r=e[s];if(r&&r.type===9){i+=r.branches.length}}return()=>{if(o){t.codegenNode=bm(n,i,l)}else{const e=wm(t.codegenNode);e.alternate=bm(n,i+t.branches.length-1,l)}}})});function vm(t,n,o,s){if(n.name!=="else"&&(!n.exp||!n.exp.content.trim())){const e=n.exp?n.exp.loc:t.loc;o.onError(G(28,n.loc));n.exp=z(`true`,false,e)}if(n.exp){dm(n.exp,o)}if(n.name==="if"){const i=ym(t,n);const r={type:9,loc:bh(t.loc),branches:[i]};o.replaceNode(r);if(s){return s(r,i,true)}}else{const l=o.parent.children;const a=[];let e=l.indexOf(t);while(e-- >=-1){const c=l[e];if(c&&c.type===3){o.removeNode(c);a.unshift(c);continue}if(c&&c.type===2&&!c.content.trim().length){o.removeNode(c);continue}if(c&&c.type===9){if(n.name==="else-if"&&c.branches[c.branches.length-1].condition===void 0){o.onError(G(30,t.loc))}o.removeNode();const i=ym(t,n);if(a.length&&!(o.parent&&o.parent.type===1&&(o.parent.tag==="transition"||o.parent.tag==="Transition"))){i.children=[...a,...i.children]}{const f=i.userKey;if(f){c.branches.forEach(({userKey:e})=>{if(xm(e,f)){o.onError(G(29,i.userKey.loc))}})}}c.branches.push(i);const u=s&&s(c,i,false);jh(i,o);if(u)u();o.currentNode=null}else{o.onError(G(30,t.loc))}break}}}function ym(e,t){const n=e.tagType===3;return{type:10,loc:e.loc,condition:t.name==="else"?void 0:t.exp,children:n&&!Ed(e,"for")?e.children:[e],userKey:Nd(e,`key`),isTemplateIf:n}}function bm(e,t,n){if(e.condition){return Zp(e.condition,_m(e,t,n),K(n.helper(mp),['"v-if"',"true"]))}else{return _m(e,t,n)}}function _m(t,e,n){const{helper:o}=n;const s=B(`key`,z(`${e}`,false,zp,2));const{children:i}=t;const r=i[0];const l=i.length!==1||r.type!==1;if(l){if(i.length===1&&r.type===11){const a=r.codegenNode;Dd(a,s,n);return a}else{let e=64;if(!t.isTemplateIf&&i.filter(e=>e.type!==3).length===1){e|=2048}return Gp(n,o(ip),Xp([s]),i,e,void 0,void 0,true,false,false,t.loc)}}else{const c=r.codegenNode;const a=Bd(c);if(a.type===13){sd(a,n)}Dd(a,s,n);return c}}function xm(e,t){if(!e||e.type!==t.type){return false}if(e.type===6){if(e.value.content!==t.value.content){return false}}else{const n=e.exp;const o=t.exp;if(n.type!==o.type){return false}if(n.type!==4||n.isStatic!==o.isStatic||n.content!==o.content){return false}}return true}function wm(e){while(true){if(e.type===19){if(e.alternate.type===19){e=e.alternate}else{return e}}else if(e.type===20){e=e.value}}}const Sm=(e,t,n)=>{const{modifiers:o,loc:s}=e;const i=e.arg;let{exp:r}=e;if(r&&r.type===4&&!r.content.trim()){{r=void 0}}if(!r){if(i.type!==4||!i.isStatic){n.onError(G(52,i.loc));return{props:[B(i,z("",true,s))]}}Cm(e);r=e.exp}if(i.type!==4){i.children.unshift(`(`);i.children.push(`) || ""`)}else if(!i.isStatic){i.content=`${i.content} || ""`}if(o.some(e=>e.content==="camel")){if(i.type===4){if(i.isStatic){i.content=T(i.content)}else{i.content=`${n.helperString(Ip)}(${i.content})`}}else{i.children.unshift(`${n.helperString(Ip)}(`);i.children.push(`)`)}}if(!n.inSSR){if(o.some(e=>e.content==="prop")){km(i,".")}if(o.some(e=>e.content==="attr")){km(i,"^")}}return{props:[B(i,r)]}};const Cm=(e,t)=>{const n=e.arg;const o=T(n.content);e.exp=z(o,false,n.loc)};const km=(e,t)=>{if(e.type===4){if(e.isStatic){e.content=t+e.content}else{e.content=`\`${t}\${${e.content}}\``}}else{e.children.unshift(`'${t}' + (`);e.children.push(`)`)}};const Tm=Dh("for",(p,e,d)=>{const{helper:h,removeHelper:m}=d;return Am(p,e,d,i=>{const r=K(h(Sp),[i.source]);const l=Md(p);const a=Ed(p,"memo");const e=Nd(p,`key`,false,true);const t=e&&e.type===7;if(t&&!e.exp){Cm(e)}let c=e&&(e.type===6?e.value?z(e.value.content,true):void 0:e.exp);const u=e&&c?B(`key`,c):null;const f=i.source.type===4&&i.source.constType>0;const n=f?64:e?128:256;i.codegenNode=Gp(d,h(ip),void 0,r,n,void 0,void 0,true,!f,false,p.loc);return()=>{let e;const{children:t}=i;if(l){p.children.some(e=>{if(e.type===1){const t=Nd(e,"key");if(t){d.onError(G(33,t.loc));return true}}})}const n=t.length!==1||t[0].type!==1;const o=Fd(p)?p:l&&p.children.length===1&&Fd(p.children[0])?p.children[0]:null;if(o){e=o.codegenNode;if(l&&u){Dd(e,u,d)}}else if(n){e=Gp(d,h(ip),u?Xp([u]):void 0,p.children,64,void 0,void 0,true,void 0,false)}else{e=t[0].codegenNode;if(l&&u){Dd(e,u,d)}if(e.isBlock!==!f){if(e.isBlock){m(up);m(od(d.inSSR,e.isComponent))}else{m(nd(d.inSSR,e.isComponent))}}e.isBlock=!f;if(e.isBlock){h(up);h(od(d.inSSR,e.isComponent))}else{h(nd(d.inSSR,e.isComponent))}}if(a){const s=Qp(Em(i.parseResult,[z(`_cached`)]));s.body=td([Yp([`const _memo = (`,a.exp,`)`]),Yp([`if (_cached`,...c?[` && _cached.key === `,c]:[],` && ${d.helperString(Hp)}(_cached, _memo)) return _cached`]),Yp([`const _item = `,e]),z(`_item.memo = _memo`),z(`return _item`)]);r.arguments.push(s,z(`_cache`),z(String(d.cached.length)));d.cached.push(null)}else{r.arguments.push(Qp(Em(i.parseResult),e,true))}}})});function Am(e,t,n,o){if(!t.exp){n.onError(G(31,t.loc));return}const s=t.forParseResult;if(!s){n.onError(G(32,t.loc));return}$m(s,n);const{addIdentifiers:i,removeIdentifiers:r,scopes:l}=n;const{source:a,value:c,key:u,index:f}=s;const p={type:11,loc:t.loc,source:a,valueAlias:c,keyAlias:u,objectIndexAlias:f,parseResult:s,children:Md(e)?e.children:[e]};n.replaceNode(p);l.vFor++;const d=o&&o(p);return()=>{l.vFor--;if(d)d()}}function $m(e,t){if(e.finalized)return;{dm(e.source,t);if(e.key){dm(e.key,t,true)}if(e.index){dm(e.index,t,true)}if(e.value){dm(e.value,t,true)}}e.finalized=true}function Em({value:e,key:t,index:n},o=[]){return Nm([e,t,n,...o])}function Nm(e){let t=e.length;while(t--){if(e[t])break}return e.slice(0,t+1).map((e,t)=>e||z(`_`.repeat(t+1),false))}const Om=z(`undefined`,false);const Pm=(e,t)=>{if(e.type===1&&(e.tagType===1||e.tagType===3)){const n=Ed(e,"slot");if(n){n.exp;t.scopes.vSlot++;return()=>{t.scopes.vSlot--}}}};const Im=(e,t,n,o)=>Qp(e,n,false,true,n.length?n[0].loc:o);function Rm(e,i,r=Im){i.helper(Dp);const{children:l,loc:o}=e;const a=[];const c=[];let u=i.scopes.vSlot>0||i.scopes.vFor>0;const f=Ed(e,"slot",true);if(f){const{arg:s,exp:v}=f;if(s&&!md(s)){u=true}a.push(B(s||z("default",true),r(v,void 0,l,o)))}let p=false;let d=false;const h=[];const m=new Set;let g=0;for(let s=0;s<l.length;s++){const y=l[s];let e;if(!Md(y)||!(e=Ed(y,"slot",true))){if(y.type!==3){h.push(y)}continue}if(f){i.onError(G(37,e.loc));break}p=true;const{children:b,loc:_}=y;const{arg:x=z(`default`,true),exp:w,loc:S}=e;let t;if(md(x)){t=x?x.content:`default`}else{u=true}const C=Ed(y,"for");const k=r(w,C,b,_);let n;let o;if(n=Ed(y,"if")){u=true;c.push(Zp(n.exp,Mm(x,k,g++),Om))}else if(o=Ed(y,/^else(-if)?$/,true)){let e=s;let t;while(e--){t=l[e];if(t.type!==3){break}}if(t&&Md(t)&&Ed(t,/^(else-)?if$/)){let e=c[c.length-1];while(e.alternate.type===19){e=e.alternate}e.alternate=o.exp?Zp(o.exp,Mm(x,k,g++),Om):Mm(x,k,g++)}else{i.onError(G(30,o.loc))}}else if(C){u=true;const T=C.forParseResult;if(T){$m(T,i);c.push(K(i.helper(Sp),[T.source,Qp(Em(T),Mm(x,k),true)]))}else{i.onError(G(32,C.loc))}}else{if(t){if(m.has(t)){i.onError(G(38,S));continue}m.add(t);if(t==="default"){d=true}}a.push(B(x,k))}}if(!f){const A=(e,t)=>{const n=r(e,void 0,t,o);return B(`default`,n)};if(!p){a.push(A(void 0,l))}else if(h.length&&h.some(e=>Lm(e))){if(d){i.onError(G(39,h[0].loc))}else{a.push(A(void 0,h))}}}const t=u?2:Fm(e.children)?3:1;let n=Xp(a.concat(B(`_`,z(t+` /* ${me[t]} */`,false))),o);if(c.length){n=K(i.helper(kp),[n,Jp(c)])}return{slots:n,hasDynamicSlots:u}}function Mm(e,t,n){const o=[B(`name`,e),B(`fn`,t)];if(n!=null){o.push(B(`key`,z(String(n),true)))}return Xp(o)}function Fm(t){for(let e=0;e<t.length;e++){const n=t[e];switch(n.type){case 1:if(n.tagType===2||Fm(n.children)){return true}break;case 9:if(Fm(n.branches))return true;break;case 10:case 11:if(Fm(n.children))return true;break}}return false}function Lm(e){if(e.type!==2&&e.type!==12)return true;return e.type===2?!!e.content.trim():Lm(e.content)}const jm=new WeakMap;const Dm=(x,w)=>{return function e(){x=w.currentNode;if(!(x.type===1&&(x.tagType===0||x.tagType===1))){return}const{tag:t,props:n}=x;const o=x.tagType===1;let s=o?Um(x,w):`"${t}"`;const i=W(s)&&s.callee===bp;let r;let l;let a=0;let c;let u;let f;let p=i||s===rp||s===lp||!o&&(t==="svg"||t==="foreignObject"||t==="math");if(n.length>0){const d=Vm(x,w,void 0,o,i);r=d.props;a=d.patchFlag;u=d.dynamicPropNames;const h=d.directives;f=h&&h.length?Jp(h.map(e=>qm(e,w))):void 0;if(d.shouldUseBlock){p=true}}if(x.children.length>0){if(s===ap){p=true;a|=1024;if(x.children.length>1){w.onError(G(46,{start:x.children[0].loc.start,end:x.children[x.children.length-1].loc.end,source:""}))}}const m=o&&s!==rp&&s!==ap;if(m){const{slots:g,hasDynamicSlots:v}=Rm(x,w);l=g;if(v){a|=1024}}else if(x.children.length===1&&s!==rp){const y=x.children[0];const b=y.type;const _=b===5||b===8;if(_&&Eh(y,w)===0){a|=1}if(_||b===2){l=y}else{l=x.children}}else{l=x.children}}if(u&&u.length){c=Wm(u)}x.codegenNode=Gp(w,s,r,l,a===0?void 0:a,c,f,!!p,false,o,x.loc)}};function Um(e,t,n=false){let{tag:o}=e;const s=zm(o);const i=Nd(e,"is",false,true);if(i){if(s||false){let e;if(i.type===6){e=i.value&&z(i.value.content,true)}else{e=i.exp;if(!e){e=z(`is`,false,i.arg.loc)}}if(e){return K(t.helper(bp),[e])}}else if(i.type===6&&i.value.content.startsWith("vue:")){o=i.value.content.slice(4)}}const r=gd(o)||t.isBuiltInComponent(o);if(r){if(!n)t.helper(r);return r}t.helper(yp);t.components.add(o);return Vd(o,`component`)}function Vm(t,s,n=t.props,i,F,o=false){const{tag:r,loc:l,children:L}=t;let a=[];const c=[];const u=[];const f=L.length>0;let p=false;let d=0;let h=false;let m=false;let g=false;let v=false;let y=false;let j=false;const b=[];const _=e=>{if(a.length){c.push(Xp(Bm(a),l));a=[]}if(e)c.push(e)};const x=()=>{if(s.scopes.vFor>0){a.push(B(z("ref_for",true),z("true")))}};const D=({key:e,value:t})=>{if(md(e)){const n=e.content;const o=J(n);if(o&&(!i||F)&&n.toLowerCase()!=="onclick"&&n!=="onUpdate:modelValue"&&!re(n)){v=true}if(o&&re(n)){j=true}if(o&&t.type===14){t=t.arguments[0]}if(t.type===20||(t.type===4||t.type===8)&&Eh(t,s)>0){return}if(n==="ref"){h=true}else if(n==="class"){m=true}else if(n==="style"){g=true}else if(n!=="key"&&!b.includes(n)){b.push(n)}if(i&&(n==="class"||n==="style")&&!b.includes(n)){b.push(n)}}else{y=true}};for(let e=0;e<n.length;e++){const S=n[e];if(S.type===6){const{loc:C,name:k,nameLoc:U,value:T}=S;let e=true;if(k==="ref"){h=true;x()}if(k==="is"&&(zm(r)||T&&T.content.startsWith("vue:")||false)){continue}a.push(B(z(k,true,U),z(T?T.content:"",e,T?T.loc:C)))}else{const{name:k,arg:A,exp:$,loc:C,modifiers:V}=S;const E=k==="bind";const N=k==="on";if(k==="slot"){if(!i){s.onError(G(40,C))}continue}if(k==="once"||k==="memo"){continue}if(k==="is"||E&&Od(A,"is")&&(zm(r)||false)){continue}if(N&&o){continue}if(E&&Od(A,"key")||N&&f&&Od(A,"vue:before-update")){p=true}if(E&&Od(A,"ref")){x()}if(!A&&(E||N)){y=true;if($){if(E){x();_();c.push($)}else{_({type:14,loc:C,callee:s.helper(Pp),arguments:i?[$]:[$,`true`]})}}else{s.onError(G(E?34:35,C))}continue}if(E&&V.some(e=>e.content==="prop")){d|=32}const O=s.directiveTransforms[k];if(O){const{props:P,needRuntime:I}=O(S,t,s);!o&&P.forEach(D);if(N&&A&&!md(A)){_(Xp(P,l))}else{a.push(...P)}if(I){u.push(S);if(se(I)){jm.set(S,I)}}}else if(!le(k)){u.push(S);if(f){p=true}}}}let w=void 0;if(c.length){_();if(c.length>1){w=K(s.helper(Ap),c,l)}else{w=c[0]}}else if(a.length){w=Xp(Bm(a),l)}if(y){d|=16}else{if(m&&!i){d|=2}if(g&&!i){d|=4}if(b.length){d|=8}if(v){d|=32}}if(!p&&(d===0||d===32)&&(h||j||u.length>0)){d|=512}if(!s.inSSR&&w){switch(w.type){case 15:let t=-1;let n=-1;let o=false;for(let e=0;e<w.properties.length;e++){const M=w.properties[e].key;if(md(M)){if(M.content==="class"){t=e}else if(M.content==="style"){n=e}}else if(!M.isHandlerKey){o=true}}const e=w.properties[t];const R=w.properties[n];if(!o){if(e&&!md(e.value)){e.value=K(s.helper($p),[e.value])}if(R&&(g||R.value.type===4&&R.value.content.trim()[0]===`[`||R.value.type===17)){R.value=K(s.helper(Ep),[R.value])}}else{w=K(s.helper(Np),[w])}break;case 14:break;default:w=K(s.helper(Np),[K(s.helper(Op),[w])]);break}}return{props:w,directives:u,patchFlag:d,dynamicPropNames:b,shouldUseBlock:p}}function Bm(t){const n=new Map;const o=[];for(let e=0;e<t.length;e++){const s=t[e];if(s.key.type===8||!s.key.isStatic){o.push(s);continue}const i=s.key.content;const r=n.get(i);if(r){if(i==="style"||i==="class"||J(i)){Hm(r,s)}}else{n.set(i,s);o.push(s)}}return o}function Hm(e,t){if(e.value.type===17){e.value.elements.push(t.value)}else{e.value=Jp([e.value,t.value],e.loc)}}function qm(e,t){const n=[];const o=jm.get(e);if(o){n.push(t.helperString(o))}else{{t.helper(_p);t.directives.add(e.name);n.push(Vd(e.name,`directive`))}}const{loc:s}=e;if(e.exp)n.push(e.exp);if(e.arg){if(!e.exp){n.push(`void 0`)}n.push(e.arg)}if(Object.keys(e.modifiers).length){if(!e.arg){if(!e.exp){n.push(`void 0`)}n.push(`void 0`)}const i=z(`true`,false,s);n.push(Xp(e.modifiers.map(e=>B(e,i)),s))}return Jp(n,e.loc)}function Wm(n){let o=`[`;for(let e=0,t=n.length;e<t;e++){o+=JSON.stringify(n[e]);if(e<t-1)o+=", "}return o+`]`}function zm(e){return e==="component"||e==="Component"}const Km=(t,n)=>{if(Fd(t)){const{children:o,loc:s}=t;const{slotName:i,slotProps:r}=Gm(t,n);const l=[n.prefixIdentifiers?`_ctx.$slots`:`$slots`,i,"{}","undefined","true"];let e=2;if(r){l[2]=r;e=3}if(o.length){l[3]=Qp([],o,false,false,s);e=4}if(n.scopeId&&!n.slotted){e=5}l.splice(e);t.codegenNode=K(n.helper(Cp),l,s)}};function Gm(n,e){let o=`"default"`;let t=void 0;const s=[];for(let t=0;t<n.props.length;t++){const e=n.props[t];if(e.type===6){if(e.value){if(e.name==="name"){o=JSON.stringify(e.value.content)}else{e.name=T(e.name);s.push(e)}}}else{if(e.name==="bind"&&Od(e.arg,"name")){if(e.exp){o=e.exp}else if(e.arg&&e.arg.type===4){const i=T(e.arg.content);o=e.exp=z(i,false,e.arg.loc)}}else{if(e.name==="bind"&&e.arg&&md(e.arg)){e.arg.content=T(e.arg.content)}s.push(e)}}}if(s.length>0){const{props:r,directives:l}=Vm(n,e,s,false,false);t=r;if(l.length){e.onError(G(36,l[0].loc))}}return{slotName:o,slotProps:t}}const Jm=(e,t,n,o)=>{const{loc:s,modifiers:i,arg:r}=e;if(!e.exp&&!i.length){n.onError(G(35,s))}let l;if(r.type===4){if(r.isStatic){let e=r.content;if(e.startsWith("vnode")){n.onError(G(51,r.loc))}if(e.startsWith("vue:")){e=`vnode-${e.slice(4)}`}const f=t.tagType!==0||e.startsWith("vnode")||!/[A-Z]/.test(e)?D(T(e)):`on:${e}`;l=z(f,true,r.loc)}else{l=Yp([`${n.helperString(Mp)}(`,r,`)`])}}else{l=r;l.children.unshift(`${n.helperString(Mp)}(`);l.children.push(`)`)}let a=e.exp;if(a&&!a.content.trim()){a=void 0}let c=n.cacheHandlers&&!a&&!n.inVOnce;if(a){const p=Cd(a);const d=!(p||Ad(a));const h=a.content.includes(`;`);{dm(a,n,false,h)}if(d||c&&p){a=Yp([`${d?`$event`:`${``}(...args)`} => ${h?`{`:`(`}`,a,h?`}`:`)`])}}let u={props:[B(l,a||z(`() => {}`,false,s))]};if(o){u=o(u)}if(c){u.props[0].value=n.cache(u.props[0].value)}u.props.forEach(e=>e.key.isHandlerKey=true);return u};const Xm=(r,l)=>{if(r.type===0||r.type===1||r.type===11||r.type===10){return()=>{const n=r.children;let o=void 0;let e=false;for(let t=0;t<n.length;t++){const s=n[t];if(Id(s)){e=true;for(let e=t+1;e<n.length;e++){const i=n[e];if(Id(i)){if(!o){o=n[t]=Yp([s],s.loc)}o.children.push(` + `,i);n.splice(e,1);e--}else{o=void 0;break}}}}if(!e||n.length===1&&(r.type===0||r.type===1&&r.tagType===0&&!r.props.find(e=>e.type===7&&!l.directiveTransforms[e.name])&&true)){return}for(let e=0;e<n.length;e++){const s=n[e];if(Id(s)||s.type===8){const t=[];if(s.type!==2||s.content!==" "){t.push(s)}if(!l.ssr&&Eh(s,l)===0){t.push(1+` /* ${he[1]} */`)}n[e]={type:12,content:s,loc:s.loc,codegenNode:K(l.helper(gp),t)}}}}}};const Ym=new WeakSet;const Qm=(e,t)=>{if(e.type===1&&Ed(e,"once",true)){if(Ym.has(e)||t.inVOnce||t.inSSR){return}Ym.add(e);t.inVOnce=true;t.helper(Fp);return()=>{t.inVOnce=false;const e=t.currentNode;if(e.codegenNode){e.codegenNode=t.cache(e.codegenNode,true,true)}}}};const Zm=(e,t,n)=>{const{exp:o,arg:s}=e;if(!o){n.onError(G(41,e.loc));return eg()}const i=o.loc.source.trim();const r=o.type===4?o.content:i;const l=n.bindingMetadata[i];if(l==="props"||l==="props-aliased"){n.onError(G(44,o.loc));return eg()}const a=false;if(!r.trim()||!Cd(o)&&!a){n.onError(G(42,o.loc));return eg()}const c=s?s:z("modelValue",true);const u=s?md(s)?`onUpdate:${T(s.content)}`:Yp(['"onUpdate:" + ',s]):`onUpdate:modelValue`;let f;const p=n.isTS?`($event: any)`:`$event`;{f=Yp([`${p} => ((`,o,`) = $event)`])}const d=[B(c,e.exp),B(u,f)];if(e.modifiers.length&&t.tagType===1){const h=e.modifiers.map(e=>e.content).map(e=>(yd(e)?e:JSON.stringify(e))+`: true`).join(`, `);const m=s?md(s)?`${s.content}Modifiers`:Yp([s,' + "Modifiers"']):`modelModifiers`;d.push(B(m,z(`{ ${h} }`,false,e.loc,2)))}return eg(d)};function eg(e=[]){return{props:e}}const tg=new WeakSet;const ng=(t,n)=>{if(t.type===1){const o=Ed(t,"memo");if(!o||tg.has(t)){return}tg.add(t);return()=>{const e=t.codegenNode||n.currentNode.codegenNode;if(e&&e.type===13){if(t.tagType!==1){sd(e,n)}t.codegenNode=K(n.helper(Bp),[o.exp,Qp(void 0,e),`_cache`,String(n.cached.length)]);n.cached.push(null)}}}};function og(e){return[[Qm,gm,ng,Tm,...[],...[hm],Km,Dm,Pm,Xm],{on:Jm,bind:Sm,model:Zm}]}function sg(e,t={}){const n=t.onError||pd;const o=t.mode==="module";{if(t.prefixIdentifiers===true){n(G(47))}else if(o){n(G(48))}}const s=false;if(t.cacheHandlers){n(G(49))}if(t.scopeId&&!o){n(G(50))}const i=E({},t,{prefixIdentifiers:s});const r=k(e)?kh(e,i):e;const[l,a]=og();Mh(r,E({},i,{nodeTransforms:[...l,...t.nodeTransforms||[]],directiveTransforms:E({},a,t.directiveTransforms||{})}));return Hh(r,i)}const ig=()=>({props:[]});const rg=Symbol(`vModelRadio`);const lg=Symbol(`vModelCheckbox`);const ag=Symbol(`vModelText`);const cg=Symbol(`vModelSelect`);const ug=Symbol(`vModelDynamic`);const fg=Symbol(`vOnModifiersGuard`);const pg=Symbol(`vOnKeysGuard`);const dg=Symbol(`vShow`);const hg=Symbol(`Transition`);const mg=Symbol(`TransitionGroup`);Wp({[rg]:`vModelRadio`,[lg]:`vModelCheckbox`,[ag]:`vModelText`,[cg]:`vModelSelect`,[ug]:`vModelDynamic`,[fg]:`withModifiers`,[pg]:`withKeys`,[dg]:`vShow`,[hg]:`Transition`,[mg]:`TransitionGroup`});let gg;function vg(e,t=false){if(!gg){gg=document.createElement("div")}if(t){gg.innerHTML=`<div foo="${e.replace(/"/g,"&quot;")}">`;return gg.children[0].getAttribute("foo")}else{gg.innerHTML=e;return gg.textContent}}const yg={parseMode:"html",isVoidTag:Me,isNativeTag:e=>Pe(e)||Ie(e)||Re(e),isPreTag:e=>e==="pre",isIgnoreNewlineTag:e=>e==="pre"||e==="textarea",decodeEntities:vg,isBuiltInComponent:e=>{if(e==="Transition"||e==="transition"){return hg}else if(e==="TransitionGroup"||e==="transition-group"){return mg}},getNamespace(e,t,n){let o=t?t.ns:n;if(t&&o===2){if(t.tag==="annotation-xml"){if(e==="svg"){return 1}if(t.props.some(e=>e.type===6&&e.name==="encoding"&&e.value!=null&&(e.value.content==="text/html"||e.value.content==="application/xhtml+xml"))){o=0}}else if(/^m(?:[ions]|text)$/.test(t.tag)&&e!=="mglyph"&&e!=="malignmark"){o=0}}else if(t&&o===1){if(t.tag==="foreignObject"||t.tag==="desc"||t.tag==="title"){o=0}}if(o===0){if(e==="svg"){return 1}if(e==="math"){return 2}}return o}};const bg=n=>{if(n.type===1){n.props.forEach((e,t)=>{if(e.type===6&&e.name==="style"&&e.value){n.props[t]={type:7,name:`bind`,arg:z(`style`,true,e.loc),exp:_g(e.value.content,e.loc),modifiers:[],loc:e.loc}}})}};const _g=(e,t)=>{const n=Ce(e);return z(JSON.stringify(n),false,t,3)};function xg(e,t){return G(e,t,wg)}const wg={[53]:`v-html is missing expression.`,[54]:`v-html will override element children.`,[55]:`v-text is missing expression.`,[56]:`v-text will override element children.`,[57]:`v-model can only be used on <input>, <textarea> and <select> elements.`,[58]:`v-model argument is not supported on plain elements.`,[59]:`v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,[60]:`Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,[61]:`v-show is missing expression.`,[62]:`<Transition> expects exactly one child element or component.`,[63]:`Tags with side effect (<script> and <style>) are ignored in client component templates.`};const Sg=(e,t,n)=>{const{exp:o,loc:s}=e;if(!o){n.onError(xg(53,s))}if(t.children.length){n.onError(xg(54,s));t.children.length=0}return{props:[B(z(`innerHTML`,true,s),o||z("",true))]}};const Cg=(e,t,n)=>{const{exp:o,loc:s}=e;if(!o){n.onError(xg(55,s))}if(t.children.length){n.onError(xg(56,s));t.children.length=0}return{props:[B(z(`textContent`,true),o?Eh(o,n)>0?o:K(n.helperString(Tp),[o],s):z("",true))]}};const kg=(n,o,s)=>{const i=Zm(n,o,s);if(!i.props.length||o.tagType===1){return i}if(n.arg){s.onError(xg(58,n.arg.loc))}function r(){const e=Ed(o,"bind");if(e&&Od(e.arg,"value")){s.onError(xg(60,e.loc))}}const{tag:l}=o;const a=s.isCustomElement(l);if(l==="input"||l==="textarea"||l==="select"||a){let e=ag;let t=false;if(l==="input"||a){const c=Nd(o,`type`);if(c){if(c.type===7){e=ug}else if(c.value){switch(c.value.content){case"radio":e=rg;break;case"checkbox":e=lg;break;case"file":t=true;s.onError(xg(59,n.loc));break;default:r();break}}}else if(Pd(o)){e=ug}else{r()}}else if(l==="select"){e=cg}else{r()}if(!t){i.needRuntime=s.helper(e)}}else{s.onError(xg(57,n.loc))}i.props=i.props.filter(e=>!(e.key.type===4&&e.key.content==="modelValue"));return i};const Tg=t(`passive,once,capture`);const Ag=t(`stop,prevent,self,ctrl,shift,alt,meta,exact,middle`);const $g=t("left,right");const Eg=t(`onkeyup,onkeydown,onkeypress`);const Ng=(t,n,e,o)=>{const s=[];const i=[];const r=[];for(let e=0;e<n.length;e++){const l=n[e].content;if(Tg(l)){r.push(l)}else{if($g(l)){if(md(t)){if(Eg(t.content.toLowerCase())){s.push(l)}else{i.push(l)}}else{s.push(l);i.push(l)}}else{if(Ag(l)){i.push(l)}else{s.push(l)}}}}return{keyModifiers:s,nonKeyModifiers:i,eventOptionModifiers:r}};const Og=(e,t)=>{const n=md(e)&&e.content.toLowerCase()==="onclick";return n?z(t,true):e.type!==4?Yp([`(`,e,`) === "onClick" ? "${t}" : (`,e,`)`]):e};const Pg=(a,e,c)=>{return Jm(a,e,c,e=>{const{modifiers:t}=a;if(!t.length)return e;let{key:n,value:o}=e.props[0];const{keyModifiers:s,nonKeyModifiers:i,eventOptionModifiers:r}=Ng(n,t,c,a.loc);if(i.includes("right")){n=Og(n,`onContextmenu`)}if(i.includes("middle")){n=Og(n,`onMouseup`)}if(i.length){o=K(c.helper(fg),[o,JSON.stringify(i)])}if(s.length&&(!md(n)||Eg(n.content.toLowerCase()))){o=K(c.helper(pg),[o,JSON.stringify(s)])}if(r.length){const l=r.map(j).join("");n=md(n)?z(`${n.content}${l}`,true):Yp([`(`,n,`) + "${l}"`])}return{props:[B(n,o)]}})};const Ig=(e,t,n)=>{const{exp:o,loc:s}=e;if(!o){n.onError(xg(61,s))}return{props:[],needRuntime:n.helper(dg)}};const Rg=(n,e)=>{if(n.type===1&&n.tagType===1){const t=e.isBuiltInComponent(n.tag);if(t===hg){return()=>{if(!n.children.length){return}if(Mg(n)){e.onError(xg(62,{start:n.children[0].loc.start,end:n.children[n.children.length-1].loc.end,source:""}))}const t=n.children[0];if(t.type===1){for(const e of t.props){if(e.type===7&&e.name==="show"){n.props.push({type:6,name:"persisted",nameLoc:n.loc,value:void 0,loc:n.loc})}}}}}}};function Mg(e){const t=e.children=e.children.filter(e=>e.type!==3&&!(e.type===2&&!e.content.trim()));const n=t[0];return t.length!==1||n.type===11||n.type===9&&n.branches.some(Mg)}const Fg=(e,t)=>{if(e.type===1&&e.tagType===0&&(e.tag==="script___"||e.tag==="style___")){t.onError(xg(63,e.loc));t.removeNode()}};function Lg(e,t){if(e in Ug){return Ug[e].has(t)}if(t in Vg){return Vg[t].has(e)}if(e in Bg){if(Bg[e].has(t))return false}if(t in Hg){if(Hg[t].has(e))return false}return true}const jg=new Set(["h1","h2","h3","h4","h5","h6"]);const Dg=new Set([]);const Ug={head:new Set(["base","basefront","bgsound","link","meta","title","noscript","noframes","style","script","template"]),optgroup:new Set(["option"]),select:new Set(["optgroup","option","hr"]),table:new Set(["caption","colgroup","tbody","tfoot","thead"]),tr:new Set(["td","th"]),colgroup:new Set(["col"]),tbody:new Set(["tr"]),thead:new Set(["tr"]),tfoot:new Set(["tr"]),script:Dg,iframe:Dg,option:Dg,textarea:Dg,style:Dg,title:Dg};const Vg={html:Dg,body:new Set(["html"]),head:new Set(["html"]),td:new Set(["tr"]),colgroup:new Set(["table"]),caption:new Set(["table"]),tbody:new Set(["table"]),tfoot:new Set(["table"]),col:new Set(["colgroup"]),th:new Set(["tr"]),thead:new Set(["table"]),tr:new Set(["tbody","thead","tfoot"]),dd:new Set(["dl","div"]),dt:new Set(["dl","div"]),figcaption:new Set(["figure"]),summary:new Set(["details"]),area:new Set(["map"])};const Bg={p:new Set(["address","article","aside","blockquote","center","details","dialog","dir","div","dl","fieldset","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","menu","ol","p","pre","section","table","ul"]),svg:new Set(["b","blockquote","br","code","dd","div","dl","dt","em","embed","h1","h2","h3","h4","h5","h6","hr","i","img","li","menu","meta","ol","p","pre","ruby","s","small","span","strong","sub","sup","table","u","ul","var"])};const Hg={a:new Set(["a"]),button:new Set(["button"]),dd:new Set(["dd","dt"]),dt:new Set(["dd","dt"]),form:new Set(["form"]),li:new Set(["li"]),h1:jg,h2:jg,h3:jg,h4:jg,h5:jg,h6:jg};const qg=(e,t)=>{if(e.type===1&&e.tagType===0&&t.parent&&t.parent.type===1&&t.parent.tagType===0&&!Lg(t.parent.tag,e.tag)){const n=new SyntaxError(`<${e.tag}> cannot be child of <${t.parent.tag}>, according to HTML specifications. This can cause hydration errors or potentially disrupt future functionality.`);n.loc=e.loc;t.onWarn(n)}};const Wg=[bg,...[Rg,qg]];const zg={cloak:ig,html:Sg,text:Cg,model:kg,on:Pg,show:Ig};function Kg(e,t={}){return sg(e,E({},yg,t,{nodeTransforms:[Fg,...Wg,...t.nodeTransforms||[]],directiveTransforms:E({},zg,t.directiveTransforms||{}),transformHoist:null}))}{sp()}const Gg=Object.create(null);function Jg(s,e){if(!k(s)){if(s.nodeType){s=s.innerHTML}else{u(`invalid template option: `,s);return Y}}const t=de(s,e);const n=Gg[t];if(n){return n}if(s[0]==="#"){const a=document.querySelector(s);if(!a){u(`Template element not found or is empty: ${s}`)}s=a?a.innerHTML:``}const o=E({hoistStatic:true,onError:r,onWarn:e=>r(e,true)},e);if(!o.isCustomElement&&typeof customElements!=="undefined"){o.isCustomElement=e=>!!customElements.get(e)}const{code:i}=Kg(s,o);function r(e,t=false){const n=t?e.message:`Template compilation error: ${e.message}`;const o=e.loc&&be(s,e.loc.start.offset,e.loc.end.offset);u(o?`${n}
30
- ${o}`:n)}const l=new Function(i)();l._rc=true;return Gg[t]=l}Sc(Jg);e.BaseTransition=Ds;e.BaseTransitionPropsValidators=Ms;e.Comment=te;e.DeprecationTypes=Kc;e.EffectScope=et;e.ErrorCodes=fo;e.ErrorTypeStrings=Vc;e.Fragment=ee;e.KeepAlive=Ai;e.ReactiveEffect=it;e.Static=Na;e.Suspense=va;e.Teleport=$s;e.Text=Ea;e.TrackOpTypes=zn;e.Transition=au;e.TransitionGroup=bf;e.TriggerOpTypes=Kn;e.VueElement=cf;e.assertNumber=uo;e.callWithAsyncErrorHandling=mo;e.callWithErrorHandling=ho;e.camelize=T;e.capitalize=j;e.cloneVNode=Xa;e.compatUtils=zc;e.compile=Jg;e.computed=Mc;e.createApp=Yf;e.createBlock=Da;e.createCommentVNode=ec;e.createElementBlock=ja;e.createElementVNode=Ka;e.createHydrationRenderer=Rl;e.createPropsRestProxy=Er;e.createRenderer=Il;e.createSSRApp=Qf;e.createSlots=nr;e.createStaticVNode=Za;e.createTextVNode=Qa;e.createVNode=ne;e.customRef=jn;e.defineAsyncComponent=Si;e.defineComponent=zs;e.defineCustomElement=rf;e.defineEmits=vr;e.defineExpose=yr;e.defineModel=xr;e.defineOptions=br;e.defineProps=gr;e.defineSSRCustomElement=lf;e.defineSlots=_r;e.devtools=Bc;e.effect=yt;e.effectScope=tt;e.getCurrentInstance=cc;e.getCurrentScope=nt;e.getCurrentWatcher=Yn;e.getTransitionRawChildren=Ws;e.guardReactiveProps=Ja;e.h=Fc;e.handleError=go;e.hasInjectionContext=Zr;e.hydrate=Xf;e.hydrateOnIdle=gi;e.hydrateOnInteraction=_i;e.hydrateOnMediaQuery=bi;e.hydrateOnVisible=yi;e.initCustomFormatter=Lc;e.initDirectivesForSSR=op;e.inject=Qr;e.isMemoSame=Dc;e.isProxy=kn;e.isReactive=Sn;e.isReadonly=Cn;e.isRef=A;e.isRuntimeOnly=Cc;e.isShallow=C;e.isVNode=Ua;e.markRaw=Tn;e.mergeDefaults=Ar;e.mergeModels=$r;e.mergeProps=sc;e.nextTick=To;e.normalizeClass=Te;e.normalizeProps=Ae;e.normalizeStyle=_e;e.onActivated=Ei;e.onBeforeMount=Li;e.onBeforeUnmount=Vi;e.onBeforeUpdate=Di;e.onDeactivated=Ni;e.onErrorCaptured=zi;e.onMounted=ji;e.onRenderTracked=Wi;e.onRenderTriggered=qi;e.onScopeDispose=ot;e.onServerPrefetch=Hi;e.onUnmounted=Bi;e.onUpdated=Ui;e.onWatcherCleanup=Qn;e.openBlock=Ia;e.popScopeId=ps;e.provide=Yr;e.proxyRefs=Fn;e.pushScopeId=fs;e.queuePostFlushCb=No;e.reactive=yn;e.readonly=_n;e.ref=$n;e.registerRuntimeCompiler=Sc;e.render=Jf;e.renderList=tr;e.renderSlot=or;e.resolveComponent=Ji;e.resolveDirective=Qi;e.resolveDynamicComponent=Yi;e.resolveFilter=Wc;e.resolveTransitionHooks=Vs;e.setBlockTracking=Fa;e.setDevtoolsHook=Hc;e.setTransitionHooks=qs;e.shallowReactive=bn;e.shallowReadonly=xn;e.shallowRef=En;e.ssrContextKey=Hl;e.ssrUtils=qc;e.stop=bt;e.toDisplayString=Je;e.toHandlerKey=D;e.toHandlers=ir;e.toRaw=v;e.toRef=Bn;e.toRefs=Dn;e.toValue=Rn;e.transformVNodeArgs=Ha;e.triggerRef=Pn;e.unref=In;e.useAttrs=Cr;e.useCssModule=pf;e.useCssVars=Eu;e.useHost=uf;e.useId=Ks;e.useModel=Ql;e.useSSRContext=ql;e.useShadowRoot=ff;e.useSlots=Sr;e.useTemplateRef=Xs;e.useTransitionState=Is;e.vModelCheckbox=Ef;e.vModelDynamic=Ff;e.vModelRadio=Of;e.vModelSelect=Pf;e.vModelText=$f;e.vShow=Tu;e.version=Uc;e.warn=u;e.watch=Gl;e.watchEffect=Wl;e.watchPostEffect=zl;e.watchSyncEffect=Kl;e.withAsyncContext=Nr;e.withCtx=hs;e.withDefaults=wr;e.withDirectives=gs;e.withKeys=Hf;e.withMemo=jc;e.withModifiers=Vf;e.withScopeId=ds;return e}({});window.Vue=Vue;function build(options,exports){if(typeof exports=="undefined"){exports={}}var _options={resolveModulesParallelly:true,removeStyleWhenUnmount:false,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={};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 o=0;o<t.length;++o){n+=encodeURIComponent(t[o])+"="+encodeURIComponent(e[t[o]])+"&"}if(n[n.length-1]==="&"){n=n.substr(0,n.length-1)}return n}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 o=0;o<n.length;++o){t[n[o]]=e[n[o]]}}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 o=n.split("&");for(var s=0;s<o.length;++s){var i=o[s].split("=");var r=decodeURIComponent(i[0]);var l=decodeURIComponent(i[1]);_fillObjectField(r,l,e)}}function _resolveModules(e,n){if(!e){return Promise.resolve()}if(_options.resolveModulesParallelly){var t=[];for(var o=0;o<e.length;++o){t.push(LoadScript(parseMacroPath(n,e[o])))}return Promise.all(t)}else{var s=Promise.resolve(null);var i=function(t){return function(e){return LoadScript(parseMacroPath(n,t))}};for(var o=0;o<e.length;++o){var r=e[o];s=s.then(i(r))}return s}}function _buildApp(url,params,mobile,parent){var componentObject={};return _httpGet(url+".js").then(function(js){var Page=function(e){componentObject=e};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+".js");hookMountedAndUnmounted(componentObject,url+(mobile?".m":""));return _resolveModules(componentObject.modules||[],url).then(function(){return Promise.resolve(componentObject)})}).then(function(i){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(!i.template){i.template=e}if(i.delayOpen){var t=(new DOMParser).parseFromString(i.template,"text/html");var n=t.querySelector("body").children;for(var o=0;o<n.length;++o){if(n[o].tagName.toUpperCase()!="DIV"){continue}if(n[o].getAttribute("v-if")!=null||n[o].getAttribute("v-else-if")||n[o].getAttribute("v-else")){continue}n[o].classList.add("_pome-ui-opened");n[o].classList.add("_pome-ui-opening")}var s=e.indexOf("<html")>=0?(new XMLSerializer).serializeToString(t):t.querySelector("body").innerHTML;i.template=s}_patchComponent(url,i);return Promise.resolve(i)})}).then(function(l){var o=l.setup;l.setup=function(e,t){if(typeof o=="function"){o(e,t)}var n=Vue.getCurrentInstance();n.$parent=parent||exports.root();n.$root=exports.root()||parent;n.$view=url;n.$app=exports;n.$data=l.data||function(){return{}};n.$created=l.created||function(){};n.$mounted=l.mounted||function(){};n.$unmounted=l.unmounted||function(){};n.$delayClose=l.delayClose||0;_attachContainer(n)};var t=l.data||function(){return{}};l.data=function(){var e=t.call(this,exports);_combineObject(params,e);_parseQueryString(e);return e};return _resolveModules(l.modules,url).then(function(){var e=l.components||[];var i=l.directives||[];var r;return _loadComponents(e,url).then(function(e){var t=Vue.createApp(l);for(var n=0;n<e.length;++n){var o=e[n];t.component(o.name,o.options)}var s=t.mount||function(){};t.mount=function(e){t.proxy=s(e);return t.proxy};r=t;return _loadDirectives(i,url)}).then(function(e){for(var t=0;t<e.length;++t){var n=e[t];r.directive(n.name,n.options)}return Promise.resolve(r)})})})}function _replace(e,t,n){var o=e.indexOf(t);if(o<0){return e}var s=e.substr(0,o)+n+e.substr(o+t.length);return s}function sleep(t){return new Promise(function(e){setTimeout(function(){e()},t)})}function yield(){return sleep(0)}function _attachContainer(o){if(!o){console.warn("Invalid view model")}if(!o.$containers){o.$containers=[]}if(!o.$containers){o.$containers=[]}var n=o.$containers;o.$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(o.proxy){a=o.proxy}if(o.$&&o.$.proxy){a=o.$.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 o=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){o(t.active.$containers[e])}}return n.then(function(){t.active.$forceUpdate();return Promise.resolve(t.active)})};return Promise.resolve(o(c))}var s;var i=20;var r=function(){var e=new Promise(function(e,t){var n=s.mount(c.selector);if(n){c.active=n;return Promise.resolve(n)}if(--i>0){return sleep(50).then(function(){return r()})}else{return Promise.reject("Mount component to "+c.selector+" failed")}});return e};return _buildApp(e,l,t,a).then(function(e){s=e;return r()})})},close:async function(n=true){async function o(e){if(e.active&&e.active.$){if(n){for(var t=0;t<e.active.$containers.length;++t){o(e.active.$containers[t])}}if(e.active.$delayClose){console.log(e.active.$el);try{if(e.active.$el&&e.active.$el.nextElementSibling){e.active.$el.nextElementSibling?.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 o(this)},active:null};n.push(e)}return e}}function Root(i,o,r){i=i||{};if(typeof i.setup!="function"){i.setup=function(){}}var t=i.setup;i.setup=function(){t();var e=Vue.getCurrentInstance();e.$parent=parent||exports.root();e.$root=exports.root()||parent;e.$onUpdating=i.onUpdating;e.$app=exports;if(r){e.$layout=r;e.$view=r}_attachContainer(e)};return _resolveModules(i.modules,r).then(function(){var s;return _loadComponents(i.components||[],r).then(function(e){var t=Vue.createApp(i||{});for(var n=0;n<e.length;++n){var o=e[n];t.component(o.name,o.options)}s=t;return _loadDirectives(i.directives||[],r)}).then(function(e){for(var t=0;t<e.length;++t){var n=e[t];app.directive(n.name,n.options)}_root=s.mount(o);_root.$.proxy=_root})})}function mount(){function o(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 o(e.parentNode)}window.addEventListener("click",function(e){if(!e)return;var t=o(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 o=0;for(var s=0;s<e.length;++s){if(e[s]=="{"&&!o){n=s;o=0}else if(e[s]=="("){++o}else if(e[s]==")"){--o}else if(e[s]=="}"&&!o){t.push(e.substring(n,s+1))}}return t}function n(e){if(e[0]==="{"){return e.substr(1,e.length-2)}else{return e}}function o(e){return e.replace(/[-[\]{}()*+!<=:?.\/\\^$|#\s,]/g,"\\$&")}function s(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 i(){var e=window.location.hash;var t=e.indexOf("?");if(t==-1){return e}return e.substr(0,t)}var r=Object.getOwnPropertyNames(exports._rules);for(var l=0;l<r.length;++l){var a=r[l];var c=a[0]=="#";var u=exports._rules[r[l]];var f=t(a);var p=[];var d=[];for(var h=0;h<f.length;++h){var m=f[h];var g=n(m);regex="([^/]+)";if(g[0]=="*"){regex="(.*)";g=g.substr(1)}if(g.indexOf("=")>0){var v=g.substr(g.indexOf("=")+1);regex=`(${o(v)})`;p.push(g.substr(0,g.indexOf("=")))}else if(m.indexOf(":")>0){regex=m.substr(m.indexOf(":")+1);regex=regex.substr(0,regex.length-1);p.push(g.substr(0,g.indexOf(":")))}else{p.push(g)}d.push(s(regex));a=_replace(a,m,regex)}var y=new RegExp("^"+a+"$");var f=y.exec(c?i()||"#":window.location.pathname);if(f){var b={view:u,params:[]};var _=f;f=[];var x=0;for(var h=1;h<_.length;++h){f.push(_[h]);for(var g=0;g<d[x]-1;++g){++h}++x}var w=f.map(function(e){return decodeURIComponent(e)});for(var h=0;h<p.length;++h){b.params.push({key:p[h],value:w[h]})}return b}}return null}function _fillObjectField(e,t,n){if(!n){return}var o=e.split(".");for(var s=0;s<o.length-1;++s){if(!n[o[s]]){n[o[s]]={}}n=n[o[s]]}n[o[o.length-1]]=t}function _applyLayoutHtml(r){return _httpGet(r+(_options.mobile()?".m.html":".html")).then(function(e){var t=e.indexOf("<html");var n=e.indexOf(">",t);e=e.substr(n+1);var o=e.lastIndexOf("</html>");e=e.substr(0,o);e=_patchTemplate(r,e);document.querySelector("html").innerHTML=e;var s=(new Date).getTime();var i="pomelo-"+s;document.querySelector("body").innerHTML='<div id="'+i+'">'+document.querySelector("body").innerHTML+"</div>";return Promise.resolve(i)})}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 o=t.params[n];_fillObjectField(o.key,o.value,e)}return e}function parseMacroPath(e,t){if(!t){t=""}if(t.indexOf("@")<0){return t}var n="/";var o=e.lastIndexOf("/");if(o>=0){n=e.substr(0,o)}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 o=0;o<t.length;++o){if(typeof t[o]!="string"){continue}var n=parseMacroPath(e,t[o]);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 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 o=t.created;t.created=function(){if(!_css[n]){_css[n]=0}if(_css[n]==0){appendCssReference(n,t.style)}++_css[n];this.createdPromise=Promise.resolve();var e=o.call(this);if(e instanceof Promise){this.createdPromise=e}return e};var e=t.mounted;t.mounted=function(){if(t.delayOpen){var n=this;(n.createdPromise||Promise.resolve()).then(function(){setTimeout(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")}},1);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 e.call(this)};var s=t.unmounted;t.unmounted=function(){if(!_css[n]){return}--_css[n];if(_css[n]<=0){removeCssReference(n);delete _css[n]}return s.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};if(PomeloModule){var require=function(e,t,n){t=t||PomeloModule.getContainingFolder(route.view);return PomeloModule.require(e,t,n)}}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){if(!e.data){e.data=function(){return{}}}var o=e.setup||function(e,t){};e.setup=function(e,t){o(e,t);var n=Vue.getCurrentInstance();n.$app=exports};_opt.template=_layoutHtml;_patchComponent(layout,_opt);_layoutHtml=_opt.template;var t=_layoutHtml.indexOf("<html");var n=_layoutHtml.indexOf(">",t);_layoutHtml=_layoutHtml.substr(n+1);var s=_layoutHtml.lastIndexOf("</html>");_layoutHtml=_layoutHtml.substr(0,s);document.querySelector("html").innerHTML=_layoutHtml;var i=e.data;e.data=function(){var e=i.call(this,exports);_combineObject(params,e);_parseQueryString(e);return e};var r=(new Date).getTime();var l="pomelo-"+r;var a="container-"+r;var c=document.querySelector("body").innerHTML.replace("<render-body></render-body>",'<div id="'+a+'"></div>');document.querySelector("body").innerHTML='<div id="'+l+'">'+c+"</div>";e.template=null;if(!e.mounted){e.mounted=function(){}}mountedFunc=e.mounted;e.mounted=function(){var e=this.$container("#"+a);e.open(route.view,params);return mountedFunc.call(this)};Root(e,"#"+l,layout)};if(PomeloModule){var require=function(e,t,n){t=t||PomeloModule.getContainingFolder(layout);return PomeloModule.require(e,t,n)}}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)};if(PomeloModule){var require=function(e,t,n){t=t||PomeloModule.getContainingFolder(route.view);return PomeloModule.require(e,t,n)}}eval(_def+"\r\n//# sourceURL="+route.view+".js");if(!_opt){_opt={}}if(!_opt.data){_opt.data=function(){return{}}}var dataFunc=_opt.data;_opt.data=function(){var e=dataFunc.call(this,exports);_combineObject(params,e);_parseQueryString(e);return e};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 o=e.substr(t);return resolveRelativePath(o,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||"/");var viewName;var subComponentRefs=[];return Promise.all(components.map(function(c){c=resolveRelativePath(parseMacroPath(viewName,c),workingDirectory);viewName=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};if(PomeloModule){var require=function(e,t,n){t=t||PomeloModule.getContainingFolder(c);return PomeloModule.require(e,t,n)}}eval(comJs+"\r\n//# sourceURL="+c+".js");subComponentRefs=_opt.components;hookMountedAndUnmounted(_opt,c);if(!_opt.template){_opt.template=_html}if(!_opt.setup){_opt.setup=function(){}}var originSetup=_opt.setup;_opt.setup=function(e,t){originSetup(e,t);var n=Vue.getCurrentInstance();n.$app=exports};_patchComponent(c,_opt);var originData=_opt.data||function(){return{}};_opt.data=function(){return originData.call(this,exports)};return _resolveModules(_opt.modules,c)}).then(function(){ret.push({name:_name,options:_opt});return Promise.resolve()})})).then(function(){return _loadComponents(subComponentRefs||[],viewName)}).then(function(e){for(var t=0;t<e.length;++t){var n=e[t];if(ret.filter(e=>e.name==n.name).length){continue}ret.push(n)}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};if(PomeloModule){var require=function(e,t,n){t=t||PomeloModule.getContainingFolder(c);return PomeloModule.require(e,t,n)}}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,i){prepared=true;if(!i.data){i.data=function(){return{}}}if(!i.style){i.style=[]}if(!i.style instanceof Array){if(i.style instanceof String){i.style=[i.style]}else{i.style=["@(css)"]}}if(!i.components){i.components=[]}if(!i.created){i.created=function(){}}if(!i.mounted){i.mounted=function(){}}if(!i.unmounted){i.unmounted=function(){}}if(!i.destroyed){i.destroyed=function(){}}if(!i.watch){i.watch={}}if(!i.computed){i.computed={}}let o=i.data;i.data=function(e){var t=o.call(this,e);var n={pomeUiSubTitles:[]};_combineObject(n,t);return t};if(!i.methods){i.methods={}}i.methods.pomeUiPassTitle=pomeUiPassTitle;if(!i.watch){i.watch={}}if(!i.watch.title){i.watch.title=function(){}}let s=i.watch.title;i.watch.title=async function(){var e=s.call(this);if(!e||!e instanceof Promise){e=Promise.resolve()}var t=this;return e.then(function(){var e=Promise.resolve();t.pomeUiPassTitle();return e})};for(let t=0;t<exports._addins.length;++t){let e=exports._addins[t].view;let s=exports._addins[t].opt;if(e!="*"&&n!=e){continue}if(s.data){let o=i.data;i.data=function(e){var t=o.call(this,e);var n={};try{n=s.data.call(this,e)}catch(e){console.error(e)}_combineObject(n,t);return t}}if(s.style){if(s.style instanceof Boolean){s.style=["@(css)"]}if(s.style instanceof String){s.style=[s.style]}s.style.forEach(function(t){if(!i.style){i.style=[]}if(typeof i.style=="boolean"){i.style=["@(css)"]}if(!i.style.some(e=>e==t)){i.style.push(t)}})}if(s.components){s.components.forEach(function(t){if(!i.components.some(e=>e==t)){i.components.push(t)}})}if(s.layout){i.layout=s.layout}if(s.props){if(!i.props){i.props=[]}s.props.forEach(function(t){if(!i.props.some(e=>e==t)){i.props.push(t)}})}if(s.watch){var r=Object.getOwnPropertyNames(s.watch);r.forEach(function(n){var o=i.watch[n];i.watch[n]=function(e,t){o.invoke(this,e,t);try{s.watch[n].invoke(this,e,t)}catch(e){console.error(e)}}})}if(s.computed){var r=Object.getOwnPropertyNames(s.computed);r.forEach(function(e){i.computed[e]=s.computed[e]})}if(s.methods){var l=i.setup||function(e,t){};i.setup=function(e,t){l(e,t);var n={};var o=Object.getOwnPropertyNames(i.methods);o.forEach(function(e){n[e]=i.methods[e]});var s=Vue.getCurrentInstance();s.$baseMethods=n};var a=Object.getOwnPropertyNames(s.methods);a.forEach(function(e){i.methods[e]=s.methods[e]})}if(s.created){let n=i.created;i.created=async function(){var e=n.call(this);if(!e||!e instanceof Promise){e=Promise.resolve()}var t=this;return e.then(function(){var e;try{e=s.created.call(t)}catch(e){console.error(e)}if(!e instanceof Promise){e=Promise.resolve()}return e})}}if(s.mounted){let n=i.mounted;i.mounted=async function(){var e=n.call(this);if(!e||!e instanceof Promise){e=Promise.resolve()}var t=this;return e.then(function(){var e;try{e=s.mounted.call(t)}catch(e){console.error(e)}if(!e instanceof Promise){e=Promise.resolve()}return e})}}if(s.unmounted){let n=i.unmounted;i.unmounted=async function(){var e=n.call(this);if(!e||!e instanceof Promise){e=Promise.resolve()}var t=this;return e.then(function(){var e;try{e=s.unmounted.call(t)}catch(e){console.error(e)}if(!e instanceof Promise){e=Promise.resolve()}return e})}}if(s.destroyed){let n=i.destroyed;i.destroyed=async function(){var e=n.call(this);if(!e||!e instanceof Promise){e=Promise.resolve()}var t=this;return e.then(function(){var e=s.destroyed.call(t);if(!e instanceof Promise){e=Promise.resolve()}return e})}}if(s.template){if(s.template instanceof Function){if(i.template){if(i.template.indexOf("<html")>=0){var c=(new DOMParser).parseFromString(i.template,"text/html");s.template(c);i.template=(new XMLSerializer).serializeToString(c)}else{i.template=`<pome-ui-template>${i.template}</pome-ui-template>`;var c=(new DOMParser).parseFromString(i.template,"text/html");s.template(c);i.template=(new XMLSerializer).serializeToString(c);i.template=i.template.substr(i.template.indexOf("<pome-ui-template>")+"<pome-ui-template>".length);i.template=i.template.substr(0,i.template.indexOf("</pome-ui-template>"))}}}else{i.template=s.template}}}let u=i.created;i.created=async function(){var e=u.call(this);if(!e||!e instanceof Promise){e=Promise.resolve()}var t=this;return e.then(function(){var e=Promise.resolve();t.pomeUiPassTitle();return e})};let f=i.unmounted;i.unmounted=async function(){var e=f.call(this);if(!e||!e instanceof Promise){e=Promise.resolve()}var t=this;return e.then(function(){var e=Promise.resolve();t.pomeUiPassTitle([]);return e})}}function _patchTemplate(o,s){for(let n=0;n<exports._addins.length;++n){let e=exports._addins[n].view;let t=exports._addins[n].opt;if(e!="*"&&o!=e){continue}if(t.template){if(t.template instanceof Function){if(s.indexOf("<html")>=0){var i=(new DOMParser).parseFromString(s,"text/html");t.template(i);s=(new XMLSerializer).serializeToString(i)}else{s=`<pome-ui-template>${s}</pome-ui-template>`;var i=(new DOMParser).parseFromString(s,"text/html");t.template(i);s=(new XMLSerializer).serializeToString(i);s=s.substr(s.indexOf("<pome-ui-template>")+"<pome-ui-template>".length);s=s.substr(0,s.indexOf("</pome-ui-template>"))}}else{s=t.template}}}return s}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;
30
+ ${o}`:n)}const l=new Function(i)();l._rc=true;return Gg[t]=l}Sc(Jg);e.BaseTransition=Ds;e.BaseTransitionPropsValidators=Ms;e.Comment=te;e.DeprecationTypes=Kc;e.EffectScope=et;e.ErrorCodes=fo;e.ErrorTypeStrings=Vc;e.Fragment=ee;e.KeepAlive=Ai;e.ReactiveEffect=it;e.Static=Na;e.Suspense=va;e.Teleport=$s;e.Text=Ea;e.TrackOpTypes=zn;e.Transition=au;e.TransitionGroup=bf;e.TriggerOpTypes=Kn;e.VueElement=cf;e.assertNumber=uo;e.callWithAsyncErrorHandling=mo;e.callWithErrorHandling=ho;e.camelize=T;e.capitalize=j;e.cloneVNode=Xa;e.compatUtils=zc;e.compile=Jg;e.computed=Mc;e.createApp=Yf;e.createBlock=Da;e.createCommentVNode=ec;e.createElementBlock=ja;e.createElementVNode=Ka;e.createHydrationRenderer=Rl;e.createPropsRestProxy=Er;e.createRenderer=Il;e.createSSRApp=Qf;e.createSlots=nr;e.createStaticVNode=Za;e.createTextVNode=Qa;e.createVNode=ne;e.customRef=jn;e.defineAsyncComponent=Si;e.defineComponent=zs;e.defineCustomElement=rf;e.defineEmits=vr;e.defineExpose=yr;e.defineModel=xr;e.defineOptions=br;e.defineProps=gr;e.defineSSRCustomElement=lf;e.defineSlots=_r;e.devtools=Bc;e.effect=yt;e.effectScope=tt;e.getCurrentInstance=cc;e.getCurrentScope=nt;e.getCurrentWatcher=Yn;e.getTransitionRawChildren=Ws;e.guardReactiveProps=Ja;e.h=Fc;e.handleError=go;e.hasInjectionContext=Zr;e.hydrate=Xf;e.hydrateOnIdle=gi;e.hydrateOnInteraction=_i;e.hydrateOnMediaQuery=bi;e.hydrateOnVisible=yi;e.initCustomFormatter=Lc;e.initDirectivesForSSR=op;e.inject=Qr;e.isMemoSame=Dc;e.isProxy=kn;e.isReactive=Sn;e.isReadonly=Cn;e.isRef=A;e.isRuntimeOnly=Cc;e.isShallow=C;e.isVNode=Ua;e.markRaw=Tn;e.mergeDefaults=Ar;e.mergeModels=$r;e.mergeProps=sc;e.nextTick=To;e.normalizeClass=Te;e.normalizeProps=Ae;e.normalizeStyle=_e;e.onActivated=Ei;e.onBeforeMount=Li;e.onBeforeUnmount=Vi;e.onBeforeUpdate=Di;e.onDeactivated=Ni;e.onErrorCaptured=zi;e.onMounted=ji;e.onRenderTracked=Wi;e.onRenderTriggered=qi;e.onScopeDispose=ot;e.onServerPrefetch=Hi;e.onUnmounted=Bi;e.onUpdated=Ui;e.onWatcherCleanup=Qn;e.openBlock=Ia;e.popScopeId=ps;e.provide=Yr;e.proxyRefs=Fn;e.pushScopeId=fs;e.queuePostFlushCb=No;e.reactive=yn;e.readonly=_n;e.ref=$n;e.registerRuntimeCompiler=Sc;e.render=Jf;e.renderList=tr;e.renderSlot=or;e.resolveComponent=Ji;e.resolveDirective=Qi;e.resolveDynamicComponent=Yi;e.resolveFilter=Wc;e.resolveTransitionHooks=Vs;e.setBlockTracking=Fa;e.setDevtoolsHook=Hc;e.setTransitionHooks=qs;e.shallowReactive=bn;e.shallowReadonly=xn;e.shallowRef=En;e.ssrContextKey=Hl;e.ssrUtils=qc;e.stop=bt;e.toDisplayString=Je;e.toHandlerKey=D;e.toHandlers=ir;e.toRaw=v;e.toRef=Bn;e.toRefs=Dn;e.toValue=Rn;e.transformVNodeArgs=Ha;e.triggerRef=Pn;e.unref=In;e.useAttrs=Cr;e.useCssModule=pf;e.useCssVars=Eu;e.useHost=uf;e.useId=Ks;e.useModel=Ql;e.useSSRContext=ql;e.useShadowRoot=ff;e.useSlots=Sr;e.useTemplateRef=Xs;e.useTransitionState=Is;e.vModelCheckbox=Ef;e.vModelDynamic=Ff;e.vModelRadio=Of;e.vModelSelect=Pf;e.vModelText=$f;e.vShow=Tu;e.version=Uc;e.warn=u;e.watch=Gl;e.watchEffect=Wl;e.watchPostEffect=zl;e.watchSyncEffect=Kl;e.withAsyncContext=Nr;e.withCtx=hs;e.withDefaults=wr;e.withDirectives=gs;e.withKeys=Hf;e.withMemo=jc;e.withModifiers=Vf;e.withScopeId=ds;return e}({});window.Vue=Vue;function build(options,exports){if(typeof exports=="undefined"){exports={}}var _options={resolveModulesParallelly:true,removeStyleWhenUnmount:false,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={};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 o=0;o<t.length;++o){n+=encodeURIComponent(t[o])+"="+encodeURIComponent(e[t[o]])+"&"}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 o=t[n].toString();var s=_addHyphenBeforeUppercase(o);e=e.replaceAll(":"+o+"=",":"+s+"=")}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 o=0;o<n.length;++o){t[n[o]]=e[n[o]]}}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 o=n.split("&");for(var s=0;s<o.length;++s){var i=o[s].split("=");var r=decodeURIComponent(i[0]);var l=decodeURIComponent(i[1]);_fillObjectField(r,l,e)}}function _resolveModules(e,n){if(!e){return Promise.resolve()}if(_options.resolveModulesParallelly){var t=[];for(var o=0;o<e.length;++o){t.push(LoadScript(parseMacroPath(n,e[o])))}return Promise.all(t)}else{var s=Promise.resolve(null);var i=function(t){return function(e){return LoadScript(parseMacroPath(n,t))}};for(var o=0;o<e.length;++o){var r=e[o];s=s.then(i(r))}return s}}function _buildApp(url,params,mobile,parent){var componentObject={};return _httpGet(url+".js").then(function(js){var Page=function(e){componentObject=e};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+".js");hookMountedAndUnmounted(componentObject,url+(mobile?".m":""));return _resolveModules(componentObject.modules||[],url).then(function(){return Promise.resolve(componentObject)})}).then(function(i){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(!i.template){i.template=e}if(i.delayOpen){var t=(new DOMParser).parseFromString(i.template,"text/html");var n=t.querySelector("body").children;for(var o=0;o<n.length;++o){if(n[o].tagName.toUpperCase()!="DIV"){continue}if(n[o].getAttribute("v-if")!=null||n[o].getAttribute("v-else-if")||n[o].getAttribute("v-else")){continue}n[o].classList.add("_pome-ui-opened");n[o].classList.add("_pome-ui-opening")}var s=e.indexOf("<html")>=0?(new XMLSerializer).serializeToString(t):t.querySelector("body").innerHTML;i.template=s}_patchComponent(url,i);return Promise.resolve(i)})}).then(function(l){var o=l.setup;l.setup=function(e,t){if(typeof o=="function"){o(e,t)}var n=Vue.getCurrentInstance();n.$parent=parent||exports.root();n.$root=exports.root()||parent;n.$view=url;n.$app=exports;n.$data=l.data||function(){return{}};n.$created=l.created||function(){};n.$mounted=l.mounted||function(){};n.$unmounted=l.unmounted||function(){};n.$delayClose=l.delayClose||0;_attachContainer(n)};var t=l.data||function(){return{}};l.data=function(){var e=t.call(this,exports);_combineObject(params,e);_parseQueryString(e);return e};return _resolveModules(l.modules,url).then(function(){var e=l.components||[];var i=l.directives||[];var r;return _loadComponents(e,url).then(function(e){var t=Vue.createApp(l);for(var n=0;n<e.length;++n){var o=e[n];t.component(o.name,o.options)}var s=t.mount||function(){};t.mount=function(e){t.proxy=s(e);return t.proxy};r=t;return _loadDirectives(i,url)}).then(function(e){for(var t=0;t<e.length;++t){var n=e[t];r.directive(n.name,n.options)}return Promise.resolve(r)})})})}function _replace(e,t,n){var o=e.indexOf(t);if(o<0){return e}var s=e.substr(0,o)+n+e.substr(o+t.length);return s}function sleep(t){return new Promise(function(e){setTimeout(function(){e()},t)})}function yield(){return sleep(0)}function _attachContainer(o){if(!o){console.warn("Invalid view model")}if(!o.$containers){o.$containers=[]}if(!o.$containers){o.$containers=[]}var n=o.$containers;o.$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(o.proxy){a=o.proxy}if(o.$&&o.$.proxy){a=o.$.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 o=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){o(t.active.$containers[e])}}return n.then(function(){t.active.$forceUpdate();return Promise.resolve(t.active)})};return Promise.resolve(o(c))}var s;var i=20;var r=function(){var e=new Promise(function(e,t){var n=s.mount(c.selector);if(n){c.active=n;return Promise.resolve(n)}if(--i>0){return sleep(50).then(function(){return r()})}else{return Promise.reject("Mount component to "+c.selector+" failed")}});return e};return _buildApp(e,l,t,a).then(function(e){s=e;return r()})})},close:async function(n=true){async function o(e){if(e.active&&e.active.$){if(n){for(var t=0;t<e.active.$containers.length;++t){o(e.active.$containers[t])}}if(e.active.$delayClose){console.log(e.active.$el);try{if(e.active.$el&&e.active.$el.nextElementSibling){e.active.$el.nextElementSibling?.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 o(this)},active:null};n.push(e)}return e}}function Root(i,o,r){i=i||{};if(typeof i.setup!="function"){i.setup=function(){}}var t=i.setup;i.setup=function(){t();var e=Vue.getCurrentInstance();e.$parent=parent||exports.root();e.$root=exports.root()||parent;e.$onUpdating=i.onUpdating;e.$app=exports;if(r){e.$layout=r;e.$view=r}_attachContainer(e)};return _resolveModules(i.modules,r).then(function(){var s;return _loadComponents(i.components||[],r).then(function(e){var t=Vue.createApp(i||{});for(var n=0;n<e.length;++n){var o=e[n];t.component(o.name,o.options)}s=t;return _loadDirectives(i.directives||[],r)}).then(function(e){for(var t=0;t<e.length;++t){var n=e[t];app.directive(n.name,n.options)}_root=s.mount(o);_root.$.proxy=_root})})}function mount(){function o(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 o(e.parentNode)}window.addEventListener("click",function(e){if(!e)return;var t=o(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 o=0;for(var s=0;s<e.length;++s){if(e[s]=="{"&&!o){n=s;o=0}else if(e[s]=="("){++o}else if(e[s]==")"){--o}else if(e[s]=="}"&&!o){t.push(e.substring(n,s+1))}}return t}function n(e){if(e[0]==="{"){return e.substr(1,e.length-2)}else{return e}}function o(e){return e.replace(/[-[\]{}()*+!<=:?.\/\\^$|#\s,]/g,"\\$&")}function s(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 i(){var e=window.location.hash;var t=e.indexOf("?");if(t==-1){return e}return e.substr(0,t)}var r=Object.getOwnPropertyNames(exports._rules);for(var l=0;l<r.length;++l){var a=r[l];var c=a[0]=="#";var u=exports._rules[r[l]];var f=t(a);var p=[];var d=[];for(var h=0;h<f.length;++h){var m=f[h];var g=n(m);regex="([^/]+)";if(g[0]=="*"){regex="(.*)";g=g.substr(1)}if(g.indexOf("=")>0){var v=g.substr(g.indexOf("=")+1);regex=`(${o(v)})`;p.push(g.substr(0,g.indexOf("=")))}else if(m.indexOf(":")>0){regex=m.substr(m.indexOf(":")+1);regex=regex.substr(0,regex.length-1);p.push(g.substr(0,g.indexOf(":")))}else{p.push(g)}d.push(s(regex));a=_replace(a,m,regex)}var y=new RegExp("^"+a+"$");var f=y.exec(c?i()||"#":window.location.pathname);if(f){var b={view:u,params:[]};var _=f;f=[];var x=0;for(var h=1;h<_.length;++h){f.push(_[h]);for(var g=0;g<d[x]-1;++g){++h}++x}var w=f.map(function(e){return decodeURIComponent(e)});for(var h=0;h<p.length;++h){b.params.push({key:p[h],value:w[h]})}return b}}return null}function _fillObjectField(e,t,n){if(!n){return}var o=e.split(".");for(var s=0;s<o.length-1;++s){if(!n[o[s]]){n[o[s]]={}}n=n[o[s]]}n[o[o.length-1]]=t}function _applyLayoutHtml(r){return _httpGet(r+(_options.mobile()?".m.html":".html")).then(function(e){var t=e.indexOf("<html");var n=e.indexOf(">",t);e=e.substr(n+1);var o=e.lastIndexOf("</html>");e=e.substr(0,o);e=_patchTemplate(r,e);document.querySelector("html").innerHTML=e;var s=(new Date).getTime();var i="pomelo-"+s;document.querySelector("body").innerHTML='<div id="'+i+'">'+document.querySelector("body").innerHTML+"</div>";return Promise.resolve(i)})}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 o=t.params[n];_fillObjectField(o.key,o.value,e)}return e}function parseMacroPath(e,t){if(!t){t=""}if(t.indexOf("@")<0){return t}var n="/";var o=e.lastIndexOf("/");if(o>=0){n=e.substr(0,o)}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 o=0;o<t.length;++o){if(typeof t[o]!="string"){continue}var n=parseMacroPath(e,t[o]);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 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 o=t.created;t.created=function(){if(!_css[n]){_css[n]=0}if(_css[n]==0){appendCssReference(n,t.style)}++_css[n];this.createdPromise=Promise.resolve();var e=o.call(this);if(e instanceof Promise){this.createdPromise=e}return e};var e=t.mounted;t.mounted=function(){if(t.delayOpen){var n=this;(n.createdPromise||Promise.resolve()).then(function(){setTimeout(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")}},1);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 e.call(this)};var s=t.unmounted;t.unmounted=function(){if(!_css[n]){return}--_css[n];if(_css[n]<=0){removeCssReference(n);delete _css[n]}return s.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};if(PomeloModule){var require=function(e,t,n){t=t||PomeloModule.getContainingFolder(route.view);return PomeloModule.require(e,t,n)}}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){if(!e.data){e.data=function(){return{}}}var o=e.setup||function(e,t){};e.setup=function(e,t){o(e,t);var n=Vue.getCurrentInstance();n.$app=exports};_opt.template=_layoutHtml;_patchComponent(layout,_opt);_layoutHtml=_opt.template;var t=_layoutHtml.indexOf("<html");var n=_layoutHtml.indexOf(">",t);_layoutHtml=_layoutHtml.substr(n+1);var s=_layoutHtml.lastIndexOf("</html>");_layoutHtml=_layoutHtml.substr(0,s);document.querySelector("html").innerHTML=_layoutHtml;var i=e.data;e.data=function(){var e=i.call(this,exports);_combineObject(params,e);_parseQueryString(e);return e};var r=(new Date).getTime();var l="pomelo-"+r;var a="container-"+r;var c=document.querySelector("body").innerHTML.replace("<render-body></render-body>",'<div id="'+a+'"></div>');document.querySelector("body").innerHTML='<div id="'+l+'">'+c+"</div>";e.template=null;if(!e.mounted){e.mounted=function(){}}mountedFunc=e.mounted;e.mounted=function(){var e=this.$container("#"+a);e.open(route.view,params);return mountedFunc.call(this)};Root(e,"#"+l,layout)};if(PomeloModule){var require=function(e,t,n){t=t||PomeloModule.getContainingFolder(layout);return PomeloModule.require(e,t,n)}}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)};if(PomeloModule){var require=function(e,t,n){t=t||PomeloModule.getContainingFolder(route.view);return PomeloModule.require(e,t,n)}}eval(_def+"\r\n//# sourceURL="+route.view+".js");if(!_opt){_opt={}}if(!_opt.data){_opt.data=function(){return{}}}var dataFunc=_opt.data;_opt.data=function(){var e=dataFunc.call(this,exports);_combineObject(params,e);_parseQueryString(e);return e};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 o=e.substr(t);return resolveRelativePath(o,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||"/");var viewName;var subComponentRefs=[];return Promise.all(components.map(function(c){c=resolveRelativePath(parseMacroPath(viewName,c),workingDirectory);viewName=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};if(PomeloModule){var require=function(e,t,n){t=t||PomeloModule.getContainingFolder(c);return PomeloModule.require(e,t,n)}}eval(comJs+"\r\n//# sourceURL="+c+".js");subComponentRefs=_opt.components;hookMountedAndUnmounted(_opt,c);if(!_opt.template){_opt.template=_html}if(!_opt.setup){_opt.setup=function(){}}var originSetup=_opt.setup;_opt.setup=function(e,t){originSetup(e,t);var n=Vue.getCurrentInstance();n.$app=exports};_patchComponent(c,_opt);var originData=_opt.data||function(){return{}};_opt.data=function(){return originData.call(this,exports)};return _resolveModules(_opt.modules,c)}).then(function(){ret.push({name:_name,options:_opt});return Promise.resolve()})})).then(function(){return _loadComponents(subComponentRefs||[],viewName)}).then(function(e){for(var t=0;t<e.length;++t){var n=e[t];if(ret.filter(e=>e.name==n.name).length){continue}ret.push(n)}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};if(PomeloModule){var require=function(e,t,n){t=t||PomeloModule.getContainingFolder(c);return PomeloModule.require(e,t,n)}}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,i){prepared=true;if(!i.data){i.data=function(){return{}}}if(!i.style){i.style=[]}if(!i.style instanceof Array){if(i.style instanceof String){i.style=[i.style]}else{i.style=["@(css)"]}}if(!i.components){i.components=[]}if(!i.created){i.created=function(){}}if(!i.mounted){i.mounted=function(){}}if(!i.unmounted){i.unmounted=function(){}}if(!i.destroyed){i.destroyed=function(){}}if(!i.watch){i.watch={}}if(!i.computed){i.computed={}}let o=i.data;i.data=function(e){var t=o.call(this,e);var n={pomeUiSubTitles:[]};_combineObject(n,t);return t};if(!i.methods){i.methods={}}i.methods.pomeUiPassTitle=pomeUiPassTitle;if(!i.watch){i.watch={}}if(!i.watch.title){i.watch.title=function(){}}let s=i.watch.title;i.watch.title=async function(){var e=s.call(this);if(!e||!e instanceof Promise){e=Promise.resolve()}var t=this;return e.then(function(){var e=Promise.resolve();t.pomeUiPassTitle();return e})};for(let t=0;t<exports._addins.length;++t){let e=exports._addins[t].view;let s=exports._addins[t].opt;if(e!="*"&&n!=e){continue}if(s.data){let o=i.data;i.data=function(e){var t=o.call(this,e);var n={};try{n=s.data.call(this,e)}catch(e){console.error(e)}_combineObject(n,t);return t}}if(s.style){if(s.style instanceof Boolean){s.style=["@(css)"]}if(s.style instanceof String){s.style=[s.style]}s.style.forEach(function(t){if(!i.style){i.style=[]}if(typeof i.style=="boolean"){i.style=["@(css)"]}if(!i.style.some(e=>e==t)){i.style.push(t)}})}if(s.components){s.components.forEach(function(t){if(!i.components.some(e=>e==t)){i.components.push(t)}})}if(s.layout){i.layout=s.layout}if(s.props){if(!i.props){i.props=[]}s.props.forEach(function(t){if(!i.props.some(e=>e==t)){i.props.push(t)}})}if(s.watch){var r=Object.getOwnPropertyNames(s.watch);r.forEach(function(n){var o=i.watch[n];i.watch[n]=function(e,t){o.invoke(this,e,t);try{s.watch[n].invoke(this,e,t)}catch(e){console.error(e)}}})}if(s.computed){var r=Object.getOwnPropertyNames(s.computed);r.forEach(function(e){i.computed[e]=s.computed[e]})}if(s.methods){var l=i.setup||function(e,t){};i.setup=function(e,t){l(e,t);var n={};var o=Object.getOwnPropertyNames(i.methods);o.forEach(function(e){n[e]=i.methods[e]});var s=Vue.getCurrentInstance();s.$baseMethods=n};var a=Object.getOwnPropertyNames(s.methods);a.forEach(function(e){i.methods[e]=s.methods[e]})}if(s.created){let n=i.created;i.created=async function(){var e=n.call(this);if(!e||!e instanceof Promise){e=Promise.resolve()}var t=this;return e.then(function(){var e;try{e=s.created.call(t)}catch(e){console.error(e)}if(!e instanceof Promise){e=Promise.resolve()}return e})}}if(s.mounted){let n=i.mounted;i.mounted=async function(){var e=n.call(this);if(!e||!e instanceof Promise){e=Promise.resolve()}var t=this;return e.then(function(){var e;try{e=s.mounted.call(t)}catch(e){console.error(e)}if(!e instanceof Promise){e=Promise.resolve()}return e})}}if(s.unmounted){let n=i.unmounted;i.unmounted=async function(){var e=n.call(this);if(!e||!e instanceof Promise){e=Promise.resolve()}var t=this;return e.then(function(){var e;try{e=s.unmounted.call(t)}catch(e){console.error(e)}if(!e instanceof Promise){e=Promise.resolve()}return e})}}if(s.destroyed){let n=i.destroyed;i.destroyed=async function(){var e=n.call(this);if(!e||!e instanceof Promise){e=Promise.resolve()}var t=this;return e.then(function(){var e=s.destroyed.call(t);if(!e instanceof Promise){e=Promise.resolve()}return e})}}if(s.template){if(s.template instanceof Function){if(i.template){if(i.template.indexOf("<html")>=0){var c=(new DOMParser).parseFromString(_sanitizeTemplate(i.template),"text/html");s.template(c);i.template=(new XMLSerializer).serializeToString(c)}else{i.template=`<pome-ui-template>${i.template}</pome-ui-template>`;var c=(new DOMParser).parseFromString(_sanitizeTemplate(i.template),"text/html");s.template(c);i.template=(new XMLSerializer).serializeToString(c);i.template=i.template.substr(i.template.indexOf("<pome-ui-template>")+"<pome-ui-template>".length);i.template=i.template.substr(0,i.template.indexOf("</pome-ui-template>"))}}}else{i.template=s.template}}}let u=i.created;i.created=async function(){var e=u.call(this);if(!e||!e instanceof Promise){e=Promise.resolve()}var t=this;return e.then(function(){var e=Promise.resolve();t.pomeUiPassTitle();return e})};let f=i.unmounted;i.unmounted=async function(){var e=f.call(this);if(!e||!e instanceof Promise){e=Promise.resolve()}var t=this;return e.then(function(){var e=Promise.resolve();t.pomeUiPassTitle([]);return e})}}function _patchTemplate(o,s){for(let n=0;n<exports._addins.length;++n){let e=exports._addins[n].view;let t=exports._addins[n].opt;if(e!="*"&&o!=e){continue}if(t.template){if(t.template instanceof Function){if(s.indexOf("<html")>=0){var i=(new DOMParser).parseFromString(_sanitizeTemplate(s),"text/html");t.template(i);s=(new XMLSerializer).serializeToString(i)}else{s=`<pome-ui-template>${s}</pome-ui-template>`;var i=(new DOMParser).parseFromString(_sanitizeTemplate(s),"text/html");t.template(i);s=(new XMLSerializer).serializeToString(i);s=s.substr(s.indexOf("<pome-ui-template>")+"<pome-ui-template>".length);s=s.substr(0,s.indexOf("</pome-ui-template>"))}}else{s=t.template}}}return s}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;
package/pome-ui.js CHANGED
@@ -133,6 +133,28 @@ function build(options, exports) {
133
133
 
134
134
  return str;
135
135
  }
136
+ function _addHyphenBeforeUppercase(str) {
137
+ var ret = str.replace(/([A-Z])/g, '-$1').toLowerCase();
138
+ while (ret.length && ret[0] == '-') {
139
+ ret = ret.substr(1);
140
+ }
141
+ return ret;
142
+ }
143
+
144
+ function _sanitizeTemplate(template) {
145
+ if (!template instanceof String) {
146
+ return template;
147
+ }
148
+
149
+ var result = [...template.matchAll(/(?<=:)[a-zA-Z0-9-_]{1,}(?=\=")/g)];
150
+ for (var i = 0; i < result.length; ++i) {
151
+ var propertyName = result[i].toString();
152
+ var sanitizedPropertyName = _addHyphenBeforeUppercase(propertyName);
153
+ template = template.replaceAll(':' + propertyName + '=', ':' + sanitizedPropertyName + '=');
154
+ }
155
+
156
+ return template;
157
+ }
136
158
 
137
159
  var _root = null;
138
160
  function root() {
@@ -1727,12 +1749,12 @@ function build(options, exports) {
1727
1749
  if (addin.template instanceof Function) {
1728
1750
  if (opt.template) {
1729
1751
  if (opt.template.indexOf('<html') >= 0) {
1730
- var template = new DOMParser().parseFromString(opt.template, 'text/html');
1752
+ var template = new DOMParser().parseFromString(_sanitizeTemplate(opt.template), 'text/html');
1731
1753
  addin.template(template);
1732
1754
  opt.template = new XMLSerializer().serializeToString(template);
1733
1755
  } else {
1734
1756
  opt.template = `<pome-ui-template>${opt.template}</pome-ui-template>`
1735
- var template = new DOMParser().parseFromString(opt.template, 'text/html');
1757
+ var template = new DOMParser().parseFromString(_sanitizeTemplate(opt.template), 'text/html');
1736
1758
  addin.template(template);
1737
1759
  opt.template = new XMLSerializer().serializeToString(template);
1738
1760
  opt.template = opt.template.substr(opt.template.indexOf('<pome-ui-template>') + '<pome-ui-template>'.length);
@@ -1787,12 +1809,12 @@ function build(options, exports) {
1787
1809
  if (addin.template) {
1788
1810
  if (addin.template instanceof Function) {
1789
1811
  if (html.indexOf('<html') >= 0) {
1790
- var template = new DOMParser().parseFromString(html, 'text/html');
1812
+ var template = new DOMParser().parseFromString(_sanitizeTemplate(html), 'text/html');
1791
1813
  addin.template(template);
1792
1814
  html = new XMLSerializer().serializeToString(template);
1793
1815
  } else {
1794
1816
  html = `<pome-ui-template>${html}</pome-ui-template>`
1795
- var template = new DOMParser().parseFromString(html, 'text/html');
1817
+ var template = new DOMParser().parseFromString(_sanitizeTemplate(html), 'text/html');
1796
1818
  addin.template(template);
1797
1819
  html = new XMLSerializer().serializeToString(template);
1798
1820
  html = html.substr(html.indexOf('<pome-ui-template>') + '<pome-ui-template>'.length);