@mantou/gem 1.7.1 → 1.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/dist/gem.es.js +367 -369
  2. package/dist/gem.umd.js +24 -28
  3. package/elements/base/dialog.d.ts +7 -7
  4. package/elements/base/dialog.d.ts.map +1 -1
  5. package/elements/base/dialog.js +10 -3
  6. package/elements/base/dialog.js.map +1 -1
  7. package/elements/base/gesture.d.ts +4 -13
  8. package/elements/base/gesture.d.ts.map +1 -1
  9. package/elements/base/gesture.js +151 -134
  10. package/elements/base/gesture.js.map +1 -1
  11. package/elements/base/link.d.ts +10 -10
  12. package/elements/base/link.d.ts.map +1 -1
  13. package/elements/base/link.js +69 -63
  14. package/elements/base/link.js.map +1 -1
  15. package/elements/base/modal-factory.d.ts +117 -83
  16. package/elements/base/modal-factory.d.ts.map +1 -1
  17. package/elements/base/modal-factory.js +12 -8
  18. package/elements/base/modal-factory.js.map +1 -1
  19. package/elements/base/reflect.js.map +1 -1
  20. package/elements/base/route.d.ts +12 -5
  21. package/elements/base/route.d.ts.map +1 -1
  22. package/elements/base/route.js +16 -4
  23. package/elements/base/route.js.map +1 -1
  24. package/elements/base/title.d.ts +3 -1
  25. package/elements/base/title.d.ts.map +1 -1
  26. package/elements/base/title.js +14 -16
  27. package/elements/base/title.js.map +1 -1
  28. package/elements/base/unsafe.js.map +1 -1
  29. package/elements/base/use.d.ts +1 -1
  30. package/elements/base/use.d.ts.map +1 -1
  31. package/elements/base/use.js +27 -17
  32. package/elements/base/use.js.map +1 -1
  33. package/helper/i18n.d.ts +2 -2
  34. package/helper/i18n.d.ts.map +1 -1
  35. package/helper/i18n.js.map +1 -1
  36. package/helper/mediaquery.d.ts +16 -18
  37. package/helper/mediaquery.d.ts.map +1 -1
  38. package/helper/mediaquery.js +42 -41
  39. package/helper/mediaquery.js.map +1 -1
  40. package/helper/request.d.ts +1 -1
  41. package/helper/request.d.ts.map +1 -1
  42. package/helper/request.js.map +1 -1
  43. package/helper/ssr-shim.js.map +1 -1
  44. package/helper/theme.d.ts +2 -2
  45. package/helper/theme.d.ts.map +1 -1
  46. package/helper/theme.js +20 -24
  47. package/helper/theme.js.map +1 -1
  48. package/lib/decorators.d.ts +4 -4
  49. package/lib/decorators.d.ts.map +1 -1
  50. package/lib/decorators.js +1 -2
  51. package/lib/decorators.js.map +1 -1
  52. package/lib/element.d.ts +5 -7
  53. package/lib/element.d.ts.map +1 -1
  54. package/lib/element.js +46 -71
  55. package/lib/element.js.map +1 -1
  56. package/lib/history.d.ts +1 -1
  57. package/lib/history.d.ts.map +1 -1
  58. package/lib/history.js +2 -2
  59. package/lib/history.js.map +1 -1
  60. package/lib/store.d.ts +2 -2
  61. package/lib/store.d.ts.map +1 -1
  62. package/lib/store.js.map +1 -1
  63. package/lib/utils.d.ts +8 -32
  64. package/lib/utils.d.ts.map +1 -1
  65. package/lib/utils.js +7 -22
  66. package/lib/utils.js.map +1 -1
  67. package/lib/version.d.ts +1 -1
  68. package/lib/version.js +1 -1
  69. package/package.json +2 -2
  70. package/src/elements/base/dialog.ts +8 -3
  71. package/src/elements/base/gesture.ts +51 -45
  72. package/src/elements/base/link.ts +64 -62
  73. package/src/elements/base/modal-factory.ts +5 -0
  74. package/src/elements/base/route.ts +21 -4
  75. package/src/elements/base/title.ts +8 -11
  76. package/src/elements/base/use.ts +3 -3
  77. package/src/helper/mediaquery.ts +43 -42
  78. package/src/helper/theme.ts +22 -24
  79. package/src/lib/decorators.ts +1 -2
  80. package/src/lib/element.ts +38 -63
  81. package/src/lib/history.ts +2 -1
  82. package/src/lib/utils.ts +11 -43
  83. package/src/lib/version.ts +1 -1
  84. package/src/test/gem-element/advance.test.ts +16 -8
  85. package/src/test/history.test.ts +3 -1
  86. package/src/test/utils.test.ts +8 -1
