@mantou/gem 1.7.12 → 2.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +1 -1
- package/dist/gem.es.js +2010 -1765
- package/dist/gem.umd.js +52 -53
- package/elements/base/dialog.d.ts +0 -11
- package/elements/base/dialog.d.ts.map +1 -1
- package/elements/base/dialog.js +93 -66
- package/elements/base/dialog.js.map +1 -1
- package/elements/base/gesture.d.ts +1 -2
- package/elements/base/gesture.d.ts.map +1 -1
- package/elements/base/gesture.js +157 -96
- package/elements/base/gesture.js.map +1 -1
- package/elements/base/link.d.ts +5 -5
- package/elements/base/link.d.ts.map +1 -1
- package/elements/base/link.js +249 -145
- package/elements/base/link.js.map +1 -1
- package/elements/base/modal-factory.d.ts +145 -139
- package/elements/base/modal-factory.d.ts.map +1 -1
- package/elements/base/modal-factory.js +84 -25
- package/elements/base/modal-factory.js.map +1 -1
- package/elements/base/reflect.d.ts +0 -1
- package/elements/base/reflect.d.ts.map +1 -1
- package/elements/base/reflect.js +83 -38
- package/elements/base/reflect.js.map +1 -1
- package/elements/base/route.d.ts +12 -24
- package/elements/base/route.d.ts.map +1 -1
- package/elements/base/route.js +263 -164
- package/elements/base/route.js.map +1 -1
- package/elements/base/title.d.ts +3 -11
- package/elements/base/title.d.ts.map +1 -1
- package/elements/base/title.js +110 -59
- package/elements/base/title.js.map +1 -1
- package/elements/base/unsafe.d.ts +0 -1
- package/elements/base/unsafe.d.ts.map +1 -1
- package/elements/base/unsafe.js +82 -33
- package/elements/base/unsafe.js.map +1 -1
- package/elements/base/use.d.ts.map +1 -1
- package/elements/base/use.js +95 -47
- package/elements/base/use.js.map +1 -1
- package/helper/i18n.d.ts +4 -9
- package/helper/i18n.d.ts.map +1 -1
- package/helper/i18n.js +69 -65
- package/helper/i18n.js.map +1 -1
- package/helper/logger.js +10 -9
- package/helper/logger.js.map +1 -1
- package/helper/react-shim.d.ts +15 -0
- package/helper/react-shim.d.ts.map +1 -0
- package/helper/react-shim.js +56 -0
- package/helper/react-shim.js.map +1 -0
- package/helper/react-utils.d.ts +15 -0
- package/helper/react-utils.d.ts.map +1 -0
- package/helper/react-utils.js +50 -0
- package/helper/react-utils.js.map +1 -0
- package/helper/request.d.ts +4 -4
- package/helper/request.d.ts.map +1 -1
- package/helper/request.js +1 -1
- package/helper/request.js.map +1 -1
- package/helper/ssr-shim.d.ts.map +1 -1
- package/helper/ssr-shim.js +8 -1
- package/helper/ssr-shim.js.map +1 -1
- package/helper/theme.d.ts +14 -21
- package/helper/theme.d.ts.map +1 -1
- package/helper/theme.js +55 -38
- package/helper/theme.js.map +1 -1
- package/index.d.ts +4 -3
- package/index.d.ts.map +1 -1
- package/index.js +5 -3
- package/index.js.map +1 -1
- package/lib/decorators.d.ts +74 -42
- package/lib/decorators.d.ts.map +1 -1
- package/lib/decorators.js +324 -84
- package/lib/decorators.js.map +1 -1
- package/lib/directives.d.ts +4 -0
- package/lib/directives.d.ts.map +1 -0
- package/lib/directives.js +5 -0
- package/lib/directives.js.map +1 -0
- package/lib/element.d.ts +112 -110
- package/lib/element.d.ts.map +1 -1
- package/lib/element.js +431 -468
- package/lib/element.js.map +1 -1
- package/lib/history.d.ts +4 -0
- package/lib/history.d.ts.map +1 -1
- package/lib/history.js +12 -13
- package/lib/history.js.map +1 -1
- package/lib/store.d.ts +1 -1
- package/lib/store.d.ts.map +1 -1
- package/lib/store.js +4 -5
- package/lib/store.js.map +1 -1
- package/lib/utils.d.ts +3 -43
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +61 -235
- package/lib/utils.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.d.ts.map +1 -1
- package/lib/version.js +2 -1
- package/lib/version.js.map +1 -1
- package/package.json +12 -11
- package/src/dist.ts +3 -2
- package/src/elements/base/dialog.ts +10 -20
- package/src/elements/base/gesture.ts +16 -14
- package/src/elements/base/link.ts +65 -44
- package/src/elements/base/modal-factory.ts +14 -14
- package/src/elements/base/reflect.ts +24 -32
- package/src/elements/base/route.ts +55 -68
- package/src/elements/base/title.ts +25 -42
- package/src/elements/base/unsafe.ts +12 -21
- package/src/elements/base/use.ts +17 -13
- package/src/helper/i18n.ts +20 -14
- package/src/helper/react-utils.ts +66 -0
- package/src/helper/ssr-shim.ts +8 -1
- package/src/helper/theme.ts +72 -45
- package/src/index.ts +6 -4
- package/src/lib/decorators.ts +394 -93
- package/src/lib/directives.ts +6 -0
- package/src/lib/element.ts +473 -500
- package/src/lib/history.ts +4 -3
- package/src/lib/store.ts +2 -1
- package/src/lib/utils.ts +12 -191
- package/src/lib/version.ts +2 -1
- package/src/test/elements/link.test.ts +1 -1
- package/src/test/elements/title.test.ts +1 -0
- package/src/test/gem-element/advance.test.ts +72 -49
- package/src/test/gem-element/basic.test.ts +37 -50
- package/src/test/gem-element/decorators.test.ts +22 -21
- package/src/test/gem-element/multi.test.ts +5 -5
- package/src/test/utils.test.ts +15 -45
package/dist/gem.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
(function(h,M){typeof exports=="object"&&typeof module<"u"?M(exports):typeof define=="function"&&define.amd?define(["exports"],M):(h=typeof globalThis<"u"?globalThis:h||self,M(h.Gem={}))})(this,function(h){"use strict";var Yl=Object.defineProperty;var qa=h=>{throw TypeError(h)};var Xl=(h,M,A)=>M in h?Yl(h,M,{enumerable:!0,configurable:!0,writable:!0,value:A}):h[M]=A;var N=(h,M,A)=>Xl(h,typeof M!="symbol"?M+"":M,A),Ps=(h,M,A)=>M.has(h)||qa("Cannot "+A);var p=(h,M,A)=>(Ps(h,M,"read from private field"),A?A.call(h):M.get(h)),C=(h,M,A)=>M.has(h)?qa("Cannot add the same private member more than once"):M instanceof WeakSet?M.add(h):M.set(h,A),O=(h,M,A,St)=>(Ps(h,M,"write to private field"),St?St.call(h,A):M.set(h,A),A),ks=(h,M,A)=>(Ps(h,M,"access private method"),A);var At,gt,Rt,dn,Ts,pe,Gn,ut,Ft,fn,_e,me,ge,ve,nt,vt,qt,It,we,wt,Se,ye,pn,ct,Ce,Ms,Vn,Dn,_n,$e,Ut,Fn,qn,Un,mn,Ee,R,Bn,ja,Ka,gn,jn;const M=Object.freeze(Object.defineProperty({__proto__:null,get adoptedStyle(){return Cn},get aria(){return Ge},get async(){return pr},get attribute(){return D},get boolattribute(){return He},get connectStore(){return ze},get customElement(){return _r},get effect(){return ft},get emitter(){return Yt},get fallback(){return lr},get globalemitter(){return dr},get memo(){return hi},get mounted(){return Qt},get numattribute(){return ar},get part(){return di},get property(){return U},get shadow(){return kt},get slot(){return ur},get state(){return xe},get template(){return ui},get unmounted(){return cr},get willMount(){return We}},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 Pn=(o,b,L)=>{if(!b.has(o))throw TypeError("Cannot "+L)};var w=(o,b,L)=>(Pn(o
|
|
|
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
|
|
13
|
+
*/const A=new WeakMap,St=e=>(...t)=>{const n=e(...t);return A.set(n,!0),n},Pe=e=>typeof e=="function"&&A.has(e);/**
|
|
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 Pn=(o,b,L)=>{if(!b.has(o))throw TypeError("Cannot "+L)};var w=(o,b,L)=>(Pn(o
|
|
|
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
|
|
25
|
+
*/const Os=typeof window<"u"&&window.customElements!=null&&window.customElements.polyfillWrapFlushCallback!==void 0,Ls=(e,t,n=null,i=null)=>{for(;t!==n;){const s=t.nextSibling;e.insertBefore(t,i),t=s}},Kn=(e,t,n=null)=>{for(;t!==n;){const i=t.nextSibling;e.removeChild(t),t=i}};/**
|
|
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 Pn=(o,b,L)=>{if(!b.has(o))throw TypeError("Cannot "+L)};var w=(o,b,L)=>(Pn(o
|
|
|
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
|
|
37
|
+
*/const it={},Ns={};/**
|
|
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 Pn=(o,b,L)=>{if(!b.has(o))throw TypeError("Cannot "+L)};var w=(o,b,L)=>(Pn(o
|
|
|
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
|
|
49
|
+
*/const yt=`{{lit-${String(Math.random()).slice(2)}}}`,As=`<!--${yt}-->`,Rs=new RegExp(`${yt}|${As}`),ke="$lit$";class Ja{constructor(t,n){this.parts=[],this.element=n;const i=[],s=[],o=document.createTreeWalker(n.content,133,null,!1);let c=0,a=-1,_=0;const{strings:u,values:{length:v}}=t;for(;_<v;){const r=o.nextNode();if(r===null){o.currentNode=s.pop();continue}if(a++,r.nodeType===1){if(r.hasAttributes()){const m=r.attributes,{length:l}=m;let g=0;for(let w=0;w<l;w++)Is(m[w].name,ke)&&g++;for(;g-- >0;){const w=u[_],y=Jn.exec(w)[2],b=y.toLowerCase()+ke,f=r.getAttribute(b);r.removeAttribute(b);const $=f.split(Rs);this.parts.push({type:"attribute",index:a,name:y,strings:$}),_+=$.length-1}}r.tagName==="TEMPLATE"&&(s.push(r),o.currentNode=r.content)}else if(r.nodeType===3){const m=r.data;if(m.indexOf(yt)>=0){const l=r.parentNode,g=m.split(Rs),w=g.length-1;for(let y=0;y<w;y++){let b,f=g[y];if(f==="")b=lt();else{const $=Jn.exec(f);$!==null&&Is($[2],ke)&&(f=f.slice(0,$.index)+$[1]+$[2].slice(0,-ke.length)+$[3]),b=document.createTextNode(f)}l.insertBefore(b,r),this.parts.push({type:"node",index:++a})}g[w]===""?(l.insertBefore(lt(),r),i.push(r)):r.data=g[w],_+=w}}else if(r.nodeType===8)if(r.data===yt){const m=r.parentNode;(r.previousSibling===null||a===c)&&(a++,m.insertBefore(lt(),r)),c=a,this.parts.push({type:"node",index:a}),r.nextSibling===null?r.data="":(i.push(r),a--),_++}else{let m=-1;for(;(m=r.data.indexOf(yt,m+1))!==-1;)this.parts.push({type:"node",index:-1}),_++}}for(const r of i)r.parentNode.removeChild(r)}}const Is=(e,t)=>{const n=e.length-t.length;return n>=0&&e.slice(n)===t},Qa=e=>e.index!==-1,lt=()=>document.createComment(""),Jn=/([ \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 Pn=(o,b,L)=>{if(!b.has(o))throw TypeError("Cannot "+L)};var w=(o,b,L)=>(Pn(o
|
|
|
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
|
|
61
|
+
*/class Hs{constructor(t,n,i){this.__parts=[],this.template=t,this.processor=n,this.options=i}update(t){let n=0;for(const i of this.__parts)i!==void 0&&i.setValue(t[n]),n++;for(const i of this.__parts)i!==void 0&&i.commit()}_clone(){const t=Os?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),n=[],i=this.template.parts,s=document.createTreeWalker(t,133,null,!1);let o=0,c=0,a,_=s.nextNode();for(;o<i.length;){if(a=i[o],!Qa(a)){this.__parts.push(void 0),o++;continue}for(;c<a.index;)c++,_.nodeName==="TEMPLATE"&&(n.push(_),s.currentNode=_.content),(_=s.nextNode())===null&&(s.currentNode=n.pop(),_=s.nextNode());if(a.type==="node"){const u=this.processor.handleTextExpression(this.options);u.insertAfterNode(_.previousSibling),this.__parts.push(u)}else this.__parts.push(...this.processor.handleAttributeExpressions(_,a.name,a.strings,this.options));o++}return Os&&(document.adoptNode(t),customElements.upgrade(t)),t}}/**
|
|
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 Pn=(o,b,L)=>{if(!b.has(o))throw TypeError("Cannot "+L)};var w=(o,b,L)=>(Pn(o
|
|
|
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
|
|
73
|
+
*/const Ws=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:e=>e}),Ya=` ${yt} `;class Te{constructor(t,n,i,s){this.strings=t,this.values=n,this.type=i,this.processor=s}getHTML(){const t=this.strings.length-1;let n="",i=!1;for(let s=0;s<t;s++){const o=this.strings[s],c=o.lastIndexOf("<!--");i=(c>-1||i)&&o.indexOf("-->",c+1)===-1;const a=Jn.exec(o);a===null?n+=o+(i?Ya:As):n+=o.substr(0,a.index)+a[1]+a[2]+ke+a[3]+yt}return n+=this.strings[t],n}getTemplateElement(){const t=document.createElement("template");let n=this.getHTML();return Ws!==void 0&&(n=Ws.createHTML(n)),t.innerHTML=n,t}}class Qn extends Te{getHTML(){return`<svg>${super.getHTML()}</svg>`}getTemplateElement(){const t=super.getTemplateElement(),n=t.content,i=n.firstChild;return n.removeChild(i),Ls(n,i.firstChild),t}}/**
|
|
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 Pn=(o,b,L)=>{if(!b.has(o))throw TypeError("Cannot "+L)};var w=(o,b,L)=>(Pn(o
|
|
|
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
|
|
85
|
+
*/const Yn=e=>e===null||!(typeof e=="object"||typeof e=="function"),Xn=e=>Array.isArray(e)||!!(e&&e[Symbol.iterator]);class xs{constructor(t,n,i){this.dirty=!0,this.element=t,this.name=n,this.strings=i,this.parts=[];for(let s=0;s<i.length-1;s++)this.parts[s]=this._createPart()}_createPart(){return new Zn(this)}_getValue(){const t=this.strings,n=t.length-1,i=this.parts;if(n===1&&t[0]===""&&t[1]===""){const o=i[0].value;if(typeof o=="symbol")return String(o);if(typeof o=="string"||!Xn(o))return o}let s="";for(let o=0;o<n;o++){s+=t[o];const c=i[o];if(c!==void 0){const a=c.value;if(Yn(a)||!Xn(a))s+=typeof a=="string"?a:String(a);else for(const _ of a)s+=typeof _=="string"?_:String(_)}}return s+=t[n],s}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class Zn{constructor(t){this.value=void 0,this.committer=t}setValue(t){t!==it&&(!Yn(t)||t!==this.value)&&(this.value=t,Pe(t)||(this.committer.dirty=!0))}commit(){for(;Pe(this.value);){const t=this.value;this.value=it,t(this)}this.value!==it&&this.committer.commit()}}class Bt{constructor(t){this.value=void 0,this.__pendingValue=void 0,this.options=t}appendInto(t){this.startNode=t.appendChild(lt()),this.endNode=t.appendChild(lt())}insertAfterNode(t){this.startNode=t,this.endNode=t.nextSibling}appendIntoPart(t){t.__insert(this.startNode=lt()),t.__insert(this.endNode=lt())}insertAfterPart(t){t.__insert(this.startNode=lt()),this.endNode=t.endNode,t.endNode=this.startNode}setValue(t){this.__pendingValue=t}commit(){if(this.startNode.parentNode===null)return;for(;Pe(this.__pendingValue);){const n=this.__pendingValue;this.__pendingValue=it,n(this)}const t=this.__pendingValue;t!==it&&(Yn(t)?t!==this.value&&this.__commitText(t):t instanceof Te?this.__commitTemplateResult(t):t instanceof Node?this.__commitNode(t):Xn(t)?this.__commitIterable(t):t===Ns?(this.value=Ns,this.clear()):this.__commitText(t))}__insert(t){this.endNode.parentNode.insertBefore(t,this.endNode)}__commitNode(t){this.value!==t&&(this.clear(),this.__insert(t),this.value=t)}__commitText(t){const n=this.startNode.nextSibling;t=t??"";const i=typeof t=="string"?t:String(t);n===this.endNode.previousSibling&&n.nodeType===3?n.data=i:this.__commitNode(document.createTextNode(i)),this.value=t}__commitTemplateResult(t){const n=this.options.templateFactory(t);if(this.value instanceof Hs&&this.value.template===n)this.value.update(t.values);else{const i=new Hs(n,t.processor,this.options),s=i._clone();i.update(t.values),this.__commitNode(s),this.value=i}}__commitIterable(t){Array.isArray(this.value)||(this.value=[],this.clear());const n=this.value;let i=0,s;for(const o of t)s=n[i],s===void 0&&(s=new Bt(this.options),n.push(s),i===0?s.appendIntoPart(this):s.insertAfterPart(n[i-1])),s.setValue(o),s.commit(),i++;i<n.length&&(n.length=i,this.clear(s&&s.endNode))}clear(t=this.startNode){Kn(this.startNode.parentNode,t.nextSibling,this.endNode)}}class Xa{constructor(t,n,i){if(this.value=void 0,this.__pendingValue=void 0,i.length!==2||i[0]!==""||i[1]!=="")throw new Error("Boolean attributes can only contain a single expression");this.element=t,this.name=n,this.strings=i}setValue(t){this.__pendingValue=t}commit(){for(;Pe(this.__pendingValue);){const n=this.__pendingValue;this.__pendingValue=it,n(this)}if(this.__pendingValue===it)return;const t=!!this.__pendingValue;this.value!==t&&(t?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=t),this.__pendingValue=it}}class Za extends xs{constructor(t,n,i){super(t,n,i),this.single=i.length===2&&i[0]===""&&i[1]===""}_createPart(){return new tc(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class tc extends Zn{}let zs=!1;(()=>{try{const e={get capture(){return zs=!0,!1}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch{}})();class ec{constructor(t,n,i){this.value=void 0,this.__pendingValue=void 0,this.element=t,this.eventName=n,this.eventContext=i,this.__boundHandleEvent=s=>this.handleEvent(s)}setValue(t){this.__pendingValue=t}commit(){for(;Pe(this.__pendingValue);){const o=this.__pendingValue;this.__pendingValue=it,o(this)}if(this.__pendingValue===it)return;const t=this.__pendingValue,n=this.value,i=t==null||n!=null&&(t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive),s=t!=null&&(n==null||i);i&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),s&&(this.__options=nc(t),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=t,this.__pendingValue=it}handleEvent(t){typeof this.value=="function"?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)}}const nc=e=>e&&(zs?{capture:e.capture,passive:e.passive,once:e.once}:e.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 Pn=(o,b,L)=>{if(!b.has(o))throw TypeError("Cannot "+L)};var w=(o,b,L)=>(Pn(o
|
|
|
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
|
|
97
|
+
*/class ic{handleAttributeExpressions(t,n,i,s){const o=n[0];return o==="."?new Za(t,n.slice(1),i).parts:o==="@"?[new ec(t,n.slice(1),s.eventContext)]:o==="?"?[new Xa(t,n.slice(1),i)]:new xs(t,n,i).parts}handleTextExpression(t){return new Bt(t)}}const Gs=new ic;/**
|
|
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 Pn=(o,b,L)=>{if(!b.has(o))throw TypeError("Cannot "+L)};var w=(o,b,L)=>(Pn(o
|
|
|
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
|
|
109
|
+
*/function sc(e){let t=Vs.get(e.type);t===void 0&&(t={stringsArray:new WeakMap,keyString:new Map},Vs.set(e.type,t));let n=t.stringsArray.get(e.strings);if(n!==void 0)return n;const i=e.strings.join(yt);return n=t.keyString.get(i),n===void 0&&(n=new Ja(e,e.getTemplateElement()),t.keyString.set(i,n)),t.stringsArray.set(e.strings,n),n}const Vs=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 Pn=(o,b,L)=>{if(!b.has(o))throw TypeError("Cannot "+L)};var w=(o,b,L)=>(Pn(o
|
|
|
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
|
|
121
|
+
*/const Ds=new WeakMap,vn=(e,t,n)=>{let i=Ds.get(t);i===void 0&&(Kn(t,t.firstChild),Ds.set(t,i=new Bt(Object.assign({templateFactory:sc},n))),i.appendInto(t)),i.setValue(e),i.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,7 +130,7 @@ var Pn=(o,b,L)=>{if(!b.has(o))throw TypeError("Cannot "+L)};var w=(o,b,L)=>(Pn(o
|
|
|
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<"u"&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.4.1");const V=(n,...e)=>new Ne(n,e,"html",Wn),Vn=(n,...e)=>new Wt(n,e,"svg",Wn),Oe=new Set;function H(n){typeof n=="function"&&(Oe.size||globalThis.queueMicrotask(()=>{Oe.forEach(e=>e()),Oe.clear()}),Oe.delete(n),Oe.add(n))}const Ae=[];function ei(){for(let n=Ae.length-1;n>=0;n--)Ae[n]();Ae.length=0}function ti(n){Ae.length||H(ei),Ae.push(n)}function qt(n="",e=""){const{pathname:t,search:s,hash:i}=new URL(e,location.origin+n);return t+s+decodeURIComponent(i)}function jt(n,e,t,s){return n.addEventListener(e,t,s),()=>n.removeEventListener(e,t,s)}class Dn extends EventTarget{constructor(){super(...arguments);N(this,Je);N(this,oe,new Map);N(this,X,void 0);N(this,ae,void 0)}get size(){return w(this,oe).size}get first(){return w(this,X)}get last(){return w(this,ae)}isSuperLinkOf(t){let s=t.first;if(!s)return!0;let i=this.find(s.value);for(;i&&i.value===s.value;){if(s=s.next,!s)return!0;i=i.next}return!1}find(t){return w(this,oe).get(t)}add(t){w(this,ae)||this.dispatchEvent(new CustomEvent("start"));const s=Cn(this,Je,$n).call(this,t)||{value:t};s.prev=w(this,ae),s.prev&&(s.prev.next=s),s.next=void 0,Y(this,ae,s),w(this,X)||Y(this,X,s),w(this,oe).set(t,s)}delete(t){const s=Cn(this,Je,$n).call(this,t);return w(this,X)||this.dispatchEvent(new CustomEvent("end")),s}get(){const t=w(this,X);if(t)return this.delete(t.value),t.value}}oe=new WeakMap,X=new WeakMap,ae=new WeakMap,Je=new WeakSet,$n=function(t){const s=w(this,oe).get(t);return s&&(s.prev?s.prev.next=s.next:Y(this,X,s.next),s.next?s.next.prev=s.prev:Y(this,ae,s.prev),w(this,oe).delete(t)),s};class qn extends WeakMap{get(e){let t=super.get(e);return t||(t={},this.set(e,t)),t}}class pe extends URLSearchParams{constructor(t){super(t);N(this,$e,t=>typeof t=="string"?t:JSON.stringify(t));N(this,Tt,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,w(this,$e).call(this,r))})}setAny(t,s){if(Array.isArray(s))this.delete(t),s.forEach(i=>this.append(t,w(this,$e).call(this,i)));else{const i=w(this,$e).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=>w(this,Tt).call(this,s))}toString(){const t=super.toString();return t?`?${t}`:""}toJSON(){return this.toString()}}$e=new WeakMap,Tt=new WeakMap;function Re(n,...e){return n.reduce((t,s,i)=>t+(e[i-1]??"")+s)}function ni(n,...e){return Re(n,...e)}const Ut=Symbol.for("gem@sheetToken");function si(n,e){const t=new CSSStyleSheet({media:e}),s={};let i="";return typeof n=="string"?i=n:Object.keys(n).forEach(r=>{switch(s[r]=`${r}-${He()}`,n[r].type){case"class":i+=`.${s[r]} {${n[r].styledContent}}`;break;case"id":i+=`#${s[r]} {${n[r].styledContent}}`;break;default:i+=`@keyframes ${r} {${n[r].styledContent}}`}}),t.replaceSync(i),s[Ut]=t,s}function He(n=5){const e=Math.random().toString(36).slice(2).slice(0,n);return e.length<n?e+He(n-e.length):e}const ii={class:(n,...e)=>({styledContent:Re(n,...e),type:"class"}),id:(n,...e)=>({styledContent:Re(n,...e),type:"id"}),keyframes:(n,...e)=>({styledContent:Re(n,...e),type:"keyframes"})};function D(n){return n.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function te(n){return n.replace(/-(.)/g,(e,t)=>t.toUpperCase())}function Ze(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 jn(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 Un(n,e){const t=new Set(e);return n.filter(s=>t.has(s)?(t.delete(s),!1):!0)}function et(n,e,t){let s=e;for(const i in n){const r=t(i,n[i]);s+=r?r+e:""}return s}function ri(n){return et(n,";",(e,t)=>t||t===0?`${D(e)}:${t}`:"")}function Bn(n){return et(n," ",(e,t)=>t?e:"")}const oi=Bn;function ai(n){return et(n,",",(e,t)=>t===!0||e===t?e:t?`${e}:${t}`:"")}const me=new WeakMap;function ge(n){if(me.has(n))throw new K("argument error");return me.set(n,new Set),n}function z(n,e){var t;Object.assign(n,e),(t=me.get(n))==null||t.forEach(s=>{H(s)})}function tt(n){const e=ge(n);return[e,t=>z(e,t)]}function ne(n,e){const t=me.get(n);return t==null||t.add(e),()=>{t==null||t.delete(e)}}function ci(n,e){const t=me.get(n);t==null||t.delete(e)}const Fn="1.7.12",li=Object.freeze(Object.defineProperty({__proto__:null,version:Fn},Symbol.toStringTag,{value:"Module"}));/**
|
|
133
|
+
*/typeof window<"u"&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.4.1");const st=(e,...t)=>new Te(e,t,"html",Gs),Fs=(e,...t)=>new Qn(e,t,"svg",Gs);let Me=new Set;function $t(e){typeof e=="function"&&(Me.size||globalThis.queueMicrotask(()=>{const t=Me;Me=new Set,t.forEach(n=>n())}),Me.delete(e),Me.add(e))}function ti(e="",t=""){const{pathname:n,search:i,hash:s}=new URL(t,location.origin+e);return n+i+decodeURIComponent(s)}function ei(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}class qs extends EventTarget{constructor(){super(...arguments);C(this,dn);C(this,At,new Map);C(this,gt);C(this,Rt)}get size(){return p(this,At).size}get first(){return p(this,gt)}get last(){return p(this,Rt)}isSuperLinkOf(n){let i=n.first;if(!i)return!0;let s=this.find(i.value);for(;s&&s.value===i.value;){if(i=i.next,!i)return!0;s=s.next}return!1}find(n){return p(this,At).get(n)}add(n){p(this,Rt)||this.dispatchEvent(new CustomEvent("start"));const i=ks(this,dn,Ts).call(this,n)||{value:n};i.prev=p(this,Rt),i.prev&&(i.prev.next=i),i.next=void 0,O(this,Rt,i),p(this,gt)||O(this,gt,i),p(this,At).set(n,i)}delete(n){const i=ks(this,dn,Ts).call(this,n);return p(this,gt)||this.dispatchEvent(new CustomEvent("end")),i}get(){const n=p(this,gt);if(n)return this.delete(n.value),n.value}}At=new WeakMap,gt=new WeakMap,Rt=new WeakMap,dn=new WeakSet,Ts=function(n){const i=p(this,At).get(n);return i&&(i.prev?i.prev.next=i.next:O(this,gt,i.next),i.next?i.next.prev=i.prev:O(this,Rt,i.prev),p(this,At).delete(n)),i};class Us extends WeakMap{get(t){let n=super.get(t);return n||(n={},this.set(t,n)),n}}class jt extends URLSearchParams{constructor(n){super(n);C(this,pe,n=>typeof n=="string"?n:JSON.stringify(n));C(this,Gn,n=>{if(!n)return null;try{return JSON.parse(n)}catch{return null}})}concat(n){let i;typeof n=="string"?i=Object.fromEntries(new URLSearchParams(n).entries()):i=n,Object.entries(i).forEach(([s,o])=>{this.append(s,p(this,pe).call(this,o))})}setAny(n,i){if(Array.isArray(i))this.delete(n),i.forEach(s=>this.append(n,p(this,pe).call(this,s)));else{const s=p(this,pe).call(this,i);s?this.set(n,s):this.delete(n)}}getAny(n){return this.getAnyAll(n)[0]}getAnyAll(n){return this.getAll(n).filter(i=>i!=="").map(i=>p(this,Gn).call(this,i))}toString(){const n=super.toString();return n?`?${n}`:""}toJSON(){return this.toString()}}pe=new WeakMap,Gn=new WeakMap;function wn(e,...t){return e.reduce((n,i,s)=>n+(t[s-1]??"")+i)}const ni=wn;function Oe(e=5){const t=Math.random().toString(36).slice(2,2+e);return t.length<e?t+Oe(e-t.length):t}const rc={class:wn};function Ht(e){return e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase())}function oc(e){return e.replace(/-(.)/g,(t,n)=>n.toUpperCase())}function Sn(e){return Object.keys(e).forEach(t=>{delete e[t]}),e}class dt extends Error{constructor(t){super(t),this.message=`gem: ${this.message}`}}function Bs(e,t){const n=e.length;if(t.length!==n)return!0;for(let i=0;i<n;i++)if(e[i]!==t[i])return!0;return!1}function yn(e,t,n){let i=t;for(const s in e){const o=n(s,e[s]);i+=o?o+t:""}return i}function ac(e){return yn(e,";",(t,n)=>n||n===0?`${Ht(t)}:${n}`:"")}function js(e){return yn(e," ",(t,n)=>n?t:"")}const cc=js;function lc(e){return yn(e,",",(t,n)=>n===!0||t===n?t:n?`${t}:${n}`:"")}const Wt=new WeakMap;function Le(e){if(Wt.has(e))throw new dt("argument error");return Wt.set(e,new Set),e}function Et(e,t){var n;Object.assign(e,t),(n=Wt.get(e))==null||n.forEach(i=>{$t(i)})}function Kt(e){const t=Le(e);return[t,n=>Et(t,n)]}function ht(e,t){const n=Wt.get(e);return n==null||n.add(t),()=>{n==null||n.delete(t)}}function Ks(e,t){const n=Wt.get(e);n==null||n.delete(t)}const hc=Object.freeze(Object.defineProperty({__proto__:null,StoreListenerMap:Wt,connect:ht,createStore:Le,disconnect:Ks,updateStore:Et,useStore:Kt},Symbol.toStringTag,{value:"Module"})),{assign:ii,defineProperty:uc,setPrototypeOf:dc}=Object;uc(Symbol,"metadata",{value:Symbol.for("Symbol.metadata")});const si=e=>typeof e=="function"&&e(),bt=Symbol.for("gem@sheetToken"),Ne=Symbol.for("gem@update"),Ae="gem-style-boundary",$n="gem@render-error",fc=Ne,ri=new WeakMap,Js=new WeakMap,Qs=e=>[...e.querySelectorAll("[data-gem-reflect]")].map(t=>t.target);class pc{constructor(t){N(this,"refSelector");N(this,"ele");N(this,"ref");const n=`ref-${Oe()}`;this.refSelector=`[ref=${n}]`,this.ele=t.internals.shadowRoot||t,this.ref=n}get element(){for(const t of[this.ele,...Qs(this.ele)]){const n=t.querySelector(this.refSelector);if(n)return n}}get elements(){return[this.ele,...Qs(this.ele)].map(t=>[...t.querySelectorAll(this.refSelector)]).flat()}toString(){return this.ref}}h.createRef=void 0;class _c extends CSSStyleSheet{constructor(){super(...arguments);C(this,ut);N(this,"cssText","")}get element(){return p(this,ut)||(O(this,ut,document.createElement("style")),p(this,ut).textContent=this.cssText,p(this,ut).dataset.gemStyle=""),p(this,ut)}replaceSync(n){this.cssText=n,p(this,ut)&&(p(this,ut).textContent=n),super.replaceSync(n)}}ut=new WeakMap;class mc{constructor(t=""){C(this,Ft,"");C(this,fn,"");C(this,_e,new Map);C(this,me,new Map);O(this,fn,t)}setContent(t){O(this,Ft,t)}getStyle(t){var o;const n=t&&!((o=t.internals)!=null&&o.shadowRoot),i=n?t.constructor:this;if(!p(this,_e).has(i)){const c=new _c({media:p(this,fn)});p(this,_e).set(i,c)}const s=p(this,_e).get(i);if(!p(this,me).has(s)){let c=p(this,Ft),a="";n&&(a=`@scope (${t.tagName}) to (:state(${Ae}) > *)`,c=`${a}{ ${c} }`),s.replaceSync(c),p(this,me).set(s,a)}return s}updateStyle(){p(this,me).forEach((t,n)=>{n.replaceSync(t?`${t}{${p(this,Ft)}}`:p(this,Ft))})}}Ft=new WeakMap,fn=new WeakMap,_e=new WeakMap,me=new WeakMap;function Re(e,t){const n=t?e:"",i=t||e,s=new mc(n),o={[bt]:s};let c="";return typeof i=="string"?c=i:Object.keys(i).forEach(a=>{const _=a==="$";o[a]=_||a.includes("-")?a:`${a}-${Oe()}`,c+=`${_?":scope,:host":`.${o[a]}`} {${i[a]}}`}),s.setContent(c),o}const Ys=(e,t,n)=>{let i=!1;t.forEach(s=>{const o=e.get(s)||0;i||(i=n===1&&o===0||n===-1&&o===1),e.set(s,o+n)}),i&&$t(Js.get(e))},gc=(e,t)=>{const n=e.getRootNode();if(!ri.has(n)){const s=new Map;ri.set(n,s),Js.set(s,()=>{const o=n.adoptedStyleSheets.filter(c=>!s.has(c));s.forEach((c,a)=>c&&o.push(a)),n.adoptedStyleSheets=o.reverse()})}const i=ri.get(n);return Ys(i,t,1),()=>Ys(i,t,-1)};h.createState=void 0;function Xs(e){e==null||e.forEach(t=>{const{callback:n,getDep:i,values:s,preCallback:o}=t,c=i==null?void 0:i();(!i||!s||Bs(s,c))&&(si(o),t.preCallback=n(c,s),t.values=c,t.initialized=!0)})}function Zs(e){return e.filter(t=>(si(t.preCallback),t.initialized=!1,t.values=void 0,t.fixed))}h.createTemplate=void 0;const Jt=new qs,oi=(e=performance.now())=>{if(performance.now()>e+16)return requestAnimationFrame(oi);const t=Jt.get();t&&(t(),oi(e))};Jt.addEventListener("start",()=>$t(oi));let ai;const be=class be extends HTMLElement{constructor(){super();C(this,ct);C(this,ve);C(this,nt);C(this,vt,[]);C(this,qt,[]);C(this,It,[]);C(this,we);C(this,wt);C(this,Se);C(this,ye);C(this,pn);C(this,Vn,()=>{Xs(p(this,vt))});C(this,Dn,()=>{Xs(p(this,qt))});C(this,_n,n=>{try{O(this,ye,!0),p(this,Dn).call(this);const i=p(this,ve)===this,s=n?n.render():i?void 0:st`<slot></slot>`;if(O(this,ye,!1),s===void 0)return;vn(s,p(this,ve))}catch(i){this.dispatchEvent(new CustomEvent($n,{bubbles:!0,composed:!0,detail:i}))}});C(this,$e,()=>{const n=p(this,ct,Ms);p(this,wt)&&(n||!p(this,It).length)&&(p(this,_n).call(this,n),$t(p(this,Vn)))});C(this,Ut,()=>{p(this,ct,Ce).noBlocking?Jt.add(p(this,$e)):p(this,$e).call(this)});C(this,Fn,()=>{const{adoptedStyleSheets:n=[]}=p(this,ct,Ce),{shadowRoot:i,sheets:s}=p(this,nt),o=n.map(c=>c[bt].getStyle(this));if(i)i.adoptedStyleSheets=o.concat(s);else return this.prepend(...s.map(c=>c.element)),gc(this,o)});C(this,qn,()=>{var n;(n=p(this,vt))==null||n.forEach(i=>{const{callback:s,getDep:o,initialized:c}=i;c||(i.values=o==null?void 0:o(),i.preCallback=s(i.values),i.initialized=!0)})});C(this,Un,()=>{var n;this.willMount&&this.memo(this.willMount.bind(this),()=>[]),this.mounted&&this.effect(this.mounted.bind(this),()=>[]),this.updated&&this.effect((i,s)=>s&&this.updated.apply(this)),this.unmounted&&this.effect(()=>this.unmounted.bind(this),()=>[]),!p(this,It).length&&this.render&&p(this,It).push({render:this.render.bind(this),condition:(n=this.shouldUpdate)==null?void 0:n.bind(this)})});C(this,mn);C(this,Ee,async()=>{if(p(this,we)){O(this,we,!1);return}p(this,Un).call(this);const{observedStores:n}=p(this,ct,Ce);O(this,Se,!0),O(this,mn,n==null?void 0:n.map(i=>ht(i,p(this,Ut)))),p(this,_n).call(this,p(this,ct,Ms)),O(this,wt,!0),O(this,pn,p(this,Fn).call(this)),await Promise.resolve(),p(this,qn).call(this)});N(this,"effect",(n,i)=>{const s={callback:n,getDep:i,initialized:p(this,wt),fixed:!p(this,Se)};p(this,wt)&&(s.values=i==null?void 0:i(),s.preCallback=n(s.values)),p(this,vt).push(s)});N(this,"memo",(n,i)=>{p(this,qt).push({callback:n,getDep:i,fixed:!p(this,Se)})});N(this,"update",()=>$t(p(this,Ut)));ai=this;const{mode:n,serializable:i,delegatesFocus:s,slotAssignment:o,aria:c}=p(this,ct,Ce),{focusable:a,..._}=c||{};O(this,ve,n?this.attachShadow({mode:n,serializable:i,delegatesFocus:s,slotAssignment:o}):this),O(this,nt,this.attachInternals()),p(this,nt).stateList=[],p(this,nt).sheets=[],ii(p(this,nt),_),n||p(this,nt).states.add(Ae);let u;p(this,vt).push({fixed:!0,getDep:()=>[this.disabled],callback:([v=!1])=>{if(u===void 0&&(u=this.hasAttribute("tabindex")),p(this,nt).ariaDisabled=String(v),a&&!u&&(this.tabIndex=-Number(v)),(a||s)&&v)return ei(this,"click",r=>r.isTrusted&&r.stopImmediatePropagation(),{capture:!0})}})}[fc](){p(this,wt)&&$t(p(this,Ut))}get internals(){return p(this,nt)}connectedCallback(){return p(this,ct,Ce).noBlocking?Jt.add(p(this,Ee)):p(this,Ee).call(this),p(be,ge)}adoptedCallback(){return p(be,ge)}disconnectedCallback(){var n;if(this.isConnected){O(this,we,!0);return}return Jt.delete(p(this,Ee)),Jt.delete(p(this,$e)),O(this,wt,!1),(n=p(this,mn))==null||n.forEach(i=>i()),O(this,vt,Zs(p(this,vt))),O(this,qt,Zs(p(this,qt))),si(p(this,pn)),p(be,ge)}};ge=new WeakMap,ve=new WeakMap,nt=new WeakMap,vt=new WeakMap,qt=new WeakMap,It=new WeakMap,we=new WeakMap,wt=new WeakMap,Se=new WeakMap,ye=new WeakMap,pn=new WeakMap,ct=new WeakSet,Ce=function(){return this.constructor[Symbol.metadata]},Ms=function(){return p(this,It).find(n=>!n.condition||n.condition())},Vn=new WeakMap,Dn=new WeakMap,_n=new WeakMap,$e=new WeakMap,Ut=new WeakMap,Fn=new WeakMap,qn=new WeakMap,Un=new WeakMap,mn=new WeakMap,Ee=new WeakMap,C(be,ge,Symbol()),h.createState=n=>{const i=ai,s=o=>{ii(s,o),p(i,ye)||$t(p(i,Ut))};return dc(s,null),delete s.name,delete s.length,p(i,nt).stateList.push(s),ii(s,n),s},h.createRef=()=>new pc(ai),h.createTemplate=(n,i)=>p(n,It).push(i);let q=be;const vc=Object.freeze(Object.defineProperty({__proto__:null,BoundaryCSSState:Ae,GemElement:q,RenderErrorEvent:$n,SVGTemplateResult:Qn,SheetToken:bt,TemplateResult:Te,UpdateToken:Ne,createCSSSheet:Re,get createRef(){return h.createRef},get createState(){return h.createState},get createTemplate(){return h.createTemplate},directive:St,html:st,render:vn,svg:Fs},Symbol.toStringTag,{value:"Module"})),tr="0.0.0",wc=Object.freeze(Object.defineProperty({__proto__:null,version:tr},Symbol.toStringTag,{value:"Module"})),{deleteProperty:Sc,getOwnPropertyDescriptor:er,defineProperty:En}=Reflect,{getPrototypeOf:Ct,assign:nr}=Object,ir=new Us;function Pt(e,t,n){const i=e.metadata;if(!er(i,t)){const s=new Set(i[t]);s.delete(n),En(i,t,{value:[...s]})}i[t].push(n)}function bn(e,t){const{value:n}=er(e,t);Sc(e,t),e[t]=n}const Ie=new WeakMap,{setAttribute:sr,toggleAttribute:yc,removeAttribute:rr}=Element.prototype;q.prototype.setAttribute=function(e,t){var i;const n=(i=Ie.get(Ct(this)))==null?void 0:i.get(e);if(!n)return sr.call(this,e,t);this[n]=t},q.prototype.removeAttribute=function(e){var n;const t=(n=Ie.get(Ct(this)))==null?void 0:n.get(e);if(!t)return rr.call(this,e);this[t]=null},q.prototype.toggleAttribute=function(e,t){var i;const n=(i=Ie.get(Ct(this)))==null?void 0:i.get(e);return n?this[n]=t??!this.hasAttribute(e):yc.call(this,e,t)};function $c(){}const or=Symbol("event handle");function ci(e,t,{attr:n,attrType:i,event:s,eventOptions:o}={}){En(e,t,{configurable:!0,get(){const c=ir.get(this)[t];return s&&!c?(this[t]=$c,this[t]):c},set(c){const a=this,_=ir.get(a);n&&(c=i===Boolean&&c===""?!0:i(c||""),c?sr.call(this,n,i===Boolean?"":c):rr.call(this,n)),c!==_[t]&&(s?(_[t]=c!=null&&c[or]?c:(u,v)=>{const r=new CustomEvent(s,{...v,...o,detail:u});a.dispatchEvent(r),c(u,v)},_[t][or]=!0):(_[t]=c,this[Ne]()))}})}function li(e,t){const n=e.name,i=Ht(n);return e.addInitializer(function(){const s=Ct(this);if(!s.hasOwnProperty(n)){Pt(e,"observedAttributes",i),ci(s,n,{attr:i,attrType:t});const o=Ie.get(s)||new Map;o.set(i,n),Ie.set(s,o)}bn(this,n)}),function(s){return this.getAttribute(i)??s}}function D(e,t){return li(t,String)}function He(e,t){return li(t,Boolean)}function ar(e,t){return li(t,Number)}function U(e,t){const n=t.name;return t.addInitializer(function(){const i=Ct(this);i.hasOwnProperty(n)||(Pt(t,"observedProperties",n),ci(i,n)),bn(this,n)}),function(i){return this[n]??i}}function hi(e){return function(t,n){const{addInitializer:i,name:s,access:o,kind:c}=n;i(function(){const a=e&&(()=>e(this));if(c==="getter"){if(n.private)throw new dt("not support");this.memo(()=>En(this,s,{configurable:!0,value:o.get(this)}),a)}else this.memo(o.get(this).bind(this),a)})}}function ft(e){return function(t,{addInitializer:n,access:i}){n(function(){this.effect(i.get(this).bind(this),e&&(()=>e(this)))})}}function cr(){return function(e,{addInitializer:t,access:n}){t(function(){this.effect(()=>n.get(this).bind(this),()=>[])})}}function We(){return hi(()=>[])}function Qt(){return ft(()=>[])}function ui(e){return function(t,{addInitializer:n,access:i}){n(function(){h.createTemplate(this,{render:i.get(this).bind(this),condition:e&&(()=>e(this))})})}}function lr(){return function(e,{addInitializer:t,access:n}){t(function(){this.addEventListener($n,({detail:i})=>{vn(n.get(this).apply(this,[i]),this.internals.shadowRoot||this)})})}}function Ec(e,t,n){En(e,t,{configurable:!0,get(){const i=this,{states:s}=i.internals;return s==null?void 0:s.has(n)},set(i){const s=this,{states:o}=s.internals;i?o==null||o.add(n):o==null||o.delete(n)}})}function xe(e,t){t.addInitializer(function(){const n=Ct(this),i=t.name;if(!n.hasOwnProperty(i)){const s=Ht(i);Pt(t,"definedCSSStates",s),Ec(n,i,s)}bn(this,i)})}function hr(e,t,n,i){const s=e.name,o=Ht(s);if(e.static)Pt(e,n,o);else{const c=Ct(t);c[s]||(c[s]=o,Pt(e,n,o))}return i||o}function ur(e,t){return function(n){return hr(t,this,"definedSlots",n)}}function di(e,t){return function(n){return hr(t,this,"definedParts",n)}}function Yt(e,t){t.addInitializer(function(){fr(t,this,t.name)})}function dr(e,t){t.addInitializer(function(){fr(t,this,t.name,{bubbles:!0,composed:!0})})}function fr(e,t,n,i){const s=Ct(t);if(!s.hasOwnProperty(n)){const o=Ht(n);Pt(e,"definedEvents",o),ci(s,n,{event:o,eventOptions:i})}bn(t,n)}function Cn(e){return function(t,n){Pt(n,"adoptedStyleSheets",e)}}function ze(e){return function(t,n){Pt(n,"observedStores",e)}}function kt({mode:e="open",serializable:t=!0,delegatesFocus:n,slotAssignment:i}={}){return function(s,o){const c=o.metadata;nr(c,{mode:e,serializable:t,delegatesFocus:n,slotAssignment:i})}}function pr(){return function(e,t){const n=t.metadata;n.noBlocking=!0}}function Ge(e){return function(t,n){const i=n.metadata;i.aria={...i.aria,...e}}}function _r(e){return function(t,{addInitializer:n}){n(function(){customElements.define(e,t)})}}window.__GEM_DEVTOOLS__HOOK__&&!window.__GEM_DEVTOOLS__HOOK__.GemElement&&nr(window.__GEM_DEVTOOLS__HOOK__,{...vc,...M,...hc,...wc});const Y=window.history,mr=Y.pushState.bind(Y),gr=Y.replaceState.bind(Y);let bc=0;const fi=()=>`${performance.now()}-${++bc}`,[x,Xt]=Kt({$hasCloseHandle:!1,$hasOpenHandle:!1,$hasShouldCloseHandle:!1,$key:""}),j=new Map;function vr(e){const{$key:t,$hasCloseHandle:n,$hasOpenHandle:i,$hasShouldCloseHandle:s}=e||{};if(x.$key!==t){if(t)throw new dt("`$key` is not allowed");if(n)throw new dt("`$hasCloseHandle` is not allowed");if(i)throw new dt("`$hasOpenHandle` is not allowed");if(s)throw new dt("`$hasShouldCloseHandle` is not allowed")}}function wr(e){return X.basePath?X.basePath+e:e}function pi(e){return e===X.basePath?"/":e.replace(new RegExp(`^${X.basePath}/`),"/")}function _i(){X.dispatchEvent(new CustomEvent("beforechange"))}function Pn(e){const t=j.get(x.$key)||{path:pi(location.pathname),query:new jt},n=e.path?ti(t.path,e.path):pi(location.pathname),i=new jt(e.query??(e.path?"":location.search)),s=String(i)!==String(t.query),o=s?i:t.query,c=n!==t.path||s,a=e.title||(c?"":document.title),_=e.close||e.data||e.open||e.shouldClose,u=decodeURIComponent(e.hash??(!c&&_?location.hash:""));return{...e,title:a,path:n,query:o,hash:u}}function Sr(e,t){vr(e.data);const n=Pn(e),{title:i,path:s,query:o,hash:c,close:a,open:_,shouldClose:u,data:v}=n,r={$hasCloseHandle:!!a,$hasOpenHandle:!!_,$hasShouldCloseHandle:!!u,$key:fi(),$title:i,...v};j.set(r.$key,n),_i(),Sn(x),Xt(r);const m=wr(s)+new jt(o)+c,l=decodeURIComponent(location.hash);t(r,i,m),l!==c&&window.dispatchEvent(new CustomEvent("hashchange"))}function yr(e,t,n,i){vr(e);const s={$key:fi(),$title:t,...e||{}},{pathname:o,search:c,hash:a}=new URL(n,location.origin+location.pathname),_=Pn({path:o,query:new jt(c),hash:a,title:t,data:e});j.set(s.$key,_),_i(),Sn(x),Xt(s);const u=wr(o)+_.query+a,v=location.hash;i(s,t,u),v!==a&&window.dispatchEvent(new CustomEvent("hashchange"))}const[$r,Cc]=Kt({basePath:""});class Pc extends EventTarget{get store(){return x}get currentKey(){return x.$key}get basePath(){return $r.basePath}set basePath(t){Cc({basePath:t}),Object.assign(j.get(x.$key),{path:pi(location.pathname)})}getParams(){return j.get(x.$key)}updateParams(t){Object.assign(j.get(x.$key),t),Xt()}push(t){Sr(t,mr)}replace(t){Sr(t,gr)}pushIgnoreCloseHandle(t){var n,i;x.$hasCloseHandle?((i=(n=j.get(x.$key))==null?void 0:n.close)==null||i.call(n),this.replace(t)):this.push(t)}forward(){Y.forward()}back(){Y.back()}}const X=new Pc,[kn,kc]=Kt({defaultTitle:document.title,url:"",title:""}),Tc={history:X,titleStore:kn,basePathStore:$r};if(!window._GEMHISTORY){if(window._GEMHISTORY=Tc,Y.pushState=function(t,n,i){yr(t,n,i,mr)},Y.replaceState=function(t,n,i){yr(t,n,i,gr)},window.addEventListener("hashchange",({isTrusted:t})=>{t&&X.replace({hash:location.hash})}),Y.state)if(Y.state.$hasCloseHandle){Xt(Y.state);const t=Pn({title:document.title});j.set(x.$key,t),X.back()}else{const t=Pn({title:document.title,hash:location.hash});Xt({$key:fi(),...Y.state||{}}),j.set(x.$key,t)}else{const{protocol:t,pathname:n,search:i,hash:s}=location;t.startsWith("http")&&X.replace({path:n,query:i,hash:s})}ht(kn,()=>{const t=j.get(x.$key);t&&(t.title=kn.title)}),ht(x,()=>{const{title:t}=X.getParams();t!==kn.title&&kc({title:t})});let e=!1;window.addEventListener("popstate",t=>{var o,c;const n=t.state;if(!(n!=null&&n.$key))return;if(e){e=!1;return}if(!j.has(n.$key)){const{pathname:a,search:_,hash:u}=location;j.set(n.$key,{path:a,query:new jt(_),hash:decodeURIComponent(u),title:n.$title,data:n})}const i=x;if(parseFloat(n.$key)>parseFloat(i.$key)&&n.$hasOpenHandle)(c=(o=j.get(n.$key))==null?void 0:o.open)==null||c.call(o);else if(i.$hasCloseHandle){const a=j.get(i.$key),_=a==null?void 0:a.close,u=a==null?void 0:a.shouldClose;if(u&&!u()){e=!0,X.forward();return}else _?_():n.$hasCloseHandle&&(e=!0,X.back())}_i(),Sn(x),Xt(n)})}const{history:L,titleStore:Tt,basePathStore:Er}=window._GEMHISTORY;/**
|
|
134
134
|
* @license
|
|
135
135
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
136
136
|
* This code may only be used under the BSD style license found at
|
|
@@ -142,7 +142,7 @@ var Pn=(o,b,L)=>{if(!b.has(o))throw TypeError("Cannot "+L)};var w=(o,b,L)=>(Pn(o
|
|
|
142
142
|
* Code distributed by Google as part of the polymer project is also
|
|
143
143
|
* subject to an additional IP rights grant found at
|
|
144
144
|
* http://polymer.github.io/PATENTS.txt
|
|
145
|
-
*/const
|
|
145
|
+
*/const br=(e,t)=>{const n=e.startNode.parentNode,i=t===void 0?e.endNode:t.startNode,s=n.insertBefore(lt(),i);n.insertBefore(lt(),i);const o=new Bt(e.options);return o.insertAfterNode(s),o},xt=(e,t)=>(e.setValue(t),e.commit(),e),mi=(e,t,n)=>{const i=e.startNode.parentNode,s=n?n.startNode:e.endNode,o=t.endNode.nextSibling;o!==s&&Ls(i,t.startNode,o,s)},gi=e=>{Kn(e.startNode.parentNode,e.startNode,e.endNode.nextSibling)},Cr=(e,t,n)=>{const i=new Map;for(let s=t;s<=n;s++)i.set(e[s],s);return i},Pr=new WeakMap,kr=new WeakMap,Mc=St((e,t,n)=>{let i;return n===void 0?n=t:t!==void 0&&(i=t),s=>{if(!(s instanceof Bt))throw new Error("repeat can only be used in text bindings");const o=Pr.get(s)||[],c=kr.get(s)||[],a=[],_=[],u=[];let v=0;for(const b of e)u[v]=i?i(b,v):v,_[v]=n(b,v),v++;let r,m,l=0,g=o.length-1,w=0,y=_.length-1;for(;l<=g&&w<=y;)if(o[l]===null)l++;else if(o[g]===null)g--;else if(c[l]===u[w])a[w]=xt(o[l],_[w]),l++,w++;else if(c[g]===u[y])a[y]=xt(o[g],_[y]),g--,y--;else if(c[l]===u[y])a[y]=xt(o[l],_[y]),mi(s,o[l],a[y+1]),l++,y--;else if(c[g]===u[w])a[w]=xt(o[g],_[w]),mi(s,o[g],o[l]),g--,w++;else if(r===void 0&&(r=Cr(u,w,y),m=Cr(c,l,g)),!r.has(c[l]))gi(o[l]),l++;else if(!r.has(c[g]))gi(o[g]),g--;else{const b=m.get(u[w]),f=b!==void 0?o[b]:null;if(f===null){const $=br(s,o[l]);xt($,_[w]),a[w]=$}else a[w]=xt(f,_[w]),mi(s,f,o[l]),o[b]=null;w++}for(;w<=y;){const b=br(s,a[y+1]);xt(b,_[w]),a[w++]=b}for(;l<=g;){const b=o[l++];b!==null&&gi(b)}Pr.set(s,a),kr.set(s,u)}});/**
|
|
146
146
|
* @license
|
|
147
147
|
* Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
|
|
148
148
|
* This code may only be used under the BSD style license found at
|
|
@@ -154,7 +154,7 @@ var Pn=(o,b,L)=>{if(!b.has(o))throw TypeError("Cannot "+L)};var w=(o,b,L)=>(Pn(o
|
|
|
154
154
|
* Code distributed by Google as part of the polymer project is also
|
|
155
155
|
* subject to an additional IP rights grant found at
|
|
156
156
|
* http://polymer.github.io/PATENTS.txt
|
|
157
|
-
*/const
|
|
157
|
+
*/const vi=new WeakMap,Oc=St((e,t)=>n=>{const i=vi.get(n);if(Array.isArray(e)){if(Array.isArray(i)&&i.length===e.length&&e.every((s,o)=>s===i[o]))return}else if(i===e&&(e!==void 0||vi.has(n)))return;n.setValue(t()),vi.set(n,Array.isArray(e)?Array.from(e):e)});/**
|
|
158
158
|
* @license
|
|
159
159
|
* Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
|
|
160
160
|
* This code may only be used under the BSD style license found at
|
|
@@ -166,57 +166,56 @@ var Pn=(o,b,L)=>{if(!b.has(o))throw TypeError("Cannot "+L)};var w=(o,b,L)=>(Pn(o
|
|
|
166
166
|
* Code distributed by Google as part of the polymer project is also
|
|
167
167
|
* subject to an additional IP rights grant found at
|
|
168
168
|
* http://polymer.github.io/PATENTS.txt
|
|
169
|
-
*/const zt=new WeakMap,Jt=Z(n=>e=>{const t=zt.get(e);if(n===void 0&&e instanceof Vt){if(t!==void 0||!zt.has(e)){const s=e.committer.name;e.committer.element.removeAttribute(s)}}else n!==t&&e.setValue(n);zt.set(e,n)});var Zn=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},f=(n,e,t)=>(Zn(n,e,"read from private field"),t?t.call(n):e.get(n)),S=(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)},O=(n,e,t,s)=>(Zn(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),ye,Ge,se,We,J,Ie,Q,ie,nt,st,Qt,Xt,Yt,it,Zt,rt,le,en,ot,at,ct;function hi(){}function tn(n){typeof n=="function"&&n()}const lt=new Dn,nn=(n=performance.now())=>{if(performance.now()>n+16)return requestAnimationFrame(nn);const e=lt.get();e&&(e(),nn(n))};lt.addEventListener("start",()=>H(nn));const ht=Symbol("constructor"),ut=Symbol("init"),es=Symbol("update"),ts=class Xe extends HTMLElement{constructor(e={}){super(),S(this,Ge,void 0),S(this,se,void 0),S(this,We,void 0),S(this,J,void 0),S(this,Ie,void 0),S(this,Q,void 0),S(this,ie,void 0),S(this,nt,void 0),this.setState=i=>{if(!this.state)throw new K("`state` not initialized");Object.assign(this.state,i),H(f(this,le))},S(this,st,i=>{i==null||i.forEach(r=>{const{callback:a,getDep:c,values:l,preCallback:u}=r,p=c==null?void 0:c();(!c||!l||jn(l,p))&&(tn(u),r.preCallback=a(p,l),r.values=p)})}),S(this,Qt,()=>{f(this,st).call(this,f(this,Q))}),S(this,Xt,()=>{f(this,st).call(this,f(this,ie))}),this.effect=(i,r)=>{f(this,Q)||O(this,Q,[]);const a={callback:i,getDep:r,initialized:f(this,J),inConstructor:this[ht]};f(this,J)&&(a.values=r==null?void 0:r(),a.preCallback=i(a.values)),f(this,Q).push(a)},this.memo=(i,r)=>{f(this,ie)||O(this,ie,[]),f(this,ie).push({callback:i,getDep:r,inConstructor:this[ht]})},S(this,Yt,()=>{var i;(i=f(this,Q))==null||i.forEach(r=>{const{callback:a,getDep:c,initialized:l}=r;l||(r.values=c==null?void 0:c(),r.preCallback=a(r.values),r.initialized=!0)})}),S(this,it,()=>{f(this,Xt).call(this);const i=f(this,Ge)===this,r=this.render?this.render():i?void 0:V`<slot></slot>`;r!==void 0&&Dt(r,f(this,Ge))}),S(this,Zt,()=>this.shouldUpdate?this.shouldUpdate():!0),S(this,rt,()=>{f(this,J)&&f(this,Zt).call(this)&&(f(this,it).call(this),H(f(this,en)),H(f(this,Qt)))}),S(this,le,()=>{f(this,Ie)?lt.add(f(this,rt)):f(this,rt).call(this)}),this.update=()=>{H(f(this,le))},S(this,en,()=>{var i;(i=this.updated)==null||i.call(this)}),S(this,ot,void 0),S(this,at,()=>{var a,c,l;if(f(this,We)){O(this,We,!1);return}Reflect.set(this,ht,!1),(a=this.willMount)==null||a.call(this);const{observedStores:i,rootElement:r}=this.constructor;if(O(this,ot,i==null?void 0:i.map(u=>ne(u,f(this,le)))),f(this,it).call(this),O(this,J,!0),O(this,nt,(c=this.mounted)==null?void 0:c.call(this)),f(this,Yt).call(this),r&&this.isConnected&&((l=this.getRootNode().host)==null?void 0:l.tagName)!==r.toUpperCase())throw new K("not allow current root type")}),S(this,ct,i=>i==null?void 0:i.filter(r=>(tn(r.preCallback),r.initialized=!1,r.inConstructor))),H(()=>Reflect.set(this,ut,!1)),Reflect.set(this,ht,!0),Reflect.set(this,ut,!0),Reflect.set(this,es,()=>{f(this,J)&&H(f(this,le))}),O(this,Ie,e.isAsync),O(this,Ge,e.isLight?this:this.attachShadow({mode:e.mode||"open",delegatesFocus:e.delegatesFocus,slotAssignment:e.slotAssignment}));let t;this.effect(([i=!1])=>{if(t===void 0&&(t=this.hasAttribute("tabindex")),this.internals.ariaDisabled=String(i),e.focusable&&!t&&(this.tabIndex=-Number(i)),(e.focusable||e.delegatesFocus)&&i)return jt(this,"click",r=>r.isTrusted&&r.stopImmediatePropagation(),{capture:!0})},()=>[Reflect.get(this,"disabled")]);const{adoptedStyleSheets:s}=new.target;if(s){const i=s.map(r=>r[Ut]||r);this.shadowRoot?this.shadowRoot.adoptedStyleSheets=i:this.effect(()=>{const r=this.getRootNode();return r.adoptedStyleSheets=[...r.adoptedStyleSheets,...i],()=>{r.adoptedStyleSheets=Un(r.adoptedStyleSheets,i)}},()=>[])}}get internals(){if(!f(this,se)){O(this,se,this.attachInternals());try{f(this,se).states.add("foo"),f(this,se).states.delete("foo")}catch{Reflect.defineProperty(f(this,se),"states",{value:{has:e=>te(e)in this.dataset,add:e=>this.dataset[te(e)]="",delete:e=>delete this.dataset[te(e)]}})}}return f(this,se)}attributeChangedCallback(){return f(this,J)&&H(f(this,le)),f(Xe,ye)}closestElement(e){const t=typeof e=="function",s=typeof e=="string"&&e.toUpperCase(),i=a=>t?a.constructor===e:a.tagName===s;let r=this;for(;r&&!i(r);)r=r.parentElement||r.getRootNode().host;return r}connectedCallback(){return this.isConnected&&f(this,Ie)?lt.add(f(this,at)):f(this,at).call(this),f(Xe,ye)}adoptedCallback(){return f(Xe,ye)}disconnectedCallback(){var e,t;if(this.isConnected){O(this,We,!0);return}return O(this,J,!1),(e=f(this,ot))==null||e.forEach(s=>s()),tn(f(this,nt)),(t=this.unmounted)==null||t.call(this),O(this,Q,f(this,ct).call(this,f(this,Q))),O(this,ie,f(this,ct).call(this,f(this,ie))),f(Xe,ye)}};ye=new WeakMap,Ge=new WeakMap,se=new WeakMap,We=new WeakMap,J=new WeakMap,Ie=new WeakMap,Q=new WeakMap,ie=new WeakMap,nt=new WeakMap,st=new WeakMap,Qt=new WeakMap,Xt=new WeakMap,Yt=new WeakMap,it=new WeakMap,Zt=new WeakMap,rt=new WeakMap,le=new WeakMap,en=new WeakMap,ot=new WeakMap,at=new WeakMap,ct=new WeakMap,S(ts,ye,Symbol());let A=ts;const dt=new qn;function ft(n,e,t){const{booleanAttributes:s,numberAttributes:i}=n.constructor;Object.defineProperty(n,e,{configurable:!0,get(){if(!(ut 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=dt.get(this),l=c[e],u=a.getAttribute(t);if(this[ut]&&u!==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):u!==String(r)&&a.setAttribute(t,String(r))}})}const ns=Symbol("event handle");function we(n,e,t,s){Object.defineProperty(n,e,{configurable:!0,get(){const i=dt.get(this)[e];return i||!t?i:(this[e]=hi,this[e])},set(i){const r=this,a=dt.get(r);i!==a[e]&&(t?(a[e]=i!=null&&i[ns]?i:(c,l)=>{const u=new CustomEvent(t,{...l,...s,detail:c});r.dispatchEvent(u),i(c,l)},Reflect.set(a[e],ns,!0)):(a[e]=i,this[es]()))}})}const ss=n=>[...n.querySelectorAll("[data-gem-reflect]")].map(e=>e.target);function pt(n,e,t){const s=`[ref=${t}]`;Object.defineProperty(n,e,{configurable:!0,get(){const i=dt.get(this);let r=i[e];if(!r){const a=this,c=a.shadowRoot||a;r={get ref(){return t},get element(){for(const l of[c,...ss(c)]){const u=l.querySelector(s);if(u)return u}},get elements(){return[c,...ss(c)].map(l=>[...l.querySelectorAll(s)]).flat()}},i[e]=r}return r}})}function mt(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 gt=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=>ft(e.prototype,te(l),l)),i==null||i.forEach(l=>we(e.prototype,l)),r==null||r.forEach(l=>we(e.prototype,te(l),l)),a==null||a.forEach(l=>mt(e.prototype,te(l),l)),c==null||c.forEach(l=>pt(e.prototype,te(l),l))}gt(n,e,t)},window.__GEM_DEVTOOLS__HOOK__&&Object.assign(window.__GEM_DEVTOOLS__HOOK__,{...b,...li});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 ui(n,e){const t=`${D(e)}-${He()}`;q(n,"defineRefs",t),pt(n,e,t)}function sn(n,e,t){q(n,"observedAttributes",t),ft(n,e,t)}function C(n,e){sn(n,e,D(e))}function rn(n,e){const t=D(e);q(n,"booleanAttributes",t,!0),sn(n,e,t)}function di(n,e){const t=D(e);q(n,"numberAttributes",t,!0),sn(n,e,t)}function k(n,e){q(n,"observedProperties",e),we(n,e)}function yt(n,e){const t=D(e);q(n,"defineCSSStates",t),mt(n,e,t)}function fi(n,e){const t=D(n[e]||e);n[e]=t,q(n instanceof A?n:n.prototype,"defineSlots",t)}function is(n,e){const t=D(n[e]||e);n[e]=t,q(n instanceof A?n:n.prototype,"defineParts",t)}function xe(n,e){rs(n,e)}function pi(n,e){rs(n,e,{bubbles:!0,composed:!0})}function rs(n,e,t){const s=D(e);q(n,"defineEvents",s),we(n,e,s,t)}function mi(n){return function(e){q(e.prototype,"adoptedStyleSheets",n)}}function wt(n){return function(e){q(e.prototype,"observedStores",n)}}function gi(n){return function(e){const t=e;t.rootElement=n}}function yi(n){return function(e){gt(n,e)}}const G=window.history,os=G.pushState.bind(G),as=G.replaceState.bind(G);let wi=0;const on=()=>`${performance.now()}-${++wi}`,[P,_e]=tt({$hasCloseHandle:!1,$hasOpenHandle:!1,$hasShouldCloseHandle:!1,$key:""}),T=new Map;function cs(n){const{$key:e,$hasCloseHandle:t,$hasOpenHandle:s,$hasShouldCloseHandle:i}=n||{};if(P.$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 ls(n){return W.basePath?W.basePath+n:n}function an(n){return n===W.basePath?"/":n.replace(new RegExp(`^${W.basePath}/`),"/")}function cn(){W.dispatchEvent(new CustomEvent("beforechange"))}function _t(n){const e=T.get(P.$key)||{path:an(location.pathname),query:new pe},t=n.path?qt(e.path,n.path):an(location.pathname),s=new pe(n.query??(n.path?"":location.search)),i=String(s)!==String(e.query),r=i?s:e.query,a=t!==e.path||i,c=n.title||(a?"":document.title),l=n.close||n.data||n.open||n.shouldClose,u=decodeURIComponent(n.hash??(!a&&l?location.hash:""));return{...n,title:c,path:t,query:r,hash:u}}function hs(n,e){cs(n.data);const t=_t(n),{title:s,path:i,query:r,hash:a,close:c,open:l,shouldClose:u,data:p}=t,h={$hasCloseHandle:!!c,$hasOpenHandle:!!l,$hasShouldCloseHandle:!!u,$key:on(),$title:s,...p};T.set(h.$key,t),cn(),Ze(P),_e(h);const g=ls(i)+new pe(r)+a,d=decodeURIComponent(location.hash);e(h,s,g),d!==a&&window.dispatchEvent(new CustomEvent("hashchange"))}function us(n,e,t,s){cs(n);const i={$key:on(),$title:e,...n||{}},{pathname:r,search:a,hash:c}=new URL(t,location.origin+location.pathname),l=_t({path:r,query:new pe(a),hash:c,title:e,data:n});T.set(i.$key,l),cn(),Ze(P),_e(i);const u=ls(r)+l.query+c,p=location.hash;s(i,e,u),p!==c&&window.dispatchEvent(new CustomEvent("hashchange"))}const[ds,_i]=tt({basePath:""});class vi extends EventTarget{get store(){return P}get currentKey(){return P.$key}get basePath(){return ds.basePath}set basePath(e){_i({basePath:e}),Object.assign(T.get(P.$key),{path:an(location.pathname)})}getParams(){return T.get(P.$key)}updateParams(e){Object.assign(T.get(P.$key),e),_e()}push(e){hs(e,os)}replace(e){hs(e,as)}pushIgnoreCloseHandle(e){var t,s;P.$hasCloseHandle?((s=(t=T.get(P.$key))==null?void 0:t.close)==null||s.call(t),this.replace(e)):this.push(e)}forward(){G.forward()}back(){G.back()}}const W=new vi,[vt,Ei]=tt({title:""}),Si={history:W,titleStore:vt,basePathStore:ds};if(!window._GEMHISTORY){if(window._GEMHISTORY=Si,G.pushState=function(e,t,s){us(e,t,s,os)},G.replaceState=function(e,t,s){us(e,t,s,as)},window.addEventListener("hashchange",({isTrusted:e})=>{e&&W.replace({hash:location.hash})}),G.state)if(G.state.$hasCloseHandle){_e(G.state);const e=_t({title:document.title});T.set(P.$key,e),W.back()}else{const e=_t({title:document.title,hash:location.hash});_e({$key:on(),...G.state||{}}),T.set(P.$key,e)}else{const{pathname:e,search:t,hash:s}=location;W.replace({path:e,query:t,hash:s})}ne(vt,()=>{const e=T.get(P.$key);e&&(e.title=vt.title)}),ne(P,()=>{const{title:e}=W.getParams();e!==vt.title&&Ei({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(!T.has(t.$key)){const{pathname:c,search:l,hash:u}=location;T.set(t.$key,{path:c,query:new pe(l),hash:decodeURIComponent(u),title:t.$title,data:t})}const s=P;if(parseFloat(t.$key)>parseFloat(s.$key)&&t.$hasOpenHandle)(a=(r=T.get(t.$key))==null?void 0:r.open)==null||a.call(r);else if(s.$hasCloseHandle){const c=T.get(s.$key),l=c==null?void 0:c.close,u=c==null?void 0:c.shouldClose;if(u&&!u()){n=!0,W.forward();return}else l?l():t.$hasCloseHandle&&(n=!0,W.back())}cn(),Ze(P),_e(t)})}const{history:v,titleStore:ve,basePathStore:fs}=window._GEMHISTORY;var bi=Object.defineProperty,Pi=Object.getOwnPropertyDescriptor,j=(n,e,t,s)=>{for(var i=s>1?void 0:s?Pi(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&&bi(e,t,i),i},ps=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},U=(n,e,t)=>(ps(n,e,"read from private field"),t?t.call(n):e.get(n)),Ve=(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)},ms=(n,e,t,s)=>(ps(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),De,he,Ee,Et,ln,St;const gs="_";class Ci extends RegExp{constructor(e){let t=0;super(`^${e.replace(/((:[^/$]+)|(\*))/g,(s,i)=>i==="*"?`(?<${gs}${t++}>.*)`:`(?<${i.slice(1)}>[^/]+)`)}$`)}}function hn(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 Ci(n),s=e.match(t)||`${e}/`.match(t);if(!s)return null;const i={};return s.groups&&Object.entries(s.groups).forEach(([r,a])=>{i[r.startsWith(gs)?r.slice(1):r]=a}),i}function bt(n,e){let t=0,s=n.pattern.replaceAll("*",()=>`:${t++}`);const i=e==null?void 0:e.params;return i&&Object.keys(i).forEach(r=>{s=s.replace(new RegExp(`:${r}`,"g"),i[r])}),s}function ys(n,e){return{path:bt(n,e),...e}}const un=V``,ws=new Map,M=class xs extends A{constructor({isLight:e,routes:t}={}){super({isLight:e}),Ve(this,he),this.trigger=v,this.currentParams={},Ve(this,De,void 0),this.state={content:un},Ve(this,Et,()=>{if(!this.locationStore)return;const{path:s,query:i,hash:r,data:a}=v.getParams();z(this.locationStore,{path:s,params:this.currentParams,query:i,hash:r,data:a})}),Ve(this,ln,()=>{if(!U(this,he,Ee))return;const s=ws.get(v.currentKey);s?U(this,he,Ee).scroll(0,s):(this.scrollIgnoreHash||!v.getParams().hash)&&U(this,he,Ee).scroll(0,0)}),Ve(this,St,(s,i,r)=>{this.beforeroutechange(s),ms(this,De,void 0),this.currentRoute=s,this.currentParams=i;const a=async()=>{this.setState({content:r}),U(this,Et).call(this),await Promise.resolve(),U(this,ln).call(this),this.routechange(this.currentRoute)};this.transition&&"startViewTransition"in document?document.startViewTransition(()=>a()):a()}),this.update=()=>{const{path:s,hash:i,query:r}=this.trigger.getParams(),{route:a,params:c={}}=xs.findRoute(this.routes,s),{redirect:l,content:u,getContent:p}=a||{};if(l){this.trigger.replace({path:bt({pattern:l},{params:c}),query:r,hash:i});return}this.trigger===v&&z(ve,{title:a==null?void 0:a.title});const h=u||(p==null?void 0:p(c,this.shadowRoot||this));if(this.loading(a),h instanceof Promise){ms(this,De,h);const g=()=>U(this,De)===h;h.then(d=>{g()&&U(this,St).call(this,a,c,d)}).catch(d=>{g()&&this.error(d)});return}U(this,St).call(this,a,c,h)},this.routes=this.routes||t}mounted(){this.effect(()=>{if(U(this,he,Ee))return jt(v,"beforechange",()=>ws.set(v.currentKey,U(this,he,Ee).scrollTop))},()=>[this.scrollContainer]),this.effect(()=>ne(this.trigger.store,()=>this.setState({})),()=>[this.trigger]),this.effect(([e,t],s)=>{if(s&&e===s[0]&&t===s[1]){U(this,Et).call(this);return}this.update()},()=>{const{path:e,query:t,hash:s}=this.trigger.getParams();return[this.key,e,t,s]})}shouldUpdate(){return!this.inert}render(){const{content:e}=this.state;if(e!==void 0)return this.shadowRoot?V`
|
|
169
|
+
*/const wi=new WeakMap,Tr=St(e=>t=>{const n=wi.get(t);if(e===void 0&&t instanceof Zn){if(n!==void 0||!wi.has(t)){const i=t.committer.name;t.committer.element.removeAttribute(i)}}else e!==n&&t.setValue(e);wi.set(t,e)});var Lc=Object.create,Si=Object.defineProperty,Nc=Object.getOwnPropertyDescriptor,Mr=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Zt=e=>{throw TypeError(e)},Or=(e,t,n)=>t in e?Si(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lr=(e,t)=>Si(e,"name",{value:t,configurable:!0}),Nr=e=>[,,,Lc((e==null?void 0:e[Mr("metadata")])??null)],Ar=["class","method","getter","setter","accessor","field","value","get","set"],Ve=e=>e!==void 0&&typeof e!="function"?Zt("Function expected"):e,Ac=(e,t,n,i,s)=>({kind:Ar[e],name:t,metadata:i,addInitializer:o=>n._?Zt("Already initialized"):s.push(Ve(o||null))}),Rr=(e,t)=>Or(t,Mr("metadata"),e[3]),P=(e,t,n,i)=>{for(var s=0,o=e[t>>1],c=o&&o.length;s<c;s++)t&1?o[s].call(n):i=o[s].call(n,i);return i},z=(e,t,n,i,s,o)=>{var c,a,_,u,v,r=t&7,m=!!(t&8),l=!!(t&16),g=r>3?e.length+1:r?m?1:2:0,w=Ar[r+5],y=r>3&&(e[g-1]=[]),b=e[g]||(e[g]=[]),f=r&&(!l&&!m&&(s=s.prototype),r<5&&(r>3||!l)&&Nc(r<4?s:{get[n](){return G(this,o)},set[n](d){return Tn(this,o,d)}},n));r?l&&r<4&&Lr(o,(r>2?"set ":r>1?"get ":"")+n):Lr(s,n);for(var $=i.length-1;$>=0;$--)u=Ac(r,n,_={},e[3],b),r&&(u.static=m,u.private=l,v=u.access={has:l?d=>Rc(s,d):d=>n in d},r^3&&(v.get=l?d=>(r^1?G:Ic)(d,s,r^4?o:f.get):d=>d[n]),r>2&&(v.set=l?(d,T)=>Tn(d,s,T,r^4?o:f.set):(d,T)=>d[n]=T)),a=(0,i[$])(r?r<4?l?o:f[w]:r>4?void 0:{get:f.get,set:f.set}:s,u),_._=1,r^4||a===void 0?Ve(a)&&(r>4?y.unshift(a):r?l?o=a:f[w]=a:s=a):typeof a!="object"||a===null?Zt("Object expected"):(Ve(c=a.get)&&(f.get=c),Ve(c=a.set)&&(f.set=c),Ve(c=a.init)&&y.unshift(c));return r||Rr(e,s),f&&Si(s,n,f),l?r^4?o:f:s},F=(e,t,n)=>Or(e,typeof t!="symbol"?t+"":t,n),yi=(e,t,n)=>t.has(e)||Zt("Cannot "+n),Rc=(e,t)=>Object(t)!==t?Zt('Cannot use the "in" operator on this value'):e.has(t),G=(e,t,n)=>(yi(e,t,"read from private field"),n?n.call(e):t.get(e)),Z=(e,t,n)=>t.has(e)?Zt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Tn=(e,t,n,i)=>(yi(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Ic=(e,t,n)=>(yi(e,t,"access private method"),n),Ir,Hr,Wr,xr,zr,Gr,Vr,Dr,Fr,qr,Ur,Br,jr,Kr,Jr,Qr,$i,S,zt,te,De,Mn,Ei,Fe,On,bi,Ci,Pi,ki,Ti,Mi,Yr,Oi,Xr;const Zr="_";class Hc extends RegExp{constructor(t){let n=0;super(`^${t.replace(/((:[^/$]+)|(\*))/g,(i,s)=>s==="*"?`(?<${Zr}${n++}>.*)`:`(?<${s.slice(1)}>[^/]+)`)}$`)}}function Li(e,t){if(window.URLPattern){const o=new window.URLPattern({pathname:e}),c=o.exec({pathname:t})||o.exec({pathname:`${t}/`});return c?c.pathname.groups:null}const n=new Hc(e),i=t.match(n)||`${t}/`.match(n);if(!i)return null;const s={};return i.groups&&Object.entries(i.groups).forEach(([o,c])=>{s[o.startsWith(Zr)?o.slice(1):o]=c}),s}function Ln(e,t){let n=0,i=e.pattern.replaceAll("*",()=>`:${n++}`);const s=t==null?void 0:t.params;return s&&Object.keys(s).forEach(o=>{i=i.replace(new RegExp(`:${o}`,"g"),s[o])}),i}function to(e,t){return{path:Ln(e,t),...t}}const Ni=st``,eo=new Map;class V extends($i=q,Qr=[He],Jr=[U],Kr=[U],jr=[U],Br=[Yt],Ur=[Yt],qr=[Yt],Fr=[Yt],Dr=[U],Vr=[U],Gr=[U],zr=[We()],xr=[ft(t=>[t.scrollContainer])],Wr=[ft(t=>[t.scrollContainer])],Hr=[ft(t=>{var n;return G(n=t,ki).call(n)})],Ir=[ui(t=>!t.inert)],$i){constructor(){super(...arguments),Z(this,zt),F(this,"transition",P(S,8,this)),P(S,11,this),F(this,"routes",P(S,12,this)),P(S,15,this),F(this,"locationStore",P(S,16,this)),P(S,19,this),F(this,"key",P(S,20,this)),P(S,23,this),F(this,"loading",P(S,24,this)),P(S,27,this),F(this,"beforeroutechange",P(S,28,this)),P(S,31,this),F(this,"routechange",P(S,32,this)),P(S,35,this),F(this,"error",P(S,36,this)),P(S,39,this),F(this,"scrollContainer",P(S,40,this)),P(S,43,this),F(this,"scrollIgnoreHash",P(S,44,this)),P(S,47,this),F(this,"trigger",P(S,48,this,L)),P(S,51,this),F(this,"currentRoute"),F(this,"currentParams",{}),Z(this,De,h.createState({content:Ni})),Z(this,Mn,()=>{if(!this.locationStore)return;const{path:t,query:n,hash:i,data:s}=L.getParams();Et(this.locationStore,{path:t,params:this.currentParams,query:n,hash:i,data:s})}),Z(this,Ei,()=>{if(!G(this,zt,te))return;const t=eo.get(L.currentKey);t?G(this,zt,te).scroll(0,t):(this.scrollIgnoreHash||!L.getParams().hash)&&G(this,zt,te).scroll(0,0)}),Z(this,Fe),Z(this,On,(t,n,i)=>{this.beforeroutechange(t),Tn(this,Fe,void 0),this.currentRoute=t,this.currentParams=n;const s=async()=>{G(this,De).call(this,{content:i}),G(this,Mn).call(this),await Promise.resolve(),G(this,Ei).call(this),this.routechange(this.currentRoute)};this.transition&&"startViewTransition"in document?document.startViewTransition(()=>s()):s()}),Z(this,bi,P(S,52,this,()=>this.internals.states.delete(Ae))),P(S,55,this),Z(this,Ci,P(S,56,this,()=>{if(G(this,zt,te))return ei(L,"beforechange",()=>eo.set(L.currentKey,G(this,zt,te).scrollTop))})),P(S,59,this),Z(this,Pi,P(S,60,this,()=>ht(this.trigger.store,()=>G(this,De).call(this,{})))),P(S,63,this),Z(this,ki,()=>{const{path:t,query:n,hash:i}=this.trigger.getParams();return[this.key,t,n,i]}),Z(this,Ti,P(S,64,this,([t,n],i)=>{if(i&&t===i[0]&&n===i[1]){G(this,Mn).call(this);return}this.update()})),P(S,67,this),Z(this,Mi,P(S,68,this,()=>{const{content:t}=G(this,De);if(t!==void 0)return this.shadowRoot?st`
|
|
170
170
|
<style>
|
|
171
171
|
:host(:where(:not([hidden]))),
|
|
172
172
|
:not(:defined) {
|
|
173
173
|
display: contents;
|
|
174
174
|
}
|
|
175
175
|
</style>
|
|
176
|
-
${
|
|
177
|
-
`:
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
</style>
|
|
176
|
+
${t===Ni?st`<slot></slot>`:t}
|
|
177
|
+
`:t===Ni?void 0:st`${t}`})),P(S,71,this),F(this,"update",()=>{const{path:t,hash:n,query:i}=this.trigger.getParams(),{route:s,params:o={}}=ee.findRoute(this.routes,t),{redirect:c,content:a,getContent:_}=s||{};if(c){this.trigger.replace({path:Ln({pattern:c},{params:o}),query:i,hash:n});return}this.trigger===L&&(location.href!==Tt.url||s!=null&&s.title)&&Et(Tt,{url:location.href,title:s==null?void 0:s.title});const u=a||(_==null?void 0:_(o,this.shadowRoot||this));if(this.loading(s),u instanceof Promise){Tn(this,Fe,u);const v=()=>G(this,Fe)===u;u.then(r=>{v()&&G(this,On).call(this,s,o,r)}).catch(r=>{v()&&this.error(r)});return}G(this,On).call(this,s,o,u)})}}S=Nr($i),zt=new WeakSet,te=function(){return typeof this.scrollContainer=="function"?this.scrollContainer():this.scrollContainer},De=new WeakMap,Mn=new WeakMap,Ei=new WeakMap,Fe=new WeakMap,On=new WeakMap,bi=new WeakMap,Ci=new WeakMap,Pi=new WeakMap,ki=new WeakMap,Ti=new WeakMap,Mi=new WeakMap,z(S,5,"transition",Qr,V),z(S,5,"routes",Jr,V),z(S,5,"locationStore",Kr,V),z(S,5,"key",jr,V),z(S,5,"loading",Br,V),z(S,5,"beforeroutechange",Ur,V),z(S,5,"routechange",qr,V),z(S,5,"error",Fr,V),z(S,5,"scrollContainer",Dr,V),z(S,5,"scrollIgnoreHash",Vr,V),z(S,5,"trigger",Gr,V),z(S,21,"#unBoundary",zr,bi),z(S,21,"#rememberScrollPosition",xr,Ci),z(S,21,"#connectTriggerStore",Wr,Pi),z(S,21,"#updateContent",Hr,Ti),z(S,21,"#content",Ir,Mi),Rr(S,V),F(V,"createLocationStore",()=>{const{path:e,query:t,hash:n,data:i}=L.getParams();return Le({path:e,query:t,hash:n,data:i,params:{}})}),F(V,"findRoute",(e=[],t)=>{let n=null,i;e instanceof Array?i=e:i=Object.values(e);for(const s of i)if(s.pattern==="*")n=s;else{const o=Li(s.pattern,t);if(o)return{route:s,params:o}}return{route:n}}),Yr=[kt()];class ee extends(Xr=V){}Oi=Nr(Xr),ee=z(Oi,0,"GemRouteElement",Yr,ee),P(Oi,1,ee);var Wc=Object.create,Ai=Object.defineProperty,xc=Object.getOwnPropertyDescriptor,no=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),ne=e=>{throw TypeError(e)},io=(e,t,n)=>t in e?Ai(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,so=(e,t)=>Ai(e,"name",{value:t,configurable:!0}),ro=e=>[,,,Wc((e==null?void 0:e[no("metadata")])??null)],oo=["class","method","getter","setter","accessor","field","value","get","set"],qe=e=>e!==void 0&&typeof e!="function"?ne("Function expected"):e,zc=(e,t,n,i,s)=>({kind:oo[e],name:t,metadata:i,addInitializer:o=>n._?ne("Already initialized"):s.push(qe(o||null))}),Gc=(e,t)=>io(t,no("metadata"),e[3]),k=(e,t,n,i)=>{for(var s=0,o=e[t>>1],c=o&&o.length;s<c;s++)t&1?o[s].call(n):i=o[s].call(n,i);return i},I=(e,t,n,i,s,o)=>{var c,a,_,u,v,r=t&7,m=!!(t&8),l=!!(t&16),g=r>3?e.length+1:r?m?1:2:0,w=oo[r+5],y=r>3&&(e[g-1]=[]),b=e[g]||(e[g]=[]),f=r&&(!l&&!m&&(s=s.prototype),r<5&&(r>3||!l)&&xc(r<4?s:{get[n](){return rt(this,o)},set[n](d){return ao(this,o,d)}},n));r?l&&r<4&&so(o,(r>2?"set ":r>1?"get ":"")+n):so(s,n);for(var $=i.length-1;$>=0;$--)u=zc(r,n,_={},e[3],b),r&&(u.static=m,u.private=l,v=u.access={has:l?d=>Vc(s,d):d=>n in d},r^3&&(v.get=l?d=>(r^1?rt:Dc)(d,s,r^4?o:f.get):d=>d[n]),r>2&&(v.set=l?(d,T)=>ao(d,s,T,r^4?o:f.set):(d,T)=>d[n]=T)),a=(0,i[$])(r?r<4?l?o:f[w]:r>4?void 0:{get:f.get,set:f.set}:s,u),_._=1,r^4||a===void 0?qe(a)&&(r>4?y.unshift(a):r?l?o=a:f[w]=a:s=a):typeof a!="object"||a===null?ne("Object expected"):(qe(c=a.get)&&(f.get=c),qe(c=a.set)&&(f.set=c),qe(c=a.init)&&y.unshift(c));return r||Gc(e,s),f&&Ai(s,n,f),l?r^4?o:f:s},K=(e,t,n)=>io(e,typeof t!="symbol"?t+"":t,n),Ri=(e,t,n)=>t.has(e)||ne("Cannot "+n),Vc=(e,t)=>Object(t)!==t?ne('Cannot use the "in" operator on this value'):e.has(t),rt=(e,t,n)=>(Ri(e,t,"read from private field"),n?n.call(e):t.get(e)),ie=(e,t,n)=>t.has(e)?ne("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ao=(e,t,n,i)=>(Ri(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Dc=(e,t,n)=>(Ri(e,t,"access private method"),n),co,lo,ho,uo,fo,po,_o,mo,go,vo,wo,So,yo,Ii,$o,E,Mt,Ue,Eo,Hi,Wi,xi,zi,Gi,bo,Co,Po,Vi,ko,tt,Di;function To(e){return!e.startsWith("/")}const Fc=Re(ni`
|
|
178
|
+
:host {
|
|
179
|
+
/* link default style */
|
|
180
|
+
cursor: pointer;
|
|
181
|
+
color: blue;
|
|
182
|
+
text-decoration: underline;
|
|
183
|
+
}
|
|
184
|
+
a {
|
|
185
|
+
all: unset;
|
|
186
|
+
display: contents;
|
|
187
|
+
}
|
|
188
|
+
a:visited {
|
|
189
|
+
color: unset;
|
|
190
|
+
}
|
|
191
|
+
`);$o=[ze(Er),Cn(Fc),kt(),Ge({focusable:!0})];class H extends(Ii=q,yo=[D],So=[D],wo=[D],vo=[D],go=[D],mo=[D],_o=[He],po=[U],fo=[U],uo=[U],ho=[U],lo=[di],co=[Qt()],Ii){constructor(){super(...arguments),k(E,5,this),ie(this,Mt),K(this,"href",k(E,8,this)),k(E,11,this),K(this,"target",k(E,12,this)),k(E,15,this),K(this,"path",k(E,16,this)),k(E,19,this),K(this,"query",k(E,20,this)),k(E,23,this),K(this,"hash",k(E,24,this)),k(E,27,this),K(this,"hint",k(E,28,this)),k(E,31,this),K(this,"preload",k(E,32,this)),k(E,35,this),K(this,"route",k(E,36,this)),k(E,39,this),K(this,"options",k(E,40,this)),k(E,43,this),K(this,"routeOptions",k(E,44,this)),k(E,47,this),K(this,"prepare",k(E,48,this)),k(E,51,this),K(this,"link",k(E,52,this)),k(E,55,this),ie(this,Hi,async()=>{var o;const t=this.getLocationString();if(!t)return;if(To(t))switch(this.target){case"_self":window.location.href=t;return;case"_parent":window.parent.location.href=t;return;case"_top":window.top.location.href=t;return;default:window.open(t);return}const{path:n,query:i,hash:s}=L.getParams();if(n+i+s!==t)if(await((o=this.prepare)==null?void 0:o.call(this)),this.route)L.pushIgnoreCloseHandle(to(this.route,rt(this,Mt,Ue)));else if(this.href){const c=new URL(t,location.origin);L.pushIgnoreCloseHandle({path:c.pathname,query:c.search,hash:c.hash})}else L.pushIgnoreCloseHandle({path:this.path,query:this.query,hash:this.hash})}),ie(this,Wi,t=>{t.preventDefault()}),ie(this,xi,()=>{const t=this.getLocationString();return To(t)?t:new URL(L.basePath+t,location.origin).toString()}),ie(this,zi,()=>{var t,n,i;(t=this.route)==null||t.content,(i=(n=this.route)==null?void 0:n.getContent)==null||i.call(n,{},this.shadowRoot)})}render(){return st`
|
|
193
192
|
<a
|
|
194
193
|
part=${this.link}
|
|
195
|
-
@click=${
|
|
196
|
-
href=${
|
|
194
|
+
@click=${rt(this,Wi)}
|
|
195
|
+
href=${Tr(rt(this,Mt,Eo)==="off"?void 0:rt(this,xi).call(this))}
|
|
196
|
+
tabindex="-1"
|
|
197
197
|
>
|
|
198
198
|
<slot></slot>
|
|
199
199
|
</a>
|
|
200
|
-
`}getLocationString(){var
|
|
200
|
+
`}getLocationString(){var t,n;if(this.route){const i=((t=rt(this,Mt,Ue))==null?void 0:t.query)||"",s=((n=rt(this,Mt,Ue))==null?void 0:n.hash)||"";return Ln(this.route,rt(this,Mt,Ue))+i+s}else{const i=this.href||this.path+this.query+this.hash,{path:s,query:o}=L.getParams();return i.startsWith("#")?`${s}${o}${i}`:i.startsWith("?")?`${s}${i}`:i.startsWith(".")?ti(s,i):i}}}E=ro(Ii),Mt=new WeakSet,Ue=function(){return this.routeOptions||this.options},Eo=function(){return this.hint||"on"},Hi=new WeakMap,Wi=new WeakMap,xi=new WeakMap,zi=new WeakMap,Gi=function(){this.addEventListener("click",rt(this,Hi)),this.addEventListener("pointerenter",rt(this,zi))},Gi=I(E,17,"#init",co,Mt,Gi),I(E,5,"href",yo,H),I(E,5,"target",So,H),I(E,5,"path",wo,H),I(E,5,"query",vo,H),I(E,5,"hash",go,H),I(E,5,"hint",mo,H),I(E,5,"preload",_o,H),I(E,5,"route",po,H),I(E,5,"options",fo,H),I(E,5,"routeOptions",uo,H),I(E,5,"prepare",ho,H),I(E,5,"link",lo,H),H=I(E,0,"GemLinkElement",$o,H),k(E,1,H),ko=[ze(L.store)];class Gt extends(Vi=H,Po=[D],Co=[xe],bo=[ft()],Vi){constructor(){super(...arguments),K(this,"pattern",k(tt,8,this)),k(tt,11,this),K(this,"active",k(tt,12,this)),k(tt,15,this),ie(this,Di,k(tt,16,this,()=>{const{path:t,query:n,hash:i}=L.getParams(),s=this.pattern&&Li(this.pattern,t);this.active=!!s||t+n+i===this.getLocationString()})),k(tt,19,this)}}tt=ro(Vi),Di=new WeakMap,I(tt,5,"pattern",Po,Gt),I(tt,5,"active",Co,Gt),I(tt,21,"#updateState",bo,Di),Gt=I(tt,0,"GemActiveLinkElement",ko,Gt),k(tt,1,Gt),customElements.define("gem-link",H),customElements.define("gem-active-link",Gt),customElements.define("gem-route",ee),customElements.define("gem-light-route",V);var qc=Object.create,Fi=Object.defineProperty,Uc=Object.getOwnPropertyDescriptor,Mo=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),se=e=>{throw TypeError(e)},Oo=(e,t,n)=>t in e?Fi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lo=(e,t)=>Fi(e,"name",{value:t,configurable:!0}),Bc=e=>[,,,qc((e==null?void 0:e[Mo("metadata")])??null)],No=["class","method","getter","setter","accessor","field","value","get","set"],Be=e=>e!==void 0&&typeof e!="function"?se("Function expected"):e,jc=(e,t,n,i,s)=>({kind:No[e],name:t,metadata:i,addInitializer:o=>n._?se("Already initialized"):s.push(Be(o||null))}),Kc=(e,t)=>Oo(t,Mo("metadata"),e[3]),ot=(e,t,n,i)=>{for(var s=0,o=e[t>>1],c=o&&o.length;s<c;s++)t&1?o[s].call(n):i=o[s].call(n,i);return i},re=(e,t,n,i,s,o)=>{var c,a,_,u,v,r=t&7,m=!!(t&8),l=!!(t&16),g=r>3?e.length+1:r?m?1:2:0,w=No[r+5],y=r>3&&(e[g-1]=[]),b=e[g]||(e[g]=[]),f=r&&(!l&&!m&&(s=s.prototype),r<5&&(r>3||!l)&&Uc(r<4?s:{get[n](){return Ui(this,o)},set[n](d){return Ao(this,o,d)}},n));r?l&&r<4&&Lo(o,(r>2?"set ":r>1?"get ":"")+n):Lo(s,n);for(var $=i.length-1;$>=0;$--)u=jc(r,n,_={},e[3],b),r&&(u.static=m,u.private=l,v=u.access={has:l?d=>Jc(s,d):d=>n in d},r^3&&(v.get=l?d=>(r^1?Ui:Qc)(d,s,r^4?o:f.get):d=>d[n]),r>2&&(v.set=l?(d,T)=>Ao(d,s,T,r^4?o:f.set):(d,T)=>d[n]=T)),a=(0,i[$])(r?r<4?l?o:f[w]:r>4?void 0:{get:f.get,set:f.set}:s,u),_._=1,r^4||a===void 0?Be(a)&&(r>4?y.unshift(a):r?l?o=a:f[w]=a:s=a):typeof a!="object"||a===null?se("Object expected"):(Be(c=a.get)&&(f.get=c),Be(c=a.set)&&(f.set=c),Be(c=a.init)&&y.unshift(c));return r||Kc(e,s),f&&Fi(s,n,f),l?r^4?o:f:s},je=(e,t,n)=>Oo(e,typeof t!="symbol"?t+"":t,n),qi=(e,t,n)=>t.has(e)||se("Cannot "+n),Jc=(e,t)=>Object(t)!==t?se('Cannot use the "in" operator on this value'):e.has(t),Ui=(e,t,n)=>(qi(e,t,"read from private field"),n?n.call(e):t.get(e)),Bi=(e,t,n)=>t.has(e)?se("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ao=(e,t,n,i)=>(qi(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Qc=(e,t,n)=>(qi(e,t,"access private method"),n),Ro,Io,Ho,Wo,xo,ji,zo,W,Ki,Ji,Qi;let Go=0;const Vo=e=>{clearTimeout(Go),Go=window.setTimeout(()=>document.title=e)};function Yc(e,t="",n=""){const i=Tt.title||e;i&&i!==Tt.defaultTitle?(oe.title=i,Vo(t+oe.title+n)):(oe.title=Tt.defaultTitle,Vo(oe.title))}zo=[kt()];let Ot=class Ua extends(ji=q,xo=[D],Wo=[D],Ho=[He],Io=[ft(t=>[t.inert])],Ro=[Qt()],ji){constructor(){super(...arguments),je(this,"prefix",ot(W,8,this)),ot(W,11,this),je(this,"suffix",ot(W,12,this)),ot(W,15,this),je(this,"inert",ot(W,16,this)),ot(W,19,this),Bi(this,Ki,ot(W,20,this,()=>!this.inert&&ht(Tt,this.update))),ot(W,23,this),Bi(this,Ji,new MutationObserver(()=>this.update())),Bi(this,Qi,ot(W,24,this,()=>{Ui(this,Ji).observe(this,{characterData:!0,childList:!0,subtree:!0})})),ot(W,27,this),je(this,"render",()=>{var t;return Yc((t=this.textContent)==null?void 0:t.trim(),this.prefix,this.suffix),st`${Ua.title}`})}static setTitle(t){Et(Tt,{title:t})}};W=Bc(ji),Ki=new WeakMap,Ji=new WeakMap,Qi=new WeakMap,re(W,5,"prefix",xo,Ot),re(W,5,"suffix",Wo,Ot),re(W,5,"inert",Ho,Ot),re(W,21,"#connectStore",Io,Ki),re(W,21,"#obTextContent",Ro,Qi),Ot=re(W,0,"GemTitleElement",zo,Ot),je(Ot,"title",document.title),ot(W,1,Ot);let oe=Ot;customElements.define("gem-title",oe);var Xc=Object.create,Yi=Object.defineProperty,Zc=Object.getOwnPropertyDescriptor,Do=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),ae=e=>{throw TypeError(e)},Fo=(e,t,n)=>t in e?Yi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qo=(e,t)=>Yi(e,"name",{value:t,configurable:!0}),tl=e=>[,,,Xc((e==null?void 0:e[Do("metadata")])??null)],Uo=["class","method","getter","setter","accessor","field","value","get","set"],Ke=e=>e!==void 0&&typeof e!="function"?ae("Function expected"):e,el=(e,t,n,i,s)=>({kind:Uo[e],name:t,metadata:i,addInitializer:o=>n._?ae("Already initialized"):s.push(Ke(o||null))}),nl=(e,t)=>Fo(t,Do("metadata"),e[3]),pt=(e,t,n,i)=>{for(var s=0,o=e[t>>1],c=o&&o.length;s<c;s++)t&1?o[s].call(n):i=o[s].call(n,i);return i},Je=(e,t,n,i,s,o)=>{var c,a,_,u,v,r=t&7,m=!!(t&8),l=!!(t&16),g=r>3?e.length+1:r?m?1:2:0,w=Uo[r+5],y=r>3&&(e[g-1]=[]),b=e[g]||(e[g]=[]),f=r&&(!l&&!m&&(s=s.prototype),r<5&&(r>3||!l)&&Zc(r<4?s:{get[n](){return Zi(this,o)},set[n](d){return Bo(this,o,d)}},n));r?l&&r<4&&qo(o,(r>2?"set ":r>1?"get ":"")+n):qo(s,n);for(var $=i.length-1;$>=0;$--)u=el(r,n,_={},e[3],b),r&&(u.static=m,u.private=l,v=u.access={has:l?d=>il(s,d):d=>n in d},r^3&&(v.get=l?d=>(r^1?Zi:rl)(d,s,r^4?o:f.get):d=>d[n]),r>2&&(v.set=l?(d,T)=>Bo(d,s,T,r^4?o:f.set):(d,T)=>d[n]=T)),a=(0,i[$])(r?r<4?l?o:f[w]:r>4?void 0:{get:f.get,set:f.set}:s,u),_._=1,r^4||a===void 0?Ke(a)&&(r>4?y.unshift(a):r?l?o=a:f[w]=a:s=a):typeof a!="object"||a===null?ae("Object expected"):(Ke(c=a.get)&&(f.get=c),Ke(c=a.set)&&(f.set=c),Ke(c=a.init)&&y.unshift(c));return r||nl(e,s),f&&Yi(s,n,f),l?r^4?o:f:s},Nn=(e,t,n)=>Fo(e,typeof t!="symbol"?t+"":t,n),Xi=(e,t,n)=>t.has(e)||ae("Cannot "+n),il=(e,t)=>Object(t)!==t?ae('Cannot use the "in" operator on this value'):e.has(t),Zi=(e,t,n)=>(Xi(e,t,"read from private field"),n?n.call(e):t.get(e)),sl=(e,t,n)=>t.has(e)?ae("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Bo=(e,t,n,i)=>(Xi(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),rl=(e,t,n)=>(Xi(e,t,"access private method"),n),jo,Ko,Jo,Qo,ts,Yo,B,es;const ol=Re(ni`
|
|
201
|
+
:host(:where(:not([hidden]))) {
|
|
202
|
+
position: relative;
|
|
203
|
+
display: inline-flex;
|
|
204
|
+
align-items: center;
|
|
205
|
+
}
|
|
206
|
+
svg {
|
|
207
|
+
width: 100%;
|
|
208
|
+
height: 100%;
|
|
209
|
+
}
|
|
210
|
+
`),Xo=new Map;Yo=[kt(),Cn(ol)];class _t extends(ts=q,Qo=[D],Jo=[U],Ko=[U],jo=[xe],ts){constructor(){super(...arguments),Nn(this,"selector",pt(B,8,this)),pt(B,11,this),Nn(this,"root",pt(B,12,this)),pt(B,15,this),Nn(this,"element",pt(B,16,this)),pt(B,19,this),Nn(this,"active",pt(B,20,this)),pt(B,23,this),sl(this,es,()=>{const t=this.element||(this.selector?(this.root||document).querySelector(this.selector):null);if(typeof t=="string"){let n=Xo.get(t);return n||(n=document.createElement("template"),n.innerHTML=t,Xo.set(t,n)),n.content.cloneNode(!0)}else return t instanceof HTMLTemplateElement?t.content.cloneNode(!0):t==null?void 0:t.cloneNode(!0)})}render(){return st`
|
|
211
|
+
${Zi(this,es).call(this)}
|
|
212
|
+
<slot></slot>
|
|
213
|
+
`}}B=tl(ts),es=new WeakMap,Je(B,5,"selector",Qo,_t),Je(B,5,"root",Jo,_t),Je(B,5,"element",Ko,_t),Je(B,5,"active",jo,_t),_t=Je(B,0,"GemUseElement",Yo,_t),pt(B,1,_t),customElements.define("gem-use",_t);var al=Object.create,ns=Object.defineProperty,cl=Object.getOwnPropertyDescriptor,Zo=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Qe=e=>{throw TypeError(e)},ta=(e,t,n)=>t in e?ns(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ea=(e,t)=>ns(e,"name",{value:t,configurable:!0}),ll=e=>[,,,al((e==null?void 0:e[Zo("metadata")])??null)],na=["class","method","getter","setter","accessor","field","value","get","set"],Ye=e=>e!==void 0&&typeof e!="function"?Qe("Function expected"):e,hl=(e,t,n,i,s)=>({kind:na[e],name:t,metadata:i,addInitializer:o=>n._?Qe("Already initialized"):s.push(Ye(o||null))}),ul=(e,t)=>ta(t,Zo("metadata"),e[3]),Xe=(e,t,n,i)=>{for(var s=0,o=e[t>>1],c=o&&o.length;s<c;s++)t&1?o[s].call(n):i=o[s].call(n,i);return i},is=(e,t,n,i,s,o)=>{var c,a,_,u,v,r=t&7,m=!!(t&8),l=!!(t&16),g=r>3?e.length+1:r?m?1:2:0,w=na[r+5],y=r>3&&(e[g-1]=[]),b=e[g]||(e[g]=[]),f=r&&(!l&&!m&&(s=s.prototype),r<5&&(r>3||!l)&&cl(r<4?s:{get[n](){return sa(this,o)},set[n](d){return ra(this,o,d)}},n));r?l&&r<4&&ea(o,(r>2?"set ":r>1?"get ":"")+n):ea(s,n);for(var $=i.length-1;$>=0;$--)u=hl(r,n,_={},e[3],b),r&&(u.static=m,u.private=l,v=u.access={has:l?d=>dl(s,d):d=>n in d},r^3&&(v.get=l?d=>(r^1?sa:fl)(d,s,r^4?o:f.get):d=>d[n]),r>2&&(v.set=l?(d,T)=>ra(d,s,T,r^4?o:f.set):(d,T)=>d[n]=T)),a=(0,i[$])(r?r<4?l?o:f[w]:r>4?void 0:{get:f.get,set:f.set}:s,u),_._=1,r^4||a===void 0?Ye(a)&&(r>4?y.unshift(a):r?l?o=a:f[w]=a:s=a):typeof a!="object"||a===null?Qe("Object expected"):(Ye(c=a.get)&&(f.get=c),Ye(c=a.set)&&(f.set=c),Ye(c=a.init)&&y.unshift(c));return r||ul(e,s),f&&ns(s,n,f),l?r^4?o:f:s},ia=(e,t,n)=>ta(e,typeof t!="symbol"?t+"":t,n),ss=(e,t,n)=>t.has(e)||Qe("Cannot "+n),dl=(e,t)=>Object(t)!==t?Qe('Cannot use the "in" operator on this value'):e.has(t),sa=(e,t,n)=>(ss(e,t,"read from private field"),n?n.call(e):t.get(e)),ra=(e,t,n,i)=>(ss(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),fl=(e,t,n)=>(ss(e,t,"access private method"),n),oa,aa,rs,ca,mt;ca=[kt()];class Vt extends(rs=q,aa=[D],oa=[D],rs){constructor(){super(...arguments),ia(this,"content",Xe(mt,8,this)),Xe(mt,11,this),ia(this,"contentcss",Xe(mt,12,this)),Xe(mt,15,this)}render(){this.shadowRoot.innerHTML=wn`
|
|
201
214
|
<style>
|
|
202
215
|
:host(:where(:not([hidden]))) {
|
|
203
|
-
|
|
204
|
-
display: inline-flex;
|
|
205
|
-
align-items: center;
|
|
206
|
-
}
|
|
207
|
-
svg {
|
|
208
|
-
width: 100%;
|
|
209
|
-
height: 100%;
|
|
216
|
+
display: contents;
|
|
210
217
|
}
|
|
218
|
+
${this.contentcss}
|
|
211
219
|
</style>
|
|
212
|
-
${
|
|
213
|
-
<slot></slot>
|
|
214
|
-
`}}Qe=new WeakMap,Ct([C],Pe.prototype,"selector",2),Ct([k],Pe.prototype,"root",2),Ct([k],Pe.prototype,"element",2),Ct([yt],Pe.prototype,"active",2),customElements.define("gem-use",Pe);var Ri=Object.defineProperty,Hi=Object.getOwnPropertyDescriptor,$s=(n,e,t,s)=>{for(var i=s>1?void 0:s?Hi(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&&Ri(e,t,i),i};class $t extends A{constructor(){super(),this.effect(()=>{this.shadowRoot&&(this.shadowRoot.innerHTML=`
|
|
215
|
-
<style>
|
|
216
|
-
:host(:where(:not([hidden]))) {
|
|
217
|
-
display: contents;
|
|
218
|
-
}
|
|
219
|
-
${this.contentcss}
|
|
220
|
-
</style>
|
|
221
|
-
${this.content}
|
|
222
|
-
`)},()=>[this.content,this.contentcss])}render(){}}$s([C],$t.prototype,"content",2),$s([C],$t.prototype,"contentcss",2),customElements.define("gem-unsafe",$t);var Gi=Object.defineProperty,Wi=Object.getOwnPropertyDescriptor,Ls=(n,e,t,s)=>{for(var i=s>1?void 0:s?Wi(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&&Gi(e,t,i),i};const Ii="gem-reflect-start",ks="gem-reflect-end",Ts=n=>new Comment(n),xi=n=>{const e=[];let t=n;for(;t&&(e.push(t),t.nodeValue!==ks);)t=t.nextSibling;return e};class Lt extends A{constructor(){super({isLight:!0});N(this,Mt);this.target=document.head,this.effect(()=>{this.hidden=!0,this.dataset.gemReflect=""},()=>[]);const t=Ts(Ii),s=Ts(ks);let i;this.effect(()=>((i||[t,...this.childNodes,s]).forEach((r,a,c)=>{const l=c[a-1];l?l.after(r):this.target[w(this,Mt,Ds)](r)}),()=>{i=xi(t),i.forEach(r=>r.remove())}),()=>[this.target])}}Mt=new WeakSet,Ds=function(){return this.method||"append"},Ls([C],Lt.prototype,"method",2),Ls([k],Lt.prototype,"target",2),customElements.define("gem-reflect",Lt);const kt=Symbol("open mark");function Vi(n){var e;const t=Symbol();return e=class extends A{constructor(){super(),this.label="",this.internals.role="alertdialog",this.internals.ariaModal="true"}static get isOpen(){return this.store[kt]}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=()=>z(this.store,{[kt]:!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(),z(this.store,{[kt]:!1,...n}),t}static shouldClose(){return!0}},e.inertStore=[],e.instance=null,e.store=ge({[kt]:!1,...n}),e}var Di=Object.defineProperty,qi=Object.getOwnPropertyDescriptor,_n=(n,e,t,s)=>{for(var i=s>1?void 0:s?qi(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&&Di(e,t,i),i},Ms=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},Ce=(n,e,t)=>(Ms(n,e,"read from private field"),t?t.call(n):e.get(n)),vn=(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)},En=(n,e,t,s)=>(Ms(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),Ue,Be,Fe;const Ke=Symbol();o.GemDialogBaseElement=class extends A{constructor(){super(),vn(this,Ue,void 0),vn(this,Be,void 0),vn(this,Fe,[]),this.closeHandle=()=>{var e;return this.inert=!0,Ce(this,Fe).forEach(t=>t.inert=!1),Ce(this,Ue)?Ce(this,Ue).before(this):Ce(this,Be)&&((e=Ce(this,Be))==null||e.appendChild(this)),this.dispatchEvent(new CustomEvent("close")),this.opened=!1,Ke},this.openHandle=()=>(this.hidden=!1,this.inert=!1,En(this,Ue,this.nextSibling),En(this,Be,this.parentElement||this.getRootNode()),En(this,Fe,[...document.body.children].filter(e=>!e.inert)),Ce(this,Fe).forEach(e=>e.inert=!0),document.body.append(this),this.dispatchEvent(new CustomEvent("open")),this.opened=!0,Ke),this.open=()=>{if(!this.opened)return this.openHandle(),v.push({title:this.label,open:this.openHandle,close:this.closeHandle,shouldClose:this.shouldClose}),Ke},this.close=()=>(v.back(),Ke),this.forceClose=()=>(this.opened=!1,setTimeout(this.close,100),Ke),this.effect(()=>this.inert=!0,()=>[]),this.internals.role="dialog",this.internals.ariaModal="true"}shouldClose(){return!0}},Ue=new WeakMap,Be=new WeakMap,Fe=new WeakMap,_n([C],o.GemDialogBaseElement.prototype,"label",2),_n([yt],o.GemDialogBaseElement.prototype,"opened",2),o.GemDialogBaseElement=_n([wt(v.store)],o.GemDialogBaseElement);const Ns=new WeakMap;function Os(n){return Ns.get(n)}const As=new WeakMap;function ji(n){return As.get(n)}const Rs=new WeakMap;function Hs(n){const e=He(),t=document.createElement("style"),s=ge(n),i={},r={};As.set(i,r),Ns.set(i,s);const a=()=>Object.keys(s).forEach(u=>{r[u]||(r[u]=`--${D(u)}-${e}`,i[u]=`var(${r[u]})`)});Rs.set(i,a),a();const c=()=>`:root, :host {${Object.keys(s).reduce((u,p)=>u+`${r[p]}:${s[p]};`,"")}}`,l=()=>t.textContent=c();return ne(s,l),l(),(document.head||document.documentElement).append(t),i}function Gs(n,e){z(Os(n),e),Rs.get(n)()}function Ui(n){const e=Hs(n);return[e,t=>Gs(e,t)]}class Bi{constructor(e){this.info=(...t)=>{console.log(`[${this._type}]:`,...t)},this.warn=(...t)=>{console.warn(`[${this._type}]:`,...t)},this.error=(...t)=>{console.error(`[${this._type}]:`,...t)},this._type=e}}const Fi=new Bi("GEM"),Ki=/\$\d(?:<[^>]*>)?/,zi=/\$(\d)(<([^>]*)>)?/g,Ji=3;function Ws(n,...e){const t=n.split(Ki),s=[];let i;for(;i=zi.exec(n);){const r=i[Ji],a=Number(i[1])-1,c=e[a];s.push(typeof c=="function"?c(r):c)}return V(t,...s)}const ze=new Set,bn=class bn{constructor(e){N(this,Le);N(this,Nt);N(this,Ot);N(this,de);N(this,ke);if(this.cachePrefix="gem-i18n",this.replace=({path:i})=>this.setLanguage(i),this.getParams=()=>({path:this.currentLanguage}),!e.resources[e.fallbackLanguage])throw new K("i18n: fallbackLanguage invalid");this.store=ge(this),Object.assign(this,e);let t=w(this,Nt,qs)||this.currentLanguage||w(this,Ot,js);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?(Y(this,ke,t,Rt),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?Ws(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){w(this,de,Ye)&&ze.forEach(async i=>await i.setLanguage(e));let t;const s=this.resources[e];if(!s)return Fi.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 u=0;u<localStorage.length;u++){const p=localStorage.key(u);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,z(this.store),e!==this.currentLanguage&&Y(this,ke,e,Rt),this.cache===!0&&this.setCache(),e}resetLanguage(){return w(this,de,Ye)&&ze.forEach(e=>e.resetLanguage()),Y(this,ke,this.fallbackLanguage,Rt),this.cache&&localStorage.removeItem(w(this,Le,At)),this.setLanguage(this.detectLanguage())}setCache(){w(this,de,Ye)&&ze.forEach(e=>e.setCache()),localStorage.setItem(w(this,Le,At),this.currentLanguage)}createSubModule(e,t){const s=new bn({resources:t,cachePrefix:`${this.cachePrefix}-${e}`,currentLanguage:this.currentLanguage,fallbackLanguage:this.fallbackLanguage,cache:this.cache});return ze.add(s),s}toJSON(){return{currentLanguage:this.currentLanguage,currentLanguagePack:this.resources[this.currentLanguage]}}};Le=new WeakSet,At=function(){return`${this.cachePrefix}:current`},Nt=new WeakSet,qs=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:""}},Ot=new WeakSet,js=function(){return this.cache&&localStorage.getItem(w(this,Le,At))||""},de=new WeakSet,Ye=function(){return!ze.has(this)},ke=new WeakSet,Rt=function(e){var t;w(this,de,Ye)&&(document.documentElement.lang=e),this.currentLanguage=e,(t=this.onChange)==null||t.call(this,e)};let Sn=bn;const Qi=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)).constructor;function Is(n={}){const{origin:e=location.origin,base:t="",appendHeaders:s=()=>({}),transformInput:i=h=>h,transformOutput:r=h=>h,...a}=n,c=h=>h instanceof FormData||h instanceof Blob||h instanceof Qi||h instanceof URLSearchParams||h instanceof ReadableStream||h instanceof ArrayBuffer?h:typeof h=="object"?JSON.stringify(h):h,l=(h,g)=>{if(new URL(h,location.origin).pathname!==h)throw new K("`path` format is incorrect");const d=new URLSearchParams(g).toString();return`${e}${t}${h}${d?"?":""}${d}`},u=h=>{if(!h)return{};if(h instanceof Headers)return Object.fromEntries(h);const g=Array.isArray(h)?h:Object.entries(h);return Object.fromEntries(g.map(([d,m])=>[d.toLowerCase(),m]))},p=async(h,g={})=>{const d=new Request(h,{...a,...g,headers:new Headers({"content-type":"application/json",...u(a.headers),...u(g.headers)})}),m=await fetch(d);if(m.status===0)throw new Error("Request fail");if(m.status>=500)throw new Error(m.statusText);const y=d.headers.get("content-type"),E=m.status>=400;try{let _;if(y.includes("json")?_=await m.json():y.includes("octet-stream")?_=await m.arrayBuffer():_=await m.text(),E)throw new Error(m.statusText,{cause:_});return r(_,d)}catch{throw new Error("Parse error")}};return{request:p,get(h,g){const d=i(g);return p(l(h,d),{method:"GET",headers:s(d)})},del(h,g){const d=i(g);return p(l(h,d),{method:"DELETE",headers:s(d)})},put(h,g){const d=i(g);return p(l(h),{method:"PUT",headers:s(d),body:c(d)})},post(h,g){const d=i(g);return p(l(h),{method:"POST",headers:s(d),body:c(d)})}}}const{request:Xi,del:Yi,get:Zi,post:er,put:tr}=Is(),R=n=>window.matchMedia(n).matches,nr={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=A,o.GemError=K,o.GemLightRouteElement=_s,o.GemReflectElement=Lt,o.GemRouteElement=dn,o.GemTitleElement=be,o.GemUnsafeElement=$t,o.GemUseElement=Pe,o.I18n=Sn,o.LinkedList=Dn,o.PREFIX=bs,o.PropProxyMap=qn,o.QueryString=pe,o.SUFFIX=Ps,o.SVGTemplateResult=Wt,o.SheetToken=Ut,o.StoreListenerMap=me,o.TemplateResult=Ne,o.absoluteLocation=qt,o.addListener=jt,o.addMicrotask=H,o.addMicrotaskToStack=ti,o.adoptedStyle=mi,o.attribute=C,o.basePathStore=fs,o.boolattribute=rn,o.camelToKebabCase=D,o.classMap=Bn,o.cleanObject=Ze,o.connect=ne,o.connectStore=wt,o.createCSSSheet=si,o.createHistoryParams=ys,o.createModalClass=Vi,o.createPath=bt,o.createStore=ge,o.createTheme=Hs,o.css=ni,o.customElement=yi,o.defineAttribute=ft,o.defineCSSState=mt,o.defineProperty=we,o.defineRef=pt,o.del=Yi,o.directive=Z,o.disconnect=ci,o.emitter=xe,o.exportPartsMap=ai,o.get=Zi,o.getThemeProps=ji,o.getThemeStore=Os,o.globalemitter=pi,o.guard=Yn,o.history=v,o.html=V,o.ifDefined=Jt,o.initRequest=Is,o.isArrayChange=jn,o.kebabToCamelCase=te,o.matchPath=hn,o.mediaQuery=nr,o.nativeDefineElement=gt,o.numattribute=di,o.objectMapToString=et,o.part=is,o.partMap=oi,o.post=er,o.property=k,o.put=tr,o.randomStr=He,o.raw=Re,o.refobject=ui,o.removeItems=Un,o.render=Dt,o.repeat=Xn,o.request=Xi,o.rootElement=gi,o.slot=fi,o.splice=Ws,o.state=yt,o.styleMap=ri,o.styled=ii,o.svg=Vn,o.titleStore=ve,o.updateStore=z,o.updateTheme=Gs,o.useStore=tt,o.useTheme=Ui,o.version=Fn,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});
|
|
220
|
+
${this.content}
|
|
221
|
+
`}}mt=ll(rs),is(mt,5,"content",aa,Vt),is(mt,5,"contentcss",oa,Vt),Vt=is(mt,0,"GemUnsafeElement",ca,Vt),Xe(mt,1,Vt),customElements.define("gem-unsafe",Vt);var pl=Object.create,os=Object.defineProperty,_l=Object.getOwnPropertyDescriptor,la=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),ce=e=>{throw TypeError(e)},ha=(e,t,n)=>t in e?os(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ua=(e,t)=>os(e,"name",{value:t,configurable:!0}),ml=e=>[,,,pl((e==null?void 0:e[la("metadata")])??null)],da=["class","method","getter","setter","accessor","field","value","get","set"],Ze=e=>e!==void 0&&typeof e!="function"?ce("Function expected"):e,gl=(e,t,n,i,s)=>({kind:da[e],name:t,metadata:i,addInitializer:o=>n._?ce("Already initialized"):s.push(Ze(o||null))}),fa=(e,t)=>ha(t,la("metadata"),e[3]),Lt=(e,t,n,i)=>{for(var s=0,o=e[t>>1],c=o&&o.length;s<c;s++)t&1?o[s].call(n):i=o[s].call(n,i);return i},An=(e,t,n,i,s,o)=>{var c,a,_,u,v,r=t&7,m=!!(t&8),l=!!(t&16),g=r>3?e.length+1:r?m?1:2:0,w=da[r+5],y=r>3&&(e[g-1]=[]),b=e[g]||(e[g]=[]),f=r&&(!l&&!m&&(s=s.prototype),r<5&&(r>3||!l)&&_l(r<4?s:{get[n](){return Nt(this,o)},set[n](d){return cs(this,o,d)}},n));r?l&&r<4&&ua(o,(r>2?"set ":r>1?"get ":"")+n):ua(s,n);for(var $=i.length-1;$>=0;$--)u=gl(r,n,_={},e[3],b),r&&(u.static=m,u.private=l,v=u.access={has:l?d=>vl(s,d):d=>n in d},r^3&&(v.get=l?d=>(r^1?Nt:wl)(d,s,r^4?o:f.get):d=>d[n]),r>2&&(v.set=l?(d,T)=>cs(d,s,T,r^4?o:f.set):(d,T)=>d[n]=T)),a=(0,i[$])(r?r<4?l?o:f[w]:r>4?void 0:{get:f.get,set:f.set}:s,u),_._=1,r^4||a===void 0?Ze(a)&&(r>4?y.unshift(a):r?l?o=a:f[w]=a:s=a):typeof a!="object"||a===null?ce("Object expected"):(Ze(c=a.get)&&(f.get=c),Ze(c=a.set)&&(f.set=c),Ze(c=a.init)&&y.unshift(c));return r||fa(e,s),f&&os(s,n,f),l?r^4?o:f:s},pa=(e,t,n)=>ha(e,typeof t!="symbol"?t+"":t,n),as=(e,t,n)=>t.has(e)||ce("Cannot "+n),vl=(e,t)=>Object(t)!==t?ce('Cannot use the "in" operator on this value'):e.has(t),Nt=(e,t,n)=>(as(e,t,"read from private field"),n?n.call(e):t.get(e)),le=(e,t,n)=>t.has(e)?ce("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),cs=(e,t,n,i)=>(as(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),wl=(e,t,n)=>(as(e,t,"access private method"),n),_a,ma,ga,va,ls,J,hs,wa,us,Rn,ds,tn,fs;const Sl="gem-reflect-start",Sa="gem-reflect-end",ya=e=>new Comment(e),yl=e=>{const t=[];let n=e;for(;n&&(t.push(n),n.nodeValue!==Sa);)n=n.nextSibling;return t};class en extends(ls=q,va=[D],ga=[U],ma=[We()],_a=[ft(t=>[t.target])],ls){constructor(){super(...arguments),le(this,hs),pa(this,"method",Lt(J,8,this)),Lt(J,11,this),pa(this,"target",Lt(J,12,this,document.head)),Lt(J,15,this),le(this,us,Lt(J,16,this,()=>{this.hidden=!0,this.dataset.gemReflect=""})),Lt(J,19,this),le(this,Rn,ya(Sl)),le(this,ds,ya(Sa)),le(this,tn),le(this,fs,Lt(J,20,this,()=>((Nt(this,tn)||[Nt(this,Rn),...this.childNodes,Nt(this,ds)]).forEach((t,n,i)=>{const s=i[n-1];s?s.after(t):this.target[Nt(this,hs,wa)](t)}),()=>{cs(this,tn,yl(Nt(this,Rn))),Nt(this,tn).forEach(t=>t.remove())}))),Lt(J,23,this)}}J=ml(ls),hs=new WeakSet,wa=function(){return this.method||"append"},us=new WeakMap,Rn=new WeakMap,ds=new WeakMap,tn=new WeakMap,fs=new WeakMap,An(J,5,"method",va,en),An(J,5,"target",ga,en),An(J,21,"#init",ma,us),An(J,21,"#changeTarget",_a,fs),fa(J,en),customElements.define("gem-reflect",en);var $l=Object.create,ps=Object.defineProperty,El=Object.getOwnPropertyDescriptor,$a=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),he=e=>{throw TypeError(e)},Ea=(e,t,n)=>t in e?ps(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ba=(e,t)=>ps(e,"name",{value:t,configurable:!0}),bl=e=>[,,,$l((e==null?void 0:e[$a("metadata")])??null)],Ca=["class","method","getter","setter","accessor","field","value","get","set"],nn=e=>e!==void 0&&typeof e!="function"?he("Function expected"):e,Cl=(e,t,n,i,s)=>({kind:Ca[e],name:t,metadata:i,addInitializer:o=>n._?he("Already initialized"):s.push(nn(o||null))}),Pl=(e,t)=>Ea(t,$a("metadata"),e[3]),sn=(e,t,n,i)=>{for(var s=0,o=e[t>>1],c=o&&o.length;s<c;s++)t&1?o[s].call(n):i=o[s].call(n,i);return i},_s=(e,t,n,i,s,o)=>{var c,a,_,u,v,r=t&7,m=!!(t&8),l=!!(t&16),g=r>3?e.length+1:r?m?1:2:0,w=Ca[r+5],y=r>3&&(e[g-1]=[]),b=e[g]||(e[g]=[]),f=r&&(!l&&!m&&(s=s.prototype),r<5&&(r>3||!l)&&El(r<4?s:{get[n](){return Pa(this,o)},set[n](d){return Ta(this,o,d)}},n));r?l&&r<4&&ba(o,(r>2?"set ":r>1?"get ":"")+n):ba(s,n);for(var $=i.length-1;$>=0;$--)u=Cl(r,n,_={},e[3],b),r&&(u.static=m,u.private=l,v=u.access={has:l?d=>kl(s,d):d=>n in d},r^3&&(v.get=l?d=>(r^1?Pa:Tl)(d,s,r^4?o:f.get):d=>d[n]),r>2&&(v.set=l?(d,T)=>Ta(d,s,T,r^4?o:f.set):(d,T)=>d[n]=T)),a=(0,i[$])(r?r<4?l?o:f[w]:r>4?void 0:{get:f.get,set:f.set}:s,u),_._=1,r^4||a===void 0?nn(a)&&(r>4?y.unshift(a):r?l?o=a:f[w]=a:s=a):typeof a!="object"||a===null?he("Object expected"):(nn(c=a.get)&&(f.get=c),nn(c=a.set)&&(f.set=c),nn(c=a.init)&&y.unshift(c));return r||Pl(e,s),f&&ps(s,n,f),l?r^4?o:f:s},In=(e,t,n)=>Ea(e,typeof t!="symbol"?t+"":t,n),ms=(e,t,n)=>t.has(e)||he("Cannot "+n),kl=(e,t)=>Object(t)!==t?he('Cannot use the "in" operator on this value'):e.has(t),Pa=(e,t,n)=>(ms(e,t,"read from private field"),n?n.call(e):t.get(e)),ka=(e,t,n)=>t.has(e)?he("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ta=(e,t,n,i)=>(ms(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Tl=(e,t,n)=>(ms(e,t,"access private method"),n);const Hn=Symbol("open mark");function Ml(e){var t,n,i,s,o,c,a;const _=Symbol();s=[kt(),Ge({role:"alertdialog",ariaModal:"true"})];let u=class Ba extends(i=q,n=[Qt()],t=[Qt()],i){constructor(){super(...arguments),In(this,"label",""),ka(this,c,sn(o,8,this,()=>ht(L.store,this.update))),sn(o,11,this),ka(this,a,sn(o,12,this,()=>ht(Ba.store,this.update))),sn(o,15,this)}static get isOpen(){return this.store[Hn]}static open(m){const l=new this;this.instance=l,this.inertStore=[...document.body.children].filter(w=>!w.inert),this.inertStore.forEach(w=>w.inert=!0),document.body.append(l);const g=()=>Et(this.store,{[Hn]:!0,...m});return setTimeout(()=>{g(),L.push({title:l.label,open:g,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})},100),_}static close(){return L.back(),_}static closeHandle(){var m;return this.inertStore.forEach(l=>l.inert=!1),(m=this.instance)==null||m.remove(),Et(this.store,{[Hn]:!1,...e}),_}static shouldClose(){return!0}};return o=bl(i),c=new WeakMap,a=new WeakMap,_s(o,21,"#connectHistory",n,c),_s(o,21,"#connectStore",t,a),u=_s(o,0,"ModalElement",s,u),In(u,"inertStore",[]),In(u,"instance",null),In(u,"store",Le({[Hn]:!1,...e})),sn(o,1,u),u}var Ol=Object.create,gs=Object.defineProperty,Ll=Object.getOwnPropertyDescriptor,Ma=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),ue=e=>{throw TypeError(e)},Oa=(e,t,n)=>t in e?gs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,La=(e,t)=>gs(e,"name",{value:t,configurable:!0}),Nl=e=>[,,,Ol((e==null?void 0:e[Ma("metadata")])??null)],Na=["class","method","getter","setter","accessor","field","value","get","set"],rn=e=>e!==void 0&&typeof e!="function"?ue("Function expected"):e,Al=(e,t,n,i,s)=>({kind:Na[e],name:t,metadata:i,addInitializer:o=>n._?ue("Already initialized"):s.push(rn(o||null))}),Rl=(e,t)=>Oa(t,Ma("metadata"),e[3]),Dt=(e,t,n,i)=>{for(var s=0,o=e[t>>1],c=o&&o.length;s<c;s++)t&1?o[s].call(n):i=o[s].call(n,i);return i},Wn=(e,t,n,i,s,o)=>{var c,a,_,u,v,r=t&7,m=!!(t&8),l=!!(t&16),g=r>3?e.length+1:r?m?1:2:0,w=Na[r+5],y=r>3&&(e[g-1]=[]),b=e[g]||(e[g]=[]),f=r&&(!l&&!m&&(s=s.prototype),r<5&&(r>3||!l)&&Ll(r<4?s:{get[n](){return at(this,o)},set[n](d){return an(this,o,d)}},n));r?l&&r<4&&La(o,(r>2?"set ":r>1?"get ":"")+n):La(s,n);for(var $=i.length-1;$>=0;$--)u=Al(r,n,_={},e[3],b),r&&(u.static=m,u.private=l,v=u.access={has:l?d=>Il(s,d):d=>n in d},r^3&&(v.get=l?d=>(r^1?at:Hl)(d,s,r^4?o:f.get):d=>d[n]),r>2&&(v.set=l?(d,T)=>an(d,s,T,r^4?o:f.set):(d,T)=>d[n]=T)),a=(0,i[$])(r?r<4?l?o:f[w]:r>4?void 0:{get:f.get,set:f.set}:s,u),_._=1,r^4||a===void 0?rn(a)&&(r>4?y.unshift(a):r?l?o=a:f[w]=a:s=a):typeof a!="object"||a===null?ue("Object expected"):(rn(c=a.get)&&(f.get=c),rn(c=a.set)&&(f.set=c),rn(c=a.init)&&y.unshift(c));return r||Rl(e,s),f&&gs(s,n,f),l?r^4?o:f:s},on=(e,t,n)=>Oa(e,typeof t!="symbol"?t+"":t,n),vs=(e,t,n)=>t.has(e)||ue("Cannot "+n),Il=(e,t)=>Object(t)!==t?ue('Cannot use the "in" operator on this value'):e.has(t),at=(e,t,n)=>(vs(e,t,"read from private field"),n?n.call(e):t.get(e)),de=(e,t,n)=>t.has(e)?ue("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),an=(e,t,n,i)=>(vs(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Hl=(e,t,n)=>(vs(e,t,"access private method"),n),Aa,Ra,Ia,ws,Ha,et,cn,ln,hn,Ss,xn,ys;const $s=Symbol();Ha=[ze(L.store),Ge({role:"dialog",ariaModal:"true"})];class fe extends(ws=q,Ia=[D],Ra=[xe],Aa=[We()],ws){constructor(){super(...arguments),on(this,"label",Dt(et,8,this)),Dt(et,11,this),on(this,"opened",Dt(et,12,this)),Dt(et,15,this),de(this,cn),de(this,ln),de(this,hn,[]),de(this,Ss,()=>{var t;this.inert=!0,at(this,hn).forEach(n=>n.inert=!1),at(this,cn)?at(this,cn).before(this):at(this,ln)&&((t=at(this,ln))==null||t.appendChild(this)),this.dispatchEvent(new CustomEvent("close")),this.opened=!1}),de(this,xn,()=>{this.hidden=!1,this.inert=!1,an(this,cn,this.nextSibling),an(this,ln,this.parentElement||this.getRootNode()),an(this,hn,[...document.body.children].filter(t=>!t.inert)),at(this,hn).forEach(t=>t.inert=!0),document.body.append(this),this.dispatchEvent(new CustomEvent("open")),this.opened=!0}),de(this,ys,Dt(et,16,this,()=>this.inert=!0)),Dt(et,19,this),on(this,"open",()=>{if(!this.opened)return at(this,xn).call(this),L.push({title:this.label,open:at(this,xn),close:at(this,Ss),shouldClose:this.shouldClose}),$s}),on(this,"close",()=>(L.back(),$s)),on(this,"forceClose",()=>(this.opened=!1,setTimeout(this.close,100),$s))}shouldClose(){return!0}}et=Nl(ws),cn=new WeakMap,ln=new WeakMap,hn=new WeakMap,Ss=new WeakMap,xn=new WeakMap,ys=new WeakMap,Wn(et,5,"label",Ia,fe),Wn(et,5,"opened",Ra,fe),Wn(et,21,"#init",Aa,ys),fe=Wn(et,0,"GemDialogBaseElement",Ha,fe),Dt(et,1,fe);class Wa{constructor(t){N(this,"_type");N(this,"info",(...t)=>{console.log(`[${this._type}]:`,...t)});N(this,"warn",(...t)=>{console.warn(`[${this._type}]:`,...t)});N(this,"error",(...t)=>{console.error(`[${this._type}]:`,...t)});this._type=t}}const xa=new Wa("GEM"),Wl=/\$\d(?:<[^>]*>)?/,xl=/\$(\d)(<([^>]*)>)?/g,zl=3;function za(e,...t){const n=e.split(Wl),i=[];let s;for(;s=xl.exec(e);){const o=s[zl],c=Number(s[1])-1,a=t[c];i.push(typeof a=="function"?a(o):a)}return st(n,...i)}const un=new Set,Cs=class Cs{constructor(t){C(this,R);N(this,"resources");N(this,"fallbackLanguage");N(this,"currentLanguage");N(this,"cache");N(this,"cachePrefix","gem-i18n");N(this,"urlParamsType");N(this,"urlParamsName");N(this,"onChange");N(this,"replace",({path:t})=>this.setLanguage(t));N(this,"getParams",()=>({path:this.currentLanguage}));if(!t.resources[t.fallbackLanguage])throw new dt("i18n: fallbackLanguage invalid");Object.assign(this,t);let n=p(this,R,ja)||this.currentLanguage||p(this,R,Ka);const i=document.querySelector(`[type*=${this.cachePrefix}]`);if(i)try{const s=JSON.parse(i.textContent||"");n=s.currentLanguage,this.resources[s.currentLanguage]=s.currentLanguagePack}catch{}n?(O(this,R,n,jn),this.setLanguage(n)):this.resetLanguage()}get(t,...n){const i=this.resources[this.currentLanguage],s=this.resources[this.fallbackLanguage],o=i[t]||s[t],c=(o==null?void 0:o.message)||o||`[${t}]`;return n.length?za(c,...n):c}detectLanguage(){const t=Object.keys(this.resources),n=navigator.languages.map(i=>i.replace(/-(.*)/,s=>s.toUpperCase()));for(const i of n){const s=t.find(o=>o===i||i.startsWith(`${o}-`));if(s)return s}return this.fallbackLanguage}async setLanguage(t){var o,c;p(this,R,gn)&&un.forEach(async a=>await a.setLanguage(t));let n;const i=this.resources[t];if(!i)return xa.warn(`${this.cachePrefix}: not found \`${t}\``),this.resetLanguage();if(typeof i=="string"){const a=`${this.cachePrefix}:`,_=`${a}${i}`,u=localStorage.getItem(_),v=async()=>{const r=await(await fetch(i)).json();if(this.cache){for(let m=0;m<localStorage.length;m++){const l=localStorage.key(m);l.startsWith(a)&&localStorage.removeItem(l)}localStorage.setItem(_,JSON.stringify(r))}return r};if(u)try{n=JSON.parse(u)}catch{n=await v()}else n=await v()}else n=i;this.resources[t]=n;const s=[document.documentElement];for(;s.length;){const a=s.pop();(o=a[Ne])==null||o.call(a),(c=a.shadowRoot)!=null&&c.firstElementChild&&s.push(a.shadowRoot.firstElementChild),a.firstElementChild&&s.push(a.firstElementChild),a.nextElementSibling&&s.push(a.nextElementSibling)}return t!==this.currentLanguage&&O(this,R,t,jn),this.cache===!0&&this.setCache(),t}resetLanguage(){return p(this,R,gn)&&un.forEach(t=>t.resetLanguage()),O(this,R,this.fallbackLanguage,jn),this.cache&&localStorage.removeItem(p(this,R,Bn)),this.setLanguage(this.detectLanguage())}setCache(){p(this,R,gn)&&un.forEach(t=>t.setCache()),localStorage.setItem(p(this,R,Bn),this.currentLanguage)}createSubModule(t,n){const i=new Cs({resources:n,cachePrefix:`${this.cachePrefix}-${t}`,currentLanguage:this.currentLanguage,fallbackLanguage:this.fallbackLanguage,cache:this.cache});return un.add(i),i}toJSON(){return{currentLanguage:this.currentLanguage,currentLanguagePack:this.resources[this.currentLanguage]}}};R=new WeakSet,Bn=function(){return`${this.cachePrefix}:current`},ja=function(){const{hostname:t,pathname:n,search:i}=location,s=t.split(".");switch(this.urlParamsType){case"ccTLD":return s.pop();case"gTLD":return s.shift();case"path":return n.split("/")[1];default:const o=this.urlParamsName&&new URLSearchParams(i).get(this.urlParamsName)||"";return o in this.resources?o:""}},Ka=function(){return this.cache&&localStorage.getItem(p(this,R,Bn))||""},gn=function(){return!un.has(this)},jn=function(t){var n;p(this,R,gn)&&(document.documentElement.lang=t),this.currentLanguage=t,(n=this.onChange)==null||n.call(this,t)};let Es=Cs;const Q=e=>window.matchMedia(e).matches,Gl={PRINT:"print",get isPrint(){return Q(this.PRINT)},HOVER:"(hover: hover)",get isHover(){return Q(this.HOVER)},PWA:"(display-mode: standalone)",get isPWA(){return Q(this.PWA)},MOTION_REDUCE:"(prefers-reduced-motion: reduce)",get isMotionReduce(){return Q(this.MOTION_REDUCE)},DATA_REDUCE:"(prefers-reduced-data: reduce)",get isDataReduce(){return Q(this.DATA_REDUCE)},WATCH:"(width < 320px)",get isWatch(){return Q(this.WATCH)},SMALL_PHONE:"(320px <= width <= 480px) and (height <= 640px)",get isSmallPhone(){return Q(this.SMALL_PHONE)},PHONE:"(320px <= width <= 480px)",get isPhone(){return Q(this.PHONE)},PHONE_LANDSCAPE:"(480px < width < 960px) and (orientation: landscape)",get isPhoneLandscape(){return Q(this.PHONE_LANDSCAPE)},SHORT:"(width >= 480px) and (height <= 320px)",get isShort(){return Q(this.SHORT)},TABLET:"(480px < width <= 1280px)",get isTablet(){return Q(this.TABLET)},DESKTOP:"(width > 1280px) and (orientation: landscape)",get isDesktop(){return Q(this.DESKTOP)},WIDTHSCREEN:"(width >= 1920px) and (orientation: landscape)",get isWidthScreen(){return Q(this.WIDTHSCREEN)}},Vl=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)).constructor;function Ga(e={}){const{origin:t=location.origin,base:n="",appendHeaders:i=()=>({}),transformInput:s=r=>r,transformOutput:o=r=>r,...c}=e,a=r=>r instanceof FormData||r instanceof Blob||r instanceof Vl||r instanceof URLSearchParams||r instanceof ReadableStream||r instanceof ArrayBuffer?r:typeof r=="object"?JSON.stringify(r):r,_=(r,m)=>{if(new URL(r,location.origin).pathname!==r)throw new dt("`path` format is incorrect");const l=new URLSearchParams(m).toString();return`${t}${n}${r}${l?"?":""}${l}`},u=r=>{if(!r)return{};if(r instanceof Headers)return Object.fromEntries(r);const m=Array.isArray(r)?r:Object.entries(r);return Object.fromEntries(m.map(([l,g])=>[l.toLowerCase(),g]))},v=async(r,m={})=>{const l=new Request(r,{...c,...m,headers:new Headers({"content-type":"application/json",...u(c.headers),...u(m.headers)})}),g=await fetch(l);if(g.status===0)throw new Error("Request fail");if(g.status>=500)throw new Error(g.statusText);const w=l.headers.get("content-type"),y=g.status>=400;try{let b;if(w.includes("json")?b=await g.json():w.includes("octet-stream")?b=await g.arrayBuffer():b=await g.text(),y)throw new Error(g.statusText,{cause:b});return o(b,l)}catch{throw new Error("Parse error")}};return{request:v,get(r,m){const l=s(m);return v(_(r,l),{method:"GET",headers:i(l)})},del(r,m){const l=s(m);return v(_(r,l),{method:"DELETE",headers:i(l)})},put(r,m){const l=s(m);return v(_(r),{method:"PUT",headers:i(l),body:a(l)})},post(r,m){const l=s(m);return v(_(r),{method:"POST",headers:i(l),body:a(l)})}}}const{request:Dl,del:Fl,get:ql,post:Ul,put:Bl}=Ga(),Va=new WeakMap,Da=new WeakMap;function jl(e){return Va.get(e)}function bs(e){return Da.get(e)}function zn(e,t={}){const n=Oe(),i=Re({})[bt],[s,o]=Kt(e),c=new Proxy({[bt]:i},{get(_,u){if(!_[u]){const[v,r,m]=u.match(/^(\w*Color)(\d+)$/)||[];r&&(_[u]=`oklch(from ${_[r]} calc(l - ${(Number(m)-400)/1e3}) c h)`)}return _[u]}});Da.set(c,t),Va.set(c,s);const a=()=>{let _="";Object.keys(s).forEach(u=>{t[u]||(t[u]=`--${Ht(u)}-${n}`,c[u]=`var(${t[u]})`),_+=`${t[u]}:${s[u]};`}),i.setContent(`:scope,:host{${_}}`)};return a(),ht(s,()=>{a(),i.updateStyle()}),[c,o]}function Fa(e){return zn(e)}function Kl(e){const t=Fa(e);return document.adoptedStyleSheets.push(t[0][bt].getStyle()),t}function Jl(e,t){return zn(t,bs(e))}function Ql(e){const[t]=zn(e),n=bs(t);return[t,s=>(o,{addInitializer:c,access:a})=>{c(function(){const[_,u]=zn({...e},n);this.internals.sheets.push(_[bt].getStyle(this)),this.memo(()=>u(a.get(this).apply(this)),s&&(()=>s(this)))})}]}h.BoundaryCSSState=Ae,h.GemActiveLinkElement=Gt,h.GemDialogBaseElement=fe,h.GemElement=q,h.GemError=dt,h.GemLightRouteElement=V,h.GemLinkElement=H,h.GemReflectElement=en,h.GemRouteElement=ee,h.GemTitleElement=oe,h.GemUnsafeElement=Vt,h.GemUseElement=_t,h.I18n=Es,h.LinkedList=qs,h.Logger=Wa,h.PropProxyMap=Us,h.QueryString=jt,h.RenderErrorEvent=$n,h.SVGTemplateResult=Qn,h.SheetToken=bt,h.StoreListenerMap=Wt,h.TemplateResult=Te,h.UpdateToken=Ne,h.absoluteLocation=ti,h.addListener=ei,h.addMicrotask=$t,h.adoptedStyle=Cn,h.aria=Ge,h.async=pr,h.attribute=D,h.basePathStore=Er,h.boolattribute=He,h.camelToKebabCase=Ht,h.classMap=js,h.cleanObject=Sn,h.connect=ht,h.connectStore=ze,h.createCSSSheet=Re,h.createHistoryParams=to,h.createModalClass=Ml,h.createPath=Ln,h.createStore=Le,h.css=ni,h.customElement=_r,h.del=Fl,h.directive=St,h.disconnect=Ks,h.effect=ft,h.emitter=Yt,h.exportPartsMap=lc,h.fallback=lr,h.get=ql,h.getThemeProps=bs,h.getThemeStore=jl,h.globalemitter=dr,h.guard=Oc,h.history=L,h.html=st,h.ifDefined=Tr,h.initRequest=Ga,h.isArrayChange=Bs,h.kebabToCamelCase=oc,h.logger=xa,h.matchPath=Li,h.mediaQuery=Gl,h.memo=hi,h.mounted=Qt,h.numattribute=ar,h.objectMapToString=yn,h.part=di,h.partMap=cc,h.post=Ul,h.property=U,h.put=Bl,h.randomStr=Oe,h.raw=wn,h.render=vn,h.repeat=Mc,h.request=Dl,h.shadow=kt,h.slot=ur,h.splice=za,h.state=xe,h.styleMap=ac,h.styled=rc,h.svg=Fs,h.template=ui,h.titleStore=Tt,h.unmounted=cr,h.updateStore=Et,h.useDecoratorTheme=Ql,h.useOverrideTheme=Jl,h.useScopedTheme=Fa,h.useStore=Kt,h.useTheme=Kl,h.version=tr,h.willMount=We,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
|