gantt-source_management
Version:
Gantt, Schedule,
98 lines • 228 kB
JavaScript
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
var t;const e=globalThis.trustedTypes,i=e?e.createPolicy("lit-html",{createHTML:t=>t}):void 0,n=`lit$${(Math.random()+"").slice(9)}$`,s="?"+n,a=`<${s}>`,o=document,r=(t="")=>o.createComment(t),u=t=>null===t||"object"!=typeof t&&"function"!=typeof t,c=Array.isArray,h=t=>{var e;return c(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])},l=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,d=/-->/g,m=/>/g,g=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,p=/'/g,f=/"/g,y=/^(?:script|style|textarea|title)$/i,v=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),b=v(1),k=v(2),w=Symbol.for("lit-noChange"),x=Symbol.for("lit-nothing"),z=new WeakMap,j=(t,e,i)=>{var n,s;const a=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:e;let o=a._$litPart$;if(void 0===o){const t=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:null;a._$litPart$=o=new E(e.insertBefore(r(),t),t,void 0,null!=i?i:{})}return o._$AI(t),o},S=o.createTreeWalker(o,129,null,!1),$=(t,e)=>{const s=t.length-1,o=[];let r,u=2===e?"<svg>":"",c=l;for(let e=0;e<s;e++){const i=t[e];let s,h,v=-1,b=0;for(;b<i.length&&(c.lastIndex=b,h=c.exec(i),null!==h);)b=c.lastIndex,c===l?"!--"===h[1]?c=d:void 0!==h[1]?c=m:void 0!==h[2]?(y.test(h[2])&&(r=RegExp("</"+h[2],"g")),c=g):void 0!==h[3]&&(c=g):c===g?">"===h[0]?(c=null!=r?r:l,v=-1):void 0===h[1]?v=-2:(v=c.lastIndex-h[2].length,s=h[1],c=void 0===h[3]?g:'"'===h[3]?f:p):c===f||c===p?c=g:c===d||c===m?c=l:(c=g,r=void 0);const k=c===g&&t[e+1].startsWith("/>")?" ":"";u+=c===l?i+a:v>=0?(o.push(s),i.slice(0,v)+"$lit$"+i.slice(v)+n+k):i+n+(-2===v?(o.push(void 0),e):k)}const h=u+(t[s]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==i?i.createHTML(h):h,o]};class A{constructor({strings:t,_$litType$:i},a){let o;this.parts=[];let u=0,c=0;const h=t.length-1,l=this.parts,[d,m]=$(t,i);if(this.el=A.createElement(d,a),S.currentNode=this.el.content,2===i){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=S.nextNode())&&l.length<h;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(n)){const i=m[c++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(n),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:u,name:e[2],strings:t,ctor:"."===e[1]?I:"?"===e[1]?C:"@"===e[1]?R:D})}else l.push({type:6,index:u})}for(const e of t)o.removeAttribute(e)}if(y.test(o.tagName)){const t=o.textContent.split(n),i=t.length-1;if(i>0){o.textContent=e?e.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],r()),S.nextNode(),l.push({type:2,index:++u});o.append(t[i],r())}}}else if(8===o.nodeType)if(o.data===s)l.push({type:2,index:u});else{let t=-1;for(;-1!==(t=o.data.indexOf(n,t+1));)l.push({type:7,index:u}),t+=n.length-1}u++}}static createElement(t,e){const i=o.createElement("template");return i.innerHTML=t,i}}function _(t,e,i=t,n){var s,a,o,r;if(e===w)return e;let c=void 0!==n?null===(s=i._$Cl)||void 0===s?void 0:s[n]:i._$Cu;const h=u(e)?void 0:e._$litDirective$;return(null==c?void 0:c.constructor)!==h&&(null===(a=null==c?void 0:c._$AO)||void 0===a||a.call(c,!1),void 0===h?c=void 0:(c=new h(t),c._$AT(t,i,n)),void 0!==n?(null!==(o=(r=i)._$Cl)&&void 0!==o?o:r._$Cl=[])[n]=c:i._$Cu=c),void 0!==c&&(e=_(t,c._$AS(t,e.values),c,n)),e}class T{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:i},parts:n}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:o).importNode(i,!0);S.currentNode=s;let a=S.nextNode(),r=0,u=0,c=n[0];for(;void 0!==c;){if(r===c.index){let e;2===c.type?e=new E(a,a.nextSibling,this,t):1===c.type?e=new c.ctor(a,c.name,c.strings,this,t):6===c.type&&(e=new O(a,this,t)),this.v.push(e),c=n[++u]}r!==(null==c?void 0:c.index)&&(a=S.nextNode(),r++)}return s}m(t){let e=0;for(const i of this.v)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class E{constructor(t,e,i,n){var s;this.type=2,this._$AH=x,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=n,this._$Cg=null===(s=null==n?void 0:n.isConnected)||void 0===s||s}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=_(this,t,e),u(t)?t===x||null==t||""===t?(this._$AH!==x&&this._$AR(),this._$AH=x):t!==this._$AH&&t!==w&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.k(t):h(t)?this.S(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==x&&u(this._$AH)?this._$AA.nextSibling.data=t:this.k(o.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:n}=t,s="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=A.createElement(n.h,this.options)),n);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.m(i);else{const t=new T(s,this),e=t.p(this.options);t.m(i),this.k(e),this._$AH=t}}_$AC(t){let e=z.get(t.strings);return void 0===e&&z.set(t.strings,e=new A(t)),e}S(t){c(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,n=0;for(const s of t)n===e.length?e.push(i=new E(this.M(r()),this.M(r()),this,this.options)):i=e[n],i._$AI(s),n++;n<e.length&&(this._$AR(i&&i._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class D{constructor(t,e,i,n,s){this.type=1,this._$AH=x,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=x}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,n){const s=this.strings;let a=!1;if(void 0===s)t=_(this,t,e,0),a=!u(t)||t!==this._$AH&&t!==w,a&&(this._$AH=t);else{const n=t;let o,r;for(t=s[0],o=0;o<s.length-1;o++)r=_(this,n[i+o],e,o),r===w&&(r=this._$AH[o]),a||(a=!u(r)||r!==this._$AH[o]),r===x?t=x:t!==x&&(t+=(null!=r?r:"")+s[o+1]),this._$AH[o]=r}a&&!n&&this.C(t)}C(t){t===x?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class I extends D{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===x?void 0:t}}const M=e?e.emptyScript:"";class C extends D{constructor(){super(...arguments),this.type=4}C(t){t&&t!==x?this.element.setAttribute(this.name,M):this.element.removeAttribute(this.name)}}class R extends D{constructor(t,e,i,n,s){super(t,e,i,n,s),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=_(this,t,e,0))&&void 0!==i?i:x)===w)return;const n=this._$AH,s=t===x&&n!==x||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,a=t!==x&&(n===x||s);s&&this.element.removeEventListener(this.name,this,n),a&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class O{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){_(this,t)}}const B={L:"$lit$",P:n,V:s,I:1,N:$,R:T,j:h,D:_,H:E,F:D,O:C,W:R,B:I,Z:O},P=window.litHtmlPolyfillSupport;null==P||P(A,E),(null!==(t=globalThis.litHtmlVersions)&&void 0!==t?t:globalThis.litHtmlVersions=[]).push("2.2.6");var q=Object.freeze({__proto__:null,_$LH:B,html:b,noChange:w,nothing:x,render:j,svg:k});
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const N={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},L=t=>(...e)=>({_$litDirective$:t,values:e});class V{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const{H:H}=B,U=(t,e)=>{var i,n;return void 0===e?void 0!==(null===(i=t)||void 0===i?void 0:i._$litType$):(null===(n=t)||void 0===n?void 0:n._$litType$)===e},Y=t=>void 0===t.strings,F=()=>document.createComment(""),X=(t,e,i)=>{var n;const s=t._$AA.parentNode,a=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=s.insertBefore(F(),a),n=s.insertBefore(F(),a);i=new H(e,n,t,t.options)}else{const e=i._$AB.nextSibling,o=i._$AM,r=o!==t;if(r){let e;null===(n=i._$AQ)||void 0===n||n.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==o._$AU&&i._$AP(e)}if(e!==a||r){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;s.insertBefore(t,a),t=e}}}return i},W=(t,e,i=t)=>(t._$AI(e,i),t),K={},G=(t,e=K)=>t._$AH=e,Q=t=>t._$AH,Z=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let i=t._$AA;const n=t._$AB.nextSibling;for(;i!==n;){const t=i.nextSibling;i.remove(),i=t}},J=t=>{t._$AR()},tt=(t,e)=>{var i,n;const s=t._$AN;if(void 0===s)return!1;for(const t of s)null===(n=(i=t)._$AO)||void 0===n||n.call(i,e,!1),tt(t,e);return!0},et=t=>{let e,i;do{if(void 0===(e=t._$AM))break;i=e._$AN,i.delete(t),t=e}while(0===(null==i?void 0:i.size))},it=t=>{for(let e;e=t._$AM;t=e){let i=e._$AN;if(void 0===i)e._$AN=i=new Set;else if(i.has(t))break;i.add(t),at(e)}};
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/function nt(t){void 0!==this._$AN?(et(this),this._$AM=t,it(this)):this._$AM=t}function st(t,e=!1,i=0){const n=this._$AH,s=this._$AN;if(void 0!==s&&0!==s.size)if(e)if(Array.isArray(n))for(let t=i;t<n.length;t++)tt(n[t],!1),et(n[t]);else null!=n&&(tt(n,!1),et(n));else tt(this,t)}const at=t=>{var e,i,n,s;t.type==N.CHILD&&(null!==(e=(n=t)._$AP)&&void 0!==e||(n._$AP=st),null!==(i=(s=t)._$AQ)&&void 0!==i||(s._$AQ=nt))};class ot extends V{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),it(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,n;t!==this.isConnected&&(this.isConnected=t,t?null===(i=this.reconnected)||void 0===i||i.call(this):null===(n=this.disconnected)||void 0===n||n.call(this)),e&&(tt(this,t),et(this))}setValue(t){if(Y(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/class rt{constructor(t){this.U=t}disconnect(){this.U=void 0}reconnect(t){this.U=t}deref(){return this.U}}class ut{constructor(){this.Y=void 0,this.q=void 0}get(){return this.Y}pause(){var t;null!==(t=this.Y)&&void 0!==t||(this.Y=new Promise((t=>this.q=t)))}resume(){var t;null===(t=this.q)||void 0===t||t.call(this),this.Y=this.q=void 0}}
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/class ct extends ot{constructor(){super(...arguments),this._$CG=new rt(this),this._$CK=new ut}render(t,e){return w}update(t,[e,i]){if(this.isConnected||this.disconnected(),e===this._$CX)return;this._$CX=e;let n=0;const{_$CG:s,_$CK:a}=this;return(async(t,e)=>{for await(const i of t)if(!1===await e(i))return})(e,(async t=>{for(;a.get();)await a.get();const o=s.deref();if(void 0!==o){if(o._$CX!==e)return!1;void 0!==i&&(t=i(t,n)),o.commitValue(t,n),n++}return!0})),w}commitValue(t,e){this.setValue(t)}disconnected(){this._$CG.disconnect(),this._$CK.pause()}reconnected(){this._$CG.reconnect(this),this._$CK.resume()}}const ht=L(ct),lt=L(class extends ct{constructor(t){if(super(t),t.type!==N.CHILD)throw Error("asyncAppend can only be used in child expressions")}update(t,e){return this._$CJ=t,super.update(t,e)}commitValue(t,e){0===e&&J(this._$CJ);const i=X(this._$CJ);W(i,t)}}),dt=L(class extends V{constructor(t){super(t),this.tt=new WeakMap}render(t){return[t]}update(t,[e]){if(U(this.it)&&(!U(e)||this.it.strings!==e.strings)){const e=Q(t).pop();let i=this.tt.get(this.it.strings);if(void 0===i){const t=document.createDocumentFragment();i=j(x,t),i.setConnected(!1),this.tt.set(this.it.strings,i)}G(i,[e]),X(i,void 0,e)}if(U(e)){if(!U(this.it)||this.it.strings!==e.strings){const i=this.tt.get(e.strings);if(void 0!==i){const e=Q(i).pop();J(t),X(t,void 0,e),G(t,[e])}}this.it=e}else this.it=void 0;return this.render(e)}}),mt={},gt=L(class extends V{constructor(){super(...arguments),this.nt=mt}render(t,e){return e()}update(t,[e,i]){if(Array.isArray(e)){if(Array.isArray(this.nt)&&this.nt.length===e.length&&e.every(((t,e)=>t===this.nt[e])))return w}else if(this.nt===e)return w;return this.nt=Array.isArray(e)?Array.from(e):e,this.render(e,i)}}),pt=t=>null!=t?t:x
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/,ft=(t,e,i)=>{const n=new Map;for(let s=e;s<=i;s++)n.set(t[s],s);return n},yt=L(class extends V{constructor(t){if(super(t),t.type!==N.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,e,i){let n;void 0===i?i=e:void 0!==e&&(n=e);const s=[],a=[];let o=0;for(const e of t)s[o]=n?n(e,o):o,a[o]=i(e,o),o++;return{values:a,keys:s}}render(t,e,i){return this.dt(t,e,i).values}update(t,[e,i,n]){var s;const a=Q(t),{values:o,keys:r}=this.dt(e,i,n);if(!Array.isArray(a))return this.ut=r,o;const u=null!==(s=this.ut)&&void 0!==s?s:this.ut=[],c=[];let h,l,d=0,m=a.length-1,g=0,p=o.length-1;for(;d<=m&&g<=p;)if(null===a[d])d++;else if(null===a[m])m--;else if(u[d]===r[g])c[g]=W(a[d],o[g]),d++,g++;else if(u[m]===r[p])c[p]=W(a[m],o[p]),m--,p--;else if(u[d]===r[p])c[p]=W(a[d],o[p]),X(t,c[p+1],a[d]),d++,p--;else if(u[m]===r[g])c[g]=W(a[m],o[g]),X(t,a[d],a[m]),m--,g++;else if(void 0===h&&(h=ft(r,g,p),l=ft(u,d,m)),h.has(u[d]))if(h.has(u[m])){const e=l.get(r[g]),i=void 0!==e?a[e]:null;if(null===i){const e=X(t,a[d]);W(e,o[g]),c[g]=e}else c[g]=W(i,o[g]),X(t,a[d],i),a[e]=null;g++}else Z(a[m]),m--;else Z(a[d]),d++;for(;g<=p;){const e=X(t,c[p+1]);W(e,o[g]),c[g++]=e}for(;d<=m;){const t=a[d++];null!==t&&Z(t)}return this.ut=r,G(t,c),w}});
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
class vt extends V{constructor(t){if(super(t),this.it=x,t.type!==N.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===x||null==t)return this.ft=void 0,this.it=t;if(t===w)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this.ft;this.it=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}}vt.directiveName="unsafeHTML",vt.resultType=1;const bt=L(vt),kt=t=>!(t=>null===t||"object"!=typeof t&&"function"!=typeof t)(t)&&"function"==typeof t.then;
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/class wt extends ot{constructor(){super(...arguments),this._$Cwt=1073741823,this._$Cyt=[],this._$CG=new rt(this),this._$CK=new ut}render(...t){var e;return null!==(e=t.find((t=>!kt(t))))&&void 0!==e?e:w}update(t,e){const i=this._$Cyt;let n=i.length;this._$Cyt=e;const s=this._$CG,a=this._$CK;this.isConnected||this.disconnected();for(let t=0;t<e.length&&!(t>this._$Cwt);t++){const o=e[t];if(!kt(o))return this._$Cwt=t,o;t<n&&o===i[t]||(this._$Cwt=1073741823,n=0,Promise.resolve(o).then((async t=>{for(;a.get();)await a.get();const e=s.deref();if(void 0!==e){const i=e._$Cyt.indexOf(o);i>-1&&i<e._$Cwt&&(e._$Cwt=i,e.setValue(t))}})))}return w}disconnected(){this._$CG.disconnect(),this._$CK.pause()}reconnected(){this._$CG.reconnect(this),this._$CK.resume()}}const xt=L(wt),zt=L(class extends V{constructor(t){if(super(t),t.type!==N.PROPERTY&&t.type!==N.ATTRIBUTE&&t.type!==N.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Y(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===w||e===x)return e;const i=t.element,n=t.name;if(t.type===N.PROPERTY){if(e===i[n])return w}else if(t.type===N.BOOLEAN_ATTRIBUTE){if(!!e===i.hasAttribute(n))return w}else if(t.type===N.ATTRIBUTE&&i.getAttribute(n)===e+"")return w;return G(t),e}}),jt=L(class extends V{constructor(t){var e;if(super(t),t.type!==N.ATTRIBUTE||"style"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,i)=>{const n=t[i];return null==n?e:e+`${i=i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${n};`}),"")}update(t,[e]){const{style:i}=t.element;if(void 0===this.ct){this.ct=new Set;for(const t in e)this.ct.add(t);return this.render(e)}this.ct.forEach((t=>{null==e[t]&&(this.ct.delete(t),t.includes("-")?i.removeProperty(t):i[t]="")}));for(const t in e){const n=e[t];null!=n&&(this.ct.add(t),t.includes("-")?i.setProperty(t,n):i[t]=n)}return w}}),St=L(class extends V{constructor(t){var e;if(super(t),t.type!==N.ATTRIBUTE||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,n;if(void 0===this.et){this.et=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.st)||void 0===i?void 0:i.has(t))&&this.et.add(t);return this.render(e)}const s=t.element.classList;this.et.forEach((t=>{t in e||(s.remove(t),this.et.delete(t))}));for(const t in e){const i=!!e[t];i===this.et.has(t)||(null===(n=this.st)||void 0===n?void 0:n.has(t))||(i?(s.add(t),this.et.add(t)):(s.remove(t),this.et.delete(t)))}return w}});
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
function $t(t,e,i){return t?e():null==i?void 0:i()}
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const At=(t,e,i)=>{for(const i of e)if(i[0]===t)return(0,i[1])();return null==i?void 0:i()};
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/function*_t(t,e){if(void 0!==t){let i=0;for(const n of t)yield e(n,i++)}}
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/function*Tt(t,e){const i="function"==typeof e;if(void 0!==t){let n=-1;for(const s of t)n>-1&&(yield i?e(n):e),n++,yield s}}
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/function*Et(t,e,i=1){const n=void 0===e?0:t;null!=e||(e=t);for(let t=n;i>0?t<e:e<t;t+=i)yield t}
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const Dt=L(class extends V{constructor(t){if(super(t),t.type!==N.CHILD)throw Error("templateContent can only be used in child bindings")}render(t){return this.vt===t?w:(this.vt=t,document.importNode(t.content,!0))}});
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/class It extends vt{}It.directiveName="unsafeSVG",It.resultType=2;const Mt=L(It);
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/class Ct{}const Rt=new WeakMap,Ot=L(class extends ot{render(t){return x}update(t,[e]){var i;const n=e!==this.U;return n&&void 0!==this.U&&this.ot(void 0),(n||this.rt!==this.lt)&&(this.U=e,this.ht=null===(i=t.options)||void 0===i?void 0:i.host,this.ot(this.lt=t.element)),x}ot(t){var e;if("function"==typeof this.U){const i=null!==(e=this.ht)&&void 0!==e?e:globalThis;let n=Rt.get(i);void 0===n&&(n=new WeakMap,Rt.set(i,n)),void 0!==n.get(this.U)&&this.U.call(this.ht,void 0),n.set(this.U,t),void 0!==t&&this.U.call(this.ht,t)}else this.U.value=t}get rt(){var t,e,i;return"function"==typeof this.U?null===(e=Rt.get(null!==(t=this.ht)&&void 0!==t?t:globalThis))||void 0===e?void 0:e.get(this.U):null===(i=this.U)||void 0===i?void 0:i.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}}),Bt=new WeakMap;class Pt extends V{update(t,e){return e[0].execute(t),w}render(t){return t.toString()}}class qt{constructor(t,e={schedule:!1}){this.schedule=!1,this.style=t,this._directive=L(Pt),this.execute=this.execute.bind(this),this.schedule=e.schedule}directive(){return this._directive(this)}setStyle(t){for(const t in this.style)delete this.style[t];for(const e in t)this.style[e]=t[e]}toString(){return Object.keys(this.style).reduce(((t,e)=>{const i=this.style[e];return null==i?t:t+`${e=e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}_getInternalStyle(){return this.element?Bt.get(this.element):null}updateStyle(t,e,i){const n=i.previousStyle;for(const t of e)t&&!this.style[t]&&(i.toRemove.includes(t)||i.toRemove.push(t));for(const t in n)t&&t in this.style&&!this.style[t]&&e.includes(t)&&(i.toRemove.includes(t)||i.toRemove.push(t));for(const t in this.style){if(!t)continue;if(!(t in this.style))continue;const s=this.style[t];if(!s)continue;const a=n[t];void 0!==a&&a===s&&e.includes(t)||i.toUpdate.push(t)}if(i.toRemove.length||i.toUpdate.length){for(const e of i.toRemove)t.removeProperty(e),t[e]&&delete t[e],i.elementStyles=i.elementStyles.filter((t=>t!==e));for(const e of i.toUpdate){const n=this.style[e];n&&(e.includes("-")?t.setProperty(e,n):t[e]=n,i.elementStyles.includes(e)||i.elementStyles.push(e))}i.previousStyle=Object.assign({},this.style)}}execute(t){const e=t.element;let i;this.element=e,Bt.has(e)?i=Bt.get(e):(i={toUpdate:[],toRemove:[],previousStyle:{},elementStyles:[],styleTaken:!1},Bt.set(e,i)),i.toRemove.length=0,i.toUpdate.length=0;const n=e.style;let s;if(i.styleTaken)s=i.elementStyles;else{i.elementStyles=s=[];for(let t=i.length;t--;)s.push(n[t]);i.styleTaken=!0}this.schedule?requestAnimationFrame((()=>{this.updateStyle(n,s,i)})):this.updateStyle(n,s,i),Bt.set(e,i)}}const Nt=new WeakMap;const Lt=L(class extends V{render(t){return x}update(t,e){if("boolean"!=typeof e[0])throw new Error("[vido] Detach directive argument should be a boolean.");let i=e[0];const n=t.element;if(i)Nt.has(t)||Nt.set(t,{element:n,nextSibling:n.nextSibling,previousSibling:n.previousSibling,parent:n.parentNode}),n.remove();else{const e=Nt.get(t);e&&(e.nextSibling&&e.nextSibling.parentNode?e.nextSibling.parentNode.insertBefore(e.element,e.nextSibling):e.previousSibling&&e.previousSibling.parentNode?e.previousSibling.parentNode.appendChild(e.element):e.parent&&e.parent.appendChild(e.element),Nt.delete(t))}return this.render(i)}});class Vt{constructor(){this.isAction=!0}}Vt.prototype.isAction=!0;const Ht={element:document.createTextNode(""),axis:"xy",threshold:10,onDown(){},onMove(){},onUp(){},onWheel(){}},Ut="undefined"!=typeof PointerEvent;let Yt=0;class Ft extends Vt{constructor(t,e){super(),this.moving="",this.initialX=0,this.initialY=0,this.lastY=0,this.lastX=0,this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onWheel=this.onWheel.bind(this),this.element=t,this.id=++Yt,this.options=Object.assign(Object.assign({},Ht),e.pointerOptions),Ut?(t.addEventListener("pointerdown",this.onPointerDown),document.addEventListener("pointermove",this.onPointerMove),document.addEventListener("pointerup",this.onPointerUp)):(t.addEventListener("touchstart",this.onPointerDown),document.addEventListener("touchmove",this.onPointerMove,{passive:!1}),document.addEventListener("touchend",this.onPointerUp),document.addEventListener("touchcancel",this.onPointerUp),t.addEventListener("mousedown",this.onPointerDown),document.addEventListener("mousemove",this.onPointerMove,{passive:!1}),document.addEventListener("mouseup",this.onPointerUp))}normalizeMouseWheelEvent(t){let e=t.deltaX||0,i=t.deltaY||0,n=t.deltaZ||0;const s=t.deltaMode,a=parseInt(getComputedStyle(t.target).getPropertyValue("line-height"));let o=1;switch(s){case 1:o=a;break;case 2:o=window.height}return e*=o,i*=o,n*=o,{x:e,y:i,z:n,event:t}}onWheel(t){const e=this.normalizeMouseWheelEvent(t);this.options.onWheel(e)}normalizePointerEvent(t){let e={x:0,y:0,pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0,event:t};switch(t.type){case"wheel":const i=this.normalizeMouseWheelEvent(t);e.x=i.x,e.y=i.y,e.pageX=e.x,e.pageY=e.y,e.screenX=e.x,e.screenY=e.y,e.clientX=e.x,e.clientY=e.y;break;case"touchstart":case"touchmove":case"touchend":case"touchcancel":e.x=t.changedTouches[0].screenX,e.y=t.changedTouches[0].screenY,e.pageX=t.changedTouches[0].pageX,e.pageY=t.changedTouches[0].pageY,e.screenX=t.changedTouches[0].screenX,e.screenY=t.changedTouches[0].screenY,e.clientX=t.changedTouches[0].clientX,e.clientY=t.changedTouches[0].clientY;break;default:e.x=t.x,e.y=t.y,e.pageX=t.pageX,e.pageY=t.pageY,e.screenX=t.screenX,e.screenY=t.screenY,e.clientX=t.clientX,e.clientY=t.clientY}return e}onPointerDown(t){if("mousedown"===t.type&&0!==t.button)return;this.moving="xy";const e=this.normalizePointerEvent(t);this.lastX=e.x,this.lastY=e.y,this.initialX=e.x,this.initialY=e.y,this.options.onDown(e)}handleX(t){let e=t.x-this.lastX;return this.lastY=t.y,this.lastX=t.x,e}handleY(t){let e=t.y-this.lastY;return this.lastY=t.y,this.lastX=t.x,e}onPointerMove(t){if(""===this.moving||"mousemove"===t.type&&0!==t.button)return;const e=this.normalizePointerEvent(t);if("x|y"===this.options.axis){let i=0,n=0;("x"===this.moving||"xy"===this.moving&&Math.abs(e.x-this.initialX)>this.options.threshold)&&(this.moving="x",i=this.handleX(e)),("y"===this.moving||"xy"===this.moving&&Math.abs(e.y-this.initialY)>this.options.threshold)&&(this.moving="y",n=this.handleY(e)),this.options.onMove({movementX:i,movementY:n,x:e.x,y:e.y,initialX:this.initialX,initialY:this.initialY,lastX:this.lastX,lastY:this.lastY,event:t})}else if("xy"===this.options.axis){let i=0,n=0;Math.abs(e.x-this.initialX)>this.options.threshold&&(i=this.handleX(e)),Math.abs(e.y-this.initialY)>this.options.threshold&&(n=this.handleY(e)),this.options.onMove({movementX:i,movementY:n,x:e.x,y:e.y,initialX:this.initialX,initialY:this.initialY,lastX:this.lastX,lastY:this.lastY,event:t})}else if("x"===this.options.axis)("x"===this.moving||"xy"===this.moving&&Math.abs(e.x-this.initialX)>this.options.threshold)&&(this.moving="x",this.options.onMove({movementX:this.handleX(e),movementY:0,initialX:this.initialX,initialY:this.initialY,lastX:this.lastX,lastY:this.lastY,event:t}));else if("y"===this.options.axis){let i=0;("y"===this.moving||"xy"===this.moving&&Math.abs(e.y-this.initialY)>this.options.threshold)&&(this.moving="y",i=this.handleY(e)),this.options.onMove({movementX:0,movementY:i,x:e.x,y:e.y,initialX:this.initialX,initialY:this.initialY,lastX:this.lastX,lastY:this.lastY,event:t})}}onPointerUp(t){this.moving="";const e=this.normalizePointerEvent(t);this.options.onUp({movementX:0,movementY:0,x:e.x,y:e.y,initialX:this.initialX,initialY:this.initialY,lastX:this.lastX,lastY:this.lastY,event:t}),this.lastY=0,this.lastX=0}destroy(t){Ut?(t.removeEventListener("pointerdown",this.onPointerDown),document.removeEventListener("pointermove",this.onPointerMove),document.removeEventListener("pointerup",this.onPointerUp)):(t.removeEventListener("mousedown",this.onPointerDown),document.removeEventListener("mousemove",this.onPointerMove),document.removeEventListener("mouseup",this.onPointerUp),t.removeEventListener("touchstart",this.onPointerDown),document.removeEventListener("touchmove",this.onPointerMove),document.removeEventListener("touchend",this.onPointerUp),document.removeEventListener("touchcancel",this.onPointerUp))}}function Xt(t){let e=0;return function(i){e||(e=requestAnimationFrame((function(){e=0,t.apply(void 0,[i])})))}}function Wt(t){return null==t||"string"==typeof t||"number"==typeof t||"boolean"==typeof t||"bigint"==typeof t||"symbol"==typeof t}function Kt(t){return!Wt(t)&&(t&&t.constructor?"Object"===t.constructor.name:"object"==typeof t&&null!==t)}function Gt(t){return!Wt(t)&&(Array.isArray(t)||Kt(t))}function Qt(t,...e){const i=e.shift();if(Kt(i)){Kt(t)||(t=Object.create(null));for(const e in i){const n=i[e];Gt(n)?t[e]=Qt(t[e],n):t[e]=n}}else if(Array.isArray(i)){const e=i.length;Array.isArray(t)?t.length=e:t=new Array(e);let n=0;for(;n<e;n++){const e=i[n];Gt(e)?t[n]=Qt(t[n],e):t[n]=e}void 0!==i.raw&&(t.raw=i.raw.slice())}else t=i;return e.length?Qt(t,...e):t}function Zt(t){if(void 0!==t.actions){const e=t.actions.map((t=>{const e=Object.assign({},t),i=Object.assign({},e.props);return delete i.state,delete i.api,delete e.element,e.props=i,e}));t.actions=e}return Qt({},t)}var Jt={mergeDeep:Qt,clone:Zt,schedule:Xt};class te{constructor(t,e){this.slotInstances={},this.destroyed=!1,this.vido=t,this.props=e,this.destroy=this.destroy.bind(this),this.change=this.change.bind(this),this.html=this.html.bind(this),this.getInstances=this.getInstances.bind(this),this.setComponents=this.setComponents.bind(this),this.vido.onDestroy((()=>{this.destroy()}))}setComponents(t){if(t&&!this.destroyed){for(const e in t){const i=t[e];void 0===this.slotInstances[e]&&(this.slotInstances[e]=[]);for(const t of this.slotInstances[e])t.destroy();this.slotInstances[e].length=0;for(const t of i)this.slotInstances[e].push(this.vido.createComponent(t,this.props))}this.vido.update()}}destroy(){if(!this.destroyed){for(const t in this.slotInstances){for(const e of this.slotInstances[t])e.destroy();this.slotInstances[t].length=0}this.destroyed=!0}}change(t,e=void 0){if(!this.destroyed)for(const i in this.slotInstances){const n=this.slotInstances[i];for(const i of n)i.change(t,e)}}getInstances(t){return this.destroyed?[]:void 0===t?this.slotInstances:this.slotInstances[t]}html(t,e){if(this.destroyed)return;if(!this.slotInstances[t]||0===this.slotInstances[t].length)return e;let i=e;for(const e of this.slotInstances[t])i=e.html(i);return i}getProps(){return this.props}isDestroyed(){return this.destroyed}}class ee extends V{update(t,e){if("function"!=typeof e[0])throw new Error("[vido] GetElementDirective argument should be a function.");(0,e[0])(t.element)}render(){return x}}function ie(t,e){let i=0;const n=new Map;let s,a,o=new Map,r=0;const u=[],c=Promise.resolve(),h={},l=function(t){return class extends V{update(e,i){const n=e.element,s=i[0],a=i[1],o=i[2];for(const e of a)if(void 0!==e){let i;if(t.has(s))for(const a of t.get(s))if(a.componentAction.create===e&&a.element===n){i=a;break}if(i)i.props=o;else{void 0!==n.vido&&delete n.vido;const i={instance:s,componentAction:{create:e,update(){},destroy(){}},element:n,props:o};let a=[];t.has(s)&&(a=t.get(s)),a.push(i),t.set(s,a)}}}render(t,e,i){return x}}}(o);class d{constructor(t){this.instance=t}create(t,e){const i=L(l);return()=>i(this.instance,t,e)}}const m=function(t,e,i){return class{constructor(t,e,i={}){this.destroyed=!1,this.instance=t,this.name=e.name,this.vidoInstance=e,this.props=i,this.destroy=this.destroy.bind(this),this.update=this.update.bind(this),this.change=this.change.bind(this),this.html=this.html.bind(this)}destroy(){this.destroyed||(this.vidoInstance.debug&&(console.groupCollapsed(`destroying component ${this.instance}`),console.log(i({components:t.keys(),actionsByInstance:e})),console.trace(),console.groupEnd()),this.vidoInstance.destroyComponent(this.instance,this.vidoInstance),this.destroyed=!0)}update(n=void 0){return this.vidoInstance.debug&&(console.groupCollapsed(`updating component ${this.instance}`),console.log(i({components:t.keys(),actionsByInstance:e})),console.trace(),console.groupEnd()),this.vidoInstance.updateTemplate(n)}change(n,s={}){this.vidoInstance.debug&&(console.groupCollapsed(`changing component ${this.instance}`),console.log(i({props:this.props,newProps:n,components:t.keys(),actionsByInstance:e})),console.trace(),console.groupEnd());const a=t.get(this.instance);a&&a.change(n,s)}html(e={}){const i=t.get(this.instance);if(i&&!i.destroyed)return i.update(e,this.vidoInstance)}_getComponents(){return t}_getActions(){return e}}}(n,o,Zt),g=function(t,e,i){return class{constructor(t,e,i){this.destroyed=!1,this.instance=t,this.vidoInstance=e,this.renderFunction=i,this.destroy=this.destroy.bind(this),this.update=this.update.bind(this),this.change=this.change.bind(this)}destroy(){if(!this.destroyed){this.vidoInstance.debug&&(console.groupCollapsed(`component destroy method fired ${this.instance}`),console.log(i({props:this.vidoInstance.props,components:t.keys(),destroyable:this.vidoInstance.destroyable,actionsByInstance:e})),console.trace(),console.groupEnd()),this.content&&"function"==typeof this.content.destroy&&this.content.destroy();for(const t of this.vidoInstance.destroyable)t();this.vidoInstance.onChangeFunctions.length=0,this.vidoInstance.destroyable.length=0,this.vidoInstance.destroyed=!0,this.destroyed=!0,this.vidoInstance.update()}}update(n={}){return this.vidoInstance.debug&&(console.groupCollapsed(`component update method fired ${this.instance}`),console.log(i({components:t.keys(),actionsByInstance:e})),console.trace(),console.groupEnd()),this.renderFunction(n)}change(n,s={leave:!1}){const a=n;this.vidoInstance.debug&&(console.groupCollapsed(`component change method fired ${this.instance}`),console.log(i({props:a,components:t.keys(),onChangeFunctions:this.vidoInstance.onChangeFunctions,changedProps:n,actionsByInstance:e})),console.trace(),console.groupEnd());for(const t of this.vidoInstance.onChangeFunctions)t(n,s)}}}(n,o,Zt);class p{constructor(i="",s=""){this.instance="",this.name="",this.destroyable=[],this.destroyed=!1,this.onChangeFunctions=[],this.debug=!1,this.state=t,this.api=e,this.lastProps={},this.html=b,this.svg=k,this.lithtml=q,this.directive=L,this.asyncAppend=lt,this.asyncReplace=ht,this.cache=dt,this.classMap=St,this.styleMap=jt,this.StyleMap=qt,this.guard=gt,this.live=zt,this.ifDefined=pt,this.repeat=yt,this.unsafeHTML=bt,this.until=xt,this.when=$t,this.choose=At,this.map=_t,this.join=Tt,this.range=Et,this.templateContent=Dt,this.unsafeSVG=Mt,this.ref=Ot,this.schedule=Xt,this.getElement=L(ee),this.actionsByInstance=()=>{},this.detach=Lt,this.PointerAction=Ft,this.Action=Vt,this.Slots=te,this._components=n,this._actions=o,this.instance=i,this.reuseComponents=this.reuseComponents.bind(this),this.onDestroy=this.onDestroy.bind(this),this.onChange=this.onChange.bind(this),this.update=this.update.bind(this),this.destroyComponent=this.destroyComponent.bind(this);for(const t in h)this[t]=h[t].bind(this);this.name=s,this.Actions=new d(i)}static addMethod(t,e){h[t]=e}onDestroy(t){this.destroyable.push(t)}onChange(t){this.onChangeFunctions.push(t)}update(t){return this.updateTemplate(t)}reuseComponents(t,e,i,n,s=!0,a=!1){const o=[],r=t.length,u=e.length;let c=!1;!s||void 0!==e&&0!==e.length||(c=!0);let h=0;if(r<u){let s=u-r;for(;s;){const a=e[u-s],r=this.createComponent(n,i(a));t.push(r),o.push(r),s--}}else if(r>u){let e=r-u;if(s)c=!0,h=r-e;else{for(;e;){const i=r-e;o.push(t[i]),t[i].destroy(),e--}t.length=u}}let l=0;a&&console.log("modified components",o),a&&console.log("current components",t),a&&console.log("data array",e);for(const n of t){const t=e[l];a&&console.log(`reuse components data at '${l}'`,t),n&&!o.includes(n)&&(a&&console.log("getProps fn result",i(t)),n.change(i(t),{leave:c&&l>=h})),l++}}createComponent(t,e={}){const s=t.name+":"+i++;let a;a=new p(s,t.name);const r=new m(s,a,e),u=new g(s,a,t(a,e));return n.set(s,u),n.get(s).change(e),a.debug&&(console.groupCollapsed(`component created ${s}`),console.log(Zt({props:e,components:n.keys(),actionsByInstance:o})),console.trace(),console.groupEnd()),r}destroyComponent(t,e){if(e.debug&&(console.groupCollapsed(`destroying component ${t}...`),console.log(Zt({components:n.keys(),actionsByInstance:o})),console.trace(),console.groupEnd()),o.has(t))for(const e of o.get(t))"function"==typeof e.componentAction.destroy&&e.componentAction.destroy(e.element,e.props);o.delete(t);const i=n.get(t);i?(i.destroy(),n.delete(t),e.debug&&(console.groupCollapsed(`component destroyed ${t}`),console.log(Zt({components:n.keys(),actionsByInstance:o})),console.trace(),console.groupEnd())):console.warn(`No component to destroy! [${t}]`)}executeActions(){for(const t of o.values()){for(const e of t)if(void 0===e.element.vido){const t=n.get(e.instance);e.isActive=function(){return t&&!1===t.destroyed};const i=e.componentAction,s=i.create;if(void 0!==s){let t;t=s.prototype&&(s.prototype.isAction||s.prototype.update||s.prototype.destroy)||s.isAction?new s(e.element,e.props):s(e.element,e.props),void 0!==t&&("function"==typeof t?i.destroy=t:("function"==typeof t.update&&(i.update=t.update.bind(t)),"function"==typeof t.destroy&&(i.destroy=t.destroy.bind(t))))}}else e.element.vido=e.props,"function"==typeof e.componentAction.update&&e.isActive()&&e.componentAction.update(e.element,e.props);for(const e of t)e.element.vido=e.props}}updateTemplate(t=void 0){return t&&u.push(t),new Promise((t=>{const e=++r,i=this;c.then((function(){if(e===r){r=0,i.render();for(const t of u)t();u.length=0,t(null)}}))}))}createApp(t){a=t.element;const e=this.createComponent(t.component,t.props);return s=e.instance,this.render(),e}render(){const t=n.get(s);t?(j(t.update(),a),this.executeActions()):a&&a.remove()}}return new p}ie.lithtml=q,ie.Action=Vt,ie.Directive=V,ie.StyleMap=qt,ie.PointerAction=Ft,ie.Slots=te,ie.directives={schedule:Xt,detach:Lt,styleMap:jt,classMap:St,asyncAppend:lt,asyncReplace:ht,cache:dt,guard:gt,live:zt,ifDefined:pt,repeat:yt,unsafeHTML:bt,until:xt,when:$t,choose:At,map:_t,join:Tt,range:Et,templateContent:Dt,unsafeSVG:Mt,ref:Ot};const ne=q;var se=Object.freeze({__proto__:null,Action:Vt,AsyncReplaceDirective:ct,Directive:V,PartType:N,PointerAction:Ft,Slots:te,StyleMap:qt,UnsafeHTMLDirective:vt,UntilDirective:wt,_$LH:B,asyncAppend:lt,asyncReplace:ht,cache:dt,choose:At,classMap:St,createRef:()=>new Ct,default:ie,detach:Lt,directive:L,guard:gt,helpers:Jt,html:b,ifDefined:pt,join:Tt,lit:ne,lithtml:q,map:_t,noChange:w,nothing:x,range:Et,ref:Ot,render:j,repeat:yt,schedule:Xt,styleMap:jt,svg:k,templateContent:Dt,unsafeHTML:bt,unsafeSVG:Mt,until:xt,when:$t}),ae=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self,{exports:{}});ae.exports=function(){var t=1e3,e=6e4,i=36e5,n="millisecond",s="second",a="minute",o="hour",r="day",u="week",c="month",h="quarter",l="year",d="date",m="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,f={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],i=t%100;return"["+t+(e[(i-20)%10]||e[i]||e[0])+"]"}},y=function(t,e,i){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(i)+t},v={s:y,z:function(t){var e=-t.utcOffset(),i=Math.abs(e),n=Math.floor(i/60),s=i%60;return(e<=0?"+":"-")+y(n,2,"0")+":"+y(s,2,"0")},m:function t(e,i){if(e.date()<i.date())return-t(i,e);var n=12*(i.year()-e.year())+(i.month()-e.month()),s=e.clone().add(n,c),a=i-s<0,o=e.clone().add(n+(a?-1:1),c);return+(-(n+(i-s)/(a?s-o:o-s))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:l,w:u,d:r,D:d,h:o,m:a,s:s,ms:n,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},b="en",k={};k[b]=f;var w="$isDayjsObject",x=function(t){return t instanceof $||!(!t||!t[w])},z=function t(e,i,n){var s;if(!e)return b;if("string"==typeof e){var a=e.toLowerCase();k[a]&&(s=a),i&&(k[a]=i,s=a);var o=e.split("-");if(!s&&o.length>1)return t(o[0])}else{var r=e.name;k[r]=e,s=r}return!n&&s&&(b=s),s||!n&&b},j=function(t,e){if(x(t))return t.clone();var i="object"==typeof e?e:{};return i.date=t,i.args=arguments,new $(i)},S=v;S.l=z,S.i=x,S.w=function(t,e){return j(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var $=function(){function f(t){this.$L=z(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[w]=!0}var y=f.prototype;return y.parse=function(t){this.$d=function(t){var e=t.date,i=t.utc;if(null===e)return new Date(NaN);if(S.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var n=e.match(g);if(n){var s=n[2]-1||0,a=(n[7]||"0").substring(0,3);return i?new Date(Date.UTC(n[1],s,n[3]||1,n[4]||0,n[5]||0,n[6]||0,a)):new Date(n[1],s,n[3]||1,n[4]||0,n[5]||0,n[6]||0,a)}}return new Date(e)}(t),this.init()},y.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},y.$utils=function(){return S},y.isValid=function(){return!(this.$d.toString()===m)},y.isSame=function(t,e){var i=j(t);return this.startOf(e)<=i&&i<=this.endOf(e)},y.isAfter=function(t,e){return j(t)<this.startOf(e)},y.isBefore=function(t,e){return this.endOf(e)<j(t)},y.$g=function(t,e,i){return S.u(t)?this[e]:this.set(i,t)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(t,e){var i=this,n=!!S.u(e)||e,h=S.p(t),m=function(t,e){var s=S.w(i.$u?Date.UTC(i.$y,e,t):new Date(i.$y,e,t),i);return n?s:s.endOf(r)},g=function(t,e){return S.w(i.toDate()[t].apply(i.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(e)),i)},p=this.$W,f=this.$M,y=this.$D,v="set"+(this.$u?"UTC":"");switch(h){case l:return n?m(1,0):m(31,11);case c:return n?m(1,f):m(0,f+1);case u:var b=this.$locale().weekStart||0,k=(p<b?p+7:p)-b;return m(n?y-k:y+(6-k),f);case r:case d:return g(v+"Hours",0);case o:return g(v+"Minutes",1);case a:return g(v+"Seconds",2);case s:return g(v+"Milliseconds",3);default:return this.clone()}},y.endOf=function(t){return this.startOf(t,!1)},y.$set=function(t,e){var i,u=S.p(t),h="set"+(this.$u?"UTC":""),m=(i={},i[r]=h+"Date",i[d]=h+"Date",i[c]=h+"Month",i[l]=h+"FullYear",i[o]=h+"Hours",i[a]=h+"Minutes",i[s]=h+"Seconds",i[n]=h+"Milliseconds",i)[u],g=u===r?this.$D+(e-this.$W):e;if(u===c||u===l){var p=this.clone().set(d,1);p.$d[m](g),p.init(),this.$d=p.set(d,Math.min(this.$D,p.daysInMonth())).$d}else m&&this.$d[m](g);return this.init(),this},y.set=function(t,e){return this.clone().$set(t,e)},y.get=function(t){return this[S.p(t)]()},y.add=function(n,h){var d,m=this;n=Number(n);var g=S.p(h),p=function(t){var e=j(m);return S.w(e.date(e.date()+Math.round(t*n)),m)};if(g===c)return this.set(c,this.$M+n);if(g===l)return this.set(l,this.$y+n);if(g===r)return p(1);if(g===u)return p(7);var f=(d={},d[a]=e,d[o]=i,d[s]=t,d)[g]||1,y=this.$d.getTime()+n*f;return S.w(y,this)},y.subtract=function(t,e){return this.add(-1*t,e)},y.format=function(t){var e=this,i=this.$locale();if(!this.isValid())return i.invalidDate||m;var n=t||"YYYY-MM-DDTHH:mm:ssZ",s=S.z(this),a=this.$H,o=this.$m,r=this.$M,u=i.weekdays,c=i.months,h=i.meridiem,l=function(t,i,s,a){return t&&(t[i]||t(e,n))||s[i].slice(0,a)},d=function(t){return S.s(a%12||12,t,"0")},g=h||function(t,e,i){var n=t<12?"AM":"PM";return i?n.toLowerCase():n};return n.replace(p,(function(t,n){return n||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return S.s(e.$y,4,"0");case"M":return r+1;case"MM":return S.s(r+1,2,"0");case"MMM":return l(i.monthsShort,r,c,3);case"MMMM":return l(c,r);case"D":return e.$D;case"DD":return S.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return l(i.weekdaysMin,e.$W,u,2);case"ddd":return l(i.weekdaysShort,e.$W,u,3);case"dddd":return u[e.$W];case"H":return String(a);case"HH":return S.s(a,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return g(a,o,!0);case"A":return g(a,o,!1);case"m":return String(o);case"mm":return S.s(o,2,"0");case"s":return String(e.$s);case"ss":return S.s(e.$s,2,"0");case"SSS":return S.s(e.$ms,3,"0");case"Z":return s}return null}(t)||s.replace(":","")}))},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(n,d,m){var g,p=this,f=S.p(d),y=j(n),v=(y.utcOffset()-this.utcOffset())*e,b=this-y,k=function(){return S.m(p,y)};switch(f){case l:g=k()/12;break;case c:g=k();break;case h:g=k()/3;break;case u:g=(b-v)/6048e5;break;case r:g=(b-v)/864e5;break;case o:g=b/i;break;case a:g=b/e;break;case s:g=b/t;break;default:g=b}return m?g:S.a(g)},y.daysInMonth=function(){return this.endOf(c).$D},y.$locale=function(){return k[this.$L]},y.locale=function(t,e){if(!t)return this.$L;var i=this.clone(),n=z(t,e,!0);return n&&(i.$L=n),i},y.clone=function(){return S.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},f}(),A=$.prototype;return j.prototype=A,[["$ms",n],["$s",s],["$m",a],["$H",o],["$W",r],["$M",c],["$y",l],["$D",d]].forEach((function(t){A[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),j.extend=function(t,e){return t.$i||(t(e,$,j),t.$i=!0),j},j.locale=z,j.isDayjs=x,j.unix=function(t){return j(1e3*t)},j.en=k[b],j.Ls=k,j.p={},j}();var oe=ae.exports,re={exports:{}};re.exports=function(){var t="minute",e=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(n,s,a){var o=s.prototype;a.utc=function(t){return new s({date:t,utc:!0,args:arguments})},o.utc=function(e){var i=a(this.toDate(),{locale:this.$L,utc:!0});return e?i.add(this.utcOffset(),t):i},o.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var r=o.parse;o.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),r.call(this,t)};var u=o.init;o.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else u.call(this)};var c=o.utcOffset;o.utcOffset=function(n,s){var a=this.$utils().u;if(a(n))return this.$u?0:a(this.$offset)?c.call(this):this.$offset;if("string"==typeof n&&(n=function(t){void 0===t&&(t="");var n=t.match(e);if(!n)return null;var s=(""+n[0]).match(i)||["-",0,0],a=s[0],o=60*+s[1]+ +s[2];return 0===o?0:"+"===a?o:-o}(n),null===n))return this;var o=Math.abs(n)<=16?60*n:n,r=this;if(s)return r.$offset=o,r.$u=0===n,r;if(0!==n){var u=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(r=this.local().add(o+u,t)).$offset=o,r.$x.$localOffset=u}else r=this.utc();return r};var h=o.format;o.format=function(t){var e=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,e)},o.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},o.isUTC=function(){return!!this.$u},o.toISOString=function(){return this.toDate().toISOString()},o.toString=function(){return this.toDate().toUTCString()};var l=o.toDate;o.toDate=function(t){return"s"===t&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():l.call(this)};var d=o.diff;o.diff=function(t,e,i){if(t&&this.$u===t.$u)return d.call(this,t,e,i);var n=this.local(),s=a(t).local();return d.call(n,s,e,i)}}}();var ue=re.exports,ce={exports:{}};ce.exports=function(){var t,e,i=1e3,n=6e4,s=36e5,a=864e5,o=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,r=31536e6,u=2628e6,c=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,h={years:r,months:u,days:a,hours:s,minutes:n,seconds:i,milliseconds:1,weeks:6048e5},l=function(t){return t instanceof v},d=function(t,e,i){return new v(t,i,e.$l)},m=function(t){return e.p(t)+"s"},g=function(t){return t<0},p=function(t){return g(t)?Math.ceil(t):Math.floor(t)},f=function(t){return Math.abs(t)},y=function(t,e){return t?g(t)?{negative:!0,format:""+f(t)+e}:{negative:!1,format:""+t+e}:{negative:!1,format:""}},v=function(){function g(t,e,i){var n=this;if(this.$d={},this.$l=i,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),e)return d(t*h[m(e)],this);if("number"==typeof t)return this.$ms=t,this.parseFromMilliseconds(),this;if("object"==typeof t)return Object.keys(t).forEach((function(e){n.$d[m(e)]=t[e]})),this.calMilliseconds(),this;if("string"==typeof t){var s=t.match(c);if(s){var a=s.slice(2).map((function(t){return null!=t?Number(t):0}));return this.$d.years=a[0],this.$d.months=a[1],this.$d.weeks=a[2],this.$d.days=a[3],this.$d.hours=a[4],this.$d.minutes=a[5],this.$d.seconds=a[6],this.calMilliseconds(),this}}return this}var f=g.prototype;return f.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce((function(e,i){return e+(t.$d[i]||0)*h[i]}),0)},f.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=p(t/r),t%=r,this.$d.months=p(t/u),t%=u,this.$d.days=p(t/a),t%=a,this.$d.hours=p(t/s),t%=s,this.$d.minutes=p(t/n),t%=n,this.$d.seconds=p(t/i),t%=i,this.$d.milliseconds=t},f.toISOString=function(){var t=y(this.$d.years,"Y"),e=y(this.$d.months,"M"),i=+this.$d.days||0;this.$d.weeks&&(i+=7*this.$d.weeks);var n=y(i,"D"),s=y(this.$d.hours,"H"),a=y(this.$d.minutes,"M"),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var r=y(o,"S"),u=t.negative||e.negative||n.negative||s.negative||a.negative||r.negative,c=s.format||a.format||r.format?"T":"",h=(u?"-":"")+"P"+t.forma