package/dist/gem.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- var fi=Object.defineProperty,mi=Object.defineProperties;var pi=Object.getOwnPropertyDescriptors;var ss=Object.getOwnPropertySymbols;var gi=Object.prototype.hasOwnProperty,yi=Object.prototype.propertyIsEnumerable;var is=(o,f,y)=>f in o?fi(o,f,{enumerable:!0,configurable:!0,writable:!0,value:y}):o[f]=y,C=(o,f)=>{for(var y in f||(f={}))gi.call(f,y)&&is(o,y,f[y]);if(ss)for(var y of ss(f))yi.call(f,y)&&is(o,y,f[y]);return o},We=(o,f)=>mi(o,pi(f));var Jt=(o,f,y)=>{if(!f.has(o))throw TypeError("Cannot "+y)};var m=(o,f,y)=>(Jt(o,f,"read from private field"),y?y.call(o):f.get(o)),$=(o,f,y)=>{if(f.has(o))throw TypeError("Cannot add the same private member more than once");f instanceof WeakSet?f.add(o):f.set(o,y)},G=(o,f,y,Y)=>(Jt(o,f,"write to private field"),Y?Y.call(o,y):f.set(o,y),y);var mt=(o,f,y)=>(Jt(o,f,"access private method"),y);(function(o,f){typeof exports=="object"&&typeof module!="undefined"?f(exports):typeof define=="function"&&define.amd?define(["exports"],f):(o=typeof globalThis!="undefined"?globalThis:o||self,f(o.Gem={}))})(this,function(o){var ie,re,ae,Ee,Qt,_e,ut,ce,pt,ts,Se,ve,le,ns,be,Yt,dt,wi,ft,Ei,he,gt,Pe,Zt;"use strict";var f=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",get GemElement(){return A},get defineAttribute(){return Xe},get defineProperty(){return pe},get defineRef(){return et},get defineCSSState(){return tt},get nativeDefineElement(){return nt},get html(){return N},get svg(){return fn},get render(){return je},get directive(){return Y},get TemplateResult(){return ke},get SVGTemplateResult(){return Et},get repeat(){return Cn},get guard(){return kn},get ifDefined(){return Nt}});/**
1
+ var nn=(o,E,L)=>{if(!E.has(o))throw TypeError("Cannot "+L)};var f=(o,E,L)=>(nn(o,E,"read from private field"),L?L.call(o):E.get(o)),w=(o,E,L)=>{if(E.has(o))throw TypeError("Cannot add the same private member more than once");E instanceof WeakSet?E.add(o):E.set(o,L)},T=(o,E,L,Q)=>(nn(o,E,"write to private field"),Q?Q.call(o,L):E.set(o,L),L);var sn=(o,E,L)=>(nn(o,E,"access private method"),L);(function(o,E){typeof exports=="object"&&typeof module!="undefined"?E(exports):typeof define=="function"&&define.amd?define(["exports"],E):(o=typeof globalThis!="undefined"?globalThis:o||self,E(o.Gem={}))})(this,function(o){var se,ie,oe,je,rn,Ee,Et,ae,Be,_t,us,De,qe,Ue,ls,xe,_e,ve,ce,hs,Se,bt,vt,ds,St,fs,le,Fe,be,Pt;"use strict";var E=Object.freeze(Object.defineProperty({__proto__:null,get GemElement(){return N},get defineAttribute(){return at},get defineProperty(){return pe},get defineRef(){return ct},get defineCSSState(){return lt},get nativeDefineElement(){return ht},get html(){return V},get svg(){return En},get render(){return ze},get directive(){return Q},get TemplateResult(){return Ce},get SVGTemplateResult(){return kt},get repeat(){return On},get guard(){return Rn},get ifDefined(){return Wt}},Symbol.toStringTag,{value:"Module"}));/**
2
2
  * @license
3
3
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
4
4
  * This code may only be used under the BSD style license found at
@@ -10,7 +10,7 @@ var fi=Object.defineProperty,mi=Object.defineProperties;var pi=Object.getOwnProp
10
10
  * Code distributed by Google as part of the polymer project is also
11
11
  * subject to an additional IP rights grant found at
12
12
  * http://polymer.github.io/PATENTS.txt
13
- */const y=new WeakMap,Y=n=>(...e)=>{const t=n(...e);return y.set(t,!0),t},Te=n=>typeof n=="function"&&y.has(n);/**
13
+ */const L=new WeakMap,Q=n=>(...e)=>{const t=n(...e);return L.set(t,!0),t},Pe=n=>typeof n=="function"&&L.has(n);/**
14
14
  * @license
15
15
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
16
16
  * This code may only be used under the BSD style license found at
@@ -22,7 +22,7 @@ var fi=Object.defineProperty,mi=Object.defineProperties;var pi=Object.getOwnProp
22
22
  * Code distributed by Google as part of the polymer project is also
23
23
  * subject to an additional IP rights grant found at
24
24
  * http://polymer.github.io/PATENTS.txt
25
- */const Xt=typeof window!="undefined"&&window.customElements!=null&&window.customElements.polyfillWrapFlushCallback!==void 0,en=(n,e,t=null,s=null)=>{for(;e!==t;){const i=e.nextSibling;n.insertBefore(e,s),e=i}},yt=(n,e,t=null)=>{for(;e!==t;){const s=e.nextSibling;n.removeChild(e),e=s}};/**
25
+ */const on=typeof window!="undefined"&&window.customElements!=null&&window.customElements.polyfillWrapFlushCallback!==void 0,an=(n,e,t=null,s=null)=>{for(;e!==t;){const i=e.nextSibling;n.insertBefore(e,s),e=i}},Tt=(n,e,t=null)=>{for(;e!==t;){const s=e.nextSibling;n.removeChild(e),e=s}};/**
26
26
  * @license
27
27
  * Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
28
28
  * This code may only be used under the BSD style license found at
@@ -34,7 +34,7 @@ var fi=Object.defineProperty,mi=Object.defineProperties;var pi=Object.getOwnProp
34
34
  * Code distributed by Google as part of the polymer project is also
35
35
  * subject to an additional IP rights grant found at
36
36
  * http://polymer.github.io/PATENTS.txt
37
- */const W={},tn={};/**
37
+ */const W={},cn={};/**
38
38
  * @license
39
39
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
40
40
  * This code may only be used under the BSD style license found at
@@ -46,7 +46,7 @@ var fi=Object.defineProperty,mi=Object.defineProperties;var pi=Object.getOwnProp
46
46
  * Code distributed by Google as part of the polymer project is also
47
47
  * subject to an additional IP rights grant found at
48
48
  * http://polymer.github.io/PATENTS.txt
49
- */const Z=`{{lit-${String(Math.random()).slice(2)}}}`,nn=`<!--${Z}-->`,sn=new RegExp(`${Z}|${nn}`),Ce="$lit$";class rs{constructor(e,t){this.parts=[],this.element=t;const s=[],i=[],r=document.createTreeWalker(t.content,133,null,!1);let a=0,c=-1,l=0;const{strings:h,values:{length:p}}=e;for(;l<p;){const u=r.nextNode();if(u===null){r.currentNode=i.pop();continue}if(c++,u.nodeType===1){if(u.hasAttributes()){const _=u.attributes,{length:w}=_;let E=0;for(let g=0;g<w;g++)rn(_[g].name,Ce)&&E++;for(;E-- >0;){const g=h[l],v=wt.exec(g)[2],P=v.toLowerCase()+Ce,B=u.getAttribute(P);u.removeAttribute(P);const V=B.split(sn);this.parts.push({type:"attribute",index:c,name:v,strings:V}),l+=V.length-1}}u.tagName==="TEMPLATE"&&(i.push(u),r.currentNode=u.content)}else if(u.nodeType===3){const _=u.data;if(_.indexOf(Z)>=0){const w=u.parentNode,E=_.split(sn),g=E.length-1;for(let v=0;v<g;v++){let P,B=E[v];if(B==="")P=F();else{const V=wt.exec(B);V!==null&&rn(V[2],Ce)&&(B=B.slice(0,V.index)+V[1]+V[2].slice(0,-Ce.length)+V[3]),P=document.createTextNode(B)}w.insertBefore(P,u),this.parts.push({type:"node",index:++c})}E[g]===""?(w.insertBefore(F(),u),s.push(u)):u.data=E[g],l+=g}}else if(u.nodeType===8)if(u.data===Z){const _=u.parentNode;(u.previousSibling===null||c===a)&&(c++,_.insertBefore(F(),u)),a=c,this.parts.push({type:"node",index:c}),u.nextSibling===null?u.data="":(s.push(u),c--),l++}else{let _=-1;for(;(_=u.data.indexOf(Z,_+1))!==-1;)this.parts.push({type:"node",index:-1}),l++}}for(const u of s)u.parentNode.removeChild(u)}}const rn=(n,e)=>{const t=n.length-e.length;return t>=0&&n.slice(t)===e},os=n=>n.index!==-1,F=()=>document.createComment(""),wt=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;/**
49
+ */const Y=`{{lit-${String(Math.random()).slice(2)}}}`,ln=`<!--${Y}-->`,hn=new RegExp(`${Y}|${ln}`),Te="$lit$";class ms{constructor(e,t){this.parts=[],this.element=t;const s=[],i=[],r=document.createTreeWalker(t.content,133,null,!1);let a=0,c=-1,l=0;const{strings:h,values:{length:p}}=e;for(;l<p;){const d=r.nextNode();if(d===null){r.currentNode=i.pop();continue}if(c++,d.nodeType===1){if(d.hasAttributes()){const M=d.attributes,{length:g}=M;let y=0;for(let m=0;m<g;m++)un(M[m].name,Te)&&y++;for(;y-- >0;){const m=h[l],S=Ct.exec(m)[2],P=S.toLowerCase()+Te,x=d.getAttribute(P);d.removeAttribute(P);const H=x.split(hn);this.parts.push({type:"attribute",index:c,name:S,strings:H}),l+=H.length-1}}d.tagName==="TEMPLATE"&&(i.push(d),r.currentNode=d.content)}else if(d.nodeType===3){const M=d.data;if(M.indexOf(Y)>=0){const g=d.parentNode,y=M.split(hn),m=y.length-1;for(let S=0;S<m;S++){let P,x=y[S];if(x==="")P=B();else{const H=Ct.exec(x);H!==null&&un(H[2],Te)&&(x=x.slice(0,H.index)+H[1]+H[2].slice(0,-Te.length)+H[3]),P=document.createTextNode(x)}g.insertBefore(P,d),this.parts.push({type:"node",index:++c})}y[m]===""?(g.insertBefore(B(),d),s.push(d)):d.data=y[m],l+=m}}else if(d.nodeType===8)if(d.data===Y){const M=d.parentNode;(d.previousSibling===null||c===a)&&(c++,M.insertBefore(B(),d)),a=c,this.parts.push({type:"node",index:c}),d.nextSibling===null?d.data="":(s.push(d),c--),l++}else{let M=-1;for(;(M=d.data.indexOf(Y,M+1))!==-1;)this.parts.push({type:"node",index:-1}),l++}}for(const d of s)d.parentNode.removeChild(d)}}const un=(n,e)=>{const t=n.length-e.length;return t>=0&&n.slice(t)===e},ps=n=>n.index!==-1,B=()=>document.createComment(""),Ct=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;/**
50
50
  * @license
51
51
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
52
52
  * This code may only be used under the BSD style license found at
@@ -58,7 +58,7 @@ var fi=Object.defineProperty,mi=Object.defineProperties;var pi=Object.getOwnProp
58
58
  * Code distributed by Google as part of the polymer project is also
59
59
  * subject to an additional IP rights grant found at
60
60
  * http://polymer.github.io/PATENTS.txt
61
- */class on{constructor(e,t,s){this.__parts=[],this.template=e,this.processor=t,this.options=s}update(e){let t=0;for(const s of this.__parts)s!==void 0&&s.setValue(e[t]),t++;for(const s of this.__parts)s!==void 0&&s.commit()}_clone(){const e=Xt?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),t=[],s=this.template.parts,i=document.createTreeWalker(e,133,null,!1);let r=0,a=0,c,l=i.nextNode();for(;r<s.length;){if(c=s[r],!os(c)){this.__parts.push(void 0),r++;continue}for(;a<c.index;)a++,l.nodeName==="TEMPLATE"&&(t.push(l),i.currentNode=l.content),(l=i.nextNode())===null&&(i.currentNode=t.pop(),l=i.nextNode());if(c.type==="node"){const h=this.processor.handleTextExpression(this.options);h.insertAfterNode(l.previousSibling),this.__parts.push(h)}else this.__parts.push(...this.processor.handleAttributeExpressions(l,c.name,c.strings,this.options));r++}return Xt&&(document.adoptNode(e),customElements.upgrade(e)),e}}/**
61
+ */class dn{constructor(e,t,s){this.__parts=[],this.template=e,this.processor=t,this.options=s}update(e){let t=0;for(const s of this.__parts)s!==void 0&&s.setValue(e[t]),t++;for(const s of this.__parts)s!==void 0&&s.commit()}_clone(){const e=on?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),t=[],s=this.template.parts,i=document.createTreeWalker(e,133,null,!1);let r=0,a=0,c,l=i.nextNode();for(;r<s.length;){if(c=s[r],!ps(c)){this.__parts.push(void 0),r++;continue}for(;a<c.index;)a++,l.nodeName==="TEMPLATE"&&(t.push(l),i.currentNode=l.content),(l=i.nextNode())===null&&(i.currentNode=t.pop(),l=i.nextNode());if(c.type==="node"){const h=this.processor.handleTextExpression(this.options);h.insertAfterNode(l.previousSibling),this.__parts.push(h)}else this.__parts.push(...this.processor.handleAttributeExpressions(l,c.name,c.strings,this.options));r++}return on&&(document.adoptNode(e),customElements.upgrade(e)),e}}/**
62
62
  * @license
63
63
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
64
64
  * This code may only be used under the BSD style license found at
@@ -70,7 +70,7 @@ var fi=Object.defineProperty,mi=Object.defineProperties;var pi=Object.getOwnProp
70
70
  * Code distributed by Google as part of the polymer project is also
71
71
  * subject to an additional IP rights grant found at
72
72
  * http://polymer.github.io/PATENTS.txt
73
- */const an=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:n=>n}),as=` ${Z} `;class ke{constructor(e,t,s,i){this.strings=e,this.values=t,this.type=s,this.processor=i}getHTML(){const e=this.strings.length-1;let t="",s=!1;for(let i=0;i<e;i++){const r=this.strings[i],a=r.lastIndexOf("<!--");s=(a>-1||s)&&r.indexOf("-->",a+1)===-1;const c=wt.exec(r);c===null?t+=r+(s?as:nn):t+=r.substr(0,c.index)+c[1]+c[2]+Ce+c[3]+Z}return t+=this.strings[e],t}getTemplateElement(){const e=document.createElement("template");let t=this.getHTML();return an!==void 0&&(t=an.createHTML(t)),e.innerHTML=t,e}}class Et extends ke{getHTML(){return`<svg>${super.getHTML()}</svg>`}getTemplateElement(){const e=super.getTemplateElement(),t=e.content,s=t.firstChild;return t.removeChild(s),en(t,s.firstChild),e}}/**
73
+ */const fn=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:n=>n}),gs=` ${Y} `;class Ce{constructor(e,t,s,i){this.strings=e,this.values=t,this.type=s,this.processor=i}getHTML(){const e=this.strings.length-1;let t="",s=!1;for(let i=0;i<e;i++){const r=this.strings[i],a=r.lastIndexOf("<!--");s=(a>-1||s)&&r.indexOf("-->",a+1)===-1;const c=Ct.exec(r);c===null?t+=r+(s?gs:ln):t+=r.substr(0,c.index)+c[1]+c[2]+Te+c[3]+Y}return t+=this.strings[e],t}getTemplateElement(){const e=document.createElement("template");let t=this.getHTML();return fn!==void 0&&(t=fn.createHTML(t)),e.innerHTML=t,e}}class kt extends Ce{getHTML(){return`<svg>${super.getHTML()}</svg>`}getTemplateElement(){const e=super.getTemplateElement(),t=e.content,s=t.firstChild;return t.removeChild(s),an(t,s.firstChild),e}}/**
74
74
  * @license
75
75
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
76
76
  * This code may only be used under the BSD style license found at
@@ -82,7 +82,7 @@ var fi=Object.defineProperty,mi=Object.defineProperties;var pi=Object.getOwnProp
82
82
  * Code distributed by Google as part of the polymer project is also
83
83
  * subject to an additional IP rights grant found at
84
84
  * http://polymer.github.io/PATENTS.txt
85
- */const _t=n=>n===null||!(typeof n=="object"||typeof n=="function"),St=n=>Array.isArray(n)||!!(n&&n[Symbol.iterator]);class cn{constructor(e,t,s){this.dirty=!0,this.element=e,this.name=t,this.strings=s,this.parts=[];for(let i=0;i<s.length-1;i++)this.parts[i]=this._createPart()}_createPart(){return new vt(this)}_getValue(){const e=this.strings,t=e.length-1,s=this.parts;if(t===1&&e[0]===""&&e[1]===""){const r=s[0].value;if(typeof r=="symbol")return String(r);if(typeof r=="string"||!St(r))return r}let i="";for(let r=0;r<t;r++){i+=e[r];const a=s[r];if(a!==void 0){const c=a.value;if(_t(c)||!St(c))i+=typeof c=="string"?c:String(c);else for(const l of c)i+=typeof l=="string"?l:String(l)}}return i+=e[t],i}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class vt{constructor(e){this.value=void 0,this.committer=e}setValue(e){e!==W&&(!_t(e)||e!==this.value)&&(this.value=e,Te(e)||(this.committer.dirty=!0))}commit(){for(;Te(this.value);){const e=this.value;this.value=W,e(this)}this.value!==W&&this.committer.commit()}}class ue{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild(F()),this.endNode=e.appendChild(F())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=F()),e.__insert(this.endNode=F())}insertAfterPart(e){e.__insert(this.startNode=F()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){if(this.startNode.parentNode===null)return;for(;Te(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=W,t(this)}const e=this.__pendingValue;e!==W&&(_t(e)?e!==this.value&&this.__commitText(e):e instanceof ke?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):St(e)?this.__commitIterable(e):e===tn?(this.value=tn,this.clear()):this.__commitText(e))}__insert(e){this.endNode.parentNode.insertBefore(e,this.endNode)}__commitNode(e){this.value!==e&&(this.clear(),this.__insert(e),this.value=e)}__commitText(e){const t=this.startNode.nextSibling;e=e==null?"":e;const s=typeof e=="string"?e:String(e);t===this.endNode.previousSibling&&t.nodeType===3?t.data=s:this.__commitNode(document.createTextNode(s)),this.value=e}__commitTemplateResult(e){const t=this.options.templateFactory(e);if(this.value instanceof on&&this.value.template===t)this.value.update(e.values);else{const s=new on(t,e.processor,this.options),i=s._clone();s.update(e.values),this.__commitNode(i),this.value=s}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());const t=this.value;let s=0,i;for(const r of e)i=t[s],i===void 0&&(i=new ue(this.options),t.push(i),s===0?i.appendIntoPart(this):i.insertAfterPart(t[s-1])),i.setValue(r),i.commit(),s++;s<t.length&&(t.length=s,this.clear(i&&i.endNode))}clear(e=this.startNode){yt(this.startNode.parentNode,e.nextSibling,this.endNode)}}class cs{constructor(e,t,s){if(this.value=void 0,this.__pendingValue=void 0,s.length!==2||s[0]!==""||s[1]!=="")throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=t,this.strings=s}setValue(e){this.__pendingValue=e}commit(){for(;Te(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=W,t(this)}if(this.__pendingValue===W)return;const e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=W}}class ls extends cn{constructor(e,t,s){super(e,t,s);this.single=s.length===2&&s[0]===""&&s[1]===""}_createPart(){return new hs(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class hs extends vt{}let ln=!1;(()=>{try{const n={get capture(){return ln=!0,!1}};window.addEventListener("test",n,n),window.removeEventListener("test",n,n)}catch{}})();class us{constructor(e,t,s){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=t,this.eventContext=s,this.__boundHandleEvent=i=>this.handleEvent(i)}setValue(e){this.__pendingValue=e}commit(){for(;Te(this.__pendingValue);){const r=this.__pendingValue;this.__pendingValue=W,r(this)}if(this.__pendingValue===W)return;const e=this.__pendingValue,t=this.value,s=e==null||t!=null&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),i=e!=null&&(t==null||s);s&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),i&&(this.__options=ds(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=W}handleEvent(e){typeof this.value=="function"?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const ds=n=>n&&(ln?{capture:n.capture,passive:n.passive,once:n.once}:n.capture);/**
85
+ */const Lt=n=>n===null||!(typeof n=="object"||typeof n=="function"),$t=n=>Array.isArray(n)||!!(n&&n[Symbol.iterator]);class mn{constructor(e,t,s){this.dirty=!0,this.element=e,this.name=t,this.strings=s,this.parts=[];for(let i=0;i<s.length-1;i++)this.parts[i]=this._createPart()}_createPart(){return new Mt(this)}_getValue(){const e=this.strings,t=e.length-1,s=this.parts;if(t===1&&e[0]===""&&e[1]===""){const r=s[0].value;if(typeof r=="symbol")return String(r);if(typeof r=="string"||!$t(r))return r}let i="";for(let r=0;r<t;r++){i+=e[r];const a=s[r];if(a!==void 0){const c=a.value;if(Lt(c)||!$t(c))i+=typeof c=="string"?c:String(c);else for(const l of c)i+=typeof l=="string"?l:String(l)}}return i+=e[t],i}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class Mt{constructor(e){this.value=void 0,this.committer=e}setValue(e){e!==W&&(!Lt(e)||e!==this.value)&&(this.value=e,Pe(e)||(this.committer.dirty=!0))}commit(){for(;Pe(this.value);){const e=this.value;this.value=W,e(this)}this.value!==W&&this.committer.commit()}}class he{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild(B()),this.endNode=e.appendChild(B())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=B()),e.__insert(this.endNode=B())}insertAfterPart(e){e.__insert(this.startNode=B()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){if(this.startNode.parentNode===null)return;for(;Pe(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=W,t(this)}const e=this.__pendingValue;e!==W&&(Lt(e)?e!==this.value&&this.__commitText(e):e instanceof Ce?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):$t(e)?this.__commitIterable(e):e===cn?(this.value=cn,this.clear()):this.__commitText(e))}__insert(e){this.endNode.parentNode.insertBefore(e,this.endNode)}__commitNode(e){this.value!==e&&(this.clear(),this.__insert(e),this.value=e)}__commitText(e){const t=this.startNode.nextSibling;e=e==null?"":e;const s=typeof e=="string"?e:String(e);t===this.endNode.previousSibling&&t.nodeType===3?t.data=s:this.__commitNode(document.createTextNode(s)),this.value=e}__commitTemplateResult(e){const t=this.options.templateFactory(e);if(this.value instanceof dn&&this.value.template===t)this.value.update(e.values);else{const s=new dn(t,e.processor,this.options),i=s._clone();s.update(e.values),this.__commitNode(i),this.value=s}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());const t=this.value;let s=0,i;for(const r of e)i=t[s],i===void 0&&(i=new he(this.options),t.push(i),s===0?i.appendIntoPart(this):i.insertAfterPart(t[s-1])),i.setValue(r),i.commit(),s++;s<t.length&&(t.length=s,this.clear(i&&i.endNode))}clear(e=this.startNode){Tt(this.startNode.parentNode,e.nextSibling,this.endNode)}}class ys{constructor(e,t,s){if(this.value=void 0,this.__pendingValue=void 0,s.length!==2||s[0]!==""||s[1]!=="")throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=t,this.strings=s}setValue(e){this.__pendingValue=e}commit(){for(;Pe(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=W,t(this)}if(this.__pendingValue===W)return;const e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=W}}class ws extends mn{constructor(e,t,s){super(e,t,s),this.single=s.length===2&&s[0]===""&&s[1]===""}_createPart(){return new Es(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class Es extends Mt{}let pn=!1;(()=>{try{const n={get capture(){return pn=!0,!1}};window.addEventListener("test",n,n),window.removeEventListener("test",n,n)}catch{}})();class _s{constructor(e,t,s){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=t,this.eventContext=s,this.__boundHandleEvent=i=>this.handleEvent(i)}setValue(e){this.__pendingValue=e}commit(){for(;Pe(this.__pendingValue);){const r=this.__pendingValue;this.__pendingValue=W,r(this)}if(this.__pendingValue===W)return;const e=this.__pendingValue,t=this.value,s=e==null||t!=null&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),i=e!=null&&(t==null||s);s&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),i&&(this.__options=vs(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=W}handleEvent(e){typeof this.value=="function"?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const vs=n=>n&&(pn?{capture:n.capture,passive:n.passive,once:n.once}:n.capture);/**
86
86
  * @license
87
87
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
88
88
  * This code may only be used under the BSD style license found at
@@ -94,7 +94,7 @@ var fi=Object.defineProperty,mi=Object.defineProperties;var pi=Object.getOwnProp
94
94
  * Code distributed by Google as part of the polymer project is also
95
95
  * subject to an additional IP rights grant found at
96
96
  * http://polymer.github.io/PATENTS.txt
97
- */class fs{handleAttributeExpressions(e,t,s,i){const r=t[0];return r==="."?new ls(e,t.slice(1),s).parts:r==="@"?[new us(e,t.slice(1),i.eventContext)]:r==="?"?[new cs(e,t.slice(1),s)]:new cn(e,t,s).parts}handleTextExpression(e){return new ue(e)}}const hn=new fs;/**
97
+ */class Ss{handleAttributeExpressions(e,t,s,i){const r=t[0];return r==="."?new ws(e,t.slice(1),s).parts:r==="@"?[new _s(e,t.slice(1),i.eventContext)]:r==="?"?[new ys(e,t.slice(1),s)]:new mn(e,t,s).parts}handleTextExpression(e){return new he(e)}}const gn=new Ss;/**
98
98
  * @license
99
99
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
100
100
  * This code may only be used under the BSD style license found at
@@ -106,7 +106,7 @@ var fi=Object.defineProperty,mi=Object.defineProperties;var pi=Object.getOwnProp
106
106
  * Code distributed by Google as part of the polymer project is also
107
107
  * subject to an additional IP rights grant found at
108
108
  * http://polymer.github.io/PATENTS.txt
109
- */function ms(n){let e=un.get(n.type);e===void 0&&(e={stringsArray:new WeakMap,keyString:new Map},un.set(n.type,e));let t=e.stringsArray.get(n.strings);if(t!==void 0)return t;const s=n.strings.join(Z);return t=e.keyString.get(s),t===void 0&&(t=new rs(n,n.getTemplateElement()),e.keyString.set(s,t)),e.stringsArray.set(n.strings,t),t}const un=new Map;/**
109
+ */function bs(n){let e=yn.get(n.type);e===void 0&&(e={stringsArray:new WeakMap,keyString:new Map},yn.set(n.type,e));let t=e.stringsArray.get(n.strings);if(t!==void 0)return t;const s=n.strings.join(Y);return t=e.keyString.get(s),t===void 0&&(t=new ms(n,n.getTemplateElement()),e.keyString.set(s,t)),e.stringsArray.set(n.strings,t),t}const yn=new Map;/**
110
110
  * @license
111
111
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
112
112
  * This code may only be used under the BSD style license found at
@@ -118,7 +118,7 @@ var fi=Object.defineProperty,mi=Object.defineProperties;var pi=Object.getOwnProp
118
118
  * Code distributed by Google as part of the polymer project is also
119
119
  * subject to an additional IP rights grant found at
120
120
  * http://polymer.github.io/PATENTS.txt
121
- */const dn=new WeakMap,je=(n,e,t)=>{let s=dn.get(e);s===void 0&&(yt(e,e.firstChild),dn.set(e,s=new ue(Object.assign({templateFactory:ms},t))),s.appendInto(e)),s.setValue(n),s.commit()};/**
121
+ */const wn=new WeakMap,ze=(n,e,t)=>{let s=wn.get(e);s===void 0&&(Tt(e,e.firstChild),wn.set(e,s=new he(Object.assign({templateFactory:bs},t))),s.appendInto(e)),s.setValue(n),s.commit()};/**
122
122
  * @license
123
123
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
124
124
  * This code may only be used under the BSD style license found at
@@ -130,8 +130,8 @@ var fi=Object.defineProperty,mi=Object.defineProperties;var pi=Object.getOwnProp
130
130
  * Code distributed by Google as part of the polymer project is also
131
131
  * subject to an additional IP rights grant found at
132
132
  * http://polymer.github.io/PATENTS.txt
133
- */typeof window!="undefined"&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.4.1");const N=(n,...e)=>new ke(n,e,"html",hn),fn=(n,...e)=>new Et(n,e,"svg",hn),Le=new Set;function j(n){typeof n=="function"&&(Le.size||globalThis.queueMicrotask(()=>{Le.forEach(e=>e()),Le.clear()}),Le.delete(n),Le.add(n))}const $e=[];function ps(){for(let n=$e.length-1;n>=0;n--)$e[n]();$e.length=0}function gs(n){$e.length||j(ps),$e.push(n)}function bt(n="",e=""){const{pathname:t,search:s,hash:i}=new URL(e,location.origin+n);return t+s+i}class mn extends(globalThis.EventTarget||Object){constructor(){super(...arguments);$(this,Ee);$(this,ie,void 0);$(this,re,void 0);$(this,ae,void 0);G(this,ie,new Map)}get size(){return m(this,ie).size}add(e){m(this,ae)||this.dispatchEvent(new CustomEvent("start"));const t=mt(this,Ee,Qt).call(this,e)||{value:e};t.prev=m(this,ae),t.prev&&(t.prev.next=t),t.next=void 0,G(this,ae,t),m(this,re)||G(this,re,t),m(this,ie).set(e,t)}delete(e){const t=mt(this,Ee,Qt).call(this,e);return m(this,re)||this.dispatchEvent(new CustomEvent("end")),t}get(){const e=m(this,re);if(!!e)return mt(this,Ee,Qt).call(this,e.value),e.value}}ie=new WeakMap,re=new WeakMap,ae=new WeakMap,Ee=new WeakSet,Qt=function(e){const t=m(this,ie).get(e);return t&&(t.prev?t.prev.next=t.next:G(this,re,t.next),t.next?t.next.prev=t.prev:G(this,ae,t.prev),m(this,ie).delete(e)),t};class pn extends WeakMap{get(e){let t=super.get(e);return t||(t={},this.set(e,t)),t}}class Ne extends URLSearchParams{constructor(e){super(e);$(this,_e,e=>typeof e=="string"?e:JSON.stringify(e));$(this,ut,e=>{if(!e)return null;try{return JSON.parse(e)}catch{return null}})}concat(e){let t;typeof e=="string"?t=Object.fromEntries(new URLSearchParams(e).entries()):t=e,Object.entries(t).forEach(([s,i])=>{this.append(s,m(this,_e).call(this,i))})}setAny(e,t){if(Array.isArray(t))this.delete(e),t.forEach(s=>this.append(e,m(this,_e).call(this,s)));else{const s=m(this,_e).call(this,t);s?this.set(e,s):this.delete(e)}}getAny(e){return this.getAnyAll(e)[0]}getAnyAll(e){return this.getAll(e).filter(t=>t!=="").map(t=>m(this,ut).call(this,t))}toString(){const e=super.toString();return e?`?${e}`:""}toJSON(){return this.toString()}}_e=new WeakMap,ut=new WeakMap;function Me(n,...e){return n.reduce((t,s,i)=>{var r;return t+((r=e[i-1])!=null?r:"")+s})}function ys(n,...e){return Me(n,...e)}const Pt=Symbol.for("gem@sheetToken");o.useNativeCSSStyleSheet=!0;let Tt=globalThis.CSSStyleSheet;try{new Tt}catch{o.useNativeCSSStyleSheet=!1,Tt=class{constructor(){this.media={mediaText:""},this.style="",this.replaceSync=n=>this.style=n}}}function ws(n,e=""){const t=new Tt,s={};t.media.mediaText=e;let i="";return typeof n=="string"?i=n:Object.keys(n).forEach(r=>{s[r]=`${r}-${De()}`,i+=n[r].styledContent.replace(/&/g,s[r])}),t.replaceSync(i),s[Pt]=t,s}function De(n=5,e="0123456789abcdefghijklmnopqrstuvwxyz"){const t=e.length;let s="";for(let i=0;i<n;i++)s+=e[Math.floor(Math.random()*t)];return s}const Es=new RegExp(`&.*{((.|
134
- )*)}`,"g");function gn(n,e){const t=[];let s=`& {${n.replace(Es,i=>(t.push(i),""))}}`+t.join("");return s=s.replace(/&/g,e==="class"?".&":"#&"),{styledContent:s,type:e}}const _s={class:(n,...e)=>{const t=Me(n,...e);return gn(t,"class")},id:(n,...e)=>{const t=Me(n,...e);return gn(t,"id")},keyframes:(n,...e)=>({styledContent:`@keyframes & {${Me(n,...e)}}`,type:"keyframes"})};function D(n){return n.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function X(n){return n.replace(/-(.)/g,(e,t)=>t.toUpperCase())}function qe(n){return Object.keys(n).forEach(e=>{const t=e;delete n[t]}),n}class K extends Error{constructor(e){super(e);this.message=`gem: ${this.message}`}}function yn(n,e){const t=n.length;if(e.length!==t)return!0;for(let s=0;s<t;s++)if(n[s]!==e[s])return!0;return!1}function wn(n,e){const t=new Set(e);return n.filter(s=>t.has(s)?(t.delete(s),!1):!0)}function xe(n,e,t){let s=e;for(const i in n){const r=t(i,n[i]);s+=r?r+e:""}return s}function Ss(n){return xe(n,";",(e,t)=>t!==void 0?`${D(e)}:${t}`:"")}function En(n){return xe(n," ",(e,t)=>t?e:"")}const vs=En;function bs(n){return xe(n,",",(e,t)=>t!==void 0?`${e}:${t}`:"")}const de=new WeakMap;function J(n){if(de.has(n))throw new K("argument error");return de.set(n,new Set),n}function Ps(n){return Object.keys(n).forEach(t=>{J(n[t])}),n}function k(n,e){Object.assign(n,e);const t=de.get(n);t==null||t.forEach(s=>{j(s)})}function fe(n,e){const t=de.get(n);t==null||t.add(e)}function _n(n,e){const t=de.get(n);t==null||t.delete(e)}const Sn="1.7.1";var Ts=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",version:Sn});/**
133
+ */typeof window!="undefined"&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.4.1");const V=(n,...e)=>new Ce(n,e,"html",gn),En=(n,...e)=>new kt(n,e,"svg",gn),ke=new Set;function I(n){typeof n=="function"&&(ke.size||globalThis.queueMicrotask(()=>{ke.forEach(e=>e()),ke.clear()}),ke.delete(n),ke.add(n))}const Le=[];function Ps(){for(let n=Le.length-1;n>=0;n--)Le[n]();Le.length=0}function Ts(n){Le.length||I(Ps),Le.push(n)}function Nt(n="",e=""){const{pathname:t,search:s,hash:i}=new URL(e,location.origin+n);return t+s+i}class _n extends EventTarget{constructor(){super(...arguments);w(this,je);w(this,se,void 0);w(this,ie,void 0);w(this,oe,void 0);T(this,se,new Map)}get size(){return f(this,se).size}add(t){f(this,oe)||this.dispatchEvent(new CustomEvent("start"));const s=sn(this,je,rn).call(this,t)||{value:t};s.prev=f(this,oe),s.prev&&(s.prev.next=s),s.next=void 0,T(this,oe,s),f(this,ie)||T(this,ie,s),f(this,se).set(t,s)}delete(t){const s=sn(this,je,rn).call(this,t);return f(this,ie)||this.dispatchEvent(new CustomEvent("end")),s}get(){const t=f(this,ie);if(!!t)return this.delete(t.value),t.value}}se=new WeakMap,ie=new WeakMap,oe=new WeakMap,je=new WeakSet,rn=function(t){const s=f(this,se).get(t);return s&&(s.prev?s.prev.next=s.next:T(this,ie,s.next),s.next?s.next.prev=s.prev:T(this,oe,s.prev),f(this,se).delete(t)),s};class vn extends WeakMap{get(e){let t=super.get(e);return t||(t={},this.set(e,t)),t}}class $e extends URLSearchParams{constructor(t){super(t);w(this,Ee,t=>typeof t=="string"?t:JSON.stringify(t));w(this,Et,t=>{if(!t)return null;try{return JSON.parse(t)}catch{return null}})}concat(t){let s;typeof t=="string"?s=Object.fromEntries(new URLSearchParams(t).entries()):s=t,Object.entries(s).forEach(([i,r])=>{this.append(i,f(this,Ee).call(this,r))})}setAny(t,s){if(Array.isArray(s))this.delete(t),s.forEach(i=>this.append(t,f(this,Ee).call(this,i)));else{const i=f(this,Ee).call(this,s);i?this.set(t,i):this.delete(t)}}getAny(t){return this.getAnyAll(t)[0]}getAnyAll(t){return this.getAll(t).filter(s=>s!=="").map(s=>f(this,Et).call(this,s))}toString(){const t=super.toString();return t?`?${t}`:""}toJSON(){return this.toString()}}Ee=new WeakMap,Et=new WeakMap;function Me(n,...e){return n.reduce((t,s,i)=>{var r;return t+((r=e[i-1])!=null?r:"")+s})}function Cs(n,...e){return Me(n,...e)}const Ot=Symbol.for("gem@sheetToken");function ks(n,e=""){const t=new CSSStyleSheet,s={};t.media.mediaText=e;let i="";return typeof n=="string"?i=n:Object.keys(n).forEach(r=>{s[r]=`${r}-${Ke()}`,i+=n[r].styledContent.replace(/&/g,s[r])}),t.replaceSync(i),s[Ot]=t,s}function Ke(n=5,e="0123456789abcdefghijklmnopqrstuvwxyz"){const t=e.length;let s="";for(let i=0;i<n;i++)s+=e[Math.floor(Math.random()*t)];return s}const Ls=new RegExp(`&.*{((.|
134
+ )*)}`,"g");function Sn(n,e){const t=[];let s=`& {${n.replace(Ls,i=>(t.push(i),""))}}`+t.join("");return s=s.replace(/&/g,e==="class"?".&":"#&"),{styledContent:s,type:e}}const $s={class:(n,...e)=>{const t=Me(n,...e);return Sn(t,"class")},id:(n,...e)=>{const t=Me(n,...e);return Sn(t,"id")},keyframes:(n,...e)=>({styledContent:`@keyframes & {${Me(n,...e)}}`,type:"keyframes"})};function j(n){return n.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Z(n){return n.replace(/-(.)/g,(e,t)=>t.toUpperCase())}function Je(n){return Object.keys(n).forEach(e=>{const t=e;delete n[t]}),n}class z extends Error{constructor(e){super(e),this.message=`gem: ${this.message}`}}function bn(n,e){const t=n.length;if(e.length!==t)return!0;for(let s=0;s<t;s++)if(n[s]!==e[s])return!0;return!1}function Pn(n,e){const t=new Set(e);return n.filter(s=>t.has(s)?(t.delete(s),!1):!0)}function Qe(n,e,t){let s=e;for(const i in n){const r=t(i,n[i]);s+=r?r+e:""}return s}function Ms(n){return Qe(n,";",(e,t)=>t!==void 0?`${j(e)}:${t}`:"")}function Tn(n){return Qe(n," ",(e,t)=>t?e:"")}const Ns=Tn;function Os(n){return Qe(n,",",(e,t)=>t===!0||e===t?e:t?`${e}:${t}`:"")}const ue=new WeakMap;function K(n){if(ue.has(n))throw new z("argument error");return ue.set(n,new Set),n}function Rs(n){return Object.keys(n).forEach(t=>{K(n[t])}),n}function C(n,e){Object.assign(n,e);const t=ue.get(n);t==null||t.forEach(s=>{I(s)})}function de(n,e){const t=ue.get(n);t==null||t.add(e)}function Cn(n,e){const t=ue.get(n);t==null||t.delete(e)}const kn="1.7.3";var As=Object.freeze(Object.defineProperty({__proto__:null,version:kn},Symbol.toStringTag,{value:"Module"}));/**
135
135
  * @license
136
136
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
137
137
  * This code may only be used under the BSD style license found at
@@ -143,7 +143,7 @@ var fi=Object.defineProperty,mi=Object.defineProperties;var pi=Object.getOwnProp
143
143
  * Code distributed by Google as part of the polymer project is also
144
144
  * subject to an additional IP rights grant found at
145
145
  * http://polymer.github.io/PATENTS.txt
146
- */const vn=(n,e)=>{const t=n.startNode.parentNode,s=e===void 0?n.endNode:e.startNode,i=t.insertBefore(F(),s);t.insertBefore(F(),s);const r=new ue(n.options);return r.insertAfterNode(i),r},oe=(n,e)=>(n.setValue(e),n.commit(),n),Ct=(n,e,t)=>{const s=n.startNode.parentNode,i=t?t.startNode:n.endNode,r=e.endNode.nextSibling;r!==i&&en(s,e.startNode,r,i)},kt=n=>{yt(n.startNode.parentNode,n.startNode,n.endNode.nextSibling)},bn=(n,e,t)=>{const s=new Map;for(let i=e;i<=t;i++)s.set(n[i],i);return s},Pn=new WeakMap,Tn=new WeakMap,Cn=Y((n,e,t)=>{let s;return t===void 0?t=e:e!==void 0&&(s=e),i=>{if(!(i instanceof ue))throw new Error("repeat can only be used in text bindings");const r=Pn.get(i)||[],a=Tn.get(i)||[],c=[],l=[],h=[];let p=0;for(const P of n)h[p]=s?s(P,p):p,l[p]=t(P,p),p++;let u,_,w=0,E=r.length-1,g=0,v=l.length-1;for(;w<=E&&g<=v;)if(r[w]===null)w++;else if(r[E]===null)E--;else if(a[w]===h[g])c[g]=oe(r[w],l[g]),w++,g++;else if(a[E]===h[v])c[v]=oe(r[E],l[v]),E--,v--;else if(a[w]===h[v])c[v]=oe(r[w],l[v]),Ct(i,r[w],c[v+1]),w++,v--;else if(a[E]===h[g])c[g]=oe(r[E],l[g]),Ct(i,r[E],r[w]),E--,g++;else if(u===void 0&&(u=bn(h,g,v),_=bn(a,w,E)),!u.has(a[w]))kt(r[w]),w++;else if(!u.has(a[E]))kt(r[E]),E--;else{const P=_.get(h[g]),B=P!==void 0?r[P]:null;if(B===null){const V=vn(i,r[w]);oe(V,l[g]),c[g]=V}else c[g]=oe(B,l[g]),Ct(i,B,r[w]),r[P]=null;g++}for(;g<=v;){const P=vn(i,c[v+1]);oe(P,l[g]),c[g++]=P}for(;w<=E;){const P=r[w++];P!==null&&kt(P)}Pn.set(i,c),Tn.set(i,h)}});/**
146
+ */const Ln=(n,e)=>{const t=n.startNode.parentNode,s=e===void 0?n.endNode:e.startNode,i=t.insertBefore(B(),s);t.insertBefore(B(),s);const r=new he(n.options);return r.insertAfterNode(i),r},re=(n,e)=>(n.setValue(e),n.commit(),n),Rt=(n,e,t)=>{const s=n.startNode.parentNode,i=t?t.startNode:n.endNode,r=e.endNode.nextSibling;r!==i&&an(s,e.startNode,r,i)},At=n=>{Tt(n.startNode.parentNode,n.startNode,n.endNode.nextSibling)},$n=(n,e,t)=>{const s=new Map;for(let i=e;i<=t;i++)s.set(n[i],i);return s},Mn=new WeakMap,Nn=new WeakMap,On=Q((n,e,t)=>{let s;return t===void 0?t=e:e!==void 0&&(s=e),i=>{if(!(i instanceof he))throw new Error("repeat can only be used in text bindings");const r=Mn.get(i)||[],a=Nn.get(i)||[],c=[],l=[],h=[];let p=0;for(const P of n)h[p]=s?s(P,p):p,l[p]=t(P,p),p++;let d,M,g=0,y=r.length-1,m=0,S=l.length-1;for(;g<=y&&m<=S;)if(r[g]===null)g++;else if(r[y]===null)y--;else if(a[g]===h[m])c[m]=re(r[g],l[m]),g++,m++;else if(a[y]===h[S])c[S]=re(r[y],l[S]),y--,S--;else if(a[g]===h[S])c[S]=re(r[g],l[S]),Rt(i,r[g],c[S+1]),g++,S--;else if(a[y]===h[m])c[m]=re(r[y],l[m]),Rt(i,r[y],r[g]),y--,m++;else if(d===void 0&&(d=$n(h,m,S),M=$n(a,g,y)),!d.has(a[g]))At(r[g]),g++;else if(!d.has(a[y]))At(r[y]),y--;else{const P=M.get(h[m]),x=P!==void 0?r[P]:null;if(x===null){const H=Ln(i,r[g]);re(H,l[m]),c[m]=H}else c[m]=re(x,l[m]),Rt(i,x,r[g]),r[P]=null;m++}for(;m<=S;){const P=Ln(i,c[S+1]);re(P,l[m]),c[m++]=P}for(;g<=y;){const P=r[g++];P!==null&&At(P)}Mn.set(i,c),Nn.set(i,h)}});/**
147
147
  * @license
148
148
  * Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
149
149
  * This code may only be used under the BSD style license found at
@@ -155,7 +155,7 @@ var fi=Object.defineProperty,mi=Object.defineProperties;var pi=Object.getOwnProp
155
155
  * Code distributed by Google as part of the polymer project is also
156
156
  * subject to an additional IP rights grant found at
157
157
  * http://polymer.github.io/PATENTS.txt
158
- */const Lt=new WeakMap,kn=Y((n,e)=>t=>{const s=Lt.get(t);if(Array.isArray(n)){if(Array.isArray(s)&&s.length===n.length&&n.every((i,r)=>i===s[r]))return}else if(s===n&&(n!==void 0||Lt.has(t)))return;t.setValue(e()),Lt.set(t,Array.isArray(n)?Array.from(n):n)});/**
158
+ */const Gt=new WeakMap,Rn=Q((n,e)=>t=>{const s=Gt.get(t);if(Array.isArray(n)){if(Array.isArray(s)&&s.length===n.length&&n.every((i,r)=>i===s[r]))return}else if(s===n&&(n!==void 0||Gt.has(t)))return;t.setValue(e()),Gt.set(t,Array.isArray(n)?Array.from(n):n)});/**
159
159
  * @license
160
160
  * Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
161
161
  * This code may only be used under the BSD style license found at
@@ -167,19 +167,15 @@ var fi=Object.defineProperty,mi=Object.defineProperties;var pi=Object.getOwnProp
167
167
  * Code distributed by Google as part of the polymer project is also
168
168
  * subject to an additional IP rights grant found at
169
169
  * http://polymer.github.io/PATENTS.txt
170
- */const $t=new WeakMap,Nt=Y(n=>e=>{const t=$t.get(e);if(n===void 0&&e instanceof vt){if(t!==void 0||!$t.has(e)){const s=e.committer.name;e.committer.element.removeAttribute(s)}}else n!==t&&e.setValue(n);$t.set(e,n)});var Ln=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},d=(n,e,t)=>(Ln(n,e,"read from private field"),t?t.call(n):e.get(n)),T=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},H=(n,e,t,s)=>(Ln(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),me,ee,Oe,Q,Re,z,te,Ue,Be,Mt,Ot,Rt,Fe,At,ze,ne,Gt,Ke;function Cs(){}function Ht(n){typeof n=="function"&&n()}const Je=new mn,It=(n=performance.now())=>{if(performance.now()>n+16)return requestAnimationFrame(It);const e=Je.get();e&&(e(),It(n))};Je.addEventListener("start",()=>j(It));const Qe=Symbol("constructor"),Ye=Symbol("init"),$n=Symbol("update");class A extends HTMLElement{constructor({isAsync:e,isLight:t,delegatesFocus:s,slotAssignment:i}={}){super();T(this,me,void 0),T(this,ee,void 0),T(this,Oe,void 0),T(this,Q,void 0),T(this,Re,void 0),T(this,z,void 0),T(this,te,void 0),T(this,Ue,void 0),this.setState=a=>{if(!this.state)throw new K("`state` not initialized");Object.assign(this.state,a),j(d(this,ne))},T(this,Be,a=>{a==null||a.forEach(c=>{const{callback:l,getDep:h,values:p,preCallback:u}=c,_=h==null?void 0:h();(!h||!p||yn(p,_))&&(Ht(u),c.preCallback=l(_,p),c.values=_)})}),T(this,Mt,()=>{d(this,Be).call(this,d(this,z))}),T(this,Ot,()=>{d(this,Be).call(this,d(this,te))}),this.effect=(a,c)=>{d(this,z)||H(this,z,[]);const l={callback:a,getDep:c,values:void 0,initialized:d(this,Q),inConstructor:this[Qe]};d(this,Q)&&(l.values=c==null?void 0:c(),l.preCallback=a(l.values)),d(this,z).push(l)},this.memo=(a,c)=>{d(this,te)||H(this,te,[]),d(this,te).push({callback:a,getDep:c,values:[Symbol()],inConstructor:this[Qe]})},T(this,Rt,()=>{var a;(a=d(this,z))==null||a.forEach(c=>{const{callback:l,getDep:h,initialized:p}=c;p||(c.values=h==null?void 0:h(),c.preCallback=l(c.values),c.initialized=!0)})}),T(this,Fe,()=>{var c,l;d(this,Ot).call(this);const a=o.useNativeCSSStyleSheet?"":N`${(l=(c=this.shadowRoot)==null?void 0:c.adoptedStyleSheets)==null?void 0:l.map(h=>N`
171
- <style media=${h.media.mediaText}>
172
- ${h.style}
173
- </style>
174
- `)}`;if(this.render){const h=this.render();return h&&N`${h}${a}`}return d(this,me)===this?void 0:N`<slot></slot>${a}`}),T(this,At,()=>this.shouldUpdate?this.shouldUpdate():!0),T(this,ze,()=>{if(d(this,Q)&&d(this,At).call(this)){const a=d(this,Fe).call(this);a!==void 0&&je(a,d(this,me)),j(d(this,Gt)),j(d(this,Mt))}}),T(this,ne,()=>{d(this,Re)?Je.add(d(this,ze)):d(this,ze).call(this)}),this.update=()=>{j(d(this,ne))},T(this,Gt,()=>{var a;(a=this.updated)==null||a.call(this)}),T(this,Ke,()=>{var h,p,u;if(this[Qe]=!1,d(this,Oe)){H(this,Oe,!1);return}(h=this.willMount)==null||h.call(this);const{observedStores:a,rootElement:c}=this.constructor;a==null||a.forEach(_=>{fe(_,d(this,ne))});const l=d(this,Fe).call(this);if(l!==void 0&&je(l,d(this,me)),H(this,Q,!0),H(this,Ue,(p=this.mounted)==null?void 0:p.call(this)),d(this,Rt).call(this),c&&((u=this.getRootNode().host)==null?void 0:u.tagName)!==c.toUpperCase())throw new K("not allow current root type")}),this[Qe]=!0,j(()=>this[Ye]=!1),this[Ye]=!0,this[$n]=()=>{d(this,Q)&&j(d(this,ne))},H(this,Re,e),H(this,me,t?this:this.attachShadow({mode:"open",delegatesFocus:s,slotAssignment:i}));const{adoptedStyleSheets:r}=new.target;if(r){const a=r.map(c=>c[Pt]||c);this.shadowRoot?this.shadowRoot.adoptedStyleSheets=a:this.effect(()=>{const c=this.getRootNode();if(o.useNativeCSSStyleSheet)return c.adoptedStyleSheets=[...c.adoptedStyleSheets,...a],()=>{c.adoptedStyleSheets=wn(c.adoptedStyleSheets,a)};{const l=c===document?document.body:c;return l._sheets=l._sheets||{},a.forEach(({style:h,media:p})=>{if(l._sheets[h])l._sheets[h].count++;else{const u=document.createElement("style");u.innerHTML=h,u.media=p.mediaText,l.append(u),l._sheets[h]={ele:u,count:1}}}),()=>{a.forEach(({style:h})=>{l._sheets[h].count--,l._sheets[h].count||delete l._sheets[h]})}}},()=>[])}}get internals(){if(!d(this,ee)){H(this,ee,this.attachInternals());try{d(this,ee).states.add("foo"),d(this,ee).states.delete("foo")}catch{Reflect.defineProperty(d(this,ee),"states",{value:{has:e=>X(e)in this.dataset,add:e=>this.dataset[X(e)]="",delete:e=>delete this.dataset[X(e)]}})}}return d(this,ee)}attributeChangedCallback(){d(this,Q)&&j(d(this,ne))}closestElement(e){const t=typeof e=="function",s=typeof e=="string"&&e.toUpperCase(),i=r=>{const a=r.parentElement||r.getRootNode().host;if(!a)return null;if(t){if(a.constructor===e)return a}else if(a.tagName===s)return a;return i(a)};return i(this)}connectedCallback(){d(this,Re)?Je.add(d(this,Ke)):d(this,Ke).call(this)}disconnectedCallback(){var t,s,i,r;if(this.isConnected){H(this,Oe,!0);return}H(this,Q,!1);const{observedStores:e}=this.constructor;e==null||e.forEach(a=>{_n(a,d(this,ne))}),Ht(d(this,Ue)),(t=this.unmounted)==null||t.call(this),(s=d(this,z))==null||s.forEach(a=>{Ht(a.preCallback)}),H(this,z,(i=d(this,z))==null?void 0:i.filter(({inConstructor:a})=>a)),H(this,te,(r=d(this,te))==null?void 0:r.filter(({inConstructor:a})=>a))}}me=new WeakMap,ee=new WeakMap,Oe=new WeakMap,Q=new WeakMap,Re=new WeakMap,z=new WeakMap,te=new WeakMap,Ue=new WeakMap,Be=new WeakMap,Mt=new WeakMap,Ot=new WeakMap,Rt=new WeakMap,Fe=new WeakMap,At=new WeakMap,ze=new WeakMap,ne=new WeakMap,Gt=new WeakMap,Ke=new WeakMap;const Ze=new pn;function Xe(n,e,t){const{booleanAttributes:s,numberAttributes:i}=n.constructor;Object.defineProperty(n,e,{configurable:!0,get(){if(!(Ye in this))return;const a=this.getAttribute(t);return(s==null?void 0:s.has(t))?a!==null:(i==null?void 0:i.has(t))?Number(a):a||""},set(r){const a=this,c=Ze.get(this),l=c[e],h=a.getAttribute(t);if(this[Ye]&&h!==null&&!l)return;c[e]=!0;const p=s==null?void 0:s.has(t);r==null?a.removeAttribute(t):p?a.toggleAttribute(t,!!r):h!==String(r)&&a.setAttribute(t,String(r))}})}const Nn=Symbol("event handle");function pe(n,e,t,s){Object.defineProperty(n,e,{configurable:!0,get(){const i=Ze.get(this)[e];return i||!t?i:(this[e]=Cs,this[e])},set(i){const r=this,a=Ze.get(r);i!==a[e]&&(t?(a[e]=(i==null?void 0:i[Nn])?i:(c,l)=>{const h=new CustomEvent(t,We(C(C({},l),s),{detail:c}));r.dispatchEvent(h),i(c,l)},a[e][Nn]=!0):(a[e]=i,this[$n]()))}})}function et(n,e,t){Object.defineProperty(n,e,{configurable:!0,get(){const s=Ze.get(this);let i=s[e];if(!i){const r=this,a=r.shadowRoot||r;i={get ref(){return t},get element(){const c=[...a.querySelectorAll("[data-gem-reflect]")].map(l=>l.target);for(const l of[a,...c]){const h=l.querySelector(`[ref=${t}]`);if(h)return h}}},s[e]=i}return i}})}function tt(n,e,t){Object.defineProperty(n,e,{configurable:!0,get(){const s=this,{states:i}=s.internals;return i==null?void 0:i.has(t)},set(s){const i=this,{states:r}=i.internals;s?r==null||r.add(t):r==null||r.delete(t)}})}const nt=customElements.define.bind(customElements);customElements.define=(n,e,t)=>{if(e.prototype instanceof A){const{observedAttributes:s,observedProperties:i,defineEvents:r,defineCSSStates:a,defineRefs:c}=e;s==null||s.forEach(l=>Xe(e.prototype,X(l),l)),i==null||i.forEach(l=>pe(e.prototype,l)),r==null||r.forEach(l=>pe(e.prototype,X(l),l)),a==null||a.forEach(l=>tt(e.prototype,X(l),l)),c==null||c.forEach(l=>et(e.prototype,X(l),l))}nt(n,e,t)},window.__GEM_DEVTOOLS__HOOK__&&Object.assign(window.__GEM_DEVTOOLS__HOOK__,C(C({},f),Ts));function q(n,e,t,s=!1){const i=n.constructor,r=i[e];i.hasOwnProperty(e)||Object.defineProperty(i,e,{value:s?new Set(r):r?Array.from(r):[]}),i[e][s?"add":"push"](t)}function ks(n,e){const t=`${D(e)}-${De()}`;q(n,"defineRefs",t),et(n,e,t)}function Vt(n,e,t){q(n,"observedAttributes",t),Xe(n,e,t)}function M(n,e){Vt(n,e,D(e))}function Mn(n,e){const t=D(e);q(n,"booleanAttributes",t,!0),Vt(n,e,t)}function Ls(n,e){const t=D(e);q(n,"numberAttributes",t,!0),Vt(n,e,t)}function x(n,e){q(n,"observedProperties",e),pe(n,e)}function st(n,e){const t=D(e);q(n,"defineCSSStates",t),tt(n,e,t)}function $s(n,e){const t=D(n[e]||e);n[e]=t,q(n instanceof A?n:n.prototype,"defineSlots",t)}function On(n,e){const t=D(n[e]||e);n[e]=t,q(n instanceof A?n:n.prototype,"defineParts",t)}function it(n,e){Rn(n,e)}function Ns(n,e){Rn(n,e,{bubbles:!0,composed:!0})}function Rn(n,e,t){const s=D(e);q(n,"defineEvents",s),pe(n,e,s,t)}function Ms(n){return function(e){q(e.prototype,"adoptedStyleSheets",n)}}function ge(n){return function(e){q(e.prototype,"observedStores",n)}}function Os(n){return function(e){const t=e;t.rootElement=n}}function Rs(n){return function(e){nt(n,e)}}const I=window.history,An=I.pushState.bind(I),Gn=I.replaceState.bind(I);let As=0;const Wt=()=>`${performance.now()}-${++As}`,b=J({$hasCloseHandle:!1,$hasOpenHandle:!1,$hasShouldCloseHandle:!1,$key:""}),O=new Map;function Hn(n){const{$key:e,$hasCloseHandle:t,$hasOpenHandle:s,$hasShouldCloseHandle:i}=n||{};if(b.$key!==e){if(e)throw new K("`$key` is not allowed");if(t)throw new K("`$hasCloseHandle` is not allowed");if(s)throw new K("`$hasOpenHandle` is not allowed");if(i)throw new K("`$hasShouldCloseHandle` is not allowed")}}function In(n){return U.basePath?U.basePath+n:n}function Vn(n){return n===U.basePath?"/":n.replace(new RegExp(`^${U.basePath}/`),"/")}function rt(n){const e=O.get(b.$key)||{},t=n.path?bt(e.path,n.path):Vn(location.pathname),s=new Ne(n.query||(n.path?"":location.search)),i=n.path&&n.path!==e.path||n.query&&String(n.query)!==String(e.query),r=n.title||(i?"":document.title),a=n.close||n.data||n.open||n.shouldClose,c=n.hash||(!i&&a?decodeURIComponent(location.hash):"");return We(C({},n),{title:r,path:t,query:s,hash:c})}function Wn(n,e){Hn(n.data);const t=rt(n),{title:s,path:i,query:r,hash:a,close:c,open:l,shouldClose:h,data:p}=t,u=C({$hasCloseHandle:!!c,$hasOpenHandle:!!l,$hasShouldCloseHandle:!!h,$key:Wt()},p);O.set(u.$key,t),k(qe(b),u);const _=In(i)+new Ne(r)+a,w=decodeURIComponent(location.hash);e(u,s,_),w!==a&&window.dispatchEvent(new CustomEvent("hashchange"))}function jn(n,e,t,s){Hn(n);const i=C({$key:Wt()},n||{}),{pathname:r,search:a,hash:c}=new URL(t,location.origin+location.pathname),l=rt({path:r,query:new Ne(a),hash:c,title:e,data:n});O.set(i.$key,l),k(qe(b),i);const h=In(r)+l.query+c,p=location.hash;s(i,e,h),p!==c&&window.dispatchEvent(new CustomEvent("hashchange"))}const jt=J({basePath:""});class Gs{get store(){return b}get basePath(){return jt.basePath}set basePath(e){k(jt,{basePath:e}),Object.assign(O.get(b.$key),{path:Vn(location.pathname)})}getParams(){return O.get(b.$key)}updateParams(e){Object.assign(O.get(b.$key),e),k(b,{})}push(e){Wn(e,An)}replace(e){Wn(e,Gn)}pushIgnoreCloseHandle(e){var t,s;b.$hasCloseHandle?((s=(t=O.get(b.$key))==null?void 0:t.close)==null||s.call(t),this.replace(e)):this.push(e)}forward(){I.forward()}back(){I.back()}}const U=new Gs,Ae=J({title:""}),Hs={history:U,titleStore:Ae,basePathStore:jt};if(!window._GEMHISTORY){if(window._GEMHISTORY=Hs,I.pushState=function(e,t,s){jn(e,t,s,An)},I.replaceState=function(e,t,s){jn(e,t,s,Gn)},window.addEventListener("hashchange",({isTrusted:e})=>{e&&U.replace({hash:decodeURIComponent(location.hash)})}),I.state)if(I.state.$hasCloseHandle){k(b,I.state);const e=rt({title:document.title});O.set(b.$key,e),U.back()}else{const e=rt({title:document.title,hash:location.hash});k(b,C({$key:Wt()},I.state||{})),O.set(b.$key,e)}else{const{pathname:e,search:t,hash:s}=location;U.replace({path:e,query:t,hash:s})}fe(Ae,()=>{const e=O.get(b.$key);e&&(e.title=Ae.title)}),fe(b,()=>{const{title:e}=U.getParams();e!==Ae.title&&k(Ae,{title:e})});let n=!1;window.addEventListener("popstate",e=>{var r,a;const t=e.state;if(!(t==null?void 0:t.$key))return;if(n){n=!1;return}if(!O.has(t.$key)){const{pathname:c,search:l,hash:h}=location;O.set(t.$key,{path:c,query:new Ne(l),hash:h,title:document.title,data:t})}const s=b;if(parseFloat(t.$key)>parseFloat(s.$key)&&t.$hasOpenHandle)(a=(r=O.get(t.$key))==null?void 0:r.open)==null||a.call(r);else if(s.$hasCloseHandle){const c=O.get(s.$key),l=c==null?void 0:c.close,h=c==null?void 0:c.shouldClose;if(h&&!h()){n=!0,U.forward();return}else l?l():t.$hasCloseHandle&&(n=!0,U.back())}k(qe(b),t)})}const{history:S,titleStore:ye,basePathStore:Dn}=window._GEMHISTORY;var Is=Object.defineProperty,Vs=Object.getOwnPropertyDescriptor,se=(n,e,t,s)=>{for(var i=s>1?void 0:s?Vs(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&Is(e,t,i),i},qn=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},Ge=(n,e,t)=>(qn(n,e,"read from private field"),t?t.call(n):e.get(n)),Dt=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},xn=(n,e,t,s)=>(qn(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),He,ot,at;class Ws extends RegExp{constructor(e){const t={};let s=0;super(`^${e.replace(/:([^/$]+)/g,(i,r)=>(t[r]=s++,"([^/]+)")).replace("*",".*")}$`,"i");this.namePosition=t}}function qt(n,e){const t=new Ws(n),s=e.match(t)||`${e}/`.match(t);if(!s)return null;const i={};return s&&Object.keys(t.namePosition).forEach(r=>{i[r]=s[t.namePosition[r]+1]}),i}function xt(n,e){let t=n.pattern;const s=e==null?void 0:e.params;return s&&Object.keys(s).forEach(i=>{t=t.replace(new RegExp(`:${i}`,"g"),s[i])}),t}function Un(n,e){const t=xt(n,e);return C({path:t},e)}o.GemRouteElement=class extends A{constructor({isLight:n,routes:e}={}){super({isLight:n});this.currentParams={},Dt(this,He,void 0),this.state={content:void 0},Dt(this,ot,()=>{if(this.locationStore){const{path:t,query:s,data:i}=S.getParams();k(this.locationStore,{path:t,params:this.currentParams,query:s,data:i})}}),Dt(this,at,(t,s,i)=>{xn(this,He,void 0),this.currentRoute=t,this.currentParams=s;const r=()=>(this.setState({content:i}),this.routechange(this.currentRoute),Ge(this,ot).call(this),Promise.resolve());this.transition&&"startViewTransition"in document?document.startViewTransition(r):r()}),this.routes=e}mounted(){this.effect(([n,e],t)=>{if(t&&n===t[0]&&e===t[1]){Ge(this,ot).call(this);return}const{route:s,params:i={}}=o.GemRouteElement.findRoute(this.routes,e),{redirect:r,content:a,getContent:c}=s||{};if(r){S.replace({path:r});return}const l=s==null?void 0:s.title;l&&k(ye,{title:l});const h=a||(c==null?void 0:c(i));if(h instanceof Promise){this.loading(s),xn(this,He,h);const p=()=>Ge(this,He)===h;h.then(u=>{p()&&Ge(this,at).call(this,s,i,u)}).catch(u=>{p()&&this.error(u)});return}Ge(this,at).call(this,s,i,h)},()=>{const{path:n}=S.getParams();return[this.key,n,location.search]})}shouldUpdate(){return!this.inert}render(){const{content:n}=this.state;return this.shadowRoot?N`
170
+ */const Ht=new WeakMap,Wt=Q(n=>e=>{const t=Ht.get(e);if(n===void 0&&e instanceof Mt){if(t!==void 0||!Ht.has(e)){const s=e.committer.name;e.committer.element.removeAttribute(s)}}else n!==t&&e.setValue(n);Ht.set(e,n)});var An=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},u=(n,e,t)=>(An(n,e,"read from private field"),t?t.call(n):e.get(n)),_=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},A=(n,e,t,s)=>(An(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),fe,me,X,Ne,J,Oe,F,ee,Ye,Ze,Vt,It,jt,Xe,Dt,et,te,qt,tt,nt;function Gs(){}function Ut(n){typeof n=="function"&&n()}const st=new _n,xt=(n=performance.now())=>{if(performance.now()>n+16)return requestAnimationFrame(xt);const e=st.get();e&&(e(),xt(n))};st.addEventListener("start",()=>I(xt));const it=Symbol("constructor"),rt=Symbol("init"),Gn=Symbol("update"),Re=class extends HTMLElement{constructor({isAsync:n,isLight:e,delegatesFocus:t,slotAssignment:s}={}){super(),_(this,me,void 0),_(this,X,void 0),_(this,Ne,void 0),_(this,J,void 0),_(this,Oe,void 0),_(this,F,void 0),_(this,ee,void 0),_(this,Ye,void 0),this.setState=r=>{if(!this.state)throw new z("`state` not initialized");Object.assign(this.state,r),I(u(this,te))},_(this,Ze,r=>{r==null||r.forEach(a=>{const{callback:c,getDep:l,values:h,preCallback:p}=a,d=l==null?void 0:l();(!l||!h||bn(h,d))&&(Ut(p),a.preCallback=c(d,h),a.values=d)})}),_(this,Vt,()=>{u(this,Ze).call(this,u(this,F))}),_(this,It,()=>{u(this,Ze).call(this,u(this,ee))}),this.effect=(r,a)=>{u(this,F)||A(this,F,[]);const c={callback:r,getDep:a,values:void 0,initialized:u(this,J),inConstructor:this[it]};u(this,J)&&(c.values=a==null?void 0:a(),c.preCallback=r(c.values)),u(this,F).push(c)},this.memo=(r,a)=>{u(this,ee)||A(this,ee,[]),u(this,ee).push({callback:r,getDep:a,values:[Symbol()],inConstructor:this[it]})},_(this,jt,()=>{var r;(r=u(this,F))==null||r.forEach(a=>{const{callback:c,getDep:l,initialized:h}=a;h||(a.values=l==null?void 0:l(),a.preCallback=c(a.values),a.initialized=!0)})}),_(this,Xe,()=>(u(this,It).call(this),this.render?this.render():u(this,me)===this?void 0:V`<slot></slot>`)),_(this,Dt,()=>this.shouldUpdate?this.shouldUpdate():!0),_(this,et,()=>{if(u(this,J)&&u(this,Dt).call(this)){const r=u(this,Xe).call(this);r!==void 0&&ze(r,u(this,me)),I(u(this,qt)),I(u(this,Vt))}}),_(this,te,()=>{u(this,Oe)?st.add(u(this,et)):u(this,et).call(this)}),this.update=()=>{I(u(this,te))},_(this,qt,()=>{var r;(r=this.updated)==null||r.call(this)}),_(this,tt,()=>{var l,h,p;if(u(this,Ne)){A(this,Ne,!1);return}Reflect.set(this,it,!1),(l=this.willMount)==null||l.call(this);const{observedStores:r,rootElement:a}=this.constructor;r==null||r.forEach(d=>{de(d,u(this,te))});const c=u(this,Xe).call(this);if(c!==void 0&&ze(c,u(this,me)),A(this,J,!0),A(this,Ye,(h=this.mounted)==null?void 0:h.call(this)),u(this,jt).call(this),a&&((p=this.getRootNode().host)==null?void 0:p.tagName)!==a.toUpperCase())throw new z("not allow current root type")}),_(this,nt,r=>(r.initialized=!1,r.inConstructor)),I(()=>Reflect.set(this,rt,!1)),Reflect.set(this,it,!0),Reflect.set(this,rt,!0),Reflect.set(this,Gn,()=>{u(this,J)&&I(u(this,te))}),A(this,Oe,n),A(this,me,e?this:this.attachShadow({mode:"open",delegatesFocus:t,slotAssignment:s}));const{adoptedStyleSheets:i}=new.target;if(i){const r=i.map(a=>a[Ot]||a);this.shadowRoot?this.shadowRoot.adoptedStyleSheets=r:this.effect(()=>{const a=this.getRootNode();return a.adoptedStyleSheets=[...a.adoptedStyleSheets,...r],()=>{a.adoptedStyleSheets=Pn(a.adoptedStyleSheets,r)}},()=>[])}}get internals(){if(!u(this,X)){A(this,X,this.attachInternals());try{u(this,X).states.add("foo"),u(this,X).states.delete("foo")}catch{Reflect.defineProperty(u(this,X),"states",{value:{has:n=>Z(n)in this.dataset,add:n=>this.dataset[Z(n)]="",delete:n=>delete this.dataset[Z(n)]}})}}return u(this,X)}attributeChangedCallback(){return u(this,J)&&I(u(this,te)),u(Re,fe)}closestElement(n){const e=typeof n=="function",t=typeof n=="string"&&n.toUpperCase(),s=i=>{const r=i.parentElement||i.getRootNode().host;if(!r)return null;if(e){if(r.constructor===n)return r}else if(r.tagName===t)return r;return s(r)};return s(this)}connectedCallback(){return u(this,Oe)?st.add(u(this,tt)):u(this,tt).call(this),u(Re,fe)}adoptedCallback(){return u(Re,fe)}disconnectedCallback(){var e,t,s,i;if(this.isConnected){A(this,Ne,!0);return}A(this,J,!1);const{observedStores:n}=this.constructor;return n==null||n.forEach(r=>{Cn(r,u(this,te))}),Ut(u(this,Ye)),(e=this.unmounted)==null||e.call(this),(t=u(this,F))==null||t.forEach(({preCallback:r})=>Ut(r)),A(this,F,(s=u(this,F))==null?void 0:s.filter(u(this,nt))),A(this,ee,(i=u(this,ee))==null?void 0:i.filter(u(this,nt))),u(Re,fe)}};let N=Re;fe=new WeakMap,me=new WeakMap,X=new WeakMap,Ne=new WeakMap,J=new WeakMap,Oe=new WeakMap,F=new WeakMap,ee=new WeakMap,Ye=new WeakMap,Ze=new WeakMap,Vt=new WeakMap,It=new WeakMap,jt=new WeakMap,Xe=new WeakMap,Dt=new WeakMap,et=new WeakMap,te=new WeakMap,qt=new WeakMap,tt=new WeakMap,nt=new WeakMap,_(N,fe,Symbol());const ot=new vn;function at(n,e,t){const{booleanAttributes:s,numberAttributes:i}=n.constructor;Object.defineProperty(n,e,{configurable:!0,get(){if(!(rt in this))return;const a=this.getAttribute(t);return s!=null&&s.has(t)?a!==null:i!=null&&i.has(t)?Number(a):a||""},set(r){const a=this,c=ot.get(this),l=c[e],h=a.getAttribute(t);if(this[rt]&&h!==null&&!l)return;c[e]=!0;const p=s==null?void 0:s.has(t);r==null?a.removeAttribute(t):p?a.toggleAttribute(t,!!r):h!==String(r)&&a.setAttribute(t,String(r))}})}const Hn=Symbol("event handle");function pe(n,e,t,s){Object.defineProperty(n,e,{configurable:!0,get(){const i=ot.get(this)[e];return i||!t?i:(this[e]=Gs,this[e])},set(i){const r=this,a=ot.get(r);i!==a[e]&&(t?(a[e]=i!=null&&i[Hn]?i:(c,l)=>{const h=new CustomEvent(t,{...l,...s,detail:c});r.dispatchEvent(h),i(c,l)},Reflect.set(a[e],Hn,!0)):(a[e]=i,this[Gn]()))}})}function ct(n,e,t){Object.defineProperty(n,e,{configurable:!0,get(){const s=ot.get(this);let i=s[e];if(!i){const r=this,a=r.shadowRoot||r;i={get ref(){return t},get element(){const c=[...a.querySelectorAll("[data-gem-reflect]")].map(l=>l.target);for(const l of[a,...c]){const h=l.querySelector(`[ref=${t}]`);if(h)return h}}},s[e]=i}return i}})}function lt(n,e,t){Object.defineProperty(n,e,{configurable:!0,get(){const s=this,{states:i}=s.internals;return i==null?void 0:i.has(t)},set(s){const i=this,{states:r}=i.internals;s?r==null||r.add(t):r==null||r.delete(t)}})}const ht=customElements.define.bind(customElements);customElements.define=(n,e,t)=>{if(e.prototype instanceof N){const{observedAttributes:s,observedProperties:i,defineEvents:r,defineCSSStates:a,defineRefs:c}=e;s==null||s.forEach(l=>at(e.prototype,Z(l),l)),i==null||i.forEach(l=>pe(e.prototype,l)),r==null||r.forEach(l=>pe(e.prototype,Z(l),l)),a==null||a.forEach(l=>lt(e.prototype,Z(l),l)),c==null||c.forEach(l=>ct(e.prototype,Z(l),l))}ht(n,e,t)},window.__GEM_DEVTOOLS__HOOK__&&Object.assign(window.__GEM_DEVTOOLS__HOOK__,{...E,...As});function D(n,e,t,s=!1){const i=n.constructor,r=i[e];i.hasOwnProperty(e)||Object.defineProperty(i,e,{value:s?new Set(r):r?Array.from(r):[]}),i[e][s?"add":"push"](t)}function Hs(n,e){const t=`${j(e)}-${Ke()}`;D(n,"defineRefs",t),ct(n,e,t)}function Bt(n,e,t){D(n,"observedAttributes",t),at(n,e,t)}function $(n,e){Bt(n,e,j(e))}function Wn(n,e){const t=j(e);D(n,"booleanAttributes",t,!0),Bt(n,e,t)}function Ws(n,e){const t=j(e);D(n,"numberAttributes",t,!0),Bt(n,e,t)}function q(n,e){D(n,"observedProperties",e),pe(n,e)}function ut(n,e){const t=j(e);D(n,"defineCSSStates",t),lt(n,e,t)}function Vs(n,e){const t=j(n[e]||e);n[e]=t,D(n instanceof N?n:n.prototype,"defineSlots",t)}function Vn(n,e){const t=j(n[e]||e);n[e]=t,D(n instanceof N?n:n.prototype,"defineParts",t)}function dt(n,e){In(n,e)}function Is(n,e){In(n,e,{bubbles:!0,composed:!0})}function In(n,e,t){const s=j(e);D(n,"defineEvents",s),pe(n,e,s,t)}function js(n){return function(e){D(e.prototype,"adoptedStyleSheets",n)}}function ge(n){return function(e){D(e.prototype,"observedStores",n)}}function Ds(n){return function(e){const t=e;t.rootElement=n}}function qs(n){return function(e){ht(n,e)}}const G=window.history,jn=G.pushState.bind(G),Dn=G.replaceState.bind(G);let Us=0;const Ft=()=>`${performance.now()}-${++Us}`,b=K({$hasCloseHandle:!1,$hasOpenHandle:!1,$hasShouldCloseHandle:!1,$key:""}),O=new Map;function qn(n){const{$key:e,$hasCloseHandle:t,$hasOpenHandle:s,$hasShouldCloseHandle:i}=n||{};if(b.$key!==e){if(e)throw new z("`$key` is not allowed");if(t)throw new z("`$hasCloseHandle` is not allowed");if(s)throw new z("`$hasOpenHandle` is not allowed");if(i)throw new z("`$hasShouldCloseHandle` is not allowed")}}function Un(n){return U.basePath?U.basePath+n:n}function xn(n){return n===U.basePath?"/":n.replace(new RegExp(`^${U.basePath}/`),"/")}function ft(n){const e=O.get(b.$key)||{},t=n.path?Nt(e.path,n.path):xn(location.pathname),s=new $e(n.query||(n.path?"":location.search)),i=n.path&&n.path!==e.path||n.query&&String(n.query)!==String(e.query),r=n.title||(i?"":document.title),a=n.close||n.data||n.open||n.shouldClose,c=n.hash||(!i&&a?decodeURIComponent(location.hash):"");return{...n,title:r,path:t,query:s,hash:c}}function Bn(n,e){qn(n.data);const t=ft(n),{title:s,path:i,query:r,hash:a,close:c,open:l,shouldClose:h,data:p}=t,d={$hasCloseHandle:!!c,$hasOpenHandle:!!l,$hasShouldCloseHandle:!!h,$key:Ft(),...p};O.set(d.$key,t),C(Je(b),d);const M=Un(i)+new $e(r)+a,g=decodeURIComponent(location.hash);e(d,s,M),g!==a&&window.dispatchEvent(new CustomEvent("hashchange"))}function Fn(n,e,t,s){qn(n);const i={$key:Ft(),...n||{}},{pathname:r,search:a,hash:c}=new URL(t,location.origin+location.pathname),l=ft({path:r,query:new $e(a),hash:c,title:e,data:n});O.set(i.$key,l),C(Je(b),i);const h=Un(r)+l.query+c,p=location.hash;s(i,e,h),p!==c&&window.dispatchEvent(new CustomEvent("hashchange"))}const zt=K({basePath:""});class xs{get store(){return b}get basePath(){return zt.basePath}set basePath(e){C(zt,{basePath:e}),Object.assign(O.get(b.$key),{path:xn(location.pathname)})}getParams(){return O.get(b.$key)}updateParams(e){Object.assign(O.get(b.$key),e),C(b,{})}push(e){Bn(e,jn)}replace(e){Bn(e,Dn)}pushIgnoreCloseHandle(e){var t,s;b.$hasCloseHandle?((s=(t=O.get(b.$key))==null?void 0:t.close)==null||s.call(t),this.replace(e)):this.push(e)}forward(){G.forward()}back(){G.back()}}const U=new xs,Ae=K({title:""}),Bs={history:U,titleStore:Ae,basePathStore:zt};if(!window._GEMHISTORY){if(window._GEMHISTORY=Bs,G.pushState=function(e,t,s){Fn(e,t,s,jn)},G.replaceState=function(e,t,s){Fn(e,t,s,Dn)},window.addEventListener("hashchange",({isTrusted:e})=>{e&&U.replace({hash:decodeURIComponent(location.hash)})}),G.state)if(G.state.$hasCloseHandle){C(b,G.state);const e=ft({title:document.title});O.set(b.$key,e),U.back()}else{const e=ft({title:document.title,hash:location.hash});C(b,{$key:Ft(),...G.state||{}}),O.set(b.$key,e)}else{const{pathname:e,search:t,hash:s}=location;U.replace({path:e,query:t,hash:s})}de(Ae,()=>{const e=O.get(b.$key);e&&(e.title=Ae.title)}),de(b,()=>{const{title:e}=U.getParams();e!==Ae.title&&C(Ae,{title:e})});let n=!1;window.addEventListener("popstate",e=>{var r,a;const t=e.state;if(!(t!=null&&t.$key))return;if(n){n=!1;return}if(!O.has(t.$key)){const{pathname:c,search:l,hash:h}=location;O.set(t.$key,{path:c,query:new $e(l),hash:h,title:document.title,data:t})}const s=b;if(parseFloat(t.$key)>parseFloat(s.$key)&&t.$hasOpenHandle)(a=(r=O.get(t.$key))==null?void 0:r.open)==null||a.call(r);else if(s.$hasCloseHandle){const c=O.get(s.$key),l=c==null?void 0:c.close,h=c==null?void 0:c.shouldClose;if(h&&!h()){n=!0,U.forward();return}else l?l():t.$hasCloseHandle&&(n=!0,U.back())}C(Je(b),t)})}const{history:v,titleStore:ye,basePathStore:zn}=window._GEMHISTORY;var Fs=Object.defineProperty,zs=Object.getOwnPropertyDescriptor,ne=(n,e,t,s)=>{for(var i=s>1?void 0:s?zs(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&Fs(e,t,i),i},Kn=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},Ge=(n,e,t)=>(Kn(n,e,"read from private field"),t?t.call(n):e.get(n)),Kt=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},Jn=(n,e,t,s)=>(Kn(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),He,mt,pt;class Ks extends RegExp{constructor(e){const t={};let s=0;super(`^${e.replace(/:([^/$]+)/g,(i,r)=>(t[r]=s++,"([^/]+)")).replace("*",".*")}$`,"i"),this.namePosition=t}}function Jt(n,e){if(window.URLPattern){const r=new window.URLPattern({pathname:n}),a=r.exec({pathname:e})||r.exec({pathname:`${e}/`});return a?a.pathname.groups:null}const t=new Ks(n),s=e.match(t)||`${e}/`.match(t);if(!s)return null;const i={};return s&&Object.keys(t.namePosition).forEach(r=>{i[r]=s[t.namePosition[r]+1]}),i}function Qt(n,e){let t=n.pattern;const s=e==null?void 0:e.params;return s&&Object.keys(s).forEach(i=>{t=t.replace(new RegExp(`:${i}`,"g"),s[i])}),t}function Qn(n,e){return{path:Qt(n,e),...e}}o.GemRouteElement=class extends N{constructor({isLight:n,routes:e}={}){super({isLight:n}),this.currentParams={},Kt(this,He,void 0),this.state={content:void 0},Kt(this,mt,()=>{if(this.locationStore){const{path:t,query:s,data:i}=v.getParams();C(this.locationStore,{path:t,params:this.currentParams,query:s,data:i})}}),Kt(this,pt,(t,s,i)=>{Jn(this,He,void 0),this.currentRoute=t,this.currentParams=s;const r=()=>(this.setState({content:i}),this.routechange(this.currentRoute),Ge(this,mt).call(this),Promise.resolve());this.transition&&"startViewTransition"in document?document.startViewTransition(r):r()}),this.routes=e}mounted(){this.effect(([n,e],t)=>{if(t&&n===t[0]&&e===t[1]){Ge(this,mt).call(this);return}const{route:s,params:i={}}=o.GemRouteElement.findRoute(this.routes,e),{redirect:r,content:a,getContent:c}=s||{};if(r){v.replace({path:r});return}const l=s==null?void 0:s.title;l&&C(ye,{title:l});const h=a||(c==null?void 0:c(i));if(h instanceof Promise){this.loading(s),Jn(this,He,h);const p=()=>Ge(this,He)===h;h.then(d=>{p()&&Ge(this,pt).call(this,s,i,d)}).catch(d=>{p()&&this.error(d)});return}Ge(this,pt).call(this,s,i,h)},()=>{const{path:n}=v.getParams();return[this.key,n,location.search]})}shouldUpdate(){return!this.inert}render(){const{content:n}=this.state;return this.shadowRoot?V`
175
171
  <style>
176
172
  :host(:where(:not([hidden]))),
177
173
  :not(:defined) {
178
174
  display: contents;
179
175
  }
180
176
  </style>
181
- ${n!=null?n:N`<slot></slot>`}
182
- `:N`${n}`}},He=new WeakMap,ot=new WeakMap,at=new WeakMap,o.GemRouteElement.createLocationStore=()=>{const{path:n,query:e,data:t}=S.getParams();return J({path:n,query:e,data:t,params:{}})},o.GemRouteElement.findRoute=(n=[],e)=>{let t=null,s;n instanceof Array?s=n:s=Object.values(n);for(const i of s)if(i.pattern==="*")t=i;else{const r=qt(i.pattern,e);if(r)return{route:i,params:r}}return{route:t}},se([Mn],o.GemRouteElement.prototype,"transition",2),se([x],o.GemRouteElement.prototype,"routes",2),se([x],o.GemRouteElement.prototype,"locationStore",2),se([x],o.GemRouteElement.prototype,"key",2),se([it],o.GemRouteElement.prototype,"routechange",2),se([it],o.GemRouteElement.prototype,"loading",2),se([it],o.GemRouteElement.prototype,"error",2),o.GemRouteElement=se([ge(S.store)],o.GemRouteElement);class Bn extends o.GemRouteElement{constructor(e={}){super(We(C({},e),{isLight:!0}))}}var js=Object.defineProperty,Ds=Object.getOwnPropertyDescriptor,L=(n,e,t,s)=>{for(var i=s>1?void 0:s?Ds(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&js(e,t,i),i};o.GemLinkElement=(ts=class extends A{constructor(){super();$(this,ce);this.clickHandle=async n=>{var r;const e=this.getPathInfo();if(!e)return;if(this.isExternal(e))switch(this.target){case"_self":window.location.href=e;return;case"_parent":window.parent.location.href=e;return;case"_top":window.top.location.href=e;return;default:window.open(e);return}const{path:t,query:s,hash:i}=S.getParams();if(t+s+i!==e)if(n.stopPropagation(),await((r=this.prepare)==null?void 0:r.call(this)),this.route)S.pushIgnoreCloseHandle(We(C({},Un(this.route,m(this,ce,pt))),{title:this.route.title||this.docTitle}));else if(this.href){const{pathname:a,search:c,hash:l}=new URL(e,location.origin);S.pushIgnoreCloseHandle({path:a,query:c,hash:l,title:this.docTitle})}else S.pushIgnoreCloseHandle({path:this.path,query:this.query,hash:this.hash,title:this.docTitle})},this.preventDefault=n=>{n.preventDefault()},this.tabIndex=0,this.addEventListener("click",this.clickHandle)}getPathInfo(){var n,e;if(this.route){const t=((n=m(this,ce,pt))==null?void 0:n.query)||"",s=((e=m(this,ce,pt))==null?void 0:e.hash)||"";return xt(this.route,m(this,ce,pt))+t+s}else{const t=this.href||this.path+this.query+this.hash,{path:s,query:i}=S.getParams();return t.startsWith("#")?`${s}${i}${t}`:t.startsWith("?")?`${s}${t}`:t.startsWith(".")?bt(s,t):t}}isExternal(n){return!n.startsWith("/")}render(n=this.getPathInfo()){return N`
177
+ ${n!=null?n:V`<slot></slot>`}
178
+ `:V`${n}`}},He=new WeakMap,mt=new WeakMap,pt=new WeakMap,o.GemRouteElement.createLocationStore=()=>{const{path:n,query:e,data:t}=v.getParams();return K({path:n,query:e,data:t,params:{}})},o.GemRouteElement.findRoute=(n=[],e)=>{let t=null,s;n instanceof Array?s=n:s=Object.values(n);for(const i of s)if(i.pattern==="*")t=i;else{const r=Jt(i.pattern,e);if(r)return{route:i,params:r}}return{route:t}},ne([Wn],o.GemRouteElement.prototype,"transition",2),ne([q],o.GemRouteElement.prototype,"routes",2),ne([q],o.GemRouteElement.prototype,"locationStore",2),ne([q],o.GemRouteElement.prototype,"key",2),ne([dt],o.GemRouteElement.prototype,"routechange",2),ne([dt],o.GemRouteElement.prototype,"loading",2),ne([dt],o.GemRouteElement.prototype,"error",2),o.GemRouteElement=ne([ge(v.store)],o.GemRouteElement);class Yn extends o.GemRouteElement{constructor(e={}){super({...e,isLight:!0})}}var Js=Object.defineProperty,Qs=Object.getOwnPropertyDescriptor,k=(n,e,t,s)=>{for(var i=s>1?void 0:s?Qs(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&Js(e,t,i),i};function Zn(n){return!n.startsWith("/")}o.GemLinkElement=(ls=class extends N{constructor(){super();w(this,ae);w(this,_t);w(this,De,void 0);w(this,qe,void 0);w(this,Ue,void 0);T(this,De,async()=>{var r;const e=this.getLocationString();if(!e)return;if(Zn(e))switch(this.target){case"_self":window.location.href=e;return;case"_parent":window.parent.location.href=e;return;case"_top":window.top.location.href=e;return;default:window.open(e);return}const{path:t,query:s,hash:i}=v.getParams();if(t+s+i!==e)if(await((r=this.prepare)==null?void 0:r.call(this)),this.route)v.pushIgnoreCloseHandle({...Qn(this.route,f(this,ae,Be)),title:this.route.title||this.docTitle});else if(this.href){const{pathname:a,search:c,hash:l}=new URL(e,location.origin);v.pushIgnoreCloseHandle({path:a,query:c,hash:l,title:this.docTitle})}else v.pushIgnoreCloseHandle({path:this.path,query:this.query,hash:this.hash,title:this.docTitle})}),T(this,qe,e=>{e.preventDefault()}),T(this,Ue,()=>{const e=this.getLocationString();return Zn(e)?e:new URL(v.basePath+e,location.origin).toString()}),this.tabIndex=0,this.addEventListener("click",f(this,De))}render(){return V`
183
179
  <style>
184
180
  :host {
185
181
  /* link default style */
@@ -197,12 +193,12 @@ var fi=Object.defineProperty,mi=Object.defineProperties;var pi=Object.getOwnProp
197
193
  </style>
198
194
  <a
199
195
  part=${this.link}
200
- @click=${this.preventDefault}
201
- href=${Nt(this.hint==="off"?void 0:this.isExternal(n)?n:new URL(S.basePath+n,location.origin).toString())}
196
+ @click=${f(this,qe)}
197
+ href=${Wt(f(this,_t,us)==="off"?void 0:f(this,Ue).call(this))}
202
198
  >
203
199
  <slot></slot>
204
200
  </a>
205
- `}},ce=new WeakSet,pt=function(){return this.routeOptions||this.options},ts),L([M],o.GemLinkElement.prototype,"href",2),L([M],o.GemLinkElement.prototype,"target",2),L([M],o.GemLinkElement.prototype,"path",2),L([M],o.GemLinkElement.prototype,"query",2),L([M],o.GemLinkElement.prototype,"hash",2),L([M],o.GemLinkElement.prototype,"docTitle",2),L([M],o.GemLinkElement.prototype,"hint",2),L([x],o.GemLinkElement.prototype,"route",2),L([x],o.GemLinkElement.prototype,"options",2),L([x],o.GemLinkElement.prototype,"routeOptions",2),L([x],o.GemLinkElement.prototype,"prepare",2),L([On],o.GemLinkElement.prototype,"link",2),o.GemLinkElement=L([ge(Dn)],o.GemLinkElement),o.GemActiveLinkElement=class extends o.GemLinkElement{render(){const{path:n,query:e,hash:t}=S.getParams(),s=this.pattern&&qt(this.pattern,n),i=this.getPathInfo();return s||n+e+t===i?this.active=!0:this.active=!1,super.render(i)}},L([M],o.GemActiveLinkElement.prototype,"pattern",2),L([st],o.GemActiveLinkElement.prototype,"active",2),o.GemActiveLinkElement=L([ge(S.store)],o.GemActiveLinkElement),customElements.define("gem-link",o.GemLinkElement),customElements.define("gem-active-link",o.GemActiveLinkElement),customElements.define("gem-route",o.GemRouteElement),customElements.define("gem-light-route",Bn);var qs=Object.defineProperty,xs=Object.getOwnPropertyDescriptor,Fn=(n,e,t,s)=>{for(var i=s>1?void 0:s?xs(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&qs(e,t,i),i};o.GemTitleElement=class extends A{static setTitle(n){k(ye,{title:n})}static updateTitle(n="",e=""){const{title:t}=ye;t&&t!==o.GemTitleElement.defaultTitle?(o.GemTitleElement.title=t,document.title=o.GemTitleElement.title+e):n?(o.GemTitleElement.title=n,document.title=o.GemTitleElement.title+e):(o.GemTitleElement.title=o.GemTitleElement.defaultTitle,document.title=o.GemTitleElement.title)}constructor(){super();new MutationObserver(()=>this.update()).observe(this,{childList:!0,characterData:!0,subtree:!0})}render(){return o.GemTitleElement.updateTitle(this.textContent||"",this.suffix),this.hidden?N``:N`${o.GemTitleElement.title}`}},o.GemTitleElement.title=document.title,o.GemTitleElement.defaultTitle=document.title,o.GemTitleElement.defaultSuffix=` - ${document.title}`,Fn([M],o.GemTitleElement.prototype,"suffix",2),o.GemTitleElement=Fn([ge(ye)],o.GemTitleElement),fe(ye,o.GemTitleElement.updateTitle),customElements.define("gem-title",o.GemTitleElement);var Us=Object.defineProperty,Bs=Object.getOwnPropertyDescriptor,ct=(n,e,t,s)=>{for(var i=s>1?void 0:s?Bs(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&Us(e,t,i),i};const zn=new Map;class we extends A{getContent(){const e=this.element||(this.selector?(this.root||document).querySelector(this.selector):null);if(typeof e=="string"){let t=zn.get(e);return t||(t=document.createElement("template"),t.innerHTML=e,zn.set(e,t)),t.content.cloneNode(!0)}else return e instanceof HTMLTemplateElement?e.content.cloneNode(!0):e==null?void 0:e.cloneNode(!0)}render(){return N`
201
+ `}getLocationString(){var e,t;if(this.route){const s=((e=f(this,ae,Be))==null?void 0:e.query)||"",i=((t=f(this,ae,Be))==null?void 0:t.hash)||"";return Qt(this.route,f(this,ae,Be))+s+i}else{const s=this.href||this.path+this.query+this.hash,{path:i,query:r}=v.getParams();return s.startsWith("#")?`${i}${r}${s}`:s.startsWith("?")?`${i}${s}`:s.startsWith(".")?Nt(i,s):s}}},ae=new WeakSet,Be=function(){return this.routeOptions||this.options},_t=new WeakSet,us=function(){return this.hint||"on"},De=new WeakMap,qe=new WeakMap,Ue=new WeakMap,ls),k([$],o.GemLinkElement.prototype,"href",2),k([$],o.GemLinkElement.prototype,"target",2),k([$],o.GemLinkElement.prototype,"path",2),k([$],o.GemLinkElement.prototype,"query",2),k([$],o.GemLinkElement.prototype,"hash",2),k([$],o.GemLinkElement.prototype,"docTitle",2),k([$],o.GemLinkElement.prototype,"hint",2),k([q],o.GemLinkElement.prototype,"route",2),k([q],o.GemLinkElement.prototype,"options",2),k([q],o.GemLinkElement.prototype,"routeOptions",2),k([q],o.GemLinkElement.prototype,"prepare",2),k([Vn],o.GemLinkElement.prototype,"link",2),o.GemLinkElement=k([ge(zn)],o.GemLinkElement),o.GemActiveLinkElement=class extends o.GemLinkElement{constructor(){super(),this.effect(()=>{const{path:n,query:e,hash:t}=v.getParams(),s=this.pattern&&Jt(this.pattern,n);this.active=!!s||n+e+t===this.getLocationString()})}},k([$],o.GemActiveLinkElement.prototype,"pattern",2),k([ut],o.GemActiveLinkElement.prototype,"active",2),o.GemActiveLinkElement=k([ge(v.store)],o.GemActiveLinkElement),customElements.define("gem-link",o.GemLinkElement),customElements.define("gem-active-link",o.GemActiveLinkElement),customElements.define("gem-route",o.GemRouteElement),customElements.define("gem-light-route",Yn);var Ys=Object.defineProperty,Zs=Object.getOwnPropertyDescriptor,Yt=(n,e,t,s)=>{for(var i=s>1?void 0:s?Zs(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&Ys(e,t,i),i};o.GemTitleElement=class extends N{constructor(){super(),new MutationObserver(()=>this.update()).observe(this,{childList:!0,characterData:!0,subtree:!0})}static setTitle(n){C(ye,{title:n})}static updateTitle(n=ye.title,e="",t=""){n===o.GemTitleElement.defaultTitle?document.title=o.GemTitleElement.title=n:(o.GemTitleElement.title=n,document.title=e+o.GemTitleElement.title+t)}render(){return o.GemTitleElement.updateTitle(this.textContent||void 0,this.prefix,this.suffix),this.hidden?V``:V`${o.GemTitleElement.title}`}},o.GemTitleElement.title=document.title,o.GemTitleElement.defaultTitle=document.title,o.GemTitleElement.defaultPrefix=`${document.title} | `,o.GemTitleElement.defaultSuffix=` - ${document.title}`,Yt([$],o.GemTitleElement.prototype,"prefix",2),Yt([$],o.GemTitleElement.prototype,"suffix",2),o.GemTitleElement=Yt([ge(ye)],o.GemTitleElement),de(ye,o.GemTitleElement.updateTitle),customElements.define("gem-title",o.GemTitleElement);var Xs=Object.defineProperty,ei=Object.getOwnPropertyDescriptor,gt=(n,e,t,s)=>{for(var i=s>1?void 0:s?ei(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&Xs(e,t,i),i};const Xn=new Map;class we extends N{constructor(){super(...arguments);w(this,xe,void 0);T(this,xe,()=>{const t=this.element||(this.selector?(this.root||document).querySelector(this.selector):null);if(typeof t=="string"){let s=Xn.get(t);return s||(s=document.createElement("template"),s.innerHTML=t,Xn.set(t,s)),s.content.cloneNode(!0)}else return t instanceof HTMLTemplateElement?t.content.cloneNode(!0):t==null?void 0:t.cloneNode(!0)})}render(){return V`
206
202
  <style>
207
203
  :host(:where(:not([hidden]))) {
208
204
  position: relative;
@@ -214,9 +210,9 @@ var fi=Object.defineProperty,mi=Object.defineProperties;var pi=Object.getOwnProp
214
210
  height: 100%;
215
211
  }
216
212
  </style>
217
- ${this.getContent()}
213
+ ${f(this,xe).call(this)}
218
214
  <slot></slot>
219
- `}}ct([M],we.prototype,"selector",2),ct([x],we.prototype,"root",2),ct([x],we.prototype,"element",2),ct([st],we.prototype,"active",2),customElements.define("gem-use",we);var Fs=Object.defineProperty,zs=Object.getOwnPropertyDescriptor,Kn=(n,e,t,s)=>{for(var i=s>1?void 0:s?zs(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&Fs(e,t,i),i};class lt extends A{constructor(){super();this.effect(()=>{this.shadowRoot&&(this.shadowRoot.innerHTML=`
215
+ `}}xe=new WeakMap,gt([$],we.prototype,"selector",2),gt([q],we.prototype,"root",2),gt([q],we.prototype,"element",2),gt([ut],we.prototype,"active",2),customElements.define("gem-use",we);var ti=Object.defineProperty,ni=Object.getOwnPropertyDescriptor,es=(n,e,t,s)=>{for(var i=s>1?void 0:s?ni(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&ti(e,t,i),i};class yt extends N{constructor(){super(),this.effect(()=>{this.shadowRoot&&(this.shadowRoot.innerHTML=`
220
216
  <style>
221
217
  :host(:where(:not([hidden]))) {
222
218
  display: contents;
@@ -224,4 +220,4 @@ var fi=Object.defineProperty,mi=Object.defineProperties;var pi=Object.getOwnProp
224
220
  ${this.contentcss}
225
221
  </style>
226
222
  ${this.content}
227
- `)},()=>[this.content,this.contentcss])}render(){}}Kn([M],lt.prototype,"content",2),Kn([M],lt.prototype,"contentcss",2),customElements.define("gem-unsafe",lt);var Ks=Object.defineProperty,Js=Object.getOwnPropertyDescriptor,Qs=(n,e,t,s)=>{for(var i=s>1?void 0:s?Js(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&Ks(e,t,i),i};class Ut extends A{constructor(){super({isLight:!0});this.target=document.head,this.hidden=!0,this.dataset.gemReflect="",this.effect(()=>{const e=[...this.childNodes];return e.forEach(t=>{t instanceof HTMLElement&&(t.dataset.reflect=""),this.target.append(t)}),()=>{e.forEach(t=>t.remove())}},()=>[this.target])}}Qs([x],Ut.prototype,"target",2),customElements.define("gem-reflect",Ut);const ht=Symbol("open mark");function Ys(n){var e;return e=class extends A{constructor(){super();this.label="",this.internals.role="alertdialog",this.internals.ariaModal="true"}static get isOpen(){return this.store[ht]}static get observedStores(){return[S.store,this.store]}static open(t){const s=new this;this.instance=s,this.inertStore=[...document.body.children].filter(r=>!r.inert),this.inertStore.forEach(r=>r.inert=!0),document.body.append(s);const i=()=>k(this.store,C({[ht]:!0},t));setTimeout(()=>{i(),S.push({title:s.label,open:i,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})},100)}static close(){S.back()}static closeHandle(){var t;this.inertStore.forEach(s=>s.inert=!1),(t=this.instance)==null||t.remove(),k(this.store,C({[ht]:!1},n))}static shouldClose(){return!0}},e.inertStore=[],e.instance=null,e.store=J(C({[ht]:!1},n)),e}var Zs=Object.defineProperty,Xs=Object.getOwnPropertyDescriptor,Bt=(n,e,t,s)=>{for(var i=s>1?void 0:s?Xs(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&Zs(e,t,i),i};o.GemDialogBaseElement=(ns=class extends A{constructor(){super();$(this,Se,void 0);$(this,ve,void 0);$(this,le,void 0);this.inert=!0,G(this,le,[]),this.closeHandle=()=>{var n;this.inert=!0,m(this,le).forEach(e=>e.inert=!1),m(this,Se)?m(this,Se).before(this):m(this,ve)&&((n=m(this,ve))==null||n.appendChild(this)),this.dispatchEvent(new CustomEvent("close")),this.opened=!1},this.openHandle=()=>{this.hidden=!1,this.inert=!1,G(this,Se,this.nextSibling),G(this,ve,this.parentElement||this.getRootNode()),G(this,le,[...document.body.children].filter(n=>!n.inert)),m(this,le).forEach(n=>n.inert=!0),document.body.append(this),this.dispatchEvent(new CustomEvent("open")),this.opened=!0},this.open=()=>{this.opened||(this.openHandle(),S.push({title:this.label,open:this.openHandle,close:this.closeHandle,shouldClose:this.shouldClose}))},this.close=()=>{S.back()},this.forceClose=()=>{this.opened=!1,setTimeout(this.close,100)},this.internals.role="dialog",this.internals.ariaModal="true"}shouldClose(){return!0}},Se=new WeakMap,ve=new WeakMap,le=new WeakMap,ns),Bt([M],o.GemDialogBaseElement.prototype,"label",2),Bt([st],o.GemDialogBaseElement.prototype,"opened",2),o.GemDialogBaseElement=Bt([ge(S.store)],o.GemDialogBaseElement);const Ft=new WeakMap;function Jn(n){return Ft.get(n)}const zt=new WeakMap;function ei(n){return zt.get(n)}function ti(n,e){const t=Ft.get(e),s=zt.get(e),i=Object.keys(t).reduce((r,a)=>!t[a]||!s[a]?r:r+`${s[a]}:${t[a]};`,"");n.textContent=`:root, :host {${i}}`}function ni(n){const e=De(),t=document.createElement("style"),s=J(n),i={},r={};zt.set(i,r),Ft.set(i,s),Object.keys(s).forEach(c=>{r[c]=`--${D(c)}-${e}`,i[c]=`var(${r[c]})`});const a=()=>ti(t,i);return fe(s,a),a(),(document.head||document.documentElement).append(t),i}function si(n,e){const t=Jn(n);k(t,e)}const ii=/\$\d(?:<[^>]*>)?/,ri=/\$(\d)(<([^>]*)>)?/g,oi=3;function Qn(n,...e){const t=n.split(ii),s=[];let i;for(;i=ri.exec(n);){const r=i[oi],a=Number(i[1])-1,c=e[a];s.push(typeof c=="function"?c(r):c)}return N(t,...s)}const Ie=new Set,Kt=class{constructor(e){$(this,be);$(this,dt);$(this,ft);$(this,he);$(this,Pe);if(this.cachePrefix="gem-i18n",!e.resources[e.fallbackLanguage])throw new K("i18n: fallbackLanguage invalid");this.store=J(this),Object.assign(this,e);let t=m(this,dt,wi)||this.currentLanguage||m(this,ft,Ei);const s=document.querySelector(`[type*=${this.cachePrefix}]`);if(s)try{const i=JSON.parse(s.textContent||"");t=i.currentLanguage,this.resources[i.currentLanguage]=i.currentLanguagePack}catch{}t?(G(this,Pe,t,Zt),this.setLanguage(t)):this.resetLanguage()}get(e,...t){const s=this.resources[this.currentLanguage],i=this.resources[this.fallbackLanguage],r=s[e]||i[e],a=(r==null?void 0:r.message)||r||`[${e}]`;return t.length?Qn(a,...t):a}detectLanguage(){const e=Object.keys(this.resources),t=navigator.languages.map(s=>s.replace(/-(.*)/,i=>i.toUpperCase()));for(const s of t){const i=e.find(r=>r===s||s.startsWith(`${r}-`));if(i)return i}return this.fallbackLanguage}async setLanguage(e){m(this,he,gt)&&Ie.forEach(async i=>await i.setLanguage(e));let t;const s=this.resources[e];if(!s)return console.warn(`${this.cachePrefix}: not found \`${e}\``),this.resetLanguage();if(typeof s=="string"){const i=`${this.cachePrefix}:`,r=`${i}${s}`,a=localStorage.getItem(r),c=async()=>{const l=await(await fetch(s)).json();if(this.cache){for(let h=0;h<localStorage.length;h++){const p=localStorage.key(h);p.startsWith(i)&&localStorage.removeItem(p)}localStorage.setItem(r,JSON.stringify(l))}return l};if(a)try{t=JSON.parse(a)}catch{t=await c()}else t=await c()}else t=s;return this.resources[e]=t,k(this.store,{}),e!==this.currentLanguage&&G(this,Pe,e,Zt),this.cache===!0&&this.setCache(),e}resetLanguage(){return m(this,he,gt)&&Ie.forEach(e=>e.resetLanguage()),G(this,Pe,this.fallbackLanguage,Zt),this.cache&&localStorage.removeItem(m(this,be,Yt)),this.setLanguage(this.detectLanguage())}setCache(){m(this,he,gt)&&Ie.forEach(e=>e.setCache()),localStorage.setItem(m(this,be,Yt),this.currentLanguage)}createSubModule(e,t){const s=new Kt({resources:t,cachePrefix:`${this.cachePrefix}-${e}`,currentLanguage:this.currentLanguage,fallbackLanguage:this.fallbackLanguage,cache:this.cache});return Ie.add(s),s}toJSON(){return{currentLanguage:this.currentLanguage,currentLanguagePack:this.resources[this.currentLanguage]}}};let Yn=Kt;be=new WeakSet,Yt=function(){return`${this.cachePrefix}:current`},dt=new WeakSet,wi=function(){const{hostname:e,pathname:t,search:s}=location,i=e.split(".");switch(this.urlParamsType){case"ccTLD":return i.pop();case"gTLD":return i.shift();case"path":return t.split("/")[1];default:const r=this.urlParamsName&&new URLSearchParams(s).get(this.urlParamsName)||"";return r in this.resources?r:""}},ft=new WeakSet,Ei=function(){return this.cache&&localStorage.getItem(m(this,be,Yt))||""},he=new WeakSet,gt=function(){return!Ie.has(this)},Pe=new WeakSet,Zt=function(e){var t;m(this,he,gt)&&(document.documentElement.lang=e),this.currentLanguage=e,(t=this.onChange)==null||t.call(this,e)};const Zn={headers:{"Content-Type":"application/json"}};async function Ve(n,e={}){const t=await fetch(n,C(C({},Zn),e));if(t.status===0)throw new Error("Request fail");if(t.status>=500)throw new Error(t.statusText);try{const s=await t.json();if(t.status>=400)throw new Error((s==null?void 0:s.message)||t.statusText,{cause:s});return s}catch{throw new Error("Server error")}}const ai=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)).constructor;function Xn(n){return n instanceof FormData||n instanceof Blob||n instanceof ai||n instanceof URLSearchParams||n instanceof ReadableStream||n instanceof ArrayBuffer?n:typeof n=="object"?JSON.stringify(n):n}function es(n,e){const{origin:t,pathname:s,search:i}=new URL(n,location.origin),r=new URLSearchParams(e).toString();return`${t}${s}${i?`${i}&`:r?"?":""}${r}`}function ci(n,e){return Ve(es(n,e),{method:"GET"})}function li(n,e){return Ve(es(n,e),{method:"DELETE"})}function hi(n,e){return Ve(n,{method:"PUT",body:Xn(e)})}function ui(n,e){return Ve(n,{method:"POST",body:Xn(e)})}const R=n=>window.matchMedia(n).matches,di={PRINT:"print",get isPrint(){return R(this.PRINT)},HOVER:"(hover: hover)",get isHover(){return R(this.HOVER)},PHONE:"(min-width: 319px) and (max-width: 480px)",get isPhone(){return R(this.PHONE)},LAPTOP:"(min-width: 1023px) and (max-width: 1280px) and (orientation: landscape)",get isLaptop(){return R(this.LAPTOP)},DESKTOP:"(min-width: 1279px) and (orientation: landscape)",get isDesktop(){return R(this.DESKTOP)},WIDTHSCREEN:"(min-width: 1919px) and (orientation: landscape)",get isWidthScreen(){return R(this.WIDTHSCREEN)},PHONE_LANDSCAPE:"(min-width: 479px) and (max-width: 959px) and (orientation: landscape)",get isPhoneLandscape(){return R(this.PHONE_LANDSCAPE)},TABLET:"(min-width: 768px) and (max-width: 1024px)",get isTablet(){return R(this.TABLET)},SMALL_PHONE:"(min-width: 319px) and (max-width: 480px) and (max-height: 640px)",get isSmallPhone(){return R(this.SMALL_PHONE)},WATCH:"(max-width: 319px)",get isWatch(){return R(this.WATCH)},SHORT:"(min-width: 479px) and (max-height: 320px)",get isShort(){return R(this.SHORT)},PWA:"(display-mode: standalone)",get isPWA(){return R(this.PWA)},MOTION_REDUCE:"(prefers-reduced-motion: reduce)",get isMotionReduce(){return R(this.MOTION_REDUCE)},DATA_REDUCE:"(prefers-reduced-data: reduce)",get isDataReduce(){return R(this.DATA_REDUCE)}};o.GemElement=A,o.GemError=K,o.GemLightRouteElement=Bn,o.GemReflectElement=Ut,o.GemUnsafeElement=lt,o.GemUseElement=we,o.I18n=Yn,o.LinkedList=mn,o.PropProxyMap=pn,o.QueryString=Ne,o.SVGTemplateResult=Et,o.SheetToken=Pt,o.StoreListenerMap=de,o.TemplateResult=ke,o.absoluteLocation=bt,o.addMicrotask=j,o.addMicrotaskToStack=gs,o.adoptedStyle=Ms,o.attribute=M,o.basePathStore=Dn,o.boolattribute=Mn,o.camelToKebabCase=D,o.classMap=En,o.cleanObject=qe,o.connect=fe,o.connectStore=ge,o.createCSSSheet=ws,o.createHistoryParams=Un,o.createModalClass=Ys,o.createPath=xt,o.createStore=J,o.createStoreSet=Ps,o.createTheme=ni,o.css=ys,o.customElement=Rs,o.defaultReqInit=Zn,o.defineAttribute=Xe,o.defineCSSState=tt,o.defineProperty=pe,o.defineRef=et,o.del=li,o.directive=Y,o.disconnect=_n,o.emitter=it,o.exportPartsMap=bs,o.get=ci,o.getThemeProp=ei,o.getThemeStore=Jn,o.globalemitter=Ns,o.guard=kn,o.history=S,o.html=N,o.ifDefined=Nt,o.isArrayChange=yn,o.kebabToCamelCase=X,o.matchPath=qt,o.mediaQuery=di,o.nativeDefineElement=nt,o.numattribute=Ls,o.objectMapToString=xe,o.part=On,o.partMap=vs,o.post=ui,o.property=x,o.put=hi,o.randomStr=De,o.raw=Me,o.refobject=ks,o.removeItems=wn,o.render=je,o.repeat=Cn,o.request=Ve,o.rootElement=Os,o.slot=$s,o.splice=Qn,o.state=st,o.styleMap=Ss,o.styled=_s,o.svg=fn,o.titleStore=ye,o.updateStore=k,o.updateTheme=si,o.version=Sn,Object.defineProperty(o,"__esModule",{value:!0}),o[Symbol.toStringTag]="Module"});
223
+ `)},()=>[this.content,this.contentcss])}render(){}}es([$],yt.prototype,"content",2),es([$],yt.prototype,"contentcss",2),customElements.define("gem-unsafe",yt);var si=Object.defineProperty,ii=Object.getOwnPropertyDescriptor,ri=(n,e,t,s)=>{for(var i=s>1?void 0:s?ii(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&si(e,t,i),i};class Zt extends N{constructor(){super({isLight:!0}),this.target=document.head,this.hidden=!0,this.dataset.gemReflect="",this.effect(()=>{const e=[...this.childNodes];return e.forEach(t=>{t instanceof HTMLElement&&(t.dataset.reflect=""),this.target.append(t)}),()=>{e.forEach(t=>t.remove())}},()=>[this.target])}}ri([q],Zt.prototype,"target",2),customElements.define("gem-reflect",Zt);const wt=Symbol("open mark");function oi(n){var e;const t=Symbol();return e=class extends N{constructor(){super(),this.label="",this.internals.role="alertdialog",this.internals.ariaModal="true"}static get isOpen(){return this.store[wt]}static get observedStores(){return[v.store,this.store]}static open(s){const i=new this;this.instance=i,this.inertStore=[...document.body.children].filter(a=>!a.inert),this.inertStore.forEach(a=>a.inert=!0),document.body.append(i);const r=()=>C(this.store,{[wt]:!0,...s});return setTimeout(()=>{r(),v.push({title:i.label,open:r,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})},100),t}static close(){return v.back(),t}static closeHandle(){var s;return this.inertStore.forEach(i=>i.inert=!1),(s=this.instance)==null||s.remove(),C(this.store,{[wt]:!1,...n}),t}static shouldClose(){return!0}},e.inertStore=[],e.instance=null,e.store=K({[wt]:!1,...n}),e}var ai=Object.defineProperty,ci=Object.getOwnPropertyDescriptor,Xt=(n,e,t,s)=>{for(var i=s>1?void 0:s?ci(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&ai(e,t,i),i};const We=Symbol();o.GemDialogBaseElement=(hs=class extends N{constructor(){super();w(this,_e,void 0);w(this,ve,void 0);w(this,ce,void 0);T(this,ce,[]),this.closeHandle=()=>{var e;return this.inert=!0,f(this,ce).forEach(t=>t.inert=!1),f(this,_e)?f(this,_e).before(this):f(this,ve)&&((e=f(this,ve))==null||e.appendChild(this)),this.dispatchEvent(new CustomEvent("close")),this.opened=!1,We},this.openHandle=()=>(this.hidden=!1,this.inert=!1,T(this,_e,this.nextSibling),T(this,ve,this.parentElement||this.getRootNode()),T(this,ce,[...document.body.children].filter(e=>!e.inert)),f(this,ce).forEach(e=>e.inert=!0),document.body.append(this),this.dispatchEvent(new CustomEvent("open")),this.opened=!0,We),this.open=()=>{if(!this.opened)return this.openHandle(),v.push({title:this.label,open:this.openHandle,close:this.closeHandle,shouldClose:this.shouldClose}),We},this.close=()=>(v.back(),We),this.forceClose=()=>(this.opened=!1,setTimeout(this.close,100),We),this.inert=!0,this.internals.role="dialog",this.internals.ariaModal="true"}shouldClose(){return!0}},_e=new WeakMap,ve=new WeakMap,ce=new WeakMap,hs),Xt([$],o.GemDialogBaseElement.prototype,"label",2),Xt([ut],o.GemDialogBaseElement.prototype,"opened",2),o.GemDialogBaseElement=Xt([ge(v.store)],o.GemDialogBaseElement);const ts=new WeakMap;function ns(n){return ts.get(n)}const ss=new WeakMap;function li(n){return ss.get(n)}const is=new WeakMap;function hi(n){const e=Ke(),t=document.createElement("style"),s=K(n),i={},r={};ss.set(i,r),ts.set(i,s);const a=()=>Object.keys(s).forEach(h=>{r[h]||(r[h]=`--${j(h)}-${e}`,i[h]=`var(${r[h]})`)});is.set(i,a),a();const c=()=>`:root, :host {${Object.keys(s).reduce((h,p)=>h+`${r[p]}:${s[p]};`,"")}}`,l=()=>t.textContent=c();return de(s,l),l(),(document.head||document.documentElement).append(t),i}function ui(n,e){C(ns(n),e),is.get(n)()}const di=/\$\d(?:<[^>]*>)?/,fi=/\$(\d)(<([^>]*)>)?/g,mi=3;function rs(n,...e){const t=n.split(di),s=[];let i;for(;i=fi.exec(n);){const r=i[mi],a=Number(i[1])-1,c=e[a];s.push(typeof c=="function"?c(r):c)}return V(t,...s)}const Ve=new Set,tn=class{constructor(e){w(this,Se);w(this,vt);w(this,St);w(this,le);w(this,be);if(this.cachePrefix="gem-i18n",!e.resources[e.fallbackLanguage])throw new z("i18n: fallbackLanguage invalid");this.store=K(this),Object.assign(this,e);let t=f(this,vt,ds)||this.currentLanguage||f(this,St,fs);const s=document.querySelector(`[type*=${this.cachePrefix}]`);if(s)try{const i=JSON.parse(s.textContent||"");t=i.currentLanguage,this.resources[i.currentLanguage]=i.currentLanguagePack}catch{}t?(T(this,be,t,Pt),this.setLanguage(t)):this.resetLanguage()}get(e,...t){const s=this.resources[this.currentLanguage],i=this.resources[this.fallbackLanguage],r=s[e]||i[e],a=(r==null?void 0:r.message)||r||`[${e}]`;return t.length?rs(a,...t):a}detectLanguage(){const e=Object.keys(this.resources),t=navigator.languages.map(s=>s.replace(/-(.*)/,i=>i.toUpperCase()));for(const s of t){const i=e.find(r=>r===s||s.startsWith(`${r}-`));if(i)return i}return this.fallbackLanguage}async setLanguage(e){f(this,le,Fe)&&Ve.forEach(async i=>await i.setLanguage(e));let t;const s=this.resources[e];if(!s)return console.warn(`${this.cachePrefix}: not found \`${e}\``),this.resetLanguage();if(typeof s=="string"){const i=`${this.cachePrefix}:`,r=`${i}${s}`,a=localStorage.getItem(r),c=async()=>{const l=await(await fetch(s)).json();if(this.cache){for(let h=0;h<localStorage.length;h++){const p=localStorage.key(h);p.startsWith(i)&&localStorage.removeItem(p)}localStorage.setItem(r,JSON.stringify(l))}return l};if(a)try{t=JSON.parse(a)}catch{t=await c()}else t=await c()}else t=s;return this.resources[e]=t,C(this.store,{}),e!==this.currentLanguage&&T(this,be,e,Pt),this.cache===!0&&this.setCache(),e}resetLanguage(){return f(this,le,Fe)&&Ve.forEach(e=>e.resetLanguage()),T(this,be,this.fallbackLanguage,Pt),this.cache&&localStorage.removeItem(f(this,Se,bt)),this.setLanguage(this.detectLanguage())}setCache(){f(this,le,Fe)&&Ve.forEach(e=>e.setCache()),localStorage.setItem(f(this,Se,bt),this.currentLanguage)}createSubModule(e,t){const s=new tn({resources:t,cachePrefix:`${this.cachePrefix}-${e}`,currentLanguage:this.currentLanguage,fallbackLanguage:this.fallbackLanguage,cache:this.cache});return Ve.add(s),s}toJSON(){return{currentLanguage:this.currentLanguage,currentLanguagePack:this.resources[this.currentLanguage]}}};let en=tn;Se=new WeakSet,bt=function(){return`${this.cachePrefix}:current`},vt=new WeakSet,ds=function(){const{hostname:e,pathname:t,search:s}=location,i=e.split(".");switch(this.urlParamsType){case"ccTLD":return i.pop();case"gTLD":return i.shift();case"path":return t.split("/")[1];default:const r=this.urlParamsName&&new URLSearchParams(s).get(this.urlParamsName)||"";return r in this.resources?r:""}},St=new WeakSet,fs=function(){return this.cache&&localStorage.getItem(f(this,Se,bt))||""},le=new WeakSet,Fe=function(){return!Ve.has(this)},be=new WeakSet,Pt=function(e){var t;f(this,le,Fe)&&(document.documentElement.lang=e),this.currentLanguage=e,(t=this.onChange)==null||t.call(this,e)};const os={headers:{"Content-Type":"application/json"}};async function Ie(n,e={}){const t=await fetch(n,{...os,...e});if(t.status===0)throw new Error("Request fail");if(t.status>=500)throw new Error(t.statusText);try{const s=await t.json();if(t.status>=400)throw new Error((s==null?void 0:s.message)||t.statusText,{cause:s});return s}catch{throw new Error("Server error")}}const pi=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)).constructor;function as(n){return n instanceof FormData||n instanceof Blob||n instanceof pi||n instanceof URLSearchParams||n instanceof ReadableStream||n instanceof ArrayBuffer?n:typeof n=="object"?JSON.stringify(n):n}function cs(n,e){const{origin:t,pathname:s,search:i}=new URL(n,location.origin),r=new URLSearchParams(e).toString();return`${t}${s}${i?`${i}&`:r?"?":""}${r}`}function gi(n,e){return Ie(cs(n,e),{method:"GET"})}function yi(n,e){return Ie(cs(n,e),{method:"DELETE"})}function wi(n,e){return Ie(n,{method:"PUT",body:as(e)})}function Ei(n,e){return Ie(n,{method:"POST",body:as(e)})}const R=n=>window.matchMedia(n).matches,_i={PRINT:"print",get isPrint(){return R(this.PRINT)},HOVER:"(hover: hover)",get isHover(){return R(this.HOVER)},PWA:"(display-mode: standalone)",get isPWA(){return R(this.PWA)},MOTION_REDUCE:"(prefers-reduced-motion: reduce)",get isMotionReduce(){return R(this.MOTION_REDUCE)},DATA_REDUCE:"(prefers-reduced-data: reduce)",get isDataReduce(){return R(this.DATA_REDUCE)},WATCH:"(width < 320px)",get isWatch(){return R(this.WATCH)},SMALL_PHONE:"(320px <= width <= 480px) and (height <= 640px)",get isSmallPhone(){return R(this.SMALL_PHONE)},PHONE:"(320px <= width <= 480px)",get isPhone(){return R(this.PHONE)},PHONE_LANDSCAPE:"(480px < width < 960px) and (orientation: landscape)",get isPhoneLandscape(){return R(this.PHONE_LANDSCAPE)},SHORT:"(width >= 480px) and (height <= 320px)",get isShort(){return R(this.SHORT)},TABLET:"(480px < width <= 1280px)",get isTablet(){return R(this.TABLET)},DESKTOP:"(width > 1280px) and (orientation: landscape)",get isDesktop(){return R(this.DESKTOP)},WIDTHSCREEN:"(width >= 1920px) and (orientation: landscape)",get isWidthScreen(){return R(this.WIDTHSCREEN)}};o.GemElement=N,o.GemError=z,o.GemLightRouteElement=Yn,o.GemReflectElement=Zt,o.GemUnsafeElement=yt,o.GemUseElement=we,o.I18n=en,o.LinkedList=_n,o.PropProxyMap=vn,o.QueryString=$e,o.SVGTemplateResult=kt,o.SheetToken=Ot,o.StoreListenerMap=ue,o.TemplateResult=Ce,o.absoluteLocation=Nt,o.addMicrotask=I,o.addMicrotaskToStack=Ts,o.adoptedStyle=js,o.attribute=$,o.basePathStore=zn,o.boolattribute=Wn,o.camelToKebabCase=j,o.classMap=Tn,o.cleanObject=Je,o.connect=de,o.connectStore=ge,o.createCSSSheet=ks,o.createHistoryParams=Qn,o.createModalClass=oi,o.createPath=Qt,o.createStore=K,o.createStoreSet=Rs,o.createTheme=hi,o.css=Cs,o.customElement=qs,o.defaultReqInit=os,o.defineAttribute=at,o.defineCSSState=lt,o.defineProperty=pe,o.defineRef=ct,o.del=yi,o.directive=Q,o.disconnect=Cn,o.emitter=dt,o.exportPartsMap=Os,o.get=gi,o.getThemeProps=li,o.getThemeStore=ns,o.globalemitter=Is,o.guard=Rn,o.history=v,o.html=V,o.ifDefined=Wt,o.isArrayChange=bn,o.kebabToCamelCase=Z,o.matchPath=Jt,o.mediaQuery=_i,o.nativeDefineElement=ht,o.numattribute=Ws,o.objectMapToString=Qe,o.part=Vn,o.partMap=Ns,o.post=Ei,o.property=q,o.put=wi,o.randomStr=Ke,o.raw=Me,o.refobject=Hs,o.removeItems=Pn,o.render=ze,o.repeat=On,o.request=Ie,o.rootElement=Ds,o.slot=Vs,o.splice=rs,o.state=ut,o.styleMap=Ms,o.styled=$s,o.svg=En,o.titleStore=ye,o.updateStore=C,o.updateTheme=ui,o.version=kn,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -1,7 +1,7 @@
1
1
  import { GemElement } from '../../lib/element';
2
+ declare const final: unique symbol;
2
3
  /**
3
4
  * 在模版中声明的 dialog,使用 `open` 方法 打开;
4
- * 如果要应用关闭动画,可以在动画执行完后设置 `hidden` 属性;
5
5
  * 模拟 top layer:https://github.com/whatwg/html/issues/4633.
6
6
  *
7
7
  * @attr label
@@ -12,29 +12,29 @@ export declare abstract class GemDialogBaseElement extends GemElement {
12
12
  #private;
13
13
  label: string;
14
14
  opened: boolean;
15
- inert: boolean;
16
15
  constructor();
17
16
  /**
18
17
  * @final
19
18
  * 进入关闭状态
20
19
  */
21
- closeHandle: () => void;
20
+ closeHandle: () => symbol;
22
21
  /**
23
22
  * @final
24
23
  * 进入打开状态
25
24
  */
26
- openHandle: () => void;
25
+ openHandle: () => symbol;
27
26
  /**@final */
28
- open: () => void;
27
+ open: () => typeof final | undefined;
29
28
  shouldClose(): boolean;
30
29
  /**@final */
31
- close: () => void;
30
+ close: () => symbol;
32
31
  /**
33
32
  * @final
34
33
  * 跳过 `shouldClose` 强制关闭
35
34
  * 避免 `shouldClose` 中造成无限循环
36
35
  * 延时关闭避免同步操作 history
37
36
  */
38
- forceClose: () => void;
37
+ forceClose: () => symbol;
39
38
  }
39
+ export {};
40
40
  //# sourceMappingURL=dialog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/elements/base/dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI/C;;;;;;;;GAQG;AACH,8BACsB,oBAAqB,SAAQ,UAAU;;IAChD,KAAK,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAEvB,KAAK,UAAQ;;IAYb;;;OAGG;IACH,WAAW,aAUT;IAEF;;;OAGG;IACH,UAAU,aAUR;IAEF,YAAY;IACZ,IAAI,aASF;IAEF,WAAW;IAIX,YAAY;IACZ,KAAK,aAEH;IAEF;;;;;OAKG;IACH,UAAU,aAGR;CACH"}
1
+ {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/elements/base/dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI/C,QAAA,MAAM,KAAK,eAAW,CAAC;AAEvB;;;;;;;GAOG;AACH,8BACsB,oBAAqB,SAAQ,UAAU;;IAChD,KAAK,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;;IAavB;;;OAGG;IACH,WAAW,eAWT;IAEF;;;OAGG;IACH,UAAU,eAWR;IAEF,YAAY;IACZ,IAAI,iCAUF;IAEF,WAAW;IAIX,YAAY;IACZ,KAAK,eAGH;IAEF;;;;;OAKG;IACH,UAAU,eAIR;CACH"}
@@ -19,9 +19,9 @@ var _GemDialogBaseElement_nextSibling, _GemDialogBaseElement_parentElement, _Gem
19
19
  import { GemElement } from '../../lib/element';
20
20
  import { attribute, state, connectStore } from '../../lib/decorators';
21
21
  import { history } from '../../lib/history';
22
+ const final = Symbol();
22
23
  /**
23
24
  * 在模版中声明的 dialog,使用 `open` 方法 打开;
24
- * 如果要应用关闭动画,可以在动画执行完后设置 `hidden` 属性;
25
25
  * 模拟 top layer:https://github.com/whatwg/html/issues/4633.
26
26
  *
27
27
  * @attr label
@@ -31,7 +31,6 @@ import { history } from '../../lib/history';
31
31
  let GemDialogBaseElement = class GemDialogBaseElement extends GemElement {
32
32
  constructor() {
33
33
  super();
34
- this.inert = true;
35
34
  _GemDialogBaseElement_nextSibling.set(this, void 0);
36
35
  _GemDialogBaseElement_parentElement.set(this, void 0);
37
36
  _GemDialogBaseElement_inertStore.set(this, []);
@@ -51,6 +50,7 @@ let GemDialogBaseElement = class GemDialogBaseElement extends GemElement {
51
50
  }
52
51
  this.dispatchEvent(new CustomEvent('close'));
53
52
  this.opened = false;
53
+ return final;
54
54
  };
55
55
  /**
56
56
  * @final
@@ -66,6 +66,7 @@ let GemDialogBaseElement = class GemDialogBaseElement extends GemElement {
66
66
  document.body.append(this);
67
67
  this.dispatchEvent(new CustomEvent('open'));
68
68
  this.opened = true;
69
+ return final;
69
70
  };
70
71
  /**@final */
71
72
  this.open = () => {
@@ -78,10 +79,12 @@ let GemDialogBaseElement = class GemDialogBaseElement extends GemElement {
78
79
  close: this.closeHandle,
79
80
  shouldClose: this.shouldClose,
80
81
  });
82
+ return final;
81
83
  };
82
84
  /**@final */
83
85
  this.close = () => {
84
86
  history.back();
87
+ return final;
85
88
  };
86
89
  /**
87
90
  * @final
@@ -92,7 +95,9 @@ let GemDialogBaseElement = class GemDialogBaseElement extends GemElement {
92
95
  this.forceClose = () => {
93
96
  this.opened = false;
94
97
  setTimeout(this.close, 100);
98
+ return final;
95
99
  };
100
+ this.inert = true;
96
101
  this.internals.role = 'dialog';
97
102
  this.internals.ariaModal = 'true';
98
103
  }
@@ -100,7 +105,9 @@ let GemDialogBaseElement = class GemDialogBaseElement extends GemElement {
100
105
  return true;
101
106
  }
102
107
  };
103
- _GemDialogBaseElement_nextSibling = new WeakMap(), _GemDialogBaseElement_parentElement = new WeakMap(), _GemDialogBaseElement_inertStore = new WeakMap();
108
+ _GemDialogBaseElement_nextSibling = new WeakMap();
109
+ _GemDialogBaseElement_parentElement = new WeakMap();
110
+ _GemDialogBaseElement_inertStore = new WeakMap();
104
111
  __decorate([
105
112
  attribute
106
113
  ], GemDialogBaseElement.prototype, "label", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../src/elements/base/dialog.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C;;;;;;;;GAQG;AAEH,IAAsB,oBAAoB,GAA1C,MAAsB,oBAAqB,SAAQ,UAAU;IAU3D;QACE,KAAK,EAAE,CAAC;QAPV,UAAK,GAAG,IAAI,CAAC;QAEb,oDAA+B;QAC/B,sDAA4B;QAC5B,2CAA6B,EAAE,EAAC;QAQhC;;;WAGG;QACH,gBAAW,GAAG,GAAG,EAAE;;YACjB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;YAClB,uBAAA,IAAI,wCAAY,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC;YACnD,IAAI,uBAAA,IAAI,yCAAa,EAAE;gBACrB,uBAAA,IAAI,yCAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;aAChC;iBAAM,IAAI,uBAAA,IAAI,2CAAe,EAAE;gBAC9B,MAAA,uBAAA,IAAI,2CAAe,0CAAE,WAAW,CAAC,IAAI,CAAC,CAAC;aACxC;YACD,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;YAC7C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACtB,CAAC,CAAC;QAEF;;;WAGG;QACH,eAAU,GAAG,GAAG,EAAE;YAChB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YACpB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;YACnB,uBAAA,IAAI,qCAAgB,IAAI,CAAC,WAAW,MAAA,CAAC;YACrC,uBAAA,IAAI,uCAAkB,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,WAAW,EAAE,MAAA,CAAC;YAC/D,uBAAA,IAAI,oCAAgB,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAA,CAAC;YAC1F,uBAAA,IAAI,wCAAY,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC;YAClD,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAC3B,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;YAC5C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACrB,CAAC,CAAC;QAEF,YAAY;QACZ,SAAI,GAAG,GAAG,EAAE;YACV,IAAI,IAAI,CAAC,MAAM;gBAAE,OAAO;YACxB,IAAI,CAAC,UAAU,EAAE,CAAC;YAClB,OAAO,CAAC,IAAI,CAAC;gBACX,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,IAAI,EAAE,IAAI,CAAC,UAAU;gBACrB,KAAK,EAAE,IAAI,CAAC,WAAW;gBACvB,WAAW,EAAE,IAAI,CAAC,WAAW;aAC9B,CAAC,CAAC;QACL,CAAC,CAAC;QAMF,YAAY;QACZ,UAAK,GAAG,GAAG,EAAE;YACX,OAAO,CAAC,IAAI,EAAE,CAAC;QACjB,CAAC,CAAC;QAEF;;;;;WAKG;QACH,eAAU,GAAG,GAAG,EAAE;YAChB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YACpB,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAC9B,CAAC,CAAC;QAlEA,IAAI,CAAC,SAAS,CAAC,IAAI,GAAG,QAAQ,CAAC;QAC/B,IAAI,CAAC,SAAS,CAAC,SAAS,GAAG,MAAM,CAAC;IACpC,CAAC;IA8CD,WAAW;QACT,OAAO,IAAI,CAAC;IACd,CAAC;CAiBF,CAAA;;AA9EY;IAAV,SAAS;mDAAe;AAClB;IAAN,KAAK;oDAAiB;AAFH,oBAAoB;IADzC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC;GACN,oBAAoB,CA+EzC;SA/EqB,oBAAoB"}
1
+ {"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../src/elements/base/dialog.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC;AAEvB;;;;;;;GAOG;AAEI,IAAe,oBAAoB,GAAnC,MAAe,oBAAqB,SAAQ,UAAU;IAQ3D;QACE,KAAK,EAAE,CAAC;QALV,oDAA+B;QAC/B,sDAA4B;QAC5B,2CAA6B,EAAE,EAAC;QAShC;;;WAGG;QACH,gBAAW,GAAG,GAAG,EAAE;;YACjB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;YAClB,uBAAA,IAAI,wCAAY,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC;YACnD,IAAI,uBAAA,IAAI,yCAAa,EAAE,CAAC;gBACtB,uBAAA,IAAI,yCAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACjC,CAAC;iBAAM,IAAI,uBAAA,IAAI,2CAAe,EAAE,CAAC;gBAC/B,MAAA,uBAAA,IAAI,2CAAe,0CAAE,WAAW,CAAC,IAAI,CAAC,CAAC;YACzC,CAAC;YACD,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;YAC7C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YACpB,OAAO,KAAK,CAAC;QACf,CAAC,CAAC;QAEF;;;WAGG;QACH,eAAU,GAAG,GAAG,EAAE;YAChB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YACpB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;YACnB,uBAAA,IAAI,qCAAgB,IAAI,CAAC,WAAW,MAAA,CAAC;YACrC,uBAAA,IAAI,uCAAkB,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,WAAW,EAAE,MAAA,CAAC;YAC/D,uBAAA,IAAI,oCAAgB,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAA,CAAC;YAC1F,uBAAA,IAAI,wCAAY,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC;YAClD,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAC3B,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;YAC5C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;YACnB,OAAO,KAAK,CAAC;QACf,CAAC,CAAC;QAEF,YAAY;QACZ,SAAI,GAAG,GAAG,EAAE;YACV,IAAI,IAAI,CAAC,MAAM;gBAAE,OAAO;YACxB,IAAI,CAAC,UAAU,EAAE,CAAC;YAClB,OAAO,CAAC,IAAI,CAAC;gBACX,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,IAAI,EAAE,IAAI,CAAC,UAAU;gBACrB,KAAK,EAAE,IAAI,CAAC,WAAW;gBACvB,WAAW,EAAE,IAAI,CAAC,WAAW;aAC9B,CAAC,CAAC;YACH,OAAO,KAAK,CAAC;QACf,CAAC,CAAC;QAMF,YAAY;QACZ,UAAK,GAAG,GAAG,EAAE;YACX,OAAO,CAAC,IAAI,EAAE,CAAC;YACf,OAAO,KAAK,CAAC;QACf,CAAC,CAAC;QAEF;;;;;WAKG;QACH,eAAU,GAAG,GAAG,EAAE;YAChB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YACpB,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;YAC5B,OAAO,KAAK,CAAC;QACf,CAAC,CAAC;QAxEA,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,SAAS,CAAC,IAAI,GAAG,QAAQ,CAAC;QAC/B,IAAI,CAAC,SAAS,CAAC,SAAS,GAAG,MAAM,CAAC;IACpC,CAAC;IAiDD,WAAW;QACT,OAAO,IAAI,CAAC;IACd,CAAC;CAmBF,CAAA;;;;AAlFY;IAAV,SAAS;mDAAe;AAClB;IAAN,KAAK;oDAAiB;AAFH,oBAAoB;IADzC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC;GACN,oBAAoB,CAmFzC"}
@@ -1,6 +1,6 @@
1
1
  import { GemElement } from '../../lib/element';
2
2
  import { Emitter } from '../../lib/decorators';
3
- export declare type PanEventDetail = {
3
+ export type PanEventDetail = {
4
4
  x: number;
5
5
  y: number;
6
6
  clientX: number;
@@ -41,6 +41,7 @@ export interface RotateEventDetail {
41
41
  * @attr touch-action
42
42
  */
43
43
  export declare class GemGestureElement extends GemElement {
44
+ #private;
44
45
  pan: Emitter<PanEventDetail>;
45
46
  pinch: Emitter<PinchEventDetail>;
46
47
  rotate: Emitter<RotateEventDetail>;
@@ -48,19 +49,9 @@ export declare class GemGestureElement extends GemElement {
48
49
  press: Emitter<null>;
49
50
  end: Emitter<null>;
50
51
  touchAction: string;
51
- pressed: boolean;
52
- pressTimer: number;
53
- startEventMap: Map<number, PointerEvent>;
54
- movesMap: Map<number, PanEventDetail[]>;
55
52
  constructor();
56
- getMoves(pointerId: number): PanEventDetail[];
57
- getStartEvent(pointerId: number): PointerEvent;
58
- getOtherLastmove(pointerId: number): PanEventDetail | undefined;
59
- getMovementX(x: number, y: number): number;
60
- getMovementY(x: number, y: number): number;
61
- onStart(evt: PointerEvent): void;
62
- onMove(evt: PointerEvent): void;
63
- onEnd(evt: PointerEvent): void;
53
+ /** 指针移动事件记录 */
54
+ movesMap: Map<number, PanEventDetail[]>;
64
55
  render(): import("lit-html/lib/template-result").TemplateResult;
65
56
  }
66
57
  //# sourceMappingURL=gesture.d.ts.map