gantt-schedule-timeline-calendar
Version:
Gantt, Schedule, Timeline, Calendar components all in one. [gantt, timeline, schedule, scheduler, calendar, booking, gantt chart, reservation, javascript gantt, javascript timeline, javascript schedule, javascript scheduler, javascript calendar, javascrip
98 lines • 227 kB
JavaScript
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const t=globalThis,e=t.trustedTypes,i=e?e.createPolicy("lit-html",{createHTML:t=>t}):void 0,s="$lit$",n=`lit$${Math.random().toFixed(9).slice(2)}$`,a="?"+n,o=`<${a}>`,r=document,u=()=>r.createComment(""),c=t=>null===t||"object"!=typeof t&&"function"!=typeof t,h=Array.isArray,l=t=>h(t)||"function"==typeof t?.[Symbol.iterator],d="[ \t\n\f\r]",m=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,g=/-->/g,p=/>/g,f=RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),y=/'/g,b=/"/g,v=/^(?:script|style|textarea|title)$/i,k=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),w=k(1),x=k(2),j=k(3),z=Symbol.for("lit-noChange"),S=Symbol.for("lit-nothing"),$=new WeakMap,A=r.createTreeWalker(r,129);function _(t,e){if(!h(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==i?i.createHTML(e):e}const T=(t,e)=>{const i=t.length-1,a=[];let r,u=2===e?"<svg>":3===e?"<math>":"",c=m;for(let e=0;e<i;e++){const i=t[e];let h,l,d=-1,k=0;for(;k<i.length&&(c.lastIndex=k,l=c.exec(i),null!==l);)k=c.lastIndex,c===m?"!--"===l[1]?c=g:void 0!==l[1]?c=p:void 0!==l[2]?(v.test(l[2])&&(r=RegExp("</"+l[2],"g")),c=f):void 0!==l[3]&&(c=f):c===f?">"===l[0]?(c=r??m,d=-1):void 0===l[1]?d=-2:(d=c.lastIndex-l[2].length,h=l[1],c=void 0===l[3]?f:'"'===l[3]?b:y):c===b||c===y?c=f:c===g||c===p?c=m:(c=f,r=void 0);const w=c===f&&t[e+1].startsWith("/>")?" ":"";u+=c===m?i+o:d>=0?(a.push(h),i.slice(0,d)+s+i.slice(d)+n+w):i+n+(-2===d?e:w)}return[_(t,u+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),a]};class E{constructor({strings:t,_$litType$:i},o){let r;this.parts=[];let c=0,h=0;const l=t.length-1,d=this.parts,[m,g]=T(t,i);if(this.el=E.createElement(m,o),A.currentNode=this.el.content,2===i||3===i){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=A.nextNode())&&d.length<l;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(s)){const e=g[h++],i=r.getAttribute(t).split(n),s=/([.?@])?(.*)/.exec(e);d.push({type:1,index:c,name:s[2],strings:i,ctor:"."===s[1]?C:"?"===s[1]?O:"@"===s[1]?B:R}),r.removeAttribute(t)}else t.startsWith(n)&&(d.push({type:6,index:c}),r.removeAttribute(t));if(v.test(r.tagName)){const t=r.textContent.split(n),i=t.length-1;if(i>0){r.textContent=e?e.emptyScript:"";for(let e=0;e<i;e++)r.append(t[e],u()),A.nextNode(),d.push({type:2,index:++c});r.append(t[i],u())}}}else if(8===r.nodeType)if(r.data===a)d.push({type:2,index:c});else{let t=-1;for(;-1!==(t=r.data.indexOf(n,t+1));)d.push({type:7,index:c}),t+=n.length-1}c++}}static createElement(t,e){const i=r.createElement("template");return i.innerHTML=t,i}}function D(t,e,i=t,s){if(e===z)return e;let n=void 0!==s?i._$Co?.[s]:i._$Cl;const a=c(e)?void 0:e._$litDirective$;return n?.constructor!==a&&(n?._$AO?.(!1),void 0===a?n=void 0:(n=new a(t),n._$AT(t,i,s)),void 0!==s?(i._$Co??=[])[s]=n:i._$Cl=n),void 0!==n&&(e=D(t,n._$AS(t,e.values),n,s)),e}let I=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,s=(t?.creationScope??r).importNode(e,!0);A.currentNode=s;let n=A.nextNode(),a=0,o=0,u=i[0];for(;void 0!==u;){if(a===u.index){let e;2===u.type?e=new M(n,n.nextSibling,this,t):1===u.type?e=new u.ctor(n,u.name,u.strings,this,t):6===u.type&&(e=new P(n,this,t)),this._$AV.push(e),u=i[++o]}a!==u?.index&&(n=A.nextNode(),a++)}return A.currentNode=r,s}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}};class M{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=S,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}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=D(this,t,e),c(t)?t===S||null==t||""===t?(this._$AH!==S&&this._$AR(),this._$AH=S):t!==this._$AH&&t!==z&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):l(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==S&&c(this._$AH)?this._$AA.nextSibling.data=t:this.T(r.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,s="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=E.createElement(_(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(e);else{const t=new I(s,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=$.get(t.strings);return void 0===e&&$.set(t.strings,e=new E(t)),e}k(t){h(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const n of t)s===e.length?e.push(i=new M(this.O(u()),this.O(u()),this,this.options)):i=e[s],i._$AI(n),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class R{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,n){this.type=1,this._$AH=S,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=S}_$AI(t,e=this,i,s){const n=this.strings;let a=!1;if(void 0===n)t=D(this,t,e,0),a=!c(t)||t!==this._$AH&&t!==z,a&&(this._$AH=t);else{const s=t;let o,r;for(t=n[0],o=0;o<n.length-1;o++)r=D(this,s[i+o],e,o),r===z&&(r=this._$AH[o]),a||=!c(r)||r!==this._$AH[o],r===S?t=S:t!==S&&(t+=(r??"")+n[o+1]),this._$AH[o]=r}a&&!s&&this.j(t)}j(t){t===S?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class C extends R{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===S?void 0:t}}class O extends R{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==S)}}class B extends R{constructor(t,e,i,s,n){super(t,e,i,s,n),this.type=5}_$AI(t,e=this){if((t=D(this,t,e,0)??S)===z)return;const i=this._$AH,s=t===S&&i!==S||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==S&&(i===S||s);s&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class P{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){D(this,t)}}const q={M:s,P:n,A:a,C:1,L:T,R:I,D:l,V:D,I:M,H:R,N:O,U:B,B:C,F:P},N=t.litHtmlPolyfillSupport;N?.(E,M),(t.litHtmlVersions??=[]).push("3.2.1");const L=(t,e,i)=>{const s=i?.renderBefore??e;let n=s._$litPart$;if(void 0===n){const t=i?.renderBefore??null;s._$litPart$=n=new M(e.insertBefore(u(),t),t,void 0,i??{})}return n._$AI(t),n};var V=Object.freeze({__proto__:null,_$LH:q,html:w,mathml:j,noChange:z,nothing:S,render:L,svg:x});
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const H={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Y=t=>(...e)=>({_$litDirective$:t,values:e});let U=class{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{I:F}=q,X=(t,e)=>void 0!==t?._$litType$,W=t=>void 0===t.strings,K=()=>document.createComment(""),G=(t,e,i)=>{const s=t._$AA.parentNode,n=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=s.insertBefore(K(),n),a=s.insertBefore(K(),n);i=new F(e,a,t,t.options)}else{const e=i._$AB.nextSibling,a=i._$AM,o=a!==t;if(o){let e;i._$AQ?.(t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==a._$AU&&i._$AP(e)}if(e!==n||o){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;s.insertBefore(t,n),t=e}}}return i},Q=(t,e,i=t)=>(t._$AI(e,i),t),Z={},J=(t,e=Z)=>t._$AH=e,tt=t=>t._$AH,et=t=>{t._$AP?.(!1,!0);let e=t._$AA;const i=t._$AB.nextSibling;for(;e!==i;){const t=e.nextSibling;e.remove(),e=t}},it=t=>{t._$AR()},st=(t,e)=>{const i=t._$AN;if(void 0===i)return!1;for(const t of i)t._$AO?.(e,!1),st(t,e);return!0},nt=t=>{let e,i;do{if(void 0===(e=t._$AM))break;i=e._$AN,i.delete(t),t=e}while(0===i?.size)},at=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),ut(e)}};
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/function ot(t){void 0!==this._$AN?(nt(this),this._$AM=t,at(this)):this._$AM=t}function rt(t,e=!1,i=0){const s=this._$AH,n=this._$AN;if(void 0!==n&&0!==n.size)if(e)if(Array.isArray(s))for(let t=i;t<s.length;t++)st(s[t],!1),nt(s[t]);else null!=s&&(st(s,!1),nt(s));else st(this,t)}const ut=t=>{t.type==H.CHILD&&(t._$AP??=rt,t._$AQ??=ot)};class ct extends U{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),at(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(st(this,t),nt(this))}setValue(t){if(W(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 ht{constructor(t){this.Y=t}disconnect(){this.Y=void 0}reconnect(t){this.Y=t}deref(){return this.Y}}let lt=class{constructor(){this.Z=void 0,this.q=void 0}get(){return this.Z}pause(){this.Z??=new Promise((t=>this.q=t))}resume(){this.q?.(),this.Z=this.q=void 0}},dt=class extends ct{constructor(){super(...arguments),this._$CK=new ht(this),this._$CX=new lt}render(t,e){return z}update(t,[e,i]){if(this.isConnected||this.disconnected(),e===this._$CJ)return z;this._$CJ=e;let s=0;const{_$CK:n,_$CX: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=n.deref();if(void 0!==o){if(o._$CJ!==e)return!1;void 0!==i&&(t=i(t,s)),o.commitValue(t,s),s++}return!0})),z}commitValue(t,e){this.setValue(t)}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}};
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const mt=Y(dt),gt=Y(class extends dt{constructor(t){if(super(t),t.type!==H.CHILD)throw Error("asyncAppend can only be used in child expressions")}update(t,e){return this._$Ctt=t,super.update(t,e)}commitValue(t,e){0===e&&it(this._$Ctt);const i=G(this._$Ctt);Q(i,t)}}),pt=t=>(t=>null!=t?._$litType$?.h)(t)?t._$litType$.h:t.strings,ft=Y(class extends U{constructor(t){super(t),this.et=new WeakMap}render(t){return[t]}update(t,[e]){const i=X(this.it)?pt(this.it):null,s=X(e)?pt(e):null;if(null!==i&&(null===s||i!==s)){const e=tt(t).pop();let s=this.et.get(i);if(void 0===s){const t=document.createDocumentFragment();s=L(S,t),s.setConnected(!1),this.et.set(i,s)}J(s,[e]),G(s,void 0,e)}if(null!==s){if(null===i||i!==s){const e=this.et.get(s);if(void 0!==e){const i=tt(e).pop();it(t),G(t,void 0,i),J(t,[i])}}this.it=e}else this.it=void 0;return this.render(e)}}),yt={},bt=Y(class extends U{constructor(){super(...arguments),this.ot=yt}render(t,e){return e()}update(t,[e,i]){if(Array.isArray(e)){if(Array.isArray(this.ot)&&this.ot.length===e.length&&e.every(((t,e)=>t===this.ot[e])))return z}else if(this.ot===e)return z;return this.ot=Array.isArray(e)?Array.from(e):e,this.render(e,i)}}),vt=t=>t??S
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/,kt=(t,e,i)=>{const s=new Map;for(let n=e;n<=i;n++)s.set(t[n],n);return s},wt=Y(class extends U{constructor(t){if(super(t),t.type!==H.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,e,i){let s;void 0===i?i=e:void 0!==e&&(s=e);const n=[],a=[];let o=0;for(const e of t)n[o]=s?s(e,o):o,a[o]=i(e,o),o++;return{values:a,keys:n}}render(t,e,i){return this.dt(t,e,i).values}update(t,[e,i,s]){const n=tt(t),{values:a,keys:o}=this.dt(e,i,s);if(!Array.isArray(n))return this.ut=o,a;const r=this.ut??=[],u=[];let c,h,l=0,d=n.length-1,m=0,g=a.length-1;for(;l<=d&&m<=g;)if(null===n[l])l++;else if(null===n[d])d--;else if(r[l]===o[m])u[m]=Q(n[l],a[m]),l++,m++;else if(r[d]===o[g])u[g]=Q(n[d],a[g]),d--,g--;else if(r[l]===o[g])u[g]=Q(n[l],a[g]),G(t,u[g+1],n[l]),l++,g--;else if(r[d]===o[m])u[m]=Q(n[d],a[m]),G(t,n[l],n[d]),d--,m++;else if(void 0===c&&(c=kt(o,m,g),h=kt(r,l,d)),c.has(r[l]))if(c.has(r[d])){const e=h.get(o[m]),i=void 0!==e?n[e]:null;if(null===i){const e=G(t,n[l]);Q(e,a[m]),u[m]=e}else u[m]=Q(i,a[m]),G(t,n[l],i),n[e]=null;m++}else et(n[d]),d--;else et(n[l]),l++;for(;m<=g;){const e=G(t,u[g+1]);Q(e,a[m]),u[m++]=e}for(;l<=d;){const t=n[l++];null!==t&&et(t)}return this.ut=o,J(t,u),z}});
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
let xt=class extends U{constructor(t){if(super(t),this.it=S,t.type!==H.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===S||null==t)return this._t=void 0,this.it=t;if(t===z)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}};xt.directiveName="unsafeHTML",xt.resultType=1;const jt=Y(xt),zt=t=>!(t=>null===t||"object"!=typeof t&&"function"!=typeof t)(t)&&"function"==typeof t.then,St=1073741823;
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/class $t extends ct{constructor(){super(...arguments),this._$Cwt=St,this._$Cbt=[],this._$CK=new ht(this),this._$CX=new lt}render(...t){return t.find((t=>!zt(t)))??z}update(t,e){const i=this._$Cbt;let s=i.length;this._$Cbt=e;const n=this._$CK,a=this._$CX;this.isConnected||this.disconnected();for(let t=0;t<e.length&&!(t>this._$Cwt);t++){const o=e[t];if(!zt(o))return this._$Cwt=t,o;t<s&&o===i[t]||(this._$Cwt=St,s=0,Promise.resolve(o).then((async t=>{for(;a.get();)await a.get();const e=n.deref();if(void 0!==e){const i=e._$Cbt.indexOf(o);i>-1&&i<e._$Cwt&&(e._$Cwt=i,e.setValue(t))}})))}return z}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}}const At=Y($t),_t=Y(class extends U{constructor(t){if(super(t),t.type!==H.PROPERTY&&t.type!==H.ATTRIBUTE&&t.type!==H.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!W(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===z||e===S)return e;const i=t.element,s=t.name;if(t.type===H.PROPERTY){if(e===i[s])return z}else if(t.type===H.BOOLEAN_ATTRIBUTE){if(!!e===i.hasAttribute(s))return z}else if(t.type===H.ATTRIBUTE&&i.getAttribute(s)===e+"")return z;return J(t),e}}),Tt="important",Et=" !"+Tt,Dt=Y(class extends U{constructor(t){if(super(t),t.type!==H.ATTRIBUTE||"style"!==t.name||t.strings?.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 s=t[i];return null==s?e:e+`${i=i.includes("-")?i:i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(t,[e]){const{style:i}=t.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(e)),this.render(e);for(const t of this.ft)null==e[t]&&(this.ft.delete(t),t.includes("-")?i.removeProperty(t):i[t]=null);for(const t in e){const s=e[t];if(null!=s){this.ft.add(t);const e="string"==typeof s&&s.endsWith(Et);t.includes("-")||e?i.setProperty(t,e?s.slice(0,-11):s,e?Tt:""):i[t]=s}}return z}}),It=Y(class extends U{constructor(t){if(super(t),t.type!==H.ATTRIBUTE||"class"!==t.name||t.strings?.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]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(e)}const i=t.element.classList;for(const t of this.st)t in e||(i.remove(t),this.st.delete(t));for(const t in e){const s=!!e[t];s===this.st.has(t)||this.nt?.has(t)||(s?(i.add(t),this.st.add(t)):(i.remove(t),this.st.delete(t)))}return z}});
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
function Mt(t,e,i){return t?e(t):i?.(t)}
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const Rt=(t,e,i)=>{for(const i of e)if(i[0]===t)return(0,i[1])();return i?.()};
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/function*Ct(t,e){if(void 0!==t){let i=0;for(const s of t)yield e(s,i++)}}
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/function*Ot(t,e){const i="function"==typeof e;if(void 0!==t){let s=-1;for(const n of t)s>-1&&(yield i?e(s):e),s++,yield n}}
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/function*Bt(t,e,i=1){const s=void 0===e?0:t;e??=t;for(let t=s;i>0?t<e:e<t;t+=i)yield t}
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const Pt=Y(class extends U{constructor(t){if(super(t),t.type!==H.CHILD)throw Error("templateContent can only be used in child bindings")}render(t){return this.vt===t?z:(this.vt=t,document.importNode(t.content,!0))}});
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/class qt extends xt{}qt.directiveName="unsafeSVG",qt.resultType=2;const Nt=Y(qt);
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/class Lt{}const Vt=new WeakMap,Ht=Y(class extends ct{render(t){return S}update(t,[e]){const i=e!==this.Y;return i&&void 0!==this.Y&&this.rt(void 0),(i||this.lt!==this.ct)&&(this.Y=e,this.ht=t.options?.host,this.rt(this.ct=t.element)),S}rt(t){if(this.isConnected||(t=void 0),"function"==typeof this.Y){const e=this.ht??globalThis;let i=Vt.get(e);void 0===i&&(i=new WeakMap,Vt.set(e,i)),void 0!==i.get(this.Y)&&this.Y.call(this.ht,void 0),i.set(this.Y,t),void 0!==t&&this.Y.call(this.ht,t)}else this.Y.value=t}get lt(){return"function"==typeof this.Y?Vt.get(this.ht??globalThis)?.get(this.Y):this.Y?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),Yt=new WeakMap;class Ut extends U{update(t,e){return e[0].execute(t),z}render(t){return t.toString()}}class Ft{constructor(t,e={schedule:!1}){this.schedule=!1,this.style=t,this._directive=Y(Ut),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?Yt.get(this.element):null}updateStyle(t,e,i){const s=i.previousStyle;for(const t of e)t&&!this.style[t]&&(i.toRemove.includes(t)||i.toRemove.push(t));for(const t in s)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 n=this.style[t];if(!n)continue;const a=s[t];void 0!==a&&a===n&&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 s=this.style[e];s&&(e.includes("-")?t.setProperty(e,s):t[e]=s,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,Yt.has(e)?i=Yt.get(e):(i={toUpdate:[],toRemove:[],previousStyle:{},elementStyles:[],styleTaken:!1},Yt.set(e,i)),i.toRemove.length=0,i.toUpdate.length=0;const s=e.style;let n;if(i.styleTaken)n=i.elementStyles;else{i.elementStyles=n=[];for(let t=i.length;t--;)n.push(s[t]);i.styleTaken=!0}this.schedule?requestAnimationFrame((()=>{this.updateStyle(s,n,i)})):this.updateStyle(s,n,i),Yt.set(e,i)}}const Xt=new WeakMap;const Wt=Y(class extends U{render(t){return S}update(t,e){if("boolean"!=typeof e[0])throw new Error("[vido] Detach directive argument should be a boolean.");let i=e[0];const s=t.element;if(i)Xt.has(t)||Xt.set(t,{element:s,nextSibling:s.nextSibling,previousSibling:s.previousSibling,parent:s.parentNode}),s.remove();else{const e=Xt.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),Xt.delete(t))}return this.render(i)}});class Kt{constructor(){this.isAction=!0}}Kt.prototype.isAction=!0;const Gt={element:document.createTextNode(""),axis:"xy",threshold:10,onDown(){},onMove(){},onUp(){},onWheel(){}},Qt="undefined"!=typeof PointerEvent;let Zt=0;class Jt extends Kt{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=++Zt,this.options=Object.assign(Object.assign({},Gt),e.pointerOptions),Qt?(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,s=t.deltaZ||0;const n=t.deltaMode,a=parseInt(getComputedStyle(t.target).getPropertyValue("line-height"));let o=1;switch(n){case 1:o=a;break;case 2:o=window.height}return e*=o,i*=o,s*=o,{x:e,y:i,z:s,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,s=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",s=this.handleY(e)),this.options.onMove({movementX:i,movementY:s,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,s=0;Math.abs(e.x-this.initialX)>this.options.threshold&&(i=this.handleX(e)),Math.abs(e.y-this.initialY)>this.options.threshold&&(s=this.handleY(e)),this.options.onMove({movementX:i,movementY:s,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){Qt?(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 te(t){let e=0;return function(i){e||(e=requestAnimationFrame((function(){e=0,t.apply(void 0,[i])})))}}function ee(t){return null==t||"string"==typeof t||"number"==typeof t||"boolean"==typeof t||"bigint"==typeof t||"symbol"==typeof t}function ie(t){return!ee(t)&&(t&&t.constructor?"Object"===t.constructor.name:"object"==typeof t&&null!==t)}function se(t){return!ee(t)&&(Array.isArray(t)||ie(t))}function ne(t,...e){const i=e.shift();if(ie(i)){ie(t)||(t=Object.create(null));for(const e in i){const s=i[e];se(s)?t[e]=ne(t[e],s):t[e]=s}}else if(Array.isArray(i)){const e=i.length;Array.isArray(t)?t.length=e:t=new Array(e);let s=0;for(;s<e;s++){const e=i[s];se(e)?t[s]=ne(t[s],e):t[s]=e}void 0!==i.raw&&(t.raw=i.raw.slice())}else t=i;return e.length?ne(t,...e):t}function ae(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 ne({},t)}var oe={mergeDeep:ne,clone:ae,schedule:te};class re{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){this.props=t;for(const i in this.slotInstances){const s=this.slotInstances[i];for(const i of s)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 ue extends U{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 S}}function ce(t,e){let i=0;const s=new Map;let n,a,o=new Map,r=0;const u=[],c=Promise.resolve(),h={},l=function(t){return class extends U{update(e,i){const s=e.element,n=i[0],a=i[1],o=i[2];for(const e of a)if(void 0!==e){let i;if(t.has(n))for(const a of t.get(n))if(a.componentAction.create===e&&a.element===s){i=a;break}if(i)i.props=o;else{void 0!==s.vido&&delete s.vido;const i={instance:n,componentAction:{create:e,update(){},destroy(){}},element:s,props:o};let a=[];t.has(n)&&(a=t.get(n)),a.push(i),t.set(n,a)}}}render(t,e,i){return S}}}(o);class d{constructor(t){this.instance=t}create(t,e){const i=Y(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(s=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(s)}change(s,n={}){this.vidoInstance.debug&&(console.groupCollapsed(`changing component ${this.instance}`),console.log(i({props:this.props,newProps:s,components:t.keys(),actionsByInstance:e})),console.trace(),console.groupEnd());const a=t.get(this.instance);a&&a.change(s,n)}html(e={}){const i=t.get(this.instance);if(i&&!i.destroyed)return i.update(e,this.vidoInstance)}_getComponents(){return t}_getActions(){return e}}}(s,o,ae),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(s={}){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(s)}change(s,n={leave:!1}){const a=s;this.vidoInstance.debug&&(console.groupCollapsed(`component change method fired ${this.instance}`),console.log(i({props:a,components:t.keys(),onChangeFunctions:this.vidoInstance.onChangeFunctions,changedProps:s,actionsByInstance:e})),console.trace(),console.groupEnd());for(const t of this.vidoInstance.onChangeFunctions)t(s,n)}}}(s,o,ae);class p{constructor(i="",n=""){this.instance="",this.name="",this.destroyable=[],this.destroyed=!1,this.onChangeFunctions=[],this.debug=!1,this.state=t,this.api=e,this.lastProps={},this.html=w,this.svg=x,this.lithtml=V,this.directive=Y,this.asyncAppend=gt,this.asyncReplace=mt,this.cache=ft,this.classMap=It,this.styleMap=Dt,this.StyleMap=Ft,this.guard=bt,this.live=_t,this.ifDefined=vt,this.repeat=wt,this.unsafeHTML=jt,this.until=At,this.when=Mt,this.choose=Rt,this.map=Ct,this.join=Ot,this.range=Bt,this.templateContent=Pt,this.unsafeSVG=Nt,this.ref=Ht,this.schedule=te,this.getElement=Y(ue),this.actionsByInstance=()=>{},this.detach=Wt,this.PointerAction=Jt,this.Action=Kt,this.Slots=re,this._components=s,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=n,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,s,n=!0,a=!1){const o=[],r=t.length,u=e.length;let c=!1;!n||void 0!==e&&0!==e.length||(c=!0);let h=0;if(r<u){let n=u-r;for(;n;){const a=e[u-n],r=this.createComponent(s,i(a));t.push(r),o.push(r),n--}}else if(r>u){let e=r-u;if(n)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 s of t){const t=e[l];a&&console.log(`reuse components data at '${l}'`,t),s&&!o.includes(s)&&(a&&console.log("getProps fn result",i(t)),s.change(i(t),{leave:c&&l>=h})),l++}}createComponent(t,e={}){const n=t.name+":"+i++;let a;a=new p(n,t.name);const r=new m(n,a,e),u=new g(n,a,t(a,e));return s.set(n,u),s.get(n).change(e),a.debug&&(console.groupCollapsed(`component created ${n}`),console.log(ae({props:e,components:s.keys(),actionsByInstance:o})),console.trace(),console.groupEnd()),r}destroyComponent(t,e){if(e.debug&&(console.groupCollapsed(`destroying component ${t}...`),console.log(ae({components:s.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=s.get(t);i?(i.destroy(),s.delete(t),e.debug&&(console.groupCollapsed(`component destroyed ${t}`),console.log(ae({components:s.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=s.get(e.instance);e.isActive=function(){return t&&!1===t.destroyed};const i=e.componentAction,n=i.create;if(void 0!==n){let t;t=n.prototype&&(n.prototype.isAction||n.prototype.update||n.prototype.destroy)||n.isAction?new n(e.element,e.props):n(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 n=e.instance,this.render(),e}render(){const t=s.get(n);t?(L(t.update(),a),this.executeActions()):a&&a.remove()}}return new p}ce.lithtml=V,ce.Action=Kt,ce.Directive=U,ce.StyleMap=Ft,ce.PointerAction=Jt,ce.Slots=re,ce.directives={schedule:te,detach:Wt,styleMap:Dt,classMap:It,asyncAppend:gt,asyncReplace:mt,cache:ft,guard:bt,live:_t,ifDefined:vt,repeat:wt,unsafeHTML:jt,until:At,when:Mt,choose:Rt,map:Ct,join:Ot,range:Bt,templateContent:Pt,unsafeSVG:Nt,ref:Ht};const he=V;var le=Object.freeze({__proto__:null,Action:Kt,AsyncReplaceDirective:dt,Directive:U,PartType:H,PointerAction:Jt,Slots:re,StyleMap:Ft,UnsafeHTMLDirective:xt,UntilDirective:$t,_$LH:q,asyncAppend:gt,asyncReplace:mt,cache:ft,choose:Rt,classMap:It,createRef:()=>new Lt,default:ce,detach:Wt,directive:Y,guard:bt,helpers:oe,html:w,ifDefined:vt,join:Ot,lit:he,lithtml:V,map:Ct,mathml:j,noChange:z,nothing:S,range:Bt,ref:Ht,render:L,repeat:wt,schedule:te,styleMap:Dt,svg:x,templateContent:Pt,unsafeHTML:jt,unsafeSVG:Nt,until:At,when:Mt}),de=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self,{exports:{}});de.exports=function(){var t=1e3,e=6e4,i=36e5,s="millisecond",n="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 s=String(t);return!s||s.length>=e?t:""+Array(e+1-s.length).join(i)+t},b={s:y,z:function(t){var e=-t.utcOffset(),i=Math.abs(e),s=Math.floor(i/60),n=i%60;return(e<=0?"+":"-")+y(s,2,"0")+":"+y(n,2,"0")},m:function t(e,i){if(e.date()<i.date())return-t(i,e);var s=12*(i.year()-e.year())+(i.month()-e.month()),n=e.clone().add(s,c),a=i-n<0,o=e.clone().add(s+(a?-1:1),c);return+(-(s+(i-n)/(a?n-o:o-n))||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:n,ms:s,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},v="en",k={};k[v]=f;var w="$isDayjsObject",x=function(t){return t instanceof $||!(!t||!t[w])},j=function t(e,i,s){var n;if(!e)return v;if("string"==typeof e){var a=e.toLowerCase();k[a]&&(n=a),i&&(k[a]=i,n=a);var o=e.split("-");if(!n&&o.length>1)return t(o[0])}else{var r=e.name;k[r]=e,n=r}return!s&&n&&(v=n),n||!s&&v},z=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=b;S.l=j,S.i=x,S.w=function(t,e){return z(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var $=function(){function f(t){this.$L=j(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 s=e.match(g);if(s){var n=s[2]-1||0,a=(s[7]||"0").substring(0,3);return i?new Date(Date.UTC(s[1],n,s[3]||1,s[4]||0,s[5]||0,s[6]||0,a)):new Date(s[1],n,s[3]||1,s[4]||0,s[5]||0,s[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=z(t);return this.startOf(e)<=i&&i<=this.endOf(e)},y.isAfter=function(t,e){return z(t)<this.startOf(e)},y.isBefore=function(t,e){return this.endOf(e)<z(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,s=!!S.u(e)||e,h=S.p(t),m=function(t,e){var n=S.w(i.$u?Date.UTC(i.$y,e,t):new Date(i.$y,e,t),i);return s?n:n.endOf(r)},g=function(t,e){return S.w(i.toDate()[t].apply(i.toDate("s"),(s?[0,0,0,0]:[23,59,59,999]).slice(e)),i)},p=this.$W,f=this.$M,y=this.$D,b="set"+(this.$u?"UTC":"");switch(h){case l:return s?m(1,0):m(31,11);case c:return s?m(1,f):m(0,f+1);case u:var v=this.$locale().weekStart||0,k=(p<v?p+7:p)-v;return m(s?y-k:y+(6-k),f);case r:case d:return g(b+"Hours",0);case o:return g(b+"Minutes",1);case a:return g(b+"Seconds",2);case n:return g(b+"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[n]=h+"Seconds",i[s]=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(s,h){var d,m=this;s=Number(s);var g=S.p(h),p=function(t){var e=z(m);return S.w(e.date(e.date()+Math.round(t*s)),m)};if(g===c)return this.set(c,this.$M+s);if(g===l)return this.set(l,this.$y+s);if(g===r)return p(1);if(g===u)return p(7);var f=(d={},d[a]=e,d[o]=i,d[n]=t,d)[g]||1,y=this.$d.getTime()+s*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 s=t||"YYYY-MM-DDTHH:mm:ssZ",n=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,n,a){return t&&(t[i]||t(e,s))||n[i].slice(0,a)},d=function(t){return S.s(a%12||12,t,"0")},g=h||function(t,e,i){var s=t<12?"AM":"PM";return i?s.toLowerCase():s};return s.replace(p,(function(t,s){return s||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 n}return null}(t)||n.replace(":","")}))},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(s,d,m){var g,p=this,f=S.p(d),y=z(s),b=(y.utcOffset()-this.utcOffset())*e,v=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=(v-b)/6048e5;break;case r:g=(v-b)/864e5;break;case o:g=v/i;break;case a:g=v/e;break;case n:g=v/t;break;default:g=v}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(),s=j(t,e,!0);return s&&(i.$L=s),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 z.prototype=A,[["$ms",s],["$s",n],["$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])}})),z.extend=function(t,e){return t.$i||(t(e,$,z),t.$i=!0),z},z.locale=j,z.isDayjs=x,z.unix=function(t){return z(1e3*t)},z.en=k[v],z.Ls=k,z.p={},z}();var me=de.exports,ge={exports:{}};ge.exports=function(){var t="minute",e=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(s,n,a){var o=n.prototype;a.utc=function(t){return new n({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(s,n){var a=this.$utils().u;if(a(s))return this.$u?0:a(this.$offset)?c.call(this):this.$offset;if("string"==typeof s&&(s=function(t){void 0===t&&(t="");var s=t.match(e);if(!s)return null;var n=(""+s[0]).match(i)||["-",0,0],a=n[0],o=60*+n[1]+ +n[2];return 0===o?0:"+"===a?o:-o}(s),null===s))return this;var o=Math.abs(s)<=16?60*s:s,r=this;if(n)return r.$offset=o,r.$u=0===s,r;if(0!==s){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 s=this.local(),n=a(t).local();return d.call(s,n,e,i)}}}();var pe=ge.exports,fe={exports:{}};fe.exports=function(){var t,e,i=1e3,s=6e4,n=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:n,minutes:s,seconds:i,milliseconds:1,weeks:6048e5},l=function(t){return t instanceof b},d=function(t,e,i){return new b(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:""}},b=function(){function g(t,e,i){var s=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){s.$d[m(e)]=t[e]})),this.calMilliseconds(),this;if("string"==typeof t){var n=t.match(c);if(n){var a=n.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/n),t%=n,this.$d.minutes=p(t/s),t%=s,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 s=y(i,"D"),n=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||s.negative||n.negative||a.negative||r.negative,c=n.format||a.format||r.format?"T":"",h=(u?"-":"")+"P"+t.format+e.format+s.format+c+n.format+a.format+r.format;return"P"===h||"-P"===h?"P0D":h},f.toJSON=function(){return this.toISOString()},f.format=function(t){var i=t||"YYYY-MM-DDTHH:mm:ss",s={Y:this.$d.years,YY:e.s(this.$d.years,2,"0"),YYYY:e.s(this.$d.years,4,"0"),M:this.$d.months,MM:e.s(this.$d.months,2,"0"),D:this.$d.days,DD:e.s(this.$d.days,2,"0"),H:this.$d.hours,HH:e.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:e.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:e.s(this.$d.seconds,2,"0"),SSS:e.s(this.$d.milliseconds,3,"0")};return i.replace(o,(function(t,e){return e||String(s[t])}))},f.as=function(t){return this.$ms/h[m(t)]},f.get=function(t){var e=this.$ms,i=m(t);return"milliseconds"===i?e%=1e3:e="weeks"===i?p(e/h[i]):this.$d[i],e||0},f.add=function(t,e,i){var s;return s=e?t*h[m(e)]:l(t)?t.$ms:d(t,this).$ms,d(this.$ms+s*(i?-1:1),this)},f.subtract=function(t,e){return this.add(t,e,!0)},f.locale=function(t){var e=this.clone();return e.$l=t,e},f.clone=function(){return d(this.$ms,this)},f.humanize=function(e){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!e)},f.valueOf=function(){return this.asMilliseconds()},f.milliseconds=function(){return this.get("milliseconds")},f.asMilliseconds=function(){return this.as("milliseconds")},f.seconds=function(){return this.get("seconds")},f.asSeconds=function(){return this.as("seconds")},f.minutes=function(){return this.get("minutes")},f.asMinutes=function(){return this.as("minutes")},f.hours=function()