pangea-lib 3.0.4 → 3.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.cjs.js CHANGED
@@ -776,7 +776,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
776
776
  `);a.setAttribute(J0,""),a.innerHTML=i}};function au(e){e()}function dg(e,t){var a=typeof t=="function"?t:F8;if(e.length===0)a();else{var r=au;q1.mutateApproach===lP&&(r=i0.requestAnimationFrame||au),r(function(){var n=aB(),c=Io.begin("mutate");e.map(n),c(),a()})}}var $o=!1;function hg(){$o=!0}function Zs(){$o=!1}var pc=null;function ru(e){if(jf&&q1.observeMutations){var t=e.treeCallback,a=t===void 0?F8:t,r=e.nodeCallback,n=r===void 0?F8:r,c=e.pseudoElementsCallback,i=c===void 0?F8:c,s=e.observeMutationsRoot,l=s===void 0?I2:s;pc=new jf(function(f){if(!$o){var u=s0();ha(f).forEach(function(d){if(d.type==="childList"&&d.addedNodes.length>0&&!tu(d.addedNodes[0])&&(q1.searchPseudoElements&&i(d.target),a(d.target)),d.type==="attributes"&&d.target.parentNode&&q1.searchPseudoElements&&i(d.target.parentNode),d.type==="attributes"&&tu(d.target)&&~vP.indexOf(d.attributeName))if(d.attributeName==="class"&&eB(d.target)){var h=v5(Do(d.target)),m=h.prefix,v=h.iconName;d.target.setAttribute(To,m||u),v&&d.target.setAttribute(Eo,v)}else tB(d.target)&&n(d.target)})}}),Vt&&pc.observe(l,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function iB(){pc&&pc.disconnect()}function sB(e){var t=e.getAttribute("style"),a=[];return t&&(a=t.split(";").reduce(function(r,n){var c=n.split(":"),i=c[0],s=c.slice(1);return i&&s.length>0&&(r[i]=s.join(":").trim()),r},{})),a}function oB(e){var t=e.getAttribute("data-prefix"),a=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"",n=v5(Do(e));return n.prefix||(n.prefix=s0()),t&&a&&(n.prefix=t,n.iconName=a),n.iconName&&n.prefix||(n.prefix&&r.length>0&&(n.iconName=FP(n.prefix,e.innerText)||Bo(n.prefix,Ws(e.innerText))),!n.iconName&&q1.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(n.iconName=e.firstChild.data)),n}function lB(e){var t=ha(e.attributes).reduce(function(n,c){return n.name!=="class"&&n.name!=="style"&&(n[c.name]=c.value),n},{}),a=e.getAttribute("title"),r=e.getAttribute("data-fa-title-id");return q1.autoA11y&&(a?t["aria-labelledby"]="".concat(q1.replacementClass,"-title-").concat(r||Or()):(t["aria-hidden"]="true",t.focusable="false")),t}function fB(){return{iconName:null,title:null,titleId:null,prefix:null,transform:T4,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function nu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},a=oB(e),r=a.iconName,n=a.prefix,c=a.rest,i=lB(e),s=js("parseNodeAttributes",{},e),l=t.styleParser?sB(e):[];return P1({iconName:r,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:n,transform:T4,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:c,styles:l,attributes:i}},s)}var uB=r4.styles;function mg(e){var t=q1.autoReplaceSvg==="nest"?nu(e,{styleParser:!1}):nu(e);return~t.extra.classes.indexOf(Kv)?zt("generateLayersText",e,t):zt("generateSvgReplacementMutation",e,t)}var o0=new Set;No.map(function(e){o0.add("fa-".concat(e))});Object.keys(Tr[F2]).map(o0.add.bind(o0));Object.keys(Tr[ie]).map(o0.add.bind(o0));o0=Cn(o0);function cu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!Vt)return Promise.resolve();var a=I2.documentElement.classList,r=function(d){return a.add("".concat(Yf,"-").concat(d))},n=function(d){return a.remove("".concat(Yf,"-").concat(d))},c=q1.autoFetchSvg?o0:No.map(function(u){return"fa-".concat(u)}).concat(Object.keys(uB));c.includes("fa")||c.push("fa");var i=[".".concat(Kv,":not([").concat(J0,"])")].concat(c.map(function(u){return".".concat(u,":not([").concat(J0,"])")})).join(", ");if(i.length===0)return Promise.resolve();var s=[];try{s=ha(e.querySelectorAll(i))}catch{}if(s.length>0)r("pending"),n("complete");else return Promise.resolve();var l=Io.begin("onTree"),f=s.reduce(function(u,d){try{var h=mg(d);h&&u.push(h)}catch(m){Xv||m.name==="MissingIcon"&&console.error(m)}return u},[]);return new Promise(function(u,d){Promise.all(f).then(function(h){dg(h,function(){r("active"),r("complete"),n("pending"),typeof t=="function"&&t(),l(),u()})}).catch(function(h){l(),d(h)})})}function dB(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;mg(e).then(function(a){a&&dg([a],t)})}function hB(e){return function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:Ys(t||{}),n=a.mask;return n&&(n=(n||{}).icon?n:Ys(n||{})),e(r,P1(P1({},a),{},{mask:n}))}}var mB=function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=a.transform,n=r===void 0?T4:r,c=a.symbol,i=c===void 0?!1:c,s=a.mask,l=s===void 0?null:s,f=a.maskId,u=f===void 0?null:f,d=a.title,h=d===void 0?null:d,m=a.titleId,v=m===void 0?null:m,p=a.classes,g=p===void 0?[]:p,y=a.attributes,x=y===void 0?{}:y,C=a.styles,b=C===void 0?{}:C;if(t){var M=t.prefix,w=t.iconName,z=t.icon;return g5(P1({type:"icon"},t),function(){return e6("beforeDOMElementCreation",{iconDefinition:t,params:a}),q1.autoA11y&&(h?x["aria-labelledby"]="".concat(q1.replacementClass,"-title-").concat(v||Or()):(x["aria-hidden"]="true",x.focusable="false")),Ro({icons:{main:Gs(z),mask:l?Gs(l.icon):{found:!1,width:null,height:null,icon:{}}},prefix:M,iconName:w,transform:P1(P1({},T4),n),symbol:i,title:h,maskId:u,titleId:v,extra:{attributes:x,styles:b,classes:g}})})}},pB={mixout:function(){return{icon:hB(mB)}},hooks:function(){return{mutationObserverCallbacks:function(a){return a.treeCallback=cu,a.nodeCallback=dB,a}}},provides:function(t){t.i2svg=function(a){var r=a.node,n=r===void 0?I2:r,c=a.callback,i=c===void 0?function(){}:c;return cu(n,i)},t.generateSvgReplacementMutation=function(a,r){var n=r.iconName,c=r.title,i=r.titleId,s=r.prefix,l=r.transform,f=r.symbol,u=r.mask,d=r.maskId,h=r.extra;return new Promise(function(m,v){Promise.all([Xs(n,s),u.iconName?Xs(u.iconName,u.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(p){var g=So(p,2),y=g[0],x=g[1];m([a,Ro({icons:{main:y,mask:x},prefix:s,iconName:n,transform:l,symbol:f,maskId:d,title:c,titleId:i,extra:h,watchable:!0})])}).catch(v)})},t.generateAbstractIcon=function(a){var r=a.children,n=a.attributes,c=a.main,i=a.transform,s=a.styles,l=m5(s);l.length>0&&(n.style=l);var f;return Oo(i)&&(f=zt("generateAbstractTransformGrouping",{main:c,transform:i,containerWidth:c.width,iconWidth:c.width})),r.push(f||c.icon),{children:r,attributes:n}}}},vB={mixout:function(){return{layer:function(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.classes,c=n===void 0?[]:n;return g5({type:"layer"},function(){e6("beforeDOMElementCreation",{assembler:a,params:r});var i=[];return a(function(s){Array.isArray(s)?s.map(function(l){i=i.concat(l.abstract)}):i=i.concat(s.abstract)}),[{tag:"span",attributes:{class:["".concat(q1.cssPrefix,"-layers")].concat(Cn(c)).join(" ")},children:i}]})}}}},gB={mixout:function(){return{counter:function(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.title,c=n===void 0?null:n,i=r.classes,s=i===void 0?[]:i,l=r.attributes,f=l===void 0?{}:l,u=r.styles,d=u===void 0?{}:u;return g5({type:"counter",content:a},function(){return e6("beforeDOMElementCreation",{content:a,params:r}),KP({content:a.toString(),title:c,extra:{attributes:f,styles:d,classes:["".concat(q1.cssPrefix,"-layers-counter")].concat(Cn(s))}})})}}}},yB={mixout:function(){return{text:function(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.transform,c=n===void 0?T4:n,i=r.title,s=i===void 0?null:i,l=r.classes,f=l===void 0?[]:l,u=r.attributes,d=u===void 0?{}:u,h=r.styles,m=h===void 0?{}:h;return g5({type:"text",content:a},function(){return e6("beforeDOMElementCreation",{content:a,params:r}),Jf({content:a,transform:P1(P1({},T4),c),title:s,extra:{attributes:d,styles:m,classes:["".concat(q1.cssPrefix,"-layers-text")].concat(Cn(f))}})})}}},provides:function(t){t.generateLayersText=function(a,r){var n=r.title,c=r.transform,i=r.extra,s=null,l=null;if(jv){var f=parseInt(getComputedStyle(a).fontSize,10),u=a.getBoundingClientRect();s=u.width/f,l=u.height/f}return q1.autoA11y&&!n&&(i.attributes["aria-hidden"]="true"),Promise.resolve([a,Jf({content:a.innerHTML,width:s,height:l,transform:c,title:n,extra:i,watchable:!0})])}}},xB=new RegExp('"',"ug"),iu=[1105920,1112319];function bB(e){var t=e.replace(xB,""),a=EP(t,0),r=a>=iu[0]&&a<=iu[1],n=t.length===2?t[0]===t[1]:!1;return{value:Ws(n?t[0]:t),isSecondary:r||n}}function su(e,t){var a="".concat(oP).concat(t.replace(":","-"));return new Promise(function(r,n){if(e.getAttribute(a)!==null)return r();var c=ha(e.children),i=c.filter(function(z){return z.getAttribute(Us)===t})[0],s=i0.getComputedStyle(e,t),l=s.getPropertyValue("font-family").match(hP),f=s.getPropertyValue("font-weight"),u=s.getPropertyValue("content");if(i&&!l)return e.removeChild(i),r();if(l&&u!=="none"&&u!==""){var d=s.getPropertyValue("content"),h=~["Sharp"].indexOf(l[2])?ie:F2,m=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(l[2])?Er[h][l[2].toLowerCase()]:mP[h][f],v=bB(d),p=v.value,g=v.isSecondary,y=l[0].startsWith("FontAwesome"),x=Bo(m,p),C=x;if(y){var b=RP(p);b.iconName&&b.prefix&&(x=b.iconName,m=b.prefix)}if(x&&!g&&(!i||i.getAttribute(To)!==m||i.getAttribute(Eo)!==C)){e.setAttribute(a,C),i&&e.removeChild(i);var M=fB(),w=M.extra;w.attributes[Us]=t,Xs(x,m).then(function(z){var H=Ro(P1(P1({},M),{},{icons:{main:z,mask:Fo()},prefix:m,iconName:C,extra:w,watchable:!0})),A=I2.createElementNS("http://www.w3.org/2000/svg","svg");t==="::before"?e.insertBefore(A,e.firstChild):e.appendChild(A),A.outerHTML=H.map(function(V){return zn(V)}).join(`
777
777
  `),e.removeAttribute(a),r()}).catch(n)}else r()}else r()})}function CB(e){return Promise.all([su(e,"::before"),su(e,"::after")])}function MB(e){return e.parentNode!==document.head&&!~fP.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(Us)&&(!e.parentNode||e.parentNode.tagName!=="svg")}function ou(e){if(Vt)return new Promise(function(t,a){var r=ha(e.querySelectorAll("*")).filter(MB).map(CB),n=Io.begin("searchPseudoElements");hg(),Promise.all(r).then(function(){n(),Zs(),t()}).catch(function(){n(),Zs(),a()})})}var zB={hooks:function(){return{mutationObserverCallbacks:function(a){return a.pseudoElementsCallback=ou,a}}},provides:function(t){t.pseudoElements2svg=function(a){var r=a.node,n=r===void 0?I2:r;q1.searchPseudoElements&&ou(n)}}},lu=!1,wB={mixout:function(){return{dom:{unwatch:function(){hg(),lu=!0}}}},hooks:function(){return{bootstrap:function(){ru(js("mutationObserverCallbacks",{}))},noAuto:function(){iB()},watch:function(a){var r=a.observeMutationsRoot;lu?Zs():ru(js("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},fu=function(t){var a={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t.toLowerCase().split(" ").reduce(function(r,n){var c=n.toLowerCase().split("-"),i=c[0],s=c.slice(1).join("-");if(i&&s==="h")return r.flipX=!0,r;if(i&&s==="v")return r.flipY=!0,r;if(s=parseFloat(s),isNaN(s))return r;switch(i){case"grow":r.size=r.size+s;break;case"shrink":r.size=r.size-s;break;case"left":r.x=r.x-s;break;case"right":r.x=r.x+s;break;case"up":r.y=r.y-s;break;case"down":r.y=r.y+s;break;case"rotate":r.rotate=r.rotate+s;break}return r},a)},_B={mixout:function(){return{parse:{transform:function(a){return fu(a)}}}},hooks:function(){return{parseNodeAttributes:function(a,r){var n=r.getAttribute("data-fa-transform");return n&&(a.transform=fu(n)),a}}},provides:function(t){t.generateAbstractTransformGrouping=function(a){var r=a.main,n=a.transform,c=a.containerWidth,i=a.iconWidth,s={transform:"translate(".concat(c/2," 256)")},l="translate(".concat(n.x*32,", ").concat(n.y*32,") "),f="scale(".concat(n.size/16*(n.flipX?-1:1),", ").concat(n.size/16*(n.flipY?-1:1),") "),u="rotate(".concat(n.rotate," 0 0)"),d={transform:"".concat(l," ").concat(f," ").concat(u)},h={transform:"translate(".concat(i/2*-1," -256)")},m={outer:s,inner:d,path:h};return{tag:"g",attributes:P1({},m.outer),children:[{tag:"g",attributes:P1({},m.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:P1(P1({},r.icon.attributes),m.path)}]}]}}}},Si={x:0,y:0,width:"100%",height:"100%"};function uu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}function kB(e){return e.tag==="g"?e.children:[e]}var HB={hooks:function(){return{parseNodeAttributes:function(a,r){var n=r.getAttribute("data-fa-mask"),c=n?v5(n.split(" ").map(function(i){return i.trim()})):Fo();return c.prefix||(c.prefix=s0()),a.mask=c,a.maskId=r.getAttribute("data-fa-mask-id"),a}}},provides:function(t){t.generateAbstractMask=function(a){var r=a.children,n=a.attributes,c=a.main,i=a.mask,s=a.maskId,l=a.transform,f=c.width,u=c.icon,d=i.width,h=i.icon,m=_P({transform:l,containerWidth:d,iconWidth:f}),v={tag:"rect",attributes:P1(P1({},Si),{},{fill:"white"})},p=u.children?{children:u.children.map(uu)}:{},g={tag:"g",attributes:P1({},m.inner),children:[uu(P1({tag:u.tag,attributes:P1(P1({},u.attributes),m.path)},p))]},y={tag:"g",attributes:P1({},m.outer),children:[g]},x="mask-".concat(s||Or()),C="clip-".concat(s||Or()),b={tag:"mask",attributes:P1(P1({},Si),{},{id:x,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[v,y]},M={tag:"defs",children:[{tag:"clipPath",attributes:{id:C},children:kB(h)},b]};return r.push(M,{tag:"rect",attributes:P1({fill:"currentColor","clip-path":"url(#".concat(C,")"),mask:"url(#".concat(x,")")},Si)}),{children:r,attributes:n}}}},VB={provides:function(t){var a=!1;i0.matchMedia&&(a=i0.matchMedia("(prefers-reduced-motion: reduce)").matches),t.missingIconAbstract=function(){var r=[],n={fill:"currentColor"},c={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:P1(P1({},n),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var i=P1(P1({},c),{},{attributeName:"opacity"}),s={tag:"circle",attributes:P1(P1({},n),{},{cx:"256",cy:"364",r:"28"}),children:[]};return a||s.children.push({tag:"animate",attributes:P1(P1({},c),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:P1(P1({},i),{},{values:"1;0;1;1;0;1;"})}),r.push(s),r.push({tag:"path",attributes:P1(P1({},n),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:a?[]:[{tag:"animate",attributes:P1(P1({},i),{},{values:"1;0;0;0;0;1;"})}]}),a||r.push({tag:"path",attributes:P1(P1({},n),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:P1(P1({},i),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},LB={hooks:function(){return{parseNodeAttributes:function(a,r){var n=r.getAttribute("data-fa-symbol"),c=n===null?!1:n===""?!0:n;return a.symbol=c,a}}}},SB=[VP,pB,vB,gB,yB,zB,wB,_B,HB,VB,LB];UP(SB,{mixoutsTo:S3});S3.noAuto;var pg=S3.config,Uo=S3.library;S3.dom;var vc=S3.parse;S3.findIconDefinition;S3.toHtml;var AB=S3.icon;S3.layer;var TB=S3.text;S3.counter;function du(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),a.push.apply(a,r)}return a}function Z3(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?du(Object(a),!0).forEach(function(r){m3(e,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):du(Object(a)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))})}return e}function gc(e){"@babel/helpers - typeof";return gc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gc(e)}function m3(e,t,a){return t=RB(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function EB(e,t){if(e==null)return{};var a={},r=Object.keys(e),n,c;for(c=0;c<r.length;c++)n=r[c],!(t.indexOf(n)>=0)&&(a[n]=e[n]);return a}function NB(e,t){if(e==null)return{};var a=EB(e,t),r,n;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n<c.length;n++)r=c[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function Qs(e){return DB(e)||OB(e)||PB(e)||BB()}function DB(e){if(Array.isArray(e))return Js(e)}function OB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function PB(e,t){if(e){if(typeof e=="string")return Js(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Js(e,t)}}function Js(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a<t;a++)r[a]=e[a];return r}function BB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
778
778
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FB(e,t){if(typeof e!="object"||e===null)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var r=a.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function RB(e){var t=FB(e,"string");return typeof t=="symbol"?t:String(t)}var IB=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},vg={exports:{}};(function(e){(function(t){var a=function(y,x,C){if(!f(x)||d(x)||h(x)||m(x)||l(x))return x;var b,M=0,w=0;if(u(x))for(b=[],w=x.length;M<w;M++)b.push(a(y,x[M],C));else{b={};for(var z in x)Object.prototype.hasOwnProperty.call(x,z)&&(b[y(z,C)]=a(y,x[z],C))}return b},r=function(y,x){x=x||{};var C=x.separator||"_",b=x.split||/(?=[A-Z])/;return y.split(b).join(C)},n=function(y){return v(y)?y:(y=y.replace(/[\-_\s]+(.)?/g,function(x,C){return C?C.toUpperCase():""}),y.substr(0,1).toLowerCase()+y.substr(1))},c=function(y){var x=n(y);return x.substr(0,1).toUpperCase()+x.substr(1)},i=function(y,x){return r(y,x).toLowerCase()},s=Object.prototype.toString,l=function(y){return typeof y=="function"},f=function(y){return y===Object(y)},u=function(y){return s.call(y)=="[object Array]"},d=function(y){return s.call(y)=="[object Date]"},h=function(y){return s.call(y)=="[object RegExp]"},m=function(y){return s.call(y)=="[object Boolean]"},v=function(y){return y=y-0,y===y},p=function(y,x){var C=x&&"process"in x?x.process:x;return typeof C!="function"?y:function(b,M){return C(b,y,M)}},g={camelize:n,decamelize:i,pascalize:c,depascalize:i,camelizeKeys:function(y,x){return a(p(n,x),y)},decamelizeKeys:function(y,x){return a(p(i,x),y,x)},pascalizeKeys:function(y,x){return a(p(c,x),y)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=g:t.humps=g})(IB)})(vg);var $B=vg.exports,UB=["class","style"];function WB(e){return e.split(";").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,a){var r=a.indexOf(":"),n=$B.camelize(a.slice(0,r)),c=a.slice(r+1).trim();return t[n]=c,t},{})}function qB(e){return e.split(/\s+/).reduce(function(t,a){return t[a]=!0,t},{})}function Wo(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(typeof e=="string")return e;var r=(e.children||[]).map(function(l){return Wo(l)}),n=Object.keys(e.attributes||{}).reduce(function(l,f){var u=e.attributes[f];switch(f){case"class":l.class=qB(u);break;case"style":l.style=WB(u);break;default:l.attrs[f]=u}return l},{attrs:{},class:{},style:{}});a.class;var c=a.style,i=c===void 0?{}:c,s=NB(a,UB);return o.h(e.tag,Z3(Z3(Z3({},t),{},{class:n.class,style:Z3(Z3({},n.style),i)},n.attrs),s),r)}var gg=!1;try{gg=process.env.NODE_ENV==="production"}catch{}function jB(){if(!gg&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function cr(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?m3({},e,t):{}}function YB(e){var t,a=(t={"fa-spin":e.spin,"fa-pulse":e.pulse,"fa-fw":e.fixedWidth,"fa-border":e.border,"fa-li":e.listItem,"fa-inverse":e.inverse,"fa-flip":e.flip===!0,"fa-flip-horizontal":e.flip==="horizontal"||e.flip==="both","fa-flip-vertical":e.flip==="vertical"||e.flip==="both"},m3(t,"fa-".concat(e.size),e.size!==null),m3(t,"fa-rotate-".concat(e.rotation),e.rotation!==null),m3(t,"fa-pull-".concat(e.pull),e.pull!==null),m3(t,"fa-swap-opacity",e.swapOpacity),m3(t,"fa-bounce",e.bounce),m3(t,"fa-shake",e.shake),m3(t,"fa-beat",e.beat),m3(t,"fa-fade",e.fade),m3(t,"fa-beat-fade",e.beatFade),m3(t,"fa-flash",e.flash),m3(t,"fa-spin-pulse",e.spinPulse),m3(t,"fa-spin-reverse",e.spinReverse),t);return Object.keys(a).map(function(r){return a[r]?r:null}).filter(function(r){return r})}function hu(e){if(e&&gc(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(vc.icon)return vc.icon(e);if(e===null)return null;if(gc(e)==="object"&&e.prefix&&e.iconName)return e;if(Array.isArray(e)&&e.length===2)return{prefix:e[0],iconName:e[1]};if(typeof e=="string")return{prefix:"fas",iconName:e}}var GB=o.defineComponent({name:"FontAwesomeIcon",props:{border:{type:Boolean,default:!1},fixedWidth:{type:Boolean,default:!1},flip:{type:[Boolean,String],default:!1,validator:function(t){return[!0,!1,"horizontal","vertical","both"].indexOf(t)>-1}},icon:{type:[Object,Array,String],required:!0},mask:{type:[Object,Array,String],default:null},maskId:{type:String,default:null},listItem:{type:Boolean,default:!1},pull:{type:String,default:null,validator:function(t){return["right","left"].indexOf(t)>-1}},pulse:{type:Boolean,default:!1},rotation:{type:[String,Number],default:null,validator:function(t){return[90,180,270].indexOf(Number.parseInt(t,10))>-1}},swapOpacity:{type:Boolean,default:!1},size:{type:String,default:null,validator:function(t){return["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"].indexOf(t)>-1}},spin:{type:Boolean,default:!1},transform:{type:[String,Object],default:null},symbol:{type:[Boolean,String],default:!1},title:{type:String,default:null},titleId:{type:String,default:null},inverse:{type:Boolean,default:!1},bounce:{type:Boolean,default:!1},shake:{type:Boolean,default:!1},beat:{type:Boolean,default:!1},fade:{type:Boolean,default:!1},beatFade:{type:Boolean,default:!1},flash:{type:Boolean,default:!1},spinPulse:{type:Boolean,default:!1},spinReverse:{type:Boolean,default:!1}},setup:function(t,a){var r=a.attrs,n=o.computed(function(){return hu(t.icon)}),c=o.computed(function(){return cr("classes",YB(t))}),i=o.computed(function(){return cr("transform",typeof t.transform=="string"?vc.transform(t.transform):t.transform)}),s=o.computed(function(){return cr("mask",hu(t.mask))}),l=o.computed(function(){return AB(n.value,Z3(Z3(Z3(Z3({},c.value),i.value),s.value),{},{symbol:t.symbol,title:t.title,titleId:t.titleId,maskId:t.maskId}))});o.watch(l,function(u){if(!u)return jB("Could not find one or more icon(s)",n.value,s.value)},{immediate:!0});var f=o.computed(function(){return l.value?Wo(l.value.abstract[0],{},r):null});return function(){return f.value}}});o.defineComponent({name:"FontAwesomeLayers",props:{fixedWidth:{type:Boolean,default:!1}},setup:function(t,a){var r=a.slots,n=pg.familyPrefix,c=o.computed(function(){return["".concat(n,"-layers")].concat(Qs(t.fixedWidth?["".concat(n,"-fw")]:[]))});return function(){return o.h("div",{class:c.value},r.default?r.default():[])}}});o.defineComponent({name:"FontAwesomeLayersText",props:{value:{type:[String,Number],default:""},transform:{type:[String,Object],default:null},counter:{type:Boolean,default:!1},position:{type:String,default:null,validator:function(t){return["bottom-left","bottom-right","top-left","top-right"].indexOf(t)>-1}}},setup:function(t,a){var r=a.attrs,n=pg.familyPrefix,c=o.computed(function(){return cr("classes",[].concat(Qs(t.counter?["".concat(n,"-layers-counter")]:[]),Qs(t.position?["".concat(n,"-layers-").concat(t.position)]:[])))}),i=o.computed(function(){return cr("transform",typeof t.transform=="string"?vc.transform(t.transform):t.transform)}),s=o.computed(function(){var f=TB(t.value.toString(),Z3(Z3({},i.value),c.value)),u=f.abstract;return t.counter&&(u[0].attributes.class=u[0].attributes.class.replace("fa-layers-text","")),u[0]}),l=o.computed(function(){return Wo(s.value,{},r)});return function(){return l.value}}});const XB=o.defineComponent({__name:"PgaIcon",props:{icon:{},size:{default:"inherit"},color:{default:"inherit"},clickable:{type:Boolean}},setup(e){o.useCssVars(n=>({"248a15a0":n.size,"6bd9ada4":r.value}));const t=e,a=o.computed(()=>typeof t.icon=="string"?["fas",t.icon]:t.icon),r=o.computed(()=>mn(t.color)?`var(--pga-color-${t.color})`:t.color);return(n,c)=>(o.openBlock(),o.createBlock(o.unref(GB),{class:o.normalizeClass(["icon",{icon__clickable:n.clickable}]),icon:a.value},null,8,["class","icon"]))}});const I1=(e,t)=>{const a=e.__vccOpts||e;for(const[r,n]of t)a[r]=n;return a},Oe=I1(XB,[["__scopeId","data-v-00d745b7"]]),KB={class:"spinner"},ZB=o.defineComponent({__name:"PgaSpinner",props:{size:{default:"l"},color:{default:"primary"},colorContrast:{type:Boolean},preventCenter:{type:Boolean}},setup(e){o.useCssVars(c=>({d78996c4:a.value,"4d571bee":r.value,"55f15e6a":n.value}));const t=e,a=o.computed(()=>t.preventCenter?"none":"auto"),r=o.computed(()=>{if(t.size==="s")return"1.2rem";if(t.size==="m")return"1.6rem";if(t.size==="l")return"2rem"}),n=o.computed(()=>t.colorContrast?`var(--pga-color-${t.color}-contrast)`:`var(--pga-color-${t.color})`);return(c,i)=>(o.openBlock(),o.createElementBlock("div",KB,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(4,s=>o.createElementVNode("div",{class:"spinner--side",key:s})),64))]))}});const Lt=I1(ZB,[["__scopeId","data-v-24df277d"]]),QB=["type","disabled"],JB={class:"button--content"},eF=["textContent"],tF=o.defineComponent({__name:"PgaButton",props:{type:{default:"button"},icon:{},text:{},variant:{},size:{default:"m"},align:{default:"center"},color:{default:"primary"},heightAndWidth:{},fullWidth:{type:Boolean},fitContent:{type:Boolean},borderRadius:{},rounded:{type:Boolean},disabled:{type:Boolean},isLoading:{type:Boolean},numberToDisplay:{}},setup(e){o.useCssVars(C=>({"247b5f2c":c.value,"7a3bae63":i.value,"86a10e60":s.value,"268e14fe":l.value,"3cc804a4":u.value,"9641624a":v.value,"004b87cc":f.value,"09250ab2":h.value,"5fc805ce":m.value,fad91420:d.value,d6ec5fba:x.value,"3e85da52":g.value,"4021c3b6":y.value,"96b7a0de":p.value}));const t=e,{form:a,button:r}=$e(),n=o.computed(()=>t.variant||r.variant),c=o.computed(()=>{if(t.size==="s")return"0.8rem";if(t.size==="m")return"1rem";if(t.size==="l")return"1.2rem"}),i=o.computed(()=>t.heightAndWidth||"auto"),s=o.computed(()=>t.fullWidth?"100%":t.heightAndWidth||"max-content"),l=o.computed(()=>t.fitContent?"fit-content":""),f=o.computed(()=>t.borderRadius?t.borderRadius:t.rounded?"100%":a.input.borderRadius),u=o.computed(()=>{if(t.size==="s")return"0.3rem";if(t.size==="m")return"0.4rem";if(t.size==="l")return"0.5rem"}),d=o.computed(()=>{if(t.align==="center")return"center";if(t.align==="left")return"flex-start";if(t.align==="right")return"flex-end"}),h=o.computed(()=>t.color==="first"?"var(--pga-color-first)":n.value==="filled"?`var(--pga-color-${t.color}-contrast)`:`var(--pga-color-${t.color})`),m=o.computed(()=>t.color==="first"?"none":n.value==="filled"?`var(--pga-color-${t.color})`:`var(--pga-color-${t.color}-01)`),v=o.computed(()=>t.color==="first"||n.value==="filled"||n.value==="flat"?"transparent":`var(--pga-color-${t.color})`),p=o.computed(()=>t.color==="first"?"var(--pga-color-first-01)":n.value==="filled"?`var(--pga-color-${t.color}-09)`:`var(--pga-color-${t.color}-02)`),g=o.computed(()=>t.color==="first"?"var(--pga-color-first)":n.value==="filled"?`var(--pga-color-${t.color})`:`var(--pga-color-${t.color}-contrast)`),y=o.computed(()=>t.color==="first"?"none":n.value==="filled"?`var(--pga-color-${t.color}-contrast)`:`var(--pga-color-${t.color})`),x=o.computed(()=>t.color==="first"?"var(--pga-color-first)":n.value==="flat"?"transparent":n.value==="filled"?`var(--pga-color-${t.color})`:"transparent");return(C,b)=>(o.openBlock(),o.createElementBlock("button",{class:o.normalizeClass(["button",{button__disabled:C.disabled,"button__is-loading":C.isLoading}]),type:C.type,disabled:C.disabled||C.isLoading},[o.createElementVNode("div",JB,[C.icon?(o.openBlock(),o.createBlock(Oe,{key:0,icon:C.icon},null,8,["icon"])):o.createCommentVNode("",!0),C.text?(o.openBlock(),o.createBlock(ye,{key:1,text:C.text},null,8,["text"])):o.createCommentVNode("",!0),!C.icon&&!C.text?o.renderSlot(C.$slots,"default",{key:2},void 0,!0):o.createCommentVNode("",!0)]),o.createVNode(Lt,{class:"button--spinner",size:"s",color:C.color,colorContrast:n.value==="filled"},null,8,["color","colorContrast"]),C.numberToDisplay?(o.openBlock(),o.createElementBlock("div",{key:0,class:"button--number-to-display",onClick:b[0]||(b[0]=o.withModifiers(()=>{},["stop"]))},[o.createElementVNode("span",{class:"number-to-display--number",textContent:o.toDisplayString(C.numberToDisplay)},null,8,eF)])):o.createCommentVNode("",!0)],10,QB))}});const L2=I1(tF,[["__scopeId","data-v-64461ade"]]),aF={key:0},rF={key:0},nF=o.defineComponent({__name:"PgaDisplayText",props:{text:{},maxLengthToDisplay:{},icon:{},color:{default:"inherit"},showEmptyText:{type:Boolean},nowrap:{type:Boolean},textHidden:{type:Boolean},withUnderlineOnHover:{type:Boolean}},setup(e){o.useCssVars(l=>({"29ec7c2f":s.value}));const t=e,a=_2("pgaDisplay"),r=o.ref(!1),n=o.computed(()=>pt(t.text)),c=o.computed(()=>n.value.length),i=o.computed(()=>!t.maxLengthToDisplay||c.value<t.maxLengthToDisplay||r.value?n.value:`${n.value.slice(0,t.maxLengthToDisplay)}...`),s=o.computed(()=>mn(t.color)?`var(--pga-color-${t.color})`:t.color);return(l,f)=>l.text?(o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(["pga-text",{"pga-text__nowrap":l.nowrap||l.icon,"pga-text-hidden":l.textHidden,"pga-text__underline-on-hover":l.withUnderlineOnHover}])},[l.icon?(o.openBlock(),o.createElementBlock("span",rF,[o.createVNode(Oe,{icon:l.icon},null,8,["icon"]),o.createTextVNode("   ")])):o.createCommentVNode("",!0),o.createTextVNode(" "+o.toDisplayString(i.value)+" ",1),l.maxLengthToDisplay&&c.value>l.maxLengthToDisplay?(o.openBlock(),o.createBlock(L2,{key:1,text:r.value?o.unref(a)("hide"):o.unref(a)("showAll"),icon:r.value?"eye-slash":"eye",color:r.value?"grey":"primary",variant:"flat",size:"s",onClick:f[0]||(f[0]=u=>r.value=!r.value)},null,8,["text","icon","color"])):o.createCommentVNode("",!0)],2)):(o.openBlock(),o.createElementBlock("span",aF,o.toDisplayString(l.showEmptyText?"":"-"),1))}});const ye=I1(nF,[["__scopeId","data-v-8b1ad979"]]),cF={class:"button-link",type:"button"},iF=o.defineComponent({__name:"PgaButtonLink",props:{text:{},icon:{},size:{default:"inherit"},color:{default:"link"},preventUnderline:{type:Boolean}},setup(e){o.useCssVars(n=>({"25d8544c":n.size,b9e8442a:a.value,"4003f611":r.value}));const t=e,a=o.computed(()=>`var(--pga-color-${t.color})`),r=o.computed(()=>`var(--pga-color-${t.color}-08)`);return(n,c)=>(o.openBlock(),o.createElementBlock("button",cF,[n.text?(o.openBlock(),o.createBlock(ye,{key:0,class:o.normalizeClass(["button-link--text",{"button-link--text__with-underline":!n.preventUnderline}]),text:n.text,icon:n.icon},null,8,["class","text","icon"])):o.renderSlot(n.$slots,"default",{key:1},void 0,!0)]))}});const qo=I1(iF,[["__scopeId","data-v-2f866812"]]),sF={class:"notifications"},oF=o.defineComponent({__name:"Notifications",setup(e){const t=_2("notifications"),{notifications:a}=$e(),{notifications:r}=F4.storeToRefs(Jt());return(n,c)=>(o.openBlock(),o.createElementBlock("div",sF,[o.createVNode(o.TransitionGroup,{name:"notifications--transition-group"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(r),i=>(o.openBlock(),o.createElementBlock("div",{key:i.id,class:"notifications--notification",style:o.normalizeStyle({"border-left-color":`var(--pga-color-${i.type})`})},[o.createVNode(ye,{class:"notifications--message",text:i.message},null,8,["text"]),o.unref(a).preventRemove?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(Oe,{key:0,class:"notifications--xmark",icon:"xmark",onClick:s=>o.unref(Lo)(i.id)},null,8,["onClick"]))],4))),128))]),_:1}),!o.unref(a).preventRemove&&o.unref(r).length?(o.openBlock(),o.createBlock(qo,{key:0,class:"notifications--remove-all-btn",text:o.unref(t)("removeAllBtn"),onClick:c[0]||(c[0]=i=>o.unref(Iv)())},null,8,["text"])):o.createCommentVNode("",!0)]))}});const lF=I1(oF,[["__scopeId","data-v-306dfc81"]]),fF=o.defineComponent({__name:"App",setup(e){return(t,a)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(Hr.RouterView)),o.createVNode(lF)],64))}});function uF(e){return typeof e=="object"&&e!==null}function mu(e,t){return e=uF(e)?e:Object.create(null),new Proxy(e,{get(a,r,n){return r==="key"?Reflect.get(a,r,n):Reflect.get(a,r,n)||Reflect.get(t,r,n)}})}function dF(e,t){return t.reduce((a,r)=>a==null?void 0:a[r],e)}function hF(e,t,a){return t.slice(0,-1).reduce((r,n)=>/^(__proto__)$/.test(n)?{}:r[n]=r[n]||{},e)[t[t.length-1]]=a,e}function mF(e,t){return t.reduce((a,r)=>{const n=r.split(".");return hF(a,n,dF(e,n))},{})}function pF(e,t){return a=>{var r;try{const{storage:n=localStorage,beforeRestore:c=void 0,afterRestore:i=void 0,serializer:s={serialize:JSON.stringify,deserialize:JSON.parse},key:l=t.$id,paths:f=null,debug:u=!1}=a;return{storage:n,beforeRestore:c,afterRestore:i,serializer:s,key:((r=e.key)!=null?r:d=>d)(typeof l=="string"?l:l(t.$id)),paths:f,debug:u}}catch(n){return a.debug&&console.error("[pinia-plugin-persistedstate]",n),null}}}function pu(e,{storage:t,serializer:a,key:r,debug:n}){try{const c=t==null?void 0:t.getItem(r);c&&e.$patch(a==null?void 0:a.deserialize(c))}catch(c){n&&console.error("[pinia-plugin-persistedstate]",c)}}function vu(e,{storage:t,serializer:a,key:r,paths:n,debug:c}){try{const i=Array.isArray(n)?mF(e,n):e;t.setItem(r,a.serialize(i))}catch(i){c&&console.error("[pinia-plugin-persistedstate]",i)}}function vF(e={}){return t=>{const{auto:a=!1}=e,{options:{persist:r=a},store:n,pinia:c}=t;if(!r)return;if(!(n.$id in c.state.value)){const s=c._s.get(n.$id.replace("__hot:",""));s&&Promise.resolve().then(()=>s.$persist());return}const i=(Array.isArray(r)?r.map(s=>mu(s,e)):[mu(r,e)]).map(pF(e,n)).filter(Boolean);n.$persist=()=>{i.forEach(s=>{vu(n.$state,s)})},n.$hydrate=({runHooks:s=!0}={})=>{i.forEach(l=>{const{beforeRestore:f,afterRestore:u}=l;s&&(f==null||f(t)),pu(n,l),s&&(u==null||u(t))})},i.forEach(s=>{const{beforeRestore:l,afterRestore:f}=s;l==null||l(t),pu(n,s),f==null||f(t),n.$subscribe((u,d)=>{vu(d,s)},{detached:!0})})}}const yc="__vue_click_outside__";function yg(){return"click"}function xg(e,t,a){bg(e);let r=a.context,n=t.value,c=!1;setTimeout(()=>{c=!0},0),e[yc]=i=>{if((!e||!e.contains(i.target))&&n&&c&&typeof n=="function")return i.stopPropagation(),n.call(r,i)},document.addEventListener(yg(),e[yc],!1)}function gF(e,t,a){t.value!==t.oldValue&&xg(e,t,a)}function bg(e){document.removeEventListener(yg(),e[yc],!1),delete e[yc]}const gu={mounted:xg,updated:gF,unmounted:bg},Cg={install:e=>{e.directive("click-outside",gu)},directive:gu},yF=["top","right","bottom","left"],yu=["start","end"],xu=yF.reduce((e,t)=>e.concat(t,t+"-"+yu[0],t+"-"+yu[1]),[]),Pr=Math.min,A0=Math.max,xF={left:"right",right:"left",bottom:"top",top:"bottom"},bF={start:"end",end:"start"};function e7(e,t,a){return A0(e,Pr(t,a))}function u6(e,t){return typeof e=="function"?e(t):e}function I4(e){return e.split("-")[0]}function s4(e){return e.split("-")[1]}function Mg(e){return e==="x"?"y":"x"}function jo(e){return e==="y"?"height":"width"}function t6(e){return["top","bottom"].includes(I4(e))?"y":"x"}function Yo(e){return Mg(t6(e))}function zg(e,t,a){a===void 0&&(a=!1);const r=s4(e),n=Yo(e),c=jo(n);let i=n==="x"?r===(a?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[c]>t.floating[c]&&(i=bc(i)),[i,bc(i)]}function CF(e){const t=bc(e);return[xc(e),t,xc(t)]}function xc(e){return e.replace(/start|end/g,t=>bF[t])}function MF(e,t,a){const r=["left","right"],n=["right","left"],c=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return a?t?n:r:t?r:n;case"left":case"right":return t?c:i;default:return[]}}function zF(e,t,a,r){const n=s4(e);let c=MF(I4(e),a==="start",r);return n&&(c=c.map(i=>i+"-"+n),t&&(c=c.concat(c.map(xc)))),c}function bc(e){return e.replace(/left|right|bottom|top/g,t=>xF[t])}function wF(e){return{top:0,right:0,bottom:0,left:0,...e}}function wg(e){return typeof e!="number"?wF(e):{top:e,right:e,bottom:e,left:e}}function ir(e){const{x:t,y:a,width:r,height:n}=e;return{width:r,height:n,top:a,left:t,right:t+r,bottom:a+n,x:t,y:a}}function bu(e,t,a){let{reference:r,floating:n}=e;const c=t6(t),i=Yo(t),s=jo(i),l=I4(t),f=c==="y",u=r.x+r.width/2-n.width/2,d=r.y+r.height/2-n.height/2,h=r[s]/2-n[s]/2;let m;switch(l){case"top":m={x:u,y:r.y-n.height};break;case"bottom":m={x:u,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-n.width,y:d};break;default:m={x:r.x,y:r.y}}switch(s4(t)){case"start":m[i]-=h*(a&&f?-1:1);break;case"end":m[i]+=h*(a&&f?-1:1);break}return m}const _F=async(e,t,a)=>{const{placement:r="bottom",strategy:n="absolute",middleware:c=[],platform:i}=a,s=c.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let f=await i.getElementRects({reference:e,floating:t,strategy:n}),{x:u,y:d}=bu(f,r,l),h=r,m={},v=0;for(let p=0;p<s.length;p++){const{name:g,fn:y}=s[p],{x,y:C,data:b,reset:M}=await y({x:u,y:d,initialPlacement:r,placement:h,strategy:n,middlewareData:m,rects:f,platform:i,elements:{reference:e,floating:t}});u=x??u,d=C??d,m={...m,[g]:{...m[g],...b}},M&&v<=50&&(v++,typeof M=="object"&&(M.placement&&(h=M.placement),M.rects&&(f=M.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:n}):M.rects),{x:u,y:d}=bu(f,h,l)),p=-1)}return{x:u,y:d,placement:h,strategy:n,middlewareData:m}};async function y5(e,t){var a;t===void 0&&(t={});const{x:r,y:n,platform:c,rects:i,elements:s,strategy:l}=e,{boundary:f="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:m=0}=u6(t,e),v=wg(m),g=s[h?d==="floating"?"reference":"floating":d],y=ir(await c.getClippingRect({element:(a=await(c.isElement==null?void 0:c.isElement(g)))==null||a?g:g.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(s.floating)),boundary:f,rootBoundary:u,strategy:l})),x=d==="floating"?{x:r,y:n,width:i.floating.width,height:i.floating.height}:i.reference,C=await(c.getOffsetParent==null?void 0:c.getOffsetParent(s.floating)),b=await(c.isElement==null?void 0:c.isElement(C))?await(c.getScale==null?void 0:c.getScale(C))||{x:1,y:1}:{x:1,y:1},M=ir(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:C,strategy:l}):x);return{top:(y.top-M.top+v.top)/b.y,bottom:(M.bottom-y.bottom+v.bottom)/b.y,left:(y.left-M.left+v.left)/b.x,right:(M.right-y.right+v.right)/b.x}}const kF=e=>({name:"arrow",options:e,async fn(t){const{x:a,y:r,placement:n,rects:c,platform:i,elements:s,middlewareData:l}=t,{element:f,padding:u=0}=u6(e,t)||{};if(f==null)return{};const d=wg(u),h={x:a,y:r},m=Yo(n),v=jo(m),p=await i.getDimensions(f),g=m==="y",y=g?"top":"left",x=g?"bottom":"right",C=g?"clientHeight":"clientWidth",b=c.reference[v]+c.reference[m]-h[m]-c.floating[v],M=h[m]-c.reference[m],w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(f));let z=w?w[C]:0;(!z||!await(i.isElement==null?void 0:i.isElement(w)))&&(z=s.floating[C]||c.floating[v]);const H=b/2-M/2,A=z/2-p[v]/2-1,V=Pr(d[y],A),k=Pr(d[x],A),_=V,N=z-p[v]-k,q=z/2-p[v]/2+H,S=e7(_,q,N),O=!l.arrow&&s4(n)!=null&&q!==S&&c.reference[v]/2-(q<_?V:k)-p[v]/2<0,U=O?q<_?q-_:q-N:0;return{[m]:h[m]+U,data:{[m]:S,centerOffset:q-S-U,...O&&{alignmentOffset:U}},reset:O}}});function HF(e,t,a){return(e?[...a.filter(n=>s4(n)===e),...a.filter(n=>s4(n)!==e)]:a.filter(n=>I4(n)===n)).filter(n=>e?s4(n)===e||(t?xc(n)!==n:!1):!0)}const VF=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var a,r,n;const{rects:c,middlewareData:i,placement:s,platform:l,elements:f}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:h=xu,autoAlignment:m=!0,...v}=u6(e,t),p=d!==void 0||h===xu?HF(d||null,m,h):h,g=await y5(t,v),y=((a=i.autoPlacement)==null?void 0:a.index)||0,x=p[y];if(x==null)return{};const C=zg(x,c,await(l.isRTL==null?void 0:l.isRTL(f.floating)));if(s!==x)return{reset:{placement:p[0]}};const b=[g[I4(x)],g[C[0]],g[C[1]]],M=[...((r=i.autoPlacement)==null?void 0:r.overflows)||[],{placement:x,overflows:b}],w=p[y+1];if(w)return{data:{index:y+1,overflows:M},reset:{placement:w}};const z=M.map(V=>{const k=s4(V.placement);return[V.placement,k&&u?V.overflows.slice(0,2).reduce((_,N)=>_+N,0):V.overflows[0],V.overflows]}).sort((V,k)=>V[1]-k[1]),A=((n=z.filter(V=>V[2].slice(0,s4(V[0])?2:3).every(k=>k<=0))[0])==null?void 0:n[0])||z[0][0];return A!==s?{data:{index:y+1,overflows:M},reset:{placement:A}}:{}}}},LF=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var a,r;const{placement:n,middlewareData:c,rects:i,initialPlacement:s,platform:l,elements:f}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:p=!0,...g}=u6(e,t);if((a=c.arrow)!=null&&a.alignmentOffset)return{};const y=I4(n),x=t6(s),C=I4(s)===s,b=await(l.isRTL==null?void 0:l.isRTL(f.floating)),M=h||(C||!p?[bc(s)]:CF(s)),w=v!=="none";!h&&w&&M.push(...zF(s,p,v,b));const z=[s,...M],H=await y5(t,g),A=[];let V=((r=c.flip)==null?void 0:r.overflows)||[];if(u&&A.push(H[y]),d){const q=zg(n,i,b);A.push(H[q[0]],H[q[1]])}if(V=[...V,{placement:n,overflows:A}],!A.every(q=>q<=0)){var k,_;const q=(((k=c.flip)==null?void 0:k.index)||0)+1,S=z[q];if(S)return{data:{index:q,overflows:V},reset:{placement:S}};let O=(_=V.filter(U=>U.overflows[0]<=0).sort((U,J)=>U.overflows[1]-J.overflows[1])[0])==null?void 0:_.placement;if(!O)switch(m){case"bestFit":{var N;const U=(N=V.filter(J=>{if(w){const Y=t6(J.placement);return Y===x||Y==="y"}return!0}).map(J=>[J.placement,J.overflows.filter(Y=>Y>0).reduce((Y,G)=>Y+G,0)]).sort((J,Y)=>J[1]-Y[1])[0])==null?void 0:N[0];U&&(O=U);break}case"initialPlacement":O=s;break}if(n!==O)return{reset:{placement:O}}}return{}}}};async function SF(e,t){const{placement:a,platform:r,elements:n}=e,c=await(r.isRTL==null?void 0:r.isRTL(n.floating)),i=I4(a),s=s4(a),l=t6(a)==="y",f=["left","top"].includes(i)?-1:1,u=c&&l?-1:1,d=u6(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof v=="number"&&(m=s==="end"?v*-1:v),l?{x:m*u,y:h*f}:{x:h*f,y:m*u}}const AF=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var a,r;const{x:n,y:c,placement:i,middlewareData:s}=t,l=await SF(t,e);return i===((a=s.offset)==null?void 0:a.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:n+l.x,y:c+l.y,data:{...l,placement:i}}}}},TF=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:a,y:r,placement:n}=t,{mainAxis:c=!0,crossAxis:i=!1,limiter:s={fn:g=>{let{x:y,y:x}=g;return{x:y,y:x}}},...l}=u6(e,t),f={x:a,y:r},u=await y5(t,l),d=t6(I4(n)),h=Mg(d);let m=f[h],v=f[d];if(c){const g=h==="y"?"top":"left",y=h==="y"?"bottom":"right",x=m+u[g],C=m-u[y];m=e7(x,m,C)}if(i){const g=d==="y"?"top":"left",y=d==="y"?"bottom":"right",x=v+u[g],C=v-u[y];v=e7(x,v,C)}const p=s.fn({...t,[h]:m,[d]:v});return{...p,data:{x:p.x-a,y:p.y-r,enabled:{[h]:c,[d]:i}}}}}},EF=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var a,r;const{placement:n,rects:c,platform:i,elements:s}=t,{apply:l=()=>{},...f}=u6(e,t),u=await y5(t,f),d=I4(n),h=s4(n),m=t6(n)==="y",{width:v,height:p}=c.floating;let g,y;d==="top"||d==="bottom"?(g=d,y=h===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,g=h==="end"?"top":"bottom");const x=p-u.top-u.bottom,C=v-u.left-u.right,b=Pr(p-u[g],x),M=Pr(v-u[y],C),w=!t.middlewareData.shift;let z=b,H=M;if((a=t.middlewareData.shift)!=null&&a.enabled.x&&(H=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(z=x),w&&!h){const V=A0(u.left,0),k=A0(u.right,0),_=A0(u.top,0),N=A0(u.bottom,0);m?H=v-2*(V!==0||k!==0?V+k:A0(u.left,u.right)):z=p-2*(_!==0||N!==0?_+N:A0(u.top,u.bottom))}await l({...t,availableWidth:H,availableHeight:z});const A=await i.getDimensions(s.floating);return v!==A.width||p!==A.height?{reset:{rects:!0}}:{}}}};function F3(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function N4(e){return F3(e).getComputedStyle(e)}const Cu=Math.min,sr=Math.max,Cc=Math.round;function _g(e){const t=N4(e);let a=parseFloat(t.width),r=parseFloat(t.height);const n=e.offsetWidth,c=e.offsetHeight,i=Cc(a)!==n||Cc(r)!==c;return i&&(a=n,r=c),{width:a,height:r,fallback:i}}function l0(e){return Hg(e)?(e.nodeName||"").toLowerCase():""}let i8;function kg(){if(i8)return i8;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(i8=e.brands.map(t=>t.brand+"/"+t.version).join(" "),i8):navigator.userAgent}function D4(e){return e instanceof F3(e).HTMLElement}function e0(e){return e instanceof F3(e).Element}function Hg(e){return e instanceof F3(e).Node}function Mu(e){return typeof ShadowRoot>"u"?!1:e instanceof F3(e).ShadowRoot||e instanceof ShadowRoot}function x5(e){const{overflow:t,overflowX:a,overflowY:r,display:n}=N4(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+a)&&!["inline","contents"].includes(n)}function NF(e){return["table","td","th"].includes(l0(e))}function t7(e){const t=/firefox/i.test(kg()),a=N4(e),r=a.backdropFilter||a.WebkitBackdropFilter;return a.transform!=="none"||a.perspective!=="none"||!!r&&r!=="none"||t&&a.willChange==="filter"||t&&!!a.filter&&a.filter!=="none"||["transform","perspective"].some(n=>a.willChange.includes(n))||["paint","layout","strict","content"].some(n=>{const c=a.contain;return c!=null&&c.includes(n)})}function Vg(){return!/^((?!chrome|android).)*safari/i.test(kg())}function Go(e){return["html","body","#document"].includes(l0(e))}function Lg(e){return e0(e)?e:e.contextElement}const Sg={x:1,y:1};function U6(e){const t=Lg(e);if(!D4(t))return Sg;const a=t.getBoundingClientRect(),{width:r,height:n,fallback:c}=_g(t);let i=(c?Cc(a.width):a.width)/r,s=(c?Cc(a.height):a.height)/n;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}function Br(e,t,a,r){var n,c;t===void 0&&(t=!1),a===void 0&&(a=!1);const i=e.getBoundingClientRect(),s=Lg(e);let l=Sg;t&&(r?e0(r)&&(l=U6(r)):l=U6(e));const f=s?F3(s):window,u=!Vg()&&a;let d=(i.left+(u&&((n=f.visualViewport)==null?void 0:n.offsetLeft)||0))/l.x,h=(i.top+(u&&((c=f.visualViewport)==null?void 0:c.offsetTop)||0))/l.y,m=i.width/l.x,v=i.height/l.y;if(s){const p=F3(s),g=r&&e0(r)?F3(r):r;let y=p.frameElement;for(;y&&r&&g!==p;){const x=U6(y),C=y.getBoundingClientRect(),b=getComputedStyle(y);C.x+=(y.clientLeft+parseFloat(b.paddingLeft))*x.x,C.y+=(y.clientTop+parseFloat(b.paddingTop))*x.y,d*=x.x,h*=x.y,m*=x.x,v*=x.y,d+=C.x,h+=C.y,y=F3(y).frameElement}}return{width:m,height:v,top:h,right:d+m,bottom:h+v,left:d,x:d,y:h}}function t0(e){return((Hg(e)?e.ownerDocument:e.document)||window.document).documentElement}function b5(e){return e0(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ag(e){return Br(t0(e)).left+b5(e).scrollLeft}function Fr(e){if(l0(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Mu(e)&&e.host||t0(e);return Mu(t)?t.host:t}function Tg(e){const t=Fr(e);return Go(t)?t.ownerDocument.body:D4(t)&&x5(t)?t:Tg(t)}function Mc(e,t){var a;t===void 0&&(t=[]);const r=Tg(e),n=r===((a=e.ownerDocument)==null?void 0:a.body),c=F3(r);return n?t.concat(c,c.visualViewport||[],x5(r)?r:[]):t.concat(r,Mc(r))}function zu(e,t,a){return t==="viewport"?ir(function(r,n){const c=F3(r),i=t0(r),s=c.visualViewport;let l=i.clientWidth,f=i.clientHeight,u=0,d=0;if(s){l=s.width,f=s.height;const h=Vg();(h||!h&&n==="fixed")&&(u=s.offsetLeft,d=s.offsetTop)}return{width:l,height:f,x:u,y:d}}(e,a)):e0(t)?ir(function(r,n){const c=Br(r,!0,n==="fixed"),i=c.top+r.clientTop,s=c.left+r.clientLeft,l=D4(r)?U6(r):{x:1,y:1};return{width:r.clientWidth*l.x,height:r.clientHeight*l.y,x:s*l.x,y:i*l.y}}(t,a)):ir(function(r){const n=t0(r),c=b5(r),i=r.ownerDocument.body,s=sr(n.scrollWidth,n.clientWidth,i.scrollWidth,i.clientWidth),l=sr(n.scrollHeight,n.clientHeight,i.scrollHeight,i.clientHeight);let f=-c.scrollLeft+Ag(r);const u=-c.scrollTop;return N4(i).direction==="rtl"&&(f+=sr(n.clientWidth,i.clientWidth)-s),{width:s,height:l,x:f,y:u}}(t0(e)))}function wu(e){return D4(e)&&N4(e).position!=="fixed"?e.offsetParent:null}function _u(e){const t=F3(e);let a=wu(e);for(;a&&NF(a)&&N4(a).position==="static";)a=wu(a);return a&&(l0(a)==="html"||l0(a)==="body"&&N4(a).position==="static"&&!t7(a))?t:a||function(r){let n=Fr(r);for(;D4(n)&&!Go(n);){if(t7(n))return n;n=Fr(n)}return null}(e)||t}function DF(e,t,a){const r=D4(t),n=t0(t),c=Br(e,!0,a==="fixed",t);let i={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&a!=="fixed")if((l0(t)!=="body"||x5(n))&&(i=b5(t)),D4(t)){const l=Br(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else n&&(s.x=Ag(n));return{x:c.left+i.scrollLeft-s.x,y:c.top+i.scrollTop-s.y,width:c.width,height:c.height}}const OF={getClippingRect:function(e){let{element:t,boundary:a,rootBoundary:r,strategy:n}=e;const c=a==="clippingAncestors"?function(f,u){const d=u.get(f);if(d)return d;let h=Mc(f).filter(g=>e0(g)&&l0(g)!=="body"),m=null;const v=N4(f).position==="fixed";let p=v?Fr(f):f;for(;e0(p)&&!Go(p);){const g=N4(p),y=t7(p);(v?y||m:y||g.position!=="static"||!m||!["absolute","fixed"].includes(m.position))?m=g:h=h.filter(x=>x!==p),p=Fr(p)}return u.set(f,h),h}(t,this._c):[].concat(a),i=[...c,r],s=i[0],l=i.reduce((f,u)=>{const d=zu(t,u,n);return f.top=sr(d.top,f.top),f.right=Cu(d.right,f.right),f.bottom=Cu(d.bottom,f.bottom),f.left=sr(d.left,f.left),f},zu(t,s,n));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:a,strategy:r}=e;const n=D4(a),c=t0(a);if(a===c)return t;let i={scrollLeft:0,scrollTop:0},s={x:1,y:1};const l={x:0,y:0};if((n||!n&&r!=="fixed")&&((l0(a)!=="body"||x5(c))&&(i=b5(a)),D4(a))){const f=Br(a);s=U6(a),l.x=f.x+a.clientLeft,l.y=f.y+a.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-i.scrollLeft*s.x+l.x,y:t.y*s.y-i.scrollTop*s.y+l.y}},isElement:e0,getDimensions:function(e){return D4(e)?_g(e):e.getBoundingClientRect()},getOffsetParent:_u,getDocumentElement:t0,getScale:U6,async getElementRects(e){let{reference:t,floating:a,strategy:r}=e;const n=this.getOffsetParent||_u,c=this.getDimensions;return{reference:DF(t,await n(a),r),floating:{x:0,y:0,...await c(a)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>N4(e).direction==="rtl"},PF=(e,t,a)=>{const r=new Map,n={platform:OF,...a},c={...n.platform,_c:r};return _F(e,t,{...n,platform:c})};function Eg(e,t){for(const a in t)Object.prototype.hasOwnProperty.call(t,a)&&(typeof t[a]=="object"&&e[a]?Eg(e[a],t[a]):e[a]=t[a])}const o4={disabled:!1,distance:5,skidding:0,container:"body",boundary:void 0,instantMove:!1,disposeTimeout:150,popperTriggers:[],strategy:"absolute",preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,autoHideOnMousedown:!1,themes:{tooltip:{placement:"top",triggers:["hover","focus","touch"],hideTriggers:e=>[...e,"click"],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:"..."},dropdown:{placement:"bottom",triggers:["click"],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:"dropdown",triggers:["hover","focus"],popperTriggers:["hover"],delay:{show:0,hide:400}}}};function Rr(e,t){let a=o4.themes[e]||{},r;do r=a[t],typeof r>"u"?a.$extend?a=o4.themes[a.$extend]||{}:(a=null,r=o4[t]):a=null;while(a);return r}function BF(e){const t=[e];let a=o4.themes[e]||{};do a.$extend&&!a.$resetCss?(t.push(a.$extend),a=o4.themes[a.$extend]||{}):a=null;while(a);return t.map(r=>`v-popper--theme-${r}`)}function ku(e){const t=[e];let a=o4.themes[e]||{};do a.$extend?(t.push(a.$extend),a=o4.themes[a.$extend]||{}):a=null;while(a);return t}let X6=!1;if(typeof window<"u"){X6=!1;try{const e=Object.defineProperty({},"passive",{get(){X6=!0}});window.addEventListener("test",null,e)}catch{}}let Ng=!1;typeof window<"u"&&typeof navigator<"u"&&(Ng=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const Dg=["auto","top","bottom","left","right"].reduce((e,t)=>e.concat([t,`${t}-start`,`${t}-end`]),[]),Hu={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},Vu={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function Lu(e,t){const a=e.indexOf(t);a!==-1&&e.splice(a,1)}function Ai(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}const Q3=[];let _0=null;const Su={};function Au(e){let t=Su[e];return t||(t=Su[e]=[]),t}let a7=function(){};typeof window<"u"&&(a7=window.Element);function p2(e){return function(t){return Rr(t.theme,e)}}const Ti="__floating-vue__popper",Og=()=>o.defineComponent({name:"VPopper",provide(){return{[Ti]:{parentPopper:this}}},inject:{[Ti]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:p2("disabled")},positioningDisabled:{type:Boolean,default:p2("positioningDisabled")},placement:{type:String,default:p2("placement"),validator:e=>Dg.includes(e)},delay:{type:[String,Number,Object],default:p2("delay")},distance:{type:[Number,String],default:p2("distance")},skidding:{type:[Number,String],default:p2("skidding")},triggers:{type:Array,default:p2("triggers")},showTriggers:{type:[Array,Function],default:p2("showTriggers")},hideTriggers:{type:[Array,Function],default:p2("hideTriggers")},popperTriggers:{type:Array,default:p2("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:p2("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:p2("popperHideTriggers")},container:{type:[String,Object,a7,Boolean],default:p2("container")},boundary:{type:[String,a7],default:p2("boundary")},strategy:{type:String,validator:e=>["absolute","fixed"].includes(e),default:p2("strategy")},autoHide:{type:[Boolean,Function],default:p2("autoHide")},handleResize:{type:Boolean,default:p2("handleResize")},instantMove:{type:Boolean,default:p2("instantMove")},eagerMount:{type:Boolean,default:p2("eagerMount")},popperClass:{type:[String,Array,Object],default:p2("popperClass")},computeTransformOrigin:{type:Boolean,default:p2("computeTransformOrigin")},autoMinSize:{type:Boolean,default:p2("autoMinSize")},autoSize:{type:[Boolean,String],default:p2("autoSize")},autoMaxSize:{type:Boolean,default:p2("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:p2("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:p2("preventOverflow")},overflowPadding:{type:[Number,String],default:p2("overflowPadding")},arrowPadding:{type:[Number,String],default:p2("arrowPadding")},arrowOverflow:{type:Boolean,default:p2("arrowOverflow")},flip:{type:Boolean,default:p2("flip")},shift:{type:Boolean,default:p2("shift")},shiftCrossAxis:{type:Boolean,default:p2("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:p2("noAutoFocus")},disposeTimeout:{type:Number,default:p2("disposeTimeout")}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:"",strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},randomId:`popper_${[Math.random(),Date.now()].map(e=>e.toString(36).substring(2,10)).join("_")}`,shownChildren:new Set,lastAutoHide:!0,pendingHide:!1,containsGlobalTarget:!1,isDisposed:!0,mouseDownContains:!1}},computed:{popperId(){return this.ariaId!=null?this.ariaId:this.randomId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide=="function"?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:{...this.classes,popperClass:this.popperClass},result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){var e;return(e=this[Ti])==null?void 0:e.parentPopper},hasPopperShowTriggerHover(){var e,t;return((e=this.popperTriggers)==null?void 0:e.includes("hover"))||((t=this.popperShowTriggers)==null?void 0:t.includes("hover"))}},watch:{shown:"$_autoShowHide",disabled(e){e?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())},triggers:{handler:"$_refreshListeners",deep:!0},positioningDisabled:"$_refreshListeners",...["placement","distance","skidding","boundary","strategy","overflowPadding","arrowPadding","preventOverflow","shift","shiftCrossAxis","flip"].reduce((e,t)=>(e[t]="$_computePosition",e),{})},created(){this.autoMinSize&&console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'),this.autoMaxSize&&console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.")},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:e=null,skipDelay:t=!1,force:a=!1}={}){var r,n;(r=this.parentPopper)!=null&&r.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(a||!this.disabled)&&(((n=this.parentPopper)==null?void 0:n.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(e,t),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit("update:shown",!0))},hide({event:e=null,skipDelay:t=!1}={}){var a;if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:t}),this.parentPopper.lockedChild=null)},1e3));return}((a=this.parentPopper)==null?void 0:a.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.pendingHide=!1,this.$_scheduleHide(e,t),this.$emit("hide"),this.$emit("update:shown",!1)}},init(){var e;this.isDisposed&&(this.isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=((e=this.referenceNode)==null?void 0:e.call(this))??this.$el,this.$_targetNodes=this.targetNodes().filter(t=>t.nodeType===t.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(".v-popper__inner"),this.$_arrowNode=this.$_popperNode.querySelector(".v-popper__arrow-container"),this.$_swapTargetAttrs("title","data-original-title"),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.isDisposed||(this.isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs("data-original-title","title"))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit("resize"))},async $_computePosition(){if(this.isDisposed||this.positioningDisabled)return;const e={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&e.middleware.push(AF({mainAxis:this.distance,crossAxis:this.skidding}));const t=this.placement.startsWith("auto");if(t?e.middleware.push(VF({alignment:this.placement.split("-")[1]??""})):e.placement=this.placement,this.preventOverflow&&(this.shift&&e.middleware.push(TF({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!t&&this.flip&&e.middleware.push(LF({padding:this.overflowPadding,boundary:this.boundary}))),e.middleware.push(kF({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&e.middleware.push({name:"arrowOverflow",fn:({placement:r,rects:n,middlewareData:c})=>{let i;const{centerOffset:s}=c.arrow;return r.startsWith("top")||r.startsWith("bottom")?i=Math.abs(s)>n.reference.width/2:i=Math.abs(s)>n.reference.height/2,{data:{overflow:i}}}}),this.autoMinSize||this.autoSize){const r=this.autoSize?this.autoSize:this.autoMinSize?"min":null;e.middleware.push({name:"autoSize",fn:({rects:n,placement:c,middlewareData:i})=>{var s;if((s=i.autoSize)!=null&&s.skip)return{};let l,f;return c.startsWith("top")||c.startsWith("bottom")?l=n.reference.width:f=n.reference.height,this.$_innerNode.style[r==="min"?"minWidth":r==="max"?"maxWidth":"width"]=l!=null?`${l}px`:null,this.$_innerNode.style[r==="min"?"minHeight":r==="max"?"maxHeight":"height"]=f!=null?`${f}px`:null,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,e.middleware.push(EF({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:r,availableHeight:n})=>{this.$_innerNode.style.maxWidth=r!=null?`${r}px`:null,this.$_innerNode.style.maxHeight=n!=null?`${n}px`:null}})));const a=await PF(this.$_referenceNode,this.$_popperNode,e);Object.assign(this.result,{x:a.x,y:a.y,placement:a.placement,strategy:a.strategy,arrow:{...a.middlewareData.arrow,...a.middlewareData.arrowOverflow}})},$_scheduleShow(e,t=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),_0&&this.instantMove&&_0.instantMove&&_0!==this.parentPopper){_0.$_applyHide(!0),this.$_applyShow(!0);return}t?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay("show"))},$_scheduleHide(e,t=!1){if(this.shownChildren.size>0){this.pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(_0=this),t?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay("hide"))},$_computeDelay(e){const t=this.delay;return parseInt(t&&t[e]||t||0)},async $_applyShow(e=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=e,!this.isShown&&(this.$_ensureTeleport(),await Ai(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...Mc(this.$_referenceNode),...Mc(this.$_popperNode)],"scroll",()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){const t=this.$_referenceNode.getBoundingClientRect(),a=this.$_popperNode.querySelector(".v-popper__wrapper"),r=a.parentNode.getBoundingClientRect(),n=t.x+t.width/2-(r.left+a.offsetLeft),c=t.y+t.height/2-(r.top+a.offsetTop);this.result.transformOrigin=`${n}px ${c}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":""});const e=this.showGroup;if(e){let t;for(let a=0;a<Q3.length;a++)t=Q3[a],t.showGroup!==e&&(t.hide(),t.$emit("close-group"))}Q3.push(this),document.body.classList.add("v-popper--some-open");for(const t of ku(this.theme))Au(t).push(this),document.body.classList.add(`v-popper--some-open--${t}`);this.$emit("apply-show"),this.classes.showFrom=!0,this.classes.showTo=!1,this.classes.hideFrom=!1,this.classes.hideTo=!1,await Ai(),this.classes.showFrom=!1,this.classes.showTo=!0,this.noAutoFocus||this.$_popperNode.focus()},async $_applyHide(e=!1){if(this.shownChildren.size>0){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=e,Lu(Q3,this),Q3.length===0&&document.body.classList.remove("v-popper--some-open");for(const a of ku(this.theme)){const r=Au(a);Lu(r,this),r.length===0&&document.body.classList.remove(`v-popper--some-open--${a}`)}_0===this&&(_0=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);const t=this.disposeTimeout;t!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},t)),this.$_removeEventListeners("scroll"),this.$emit("apply-hide"),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await Ai(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.isDisposed)return;let e=this.container;if(typeof e=="string"?e=window.document.querySelector(e):e===!1&&(e=this.$_targetNodes[0].parentNode),!e)throw new Error("No container for popover: "+this.container);e.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){const e=a=>{this.isShown&&!this.$_hideInProgress||(a.usedByTooltip=!0,!this.$_preventShow&&this.show({event:a}))};this.$_registerTriggerListeners(this.$_targetNodes,Hu,this.triggers,this.showTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],Hu,this.popperTriggers,this.popperShowTriggers,e);const t=a=>{a.usedByTooltip||this.hide({event:a})};this.$_registerTriggerListeners(this.$_targetNodes,Vu,this.triggers,this.hideTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],Vu,this.popperTriggers,this.popperHideTriggers,t)},$_registerEventListeners(e,t,a){this.$_events.push({targetNodes:e,eventType:t,handler:a}),e.forEach(r=>r.addEventListener(t,a,X6?{passive:!0}:void 0))},$_registerTriggerListeners(e,t,a,r,n){let c=a;r!=null&&(c=typeof r=="function"?r(c):r),c.forEach(i=>{const s=t[i];s&&this.$_registerEventListeners(e,s,n)})},$_removeEventListeners(e){const t=[];this.$_events.forEach(a=>{const{targetNodes:r,eventType:n,handler:c}=a;!e||e===n?r.forEach(i=>i.removeEventListener(n,c)):t.push(a)}),this.$_events=t},$_refreshListeners(){this.isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(e,t=!1){this.$_showFrameLocked||(this.hide({event:e}),e.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),t&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(e,t){for(const a of this.$_targetNodes){const r=a.getAttribute(e);r&&(a.removeAttribute(e),a.setAttribute(t,r))}},$_applyAttrsToTarget(e){for(const t of this.$_targetNodes)for(const a in e){const r=e[a];r==null?t.removeAttribute(a):t.setAttribute(a,r)}},$_updateParentShownChildren(e){let t=this.parentPopper;for(;t;)e?t.shownChildren.add(this.randomId):(t.shownChildren.delete(this.randomId),t.pendingHide&&t.hide()),t=t.parentPopper},$_isAimingPopper(){const e=this.$_referenceNode.getBoundingClientRect();if(or>=e.left&&or<=e.right&&lr>=e.top&&lr<=e.bottom){const t=this.$_popperNode.getBoundingClientRect(),a=or-Bt,r=lr-Ft,n=t.left+t.width/2-Bt+(t.top+t.height/2)-Ft+t.width+t.height,c=Bt+a*n,i=Ft+r*n;return s8(Bt,Ft,c,i,t.left,t.top,t.left,t.bottom)||s8(Bt,Ft,c,i,t.left,t.top,t.right,t.top)||s8(Bt,Ft,c,i,t.right,t.top,t.right,t.bottom)||s8(Bt,Ft,c,i,t.left,t.bottom,t.right,t.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<"u"&&typeof window<"u"){if(Ng){const e=X6?{passive:!0,capture:!0}:!0;document.addEventListener("touchstart",t=>Tu(t,!0),e),document.addEventListener("touchend",t=>Eu(t,!0),e)}else window.addEventListener("mousedown",e=>Tu(e,!1),!0),window.addEventListener("click",e=>Eu(e,!1),!0);window.addEventListener("resize",RF)}function Tu(e,t){if(o4.autoHideOnMousedown)Pg(e,t);else for(let a=0;a<Q3.length;a++){const r=Q3[a];try{r.mouseDownContains=r.popperNode().contains(e.target)}catch{}}}function Eu(e,t){o4.autoHideOnMousedown||Pg(e,t)}function Pg(e,t){const a={};for(let r=Q3.length-1;r>=0;r--){const n=Q3[r];try{const c=n.containsGlobalTarget=n.mouseDownContains||n.popperNode().contains(e.target);n.pendingHide=!1,requestAnimationFrame(()=>{if(n.pendingHide=!1,!a[n.randomId]&&Nu(n,c,e)){if(n.$_handleGlobalClose(e,t),!e.closeAllPopover&&e.closePopover&&c){let s=n.parentPopper;for(;s;)a[s.randomId]=!0,s=s.parentPopper;return}let i=n.parentPopper;for(;i&&Nu(i,i.containsGlobalTarget,e);)i.$_handleGlobalClose(e,t),i=i.parentPopper}})}catch{}}}function Nu(e,t,a){return a.closeAllPopover||a.closePopover&&t||FF(e,a)&&!t}function FF(e,t){if(typeof e.autoHide=="function"){const a=e.autoHide(t);return e.lastAutoHide=a,a}return e.autoHide}function RF(){for(let e=0;e<Q3.length;e++)Q3[e].$_computePosition()}let Bt=0,Ft=0,or=0,lr=0;typeof window<"u"&&window.addEventListener("mousemove",e=>{Bt=or,Ft=lr,or=e.clientX,lr=e.clientY},X6?{passive:!0}:void 0);function s8(e,t,a,r,n,c,i,s){const l=((i-n)*(t-c)-(s-c)*(e-n))/((s-c)*(a-e)-(i-n)*(r-t)),f=((a-e)*(t-c)-(r-t)*(e-n))/((s-c)*(a-e)-(i-n)*(r-t));return l>=0&&l<=1&&f>=0&&f<=1}const IF={extends:Og()},C5=(e,t)=>{const a=e.__vccOpts||e;for(const[r,n]of t)a[r]=n;return a};function $F(e,t,a,r,n,c){return o.openBlock(),o.createElementBlock("div",{ref:"reference",class:o.normalizeClass(["v-popper",{"v-popper--shown":e.slotData.isShown}])},[o.renderSlot(e.$slots,"default",o.normalizeProps(o.guardReactiveProps(e.slotData)))],2)}const UF=C5(IF,[["render",$F]]);function WF(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var a=e.indexOf("Trident/");if(a>0){var r=e.indexOf("rv:");return parseInt(e.substring(r+3,e.indexOf(".",r)),10)}var n=e.indexOf("Edge/");return n>0?parseInt(e.substring(n+5,e.indexOf(".",n)),10):-1}let I8;function r7(){r7.init||(r7.init=!0,I8=WF()!==-1)}var M5={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){r7(),o.nextTick(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",I8&&this.$el.appendChild(e),e.data="about:blank",I8||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!I8&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const qF=o.withScopeId("data-v-b329ee4c");o.pushScopeId("data-v-b329ee4c");const jF={class:"resize-observer",tabindex:"-1"};o.popScopeId();const YF=qF((e,t,a,r,n,c)=>(o.openBlock(),o.createBlock("div",jF)));M5.render=YF;M5.__scopeId="data-v-b329ee4c";M5.__file="src/components/ResizeObserver.vue";const Bg=(e="theme")=>({computed:{themeClass(){return BF(this[e])}}}),GF=o.defineComponent({name:"VPopperContent",components:{ResizeObserver:M5},mixins:[Bg()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:["hide","resize"],methods:{toPx(e){return e!=null&&!isNaN(e)?`${e}px`:null}}}),XF=["id","aria-hidden","tabindex","data-popper-placement"],KF={ref:"inner",class:"v-popper__inner"},ZF=o.createElementVNode("div",{class:"v-popper__arrow-outer"},null,-1),QF=o.createElementVNode("div",{class:"v-popper__arrow-inner"},null,-1),JF=[ZF,QF];function eR(e,t,a,r,n,c){const i=o.resolveComponent("ResizeObserver");return o.openBlock(),o.createElementBlock("div",{id:e.popperId,ref:"popover",class:o.normalizeClass(["v-popper__popper",[e.themeClass,e.classes.popperClass,{"v-popper__popper--shown":e.shown,"v-popper__popper--hidden":!e.shown,"v-popper__popper--show-from":e.classes.showFrom,"v-popper__popper--show-to":e.classes.showTo,"v-popper__popper--hide-from":e.classes.hideFrom,"v-popper__popper--hide-to":e.classes.hideTo,"v-popper__popper--skip-transition":e.skipTransition,"v-popper__popper--arrow-overflow":e.result&&e.result.arrow.overflow,"v-popper__popper--no-positioning":!e.result}]]),style:o.normalizeStyle(e.result?{position:e.result.strategy,transform:`translate3d(${Math.round(e.result.x)}px,${Math.round(e.result.y)}px,0)`}:void 0),"aria-hidden":e.shown?"false":"true",tabindex:e.autoHide?0:void 0,"data-popper-placement":e.result?e.result.placement:void 0,onKeyup:t[2]||(t[2]=o.withKeys(s=>e.autoHide&&e.$emit("hide"),["esc"]))},[o.createElementVNode("div",{class:"v-popper__backdrop",onClick:t[0]||(t[0]=s=>e.autoHide&&e.$emit("hide"))}),o.createElementVNode("div",{class:"v-popper__wrapper",style:o.normalizeStyle(e.result?{transformOrigin:e.result.transformOrigin}:void 0)},[o.createElementVNode("div",KF,[e.mounted?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("div",null,[o.renderSlot(e.$slots,"default")]),e.handleResize?(o.openBlock(),o.createBlock(i,{key:0,onNotify:t[1]||(t[1]=s=>e.$emit("resize",s))})):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0)],512),o.createElementVNode("div",{ref:"arrow",class:"v-popper__arrow-container",style:o.normalizeStyle(e.result?{left:e.toPx(e.result.arrow.x),top:e.toPx(e.result.arrow.y)}:void 0)},JF,4)],4)],46,XF)}const Fg=C5(GF,[["render",eR]]),Rg={methods:{show(...e){return this.$refs.popper.show(...e)},hide(...e){return this.$refs.popper.hide(...e)},dispose(...e){return this.$refs.popper.dispose(...e)},onResize(...e){return this.$refs.popper.onResize(...e)}}};let n7=function(){};typeof window<"u"&&(n7=window.Element);const tR=o.defineComponent({name:"VPopperWrapper",components:{Popper:UF,PopperContent:Fg},mixins:[Rg,Bg("finalTheme")],props:{theme:{type:String,default:null},referenceNode:{type:Function,default:null},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:void 0},positioningDisabled:{type:Boolean,default:void 0},placement:{type:String,default:void 0},delay:{type:[String,Number,Object],default:void 0},distance:{type:[Number,String],default:void 0},skidding:{type:[Number,String],default:void 0},triggers:{type:Array,default:void 0},showTriggers:{type:[Array,Function],default:void 0},hideTriggers:{type:[Array,Function],default:void 0},popperTriggers:{type:Array,default:void 0},popperShowTriggers:{type:[Array,Function],default:void 0},popperHideTriggers:{type:[Array,Function],default:void 0},container:{type:[String,Object,n7,Boolean],default:void 0},boundary:{type:[String,n7],default:void 0},strategy:{type:String,default:void 0},autoHide:{type:[Boolean,Function],default:void 0},handleResize:{type:Boolean,default:void 0},instantMove:{type:Boolean,default:void 0},eagerMount:{type:Boolean,default:void 0},popperClass:{type:[String,Array,Object],default:void 0},computeTransformOrigin:{type:Boolean,default:void 0},autoMinSize:{type:Boolean,default:void 0},autoSize:{type:[Boolean,String],default:void 0},autoMaxSize:{type:Boolean,default:void 0},autoBoundaryMaxSize:{type:Boolean,default:void 0},preventOverflow:{type:Boolean,default:void 0},overflowPadding:{type:[Number,String],default:void 0},arrowPadding:{type:[Number,String],default:void 0},arrowOverflow:{type:Boolean,default:void 0},flip:{type:Boolean,default:void 0},shift:{type:Boolean,default:void 0},shiftCrossAxis:{type:Boolean,default:void 0},noAutoFocus:{type:Boolean,default:void 0},disposeTimeout:{type:Number,default:void 0}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},computed:{finalTheme(){return this.theme??this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(e=>e!==this.$refs.popperContent.$el)}}});function aR(e,t,a,r,n,c){const i=o.resolveComponent("PopperContent"),s=o.resolveComponent("Popper");return o.openBlock(),o.createBlock(s,o.mergeProps({ref:"popper"},e.$props,{theme:e.finalTheme,"target-nodes":e.getTargetNodes,"popper-node":()=>e.$refs.popperContent.$el,class:[e.themeClass],onShow:t[0]||(t[0]=()=>e.$emit("show")),onHide:t[1]||(t[1]=()=>e.$emit("hide")),"onUpdate:shown":t[2]||(t[2]=l=>e.$emit("update:shown",l)),onApplyShow:t[3]||(t[3]=()=>e.$emit("apply-show")),onApplyHide:t[4]||(t[4]=()=>e.$emit("apply-hide")),onCloseGroup:t[5]||(t[5]=()=>e.$emit("close-group")),onCloseDirective:t[6]||(t[6]=()=>e.$emit("close-directive")),onAutoHide:t[7]||(t[7]=()=>e.$emit("auto-hide")),onResize:t[8]||(t[8]=()=>e.$emit("resize"))}),{default:o.withCtx(({popperId:l,isShown:f,shouldMountContent:u,skipTransition:d,autoHide:h,show:m,hide:v,handleResize:p,onResize:g,classes:y,result:x})=>[o.renderSlot(e.$slots,"default",{shown:f,show:m,hide:v}),o.createVNode(i,{ref:"popperContent","popper-id":l,theme:e.finalTheme,shown:f,mounted:u,"skip-transition":d,"auto-hide":h,"handle-resize":p,classes:y,result:x,onHide:v,onResize:g},{default:o.withCtx(()=>[o.renderSlot(e.$slots,"popper",{shown:f,hide:v})]),_:2},1032,["popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:3},16,["theme","target-nodes","popper-node","class"])}const Xo=C5(tR,[["render",aR]]),rR={...Xo,name:"VDropdown",vPopperTheme:"dropdown"},nR={...Xo,name:"VMenu",vPopperTheme:"menu"},cR={...Xo,name:"VTooltip",vPopperTheme:"tooltip"},iR=o.defineComponent({name:"VTooltipDirective",components:{Popper:Og(),PopperContent:Fg},mixins:[Rg],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:e=>Rr(e.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e=>Rr(e.theme,"loadingContent")},targetNodes:{type:Function,required:!0}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content=="function"},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(e){if(typeof this.content=="function"&&this.$_isShown&&(e||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;const t=++this.$_fetchId,a=this.content(this);a.then?a.then(r=>this.onResult(t,r)):this.onResult(t,a)}},onResult(e,t){e===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=t)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}}),sR=["innerHTML"],oR=["textContent"];function lR(e,t,a,r,n,c){const i=o.resolveComponent("PopperContent"),s=o.resolveComponent("Popper");return o.openBlock(),o.createBlock(s,o.mergeProps({ref:"popper"},e.$attrs,{theme:e.theme,"target-nodes":e.targetNodes,"popper-node":()=>e.$refs.popperContent.$el,onApplyShow:e.onShow,onApplyHide:e.onHide}),{default:o.withCtx(({popperId:l,isShown:f,shouldMountContent:u,skipTransition:d,autoHide:h,hide:m,handleResize:v,onResize:p,classes:g,result:y})=>[o.createVNode(i,{ref:"popperContent",class:o.normalizeClass({"v-popper--tooltip-loading":e.loading}),"popper-id":l,theme:e.theme,shown:f,mounted:u,"skip-transition":d,"auto-hide":h,"handle-resize":v,classes:g,result:y,onHide:m,onResize:p},{default:o.withCtx(()=>[e.html?(o.openBlock(),o.createElementBlock("div",{key:0,innerHTML:e.finalContent},null,8,sR)):(o.openBlock(),o.createElementBlock("div",{key:1,textContent:o.toDisplayString(e.finalContent)},null,8,oR))]),_:2},1032,["class","popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:1},16,["theme","target-nodes","popper-node","onApplyShow","onApplyHide"])}const fR=C5(iR,[["render",lR]]),Ig="v-popper--has-tooltip";function uR(e,t){let a=e.placement;if(!a&&t)for(const r of Dg)t[r]&&(a=r);return a||(a=Rr(e.theme||"tooltip","placement")),a}function $g(e,t,a){let r;const n=typeof t;return n==="string"?r={content:t}:t&&n==="object"?r=t:r={content:!1},r.placement=uR(r,a),r.targetNodes=()=>[e],r.referenceNode=()=>e,r}let Ei,Ir,dR=0;function hR(){if(Ei)return;Ir=o.ref([]),Ei=o.createApp({name:"VTooltipDirectiveApp",setup(){return{directives:Ir}},render(){return this.directives.map(t=>o.h(fR,{...t.options,shown:t.shown||t.options.shown,key:t.id}))},devtools:{hide:!0}});const e=document.createElement("div");document.body.appendChild(e),Ei.mount(e)}function mR(e,t,a){hR();const r=o.ref($g(e,t,a)),n=o.ref(!1),c={id:dR++,options:r,shown:n};return Ir.value.push(c),e.classList&&e.classList.add(Ig),e.$_popper={options:r,item:c,show(){n.value=!0},hide(){n.value=!1}}}function Ug(e){if(e.$_popper){const t=Ir.value.indexOf(e.$_popper.item);t!==-1&&Ir.value.splice(t,1),delete e.$_popper,delete e.$_popperOldShown,delete e.$_popperMountTarget}e.classList&&e.classList.remove(Ig)}function Du(e,{value:t,modifiers:a}){const r=$g(e,t,a);if(!r.content||Rr(r.theme||"tooltip","disabled"))Ug(e);else{let n;e.$_popper?(n=e.$_popper,n.options.value=r):n=mR(e,t,a),typeof t.shown<"u"&&t.shown!==e.$_popperOldShown&&(e.$_popperOldShown=t.shown,t.shown?n.show():n.hide())}}const pR={beforeMount:Du,updated:Du,beforeUnmount(e){Ug(e)}};function Ou(e){e.addEventListener("mousedown",zc),e.addEventListener("click",zc),e.addEventListener("touchstart",Wg,X6?{passive:!0}:!1)}function Pu(e){e.removeEventListener("mousedown",zc),e.removeEventListener("click",zc),e.removeEventListener("touchstart",Wg),e.removeEventListener("touchend",qg),e.removeEventListener("touchcancel",jg)}function zc(e){const t=e.currentTarget;e.closePopover=!t.$_vclosepopover_touch,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}function Wg(e){if(e.changedTouches.length===1){const t=e.currentTarget;t.$_vclosepopover_touch=!0;const a=e.changedTouches[0];t.$_vclosepopover_touchPoint=a,t.addEventListener("touchend",qg),t.addEventListener("touchcancel",jg)}}function qg(e){const t=e.currentTarget;if(t.$_vclosepopover_touch=!1,e.changedTouches.length===1){const a=e.changedTouches[0],r=t.$_vclosepopover_touchPoint;e.closePopover=Math.abs(a.screenY-r.screenY)<20&&Math.abs(a.screenX-r.screenX)<20,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}}function jg(e){const t=e.currentTarget;t.$_vclosepopover_touch=!1}const vR={beforeMount(e,{value:t,modifiers:a}){e.$_closePopoverModifiers=a,(typeof t>"u"||t)&&Ou(e)},updated(e,{value:t,oldValue:a,modifiers:r}){e.$_closePopoverModifiers=r,t!==a&&(typeof t>"u"||t?Ou(e):Pu(e))},beforeUnmount(e){Pu(e)}};function gR(e,t={}){e.$_vTooltipInstalled||(e.$_vTooltipInstalled=!0,Eg(o4,t),e.directive("tooltip",pR),e.directive("close-popper",vR),e.component("VTooltip",cR),e.component("VDropdown",rR),e.component("VMenu",nR))}const yR={version:"5.2.2",install:gR,options:o4},xR={themes:{tooltip:{triggers:["hover","focus","touch"],hideTriggers:e=>[...e]}}},bR={class:"pga-badge"},CR=o.defineComponent({__name:"PgaBadge",props:{text:{},icon:{},color:{default:"primary"},backgroundColor:{}},setup(e){o.useCssVars(r=>({"808382a8":a.value.color,"71bf3ede":a.value.backgroundColor}));const t=e,a=o.computed(()=>mn(t.color)?{color:`var(--pga-color-${t.color}-contrast)`,backgroundColor:t.backgroundColor||`var(--pga-color-${t.color})`}:{color:t.color,backgroundColor:t.backgroundColor});return(r,n)=>(o.openBlock(),o.createElementBlock("div",bR,[r.icon?(o.openBlock(),o.createBlock(Oe,{key:0,icon:r.icon},null,8,["icon"])):o.createCommentVNode("",!0),o.createVNode(ye,{text:r.text},null,8,["text"])]))}});const MR=I1(CR,[["__scopeId","data-v-b20f5460"]]);var zR=Object.defineProperty,wR=(e,t,a)=>t in e?zR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,ct=(e,t,a)=>wR(e,typeof t!="symbol"?t+"":t,a);const _R=(e,t,a)=>{const r=e[t];return r?typeof r=="function"?r():Promise.resolve(r):new Promise((n,c)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(c.bind(null,new Error("Unknown variable dynamic import: "+t+(t.split("/").length!==a?". Note that variables only represent file names one level deep.":""))))})};let Va,Bu,Fu,E3,La={},w6={};class kR{constructor(t,a=!1){ct(this,"texts",{}),ct(this,"dateToMinutes",r=>r.getHours()*60+r.getMinutes()),E3=this,this._texts=t,!a&&Date&&!Date.prototype.addDays&&this._initDatePrototypes()}_initDatePrototypes(){Date.prototype.addDays=function(t){return E3.addDays(this,t)},Date.prototype.subtractDays=function(t){return E3.subtractDays(this,t)},Date.prototype.addHours=function(t){return E3.addHours(this,t)},Date.prototype.subtractHours=function(t){return E3.subtractHours(this,t)},Date.prototype.addMinutes=function(t){return E3.addMinutes(this,t)},Date.prototype.subtractMinutes=function(t){return E3.subtractMinutes(this,t)},Date.prototype.getWeek=function(){return E3.getWeek(this)},Date.prototype.isToday=function(){return E3.isToday(this)},Date.prototype.isLeapYear=function(){return E3.isLeapYear(this)},Date.prototype.format=function(t="YYYY-MM-DD"){return E3.formatDate(this,t)},Date.prototype.formatTime=function(t="HH:mm"){return E3.formatTime(this,t)}}removePrototypes(){delete Date.prototype.addDays,delete Date.prototype.subtractDays,delete Date.prototype.addHours,delete Date.prototype.subtractHours,delete Date.prototype.addMinutes,delete Date.prototype.subtractMinutes,delete Date.prototype.getWeek,delete Date.prototype.isToday,delete Date.prototype.isLeapYear,delete Date.prototype.format,delete Date.prototype.formatTime}updateTexts(t){this._texts=t}_todayFormatted(){return Bu!==new Date().getDate()&&(Va=new Date,Bu=Va.getDate(),Fu=`${Va.getFullYear()}-${Va.getMonth()}-${Va.getDate()}`),Fu}addDays(t,a){const r=new Date(t.valueOf());return r.setDate(r.getDate()+a),r}subtractDays(t,a){const r=new Date(t.valueOf());return r.setDate(r.getDate()-a),r}addHours(t,a){const r=new Date(t.valueOf());return r.setHours(r.getHours()+a),r}subtractHours(t,a){const r=new Date(t.valueOf());return r.setHours(r.getHours()-a),r}addMinutes(t,a){const r=new Date(t.valueOf());return r.setMinutes(r.getMinutes()+a),r}subtractMinutes(t,a){const r=new Date(t.valueOf());return r.setMinutes(r.getMinutes()-a),r}getWeek(t){const a=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())),r=a.getUTCDay()||7;a.setUTCDate(a.getUTCDate()+4-r);const n=new Date(Date.UTC(a.getUTCFullYear(),0,1));return Math.ceil(((a-n)/864e5+1)/7)}isToday(t){return`${t.getFullYear()}-${t.getMonth()}-${t.getDate()}`===this._todayFormatted()}isLeapYear(t){const a=t.getFullYear();return!(a%400)||a%100&&!(a%4)}getPreviousFirstDayOfWeek(t=null,a){const r=t&&new Date(t.valueOf())||new Date,n=a?7:6;return r.setDate(r.getDate()-(r.getDay()+n)%7),r}stringToDate(t){return t instanceof Date?t:(t.length===10&&(t+=" 00:00"),new Date(t.replace(/-/g,"/")))}countDays(t,a){typeof t=="string"&&(t=t.replace(/-/g,"/")),typeof a=="string"&&(a=a.replace(/-/g,"/")),t=new Date(t).setHours(0,0,0,0),a=new Date(a).setHours(0,0,1,0);const r=(new Date(a).getTimezoneOffset()-new Date(t).getTimezoneOffset())*60*1e3;return Math.ceil((a-t-r)/(24*3600*1e3))}datesInSameTimeStep(t,a,r){return Math.abs(t.getTime()-a.getTime())<=r*60*1e3}formatDate(t,a="YYYY-MM-DD",r=null){if(r||(r=this._texts),a||(a="YYYY-MM-DD"),a==="YYYY-MM-DD")return this.formatDateLite(t);La={},w6={};const n={YYYY:()=>this._hydrateDateObject(t,r).YYYY,YY:()=>this._hydrateDateObject(t,r).YY(),M:()=>this._hydrateDateObject(t,r).M,MM:()=>this._hydrateDateObject(t,r).MM(),MMM:()=>this._hydrateDateObject(t,r).MMM(),MMMM:()=>this._hydrateDateObject(t,r).MMMM(),MMMMG:()=>this._hydrateDateObject(t,r).MMMMG(),D:()=>this._hydrateDateObject(t,r).D,DD:()=>this._hydrateDateObject(t,r).DD(),S:()=>this._hydrateDateObject(t,r).S(),d:()=>this._hydrateDateObject(t,r).d,dd:()=>this._hydrateDateObject(t,r).dd(),ddd:()=>this._hydrateDateObject(t,r).ddd(),dddd:()=>this._hydrateDateObject(t,r).dddd(),HH:()=>this._hydrateTimeObject(t,r).HH,H:()=>this._hydrateTimeObject(t,r).H,hh:()=>this._hydrateTimeObject(t,r).hh,h:()=>this._hydrateTimeObject(t,r).h,am:()=>this._hydrateTimeObject(t,r).am,AM:()=>this._hydrateTimeObject(t,r).AM,mm:()=>this._hydrateTimeObject(t,r).mm,m:()=>this._hydrateTimeObject(t,r).m};return a.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g,(c,i)=>{const s=n[i.replace(/\{|\}/g,"")];return s!==void 0?s():i})}formatDateLite(t){const a=t.getMonth()+1,r=t.getDate();return`${t.getFullYear()}-${a<10?"0":""}${a}-${r<10?"0":""}${r}`}formatTime(t,a="HH:mm",r=null,n=!1){let c=!1;if(n){const[l,f,u]=[t.getHours(),t.getMinutes(),t.getSeconds()];l+f+u===23+59+59&&(c=!0)}if(t instanceof Date&&a==="HH:mm")return c?"24:00":this.formatTimeLite(t);w6={},r||(r=this._texts);const i=this._hydrateTimeObject(t,r),s=a.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g,(l,f)=>{const u=i[f.replace(/\{|\}/g,"")];return u!==void 0?u:f});return c?s.replace("23:59","24:00"):s}formatTimeLite(t){const a=t.getHours(),r=t.getMinutes();return`${(a<10?"0":"")+a}:${(r<10?"0":"")+r}`}_nth(t){if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}_hydrateDateObject(t,a){if(La.D)return La;const r=t.getFullYear(),n=t.getMonth()+1,c=t.getDate(),s=(t.getDay()-1+7)%7;return La={YYYY:r,YY:()=>r.toString().substring(2),M:n,MM:()=>(n<10?"0":"")+n,MMM:()=>a.months[n-1].substring(0,3),MMMM:()=>a.months[n-1],MMMMG:()=>(a.monthsGenitive||a.months)[n-1],D:c,DD:()=>(c<10?"0":"")+c,S:()=>this._nth(c),d:s+1,dd:()=>a.weekDays[s][0],ddd:()=>a.weekDays[s].substr(0,3),dddd:()=>a.weekDays[s]},La}_hydrateTimeObject(t,a){if(w6.am)return w6;let r,n;t instanceof Date?(r=t.getHours(),n=t.getMinutes()):(r=Math.floor(t/60),n=Math.floor(t%60));const c=r%12?r%12:12,i=(a||{am:"am",pm:"pm"})[r===24||r<12?"am":"pm"];return w6={H:r,h:c,HH:(r<10?"0":"")+r,hh:(c<10?"0":"")+c,am:i,AM:i.toUpperCase(),m:n,mm:(n<10?"0":"")+n},w6}}const HR=24*60;class VR{constructor(t){ct(this,"_vuecal",null),ct(this,"selectCell",(a=!1,r,n)=>{this._vuecal.$emit("cell-click",n?{date:r,split:n}:r),this._vuecal.clickToNavigate||a?this._vuecal.switchToNarrowerView():this._vuecal.dblclickToNavigate&&"ontouchstart"in window&&(this._vuecal.domEvents.dblTapACell.taps++,setTimeout(()=>this._vuecal.domEvents.dblTapACell.taps=0,this._vuecal.domEvents.dblTapACell.timeout),this._vuecal.domEvents.dblTapACell.taps>=2&&(this._vuecal.domEvents.dblTapACell.taps=0,this._vuecal.switchToNarrowerView(),this._vuecal.$emit("cell-dblclick",n?{date:r,split:n}:r)))}),ct(this,"keyPressEnterCell",(a,r)=>{this._vuecal.$emit("cell-keypress-enter",r?{date:a,split:r}:a),this._vuecal.switchToNarrowerView()}),ct(this,"getPosition",a=>{const{left:r,top:n}=this._vuecal.cellsEl.getBoundingClientRect(),{clientX:c,clientY:i}="ontouchstart"in window&&a.touches?a.touches[0]:a;return{x:c-r,y:i-n}}),ct(this,"minutesAtCursor",a=>{let r=0,n={x:0,y:0};const{timeStep:c,timeCellHeight:i,timeFrom:s}=this._vuecal.$props;return typeof a=="number"?r=a:typeof a=="object"&&(n=this.getPosition(a),r=Math.round(n.y*c/parseInt(i)+s)),{minutes:Math.max(Math.min(r,HR),0),cursorCoords:n}}),this._vuecal=t}}const LR=2,Ni=24*60;let J2,ee,Di;class SR{constructor(t,a){ct(this,"_vuecal",null),ct(this,"eventDefaults",{_eid:null,start:"",startTimeMinutes:0,end:"",endTimeMinutes:0,title:"",content:"",background:!1,allDay:!1,segments:null,repeat:null,daysCount:1,deletable:!0,deleting:!1,titleEditable:!0,resizable:!0,resizing:!1,draggable:!0,dragging:!1,draggingStatic:!1,focused:!1,class:""}),this._vuecal=t,J2=a}createAnEvent(t,a,r){if(typeof t=="string"&&(t=J2.stringToDate(t)),!(t instanceof Date))return!1;const n=J2.dateToMinutes(t);a=a*1||LR*60;const c=n+a,i=J2.addMinutes(new Date(t),a);r.end&&(typeof r.end=="string"&&(r.end=J2.stringToDate(r.end)),r.endTimeMinutes=J2.dateToMinutes(r.end));const s={...this.eventDefaults,_eid:`${this._vuecal._.uid}_${this._vuecal.eventIdIncrement++}`,start:t,startTimeMinutes:n,end:i,endTimeMinutes:c,segments:null,...r};if(!(typeof this._vuecal.onEventCreate=="function"&&!this._vuecal.onEventCreate(s,()=>this.deleteAnEvent(s))))return s.startDateF!==s.endDateF&&(s.daysCount=J2.countDays(s.start,s.end)),this._vuecal.mutableEvents.push(s),this._vuecal.addEventsToView([s]),this._vuecal.emitWithEvent("event-create",s),this._vuecal.$emit("event-change",{event:this._vuecal.cleanupEvent(s),originalEvent:null}),s}addEventSegment(t){t.segments||(t.segments={},t.segments[J2.formatDateLite(t.start)]={start:t.start,startTimeMinutes:t.startTimeMinutes,endTimeMinutes:Ni,isFirstDay:!0,isLastDay:!1});const a=t.segments[J2.formatDateLite(t.end)];a&&(a.isLastDay=!1,a.endTimeMinutes=Ni);const r=J2.addDays(t.end,1),n=J2.formatDateLite(r);return r.setHours(0,0,0,0),t.segments[n]={start:r,startTimeMinutes:0,endTimeMinutes:t.endTimeMinutes,isFirstDay:!1,isLastDay:!0},t.end=J2.addMinutes(r,t.endTimeMinutes),t.daysCount=Object.keys(t.segments).length,n}removeEventSegment(t){let a=Object.keys(t.segments).length;if(a<=1)return J2.formatDateLite(t.end);delete t.segments[J2.formatDateLite(t.end)],a--;const r=J2.subtractDays(t.end,1),n=J2.formatDateLite(r),c=t.segments[n];return a?c&&(c.isLastDay=!0,c.endTimeMinutes=t.endTimeMinutes):t.segments=null,t.daysCount=a||1,t.end=r,n}createEventSegments(t,a,r){const n=a.getTime(),c=r.getTime();let i=t.start.getTime(),s=t.end.getTime(),l=!1,f,u,d;for(!t.end.getHours()&&!t.end.getMinutes()&&(s-=1e3),t.segments={},t.repeat?(f=n,u=Math.min(c,t.repeat.until?J2.stringToDate(t.repeat.until).getTime():c)):(f=Math.max(n,i),u=Math.min(c,s));f<=u;){let h=!1;const m=J2.addDays(new Date(f),1).setHours(0,0,0,0);let v,p,g,y;if(t.repeat){const x=new Date(f),C=J2.formatDateLite(x);(l||t.occurrences&&t.occurrences[C])&&(l||(i=t.occurrences[C].start,d=new Date(i).setHours(0,0,0,0),s=t.occurrences[C].end),l=!0,h=!0),v=f===d,p=C===J2.formatDateLite(new Date(s)),g=new Date(v?i:f),y=J2.formatDateLite(g),p&&(l=!1)}else h=!0,v=f===i,p=u===s&&m>u,g=v?t.start:new Date(f),y=J2.formatDateLite(v?t.start:g);h&&(t.segments[y]={start:g,startTimeMinutes:v?t.startTimeMinutes:0,endTimeMinutes:p?t.endTimeMinutes:Ni,isFirstDay:v,isLastDay:p}),f=m}return t}deleteAnEvent(t){this._vuecal.emitWithEvent("event-delete",t),this._vuecal.mutableEvents=this._vuecal.mutableEvents.filter(a=>a._eid!==t._eid),this._vuecal.view.events=this._vuecal.view.events.filter(a=>a._eid!==t._eid)}checkCellOverlappingEvents(t,a){Di=t.slice(0),ee={},t.forEach(n=>{Di.shift(),ee[n._eid]||(ee[n._eid]={overlaps:[],start:n.start,position:0}),ee[n._eid].position=0,Di.forEach(c=>{ee[c._eid]||(ee[c._eid]={overlaps:[],start:c.start,position:0});const i=this.eventInRange(c,n.start,n.end),s=a.overlapsPerTimeStep?J2.datesInSameTimeStep(n.start,c.start,a.timeStep):1;if(!n.background&&!n.allDay&&!c.background&&!c.allDay&&i&&s)ee[n._eid].overlaps.push(c._eid),ee[n._eid].overlaps=[...new Set(ee[n._eid].overlaps)],ee[c._eid].overlaps.push(n._eid),ee[c._eid].overlaps=[...new Set(ee[c._eid].overlaps)],ee[c._eid].position++;else{let l,f;(l=(ee[n._eid]||{overlaps:[]}).overlaps.indexOf(c._eid))>-1&&ee[n._eid].overlaps.splice(l,1),(f=(ee[c._eid]||{overlaps:[]}).overlaps.indexOf(n._eid))>-1&&ee[c._eid].overlaps.splice(f,1),ee[c._eid].position--}})});let r=0;for(const n in ee){const c=ee[n],i=c.overlaps.map(s=>({id:s,start:ee[s].start}));i.push({id:n,start:c.start}),i.sort((s,l)=>s.start<l.start?-1:s.start>l.start?1:s.id>l.id?-1:1),c.position=i.findIndex(s=>s.id===n),r=Math.max(this.getOverlapsStreak(c,ee),r)}return[ee,r]}getOverlapsStreak(t,a={}){let r=t.overlaps.length+1,n=[];return t.overlaps.forEach(c=>{n.includes(c)||t.overlaps.filter(s=>s!==c).forEach(s=>{a[s].overlaps.includes(c)||n.push(s)})}),n=[...new Set(n)],r-=n.length,r}eventInRange(t,a,r){if(t.allDay||!this._vuecal.time){const i=new Date(t.start).setHours(0,0,0,0);return new Date(t.end).setHours(23,59,0,0)>=new Date(a).setHours(0,0,0,0)&&i<=new Date(r).setHours(0,0,0,0)}const n=t.start.getTime(),c=t.end.getTime();return n<r.getTime()&&c>a.getTime()}}const AR={class:"vuecal__flex vuecal__weekdays-headings"},TR=["onClick"],ER={class:"vuecal__flex weekday-label",grow:""},NR={class:"full"},DR={class:"small"},OR={class:"xsmall"},PR={key:0},BR={key:0,class:"vuecal__flex vuecal__split-days-headers",grow:""};function FR(e,t,a,r,n,c){return o.openBlock(),o.createElementBlock("div",AR,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(c.headings,(i,s)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:s},[i.hide?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["vuecal__flex vuecal__heading",{today:i.today,clickable:c.cellHeadingsClickable}]),style:o.normalizeStyle(c.weekdayCellStyles),onClick:l=>c.view.id==="week"&&c.selectCell(i.date,l),onDblclick:t[0]||(t[0]=l=>c.view.id==="week"&&c.vuecal.dblclickToNavigate&&a.switchToNarrowerView())},[o.createVNode(o.Transition,{name:`slide-fade--${a.transitionDirection}`,appear:c.vuecal.transitions},{default:o.withCtx(()=>[(o.openBlock(),o.createElementBlock("div",{class:"vuecal__flex",column:"",key:c.vuecal.transitions?`${s}-${i.dayOfMonth}`:!1},[o.createElementVNode("div",ER,[o.renderSlot(e.$slots,"weekday-heading",{heading:c.cleanupHeading(i),view:c.view},()=>[o.createElementVNode("span",NR,o.toDisplayString(i.full),1),o.createElementVNode("span",DR,o.toDisplayString(i.small),1),o.createElementVNode("span",OR,o.toDisplayString(i.xsmall),1),i.dayOfMonth?(o.openBlock(),o.createElementBlock("span",PR," "+o.toDisplayString(i.dayOfMonth),1)):o.createCommentVNode("",!0)])]),c.vuecal.hasSplits&&c.vuecal.stickySplitLabels?(o.openBlock(),o.createElementBlock("div",BR,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(c.vuecal.daySplits,(l,f)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["day-split-header",l.class||!1]),key:f},[o.renderSlot(e.$slots,"split-label",{split:l,view:c.view},()=>[o.createTextVNode(o.toDisplayString(l.label),1)])],2))),128))])):o.createCommentVNode("",!0)]))]),_:2},1032,["name","appear"])],46,TR))],64))),128))])}const ma=(e,t)=>{const a=e.__vccOpts||e;for(const[r,n]of t)a[r]=n;return a},RR={inject:["vuecal","utils","view"],props:{transitionDirection:{type:String,default:"right"},weekDays:{type:Array,default:()=>[]},switchToNarrowerView:{type:Function,default:()=>{}}},methods:{selectCell(e,t){e.getTime()!==this.view.selectedDate.getTime()&&(this.view.selectedDate=e),this.utils.cell.selectCell(!1,e,t)},cleanupHeading:e=>({label:e.full,date:e.date,...e.today?{today:e.today}:{}})},computed:{headings(){if(!["month","week"].includes(this.view.id))return[];let e=!1;return this.weekDays.map((a,r)=>{const n=this.utils.date.addDays(this.view.startDate,this.vuecal.startWeekOnSunday&&this.vuecal.hideWeekends?r-1:r);return{hide:a.hide,full:a.label,small:a.short||a.label.substr(0,3),xsmall:a.short||a.label.substr(0,1),...this.view.id==="week"?{dayOfMonth:n.getDate(),date:n,today:!e&&this.utils.date.isToday(n)&&!e++}:{}}})},cellWidth(){return 100/(7-this.weekDays.reduce((e,t)=>e+t.hide,0))},weekdayCellStyles(){return{...this.vuecal.hideWeekdays.length?{width:`${this.cellWidth}%`}:{}}},cellHeadingsClickable(){return this.view.id==="week"&&(this.vuecal.clickToNavigate||this.vuecal.dblclickToNavigate)}}},Yg=ma(RR,[["render",FR]]),IR={class:"vuecal__header"},$R={key:0,class:"vuecal__flex vuecal__menu",role:"tablist","aria-label":"Calendar views navigation"},UR=["onDragenter","onDragleave","onClick","aria-label"],WR={key:1,class:"vuecal__title-bar"},qR=["aria-label"],jR={class:"vuecal__flex vuecal__title",grow:""},YR=["aria-label"],GR={key:0,class:"vuecal__flex vuecal__split-days-headers"};function XR(e,t,a,r,n,c){const i=o.resolveComponent("weekdays-headings");return o.openBlock(),o.createElementBlock("div",IR,[a.options.hideViewSelector?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",$R,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.viewProps.views,(s,l)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:l},[s.enabled?(o.openBlock(),o.createElementBlock("button",{key:0,class:o.normalizeClass(["vuecal__view-btn",{"vuecal__view-btn--active":c.view.id===l,"vuecal__view-btn--highlighted":e.highlightedControl===l}]),type:"button",onDragenter:f=>a.editEvents.drag&&c.dnd&&c.dnd.viewSelectorDragEnter(f,l,e.$data),onDragleave:f=>a.editEvents.drag&&c.dnd&&c.dnd.viewSelectorDragLeave(f,l,e.$data),onClick:f=>c.switchView(l,null,!0),"aria-label":`${s.label} view`},o.toDisplayString(s.label),43,UR)):o.createCommentVNode("",!0)],64))),128))])),a.options.hideTitleBar?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",WR,[o.createElementVNode("button",{class:o.normalizeClass(["vuecal__arrow vuecal__arrow--prev",{"vuecal__arrow--highlighted":e.highlightedControl==="previous"}]),type:"button",onClick:t[0]||(t[0]=(...s)=>c.previous&&c.previous(...s)),onDragenter:t[1]||(t[1]=s=>a.editEvents.drag&&c.dnd&&c.dnd.viewSelectorDragEnter(s,"previous",e.$data)),onDragleave:t[2]||(t[2]=s=>a.editEvents.drag&&c.dnd&&c.dnd.viewSelectorDragLeave(s,"previous",e.$data)),"aria-label":`Previous ${c.view.id}`},[o.renderSlot(e.$slots,"arrow-prev")],42,qR),o.createElementVNode("div",jR,[o.createVNode(o.Transition,{name:a.options.transitions?`slide-fade--${c.transitionDirection}`:""},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(c.broaderView?"button":"span"),{type:!!c.broaderView&&"button",key:`${c.view.id}${c.view.startDate.toString()}`,onClick:t[3]||(t[3]=s=>!!c.broaderView&&c.switchToBroaderView()),"aria-label":!!c.broaderView&&`Go to ${c.broaderView} view`},{default:o.withCtx(()=>[o.renderSlot(e.$slots,"title")]),_:3},8,["type","aria-label"]))]),_:3},8,["name"])]),a.options.todayButton?(o.openBlock(),o.createElementBlock("button",{key:0,class:o.normalizeClass(["vuecal__today-btn",{"vuecal__today-btn--highlighted":e.highlightedControl==="today"}]),type:"button",onClick:t[4]||(t[4]=(...s)=>c.goToToday&&c.goToToday(...s)),onDragenter:t[5]||(t[5]=s=>a.editEvents.drag&&c.dnd&&c.dnd.viewSelectorDragEnter(s,"today",e.$data)),onDragleave:t[6]||(t[6]=s=>a.editEvents.drag&&c.dnd&&c.dnd.viewSelectorDragLeave(s,"today",e.$data)),"aria-label":"Today"},[o.renderSlot(e.$slots,"today-button")],34)):o.createCommentVNode("",!0),o.createElementVNode("button",{class:o.normalizeClass(["vuecal__arrow vuecal__arrow--next",{"vuecal__arrow--highlighted":e.highlightedControl==="next"}]),type:"button",onClick:t[7]||(t[7]=(...s)=>c.next&&c.next(...s)),onDragenter:t[8]||(t[8]=s=>a.editEvents.drag&&c.dnd&&c.dnd.viewSelectorDragEnter(s,"next",e.$data)),onDragleave:t[9]||(t[9]=s=>a.editEvents.drag&&c.dnd&&c.dnd.viewSelectorDragLeave(s,"next",e.$data)),"aria-label":`Next ${c.view.id}`},[o.renderSlot(e.$slots,"arrow-next")],42,YR)])),a.viewProps.weekDaysInHeader?(o.openBlock(),o.createBlock(i,{key:2,"week-days":a.weekDays,"transition-direction":c.transitionDirection,"switch-to-narrower-view":a.switchToNarrowerView},o.createSlots({_:2},[e.$slots["weekday-heading"]?{name:"weekday-heading",fn:o.withCtx(({heading:s,view:l})=>[o.renderSlot(e.$slots,"weekday-heading",{heading:s,view:l})]),key:"0"}:void 0,e.$slots["split-label"]?{name:"split-label",fn:o.withCtx(({split:s})=>[o.renderSlot(e.$slots,"split-label",{split:s,view:c.view})]),key:"1"}:void 0]),1032,["week-days","transition-direction","switch-to-narrower-view"])):o.createCommentVNode("",!0),o.createVNode(o.Transition,{name:`slide-fade--${c.transitionDirection}`},{default:o.withCtx(()=>[c.showDaySplits?(o.openBlock(),o.createElementBlock("div",GR,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.daySplits,(s,l)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["day-split-header",s.class||!1]),key:l},[o.renderSlot(e.$slots,"split-label",{split:s,view:c.view.id},()=>[o.createTextVNode(o.toDisplayString(s.label),1)])],2))),128))])):o.createCommentVNode("",!0)]),_:3},8,["name"])])}const KR={inject:["vuecal","previous","next","switchView","updateSelectedDate","modules","view"],components:{WeekdaysHeadings:Yg},props:{options:{type:Object,default:()=>({})},editEvents:{type:Object,required:!0},hasSplits:{type:[Boolean,Number],default:!1},daySplits:{type:Array,default:()=>[]},viewProps:{type:Object,default:()=>({})},weekDays:{type:Array,default:()=>[]},switchToNarrowerView:{type:Function,default:()=>{}}},data:()=>({highlightedControl:null}),methods:{goToToday(){this.updateSelectedDate(new Date(new Date().setHours(0,0,0,0)))},switchToBroaderView(){this.transitionDirection="left",this.broaderView&&this.switchView(this.broaderView)}},computed:{transitionDirection:{get(){return this.vuecal.transitionDirection},set(e){this.vuecal.transitionDirection=e}},broaderView(){const{enabledViews:e}=this.vuecal;return e[e.indexOf(this.view.id)-1]},showDaySplits(){return this.view.id==="day"&&this.hasSplits&&this.options.stickySplitLabels&&!this.options.minSplitWidth},dnd(){return this.modules.dnd}}},ZR=ma(KR,[["render",XR]]),QR=["draggable"];function JR(e,t,a,r,n,c){return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["vuecal__event",c.eventClasses]),style:o.normalizeStyle(c.eventStyles),tabindex:"0",onFocus:t[4]||(t[4]=(...i)=>c.focusEvent&&c.focusEvent(...i)),onKeypress:t[5]||(t[5]=o.withKeys(o.withModifiers((...i)=>c.onEnterKeypress&&c.onEnterKeypress(...i),["stop"]),["enter"])),onMouseenter:t[6]||(t[6]=(...i)=>c.onMouseEnter&&c.onMouseEnter(...i)),onMouseleave:t[7]||(t[7]=(...i)=>c.onMouseLeave&&c.onMouseLeave(...i)),onTouchstart:t[8]||(t[8]=o.withModifiers((...i)=>c.onTouchStart&&c.onTouchStart(...i),["stop"])),onMousedown:t[9]||(t[9]=i=>c.onMouseDown(i)),onMouseup:t[10]||(t[10]=(...i)=>c.onMouseUp&&c.onMouseUp(...i)),onTouchend:t[11]||(t[11]=(...i)=>c.onMouseUp&&c.onMouseUp(...i)),onTouchmove:t[12]||(t[12]=(...i)=>c.onTouchMove&&c.onTouchMove(...i)),onDblclick:t[13]||(t[13]=(...i)=>c.onDblClick&&c.onDblClick(...i)),draggable:c.draggable,onDragstart:t[14]||(t[14]=i=>c.draggable&&c.onDragStart(i)),onDragend:t[15]||(t[15]=i=>c.draggable&&c.onDragEnd())},[c.vuecal.editEvents.delete&&a.event.deletable?(o.openBlock(),o.createElementBlock("div",{key:0,class:"vuecal__event-delete",onClick:t[0]||(t[0]=o.withModifiers((...i)=>c.deleteEvent&&c.deleteEvent(...i),["stop"])),onTouchstart:t[1]||(t[1]=o.withModifiers((...i)=>c.touchDeleteEvent&&c.touchDeleteEvent(...i),["stop"]))},o.toDisplayString(c.vuecal.texts.deleteEvent),33)):o.createCommentVNode("",!0),o.renderSlot(e.$slots,"event",{event:a.event,view:c.view.id}),c.resizable?(o.openBlock(),o.createElementBlock("div",{key:1,class:"vuecal__event-resize-handle",contenteditable:"false",onMousedown:t[2]||(t[2]=o.withModifiers((...i)=>c.onResizeHandleMouseDown&&c.onResizeHandleMouseDown(...i),["stop","prevent"])),onTouchstart:t[3]||(t[3]=o.withModifiers((...i)=>c.onResizeHandleMouseDown&&c.onResizeHandleMouseDown(...i),["stop","prevent"]))},null,32)):o.createCommentVNode("",!0)],46,QR)}const eI={inject:["vuecal","utils","modules","view","domEvents","editEvents"],props:{cellFormattedDate:{type:String,default:""},event:{type:Object,default:()=>({})},cellEvents:{type:Array,default:()=>[]},overlaps:{type:Array,default:()=>[]},eventPosition:{type:Number,default:0},overlapsStreak:{type:Number,default:0},allDay:{type:Boolean,default:!1}},data:()=>({touch:{dragThreshold:30,startX:0,startY:0,dragged:!1}}),methods:{onMouseDown(e,t=!1){if("ontouchstart"in window&&!t)return!1;const{clickHoldAnEvent:a,focusAnEvent:r,resizeAnEvent:n,dragAnEvent:c}=this.domEvents;if(r._eid===this.event._eid&&a._eid===this.event._eid)return!0;this.focusEvent(),a._eid=null,this.vuecal.editEvents.delete&&this.event.deletable&&(a.timeoutId=setTimeout(()=>{!n._eid&&!c._eid&&(a._eid=this.event._eid,this.event.deleting=!0)},a.timeout))},onMouseUp(e){this.domEvents.focusAnEvent._eid===this.event._eid&&!this.touch.dragged&&(this.domEvents.focusAnEvent.mousedUp=!0),this.touch.dragged=!1},onMouseEnter(e){e.preventDefault(),this.vuecal.emitWithEvent("event-mouse-enter",this.event)},onMouseLeave(e){e.preventDefault(),this.vuecal.emitWithEvent("event-mouse-leave",this.event)},onTouchMove(e){if(typeof this.vuecal.onEventClick!="function")return;const{clientX:t,clientY:a}=e.touches[0],{startX:r,startY:n,dragThreshold:c}=this.touch;(Math.abs(t-r)>c||Math.abs(a-n)>c)&&(this.touch.dragged=!0)},onTouchStart(e){this.touch.startX=e.touches[0].clientX,this.touch.startY=e.touches[0].clientY,this.onMouseDown(e,!0)},onEnterKeypress(e){if(typeof this.vuecal.onEventClick=="function")return this.vuecal.onEventClick(this.event,e)},onDblClick(e){if(typeof this.vuecal.onEventDblclick=="function")return this.vuecal.onEventDblclick(this.event,e)},onDragStart(e){this.dnd&&this.dnd.eventDragStart(e,this.event)},onDragEnd(){this.dnd&&this.dnd.eventDragEnd(this.event)},onResizeHandleMouseDown(){this.focusEvent(),this.domEvents.dragAnEvent._eid=null,this.domEvents.resizeAnEvent=Object.assign(this.domEvents.resizeAnEvent,{_eid:this.event._eid,start:(this.segment||this.event).start,split:this.event.split||null,segment:!!this.segment&&this.utils.date.formatDateLite(this.segment.start),originalEnd:new Date((this.segment||this.event).end),originalEndTimeMinutes:this.event.endTimeMinutes}),this.event.resizing=!0},deleteEvent(e=!1){if("ontouchstart"in window&&!e)return!1;this.utils.event.deleteAnEvent(this.event)},touchDeleteEvent(e){this.deleteEvent(!0)},cancelDeleteEvent(){this.event.deleting=!1},focusEvent(){const{focusAnEvent:e}=this.domEvents,t=e._eid;if(t!==this.event._eid){if(t){const a=this.view.events.find(r=>r._eid===t);a&&(a.focused=!1)}this.vuecal.cancelDelete(),this.vuecal.emitWithEvent("event-focus",this.event),e._eid=this.event._eid,this.event.focused=!0}}},computed:{eventDimensions(){const{startTimeMinutes:e,endTimeMinutes:t}=this.segment||this.event;let a=e-this.vuecal.timeFrom;const r=Math.max(Math.round(a*this.vuecal.timeCellHeight/this.vuecal.timeStep),0);a=Math.min(t,this.vuecal.timeTo)-this.vuecal.timeFrom;const n=Math.round(a*this.vuecal.timeCellHeight/this.vuecal.timeStep),c=Math.max(n-r,5);return{top:r,height:c}},eventStyles(){if(this.event.allDay||!this.vuecal.time||!this.event.endTimeMinutes||this.view.id==="month"||this.allDay)return{};let e=100/Math.min(this.overlaps.length+1,this.overlapsStreak),t=100/(this.overlaps.length+1)*this.eventPosition;this.vuecal.minEventWidth&&e<this.vuecal.minEventWidth&&(e=this.vuecal.minEventWidth,t=(100-this.vuecal.minEventWidth)/this.overlaps.length*this.eventPosition);const{top:a,height:r}=this.eventDimensions;return{top:`${a}px`,height:`${r}px`,width:`${e}%`,left:this.event.left&&`${this.event.left}px`||`${t}%`}},eventClasses(){const{isFirstDay:e,isLastDay:t}=this.segment||{};return{[this.event.class]:!!this.event.class,"vuecal__event--focus":this.event.focused,"vuecal__event--resizing":this.event.resizing,"vuecal__event--background":this.event.background,"vuecal__event--deletable":this.event.deleting,"vuecal__event--all-day":this.event.allDay,"vuecal__event--dragging":!this.event.draggingStatic&&this.event.dragging,"vuecal__event--static":this.event.dragging&&this.event.draggingStatic,"vuecal__event--multiple-days":!!this.segment,"event-start":this.segment&&e&&!t,"event-middle":this.segment&&!e&&!t,"event-end":this.segment&&t&&!e}},segment(){return this.event.segments&&this.event.segments[this.cellFormattedDate]||null},draggable(){const{draggable:e,background:t,daysCount:a}=this.event;return this.vuecal.editEvents.drag&&e&&!t&&a===1},resizable(){const{editEvents:e,time:t}=this.vuecal;return e.resize&&this.event.resizable&&t&&!this.allDay&&(!this.segment||this.segment&&this.segment.isLastDay)&&this.view.id!=="month"},dnd(){return this.modules.dnd}}},tI=ma(eI,[["render",JR]]),aI=["data-split","aria-label","onTouchstart","onMousedown","onDragover","onDrop"],rI={key:0,class:"cell-time-labels"},nI=["innerHTML"],cI={key:2,class:"vuecal__cell-events"},iI=["title"];function sI(e,t,a,r,n,c){const i=o.resolveComponent("event");return o.openBlock(),o.createBlock(o.TransitionGroup,{class:o.normalizeClass(["vuecal__cell",c.cellClasses]),name:`slide-fade--${c.transitionDirection}`,tag:"div",appear:a.options.transitions,style:o.normalizeStyle(c.cellStyles)},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(c.splitsCount?c.splits:1,(s,l)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["vuecal__flex vuecal__cell-content",c.splitsCount&&c.splitClasses(s)]),key:a.options.transitions?`${c.view.id}-${a.data.content}-${l}`:l,"data-split":c.splitsCount?s.id:!1,column:"",tabindex:"0","aria-label":a.data.content,onFocus:t[0]||(t[0]=f=>c.onCellFocus(f)),onKeypress:t[1]||(t[1]=o.withKeys(f=>c.onCellkeyPressEnter(f),["enter"])),onTouchstart:f=>!c.isDisabled&&c.onCellTouchStart(f,c.splitsCount?s.id:null),onMousedown:f=>!c.isDisabled&&c.onCellMouseDown(f,c.splitsCount?s.id:null),onClick:t[2]||(t[2]=f=>!c.isDisabled&&c.onCellClick(f)),onDblclick:t[3]||(t[3]=f=>!c.isDisabled&&c.onCellDblClick(f)),onContextmenu:t[4]||(t[4]=f=>!c.isDisabled&&a.options.cellContextmenu&&c.onCellContextMenu(f)),onDragenter:t[5]||(t[5]=f=>!c.isDisabled&&a.editEvents.drag&&c.dnd&&c.dnd.cellDragEnter(f,e.$data,a.data.startDate)),onDragover:f=>!c.isDisabled&&a.editEvents.drag&&c.dnd&&c.dnd.cellDragOver(f,e.$data,a.data.startDate,c.splitsCount?s.id:null),onDragleave:t[6]||(t[6]=f=>!c.isDisabled&&a.editEvents.drag&&c.dnd&&c.dnd.cellDragLeave(f,e.$data,a.data.startDate)),onDrop:f=>!c.isDisabled&&a.editEvents.drag&&c.dnd&&c.dnd.cellDragDrop(f,e.$data,a.data.startDate,c.splitsCount?s.id:null)},[a.options.showTimeInCells&&a.options.time&&c.isWeekOrDayView&&!a.allDay?(o.openBlock(),o.createElementBlock("div",rI,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(c.vuecal.timeCells,(f,u)=>(o.openBlock(),o.createElementBlock("span",{class:"cell-time-label",key:u},o.toDisplayString(f.label),1))),128))])):o.createCommentVNode("",!0),c.isWeekOrDayView&&!a.allDay&&c.specialHours.length?(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:1},o.renderList(c.specialHours,(f,u)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["vuecal__special-hours",`vuecal__special-hours--day${f.day} ${f.class}`]),style:o.normalizeStyle(`height: ${f.height}px;top: ${f.top}px`)},[f.label?(o.openBlock(),o.createElementBlock("div",{key:0,class:"special-hours-label",innerHTML:f.label},null,8,nI)):o.createCommentVNode("",!0)],6))),256)):o.createCommentVNode("",!0),o.renderSlot(e.$slots,"cell-content",{events:c.events,selectCell:f=>c.selectCell(f,!0),split:c.splitsCount?s:!1}),c.eventsCount&&(c.isWeekOrDayView||c.view.id==="month"&&a.options.eventsOnMonthView)?(o.openBlock(),o.createElementBlock("div",cI,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(c.splitsCount?s.events:c.events,(f,u)=>(o.openBlock(),o.createBlock(i,{key:u,"cell-formatted-date":a.data.formattedDate,event:f,"all-day":a.allDay,"cell-events":c.splitsCount?s.events:c.events,overlaps:((c.splitsCount?s.overlaps[f._eid]:e.cellOverlaps[f._eid])||[]).overlaps,"event-position":((c.splitsCount?s.overlaps[f._eid]:e.cellOverlaps[f._eid])||[]).position,"overlaps-streak":c.splitsCount?s.overlapsStreak:e.cellOverlapsStreak},{event:o.withCtx(({event:d,view:h})=>[o.renderSlot(e.$slots,"event",{view:h,event:d})]),_:2},1032,["cell-formatted-date","event","all-day","cell-events","overlaps","event-position","overlaps-streak"]))),128))])):o.createCommentVNode("",!0)],42,aI))),128)),c.timelineVisible?(o.openBlock(),o.createElementBlock("div",{class:"vuecal__now-line",style:o.normalizeStyle(`top: ${c.todaysTimePosition}px`),key:a.options.transitions?`${c.view.id}-now-line`:"now-line",title:c.utils.date.formatTime(c.vuecal.now)},null,12,iI)):o.createCommentVNode("",!0)]),_:3},8,["class","name","appear","style"])}const oI={inject:["vuecal","utils","modules","view","domEvents"],components:{Event:tI},props:{options:{type:Object,default:()=>({})},editEvents:{type:Object,required:!0},data:{type:Object,required:!0},cellSplits:{type:Array,default:()=>[]},minTimestamp:{type:[Number,null],default:null},maxTimestamp:{type:[Number,null],default:null},cellWidth:{type:[Number,Boolean],default:!1},allDay:{type:Boolean,default:!1}},data:()=>({cellOverlaps:{},cellOverlapsStreak:1,timeAtCursor:null,highlighted:!1,highlightedSplit:null}),methods:{getSplitAtCursor({target:e}){let a=e.classList.contains("vuecal__cell-split")?e:this.vuecal.findAncestor(e,"vuecal__cell-split");return a&&(a=a.attributes["data-split"].value,parseInt(a).toString()===a.toString()&&(a=parseInt(a))),a||null},splitClasses(e){return{"vuecal__cell-split":!0,"vuecal__cell-split--highlighted":this.highlightedSplit===e.id,[e.class]:!!e.class}},checkCellOverlappingEvents(){this.options.time&&this.eventsCount&&!this.splitsCount&&(this.eventsCount===1?(this.cellOverlaps=[],this.cellOverlapsStreak=1):[this.cellOverlaps,this.cellOverlapsStreak]=this.utils.event.checkCellOverlappingEvents(this.events,this.options))},isDOMElementAnEvent(e){return this.vuecal.isDOMElementAnEvent(e)},selectCell(e,t=!1){const a=this.splitsCount?this.getSplitAtCursor(e):null;this.utils.cell.selectCell(t,this.timeAtCursor,a),this.timeAtCursor=null},onCellkeyPressEnter(e){this.isSelected||this.onCellFocus(e);const t=this.splitsCount?this.getSplitAtCursor(e):null;this.utils.cell.keyPressEnterCell(this.timeAtCursor,t),this.timeAtCursor=null},onCellFocus(e){if(!this.isSelected&&!this.isDisabled){this.isSelected=this.data.startDate;const t=this.splitsCount?this.getSplitAtCursor(e):null,a=this.timeAtCursor||this.data.startDate;this.vuecal.$emit("cell-focus",t?{date:a,split:t}:a)}},onCellMouseDown(e,t=null,a=!1){if("ontouchstart"in window&&!a)return!1;this.isSelected||this.onCellFocus(e);const{clickHoldACell:r,focusAnEvent:n}=this.domEvents;this.domEvents.cancelClickEventCreation=!1,r.eventCreated=!1,this.timeAtCursor=new Date(this.data.startDate);const{minutes:c,cursorCoords:{y:i}}=this.vuecal.minutesAtCursor(e);this.timeAtCursor.setMinutes(c);const s=this.isDOMElementAnEvent(e.target);!s&&n._eid&&((this.view.events.find(l=>l._eid===n._eid)||{}).focused=!1),this.editEvents.create&&!s&&this.setUpEventCreation(e,i)},setUpEventCreation(e,t){if(this.options.dragToCreateEvent&&["week","day"].includes(this.view.id)){const{dragCreateAnEvent:a}=this.domEvents;if(a.startCursorY=t,a.split=this.splitsCount?this.getSplitAtCursor(e):null,a.start=this.timeAtCursor,this.options.snapToTime){let r=this.timeAtCursor.getHours()*60+this.timeAtCursor.getMinutes();const n=r+this.options.snapToTime/2;r=n-n%this.options.snapToTime,a.start.setHours(0,r,0,0)}}else this.options.cellClickHold&&["month","week","day"].includes(this.view.id)&&this.setUpCellHoldTimer(e)},setUpCellHoldTimer(e){const{clickHoldACell:t}=this.domEvents;t.cellId=`${this.vuecal._.uid}_${this.data.formattedDate}`,t.split=this.splitsCount?this.getSplitAtCursor(e):null,t.timeoutId=setTimeout(()=>{if(t.cellId&&!this.domEvents.cancelClickEventCreation){const{_eid:a}=this.utils.event.createAnEvent(this.timeAtCursor,null,t.split?{split:t.split}:{});t.eventCreated=a}},t.timeout)},onCellTouchStart(e,t=null){this.onCellMouseDown(e,t,!0)},onCellClick(e){this.isDOMElementAnEvent(e.target)||this.selectCell(e)},onCellDblClick(e){const t=new Date(this.data.startDate);t.setMinutes(this.vuecal.minutesAtCursor(e).minutes);const a=this.splitsCount?this.getSplitAtCursor(e):null;this.vuecal.$emit("cell-dblclick",a?{date:t,split:a}:t),this.options.dblclickToNavigate&&this.vuecal.switchToNarrowerView()},onCellContextMenu(e){e.stopPropagation(),e.preventDefault();const t=new Date(this.data.startDate),{cursorCoords:a,minutes:r}=this.vuecal.minutesAtCursor(e);t.setMinutes(r);const n=this.splitsCount?this.getSplitAtCursor(e):null;this.vuecal.$emit("cell-contextmenu",{date:t,...a,...n||{},e})}},computed:{dnd(){return this.modules.dnd},nowInMinutes(){return this.utils.date.dateToMinutes(this.vuecal.now)},isBeforeMinDate(){return this.minTimestamp!==null&&this.minTimestamp>this.data.endDate.getTime()},isAfterMaxDate(){return this.maxTimestamp&&this.maxTimestamp<this.data.startDate.getTime()},isDisabled(){const{disableDays:e}=this.options,{isYearsOrYearView:t}=this.vuecal;return e.length&&e.includes(this.data.formattedDate)&&!t?!0:this.isBeforeMinDate||this.isAfterMaxDate},isSelected:{get(){let e=!1;const{selectedDate:t}=this.view;return this.view.id==="years"?e=t.getFullYear()===this.data.startDate.getFullYear():this.view.id==="year"?e=t.getFullYear()===this.data.startDate.getFullYear()&&t.getMonth()===this.data.startDate.getMonth():e=t.getTime()===this.data.startDate.getTime(),e},set(e){this.view.selectedDate=e,this.vuecal.$emit("update:selected-date",this.view.selectedDate)}},isWeekOrDayView(){return["week","day"].includes(this.view.id)},transitionDirection(){return this.vuecal.transitionDirection},specialHours(){return this.data.specialHours.map(e=>{let{from:t,to:a}=e;return t=Math.max(t,this.options.timeFrom),a=Math.min(a,this.options.timeTo),{...e,height:(a-t)*this.timeScale,top:(t-this.options.timeFrom)*this.timeScale}})},events(){const{startDate:e,endDate:t}=this.data;let a=[];if(!(["years","year"].includes(this.view.id)&&!this.options.eventsCountOnYearView)){if(a=this.view.events.slice(0),this.view.id==="month"&&a.push(...this.view.outOfScopeEvents),a=a.filter(r=>this.utils.event.eventInRange(r,e,t)),this.options.showAllDayEvents&&this.view.id!=="month"&&(a=a.filter(r=>!!r.allDay===this.allDay)),this.options.time&&this.isWeekOrDayView&&!this.allDay){const{timeFrom:r,timeTo:n}=this.options;a=a.filter(c=>{const i=c.daysCount>1&&c.segments[this.data.formattedDate]||{},s=c.daysCount===1&&c.startTimeMinutes<n&&c.endTimeMinutes>r,l=c.daysCount>1&&i.startTimeMinutes<n&&i.endTimeMinutes>r,f=!1;return c.allDay||s||l||f})}this.options.time&&this.isWeekOrDayView&&!(this.options.showAllDayEvents&&this.allDay)&&a.sort((r,n)=>r.start<n.start?-1:1),this.cellSplits.length||this.$nextTick(this.checkCellOverlappingEvents)}return a},eventsCount(){return this.events.length},splits(){return this.cellSplits.map((e,t)=>{const a=this.events.filter(c=>c.split===e.id),[r,n]=this.utils.event.checkCellOverlappingEvents(a.filter(c=>!c.background&&!c.allDay),this.options);return{...e,overlaps:r,overlapsStreak:n,events:a}})},splitsCount(){return this.splits.length},cellClasses(){return{[this.data.class]:!!this.data.class,"vuecal__cell--current":this.data.current,"vuecal__cell--today":this.data.today,"vuecal__cell--out-of-scope":this.data.outOfScope,"vuecal__cell--before-min":this.isDisabled&&this.isBeforeMinDate,"vuecal__cell--after-max":this.isDisabled&&this.isAfterMaxDate,"vuecal__cell--disabled":this.isDisabled,"vuecal__cell--selected":this.isSelected,"vuecal__cell--highlighted":this.highlighted,"vuecal__cell--has-splits":this.splitsCount,"vuecal__cell--has-events":this.eventsCount}},cellStyles(){return{...this.cellWidth?{width:`${this.cellWidth}%`}:{}}},timelineVisible(){const{time:e,timeTo:t}=this.options;return this.data.today&&this.isWeekOrDayView&&e&&!this.allDay&&this.nowInMinutes<=t},todaysTimePosition(){if(!this.data.today||!this.options.time)return;const e=this.nowInMinutes-this.options.timeFrom;return Math.round(e*this.timeScale)},timeScale(){return this.options.timeCellHeight/this.options.timeStep}}},Gg=ma(oI,[["render",sI]]),lI={key:0,class:"vuecal__all-day-text",style:{width:"3em"}};function fI(e,t,a,r,n,c){const i=o.resolveComponent("vuecal-cell");return o.openBlock(),o.createElementBlock("div",{class:"vuecal__flex vuecal__all-day",style:o.normalizeStyle(a.cellOrSplitMinWidth&&{height:a.height})},[a.cellOrSplitMinWidth?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",lI,[o.createElementVNode("span",null,o.toDisplayString(a.label),1)])),o.createElementVNode("div",{class:o.normalizeClass(["vuecal__flex vuecal__cells",`${c.view.id}-view`]),grow:"",style:o.normalizeStyle(a.cellOrSplitMinWidth?`min-width: ${a.cellOrSplitMinWidth}px`:"")},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.cells,(s,l)=>(o.openBlock(),o.createBlock(i,{key:l,options:a.options,"edit-events":c.editEvents,data:s,"all-day":!0,"cell-width":a.options.hideWeekdays.length&&(c.vuecal.isWeekView||c.vuecal.isMonthView)&&c.vuecal.cellWidth,"min-timestamp":a.options.minTimestamp,"max-timestamp":a.options.maxTimestamp,"cell-splits":a.daySplits},{event:o.withCtx(({event:f,view:u})=>[o.renderSlot(e.$slots,"event",{view:u,event:f})]),_:2},1032,["options","edit-events","data","cell-width","min-timestamp","max-timestamp","cell-splits"]))),128))],6)],4)}const uI={inject:["vuecal","view","editEvents"],components:{"vuecal-cell":Gg},props:{options:{type:Object,required:!0},cells:{type:Array,required:!0},label:{type:String,required:!0},daySplits:{type:Array,default:()=>[]},shortEvents:{type:Boolean,default:!0},height:{type:String,default:""},cellOrSplitMinWidth:{type:Number,default:null}},computed:{hasCellOrSplitWidth(){return!!(this.options.minCellWidth||this.daySplits.length&&this.options.minSplitWidth)}}},dI=ma(uI,[["render",fI]]),hI=["lang"],mI={class:"default"},pI={key:0,class:"vuecal__flex vuecal__body",grow:""},vI=["onBlur","innerHTML"],gI=["innerHTML"],yI=["innerHTML"],xI={class:"vuecal__flex",row:"",grow:""},bI={key:0,class:"vuecal__time-column"},CI={class:"vuecal__time-cell-label"},MI={key:1,class:"vuecal__flex vuecal__week-numbers",column:""},zI=["wrap","column"],wI=["onBlur","innerHTML"],_I=["innerHTML"],kI=["innerHTML"],HI=["wrap"],VI=["innerHTML"],LI=["innerHTML"],SI={key:2,class:"vuecal__cell-events-count"},AI={key:3,class:"vuecal__no-event"},TI=["onBlur","innerHTML"],EI=["innerHTML"],NI={key:2,class:"vuecal__event-time"},DI={key:0},OI={key:1,class:"days-to-end"},PI=["innerHTML"],BI={key:0,class:"vuecal__scrollbar-check"};function FI(e,t,a,r,n,c){const i=o.resolveComponent("vuecal-header"),s=o.resolveComponent("all-day-bar"),l=o.resolveComponent("weekdays-headings"),f=o.resolveComponent("vuecal-cell");return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["vuecal__flex vuecal",c.cssClasses]),column:"",ref:"vuecal",lang:a.locale},[o.createVNode(i,{options:e.$props,"edit-events":c.editEvents,"view-props":{views:c.views,weekDaysInHeader:c.weekDaysInHeader},"week-days":c.weekDays,"has-splits":c.hasSplits,"day-splits":c.daySplits,"switch-to-narrower-view":c.switchToNarrowerView},o.createSlots({"arrow-prev":o.withCtx(()=>[o.renderSlot(e.$slots,"arrow-prev",{},()=>[t[0]||(t[0]=o.createTextVNode(" ")),t[1]||(t[1]=o.createElementVNode("i",{class:"angle"},null,-1)),t[2]||(t[2]=o.createTextVNode(" "))])]),"arrow-next":o.withCtx(()=>[o.renderSlot(e.$slots,"arrow-next",{},()=>[t[3]||(t[3]=o.createTextVNode(" ")),t[4]||(t[4]=o.createElementVNode("i",{class:"angle"},null,-1)),t[5]||(t[5]=o.createTextVNode(" "))])]),"today-button":o.withCtx(()=>[o.renderSlot(e.$slots,"today-button",{},()=>[o.createElementVNode("span",mI,o.toDisplayString(n.texts.today),1)])]),title:o.withCtx(()=>[o.renderSlot(e.$slots,"title",{title:c.viewTitle,view:n.view},()=>[o.createTextVNode(o.toDisplayString(c.viewTitle),1)])]),_:2},[e.$slots["weekday-heading"]?{name:"weekday-heading",fn:o.withCtx(({heading:u,view:d})=>[o.renderSlot(e.$slots,"weekday-heading",{heading:u,view:d})]),key:"0"}:void 0,e.$slots["split-label"]?{name:"split-label",fn:o.withCtx(({split:u})=>[o.renderSlot(e.$slots,"split-label",{split:u,view:n.view.id})]),key:"1"}:void 0]),1032,["options","edit-events","view-props","week-days","has-splits","day-splits","switch-to-narrower-view"]),a.hideBody?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",pI,[o.createVNode(o.Transition,{name:`slide-fade--${n.transitionDirection}`,appear:a.transitions},{default:o.withCtx(()=>[(o.openBlock(),o.createElementBlock("div",{class:"vuecal__flex",style:{"min-width":"100%"},key:a.transitions?n.view.id:!1,column:""},[a.showAllDayEvents&&c.hasTimeColumn&&(!c.cellOrSplitMinWidth||c.isDayView&&!a.minSplitWidth)?(o.openBlock(),o.createBlock(s,o.normalizeProps(o.mergeProps({key:0},c.allDayBar)),{event:o.withCtx(({event:u,view:d})=>[o.renderSlot(e.$slots,"event",{view:d,event:u},()=>[c.editEvents.title&&u.titleEditable?(o.openBlock(),o.createElementBlock("div",{key:0,class:"vuecal__event-title vuecal__event-title--edit",contenteditable:"",onBlur:h=>c.onEventTitleBlur(h,u),innerHTML:u.title},null,40,vI)):u.title?(o.openBlock(),o.createElementBlock("div",{key:1,class:"vuecal__event-title",innerHTML:u.title},null,8,gI)):o.createCommentVNode("",!0),u.content&&!c.hasShortEvents&&!c.isShortMonthView?(o.openBlock(),o.createElementBlock("div",{key:2,class:"vuecal__event-content",innerHTML:u.content},null,8,yI)):o.createCommentVNode("",!0)])]),_:3},16)):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(["vuecal__bg",{vuecal__flex:!c.hasTimeColumn}]),column:""},[o.createElementVNode("div",xI,[c.hasTimeColumn?(o.openBlock(),o.createElementBlock("div",bI,[a.showAllDayEvents&&c.cellOrSplitMinWidth&&!(c.isDayView&&!a.minSplitWidth)?(o.openBlock(),o.createElementBlock("div",{key:0,class:"vuecal__all-day-text",style:o.normalizeStyle({height:c.allDayBar.height})},[o.createElementVNode("span",null,o.toDisplayString(n.texts.allDay),1)],4)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(c.timeCells,(u,d)=>(o.openBlock(),o.createElementBlock("div",{class:"vuecal__time-cell",key:d,style:o.normalizeStyle(`height: ${a.timeCellHeight}px`)},[o.renderSlot(e.$slots,"time-cell",{hours:u.hours,minutes:u.minutes},()=>[t[6]||(t[6]=o.createElementVNode("span",{class:"vuecal__time-cell-line"},null,-1)),o.createElementVNode("span",CI,o.toDisplayString(u.label),1)])],4))),128))])):o.createCommentVNode("",!0),a.showWeekNumbers&&c.isMonthView?(o.openBlock(),o.createElementBlock("div",MI,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(6,u=>o.createElementVNode("div",{class:"vuecal__flex vuecal__week-number-cell",key:u,grow:""},[o.renderSlot(e.$slots,"week-number-cell",{week:c.getWeekNumber(u-1)},()=>[o.createTextVNode(o.toDisplayString(c.getWeekNumber(u-1)),1)])])),64))])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(["vuecal__flex vuecal__cells",`${n.view.id}-view`]),grow:"",wrap:!c.cellOrSplitMinWidth||!c.isWeekView,column:!!c.cellOrSplitMinWidth},[c.cellOrSplitMinWidth&&c.isWeekView?(o.openBlock(),o.createBlock(l,{key:0,"transition-direction":n.transitionDirection,"week-days":c.weekDays,"switch-to-narrower-view":c.switchToNarrowerView,style:o.normalizeStyle(c.cellOrSplitMinWidth?`min-width: ${c.cellOrSplitMinWidth}px`:"")},o.createSlots({_:2},[e.$slots["weekday-heading"]?{name:"weekday-heading",fn:o.withCtx(({heading:u,view:d})=>[o.renderSlot(e.$slots,"weekday-heading",{heading:u,view:d})]),key:"0"}:void 0,e.$slots["split-label"]?{name:"split-label",fn:o.withCtx(({split:u})=>[o.renderSlot(e.$slots,"split-label",{split:u,view:n.view.id})]),key:"1"}:void 0]),1032,["transition-direction","week-days","switch-to-narrower-view","style"])):c.hasSplits&&a.stickySplitLabels&&a.minSplitWidth?(o.openBlock(),o.createElementBlock("div",{key:1,class:"vuecal__flex vuecal__split-days-headers",style:o.normalizeStyle(c.cellOrSplitMinWidth?`min-width: ${c.cellOrSplitMinWidth}px`:"")},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(c.daySplits,(u,d)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["day-split-header",u.class||!1]),key:d},[o.renderSlot(e.$slots,"split-label",{split:u,view:n.view.id},()=>[o.createTextVNode(o.toDisplayString(u.label),1)])],2))),128))],4)):o.createCommentVNode("",!0),a.showAllDayEvents&&c.hasTimeColumn&&(c.isWeekView&&c.cellOrSplitMinWidth||c.isDayView&&c.hasSplits&&a.minSplitWidth)?(o.openBlock(),o.createBlock(s,o.normalizeProps(o.mergeProps({key:2},c.allDayBar)),{event:o.withCtx(({event:u,view:d})=>[o.renderSlot(e.$slots,"event",{view:d,event:u},()=>[c.editEvents.title&&u.titleEditable?(o.openBlock(),o.createElementBlock("div",{key:0,class:"vuecal__event-title vuecal__event-title--edit",contenteditable:"",onBlur:h=>c.onEventTitleBlur(h,u),innerHTML:u.title},null,40,wI)):u.title?(o.openBlock(),o.createElementBlock("div",{key:1,class:"vuecal__event-title",innerHTML:u.title},null,8,_I)):o.createCommentVNode("",!0),u.content&&!c.hasShortEvents&&!c.isShortMonthView?(o.openBlock(),o.createElementBlock("div",{key:2,class:"vuecal__event-content",innerHTML:u.content},null,8,kI)):o.createCommentVNode("",!0)])]),_:3},16)):o.createCommentVNode("",!0),o.createElementVNode("div",{class:"vuecal__flex",ref:u=>n.cellsEl=u,grow:"",wrap:!c.cellOrSplitMinWidth||!c.isWeekView,style:o.normalizeStyle(c.cellOrSplitMinWidth?`min-width: ${c.cellOrSplitMinWidth}px`:"")},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(c.viewCells,(u,d)=>(o.openBlock(),o.createBlock(f,{key:d,options:e.$props,"edit-events":c.editEvents,data:u,"cell-width":a.hideWeekdays.length&&(c.isWeekView||c.isMonthView)&&c.cellWidth,"min-timestamp":c.minTimestamp,"max-timestamp":c.maxTimestamp,"cell-splits":c.hasSplits&&c.daySplits||[]},{"cell-content":o.withCtx(({events:h,split:m,selectCell:v})=>[o.renderSlot(e.$slots,"cell-content",{cell:u,view:n.view,goNarrower:v,events:h},()=>[m&&!a.stickySplitLabels?(o.openBlock(),o.createElementBlock("div",{key:0,class:"split-label",innerHTML:m.label},null,8,VI)):o.createCommentVNode("",!0),u.content?(o.openBlock(),o.createElementBlock("div",{key:1,class:"vuecal__cell-date",innerHTML:u.content},null,8,LI)):o.createCommentVNode("",!0),(c.isMonthView&&!a.eventsOnMonthView||c.isYearsOrYearView&&a.eventsCountOnYearView)&&h.length?(o.openBlock(),o.createElementBlock("div",SI,[o.renderSlot(e.$slots,"events-count",{view:n.view,events:h},()=>[o.createTextVNode(o.toDisplayString(h.length),1)])])):o.createCommentVNode("",!0),!c.cellOrSplitHasEvents(h,m)&&c.isWeekOrDayView?(o.openBlock(),o.createElementBlock("div",AI,[o.renderSlot(e.$slots,"no-event",{},()=>[o.createTextVNode(o.toDisplayString(n.texts.noEvent),1)])])):o.createCommentVNode("",!0)])]),event:o.withCtx(({event:h,view:m})=>[o.renderSlot(e.$slots,"event",{view:m,event:h},()=>[c.editEvents.title&&h.titleEditable?(o.openBlock(),o.createElementBlock("div",{key:0,class:"vuecal__event-title vuecal__event-title--edit",contenteditable:"",onBlur:v=>c.onEventTitleBlur(v,h),innerHTML:h.title},null,40,TI)):h.title?(o.openBlock(),o.createElementBlock("div",{key:1,class:"vuecal__event-title",innerHTML:h.title},null,8,EI)):o.createCommentVNode("",!0),a.time&&!h.allDay&&!(c.isMonthView&&(h.allDay||a.showAllDayEvents==="short"))&&!c.isShortMonthView?(o.openBlock(),o.createElementBlock("div",NI,[o.createTextVNode(o.toDisplayString(n.utils.date.formatTime(h.start,c.TimeFormat)),1),h.endTimeMinutes?(o.openBlock(),o.createElementBlock("span",DI," - "+o.toDisplayString(n.utils.date.formatTime(h.end,c.TimeFormat,null,!0)),1)):o.createCommentVNode("",!0),h.daysCount>1&&(h.segments[u.formattedDate]||{}).isFirstDay?(o.openBlock(),o.createElementBlock("small",OI," +"+o.toDisplayString(h.daysCount-1)+o.toDisplayString((n.texts.day[0]||"").toLowerCase()),1)):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),h.content&&!(c.isMonthView&&h.allDay&&a.showAllDayEvents==="short")&&!c.isShortMonthView?(o.openBlock(),o.createElementBlock("div",{key:3,class:"vuecal__event-content",innerHTML:h.content},null,8,PI)):o.createCommentVNode("",!0)])]),"no-event":o.withCtx(()=>[o.renderSlot(e.$slots,"no-event",{},()=>[o.createTextVNode(o.toDisplayString(n.texts.noEvent),1)])]),_:2},1032,["options","edit-events","data","cell-width","min-timestamp","max-timestamp","cell-splits"]))),128))],12,HI)],10,zI)])],2)]))]),_:3},8,["name","appear"]),n.ready?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",BI,t[7]||(t[7]=[o.createElementVNode("div",null,null,-1)])))]))],10,hI)}const Sa=24*60,$8={weekDays:Array(7).fill(""),weekDaysShort:[],months:Array(12).fill(""),years:"",year:"",month:"",week:"",day:"",today:"",noEvent:"",allDay:"",deleteEvent:"",createEvent:"",dateFormat:"dddd MMMM D, YYYY",am:"am",pm:"pm"},Ru=["years","year","month","week","day"],Iu=new kR($8),RI={name:"vue-cal",components:{"vuecal-cell":Gg,"vuecal-header":ZR,WeekdaysHeadings:Yg,AllDayBar:dI},provide(){return{vuecal:this,utils:this.utils,modules:this.modules,previous:this.previous,next:this.next,switchView:this.switchView,updateSelectedDate:this.updateSelectedDate,editEvents:this.editEvents,view:this.view,domEvents:this.domEvents}},props:{activeView:{type:String,default:"week"},allDayBarHeight:{type:[String,Number],default:"25px"},cellClickHold:{type:Boolean,default:!0},cellContextmenu:{type:Boolean,default:!1},clickToNavigate:{type:Boolean,default:!1},dblclickToNavigate:{type:Boolean,default:!0},disableDatePrototypes:{type:Boolean,default:!1},disableDays:{type:Array,default:()=>[]},disableViews:{type:Array,default:()=>[]},dragToCreateEvent:{type:Boolean,default:!0},dragToCreateThreshold:{type:Number,default:15},editableEvents:{type:[Boolean,Object],default:!1},events:{type:Array,default:()=>[]},eventsCountOnYearView:{type:Boolean,default:!1},eventsOnMonthView:{type:[Boolean,String],default:!1},hideBody:{type:Boolean,default:!1},hideTitleBar:{type:Boolean,default:!1},hideViewSelector:{type:Boolean,default:!1},hideWeekdays:{type:Array,default:()=>[]},hideWeekends:{type:Boolean,default:!1},locale:{type:[String,Object],default:"en"},maxDate:{type:[String,Date],default:""},minCellWidth:{type:Number,default:0},minDate:{type:[String,Date],default:""},minEventWidth:{type:Number,default:0},minSplitWidth:{type:Number,default:0},onEventClick:{type:[Function,null],default:null},onEventCreate:{type:[Function,null],default:null},onEventDblclick:{type:[Function,null],default:null},overlapsPerTimeStep:{type:Boolean,default:!1},resizeX:{type:Boolean,default:!1},selectedDate:{type:[String,Date],default:""},showAllDayEvents:{type:[Boolean,String],default:!1},showTimeInCells:{type:Boolean,default:!1},showWeekNumbers:{type:[Boolean,String],default:!1},snapToTime:{type:Number,default:0},small:{type:Boolean,default:!1},specialHours:{type:Object,default:()=>({})},splitDays:{type:Array,default:()=>[]},startWeekOnSunday:{type:Boolean,default:!1},stickySplitLabels:{type:Boolean,default:!1},time:{type:Boolean,default:!0},timeCellHeight:{type:Number,default:40},timeFormat:{type:String,default:""},timeFrom:{type:Number,default:0},timeStep:{type:Number,default:60},timeTo:{type:Number,default:Sa},todayButton:{type:Boolean,default:!1},transitions:{type:Boolean,default:!0},twelveHour:{type:Boolean,default:!1},watchRealTime:{type:Boolean,default:!1},xsmall:{type:Boolean,default:!1}},data(){return{ready:!1,texts:{...$8},utils:{date:(this.disableDatePrototypes?Iu.removePrototypes():!1)||Iu,cell:null,event:null},modules:{dnd:null},cellsEl:null,view:{id:"",title:"",startDate:null,endDate:null,firstCellDate:null,lastCellDate:null,selectedDate:null,events:[]},eventIdIncrement:1,now:new Date,timeTickerIds:[null,null],domEvents:{resizeAnEvent:{_eid:null,start:null,split:null,segment:null,originalEndTimeMinutes:0,originalEnd:null,end:null,startCell:null,endCell:null},dragAnEvent:{_eid:null},dragCreateAnEvent:{startCursorY:null,start:null,split:null,event:null},focusAnEvent:{_eid:null,mousedUp:!1},clickHoldAnEvent:{_eid:null,timeout:1200,timeoutId:null},dblTapACell:{taps:0,timeout:500},clickHoldACell:{cellId:null,split:null,timeout:1200,timeoutId:null,eventCreated:!1},cancelClickEventCreation:!1},mutableEvents:[],transitionDirection:"right"}},methods:{async loadLocale(e){if(typeof this.locale=="object"){this.texts=Object.assign({},$8,e),this.utils.date.updateTexts(this.texts);return}const t=await _R(Object.assign({"./i18n/ar.json":()=>Promise.resolve().then(()=>require("./ar.es-490d67d4.cjs")),"./i18n/bg.json":()=>Promise.resolve().then(()=>require("./bg.es-bedb7f61.cjs")),"./i18n/bn.json":()=>Promise.resolve().then(()=>require("./bn.es-ae104b8b.cjs")),"./i18n/bs.json":()=>Promise.resolve().then(()=>require("./bs.es-a97484a8.cjs")),"./i18n/ca.json":()=>Promise.resolve().then(()=>require("./ca.es-b69e2d93.cjs")),"./i18n/cs.json":()=>Promise.resolve().then(()=>require("./cs.es-8ab45a8b.cjs")),"./i18n/da.json":()=>Promise.resolve().then(()=>require("./da.es-20dd8f16.cjs")),"./i18n/de.json":()=>Promise.resolve().then(()=>require("./de.es-ce7009ce.cjs")),"./i18n/el.json":()=>Promise.resolve().then(()=>require("./el.es-81fc2434.cjs")),"./i18n/en.json":()=>Promise.resolve().then(()=>require("./en.es-4459b8a4.cjs")),"./i18n/es.json":()=>Promise.resolve().then(()=>require("./es.es-647dceed.cjs")),"./i18n/et.json":()=>Promise.resolve().then(()=>require("./et.es-482e868f.cjs")),"./i18n/fa.json":()=>Promise.resolve().then(()=>require("./fa.es-2c02433c.cjs")),"./i18n/fi.json":()=>Promise.resolve().then(()=>require("./fi.es-ef678961.cjs")),"./i18n/fr.json":()=>Promise.resolve().then(()=>require("./fr.es-5a023084.cjs")),"./i18n/he.json":()=>Promise.resolve().then(()=>require("./he.es-be02cfd4.cjs")),"./i18n/hr.json":()=>Promise.resolve().then(()=>require("./hr.es-5c9e8373.cjs")),"./i18n/hu.json":()=>Promise.resolve().then(()=>require("./hu.es-642f7e7a.cjs")),"./i18n/id.json":()=>Promise.resolve().then(()=>require("./id.es-ebe22526.cjs")),"./i18n/is.json":()=>Promise.resolve().then(()=>require("./is.es-960071df.cjs")),"./i18n/it.json":()=>Promise.resolve().then(()=>require("./it.es-f0d29f01.cjs")),"./i18n/ja.json":()=>Promise.resolve().then(()=>require("./ja.es-25a3e4cf.cjs")),"./i18n/ka.json":()=>Promise.resolve().then(()=>require("./ka.es-92c6a6ae.cjs")),"./i18n/ko.json":()=>Promise.resolve().then(()=>require("./ko.es-204ba1aa.cjs")),"./i18n/lt.json":()=>Promise.resolve().then(()=>require("./lt.es-afedf093.cjs")),"./i18n/mn.json":()=>Promise.resolve().then(()=>require("./mn.es-ced8667c.cjs")),"./i18n/nl.json":()=>Promise.resolve().then(()=>require("./nl.es-cd172132.cjs")),"./i18n/no.json":()=>Promise.resolve().then(()=>require("./no.es-d5134e5f.cjs")),"./i18n/pl.json":()=>Promise.resolve().then(()=>require("./pl.es-9f065e71.cjs")),"./i18n/pt-br.json":()=>Promise.resolve().then(()=>require("./pt-br.es-e0a38ecf.cjs")),"./i18n/pt-pt.json":()=>Promise.resolve().then(()=>require("./pt-pt.es-e1c57c62.cjs")),"./i18n/ro.json":()=>Promise.resolve().then(()=>require("./ro.es-a7e3858d.cjs")),"./i18n/ru.json":()=>Promise.resolve().then(()=>require("./ru.es-d26a8889.cjs")),"./i18n/sk.json":()=>Promise.resolve().then(()=>require("./sk.es-bfa34829.cjs")),"./i18n/sl.json":()=>Promise.resolve().then(()=>require("./sl.es-c79ab9b5.cjs")),"./i18n/sq.json":()=>Promise.resolve().then(()=>require("./sq.es-a902c2a8.cjs")),"./i18n/sr.json":()=>Promise.resolve().then(()=>require("./sr.es-2e429690.cjs")),"./i18n/sv.json":()=>Promise.resolve().then(()=>require("./sv.es-59b30e12.cjs")),"./i18n/tr.json":()=>Promise.resolve().then(()=>require("./tr.es-11b49d30.cjs")),"./i18n/uk.json":()=>Promise.resolve().then(()=>require("./uk.es-cfb0b466.cjs")),"./i18n/vi.json":()=>Promise.resolve().then(()=>require("./vi.es-daedaaa5.cjs")),"./i18n/zh-cn.json":()=>Promise.resolve().then(()=>require("./zh-cn.es-efbc1299.cjs")),"./i18n/zh-hk.json":()=>Promise.resolve().then(()=>require("./zh-hk.es-b6a4db4a.cjs"))}),`./i18n/${e}.json`,3);this.texts=Object.assign({},$8,t),this.utils.date.updateTexts(this.texts)},loadDragAndDrop(){Promise.resolve().then(()=>require("./drag-and-drop.es-cdb95efc.cjs")).then(e=>{const{DragAndDrop:t}=e;this.modules.dnd=new t(this)}).catch(()=>console.warn("Vue Cal: Missing drag & drop module."))},validateView(e){return Ru.includes(e)||(console.error(`Vue Cal: invalid active-view parameter provided: "${e}".
779
- A valid view must be one of: ${Ru.join(", ")}.`),e="week"),this.enabledViews.includes(e)||(console.warn(`Vue Cal: the provided active-view "${e}" is disabled. Using the "${this.enabledViews[0]}" view instead.`),e=this.enabledViews[0]),e},switchToNarrowerView(e=null){this.transitionDirection="right";const t=this.enabledViews[this.enabledViews.indexOf(this.view.id)+1];t&&this.switchView(t,e)},switchView(e,t=null,a=!1){e=this.validateView(e);const r=this.utils.date,n=this.view.startDate&&this.view.startDate.getTime();if(this.transitions&&a){if(this.view.id===e)return;const s=this.enabledViews;this.transitionDirection=s.indexOf(this.view.id)>s.indexOf(e)?"left":"right"}const c=this.view.id;switch(this.view.events=[],this.view.id=e,this.view.firstCellDate=null,this.view.lastCellDate=null,t||(t=this.view.selectedDate||this.view.startDate),e){case"years":{this.view.startDate=new Date(Math.floor(t.getFullYear()/25)*25||2e3,0,1),this.view.endDate=new Date(this.view.startDate.getFullYear()+25,0,1),this.view.endDate.setSeconds(-1);break}case"year":{this.view.startDate=new Date(t.getFullYear(),0,1),this.view.endDate=new Date(t.getFullYear()+1,0,1),this.view.endDate.setSeconds(-1);break}case"month":{this.view.startDate=new Date(t.getFullYear(),t.getMonth(),1),this.view.endDate=new Date(t.getFullYear(),t.getMonth()+1,1),this.view.endDate.setSeconds(-1);let s=new Date(this.view.startDate);if(s.getDay()!==(this.startWeekOnSunday?0:1)&&(s=r.getPreviousFirstDayOfWeek(s,this.startWeekOnSunday)),this.view.firstCellDate=s,this.view.lastCellDate=r.addDays(s,41),this.view.lastCellDate.setHours(23,59,59,0),this.hideWeekends){if([0,6].includes(this.view.firstCellDate.getDay())){const l=this.view.firstCellDate.getDay()===6&&!this.startWeekOnSunday?2:1;this.view.firstCellDate=r.addDays(this.view.firstCellDate,l)}if([0,6].includes(this.view.startDate.getDay())){const l=this.view.startDate.getDay()===6?2:1;this.view.startDate=r.addDays(this.view.startDate,l)}if([0,6].includes(this.view.lastCellDate.getDay())){const l=this.view.lastCellDate.getDay()===0&&!this.startWeekOnSunday?2:1;this.view.lastCellDate=r.subtractDays(this.view.lastCellDate,l)}if([0,6].includes(this.view.endDate.getDay())){const l=this.view.endDate.getDay()===0?2:1;this.view.endDate=r.subtractDays(this.view.endDate,l)}}break}case"week":{t=r.getPreviousFirstDayOfWeek(t,this.startWeekOnSunday);const s=this.hideWeekends?5:7;this.view.startDate=this.hideWeekends&&this.startWeekOnSunday?r.addDays(t,1):t,this.view.startDate.setHours(0,0,0,0),this.view.endDate=r.addDays(t,s),this.view.endDate.setSeconds(-1);break}case"day":{this.view.startDate=t,this.view.startDate.setHours(0,0,0,0),this.view.endDate=new Date(t),this.view.endDate.setHours(23,59,59,0);break}}this.addEventsToView();const i=this.view.startDate&&this.view.startDate.getTime();if(!(c===e&&i===n)&&(this.$emit("update:activeView",e),this.ready)){const s=this.view.startDate,l={view:e,startDate:s,endDate:this.view.endDate,...this.isMonthView?{firstCellDate:this.view.firstCellDate,lastCellDate:this.view.lastCellDate,outOfScopeEvents:this.view.outOfScopeEvents.map(this.cleanupEvent)}:{},events:this.view.events.map(this.cleanupEvent),...this.isWeekView?{week:r.getWeek(this.startWeekOnSunday?r.addDays(s,1):s)}:{}};this.$emit("view-change",l)}},previous(){this.previousNext(!1)},next(){this.previousNext()},previousNext(e=!0){const t=this.utils.date;this.transitionDirection=e?"right":"left";const a=e?1:-1;let r=null;const{startDate:n,id:c}=this.view;switch(c){case"years":r=new Date(n.getFullYear()+25*a,0,1);break;case"year":r=new Date(n.getFullYear()+1*a,1,1);break;case"month":r=new Date(n.getFullYear(),n.getMonth()+1*a,1);break;case"week":r=t[e?"addDays":"subtractDays"](t.getPreviousFirstDayOfWeek(n,this.startWeekOnSunday),7);break;case"day":r=t[e?"addDays":"subtractDays"](n,1);const i=r.getDay(),s=this.startWeekOnSunday?i:(i||7)-1;if(this.weekDays[s].hide){const f=this.weekDays.map((d,h)=>({...d,i:h}));let u=0;e?([...f.slice(s),...f].find(d=>(u++,!d.hide)).i,u--):[...f,...f.slice(0,s)].reverse().find(d=>(u++,!d.hide)).i,r=t[e?"addDays":"subtractDays"](r,u)}break}r&&this.switchView(c,r)},addEventsToView(e=[]){const t=this.utils.event,{startDate:a,endDate:r,firstCellDate:n,lastCellDate:c}=this.view;if(e.length||(this.view.events=[]),e=e.length?e:[...this.mutableEvents],!e||this.isYearsOrYearView&&!this.eventsCountOnYearView)return;let i=e.filter(s=>t.eventInRange(s,a,r));!this.isYearsOrYearView&&!(this.isMonthView&&!this.eventsOnMonthView)&&(i=i.map(s=>s.daysCount>1?t.createEventSegments(s,n||a,c||r):s)),this.view.events.push(...i),this.isMonthView&&(this.view.outOfScopeEvents=[],e.forEach(s=>{(t.eventInRange(s,n,a)||t.eventInRange(s,r,c))&&(this.view.events.some(l=>l._eid===s._eid)||this.view.outOfScopeEvents.push(s))}))},findAncestor(e,t){for(;(e=e.parentElement)&&!e.classList.contains(t););return e},isDOMElementAnEvent(e){return e.classList.contains("vuecal__event")||this.findAncestor(e,"vuecal__event")},onMouseMove(e){const{resizeAnEvent:t,dragAnEvent:a,dragCreateAnEvent:r}=this.domEvents;t._eid===null&&a._eid===null&&!r.start||(e.preventDefault(),t._eid?this.eventResizing(e):this.dragToCreateEvent&&r.start&&this.eventDragCreation(e))},onMouseUp(e){const{focusAnEvent:t,resizeAnEvent:a,clickHoldAnEvent:r,clickHoldACell:n,dragCreateAnEvent:c}=this.domEvents,{_eid:i}=r,{_eid:s}=a;let l=!1;const{event:f,start:u}=c,d=this.isDOMElementAnEvent(e.target),h=t.mousedUp;if(t.mousedUp=!1,d&&(this.domEvents.cancelClickEventCreation=!0),n.eventCreated)return;if(s){const{originalEnd:v,originalEndTimeMinutes:p,endTimeMinutes:g}=a,y=this.view.events.find(x=>x._eid===a._eid);if(l=g&&g!==p,y&&y.end.getTime()!==v.getTime()){const x=this.mutableEvents.find(M=>M._eid===a._eid);x.endTimeMinutes=y.endTimeMinutes,x.end=y.end;const C=this.cleanupEvent(y),b={...this.cleanupEvent(y),end:v,endTimeMinutes:y.originalEndTimeMinutes};this.$emit("event-duration-change",{event:C,oldDate:a.originalEnd,originalEvent:b}),this.$emit("event-change",{event:C,originalEvent:b})}y&&(y.resizing=!1),a._eid=null,a.start=null,a.split=null,a.segment=null,a.originalEndTimeMinutes=null,a.originalEnd=null,a.endTimeMinutes=null,a.startCell=null,a.endCell=null}else u&&(f&&(this.emitWithEvent("event-drag-create",f),c.event.resizing=!1),c.start=null,c.split=null,c.event=null);!d&&!s&&this.unfocusEvent(),r.timeoutId&&!i&&(clearTimeout(r.timeoutId),r.timeoutId=null),n.timeoutId&&(clearTimeout(n.timeoutId),n.timeoutId=null);const m=typeof this.onEventClick=="function";if(h&&!l&&!i&&!f&&m){let v=this.view.events.find(p=>p._eid===t._eid);return!v&&this.isMonthView&&(v=this.view.outOfScopeEvents.find(p=>p._eid===t._eid)),v&&this.onEventClick(v,e)}},onKeyUp(e){e.keyCode===27&&this.cancelDelete()},eventResizing(e){const{resizeAnEvent:t}=this.domEvents,a=this.view.events.find(f=>f._eid===t._eid)||{segments:{}},{minutes:r,cursorCoords:n}=this.minutesAtCursor(e),c=a.segments&&a.segments[t.segment],{date:i,event:s}=this.utils,l=Math.max(r,this.timeFrom+1,(c||a).startTimeMinutes+1);if(a.endTimeMinutes=t.endTimeMinutes=l,this.snapToTime){const f=a.endTimeMinutes+this.snapToTime/2;a.endTimeMinutes=f-f%this.snapToTime}if(c&&(c.endTimeMinutes=a.endTimeMinutes),a.end.setHours(0,a.endTimeMinutes,a.endTimeMinutes===Sa?-1:0,0),this.resizeX&&this.isWeekView){a.daysCount=i.countDays(a.start,a.end);const f=this.cellsEl,u=f.offsetWidth/f.childElementCount,d=Math.floor(n.x/u);if(t.startCell===null&&(t.startCell=d-(a.daysCount-1)),t.endCell!==d){t.endCell=d;const h=i.addDays(a.start,d-t.startCell),m=Math.max(i.countDays(a.start,h),1);if(m!==a.daysCount){let v=null;m>a.daysCount?v=s.addEventSegment(a):v=s.removeEventSegment(a),t.segment=v,a.endTimeMinutes+=.001}}}this.$emit("event-resizing",{_eid:a._eid,end:a.end,endTimeMinutes:a.endTimeMinutes})},eventDragCreation(e){const{dragCreateAnEvent:t}=this.domEvents,{start:a,startCursorY:r,split:n}=t,c=new Date(a),{minutes:i,cursorCoords:{y:s}}=this.minutesAtCursor(e);if(!(!t.event&&Math.abs(r-s)<this.dragToCreateThreshold))if(t.event){if(c.setHours(0,i,i===Sa?-1:0,0),this.snapToTime){let u=c.getHours()*60+c.getMinutes();const d=u+this.snapToTime/2;u=d-d%this.snapToTime,c.setHours(0,u,0,0)}const l=a<c,{event:f}=t;f.start=l?a:c,f.end=l?c:a,f.startTimeMinutes=f.start.getHours()*60+f.start.getMinutes(),f.endTimeMinutes=f.end.getHours()*60+f.end.getMinutes()}else{if(t.event=this.utils.event.createAnEvent(a,1,{split:n}),!t.event){t.start=null,t.split=null,t.event=null;return}t.event.resizing=!0}},unfocusEvent(){const{focusAnEvent:e,clickHoldAnEvent:t}=this.domEvents,a=this.view.events.find(r=>r._eid===(e._eid||t._eid));e._eid=null,t._eid=null,a&&(a.focused=!1,a.deleting=!1)},cancelDelete(){const{clickHoldAnEvent:e}=this.domEvents;if(e._eid){const t=this.view.events.find(a=>a._eid===e._eid);t&&(t.deleting=!1),e._eid=null,e.timeoutId=null}},onEventTitleBlur(e,t){if(t.title===e.target.innerHTML)return;const a=t.title;t.title=e.target.innerHTML;const r=this.cleanupEvent(t);this.$emit("event-title-change",{event:r,oldTitle:a}),this.$emit("event-change",{event:r,originalEvent:{...r,title:a}})},updateMutableEvents(){const e=this.utils.date;this.mutableEvents=[],this.events.forEach(t=>{const a=typeof t.start=="string"?e.stringToDate(t.start):t.start,r=e.formatDateLite(a),n=e.dateToMinutes(a);let c=null;typeof t.end=="string"&&t.end.includes("24:00")?(c=new Date(t.end.replace(" 24:00","")),c.setHours(23,59,59,0)):c=typeof t.end=="string"?e.stringToDate(t.end):t.end;let i=e.formatDateLite(c),s=e.dateToMinutes(c);(!s||s===Sa)&&(!this.time||typeof t.end=="string"&&t.end.length===10?c.setHours(23,59,59,0):c.setSeconds(c.getSeconds()-1),i=e.formatDateLite(c),s=Sa);const l=r!==i;t=Object.assign({...this.utils.event.eventDefaults},t,{_eid:`${this._.uid}_${this.eventIdIncrement++}`,segments:l?{}:null,start:a,startTimeMinutes:n,end:c,endTimeMinutes:s,daysCount:l?e.countDays(a,c):1,class:t.class}),this.mutableEvents.push(t)})},minutesAtCursor(e){return this.utils.cell.minutesAtCursor(e)},createEvent(e,t,a={}){return this.utils.event.createAnEvent(e,t,a)},cleanupEvent(e){return e={...e},["segments","deletable","deleting","titleEditable","resizable","resizing","draggable","dragging","draggingStatic","focused"].forEach(a=>{a in e&&delete e[a]}),e.repeat||delete e.repeat,e},emitWithEvent(e,t){this.$emit(e,this.cleanupEvent(t))},updateSelectedDate(e){if(e&&typeof e=="string"?e=this.utils.date.stringToDate(e):e=new Date(e),e&&e instanceof Date){const{selectedDate:t}=this.view;t&&(this.transitionDirection=t.getTime()>e.getTime()?"left":"right"),e.setHours(0,0,0,0),(!t||t.getTime()!==e.getTime())&&(this.view.selectedDate=e),this.switchView(this.view.id)}this.$emit("update:selected-date",this.view.selectedDate)},getWeekNumber(e){const t=this.utils.date,r=this.firstCellDateWeekNumber+e,n=this.startWeekOnSunday?1:0;return r>52?t.getWeek(t.addDays(this.view.firstCellDate,7*e+n)):r},timeTick(){this.now=new Date,this.timeTickerIds[1]=setTimeout(this.timeTick,60*1e3)},updateDateTexts(){this.utils.date.updateTexts(this.texts)},alignWithScrollbar(){if(document.getElementById("vuecal-align-with-scrollbar"))return;const e=this.$refs.vuecal.getElementsByClassName("vuecal__scrollbar-check")[0],t=e.offsetWidth-e.children[0].offsetWidth;if(t){const a=document.createElement("style");a.id="vuecal-align-with-scrollbar",a.type="text/css",a.innerHTML=`.vuecal--view-with-time .vuecal__weekdays-headings,.vuecal--view-with-time .vuecal__all-day {padding-right: ${t}px}`,document.head.appendChild(a)}},cellOrSplitHasEvents(e,t=null){return e.length&&(!t&&e.length||t&&e.some(a=>a.split===t.id))}},created(){this.utils.cell=new VR(this),this.utils.event=new SR(this,this.utils.date),this.loadLocale(this.locale),this.editEvents.drag&&this.loadDragAndDrop(),this.updateMutableEvents(this.events),this.view.id=this.currentView,this.selectedDate?this.updateSelectedDate(this.selectedDate):(this.view.selectedDate=new Date,this.switchView(this.currentView)),this.time&&this.watchRealTime&&(this.timeTickerIds[0]=setTimeout(this.timeTick,(60-this.now.getSeconds())*1e3))},mounted(){const e=this.utils.date,t="ontouchstart"in window,{resize:a,drag:r,create:n,delete:c,title:i}=this.editEvents,s=this.onEventClick&&typeof this.onEventClick=="function";(a||r||n||c||i||s)&&window.addEventListener(t?"touchend":"mouseup",this.onMouseUp),(a||r||n&&this.dragToCreateEvent)&&window.addEventListener(t?"touchmove":"mousemove",this.onMouseMove,{passive:!1}),i&&window.addEventListener("keyup",this.onKeyUp),t&&(this.$refs.vuecal.oncontextmenu=function(u){u.preventDefault(),u.stopPropagation()}),this.hideBody||this.alignWithScrollbar();const l=this.view.startDate,f={view:this.view.id,startDate:l,endDate:this.view.endDate,...this.isMonthView?{firstCellDate:this.view.firstCellDate,lastCellDate:this.view.lastCellDate}:{},events:this.view.events.map(this.cleanupEvent),...this.isWeekView?{week:e.getWeek(this.startWeekOnSunday?e.addDays(l,1):l)}:{}};this.$emit("ready",f),this.ready=!0},beforeUnmount(){const e="ontouchstart"in window;window.removeEventListener(e?"touchmove":"mousemove",this.onMouseMove,{passive:!1}),window.removeEventListener(e?"touchend":"mouseup",this.onMouseUp),window.removeEventListener("keyup",this.onKeyUp),this.timeTickerIds[0]&&clearTimeout(this.timeTickerIds[0]),this.timeTickerIds[1]&&clearTimeout(this.timeTickerIds[1]),this.timeTickerIds=[null,null]},computed:{editEvents(){return this.editableEvents&&typeof this.editableEvents=="object"?{title:!!this.editableEvents.title,drag:!!this.editableEvents.drag,resize:!!this.editableEvents.resize,create:!!this.editableEvents.create,delete:!!this.editableEvents.delete}:{title:!!this.editableEvents,drag:!!this.editableEvents,resize:!!this.editableEvents,create:!!this.editableEvents,delete:!!this.editableEvents}},views(){return{years:{label:this.texts.years,enabled:!this.disableViews.includes("years")},year:{label:this.texts.year,enabled:!this.disableViews.includes("year")},month:{label:this.texts.month,enabled:!this.disableViews.includes("month")},week:{label:this.texts.week,enabled:!this.disableViews.includes("week")},day:{label:this.texts.day,enabled:!this.disableViews.includes("day")}}},currentView(){return this.validateView(this.activeView)},enabledViews(){return Object.keys(this.views).filter(e=>this.views[e].enabled)},hasTimeColumn(){return this.time&&this.isWeekOrDayView},isShortMonthView(){return this.isMonthView&&this.eventsOnMonthView==="short"},firstCellDateWeekNumber(){const e=this.utils.date,t=this.view.firstCellDate;return e.getWeek(this.startWeekOnSunday?e.addDays(t,1):t)},timeCells(){const e=[];for(let t=this.timeFrom,a=this.timeTo;t<a;t+=this.timeStep)e.push({hours:Math.floor(t/60),minutes:t%60,label:this.utils.date.formatTime(t,this.TimeFormat),value:t});return e},TimeFormat(){return this.timeFormat||(this.twelveHour?"h:mm{am}":"HH:mm")},daySplits(){return(this.splitDays.filter(e=>!e.hide)||[]).map((e,t)=>({...e,id:e.id||t+1}))},hasSplits(){return this.daySplits.length&&this.isWeekOrDayView},hasShortEvents(){return this.showAllDayEvents==="short"},cellOrSplitMinWidth(){let e=null;return this.hasSplits&&this.minSplitWidth?e=this.visibleDaysCount*this.minSplitWidth*this.daySplits.length:this.minCellWidth&&this.isWeekView&&(e=this.visibleDaysCount*this.minCellWidth),e},allDayBar(){let e=this.allDayBarHeight||null;return e&&!isNaN(e)&&(e+="px"),{cells:this.viewCells,options:this.$props,label:this.texts.allDay,shortEvents:this.hasShortEvents,daySplits:this.hasSplits&&this.daySplits||[],cellOrSplitMinWidth:this.cellOrSplitMinWidth,height:e}},minTimestamp(){let e=null;return this.minDate&&typeof this.minDate=="string"?e=this.utils.date.stringToDate(this.minDate):this.minDate&&this.minDate instanceof Date&&(e=this.minDate),e?e.getTime():null},maxTimestamp(){let e=null;return this.maxDate&&typeof this.maxDate=="string"?e=this.utils.date.stringToDate(this.maxDate):this.maxDate&&this.maxDate instanceof Date&&(e=this.maxDate),e?e.getTime():null},weekDays(){let{weekDays:e,weekDaysShort:t=[]}=this.texts;return e=e.slice(0).map((a,r)=>({label:a,...t.length?{short:t[r]}:{},hide:this.hideWeekends&&r>=5||this.hideWeekdays.length&&this.hideWeekdays.includes(r+1)})),this.startWeekOnSunday&&e.unshift(e.pop()),e},weekDaysInHeader(){return this.isMonthView||this.isWeekView&&!this.minCellWidth&&!(this.hasSplits&&this.minSplitWidth)},months(){return this.texts.months.map(e=>({label:e}))},specialDayHours(){return!this.specialHours||!Object.keys(this.specialHours).length?{}:Array(7).fill("").map((e,t)=>{let a=this.specialHours[t+1]||[];return Array.isArray(a)||(a=[a]),e=[],a.forEach(({from:r,to:n,class:c,label:i},s)=>{e[s]={day:t+1,from:[null,void 0].includes(r)?null:r*1,to:[null,void 0].includes(n)?null:n*1,class:c||"",label:i||""}}),e})},viewTitle(){const e=this.utils.date;let t="";const a=this.view.startDate,r=a.getFullYear(),n=a.getMonth();switch(this.view.id){case"years":{t=this.texts.years;break}case"year":{t=r;break}case"month":{t=`${this.months[n].label} ${r}`;break}case"week":{const c=this.view.endDate,i=a.getFullYear();let s=this.texts.months[a.getMonth()];this.xsmall&&(s=s.substring(0,3));let l=`${s} ${i}`;if(c.getMonth()!==a.getMonth()){const f=c.getFullYear();let u=this.texts.months[c.getMonth()];this.xsmall&&(u=u.substring(0,3)),i===f?l=`${s} - ${u} ${i}`:this.small?l=`${s.substring(0,3)} ${i} - ${u.substring(0,3)} ${f}`:l=`${s} ${i} - ${u} ${f}`}t=`${this.texts.week} ${e.getWeek(this.startWeekOnSunday?e.addDays(a,1):a)} (${l})`;break}case"day":{t=this.utils.date.formatDate(a,this.texts.dateFormat,this.texts);break}}return t},viewCells(){const e=this.utils.date;let t=[],a=null,r=!1;this.watchRealTime||(this.now=new Date);const n=this.now;switch(this.view.id){case"years":{a=this.view.startDate.getFullYear(),t=Array.apply(null,Array(25)).map((c,i)=>{const s=new Date(a+i,0,1),l=new Date(a+i+1,0,1);return l.setSeconds(-1),{startDate:s,formattedDate:e.formatDateLite(s),endDate:l,content:a+i,current:a+i===n.getFullYear()}});break}case"year":{a=this.view.startDate.getFullYear(),t=Array.apply(null,Array(12)).map((c,i)=>{const s=new Date(a,i,1),l=new Date(a,i+1,1);return l.setSeconds(-1),{startDate:s,formattedDate:e.formatDateLite(s),endDate:l,content:this.xsmall?this.months[i].label.substr(0,3):this.months[i].label,current:i===n.getMonth()&&a===n.getFullYear()}});break}case"month":{const c=this.view.startDate.getMonth(),i=new Date(this.view.firstCellDate);r=!1,t=Array.apply(null,Array(42)).map((s,l)=>{const f=e.addDays(i,l),u=new Date(f);u.setHours(23,59,59,0);const d=!r&&e.isToday(f)&&!r++;return{startDate:f,formattedDate:e.formatDateLite(f),endDate:u,content:f.getDate(),today:d,outOfScope:f.getMonth()!==c,class:`vuecal__cell--day${f.getDay()||7}`}}),(this.hideWeekends||this.hideWeekdays.length)&&(t=t.filter(s=>{const l=s.startDate.getDay()||7;return!(this.hideWeekends&&l>=6||this.hideWeekdays.length&&this.hideWeekdays.includes(l))}));break}case"week":{r=!1;const c=this.view.startDate,i=this.weekDays;t=i.map((s,l)=>{const f=e.addDays(c,this.startWeekOnSunday&&this.hideWeekends?l-1:l),u=new Date(f);u.setHours(23,59,59,0);const d=(f.getDay()||7)-1;return{startDate:f,formattedDate:e.formatDateLite(f),endDate:u,today:!r&&e.isToday(f)&&!r++,specialHours:this.specialDayHours[d]||[]}}).filter((s,l)=>!i[l].hide);break}case"day":{const c=this.view.startDate,i=new Date(this.view.startDate);i.setHours(23,59,59,0);const s=(c.getDay()||7)-1;t=[{startDate:c,formattedDate:e.formatDateLite(c),endDate:i,today:e.isToday(c),specialHours:this.specialDayHours[s]||[]}];break}}return t},visibleDaysCount(){return this.isDayView?1:7-this.weekDays.reduce((e,t)=>e+t.hide,0)},cellWidth(){return 100/this.visibleDaysCount},cssClasses(){const{resizeAnEvent:e,dragAnEvent:t,dragCreateAnEvent:a}=this.domEvents;return{[`vuecal--${this.view.id}-view`]:!0,[`vuecal--${this.locale}`]:this.locale,"vuecal--no-time":!this.time,"vuecal--view-with-time":this.hasTimeColumn,"vuecal--week-numbers":this.showWeekNumbers&&this.isMonthView,"vuecal--twelve-hour":this.twelveHour,"vuecal--click-to-navigate":this.clickToNavigate,"vuecal--hide-weekends":this.hideWeekends,"vuecal--split-days":this.hasSplits,"vuecal--sticky-split-labels":this.hasSplits&&this.stickySplitLabels,"vuecal--overflow-x":this.minCellWidth&&this.isWeekView||this.hasSplits&&this.minSplitWidth,"vuecal--small":this.small,"vuecal--xsmall":this.xsmall,"vuecal--resizing-event":e._eid,"vuecal--drag-creating-event":a.event,"vuecal--dragging-event":t._eid,"vuecal--events-on-month-view":this.eventsOnMonthView,"vuecal--short-events":this.isMonthView&&this.eventsOnMonthView==="short","vuecal--has-touch":typeof window<"u"&&"ontouchstart"in window}},isYearsOrYearView(){return["years","year"].includes(this.view.id)},isYearsView(){return this.view.id==="years"},isYearView(){return this.view.id==="year"},isMonthView(){return this.view.id==="month"},isWeekOrDayView(){return["week","day"].includes(this.view.id)},isWeekView(){return this.view.id==="week"},isDayView(){return this.view.id==="day"}},watch:{events:{handler(e,t){this.updateMutableEvents(e),this.addEventsToView()},deep:!0},locale(e){this.loadLocale(e)},selectedDate(e){this.updateSelectedDate(e)},activeView(e){this.switchView(e)}}},II=ma(RI,[["render",FI]]),wc=o.defineComponent({__name:"PgaEditButton",props:{withoutText:{type:Boolean},fullWidth:{type:Boolean}},setup(e){const t=_2("pgaButton");return(a,r)=>(o.openBlock(),o.createBlock(L2,{class:"edit-button",variant:"flat",color:"sky",icon:["far","pen-to-square"],text:a.withoutText?void 0:o.unref(t)("editBtn"),size:"s",fullWidth:a.fullWidth,align:"left"},null,8,["text","fullWidth"]))}}),$I={class:"alert"},UI={class:"alert--content"},WI=["textContent"],qI={class:"alert--buttons"},jI=o.defineComponent({__name:"Alert",props:{message:{type:[String,Number,Function]},handleAcceptFn:{type:Function},handleCloseFn:{type:Function}},setup(e){const t=Cg.directive,a=_2("alert");return o.onMounted(()=>ic(!1)),o.onUnmounted(()=>ic(!0)),(r,n)=>(o.openBlock(),o.createElementBlock("div",$I,[o.withDirectives((o.openBlock(),o.createElementBlock("div",UI,[o.createVNode(Oe,{class:"alert--icon",icon:"land-mine-on"}),o.createElementVNode("span",{class:"alert--title",textContent:o.toDisplayString(o.unref(a)("alertTitle"))},null,8,WI),r.message?(o.openBlock(),o.createBlock(ye,{key:0,class:"alert--message",text:r.message},null,8,["text"])):o.createCommentVNode("",!0),o.createElementVNode("div",qI,[o.createVNode(L2,{class:"alert--button",text:o.unref(a)("cancelBtn"),variant:"filled",color:"grey",onClick:n[0]||(n[0]=c=>r.handleCloseFn())},null,8,["text"]),o.createVNode(L2,{class:"alert--button",text:o.unref(a)("acceptBtn"),variant:"filled",color:"danger",onClick:n[1]||(n[1]=c=>r.handleAcceptFn())},null,8,["text"])])])),[[o.unref(t),r.handleCloseFn]])]))}});const YI=I1(jI,[["__scopeId","data-v-5b1756ec"]]);function Xg(e,t){const a=document.createElement("div");document.body.appendChild(a);const r=o.createApp({render(){return o.h(YI,{message:e,handleAcceptFn:c,handleCloseFn:n})}});r.mount(a);function n(){r.unmount(),document.body.removeChild(a)}function c(){n(),t()}}const wn=o.defineComponent({__name:"PgaDeleteButton",props:{variant:{default:"flat"},icon:{default:"trash"},text:{},withoutText:{type:Boolean},withoutConfirm:{type:Boolean},confirmDeleteText:{}},emits:["deleteConfirmed"],setup(e,{emit:t}){const a=e,r=t,n=_2("pgaButton");function c(){if(a.withoutConfirm){r("deleteConfirmed");return}const i=a.confirmDeleteText||n("confirmDeleteText");Xg(i,()=>r("deleteConfirmed"))}return(i,s)=>(o.openBlock(),o.createBlock(L2,{class:"delete-button",variant:i.variant,icon:i.icon,text:i.withoutText?void 0:i.text||o.unref(n)("deleteBtn"),size:"s",align:"left",color:"danger",onClick:s[0]||(s[0]=l=>c())},null,8,["variant","icon","text"]))}}),GI=o.defineComponent({__name:"PgaRouterLink",props:{name:{},params:{},query:{},color:{default:"var(--pga-color-first)"},noFitContent:{type:Boolean},underline:{type:Boolean},noUnderlineOnHover:{type:Boolean}},setup(e){o.useCssVars(n=>({"1d883a13":a.value,e93e2386:r.value}));const t=e,a=o.computed(()=>`var(--pga-color-${t.color})`),r=o.computed(()=>`var(--pga-color-${t.color}-09)`);return(n,c)=>{const i=o.resolveComponent("RouterLink");return o.openBlock(),o.createBlock(i,{class:o.normalizeClass(["pga-router-link",{"pga-router-link__fit-content":!n.noFitContent,"pga-router-link__underline":n.underline,"pga-router-link__underline-on-hover":!n.noUnderlineOnHover}]),to:{name:n.name,params:n.params,query:n.query}},{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3},8,["class","to"])}}});const z5=I1(GI,[["__scopeId","data-v-a0fd12a3"]]),Kg=o.defineComponent({__name:"PgaRouterLinkButton",props:{name:{},params:{},query:{},type:{},icon:{},text:{type:[String,Number,Function]},variant:{},size:{},align:{},color:{},heightAndWidth:{},borderRadius:{},rounded:{type:Boolean},disabled:{type:Boolean},isLoading:{type:Boolean},numberToDisplay:{},noFitContent:{type:Boolean}},setup(e){return(t,a)=>(o.openBlock(),o.createBlock(z5,{name:t.name,params:t.params,query:t.query,noFitContent:t.noFitContent,noUnderlineOnHover:""},{default:o.withCtx(()=>[t.$slots.default?o.renderSlot(t.$slots,"default",{key:0}):(o.openBlock(),o.createBlock(L2,{key:1,type:t.type,icon:t.icon,text:t.text,variant:t.variant,size:t.size,align:t.align,color:t.color,fullWidth:!t.heightAndWidth,heightAndWidth:t.heightAndWidth,borderRadius:t.borderRadius,rounded:t.rounded,disabled:t.disabled,isLoading:t.isLoading,numberToDisplay:t.numberToDisplay},null,8,["type","icon","text","variant","size","align","color","fullWidth","heightAndWidth","borderRadius","rounded","disabled","isLoading","numberToDisplay"]))]),_:3},8,["name","params","query","noFitContent"]))}}),Ko=o.defineComponent({__name:"PgaNavigateToButton",props:{id:{},toName:{},withoutText:{type:Boolean},noFitContent:{type:Boolean}},setup(e){const t=_2("pgaButton");return(a,r)=>a.toName?(o.openBlock(),o.createBlock(Kg,{key:0,name:a.toName,params:{id:a.id},icon:"arrow-up-right-from-square",text:a.withoutText?void 0:o.unref(t)("navigateToBtn"),variant:"flat",size:"s",align:"left",color:"link",noFitContent:a.noFitContent},null,8,["name","params","text","noFitContent"])):o.createCommentVNode("",!0)}}),Zg=o.defineComponent({__name:"PgaSeeDetailsButton",props:{withoutText:{type:Boolean}},setup(e){const t=_2("pgaButton");return(a,r)=>(o.openBlock(),o.createBlock(L2,{class:"edit-button",variant:"flat",color:"grey",icon:"eye",text:a.withoutText?void 0:o.unref(t)("seeDetailsBtn"),size:"s",align:"left"},null,8,["text"]))}}),XI={class:"event"},KI={class:"pga-text-hidden"},ZI={class:"buttons"},QI=o.defineComponent({__name:"PgaCalendar",props:o.mergeModels({noEventsLabel:{},isLoading:{type:Boolean},hideWeekends:{type:Boolean},timeFrom:{},timeTo:{},timeStep:{},holidays:{},useArgentineHolidays:{type:Boolean},vacations:{},toName:{},withSeeDetailsButton:{type:Boolean},withEditButton:{type:Boolean},updateDatesFn:{},deleteFn:{},colors:{default:()=>({menuColor:"#42b983",titleBarColor:"#e4f5ef",todayCellColor:"rgba(240, 240, 255, 0.4)",selectedCellColor:"rgba(235, 255, 245, 0.4)",selectedCellBorderColor:"rgba(66, 185, 131, 0.5)"})}},{modelValue:{required:!0},modelModifiers:{},searchRange:{default:void 0},searchRangeModifiers:{}}),emits:o.mergeModels(["createEvent","seeEventDetails","editEvent","refreshList"],["update:modelValue","update:searchRange"]),setup(e,{emit:t}){o.useCssVars(V=>({"18d4991a":V.colors.menuColor,"9a69d344":V.colors.titleBarColor,a72f326c:V.colors.todayCellColor,"428de49c":V.colors.selectedCellColor,"32a3ad10":V.colors.selectedCellBorderColor}));const a=o.useModel(e,"modelValue"),r=o.useModel(e,"searchRange"),n=e,c=t,{calendar:i}=$e(),s=o.ref("week"),l=o.ref([]),f=Z2.getConfig().delayTime,u=o.ref(0),d=o.ref(),h=o.ref([]),m=[{day:1,month:0,label:"Año Nuevo"},{day:3,month:2,label:"Carnaval"},{day:4,month:2,label:"Carnaval"},{day:24,month:2,label:"Día Nacional de la Memoria por la Verdad y la Justicia"},{day:2,month:3,label:"Día del Veterano y de los Caídos en la Guerra de Malvinas"},{day:18,month:3,label:"Viernes Santo"},{day:1,month:4,label:"Día del Trabajador"},{day:25,month:4,label:"Día de la Revolución de Mayo"},{day:20,month:5,label:"Día de la Bandera"},{day:9,month:6,label:"Día de la Independencia"},{day:17,month:7,label:"Día del Paso a la Inmortalidad de Don José de San Martín"},{day:12,month:9,label:"Día del Respeto a la Diversidad Cultural"},{day:20,month:10,label:"Día de la Soberanía Nacional"},{day:8,month:11,label:"Día de la Inmaculada Concepción de María"},{day:25,month:11,label:"Navidad"}],v=o.computed(()=>n.timeStep||i.timeStep),p=o.computed(()=>n.withEditButton||n.deleteFn?90:60),g=o.computed(()=>s.value!=="day"),y=o.computed(()=>n.holidays?n.holidays:n.useArgentineHolidays?m:[]),x=o.computed(()=>{var _;const V=l.value.flatMap(N=>y.value.map(({month:q,day:S})=>C(N,q,S))),k=((_=n.vacations)==null?void 0:_.flatMap(({start:N,end:q})=>{const S=[];let O=new Date(N),U=new Date(q);for(;O<=U;){const J=O.getUTCFullYear(),Y=O.getUTCMonth(),G=O.getUTCDate();S.push(C(J,Y,G)),O.setUTCDate(O.getUTCDate()+1)}return S}))||[];return[...V,...k]});function C(V,k,_){return new Date(Date.UTC(V,k,_)).toISOString().split("T")[0]}function b(V){const k=v.value*6e4,_=new Date(Math.floor(V.getTime()/k)*k),N=new Date(_.getTime()+k);return{start:_,end:N}}function M(V){const k=V.startDate.getFullYear(),_=V.endDate.getFullYear(),N=[k];k!==_&&N.push(_),l.value=N,A(V)}function w(V){if(s.value==="month")return;const k=Date.now();if(k-u.value<f){d.value&&clearTimeout(d.value);return}u.value=k,d.value=setTimeout(()=>{if(!v.value){c("createEvent",V);return}const{start:_,end:N}=b(V);c("createEvent",_,N)},f)}async function z(V){const k=V.event.id,_=a.value.find(G=>G.id===k);let N=V.event.start,q=V.event.end;const S=new Date(V.originalEvent.start),O=new Date(V.originalEvent.end);if(v.value){const G=b(N);N=G.start,q=G.end}const U=a.value.some(G=>{if(G.id===k)return!1;const B=N>=G.start&&N<G.end,T=q>G.start&&q<=G.end,L=N<=G.start&&q>=G.end;return B||T||L});function J(){_.start=N,_.end=q}function Y(){_.start=S,_.end=O}if(U){Y();return}J();try{await n.updateDatesFn(_),J()}catch{Y()}}async function H(V){try{h.value.push(V.id),await n.deleteFn(V),a.value=a.value.filter(k=>k.id!==V.id)}finally{h.value=h.value.filter(k=>k!==V.id)}}function A(V){const k=V.startDate,_=V.endDate;if(r.value&&k>=r.value.start&&_<=r.value.end)return;const N={start:k,end:_};r.value=N,c("refreshList",N)}return(V,k)=>(o.openBlock(),o.createBlock(o.unref(II),{activeView:s.value,"onUpdate:activeView":k[0]||(k[0]=_=>s.value=_),class:"pga-calendar",events:a.value,locale:o.unref(h4)().language,disableViews:["years","year"],disableDays:x.value,hideWeekends:V.hideWeekends||o.unref(i).hideWeekends,showTimeInCells:"",watchRealTime:"",timeFrom:V.timeFrom||o.unref(i).timeFrom,timeTo:V.timeTo||o.unref(i).timeTo,timeStep:v.value,timeCellHeight:p.value,editableEvents:{drag:!!V.updateDatesFn},onReady:k[1]||(k[1]=_=>M(_)),onViewChange:k[2]||(k[2]=_=>M(_)),onCellClick:k[3]||(k[3]=_=>w(_)),onEventDrop:k[4]||(k[4]=_=>z(_))},o.createSlots({event:o.withCtx(({event:_})=>[o.createElementVNode("div",XI,[o.createElementVNode("div",KI,o.toDisplayString(_.toString()),1),o.createElementVNode("div",null,o.toDisplayString(`${o.unref(sc)(_.start)} - ${o.unref(sc)(_.end)}`),1),o.createElementVNode("div",ZI,[V.withSeeDetailsButton?(o.openBlock(),o.createBlock(Zg,{key:0,withoutText:g.value,onClick:N=>c("seeEventDetails",_)},null,8,["withoutText","onClick"])):o.createCommentVNode("",!0),V.withEditButton?(o.openBlock(),o.createBlock(wc,{key:1,withoutText:g.value,onClick:N=>c("editEvent",_)},null,8,["withoutText","onClick"])):o.createCommentVNode("",!0),V.deleteFn?(o.openBlock(),o.createBlock(wn,{key:2,withoutText:g.value,isLoading:h.value.includes(_.id),onDeleteConfirmed:N=>H(_)},null,8,["withoutText","isLoading","onDeleteConfirmed"])):o.createCommentVNode("",!0),V.toName?(o.openBlock(),o.createBlock(Ko,{key:3,id:_.id,toName:V.toName,withoutText:g.value},null,8,["id","toName","withoutText"])):o.createCommentVNode("",!0)])])]),_:2},[V.isLoading?{name:"title",fn:o.withCtx(()=>[o.createVNode(Lt,{size:"m"})]),key:"0"}:void 0,V.noEventsLabel?{name:"no-event",fn:o.withCtx(()=>[o.createVNode(ye,{text:V.noEventsLabel},null,8,["text"])]),key:"1"}:void 0]),1032,["activeView","events","locale","disableDays","hideWeekends","timeFrom","timeTo","timeStep","timeCellHeight","editableEvents"]))}});const JI=I1(QI,[["__scopeId","data-v-2e1b8475"]]),e$=o.defineComponent({__name:"PgaColorCircle",props:{color:{}},setup(e){return(t,a)=>(o.openBlock(),o.createElementBlock("div",{class:"color-circle",style:o.normalizeStyle({"background-color":t.color})},null,4))}});const Qg=I1(e$,[["__scopeId","data-v-4abf5632"]]);function Zo(e,t){const a=r=>{let n=e.value.parentElement;for(;n&&n!==document.body;){const c=window.getComputedStyle(n).overflowX,i=window.getComputedStyle(n).overflowY;(i==="auto"||i==="scroll"||c==="auto"||c==="scroll")&&n[r]("scroll",t),n=n.parentElement}window[r]("scroll",t)};o.onMounted(()=>a("addEventListener")),o.onBeforeUnmount(()=>a("removeEventListener"))}const t$=o.defineComponent({__name:"PgaDropdown",props:{align:{default:"center"},item:{},options:{}},setup(e){const t=e,a=o.ref(),r=o.ref(),n=o.ref(),c=o.ref(!1);Zo(a,()=>c.value=!1);const i=o.computed(()=>t.options?t.options.filter(s=>s.ifFn?s.ifFn(t.item):!0):[]);return o.watch(r,s=>{if(!s)return;const l=document.documentElement.clientHeight,f=document.documentElement.clientWidth,u=a.value.getBoundingClientRect(),d={},h=u.top<l/2,m="0.5rem";h?(d.top=`${u.bottom}px`,d["margin-top"]=m):(d.bottom=`${l-u.top}px`,d["margin-bottom"]=m),t.align==="center"?d.left=`${u.left+u.width/2-s.getBoundingClientRect().width/2}px`:t.align==="left"?d.left=`${u.left}px`:t.align==="right"&&(d.right=`${f-u.right}px`),n.value=d}),(s,l)=>{const f=o.resolveDirective("click-outside");return o.openBlock(),o.createElementBlock("div",{ref_key:"dropdownRef",ref:a,class:"dropdown"},[o.createVNode(L2,{icon:"ellipsis-vertical",color:"first",onClick:l[0]||(l[0]=u=>c.value=!0)}),(o.openBlock(),o.createBlock(o.Teleport,{to:"body"},[c.value?o.withDirectives((o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"contentRef",ref:r,class:"dropdown--content",style:o.normalizeStyle(n.value)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.value,u=>(o.openBlock(),o.createBlock(L2,{key:u.text,size:"s",align:"left",borderRadius:"0",variant:"flat",color:u.color||"first",icon:u.icon,text:u.text,onClick:d=>u.clickFn(s.item)},null,8,["color","icon","text","onClick"]))),128)),s.$slots.default?o.renderSlot(s.$slots,"default",{key:0},void 0,!0):o.createCommentVNode("",!0)],4)),[[f,()=>c.value=!1]]):o.createCommentVNode("",!0)]))],512)}}});const Jg=I1(t$,[["__scopeId","data-v-3e641a07"]]);var ey={exports:{}};/*!
779
+ A valid view must be one of: ${Ru.join(", ")}.`),e="week"),this.enabledViews.includes(e)||(console.warn(`Vue Cal: the provided active-view "${e}" is disabled. Using the "${this.enabledViews[0]}" view instead.`),e=this.enabledViews[0]),e},switchToNarrowerView(e=null){this.transitionDirection="right";const t=this.enabledViews[this.enabledViews.indexOf(this.view.id)+1];t&&this.switchView(t,e)},switchView(e,t=null,a=!1){e=this.validateView(e);const r=this.utils.date,n=this.view.startDate&&this.view.startDate.getTime();if(this.transitions&&a){if(this.view.id===e)return;const s=this.enabledViews;this.transitionDirection=s.indexOf(this.view.id)>s.indexOf(e)?"left":"right"}const c=this.view.id;switch(this.view.events=[],this.view.id=e,this.view.firstCellDate=null,this.view.lastCellDate=null,t||(t=this.view.selectedDate||this.view.startDate),e){case"years":{this.view.startDate=new Date(Math.floor(t.getFullYear()/25)*25||2e3,0,1),this.view.endDate=new Date(this.view.startDate.getFullYear()+25,0,1),this.view.endDate.setSeconds(-1);break}case"year":{this.view.startDate=new Date(t.getFullYear(),0,1),this.view.endDate=new Date(t.getFullYear()+1,0,1),this.view.endDate.setSeconds(-1);break}case"month":{this.view.startDate=new Date(t.getFullYear(),t.getMonth(),1),this.view.endDate=new Date(t.getFullYear(),t.getMonth()+1,1),this.view.endDate.setSeconds(-1);let s=new Date(this.view.startDate);if(s.getDay()!==(this.startWeekOnSunday?0:1)&&(s=r.getPreviousFirstDayOfWeek(s,this.startWeekOnSunday)),this.view.firstCellDate=s,this.view.lastCellDate=r.addDays(s,41),this.view.lastCellDate.setHours(23,59,59,0),this.hideWeekends){if([0,6].includes(this.view.firstCellDate.getDay())){const l=this.view.firstCellDate.getDay()===6&&!this.startWeekOnSunday?2:1;this.view.firstCellDate=r.addDays(this.view.firstCellDate,l)}if([0,6].includes(this.view.startDate.getDay())){const l=this.view.startDate.getDay()===6?2:1;this.view.startDate=r.addDays(this.view.startDate,l)}if([0,6].includes(this.view.lastCellDate.getDay())){const l=this.view.lastCellDate.getDay()===0&&!this.startWeekOnSunday?2:1;this.view.lastCellDate=r.subtractDays(this.view.lastCellDate,l)}if([0,6].includes(this.view.endDate.getDay())){const l=this.view.endDate.getDay()===0?2:1;this.view.endDate=r.subtractDays(this.view.endDate,l)}}break}case"week":{t=r.getPreviousFirstDayOfWeek(t,this.startWeekOnSunday);const s=this.hideWeekends?5:7;this.view.startDate=this.hideWeekends&&this.startWeekOnSunday?r.addDays(t,1):t,this.view.startDate.setHours(0,0,0,0),this.view.endDate=r.addDays(t,s),this.view.endDate.setSeconds(-1);break}case"day":{this.view.startDate=t,this.view.startDate.setHours(0,0,0,0),this.view.endDate=new Date(t),this.view.endDate.setHours(23,59,59,0);break}}this.addEventsToView();const i=this.view.startDate&&this.view.startDate.getTime();if(!(c===e&&i===n)&&(this.$emit("update:activeView",e),this.ready)){const s=this.view.startDate,l={view:e,startDate:s,endDate:this.view.endDate,...this.isMonthView?{firstCellDate:this.view.firstCellDate,lastCellDate:this.view.lastCellDate,outOfScopeEvents:this.view.outOfScopeEvents.map(this.cleanupEvent)}:{},events:this.view.events.map(this.cleanupEvent),...this.isWeekView?{week:r.getWeek(this.startWeekOnSunday?r.addDays(s,1):s)}:{}};this.$emit("view-change",l)}},previous(){this.previousNext(!1)},next(){this.previousNext()},previousNext(e=!0){const t=this.utils.date;this.transitionDirection=e?"right":"left";const a=e?1:-1;let r=null;const{startDate:n,id:c}=this.view;switch(c){case"years":r=new Date(n.getFullYear()+25*a,0,1);break;case"year":r=new Date(n.getFullYear()+1*a,1,1);break;case"month":r=new Date(n.getFullYear(),n.getMonth()+1*a,1);break;case"week":r=t[e?"addDays":"subtractDays"](t.getPreviousFirstDayOfWeek(n,this.startWeekOnSunday),7);break;case"day":r=t[e?"addDays":"subtractDays"](n,1);const i=r.getDay(),s=this.startWeekOnSunday?i:(i||7)-1;if(this.weekDays[s].hide){const f=this.weekDays.map((d,h)=>({...d,i:h}));let u=0;e?([...f.slice(s),...f].find(d=>(u++,!d.hide)).i,u--):[...f,...f.slice(0,s)].reverse().find(d=>(u++,!d.hide)).i,r=t[e?"addDays":"subtractDays"](r,u)}break}r&&this.switchView(c,r)},addEventsToView(e=[]){const t=this.utils.event,{startDate:a,endDate:r,firstCellDate:n,lastCellDate:c}=this.view;if(e.length||(this.view.events=[]),e=e.length?e:[...this.mutableEvents],!e||this.isYearsOrYearView&&!this.eventsCountOnYearView)return;let i=e.filter(s=>t.eventInRange(s,a,r));!this.isYearsOrYearView&&!(this.isMonthView&&!this.eventsOnMonthView)&&(i=i.map(s=>s.daysCount>1?t.createEventSegments(s,n||a,c||r):s)),this.view.events.push(...i),this.isMonthView&&(this.view.outOfScopeEvents=[],e.forEach(s=>{(t.eventInRange(s,n,a)||t.eventInRange(s,r,c))&&(this.view.events.some(l=>l._eid===s._eid)||this.view.outOfScopeEvents.push(s))}))},findAncestor(e,t){for(;(e=e.parentElement)&&!e.classList.contains(t););return e},isDOMElementAnEvent(e){return e.classList.contains("vuecal__event")||this.findAncestor(e,"vuecal__event")},onMouseMove(e){const{resizeAnEvent:t,dragAnEvent:a,dragCreateAnEvent:r}=this.domEvents;t._eid===null&&a._eid===null&&!r.start||(e.preventDefault(),t._eid?this.eventResizing(e):this.dragToCreateEvent&&r.start&&this.eventDragCreation(e))},onMouseUp(e){const{focusAnEvent:t,resizeAnEvent:a,clickHoldAnEvent:r,clickHoldACell:n,dragCreateAnEvent:c}=this.domEvents,{_eid:i}=r,{_eid:s}=a;let l=!1;const{event:f,start:u}=c,d=this.isDOMElementAnEvent(e.target),h=t.mousedUp;if(t.mousedUp=!1,d&&(this.domEvents.cancelClickEventCreation=!0),n.eventCreated)return;if(s){const{originalEnd:v,originalEndTimeMinutes:p,endTimeMinutes:g}=a,y=this.view.events.find(x=>x._eid===a._eid);if(l=g&&g!==p,y&&y.end.getTime()!==v.getTime()){const x=this.mutableEvents.find(M=>M._eid===a._eid);x.endTimeMinutes=y.endTimeMinutes,x.end=y.end;const C=this.cleanupEvent(y),b={...this.cleanupEvent(y),end:v,endTimeMinutes:y.originalEndTimeMinutes};this.$emit("event-duration-change",{event:C,oldDate:a.originalEnd,originalEvent:b}),this.$emit("event-change",{event:C,originalEvent:b})}y&&(y.resizing=!1),a._eid=null,a.start=null,a.split=null,a.segment=null,a.originalEndTimeMinutes=null,a.originalEnd=null,a.endTimeMinutes=null,a.startCell=null,a.endCell=null}else u&&(f&&(this.emitWithEvent("event-drag-create",f),c.event.resizing=!1),c.start=null,c.split=null,c.event=null);!d&&!s&&this.unfocusEvent(),r.timeoutId&&!i&&(clearTimeout(r.timeoutId),r.timeoutId=null),n.timeoutId&&(clearTimeout(n.timeoutId),n.timeoutId=null);const m=typeof this.onEventClick=="function";if(h&&!l&&!i&&!f&&m){let v=this.view.events.find(p=>p._eid===t._eid);return!v&&this.isMonthView&&(v=this.view.outOfScopeEvents.find(p=>p._eid===t._eid)),v&&this.onEventClick(v,e)}},onKeyUp(e){e.keyCode===27&&this.cancelDelete()},eventResizing(e){const{resizeAnEvent:t}=this.domEvents,a=this.view.events.find(f=>f._eid===t._eid)||{segments:{}},{minutes:r,cursorCoords:n}=this.minutesAtCursor(e),c=a.segments&&a.segments[t.segment],{date:i,event:s}=this.utils,l=Math.max(r,this.timeFrom+1,(c||a).startTimeMinutes+1);if(a.endTimeMinutes=t.endTimeMinutes=l,this.snapToTime){const f=a.endTimeMinutes+this.snapToTime/2;a.endTimeMinutes=f-f%this.snapToTime}if(c&&(c.endTimeMinutes=a.endTimeMinutes),a.end.setHours(0,a.endTimeMinutes,a.endTimeMinutes===Sa?-1:0,0),this.resizeX&&this.isWeekView){a.daysCount=i.countDays(a.start,a.end);const f=this.cellsEl,u=f.offsetWidth/f.childElementCount,d=Math.floor(n.x/u);if(t.startCell===null&&(t.startCell=d-(a.daysCount-1)),t.endCell!==d){t.endCell=d;const h=i.addDays(a.start,d-t.startCell),m=Math.max(i.countDays(a.start,h),1);if(m!==a.daysCount){let v=null;m>a.daysCount?v=s.addEventSegment(a):v=s.removeEventSegment(a),t.segment=v,a.endTimeMinutes+=.001}}}this.$emit("event-resizing",{_eid:a._eid,end:a.end,endTimeMinutes:a.endTimeMinutes})},eventDragCreation(e){const{dragCreateAnEvent:t}=this.domEvents,{start:a,startCursorY:r,split:n}=t,c=new Date(a),{minutes:i,cursorCoords:{y:s}}=this.minutesAtCursor(e);if(!(!t.event&&Math.abs(r-s)<this.dragToCreateThreshold))if(t.event){if(c.setHours(0,i,i===Sa?-1:0,0),this.snapToTime){let u=c.getHours()*60+c.getMinutes();const d=u+this.snapToTime/2;u=d-d%this.snapToTime,c.setHours(0,u,0,0)}const l=a<c,{event:f}=t;f.start=l?a:c,f.end=l?c:a,f.startTimeMinutes=f.start.getHours()*60+f.start.getMinutes(),f.endTimeMinutes=f.end.getHours()*60+f.end.getMinutes()}else{if(t.event=this.utils.event.createAnEvent(a,1,{split:n}),!t.event){t.start=null,t.split=null,t.event=null;return}t.event.resizing=!0}},unfocusEvent(){const{focusAnEvent:e,clickHoldAnEvent:t}=this.domEvents,a=this.view.events.find(r=>r._eid===(e._eid||t._eid));e._eid=null,t._eid=null,a&&(a.focused=!1,a.deleting=!1)},cancelDelete(){const{clickHoldAnEvent:e}=this.domEvents;if(e._eid){const t=this.view.events.find(a=>a._eid===e._eid);t&&(t.deleting=!1),e._eid=null,e.timeoutId=null}},onEventTitleBlur(e,t){if(t.title===e.target.innerHTML)return;const a=t.title;t.title=e.target.innerHTML;const r=this.cleanupEvent(t);this.$emit("event-title-change",{event:r,oldTitle:a}),this.$emit("event-change",{event:r,originalEvent:{...r,title:a}})},updateMutableEvents(){const e=this.utils.date;this.mutableEvents=[],this.events.forEach(t=>{const a=typeof t.start=="string"?e.stringToDate(t.start):t.start,r=e.formatDateLite(a),n=e.dateToMinutes(a);let c=null;typeof t.end=="string"&&t.end.includes("24:00")?(c=new Date(t.end.replace(" 24:00","")),c.setHours(23,59,59,0)):c=typeof t.end=="string"?e.stringToDate(t.end):t.end;let i=e.formatDateLite(c),s=e.dateToMinutes(c);(!s||s===Sa)&&(!this.time||typeof t.end=="string"&&t.end.length===10?c.setHours(23,59,59,0):c.setSeconds(c.getSeconds()-1),i=e.formatDateLite(c),s=Sa);const l=r!==i;t=Object.assign({...this.utils.event.eventDefaults},t,{_eid:`${this._.uid}_${this.eventIdIncrement++}`,segments:l?{}:null,start:a,startTimeMinutes:n,end:c,endTimeMinutes:s,daysCount:l?e.countDays(a,c):1,class:t.class}),this.mutableEvents.push(t)})},minutesAtCursor(e){return this.utils.cell.minutesAtCursor(e)},createEvent(e,t,a={}){return this.utils.event.createAnEvent(e,t,a)},cleanupEvent(e){return e={...e},["segments","deletable","deleting","titleEditable","resizable","resizing","draggable","dragging","draggingStatic","focused"].forEach(a=>{a in e&&delete e[a]}),e.repeat||delete e.repeat,e},emitWithEvent(e,t){this.$emit(e,this.cleanupEvent(t))},updateSelectedDate(e){if(e&&typeof e=="string"?e=this.utils.date.stringToDate(e):e=new Date(e),e&&e instanceof Date){const{selectedDate:t}=this.view;t&&(this.transitionDirection=t.getTime()>e.getTime()?"left":"right"),e.setHours(0,0,0,0),(!t||t.getTime()!==e.getTime())&&(this.view.selectedDate=e),this.switchView(this.view.id)}this.$emit("update:selected-date",this.view.selectedDate)},getWeekNumber(e){const t=this.utils.date,r=this.firstCellDateWeekNumber+e,n=this.startWeekOnSunday?1:0;return r>52?t.getWeek(t.addDays(this.view.firstCellDate,7*e+n)):r},timeTick(){this.now=new Date,this.timeTickerIds[1]=setTimeout(this.timeTick,60*1e3)},updateDateTexts(){this.utils.date.updateTexts(this.texts)},alignWithScrollbar(){if(document.getElementById("vuecal-align-with-scrollbar"))return;const e=this.$refs.vuecal.getElementsByClassName("vuecal__scrollbar-check")[0],t=e.offsetWidth-e.children[0].offsetWidth;if(t){const a=document.createElement("style");a.id="vuecal-align-with-scrollbar",a.type="text/css",a.innerHTML=`.vuecal--view-with-time .vuecal__weekdays-headings,.vuecal--view-with-time .vuecal__all-day {padding-right: ${t}px}`,document.head.appendChild(a)}},cellOrSplitHasEvents(e,t=null){return e.length&&(!t&&e.length||t&&e.some(a=>a.split===t.id))}},created(){this.utils.cell=new VR(this),this.utils.event=new SR(this,this.utils.date),this.loadLocale(this.locale),this.editEvents.drag&&this.loadDragAndDrop(),this.updateMutableEvents(this.events),this.view.id=this.currentView,this.selectedDate?this.updateSelectedDate(this.selectedDate):(this.view.selectedDate=new Date,this.switchView(this.currentView)),this.time&&this.watchRealTime&&(this.timeTickerIds[0]=setTimeout(this.timeTick,(60-this.now.getSeconds())*1e3))},mounted(){const e=this.utils.date,t="ontouchstart"in window,{resize:a,drag:r,create:n,delete:c,title:i}=this.editEvents,s=this.onEventClick&&typeof this.onEventClick=="function";(a||r||n||c||i||s)&&window.addEventListener(t?"touchend":"mouseup",this.onMouseUp),(a||r||n&&this.dragToCreateEvent)&&window.addEventListener(t?"touchmove":"mousemove",this.onMouseMove,{passive:!1}),i&&window.addEventListener("keyup",this.onKeyUp),t&&(this.$refs.vuecal.oncontextmenu=function(u){u.preventDefault(),u.stopPropagation()}),this.hideBody||this.alignWithScrollbar();const l=this.view.startDate,f={view:this.view.id,startDate:l,endDate:this.view.endDate,...this.isMonthView?{firstCellDate:this.view.firstCellDate,lastCellDate:this.view.lastCellDate}:{},events:this.view.events.map(this.cleanupEvent),...this.isWeekView?{week:e.getWeek(this.startWeekOnSunday?e.addDays(l,1):l)}:{}};this.$emit("ready",f),this.ready=!0},beforeUnmount(){const e="ontouchstart"in window;window.removeEventListener(e?"touchmove":"mousemove",this.onMouseMove,{passive:!1}),window.removeEventListener(e?"touchend":"mouseup",this.onMouseUp),window.removeEventListener("keyup",this.onKeyUp),this.timeTickerIds[0]&&clearTimeout(this.timeTickerIds[0]),this.timeTickerIds[1]&&clearTimeout(this.timeTickerIds[1]),this.timeTickerIds=[null,null]},computed:{editEvents(){return this.editableEvents&&typeof this.editableEvents=="object"?{title:!!this.editableEvents.title,drag:!!this.editableEvents.drag,resize:!!this.editableEvents.resize,create:!!this.editableEvents.create,delete:!!this.editableEvents.delete}:{title:!!this.editableEvents,drag:!!this.editableEvents,resize:!!this.editableEvents,create:!!this.editableEvents,delete:!!this.editableEvents}},views(){return{years:{label:this.texts.years,enabled:!this.disableViews.includes("years")},year:{label:this.texts.year,enabled:!this.disableViews.includes("year")},month:{label:this.texts.month,enabled:!this.disableViews.includes("month")},week:{label:this.texts.week,enabled:!this.disableViews.includes("week")},day:{label:this.texts.day,enabled:!this.disableViews.includes("day")}}},currentView(){return this.validateView(this.activeView)},enabledViews(){return Object.keys(this.views).filter(e=>this.views[e].enabled)},hasTimeColumn(){return this.time&&this.isWeekOrDayView},isShortMonthView(){return this.isMonthView&&this.eventsOnMonthView==="short"},firstCellDateWeekNumber(){const e=this.utils.date,t=this.view.firstCellDate;return e.getWeek(this.startWeekOnSunday?e.addDays(t,1):t)},timeCells(){const e=[];for(let t=this.timeFrom,a=this.timeTo;t<a;t+=this.timeStep)e.push({hours:Math.floor(t/60),minutes:t%60,label:this.utils.date.formatTime(t,this.TimeFormat),value:t});return e},TimeFormat(){return this.timeFormat||(this.twelveHour?"h:mm{am}":"HH:mm")},daySplits(){return(this.splitDays.filter(e=>!e.hide)||[]).map((e,t)=>({...e,id:e.id||t+1}))},hasSplits(){return this.daySplits.length&&this.isWeekOrDayView},hasShortEvents(){return this.showAllDayEvents==="short"},cellOrSplitMinWidth(){let e=null;return this.hasSplits&&this.minSplitWidth?e=this.visibleDaysCount*this.minSplitWidth*this.daySplits.length:this.minCellWidth&&this.isWeekView&&(e=this.visibleDaysCount*this.minCellWidth),e},allDayBar(){let e=this.allDayBarHeight||null;return e&&!isNaN(e)&&(e+="px"),{cells:this.viewCells,options:this.$props,label:this.texts.allDay,shortEvents:this.hasShortEvents,daySplits:this.hasSplits&&this.daySplits||[],cellOrSplitMinWidth:this.cellOrSplitMinWidth,height:e}},minTimestamp(){let e=null;return this.minDate&&typeof this.minDate=="string"?e=this.utils.date.stringToDate(this.minDate):this.minDate&&this.minDate instanceof Date&&(e=this.minDate),e?e.getTime():null},maxTimestamp(){let e=null;return this.maxDate&&typeof this.maxDate=="string"?e=this.utils.date.stringToDate(this.maxDate):this.maxDate&&this.maxDate instanceof Date&&(e=this.maxDate),e?e.getTime():null},weekDays(){let{weekDays:e,weekDaysShort:t=[]}=this.texts;return e=e.slice(0).map((a,r)=>({label:a,...t.length?{short:t[r]}:{},hide:this.hideWeekends&&r>=5||this.hideWeekdays.length&&this.hideWeekdays.includes(r+1)})),this.startWeekOnSunday&&e.unshift(e.pop()),e},weekDaysInHeader(){return this.isMonthView||this.isWeekView&&!this.minCellWidth&&!(this.hasSplits&&this.minSplitWidth)},months(){return this.texts.months.map(e=>({label:e}))},specialDayHours(){return!this.specialHours||!Object.keys(this.specialHours).length?{}:Array(7).fill("").map((e,t)=>{let a=this.specialHours[t+1]||[];return Array.isArray(a)||(a=[a]),e=[],a.forEach(({from:r,to:n,class:c,label:i},s)=>{e[s]={day:t+1,from:[null,void 0].includes(r)?null:r*1,to:[null,void 0].includes(n)?null:n*1,class:c||"",label:i||""}}),e})},viewTitle(){const e=this.utils.date;let t="";const a=this.view.startDate,r=a.getFullYear(),n=a.getMonth();switch(this.view.id){case"years":{t=this.texts.years;break}case"year":{t=r;break}case"month":{t=`${this.months[n].label} ${r}`;break}case"week":{const c=this.view.endDate,i=a.getFullYear();let s=this.texts.months[a.getMonth()];this.xsmall&&(s=s.substring(0,3));let l=`${s} ${i}`;if(c.getMonth()!==a.getMonth()){const f=c.getFullYear();let u=this.texts.months[c.getMonth()];this.xsmall&&(u=u.substring(0,3)),i===f?l=`${s} - ${u} ${i}`:this.small?l=`${s.substring(0,3)} ${i} - ${u.substring(0,3)} ${f}`:l=`${s} ${i} - ${u} ${f}`}t=`${this.texts.week} ${e.getWeek(this.startWeekOnSunday?e.addDays(a,1):a)} (${l})`;break}case"day":{t=this.utils.date.formatDate(a,this.texts.dateFormat,this.texts);break}}return t},viewCells(){const e=this.utils.date;let t=[],a=null,r=!1;this.watchRealTime||(this.now=new Date);const n=this.now;switch(this.view.id){case"years":{a=this.view.startDate.getFullYear(),t=Array.apply(null,Array(25)).map((c,i)=>{const s=new Date(a+i,0,1),l=new Date(a+i+1,0,1);return l.setSeconds(-1),{startDate:s,formattedDate:e.formatDateLite(s),endDate:l,content:a+i,current:a+i===n.getFullYear()}});break}case"year":{a=this.view.startDate.getFullYear(),t=Array.apply(null,Array(12)).map((c,i)=>{const s=new Date(a,i,1),l=new Date(a,i+1,1);return l.setSeconds(-1),{startDate:s,formattedDate:e.formatDateLite(s),endDate:l,content:this.xsmall?this.months[i].label.substr(0,3):this.months[i].label,current:i===n.getMonth()&&a===n.getFullYear()}});break}case"month":{const c=this.view.startDate.getMonth(),i=new Date(this.view.firstCellDate);r=!1,t=Array.apply(null,Array(42)).map((s,l)=>{const f=e.addDays(i,l),u=new Date(f);u.setHours(23,59,59,0);const d=!r&&e.isToday(f)&&!r++;return{startDate:f,formattedDate:e.formatDateLite(f),endDate:u,content:f.getDate(),today:d,outOfScope:f.getMonth()!==c,class:`vuecal__cell--day${f.getDay()||7}`}}),(this.hideWeekends||this.hideWeekdays.length)&&(t=t.filter(s=>{const l=s.startDate.getDay()||7;return!(this.hideWeekends&&l>=6||this.hideWeekdays.length&&this.hideWeekdays.includes(l))}));break}case"week":{r=!1;const c=this.view.startDate,i=this.weekDays;t=i.map((s,l)=>{const f=e.addDays(c,this.startWeekOnSunday&&this.hideWeekends?l-1:l),u=new Date(f);u.setHours(23,59,59,0);const d=(f.getDay()||7)-1;return{startDate:f,formattedDate:e.formatDateLite(f),endDate:u,today:!r&&e.isToday(f)&&!r++,specialHours:this.specialDayHours[d]||[]}}).filter((s,l)=>!i[l].hide);break}case"day":{const c=this.view.startDate,i=new Date(this.view.startDate);i.setHours(23,59,59,0);const s=(c.getDay()||7)-1;t=[{startDate:c,formattedDate:e.formatDateLite(c),endDate:i,today:e.isToday(c),specialHours:this.specialDayHours[s]||[]}];break}}return t},visibleDaysCount(){return this.isDayView?1:7-this.weekDays.reduce((e,t)=>e+t.hide,0)},cellWidth(){return 100/this.visibleDaysCount},cssClasses(){const{resizeAnEvent:e,dragAnEvent:t,dragCreateAnEvent:a}=this.domEvents;return{[`vuecal--${this.view.id}-view`]:!0,[`vuecal--${this.locale}`]:this.locale,"vuecal--no-time":!this.time,"vuecal--view-with-time":this.hasTimeColumn,"vuecal--week-numbers":this.showWeekNumbers&&this.isMonthView,"vuecal--twelve-hour":this.twelveHour,"vuecal--click-to-navigate":this.clickToNavigate,"vuecal--hide-weekends":this.hideWeekends,"vuecal--split-days":this.hasSplits,"vuecal--sticky-split-labels":this.hasSplits&&this.stickySplitLabels,"vuecal--overflow-x":this.minCellWidth&&this.isWeekView||this.hasSplits&&this.minSplitWidth,"vuecal--small":this.small,"vuecal--xsmall":this.xsmall,"vuecal--resizing-event":e._eid,"vuecal--drag-creating-event":a.event,"vuecal--dragging-event":t._eid,"vuecal--events-on-month-view":this.eventsOnMonthView,"vuecal--short-events":this.isMonthView&&this.eventsOnMonthView==="short","vuecal--has-touch":typeof window<"u"&&"ontouchstart"in window}},isYearsOrYearView(){return["years","year"].includes(this.view.id)},isYearsView(){return this.view.id==="years"},isYearView(){return this.view.id==="year"},isMonthView(){return this.view.id==="month"},isWeekOrDayView(){return["week","day"].includes(this.view.id)},isWeekView(){return this.view.id==="week"},isDayView(){return this.view.id==="day"}},watch:{events:{handler(e,t){this.updateMutableEvents(e),this.addEventsToView()},deep:!0},locale(e){this.loadLocale(e)},selectedDate(e){this.updateSelectedDate(e)},activeView(e){this.switchView(e)}}},II=ma(RI,[["render",FI]]),wc=o.defineComponent({__name:"PgaEditButton",props:{withoutText:{type:Boolean},fullWidth:{type:Boolean}},setup(e){const t=_2("pgaButton");return(a,r)=>{const n=o.resolveDirective("tooltip");return o.withDirectives((o.openBlock(),o.createBlock(L2,{class:"edit-button",variant:"flat",color:"sky",icon:["far","pen-to-square"],text:a.withoutText?void 0:o.unref(t)("editBtn"),size:"s",fullWidth:a.fullWidth,align:"left"},null,8,["text","fullWidth"])),[[n,a.withoutText?o.unref(t)("editBtn"):""]])}}}),$I={class:"alert"},UI={class:"alert--content"},WI=["textContent"],qI={class:"alert--buttons"},jI=o.defineComponent({__name:"Alert",props:{message:{type:[String,Number,Function]},handleAcceptFn:{type:Function},handleCloseFn:{type:Function}},setup(e){const t=Cg.directive,a=_2("alert");return o.onMounted(()=>ic(!1)),o.onUnmounted(()=>ic(!0)),(r,n)=>(o.openBlock(),o.createElementBlock("div",$I,[o.withDirectives((o.openBlock(),o.createElementBlock("div",UI,[o.createVNode(Oe,{class:"alert--icon",icon:"land-mine-on"}),o.createElementVNode("span",{class:"alert--title",textContent:o.toDisplayString(o.unref(a)("alertTitle"))},null,8,WI),r.message?(o.openBlock(),o.createBlock(ye,{key:0,class:"alert--message",text:r.message},null,8,["text"])):o.createCommentVNode("",!0),o.createElementVNode("div",qI,[o.createVNode(L2,{class:"alert--button",text:o.unref(a)("cancelBtn"),variant:"filled",color:"grey",onClick:n[0]||(n[0]=c=>r.handleCloseFn())},null,8,["text"]),o.createVNode(L2,{class:"alert--button",text:o.unref(a)("acceptBtn"),variant:"filled",color:"danger",onClick:n[1]||(n[1]=c=>r.handleAcceptFn())},null,8,["text"])])])),[[o.unref(t),r.handleCloseFn]])]))}});const YI=I1(jI,[["__scopeId","data-v-5b1756ec"]]);function Xg(e,t){const a=document.createElement("div");document.body.appendChild(a);const r=o.createApp({render(){return o.h(YI,{message:e,handleAcceptFn:c,handleCloseFn:n})}});r.mount(a);function n(){r.unmount(),document.body.removeChild(a)}function c(){n(),t()}}const wn=o.defineComponent({__name:"PgaDeleteButton",props:{variant:{default:"flat"},icon:{default:"trash"},text:{},withoutText:{type:Boolean},withoutConfirm:{type:Boolean},confirmDeleteText:{}},emits:["deleteConfirmed"],setup(e,{emit:t}){const a=e,r=t,n=_2("pgaButton");function c(){if(a.withoutConfirm){r("deleteConfirmed");return}const i=a.confirmDeleteText||n("confirmDeleteText");Xg(i,()=>r("deleteConfirmed"))}return(i,s)=>(o.openBlock(),o.createBlock(L2,{class:"delete-button",variant:i.variant,icon:i.icon,text:i.withoutText?void 0:i.text||o.unref(n)("deleteBtn"),size:"s",align:"left",color:"danger",onClick:s[0]||(s[0]=l=>c())},null,8,["variant","icon","text"]))}}),GI=o.defineComponent({__name:"PgaRouterLink",props:{name:{},params:{},query:{},color:{default:"var(--pga-color-first)"},noFitContent:{type:Boolean},underline:{type:Boolean},noUnderlineOnHover:{type:Boolean}},setup(e){o.useCssVars(n=>({"1d883a13":a.value,e93e2386:r.value}));const t=e,a=o.computed(()=>`var(--pga-color-${t.color})`),r=o.computed(()=>`var(--pga-color-${t.color}-09)`);return(n,c)=>{const i=o.resolveComponent("RouterLink");return o.openBlock(),o.createBlock(i,{class:o.normalizeClass(["pga-router-link",{"pga-router-link__fit-content":!n.noFitContent,"pga-router-link__underline":n.underline,"pga-router-link__underline-on-hover":!n.noUnderlineOnHover}]),to:{name:n.name,params:n.params,query:n.query}},{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3},8,["class","to"])}}});const z5=I1(GI,[["__scopeId","data-v-a0fd12a3"]]),Kg=o.defineComponent({__name:"PgaRouterLinkButton",props:{name:{},params:{},query:{},type:{},icon:{},text:{type:[String,Number,Function]},variant:{},size:{},align:{},color:{},heightAndWidth:{},borderRadius:{},rounded:{type:Boolean},disabled:{type:Boolean},isLoading:{type:Boolean},numberToDisplay:{},noFitContent:{type:Boolean}},setup(e){return(t,a)=>(o.openBlock(),o.createBlock(z5,{name:t.name,params:t.params,query:t.query,noFitContent:t.noFitContent,noUnderlineOnHover:""},{default:o.withCtx(()=>[t.$slots.default?o.renderSlot(t.$slots,"default",{key:0}):(o.openBlock(),o.createBlock(L2,{key:1,type:t.type,icon:t.icon,text:t.text,variant:t.variant,size:t.size,align:t.align,color:t.color,fullWidth:!t.heightAndWidth,heightAndWidth:t.heightAndWidth,borderRadius:t.borderRadius,rounded:t.rounded,disabled:t.disabled,isLoading:t.isLoading,numberToDisplay:t.numberToDisplay},null,8,["type","icon","text","variant","size","align","color","fullWidth","heightAndWidth","borderRadius","rounded","disabled","isLoading","numberToDisplay"]))]),_:3},8,["name","params","query","noFitContent"]))}}),Ko=o.defineComponent({__name:"PgaNavigateToButton",props:{id:{},toName:{},withoutText:{type:Boolean},noFitContent:{type:Boolean}},setup(e){const t=_2("pgaButton");return(a,r)=>a.toName?(o.openBlock(),o.createBlock(Kg,{key:0,name:a.toName,params:{id:a.id},icon:"arrow-up-right-from-square",text:a.withoutText?void 0:o.unref(t)("navigateToBtn"),variant:"flat",size:"s",align:"left",color:"link",noFitContent:a.noFitContent},null,8,["name","params","text","noFitContent"])):o.createCommentVNode("",!0)}}),Zg=o.defineComponent({__name:"PgaSeeDetailsButton",props:{withoutText:{type:Boolean}},setup(e){const t=_2("pgaButton");return(a,r)=>(o.openBlock(),o.createBlock(L2,{class:"edit-button",variant:"flat",color:"grey",icon:"eye",text:a.withoutText?void 0:o.unref(t)("seeDetailsBtn"),size:"s",align:"left"},null,8,["text"]))}}),XI={class:"event"},KI={class:"pga-text-hidden"},ZI={class:"buttons"},QI=o.defineComponent({__name:"PgaCalendar",props:o.mergeModels({noEventsLabel:{},isLoading:{type:Boolean},hideWeekends:{type:Boolean},timeFrom:{},timeTo:{},timeStep:{},holidays:{},useArgentineHolidays:{type:Boolean},vacations:{},toName:{},withSeeDetailsButton:{type:Boolean},withEditButton:{type:Boolean},updateDatesFn:{},deleteFn:{},colors:{default:()=>({menuColor:"#42b983",titleBarColor:"#e4f5ef",todayCellColor:"rgba(240, 240, 255, 0.4)",selectedCellColor:"rgba(235, 255, 245, 0.4)",selectedCellBorderColor:"rgba(66, 185, 131, 0.5)"})}},{modelValue:{required:!0},modelModifiers:{},searchRange:{default:void 0},searchRangeModifiers:{}}),emits:o.mergeModels(["createEvent","seeEventDetails","editEvent","refreshList"],["update:modelValue","update:searchRange"]),setup(e,{emit:t}){o.useCssVars(V=>({"18d4991a":V.colors.menuColor,"9a69d344":V.colors.titleBarColor,a72f326c:V.colors.todayCellColor,"428de49c":V.colors.selectedCellColor,"32a3ad10":V.colors.selectedCellBorderColor}));const a=o.useModel(e,"modelValue"),r=o.useModel(e,"searchRange"),n=e,c=t,{calendar:i}=$e(),s=o.ref("week"),l=o.ref([]),f=Z2.getConfig().delayTime,u=o.ref(0),d=o.ref(),h=o.ref([]),m=[{day:1,month:0,label:"Año Nuevo"},{day:3,month:2,label:"Carnaval"},{day:4,month:2,label:"Carnaval"},{day:24,month:2,label:"Día Nacional de la Memoria por la Verdad y la Justicia"},{day:2,month:3,label:"Día del Veterano y de los Caídos en la Guerra de Malvinas"},{day:18,month:3,label:"Viernes Santo"},{day:1,month:4,label:"Día del Trabajador"},{day:25,month:4,label:"Día de la Revolución de Mayo"},{day:20,month:5,label:"Día de la Bandera"},{day:9,month:6,label:"Día de la Independencia"},{day:17,month:7,label:"Día del Paso a la Inmortalidad de Don José de San Martín"},{day:12,month:9,label:"Día del Respeto a la Diversidad Cultural"},{day:20,month:10,label:"Día de la Soberanía Nacional"},{day:8,month:11,label:"Día de la Inmaculada Concepción de María"},{day:25,month:11,label:"Navidad"}],v=o.computed(()=>n.timeStep||i.timeStep),p=o.computed(()=>n.withEditButton||n.deleteFn?90:60),g=o.computed(()=>s.value!=="day"),y=o.computed(()=>n.holidays?n.holidays:n.useArgentineHolidays?m:[]),x=o.computed(()=>{var _;const V=l.value.flatMap(N=>y.value.map(({month:q,day:S})=>C(N,q,S))),k=((_=n.vacations)==null?void 0:_.flatMap(({start:N,end:q})=>{const S=[];let O=new Date(N),U=new Date(q);for(;O<=U;){const J=O.getUTCFullYear(),Y=O.getUTCMonth(),G=O.getUTCDate();S.push(C(J,Y,G)),O.setUTCDate(O.getUTCDate()+1)}return S}))||[];return[...V,...k]});function C(V,k,_){return new Date(Date.UTC(V,k,_)).toISOString().split("T")[0]}function b(V){const k=v.value*6e4,_=new Date(Math.floor(V.getTime()/k)*k),N=new Date(_.getTime()+k);return{start:_,end:N}}function M(V){const k=V.startDate.getFullYear(),_=V.endDate.getFullYear(),N=[k];k!==_&&N.push(_),l.value=N,A(V)}function w(V){if(s.value==="month")return;const k=Date.now();if(k-u.value<f){d.value&&clearTimeout(d.value);return}u.value=k,d.value=setTimeout(()=>{if(!v.value){c("createEvent",V);return}const{start:_,end:N}=b(V);c("createEvent",_,N)},f)}async function z(V){const k=V.event.id,_=a.value.find(G=>G.id===k);let N=V.event.start,q=V.event.end;const S=new Date(V.originalEvent.start),O=new Date(V.originalEvent.end);if(v.value){const G=b(N);N=G.start,q=G.end}const U=a.value.some(G=>{if(G.id===k)return!1;const B=N>=G.start&&N<G.end,T=q>G.start&&q<=G.end,L=N<=G.start&&q>=G.end;return B||T||L});function J(){_.start=N,_.end=q}function Y(){_.start=S,_.end=O}if(U){Y();return}J();try{await n.updateDatesFn(_),J()}catch{Y()}}async function H(V){try{h.value.push(V.id),await n.deleteFn(V),a.value=a.value.filter(k=>k.id!==V.id)}finally{h.value=h.value.filter(k=>k!==V.id)}}function A(V){const k=V.startDate,_=V.endDate;if(r.value&&k>=r.value.start&&_<=r.value.end)return;const N={start:k,end:_};r.value=N,c("refreshList",N)}return(V,k)=>(o.openBlock(),o.createBlock(o.unref(II),{activeView:s.value,"onUpdate:activeView":k[0]||(k[0]=_=>s.value=_),class:"pga-calendar",events:a.value,locale:o.unref(h4)().language,disableViews:["years","year"],disableDays:x.value,hideWeekends:V.hideWeekends||o.unref(i).hideWeekends,showTimeInCells:"",watchRealTime:"",timeFrom:V.timeFrom||o.unref(i).timeFrom,timeTo:V.timeTo||o.unref(i).timeTo,timeStep:v.value,timeCellHeight:p.value,editableEvents:{drag:!!V.updateDatesFn},onReady:k[1]||(k[1]=_=>M(_)),onViewChange:k[2]||(k[2]=_=>M(_)),onCellClick:k[3]||(k[3]=_=>w(_)),onEventDrop:k[4]||(k[4]=_=>z(_))},o.createSlots({event:o.withCtx(({event:_})=>[o.createElementVNode("div",XI,[o.createElementVNode("div",KI,o.toDisplayString(_.toString()),1),o.createElementVNode("div",null,o.toDisplayString(`${o.unref(sc)(_.start)} - ${o.unref(sc)(_.end)}`),1),o.createElementVNode("div",ZI,[V.withSeeDetailsButton?(o.openBlock(),o.createBlock(Zg,{key:0,withoutText:g.value,onClick:N=>c("seeEventDetails",_)},null,8,["withoutText","onClick"])):o.createCommentVNode("",!0),V.withEditButton?(o.openBlock(),o.createBlock(wc,{key:1,withoutText:g.value,onClick:N=>c("editEvent",_)},null,8,["withoutText","onClick"])):o.createCommentVNode("",!0),V.deleteFn?(o.openBlock(),o.createBlock(wn,{key:2,withoutText:g.value,isLoading:h.value.includes(_.id),onDeleteConfirmed:N=>H(_)},null,8,["withoutText","isLoading","onDeleteConfirmed"])):o.createCommentVNode("",!0),V.toName?(o.openBlock(),o.createBlock(Ko,{key:3,id:_.id,toName:V.toName,withoutText:g.value},null,8,["id","toName","withoutText"])):o.createCommentVNode("",!0)])])]),_:2},[V.isLoading?{name:"title",fn:o.withCtx(()=>[o.createVNode(Lt,{size:"m"})]),key:"0"}:void 0,V.noEventsLabel?{name:"no-event",fn:o.withCtx(()=>[o.createVNode(ye,{text:V.noEventsLabel},null,8,["text"])]),key:"1"}:void 0]),1032,["activeView","events","locale","disableDays","hideWeekends","timeFrom","timeTo","timeStep","timeCellHeight","editableEvents"]))}});const JI=I1(QI,[["__scopeId","data-v-2e1b8475"]]),e$=o.defineComponent({__name:"PgaColorCircle",props:{color:{}},setup(e){return(t,a)=>(o.openBlock(),o.createElementBlock("div",{class:"color-circle",style:o.normalizeStyle({"background-color":t.color})},null,4))}});const Qg=I1(e$,[["__scopeId","data-v-4abf5632"]]);function Zo(e,t){const a=r=>{let n=e.value.parentElement;for(;n&&n!==document.body;){const c=window.getComputedStyle(n).overflowX,i=window.getComputedStyle(n).overflowY;(i==="auto"||i==="scroll"||c==="auto"||c==="scroll")&&n[r]("scroll",t),n=n.parentElement}window[r]("scroll",t)};o.onMounted(()=>a("addEventListener")),o.onBeforeUnmount(()=>a("removeEventListener"))}const t$=o.defineComponent({__name:"PgaDropdown",props:{align:{default:"center"},item:{},options:{}},setup(e){const t=e,a=o.ref(),r=o.ref(),n=o.ref(),c=o.ref(!1);Zo(a,()=>c.value=!1);const i=o.computed(()=>t.options?t.options.filter(s=>s.ifFn?s.ifFn(t.item):!0):[]);return o.watch(r,s=>{if(!s)return;const l=document.documentElement.clientHeight,f=document.documentElement.clientWidth,u=a.value.getBoundingClientRect(),d={},h=u.top<l/2,m="0.5rem";h?(d.top=`${u.bottom}px`,d["margin-top"]=m):(d.bottom=`${l-u.top}px`,d["margin-bottom"]=m),t.align==="center"?d.left=`${u.left+u.width/2-s.getBoundingClientRect().width/2}px`:t.align==="left"?d.left=`${u.left}px`:t.align==="right"&&(d.right=`${f-u.right}px`),n.value=d}),(s,l)=>{const f=o.resolveDirective("click-outside");return o.openBlock(),o.createElementBlock("div",{ref_key:"dropdownRef",ref:a,class:"dropdown"},[o.createVNode(L2,{icon:"ellipsis-vertical",color:"first",onClick:l[0]||(l[0]=u=>c.value=!0)}),(o.openBlock(),o.createBlock(o.Teleport,{to:"body"},[c.value?o.withDirectives((o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"contentRef",ref:r,class:"dropdown--content",style:o.normalizeStyle(n.value)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.value,u=>(o.openBlock(),o.createBlock(L2,{key:u.text,size:"s",align:"left",borderRadius:"0",variant:"flat",color:u.color||"first",icon:u.icon,text:u.text,onClick:d=>u.clickFn(s.item)},null,8,["color","icon","text","onClick"]))),128)),s.$slots.default?o.renderSlot(s.$slots,"default",{key:0},void 0,!0):o.createCommentVNode("",!0)],4)),[[f,()=>c.value=!1]]):o.createCommentVNode("",!0)]))],512)}}});const Jg=I1(t$,[["__scopeId","data-v-3e641a07"]]);var ey={exports:{}};/*!
780
780
  * Quill Editor v1.3.7
781
781
  * https://quilljs.com/
782
782
  * Copyright (c) 2014, Jason Chen
@@ -833,7 +833,7 @@ A valid view must be one of: ${Ru.join(", ")}.`),e="week"),this.enabledViews.inc
833
833
  * Released under the MIT License
834
834
  */class VW{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,a,r,n){const c=a.listeners[n],i=a.duration;c.forEach(s=>s({chart:t,initial:a.initial,numSteps:i,currentStep:Math.min(r-a.start,i)}))}_refresh(){this._request||(this._running=!0,this._request=dy.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let a=0;this._charts.forEach((r,n)=>{if(!r.running||!r.items.length)return;const c=r.items;let i=c.length-1,s=!1,l;for(;i>=0;--i)l=c[i],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),s=!0):(c[i]=c[c.length-1],c.pop());s&&(n.draw(),this._notify(n,r,t,"progress")),c.length||(r.running=!1,this._notify(n,r,t,"complete"),r.initial=!1),a+=c.length}),this._lastDate=t,a===0&&(this._running=!1)}_getAnims(t){const a=this._charts;let r=a.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},a.set(t,r)),r}listen(t,a,r){this._getAnims(t).listeners[a].push(r)}add(t,a){!a||!a.length||this._getAnims(t).items.push(...a)}has(t){return this._getAnims(t).items.length>0}start(t){const a=this._charts.get(t);a&&(a.running=!0,a.start=Date.now(),a.duration=a.items.reduce((r,n)=>Math.max(r,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;const a=this._charts.get(t);return!(!a||!a.running||!a.items.length)}stop(t){const a=this._charts.get(t);if(!a||!a.items.length)return;const r=a.items;let n=r.length-1;for(;n>=0;--n)r[n].cancel();a.items=[],this._notify(t,a,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var et=new VW;const fd="transparent",LW={boolean(e,t,a){return a>.5?t:e},color(e,t,a){const r=ed(e||fd),n=r.valid&&ed(t||fd);return n&&n.valid?n.mix(r,a).hexString():t},number(e,t,a){return e+(t-e)*a}};class SW{constructor(t,a,r,n){const c=a[r];n=ja([t.to,n,c,t.from]);const i=ja([t.from,c,n]);this._active=!0,this._fn=t.fn||LW[t.type||typeof i],this._easing=dr[t.easing]||dr.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=a,this._prop=r,this._from=i,this._to=n,this._promises=void 0}active(){return this._active}update(t,a,r){if(this._active){this._notify(!1);const n=this._target[this._prop],c=r-this._start,i=this._duration-c;this._start=r,this._duration=Math.floor(Math.max(i,t.duration)),this._total+=c,this._loop=!!t.loop,this._to=ja([t.to,a,n,t.from]),this._from=ja([t.from,n,a])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const a=t-this._start,r=this._duration,n=this._prop,c=this._from,i=this._loop,s=this._to;let l;if(this._active=c!==s&&(i||a<r),!this._active){this._target[n]=s,this._notify(!0);return}if(a<0){this._target[n]=c;return}l=a/r%2,l=i&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(c,s,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((a,r)=>{t.push({res:a,rej:r})})}_notify(t){const a=t?"res":"rej",r=this._promises||[];for(let n=0;n<r.length;n++)r[n][a]()}}class Sy{constructor(t,a){this._chart=t,this._properties=new Map,this.configure(a)}configure(t){if(!u2(t))return;const a=Object.keys(K2.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(n=>{const c=t[n];if(!u2(c))return;const i={};for(const s of a)i[s]=c[s];(R2(c.properties)&&c.properties||[n]).forEach(s=>{(s===n||!r.has(s))&&r.set(s,i)})})}_animateOptions(t,a){const r=a.options,n=TW(t,r);if(!n)return[];const c=this._createAnimations(n,r);return r.$shared&&AW(t.options.$animations,r).then(()=>{t.options=r},()=>{}),c}_createAnimations(t,a){const r=this._properties,n=[],c=t.$animations||(t.$animations={}),i=Object.keys(a),s=Date.now();let l;for(l=i.length-1;l>=0;--l){const f=i[l];if(f.charAt(0)==="$")continue;if(f==="options"){n.push(...this._animateOptions(t,a));continue}const u=a[f];let d=c[f];const h=r.get(f);if(d)if(h&&d.active()){d.update(h,u,s);continue}else d.cancel();if(!h||!h.duration){t[f]=u;continue}c[f]=d=new SW(h,t,f,u),n.push(d)}return n}update(t,a){if(this._properties.size===0){Object.assign(t,a);return}const r=this._createAnimations(t,a);if(r.length)return et.add(this._chart,r),!0}}function AW(e,t){const a=[],r=Object.keys(t);for(let n=0;n<r.length;n++){const c=e[r[n]];c&&c.active()&&a.push(c.wait())}return Promise.all(a)}function TW(e,t){if(!t)return;let a=e.options;if(!a){e.options=t;return}return a.$shared&&(e.options=a=Object.assign({},a,{$shared:!1,$animations:{}})),a}function ud(e,t){const a=e&&e.options||{},r=a.reverse,n=a.min===void 0?t:0,c=a.max===void 0?t:0;return{start:r?c:n,end:r?n:c}}function EW(e,t,a){if(a===!1)return!1;const r=ud(e,a),n=ud(t,a);return{top:n.end,right:r.end,bottom:n.start,left:r.start}}function NW(e){let t,a,r,n;return u2(e)?(t=e.top,a=e.right,r=e.bottom,n=e.left):t=a=r=n=e,{top:t,right:a,bottom:r,left:n,disabled:e===!1}}function Ay(e,t){const a=[],r=e._getSortedDatasetMetas(t);let n,c;for(n=0,c=r.length;n<c;++n)a.push(r[n].index);return a}function dd(e,t,a,r={}){const n=e.keys,c=r.mode==="single";let i,s,l,f;if(t===null)return;let u=!1;for(i=0,s=n.length;i<s;++i){if(l=+n[i],l===a){if(u=!0,r.all)continue;break}f=e.values[l],se(f)&&(c||t===0||O4(t)===O4(f))&&(t+=f)}return!u&&!r.all?0:t}function DW(e,t){const{iScale:a,vScale:r}=t,n=a.axis==="x"?"x":"y",c=r.axis==="x"?"x":"y",i=Object.keys(e),s=new Array(i.length);let l,f,u;for(l=0,f=i.length;l<f;++l)u=i[l],s[l]={[n]:u,[c]:e[u]};return s}function Fi(e,t){const a=e&&e.options.stacked;return a||a===void 0&&t.stack!==void 0}function OW(e,t,a){return`${e.id}.${t.id}.${a.stack||a.type}`}function PW(e){const{min:t,max:a,minDefined:r,maxDefined:n}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:n?a:Number.POSITIVE_INFINITY}}function BW(e,t,a){const r=e[t]||(e[t]={});return r[a]||(r[a]={})}function hd(e,t,a,r){for(const n of t.getMatchingVisibleMetas(r).reverse()){const c=e[n.index];if(a&&c>0||!a&&c<0)return n.index}return null}function md(e,t){const{chart:a,_cachedMeta:r}=e,n=a._stacks||(a._stacks={}),{iScale:c,vScale:i,index:s}=r,l=c.axis,f=i.axis,u=OW(c,i,r),d=t.length;let h;for(let m=0;m<d;++m){const v=t[m],{[l]:p,[f]:g}=v,y=v._stacks||(v._stacks={});h=y[f]=BW(n,u,p),h[s]=g,h._top=hd(h,i,!0,r.type),h._bottom=hd(h,i,!1,r.type);const x=h._visualValues||(h._visualValues={});x[s]=g}}function Ri(e,t){const a=e.scales;return Object.keys(a).filter(r=>a[r].axis===t).shift()}function FW(e,t){return v0(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function RW(e,t,a){return v0(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:a,index:t,mode:"default",type:"data"})}function Aa(e,t){const a=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const n of t){const c=n._stacks;if(!c||c[r]===void 0||c[r][a]===void 0)return;delete c[r][a],c[r]._visualValues!==void 0&&c[r]._visualValues[a]!==void 0&&delete c[r]._visualValues[a]}}}const Ii=e=>e==="reset"||e==="none",pd=(e,t)=>t?e:Object.assign({},e),IW=(e,t,a)=>e&&!t.hidden&&t._stacked&&{keys:Ay(a,!0),values:null};class l4{constructor(t,a){this.chart=t,this._ctx=t.ctx,this.index=a,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Fi(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Aa(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,a=this._cachedMeta,r=this.getDataset(),n=(d,h,m,v)=>d==="x"?h:d==="r"?v:m,c=a.xAxisID=a2(r.xAxisID,Ri(t,"x")),i=a.yAxisID=a2(r.yAxisID,Ri(t,"y")),s=a.rAxisID=a2(r.rAxisID,Ri(t,"r")),l=a.indexAxis,f=a.iAxisID=n(l,c,i,s),u=a.vAxisID=n(l,i,c,s);a.xScale=this.getScaleForId(c),a.yScale=this.getScaleForId(i),a.rScale=this.getScaleForId(s),a.iScale=this.getScaleForId(f),a.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const a=this._cachedMeta;return t===a.iScale?a.vScale:a.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Zu(this._data,this),t._stacked&&Aa(t)}_dataCheck(){const t=this.getDataset(),a=t.data||(t.data=[]),r=this._data;if(u2(a)){const n=this._cachedMeta;this._data=DW(a,n)}else if(r!==a){if(r){Zu(r,this);const n=this._cachedMeta;Aa(n),n._parsed=[]}a&&Object.isExtensible(a)&&kU(a,this),this._syncList=[],this._data=a}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const a=this._cachedMeta,r=this.getDataset();let n=!1;this._dataCheck();const c=a._stacked;a._stacked=Fi(a.vScale,a),a.stack!==r.stack&&(n=!0,Aa(a),a.stack=r.stack),this._resyncElements(t),(n||c!==a._stacked)&&(md(this,a._parsed),a._stacked=Fi(a.vScale,a))}configure(){const t=this.chart.config,a=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),a,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,a){const{_cachedMeta:r,_data:n}=this,{iScale:c,_stacked:i}=r,s=c.axis;let l=t===0&&a===n.length?!0:r._sorted,f=t>0&&r._parsed[t-1],u,d,h;if(this._parsing===!1)r._parsed=n,r._sorted=!0,h=n;else{R2(n[t])?h=this.parseArrayData(r,n,t,a):u2(n[t])?h=this.parseObjectData(r,n,t,a):h=this.parsePrimitiveData(r,n,t,a);const m=()=>d[s]===null||f&&d[s]<f[s];for(u=0;u<a;++u)r._parsed[u+t]=d=h[u],l&&(m()&&(l=!1),f=d);r._sorted=l}i&&md(this,h)}parsePrimitiveData(t,a,r,n){const{iScale:c,vScale:i}=t,s=c.axis,l=i.axis,f=c.getLabels(),u=c===i,d=new Array(n);let h,m,v;for(h=0,m=n;h<m;++h)v=h+r,d[h]={[s]:u||c.parse(f[v],v),[l]:i.parse(a[v],v)};return d}parseArrayData(t,a,r,n){const{xScale:c,yScale:i}=t,s=new Array(n);let l,f,u,d;for(l=0,f=n;l<f;++l)u=l+r,d=a[u],s[l]={x:c.parse(d[0],u),y:i.parse(d[1],u)};return s}parseObjectData(t,a,r,n){const{xScale:c,yScale:i}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,f=new Array(n);let u,d,h,m;for(u=0,d=n;u<d;++u)h=u+r,m=a[h],f[u]={x:c.parse(f0(m,s),h),y:i.parse(f0(m,l),h)};return f}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,a,r){const n=this.chart,c=this._cachedMeta,i=a[t.axis],s={keys:Ay(n,!0),values:a._stacks[t.axis]._visualValues};return dd(s,i,c.index,{mode:r})}updateRangeFromParsed(t,a,r,n){const c=r[a.axis];let i=c===null?NaN:c;const s=n&&r._stacks[a.axis];n&&s&&(n.values=s,i=dd(n,c,this._cachedMeta.index)),t.min=Math.min(t.min,i),t.max=Math.max(t.max,i)}getMinMax(t,a){const r=this._cachedMeta,n=r._parsed,c=r._sorted&&t===r.iScale,i=n.length,s=this._getOtherScale(t),l=IW(a,r,this.chart),f={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=PW(s);let h,m;function v(){m=n[h];const p=m[s.axis];return!se(m[t.axis])||u>p||d<p}for(h=0;h<i&&!(!v()&&(this.updateRangeFromParsed(f,t,m,l),c));++h);if(c){for(h=i-1;h>=0;--h)if(!v()){this.updateRangeFromParsed(f,t,m,l);break}}return f}getAllParsedValues(t){const a=this._cachedMeta._parsed,r=[];let n,c,i;for(n=0,c=a.length;n<c;++n)i=a[n][t.axis],se(i)&&r.push(i);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const a=this._cachedMeta,r=a.iScale,n=a.vScale,c=this.getParsed(t);return{label:r?""+r.getLabelForValue(c[r.axis]):"",value:n?""+n.getLabelForValue(c[n.axis]):""}}_update(t){const a=this._cachedMeta;this.update(t||"default"),a._clip=NW(a2(this.options.clip,EW(a.xScale,a.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,a=this.chart,r=this._cachedMeta,n=r.data||[],c=a.chartArea,i=[],s=this._drawStart||0,l=this._drawCount||n.length-s,f=this.options.drawActiveElementsOnTop;let u;for(r.dataset&&r.dataset.draw(t,c,s,l),u=s;u<s+l;++u){const d=n[u];d.hidden||(d.active&&f?i.push(d):d.draw(t,c))}for(u=0;u<i.length;++u)i[u].draw(t,c)}getStyle(t,a){const r=a?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,a,r){const n=this.getDataset();let c;if(t>=0&&t<this._cachedMeta.data.length){const i=this._cachedMeta.data[t];c=i.$context||(i.$context=RW(this.getContext(),t,i)),c.parsed=this.getParsed(t),c.raw=n.data[t],c.index=c.dataIndex=t}else c=this.$context||(this.$context=FW(this.chart.getContext(),this.index)),c.dataset=n,c.index=c.datasetIndex=this.index;return c.active=!!a,c.mode=r,c}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,a){return this._resolveElementOptions(this.dataElementType.id,a,t)}_resolveElementOptions(t,a="default",r){const n=a==="active",c=this._cachedDataOpts,i=t+"-"+a,s=c[i],l=this.enableOptionSharing&&Wr(r);if(s)return pd(s,l);const f=this.chart.config,u=f.datasetElementScopeKeys(this._type,t),d=n?[`${t}Hover`,"hover",t,""]:[t,""],h=f.getOptionScopes(this.getDataset(),u),m=Object.keys(K2.elements[t]),v=()=>this.getContext(r,n,a),p=f.resolveNamedOptions(h,m,v,d);return p.$shared&&(p.$shared=l,c[i]=Object.freeze(pd(p,l))),p}_resolveAnimations(t,a,r){const n=this.chart,c=this._cachedDataOpts,i=`animation-${a}`,s=c[i];if(s)return s;let l;if(n.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,a),h=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(h,this.getContext(t,r,a))}const f=new Sy(n,l&&l.animations);return l&&l._cacheable&&(c[i]=Object.freeze(f)),f}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,a){return!a||Ii(t)||this.chart._animationsDisabled}_getSharedOptions(t,a){const r=this.resolveDataElementOptions(t,a),n=this._sharedOptions,c=this.getSharedOptions(r),i=this.includeOptions(a,c)||c!==n;return this.updateSharedOptions(c,a,r),{sharedOptions:c,includeOptions:i}}updateElement(t,a,r,n){Ii(n)?Object.assign(t,r):this._resolveAnimations(a,n).update(t,r)}updateSharedOptions(t,a,r){t&&!Ii(a)&&this._resolveAnimations(void 0,a).update(t,r)}_setStyle(t,a,r,n){t.active=n;const c=this.getStyle(a,n);this._resolveAnimations(a,r,n).update(t,{options:!n&&this.getSharedOptions(c)||c})}removeHoverStyle(t,a,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,a,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const a=this._data,r=this._cachedMeta.data;for(const[s,l,f]of this._syncList)this[s](l,f);this._syncList=[];const n=r.length,c=a.length,i=Math.min(c,n);i&&this.parse(0,i),c>n?this._insertElements(n,c-n,t):c<n&&this._removeElements(c,n-c)}_insertElements(t,a,r=!0){const n=this._cachedMeta,c=n.data,i=t+a;let s;const l=f=>{for(f.length+=a,s=f.length-1;s>=i;s--)f[s]=f[s-a]};for(l(c),s=t;s<i;++s)c[s]=new this.dataElementType;this._parsing&&l(n._parsed),this.parse(t,a),r&&this.updateElements(c,t,a,"reset")}updateElements(t,a,r,n){}_removeElements(t,a){const r=this._cachedMeta;if(this._parsing){const n=r._parsed.splice(t,a);r._stacked&&Aa(r,n)}r.data.splice(t,a)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[a,r,n]=t;this[a](r,n)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,a){a&&this._sync(["_removeElements",t,a]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}g1(l4,"defaults",{}),g1(l4,"datasetElementType",null),g1(l4,"dataElementType",null);function $W(e,t){if(!e._cache.$bar){const a=e.getMatchingVisibleMetas(t);let r=[];for(let n=0,c=a.length;n<c;n++)r=r.concat(a[n].controller.getAllParsedValues(e));e._cache.$bar=uy(r.sort((n,c)=>n-c))}return e._cache.$bar}function UW(e){const t=e.iScale,a=$W(t,e.type);let r=t._length,n,c,i,s;const l=()=>{i===32767||i===-32768||(Wr(s)&&(r=Math.min(r,Math.abs(i-s)||r)),s=i)};for(n=0,c=a.length;n<c;++n)i=t.getPixelForValue(a[n]),l();for(s=void 0,n=0,c=t.ticks.length;n<c;++n)i=t.getPixelForTick(n),l();return r}function WW(e,t,a,r){const n=a.barThickness;let c,i;return x2(n)?(c=t.min*a.categoryPercentage,i=a.barPercentage):(c=n*r,i=1),{chunk:c/r,ratio:i,start:t.pixels[e]-c/2}}function qW(e,t,a,r){const n=t.pixels,c=n[e];let i=e>0?n[e-1]:null,s=e<n.length-1?n[e+1]:null;const l=a.categoryPercentage;i===null&&(i=c-(s===null?t.end-t.start:s-c)),s===null&&(s=c+c-i);const f=c-(c-Math.min(i,s))/2*l;return{chunk:Math.abs(s-i)/2*l/r,ratio:a.barPercentage,start:f}}function jW(e,t,a,r){const n=a.parse(e[0],r),c=a.parse(e[1],r),i=Math.min(n,c),s=Math.max(n,c);let l=i,f=s;Math.abs(i)>Math.abs(s)&&(l=s,f=i),t[a.axis]=f,t._custom={barStart:l,barEnd:f,start:n,end:c,min:i,max:s}}function Ty(e,t,a,r){return R2(e)?jW(e,t,a,r):t[a.axis]=a.parse(e,r),t}function vd(e,t,a,r){const n=e.iScale,c=e.vScale,i=n.getLabels(),s=n===c,l=[];let f,u,d,h;for(f=a,u=a+r;f<u;++f)h=t[f],d={},d[n.axis]=s||n.parse(i[f],f),l.push(Ty(h,d,c,f));return l}function $i(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function YW(e,t,a){return e!==0?O4(e):(t.isHorizontal()?1:-1)*(t.min>=a?1:-1)}function GW(e){let t,a,r,n,c;return e.horizontal?(t=e.base>e.x,a="left",r="right"):(t=e.base<e.y,a="bottom",r="top"),t?(n="end",c="start"):(n="start",c="end"),{start:a,end:r,reverse:t,top:n,bottom:c}}function XW(e,t,a,r){let n=t.borderSkipped;const c={};if(!n){e.borderSkipped=c;return}if(n===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:i,end:s,reverse:l,top:f,bottom:u}=GW(e);n==="middle"&&a&&(e.enableBorderRadius=!0,(a._top||0)===r?n=f:(a._bottom||0)===r?n=u:(c[gd(u,i,s,l)]=!0,n=f)),c[gd(n,i,s,l)]=!0,e.borderSkipped=c}function gd(e,t,a,r){return r?(e=KW(e,t,a),e=yd(e,a,t)):e=yd(e,t,a),e}function KW(e,t,a){return e===t?a:e===a?t:e}function yd(e,t,a){return e==="start"?t:e==="end"?a:e}function ZW(e,{inflateAmount:t},a){e.inflateAmount=t==="auto"?a===1?.33:0:t}class W8 extends l4{parsePrimitiveData(t,a,r,n){return vd(t,a,r,n)}parseArrayData(t,a,r,n){return vd(t,a,r,n)}parseObjectData(t,a,r,n){const{iScale:c,vScale:i}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,f=c.axis==="x"?s:l,u=i.axis==="x"?s:l,d=[];let h,m,v,p;for(h=r,m=r+n;h<m;++h)p=a[h],v={},v[c.axis]=c.parse(f0(p,f),h),d.push(Ty(f0(p,u),v,i,h));return d}updateRangeFromParsed(t,a,r,n){super.updateRangeFromParsed(t,a,r,n);const c=r._custom;c&&a===this._cachedMeta.vScale&&(t.min=Math.min(t.min,c.min),t.max=Math.max(t.max,c.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const a=this._cachedMeta,{iScale:r,vScale:n}=a,c=this.getParsed(t),i=c._custom,s=$i(i)?"["+i.start+", "+i.end+"]":""+n.getLabelForValue(c[n.axis]);return{label:""+r.getLabelForValue(c[r.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const a=this._cachedMeta;this.updateElements(a.data,0,a.data.length,t)}updateElements(t,a,r,n){const c=n==="reset",{index:i,_cachedMeta:{vScale:s}}=this,l=s.getBasePixel(),f=s.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:h}=this._getSharedOptions(a,n);for(let m=a;m<a+r;m++){const v=this.getParsed(m),p=c||x2(v[s.axis])?{base:l,head:l}:this._calculateBarValuePixels(m),g=this._calculateBarIndexPixels(m,u),y=(v._stacks||{})[s.axis],x={horizontal:f,base:p.base,enableBorderRadius:!y||$i(v._custom)||i===y._top||i===y._bottom,x:f?p.head:g.center,y:f?g.center:p.head,height:f?g.size:Math.abs(p.size),width:f?Math.abs(p.size):g.size};h&&(x.options=d||this.resolveDataElementOptions(m,t[m].active?"active":n));const C=x.options||t[m].options;XW(x,C,y,i),ZW(x,C,u.ratio),this.updateElement(t[m],m,x,n)}}_getStacks(t,a){const{iScale:r}=this._cachedMeta,n=r.getMatchingVisibleMetas(this._type).filter(u=>u.controller.options.grouped),c=r.options.stacked,i=[],s=this._cachedMeta.controller.getParsed(a),l=s&&s[r.axis],f=u=>{const d=u._parsed.find(m=>m[r.axis]===l),h=d&&d[u.vScale.axis];if(x2(h)||isNaN(h))return!0};for(const u of n)if(!(a!==void 0&&f(u))&&((c===!1||i.indexOf(u.stack)===-1||c===void 0&&u.stack===void 0)&&i.push(u.stack),u.index===t))break;return i.length||i.push(void 0),i}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,a,r){const n=this._getStacks(t,r),c=a!==void 0?n.indexOf(a):-1;return c===-1?n.length-1:c}_getRuler(){const t=this.options,a=this._cachedMeta,r=a.iScale,n=[];let c,i;for(c=0,i=a.data.length;c<i;++c)n.push(r.getPixelForValue(this.getParsed(c)[r.axis],c));const s=t.barThickness;return{min:s||UW(a),pixels:n,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:s?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:a,_stacked:r,index:n},options:{base:c,minBarLength:i}}=this,s=c||0,l=this.getParsed(t),f=l._custom,u=$i(f);let d=l[a.axis],h=0,m=r?this.applyStack(a,l,r):d,v,p;m!==d&&(h=m-d,m=d),u&&(d=f.barStart,m=f.barEnd-f.barStart,d!==0&&O4(d)!==O4(f.barEnd)&&(h=0),h+=d);const g=!x2(c)&&!u?c:h;let y=a.getPixelForValue(g);if(this.chart.getDataVisibility(t)?v=a.getPixelForValue(h+m):v=y,p=v-y,Math.abs(p)<i){p=YW(p,a,s)*i,d===s&&(y-=p/2);const x=a.getPixelForDecimal(0),C=a.getPixelForDecimal(1),b=Math.min(x,C),M=Math.max(x,C);y=Math.max(Math.min(y,M),b),v=y+p,r&&!u&&(l._stacks[a.axis]._visualValues[n]=a.getValueForPixel(v)-a.getValueForPixel(y))}if(y===a.getPixelForValue(s)){const x=O4(p)*a.getLineWidthForValue(s)/2;y+=x,p-=x}return{size:p,base:y,head:v,center:v+p/2}}_calculateBarIndexPixels(t,a){const r=a.scale,n=this.options,c=n.skipNull,i=a2(n.maxBarThickness,1/0);let s,l;if(a.grouped){const f=c?this._getStackCount(t):a.stackCount,u=n.barThickness==="flex"?qW(t,a,n,f):WW(t,a,n,f),d=this._getStackIndex(this.index,this._cachedMeta.stack,c?t:void 0);s=u.start+u.chunk*d+u.chunk/2,l=Math.min(i,u.chunk*u.ratio)}else s=r.getPixelForValue(this.getParsed(t)[r.axis],t),l=Math.min(i,a.min*a.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}}draw(){const t=this._cachedMeta,a=t.vScale,r=t.data,n=r.length;let c=0;for(;c<n;++c)this.getParsed(c)[a.axis]!==null&&!r[c].hidden&&r[c].draw(this._ctx)}}g1(W8,"id","bar"),g1(W8,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),g1(W8,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class q8 extends l4{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,a,r,n){const c=super.parsePrimitiveData(t,a,r,n);for(let i=0;i<c.length;i++)c[i]._custom=this.resolveDataElementOptions(i+r).radius;return c}parseArrayData(t,a,r,n){const c=super.parseArrayData(t,a,r,n);for(let i=0;i<c.length;i++){const s=a[r+i];c[i]._custom=a2(s[2],this.resolveDataElementOptions(i+r).radius)}return c}parseObjectData(t,a,r,n){const c=super.parseObjectData(t,a,r,n);for(let i=0;i<c.length;i++){const s=a[r+i];c[i]._custom=a2(s&&s.r&&+s.r,this.resolveDataElementOptions(i+r).radius)}return c}getMaxOverflow(){const t=this._cachedMeta.data;let a=0;for(let r=t.length-1;r>=0;--r)a=Math.max(a,t[r].size(this.resolveDataElementOptions(r))/2);return a>0&&a}getLabelAndValue(t){const a=this._cachedMeta,r=this.chart.data.labels||[],{xScale:n,yScale:c}=a,i=this.getParsed(t),s=n.getLabelForValue(i.x),l=c.getLabelForValue(i.y),f=i._custom;return{label:r[t]||"",value:"("+s+", "+l+(f?", "+f:"")+")"}}update(t){const a=this._cachedMeta.data;this.updateElements(a,0,a.length,t)}updateElements(t,a,r,n){const c=n==="reset",{iScale:i,vScale:s}=this._cachedMeta,{sharedOptions:l,includeOptions:f}=this._getSharedOptions(a,n),u=i.axis,d=s.axis;for(let h=a;h<a+r;h++){const m=t[h],v=!c&&this.getParsed(h),p={},g=p[u]=c?i.getPixelForDecimal(.5):i.getPixelForValue(v[u]),y=p[d]=c?s.getBasePixel():s.getPixelForValue(v[d]);p.skip=isNaN(g)||isNaN(y),f&&(p.options=l||this.resolveDataElementOptions(h,m.active?"active":n),c&&(p.options.radius=0)),this.updateElement(m,h,p,n)}}resolveDataElementOptions(t,a){const r=this.getParsed(t);let n=super.resolveDataElementOptions(t,a);n.$shared&&(n=Object.assign({},n,{$shared:!1}));const c=n.radius;return a!=="active"&&(n.radius=0),n.radius+=a2(r&&r._custom,c),n}}g1(q8,"id","bubble"),g1(q8,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),g1(q8,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function QW(e,t,a){let r=1,n=1,c=0,i=0;if(t<$2){const s=e,l=s+t,f=Math.cos(s),u=Math.sin(s),d=Math.cos(l),h=Math.sin(l),m=(C,b,M)=>qr(C,s,l,!0)?1:Math.max(b,b*a,M,M*a),v=(C,b,M)=>qr(C,s,l,!0)?-1:Math.min(b,b*a,M,M*a),p=m(0,f,d),g=m(pe,u,h),y=v(U2,f,d),x=v(U2+pe,u,h);r=(p-y)/2,n=(g-x)/2,c=-(p+y)/2,i=-(g+x)/2}return{ratioX:r,ratioY:n,offsetX:c,offsetY:i}}class I0 extends l4{constructor(t,a){super(t,a),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,a){const r=this.getDataset().data,n=this._cachedMeta;if(this._parsing===!1)n._parsed=r;else{let c=l=>+r[l];if(u2(r[t])){const{key:l="value"}=this._parsing;c=f=>+f0(r[f],l)}let i,s;for(i=t,s=t+a;i<s;++i)n._parsed[i]=c(i)}}_getRotation(){return n4(this.options.rotation-90)}_getCircumference(){return n4(this.options.circumference)}_getRotationExtents(){let t=$2,a=-$2;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const n=this.chart.getDatasetMeta(r).controller,c=n._getRotation(),i=n._getCircumference();t=Math.min(t,c),a=Math.max(a,c+i)}return{rotation:t,circumference:a-t}}update(t){const a=this.chart,{chartArea:r}=a,n=this._cachedMeta,c=n.data,i=this.getMaxBorderWidth()+this.getMaxOffset(c)+this.options.spacing,s=Math.max((Math.min(r.width,r.height)-i)/2,0),l=Math.min(dU(this.options.cutout,s),1),f=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:h,ratioY:m,offsetX:v,offsetY:p}=QW(d,u,l),g=(r.width-i)/h,y=(r.height-i)/m,x=Math.max(Math.min(g,y)/2,0),C=iy(this.options.radius,x),b=Math.max(C*l,0),M=(C-b)/this._getVisibleDatasetWeightTotal();this.offsetX=v*C,this.offsetY=p*C,n.total=this.calculateTotal(),this.outerRadius=C-M*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-M*f,0),this.updateElements(c,0,c.length,t)}_circumference(t,a){const r=this.options,n=this._cachedMeta,c=this._getCircumference();return a&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||n._parsed[t]===null||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*c/$2)}updateElements(t,a,r,n){const c=n==="reset",i=this.chart,s=i.chartArea,f=i.options.animation,u=(s.left+s.right)/2,d=(s.top+s.bottom)/2,h=c&&f.animateScale,m=h?0:this.innerRadius,v=h?0:this.outerRadius,{sharedOptions:p,includeOptions:g}=this._getSharedOptions(a,n);let y=this._getRotation(),x;for(x=0;x<a;++x)y+=this._circumference(x,c);for(x=a;x<a+r;++x){const C=this._circumference(x,c),b=t[x],M={x:u+this.offsetX,y:d+this.offsetY,startAngle:y,endAngle:y+C,circumference:C,outerRadius:v,innerRadius:m};g&&(M.options=p||this.resolveDataElementOptions(x,b.active?"active":n)),y+=C,this.updateElement(b,x,M,n)}}calculateTotal(){const t=this._cachedMeta,a=t.data;let r=0,n;for(n=0;n<a.length;n++){const c=t._parsed[n];c!==null&&!isNaN(c)&&this.chart.getDataVisibility(n)&&!a[n].hidden&&(r+=Math.abs(c))}return r}calculateCircumference(t){const a=this._cachedMeta.total;return a>0&&!isNaN(t)?$2*(Math.abs(t)/a):0}getLabelAndValue(t){const a=this._cachedMeta,r=this.chart,n=r.data.labels||[],c=kn(a._parsed[t],r.options.locale);return{label:n[t]||"",value:c}}getMaxBorderWidth(t){let a=0;const r=this.chart;let n,c,i,s,l;if(!t){for(n=0,c=r.data.datasets.length;n<c;++n)if(r.isDatasetVisible(n)){i=r.getDatasetMeta(n),t=i.data,s=i.controller;break}}if(!t)return 0;for(n=0,c=t.length;n<c;++n)l=s.resolveDataElementOptions(n),l.borderAlign!=="inner"&&(a=Math.max(a,l.borderWidth||0,l.hoverBorderWidth||0));return a}getMaxOffset(t){let a=0;for(let r=0,n=t.length;r<n;++r){const c=this.resolveDataElementOptions(r);a=Math.max(a,c.offset||0,c.hoverOffset||0)}return a}_getRingWeightOffset(t){let a=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(a+=this._getRingWeight(r));return a}_getRingWeight(t){return Math.max(a2(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}g1(I0,"id","doughnut"),g1(I0,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),g1(I0,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),g1(I0,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const a=t.data;if(a.labels.length&&a.datasets.length){const{labels:{pointStyle:r,color:n}}=t.legend.options;return a.labels.map((c,i)=>{const l=t.getDatasetMeta(0).controller.getStyle(i);return{text:c,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:n,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(i),index:i}})}return[]}},onClick(t,a,r){r.chart.toggleDataVisibility(a.index),r.chart.update()}}}});class j8 extends l4{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const a=this._cachedMeta,{dataset:r,data:n=[],_dataset:c}=a,i=this.chart._animationsDisabled;let{start:s,count:l}=my(a,n,i);this._drawStart=s,this._drawCount=l,py(a)&&(s=0,l=n.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!c._decimated,r.points=n;const f=this.resolveDatasetElementOptions(t);this.options.showLine||(f.borderWidth=0),f.segment=this.options.segment,this.updateElement(r,void 0,{animated:!i,options:f},t),this.updateElements(n,s,l,t)}updateElements(t,a,r,n){const c=n==="reset",{iScale:i,vScale:s,_stacked:l,_dataset:f}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(a,n),h=i.axis,m=s.axis,{spanGaps:v,segment:p}=this.options,g=K6(v)?v:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||c||n==="none",x=a+r,C=t.length;let b=a>0&&this.getParsed(a-1);for(let M=0;M<C;++M){const w=t[M],z=y?w:{};if(M<a||M>=x){z.skip=!0;continue}const H=this.getParsed(M),A=x2(H[m]),V=z[h]=i.getPixelForValue(H[h],M),k=z[m]=c||A?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,H,l):H[m],M);z.skip=isNaN(V)||isNaN(k)||A,z.stop=M>0&&Math.abs(H[h]-b[h])>g,p&&(z.parsed=H,z.raw=f.data[M]),d&&(z.options=u||this.resolveDataElementOptions(M,w.active?"active":n)),y||this.updateElement(w,M,z,n),b=H}}getMaxOverflow(){const t=this._cachedMeta,a=t.dataset,r=a.options&&a.options.borderWidth||0,n=t.data||[];if(!n.length)return r;const c=n[0].size(this.resolveDataElementOptions(0)),i=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(r,c,i)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}g1(j8,"id","line"),g1(j8,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),g1(j8,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class mr extends l4{constructor(t,a){super(t,a),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const a=this._cachedMeta,r=this.chart,n=r.data.labels||[],c=kn(a._parsed[t].r,r.options.locale);return{label:n[t]||"",value:c}}parseObjectData(t,a,r,n){return zy.bind(this)(t,a,r,n)}update(t){const a=this._cachedMeta.data;this._updateRadius(),this.updateElements(a,0,a.length,t)}getMinMax(){const t=this._cachedMeta,a={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((r,n)=>{const c=this.getParsed(n).r;!isNaN(c)&&this.chart.getDataVisibility(n)&&(c<a.min&&(a.min=c),c>a.max&&(a.max=c))}),a}_updateRadius(){const t=this.chart,a=t.chartArea,r=t.options,n=Math.min(a.right-a.left,a.bottom-a.top),c=Math.max(n/2,0),i=Math.max(r.cutoutPercentage?c/100*r.cutoutPercentage:1,0),s=(c-i)/t.getVisibleDatasetCount();this.outerRadius=c-s*this.index,this.innerRadius=this.outerRadius-s}updateElements(t,a,r,n){const c=n==="reset",i=this.chart,l=i.options.animation,f=this._cachedMeta.rScale,u=f.xCenter,d=f.yCenter,h=f.getIndexAngle(0)-.5*U2;let m=h,v;const p=360/this.countVisibleElements();for(v=0;v<a;++v)m+=this._computeAngle(v,n,p);for(v=a;v<a+r;v++){const g=t[v];let y=m,x=m+this._computeAngle(v,n,p),C=i.getDataVisibility(v)?f.getDistanceFromCenterForValue(this.getParsed(v).r):0;m=x,c&&(l.animateScale&&(C=0),l.animateRotate&&(y=x=h));const b={x:u,y:d,innerRadius:0,outerRadius:C,startAngle:y,endAngle:x,options:this.resolveDataElementOptions(v,g.active?"active":n)};this.updateElement(g,v,b,n)}}countVisibleElements(){const t=this._cachedMeta;let a=0;return t.data.forEach((r,n)=>{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&a++}),a}_computeAngle(t,a,r){return this.chart.getDataVisibility(t)?n4(this.resolveDataElementOptions(t,a).angle||r):0}}g1(mr,"id","polarArea"),g1(mr,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),g1(mr,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const a=t.data;if(a.labels.length&&a.datasets.length){const{labels:{pointStyle:r,color:n}}=t.legend.options;return a.labels.map((c,i)=>{const l=t.getDatasetMeta(0).controller.getStyle(i);return{text:c,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:n,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(i),index:i}})}return[]}},onClick(t,a,r){r.chart.toggleDataVisibility(a.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class f7 extends I0{}g1(f7,"id","pie"),g1(f7,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Y8 extends l4{getLabelAndValue(t){const a=this._cachedMeta.vScale,r=this.getParsed(t);return{label:a.getLabels()[t],value:""+a.getLabelForValue(r[a.axis])}}parseObjectData(t,a,r,n){return zy.bind(this)(t,a,r,n)}update(t){const a=this._cachedMeta,r=a.dataset,n=a.data||[],c=a.iScale.getLabels();if(r.points=n,t!=="resize"){const i=this.resolveDatasetElementOptions(t);this.options.showLine||(i.borderWidth=0);const s={_loop:!0,_fullLoop:c.length===n.length,options:i};this.updateElement(r,void 0,s,t)}this.updateElements(n,0,n.length,t)}updateElements(t,a,r,n){const c=this._cachedMeta.rScale,i=n==="reset";for(let s=a;s<a+r;s++){const l=t[s],f=this.resolveDataElementOptions(s,l.active?"active":n),u=c.getPointPositionForValue(s,this.getParsed(s).r),d=i?c.xCenter:u.x,h=i?c.yCenter:u.y,m={x:d,y:h,angle:u.angle,skip:isNaN(d)||isNaN(h),options:f};this.updateElement(l,s,m,n)}}}g1(Y8,"id","radar"),g1(Y8,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),g1(Y8,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class G8 extends l4{getLabelAndValue(t){const a=this._cachedMeta,r=this.chart.data.labels||[],{xScale:n,yScale:c}=a,i=this.getParsed(t),s=n.getLabelForValue(i.x),l=c.getLabelForValue(i.y);return{label:r[t]||"",value:"("+s+", "+l+")"}}update(t){const a=this._cachedMeta,{data:r=[]}=a,n=this.chart._animationsDisabled;let{start:c,count:i}=my(a,r,n);if(this._drawStart=c,this._drawCount=i,py(a)&&(c=0,i=r.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:s,_dataset:l}=a;s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!l._decimated,s.points=r;const f=this.resolveDatasetElementOptions(t);f.segment=this.options.segment,this.updateElement(s,void 0,{animated:!n,options:f},t)}else this.datasetElementType&&(delete a.dataset,this.datasetElementType=!1);this.updateElements(r,c,i,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,a,r,n){const c=n==="reset",{iScale:i,vScale:s,_stacked:l,_dataset:f}=this._cachedMeta,u=this.resolveDataElementOptions(a,n),d=this.getSharedOptions(u),h=this.includeOptions(n,d),m=i.axis,v=s.axis,{spanGaps:p,segment:g}=this.options,y=K6(p)?p:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||c||n==="none";let C=a>0&&this.getParsed(a-1);for(let b=a;b<a+r;++b){const M=t[b],w=this.getParsed(b),z=x?M:{},H=x2(w[v]),A=z[m]=i.getPixelForValue(w[m],b),V=z[v]=c||H?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,w,l):w[v],b);z.skip=isNaN(A)||isNaN(V)||H,z.stop=b>0&&Math.abs(w[m]-C[m])>y,g&&(z.parsed=w,z.raw=f.data[b]),h&&(z.options=d||this.resolveDataElementOptions(b,M.active?"active":n)),x||this.updateElement(M,b,z,n),C=w}this.updateSharedOptions(d,n,u)}getMaxOverflow(){const t=this._cachedMeta,a=t.data||[];if(!this.options.showLine){let s=0;for(let l=a.length-1;l>=0;--l)s=Math.max(s,a[l].size(this.resolveDataElementOptions(l))/2);return s>0&&s}const r=t.dataset,n=r.options&&r.options.borderWidth||0;if(!a.length)return n;const c=a[0].size(this.resolveDataElementOptions(0)),i=a[a.length-1].size(this.resolveDataElementOptions(a.length-1));return Math.max(n,c,i)/2}}g1(G8,"id","scatter"),g1(G8,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),g1(G8,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var JW=Object.freeze({__proto__:null,BarController:W8,BubbleController:q8,DoughnutController:I0,LineController:j8,PieController:f7,PolarAreaController:mr,RadarController:Y8,ScatterController:G8});function V0(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class hl{constructor(t){g1(this,"options");this.options=t||{}}static override(t){Object.assign(hl.prototype,t)}init(){}formats(){return V0()}parse(){return V0()}format(){return V0()}add(){return V0()}diff(){return V0()}startOf(){return V0()}endOf(){return V0()}}var eq={_date:hl};function tq(e,t,a,r){const{controller:n,data:c,_sorted:i}=e,s=n._cachedMeta.iScale;if(s&&t===s.axis&&t!=="r"&&i&&c.length){const l=s._reversePixels?wU:lt;if(r){if(n._sharedOptions){const f=c[0],u=typeof f.getRange=="function"&&f.getRange(t);if(u){const d=l(c,t,a-u),h=l(c,t,a+u);return{lo:d.lo,hi:h.hi}}}}else return l(c,t,a)}return{lo:0,hi:c.length-1}}function Hn(e,t,a,r,n){const c=e.getSortedVisibleDatasetMetas(),i=a[t];for(let s=0,l=c.length;s<l;++s){const{index:f,data:u}=c[s],{lo:d,hi:h}=tq(c[s],t,i,n);for(let m=d;m<=h;++m){const v=u[m];v.skip||r(v,f,m)}}}function aq(e){const t=e.indexOf("x")!==-1,a=e.indexOf("y")!==-1;return function(r,n){const c=t?Math.abs(r.x-n.x):0,i=a?Math.abs(r.y-n.y):0;return Math.sqrt(Math.pow(c,2)+Math.pow(i,2))}}function Ui(e,t,a,r,n){const c=[];return!n&&!e.isPointInArea(t)||Hn(e,a,t,function(s,l,f){!n&&!ft(s,e.chartArea,0)||s.inRange(t.x,t.y,r)&&c.push({element:s,datasetIndex:l,index:f})},!0),c}function rq(e,t,a,r){let n=[];function c(i,s,l){const{startAngle:f,endAngle:u}=i.getProps(["startAngle","endAngle"],r),{angle:d}=ly(i,{x:t.x,y:t.y});qr(d,f,u)&&n.push({element:i,datasetIndex:s,index:l})}return Hn(e,a,t,c),n}function nq(e,t,a,r,n,c){let i=[];const s=aq(a);let l=Number.POSITIVE_INFINITY;function f(u,d,h){const m=u.inRange(t.x,t.y,n);if(r&&!m)return;const v=u.getCenterPoint(n);if(!(!!c||e.isPointInArea(v))&&!m)return;const g=s(t,v);g<l?(i=[{element:u,datasetIndex:d,index:h}],l=g):g===l&&i.push({element:u,datasetIndex:d,index:h})}return Hn(e,a,t,f),i}function Wi(e,t,a,r,n,c){return!c&&!e.isPointInArea(t)?[]:a==="r"&&!r?rq(e,t,a,n):nq(e,t,a,r,n,c)}function xd(e,t,a,r,n){const c=[],i=a==="x"?"inXRange":"inYRange";let s=!1;return Hn(e,a,t,(l,f,u)=>{l[i]&&l[i](t[a],n)&&(c.push({element:l,datasetIndex:f,index:u}),s=s||l.inRange(t.x,t.y,n))}),r&&!s?[]:c}var cq={evaluateInteractionItems:Hn,modes:{index(e,t,a,r){const n=T0(t,e),c=a.axis||"x",i=a.includeInvisible||!1,s=a.intersect?Ui(e,n,c,r,i):Wi(e,n,c,!1,r,i),l=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(f=>{const u=s[0].index,d=f.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:f.index,index:u})}),l):[]},dataset(e,t,a,r){const n=T0(t,e),c=a.axis||"xy",i=a.includeInvisible||!1;let s=a.intersect?Ui(e,n,c,r,i):Wi(e,n,c,!1,r,i);if(s.length>0){const l=s[0].datasetIndex,f=e.getDatasetMeta(l).data;s=[];for(let u=0;u<f.length;++u)s.push({element:f[u],datasetIndex:l,index:u})}return s},point(e,t,a,r){const n=T0(t,e),c=a.axis||"xy",i=a.includeInvisible||!1;return Ui(e,n,c,r,i)},nearest(e,t,a,r){const n=T0(t,e),c=a.axis||"xy",i=a.includeInvisible||!1;return Wi(e,n,c,a.intersect,r,i)},x(e,t,a,r){const n=T0(t,e);return xd(e,n,"x",a.intersect,r)},y(e,t,a,r){const n=T0(t,e);return xd(e,n,"y",a.intersect,r)}}};const Ey=["left","top","right","bottom"];function Ta(e,t){return e.filter(a=>a.pos===t)}function bd(e,t){return e.filter(a=>Ey.indexOf(a.pos)===-1&&a.box.axis===t)}function Ea(e,t){return e.sort((a,r)=>{const n=t?r:a,c=t?a:r;return n.weight===c.weight?n.index-c.index:n.weight-c.weight})}function iq(e){const t=[];let a,r,n,c,i,s;for(a=0,r=(e||[]).length;a<r;++a)n=e[a],{position:c,options:{stack:i,stackWeight:s=1}}=n,t.push({index:a,box:n,pos:c,horizontal:n.isHorizontal(),weight:n.weight,stack:i&&c+i,stackWeight:s});return t}function sq(e){const t={};for(const a of e){const{stack:r,pos:n,stackWeight:c}=a;if(!r||!Ey.includes(n))continue;const i=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});i.count++,i.weight+=c}return t}function oq(e,t){const a=sq(e),{vBoxMaxWidth:r,hBoxMaxHeight:n}=t;let c,i,s;for(c=0,i=e.length;c<i;++c){s=e[c];const{fullSize:l}=s.box,f=a[s.stack],u=f&&s.stackWeight/f.weight;s.horizontal?(s.width=u?u*r:l&&t.availableWidth,s.height=n):(s.width=r,s.height=u?u*n:l&&t.availableHeight)}return a}function lq(e){const t=iq(e),a=Ea(t.filter(f=>f.box.fullSize),!0),r=Ea(Ta(t,"left"),!0),n=Ea(Ta(t,"right")),c=Ea(Ta(t,"top"),!0),i=Ea(Ta(t,"bottom")),s=bd(t,"x"),l=bd(t,"y");return{fullSize:a,leftAndTop:r.concat(c),rightAndBottom:n.concat(l).concat(i).concat(s),chartArea:Ta(t,"chartArea"),vertical:r.concat(n).concat(l),horizontal:c.concat(i).concat(s)}}function Cd(e,t,a,r){return Math.max(e[a],t[a])+Math.max(e[r],t[r])}function Ny(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function fq(e,t,a,r){const{pos:n,box:c}=a,i=e.maxPadding;if(!u2(n)){a.size&&(e[n]-=a.size);const d=r[a.stack]||{size:0,count:1};d.size=Math.max(d.size,a.horizontal?c.height:c.width),a.size=d.size/d.count,e[n]+=a.size}c.getPadding&&Ny(i,c.getPadding());const s=Math.max(0,t.outerWidth-Cd(i,e,"left","right")),l=Math.max(0,t.outerHeight-Cd(i,e,"top","bottom")),f=s!==e.w,u=l!==e.h;return e.w=s,e.h=l,a.horizontal?{same:f,other:u}:{same:u,other:f}}function uq(e){const t=e.maxPadding;function a(r){const n=Math.max(t[r]-e[r],0);return e[r]+=n,n}e.y+=a("top"),e.x+=a("left"),a("right"),a("bottom")}function dq(e,t){const a=t.maxPadding;function r(n){const c={left:0,top:0,right:0,bottom:0};return n.forEach(i=>{c[i]=Math.max(t[i],a[i])}),c}return r(e?["left","right"]:["top","bottom"])}function Ya(e,t,a,r){const n=[];let c,i,s,l,f,u;for(c=0,i=e.length,f=0;c<i;++c){s=e[c],l=s.box,l.update(s.width||t.w,s.height||t.h,dq(s.horizontal,t));const{same:d,other:h}=fq(t,a,s,r);f|=d&&n.length,u=u||h,l.fullSize||n.push(s)}return f&&Ya(n,t,a,r)||u}function m8(e,t,a,r,n){e.top=a,e.left=t,e.right=t+r,e.bottom=a+n,e.width=r,e.height=n}function Md(e,t,a,r){const n=a.padding;let{x:c,y:i}=t;for(const s of e){const l=s.box,f=r[s.stack]||{count:1,placed:0,weight:1},u=s.stackWeight/f.weight||1;if(s.horizontal){const d=t.w*u,h=f.size||l.height;Wr(f.start)&&(i=f.start),l.fullSize?m8(l,n.left,i,a.outerWidth-n.right-n.left,h):m8(l,t.left+f.placed,i,d,h),f.start=i,f.placed+=d,i=l.bottom}else{const d=t.h*u,h=f.size||l.width;Wr(f.start)&&(c=f.start),l.fullSize?m8(l,c,n.top,h,a.outerHeight-n.bottom-n.top):m8(l,c,t.top+f.placed,h,d),f.start=c,f.placed+=d,c=l.right}}t.x=c,t.y=i}var Ze={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(a){t.draw(a)}}]},e.boxes.push(t)},removeBox(e,t){const a=e.boxes?e.boxes.indexOf(t):-1;a!==-1&&e.boxes.splice(a,1)},configure(e,t,a){t.fullSize=a.fullSize,t.position=a.position,t.weight=a.weight},update(e,t,a,r){if(!e)return;const n=t3(e.options.layout.padding),c=Math.max(t-n.width,0),i=Math.max(a-n.height,0),s=lq(e.boxes),l=s.vertical,f=s.horizontal;V2(e.boxes,p=>{typeof p.beforeLayout=="function"&&p.beforeLayout()});const u=l.reduce((p,g)=>g.box.options&&g.box.options.display===!1?p:p+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:a,padding:n,availableWidth:c,availableHeight:i,vBoxMaxWidth:c/2/u,hBoxMaxHeight:i/2}),h=Object.assign({},n);Ny(h,t3(r));const m=Object.assign({maxPadding:h,w:c,h:i,x:n.left,y:n.top},n),v=oq(l.concat(f),d);Ya(s.fullSize,m,d,v),Ya(l,m,d,v),Ya(f,m,d,v)&&Ya(l,m,d,v),uq(m),Md(s.leftAndTop,m,d,v),m.x+=m.w,m.y+=m.h,Md(s.rightAndBottom,m,d,v),e.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},V2(s.chartArea,p=>{const g=p.box;Object.assign(g,e.chartArea),g.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class Dy{acquireContext(t,a){}releaseContext(t){return!1}addEventListener(t,a,r){}removeEventListener(t,a,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,a,r,n){return a=Math.max(0,a||t.width),r=r||t.height,{width:a,height:Math.max(0,n?Math.floor(a/n):r)}}isAttached(t){return!0}updateConfig(t){}}class hq extends Dy{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const X8="$chartjs",mq={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},zd=e=>e===null||e==="";function pq(e,t){const a=e.style,r=e.getAttribute("height"),n=e.getAttribute("width");if(e[X8]={initial:{height:r,width:n,style:{display:a.display,height:a.height,width:a.width}}},a.display=a.display||"block",a.boxSizing=a.boxSizing||"border-box",zd(n)){const c=id(e,"width");c!==void 0&&(e.width=c)}if(zd(r))if(e.style.height==="")e.height=e.width/(t||2);else{const c=id(e,"height");c!==void 0&&(e.height=c)}return e}const Oy=gW?{passive:!0}:!1;function vq(e,t,a){e&&e.addEventListener(t,a,Oy)}function gq(e,t,a){e&&e.canvas&&e.canvas.removeEventListener(t,a,Oy)}function yq(e,t){const a=mq[e.type]||e.type,{x:r,y:n}=T0(e,t);return{type:a,chart:t,native:e,x:r!==void 0?r:null,y:n!==void 0?n:null}}function Sc(e,t){for(const a of e)if(a===t||a.contains(t))return!0}function xq(e,t,a){const r=e.canvas,n=new MutationObserver(c=>{let i=!1;for(const s of c)i=i||Sc(s.addedNodes,r),i=i&&!Sc(s.removedNodes,r);i&&a()});return n.observe(document,{childList:!0,subtree:!0}),n}function bq(e,t,a){const r=e.canvas,n=new MutationObserver(c=>{let i=!1;for(const s of c)i=i||Sc(s.removedNodes,r),i=i&&!Sc(s.addedNodes,r);i&&a()});return n.observe(document,{childList:!0,subtree:!0}),n}const Yr=new Map;let wd=0;function Py(){const e=window.devicePixelRatio;e!==wd&&(wd=e,Yr.forEach((t,a)=>{a.currentDevicePixelRatio!==e&&t()}))}function Cq(e,t){Yr.size||window.addEventListener("resize",Py),Yr.set(e,t)}function Mq(e){Yr.delete(e),Yr.size||window.removeEventListener("resize",Py)}function zq(e,t,a){const r=e.canvas,n=r&&dl(r);if(!n)return;const c=hy((s,l)=>{const f=n.clientWidth;a(s,l),f<n.clientWidth&&a()},window),i=new ResizeObserver(s=>{const l=s[0],f=l.contentRect.width,u=l.contentRect.height;f===0&&u===0||c(f,u)});return i.observe(n),Cq(e,c),i}function qi(e,t,a){a&&a.disconnect(),t==="resize"&&Mq(e)}function wq(e,t,a){const r=e.canvas,n=hy(c=>{e.ctx!==null&&a(yq(c,e))},e);return vq(r,t,n),n}class _q extends Dy{acquireContext(t,a){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(pq(t,a),r):null}releaseContext(t){const a=t.canvas;if(!a[X8])return!1;const r=a[X8].initial;["height","width"].forEach(c=>{const i=r[c];x2(i)?a.removeAttribute(c):a.setAttribute(c,i)});const n=r.style||{};return Object.keys(n).forEach(c=>{a.style[c]=n[c]}),a.width=a.width,delete a[X8],!0}addEventListener(t,a,r){this.removeEventListener(t,a);const n=t.$proxies||(t.$proxies={}),i={attach:xq,detach:bq,resize:zq}[a]||wq;n[a]=i(t,a,r)}removeEventListener(t,a){const r=t.$proxies||(t.$proxies={}),n=r[a];if(!n)return;({attach:qi,detach:qi,resize:qi}[a]||gq)(t,a,n),r[a]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,a,r,n){return vW(t,a,r,n)}isAttached(t){const a=t&&dl(t);return!!(a&&a.isConnected)}}function kq(e){return!ul()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?hq:_q}class g4{constructor(){g1(this,"x");g1(this,"y");g1(this,"active",!1);g1(this,"options");g1(this,"$animations")}tooltipPosition(t){const{x:a,y:r}=this.getProps(["x","y"],t);return{x:a,y:r}}hasValue(){return K6(this.x)&&K6(this.y)}getProps(t,a){const r=this.$animations;if(!a||!r)return this;const n={};return t.forEach(c=>{n[c]=r[c]&&r[c].active()?r[c]._to:this[c]}),n}}g1(g4,"defaults",{}),g1(g4,"defaultRoutes");function Hq(e,t){const a=e.options.ticks,r=Vq(e),n=Math.min(a.maxTicksLimit||r,r),c=a.major.enabled?Sq(t):[],i=c.length,s=c[0],l=c[i-1],f=[];if(i>n)return Aq(t,f,c,i/n),f;const u=Lq(c,t,n);if(i>0){let d,h;const m=i>1?Math.round((l-s)/(i-1)):null;for(p8(t,f,u,x2(m)?0:s-m,s),d=0,h=i-1;d<h;d++)p8(t,f,u,c[d],c[d+1]);return p8(t,f,u,l,x2(m)?t.length:l+m),f}return p8(t,f,u),f}function Vq(e){const t=e.options.offset,a=e._tickSize(),r=e._length/a+(t?0:1),n=e._maxLength/a;return Math.floor(Math.min(r,n))}function Lq(e,t,a){const r=Tq(e),n=t.length/a;if(!r)return Math.max(n,1);const c=bU(r);for(let i=0,s=c.length-1;i<s;i++){const l=c[i];if(l>n)return l}return Math.max(n,1)}function Sq(e){const t=[];let a,r;for(a=0,r=e.length;a<r;a++)e[a].major&&t.push(a);return t}function Aq(e,t,a,r){let n=0,c=a[0],i;for(r=Math.ceil(r),i=0;i<e.length;i++)i===c&&(t.push(e[i]),n++,c=a[n*r])}function p8(e,t,a,r,n){const c=a2(r,0),i=Math.min(a2(n,e.length),e.length);let s=0,l,f,u;for(a=Math.ceil(a),n&&(l=n-r,a=l/Math.floor(l/a)),u=c;u<0;)s++,u=Math.round(c+s*a);for(f=Math.max(c,0);f<i;f++)f===u&&(t.push(e[f]),s++,u=Math.round(c+s*a))}function Tq(e){const t=e.length;let a,r;if(t<2)return!1;for(r=e[0],a=1;a<t;++a)if(e[a]-e[a-1]!==r)return!1;return r}const Eq=e=>e==="left"?"right":e==="right"?"left":e,_d=(e,t,a)=>t==="top"||t==="left"?e[t]+a:e[t]-a,kd=(e,t)=>Math.min(t||e,e);function Hd(e,t){const a=[],r=e.length/t,n=e.length;let c=0;for(;c<n;c+=r)a.push(e[Math.floor(c)]);return a}function Nq(e,t,a){const r=e.ticks.length,n=Math.min(t,r-1),c=e._startPixel,i=e._endPixel,s=1e-6;let l=e.getPixelForTick(n),f;if(!(a&&(r===1?f=Math.max(l-c,i-l):t===0?f=(e.getPixelForTick(1)-l)/2:f=(l-e.getPixelForTick(n-1))/2,l+=n<t?f:-f,l<c-s||l>i+s)))return l}function Dq(e,t){V2(e,a=>{const r=a.gc,n=r.length/2;let c;if(n>t){for(c=0;c<n;++c)delete a.data[r[c]];r.splice(0,n)}})}function Na(e){return e.drawTicks?e.tickLength:0}function Vd(e,t){if(!e.display)return 0;const a=Ve(e.font,t),r=t3(e.padding);return(R2(e.text)?e.text.length:1)*a.lineHeight+r.height}function Oq(e,t){return v0(e,{scale:t,type:"scale"})}function Pq(e,t,a){return v0(e,{tick:a,index:t,type:"tick"})}function Bq(e,t,a){let r=cl(e);return(a&&t!=="right"||!a&&t==="right")&&(r=Eq(r)),r}function Fq(e,t,a,r){const{top:n,left:c,bottom:i,right:s,chart:l}=e,{chartArea:f,scales:u}=l;let d=0,h,m,v;const p=i-n,g=s-c;if(e.isHorizontal()){if(m=je(r,c,s),u2(a)){const y=Object.keys(a)[0],x=a[y];v=u[y].getPixelForValue(x)+p-t}else a==="center"?v=(f.bottom+f.top)/2+p-t:v=_d(e,a,t);h=s-c}else{if(u2(a)){const y=Object.keys(a)[0],x=a[y];m=u[y].getPixelForValue(x)-g+t}else a==="center"?m=(f.left+f.right)/2-g+t:m=_d(e,a,t);v=je(r,i,n),d=a==="left"?-pe:pe}return{titleX:m,titleY:v,maxWidth:h,rotation:d}}class d6 extends g4{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,a){return t}getUserBounds(){let{_userMin:t,_userMax:a,_suggestedMin:r,_suggestedMax:n}=this;return t=x3(t,Number.POSITIVE_INFINITY),a=x3(a,Number.NEGATIVE_INFINITY),r=x3(r,Number.POSITIVE_INFINITY),n=x3(n,Number.NEGATIVE_INFINITY),{min:x3(t,r),max:x3(a,n),minDefined:se(t),maxDefined:se(a)}}getMinMax(t){let{min:a,max:r,minDefined:n,maxDefined:c}=this.getUserBounds(),i;if(n&&c)return{min:a,max:r};const s=this.getMatchingVisibleMetas();for(let l=0,f=s.length;l<f;++l)i=s[l].controller.getMinMax(this,t),n||(a=Math.min(a,i.min)),c||(r=Math.max(r,i.max));return a=c&&a>r?r:a,r=n&&a>r?a:r,{min:x3(a,x3(r,a)),max:x3(r,x3(a,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){E2(this.options.beforeUpdate,[this])}update(t,a,r){const{beginAtZero:n,grace:c,ticks:i}=this.options,s=i.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=a,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=GU(this,c,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s<this.ticks.length;this._convertTicksToLabels(l?Hd(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),i.display&&(i.autoSkip||i.source==="auto")&&(this.ticks=Hq(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,a,r;this.isHorizontal()?(a=this.left,r=this.right):(a=this.top,r=this.bottom,t=!t),this._startPixel=a,this._endPixel=r,this._reversePixels=t,this._length=r-a,this._alignToPixels=this.options.alignToPixels}afterUpdate(){E2(this.options.afterUpdate,[this])}beforeSetDimensions(){E2(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){E2(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),E2(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){E2(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const a=this.options.ticks;let r,n,c;for(r=0,n=t.length;r<n;r++)c=t[r],c.label=E2(a.callback,[c.value,r,t],this)}afterTickToLabelConversion(){E2(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){E2(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,a=t.ticks,r=kd(this.ticks.length,t.ticks.maxTicksLimit),n=a.minRotation||0,c=a.maxRotation;let i=n,s,l,f;if(!this._isVisible()||!a.display||n>=c||r<=1||!this.isHorizontal()){this.labelRotation=n;return}const u=this._getLabelSizes(),d=u.widest.width,h=u.highest.height,m=Ne(this.chart.width-d,0,this.maxWidth);s=t.offset?this.maxWidth/r:m/(r-1),d+6>s&&(s=m/(r-(t.offset?.5:1)),l=this.maxHeight-Na(t.grid)-a.padding-Vd(t.title,this.chart.options.font),f=Math.sqrt(d*d+h*h),i=rl(Math.min(Math.asin(Ne((u.highest.height+6)/s,-1,1)),Math.asin(Ne(l/f,-1,1))-Math.asin(Ne(h/f,-1,1)))),i=Math.max(n,Math.min(c,i))),this.labelRotation=i}afterCalculateLabelRotation(){E2(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){E2(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:a,options:{ticks:r,title:n,grid:c}}=this,i=this._isVisible(),s=this.isHorizontal();if(i){const l=Vd(n,a.options.font);if(s?(t.width=this.maxWidth,t.height=Na(c)+l):(t.height=this.maxHeight,t.width=Na(c)+l),r.display&&this.ticks.length){const{first:f,last:u,widest:d,highest:h}=this._getLabelSizes(),m=r.padding*2,v=n4(this.labelRotation),p=Math.cos(v),g=Math.sin(v);if(s){const y=r.mirror?0:g*d.width+p*h.height;t.height=Math.min(this.maxHeight,t.height+y+m)}else{const y=r.mirror?0:p*d.width+g*h.height;t.width=Math.min(this.maxWidth,t.width+y+m)}this._calculatePadding(f,u,g,p)}}this._handleMargins(),s?(this.width=this._length=a.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=a.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,a,r,n){const{ticks:{align:c,padding:i},position:s}=this.options,l=this.labelRotation!==0,f=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,m=0;l?f?(h=n*t.width,m=r*a.height):(h=r*t.height,m=n*a.width):c==="start"?m=a.width:c==="end"?h=t.width:c!=="inner"&&(h=t.width/2,m=a.width/2),this.paddingLeft=Math.max((h-u+i)*this.width/(this.width-u),0),this.paddingRight=Math.max((m-d+i)*this.width/(this.width-d),0)}else{let u=a.height/2,d=t.height/2;c==="start"?(u=0,d=t.height):c==="end"&&(u=a.height,d=0),this.paddingTop=u+i,this.paddingBottom=d+i}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){E2(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:a}=this.options;return a==="top"||a==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let a,r;for(a=0,r=t.length;a<r;a++)x2(t[a].label)&&(t.splice(a,1),r--,a--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const a=this.options.ticks.sampleSize;let r=this.ticks;a<r.length&&(r=Hd(r,a)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,a,r){const{ctx:n,_longestTextCache:c}=this,i=[],s=[],l=Math.floor(a/kd(a,r));let f=0,u=0,d,h,m,v,p,g,y,x,C,b,M;for(d=0;d<a;d+=l){if(v=t[d].label,p=this._resolveTickFontOptions(d),n.font=g=p.string,y=c[g]=c[g]||{data:{},gc:[]},x=p.lineHeight,C=b=0,!x2(v)&&!R2(v))C=Vc(n,y.data,y.gc,C,v),b=x;else if(R2(v))for(h=0,m=v.length;h<m;++h)M=v[h],!x2(M)&&!R2(M)&&(C=Vc(n,y.data,y.gc,C,M),b+=x);i.push(C),s.push(b),f=Math.max(C,f),u=Math.max(b,u)}Dq(c,a);const w=i.indexOf(f),z=s.indexOf(u),H=A=>({width:i[A]||0,height:s[A]||0});return{first:H(0),last:H(a-1),widest:H(w),highest:H(z),widths:i,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,a){return NaN}getValueForPixel(t){}getPixelForTick(t){const a=this.ticks;return t<0||t>a.length-1?null:this.getPixelForValue(a[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const a=this._startPixel+t*this._length;return zU(this._alignToPixels?H0(this.chart,a,0):a)}getDecimalForPixel(t){const a=(t-this._startPixel)/this._length;return this._reversePixels?1-a:a}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:a}=this;return t<0&&a<0?a:t>0&&a>0?t:0}getContext(t){const a=this.ticks||[];if(t>=0&&t<a.length){const r=a[t];return r.$context||(r.$context=Pq(this.getContext(),t,r))}return this.$context||(this.$context=Oq(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,a=n4(this.labelRotation),r=Math.abs(Math.cos(a)),n=Math.abs(Math.sin(a)),c=this._getLabelSizes(),i=t.autoSkipPadding||0,s=c?c.widest.width+i:0,l=c?c.highest.height+i:0;return this.isHorizontal()?l*r>s*n?s/r:l/n:l*n<s*r?l/r:s/n}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const a=this.axis,r=this.chart,n=this.options,{grid:c,position:i,border:s}=n,l=c.offset,f=this.isHorizontal(),d=this.ticks.length+(l?1:0),h=Na(c),m=[],v=s.setContext(this.getContext()),p=v.display?v.width:0,g=p/2,y=function(O){return H0(r,O,p)};let x,C,b,M,w,z,H,A,V,k,_,N;if(i==="top")x=y(this.bottom),z=this.bottom-h,A=x-g,k=y(t.top)+g,N=t.bottom;else if(i==="bottom")x=y(this.top),k=t.top,N=y(t.bottom)-g,z=x+g,A=this.top+h;else if(i==="left")x=y(this.right),w=this.right-h,H=x-g,V=y(t.left)+g,_=t.right;else if(i==="right")x=y(this.left),V=t.left,_=y(t.right)-g,w=x+g,H=this.left+h;else if(a==="x"){if(i==="center")x=y((t.top+t.bottom)/2+.5);else if(u2(i)){const O=Object.keys(i)[0],U=i[O];x=y(this.chart.scales[O].getPixelForValue(U))}k=t.top,N=t.bottom,z=x+g,A=z+h}else if(a==="y"){if(i==="center")x=y((t.left+t.right)/2);else if(u2(i)){const O=Object.keys(i)[0],U=i[O];x=y(this.chart.scales[O].getPixelForValue(U))}w=x-g,H=w-h,V=t.left,_=t.right}const q=a2(n.ticks.maxTicksLimit,d),S=Math.max(1,Math.ceil(d/q));for(C=0;C<d;C+=S){const O=this.getContext(C),U=c.setContext(O),J=s.setContext(O),Y=U.lineWidth,G=U.color,B=J.dash||[],T=J.dashOffset,L=U.tickWidth,W=U.tickColor,j=U.tickBorderDash||[],E=U.tickBorderDashOffset;b=Nq(this,C,l),b!==void 0&&(M=H0(r,b,Y),f?w=H=V=_=M:z=A=k=N=M,m.push({tx1:w,ty1:z,tx2:H,ty2:A,x1:V,y1:k,x2:_,y2:N,width:Y,color:G,borderDash:B,borderDashOffset:T,tickWidth:L,tickColor:W,tickBorderDash:j,tickBorderDashOffset:E}))}return this._ticksLength=d,this._borderValue=x,m}_computeLabelItems(t){const a=this.axis,r=this.options,{position:n,ticks:c}=r,i=this.isHorizontal(),s=this.ticks,{align:l,crossAlign:f,padding:u,mirror:d}=c,h=Na(r.grid),m=h+u,v=d?-u:m,p=-n4(this.labelRotation),g=[];let y,x,C,b,M,w,z,H,A,V,k,_,N="middle";if(n==="top")w=this.bottom-v,z=this._getXAxisLabelAlignment();else if(n==="bottom")w=this.top+v,z=this._getXAxisLabelAlignment();else if(n==="left"){const S=this._getYAxisLabelAlignment(h);z=S.textAlign,M=S.x}else if(n==="right"){const S=this._getYAxisLabelAlignment(h);z=S.textAlign,M=S.x}else if(a==="x"){if(n==="center")w=(t.top+t.bottom)/2+m;else if(u2(n)){const S=Object.keys(n)[0],O=n[S];w=this.chart.scales[S].getPixelForValue(O)+m}z=this._getXAxisLabelAlignment()}else if(a==="y"){if(n==="center")M=(t.left+t.right)/2-m;else if(u2(n)){const S=Object.keys(n)[0],O=n[S];M=this.chart.scales[S].getPixelForValue(O)}z=this._getYAxisLabelAlignment(h).textAlign}a==="y"&&(l==="start"?N="top":l==="end"&&(N="bottom"));const q=this._getLabelSizes();for(y=0,x=s.length;y<x;++y){C=s[y],b=C.label;const S=c.setContext(this.getContext(y));H=this.getPixelForTick(y)+c.labelOffset,A=this._resolveTickFontOptions(y),V=A.lineHeight,k=R2(b)?b.length:1;const O=k/2,U=S.color,J=S.textStrokeColor,Y=S.textStrokeWidth;let G=z;i?(M=H,z==="inner"&&(y===x-1?G=this.options.reverse?"left":"right":y===0?G=this.options.reverse?"right":"left":G="center"),n==="top"?f==="near"||p!==0?_=-k*V+V/2:f==="center"?_=-q.highest.height/2-O*V+V:_=-q.highest.height+V/2:f==="near"||p!==0?_=V/2:f==="center"?_=q.highest.height/2-O*V:_=q.highest.height-k*V,d&&(_*=-1),p!==0&&!S.showLabelBackdrop&&(M+=V/2*Math.sin(p))):(w=H,_=(1-k)*V/2);let B;if(S.showLabelBackdrop){const T=t3(S.backdropPadding),L=q.heights[y],W=q.widths[y];let j=_-T.top,E=0-T.left;switch(N){case"middle":j-=L/2;break;case"bottom":j-=L;break}switch(z){case"center":E-=W/2;break;case"right":E-=W;break;case"inner":y===x-1?E-=W:y>0&&(E-=W/2);break}B={left:E,top:j,width:W+T.width,height:L+T.height,color:S.backdropColor}}g.push({label:b,font:A,textOffset:_,options:{rotation:p,color:U,strokeColor:J,strokeWidth:Y,textAlign:G,textBaseline:N,translation:[M,w],backdrop:B}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:a}=this.options;if(-n4(this.labelRotation))return t==="top"?"left":"right";let n="center";return a.align==="start"?n="left":a.align==="end"?n="right":a.align==="inner"&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:a,ticks:{crossAlign:r,mirror:n,padding:c}}=this.options,i=this._getLabelSizes(),s=t+c,l=i.widest.width;let f,u;return a==="left"?n?(u=this.right+c,r==="near"?f="left":r==="center"?(f="center",u+=l/2):(f="right",u+=l)):(u=this.right-s,r==="near"?f="right":r==="center"?(f="center",u-=l/2):(f="left",u=this.left)):a==="right"?n?(u=this.left+c,r==="near"?f="right":r==="center"?(f="center",u-=l/2):(f="left",u-=l)):(u=this.left+s,r==="near"?f="left":r==="center"?(f="center",u+=l/2):(f="right",u=this.right)):f="right",{textAlign:f,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,a=this.options.position;if(a==="left"||a==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(a==="top"||a==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:a},left:r,top:n,width:c,height:i}=this;a&&(t.save(),t.fillStyle=a,t.fillRect(r,n,c,i),t.restore())}getLineWidthForValue(t){const a=this.options.grid;if(!this._isVisible()||!a.display)return 0;const n=this.ticks.findIndex(c=>c.value===t);return n>=0?a.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){const a=this.options.grid,r=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let c,i;const s=(l,f,u)=>{!u.width||!u.color||(r.save(),r.lineWidth=u.width,r.strokeStyle=u.color,r.setLineDash(u.borderDash||[]),r.lineDashOffset=u.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(f.x,f.y),r.stroke(),r.restore())};if(a.display)for(c=0,i=n.length;c<i;++c){const l=n[c];a.drawOnChartArea&&s({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),a.drawTicks&&s({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:a,options:{border:r,grid:n}}=this,c=r.setContext(this.getContext()),i=r.display?c.width:0;if(!i)return;const s=n.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let f,u,d,h;this.isHorizontal()?(f=H0(t,this.left,i)-i/2,u=H0(t,this.right,s)+s/2,d=h=l):(d=H0(t,this.top,i)-i/2,h=H0(t,this.bottom,s)+s/2,f=u=l),a.save(),a.lineWidth=c.width,a.strokeStyle=c.color,a.beginPath(),a.moveTo(f,d),a.lineTo(u,h),a.stroke(),a.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,n=this._computeLabelArea();n&&_5(r,n);const c=this.getLabelItems(t);for(const i of c){const s=i.options,l=i.font,f=i.label,u=i.textOffset;r6(r,f,0,u,l,s)}n&&k5(r)}drawTitle(){const{ctx:t,options:{position:a,title:r,reverse:n}}=this;if(!r.display)return;const c=Ve(r.font),i=t3(r.padding),s=r.align;let l=c.lineHeight/2;a==="bottom"||a==="center"||u2(a)?(l+=i.bottom,R2(r.text)&&(l+=c.lineHeight*(r.text.length-1))):l+=i.top;const{titleX:f,titleY:u,maxWidth:d,rotation:h}=Fq(this,l,a,s);r6(t,r.text,0,0,c,{color:r.color,maxWidth:d,rotation:h,textAlign:Bq(s,a,n),textBaseline:"middle",translation:[f,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,a=t.ticks&&t.ticks.z||0,r=a2(t.grid&&t.grid.z,-1),n=a2(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==d6.prototype.draw?[{z:a,draw:c=>{this.draw(c)}}]:[{z:r,draw:c=>{this.drawBackground(),this.drawGrid(c),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:a,draw:c=>{this.drawLabels(c)}}]}getMatchingVisibleMetas(t){const a=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",n=[];let c,i;for(c=0,i=a.length;c<i;++c){const s=a[c];s[r]===this.id&&(!t||s.type===t)&&n.push(s)}return n}_resolveTickFontOptions(t){const a=this.options.ticks.setContext(this.getContext(t));return Ve(a.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class v8{constructor(t,a,r){this.type=t,this.scope=a,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const a=Object.getPrototypeOf(t);let r;$q(a)&&(r=this.register(a));const n=this.items,c=t.id,i=this.scope+"."+c;if(!c)throw new Error("class does not have id: "+t);return c in n||(n[c]=t,Rq(t,i,r),this.override&&K2.override(t.id,t.overrides)),i}get(t){return this.items[t]}unregister(t){const a=this.items,r=t.id,n=this.scope;r in a&&delete a[r],n&&r in K2[n]&&(delete K2[n][r],this.override&&delete a6[r])}}function Rq(e,t,a){const r=Ur(Object.create(null),[a?K2.get(a):{},K2.get(t),e.defaults]);K2.set(t,r),e.defaultRoutes&&Iq(t,e.defaultRoutes),e.descriptors&&K2.describe(t,e.descriptors)}function Iq(e,t){Object.keys(t).forEach(a=>{const r=a.split("."),n=r.pop(),c=[e].concat(r).join("."),i=t[a].split("."),s=i.pop(),l=i.join(".");K2.route(c,n,l,s)})}function $q(e){return"id"in e&&"defaults"in e}class Uq{constructor(){this.controllers=new v8(l4,"datasets",!0),this.elements=new v8(g4,"elements"),this.plugins=new v8(Object,"plugins"),this.scales=new v8(d6,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,a,r){[...a].forEach(n=>{const c=r||this._getRegistryForType(n);r||c.isForType(n)||c===this.plugins&&n.id?this._exec(t,c,n):V2(n,i=>{const s=r||this._getRegistryForType(i);this._exec(t,s,i)})})}_exec(t,a,r){const n=al(t);E2(r["before"+n],[],r),a[t](r),E2(r["after"+n],[],r)}_getRegistryForType(t){for(let a=0;a<this._typedRegistries.length;a++){const r=this._typedRegistries[a];if(r.isForType(t))return r}return this.plugins}_get(t,a,r){const n=a.get(t);if(n===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return n}}var k4=new Uq;class Wq{constructor(){this._init=[]}notify(t,a,r,n){a==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const c=n?this._descriptors(t).filter(n):this._descriptors(t),i=this._notify(c,t,a,r);return a==="afterDestroy"&&(this._notify(c,t,"stop"),this._notify(this._init,t,"uninstall")),i}_notify(t,a,r,n){n=n||{};for(const c of t){const i=c.plugin,s=i[r],l=[a,n,c.options];if(E2(s,l,i)===!1&&n.cancelable)return!1}return!0}invalidate(){x2(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const a=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),a}_createDescriptors(t,a){const r=t&&t.config,n=a2(r.options&&r.options.plugins,{}),c=qq(r);return n===!1&&!a?[]:Yq(t,c,n,a)}_notifyStateChanges(t){const a=this._oldCache||[],r=this._cache,n=(c,i)=>c.filter(s=>!i.some(l=>s.plugin.id===l.plugin.id));this._notify(n(a,r),t,"stop"),this._notify(n(r,a),t,"start")}}function qq(e){const t={},a=[],r=Object.keys(k4.plugins.items);for(let c=0;c<r.length;c++)a.push(k4.getPlugin(r[c]));const n=e.plugins||[];for(let c=0;c<n.length;c++){const i=n[c];a.indexOf(i)===-1&&(a.push(i),t[i.id]=!0)}return{plugins:a,localIds:t}}function jq(e,t){return!t&&e===!1?null:e===!0?{}:e}function Yq(e,{plugins:t,localIds:a},r,n){const c=[],i=e.getContext();for(const s of t){const l=s.id,f=jq(r[l],n);f!==null&&c.push({plugin:s,options:Gq(e.config,{plugin:s,local:a[l]},f,i)})}return c}function Gq(e,{plugin:t,local:a},r,n){const c=e.pluginScopeKeys(t),i=e.getOptionScopes(r,c);return a&&t.defaults&&i.push(t.defaults),e.createResolver(i,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function u7(e,t){const a=K2.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||a.indexAxis||"x"}function Xq(e,t){let a=e;return e==="_index_"?a=t:e==="_value_"&&(a=t==="x"?"y":"x"),a}function Kq(e,t){return e===t?"_index_":"_value_"}function Ld(e){if(e==="x"||e==="y"||e==="r")return e}function Zq(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function d7(e,...t){if(Ld(e))return e;for(const a of t){const r=a.axis||Zq(a.position)||e.length>1&&Ld(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Sd(e,t,a){if(a[t+"AxisID"]===e)return{axis:t}}function Qq(e,t){if(t.data&&t.data.datasets){const a=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(a.length)return Sd(e,"x",a[0])||Sd(e,"y",a[0])}return{}}function Jq(e,t){const a=a6[e.type]||{scales:{}},r=t.scales||{},n=u7(e.type,t),c=Object.create(null);return Object.keys(r).forEach(i=>{const s=r[i];if(!u2(s))return console.error(`Invalid scale configuration for scale: ${i}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${i}`);const l=d7(i,s,Qq(i,e),K2.scales[s.type]),f=Kq(l,n),u=a.scales||{};c[i]=fr(Object.create(null),[{axis:l},s,u[l],u[f]])}),e.data.datasets.forEach(i=>{const s=i.type||e.type,l=i.indexAxis||u7(s,t),u=(a6[s]||{}).scales||{};Object.keys(u).forEach(d=>{const h=Xq(d,l),m=i[h+"AxisID"]||h;c[m]=c[m]||Object.create(null),fr(c[m],[{axis:h},r[m],u[d]])})}),Object.keys(c).forEach(i=>{const s=c[i];fr(s,[K2.scales[s.type],K2.scale])}),c}function By(e){const t=e.options||(e.options={});t.plugins=a2(t.plugins,{}),t.scales=Jq(e,t)}function Fy(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function ej(e){return e=e||{},e.data=Fy(e.data),By(e),e}const Ad=new Map,Ry=new Set;function g8(e,t){let a=Ad.get(e);return a||(a=t(),Ad.set(e,a),Ry.add(a)),a}const Da=(e,t,a)=>{const r=f0(t,a);r!==void 0&&e.add(r)};class tj{constructor(t){this._config=ej(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Fy(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),By(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return g8(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,a){return g8(`${t}.transition.${a}`,()=>[[`datasets.${t}.transitions.${a}`,`transitions.${a}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,a){return g8(`${t}-${a}`,()=>[[`datasets.${t}.elements.${a}`,`datasets.${t}`,`elements.${a}`,""]])}pluginScopeKeys(t){const a=t.id,r=this.type;return g8(`${r}-plugin-${a}`,()=>[[`plugins.${a}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,a){const r=this._scopeCache;let n=r.get(t);return(!n||a)&&(n=new Map,r.set(t,n)),n}getOptionScopes(t,a,r){const{options:n,type:c}=this,i=this._cachedScopes(t,r),s=i.get(a);if(s)return s;const l=new Set;a.forEach(u=>{t&&(l.add(t),u.forEach(d=>Da(l,t,d))),u.forEach(d=>Da(l,n,d)),u.forEach(d=>Da(l,a6[c]||{},d)),u.forEach(d=>Da(l,K2,d)),u.forEach(d=>Da(l,o7,d))});const f=Array.from(l);return f.length===0&&f.push(Object.create(null)),Ry.has(a)&&i.set(a,f),f}chartOptionScopes(){const{options:t,type:a}=this;return[t,a6[a]||{},K2.datasets[a]||{},{type:a},K2,o7]}resolveNamedOptions(t,a,r,n=[""]){const c={$shared:!0},{resolver:i,subPrefixes:s}=Td(this._resolverCache,t,n);let l=i;if(rj(i,a)){c.$shared=!1,r=u0(r)?r():r;const f=this.createResolver(t,r,s);l=Z6(i,r,f)}for(const f of a)c[f]=l[f];return c}createResolver(t,a,r=[""],n){const{resolver:c}=Td(this._resolverCache,t,r);return u2(a)?Z6(c,a,void 0,n):c}}function Td(e,t,a){let r=e.get(t);r||(r=new Map,e.set(t,r));const n=a.join();let c=r.get(n);return c||(c={resolver:ol(t,a),subPrefixes:a.filter(s=>!s.toLowerCase().includes("hover"))},r.set(n,c)),c}const aj=e=>u2(e)&&Object.getOwnPropertyNames(e).some(t=>u0(e[t]));function rj(e,t){const{isScriptable:a,isIndexable:r}=xy(e);for(const n of t){const c=a(n),i=r(n),s=(i||c)&&e[n];if(c&&(u0(s)||aj(s))||i&&R2(s))return!0}return!1}var nj="4.4.6";const cj=["top","bottom","left","right","chartArea"];function Ed(e,t){return e==="top"||e==="bottom"||cj.indexOf(e)===-1&&t==="x"}function Nd(e,t){return function(a,r){return a[e]===r[e]?a[t]-r[t]:a[e]-r[e]}}function Dd(e){const t=e.chart,a=t.options.animation;t.notifyPlugins("afterRender"),E2(a&&a.onComplete,[e],t)}function ij(e){const t=e.chart,a=t.options.animation;E2(a&&a.onProgress,[e],t)}function Iy(e){return ul()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const K8={},Od=e=>{const t=Iy(e);return Object.values(K8).filter(a=>a.canvas===t).pop()};function sj(e,t,a){const r=Object.keys(e);for(const n of r){const c=+n;if(c>=t){const i=e[n];delete e[n],(a>0||c>t)&&(e[c+a]=i)}}}function oj(e,t,a,r){return!a||e.type==="mouseout"?null:r?t:e}function y8(e,t,a){return e.options.clip?e[a]:t[a]}function lj(e,t){const{xScale:a,yScale:r}=e;return a&&r?{left:y8(a,t,"left"),right:y8(a,t,"right"),top:y8(r,t,"top"),bottom:y8(r,t,"bottom")}:t}class H4{static register(...t){k4.add(...t),Pd()}static unregister(...t){k4.remove(...t),Pd()}constructor(t,a){const r=this.config=new tj(a),n=Iy(t),c=Od(n);if(c)throw new Error("Canvas is already in use. Chart with ID '"+c.id+"' must be destroyed before the canvas with ID '"+c.canvas.id+"' can be reused.");const i=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||kq(n)),this.platform.updateConfig(r);const s=this.platform.acquireContext(n,i.aspectRatio),l=s&&s.canvas,f=l&&l.height,u=l&&l.width;if(this.id=uU(),this.ctx=s,this.canvas=l,this.width=u,this.height=f,this._options=i,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Wq,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=HU(d=>this.update(d),i.resizeDelay||0),this._dataChanges=[],K8[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}et.listen(this,"complete",Dd),et.listen(this,"progress",ij),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:a},width:r,height:n,_aspectRatio:c}=this;return x2(t)?a&&c?c:n?r/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return k4}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():cd(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ad(this.canvas,this.ctx),this}stop(){return et.stop(this),this}resize(t,a){et.running(this)?this._resizeBeforeDraw={width:t,height:a}:this._resize(t,a)}_resize(t,a){const r=this.options,n=this.canvas,c=r.maintainAspectRatio&&this.aspectRatio,i=this.platform.getMaximumSize(n,t,a,c),s=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=i.width,this.height=i.height,this._aspectRatio=this.aspectRatio,cd(this,s,!0)&&(this.notifyPlugins("resize",{size:i}),E2(r.onResize,[this,i],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const a=this.options.scales||{};V2(a,(r,n)=>{r.id=n})}buildOrUpdateScales(){const t=this.options,a=t.scales,r=this.scales,n=Object.keys(r).reduce((i,s)=>(i[s]=!1,i),{});let c=[];a&&(c=c.concat(Object.keys(a).map(i=>{const s=a[i],l=d7(i,s),f=l==="r",u=l==="x";return{options:s,dposition:f?"chartArea":u?"bottom":"left",dtype:f?"radialLinear":u?"category":"linear"}}))),V2(c,i=>{const s=i.options,l=s.id,f=d7(l,s),u=a2(s.type,i.dtype);(s.position===void 0||Ed(s.position,f)!==Ed(i.dposition))&&(s.position=i.dposition),n[l]=!0;let d=null;if(l in r&&r[l].type===u)d=r[l];else{const h=k4.getScale(u);d=new h({id:l,type:u,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(s,t)}),V2(n,(i,s)=>{i||delete r[s]}),V2(r,i=>{Ze.configure(this,i,i.options),Ze.addBox(this,i)})}_updateMetasets(){const t=this._metasets,a=this.data.datasets.length,r=t.length;if(t.sort((n,c)=>n.index-c.index),r>a){for(let n=a;n<r;++n)this._destroyDatasetMeta(n);t.splice(a,r-a)}this._sortedMetasets=t.slice(0).sort(Nd("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:a}}=this;t.length>a.length&&delete this._stacks,t.forEach((r,n)=>{a.filter(c=>c===r._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],a=this.data.datasets;let r,n;for(this._removeUnreferencedMetasets(),r=0,n=a.length;r<n;r++){const c=a[r];let i=this.getDatasetMeta(r);const s=c.type||this.config.type;if(i.type&&i.type!==s&&(this._destroyDatasetMeta(r),i=this.getDatasetMeta(r)),i.type=s,i.indexAxis=c.indexAxis||u7(s,this.options),i.order=c.order||0,i.index=r,i.label=""+c.label,i.visible=this.isDatasetVisible(r),i.controller)i.controller.updateIndex(r),i.controller.linkScales();else{const l=k4.getController(s),{datasetElementType:f,dataElementType:u}=K2.datasets[s];Object.assign(l,{dataElementType:k4.getElement(u),datasetElementType:f&&k4.getElement(f)}),i.controller=new l(this,r),t.push(i.controller)}}return this._updateMetasets(),t}_resetElements(){V2(this.data.datasets,(t,a)=>{this.getDatasetMeta(a).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const a=this.config;a.update();const r=this._options=a.createResolver(a.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const c=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let i=0;for(let f=0,u=this.data.datasets.length;f<u;f++){const{controller:d}=this.getDatasetMeta(f),h=!n&&c.indexOf(d)===-1;d.buildOrUpdateElements(h),i=Math.max(+d.getMaxOverflow(),i)}i=this._minPadding=r.layout.autoPadding?i:0,this._updateLayout(i),n||V2(c,f=>{f.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Nd("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){V2(this.scales,t=>{Ze.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,a=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!Yu(a,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,a=this._getUniformDataChanges()||[];for(const{method:r,start:n,count:c}of a){const i=r==="_removeElements"?-c:c;sj(t,n,i)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const a=this.data.datasets.length,r=c=>new Set(t.filter(i=>i[0]===c).map((i,s)=>s+","+i.splice(1).join(","))),n=r(0);for(let c=1;c<a;c++)if(!Yu(n,r(c)))return;return Array.from(n).map(c=>c.split(",")).map(c=>({method:c[1],start:+c[2],count:+c[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Ze.update(this,this.width,this.height,t);const a=this.chartArea,r=a.width<=0||a.height<=0;this._layers=[],V2(this.boxes,n=>{r&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,c)=>{n._idx=c}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let a=0,r=this.data.datasets.length;a<r;++a)this.getDatasetMeta(a).controller.configure();for(let a=0,r=this.data.datasets.length;a<r;++a)this._updateDataset(a,u0(t)?t({datasetIndex:a}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,a){const r=this.getDatasetMeta(t),n={meta:r,index:t,mode:a,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",n)!==!1&&(r.controller._update(a),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(et.has(this)?this.attached&&!et.running(this)&&et.start(this):(this.draw(),Dd({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:n}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,n)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const a=this._layers;for(t=0;t<a.length&&a[t].z<=0;++t)a[t].draw(this.chartArea);for(this._drawDatasets();t<a.length;++t)a[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const a=this._sortedMetasets,r=[];let n,c;for(n=0,c=a.length;n<c;++n){const i=a[n];(!t||i.visible)&&r.push(i)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let a=t.length-1;a>=0;--a)this._drawDataset(t[a]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const a=this.ctx,r=t._clip,n=!r.disabled,c=lj(t,this.chartArea),i={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",i)!==!1&&(n&&_5(a,{left:r.left===!1?0:c.left-r.left,right:r.right===!1?this.width:c.right+r.right,top:r.top===!1?0:c.top-r.top,bottom:r.bottom===!1?this.height:c.bottom+r.bottom}),t.controller.draw(),n&&k5(a),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(t){return ft(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,a,r,n){const c=cq.modes[a];return typeof c=="function"?c(this,t,r,n):[]}getDatasetMeta(t){const a=this.data.datasets[t],r=this._metasets;let n=r.filter(c=>c&&c._dataset===a).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:a&&a.order||0,index:t,_dataset:a,_parsed:[],_sorted:!1},r.push(n)),n}getContext(){return this.$context||(this.$context=v0(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const a=this.data.datasets[t];if(!a)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!a.hidden}setDatasetVisibility(t,a){const r=this.getDatasetMeta(t);r.hidden=!a}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,a,r){const n=r?"show":"hide",c=this.getDatasetMeta(t),i=c.controller._resolveAnimations(void 0,n);Wr(a)?(c.data[a].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),i.update(c,{visible:r}),this.update(s=>s.datasetIndex===t?n:void 0))}hide(t,a){this._updateVisibility(t,a,!1)}show(t,a){this._updateVisibility(t,a,!0)}_destroyDatasetMeta(t){const a=this._metasets[t];a&&a.controller&&a.controller._destroy(),delete this._metasets[t]}_stop(){let t,a;for(this.stop(),et.remove(this),t=0,a=this.data.datasets.length;t<a;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:a}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),ad(t,a),this.platform.releaseContext(a),this.canvas=null,this.ctx=null),delete K8[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,a=this.platform,r=(c,i)=>{a.addEventListener(this,c,i),t[c]=i},n=(c,i,s)=>{c.offsetX=i,c.offsetY=s,this._eventHandler(c)};V2(this.options.events,c=>r(c,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,a=this.platform,r=(l,f)=>{a.addEventListener(this,l,f),t[l]=f},n=(l,f)=>{t[l]&&(a.removeEventListener(this,l,f),delete t[l])},c=(l,f)=>{this.canvas&&this.resize(l,f)};let i;const s=()=>{n("attach",s),this.attached=!0,this.resize(),r("resize",c),r("detach",i)};i=()=>{this.attached=!1,n("resize",c),this._stop(),this._resize(0,0),r("attach",s)},a.isAttached(this.canvas)?s():i()}unbindEvents(){V2(this._listeners,(t,a)=>{this.platform.removeEventListener(this,a,t)}),this._listeners={},V2(this._responsiveListeners,(t,a)=>{this.platform.removeEventListener(this,a,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,a,r){const n=r?"set":"remove";let c,i,s,l;for(a==="dataset"&&(c=this.getDatasetMeta(t[0].datasetIndex),c.controller["_"+n+"DatasetHoverStyle"]()),s=0,l=t.length;s<l;++s){i=t[s];const f=i&&this.getDatasetMeta(i.datasetIndex).controller;f&&f[n+"HoverStyle"](i.element,i.datasetIndex,i.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const a=this._active||[],r=t.map(({datasetIndex:c,index:i})=>{const s=this.getDatasetMeta(c);if(!s)throw new Error("No dataset found at index "+c);return{datasetIndex:c,element:s.data[i],index:i}});!_c(r,a)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,a))}notifyPlugins(t,a,r){return this._plugins.notify(this,t,a,r)}isPluginEnabled(t){return this._plugins._cache.filter(a=>a.plugin.id===t).length===1}_updateHoverStyles(t,a,r){const n=this.options.hover,c=(l,f)=>l.filter(u=>!f.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),i=c(a,t),s=r?t:c(t,a);i.length&&this.updateHoverStyle(i,n.mode,!1),s.length&&n.mode&&this.updateHoverStyle(s,n.mode,!0)}_eventHandler(t,a){const r={event:t,replay:a,cancelable:!0,inChartArea:this.isPointInArea(t)},n=i=>(i.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,n)===!1)return;const c=this._handleEvent(t,a,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,n),(c||r.changed)&&this.render(),this}_handleEvent(t,a,r){const{_active:n=[],options:c}=this,i=a,s=this._getActiveElements(t,n,r,i),l=gU(t),f=oj(t,this._lastEvent,r,l);r&&(this._lastEvent=null,E2(c.onHover,[t,s,this],this),l&&E2(c.onClick,[t,s,this],this));const u=!_c(s,n);return(u||a)&&(this._active=s,this._updateHoverStyles(s,n,a)),this._lastEvent=f,u}_getActiveElements(t,a,r,n){if(t.type==="mouseout")return[];if(!r)return a;const c=this.options.hover;return this.getElementsAtEventForMode(t,c.mode,c,n)}}g1(H4,"defaults",K2),g1(H4,"instances",K8),g1(H4,"overrides",a6),g1(H4,"registry",k4),g1(H4,"version",nj),g1(H4,"getChart",Od);function Pd(){return V2(H4.instances,e=>e._plugins.invalidate())}function fj(e,t,a){const{startAngle:r,pixelMargin:n,x:c,y:i,outerRadius:s,innerRadius:l}=t;let f=n/s;e.beginPath(),e.arc(c,i,s,r-f,a+f),l>n?(f=n/l,e.arc(c,i,l,a+f,r-f,!0)):e.arc(c,i,n,a+pe,r-pe),e.closePath(),e.clip()}function uj(e){return sl(e,["outerStart","outerEnd","innerStart","innerEnd"])}function dj(e,t,a,r){const n=uj(e.options.borderRadius),c=(a-t)/2,i=Math.min(c,r*t/2),s=l=>{const f=(a-Math.min(c,l))*r/2;return Ne(l,0,Math.min(c,f))};return{outerStart:s(n.outerStart),outerEnd:s(n.outerEnd),innerStart:Ne(n.innerStart,0,i),innerEnd:Ne(n.innerEnd,0,i)}}function k6(e,t,a,r){return{x:a+e*Math.cos(t),y:r+e*Math.sin(t)}}function Ac(e,t,a,r,n,c){const{x:i,y:s,startAngle:l,pixelMargin:f,innerRadius:u}=t,d=Math.max(t.outerRadius+r+a-f,0),h=u>0?u+r+a+f:0;let m=0;const v=n-l;if(r){const S=u>0?u-r:0,O=d>0?d-r:0,U=(S+O)/2,J=U!==0?v*U/(U+r):v;m=(v-J)/2}const p=Math.max(.001,v*d-a/U2)/d,g=(v-p)/2,y=l+g+m,x=n-g-m,{outerStart:C,outerEnd:b,innerStart:M,innerEnd:w}=dj(t,h,d,x-y),z=d-C,H=d-b,A=y+C/z,V=x-b/H,k=h+M,_=h+w,N=y+M/k,q=x-w/_;if(e.beginPath(),c){const S=(A+V)/2;if(e.arc(i,s,d,A,S),e.arc(i,s,d,S,V),b>0){const Y=k6(H,V,i,s);e.arc(Y.x,Y.y,b,V,x+pe)}const O=k6(_,x,i,s);if(e.lineTo(O.x,O.y),w>0){const Y=k6(_,q,i,s);e.arc(Y.x,Y.y,w,x+pe,q+Math.PI)}const U=(x-w/h+(y+M/h))/2;if(e.arc(i,s,h,x-w/h,U,!0),e.arc(i,s,h,U,y+M/h,!0),M>0){const Y=k6(k,N,i,s);e.arc(Y.x,Y.y,M,N+Math.PI,y-pe)}const J=k6(z,y,i,s);if(e.lineTo(J.x,J.y),C>0){const Y=k6(z,A,i,s);e.arc(Y.x,Y.y,C,y-pe,A)}}else{e.moveTo(i,s);const S=Math.cos(A)*d+i,O=Math.sin(A)*d+s;e.lineTo(S,O);const U=Math.cos(V)*d+i,J=Math.sin(V)*d+s;e.lineTo(U,J)}e.closePath()}function hj(e,t,a,r,n){const{fullCircles:c,startAngle:i,circumference:s}=t;let l=t.endAngle;if(c){Ac(e,t,a,r,l,n);for(let f=0;f<c;++f)e.fill();isNaN(s)||(l=i+(s%$2||$2))}return Ac(e,t,a,r,l,n),e.fill(),l}function mj(e,t,a,r,n){const{fullCircles:c,startAngle:i,circumference:s,options:l}=t,{borderWidth:f,borderJoinStyle:u,borderDash:d,borderDashOffset:h}=l,m=l.borderAlign==="inner";if(!f)return;e.setLineDash(d||[]),e.lineDashOffset=h,m?(e.lineWidth=f*2,e.lineJoin=u||"round"):(e.lineWidth=f,e.lineJoin=u||"bevel");let v=t.endAngle;if(c){Ac(e,t,a,r,v,n);for(let p=0;p<c;++p)e.stroke();isNaN(s)||(v=i+(s%$2||$2))}m&&fj(e,t,v),c||(Ac(e,t,a,r,v,n),e.stroke())}class Ga extends g4{constructor(a){super();g1(this,"circumference");g1(this,"endAngle");g1(this,"fullCircles");g1(this,"innerRadius");g1(this,"outerRadius");g1(this,"pixelMargin");g1(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,a&&Object.assign(this,a)}inRange(a,r,n){const c=this.getProps(["x","y"],n),{angle:i,distance:s}=ly(c,{x:a,y:r}),{startAngle:l,endAngle:f,innerRadius:u,outerRadius:d,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),m=(this.options.spacing+this.options.borderWidth)/2,v=a2(h,f-l),p=qr(i,l,f)&&l!==f,g=v>=$2||p,y=ot(s,u+m,d+m);return g&&y}getCenterPoint(a){const{x:r,y:n,startAngle:c,endAngle:i,innerRadius:s,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],a),{offset:f,spacing:u}=this.options,d=(c+i)/2,h=(s+l+u+f)/2;return{x:r+Math.cos(d)*h,y:n+Math.sin(d)*h}}tooltipPosition(a){return this.getCenterPoint(a)}draw(a){const{options:r,circumference:n}=this,c=(r.offset||0)/4,i=(r.spacing||0)/2,s=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=n>$2?Math.floor(n/$2):0,n===0||this.innerRadius<0||this.outerRadius<0)return;a.save();const l=(this.startAngle+this.endAngle)/2;a.translate(Math.cos(l)*c,Math.sin(l)*c);const f=1-Math.sin(Math.min(U2,n||0)),u=c*f;a.fillStyle=r.backgroundColor,a.strokeStyle=r.borderColor,hj(a,this,u,i,s),mj(a,this,u,i,s),a.restore()}}g1(Ga,"id","arc"),g1(Ga,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),g1(Ga,"defaultRoutes",{backgroundColor:"backgroundColor"}),g1(Ga,"descriptors",{_scriptable:!0,_indexable:a=>a!=="borderDash"});function $y(e,t,a=t){e.lineCap=a2(a.borderCapStyle,t.borderCapStyle),e.setLineDash(a2(a.borderDash,t.borderDash)),e.lineDashOffset=a2(a.borderDashOffset,t.borderDashOffset),e.lineJoin=a2(a.borderJoinStyle,t.borderJoinStyle),e.lineWidth=a2(a.borderWidth,t.borderWidth),e.strokeStyle=a2(a.borderColor,t.borderColor)}function pj(e,t,a){e.lineTo(a.x,a.y)}function vj(e){return e.stepped?FU:e.tension||e.cubicInterpolationMode==="monotone"?RU:pj}function Uy(e,t,a={}){const r=e.length,{start:n=0,end:c=r-1}=a,{start:i,end:s}=t,l=Math.max(n,i),f=Math.min(c,s),u=n<i&&c<i||n>s&&c>s;return{count:r,start:l,loop:t.loop,ilen:f<l&&!u?r+f-l:f-l}}function gj(e,t,a,r){const{points:n,options:c}=t,{count:i,start:s,loop:l,ilen:f}=Uy(n,a,r),u=vj(c);let{move:d=!0,reverse:h}=r||{},m,v,p;for(m=0;m<=f;++m)v=n[(s+(h?f-m:m))%i],!v.skip&&(d?(e.moveTo(v.x,v.y),d=!1):u(e,p,v,h,c.stepped),p=v);return l&&(v=n[(s+(h?f:0))%i],u(e,p,v,h,c.stepped)),!!l}function yj(e,t,a,r){const n=t.points,{count:c,start:i,ilen:s}=Uy(n,a,r),{move:l=!0,reverse:f}=r||{};let u=0,d=0,h,m,v,p,g,y;const x=b=>(i+(f?s-b:b))%c,C=()=>{p!==g&&(e.lineTo(u,g),e.lineTo(u,p),e.lineTo(u,y))};for(l&&(m=n[x(0)],e.moveTo(m.x,m.y)),h=0;h<=s;++h){if(m=n[x(h)],m.skip)continue;const b=m.x,M=m.y,w=b|0;w===v?(M<p?p=M:M>g&&(g=M),u=(d*u+b)/++d):(C(),e.lineTo(b,M),v=w,d=0,p=g=M),y=M}C()}function h7(e){const t=e.options,a=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!a?yj:gj}function xj(e){return e.stepped?yW:e.tension||e.cubicInterpolationMode==="monotone"?xW:E0}function bj(e,t,a,r){let n=t._path;n||(n=t._path=new Path2D,t.path(n,a,r)&&n.closePath()),$y(e,t.options),e.stroke(n)}function Cj(e,t,a,r){const{segments:n,options:c}=t,i=h7(t);for(const s of n)$y(e,c,s.style),e.beginPath(),i(e,t,s,{start:a,end:a+r-1})&&e.closePath(),e.stroke()}const Mj=typeof Path2D=="function";function zj(e,t,a,r){Mj&&!t.options.segment?bj(e,t,a,r):Cj(e,t,a,r)}class Yt extends g4{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,a){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const n=r.spanGaps?this._loop:this._fullLoop;fW(this._points,r,t,n,a),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=_W(this,this.options.segment))}first(){const t=this.segments,a=this.points;return t.length&&a[t[0].start]}last(){const t=this.segments,a=this.points,r=t.length;return r&&a[t[r-1].end]}interpolate(t,a){const r=this.options,n=t[a],c=this.points,i=Ly(this,{property:a,start:n,end:n});if(!i.length)return;const s=[],l=xj(r);let f,u;for(f=0,u=i.length;f<u;++f){const{start:d,end:h}=i[f],m=c[d],v=c[h];if(m===v){s.push(m);continue}const p=Math.abs((n-m[a])/(v[a]-m[a])),g=l(m,v,p,r.stepped);g[a]=t[a],s.push(g)}return s.length===1?s[0]:s}pathSegment(t,a,r){return h7(this)(t,this,a,r)}path(t,a,r){const n=this.segments,c=h7(this);let i=this._loop;a=a||0,r=r||this.points.length-a;for(const s of n)i&=c(t,this,s,{start:a,end:a+r-1});return!!i}draw(t,a,r,n){const c=this.options||{};(this.points||[]).length&&c.borderWidth&&(t.save(),zj(t,this,r,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}g1(Yt,"id","line"),g1(Yt,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),g1(Yt,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),g1(Yt,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function Bd(e,t,a,r){const n=e.options,{[a]:c}=e.getProps([a],r);return Math.abs(t-c)<n.radius+n.hitRadius}class Z8 extends g4{constructor(a){super();g1(this,"parsed");g1(this,"skip");g1(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,a&&Object.assign(this,a)}inRange(a,r,n){const c=this.options,{x:i,y:s}=this.getProps(["x","y"],n);return Math.pow(a-i,2)+Math.pow(r-s,2)<Math.pow(c.hitRadius+c.radius,2)}inXRange(a,r){return Bd(this,a,"x",r)}inYRange(a,r){return Bd(this,a,"y",r)}getCenterPoint(a){const{x:r,y:n}=this.getProps(["x","y"],a);return{x:r,y:n}}size(a){a=a||this.options||{};let r=a.radius||0;r=Math.max(r,r&&a.hoverRadius||0);const n=r&&a.borderWidth||0;return(r+n)*2}draw(a,r){const n=this.options;this.skip||n.radius<.1||!ft(this,r,this.size(n)/2)||(a.strokeStyle=n.borderColor,a.lineWidth=n.borderWidth,a.fillStyle=n.backgroundColor,l7(a,n,this.x,this.y))}getRange(){const a=this.options||{};return a.radius+a.hitRadius}}g1(Z8,"id","point"),g1(Z8,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),g1(Z8,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Wy(e,t){const{x:a,y:r,base:n,width:c,height:i}=e.getProps(["x","y","base","width","height"],t);let s,l,f,u,d;return e.horizontal?(d=i/2,s=Math.min(a,n),l=Math.max(a,n),f=r-d,u=r+d):(d=c/2,s=a-d,l=a+d,f=Math.min(r,n),u=Math.max(r,n)),{left:s,top:f,right:l,bottom:u}}function Gt(e,t,a,r){return e?0:Ne(t,a,r)}function wj(e,t,a){const r=e.options.borderWidth,n=e.borderSkipped,c=yy(r);return{t:Gt(n.top,c.top,0,a),r:Gt(n.right,c.right,0,t),b:Gt(n.bottom,c.bottom,0,a),l:Gt(n.left,c.left,0,t)}}function _j(e,t,a){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),n=e.options.borderRadius,c=j0(n),i=Math.min(t,a),s=e.borderSkipped,l=r||u2(n);return{topLeft:Gt(!l||s.top||s.left,c.topLeft,0,i),topRight:Gt(!l||s.top||s.right,c.topRight,0,i),bottomLeft:Gt(!l||s.bottom||s.left,c.bottomLeft,0,i),bottomRight:Gt(!l||s.bottom||s.right,c.bottomRight,0,i)}}function kj(e){const t=Wy(e),a=t.right-t.left,r=t.bottom-t.top,n=wj(e,a/2,r/2),c=_j(e,a/2,r/2);return{outer:{x:t.left,y:t.top,w:a,h:r,radius:c},inner:{x:t.left+n.l,y:t.top+n.t,w:a-n.l-n.r,h:r-n.t-n.b,radius:{topLeft:Math.max(0,c.topLeft-Math.max(n.t,n.l)),topRight:Math.max(0,c.topRight-Math.max(n.t,n.r)),bottomLeft:Math.max(0,c.bottomLeft-Math.max(n.b,n.l)),bottomRight:Math.max(0,c.bottomRight-Math.max(n.b,n.r))}}}}function ji(e,t,a,r){const n=t===null,c=a===null,s=e&&!(n&&c)&&Wy(e,r);return s&&(n||ot(t,s.left,s.right))&&(c||ot(a,s.top,s.bottom))}function Hj(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function Vj(e,t){e.rect(t.x,t.y,t.w,t.h)}function Yi(e,t,a={}){const r=e.x!==a.x?-t:0,n=e.y!==a.y?-t:0,c=(e.x+e.w!==a.x+a.w?t:0)-r,i=(e.y+e.h!==a.y+a.h?t:0)-n;return{x:e.x+r,y:e.y+n,w:e.w+c,h:e.h+i,radius:e.radius}}class Q8 extends g4{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:a,options:{borderColor:r,backgroundColor:n}}=this,{inner:c,outer:i}=kj(this),s=Hj(i.radius)?jr:Vj;t.save(),(i.w!==c.w||i.h!==c.h)&&(t.beginPath(),s(t,Yi(i,a,c)),t.clip(),s(t,Yi(c,-a,i)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),s(t,Yi(c,a)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,a,r){return ji(this,t,a,r)}inXRange(t,a){return ji(this,t,null,a)}inYRange(t,a){return ji(this,null,t,a)}getCenterPoint(t){const{x:a,y:r,base:n,horizontal:c}=this.getProps(["x","y","base","horizontal"],t);return{x:c?(a+n)/2:a,y:c?r:(r+n)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}g1(Q8,"id","bar"),g1(Q8,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),g1(Q8,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var Lj=Object.freeze({__proto__:null,ArcElement:Ga,BarElement:Q8,LineElement:Yt,PointElement:Z8});const m7=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Fd=m7.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));function qy(e){return m7[e%m7.length]}function jy(e){return Fd[e%Fd.length]}function Sj(e,t){return e.borderColor=qy(t),e.backgroundColor=jy(t),++t}function Aj(e,t){return e.backgroundColor=e.data.map(()=>qy(t++)),t}function Tj(e,t){return e.backgroundColor=e.data.map(()=>jy(t++)),t}function Ej(e){let t=0;return(a,r)=>{const n=e.getDatasetMeta(r).controller;n instanceof I0?t=Aj(a,t):n instanceof mr?t=Tj(a,t):n&&(t=Sj(a,t))}}function Rd(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function Nj(e){return e&&(e.borderColor||e.backgroundColor)}function Dj(){return K2.borderColor!=="rgba(0,0,0,0.1)"||K2.backgroundColor!=="rgba(0,0,0,0.1)"}var Oj={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,a){if(!a.enabled)return;const{data:{datasets:r},options:n}=e.config,{elements:c}=n,i=Rd(r)||Nj(n)||c&&Rd(c)||Dj();if(!a.forceOverride&&i)return;const s=Ej(e);r.forEach(s)}};function Pj(e,t,a,r,n){const c=n.samples||r;if(c>=a)return e.slice(t,t+a);const i=[],s=(a-2)/(c-2);let l=0;const f=t+a-1;let u=t,d,h,m,v,p;for(i[l++]=e[u],d=0;d<c-2;d++){let g=0,y=0,x;const C=Math.floor((d+1)*s)+1+t,b=Math.min(Math.floor((d+2)*s)+1,a)+t,M=b-C;for(x=C;x<b;x++)g+=e[x].x,y+=e[x].y;g/=M,y/=M;const w=Math.floor(d*s)+1+t,z=Math.min(Math.floor((d+1)*s)+1,a)+t,{x:H,y:A}=e[u];for(m=v=-1,x=w;x<z;x++)v=.5*Math.abs((H-g)*(e[x].y-A)-(H-e[x].x)*(y-A)),v>m&&(m=v,h=e[x],p=x);i[l++]=h,u=p}return i[l++]=e[f],i}function Bj(e,t,a,r){let n=0,c=0,i,s,l,f,u,d,h,m,v,p;const g=[],y=t+a-1,x=e[t].x,b=e[y].x-x;for(i=t;i<t+a;++i){s=e[i],l=(s.x-x)/b*r,f=s.y;const M=l|0;if(M===u)f<v?(v=f,d=i):f>p&&(p=f,h=i),n=(c*n+s.x)/++c;else{const w=i-1;if(!x2(d)&&!x2(h)){const z=Math.min(d,h),H=Math.max(d,h);z!==m&&z!==w&&g.push({...e[z],x:n}),H!==m&&H!==w&&g.push({...e[H],x:n})}i>0&&w!==m&&g.push(e[w]),g.push(s),u=M,c=0,v=p=f,d=h=m=i}}return g}function Yy(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Id(e){e.data.datasets.forEach(t=>{Yy(t)})}function Fj(e,t){const a=t.length;let r=0,n;const{iScale:c}=e,{min:i,max:s,minDefined:l,maxDefined:f}=c.getUserBounds();return l&&(r=Ne(lt(t,c.axis,i).lo,0,a-1)),f?n=Ne(lt(t,c.axis,s).hi+1,r,a)-r:n=a-r,{start:r,count:n}}var Rj={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,a)=>{if(!a.enabled){Id(e);return}const r=e.width;e.data.datasets.forEach((n,c)=>{const{_data:i,indexAxis:s}=n,l=e.getDatasetMeta(c),f=i||n.data;if(ja([s,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const u=e.scales[l.xAxisID];if(u.type!=="linear"&&u.type!=="time"||e.options.parsing)return;let{start:d,count:h}=Fj(l,f);const m=a.threshold||4*r;if(h<=m){Yy(n);return}x2(i)&&(n._data=f,delete n.data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(p){this._data=p}}));let v;switch(a.algorithm){case"lttb":v=Pj(f,d,h,r,a);break;case"min-max":v=Bj(f,d,h,r);break;default:throw new Error(`Unsupported decimation algorithm '${a.algorithm}'`)}n._decimated=v})},destroy(e){Id(e)}};function Ij(e,t,a){const r=e.segments,n=e.points,c=t.points,i=[];for(const s of r){let{start:l,end:f}=s;f=ml(l,f,n);const u=p7(a,n[l],n[f],s.loop);if(!t.segments){i.push({source:s,target:u,start:n[l],end:n[f]});continue}const d=Ly(t,u);for(const h of d){const m=p7(a,c[h.start],c[h.end],h.loop),v=Vy(s,n,m);for(const p of v)i.push({source:p,target:h,start:{[a]:$d(u,m,"start",Math.max)},end:{[a]:$d(u,m,"end",Math.min)}})}}return i}function p7(e,t,a,r){if(r)return;let n=t[e],c=a[e];return e==="angle"&&(n=b3(n),c=b3(c)),{property:e,start:n,end:c}}function $j(e,t){const{x:a=null,y:r=null}=e||{},n=t.points,c=[];return t.segments.forEach(({start:i,end:s})=>{s=ml(i,s,n);const l=n[i],f=n[s];r!==null?(c.push({x:l.x,y:r}),c.push({x:f.x,y:r})):a!==null&&(c.push({x:a,y:l.y}),c.push({x:a,y:f.y}))}),c}function ml(e,t,a){for(;t>e;t--){const r=a[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function $d(e,t,a,r){return e&&t?r(e[a],t[a]):e?e[a]:t?t[a]:0}function Gy(e,t){let a=[],r=!1;return R2(e)?(r=!0,a=e):a=$j(e,t),a.length?new Yt({points:a,options:{tension:0},_loop:r,_fullLoop:r}):null}function Ud(e){return e&&e.fill!==!1}function Uj(e,t,a){let n=e[t].fill;const c=[t];let i;if(!a)return n;for(;n!==!1&&c.indexOf(n)===-1;){if(!se(n))return n;if(i=e[n],!i)return!1;if(i.visible)return n;c.push(n),n=i.fill}return!1}function Wj(e,t,a){const r=Gj(e);if(u2(r))return isNaN(r.value)?!1:r;let n=parseFloat(r);return se(n)&&Math.floor(n)===n?qj(r[0],t,n,a):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function qj(e,t,a,r){return(e==="-"||e==="+")&&(a=t+a),a===t||a<0||a>=r?!1:a}function jj(e,t){let a=null;return e==="start"?a=t.bottom:e==="end"?a=t.top:u2(e)?a=t.getPixelForValue(e.value):t.getBasePixel&&(a=t.getBasePixel()),a}function Yj(e,t,a){let r;return e==="start"?r=a:e==="end"?r=t.options.reverse?t.min:t.max:u2(e)?r=e.value:r=t.getBaseValue(),r}function Gj(e){const t=e.options,a=t.fill;let r=a2(a&&a.target,a);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function Xj(e){const{scale:t,index:a,line:r}=e,n=[],c=r.segments,i=r.points,s=Kj(t,a);s.push(Gy({x:null,y:t.bottom},r));for(let l=0;l<c.length;l++){const f=c[l];for(let u=f.start;u<=f.end;u++)Zj(n,i[u],s)}return new Yt({points:n,options:{}})}function Kj(e,t){const a=[],r=e.getMatchingVisibleMetas("line");for(let n=0;n<r.length;n++){const c=r[n];if(c.index===t)break;c.hidden||a.unshift(c.dataset)}return a}function Zj(e,t,a){const r=[];for(let n=0;n<a.length;n++){const c=a[n],{first:i,last:s,point:l}=Qj(c,t,"x");if(!(!l||i&&s)){if(i)r.unshift(l);else if(e.push(l),!s)break}}e.push(...r)}function Qj(e,t,a){const r=e.interpolate(t,a);if(!r)return{};const n=r[a],c=e.segments,i=e.points;let s=!1,l=!1;for(let f=0;f<c.length;f++){const u=c[f],d=i[u.start][a],h=i[u.end][a];if(ot(n,d,h)){s=n===d,l=n===h;break}}return{first:s,last:l,point:r}}class Xy{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,a,r){const{x:n,y:c,radius:i}=this;return a=a||{start:0,end:$2},t.arc(n,c,i,a.end,a.start,!0),!r.bounds}interpolate(t){const{x:a,y:r,radius:n}=this,c=t.angle;return{x:a+Math.cos(c)*n,y:r+Math.sin(c)*n,angle:c}}}function Jj(e){const{chart:t,fill:a,line:r}=e;if(se(a))return eY(t,a);if(a==="stack")return Xj(e);if(a==="shape")return!0;const n=tY(e);return n instanceof Xy?n:Gy(n,r)}function eY(e,t){const a=e.getDatasetMeta(t);return a&&e.isDatasetVisible(t)?a.dataset:null}function tY(e){return(e.scale||{}).getPointPositionForValue?rY(e):aY(e)}function aY(e){const{scale:t={},fill:a}=e,r=jj(a,t);if(se(r)){const n=t.isHorizontal();return{x:n?r:null,y:n?null:r}}return null}function rY(e){const{scale:t,fill:a}=e,r=t.options,n=t.getLabels().length,c=r.reverse?t.max:t.min,i=Yj(a,t,c),s=[];if(r.grid.circular){const l=t.getPointPositionForValue(0,c);return new Xy({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(i)})}for(let l=0;l<n;++l)s.push(t.getPointPositionForValue(l,i));return s}function Gi(e,t,a){const r=Jj(t),{line:n,scale:c,axis:i}=t,s=n.options,l=s.fill,f=s.backgroundColor,{above:u=f,below:d=f}=l||{};r&&n.points.length&&(_5(e,a),nY(e,{line:n,target:r,above:u,below:d,area:a,scale:c,axis:i}),k5(e))}function nY(e,t){const{line:a,target:r,above:n,below:c,area:i,scale:s}=t,l=a._loop?"angle":t.axis;e.save(),l==="x"&&c!==n&&(Wd(e,r,i.top),qd(e,{line:a,target:r,color:n,scale:s,property:l}),e.restore(),e.save(),Wd(e,r,i.bottom)),qd(e,{line:a,target:r,color:c,scale:s,property:l}),e.restore()}function Wd(e,t,a){const{segments:r,points:n}=t;let c=!0,i=!1;e.beginPath();for(const s of r){const{start:l,end:f}=s,u=n[l],d=n[ml(l,f,n)];c?(e.moveTo(u.x,u.y),c=!1):(e.lineTo(u.x,a),e.lineTo(u.x,u.y)),i=!!t.pathSegment(e,s,{move:i}),i?e.closePath():e.lineTo(d.x,a)}e.lineTo(t.first().x,a),e.closePath(),e.clip()}function qd(e,t){const{line:a,target:r,property:n,color:c,scale:i}=t,s=Ij(a,r,n);for(const{source:l,target:f,start:u,end:d}of s){const{style:{backgroundColor:h=c}={}}=l,m=r!==!0;e.save(),e.fillStyle=h,cY(e,i,m&&p7(n,u,d)),e.beginPath();const v=!!a.pathSegment(e,l);let p;if(m){v?e.closePath():jd(e,r,d,n);const g=!!r.pathSegment(e,f,{move:v,reverse:!0});p=v&&g,p||jd(e,r,u,n)}e.closePath(),e.fill(p?"evenodd":"nonzero"),e.restore()}}function cY(e,t,a){const{top:r,bottom:n}=t.chart.chartArea,{property:c,start:i,end:s}=a||{};c==="x"&&(e.beginPath(),e.rect(i,r,s-i,n-r),e.clip())}function jd(e,t,a,r){const n=t.interpolate(a,r);n&&e.lineTo(n.x,n.y)}var iY={id:"filler",afterDatasetsUpdate(e,t,a){const r=(e.data.datasets||[]).length,n=[];let c,i,s,l;for(i=0;i<r;++i)c=e.getDatasetMeta(i),s=c.dataset,l=null,s&&s.options&&s instanceof Yt&&(l={visible:e.isDatasetVisible(i),index:i,fill:Wj(s,i,r),chart:e,axis:c.controller.options.indexAxis,scale:c.vScale,line:s}),c.$filler=l,n.push(l);for(i=0;i<r;++i)l=n[i],!(!l||l.fill===!1)&&(l.fill=Uj(n,i,a.propagate))},beforeDraw(e,t,a){const r=a.drawTime==="beforeDraw",n=e.getSortedVisibleDatasetMetas(),c=e.chartArea;for(let i=n.length-1;i>=0;--i){const s=n[i].$filler;s&&(s.line.updateControlPoints(c,s.axis),r&&s.fill&&Gi(e.ctx,s,c))}},beforeDatasetsDraw(e,t,a){if(a.drawTime!=="beforeDatasetsDraw")return;const r=e.getSortedVisibleDatasetMetas();for(let n=r.length-1;n>=0;--n){const c=r[n].$filler;Ud(c)&&Gi(e.ctx,c,e.chartArea)}},beforeDatasetDraw(e,t,a){const r=t.meta.$filler;!Ud(r)||a.drawTime!=="beforeDatasetDraw"||Gi(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Yd=(e,t)=>{let{boxHeight:a=t,boxWidth:r=t}=e;return e.usePointStyle&&(a=Math.min(a,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:a,itemHeight:Math.max(t,a)}},sY=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class Gd extends g4{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,a,r){this.maxWidth=t,this.maxHeight=a,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let a=E2(t.generateLabels,[this.chart],this)||[];t.filter&&(a=a.filter(r=>t.filter(r,this.chart.data))),t.sort&&(a=a.sort((r,n)=>t.sort(r,n,this.chart.data))),this.options.reverse&&a.reverse(),this.legendItems=a}fit(){const{options:t,ctx:a}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,n=Ve(r.font),c=n.size,i=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=Yd(r,c);let f,u;a.font=n.string,this.isHorizontal()?(f=this.maxWidth,u=this._fitRows(i,c,s,l)+10):(u=this.maxHeight,f=this._fitCols(i,n,s,l)+10),this.width=Math.min(f,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,a,r,n){const{ctx:c,maxWidth:i,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],f=this.lineWidths=[0],u=n+s;let d=t;c.textAlign="left",c.textBaseline="middle";let h=-1,m=-u;return this.legendItems.forEach((v,p)=>{const g=r+a/2+c.measureText(v.text).width;(p===0||f[f.length-1]+g+2*s>i)&&(d+=u,f[f.length-(p>0?0:1)]=0,m+=u,h++),l[p]={left:0,top:m,row:h,width:g,height:n},f[f.length-1]+=g+s}),d}_fitCols(t,a,r,n){const{ctx:c,maxHeight:i,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],f=this.columnSizes=[],u=i-t;let d=s,h=0,m=0,v=0,p=0;return this.legendItems.forEach((g,y)=>{const{itemWidth:x,itemHeight:C}=oY(r,a,c,g,n);y>0&&m+C+2*s>u&&(d+=h+s,f.push({width:h,height:m}),v+=h+s,p++,h=m=0),l[y]={left:v,top:m,col:p,width:x,height:C},h=Math.max(h,x),m+=C+s}),d+=h,f.push({width:h,height:m}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:a,options:{align:r,labels:{padding:n},rtl:c}}=this,i=W6(c,this.left,this.width);if(this.isHorizontal()){let s=0,l=je(r,this.left+n,this.right-this.lineWidths[s]);for(const f of a)s!==f.row&&(s=f.row,l=je(r,this.left+n,this.right-this.lineWidths[s])),f.top+=this.top+t+n,f.left=i.leftForLtr(i.x(l),f.width),l+=f.width+n}else{let s=0,l=je(r,this.top+t+n,this.bottom-this.columnSizes[s].height);for(const f of a)f.col!==s&&(s=f.col,l=je(r,this.top+t+n,this.bottom-this.columnSizes[s].height)),f.top=l,f.left+=this.left+n,f.left=i.leftForLtr(i.x(f.left),f.width),l+=f.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;_5(t,this),this._draw(),k5(t)}}_draw(){const{options:t,columnSizes:a,lineWidths:r,ctx:n}=this,{align:c,labels:i}=t,s=K2.color,l=W6(t.rtl,this.left,this.width),f=Ve(i.font),{padding:u}=i,d=f.size,h=d/2;let m;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=f.string;const{boxWidth:v,boxHeight:p,itemHeight:g}=Yd(i,d),y=function(w,z,H){if(isNaN(v)||v<=0||isNaN(p)||p<0)return;n.save();const A=a2(H.lineWidth,1);if(n.fillStyle=a2(H.fillStyle,s),n.lineCap=a2(H.lineCap,"butt"),n.lineDashOffset=a2(H.lineDashOffset,0),n.lineJoin=a2(H.lineJoin,"miter"),n.lineWidth=A,n.strokeStyle=a2(H.strokeStyle,s),n.setLineDash(a2(H.lineDash,[])),i.usePointStyle){const V={radius:p*Math.SQRT2/2,pointStyle:H.pointStyle,rotation:H.rotation,borderWidth:A},k=l.xPlus(w,v/2),_=z+h;gy(n,V,k,_,i.pointStyleWidth&&v)}else{const V=z+Math.max((d-p)/2,0),k=l.leftForLtr(w,v),_=j0(H.borderRadius);n.beginPath(),Object.values(_).some(N=>N!==0)?jr(n,{x:k,y:V,w:v,h:p,radius:_}):n.rect(k,V,v,p),n.fill(),A!==0&&n.stroke()}n.restore()},x=function(w,z,H){r6(n,H.text,w,z+g/2,f,{strikethrough:H.hidden,textAlign:l.textAlign(H.textAlign)})},C=this.isHorizontal(),b=this._computeTitleHeight();C?m={x:je(c,this.left+u,this.right-r[0]),y:this.top+u+b,line:0}:m={x:this.left+u,y:je(c,this.top+b+u,this.bottom-a[0].height),line:0},_y(this.ctx,t.textDirection);const M=g+u;this.legendItems.forEach((w,z)=>{n.strokeStyle=w.fontColor,n.fillStyle=w.fontColor;const H=n.measureText(w.text).width,A=l.textAlign(w.textAlign||(w.textAlign=i.textAlign)),V=v+h+H;let k=m.x,_=m.y;l.setWidth(this.width),C?z>0&&k+V+u>this.right&&(_=m.y+=M,m.line++,k=m.x=je(c,this.left+u,this.right-r[m.line])):z>0&&_+M>this.bottom&&(k=m.x=k+a[m.line].width+u,m.line++,_=m.y=je(c,this.top+b+u,this.bottom-a[m.line].height));const N=l.x(k);if(y(N,_,w),k=VU(A,k+v+h,C?k+V:this.right,t.rtl),x(l.x(k),_,w),C)m.x+=V+u;else if(typeof w.text!="string"){const q=f.lineHeight;m.y+=Ky(w,q)+u}else m.y+=M}),ky(this.ctx,t.textDirection)}drawTitle(){const t=this.options,a=t.title,r=Ve(a.font),n=t3(a.padding);if(!a.display)return;const c=W6(t.rtl,this.left,this.width),i=this.ctx,s=a.position,l=r.size/2,f=n.top+l;let u,d=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),u=this.top+f,d=je(t.align,d,this.right-h);else{const v=this.columnSizes.reduce((p,g)=>Math.max(p,g.height),0);u=f+je(t.align,this.top,this.bottom-v-t.labels.padding-this._computeTitleHeight())}const m=je(s,d,d+h);i.textAlign=c.textAlign(cl(s)),i.textBaseline="middle",i.strokeStyle=a.color,i.fillStyle=a.color,i.font=r.string,r6(i,a.text,m,u,r)}_computeTitleHeight(){const t=this.options.title,a=Ve(t.font),r=t3(t.padding);return t.display?a.lineHeight+r.height:0}_getLegendItemAt(t,a){let r,n,c;if(ot(t,this.left,this.right)&&ot(a,this.top,this.bottom)){for(c=this.legendHitBoxes,r=0;r<c.length;++r)if(n=c[r],ot(t,n.left,n.left+n.width)&&ot(a,n.top,n.top+n.height))return this.legendItems[r]}return null}handleEvent(t){const a=this.options;if(!uY(t.type,a))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const n=this._hoveredItem,c=sY(n,r);n&&!c&&E2(a.onLeave,[t,n,this],this),this._hoveredItem=r,r&&!c&&E2(a.onHover,[t,r,this],this)}else r&&E2(a.onClick,[t,r,this],this)}}function oY(e,t,a,r,n){const c=lY(r,e,t,a),i=fY(n,r,t.lineHeight);return{itemWidth:c,itemHeight:i}}function lY(e,t,a,r){let n=e.text;return n&&typeof n!="string"&&(n=n.reduce((c,i)=>c.length>i.length?c:i)),t+a.size/2+r.measureText(n).width}function fY(e,t,a){let r=e;return typeof t.text!="string"&&(r=Ky(t,a)),r}function Ky(e,t){const a=e.text?e.text.length:0;return t*a}function uY(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var dY={id:"legend",_element:Gd,start(e,t,a){const r=e.legend=new Gd({ctx:e.ctx,options:a,chart:e});Ze.configure(e,r,a),Ze.addBox(e,r)},stop(e){Ze.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,a){const r=e.legend;Ze.configure(e,r,a),r.options=a},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,a){const r=t.datasetIndex,n=a.chart;n.isDatasetVisible(r)?(n.hide(r),t.hidden=!0):(n.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:a,pointStyle:r,textAlign:n,color:c,useBorderRadius:i,borderRadius:s}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const f=l.controller.getStyle(a?0:void 0),u=t3(f.borderWidth);return{text:t[l.index].label,fillStyle:f.backgroundColor,fontColor:c,hidden:!l.visible,lineCap:f.borderCapStyle,lineDash:f.borderDash,lineDashOffset:f.borderDashOffset,lineJoin:f.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:f.borderColor,pointStyle:r||f.pointStyle,rotation:f.rotation,textAlign:n||f.textAlign,borderRadius:i&&(s||f.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class pl extends g4{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,a){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=a;const n=R2(r.text)?r.text.length:1;this._padding=t3(r.padding);const c=n*Ve(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=c:this.width=c}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:a,left:r,bottom:n,right:c,options:i}=this,s=i.align;let l=0,f,u,d;return this.isHorizontal()?(u=je(s,r,c),d=a+t,f=c-r):(i.position==="left"?(u=r+t,d=je(s,n,a),l=U2*-.5):(u=c-t,d=je(s,a,n),l=U2*.5),f=n-a),{titleX:u,titleY:d,maxWidth:f,rotation:l}}draw(){const t=this.ctx,a=this.options;if(!a.display)return;const r=Ve(a.font),c=r.lineHeight/2+this._padding.top,{titleX:i,titleY:s,maxWidth:l,rotation:f}=this._drawArgs(c);r6(t,a.text,0,0,r,{color:a.color,maxWidth:l,rotation:f,textAlign:cl(a.align),textBaseline:"middle",translation:[i,s]})}}function hY(e,t){const a=new pl({ctx:e.ctx,options:t,chart:e});Ze.configure(e,a,t),Ze.addBox(e,a),e.titleBlock=a}var mY={id:"title",_element:pl,start(e,t,a){hY(e,a)},stop(e){const t=e.titleBlock;Ze.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,a){const r=e.titleBlock;Ze.configure(e,r,a),r.options=a},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const x8=new WeakMap;var pY={id:"subtitle",start(e,t,a){const r=new pl({ctx:e.ctx,options:a,chart:e});Ze.configure(e,r,a),Ze.addBox(e,r),x8.set(e,r)},stop(e){Ze.removeBox(e,x8.get(e)),x8.delete(e)},beforeUpdate(e,t,a){const r=x8.get(e);Ze.configure(e,r,a),r.options=a},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Xa={average(e){if(!e.length)return!1;let t,a,r=new Set,n=0,c=0;for(t=0,a=e.length;t<a;++t){const s=e[t].element;if(s&&s.hasValue()){const l=s.tooltipPosition();r.add(l.x),n+=l.y,++c}}return c===0||r.size===0?!1:{x:[...r].reduce((s,l)=>s+l)/r.size,y:n/c}},nearest(e,t){if(!e.length)return!1;let a=t.x,r=t.y,n=Number.POSITIVE_INFINITY,c,i,s;for(c=0,i=e.length;c<i;++c){const l=e[c].element;if(l&&l.hasValue()){const f=l.getCenterPoint(),u=s7(t,f);u<n&&(n=u,s=l)}}if(s){const l=s.tooltipPosition();a=l.x,r=l.y}return{x:a,y:r}}};function w4(e,t){return t&&(R2(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function tt(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
835
835
  `)>-1?e.split(`
836
- `):e}function vY(e,t){const{element:a,datasetIndex:r,index:n}=t,c=e.getDatasetMeta(r).controller,{label:i,value:s}=c.getLabelAndValue(n);return{chart:e,label:i,parsed:c.getParsed(n),raw:e.data.datasets[r].data[n],formattedValue:s,dataset:c.getDataset(),dataIndex:n,datasetIndex:r,element:a}}function Xd(e,t){const a=e.chart.ctx,{body:r,footer:n,title:c}=e,{boxWidth:i,boxHeight:s}=t,l=Ve(t.bodyFont),f=Ve(t.titleFont),u=Ve(t.footerFont),d=c.length,h=n.length,m=r.length,v=t3(t.padding);let p=v.height,g=0,y=r.reduce((b,M)=>b+M.before.length+M.lines.length+M.after.length,0);if(y+=e.beforeBody.length+e.afterBody.length,d&&(p+=d*f.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),y){const b=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;p+=m*b+(y-m)*l.lineHeight+(y-1)*t.bodySpacing}h&&(p+=t.footerMarginTop+h*u.lineHeight+(h-1)*t.footerSpacing);let x=0;const C=function(b){g=Math.max(g,a.measureText(b).width+x)};return a.save(),a.font=f.string,V2(e.title,C),a.font=l.string,V2(e.beforeBody.concat(e.afterBody),C),x=t.displayColors?i+2+t.boxPadding:0,V2(r,b=>{V2(b.before,C),V2(b.lines,C),V2(b.after,C)}),x=0,a.font=u.string,V2(e.footer,C),a.restore(),g+=v.width,{width:g,height:p}}function gY(e,t){const{y:a,height:r}=t;return a<r/2?"top":a>e.height-r/2?"bottom":"center"}function yY(e,t,a,r){const{x:n,width:c}=r,i=a.caretSize+a.caretPadding;if(e==="left"&&n+c+i>t.width||e==="right"&&n-c-i<0)return!0}function xY(e,t,a,r){const{x:n,width:c}=a,{width:i,chartArea:{left:s,right:l}}=e;let f="center";return r==="center"?f=n<=(s+l)/2?"left":"right":n<=c/2?f="left":n>=i-c/2&&(f="right"),yY(f,e,t,a)&&(f="center"),f}function Kd(e,t,a){const r=a.yAlign||t.yAlign||gY(e,a);return{xAlign:a.xAlign||t.xAlign||xY(e,t,a,r),yAlign:r}}function bY(e,t){let{x:a,width:r}=e;return t==="right"?a-=r:t==="center"&&(a-=r/2),a}function CY(e,t,a){let{y:r,height:n}=e;return t==="top"?r+=a:t==="bottom"?r-=n+a:r-=n/2,r}function Zd(e,t,a,r){const{caretSize:n,caretPadding:c,cornerRadius:i}=e,{xAlign:s,yAlign:l}=a,f=n+c,{topLeft:u,topRight:d,bottomLeft:h,bottomRight:m}=j0(i);let v=bY(t,s);const p=CY(t,l,f);return l==="center"?s==="left"?v+=f:s==="right"&&(v-=f):s==="left"?v-=Math.max(u,h)+n:s==="right"&&(v+=Math.max(d,m)+n),{x:Ne(v,0,r.width-t.width),y:Ne(p,0,r.height-t.height)}}function b8(e,t,a){const r=t3(a.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function Qd(e){return w4([],tt(e))}function MY(e,t,a){return v0(e,{tooltip:t,tooltipItems:a,type:"tooltip"})}function Jd(e,t){const a=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return a?e.override(a):e}const Zy={beforeTitle:J4,title(e){if(e.length>0){const t=e[0],a=t.chart.data.labels,r=a?a.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return a[t.dataIndex]}return""},afterTitle:J4,beforeBody:J4,beforeLabel:J4,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const a=e.formattedValue;return x2(a)||(t+=a),t},labelColor(e){const a=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:a.borderColor,backgroundColor:a.backgroundColor,borderWidth:a.borderWidth,borderDash:a.borderDash,borderDashOffset:a.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const a=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:a.pointStyle,rotation:a.rotation}},afterLabel:J4,afterBody:J4,beforeFooter:J4,footer:J4,afterFooter:J4};function h3(e,t,a,r){const n=e[t].call(a,r);return typeof n>"u"?Zy[t].call(a,r):n}class v7 extends g4{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const a=this.chart,r=this.options.setContext(this.getContext()),n=r.enabled&&a.options.animation&&r.animations,c=new Sy(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(c)),c}getContext(){return this.$context||(this.$context=MY(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,a){const{callbacks:r}=a,n=h3(r,"beforeTitle",this,t),c=h3(r,"title",this,t),i=h3(r,"afterTitle",this,t);let s=[];return s=w4(s,tt(n)),s=w4(s,tt(c)),s=w4(s,tt(i)),s}getBeforeBody(t,a){return Qd(h3(a.callbacks,"beforeBody",this,t))}getBody(t,a){const{callbacks:r}=a,n=[];return V2(t,c=>{const i={before:[],lines:[],after:[]},s=Jd(r,c);w4(i.before,tt(h3(s,"beforeLabel",this,c))),w4(i.lines,h3(s,"label",this,c)),w4(i.after,tt(h3(s,"afterLabel",this,c))),n.push(i)}),n}getAfterBody(t,a){return Qd(h3(a.callbacks,"afterBody",this,t))}getFooter(t,a){const{callbacks:r}=a,n=h3(r,"beforeFooter",this,t),c=h3(r,"footer",this,t),i=h3(r,"afterFooter",this,t);let s=[];return s=w4(s,tt(n)),s=w4(s,tt(c)),s=w4(s,tt(i)),s}_createItems(t){const a=this._active,r=this.chart.data,n=[],c=[],i=[];let s=[],l,f;for(l=0,f=a.length;l<f;++l)s.push(vY(this.chart,a[l]));return t.filter&&(s=s.filter((u,d,h)=>t.filter(u,d,h,r))),t.itemSort&&(s=s.sort((u,d)=>t.itemSort(u,d,r))),V2(s,u=>{const d=Jd(t.callbacks,u);n.push(h3(d,"labelColor",this,u)),c.push(h3(d,"labelPointStyle",this,u)),i.push(h3(d,"labelTextColor",this,u))}),this.labelColors=n,this.labelPointStyles=c,this.labelTextColors=i,this.dataPoints=s,s}update(t,a){const r=this.options.setContext(this.getContext()),n=this._active;let c,i=[];if(!n.length)this.opacity!==0&&(c={opacity:0});else{const s=Xa[r.position].call(this,n,this._eventPosition);i=this._createItems(r),this.title=this.getTitle(i,r),this.beforeBody=this.getBeforeBody(i,r),this.body=this.getBody(i,r),this.afterBody=this.getAfterBody(i,r),this.footer=this.getFooter(i,r);const l=this._size=Xd(this,r),f=Object.assign({},s,l),u=Kd(this.chart,r,f),d=Zd(r,f,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,c={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=i,this.$context=void 0,c&&this._resolveAnimations().update(this,c),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:a})}drawCaret(t,a,r,n){const c=this.getCaretPosition(t,r,n);a.lineTo(c.x1,c.y1),a.lineTo(c.x2,c.y2),a.lineTo(c.x3,c.y3)}getCaretPosition(t,a,r){const{xAlign:n,yAlign:c}=this,{caretSize:i,cornerRadius:s}=r,{topLeft:l,topRight:f,bottomLeft:u,bottomRight:d}=j0(s),{x:h,y:m}=t,{width:v,height:p}=a;let g,y,x,C,b,M;return c==="center"?(b=m+p/2,n==="left"?(g=h,y=g-i,C=b+i,M=b-i):(g=h+v,y=g+i,C=b-i,M=b+i),x=g):(n==="left"?y=h+Math.max(l,u)+i:n==="right"?y=h+v-Math.max(f,d)-i:y=this.caretX,c==="top"?(C=m,b=C-i,g=y-i,x=y+i):(C=m+p,b=C+i,g=y+i,x=y-i),M=C),{x1:g,x2:y,x3:x,y1:C,y2:b,y3:M}}drawTitle(t,a,r){const n=this.title,c=n.length;let i,s,l;if(c){const f=W6(r.rtl,this.x,this.width);for(t.x=b8(this,r.titleAlign,r),a.textAlign=f.textAlign(r.titleAlign),a.textBaseline="middle",i=Ve(r.titleFont),s=r.titleSpacing,a.fillStyle=r.titleColor,a.font=i.string,l=0;l<c;++l)a.fillText(n[l],f.x(t.x),t.y+i.lineHeight/2),t.y+=i.lineHeight+s,l+1===c&&(t.y+=r.titleMarginBottom-s)}}_drawColorBox(t,a,r,n,c){const i=this.labelColors[r],s=this.labelPointStyles[r],{boxHeight:l,boxWidth:f}=c,u=Ve(c.bodyFont),d=b8(this,"left",c),h=n.x(d),m=l<u.lineHeight?(u.lineHeight-l)/2:0,v=a.y+m;if(c.usePointStyle){const p={radius:Math.min(f,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},g=n.leftForLtr(h,f)+f/2,y=v+l/2;t.strokeStyle=c.multiKeyBackground,t.fillStyle=c.multiKeyBackground,l7(t,p,g,y),t.strokeStyle=i.borderColor,t.fillStyle=i.backgroundColor,l7(t,p,g,y)}else{t.lineWidth=u2(i.borderWidth)?Math.max(...Object.values(i.borderWidth)):i.borderWidth||1,t.strokeStyle=i.borderColor,t.setLineDash(i.borderDash||[]),t.lineDashOffset=i.borderDashOffset||0;const p=n.leftForLtr(h,f),g=n.leftForLtr(n.xPlus(h,1),f-2),y=j0(i.borderRadius);Object.values(y).some(x=>x!==0)?(t.beginPath(),t.fillStyle=c.multiKeyBackground,jr(t,{x:p,y:v,w:f,h:l,radius:y}),t.fill(),t.stroke(),t.fillStyle=i.backgroundColor,t.beginPath(),jr(t,{x:g,y:v+1,w:f-2,h:l-2,radius:y}),t.fill()):(t.fillStyle=c.multiKeyBackground,t.fillRect(p,v,f,l),t.strokeRect(p,v,f,l),t.fillStyle=i.backgroundColor,t.fillRect(g,v+1,f-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,a,r){const{body:n}=this,{bodySpacing:c,bodyAlign:i,displayColors:s,boxHeight:l,boxWidth:f,boxPadding:u}=r,d=Ve(r.bodyFont);let h=d.lineHeight,m=0;const v=W6(r.rtl,this.x,this.width),p=function(H){a.fillText(H,v.x(t.x+m),t.y+h/2),t.y+=h+c},g=v.textAlign(i);let y,x,C,b,M,w,z;for(a.textAlign=i,a.textBaseline="middle",a.font=d.string,t.x=b8(this,g,r),a.fillStyle=r.bodyColor,V2(this.beforeBody,p),m=s&&g!=="right"?i==="center"?f/2+u:f+2+u:0,b=0,w=n.length;b<w;++b){for(y=n[b],x=this.labelTextColors[b],a.fillStyle=x,V2(y.before,p),C=y.lines,s&&C.length&&(this._drawColorBox(a,t,b,v,r),h=Math.max(d.lineHeight,l)),M=0,z=C.length;M<z;++M)p(C[M]),h=d.lineHeight;V2(y.after,p)}m=0,h=d.lineHeight,V2(this.afterBody,p),t.y-=c}drawFooter(t,a,r){const n=this.footer,c=n.length;let i,s;if(c){const l=W6(r.rtl,this.x,this.width);for(t.x=b8(this,r.footerAlign,r),t.y+=r.footerMarginTop,a.textAlign=l.textAlign(r.footerAlign),a.textBaseline="middle",i=Ve(r.footerFont),a.fillStyle=r.footerColor,a.font=i.string,s=0;s<c;++s)a.fillText(n[s],l.x(t.x),t.y+i.lineHeight/2),t.y+=i.lineHeight+r.footerSpacing}}drawBackground(t,a,r,n){const{xAlign:c,yAlign:i}=this,{x:s,y:l}=t,{width:f,height:u}=r,{topLeft:d,topRight:h,bottomLeft:m,bottomRight:v}=j0(n.cornerRadius);a.fillStyle=n.backgroundColor,a.strokeStyle=n.borderColor,a.lineWidth=n.borderWidth,a.beginPath(),a.moveTo(s+d,l),i==="top"&&this.drawCaret(t,a,r,n),a.lineTo(s+f-h,l),a.quadraticCurveTo(s+f,l,s+f,l+h),i==="center"&&c==="right"&&this.drawCaret(t,a,r,n),a.lineTo(s+f,l+u-v),a.quadraticCurveTo(s+f,l+u,s+f-v,l+u),i==="bottom"&&this.drawCaret(t,a,r,n),a.lineTo(s+m,l+u),a.quadraticCurveTo(s,l+u,s,l+u-m),i==="center"&&c==="left"&&this.drawCaret(t,a,r,n),a.lineTo(s,l+d),a.quadraticCurveTo(s,l,s+d,l),a.closePath(),a.fill(),n.borderWidth>0&&a.stroke()}_updateAnimationTarget(t){const a=this.chart,r=this.$animations,n=r&&r.x,c=r&&r.y;if(n||c){const i=Xa[t.position].call(this,this._active,this._eventPosition);if(!i)return;const s=this._size=Xd(this,t),l=Object.assign({},i,this._size),f=Kd(a,t,l),u=Zd(t,l,f,a);(n._to!==u.x||c._to!==u.y)&&(this.xAlign=f.xAlign,this.yAlign=f.yAlign,this.width=s.width,this.height=s.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const a=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(a);const n={width:this.width,height:this.height},c={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const i=t3(a.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;a.enabled&&s&&(t.save(),t.globalAlpha=r,this.drawBackground(c,t,n,a),_y(t,a.textDirection),c.y+=i.top,this.drawTitle(c,t,a),this.drawBody(c,t,a),this.drawFooter(c,t,a),ky(t,a.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,a){const r=this._active,n=t.map(({datasetIndex:s,index:l})=>{const f=this.chart.getDatasetMeta(s);if(!f)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:f.data[l],index:l}}),c=!_c(r,n),i=this._positionChanged(n,a);(c||i)&&(this._active=n,this._eventPosition=a,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,a,r=!0){if(a&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,c=this._active||[],i=this._getActiveElements(t,c,a,r),s=this._positionChanged(i,t),l=a||!_c(i,c)||s;return l&&(this._active=i,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,a))),l}_getActiveElements(t,a,r,n){const c=this.options;if(t.type==="mouseout")return[];if(!n)return a.filter(s=>this.chart.data.datasets[s.datasetIndex]&&this.chart.getDatasetMeta(s.datasetIndex).controller.getParsed(s.index)!==void 0);const i=this.chart.getElementsAtEventForMode(t,c.mode,c,r);return c.reverse&&i.reverse(),i}_positionChanged(t,a){const{caretX:r,caretY:n,options:c}=this,i=Xa[c.position].call(this,t,a);return i!==!1&&(r!==i.x||n!==i.y)}}g1(v7,"positioners",Xa);var zY={id:"tooltip",_element:v7,positioners:Xa,afterInit(e,t,a){a&&(e.tooltip=new v7({chart:e,options:a}))},beforeUpdate(e,t,a){e.tooltip&&e.tooltip.initialize(a)},reset(e,t,a){e.tooltip&&e.tooltip.initialize(a)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const a={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...a,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",a)}},afterEvent(e,t){if(e.tooltip){const a=t.replay;e.tooltip.handleEvent(t.event,a,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Zy},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},wY=Object.freeze({__proto__:null,Colors:Oj,Decimation:Rj,Filler:iY,Legend:dY,SubTitle:pY,Title:mY,Tooltip:zY});const _Y=(e,t,a,r)=>(typeof t=="string"?(a=e.push(t)-1,r.unshift({index:a,label:t})):isNaN(t)&&(a=null),a);function kY(e,t,a,r){const n=e.indexOf(t);if(n===-1)return _Y(e,t,a,r);const c=e.lastIndexOf(t);return n!==c?a:n}const HY=(e,t)=>e===null?null:Ne(Math.round(e),0,t);function eh(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class g7 extends d6{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const a=this._addedLabels;if(a.length){const r=this.getLabels();for(const{index:n,label:c}of a)r[n]===c&&r.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,a){if(x2(t))return null;const r=this.getLabels();return a=isFinite(a)&&r[a]===t?a:kY(r,t,a2(a,t),this._addedLabels),HY(a,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:a}=this.getUserBounds();let{min:r,max:n}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),a||(n=this.getLabels().length-1)),this.min=r,this.max=n}buildTicks(){const t=this.min,a=this.max,r=this.options.offset,n=[];let c=this.getLabels();c=t===0&&a===c.length-1?c:c.slice(t,a+1),this._valueRange=Math.max(c.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let i=t;i<=a;i++)n.push({value:i});return n}getLabelForValue(t){return eh.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const a=this.ticks;return t<0||t>a.length-1?null:this.getPixelForValue(a[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}g1(g7,"id","category"),g1(g7,"defaults",{ticks:{callback:eh}});function VY(e,t){const a=[],{bounds:n,step:c,min:i,max:s,precision:l,count:f,maxTicks:u,maxDigits:d,includeBounds:h}=e,m=c||1,v=u-1,{min:p,max:g}=t,y=!x2(i),x=!x2(s),C=!x2(f),b=(g-p)/(d+1);let M=Xu((g-p)/v/m)*m,w,z,H,A;if(M<1e-14&&!y&&!x)return[{value:p},{value:g}];A=Math.ceil(g/M)-Math.floor(p/M),A>v&&(M=Xu(A*M/v/m)*m),x2(l)||(w=Math.pow(10,l),M=Math.ceil(M*w)/w),n==="ticks"?(z=Math.floor(p/M)*M,H=Math.ceil(g/M)*M):(z=p,H=g),y&&x&&c&&CU((s-i)/c,M/1e3)?(A=Math.round(Math.min((s-i)/M,u)),M=(s-i)/A,z=i,H=s):C?(z=y?i:z,H=x?s:H,A=f-1,M=(H-z)/A):(A=(H-z)/M,ur(A,Math.round(A),M/1e3)?A=Math.round(A):A=Math.ceil(A));const V=Math.max(Ku(M),Ku(z));w=Math.pow(10,x2(l)?V:l),z=Math.round(z*w)/w,H=Math.round(H*w)/w;let k=0;for(y&&(h&&z!==i?(a.push({value:i}),z<i&&k++,ur(Math.round((z+k*M)*w)/w,i,th(i,b,e))&&k++):z<i&&k++);k<A;++k){const _=Math.round((z+k*M)*w)/w;if(x&&_>s)break;a.push({value:_})}return x&&h&&H!==s?a.length&&ur(a[a.length-1].value,s,th(s,b,e))?a[a.length-1].value=s:a.push({value:s}):(!x||H===s)&&a.push({value:H}),a}function th(e,t,{horizontal:a,minRotation:r}){const n=n4(r),c=(a?Math.sin(n):Math.cos(n))||.001,i=.75*t*(""+e).length;return Math.min(t/c,i)}class Tc extends d6{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,a){return x2(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:a,maxDefined:r}=this.getUserBounds();let{min:n,max:c}=this;const i=l=>n=a?n:l,s=l=>c=r?c:l;if(t){const l=O4(n),f=O4(c);l<0&&f<0?s(0):l>0&&f>0&&i(0)}if(n===c){let l=c===0?1:Math.abs(c*.05);s(c+l),t||i(n-l)}this.min=n,this.max=c}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:a,stepSize:r}=t,n;return r?(n=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),a=a||11),a&&(n=Math.min(a,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,a=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const n={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:a.precision,step:a.stepSize,count:a.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:a.minRotation||0,includeBounds:a.includeBounds!==!1},c=this._range||this,i=VY(n,c);return t.bounds==="ticks"&&oy(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}configure(){const t=this.ticks;let a=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const n=(r-a)/Math.max(t.length-1,1)/2;a-=n,r+=n}this._startValue=a,this._endValue=r,this._valueRange=r-a}getLabelForValue(t){return kn(t,this.chart.options.locale,this.options.ticks.format)}}class y7 extends Tc{determineDataLimits(){const{min:t,max:a}=this.getMinMax(!0);this.min=se(t)?t:0,this.max=se(a)?a:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),a=t?this.width:this.height,r=n4(this.options.ticks.minRotation),n=(t?Math.sin(r):Math.cos(r))||.001,c=this._resolveTickFontOptions(0);return Math.ceil(a/Math.min(40,c.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}g1(y7,"id","linear"),g1(y7,"defaults",{ticks:{callback:w5.formatters.numeric}});const Gr=e=>Math.floor(jt(e)),L0=(e,t)=>Math.pow(10,Gr(e)+t);function ah(e){return e/Math.pow(10,Gr(e))===1}function rh(e,t,a){const r=Math.pow(10,a),n=Math.floor(e/r);return Math.ceil(t/r)-n}function LY(e,t){const a=t-e;let r=Gr(a);for(;rh(e,t,r)>10;)r++;for(;rh(e,t,r)<10;)r--;return Math.min(r,Gr(e))}function SY(e,{min:t,max:a}){t=x3(e.min,t);const r=[],n=Gr(t);let c=LY(t,a),i=c<0?Math.pow(10,Math.abs(c)):1;const s=Math.pow(10,c),l=n>c?Math.pow(10,n):0,f=Math.round((t-l)*i)/i,u=Math.floor((t-l)/s/10)*s*10;let d=Math.floor((f-u)/Math.pow(10,c)),h=x3(e.min,Math.round((l+u+d*Math.pow(10,c))*i)/i);for(;h<a;)r.push({value:h,major:ah(h),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(c++,d=2,i=c>=0?1:i),h=Math.round((l+u+d*Math.pow(10,c))*i)/i;const m=x3(e.max,h);return r.push({value:m,major:ah(m),significand:d}),r}class x7 extends d6{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,a){const r=Tc.prototype.parse.apply(this,[t,a]);if(r===0){this._zero=!0;return}return se(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:a}=this.getMinMax(!0);this.min=se(t)?Math.max(0,t):null,this.max=se(a)?Math.max(0,a):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!se(this._userMin)&&(this.min=t===L0(this.min,0)?L0(this.min,-1):L0(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:a}=this.getUserBounds();let r=this.min,n=this.max;const c=s=>r=t?r:s,i=s=>n=a?n:s;r===n&&(r<=0?(c(1),i(10)):(c(L0(r,-1)),i(L0(n,1)))),r<=0&&c(L0(n,-1)),n<=0&&i(L0(r,1)),this.min=r,this.max=n}buildTicks(){const t=this.options,a={min:this._userMin,max:this._userMax},r=SY(a,this);return t.bounds==="ticks"&&oy(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":kn(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=jt(t),this._valueRange=jt(this.max)-jt(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(jt(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const a=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+a*this._valueRange)}}g1(x7,"id","logarithmic"),g1(x7,"defaults",{ticks:{callback:w5.formatters.logarithmic,major:{enabled:!0}}});function b7(e){const t=e.ticks;if(t.display&&e.display){const a=t3(t.backdropPadding);return a2(t.font&&t.font.size,K2.font.size)+a.height}return 0}function AY(e,t,a){return a=R2(a)?a:[a],{w:BU(e,t.string,a),h:a.length*t.lineHeight}}function nh(e,t,a,r,n){return e===r||e===n?{start:t-a/2,end:t+a/2}:e<r||e>n?{start:t-a,end:t}:{start:t,end:t+a}}function TY(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},a=Object.assign({},t),r=[],n=[],c=e._pointLabels.length,i=e.options.pointLabels,s=i.centerPointLabels?U2/c:0;for(let l=0;l<c;l++){const f=i.setContext(e.getPointLabelContext(l));n[l]=f.padding;const u=e.getPointPosition(l,e.drawingArea+n[l],s),d=Ve(f.font),h=AY(e.ctx,d,e._pointLabels[l]);r[l]=h;const m=b3(e.getIndexAngle(l)+s),v=Math.round(rl(m)),p=nh(v,u.x,h.w,0,180),g=nh(v,u.y,h.h,90,270);EY(a,t,m,p,g)}e.setCenterPoint(t.l-a.l,a.r-t.r,t.t-a.t,a.b-t.b),e._pointLabelItems=OY(e,r,n)}function EY(e,t,a,r,n){const c=Math.abs(Math.sin(a)),i=Math.abs(Math.cos(a));let s=0,l=0;r.start<t.l?(s=(t.l-r.start)/c,e.l=Math.min(e.l,t.l-s)):r.end>t.r&&(s=(r.end-t.r)/c,e.r=Math.max(e.r,t.r+s)),n.start<t.t?(l=(t.t-n.start)/i,e.t=Math.min(e.t,t.t-l)):n.end>t.b&&(l=(n.end-t.b)/i,e.b=Math.max(e.b,t.b+l))}function NY(e,t,a){const r=e.drawingArea,{extra:n,additionalAngle:c,padding:i,size:s}=a,l=e.getPointPosition(t,r+n+i,c),f=Math.round(rl(b3(l.angle+pe))),u=FY(l.y,s.h,f),d=PY(f),h=BY(l.x,s.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:h,top:u,right:h+s.w,bottom:u+s.h}}function DY(e,t){if(!t)return!0;const{left:a,top:r,right:n,bottom:c}=e;return!(ft({x:a,y:r},t)||ft({x:a,y:c},t)||ft({x:n,y:r},t)||ft({x:n,y:c},t))}function OY(e,t,a){const r=[],n=e._pointLabels.length,c=e.options,{centerPointLabels:i,display:s}=c.pointLabels,l={extra:b7(c)/2,additionalAngle:i?U2/n:0};let f;for(let u=0;u<n;u++){l.padding=a[u],l.size=t[u];const d=NY(e,u,l);r.push(d),s==="auto"&&(d.visible=DY(d,f),d.visible&&(f=d))}return r}function PY(e){return e===0||e===180?"center":e<180?"left":"right"}function BY(e,t,a){return a==="right"?e-=t:a==="center"&&(e-=t/2),e}function FY(e,t,a){return a===90||a===270?e-=t/2:(a>270||a<90)&&(e-=t),e}function RY(e,t,a){const{left:r,top:n,right:c,bottom:i}=a,{backdropColor:s}=t;if(!x2(s)){const l=j0(t.borderRadius),f=t3(t.backdropPadding);e.fillStyle=s;const u=r-f.left,d=n-f.top,h=c-r+f.width,m=i-n+f.height;Object.values(l).some(v=>v!==0)?(e.beginPath(),jr(e,{x:u,y:d,w:h,h:m,radius:l}),e.fill()):e.fillRect(u,d,h,m)}}function IY(e,t){const{ctx:a,options:{pointLabels:r}}=e;for(let n=t-1;n>=0;n--){const c=e._pointLabelItems[n];if(!c.visible)continue;const i=r.setContext(e.getPointLabelContext(n));RY(a,i,c);const s=Ve(i.font),{x:l,y:f,textAlign:u}=c;r6(a,e._pointLabels[n],l,f+s.lineHeight/2,s,{color:i.color,textAlign:u,textBaseline:"middle"})}}function Qy(e,t,a,r){const{ctx:n}=e;if(a)n.arc(e.xCenter,e.yCenter,t,0,$2);else{let c=e.getPointPosition(0,t);n.moveTo(c.x,c.y);for(let i=1;i<r;i++)c=e.getPointPosition(i,t),n.lineTo(c.x,c.y)}}function $Y(e,t,a,r,n){const c=e.ctx,i=t.circular,{color:s,lineWidth:l}=t;!i&&!r||!s||!l||a<0||(c.save(),c.strokeStyle=s,c.lineWidth=l,c.setLineDash(n.dash||[]),c.lineDashOffset=n.dashOffset,c.beginPath(),Qy(e,a,i,r),c.closePath(),c.stroke(),c.restore())}function UY(e,t,a){return v0(e,{label:a,index:t,type:"pointLabel"})}class Ka extends Tc{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=t3(b7(this.options)/2),a=this.width=this.maxWidth-t.width,r=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+a/2+t.left),this.yCenter=Math.floor(this.top+r/2+t.top),this.drawingArea=Math.floor(Math.min(a,r)/2)}determineDataLimits(){const{min:t,max:a}=this.getMinMax(!1);this.min=se(t)&&!isNaN(t)?t:0,this.max=se(a)&&!isNaN(a)?a:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/b7(this.options))}generateTickLabels(t){Tc.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((a,r)=>{const n=E2(this.options.pointLabels.callback,[a,r],this);return n||n===0?n:""}).filter((a,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?TY(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,a,r,n){this.xCenter+=Math.floor((t-a)/2),this.yCenter+=Math.floor((r-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,a,r,n))}getIndexAngle(t){const a=$2/(this._pointLabels.length||1),r=this.options.startAngle||0;return b3(t*a+n4(r))}getDistanceFromCenterForValue(t){if(x2(t))return NaN;const a=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*a:(t-this.min)*a}getValueForDistanceFromCenter(t){if(x2(t))return NaN;const a=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-a:this.min+a}getPointLabelContext(t){const a=this._pointLabels||[];if(t>=0&&t<a.length){const r=a[t];return UY(this.getContext(),t,r)}}getPointPosition(t,a,r=0){const n=this.getIndexAngle(t)-pe+r;return{x:Math.cos(n)*a+this.xCenter,y:Math.sin(n)*a+this.yCenter,angle:n}}getPointPositionForValue(t,a){return this.getPointPosition(t,this.getDistanceFromCenterForValue(a))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:a,top:r,right:n,bottom:c}=this._pointLabelItems[t];return{left:a,top:r,right:n,bottom:c}}drawBackground(){const{backgroundColor:t,grid:{circular:a}}=this.options;if(t){const r=this.ctx;r.save(),r.beginPath(),Qy(this,this.getDistanceFromCenterForValue(this._endValue),a,this._pointLabels.length),r.closePath(),r.fillStyle=t,r.fill(),r.restore()}}drawGrid(){const t=this.ctx,a=this.options,{angleLines:r,grid:n,border:c}=a,i=this._pointLabels.length;let s,l,f;if(a.pointLabels.display&&IY(this,i),n.display&&this.ticks.forEach((u,d)=>{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(u.value);const h=this.getContext(d),m=n.setContext(h),v=c.setContext(h);$Y(this,m,l,i,v)}}),r.display){for(t.save(),s=i-1;s>=0;s--){const u=r.setContext(this.getPointLabelContext(s)),{color:d,lineWidth:h}=u;!h||!d||(t.lineWidth=h,t.strokeStyle=d,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(a.reverse?this.min:this.max),f=this.getPointPosition(s,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(f.x,f.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,a=this.options,r=a.ticks;if(!r.display)return;const n=this.getIndexAngle(0);let c,i;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((s,l)=>{if(l===0&&this.min>=0&&!a.reverse)return;const f=r.setContext(this.getContext(l)),u=Ve(f.font);if(c=this.getDistanceFromCenterForValue(this.ticks[l].value),f.showLabelBackdrop){t.font=u.string,i=t.measureText(s.label).width,t.fillStyle=f.backdropColor;const d=t3(f.backdropPadding);t.fillRect(-i/2-d.left,-c-u.size/2-d.top,i+d.width,u.size+d.height)}r6(t,s.label,0,-c,u,{color:f.color,strokeColor:f.textStrokeColor,strokeWidth:f.textStrokeWidth})}),t.restore()}drawTitle(){}}g1(Ka,"id","radialLinear"),g1(Ka,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:w5.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),g1(Ka,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),g1(Ka,"descriptors",{angleLines:{_fallback:"grid"}});const V5={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},g3=Object.keys(V5);function ch(e,t){return e-t}function ih(e,t){if(x2(t))return null;const a=e._adapter,{parser:r,round:n,isoWeekday:c}=e._parseOpts;let i=t;return typeof r=="function"&&(i=r(i)),se(i)||(i=typeof r=="string"?a.parse(i,r):a.parse(i)),i===null?null:(n&&(i=n==="week"&&(K6(c)||c===!0)?a.startOf(i,"isoWeek",c):a.startOf(i,n)),+i)}function sh(e,t,a,r){const n=g3.length;for(let c=g3.indexOf(e);c<n-1;++c){const i=V5[g3[c]],s=i.steps?i.steps:Number.MAX_SAFE_INTEGER;if(i.common&&Math.ceil((a-t)/(s*i.size))<=r)return g3[c]}return g3[n-1]}function WY(e,t,a,r,n){for(let c=g3.length-1;c>=g3.indexOf(a);c--){const i=g3[c];if(V5[i].common&&e._adapter.diff(n,r,i)>=t-1)return i}return g3[a?g3.indexOf(a):0]}function qY(e){for(let t=g3.indexOf(e)+1,a=g3.length;t<a;++t)if(V5[g3[t]].common)return g3[t]}function oh(e,t,a){if(!a)e[t]=!0;else if(a.length){const{lo:r,hi:n}=nl(a,t),c=a[r]>=t?a[r]:a[n];e[c]=!0}}function jY(e,t,a,r){const n=e._adapter,c=+n.startOf(t[0].value,r),i=t[t.length-1].value;let s,l;for(s=c;s<=i;s=+n.add(s,1,r))l=a[s],l>=0&&(t[l].major=!0);return t}function lh(e,t,a){const r=[],n={},c=t.length;let i,s;for(i=0;i<c;++i)s=t[i],n[s]=i,r.push({value:s,major:!1});return c===0||!a?r:jY(e,r,n,a)}class Xr extends d6{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,a={}){const r=t.time||(t.time={}),n=this._adapter=new eq._date(t.adapters.date);n.init(a),fr(r.displayFormats,n.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=a.normalized}parse(t,a){return t===void 0?null:ih(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,a=this._adapter,r=t.time.unit||"day";let{min:n,max:c,minDefined:i,maxDefined:s}=this.getUserBounds();function l(f){!i&&!isNaN(f.min)&&(n=Math.min(n,f.min)),!s&&!isNaN(f.max)&&(c=Math.max(c,f.max))}(!i||!s)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),n=se(n)&&!isNaN(n)?n:+a.startOf(Date.now(),r),c=se(c)&&!isNaN(c)?c:+a.endOf(Date.now(),r)+1,this.min=Math.min(n,c-1),this.max=Math.max(n+1,c)}_getLabelBounds(){const t=this.getLabelTimestamps();let a=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(a=t[0],r=t[t.length-1]),{min:a,max:r}}buildTicks(){const t=this.options,a=t.time,r=t.ticks,n=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const c=this.min,i=this.max,s=_U(n,c,i);return this._unit=a.unit||(r.autoSkip?sh(a.minUnit,this.min,this.max,this._getLabelCapacity(c)):WY(this,s.length,a.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:qY(this._unit),this.initOffsets(n),t.reverse&&s.reverse(),lh(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let a=0,r=0,n,c;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?a=1-n:a=(this.getDecimalForValue(t[1])-n)/2,c=this.getDecimalForValue(t[t.length-1]),t.length===1?r=c:r=(c-this.getDecimalForValue(t[t.length-2]))/2);const i=t.length<3?.5:.25;a=Ne(a,0,i),r=Ne(r,0,i),this._offsets={start:a,end:r,factor:1/(a+1+r)}}_generate(){const t=this._adapter,a=this.min,r=this.max,n=this.options,c=n.time,i=c.unit||sh(c.minUnit,a,r,this._getLabelCapacity(a)),s=a2(n.ticks.stepSize,1),l=i==="week"?c.isoWeekday:!1,f=K6(l)||l===!0,u={};let d=a,h,m;if(f&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,f?"day":i),t.diff(r,a,i)>1e5*s)throw new Error(a+" and "+r+" are too far apart with stepSize of "+s+" "+i);const v=n.ticks.source==="data"&&this.getDataTimestamps();for(h=d,m=0;h<r;h=+t.add(h,s,i),m++)oh(u,h,v);return(h===r||n.bounds==="ticks"||m===1)&&oh(u,h,v),Object.keys(u).sort(ch).map(p=>+p)}getLabelForValue(t){const a=this._adapter,r=this.options.time;return r.tooltipFormat?a.format(t,r.tooltipFormat):a.format(t,r.displayFormats.datetime)}format(t,a){const n=this.options.time.displayFormats,c=this._unit,i=a||n[c];return this._adapter.format(t,i)}_tickFormatFunction(t,a,r,n){const c=this.options,i=c.ticks.callback;if(i)return E2(i,[t,a,r],this);const s=c.time.displayFormats,l=this._unit,f=this._majorUnit,u=l&&s[l],d=f&&s[f],h=r[a],m=f&&d&&h&&h.major;return this._adapter.format(t,n||(m?d:u))}generateTickLabels(t){let a,r,n;for(a=0,r=t.length;a<r;++a)n=t[a],n.label=this._tickFormatFunction(n.value,a,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const a=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((a.start+r)*a.factor)}getValueForPixel(t){const a=this._offsets,r=this.getDecimalForPixel(t)/a.factor-a.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const a=this.options.ticks,r=this.ctx.measureText(t).width,n=n4(this.isHorizontal()?a.maxRotation:a.minRotation),c=Math.cos(n),i=Math.sin(n),s=this._resolveTickFontOptions(0).size;return{w:r*c+s*i,h:r*i+s*c}}_getLabelCapacity(t){const a=this.options.time,r=a.displayFormats,n=r[a.unit]||r.millisecond,c=this._tickFormatFunction(t,0,lh(this,[t],this._majorUnit),n),i=this._getLabelSize(c),s=Math.floor(this.isHorizontal()?this.width/i.w:this.height/i.h)-1;return s>0?s:1}getDataTimestamps(){let t=this._cache.data||[],a,r;if(t.length)return t;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(a=0,r=n.length;a<r;++a)t=t.concat(n[a].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let a,r;if(t.length)return t;const n=this.getLabels();for(a=0,r=n.length;a<r;++a)t.push(ih(this,n[a]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return uy(t.sort(ch))}}g1(Xr,"id","time"),g1(Xr,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function C8(e,t,a){let r=0,n=e.length-1,c,i,s,l;a?(t>=e[r].pos&&t<=e[n].pos&&({lo:r,hi:n}=lt(e,"pos",t)),{pos:c,time:s}=e[r],{pos:i,time:l}=e[n]):(t>=e[r].time&&t<=e[n].time&&({lo:r,hi:n}=lt(e,"time",t)),{time:c,pos:s}=e[r],{time:i,pos:l}=e[n]);const f=i-c;return f?s+(l-s)*(t-c)/f:s}class C7 extends Xr{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),a=this._table=this.buildLookupTable(t);this._minPos=C8(a,this.min),this._tableRange=C8(a,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:a,max:r}=this,n=[],c=[];let i,s,l,f,u;for(i=0,s=t.length;i<s;++i)f=t[i],f>=a&&f<=r&&n.push(f);if(n.length<2)return[{time:a,pos:0},{time:r,pos:1}];for(i=0,s=n.length;i<s;++i)u=n[i+1],l=n[i-1],f=n[i],Math.round((u+l)/2)!==f&&c.push({time:f,pos:i/(s-1)});return c}_generate(){const t=this.min,a=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(a)||r.length===1)&&r.push(a),r.sort((n,c)=>n-c)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const a=this.getDataTimestamps(),r=this.getLabelTimestamps();return a.length&&r.length?t=this.normalize(a.concat(r)):t=a.length?a:r,t=this._cache.all=t,t}getDecimalForValue(t){return(C8(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const a=this._offsets,r=this.getDecimalForPixel(t)/a.factor-a.end;return C8(this._table,r*this._tableRange+this._minPos,!0)}}g1(C7,"id","timeseries"),g1(C7,"defaults",Xr.defaults);var YY=Object.freeze({__proto__:null,CategoryScale:g7,LinearScale:y7,LogarithmicScale:x7,RadialLinearScale:Ka,TimeScale:Xr,TimeSeriesScale:C7});const Jy=[JW,Lj,wY,YY];var GY=typeof global=="object"&&global&&global.Object===Object&&global;const ex=GY;var XY=typeof self=="object"&&self&&self.Object===Object&&self,KY=ex||XY||Function("return this")();const q4=KY;var ZY=q4.Symbol;const d0=ZY;var tx=Object.prototype,QY=tx.hasOwnProperty,JY=tx.toString,Oa=d0?d0.toStringTag:void 0;function eG(e){var t=QY.call(e,Oa),a=e[Oa];try{e[Oa]=void 0;var r=!0}catch{}var n=JY.call(e);return r&&(t?e[Oa]=a:delete e[Oa]),n}var tG=Object.prototype,aG=tG.toString;function rG(e){return aG.call(e)}var nG="[object Null]",cG="[object Undefined]",fh=d0?d0.toStringTag:void 0;function Vn(e){return e==null?e===void 0?cG:nG:fh&&fh in Object(e)?eG(e):rG(e)}function n6(e){return e!=null&&typeof e=="object"}var iG=Array.isArray;const J6=iG;function Ln(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var sG="[object AsyncFunction]",oG="[object Function]",lG="[object GeneratorFunction]",fG="[object Proxy]";function ax(e){if(!Ln(e))return!1;var t=Vn(e);return t==oG||t==lG||t==sG||t==fG}var uG=q4["__core-js_shared__"];const Xi=uG;var uh=function(){var e=/[^.]+$/.exec(Xi&&Xi.keys&&Xi.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function dG(e){return!!uh&&uh in e}var hG=Function.prototype,mG=hG.toString;function h6(e){if(e!=null){try{return mG.call(e)}catch{}try{return e+""}catch{}}return""}var pG=/[\\^$.*+?()[\]{}|]/g,vG=/^\[object .+?Constructor\]$/,gG=Function.prototype,yG=Object.prototype,xG=gG.toString,bG=yG.hasOwnProperty,CG=RegExp("^"+xG.call(bG).replace(pG,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function MG(e){if(!Ln(e)||dG(e))return!1;var t=ax(e)?CG:vG;return t.test(h6(e))}function zG(e,t){return e==null?void 0:e[t]}function m6(e,t){var a=zG(e,t);return MG(a)?a:void 0}var wG=m6(q4,"WeakMap");const M7=wG;var dh=Object.create,_G=function(){function e(){}return function(t){if(!Ln(t))return{};if(dh)return dh(t);e.prototype=t;var a=new e;return e.prototype=void 0,a}}();const kG=_G;function HG(e,t){var a=-1,r=e.length;for(t||(t=Array(r));++a<r;)t[a]=e[a];return t}var VG=function(){try{var e=m6(Object,"defineProperty");return e({},"",{}),e}catch{}}();const hh=VG;function LG(e,t){for(var a=-1,r=e==null?0:e.length;++a<r&&t(e[a],a,e)!==!1;);return e}var SG=9007199254740991,AG=/^(?:0|[1-9]\d*)$/;function TG(e,t){var a=typeof e;return t=t??SG,!!t&&(a=="number"||a!="symbol"&&AG.test(e))&&e>-1&&e%1==0&&e<t}function rx(e,t,a){t=="__proto__"&&hh?hh(e,t,{configurable:!0,enumerable:!0,value:a,writable:!0}):e[t]=a}function vl(e,t){return e===t||e!==e&&t!==t}var EG=Object.prototype,NG=EG.hasOwnProperty;function nx(e,t,a){var r=e[t];(!(NG.call(e,t)&&vl(r,a))||a===void 0&&!(t in e))&&rx(e,t,a)}function L5(e,t,a,r){var n=!a;a||(a={});for(var c=-1,i=t.length;++c<i;){var s=t[c],l=r?r(a[s],e[s],s,a,e):void 0;l===void 0&&(l=e[s]),n?rx(a,s,l):nx(a,s,l)}return a}var DG=9007199254740991;function cx(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=DG}function gl(e){return e!=null&&cx(e.length)&&!ax(e)}var OG=Object.prototype;function S5(e){var t=e&&e.constructor,a=typeof t=="function"&&t.prototype||OG;return e===a}function PG(e,t){for(var a=-1,r=Array(e);++a<e;)r[a]=t(a);return r}var BG="[object Arguments]";function mh(e){return n6(e)&&Vn(e)==BG}var ix=Object.prototype,FG=ix.hasOwnProperty,RG=ix.propertyIsEnumerable,IG=mh(function(){return arguments}())?mh:function(e){return n6(e)&&FG.call(e,"callee")&&!RG.call(e,"callee")};const sx=IG;function $G(){return!1}var ox=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ph=ox&&typeof module=="object"&&module&&!module.nodeType&&module,UG=ph&&ph.exports===ox,vh=UG?q4.Buffer:void 0,WG=vh?vh.isBuffer:void 0,qG=WG||$G;const Kr=qG;var jG="[object Arguments]",YG="[object Array]",GG="[object Boolean]",XG="[object Date]",KG="[object Error]",ZG="[object Function]",QG="[object Map]",JG="[object Number]",eX="[object Object]",tX="[object RegExp]",aX="[object Set]",rX="[object String]",nX="[object WeakMap]",cX="[object ArrayBuffer]",iX="[object DataView]",sX="[object Float32Array]",oX="[object Float64Array]",lX="[object Int8Array]",fX="[object Int16Array]",uX="[object Int32Array]",dX="[object Uint8Array]",hX="[object Uint8ClampedArray]",mX="[object Uint16Array]",pX="[object Uint32Array]",B2={};B2[sX]=B2[oX]=B2[lX]=B2[fX]=B2[uX]=B2[dX]=B2[hX]=B2[mX]=B2[pX]=!0;B2[jG]=B2[YG]=B2[cX]=B2[GG]=B2[iX]=B2[XG]=B2[KG]=B2[ZG]=B2[QG]=B2[JG]=B2[eX]=B2[tX]=B2[aX]=B2[rX]=B2[nX]=!1;function vX(e){return n6(e)&&cx(e.length)&&!!B2[Vn(e)]}function yl(e){return function(t){return e(t)}}var lx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,pr=lx&&typeof module=="object"&&module&&!module.nodeType&&module,gX=pr&&pr.exports===lx,Ki=gX&&ex.process,yX=function(){try{var e=pr&&pr.require&&pr.require("util").types;return e||Ki&&Ki.binding&&Ki.binding("util")}catch{}}();const ea=yX;var gh=ea&&ea.isTypedArray,xX=gh?yl(gh):vX;const xl=xX;var bX=Object.prototype,CX=bX.hasOwnProperty;function fx(e,t){var a=J6(e),r=!a&&sx(e),n=!a&&!r&&Kr(e),c=!a&&!r&&!n&&xl(e),i=a||r||n||c,s=i?PG(e.length,String):[],l=s.length;for(var f in e)(t||CX.call(e,f))&&!(i&&(f=="length"||n&&(f=="offset"||f=="parent")||c&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||TG(f,l)))&&s.push(f);return s}function ux(e,t){return function(a){return e(t(a))}}var MX=ux(Object.keys,Object);const zX=MX;var wX=Object.prototype,_X=wX.hasOwnProperty;function dx(e){if(!S5(e))return zX(e);var t=[];for(var a in Object(e))_X.call(e,a)&&a!="constructor"&&t.push(a);return t}function bl(e){return gl(e)?fx(e):dx(e)}function kX(e){var t=[];if(e!=null)for(var a in Object(e))t.push(a);return t}var HX=Object.prototype,VX=HX.hasOwnProperty;function LX(e){if(!Ln(e))return kX(e);var t=S5(e),a=[];for(var r in e)r=="constructor"&&(t||!VX.call(e,r))||a.push(r);return a}function Cl(e){return gl(e)?fx(e,!0):LX(e)}var SX=m6(Object,"create");const Zr=SX;function AX(){this.__data__=Zr?Zr(null):{},this.size=0}function TX(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var EX="__lodash_hash_undefined__",NX=Object.prototype,DX=NX.hasOwnProperty;function OX(e){var t=this.__data__;if(Zr){var a=t[e];return a===EX?void 0:a}return DX.call(t,e)?t[e]:void 0}var PX=Object.prototype,BX=PX.hasOwnProperty;function FX(e){var t=this.__data__;return Zr?t[e]!==void 0:BX.call(t,e)}var RX="__lodash_hash_undefined__";function IX(e,t){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=Zr&&t===void 0?RX:t,this}function c6(e){var t=-1,a=e==null?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}c6.prototype.clear=AX;c6.prototype.delete=TX;c6.prototype.get=OX;c6.prototype.has=FX;c6.prototype.set=IX;function $X(){this.__data__=[],this.size=0}function A5(e,t){for(var a=e.length;a--;)if(vl(e[a][0],t))return a;return-1}var UX=Array.prototype,WX=UX.splice;function qX(e){var t=this.__data__,a=A5(t,e);if(a<0)return!1;var r=t.length-1;return a==r?t.pop():WX.call(t,a,1),--this.size,!0}function jX(e){var t=this.__data__,a=A5(t,e);return a<0?void 0:t[a][1]}function YX(e){return A5(this.__data__,e)>-1}function GX(e,t){var a=this.__data__,r=A5(a,e);return r<0?(++this.size,a.push([e,t])):a[r][1]=t,this}function St(e){var t=-1,a=e==null?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}St.prototype.clear=$X;St.prototype.delete=qX;St.prototype.get=jX;St.prototype.has=YX;St.prototype.set=GX;var XX=m6(q4,"Map");const Qr=XX;function KX(){this.size=0,this.__data__={hash:new c6,map:new(Qr||St),string:new c6}}function ZX(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function T5(e,t){var a=e.__data__;return ZX(t)?a[typeof t=="string"?"string":"hash"]:a.map}function QX(e){var t=T5(this,e).delete(e);return this.size-=t?1:0,t}function JX(e){return T5(this,e).get(e)}function eK(e){return T5(this,e).has(e)}function tK(e,t){var a=T5(this,e),r=a.size;return a.set(e,t),this.size+=a.size==r?0:1,this}function p6(e){var t=-1,a=e==null?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}p6.prototype.clear=KX;p6.prototype.delete=QX;p6.prototype.get=JX;p6.prototype.has=eK;p6.prototype.set=tK;function hx(e,t){for(var a=-1,r=t.length,n=e.length;++a<r;)e[n+a]=t[a];return e}var aK=ux(Object.getPrototypeOf,Object);const mx=aK;function rK(){this.__data__=new St,this.size=0}function nK(e){var t=this.__data__,a=t.delete(e);return this.size=t.size,a}function cK(e){return this.__data__.get(e)}function iK(e){return this.__data__.has(e)}var sK=200;function oK(e,t){var a=this.__data__;if(a instanceof St){var r=a.__data__;if(!Qr||r.length<sK-1)return r.push([e,t]),this.size=++a.size,this;a=this.__data__=new p6(r)}return a.set(e,t),this.size=a.size,this}function gt(e){var t=this.__data__=new St(e);this.size=t.size}gt.prototype.clear=rK;gt.prototype.delete=nK;gt.prototype.get=cK;gt.prototype.has=iK;gt.prototype.set=oK;function lK(e,t){return e&&L5(t,bl(t),e)}function fK(e,t){return e&&L5(t,Cl(t),e)}var px=typeof exports=="object"&&exports&&!exports.nodeType&&exports,yh=px&&typeof module=="object"&&module&&!module.nodeType&&module,uK=yh&&yh.exports===px,xh=uK?q4.Buffer:void 0,bh=xh?xh.allocUnsafe:void 0;function dK(e,t){if(t)return e.slice();var a=e.length,r=bh?bh(a):new e.constructor(a);return e.copy(r),r}function hK(e,t){for(var a=-1,r=e==null?0:e.length,n=0,c=[];++a<r;){var i=e[a];t(i,a,e)&&(c[n++]=i)}return c}function vx(){return[]}var mK=Object.prototype,pK=mK.propertyIsEnumerable,Ch=Object.getOwnPropertySymbols,vK=Ch?function(e){return e==null?[]:(e=Object(e),hK(Ch(e),function(t){return pK.call(e,t)}))}:vx;const Ml=vK;function gK(e,t){return L5(e,Ml(e),t)}var yK=Object.getOwnPropertySymbols,xK=yK?function(e){for(var t=[];e;)hx(t,Ml(e)),e=mx(e);return t}:vx;const gx=xK;function bK(e,t){return L5(e,gx(e),t)}function yx(e,t,a){var r=t(e);return J6(e)?r:hx(r,a(e))}function z7(e){return yx(e,bl,Ml)}function CK(e){return yx(e,Cl,gx)}var MK=m6(q4,"DataView");const w7=MK;var zK=m6(q4,"Promise");const _7=zK;var wK=m6(q4,"Set");const k7=wK;var Mh="[object Map]",_K="[object Object]",zh="[object Promise]",wh="[object Set]",_h="[object WeakMap]",kh="[object DataView]",kK=h6(w7),HK=h6(Qr),VK=h6(_7),LK=h6(k7),SK=h6(M7),N0=Vn;(w7&&N0(new w7(new ArrayBuffer(1)))!=kh||Qr&&N0(new Qr)!=Mh||_7&&N0(_7.resolve())!=zh||k7&&N0(new k7)!=wh||M7&&N0(new M7)!=_h)&&(N0=function(e){var t=Vn(e),a=t==_K?e.constructor:void 0,r=a?h6(a):"";if(r)switch(r){case kK:return kh;case HK:return Mh;case VK:return zh;case LK:return wh;case SK:return _h}return t});const ta=N0;var AK=Object.prototype,TK=AK.hasOwnProperty;function EK(e){var t=e.length,a=new e.constructor(t);return t&&typeof e[0]=="string"&&TK.call(e,"index")&&(a.index=e.index,a.input=e.input),a}var NK=q4.Uint8Array;const Ec=NK;function zl(e){var t=new e.constructor(e.byteLength);return new Ec(t).set(new Ec(e)),t}function DK(e,t){var a=t?zl(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.byteLength)}var OK=/\w*$/;function PK(e){var t=new e.constructor(e.source,OK.exec(e));return t.lastIndex=e.lastIndex,t}var Hh=d0?d0.prototype:void 0,Vh=Hh?Hh.valueOf:void 0;function BK(e){return Vh?Object(Vh.call(e)):{}}function FK(e,t){var a=t?zl(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.length)}var RK="[object Boolean]",IK="[object Date]",$K="[object Map]",UK="[object Number]",WK="[object RegExp]",qK="[object Set]",jK="[object String]",YK="[object Symbol]",GK="[object ArrayBuffer]",XK="[object DataView]",KK="[object Float32Array]",ZK="[object Float64Array]",QK="[object Int8Array]",JK="[object Int16Array]",eZ="[object Int32Array]",tZ="[object Uint8Array]",aZ="[object Uint8ClampedArray]",rZ="[object Uint16Array]",nZ="[object Uint32Array]";function cZ(e,t,a){var r=e.constructor;switch(t){case GK:return zl(e);case RK:case IK:return new r(+e);case XK:return DK(e,a);case KK:case ZK:case QK:case JK:case eZ:case tZ:case aZ:case rZ:case nZ:return FK(e,a);case $K:return new r;case UK:case jK:return new r(e);case WK:return PK(e);case qK:return new r;case YK:return BK(e)}}function iZ(e){return typeof e.constructor=="function"&&!S5(e)?kG(mx(e)):{}}var sZ="[object Map]";function oZ(e){return n6(e)&&ta(e)==sZ}var Lh=ea&&ea.isMap,lZ=Lh?yl(Lh):oZ;const fZ=lZ;var uZ="[object Set]";function dZ(e){return n6(e)&&ta(e)==uZ}var Sh=ea&&ea.isSet,hZ=Sh?yl(Sh):dZ;const mZ=hZ;var pZ=1,vZ=2,gZ=4,xx="[object Arguments]",yZ="[object Array]",xZ="[object Boolean]",bZ="[object Date]",CZ="[object Error]",bx="[object Function]",MZ="[object GeneratorFunction]",zZ="[object Map]",wZ="[object Number]",Cx="[object Object]",_Z="[object RegExp]",kZ="[object Set]",HZ="[object String]",VZ="[object Symbol]",LZ="[object WeakMap]",SZ="[object ArrayBuffer]",AZ="[object DataView]",TZ="[object Float32Array]",EZ="[object Float64Array]",NZ="[object Int8Array]",DZ="[object Int16Array]",OZ="[object Int32Array]",PZ="[object Uint8Array]",BZ="[object Uint8ClampedArray]",FZ="[object Uint16Array]",RZ="[object Uint32Array]",T2={};T2[xx]=T2[yZ]=T2[SZ]=T2[AZ]=T2[xZ]=T2[bZ]=T2[TZ]=T2[EZ]=T2[NZ]=T2[DZ]=T2[OZ]=T2[zZ]=T2[wZ]=T2[Cx]=T2[_Z]=T2[kZ]=T2[HZ]=T2[VZ]=T2[PZ]=T2[BZ]=T2[FZ]=T2[RZ]=!0;T2[CZ]=T2[bx]=T2[LZ]=!1;function J8(e,t,a,r,n,c){var i,s=t&pZ,l=t&vZ,f=t&gZ;if(a&&(i=n?a(e,r,n,c):a(e)),i!==void 0)return i;if(!Ln(e))return e;var u=J6(e);if(u){if(i=EK(e),!s)return HG(e,i)}else{var d=ta(e),h=d==bx||d==MZ;if(Kr(e))return dK(e,s);if(d==Cx||d==xx||h&&!n){if(i=l||h?{}:iZ(e),!s)return l?bK(e,fK(i,e)):gK(e,lK(i,e))}else{if(!T2[d])return n?e:{};i=cZ(e,d,s)}}c||(c=new gt);var m=c.get(e);if(m)return m;c.set(e,i),mZ(e)?e.forEach(function(g){i.add(J8(g,t,a,g,e,c))}):fZ(e)&&e.forEach(function(g,y){i.set(y,J8(g,t,a,y,e,c))});var v=f?l?CK:z7:l?Cl:bl,p=u?void 0:v(e);return LG(p||e,function(g,y){p&&(y=g,g=e[y]),nx(i,y,J8(g,t,a,y,e,c))}),i}var IZ=1,$Z=4;function Pa(e){return J8(e,IZ|$Z)}var UZ="__lodash_hash_undefined__";function WZ(e){return this.__data__.set(e,UZ),this}function qZ(e){return this.__data__.has(e)}function Nc(e){var t=-1,a=e==null?0:e.length;for(this.__data__=new p6;++t<a;)this.add(e[t])}Nc.prototype.add=Nc.prototype.push=WZ;Nc.prototype.has=qZ;function jZ(e,t){for(var a=-1,r=e==null?0:e.length;++a<r;)if(t(e[a],a,e))return!0;return!1}function YZ(e,t){return e.has(t)}var GZ=1,XZ=2;function Mx(e,t,a,r,n,c){var i=a&GZ,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var f=c.get(e),u=c.get(t);if(f&&u)return f==t&&u==e;var d=-1,h=!0,m=a&XZ?new Nc:void 0;for(c.set(e,t),c.set(t,e);++d<s;){var v=e[d],p=t[d];if(r)var g=i?r(p,v,d,t,e,c):r(v,p,d,e,t,c);if(g!==void 0){if(g)continue;h=!1;break}if(m){if(!jZ(t,function(y,x){if(!YZ(m,x)&&(v===y||n(v,y,a,r,c)))return m.push(x)})){h=!1;break}}else if(!(v===p||n(v,p,a,r,c))){h=!1;break}}return c.delete(e),c.delete(t),h}function KZ(e){var t=-1,a=Array(e.size);return e.forEach(function(r,n){a[++t]=[n,r]}),a}function ZZ(e){var t=-1,a=Array(e.size);return e.forEach(function(r){a[++t]=r}),a}var QZ=1,JZ=2,eQ="[object Boolean]",tQ="[object Date]",aQ="[object Error]",rQ="[object Map]",nQ="[object Number]",cQ="[object RegExp]",iQ="[object Set]",sQ="[object String]",oQ="[object Symbol]",lQ="[object ArrayBuffer]",fQ="[object DataView]",Ah=d0?d0.prototype:void 0,Zi=Ah?Ah.valueOf:void 0;function uQ(e,t,a,r,n,c,i){switch(a){case fQ:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case lQ:return!(e.byteLength!=t.byteLength||!c(new Ec(e),new Ec(t)));case eQ:case tQ:case nQ:return vl(+e,+t);case aQ:return e.name==t.name&&e.message==t.message;case cQ:case sQ:return e==t+"";case rQ:var s=KZ;case iQ:var l=r&QZ;if(s||(s=ZZ),e.size!=t.size&&!l)return!1;var f=i.get(e);if(f)return f==t;r|=JZ,i.set(e,t);var u=Mx(s(e),s(t),r,n,c,i);return i.delete(e),u;case oQ:if(Zi)return Zi.call(e)==Zi.call(t)}return!1}var dQ=1,hQ=Object.prototype,mQ=hQ.hasOwnProperty;function pQ(e,t,a,r,n,c){var i=a&dQ,s=z7(e),l=s.length,f=z7(t),u=f.length;if(l!=u&&!i)return!1;for(var d=l;d--;){var h=s[d];if(!(i?h in t:mQ.call(t,h)))return!1}var m=c.get(e),v=c.get(t);if(m&&v)return m==t&&v==e;var p=!0;c.set(e,t),c.set(t,e);for(var g=i;++d<l;){h=s[d];var y=e[h],x=t[h];if(r)var C=i?r(x,y,h,t,e,c):r(y,x,h,e,t,c);if(!(C===void 0?y===x||n(y,x,a,r,c):C)){p=!1;break}g||(g=h=="constructor")}if(p&&!g){var b=e.constructor,M=t.constructor;b!=M&&"constructor"in e&&"constructor"in t&&!(typeof b=="function"&&b instanceof b&&typeof M=="function"&&M instanceof M)&&(p=!1)}return c.delete(e),c.delete(t),p}var vQ=1,Th="[object Arguments]",Eh="[object Array]",M8="[object Object]",gQ=Object.prototype,Nh=gQ.hasOwnProperty;function yQ(e,t,a,r,n,c){var i=J6(e),s=J6(t),l=i?Eh:ta(e),f=s?Eh:ta(t);l=l==Th?M8:l,f=f==Th?M8:f;var u=l==M8,d=f==M8,h=l==f;if(h&&Kr(e)){if(!Kr(t))return!1;i=!0,u=!1}if(h&&!u)return c||(c=new gt),i||xl(e)?Mx(e,t,a,r,n,c):uQ(e,t,l,a,r,n,c);if(!(a&vQ)){var m=u&&Nh.call(e,"__wrapped__"),v=d&&Nh.call(t,"__wrapped__");if(m||v){var p=m?e.value():e,g=v?t.value():t;return c||(c=new gt),n(p,g,a,r,c)}}return h?(c||(c=new gt),pQ(e,t,a,r,n,c)):!1}function zx(e,t,a,r,n){return e===t?!0:e==null||t==null||!n6(e)&&!n6(t)?e!==e&&t!==t:yQ(e,t,a,r,zx,n)}var xQ="[object Map]",bQ="[object Set]",CQ=Object.prototype,MQ=CQ.hasOwnProperty;function zQ(e){if(e==null)return!0;if(gl(e)&&(J6(e)||typeof e=="string"||typeof e.splice=="function"||Kr(e)||xl(e)||sx(e)))return!e.length;var t=ta(e);if(t==xQ||t==bQ)return!e.size;if(S5(e))return!dx(e).length;for(var a in e)if(MQ.call(e,a))return!1;return!0}function Dh(e,t){return zx(e,t)}var wQ=Object.defineProperty,_Q=Object.defineProperties,kQ=Object.getOwnPropertyDescriptors,Oh=Object.getOwnPropertySymbols,HQ=Object.prototype.hasOwnProperty,VQ=Object.prototype.propertyIsEnumerable,Ph=(e,t,a)=>t in e?wQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,LQ=(e,t)=>{for(var a in t||(t={}))HQ.call(t,a)&&Ph(e,a,t[a]);if(Oh)for(var a of Oh(t))VQ.call(t,a)&&Ph(e,a,t[a]);return e},SQ=(e,t)=>_Q(e,kQ(t));function AQ(e){return(e.match(/[a-zA-Z0-9]+/g)||[]).map(t=>`${t.charAt(0).toUpperCase()}${t.slice(1)}`).join("")}var g0=(e,t)=>{const a={chartData:{type:Object,required:!0},options:{type:Object,required:!1},chartId:{default:e,type:String},width:{default:400,type:Number},height:{default:400,type:Number},cssClasses:{type:String,default:""},styles:{type:Object},plugins:{type:Array,default:()=>[]},onLabelsUpdate:{type:Function},onChartUpdate:{type:Function},onChartDestroy:{type:Function},onChartRender:{type:Function}},r=AQ(e);return o.defineComponent({name:r,props:a,emits:{"labels:update":()=>!0,"chart:update":n=>!0,"chart:destroy":()=>!0,"chart:render":n=>!0},setup(n,{emit:c,expose:i}){const s=o.ref(null),l=`${n.chartId}`;let f=o.shallowRef(null);o.watch(()=>n.chartData,u,{deep:!0}),o.watch(()=>n.options,g=>{f.value&&g&&(f.value.options=Pa(g),v())},{deep:!0});function u(g){if(f.value){let y=f.value;Dh(g.labels,f.value.data.labels)||(y.data.labels=g.labels,h()),Dh(g.datasets,f.value.data.datasets)||g.datasets.forEach((x,C)=>{var b,M;if(zQ(x))y.data.datasets=[];else{const w=Pa(y.data),z=Object.keys((M=(b=w.datasets)==null?void 0:b[C])!=null?M:{}),H=Object.keys(x);z.filter(V=>V!=="_meta"&&H.indexOf(V)===-1).forEach(V=>{y.data.datasets[C]&&delete y.data.datasets[C][V]});for(const V in x){const k=Pa(x[V]);y.data.datasets[C]||(y.data.datasets[C]={}),x.hasOwnProperty(V)&&k!=null&&y&&(y.data.datasets[C][V]=k)}}}),v()}else f.value&&p(),d()}function d(){s.value?(f.value=new H4(s.value,{data:Pa(n.chartData),type:t,options:Pa(n.options),plugins:n.plugins}),m()):console.error(`Error on component ${r}, canvas cannot be rendered. Check if the render appends server-side`)}function h(){c("labels:update"),n.onLabelsUpdate&&n.onLabelsUpdate()}function m(){f.value&&(c("chart:render",f.value),n.onChartRender&&n.onChartRender(f.value))}function v(){f.value&&(f.value.update(),c("chart:update",f.value),n.onChartUpdate&&n.onChartUpdate(f.value))}function p(){f.value&&f.value.destroy(),c("chart:destroy"),n.onChartDestroy&&n.onChartDestroy()}return o.onMounted(d),o.onBeforeUnmount(()=>{f.value&&f.value.destroy()}),i({canvasRef:s,renderChart:d,chartInstance:f,canvasId:l,update:v}),()=>o.h("div",{style:SQ(LQ({maxWidth:"100%"},n.styles),{position:"relative"}),class:n.cssClasses},[o.h("canvas",{style:{maxWidth:"100%",maxHeight:"100%"},id:l,width:n.width,height:n.height,ref:s})])}})},TQ=g0("bar-chart","bar"),EQ=g0("doughnut-chart","doughnut");g0("line-chart","line");g0("pie-chart","pie");g0("polar-chart","polarArea");g0("radar-chart","radar");g0("bubble-chart","bubble");g0("scatter-chart","scatter");const NQ=o.defineComponent({__name:"PgaBarChart",props:{data:{},options:{}},setup(e){H4.register(...Jy);const t={responsive:!0};return(a,r)=>(o.openBlock(),o.createBlock(o.unref(TQ),{chartData:a.data,options:a.options||t},null,8,["chartData","options"]))}}),DQ=o.defineComponent({__name:"PgaDoughnutChart",props:{data:{},options:{}},setup(e){H4.register(...Jy);const t={responsive:!0};return(a,r)=>(o.openBlock(),o.createBlock(o.unref(EQ),{chartData:a.data,options:a.options||t},null,8,["chartData","options"]))}}),OQ={key:0},PQ={key:1,class:"barcodes-container"},BQ=o.defineComponent({__name:"PgaDisplayBarcodes",props:{barcodes:{}},setup(e){return(t,a)=>t.barcodes.length?(o.openBlock(),o.createElementBlock("div",PQ,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.barcodes,r=>(o.openBlock(),o.createElementBlock("span",{class:"barcode",key:r},[o.createVNode(Oe,{icon:"barcode"}),o.createTextVNode("   "+o.toDisplayString(r),1)]))),128))])):(o.openBlock(),o.createElementBlock("span",OQ,"-"))}});const FQ=I1(BQ,[["__scopeId","data-v-5291a54d"]]),RQ={class:"pga-display-content"},IQ=o.defineComponent({__name:"PgaDisplayContent",props:{label:{type:[String,Number,Function]}},setup(e){return(t,a)=>(o.openBlock(),o.createElementBlock("div",RQ,[o.createVNode(ye,{class:"item--label",text:t.label},null,8,["text"]),o.renderSlot(t.$slots,"default",{},void 0,!0)]))}});const $Q=I1(IQ,[["__scopeId","data-v-66c0a02b"]]),UQ=["textContent"],WQ=o.defineComponent({__name:"PgaDisplayDatetime",props:{datetime:{},withoutBackground:{type:Boolean}},setup(e){const t=e,a=o.computed(()=>t.datetime instanceof Date),r=o.computed(()=>a.value?m4(t.datetime,{format:"short",withTime:!1}):"-"),n=o.computed(()=>a.value?m4(t.datetime,{justTime:!0}):"");return(c,i)=>{const s=o.resolveDirective("tooltip");return a.value?o.withDirectives((o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(["pga-datetime",{"pga-datetime__with-background":!c.withoutBackground}])},[o.createVNode(ye,{icon:"calendar-days",text:r.value,nowrap:""},null,8,["text"])],2)),[[s,n.value]]):(o.openBlock(),o.createElementBlock("span",{key:0,textContent:o.toDisplayString(r.value)},null,8,UQ))}}});const qQ=I1(WQ,[["__scopeId","data-v-a734d7e2"]]),jQ={class:"info-card"},YQ={class:"info-card--icon-container"},GQ={class:"info-card--content-container"},XQ={class:"info-card--content"},KQ=["textContent"],ZQ=o.defineComponent({__name:"PgaDisplayInfo",props:{type:{default:"info"},info:{}},setup(e){o.useCssVars(i=>({"47ea99c5":n.value,"42bce5a0":c.value}));const t=e,a=o.computed(()=>{if(t.type==="info")return"circle-info";if(t.type==="success")return"circle-check";if(t.type==="error")return"circle-xmark";if(t.type==="warning")return"circle-exclamation"}),r=o.computed(()=>{if(t.type==="info")return"aqua";if(t.type==="success")return"success";if(t.type==="error")return"danger";if(t.type==="warning")return"warning"}),n=o.computed(()=>`var(--pga-color-${r.value}-08)`),c=o.computed(()=>`var(--pga-color-${r.value}-contrast)`);return(i,s)=>{const l=o.resolveComponent("PgaIcon");return o.openBlock(),o.createElementBlock("div",jQ,[o.createElementVNode("div",YQ,[o.createVNode(l,{class:"info-card--icon",icon:a.value},null,8,["icon"])]),o.createElementVNode("div",GQ,[o.createElementVNode("div",XQ,[i.info?(o.openBlock(),o.createElementBlock("span",{key:0,textContent:o.toDisplayString(i.info)},null,8,KQ)):o.renderSlot(i.$slots,"default",{key:1},void 0,!0)])])])}}});const QQ=I1(ZQ,[["__scopeId","data-v-c3d5b74a"]]),JQ={key:0,class:"no-items-container"},eJ={key:1,class:"no-items"},tJ=o.defineComponent({__name:"PgaDisplayNoItems",props:{items:{},label:{},icon:{default:"filter-circle-xmark"},preventDisplayIcon:{type:Boolean},isLoading:{type:Boolean}},setup(e){const t=e,a=_2("pgaDisplay"),r=o.computed(()=>{var c;return!(((c=t.items)==null?void 0:c.length)>0)}),n=o.computed(()=>t.label?t.label:a("noItemsText"));return(c,i)=>r.value?(o.openBlock(),o.createElementBlock("div",JQ,[c.isLoading?(o.openBlock(),o.createBlock(Lt,{key:0})):(o.openBlock(),o.createElementBlock("div",eJ,[c.preventDisplayIcon?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(Oe,{key:0,class:"no-items--icon",icon:c.icon},null,8,["icon"])),o.createVNode(ye,{class:"no-items--text",text:n.value},null,8,["text"])]))])):o.createCommentVNode("",!0)}});const wx=I1(tJ,[["__scopeId","data-v-f7c86b3b"]]),aJ=["textContent"],rJ={key:0,class:"price-sign"},nJ=["textContent"],cJ=o.defineComponent({__name:"PgaDisplayPrice",props:{price:{},tooltipPrice:{},maxDecimals:{},prefix:{},suffix:{},size:{default:"m"},fontSize:{},color:{default:"first"},withoutSign:{type:Boolean},withoutBackground:{type:Boolean}},setup(e){o.useCssVars(d=>({"12a72086":f.value,"58d270e6":u.value}));const t=e,{display:a}=$e(),r=o.computed(()=>t.withoutSign?!1:a.price.withSign),n=o.computed(()=>t.withoutBackground?!1:a.price.withBackground),c=o.computed(()=>t.price!==void 0),i={maxDecimals:t.maxDecimals,prefix:t.prefix,suffix:t.suffix},s=o.computed(()=>c.value?typeof t.price=="string"?t.price:Es(t.price,i):"-"),l=o.computed(()=>t.tooltipPrice===void 0?"":typeof t.tooltipPrice=="string"?t.tooltipPrice:Es(t.tooltipPrice,{...i,prefix:i.prefix||"$"})),f=o.computed(()=>{if(t.fontSize)return t.fontSize;if(t.size==="s")return"0.9rem";if(t.size==="m")return"1rem";if(t.size==="l")return"1.1rem"}),u=o.computed(()=>mn(t.color)?`var(--pga-color-${t.color})`:t.color);return(d,h)=>{const m=o.resolveDirective("tooltip");return c.value?o.withDirectives((o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(["price-container",{"price-container__with-background":n.value}])},[r.value?(o.openBlock(),o.createElementBlock("span",rJ,"$")):o.createCommentVNode("",!0),o.createElementVNode("span",{class:"price",textContent:o.toDisplayString(s.value)},null,8,nJ)],2)),[[m,l.value]]):(o.openBlock(),o.createElementBlock("span",{key:0,textContent:o.toDisplayString(s.value)},null,8,aJ))}}});const iJ=I1(cJ,[["__scopeId","data-v-7cb2d7b0"]]),sJ=o.defineComponent({__name:"PgaDisplayTime",props:{datetime:{}},setup(e){return(t,a)=>{const r=o.resolveComponent("PgaDisplayText");return o.openBlock(),o.createBlock(r,{icon:"clock",text:o.unref(sc)(t.datetime)},null,8,["text"])}}}),oJ=o.defineComponent({__name:"PgaForm",props:{withSubmitButton:{type:Boolean},submitBtnText:{},submitBtnIcon:{},isLoading:{type:Boolean},width:{default:"100%"}},emits:["submit"],setup(e,{emit:t}){o.useCssVars(n=>({f2ba1544:n.width}));const a=t,r=_2("pgaForm");return(n,c)=>(o.openBlock(),o.createElementBlock("form",{class:"pga-form",onSubmit:c[1]||(c[1]=o.withModifiers(()=>{},["prevent"]))},[o.renderSlot(n.$slots,"default",{},void 0,!0),n.withSubmitButton||n.submitBtnText?(o.openBlock(),o.createBlock(L2,{key:0,class:"form--submit-btn",type:"submit",text:n.submitBtnText||o.unref(r)("submitBtn"),icon:n.submitBtnIcon||"save",variant:"filled",isLoading:n.isLoading,onClick:c[0]||(c[0]=i=>a("submit"))},null,8,["text","icon","isLoading"])):o.createCommentVNode("",!0)],32))}});const _x=I1(oJ,[["__scopeId","data-v-fad80058"]]),lJ=o.defineComponent({__name:"PgaFormRow",props:{breakRow:{type:Boolean}},setup(e){return(t,a)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["pga-form-row",{"pga-form-row__break-row":t.breakRow}])},[o.renderSlot(t.$slots,"default")],2))}});const fJ=o.defineComponent({__name:"PgaFormSubtitle",props:{title:{type:[String,Number,Function]}},setup(e){return(t,a)=>{const r=o.resolveComponent("PgaDisplayText");return o.openBlock(),o.createBlock(r,{class:"pga-form-subtitle",text:t.title},null,8,["text"])}}});const uJ=I1(fJ,[["__scopeId","data-v-488b1ab9"]]),dJ=o.defineComponent({__name:"PgaFormTitle",props:{title:{type:[String,Number,Function]}},setup(e){return(t,a)=>{const r=o.resolveComponent("PgaDisplayText");return o.openBlock(),o.createBlock(r,{class:"pga-form-title",text:t.title},null,8,["text"])}}});const hJ=I1(dJ,[["__scopeId","data-v-46e35803"]]),mJ={key:0,class:"input-group--header"},pJ={key:0,class:"header--label"},vJ={key:1,class:"header--required-label"},gJ={key:2,class:"header--optional-label"},yJ=["innerHTML"],xJ={key:2,class:"input-group--errors"},bJ=["textContent"],CJ=o.defineComponent({__name:"PgaInputGroup",props:{label:{},withRequiredLabel:{type:Boolean},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},description:{},errors:{},fitContent:{type:Boolean},grow:{}},setup(e){o.useCssVars(c=>({"26eab7ff":c.grow}));const t=e,a=_2("pgaForm"),r=o.computed(()=>t.label||t.withLabelSpace),n=o.computed(()=>t.label||" ");return(c,i)=>{const s=o.resolveComponent("PgaIcon");return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["input-group",{"input-group__fit-content":c.fitContent,"input-group__with-flex-grow":c.grow!==void 0}])},[r.value||c.withRequiredLabel||c.withOptionalLabel?(o.openBlock(),o.createElementBlock("div",mJ,[r.value?(o.openBlock(),o.createElementBlock("label",pJ,o.toDisplayString(n.value),1)):o.createCommentVNode("",!0),c.withRequiredLabel?(o.openBlock(),o.createElementBlock("span",vJ,o.toDisplayString(o.unref(a)("requiredLabel")),1)):o.createCommentVNode("",!0),c.withOptionalLabel?(o.openBlock(),o.createElementBlock("span",gJ,o.toDisplayString(o.unref(a)("optionalLabel")),1)):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),o.renderSlot(c.$slots,"default",{},void 0,!0),c.description?(o.openBlock(),o.createElementBlock("span",{key:1,class:"input-group--description",innerHTML:c.description},null,8,yJ)):o.createCommentVNode("",!0),c.errors?(o.openBlock(),o.createElementBlock("div",xJ,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(c.errors,(l,f)=>(o.openBlock(),o.createElementBlock("div",{key:f,class:"errors--error"},[o.createVNode(s,{class:"error--icon",icon:["fas","triangle-exclamation"]}),o.createElementVNode("span",{class:"error--message",textContent:o.toDisplayString(l.$message)},null,8,bJ)]))),128))])):o.createCommentVNode("",!0)],2)}}});const A3=I1(CJ,[["__scopeId","data-v-14d41e2a"]]);function Bh(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),a.push.apply(a,r)}return a}function Rt(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?Bh(Object(a),!0).forEach(function(r){MJ(e,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Bh(Object(a)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))})}return e}function MJ(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Fh(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return Object.keys(e).reduce((a,r)=>(t.includes(r)||(a[r]=o.unref(e[r])),a),{})}function Dc(e){return typeof e=="function"}function zJ(e){return o.isReactive(e)||o.isReadonly(e)}function kx(e,t,a){let r=e;const n=t.split(".");for(let c=0;c<n.length;c++){if(!r[n[c]])return a;r=r[n[c]]}return r}function Qi(e,t,a){return o.computed(()=>e.some(r=>kx(t,r,{[a]:!1})[a]))}function Rh(e,t,a){return o.computed(()=>e.reduce((r,n)=>{const c=kx(t,n,{[a]:!1})[a]||[];return r.concat(c)},[]))}function Hx(e,t,a,r){return e.call(r,o.unref(t),o.unref(a),r)}function Vx(e){return e.$valid!==void 0?!e.$valid:!e}function wJ(e,t,a,r,n,c,i){let{$lazy:s,$rewardEarly:l}=n,f=arguments.length>7&&arguments[7]!==void 0?arguments[7]:[],u=arguments.length>8?arguments[8]:void 0,d=arguments.length>9?arguments[9]:void 0,h=arguments.length>10?arguments[10]:void 0;const m=o.ref(!!r.value),v=o.ref(0);a.value=!1;const p=o.watch([t,r].concat(f,h),()=>{if(s&&!r.value||l&&!d.value&&!a.value)return;let g;try{g=Hx(e,t,u,i)}catch(y){g=Promise.reject(y)}v.value++,a.value=!!v.value,m.value=!1,Promise.resolve(g).then(y=>{v.value--,a.value=!!v.value,c.value=y,m.value=Vx(y)}).catch(y=>{v.value--,a.value=!!v.value,c.value=y,m.value=!0})},{immediate:!0,deep:typeof t=="object"});return{$invalid:m,$unwatch:p}}function _J(e,t,a,r,n,c,i,s){let{$lazy:l,$rewardEarly:f}=r;const u=()=>({}),d=o.computed(()=>{if(l&&!a.value||f&&!s.value)return!1;let h=!0;try{const m=Hx(e,t,i,c);n.value=m,h=Vx(m)}catch(m){n.value=m}return h});return{$unwatch:u,$invalid:d}}function kJ(e,t,a,r,n,c,i,s,l,f,u){const d=o.ref(!1),h=e.$params||{},m=o.ref(null);let v,p;e.$async?{$invalid:v,$unwatch:p}=wJ(e.$validator,t,d,a,r,m,n,e.$watchTargets,l,f,u):{$invalid:v,$unwatch:p}=_J(e.$validator,t,a,r,m,n,l,f);const g=e.$message;return{$message:Dc(g)?o.computed(()=>g(Fh({$pending:d,$invalid:v,$params:Fh(h),$model:t,$response:m,$validator:c,$propertyPath:s,$property:i}))):g||"",$params:h,$pending:d,$invalid:v,$response:m,$unwatch:p}}function HJ(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=o.unref(e),a=Object.keys(t),r={},n={},c={};let i=null;return a.forEach(s=>{const l=t[s];switch(!0){case Dc(l.$validator):r[s]=l;break;case Dc(l):r[s]={$validator:l};break;case s==="$validationGroups":i=l;break;case s.startsWith("$"):c[s]=l;break;default:n[s]=l}}),{rules:r,nestedValidators:n,config:c,validationGroups:i}}const VJ="__root";function LJ(e,t,a,r,n,c,i,s,l){const f=Object.keys(e),u=r.get(n,e),d=o.ref(!1),h=o.ref(!1),m=o.ref(0);if(u){if(!u.$partial)return u;u.$unwatch(),d.value=u.$dirty.value}const v={$dirty:d,$path:n,$touch:()=>{d.value||(d.value=!0)},$reset:()=>{d.value&&(d.value=!1)},$commit:()=>{}};return f.length?(f.forEach(p=>{v[p]=kJ(e[p],t,v.$dirty,c,i,p,a,n,l,h,m)}),v.$externalResults=o.computed(()=>s.value?[].concat(s.value).map((p,g)=>({$propertyPath:n,$property:a,$validator:"$externalResults",$uid:`${n}-externalResult-${g}`,$message:p,$params:{},$response:null,$pending:!1})):[]),v.$invalid=o.computed(()=>{const p=f.some(g=>o.unref(v[g].$invalid));return h.value=p,!!v.$externalResults.value.length||p}),v.$pending=o.computed(()=>f.some(p=>o.unref(v[p].$pending))),v.$error=o.computed(()=>v.$dirty.value?v.$pending.value||v.$invalid.value:!1),v.$silentErrors=o.computed(()=>f.filter(p=>o.unref(v[p].$invalid)).map(p=>{const g=v[p];return o.reactive({$propertyPath:n,$property:a,$validator:p,$uid:`${n}-${p}`,$message:g.$message,$params:g.$params,$response:g.$response,$pending:g.$pending})}).concat(v.$externalResults.value)),v.$errors=o.computed(()=>v.$dirty.value?v.$silentErrors.value:[]),v.$unwatch=()=>f.forEach(p=>{v[p].$unwatch()}),v.$commit=()=>{h.value=!0,m.value=Date.now()},r.set(n,e,v),v):(u&&r.set(n,e,v),v)}function SJ(e,t,a,r,n,c,i){const s=Object.keys(e);return s.length?s.reduce((l,f)=>(l[f]=H7({validations:e[f],state:t,key:f,parentKey:a,resultsCache:r,globalConfig:n,instance:c,externalResults:i}),l),{}):{}}function AJ(e,t,a){const r=o.computed(()=>[t,a].filter(v=>v).reduce((v,p)=>v.concat(Object.values(o.unref(p))),[])),n=o.computed({get(){return e.$dirty.value||(r.value.length?r.value.every(v=>v.$dirty):!1)},set(v){e.$dirty.value=v}}),c=o.computed(()=>{const v=o.unref(e.$silentErrors)||[],p=r.value.filter(g=>(o.unref(g).$silentErrors||[]).length).reduce((g,y)=>g.concat(...y.$silentErrors),[]);return v.concat(p)}),i=o.computed(()=>{const v=o.unref(e.$errors)||[],p=r.value.filter(g=>(o.unref(g).$errors||[]).length).reduce((g,y)=>g.concat(...y.$errors),[]);return v.concat(p)}),s=o.computed(()=>r.value.some(v=>v.$invalid)||o.unref(e.$invalid)||!1),l=o.computed(()=>r.value.some(v=>o.unref(v.$pending))||o.unref(e.$pending)||!1),f=o.computed(()=>r.value.some(v=>v.$dirty)||r.value.some(v=>v.$anyDirty)||n.value),u=o.computed(()=>n.value?l.value||s.value:!1),d=()=>{e.$touch(),r.value.forEach(v=>{v.$touch()})},h=()=>{e.$commit(),r.value.forEach(v=>{v.$commit()})},m=()=>{e.$reset(),r.value.forEach(v=>{v.$reset()})};return r.value.length&&r.value.every(v=>v.$dirty)&&d(),{$dirty:n,$errors:i,$invalid:s,$anyDirty:f,$error:u,$pending:l,$touch:d,$reset:m,$silentErrors:c,$commit:h}}function H7(e){let{validations:t,state:a,key:r,parentKey:n,childResults:c,resultsCache:i,globalConfig:s={},instance:l,externalResults:f}=e;const u=n?`${n}.${r}`:r,{rules:d,nestedValidators:h,config:m,validationGroups:v}=HJ(t),p=Rt(Rt({},s),m),g=r?o.computed(()=>{const G=o.unref(a);return G?o.unref(G[r]):void 0}):a,y=Rt({},o.unref(f)||{}),x=o.computed(()=>{const G=o.unref(f);return r?G?o.unref(G[r]):void 0:G}),C=LJ(d,g,r,i,u,p,l,x,a),b=SJ(h,g,u,i,p,l,x),M={};v&&Object.entries(v).forEach(G=>{let[B,T]=G;M[B]={$invalid:Qi(T,b,"$invalid"),$error:Qi(T,b,"$error"),$pending:Qi(T,b,"$pending"),$errors:Rh(T,b,"$errors"),$silentErrors:Rh(T,b,"$silentErrors")}});const{$dirty:w,$errors:z,$invalid:H,$anyDirty:A,$error:V,$pending:k,$touch:_,$reset:N,$silentErrors:q,$commit:S}=AJ(C,b,c),O=r?o.computed({get:()=>o.unref(g),set:G=>{w.value=!0;const B=o.unref(a),T=o.unref(f);T&&(T[r]=y[r]),o.isRef(B[r])?B[r].value=G:B[r]=G}}):null;r&&p.$autoDirty&&o.watch(g,()=>{w.value||_();const G=o.unref(f);G&&(G[r]=y[r])},{flush:"sync"});async function U(){return _(),p.$rewardEarly&&(S(),await o.nextTick()),await o.nextTick(),new Promise(G=>{if(!k.value)return G(!H.value);const B=o.watch(k,()=>{G(!H.value),B()})})}function J(G){return(c.value||{})[G]}function Y(){o.isRef(f)?f.value=y:Object.keys(y).length===0?Object.keys(f).forEach(G=>{delete f[G]}):Object.assign(f,y)}return o.reactive(Rt(Rt(Rt({},C),{},{$model:O,$dirty:w,$error:V,$errors:z,$invalid:H,$anyDirty:A,$pending:k,$touch:_,$reset:N,$path:u||VJ,$silentErrors:q,$validate:U,$commit:S},c&&{$getResultsForChild:J,$clearExternalResults:Y,$validationGroups:M}),b))}class TJ{constructor(){this.storage=new Map}set(t,a,r){this.storage.set(t,{rules:a,result:r})}checkRulesValidity(t,a,r){const n=Object.keys(r),c=Object.keys(a);return c.length!==n.length||!c.every(s=>n.includes(s))?!1:c.every(s=>a[s].$params?Object.keys(a[s].$params).every(l=>o.unref(r[s].$params[l])===o.unref(a[s].$params[l])):!0)}get(t,a){const r=this.storage.get(t);if(!r)return;const{rules:n,result:c}=r,i=this.checkRulesValidity(t,a,n),s=c.$unwatch?c.$unwatch:()=>({});return i?c:{$dirty:c.$dirty,$partial:!0,$unwatch:s}}}const ec={COLLECT_ALL:!0,COLLECT_NONE:!1},Ih=Symbol("vuelidate#injectChildResults"),$h=Symbol("vuelidate#removeChildResults");function EJ(e){let{$scope:t,instance:a}=e;const r={},n=o.ref([]),c=o.computed(()=>n.value.reduce((u,d)=>(u[d]=o.unref(r[d]),u),{}));function i(u,d){let{$registerAs:h,$scope:m,$stopPropagation:v}=d;v||t===ec.COLLECT_NONE||m===ec.COLLECT_NONE||t!==ec.COLLECT_ALL&&t!==m||(r[h]=u,n.value.push(h))}a.__vuelidateInjectInstances=[].concat(a.__vuelidateInjectInstances||[],i);function s(u){n.value=n.value.filter(d=>d!==u),delete r[u]}a.__vuelidateRemoveInstances=[].concat(a.__vuelidateRemoveInstances||[],s);const l=o.inject(Ih,[]);o.provide(Ih,a.__vuelidateInjectInstances);const f=o.inject($h,[]);return o.provide($h,a.__vuelidateRemoveInstances),{childResults:c,sendValidationResultsToParent:l,removeValidationResultsFromParent:f}}function Lx(e){return new Proxy(e,{get(t,a){return typeof t[a]=="object"?Lx(t[a]):o.computed(()=>t[a])}})}let Uh=0;function NJ(e,t){var a;let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};arguments.length===1&&(r=e,e=void 0,t=void 0);let{$registerAs:n,$scope:c=ec.COLLECT_ALL,$stopPropagation:i,$externalResults:s,currentVueInstance:l}=r;const f=l||((a=o.getCurrentInstance())===null||a===void 0?void 0:a.proxy),u=f?f.$options:{};n||(Uh+=1,n=`_vuelidate_${Uh}`);const d=o.ref({}),h=new TJ,{childResults:m,sendValidationResultsToParent:v,removeValidationResultsFromParent:p}=f?EJ({$scope:c,instance:f}):{childResults:o.ref({})};if(!e&&u.validations){const g=u.validations;t=o.ref({}),o.onBeforeMount(()=>{t.value=f,o.watch(()=>Dc(g)?g.call(t.value,new Lx(t.value)):g,y=>{d.value=H7({validations:y,state:t,childResults:m,resultsCache:h,globalConfig:r,instance:f,externalResults:s||f.vuelidateExternalResults})},{immediate:!0})}),r=u.validationsConfig||r}else{const g=o.isRef(e)||zJ(e)?e:o.reactive(e||{});o.watch(g,y=>{d.value=H7({validations:y,state:t,childResults:m,resultsCache:h,globalConfig:r,instance:f??{},externalResults:s})},{immediate:!0})}return f&&(v.forEach(g=>g(d,{$registerAs:n,$scope:c,$stopPropagation:i})),o.onBeforeUnmount(()=>p.forEach(g=>g(n)))),o.computed(()=>Rt(Rt({},o.unref(d.value)),m.value))}function Wh(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),a.push.apply(a,r)}return a}function Jr(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?Wh(Object(a),!0).forEach(function(r){DJ(e,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Wh(Object(a)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))})}return e}function DJ(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Oc(e){return typeof e=="function"}function V7(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function E5(e){return Oc(e.$validator)?Jr({},e):{$validator:e}}function Sx(e){return typeof e=="object"?e.$valid:e}function Ax(e){return e.$validator||e}function OJ(e,t){if(!V7(e))throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof e}`);if(!V7(t)&&!Oc(t))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const a=E5(t);return a.$params=Jr(Jr({},a.$params||{}),e),a}function PJ(e,t){if(!Oc(e)&&typeof o.unref(e)!="string")throw new Error(`[@vuelidate/validators]: First parameter to "withMessage" should be string or a function returning a string, provided ${typeof e}`);if(!V7(t)&&!Oc(t))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const a=E5(t);return a.$message=e,a}function BJ(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const a=E5(e);return Jr(Jr({},a),{},{$async:!0,$watchTargets:t})}function FJ(e){return{$validator(t){for(var a=arguments.length,r=new Array(a>1?a-1:0),n=1;n<a;n++)r[n-1]=arguments[n];return o.unref(t).reduce((c,i,s)=>{const l=Object.entries(i).reduce((f,u)=>{let[d,h]=u;const m=e[d]||{},v=Object.entries(m).reduce((p,g)=>{let[y,x]=g;const b=Ax(x).call(this,h,i,s,...r),M=Sx(b);if(p.$data[y]=b,p.$data.$invalid=!M||!!p.$data.$invalid,p.$data.$error=p.$data.$invalid,!M){let w=x.$message||"";const z=x.$params||{};typeof w=="function"&&(w=w({$pending:!1,$invalid:!M,$params:z,$model:h,$response:b})),p.$errors.push({$property:d,$message:w,$params:z,$response:b,$model:h,$pending:!1,$validator:y})}return{$valid:p.$valid&&M,$data:p.$data,$errors:p.$errors}},{$valid:!0,$data:{},$errors:[]});return f.$data[d]=v.$data,f.$errors[d]=v.$errors,{$valid:f.$valid&&v.$valid,$data:f.$data,$errors:f.$errors}},{$valid:!0,$data:{},$errors:{}});return{$valid:c.$valid&&l.$valid,$data:c.$data.concat(l.$data),$errors:c.$errors.concat(l.$errors)}},{$valid:!0,$data:[],$errors:[]})},$message:t=>{let{$response:a}=t;return a?a.$errors.map(r=>Object.values(r).map(n=>n.map(c=>c.$message)).reduce((n,c)=>n.concat(c),[])):[]}}}const Sn=e=>{if(e=o.unref(e),Array.isArray(e))return!!e.length;if(e==null)return!1;if(e===!1)return!0;if(e instanceof Date)return!isNaN(e.getTime());if(typeof e=="object"){for(let t in e)return!0;return!1}return!!String(e).length},wl=e=>(e=o.unref(e),Array.isArray(e)?e.length:typeof e=="object"?Object.keys(e).length:String(e).length);function y0(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return r=>(r=o.unref(r),!Sn(r)||t.every(n=>(n.lastIndex=0,n.test(r))))}var en=Object.freeze({__proto__:null,forEach:FJ,len:wl,normalizeValidatorObject:E5,regex:y0,req:Sn,unwrap:o.unref,unwrapNormalizedValidator:Ax,unwrapValidatorResponse:Sx,withAsync:BJ,withMessage:PJ,withParams:OJ});y0(/^[a-zA-Z]*$/);y0(/^[a-zA-Z0-9]*$/);y0(/^\d*(\.\d+)?$/);const RJ=/^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i;y0(RJ);function IJ(e){return t=>!Sn(t)||wl(t)<=o.unref(e)}function $J(e){return{$validator:IJ(e),$message:t=>{let{$params:a}=t;return`The maximum length allowed is ${a.max}`},$params:{max:e,type:"maxLength"}}}function UJ(e){return t=>!Sn(t)||wl(t)>=o.unref(e)}function WJ(e){return{$validator:UJ(e),$message:t=>{let{$params:a}=t;return`This field should be at least ${a.min} characters long`},$params:{min:e,type:"minLength"}}}function qJ(e){return typeof e=="string"&&(e=e.trim()),Sn(e)}var jJ={$validator:qJ,$message:"Value is required",$params:{type:"required"}};const YJ=/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i;y0(YJ);var GJ=y0(/(^[0-9]*$)|(^-[0-9]+$)/),XJ={$validator:GJ,$message:"Value is not an integer",$params:{type:"integer"}};y0(/^[-]?\d*(\.\d+)?$/);const N5=_2("validations"),L7=en.withMessage(()=>N5("requiredRuleError"),jJ),S7=e=>Tx("minLength",e),A7=e=>Tx("maxLength",e),KJ=en.withMessage(()=>N5("integerRuleError"),XJ),ZJ=e=>D5("lessEqual",e),QJ=e=>D5("greaterEqual",e),JJ=e=>D5("lessThan",e),e11=e=>D5("greaterThan",e);function Tx(e,t){const a={minLength:WJ,maxLength:$J};return en.withMessage(()=>N5(`${e}RuleError`,{length:t}),a[e](t))}function D5(e,t){const a={lessEqual:r=>r<=t,greaterEqual:r=>r>=t,lessThan:r=>r<t,greaterThan:r=>r>t};return en.withMessage(()=>N5(`${e}RuleError`,{number:t}),en.withParams({},r=>typeof r!="number"?!0:a[e](r)))}const t11=o.defineComponent({__name:"PgaInputRightButton",props:{icon:{},withBackground:{type:Boolean}},setup(e){o.useCssVars(a=>({d66bfd04:o.unref(t).input.height,"66ebfdd4":o.unref(t).input.iconWidth,"9d32e216":o.unref(t).input.borderRadius,"1936f71a":o.unref(t).input.backgroundColorFocus,"19536b7e":o.unref(t).input.backgroundColorHover}));const{form:t}=$e();return(a,r)=>(o.openBlock(),o.createBlock(L2,{class:o.normalizeClass(["input-right-button",{"input-right-button__with-background":a.withBackground}]),variant:"flat",icon:a.icon,tabindex:"-1"},null,8,["class","icon"]))}});const Pc=I1(t11,[["__scopeId","data-v-1088e7d4"]]),a11={class:"input-container"},r11={class:"input-content"},n11=["type","placeholder","autofocus","disabled"],Ji="",c11=o.defineComponent({__name:"PgaInput",props:o.mergeModels({type:{default:"text"},integer:{type:Boolean},placeholder:{},label:{},withRequiredLabel:{type:Boolean},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},description:{},errors:{},autofocus:{type:Boolean},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:o.mergeModels(["change","enter","valueCleared"],["update:modelValue"]),setup(e,{expose:t,emit:a}){o.useCssVars(b=>({"01b22bfc":o.unref(i).input.height,"56ac0848":o.unref(i).input.padding,"6b11525b":o.unref(i).input.paddingWithIcon,"8bf72e3c":o.unref(i).input.borderColor,c14f3a1a:o.unref(i).input.borderRadius,"2986bba0":o.unref(i).input.backgroundColor,"3752838a":o.unref(i).input.colorFocus,"013c8b88":o.unref(i).input.backgroundColorDisabled,"5f0dfe45":o.unref(i).input.placeholderColor}));const r=o.useModel(e,"modelValue"),n=e,c=a;t({focus:h});const{form:i}=$e(),s=o.ref(),l=o.ref(Ji),f=o.ref(!1),u=o.computed(()=>n.type==="password"),d=o.computed(()=>u.value?!1:!!(!n.disabled&&l.value));o.watch(r,b=>x(b),{immediate:!0});function h(){var b;(b=s.value)==null||b.focus()}function m(){n.type==="number"&&!l.value&&(l.value=Ji)}function v(){n.type==="number"&&!l.value&&(l.value=y())}function p(){C(Ji),c("valueCleared")}function g(b){return b===""?null:n.type==="number"&&n.integer&&typeof b=="number"?Math.round(b):b}function y(b){const M=typeof b>"u"?r.value:b;return M===null?"":M}function x(b){const M=g(b);return r.value=M,l.value=y(M),M}function C(b){const M=x(b);c("change",M)}return(b,M)=>(o.openBlock(),o.createBlock(A3,{label:b.label,withRequiredLabel:b.withRequiredLabel,withOptionalLabel:b.withOptionalLabel,withLabelSpace:b.withLabelSpace,description:b.description,errors:b.errors,grow:b.grow},{default:o.withCtx(()=>[o.createElementVNode("div",a11,[o.createElementVNode("div",r11,[o.withDirectives(o.createElementVNode("input",{ref_key:"inputRef",ref:s,"onUpdate:modelValue":M[0]||(M[0]=w=>l.value=w),class:o.normalizeClass(["input",{input__disabled:b.disabled}]),type:f.value?"text":b.type,placeholder:o.unref(pt)(b.placeholder),autofocus:b.autofocus,disabled:b.disabled,onInput:M[1]||(M[1]=w=>C(l.value)),onKeyup:M[2]||(M[2]=o.withKeys(w=>c("enter"),["enter"])),onFocus:M[3]||(M[3]=w=>m()),onBlur:M[4]||(M[4]=w=>v())},null,42,n11),[[o.vModelDynamic,l.value]]),u.value?(o.openBlock(),o.createBlock(Pc,{key:0,icon:f.value?"eye-slash":"eye",withBackground:"",onClick:M[5]||(M[5]=w=>f.value=!f.value)},null,8,["icon"])):d.value?(o.openBlock(),o.createBlock(Pc,{key:1,icon:"xmark",onClick:M[6]||(M[6]=w=>p())})):o.createCommentVNode("",!0)]),o.renderSlot(b.$slots,"labelRight",{},void 0,!0)])]),_:3},8,["label","withRequiredLabel","withOptionalLabel","withLabelSpace","description","errors","grow"]))}});const Bc=I1(c11,[["__scopeId","data-v-e3a85d2a"]]),i11={class:"login-form-container"},s11={class:"user-icon-container"},o11=o.defineComponent({__name:"PgaLoginForm",setup(e){class t{constructor(){g1(this,"username","");g1(this,"password","")}}const a=Z2.getConfig(),r=_2("pgaForm"),n=Hr.useRoute(),c={username:{requiredRule:L7,minLengthRule:S7(8),maxLengthRule:A7(a.stringLengths.short)},password:{requiredRule:L7,minLengthRule:S7(8),maxLengthRule:A7(a.stringLengths.short)}},i=o.ref(new t),s=NJ(c,i),l=o.ref(!1);async function f(){if(!await s.value.$validate())return;const u={isLoadingRef:l,redirectToName:n.query.redirectTo};Ep($3().currentRouteType,i.value,u)}return(u,d)=>(o.openBlock(),o.createElementBlock("div",i11,[o.createVNode(_x,{class:"login-form",submitBtnText:o.unref(r)("loginBtn"),submitBtnIcon:"right-to-bracket",isLoading:l.value,onSubmit:d[2]||(d[2]=h=>f())},{default:o.withCtx(()=>[o.createElementVNode("div",s11,[o.createVNode(Oe,{class:"user-icon",icon:"user"})]),o.createVNode(Bc,{modelValue:i.value.username,"onUpdate:modelValue":d[0]||(d[0]=h=>i.value.username=h),label:o.unref(r)("usernameLabel"),errors:o.unref(s).username.$errors,disabled:l.value},null,8,["modelValue","label","errors","disabled"]),o.createVNode(Bc,{modelValue:i.value.password,"onUpdate:modelValue":d[1]||(d[1]=h=>i.value.password=h),type:"password",label:o.unref(r)("passwordLabel"),errors:o.unref(s).password.$errors,disabled:l.value},null,8,["modelValue","label","errors","disabled"])]),_:1},8,["submitBtnText","isLoading"])]))}});const l11=I1(o11,[["__scopeId","data-v-f0930bcf"]]),f11={class:"pga-checkbox"},u11=["textContent"],d11=o.defineComponent({__name:"PgaCheckbox",props:o.mergeModels({label:{}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=o.useModel(e,"modelValue");return(a,r)=>(o.openBlock(),o.createElementBlock("label",f11,[o.withDirectives(o.createElementVNode("input",{"onUpdate:modelValue":r[0]||(r[0]=n=>t.value=n),type:"checkbox"},null,512),[[o.vModelCheckbox,t.value]]),a.label?(o.openBlock(),o.createElementBlock("span",{key:0,class:"checkbox--label",textContent:o.toDisplayString(a.label)},null,8,u11)):o.createCommentVNode("",!0)]))}});const h11=I1(d11,[["__scopeId","data-v-89f11c66"]]),m11={class:"colors-container"},p11=o.defineComponent({__name:"PgaColorSelector",props:o.mergeModels({label:{},withRequiredLabel:{type:Boolean},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},description:{},errors:{},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){o.useCssVars(n=>({"1d17ba59":o.unref(a).input.padding,ff76be42:o.unref(a).input.borderColor,bdc1aad4:o.unref(a).input.borderRadius}));const t=o.useModel(e,"modelValue"),{form:a}=$e();function r(n){var c;return((c=t.value)==null?void 0:c.toLowerCase())===n.toLowerCase()}return(n,c)=>(o.openBlock(),o.createBlock(A3,{label:n.label,withRequiredLabel:n.withRequiredLabel,withOptionalLabel:n.withOptionalLabel,withLabelSpace:n.withLabelSpace,description:n.description,errors:n.errors,grow:n.grow},{default:o.withCtx(()=>[o.createElementVNode("div",m11,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(Vp),i=>(o.openBlock(),o.createBlock(L2,{key:i,variant:r(i)?"outlined":"flat",color:r(i)?"primary":"first",disabled:n.disabled,onClick:s=>t.value=i},{default:o.withCtx(()=>[o.createVNode(Qg,{color:i},null,8,["color"])]),_:2},1032,["variant","color","disabled","onClick"]))),128))])]),_:1},8,["label","withRequiredLabel","withOptionalLabel","withLabelSpace","description","errors","grow"]))}});const v11=I1(p11,[["__scopeId","data-v-76761025"]]);function Y1(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function z2(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function J3(e,t){const a=Y1(e);return isNaN(t)?z2(e,NaN):(t&&a.setDate(a.getDate()+t),a)}function f4(e,t){const a=Y1(e);if(isNaN(t))return z2(e,NaN);if(!t)return a;const r=a.getDate(),n=z2(e,a.getTime());n.setMonth(a.getMonth()+t+1,0);const c=n.getDate();return r>=c?n:(a.setFullYear(n.getFullYear(),n.getMonth(),r),a)}function Ex(e,t){const{years:a=0,months:r=0,weeks:n=0,days:c=0,hours:i=0,minutes:s=0,seconds:l=0}=t,f=Y1(e),u=r||a?f4(f,r+a*12):f,d=c||n?J3(u,c+n*7):u,h=s+i*60,v=(l+h*60)*1e3;return z2(e,d.getTime()+v)}function g11(e,t){const a=+Y1(e);return z2(e,a+t)}const Nx=6048e5,y11=864e5,x11=6e4,Dx=36e5,b11=1e3;function C11(e,t){return g11(e,t*Dx)}let M11={};function v6(){return M11}function y4(e,t){var s,l,f,u;const a=v6(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??a.weekStartsOn??((u=(f=a.locale)==null?void 0:f.options)==null?void 0:u.weekStartsOn)??0,n=Y1(e),c=n.getDay(),i=(c<r?7:0)+c-r;return n.setDate(n.getDate()-i),n.setHours(0,0,0,0),n}function aa(e){return y4(e,{weekStartsOn:1})}function Ox(e){const t=Y1(e),a=t.getFullYear(),r=z2(e,0);r.setFullYear(a+1,0,4),r.setHours(0,0,0,0);const n=aa(r),c=z2(e,0);c.setFullYear(a,0,4),c.setHours(0,0,0,0);const i=aa(c);return t.getTime()>=n.getTime()?a+1:t.getTime()>=i.getTime()?a:a-1}function qh(e){const t=Y1(e);return t.setHours(0,0,0,0),t}function Fc(e){const t=Y1(e),a=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return a.setUTCFullYear(t.getFullYear()),+e-+a}function Px(e,t){const a=qh(e),r=qh(t),n=+a-Fc(a),c=+r-Fc(r);return Math.round((n-c)/y11)}function z11(e){const t=Ox(e),a=z2(e,0);return a.setFullYear(t,0,4),a.setHours(0,0,0,0),aa(a)}function w11(e,t){const a=t*3;return f4(e,a)}function _l(e,t){return f4(e,t*12)}function Bx(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function vr(e){if(!Bx(e)&&typeof e!="number")return!1;const t=Y1(e);return!isNaN(Number(t))}function jh(e){const t=Y1(e);return Math.trunc(t.getMonth()/3)+1}function Fx(e,t){const a=Y1(e.start),r=Y1(e.end);let n=+a>+r;const c=n?+a:+r,i=n?r:a;i.setHours(0,0,0,0);let s=(t==null?void 0:t.step)??1;if(!s)return[];s<0&&(s=-s,n=!n);const l=[];for(;+i<=c;)l.push(Y1(i)),i.setDate(i.getDate()+s),i.setHours(0,0,0,0);return n?l.reverse():l}function $0(e){const t=Y1(e),a=t.getMonth(),r=a-a%3;return t.setMonth(r,1),t.setHours(0,0,0,0),t}function _11(e,t){const a=Y1(e.start),r=Y1(e.end);let n=+a>+r;const c=n?+$0(a):+$0(r);let i=$0(n?r:a),s=(t==null?void 0:t.step)??1;if(!s)return[];s<0&&(s=-s,n=!n);const l=[];for(;+i<=c;)l.push(Y1(i)),i=w11(i,s);return n?l.reverse():l}function Rx(e){const t=Y1(e),a=t.getFullYear();return t.setFullYear(a+1,0,0),t.setHours(23,59,59,999),t}function kl(e){const t=Y1(e),a=z2(e,0);return a.setFullYear(t.getFullYear(),0,1),a.setHours(0,0,0,0),a}function Ix(e,t){var s,l,f,u;const a=v6(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??a.weekStartsOn??((u=(f=a.locale)==null?void 0:f.options)==null?void 0:u.weekStartsOn)??0,n=Y1(e),c=n.getDay(),i=(c<r?-7:0)+6-(c-r);return n.setDate(n.getDate()+i),n.setHours(23,59,59,999),n}function Yh(e){const t=Y1(e),a=t.getMonth(),r=a-a%3+3;return t.setMonth(r,0),t.setHours(23,59,59,999),t}const k11={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},H11=(e,t,a)=>{let r;const n=k11[e];return typeof n=="string"?r=n:t===1?r=n.one:r=n.other.replace("{{count}}",t.toString()),a!=null&&a.addSuffix?a.comparison&&a.comparison>0?"in "+r:r+" ago":r};function es(e){return(t={})=>{const a=t.width?String(t.width):e.defaultWidth;return e.formats[a]||e.formats[e.defaultWidth]}}const V11={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},L11={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},S11={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},A11={date:es({formats:V11,defaultWidth:"full"}),time:es({formats:L11,defaultWidth:"full"}),dateTime:es({formats:S11,defaultWidth:"full"})},T11={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},E11=(e,t,a,r)=>T11[e];function Ba(e){return(t,a)=>{const r=a!=null&&a.context?String(a.context):"standalone";let n;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,s=a!=null&&a.width?String(a.width):i;n=e.formattingValues[s]||e.formattingValues[i]}else{const i=e.defaultWidth,s=a!=null&&a.width?String(a.width):e.defaultWidth;n=e.values[s]||e.values[i]}const c=e.argumentCallback?e.argumentCallback(t):t;return n[c]}}const N11={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},D11={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},O11={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},P11={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},B11={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},F11={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},R11=(e,t)=>{const a=Number(e),r=a%100;if(r>20||r<10)switch(r%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},I11={ordinalNumber:R11,era:Ba({values:N11,defaultWidth:"wide"}),quarter:Ba({values:D11,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ba({values:O11,defaultWidth:"wide"}),day:Ba({values:P11,defaultWidth:"wide"}),dayPeriod:Ba({values:B11,defaultWidth:"wide",formattingValues:F11,defaultFormattingWidth:"wide"})};function Fa(e){return(t,a={})=>{const r=a.width,n=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],c=t.match(n);if(!c)return null;const i=c[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?U11(s,d=>d.test(i)):$11(s,d=>d.test(i));let f;f=e.valueCallback?e.valueCallback(l):l,f=a.valueCallback?a.valueCallback(f):f;const u=t.slice(i.length);return{value:f,rest:u}}}function $11(e,t){for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&t(e[a]))return a}function U11(e,t){for(let a=0;a<e.length;a++)if(t(e[a]))return a}function W11(e){return(t,a={})=>{const r=t.match(e.matchPattern);if(!r)return null;const n=r[0],c=t.match(e.parsePattern);if(!c)return null;let i=e.valueCallback?e.valueCallback(c[0]):c[0];i=a.valueCallback?a.valueCallback(i):i;const s=t.slice(n.length);return{value:i,rest:s}}}const q11=/^(\d+)(th|st|nd|rd)?/i,j11=/\d+/i,Y11={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},G11={any:[/^b/i,/^(a|c)/i]},X11={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},K11={any:[/1/i,/2/i,/3/i,/4/i]},Z11={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Q11={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},J11={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},e21={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},t21={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},a21={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},r21={ordinalNumber:W11({matchPattern:q11,parsePattern:j11,valueCallback:e=>parseInt(e,10)}),era:Fa({matchPatterns:Y11,defaultMatchWidth:"wide",parsePatterns:G11,defaultParseWidth:"any"}),quarter:Fa({matchPatterns:X11,defaultMatchWidth:"wide",parsePatterns:K11,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Fa({matchPatterns:Z11,defaultMatchWidth:"wide",parsePatterns:Q11,defaultParseWidth:"any"}),day:Fa({matchPatterns:J11,defaultMatchWidth:"wide",parsePatterns:e21,defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:t21,defaultMatchWidth:"any",parsePatterns:a21,defaultParseWidth:"any"})},$x={code:"en-US",formatDistance:H11,formatLong:A11,formatRelative:E11,localize:I11,match:r21,options:{weekStartsOn:0,firstWeekContainsDate:1}};function n21(e){const t=Y1(e);return Px(t,kl(t))+1}function Hl(e){const t=Y1(e),a=+aa(t)-+z11(t);return Math.round(a/Nx)+1}function Vl(e,t){var u,d,h,m;const a=Y1(e),r=a.getFullYear(),n=v6(),c=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??n.firstWeekContainsDate??((m=(h=n.locale)==null?void 0:h.options)==null?void 0:m.firstWeekContainsDate)??1,i=z2(e,0);i.setFullYear(r+1,0,c),i.setHours(0,0,0,0);const s=y4(i,t),l=z2(e,0);l.setFullYear(r,0,c),l.setHours(0,0,0,0);const f=y4(l,t);return a.getTime()>=s.getTime()?r+1:a.getTime()>=f.getTime()?r:r-1}function c21(e,t){var s,l,f,u;const a=v6(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??a.firstWeekContainsDate??((u=(f=a.locale)==null?void 0:f.options)==null?void 0:u.firstWeekContainsDate)??1,n=Vl(e,t),c=z2(e,0);return c.setFullYear(n,0,r),c.setHours(0,0,0,0),y4(c,t)}function Ll(e,t){const a=Y1(e),r=+y4(a,t)-+c21(a,t);return Math.round(r/Nx)+1}function H2(e,t){const a=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return a+r}const Nt={y(e,t){const a=e.getFullYear(),r=a>0?a:1-a;return H2(t==="yy"?r%100:r,t.length)},M(e,t){const a=e.getMonth();return t==="M"?String(a+1):H2(a+1,2)},d(e,t){return H2(e.getDate(),t.length)},a(e,t){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];case"aaaa":default:return a==="am"?"a.m.":"p.m."}},h(e,t){return H2(e.getHours()%12||12,t.length)},H(e,t){return H2(e.getHours(),t.length)},m(e,t){return H2(e.getMinutes(),t.length)},s(e,t){return H2(e.getSeconds(),t.length)},S(e,t){const a=t.length,r=e.getMilliseconds(),n=Math.trunc(r*Math.pow(10,a-3));return H2(n,t.length)}},H6={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Gh={G:function(e,t,a){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return a.era(r,{width:"abbreviated"});case"GGGGG":return a.era(r,{width:"narrow"});case"GGGG":default:return a.era(r,{width:"wide"})}},y:function(e,t,a){if(t==="yo"){const r=e.getFullYear(),n=r>0?r:1-r;return a.ordinalNumber(n,{unit:"year"})}return Nt.y(e,t)},Y:function(e,t,a,r){const n=Vl(e,r),c=n>0?n:1-n;if(t==="YY"){const i=c%100;return H2(i,2)}return t==="Yo"?a.ordinalNumber(c,{unit:"year"}):H2(c,t.length)},R:function(e,t){const a=Ox(e);return H2(a,t.length)},u:function(e,t){const a=e.getFullYear();return H2(a,t.length)},Q:function(e,t,a){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return H2(r,2);case"Qo":return a.ordinalNumber(r,{unit:"quarter"});case"QQQ":return a.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,a){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return H2(r,2);case"qo":return a.ordinalNumber(r,{unit:"quarter"});case"qqq":return a.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,a){const r=e.getMonth();switch(t){case"M":case"MM":return Nt.M(e,t);case"Mo":return a.ordinalNumber(r+1,{unit:"month"});case"MMM":return a.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,a){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return H2(r+1,2);case"Lo":return a.ordinalNumber(r+1,{unit:"month"});case"LLL":return a.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,a,r){const n=Ll(e,r);return t==="wo"?a.ordinalNumber(n,{unit:"week"}):H2(n,t.length)},I:function(e,t,a){const r=Hl(e);return t==="Io"?a.ordinalNumber(r,{unit:"week"}):H2(r,t.length)},d:function(e,t,a){return t==="do"?a.ordinalNumber(e.getDate(),{unit:"date"}):Nt.d(e,t)},D:function(e,t,a){const r=n21(e);return t==="Do"?a.ordinalNumber(r,{unit:"dayOfYear"}):H2(r,t.length)},E:function(e,t,a){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return a.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(r,{width:"short",context:"formatting"});case"EEEE":default:return a.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,a,r){const n=e.getDay(),c=(n-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(c);case"ee":return H2(c,2);case"eo":return a.ordinalNumber(c,{unit:"day"});case"eee":return a.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(n,{width:"short",context:"formatting"});case"eeee":default:return a.day(n,{width:"wide",context:"formatting"})}},c:function(e,t,a,r){const n=e.getDay(),c=(n-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(c);case"cc":return H2(c,t.length);case"co":return a.ordinalNumber(c,{unit:"day"});case"ccc":return a.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(n,{width:"narrow",context:"standalone"});case"cccccc":return a.day(n,{width:"short",context:"standalone"});case"cccc":default:return a.day(n,{width:"wide",context:"standalone"})}},i:function(e,t,a){const r=e.getDay(),n=r===0?7:r;switch(t){case"i":return String(n);case"ii":return H2(n,t.length);case"io":return a.ordinalNumber(n,{unit:"day"});case"iii":return a.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(r,{width:"short",context:"formatting"});case"iiii":default:return a.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,a){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,a){const r=e.getHours();let n;switch(r===12?n=H6.noon:r===0?n=H6.midnight:n=r/12>=1?"pm":"am",t){case"b":case"bb":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,a){const r=e.getHours();let n;switch(r>=17?n=H6.evening:r>=12?n=H6.afternoon:r>=4?n=H6.morning:n=H6.night,t){case"B":case"BB":case"BBB":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,a){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),a.ordinalNumber(r,{unit:"hour"})}return Nt.h(e,t)},H:function(e,t,a){return t==="Ho"?a.ordinalNumber(e.getHours(),{unit:"hour"}):Nt.H(e,t)},K:function(e,t,a){const r=e.getHours()%12;return t==="Ko"?a.ordinalNumber(r,{unit:"hour"}):H2(r,t.length)},k:function(e,t,a){let r=e.getHours();return r===0&&(r=24),t==="ko"?a.ordinalNumber(r,{unit:"hour"}):H2(r,t.length)},m:function(e,t,a){return t==="mo"?a.ordinalNumber(e.getMinutes(),{unit:"minute"}):Nt.m(e,t)},s:function(e,t,a){return t==="so"?a.ordinalNumber(e.getSeconds(),{unit:"second"}):Nt.s(e,t)},S:function(e,t){return Nt.S(e,t)},X:function(e,t,a){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Kh(r);case"XXXX":case"XX":return D0(r);case"XXXXX":case"XXX":default:return D0(r,":")}},x:function(e,t,a){const r=e.getTimezoneOffset();switch(t){case"x":return Kh(r);case"xxxx":case"xx":return D0(r);case"xxxxx":case"xxx":default:return D0(r,":")}},O:function(e,t,a){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Xh(r,":");case"OOOO":default:return"GMT"+D0(r,":")}},z:function(e,t,a){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Xh(r,":");case"zzzz":default:return"GMT"+D0(r,":")}},t:function(e,t,a){const r=Math.trunc(e.getTime()/1e3);return H2(r,t.length)},T:function(e,t,a){const r=e.getTime();return H2(r,t.length)}};function Xh(e,t=""){const a=e>0?"-":"+",r=Math.abs(e),n=Math.trunc(r/60),c=r%60;return c===0?a+String(n):a+String(n)+t+H2(c,2)}function Kh(e,t){return e%60===0?(e>0?"-":"+")+H2(Math.abs(e)/60,2):D0(e,t)}function D0(e,t=""){const a=e>0?"-":"+",r=Math.abs(e),n=H2(Math.trunc(r/60),2),c=H2(r%60,2);return a+n+t+c}const Zh=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Ux=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},i21=(e,t)=>{const a=e.match(/(P+)(p+)?/)||[],r=a[1],n=a[2];if(!n)return Zh(e,t);let c;switch(r){case"P":c=t.dateTime({width:"short"});break;case"PP":c=t.dateTime({width:"medium"});break;case"PPP":c=t.dateTime({width:"long"});break;case"PPPP":default:c=t.dateTime({width:"full"});break}return c.replace("{{date}}",Zh(r,t)).replace("{{time}}",Ux(n,t))},T7={p:Ux,P:i21},s21=/^D+$/,o21=/^Y+$/,l21=["D","DD","YY","YYYY"];function Wx(e){return s21.test(e)}function qx(e){return o21.test(e)}function E7(e,t,a){const r=f21(e,t,a);if(console.warn(r),l21.includes(e))throw new RangeError(r)}function f21(e,t,a){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${a}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const u21=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,d21=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,h21=/^'([^]*?)'?$/,m21=/''/g,p21=/[a-zA-Z]/;function P4(e,t,a){var u,d,h,m,v,p,g,y;const r=v6(),n=(a==null?void 0:a.locale)??r.locale??$x,c=(a==null?void 0:a.firstWeekContainsDate)??((d=(u=a==null?void 0:a.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??r.firstWeekContainsDate??((m=(h=r.locale)==null?void 0:h.options)==null?void 0:m.firstWeekContainsDate)??1,i=(a==null?void 0:a.weekStartsOn)??((p=(v=a==null?void 0:a.locale)==null?void 0:v.options)==null?void 0:p.weekStartsOn)??r.weekStartsOn??((y=(g=r.locale)==null?void 0:g.options)==null?void 0:y.weekStartsOn)??0,s=Y1(e);if(!vr(s))throw new RangeError("Invalid time value");let l=t.match(d21).map(x=>{const C=x[0];if(C==="p"||C==="P"){const b=T7[C];return b(x,n.formatLong)}return x}).join("").match(u21).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const C=x[0];if(C==="'")return{isToken:!1,value:v21(x)};if(Gh[C])return{isToken:!0,value:x};if(C.match(p21))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return{isToken:!1,value:x}});n.localize.preprocessor&&(l=n.localize.preprocessor(s,l));const f={firstWeekContainsDate:c,weekStartsOn:i,locale:n};return l.map(x=>{if(!x.isToken)return x.value;const C=x.value;(!(a!=null&&a.useAdditionalWeekYearTokens)&&qx(C)||!(a!=null&&a.useAdditionalDayOfYearTokens)&&Wx(C))&&E7(C,t,String(e));const b=Gh[C[0]];return b(s,C,n.localize,f)}).join("")}function v21(e){const t=e.match(h21);return t?t[1].replace(m21,"'"):e}function g21(e){return Y1(e).getDay()}function y21(e){const t=Y1(e),a=t.getFullYear(),r=t.getMonth(),n=z2(e,0);return n.setFullYear(a,r+1,0),n.setHours(0,0,0,0),n.getDate()}function x21(){return Object.assign({},v6())}function wt(e){return Y1(e).getHours()}function b21(e){let a=Y1(e).getDay();return a===0&&(a=7),a}function h0(e){return Y1(e).getMinutes()}function o2(e){return Y1(e).getMonth()}function ra(e){return Y1(e).getSeconds()}function n2(e){return Y1(e).getFullYear()}function na(e,t){const a=Y1(e),r=Y1(t);return a.getTime()>r.getTime()}function tn(e,t){const a=Y1(e),r=Y1(t);return+a<+r}function P6(e,t){const a=Y1(e),r=Y1(t);return+a==+r}function C21(e,t){const a=t instanceof Date?z2(t,0):new t(0);return a.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),a.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),a}const M21=10;class jx{constructor(){g1(this,"subPriority",0)}validate(t,a){return!0}}class z21 extends jx{constructor(t,a,r,n,c){super(),this.value=t,this.validateValue=a,this.setValue=r,this.priority=n,c&&(this.subPriority=c)}validate(t,a){return this.validateValue(t,this.value,a)}set(t,a,r){return this.setValue(t,a,this.value,r)}}class w21 extends jx{constructor(){super(...arguments);g1(this,"priority",M21);g1(this,"subPriority",-1)}set(a,r){return r.timestampIsSet?a:z2(a,C21(a,Date))}}class w2{run(t,a,r,n){const c=this.parse(t,a,r,n);return c?{setter:new z21(c.value,this.validate,this.set,this.priority,this.subPriority),rest:c.rest}:null}validate(t,a,r){return!0}}class _21 extends w2{constructor(){super(...arguments);g1(this,"priority",140);g1(this,"incompatibleTokens",["R","u","t","T"])}parse(a,r,n){switch(r){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"})||n.era(a,{width:"narrow"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})||n.era(a,{width:"abbreviated"})||n.era(a,{width:"narrow"})}}set(a,r,n){return r.era=n,a.setFullYear(n,0,1),a.setHours(0,0,0,0),a}}const ve={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},L4={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function ge(e,t){return e&&{value:t(e.value),rest:e.rest}}function ae(e,t){const a=t.match(e);return a?{value:parseInt(a[0],10),rest:t.slice(a[0].length)}:null}function S4(e,t){const a=t.match(e);if(!a)return null;if(a[0]==="Z")return{value:0,rest:t.slice(1)};const r=a[1]==="+"?1:-1,n=a[2]?parseInt(a[2],10):0,c=a[3]?parseInt(a[3],10):0,i=a[5]?parseInt(a[5],10):0;return{value:r*(n*Dx+c*x11+i*b11),rest:t.slice(a[0].length)}}function Yx(e){return ae(ve.anyDigitsSigned,e)}function oe(e,t){switch(e){case 1:return ae(ve.singleDigit,t);case 2:return ae(ve.twoDigits,t);case 3:return ae(ve.threeDigits,t);case 4:return ae(ve.fourDigits,t);default:return ae(new RegExp("^\\d{1,"+e+"}"),t)}}function Rc(e,t){switch(e){case 1:return ae(ve.singleDigitSigned,t);case 2:return ae(ve.twoDigitsSigned,t);case 3:return ae(ve.threeDigitsSigned,t);case 4:return ae(ve.fourDigitsSigned,t);default:return ae(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Sl(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Gx(e,t){const a=t>0,r=a?t:1-t;let n;if(r<=50)n=e||100;else{const c=r+50,i=Math.trunc(c/100)*100,s=e>=c%100;n=e+i-(s?100:0)}return a?n:1-n}function Xx(e){return e%400===0||e%4===0&&e%100!==0}class k21 extends w2{constructor(){super(...arguments);g1(this,"priority",130);g1(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(a,r,n){const c=i=>({year:i,isTwoDigitYear:r==="yy"});switch(r){case"y":return ge(oe(4,a),c);case"yo":return ge(n.ordinalNumber(a,{unit:"year"}),c);default:return ge(oe(r.length,a),c)}}validate(a,r){return r.isTwoDigitYear||r.year>0}set(a,r,n){const c=a.getFullYear();if(n.isTwoDigitYear){const s=Gx(n.year,c);return a.setFullYear(s,0,1),a.setHours(0,0,0,0),a}const i=!("era"in r)||r.era===1?n.year:1-n.year;return a.setFullYear(i,0,1),a.setHours(0,0,0,0),a}}class H21 extends w2{constructor(){super(...arguments);g1(this,"priority",130);g1(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(a,r,n){const c=i=>({year:i,isTwoDigitYear:r==="YY"});switch(r){case"Y":return ge(oe(4,a),c);case"Yo":return ge(n.ordinalNumber(a,{unit:"year"}),c);default:return ge(oe(r.length,a),c)}}validate(a,r){return r.isTwoDigitYear||r.year>0}set(a,r,n,c){const i=Vl(a,c);if(n.isTwoDigitYear){const l=Gx(n.year,i);return a.setFullYear(l,0,c.firstWeekContainsDate),a.setHours(0,0,0,0),y4(a,c)}const s=!("era"in r)||r.era===1?n.year:1-n.year;return a.setFullYear(s,0,c.firstWeekContainsDate),a.setHours(0,0,0,0),y4(a,c)}}class V21 extends w2{constructor(){super(...arguments);g1(this,"priority",130);g1(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(a,r){return Rc(r==="R"?4:r.length,a)}set(a,r,n){const c=z2(a,0);return c.setFullYear(n,0,4),c.setHours(0,0,0,0),aa(c)}}class L21 extends w2{constructor(){super(...arguments);g1(this,"priority",130);g1(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(a,r){return Rc(r==="u"?4:r.length,a)}set(a,r,n){return a.setFullYear(n,0,1),a.setHours(0,0,0,0),a}}class S21 extends w2{constructor(){super(...arguments);g1(this,"priority",120);g1(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(a,r,n){switch(r){case"Q":case"QQ":return oe(r.length,a);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"})||n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})||n.quarter(a,{width:"abbreviated",context:"formatting"})||n.quarter(a,{width:"narrow",context:"formatting"})}}validate(a,r){return r>=1&&r<=4}set(a,r,n){return a.setMonth((n-1)*3,1),a.setHours(0,0,0,0),a}}class A21 extends w2{constructor(){super(...arguments);g1(this,"priority",120);g1(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(a,r,n){switch(r){case"q":case"qq":return oe(r.length,a);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"})||n.quarter(a,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})||n.quarter(a,{width:"abbreviated",context:"standalone"})||n.quarter(a,{width:"narrow",context:"standalone"})}}validate(a,r){return r>=1&&r<=4}set(a,r,n){return a.setMonth((n-1)*3,1),a.setHours(0,0,0,0),a}}class T21 extends w2{constructor(){super(...arguments);g1(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);g1(this,"priority",110)}parse(a,r,n){const c=i=>i-1;switch(r){case"M":return ge(ae(ve.month,a),c);case"MM":return ge(oe(2,a),c);case"Mo":return ge(n.ordinalNumber(a,{unit:"month"}),c);case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"})||n.month(a,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})||n.month(a,{width:"abbreviated",context:"formatting"})||n.month(a,{width:"narrow",context:"formatting"})}}validate(a,r){return r>=0&&r<=11}set(a,r,n){return a.setMonth(n,1),a.setHours(0,0,0,0),a}}class E21 extends w2{constructor(){super(...arguments);g1(this,"priority",110);g1(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(a,r,n){const c=i=>i-1;switch(r){case"L":return ge(ae(ve.month,a),c);case"LL":return ge(oe(2,a),c);case"Lo":return ge(n.ordinalNumber(a,{unit:"month"}),c);case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"})||n.month(a,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})||n.month(a,{width:"abbreviated",context:"standalone"})||n.month(a,{width:"narrow",context:"standalone"})}}validate(a,r){return r>=0&&r<=11}set(a,r,n){return a.setMonth(n,1),a.setHours(0,0,0,0),a}}function N21(e,t,a){const r=Y1(e),n=Ll(r,a)-t;return r.setDate(r.getDate()-n*7),r}class D21 extends w2{constructor(){super(...arguments);g1(this,"priority",100);g1(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(a,r,n){switch(r){case"w":return ae(ve.week,a);case"wo":return n.ordinalNumber(a,{unit:"week"});default:return oe(r.length,a)}}validate(a,r){return r>=1&&r<=53}set(a,r,n,c){return y4(N21(a,n,c),c)}}function O21(e,t){const a=Y1(e),r=Hl(a)-t;return a.setDate(a.getDate()-r*7),a}class P21 extends w2{constructor(){super(...arguments);g1(this,"priority",100);g1(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(a,r,n){switch(r){case"I":return ae(ve.week,a);case"Io":return n.ordinalNumber(a,{unit:"week"});default:return oe(r.length,a)}}validate(a,r){return r>=1&&r<=53}set(a,r,n){return aa(O21(a,n))}}const B21=[31,28,31,30,31,30,31,31,30,31,30,31],F21=[31,29,31,30,31,30,31,31,30,31,30,31];class R21 extends w2{constructor(){super(...arguments);g1(this,"priority",90);g1(this,"subPriority",1);g1(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(a,r,n){switch(r){case"d":return ae(ve.date,a);case"do":return n.ordinalNumber(a,{unit:"date"});default:return oe(r.length,a)}}validate(a,r){const n=a.getFullYear(),c=Xx(n),i=a.getMonth();return c?r>=1&&r<=F21[i]:r>=1&&r<=B21[i]}set(a,r,n){return a.setDate(n),a.setHours(0,0,0,0),a}}class I21 extends w2{constructor(){super(...arguments);g1(this,"priority",90);g1(this,"subpriority",1);g1(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(a,r,n){switch(r){case"D":case"DD":return ae(ve.dayOfYear,a);case"Do":return n.ordinalNumber(a,{unit:"date"});default:return oe(r.length,a)}}validate(a,r){const n=a.getFullYear();return Xx(n)?r>=1&&r<=366:r>=1&&r<=365}set(a,r,n){return a.setMonth(0,n),a.setHours(0,0,0,0),a}}function Al(e,t,a){var d,h,m,v;const r=v6(),n=(a==null?void 0:a.weekStartsOn)??((h=(d=a==null?void 0:a.locale)==null?void 0:d.options)==null?void 0:h.weekStartsOn)??r.weekStartsOn??((v=(m=r.locale)==null?void 0:m.options)==null?void 0:v.weekStartsOn)??0,c=Y1(e),i=c.getDay(),l=(t%7+7)%7,f=7-n,u=t<0||t>6?t-(i+f)%7:(l+f)%7-(i+f)%7;return J3(c,u)}class $21 extends w2{constructor(){super(...arguments);g1(this,"priority",90);g1(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(a,r,n){switch(r){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})||n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"})}}validate(a,r){return r>=0&&r<=6}set(a,r,n,c){return a=Al(a,n,c),a.setHours(0,0,0,0),a}}class U21 extends w2{constructor(){super(...arguments);g1(this,"priority",90);g1(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(a,r,n,c){const i=s=>{const l=Math.floor((s-1)/7)*7;return(s+c.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return ge(oe(r.length,a),i);case"eo":return ge(n.ordinalNumber(a,{unit:"day"}),i);case"eee":return n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})||n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"})}}validate(a,r){return r>=0&&r<=6}set(a,r,n,c){return a=Al(a,n,c),a.setHours(0,0,0,0),a}}class W21 extends w2{constructor(){super(...arguments);g1(this,"priority",90);g1(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(a,r,n,c){const i=s=>{const l=Math.floor((s-1)/7)*7;return(s+c.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return ge(oe(r.length,a),i);case"co":return ge(n.ordinalNumber(a,{unit:"day"}),i);case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"})||n.day(a,{width:"short",context:"standalone"})||n.day(a,{width:"narrow",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"})||n.day(a,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})||n.day(a,{width:"abbreviated",context:"standalone"})||n.day(a,{width:"short",context:"standalone"})||n.day(a,{width:"narrow",context:"standalone"})}}validate(a,r){return r>=0&&r<=6}set(a,r,n,c){return a=Al(a,n,c),a.setHours(0,0,0,0),a}}function q21(e,t){const a=Y1(e),r=b21(a),n=t-r;return J3(a,n)}class j21 extends w2{constructor(){super(...arguments);g1(this,"priority",90);g1(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(a,r,n){const c=i=>i===0?7:i;switch(r){case"i":case"ii":return oe(r.length,a);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return ge(n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"}),c);case"iiiii":return ge(n.day(a,{width:"narrow",context:"formatting"}),c);case"iiiiii":return ge(n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"}),c);case"iiii":default:return ge(n.day(a,{width:"wide",context:"formatting"})||n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"}),c)}}validate(a,r){return r>=1&&r<=7}set(a,r,n){return a=q21(a,n),a.setHours(0,0,0,0),a}}class Y21 extends w2{constructor(){super(...arguments);g1(this,"priority",80);g1(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(a,r,n){switch(r){case"a":case"aa":case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})||n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"})}}set(a,r,n){return a.setHours(Sl(n),0,0,0),a}}class G21 extends w2{constructor(){super(...arguments);g1(this,"priority",80);g1(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(a,r,n){switch(r){case"b":case"bb":case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})||n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"})}}set(a,r,n){return a.setHours(Sl(n),0,0,0),a}}class X21 extends w2{constructor(){super(...arguments);g1(this,"priority",80);g1(this,"incompatibleTokens",["a","b","t","T"])}parse(a,r,n){switch(r){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})||n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"})}}set(a,r,n){return a.setHours(Sl(n),0,0,0),a}}class K21 extends w2{constructor(){super(...arguments);g1(this,"priority",70);g1(this,"incompatibleTokens",["H","K","k","t","T"])}parse(a,r,n){switch(r){case"h":return ae(ve.hour12h,a);case"ho":return n.ordinalNumber(a,{unit:"hour"});default:return oe(r.length,a)}}validate(a,r){return r>=1&&r<=12}set(a,r,n){const c=a.getHours()>=12;return c&&n<12?a.setHours(n+12,0,0,0):!c&&n===12?a.setHours(0,0,0,0):a.setHours(n,0,0,0),a}}class Z21 extends w2{constructor(){super(...arguments);g1(this,"priority",70);g1(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(a,r,n){switch(r){case"H":return ae(ve.hour23h,a);case"Ho":return n.ordinalNumber(a,{unit:"hour"});default:return oe(r.length,a)}}validate(a,r){return r>=0&&r<=23}set(a,r,n){return a.setHours(n,0,0,0),a}}class Q21 extends w2{constructor(){super(...arguments);g1(this,"priority",70);g1(this,"incompatibleTokens",["h","H","k","t","T"])}parse(a,r,n){switch(r){case"K":return ae(ve.hour11h,a);case"Ko":return n.ordinalNumber(a,{unit:"hour"});default:return oe(r.length,a)}}validate(a,r){return r>=0&&r<=11}set(a,r,n){return a.getHours()>=12&&n<12?a.setHours(n+12,0,0,0):a.setHours(n,0,0,0),a}}class J21 extends w2{constructor(){super(...arguments);g1(this,"priority",70);g1(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(a,r,n){switch(r){case"k":return ae(ve.hour24h,a);case"ko":return n.ordinalNumber(a,{unit:"hour"});default:return oe(r.length,a)}}validate(a,r){return r>=1&&r<=24}set(a,r,n){const c=n<=24?n%24:n;return a.setHours(c,0,0,0),a}}class ee1 extends w2{constructor(){super(...arguments);g1(this,"priority",60);g1(this,"incompatibleTokens",["t","T"])}parse(a,r,n){switch(r){case"m":return ae(ve.minute,a);case"mo":return n.ordinalNumber(a,{unit:"minute"});default:return oe(r.length,a)}}validate(a,r){return r>=0&&r<=59}set(a,r,n){return a.setMinutes(n,0,0),a}}class te1 extends w2{constructor(){super(...arguments);g1(this,"priority",50);g1(this,"incompatibleTokens",["t","T"])}parse(a,r,n){switch(r){case"s":return ae(ve.second,a);case"so":return n.ordinalNumber(a,{unit:"second"});default:return oe(r.length,a)}}validate(a,r){return r>=0&&r<=59}set(a,r,n){return a.setSeconds(n,0),a}}class ae1 extends w2{constructor(){super(...arguments);g1(this,"priority",30);g1(this,"incompatibleTokens",["t","T"])}parse(a,r){const n=c=>Math.trunc(c*Math.pow(10,-r.length+3));return ge(oe(r.length,a),n)}set(a,r,n){return a.setMilliseconds(n),a}}class re1 extends w2{constructor(){super(...arguments);g1(this,"priority",10);g1(this,"incompatibleTokens",["t","T","x"])}parse(a,r){switch(r){case"X":return S4(L4.basicOptionalMinutes,a);case"XX":return S4(L4.basic,a);case"XXXX":return S4(L4.basicOptionalSeconds,a);case"XXXXX":return S4(L4.extendedOptionalSeconds,a);case"XXX":default:return S4(L4.extended,a)}}set(a,r,n){return r.timestampIsSet?a:z2(a,a.getTime()-Fc(a)-n)}}class ne1 extends w2{constructor(){super(...arguments);g1(this,"priority",10);g1(this,"incompatibleTokens",["t","T","X"])}parse(a,r){switch(r){case"x":return S4(L4.basicOptionalMinutes,a);case"xx":return S4(L4.basic,a);case"xxxx":return S4(L4.basicOptionalSeconds,a);case"xxxxx":return S4(L4.extendedOptionalSeconds,a);case"xxx":default:return S4(L4.extended,a)}}set(a,r,n){return r.timestampIsSet?a:z2(a,a.getTime()-Fc(a)-n)}}class ce1 extends w2{constructor(){super(...arguments);g1(this,"priority",40);g1(this,"incompatibleTokens","*")}parse(a){return Yx(a)}set(a,r,n){return[z2(a,n*1e3),{timestampIsSet:!0}]}}class ie1 extends w2{constructor(){super(...arguments);g1(this,"priority",20);g1(this,"incompatibleTokens","*")}parse(a){return Yx(a)}set(a,r,n){return[z2(a,n),{timestampIsSet:!0}]}}const se1={G:new _21,y:new k21,Y:new H21,R:new V21,u:new L21,Q:new S21,q:new A21,M:new T21,L:new E21,w:new D21,I:new P21,d:new R21,D:new I21,E:new $21,e:new U21,c:new W21,i:new j21,a:new Y21,b:new G21,B:new X21,h:new K21,H:new Z21,K:new Q21,k:new J21,m:new ee1,s:new te1,S:new ae1,X:new re1,x:new ne1,t:new ce1,T:new ie1},oe1=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,le1=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,fe1=/^'([^]*?)'?$/,ue1=/''/g,de1=/\S/,he1=/[a-zA-Z]/;function N7(e,t,a,r){var p,g,y,x,C,b,M,w;const n=x21(),c=(r==null?void 0:r.locale)??n.locale??$x,i=(r==null?void 0:r.firstWeekContainsDate)??((g=(p=r==null?void 0:r.locale)==null?void 0:p.options)==null?void 0:g.firstWeekContainsDate)??n.firstWeekContainsDate??((x=(y=n.locale)==null?void 0:y.options)==null?void 0:x.firstWeekContainsDate)??1,s=(r==null?void 0:r.weekStartsOn)??((b=(C=r==null?void 0:r.locale)==null?void 0:C.options)==null?void 0:b.weekStartsOn)??n.weekStartsOn??((w=(M=n.locale)==null?void 0:M.options)==null?void 0:w.weekStartsOn)??0;if(t==="")return e===""?Y1(a):z2(a,NaN);const l={firstWeekContainsDate:i,weekStartsOn:s,locale:c},f=[new w21],u=t.match(le1).map(z=>{const H=z[0];if(H in T7){const A=T7[H];return A(z,c.formatLong)}return z}).join("").match(oe1),d=[];for(let z of u){!(r!=null&&r.useAdditionalWeekYearTokens)&&qx(z)&&E7(z,t,e),!(r!=null&&r.useAdditionalDayOfYearTokens)&&Wx(z)&&E7(z,t,e);const H=z[0],A=se1[H];if(A){const{incompatibleTokens:V}=A;if(Array.isArray(V)){const _=d.find(N=>V.includes(N.token)||N.token===H);if(_)throw new RangeError(`The format string mustn't contain \`${_.fullToken}\` and \`${z}\` at the same time`)}else if(A.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${z}\` and any other token at the same time`);d.push({token:H,fullToken:z});const k=A.run(e,z,c.match,l);if(!k)return z2(a,NaN);f.push(k.setter),e=k.rest}else{if(H.match(he1))throw new RangeError("Format string contains an unescaped latin alphabet character `"+H+"`");if(z==="''"?z="'":H==="'"&&(z=me1(z)),e.indexOf(z)===0)e=e.slice(z.length);else return z2(a,NaN)}}if(e.length>0&&de1.test(e))return z2(a,NaN);const h=f.map(z=>z.priority).sort((z,H)=>H-z).filter((z,H,A)=>A.indexOf(z)===H).map(z=>f.filter(H=>H.priority===z).sort((H,A)=>A.subPriority-H.subPriority)).map(z=>z[0]);let m=Y1(a);if(isNaN(m.getTime()))return z2(a,NaN);const v={};for(const z of h){if(!z.validate(m,l))return z2(a,NaN);const H=z.set(m,v,l);Array.isArray(H)?(m=H[0],Object.assign(v,H[1])):m=H}return z2(a,m)}function me1(e){return e.match(fe1)[1].replace(ue1,"'")}function Qh(e,t){const a=$0(e),r=$0(t);return+a==+r}function pe1(e,t){return J3(e,-t)}function Kx(e,t){const a=Y1(e),r=a.getFullYear(),n=a.getDate(),c=z2(e,0);c.setFullYear(r,t,15),c.setHours(0,0,0,0);const i=y21(c);return a.setMonth(t,Math.min(n,i)),a}function N2(e,t){let a=Y1(e);return isNaN(+a)?z2(e,NaN):(t.year!=null&&a.setFullYear(t.year),t.month!=null&&(a=Kx(a,t.month)),t.date!=null&&a.setDate(t.date),t.hours!=null&&a.setHours(t.hours),t.minutes!=null&&a.setMinutes(t.minutes),t.seconds!=null&&a.setSeconds(t.seconds),t.milliseconds!=null&&a.setMilliseconds(t.milliseconds),a)}function Zx(e,t){const a=Y1(e);return a.setHours(t),a}function Tl(e,t){const a=Y1(e);return a.setMilliseconds(t),a}function Qx(e,t){const a=Y1(e);return a.setMinutes(t),a}function El(e,t){const a=Y1(e);return a.setSeconds(t),a}function E4(e,t){const a=Y1(e);return isNaN(+a)?z2(e,NaN):(a.setFullYear(t),a)}function ca(e,t){return f4(e,-t)}function ve1(e,t){const{years:a=0,months:r=0,weeks:n=0,days:c=0,hours:i=0,minutes:s=0,seconds:l=0}=t,f=ca(e,r+a*12),u=pe1(f,c+n*7),d=s+i*60,m=(l+d*60)*1e3;return z2(e,u.getTime()-m)}function Jx(e,t){return _l(e,-t)}function pa(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[o.createElementVNode("path",{d:"M29.333 8c0-2.208-1.792-4-4-4h-18.667c-2.208 0-4 1.792-4 4v18.667c0 2.208 1.792 4 4 4h18.667c2.208 0 4-1.792 4-4v-18.667zM26.667 8v18.667c0 0.736-0.597 1.333-1.333 1.333 0 0-18.667 0-18.667 0-0.736 0-1.333-0.597-1.333-1.333 0 0 0-18.667 0-18.667 0-0.736 0.597-1.333 1.333-1.333 0 0 18.667 0 18.667 0 0.736 0 1.333 0.597 1.333 1.333z"}),o.createElementVNode("path",{d:"M20 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),o.createElementVNode("path",{d:"M9.333 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),o.createElementVNode("path",{d:"M4 14.667h24c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-24c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"})])}pa.compatConfig={MODE:3};function eb(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[o.createElementVNode("path",{d:"M23.057 7.057l-16 16c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l16-16c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0z"}),o.createElementVNode("path",{d:"M7.057 8.943l16 16c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885l-16-16c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}eb.compatConfig={MODE:3};function Nl(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[o.createElementVNode("path",{d:"M20.943 23.057l-7.057-7.057c0 0 7.057-7.057 7.057-7.057 0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-8 8c-0.521 0.521-0.521 1.365 0 1.885l8 8c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}Nl.compatConfig={MODE:3};function Dl(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[o.createElementVNode("path",{d:"M12.943 24.943l8-8c0.521-0.521 0.521-1.365 0-1.885l-8-8c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885l7.057 7.057c0 0-7.057 7.057-7.057 7.057-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0z"})])}Dl.compatConfig={MODE:3};function Ol(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[o.createElementVNode("path",{d:"M16 1.333c-8.095 0-14.667 6.572-14.667 14.667s6.572 14.667 14.667 14.667c8.095 0 14.667-6.572 14.667-14.667s-6.572-14.667-14.667-14.667zM16 4c6.623 0 12 5.377 12 12s-5.377 12-12 12c-6.623 0-12-5.377-12-12s5.377-12 12-12z"}),o.createElementVNode("path",{d:"M14.667 8v8c0 0.505 0.285 0.967 0.737 1.193l5.333 2.667c0.658 0.329 1.46 0.062 1.789-0.596s0.062-1.46-0.596-1.789l-4.596-2.298c0 0 0-7.176 0-7.176 0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"})])}Ol.compatConfig={MODE:3};function Pl(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[o.createElementVNode("path",{d:"M24.943 19.057l-8-8c-0.521-0.521-1.365-0.521-1.885 0l-8 8c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l7.057-7.057c0 0 7.057 7.057 7.057 7.057 0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}Pl.compatConfig={MODE:3};function Bl(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[o.createElementVNode("path",{d:"M7.057 12.943l8 8c0.521 0.521 1.365 0.521 1.885 0l8-8c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-7.057 7.057c0 0-7.057-7.057-7.057-7.057-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}Bl.compatConfig={MODE:3};const B4=(e,t)=>t?new Date(e.toLocaleString("en-US",{timeZone:t})):new Date(e),tb=(e,t)=>D7(e,t)||A1(),ge1=(e,t)=>t.dateInTz?B4(new Date(e),t.dateInTz):A1(e),D7=(e,t)=>{if(!e)return null;if(!t)return A1(e);const a=A1(e);return t.exactMatch?ge1(e,t):B4(a,t.timezone)},ye1=e=>{if(!e)return 0;const t=new Date,a=new Date(t.toLocaleString("en-US",{timeZone:"UTC"})),r=new Date(t.toLocaleString("en-US",{timeZone:e})),n=r.getTimezoneOffset()/60;return(+a-+r)/(1e3*60*60)-n};var X3=(e=>(e.month="month",e.year="year",e))(X3||{}),O0=(e=>(e.top="top",e.bottom="bottom",e))(O0||{}),G0=(e=>(e.header="header",e.calendar="calendar",e.timePicker="timePicker",e))(G0||{}),Ye=(e=>(e.month="month",e.year="year",e.calendar="calendar",e.time="time",e.minutes="minutes",e.hours="hours",e.seconds="seconds",e))(Ye||{});const xe1=["timestamp","date","iso"];var c3=(e=>(e.up="up",e.down="down",e.left="left",e.right="right",e))(c3||{}),te=(e=>(e.arrowUp="ArrowUp",e.arrowDown="ArrowDown",e.arrowLeft="ArrowLeft",e.arrowRight="ArrowRight",e.enter="Enter",e.space=" ",e.esc="Escape",e.tab="Tab",e.home="Home",e.end="End",e.pageUp="PageUp",e.pageDown="PageDown",e))(te||{});function Jh(e){return t=>new Intl.DateTimeFormat(e,{weekday:"short",timeZone:"UTC"}).format(new Date(`2017-01-0${t}T00:00:00+00:00`)).slice(0,2)}function be1(e){return t=>P4(new Date(`2017-01-0${t}T00:00:00+00:00`),"EEEEEE",{locale:e})}const Ce1=(e,t,a)=>{const r=[1,2,3,4,5,6,7];let n;if(e!==null)try{n=r.map(be1(e))}catch{n=r.map(Jh(t))}else n=r.map(Jh(t));const c=n.slice(0,a),i=n.slice(a+1,n.length);return[n[a]].concat(...i).concat(...c)},Fl=(e,t,a)=>{const r=[];for(let n=+e[0];n<=+e[1];n++)r.push({value:+n,text:cb(n,t)});return a?r.reverse():r},ab=(e,t,a)=>{const r=[1,2,3,4,5,6,7,8,9,10,11,12].map(c=>{const i=c<10?`0${c}`:c;return new Date(`2017-${i}-01T00:00:00+00:00`)});if(e!==null)try{const c=a==="long"?"MMMM":"MMM";return r.map((i,s)=>{const l=P4(B4(i,"UTC"),c,{locale:e});return{text:l.charAt(0).toUpperCase()+l.substring(1),value:s}})}catch{}const n=new Intl.DateTimeFormat(t,{month:a,timeZone:"UTC"});return r.map((c,i)=>{const s=n.format(c);return{text:s.charAt(0).toUpperCase()+s.substring(1),value:i}})},Me1=e=>[12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11][e],ke=e=>{const t=o.unref(e);return t!=null&&t.$el?t==null?void 0:t.$el:t},ze1=e=>({type:"dot",...e??{}}),rb=e=>Array.isArray(e)?!!e[0]&&!!e[1]:!1,Rl={prop:e=>`"${e}" prop must be enabled!`,dateArr:e=>`You need to use array as "model-value" binding in order to support "${e}"`},Te=e=>e,em=e=>e===0?e:!e||isNaN(+e)?null:+e,tm=e=>e===null,nb=e=>{if(e)return[...e.querySelectorAll("input, button, select, textarea, a[href]")][0]},we1=e=>{const t=[],a=r=>r.filter(n=>n);for(let r=0;r<e.length;r+=3){const n=[e[r],e[r+1],e[r+2]];t.push(a(n))}return t},an=(e,t,a)=>{const r=a!=null,n=t!=null;if(!r&&!n)return!1;const c=+a,i=+t;return r&&n?+e>c||+e<i:r?+e>c:n?+e<i:!1},ia=(e,t)=>we1(e).map(a=>a.map(r=>{const{active:n,disabled:c,isBetween:i,highlighted:s}=t(r);return{...r,active:n,disabled:c,className:{dp__overlay_cell_active:n,dp__overlay_cell:!n,dp__overlay_cell_disabled:c,dp__overlay_cell_pad:!0,dp__overlay_cell_active_disabled:c&&n,dp__cell_in_between:i,"dp--highlighted":s}}})),r0=(e,t,a=!1)=>{e&&t.allowStopPropagation&&(a&&e.stopImmediatePropagation(),e.stopPropagation())},_e1=()=>["a[href]","area[href]","input:not([disabled]):not([type='hidden'])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","[tabindex]:not([tabindex='-1'])","[data-datepicker-instance]"].join(", ");function ke1(e,t){let a=[...document.querySelectorAll(_e1())];a=a.filter(n=>!e.contains(n)||n.hasAttribute("data-datepicker-instance"));const r=a.indexOf(e);if(r>=0&&(t?r-1>=0:r+1<=a.length))return a[r+(t?-1:1)]}const He1=(e,t)=>e==null?void 0:e.querySelector(`[data-dp-element="${t}"]`),cb=(e,t)=>new Intl.NumberFormat(t,{useGrouping:!1,style:"decimal"}).format(e),Il=e=>P4(e,"dd-MM-yyyy"),ts=e=>Array.isArray(e),Ic=(e,t)=>t.get(Il(e)),Ve1=(e,t)=>e?t?t instanceof Map?!!Ic(e,t):t(A1(e)):!1:!0,y3=(e,t,a=!1)=>{if(e.key===te.enter||e.key===te.space)return a&&e.preventDefault(),t()},am=(e,t,a,r,n,c)=>{const i=N7(e,t.slice(0,e.length),new Date,{locale:c});return vr(i)&&Bx(i)?r||n?i:N2(i,{hours:+a.hours,minutes:+(a==null?void 0:a.minutes),seconds:+(a==null?void 0:a.seconds),milliseconds:0}):null},Le1=(e,t,a,r,n,c)=>{const i=Array.isArray(a)?a[0]:a;if(typeof t=="string")return am(e,t,i,r,n,c);if(Array.isArray(t)){let s=null;for(const l of t)if(s=am(e,l,i,r,n,c),s)break;return s}return typeof t=="function"?t(e):null},A1=e=>e?new Date(e):new Date,Se1=(e,t,a)=>{if(t){const n=(e.getMonth()+1).toString().padStart(2,"0"),c=e.getDate().toString().padStart(2,"0"),i=e.getHours().toString().padStart(2,"0"),s=e.getMinutes().toString().padStart(2,"0"),l=a?e.getSeconds().toString().padStart(2,"0"):"00";return`${e.getFullYear()}-${n}-${c}T${i}:${s}:${l}.000Z`}const r=Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds());return new Date(r).toISOString()},k3=e=>{let t=A1(JSON.parse(JSON.stringify(e)));return t=Zx(t,0),t=Qx(t,0),t=El(t,0),t=Tl(t,0),t},n0=(e,t,a,r)=>{let n=e?A1(e):A1();return(t||t===0)&&(n=Zx(n,+t)),(a||a===0)&&(n=Qx(n,+a)),(r||r===0)&&(n=El(n,+r)),Tl(n,0)},ne=(e,t)=>!e||!t?!1:tn(k3(e),k3(t)),l2=(e,t)=>!e||!t?!1:P6(k3(e),k3(t)),me=(e,t)=>!e||!t?!1:na(k3(e),k3(t)),O5=(e,t,a)=>e!=null&&e[0]&&e!=null&&e[1]?me(a,e[0])&&ne(a,e[1]):e!=null&&e[0]&&t?me(a,e[0])&&ne(a,t)||ne(a,e[0])&&me(a,t):!1,e4=e=>{const t=N2(new Date(e),{date:1});return k3(t)},as=(e,t,a)=>t&&(a||a===0)?Object.fromEntries(["hours","minutes","seconds"].map(r=>r===t?[r,a]:[r,isNaN(+e[r])?void 0:+e[r]])):{hours:isNaN(+e.hours)?void 0:+e.hours,minutes:isNaN(+e.minutes)?void 0:+e.minutes,seconds:isNaN(+e.seconds)?void 0:+e.seconds},X0=e=>({hours:wt(e),minutes:h0(e),seconds:ra(e)}),ib=(e,t)=>{if(t){const a=n2(A1(t));if(a>e)return 12;if(a===e)return o2(A1(t))}},sb=(e,t)=>{if(t){const a=n2(A1(t));return a<e?-1:a===e?o2(A1(t)):void 0}},sa=e=>{if(e)return n2(A1(e))},ob=(e,t)=>{const a=me(e,t)?t:e,r=me(t,e)?t:e;return Fx({start:a,end:r})},Ae1=e=>{const t=f4(e,1);return{month:o2(t),year:n2(t)}},nt=(e,t)=>{const a=y4(e,{weekStartsOn:+t}),r=Ix(e,{weekStartsOn:+t});return[a,r]},lb=(e,t)=>{const a={hours:wt(A1()),minutes:h0(A1()),seconds:t?ra(A1()):0};return Object.assign(a,e)},Xt=(e,t,a)=>[N2(A1(e),{date:1}),N2(A1(),{month:t,year:a,date:1})],ut=(e,t,a)=>{let r=e?A1(e):A1();return(t||t===0)&&(r=Kx(r,t)),a&&(r=E4(r,a)),r},fb=(e,t,a,r,n)=>{if(!r||n&&!t||!n&&!a)return!1;const c=n?f4(e,1):ca(e,1),i=[o2(c),n2(c)];return n?!Ee1(...i,t):!Te1(...i,a)},Te1=(e,t,a)=>ne(...Xt(a,e,t))||l2(...Xt(a,e,t)),Ee1=(e,t,a)=>me(...Xt(a,e,t))||l2(...Xt(a,e,t)),ub=(e,t,a,r,n,c,i)=>{if(typeof t=="function"&&!i)return t(e);const s=a?{locale:a}:void 0;return Array.isArray(e)?`${P4(e[0],c,s)}${n&&!e[1]?"":r}${e[1]?P4(e[1],c,s):""}`:P4(e,c,s)},V6=e=>{if(e)return null;throw new Error(Rl.prop("partial-range"))},z8=(e,t)=>{if(t)return e();throw new Error(Rl.prop("range"))},O7=e=>Array.isArray(e)?vr(e[0])&&(e[1]?vr(e[1]):!0):e?vr(e):!1,Ne1=(e,t)=>N2(t??A1(),{hours:+e.hours||0,minutes:+e.minutes||0,seconds:+e.seconds||0}),rs=(e,t,a,r)=>{if(!e)return!0;if(r){const n=a==="max"?tn(e,t):na(e,t),c={seconds:0,milliseconds:0};return n||P6(N2(e,c),N2(t,c))}return a==="max"?e.getTime()<=t.getTime():e.getTime()>=t.getTime()},ns=(e,t,a)=>e?Ne1(e,t):A1(a??t),rm=(e,t,a,r,n)=>{if(Array.isArray(r)){const i=ns(e,r[0],t),s=ns(e,r[1],t);return rs(r[0],i,a,!!t)&&rs(r[1],s,a,!!t)&&n}const c=ns(e,r,t);return rs(r,c,a,!!t)&&n},cs=e=>N2(A1(),X0(e)),De1=(e,t)=>e instanceof Map?Array.from(e.values()).filter(a=>n2(A1(a))===t).map(a=>o2(a)):[],db=(e,t,a)=>typeof e=="function"?e({month:t,year:a}):!!e.months.find(r=>r.month===t&&r.year===a),$l=(e,t)=>typeof e=="function"?e(t):e.years.includes(t),Ra=o.reactive({menuFocused:!1,shiftKeyInMenu:!1}),hb=()=>{const e=a=>{Ra.menuFocused=a},t=a=>{Ra.shiftKeyInMenu!==a&&(Ra.shiftKeyInMenu=a)};return{control:o.computed(()=>({shiftKeyInMenu:Ra.shiftKeyInMenu,menuFocused:Ra.menuFocused})),setMenuFocused:e,setShiftKey:t}},P2=o.reactive({monthYear:[],calendar:[],time:[],actionRow:[],selectionGrid:[],timePicker:{0:[],1:[]},monthPicker:[]}),is=o.ref(null),w8=o.ref(!1),ss=o.ref(!1),os=o.ref(!1),ls=o.ref(!1),We=o.ref(0),ue=o.ref(0),x0=()=>{const e=o.computed(()=>w8.value?[...P2.selectionGrid,P2.actionRow].filter(d=>d.length):ss.value?[...P2.timePicker[0],...P2.timePicker[1],ls.value?[]:[is.value],P2.actionRow].filter(d=>d.length):os.value?[...P2.monthPicker,P2.actionRow]:[P2.monthYear,...P2.calendar,P2.time,P2.actionRow].filter(d=>d.length)),t=d=>{We.value=d?We.value+1:We.value-1;let h=null;e.value[ue.value]&&(h=e.value[ue.value][We.value]),!h&&e.value[ue.value+(d?1:-1)]?(ue.value=ue.value+(d?1:-1),We.value=d?0:e.value[ue.value].length-1):h||(We.value=d?We.value-1:We.value+1)},a=d=>{ue.value===0&&!d||ue.value===e.value.length&&d||(ue.value=d?ue.value+1:ue.value-1,e.value[ue.value]?e.value[ue.value]&&!e.value[ue.value][We.value]&&We.value!==0&&(We.value=e.value[ue.value].length-1):ue.value=d?ue.value-1:ue.value+1)},r=d=>{let h=null;e.value[ue.value]&&(h=e.value[ue.value][We.value]),h?h.focus({preventScroll:!w8.value}):We.value=d?We.value-1:We.value+1},n=()=>{t(!0),r(!0)},c=()=>{t(!1),r(!1)},i=()=>{a(!1),r(!0)},s=()=>{a(!0),r(!0)},l=(d,h)=>{P2[h]=d},f=(d,h)=>{P2[h]=d},u=()=>{We.value=0,ue.value=0};return{buildMatrix:l,buildMultiLevelMatrix:f,setTimePickerBackRef:d=>{is.value=d},setSelectionGrid:d=>{w8.value=d,u(),d||(P2.selectionGrid=[])},setTimePicker:(d,h=!1)=>{ss.value=d,ls.value=h,u(),d||(P2.timePicker[0]=[],P2.timePicker[1]=[])},setTimePickerElements:(d,h=0)=>{P2.timePicker[h]=d},arrowRight:n,arrowLeft:c,arrowUp:i,arrowDown:s,clearArrowNav:()=>{P2.monthYear=[],P2.calendar=[],P2.time=[],P2.actionRow=[],P2.selectionGrid=[],P2.timePicker[0]=[],P2.timePicker[1]=[],w8.value=!1,ss.value=!1,ls.value=!1,os.value=!1,u(),is.value=null},setMonthPicker:d=>{os.value=d,u()},refSets:P2}},nm=e=>({menuAppearTop:"dp-menu-appear-top",menuAppearBottom:"dp-menu-appear-bottom",open:"dp-slide-down",close:"dp-slide-up",next:"calendar-next",previous:"calendar-prev",vNext:"dp-slide-up",vPrevious:"dp-slide-down",...e??{}}),Oe1=e=>({toggleOverlay:"Toggle overlay",menu:"Datepicker menu",input:"Datepicker input",calendarWrap:"Calendar wrapper",calendarDays:"Calendar days",openTimePicker:"Open time picker",closeTimePicker:"Close time Picker",incrementValue:t=>`Increment ${t}`,decrementValue:t=>`Decrement ${t}`,openTpOverlay:t=>`Open ${t} overlay`,amPmButton:"Switch AM/PM mode",openYearsOverlay:"Open years overlay",openMonthsOverlay:"Open months overlay",nextMonth:"Next month",prevMonth:"Previous month",nextYear:"Next year",prevYear:"Previous year",day:void 0,weekDay:void 0,...e??{}}),cm=e=>e?typeof e=="boolean"?e?2:0:+e>=2?+e:2:0,Pe1=e=>{const t=typeof e=="object"&&e,a={static:!0,solo:!1};if(!e)return{...a,count:cm(!1)};const r=t?e:{},n=t?r.count??!0:e,c=cm(n);return Object.assign(a,r,{count:c})},Be1=(e,t,a)=>e||(typeof a=="string"?a:t),Fe1=e=>typeof e=="boolean"?e?nm({}):!1:nm(e),Re1=e=>{const t={enterSubmit:!0,tabSubmit:!0,openMenu:!0,selectOnFocus:!1,rangeSeparator:" - "};return typeof e=="object"?{...t,...e??{},enabled:!0}:{...t,enabled:e}},Ie1=e=>({months:[],years:[],times:{hours:[],minutes:[],seconds:[]},...e??{}}),$e1=e=>({showSelect:!0,showCancel:!0,showNow:!1,showPreview:!0,...e??{}}),Ue1=e=>{const t={input:!1};return typeof e=="object"?{...t,...e??{},enabled:!0}:{enabled:e,...t}},We1=e=>({allowStopPropagation:!0,closeOnScroll:!1,modeHeight:255,allowPreventDefault:!1,closeOnClearValue:!0,closeOnAutoApply:!0,noSwipe:!1,keepActionRow:!1,onClickOutside:void 0,tabOutClosesMenu:!0,arrowLeft:void 0,keepViewOnOffsetClick:!1,timeArrowHoldThreshold:0,...e??{}}),qe1=e=>{const t={dates:Array.isArray(e)?e.map(a=>A1(a)):[],years:[],months:[],quarters:[],weeks:[],weekdays:[],options:{highlightDisabled:!1}};return typeof e=="function"?e:{...t,...e??{}}},je1=e=>typeof e=="object"?{type:(e==null?void 0:e.type)??"local",hideOnOffsetDates:(e==null?void 0:e.hideOnOffsetDates)??!1}:{type:e,hideOnOffsetDates:!1},Ye1=(e,t)=>typeof e=="object"?{enabled:!0,...{noDisabledRange:!1,showLastInRange:!0,minMaxRawRange:!1,partialRange:!0,disableTimeRangeValidation:!1,maxRange:void 0,minRange:void 0,autoRange:void 0,fixedStart:!1,fixedEnd:!1},...e}:{enabled:e,noDisabledRange:t.noDisabledRange,showLastInRange:t.showLastInRange,minMaxRawRange:t.minMaxRawRange,partialRange:t.partialRange,disableTimeRangeValidation:t.disableTimeRangeValidation,maxRange:t.maxRange,minRange:t.minRange,autoRange:t.autoRange,fixedStart:t.fixedStart,fixedEnd:t.fixedEnd},Ge1=(e,t)=>e?typeof e=="string"?{timezone:e,exactMatch:!1,dateInTz:void 0,emitTimezone:t,convertModel:!0}:{timezone:e.timezone,exactMatch:e.exactMatch??!1,dateInTz:e.dateInTz??void 0,emitTimezone:t??e.emitTimezone,convertModel:e.convertModel??!0}:{timezone:void 0,exactMatch:!1,emitTimezone:t},fs=(e,t)=>new Map(e.map(a=>{const r=tb(a,t);return[Il(r),r]})),Xe1=(e,t)=>e.length?new Map(e.map(a=>{const r=tb(a.date,t);return[Il(r),a]})):null,Ke1=(e,t,a,r,n,c,i)=>({minDate:D7(e,i),maxDate:D7(t,i),disabledDates:ts(a)?fs(a,i):a,allowedDates:ts(r)?fs(r,i):null,highlight:typeof n=="object"&&ts(n==null?void 0:n.dates)?fs(n.dates,i):n,markers:Xe1(c,i)}),Ze1=(e,t)=>typeof e=="boolean"?{enabled:e,dragSelect:!0,limit:+t}:{enabled:!!e,limit:e.limit?+e.limit:null,dragSelect:e.dragSelect??!0},re=e=>{const t=()=>{const M=e.enableSeconds?":ss":"",w=e.enableMinutes?":mm":"";return e.is24?`HH${w}${M}`:`hh${w}${M} aa`},a=()=>{var M;return e.format?e.format:e.monthPicker?"MM/yyyy":e.timePicker?t():e.weekPicker?`${((M=g.value)==null?void 0:M.type)==="iso"?"RR":"ww"}-yyyy`:e.yearPicker?"yyyy":e.quarterPicker?"QQQ/yyyy":e.enableTimePicker?`MM/dd/yyyy, ${t()}`:"MM/dd/yyyy"},r=M=>lb(M,e.enableSeconds),n=()=>b.value.enabled?e.startTime&&Array.isArray(e.startTime)?[r(e.startTime[0]),r(e.startTime[1])]:null:e.startTime&&!Array.isArray(e.startTime)?r(e.startTime):null,c=o.computed(()=>Pe1(e.multiCalendars)),i=o.computed(()=>n()),s=o.computed(()=>Oe1(e.ariaLabels)),l=o.computed(()=>Ie1(e.filters)),f=o.computed(()=>Fe1(e.transitions)),u=o.computed(()=>$e1(e.actionRow)),d=o.computed(()=>Be1(e.previewFormat,e.format,a())),h=o.computed(()=>Re1(e.textInput)),m=o.computed(()=>Ue1(e.inline)),v=o.computed(()=>We1(e.config)),p=o.computed(()=>qe1(e.highlight)),g=o.computed(()=>je1(e.weekNumbers)),y=o.computed(()=>Ge1(e.timezone,e.emitTimezone)),x=o.computed(()=>Ze1(e.multiDates,e.multiDatesLimit)),C=o.computed(()=>Ke1(e.minDate,e.maxDate,e.disabledDates,e.allowedDates,p.value,e.markers,y.value)),b=o.computed(()=>Ye1(e.range,{minMaxRawRange:!1,maxRange:e.maxRange,minRange:e.minRange,noDisabledRange:e.noDisabledRange,showLastInRange:e.showLastInRange,partialRange:e.partialRange,disableTimeRangeValidation:e.disableTimeRangeValidation,autoRange:e.autoRange,fixedStart:e.fixedStart,fixedEnd:e.fixedEnd}));return{defaultedTransitions:f,defaultedMultiCalendars:c,defaultedStartTime:i,defaultedAriaLabels:s,defaultedFilters:l,defaultedActionRow:u,defaultedPreviewFormat:d,defaultedTextInput:h,defaultedInline:m,defaultedConfig:v,defaultedHighlight:p,defaultedWeekNumbers:g,defaultedRange:b,propDates:C,defaultedTz:y,defaultedMultiDates:x,getDefaultPattern:a,getDefaultStartTime:n}},Qe1=(e,t,a)=>{const r=o.ref(),{defaultedTextInput:n,defaultedRange:c,defaultedTz:i,defaultedMultiDates:s,getDefaultPattern:l}=re(t),f=o.ref(""),u=o.toRef(t,"format"),d=o.toRef(t,"formatLocale");o.watch(r,()=>{typeof t.onInternalModelChange=="function"&&e("internal-model-change",r.value,E(!0))},{deep:!0}),o.watch(c,(R,a1)=>{R.enabled!==a1.enabled&&(r.value=null)}),o.watch(u,()=>{J()});const h=R=>i.value.timezone&&i.value.convertModel?B4(R,i.value.timezone):R,m=R=>{if(i.value.timezone&&i.value.convertModel){const a1=ye1(i.value.timezone);return C11(R,a1)}return R},v=(R,a1,n1=!1)=>ub(R,t.format,t.formatLocale,n.value.rangeSeparator,t.modelAuto,a1??l(),n1),p=R=>R?t.modelType?G(R):{hours:wt(R),minutes:h0(R),seconds:t.enableSeconds?ra(R):0}:null,g=R=>t.modelType?G(R):{month:o2(R),year:n2(R)},y=R=>Array.isArray(R)?s.value.enabled?R.map(a1=>x(a1,E4(A1(),a1))):z8(()=>[E4(A1(),R[0]),R[1]?E4(A1(),R[1]):V6(c.value.partialRange)],c.value.enabled):E4(A1(),+R),x=(R,a1)=>(typeof R=="string"||typeof R=="number")&&t.modelType?Y(R):a1,C=R=>Array.isArray(R)?[x(R[0],n0(null,+R[0].hours,+R[0].minutes,R[0].seconds)),x(R[1],n0(null,+R[1].hours,+R[1].minutes,R[1].seconds))]:x(R,n0(null,R.hours,R.minutes,R.seconds)),b=R=>{const a1=N2(A1(),{date:1});return Array.isArray(R)?s.value.enabled?R.map(n1=>x(n1,ut(a1,+n1.month,+n1.year))):z8(()=>[x(R[0],ut(a1,+R[0].month,+R[0].year)),x(R[1],R[1]?ut(a1,+R[1].month,+R[1].year):V6(c.value.partialRange))],c.value.enabled):x(R,ut(a1,+R.month,+R.year))},M=R=>{if(Array.isArray(R))return R.map(a1=>Y(a1));throw new Error(Rl.dateArr("multi-dates"))},w=R=>{if(Array.isArray(R)&&c.value.enabled){const a1=R[0],n1=R[1];return[A1(Array.isArray(a1)?a1[0]:null),A1(Array.isArray(n1)?n1[0]:null)]}return A1(R[0])},z=R=>t.modelAuto?Array.isArray(R)?[Y(R[0]),Y(R[1])]:t.autoApply?[Y(R)]:[Y(R),null]:Array.isArray(R)?z8(()=>R[1]?[Y(R[0]),R[1]?Y(R[1]):V6(c.value.partialRange)]:[Y(R[0])],c.value.enabled):Y(R),H=()=>{Array.isArray(r.value)&&c.value.enabled&&r.value.length===1&&r.value.push(V6(c.value.partialRange))},A=()=>{const R=r.value;return[G(R[0]),R[1]?G(R[1]):V6(c.value.partialRange)]},V=()=>r.value[1]?A():G(Te(r.value[0])),k=()=>(r.value||[]).map(R=>G(R)),_=(R=!1)=>(R||H(),t.modelAuto?V():s.value.enabled?k():Array.isArray(r.value)?z8(()=>A(),c.value.enabled):G(Te(r.value))),N=R=>!R||Array.isArray(R)&&!R.length?null:t.timePicker?C(Te(R)):t.monthPicker?b(Te(R)):t.yearPicker?y(Te(R)):s.value.enabled?M(Te(R)):t.weekPicker?w(Te(R)):z(Te(R)),q=R=>{const a1=N(R);O7(Te(a1))?(r.value=Te(a1),J()):(r.value=null,f.value="")},S=()=>{const R=a1=>P4(a1,n.value.format);return`${R(r.value[0])} ${n.value.rangeSeparator} ${r.value[1]?R(r.value[1]):""}`},O=()=>a.value&&r.value?Array.isArray(r.value)?S():P4(r.value,n.value.format):v(r.value),U=()=>r.value?s.value.enabled?r.value.map(R=>v(R)).join("; "):n.value.enabled&&typeof n.value.format=="string"?O():v(r.value):"",J=()=>{!t.format||typeof t.format=="string"||n.value.enabled&&typeof n.value.format=="string"?f.value=U():f.value=t.format(r.value)},Y=R=>{if(t.utc){const a1=new Date(R);return t.utc==="preserve"?new Date(a1.getTime()+a1.getTimezoneOffset()*6e4):a1}return t.modelType?xe1.includes(t.modelType)?h(new Date(R)):t.modelType==="format"&&(typeof t.format=="string"||!t.format)?h(N7(R,l(),new Date,{locale:d.value})):h(N7(R,t.modelType,new Date,{locale:d.value})):h(new Date(R))},G=R=>R?t.utc?Se1(R,t.utc==="preserve",t.enableSeconds):t.modelType?t.modelType==="timestamp"?+m(R):t.modelType==="iso"?m(R).toISOString():t.modelType==="format"&&(typeof t.format=="string"||!t.format)?v(m(R)):v(m(R),t.modelType,!0):m(R):"",B=(R,a1=!1,n1=!1)=>{if(n1)return R;if(e("update:model-value",R),i.value.emitTimezone&&a1){const t1=Array.isArray(R)?R.map(d1=>B4(Te(d1),i.value.emitTimezone)):B4(Te(R),i.value.emitTimezone);e("update:model-timezone-value",t1)}},T=R=>Array.isArray(r.value)?s.value.enabled?r.value.map(a1=>R(a1)):[R(r.value[0]),r.value[1]?R(r.value[1]):V6(c.value.partialRange)]:R(Te(r.value)),L=()=>{if(Array.isArray(r.value)){const R=nt(r.value[0],t.weekStart),a1=r.value[1]?nt(r.value[1],t.weekStart):[];return[R.map(n1=>A1(n1)),a1.map(n1=>A1(n1))]}return nt(r.value,t.weekStart).map(R=>A1(R))},W=(R,a1)=>B(Te(T(R)),!1,a1),j=R=>{const a1=L();return R?a1:e("update:model-value",L())},E=(R=!1)=>(R||J(),t.monthPicker?W(g,R):t.timePicker?W(p,R):t.yearPicker?W(n2,R):t.weekPicker?j(R):B(_(R),!0,R));return{inputValue:f,internalModelValue:r,checkBeforeEmit:()=>r.value?c.value.enabled?c.value.partialRange?r.value.length>=1:r.value.length===2:!!r.value:!1,parseExternalModelValue:q,formatInputValue:J,emitModelValue:E}},Je1=(e,t)=>{const{defaultedFilters:a,propDates:r}=re(e),{validateMonthYearInRange:n}=b0(e),c=(u,d)=>{let h=u;return a.value.months.includes(o2(h))?(h=d?f4(u,1):ca(u,1),c(h,d)):h},i=(u,d)=>{let h=u;return a.value.years.includes(n2(h))?(h=d?_l(u,1):Jx(u,1),i(h,d)):h},s=(u,d=!1)=>{const h=N2(A1(),{month:e.month,year:e.year});let m=u?f4(h,1):ca(h,1);e.disableYearSelect&&(m=E4(m,e.year));let v=o2(m),p=n2(m);a.value.months.includes(v)&&(m=c(m,u),v=o2(m),p=n2(m)),a.value.years.includes(p)&&(m=i(m,u),p=n2(m)),n(v,p,u,e.preventMinMaxNavigation)&&l(v,p,d)},l=(u,d,h)=>{t("update-month-year",{month:u,year:d,fromNav:h})},f=o.computed(()=>u=>fb(N2(A1(),{month:e.month,year:e.year}),r.value.maxDate,r.value.minDate,e.preventMinMaxNavigation,u));return{handleMonthYearChange:s,isDisabled:f,updateMonthYear:l}};var T6=(e=>(e.center="center",e.left="left",e.right="right",e))(T6||{});const e31=({menuRef:e,menuRefInner:t,inputRef:a,pickerWrapperRef:r,inline:n,emit:c,props:i,slots:s})=>{const l=o.ref({}),f=o.ref(!1),u=o.ref({top:"0",left:"0"}),d=o.ref(!1),h=o.toRef(i,"teleportCenter");o.watch(h,()=>{u.value=JSON.parse(JSON.stringify({})),b()});const m=S=>{if(i.teleport){const O=S.getBoundingClientRect();return{left:O.left+window.scrollX,top:O.top+window.scrollY}}return{top:0,left:0}},v=(S,O)=>{u.value.left=`${S+O-l.value.width}px`},p=S=>{u.value.left=`${S}px`},g=(S,O)=>{i.position===T6.left&&p(S),i.position===T6.right&&v(S,O),i.position===T6.center&&(u.value.left=`${S+O/2-l.value.width/2}px`)},y=S=>{const{width:O,height:U}=S.getBoundingClientRect(),{top:J,left:Y}=i.altPosition?i.altPosition(S):m(S);return{top:+J,left:+Y,width:O,height:U}},x=()=>{u.value.left="50%",u.value.top="50%",u.value.transform="translate(-50%, -50%)",u.value.position="fixed",delete u.value.opacity},C=()=>{const S=ke(a),{top:O,left:U,transform:J}=i.altPosition(S);u.value={top:`${O}px`,left:`${U}px`,transform:J??""}},b=(S=!0)=>{var O;if(!n.value.enabled){if(h.value)return x();if(i.altPosition!==null)return C();if(S){const U=i.teleport?(O=t.value)==null?void 0:O.$el:e.value;U&&(l.value=U.getBoundingClientRect()),c("recalculate-position")}return k()}},M=({inputEl:S,left:O,width:U})=>{window.screen.width>768&&!f.value&&g(O,U),H(S)},w=S=>{const{top:O,left:U,height:J,width:Y}=y(S);u.value.top=`${J+O+ +i.offset}px`,d.value=!1,f.value||(u.value.left=`${U+Y/2-l.value.width/2}px`),M({inputEl:S,left:U,width:Y})},z=S=>{const{top:O,left:U,width:J}=y(S);u.value.top=`${O-+i.offset-l.value.height}px`,d.value=!0,M({inputEl:S,left:U,width:J})},H=S=>{if(i.autoPosition){const{left:O,width:U}=y(S),{left:J,right:Y}=l.value;if(!f.value){if(Math.abs(J)!==Math.abs(Y)){if(J<=0)return f.value=!0,p(O);if(Y>=document.documentElement.clientWidth)return f.value=!0,v(O,U)}return g(O,U)}}},A=()=>{const S=ke(a);if(S){const{height:O}=l.value,{top:U,height:J}=S.getBoundingClientRect(),Y=window.innerHeight-U-J,G=U;return O<=Y?O0.bottom:O>Y&&O<=G?O0.top:Y>=G?O0.bottom:O0.top}return O0.bottom},V=S=>A()===O0.bottom?w(S):z(S),k=()=>{const S=ke(a);if(S)return i.autoPosition?V(S):w(S)},_=function(S){if(S){const O=S.scrollHeight>S.clientHeight,U=window.getComputedStyle(S).overflowY.indexOf("hidden")!==-1;return O&&!U}return!0},N=function(S){return!S||S===document.body||S.nodeType===Node.DOCUMENT_FRAGMENT_NODE?window:_(S)?S:N(S.assignedSlot?S.assignedSlot.parentNode:S.parentNode)},q=S=>{if(S)switch(i.position){case T6.left:return{left:0,transform:"translateX(0)"};case T6.right:return{left:`${S.width}px`,transform:"translateX(-100%)"};default:return{left:`${S.width/2}px`,transform:"translateX(-50%)"}}return{}};return{openOnTop:d,menuStyle:u,xCorrect:f,setMenuPosition:b,getScrollableParent:N,shadowRender:(S,O)=>{var U,J,Y;const G=document.createElement("div"),B=(U=ke(a))==null?void 0:U.getBoundingClientRect();G.setAttribute("id","dp--temp-container");const T=(J=r.value)!=null&&J.clientWidth?r.value:document.body;T.append(G);const L=q(B),W=o.h(S,{...O,shadow:!0,style:{opacity:0,position:"absolute",...L}},Object.fromEntries(Object.keys(s).filter(j=>["right-sidebar","left-sidebar","top-extra","action-extra"].includes(j)).map(j=>[j,s[j]])));o.render(W,G),l.value=(Y=W.el)==null?void 0:Y.getBoundingClientRect(),o.render(null,G),T.removeChild(G)}}},Dt=[{name:"clock-icon",use:["time","calendar","shared"]},{name:"arrow-left",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-right",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-up",use:["time","calendar","month-year","shared"]},{name:"arrow-down",use:["time","calendar","month-year","shared"]},{name:"calendar-icon",use:["month-year","time","calendar","shared","year-mode"]},{name:"day",use:["calendar","shared"]},{name:"month-overlay-value",use:["calendar","month-year","shared"]},{name:"year-overlay-value",use:["calendar","month-year","shared","year-mode"]},{name:"year-overlay",use:["month-year","shared"]},{name:"month-overlay",use:["month-year","shared"]},{name:"month-overlay-header",use:["month-year","shared"]},{name:"year-overlay-header",use:["month-year","shared"]},{name:"hours-overlay-value",use:["calendar","time","shared"]},{name:"hours-overlay-header",use:["calendar","time","shared"]},{name:"minutes-overlay-value",use:["calendar","time","shared"]},{name:"minutes-overlay-header",use:["calendar","time","shared"]},{name:"seconds-overlay-value",use:["calendar","time","shared"]},{name:"seconds-overlay-header",use:["calendar","time","shared"]},{name:"hours",use:["calendar","time","shared"]},{name:"minutes",use:["calendar","time","shared"]},{name:"month",use:["calendar","month-year","shared"]},{name:"year",use:["calendar","month-year","shared","year-mode"]},{name:"action-buttons",use:["action"]},{name:"action-preview",use:["action"]},{name:"calendar-header",use:["calendar","shared"]},{name:"marker-tooltip",use:["calendar","shared"]},{name:"action-extra",use:["menu"]},{name:"time-picker-overlay",use:["calendar","time","shared"]},{name:"am-pm-button",use:["calendar","time","shared"]},{name:"left-sidebar",use:["menu"]},{name:"right-sidebar",use:["menu"]},{name:"month-year",use:["month-year","shared"]},{name:"time-picker",use:["menu","shared"]},{name:"action-row",use:["action"]},{name:"marker",use:["calendar","shared"]},{name:"quarter",use:["shared"]},{name:"top-extra",use:["shared","month-year"]}],t31=[{name:"trigger"},{name:"input-icon"},{name:"clear-icon"},{name:"dp-input"}],a31={all:()=>Dt,monthYear:()=>Dt.filter(e=>e.use.includes("month-year")),input:()=>t31,timePicker:()=>Dt.filter(e=>e.use.includes("time")),action:()=>Dt.filter(e=>e.use.includes("action")),calendar:()=>Dt.filter(e=>e.use.includes("calendar")),menu:()=>Dt.filter(e=>e.use.includes("menu")),shared:()=>Dt.filter(e=>e.use.includes("shared")),yearMode:()=>Dt.filter(e=>e.use.includes("year-mode"))},z3=(e,t,a)=>{const r=[];return a31[t]().forEach(n=>{e[n.name]&&r.push(n.name)}),a!=null&&a.length&&a.forEach(n=>{n.slot&&r.push(n.slot)}),r},An=e=>{const t=o.computed(()=>r=>e.value?r?e.value.open:e.value.close:""),a=o.computed(()=>r=>e.value?r?e.value.menuAppearTop:e.value.menuAppearBottom:"");return{transitionName:t,showTransition:!!e.value,menuTransition:a}},Tn=(e,t)=>{const{defaultedRange:a,defaultedTz:r}=re(e),n=A1(B4(A1(),r.value.timezone)),c=o.ref([{month:o2(n),year:n2(n)}]),i=d=>{const h={hours:wt(n),minutes:h0(n),seconds:0};return a.value.enabled?[h[d],h[d]]:h[d]},s=o.reactive({hours:i("hours"),minutes:i("minutes"),seconds:i("seconds")});o.watch(a,(d,h)=>{d.enabled!==h.enabled&&(s.hours=i("hours"),s.minutes=i("minutes"),s.seconds=i("seconds"))},{deep:!0});const l=o.computed({get:()=>e.internalModelValue,set:d=>{!e.readonly&&!e.disabled&&t("update:internal-model-value",d)}}),f=o.computed(()=>d=>c.value[d]?c.value[d].month:0),u=o.computed(()=>d=>c.value[d]?c.value[d].year:0);return{calendars:c,time:s,modelValue:l,month:f,year:u,today:n}},r31=(e,t)=>{const{defaultedMultiCalendars:a,defaultedMultiDates:r,defaultedHighlight:n,defaultedTz:c,propDates:i,defaultedRange:s}=re(t),{isDisabled:l}=b0(t),f=o.ref(null),u=o.ref(B4(new Date,c.value.timezone)),d=L=>{!L.current&&t.hideOffsetDates||(f.value=L.value)},h=()=>{f.value=null},m=L=>Array.isArray(e.value)&&s.value.enabled&&e.value[0]&&f.value?L?me(f.value,e.value[0]):ne(f.value,e.value[0]):!0,v=(L,W)=>{const j=()=>e.value?W?e.value[0]||null:e.value[1]:null,E=e.value&&Array.isArray(e.value)?j():null;return l2(A1(L.value),E)},p=L=>{const W=Array.isArray(e.value)?e.value[0]:null;return L?!ne(f.value??null,W):!0},g=(L,W=!0)=>(s.value.enabled||t.weekPicker)&&Array.isArray(e.value)&&e.value.length===2?t.hideOffsetDates&&!L.current?!1:l2(A1(L.value),e.value[W?0:1]):s.value.enabled?v(L,W)&&p(W)||l2(L.value,Array.isArray(e.value)?e.value[0]:null)&&m(W):!1,y=(L,W)=>{if(Array.isArray(e.value)&&e.value[0]&&e.value.length===1){const j=l2(L.value,f.value);return W?me(e.value[0],L.value)&&j:ne(e.value[0],L.value)&&j}return!1},x=L=>!e.value||t.hideOffsetDates&&!L.current?!1:s.value.enabled?t.modelAuto&&Array.isArray(e.value)?l2(L.value,e.value[0]?e.value[0]:u.value):!1:r.value.enabled&&Array.isArray(e.value)?e.value.some(W=>l2(W,L.value)):l2(L.value,e.value?e.value:u.value),C=L=>{if(s.value.autoRange||t.weekPicker){if(f.value){if(t.hideOffsetDates&&!L.current)return!1;const W=J3(f.value,+s.value.autoRange),j=nt(A1(f.value),t.weekStart);return t.weekPicker?l2(j[1],A1(L.value)):l2(W,A1(L.value))}return!1}return!1},b=L=>{if(s.value.autoRange||t.weekPicker){if(f.value){const W=J3(f.value,+s.value.autoRange);if(t.hideOffsetDates&&!L.current)return!1;const j=nt(A1(f.value),t.weekStart);return t.weekPicker?me(L.value,j[0])&&ne(L.value,j[1]):me(L.value,f.value)&&ne(L.value,W)}return!1}return!1},M=L=>{if(s.value.autoRange||t.weekPicker){if(f.value){if(t.hideOffsetDates&&!L.current)return!1;const W=nt(A1(f.value),t.weekStart);return t.weekPicker?l2(W[0],L.value):l2(f.value,L.value)}return!1}return!1},w=L=>O5(e.value,f.value,L.value),z=()=>t.modelAuto&&Array.isArray(t.internalModelValue)?!!t.internalModelValue[0]:!1,H=()=>t.modelAuto?rb(t.internalModelValue):!0,A=L=>{if(t.weekPicker)return!1;const W=s.value.enabled?!g(L)&&!g(L,!1):!0;return!l(L.value)&&!x(L)&&!(!L.current&&t.hideOffsetDates)&&W},V=L=>s.value.enabled?t.modelAuto?z()&&x(L):!1:x(L),k=L=>n.value?Ve1(L.value,i.value.highlight):!1,_=L=>{const W=l(L.value);return W&&(typeof n.value=="function"?!n.value(L.value,W):!n.value.options.highlightDisabled)},N=L=>{var W;return typeof n.value=="function"?n.value(L.value):(W=n.value.weekdays)==null?void 0:W.includes(L.value.getDay())},q=L=>(s.value.enabled||t.weekPicker)&&(!(a.value.count>0)||L.current)&&H()&&!(!L.current&&t.hideOffsetDates)&&!x(L)?w(L):!1,S=L=>{const{isRangeStart:W,isRangeEnd:j}=Y(L),E=s.value.enabled?W||j:!1;return{dp__cell_offset:!L.current,dp__pointer:!t.disabled&&!(!L.current&&t.hideOffsetDates)&&!l(L.value),dp__cell_disabled:l(L.value),dp__cell_highlight:!_(L)&&(k(L)||N(L))&&!V(L)&&!E&&!M(L)&&!(q(L)&&t.weekPicker)&&!j,dp__cell_highlight_active:!_(L)&&(k(L)||N(L))&&V(L),dp__today:!t.noToday&&l2(L.value,u.value)&&L.current,"dp--past":ne(L.value,u.value),"dp--future":me(L.value,u.value)}},O=L=>({dp__active_date:V(L),dp__date_hover:A(L)}),U=L=>{if(e.value&&!Array.isArray(e.value)){const W=nt(e.value,t.weekStart);return{...B(L),dp__range_start:l2(W[0],L.value),dp__range_end:l2(W[1],L.value),dp__range_between_week:me(L.value,W[0])&&ne(L.value,W[1])}}return{...B(L)}},J=L=>{if(e.value&&Array.isArray(e.value)){const W=nt(e.value[0],t.weekStart),j=e.value[1]?nt(e.value[1],t.weekStart):[];return{...B(L),dp__range_start:l2(W[0],L.value)||l2(j[0],L.value),dp__range_end:l2(W[1],L.value)||l2(j[1],L.value),dp__range_between_week:me(L.value,W[0])&&ne(L.value,W[1])||me(L.value,j[0])&&ne(L.value,j[1]),dp__range_between:me(L.value,W[1])&&ne(L.value,j[0])}}return{...B(L)}},Y=L=>{const W=a.value.count>0?L.current&&g(L)&&H():g(L)&&H(),j=a.value.count>0?L.current&&g(L,!1)&&H():g(L,!1)&&H();return{isRangeStart:W,isRangeEnd:j}},G=L=>{const{isRangeStart:W,isRangeEnd:j}=Y(L);return{dp__range_start:W,dp__range_end:j,dp__range_between:q(L),dp__date_hover:l2(L.value,f.value)&&!W&&!j&&!t.weekPicker,dp__date_hover_start:y(L,!0),dp__date_hover_end:y(L,!1)}},B=L=>({...G(L),dp__cell_auto_range:b(L),dp__cell_auto_range_start:M(L),dp__cell_auto_range_end:C(L)}),T=L=>s.value.enabled?s.value.autoRange?B(L):t.modelAuto?{...O(L),...G(L)}:t.weekPicker?J(L):G(L):t.weekPicker?U(L):O(L);return{setHoverDate:d,clearHoverDate:h,getDayClassData:L=>t.hideOffsetDates&&!L.current?{}:{...S(L),...T(L),[t.dayClass?t.dayClass(L.value):""]:!0,[t.calendarCellClassName]:!!t.calendarCellClassName}}},b0=e=>{const{defaultedFilters:t,defaultedRange:a,propDates:r,defaultedMultiDates:n}=re(e),c=_=>r.value.disabledDates?typeof r.value.disabledDates=="function"?r.value.disabledDates(A1(_)):!!Ic(_,r.value.disabledDates):!1,i=_=>{const N=r.value.maxDate?me(_,r.value.maxDate):!1,q=r.value.minDate?ne(_,r.value.minDate):!1,S=c(_),O=t.value.months.map(B=>+B).includes(o2(_)),U=e.disabledWeekDays.length?e.disabledWeekDays.some(B=>+B===g21(_)):!1,J=d(_),Y=n2(_),G=Y<+e.yearRange[0]||Y>+e.yearRange[1];return!(N||q||S||O||G||U||J)},s=(_,N)=>ne(...Xt(r.value.minDate,_,N))||l2(...Xt(r.value.minDate,_,N)),l=(_,N)=>me(...Xt(r.value.maxDate,_,N))||l2(...Xt(r.value.maxDate,_,N)),f=(_,N,q)=>{let S=!1;return r.value.maxDate&&q&&l(_,N)&&(S=!0),r.value.minDate&&!q&&s(_,N)&&(S=!0),S},u=(_,N,q,S)=>{let O=!1;return S?r.value.minDate&&r.value.maxDate?O=f(_,N,q):(r.value.minDate&&s(_,N)||r.value.maxDate&&l(_,N))&&(O=!0):O=!0,O},d=_=>Array.isArray(r.value.allowedDates)&&!r.value.allowedDates.length?!0:r.value.allowedDates?!Ic(_,r.value.allowedDates):!1,h=_=>!i(_),m=_=>a.value.noDisabledRange?!Fx({start:_[0],end:_[1]}).some(N=>h(N)):!0,v=_=>{if(_){const N=n2(_);return N>=+e.yearRange[0]&&N<=e.yearRange[1]}return!0},p=(_,N)=>!!(Array.isArray(_)&&_[N]&&(a.value.maxRange||a.value.minRange)&&v(_[N])),g=(_,N,q=0)=>{if(p(N,q)&&v(_)){const S=Px(_,N[q]),O=ob(N[q],_),U=O.length===1?0:O.filter(Y=>h(Y)).length,J=Math.abs(S)-(a.value.minMaxRawRange?0:U);if(a.value.minRange&&a.value.maxRange)return J>=+a.value.minRange&&J<=+a.value.maxRange;if(a.value.minRange)return J>=+a.value.minRange;if(a.value.maxRange)return J<=+a.value.maxRange}return!0},y=()=>!e.enableTimePicker||e.monthPicker||e.yearPicker||e.ignoreTimeValidation,x=_=>Array.isArray(_)?[_[0]?cs(_[0]):null,_[1]?cs(_[1]):null]:cs(_),C=(_,N,q)=>_.find(S=>+S.hours===wt(N)&&S.minutes==="*"?!0:+S.minutes===h0(N)&&+S.hours===wt(N))&&q,b=(_,N,q)=>{const[S,O]=_,[U,J]=N;return!C(S,U,q)&&!C(O,J,q)&&q},M=(_,N)=>{const q=Array.isArray(N)?N:[N];return Array.isArray(e.disabledTimes)?Array.isArray(e.disabledTimes[0])?b(e.disabledTimes,q,_):!q.some(S=>C(e.disabledTimes,S,_)):_},w=(_,N)=>{const q=Array.isArray(N)?[X0(N[0]),N[1]?X0(N[1]):void 0]:X0(N),S=!e.disabledTimes(q);return _&&S},z=(_,N)=>e.disabledTimes?Array.isArray(e.disabledTimes)?M(N,_):w(N,_):N,H=_=>{let N=!0;if(!_||y())return!0;const q=!r.value.minDate&&!r.value.maxDate?x(_):_;return(e.maxTime||r.value.maxDate)&&(N=rm(e.maxTime,r.value.maxDate,"max",Te(q),N)),(e.minTime||r.value.minDate)&&(N=rm(e.minTime,r.value.minDate,"min",Te(q),N)),z(_,N)},A=_=>{if(!e.monthPicker)return!0;let N=!0;const q=A1(e4(_));if(r.value.minDate&&r.value.maxDate){const S=A1(e4(r.value.minDate)),O=A1(e4(r.value.maxDate));return me(q,S)&&ne(q,O)||l2(q,S)||l2(q,O)}if(r.value.minDate){const S=A1(e4(r.value.minDate));N=me(q,S)||l2(q,S)}if(r.value.maxDate){const S=A1(e4(r.value.maxDate));N=ne(q,S)||l2(q,S)}return N},V=o.computed(()=>_=>!e.enableTimePicker||e.ignoreTimeValidation?!0:H(_)),k=o.computed(()=>_=>e.monthPicker?Array.isArray(_)&&(a.value.enabled||n.value.enabled)?!_.filter(N=>!A(N)).length:A(_):!0);return{isDisabled:h,validateDate:i,validateMonthYearInRange:u,isDateRangeAllowed:m,checkMinMaxRange:g,isValidTime:H,isTimeValid:V,isMonthValid:k}},P5=()=>{const e=o.computed(()=>(r,n)=>r==null?void 0:r.includes(n)),t=o.computed(()=>(r,n)=>r.count?r.solo?!0:n===0:!0),a=o.computed(()=>(r,n)=>r.count?r.solo?!0:n===r.count-1:!0);return{hideNavigationButtons:e,showLeftIcon:t,showRightIcon:a}},n31=(e,t,a)=>{const r=o.ref(0),n=o.reactive({[G0.timePicker]:!e.enableTimePicker||e.timePicker||e.monthPicker,[G0.calendar]:!1,[G0.header]:!1}),c=o.computed(()=>e.monthPicker||e.timePicker),i=d=>{var h;if((h=e.flow)!=null&&h.length){if(!d&&c.value)return u();n[d]=!0,Object.keys(n).filter(m=>!n[m]).length||u()}},s=()=>{var d;(d=e.flow)!=null&&d.length&&r.value!==-1&&(r.value+=1,t("flow-step",r.value),u())},l=()=>{r.value=-1},f=(d,h,...m)=>{var v,p;e.flow[r.value]===d&&a.value&&((p=(v=a.value)[h])==null||p.call(v,...m))},u=()=>{f(Ye.month,"toggleMonthPicker",!0),f(Ye.year,"toggleYearPicker",!0),f(Ye.calendar,"toggleTimePicker",!1,!0),f(Ye.time,"toggleTimePicker",!0,!0);const d=e.flow[r.value];(d===Ye.hours||d===Ye.minutes||d===Ye.seconds)&&f(d,"toggleTimePicker",!0,!0,d)};return{childMount:i,updateFlowStep:s,resetFlow:l,flowStep:r}},B5={multiCalendars:{type:[Boolean,Number,String,Object],default:void 0},modelValue:{type:[String,Date,Array,Object,Number],default:null},modelType:{type:String,default:null},position:{type:String,default:"center"},dark:{type:Boolean,default:!1},format:{type:[String,Function],default:()=>null},autoPosition:{type:Boolean,default:!0},altPosition:{type:Function,default:null},transitions:{type:[Boolean,Object],default:!0},formatLocale:{type:Object,default:null},utc:{type:[Boolean,String],default:!1},ariaLabels:{type:Object,default:()=>({})},offset:{type:[Number,String],default:10},hideNavigation:{type:Array,default:()=>[]},timezone:{type:[String,Object],default:null},emitTimezone:{type:String,default:null},vertical:{type:Boolean,default:!1},disableMonthYearSelect:{type:Boolean,default:!1},disableYearSelect:{type:Boolean,default:!1},menuClassName:{type:String,default:null},dayClass:{type:Function,default:null},yearRange:{type:Array,default:()=>[1900,2100]},calendarCellClassName:{type:String,default:null},enableTimePicker:{type:Boolean,default:!0},autoApply:{type:Boolean,default:!1},disabledDates:{type:[Array,Function],default:()=>[]},monthNameFormat:{type:String,default:"short"},startDate:{type:[Date,String],default:null},startTime:{type:[Object,Array],default:null},hideOffsetDates:{type:Boolean,default:!1},autoRange:{type:[Number,String],default:null},noToday:{type:Boolean,default:!1},disabledWeekDays:{type:Array,default:()=>[]},allowedDates:{type:Array,default:null},nowButtonLabel:{type:String,default:"Now"},markers:{type:Array,default:()=>[]},escClose:{type:Boolean,default:!0},spaceConfirm:{type:Boolean,default:!0},monthChangeOnArrows:{type:Boolean,default:!0},presetDates:{type:Array,default:()=>[]},flow:{type:Array,default:()=>[]},partialFlow:{type:Boolean,default:!1},preventMinMaxNavigation:{type:Boolean,default:!1},minRange:{type:[Number,String],default:null},maxRange:{type:[Number,String],default:null},multiDatesLimit:{type:[Number,String],default:null},reverseYears:{type:Boolean,default:!1},weekPicker:{type:Boolean,default:!1},filters:{type:Object,default:()=>({})},arrowNavigation:{type:Boolean,default:!1},disableTimeRangeValidation:{type:Boolean,default:!1},highlight:{type:[Function,Object],default:null},teleport:{type:[Boolean,String,Object],default:null},teleportCenter:{type:Boolean,default:!1},locale:{type:String,default:"en-Us"},weekNumName:{type:String,default:"W"},weekStart:{type:[Number,String],default:1},weekNumbers:{type:[String,Function,Object],default:null},calendarClassName:{type:String,default:null},monthChangeOnScroll:{type:[Boolean,String],default:!0},dayNames:{type:[Function,Array],default:null},monthPicker:{type:Boolean,default:!1},customProps:{type:Object,default:null},yearPicker:{type:Boolean,default:!1},modelAuto:{type:Boolean,default:!1},selectText:{type:String,default:"Select"},cancelText:{type:String,default:"Cancel"},previewFormat:{type:[String,Function],default:()=>""},multiDates:{type:[Object,Boolean],default:!1},partialRange:{type:Boolean,default:!0},ignoreTimeValidation:{type:Boolean,default:!1},minDate:{type:[Date,String],default:null},maxDate:{type:[Date,String],default:null},minTime:{type:Object,default:null},maxTime:{type:Object,default:null},name:{type:String,default:null},placeholder:{type:String,default:""},hideInputIcon:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},state:{type:Boolean,default:null},required:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"},inputClassName:{type:String,default:null},fixedStart:{type:Boolean,default:!1},fixedEnd:{type:Boolean,default:!1},timePicker:{type:Boolean,default:!1},enableSeconds:{type:Boolean,default:!1},is24:{type:Boolean,default:!0},noHoursOverlay:{type:Boolean,default:!1},noMinutesOverlay:{type:Boolean,default:!1},noSecondsOverlay:{type:Boolean,default:!1},hoursGridIncrement:{type:[String,Number],default:1},minutesGridIncrement:{type:[String,Number],default:5},secondsGridIncrement:{type:[String,Number],default:5},hoursIncrement:{type:[Number,String],default:1},minutesIncrement:{type:[Number,String],default:1},secondsIncrement:{type:[Number,String],default:1},range:{type:[Boolean,Object],default:!1},uid:{type:String,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},inline:{type:[Boolean,Object],default:!1},textInput:{type:[Boolean,Object],default:!1},noDisabledRange:{type:Boolean,default:!1},sixWeeks:{type:[Boolean,String],default:!1},actionRow:{type:Object,default:()=>({})},focusStartDate:{type:Boolean,default:!1},disabledTimes:{type:[Function,Array],default:void 0},showLastInRange:{type:Boolean,default:!0},timePickerInline:{type:Boolean,default:!1},calendar:{type:Function,default:null},config:{type:Object,default:void 0},quarterPicker:{type:Boolean,default:!1},yearFirst:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},onInternalModelChange:{type:[Function,Object],default:null},enableMinutes:{type:Boolean,default:!0}},b4={...B5,shadow:{type:Boolean,default:!1},flowStep:{type:Number,default:0},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},menuWrapRef:{type:Object,default:null},getInputRect:{type:Function,default:()=>({})}},c31={key:1,class:"dp__input_wrap"},i31=["id","name","inputmode","placeholder","disabled","readonly","required","value","autocomplete","aria-label","aria-disabled","aria-invalid"],s31={key:2,class:"dp__clear_icon"},o31=o.defineComponent({compatConfig:{MODE:3},__name:"DatepickerInput",props:{isMenuOpen:{type:Boolean,default:!1},inputValue:{type:String,default:""},...B5},emits:["clear","open","update:input-value","set-input-date","close","select-date","set-empty-date","toggle","focus-prev","focus","blur","real-blur"],setup(e,{expose:t,emit:a}){const r=a,n=e,{defaultedTextInput:c,defaultedAriaLabels:i,defaultedInline:s,defaultedConfig:l,defaultedRange:f,defaultedMultiDates:u,getDefaultPattern:d,getDefaultStartTime:h}=re(n),{checkMinMaxRange:m}=b0(n),v=o.ref(),p=o.ref(null),g=o.ref(!1),y=o.ref(!1),x=o.computed(()=>({dp__pointer:!n.disabled&&!n.readonly&&!c.value.enabled,dp__disabled:n.disabled,dp__input_readonly:!c.value.enabled,dp__input:!0,dp__input_icon_pad:!n.hideInputIcon,dp__input_valid:!!n.state,dp__input_invalid:n.state===!1,dp__input_focus:g.value||n.isMenuOpen,dp__input_reg:!c.value.enabled,[n.inputClassName]:!!n.inputClassName})),C=()=>{r("set-input-date",null),n.clearable&&n.autoApply&&(r("set-empty-date"),v.value=null)},b=O=>{const U=h();return Le1(O,c.value.format??d(),U??lb({},n.enableSeconds),n.inputValue,y.value,n.formatLocale)},M=O=>{const{rangeSeparator:U}=c.value,[J,Y]=O.split(`${U}`);if(J){const G=b(J.trim()),B=Y?b(Y.trim()):null;if(na(G,B))return;const T=G&&B?[G,B]:[G];m(B,T,0)&&(v.value=G?T:null)}},w=()=>{y.value=!0},z=O=>{if(f.value.enabled)M(O);else if(u.value.enabled){const U=O.split(";");v.value=U.map(J=>b(J.trim())).filter(J=>J)}else v.value=b(O)},H=O=>{var U;const J=typeof O=="string"?O:(U=O.target)==null?void 0:U.value;J!==""?(c.value.openMenu&&!n.isMenuOpen&&r("open"),z(J),r("set-input-date",v.value)):C(),y.value=!1,r("update:input-value",J)},A=O=>{c.value.enabled?(z(O.target.value),c.value.enterSubmit&&O7(v.value)&&n.inputValue!==""?(r("set-input-date",v.value,!0),v.value=null):c.value.enterSubmit&&n.inputValue===""&&(v.value=null,r("clear"))):_(O)},V=O=>{c.value.enabled&&c.value.tabSubmit&&z(O.target.value),c.value.tabSubmit&&O7(v.value)&&n.inputValue!==""?(r("set-input-date",v.value,!0,!0),v.value=null):c.value.tabSubmit&&n.inputValue===""&&(v.value=null,r("clear",!0))},k=()=>{g.value=!0,r("focus"),o.nextTick().then(()=>{var O;c.value.enabled&&c.value.selectOnFocus&&((O=p.value)==null||O.select())})},_=O=>{O.preventDefault(),r0(O,l.value,!0),c.value.enabled&&c.value.openMenu&&!s.value.input&&!n.isMenuOpen?r("open"):c.value.enabled||r("toggle")},N=()=>{r("real-blur"),g.value=!1,(!n.isMenuOpen||s.value.enabled&&s.value.input)&&r("blur"),n.autoApply&&c.value.enabled&&v.value&&!n.isMenuOpen&&(r("set-input-date",v.value),r("select-date"),v.value=null)},q=O=>{r0(O,l.value,!0),r("clear")},S=O=>{if(O.key==="Tab"&&V(O),O.key==="Enter"&&A(O),!c.value.enabled){if(O.code==="Tab")return;O.preventDefault()}};return t({focusInput:()=>{var O;(O=p.value)==null||O.focus({preventScroll:!0})},setParsedDate:O=>{v.value=O}}),(O,U)=>{var J;return o.openBlock(),o.createElementBlock("div",{onClick:_},[O.$slots.trigger&&!O.$slots["dp-input"]&&!o.unref(s).enabled?o.renderSlot(O.$slots,"trigger",{key:0}):o.createCommentVNode("",!0),!O.$slots.trigger&&(!o.unref(s).enabled||o.unref(s).input)?(o.openBlock(),o.createElementBlock("div",c31,[O.$slots["dp-input"]&&!O.$slots.trigger&&(!o.unref(s).enabled||o.unref(s).enabled&&o.unref(s).input)?o.renderSlot(O.$slots,"dp-input",{key:0,value:e.inputValue,isMenuOpen:e.isMenuOpen,onInput:H,onEnter:A,onTab:V,onClear:q,onBlur:N,onKeypress:S,onPaste:w,openMenu:()=>O.$emit("open"),closeMenu:()=>O.$emit("close"),toggleMenu:()=>O.$emit("toggle")}):o.createCommentVNode("",!0),O.$slots["dp-input"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("input",{key:1,id:O.uid?`dp-input-${O.uid}`:void 0,ref_key:"inputRef",ref:p,"data-test":"dp-input",name:O.name,class:o.normalizeClass(x.value),inputmode:o.unref(c).enabled?"text":"none",placeholder:O.placeholder,disabled:O.disabled,readonly:O.readonly,required:O.required,value:e.inputValue,autocomplete:O.autocomplete,"aria-label":(J=o.unref(i))==null?void 0:J.input,"aria-disabled":O.disabled||void 0,"aria-invalid":O.state===!1?!0:void 0,onInput:H,onBlur:N,onFocus:k,onKeypress:S,onKeydown:S,onPaste:w},null,42,i31)),o.createElementVNode("div",{onClick:U[2]||(U[2]=Y=>r("toggle"))},[O.$slots["input-icon"]&&!O.hideInputIcon?(o.openBlock(),o.createElementBlock("span",{key:0,class:"dp__input_icon",onClick:U[0]||(U[0]=Y=>r("toggle"))},[o.renderSlot(O.$slots,"input-icon")])):o.createCommentVNode("",!0),!O.$slots["input-icon"]&&!O.hideInputIcon&&!O.$slots["dp-input"]?(o.openBlock(),o.createBlock(o.unref(pa),{key:1,class:"dp__input_icon dp__input_icons",onClick:U[1]||(U[1]=Y=>r("toggle"))})):o.createCommentVNode("",!0)]),O.$slots["clear-icon"]&&e.inputValue&&O.clearable&&!O.disabled&&!O.readonly?(o.openBlock(),o.createElementBlock("span",s31,[o.renderSlot(O.$slots,"clear-icon",{clear:q})])):o.createCommentVNode("",!0),O.clearable&&!O.$slots["clear-icon"]&&e.inputValue&&!O.disabled&&!O.readonly?(o.openBlock(),o.createBlock(o.unref(eb),{key:3,class:"dp__clear_icon dp__input_icons","data-test":"clear-icon",onClick:U[3]||(U[3]=o.withModifiers(Y=>q(Y),["prevent"]))})):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)])}}}),l31=["title"],f31=["disabled"],u31=o.defineComponent({compatConfig:{MODE:3},__name:"ActionRow",props:{menuMount:{type:Boolean,default:!1},calendarWidth:{type:Number,default:0},...b4},emits:["close-picker","select-date","select-now","invalid-select"],setup(e,{emit:t}){const a=t,r=e,{defaultedActionRow:n,defaultedPreviewFormat:c,defaultedMultiCalendars:i,defaultedTextInput:s,defaultedInline:l,defaultedRange:f,defaultedMultiDates:u,getDefaultPattern:d}=re(r),{isTimeValid:h,isMonthValid:m}=b0(r),{buildMatrix:v}=x0(),p=o.ref(null),g=o.ref(null),y=o.ref(!1),x=o.ref({}),C=o.ref(null),b=o.ref(null);o.onMounted(()=>{r.arrowNavigation&&v([ke(p),ke(g)],"actionRow"),M(),window.addEventListener("resize",M)}),o.onUnmounted(()=>{window.removeEventListener("resize",M)});const M=()=>{y.value=!1,setTimeout(()=>{var S,O;const U=(S=C.value)==null?void 0:S.getBoundingClientRect(),J=(O=b.value)==null?void 0:O.getBoundingClientRect();U&&J&&(x.value.maxWidth=`${J.width-U.width-20}px`),y.value=!0},0)},w=o.computed(()=>f.value.enabled&&!f.value.partialRange&&r.internalModelValue?r.internalModelValue.length===2:!0),z=o.computed(()=>!h.value(r.internalModelValue)||!m.value(r.internalModelValue)||!w.value),H=()=>{const S=c.value;return r.timePicker||r.monthPicker,S(Te(r.internalModelValue))},A=()=>{const S=r.internalModelValue;return i.value.count>0?`${V(S[0])} - ${V(S[1])}`:[V(S[0]),V(S[1])]},V=S=>ub(S,c.value,r.formatLocale,s.value.rangeSeparator,r.modelAuto,d()),k=o.computed(()=>!r.internalModelValue||!r.menuMount?"":typeof c.value=="string"?Array.isArray(r.internalModelValue)?r.internalModelValue.length===2&&r.internalModelValue[1]?A():u.value.enabled?r.internalModelValue.map(S=>`${V(S)}`):r.modelAuto?`${V(r.internalModelValue[0])}`:`${V(r.internalModelValue[0])} -`:V(r.internalModelValue):H()),_=()=>u.value.enabled?"; ":" - ",N=o.computed(()=>Array.isArray(k.value)?k.value.join(_()):k.value),q=()=>{h.value(r.internalModelValue)&&m.value(r.internalModelValue)&&w.value?a("select-date"):a("invalid-select")};return(S,O)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"actionRowRef",ref:b,class:"dp__action_row"},[S.$slots["action-row"]?o.renderSlot(S.$slots,"action-row",o.normalizeProps(o.mergeProps({key:0},{internalModelValue:S.internalModelValue,disabled:z.value,selectDate:()=>S.$emit("select-date"),closePicker:()=>S.$emit("close-picker")}))):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.unref(n).showPreview?(o.openBlock(),o.createElementBlock("div",{key:0,class:"dp__selection_preview",title:N.value,style:o.normalizeStyle(x.value)},[S.$slots["action-preview"]&&y.value?o.renderSlot(S.$slots,"action-preview",{key:0,value:S.internalModelValue}):o.createCommentVNode("",!0),!S.$slots["action-preview"]&&y.value?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(N.value),1)],64)):o.createCommentVNode("",!0)],12,l31)):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"actionBtnContainer",ref:C,class:"dp__action_buttons","data-dp-element":"action-row"},[S.$slots["action-buttons"]?o.renderSlot(S.$slots,"action-buttons",{key:0,value:S.internalModelValue}):o.createCommentVNode("",!0),S.$slots["action-buttons"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[!o.unref(l).enabled&&o.unref(n).showCancel?(o.openBlock(),o.createElementBlock("button",{key:0,ref_key:"cancelButtonRef",ref:p,type:"button",class:"dp__action_button dp__action_cancel",onClick:O[0]||(O[0]=U=>S.$emit("close-picker")),onKeydown:O[1]||(O[1]=U=>o.unref(y3)(U,()=>S.$emit("close-picker")))},o.toDisplayString(S.cancelText),545)):o.createCommentVNode("",!0),o.unref(n).showNow?(o.openBlock(),o.createElementBlock("button",{key:1,type:"button",class:"dp__action_button dp__action_cancel",onClick:O[2]||(O[2]=U=>S.$emit("select-now")),onKeydown:O[3]||(O[3]=U=>o.unref(y3)(U,()=>S.$emit("select-now")))},o.toDisplayString(S.nowButtonLabel),33)):o.createCommentVNode("",!0),o.unref(n).showSelect?(o.openBlock(),o.createElementBlock("button",{key:2,ref_key:"selectButtonRef",ref:g,type:"button",class:"dp__action_button dp__action_select",disabled:z.value,"data-test":"select-button",onKeydown:O[4]||(O[4]=U=>o.unref(y3)(U,()=>q())),onClick:q},o.toDisplayString(S.selectText),41,f31)):o.createCommentVNode("",!0)],64))],512)],64))],512))}}),d31={class:"dp__selection_grid_header"},h31=["aria-selected","aria-disabled","data-test","onClick","onKeydown","onMouseover"],m31=["aria-label"],En=o.defineComponent({__name:"SelectionOverlay",props:{items:{},type:{},isLast:{type:Boolean},arrowNavigation:{type:Boolean},skipButtonRef:{type:Boolean},headerRefs:{},hideNavigation:{},escClose:{type:Boolean},useRelative:{type:Boolean},height:{},textInput:{type:[Boolean,Object]},config:{},noOverlayFocus:{type:Boolean},focusValue:{},menuWrapRef:{},ariaLabels:{}},emits:["selected","toggle","reset-flow","hover-value"],setup(e,{expose:t,emit:a}){const{setSelectionGrid:r,buildMultiLevelMatrix:n,setMonthPicker:c}=x0(),i=a,s=e,{defaultedAriaLabels:l,defaultedTextInput:f,defaultedConfig:u}=re(s),{hideNavigationButtons:d}=P5(),h=o.ref(!1),m=o.ref(null),v=o.ref(null),p=o.ref([]),g=o.ref(),y=o.ref(null),x=o.ref(0),C=o.ref(null);o.onBeforeUpdate(()=>{m.value=null}),o.onMounted(()=>{o.nextTick().then(()=>k()),s.noOverlayFocus||M(),b(!0)}),o.onUnmounted(()=>b(!1));const b=T=>{var L;s.arrowNavigation&&((L=s.headerRefs)!=null&&L.length?c(T):r(T))},M=()=>{var T;const L=ke(v);L&&(f.value.enabled||(m.value?(T=m.value)==null||T.focus({preventScroll:!0}):L.focus({preventScroll:!0})),h.value=L.clientHeight<L.scrollHeight)},w=o.computed(()=>({dp__overlay:!0,"dp--overlay-absolute":!s.useRelative,"dp--overlay-relative":s.useRelative})),z=o.computed(()=>s.useRelative?{height:`${s.height}px`,width:"260px"}:void 0),H=o.computed(()=>({dp__overlay_col:!0})),A=o.computed(()=>({dp__btn:!0,dp__button:!0,dp__overlay_action:!0,dp__over_action_scroll:h.value,dp__button_bottom:s.isLast})),V=o.computed(()=>{var T,L;return{dp__overlay_container:!0,dp__container_flex:((T=s.items)==null?void 0:T.length)<=6,dp__container_block:((L=s.items)==null?void 0:L.length)>6}});o.watch(()=>s.items,()=>k(!1),{deep:!0});const k=(T=!0)=>{o.nextTick().then(()=>{const L=ke(m),W=ke(v),j=ke(y),E=ke(C),R=j?j.getBoundingClientRect().height:0;W&&(W.getBoundingClientRect().height?x.value=W.getBoundingClientRect().height-R:x.value=u.value.modeHeight-R),L&&E&&T&&(E.scrollTop=L.offsetTop-E.offsetTop-(x.value/2-L.getBoundingClientRect().height)-R)})},_=T=>{T.disabled||i("selected",T.value)},N=()=>{i("toggle"),i("reset-flow")},q=()=>{s.escClose&&N()},S=(T,L,W,j)=>{T&&((L.active||L.value===s.focusValue)&&(m.value=T),s.arrowNavigation&&(Array.isArray(p.value[W])?p.value[W][j]=T:p.value[W]=[T],O()))},O=()=>{var T,L;const W=(T=s.headerRefs)!=null&&T.length?[s.headerRefs].concat(p.value):p.value.concat([s.skipButtonRef?[]:[y.value]]);n(Te(W),(L=s.headerRefs)!=null&&L.length?"monthPicker":"selectionGrid")},U=T=>{s.arrowNavigation||r0(T,u.value,!0)},J=T=>{g.value=T,i("hover-value",T)},Y=()=>{if(N(),!s.isLast){const T=He1(s.menuWrapRef??null,"action-row");if(T){const L=nb(T);L==null||L.focus()}}},G=T=>{switch(T.key){case te.esc:return q();case te.arrowLeft:return U(T);case te.arrowRight:return U(T);case te.arrowUp:return U(T);case te.arrowDown:return U(T);default:return}},B=T=>{if(T.key===te.enter)return N();if(T.key===te.tab)return Y()};return t({focusGrid:M}),(T,L)=>{var W;return o.openBlock(),o.createElementBlock("div",{ref_key:"gridWrapRef",ref:v,class:o.normalizeClass(w.value),style:o.normalizeStyle(z.value),role:"dialog",tabindex:"0",onKeydown:G},[o.createElementVNode("div",{ref_key:"containerRef",ref:C,class:o.normalizeClass(V.value),role:"grid",style:o.normalizeStyle({"--dp-overlay-height":`${x.value}px`})},[o.createElementVNode("div",d31,[o.renderSlot(T.$slots,"header")]),T.$slots.overlay?o.renderSlot(T.$slots,"overlay",{key:0}):(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:1},o.renderList(T.items,(j,E)=>(o.openBlock(),o.createElementBlock("div",{key:E,class:o.normalizeClass(["dp__overlay_row",{dp__flex_row:T.items.length>=3}]),role:"row"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(j,(R,a1)=>(o.openBlock(),o.createElementBlock("div",{key:R.value,ref_for:!0,ref:n1=>S(n1,R,E,a1),role:"gridcell",class:o.normalizeClass(H.value),"aria-selected":R.active||void 0,"aria-disabled":R.disabled||void 0,tabindex:"0","data-test":R.text,onClick:n1=>_(R),onKeydown:n1=>o.unref(y3)(n1,()=>_(R),!0),onMouseover:n1=>J(R.value)},[o.createElementVNode("div",{class:o.normalizeClass(R.className)},[T.$slots.item?o.renderSlot(T.$slots,"item",{key:0,item:R}):o.createCommentVNode("",!0),T.$slots.item?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(R.text),1)],64))],2)],42,h31))),128))],2))),128))],6),T.$slots["button-icon"]?o.withDirectives((o.openBlock(),o.createElementBlock("button",{key:0,ref_key:"toggleButton",ref:y,type:"button","aria-label":(W=o.unref(l))==null?void 0:W.toggleOverlay,class:o.normalizeClass(A.value),tabindex:"0",onClick:N,onKeydown:B},[o.renderSlot(T.$slots,"button-icon")],42,m31)),[[o.vShow,!o.unref(d)(T.hideNavigation,T.type)]]):o.createCommentVNode("",!0)],38)}}}),F5=o.defineComponent({__name:"InstanceWrap",props:{multiCalendars:{},stretch:{type:Boolean},collapse:{type:Boolean}},setup(e){const t=e,a=o.computed(()=>t.multiCalendars>0?[...Array(t.multiCalendars).keys()]:[0]),r=o.computed(()=>({dp__instance_calendar:t.multiCalendars>0}));return(n,c)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass({dp__menu_inner:!n.stretch,"dp--menu--inner-stretched":n.stretch,dp__flex_display:n.multiCalendars>0,"dp--flex-display-collapsed":n.collapse})},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.value,(i,s)=>(o.openBlock(),o.createElementBlock("div",{key:i,class:o.normalizeClass(r.value)},[o.renderSlot(n.$slots,"default",{instance:i,index:s})],2))),128))],2))}}),p31=["aria-label","aria-disabled"],gr=o.defineComponent({compatConfig:{MODE:3},__name:"ArrowBtn",props:{ariaLabel:{},disabled:{type:Boolean}},emits:["activate","set-ref"],setup(e,{emit:t}){const a=t,r=o.ref(null);return o.onMounted(()=>a("set-ref",r)),(n,c)=>(o.openBlock(),o.createElementBlock("button",{ref_key:"elRef",ref:r,type:"button",class:"dp__btn dp--arrow-btn-nav",tabindex:"0","aria-label":n.ariaLabel,"aria-disabled":n.disabled||void 0,onClick:c[0]||(c[0]=i=>n.$emit("activate")),onKeydown:c[1]||(c[1]=i=>o.unref(y3)(i,()=>n.$emit("activate"),!0))},[o.createElementVNode("span",{class:o.normalizeClass(["dp__inner_nav",{dp__inner_nav_disabled:n.disabled}])},[o.renderSlot(n.$slots,"default")],2)],40,p31))}}),v31={class:"dp--year-mode-picker"},g31=["aria-label","data-test"],mb=o.defineComponent({__name:"YearModePicker",props:{...b4,showYearPicker:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},instance:{type:Number,default:0},year:{type:Number,default:0},isDisabled:{type:Function,default:()=>!1}},emits:["toggle-year-picker","year-select","handle-year"],setup(e,{emit:t}){const a=t,r=e,{showRightIcon:n,showLeftIcon:c}=P5(),{defaultedConfig:i,defaultedMultiCalendars:s,defaultedAriaLabels:l,defaultedTransitions:f}=re(r),{showTransition:u,transitionName:d}=An(f),h=(p=!1,g)=>{a("toggle-year-picker",{flow:p,show:g})},m=p=>{a("year-select",p)},v=(p=!1)=>{a("handle-year",p)};return(p,g)=>{var y,x,C;return o.openBlock(),o.createElementBlock("div",v31,[o.unref(c)(o.unref(s),e.instance)?(o.openBlock(),o.createBlock(gr,{key:0,ref:"mpPrevIconRef","aria-label":(y=o.unref(l))==null?void 0:y.prevYear,disabled:e.isDisabled(!1),onActivate:g[0]||(g[0]=b=>v(!1))},{default:o.withCtx(()=>[p.$slots["arrow-left"]?o.renderSlot(p.$slots,"arrow-left",{key:0}):o.createCommentVNode("",!0),p.$slots["arrow-left"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Nl),{key:1}))]),_:3},8,["aria-label","disabled"])):o.createCommentVNode("",!0),o.createElementVNode("button",{ref:"mpYearButtonRef",class:"dp__btn dp--year-select",type:"button","aria-label":(x=o.unref(l))==null?void 0:x.openYearsOverlay,"data-test":`year-mode-btn-${e.instance}`,onClick:g[1]||(g[1]=()=>h(!1)),onKeydown:g[2]||(g[2]=o.withKeys(()=>h(!1),["enter"]))},[p.$slots.year?o.renderSlot(p.$slots,"year",{key:0,year:e.year}):o.createCommentVNode("",!0),p.$slots.year?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(e.year),1)],64))],40,g31),o.unref(n)(o.unref(s),e.instance)?(o.openBlock(),o.createBlock(gr,{key:1,ref:"mpNextIconRef","aria-label":(C=o.unref(l))==null?void 0:C.nextYear,disabled:e.isDisabled(!0),onActivate:g[3]||(g[3]=b=>v(!0))},{default:o.withCtx(()=>[p.$slots["arrow-right"]?o.renderSlot(p.$slots,"arrow-right",{key:0}):o.createCommentVNode("",!0),p.$slots["arrow-right"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Dl),{key:1}))]),_:3},8,["aria-label","disabled"])):o.createCommentVNode("",!0),o.createVNode(o.Transition,{name:o.unref(d)(e.showYearPicker),css:o.unref(u)},{default:o.withCtx(()=>[e.showYearPicker?(o.openBlock(),o.createBlock(En,{key:0,items:e.items,"text-input":p.textInput,"esc-close":p.escClose,config:p.config,"is-last":p.autoApply&&!o.unref(i).keepActionRow,"hide-navigation":p.hideNavigation,"aria-labels":p.ariaLabels,type:"year",onToggle:h,onSelected:g[4]||(g[4]=b=>m(b))},o.createSlots({"button-icon":o.withCtx(()=>[p.$slots["calendar-icon"]?o.renderSlot(p.$slots,"calendar-icon",{key:0}):o.createCommentVNode("",!0),p.$slots["calendar-icon"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(pa),{key:1}))]),_:2},[p.$slots["year-overlay-value"]?{name:"item",fn:o.withCtx(({item:b})=>[o.renderSlot(p.$slots,"year-overlay-value",{text:b.text,value:b.value})]),key:"0"}:void 0]),1032,["items","text-input","esc-close","config","is-last","hide-navigation","aria-labels"])):o.createCommentVNode("",!0)]),_:3},8,["name","css"])])}}}),Ul=(e,t,a)=>{if(t.value&&Array.isArray(t.value))if(t.value.some(r=>l2(e,r))){const r=t.value.filter(n=>!l2(n,e));t.value=r.length?r:null}else(a&&+a>t.value.length||!a)&&t.value.push(e);else t.value=[e]},Wl=(e,t,a)=>{let r=e.value?e.value.slice():[];return r.length===2&&r[1]!==null&&(r=[]),r.length?ne(t,r[0])?(r.unshift(t),a("range-start",r[0]),a("range-start",r[1])):(r[1]=t,a("range-end",t)):(r=[t],a("range-start",t)),r},R5=(e,t,a,r)=>{e&&(e[0]&&e[1]&&a&&t("auto-apply"),e[0]&&!e[1]&&r&&a&&t("auto-apply"))},pb=e=>{Array.isArray(e.value)&&e.value.length<=2&&e.range?e.modelValue.value=e.value.map(t=>B4(A1(t),e.timezone)):Array.isArray(e.value)||(e.modelValue.value=B4(A1(e.value),e.timezone))},vb=(e,t,a,r)=>Array.isArray(t.value)&&(t.value.length===2||t.value.length===1&&r.value.partialRange)?r.value.fixedStart&&(me(e,t.value[0])||l2(e,t.value[0]))?[t.value[0],e]:r.value.fixedEnd&&(ne(e,t.value[1])||l2(e,t.value[1]))?[e,t.value[1]]:(a("invalid-fixed-range",e),t.value):[],gb=({multiCalendars:e,highlight:t,propDates:a,calendars:r,modelValue:n,props:c,filters:i,year:s,month:l,emit:f})=>{const u=o.computed(()=>Fl(c.yearRange,c.locale,c.reverseYears)),d=o.ref([!1]),h=o.computed(()=>(w,z)=>{const H=N2(e4(new Date),{month:l.value(w),year:s.value(w)}),A=z?Rx(H):kl(H);return fb(A,a.value.maxDate,a.value.minDate,c.preventMinMaxNavigation,z)}),m=()=>{for(let w=0;w<e.value.count;w++)if(w===0)r.value[w]=r.value[0];else{const z=N2(A1(),r.value[w-1]);r.value[w]={month:o2(z),year:n2(_l(z,1))}}},v=w=>{if(!w)return m();const z=N2(A1(),r.value[w]);return r.value[0].year=n2(Jx(z,e.value.count-1)),m()},p=w=>c.focusStartDate?w[0]:w[1]?w[1]:w[0],g=()=>{if(n.value){const w=Array.isArray(n.value)?p(n.value):n.value;r.value[0]={month:o2(w),year:n2(w)}}};o.onMounted(()=>{g(),e.value.count&&m()});const y=(w,z)=>{r.value[z].year=w,f("update-month-year",{instance:z,year:w,month:r.value[z].month}),e.value.count&&!e.value.solo&&v(z)},x=o.computed(()=>w=>ia(u.value,z=>{var H;const A=s.value(w)===z.value,V=an(z.value,sa(a.value.minDate),sa(a.value.maxDate))||((H=i.value.years)==null?void 0:H.includes(s.value(w))),k=$l(t.value,z.value);return{active:A,disabled:V,highlighted:k}})),C=(w,z)=>{y(w,z),M(z)},b=(w,z=!1)=>{if(!h.value(w,z)){const H=z?s.value(w)+1:s.value(w)-1;y(H,w)}},M=(w,z=!1,H)=>{z||f("reset-flow"),H!==void 0?d.value[w]=H:d.value[w]=!d.value[w],d.value[w]?f("overlay-toggle",{open:!0,overlay:Ye.year}):(f("overlay-closed"),f("overlay-toggle",{open:!1,overlay:Ye.year}))};return{isDisabled:h,groupedYears:x,showYearPicker:d,selectYear:y,toggleYearPicker:M,handleYearSelect:C,handleYear:b}},y31=(e,t)=>{const{defaultedMultiCalendars:a,defaultedAriaLabels:r,defaultedTransitions:n,defaultedConfig:c,defaultedRange:i,defaultedHighlight:s,propDates:l,defaultedTz:f,defaultedFilters:u,defaultedMultiDates:d}=re(e),{modelValue:h,year:m,month:v,calendars:p}=Tn(e,t),g=o.computed(()=>ab(e.formatLocale,e.locale,e.monthNameFormat)),y=o.ref(null),{checkMinMaxRange:x}=b0(e),{selectYear:C,groupedYears:b,showYearPicker:M,toggleYearPicker:w,handleYearSelect:z,handleYear:H,isDisabled:A}=gb({modelValue:h,multiCalendars:a,highlight:s,calendars:p,year:m,propDates:l,month:v,filters:u,props:e,emit:t});o.onMounted(()=>{e.startDate&&(h.value&&e.focusStartDate||!h.value)&&C(n2(A1(e.startDate)),0)});const V=L=>L?{month:o2(L),year:n2(L)}:{month:null,year:null},k=()=>h.value?Array.isArray(h.value)?h.value.map(L=>V(L)):V(h.value):V(),_=(L,W)=>{const j=p.value[L],E=k();return Array.isArray(E)?E.some(R=>R.year===(j==null?void 0:j.year)&&R.month===W):(j==null?void 0:j.year)===E.year&&W===E.month},N=(L,W,j)=>{var E,R;const a1=k();return Array.isArray(a1)?m.value(W)===((E=a1[j])==null?void 0:E.year)&&L===((R=a1[j])==null?void 0:R.month):!1},q=(L,W)=>{if(i.value.enabled){const j=k();if(Array.isArray(h.value)&&Array.isArray(j)){const E=N(L,W,0)||N(L,W,1),R=ut(e4(A1()),L,m.value(W));return O5(h.value,y.value,R)&&!E}return!1}return!1},S=o.computed(()=>L=>ia(g.value,W=>{var j;const E=_(L,W.value),R=an(W.value,ib(m.value(L),l.value.minDate),sb(m.value(L),l.value.maxDate))||De1(l.value.disabledDates,m.value(L)).includes(W.value)||((j=u.value.months)==null?void 0:j.includes(W.value)),a1=q(W.value,L),n1=db(s.value,W.value,m.value(L));return{active:E,disabled:R,isBetween:a1,highlighted:n1}})),O=(L,W)=>ut(e4(A1()),L,m.value(W)),U=(L,W)=>{const j=h.value?h.value:e4(new Date);h.value=ut(j,L,m.value(W)),t("auto-apply"),t("update-flow-step")},J=(L,W)=>{const j=O(L,W);i.value.fixedEnd||i.value.fixedStart?h.value=vb(j,h,t,i):h.value?x(j,h.value)&&(h.value=Wl(h,O(L,W),t)):h.value=[O(L,W)],o.nextTick().then(()=>{R5(h.value,t,e.autoApply,e.modelAuto)})},Y=(L,W)=>{Ul(O(L,W),h,d.value.limit),t("auto-apply",!0)},G=(L,W)=>(p.value[W].month=L,T(W,p.value[W].year,L),d.value.enabled?Y(L,W):i.value.enabled?J(L,W):U(L,W)),B=(L,W)=>{C(L,W),T(W,L,null)},T=(L,W,j)=>{let E=j;if(!E&&E!==0){const R=k();E=Array.isArray(R)?R[L].month:R.month}t("update-month-year",{instance:L,year:W,month:E})};return{groupedMonths:S,groupedYears:b,year:m,isDisabled:A,defaultedMultiCalendars:a,defaultedAriaLabels:r,defaultedTransitions:n,defaultedConfig:c,showYearPicker:M,modelValue:h,presetDate:(L,W)=>{pb({value:L,modelValue:h,range:i.value.enabled,timezone:W?void 0:f.value.timezone}),t("auto-apply")},setHoverDate:(L,W)=>{y.value=O(L,W)},selectMonth:G,selectYear:B,toggleYearPicker:w,handleYearSelect:z,handleYear:H,getModelMonthYear:k}},x31=o.defineComponent({compatConfig:{MODE:3},__name:"MonthPicker",props:{...b4},emits:["update:internal-model-value","overlay-closed","reset-flow","range-start","range-end","auto-apply","update-month-year","update-flow-step","mount","invalid-fixed-range","overlay-toggle"],setup(e,{expose:t,emit:a}){const r=a,n=o.useSlots(),c=z3(n,"yearMode"),i=e;o.onMounted(()=>{i.shadow||r("mount",null)});const{groupedMonths:s,groupedYears:l,year:f,isDisabled:u,defaultedMultiCalendars:d,defaultedConfig:h,showYearPicker:m,modelValue:v,presetDate:p,setHoverDate:g,selectMonth:y,selectYear:x,toggleYearPicker:C,handleYearSelect:b,handleYear:M,getModelMonthYear:w}=y31(i,r);return t({getSidebarProps:()=>({modelValue:v,year:f,getModelMonthYear:w,selectMonth:y,selectYear:x,handleYear:M}),presetDate:p,toggleYearPicker:z=>C(0,z)}),(z,H)=>(o.openBlock(),o.createBlock(F5,{"multi-calendars":o.unref(d).count,collapse:z.collapse,stretch:""},{default:o.withCtx(({instance:A})=>[z.$slots["top-extra"]?o.renderSlot(z.$slots,"top-extra",{key:0,value:z.internalModelValue}):o.createCommentVNode("",!0),z.$slots["month-year"]?o.renderSlot(z.$slots,"month-year",o.normalizeProps(o.mergeProps({key:1},{year:o.unref(f),months:o.unref(s)(A),years:o.unref(l)(A),selectMonth:o.unref(y),selectYear:o.unref(x),instance:A}))):(o.openBlock(),o.createBlock(En,{key:2,items:o.unref(s)(A),"arrow-navigation":z.arrowNavigation,"is-last":z.autoApply&&!o.unref(h).keepActionRow,"esc-close":z.escClose,height:o.unref(h).modeHeight,config:z.config,"no-overlay-focus":!!(z.noOverlayFocus||z.textInput),"use-relative":"",type:"month",onSelected:V=>o.unref(y)(V,A),onHoverValue:V=>o.unref(g)(V,A)},o.createSlots({header:o.withCtx(()=>[o.createVNode(mb,o.mergeProps(z.$props,{items:o.unref(l)(A),instance:A,"show-year-picker":o.unref(m)[A],year:o.unref(f)(A),"is-disabled":V=>o.unref(u)(A,V),onHandleYear:V=>o.unref(M)(A,V),onYearSelect:V=>o.unref(b)(V,A),onToggleYearPicker:V=>o.unref(C)(A,V==null?void 0:V.flow,V==null?void 0:V.show)}),o.createSlots({_:2},[o.renderList(o.unref(c),(V,k)=>({name:V,fn:o.withCtx(_=>[o.renderSlot(z.$slots,V,o.normalizeProps(o.guardReactiveProps(_)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),_:2},[z.$slots["month-overlay-value"]?{name:"item",fn:o.withCtx(({item:V})=>[o.renderSlot(z.$slots,"month-overlay-value",{text:V.text,value:V.value})]),key:"0"}:void 0]),1032,["items","arrow-navigation","is-last","esc-close","height","config","no-overlay-focus","onSelected","onHoverValue"]))]),_:3},8,["multi-calendars","collapse"]))}}),b31=(e,t)=>{const{modelValue:a}=Tn(e,t),r=o.ref(null),{defaultedHighlight:n,defaultedMultiDates:c,defaultedFilters:i,defaultedRange:s,propDates:l}=re(e),f=o.ref();o.onMounted(()=>{e.startDate&&(a.value&&e.focusStartDate||!a.value)&&(f.value=n2(A1(e.startDate)))});const u=v=>Array.isArray(a.value)?a.value.some(p=>n2(p)===v):a.value?n2(a.value)===v:!1,d=v=>s.value.enabled&&Array.isArray(a.value)?O5(a.value,r.value,m(v)):!1,h=o.computed(()=>ia(Fl(e.yearRange,e.locale,e.reverseYears),v=>{const p=u(v.value),g=an(v.value,sa(l.value.minDate),sa(l.value.maxDate))||i.value.years.includes(v.value),y=d(v.value)&&!p,x=$l(n.value,v.value);return{active:p,disabled:g,isBetween:y,highlighted:x}})),m=v=>E4(e4(new Date),v);return{groupedYears:h,modelValue:a,focusYear:f,setHoverValue:v=>{r.value=E4(e4(new Date),v)},selectYear:v=>{var p;if(t("update-month-year",{instance:0,year:v}),c.value.enabled)return a.value?Array.isArray(a.value)&&(((p=a.value)==null?void 0:p.map(g=>n2(g))).includes(v)?a.value=a.value.filter(g=>n2(g)!==v):a.value.push(E4(k3(A1()),v))):a.value=[E4(k3(A1()),v)],t("auto-apply",!0);s.value.enabled?(a.value=Wl(a,m(v),t),o.nextTick().then(()=>{R5(a.value,t,e.autoApply,e.modelAuto)})):(a.value=m(v),t("auto-apply"))}}},C31=o.defineComponent({compatConfig:{MODE:3},__name:"YearPicker",props:{...b4},emits:["update:internal-model-value","reset-flow","range-start","range-end","auto-apply","update-month-year"],setup(e,{expose:t,emit:a}){const r=a,n=e,{groupedYears:c,modelValue:i,focusYear:s,selectYear:l,setHoverValue:f}=b31(n,r),{defaultedConfig:u}=re(n);return t({getSidebarProps:()=>({modelValue:i,selectYear:l})}),(d,h)=>(o.openBlock(),o.createElementBlock("div",null,[d.$slots["top-extra"]?o.renderSlot(d.$slots,"top-extra",{key:0,value:d.internalModelValue}):o.createCommentVNode("",!0),d.$slots["month-year"]?o.renderSlot(d.$slots,"month-year",o.normalizeProps(o.mergeProps({key:1},{years:o.unref(c),selectYear:o.unref(l)}))):(o.openBlock(),o.createBlock(En,{key:2,items:o.unref(c),"is-last":d.autoApply&&!o.unref(u).keepActionRow,height:o.unref(u).modeHeight,config:d.config,"no-overlay-focus":!!(d.noOverlayFocus||d.textInput),"focus-value":o.unref(s),type:"year","use-relative":"",onSelected:o.unref(l),onHoverValue:o.unref(f)},o.createSlots({_:2},[d.$slots["year-overlay-value"]?{name:"item",fn:o.withCtx(({item:m})=>[o.renderSlot(d.$slots,"year-overlay-value",{text:m.text,value:m.value})]),key:"0"}:void 0]),1032,["items","is-last","height","config","no-overlay-focus","focus-value","onSelected","onHoverValue"]))]))}}),M31={key:0,class:"dp__time_input"},z31=["data-test","aria-label","onKeydown","onClick","onMousedown"],w31=o.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1),_31=o.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1),k31=["aria-label","disabled","data-test","onKeydown","onClick"],H31=["data-test","aria-label","onKeydown","onClick","onMousedown"],V31=o.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1),L31=o.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1),S31={key:0},A31=["aria-label"],T31=o.defineComponent({compatConfig:{MODE:3},__name:"TimeInput",props:{hours:{type:Number,default:0},minutes:{type:Number,default:0},seconds:{type:Number,default:0},closeTimePickerBtn:{type:Object,default:null},order:{type:Number,default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},...b4},emits:["set-hours","set-minutes","update:hours","update:minutes","update:seconds","reset-flow","mounted","overlay-closed","overlay-opened","am-pm-change"],setup(e,{expose:t,emit:a}){const r=a,n=e,{setTimePickerElements:c,setTimePickerBackRef:i}=x0(),{defaultedAriaLabels:s,defaultedTransitions:l,defaultedFilters:f,defaultedConfig:u,defaultedRange:d}=re(n),{transitionName:h,showTransition:m}=An(l),v=o.reactive({hours:!1,minutes:!1,seconds:!1}),p=o.ref("AM"),g=o.ref(null),y=o.ref([]),x=o.ref();o.onMounted(()=>{r("mounted")});const C=F=>N2(new Date,{hours:F.hours,minutes:F.minutes,seconds:n.enableSeconds?F.seconds:0,milliseconds:0}),b=o.computed(()=>F=>O(F,n[F])||w(F,n[F])),M=o.computed(()=>({hours:n.hours,minutes:n.minutes,seconds:n.seconds})),w=(F,p1)=>d.value.enabled&&!d.value.disableTimeRangeValidation?!n.validateTime(F,p1):!1,z=(F,p1)=>{if(d.value.enabled&&!d.value.disableTimeRangeValidation){const z1=p1?+n[`${F}Increment`]:-+n[`${F}Increment`],h1=n[F]+z1;return!n.validateTime(F,h1)}return!1},H=o.computed(()=>F=>!B(+n[F]+ +n[`${F}Increment`],F)||z(F,!0)),A=o.computed(()=>F=>!B(+n[F]-+n[`${F}Increment`],F)||z(F,!1)),V=(F,p1)=>Ex(N2(A1(),F),p1),k=(F,p1)=>ve1(N2(A1(),F),p1),_=o.computed(()=>({dp__time_col:!0,dp__time_col_block:!n.timePickerInline,dp__time_col_reg_block:!n.enableSeconds&&n.is24&&!n.timePickerInline,dp__time_col_reg_inline:!n.enableSeconds&&n.is24&&n.timePickerInline,dp__time_col_reg_with_button:!n.enableSeconds&&!n.is24,dp__time_col_sec:n.enableSeconds&&n.is24,dp__time_col_sec_with_button:n.enableSeconds&&!n.is24})),N=o.computed(()=>{const F=[{type:"hours"}];return n.enableMinutes&&F.push({type:"",separator:!0},{type:"minutes"}),n.enableSeconds&&F.push({type:"",separator:!0},{type:"seconds"}),F}),q=o.computed(()=>N.value.filter(F=>!F.separator)),S=o.computed(()=>F=>{if(F==="hours"){const p1=R(+n.hours);return{text:p1<10?`0${p1}`:`${p1}`,value:p1}}return{text:n[F]<10?`0${n[F]}`:`${n[F]}`,value:n[F]}}),O=(F,p1)=>{var z1;if(!n.disabledTimesConfig)return!1;const h1=n.disabledTimesConfig(n.order,F==="hours"?p1:void 0);return h1[F]?!!((z1=h1[F])!=null&&z1.includes(p1)):!0},U=(F,p1)=>p1!=="hours"||p.value==="AM"?F:F+12,J=F=>{const p1=n.is24?24:12,z1=F==="hours"?p1:60,h1=+n[`${F}GridIncrement`],l1=F==="hours"&&!n.is24?h1:0,f1=[];for(let u1=l1;u1<z1;u1+=h1)f1.push({value:n.is24?u1:U(u1,F),text:u1<10?`0${u1}`:`${u1}`});return F==="hours"&&!n.is24&&f1.unshift({value:p.value==="PM"?12:0,text:"12"}),ia(f1,u1=>({active:!1,disabled:f.value.times[F].includes(u1.value)||!B(u1.value,F)||O(F,u1.value)||w(F,u1.value)}))},Y=F=>F>=0?F:59,G=F=>F>=0?F:23,B=(F,p1)=>{const z1=n.minTime?C(as(n.minTime)):null,h1=n.maxTime?C(as(n.maxTime)):null,l1=C(as(M.value,p1,p1==="minutes"||p1==="seconds"?Y(F):G(F)));return z1&&h1?(tn(l1,h1)||P6(l1,h1))&&(na(l1,z1)||P6(l1,z1)):z1?na(l1,z1)||P6(l1,z1):h1?tn(l1,h1)||P6(l1,h1):!0},T=F=>n[`no${F[0].toUpperCase()+F.slice(1)}Overlay`],L=F=>{T(F)||(v[F]=!v[F],v[F]?r("overlay-opened",F):r("overlay-closed",F))},W=F=>F==="hours"?wt:F==="minutes"?h0:ra,j=()=>{x.value&&clearTimeout(x.value)},E=(F,p1=!0,z1)=>{const h1=p1?V:k,l1=p1?+n[`${F}Increment`]:-+n[`${F}Increment`];B(+n[F]+l1,F)&&r(`update:${F}`,W(F)(h1({[F]:+n[F]},{[F]:+n[`${F}Increment`]}))),!(z1!=null&&z1.keyboard)&&u.value.timeArrowHoldThreshold&&(x.value=setTimeout(()=>{E(F,p1)},u.value.timeArrowHoldThreshold))},R=F=>n.is24?F:(F>=12?p.value="PM":p.value="AM",Me1(F)),a1=()=>{p.value==="PM"?(p.value="AM",r("update:hours",n.hours-12)):(p.value="PM",r("update:hours",n.hours+12)),r("am-pm-change",p.value)},n1=F=>{v[F]=!0},t1=(F,p1,z1)=>{if(F&&n.arrowNavigation){Array.isArray(y.value[p1])?y.value[p1][z1]=F:y.value[p1]=[F];const h1=y.value.reduce((l1,f1)=>f1.map((u1,v1)=>[...l1[v1]||[],f1[v1]]),[]);i(n.closeTimePickerBtn),g.value&&(h1[1]=h1[1].concat(g.value)),c(h1,n.order)}},d1=(F,p1)=>(L(F),r(`update:${F}`,p1));return t({openChildCmp:n1}),(F,p1)=>{var z1;return F.disabled?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",M31,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(N.value,(h1,l1)=>{var f1,u1,v1;return o.openBlock(),o.createElementBlock("div",{key:l1,class:o.normalizeClass(_.value)},[h1.separator?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createTextVNode(" : ")],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createElementVNode("button",{ref_for:!0,ref:k1=>t1(k1,l1,0),type:"button",class:o.normalizeClass({dp__btn:!0,dp__inc_dec_button:!F.timePickerInline,dp__inc_dec_button_inline:F.timePickerInline,dp__tp_inline_btn_top:F.timePickerInline,dp__inc_dec_button_disabled:H.value(h1.type)}),"data-test":`${h1.type}-time-inc-btn-${n.order}`,"aria-label":(f1=o.unref(s))==null?void 0:f1.incrementValue(h1.type),tabindex:"0",onKeydown:k1=>o.unref(y3)(k1,()=>E(h1.type,!0,{keyboard:!0}),!0),onClick:k1=>o.unref(u).timeArrowHoldThreshold?void 0:E(h1.type,!0),onMousedown:k1=>o.unref(u).timeArrowHoldThreshold?E(h1.type,!0):void 0,onMouseup:j},[n.timePickerInline?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[w31,_31],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[F.$slots["arrow-up"]?o.renderSlot(F.$slots,"arrow-up",{key:0}):o.createCommentVNode("",!0),F.$slots["arrow-up"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Pl),{key:1}))],64))],42,z31),o.createElementVNode("button",{ref_for:!0,ref:k1=>t1(k1,l1,1),type:"button","aria-label":(u1=o.unref(s))==null?void 0:u1.openTpOverlay(h1.type),class:o.normalizeClass({dp__time_display:!0,dp__time_display_block:!F.timePickerInline,dp__time_display_inline:F.timePickerInline,"dp--time-invalid":b.value(h1.type),"dp--time-overlay-btn":!b.value(h1.type)}),disabled:T(h1.type),tabindex:"0","data-test":`${h1.type}-toggle-overlay-btn-${n.order}`,onKeydown:k1=>o.unref(y3)(k1,()=>L(h1.type),!0),onClick:k1=>L(h1.type)},[F.$slots[h1.type]?o.renderSlot(F.$slots,h1.type,{key:0,text:S.value(h1.type).text,value:S.value(h1.type).value}):o.createCommentVNode("",!0),F.$slots[h1.type]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(S.value(h1.type).text),1)],64))],42,k31),o.createElementVNode("button",{ref_for:!0,ref:k1=>t1(k1,l1,2),type:"button",class:o.normalizeClass({dp__btn:!0,dp__inc_dec_button:!F.timePickerInline,dp__inc_dec_button_inline:F.timePickerInline,dp__tp_inline_btn_bottom:F.timePickerInline,dp__inc_dec_button_disabled:A.value(h1.type)}),"data-test":`${h1.type}-time-dec-btn-${n.order}`,"aria-label":(v1=o.unref(s))==null?void 0:v1.decrementValue(h1.type),tabindex:"0",onKeydown:k1=>o.unref(y3)(k1,()=>E(h1.type,!1,{keyboard:!0}),!0),onClick:k1=>o.unref(u).timeArrowHoldThreshold?void 0:E(h1.type,!1),onMousedown:k1=>o.unref(u).timeArrowHoldThreshold?E(h1.type,!1):void 0,onMouseup:j},[n.timePickerInline?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[V31,L31],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[F.$slots["arrow-down"]?o.renderSlot(F.$slots,"arrow-down",{key:0}):o.createCommentVNode("",!0),F.$slots["arrow-down"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Bl),{key:1}))],64))],42,H31)],64))],2)}),128)),F.is24?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",S31,[F.$slots["am-pm-button"]?o.renderSlot(F.$slots,"am-pm-button",{key:0,toggle:a1,value:p.value}):o.createCommentVNode("",!0),F.$slots["am-pm-button"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("button",{key:1,ref_key:"amPmButton",ref:g,type:"button",class:"dp__pm_am_button",role:"button","aria-label":(z1=o.unref(s))==null?void 0:z1.amPmButton,tabindex:"0",onClick:a1,onKeydown:p1[0]||(p1[0]=h1=>o.unref(y3)(h1,()=>a1(),!0))},o.toDisplayString(p.value),41,A31))])),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(q.value,(h1,l1)=>(o.openBlock(),o.createBlock(o.Transition,{key:l1,name:o.unref(h)(v[h1.type]),css:o.unref(m)},{default:o.withCtx(()=>[v[h1.type]?(o.openBlock(),o.createBlock(En,{key:0,items:J(h1.type),"is-last":F.autoApply&&!o.unref(u).keepActionRow,"esc-close":F.escClose,type:h1.type,"text-input":F.textInput,config:F.config,"arrow-navigation":F.arrowNavigation,"aria-labels":F.ariaLabels,onSelected:f1=>d1(h1.type,f1),onToggle:f1=>L(h1.type),onResetFlow:p1[1]||(p1[1]=f1=>F.$emit("reset-flow"))},o.createSlots({"button-icon":o.withCtx(()=>[F.$slots["clock-icon"]?o.renderSlot(F.$slots,"clock-icon",{key:0}):o.createCommentVNode("",!0),F.$slots["clock-icon"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.resolveDynamicComponent(F.timePickerInline?o.unref(pa):o.unref(Ol)),{key:1}))]),_:2},[F.$slots[`${h1.type}-overlay-value`]?{name:"item",fn:o.withCtx(({item:f1})=>[o.renderSlot(F.$slots,`${h1.type}-overlay-value`,{text:f1.text,value:f1.value})]),key:"0"}:void 0,F.$slots[`${h1.type}-overlay-header`]?{name:"header",fn:o.withCtx(()=>[o.renderSlot(F.$slots,`${h1.type}-overlay-header`,{toggle:()=>L(h1.type)})]),key:"1"}:void 0]),1032,["items","is-last","esc-close","type","text-input","config","arrow-navigation","aria-labels","onSelected","onToggle"])):o.createCommentVNode("",!0)]),_:2},1032,["name","css"]))),128))]))}}}),E31={class:"dp--tp-wrap"},N31=["aria-label","tabindex"],D31=["tabindex"],O31=["aria-label"],yb=o.defineComponent({compatConfig:{MODE:3},__name:"TimePicker",props:{hours:{type:[Number,Array],default:0},minutes:{type:[Number,Array],default:0},seconds:{type:[Number,Array],default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},...b4},emits:["update:hours","update:minutes","update:seconds","mount","reset-flow","overlay-opened","overlay-closed","am-pm-change"],setup(e,{expose:t,emit:a}){const r=a,n=e,{buildMatrix:c,setTimePicker:i}=x0(),s=o.useSlots(),{defaultedTransitions:l,defaultedAriaLabels:f,defaultedTextInput:u,defaultedConfig:d,defaultedRange:h}=re(n),{transitionName:m,showTransition:v}=An(l),{hideNavigationButtons:p}=P5(),g=o.ref(null),y=o.ref(null),x=o.ref([]),C=o.ref(null);o.onMounted(()=>{r("mount"),!n.timePicker&&n.arrowNavigation?c([ke(g.value)],"time"):i(!0,n.timePicker)});const b=o.computed(()=>h.value.enabled&&n.modelAuto?rb(n.internalModelValue):!0),M=o.ref(!1),w=U=>({hours:Array.isArray(n.hours)?n.hours[U]:n.hours,minutes:Array.isArray(n.minutes)?n.minutes[U]:n.minutes,seconds:Array.isArray(n.seconds)?n.seconds[U]:n.seconds}),z=o.computed(()=>{const U=[];if(h.value.enabled)for(let J=0;J<2;J++)U.push(w(J));else U.push(w(0));return U}),H=(U,J=!1,Y="")=>{J||r("reset-flow"),M.value=U,r(U?"overlay-opened":"overlay-closed",Ye.time),n.arrowNavigation&&i(U),o.nextTick(()=>{Y!==""&&x.value[0]&&x.value[0].openChildCmp(Y)})},A=o.computed(()=>({dp__btn:!0,dp__button:!0,dp__button_bottom:n.autoApply&&!d.value.keepActionRow})),V=z3(s,"timePicker"),k=(U,J,Y)=>h.value.enabled?J===0?[U,z.value[1][Y]]:[z.value[0][Y],U]:U,_=U=>{r("update:hours",U)},N=U=>{r("update:minutes",U)},q=U=>{r("update:seconds",U)},S=()=>{if(C.value&&!u.value.enabled&&!n.noOverlayFocus){const U=nb(C.value);U&&U.focus({preventScroll:!0})}},O=U=>{r("overlay-closed",U)};return t({toggleTimePicker:H}),(U,J)=>{var Y;return o.openBlock(),o.createElementBlock("div",E31,[!U.timePicker&&!U.timePickerInline?o.withDirectives((o.openBlock(),o.createElementBlock("button",{key:0,ref_key:"openTimePickerBtn",ref:g,type:"button",class:o.normalizeClass(A.value),"aria-label":(Y=o.unref(f))==null?void 0:Y.openTimePicker,tabindex:U.noOverlayFocus?void 0:0,"data-test":"open-time-picker-btn",onKeydown:J[0]||(J[0]=G=>o.unref(y3)(G,()=>H(!0))),onClick:J[1]||(J[1]=G=>H(!0))},[U.$slots["clock-icon"]?o.renderSlot(U.$slots,"clock-icon",{key:0}):o.createCommentVNode("",!0),U.$slots["clock-icon"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Ol),{key:1}))],42,N31)),[[o.vShow,!o.unref(p)(U.hideNavigation,"time")]]):o.createCommentVNode("",!0),o.createVNode(o.Transition,{name:o.unref(m)(M.value),css:o.unref(v)&&!U.timePickerInline},{default:o.withCtx(()=>{var G;return[M.value||U.timePicker||U.timePickerInline?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:C,class:o.normalizeClass({dp__overlay:!U.timePickerInline,"dp--overlay-absolute":!n.timePicker&&!U.timePickerInline,"dp--overlay-relative":n.timePicker}),style:o.normalizeStyle(U.timePicker?{height:`${o.unref(d).modeHeight}px`}:void 0),tabindex:U.timePickerInline?void 0:0},[o.createElementVNode("div",{class:o.normalizeClass(U.timePickerInline?"dp__time_picker_inline_container":"dp__overlay_container dp__container_flex dp__time_picker_overlay_container"),style:{display:"flex"}},[U.$slots["time-picker-overlay"]?o.renderSlot(U.$slots,"time-picker-overlay",{key:0,hours:e.hours,minutes:e.minutes,seconds:e.seconds,setHours:_,setMinutes:N,setSeconds:q}):o.createCommentVNode("",!0),U.$slots["time-picker-overlay"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(U.timePickerInline?"dp__flex":"dp__overlay_row dp__flex_row")},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(z.value,(B,T)=>o.withDirectives((o.openBlock(),o.createBlock(T31,o.mergeProps({key:T,ref_for:!0},{...U.$props,order:T,hours:B.hours,minutes:B.minutes,seconds:B.seconds,closeTimePickerBtn:y.value,disabledTimesConfig:e.disabledTimesConfig,disabled:T===0?U.fixedStart:U.fixedEnd},{ref_for:!0,ref_key:"timeInputRefs",ref:x,"validate-time":(L,W)=>e.validateTime(L,k(W,T,L)),"onUpdate:hours":L=>_(k(L,T,"hours")),"onUpdate:minutes":L=>N(k(L,T,"minutes")),"onUpdate:seconds":L=>q(k(L,T,"seconds")),onMounted:S,onOverlayClosed:O,onOverlayOpened:J[2]||(J[2]=L=>U.$emit("overlay-opened",L)),onAmPmChange:J[3]||(J[3]=L=>U.$emit("am-pm-change",L))}),o.createSlots({_:2},[o.renderList(o.unref(V),(L,W)=>({name:L,fn:o.withCtx(j=>[o.renderSlot(U.$slots,L,o.mergeProps({ref_for:!0},j))])}))]),1040,["validate-time","onUpdate:hours","onUpdate:minutes","onUpdate:seconds"])),[[o.vShow,T===0?!0:b.value]])),128))],2)),!U.timePicker&&!U.timePickerInline?o.withDirectives((o.openBlock(),o.createElementBlock("button",{key:2,ref_key:"closeTimePickerBtn",ref:y,type:"button",class:o.normalizeClass(A.value),"aria-label":(G=o.unref(f))==null?void 0:G.closeTimePicker,tabindex:"0",onKeydown:J[4]||(J[4]=B=>o.unref(y3)(B,()=>H(!1))),onClick:J[5]||(J[5]=B=>H(!1))},[U.$slots["calendar-icon"]?o.renderSlot(U.$slots,"calendar-icon",{key:0}):o.createCommentVNode("",!0),U.$slots["calendar-icon"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(pa),{key:1}))],42,O31)),[[o.vShow,!o.unref(p)(U.hideNavigation,"time")]]):o.createCommentVNode("",!0)],2)],14,D31)):o.createCommentVNode("",!0)]}),_:3},8,["name","css"])])}}}),xb=(e,t,a,r)=>{const{defaultedRange:n}=re(e),c=(C,b)=>Array.isArray(t[C])?t[C][b]:t[C],i=C=>e.enableSeconds?Array.isArray(t.seconds)?t.seconds[C]:t.seconds:0,s=(C,b)=>C?b!==void 0?n0(C,c("hours",b),c("minutes",b),i(b)):n0(C,t.hours,t.minutes,i()):El(A1(),i(b)),l=(C,b)=>{t[C]=b},f=o.computed(()=>e.modelAuto&&n.value.enabled?Array.isArray(a.value)?a.value.length>1:!1:n.value.enabled),u=(C,b)=>{const M=Object.fromEntries(Object.keys(t).map(w=>w===C?[w,b]:[w,t[w]].slice()));if(f.value&&!n.value.disableTimeRangeValidation){const w=H=>a.value?n0(a.value[H],M.hours[H],M.minutes[H],M.seconds[H]):null,z=H=>Tl(a.value[H],0);return!(l2(w(0),w(1))&&(na(w(0),z(1))||tn(w(1),z(0))))}return!0},d=(C,b)=>{u(C,b)&&(l(C,b),r&&r())},h=C=>{d("hours",C)},m=C=>{d("minutes",C)},v=C=>{d("seconds",C)},p=(C,b,M,w)=>{b&&h(C),!b&&!M&&m(C),M&&v(C),a.value&&w(a.value)},g=C=>{if(C){const b=Array.isArray(C),M=b?[+C[0].hours,+C[1].hours]:+C.hours,w=b?[+C[0].minutes,+C[1].minutes]:+C.minutes,z=b?[+C[0].seconds,+C[1].seconds]:+C.seconds;l("hours",M),l("minutes",w),e.enableSeconds&&l("seconds",z)}},y=(C,b)=>{const M={hours:Array.isArray(t.hours)?t.hours[C]:t.hours,disabledArr:[]};return(b||b===0)&&(M.hours=b),Array.isArray(e.disabledTimes)&&(M.disabledArr=n.value.enabled&&Array.isArray(e.disabledTimes[C])?e.disabledTimes[C]:e.disabledTimes),M},x=o.computed(()=>(C,b)=>{var M;if(Array.isArray(e.disabledTimes)){const{disabledArr:w,hours:z}=y(C,b),H=w.filter(A=>+A.hours===z);return((M=H[0])==null?void 0:M.minutes)==="*"?{hours:[z],minutes:void 0,seconds:void 0}:{hours:[],minutes:(H==null?void 0:H.map(A=>+A.minutes))??[],seconds:(H==null?void 0:H.map(A=>A.seconds?+A.seconds:void 0))??[]}}return{hours:[],minutes:[],seconds:[]}});return{setTime:l,updateHours:h,updateMinutes:m,updateSeconds:v,getSetDateTime:s,updateTimeValues:p,getSecondsValue:i,assignStartTime:g,validateTime:u,disabledTimesConfig:x}},P31=(e,t)=>{const{modelValue:a,time:r}=Tn(e,t),{defaultedStartTime:n,defaultedRange:c}=re(e),{updateTimeValues:i,getSetDateTime:s,setTime:l,assignStartTime:f,disabledTimesConfig:u,validateTime:d}=xb(e,r,a,h);function h(){t("update-flow-step")}const m=b=>{const{hours:M,minutes:w,seconds:z}=b;return{hours:+M,minutes:+w,seconds:z?+z:0}},v=()=>{if(e.startTime){if(Array.isArray(e.startTime)){const M=m(e.startTime[0]),w=m(e.startTime[1]);return[N2(A1(),M),N2(A1(),w)]}const b=m(e.startTime);return N2(A1(),b)}return c.value.enabled?[null,null]:null},p=()=>{if(c.value.enabled){const[b,M]=v();a.value=[s(b,0),s(M,1)]}else a.value=s(v())},g=b=>Array.isArray(b)?[X0(A1(b[0])),X0(A1(b[1]))]:[X0(b??A1())],y=(b,M,w)=>{l("hours",b),l("minutes",M),l("seconds",e.enableSeconds?w:0)},x=()=>{const[b,M]=g(a.value);return c.value.enabled?y([b.hours,M.hours],[b.minutes,M.minutes],[b.seconds,M.seconds]):y(b.hours,b.minutes,b.seconds)};o.onMounted(()=>{if(!e.shadow)return f(n.value),a.value?x():p()});const C=()=>{Array.isArray(a.value)?a.value=a.value.map((b,M)=>b&&s(b,M)):a.value=s(a.value),t("time-update")};return{modelValue:a,time:r,disabledTimesConfig:u,updateTime:(b,M=!0,w=!1)=>{i(b,M,w,C)},validateTime:d}},B31=o.defineComponent({compatConfig:{MODE:3},__name:"TimePickerSolo",props:{...b4},emits:["update:internal-model-value","time-update","am-pm-change","mount","reset-flow","update-flow-step","overlay-toggle"],setup(e,{expose:t,emit:a}){const r=a,n=e,c=o.useSlots(),i=z3(c,"timePicker"),s=o.ref(null),{time:l,modelValue:f,disabledTimesConfig:u,updateTime:d,validateTime:h}=P31(n,r);return o.onMounted(()=>{n.shadow||r("mount",null)}),t({getSidebarProps:()=>({modelValue:f,time:l,updateTime:d}),toggleTimePicker:(m,v=!1,p="")=>{var g;(g=s.value)==null||g.toggleTimePicker(m,v,p)}}),(m,v)=>(o.openBlock(),o.createBlock(F5,{"multi-calendars":0,stretch:""},{default:o.withCtx(()=>[o.createVNode(yb,o.mergeProps({ref_key:"tpRef",ref:s},m.$props,{hours:o.unref(l).hours,minutes:o.unref(l).minutes,seconds:o.unref(l).seconds,"internal-model-value":m.internalModelValue,"disabled-times-config":o.unref(u),"validate-time":o.unref(h),"onUpdate:hours":v[0]||(v[0]=p=>o.unref(d)(p)),"onUpdate:minutes":v[1]||(v[1]=p=>o.unref(d)(p,!1)),"onUpdate:seconds":v[2]||(v[2]=p=>o.unref(d)(p,!1,!0)),onAmPmChange:v[3]||(v[3]=p=>m.$emit("am-pm-change",p)),onResetFlow:v[4]||(v[4]=p=>m.$emit("reset-flow")),onOverlayClosed:v[5]||(v[5]=p=>m.$emit("overlay-toggle",{open:!1,overlay:p})),onOverlayOpened:v[6]||(v[6]=p=>m.$emit("overlay-toggle",{open:!0,overlay:p}))}),o.createSlots({_:2},[o.renderList(o.unref(i),(p,g)=>({name:p,fn:o.withCtx(y=>[o.renderSlot(m.$slots,p,o.normalizeProps(o.guardReactiveProps(y)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"])]),_:3}))}}),F31={class:"dp--header-wrap"},R31={key:0,class:"dp__month_year_wrap"},I31={key:0},$31={class:"dp__month_year_wrap"},U31=["aria-label","data-test","onClick","onKeydown"],W31=o.defineComponent({compatConfig:{MODE:3},__name:"DpHeader",props:{month:{type:Number,default:0},year:{type:Number,default:0},instance:{type:Number,default:0},years:{type:Array,default:()=>[]},months:{type:Array,default:()=>[]},...b4},emits:["update-month-year","mount","reset-flow","overlay-closed","overlay-opened"],setup(e,{expose:t,emit:a}){const r=a,n=e,{defaultedTransitions:c,defaultedAriaLabels:i,defaultedMultiCalendars:s,defaultedFilters:l,defaultedConfig:f,defaultedHighlight:u,propDates:d}=re(n),{transitionName:h,showTransition:m}=An(c),{buildMatrix:v}=x0(),{handleMonthYearChange:p,isDisabled:g,updateMonthYear:y}=Je1(n,r),{showLeftIcon:x,showRightIcon:C}=P5(),b=o.ref(!1),M=o.ref(!1),w=o.ref([null,null,null,null]);o.onMounted(()=>{r("mount")});const z=B=>({get:()=>n[B],set:T=>{const L=B===X3.month?X3.year:X3.month;r("update-month-year",{[B]:T,[L]:n[L]}),B===X3.month?S(!0):O(!0)}}),H=o.computed(z(X3.month)),A=o.computed(z(X3.year)),V=o.computed(()=>B=>({month:n.month,year:n.year,items:B===X3.month?n.months:n.years,instance:n.instance,updateMonthYear:y,toggle:B===X3.month?S:O})),k=o.computed(()=>n.months.find(T=>T.value===n.month)||{text:"",value:0}),_=o.computed(()=>ia(n.months,B=>{const T=n.month===B.value,L=an(B.value,ib(n.year,d.value.minDate),sb(n.year,d.value.maxDate))||l.value.months.includes(B.value),W=db(u.value,B.value,n.year);return{active:T,disabled:L,highlighted:W}})),N=o.computed(()=>ia(n.years,B=>{const T=n.year===B.value,L=an(B.value,sa(d.value.minDate),sa(d.value.maxDate))||l.value.years.includes(B.value),W=$l(u.value,B.value);return{active:T,disabled:L,highlighted:W}})),q=(B,T,L)=>{L!==void 0?B.value=L:B.value=!B.value,B.value?r("overlay-opened",T):r("overlay-closed",T)},S=(B=!1,T)=>{U(B),q(b,Ye.month,T)},O=(B=!1,T)=>{U(B),q(M,Ye.year,T)},U=B=>{B||r("reset-flow")},J=(B,T)=>{n.arrowNavigation&&(w.value[T]=ke(B),v(w.value,"monthYear"))},Y=o.computed(()=>{var B,T;return[{type:X3.month,index:1,toggle:S,modelValue:H.value,updateModelValue:L=>H.value=L,text:k.value.text,showSelectionGrid:b.value,items:_.value,ariaLabel:(B=i.value)==null?void 0:B.openMonthsOverlay},{type:X3.year,index:2,toggle:O,modelValue:A.value,updateModelValue:L=>A.value=L,text:cb(n.year,n.locale),showSelectionGrid:M.value,items:N.value,ariaLabel:(T=i.value)==null?void 0:T.openYearsOverlay}]}),G=o.computed(()=>n.disableYearSelect?[Y.value[0]]:n.yearFirst?[...Y.value].reverse():Y.value);return t({toggleMonthPicker:S,toggleYearPicker:O,handleMonthYearChange:p}),(B,T)=>{var L,W,j;return o.openBlock(),o.createElementBlock("div",F31,[B.$slots["month-year"]?(o.openBlock(),o.createElementBlock("div",R31,[o.renderSlot(B.$slots,"month-year",o.normalizeProps(o.guardReactiveProps({month:e.month,year:e.year,months:e.months,years:e.years,updateMonthYear:o.unref(y),handleMonthYearChange:o.unref(p),instance:e.instance})))])):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[B.$slots["top-extra"]?(o.openBlock(),o.createElementBlock("div",I31,[o.renderSlot(B.$slots,"top-extra",{value:B.internalModelValue})])):o.createCommentVNode("",!0),o.createElementVNode("div",$31,[o.unref(x)(o.unref(s),e.instance)&&!B.vertical?(o.openBlock(),o.createBlock(gr,{key:0,"aria-label":(L=o.unref(i))==null?void 0:L.prevMonth,disabled:o.unref(g)(!1),onActivate:T[0]||(T[0]=E=>o.unref(p)(!1,!0)),onSetRef:T[1]||(T[1]=E=>J(E,0))},{default:o.withCtx(()=>[B.$slots["arrow-left"]?o.renderSlot(B.$slots,"arrow-left",{key:0}):o.createCommentVNode("",!0),B.$slots["arrow-left"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Nl),{key:1}))]),_:3},8,["aria-label","disabled"])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(["dp__month_year_wrap",{dp__year_disable_select:B.disableYearSelect}])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(G.value,(E,R)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:E.type},[o.createElementVNode("button",{ref_for:!0,ref:a1=>J(a1,R+1),type:"button",class:"dp__btn dp__month_year_select",tabindex:"0","aria-label":E.ariaLabel,"data-test":`${E.type}-toggle-overlay-${e.instance}`,onClick:E.toggle,onKeydown:a1=>o.unref(y3)(a1,()=>E.toggle(),!0)},[B.$slots[E.type]?o.renderSlot(B.$slots,E.type,{key:0,text:E.text,value:n[E.type]}):o.createCommentVNode("",!0),B.$slots[E.type]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(E.text),1)],64))],40,U31),o.createVNode(o.Transition,{name:o.unref(h)(E.showSelectionGrid),css:o.unref(m)},{default:o.withCtx(()=>[E.showSelectionGrid?(o.openBlock(),o.createBlock(En,{key:0,items:E.items,"arrow-navigation":B.arrowNavigation,"hide-navigation":B.hideNavigation,"is-last":B.autoApply&&!o.unref(f).keepActionRow,"skip-button-ref":!1,config:B.config,type:E.type,"header-refs":[],"esc-close":B.escClose,"menu-wrap-ref":B.menuWrapRef,"text-input":B.textInput,"aria-labels":B.ariaLabels,onSelected:E.updateModelValue,onToggle:E.toggle},o.createSlots({"button-icon":o.withCtx(()=>[B.$slots["calendar-icon"]?o.renderSlot(B.$slots,"calendar-icon",{key:0}):o.createCommentVNode("",!0),B.$slots["calendar-icon"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(pa),{key:1}))]),_:2},[B.$slots[`${E.type}-overlay-value`]?{name:"item",fn:o.withCtx(({item:a1})=>[o.renderSlot(B.$slots,`${E.type}-overlay-value`,{text:a1.text,value:a1.value})]),key:"0"}:void 0,B.$slots[`${E.type}-overlay`]?{name:"overlay",fn:o.withCtx(()=>[o.renderSlot(B.$slots,`${E.type}-overlay`,o.mergeProps({ref_for:!0},V.value(E.type)))]),key:"1"}:void 0,B.$slots[`${E.type}-overlay-header`]?{name:"header",fn:o.withCtx(()=>[o.renderSlot(B.$slots,`${E.type}-overlay-header`,{toggle:E.toggle})]),key:"2"}:void 0]),1032,["items","arrow-navigation","hide-navigation","is-last","config","type","esc-close","menu-wrap-ref","text-input","aria-labels","onSelected","onToggle"])):o.createCommentVNode("",!0)]),_:2},1032,["name","css"])],64))),128))],2),o.unref(x)(o.unref(s),e.instance)&&B.vertical?(o.openBlock(),o.createBlock(gr,{key:1,"aria-label":(W=o.unref(i))==null?void 0:W.prevMonth,disabled:o.unref(g)(!1),onActivate:T[2]||(T[2]=E=>o.unref(p)(!1,!0))},{default:o.withCtx(()=>[B.$slots["arrow-up"]?o.renderSlot(B.$slots,"arrow-up",{key:0}):o.createCommentVNode("",!0),B.$slots["arrow-up"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Pl),{key:1}))]),_:3},8,["aria-label","disabled"])):o.createCommentVNode("",!0),o.unref(C)(o.unref(s),e.instance)?(o.openBlock(),o.createBlock(gr,{key:2,ref:"rightIcon",disabled:o.unref(g)(!0),"aria-label":(j=o.unref(i))==null?void 0:j.nextMonth,onActivate:T[3]||(T[3]=E=>o.unref(p)(!0,!0)),onSetRef:T[4]||(T[4]=E=>J(E,B.disableYearSelect?2:3))},{default:o.withCtx(()=>[B.$slots[B.vertical?"arrow-down":"arrow-right"]?o.renderSlot(B.$slots,B.vertical?"arrow-down":"arrow-right",{key:0}):o.createCommentVNode("",!0),B.$slots[B.vertical?"arrow-down":"arrow-right"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.resolveDynamicComponent(B.vertical?o.unref(Bl):o.unref(Dl)),{key:1}))]),_:3},8,["disabled","aria-label"])):o.createCommentVNode("",!0)])],64))])}}}),q31=["aria-label"],j31={class:"dp__calendar_header",role:"row"},Y31={key:0,class:"dp__calendar_header_item",role:"gridcell"},G31=["aria-label"],X31=o.createElementVNode("div",{class:"dp__calendar_header_separator"},null,-1),K31=["aria-label"],Z31={key:0,role:"gridcell",class:"dp__calendar_item dp__week_num"},Q31={class:"dp__cell_inner"},J31=["id","aria-selected","aria-disabled","aria-label","data-test","onClick","onKeydown","onMouseenter","onMouseleave","onMousedown"],e41=o.defineComponent({compatConfig:{MODE:3},__name:"DpCalendar",props:{mappedDates:{type:Array,default:()=>[]},instance:{type:Number,default:0},month:{type:Number,default:0},year:{type:Number,default:0},...b4},emits:["select-date","set-hover-date","handle-scroll","mount","handle-swipe","handle-space","tooltip-open","tooltip-close"],setup(e,{expose:t,emit:a}){const r=a,n=e,{buildMultiLevelMatrix:c}=x0(),{defaultedTransitions:i,defaultedConfig:s,defaultedAriaLabels:l,defaultedMultiCalendars:f,defaultedWeekNumbers:u,defaultedMultiDates:d}=re(n),h=o.ref(null),m=o.ref({bottom:"",left:"",transform:""}),v=o.ref([]),p=o.ref(null),g=o.ref(!0),y=o.ref(""),x=o.ref({startX:0,endX:0,startY:0,endY:0}),C=o.ref([]),b=o.ref({left:"50%"}),M=o.ref(!1),w=o.computed(()=>n.calendar?n.calendar(n.mappedDates):n.mappedDates),z=o.computed(()=>n.dayNames?Array.isArray(n.dayNames)?n.dayNames:n.dayNames(n.locale,+n.weekStart):Ce1(n.formatLocale,n.locale,+n.weekStart));o.onMounted(()=>{r("mount",{cmp:"calendar",refs:v}),s.value.noSwipe||p.value&&(p.value.addEventListener("touchstart",Y,{passive:!1}),p.value.addEventListener("touchend",G,{passive:!1}),p.value.addEventListener("touchmove",B,{passive:!1})),n.monthChangeOnScroll&&p.value&&p.value.addEventListener("wheel",W,{passive:!1})});const H=t1=>t1?n.vertical?"vNext":"next":n.vertical?"vPrevious":"previous",A=(t1,d1)=>{if(n.transitions){const F=k3(ut(A1(),n.month,n.year));y.value=me(k3(ut(A1(),t1,d1)),F)?i.value[H(!0)]:i.value[H(!1)],g.value=!1,o.nextTick(()=>{g.value=!0})}},V=o.computed(()=>({[n.calendarClassName]:!!n.calendarClassName})),k=o.computed(()=>t1=>{const d1=ze1(t1);return{dp__marker_dot:d1.type==="dot",dp__marker_line:d1.type==="line"}}),_=o.computed(()=>t1=>l2(t1,h.value)),N=o.computed(()=>({dp__calendar:!0,dp__calendar_next:f.value.count>0&&n.instance!==0})),q=o.computed(()=>t1=>n.hideOffsetDates?t1.current:!0),S=t1=>P4(t1,"yyyy-MM-dd"),O=async(t1,d1,F)=>{const p1=ke(v.value[d1][F]);if(p1){const{width:z1,height:h1}=p1.getBoundingClientRect();h.value=t1.value;let l1={left:`${z1/2}px`},f1=-50;if(await o.nextTick(),C.value[0]){const{left:u1,width:v1}=C.value[0].getBoundingClientRect();u1<0&&(l1={left:"0"},f1=0,b.value.left=`${z1/2}px`),window.innerWidth<u1+v1&&(l1={right:"0"},f1=0,b.value.left=`${v1-z1/2}px`)}m.value={bottom:`${h1}px`,...l1,transform:`translateX(${f1}%)`},r("tooltip-open",t1.marker)}},U=async(t1,d1,F)=>{var p1,z1;if(M.value&&d.value.enabled&&d.value.dragSelect)return r("select-date",t1);r("set-hover-date",t1),(z1=(p1=t1.marker)==null?void 0:p1.tooltip)!=null&&z1.length&&await O(t1,d1,F)},J=t1=>{h.value&&(h.value=null,m.value=JSON.parse(JSON.stringify({bottom:"",left:"",transform:""})),r("tooltip-close",t1.marker))},Y=t1=>{x.value.startX=t1.changedTouches[0].screenX,x.value.startY=t1.changedTouches[0].screenY},G=t1=>{x.value.endX=t1.changedTouches[0].screenX,x.value.endY=t1.changedTouches[0].screenY,T()},B=t1=>{n.vertical&&!n.inline&&t1.preventDefault()},T=()=>{const t1=n.vertical?"Y":"X";Math.abs(x.value[`start${t1}`]-x.value[`end${t1}`])>10&&r("handle-swipe",x.value[`start${t1}`]>x.value[`end${t1}`]?"right":"left")},L=(t1,d1,F)=>{t1&&(Array.isArray(v.value[d1])?v.value[d1][F]=t1:v.value[d1]=[t1]),n.arrowNavigation&&c(v.value,"calendar")},W=t1=>{n.monthChangeOnScroll&&(t1.preventDefault(),r("handle-scroll",t1))},j=t1=>u.value.type==="local"?Ll(t1.value,{weekStartsOn:+n.weekStart}):u.value.type==="iso"?Hl(t1.value):typeof u.value.type=="function"?u.value.type(t1.value):"",E=t1=>{const d1=t1[0];return u.value.hideOnOffsetDates?t1.some(F=>F.current)?j(d1):"":j(d1)},R=(t1,d1)=>{d.value.enabled||(r0(t1,s.value),r("select-date",d1))},a1=t1=>{r0(t1,s.value)},n1=t1=>{d.value.enabled&&d.value.dragSelect?(M.value=!0,r("select-date",t1)):d.value.enabled&&r("select-date",t1)};return t({triggerTransition:A}),(t1,d1)=>{var F;return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(N.value)},[o.createElementVNode("div",{ref_key:"calendarWrapRef",ref:p,role:"grid",class:o.normalizeClass(V.value),"aria-label":(F=o.unref(l))==null?void 0:F.calendarWrap},[o.createElementVNode("div",j31,[t1.weekNumbers?(o.openBlock(),o.createElementBlock("div",Y31,o.toDisplayString(t1.weekNumName),1)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(z.value,(p1,z1)=>{var h1,l1;return o.openBlock(),o.createElementBlock("div",{key:z1,class:"dp__calendar_header_item",role:"gridcell","data-test":"calendar-header","aria-label":(l1=(h1=o.unref(l))==null?void 0:h1.weekDay)==null?void 0:l1.call(h1,z1)},[t1.$slots["calendar-header"]?o.renderSlot(t1.$slots,"calendar-header",{key:0,day:p1,index:z1}):o.createCommentVNode("",!0),t1.$slots["calendar-header"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(p1),1)],64))],8,G31)}),128))]),X31,o.createVNode(o.Transition,{name:y.value,css:!!t1.transitions},{default:o.withCtx(()=>{var p1;return[g.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"dp__calendar",role:"rowgroup","aria-label":((p1=o.unref(l))==null?void 0:p1.calendarDays)||void 0,onMouseleave:d1[1]||(d1[1]=z1=>M.value=!1)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(w.value,(z1,h1)=>(o.openBlock(),o.createElementBlock("div",{key:h1,class:"dp__calendar_row",role:"row"},[t1.weekNumbers?(o.openBlock(),o.createElementBlock("div",Z31,[o.createElementVNode("div",Q31,o.toDisplayString(E(z1.days)),1)])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(z1.days,(l1,f1)=>{var u1,v1,k1;return o.openBlock(),o.createElementBlock("div",{id:S(l1.value),ref_for:!0,ref:b1=>L(b1,h1,f1),key:f1+h1,role:"gridcell",class:"dp__calendar_item","aria-selected":(l1.classData.dp__active_date||l1.classData.dp__range_start||l1.classData.dp__range_start)??void 0,"aria-disabled":l1.classData.dp__cell_disabled||void 0,"aria-label":(v1=(u1=o.unref(l))==null?void 0:u1.day)==null?void 0:v1.call(u1,l1),tabindex:"0","data-test":l1.value,onClick:o.withModifiers(b1=>R(b1,l1),["prevent"]),onKeydown:b1=>o.unref(y3)(b1,()=>t1.$emit("select-date",l1)),onMouseenter:b1=>U(l1,h1,f1),onMouseleave:b1=>J(l1),onMousedown:b1=>n1(l1),onMouseup:d1[0]||(d1[0]=b1=>M.value=!1)},[o.createElementVNode("div",{class:o.normalizeClass(["dp__cell_inner",l1.classData])},[t1.$slots.day&&q.value(l1)?o.renderSlot(t1.$slots,"day",{key:0,day:+l1.text,date:l1.value}):o.createCommentVNode("",!0),t1.$slots.day?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(l1.text),1)],64)),l1.marker&&q.value(l1)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:2},[t1.$slots.marker?o.renderSlot(t1.$slots,"marker",{key:0,marker:l1.marker,day:+l1.text,date:l1.value}):(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(k.value(l1.marker)),style:o.normalizeStyle(l1.marker.color?{backgroundColor:l1.marker.color}:{})},null,6))],64)):o.createCommentVNode("",!0),_.value(l1.value)?(o.openBlock(),o.createElementBlock("div",{key:3,ref_for:!0,ref_key:"activeTooltip",ref:C,class:"dp__marker_tooltip",style:o.normalizeStyle(m.value)},[(k1=l1.marker)!=null&&k1.tooltip?(o.openBlock(),o.createElementBlock("div",{key:0,class:"dp__tooltip_content",onClick:a1},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l1.marker.tooltip,(b1,H1)=>(o.openBlock(),o.createElementBlock("div",{key:H1,class:"dp__tooltip_text"},[t1.$slots["marker-tooltip"]?o.renderSlot(t1.$slots,"marker-tooltip",{key:0,tooltip:b1,day:l1.value}):o.createCommentVNode("",!0),t1.$slots["marker-tooltip"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createElementVNode("div",{class:"dp__tooltip_mark",style:o.normalizeStyle(b1.color?{backgroundColor:b1.color}:{})},null,4),o.createElementVNode("div",null,o.toDisplayString(b1.text),1)],64))]))),128)),o.createElementVNode("div",{class:"dp__arrow_bottom_tp",style:o.normalizeStyle(b.value)},null,4)])):o.createCommentVNode("",!0)],4)):o.createCommentVNode("",!0)],2)],40,J31)}),128))]))),128))],40,K31)):o.createCommentVNode("",!0)]}),_:3},8,["name","css"])],10,q31)],2)}}}),im=e=>Array.isArray(e),t41=(e,t,a,r)=>{const n=o.ref([]),c=o.ref(new Date),i=o.ref(),{modelValue:s,calendars:l,time:f,today:u}=Tn(e,t),{defaultedMultiCalendars:d,defaultedStartTime:h,defaultedRange:m,defaultedConfig:v,defaultedTz:p,propDates:g,defaultedMultiDates:y}=re(e),{validateMonthYearInRange:x,isDisabled:C,isDateRangeAllowed:b,checkMinMaxRange:M}=b0(e),{updateTimeValues:w,getSetDateTime:z,setTime:H,assignStartTime:A,validateTime:V,disabledTimesConfig:k}=xb(e,f,s,r),_=o.computed(()=>y1=>l.value[y1]?l.value[y1].month:0),N=o.computed(()=>y1=>l.value[y1]?l.value[y1].year:0),q=y1=>!v.value.keepViewOnOffsetClick||y1?!0:!i.value,S=(y1,m1,S1,T1=!1)=>{var Q1,Q2;q(T1)&&(l.value[y1]||(l.value[y1]={month:0,year:0}),l.value[y1].month=tm(m1)?(Q1=l.value[y1])==null?void 0:Q1.month:m1,l.value[y1].year=tm(S1)?(Q2=l.value[y1])==null?void 0:Q2.year:S1)},O=()=>{e.autoApply&&t("select-date")};o.watch(s,(y1,m1)=>{JSON.stringify(y1)!==JSON.stringify(m1)&&Y()},{deep:!0}),o.onMounted(()=>{e.shadow||(s.value||(t1(),h.value&&A(h.value)),Y(!0),e.focusStartDate&&e.startDate&&t1())});const U=o.computed(()=>{var y1;return(y1=e.flow)!=null&&y1.length&&!e.partialFlow?e.flowStep===e.flow.length:!0}),J=()=>{e.autoApply&&U.value&&t("auto-apply")},Y=(y1=!1)=>{if(s.value)return Array.isArray(s.value)?(n.value=s.value,E(y1)):T(s.value,y1);if(d.value.count&&y1&&!e.startDate)return B(A1(),y1)},G=()=>Array.isArray(s.value)&&m.value.enabled?o2(s.value[0])===o2(s.value[1]??s.value[0]):!1,B=(y1,m1=!1)=>{if((!d.value.count||!d.value.static||m1)&&S(0,o2(y1),n2(y1)),d.value.count&&(!d.value.solo||!s.value||G()))for(let S1=1;S1<d.value.count;S1++){const T1=N2(A1(),{month:_.value(S1-1),year:N.value(S1-1)}),Q1=Ex(T1,{months:1});l.value[S1]={month:o2(Q1),year:n2(Q1)}}},T=(y1,m1)=>{B(y1),H("hours",wt(y1)),H("minutes",h0(y1)),H("seconds",ra(y1)),d.value.count&&m1&&n1()},L=y1=>{if(d.value.count){if(d.value.solo)return 0;const m1=o2(y1[0]),S1=o2(y1[1]);return Math.abs(S1-m1)<d.value.count?0:1}return 1},W=(y1,m1)=>{y1[1]&&m.value.showLastInRange?B(y1[L(y1)],m1):B(y1[0],m1);const S1=(T1,Q1)=>[T1(y1[0]),y1[1]?T1(y1[1]):f[Q1][1]];H("hours",S1(wt,"hours")),H("minutes",S1(h0,"minutes")),H("seconds",S1(ra,"seconds"))},j=(y1,m1)=>{if((m.value.enabled||e.weekPicker)&&!y.value.enabled)return W(y1,m1);if(y.value.enabled&&m1){const S1=y1[y1.length-1];return T(S1,m1)}},E=y1=>{const m1=s.value;j(m1,y1),d.value.count&&d.value.solo&&n1()},R=(y1,m1)=>{const S1=N2(A1(),{month:_.value(m1),year:N.value(m1)}),T1=y1<0?f4(S1,1):ca(S1,1);x(o2(T1),n2(T1),y1<0,e.preventMinMaxNavigation)&&(S(m1,o2(T1),n2(T1)),t("update-month-year",{instance:m1,month:o2(T1),year:n2(T1)}),d.value.count&&!d.value.solo&&a1(m1),a())},a1=y1=>{for(let m1=y1-1;m1>=0;m1--){const S1=ca(N2(A1(),{month:_.value(m1+1),year:N.value(m1+1)}),1);S(m1,o2(S1),n2(S1))}for(let m1=y1+1;m1<=d.value.count-1;m1++){const S1=f4(N2(A1(),{month:_.value(m1-1),year:N.value(m1-1)}),1);S(m1,o2(S1),n2(S1))}},n1=()=>{if(Array.isArray(s.value)&&s.value.length===2){const y1=A1(A1(s.value[1]?s.value[1]:f4(s.value[0],1))),[m1,S1]=[o2(s.value[0]),n2(s.value[0])],[T1,Q1]=[o2(s.value[1]),n2(s.value[1])];(m1!==T1||m1===T1&&S1!==Q1)&&d.value.solo&&S(1,o2(y1),n2(y1))}else s.value&&!Array.isArray(s.value)&&(S(0,o2(s.value),n2(s.value)),B(A1()))},t1=()=>{e.startDate&&(S(0,o2(A1(e.startDate)),n2(A1(e.startDate))),d.value.count&&a1(0))},d1=(y1,m1)=>{if(e.monthChangeOnScroll){const S1=new Date().getTime()-c.value.getTime(),T1=Math.abs(y1.deltaY);let Q1=500;T1>1&&(Q1=100),T1>100&&(Q1=0),S1>Q1&&(c.value=new Date,R(e.monthChangeOnScroll!=="inverse"?-y1.deltaY:y1.deltaY,m1))}},F=(y1,m1,S1=!1)=>{e.monthChangeOnArrows&&e.vertical===S1&&p1(y1,m1)},p1=(y1,m1)=>{R(y1==="right"?-1:1,m1)},z1=y1=>{if(g.value.markers)return Ic(y1.value,g.value.markers)},h1=(y1,m1)=>{switch(e.sixWeeks===!0?"append":e.sixWeeks){case"prepend":return[!0,!1];case"center":return[y1==0,!0];case"fair":return[y1==0||m1>y1,!0];case"append":return[!1,!1];default:return[!1,!1]}},l1=(y1,m1,S1,T1)=>{if(e.sixWeeks&&y1.length<6){const Q1=6-y1.length,Q2=(m1.getDay()+7-T1)%7,we=6-(S1.getDay()+7-T1)%7,[d3,j3]=h1(Q2,we);for(let k2=1;k2<=Q1;k2++)if(j3?!!(k2%2)==d3:d3){const xe=y1[0].days[0],G4=f1(J3(xe.value,-7),o2(m1));y1.unshift({days:G4})}else{const xe=y1[y1.length-1],G4=xe.days[xe.days.length-1],X4=f1(J3(G4.value,1),o2(m1));y1.push({days:X4})}}return y1},f1=(y1,m1)=>{const S1=A1(y1),T1=[];for(let Q1=0;Q1<7;Q1++){const Q2=J3(S1,Q1),we=o2(Q2)!==m1;T1.push({text:e.hideOffsetDates&&we?"":Q2.getDate(),value:Q2,current:!we,classData:{}})}return T1},u1=(y1,m1)=>{const S1=[],T1=new Date(m1,y1),Q1=new Date(m1,y1+1,0),Q2=e.weekStart,we=y4(T1,{weekStartsOn:Q2}),d3=j3=>{const k2=f1(j3,y1);if(S1.push({days:k2}),!S1[S1.length-1].days.some(xe=>l2(k3(xe.value),k3(Q1)))){const xe=J3(j3,7);d3(xe)}};return d3(we),l1(S1,T1,Q1,Q2)},v1=y1=>{const m1=n0(A1(y1.value),f.hours,f.minutes,K1());t("date-update",m1),y.value.enabled?Ul(m1,s,y.value.limit):s.value=m1,r(),o.nextTick().then(()=>{J()})},k1=y1=>m.value.noDisabledRange?ob(n.value[0],y1).some(m1=>C(m1)):!1,b1=()=>{n.value=s.value?s.value.slice():[],n.value.length===2&&!(m.value.fixedStart||m.value.fixedEnd)&&(n.value=[])},H1=(y1,m1)=>{const S1=[A1(y1.value),J3(A1(y1.value),+m.value.autoRange)];b(S1)?(m1&&F1(y1.value),n.value=S1):t("invalid-date",y1.value)},F1=y1=>{const m1=o2(A1(y1)),S1=n2(A1(y1));if(S(0,m1,S1),d.value.count>0)for(let T1=1;T1<d.value.count;T1++){const Q1=Ae1(N2(A1(y1),{year:_.value(T1-1),month:N.value(T1-1)}));S(T1,Q1.month,Q1.year)}},$1=y1=>{if(k1(y1.value)||!M(y1.value,s.value,m.value.fixedStart?0:1))return t("invalid-date",y1.value);n.value=vb(A1(y1.value),s,t,m)},W1=(y1,m1)=>{if(b1(),m.value.autoRange)return H1(y1,m1);if(m.value.fixedStart||m.value.fixedEnd)return $1(y1);n.value[0]?M(A1(y1.value),s.value)&&!k1(y1.value)?ne(A1(y1.value),A1(n.value[0]))?(n.value.unshift(A1(y1.value)),t("range-end",n.value[0])):(n.value[1]=A1(y1.value),t("range-end",n.value[1])):(e.autoApply&&t("auto-apply-invalid",y1.value),t("invalid-date",y1.value)):(n.value[0]=A1(y1.value),t("range-start",n.value[0]))},K1=(y1=!0)=>e.enableSeconds?Array.isArray(f.seconds)?y1?f.seconds[0]:f.seconds[1]:f.seconds:0,d2=y1=>{n.value[y1]=n0(n.value[y1],f.hours[y1],f.minutes[y1],K1(y1!==1))},G1=()=>{var y1,m1;n.value[0]&&n.value[1]&&+((y1=n.value)==null?void 0:y1[0])>+((m1=n.value)==null?void 0:m1[1])&&(n.value.reverse(),t("range-start",n.value[0]),t("range-end",n.value[1]))},j2=()=>{n.value.length&&(n.value[0]&&!n.value[1]?d2(0):(d2(0),d2(1),r()),G1(),s.value=n.value.slice(),R5(n.value,t,e.autoApply,e.modelAuto))},O1=(y1,m1=!1)=>{if(C(y1.value)||!y1.current&&e.hideOffsetDates)return t("invalid-date",y1.value);if(i.value=JSON.parse(JSON.stringify(y1)),!m.value.enabled)return v1(y1);im(f.hours)&&im(f.minutes)&&!y.value.enabled&&(W1(y1,m1),j2())},c2=(y1,m1)=>{var S1;S(y1,m1.month,m1.year,!0),d.value.count&&!d.value.solo&&a1(y1),t("update-month-year",{instance:y1,month:m1.month,year:m1.year}),a(d.value.solo?y1:void 0);const T1=(S1=e.flow)!=null&&S1.length?e.flow[e.flowStep]:void 0;!m1.fromNav&&(T1===Ye.month||T1===Ye.year)&&r()},Y2=(y1,m1)=>{pb({value:y1,modelValue:s,range:m.value.enabled,timezone:m1?void 0:p.value.timezone}),O(),e.multiCalendars&&o.nextTick().then(()=>Y(!0))},m2=()=>{m.value.enabled?s.value&&Array.isArray(s.value)&&s.value[0]?s.value=ne(A1(),s.value[0])?[A1(),s.value[0]]:[s.value[0],A1()]:s.value=[A1()]:s.value=A1(),O()},A2=()=>{if(Array.isArray(s.value))if(y.value.enabled){const y1=Pe();s.value[s.value.length-1]=z(y1)}else s.value=s.value.map((y1,m1)=>y1&&z(y1,m1));else s.value=z(s.value);t("time-update")},Pe=()=>Array.isArray(s.value)&&s.value.length?s.value[s.value.length-1]:null;return{calendars:l,modelValue:s,month:_,year:N,time:f,disabledTimesConfig:k,today:u,validateTime:V,getCalendarDays:u1,getMarker:z1,handleScroll:d1,handleSwipe:p1,handleArrow:F,selectDate:O1,updateMonthYear:c2,presetDate:Y2,selectCurrentDate:m2,updateTime:(y1,m1=!0,S1=!1)=>{w(y1,m1,S1,A2)}}},a41={key:0},r41=o.defineComponent({__name:"DatePicker",props:{...b4},emits:["tooltip-open","tooltip-close","mount","update:internal-model-value","update-flow-step","reset-flow","auto-apply","focus-menu","select-date","range-start","range-end","invalid-fixed-range","time-update","am-pm-change","time-picker-open","time-picker-close","recalculate-position","update-month-year","auto-apply-invalid","date-update","invalid-date","overlay-toggle"],setup(e,{expose:t,emit:a}){const r=a,n=e,{calendars:c,month:i,year:s,modelValue:l,time:f,disabledTimesConfig:u,today:d,validateTime:h,getCalendarDays:m,getMarker:v,handleArrow:p,handleScroll:g,handleSwipe:y,selectDate:x,updateMonthYear:C,presetDate:b,selectCurrentDate:M,updateTime:w}=t41(n,r,G,B),z=o.useSlots(),{setHoverDate:H,getDayClassData:A,clearHoverDate:V}=r31(l,n),{defaultedMultiCalendars:k}=re(n),_=o.ref([]),N=o.ref([]),q=o.ref(null),S=z3(z,"calendar"),O=z3(z,"monthYear"),U=z3(z,"timePicker"),J=d1=>{n.shadow||r("mount",d1)};o.watch(c,()=>{n.shadow||setTimeout(()=>{r("recalculate-position")},0)},{deep:!0});const Y=o.computed(()=>d1=>m(i.value(d1),s.value(d1)).map(F=>({...F,days:F.days.map(p1=>(p1.marker=v(p1),p1.classData=A(p1),p1))})));function G(d1){var F;d1||d1===0?(F=N.value[d1])==null||F.triggerTransition(i.value(d1),s.value(d1)):N.value.forEach((p1,z1)=>p1.triggerTransition(i.value(z1),s.value(z1)))}function B(){r("update-flow-step")}const T=(d1,F=!1)=>{x(d1,F),n.spaceConfirm&&r("select-date")},L=(d1,F,p1=0)=>{var z1;(z1=_.value[p1])==null||z1.toggleMonthPicker(d1,F)},W=(d1,F,p1=0)=>{var z1;(z1=_.value[p1])==null||z1.toggleYearPicker(d1,F)},j=(d1,F,p1)=>{var z1;(z1=q.value)==null||z1.toggleTimePicker(d1,F,p1)},E=d1=>{if(!n.range){const F=l.value?l.value:d,p1=d1?y4(F,{weekStartsOn:1}):Ix(F,{weekStartsOn:1});x({value:p1,current:o2(F)===i.value(0),text:"",classData:{}})}},R=d1=>{var F;(F=_.value[0])==null||F.handleMonthYearChange(d1,!0)},a1=d1=>{C(0,{month:i.value(0),year:s.value(0)+(d1?1:-1),fromNav:!0})},n1=(d1,F)=>{d1===Ye.time&&r(`time-picker-${F?"open":"close"}`),r("overlay-toggle",{open:F,overlay:d1})},t1=d1=>{r("overlay-toggle",{open:!1,overlay:d1}),r("focus-menu")};return t({clearHoverDate:V,presetDate:b,selectCurrentDate:M,toggleMonthPicker:L,toggleYearPicker:W,toggleTimePicker:j,handleArrow:p,updateMonthYear:C,getSidebarProps:()=>({modelValue:l,month:i,year:s,time:f,updateTime:w,updateMonthYear:C,selectDate:x,presetDate:b}),changeMonth:R,changeYear:a1,selectWeekDate:E}),(d1,F)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(F5,{"multi-calendars":o.unref(k).count,collapse:d1.collapse},{default:o.withCtx(({instance:p1,index:z1})=>[d1.disableMonthYearSelect?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(W31,o.mergeProps({key:0,ref:h1=>{h1&&(_.value[z1]=h1)},months:o.unref(ab)(d1.formatLocale,d1.locale,d1.monthNameFormat),years:o.unref(Fl)(d1.yearRange,d1.locale,d1.reverseYears),month:o.unref(i)(p1),year:o.unref(s)(p1),instance:p1},d1.$props,{onMount:F[0]||(F[0]=h1=>J(o.unref(G0).header)),onResetFlow:F[1]||(F[1]=h1=>d1.$emit("reset-flow")),onUpdateMonthYear:h1=>o.unref(C)(p1,h1),onOverlayClosed:t1,onOverlayOpened:F[2]||(F[2]=h1=>d1.$emit("overlay-toggle",{open:!0,overlay:h1}))}),o.createSlots({_:2},[o.renderList(o.unref(O),(h1,l1)=>({name:h1,fn:o.withCtx(f1=>[o.renderSlot(d1.$slots,h1,o.normalizeProps(o.guardReactiveProps(f1)))])}))]),1040,["months","years","month","year","instance","onUpdateMonthYear"])),o.createVNode(e41,o.mergeProps({ref:h1=>{h1&&(N.value[z1]=h1)},"mapped-dates":Y.value(p1),month:o.unref(i)(p1),year:o.unref(s)(p1),instance:p1},d1.$props,{onSelectDate:h1=>o.unref(x)(h1,p1!==1),onHandleSpace:h1=>T(h1,p1!==1),onSetHoverDate:F[3]||(F[3]=h1=>o.unref(H)(h1)),onHandleScroll:h1=>o.unref(g)(h1,p1),onHandleSwipe:h1=>o.unref(y)(h1,p1),onMount:F[4]||(F[4]=h1=>J(o.unref(G0).calendar)),onResetFlow:F[5]||(F[5]=h1=>d1.$emit("reset-flow")),onTooltipOpen:F[6]||(F[6]=h1=>d1.$emit("tooltip-open",h1)),onTooltipClose:F[7]||(F[7]=h1=>d1.$emit("tooltip-close",h1))}),o.createSlots({_:2},[o.renderList(o.unref(S),(h1,l1)=>({name:h1,fn:o.withCtx(f1=>[o.renderSlot(d1.$slots,h1,o.normalizeProps(o.guardReactiveProps({...f1})))])}))]),1040,["mapped-dates","month","year","instance","onSelectDate","onHandleSpace","onHandleScroll","onHandleSwipe"])]),_:3},8,["multi-calendars","collapse"]),d1.enableTimePicker?(o.openBlock(),o.createElementBlock("div",a41,[d1.$slots["time-picker"]?o.renderSlot(d1.$slots,"time-picker",o.normalizeProps(o.mergeProps({key:0},{time:o.unref(f),updateTime:o.unref(w)}))):(o.openBlock(),o.createBlock(yb,o.mergeProps({key:1,ref_key:"timePickerRef",ref:q},d1.$props,{hours:o.unref(f).hours,minutes:o.unref(f).minutes,seconds:o.unref(f).seconds,"internal-model-value":d1.internalModelValue,"disabled-times-config":o.unref(u),"validate-time":o.unref(h),onMount:F[8]||(F[8]=p1=>J(o.unref(G0).timePicker)),"onUpdate:hours":F[9]||(F[9]=p1=>o.unref(w)(p1)),"onUpdate:minutes":F[10]||(F[10]=p1=>o.unref(w)(p1,!1)),"onUpdate:seconds":F[11]||(F[11]=p1=>o.unref(w)(p1,!1,!0)),onResetFlow:F[12]||(F[12]=p1=>d1.$emit("reset-flow")),onOverlayClosed:F[13]||(F[13]=p1=>n1(p1,!1)),onOverlayOpened:F[14]||(F[14]=p1=>n1(p1,!0)),onAmPmChange:F[15]||(F[15]=p1=>d1.$emit("am-pm-change",p1))}),o.createSlots({_:2},[o.renderList(o.unref(U),(p1,z1)=>({name:p1,fn:o.withCtx(h1=>[o.renderSlot(d1.$slots,p1,o.normalizeProps(o.guardReactiveProps(h1)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"]))])):o.createCommentVNode("",!0)],64))}}),n41=(e,t)=>{const a=o.ref(),{defaultedMultiCalendars:r,defaultedConfig:n,defaultedHighlight:c,defaultedRange:i,propDates:s,defaultedFilters:l,defaultedMultiDates:f}=re(e),{modelValue:u,year:d,month:h,calendars:m}=Tn(e,t),{isDisabled:v}=b0(e),{selectYear:p,groupedYears:g,showYearPicker:y,isDisabled:x,toggleYearPicker:C,handleYearSelect:b,handleYear:M}=gb({modelValue:u,multiCalendars:r,highlight:c,calendars:m,propDates:s,month:h,year:d,filters:l,props:e,emit:t}),w=(S,O)=>[S,O].map(U=>P4(U,"MMMM",{locale:e.formatLocale})).join("-"),z=o.computed(()=>S=>u.value?Array.isArray(u.value)?u.value.some(O=>Qh(S,O)):Qh(u.value,S):!1),H=S=>{if(i.value.enabled){if(Array.isArray(u.value)){const O=l2(S,u.value[0])||l2(S,u.value[1]);return O5(u.value,a.value,S)&&!O}return!1}return!1},A=(S,O)=>S.quarter===jh(O)&&S.year===n2(O),V=S=>typeof c.value=="function"?c.value({quarter:jh(S),year:n2(S)}):!!c.value.quarters.find(O=>A(O,S)),k=o.computed(()=>S=>{const O=N2(new Date,{year:d.value(S)});return _11({start:kl(O),end:Rx(O)}).map(U=>{const J=$0(U),Y=Yh(U),G=v(U),B=H(J),T=V(J);return{text:w(J,Y),value:J,active:z.value(J),highlighted:T,disabled:G,isBetween:B}})}),_=S=>{Ul(S,u,f.value.limit),t("auto-apply",!0)},N=S=>{u.value=Wl(u,S,t),R5(u.value,t,e.autoApply,e.modelAuto)},q=S=>{u.value=S,t("auto-apply")};return{defaultedConfig:n,defaultedMultiCalendars:r,groupedYears:g,year:d,isDisabled:x,quarters:k,showYearPicker:y,modelValue:u,setHoverDate:S=>{a.value=S},selectYear:p,selectQuarter:(S,O,U)=>{if(!U)return m.value[O].month=o2(Yh(S)),f.value.enabled?_(S):i.value.enabled?N(S):q(S)},toggleYearPicker:C,handleYearSelect:b,handleYear:M}},c41={class:"dp--quarter-items"},i41=["data-test","disabled","onClick","onMouseover"],s41=o.defineComponent({compatConfig:{MODE:3},__name:"QuarterPicker",props:{...b4},emits:["update:internal-model-value","reset-flow","overlay-closed","auto-apply","range-start","range-end","overlay-toggle","update-month-year"],setup(e,{expose:t,emit:a}){const r=a,n=e,c=o.useSlots(),i=z3(c,"yearMode"),{defaultedMultiCalendars:s,defaultedConfig:l,groupedYears:f,year:u,isDisabled:d,quarters:h,modelValue:m,showYearPicker:v,setHoverDate:p,selectQuarter:g,toggleYearPicker:y,handleYearSelect:x,handleYear:C}=n41(n,r);return t({getSidebarProps:()=>({modelValue:m,year:u,selectQuarter:g,handleYearSelect:x,handleYear:C})}),(b,M)=>(o.openBlock(),o.createBlock(F5,{"multi-calendars":o.unref(s).count,collapse:b.collapse,stretch:""},{default:o.withCtx(({instance:w})=>[o.createElementVNode("div",{class:"dp-quarter-picker-wrap",style:o.normalizeStyle({minHeight:`${o.unref(l).modeHeight}px`})},[b.$slots["top-extra"]?o.renderSlot(b.$slots,"top-extra",{key:0,value:b.internalModelValue}):o.createCommentVNode("",!0),o.createElementVNode("div",null,[o.createVNode(mb,o.mergeProps(b.$props,{items:o.unref(f)(w),instance:w,"show-year-picker":o.unref(v)[w],year:o.unref(u)(w),"is-disabled":z=>o.unref(d)(w,z),onHandleYear:z=>o.unref(C)(w,z),onYearSelect:z=>o.unref(x)(z,w),onToggleYearPicker:z=>o.unref(y)(w,z==null?void 0:z.flow,z==null?void 0:z.show)}),o.createSlots({_:2},[o.renderList(o.unref(i),(z,H)=>({name:z,fn:o.withCtx(A=>[o.renderSlot(b.$slots,z,o.normalizeProps(o.guardReactiveProps(A)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),o.createElementVNode("div",c41,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(h)(w),(z,H)=>(o.openBlock(),o.createElementBlock("div",{key:H},[o.createElementVNode("button",{type:"button",class:o.normalizeClass(["dp--qr-btn",{"dp--qr-btn-active":z.active,"dp--qr-btn-between":z.isBetween,"dp--qr-btn-disabled":z.disabled,"dp--highlighted":z.highlighted}]),"data-test":z.value,disabled:z.disabled,onClick:A=>o.unref(g)(z.value,w,z.disabled),onMouseover:A=>o.unref(p)(z.value)},[b.$slots.quarter?o.renderSlot(b.$slots,"quarter",{key:0,value:z.value,text:z.text}):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(z.text),1)],64))],42,i41)]))),128))])],4)]),_:3},8,["multi-calendars","collapse"]))}}),o41=["id","aria-label"],l41={key:0,class:"dp--menu-load-container"},f41=o.createElementVNode("span",{class:"dp--menu-loader"},null,-1),u41=[f41],d41={key:0,class:"dp__sidebar_left"},h41=["data-test","onClick","onKeydown"],m41={key:2,class:"dp__sidebar_right"},p41={key:3,class:"dp__action_extra"},sm=o.defineComponent({compatConfig:{MODE:3},__name:"DatepickerMenu",props:{...B5,shadow:{type:Boolean,default:!1},openOnTop:{type:Boolean,default:!1},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},getInputRect:{type:Function,default:()=>({})}},emits:["close-picker","select-date","auto-apply","time-update","flow-step","update-month-year","invalid-select","update:internal-model-value","recalculate-position","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","auto-apply-invalid","date-update","invalid-date","overlay-toggle"],setup(e,{expose:t,emit:a}){const r=a,n=e,c=o.ref(null),i=o.computed(()=>{const{openOnTop:l1,...f1}=n;return{...f1,flowStep:H.value,collapse:n.collapse,noOverlayFocus:n.noOverlayFocus,menuWrapRef:c.value}}),{setMenuFocused:s,setShiftKey:l,control:f}=hb(),u=o.useSlots(),{defaultedTextInput:d,defaultedInline:h,defaultedConfig:m}=re(n),v=o.ref(null),p=o.ref(0),g=o.ref(null),y=o.ref(!1),x=o.ref(null);o.onMounted(()=>{if(!n.shadow){y.value=!0,C(),window.addEventListener("resize",C);const l1=ke(c);if(l1&&!d.value.enabled&&!h.value.enabled&&(s(!0),q()),l1){const f1=u1=>{m.value.allowPreventDefault&&u1.preventDefault(),r0(u1,m.value,!0)};l1.addEventListener("pointerdown",f1),l1.addEventListener("mousedown",f1)}}}),o.onUnmounted(()=>{window.removeEventListener("resize",C)});const C=()=>{const l1=ke(g);l1&&(p.value=l1.getBoundingClientRect().width)},{arrowRight:b,arrowLeft:M,arrowDown:w,arrowUp:z}=x0(),{flowStep:H,updateFlowStep:A,childMount:V,resetFlow:k}=n31(n,r,x),_=o.computed(()=>n.monthPicker?x31:n.yearPicker?C31:n.timePicker?B31:n.quarterPicker?s41:r41),N=o.computed(()=>{var l1;if(m.value.arrowLeft)return m.value.arrowLeft;const f1=(l1=c.value)==null?void 0:l1.getBoundingClientRect(),u1=n.getInputRect();return u1.width<p.value&&u1.left<=((f1==null?void 0:f1.left)??0)?`${u1.width/2}px`:"50%"}),q=()=>{const l1=ke(c);l1&&l1.focus({preventScroll:!0})},S=o.computed(()=>{var l1;return((l1=x.value)==null?void 0:l1.getSidebarProps())||{}}),O=()=>{n.openOnTop&&r("recalculate-position")},U=z3(u,"action"),J=o.computed(()=>n.monthPicker||n.yearPicker?z3(u,"monthYear"):n.timePicker?z3(u,"timePicker"):z3(u,"shared")),Y=o.computed(()=>n.openOnTop?"dp__arrow_bottom":"dp__arrow_top"),G=o.computed(()=>({dp__menu_disabled:n.disabled,dp__menu_readonly:n.readonly,"dp-menu-loading":n.loading})),B=o.computed(()=>({dp__menu:!0,dp__menu_index:!h.value.enabled,dp__relative:h.value.enabled,[n.menuClassName]:!!n.menuClassName})),T=l1=>{r0(l1,m.value,!0)},L=()=>{n.escClose&&r("close-picker")},W=l1=>{if(n.arrowNavigation){if(l1===c3.up)return z();if(l1===c3.down)return w();if(l1===c3.left)return M();if(l1===c3.right)return b()}else l1===c3.right||l1===c3.up?n1("handleArrow",c3.left,0,l1===c3.up):n1("handleArrow",c3.right,0,l1===c3.down)},j=l1=>{l(l1.shiftKey),!n.disableMonthYearSelect&&l1.code===te.tab&&l1.target.classList.contains("dp__menu")&&f.value.shiftKeyInMenu&&(l1.preventDefault(),r0(l1,m.value,!0),r("close-picker"))},E=()=>{q(),r("time-picker-close")},R=l1=>{var f1,u1,v1;(f1=x.value)==null||f1.toggleTimePicker(!1,!1),(u1=x.value)==null||u1.toggleMonthPicker(!1,!1,l1),(v1=x.value)==null||v1.toggleYearPicker(!1,!1,l1)},a1=(l1,f1=0)=>{var u1,v1,k1;return l1==="month"?(u1=x.value)==null?void 0:u1.toggleMonthPicker(!1,!0,f1):l1==="year"?(v1=x.value)==null?void 0:v1.toggleYearPicker(!1,!0,f1):l1==="time"?(k1=x.value)==null?void 0:k1.toggleTimePicker(!0,!1):R(f1)},n1=(l1,...f1)=>{var u1,v1;(u1=x.value)!=null&&u1[l1]&&((v1=x.value)==null||v1[l1](...f1))},t1=()=>{n1("selectCurrentDate")},d1=(l1,f1)=>{n1("presetDate",l1,f1)},F=()=>{n1("clearHoverDate")},p1=(l1,f1)=>{n1("updateMonthYear",l1,f1)},z1=(l1,f1)=>{l1.preventDefault(),W(f1)},h1=l1=>{if(j(l1),l1.key===te.home||l1.key===te.end)return n1("selectWeekDate",l1.key===te.home);if(l1.key===te.pageUp||l1.key===te.pageDown)return l1.shiftKey?n1("changeYear",l1.key===te.pageUp):n1("changeMonth",l1.key===te.pageUp);switch(l1.key){case te.esc:return L();case te.arrowLeft:return z1(l1,c3.left);case te.arrowRight:return z1(l1,c3.right);case te.arrowUp:return z1(l1,c3.up);case te.arrowDown:return z1(l1,c3.down);default:return}};return t({updateMonthYear:p1,switchView:a1}),(l1,f1)=>{var u1,v1,k1;return o.openBlock(),o.createElementBlock("div",{id:l1.uid?`dp-menu-${l1.uid}`:void 0,ref_key:"dpMenuRef",ref:c,tabindex:"0",role:"dialog","aria-label":(u1=l1.ariaLabels)==null?void 0:u1.menu,class:o.normalizeClass(B.value),style:o.normalizeStyle({"--dp-arrow-left":N.value}),onMouseleave:F,onClick:T,onKeydown:h1},[(l1.disabled||l1.readonly)&&o.unref(h).enabled||l1.loading?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(G.value)},[l1.loading?(o.openBlock(),o.createElementBlock("div",l41,u41)):o.createCommentVNode("",!0)],2)):o.createCommentVNode("",!0),!o.unref(h).enabled&&!l1.teleportCenter?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(Y.value)},null,2)):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"innerMenuRef",ref:g,class:o.normalizeClass({dp__menu_content_wrapper:((v1=l1.presetDates)==null?void 0:v1.length)||!!l1.$slots["left-sidebar"]||!!l1.$slots["right-sidebar"],"dp--menu-content-wrapper-collapsed":e.collapse&&(((k1=l1.presetDates)==null?void 0:k1.length)||!!l1.$slots["left-sidebar"]||!!l1.$slots["right-sidebar"])}),style:o.normalizeStyle({"--dp-menu-width":`${p.value}px`})},[l1.$slots["left-sidebar"]?(o.openBlock(),o.createElementBlock("div",d41,[o.renderSlot(l1.$slots,"left-sidebar",o.normalizeProps(o.guardReactiveProps(S.value)))])):o.createCommentVNode("",!0),l1.presetDates.length?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass({"dp--preset-dates-collapsed":e.collapse,"dp--preset-dates":!0})},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l1.presetDates,(b1,H1)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:H1},[b1.slot?o.renderSlot(l1.$slots,b1.slot,{key:0,presetDate:d1,label:b1.label,value:b1.value}):(o.openBlock(),o.createElementBlock("button",{key:1,type:"button",style:o.normalizeStyle(b1.style||{}),class:o.normalizeClass(["dp__btn dp--preset-range",{"dp--preset-range-collapsed":e.collapse}]),"data-test":b1.testId??void 0,onClick:o.withModifiers(F1=>d1(b1.value,b1.noTz),["prevent"]),onKeydown:F1=>o.unref(y3)(F1,()=>d1(b1.value,b1.noTz),!0)},o.toDisplayString(b1.label),47,h41))],64))),128))],2)):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"calendarWrapperRef",ref:v,class:"dp__instance_calendar",role:"document"},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(_.value),o.mergeProps({ref_key:"dynCmpRef",ref:x},i.value,{"flow-step":o.unref(H),onMount:o.unref(V),onUpdateFlowStep:o.unref(A),onResetFlow:o.unref(k),onFocusMenu:q,onSelectDate:f1[0]||(f1[0]=b1=>l1.$emit("select-date")),onDateUpdate:f1[1]||(f1[1]=b1=>l1.$emit("date-update",b1)),onTooltipOpen:f1[2]||(f1[2]=b1=>l1.$emit("tooltip-open",b1)),onTooltipClose:f1[3]||(f1[3]=b1=>l1.$emit("tooltip-close",b1)),onAutoApply:f1[4]||(f1[4]=b1=>l1.$emit("auto-apply",b1)),onRangeStart:f1[5]||(f1[5]=b1=>l1.$emit("range-start",b1)),onRangeEnd:f1[6]||(f1[6]=b1=>l1.$emit("range-end",b1)),onInvalidFixedRange:f1[7]||(f1[7]=b1=>l1.$emit("invalid-fixed-range",b1)),onTimeUpdate:f1[8]||(f1[8]=b1=>l1.$emit("time-update")),onAmPmChange:f1[9]||(f1[9]=b1=>l1.$emit("am-pm-change",b1)),onTimePickerOpen:f1[10]||(f1[10]=b1=>l1.$emit("time-picker-open",b1)),onTimePickerClose:E,onRecalculatePosition:O,onUpdateMonthYear:f1[11]||(f1[11]=b1=>l1.$emit("update-month-year",b1)),onAutoApplyInvalid:f1[12]||(f1[12]=b1=>l1.$emit("auto-apply-invalid",b1)),onInvalidDate:f1[13]||(f1[13]=b1=>l1.$emit("invalid-date",b1)),onOverlayToggle:f1[14]||(f1[14]=b1=>l1.$emit("overlay-toggle",b1)),"onUpdate:internalModelValue":f1[15]||(f1[15]=b1=>l1.$emit("update:internal-model-value",b1))}),o.createSlots({_:2},[o.renderList(J.value,(b1,H1)=>({name:b1,fn:o.withCtx(F1=>[o.renderSlot(l1.$slots,b1,o.normalizeProps(o.guardReactiveProps({...F1})))])}))]),1040,["flow-step","onMount","onUpdateFlowStep","onResetFlow"]))],512),l1.$slots["right-sidebar"]?(o.openBlock(),o.createElementBlock("div",m41,[o.renderSlot(l1.$slots,"right-sidebar",o.normalizeProps(o.guardReactiveProps(S.value)))])):o.createCommentVNode("",!0),l1.$slots["action-extra"]?(o.openBlock(),o.createElementBlock("div",p41,[l1.$slots["action-extra"]?o.renderSlot(l1.$slots,"action-extra",{key:0,selectCurrentDate:t1}):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)],6),!l1.autoApply||o.unref(m).keepActionRow?(o.openBlock(),o.createBlock(u31,o.mergeProps({key:2,"menu-mount":y.value},i.value,{"calendar-width":p.value,onClosePicker:f1[16]||(f1[16]=b1=>l1.$emit("close-picker")),onSelectDate:f1[17]||(f1[17]=b1=>l1.$emit("select-date")),onInvalidSelect:f1[18]||(f1[18]=b1=>l1.$emit("invalid-select")),onSelectNow:t1}),o.createSlots({_:2},[o.renderList(o.unref(U),(b1,H1)=>({name:b1,fn:o.withCtx(F1=>[o.renderSlot(l1.$slots,b1,o.normalizeProps(o.guardReactiveProps({...F1})))])}))]),1040,["menu-mount","calendar-width"])):o.createCommentVNode("",!0)],46,o41)}}}),v41=typeof window<"u"?window:void 0,us=()=>{},g41=e=>o.getCurrentScope()?(o.onScopeDispose(e),!0):!1,y41=(e,t,a,r)=>{if(!e)return us;let n=us;const c=o.watch(()=>o.unref(e),s=>{n(),s&&(s.addEventListener(t,a,r),n=()=>{s.removeEventListener(t,a,r),n=us})},{immediate:!0,flush:"post"}),i=()=>{c(),n()};return g41(i),i},x41=(e,t,a,r={})=>{const{window:n=v41,event:c="pointerdown"}=r;return n?y41(n,c,i=>{const s=ke(e),l=ke(t);!s||!l||s===i.target||i.composedPath().includes(s)||i.composedPath().includes(l)||a(i)},{passive:!0}):void 0},b41=o.defineComponent({compatConfig:{MODE:3},__name:"VueDatePicker",props:{...B5},emits:["update:model-value","update:model-timezone-value","text-submit","closed","cleared","open","focus","blur","internal-model-change","recalculate-position","flow-step","update-month-year","invalid-select","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","date-update","invalid-date","overlay-toggle"],setup(e,{expose:t,emit:a}){const r=a,n=e,c=o.useSlots(),i=o.ref(!1),s=o.toRef(n,"modelValue"),l=o.toRef(n,"timezone"),f=o.ref(null),u=o.ref(null),d=o.ref(null),h=o.ref(!1),m=o.ref(null),v=o.ref(!1),p=o.ref(!1),g=o.ref(!1),{setMenuFocused:y,setShiftKey:x}=hb(),{clearArrowNav:C}=x0(),{validateDate:b,isValidTime:M}=b0(n),{defaultedTransitions:w,defaultedTextInput:z,defaultedInline:H,defaultedConfig:A,defaultedRange:V,defaultedMultiDates:k}=re(n),{menuTransition:_,showTransition:N}=An(w);o.onMounted(()=>{W(n.modelValue),o.nextTick().then(()=>{if(!H.value.enabled){const m1=G(m.value);m1==null||m1.addEventListener("scroll",z1),window==null||window.addEventListener("resize",h1)}}),H.value.enabled&&(i.value=!0),window==null||window.addEventListener("keyup",l1),window==null||window.addEventListener("keydown",f1)}),o.onUnmounted(()=>{if(!H.value.enabled){const m1=G(m.value);m1==null||m1.removeEventListener("scroll",z1),window==null||window.removeEventListener("resize",h1)}window==null||window.removeEventListener("keyup",l1),window==null||window.removeEventListener("keydown",f1)});const q=z3(c,"all",n.presetDates),S=z3(c,"input");o.watch([s,l],()=>{W(s.value)},{deep:!0});const{openOnTop:O,menuStyle:U,xCorrect:J,setMenuPosition:Y,getScrollableParent:G,shadowRender:B}=e31({menuRef:f,menuRefInner:u,inputRef:d,pickerWrapperRef:m,inline:H,emit:r,props:n,slots:c}),{inputValue:T,internalModelValue:L,parseExternalModelValue:W,emitModelValue:j,formatInputValue:E,checkBeforeEmit:R}=Qe1(r,n,h),a1=o.computed(()=>({dp__main:!0,dp__theme_dark:n.dark,dp__theme_light:!n.dark,dp__flex_display:H.value.enabled,"dp--flex-display-collapsed":g.value,dp__flex_display_with_input:H.value.input})),n1=o.computed(()=>n.dark?"dp__theme_dark":"dp__theme_light"),t1=o.computed(()=>n.teleport?{to:typeof n.teleport=="boolean"?"body":n.teleport,disabled:!n.teleport||H.value.enabled}:{}),d1=o.computed(()=>({class:"dp__outer_menu_wrap"})),F=o.computed(()=>H.value.enabled&&(n.timePicker||n.monthPicker||n.yearPicker||n.quarterPicker)),p1=()=>{var m1,S1;return(S1=(m1=d.value)==null?void 0:m1.$el)==null?void 0:S1.getBoundingClientRect()},z1=()=>{i.value&&(A.value.closeOnScroll?K1():Y())},h1=()=>{var m1;i.value&&Y();const S1=(m1=u.value)==null?void 0:m1.$el.getBoundingClientRect().width;g.value=document.body.offsetWidth<=S1},l1=m1=>{m1.key==="Tab"&&!H.value.enabled&&!n.teleport&&A.value.tabOutClosesMenu&&(m.value.contains(document.activeElement)||K1()),p.value=m1.shiftKey},f1=m1=>{p.value=m1.shiftKey},u1=()=>{!n.disabled&&!n.readonly&&(B(sm,n),Y(!1),i.value=!0,i.value&&r("open"),i.value||W1(),W(n.modelValue))},v1=()=>{var m1;T.value="",W1(),(m1=d.value)==null||m1.setParsedDate(null),r("update:model-value",null),r("update:model-timezone-value",null),r("cleared"),A.value.closeOnClearValue&&K1()},k1=()=>{const m1=L.value;return!m1||!Array.isArray(m1)&&b(m1)?!0:Array.isArray(m1)?k.value.enabled||m1.length===2&&b(m1[0])&&b(m1[1])?!0:V.value.partialRange&&!n.timePicker?b(m1[0]):!1:!1},b1=()=>{R()&&k1()?(j(),K1()):r("invalid-select",L.value)},H1=m1=>{F1(),j(),A.value.closeOnAutoApply&&!m1&&K1()},F1=()=>{d.value&&z.value.enabled&&d.value.setParsedDate(L.value)},$1=(m1=!1)=>{n.autoApply&&M(L.value)&&k1()&&(V.value.enabled&&Array.isArray(L.value)?(V.value.partialRange||L.value.length===2)&&H1(m1):H1(m1))},W1=()=>{z.value.enabled||(L.value=null)},K1=()=>{H.value.enabled||(i.value&&(i.value=!1,J.value=!1,y(!1),x(!1),C(),r("closed"),T.value&&W(s.value)),W1(),r("blur"))},d2=(m1,S1,T1=!1)=>{if(!m1){L.value=null;return}const Q1=Array.isArray(m1)?!m1.some(we=>!b(we)):b(m1),Q2=M(m1);Q1&&Q2&&(L.value=m1,S1&&(v.value=T1,b1(),r("text-submit")))},G1=()=>{n.autoApply&&M(L.value)&&j(),F1()},j2=()=>i.value?K1():u1(),O1=m1=>{L.value=m1},c2=()=>{z.value.enabled&&(h.value=!0,E()),r("focus")},Y2=()=>{if(z.value.enabled&&(h.value=!1,W(n.modelValue),v.value)){const m1=ke1(m.value,p.value);m1==null||m1.focus()}r("blur")},m2=m1=>{u.value&&u.value.updateMonthYear(0,{month:em(m1.month),year:em(m1.year)})},A2=m1=>{W(m1??n.modelValue)},Pe=(m1,S1)=>{var T1;(T1=u.value)==null||T1.switchView(m1,S1)},y1=m1=>A.value.onClickOutside?A.value.onClickOutside(m1):K1();return x41(f,d,()=>y1(k1)),t({closeMenu:K1,selectDate:b1,clearValue:v1,openMenu:u1,onScroll:z1,formatInputValue:E,updateInternalModelValue:O1,setMonthYear:m2,parseModel:A2,switchView:Pe,toggleMenu:j2}),(m1,S1)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"pickerWrapperRef",ref:m,class:o.normalizeClass(a1.value),"data-datepicker-instance":""},[o.createVNode(o31,o.mergeProps({ref_key:"inputRef",ref:d,"input-value":o.unref(T),"onUpdate:inputValue":S1[0]||(S1[0]=T1=>o.isRef(T)?T.value=T1:null),"is-menu-open":i.value},m1.$props,{onClear:v1,onOpen:u1,onSetInputDate:d2,onSetEmptyDate:o.unref(j),onSelectDate:b1,onToggle:j2,onClose:K1,onFocus:c2,onBlur:Y2,onRealBlur:S1[1]||(S1[1]=T1=>h.value=!1)}),o.createSlots({_:2},[o.renderList(o.unref(S),(T1,Q1)=>({name:T1,fn:o.withCtx(Q2=>[o.renderSlot(m1.$slots,T1,o.normalizeProps(o.guardReactiveProps(Q2)))])}))]),1040,["input-value","is-menu-open","onSetEmptyDate"]),(o.openBlock(),o.createBlock(o.resolveDynamicComponent(m1.teleport?o.Teleport:"div"),o.normalizeProps(o.guardReactiveProps(t1.value)),{default:o.withCtx(()=>[o.createVNode(o.Transition,{name:o.unref(_)(o.unref(O)),css:o.unref(N)&&!o.unref(H).enabled},{default:o.withCtx(()=>[i.value?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0,ref_key:"dpWrapMenuRef",ref:f},d1.value,{class:{"dp--menu-wrapper":!o.unref(H).enabled},style:o.unref(H).enabled?void 0:o.unref(U)}),[o.createVNode(sm,o.mergeProps({ref_key:"dpMenuRef",ref:u},m1.$props,{"internal-model-value":o.unref(L),"onUpdate:internalModelValue":S1[2]||(S1[2]=T1=>o.isRef(L)?L.value=T1:null),class:{[n1.value]:!0,"dp--menu-wrapper":m1.teleport},"open-on-top":o.unref(O),"no-overlay-focus":F.value,collapse:g.value,"get-input-rect":p1,onClosePicker:K1,onSelectDate:b1,onAutoApply:$1,onTimeUpdate:G1,onFlowStep:S1[3]||(S1[3]=T1=>m1.$emit("flow-step",T1)),onUpdateMonthYear:S1[4]||(S1[4]=T1=>m1.$emit("update-month-year",T1)),onInvalidSelect:S1[5]||(S1[5]=T1=>m1.$emit("invalid-select",o.unref(L))),onAutoApplyInvalid:S1[6]||(S1[6]=T1=>m1.$emit("invalid-select",T1)),onInvalidFixedRange:S1[7]||(S1[7]=T1=>m1.$emit("invalid-fixed-range",T1)),onRecalculatePosition:o.unref(Y),onTooltipOpen:S1[8]||(S1[8]=T1=>m1.$emit("tooltip-open",T1)),onTooltipClose:S1[9]||(S1[9]=T1=>m1.$emit("tooltip-close",T1)),onTimePickerOpen:S1[10]||(S1[10]=T1=>m1.$emit("time-picker-open",T1)),onTimePickerClose:S1[11]||(S1[11]=T1=>m1.$emit("time-picker-close",T1)),onAmPmChange:S1[12]||(S1[12]=T1=>m1.$emit("am-pm-change",T1)),onRangeStart:S1[13]||(S1[13]=T1=>m1.$emit("range-start",T1)),onRangeEnd:S1[14]||(S1[14]=T1=>m1.$emit("range-end",T1)),onDateUpdate:S1[15]||(S1[15]=T1=>m1.$emit("date-update",T1)),onInvalidDate:S1[16]||(S1[16]=T1=>m1.$emit("invalid-date",T1)),onOverlayToggle:S1[17]||(S1[17]=T1=>m1.$emit("overlay-toggle",T1))}),o.createSlots({_:2},[o.renderList(o.unref(q),(T1,Q1)=>({name:T1,fn:o.withCtx(Q2=>[o.renderSlot(m1.$slots,T1,o.normalizeProps(o.guardReactiveProps({...Q2})))])}))]),1040,["internal-model-value","class","open-on-top","no-overlay-focus","collapse","onRecalculatePosition"])],16)):o.createCommentVNode("",!0)]),_:3},8,["name","css"])]),_:3},16))],2))}}),ql=(()=>{const e=b41;return e.install=t=>{t.component("Vue3DatePicker",e)},e})(),C41=Object.freeze(Object.defineProperty({__proto__:null,default:ql},Symbol.toStringTag,{value:"Module"}));Object.entries(C41).forEach(([e,t])=>{e!=="default"&&(ql[e]=t)});const M41=o.defineComponent({__name:"PgaVueDatePicker",props:o.mergeModels({yearPicker:{type:Boolean},monthPicker:{type:Boolean},range:{type:Boolean},enableTimePicker:{type:Boolean},notClearable:{type:Boolean},disabled:{type:Boolean},format:{type:Function}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){o.useCssVars(c=>({cc305282:o.unref(r).input.borderColor,"883a9e94":o.unref(r).input.borderRadius,"6c15f2fd":o.unref(r).input.backgroundColor,"58b376ce":o.unref(r).input.backgroundColorDisabled,"3e8b660d":o.unref(r).input.colorFocus}));const t=o.useModel(e,"modelValue"),a=_2("pgaForm"),{form:r}=$e(),n=o.ref(!1);return(c,i)=>(o.openBlock(),o.createBlock(o.unref(ql),{class:o.normalizeClass(["date-picker",{"date-picker__disabled":c.disabled,"date-picker__open":n.value}]),modelValue:t.value,"onUpdate:modelValue":i[0]||(i[0]=s=>t.value=s),disabled:c.disabled,clearable:!c.notClearable,yearPicker:c.yearPicker,monthPicker:c.monthPicker,range:c.range,enableTimePicker:c.enableTimePicker,timePickerInline:"",is24:"",teleport:!0,locale:o.unref(h4)().language,format:c.format,previewFormat:c.format,cancelText:o.unref(a)("cancelBtn"),selectText:o.unref(a)("selectBtn"),onOpen:i[1]||(i[1]=s=>n.value=!0),onBlur:i[2]||(i[2]=s=>n.value=!1)},null,8,["class","modelValue","disabled","clearable","yearPicker","monthPicker","range","enableTimePicker","locale","format","previewFormat","cancelText","selectText"]))}});const Nn=I1(M41,[["__scopeId","data-v-94c456f9"]]),z41=o.defineComponent({__name:"PgaDatePicker",props:o.mergeModels({label:{},withRequiredLabel:{type:Boolean},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},description:{},errors:{},disabled:{type:Boolean},grow:{},notClearable:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=o.useModel(e,"modelValue"),a=o.computed({get(){if(!t.value)return null;const[n,c,i]=t.value.split("-").map(Number);return new Date(n,c-1,i)},set(n){if(!n){t.value=null;return}t.value=n.toISOString().split("T")[0]}});function r(n){return m4(n,{format:"numeric",withTime:!1})}return(n,c)=>(o.openBlock(),o.createBlock(A3,{label:n.label,withRequiredLabel:n.withRequiredLabel,withOptionalLabel:n.withOptionalLabel,withLabelSpace:n.withLabelSpace,description:n.description,errors:n.errors,grow:n.grow},{default:o.withCtx(()=>[o.createVNode(Nn,{modelValue:a.value,"onUpdate:modelValue":c[0]||(c[0]=i=>a.value=i),disabled:n.disabled,notClearable:n.notClearable,format:r},null,8,["modelValue","disabled","notClearable"])]),_:1},8,["label","withRequiredLabel","withOptionalLabel","withLabelSpace","description","errors","grow"]))}}),w41=o.defineComponent({__name:"PgaDatetimePicker",props:o.mergeModels({label:{},withRequiredLabel:{type:Boolean},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},description:{},errors:{},disabled:{type:Boolean},grow:{},notClearable:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=o.useModel(e,"modelValue");function a(r){return m4(r,{format:"short",withTime:!0})}return(r,n)=>(o.openBlock(),o.createBlock(A3,{label:r.label,withRequiredLabel:r.withRequiredLabel,withOptionalLabel:r.withOptionalLabel,withLabelSpace:r.withLabelSpace,description:r.description,errors:r.errors,grow:r.grow},{default:o.withCtx(()=>[o.createVNode(Nn,{modelValue:t.value,"onUpdate:modelValue":n[0]||(n[0]=c=>t.value=c),enableTimePicker:"",disabled:r.disabled,notClearable:r.notClearable,format:a},null,8,["modelValue","disabled","notClearable"])]),_:1},8,["label","withRequiredLabel","withOptionalLabel","withLabelSpace","description","errors","grow"]))}}),_41={class:"icons-container"},k41=o.defineComponent({__name:"PgaIconSelector",props:o.mergeModels({label:{},withRequiredLabel:{type:Boolean},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},description:{},errors:{},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){o.useCssVars(n=>({"1d063eb6":o.unref(a).input.padding,"226faebc":o.unref(a).input.borderColor,"4455d859":o.unref(a).input.borderRadius}));const t=o.useModel(e,"modelValue"),{form:a}=$e(),r=["star","heart","envelope","plus","minus","pen","edit","check","trash","file","clipboard","bell","calendar","clock","money-check-dollar","gift","percent","magnifying-glass-dollar","house","car","store","gamepad","mobile","school","shirt","user-doctor","face-smile","face-frown-open","cog","lock","bug","camera","code","headphones","wifi","user","search","home","arrow-right-arrow-left","circle"];return(n,c)=>(o.openBlock(),o.createBlock(A3,{label:n.label,withRequiredLabel:n.withRequiredLabel,withOptionalLabel:n.withOptionalLabel,withLabelSpace:n.withLabelSpace,description:n.description,errors:n.errors,grow:n.grow},{default:o.withCtx(()=>[o.createElementVNode("div",_41,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(r,i=>o.createVNode(L2,{key:i,icon:i,variant:t.value===i?"outlined":"flat",color:t.value===i?"primary":"first",width:"2.5rem",disabled:n.disabled,onClick:s=>t.value=i},null,8,["icon","variant","color","disabled","onClick"])),64))])]),_:1},8,["label","withRequiredLabel","withOptionalLabel","withLabelSpace","description","errors","grow"]))}});const H41=I1(k41,[["__scopeId","data-v-b927e62b"]]),V41=["accept","multiple","disabled"],L41={class:"input-file--label-container"},S41=o.defineComponent({__name:"PgaInputFile",props:{formats:{},multiple:{type:Boolean},disabled:{type:Boolean},selectFileLabel:{type:[String,Number,Function]},isLoading:{type:Boolean}},emits:["newFile","newFiles"],setup(e,{expose:t,emit:a}){o.useCssVars(b=>({"6e9c5da8":o.unref(c).input.borderColor,"7dbf06ed":o.unref(c).input.borderRadius,"33eadd66":o.unref(c).input.backgroundColor,"7f906b76":o.unref(c).input.backgroundColorHover,"35fa93fc":o.unref(c).input.backgroundColorDisabled}));const r=e,n=a;t({click:y,resetInput:x});const{form:c}=$e(),i=_2("pgaForm"),s=o.ref(),l=o.ref([]),f=o.ref(!1),u=o.ref(!1),d=o.computed(()=>r.disabled||r.isLoading),h=o.computed(()=>!!l.value.length),m=o.computed(()=>{if(!r.formats)return!0;for(const b of l.value){const M=b.name.split(".").pop();if(!r.formats.includes(M))return!1}return!0}),v=o.computed(()=>r.formats?r.formats.map(b=>`.${b}`).join(","):"*"),p=o.computed(()=>{const b={icon:"upload"};return!h.value||f.value&&!u.value&&!d.value?b:m.value?{icon:"circle-check",color:"success"}:{icon:"circle-xmark",color:"danger"}}),g=o.computed(()=>h.value?l.value.map(b=>b.name).join(", "):r.selectFileLabel?r.selectFileLabel:r.multiple?i("selectFilesLabel"):i("selectFileLabel"));function y(){var b;(b=s.value)==null||b.click()}function x(){l.value=[],s.value&&(s.value.value="")}function C(b){f.value=!1;const w=b.target.files;if(w.length){if(l.value=[...w],!m.value){vt("danger",()=>i("newFileError"));return}n("newFile",w[0]),n("newFiles",[...w])}}return(b,M)=>(o.openBlock(),o.createElementBlock("label",{class:o.normalizeClass(["pga-input-file",{"pga-input-file__disabled":d.value}]),onMouseenter:M[4]||(M[4]=w=>f.value=!0),onMouseleave:M[5]||(M[5]=w=>f.value=!1)},[b.isLoading?(o.openBlock(),o.createBlock(Lt,{key:0})):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createElementVNode("input",{ref_key:"inputRef",ref:s,class:"input-file--input",type:"file",accept:v.value,multiple:b.multiple,disabled:d.value,onChange:M[0]||(M[0]=w=>C(w))},null,40,V41),o.createVNode(Oe,{class:"input-file--icon",icon:p.value.icon,color:p.value.color},null,8,["icon","color"]),o.createElementVNode("div",L41,[o.createVNode(ye,{text:g.value},null,8,["text"])]),h.value?(o.openBlock(),o.createBlock(L2,{key:0,text:o.unref(i)("removeBtn"),variant:"flat",color:"danger",size:"s",disabled:d.value,onMouseenter:M[1]||(M[1]=w=>u.value=!0),onMouseleave:M[2]||(M[2]=w=>u.value=!1),onClick:M[3]||(M[3]=o.withModifiers(w=>x(),["prevent"]))},null,8,["text","disabled"])):o.createCommentVNode("",!0)],64))],34))}});const I5=I1(S41,[["__scopeId","data-v-3b0655c7"]]);/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */var bb=1252,A41=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],jl={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},Yl=function(e){A41.indexOf(e)!=-1&&(bb=jl[0]=e)};function T41(){Yl(1252)}var c4=function(e){Yl(e)};function Cb(){c4(1200),T41()}function om(e){for(var t=[],a=0,r=e.length;a<r;++a)t[a]=e.charCodeAt(a);return t}function E41(e){for(var t=[],a=0;a<e.length>>1;++a)t[a]=String.fromCharCode(e.charCodeAt(2*a)+(e.charCodeAt(2*a+1)<<8));return t.join("")}function Mb(e){for(var t=[],a=0;a<e.length>>1;++a)t[a]=String.fromCharCode(e.charCodeAt(2*a+1)+(e.charCodeAt(2*a)<<8));return t.join("")}var Za=function(e){var t=e.charCodeAt(0),a=e.charCodeAt(1);return t==255&&a==254?E41(e.slice(2)):t==254&&a==255?Mb(e.slice(2)):t==65279?e.slice(1):e},_8=function(t){return String.fromCharCode(t)},lm=function(t){return String.fromCharCode(t)},It,Kt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function fm(e){for(var t="",a=0,r=0,n=0,c=0,i=0,s=0,l=0,f=0;f<e.length;)a=e.charCodeAt(f++),c=a>>2,r=e.charCodeAt(f++),i=(a&3)<<4|r>>4,n=e.charCodeAt(f++),s=(r&15)<<2|n>>6,l=n&63,isNaN(r)?s=l=64:isNaN(n)&&(l=64),t+=Kt.charAt(c)+Kt.charAt(i)+Kt.charAt(s)+Kt.charAt(l);return t}function H3(e){var t="",a=0,r=0,n=0,c=0,i=0,s=0,l=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var f=0;f<e.length;)c=Kt.indexOf(e.charAt(f++)),i=Kt.indexOf(e.charAt(f++)),a=c<<2|i>>4,t+=String.fromCharCode(a),s=Kt.indexOf(e.charAt(f++)),r=(i&15)<<4|s>>2,s!==64&&(t+=String.fromCharCode(r)),l=Kt.indexOf(e.charAt(f++)),n=(s&3)<<6|l,l!==64&&(t+=String.fromCharCode(n));return t}var h2=function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node}(),g6=function(){if(typeof Buffer<"u"){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch{e=!0}return e?function(t,a){return a?new Buffer(t,a):new Buffer(t)}:Buffer.from.bind(Buffer)}return function(){}}();function m0(e){return h2?Buffer.alloc?Buffer.alloc(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}function um(e){return h2?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}var t4=function(t){return h2?g6(t,"binary"):t.split("").map(function(a){return a.charCodeAt(0)&255})};function y6(e){if(Array.isArray(e))return e.map(function(r){return String.fromCharCode(r)}).join("");for(var t=[],a=0;a<e.length;++a)t[a]=String.fromCharCode(e[a]);return t.join("")}function Gl(e){if(typeof ArrayBuffer>"u")throw new Error("Unsupported");if(e instanceof ArrayBuffer)return Gl(new Uint8Array(e));for(var t=new Array(e.length),a=0;a<e.length;++a)t[a]=e[a];return t}var $t=h2?function(e){return Buffer.concat(e.map(function(t){return Buffer.isBuffer(t)?t:g6(t)}))}:function(e){if(typeof Uint8Array<"u"){var t=0,a=0;for(t=0;t<e.length;++t)a+=e[t].length;var r=new Uint8Array(a),n=0;for(t=0,a=0;t<e.length;a+=n,++t)if(n=e[t].length,e[t]instanceof Uint8Array)r.set(e[t],a);else{if(typeof e[t]=="string")throw"wtf";r.set(new Uint8Array(e[t]),a)}return r}return[].concat.apply([],e.map(function(c){return Array.isArray(c)?c:[].slice.call(c)}))};function N41(e){for(var t=[],a=0,r=e.length+250,n=m0(e.length+255),c=0;c<e.length;++c){var i=e.charCodeAt(c);if(i<128)n[a++]=i;else if(i<2048)n[a++]=192|i>>6&31,n[a++]=128|i&63;else if(i>=55296&&i<57344){i=(i&1023)+64;var s=e.charCodeAt(++c)&1023;n[a++]=240|i>>8&7,n[a++]=128|i>>2&63,n[a++]=128|s>>6&15|(i&3)<<4,n[a++]=128|s&63}else n[a++]=224|i>>12&15,n[a++]=128|i>>6&63,n[a++]=128|i&63;a>r&&(t.push(n.slice(0,a)),a=0,n=m0(65535),r=65530)}return t.push(n.slice(0,a)),$t(t)}var l3=/\u0000/g,Qa=/[\u0001-\u0006]/g;function q6(e){for(var t="",a=e.length-1;a>=0;)t+=e.charAt(a--);return t}function i4(e,t){var a=""+e;return a.length>=t?a:ce("0",t-a.length)+a}function Xl(e,t){var a=""+e;return a.length>=t?a:ce(" ",t-a.length)+a}function $c(e,t){var a=""+e;return a.length>=t?a:a+ce(" ",t-a.length)}function D41(e,t){var a=""+Math.round(e);return a.length>=t?a:ce("0",t-a.length)+a}function O41(e,t){var a=""+e;return a.length>=t?a:ce("0",t-a.length)+a}var dm=Math.pow(2,32);function L6(e,t){if(e>dm||e<-dm)return D41(e,t);var a=Math.round(e);return O41(a,t)}function Uc(e,t){return t=t||0,e.length>=7+t&&(e.charCodeAt(t)|32)===103&&(e.charCodeAt(t+1)|32)===101&&(e.charCodeAt(t+2)|32)===110&&(e.charCodeAt(t+3)|32)===101&&(e.charCodeAt(t+4)|32)===114&&(e.charCodeAt(t+5)|32)===97&&(e.charCodeAt(t+6)|32)===108}var hm=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],ds=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function P41(e){return e||(e={}),e[0]="General",e[1]="0",e[2]="0.00",e[3]="#,##0",e[4]="#,##0.00",e[9]="0%",e[10]="0.00%",e[11]="0.00E+00",e[12]="# ?/?",e[13]="# ??/??",e[14]="m/d/yy",e[15]="d-mmm-yy",e[16]="d-mmm",e[17]="mmm-yy",e[18]="h:mm AM/PM",e[19]="h:mm:ss AM/PM",e[20]="h:mm",e[21]="h:mm:ss",e[22]="m/d/yy h:mm",e[37]="#,##0 ;(#,##0)",e[38]="#,##0 ;[Red](#,##0)",e[39]="#,##0.00;(#,##0.00)",e[40]="#,##0.00;[Red](#,##0.00)",e[45]="mm:ss",e[46]="[h]:mm:ss",e[47]="mmss.0",e[48]="##0.0E+0",e[49]="@",e[56]='"上午/下午 "hh"時"mm"分"ss"秒 "',e}var e2={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/下午 "hh"時"mm"分"ss"秒 "'},mm={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},B41={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function Wc(e,t,a){for(var r=e<0?-1:1,n=e*r,c=0,i=1,s=0,l=1,f=0,u=0,d=Math.floor(n);f<t&&(d=Math.floor(n),s=d*i+c,u=d*f+l,!(n-d<5e-8));)n=1/(n-d),c=i,i=s,l=f,f=u;if(u>t&&(f>t?(u=l,s=c):(u=f,s=i)),!a)return[0,r*s,u];var h=Math.floor(r*s/u);return[h,r*s-h*u,u]}function U0(e,t,a){if(e>2958465||e<0)return null;var r=e|0,n=Math.floor(86400*(e-r)),c=0,i=[],s={D:r,T:n,u:86400*(e-r)-n,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(s.u)<1e-6&&(s.u=0),t&&t.date1904&&(r+=1462),s.u>.9999&&(s.u=0,++n==86400&&(s.T=n=0,++r,++s.D)),r===60)i=a?[1317,10,29]:[1900,2,29],c=3;else if(r===0)i=a?[1317,8,29]:[1900,1,0],c=6;else{r>60&&--r;var l=new Date(1900,0,1);l.setDate(l.getDate()+r-1),i=[l.getFullYear(),l.getMonth()+1,l.getDate()],c=l.getDay(),r<60&&(c=(c+6)%7),a&&(c=W41(l,i))}return s.y=i[0],s.m=i[1],s.d=i[2],s.S=n%60,n=Math.floor(n/60),s.M=n%60,n=Math.floor(n/60),s.H=n,s.q=c,s}var zb=new Date(1899,11,31,0,0,0),F41=zb.getTime(),R41=new Date(1900,2,1,0,0,0);function wb(e,t){var a=e.getTime();return t?a-=1461*24*60*60*1e3:e>=R41&&(a+=24*60*60*1e3),(a-(F41+(e.getTimezoneOffset()-zb.getTimezoneOffset())*6e4))/(24*60*60*1e3)}function Kl(e){return e.indexOf(".")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function I41(e){return e.indexOf("E")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}function $41(e){var t=e<0?12:11,a=Kl(e.toFixed(12));return a.length<=t||(a=e.toPrecision(10),a.length<=t)?a:e.toExponential(5)}function U41(e){var t=Kl(e.toFixed(11));return t.length>(e<0?12:11)||t==="0"||t==="-0"?e.toPrecision(6):t}function rn(e){var t=Math.floor(Math.log(Math.abs(e))*Math.LOG10E),a;return t>=-4&&t<=-1?a=e.toPrecision(10+t):Math.abs(t)<=9?a=$41(e):t===10?a=e.toFixed(10).substr(0,12):a=U41(e),Kl(I41(a.toUpperCase()))}function i6(e,t){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(e|0)===e?e.toString(10):rn(e);case"undefined":return"";case"object":if(e==null)return"";if(e instanceof Date)return I3(14,wb(e,t&&t.date1904),t)}throw new Error("unsupported value in General format: "+e)}function W41(e,t){t[0]-=581;var a=e.getDay();return e<60&&(a=(a+6)%7),a}function q41(e,t,a,r){var n="",c=0,i=0,s=a.y,l,f=0;switch(e){case 98:s=a.y+543;case 121:switch(t.length){case 1:case 2:l=s%100,f=2;break;default:l=s%1e4,f=4;break}break;case 109:switch(t.length){case 1:case 2:l=a.m,f=t.length;break;case 3:return ds[a.m-1][1];case 5:return ds[a.m-1][0];default:return ds[a.m-1][2]}break;case 100:switch(t.length){case 1:case 2:l=a.d,f=t.length;break;case 3:return hm[a.q][0];default:return hm[a.q][1]}break;case 104:switch(t.length){case 1:case 2:l=1+(a.H+11)%12,f=t.length;break;default:throw"bad hour format: "+t}break;case 72:switch(t.length){case 1:case 2:l=a.H,f=t.length;break;default:throw"bad hour format: "+t}break;case 77:switch(t.length){case 1:case 2:l=a.M,f=t.length;break;default:throw"bad minute format: "+t}break;case 115:if(t!="s"&&t!="ss"&&t!=".0"&&t!=".00"&&t!=".000")throw"bad second format: "+t;return a.u===0&&(t=="s"||t=="ss")?i4(a.S,t.length):(r>=2?i=r===3?1e3:100:i=r===1?10:1,c=Math.round(i*(a.S+a.u)),c>=60*i&&(c=0),t==="s"?c===0?"0":""+c/i:(n=i4(c,2+r),t==="ss"?n.substr(0,2):"."+n.substr(2,t.length-1)));case 90:switch(t){case"[h]":case"[hh]":l=a.D*24+a.H;break;case"[m]":case"[mm]":l=(a.D*24+a.H)*60+a.M;break;case"[s]":case"[ss]":l=((a.D*24+a.H)*60+a.M)*60+Math.round(a.S+a.u);break;default:throw"bad abstime format: "+t}f=t.length===3?1:2;break;case 101:l=s,f=1;break}var u=f>0?i4(l,f):"";return u}function Zt(e){var t=3;if(e.length<=t)return e;for(var a=e.length%t,r=e.substr(0,a);a!=e.length;a+=t)r+=(r.length>0?",":"")+e.substr(a,t);return r}var _b=/%/g;function j41(e,t,a){var r=t.replace(_b,""),n=t.length-r.length;return yt(e,r,a*Math.pow(10,2*n))+ce("%",n)}function Y41(e,t,a){for(var r=t.length-1;t.charCodeAt(r-1)===44;)--r;return yt(e,t.substr(0,r),a/Math.pow(10,3*(t.length-r)))}function kb(e,t){var a,r=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+kb(e,-t);var n=e.indexOf(".");n===-1&&(n=e.indexOf("E"));var c=Math.floor(Math.log(t)*Math.LOG10E)%n;if(c<0&&(c+=n),a=(t/Math.pow(10,c)).toPrecision(r+1+(n+c)%n),a.indexOf("e")===-1){var i=Math.floor(Math.log(t)*Math.LOG10E);for(a.indexOf(".")===-1?a=a.charAt(0)+"."+a.substr(1)+"E+"+(i-a.length+c):a+="E+"+(i-c);a.substr(0,2)==="0.";)a=a.charAt(0)+a.substr(2,n)+"."+a.substr(2+n),a=a.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");a=a.replace(/\+-/,"-")}a=a.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(s,l,f,u){return l+f+u.substr(0,(n+c)%n)+"."+u.substr(c)+"E"})}else a=t.toExponential(r);return e.match(/E\+00$/)&&a.match(/e[+-]\d$/)&&(a=a.substr(0,a.length-1)+"0"+a.charAt(a.length-1)),e.match(/E\-/)&&a.match(/e\+/)&&(a=a.replace(/e\+/,"e")),a.replace("e","E")}var Hb=/# (\?+)( ?)\/( ?)(\d+)/;function G41(e,t,a){var r=parseInt(e[4],10),n=Math.round(t*r),c=Math.floor(n/r),i=n-c*r,s=r;return a+(c===0?"":""+c)+" "+(i===0?ce(" ",e[1].length+1+e[4].length):Xl(i,e[1].length)+e[2]+"/"+e[3]+i4(s,e[4].length))}function X41(e,t,a){return a+(t===0?"":""+t)+ce(" ",e[1].length+2+e[4].length)}var Vb=/^#*0*\.([0#]+)/,Lb=/\).*[0#]/,Sb=/\(###\) ###\\?-####/;function i3(e){for(var t="",a,r=0;r!=e.length;++r)switch(a=e.charCodeAt(r)){case 35:break;case 63:t+=" ";break;case 48:t+="0";break;default:t+=String.fromCharCode(a)}return t}function pm(e,t){var a=Math.pow(10,t);return""+Math.round(e*a)/a}function vm(e,t){var a=e-Math.floor(e),r=Math.pow(10,t);return t<(""+Math.round(a*r)).length?0:Math.round(a*r)}function K41(e,t){return t<(""+Math.round((e-Math.floor(e))*Math.pow(10,t))).length?1:0}function Z41(e){return e<2147483647&&e>-2147483648?""+(e>=0?e|0:e-1|0):""+Math.floor(e)}function O3(e,t,a){if(e.charCodeAt(0)===40&&!t.match(Lb)){var r=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return a>=0?O3("n",r,a):"("+O3("n",r,-a)+")"}if(t.charCodeAt(t.length-1)===44)return Y41(e,t,a);if(t.indexOf("%")!==-1)return j41(e,t,a);if(t.indexOf("E")!==-1)return kb(t,a);if(t.charCodeAt(0)===36)return"$"+O3(e,t.substr(t.charAt(1)==" "?2:1),a);var n,c,i,s,l=Math.abs(a),f=a<0?"-":"";if(t.match(/^00+$/))return f+L6(l,t.length);if(t.match(/^[#?]+$/))return n=L6(a,0),n==="0"&&(n=""),n.length>t.length?n:i3(t.substr(0,t.length-n.length))+n;if(c=t.match(Hb))return G41(c,l,f);if(t.match(/^#+0+$/))return f+L6(l,t.length-t.indexOf("0"));if(c=t.match(Vb))return n=pm(a,c[1].length).replace(/^([^\.]+)$/,"$1."+i3(c[1])).replace(/\.$/,"."+i3(c[1])).replace(/\.(\d*)$/,function(v,p){return"."+p+ce("0",i3(c[1]).length-p.length)}),t.indexOf("0.")!==-1?n:n.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),c=t.match(/^(0*)\.(#*)$/))return f+pm(l,c[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,c[1].length?"0.":".");if(c=t.match(/^#{1,3},##0(\.?)$/))return f+Zt(L6(l,0));if(c=t.match(/^#,##0\.([#0]*0)$/))return a<0?"-"+O3(e,t,-a):Zt(""+(Math.floor(a)+K41(a,c[1].length)))+"."+i4(vm(a,c[1].length),c[1].length);if(c=t.match(/^#,#*,#0/))return O3(e,t.replace(/^#,#*,/,""),a);if(c=t.match(/^([0#]+)(\\?-([0#]+))+$/))return n=q6(O3(e,t.replace(/[\\-]/g,""),a)),i=0,q6(q6(t.replace(/\\/g,"")).replace(/[0#]/g,function(v){return i<n.length?n.charAt(i++):v==="0"?"0":""}));if(t.match(Sb))return n=O3(e,"##########",a),"("+n.substr(0,3)+") "+n.substr(3,3)+"-"+n.substr(6);var u="";if(c=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(c[4].length,7),s=Wc(l,Math.pow(10,i)-1,!1),n=""+f,u=yt("n",c[1],s[1]),u.charAt(u.length-1)==" "&&(u=u.substr(0,u.length-1)+"0"),n+=u+c[2]+"/"+c[3],u=$c(s[2],i),u.length<c[4].length&&(u=i3(c[4].substr(c[4].length-u.length))+u),n+=u,n;if(c=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(Math.max(c[1].length,c[4].length),7),s=Wc(l,Math.pow(10,i)-1,!0),f+(s[0]||(s[1]?"":"0"))+" "+(s[1]?Xl(s[1],i)+c[2]+"/"+c[3]+$c(s[2],i):ce(" ",2*i+1+c[2].length+c[3].length));if(c=t.match(/^[#0?]+$/))return n=L6(a,0),t.length<=n.length?n:i3(t.substr(0,t.length-n.length))+n;if(c=t.match(/^([#0?]+)\.([#0]+)$/)){n=""+a.toFixed(Math.min(c[2].length,10)).replace(/([^0])0+$/,"$1"),i=n.indexOf(".");var d=t.indexOf(".")-i,h=t.length-n.length-d;return i3(t.substr(0,d)+n+t.substr(t.length-h))}if(c=t.match(/^00,000\.([#0]*0)$/))return i=vm(a,c[1].length),a<0?"-"+O3(e,t,-a):Zt(Z41(a)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(v){return"00,"+(v.length<3?i4(0,3-v.length):"")+v})+"."+i4(i,c[1].length);switch(t){case"###,##0.00":return O3(e,"#,##0.00",a);case"###,###":case"##,###":case"#,###":var m=Zt(L6(l,0));return m!=="0"?f+m:"";case"###,###.00":return O3(e,"###,##0.00",a).replace(/^0\./,".");case"#,###.00":return O3(e,"#,##0.00",a).replace(/^0\./,".")}throw new Error("unsupported format |"+t+"|")}function Q41(e,t,a){for(var r=t.length-1;t.charCodeAt(r-1)===44;)--r;return yt(e,t.substr(0,r),a/Math.pow(10,3*(t.length-r)))}function J41(e,t,a){var r=t.replace(_b,""),n=t.length-r.length;return yt(e,r,a*Math.pow(10,2*n))+ce("%",n)}function Ab(e,t){var a,r=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+Ab(e,-t);var n=e.indexOf(".");n===-1&&(n=e.indexOf("E"));var c=Math.floor(Math.log(t)*Math.LOG10E)%n;if(c<0&&(c+=n),a=(t/Math.pow(10,c)).toPrecision(r+1+(n+c)%n),!a.match(/[Ee]/)){var i=Math.floor(Math.log(t)*Math.LOG10E);a.indexOf(".")===-1?a=a.charAt(0)+"."+a.substr(1)+"E+"+(i-a.length+c):a+="E+"+(i-c),a=a.replace(/\+-/,"-")}a=a.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(s,l,f,u){return l+f+u.substr(0,(n+c)%n)+"."+u.substr(c)+"E"})}else a=t.toExponential(r);return e.match(/E\+00$/)&&a.match(/e[+-]\d$/)&&(a=a.substr(0,a.length-1)+"0"+a.charAt(a.length-1)),e.match(/E\-/)&&a.match(/e\+/)&&(a=a.replace(/e\+/,"e")),a.replace("e","E")}function _4(e,t,a){if(e.charCodeAt(0)===40&&!t.match(Lb)){var r=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return a>=0?_4("n",r,a):"("+_4("n",r,-a)+")"}if(t.charCodeAt(t.length-1)===44)return Q41(e,t,a);if(t.indexOf("%")!==-1)return J41(e,t,a);if(t.indexOf("E")!==-1)return Ab(t,a);if(t.charCodeAt(0)===36)return"$"+_4(e,t.substr(t.charAt(1)==" "?2:1),a);var n,c,i,s,l=Math.abs(a),f=a<0?"-":"";if(t.match(/^00+$/))return f+i4(l,t.length);if(t.match(/^[#?]+$/))return n=""+a,a===0&&(n=""),n.length>t.length?n:i3(t.substr(0,t.length-n.length))+n;if(c=t.match(Hb))return X41(c,l,f);if(t.match(/^#+0+$/))return f+i4(l,t.length-t.indexOf("0"));if(c=t.match(Vb))return n=(""+a).replace(/^([^\.]+)$/,"$1."+i3(c[1])).replace(/\.$/,"."+i3(c[1])),n=n.replace(/\.(\d*)$/,function(v,p){return"."+p+ce("0",i3(c[1]).length-p.length)}),t.indexOf("0.")!==-1?n:n.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),c=t.match(/^(0*)\.(#*)$/))return f+(""+l).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,c[1].length?"0.":".");if(c=t.match(/^#{1,3},##0(\.?)$/))return f+Zt(""+l);if(c=t.match(/^#,##0\.([#0]*0)$/))return a<0?"-"+_4(e,t,-a):Zt(""+a)+"."+ce("0",c[1].length);if(c=t.match(/^#,#*,#0/))return _4(e,t.replace(/^#,#*,/,""),a);if(c=t.match(/^([0#]+)(\\?-([0#]+))+$/))return n=q6(_4(e,t.replace(/[\\-]/g,""),a)),i=0,q6(q6(t.replace(/\\/g,"")).replace(/[0#]/g,function(v){return i<n.length?n.charAt(i++):v==="0"?"0":""}));if(t.match(Sb))return n=_4(e,"##########",a),"("+n.substr(0,3)+") "+n.substr(3,3)+"-"+n.substr(6);var u="";if(c=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(c[4].length,7),s=Wc(l,Math.pow(10,i)-1,!1),n=""+f,u=yt("n",c[1],s[1]),u.charAt(u.length-1)==" "&&(u=u.substr(0,u.length-1)+"0"),n+=u+c[2]+"/"+c[3],u=$c(s[2],i),u.length<c[4].length&&(u=i3(c[4].substr(c[4].length-u.length))+u),n+=u,n;if(c=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(Math.max(c[1].length,c[4].length),7),s=Wc(l,Math.pow(10,i)-1,!0),f+(s[0]||(s[1]?"":"0"))+" "+(s[1]?Xl(s[1],i)+c[2]+"/"+c[3]+$c(s[2],i):ce(" ",2*i+1+c[2].length+c[3].length));if(c=t.match(/^[#0?]+$/))return n=""+a,t.length<=n.length?n:i3(t.substr(0,t.length-n.length))+n;if(c=t.match(/^([#0]+)\.([#0]+)$/)){n=""+a.toFixed(Math.min(c[2].length,10)).replace(/([^0])0+$/,"$1"),i=n.indexOf(".");var d=t.indexOf(".")-i,h=t.length-n.length-d;return i3(t.substr(0,d)+n+t.substr(t.length-h))}if(c=t.match(/^00,000\.([#0]*0)$/))return a<0?"-"+_4(e,t,-a):Zt(""+a).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(v){return"00,"+(v.length<3?i4(0,3-v.length):"")+v})+"."+i4(0,c[1].length);switch(t){case"###,###":case"##,###":case"#,###":var m=Zt(""+l);return m!=="0"?f+m:"";default:if(t.match(/\.[0#?]*$/))return _4(e,t.slice(0,t.lastIndexOf(".")),a)+i3(t.slice(t.lastIndexOf(".")))}throw new Error("unsupported format |"+t+"|")}function yt(e,t,a){return(a|0)===a?_4(e,t,a):O3(e,t,a)}function et1(e){for(var t=[],a=!1,r=0,n=0;r<e.length;++r)switch(e.charCodeAt(r)){case 34:a=!a;break;case 95:case 42:case 92:++r;break;case 59:t[t.length]=e.substr(n,r-n),n=r+1}if(t[t.length]=e.substr(n),a===!0)throw new Error("Format |"+e+"| unterminated string ");return t}var Tb=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function va(e){for(var t=0,a="",r="";t<e.length;)switch(a=e.charAt(t)){case"G":Uc(e,t)&&(t+=6),t++;break;case'"':for(;e.charCodeAt(++t)!==34&&t<e.length;);++t;break;case"\\":t+=2;break;case"_":t+=2;break;case"@":++t;break;case"B":case"b":if(e.charAt(t+1)==="1"||e.charAt(t+1)==="2")return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"上":if(e.substr(t,3).toUpperCase()==="A/P"||e.substr(t,5).toUpperCase()==="AM/PM"||e.substr(t,5).toUpperCase()==="上午/下午")return!0;++t;break;case"[":for(r=a;e.charAt(t++)!=="]"&&t<e.length;)r+=e.charAt(t);if(r.match(Tb))return!0;break;case".":case"0":case"#":for(;t<e.length&&("0#?.,E+-%".indexOf(a=e.charAt(++t))>-1||a=="\\"&&e.charAt(t+1)=="-"&&"0#".indexOf(e.charAt(t+2))>-1););break;case"?":for(;e.charAt(++t)===a;);break;case"*":++t,(e.charAt(t)==" "||e.charAt(t)=="*")&&++t;break;case"(":case")":++t;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;t<e.length&&"0123456789".indexOf(e.charAt(++t))>-1;);break;case" ":++t;break;default:++t;break}return!1}function tt1(e,t,a,r){for(var n=[],c="",i=0,s="",l="t",f,u,d,h="H";i<e.length;)switch(s=e.charAt(i)){case"G":if(!Uc(e,i))throw new Error("unrecognized character "+s+" in "+e);n[n.length]={t:"G",v:"General"},i+=7;break;case'"':for(c="";(d=e.charCodeAt(++i))!==34&&i<e.length;)c+=String.fromCharCode(d);n[n.length]={t:"t",v:c},++i;break;case"\\":var m=e.charAt(++i),v=m==="("||m===")"?m:"t";n[n.length]={t:v,v:m},++i;break;case"_":n[n.length]={t:"t",v:" "},i+=2;break;case"@":n[n.length]={t:"T",v:t},++i;break;case"B":case"b":if(e.charAt(i+1)==="1"||e.charAt(i+1)==="2"){if(f==null&&(f=U0(t,a,e.charAt(i+1)==="2"),f==null))return"";n[n.length]={t:"X",v:e.substr(i,2)},l=s,i+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":s=s.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(t<0||f==null&&(f=U0(t,a),f==null))return"";for(c=s;++i<e.length&&e.charAt(i).toLowerCase()===s;)c+=s;s==="m"&&l.toLowerCase()==="h"&&(s="M"),s==="h"&&(s=h),n[n.length]={t:s,v:c},l=s;break;case"A":case"a":case"上":var p={t:s,v:s};if(f==null&&(f=U0(t,a)),e.substr(i,3).toUpperCase()==="A/P"?(f!=null&&(p.v=f.H>=12?"P":"A"),p.t="T",h="h",i+=3):e.substr(i,5).toUpperCase()==="AM/PM"?(f!=null&&(p.v=f.H>=12?"PM":"AM"),p.t="T",i+=5,h="h"):e.substr(i,5).toUpperCase()==="上午/下午"?(f!=null&&(p.v=f.H>=12?"下午":"上午"),p.t="T",i+=5,h="h"):(p.t="t",++i),f==null&&p.t==="T")return"";n[n.length]=p,l=s;break;case"[":for(c=s;e.charAt(i++)!=="]"&&i<e.length;)c+=e.charAt(i);if(c.slice(-1)!=="]")throw'unterminated "[" block: |'+c+"|";if(c.match(Tb)){if(f==null&&(f=U0(t,a),f==null))return"";n[n.length]={t:"Z",v:c.toLowerCase()},l=c.charAt(1)}else c.indexOf("$")>-1&&(c=(c.match(/\$([^-\[\]]*)/)||[])[1]||"$",va(e)||(n[n.length]={t:"t",v:c}));break;case".":if(f!=null){for(c=s;++i<e.length&&(s=e.charAt(i))==="0";)c+=s;n[n.length]={t:"s",v:c};break}case"0":case"#":for(c=s;++i<e.length&&"0#?.,E+-%".indexOf(s=e.charAt(i))>-1;)c+=s;n[n.length]={t:"n",v:c};break;case"?":for(c=s;e.charAt(++i)===s;)c+=s;n[n.length]={t:s,v:c},l=s;break;case"*":++i,(e.charAt(i)==" "||e.charAt(i)=="*")&&++i;break;case"(":case")":n[n.length]={t:r===1?"t":s,v:s},++i;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(c=s;i<e.length&&"0123456789".indexOf(e.charAt(++i))>-1;)c+=e.charAt(i);n[n.length]={t:"D",v:c};break;case" ":n[n.length]={t:s,v:s},++i;break;case"$":n[n.length]={t:"t",v:"$"},++i;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(s)===-1)throw new Error("unrecognized character "+s+" in "+e);n[n.length]={t:"t",v:s},++i;break}var g=0,y=0,x;for(i=n.length-1,l="t";i>=0;--i)switch(n[i].t){case"h":case"H":n[i].t=h,l="h",g<1&&(g=1);break;case"s":(x=n[i].v.match(/\.0+$/))&&(y=Math.max(y,x[0].length-1)),g<3&&(g=3);case"d":case"y":case"M":case"e":l=n[i].t;break;case"m":l==="s"&&(n[i].t="M",g<2&&(g=2));break;case"X":break;case"Z":g<1&&n[i].v.match(/[Hh]/)&&(g=1),g<2&&n[i].v.match(/[Mm]/)&&(g=2),g<3&&n[i].v.match(/[Ss]/)&&(g=3)}switch(g){case 0:break;case 1:f.u>=.5&&(f.u=0,++f.S),f.S>=60&&(f.S=0,++f.M),f.M>=60&&(f.M=0,++f.H);break;case 2:f.u>=.5&&(f.u=0,++f.S),f.S>=60&&(f.S=0,++f.M);break}var C="",b;for(i=0;i<n.length;++i)switch(n[i].t){case"t":case"T":case" ":case"D":break;case"X":n[i].v="",n[i].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":n[i].v=q41(n[i].t.charCodeAt(0),n[i].v,f,y),n[i].t="t";break;case"n":case"?":for(b=i+1;n[b]!=null&&((s=n[b].t)==="?"||s==="D"||(s===" "||s==="t")&&n[b+1]!=null&&(n[b+1].t==="?"||n[b+1].t==="t"&&n[b+1].v==="/")||n[i].t==="("&&(s===" "||s==="n"||s===")")||s==="t"&&(n[b].v==="/"||n[b].v===" "&&n[b+1]!=null&&n[b+1].t=="?"));)n[i].v+=n[b].v,n[b]={v:"",t:";"},++b;C+=n[i].v,i=b-1;break;case"G":n[i].t="t",n[i].v=i6(t,a);break}var M="",w,z;if(C.length>0){C.charCodeAt(0)==40?(w=t<0&&C.charCodeAt(0)===45?-t:t,z=yt("n",C,w)):(w=t<0&&r>1?-t:t,z=yt("n",C,w),w<0&&n[0]&&n[0].t=="t"&&(z=z.substr(1),n[0].v="-"+n[0].v)),b=z.length-1;var H=n.length;for(i=0;i<n.length;++i)if(n[i]!=null&&n[i].t!="t"&&n[i].v.indexOf(".")>-1){H=i;break}var A=n.length;if(H===n.length&&z.indexOf("E")===-1){for(i=n.length-1;i>=0;--i)n[i]==null||"n?".indexOf(n[i].t)===-1||(b>=n[i].v.length-1?(b-=n[i].v.length,n[i].v=z.substr(b+1,n[i].v.length)):b<0?n[i].v="":(n[i].v=z.substr(0,b+1),b=-1),n[i].t="t",A=i);b>=0&&A<n.length&&(n[A].v=z.substr(0,b+1)+n[A].v)}else if(H!==n.length&&z.indexOf("E")===-1){for(b=z.indexOf(".")-1,i=H;i>=0;--i)if(!(n[i]==null||"n?".indexOf(n[i].t)===-1)){for(u=n[i].v.indexOf(".")>-1&&i===H?n[i].v.indexOf(".")-1:n[i].v.length-1,M=n[i].v.substr(u+1);u>=0;--u)b>=0&&(n[i].v.charAt(u)==="0"||n[i].v.charAt(u)==="#")&&(M=z.charAt(b--)+M);n[i].v=M,n[i].t="t",A=i}for(b>=0&&A<n.length&&(n[A].v=z.substr(0,b+1)+n[A].v),b=z.indexOf(".")+1,i=H;i<n.length;++i)if(!(n[i]==null||"n?(".indexOf(n[i].t)===-1&&i!==H)){for(u=n[i].v.indexOf(".")>-1&&i===H?n[i].v.indexOf(".")+1:0,M=n[i].v.substr(0,u);u<n[i].v.length;++u)b<z.length&&(M+=z.charAt(b++));n[i].v=M,n[i].t="t",A=i}}}for(i=0;i<n.length;++i)n[i]!=null&&"n?".indexOf(n[i].t)>-1&&(w=r>1&&t<0&&i>0&&n[i-1].v==="-"?-t:t,n[i].v=yt(n[i].t,n[i].v,w),n[i].t="t");var V="";for(i=0;i!==n.length;++i)n[i]!=null&&(V+=n[i].v);return V}var gm=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function ym(e,t){if(t==null)return!1;var a=parseFloat(t[2]);switch(t[1]){case"=":if(e==a)return!0;break;case">":if(e>a)return!0;break;case"<":if(e<a)return!0;break;case"<>":if(e!=a)return!0;break;case">=":if(e>=a)return!0;break;case"<=":if(e<=a)return!0;break}return!1}function at1(e,t){var a=et1(e),r=a.length,n=a[r-1].indexOf("@");if(r<4&&n>-1&&--r,a.length>4)throw new Error("cannot find right format for |"+a.join("|")+"|");if(typeof t!="number")return[4,a.length===4||n>-1?a[a.length-1]:"@"];switch(a.length){case 1:a=n>-1?["General","General","General",a[0]]:[a[0],a[0],a[0],"@"];break;case 2:a=n>-1?[a[0],a[0],a[0],a[1]]:[a[0],a[1],a[0],"@"];break;case 3:a=n>-1?[a[0],a[1],a[0],a[2]]:[a[0],a[1],a[2],"@"];break}var c=t>0?a[0]:t<0?a[1]:a[2];if(a[0].indexOf("[")===-1&&a[1].indexOf("[")===-1)return[r,c];if(a[0].match(/\[[=<>]/)!=null||a[1].match(/\[[=<>]/)!=null){var i=a[0].match(gm),s=a[1].match(gm);return ym(t,i)?[r,a[0]]:ym(t,s)?[r,a[1]]:[r,a[i!=null&&s!=null?2:1]]}return[r,c]}function I3(e,t,a){a==null&&(a={});var r="";switch(typeof e){case"string":e=="m/d/yy"&&a.dateNF?r=a.dateNF:r=e;break;case"number":e==14&&a.dateNF?r=a.dateNF:r=(a.table!=null?a.table:e2)[e],r==null&&(r=a.table&&a.table[mm[e]]||e2[mm[e]]),r==null&&(r=B41[e]||"General");break}if(Uc(r,0))return i6(t,a);t instanceof Date&&(t=wb(t,a.date1904));var n=at1(r,t);if(Uc(n[1]))return i6(t,a);if(t===!0)t="TRUE";else if(t===!1)t="FALSE";else if(t===""||t==null)return"";return tt1(n[1],t,a,n[0])}function K0(e,t){if(typeof t!="number"){t=+t||-1;for(var a=0;a<392;++a){if(e2[a]==null){t<0&&(t=a);continue}if(e2[a]==e){t=a;break}}t<0&&(t=391)}return e2[t]=e,t}function Eb(){e2=P41()}var rt1={5:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',23:"General",24:"General",25:"General",26:"General",27:"m/d/yy",28:"m/d/yy",29:"m/d/yy",30:"m/d/yy",31:"m/d/yy",32:"h:mm:ss",33:"h:mm:ss",34:"h:mm:ss",35:"h:mm:ss",36:"m/d/yy",41:'_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',50:"m/d/yy",51:"m/d/yy",52:"m/d/yy",53:"m/d/yy",54:"m/d/yy",55:"m/d/yy",56:"m/d/yy",57:"m/d/yy",58:"m/d/yy",59:"0",60:"0.00",61:"#,##0",62:"#,##0.00",63:'"$"#,##0_);\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',67:"0%",68:"0.00%",69:"# ?/?",70:"# ??/??",71:"m/d/yy",72:"m/d/yy",73:"d-mmm-yy",74:"d-mmm",75:"mmm-yy",76:"h:mm",77:"h:mm:ss",78:"m/d/yy h:mm",79:"mm:ss",80:"[h]:mm:ss",81:"mmss.0"},Nb=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;function nt1(e){var t=typeof e=="number"?e2[e]:e;return t=t.replace(Nb,"(\\d+)"),new RegExp("^"+t+"$")}function ct1(e,t,a){var r=-1,n=-1,c=-1,i=-1,s=-1,l=-1;(t.match(Nb)||[]).forEach(function(d,h){var m=parseInt(a[h+1],10);switch(d.toLowerCase().charAt(0)){case"y":r=m;break;case"d":c=m;break;case"h":i=m;break;case"s":l=m;break;case"m":i>=0?s=m:n=m;break}}),l>=0&&s==-1&&n>=0&&(s=n,n=-1);var f=(""+(r>=0?r:new Date().getFullYear())).slice(-4)+"-"+("00"+(n>=1?n:1)).slice(-2)+"-"+("00"+(c>=1?c:1)).slice(-2);f.length==7&&(f="0"+f),f.length==8&&(f="20"+f);var u=("00"+(i>=0?i:0)).slice(-2)+":"+("00"+(s>=0?s:0)).slice(-2)+":"+("00"+(l>=0?l:0)).slice(-2);return i==-1&&s==-1&&l==-1?f:r==-1&&n==-1&&c==-1?u:f+"T"+u}var it1=function(){var e={};e.version="1.2.0";function t(){for(var z=0,H=new Array(256),A=0;A!=256;++A)z=A,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,H[A]=z;return typeof Int32Array<"u"?new Int32Array(H):H}var a=t();function r(z){var H=0,A=0,V=0,k=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(V=0;V!=256;++V)k[V]=z[V];for(V=0;V!=256;++V)for(A=z[V],H=256+V;H<4096;H+=256)A=k[H]=A>>>8^z[A&255];var _=[];for(V=1;V!=16;++V)_[V-1]=typeof Int32Array<"u"?k.subarray(V*256,V*256+256):k.slice(V*256,V*256+256);return _}var n=r(a),c=n[0],i=n[1],s=n[2],l=n[3],f=n[4],u=n[5],d=n[6],h=n[7],m=n[8],v=n[9],p=n[10],g=n[11],y=n[12],x=n[13],C=n[14];function b(z,H){for(var A=H^-1,V=0,k=z.length;V<k;)A=A>>>8^a[(A^z.charCodeAt(V++))&255];return~A}function M(z,H){for(var A=H^-1,V=z.length-15,k=0;k<V;)A=C[z[k++]^A&255]^x[z[k++]^A>>8&255]^y[z[k++]^A>>16&255]^g[z[k++]^A>>>24]^p[z[k++]]^v[z[k++]]^m[z[k++]]^h[z[k++]]^d[z[k++]]^u[z[k++]]^f[z[k++]]^l[z[k++]]^s[z[k++]]^i[z[k++]]^c[z[k++]]^a[z[k++]];for(V+=15;k<V;)A=A>>>8^a[(A^z[k++])&255];return~A}function w(z,H){for(var A=H^-1,V=0,k=z.length,_=0,N=0;V<k;)_=z.charCodeAt(V++),_<128?A=A>>>8^a[(A^_)&255]:_<2048?(A=A>>>8^a[(A^(192|_>>6&31))&255],A=A>>>8^a[(A^(128|_&63))&255]):_>=55296&&_<57344?(_=(_&1023)+64,N=z.charCodeAt(V++)&1023,A=A>>>8^a[(A^(240|_>>8&7))&255],A=A>>>8^a[(A^(128|_>>2&63))&255],A=A>>>8^a[(A^(128|N>>6&15|(_&3)<<4))&255],A=A>>>8^a[(A^(128|N&63))&255]):(A=A>>>8^a[(A^(224|_>>12&15))&255],A=A>>>8^a[(A^(128|_>>6&63))&255],A=A>>>8^a[(A^(128|_&63))&255]);return~A}return e.table=a,e.bstr=b,e.buf=M,e.str=w,e}(),v2=function(){var t={};t.version="1.2.1";function a(X,r1){for(var Q=X.split("/"),e1=r1.split("/"),c1=0,i1=0,C1=Math.min(Q.length,e1.length);c1<C1;++c1){if(i1=Q[c1].length-e1[c1].length)return i1;if(Q[c1]!=e1[c1])return Q[c1]<e1[c1]?-1:1}return Q.length-e1.length}function r(X){if(X.charAt(X.length-1)=="/")return X.slice(0,-1).indexOf("/")===-1?X:r(X.slice(0,-1));var r1=X.lastIndexOf("/");return r1===-1?X:X.slice(0,r1+1)}function n(X){if(X.charAt(X.length-1)=="/")return n(X.slice(0,-1));var r1=X.lastIndexOf("/");return r1===-1?X:X.slice(r1+1)}function c(X,r1){typeof r1=="string"&&(r1=new Date(r1));var Q=r1.getHours();Q=Q<<6|r1.getMinutes(),Q=Q<<5|r1.getSeconds()>>>1,X.write_shift(2,Q);var e1=r1.getFullYear()-1980;e1=e1<<4|r1.getMonth()+1,e1=e1<<5|r1.getDate(),X.write_shift(2,e1)}function i(X){var r1=X.read_shift(2)&65535,Q=X.read_shift(2)&65535,e1=new Date,c1=Q&31;Q>>>=5;var i1=Q&15;Q>>>=4,e1.setMilliseconds(0),e1.setFullYear(Q+1980),e1.setMonth(i1-1),e1.setDate(c1);var C1=r1&31;r1>>>=5;var M1=r1&63;return r1>>>=6,e1.setHours(r1),e1.setMinutes(M1),e1.setSeconds(C1<<1),e1}function s(X){Be(X,0);for(var r1={},Q=0;X.l<=X.length-4;){var e1=X.read_shift(2),c1=X.read_shift(2),i1=X.l+c1,C1={};switch(e1){case 21589:Q=X.read_shift(1),Q&1&&(C1.mtime=X.read_shift(4)),c1>5&&(Q&2&&(C1.atime=X.read_shift(4)),Q&4&&(C1.ctime=X.read_shift(4))),C1.mtime&&(C1.mt=new Date(C1.mtime*1e3));break}X.l=i1,r1[e1]=C1}return r1}var l;function f(){return l||(l={})}function u(X,r1){if(X[0]==80&&X[1]==75)return Q1(X,r1);if((X[0]|32)==109&&(X[1]|32)==105)return K4(X,r1);if(X.length<512)throw new Error("CFB file size "+X.length+" < 512");var Q=3,e1=512,c1=0,i1=0,C1=0,M1=0,D=0,I=[],P=X.slice(0,512);Be(P,0);var K=d(P);switch(Q=K[0],Q){case 3:e1=512;break;case 4:e1=4096;break;case 0:if(K[1]==0)return Q1(X,r1);default:throw new Error("Major Version: Expected 3 or 4 saw "+Q)}e1!==512&&(P=X.slice(0,e1),Be(P,28));var Z=X.slice(0,e1);h(P,Q);var o1=P.read_shift(4,"i");if(Q===3&&o1!==0)throw new Error("# Directory Sectors: Expected 0 saw "+o1);P.l+=4,C1=P.read_shift(4,"i"),P.l+=4,P.chk("00100000","Mini Stream Cutoff Size: "),M1=P.read_shift(4,"i"),c1=P.read_shift(4,"i"),D=P.read_shift(4,"i"),i1=P.read_shift(4,"i");for(var s1=-1,x1=0;x1<109&&(s1=P.read_shift(4,"i"),!(s1<0));++x1)I[x1]=s1;var V1=m(X,e1);g(D,i1,V1,e1,I);var L1=x(V1,C1,I,e1);L1[C1].name="!Directory",c1>0&&M1!==N&&(L1[M1].name="!MiniFAT"),L1[I[0]].name="!FAT",L1.fat_addrs=I,L1.ssz=e1;var w1={},N1=[],R1=[],J1=[];C(C1,L1,V1,N1,c1,w1,R1,M1),v(R1,J1,N1),N1.shift();var U1={FileIndex:R1,FullPaths:J1};return r1&&r1.raw&&(U1.raw={header:Z,sectors:V1}),U1}function d(X){if(X[X.l]==80&&X[X.l+1]==75)return[0,0];X.chk(q,"Header Signature: "),X.l+=16;var r1=X.read_shift(2,"u");return[X.read_shift(2,"u"),r1]}function h(X,r1){var Q=9;switch(X.l+=2,Q=X.read_shift(2)){case 9:if(r1!=3)throw new Error("Sector Shift: Expected 9 saw "+Q);break;case 12:if(r1!=4)throw new Error("Sector Shift: Expected 12 saw "+Q);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+Q)}X.chk("0600","Mini Sector Shift: "),X.chk("000000000000","Reserved: ")}function m(X,r1){for(var Q=Math.ceil(X.length/r1)-1,e1=[],c1=1;c1<Q;++c1)e1[c1-1]=X.slice(c1*r1,(c1+1)*r1);return e1[Q-1]=X.slice(Q*r1),e1}function v(X,r1,Q){for(var e1=0,c1=0,i1=0,C1=0,M1=0,D=Q.length,I=[],P=[];e1<D;++e1)I[e1]=P[e1]=e1,r1[e1]=Q[e1];for(;M1<P.length;++M1)e1=P[M1],c1=X[e1].L,i1=X[e1].R,C1=X[e1].C,I[e1]===e1&&(c1!==-1&&I[c1]!==c1&&(I[e1]=I[c1]),i1!==-1&&I[i1]!==i1&&(I[e1]=I[i1])),C1!==-1&&(I[C1]=e1),c1!==-1&&e1!=I[e1]&&(I[c1]=I[e1],P.lastIndexOf(c1)<M1&&P.push(c1)),i1!==-1&&e1!=I[e1]&&(I[i1]=I[e1],P.lastIndexOf(i1)<M1&&P.push(i1));for(e1=1;e1<D;++e1)I[e1]===e1&&(i1!==-1&&I[i1]!==i1?I[e1]=I[i1]:c1!==-1&&I[c1]!==c1&&(I[e1]=I[c1]));for(e1=1;e1<D;++e1)if(X[e1].type!==0){if(M1=e1,M1!=I[M1])do M1=I[M1],r1[e1]=r1[M1]+"/"+r1[e1];while(M1!==0&&I[M1]!==-1&&M1!=I[M1]);I[e1]=-1}for(r1[0]+="/",e1=1;e1<D;++e1)X[e1].type!==2&&(r1[e1]+="/")}function p(X,r1,Q){for(var e1=X.start,c1=X.size,i1=[],C1=e1;Q&&c1>0&&C1>=0;)i1.push(r1.slice(C1*_,C1*_+_)),c1-=_,C1=P0(Q,C1*4);return i1.length===0?_e(0):$t(i1).slice(0,X.size)}function g(X,r1,Q,e1,c1){var i1=N;if(X===N){if(r1!==0)throw new Error("DIFAT chain shorter than expected")}else if(X!==-1){var C1=Q[X],M1=(e1>>>2)-1;if(!C1)return;for(var D=0;D<M1&&(i1=P0(C1,D*4))!==N;++D)c1.push(i1);g(P0(C1,e1-4),r1-1,Q,e1,c1)}}function y(X,r1,Q,e1,c1){var i1=[],C1=[];c1||(c1=[]);var M1=e1-1,D=0,I=0;for(D=r1;D>=0;){c1[D]=!0,i1[i1.length]=D,C1.push(X[D]);var P=Q[Math.floor(D*4/e1)];if(I=D*4&M1,e1<4+I)throw new Error("FAT boundary crossed: "+D+" 4 "+e1);if(!X[P])break;D=P0(X[P],I)}return{nodes:i1,data:Vm([C1])}}function x(X,r1,Q,e1){var c1=X.length,i1=[],C1=[],M1=[],D=[],I=e1-1,P=0,K=0,Z=0,o1=0;for(P=0;P<c1;++P)if(M1=[],Z=P+r1,Z>=c1&&(Z-=c1),!C1[Z]){D=[];var s1=[];for(K=Z;K>=0;){s1[K]=!0,C1[K]=!0,M1[M1.length]=K,D.push(X[K]);var x1=Q[Math.floor(K*4/e1)];if(o1=K*4&I,e1<4+o1)throw new Error("FAT boundary crossed: "+K+" 4 "+e1);if(!X[x1]||(K=P0(X[x1],o1),s1[K]))break}i1[Z]={nodes:M1,data:Vm([D])}}return i1}function C(X,r1,Q,e1,c1,i1,C1,M1){for(var D=0,I=e1.length?2:0,P=r1[X].data,K=0,Z=0,o1;K<P.length;K+=128){var s1=P.slice(K,K+128);Be(s1,64),Z=s1.read_shift(2),o1=t9(s1,0,Z-I),e1.push(o1);var x1={name:o1,type:s1.read_shift(1),color:s1.read_shift(1),L:s1.read_shift(4,"i"),R:s1.read_shift(4,"i"),C:s1.read_shift(4,"i"),clsid:s1.read_shift(16),state:s1.read_shift(4,"i"),start:0,size:0},V1=s1.read_shift(2)+s1.read_shift(2)+s1.read_shift(2)+s1.read_shift(2);V1!==0&&(x1.ct=b(s1,s1.l-8));var L1=s1.read_shift(2)+s1.read_shift(2)+s1.read_shift(2)+s1.read_shift(2);L1!==0&&(x1.mt=b(s1,s1.l-8)),x1.start=s1.read_shift(4,"i"),x1.size=s1.read_shift(4,"i"),x1.size<0&&x1.start<0&&(x1.size=x1.type=0,x1.start=N,x1.name=""),x1.type===5?(D=x1.start,c1>0&&D!==N&&(r1[D].name="!StreamData")):x1.size>=4096?(x1.storage="fat",r1[x1.start]===void 0&&(r1[x1.start]=y(Q,x1.start,r1.fat_addrs,r1.ssz)),r1[x1.start].name=x1.name,x1.content=r1[x1.start].data.slice(0,x1.size)):(x1.storage="minifat",x1.size<0?x1.size=0:D!==N&&x1.start!==N&&r1[D]&&(x1.content=p(x1,r1[D].data,(r1[M1]||{}).data))),x1.content&&Be(x1.content,0),i1[o1]=x1,C1.push(x1)}}function b(X,r1){return new Date((C3(X,r1+4)/1e7*Math.pow(2,32)+C3(X,r1)/1e7-11644473600)*1e3)}function M(X,r1){return f(),u(l.readFileSync(X),r1)}function w(X,r1){var Q=r1&&r1.type;switch(Q||h2&&Buffer.isBuffer(X)&&(Q="buffer"),Q||"base64"){case"file":return M(X,r1);case"base64":return u(t4(H3(X)),r1);case"binary":return u(t4(X),r1)}return u(X,r1)}function z(X,r1){var Q=r1||{},e1=Q.root||"Root Entry";if(X.FullPaths||(X.FullPaths=[]),X.FileIndex||(X.FileIndex=[]),X.FullPaths.length!==X.FileIndex.length)throw new Error("inconsistent CFB structure");X.FullPaths.length===0&&(X.FullPaths[0]=e1+"/",X.FileIndex[0]={name:e1,type:5}),Q.CLSID&&(X.FileIndex[0].clsid=Q.CLSID),H(X)}function H(X){var r1="Sh33tJ5";if(!v2.find(X,"/"+r1)){var Q=_e(4);Q[0]=55,Q[1]=Q[3]=50,Q[2]=54,X.FileIndex.push({name:r1,type:2,content:Q,size:4,L:69,R:69,C:69}),X.FullPaths.push(X.FullPaths[0]+r1),A(X)}}function A(X,r1){z(X);for(var Q=!1,e1=!1,c1=X.FullPaths.length-1;c1>=0;--c1){var i1=X.FileIndex[c1];switch(i1.type){case 0:e1?Q=!0:(X.FileIndex.pop(),X.FullPaths.pop());break;case 1:case 2:case 5:e1=!0,isNaN(i1.R*i1.L*i1.C)&&(Q=!0),i1.R>-1&&i1.L>-1&&i1.R==i1.L&&(Q=!0);break;default:Q=!0;break}}if(!(!Q&&!r1)){var C1=new Date(1987,1,19),M1=0,D=Object.create?Object.create(null):{},I=[];for(c1=0;c1<X.FullPaths.length;++c1)D[X.FullPaths[c1]]=!0,X.FileIndex[c1].type!==0&&I.push([X.FullPaths[c1],X.FileIndex[c1]]);for(c1=0;c1<I.length;++c1){var P=r(I[c1][0]);e1=D[P],e1||(I.push([P,{name:n(P).replace("/",""),type:1,clsid:O,ct:C1,mt:C1,content:null}]),D[P]=!0)}for(I.sort(function(o1,s1){return a(o1[0],s1[0])}),X.FullPaths=[],X.FileIndex=[],c1=0;c1<I.length;++c1)X.FullPaths[c1]=I[c1][0],X.FileIndex[c1]=I[c1][1];for(c1=0;c1<I.length;++c1){var K=X.FileIndex[c1],Z=X.FullPaths[c1];if(K.name=n(Z).replace("/",""),K.L=K.R=K.C=-(K.color=1),K.size=K.content?K.content.length:0,K.start=0,K.clsid=K.clsid||O,c1===0)K.C=I.length>1?1:-1,K.size=0,K.type=5;else if(Z.slice(-1)=="/"){for(M1=c1+1;M1<I.length&&r(X.FullPaths[M1])!=Z;++M1);for(K.C=M1>=I.length?-1:M1,M1=c1+1;M1<I.length&&r(X.FullPaths[M1])!=r(Z);++M1);K.R=M1>=I.length?-1:M1,K.type=1}else r(X.FullPaths[c1+1]||"")==r(Z)&&(K.R=c1+1),K.type=2}}}function V(X,r1){var Q=r1||{};if(Q.fileType=="mad")return M0(X,Q);switch(A(X),Q.fileType){case"zip":return we(X,Q)}var e1=function(o1){for(var s1=0,x1=0,V1=0;V1<o1.FileIndex.length;++V1){var L1=o1.FileIndex[V1];if(L1.content){var w1=L1.content.length;w1>0&&(w1<4096?s1+=w1+63>>6:x1+=w1+511>>9)}}for(var N1=o1.FullPaths.length+3>>2,R1=s1+7>>3,J1=s1+127>>7,U1=R1+x1+N1+J1,i2=U1+127>>7,O2=i2<=109?0:Math.ceil((i2-109)/127);U1+i2+O2+127>>7>i2;)O2=++i2<=109?0:Math.ceil((i2-109)/127);var fe=[1,O2,i2,J1,N1,x1,s1,0];return o1.FileIndex[0].size=s1<<6,fe[7]=(o1.FileIndex[0].start=fe[0]+fe[1]+fe[2]+fe[3]+fe[4]+fe[5])+(fe[6]+7>>3),fe}(X),c1=_e(e1[7]<<9),i1=0,C1=0;{for(i1=0;i1<8;++i1)c1.write_shift(1,S[i1]);for(i1=0;i1<8;++i1)c1.write_shift(2,0);for(c1.write_shift(2,62),c1.write_shift(2,3),c1.write_shift(2,65534),c1.write_shift(2,9),c1.write_shift(2,6),i1=0;i1<3;++i1)c1.write_shift(2,0);for(c1.write_shift(4,0),c1.write_shift(4,e1[2]),c1.write_shift(4,e1[0]+e1[1]+e1[2]+e1[3]-1),c1.write_shift(4,0),c1.write_shift(4,4096),c1.write_shift(4,e1[3]?e1[0]+e1[1]+e1[2]-1:N),c1.write_shift(4,e1[3]),c1.write_shift(-4,e1[1]?e1[0]-1:N),c1.write_shift(4,e1[1]),i1=0;i1<109;++i1)c1.write_shift(-4,i1<e1[2]?e1[1]+i1:-1)}if(e1[1])for(C1=0;C1<e1[1];++C1){for(;i1<236+C1*127;++i1)c1.write_shift(-4,i1<e1[2]?e1[1]+i1:-1);c1.write_shift(-4,C1===e1[1]-1?N:C1+1)}var M1=function(o1){for(C1+=o1;i1<C1-1;++i1)c1.write_shift(-4,i1+1);o1&&(++i1,c1.write_shift(-4,N))};for(C1=i1=0,C1+=e1[1];i1<C1;++i1)c1.write_shift(-4,U.DIFSECT);for(C1+=e1[2];i1<C1;++i1)c1.write_shift(-4,U.FATSECT);M1(e1[3]),M1(e1[4]);for(var D=0,I=0,P=X.FileIndex[0];D<X.FileIndex.length;++D)P=X.FileIndex[D],P.content&&(I=P.content.length,!(I<4096)&&(P.start=C1,M1(I+511>>9)));for(M1(e1[6]+7>>3);c1.l&511;)c1.write_shift(-4,U.ENDOFCHAIN);for(C1=i1=0,D=0;D<X.FileIndex.length;++D)P=X.FileIndex[D],P.content&&(I=P.content.length,!(!I||I>=4096)&&(P.start=C1,M1(I+63>>6)));for(;c1.l&511;)c1.write_shift(-4,U.ENDOFCHAIN);for(i1=0;i1<e1[4]<<2;++i1){var K=X.FullPaths[i1];if(!K||K.length===0){for(D=0;D<17;++D)c1.write_shift(4,0);for(D=0;D<3;++D)c1.write_shift(4,-1);for(D=0;D<12;++D)c1.write_shift(4,0);continue}P=X.FileIndex[i1],i1===0&&(P.start=P.size?P.start-1:N);var Z=i1===0&&Q.root||P.name;if(I=2*(Z.length+1),c1.write_shift(64,Z,"utf16le"),c1.write_shift(2,I),c1.write_shift(1,P.type),c1.write_shift(1,P.color),c1.write_shift(-4,P.L),c1.write_shift(-4,P.R),c1.write_shift(-4,P.C),P.clsid)c1.write_shift(16,P.clsid,"hex");else for(D=0;D<4;++D)c1.write_shift(4,0);c1.write_shift(4,P.state||0),c1.write_shift(4,0),c1.write_shift(4,0),c1.write_shift(4,0),c1.write_shift(4,0),c1.write_shift(4,P.start),c1.write_shift(4,P.size),c1.write_shift(4,0)}for(i1=1;i1<X.FileIndex.length;++i1)if(P=X.FileIndex[i1],P.size>=4096)if(c1.l=P.start+1<<9,h2&&Buffer.isBuffer(P.content))P.content.copy(c1,c1.l,0,P.size),c1.l+=P.size+511&-512;else{for(D=0;D<P.size;++D)c1.write_shift(1,P.content[D]);for(;D&511;++D)c1.write_shift(1,0)}for(i1=1;i1<X.FileIndex.length;++i1)if(P=X.FileIndex[i1],P.size>0&&P.size<4096)if(h2&&Buffer.isBuffer(P.content))P.content.copy(c1,c1.l,0,P.size),c1.l+=P.size+63&-64;else{for(D=0;D<P.size;++D)c1.write_shift(1,P.content[D]);for(;D&63;++D)c1.write_shift(1,0)}if(h2)c1.l=c1.length;else for(;c1.l<c1.length;)c1.write_shift(1,0);return c1}function k(X,r1){var Q=X.FullPaths.map(function(D){return D.toUpperCase()}),e1=Q.map(function(D){var I=D.split("/");return I[I.length-(D.slice(-1)=="/"?2:1)]}),c1=!1;r1.charCodeAt(0)===47?(c1=!0,r1=Q[0].slice(0,-1)+r1):c1=r1.indexOf("/")!==-1;var i1=r1.toUpperCase(),C1=c1===!0?Q.indexOf(i1):e1.indexOf(i1);if(C1!==-1)return X.FileIndex[C1];var M1=!i1.match(Qa);for(i1=i1.replace(l3,""),M1&&(i1=i1.replace(Qa,"!")),C1=0;C1<Q.length;++C1)if((M1?Q[C1].replace(Qa,"!"):Q[C1]).replace(l3,"")==i1||(M1?e1[C1].replace(Qa,"!"):e1[C1]).replace(l3,"")==i1)return X.FileIndex[C1];return null}var _=64,N=-2,q="d0cf11e0a1b11ae1",S=[208,207,17,224,161,177,26,225],O="00000000000000000000000000000000",U={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:N,FREESECT:-1,HEADER_SIGNATURE:q,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:O,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function J(X,r1,Q){f();var e1=V(X,Q);l.writeFileSync(r1,e1)}function Y(X){for(var r1=new Array(X.length),Q=0;Q<X.length;++Q)r1[Q]=String.fromCharCode(X[Q]);return r1.join("")}function G(X,r1){var Q=V(X,r1);switch(r1&&r1.type||"buffer"){case"file":return f(),l.writeFileSync(r1.filename,Q),Q;case"binary":return typeof Q=="string"?Q:Y(Q);case"base64":return fm(typeof Q=="string"?Q:Y(Q));case"buffer":if(h2)return Buffer.isBuffer(Q)?Q:g6(Q);case"array":return typeof Q=="string"?t4(Q):Q}return Q}var B;function T(X){try{var r1=X.InflateRaw,Q=new r1;if(Q._processChunk(new Uint8Array([3,0]),Q._finishFlushFlag),Q.bytesRead)B=X;else throw new Error("zlib does not expose bytesRead")}catch(e1){console.error("cannot use native zlib: "+(e1.message||e1))}}function L(X,r1){if(!B)return S1(X,r1);var Q=B.InflateRaw,e1=new Q,c1=e1._processChunk(X.slice(X.l),e1._finishFlushFlag);return X.l+=e1.bytesRead,c1}function W(X){return B?B.deflateRawSync(X):O1(X)}var j=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],E=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],R=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];function a1(X){var r1=(X<<1|X<<11)&139536|(X<<5|X<<15)&558144;return(r1>>16|r1>>8|r1)&255}for(var n1=typeof Uint8Array<"u",t1=n1?new Uint8Array(256):[],d1=0;d1<256;++d1)t1[d1]=a1(d1);function F(X,r1){var Q=t1[X&255];return r1<=8?Q>>>8-r1:(Q=Q<<8|t1[X>>8&255],r1<=16?Q>>>16-r1:(Q=Q<<8|t1[X>>16&255],Q>>>24-r1))}function p1(X,r1){var Q=r1&7,e1=r1>>>3;return(X[e1]|(Q<=6?0:X[e1+1]<<8))>>>Q&3}function z1(X,r1){var Q=r1&7,e1=r1>>>3;return(X[e1]|(Q<=5?0:X[e1+1]<<8))>>>Q&7}function h1(X,r1){var Q=r1&7,e1=r1>>>3;return(X[e1]|(Q<=4?0:X[e1+1]<<8))>>>Q&15}function l1(X,r1){var Q=r1&7,e1=r1>>>3;return(X[e1]|(Q<=3?0:X[e1+1]<<8))>>>Q&31}function f1(X,r1){var Q=r1&7,e1=r1>>>3;return(X[e1]|(Q<=1?0:X[e1+1]<<8))>>>Q&127}function u1(X,r1,Q){var e1=r1&7,c1=r1>>>3,i1=(1<<Q)-1,C1=X[c1]>>>e1;return Q<8-e1||(C1|=X[c1+1]<<8-e1,Q<16-e1)||(C1|=X[c1+2]<<16-e1,Q<24-e1)||(C1|=X[c1+3]<<24-e1),C1&i1}function v1(X,r1,Q){var e1=r1&7,c1=r1>>>3;return e1<=5?X[c1]|=(Q&7)<<e1:(X[c1]|=Q<<e1&255,X[c1+1]=(Q&7)>>8-e1),r1+3}function k1(X,r1,Q){var e1=r1&7,c1=r1>>>3;return Q=(Q&1)<<e1,X[c1]|=Q,r1+1}function b1(X,r1,Q){var e1=r1&7,c1=r1>>>3;return Q<<=e1,X[c1]|=Q&255,Q>>>=8,X[c1+1]=Q,r1+8}function H1(X,r1,Q){var e1=r1&7,c1=r1>>>3;return Q<<=e1,X[c1]|=Q&255,Q>>>=8,X[c1+1]=Q&255,X[c1+2]=Q>>>8,r1+16}function F1(X,r1){var Q=X.length,e1=2*Q>r1?2*Q:r1+5,c1=0;if(Q>=r1)return X;if(h2){var i1=um(e1);if(X.copy)X.copy(i1);else for(;c1<X.length;++c1)i1[c1]=X[c1];return i1}else if(n1){var C1=new Uint8Array(e1);if(C1.set)C1.set(X);else for(;c1<Q;++c1)C1[c1]=X[c1];return C1}return X.length=e1,X}function $1(X){for(var r1=new Array(X),Q=0;Q<X;++Q)r1[Q]=0;return r1}function W1(X,r1,Q){var e1=1,c1=0,i1=0,C1=0,M1=0,D=X.length,I=n1?new Uint16Array(32):$1(32);for(i1=0;i1<32;++i1)I[i1]=0;for(i1=D;i1<Q;++i1)X[i1]=0;D=X.length;var P=n1?new Uint16Array(D):$1(D);for(i1=0;i1<D;++i1)I[c1=X[i1]]++,e1<c1&&(e1=c1),P[i1]=0;for(I[0]=0,i1=1;i1<=e1;++i1)I[i1+16]=M1=M1+I[i1-1]<<1;for(i1=0;i1<D;++i1)M1=X[i1],M1!=0&&(P[i1]=I[M1+16]++);var K=0;for(i1=0;i1<D;++i1)if(K=X[i1],K!=0)for(M1=F(P[i1],e1)>>e1-K,C1=(1<<e1+4-K)-1;C1>=0;--C1)r1[M1|C1<<K]=K&15|i1<<4;return e1}var K1=n1?new Uint16Array(512):$1(512),d2=n1?new Uint16Array(32):$1(32);if(!n1){for(var G1=0;G1<512;++G1)K1[G1]=0;for(G1=0;G1<32;++G1)d2[G1]=0}(function(){for(var X=[],r1=0;r1<32;r1++)X.push(5);W1(X,d2,32);var Q=[];for(r1=0;r1<=143;r1++)Q.push(8);for(;r1<=255;r1++)Q.push(9);for(;r1<=279;r1++)Q.push(7);for(;r1<=287;r1++)Q.push(8);W1(Q,K1,288)})();var j2=function(){for(var r1=n1?new Uint8Array(32768):[],Q=0,e1=0;Q<R.length-1;++Q)for(;e1<R[Q+1];++e1)r1[e1]=Q;for(;e1<32768;++e1)r1[e1]=29;var c1=n1?new Uint8Array(259):[];for(Q=0,e1=0;Q<E.length-1;++Q)for(;e1<E[Q+1];++e1)c1[e1]=Q;function i1(M1,D){for(var I=0;I<M1.length;){var P=Math.min(65535,M1.length-I),K=I+P==M1.length;for(D.write_shift(1,+K),D.write_shift(2,P),D.write_shift(2,~P&65535);P-- >0;)D[D.l++]=M1[I++]}return D.l}function C1(M1,D){for(var I=0,P=0,K=n1?new Uint16Array(32768):[];P<M1.length;){var Z=Math.min(65535,M1.length-P);if(Z<10){for(I=v1(D,I,+(P+Z==M1.length)),I&7&&(I+=8-(I&7)),D.l=I/8|0,D.write_shift(2,Z),D.write_shift(2,~Z&65535);Z-- >0;)D[D.l++]=M1[P++];I=D.l*8;continue}I=v1(D,I,+(P+Z==M1.length)+2);for(var o1=0;Z-- >0;){var s1=M1[P];o1=(o1<<5^s1)&32767;var x1=-1,V1=0;if((x1=K[o1])&&(x1|=P&-32768,x1>P&&(x1-=32768),x1<P))for(;M1[x1+V1]==M1[P+V1]&&V1<250;)++V1;if(V1>2){s1=c1[V1],s1<=22?I=b1(D,I,t1[s1+1]>>1)-1:(b1(D,I,3),I+=5,b1(D,I,t1[s1-23]>>5),I+=3);var L1=s1<8?0:s1-4>>2;L1>0&&(H1(D,I,V1-E[s1]),I+=L1),s1=r1[P-x1],I=b1(D,I,t1[s1]>>3),I-=3;var w1=s1<4?0:s1-2>>1;w1>0&&(H1(D,I,P-x1-R[s1]),I+=w1);for(var N1=0;N1<V1;++N1)K[o1]=P&32767,o1=(o1<<5^M1[P])&32767,++P;Z-=V1-1}else s1<=143?s1=s1+48:I=k1(D,I,1),I=b1(D,I,t1[s1]),K[o1]=P&32767,++P}I=b1(D,I,0)-1}return D.l=(I+7)/8|0,D.l}return function(D,I){return D.length<8?i1(D,I):C1(D,I)}}();function O1(X){var r1=_e(50+Math.floor(X.length*1.1)),Q=j2(X,r1);return r1.slice(0,Q)}var c2=n1?new Uint16Array(32768):$1(32768),Y2=n1?new Uint16Array(32768):$1(32768),m2=n1?new Uint16Array(128):$1(128),A2=1,Pe=1;function y1(X,r1){var Q=l1(X,r1)+257;r1+=5;var e1=l1(X,r1)+1;r1+=5;var c1=h1(X,r1)+4;r1+=4;for(var i1=0,C1=n1?new Uint8Array(19):$1(19),M1=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],D=1,I=n1?new Uint8Array(8):$1(8),P=n1?new Uint8Array(8):$1(8),K=C1.length,Z=0;Z<c1;++Z)C1[j[Z]]=i1=z1(X,r1),D<i1&&(D=i1),I[i1]++,r1+=3;var o1=0;for(I[0]=0,Z=1;Z<=D;++Z)P[Z]=o1=o1+I[Z-1]<<1;for(Z=0;Z<K;++Z)(o1=C1[Z])!=0&&(M1[Z]=P[o1]++);var s1=0;for(Z=0;Z<K;++Z)if(s1=C1[Z],s1!=0){o1=t1[M1[Z]]>>8-s1;for(var x1=(1<<7-s1)-1;x1>=0;--x1)m2[o1|x1<<s1]=s1&7|Z<<3}var V1=[];for(D=1;V1.length<Q+e1;)switch(o1=m2[f1(X,r1)],r1+=o1&7,o1>>>=3){case 16:for(i1=3+p1(X,r1),r1+=2,o1=V1[V1.length-1];i1-- >0;)V1.push(o1);break;case 17:for(i1=3+z1(X,r1),r1+=3;i1-- >0;)V1.push(0);break;case 18:for(i1=11+f1(X,r1),r1+=7;i1-- >0;)V1.push(0);break;default:V1.push(o1),D<o1&&(D=o1);break}var L1=V1.slice(0,Q),w1=V1.slice(Q);for(Z=Q;Z<286;++Z)L1[Z]=0;for(Z=e1;Z<30;++Z)w1[Z]=0;return A2=W1(L1,c2,286),Pe=W1(w1,Y2,30),r1}function m1(X,r1){if(X[0]==3&&!(X[1]&3))return[m0(r1),2];for(var Q=0,e1=0,c1=um(r1||1<<18),i1=0,C1=c1.length>>>0,M1=0,D=0;!(e1&1);){if(e1=z1(X,Q),Q+=3,e1>>>1)e1>>1==1?(M1=9,D=5):(Q=y1(X,Q),M1=A2,D=Pe);else{Q&7&&(Q+=8-(Q&7));var I=X[Q>>>3]|X[(Q>>>3)+1]<<8;if(Q+=32,I>0)for(!r1&&C1<i1+I&&(c1=F1(c1,i1+I),C1=c1.length);I-- >0;)c1[i1++]=X[Q>>>3],Q+=8;continue}for(;;){!r1&&C1<i1+32767&&(c1=F1(c1,i1+32767),C1=c1.length);var P=u1(X,Q,M1),K=e1>>>1==1?K1[P]:c2[P];if(Q+=K&15,K>>>=4,!(K>>>8&255))c1[i1++]=K;else{if(K==256)break;K-=257;var Z=K<8?0:K-4>>2;Z>5&&(Z=0);var o1=i1+E[K];Z>0&&(o1+=u1(X,Q,Z),Q+=Z),P=u1(X,Q,D),K=e1>>>1==1?d2[P]:Y2[P],Q+=K&15,K>>>=4;var s1=K<4?0:K-2>>1,x1=R[K];for(s1>0&&(x1+=u1(X,Q,s1),Q+=s1),!r1&&C1<o1&&(c1=F1(c1,o1+100),C1=c1.length);i1<o1;)c1[i1]=c1[i1-x1],++i1}}}return r1?[c1,Q+7>>>3]:[c1.slice(0,i1),Q+7>>>3]}function S1(X,r1){var Q=X.slice(X.l||0),e1=m1(Q,r1);return X.l+=e1[1],e1[0]}function T1(X,r1){if(X)typeof console<"u"&&console.error(r1);else throw new Error(r1)}function Q1(X,r1){var Q=X;Be(Q,0);var e1=[],c1=[],i1={FileIndex:e1,FullPaths:c1};z(i1,{root:r1.root});for(var C1=Q.length-4;(Q[C1]!=80||Q[C1+1]!=75||Q[C1+2]!=5||Q[C1+3]!=6)&&C1>=0;)--C1;Q.l=C1+4,Q.l+=4;var M1=Q.read_shift(2);Q.l+=6;var D=Q.read_shift(4);for(Q.l=D,C1=0;C1<M1;++C1){Q.l+=20;var I=Q.read_shift(4),P=Q.read_shift(4),K=Q.read_shift(2),Z=Q.read_shift(2),o1=Q.read_shift(2);Q.l+=8;var s1=Q.read_shift(4),x1=s(Q.slice(Q.l+K,Q.l+K+Z));Q.l+=K+Z+o1;var V1=Q.l;Q.l=s1+4,Q2(Q,I,P,i1,x1),Q.l=V1}return i1}function Q2(X,r1,Q,e1,c1){X.l+=2;var i1=X.read_shift(2),C1=X.read_shift(2),M1=i(X);if(i1&8257)throw new Error("Unsupported ZIP encryption");for(var D=X.read_shift(4),I=X.read_shift(4),P=X.read_shift(4),K=X.read_shift(2),Z=X.read_shift(2),o1="",s1=0;s1<K;++s1)o1+=String.fromCharCode(X[X.l++]);if(Z){var x1=s(X.slice(X.l,X.l+Z));(x1[21589]||{}).mt&&(M1=x1[21589].mt),((c1||{})[21589]||{}).mt&&(M1=c1[21589].mt)}X.l+=Z;var V1=X.slice(X.l,X.l+I);switch(C1){case 8:V1=L(X,P);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+C1)}var L1=!1;i1&8&&(D=X.read_shift(4),D==134695760&&(D=X.read_shift(4),L1=!0),I=X.read_shift(4),P=X.read_shift(4)),I!=r1&&T1(L1,"Bad compressed size: "+r1+" != "+I),P!=Q&&T1(L1,"Bad uncompressed size: "+Q+" != "+P),T3(e1,o1,V1,{unsafe:!0,mt:M1})}function we(X,r1){var Q=r1||{},e1=[],c1=[],i1=_e(1),C1=Q.compression?8:0,M1=0,D=0,I=0,P=0,K=0,Z=X.FullPaths[0],o1=Z,s1=X.FileIndex[0],x1=[],V1=0;for(D=1;D<X.FullPaths.length;++D)if(o1=X.FullPaths[D].slice(Z.length),s1=X.FileIndex[D],!(!s1.size||!s1.content||o1=="Sh33tJ5")){var L1=P,w1=_e(o1.length);for(I=0;I<o1.length;++I)w1.write_shift(1,o1.charCodeAt(I)&127);w1=w1.slice(0,w1.l),x1[K]=it1.buf(s1.content,0);var N1=s1.content;C1==8&&(N1=W(N1)),i1=_e(30),i1.write_shift(4,67324752),i1.write_shift(2,20),i1.write_shift(2,M1),i1.write_shift(2,C1),s1.mt?c(i1,s1.mt):i1.write_shift(4,0),i1.write_shift(-4,x1[K]),i1.write_shift(4,N1.length),i1.write_shift(4,s1.content.length),i1.write_shift(2,w1.length),i1.write_shift(2,0),P+=i1.length,e1.push(i1),P+=w1.length,e1.push(w1),P+=N1.length,e1.push(N1),i1=_e(46),i1.write_shift(4,33639248),i1.write_shift(2,0),i1.write_shift(2,20),i1.write_shift(2,M1),i1.write_shift(2,C1),i1.write_shift(4,0),i1.write_shift(-4,x1[K]),i1.write_shift(4,N1.length),i1.write_shift(4,s1.content.length),i1.write_shift(2,w1.length),i1.write_shift(2,0),i1.write_shift(2,0),i1.write_shift(2,0),i1.write_shift(2,0),i1.write_shift(4,0),i1.write_shift(4,L1),V1+=i1.l,c1.push(i1),V1+=w1.length,c1.push(w1),++K}return i1=_e(22),i1.write_shift(4,101010256),i1.write_shift(2,0),i1.write_shift(2,0),i1.write_shift(2,K),i1.write_shift(2,K),i1.write_shift(4,V1),i1.write_shift(4,P),i1.write_shift(2,0),$t([$t(e1),$t(c1),i1])}var d3={htm:"text/html",xml:"text/xml",gif:"image/gif",jpg:"image/jpeg",png:"image/png",mso:"application/x-mso",thmx:"application/vnd.ms-officetheme",sh33tj5:"application/octet-stream"};function j3(X,r1){if(X.ctype)return X.ctype;var Q=X.name||"",e1=Q.match(/\.([^\.]+)$/);return e1&&d3[e1[1]]||r1&&(e1=(Q=r1).match(/[\.\\]([^\.\\])+$/),e1&&d3[e1[1]])?d3[e1[1]]:"application/octet-stream"}function k2(X){for(var r1=fm(X),Q=[],e1=0;e1<r1.length;e1+=76)Q.push(r1.slice(e1,e1+76));return Q.join(`\r
836
+ `):e}function vY(e,t){const{element:a,datasetIndex:r,index:n}=t,c=e.getDatasetMeta(r).controller,{label:i,value:s}=c.getLabelAndValue(n);return{chart:e,label:i,parsed:c.getParsed(n),raw:e.data.datasets[r].data[n],formattedValue:s,dataset:c.getDataset(),dataIndex:n,datasetIndex:r,element:a}}function Xd(e,t){const a=e.chart.ctx,{body:r,footer:n,title:c}=e,{boxWidth:i,boxHeight:s}=t,l=Ve(t.bodyFont),f=Ve(t.titleFont),u=Ve(t.footerFont),d=c.length,h=n.length,m=r.length,v=t3(t.padding);let p=v.height,g=0,y=r.reduce((b,M)=>b+M.before.length+M.lines.length+M.after.length,0);if(y+=e.beforeBody.length+e.afterBody.length,d&&(p+=d*f.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),y){const b=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;p+=m*b+(y-m)*l.lineHeight+(y-1)*t.bodySpacing}h&&(p+=t.footerMarginTop+h*u.lineHeight+(h-1)*t.footerSpacing);let x=0;const C=function(b){g=Math.max(g,a.measureText(b).width+x)};return a.save(),a.font=f.string,V2(e.title,C),a.font=l.string,V2(e.beforeBody.concat(e.afterBody),C),x=t.displayColors?i+2+t.boxPadding:0,V2(r,b=>{V2(b.before,C),V2(b.lines,C),V2(b.after,C)}),x=0,a.font=u.string,V2(e.footer,C),a.restore(),g+=v.width,{width:g,height:p}}function gY(e,t){const{y:a,height:r}=t;return a<r/2?"top":a>e.height-r/2?"bottom":"center"}function yY(e,t,a,r){const{x:n,width:c}=r,i=a.caretSize+a.caretPadding;if(e==="left"&&n+c+i>t.width||e==="right"&&n-c-i<0)return!0}function xY(e,t,a,r){const{x:n,width:c}=a,{width:i,chartArea:{left:s,right:l}}=e;let f="center";return r==="center"?f=n<=(s+l)/2?"left":"right":n<=c/2?f="left":n>=i-c/2&&(f="right"),yY(f,e,t,a)&&(f="center"),f}function Kd(e,t,a){const r=a.yAlign||t.yAlign||gY(e,a);return{xAlign:a.xAlign||t.xAlign||xY(e,t,a,r),yAlign:r}}function bY(e,t){let{x:a,width:r}=e;return t==="right"?a-=r:t==="center"&&(a-=r/2),a}function CY(e,t,a){let{y:r,height:n}=e;return t==="top"?r+=a:t==="bottom"?r-=n+a:r-=n/2,r}function Zd(e,t,a,r){const{caretSize:n,caretPadding:c,cornerRadius:i}=e,{xAlign:s,yAlign:l}=a,f=n+c,{topLeft:u,topRight:d,bottomLeft:h,bottomRight:m}=j0(i);let v=bY(t,s);const p=CY(t,l,f);return l==="center"?s==="left"?v+=f:s==="right"&&(v-=f):s==="left"?v-=Math.max(u,h)+n:s==="right"&&(v+=Math.max(d,m)+n),{x:Ne(v,0,r.width-t.width),y:Ne(p,0,r.height-t.height)}}function b8(e,t,a){const r=t3(a.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function Qd(e){return w4([],tt(e))}function MY(e,t,a){return v0(e,{tooltip:t,tooltipItems:a,type:"tooltip"})}function Jd(e,t){const a=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return a?e.override(a):e}const Zy={beforeTitle:J4,title(e){if(e.length>0){const t=e[0],a=t.chart.data.labels,r=a?a.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return a[t.dataIndex]}return""},afterTitle:J4,beforeBody:J4,beforeLabel:J4,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const a=e.formattedValue;return x2(a)||(t+=a),t},labelColor(e){const a=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:a.borderColor,backgroundColor:a.backgroundColor,borderWidth:a.borderWidth,borderDash:a.borderDash,borderDashOffset:a.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const a=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:a.pointStyle,rotation:a.rotation}},afterLabel:J4,afterBody:J4,beforeFooter:J4,footer:J4,afterFooter:J4};function h3(e,t,a,r){const n=e[t].call(a,r);return typeof n>"u"?Zy[t].call(a,r):n}class v7 extends g4{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const a=this.chart,r=this.options.setContext(this.getContext()),n=r.enabled&&a.options.animation&&r.animations,c=new Sy(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(c)),c}getContext(){return this.$context||(this.$context=MY(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,a){const{callbacks:r}=a,n=h3(r,"beforeTitle",this,t),c=h3(r,"title",this,t),i=h3(r,"afterTitle",this,t);let s=[];return s=w4(s,tt(n)),s=w4(s,tt(c)),s=w4(s,tt(i)),s}getBeforeBody(t,a){return Qd(h3(a.callbacks,"beforeBody",this,t))}getBody(t,a){const{callbacks:r}=a,n=[];return V2(t,c=>{const i={before:[],lines:[],after:[]},s=Jd(r,c);w4(i.before,tt(h3(s,"beforeLabel",this,c))),w4(i.lines,h3(s,"label",this,c)),w4(i.after,tt(h3(s,"afterLabel",this,c))),n.push(i)}),n}getAfterBody(t,a){return Qd(h3(a.callbacks,"afterBody",this,t))}getFooter(t,a){const{callbacks:r}=a,n=h3(r,"beforeFooter",this,t),c=h3(r,"footer",this,t),i=h3(r,"afterFooter",this,t);let s=[];return s=w4(s,tt(n)),s=w4(s,tt(c)),s=w4(s,tt(i)),s}_createItems(t){const a=this._active,r=this.chart.data,n=[],c=[],i=[];let s=[],l,f;for(l=0,f=a.length;l<f;++l)s.push(vY(this.chart,a[l]));return t.filter&&(s=s.filter((u,d,h)=>t.filter(u,d,h,r))),t.itemSort&&(s=s.sort((u,d)=>t.itemSort(u,d,r))),V2(s,u=>{const d=Jd(t.callbacks,u);n.push(h3(d,"labelColor",this,u)),c.push(h3(d,"labelPointStyle",this,u)),i.push(h3(d,"labelTextColor",this,u))}),this.labelColors=n,this.labelPointStyles=c,this.labelTextColors=i,this.dataPoints=s,s}update(t,a){const r=this.options.setContext(this.getContext()),n=this._active;let c,i=[];if(!n.length)this.opacity!==0&&(c={opacity:0});else{const s=Xa[r.position].call(this,n,this._eventPosition);i=this._createItems(r),this.title=this.getTitle(i,r),this.beforeBody=this.getBeforeBody(i,r),this.body=this.getBody(i,r),this.afterBody=this.getAfterBody(i,r),this.footer=this.getFooter(i,r);const l=this._size=Xd(this,r),f=Object.assign({},s,l),u=Kd(this.chart,r,f),d=Zd(r,f,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,c={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=i,this.$context=void 0,c&&this._resolveAnimations().update(this,c),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:a})}drawCaret(t,a,r,n){const c=this.getCaretPosition(t,r,n);a.lineTo(c.x1,c.y1),a.lineTo(c.x2,c.y2),a.lineTo(c.x3,c.y3)}getCaretPosition(t,a,r){const{xAlign:n,yAlign:c}=this,{caretSize:i,cornerRadius:s}=r,{topLeft:l,topRight:f,bottomLeft:u,bottomRight:d}=j0(s),{x:h,y:m}=t,{width:v,height:p}=a;let g,y,x,C,b,M;return c==="center"?(b=m+p/2,n==="left"?(g=h,y=g-i,C=b+i,M=b-i):(g=h+v,y=g+i,C=b-i,M=b+i),x=g):(n==="left"?y=h+Math.max(l,u)+i:n==="right"?y=h+v-Math.max(f,d)-i:y=this.caretX,c==="top"?(C=m,b=C-i,g=y-i,x=y+i):(C=m+p,b=C+i,g=y+i,x=y-i),M=C),{x1:g,x2:y,x3:x,y1:C,y2:b,y3:M}}drawTitle(t,a,r){const n=this.title,c=n.length;let i,s,l;if(c){const f=W6(r.rtl,this.x,this.width);for(t.x=b8(this,r.titleAlign,r),a.textAlign=f.textAlign(r.titleAlign),a.textBaseline="middle",i=Ve(r.titleFont),s=r.titleSpacing,a.fillStyle=r.titleColor,a.font=i.string,l=0;l<c;++l)a.fillText(n[l],f.x(t.x),t.y+i.lineHeight/2),t.y+=i.lineHeight+s,l+1===c&&(t.y+=r.titleMarginBottom-s)}}_drawColorBox(t,a,r,n,c){const i=this.labelColors[r],s=this.labelPointStyles[r],{boxHeight:l,boxWidth:f}=c,u=Ve(c.bodyFont),d=b8(this,"left",c),h=n.x(d),m=l<u.lineHeight?(u.lineHeight-l)/2:0,v=a.y+m;if(c.usePointStyle){const p={radius:Math.min(f,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},g=n.leftForLtr(h,f)+f/2,y=v+l/2;t.strokeStyle=c.multiKeyBackground,t.fillStyle=c.multiKeyBackground,l7(t,p,g,y),t.strokeStyle=i.borderColor,t.fillStyle=i.backgroundColor,l7(t,p,g,y)}else{t.lineWidth=u2(i.borderWidth)?Math.max(...Object.values(i.borderWidth)):i.borderWidth||1,t.strokeStyle=i.borderColor,t.setLineDash(i.borderDash||[]),t.lineDashOffset=i.borderDashOffset||0;const p=n.leftForLtr(h,f),g=n.leftForLtr(n.xPlus(h,1),f-2),y=j0(i.borderRadius);Object.values(y).some(x=>x!==0)?(t.beginPath(),t.fillStyle=c.multiKeyBackground,jr(t,{x:p,y:v,w:f,h:l,radius:y}),t.fill(),t.stroke(),t.fillStyle=i.backgroundColor,t.beginPath(),jr(t,{x:g,y:v+1,w:f-2,h:l-2,radius:y}),t.fill()):(t.fillStyle=c.multiKeyBackground,t.fillRect(p,v,f,l),t.strokeRect(p,v,f,l),t.fillStyle=i.backgroundColor,t.fillRect(g,v+1,f-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,a,r){const{body:n}=this,{bodySpacing:c,bodyAlign:i,displayColors:s,boxHeight:l,boxWidth:f,boxPadding:u}=r,d=Ve(r.bodyFont);let h=d.lineHeight,m=0;const v=W6(r.rtl,this.x,this.width),p=function(H){a.fillText(H,v.x(t.x+m),t.y+h/2),t.y+=h+c},g=v.textAlign(i);let y,x,C,b,M,w,z;for(a.textAlign=i,a.textBaseline="middle",a.font=d.string,t.x=b8(this,g,r),a.fillStyle=r.bodyColor,V2(this.beforeBody,p),m=s&&g!=="right"?i==="center"?f/2+u:f+2+u:0,b=0,w=n.length;b<w;++b){for(y=n[b],x=this.labelTextColors[b],a.fillStyle=x,V2(y.before,p),C=y.lines,s&&C.length&&(this._drawColorBox(a,t,b,v,r),h=Math.max(d.lineHeight,l)),M=0,z=C.length;M<z;++M)p(C[M]),h=d.lineHeight;V2(y.after,p)}m=0,h=d.lineHeight,V2(this.afterBody,p),t.y-=c}drawFooter(t,a,r){const n=this.footer,c=n.length;let i,s;if(c){const l=W6(r.rtl,this.x,this.width);for(t.x=b8(this,r.footerAlign,r),t.y+=r.footerMarginTop,a.textAlign=l.textAlign(r.footerAlign),a.textBaseline="middle",i=Ve(r.footerFont),a.fillStyle=r.footerColor,a.font=i.string,s=0;s<c;++s)a.fillText(n[s],l.x(t.x),t.y+i.lineHeight/2),t.y+=i.lineHeight+r.footerSpacing}}drawBackground(t,a,r,n){const{xAlign:c,yAlign:i}=this,{x:s,y:l}=t,{width:f,height:u}=r,{topLeft:d,topRight:h,bottomLeft:m,bottomRight:v}=j0(n.cornerRadius);a.fillStyle=n.backgroundColor,a.strokeStyle=n.borderColor,a.lineWidth=n.borderWidth,a.beginPath(),a.moveTo(s+d,l),i==="top"&&this.drawCaret(t,a,r,n),a.lineTo(s+f-h,l),a.quadraticCurveTo(s+f,l,s+f,l+h),i==="center"&&c==="right"&&this.drawCaret(t,a,r,n),a.lineTo(s+f,l+u-v),a.quadraticCurveTo(s+f,l+u,s+f-v,l+u),i==="bottom"&&this.drawCaret(t,a,r,n),a.lineTo(s+m,l+u),a.quadraticCurveTo(s,l+u,s,l+u-m),i==="center"&&c==="left"&&this.drawCaret(t,a,r,n),a.lineTo(s,l+d),a.quadraticCurveTo(s,l,s+d,l),a.closePath(),a.fill(),n.borderWidth>0&&a.stroke()}_updateAnimationTarget(t){const a=this.chart,r=this.$animations,n=r&&r.x,c=r&&r.y;if(n||c){const i=Xa[t.position].call(this,this._active,this._eventPosition);if(!i)return;const s=this._size=Xd(this,t),l=Object.assign({},i,this._size),f=Kd(a,t,l),u=Zd(t,l,f,a);(n._to!==u.x||c._to!==u.y)&&(this.xAlign=f.xAlign,this.yAlign=f.yAlign,this.width=s.width,this.height=s.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const a=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(a);const n={width:this.width,height:this.height},c={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const i=t3(a.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;a.enabled&&s&&(t.save(),t.globalAlpha=r,this.drawBackground(c,t,n,a),_y(t,a.textDirection),c.y+=i.top,this.drawTitle(c,t,a),this.drawBody(c,t,a),this.drawFooter(c,t,a),ky(t,a.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,a){const r=this._active,n=t.map(({datasetIndex:s,index:l})=>{const f=this.chart.getDatasetMeta(s);if(!f)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:f.data[l],index:l}}),c=!_c(r,n),i=this._positionChanged(n,a);(c||i)&&(this._active=n,this._eventPosition=a,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,a,r=!0){if(a&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,c=this._active||[],i=this._getActiveElements(t,c,a,r),s=this._positionChanged(i,t),l=a||!_c(i,c)||s;return l&&(this._active=i,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,a))),l}_getActiveElements(t,a,r,n){const c=this.options;if(t.type==="mouseout")return[];if(!n)return a.filter(s=>this.chart.data.datasets[s.datasetIndex]&&this.chart.getDatasetMeta(s.datasetIndex).controller.getParsed(s.index)!==void 0);const i=this.chart.getElementsAtEventForMode(t,c.mode,c,r);return c.reverse&&i.reverse(),i}_positionChanged(t,a){const{caretX:r,caretY:n,options:c}=this,i=Xa[c.position].call(this,t,a);return i!==!1&&(r!==i.x||n!==i.y)}}g1(v7,"positioners",Xa);var zY={id:"tooltip",_element:v7,positioners:Xa,afterInit(e,t,a){a&&(e.tooltip=new v7({chart:e,options:a}))},beforeUpdate(e,t,a){e.tooltip&&e.tooltip.initialize(a)},reset(e,t,a){e.tooltip&&e.tooltip.initialize(a)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const a={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...a,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",a)}},afterEvent(e,t){if(e.tooltip){const a=t.replay;e.tooltip.handleEvent(t.event,a,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Zy},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},wY=Object.freeze({__proto__:null,Colors:Oj,Decimation:Rj,Filler:iY,Legend:dY,SubTitle:pY,Title:mY,Tooltip:zY});const _Y=(e,t,a,r)=>(typeof t=="string"?(a=e.push(t)-1,r.unshift({index:a,label:t})):isNaN(t)&&(a=null),a);function kY(e,t,a,r){const n=e.indexOf(t);if(n===-1)return _Y(e,t,a,r);const c=e.lastIndexOf(t);return n!==c?a:n}const HY=(e,t)=>e===null?null:Ne(Math.round(e),0,t);function eh(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class g7 extends d6{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const a=this._addedLabels;if(a.length){const r=this.getLabels();for(const{index:n,label:c}of a)r[n]===c&&r.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,a){if(x2(t))return null;const r=this.getLabels();return a=isFinite(a)&&r[a]===t?a:kY(r,t,a2(a,t),this._addedLabels),HY(a,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:a}=this.getUserBounds();let{min:r,max:n}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),a||(n=this.getLabels().length-1)),this.min=r,this.max=n}buildTicks(){const t=this.min,a=this.max,r=this.options.offset,n=[];let c=this.getLabels();c=t===0&&a===c.length-1?c:c.slice(t,a+1),this._valueRange=Math.max(c.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let i=t;i<=a;i++)n.push({value:i});return n}getLabelForValue(t){return eh.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const a=this.ticks;return t<0||t>a.length-1?null:this.getPixelForValue(a[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}g1(g7,"id","category"),g1(g7,"defaults",{ticks:{callback:eh}});function VY(e,t){const a=[],{bounds:n,step:c,min:i,max:s,precision:l,count:f,maxTicks:u,maxDigits:d,includeBounds:h}=e,m=c||1,v=u-1,{min:p,max:g}=t,y=!x2(i),x=!x2(s),C=!x2(f),b=(g-p)/(d+1);let M=Xu((g-p)/v/m)*m,w,z,H,A;if(M<1e-14&&!y&&!x)return[{value:p},{value:g}];A=Math.ceil(g/M)-Math.floor(p/M),A>v&&(M=Xu(A*M/v/m)*m),x2(l)||(w=Math.pow(10,l),M=Math.ceil(M*w)/w),n==="ticks"?(z=Math.floor(p/M)*M,H=Math.ceil(g/M)*M):(z=p,H=g),y&&x&&c&&CU((s-i)/c,M/1e3)?(A=Math.round(Math.min((s-i)/M,u)),M=(s-i)/A,z=i,H=s):C?(z=y?i:z,H=x?s:H,A=f-1,M=(H-z)/A):(A=(H-z)/M,ur(A,Math.round(A),M/1e3)?A=Math.round(A):A=Math.ceil(A));const V=Math.max(Ku(M),Ku(z));w=Math.pow(10,x2(l)?V:l),z=Math.round(z*w)/w,H=Math.round(H*w)/w;let k=0;for(y&&(h&&z!==i?(a.push({value:i}),z<i&&k++,ur(Math.round((z+k*M)*w)/w,i,th(i,b,e))&&k++):z<i&&k++);k<A;++k){const _=Math.round((z+k*M)*w)/w;if(x&&_>s)break;a.push({value:_})}return x&&h&&H!==s?a.length&&ur(a[a.length-1].value,s,th(s,b,e))?a[a.length-1].value=s:a.push({value:s}):(!x||H===s)&&a.push({value:H}),a}function th(e,t,{horizontal:a,minRotation:r}){const n=n4(r),c=(a?Math.sin(n):Math.cos(n))||.001,i=.75*t*(""+e).length;return Math.min(t/c,i)}class Tc extends d6{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,a){return x2(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:a,maxDefined:r}=this.getUserBounds();let{min:n,max:c}=this;const i=l=>n=a?n:l,s=l=>c=r?c:l;if(t){const l=O4(n),f=O4(c);l<0&&f<0?s(0):l>0&&f>0&&i(0)}if(n===c){let l=c===0?1:Math.abs(c*.05);s(c+l),t||i(n-l)}this.min=n,this.max=c}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:a,stepSize:r}=t,n;return r?(n=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),a=a||11),a&&(n=Math.min(a,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,a=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const n={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:a.precision,step:a.stepSize,count:a.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:a.minRotation||0,includeBounds:a.includeBounds!==!1},c=this._range||this,i=VY(n,c);return t.bounds==="ticks"&&oy(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}configure(){const t=this.ticks;let a=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const n=(r-a)/Math.max(t.length-1,1)/2;a-=n,r+=n}this._startValue=a,this._endValue=r,this._valueRange=r-a}getLabelForValue(t){return kn(t,this.chart.options.locale,this.options.ticks.format)}}class y7 extends Tc{determineDataLimits(){const{min:t,max:a}=this.getMinMax(!0);this.min=se(t)?t:0,this.max=se(a)?a:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),a=t?this.width:this.height,r=n4(this.options.ticks.minRotation),n=(t?Math.sin(r):Math.cos(r))||.001,c=this._resolveTickFontOptions(0);return Math.ceil(a/Math.min(40,c.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}g1(y7,"id","linear"),g1(y7,"defaults",{ticks:{callback:w5.formatters.numeric}});const Gr=e=>Math.floor(jt(e)),L0=(e,t)=>Math.pow(10,Gr(e)+t);function ah(e){return e/Math.pow(10,Gr(e))===1}function rh(e,t,a){const r=Math.pow(10,a),n=Math.floor(e/r);return Math.ceil(t/r)-n}function LY(e,t){const a=t-e;let r=Gr(a);for(;rh(e,t,r)>10;)r++;for(;rh(e,t,r)<10;)r--;return Math.min(r,Gr(e))}function SY(e,{min:t,max:a}){t=x3(e.min,t);const r=[],n=Gr(t);let c=LY(t,a),i=c<0?Math.pow(10,Math.abs(c)):1;const s=Math.pow(10,c),l=n>c?Math.pow(10,n):0,f=Math.round((t-l)*i)/i,u=Math.floor((t-l)/s/10)*s*10;let d=Math.floor((f-u)/Math.pow(10,c)),h=x3(e.min,Math.round((l+u+d*Math.pow(10,c))*i)/i);for(;h<a;)r.push({value:h,major:ah(h),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(c++,d=2,i=c>=0?1:i),h=Math.round((l+u+d*Math.pow(10,c))*i)/i;const m=x3(e.max,h);return r.push({value:m,major:ah(m),significand:d}),r}class x7 extends d6{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,a){const r=Tc.prototype.parse.apply(this,[t,a]);if(r===0){this._zero=!0;return}return se(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:a}=this.getMinMax(!0);this.min=se(t)?Math.max(0,t):null,this.max=se(a)?Math.max(0,a):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!se(this._userMin)&&(this.min=t===L0(this.min,0)?L0(this.min,-1):L0(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:a}=this.getUserBounds();let r=this.min,n=this.max;const c=s=>r=t?r:s,i=s=>n=a?n:s;r===n&&(r<=0?(c(1),i(10)):(c(L0(r,-1)),i(L0(n,1)))),r<=0&&c(L0(n,-1)),n<=0&&i(L0(r,1)),this.min=r,this.max=n}buildTicks(){const t=this.options,a={min:this._userMin,max:this._userMax},r=SY(a,this);return t.bounds==="ticks"&&oy(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":kn(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=jt(t),this._valueRange=jt(this.max)-jt(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(jt(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const a=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+a*this._valueRange)}}g1(x7,"id","logarithmic"),g1(x7,"defaults",{ticks:{callback:w5.formatters.logarithmic,major:{enabled:!0}}});function b7(e){const t=e.ticks;if(t.display&&e.display){const a=t3(t.backdropPadding);return a2(t.font&&t.font.size,K2.font.size)+a.height}return 0}function AY(e,t,a){return a=R2(a)?a:[a],{w:BU(e,t.string,a),h:a.length*t.lineHeight}}function nh(e,t,a,r,n){return e===r||e===n?{start:t-a/2,end:t+a/2}:e<r||e>n?{start:t-a,end:t}:{start:t,end:t+a}}function TY(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},a=Object.assign({},t),r=[],n=[],c=e._pointLabels.length,i=e.options.pointLabels,s=i.centerPointLabels?U2/c:0;for(let l=0;l<c;l++){const f=i.setContext(e.getPointLabelContext(l));n[l]=f.padding;const u=e.getPointPosition(l,e.drawingArea+n[l],s),d=Ve(f.font),h=AY(e.ctx,d,e._pointLabels[l]);r[l]=h;const m=b3(e.getIndexAngle(l)+s),v=Math.round(rl(m)),p=nh(v,u.x,h.w,0,180),g=nh(v,u.y,h.h,90,270);EY(a,t,m,p,g)}e.setCenterPoint(t.l-a.l,a.r-t.r,t.t-a.t,a.b-t.b),e._pointLabelItems=OY(e,r,n)}function EY(e,t,a,r,n){const c=Math.abs(Math.sin(a)),i=Math.abs(Math.cos(a));let s=0,l=0;r.start<t.l?(s=(t.l-r.start)/c,e.l=Math.min(e.l,t.l-s)):r.end>t.r&&(s=(r.end-t.r)/c,e.r=Math.max(e.r,t.r+s)),n.start<t.t?(l=(t.t-n.start)/i,e.t=Math.min(e.t,t.t-l)):n.end>t.b&&(l=(n.end-t.b)/i,e.b=Math.max(e.b,t.b+l))}function NY(e,t,a){const r=e.drawingArea,{extra:n,additionalAngle:c,padding:i,size:s}=a,l=e.getPointPosition(t,r+n+i,c),f=Math.round(rl(b3(l.angle+pe))),u=FY(l.y,s.h,f),d=PY(f),h=BY(l.x,s.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:h,top:u,right:h+s.w,bottom:u+s.h}}function DY(e,t){if(!t)return!0;const{left:a,top:r,right:n,bottom:c}=e;return!(ft({x:a,y:r},t)||ft({x:a,y:c},t)||ft({x:n,y:r},t)||ft({x:n,y:c},t))}function OY(e,t,a){const r=[],n=e._pointLabels.length,c=e.options,{centerPointLabels:i,display:s}=c.pointLabels,l={extra:b7(c)/2,additionalAngle:i?U2/n:0};let f;for(let u=0;u<n;u++){l.padding=a[u],l.size=t[u];const d=NY(e,u,l);r.push(d),s==="auto"&&(d.visible=DY(d,f),d.visible&&(f=d))}return r}function PY(e){return e===0||e===180?"center":e<180?"left":"right"}function BY(e,t,a){return a==="right"?e-=t:a==="center"&&(e-=t/2),e}function FY(e,t,a){return a===90||a===270?e-=t/2:(a>270||a<90)&&(e-=t),e}function RY(e,t,a){const{left:r,top:n,right:c,bottom:i}=a,{backdropColor:s}=t;if(!x2(s)){const l=j0(t.borderRadius),f=t3(t.backdropPadding);e.fillStyle=s;const u=r-f.left,d=n-f.top,h=c-r+f.width,m=i-n+f.height;Object.values(l).some(v=>v!==0)?(e.beginPath(),jr(e,{x:u,y:d,w:h,h:m,radius:l}),e.fill()):e.fillRect(u,d,h,m)}}function IY(e,t){const{ctx:a,options:{pointLabels:r}}=e;for(let n=t-1;n>=0;n--){const c=e._pointLabelItems[n];if(!c.visible)continue;const i=r.setContext(e.getPointLabelContext(n));RY(a,i,c);const s=Ve(i.font),{x:l,y:f,textAlign:u}=c;r6(a,e._pointLabels[n],l,f+s.lineHeight/2,s,{color:i.color,textAlign:u,textBaseline:"middle"})}}function Qy(e,t,a,r){const{ctx:n}=e;if(a)n.arc(e.xCenter,e.yCenter,t,0,$2);else{let c=e.getPointPosition(0,t);n.moveTo(c.x,c.y);for(let i=1;i<r;i++)c=e.getPointPosition(i,t),n.lineTo(c.x,c.y)}}function $Y(e,t,a,r,n){const c=e.ctx,i=t.circular,{color:s,lineWidth:l}=t;!i&&!r||!s||!l||a<0||(c.save(),c.strokeStyle=s,c.lineWidth=l,c.setLineDash(n.dash||[]),c.lineDashOffset=n.dashOffset,c.beginPath(),Qy(e,a,i,r),c.closePath(),c.stroke(),c.restore())}function UY(e,t,a){return v0(e,{label:a,index:t,type:"pointLabel"})}class Ka extends Tc{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=t3(b7(this.options)/2),a=this.width=this.maxWidth-t.width,r=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+a/2+t.left),this.yCenter=Math.floor(this.top+r/2+t.top),this.drawingArea=Math.floor(Math.min(a,r)/2)}determineDataLimits(){const{min:t,max:a}=this.getMinMax(!1);this.min=se(t)&&!isNaN(t)?t:0,this.max=se(a)&&!isNaN(a)?a:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/b7(this.options))}generateTickLabels(t){Tc.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((a,r)=>{const n=E2(this.options.pointLabels.callback,[a,r],this);return n||n===0?n:""}).filter((a,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?TY(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,a,r,n){this.xCenter+=Math.floor((t-a)/2),this.yCenter+=Math.floor((r-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,a,r,n))}getIndexAngle(t){const a=$2/(this._pointLabels.length||1),r=this.options.startAngle||0;return b3(t*a+n4(r))}getDistanceFromCenterForValue(t){if(x2(t))return NaN;const a=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*a:(t-this.min)*a}getValueForDistanceFromCenter(t){if(x2(t))return NaN;const a=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-a:this.min+a}getPointLabelContext(t){const a=this._pointLabels||[];if(t>=0&&t<a.length){const r=a[t];return UY(this.getContext(),t,r)}}getPointPosition(t,a,r=0){const n=this.getIndexAngle(t)-pe+r;return{x:Math.cos(n)*a+this.xCenter,y:Math.sin(n)*a+this.yCenter,angle:n}}getPointPositionForValue(t,a){return this.getPointPosition(t,this.getDistanceFromCenterForValue(a))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:a,top:r,right:n,bottom:c}=this._pointLabelItems[t];return{left:a,top:r,right:n,bottom:c}}drawBackground(){const{backgroundColor:t,grid:{circular:a}}=this.options;if(t){const r=this.ctx;r.save(),r.beginPath(),Qy(this,this.getDistanceFromCenterForValue(this._endValue),a,this._pointLabels.length),r.closePath(),r.fillStyle=t,r.fill(),r.restore()}}drawGrid(){const t=this.ctx,a=this.options,{angleLines:r,grid:n,border:c}=a,i=this._pointLabels.length;let s,l,f;if(a.pointLabels.display&&IY(this,i),n.display&&this.ticks.forEach((u,d)=>{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(u.value);const h=this.getContext(d),m=n.setContext(h),v=c.setContext(h);$Y(this,m,l,i,v)}}),r.display){for(t.save(),s=i-1;s>=0;s--){const u=r.setContext(this.getPointLabelContext(s)),{color:d,lineWidth:h}=u;!h||!d||(t.lineWidth=h,t.strokeStyle=d,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(a.reverse?this.min:this.max),f=this.getPointPosition(s,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(f.x,f.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,a=this.options,r=a.ticks;if(!r.display)return;const n=this.getIndexAngle(0);let c,i;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((s,l)=>{if(l===0&&this.min>=0&&!a.reverse)return;const f=r.setContext(this.getContext(l)),u=Ve(f.font);if(c=this.getDistanceFromCenterForValue(this.ticks[l].value),f.showLabelBackdrop){t.font=u.string,i=t.measureText(s.label).width,t.fillStyle=f.backdropColor;const d=t3(f.backdropPadding);t.fillRect(-i/2-d.left,-c-u.size/2-d.top,i+d.width,u.size+d.height)}r6(t,s.label,0,-c,u,{color:f.color,strokeColor:f.textStrokeColor,strokeWidth:f.textStrokeWidth})}),t.restore()}drawTitle(){}}g1(Ka,"id","radialLinear"),g1(Ka,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:w5.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),g1(Ka,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),g1(Ka,"descriptors",{angleLines:{_fallback:"grid"}});const V5={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},g3=Object.keys(V5);function ch(e,t){return e-t}function ih(e,t){if(x2(t))return null;const a=e._adapter,{parser:r,round:n,isoWeekday:c}=e._parseOpts;let i=t;return typeof r=="function"&&(i=r(i)),se(i)||(i=typeof r=="string"?a.parse(i,r):a.parse(i)),i===null?null:(n&&(i=n==="week"&&(K6(c)||c===!0)?a.startOf(i,"isoWeek",c):a.startOf(i,n)),+i)}function sh(e,t,a,r){const n=g3.length;for(let c=g3.indexOf(e);c<n-1;++c){const i=V5[g3[c]],s=i.steps?i.steps:Number.MAX_SAFE_INTEGER;if(i.common&&Math.ceil((a-t)/(s*i.size))<=r)return g3[c]}return g3[n-1]}function WY(e,t,a,r,n){for(let c=g3.length-1;c>=g3.indexOf(a);c--){const i=g3[c];if(V5[i].common&&e._adapter.diff(n,r,i)>=t-1)return i}return g3[a?g3.indexOf(a):0]}function qY(e){for(let t=g3.indexOf(e)+1,a=g3.length;t<a;++t)if(V5[g3[t]].common)return g3[t]}function oh(e,t,a){if(!a)e[t]=!0;else if(a.length){const{lo:r,hi:n}=nl(a,t),c=a[r]>=t?a[r]:a[n];e[c]=!0}}function jY(e,t,a,r){const n=e._adapter,c=+n.startOf(t[0].value,r),i=t[t.length-1].value;let s,l;for(s=c;s<=i;s=+n.add(s,1,r))l=a[s],l>=0&&(t[l].major=!0);return t}function lh(e,t,a){const r=[],n={},c=t.length;let i,s;for(i=0;i<c;++i)s=t[i],n[s]=i,r.push({value:s,major:!1});return c===0||!a?r:jY(e,r,n,a)}class Xr extends d6{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,a={}){const r=t.time||(t.time={}),n=this._adapter=new eq._date(t.adapters.date);n.init(a),fr(r.displayFormats,n.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=a.normalized}parse(t,a){return t===void 0?null:ih(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,a=this._adapter,r=t.time.unit||"day";let{min:n,max:c,minDefined:i,maxDefined:s}=this.getUserBounds();function l(f){!i&&!isNaN(f.min)&&(n=Math.min(n,f.min)),!s&&!isNaN(f.max)&&(c=Math.max(c,f.max))}(!i||!s)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),n=se(n)&&!isNaN(n)?n:+a.startOf(Date.now(),r),c=se(c)&&!isNaN(c)?c:+a.endOf(Date.now(),r)+1,this.min=Math.min(n,c-1),this.max=Math.max(n+1,c)}_getLabelBounds(){const t=this.getLabelTimestamps();let a=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(a=t[0],r=t[t.length-1]),{min:a,max:r}}buildTicks(){const t=this.options,a=t.time,r=t.ticks,n=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const c=this.min,i=this.max,s=_U(n,c,i);return this._unit=a.unit||(r.autoSkip?sh(a.minUnit,this.min,this.max,this._getLabelCapacity(c)):WY(this,s.length,a.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:qY(this._unit),this.initOffsets(n),t.reverse&&s.reverse(),lh(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let a=0,r=0,n,c;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?a=1-n:a=(this.getDecimalForValue(t[1])-n)/2,c=this.getDecimalForValue(t[t.length-1]),t.length===1?r=c:r=(c-this.getDecimalForValue(t[t.length-2]))/2);const i=t.length<3?.5:.25;a=Ne(a,0,i),r=Ne(r,0,i),this._offsets={start:a,end:r,factor:1/(a+1+r)}}_generate(){const t=this._adapter,a=this.min,r=this.max,n=this.options,c=n.time,i=c.unit||sh(c.minUnit,a,r,this._getLabelCapacity(a)),s=a2(n.ticks.stepSize,1),l=i==="week"?c.isoWeekday:!1,f=K6(l)||l===!0,u={};let d=a,h,m;if(f&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,f?"day":i),t.diff(r,a,i)>1e5*s)throw new Error(a+" and "+r+" are too far apart with stepSize of "+s+" "+i);const v=n.ticks.source==="data"&&this.getDataTimestamps();for(h=d,m=0;h<r;h=+t.add(h,s,i),m++)oh(u,h,v);return(h===r||n.bounds==="ticks"||m===1)&&oh(u,h,v),Object.keys(u).sort(ch).map(p=>+p)}getLabelForValue(t){const a=this._adapter,r=this.options.time;return r.tooltipFormat?a.format(t,r.tooltipFormat):a.format(t,r.displayFormats.datetime)}format(t,a){const n=this.options.time.displayFormats,c=this._unit,i=a||n[c];return this._adapter.format(t,i)}_tickFormatFunction(t,a,r,n){const c=this.options,i=c.ticks.callback;if(i)return E2(i,[t,a,r],this);const s=c.time.displayFormats,l=this._unit,f=this._majorUnit,u=l&&s[l],d=f&&s[f],h=r[a],m=f&&d&&h&&h.major;return this._adapter.format(t,n||(m?d:u))}generateTickLabels(t){let a,r,n;for(a=0,r=t.length;a<r;++a)n=t[a],n.label=this._tickFormatFunction(n.value,a,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const a=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((a.start+r)*a.factor)}getValueForPixel(t){const a=this._offsets,r=this.getDecimalForPixel(t)/a.factor-a.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const a=this.options.ticks,r=this.ctx.measureText(t).width,n=n4(this.isHorizontal()?a.maxRotation:a.minRotation),c=Math.cos(n),i=Math.sin(n),s=this._resolveTickFontOptions(0).size;return{w:r*c+s*i,h:r*i+s*c}}_getLabelCapacity(t){const a=this.options.time,r=a.displayFormats,n=r[a.unit]||r.millisecond,c=this._tickFormatFunction(t,0,lh(this,[t],this._majorUnit),n),i=this._getLabelSize(c),s=Math.floor(this.isHorizontal()?this.width/i.w:this.height/i.h)-1;return s>0?s:1}getDataTimestamps(){let t=this._cache.data||[],a,r;if(t.length)return t;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(a=0,r=n.length;a<r;++a)t=t.concat(n[a].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let a,r;if(t.length)return t;const n=this.getLabels();for(a=0,r=n.length;a<r;++a)t.push(ih(this,n[a]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return uy(t.sort(ch))}}g1(Xr,"id","time"),g1(Xr,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function C8(e,t,a){let r=0,n=e.length-1,c,i,s,l;a?(t>=e[r].pos&&t<=e[n].pos&&({lo:r,hi:n}=lt(e,"pos",t)),{pos:c,time:s}=e[r],{pos:i,time:l}=e[n]):(t>=e[r].time&&t<=e[n].time&&({lo:r,hi:n}=lt(e,"time",t)),{time:c,pos:s}=e[r],{time:i,pos:l}=e[n]);const f=i-c;return f?s+(l-s)*(t-c)/f:s}class C7 extends Xr{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),a=this._table=this.buildLookupTable(t);this._minPos=C8(a,this.min),this._tableRange=C8(a,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:a,max:r}=this,n=[],c=[];let i,s,l,f,u;for(i=0,s=t.length;i<s;++i)f=t[i],f>=a&&f<=r&&n.push(f);if(n.length<2)return[{time:a,pos:0},{time:r,pos:1}];for(i=0,s=n.length;i<s;++i)u=n[i+1],l=n[i-1],f=n[i],Math.round((u+l)/2)!==f&&c.push({time:f,pos:i/(s-1)});return c}_generate(){const t=this.min,a=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(a)||r.length===1)&&r.push(a),r.sort((n,c)=>n-c)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const a=this.getDataTimestamps(),r=this.getLabelTimestamps();return a.length&&r.length?t=this.normalize(a.concat(r)):t=a.length?a:r,t=this._cache.all=t,t}getDecimalForValue(t){return(C8(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const a=this._offsets,r=this.getDecimalForPixel(t)/a.factor-a.end;return C8(this._table,r*this._tableRange+this._minPos,!0)}}g1(C7,"id","timeseries"),g1(C7,"defaults",Xr.defaults);var YY=Object.freeze({__proto__:null,CategoryScale:g7,LinearScale:y7,LogarithmicScale:x7,RadialLinearScale:Ka,TimeScale:Xr,TimeSeriesScale:C7});const Jy=[JW,Lj,wY,YY];var GY=typeof global=="object"&&global&&global.Object===Object&&global;const ex=GY;var XY=typeof self=="object"&&self&&self.Object===Object&&self,KY=ex||XY||Function("return this")();const q4=KY;var ZY=q4.Symbol;const d0=ZY;var tx=Object.prototype,QY=tx.hasOwnProperty,JY=tx.toString,Oa=d0?d0.toStringTag:void 0;function eG(e){var t=QY.call(e,Oa),a=e[Oa];try{e[Oa]=void 0;var r=!0}catch{}var n=JY.call(e);return r&&(t?e[Oa]=a:delete e[Oa]),n}var tG=Object.prototype,aG=tG.toString;function rG(e){return aG.call(e)}var nG="[object Null]",cG="[object Undefined]",fh=d0?d0.toStringTag:void 0;function Vn(e){return e==null?e===void 0?cG:nG:fh&&fh in Object(e)?eG(e):rG(e)}function n6(e){return e!=null&&typeof e=="object"}var iG=Array.isArray;const J6=iG;function Ln(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var sG="[object AsyncFunction]",oG="[object Function]",lG="[object GeneratorFunction]",fG="[object Proxy]";function ax(e){if(!Ln(e))return!1;var t=Vn(e);return t==oG||t==lG||t==sG||t==fG}var uG=q4["__core-js_shared__"];const Xi=uG;var uh=function(){var e=/[^.]+$/.exec(Xi&&Xi.keys&&Xi.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function dG(e){return!!uh&&uh in e}var hG=Function.prototype,mG=hG.toString;function h6(e){if(e!=null){try{return mG.call(e)}catch{}try{return e+""}catch{}}return""}var pG=/[\\^$.*+?()[\]{}|]/g,vG=/^\[object .+?Constructor\]$/,gG=Function.prototype,yG=Object.prototype,xG=gG.toString,bG=yG.hasOwnProperty,CG=RegExp("^"+xG.call(bG).replace(pG,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function MG(e){if(!Ln(e)||dG(e))return!1;var t=ax(e)?CG:vG;return t.test(h6(e))}function zG(e,t){return e==null?void 0:e[t]}function m6(e,t){var a=zG(e,t);return MG(a)?a:void 0}var wG=m6(q4,"WeakMap");const M7=wG;var dh=Object.create,_G=function(){function e(){}return function(t){if(!Ln(t))return{};if(dh)return dh(t);e.prototype=t;var a=new e;return e.prototype=void 0,a}}();const kG=_G;function HG(e,t){var a=-1,r=e.length;for(t||(t=Array(r));++a<r;)t[a]=e[a];return t}var VG=function(){try{var e=m6(Object,"defineProperty");return e({},"",{}),e}catch{}}();const hh=VG;function LG(e,t){for(var a=-1,r=e==null?0:e.length;++a<r&&t(e[a],a,e)!==!1;);return e}var SG=9007199254740991,AG=/^(?:0|[1-9]\d*)$/;function TG(e,t){var a=typeof e;return t=t??SG,!!t&&(a=="number"||a!="symbol"&&AG.test(e))&&e>-1&&e%1==0&&e<t}function rx(e,t,a){t=="__proto__"&&hh?hh(e,t,{configurable:!0,enumerable:!0,value:a,writable:!0}):e[t]=a}function vl(e,t){return e===t||e!==e&&t!==t}var EG=Object.prototype,NG=EG.hasOwnProperty;function nx(e,t,a){var r=e[t];(!(NG.call(e,t)&&vl(r,a))||a===void 0&&!(t in e))&&rx(e,t,a)}function L5(e,t,a,r){var n=!a;a||(a={});for(var c=-1,i=t.length;++c<i;){var s=t[c],l=r?r(a[s],e[s],s,a,e):void 0;l===void 0&&(l=e[s]),n?rx(a,s,l):nx(a,s,l)}return a}var DG=9007199254740991;function cx(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=DG}function gl(e){return e!=null&&cx(e.length)&&!ax(e)}var OG=Object.prototype;function S5(e){var t=e&&e.constructor,a=typeof t=="function"&&t.prototype||OG;return e===a}function PG(e,t){for(var a=-1,r=Array(e);++a<e;)r[a]=t(a);return r}var BG="[object Arguments]";function mh(e){return n6(e)&&Vn(e)==BG}var ix=Object.prototype,FG=ix.hasOwnProperty,RG=ix.propertyIsEnumerable,IG=mh(function(){return arguments}())?mh:function(e){return n6(e)&&FG.call(e,"callee")&&!RG.call(e,"callee")};const sx=IG;function $G(){return!1}var ox=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ph=ox&&typeof module=="object"&&module&&!module.nodeType&&module,UG=ph&&ph.exports===ox,vh=UG?q4.Buffer:void 0,WG=vh?vh.isBuffer:void 0,qG=WG||$G;const Kr=qG;var jG="[object Arguments]",YG="[object Array]",GG="[object Boolean]",XG="[object Date]",KG="[object Error]",ZG="[object Function]",QG="[object Map]",JG="[object Number]",eX="[object Object]",tX="[object RegExp]",aX="[object Set]",rX="[object String]",nX="[object WeakMap]",cX="[object ArrayBuffer]",iX="[object DataView]",sX="[object Float32Array]",oX="[object Float64Array]",lX="[object Int8Array]",fX="[object Int16Array]",uX="[object Int32Array]",dX="[object Uint8Array]",hX="[object Uint8ClampedArray]",mX="[object Uint16Array]",pX="[object Uint32Array]",B2={};B2[sX]=B2[oX]=B2[lX]=B2[fX]=B2[uX]=B2[dX]=B2[hX]=B2[mX]=B2[pX]=!0;B2[jG]=B2[YG]=B2[cX]=B2[GG]=B2[iX]=B2[XG]=B2[KG]=B2[ZG]=B2[QG]=B2[JG]=B2[eX]=B2[tX]=B2[aX]=B2[rX]=B2[nX]=!1;function vX(e){return n6(e)&&cx(e.length)&&!!B2[Vn(e)]}function yl(e){return function(t){return e(t)}}var lx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,pr=lx&&typeof module=="object"&&module&&!module.nodeType&&module,gX=pr&&pr.exports===lx,Ki=gX&&ex.process,yX=function(){try{var e=pr&&pr.require&&pr.require("util").types;return e||Ki&&Ki.binding&&Ki.binding("util")}catch{}}();const ea=yX;var gh=ea&&ea.isTypedArray,xX=gh?yl(gh):vX;const xl=xX;var bX=Object.prototype,CX=bX.hasOwnProperty;function fx(e,t){var a=J6(e),r=!a&&sx(e),n=!a&&!r&&Kr(e),c=!a&&!r&&!n&&xl(e),i=a||r||n||c,s=i?PG(e.length,String):[],l=s.length;for(var f in e)(t||CX.call(e,f))&&!(i&&(f=="length"||n&&(f=="offset"||f=="parent")||c&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||TG(f,l)))&&s.push(f);return s}function ux(e,t){return function(a){return e(t(a))}}var MX=ux(Object.keys,Object);const zX=MX;var wX=Object.prototype,_X=wX.hasOwnProperty;function dx(e){if(!S5(e))return zX(e);var t=[];for(var a in Object(e))_X.call(e,a)&&a!="constructor"&&t.push(a);return t}function bl(e){return gl(e)?fx(e):dx(e)}function kX(e){var t=[];if(e!=null)for(var a in Object(e))t.push(a);return t}var HX=Object.prototype,VX=HX.hasOwnProperty;function LX(e){if(!Ln(e))return kX(e);var t=S5(e),a=[];for(var r in e)r=="constructor"&&(t||!VX.call(e,r))||a.push(r);return a}function Cl(e){return gl(e)?fx(e,!0):LX(e)}var SX=m6(Object,"create");const Zr=SX;function AX(){this.__data__=Zr?Zr(null):{},this.size=0}function TX(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var EX="__lodash_hash_undefined__",NX=Object.prototype,DX=NX.hasOwnProperty;function OX(e){var t=this.__data__;if(Zr){var a=t[e];return a===EX?void 0:a}return DX.call(t,e)?t[e]:void 0}var PX=Object.prototype,BX=PX.hasOwnProperty;function FX(e){var t=this.__data__;return Zr?t[e]!==void 0:BX.call(t,e)}var RX="__lodash_hash_undefined__";function IX(e,t){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=Zr&&t===void 0?RX:t,this}function c6(e){var t=-1,a=e==null?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}c6.prototype.clear=AX;c6.prototype.delete=TX;c6.prototype.get=OX;c6.prototype.has=FX;c6.prototype.set=IX;function $X(){this.__data__=[],this.size=0}function A5(e,t){for(var a=e.length;a--;)if(vl(e[a][0],t))return a;return-1}var UX=Array.prototype,WX=UX.splice;function qX(e){var t=this.__data__,a=A5(t,e);if(a<0)return!1;var r=t.length-1;return a==r?t.pop():WX.call(t,a,1),--this.size,!0}function jX(e){var t=this.__data__,a=A5(t,e);return a<0?void 0:t[a][1]}function YX(e){return A5(this.__data__,e)>-1}function GX(e,t){var a=this.__data__,r=A5(a,e);return r<0?(++this.size,a.push([e,t])):a[r][1]=t,this}function St(e){var t=-1,a=e==null?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}St.prototype.clear=$X;St.prototype.delete=qX;St.prototype.get=jX;St.prototype.has=YX;St.prototype.set=GX;var XX=m6(q4,"Map");const Qr=XX;function KX(){this.size=0,this.__data__={hash:new c6,map:new(Qr||St),string:new c6}}function ZX(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function T5(e,t){var a=e.__data__;return ZX(t)?a[typeof t=="string"?"string":"hash"]:a.map}function QX(e){var t=T5(this,e).delete(e);return this.size-=t?1:0,t}function JX(e){return T5(this,e).get(e)}function eK(e){return T5(this,e).has(e)}function tK(e,t){var a=T5(this,e),r=a.size;return a.set(e,t),this.size+=a.size==r?0:1,this}function p6(e){var t=-1,a=e==null?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}p6.prototype.clear=KX;p6.prototype.delete=QX;p6.prototype.get=JX;p6.prototype.has=eK;p6.prototype.set=tK;function hx(e,t){for(var a=-1,r=t.length,n=e.length;++a<r;)e[n+a]=t[a];return e}var aK=ux(Object.getPrototypeOf,Object);const mx=aK;function rK(){this.__data__=new St,this.size=0}function nK(e){var t=this.__data__,a=t.delete(e);return this.size=t.size,a}function cK(e){return this.__data__.get(e)}function iK(e){return this.__data__.has(e)}var sK=200;function oK(e,t){var a=this.__data__;if(a instanceof St){var r=a.__data__;if(!Qr||r.length<sK-1)return r.push([e,t]),this.size=++a.size,this;a=this.__data__=new p6(r)}return a.set(e,t),this.size=a.size,this}function gt(e){var t=this.__data__=new St(e);this.size=t.size}gt.prototype.clear=rK;gt.prototype.delete=nK;gt.prototype.get=cK;gt.prototype.has=iK;gt.prototype.set=oK;function lK(e,t){return e&&L5(t,bl(t),e)}function fK(e,t){return e&&L5(t,Cl(t),e)}var px=typeof exports=="object"&&exports&&!exports.nodeType&&exports,yh=px&&typeof module=="object"&&module&&!module.nodeType&&module,uK=yh&&yh.exports===px,xh=uK?q4.Buffer:void 0,bh=xh?xh.allocUnsafe:void 0;function dK(e,t){if(t)return e.slice();var a=e.length,r=bh?bh(a):new e.constructor(a);return e.copy(r),r}function hK(e,t){for(var a=-1,r=e==null?0:e.length,n=0,c=[];++a<r;){var i=e[a];t(i,a,e)&&(c[n++]=i)}return c}function vx(){return[]}var mK=Object.prototype,pK=mK.propertyIsEnumerable,Ch=Object.getOwnPropertySymbols,vK=Ch?function(e){return e==null?[]:(e=Object(e),hK(Ch(e),function(t){return pK.call(e,t)}))}:vx;const Ml=vK;function gK(e,t){return L5(e,Ml(e),t)}var yK=Object.getOwnPropertySymbols,xK=yK?function(e){for(var t=[];e;)hx(t,Ml(e)),e=mx(e);return t}:vx;const gx=xK;function bK(e,t){return L5(e,gx(e),t)}function yx(e,t,a){var r=t(e);return J6(e)?r:hx(r,a(e))}function z7(e){return yx(e,bl,Ml)}function CK(e){return yx(e,Cl,gx)}var MK=m6(q4,"DataView");const w7=MK;var zK=m6(q4,"Promise");const _7=zK;var wK=m6(q4,"Set");const k7=wK;var Mh="[object Map]",_K="[object Object]",zh="[object Promise]",wh="[object Set]",_h="[object WeakMap]",kh="[object DataView]",kK=h6(w7),HK=h6(Qr),VK=h6(_7),LK=h6(k7),SK=h6(M7),N0=Vn;(w7&&N0(new w7(new ArrayBuffer(1)))!=kh||Qr&&N0(new Qr)!=Mh||_7&&N0(_7.resolve())!=zh||k7&&N0(new k7)!=wh||M7&&N0(new M7)!=_h)&&(N0=function(e){var t=Vn(e),a=t==_K?e.constructor:void 0,r=a?h6(a):"";if(r)switch(r){case kK:return kh;case HK:return Mh;case VK:return zh;case LK:return wh;case SK:return _h}return t});const ta=N0;var AK=Object.prototype,TK=AK.hasOwnProperty;function EK(e){var t=e.length,a=new e.constructor(t);return t&&typeof e[0]=="string"&&TK.call(e,"index")&&(a.index=e.index,a.input=e.input),a}var NK=q4.Uint8Array;const Ec=NK;function zl(e){var t=new e.constructor(e.byteLength);return new Ec(t).set(new Ec(e)),t}function DK(e,t){var a=t?zl(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.byteLength)}var OK=/\w*$/;function PK(e){var t=new e.constructor(e.source,OK.exec(e));return t.lastIndex=e.lastIndex,t}var Hh=d0?d0.prototype:void 0,Vh=Hh?Hh.valueOf:void 0;function BK(e){return Vh?Object(Vh.call(e)):{}}function FK(e,t){var a=t?zl(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.length)}var RK="[object Boolean]",IK="[object Date]",$K="[object Map]",UK="[object Number]",WK="[object RegExp]",qK="[object Set]",jK="[object String]",YK="[object Symbol]",GK="[object ArrayBuffer]",XK="[object DataView]",KK="[object Float32Array]",ZK="[object Float64Array]",QK="[object Int8Array]",JK="[object Int16Array]",eZ="[object Int32Array]",tZ="[object Uint8Array]",aZ="[object Uint8ClampedArray]",rZ="[object Uint16Array]",nZ="[object Uint32Array]";function cZ(e,t,a){var r=e.constructor;switch(t){case GK:return zl(e);case RK:case IK:return new r(+e);case XK:return DK(e,a);case KK:case ZK:case QK:case JK:case eZ:case tZ:case aZ:case rZ:case nZ:return FK(e,a);case $K:return new r;case UK:case jK:return new r(e);case WK:return PK(e);case qK:return new r;case YK:return BK(e)}}function iZ(e){return typeof e.constructor=="function"&&!S5(e)?kG(mx(e)):{}}var sZ="[object Map]";function oZ(e){return n6(e)&&ta(e)==sZ}var Lh=ea&&ea.isMap,lZ=Lh?yl(Lh):oZ;const fZ=lZ;var uZ="[object Set]";function dZ(e){return n6(e)&&ta(e)==uZ}var Sh=ea&&ea.isSet,hZ=Sh?yl(Sh):dZ;const mZ=hZ;var pZ=1,vZ=2,gZ=4,xx="[object Arguments]",yZ="[object Array]",xZ="[object Boolean]",bZ="[object Date]",CZ="[object Error]",bx="[object Function]",MZ="[object GeneratorFunction]",zZ="[object Map]",wZ="[object Number]",Cx="[object Object]",_Z="[object RegExp]",kZ="[object Set]",HZ="[object String]",VZ="[object Symbol]",LZ="[object WeakMap]",SZ="[object ArrayBuffer]",AZ="[object DataView]",TZ="[object Float32Array]",EZ="[object Float64Array]",NZ="[object Int8Array]",DZ="[object Int16Array]",OZ="[object Int32Array]",PZ="[object Uint8Array]",BZ="[object Uint8ClampedArray]",FZ="[object Uint16Array]",RZ="[object Uint32Array]",T2={};T2[xx]=T2[yZ]=T2[SZ]=T2[AZ]=T2[xZ]=T2[bZ]=T2[TZ]=T2[EZ]=T2[NZ]=T2[DZ]=T2[OZ]=T2[zZ]=T2[wZ]=T2[Cx]=T2[_Z]=T2[kZ]=T2[HZ]=T2[VZ]=T2[PZ]=T2[BZ]=T2[FZ]=T2[RZ]=!0;T2[CZ]=T2[bx]=T2[LZ]=!1;function J8(e,t,a,r,n,c){var i,s=t&pZ,l=t&vZ,f=t&gZ;if(a&&(i=n?a(e,r,n,c):a(e)),i!==void 0)return i;if(!Ln(e))return e;var u=J6(e);if(u){if(i=EK(e),!s)return HG(e,i)}else{var d=ta(e),h=d==bx||d==MZ;if(Kr(e))return dK(e,s);if(d==Cx||d==xx||h&&!n){if(i=l||h?{}:iZ(e),!s)return l?bK(e,fK(i,e)):gK(e,lK(i,e))}else{if(!T2[d])return n?e:{};i=cZ(e,d,s)}}c||(c=new gt);var m=c.get(e);if(m)return m;c.set(e,i),mZ(e)?e.forEach(function(g){i.add(J8(g,t,a,g,e,c))}):fZ(e)&&e.forEach(function(g,y){i.set(y,J8(g,t,a,y,e,c))});var v=f?l?CK:z7:l?Cl:bl,p=u?void 0:v(e);return LG(p||e,function(g,y){p&&(y=g,g=e[y]),nx(i,y,J8(g,t,a,y,e,c))}),i}var IZ=1,$Z=4;function Pa(e){return J8(e,IZ|$Z)}var UZ="__lodash_hash_undefined__";function WZ(e){return this.__data__.set(e,UZ),this}function qZ(e){return this.__data__.has(e)}function Nc(e){var t=-1,a=e==null?0:e.length;for(this.__data__=new p6;++t<a;)this.add(e[t])}Nc.prototype.add=Nc.prototype.push=WZ;Nc.prototype.has=qZ;function jZ(e,t){for(var a=-1,r=e==null?0:e.length;++a<r;)if(t(e[a],a,e))return!0;return!1}function YZ(e,t){return e.has(t)}var GZ=1,XZ=2;function Mx(e,t,a,r,n,c){var i=a&GZ,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var f=c.get(e),u=c.get(t);if(f&&u)return f==t&&u==e;var d=-1,h=!0,m=a&XZ?new Nc:void 0;for(c.set(e,t),c.set(t,e);++d<s;){var v=e[d],p=t[d];if(r)var g=i?r(p,v,d,t,e,c):r(v,p,d,e,t,c);if(g!==void 0){if(g)continue;h=!1;break}if(m){if(!jZ(t,function(y,x){if(!YZ(m,x)&&(v===y||n(v,y,a,r,c)))return m.push(x)})){h=!1;break}}else if(!(v===p||n(v,p,a,r,c))){h=!1;break}}return c.delete(e),c.delete(t),h}function KZ(e){var t=-1,a=Array(e.size);return e.forEach(function(r,n){a[++t]=[n,r]}),a}function ZZ(e){var t=-1,a=Array(e.size);return e.forEach(function(r){a[++t]=r}),a}var QZ=1,JZ=2,eQ="[object Boolean]",tQ="[object Date]",aQ="[object Error]",rQ="[object Map]",nQ="[object Number]",cQ="[object RegExp]",iQ="[object Set]",sQ="[object String]",oQ="[object Symbol]",lQ="[object ArrayBuffer]",fQ="[object DataView]",Ah=d0?d0.prototype:void 0,Zi=Ah?Ah.valueOf:void 0;function uQ(e,t,a,r,n,c,i){switch(a){case fQ:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case lQ:return!(e.byteLength!=t.byteLength||!c(new Ec(e),new Ec(t)));case eQ:case tQ:case nQ:return vl(+e,+t);case aQ:return e.name==t.name&&e.message==t.message;case cQ:case sQ:return e==t+"";case rQ:var s=KZ;case iQ:var l=r&QZ;if(s||(s=ZZ),e.size!=t.size&&!l)return!1;var f=i.get(e);if(f)return f==t;r|=JZ,i.set(e,t);var u=Mx(s(e),s(t),r,n,c,i);return i.delete(e),u;case oQ:if(Zi)return Zi.call(e)==Zi.call(t)}return!1}var dQ=1,hQ=Object.prototype,mQ=hQ.hasOwnProperty;function pQ(e,t,a,r,n,c){var i=a&dQ,s=z7(e),l=s.length,f=z7(t),u=f.length;if(l!=u&&!i)return!1;for(var d=l;d--;){var h=s[d];if(!(i?h in t:mQ.call(t,h)))return!1}var m=c.get(e),v=c.get(t);if(m&&v)return m==t&&v==e;var p=!0;c.set(e,t),c.set(t,e);for(var g=i;++d<l;){h=s[d];var y=e[h],x=t[h];if(r)var C=i?r(x,y,h,t,e,c):r(y,x,h,e,t,c);if(!(C===void 0?y===x||n(y,x,a,r,c):C)){p=!1;break}g||(g=h=="constructor")}if(p&&!g){var b=e.constructor,M=t.constructor;b!=M&&"constructor"in e&&"constructor"in t&&!(typeof b=="function"&&b instanceof b&&typeof M=="function"&&M instanceof M)&&(p=!1)}return c.delete(e),c.delete(t),p}var vQ=1,Th="[object Arguments]",Eh="[object Array]",M8="[object Object]",gQ=Object.prototype,Nh=gQ.hasOwnProperty;function yQ(e,t,a,r,n,c){var i=J6(e),s=J6(t),l=i?Eh:ta(e),f=s?Eh:ta(t);l=l==Th?M8:l,f=f==Th?M8:f;var u=l==M8,d=f==M8,h=l==f;if(h&&Kr(e)){if(!Kr(t))return!1;i=!0,u=!1}if(h&&!u)return c||(c=new gt),i||xl(e)?Mx(e,t,a,r,n,c):uQ(e,t,l,a,r,n,c);if(!(a&vQ)){var m=u&&Nh.call(e,"__wrapped__"),v=d&&Nh.call(t,"__wrapped__");if(m||v){var p=m?e.value():e,g=v?t.value():t;return c||(c=new gt),n(p,g,a,r,c)}}return h?(c||(c=new gt),pQ(e,t,a,r,n,c)):!1}function zx(e,t,a,r,n){return e===t?!0:e==null||t==null||!n6(e)&&!n6(t)?e!==e&&t!==t:yQ(e,t,a,r,zx,n)}var xQ="[object Map]",bQ="[object Set]",CQ=Object.prototype,MQ=CQ.hasOwnProperty;function zQ(e){if(e==null)return!0;if(gl(e)&&(J6(e)||typeof e=="string"||typeof e.splice=="function"||Kr(e)||xl(e)||sx(e)))return!e.length;var t=ta(e);if(t==xQ||t==bQ)return!e.size;if(S5(e))return!dx(e).length;for(var a in e)if(MQ.call(e,a))return!1;return!0}function Dh(e,t){return zx(e,t)}var wQ=Object.defineProperty,_Q=Object.defineProperties,kQ=Object.getOwnPropertyDescriptors,Oh=Object.getOwnPropertySymbols,HQ=Object.prototype.hasOwnProperty,VQ=Object.prototype.propertyIsEnumerable,Ph=(e,t,a)=>t in e?wQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,LQ=(e,t)=>{for(var a in t||(t={}))HQ.call(t,a)&&Ph(e,a,t[a]);if(Oh)for(var a of Oh(t))VQ.call(t,a)&&Ph(e,a,t[a]);return e},SQ=(e,t)=>_Q(e,kQ(t));function AQ(e){return(e.match(/[a-zA-Z0-9]+/g)||[]).map(t=>`${t.charAt(0).toUpperCase()}${t.slice(1)}`).join("")}var g0=(e,t)=>{const a={chartData:{type:Object,required:!0},options:{type:Object,required:!1},chartId:{default:e,type:String},width:{default:400,type:Number},height:{default:400,type:Number},cssClasses:{type:String,default:""},styles:{type:Object},plugins:{type:Array,default:()=>[]},onLabelsUpdate:{type:Function},onChartUpdate:{type:Function},onChartDestroy:{type:Function},onChartRender:{type:Function}},r=AQ(e);return o.defineComponent({name:r,props:a,emits:{"labels:update":()=>!0,"chart:update":n=>!0,"chart:destroy":()=>!0,"chart:render":n=>!0},setup(n,{emit:c,expose:i}){const s=o.ref(null),l=`${n.chartId}`;let f=o.shallowRef(null);o.watch(()=>n.chartData,u,{deep:!0}),o.watch(()=>n.options,g=>{f.value&&g&&(f.value.options=Pa(g),v())},{deep:!0});function u(g){if(f.value){let y=f.value;Dh(g.labels,f.value.data.labels)||(y.data.labels=g.labels,h()),Dh(g.datasets,f.value.data.datasets)||g.datasets.forEach((x,C)=>{var b,M;if(zQ(x))y.data.datasets=[];else{const w=Pa(y.data),z=Object.keys((M=(b=w.datasets)==null?void 0:b[C])!=null?M:{}),H=Object.keys(x);z.filter(V=>V!=="_meta"&&H.indexOf(V)===-1).forEach(V=>{y.data.datasets[C]&&delete y.data.datasets[C][V]});for(const V in x){const k=Pa(x[V]);y.data.datasets[C]||(y.data.datasets[C]={}),x.hasOwnProperty(V)&&k!=null&&y&&(y.data.datasets[C][V]=k)}}}),v()}else f.value&&p(),d()}function d(){s.value?(f.value=new H4(s.value,{data:Pa(n.chartData),type:t,options:Pa(n.options),plugins:n.plugins}),m()):console.error(`Error on component ${r}, canvas cannot be rendered. Check if the render appends server-side`)}function h(){c("labels:update"),n.onLabelsUpdate&&n.onLabelsUpdate()}function m(){f.value&&(c("chart:render",f.value),n.onChartRender&&n.onChartRender(f.value))}function v(){f.value&&(f.value.update(),c("chart:update",f.value),n.onChartUpdate&&n.onChartUpdate(f.value))}function p(){f.value&&f.value.destroy(),c("chart:destroy"),n.onChartDestroy&&n.onChartDestroy()}return o.onMounted(d),o.onBeforeUnmount(()=>{f.value&&f.value.destroy()}),i({canvasRef:s,renderChart:d,chartInstance:f,canvasId:l,update:v}),()=>o.h("div",{style:SQ(LQ({maxWidth:"100%"},n.styles),{position:"relative"}),class:n.cssClasses},[o.h("canvas",{style:{maxWidth:"100%",maxHeight:"100%"},id:l,width:n.width,height:n.height,ref:s})])}})},TQ=g0("bar-chart","bar"),EQ=g0("doughnut-chart","doughnut");g0("line-chart","line");g0("pie-chart","pie");g0("polar-chart","polarArea");g0("radar-chart","radar");g0("bubble-chart","bubble");g0("scatter-chart","scatter");const NQ=o.defineComponent({__name:"PgaBarChart",props:{data:{},options:{}},setup(e){H4.register(...Jy);const t={responsive:!0};return(a,r)=>(o.openBlock(),o.createBlock(o.unref(TQ),{chartData:a.data,options:a.options||t},null,8,["chartData","options"]))}}),DQ=o.defineComponent({__name:"PgaDoughnutChart",props:{data:{},options:{}},setup(e){H4.register(...Jy);const t={responsive:!0};return(a,r)=>(o.openBlock(),o.createBlock(o.unref(EQ),{chartData:a.data,options:a.options||t},null,8,["chartData","options"]))}}),OQ={key:0},PQ={key:1,class:"barcodes-container"},BQ=o.defineComponent({__name:"PgaDisplayBarcodes",props:{barcodes:{}},setup(e){return(t,a)=>t.barcodes.length?(o.openBlock(),o.createElementBlock("div",PQ,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.barcodes,r=>(o.openBlock(),o.createElementBlock("span",{class:"barcode",key:r},[o.createVNode(Oe,{icon:"barcode"}),o.createTextVNode("   "+o.toDisplayString(r),1)]))),128))])):(o.openBlock(),o.createElementBlock("span",OQ,"-"))}});const FQ=I1(BQ,[["__scopeId","data-v-5291a54d"]]),RQ={class:"pga-display-content"},IQ=o.defineComponent({__name:"PgaDisplayContent",props:{label:{type:[String,Number,Function]}},setup(e){return(t,a)=>(o.openBlock(),o.createElementBlock("div",RQ,[o.createVNode(ye,{class:"item--label",text:t.label},null,8,["text"]),o.renderSlot(t.$slots,"default",{},void 0,!0)]))}});const $Q=I1(IQ,[["__scopeId","data-v-66c0a02b"]]),UQ=["textContent"],WQ=o.defineComponent({__name:"PgaDisplayDatetime",props:{datetime:{},withoutBackground:{type:Boolean}},setup(e){const t=e,a=o.computed(()=>t.datetime instanceof Date),r=o.computed(()=>a.value?m4(t.datetime,{format:"short",withTime:!1}):"-"),n=o.computed(()=>a.value?m4(t.datetime,{justTime:!0}):"");return(c,i)=>{const s=o.resolveDirective("tooltip");return a.value?o.withDirectives((o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(["pga-datetime",{"pga-datetime__with-background":!c.withoutBackground}])},[o.createVNode(ye,{icon:"calendar-days",text:r.value,nowrap:""},null,8,["text"])],2)),[[s,n.value]]):(o.openBlock(),o.createElementBlock("span",{key:0,textContent:o.toDisplayString(r.value)},null,8,UQ))}}});const qQ=I1(WQ,[["__scopeId","data-v-a734d7e2"]]),jQ={class:"info-card"},YQ={class:"info-card--icon-container"},GQ={class:"info-card--content-container"},XQ={class:"info-card--content"},KQ=["textContent"],ZQ=o.defineComponent({__name:"PgaDisplayInfo",props:{type:{default:"info"},info:{}},setup(e){o.useCssVars(i=>({"47ea99c5":n.value,"42bce5a0":c.value}));const t=e,a=o.computed(()=>{if(t.type==="info")return"circle-info";if(t.type==="success")return"circle-check";if(t.type==="error")return"circle-xmark";if(t.type==="warning")return"circle-exclamation"}),r=o.computed(()=>{if(t.type==="info")return"aqua";if(t.type==="success")return"success";if(t.type==="error")return"danger";if(t.type==="warning")return"warning"}),n=o.computed(()=>`var(--pga-color-${r.value}-08)`),c=o.computed(()=>`var(--pga-color-${r.value}-contrast)`);return(i,s)=>{const l=o.resolveComponent("PgaIcon");return o.openBlock(),o.createElementBlock("div",jQ,[o.createElementVNode("div",YQ,[o.createVNode(l,{class:"info-card--icon",icon:a.value},null,8,["icon"])]),o.createElementVNode("div",GQ,[o.createElementVNode("div",XQ,[i.info?(o.openBlock(),o.createElementBlock("span",{key:0,textContent:o.toDisplayString(i.info)},null,8,KQ)):o.renderSlot(i.$slots,"default",{key:1},void 0,!0)])])])}}});const QQ=I1(ZQ,[["__scopeId","data-v-c3d5b74a"]]),JQ={key:0,class:"no-items-container"},eJ={key:1,class:"no-items"},tJ=o.defineComponent({__name:"PgaDisplayNoItems",props:{items:{},label:{},icon:{default:"filter-circle-xmark"},preventDisplayIcon:{type:Boolean},isLoading:{type:Boolean}},setup(e){const t=e,a=_2("pgaDisplay"),r=o.computed(()=>{var c;return!(((c=t.items)==null?void 0:c.length)>0)}),n=o.computed(()=>t.label?t.label:a("noItemsText"));return(c,i)=>r.value?(o.openBlock(),o.createElementBlock("div",JQ,[c.isLoading?(o.openBlock(),o.createBlock(Lt,{key:0})):(o.openBlock(),o.createElementBlock("div",eJ,[c.preventDisplayIcon?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(Oe,{key:0,class:"no-items--icon",icon:c.icon},null,8,["icon"])),o.createVNode(ye,{class:"no-items--text",text:n.value},null,8,["text"])]))])):o.createCommentVNode("",!0)}});const wx=I1(tJ,[["__scopeId","data-v-f7c86b3b"]]),aJ=["textContent"],rJ={key:0,class:"price-sign"},nJ=["textContent"],cJ=o.defineComponent({__name:"PgaDisplayPrice",props:{price:{},tooltipPrice:{},maxDecimals:{},prefix:{},suffix:{},size:{default:"m"},fontSize:{},color:{default:"first"},withoutSign:{type:Boolean},withoutBackground:{type:Boolean}},setup(e){o.useCssVars(d=>({"12a72086":f.value,"58d270e6":u.value}));const t=e,{display:a}=$e(),r=o.computed(()=>t.withoutSign?!1:a.price.withSign),n=o.computed(()=>t.withoutBackground?!1:a.price.withBackground),c=o.computed(()=>t.price!==void 0),i={maxDecimals:t.maxDecimals,prefix:t.prefix,suffix:t.suffix},s=o.computed(()=>c.value?typeof t.price=="string"?t.price:Es(t.price,i):"-"),l=o.computed(()=>t.tooltipPrice===void 0?"":typeof t.tooltipPrice=="string"?t.tooltipPrice:Es(t.tooltipPrice,{...i,prefix:i.prefix||"$"})),f=o.computed(()=>{if(t.fontSize)return t.fontSize;if(t.size==="s")return"0.9rem";if(t.size==="m")return"1rem";if(t.size==="l")return"1.1rem"}),u=o.computed(()=>mn(t.color)?`var(--pga-color-${t.color})`:t.color);return(d,h)=>{const m=o.resolveDirective("tooltip");return c.value?o.withDirectives((o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(["price-container",{"price-container__with-background":n.value}])},[r.value?(o.openBlock(),o.createElementBlock("span",rJ,"$")):o.createCommentVNode("",!0),o.createElementVNode("span",{class:"price",textContent:o.toDisplayString(s.value)},null,8,nJ)],2)),[[m,l.value]]):(o.openBlock(),o.createElementBlock("span",{key:0,textContent:o.toDisplayString(s.value)},null,8,aJ))}}});const iJ=I1(cJ,[["__scopeId","data-v-7cb2d7b0"]]),sJ=o.defineComponent({__name:"PgaDisplayTime",props:{datetime:{}},setup(e){return(t,a)=>{const r=o.resolveComponent("PgaDisplayText");return o.openBlock(),o.createBlock(r,{icon:"clock",text:o.unref(sc)(t.datetime)},null,8,["text"])}}}),oJ=o.defineComponent({__name:"PgaForm",props:{withSubmitButton:{type:Boolean},submitBtnText:{},submitBtnIcon:{},isLoading:{type:Boolean},width:{default:"100%"}},emits:["submit"],setup(e,{emit:t}){o.useCssVars(n=>({f2ba1544:n.width}));const a=t,r=_2("pgaForm");return(n,c)=>(o.openBlock(),o.createElementBlock("form",{class:"pga-form",onSubmit:c[1]||(c[1]=o.withModifiers(()=>{},["prevent"]))},[o.renderSlot(n.$slots,"default",{},void 0,!0),n.withSubmitButton||n.submitBtnText?(o.openBlock(),o.createBlock(L2,{key:0,class:"form--submit-btn",type:"submit",text:n.submitBtnText||o.unref(r)("submitBtn"),icon:n.submitBtnIcon||"save",variant:"filled",isLoading:n.isLoading,onClick:c[0]||(c[0]=i=>a("submit"))},null,8,["text","icon","isLoading"])):o.createCommentVNode("",!0)],32))}});const _x=I1(oJ,[["__scopeId","data-v-fad80058"]]),lJ=o.defineComponent({__name:"PgaFormRow",props:{breakRow:{type:Boolean}},setup(e){return(t,a)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["pga-form-row",{"pga-form-row__break-row":t.breakRow}])},[o.renderSlot(t.$slots,"default")],2))}});const fJ=o.defineComponent({__name:"PgaFormSubtitle",props:{title:{type:[String,Number,Function]}},setup(e){return(t,a)=>{const r=o.resolveComponent("PgaDisplayText");return o.openBlock(),o.createBlock(r,{class:"pga-form-subtitle",text:t.title},null,8,["text"])}}});const uJ=I1(fJ,[["__scopeId","data-v-488b1ab9"]]),dJ=o.defineComponent({__name:"PgaFormTitle",props:{title:{type:[String,Number,Function]}},setup(e){return(t,a)=>{const r=o.resolveComponent("PgaDisplayText");return o.openBlock(),o.createBlock(r,{class:"pga-form-title",text:t.title},null,8,["text"])}}});const hJ=I1(dJ,[["__scopeId","data-v-46e35803"]]),mJ={key:0,class:"input-group--header"},pJ={key:0,class:"header--label"},vJ={key:1,class:"header--required-label"},gJ={key:2,class:"header--optional-label"},yJ=["innerHTML"],xJ={key:2,class:"input-group--errors"},bJ=["textContent"],CJ=o.defineComponent({__name:"PgaInputGroup",props:{label:{},withRequiredLabel:{type:Boolean},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},description:{},errors:{},fitContent:{type:Boolean},grow:{}},setup(e){o.useCssVars(c=>({"26eab7ff":c.grow}));const t=e,a=_2("pgaForm"),r=o.computed(()=>t.label||t.withLabelSpace),n=o.computed(()=>t.label||" ");return(c,i)=>{const s=o.resolveComponent("PgaIcon");return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["input-group",{"input-group__fit-content":c.fitContent,"input-group__with-flex-grow":c.grow!==void 0}])},[r.value||c.withRequiredLabel||c.withOptionalLabel?(o.openBlock(),o.createElementBlock("div",mJ,[r.value?(o.openBlock(),o.createElementBlock("label",pJ,o.toDisplayString(n.value),1)):o.createCommentVNode("",!0),c.withRequiredLabel?(o.openBlock(),o.createElementBlock("span",vJ,o.toDisplayString(o.unref(a)("requiredLabel")),1)):o.createCommentVNode("",!0),c.withOptionalLabel?(o.openBlock(),o.createElementBlock("span",gJ,o.toDisplayString(o.unref(a)("optionalLabel")),1)):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),o.renderSlot(c.$slots,"default",{},void 0,!0),c.description?(o.openBlock(),o.createElementBlock("span",{key:1,class:"input-group--description",innerHTML:c.description},null,8,yJ)):o.createCommentVNode("",!0),c.errors?(o.openBlock(),o.createElementBlock("div",xJ,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(c.errors,(l,f)=>(o.openBlock(),o.createElementBlock("div",{key:f,class:"errors--error"},[o.createVNode(s,{class:"error--icon",icon:["fas","triangle-exclamation"]}),o.createElementVNode("span",{class:"error--message",textContent:o.toDisplayString(l.$message)},null,8,bJ)]))),128))])):o.createCommentVNode("",!0)],2)}}});const A3=I1(CJ,[["__scopeId","data-v-14d41e2a"]]);function Bh(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),a.push.apply(a,r)}return a}function Rt(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?Bh(Object(a),!0).forEach(function(r){MJ(e,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Bh(Object(a)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))})}return e}function MJ(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Fh(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return Object.keys(e).reduce((a,r)=>(t.includes(r)||(a[r]=o.unref(e[r])),a),{})}function Dc(e){return typeof e=="function"}function zJ(e){return o.isReactive(e)||o.isReadonly(e)}function kx(e,t,a){let r=e;const n=t.split(".");for(let c=0;c<n.length;c++){if(!r[n[c]])return a;r=r[n[c]]}return r}function Qi(e,t,a){return o.computed(()=>e.some(r=>kx(t,r,{[a]:!1})[a]))}function Rh(e,t,a){return o.computed(()=>e.reduce((r,n)=>{const c=kx(t,n,{[a]:!1})[a]||[];return r.concat(c)},[]))}function Hx(e,t,a,r){return e.call(r,o.unref(t),o.unref(a),r)}function Vx(e){return e.$valid!==void 0?!e.$valid:!e}function wJ(e,t,a,r,n,c,i){let{$lazy:s,$rewardEarly:l}=n,f=arguments.length>7&&arguments[7]!==void 0?arguments[7]:[],u=arguments.length>8?arguments[8]:void 0,d=arguments.length>9?arguments[9]:void 0,h=arguments.length>10?arguments[10]:void 0;const m=o.ref(!!r.value),v=o.ref(0);a.value=!1;const p=o.watch([t,r].concat(f,h),()=>{if(s&&!r.value||l&&!d.value&&!a.value)return;let g;try{g=Hx(e,t,u,i)}catch(y){g=Promise.reject(y)}v.value++,a.value=!!v.value,m.value=!1,Promise.resolve(g).then(y=>{v.value--,a.value=!!v.value,c.value=y,m.value=Vx(y)}).catch(y=>{v.value--,a.value=!!v.value,c.value=y,m.value=!0})},{immediate:!0,deep:typeof t=="object"});return{$invalid:m,$unwatch:p}}function _J(e,t,a,r,n,c,i,s){let{$lazy:l,$rewardEarly:f}=r;const u=()=>({}),d=o.computed(()=>{if(l&&!a.value||f&&!s.value)return!1;let h=!0;try{const m=Hx(e,t,i,c);n.value=m,h=Vx(m)}catch(m){n.value=m}return h});return{$unwatch:u,$invalid:d}}function kJ(e,t,a,r,n,c,i,s,l,f,u){const d=o.ref(!1),h=e.$params||{},m=o.ref(null);let v,p;e.$async?{$invalid:v,$unwatch:p}=wJ(e.$validator,t,d,a,r,m,n,e.$watchTargets,l,f,u):{$invalid:v,$unwatch:p}=_J(e.$validator,t,a,r,m,n,l,f);const g=e.$message;return{$message:Dc(g)?o.computed(()=>g(Fh({$pending:d,$invalid:v,$params:Fh(h),$model:t,$response:m,$validator:c,$propertyPath:s,$property:i}))):g||"",$params:h,$pending:d,$invalid:v,$response:m,$unwatch:p}}function HJ(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=o.unref(e),a=Object.keys(t),r={},n={},c={};let i=null;return a.forEach(s=>{const l=t[s];switch(!0){case Dc(l.$validator):r[s]=l;break;case Dc(l):r[s]={$validator:l};break;case s==="$validationGroups":i=l;break;case s.startsWith("$"):c[s]=l;break;default:n[s]=l}}),{rules:r,nestedValidators:n,config:c,validationGroups:i}}const VJ="__root";function LJ(e,t,a,r,n,c,i,s,l){const f=Object.keys(e),u=r.get(n,e),d=o.ref(!1),h=o.ref(!1),m=o.ref(0);if(u){if(!u.$partial)return u;u.$unwatch(),d.value=u.$dirty.value}const v={$dirty:d,$path:n,$touch:()=>{d.value||(d.value=!0)},$reset:()=>{d.value&&(d.value=!1)},$commit:()=>{}};return f.length?(f.forEach(p=>{v[p]=kJ(e[p],t,v.$dirty,c,i,p,a,n,l,h,m)}),v.$externalResults=o.computed(()=>s.value?[].concat(s.value).map((p,g)=>({$propertyPath:n,$property:a,$validator:"$externalResults",$uid:`${n}-externalResult-${g}`,$message:p,$params:{},$response:null,$pending:!1})):[]),v.$invalid=o.computed(()=>{const p=f.some(g=>o.unref(v[g].$invalid));return h.value=p,!!v.$externalResults.value.length||p}),v.$pending=o.computed(()=>f.some(p=>o.unref(v[p].$pending))),v.$error=o.computed(()=>v.$dirty.value?v.$pending.value||v.$invalid.value:!1),v.$silentErrors=o.computed(()=>f.filter(p=>o.unref(v[p].$invalid)).map(p=>{const g=v[p];return o.reactive({$propertyPath:n,$property:a,$validator:p,$uid:`${n}-${p}`,$message:g.$message,$params:g.$params,$response:g.$response,$pending:g.$pending})}).concat(v.$externalResults.value)),v.$errors=o.computed(()=>v.$dirty.value?v.$silentErrors.value:[]),v.$unwatch=()=>f.forEach(p=>{v[p].$unwatch()}),v.$commit=()=>{h.value=!0,m.value=Date.now()},r.set(n,e,v),v):(u&&r.set(n,e,v),v)}function SJ(e,t,a,r,n,c,i){const s=Object.keys(e);return s.length?s.reduce((l,f)=>(l[f]=H7({validations:e[f],state:t,key:f,parentKey:a,resultsCache:r,globalConfig:n,instance:c,externalResults:i}),l),{}):{}}function AJ(e,t,a){const r=o.computed(()=>[t,a].filter(v=>v).reduce((v,p)=>v.concat(Object.values(o.unref(p))),[])),n=o.computed({get(){return e.$dirty.value||(r.value.length?r.value.every(v=>v.$dirty):!1)},set(v){e.$dirty.value=v}}),c=o.computed(()=>{const v=o.unref(e.$silentErrors)||[],p=r.value.filter(g=>(o.unref(g).$silentErrors||[]).length).reduce((g,y)=>g.concat(...y.$silentErrors),[]);return v.concat(p)}),i=o.computed(()=>{const v=o.unref(e.$errors)||[],p=r.value.filter(g=>(o.unref(g).$errors||[]).length).reduce((g,y)=>g.concat(...y.$errors),[]);return v.concat(p)}),s=o.computed(()=>r.value.some(v=>v.$invalid)||o.unref(e.$invalid)||!1),l=o.computed(()=>r.value.some(v=>o.unref(v.$pending))||o.unref(e.$pending)||!1),f=o.computed(()=>r.value.some(v=>v.$dirty)||r.value.some(v=>v.$anyDirty)||n.value),u=o.computed(()=>n.value?l.value||s.value:!1),d=()=>{e.$touch(),r.value.forEach(v=>{v.$touch()})},h=()=>{e.$commit(),r.value.forEach(v=>{v.$commit()})},m=()=>{e.$reset(),r.value.forEach(v=>{v.$reset()})};return r.value.length&&r.value.every(v=>v.$dirty)&&d(),{$dirty:n,$errors:i,$invalid:s,$anyDirty:f,$error:u,$pending:l,$touch:d,$reset:m,$silentErrors:c,$commit:h}}function H7(e){let{validations:t,state:a,key:r,parentKey:n,childResults:c,resultsCache:i,globalConfig:s={},instance:l,externalResults:f}=e;const u=n?`${n}.${r}`:r,{rules:d,nestedValidators:h,config:m,validationGroups:v}=HJ(t),p=Rt(Rt({},s),m),g=r?o.computed(()=>{const G=o.unref(a);return G?o.unref(G[r]):void 0}):a,y=Rt({},o.unref(f)||{}),x=o.computed(()=>{const G=o.unref(f);return r?G?o.unref(G[r]):void 0:G}),C=LJ(d,g,r,i,u,p,l,x,a),b=SJ(h,g,u,i,p,l,x),M={};v&&Object.entries(v).forEach(G=>{let[B,T]=G;M[B]={$invalid:Qi(T,b,"$invalid"),$error:Qi(T,b,"$error"),$pending:Qi(T,b,"$pending"),$errors:Rh(T,b,"$errors"),$silentErrors:Rh(T,b,"$silentErrors")}});const{$dirty:w,$errors:z,$invalid:H,$anyDirty:A,$error:V,$pending:k,$touch:_,$reset:N,$silentErrors:q,$commit:S}=AJ(C,b,c),O=r?o.computed({get:()=>o.unref(g),set:G=>{w.value=!0;const B=o.unref(a),T=o.unref(f);T&&(T[r]=y[r]),o.isRef(B[r])?B[r].value=G:B[r]=G}}):null;r&&p.$autoDirty&&o.watch(g,()=>{w.value||_();const G=o.unref(f);G&&(G[r]=y[r])},{flush:"sync"});async function U(){return _(),p.$rewardEarly&&(S(),await o.nextTick()),await o.nextTick(),new Promise(G=>{if(!k.value)return G(!H.value);const B=o.watch(k,()=>{G(!H.value),B()})})}function J(G){return(c.value||{})[G]}function Y(){o.isRef(f)?f.value=y:Object.keys(y).length===0?Object.keys(f).forEach(G=>{delete f[G]}):Object.assign(f,y)}return o.reactive(Rt(Rt(Rt({},C),{},{$model:O,$dirty:w,$error:V,$errors:z,$invalid:H,$anyDirty:A,$pending:k,$touch:_,$reset:N,$path:u||VJ,$silentErrors:q,$validate:U,$commit:S},c&&{$getResultsForChild:J,$clearExternalResults:Y,$validationGroups:M}),b))}class TJ{constructor(){this.storage=new Map}set(t,a,r){this.storage.set(t,{rules:a,result:r})}checkRulesValidity(t,a,r){const n=Object.keys(r),c=Object.keys(a);return c.length!==n.length||!c.every(s=>n.includes(s))?!1:c.every(s=>a[s].$params?Object.keys(a[s].$params).every(l=>o.unref(r[s].$params[l])===o.unref(a[s].$params[l])):!0)}get(t,a){const r=this.storage.get(t);if(!r)return;const{rules:n,result:c}=r,i=this.checkRulesValidity(t,a,n),s=c.$unwatch?c.$unwatch:()=>({});return i?c:{$dirty:c.$dirty,$partial:!0,$unwatch:s}}}const ec={COLLECT_ALL:!0,COLLECT_NONE:!1},Ih=Symbol("vuelidate#injectChildResults"),$h=Symbol("vuelidate#removeChildResults");function EJ(e){let{$scope:t,instance:a}=e;const r={},n=o.ref([]),c=o.computed(()=>n.value.reduce((u,d)=>(u[d]=o.unref(r[d]),u),{}));function i(u,d){let{$registerAs:h,$scope:m,$stopPropagation:v}=d;v||t===ec.COLLECT_NONE||m===ec.COLLECT_NONE||t!==ec.COLLECT_ALL&&t!==m||(r[h]=u,n.value.push(h))}a.__vuelidateInjectInstances=[].concat(a.__vuelidateInjectInstances||[],i);function s(u){n.value=n.value.filter(d=>d!==u),delete r[u]}a.__vuelidateRemoveInstances=[].concat(a.__vuelidateRemoveInstances||[],s);const l=o.inject(Ih,[]);o.provide(Ih,a.__vuelidateInjectInstances);const f=o.inject($h,[]);return o.provide($h,a.__vuelidateRemoveInstances),{childResults:c,sendValidationResultsToParent:l,removeValidationResultsFromParent:f}}function Lx(e){return new Proxy(e,{get(t,a){return typeof t[a]=="object"?Lx(t[a]):o.computed(()=>t[a])}})}let Uh=0;function NJ(e,t){var a;let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};arguments.length===1&&(r=e,e=void 0,t=void 0);let{$registerAs:n,$scope:c=ec.COLLECT_ALL,$stopPropagation:i,$externalResults:s,currentVueInstance:l}=r;const f=l||((a=o.getCurrentInstance())===null||a===void 0?void 0:a.proxy),u=f?f.$options:{};n||(Uh+=1,n=`_vuelidate_${Uh}`);const d=o.ref({}),h=new TJ,{childResults:m,sendValidationResultsToParent:v,removeValidationResultsFromParent:p}=f?EJ({$scope:c,instance:f}):{childResults:o.ref({})};if(!e&&u.validations){const g=u.validations;t=o.ref({}),o.onBeforeMount(()=>{t.value=f,o.watch(()=>Dc(g)?g.call(t.value,new Lx(t.value)):g,y=>{d.value=H7({validations:y,state:t,childResults:m,resultsCache:h,globalConfig:r,instance:f,externalResults:s||f.vuelidateExternalResults})},{immediate:!0})}),r=u.validationsConfig||r}else{const g=o.isRef(e)||zJ(e)?e:o.reactive(e||{});o.watch(g,y=>{d.value=H7({validations:y,state:t,childResults:m,resultsCache:h,globalConfig:r,instance:f??{},externalResults:s})},{immediate:!0})}return f&&(v.forEach(g=>g(d,{$registerAs:n,$scope:c,$stopPropagation:i})),o.onBeforeUnmount(()=>p.forEach(g=>g(n)))),o.computed(()=>Rt(Rt({},o.unref(d.value)),m.value))}function Wh(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),a.push.apply(a,r)}return a}function Jr(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?Wh(Object(a),!0).forEach(function(r){DJ(e,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Wh(Object(a)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))})}return e}function DJ(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Oc(e){return typeof e=="function"}function V7(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function E5(e){return Oc(e.$validator)?Jr({},e):{$validator:e}}function Sx(e){return typeof e=="object"?e.$valid:e}function Ax(e){return e.$validator||e}function OJ(e,t){if(!V7(e))throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof e}`);if(!V7(t)&&!Oc(t))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const a=E5(t);return a.$params=Jr(Jr({},a.$params||{}),e),a}function PJ(e,t){if(!Oc(e)&&typeof o.unref(e)!="string")throw new Error(`[@vuelidate/validators]: First parameter to "withMessage" should be string or a function returning a string, provided ${typeof e}`);if(!V7(t)&&!Oc(t))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const a=E5(t);return a.$message=e,a}function BJ(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const a=E5(e);return Jr(Jr({},a),{},{$async:!0,$watchTargets:t})}function FJ(e){return{$validator(t){for(var a=arguments.length,r=new Array(a>1?a-1:0),n=1;n<a;n++)r[n-1]=arguments[n];return o.unref(t).reduce((c,i,s)=>{const l=Object.entries(i).reduce((f,u)=>{let[d,h]=u;const m=e[d]||{},v=Object.entries(m).reduce((p,g)=>{let[y,x]=g;const b=Ax(x).call(this,h,i,s,...r),M=Sx(b);if(p.$data[y]=b,p.$data.$invalid=!M||!!p.$data.$invalid,p.$data.$error=p.$data.$invalid,!M){let w=x.$message||"";const z=x.$params||{};typeof w=="function"&&(w=w({$pending:!1,$invalid:!M,$params:z,$model:h,$response:b})),p.$errors.push({$property:d,$message:w,$params:z,$response:b,$model:h,$pending:!1,$validator:y})}return{$valid:p.$valid&&M,$data:p.$data,$errors:p.$errors}},{$valid:!0,$data:{},$errors:[]});return f.$data[d]=v.$data,f.$errors[d]=v.$errors,{$valid:f.$valid&&v.$valid,$data:f.$data,$errors:f.$errors}},{$valid:!0,$data:{},$errors:{}});return{$valid:c.$valid&&l.$valid,$data:c.$data.concat(l.$data),$errors:c.$errors.concat(l.$errors)}},{$valid:!0,$data:[],$errors:[]})},$message:t=>{let{$response:a}=t;return a?a.$errors.map(r=>Object.values(r).map(n=>n.map(c=>c.$message)).reduce((n,c)=>n.concat(c),[])):[]}}}const Sn=e=>{if(e=o.unref(e),Array.isArray(e))return!!e.length;if(e==null)return!1;if(e===!1)return!0;if(e instanceof Date)return!isNaN(e.getTime());if(typeof e=="object"){for(let t in e)return!0;return!1}return!!String(e).length},wl=e=>(e=o.unref(e),Array.isArray(e)?e.length:typeof e=="object"?Object.keys(e).length:String(e).length);function y0(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return r=>(r=o.unref(r),!Sn(r)||t.every(n=>(n.lastIndex=0,n.test(r))))}var en=Object.freeze({__proto__:null,forEach:FJ,len:wl,normalizeValidatorObject:E5,regex:y0,req:Sn,unwrap:o.unref,unwrapNormalizedValidator:Ax,unwrapValidatorResponse:Sx,withAsync:BJ,withMessage:PJ,withParams:OJ});y0(/^[a-zA-Z]*$/);y0(/^[a-zA-Z0-9]*$/);y0(/^\d*(\.\d+)?$/);const RJ=/^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i;y0(RJ);function IJ(e){return t=>!Sn(t)||wl(t)<=o.unref(e)}function $J(e){return{$validator:IJ(e),$message:t=>{let{$params:a}=t;return`The maximum length allowed is ${a.max}`},$params:{max:e,type:"maxLength"}}}function UJ(e){return t=>!Sn(t)||wl(t)>=o.unref(e)}function WJ(e){return{$validator:UJ(e),$message:t=>{let{$params:a}=t;return`This field should be at least ${a.min} characters long`},$params:{min:e,type:"minLength"}}}function qJ(e){return typeof e=="string"&&(e=e.trim()),Sn(e)}var jJ={$validator:qJ,$message:"Value is required",$params:{type:"required"}};const YJ=/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i;y0(YJ);var GJ=y0(/(^[0-9]*$)|(^-[0-9]+$)/),XJ={$validator:GJ,$message:"Value is not an integer",$params:{type:"integer"}};y0(/^[-]?\d*(\.\d+)?$/);const N5=_2("validations"),L7=en.withMessage(()=>N5("requiredRuleError"),jJ),S7=e=>Tx("minLength",e),A7=e=>Tx("maxLength",e),KJ=en.withMessage(()=>N5("integerRuleError"),XJ),ZJ=e=>D5("lessEqual",e),QJ=e=>D5("greaterEqual",e),JJ=e=>D5("lessThan",e),e11=e=>D5("greaterThan",e);function Tx(e,t){const a={minLength:WJ,maxLength:$J};return en.withMessage(()=>N5(`${e}RuleError`,{length:t}),a[e](t))}function D5(e,t){const a={lessEqual:r=>r<=t,greaterEqual:r=>r>=t,lessThan:r=>r<t,greaterThan:r=>r>t};return en.withMessage(()=>N5(`${e}RuleError`,{number:t}),en.withParams({},r=>typeof r!="number"?!0:a[e](r)))}const t11=o.defineComponent({__name:"PgaInputRightButton",props:{icon:{},withBackground:{type:Boolean}},setup(e){o.useCssVars(a=>({d66bfd04:o.unref(t).input.height,"66ebfdd4":o.unref(t).input.iconWidth,"9d32e216":o.unref(t).input.borderRadius,"1936f71a":o.unref(t).input.backgroundColorFocus,"19536b7e":o.unref(t).input.backgroundColorHover}));const{form:t}=$e();return(a,r)=>(o.openBlock(),o.createBlock(L2,{class:o.normalizeClass(["input-right-button",{"input-right-button__with-background":a.withBackground}]),variant:"flat",icon:a.icon,tabindex:"-1"},null,8,["class","icon"]))}});const Pc=I1(t11,[["__scopeId","data-v-1088e7d4"]]),a11={class:"input-container"},r11={class:"input-content"},n11=["type","placeholder","autofocus","disabled"],Ji="",c11=o.defineComponent({__name:"PgaInput",props:o.mergeModels({type:{default:"text"},integer:{type:Boolean},placeholder:{},label:{},withRequiredLabel:{type:Boolean},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},description:{},errors:{},autofocus:{type:Boolean},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:o.mergeModels(["change","enter","valueCleared"],["update:modelValue"]),setup(e,{expose:t,emit:a}){o.useCssVars(b=>({"7426ec94":o.unref(i).input.height,"9e656378":o.unref(i).input.padding,c8e0867a:o.unref(i).input.paddingWithIcon,"55e8474a":o.unref(i).input.borderColor,"7ff0518b":o.unref(i).input.borderRadius,"5a052608":o.unref(i).input.backgroundColor,"2c758fbc":o.unref(i).input.colorFocus,"63a33ca4":o.unref(i).input.backgroundColorDisabled,"3e5ce0dd":o.unref(i).input.placeholderColor}));const r=o.useModel(e,"modelValue"),n=e,c=a;t({focus:h});const{form:i}=$e(),s=o.ref(),l=o.ref(Ji),f=o.ref(!1),u=o.computed(()=>n.type==="password"),d=o.computed(()=>u.value?!1:!n.disabled&&l.value);o.watch(r,b=>x(b),{immediate:!0});function h(){var b;(b=s.value)==null||b.focus()}function m(){n.type==="number"&&!l.value&&(l.value=Ji)}function v(){n.type==="number"&&!l.value&&(l.value=y())}function p(){C(Ji),c("valueCleared")}function g(b){return b===""?null:n.type==="number"&&n.integer&&typeof b=="number"?Math.round(b):b}function y(b){const M=typeof b>"u"?r.value:b;return M===null?"":M}function x(b){const M=g(b);return r.value=M,l.value=y(M),M}function C(b){const M=x(b);c("change",M)}return(b,M)=>(o.openBlock(),o.createBlock(A3,{label:b.label,withRequiredLabel:b.withRequiredLabel,withOptionalLabel:b.withOptionalLabel,withLabelSpace:b.withLabelSpace,description:b.description,errors:b.errors,grow:b.grow},{default:o.withCtx(()=>[o.createElementVNode("div",a11,[o.createElementVNode("div",r11,[o.withDirectives(o.createElementVNode("input",{ref_key:"inputRef",ref:s,"onUpdate:modelValue":M[0]||(M[0]=w=>l.value=w),class:o.normalizeClass(["input",{input__disabled:b.disabled}]),type:f.value?"text":b.type,placeholder:o.unref(pt)(b.placeholder),autofocus:b.autofocus,disabled:b.disabled,onInput:M[1]||(M[1]=w=>C(l.value)),onKeyup:M[2]||(M[2]=o.withKeys(w=>c("enter"),["enter"])),onFocus:M[3]||(M[3]=w=>m()),onBlur:M[4]||(M[4]=w=>v())},null,42,n11),[[o.vModelDynamic,l.value]]),u.value?(o.openBlock(),o.createBlock(Pc,{key:0,icon:f.value?"eye-slash":"eye",withBackground:"",onClick:M[5]||(M[5]=w=>f.value=!f.value)},null,8,["icon"])):d.value?(o.openBlock(),o.createBlock(Pc,{key:1,icon:"xmark",onClick:M[6]||(M[6]=w=>p())})):o.createCommentVNode("",!0)]),o.renderSlot(b.$slots,"labelRight",{},void 0,!0)])]),_:3},8,["label","withRequiredLabel","withOptionalLabel","withLabelSpace","description","errors","grow"]))}});const Bc=I1(c11,[["__scopeId","data-v-7df318f0"]]),i11={class:"login-form-container"},s11={class:"user-icon-container"},o11=o.defineComponent({__name:"PgaLoginForm",setup(e){class t{constructor(){g1(this,"username","");g1(this,"password","")}}const a=Z2.getConfig(),r=_2("pgaForm"),n=Hr.useRoute(),c={username:{requiredRule:L7,minLengthRule:S7(8),maxLengthRule:A7(a.stringLengths.short)},password:{requiredRule:L7,minLengthRule:S7(8),maxLengthRule:A7(a.stringLengths.short)}},i=o.ref(new t),s=NJ(c,i),l=o.ref(!1);async function f(){if(!await s.value.$validate())return;const u={isLoadingRef:l,redirectToName:n.query.redirectTo};Ep($3().currentRouteType,i.value,u)}return(u,d)=>(o.openBlock(),o.createElementBlock("div",i11,[o.createVNode(_x,{class:"login-form",submitBtnText:o.unref(r)("loginBtn"),submitBtnIcon:"right-to-bracket",isLoading:l.value,onSubmit:d[2]||(d[2]=h=>f())},{default:o.withCtx(()=>[o.createElementVNode("div",s11,[o.createVNode(Oe,{class:"user-icon",icon:"user"})]),o.createVNode(Bc,{modelValue:i.value.username,"onUpdate:modelValue":d[0]||(d[0]=h=>i.value.username=h),label:o.unref(r)("usernameLabel"),errors:o.unref(s).username.$errors,disabled:l.value},null,8,["modelValue","label","errors","disabled"]),o.createVNode(Bc,{modelValue:i.value.password,"onUpdate:modelValue":d[1]||(d[1]=h=>i.value.password=h),type:"password",label:o.unref(r)("passwordLabel"),errors:o.unref(s).password.$errors,disabled:l.value},null,8,["modelValue","label","errors","disabled"])]),_:1},8,["submitBtnText","isLoading"])]))}});const l11=I1(o11,[["__scopeId","data-v-f0930bcf"]]),f11={class:"pga-checkbox"},u11=["textContent"],d11=o.defineComponent({__name:"PgaCheckbox",props:o.mergeModels({label:{}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=o.useModel(e,"modelValue");return(a,r)=>(o.openBlock(),o.createElementBlock("label",f11,[o.withDirectives(o.createElementVNode("input",{"onUpdate:modelValue":r[0]||(r[0]=n=>t.value=n),type:"checkbox"},null,512),[[o.vModelCheckbox,t.value]]),a.label?(o.openBlock(),o.createElementBlock("span",{key:0,class:"checkbox--label",textContent:o.toDisplayString(a.label)},null,8,u11)):o.createCommentVNode("",!0)]))}});const h11=I1(d11,[["__scopeId","data-v-89f11c66"]]),m11={class:"colors-container"},p11=o.defineComponent({__name:"PgaColorSelector",props:o.mergeModels({label:{},withRequiredLabel:{type:Boolean},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},description:{},errors:{},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){o.useCssVars(n=>({"1d17ba59":o.unref(a).input.padding,ff76be42:o.unref(a).input.borderColor,bdc1aad4:o.unref(a).input.borderRadius}));const t=o.useModel(e,"modelValue"),{form:a}=$e();function r(n){var c;return((c=t.value)==null?void 0:c.toLowerCase())===n.toLowerCase()}return(n,c)=>(o.openBlock(),o.createBlock(A3,{label:n.label,withRequiredLabel:n.withRequiredLabel,withOptionalLabel:n.withOptionalLabel,withLabelSpace:n.withLabelSpace,description:n.description,errors:n.errors,grow:n.grow},{default:o.withCtx(()=>[o.createElementVNode("div",m11,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(Vp),i=>(o.openBlock(),o.createBlock(L2,{key:i,variant:r(i)?"outlined":"flat",color:r(i)?"primary":"first",disabled:n.disabled,onClick:s=>t.value=i},{default:o.withCtx(()=>[o.createVNode(Qg,{color:i},null,8,["color"])]),_:2},1032,["variant","color","disabled","onClick"]))),128))])]),_:1},8,["label","withRequiredLabel","withOptionalLabel","withLabelSpace","description","errors","grow"]))}});const v11=I1(p11,[["__scopeId","data-v-76761025"]]);function Y1(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function z2(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function J3(e,t){const a=Y1(e);return isNaN(t)?z2(e,NaN):(t&&a.setDate(a.getDate()+t),a)}function f4(e,t){const a=Y1(e);if(isNaN(t))return z2(e,NaN);if(!t)return a;const r=a.getDate(),n=z2(e,a.getTime());n.setMonth(a.getMonth()+t+1,0);const c=n.getDate();return r>=c?n:(a.setFullYear(n.getFullYear(),n.getMonth(),r),a)}function Ex(e,t){const{years:a=0,months:r=0,weeks:n=0,days:c=0,hours:i=0,minutes:s=0,seconds:l=0}=t,f=Y1(e),u=r||a?f4(f,r+a*12):f,d=c||n?J3(u,c+n*7):u,h=s+i*60,v=(l+h*60)*1e3;return z2(e,d.getTime()+v)}function g11(e,t){const a=+Y1(e);return z2(e,a+t)}const Nx=6048e5,y11=864e5,x11=6e4,Dx=36e5,b11=1e3;function C11(e,t){return g11(e,t*Dx)}let M11={};function v6(){return M11}function y4(e,t){var s,l,f,u;const a=v6(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??a.weekStartsOn??((u=(f=a.locale)==null?void 0:f.options)==null?void 0:u.weekStartsOn)??0,n=Y1(e),c=n.getDay(),i=(c<r?7:0)+c-r;return n.setDate(n.getDate()-i),n.setHours(0,0,0,0),n}function aa(e){return y4(e,{weekStartsOn:1})}function Ox(e){const t=Y1(e),a=t.getFullYear(),r=z2(e,0);r.setFullYear(a+1,0,4),r.setHours(0,0,0,0);const n=aa(r),c=z2(e,0);c.setFullYear(a,0,4),c.setHours(0,0,0,0);const i=aa(c);return t.getTime()>=n.getTime()?a+1:t.getTime()>=i.getTime()?a:a-1}function qh(e){const t=Y1(e);return t.setHours(0,0,0,0),t}function Fc(e){const t=Y1(e),a=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return a.setUTCFullYear(t.getFullYear()),+e-+a}function Px(e,t){const a=qh(e),r=qh(t),n=+a-Fc(a),c=+r-Fc(r);return Math.round((n-c)/y11)}function z11(e){const t=Ox(e),a=z2(e,0);return a.setFullYear(t,0,4),a.setHours(0,0,0,0),aa(a)}function w11(e,t){const a=t*3;return f4(e,a)}function _l(e,t){return f4(e,t*12)}function Bx(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function vr(e){if(!Bx(e)&&typeof e!="number")return!1;const t=Y1(e);return!isNaN(Number(t))}function jh(e){const t=Y1(e);return Math.trunc(t.getMonth()/3)+1}function Fx(e,t){const a=Y1(e.start),r=Y1(e.end);let n=+a>+r;const c=n?+a:+r,i=n?r:a;i.setHours(0,0,0,0);let s=(t==null?void 0:t.step)??1;if(!s)return[];s<0&&(s=-s,n=!n);const l=[];for(;+i<=c;)l.push(Y1(i)),i.setDate(i.getDate()+s),i.setHours(0,0,0,0);return n?l.reverse():l}function $0(e){const t=Y1(e),a=t.getMonth(),r=a-a%3;return t.setMonth(r,1),t.setHours(0,0,0,0),t}function _11(e,t){const a=Y1(e.start),r=Y1(e.end);let n=+a>+r;const c=n?+$0(a):+$0(r);let i=$0(n?r:a),s=(t==null?void 0:t.step)??1;if(!s)return[];s<0&&(s=-s,n=!n);const l=[];for(;+i<=c;)l.push(Y1(i)),i=w11(i,s);return n?l.reverse():l}function Rx(e){const t=Y1(e),a=t.getFullYear();return t.setFullYear(a+1,0,0),t.setHours(23,59,59,999),t}function kl(e){const t=Y1(e),a=z2(e,0);return a.setFullYear(t.getFullYear(),0,1),a.setHours(0,0,0,0),a}function Ix(e,t){var s,l,f,u;const a=v6(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??a.weekStartsOn??((u=(f=a.locale)==null?void 0:f.options)==null?void 0:u.weekStartsOn)??0,n=Y1(e),c=n.getDay(),i=(c<r?-7:0)+6-(c-r);return n.setDate(n.getDate()+i),n.setHours(23,59,59,999),n}function Yh(e){const t=Y1(e),a=t.getMonth(),r=a-a%3+3;return t.setMonth(r,0),t.setHours(23,59,59,999),t}const k11={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},H11=(e,t,a)=>{let r;const n=k11[e];return typeof n=="string"?r=n:t===1?r=n.one:r=n.other.replace("{{count}}",t.toString()),a!=null&&a.addSuffix?a.comparison&&a.comparison>0?"in "+r:r+" ago":r};function es(e){return(t={})=>{const a=t.width?String(t.width):e.defaultWidth;return e.formats[a]||e.formats[e.defaultWidth]}}const V11={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},L11={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},S11={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},A11={date:es({formats:V11,defaultWidth:"full"}),time:es({formats:L11,defaultWidth:"full"}),dateTime:es({formats:S11,defaultWidth:"full"})},T11={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},E11=(e,t,a,r)=>T11[e];function Ba(e){return(t,a)=>{const r=a!=null&&a.context?String(a.context):"standalone";let n;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,s=a!=null&&a.width?String(a.width):i;n=e.formattingValues[s]||e.formattingValues[i]}else{const i=e.defaultWidth,s=a!=null&&a.width?String(a.width):e.defaultWidth;n=e.values[s]||e.values[i]}const c=e.argumentCallback?e.argumentCallback(t):t;return n[c]}}const N11={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},D11={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},O11={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},P11={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},B11={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},F11={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},R11=(e,t)=>{const a=Number(e),r=a%100;if(r>20||r<10)switch(r%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},I11={ordinalNumber:R11,era:Ba({values:N11,defaultWidth:"wide"}),quarter:Ba({values:D11,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ba({values:O11,defaultWidth:"wide"}),day:Ba({values:P11,defaultWidth:"wide"}),dayPeriod:Ba({values:B11,defaultWidth:"wide",formattingValues:F11,defaultFormattingWidth:"wide"})};function Fa(e){return(t,a={})=>{const r=a.width,n=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],c=t.match(n);if(!c)return null;const i=c[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?U11(s,d=>d.test(i)):$11(s,d=>d.test(i));let f;f=e.valueCallback?e.valueCallback(l):l,f=a.valueCallback?a.valueCallback(f):f;const u=t.slice(i.length);return{value:f,rest:u}}}function $11(e,t){for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&t(e[a]))return a}function U11(e,t){for(let a=0;a<e.length;a++)if(t(e[a]))return a}function W11(e){return(t,a={})=>{const r=t.match(e.matchPattern);if(!r)return null;const n=r[0],c=t.match(e.parsePattern);if(!c)return null;let i=e.valueCallback?e.valueCallback(c[0]):c[0];i=a.valueCallback?a.valueCallback(i):i;const s=t.slice(n.length);return{value:i,rest:s}}}const q11=/^(\d+)(th|st|nd|rd)?/i,j11=/\d+/i,Y11={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},G11={any:[/^b/i,/^(a|c)/i]},X11={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},K11={any:[/1/i,/2/i,/3/i,/4/i]},Z11={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Q11={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},J11={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},e21={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},t21={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},a21={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},r21={ordinalNumber:W11({matchPattern:q11,parsePattern:j11,valueCallback:e=>parseInt(e,10)}),era:Fa({matchPatterns:Y11,defaultMatchWidth:"wide",parsePatterns:G11,defaultParseWidth:"any"}),quarter:Fa({matchPatterns:X11,defaultMatchWidth:"wide",parsePatterns:K11,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Fa({matchPatterns:Z11,defaultMatchWidth:"wide",parsePatterns:Q11,defaultParseWidth:"any"}),day:Fa({matchPatterns:J11,defaultMatchWidth:"wide",parsePatterns:e21,defaultParseWidth:"any"}),dayPeriod:Fa({matchPatterns:t21,defaultMatchWidth:"any",parsePatterns:a21,defaultParseWidth:"any"})},$x={code:"en-US",formatDistance:H11,formatLong:A11,formatRelative:E11,localize:I11,match:r21,options:{weekStartsOn:0,firstWeekContainsDate:1}};function n21(e){const t=Y1(e);return Px(t,kl(t))+1}function Hl(e){const t=Y1(e),a=+aa(t)-+z11(t);return Math.round(a/Nx)+1}function Vl(e,t){var u,d,h,m;const a=Y1(e),r=a.getFullYear(),n=v6(),c=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??n.firstWeekContainsDate??((m=(h=n.locale)==null?void 0:h.options)==null?void 0:m.firstWeekContainsDate)??1,i=z2(e,0);i.setFullYear(r+1,0,c),i.setHours(0,0,0,0);const s=y4(i,t),l=z2(e,0);l.setFullYear(r,0,c),l.setHours(0,0,0,0);const f=y4(l,t);return a.getTime()>=s.getTime()?r+1:a.getTime()>=f.getTime()?r:r-1}function c21(e,t){var s,l,f,u;const a=v6(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??a.firstWeekContainsDate??((u=(f=a.locale)==null?void 0:f.options)==null?void 0:u.firstWeekContainsDate)??1,n=Vl(e,t),c=z2(e,0);return c.setFullYear(n,0,r),c.setHours(0,0,0,0),y4(c,t)}function Ll(e,t){const a=Y1(e),r=+y4(a,t)-+c21(a,t);return Math.round(r/Nx)+1}function H2(e,t){const a=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return a+r}const Nt={y(e,t){const a=e.getFullYear(),r=a>0?a:1-a;return H2(t==="yy"?r%100:r,t.length)},M(e,t){const a=e.getMonth();return t==="M"?String(a+1):H2(a+1,2)},d(e,t){return H2(e.getDate(),t.length)},a(e,t){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];case"aaaa":default:return a==="am"?"a.m.":"p.m."}},h(e,t){return H2(e.getHours()%12||12,t.length)},H(e,t){return H2(e.getHours(),t.length)},m(e,t){return H2(e.getMinutes(),t.length)},s(e,t){return H2(e.getSeconds(),t.length)},S(e,t){const a=t.length,r=e.getMilliseconds(),n=Math.trunc(r*Math.pow(10,a-3));return H2(n,t.length)}},H6={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Gh={G:function(e,t,a){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return a.era(r,{width:"abbreviated"});case"GGGGG":return a.era(r,{width:"narrow"});case"GGGG":default:return a.era(r,{width:"wide"})}},y:function(e,t,a){if(t==="yo"){const r=e.getFullYear(),n=r>0?r:1-r;return a.ordinalNumber(n,{unit:"year"})}return Nt.y(e,t)},Y:function(e,t,a,r){const n=Vl(e,r),c=n>0?n:1-n;if(t==="YY"){const i=c%100;return H2(i,2)}return t==="Yo"?a.ordinalNumber(c,{unit:"year"}):H2(c,t.length)},R:function(e,t){const a=Ox(e);return H2(a,t.length)},u:function(e,t){const a=e.getFullYear();return H2(a,t.length)},Q:function(e,t,a){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return H2(r,2);case"Qo":return a.ordinalNumber(r,{unit:"quarter"});case"QQQ":return a.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,a){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return H2(r,2);case"qo":return a.ordinalNumber(r,{unit:"quarter"});case"qqq":return a.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,a){const r=e.getMonth();switch(t){case"M":case"MM":return Nt.M(e,t);case"Mo":return a.ordinalNumber(r+1,{unit:"month"});case"MMM":return a.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,a){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return H2(r+1,2);case"Lo":return a.ordinalNumber(r+1,{unit:"month"});case"LLL":return a.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,a,r){const n=Ll(e,r);return t==="wo"?a.ordinalNumber(n,{unit:"week"}):H2(n,t.length)},I:function(e,t,a){const r=Hl(e);return t==="Io"?a.ordinalNumber(r,{unit:"week"}):H2(r,t.length)},d:function(e,t,a){return t==="do"?a.ordinalNumber(e.getDate(),{unit:"date"}):Nt.d(e,t)},D:function(e,t,a){const r=n21(e);return t==="Do"?a.ordinalNumber(r,{unit:"dayOfYear"}):H2(r,t.length)},E:function(e,t,a){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return a.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(r,{width:"short",context:"formatting"});case"EEEE":default:return a.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,a,r){const n=e.getDay(),c=(n-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(c);case"ee":return H2(c,2);case"eo":return a.ordinalNumber(c,{unit:"day"});case"eee":return a.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(n,{width:"short",context:"formatting"});case"eeee":default:return a.day(n,{width:"wide",context:"formatting"})}},c:function(e,t,a,r){const n=e.getDay(),c=(n-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(c);case"cc":return H2(c,t.length);case"co":return a.ordinalNumber(c,{unit:"day"});case"ccc":return a.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(n,{width:"narrow",context:"standalone"});case"cccccc":return a.day(n,{width:"short",context:"standalone"});case"cccc":default:return a.day(n,{width:"wide",context:"standalone"})}},i:function(e,t,a){const r=e.getDay(),n=r===0?7:r;switch(t){case"i":return String(n);case"ii":return H2(n,t.length);case"io":return a.ordinalNumber(n,{unit:"day"});case"iii":return a.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(r,{width:"short",context:"formatting"});case"iiii":default:return a.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,a){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,a){const r=e.getHours();let n;switch(r===12?n=H6.noon:r===0?n=H6.midnight:n=r/12>=1?"pm":"am",t){case"b":case"bb":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,a){const r=e.getHours();let n;switch(r>=17?n=H6.evening:r>=12?n=H6.afternoon:r>=4?n=H6.morning:n=H6.night,t){case"B":case"BB":case"BBB":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,a){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),a.ordinalNumber(r,{unit:"hour"})}return Nt.h(e,t)},H:function(e,t,a){return t==="Ho"?a.ordinalNumber(e.getHours(),{unit:"hour"}):Nt.H(e,t)},K:function(e,t,a){const r=e.getHours()%12;return t==="Ko"?a.ordinalNumber(r,{unit:"hour"}):H2(r,t.length)},k:function(e,t,a){let r=e.getHours();return r===0&&(r=24),t==="ko"?a.ordinalNumber(r,{unit:"hour"}):H2(r,t.length)},m:function(e,t,a){return t==="mo"?a.ordinalNumber(e.getMinutes(),{unit:"minute"}):Nt.m(e,t)},s:function(e,t,a){return t==="so"?a.ordinalNumber(e.getSeconds(),{unit:"second"}):Nt.s(e,t)},S:function(e,t){return Nt.S(e,t)},X:function(e,t,a){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Kh(r);case"XXXX":case"XX":return D0(r);case"XXXXX":case"XXX":default:return D0(r,":")}},x:function(e,t,a){const r=e.getTimezoneOffset();switch(t){case"x":return Kh(r);case"xxxx":case"xx":return D0(r);case"xxxxx":case"xxx":default:return D0(r,":")}},O:function(e,t,a){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Xh(r,":");case"OOOO":default:return"GMT"+D0(r,":")}},z:function(e,t,a){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Xh(r,":");case"zzzz":default:return"GMT"+D0(r,":")}},t:function(e,t,a){const r=Math.trunc(e.getTime()/1e3);return H2(r,t.length)},T:function(e,t,a){const r=e.getTime();return H2(r,t.length)}};function Xh(e,t=""){const a=e>0?"-":"+",r=Math.abs(e),n=Math.trunc(r/60),c=r%60;return c===0?a+String(n):a+String(n)+t+H2(c,2)}function Kh(e,t){return e%60===0?(e>0?"-":"+")+H2(Math.abs(e)/60,2):D0(e,t)}function D0(e,t=""){const a=e>0?"-":"+",r=Math.abs(e),n=H2(Math.trunc(r/60),2),c=H2(r%60,2);return a+n+t+c}const Zh=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Ux=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},i21=(e,t)=>{const a=e.match(/(P+)(p+)?/)||[],r=a[1],n=a[2];if(!n)return Zh(e,t);let c;switch(r){case"P":c=t.dateTime({width:"short"});break;case"PP":c=t.dateTime({width:"medium"});break;case"PPP":c=t.dateTime({width:"long"});break;case"PPPP":default:c=t.dateTime({width:"full"});break}return c.replace("{{date}}",Zh(r,t)).replace("{{time}}",Ux(n,t))},T7={p:Ux,P:i21},s21=/^D+$/,o21=/^Y+$/,l21=["D","DD","YY","YYYY"];function Wx(e){return s21.test(e)}function qx(e){return o21.test(e)}function E7(e,t,a){const r=f21(e,t,a);if(console.warn(r),l21.includes(e))throw new RangeError(r)}function f21(e,t,a){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${a}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const u21=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,d21=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,h21=/^'([^]*?)'?$/,m21=/''/g,p21=/[a-zA-Z]/;function P4(e,t,a){var u,d,h,m,v,p,g,y;const r=v6(),n=(a==null?void 0:a.locale)??r.locale??$x,c=(a==null?void 0:a.firstWeekContainsDate)??((d=(u=a==null?void 0:a.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??r.firstWeekContainsDate??((m=(h=r.locale)==null?void 0:h.options)==null?void 0:m.firstWeekContainsDate)??1,i=(a==null?void 0:a.weekStartsOn)??((p=(v=a==null?void 0:a.locale)==null?void 0:v.options)==null?void 0:p.weekStartsOn)??r.weekStartsOn??((y=(g=r.locale)==null?void 0:g.options)==null?void 0:y.weekStartsOn)??0,s=Y1(e);if(!vr(s))throw new RangeError("Invalid time value");let l=t.match(d21).map(x=>{const C=x[0];if(C==="p"||C==="P"){const b=T7[C];return b(x,n.formatLong)}return x}).join("").match(u21).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const C=x[0];if(C==="'")return{isToken:!1,value:v21(x)};if(Gh[C])return{isToken:!0,value:x};if(C.match(p21))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return{isToken:!1,value:x}});n.localize.preprocessor&&(l=n.localize.preprocessor(s,l));const f={firstWeekContainsDate:c,weekStartsOn:i,locale:n};return l.map(x=>{if(!x.isToken)return x.value;const C=x.value;(!(a!=null&&a.useAdditionalWeekYearTokens)&&qx(C)||!(a!=null&&a.useAdditionalDayOfYearTokens)&&Wx(C))&&E7(C,t,String(e));const b=Gh[C[0]];return b(s,C,n.localize,f)}).join("")}function v21(e){const t=e.match(h21);return t?t[1].replace(m21,"'"):e}function g21(e){return Y1(e).getDay()}function y21(e){const t=Y1(e),a=t.getFullYear(),r=t.getMonth(),n=z2(e,0);return n.setFullYear(a,r+1,0),n.setHours(0,0,0,0),n.getDate()}function x21(){return Object.assign({},v6())}function wt(e){return Y1(e).getHours()}function b21(e){let a=Y1(e).getDay();return a===0&&(a=7),a}function h0(e){return Y1(e).getMinutes()}function o2(e){return Y1(e).getMonth()}function ra(e){return Y1(e).getSeconds()}function n2(e){return Y1(e).getFullYear()}function na(e,t){const a=Y1(e),r=Y1(t);return a.getTime()>r.getTime()}function tn(e,t){const a=Y1(e),r=Y1(t);return+a<+r}function P6(e,t){const a=Y1(e),r=Y1(t);return+a==+r}function C21(e,t){const a=t instanceof Date?z2(t,0):new t(0);return a.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),a.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),a}const M21=10;class jx{constructor(){g1(this,"subPriority",0)}validate(t,a){return!0}}class z21 extends jx{constructor(t,a,r,n,c){super(),this.value=t,this.validateValue=a,this.setValue=r,this.priority=n,c&&(this.subPriority=c)}validate(t,a){return this.validateValue(t,this.value,a)}set(t,a,r){return this.setValue(t,a,this.value,r)}}class w21 extends jx{constructor(){super(...arguments);g1(this,"priority",M21);g1(this,"subPriority",-1)}set(a,r){return r.timestampIsSet?a:z2(a,C21(a,Date))}}class w2{run(t,a,r,n){const c=this.parse(t,a,r,n);return c?{setter:new z21(c.value,this.validate,this.set,this.priority,this.subPriority),rest:c.rest}:null}validate(t,a,r){return!0}}class _21 extends w2{constructor(){super(...arguments);g1(this,"priority",140);g1(this,"incompatibleTokens",["R","u","t","T"])}parse(a,r,n){switch(r){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"})||n.era(a,{width:"narrow"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})||n.era(a,{width:"abbreviated"})||n.era(a,{width:"narrow"})}}set(a,r,n){return r.era=n,a.setFullYear(n,0,1),a.setHours(0,0,0,0),a}}const ve={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},L4={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function ge(e,t){return e&&{value:t(e.value),rest:e.rest}}function ae(e,t){const a=t.match(e);return a?{value:parseInt(a[0],10),rest:t.slice(a[0].length)}:null}function S4(e,t){const a=t.match(e);if(!a)return null;if(a[0]==="Z")return{value:0,rest:t.slice(1)};const r=a[1]==="+"?1:-1,n=a[2]?parseInt(a[2],10):0,c=a[3]?parseInt(a[3],10):0,i=a[5]?parseInt(a[5],10):0;return{value:r*(n*Dx+c*x11+i*b11),rest:t.slice(a[0].length)}}function Yx(e){return ae(ve.anyDigitsSigned,e)}function oe(e,t){switch(e){case 1:return ae(ve.singleDigit,t);case 2:return ae(ve.twoDigits,t);case 3:return ae(ve.threeDigits,t);case 4:return ae(ve.fourDigits,t);default:return ae(new RegExp("^\\d{1,"+e+"}"),t)}}function Rc(e,t){switch(e){case 1:return ae(ve.singleDigitSigned,t);case 2:return ae(ve.twoDigitsSigned,t);case 3:return ae(ve.threeDigitsSigned,t);case 4:return ae(ve.fourDigitsSigned,t);default:return ae(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Sl(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Gx(e,t){const a=t>0,r=a?t:1-t;let n;if(r<=50)n=e||100;else{const c=r+50,i=Math.trunc(c/100)*100,s=e>=c%100;n=e+i-(s?100:0)}return a?n:1-n}function Xx(e){return e%400===0||e%4===0&&e%100!==0}class k21 extends w2{constructor(){super(...arguments);g1(this,"priority",130);g1(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(a,r,n){const c=i=>({year:i,isTwoDigitYear:r==="yy"});switch(r){case"y":return ge(oe(4,a),c);case"yo":return ge(n.ordinalNumber(a,{unit:"year"}),c);default:return ge(oe(r.length,a),c)}}validate(a,r){return r.isTwoDigitYear||r.year>0}set(a,r,n){const c=a.getFullYear();if(n.isTwoDigitYear){const s=Gx(n.year,c);return a.setFullYear(s,0,1),a.setHours(0,0,0,0),a}const i=!("era"in r)||r.era===1?n.year:1-n.year;return a.setFullYear(i,0,1),a.setHours(0,0,0,0),a}}class H21 extends w2{constructor(){super(...arguments);g1(this,"priority",130);g1(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(a,r,n){const c=i=>({year:i,isTwoDigitYear:r==="YY"});switch(r){case"Y":return ge(oe(4,a),c);case"Yo":return ge(n.ordinalNumber(a,{unit:"year"}),c);default:return ge(oe(r.length,a),c)}}validate(a,r){return r.isTwoDigitYear||r.year>0}set(a,r,n,c){const i=Vl(a,c);if(n.isTwoDigitYear){const l=Gx(n.year,i);return a.setFullYear(l,0,c.firstWeekContainsDate),a.setHours(0,0,0,0),y4(a,c)}const s=!("era"in r)||r.era===1?n.year:1-n.year;return a.setFullYear(s,0,c.firstWeekContainsDate),a.setHours(0,0,0,0),y4(a,c)}}class V21 extends w2{constructor(){super(...arguments);g1(this,"priority",130);g1(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(a,r){return Rc(r==="R"?4:r.length,a)}set(a,r,n){const c=z2(a,0);return c.setFullYear(n,0,4),c.setHours(0,0,0,0),aa(c)}}class L21 extends w2{constructor(){super(...arguments);g1(this,"priority",130);g1(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(a,r){return Rc(r==="u"?4:r.length,a)}set(a,r,n){return a.setFullYear(n,0,1),a.setHours(0,0,0,0),a}}class S21 extends w2{constructor(){super(...arguments);g1(this,"priority",120);g1(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(a,r,n){switch(r){case"Q":case"QQ":return oe(r.length,a);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"})||n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})||n.quarter(a,{width:"abbreviated",context:"formatting"})||n.quarter(a,{width:"narrow",context:"formatting"})}}validate(a,r){return r>=1&&r<=4}set(a,r,n){return a.setMonth((n-1)*3,1),a.setHours(0,0,0,0),a}}class A21 extends w2{constructor(){super(...arguments);g1(this,"priority",120);g1(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(a,r,n){switch(r){case"q":case"qq":return oe(r.length,a);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"})||n.quarter(a,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})||n.quarter(a,{width:"abbreviated",context:"standalone"})||n.quarter(a,{width:"narrow",context:"standalone"})}}validate(a,r){return r>=1&&r<=4}set(a,r,n){return a.setMonth((n-1)*3,1),a.setHours(0,0,0,0),a}}class T21 extends w2{constructor(){super(...arguments);g1(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);g1(this,"priority",110)}parse(a,r,n){const c=i=>i-1;switch(r){case"M":return ge(ae(ve.month,a),c);case"MM":return ge(oe(2,a),c);case"Mo":return ge(n.ordinalNumber(a,{unit:"month"}),c);case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"})||n.month(a,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})||n.month(a,{width:"abbreviated",context:"formatting"})||n.month(a,{width:"narrow",context:"formatting"})}}validate(a,r){return r>=0&&r<=11}set(a,r,n){return a.setMonth(n,1),a.setHours(0,0,0,0),a}}class E21 extends w2{constructor(){super(...arguments);g1(this,"priority",110);g1(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(a,r,n){const c=i=>i-1;switch(r){case"L":return ge(ae(ve.month,a),c);case"LL":return ge(oe(2,a),c);case"Lo":return ge(n.ordinalNumber(a,{unit:"month"}),c);case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"})||n.month(a,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})||n.month(a,{width:"abbreviated",context:"standalone"})||n.month(a,{width:"narrow",context:"standalone"})}}validate(a,r){return r>=0&&r<=11}set(a,r,n){return a.setMonth(n,1),a.setHours(0,0,0,0),a}}function N21(e,t,a){const r=Y1(e),n=Ll(r,a)-t;return r.setDate(r.getDate()-n*7),r}class D21 extends w2{constructor(){super(...arguments);g1(this,"priority",100);g1(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(a,r,n){switch(r){case"w":return ae(ve.week,a);case"wo":return n.ordinalNumber(a,{unit:"week"});default:return oe(r.length,a)}}validate(a,r){return r>=1&&r<=53}set(a,r,n,c){return y4(N21(a,n,c),c)}}function O21(e,t){const a=Y1(e),r=Hl(a)-t;return a.setDate(a.getDate()-r*7),a}class P21 extends w2{constructor(){super(...arguments);g1(this,"priority",100);g1(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(a,r,n){switch(r){case"I":return ae(ve.week,a);case"Io":return n.ordinalNumber(a,{unit:"week"});default:return oe(r.length,a)}}validate(a,r){return r>=1&&r<=53}set(a,r,n){return aa(O21(a,n))}}const B21=[31,28,31,30,31,30,31,31,30,31,30,31],F21=[31,29,31,30,31,30,31,31,30,31,30,31];class R21 extends w2{constructor(){super(...arguments);g1(this,"priority",90);g1(this,"subPriority",1);g1(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(a,r,n){switch(r){case"d":return ae(ve.date,a);case"do":return n.ordinalNumber(a,{unit:"date"});default:return oe(r.length,a)}}validate(a,r){const n=a.getFullYear(),c=Xx(n),i=a.getMonth();return c?r>=1&&r<=F21[i]:r>=1&&r<=B21[i]}set(a,r,n){return a.setDate(n),a.setHours(0,0,0,0),a}}class I21 extends w2{constructor(){super(...arguments);g1(this,"priority",90);g1(this,"subpriority",1);g1(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(a,r,n){switch(r){case"D":case"DD":return ae(ve.dayOfYear,a);case"Do":return n.ordinalNumber(a,{unit:"date"});default:return oe(r.length,a)}}validate(a,r){const n=a.getFullYear();return Xx(n)?r>=1&&r<=366:r>=1&&r<=365}set(a,r,n){return a.setMonth(0,n),a.setHours(0,0,0,0),a}}function Al(e,t,a){var d,h,m,v;const r=v6(),n=(a==null?void 0:a.weekStartsOn)??((h=(d=a==null?void 0:a.locale)==null?void 0:d.options)==null?void 0:h.weekStartsOn)??r.weekStartsOn??((v=(m=r.locale)==null?void 0:m.options)==null?void 0:v.weekStartsOn)??0,c=Y1(e),i=c.getDay(),l=(t%7+7)%7,f=7-n,u=t<0||t>6?t-(i+f)%7:(l+f)%7-(i+f)%7;return J3(c,u)}class $21 extends w2{constructor(){super(...arguments);g1(this,"priority",90);g1(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(a,r,n){switch(r){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})||n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"})}}validate(a,r){return r>=0&&r<=6}set(a,r,n,c){return a=Al(a,n,c),a.setHours(0,0,0,0),a}}class U21 extends w2{constructor(){super(...arguments);g1(this,"priority",90);g1(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(a,r,n,c){const i=s=>{const l=Math.floor((s-1)/7)*7;return(s+c.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return ge(oe(r.length,a),i);case"eo":return ge(n.ordinalNumber(a,{unit:"day"}),i);case"eee":return n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})||n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"})}}validate(a,r){return r>=0&&r<=6}set(a,r,n,c){return a=Al(a,n,c),a.setHours(0,0,0,0),a}}class W21 extends w2{constructor(){super(...arguments);g1(this,"priority",90);g1(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(a,r,n,c){const i=s=>{const l=Math.floor((s-1)/7)*7;return(s+c.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return ge(oe(r.length,a),i);case"co":return ge(n.ordinalNumber(a,{unit:"day"}),i);case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"})||n.day(a,{width:"short",context:"standalone"})||n.day(a,{width:"narrow",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"})||n.day(a,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})||n.day(a,{width:"abbreviated",context:"standalone"})||n.day(a,{width:"short",context:"standalone"})||n.day(a,{width:"narrow",context:"standalone"})}}validate(a,r){return r>=0&&r<=6}set(a,r,n,c){return a=Al(a,n,c),a.setHours(0,0,0,0),a}}function q21(e,t){const a=Y1(e),r=b21(a),n=t-r;return J3(a,n)}class j21 extends w2{constructor(){super(...arguments);g1(this,"priority",90);g1(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(a,r,n){const c=i=>i===0?7:i;switch(r){case"i":case"ii":return oe(r.length,a);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return ge(n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"}),c);case"iiiii":return ge(n.day(a,{width:"narrow",context:"formatting"}),c);case"iiiiii":return ge(n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"}),c);case"iiii":default:return ge(n.day(a,{width:"wide",context:"formatting"})||n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"}),c)}}validate(a,r){return r>=1&&r<=7}set(a,r,n){return a=q21(a,n),a.setHours(0,0,0,0),a}}class Y21 extends w2{constructor(){super(...arguments);g1(this,"priority",80);g1(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(a,r,n){switch(r){case"a":case"aa":case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})||n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"})}}set(a,r,n){return a.setHours(Sl(n),0,0,0),a}}class G21 extends w2{constructor(){super(...arguments);g1(this,"priority",80);g1(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(a,r,n){switch(r){case"b":case"bb":case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})||n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"})}}set(a,r,n){return a.setHours(Sl(n),0,0,0),a}}class X21 extends w2{constructor(){super(...arguments);g1(this,"priority",80);g1(this,"incompatibleTokens",["a","b","t","T"])}parse(a,r,n){switch(r){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})||n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"})}}set(a,r,n){return a.setHours(Sl(n),0,0,0),a}}class K21 extends w2{constructor(){super(...arguments);g1(this,"priority",70);g1(this,"incompatibleTokens",["H","K","k","t","T"])}parse(a,r,n){switch(r){case"h":return ae(ve.hour12h,a);case"ho":return n.ordinalNumber(a,{unit:"hour"});default:return oe(r.length,a)}}validate(a,r){return r>=1&&r<=12}set(a,r,n){const c=a.getHours()>=12;return c&&n<12?a.setHours(n+12,0,0,0):!c&&n===12?a.setHours(0,0,0,0):a.setHours(n,0,0,0),a}}class Z21 extends w2{constructor(){super(...arguments);g1(this,"priority",70);g1(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(a,r,n){switch(r){case"H":return ae(ve.hour23h,a);case"Ho":return n.ordinalNumber(a,{unit:"hour"});default:return oe(r.length,a)}}validate(a,r){return r>=0&&r<=23}set(a,r,n){return a.setHours(n,0,0,0),a}}class Q21 extends w2{constructor(){super(...arguments);g1(this,"priority",70);g1(this,"incompatibleTokens",["h","H","k","t","T"])}parse(a,r,n){switch(r){case"K":return ae(ve.hour11h,a);case"Ko":return n.ordinalNumber(a,{unit:"hour"});default:return oe(r.length,a)}}validate(a,r){return r>=0&&r<=11}set(a,r,n){return a.getHours()>=12&&n<12?a.setHours(n+12,0,0,0):a.setHours(n,0,0,0),a}}class J21 extends w2{constructor(){super(...arguments);g1(this,"priority",70);g1(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(a,r,n){switch(r){case"k":return ae(ve.hour24h,a);case"ko":return n.ordinalNumber(a,{unit:"hour"});default:return oe(r.length,a)}}validate(a,r){return r>=1&&r<=24}set(a,r,n){const c=n<=24?n%24:n;return a.setHours(c,0,0,0),a}}class ee1 extends w2{constructor(){super(...arguments);g1(this,"priority",60);g1(this,"incompatibleTokens",["t","T"])}parse(a,r,n){switch(r){case"m":return ae(ve.minute,a);case"mo":return n.ordinalNumber(a,{unit:"minute"});default:return oe(r.length,a)}}validate(a,r){return r>=0&&r<=59}set(a,r,n){return a.setMinutes(n,0,0),a}}class te1 extends w2{constructor(){super(...arguments);g1(this,"priority",50);g1(this,"incompatibleTokens",["t","T"])}parse(a,r,n){switch(r){case"s":return ae(ve.second,a);case"so":return n.ordinalNumber(a,{unit:"second"});default:return oe(r.length,a)}}validate(a,r){return r>=0&&r<=59}set(a,r,n){return a.setSeconds(n,0),a}}class ae1 extends w2{constructor(){super(...arguments);g1(this,"priority",30);g1(this,"incompatibleTokens",["t","T"])}parse(a,r){const n=c=>Math.trunc(c*Math.pow(10,-r.length+3));return ge(oe(r.length,a),n)}set(a,r,n){return a.setMilliseconds(n),a}}class re1 extends w2{constructor(){super(...arguments);g1(this,"priority",10);g1(this,"incompatibleTokens",["t","T","x"])}parse(a,r){switch(r){case"X":return S4(L4.basicOptionalMinutes,a);case"XX":return S4(L4.basic,a);case"XXXX":return S4(L4.basicOptionalSeconds,a);case"XXXXX":return S4(L4.extendedOptionalSeconds,a);case"XXX":default:return S4(L4.extended,a)}}set(a,r,n){return r.timestampIsSet?a:z2(a,a.getTime()-Fc(a)-n)}}class ne1 extends w2{constructor(){super(...arguments);g1(this,"priority",10);g1(this,"incompatibleTokens",["t","T","X"])}parse(a,r){switch(r){case"x":return S4(L4.basicOptionalMinutes,a);case"xx":return S4(L4.basic,a);case"xxxx":return S4(L4.basicOptionalSeconds,a);case"xxxxx":return S4(L4.extendedOptionalSeconds,a);case"xxx":default:return S4(L4.extended,a)}}set(a,r,n){return r.timestampIsSet?a:z2(a,a.getTime()-Fc(a)-n)}}class ce1 extends w2{constructor(){super(...arguments);g1(this,"priority",40);g1(this,"incompatibleTokens","*")}parse(a){return Yx(a)}set(a,r,n){return[z2(a,n*1e3),{timestampIsSet:!0}]}}class ie1 extends w2{constructor(){super(...arguments);g1(this,"priority",20);g1(this,"incompatibleTokens","*")}parse(a){return Yx(a)}set(a,r,n){return[z2(a,n),{timestampIsSet:!0}]}}const se1={G:new _21,y:new k21,Y:new H21,R:new V21,u:new L21,Q:new S21,q:new A21,M:new T21,L:new E21,w:new D21,I:new P21,d:new R21,D:new I21,E:new $21,e:new U21,c:new W21,i:new j21,a:new Y21,b:new G21,B:new X21,h:new K21,H:new Z21,K:new Q21,k:new J21,m:new ee1,s:new te1,S:new ae1,X:new re1,x:new ne1,t:new ce1,T:new ie1},oe1=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,le1=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,fe1=/^'([^]*?)'?$/,ue1=/''/g,de1=/\S/,he1=/[a-zA-Z]/;function N7(e,t,a,r){var p,g,y,x,C,b,M,w;const n=x21(),c=(r==null?void 0:r.locale)??n.locale??$x,i=(r==null?void 0:r.firstWeekContainsDate)??((g=(p=r==null?void 0:r.locale)==null?void 0:p.options)==null?void 0:g.firstWeekContainsDate)??n.firstWeekContainsDate??((x=(y=n.locale)==null?void 0:y.options)==null?void 0:x.firstWeekContainsDate)??1,s=(r==null?void 0:r.weekStartsOn)??((b=(C=r==null?void 0:r.locale)==null?void 0:C.options)==null?void 0:b.weekStartsOn)??n.weekStartsOn??((w=(M=n.locale)==null?void 0:M.options)==null?void 0:w.weekStartsOn)??0;if(t==="")return e===""?Y1(a):z2(a,NaN);const l={firstWeekContainsDate:i,weekStartsOn:s,locale:c},f=[new w21],u=t.match(le1).map(z=>{const H=z[0];if(H in T7){const A=T7[H];return A(z,c.formatLong)}return z}).join("").match(oe1),d=[];for(let z of u){!(r!=null&&r.useAdditionalWeekYearTokens)&&qx(z)&&E7(z,t,e),!(r!=null&&r.useAdditionalDayOfYearTokens)&&Wx(z)&&E7(z,t,e);const H=z[0],A=se1[H];if(A){const{incompatibleTokens:V}=A;if(Array.isArray(V)){const _=d.find(N=>V.includes(N.token)||N.token===H);if(_)throw new RangeError(`The format string mustn't contain \`${_.fullToken}\` and \`${z}\` at the same time`)}else if(A.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${z}\` and any other token at the same time`);d.push({token:H,fullToken:z});const k=A.run(e,z,c.match,l);if(!k)return z2(a,NaN);f.push(k.setter),e=k.rest}else{if(H.match(he1))throw new RangeError("Format string contains an unescaped latin alphabet character `"+H+"`");if(z==="''"?z="'":H==="'"&&(z=me1(z)),e.indexOf(z)===0)e=e.slice(z.length);else return z2(a,NaN)}}if(e.length>0&&de1.test(e))return z2(a,NaN);const h=f.map(z=>z.priority).sort((z,H)=>H-z).filter((z,H,A)=>A.indexOf(z)===H).map(z=>f.filter(H=>H.priority===z).sort((H,A)=>A.subPriority-H.subPriority)).map(z=>z[0]);let m=Y1(a);if(isNaN(m.getTime()))return z2(a,NaN);const v={};for(const z of h){if(!z.validate(m,l))return z2(a,NaN);const H=z.set(m,v,l);Array.isArray(H)?(m=H[0],Object.assign(v,H[1])):m=H}return z2(a,m)}function me1(e){return e.match(fe1)[1].replace(ue1,"'")}function Qh(e,t){const a=$0(e),r=$0(t);return+a==+r}function pe1(e,t){return J3(e,-t)}function Kx(e,t){const a=Y1(e),r=a.getFullYear(),n=a.getDate(),c=z2(e,0);c.setFullYear(r,t,15),c.setHours(0,0,0,0);const i=y21(c);return a.setMonth(t,Math.min(n,i)),a}function N2(e,t){let a=Y1(e);return isNaN(+a)?z2(e,NaN):(t.year!=null&&a.setFullYear(t.year),t.month!=null&&(a=Kx(a,t.month)),t.date!=null&&a.setDate(t.date),t.hours!=null&&a.setHours(t.hours),t.minutes!=null&&a.setMinutes(t.minutes),t.seconds!=null&&a.setSeconds(t.seconds),t.milliseconds!=null&&a.setMilliseconds(t.milliseconds),a)}function Zx(e,t){const a=Y1(e);return a.setHours(t),a}function Tl(e,t){const a=Y1(e);return a.setMilliseconds(t),a}function Qx(e,t){const a=Y1(e);return a.setMinutes(t),a}function El(e,t){const a=Y1(e);return a.setSeconds(t),a}function E4(e,t){const a=Y1(e);return isNaN(+a)?z2(e,NaN):(a.setFullYear(t),a)}function ca(e,t){return f4(e,-t)}function ve1(e,t){const{years:a=0,months:r=0,weeks:n=0,days:c=0,hours:i=0,minutes:s=0,seconds:l=0}=t,f=ca(e,r+a*12),u=pe1(f,c+n*7),d=s+i*60,m=(l+d*60)*1e3;return z2(e,u.getTime()-m)}function Jx(e,t){return _l(e,-t)}function pa(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[o.createElementVNode("path",{d:"M29.333 8c0-2.208-1.792-4-4-4h-18.667c-2.208 0-4 1.792-4 4v18.667c0 2.208 1.792 4 4 4h18.667c2.208 0 4-1.792 4-4v-18.667zM26.667 8v18.667c0 0.736-0.597 1.333-1.333 1.333 0 0-18.667 0-18.667 0-0.736 0-1.333-0.597-1.333-1.333 0 0 0-18.667 0-18.667 0-0.736 0.597-1.333 1.333-1.333 0 0 18.667 0 18.667 0 0.736 0 1.333 0.597 1.333 1.333z"}),o.createElementVNode("path",{d:"M20 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),o.createElementVNode("path",{d:"M9.333 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),o.createElementVNode("path",{d:"M4 14.667h24c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-24c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"})])}pa.compatConfig={MODE:3};function eb(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[o.createElementVNode("path",{d:"M23.057 7.057l-16 16c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l16-16c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0z"}),o.createElementVNode("path",{d:"M7.057 8.943l16 16c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885l-16-16c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}eb.compatConfig={MODE:3};function Nl(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[o.createElementVNode("path",{d:"M20.943 23.057l-7.057-7.057c0 0 7.057-7.057 7.057-7.057 0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-8 8c-0.521 0.521-0.521 1.365 0 1.885l8 8c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}Nl.compatConfig={MODE:3};function Dl(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[o.createElementVNode("path",{d:"M12.943 24.943l8-8c0.521-0.521 0.521-1.365 0-1.885l-8-8c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885l7.057 7.057c0 0-7.057 7.057-7.057 7.057-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0z"})])}Dl.compatConfig={MODE:3};function Ol(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[o.createElementVNode("path",{d:"M16 1.333c-8.095 0-14.667 6.572-14.667 14.667s6.572 14.667 14.667 14.667c8.095 0 14.667-6.572 14.667-14.667s-6.572-14.667-14.667-14.667zM16 4c6.623 0 12 5.377 12 12s-5.377 12-12 12c-6.623 0-12-5.377-12-12s5.377-12 12-12z"}),o.createElementVNode("path",{d:"M14.667 8v8c0 0.505 0.285 0.967 0.737 1.193l5.333 2.667c0.658 0.329 1.46 0.062 1.789-0.596s0.062-1.46-0.596-1.789l-4.596-2.298c0 0 0-7.176 0-7.176 0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"})])}Ol.compatConfig={MODE:3};function Pl(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[o.createElementVNode("path",{d:"M24.943 19.057l-8-8c-0.521-0.521-1.365-0.521-1.885 0l-8 8c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l7.057-7.057c0 0 7.057 7.057 7.057 7.057 0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}Pl.compatConfig={MODE:3};function Bl(){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon"},[o.createElementVNode("path",{d:"M7.057 12.943l8 8c0.521 0.521 1.365 0.521 1.885 0l8-8c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-7.057 7.057c0 0-7.057-7.057-7.057-7.057-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}Bl.compatConfig={MODE:3};const B4=(e,t)=>t?new Date(e.toLocaleString("en-US",{timeZone:t})):new Date(e),tb=(e,t)=>D7(e,t)||A1(),ge1=(e,t)=>t.dateInTz?B4(new Date(e),t.dateInTz):A1(e),D7=(e,t)=>{if(!e)return null;if(!t)return A1(e);const a=A1(e);return t.exactMatch?ge1(e,t):B4(a,t.timezone)},ye1=e=>{if(!e)return 0;const t=new Date,a=new Date(t.toLocaleString("en-US",{timeZone:"UTC"})),r=new Date(t.toLocaleString("en-US",{timeZone:e})),n=r.getTimezoneOffset()/60;return(+a-+r)/(1e3*60*60)-n};var X3=(e=>(e.month="month",e.year="year",e))(X3||{}),O0=(e=>(e.top="top",e.bottom="bottom",e))(O0||{}),G0=(e=>(e.header="header",e.calendar="calendar",e.timePicker="timePicker",e))(G0||{}),Ye=(e=>(e.month="month",e.year="year",e.calendar="calendar",e.time="time",e.minutes="minutes",e.hours="hours",e.seconds="seconds",e))(Ye||{});const xe1=["timestamp","date","iso"];var c3=(e=>(e.up="up",e.down="down",e.left="left",e.right="right",e))(c3||{}),te=(e=>(e.arrowUp="ArrowUp",e.arrowDown="ArrowDown",e.arrowLeft="ArrowLeft",e.arrowRight="ArrowRight",e.enter="Enter",e.space=" ",e.esc="Escape",e.tab="Tab",e.home="Home",e.end="End",e.pageUp="PageUp",e.pageDown="PageDown",e))(te||{});function Jh(e){return t=>new Intl.DateTimeFormat(e,{weekday:"short",timeZone:"UTC"}).format(new Date(`2017-01-0${t}T00:00:00+00:00`)).slice(0,2)}function be1(e){return t=>P4(new Date(`2017-01-0${t}T00:00:00+00:00`),"EEEEEE",{locale:e})}const Ce1=(e,t,a)=>{const r=[1,2,3,4,5,6,7];let n;if(e!==null)try{n=r.map(be1(e))}catch{n=r.map(Jh(t))}else n=r.map(Jh(t));const c=n.slice(0,a),i=n.slice(a+1,n.length);return[n[a]].concat(...i).concat(...c)},Fl=(e,t,a)=>{const r=[];for(let n=+e[0];n<=+e[1];n++)r.push({value:+n,text:cb(n,t)});return a?r.reverse():r},ab=(e,t,a)=>{const r=[1,2,3,4,5,6,7,8,9,10,11,12].map(c=>{const i=c<10?`0${c}`:c;return new Date(`2017-${i}-01T00:00:00+00:00`)});if(e!==null)try{const c=a==="long"?"MMMM":"MMM";return r.map((i,s)=>{const l=P4(B4(i,"UTC"),c,{locale:e});return{text:l.charAt(0).toUpperCase()+l.substring(1),value:s}})}catch{}const n=new Intl.DateTimeFormat(t,{month:a,timeZone:"UTC"});return r.map((c,i)=>{const s=n.format(c);return{text:s.charAt(0).toUpperCase()+s.substring(1),value:i}})},Me1=e=>[12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11][e],ke=e=>{const t=o.unref(e);return t!=null&&t.$el?t==null?void 0:t.$el:t},ze1=e=>({type:"dot",...e??{}}),rb=e=>Array.isArray(e)?!!e[0]&&!!e[1]:!1,Rl={prop:e=>`"${e}" prop must be enabled!`,dateArr:e=>`You need to use array as "model-value" binding in order to support "${e}"`},Te=e=>e,em=e=>e===0?e:!e||isNaN(+e)?null:+e,tm=e=>e===null,nb=e=>{if(e)return[...e.querySelectorAll("input, button, select, textarea, a[href]")][0]},we1=e=>{const t=[],a=r=>r.filter(n=>n);for(let r=0;r<e.length;r+=3){const n=[e[r],e[r+1],e[r+2]];t.push(a(n))}return t},an=(e,t,a)=>{const r=a!=null,n=t!=null;if(!r&&!n)return!1;const c=+a,i=+t;return r&&n?+e>c||+e<i:r?+e>c:n?+e<i:!1},ia=(e,t)=>we1(e).map(a=>a.map(r=>{const{active:n,disabled:c,isBetween:i,highlighted:s}=t(r);return{...r,active:n,disabled:c,className:{dp__overlay_cell_active:n,dp__overlay_cell:!n,dp__overlay_cell_disabled:c,dp__overlay_cell_pad:!0,dp__overlay_cell_active_disabled:c&&n,dp__cell_in_between:i,"dp--highlighted":s}}})),r0=(e,t,a=!1)=>{e&&t.allowStopPropagation&&(a&&e.stopImmediatePropagation(),e.stopPropagation())},_e1=()=>["a[href]","area[href]","input:not([disabled]):not([type='hidden'])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","[tabindex]:not([tabindex='-1'])","[data-datepicker-instance]"].join(", ");function ke1(e,t){let a=[...document.querySelectorAll(_e1())];a=a.filter(n=>!e.contains(n)||n.hasAttribute("data-datepicker-instance"));const r=a.indexOf(e);if(r>=0&&(t?r-1>=0:r+1<=a.length))return a[r+(t?-1:1)]}const He1=(e,t)=>e==null?void 0:e.querySelector(`[data-dp-element="${t}"]`),cb=(e,t)=>new Intl.NumberFormat(t,{useGrouping:!1,style:"decimal"}).format(e),Il=e=>P4(e,"dd-MM-yyyy"),ts=e=>Array.isArray(e),Ic=(e,t)=>t.get(Il(e)),Ve1=(e,t)=>e?t?t instanceof Map?!!Ic(e,t):t(A1(e)):!1:!0,y3=(e,t,a=!1)=>{if(e.key===te.enter||e.key===te.space)return a&&e.preventDefault(),t()},am=(e,t,a,r,n,c)=>{const i=N7(e,t.slice(0,e.length),new Date,{locale:c});return vr(i)&&Bx(i)?r||n?i:N2(i,{hours:+a.hours,minutes:+(a==null?void 0:a.minutes),seconds:+(a==null?void 0:a.seconds),milliseconds:0}):null},Le1=(e,t,a,r,n,c)=>{const i=Array.isArray(a)?a[0]:a;if(typeof t=="string")return am(e,t,i,r,n,c);if(Array.isArray(t)){let s=null;for(const l of t)if(s=am(e,l,i,r,n,c),s)break;return s}return typeof t=="function"?t(e):null},A1=e=>e?new Date(e):new Date,Se1=(e,t,a)=>{if(t){const n=(e.getMonth()+1).toString().padStart(2,"0"),c=e.getDate().toString().padStart(2,"0"),i=e.getHours().toString().padStart(2,"0"),s=e.getMinutes().toString().padStart(2,"0"),l=a?e.getSeconds().toString().padStart(2,"0"):"00";return`${e.getFullYear()}-${n}-${c}T${i}:${s}:${l}.000Z`}const r=Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds());return new Date(r).toISOString()},k3=e=>{let t=A1(JSON.parse(JSON.stringify(e)));return t=Zx(t,0),t=Qx(t,0),t=El(t,0),t=Tl(t,0),t},n0=(e,t,a,r)=>{let n=e?A1(e):A1();return(t||t===0)&&(n=Zx(n,+t)),(a||a===0)&&(n=Qx(n,+a)),(r||r===0)&&(n=El(n,+r)),Tl(n,0)},ne=(e,t)=>!e||!t?!1:tn(k3(e),k3(t)),l2=(e,t)=>!e||!t?!1:P6(k3(e),k3(t)),me=(e,t)=>!e||!t?!1:na(k3(e),k3(t)),O5=(e,t,a)=>e!=null&&e[0]&&e!=null&&e[1]?me(a,e[0])&&ne(a,e[1]):e!=null&&e[0]&&t?me(a,e[0])&&ne(a,t)||ne(a,e[0])&&me(a,t):!1,e4=e=>{const t=N2(new Date(e),{date:1});return k3(t)},as=(e,t,a)=>t&&(a||a===0)?Object.fromEntries(["hours","minutes","seconds"].map(r=>r===t?[r,a]:[r,isNaN(+e[r])?void 0:+e[r]])):{hours:isNaN(+e.hours)?void 0:+e.hours,minutes:isNaN(+e.minutes)?void 0:+e.minutes,seconds:isNaN(+e.seconds)?void 0:+e.seconds},X0=e=>({hours:wt(e),minutes:h0(e),seconds:ra(e)}),ib=(e,t)=>{if(t){const a=n2(A1(t));if(a>e)return 12;if(a===e)return o2(A1(t))}},sb=(e,t)=>{if(t){const a=n2(A1(t));return a<e?-1:a===e?o2(A1(t)):void 0}},sa=e=>{if(e)return n2(A1(e))},ob=(e,t)=>{const a=me(e,t)?t:e,r=me(t,e)?t:e;return Fx({start:a,end:r})},Ae1=e=>{const t=f4(e,1);return{month:o2(t),year:n2(t)}},nt=(e,t)=>{const a=y4(e,{weekStartsOn:+t}),r=Ix(e,{weekStartsOn:+t});return[a,r]},lb=(e,t)=>{const a={hours:wt(A1()),minutes:h0(A1()),seconds:t?ra(A1()):0};return Object.assign(a,e)},Xt=(e,t,a)=>[N2(A1(e),{date:1}),N2(A1(),{month:t,year:a,date:1})],ut=(e,t,a)=>{let r=e?A1(e):A1();return(t||t===0)&&(r=Kx(r,t)),a&&(r=E4(r,a)),r},fb=(e,t,a,r,n)=>{if(!r||n&&!t||!n&&!a)return!1;const c=n?f4(e,1):ca(e,1),i=[o2(c),n2(c)];return n?!Ee1(...i,t):!Te1(...i,a)},Te1=(e,t,a)=>ne(...Xt(a,e,t))||l2(...Xt(a,e,t)),Ee1=(e,t,a)=>me(...Xt(a,e,t))||l2(...Xt(a,e,t)),ub=(e,t,a,r,n,c,i)=>{if(typeof t=="function"&&!i)return t(e);const s=a?{locale:a}:void 0;return Array.isArray(e)?`${P4(e[0],c,s)}${n&&!e[1]?"":r}${e[1]?P4(e[1],c,s):""}`:P4(e,c,s)},V6=e=>{if(e)return null;throw new Error(Rl.prop("partial-range"))},z8=(e,t)=>{if(t)return e();throw new Error(Rl.prop("range"))},O7=e=>Array.isArray(e)?vr(e[0])&&(e[1]?vr(e[1]):!0):e?vr(e):!1,Ne1=(e,t)=>N2(t??A1(),{hours:+e.hours||0,minutes:+e.minutes||0,seconds:+e.seconds||0}),rs=(e,t,a,r)=>{if(!e)return!0;if(r){const n=a==="max"?tn(e,t):na(e,t),c={seconds:0,milliseconds:0};return n||P6(N2(e,c),N2(t,c))}return a==="max"?e.getTime()<=t.getTime():e.getTime()>=t.getTime()},ns=(e,t,a)=>e?Ne1(e,t):A1(a??t),rm=(e,t,a,r,n)=>{if(Array.isArray(r)){const i=ns(e,r[0],t),s=ns(e,r[1],t);return rs(r[0],i,a,!!t)&&rs(r[1],s,a,!!t)&&n}const c=ns(e,r,t);return rs(r,c,a,!!t)&&n},cs=e=>N2(A1(),X0(e)),De1=(e,t)=>e instanceof Map?Array.from(e.values()).filter(a=>n2(A1(a))===t).map(a=>o2(a)):[],db=(e,t,a)=>typeof e=="function"?e({month:t,year:a}):!!e.months.find(r=>r.month===t&&r.year===a),$l=(e,t)=>typeof e=="function"?e(t):e.years.includes(t),Ra=o.reactive({menuFocused:!1,shiftKeyInMenu:!1}),hb=()=>{const e=a=>{Ra.menuFocused=a},t=a=>{Ra.shiftKeyInMenu!==a&&(Ra.shiftKeyInMenu=a)};return{control:o.computed(()=>({shiftKeyInMenu:Ra.shiftKeyInMenu,menuFocused:Ra.menuFocused})),setMenuFocused:e,setShiftKey:t}},P2=o.reactive({monthYear:[],calendar:[],time:[],actionRow:[],selectionGrid:[],timePicker:{0:[],1:[]},monthPicker:[]}),is=o.ref(null),w8=o.ref(!1),ss=o.ref(!1),os=o.ref(!1),ls=o.ref(!1),We=o.ref(0),ue=o.ref(0),x0=()=>{const e=o.computed(()=>w8.value?[...P2.selectionGrid,P2.actionRow].filter(d=>d.length):ss.value?[...P2.timePicker[0],...P2.timePicker[1],ls.value?[]:[is.value],P2.actionRow].filter(d=>d.length):os.value?[...P2.monthPicker,P2.actionRow]:[P2.monthYear,...P2.calendar,P2.time,P2.actionRow].filter(d=>d.length)),t=d=>{We.value=d?We.value+1:We.value-1;let h=null;e.value[ue.value]&&(h=e.value[ue.value][We.value]),!h&&e.value[ue.value+(d?1:-1)]?(ue.value=ue.value+(d?1:-1),We.value=d?0:e.value[ue.value].length-1):h||(We.value=d?We.value-1:We.value+1)},a=d=>{ue.value===0&&!d||ue.value===e.value.length&&d||(ue.value=d?ue.value+1:ue.value-1,e.value[ue.value]?e.value[ue.value]&&!e.value[ue.value][We.value]&&We.value!==0&&(We.value=e.value[ue.value].length-1):ue.value=d?ue.value-1:ue.value+1)},r=d=>{let h=null;e.value[ue.value]&&(h=e.value[ue.value][We.value]),h?h.focus({preventScroll:!w8.value}):We.value=d?We.value-1:We.value+1},n=()=>{t(!0),r(!0)},c=()=>{t(!1),r(!1)},i=()=>{a(!1),r(!0)},s=()=>{a(!0),r(!0)},l=(d,h)=>{P2[h]=d},f=(d,h)=>{P2[h]=d},u=()=>{We.value=0,ue.value=0};return{buildMatrix:l,buildMultiLevelMatrix:f,setTimePickerBackRef:d=>{is.value=d},setSelectionGrid:d=>{w8.value=d,u(),d||(P2.selectionGrid=[])},setTimePicker:(d,h=!1)=>{ss.value=d,ls.value=h,u(),d||(P2.timePicker[0]=[],P2.timePicker[1]=[])},setTimePickerElements:(d,h=0)=>{P2.timePicker[h]=d},arrowRight:n,arrowLeft:c,arrowUp:i,arrowDown:s,clearArrowNav:()=>{P2.monthYear=[],P2.calendar=[],P2.time=[],P2.actionRow=[],P2.selectionGrid=[],P2.timePicker[0]=[],P2.timePicker[1]=[],w8.value=!1,ss.value=!1,ls.value=!1,os.value=!1,u(),is.value=null},setMonthPicker:d=>{os.value=d,u()},refSets:P2}},nm=e=>({menuAppearTop:"dp-menu-appear-top",menuAppearBottom:"dp-menu-appear-bottom",open:"dp-slide-down",close:"dp-slide-up",next:"calendar-next",previous:"calendar-prev",vNext:"dp-slide-up",vPrevious:"dp-slide-down",...e??{}}),Oe1=e=>({toggleOverlay:"Toggle overlay",menu:"Datepicker menu",input:"Datepicker input",calendarWrap:"Calendar wrapper",calendarDays:"Calendar days",openTimePicker:"Open time picker",closeTimePicker:"Close time Picker",incrementValue:t=>`Increment ${t}`,decrementValue:t=>`Decrement ${t}`,openTpOverlay:t=>`Open ${t} overlay`,amPmButton:"Switch AM/PM mode",openYearsOverlay:"Open years overlay",openMonthsOverlay:"Open months overlay",nextMonth:"Next month",prevMonth:"Previous month",nextYear:"Next year",prevYear:"Previous year",day:void 0,weekDay:void 0,...e??{}}),cm=e=>e?typeof e=="boolean"?e?2:0:+e>=2?+e:2:0,Pe1=e=>{const t=typeof e=="object"&&e,a={static:!0,solo:!1};if(!e)return{...a,count:cm(!1)};const r=t?e:{},n=t?r.count??!0:e,c=cm(n);return Object.assign(a,r,{count:c})},Be1=(e,t,a)=>e||(typeof a=="string"?a:t),Fe1=e=>typeof e=="boolean"?e?nm({}):!1:nm(e),Re1=e=>{const t={enterSubmit:!0,tabSubmit:!0,openMenu:!0,selectOnFocus:!1,rangeSeparator:" - "};return typeof e=="object"?{...t,...e??{},enabled:!0}:{...t,enabled:e}},Ie1=e=>({months:[],years:[],times:{hours:[],minutes:[],seconds:[]},...e??{}}),$e1=e=>({showSelect:!0,showCancel:!0,showNow:!1,showPreview:!0,...e??{}}),Ue1=e=>{const t={input:!1};return typeof e=="object"?{...t,...e??{},enabled:!0}:{enabled:e,...t}},We1=e=>({allowStopPropagation:!0,closeOnScroll:!1,modeHeight:255,allowPreventDefault:!1,closeOnClearValue:!0,closeOnAutoApply:!0,noSwipe:!1,keepActionRow:!1,onClickOutside:void 0,tabOutClosesMenu:!0,arrowLeft:void 0,keepViewOnOffsetClick:!1,timeArrowHoldThreshold:0,...e??{}}),qe1=e=>{const t={dates:Array.isArray(e)?e.map(a=>A1(a)):[],years:[],months:[],quarters:[],weeks:[],weekdays:[],options:{highlightDisabled:!1}};return typeof e=="function"?e:{...t,...e??{}}},je1=e=>typeof e=="object"?{type:(e==null?void 0:e.type)??"local",hideOnOffsetDates:(e==null?void 0:e.hideOnOffsetDates)??!1}:{type:e,hideOnOffsetDates:!1},Ye1=(e,t)=>typeof e=="object"?{enabled:!0,...{noDisabledRange:!1,showLastInRange:!0,minMaxRawRange:!1,partialRange:!0,disableTimeRangeValidation:!1,maxRange:void 0,minRange:void 0,autoRange:void 0,fixedStart:!1,fixedEnd:!1},...e}:{enabled:e,noDisabledRange:t.noDisabledRange,showLastInRange:t.showLastInRange,minMaxRawRange:t.minMaxRawRange,partialRange:t.partialRange,disableTimeRangeValidation:t.disableTimeRangeValidation,maxRange:t.maxRange,minRange:t.minRange,autoRange:t.autoRange,fixedStart:t.fixedStart,fixedEnd:t.fixedEnd},Ge1=(e,t)=>e?typeof e=="string"?{timezone:e,exactMatch:!1,dateInTz:void 0,emitTimezone:t,convertModel:!0}:{timezone:e.timezone,exactMatch:e.exactMatch??!1,dateInTz:e.dateInTz??void 0,emitTimezone:t??e.emitTimezone,convertModel:e.convertModel??!0}:{timezone:void 0,exactMatch:!1,emitTimezone:t},fs=(e,t)=>new Map(e.map(a=>{const r=tb(a,t);return[Il(r),r]})),Xe1=(e,t)=>e.length?new Map(e.map(a=>{const r=tb(a.date,t);return[Il(r),a]})):null,Ke1=(e,t,a,r,n,c,i)=>({minDate:D7(e,i),maxDate:D7(t,i),disabledDates:ts(a)?fs(a,i):a,allowedDates:ts(r)?fs(r,i):null,highlight:typeof n=="object"&&ts(n==null?void 0:n.dates)?fs(n.dates,i):n,markers:Xe1(c,i)}),Ze1=(e,t)=>typeof e=="boolean"?{enabled:e,dragSelect:!0,limit:+t}:{enabled:!!e,limit:e.limit?+e.limit:null,dragSelect:e.dragSelect??!0},re=e=>{const t=()=>{const M=e.enableSeconds?":ss":"",w=e.enableMinutes?":mm":"";return e.is24?`HH${w}${M}`:`hh${w}${M} aa`},a=()=>{var M;return e.format?e.format:e.monthPicker?"MM/yyyy":e.timePicker?t():e.weekPicker?`${((M=g.value)==null?void 0:M.type)==="iso"?"RR":"ww"}-yyyy`:e.yearPicker?"yyyy":e.quarterPicker?"QQQ/yyyy":e.enableTimePicker?`MM/dd/yyyy, ${t()}`:"MM/dd/yyyy"},r=M=>lb(M,e.enableSeconds),n=()=>b.value.enabled?e.startTime&&Array.isArray(e.startTime)?[r(e.startTime[0]),r(e.startTime[1])]:null:e.startTime&&!Array.isArray(e.startTime)?r(e.startTime):null,c=o.computed(()=>Pe1(e.multiCalendars)),i=o.computed(()=>n()),s=o.computed(()=>Oe1(e.ariaLabels)),l=o.computed(()=>Ie1(e.filters)),f=o.computed(()=>Fe1(e.transitions)),u=o.computed(()=>$e1(e.actionRow)),d=o.computed(()=>Be1(e.previewFormat,e.format,a())),h=o.computed(()=>Re1(e.textInput)),m=o.computed(()=>Ue1(e.inline)),v=o.computed(()=>We1(e.config)),p=o.computed(()=>qe1(e.highlight)),g=o.computed(()=>je1(e.weekNumbers)),y=o.computed(()=>Ge1(e.timezone,e.emitTimezone)),x=o.computed(()=>Ze1(e.multiDates,e.multiDatesLimit)),C=o.computed(()=>Ke1(e.minDate,e.maxDate,e.disabledDates,e.allowedDates,p.value,e.markers,y.value)),b=o.computed(()=>Ye1(e.range,{minMaxRawRange:!1,maxRange:e.maxRange,minRange:e.minRange,noDisabledRange:e.noDisabledRange,showLastInRange:e.showLastInRange,partialRange:e.partialRange,disableTimeRangeValidation:e.disableTimeRangeValidation,autoRange:e.autoRange,fixedStart:e.fixedStart,fixedEnd:e.fixedEnd}));return{defaultedTransitions:f,defaultedMultiCalendars:c,defaultedStartTime:i,defaultedAriaLabels:s,defaultedFilters:l,defaultedActionRow:u,defaultedPreviewFormat:d,defaultedTextInput:h,defaultedInline:m,defaultedConfig:v,defaultedHighlight:p,defaultedWeekNumbers:g,defaultedRange:b,propDates:C,defaultedTz:y,defaultedMultiDates:x,getDefaultPattern:a,getDefaultStartTime:n}},Qe1=(e,t,a)=>{const r=o.ref(),{defaultedTextInput:n,defaultedRange:c,defaultedTz:i,defaultedMultiDates:s,getDefaultPattern:l}=re(t),f=o.ref(""),u=o.toRef(t,"format"),d=o.toRef(t,"formatLocale");o.watch(r,()=>{typeof t.onInternalModelChange=="function"&&e("internal-model-change",r.value,E(!0))},{deep:!0}),o.watch(c,(R,a1)=>{R.enabled!==a1.enabled&&(r.value=null)}),o.watch(u,()=>{J()});const h=R=>i.value.timezone&&i.value.convertModel?B4(R,i.value.timezone):R,m=R=>{if(i.value.timezone&&i.value.convertModel){const a1=ye1(i.value.timezone);return C11(R,a1)}return R},v=(R,a1,n1=!1)=>ub(R,t.format,t.formatLocale,n.value.rangeSeparator,t.modelAuto,a1??l(),n1),p=R=>R?t.modelType?G(R):{hours:wt(R),minutes:h0(R),seconds:t.enableSeconds?ra(R):0}:null,g=R=>t.modelType?G(R):{month:o2(R),year:n2(R)},y=R=>Array.isArray(R)?s.value.enabled?R.map(a1=>x(a1,E4(A1(),a1))):z8(()=>[E4(A1(),R[0]),R[1]?E4(A1(),R[1]):V6(c.value.partialRange)],c.value.enabled):E4(A1(),+R),x=(R,a1)=>(typeof R=="string"||typeof R=="number")&&t.modelType?Y(R):a1,C=R=>Array.isArray(R)?[x(R[0],n0(null,+R[0].hours,+R[0].minutes,R[0].seconds)),x(R[1],n0(null,+R[1].hours,+R[1].minutes,R[1].seconds))]:x(R,n0(null,R.hours,R.minutes,R.seconds)),b=R=>{const a1=N2(A1(),{date:1});return Array.isArray(R)?s.value.enabled?R.map(n1=>x(n1,ut(a1,+n1.month,+n1.year))):z8(()=>[x(R[0],ut(a1,+R[0].month,+R[0].year)),x(R[1],R[1]?ut(a1,+R[1].month,+R[1].year):V6(c.value.partialRange))],c.value.enabled):x(R,ut(a1,+R.month,+R.year))},M=R=>{if(Array.isArray(R))return R.map(a1=>Y(a1));throw new Error(Rl.dateArr("multi-dates"))},w=R=>{if(Array.isArray(R)&&c.value.enabled){const a1=R[0],n1=R[1];return[A1(Array.isArray(a1)?a1[0]:null),A1(Array.isArray(n1)?n1[0]:null)]}return A1(R[0])},z=R=>t.modelAuto?Array.isArray(R)?[Y(R[0]),Y(R[1])]:t.autoApply?[Y(R)]:[Y(R),null]:Array.isArray(R)?z8(()=>R[1]?[Y(R[0]),R[1]?Y(R[1]):V6(c.value.partialRange)]:[Y(R[0])],c.value.enabled):Y(R),H=()=>{Array.isArray(r.value)&&c.value.enabled&&r.value.length===1&&r.value.push(V6(c.value.partialRange))},A=()=>{const R=r.value;return[G(R[0]),R[1]?G(R[1]):V6(c.value.partialRange)]},V=()=>r.value[1]?A():G(Te(r.value[0])),k=()=>(r.value||[]).map(R=>G(R)),_=(R=!1)=>(R||H(),t.modelAuto?V():s.value.enabled?k():Array.isArray(r.value)?z8(()=>A(),c.value.enabled):G(Te(r.value))),N=R=>!R||Array.isArray(R)&&!R.length?null:t.timePicker?C(Te(R)):t.monthPicker?b(Te(R)):t.yearPicker?y(Te(R)):s.value.enabled?M(Te(R)):t.weekPicker?w(Te(R)):z(Te(R)),q=R=>{const a1=N(R);O7(Te(a1))?(r.value=Te(a1),J()):(r.value=null,f.value="")},S=()=>{const R=a1=>P4(a1,n.value.format);return`${R(r.value[0])} ${n.value.rangeSeparator} ${r.value[1]?R(r.value[1]):""}`},O=()=>a.value&&r.value?Array.isArray(r.value)?S():P4(r.value,n.value.format):v(r.value),U=()=>r.value?s.value.enabled?r.value.map(R=>v(R)).join("; "):n.value.enabled&&typeof n.value.format=="string"?O():v(r.value):"",J=()=>{!t.format||typeof t.format=="string"||n.value.enabled&&typeof n.value.format=="string"?f.value=U():f.value=t.format(r.value)},Y=R=>{if(t.utc){const a1=new Date(R);return t.utc==="preserve"?new Date(a1.getTime()+a1.getTimezoneOffset()*6e4):a1}return t.modelType?xe1.includes(t.modelType)?h(new Date(R)):t.modelType==="format"&&(typeof t.format=="string"||!t.format)?h(N7(R,l(),new Date,{locale:d.value})):h(N7(R,t.modelType,new Date,{locale:d.value})):h(new Date(R))},G=R=>R?t.utc?Se1(R,t.utc==="preserve",t.enableSeconds):t.modelType?t.modelType==="timestamp"?+m(R):t.modelType==="iso"?m(R).toISOString():t.modelType==="format"&&(typeof t.format=="string"||!t.format)?v(m(R)):v(m(R),t.modelType,!0):m(R):"",B=(R,a1=!1,n1=!1)=>{if(n1)return R;if(e("update:model-value",R),i.value.emitTimezone&&a1){const t1=Array.isArray(R)?R.map(d1=>B4(Te(d1),i.value.emitTimezone)):B4(Te(R),i.value.emitTimezone);e("update:model-timezone-value",t1)}},T=R=>Array.isArray(r.value)?s.value.enabled?r.value.map(a1=>R(a1)):[R(r.value[0]),r.value[1]?R(r.value[1]):V6(c.value.partialRange)]:R(Te(r.value)),L=()=>{if(Array.isArray(r.value)){const R=nt(r.value[0],t.weekStart),a1=r.value[1]?nt(r.value[1],t.weekStart):[];return[R.map(n1=>A1(n1)),a1.map(n1=>A1(n1))]}return nt(r.value,t.weekStart).map(R=>A1(R))},W=(R,a1)=>B(Te(T(R)),!1,a1),j=R=>{const a1=L();return R?a1:e("update:model-value",L())},E=(R=!1)=>(R||J(),t.monthPicker?W(g,R):t.timePicker?W(p,R):t.yearPicker?W(n2,R):t.weekPicker?j(R):B(_(R),!0,R));return{inputValue:f,internalModelValue:r,checkBeforeEmit:()=>r.value?c.value.enabled?c.value.partialRange?r.value.length>=1:r.value.length===2:!!r.value:!1,parseExternalModelValue:q,formatInputValue:J,emitModelValue:E}},Je1=(e,t)=>{const{defaultedFilters:a,propDates:r}=re(e),{validateMonthYearInRange:n}=b0(e),c=(u,d)=>{let h=u;return a.value.months.includes(o2(h))?(h=d?f4(u,1):ca(u,1),c(h,d)):h},i=(u,d)=>{let h=u;return a.value.years.includes(n2(h))?(h=d?_l(u,1):Jx(u,1),i(h,d)):h},s=(u,d=!1)=>{const h=N2(A1(),{month:e.month,year:e.year});let m=u?f4(h,1):ca(h,1);e.disableYearSelect&&(m=E4(m,e.year));let v=o2(m),p=n2(m);a.value.months.includes(v)&&(m=c(m,u),v=o2(m),p=n2(m)),a.value.years.includes(p)&&(m=i(m,u),p=n2(m)),n(v,p,u,e.preventMinMaxNavigation)&&l(v,p,d)},l=(u,d,h)=>{t("update-month-year",{month:u,year:d,fromNav:h})},f=o.computed(()=>u=>fb(N2(A1(),{month:e.month,year:e.year}),r.value.maxDate,r.value.minDate,e.preventMinMaxNavigation,u));return{handleMonthYearChange:s,isDisabled:f,updateMonthYear:l}};var T6=(e=>(e.center="center",e.left="left",e.right="right",e))(T6||{});const e31=({menuRef:e,menuRefInner:t,inputRef:a,pickerWrapperRef:r,inline:n,emit:c,props:i,slots:s})=>{const l=o.ref({}),f=o.ref(!1),u=o.ref({top:"0",left:"0"}),d=o.ref(!1),h=o.toRef(i,"teleportCenter");o.watch(h,()=>{u.value=JSON.parse(JSON.stringify({})),b()});const m=S=>{if(i.teleport){const O=S.getBoundingClientRect();return{left:O.left+window.scrollX,top:O.top+window.scrollY}}return{top:0,left:0}},v=(S,O)=>{u.value.left=`${S+O-l.value.width}px`},p=S=>{u.value.left=`${S}px`},g=(S,O)=>{i.position===T6.left&&p(S),i.position===T6.right&&v(S,O),i.position===T6.center&&(u.value.left=`${S+O/2-l.value.width/2}px`)},y=S=>{const{width:O,height:U}=S.getBoundingClientRect(),{top:J,left:Y}=i.altPosition?i.altPosition(S):m(S);return{top:+J,left:+Y,width:O,height:U}},x=()=>{u.value.left="50%",u.value.top="50%",u.value.transform="translate(-50%, -50%)",u.value.position="fixed",delete u.value.opacity},C=()=>{const S=ke(a),{top:O,left:U,transform:J}=i.altPosition(S);u.value={top:`${O}px`,left:`${U}px`,transform:J??""}},b=(S=!0)=>{var O;if(!n.value.enabled){if(h.value)return x();if(i.altPosition!==null)return C();if(S){const U=i.teleport?(O=t.value)==null?void 0:O.$el:e.value;U&&(l.value=U.getBoundingClientRect()),c("recalculate-position")}return k()}},M=({inputEl:S,left:O,width:U})=>{window.screen.width>768&&!f.value&&g(O,U),H(S)},w=S=>{const{top:O,left:U,height:J,width:Y}=y(S);u.value.top=`${J+O+ +i.offset}px`,d.value=!1,f.value||(u.value.left=`${U+Y/2-l.value.width/2}px`),M({inputEl:S,left:U,width:Y})},z=S=>{const{top:O,left:U,width:J}=y(S);u.value.top=`${O-+i.offset-l.value.height}px`,d.value=!0,M({inputEl:S,left:U,width:J})},H=S=>{if(i.autoPosition){const{left:O,width:U}=y(S),{left:J,right:Y}=l.value;if(!f.value){if(Math.abs(J)!==Math.abs(Y)){if(J<=0)return f.value=!0,p(O);if(Y>=document.documentElement.clientWidth)return f.value=!0,v(O,U)}return g(O,U)}}},A=()=>{const S=ke(a);if(S){const{height:O}=l.value,{top:U,height:J}=S.getBoundingClientRect(),Y=window.innerHeight-U-J,G=U;return O<=Y?O0.bottom:O>Y&&O<=G?O0.top:Y>=G?O0.bottom:O0.top}return O0.bottom},V=S=>A()===O0.bottom?w(S):z(S),k=()=>{const S=ke(a);if(S)return i.autoPosition?V(S):w(S)},_=function(S){if(S){const O=S.scrollHeight>S.clientHeight,U=window.getComputedStyle(S).overflowY.indexOf("hidden")!==-1;return O&&!U}return!0},N=function(S){return!S||S===document.body||S.nodeType===Node.DOCUMENT_FRAGMENT_NODE?window:_(S)?S:N(S.assignedSlot?S.assignedSlot.parentNode:S.parentNode)},q=S=>{if(S)switch(i.position){case T6.left:return{left:0,transform:"translateX(0)"};case T6.right:return{left:`${S.width}px`,transform:"translateX(-100%)"};default:return{left:`${S.width/2}px`,transform:"translateX(-50%)"}}return{}};return{openOnTop:d,menuStyle:u,xCorrect:f,setMenuPosition:b,getScrollableParent:N,shadowRender:(S,O)=>{var U,J,Y;const G=document.createElement("div"),B=(U=ke(a))==null?void 0:U.getBoundingClientRect();G.setAttribute("id","dp--temp-container");const T=(J=r.value)!=null&&J.clientWidth?r.value:document.body;T.append(G);const L=q(B),W=o.h(S,{...O,shadow:!0,style:{opacity:0,position:"absolute",...L}},Object.fromEntries(Object.keys(s).filter(j=>["right-sidebar","left-sidebar","top-extra","action-extra"].includes(j)).map(j=>[j,s[j]])));o.render(W,G),l.value=(Y=W.el)==null?void 0:Y.getBoundingClientRect(),o.render(null,G),T.removeChild(G)}}},Dt=[{name:"clock-icon",use:["time","calendar","shared"]},{name:"arrow-left",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-right",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-up",use:["time","calendar","month-year","shared"]},{name:"arrow-down",use:["time","calendar","month-year","shared"]},{name:"calendar-icon",use:["month-year","time","calendar","shared","year-mode"]},{name:"day",use:["calendar","shared"]},{name:"month-overlay-value",use:["calendar","month-year","shared"]},{name:"year-overlay-value",use:["calendar","month-year","shared","year-mode"]},{name:"year-overlay",use:["month-year","shared"]},{name:"month-overlay",use:["month-year","shared"]},{name:"month-overlay-header",use:["month-year","shared"]},{name:"year-overlay-header",use:["month-year","shared"]},{name:"hours-overlay-value",use:["calendar","time","shared"]},{name:"hours-overlay-header",use:["calendar","time","shared"]},{name:"minutes-overlay-value",use:["calendar","time","shared"]},{name:"minutes-overlay-header",use:["calendar","time","shared"]},{name:"seconds-overlay-value",use:["calendar","time","shared"]},{name:"seconds-overlay-header",use:["calendar","time","shared"]},{name:"hours",use:["calendar","time","shared"]},{name:"minutes",use:["calendar","time","shared"]},{name:"month",use:["calendar","month-year","shared"]},{name:"year",use:["calendar","month-year","shared","year-mode"]},{name:"action-buttons",use:["action"]},{name:"action-preview",use:["action"]},{name:"calendar-header",use:["calendar","shared"]},{name:"marker-tooltip",use:["calendar","shared"]},{name:"action-extra",use:["menu"]},{name:"time-picker-overlay",use:["calendar","time","shared"]},{name:"am-pm-button",use:["calendar","time","shared"]},{name:"left-sidebar",use:["menu"]},{name:"right-sidebar",use:["menu"]},{name:"month-year",use:["month-year","shared"]},{name:"time-picker",use:["menu","shared"]},{name:"action-row",use:["action"]},{name:"marker",use:["calendar","shared"]},{name:"quarter",use:["shared"]},{name:"top-extra",use:["shared","month-year"]}],t31=[{name:"trigger"},{name:"input-icon"},{name:"clear-icon"},{name:"dp-input"}],a31={all:()=>Dt,monthYear:()=>Dt.filter(e=>e.use.includes("month-year")),input:()=>t31,timePicker:()=>Dt.filter(e=>e.use.includes("time")),action:()=>Dt.filter(e=>e.use.includes("action")),calendar:()=>Dt.filter(e=>e.use.includes("calendar")),menu:()=>Dt.filter(e=>e.use.includes("menu")),shared:()=>Dt.filter(e=>e.use.includes("shared")),yearMode:()=>Dt.filter(e=>e.use.includes("year-mode"))},z3=(e,t,a)=>{const r=[];return a31[t]().forEach(n=>{e[n.name]&&r.push(n.name)}),a!=null&&a.length&&a.forEach(n=>{n.slot&&r.push(n.slot)}),r},An=e=>{const t=o.computed(()=>r=>e.value?r?e.value.open:e.value.close:""),a=o.computed(()=>r=>e.value?r?e.value.menuAppearTop:e.value.menuAppearBottom:"");return{transitionName:t,showTransition:!!e.value,menuTransition:a}},Tn=(e,t)=>{const{defaultedRange:a,defaultedTz:r}=re(e),n=A1(B4(A1(),r.value.timezone)),c=o.ref([{month:o2(n),year:n2(n)}]),i=d=>{const h={hours:wt(n),minutes:h0(n),seconds:0};return a.value.enabled?[h[d],h[d]]:h[d]},s=o.reactive({hours:i("hours"),minutes:i("minutes"),seconds:i("seconds")});o.watch(a,(d,h)=>{d.enabled!==h.enabled&&(s.hours=i("hours"),s.minutes=i("minutes"),s.seconds=i("seconds"))},{deep:!0});const l=o.computed({get:()=>e.internalModelValue,set:d=>{!e.readonly&&!e.disabled&&t("update:internal-model-value",d)}}),f=o.computed(()=>d=>c.value[d]?c.value[d].month:0),u=o.computed(()=>d=>c.value[d]?c.value[d].year:0);return{calendars:c,time:s,modelValue:l,month:f,year:u,today:n}},r31=(e,t)=>{const{defaultedMultiCalendars:a,defaultedMultiDates:r,defaultedHighlight:n,defaultedTz:c,propDates:i,defaultedRange:s}=re(t),{isDisabled:l}=b0(t),f=o.ref(null),u=o.ref(B4(new Date,c.value.timezone)),d=L=>{!L.current&&t.hideOffsetDates||(f.value=L.value)},h=()=>{f.value=null},m=L=>Array.isArray(e.value)&&s.value.enabled&&e.value[0]&&f.value?L?me(f.value,e.value[0]):ne(f.value,e.value[0]):!0,v=(L,W)=>{const j=()=>e.value?W?e.value[0]||null:e.value[1]:null,E=e.value&&Array.isArray(e.value)?j():null;return l2(A1(L.value),E)},p=L=>{const W=Array.isArray(e.value)?e.value[0]:null;return L?!ne(f.value??null,W):!0},g=(L,W=!0)=>(s.value.enabled||t.weekPicker)&&Array.isArray(e.value)&&e.value.length===2?t.hideOffsetDates&&!L.current?!1:l2(A1(L.value),e.value[W?0:1]):s.value.enabled?v(L,W)&&p(W)||l2(L.value,Array.isArray(e.value)?e.value[0]:null)&&m(W):!1,y=(L,W)=>{if(Array.isArray(e.value)&&e.value[0]&&e.value.length===1){const j=l2(L.value,f.value);return W?me(e.value[0],L.value)&&j:ne(e.value[0],L.value)&&j}return!1},x=L=>!e.value||t.hideOffsetDates&&!L.current?!1:s.value.enabled?t.modelAuto&&Array.isArray(e.value)?l2(L.value,e.value[0]?e.value[0]:u.value):!1:r.value.enabled&&Array.isArray(e.value)?e.value.some(W=>l2(W,L.value)):l2(L.value,e.value?e.value:u.value),C=L=>{if(s.value.autoRange||t.weekPicker){if(f.value){if(t.hideOffsetDates&&!L.current)return!1;const W=J3(f.value,+s.value.autoRange),j=nt(A1(f.value),t.weekStart);return t.weekPicker?l2(j[1],A1(L.value)):l2(W,A1(L.value))}return!1}return!1},b=L=>{if(s.value.autoRange||t.weekPicker){if(f.value){const W=J3(f.value,+s.value.autoRange);if(t.hideOffsetDates&&!L.current)return!1;const j=nt(A1(f.value),t.weekStart);return t.weekPicker?me(L.value,j[0])&&ne(L.value,j[1]):me(L.value,f.value)&&ne(L.value,W)}return!1}return!1},M=L=>{if(s.value.autoRange||t.weekPicker){if(f.value){if(t.hideOffsetDates&&!L.current)return!1;const W=nt(A1(f.value),t.weekStart);return t.weekPicker?l2(W[0],L.value):l2(f.value,L.value)}return!1}return!1},w=L=>O5(e.value,f.value,L.value),z=()=>t.modelAuto&&Array.isArray(t.internalModelValue)?!!t.internalModelValue[0]:!1,H=()=>t.modelAuto?rb(t.internalModelValue):!0,A=L=>{if(t.weekPicker)return!1;const W=s.value.enabled?!g(L)&&!g(L,!1):!0;return!l(L.value)&&!x(L)&&!(!L.current&&t.hideOffsetDates)&&W},V=L=>s.value.enabled?t.modelAuto?z()&&x(L):!1:x(L),k=L=>n.value?Ve1(L.value,i.value.highlight):!1,_=L=>{const W=l(L.value);return W&&(typeof n.value=="function"?!n.value(L.value,W):!n.value.options.highlightDisabled)},N=L=>{var W;return typeof n.value=="function"?n.value(L.value):(W=n.value.weekdays)==null?void 0:W.includes(L.value.getDay())},q=L=>(s.value.enabled||t.weekPicker)&&(!(a.value.count>0)||L.current)&&H()&&!(!L.current&&t.hideOffsetDates)&&!x(L)?w(L):!1,S=L=>{const{isRangeStart:W,isRangeEnd:j}=Y(L),E=s.value.enabled?W||j:!1;return{dp__cell_offset:!L.current,dp__pointer:!t.disabled&&!(!L.current&&t.hideOffsetDates)&&!l(L.value),dp__cell_disabled:l(L.value),dp__cell_highlight:!_(L)&&(k(L)||N(L))&&!V(L)&&!E&&!M(L)&&!(q(L)&&t.weekPicker)&&!j,dp__cell_highlight_active:!_(L)&&(k(L)||N(L))&&V(L),dp__today:!t.noToday&&l2(L.value,u.value)&&L.current,"dp--past":ne(L.value,u.value),"dp--future":me(L.value,u.value)}},O=L=>({dp__active_date:V(L),dp__date_hover:A(L)}),U=L=>{if(e.value&&!Array.isArray(e.value)){const W=nt(e.value,t.weekStart);return{...B(L),dp__range_start:l2(W[0],L.value),dp__range_end:l2(W[1],L.value),dp__range_between_week:me(L.value,W[0])&&ne(L.value,W[1])}}return{...B(L)}},J=L=>{if(e.value&&Array.isArray(e.value)){const W=nt(e.value[0],t.weekStart),j=e.value[1]?nt(e.value[1],t.weekStart):[];return{...B(L),dp__range_start:l2(W[0],L.value)||l2(j[0],L.value),dp__range_end:l2(W[1],L.value)||l2(j[1],L.value),dp__range_between_week:me(L.value,W[0])&&ne(L.value,W[1])||me(L.value,j[0])&&ne(L.value,j[1]),dp__range_between:me(L.value,W[1])&&ne(L.value,j[0])}}return{...B(L)}},Y=L=>{const W=a.value.count>0?L.current&&g(L)&&H():g(L)&&H(),j=a.value.count>0?L.current&&g(L,!1)&&H():g(L,!1)&&H();return{isRangeStart:W,isRangeEnd:j}},G=L=>{const{isRangeStart:W,isRangeEnd:j}=Y(L);return{dp__range_start:W,dp__range_end:j,dp__range_between:q(L),dp__date_hover:l2(L.value,f.value)&&!W&&!j&&!t.weekPicker,dp__date_hover_start:y(L,!0),dp__date_hover_end:y(L,!1)}},B=L=>({...G(L),dp__cell_auto_range:b(L),dp__cell_auto_range_start:M(L),dp__cell_auto_range_end:C(L)}),T=L=>s.value.enabled?s.value.autoRange?B(L):t.modelAuto?{...O(L),...G(L)}:t.weekPicker?J(L):G(L):t.weekPicker?U(L):O(L);return{setHoverDate:d,clearHoverDate:h,getDayClassData:L=>t.hideOffsetDates&&!L.current?{}:{...S(L),...T(L),[t.dayClass?t.dayClass(L.value):""]:!0,[t.calendarCellClassName]:!!t.calendarCellClassName}}},b0=e=>{const{defaultedFilters:t,defaultedRange:a,propDates:r,defaultedMultiDates:n}=re(e),c=_=>r.value.disabledDates?typeof r.value.disabledDates=="function"?r.value.disabledDates(A1(_)):!!Ic(_,r.value.disabledDates):!1,i=_=>{const N=r.value.maxDate?me(_,r.value.maxDate):!1,q=r.value.minDate?ne(_,r.value.minDate):!1,S=c(_),O=t.value.months.map(B=>+B).includes(o2(_)),U=e.disabledWeekDays.length?e.disabledWeekDays.some(B=>+B===g21(_)):!1,J=d(_),Y=n2(_),G=Y<+e.yearRange[0]||Y>+e.yearRange[1];return!(N||q||S||O||G||U||J)},s=(_,N)=>ne(...Xt(r.value.minDate,_,N))||l2(...Xt(r.value.minDate,_,N)),l=(_,N)=>me(...Xt(r.value.maxDate,_,N))||l2(...Xt(r.value.maxDate,_,N)),f=(_,N,q)=>{let S=!1;return r.value.maxDate&&q&&l(_,N)&&(S=!0),r.value.minDate&&!q&&s(_,N)&&(S=!0),S},u=(_,N,q,S)=>{let O=!1;return S?r.value.minDate&&r.value.maxDate?O=f(_,N,q):(r.value.minDate&&s(_,N)||r.value.maxDate&&l(_,N))&&(O=!0):O=!0,O},d=_=>Array.isArray(r.value.allowedDates)&&!r.value.allowedDates.length?!0:r.value.allowedDates?!Ic(_,r.value.allowedDates):!1,h=_=>!i(_),m=_=>a.value.noDisabledRange?!Fx({start:_[0],end:_[1]}).some(N=>h(N)):!0,v=_=>{if(_){const N=n2(_);return N>=+e.yearRange[0]&&N<=e.yearRange[1]}return!0},p=(_,N)=>!!(Array.isArray(_)&&_[N]&&(a.value.maxRange||a.value.minRange)&&v(_[N])),g=(_,N,q=0)=>{if(p(N,q)&&v(_)){const S=Px(_,N[q]),O=ob(N[q],_),U=O.length===1?0:O.filter(Y=>h(Y)).length,J=Math.abs(S)-(a.value.minMaxRawRange?0:U);if(a.value.minRange&&a.value.maxRange)return J>=+a.value.minRange&&J<=+a.value.maxRange;if(a.value.minRange)return J>=+a.value.minRange;if(a.value.maxRange)return J<=+a.value.maxRange}return!0},y=()=>!e.enableTimePicker||e.monthPicker||e.yearPicker||e.ignoreTimeValidation,x=_=>Array.isArray(_)?[_[0]?cs(_[0]):null,_[1]?cs(_[1]):null]:cs(_),C=(_,N,q)=>_.find(S=>+S.hours===wt(N)&&S.minutes==="*"?!0:+S.minutes===h0(N)&&+S.hours===wt(N))&&q,b=(_,N,q)=>{const[S,O]=_,[U,J]=N;return!C(S,U,q)&&!C(O,J,q)&&q},M=(_,N)=>{const q=Array.isArray(N)?N:[N];return Array.isArray(e.disabledTimes)?Array.isArray(e.disabledTimes[0])?b(e.disabledTimes,q,_):!q.some(S=>C(e.disabledTimes,S,_)):_},w=(_,N)=>{const q=Array.isArray(N)?[X0(N[0]),N[1]?X0(N[1]):void 0]:X0(N),S=!e.disabledTimes(q);return _&&S},z=(_,N)=>e.disabledTimes?Array.isArray(e.disabledTimes)?M(N,_):w(N,_):N,H=_=>{let N=!0;if(!_||y())return!0;const q=!r.value.minDate&&!r.value.maxDate?x(_):_;return(e.maxTime||r.value.maxDate)&&(N=rm(e.maxTime,r.value.maxDate,"max",Te(q),N)),(e.minTime||r.value.minDate)&&(N=rm(e.minTime,r.value.minDate,"min",Te(q),N)),z(_,N)},A=_=>{if(!e.monthPicker)return!0;let N=!0;const q=A1(e4(_));if(r.value.minDate&&r.value.maxDate){const S=A1(e4(r.value.minDate)),O=A1(e4(r.value.maxDate));return me(q,S)&&ne(q,O)||l2(q,S)||l2(q,O)}if(r.value.minDate){const S=A1(e4(r.value.minDate));N=me(q,S)||l2(q,S)}if(r.value.maxDate){const S=A1(e4(r.value.maxDate));N=ne(q,S)||l2(q,S)}return N},V=o.computed(()=>_=>!e.enableTimePicker||e.ignoreTimeValidation?!0:H(_)),k=o.computed(()=>_=>e.monthPicker?Array.isArray(_)&&(a.value.enabled||n.value.enabled)?!_.filter(N=>!A(N)).length:A(_):!0);return{isDisabled:h,validateDate:i,validateMonthYearInRange:u,isDateRangeAllowed:m,checkMinMaxRange:g,isValidTime:H,isTimeValid:V,isMonthValid:k}},P5=()=>{const e=o.computed(()=>(r,n)=>r==null?void 0:r.includes(n)),t=o.computed(()=>(r,n)=>r.count?r.solo?!0:n===0:!0),a=o.computed(()=>(r,n)=>r.count?r.solo?!0:n===r.count-1:!0);return{hideNavigationButtons:e,showLeftIcon:t,showRightIcon:a}},n31=(e,t,a)=>{const r=o.ref(0),n=o.reactive({[G0.timePicker]:!e.enableTimePicker||e.timePicker||e.monthPicker,[G0.calendar]:!1,[G0.header]:!1}),c=o.computed(()=>e.monthPicker||e.timePicker),i=d=>{var h;if((h=e.flow)!=null&&h.length){if(!d&&c.value)return u();n[d]=!0,Object.keys(n).filter(m=>!n[m]).length||u()}},s=()=>{var d;(d=e.flow)!=null&&d.length&&r.value!==-1&&(r.value+=1,t("flow-step",r.value),u())},l=()=>{r.value=-1},f=(d,h,...m)=>{var v,p;e.flow[r.value]===d&&a.value&&((p=(v=a.value)[h])==null||p.call(v,...m))},u=()=>{f(Ye.month,"toggleMonthPicker",!0),f(Ye.year,"toggleYearPicker",!0),f(Ye.calendar,"toggleTimePicker",!1,!0),f(Ye.time,"toggleTimePicker",!0,!0);const d=e.flow[r.value];(d===Ye.hours||d===Ye.minutes||d===Ye.seconds)&&f(d,"toggleTimePicker",!0,!0,d)};return{childMount:i,updateFlowStep:s,resetFlow:l,flowStep:r}},B5={multiCalendars:{type:[Boolean,Number,String,Object],default:void 0},modelValue:{type:[String,Date,Array,Object,Number],default:null},modelType:{type:String,default:null},position:{type:String,default:"center"},dark:{type:Boolean,default:!1},format:{type:[String,Function],default:()=>null},autoPosition:{type:Boolean,default:!0},altPosition:{type:Function,default:null},transitions:{type:[Boolean,Object],default:!0},formatLocale:{type:Object,default:null},utc:{type:[Boolean,String],default:!1},ariaLabels:{type:Object,default:()=>({})},offset:{type:[Number,String],default:10},hideNavigation:{type:Array,default:()=>[]},timezone:{type:[String,Object],default:null},emitTimezone:{type:String,default:null},vertical:{type:Boolean,default:!1},disableMonthYearSelect:{type:Boolean,default:!1},disableYearSelect:{type:Boolean,default:!1},menuClassName:{type:String,default:null},dayClass:{type:Function,default:null},yearRange:{type:Array,default:()=>[1900,2100]},calendarCellClassName:{type:String,default:null},enableTimePicker:{type:Boolean,default:!0},autoApply:{type:Boolean,default:!1},disabledDates:{type:[Array,Function],default:()=>[]},monthNameFormat:{type:String,default:"short"},startDate:{type:[Date,String],default:null},startTime:{type:[Object,Array],default:null},hideOffsetDates:{type:Boolean,default:!1},autoRange:{type:[Number,String],default:null},noToday:{type:Boolean,default:!1},disabledWeekDays:{type:Array,default:()=>[]},allowedDates:{type:Array,default:null},nowButtonLabel:{type:String,default:"Now"},markers:{type:Array,default:()=>[]},escClose:{type:Boolean,default:!0},spaceConfirm:{type:Boolean,default:!0},monthChangeOnArrows:{type:Boolean,default:!0},presetDates:{type:Array,default:()=>[]},flow:{type:Array,default:()=>[]},partialFlow:{type:Boolean,default:!1},preventMinMaxNavigation:{type:Boolean,default:!1},minRange:{type:[Number,String],default:null},maxRange:{type:[Number,String],default:null},multiDatesLimit:{type:[Number,String],default:null},reverseYears:{type:Boolean,default:!1},weekPicker:{type:Boolean,default:!1},filters:{type:Object,default:()=>({})},arrowNavigation:{type:Boolean,default:!1},disableTimeRangeValidation:{type:Boolean,default:!1},highlight:{type:[Function,Object],default:null},teleport:{type:[Boolean,String,Object],default:null},teleportCenter:{type:Boolean,default:!1},locale:{type:String,default:"en-Us"},weekNumName:{type:String,default:"W"},weekStart:{type:[Number,String],default:1},weekNumbers:{type:[String,Function,Object],default:null},calendarClassName:{type:String,default:null},monthChangeOnScroll:{type:[Boolean,String],default:!0},dayNames:{type:[Function,Array],default:null},monthPicker:{type:Boolean,default:!1},customProps:{type:Object,default:null},yearPicker:{type:Boolean,default:!1},modelAuto:{type:Boolean,default:!1},selectText:{type:String,default:"Select"},cancelText:{type:String,default:"Cancel"},previewFormat:{type:[String,Function],default:()=>""},multiDates:{type:[Object,Boolean],default:!1},partialRange:{type:Boolean,default:!0},ignoreTimeValidation:{type:Boolean,default:!1},minDate:{type:[Date,String],default:null},maxDate:{type:[Date,String],default:null},minTime:{type:Object,default:null},maxTime:{type:Object,default:null},name:{type:String,default:null},placeholder:{type:String,default:""},hideInputIcon:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},state:{type:Boolean,default:null},required:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"},inputClassName:{type:String,default:null},fixedStart:{type:Boolean,default:!1},fixedEnd:{type:Boolean,default:!1},timePicker:{type:Boolean,default:!1},enableSeconds:{type:Boolean,default:!1},is24:{type:Boolean,default:!0},noHoursOverlay:{type:Boolean,default:!1},noMinutesOverlay:{type:Boolean,default:!1},noSecondsOverlay:{type:Boolean,default:!1},hoursGridIncrement:{type:[String,Number],default:1},minutesGridIncrement:{type:[String,Number],default:5},secondsGridIncrement:{type:[String,Number],default:5},hoursIncrement:{type:[Number,String],default:1},minutesIncrement:{type:[Number,String],default:1},secondsIncrement:{type:[Number,String],default:1},range:{type:[Boolean,Object],default:!1},uid:{type:String,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},inline:{type:[Boolean,Object],default:!1},textInput:{type:[Boolean,Object],default:!1},noDisabledRange:{type:Boolean,default:!1},sixWeeks:{type:[Boolean,String],default:!1},actionRow:{type:Object,default:()=>({})},focusStartDate:{type:Boolean,default:!1},disabledTimes:{type:[Function,Array],default:void 0},showLastInRange:{type:Boolean,default:!0},timePickerInline:{type:Boolean,default:!1},calendar:{type:Function,default:null},config:{type:Object,default:void 0},quarterPicker:{type:Boolean,default:!1},yearFirst:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},onInternalModelChange:{type:[Function,Object],default:null},enableMinutes:{type:Boolean,default:!0}},b4={...B5,shadow:{type:Boolean,default:!1},flowStep:{type:Number,default:0},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},menuWrapRef:{type:Object,default:null},getInputRect:{type:Function,default:()=>({})}},c31={key:1,class:"dp__input_wrap"},i31=["id","name","inputmode","placeholder","disabled","readonly","required","value","autocomplete","aria-label","aria-disabled","aria-invalid"],s31={key:2,class:"dp__clear_icon"},o31=o.defineComponent({compatConfig:{MODE:3},__name:"DatepickerInput",props:{isMenuOpen:{type:Boolean,default:!1},inputValue:{type:String,default:""},...B5},emits:["clear","open","update:input-value","set-input-date","close","select-date","set-empty-date","toggle","focus-prev","focus","blur","real-blur"],setup(e,{expose:t,emit:a}){const r=a,n=e,{defaultedTextInput:c,defaultedAriaLabels:i,defaultedInline:s,defaultedConfig:l,defaultedRange:f,defaultedMultiDates:u,getDefaultPattern:d,getDefaultStartTime:h}=re(n),{checkMinMaxRange:m}=b0(n),v=o.ref(),p=o.ref(null),g=o.ref(!1),y=o.ref(!1),x=o.computed(()=>({dp__pointer:!n.disabled&&!n.readonly&&!c.value.enabled,dp__disabled:n.disabled,dp__input_readonly:!c.value.enabled,dp__input:!0,dp__input_icon_pad:!n.hideInputIcon,dp__input_valid:!!n.state,dp__input_invalid:n.state===!1,dp__input_focus:g.value||n.isMenuOpen,dp__input_reg:!c.value.enabled,[n.inputClassName]:!!n.inputClassName})),C=()=>{r("set-input-date",null),n.clearable&&n.autoApply&&(r("set-empty-date"),v.value=null)},b=O=>{const U=h();return Le1(O,c.value.format??d(),U??lb({},n.enableSeconds),n.inputValue,y.value,n.formatLocale)},M=O=>{const{rangeSeparator:U}=c.value,[J,Y]=O.split(`${U}`);if(J){const G=b(J.trim()),B=Y?b(Y.trim()):null;if(na(G,B))return;const T=G&&B?[G,B]:[G];m(B,T,0)&&(v.value=G?T:null)}},w=()=>{y.value=!0},z=O=>{if(f.value.enabled)M(O);else if(u.value.enabled){const U=O.split(";");v.value=U.map(J=>b(J.trim())).filter(J=>J)}else v.value=b(O)},H=O=>{var U;const J=typeof O=="string"?O:(U=O.target)==null?void 0:U.value;J!==""?(c.value.openMenu&&!n.isMenuOpen&&r("open"),z(J),r("set-input-date",v.value)):C(),y.value=!1,r("update:input-value",J)},A=O=>{c.value.enabled?(z(O.target.value),c.value.enterSubmit&&O7(v.value)&&n.inputValue!==""?(r("set-input-date",v.value,!0),v.value=null):c.value.enterSubmit&&n.inputValue===""&&(v.value=null,r("clear"))):_(O)},V=O=>{c.value.enabled&&c.value.tabSubmit&&z(O.target.value),c.value.tabSubmit&&O7(v.value)&&n.inputValue!==""?(r("set-input-date",v.value,!0,!0),v.value=null):c.value.tabSubmit&&n.inputValue===""&&(v.value=null,r("clear",!0))},k=()=>{g.value=!0,r("focus"),o.nextTick().then(()=>{var O;c.value.enabled&&c.value.selectOnFocus&&((O=p.value)==null||O.select())})},_=O=>{O.preventDefault(),r0(O,l.value,!0),c.value.enabled&&c.value.openMenu&&!s.value.input&&!n.isMenuOpen?r("open"):c.value.enabled||r("toggle")},N=()=>{r("real-blur"),g.value=!1,(!n.isMenuOpen||s.value.enabled&&s.value.input)&&r("blur"),n.autoApply&&c.value.enabled&&v.value&&!n.isMenuOpen&&(r("set-input-date",v.value),r("select-date"),v.value=null)},q=O=>{r0(O,l.value,!0),r("clear")},S=O=>{if(O.key==="Tab"&&V(O),O.key==="Enter"&&A(O),!c.value.enabled){if(O.code==="Tab")return;O.preventDefault()}};return t({focusInput:()=>{var O;(O=p.value)==null||O.focus({preventScroll:!0})},setParsedDate:O=>{v.value=O}}),(O,U)=>{var J;return o.openBlock(),o.createElementBlock("div",{onClick:_},[O.$slots.trigger&&!O.$slots["dp-input"]&&!o.unref(s).enabled?o.renderSlot(O.$slots,"trigger",{key:0}):o.createCommentVNode("",!0),!O.$slots.trigger&&(!o.unref(s).enabled||o.unref(s).input)?(o.openBlock(),o.createElementBlock("div",c31,[O.$slots["dp-input"]&&!O.$slots.trigger&&(!o.unref(s).enabled||o.unref(s).enabled&&o.unref(s).input)?o.renderSlot(O.$slots,"dp-input",{key:0,value:e.inputValue,isMenuOpen:e.isMenuOpen,onInput:H,onEnter:A,onTab:V,onClear:q,onBlur:N,onKeypress:S,onPaste:w,openMenu:()=>O.$emit("open"),closeMenu:()=>O.$emit("close"),toggleMenu:()=>O.$emit("toggle")}):o.createCommentVNode("",!0),O.$slots["dp-input"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("input",{key:1,id:O.uid?`dp-input-${O.uid}`:void 0,ref_key:"inputRef",ref:p,"data-test":"dp-input",name:O.name,class:o.normalizeClass(x.value),inputmode:o.unref(c).enabled?"text":"none",placeholder:O.placeholder,disabled:O.disabled,readonly:O.readonly,required:O.required,value:e.inputValue,autocomplete:O.autocomplete,"aria-label":(J=o.unref(i))==null?void 0:J.input,"aria-disabled":O.disabled||void 0,"aria-invalid":O.state===!1?!0:void 0,onInput:H,onBlur:N,onFocus:k,onKeypress:S,onKeydown:S,onPaste:w},null,42,i31)),o.createElementVNode("div",{onClick:U[2]||(U[2]=Y=>r("toggle"))},[O.$slots["input-icon"]&&!O.hideInputIcon?(o.openBlock(),o.createElementBlock("span",{key:0,class:"dp__input_icon",onClick:U[0]||(U[0]=Y=>r("toggle"))},[o.renderSlot(O.$slots,"input-icon")])):o.createCommentVNode("",!0),!O.$slots["input-icon"]&&!O.hideInputIcon&&!O.$slots["dp-input"]?(o.openBlock(),o.createBlock(o.unref(pa),{key:1,class:"dp__input_icon dp__input_icons",onClick:U[1]||(U[1]=Y=>r("toggle"))})):o.createCommentVNode("",!0)]),O.$slots["clear-icon"]&&e.inputValue&&O.clearable&&!O.disabled&&!O.readonly?(o.openBlock(),o.createElementBlock("span",s31,[o.renderSlot(O.$slots,"clear-icon",{clear:q})])):o.createCommentVNode("",!0),O.clearable&&!O.$slots["clear-icon"]&&e.inputValue&&!O.disabled&&!O.readonly?(o.openBlock(),o.createBlock(o.unref(eb),{key:3,class:"dp__clear_icon dp__input_icons","data-test":"clear-icon",onClick:U[3]||(U[3]=o.withModifiers(Y=>q(Y),["prevent"]))})):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)])}}}),l31=["title"],f31=["disabled"],u31=o.defineComponent({compatConfig:{MODE:3},__name:"ActionRow",props:{menuMount:{type:Boolean,default:!1},calendarWidth:{type:Number,default:0},...b4},emits:["close-picker","select-date","select-now","invalid-select"],setup(e,{emit:t}){const a=t,r=e,{defaultedActionRow:n,defaultedPreviewFormat:c,defaultedMultiCalendars:i,defaultedTextInput:s,defaultedInline:l,defaultedRange:f,defaultedMultiDates:u,getDefaultPattern:d}=re(r),{isTimeValid:h,isMonthValid:m}=b0(r),{buildMatrix:v}=x0(),p=o.ref(null),g=o.ref(null),y=o.ref(!1),x=o.ref({}),C=o.ref(null),b=o.ref(null);o.onMounted(()=>{r.arrowNavigation&&v([ke(p),ke(g)],"actionRow"),M(),window.addEventListener("resize",M)}),o.onUnmounted(()=>{window.removeEventListener("resize",M)});const M=()=>{y.value=!1,setTimeout(()=>{var S,O;const U=(S=C.value)==null?void 0:S.getBoundingClientRect(),J=(O=b.value)==null?void 0:O.getBoundingClientRect();U&&J&&(x.value.maxWidth=`${J.width-U.width-20}px`),y.value=!0},0)},w=o.computed(()=>f.value.enabled&&!f.value.partialRange&&r.internalModelValue?r.internalModelValue.length===2:!0),z=o.computed(()=>!h.value(r.internalModelValue)||!m.value(r.internalModelValue)||!w.value),H=()=>{const S=c.value;return r.timePicker||r.monthPicker,S(Te(r.internalModelValue))},A=()=>{const S=r.internalModelValue;return i.value.count>0?`${V(S[0])} - ${V(S[1])}`:[V(S[0]),V(S[1])]},V=S=>ub(S,c.value,r.formatLocale,s.value.rangeSeparator,r.modelAuto,d()),k=o.computed(()=>!r.internalModelValue||!r.menuMount?"":typeof c.value=="string"?Array.isArray(r.internalModelValue)?r.internalModelValue.length===2&&r.internalModelValue[1]?A():u.value.enabled?r.internalModelValue.map(S=>`${V(S)}`):r.modelAuto?`${V(r.internalModelValue[0])}`:`${V(r.internalModelValue[0])} -`:V(r.internalModelValue):H()),_=()=>u.value.enabled?"; ":" - ",N=o.computed(()=>Array.isArray(k.value)?k.value.join(_()):k.value),q=()=>{h.value(r.internalModelValue)&&m.value(r.internalModelValue)&&w.value?a("select-date"):a("invalid-select")};return(S,O)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"actionRowRef",ref:b,class:"dp__action_row"},[S.$slots["action-row"]?o.renderSlot(S.$slots,"action-row",o.normalizeProps(o.mergeProps({key:0},{internalModelValue:S.internalModelValue,disabled:z.value,selectDate:()=>S.$emit("select-date"),closePicker:()=>S.$emit("close-picker")}))):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.unref(n).showPreview?(o.openBlock(),o.createElementBlock("div",{key:0,class:"dp__selection_preview",title:N.value,style:o.normalizeStyle(x.value)},[S.$slots["action-preview"]&&y.value?o.renderSlot(S.$slots,"action-preview",{key:0,value:S.internalModelValue}):o.createCommentVNode("",!0),!S.$slots["action-preview"]&&y.value?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(N.value),1)],64)):o.createCommentVNode("",!0)],12,l31)):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"actionBtnContainer",ref:C,class:"dp__action_buttons","data-dp-element":"action-row"},[S.$slots["action-buttons"]?o.renderSlot(S.$slots,"action-buttons",{key:0,value:S.internalModelValue}):o.createCommentVNode("",!0),S.$slots["action-buttons"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[!o.unref(l).enabled&&o.unref(n).showCancel?(o.openBlock(),o.createElementBlock("button",{key:0,ref_key:"cancelButtonRef",ref:p,type:"button",class:"dp__action_button dp__action_cancel",onClick:O[0]||(O[0]=U=>S.$emit("close-picker")),onKeydown:O[1]||(O[1]=U=>o.unref(y3)(U,()=>S.$emit("close-picker")))},o.toDisplayString(S.cancelText),545)):o.createCommentVNode("",!0),o.unref(n).showNow?(o.openBlock(),o.createElementBlock("button",{key:1,type:"button",class:"dp__action_button dp__action_cancel",onClick:O[2]||(O[2]=U=>S.$emit("select-now")),onKeydown:O[3]||(O[3]=U=>o.unref(y3)(U,()=>S.$emit("select-now")))},o.toDisplayString(S.nowButtonLabel),33)):o.createCommentVNode("",!0),o.unref(n).showSelect?(o.openBlock(),o.createElementBlock("button",{key:2,ref_key:"selectButtonRef",ref:g,type:"button",class:"dp__action_button dp__action_select",disabled:z.value,"data-test":"select-button",onKeydown:O[4]||(O[4]=U=>o.unref(y3)(U,()=>q())),onClick:q},o.toDisplayString(S.selectText),41,f31)):o.createCommentVNode("",!0)],64))],512)],64))],512))}}),d31={class:"dp__selection_grid_header"},h31=["aria-selected","aria-disabled","data-test","onClick","onKeydown","onMouseover"],m31=["aria-label"],En=o.defineComponent({__name:"SelectionOverlay",props:{items:{},type:{},isLast:{type:Boolean},arrowNavigation:{type:Boolean},skipButtonRef:{type:Boolean},headerRefs:{},hideNavigation:{},escClose:{type:Boolean},useRelative:{type:Boolean},height:{},textInput:{type:[Boolean,Object]},config:{},noOverlayFocus:{type:Boolean},focusValue:{},menuWrapRef:{},ariaLabels:{}},emits:["selected","toggle","reset-flow","hover-value"],setup(e,{expose:t,emit:a}){const{setSelectionGrid:r,buildMultiLevelMatrix:n,setMonthPicker:c}=x0(),i=a,s=e,{defaultedAriaLabels:l,defaultedTextInput:f,defaultedConfig:u}=re(s),{hideNavigationButtons:d}=P5(),h=o.ref(!1),m=o.ref(null),v=o.ref(null),p=o.ref([]),g=o.ref(),y=o.ref(null),x=o.ref(0),C=o.ref(null);o.onBeforeUpdate(()=>{m.value=null}),o.onMounted(()=>{o.nextTick().then(()=>k()),s.noOverlayFocus||M(),b(!0)}),o.onUnmounted(()=>b(!1));const b=T=>{var L;s.arrowNavigation&&((L=s.headerRefs)!=null&&L.length?c(T):r(T))},M=()=>{var T;const L=ke(v);L&&(f.value.enabled||(m.value?(T=m.value)==null||T.focus({preventScroll:!0}):L.focus({preventScroll:!0})),h.value=L.clientHeight<L.scrollHeight)},w=o.computed(()=>({dp__overlay:!0,"dp--overlay-absolute":!s.useRelative,"dp--overlay-relative":s.useRelative})),z=o.computed(()=>s.useRelative?{height:`${s.height}px`,width:"260px"}:void 0),H=o.computed(()=>({dp__overlay_col:!0})),A=o.computed(()=>({dp__btn:!0,dp__button:!0,dp__overlay_action:!0,dp__over_action_scroll:h.value,dp__button_bottom:s.isLast})),V=o.computed(()=>{var T,L;return{dp__overlay_container:!0,dp__container_flex:((T=s.items)==null?void 0:T.length)<=6,dp__container_block:((L=s.items)==null?void 0:L.length)>6}});o.watch(()=>s.items,()=>k(!1),{deep:!0});const k=(T=!0)=>{o.nextTick().then(()=>{const L=ke(m),W=ke(v),j=ke(y),E=ke(C),R=j?j.getBoundingClientRect().height:0;W&&(W.getBoundingClientRect().height?x.value=W.getBoundingClientRect().height-R:x.value=u.value.modeHeight-R),L&&E&&T&&(E.scrollTop=L.offsetTop-E.offsetTop-(x.value/2-L.getBoundingClientRect().height)-R)})},_=T=>{T.disabled||i("selected",T.value)},N=()=>{i("toggle"),i("reset-flow")},q=()=>{s.escClose&&N()},S=(T,L,W,j)=>{T&&((L.active||L.value===s.focusValue)&&(m.value=T),s.arrowNavigation&&(Array.isArray(p.value[W])?p.value[W][j]=T:p.value[W]=[T],O()))},O=()=>{var T,L;const W=(T=s.headerRefs)!=null&&T.length?[s.headerRefs].concat(p.value):p.value.concat([s.skipButtonRef?[]:[y.value]]);n(Te(W),(L=s.headerRefs)!=null&&L.length?"monthPicker":"selectionGrid")},U=T=>{s.arrowNavigation||r0(T,u.value,!0)},J=T=>{g.value=T,i("hover-value",T)},Y=()=>{if(N(),!s.isLast){const T=He1(s.menuWrapRef??null,"action-row");if(T){const L=nb(T);L==null||L.focus()}}},G=T=>{switch(T.key){case te.esc:return q();case te.arrowLeft:return U(T);case te.arrowRight:return U(T);case te.arrowUp:return U(T);case te.arrowDown:return U(T);default:return}},B=T=>{if(T.key===te.enter)return N();if(T.key===te.tab)return Y()};return t({focusGrid:M}),(T,L)=>{var W;return o.openBlock(),o.createElementBlock("div",{ref_key:"gridWrapRef",ref:v,class:o.normalizeClass(w.value),style:o.normalizeStyle(z.value),role:"dialog",tabindex:"0",onKeydown:G},[o.createElementVNode("div",{ref_key:"containerRef",ref:C,class:o.normalizeClass(V.value),role:"grid",style:o.normalizeStyle({"--dp-overlay-height":`${x.value}px`})},[o.createElementVNode("div",d31,[o.renderSlot(T.$slots,"header")]),T.$slots.overlay?o.renderSlot(T.$slots,"overlay",{key:0}):(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:1},o.renderList(T.items,(j,E)=>(o.openBlock(),o.createElementBlock("div",{key:E,class:o.normalizeClass(["dp__overlay_row",{dp__flex_row:T.items.length>=3}]),role:"row"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(j,(R,a1)=>(o.openBlock(),o.createElementBlock("div",{key:R.value,ref_for:!0,ref:n1=>S(n1,R,E,a1),role:"gridcell",class:o.normalizeClass(H.value),"aria-selected":R.active||void 0,"aria-disabled":R.disabled||void 0,tabindex:"0","data-test":R.text,onClick:n1=>_(R),onKeydown:n1=>o.unref(y3)(n1,()=>_(R),!0),onMouseover:n1=>J(R.value)},[o.createElementVNode("div",{class:o.normalizeClass(R.className)},[T.$slots.item?o.renderSlot(T.$slots,"item",{key:0,item:R}):o.createCommentVNode("",!0),T.$slots.item?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(R.text),1)],64))],2)],42,h31))),128))],2))),128))],6),T.$slots["button-icon"]?o.withDirectives((o.openBlock(),o.createElementBlock("button",{key:0,ref_key:"toggleButton",ref:y,type:"button","aria-label":(W=o.unref(l))==null?void 0:W.toggleOverlay,class:o.normalizeClass(A.value),tabindex:"0",onClick:N,onKeydown:B},[o.renderSlot(T.$slots,"button-icon")],42,m31)),[[o.vShow,!o.unref(d)(T.hideNavigation,T.type)]]):o.createCommentVNode("",!0)],38)}}}),F5=o.defineComponent({__name:"InstanceWrap",props:{multiCalendars:{},stretch:{type:Boolean},collapse:{type:Boolean}},setup(e){const t=e,a=o.computed(()=>t.multiCalendars>0?[...Array(t.multiCalendars).keys()]:[0]),r=o.computed(()=>({dp__instance_calendar:t.multiCalendars>0}));return(n,c)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass({dp__menu_inner:!n.stretch,"dp--menu--inner-stretched":n.stretch,dp__flex_display:n.multiCalendars>0,"dp--flex-display-collapsed":n.collapse})},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.value,(i,s)=>(o.openBlock(),o.createElementBlock("div",{key:i,class:o.normalizeClass(r.value)},[o.renderSlot(n.$slots,"default",{instance:i,index:s})],2))),128))],2))}}),p31=["aria-label","aria-disabled"],gr=o.defineComponent({compatConfig:{MODE:3},__name:"ArrowBtn",props:{ariaLabel:{},disabled:{type:Boolean}},emits:["activate","set-ref"],setup(e,{emit:t}){const a=t,r=o.ref(null);return o.onMounted(()=>a("set-ref",r)),(n,c)=>(o.openBlock(),o.createElementBlock("button",{ref_key:"elRef",ref:r,type:"button",class:"dp__btn dp--arrow-btn-nav",tabindex:"0","aria-label":n.ariaLabel,"aria-disabled":n.disabled||void 0,onClick:c[0]||(c[0]=i=>n.$emit("activate")),onKeydown:c[1]||(c[1]=i=>o.unref(y3)(i,()=>n.$emit("activate"),!0))},[o.createElementVNode("span",{class:o.normalizeClass(["dp__inner_nav",{dp__inner_nav_disabled:n.disabled}])},[o.renderSlot(n.$slots,"default")],2)],40,p31))}}),v31={class:"dp--year-mode-picker"},g31=["aria-label","data-test"],mb=o.defineComponent({__name:"YearModePicker",props:{...b4,showYearPicker:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},instance:{type:Number,default:0},year:{type:Number,default:0},isDisabled:{type:Function,default:()=>!1}},emits:["toggle-year-picker","year-select","handle-year"],setup(e,{emit:t}){const a=t,r=e,{showRightIcon:n,showLeftIcon:c}=P5(),{defaultedConfig:i,defaultedMultiCalendars:s,defaultedAriaLabels:l,defaultedTransitions:f}=re(r),{showTransition:u,transitionName:d}=An(f),h=(p=!1,g)=>{a("toggle-year-picker",{flow:p,show:g})},m=p=>{a("year-select",p)},v=(p=!1)=>{a("handle-year",p)};return(p,g)=>{var y,x,C;return o.openBlock(),o.createElementBlock("div",v31,[o.unref(c)(o.unref(s),e.instance)?(o.openBlock(),o.createBlock(gr,{key:0,ref:"mpPrevIconRef","aria-label":(y=o.unref(l))==null?void 0:y.prevYear,disabled:e.isDisabled(!1),onActivate:g[0]||(g[0]=b=>v(!1))},{default:o.withCtx(()=>[p.$slots["arrow-left"]?o.renderSlot(p.$slots,"arrow-left",{key:0}):o.createCommentVNode("",!0),p.$slots["arrow-left"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Nl),{key:1}))]),_:3},8,["aria-label","disabled"])):o.createCommentVNode("",!0),o.createElementVNode("button",{ref:"mpYearButtonRef",class:"dp__btn dp--year-select",type:"button","aria-label":(x=o.unref(l))==null?void 0:x.openYearsOverlay,"data-test":`year-mode-btn-${e.instance}`,onClick:g[1]||(g[1]=()=>h(!1)),onKeydown:g[2]||(g[2]=o.withKeys(()=>h(!1),["enter"]))},[p.$slots.year?o.renderSlot(p.$slots,"year",{key:0,year:e.year}):o.createCommentVNode("",!0),p.$slots.year?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(e.year),1)],64))],40,g31),o.unref(n)(o.unref(s),e.instance)?(o.openBlock(),o.createBlock(gr,{key:1,ref:"mpNextIconRef","aria-label":(C=o.unref(l))==null?void 0:C.nextYear,disabled:e.isDisabled(!0),onActivate:g[3]||(g[3]=b=>v(!0))},{default:o.withCtx(()=>[p.$slots["arrow-right"]?o.renderSlot(p.$slots,"arrow-right",{key:0}):o.createCommentVNode("",!0),p.$slots["arrow-right"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Dl),{key:1}))]),_:3},8,["aria-label","disabled"])):o.createCommentVNode("",!0),o.createVNode(o.Transition,{name:o.unref(d)(e.showYearPicker),css:o.unref(u)},{default:o.withCtx(()=>[e.showYearPicker?(o.openBlock(),o.createBlock(En,{key:0,items:e.items,"text-input":p.textInput,"esc-close":p.escClose,config:p.config,"is-last":p.autoApply&&!o.unref(i).keepActionRow,"hide-navigation":p.hideNavigation,"aria-labels":p.ariaLabels,type:"year",onToggle:h,onSelected:g[4]||(g[4]=b=>m(b))},o.createSlots({"button-icon":o.withCtx(()=>[p.$slots["calendar-icon"]?o.renderSlot(p.$slots,"calendar-icon",{key:0}):o.createCommentVNode("",!0),p.$slots["calendar-icon"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(pa),{key:1}))]),_:2},[p.$slots["year-overlay-value"]?{name:"item",fn:o.withCtx(({item:b})=>[o.renderSlot(p.$slots,"year-overlay-value",{text:b.text,value:b.value})]),key:"0"}:void 0]),1032,["items","text-input","esc-close","config","is-last","hide-navigation","aria-labels"])):o.createCommentVNode("",!0)]),_:3},8,["name","css"])])}}}),Ul=(e,t,a)=>{if(t.value&&Array.isArray(t.value))if(t.value.some(r=>l2(e,r))){const r=t.value.filter(n=>!l2(n,e));t.value=r.length?r:null}else(a&&+a>t.value.length||!a)&&t.value.push(e);else t.value=[e]},Wl=(e,t,a)=>{let r=e.value?e.value.slice():[];return r.length===2&&r[1]!==null&&(r=[]),r.length?ne(t,r[0])?(r.unshift(t),a("range-start",r[0]),a("range-start",r[1])):(r[1]=t,a("range-end",t)):(r=[t],a("range-start",t)),r},R5=(e,t,a,r)=>{e&&(e[0]&&e[1]&&a&&t("auto-apply"),e[0]&&!e[1]&&r&&a&&t("auto-apply"))},pb=e=>{Array.isArray(e.value)&&e.value.length<=2&&e.range?e.modelValue.value=e.value.map(t=>B4(A1(t),e.timezone)):Array.isArray(e.value)||(e.modelValue.value=B4(A1(e.value),e.timezone))},vb=(e,t,a,r)=>Array.isArray(t.value)&&(t.value.length===2||t.value.length===1&&r.value.partialRange)?r.value.fixedStart&&(me(e,t.value[0])||l2(e,t.value[0]))?[t.value[0],e]:r.value.fixedEnd&&(ne(e,t.value[1])||l2(e,t.value[1]))?[e,t.value[1]]:(a("invalid-fixed-range",e),t.value):[],gb=({multiCalendars:e,highlight:t,propDates:a,calendars:r,modelValue:n,props:c,filters:i,year:s,month:l,emit:f})=>{const u=o.computed(()=>Fl(c.yearRange,c.locale,c.reverseYears)),d=o.ref([!1]),h=o.computed(()=>(w,z)=>{const H=N2(e4(new Date),{month:l.value(w),year:s.value(w)}),A=z?Rx(H):kl(H);return fb(A,a.value.maxDate,a.value.minDate,c.preventMinMaxNavigation,z)}),m=()=>{for(let w=0;w<e.value.count;w++)if(w===0)r.value[w]=r.value[0];else{const z=N2(A1(),r.value[w-1]);r.value[w]={month:o2(z),year:n2(_l(z,1))}}},v=w=>{if(!w)return m();const z=N2(A1(),r.value[w]);return r.value[0].year=n2(Jx(z,e.value.count-1)),m()},p=w=>c.focusStartDate?w[0]:w[1]?w[1]:w[0],g=()=>{if(n.value){const w=Array.isArray(n.value)?p(n.value):n.value;r.value[0]={month:o2(w),year:n2(w)}}};o.onMounted(()=>{g(),e.value.count&&m()});const y=(w,z)=>{r.value[z].year=w,f("update-month-year",{instance:z,year:w,month:r.value[z].month}),e.value.count&&!e.value.solo&&v(z)},x=o.computed(()=>w=>ia(u.value,z=>{var H;const A=s.value(w)===z.value,V=an(z.value,sa(a.value.minDate),sa(a.value.maxDate))||((H=i.value.years)==null?void 0:H.includes(s.value(w))),k=$l(t.value,z.value);return{active:A,disabled:V,highlighted:k}})),C=(w,z)=>{y(w,z),M(z)},b=(w,z=!1)=>{if(!h.value(w,z)){const H=z?s.value(w)+1:s.value(w)-1;y(H,w)}},M=(w,z=!1,H)=>{z||f("reset-flow"),H!==void 0?d.value[w]=H:d.value[w]=!d.value[w],d.value[w]?f("overlay-toggle",{open:!0,overlay:Ye.year}):(f("overlay-closed"),f("overlay-toggle",{open:!1,overlay:Ye.year}))};return{isDisabled:h,groupedYears:x,showYearPicker:d,selectYear:y,toggleYearPicker:M,handleYearSelect:C,handleYear:b}},y31=(e,t)=>{const{defaultedMultiCalendars:a,defaultedAriaLabels:r,defaultedTransitions:n,defaultedConfig:c,defaultedRange:i,defaultedHighlight:s,propDates:l,defaultedTz:f,defaultedFilters:u,defaultedMultiDates:d}=re(e),{modelValue:h,year:m,month:v,calendars:p}=Tn(e,t),g=o.computed(()=>ab(e.formatLocale,e.locale,e.monthNameFormat)),y=o.ref(null),{checkMinMaxRange:x}=b0(e),{selectYear:C,groupedYears:b,showYearPicker:M,toggleYearPicker:w,handleYearSelect:z,handleYear:H,isDisabled:A}=gb({modelValue:h,multiCalendars:a,highlight:s,calendars:p,year:m,propDates:l,month:v,filters:u,props:e,emit:t});o.onMounted(()=>{e.startDate&&(h.value&&e.focusStartDate||!h.value)&&C(n2(A1(e.startDate)),0)});const V=L=>L?{month:o2(L),year:n2(L)}:{month:null,year:null},k=()=>h.value?Array.isArray(h.value)?h.value.map(L=>V(L)):V(h.value):V(),_=(L,W)=>{const j=p.value[L],E=k();return Array.isArray(E)?E.some(R=>R.year===(j==null?void 0:j.year)&&R.month===W):(j==null?void 0:j.year)===E.year&&W===E.month},N=(L,W,j)=>{var E,R;const a1=k();return Array.isArray(a1)?m.value(W)===((E=a1[j])==null?void 0:E.year)&&L===((R=a1[j])==null?void 0:R.month):!1},q=(L,W)=>{if(i.value.enabled){const j=k();if(Array.isArray(h.value)&&Array.isArray(j)){const E=N(L,W,0)||N(L,W,1),R=ut(e4(A1()),L,m.value(W));return O5(h.value,y.value,R)&&!E}return!1}return!1},S=o.computed(()=>L=>ia(g.value,W=>{var j;const E=_(L,W.value),R=an(W.value,ib(m.value(L),l.value.minDate),sb(m.value(L),l.value.maxDate))||De1(l.value.disabledDates,m.value(L)).includes(W.value)||((j=u.value.months)==null?void 0:j.includes(W.value)),a1=q(W.value,L),n1=db(s.value,W.value,m.value(L));return{active:E,disabled:R,isBetween:a1,highlighted:n1}})),O=(L,W)=>ut(e4(A1()),L,m.value(W)),U=(L,W)=>{const j=h.value?h.value:e4(new Date);h.value=ut(j,L,m.value(W)),t("auto-apply"),t("update-flow-step")},J=(L,W)=>{const j=O(L,W);i.value.fixedEnd||i.value.fixedStart?h.value=vb(j,h,t,i):h.value?x(j,h.value)&&(h.value=Wl(h,O(L,W),t)):h.value=[O(L,W)],o.nextTick().then(()=>{R5(h.value,t,e.autoApply,e.modelAuto)})},Y=(L,W)=>{Ul(O(L,W),h,d.value.limit),t("auto-apply",!0)},G=(L,W)=>(p.value[W].month=L,T(W,p.value[W].year,L),d.value.enabled?Y(L,W):i.value.enabled?J(L,W):U(L,W)),B=(L,W)=>{C(L,W),T(W,L,null)},T=(L,W,j)=>{let E=j;if(!E&&E!==0){const R=k();E=Array.isArray(R)?R[L].month:R.month}t("update-month-year",{instance:L,year:W,month:E})};return{groupedMonths:S,groupedYears:b,year:m,isDisabled:A,defaultedMultiCalendars:a,defaultedAriaLabels:r,defaultedTransitions:n,defaultedConfig:c,showYearPicker:M,modelValue:h,presetDate:(L,W)=>{pb({value:L,modelValue:h,range:i.value.enabled,timezone:W?void 0:f.value.timezone}),t("auto-apply")},setHoverDate:(L,W)=>{y.value=O(L,W)},selectMonth:G,selectYear:B,toggleYearPicker:w,handleYearSelect:z,handleYear:H,getModelMonthYear:k}},x31=o.defineComponent({compatConfig:{MODE:3},__name:"MonthPicker",props:{...b4},emits:["update:internal-model-value","overlay-closed","reset-flow","range-start","range-end","auto-apply","update-month-year","update-flow-step","mount","invalid-fixed-range","overlay-toggle"],setup(e,{expose:t,emit:a}){const r=a,n=o.useSlots(),c=z3(n,"yearMode"),i=e;o.onMounted(()=>{i.shadow||r("mount",null)});const{groupedMonths:s,groupedYears:l,year:f,isDisabled:u,defaultedMultiCalendars:d,defaultedConfig:h,showYearPicker:m,modelValue:v,presetDate:p,setHoverDate:g,selectMonth:y,selectYear:x,toggleYearPicker:C,handleYearSelect:b,handleYear:M,getModelMonthYear:w}=y31(i,r);return t({getSidebarProps:()=>({modelValue:v,year:f,getModelMonthYear:w,selectMonth:y,selectYear:x,handleYear:M}),presetDate:p,toggleYearPicker:z=>C(0,z)}),(z,H)=>(o.openBlock(),o.createBlock(F5,{"multi-calendars":o.unref(d).count,collapse:z.collapse,stretch:""},{default:o.withCtx(({instance:A})=>[z.$slots["top-extra"]?o.renderSlot(z.$slots,"top-extra",{key:0,value:z.internalModelValue}):o.createCommentVNode("",!0),z.$slots["month-year"]?o.renderSlot(z.$slots,"month-year",o.normalizeProps(o.mergeProps({key:1},{year:o.unref(f),months:o.unref(s)(A),years:o.unref(l)(A),selectMonth:o.unref(y),selectYear:o.unref(x),instance:A}))):(o.openBlock(),o.createBlock(En,{key:2,items:o.unref(s)(A),"arrow-navigation":z.arrowNavigation,"is-last":z.autoApply&&!o.unref(h).keepActionRow,"esc-close":z.escClose,height:o.unref(h).modeHeight,config:z.config,"no-overlay-focus":!!(z.noOverlayFocus||z.textInput),"use-relative":"",type:"month",onSelected:V=>o.unref(y)(V,A),onHoverValue:V=>o.unref(g)(V,A)},o.createSlots({header:o.withCtx(()=>[o.createVNode(mb,o.mergeProps(z.$props,{items:o.unref(l)(A),instance:A,"show-year-picker":o.unref(m)[A],year:o.unref(f)(A),"is-disabled":V=>o.unref(u)(A,V),onHandleYear:V=>o.unref(M)(A,V),onYearSelect:V=>o.unref(b)(V,A),onToggleYearPicker:V=>o.unref(C)(A,V==null?void 0:V.flow,V==null?void 0:V.show)}),o.createSlots({_:2},[o.renderList(o.unref(c),(V,k)=>({name:V,fn:o.withCtx(_=>[o.renderSlot(z.$slots,V,o.normalizeProps(o.guardReactiveProps(_)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),_:2},[z.$slots["month-overlay-value"]?{name:"item",fn:o.withCtx(({item:V})=>[o.renderSlot(z.$slots,"month-overlay-value",{text:V.text,value:V.value})]),key:"0"}:void 0]),1032,["items","arrow-navigation","is-last","esc-close","height","config","no-overlay-focus","onSelected","onHoverValue"]))]),_:3},8,["multi-calendars","collapse"]))}}),b31=(e,t)=>{const{modelValue:a}=Tn(e,t),r=o.ref(null),{defaultedHighlight:n,defaultedMultiDates:c,defaultedFilters:i,defaultedRange:s,propDates:l}=re(e),f=o.ref();o.onMounted(()=>{e.startDate&&(a.value&&e.focusStartDate||!a.value)&&(f.value=n2(A1(e.startDate)))});const u=v=>Array.isArray(a.value)?a.value.some(p=>n2(p)===v):a.value?n2(a.value)===v:!1,d=v=>s.value.enabled&&Array.isArray(a.value)?O5(a.value,r.value,m(v)):!1,h=o.computed(()=>ia(Fl(e.yearRange,e.locale,e.reverseYears),v=>{const p=u(v.value),g=an(v.value,sa(l.value.minDate),sa(l.value.maxDate))||i.value.years.includes(v.value),y=d(v.value)&&!p,x=$l(n.value,v.value);return{active:p,disabled:g,isBetween:y,highlighted:x}})),m=v=>E4(e4(new Date),v);return{groupedYears:h,modelValue:a,focusYear:f,setHoverValue:v=>{r.value=E4(e4(new Date),v)},selectYear:v=>{var p;if(t("update-month-year",{instance:0,year:v}),c.value.enabled)return a.value?Array.isArray(a.value)&&(((p=a.value)==null?void 0:p.map(g=>n2(g))).includes(v)?a.value=a.value.filter(g=>n2(g)!==v):a.value.push(E4(k3(A1()),v))):a.value=[E4(k3(A1()),v)],t("auto-apply",!0);s.value.enabled?(a.value=Wl(a,m(v),t),o.nextTick().then(()=>{R5(a.value,t,e.autoApply,e.modelAuto)})):(a.value=m(v),t("auto-apply"))}}},C31=o.defineComponent({compatConfig:{MODE:3},__name:"YearPicker",props:{...b4},emits:["update:internal-model-value","reset-flow","range-start","range-end","auto-apply","update-month-year"],setup(e,{expose:t,emit:a}){const r=a,n=e,{groupedYears:c,modelValue:i,focusYear:s,selectYear:l,setHoverValue:f}=b31(n,r),{defaultedConfig:u}=re(n);return t({getSidebarProps:()=>({modelValue:i,selectYear:l})}),(d,h)=>(o.openBlock(),o.createElementBlock("div",null,[d.$slots["top-extra"]?o.renderSlot(d.$slots,"top-extra",{key:0,value:d.internalModelValue}):o.createCommentVNode("",!0),d.$slots["month-year"]?o.renderSlot(d.$slots,"month-year",o.normalizeProps(o.mergeProps({key:1},{years:o.unref(c),selectYear:o.unref(l)}))):(o.openBlock(),o.createBlock(En,{key:2,items:o.unref(c),"is-last":d.autoApply&&!o.unref(u).keepActionRow,height:o.unref(u).modeHeight,config:d.config,"no-overlay-focus":!!(d.noOverlayFocus||d.textInput),"focus-value":o.unref(s),type:"year","use-relative":"",onSelected:o.unref(l),onHoverValue:o.unref(f)},o.createSlots({_:2},[d.$slots["year-overlay-value"]?{name:"item",fn:o.withCtx(({item:m})=>[o.renderSlot(d.$slots,"year-overlay-value",{text:m.text,value:m.value})]),key:"0"}:void 0]),1032,["items","is-last","height","config","no-overlay-focus","focus-value","onSelected","onHoverValue"]))]))}}),M31={key:0,class:"dp__time_input"},z31=["data-test","aria-label","onKeydown","onClick","onMousedown"],w31=o.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1),_31=o.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1),k31=["aria-label","disabled","data-test","onKeydown","onClick"],H31=["data-test","aria-label","onKeydown","onClick","onMousedown"],V31=o.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1),L31=o.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1),S31={key:0},A31=["aria-label"],T31=o.defineComponent({compatConfig:{MODE:3},__name:"TimeInput",props:{hours:{type:Number,default:0},minutes:{type:Number,default:0},seconds:{type:Number,default:0},closeTimePickerBtn:{type:Object,default:null},order:{type:Number,default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},...b4},emits:["set-hours","set-minutes","update:hours","update:minutes","update:seconds","reset-flow","mounted","overlay-closed","overlay-opened","am-pm-change"],setup(e,{expose:t,emit:a}){const r=a,n=e,{setTimePickerElements:c,setTimePickerBackRef:i}=x0(),{defaultedAriaLabels:s,defaultedTransitions:l,defaultedFilters:f,defaultedConfig:u,defaultedRange:d}=re(n),{transitionName:h,showTransition:m}=An(l),v=o.reactive({hours:!1,minutes:!1,seconds:!1}),p=o.ref("AM"),g=o.ref(null),y=o.ref([]),x=o.ref();o.onMounted(()=>{r("mounted")});const C=F=>N2(new Date,{hours:F.hours,minutes:F.minutes,seconds:n.enableSeconds?F.seconds:0,milliseconds:0}),b=o.computed(()=>F=>O(F,n[F])||w(F,n[F])),M=o.computed(()=>({hours:n.hours,minutes:n.minutes,seconds:n.seconds})),w=(F,p1)=>d.value.enabled&&!d.value.disableTimeRangeValidation?!n.validateTime(F,p1):!1,z=(F,p1)=>{if(d.value.enabled&&!d.value.disableTimeRangeValidation){const z1=p1?+n[`${F}Increment`]:-+n[`${F}Increment`],h1=n[F]+z1;return!n.validateTime(F,h1)}return!1},H=o.computed(()=>F=>!B(+n[F]+ +n[`${F}Increment`],F)||z(F,!0)),A=o.computed(()=>F=>!B(+n[F]-+n[`${F}Increment`],F)||z(F,!1)),V=(F,p1)=>Ex(N2(A1(),F),p1),k=(F,p1)=>ve1(N2(A1(),F),p1),_=o.computed(()=>({dp__time_col:!0,dp__time_col_block:!n.timePickerInline,dp__time_col_reg_block:!n.enableSeconds&&n.is24&&!n.timePickerInline,dp__time_col_reg_inline:!n.enableSeconds&&n.is24&&n.timePickerInline,dp__time_col_reg_with_button:!n.enableSeconds&&!n.is24,dp__time_col_sec:n.enableSeconds&&n.is24,dp__time_col_sec_with_button:n.enableSeconds&&!n.is24})),N=o.computed(()=>{const F=[{type:"hours"}];return n.enableMinutes&&F.push({type:"",separator:!0},{type:"minutes"}),n.enableSeconds&&F.push({type:"",separator:!0},{type:"seconds"}),F}),q=o.computed(()=>N.value.filter(F=>!F.separator)),S=o.computed(()=>F=>{if(F==="hours"){const p1=R(+n.hours);return{text:p1<10?`0${p1}`:`${p1}`,value:p1}}return{text:n[F]<10?`0${n[F]}`:`${n[F]}`,value:n[F]}}),O=(F,p1)=>{var z1;if(!n.disabledTimesConfig)return!1;const h1=n.disabledTimesConfig(n.order,F==="hours"?p1:void 0);return h1[F]?!!((z1=h1[F])!=null&&z1.includes(p1)):!0},U=(F,p1)=>p1!=="hours"||p.value==="AM"?F:F+12,J=F=>{const p1=n.is24?24:12,z1=F==="hours"?p1:60,h1=+n[`${F}GridIncrement`],l1=F==="hours"&&!n.is24?h1:0,f1=[];for(let u1=l1;u1<z1;u1+=h1)f1.push({value:n.is24?u1:U(u1,F),text:u1<10?`0${u1}`:`${u1}`});return F==="hours"&&!n.is24&&f1.unshift({value:p.value==="PM"?12:0,text:"12"}),ia(f1,u1=>({active:!1,disabled:f.value.times[F].includes(u1.value)||!B(u1.value,F)||O(F,u1.value)||w(F,u1.value)}))},Y=F=>F>=0?F:59,G=F=>F>=0?F:23,B=(F,p1)=>{const z1=n.minTime?C(as(n.minTime)):null,h1=n.maxTime?C(as(n.maxTime)):null,l1=C(as(M.value,p1,p1==="minutes"||p1==="seconds"?Y(F):G(F)));return z1&&h1?(tn(l1,h1)||P6(l1,h1))&&(na(l1,z1)||P6(l1,z1)):z1?na(l1,z1)||P6(l1,z1):h1?tn(l1,h1)||P6(l1,h1):!0},T=F=>n[`no${F[0].toUpperCase()+F.slice(1)}Overlay`],L=F=>{T(F)||(v[F]=!v[F],v[F]?r("overlay-opened",F):r("overlay-closed",F))},W=F=>F==="hours"?wt:F==="minutes"?h0:ra,j=()=>{x.value&&clearTimeout(x.value)},E=(F,p1=!0,z1)=>{const h1=p1?V:k,l1=p1?+n[`${F}Increment`]:-+n[`${F}Increment`];B(+n[F]+l1,F)&&r(`update:${F}`,W(F)(h1({[F]:+n[F]},{[F]:+n[`${F}Increment`]}))),!(z1!=null&&z1.keyboard)&&u.value.timeArrowHoldThreshold&&(x.value=setTimeout(()=>{E(F,p1)},u.value.timeArrowHoldThreshold))},R=F=>n.is24?F:(F>=12?p.value="PM":p.value="AM",Me1(F)),a1=()=>{p.value==="PM"?(p.value="AM",r("update:hours",n.hours-12)):(p.value="PM",r("update:hours",n.hours+12)),r("am-pm-change",p.value)},n1=F=>{v[F]=!0},t1=(F,p1,z1)=>{if(F&&n.arrowNavigation){Array.isArray(y.value[p1])?y.value[p1][z1]=F:y.value[p1]=[F];const h1=y.value.reduce((l1,f1)=>f1.map((u1,v1)=>[...l1[v1]||[],f1[v1]]),[]);i(n.closeTimePickerBtn),g.value&&(h1[1]=h1[1].concat(g.value)),c(h1,n.order)}},d1=(F,p1)=>(L(F),r(`update:${F}`,p1));return t({openChildCmp:n1}),(F,p1)=>{var z1;return F.disabled?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",M31,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(N.value,(h1,l1)=>{var f1,u1,v1;return o.openBlock(),o.createElementBlock("div",{key:l1,class:o.normalizeClass(_.value)},[h1.separator?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createTextVNode(" : ")],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createElementVNode("button",{ref_for:!0,ref:k1=>t1(k1,l1,0),type:"button",class:o.normalizeClass({dp__btn:!0,dp__inc_dec_button:!F.timePickerInline,dp__inc_dec_button_inline:F.timePickerInline,dp__tp_inline_btn_top:F.timePickerInline,dp__inc_dec_button_disabled:H.value(h1.type)}),"data-test":`${h1.type}-time-inc-btn-${n.order}`,"aria-label":(f1=o.unref(s))==null?void 0:f1.incrementValue(h1.type),tabindex:"0",onKeydown:k1=>o.unref(y3)(k1,()=>E(h1.type,!0,{keyboard:!0}),!0),onClick:k1=>o.unref(u).timeArrowHoldThreshold?void 0:E(h1.type,!0),onMousedown:k1=>o.unref(u).timeArrowHoldThreshold?E(h1.type,!0):void 0,onMouseup:j},[n.timePickerInline?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[w31,_31],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[F.$slots["arrow-up"]?o.renderSlot(F.$slots,"arrow-up",{key:0}):o.createCommentVNode("",!0),F.$slots["arrow-up"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Pl),{key:1}))],64))],42,z31),o.createElementVNode("button",{ref_for:!0,ref:k1=>t1(k1,l1,1),type:"button","aria-label":(u1=o.unref(s))==null?void 0:u1.openTpOverlay(h1.type),class:o.normalizeClass({dp__time_display:!0,dp__time_display_block:!F.timePickerInline,dp__time_display_inline:F.timePickerInline,"dp--time-invalid":b.value(h1.type),"dp--time-overlay-btn":!b.value(h1.type)}),disabled:T(h1.type),tabindex:"0","data-test":`${h1.type}-toggle-overlay-btn-${n.order}`,onKeydown:k1=>o.unref(y3)(k1,()=>L(h1.type),!0),onClick:k1=>L(h1.type)},[F.$slots[h1.type]?o.renderSlot(F.$slots,h1.type,{key:0,text:S.value(h1.type).text,value:S.value(h1.type).value}):o.createCommentVNode("",!0),F.$slots[h1.type]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(S.value(h1.type).text),1)],64))],42,k31),o.createElementVNode("button",{ref_for:!0,ref:k1=>t1(k1,l1,2),type:"button",class:o.normalizeClass({dp__btn:!0,dp__inc_dec_button:!F.timePickerInline,dp__inc_dec_button_inline:F.timePickerInline,dp__tp_inline_btn_bottom:F.timePickerInline,dp__inc_dec_button_disabled:A.value(h1.type)}),"data-test":`${h1.type}-time-dec-btn-${n.order}`,"aria-label":(v1=o.unref(s))==null?void 0:v1.decrementValue(h1.type),tabindex:"0",onKeydown:k1=>o.unref(y3)(k1,()=>E(h1.type,!1,{keyboard:!0}),!0),onClick:k1=>o.unref(u).timeArrowHoldThreshold?void 0:E(h1.type,!1),onMousedown:k1=>o.unref(u).timeArrowHoldThreshold?E(h1.type,!1):void 0,onMouseup:j},[n.timePickerInline?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[V31,L31],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[F.$slots["arrow-down"]?o.renderSlot(F.$slots,"arrow-down",{key:0}):o.createCommentVNode("",!0),F.$slots["arrow-down"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Bl),{key:1}))],64))],42,H31)],64))],2)}),128)),F.is24?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",S31,[F.$slots["am-pm-button"]?o.renderSlot(F.$slots,"am-pm-button",{key:0,toggle:a1,value:p.value}):o.createCommentVNode("",!0),F.$slots["am-pm-button"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("button",{key:1,ref_key:"amPmButton",ref:g,type:"button",class:"dp__pm_am_button",role:"button","aria-label":(z1=o.unref(s))==null?void 0:z1.amPmButton,tabindex:"0",onClick:a1,onKeydown:p1[0]||(p1[0]=h1=>o.unref(y3)(h1,()=>a1(),!0))},o.toDisplayString(p.value),41,A31))])),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(q.value,(h1,l1)=>(o.openBlock(),o.createBlock(o.Transition,{key:l1,name:o.unref(h)(v[h1.type]),css:o.unref(m)},{default:o.withCtx(()=>[v[h1.type]?(o.openBlock(),o.createBlock(En,{key:0,items:J(h1.type),"is-last":F.autoApply&&!o.unref(u).keepActionRow,"esc-close":F.escClose,type:h1.type,"text-input":F.textInput,config:F.config,"arrow-navigation":F.arrowNavigation,"aria-labels":F.ariaLabels,onSelected:f1=>d1(h1.type,f1),onToggle:f1=>L(h1.type),onResetFlow:p1[1]||(p1[1]=f1=>F.$emit("reset-flow"))},o.createSlots({"button-icon":o.withCtx(()=>[F.$slots["clock-icon"]?o.renderSlot(F.$slots,"clock-icon",{key:0}):o.createCommentVNode("",!0),F.$slots["clock-icon"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.resolveDynamicComponent(F.timePickerInline?o.unref(pa):o.unref(Ol)),{key:1}))]),_:2},[F.$slots[`${h1.type}-overlay-value`]?{name:"item",fn:o.withCtx(({item:f1})=>[o.renderSlot(F.$slots,`${h1.type}-overlay-value`,{text:f1.text,value:f1.value})]),key:"0"}:void 0,F.$slots[`${h1.type}-overlay-header`]?{name:"header",fn:o.withCtx(()=>[o.renderSlot(F.$slots,`${h1.type}-overlay-header`,{toggle:()=>L(h1.type)})]),key:"1"}:void 0]),1032,["items","is-last","esc-close","type","text-input","config","arrow-navigation","aria-labels","onSelected","onToggle"])):o.createCommentVNode("",!0)]),_:2},1032,["name","css"]))),128))]))}}}),E31={class:"dp--tp-wrap"},N31=["aria-label","tabindex"],D31=["tabindex"],O31=["aria-label"],yb=o.defineComponent({compatConfig:{MODE:3},__name:"TimePicker",props:{hours:{type:[Number,Array],default:0},minutes:{type:[Number,Array],default:0},seconds:{type:[Number,Array],default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},...b4},emits:["update:hours","update:minutes","update:seconds","mount","reset-flow","overlay-opened","overlay-closed","am-pm-change"],setup(e,{expose:t,emit:a}){const r=a,n=e,{buildMatrix:c,setTimePicker:i}=x0(),s=o.useSlots(),{defaultedTransitions:l,defaultedAriaLabels:f,defaultedTextInput:u,defaultedConfig:d,defaultedRange:h}=re(n),{transitionName:m,showTransition:v}=An(l),{hideNavigationButtons:p}=P5(),g=o.ref(null),y=o.ref(null),x=o.ref([]),C=o.ref(null);o.onMounted(()=>{r("mount"),!n.timePicker&&n.arrowNavigation?c([ke(g.value)],"time"):i(!0,n.timePicker)});const b=o.computed(()=>h.value.enabled&&n.modelAuto?rb(n.internalModelValue):!0),M=o.ref(!1),w=U=>({hours:Array.isArray(n.hours)?n.hours[U]:n.hours,minutes:Array.isArray(n.minutes)?n.minutes[U]:n.minutes,seconds:Array.isArray(n.seconds)?n.seconds[U]:n.seconds}),z=o.computed(()=>{const U=[];if(h.value.enabled)for(let J=0;J<2;J++)U.push(w(J));else U.push(w(0));return U}),H=(U,J=!1,Y="")=>{J||r("reset-flow"),M.value=U,r(U?"overlay-opened":"overlay-closed",Ye.time),n.arrowNavigation&&i(U),o.nextTick(()=>{Y!==""&&x.value[0]&&x.value[0].openChildCmp(Y)})},A=o.computed(()=>({dp__btn:!0,dp__button:!0,dp__button_bottom:n.autoApply&&!d.value.keepActionRow})),V=z3(s,"timePicker"),k=(U,J,Y)=>h.value.enabled?J===0?[U,z.value[1][Y]]:[z.value[0][Y],U]:U,_=U=>{r("update:hours",U)},N=U=>{r("update:minutes",U)},q=U=>{r("update:seconds",U)},S=()=>{if(C.value&&!u.value.enabled&&!n.noOverlayFocus){const U=nb(C.value);U&&U.focus({preventScroll:!0})}},O=U=>{r("overlay-closed",U)};return t({toggleTimePicker:H}),(U,J)=>{var Y;return o.openBlock(),o.createElementBlock("div",E31,[!U.timePicker&&!U.timePickerInline?o.withDirectives((o.openBlock(),o.createElementBlock("button",{key:0,ref_key:"openTimePickerBtn",ref:g,type:"button",class:o.normalizeClass(A.value),"aria-label":(Y=o.unref(f))==null?void 0:Y.openTimePicker,tabindex:U.noOverlayFocus?void 0:0,"data-test":"open-time-picker-btn",onKeydown:J[0]||(J[0]=G=>o.unref(y3)(G,()=>H(!0))),onClick:J[1]||(J[1]=G=>H(!0))},[U.$slots["clock-icon"]?o.renderSlot(U.$slots,"clock-icon",{key:0}):o.createCommentVNode("",!0),U.$slots["clock-icon"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Ol),{key:1}))],42,N31)),[[o.vShow,!o.unref(p)(U.hideNavigation,"time")]]):o.createCommentVNode("",!0),o.createVNode(o.Transition,{name:o.unref(m)(M.value),css:o.unref(v)&&!U.timePickerInline},{default:o.withCtx(()=>{var G;return[M.value||U.timePicker||U.timePickerInline?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:C,class:o.normalizeClass({dp__overlay:!U.timePickerInline,"dp--overlay-absolute":!n.timePicker&&!U.timePickerInline,"dp--overlay-relative":n.timePicker}),style:o.normalizeStyle(U.timePicker?{height:`${o.unref(d).modeHeight}px`}:void 0),tabindex:U.timePickerInline?void 0:0},[o.createElementVNode("div",{class:o.normalizeClass(U.timePickerInline?"dp__time_picker_inline_container":"dp__overlay_container dp__container_flex dp__time_picker_overlay_container"),style:{display:"flex"}},[U.$slots["time-picker-overlay"]?o.renderSlot(U.$slots,"time-picker-overlay",{key:0,hours:e.hours,minutes:e.minutes,seconds:e.seconds,setHours:_,setMinutes:N,setSeconds:q}):o.createCommentVNode("",!0),U.$slots["time-picker-overlay"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(U.timePickerInline?"dp__flex":"dp__overlay_row dp__flex_row")},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(z.value,(B,T)=>o.withDirectives((o.openBlock(),o.createBlock(T31,o.mergeProps({key:T,ref_for:!0},{...U.$props,order:T,hours:B.hours,minutes:B.minutes,seconds:B.seconds,closeTimePickerBtn:y.value,disabledTimesConfig:e.disabledTimesConfig,disabled:T===0?U.fixedStart:U.fixedEnd},{ref_for:!0,ref_key:"timeInputRefs",ref:x,"validate-time":(L,W)=>e.validateTime(L,k(W,T,L)),"onUpdate:hours":L=>_(k(L,T,"hours")),"onUpdate:minutes":L=>N(k(L,T,"minutes")),"onUpdate:seconds":L=>q(k(L,T,"seconds")),onMounted:S,onOverlayClosed:O,onOverlayOpened:J[2]||(J[2]=L=>U.$emit("overlay-opened",L)),onAmPmChange:J[3]||(J[3]=L=>U.$emit("am-pm-change",L))}),o.createSlots({_:2},[o.renderList(o.unref(V),(L,W)=>({name:L,fn:o.withCtx(j=>[o.renderSlot(U.$slots,L,o.mergeProps({ref_for:!0},j))])}))]),1040,["validate-time","onUpdate:hours","onUpdate:minutes","onUpdate:seconds"])),[[o.vShow,T===0?!0:b.value]])),128))],2)),!U.timePicker&&!U.timePickerInline?o.withDirectives((o.openBlock(),o.createElementBlock("button",{key:2,ref_key:"closeTimePickerBtn",ref:y,type:"button",class:o.normalizeClass(A.value),"aria-label":(G=o.unref(f))==null?void 0:G.closeTimePicker,tabindex:"0",onKeydown:J[4]||(J[4]=B=>o.unref(y3)(B,()=>H(!1))),onClick:J[5]||(J[5]=B=>H(!1))},[U.$slots["calendar-icon"]?o.renderSlot(U.$slots,"calendar-icon",{key:0}):o.createCommentVNode("",!0),U.$slots["calendar-icon"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(pa),{key:1}))],42,O31)),[[o.vShow,!o.unref(p)(U.hideNavigation,"time")]]):o.createCommentVNode("",!0)],2)],14,D31)):o.createCommentVNode("",!0)]}),_:3},8,["name","css"])])}}}),xb=(e,t,a,r)=>{const{defaultedRange:n}=re(e),c=(C,b)=>Array.isArray(t[C])?t[C][b]:t[C],i=C=>e.enableSeconds?Array.isArray(t.seconds)?t.seconds[C]:t.seconds:0,s=(C,b)=>C?b!==void 0?n0(C,c("hours",b),c("minutes",b),i(b)):n0(C,t.hours,t.minutes,i()):El(A1(),i(b)),l=(C,b)=>{t[C]=b},f=o.computed(()=>e.modelAuto&&n.value.enabled?Array.isArray(a.value)?a.value.length>1:!1:n.value.enabled),u=(C,b)=>{const M=Object.fromEntries(Object.keys(t).map(w=>w===C?[w,b]:[w,t[w]].slice()));if(f.value&&!n.value.disableTimeRangeValidation){const w=H=>a.value?n0(a.value[H],M.hours[H],M.minutes[H],M.seconds[H]):null,z=H=>Tl(a.value[H],0);return!(l2(w(0),w(1))&&(na(w(0),z(1))||tn(w(1),z(0))))}return!0},d=(C,b)=>{u(C,b)&&(l(C,b),r&&r())},h=C=>{d("hours",C)},m=C=>{d("minutes",C)},v=C=>{d("seconds",C)},p=(C,b,M,w)=>{b&&h(C),!b&&!M&&m(C),M&&v(C),a.value&&w(a.value)},g=C=>{if(C){const b=Array.isArray(C),M=b?[+C[0].hours,+C[1].hours]:+C.hours,w=b?[+C[0].minutes,+C[1].minutes]:+C.minutes,z=b?[+C[0].seconds,+C[1].seconds]:+C.seconds;l("hours",M),l("minutes",w),e.enableSeconds&&l("seconds",z)}},y=(C,b)=>{const M={hours:Array.isArray(t.hours)?t.hours[C]:t.hours,disabledArr:[]};return(b||b===0)&&(M.hours=b),Array.isArray(e.disabledTimes)&&(M.disabledArr=n.value.enabled&&Array.isArray(e.disabledTimes[C])?e.disabledTimes[C]:e.disabledTimes),M},x=o.computed(()=>(C,b)=>{var M;if(Array.isArray(e.disabledTimes)){const{disabledArr:w,hours:z}=y(C,b),H=w.filter(A=>+A.hours===z);return((M=H[0])==null?void 0:M.minutes)==="*"?{hours:[z],minutes:void 0,seconds:void 0}:{hours:[],minutes:(H==null?void 0:H.map(A=>+A.minutes))??[],seconds:(H==null?void 0:H.map(A=>A.seconds?+A.seconds:void 0))??[]}}return{hours:[],minutes:[],seconds:[]}});return{setTime:l,updateHours:h,updateMinutes:m,updateSeconds:v,getSetDateTime:s,updateTimeValues:p,getSecondsValue:i,assignStartTime:g,validateTime:u,disabledTimesConfig:x}},P31=(e,t)=>{const{modelValue:a,time:r}=Tn(e,t),{defaultedStartTime:n,defaultedRange:c}=re(e),{updateTimeValues:i,getSetDateTime:s,setTime:l,assignStartTime:f,disabledTimesConfig:u,validateTime:d}=xb(e,r,a,h);function h(){t("update-flow-step")}const m=b=>{const{hours:M,minutes:w,seconds:z}=b;return{hours:+M,minutes:+w,seconds:z?+z:0}},v=()=>{if(e.startTime){if(Array.isArray(e.startTime)){const M=m(e.startTime[0]),w=m(e.startTime[1]);return[N2(A1(),M),N2(A1(),w)]}const b=m(e.startTime);return N2(A1(),b)}return c.value.enabled?[null,null]:null},p=()=>{if(c.value.enabled){const[b,M]=v();a.value=[s(b,0),s(M,1)]}else a.value=s(v())},g=b=>Array.isArray(b)?[X0(A1(b[0])),X0(A1(b[1]))]:[X0(b??A1())],y=(b,M,w)=>{l("hours",b),l("minutes",M),l("seconds",e.enableSeconds?w:0)},x=()=>{const[b,M]=g(a.value);return c.value.enabled?y([b.hours,M.hours],[b.minutes,M.minutes],[b.seconds,M.seconds]):y(b.hours,b.minutes,b.seconds)};o.onMounted(()=>{if(!e.shadow)return f(n.value),a.value?x():p()});const C=()=>{Array.isArray(a.value)?a.value=a.value.map((b,M)=>b&&s(b,M)):a.value=s(a.value),t("time-update")};return{modelValue:a,time:r,disabledTimesConfig:u,updateTime:(b,M=!0,w=!1)=>{i(b,M,w,C)},validateTime:d}},B31=o.defineComponent({compatConfig:{MODE:3},__name:"TimePickerSolo",props:{...b4},emits:["update:internal-model-value","time-update","am-pm-change","mount","reset-flow","update-flow-step","overlay-toggle"],setup(e,{expose:t,emit:a}){const r=a,n=e,c=o.useSlots(),i=z3(c,"timePicker"),s=o.ref(null),{time:l,modelValue:f,disabledTimesConfig:u,updateTime:d,validateTime:h}=P31(n,r);return o.onMounted(()=>{n.shadow||r("mount",null)}),t({getSidebarProps:()=>({modelValue:f,time:l,updateTime:d}),toggleTimePicker:(m,v=!1,p="")=>{var g;(g=s.value)==null||g.toggleTimePicker(m,v,p)}}),(m,v)=>(o.openBlock(),o.createBlock(F5,{"multi-calendars":0,stretch:""},{default:o.withCtx(()=>[o.createVNode(yb,o.mergeProps({ref_key:"tpRef",ref:s},m.$props,{hours:o.unref(l).hours,minutes:o.unref(l).minutes,seconds:o.unref(l).seconds,"internal-model-value":m.internalModelValue,"disabled-times-config":o.unref(u),"validate-time":o.unref(h),"onUpdate:hours":v[0]||(v[0]=p=>o.unref(d)(p)),"onUpdate:minutes":v[1]||(v[1]=p=>o.unref(d)(p,!1)),"onUpdate:seconds":v[2]||(v[2]=p=>o.unref(d)(p,!1,!0)),onAmPmChange:v[3]||(v[3]=p=>m.$emit("am-pm-change",p)),onResetFlow:v[4]||(v[4]=p=>m.$emit("reset-flow")),onOverlayClosed:v[5]||(v[5]=p=>m.$emit("overlay-toggle",{open:!1,overlay:p})),onOverlayOpened:v[6]||(v[6]=p=>m.$emit("overlay-toggle",{open:!0,overlay:p}))}),o.createSlots({_:2},[o.renderList(o.unref(i),(p,g)=>({name:p,fn:o.withCtx(y=>[o.renderSlot(m.$slots,p,o.normalizeProps(o.guardReactiveProps(y)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"])]),_:3}))}}),F31={class:"dp--header-wrap"},R31={key:0,class:"dp__month_year_wrap"},I31={key:0},$31={class:"dp__month_year_wrap"},U31=["aria-label","data-test","onClick","onKeydown"],W31=o.defineComponent({compatConfig:{MODE:3},__name:"DpHeader",props:{month:{type:Number,default:0},year:{type:Number,default:0},instance:{type:Number,default:0},years:{type:Array,default:()=>[]},months:{type:Array,default:()=>[]},...b4},emits:["update-month-year","mount","reset-flow","overlay-closed","overlay-opened"],setup(e,{expose:t,emit:a}){const r=a,n=e,{defaultedTransitions:c,defaultedAriaLabels:i,defaultedMultiCalendars:s,defaultedFilters:l,defaultedConfig:f,defaultedHighlight:u,propDates:d}=re(n),{transitionName:h,showTransition:m}=An(c),{buildMatrix:v}=x0(),{handleMonthYearChange:p,isDisabled:g,updateMonthYear:y}=Je1(n,r),{showLeftIcon:x,showRightIcon:C}=P5(),b=o.ref(!1),M=o.ref(!1),w=o.ref([null,null,null,null]);o.onMounted(()=>{r("mount")});const z=B=>({get:()=>n[B],set:T=>{const L=B===X3.month?X3.year:X3.month;r("update-month-year",{[B]:T,[L]:n[L]}),B===X3.month?S(!0):O(!0)}}),H=o.computed(z(X3.month)),A=o.computed(z(X3.year)),V=o.computed(()=>B=>({month:n.month,year:n.year,items:B===X3.month?n.months:n.years,instance:n.instance,updateMonthYear:y,toggle:B===X3.month?S:O})),k=o.computed(()=>n.months.find(T=>T.value===n.month)||{text:"",value:0}),_=o.computed(()=>ia(n.months,B=>{const T=n.month===B.value,L=an(B.value,ib(n.year,d.value.minDate),sb(n.year,d.value.maxDate))||l.value.months.includes(B.value),W=db(u.value,B.value,n.year);return{active:T,disabled:L,highlighted:W}})),N=o.computed(()=>ia(n.years,B=>{const T=n.year===B.value,L=an(B.value,sa(d.value.minDate),sa(d.value.maxDate))||l.value.years.includes(B.value),W=$l(u.value,B.value);return{active:T,disabled:L,highlighted:W}})),q=(B,T,L)=>{L!==void 0?B.value=L:B.value=!B.value,B.value?r("overlay-opened",T):r("overlay-closed",T)},S=(B=!1,T)=>{U(B),q(b,Ye.month,T)},O=(B=!1,T)=>{U(B),q(M,Ye.year,T)},U=B=>{B||r("reset-flow")},J=(B,T)=>{n.arrowNavigation&&(w.value[T]=ke(B),v(w.value,"monthYear"))},Y=o.computed(()=>{var B,T;return[{type:X3.month,index:1,toggle:S,modelValue:H.value,updateModelValue:L=>H.value=L,text:k.value.text,showSelectionGrid:b.value,items:_.value,ariaLabel:(B=i.value)==null?void 0:B.openMonthsOverlay},{type:X3.year,index:2,toggle:O,modelValue:A.value,updateModelValue:L=>A.value=L,text:cb(n.year,n.locale),showSelectionGrid:M.value,items:N.value,ariaLabel:(T=i.value)==null?void 0:T.openYearsOverlay}]}),G=o.computed(()=>n.disableYearSelect?[Y.value[0]]:n.yearFirst?[...Y.value].reverse():Y.value);return t({toggleMonthPicker:S,toggleYearPicker:O,handleMonthYearChange:p}),(B,T)=>{var L,W,j;return o.openBlock(),o.createElementBlock("div",F31,[B.$slots["month-year"]?(o.openBlock(),o.createElementBlock("div",R31,[o.renderSlot(B.$slots,"month-year",o.normalizeProps(o.guardReactiveProps({month:e.month,year:e.year,months:e.months,years:e.years,updateMonthYear:o.unref(y),handleMonthYearChange:o.unref(p),instance:e.instance})))])):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[B.$slots["top-extra"]?(o.openBlock(),o.createElementBlock("div",I31,[o.renderSlot(B.$slots,"top-extra",{value:B.internalModelValue})])):o.createCommentVNode("",!0),o.createElementVNode("div",$31,[o.unref(x)(o.unref(s),e.instance)&&!B.vertical?(o.openBlock(),o.createBlock(gr,{key:0,"aria-label":(L=o.unref(i))==null?void 0:L.prevMonth,disabled:o.unref(g)(!1),onActivate:T[0]||(T[0]=E=>o.unref(p)(!1,!0)),onSetRef:T[1]||(T[1]=E=>J(E,0))},{default:o.withCtx(()=>[B.$slots["arrow-left"]?o.renderSlot(B.$slots,"arrow-left",{key:0}):o.createCommentVNode("",!0),B.$slots["arrow-left"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Nl),{key:1}))]),_:3},8,["aria-label","disabled"])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(["dp__month_year_wrap",{dp__year_disable_select:B.disableYearSelect}])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(G.value,(E,R)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:E.type},[o.createElementVNode("button",{ref_for:!0,ref:a1=>J(a1,R+1),type:"button",class:"dp__btn dp__month_year_select",tabindex:"0","aria-label":E.ariaLabel,"data-test":`${E.type}-toggle-overlay-${e.instance}`,onClick:E.toggle,onKeydown:a1=>o.unref(y3)(a1,()=>E.toggle(),!0)},[B.$slots[E.type]?o.renderSlot(B.$slots,E.type,{key:0,text:E.text,value:n[E.type]}):o.createCommentVNode("",!0),B.$slots[E.type]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(E.text),1)],64))],40,U31),o.createVNode(o.Transition,{name:o.unref(h)(E.showSelectionGrid),css:o.unref(m)},{default:o.withCtx(()=>[E.showSelectionGrid?(o.openBlock(),o.createBlock(En,{key:0,items:E.items,"arrow-navigation":B.arrowNavigation,"hide-navigation":B.hideNavigation,"is-last":B.autoApply&&!o.unref(f).keepActionRow,"skip-button-ref":!1,config:B.config,type:E.type,"header-refs":[],"esc-close":B.escClose,"menu-wrap-ref":B.menuWrapRef,"text-input":B.textInput,"aria-labels":B.ariaLabels,onSelected:E.updateModelValue,onToggle:E.toggle},o.createSlots({"button-icon":o.withCtx(()=>[B.$slots["calendar-icon"]?o.renderSlot(B.$slots,"calendar-icon",{key:0}):o.createCommentVNode("",!0),B.$slots["calendar-icon"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(pa),{key:1}))]),_:2},[B.$slots[`${E.type}-overlay-value`]?{name:"item",fn:o.withCtx(({item:a1})=>[o.renderSlot(B.$slots,`${E.type}-overlay-value`,{text:a1.text,value:a1.value})]),key:"0"}:void 0,B.$slots[`${E.type}-overlay`]?{name:"overlay",fn:o.withCtx(()=>[o.renderSlot(B.$slots,`${E.type}-overlay`,o.mergeProps({ref_for:!0},V.value(E.type)))]),key:"1"}:void 0,B.$slots[`${E.type}-overlay-header`]?{name:"header",fn:o.withCtx(()=>[o.renderSlot(B.$slots,`${E.type}-overlay-header`,{toggle:E.toggle})]),key:"2"}:void 0]),1032,["items","arrow-navigation","hide-navigation","is-last","config","type","esc-close","menu-wrap-ref","text-input","aria-labels","onSelected","onToggle"])):o.createCommentVNode("",!0)]),_:2},1032,["name","css"])],64))),128))],2),o.unref(x)(o.unref(s),e.instance)&&B.vertical?(o.openBlock(),o.createBlock(gr,{key:1,"aria-label":(W=o.unref(i))==null?void 0:W.prevMonth,disabled:o.unref(g)(!1),onActivate:T[2]||(T[2]=E=>o.unref(p)(!1,!0))},{default:o.withCtx(()=>[B.$slots["arrow-up"]?o.renderSlot(B.$slots,"arrow-up",{key:0}):o.createCommentVNode("",!0),B.$slots["arrow-up"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Pl),{key:1}))]),_:3},8,["aria-label","disabled"])):o.createCommentVNode("",!0),o.unref(C)(o.unref(s),e.instance)?(o.openBlock(),o.createBlock(gr,{key:2,ref:"rightIcon",disabled:o.unref(g)(!0),"aria-label":(j=o.unref(i))==null?void 0:j.nextMonth,onActivate:T[3]||(T[3]=E=>o.unref(p)(!0,!0)),onSetRef:T[4]||(T[4]=E=>J(E,B.disableYearSelect?2:3))},{default:o.withCtx(()=>[B.$slots[B.vertical?"arrow-down":"arrow-right"]?o.renderSlot(B.$slots,B.vertical?"arrow-down":"arrow-right",{key:0}):o.createCommentVNode("",!0),B.$slots[B.vertical?"arrow-down":"arrow-right"]?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.resolveDynamicComponent(B.vertical?o.unref(Bl):o.unref(Dl)),{key:1}))]),_:3},8,["disabled","aria-label"])):o.createCommentVNode("",!0)])],64))])}}}),q31=["aria-label"],j31={class:"dp__calendar_header",role:"row"},Y31={key:0,class:"dp__calendar_header_item",role:"gridcell"},G31=["aria-label"],X31=o.createElementVNode("div",{class:"dp__calendar_header_separator"},null,-1),K31=["aria-label"],Z31={key:0,role:"gridcell",class:"dp__calendar_item dp__week_num"},Q31={class:"dp__cell_inner"},J31=["id","aria-selected","aria-disabled","aria-label","data-test","onClick","onKeydown","onMouseenter","onMouseleave","onMousedown"],e41=o.defineComponent({compatConfig:{MODE:3},__name:"DpCalendar",props:{mappedDates:{type:Array,default:()=>[]},instance:{type:Number,default:0},month:{type:Number,default:0},year:{type:Number,default:0},...b4},emits:["select-date","set-hover-date","handle-scroll","mount","handle-swipe","handle-space","tooltip-open","tooltip-close"],setup(e,{expose:t,emit:a}){const r=a,n=e,{buildMultiLevelMatrix:c}=x0(),{defaultedTransitions:i,defaultedConfig:s,defaultedAriaLabels:l,defaultedMultiCalendars:f,defaultedWeekNumbers:u,defaultedMultiDates:d}=re(n),h=o.ref(null),m=o.ref({bottom:"",left:"",transform:""}),v=o.ref([]),p=o.ref(null),g=o.ref(!0),y=o.ref(""),x=o.ref({startX:0,endX:0,startY:0,endY:0}),C=o.ref([]),b=o.ref({left:"50%"}),M=o.ref(!1),w=o.computed(()=>n.calendar?n.calendar(n.mappedDates):n.mappedDates),z=o.computed(()=>n.dayNames?Array.isArray(n.dayNames)?n.dayNames:n.dayNames(n.locale,+n.weekStart):Ce1(n.formatLocale,n.locale,+n.weekStart));o.onMounted(()=>{r("mount",{cmp:"calendar",refs:v}),s.value.noSwipe||p.value&&(p.value.addEventListener("touchstart",Y,{passive:!1}),p.value.addEventListener("touchend",G,{passive:!1}),p.value.addEventListener("touchmove",B,{passive:!1})),n.monthChangeOnScroll&&p.value&&p.value.addEventListener("wheel",W,{passive:!1})});const H=t1=>t1?n.vertical?"vNext":"next":n.vertical?"vPrevious":"previous",A=(t1,d1)=>{if(n.transitions){const F=k3(ut(A1(),n.month,n.year));y.value=me(k3(ut(A1(),t1,d1)),F)?i.value[H(!0)]:i.value[H(!1)],g.value=!1,o.nextTick(()=>{g.value=!0})}},V=o.computed(()=>({[n.calendarClassName]:!!n.calendarClassName})),k=o.computed(()=>t1=>{const d1=ze1(t1);return{dp__marker_dot:d1.type==="dot",dp__marker_line:d1.type==="line"}}),_=o.computed(()=>t1=>l2(t1,h.value)),N=o.computed(()=>({dp__calendar:!0,dp__calendar_next:f.value.count>0&&n.instance!==0})),q=o.computed(()=>t1=>n.hideOffsetDates?t1.current:!0),S=t1=>P4(t1,"yyyy-MM-dd"),O=async(t1,d1,F)=>{const p1=ke(v.value[d1][F]);if(p1){const{width:z1,height:h1}=p1.getBoundingClientRect();h.value=t1.value;let l1={left:`${z1/2}px`},f1=-50;if(await o.nextTick(),C.value[0]){const{left:u1,width:v1}=C.value[0].getBoundingClientRect();u1<0&&(l1={left:"0"},f1=0,b.value.left=`${z1/2}px`),window.innerWidth<u1+v1&&(l1={right:"0"},f1=0,b.value.left=`${v1-z1/2}px`)}m.value={bottom:`${h1}px`,...l1,transform:`translateX(${f1}%)`},r("tooltip-open",t1.marker)}},U=async(t1,d1,F)=>{var p1,z1;if(M.value&&d.value.enabled&&d.value.dragSelect)return r("select-date",t1);r("set-hover-date",t1),(z1=(p1=t1.marker)==null?void 0:p1.tooltip)!=null&&z1.length&&await O(t1,d1,F)},J=t1=>{h.value&&(h.value=null,m.value=JSON.parse(JSON.stringify({bottom:"",left:"",transform:""})),r("tooltip-close",t1.marker))},Y=t1=>{x.value.startX=t1.changedTouches[0].screenX,x.value.startY=t1.changedTouches[0].screenY},G=t1=>{x.value.endX=t1.changedTouches[0].screenX,x.value.endY=t1.changedTouches[0].screenY,T()},B=t1=>{n.vertical&&!n.inline&&t1.preventDefault()},T=()=>{const t1=n.vertical?"Y":"X";Math.abs(x.value[`start${t1}`]-x.value[`end${t1}`])>10&&r("handle-swipe",x.value[`start${t1}`]>x.value[`end${t1}`]?"right":"left")},L=(t1,d1,F)=>{t1&&(Array.isArray(v.value[d1])?v.value[d1][F]=t1:v.value[d1]=[t1]),n.arrowNavigation&&c(v.value,"calendar")},W=t1=>{n.monthChangeOnScroll&&(t1.preventDefault(),r("handle-scroll",t1))},j=t1=>u.value.type==="local"?Ll(t1.value,{weekStartsOn:+n.weekStart}):u.value.type==="iso"?Hl(t1.value):typeof u.value.type=="function"?u.value.type(t1.value):"",E=t1=>{const d1=t1[0];return u.value.hideOnOffsetDates?t1.some(F=>F.current)?j(d1):"":j(d1)},R=(t1,d1)=>{d.value.enabled||(r0(t1,s.value),r("select-date",d1))},a1=t1=>{r0(t1,s.value)},n1=t1=>{d.value.enabled&&d.value.dragSelect?(M.value=!0,r("select-date",t1)):d.value.enabled&&r("select-date",t1)};return t({triggerTransition:A}),(t1,d1)=>{var F;return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(N.value)},[o.createElementVNode("div",{ref_key:"calendarWrapRef",ref:p,role:"grid",class:o.normalizeClass(V.value),"aria-label":(F=o.unref(l))==null?void 0:F.calendarWrap},[o.createElementVNode("div",j31,[t1.weekNumbers?(o.openBlock(),o.createElementBlock("div",Y31,o.toDisplayString(t1.weekNumName),1)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(z.value,(p1,z1)=>{var h1,l1;return o.openBlock(),o.createElementBlock("div",{key:z1,class:"dp__calendar_header_item",role:"gridcell","data-test":"calendar-header","aria-label":(l1=(h1=o.unref(l))==null?void 0:h1.weekDay)==null?void 0:l1.call(h1,z1)},[t1.$slots["calendar-header"]?o.renderSlot(t1.$slots,"calendar-header",{key:0,day:p1,index:z1}):o.createCommentVNode("",!0),t1.$slots["calendar-header"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(p1),1)],64))],8,G31)}),128))]),X31,o.createVNode(o.Transition,{name:y.value,css:!!t1.transitions},{default:o.withCtx(()=>{var p1;return[g.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"dp__calendar",role:"rowgroup","aria-label":((p1=o.unref(l))==null?void 0:p1.calendarDays)||void 0,onMouseleave:d1[1]||(d1[1]=z1=>M.value=!1)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(w.value,(z1,h1)=>(o.openBlock(),o.createElementBlock("div",{key:h1,class:"dp__calendar_row",role:"row"},[t1.weekNumbers?(o.openBlock(),o.createElementBlock("div",Z31,[o.createElementVNode("div",Q31,o.toDisplayString(E(z1.days)),1)])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(z1.days,(l1,f1)=>{var u1,v1,k1;return o.openBlock(),o.createElementBlock("div",{id:S(l1.value),ref_for:!0,ref:b1=>L(b1,h1,f1),key:f1+h1,role:"gridcell",class:"dp__calendar_item","aria-selected":(l1.classData.dp__active_date||l1.classData.dp__range_start||l1.classData.dp__range_start)??void 0,"aria-disabled":l1.classData.dp__cell_disabled||void 0,"aria-label":(v1=(u1=o.unref(l))==null?void 0:u1.day)==null?void 0:v1.call(u1,l1),tabindex:"0","data-test":l1.value,onClick:o.withModifiers(b1=>R(b1,l1),["prevent"]),onKeydown:b1=>o.unref(y3)(b1,()=>t1.$emit("select-date",l1)),onMouseenter:b1=>U(l1,h1,f1),onMouseleave:b1=>J(l1),onMousedown:b1=>n1(l1),onMouseup:d1[0]||(d1[0]=b1=>M.value=!1)},[o.createElementVNode("div",{class:o.normalizeClass(["dp__cell_inner",l1.classData])},[t1.$slots.day&&q.value(l1)?o.renderSlot(t1.$slots,"day",{key:0,day:+l1.text,date:l1.value}):o.createCommentVNode("",!0),t1.$slots.day?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(l1.text),1)],64)),l1.marker&&q.value(l1)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:2},[t1.$slots.marker?o.renderSlot(t1.$slots,"marker",{key:0,marker:l1.marker,day:+l1.text,date:l1.value}):(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(k.value(l1.marker)),style:o.normalizeStyle(l1.marker.color?{backgroundColor:l1.marker.color}:{})},null,6))],64)):o.createCommentVNode("",!0),_.value(l1.value)?(o.openBlock(),o.createElementBlock("div",{key:3,ref_for:!0,ref_key:"activeTooltip",ref:C,class:"dp__marker_tooltip",style:o.normalizeStyle(m.value)},[(k1=l1.marker)!=null&&k1.tooltip?(o.openBlock(),o.createElementBlock("div",{key:0,class:"dp__tooltip_content",onClick:a1},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l1.marker.tooltip,(b1,H1)=>(o.openBlock(),o.createElementBlock("div",{key:H1,class:"dp__tooltip_text"},[t1.$slots["marker-tooltip"]?o.renderSlot(t1.$slots,"marker-tooltip",{key:0,tooltip:b1,day:l1.value}):o.createCommentVNode("",!0),t1.$slots["marker-tooltip"]?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createElementVNode("div",{class:"dp__tooltip_mark",style:o.normalizeStyle(b1.color?{backgroundColor:b1.color}:{})},null,4),o.createElementVNode("div",null,o.toDisplayString(b1.text),1)],64))]))),128)),o.createElementVNode("div",{class:"dp__arrow_bottom_tp",style:o.normalizeStyle(b.value)},null,4)])):o.createCommentVNode("",!0)],4)):o.createCommentVNode("",!0)],2)],40,J31)}),128))]))),128))],40,K31)):o.createCommentVNode("",!0)]}),_:3},8,["name","css"])],10,q31)],2)}}}),im=e=>Array.isArray(e),t41=(e,t,a,r)=>{const n=o.ref([]),c=o.ref(new Date),i=o.ref(),{modelValue:s,calendars:l,time:f,today:u}=Tn(e,t),{defaultedMultiCalendars:d,defaultedStartTime:h,defaultedRange:m,defaultedConfig:v,defaultedTz:p,propDates:g,defaultedMultiDates:y}=re(e),{validateMonthYearInRange:x,isDisabled:C,isDateRangeAllowed:b,checkMinMaxRange:M}=b0(e),{updateTimeValues:w,getSetDateTime:z,setTime:H,assignStartTime:A,validateTime:V,disabledTimesConfig:k}=xb(e,f,s,r),_=o.computed(()=>y1=>l.value[y1]?l.value[y1].month:0),N=o.computed(()=>y1=>l.value[y1]?l.value[y1].year:0),q=y1=>!v.value.keepViewOnOffsetClick||y1?!0:!i.value,S=(y1,m1,S1,T1=!1)=>{var Q1,Q2;q(T1)&&(l.value[y1]||(l.value[y1]={month:0,year:0}),l.value[y1].month=tm(m1)?(Q1=l.value[y1])==null?void 0:Q1.month:m1,l.value[y1].year=tm(S1)?(Q2=l.value[y1])==null?void 0:Q2.year:S1)},O=()=>{e.autoApply&&t("select-date")};o.watch(s,(y1,m1)=>{JSON.stringify(y1)!==JSON.stringify(m1)&&Y()},{deep:!0}),o.onMounted(()=>{e.shadow||(s.value||(t1(),h.value&&A(h.value)),Y(!0),e.focusStartDate&&e.startDate&&t1())});const U=o.computed(()=>{var y1;return(y1=e.flow)!=null&&y1.length&&!e.partialFlow?e.flowStep===e.flow.length:!0}),J=()=>{e.autoApply&&U.value&&t("auto-apply")},Y=(y1=!1)=>{if(s.value)return Array.isArray(s.value)?(n.value=s.value,E(y1)):T(s.value,y1);if(d.value.count&&y1&&!e.startDate)return B(A1(),y1)},G=()=>Array.isArray(s.value)&&m.value.enabled?o2(s.value[0])===o2(s.value[1]??s.value[0]):!1,B=(y1,m1=!1)=>{if((!d.value.count||!d.value.static||m1)&&S(0,o2(y1),n2(y1)),d.value.count&&(!d.value.solo||!s.value||G()))for(let S1=1;S1<d.value.count;S1++){const T1=N2(A1(),{month:_.value(S1-1),year:N.value(S1-1)}),Q1=Ex(T1,{months:1});l.value[S1]={month:o2(Q1),year:n2(Q1)}}},T=(y1,m1)=>{B(y1),H("hours",wt(y1)),H("minutes",h0(y1)),H("seconds",ra(y1)),d.value.count&&m1&&n1()},L=y1=>{if(d.value.count){if(d.value.solo)return 0;const m1=o2(y1[0]),S1=o2(y1[1]);return Math.abs(S1-m1)<d.value.count?0:1}return 1},W=(y1,m1)=>{y1[1]&&m.value.showLastInRange?B(y1[L(y1)],m1):B(y1[0],m1);const S1=(T1,Q1)=>[T1(y1[0]),y1[1]?T1(y1[1]):f[Q1][1]];H("hours",S1(wt,"hours")),H("minutes",S1(h0,"minutes")),H("seconds",S1(ra,"seconds"))},j=(y1,m1)=>{if((m.value.enabled||e.weekPicker)&&!y.value.enabled)return W(y1,m1);if(y.value.enabled&&m1){const S1=y1[y1.length-1];return T(S1,m1)}},E=y1=>{const m1=s.value;j(m1,y1),d.value.count&&d.value.solo&&n1()},R=(y1,m1)=>{const S1=N2(A1(),{month:_.value(m1),year:N.value(m1)}),T1=y1<0?f4(S1,1):ca(S1,1);x(o2(T1),n2(T1),y1<0,e.preventMinMaxNavigation)&&(S(m1,o2(T1),n2(T1)),t("update-month-year",{instance:m1,month:o2(T1),year:n2(T1)}),d.value.count&&!d.value.solo&&a1(m1),a())},a1=y1=>{for(let m1=y1-1;m1>=0;m1--){const S1=ca(N2(A1(),{month:_.value(m1+1),year:N.value(m1+1)}),1);S(m1,o2(S1),n2(S1))}for(let m1=y1+1;m1<=d.value.count-1;m1++){const S1=f4(N2(A1(),{month:_.value(m1-1),year:N.value(m1-1)}),1);S(m1,o2(S1),n2(S1))}},n1=()=>{if(Array.isArray(s.value)&&s.value.length===2){const y1=A1(A1(s.value[1]?s.value[1]:f4(s.value[0],1))),[m1,S1]=[o2(s.value[0]),n2(s.value[0])],[T1,Q1]=[o2(s.value[1]),n2(s.value[1])];(m1!==T1||m1===T1&&S1!==Q1)&&d.value.solo&&S(1,o2(y1),n2(y1))}else s.value&&!Array.isArray(s.value)&&(S(0,o2(s.value),n2(s.value)),B(A1()))},t1=()=>{e.startDate&&(S(0,o2(A1(e.startDate)),n2(A1(e.startDate))),d.value.count&&a1(0))},d1=(y1,m1)=>{if(e.monthChangeOnScroll){const S1=new Date().getTime()-c.value.getTime(),T1=Math.abs(y1.deltaY);let Q1=500;T1>1&&(Q1=100),T1>100&&(Q1=0),S1>Q1&&(c.value=new Date,R(e.monthChangeOnScroll!=="inverse"?-y1.deltaY:y1.deltaY,m1))}},F=(y1,m1,S1=!1)=>{e.monthChangeOnArrows&&e.vertical===S1&&p1(y1,m1)},p1=(y1,m1)=>{R(y1==="right"?-1:1,m1)},z1=y1=>{if(g.value.markers)return Ic(y1.value,g.value.markers)},h1=(y1,m1)=>{switch(e.sixWeeks===!0?"append":e.sixWeeks){case"prepend":return[!0,!1];case"center":return[y1==0,!0];case"fair":return[y1==0||m1>y1,!0];case"append":return[!1,!1];default:return[!1,!1]}},l1=(y1,m1,S1,T1)=>{if(e.sixWeeks&&y1.length<6){const Q1=6-y1.length,Q2=(m1.getDay()+7-T1)%7,we=6-(S1.getDay()+7-T1)%7,[d3,j3]=h1(Q2,we);for(let k2=1;k2<=Q1;k2++)if(j3?!!(k2%2)==d3:d3){const xe=y1[0].days[0],G4=f1(J3(xe.value,-7),o2(m1));y1.unshift({days:G4})}else{const xe=y1[y1.length-1],G4=xe.days[xe.days.length-1],X4=f1(J3(G4.value,1),o2(m1));y1.push({days:X4})}}return y1},f1=(y1,m1)=>{const S1=A1(y1),T1=[];for(let Q1=0;Q1<7;Q1++){const Q2=J3(S1,Q1),we=o2(Q2)!==m1;T1.push({text:e.hideOffsetDates&&we?"":Q2.getDate(),value:Q2,current:!we,classData:{}})}return T1},u1=(y1,m1)=>{const S1=[],T1=new Date(m1,y1),Q1=new Date(m1,y1+1,0),Q2=e.weekStart,we=y4(T1,{weekStartsOn:Q2}),d3=j3=>{const k2=f1(j3,y1);if(S1.push({days:k2}),!S1[S1.length-1].days.some(xe=>l2(k3(xe.value),k3(Q1)))){const xe=J3(j3,7);d3(xe)}};return d3(we),l1(S1,T1,Q1,Q2)},v1=y1=>{const m1=n0(A1(y1.value),f.hours,f.minutes,K1());t("date-update",m1),y.value.enabled?Ul(m1,s,y.value.limit):s.value=m1,r(),o.nextTick().then(()=>{J()})},k1=y1=>m.value.noDisabledRange?ob(n.value[0],y1).some(m1=>C(m1)):!1,b1=()=>{n.value=s.value?s.value.slice():[],n.value.length===2&&!(m.value.fixedStart||m.value.fixedEnd)&&(n.value=[])},H1=(y1,m1)=>{const S1=[A1(y1.value),J3(A1(y1.value),+m.value.autoRange)];b(S1)?(m1&&F1(y1.value),n.value=S1):t("invalid-date",y1.value)},F1=y1=>{const m1=o2(A1(y1)),S1=n2(A1(y1));if(S(0,m1,S1),d.value.count>0)for(let T1=1;T1<d.value.count;T1++){const Q1=Ae1(N2(A1(y1),{year:_.value(T1-1),month:N.value(T1-1)}));S(T1,Q1.month,Q1.year)}},$1=y1=>{if(k1(y1.value)||!M(y1.value,s.value,m.value.fixedStart?0:1))return t("invalid-date",y1.value);n.value=vb(A1(y1.value),s,t,m)},W1=(y1,m1)=>{if(b1(),m.value.autoRange)return H1(y1,m1);if(m.value.fixedStart||m.value.fixedEnd)return $1(y1);n.value[0]?M(A1(y1.value),s.value)&&!k1(y1.value)?ne(A1(y1.value),A1(n.value[0]))?(n.value.unshift(A1(y1.value)),t("range-end",n.value[0])):(n.value[1]=A1(y1.value),t("range-end",n.value[1])):(e.autoApply&&t("auto-apply-invalid",y1.value),t("invalid-date",y1.value)):(n.value[0]=A1(y1.value),t("range-start",n.value[0]))},K1=(y1=!0)=>e.enableSeconds?Array.isArray(f.seconds)?y1?f.seconds[0]:f.seconds[1]:f.seconds:0,d2=y1=>{n.value[y1]=n0(n.value[y1],f.hours[y1],f.minutes[y1],K1(y1!==1))},G1=()=>{var y1,m1;n.value[0]&&n.value[1]&&+((y1=n.value)==null?void 0:y1[0])>+((m1=n.value)==null?void 0:m1[1])&&(n.value.reverse(),t("range-start",n.value[0]),t("range-end",n.value[1]))},j2=()=>{n.value.length&&(n.value[0]&&!n.value[1]?d2(0):(d2(0),d2(1),r()),G1(),s.value=n.value.slice(),R5(n.value,t,e.autoApply,e.modelAuto))},O1=(y1,m1=!1)=>{if(C(y1.value)||!y1.current&&e.hideOffsetDates)return t("invalid-date",y1.value);if(i.value=JSON.parse(JSON.stringify(y1)),!m.value.enabled)return v1(y1);im(f.hours)&&im(f.minutes)&&!y.value.enabled&&(W1(y1,m1),j2())},c2=(y1,m1)=>{var S1;S(y1,m1.month,m1.year,!0),d.value.count&&!d.value.solo&&a1(y1),t("update-month-year",{instance:y1,month:m1.month,year:m1.year}),a(d.value.solo?y1:void 0);const T1=(S1=e.flow)!=null&&S1.length?e.flow[e.flowStep]:void 0;!m1.fromNav&&(T1===Ye.month||T1===Ye.year)&&r()},Y2=(y1,m1)=>{pb({value:y1,modelValue:s,range:m.value.enabled,timezone:m1?void 0:p.value.timezone}),O(),e.multiCalendars&&o.nextTick().then(()=>Y(!0))},m2=()=>{m.value.enabled?s.value&&Array.isArray(s.value)&&s.value[0]?s.value=ne(A1(),s.value[0])?[A1(),s.value[0]]:[s.value[0],A1()]:s.value=[A1()]:s.value=A1(),O()},A2=()=>{if(Array.isArray(s.value))if(y.value.enabled){const y1=Pe();s.value[s.value.length-1]=z(y1)}else s.value=s.value.map((y1,m1)=>y1&&z(y1,m1));else s.value=z(s.value);t("time-update")},Pe=()=>Array.isArray(s.value)&&s.value.length?s.value[s.value.length-1]:null;return{calendars:l,modelValue:s,month:_,year:N,time:f,disabledTimesConfig:k,today:u,validateTime:V,getCalendarDays:u1,getMarker:z1,handleScroll:d1,handleSwipe:p1,handleArrow:F,selectDate:O1,updateMonthYear:c2,presetDate:Y2,selectCurrentDate:m2,updateTime:(y1,m1=!0,S1=!1)=>{w(y1,m1,S1,A2)}}},a41={key:0},r41=o.defineComponent({__name:"DatePicker",props:{...b4},emits:["tooltip-open","tooltip-close","mount","update:internal-model-value","update-flow-step","reset-flow","auto-apply","focus-menu","select-date","range-start","range-end","invalid-fixed-range","time-update","am-pm-change","time-picker-open","time-picker-close","recalculate-position","update-month-year","auto-apply-invalid","date-update","invalid-date","overlay-toggle"],setup(e,{expose:t,emit:a}){const r=a,n=e,{calendars:c,month:i,year:s,modelValue:l,time:f,disabledTimesConfig:u,today:d,validateTime:h,getCalendarDays:m,getMarker:v,handleArrow:p,handleScroll:g,handleSwipe:y,selectDate:x,updateMonthYear:C,presetDate:b,selectCurrentDate:M,updateTime:w}=t41(n,r,G,B),z=o.useSlots(),{setHoverDate:H,getDayClassData:A,clearHoverDate:V}=r31(l,n),{defaultedMultiCalendars:k}=re(n),_=o.ref([]),N=o.ref([]),q=o.ref(null),S=z3(z,"calendar"),O=z3(z,"monthYear"),U=z3(z,"timePicker"),J=d1=>{n.shadow||r("mount",d1)};o.watch(c,()=>{n.shadow||setTimeout(()=>{r("recalculate-position")},0)},{deep:!0});const Y=o.computed(()=>d1=>m(i.value(d1),s.value(d1)).map(F=>({...F,days:F.days.map(p1=>(p1.marker=v(p1),p1.classData=A(p1),p1))})));function G(d1){var F;d1||d1===0?(F=N.value[d1])==null||F.triggerTransition(i.value(d1),s.value(d1)):N.value.forEach((p1,z1)=>p1.triggerTransition(i.value(z1),s.value(z1)))}function B(){r("update-flow-step")}const T=(d1,F=!1)=>{x(d1,F),n.spaceConfirm&&r("select-date")},L=(d1,F,p1=0)=>{var z1;(z1=_.value[p1])==null||z1.toggleMonthPicker(d1,F)},W=(d1,F,p1=0)=>{var z1;(z1=_.value[p1])==null||z1.toggleYearPicker(d1,F)},j=(d1,F,p1)=>{var z1;(z1=q.value)==null||z1.toggleTimePicker(d1,F,p1)},E=d1=>{if(!n.range){const F=l.value?l.value:d,p1=d1?y4(F,{weekStartsOn:1}):Ix(F,{weekStartsOn:1});x({value:p1,current:o2(F)===i.value(0),text:"",classData:{}})}},R=d1=>{var F;(F=_.value[0])==null||F.handleMonthYearChange(d1,!0)},a1=d1=>{C(0,{month:i.value(0),year:s.value(0)+(d1?1:-1),fromNav:!0})},n1=(d1,F)=>{d1===Ye.time&&r(`time-picker-${F?"open":"close"}`),r("overlay-toggle",{open:F,overlay:d1})},t1=d1=>{r("overlay-toggle",{open:!1,overlay:d1}),r("focus-menu")};return t({clearHoverDate:V,presetDate:b,selectCurrentDate:M,toggleMonthPicker:L,toggleYearPicker:W,toggleTimePicker:j,handleArrow:p,updateMonthYear:C,getSidebarProps:()=>({modelValue:l,month:i,year:s,time:f,updateTime:w,updateMonthYear:C,selectDate:x,presetDate:b}),changeMonth:R,changeYear:a1,selectWeekDate:E}),(d1,F)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(F5,{"multi-calendars":o.unref(k).count,collapse:d1.collapse},{default:o.withCtx(({instance:p1,index:z1})=>[d1.disableMonthYearSelect?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(W31,o.mergeProps({key:0,ref:h1=>{h1&&(_.value[z1]=h1)},months:o.unref(ab)(d1.formatLocale,d1.locale,d1.monthNameFormat),years:o.unref(Fl)(d1.yearRange,d1.locale,d1.reverseYears),month:o.unref(i)(p1),year:o.unref(s)(p1),instance:p1},d1.$props,{onMount:F[0]||(F[0]=h1=>J(o.unref(G0).header)),onResetFlow:F[1]||(F[1]=h1=>d1.$emit("reset-flow")),onUpdateMonthYear:h1=>o.unref(C)(p1,h1),onOverlayClosed:t1,onOverlayOpened:F[2]||(F[2]=h1=>d1.$emit("overlay-toggle",{open:!0,overlay:h1}))}),o.createSlots({_:2},[o.renderList(o.unref(O),(h1,l1)=>({name:h1,fn:o.withCtx(f1=>[o.renderSlot(d1.$slots,h1,o.normalizeProps(o.guardReactiveProps(f1)))])}))]),1040,["months","years","month","year","instance","onUpdateMonthYear"])),o.createVNode(e41,o.mergeProps({ref:h1=>{h1&&(N.value[z1]=h1)},"mapped-dates":Y.value(p1),month:o.unref(i)(p1),year:o.unref(s)(p1),instance:p1},d1.$props,{onSelectDate:h1=>o.unref(x)(h1,p1!==1),onHandleSpace:h1=>T(h1,p1!==1),onSetHoverDate:F[3]||(F[3]=h1=>o.unref(H)(h1)),onHandleScroll:h1=>o.unref(g)(h1,p1),onHandleSwipe:h1=>o.unref(y)(h1,p1),onMount:F[4]||(F[4]=h1=>J(o.unref(G0).calendar)),onResetFlow:F[5]||(F[5]=h1=>d1.$emit("reset-flow")),onTooltipOpen:F[6]||(F[6]=h1=>d1.$emit("tooltip-open",h1)),onTooltipClose:F[7]||(F[7]=h1=>d1.$emit("tooltip-close",h1))}),o.createSlots({_:2},[o.renderList(o.unref(S),(h1,l1)=>({name:h1,fn:o.withCtx(f1=>[o.renderSlot(d1.$slots,h1,o.normalizeProps(o.guardReactiveProps({...f1})))])}))]),1040,["mapped-dates","month","year","instance","onSelectDate","onHandleSpace","onHandleScroll","onHandleSwipe"])]),_:3},8,["multi-calendars","collapse"]),d1.enableTimePicker?(o.openBlock(),o.createElementBlock("div",a41,[d1.$slots["time-picker"]?o.renderSlot(d1.$slots,"time-picker",o.normalizeProps(o.mergeProps({key:0},{time:o.unref(f),updateTime:o.unref(w)}))):(o.openBlock(),o.createBlock(yb,o.mergeProps({key:1,ref_key:"timePickerRef",ref:q},d1.$props,{hours:o.unref(f).hours,minutes:o.unref(f).minutes,seconds:o.unref(f).seconds,"internal-model-value":d1.internalModelValue,"disabled-times-config":o.unref(u),"validate-time":o.unref(h),onMount:F[8]||(F[8]=p1=>J(o.unref(G0).timePicker)),"onUpdate:hours":F[9]||(F[9]=p1=>o.unref(w)(p1)),"onUpdate:minutes":F[10]||(F[10]=p1=>o.unref(w)(p1,!1)),"onUpdate:seconds":F[11]||(F[11]=p1=>o.unref(w)(p1,!1,!0)),onResetFlow:F[12]||(F[12]=p1=>d1.$emit("reset-flow")),onOverlayClosed:F[13]||(F[13]=p1=>n1(p1,!1)),onOverlayOpened:F[14]||(F[14]=p1=>n1(p1,!0)),onAmPmChange:F[15]||(F[15]=p1=>d1.$emit("am-pm-change",p1))}),o.createSlots({_:2},[o.renderList(o.unref(U),(p1,z1)=>({name:p1,fn:o.withCtx(h1=>[o.renderSlot(d1.$slots,p1,o.normalizeProps(o.guardReactiveProps(h1)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"]))])):o.createCommentVNode("",!0)],64))}}),n41=(e,t)=>{const a=o.ref(),{defaultedMultiCalendars:r,defaultedConfig:n,defaultedHighlight:c,defaultedRange:i,propDates:s,defaultedFilters:l,defaultedMultiDates:f}=re(e),{modelValue:u,year:d,month:h,calendars:m}=Tn(e,t),{isDisabled:v}=b0(e),{selectYear:p,groupedYears:g,showYearPicker:y,isDisabled:x,toggleYearPicker:C,handleYearSelect:b,handleYear:M}=gb({modelValue:u,multiCalendars:r,highlight:c,calendars:m,propDates:s,month:h,year:d,filters:l,props:e,emit:t}),w=(S,O)=>[S,O].map(U=>P4(U,"MMMM",{locale:e.formatLocale})).join("-"),z=o.computed(()=>S=>u.value?Array.isArray(u.value)?u.value.some(O=>Qh(S,O)):Qh(u.value,S):!1),H=S=>{if(i.value.enabled){if(Array.isArray(u.value)){const O=l2(S,u.value[0])||l2(S,u.value[1]);return O5(u.value,a.value,S)&&!O}return!1}return!1},A=(S,O)=>S.quarter===jh(O)&&S.year===n2(O),V=S=>typeof c.value=="function"?c.value({quarter:jh(S),year:n2(S)}):!!c.value.quarters.find(O=>A(O,S)),k=o.computed(()=>S=>{const O=N2(new Date,{year:d.value(S)});return _11({start:kl(O),end:Rx(O)}).map(U=>{const J=$0(U),Y=Yh(U),G=v(U),B=H(J),T=V(J);return{text:w(J,Y),value:J,active:z.value(J),highlighted:T,disabled:G,isBetween:B}})}),_=S=>{Ul(S,u,f.value.limit),t("auto-apply",!0)},N=S=>{u.value=Wl(u,S,t),R5(u.value,t,e.autoApply,e.modelAuto)},q=S=>{u.value=S,t("auto-apply")};return{defaultedConfig:n,defaultedMultiCalendars:r,groupedYears:g,year:d,isDisabled:x,quarters:k,showYearPicker:y,modelValue:u,setHoverDate:S=>{a.value=S},selectYear:p,selectQuarter:(S,O,U)=>{if(!U)return m.value[O].month=o2(Yh(S)),f.value.enabled?_(S):i.value.enabled?N(S):q(S)},toggleYearPicker:C,handleYearSelect:b,handleYear:M}},c41={class:"dp--quarter-items"},i41=["data-test","disabled","onClick","onMouseover"],s41=o.defineComponent({compatConfig:{MODE:3},__name:"QuarterPicker",props:{...b4},emits:["update:internal-model-value","reset-flow","overlay-closed","auto-apply","range-start","range-end","overlay-toggle","update-month-year"],setup(e,{expose:t,emit:a}){const r=a,n=e,c=o.useSlots(),i=z3(c,"yearMode"),{defaultedMultiCalendars:s,defaultedConfig:l,groupedYears:f,year:u,isDisabled:d,quarters:h,modelValue:m,showYearPicker:v,setHoverDate:p,selectQuarter:g,toggleYearPicker:y,handleYearSelect:x,handleYear:C}=n41(n,r);return t({getSidebarProps:()=>({modelValue:m,year:u,selectQuarter:g,handleYearSelect:x,handleYear:C})}),(b,M)=>(o.openBlock(),o.createBlock(F5,{"multi-calendars":o.unref(s).count,collapse:b.collapse,stretch:""},{default:o.withCtx(({instance:w})=>[o.createElementVNode("div",{class:"dp-quarter-picker-wrap",style:o.normalizeStyle({minHeight:`${o.unref(l).modeHeight}px`})},[b.$slots["top-extra"]?o.renderSlot(b.$slots,"top-extra",{key:0,value:b.internalModelValue}):o.createCommentVNode("",!0),o.createElementVNode("div",null,[o.createVNode(mb,o.mergeProps(b.$props,{items:o.unref(f)(w),instance:w,"show-year-picker":o.unref(v)[w],year:o.unref(u)(w),"is-disabled":z=>o.unref(d)(w,z),onHandleYear:z=>o.unref(C)(w,z),onYearSelect:z=>o.unref(x)(z,w),onToggleYearPicker:z=>o.unref(y)(w,z==null?void 0:z.flow,z==null?void 0:z.show)}),o.createSlots({_:2},[o.renderList(o.unref(i),(z,H)=>({name:z,fn:o.withCtx(A=>[o.renderSlot(b.$slots,z,o.normalizeProps(o.guardReactiveProps(A)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),o.createElementVNode("div",c41,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(h)(w),(z,H)=>(o.openBlock(),o.createElementBlock("div",{key:H},[o.createElementVNode("button",{type:"button",class:o.normalizeClass(["dp--qr-btn",{"dp--qr-btn-active":z.active,"dp--qr-btn-between":z.isBetween,"dp--qr-btn-disabled":z.disabled,"dp--highlighted":z.highlighted}]),"data-test":z.value,disabled:z.disabled,onClick:A=>o.unref(g)(z.value,w,z.disabled),onMouseover:A=>o.unref(p)(z.value)},[b.$slots.quarter?o.renderSlot(b.$slots,"quarter",{key:0,value:z.value,text:z.text}):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode(o.toDisplayString(z.text),1)],64))],42,i41)]))),128))])],4)]),_:3},8,["multi-calendars","collapse"]))}}),o41=["id","aria-label"],l41={key:0,class:"dp--menu-load-container"},f41=o.createElementVNode("span",{class:"dp--menu-loader"},null,-1),u41=[f41],d41={key:0,class:"dp__sidebar_left"},h41=["data-test","onClick","onKeydown"],m41={key:2,class:"dp__sidebar_right"},p41={key:3,class:"dp__action_extra"},sm=o.defineComponent({compatConfig:{MODE:3},__name:"DatepickerMenu",props:{...B5,shadow:{type:Boolean,default:!1},openOnTop:{type:Boolean,default:!1},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},getInputRect:{type:Function,default:()=>({})}},emits:["close-picker","select-date","auto-apply","time-update","flow-step","update-month-year","invalid-select","update:internal-model-value","recalculate-position","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","auto-apply-invalid","date-update","invalid-date","overlay-toggle"],setup(e,{expose:t,emit:a}){const r=a,n=e,c=o.ref(null),i=o.computed(()=>{const{openOnTop:l1,...f1}=n;return{...f1,flowStep:H.value,collapse:n.collapse,noOverlayFocus:n.noOverlayFocus,menuWrapRef:c.value}}),{setMenuFocused:s,setShiftKey:l,control:f}=hb(),u=o.useSlots(),{defaultedTextInput:d,defaultedInline:h,defaultedConfig:m}=re(n),v=o.ref(null),p=o.ref(0),g=o.ref(null),y=o.ref(!1),x=o.ref(null);o.onMounted(()=>{if(!n.shadow){y.value=!0,C(),window.addEventListener("resize",C);const l1=ke(c);if(l1&&!d.value.enabled&&!h.value.enabled&&(s(!0),q()),l1){const f1=u1=>{m.value.allowPreventDefault&&u1.preventDefault(),r0(u1,m.value,!0)};l1.addEventListener("pointerdown",f1),l1.addEventListener("mousedown",f1)}}}),o.onUnmounted(()=>{window.removeEventListener("resize",C)});const C=()=>{const l1=ke(g);l1&&(p.value=l1.getBoundingClientRect().width)},{arrowRight:b,arrowLeft:M,arrowDown:w,arrowUp:z}=x0(),{flowStep:H,updateFlowStep:A,childMount:V,resetFlow:k}=n31(n,r,x),_=o.computed(()=>n.monthPicker?x31:n.yearPicker?C31:n.timePicker?B31:n.quarterPicker?s41:r41),N=o.computed(()=>{var l1;if(m.value.arrowLeft)return m.value.arrowLeft;const f1=(l1=c.value)==null?void 0:l1.getBoundingClientRect(),u1=n.getInputRect();return u1.width<p.value&&u1.left<=((f1==null?void 0:f1.left)??0)?`${u1.width/2}px`:"50%"}),q=()=>{const l1=ke(c);l1&&l1.focus({preventScroll:!0})},S=o.computed(()=>{var l1;return((l1=x.value)==null?void 0:l1.getSidebarProps())||{}}),O=()=>{n.openOnTop&&r("recalculate-position")},U=z3(u,"action"),J=o.computed(()=>n.monthPicker||n.yearPicker?z3(u,"monthYear"):n.timePicker?z3(u,"timePicker"):z3(u,"shared")),Y=o.computed(()=>n.openOnTop?"dp__arrow_bottom":"dp__arrow_top"),G=o.computed(()=>({dp__menu_disabled:n.disabled,dp__menu_readonly:n.readonly,"dp-menu-loading":n.loading})),B=o.computed(()=>({dp__menu:!0,dp__menu_index:!h.value.enabled,dp__relative:h.value.enabled,[n.menuClassName]:!!n.menuClassName})),T=l1=>{r0(l1,m.value,!0)},L=()=>{n.escClose&&r("close-picker")},W=l1=>{if(n.arrowNavigation){if(l1===c3.up)return z();if(l1===c3.down)return w();if(l1===c3.left)return M();if(l1===c3.right)return b()}else l1===c3.right||l1===c3.up?n1("handleArrow",c3.left,0,l1===c3.up):n1("handleArrow",c3.right,0,l1===c3.down)},j=l1=>{l(l1.shiftKey),!n.disableMonthYearSelect&&l1.code===te.tab&&l1.target.classList.contains("dp__menu")&&f.value.shiftKeyInMenu&&(l1.preventDefault(),r0(l1,m.value,!0),r("close-picker"))},E=()=>{q(),r("time-picker-close")},R=l1=>{var f1,u1,v1;(f1=x.value)==null||f1.toggleTimePicker(!1,!1),(u1=x.value)==null||u1.toggleMonthPicker(!1,!1,l1),(v1=x.value)==null||v1.toggleYearPicker(!1,!1,l1)},a1=(l1,f1=0)=>{var u1,v1,k1;return l1==="month"?(u1=x.value)==null?void 0:u1.toggleMonthPicker(!1,!0,f1):l1==="year"?(v1=x.value)==null?void 0:v1.toggleYearPicker(!1,!0,f1):l1==="time"?(k1=x.value)==null?void 0:k1.toggleTimePicker(!0,!1):R(f1)},n1=(l1,...f1)=>{var u1,v1;(u1=x.value)!=null&&u1[l1]&&((v1=x.value)==null||v1[l1](...f1))},t1=()=>{n1("selectCurrentDate")},d1=(l1,f1)=>{n1("presetDate",l1,f1)},F=()=>{n1("clearHoverDate")},p1=(l1,f1)=>{n1("updateMonthYear",l1,f1)},z1=(l1,f1)=>{l1.preventDefault(),W(f1)},h1=l1=>{if(j(l1),l1.key===te.home||l1.key===te.end)return n1("selectWeekDate",l1.key===te.home);if(l1.key===te.pageUp||l1.key===te.pageDown)return l1.shiftKey?n1("changeYear",l1.key===te.pageUp):n1("changeMonth",l1.key===te.pageUp);switch(l1.key){case te.esc:return L();case te.arrowLeft:return z1(l1,c3.left);case te.arrowRight:return z1(l1,c3.right);case te.arrowUp:return z1(l1,c3.up);case te.arrowDown:return z1(l1,c3.down);default:return}};return t({updateMonthYear:p1,switchView:a1}),(l1,f1)=>{var u1,v1,k1;return o.openBlock(),o.createElementBlock("div",{id:l1.uid?`dp-menu-${l1.uid}`:void 0,ref_key:"dpMenuRef",ref:c,tabindex:"0",role:"dialog","aria-label":(u1=l1.ariaLabels)==null?void 0:u1.menu,class:o.normalizeClass(B.value),style:o.normalizeStyle({"--dp-arrow-left":N.value}),onMouseleave:F,onClick:T,onKeydown:h1},[(l1.disabled||l1.readonly)&&o.unref(h).enabled||l1.loading?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(G.value)},[l1.loading?(o.openBlock(),o.createElementBlock("div",l41,u41)):o.createCommentVNode("",!0)],2)):o.createCommentVNode("",!0),!o.unref(h).enabled&&!l1.teleportCenter?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(Y.value)},null,2)):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"innerMenuRef",ref:g,class:o.normalizeClass({dp__menu_content_wrapper:((v1=l1.presetDates)==null?void 0:v1.length)||!!l1.$slots["left-sidebar"]||!!l1.$slots["right-sidebar"],"dp--menu-content-wrapper-collapsed":e.collapse&&(((k1=l1.presetDates)==null?void 0:k1.length)||!!l1.$slots["left-sidebar"]||!!l1.$slots["right-sidebar"])}),style:o.normalizeStyle({"--dp-menu-width":`${p.value}px`})},[l1.$slots["left-sidebar"]?(o.openBlock(),o.createElementBlock("div",d41,[o.renderSlot(l1.$slots,"left-sidebar",o.normalizeProps(o.guardReactiveProps(S.value)))])):o.createCommentVNode("",!0),l1.presetDates.length?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass({"dp--preset-dates-collapsed":e.collapse,"dp--preset-dates":!0})},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l1.presetDates,(b1,H1)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:H1},[b1.slot?o.renderSlot(l1.$slots,b1.slot,{key:0,presetDate:d1,label:b1.label,value:b1.value}):(o.openBlock(),o.createElementBlock("button",{key:1,type:"button",style:o.normalizeStyle(b1.style||{}),class:o.normalizeClass(["dp__btn dp--preset-range",{"dp--preset-range-collapsed":e.collapse}]),"data-test":b1.testId??void 0,onClick:o.withModifiers(F1=>d1(b1.value,b1.noTz),["prevent"]),onKeydown:F1=>o.unref(y3)(F1,()=>d1(b1.value,b1.noTz),!0)},o.toDisplayString(b1.label),47,h41))],64))),128))],2)):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"calendarWrapperRef",ref:v,class:"dp__instance_calendar",role:"document"},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(_.value),o.mergeProps({ref_key:"dynCmpRef",ref:x},i.value,{"flow-step":o.unref(H),onMount:o.unref(V),onUpdateFlowStep:o.unref(A),onResetFlow:o.unref(k),onFocusMenu:q,onSelectDate:f1[0]||(f1[0]=b1=>l1.$emit("select-date")),onDateUpdate:f1[1]||(f1[1]=b1=>l1.$emit("date-update",b1)),onTooltipOpen:f1[2]||(f1[2]=b1=>l1.$emit("tooltip-open",b1)),onTooltipClose:f1[3]||(f1[3]=b1=>l1.$emit("tooltip-close",b1)),onAutoApply:f1[4]||(f1[4]=b1=>l1.$emit("auto-apply",b1)),onRangeStart:f1[5]||(f1[5]=b1=>l1.$emit("range-start",b1)),onRangeEnd:f1[6]||(f1[6]=b1=>l1.$emit("range-end",b1)),onInvalidFixedRange:f1[7]||(f1[7]=b1=>l1.$emit("invalid-fixed-range",b1)),onTimeUpdate:f1[8]||(f1[8]=b1=>l1.$emit("time-update")),onAmPmChange:f1[9]||(f1[9]=b1=>l1.$emit("am-pm-change",b1)),onTimePickerOpen:f1[10]||(f1[10]=b1=>l1.$emit("time-picker-open",b1)),onTimePickerClose:E,onRecalculatePosition:O,onUpdateMonthYear:f1[11]||(f1[11]=b1=>l1.$emit("update-month-year",b1)),onAutoApplyInvalid:f1[12]||(f1[12]=b1=>l1.$emit("auto-apply-invalid",b1)),onInvalidDate:f1[13]||(f1[13]=b1=>l1.$emit("invalid-date",b1)),onOverlayToggle:f1[14]||(f1[14]=b1=>l1.$emit("overlay-toggle",b1)),"onUpdate:internalModelValue":f1[15]||(f1[15]=b1=>l1.$emit("update:internal-model-value",b1))}),o.createSlots({_:2},[o.renderList(J.value,(b1,H1)=>({name:b1,fn:o.withCtx(F1=>[o.renderSlot(l1.$slots,b1,o.normalizeProps(o.guardReactiveProps({...F1})))])}))]),1040,["flow-step","onMount","onUpdateFlowStep","onResetFlow"]))],512),l1.$slots["right-sidebar"]?(o.openBlock(),o.createElementBlock("div",m41,[o.renderSlot(l1.$slots,"right-sidebar",o.normalizeProps(o.guardReactiveProps(S.value)))])):o.createCommentVNode("",!0),l1.$slots["action-extra"]?(o.openBlock(),o.createElementBlock("div",p41,[l1.$slots["action-extra"]?o.renderSlot(l1.$slots,"action-extra",{key:0,selectCurrentDate:t1}):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)],6),!l1.autoApply||o.unref(m).keepActionRow?(o.openBlock(),o.createBlock(u31,o.mergeProps({key:2,"menu-mount":y.value},i.value,{"calendar-width":p.value,onClosePicker:f1[16]||(f1[16]=b1=>l1.$emit("close-picker")),onSelectDate:f1[17]||(f1[17]=b1=>l1.$emit("select-date")),onInvalidSelect:f1[18]||(f1[18]=b1=>l1.$emit("invalid-select")),onSelectNow:t1}),o.createSlots({_:2},[o.renderList(o.unref(U),(b1,H1)=>({name:b1,fn:o.withCtx(F1=>[o.renderSlot(l1.$slots,b1,o.normalizeProps(o.guardReactiveProps({...F1})))])}))]),1040,["menu-mount","calendar-width"])):o.createCommentVNode("",!0)],46,o41)}}}),v41=typeof window<"u"?window:void 0,us=()=>{},g41=e=>o.getCurrentScope()?(o.onScopeDispose(e),!0):!1,y41=(e,t,a,r)=>{if(!e)return us;let n=us;const c=o.watch(()=>o.unref(e),s=>{n(),s&&(s.addEventListener(t,a,r),n=()=>{s.removeEventListener(t,a,r),n=us})},{immediate:!0,flush:"post"}),i=()=>{c(),n()};return g41(i),i},x41=(e,t,a,r={})=>{const{window:n=v41,event:c="pointerdown"}=r;return n?y41(n,c,i=>{const s=ke(e),l=ke(t);!s||!l||s===i.target||i.composedPath().includes(s)||i.composedPath().includes(l)||a(i)},{passive:!0}):void 0},b41=o.defineComponent({compatConfig:{MODE:3},__name:"VueDatePicker",props:{...B5},emits:["update:model-value","update:model-timezone-value","text-submit","closed","cleared","open","focus","blur","internal-model-change","recalculate-position","flow-step","update-month-year","invalid-select","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","date-update","invalid-date","overlay-toggle"],setup(e,{expose:t,emit:a}){const r=a,n=e,c=o.useSlots(),i=o.ref(!1),s=o.toRef(n,"modelValue"),l=o.toRef(n,"timezone"),f=o.ref(null),u=o.ref(null),d=o.ref(null),h=o.ref(!1),m=o.ref(null),v=o.ref(!1),p=o.ref(!1),g=o.ref(!1),{setMenuFocused:y,setShiftKey:x}=hb(),{clearArrowNav:C}=x0(),{validateDate:b,isValidTime:M}=b0(n),{defaultedTransitions:w,defaultedTextInput:z,defaultedInline:H,defaultedConfig:A,defaultedRange:V,defaultedMultiDates:k}=re(n),{menuTransition:_,showTransition:N}=An(w);o.onMounted(()=>{W(n.modelValue),o.nextTick().then(()=>{if(!H.value.enabled){const m1=G(m.value);m1==null||m1.addEventListener("scroll",z1),window==null||window.addEventListener("resize",h1)}}),H.value.enabled&&(i.value=!0),window==null||window.addEventListener("keyup",l1),window==null||window.addEventListener("keydown",f1)}),o.onUnmounted(()=>{if(!H.value.enabled){const m1=G(m.value);m1==null||m1.removeEventListener("scroll",z1),window==null||window.removeEventListener("resize",h1)}window==null||window.removeEventListener("keyup",l1),window==null||window.removeEventListener("keydown",f1)});const q=z3(c,"all",n.presetDates),S=z3(c,"input");o.watch([s,l],()=>{W(s.value)},{deep:!0});const{openOnTop:O,menuStyle:U,xCorrect:J,setMenuPosition:Y,getScrollableParent:G,shadowRender:B}=e31({menuRef:f,menuRefInner:u,inputRef:d,pickerWrapperRef:m,inline:H,emit:r,props:n,slots:c}),{inputValue:T,internalModelValue:L,parseExternalModelValue:W,emitModelValue:j,formatInputValue:E,checkBeforeEmit:R}=Qe1(r,n,h),a1=o.computed(()=>({dp__main:!0,dp__theme_dark:n.dark,dp__theme_light:!n.dark,dp__flex_display:H.value.enabled,"dp--flex-display-collapsed":g.value,dp__flex_display_with_input:H.value.input})),n1=o.computed(()=>n.dark?"dp__theme_dark":"dp__theme_light"),t1=o.computed(()=>n.teleport?{to:typeof n.teleport=="boolean"?"body":n.teleport,disabled:!n.teleport||H.value.enabled}:{}),d1=o.computed(()=>({class:"dp__outer_menu_wrap"})),F=o.computed(()=>H.value.enabled&&(n.timePicker||n.monthPicker||n.yearPicker||n.quarterPicker)),p1=()=>{var m1,S1;return(S1=(m1=d.value)==null?void 0:m1.$el)==null?void 0:S1.getBoundingClientRect()},z1=()=>{i.value&&(A.value.closeOnScroll?K1():Y())},h1=()=>{var m1;i.value&&Y();const S1=(m1=u.value)==null?void 0:m1.$el.getBoundingClientRect().width;g.value=document.body.offsetWidth<=S1},l1=m1=>{m1.key==="Tab"&&!H.value.enabled&&!n.teleport&&A.value.tabOutClosesMenu&&(m.value.contains(document.activeElement)||K1()),p.value=m1.shiftKey},f1=m1=>{p.value=m1.shiftKey},u1=()=>{!n.disabled&&!n.readonly&&(B(sm,n),Y(!1),i.value=!0,i.value&&r("open"),i.value||W1(),W(n.modelValue))},v1=()=>{var m1;T.value="",W1(),(m1=d.value)==null||m1.setParsedDate(null),r("update:model-value",null),r("update:model-timezone-value",null),r("cleared"),A.value.closeOnClearValue&&K1()},k1=()=>{const m1=L.value;return!m1||!Array.isArray(m1)&&b(m1)?!0:Array.isArray(m1)?k.value.enabled||m1.length===2&&b(m1[0])&&b(m1[1])?!0:V.value.partialRange&&!n.timePicker?b(m1[0]):!1:!1},b1=()=>{R()&&k1()?(j(),K1()):r("invalid-select",L.value)},H1=m1=>{F1(),j(),A.value.closeOnAutoApply&&!m1&&K1()},F1=()=>{d.value&&z.value.enabled&&d.value.setParsedDate(L.value)},$1=(m1=!1)=>{n.autoApply&&M(L.value)&&k1()&&(V.value.enabled&&Array.isArray(L.value)?(V.value.partialRange||L.value.length===2)&&H1(m1):H1(m1))},W1=()=>{z.value.enabled||(L.value=null)},K1=()=>{H.value.enabled||(i.value&&(i.value=!1,J.value=!1,y(!1),x(!1),C(),r("closed"),T.value&&W(s.value)),W1(),r("blur"))},d2=(m1,S1,T1=!1)=>{if(!m1){L.value=null;return}const Q1=Array.isArray(m1)?!m1.some(we=>!b(we)):b(m1),Q2=M(m1);Q1&&Q2&&(L.value=m1,S1&&(v.value=T1,b1(),r("text-submit")))},G1=()=>{n.autoApply&&M(L.value)&&j(),F1()},j2=()=>i.value?K1():u1(),O1=m1=>{L.value=m1},c2=()=>{z.value.enabled&&(h.value=!0,E()),r("focus")},Y2=()=>{if(z.value.enabled&&(h.value=!1,W(n.modelValue),v.value)){const m1=ke1(m.value,p.value);m1==null||m1.focus()}r("blur")},m2=m1=>{u.value&&u.value.updateMonthYear(0,{month:em(m1.month),year:em(m1.year)})},A2=m1=>{W(m1??n.modelValue)},Pe=(m1,S1)=>{var T1;(T1=u.value)==null||T1.switchView(m1,S1)},y1=m1=>A.value.onClickOutside?A.value.onClickOutside(m1):K1();return x41(f,d,()=>y1(k1)),t({closeMenu:K1,selectDate:b1,clearValue:v1,openMenu:u1,onScroll:z1,formatInputValue:E,updateInternalModelValue:O1,setMonthYear:m2,parseModel:A2,switchView:Pe,toggleMenu:j2}),(m1,S1)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"pickerWrapperRef",ref:m,class:o.normalizeClass(a1.value),"data-datepicker-instance":""},[o.createVNode(o31,o.mergeProps({ref_key:"inputRef",ref:d,"input-value":o.unref(T),"onUpdate:inputValue":S1[0]||(S1[0]=T1=>o.isRef(T)?T.value=T1:null),"is-menu-open":i.value},m1.$props,{onClear:v1,onOpen:u1,onSetInputDate:d2,onSetEmptyDate:o.unref(j),onSelectDate:b1,onToggle:j2,onClose:K1,onFocus:c2,onBlur:Y2,onRealBlur:S1[1]||(S1[1]=T1=>h.value=!1)}),o.createSlots({_:2},[o.renderList(o.unref(S),(T1,Q1)=>({name:T1,fn:o.withCtx(Q2=>[o.renderSlot(m1.$slots,T1,o.normalizeProps(o.guardReactiveProps(Q2)))])}))]),1040,["input-value","is-menu-open","onSetEmptyDate"]),(o.openBlock(),o.createBlock(o.resolveDynamicComponent(m1.teleport?o.Teleport:"div"),o.normalizeProps(o.guardReactiveProps(t1.value)),{default:o.withCtx(()=>[o.createVNode(o.Transition,{name:o.unref(_)(o.unref(O)),css:o.unref(N)&&!o.unref(H).enabled},{default:o.withCtx(()=>[i.value?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0,ref_key:"dpWrapMenuRef",ref:f},d1.value,{class:{"dp--menu-wrapper":!o.unref(H).enabled},style:o.unref(H).enabled?void 0:o.unref(U)}),[o.createVNode(sm,o.mergeProps({ref_key:"dpMenuRef",ref:u},m1.$props,{"internal-model-value":o.unref(L),"onUpdate:internalModelValue":S1[2]||(S1[2]=T1=>o.isRef(L)?L.value=T1:null),class:{[n1.value]:!0,"dp--menu-wrapper":m1.teleport},"open-on-top":o.unref(O),"no-overlay-focus":F.value,collapse:g.value,"get-input-rect":p1,onClosePicker:K1,onSelectDate:b1,onAutoApply:$1,onTimeUpdate:G1,onFlowStep:S1[3]||(S1[3]=T1=>m1.$emit("flow-step",T1)),onUpdateMonthYear:S1[4]||(S1[4]=T1=>m1.$emit("update-month-year",T1)),onInvalidSelect:S1[5]||(S1[5]=T1=>m1.$emit("invalid-select",o.unref(L))),onAutoApplyInvalid:S1[6]||(S1[6]=T1=>m1.$emit("invalid-select",T1)),onInvalidFixedRange:S1[7]||(S1[7]=T1=>m1.$emit("invalid-fixed-range",T1)),onRecalculatePosition:o.unref(Y),onTooltipOpen:S1[8]||(S1[8]=T1=>m1.$emit("tooltip-open",T1)),onTooltipClose:S1[9]||(S1[9]=T1=>m1.$emit("tooltip-close",T1)),onTimePickerOpen:S1[10]||(S1[10]=T1=>m1.$emit("time-picker-open",T1)),onTimePickerClose:S1[11]||(S1[11]=T1=>m1.$emit("time-picker-close",T1)),onAmPmChange:S1[12]||(S1[12]=T1=>m1.$emit("am-pm-change",T1)),onRangeStart:S1[13]||(S1[13]=T1=>m1.$emit("range-start",T1)),onRangeEnd:S1[14]||(S1[14]=T1=>m1.$emit("range-end",T1)),onDateUpdate:S1[15]||(S1[15]=T1=>m1.$emit("date-update",T1)),onInvalidDate:S1[16]||(S1[16]=T1=>m1.$emit("invalid-date",T1)),onOverlayToggle:S1[17]||(S1[17]=T1=>m1.$emit("overlay-toggle",T1))}),o.createSlots({_:2},[o.renderList(o.unref(q),(T1,Q1)=>({name:T1,fn:o.withCtx(Q2=>[o.renderSlot(m1.$slots,T1,o.normalizeProps(o.guardReactiveProps({...Q2})))])}))]),1040,["internal-model-value","class","open-on-top","no-overlay-focus","collapse","onRecalculatePosition"])],16)):o.createCommentVNode("",!0)]),_:3},8,["name","css"])]),_:3},16))],2))}}),ql=(()=>{const e=b41;return e.install=t=>{t.component("Vue3DatePicker",e)},e})(),C41=Object.freeze(Object.defineProperty({__proto__:null,default:ql},Symbol.toStringTag,{value:"Module"}));Object.entries(C41).forEach(([e,t])=>{e!=="default"&&(ql[e]=t)});const M41=o.defineComponent({__name:"PgaVueDatePicker",props:o.mergeModels({yearPicker:{type:Boolean},monthPicker:{type:Boolean},range:{type:Boolean},enableTimePicker:{type:Boolean},notClearable:{type:Boolean},disabled:{type:Boolean},format:{type:Function}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){o.useCssVars(c=>({cc305282:o.unref(r).input.borderColor,"883a9e94":o.unref(r).input.borderRadius,"6c15f2fd":o.unref(r).input.backgroundColor,"58b376ce":o.unref(r).input.backgroundColorDisabled,"3e8b660d":o.unref(r).input.colorFocus}));const t=o.useModel(e,"modelValue"),a=_2("pgaForm"),{form:r}=$e(),n=o.ref(!1);return(c,i)=>(o.openBlock(),o.createBlock(o.unref(ql),{class:o.normalizeClass(["date-picker",{"date-picker__disabled":c.disabled,"date-picker__open":n.value}]),modelValue:t.value,"onUpdate:modelValue":i[0]||(i[0]=s=>t.value=s),disabled:c.disabled,clearable:!c.notClearable,yearPicker:c.yearPicker,monthPicker:c.monthPicker,range:c.range,enableTimePicker:c.enableTimePicker,timePickerInline:"",is24:"",teleport:!0,locale:o.unref(h4)().language,format:c.format,previewFormat:c.format,cancelText:o.unref(a)("cancelBtn"),selectText:o.unref(a)("selectBtn"),onOpen:i[1]||(i[1]=s=>n.value=!0),onBlur:i[2]||(i[2]=s=>n.value=!1)},null,8,["class","modelValue","disabled","clearable","yearPicker","monthPicker","range","enableTimePicker","locale","format","previewFormat","cancelText","selectText"]))}});const Nn=I1(M41,[["__scopeId","data-v-94c456f9"]]),z41=o.defineComponent({__name:"PgaDatePicker",props:o.mergeModels({label:{},withRequiredLabel:{type:Boolean},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},description:{},errors:{},disabled:{type:Boolean},grow:{},notClearable:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=o.useModel(e,"modelValue"),a=o.computed({get(){if(!t.value)return null;const[n,c,i]=t.value.split("-").map(Number);return new Date(n,c-1,i)},set(n){if(!n){t.value=null;return}t.value=n.toISOString().split("T")[0]}});function r(n){return m4(n,{format:"numeric",withTime:!1})}return(n,c)=>(o.openBlock(),o.createBlock(A3,{label:n.label,withRequiredLabel:n.withRequiredLabel,withOptionalLabel:n.withOptionalLabel,withLabelSpace:n.withLabelSpace,description:n.description,errors:n.errors,grow:n.grow},{default:o.withCtx(()=>[o.createVNode(Nn,{modelValue:a.value,"onUpdate:modelValue":c[0]||(c[0]=i=>a.value=i),disabled:n.disabled,notClearable:n.notClearable,format:r},null,8,["modelValue","disabled","notClearable"])]),_:1},8,["label","withRequiredLabel","withOptionalLabel","withLabelSpace","description","errors","grow"]))}}),w41=o.defineComponent({__name:"PgaDatetimePicker",props:o.mergeModels({label:{},withRequiredLabel:{type:Boolean},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},description:{},errors:{},disabled:{type:Boolean},grow:{},notClearable:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=o.useModel(e,"modelValue");function a(r){return m4(r,{format:"short",withTime:!0})}return(r,n)=>(o.openBlock(),o.createBlock(A3,{label:r.label,withRequiredLabel:r.withRequiredLabel,withOptionalLabel:r.withOptionalLabel,withLabelSpace:r.withLabelSpace,description:r.description,errors:r.errors,grow:r.grow},{default:o.withCtx(()=>[o.createVNode(Nn,{modelValue:t.value,"onUpdate:modelValue":n[0]||(n[0]=c=>t.value=c),enableTimePicker:"",disabled:r.disabled,notClearable:r.notClearable,format:a},null,8,["modelValue","disabled","notClearable"])]),_:1},8,["label","withRequiredLabel","withOptionalLabel","withLabelSpace","description","errors","grow"]))}}),_41={class:"icons-container"},k41=o.defineComponent({__name:"PgaIconSelector",props:o.mergeModels({label:{},withRequiredLabel:{type:Boolean},withOptionalLabel:{type:Boolean},withLabelSpace:{type:Boolean},description:{},errors:{},disabled:{type:Boolean},grow:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){o.useCssVars(n=>({"1d063eb6":o.unref(a).input.padding,"226faebc":o.unref(a).input.borderColor,"4455d859":o.unref(a).input.borderRadius}));const t=o.useModel(e,"modelValue"),{form:a}=$e(),r=["star","heart","envelope","plus","minus","pen","edit","check","trash","file","clipboard","bell","calendar","clock","money-check-dollar","gift","percent","magnifying-glass-dollar","house","car","store","gamepad","mobile","school","shirt","user-doctor","face-smile","face-frown-open","cog","lock","bug","camera","code","headphones","wifi","user","search","home","arrow-right-arrow-left","circle"];return(n,c)=>(o.openBlock(),o.createBlock(A3,{label:n.label,withRequiredLabel:n.withRequiredLabel,withOptionalLabel:n.withOptionalLabel,withLabelSpace:n.withLabelSpace,description:n.description,errors:n.errors,grow:n.grow},{default:o.withCtx(()=>[o.createElementVNode("div",_41,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(r,i=>o.createVNode(L2,{key:i,icon:i,variant:t.value===i?"outlined":"flat",color:t.value===i?"primary":"first",width:"2.5rem",disabled:n.disabled,onClick:s=>t.value=i},null,8,["icon","variant","color","disabled","onClick"])),64))])]),_:1},8,["label","withRequiredLabel","withOptionalLabel","withLabelSpace","description","errors","grow"]))}});const H41=I1(k41,[["__scopeId","data-v-b927e62b"]]),V41=["accept","multiple","disabled"],L41={class:"input-file--label-container"},S41=o.defineComponent({__name:"PgaInputFile",props:{formats:{},multiple:{type:Boolean},disabled:{type:Boolean},selectFileLabel:{type:[String,Number,Function]},isLoading:{type:Boolean}},emits:["newFile","newFiles"],setup(e,{expose:t,emit:a}){o.useCssVars(b=>({"6e9c5da8":o.unref(c).input.borderColor,"7dbf06ed":o.unref(c).input.borderRadius,"33eadd66":o.unref(c).input.backgroundColor,"7f906b76":o.unref(c).input.backgroundColorHover,"35fa93fc":o.unref(c).input.backgroundColorDisabled}));const r=e,n=a;t({click:y,resetInput:x});const{form:c}=$e(),i=_2("pgaForm"),s=o.ref(),l=o.ref([]),f=o.ref(!1),u=o.ref(!1),d=o.computed(()=>r.disabled||r.isLoading),h=o.computed(()=>!!l.value.length),m=o.computed(()=>{if(!r.formats)return!0;for(const b of l.value){const M=b.name.split(".").pop();if(!r.formats.includes(M))return!1}return!0}),v=o.computed(()=>r.formats?r.formats.map(b=>`.${b}`).join(","):"*"),p=o.computed(()=>{const b={icon:"upload"};return!h.value||f.value&&!u.value&&!d.value?b:m.value?{icon:"circle-check",color:"success"}:{icon:"circle-xmark",color:"danger"}}),g=o.computed(()=>h.value?l.value.map(b=>b.name).join(", "):r.selectFileLabel?r.selectFileLabel:r.multiple?i("selectFilesLabel"):i("selectFileLabel"));function y(){var b;(b=s.value)==null||b.click()}function x(){l.value=[],s.value&&(s.value.value="")}function C(b){f.value=!1;const w=b.target.files;if(w.length){if(l.value=[...w],!m.value){vt("danger",()=>i("newFileError"));return}n("newFile",w[0]),n("newFiles",[...w])}}return(b,M)=>(o.openBlock(),o.createElementBlock("label",{class:o.normalizeClass(["pga-input-file",{"pga-input-file__disabled":d.value}]),onMouseenter:M[4]||(M[4]=w=>f.value=!0),onMouseleave:M[5]||(M[5]=w=>f.value=!1)},[b.isLoading?(o.openBlock(),o.createBlock(Lt,{key:0})):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createElementVNode("input",{ref_key:"inputRef",ref:s,class:"input-file--input",type:"file",accept:v.value,multiple:b.multiple,disabled:d.value,onChange:M[0]||(M[0]=w=>C(w))},null,40,V41),o.createVNode(Oe,{class:"input-file--icon",icon:p.value.icon,color:p.value.color},null,8,["icon","color"]),o.createElementVNode("div",L41,[o.createVNode(ye,{text:g.value},null,8,["text"])]),h.value?(o.openBlock(),o.createBlock(L2,{key:0,text:o.unref(i)("removeBtn"),variant:"flat",color:"danger",size:"s",disabled:d.value,onMouseenter:M[1]||(M[1]=w=>u.value=!0),onMouseleave:M[2]||(M[2]=w=>u.value=!1),onClick:M[3]||(M[3]=o.withModifiers(w=>x(),["prevent"]))},null,8,["text","disabled"])):o.createCommentVNode("",!0)],64))],34))}});const I5=I1(S41,[["__scopeId","data-v-3b0655c7"]]);/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */var bb=1252,A41=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],jl={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},Yl=function(e){A41.indexOf(e)!=-1&&(bb=jl[0]=e)};function T41(){Yl(1252)}var c4=function(e){Yl(e)};function Cb(){c4(1200),T41()}function om(e){for(var t=[],a=0,r=e.length;a<r;++a)t[a]=e.charCodeAt(a);return t}function E41(e){for(var t=[],a=0;a<e.length>>1;++a)t[a]=String.fromCharCode(e.charCodeAt(2*a)+(e.charCodeAt(2*a+1)<<8));return t.join("")}function Mb(e){for(var t=[],a=0;a<e.length>>1;++a)t[a]=String.fromCharCode(e.charCodeAt(2*a+1)+(e.charCodeAt(2*a)<<8));return t.join("")}var Za=function(e){var t=e.charCodeAt(0),a=e.charCodeAt(1);return t==255&&a==254?E41(e.slice(2)):t==254&&a==255?Mb(e.slice(2)):t==65279?e.slice(1):e},_8=function(t){return String.fromCharCode(t)},lm=function(t){return String.fromCharCode(t)},It,Kt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function fm(e){for(var t="",a=0,r=0,n=0,c=0,i=0,s=0,l=0,f=0;f<e.length;)a=e.charCodeAt(f++),c=a>>2,r=e.charCodeAt(f++),i=(a&3)<<4|r>>4,n=e.charCodeAt(f++),s=(r&15)<<2|n>>6,l=n&63,isNaN(r)?s=l=64:isNaN(n)&&(l=64),t+=Kt.charAt(c)+Kt.charAt(i)+Kt.charAt(s)+Kt.charAt(l);return t}function H3(e){var t="",a=0,r=0,n=0,c=0,i=0,s=0,l=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var f=0;f<e.length;)c=Kt.indexOf(e.charAt(f++)),i=Kt.indexOf(e.charAt(f++)),a=c<<2|i>>4,t+=String.fromCharCode(a),s=Kt.indexOf(e.charAt(f++)),r=(i&15)<<4|s>>2,s!==64&&(t+=String.fromCharCode(r)),l=Kt.indexOf(e.charAt(f++)),n=(s&3)<<6|l,l!==64&&(t+=String.fromCharCode(n));return t}var h2=function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node}(),g6=function(){if(typeof Buffer<"u"){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch{e=!0}return e?function(t,a){return a?new Buffer(t,a):new Buffer(t)}:Buffer.from.bind(Buffer)}return function(){}}();function m0(e){return h2?Buffer.alloc?Buffer.alloc(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}function um(e){return h2?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}var t4=function(t){return h2?g6(t,"binary"):t.split("").map(function(a){return a.charCodeAt(0)&255})};function y6(e){if(Array.isArray(e))return e.map(function(r){return String.fromCharCode(r)}).join("");for(var t=[],a=0;a<e.length;++a)t[a]=String.fromCharCode(e[a]);return t.join("")}function Gl(e){if(typeof ArrayBuffer>"u")throw new Error("Unsupported");if(e instanceof ArrayBuffer)return Gl(new Uint8Array(e));for(var t=new Array(e.length),a=0;a<e.length;++a)t[a]=e[a];return t}var $t=h2?function(e){return Buffer.concat(e.map(function(t){return Buffer.isBuffer(t)?t:g6(t)}))}:function(e){if(typeof Uint8Array<"u"){var t=0,a=0;for(t=0;t<e.length;++t)a+=e[t].length;var r=new Uint8Array(a),n=0;for(t=0,a=0;t<e.length;a+=n,++t)if(n=e[t].length,e[t]instanceof Uint8Array)r.set(e[t],a);else{if(typeof e[t]=="string")throw"wtf";r.set(new Uint8Array(e[t]),a)}return r}return[].concat.apply([],e.map(function(c){return Array.isArray(c)?c:[].slice.call(c)}))};function N41(e){for(var t=[],a=0,r=e.length+250,n=m0(e.length+255),c=0;c<e.length;++c){var i=e.charCodeAt(c);if(i<128)n[a++]=i;else if(i<2048)n[a++]=192|i>>6&31,n[a++]=128|i&63;else if(i>=55296&&i<57344){i=(i&1023)+64;var s=e.charCodeAt(++c)&1023;n[a++]=240|i>>8&7,n[a++]=128|i>>2&63,n[a++]=128|s>>6&15|(i&3)<<4,n[a++]=128|s&63}else n[a++]=224|i>>12&15,n[a++]=128|i>>6&63,n[a++]=128|i&63;a>r&&(t.push(n.slice(0,a)),a=0,n=m0(65535),r=65530)}return t.push(n.slice(0,a)),$t(t)}var l3=/\u0000/g,Qa=/[\u0001-\u0006]/g;function q6(e){for(var t="",a=e.length-1;a>=0;)t+=e.charAt(a--);return t}function i4(e,t){var a=""+e;return a.length>=t?a:ce("0",t-a.length)+a}function Xl(e,t){var a=""+e;return a.length>=t?a:ce(" ",t-a.length)+a}function $c(e,t){var a=""+e;return a.length>=t?a:a+ce(" ",t-a.length)}function D41(e,t){var a=""+Math.round(e);return a.length>=t?a:ce("0",t-a.length)+a}function O41(e,t){var a=""+e;return a.length>=t?a:ce("0",t-a.length)+a}var dm=Math.pow(2,32);function L6(e,t){if(e>dm||e<-dm)return D41(e,t);var a=Math.round(e);return O41(a,t)}function Uc(e,t){return t=t||0,e.length>=7+t&&(e.charCodeAt(t)|32)===103&&(e.charCodeAt(t+1)|32)===101&&(e.charCodeAt(t+2)|32)===110&&(e.charCodeAt(t+3)|32)===101&&(e.charCodeAt(t+4)|32)===114&&(e.charCodeAt(t+5)|32)===97&&(e.charCodeAt(t+6)|32)===108}var hm=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],ds=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function P41(e){return e||(e={}),e[0]="General",e[1]="0",e[2]="0.00",e[3]="#,##0",e[4]="#,##0.00",e[9]="0%",e[10]="0.00%",e[11]="0.00E+00",e[12]="# ?/?",e[13]="# ??/??",e[14]="m/d/yy",e[15]="d-mmm-yy",e[16]="d-mmm",e[17]="mmm-yy",e[18]="h:mm AM/PM",e[19]="h:mm:ss AM/PM",e[20]="h:mm",e[21]="h:mm:ss",e[22]="m/d/yy h:mm",e[37]="#,##0 ;(#,##0)",e[38]="#,##0 ;[Red](#,##0)",e[39]="#,##0.00;(#,##0.00)",e[40]="#,##0.00;[Red](#,##0.00)",e[45]="mm:ss",e[46]="[h]:mm:ss",e[47]="mmss.0",e[48]="##0.0E+0",e[49]="@",e[56]='"上午/下午 "hh"時"mm"分"ss"秒 "',e}var e2={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/下午 "hh"時"mm"分"ss"秒 "'},mm={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},B41={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function Wc(e,t,a){for(var r=e<0?-1:1,n=e*r,c=0,i=1,s=0,l=1,f=0,u=0,d=Math.floor(n);f<t&&(d=Math.floor(n),s=d*i+c,u=d*f+l,!(n-d<5e-8));)n=1/(n-d),c=i,i=s,l=f,f=u;if(u>t&&(f>t?(u=l,s=c):(u=f,s=i)),!a)return[0,r*s,u];var h=Math.floor(r*s/u);return[h,r*s-h*u,u]}function U0(e,t,a){if(e>2958465||e<0)return null;var r=e|0,n=Math.floor(86400*(e-r)),c=0,i=[],s={D:r,T:n,u:86400*(e-r)-n,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(s.u)<1e-6&&(s.u=0),t&&t.date1904&&(r+=1462),s.u>.9999&&(s.u=0,++n==86400&&(s.T=n=0,++r,++s.D)),r===60)i=a?[1317,10,29]:[1900,2,29],c=3;else if(r===0)i=a?[1317,8,29]:[1900,1,0],c=6;else{r>60&&--r;var l=new Date(1900,0,1);l.setDate(l.getDate()+r-1),i=[l.getFullYear(),l.getMonth()+1,l.getDate()],c=l.getDay(),r<60&&(c=(c+6)%7),a&&(c=W41(l,i))}return s.y=i[0],s.m=i[1],s.d=i[2],s.S=n%60,n=Math.floor(n/60),s.M=n%60,n=Math.floor(n/60),s.H=n,s.q=c,s}var zb=new Date(1899,11,31,0,0,0),F41=zb.getTime(),R41=new Date(1900,2,1,0,0,0);function wb(e,t){var a=e.getTime();return t?a-=1461*24*60*60*1e3:e>=R41&&(a+=24*60*60*1e3),(a-(F41+(e.getTimezoneOffset()-zb.getTimezoneOffset())*6e4))/(24*60*60*1e3)}function Kl(e){return e.indexOf(".")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function I41(e){return e.indexOf("E")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}function $41(e){var t=e<0?12:11,a=Kl(e.toFixed(12));return a.length<=t||(a=e.toPrecision(10),a.length<=t)?a:e.toExponential(5)}function U41(e){var t=Kl(e.toFixed(11));return t.length>(e<0?12:11)||t==="0"||t==="-0"?e.toPrecision(6):t}function rn(e){var t=Math.floor(Math.log(Math.abs(e))*Math.LOG10E),a;return t>=-4&&t<=-1?a=e.toPrecision(10+t):Math.abs(t)<=9?a=$41(e):t===10?a=e.toFixed(10).substr(0,12):a=U41(e),Kl(I41(a.toUpperCase()))}function i6(e,t){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(e|0)===e?e.toString(10):rn(e);case"undefined":return"";case"object":if(e==null)return"";if(e instanceof Date)return I3(14,wb(e,t&&t.date1904),t)}throw new Error("unsupported value in General format: "+e)}function W41(e,t){t[0]-=581;var a=e.getDay();return e<60&&(a=(a+6)%7),a}function q41(e,t,a,r){var n="",c=0,i=0,s=a.y,l,f=0;switch(e){case 98:s=a.y+543;case 121:switch(t.length){case 1:case 2:l=s%100,f=2;break;default:l=s%1e4,f=4;break}break;case 109:switch(t.length){case 1:case 2:l=a.m,f=t.length;break;case 3:return ds[a.m-1][1];case 5:return ds[a.m-1][0];default:return ds[a.m-1][2]}break;case 100:switch(t.length){case 1:case 2:l=a.d,f=t.length;break;case 3:return hm[a.q][0];default:return hm[a.q][1]}break;case 104:switch(t.length){case 1:case 2:l=1+(a.H+11)%12,f=t.length;break;default:throw"bad hour format: "+t}break;case 72:switch(t.length){case 1:case 2:l=a.H,f=t.length;break;default:throw"bad hour format: "+t}break;case 77:switch(t.length){case 1:case 2:l=a.M,f=t.length;break;default:throw"bad minute format: "+t}break;case 115:if(t!="s"&&t!="ss"&&t!=".0"&&t!=".00"&&t!=".000")throw"bad second format: "+t;return a.u===0&&(t=="s"||t=="ss")?i4(a.S,t.length):(r>=2?i=r===3?1e3:100:i=r===1?10:1,c=Math.round(i*(a.S+a.u)),c>=60*i&&(c=0),t==="s"?c===0?"0":""+c/i:(n=i4(c,2+r),t==="ss"?n.substr(0,2):"."+n.substr(2,t.length-1)));case 90:switch(t){case"[h]":case"[hh]":l=a.D*24+a.H;break;case"[m]":case"[mm]":l=(a.D*24+a.H)*60+a.M;break;case"[s]":case"[ss]":l=((a.D*24+a.H)*60+a.M)*60+Math.round(a.S+a.u);break;default:throw"bad abstime format: "+t}f=t.length===3?1:2;break;case 101:l=s,f=1;break}var u=f>0?i4(l,f):"";return u}function Zt(e){var t=3;if(e.length<=t)return e;for(var a=e.length%t,r=e.substr(0,a);a!=e.length;a+=t)r+=(r.length>0?",":"")+e.substr(a,t);return r}var _b=/%/g;function j41(e,t,a){var r=t.replace(_b,""),n=t.length-r.length;return yt(e,r,a*Math.pow(10,2*n))+ce("%",n)}function Y41(e,t,a){for(var r=t.length-1;t.charCodeAt(r-1)===44;)--r;return yt(e,t.substr(0,r),a/Math.pow(10,3*(t.length-r)))}function kb(e,t){var a,r=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+kb(e,-t);var n=e.indexOf(".");n===-1&&(n=e.indexOf("E"));var c=Math.floor(Math.log(t)*Math.LOG10E)%n;if(c<0&&(c+=n),a=(t/Math.pow(10,c)).toPrecision(r+1+(n+c)%n),a.indexOf("e")===-1){var i=Math.floor(Math.log(t)*Math.LOG10E);for(a.indexOf(".")===-1?a=a.charAt(0)+"."+a.substr(1)+"E+"+(i-a.length+c):a+="E+"+(i-c);a.substr(0,2)==="0.";)a=a.charAt(0)+a.substr(2,n)+"."+a.substr(2+n),a=a.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");a=a.replace(/\+-/,"-")}a=a.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(s,l,f,u){return l+f+u.substr(0,(n+c)%n)+"."+u.substr(c)+"E"})}else a=t.toExponential(r);return e.match(/E\+00$/)&&a.match(/e[+-]\d$/)&&(a=a.substr(0,a.length-1)+"0"+a.charAt(a.length-1)),e.match(/E\-/)&&a.match(/e\+/)&&(a=a.replace(/e\+/,"e")),a.replace("e","E")}var Hb=/# (\?+)( ?)\/( ?)(\d+)/;function G41(e,t,a){var r=parseInt(e[4],10),n=Math.round(t*r),c=Math.floor(n/r),i=n-c*r,s=r;return a+(c===0?"":""+c)+" "+(i===0?ce(" ",e[1].length+1+e[4].length):Xl(i,e[1].length)+e[2]+"/"+e[3]+i4(s,e[4].length))}function X41(e,t,a){return a+(t===0?"":""+t)+ce(" ",e[1].length+2+e[4].length)}var Vb=/^#*0*\.([0#]+)/,Lb=/\).*[0#]/,Sb=/\(###\) ###\\?-####/;function i3(e){for(var t="",a,r=0;r!=e.length;++r)switch(a=e.charCodeAt(r)){case 35:break;case 63:t+=" ";break;case 48:t+="0";break;default:t+=String.fromCharCode(a)}return t}function pm(e,t){var a=Math.pow(10,t);return""+Math.round(e*a)/a}function vm(e,t){var a=e-Math.floor(e),r=Math.pow(10,t);return t<(""+Math.round(a*r)).length?0:Math.round(a*r)}function K41(e,t){return t<(""+Math.round((e-Math.floor(e))*Math.pow(10,t))).length?1:0}function Z41(e){return e<2147483647&&e>-2147483648?""+(e>=0?e|0:e-1|0):""+Math.floor(e)}function O3(e,t,a){if(e.charCodeAt(0)===40&&!t.match(Lb)){var r=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return a>=0?O3("n",r,a):"("+O3("n",r,-a)+")"}if(t.charCodeAt(t.length-1)===44)return Y41(e,t,a);if(t.indexOf("%")!==-1)return j41(e,t,a);if(t.indexOf("E")!==-1)return kb(t,a);if(t.charCodeAt(0)===36)return"$"+O3(e,t.substr(t.charAt(1)==" "?2:1),a);var n,c,i,s,l=Math.abs(a),f=a<0?"-":"";if(t.match(/^00+$/))return f+L6(l,t.length);if(t.match(/^[#?]+$/))return n=L6(a,0),n==="0"&&(n=""),n.length>t.length?n:i3(t.substr(0,t.length-n.length))+n;if(c=t.match(Hb))return G41(c,l,f);if(t.match(/^#+0+$/))return f+L6(l,t.length-t.indexOf("0"));if(c=t.match(Vb))return n=pm(a,c[1].length).replace(/^([^\.]+)$/,"$1."+i3(c[1])).replace(/\.$/,"."+i3(c[1])).replace(/\.(\d*)$/,function(v,p){return"."+p+ce("0",i3(c[1]).length-p.length)}),t.indexOf("0.")!==-1?n:n.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),c=t.match(/^(0*)\.(#*)$/))return f+pm(l,c[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,c[1].length?"0.":".");if(c=t.match(/^#{1,3},##0(\.?)$/))return f+Zt(L6(l,0));if(c=t.match(/^#,##0\.([#0]*0)$/))return a<0?"-"+O3(e,t,-a):Zt(""+(Math.floor(a)+K41(a,c[1].length)))+"."+i4(vm(a,c[1].length),c[1].length);if(c=t.match(/^#,#*,#0/))return O3(e,t.replace(/^#,#*,/,""),a);if(c=t.match(/^([0#]+)(\\?-([0#]+))+$/))return n=q6(O3(e,t.replace(/[\\-]/g,""),a)),i=0,q6(q6(t.replace(/\\/g,"")).replace(/[0#]/g,function(v){return i<n.length?n.charAt(i++):v==="0"?"0":""}));if(t.match(Sb))return n=O3(e,"##########",a),"("+n.substr(0,3)+") "+n.substr(3,3)+"-"+n.substr(6);var u="";if(c=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(c[4].length,7),s=Wc(l,Math.pow(10,i)-1,!1),n=""+f,u=yt("n",c[1],s[1]),u.charAt(u.length-1)==" "&&(u=u.substr(0,u.length-1)+"0"),n+=u+c[2]+"/"+c[3],u=$c(s[2],i),u.length<c[4].length&&(u=i3(c[4].substr(c[4].length-u.length))+u),n+=u,n;if(c=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(Math.max(c[1].length,c[4].length),7),s=Wc(l,Math.pow(10,i)-1,!0),f+(s[0]||(s[1]?"":"0"))+" "+(s[1]?Xl(s[1],i)+c[2]+"/"+c[3]+$c(s[2],i):ce(" ",2*i+1+c[2].length+c[3].length));if(c=t.match(/^[#0?]+$/))return n=L6(a,0),t.length<=n.length?n:i3(t.substr(0,t.length-n.length))+n;if(c=t.match(/^([#0?]+)\.([#0]+)$/)){n=""+a.toFixed(Math.min(c[2].length,10)).replace(/([^0])0+$/,"$1"),i=n.indexOf(".");var d=t.indexOf(".")-i,h=t.length-n.length-d;return i3(t.substr(0,d)+n+t.substr(t.length-h))}if(c=t.match(/^00,000\.([#0]*0)$/))return i=vm(a,c[1].length),a<0?"-"+O3(e,t,-a):Zt(Z41(a)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(v){return"00,"+(v.length<3?i4(0,3-v.length):"")+v})+"."+i4(i,c[1].length);switch(t){case"###,##0.00":return O3(e,"#,##0.00",a);case"###,###":case"##,###":case"#,###":var m=Zt(L6(l,0));return m!=="0"?f+m:"";case"###,###.00":return O3(e,"###,##0.00",a).replace(/^0\./,".");case"#,###.00":return O3(e,"#,##0.00",a).replace(/^0\./,".")}throw new Error("unsupported format |"+t+"|")}function Q41(e,t,a){for(var r=t.length-1;t.charCodeAt(r-1)===44;)--r;return yt(e,t.substr(0,r),a/Math.pow(10,3*(t.length-r)))}function J41(e,t,a){var r=t.replace(_b,""),n=t.length-r.length;return yt(e,r,a*Math.pow(10,2*n))+ce("%",n)}function Ab(e,t){var a,r=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+Ab(e,-t);var n=e.indexOf(".");n===-1&&(n=e.indexOf("E"));var c=Math.floor(Math.log(t)*Math.LOG10E)%n;if(c<0&&(c+=n),a=(t/Math.pow(10,c)).toPrecision(r+1+(n+c)%n),!a.match(/[Ee]/)){var i=Math.floor(Math.log(t)*Math.LOG10E);a.indexOf(".")===-1?a=a.charAt(0)+"."+a.substr(1)+"E+"+(i-a.length+c):a+="E+"+(i-c),a=a.replace(/\+-/,"-")}a=a.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(s,l,f,u){return l+f+u.substr(0,(n+c)%n)+"."+u.substr(c)+"E"})}else a=t.toExponential(r);return e.match(/E\+00$/)&&a.match(/e[+-]\d$/)&&(a=a.substr(0,a.length-1)+"0"+a.charAt(a.length-1)),e.match(/E\-/)&&a.match(/e\+/)&&(a=a.replace(/e\+/,"e")),a.replace("e","E")}function _4(e,t,a){if(e.charCodeAt(0)===40&&!t.match(Lb)){var r=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return a>=0?_4("n",r,a):"("+_4("n",r,-a)+")"}if(t.charCodeAt(t.length-1)===44)return Q41(e,t,a);if(t.indexOf("%")!==-1)return J41(e,t,a);if(t.indexOf("E")!==-1)return Ab(t,a);if(t.charCodeAt(0)===36)return"$"+_4(e,t.substr(t.charAt(1)==" "?2:1),a);var n,c,i,s,l=Math.abs(a),f=a<0?"-":"";if(t.match(/^00+$/))return f+i4(l,t.length);if(t.match(/^[#?]+$/))return n=""+a,a===0&&(n=""),n.length>t.length?n:i3(t.substr(0,t.length-n.length))+n;if(c=t.match(Hb))return X41(c,l,f);if(t.match(/^#+0+$/))return f+i4(l,t.length-t.indexOf("0"));if(c=t.match(Vb))return n=(""+a).replace(/^([^\.]+)$/,"$1."+i3(c[1])).replace(/\.$/,"."+i3(c[1])),n=n.replace(/\.(\d*)$/,function(v,p){return"."+p+ce("0",i3(c[1]).length-p.length)}),t.indexOf("0.")!==-1?n:n.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),c=t.match(/^(0*)\.(#*)$/))return f+(""+l).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,c[1].length?"0.":".");if(c=t.match(/^#{1,3},##0(\.?)$/))return f+Zt(""+l);if(c=t.match(/^#,##0\.([#0]*0)$/))return a<0?"-"+_4(e,t,-a):Zt(""+a)+"."+ce("0",c[1].length);if(c=t.match(/^#,#*,#0/))return _4(e,t.replace(/^#,#*,/,""),a);if(c=t.match(/^([0#]+)(\\?-([0#]+))+$/))return n=q6(_4(e,t.replace(/[\\-]/g,""),a)),i=0,q6(q6(t.replace(/\\/g,"")).replace(/[0#]/g,function(v){return i<n.length?n.charAt(i++):v==="0"?"0":""}));if(t.match(Sb))return n=_4(e,"##########",a),"("+n.substr(0,3)+") "+n.substr(3,3)+"-"+n.substr(6);var u="";if(c=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(c[4].length,7),s=Wc(l,Math.pow(10,i)-1,!1),n=""+f,u=yt("n",c[1],s[1]),u.charAt(u.length-1)==" "&&(u=u.substr(0,u.length-1)+"0"),n+=u+c[2]+"/"+c[3],u=$c(s[2],i),u.length<c[4].length&&(u=i3(c[4].substr(c[4].length-u.length))+u),n+=u,n;if(c=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(Math.max(c[1].length,c[4].length),7),s=Wc(l,Math.pow(10,i)-1,!0),f+(s[0]||(s[1]?"":"0"))+" "+(s[1]?Xl(s[1],i)+c[2]+"/"+c[3]+$c(s[2],i):ce(" ",2*i+1+c[2].length+c[3].length));if(c=t.match(/^[#0?]+$/))return n=""+a,t.length<=n.length?n:i3(t.substr(0,t.length-n.length))+n;if(c=t.match(/^([#0]+)\.([#0]+)$/)){n=""+a.toFixed(Math.min(c[2].length,10)).replace(/([^0])0+$/,"$1"),i=n.indexOf(".");var d=t.indexOf(".")-i,h=t.length-n.length-d;return i3(t.substr(0,d)+n+t.substr(t.length-h))}if(c=t.match(/^00,000\.([#0]*0)$/))return a<0?"-"+_4(e,t,-a):Zt(""+a).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(v){return"00,"+(v.length<3?i4(0,3-v.length):"")+v})+"."+i4(0,c[1].length);switch(t){case"###,###":case"##,###":case"#,###":var m=Zt(""+l);return m!=="0"?f+m:"";default:if(t.match(/\.[0#?]*$/))return _4(e,t.slice(0,t.lastIndexOf(".")),a)+i3(t.slice(t.lastIndexOf(".")))}throw new Error("unsupported format |"+t+"|")}function yt(e,t,a){return(a|0)===a?_4(e,t,a):O3(e,t,a)}function et1(e){for(var t=[],a=!1,r=0,n=0;r<e.length;++r)switch(e.charCodeAt(r)){case 34:a=!a;break;case 95:case 42:case 92:++r;break;case 59:t[t.length]=e.substr(n,r-n),n=r+1}if(t[t.length]=e.substr(n),a===!0)throw new Error("Format |"+e+"| unterminated string ");return t}var Tb=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function va(e){for(var t=0,a="",r="";t<e.length;)switch(a=e.charAt(t)){case"G":Uc(e,t)&&(t+=6),t++;break;case'"':for(;e.charCodeAt(++t)!==34&&t<e.length;);++t;break;case"\\":t+=2;break;case"_":t+=2;break;case"@":++t;break;case"B":case"b":if(e.charAt(t+1)==="1"||e.charAt(t+1)==="2")return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"上":if(e.substr(t,3).toUpperCase()==="A/P"||e.substr(t,5).toUpperCase()==="AM/PM"||e.substr(t,5).toUpperCase()==="上午/下午")return!0;++t;break;case"[":for(r=a;e.charAt(t++)!=="]"&&t<e.length;)r+=e.charAt(t);if(r.match(Tb))return!0;break;case".":case"0":case"#":for(;t<e.length&&("0#?.,E+-%".indexOf(a=e.charAt(++t))>-1||a=="\\"&&e.charAt(t+1)=="-"&&"0#".indexOf(e.charAt(t+2))>-1););break;case"?":for(;e.charAt(++t)===a;);break;case"*":++t,(e.charAt(t)==" "||e.charAt(t)=="*")&&++t;break;case"(":case")":++t;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;t<e.length&&"0123456789".indexOf(e.charAt(++t))>-1;);break;case" ":++t;break;default:++t;break}return!1}function tt1(e,t,a,r){for(var n=[],c="",i=0,s="",l="t",f,u,d,h="H";i<e.length;)switch(s=e.charAt(i)){case"G":if(!Uc(e,i))throw new Error("unrecognized character "+s+" in "+e);n[n.length]={t:"G",v:"General"},i+=7;break;case'"':for(c="";(d=e.charCodeAt(++i))!==34&&i<e.length;)c+=String.fromCharCode(d);n[n.length]={t:"t",v:c},++i;break;case"\\":var m=e.charAt(++i),v=m==="("||m===")"?m:"t";n[n.length]={t:v,v:m},++i;break;case"_":n[n.length]={t:"t",v:" "},i+=2;break;case"@":n[n.length]={t:"T",v:t},++i;break;case"B":case"b":if(e.charAt(i+1)==="1"||e.charAt(i+1)==="2"){if(f==null&&(f=U0(t,a,e.charAt(i+1)==="2"),f==null))return"";n[n.length]={t:"X",v:e.substr(i,2)},l=s,i+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":s=s.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(t<0||f==null&&(f=U0(t,a),f==null))return"";for(c=s;++i<e.length&&e.charAt(i).toLowerCase()===s;)c+=s;s==="m"&&l.toLowerCase()==="h"&&(s="M"),s==="h"&&(s=h),n[n.length]={t:s,v:c},l=s;break;case"A":case"a":case"上":var p={t:s,v:s};if(f==null&&(f=U0(t,a)),e.substr(i,3).toUpperCase()==="A/P"?(f!=null&&(p.v=f.H>=12?"P":"A"),p.t="T",h="h",i+=3):e.substr(i,5).toUpperCase()==="AM/PM"?(f!=null&&(p.v=f.H>=12?"PM":"AM"),p.t="T",i+=5,h="h"):e.substr(i,5).toUpperCase()==="上午/下午"?(f!=null&&(p.v=f.H>=12?"下午":"上午"),p.t="T",i+=5,h="h"):(p.t="t",++i),f==null&&p.t==="T")return"";n[n.length]=p,l=s;break;case"[":for(c=s;e.charAt(i++)!=="]"&&i<e.length;)c+=e.charAt(i);if(c.slice(-1)!=="]")throw'unterminated "[" block: |'+c+"|";if(c.match(Tb)){if(f==null&&(f=U0(t,a),f==null))return"";n[n.length]={t:"Z",v:c.toLowerCase()},l=c.charAt(1)}else c.indexOf("$")>-1&&(c=(c.match(/\$([^-\[\]]*)/)||[])[1]||"$",va(e)||(n[n.length]={t:"t",v:c}));break;case".":if(f!=null){for(c=s;++i<e.length&&(s=e.charAt(i))==="0";)c+=s;n[n.length]={t:"s",v:c};break}case"0":case"#":for(c=s;++i<e.length&&"0#?.,E+-%".indexOf(s=e.charAt(i))>-1;)c+=s;n[n.length]={t:"n",v:c};break;case"?":for(c=s;e.charAt(++i)===s;)c+=s;n[n.length]={t:s,v:c},l=s;break;case"*":++i,(e.charAt(i)==" "||e.charAt(i)=="*")&&++i;break;case"(":case")":n[n.length]={t:r===1?"t":s,v:s},++i;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(c=s;i<e.length&&"0123456789".indexOf(e.charAt(++i))>-1;)c+=e.charAt(i);n[n.length]={t:"D",v:c};break;case" ":n[n.length]={t:s,v:s},++i;break;case"$":n[n.length]={t:"t",v:"$"},++i;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(s)===-1)throw new Error("unrecognized character "+s+" in "+e);n[n.length]={t:"t",v:s},++i;break}var g=0,y=0,x;for(i=n.length-1,l="t";i>=0;--i)switch(n[i].t){case"h":case"H":n[i].t=h,l="h",g<1&&(g=1);break;case"s":(x=n[i].v.match(/\.0+$/))&&(y=Math.max(y,x[0].length-1)),g<3&&(g=3);case"d":case"y":case"M":case"e":l=n[i].t;break;case"m":l==="s"&&(n[i].t="M",g<2&&(g=2));break;case"X":break;case"Z":g<1&&n[i].v.match(/[Hh]/)&&(g=1),g<2&&n[i].v.match(/[Mm]/)&&(g=2),g<3&&n[i].v.match(/[Ss]/)&&(g=3)}switch(g){case 0:break;case 1:f.u>=.5&&(f.u=0,++f.S),f.S>=60&&(f.S=0,++f.M),f.M>=60&&(f.M=0,++f.H);break;case 2:f.u>=.5&&(f.u=0,++f.S),f.S>=60&&(f.S=0,++f.M);break}var C="",b;for(i=0;i<n.length;++i)switch(n[i].t){case"t":case"T":case" ":case"D":break;case"X":n[i].v="",n[i].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":n[i].v=q41(n[i].t.charCodeAt(0),n[i].v,f,y),n[i].t="t";break;case"n":case"?":for(b=i+1;n[b]!=null&&((s=n[b].t)==="?"||s==="D"||(s===" "||s==="t")&&n[b+1]!=null&&(n[b+1].t==="?"||n[b+1].t==="t"&&n[b+1].v==="/")||n[i].t==="("&&(s===" "||s==="n"||s===")")||s==="t"&&(n[b].v==="/"||n[b].v===" "&&n[b+1]!=null&&n[b+1].t=="?"));)n[i].v+=n[b].v,n[b]={v:"",t:";"},++b;C+=n[i].v,i=b-1;break;case"G":n[i].t="t",n[i].v=i6(t,a);break}var M="",w,z;if(C.length>0){C.charCodeAt(0)==40?(w=t<0&&C.charCodeAt(0)===45?-t:t,z=yt("n",C,w)):(w=t<0&&r>1?-t:t,z=yt("n",C,w),w<0&&n[0]&&n[0].t=="t"&&(z=z.substr(1),n[0].v="-"+n[0].v)),b=z.length-1;var H=n.length;for(i=0;i<n.length;++i)if(n[i]!=null&&n[i].t!="t"&&n[i].v.indexOf(".")>-1){H=i;break}var A=n.length;if(H===n.length&&z.indexOf("E")===-1){for(i=n.length-1;i>=0;--i)n[i]==null||"n?".indexOf(n[i].t)===-1||(b>=n[i].v.length-1?(b-=n[i].v.length,n[i].v=z.substr(b+1,n[i].v.length)):b<0?n[i].v="":(n[i].v=z.substr(0,b+1),b=-1),n[i].t="t",A=i);b>=0&&A<n.length&&(n[A].v=z.substr(0,b+1)+n[A].v)}else if(H!==n.length&&z.indexOf("E")===-1){for(b=z.indexOf(".")-1,i=H;i>=0;--i)if(!(n[i]==null||"n?".indexOf(n[i].t)===-1)){for(u=n[i].v.indexOf(".")>-1&&i===H?n[i].v.indexOf(".")-1:n[i].v.length-1,M=n[i].v.substr(u+1);u>=0;--u)b>=0&&(n[i].v.charAt(u)==="0"||n[i].v.charAt(u)==="#")&&(M=z.charAt(b--)+M);n[i].v=M,n[i].t="t",A=i}for(b>=0&&A<n.length&&(n[A].v=z.substr(0,b+1)+n[A].v),b=z.indexOf(".")+1,i=H;i<n.length;++i)if(!(n[i]==null||"n?(".indexOf(n[i].t)===-1&&i!==H)){for(u=n[i].v.indexOf(".")>-1&&i===H?n[i].v.indexOf(".")+1:0,M=n[i].v.substr(0,u);u<n[i].v.length;++u)b<z.length&&(M+=z.charAt(b++));n[i].v=M,n[i].t="t",A=i}}}for(i=0;i<n.length;++i)n[i]!=null&&"n?".indexOf(n[i].t)>-1&&(w=r>1&&t<0&&i>0&&n[i-1].v==="-"?-t:t,n[i].v=yt(n[i].t,n[i].v,w),n[i].t="t");var V="";for(i=0;i!==n.length;++i)n[i]!=null&&(V+=n[i].v);return V}var gm=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function ym(e,t){if(t==null)return!1;var a=parseFloat(t[2]);switch(t[1]){case"=":if(e==a)return!0;break;case">":if(e>a)return!0;break;case"<":if(e<a)return!0;break;case"<>":if(e!=a)return!0;break;case">=":if(e>=a)return!0;break;case"<=":if(e<=a)return!0;break}return!1}function at1(e,t){var a=et1(e),r=a.length,n=a[r-1].indexOf("@");if(r<4&&n>-1&&--r,a.length>4)throw new Error("cannot find right format for |"+a.join("|")+"|");if(typeof t!="number")return[4,a.length===4||n>-1?a[a.length-1]:"@"];switch(a.length){case 1:a=n>-1?["General","General","General",a[0]]:[a[0],a[0],a[0],"@"];break;case 2:a=n>-1?[a[0],a[0],a[0],a[1]]:[a[0],a[1],a[0],"@"];break;case 3:a=n>-1?[a[0],a[1],a[0],a[2]]:[a[0],a[1],a[2],"@"];break}var c=t>0?a[0]:t<0?a[1]:a[2];if(a[0].indexOf("[")===-1&&a[1].indexOf("[")===-1)return[r,c];if(a[0].match(/\[[=<>]/)!=null||a[1].match(/\[[=<>]/)!=null){var i=a[0].match(gm),s=a[1].match(gm);return ym(t,i)?[r,a[0]]:ym(t,s)?[r,a[1]]:[r,a[i!=null&&s!=null?2:1]]}return[r,c]}function I3(e,t,a){a==null&&(a={});var r="";switch(typeof e){case"string":e=="m/d/yy"&&a.dateNF?r=a.dateNF:r=e;break;case"number":e==14&&a.dateNF?r=a.dateNF:r=(a.table!=null?a.table:e2)[e],r==null&&(r=a.table&&a.table[mm[e]]||e2[mm[e]]),r==null&&(r=B41[e]||"General");break}if(Uc(r,0))return i6(t,a);t instanceof Date&&(t=wb(t,a.date1904));var n=at1(r,t);if(Uc(n[1]))return i6(t,a);if(t===!0)t="TRUE";else if(t===!1)t="FALSE";else if(t===""||t==null)return"";return tt1(n[1],t,a,n[0])}function K0(e,t){if(typeof t!="number"){t=+t||-1;for(var a=0;a<392;++a){if(e2[a]==null){t<0&&(t=a);continue}if(e2[a]==e){t=a;break}}t<0&&(t=391)}return e2[t]=e,t}function Eb(){e2=P41()}var rt1={5:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',23:"General",24:"General",25:"General",26:"General",27:"m/d/yy",28:"m/d/yy",29:"m/d/yy",30:"m/d/yy",31:"m/d/yy",32:"h:mm:ss",33:"h:mm:ss",34:"h:mm:ss",35:"h:mm:ss",36:"m/d/yy",41:'_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',50:"m/d/yy",51:"m/d/yy",52:"m/d/yy",53:"m/d/yy",54:"m/d/yy",55:"m/d/yy",56:"m/d/yy",57:"m/d/yy",58:"m/d/yy",59:"0",60:"0.00",61:"#,##0",62:"#,##0.00",63:'"$"#,##0_);\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',67:"0%",68:"0.00%",69:"# ?/?",70:"# ??/??",71:"m/d/yy",72:"m/d/yy",73:"d-mmm-yy",74:"d-mmm",75:"mmm-yy",76:"h:mm",77:"h:mm:ss",78:"m/d/yy h:mm",79:"mm:ss",80:"[h]:mm:ss",81:"mmss.0"},Nb=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;function nt1(e){var t=typeof e=="number"?e2[e]:e;return t=t.replace(Nb,"(\\d+)"),new RegExp("^"+t+"$")}function ct1(e,t,a){var r=-1,n=-1,c=-1,i=-1,s=-1,l=-1;(t.match(Nb)||[]).forEach(function(d,h){var m=parseInt(a[h+1],10);switch(d.toLowerCase().charAt(0)){case"y":r=m;break;case"d":c=m;break;case"h":i=m;break;case"s":l=m;break;case"m":i>=0?s=m:n=m;break}}),l>=0&&s==-1&&n>=0&&(s=n,n=-1);var f=(""+(r>=0?r:new Date().getFullYear())).slice(-4)+"-"+("00"+(n>=1?n:1)).slice(-2)+"-"+("00"+(c>=1?c:1)).slice(-2);f.length==7&&(f="0"+f),f.length==8&&(f="20"+f);var u=("00"+(i>=0?i:0)).slice(-2)+":"+("00"+(s>=0?s:0)).slice(-2)+":"+("00"+(l>=0?l:0)).slice(-2);return i==-1&&s==-1&&l==-1?f:r==-1&&n==-1&&c==-1?u:f+"T"+u}var it1=function(){var e={};e.version="1.2.0";function t(){for(var z=0,H=new Array(256),A=0;A!=256;++A)z=A,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,z=z&1?-306674912^z>>>1:z>>>1,H[A]=z;return typeof Int32Array<"u"?new Int32Array(H):H}var a=t();function r(z){var H=0,A=0,V=0,k=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(V=0;V!=256;++V)k[V]=z[V];for(V=0;V!=256;++V)for(A=z[V],H=256+V;H<4096;H+=256)A=k[H]=A>>>8^z[A&255];var _=[];for(V=1;V!=16;++V)_[V-1]=typeof Int32Array<"u"?k.subarray(V*256,V*256+256):k.slice(V*256,V*256+256);return _}var n=r(a),c=n[0],i=n[1],s=n[2],l=n[3],f=n[4],u=n[5],d=n[6],h=n[7],m=n[8],v=n[9],p=n[10],g=n[11],y=n[12],x=n[13],C=n[14];function b(z,H){for(var A=H^-1,V=0,k=z.length;V<k;)A=A>>>8^a[(A^z.charCodeAt(V++))&255];return~A}function M(z,H){for(var A=H^-1,V=z.length-15,k=0;k<V;)A=C[z[k++]^A&255]^x[z[k++]^A>>8&255]^y[z[k++]^A>>16&255]^g[z[k++]^A>>>24]^p[z[k++]]^v[z[k++]]^m[z[k++]]^h[z[k++]]^d[z[k++]]^u[z[k++]]^f[z[k++]]^l[z[k++]]^s[z[k++]]^i[z[k++]]^c[z[k++]]^a[z[k++]];for(V+=15;k<V;)A=A>>>8^a[(A^z[k++])&255];return~A}function w(z,H){for(var A=H^-1,V=0,k=z.length,_=0,N=0;V<k;)_=z.charCodeAt(V++),_<128?A=A>>>8^a[(A^_)&255]:_<2048?(A=A>>>8^a[(A^(192|_>>6&31))&255],A=A>>>8^a[(A^(128|_&63))&255]):_>=55296&&_<57344?(_=(_&1023)+64,N=z.charCodeAt(V++)&1023,A=A>>>8^a[(A^(240|_>>8&7))&255],A=A>>>8^a[(A^(128|_>>2&63))&255],A=A>>>8^a[(A^(128|N>>6&15|(_&3)<<4))&255],A=A>>>8^a[(A^(128|N&63))&255]):(A=A>>>8^a[(A^(224|_>>12&15))&255],A=A>>>8^a[(A^(128|_>>6&63))&255],A=A>>>8^a[(A^(128|_&63))&255]);return~A}return e.table=a,e.bstr=b,e.buf=M,e.str=w,e}(),v2=function(){var t={};t.version="1.2.1";function a(X,r1){for(var Q=X.split("/"),e1=r1.split("/"),c1=0,i1=0,C1=Math.min(Q.length,e1.length);c1<C1;++c1){if(i1=Q[c1].length-e1[c1].length)return i1;if(Q[c1]!=e1[c1])return Q[c1]<e1[c1]?-1:1}return Q.length-e1.length}function r(X){if(X.charAt(X.length-1)=="/")return X.slice(0,-1).indexOf("/")===-1?X:r(X.slice(0,-1));var r1=X.lastIndexOf("/");return r1===-1?X:X.slice(0,r1+1)}function n(X){if(X.charAt(X.length-1)=="/")return n(X.slice(0,-1));var r1=X.lastIndexOf("/");return r1===-1?X:X.slice(r1+1)}function c(X,r1){typeof r1=="string"&&(r1=new Date(r1));var Q=r1.getHours();Q=Q<<6|r1.getMinutes(),Q=Q<<5|r1.getSeconds()>>>1,X.write_shift(2,Q);var e1=r1.getFullYear()-1980;e1=e1<<4|r1.getMonth()+1,e1=e1<<5|r1.getDate(),X.write_shift(2,e1)}function i(X){var r1=X.read_shift(2)&65535,Q=X.read_shift(2)&65535,e1=new Date,c1=Q&31;Q>>>=5;var i1=Q&15;Q>>>=4,e1.setMilliseconds(0),e1.setFullYear(Q+1980),e1.setMonth(i1-1),e1.setDate(c1);var C1=r1&31;r1>>>=5;var M1=r1&63;return r1>>>=6,e1.setHours(r1),e1.setMinutes(M1),e1.setSeconds(C1<<1),e1}function s(X){Be(X,0);for(var r1={},Q=0;X.l<=X.length-4;){var e1=X.read_shift(2),c1=X.read_shift(2),i1=X.l+c1,C1={};switch(e1){case 21589:Q=X.read_shift(1),Q&1&&(C1.mtime=X.read_shift(4)),c1>5&&(Q&2&&(C1.atime=X.read_shift(4)),Q&4&&(C1.ctime=X.read_shift(4))),C1.mtime&&(C1.mt=new Date(C1.mtime*1e3));break}X.l=i1,r1[e1]=C1}return r1}var l;function f(){return l||(l={})}function u(X,r1){if(X[0]==80&&X[1]==75)return Q1(X,r1);if((X[0]|32)==109&&(X[1]|32)==105)return K4(X,r1);if(X.length<512)throw new Error("CFB file size "+X.length+" < 512");var Q=3,e1=512,c1=0,i1=0,C1=0,M1=0,D=0,I=[],P=X.slice(0,512);Be(P,0);var K=d(P);switch(Q=K[0],Q){case 3:e1=512;break;case 4:e1=4096;break;case 0:if(K[1]==0)return Q1(X,r1);default:throw new Error("Major Version: Expected 3 or 4 saw "+Q)}e1!==512&&(P=X.slice(0,e1),Be(P,28));var Z=X.slice(0,e1);h(P,Q);var o1=P.read_shift(4,"i");if(Q===3&&o1!==0)throw new Error("# Directory Sectors: Expected 0 saw "+o1);P.l+=4,C1=P.read_shift(4,"i"),P.l+=4,P.chk("00100000","Mini Stream Cutoff Size: "),M1=P.read_shift(4,"i"),c1=P.read_shift(4,"i"),D=P.read_shift(4,"i"),i1=P.read_shift(4,"i");for(var s1=-1,x1=0;x1<109&&(s1=P.read_shift(4,"i"),!(s1<0));++x1)I[x1]=s1;var V1=m(X,e1);g(D,i1,V1,e1,I);var L1=x(V1,C1,I,e1);L1[C1].name="!Directory",c1>0&&M1!==N&&(L1[M1].name="!MiniFAT"),L1[I[0]].name="!FAT",L1.fat_addrs=I,L1.ssz=e1;var w1={},N1=[],R1=[],J1=[];C(C1,L1,V1,N1,c1,w1,R1,M1),v(R1,J1,N1),N1.shift();var U1={FileIndex:R1,FullPaths:J1};return r1&&r1.raw&&(U1.raw={header:Z,sectors:V1}),U1}function d(X){if(X[X.l]==80&&X[X.l+1]==75)return[0,0];X.chk(q,"Header Signature: "),X.l+=16;var r1=X.read_shift(2,"u");return[X.read_shift(2,"u"),r1]}function h(X,r1){var Q=9;switch(X.l+=2,Q=X.read_shift(2)){case 9:if(r1!=3)throw new Error("Sector Shift: Expected 9 saw "+Q);break;case 12:if(r1!=4)throw new Error("Sector Shift: Expected 12 saw "+Q);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+Q)}X.chk("0600","Mini Sector Shift: "),X.chk("000000000000","Reserved: ")}function m(X,r1){for(var Q=Math.ceil(X.length/r1)-1,e1=[],c1=1;c1<Q;++c1)e1[c1-1]=X.slice(c1*r1,(c1+1)*r1);return e1[Q-1]=X.slice(Q*r1),e1}function v(X,r1,Q){for(var e1=0,c1=0,i1=0,C1=0,M1=0,D=Q.length,I=[],P=[];e1<D;++e1)I[e1]=P[e1]=e1,r1[e1]=Q[e1];for(;M1<P.length;++M1)e1=P[M1],c1=X[e1].L,i1=X[e1].R,C1=X[e1].C,I[e1]===e1&&(c1!==-1&&I[c1]!==c1&&(I[e1]=I[c1]),i1!==-1&&I[i1]!==i1&&(I[e1]=I[i1])),C1!==-1&&(I[C1]=e1),c1!==-1&&e1!=I[e1]&&(I[c1]=I[e1],P.lastIndexOf(c1)<M1&&P.push(c1)),i1!==-1&&e1!=I[e1]&&(I[i1]=I[e1],P.lastIndexOf(i1)<M1&&P.push(i1));for(e1=1;e1<D;++e1)I[e1]===e1&&(i1!==-1&&I[i1]!==i1?I[e1]=I[i1]:c1!==-1&&I[c1]!==c1&&(I[e1]=I[c1]));for(e1=1;e1<D;++e1)if(X[e1].type!==0){if(M1=e1,M1!=I[M1])do M1=I[M1],r1[e1]=r1[M1]+"/"+r1[e1];while(M1!==0&&I[M1]!==-1&&M1!=I[M1]);I[e1]=-1}for(r1[0]+="/",e1=1;e1<D;++e1)X[e1].type!==2&&(r1[e1]+="/")}function p(X,r1,Q){for(var e1=X.start,c1=X.size,i1=[],C1=e1;Q&&c1>0&&C1>=0;)i1.push(r1.slice(C1*_,C1*_+_)),c1-=_,C1=P0(Q,C1*4);return i1.length===0?_e(0):$t(i1).slice(0,X.size)}function g(X,r1,Q,e1,c1){var i1=N;if(X===N){if(r1!==0)throw new Error("DIFAT chain shorter than expected")}else if(X!==-1){var C1=Q[X],M1=(e1>>>2)-1;if(!C1)return;for(var D=0;D<M1&&(i1=P0(C1,D*4))!==N;++D)c1.push(i1);g(P0(C1,e1-4),r1-1,Q,e1,c1)}}function y(X,r1,Q,e1,c1){var i1=[],C1=[];c1||(c1=[]);var M1=e1-1,D=0,I=0;for(D=r1;D>=0;){c1[D]=!0,i1[i1.length]=D,C1.push(X[D]);var P=Q[Math.floor(D*4/e1)];if(I=D*4&M1,e1<4+I)throw new Error("FAT boundary crossed: "+D+" 4 "+e1);if(!X[P])break;D=P0(X[P],I)}return{nodes:i1,data:Vm([C1])}}function x(X,r1,Q,e1){var c1=X.length,i1=[],C1=[],M1=[],D=[],I=e1-1,P=0,K=0,Z=0,o1=0;for(P=0;P<c1;++P)if(M1=[],Z=P+r1,Z>=c1&&(Z-=c1),!C1[Z]){D=[];var s1=[];for(K=Z;K>=0;){s1[K]=!0,C1[K]=!0,M1[M1.length]=K,D.push(X[K]);var x1=Q[Math.floor(K*4/e1)];if(o1=K*4&I,e1<4+o1)throw new Error("FAT boundary crossed: "+K+" 4 "+e1);if(!X[x1]||(K=P0(X[x1],o1),s1[K]))break}i1[Z]={nodes:M1,data:Vm([D])}}return i1}function C(X,r1,Q,e1,c1,i1,C1,M1){for(var D=0,I=e1.length?2:0,P=r1[X].data,K=0,Z=0,o1;K<P.length;K+=128){var s1=P.slice(K,K+128);Be(s1,64),Z=s1.read_shift(2),o1=t9(s1,0,Z-I),e1.push(o1);var x1={name:o1,type:s1.read_shift(1),color:s1.read_shift(1),L:s1.read_shift(4,"i"),R:s1.read_shift(4,"i"),C:s1.read_shift(4,"i"),clsid:s1.read_shift(16),state:s1.read_shift(4,"i"),start:0,size:0},V1=s1.read_shift(2)+s1.read_shift(2)+s1.read_shift(2)+s1.read_shift(2);V1!==0&&(x1.ct=b(s1,s1.l-8));var L1=s1.read_shift(2)+s1.read_shift(2)+s1.read_shift(2)+s1.read_shift(2);L1!==0&&(x1.mt=b(s1,s1.l-8)),x1.start=s1.read_shift(4,"i"),x1.size=s1.read_shift(4,"i"),x1.size<0&&x1.start<0&&(x1.size=x1.type=0,x1.start=N,x1.name=""),x1.type===5?(D=x1.start,c1>0&&D!==N&&(r1[D].name="!StreamData")):x1.size>=4096?(x1.storage="fat",r1[x1.start]===void 0&&(r1[x1.start]=y(Q,x1.start,r1.fat_addrs,r1.ssz)),r1[x1.start].name=x1.name,x1.content=r1[x1.start].data.slice(0,x1.size)):(x1.storage="minifat",x1.size<0?x1.size=0:D!==N&&x1.start!==N&&r1[D]&&(x1.content=p(x1,r1[D].data,(r1[M1]||{}).data))),x1.content&&Be(x1.content,0),i1[o1]=x1,C1.push(x1)}}function b(X,r1){return new Date((C3(X,r1+4)/1e7*Math.pow(2,32)+C3(X,r1)/1e7-11644473600)*1e3)}function M(X,r1){return f(),u(l.readFileSync(X),r1)}function w(X,r1){var Q=r1&&r1.type;switch(Q||h2&&Buffer.isBuffer(X)&&(Q="buffer"),Q||"base64"){case"file":return M(X,r1);case"base64":return u(t4(H3(X)),r1);case"binary":return u(t4(X),r1)}return u(X,r1)}function z(X,r1){var Q=r1||{},e1=Q.root||"Root Entry";if(X.FullPaths||(X.FullPaths=[]),X.FileIndex||(X.FileIndex=[]),X.FullPaths.length!==X.FileIndex.length)throw new Error("inconsistent CFB structure");X.FullPaths.length===0&&(X.FullPaths[0]=e1+"/",X.FileIndex[0]={name:e1,type:5}),Q.CLSID&&(X.FileIndex[0].clsid=Q.CLSID),H(X)}function H(X){var r1="Sh33tJ5";if(!v2.find(X,"/"+r1)){var Q=_e(4);Q[0]=55,Q[1]=Q[3]=50,Q[2]=54,X.FileIndex.push({name:r1,type:2,content:Q,size:4,L:69,R:69,C:69}),X.FullPaths.push(X.FullPaths[0]+r1),A(X)}}function A(X,r1){z(X);for(var Q=!1,e1=!1,c1=X.FullPaths.length-1;c1>=0;--c1){var i1=X.FileIndex[c1];switch(i1.type){case 0:e1?Q=!0:(X.FileIndex.pop(),X.FullPaths.pop());break;case 1:case 2:case 5:e1=!0,isNaN(i1.R*i1.L*i1.C)&&(Q=!0),i1.R>-1&&i1.L>-1&&i1.R==i1.L&&(Q=!0);break;default:Q=!0;break}}if(!(!Q&&!r1)){var C1=new Date(1987,1,19),M1=0,D=Object.create?Object.create(null):{},I=[];for(c1=0;c1<X.FullPaths.length;++c1)D[X.FullPaths[c1]]=!0,X.FileIndex[c1].type!==0&&I.push([X.FullPaths[c1],X.FileIndex[c1]]);for(c1=0;c1<I.length;++c1){var P=r(I[c1][0]);e1=D[P],e1||(I.push([P,{name:n(P).replace("/",""),type:1,clsid:O,ct:C1,mt:C1,content:null}]),D[P]=!0)}for(I.sort(function(o1,s1){return a(o1[0],s1[0])}),X.FullPaths=[],X.FileIndex=[],c1=0;c1<I.length;++c1)X.FullPaths[c1]=I[c1][0],X.FileIndex[c1]=I[c1][1];for(c1=0;c1<I.length;++c1){var K=X.FileIndex[c1],Z=X.FullPaths[c1];if(K.name=n(Z).replace("/",""),K.L=K.R=K.C=-(K.color=1),K.size=K.content?K.content.length:0,K.start=0,K.clsid=K.clsid||O,c1===0)K.C=I.length>1?1:-1,K.size=0,K.type=5;else if(Z.slice(-1)=="/"){for(M1=c1+1;M1<I.length&&r(X.FullPaths[M1])!=Z;++M1);for(K.C=M1>=I.length?-1:M1,M1=c1+1;M1<I.length&&r(X.FullPaths[M1])!=r(Z);++M1);K.R=M1>=I.length?-1:M1,K.type=1}else r(X.FullPaths[c1+1]||"")==r(Z)&&(K.R=c1+1),K.type=2}}}function V(X,r1){var Q=r1||{};if(Q.fileType=="mad")return M0(X,Q);switch(A(X),Q.fileType){case"zip":return we(X,Q)}var e1=function(o1){for(var s1=0,x1=0,V1=0;V1<o1.FileIndex.length;++V1){var L1=o1.FileIndex[V1];if(L1.content){var w1=L1.content.length;w1>0&&(w1<4096?s1+=w1+63>>6:x1+=w1+511>>9)}}for(var N1=o1.FullPaths.length+3>>2,R1=s1+7>>3,J1=s1+127>>7,U1=R1+x1+N1+J1,i2=U1+127>>7,O2=i2<=109?0:Math.ceil((i2-109)/127);U1+i2+O2+127>>7>i2;)O2=++i2<=109?0:Math.ceil((i2-109)/127);var fe=[1,O2,i2,J1,N1,x1,s1,0];return o1.FileIndex[0].size=s1<<6,fe[7]=(o1.FileIndex[0].start=fe[0]+fe[1]+fe[2]+fe[3]+fe[4]+fe[5])+(fe[6]+7>>3),fe}(X),c1=_e(e1[7]<<9),i1=0,C1=0;{for(i1=0;i1<8;++i1)c1.write_shift(1,S[i1]);for(i1=0;i1<8;++i1)c1.write_shift(2,0);for(c1.write_shift(2,62),c1.write_shift(2,3),c1.write_shift(2,65534),c1.write_shift(2,9),c1.write_shift(2,6),i1=0;i1<3;++i1)c1.write_shift(2,0);for(c1.write_shift(4,0),c1.write_shift(4,e1[2]),c1.write_shift(4,e1[0]+e1[1]+e1[2]+e1[3]-1),c1.write_shift(4,0),c1.write_shift(4,4096),c1.write_shift(4,e1[3]?e1[0]+e1[1]+e1[2]-1:N),c1.write_shift(4,e1[3]),c1.write_shift(-4,e1[1]?e1[0]-1:N),c1.write_shift(4,e1[1]),i1=0;i1<109;++i1)c1.write_shift(-4,i1<e1[2]?e1[1]+i1:-1)}if(e1[1])for(C1=0;C1<e1[1];++C1){for(;i1<236+C1*127;++i1)c1.write_shift(-4,i1<e1[2]?e1[1]+i1:-1);c1.write_shift(-4,C1===e1[1]-1?N:C1+1)}var M1=function(o1){for(C1+=o1;i1<C1-1;++i1)c1.write_shift(-4,i1+1);o1&&(++i1,c1.write_shift(-4,N))};for(C1=i1=0,C1+=e1[1];i1<C1;++i1)c1.write_shift(-4,U.DIFSECT);for(C1+=e1[2];i1<C1;++i1)c1.write_shift(-4,U.FATSECT);M1(e1[3]),M1(e1[4]);for(var D=0,I=0,P=X.FileIndex[0];D<X.FileIndex.length;++D)P=X.FileIndex[D],P.content&&(I=P.content.length,!(I<4096)&&(P.start=C1,M1(I+511>>9)));for(M1(e1[6]+7>>3);c1.l&511;)c1.write_shift(-4,U.ENDOFCHAIN);for(C1=i1=0,D=0;D<X.FileIndex.length;++D)P=X.FileIndex[D],P.content&&(I=P.content.length,!(!I||I>=4096)&&(P.start=C1,M1(I+63>>6)));for(;c1.l&511;)c1.write_shift(-4,U.ENDOFCHAIN);for(i1=0;i1<e1[4]<<2;++i1){var K=X.FullPaths[i1];if(!K||K.length===0){for(D=0;D<17;++D)c1.write_shift(4,0);for(D=0;D<3;++D)c1.write_shift(4,-1);for(D=0;D<12;++D)c1.write_shift(4,0);continue}P=X.FileIndex[i1],i1===0&&(P.start=P.size?P.start-1:N);var Z=i1===0&&Q.root||P.name;if(I=2*(Z.length+1),c1.write_shift(64,Z,"utf16le"),c1.write_shift(2,I),c1.write_shift(1,P.type),c1.write_shift(1,P.color),c1.write_shift(-4,P.L),c1.write_shift(-4,P.R),c1.write_shift(-4,P.C),P.clsid)c1.write_shift(16,P.clsid,"hex");else for(D=0;D<4;++D)c1.write_shift(4,0);c1.write_shift(4,P.state||0),c1.write_shift(4,0),c1.write_shift(4,0),c1.write_shift(4,0),c1.write_shift(4,0),c1.write_shift(4,P.start),c1.write_shift(4,P.size),c1.write_shift(4,0)}for(i1=1;i1<X.FileIndex.length;++i1)if(P=X.FileIndex[i1],P.size>=4096)if(c1.l=P.start+1<<9,h2&&Buffer.isBuffer(P.content))P.content.copy(c1,c1.l,0,P.size),c1.l+=P.size+511&-512;else{for(D=0;D<P.size;++D)c1.write_shift(1,P.content[D]);for(;D&511;++D)c1.write_shift(1,0)}for(i1=1;i1<X.FileIndex.length;++i1)if(P=X.FileIndex[i1],P.size>0&&P.size<4096)if(h2&&Buffer.isBuffer(P.content))P.content.copy(c1,c1.l,0,P.size),c1.l+=P.size+63&-64;else{for(D=0;D<P.size;++D)c1.write_shift(1,P.content[D]);for(;D&63;++D)c1.write_shift(1,0)}if(h2)c1.l=c1.length;else for(;c1.l<c1.length;)c1.write_shift(1,0);return c1}function k(X,r1){var Q=X.FullPaths.map(function(D){return D.toUpperCase()}),e1=Q.map(function(D){var I=D.split("/");return I[I.length-(D.slice(-1)=="/"?2:1)]}),c1=!1;r1.charCodeAt(0)===47?(c1=!0,r1=Q[0].slice(0,-1)+r1):c1=r1.indexOf("/")!==-1;var i1=r1.toUpperCase(),C1=c1===!0?Q.indexOf(i1):e1.indexOf(i1);if(C1!==-1)return X.FileIndex[C1];var M1=!i1.match(Qa);for(i1=i1.replace(l3,""),M1&&(i1=i1.replace(Qa,"!")),C1=0;C1<Q.length;++C1)if((M1?Q[C1].replace(Qa,"!"):Q[C1]).replace(l3,"")==i1||(M1?e1[C1].replace(Qa,"!"):e1[C1]).replace(l3,"")==i1)return X.FileIndex[C1];return null}var _=64,N=-2,q="d0cf11e0a1b11ae1",S=[208,207,17,224,161,177,26,225],O="00000000000000000000000000000000",U={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:N,FREESECT:-1,HEADER_SIGNATURE:q,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:O,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function J(X,r1,Q){f();var e1=V(X,Q);l.writeFileSync(r1,e1)}function Y(X){for(var r1=new Array(X.length),Q=0;Q<X.length;++Q)r1[Q]=String.fromCharCode(X[Q]);return r1.join("")}function G(X,r1){var Q=V(X,r1);switch(r1&&r1.type||"buffer"){case"file":return f(),l.writeFileSync(r1.filename,Q),Q;case"binary":return typeof Q=="string"?Q:Y(Q);case"base64":return fm(typeof Q=="string"?Q:Y(Q));case"buffer":if(h2)return Buffer.isBuffer(Q)?Q:g6(Q);case"array":return typeof Q=="string"?t4(Q):Q}return Q}var B;function T(X){try{var r1=X.InflateRaw,Q=new r1;if(Q._processChunk(new Uint8Array([3,0]),Q._finishFlushFlag),Q.bytesRead)B=X;else throw new Error("zlib does not expose bytesRead")}catch(e1){console.error("cannot use native zlib: "+(e1.message||e1))}}function L(X,r1){if(!B)return S1(X,r1);var Q=B.InflateRaw,e1=new Q,c1=e1._processChunk(X.slice(X.l),e1._finishFlushFlag);return X.l+=e1.bytesRead,c1}function W(X){return B?B.deflateRawSync(X):O1(X)}var j=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],E=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],R=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];function a1(X){var r1=(X<<1|X<<11)&139536|(X<<5|X<<15)&558144;return(r1>>16|r1>>8|r1)&255}for(var n1=typeof Uint8Array<"u",t1=n1?new Uint8Array(256):[],d1=0;d1<256;++d1)t1[d1]=a1(d1);function F(X,r1){var Q=t1[X&255];return r1<=8?Q>>>8-r1:(Q=Q<<8|t1[X>>8&255],r1<=16?Q>>>16-r1:(Q=Q<<8|t1[X>>16&255],Q>>>24-r1))}function p1(X,r1){var Q=r1&7,e1=r1>>>3;return(X[e1]|(Q<=6?0:X[e1+1]<<8))>>>Q&3}function z1(X,r1){var Q=r1&7,e1=r1>>>3;return(X[e1]|(Q<=5?0:X[e1+1]<<8))>>>Q&7}function h1(X,r1){var Q=r1&7,e1=r1>>>3;return(X[e1]|(Q<=4?0:X[e1+1]<<8))>>>Q&15}function l1(X,r1){var Q=r1&7,e1=r1>>>3;return(X[e1]|(Q<=3?0:X[e1+1]<<8))>>>Q&31}function f1(X,r1){var Q=r1&7,e1=r1>>>3;return(X[e1]|(Q<=1?0:X[e1+1]<<8))>>>Q&127}function u1(X,r1,Q){var e1=r1&7,c1=r1>>>3,i1=(1<<Q)-1,C1=X[c1]>>>e1;return Q<8-e1||(C1|=X[c1+1]<<8-e1,Q<16-e1)||(C1|=X[c1+2]<<16-e1,Q<24-e1)||(C1|=X[c1+3]<<24-e1),C1&i1}function v1(X,r1,Q){var e1=r1&7,c1=r1>>>3;return e1<=5?X[c1]|=(Q&7)<<e1:(X[c1]|=Q<<e1&255,X[c1+1]=(Q&7)>>8-e1),r1+3}function k1(X,r1,Q){var e1=r1&7,c1=r1>>>3;return Q=(Q&1)<<e1,X[c1]|=Q,r1+1}function b1(X,r1,Q){var e1=r1&7,c1=r1>>>3;return Q<<=e1,X[c1]|=Q&255,Q>>>=8,X[c1+1]=Q,r1+8}function H1(X,r1,Q){var e1=r1&7,c1=r1>>>3;return Q<<=e1,X[c1]|=Q&255,Q>>>=8,X[c1+1]=Q&255,X[c1+2]=Q>>>8,r1+16}function F1(X,r1){var Q=X.length,e1=2*Q>r1?2*Q:r1+5,c1=0;if(Q>=r1)return X;if(h2){var i1=um(e1);if(X.copy)X.copy(i1);else for(;c1<X.length;++c1)i1[c1]=X[c1];return i1}else if(n1){var C1=new Uint8Array(e1);if(C1.set)C1.set(X);else for(;c1<Q;++c1)C1[c1]=X[c1];return C1}return X.length=e1,X}function $1(X){for(var r1=new Array(X),Q=0;Q<X;++Q)r1[Q]=0;return r1}function W1(X,r1,Q){var e1=1,c1=0,i1=0,C1=0,M1=0,D=X.length,I=n1?new Uint16Array(32):$1(32);for(i1=0;i1<32;++i1)I[i1]=0;for(i1=D;i1<Q;++i1)X[i1]=0;D=X.length;var P=n1?new Uint16Array(D):$1(D);for(i1=0;i1<D;++i1)I[c1=X[i1]]++,e1<c1&&(e1=c1),P[i1]=0;for(I[0]=0,i1=1;i1<=e1;++i1)I[i1+16]=M1=M1+I[i1-1]<<1;for(i1=0;i1<D;++i1)M1=X[i1],M1!=0&&(P[i1]=I[M1+16]++);var K=0;for(i1=0;i1<D;++i1)if(K=X[i1],K!=0)for(M1=F(P[i1],e1)>>e1-K,C1=(1<<e1+4-K)-1;C1>=0;--C1)r1[M1|C1<<K]=K&15|i1<<4;return e1}var K1=n1?new Uint16Array(512):$1(512),d2=n1?new Uint16Array(32):$1(32);if(!n1){for(var G1=0;G1<512;++G1)K1[G1]=0;for(G1=0;G1<32;++G1)d2[G1]=0}(function(){for(var X=[],r1=0;r1<32;r1++)X.push(5);W1(X,d2,32);var Q=[];for(r1=0;r1<=143;r1++)Q.push(8);for(;r1<=255;r1++)Q.push(9);for(;r1<=279;r1++)Q.push(7);for(;r1<=287;r1++)Q.push(8);W1(Q,K1,288)})();var j2=function(){for(var r1=n1?new Uint8Array(32768):[],Q=0,e1=0;Q<R.length-1;++Q)for(;e1<R[Q+1];++e1)r1[e1]=Q;for(;e1<32768;++e1)r1[e1]=29;var c1=n1?new Uint8Array(259):[];for(Q=0,e1=0;Q<E.length-1;++Q)for(;e1<E[Q+1];++e1)c1[e1]=Q;function i1(M1,D){for(var I=0;I<M1.length;){var P=Math.min(65535,M1.length-I),K=I+P==M1.length;for(D.write_shift(1,+K),D.write_shift(2,P),D.write_shift(2,~P&65535);P-- >0;)D[D.l++]=M1[I++]}return D.l}function C1(M1,D){for(var I=0,P=0,K=n1?new Uint16Array(32768):[];P<M1.length;){var Z=Math.min(65535,M1.length-P);if(Z<10){for(I=v1(D,I,+(P+Z==M1.length)),I&7&&(I+=8-(I&7)),D.l=I/8|0,D.write_shift(2,Z),D.write_shift(2,~Z&65535);Z-- >0;)D[D.l++]=M1[P++];I=D.l*8;continue}I=v1(D,I,+(P+Z==M1.length)+2);for(var o1=0;Z-- >0;){var s1=M1[P];o1=(o1<<5^s1)&32767;var x1=-1,V1=0;if((x1=K[o1])&&(x1|=P&-32768,x1>P&&(x1-=32768),x1<P))for(;M1[x1+V1]==M1[P+V1]&&V1<250;)++V1;if(V1>2){s1=c1[V1],s1<=22?I=b1(D,I,t1[s1+1]>>1)-1:(b1(D,I,3),I+=5,b1(D,I,t1[s1-23]>>5),I+=3);var L1=s1<8?0:s1-4>>2;L1>0&&(H1(D,I,V1-E[s1]),I+=L1),s1=r1[P-x1],I=b1(D,I,t1[s1]>>3),I-=3;var w1=s1<4?0:s1-2>>1;w1>0&&(H1(D,I,P-x1-R[s1]),I+=w1);for(var N1=0;N1<V1;++N1)K[o1]=P&32767,o1=(o1<<5^M1[P])&32767,++P;Z-=V1-1}else s1<=143?s1=s1+48:I=k1(D,I,1),I=b1(D,I,t1[s1]),K[o1]=P&32767,++P}I=b1(D,I,0)-1}return D.l=(I+7)/8|0,D.l}return function(D,I){return D.length<8?i1(D,I):C1(D,I)}}();function O1(X){var r1=_e(50+Math.floor(X.length*1.1)),Q=j2(X,r1);return r1.slice(0,Q)}var c2=n1?new Uint16Array(32768):$1(32768),Y2=n1?new Uint16Array(32768):$1(32768),m2=n1?new Uint16Array(128):$1(128),A2=1,Pe=1;function y1(X,r1){var Q=l1(X,r1)+257;r1+=5;var e1=l1(X,r1)+1;r1+=5;var c1=h1(X,r1)+4;r1+=4;for(var i1=0,C1=n1?new Uint8Array(19):$1(19),M1=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],D=1,I=n1?new Uint8Array(8):$1(8),P=n1?new Uint8Array(8):$1(8),K=C1.length,Z=0;Z<c1;++Z)C1[j[Z]]=i1=z1(X,r1),D<i1&&(D=i1),I[i1]++,r1+=3;var o1=0;for(I[0]=0,Z=1;Z<=D;++Z)P[Z]=o1=o1+I[Z-1]<<1;for(Z=0;Z<K;++Z)(o1=C1[Z])!=0&&(M1[Z]=P[o1]++);var s1=0;for(Z=0;Z<K;++Z)if(s1=C1[Z],s1!=0){o1=t1[M1[Z]]>>8-s1;for(var x1=(1<<7-s1)-1;x1>=0;--x1)m2[o1|x1<<s1]=s1&7|Z<<3}var V1=[];for(D=1;V1.length<Q+e1;)switch(o1=m2[f1(X,r1)],r1+=o1&7,o1>>>=3){case 16:for(i1=3+p1(X,r1),r1+=2,o1=V1[V1.length-1];i1-- >0;)V1.push(o1);break;case 17:for(i1=3+z1(X,r1),r1+=3;i1-- >0;)V1.push(0);break;case 18:for(i1=11+f1(X,r1),r1+=7;i1-- >0;)V1.push(0);break;default:V1.push(o1),D<o1&&(D=o1);break}var L1=V1.slice(0,Q),w1=V1.slice(Q);for(Z=Q;Z<286;++Z)L1[Z]=0;for(Z=e1;Z<30;++Z)w1[Z]=0;return A2=W1(L1,c2,286),Pe=W1(w1,Y2,30),r1}function m1(X,r1){if(X[0]==3&&!(X[1]&3))return[m0(r1),2];for(var Q=0,e1=0,c1=um(r1||1<<18),i1=0,C1=c1.length>>>0,M1=0,D=0;!(e1&1);){if(e1=z1(X,Q),Q+=3,e1>>>1)e1>>1==1?(M1=9,D=5):(Q=y1(X,Q),M1=A2,D=Pe);else{Q&7&&(Q+=8-(Q&7));var I=X[Q>>>3]|X[(Q>>>3)+1]<<8;if(Q+=32,I>0)for(!r1&&C1<i1+I&&(c1=F1(c1,i1+I),C1=c1.length);I-- >0;)c1[i1++]=X[Q>>>3],Q+=8;continue}for(;;){!r1&&C1<i1+32767&&(c1=F1(c1,i1+32767),C1=c1.length);var P=u1(X,Q,M1),K=e1>>>1==1?K1[P]:c2[P];if(Q+=K&15,K>>>=4,!(K>>>8&255))c1[i1++]=K;else{if(K==256)break;K-=257;var Z=K<8?0:K-4>>2;Z>5&&(Z=0);var o1=i1+E[K];Z>0&&(o1+=u1(X,Q,Z),Q+=Z),P=u1(X,Q,D),K=e1>>>1==1?d2[P]:Y2[P],Q+=K&15,K>>>=4;var s1=K<4?0:K-2>>1,x1=R[K];for(s1>0&&(x1+=u1(X,Q,s1),Q+=s1),!r1&&C1<o1&&(c1=F1(c1,o1+100),C1=c1.length);i1<o1;)c1[i1]=c1[i1-x1],++i1}}}return r1?[c1,Q+7>>>3]:[c1.slice(0,i1),Q+7>>>3]}function S1(X,r1){var Q=X.slice(X.l||0),e1=m1(Q,r1);return X.l+=e1[1],e1[0]}function T1(X,r1){if(X)typeof console<"u"&&console.error(r1);else throw new Error(r1)}function Q1(X,r1){var Q=X;Be(Q,0);var e1=[],c1=[],i1={FileIndex:e1,FullPaths:c1};z(i1,{root:r1.root});for(var C1=Q.length-4;(Q[C1]!=80||Q[C1+1]!=75||Q[C1+2]!=5||Q[C1+3]!=6)&&C1>=0;)--C1;Q.l=C1+4,Q.l+=4;var M1=Q.read_shift(2);Q.l+=6;var D=Q.read_shift(4);for(Q.l=D,C1=0;C1<M1;++C1){Q.l+=20;var I=Q.read_shift(4),P=Q.read_shift(4),K=Q.read_shift(2),Z=Q.read_shift(2),o1=Q.read_shift(2);Q.l+=8;var s1=Q.read_shift(4),x1=s(Q.slice(Q.l+K,Q.l+K+Z));Q.l+=K+Z+o1;var V1=Q.l;Q.l=s1+4,Q2(Q,I,P,i1,x1),Q.l=V1}return i1}function Q2(X,r1,Q,e1,c1){X.l+=2;var i1=X.read_shift(2),C1=X.read_shift(2),M1=i(X);if(i1&8257)throw new Error("Unsupported ZIP encryption");for(var D=X.read_shift(4),I=X.read_shift(4),P=X.read_shift(4),K=X.read_shift(2),Z=X.read_shift(2),o1="",s1=0;s1<K;++s1)o1+=String.fromCharCode(X[X.l++]);if(Z){var x1=s(X.slice(X.l,X.l+Z));(x1[21589]||{}).mt&&(M1=x1[21589].mt),((c1||{})[21589]||{}).mt&&(M1=c1[21589].mt)}X.l+=Z;var V1=X.slice(X.l,X.l+I);switch(C1){case 8:V1=L(X,P);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+C1)}var L1=!1;i1&8&&(D=X.read_shift(4),D==134695760&&(D=X.read_shift(4),L1=!0),I=X.read_shift(4),P=X.read_shift(4)),I!=r1&&T1(L1,"Bad compressed size: "+r1+" != "+I),P!=Q&&T1(L1,"Bad uncompressed size: "+Q+" != "+P),T3(e1,o1,V1,{unsafe:!0,mt:M1})}function we(X,r1){var Q=r1||{},e1=[],c1=[],i1=_e(1),C1=Q.compression?8:0,M1=0,D=0,I=0,P=0,K=0,Z=X.FullPaths[0],o1=Z,s1=X.FileIndex[0],x1=[],V1=0;for(D=1;D<X.FullPaths.length;++D)if(o1=X.FullPaths[D].slice(Z.length),s1=X.FileIndex[D],!(!s1.size||!s1.content||o1=="Sh33tJ5")){var L1=P,w1=_e(o1.length);for(I=0;I<o1.length;++I)w1.write_shift(1,o1.charCodeAt(I)&127);w1=w1.slice(0,w1.l),x1[K]=it1.buf(s1.content,0);var N1=s1.content;C1==8&&(N1=W(N1)),i1=_e(30),i1.write_shift(4,67324752),i1.write_shift(2,20),i1.write_shift(2,M1),i1.write_shift(2,C1),s1.mt?c(i1,s1.mt):i1.write_shift(4,0),i1.write_shift(-4,x1[K]),i1.write_shift(4,N1.length),i1.write_shift(4,s1.content.length),i1.write_shift(2,w1.length),i1.write_shift(2,0),P+=i1.length,e1.push(i1),P+=w1.length,e1.push(w1),P+=N1.length,e1.push(N1),i1=_e(46),i1.write_shift(4,33639248),i1.write_shift(2,0),i1.write_shift(2,20),i1.write_shift(2,M1),i1.write_shift(2,C1),i1.write_shift(4,0),i1.write_shift(-4,x1[K]),i1.write_shift(4,N1.length),i1.write_shift(4,s1.content.length),i1.write_shift(2,w1.length),i1.write_shift(2,0),i1.write_shift(2,0),i1.write_shift(2,0),i1.write_shift(2,0),i1.write_shift(4,0),i1.write_shift(4,L1),V1+=i1.l,c1.push(i1),V1+=w1.length,c1.push(w1),++K}return i1=_e(22),i1.write_shift(4,101010256),i1.write_shift(2,0),i1.write_shift(2,0),i1.write_shift(2,K),i1.write_shift(2,K),i1.write_shift(4,V1),i1.write_shift(4,P),i1.write_shift(2,0),$t([$t(e1),$t(c1),i1])}var d3={htm:"text/html",xml:"text/xml",gif:"image/gif",jpg:"image/jpeg",png:"image/png",mso:"application/x-mso",thmx:"application/vnd.ms-officetheme",sh33tj5:"application/octet-stream"};function j3(X,r1){if(X.ctype)return X.ctype;var Q=X.name||"",e1=Q.match(/\.([^\.]+)$/);return e1&&d3[e1[1]]||r1&&(e1=(Q=r1).match(/[\.\\]([^\.\\])+$/),e1&&d3[e1[1]])?d3[e1[1]]:"application/octet-stream"}function k2(X){for(var r1=fm(X),Q=[],e1=0;e1<r1.length;e1+=76)Q.push(r1.slice(e1,e1+76));return Q.join(`\r
837
837
  `)+`\r
838
838
  `}function xe(X){var r1=X.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF=]/g,function(I){var P=I.charCodeAt(0).toString(16).toUpperCase();return"="+(P.length==1?"0"+P:P)});r1=r1.replace(/ $/mg,"=20").replace(/\t$/mg,"=09"),r1.charAt(0)==`
839
839
  `&&(r1="=0D"+r1.slice(1)),r1=r1.replace(/\r(?!\n)/mg,"=0D").replace(/\n\n/mg,`
@@ -875,4 +875,4 @@ A valid view must be one of: ${Ru.join(", ")}.`),e="week"),this.enabledViews.inc
875
875
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...a){const r=new this(t);return a.forEach(n=>r.set(n)),r}static accessor(t){const r=(this[gp]=this[gp]={accessors:{}}).accessors,n=this.prototype;function c(i){const s=Ia(i);r[s]||(Tj1(n,i),r[s]=!0)}return _1.isArray(t)?t.forEach(c):c(t),this}}hi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);_1.reduceDescriptors(hi.prototype,({value:e},t)=>{let a=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[a]=r}}});_1.freezeMethods(hi);const d4=hi;function _s(e,t){const a=this||Mf,r=t||a,n=d4.from(r.headers);let c=r.data;return _1.forEach(e,function(s){c=s.call(a,c,n.normalize(),t?t.status:void 0)}),n.normalize(),c}function ZA(e){return!!(e&&e.__CANCEL__)}function ba(e,t,a){t2.call(this,e??"canceled",t2.ERR_CANCELED,t,a),this.name="CanceledError"}_1.inherits(ba,t2,{__CANCEL__:!0});function QA(e,t,a){const r=a.config.validateStatus;!a.status||!r||r(a.status)?e(a):t(new t2("Request failed with status code "+a.status,[t2.ERR_BAD_REQUEST,t2.ERR_BAD_RESPONSE][Math.floor(a.status/100)-4],a.config,a.request,a))}function Ej1(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Nj1(e,t){e=e||10;const a=new Array(e),r=new Array(e);let n=0,c=0,i;return t=t!==void 0?t:1e3,function(l){const f=Date.now(),u=r[c];i||(i=f),a[n]=l,r[n]=f;let d=c,h=0;for(;d!==n;)h+=a[d++],d=d%e;if(n=(n+1)%e,n===c&&(c=(c+1)%e),f-i<t)return;const m=u&&f-u;return m?Math.round(h*1e3/m):void 0}}function Dj1(e,t){let a=0,r=1e3/t,n,c;const i=(f,u=Date.now())=>{a=u,n=null,c&&(clearTimeout(c),c=null),e.apply(null,f)};return[(...f)=>{const u=Date.now(),d=u-a;d>=r?i(f,u):(n=f,c||(c=setTimeout(()=>{c=null,i(n)},r-d)))},()=>n&&i(n)]}const Jc=(e,t,a=3)=>{let r=0;const n=Nj1(50,250);return Dj1(c=>{const i=c.loaded,s=c.lengthComputable?c.total:void 0,l=i-r,f=n(l),u=i<=s;r=i;const d={loaded:i,total:s,progress:s?i/s:void 0,bytes:l,rate:f||void 0,estimated:f&&s&&u?(s-i)/f:void 0,event:c,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(d)},a)},yp=(e,t)=>{const a=e!=null;return[r=>t[0]({lengthComputable:a,total:e,loaded:r}),t[1]]},xp=e=>(...t)=>_1.asap(()=>e(...t)),Oj1=Ke.hasStandardBrowserEnv?((e,t)=>a=>(a=new URL(a,Ke.origin),e.protocol===a.protocol&&e.host===a.host&&(t||e.port===a.port)))(new URL(Ke.origin),Ke.navigator&&/(msie|trident)/i.test(Ke.navigator.userAgent)):()=>!0,Pj1=Ke.hasStandardBrowserEnv?{write(e,t,a,r,n,c){const i=[e+"="+encodeURIComponent(t)];_1.isNumber(a)&&i.push("expires="+new Date(a).toGMTString()),_1.isString(r)&&i.push("path="+r),_1.isString(n)&&i.push("domain="+n),c===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Bj1(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Fj1(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function JA(e,t){return e&&!Bj1(t)?Fj1(e,t):t}const bp=e=>e instanceof d4?{...e}:e;function l6(e,t){t=t||{};const a={};function r(f,u,d,h){return _1.isPlainObject(f)&&_1.isPlainObject(u)?_1.merge.call({caseless:h},f,u):_1.isPlainObject(u)?_1.merge({},u):_1.isArray(u)?u.slice():u}function n(f,u,d,h){if(_1.isUndefined(u)){if(!_1.isUndefined(f))return r(void 0,f,d,h)}else return r(f,u,d,h)}function c(f,u){if(!_1.isUndefined(u))return r(void 0,u)}function i(f,u){if(_1.isUndefined(u)){if(!_1.isUndefined(f))return r(void 0,f)}else return r(void 0,u)}function s(f,u,d){if(d in t)return r(f,u);if(d in e)return r(void 0,f)}const l={url:c,method:c,data:c,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:s,headers:(f,u,d)=>n(bp(f),bp(u),d,!0)};return _1.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=l[u]||n,h=d(e[u],t[u],u);_1.isUndefined(h)&&d!==s||(a[u]=h)}),a}const eT=e=>{const t=l6({},e);let{data:a,withXSRFToken:r,xsrfHeaderName:n,xsrfCookieName:c,headers:i,auth:s}=t;t.headers=i=d4.from(i),t.url=GA(JA(t.baseURL,t.url),e.params,e.paramsSerializer),s&&i.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let l;if(_1.isFormData(a)){if(Ke.hasStandardBrowserEnv||Ke.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((l=i.getContentType())!==!1){const[f,...u]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];i.setContentType([f||"multipart/form-data",...u].join("; "))}}if(Ke.hasStandardBrowserEnv&&(r&&_1.isFunction(r)&&(r=r(t)),r||r!==!1&&Oj1(t.url))){const f=n&&c&&Pj1.read(c);f&&i.set(n,f)}return t},Rj1=typeof XMLHttpRequest<"u",Ij1=Rj1&&function(e){return new Promise(function(a,r){const n=eT(e);let c=n.data;const i=d4.from(n.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:f}=n,u,d,h,m,v;function p(){m&&m(),v&&v(),n.cancelToken&&n.cancelToken.unsubscribe(u),n.signal&&n.signal.removeEventListener("abort",u)}let g=new XMLHttpRequest;g.open(n.method.toUpperCase(),n.url,!0),g.timeout=n.timeout;function y(){if(!g)return;const C=d4.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),M={data:!s||s==="text"||s==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:C,config:e,request:g};QA(function(z){a(z),p()},function(z){r(z),p()},M),g=null}"onloadend"in g?g.onloadend=y:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(y)},g.onabort=function(){g&&(r(new t2("Request aborted",t2.ECONNABORTED,e,g)),g=null)},g.onerror=function(){r(new t2("Network Error",t2.ERR_NETWORK,e,g)),g=null},g.ontimeout=function(){let b=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const M=n.transitional||XA;n.timeoutErrorMessage&&(b=n.timeoutErrorMessage),r(new t2(b,M.clarifyTimeoutError?t2.ETIMEDOUT:t2.ECONNABORTED,e,g)),g=null},c===void 0&&i.setContentType(null),"setRequestHeader"in g&&_1.forEach(i.toJSON(),function(b,M){g.setRequestHeader(M,b)}),_1.isUndefined(n.withCredentials)||(g.withCredentials=!!n.withCredentials),s&&s!=="json"&&(g.responseType=n.responseType),f&&([h,v]=Jc(f,!0),g.addEventListener("progress",h)),l&&g.upload&&([d,m]=Jc(l),g.upload.addEventListener("progress",d),g.upload.addEventListener("loadend",m)),(n.cancelToken||n.signal)&&(u=C=>{g&&(r(!C||C.type?new ba(null,e,g):C),g.abort(),g=null)},n.cancelToken&&n.cancelToken.subscribe(u),n.signal&&(n.signal.aborted?u():n.signal.addEventListener("abort",u)));const x=Ej1(n.url);if(x&&Ke.protocols.indexOf(x)===-1){r(new t2("Unsupported protocol "+x+":",t2.ERR_BAD_REQUEST,e));return}g.send(c||null)})},$j1=(e,t)=>{const{length:a}=e=e?e.filter(Boolean):[];if(t||a){let r=new AbortController,n;const c=function(f){if(!n){n=!0,s();const u=f instanceof Error?f:this.reason;r.abort(u instanceof t2?u:new ba(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,c(new t2(`timeout ${t} of ms exceeded`,t2.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(c):f.removeEventListener("abort",c)}),e=null)};e.forEach(f=>f.addEventListener("abort",c));const{signal:l}=r;return l.unsubscribe=()=>_1.asap(s),l}},Uj1=$j1,Wj1=function*(e,t){let a=e.byteLength;if(!t||a<t){yield e;return}let r=0,n;for(;r<a;)n=r+t,yield e.slice(r,n),r=n},qj1=async function*(e,t){for await(const a of jj1(e))yield*Wj1(a,t)},jj1=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:a,value:r}=await t.read();if(a)break;yield r}}finally{await t.cancel()}},Cp=(e,t,a,r)=>{const n=qj1(e,t);let c=0,i,s=l=>{i||(i=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:f,value:u}=await n.next();if(f){s(),l.close();return}let d=u.byteLength;if(a){let h=c+=d;a(h)}l.enqueue(new Uint8Array(u))}catch(f){throw s(f),f}},cancel(l){return s(l),n.return()}},{highWaterMark:2})},mi=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",tT=mi&&typeof ReadableStream=="function",Yj1=mi&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),aT=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Gj1=tT&&aT(()=>{let e=!1;const t=new Request(Ke.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Mp=64*1024,J7=tT&&aT(()=>_1.isReadableStream(new Response("").body)),e5={stream:J7&&(e=>e.body)};mi&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!e5[t]&&(e5[t]=_1.isFunction(e[t])?a=>a[t]():(a,r)=>{throw new t2(`Response type '${t}' is not supported`,t2.ERR_NOT_SUPPORT,r)})})})(new Response);const Xj1=async e=>{if(e==null)return 0;if(_1.isBlob(e))return e.size;if(_1.isSpecCompliantForm(e))return(await new Request(Ke.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(_1.isArrayBufferView(e)||_1.isArrayBuffer(e))return e.byteLength;if(_1.isURLSearchParams(e)&&(e=e+""),_1.isString(e))return(await Yj1(e)).byteLength},Kj1=async(e,t)=>{const a=_1.toFiniteNumber(e.getContentLength());return a??Xj1(t)},Zj1=mi&&(async e=>{let{url:t,method:a,data:r,signal:n,cancelToken:c,timeout:i,onDownloadProgress:s,onUploadProgress:l,responseType:f,headers:u,withCredentials:d="same-origin",fetchOptions:h}=eT(e);f=f?(f+"").toLowerCase():"text";let m=Uj1([n,c&&c.toAbortSignal()],i),v;const p=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let g;try{if(l&&Gj1&&a!=="get"&&a!=="head"&&(g=await Kj1(u,r))!==0){let M=new Request(t,{method:"POST",body:r,duplex:"half"}),w;if(_1.isFormData(r)&&(w=M.headers.get("content-type"))&&u.setContentType(w),M.body){const[z,H]=yp(g,Jc(xp(l)));r=Cp(M.body,Mp,z,H)}}_1.isString(d)||(d=d?"include":"omit");const y="credentials"in Request.prototype;v=new Request(t,{...h,signal:m,method:a.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:y?d:void 0});let x=await fetch(v);const C=J7&&(f==="stream"||f==="response");if(J7&&(s||C&&p)){const M={};["status","statusText","headers"].forEach(A=>{M[A]=x[A]});const w=_1.toFiniteNumber(x.headers.get("content-length")),[z,H]=s&&yp(w,Jc(xp(s),!0))||[];x=new Response(Cp(x.body,Mp,z,()=>{H&&H(),p&&p()}),M)}f=f||"text";let b=await e5[_1.findKey(e5,f)||"text"](x,e);return!C&&p&&p(),await new Promise((M,w)=>{QA(M,w,{data:b,headers:d4.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:v})})}catch(y){throw p&&p(),y&&y.name==="TypeError"&&/fetch/i.test(y.message)?Object.assign(new t2("Network Error",t2.ERR_NETWORK,e,v),{cause:y.cause||y}):t2.from(y,y&&y.code,e,v)}}),eo={http:fj1,xhr:Ij1,fetch:Zj1};_1.forEach(eo,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const zp=e=>`- ${e}`,Qj1=e=>_1.isFunction(e)||e===null||e===!1,rT={getAdapter:e=>{e=_1.isArray(e)?e:[e];const{length:t}=e;let a,r;const n={};for(let c=0;c<t;c++){a=e[c];let i;if(r=a,!Qj1(a)&&(r=eo[(i=String(a)).toLowerCase()],r===void 0))throw new t2(`Unknown adapter '${i}'`);if(r)break;n[i||"#"+c]=r}if(!r){const c=Object.entries(n).map(([s,l])=>`adapter ${s} `+(l===!1?"is not supported by the environment":"is not available in the build"));let i=t?c.length>1?`since :
876
876
  `+c.map(zp).join(`
877
877
  `):" "+zp(c[0]):"as no adapter specified";throw new t2("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:eo};function ks(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ba(null,e)}function wp(e){return ks(e),e.headers=d4.from(e.headers),e.data=_s.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),rT.getAdapter(e.adapter||Mf.adapter)(e).then(function(r){return ks(e),r.data=_s.call(e,e.transformResponse,r),r.headers=d4.from(r.headers),r},function(r){return ZA(r)||(ks(e),r&&r.response&&(r.response.data=_s.call(e,e.transformResponse,r.response),r.response.headers=d4.from(r.response.headers))),Promise.reject(r)})}const nT="1.7.8",pi={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{pi[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const _p={};pi.transitional=function(t,a,r){function n(c,i){return"[Axios v"+nT+"] Transitional option '"+c+"'"+i+(r?". "+r:"")}return(c,i,s)=>{if(t===!1)throw new t2(n(i," has been removed"+(a?" in "+a:"")),t2.ERR_DEPRECATED);return a&&!_p[i]&&(_p[i]=!0,console.warn(n(i," has been deprecated since v"+a+" and will be removed in the near future"))),t?t(c,i,s):!0}};pi.spelling=function(t){return(a,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Jj1(e,t,a){if(typeof e!="object")throw new t2("options must be an object",t2.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let n=r.length;for(;n-- >0;){const c=r[n],i=t[c];if(i){const s=e[c],l=s===void 0||i(s,c,e);if(l!==!0)throw new t2("option "+c+" must be "+l,t2.ERR_BAD_OPTION_VALUE);continue}if(a!==!0)throw new t2("Unknown option "+c,t2.ERR_BAD_OPTION)}}const rc={assertOptions:Jj1,validators:pi},z4=rc.validators;class t5{constructor(t){this.defaults=t,this.interceptors={request:new vp,response:new vp}}async request(t,a){try{return await this._request(t,a)}catch(r){if(r instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;const c=n.stack?n.stack.replace(/^.+\n/,""):"";try{r.stack?c&&!String(r.stack).endsWith(c.replace(/^.+\n.+\n/,""))&&(r.stack+=`
878
- `+c):r.stack=c}catch{}}throw r}}_request(t,a){typeof t=="string"?(a=a||{},a.url=t):a=t||{},a=l6(this.defaults,a);const{transitional:r,paramsSerializer:n,headers:c}=a;r!==void 0&&rc.assertOptions(r,{silentJSONParsing:z4.transitional(z4.boolean),forcedJSONParsing:z4.transitional(z4.boolean),clarifyTimeoutError:z4.transitional(z4.boolean)},!1),n!=null&&(_1.isFunction(n)?a.paramsSerializer={serialize:n}:rc.assertOptions(n,{encode:z4.function,serialize:z4.function},!0)),rc.assertOptions(a,{baseUrl:z4.spelling("baseURL"),withXsrfToken:z4.spelling("withXSRFToken")},!0),a.method=(a.method||this.defaults.method||"get").toLowerCase();let i=c&&_1.merge(c.common,c[a.method]);c&&_1.forEach(["delete","get","head","post","put","patch","common"],v=>{delete c[v]}),a.headers=d4.concat(i,c);const s=[];let l=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(a)===!1||(l=l&&p.synchronous,s.unshift(p.fulfilled,p.rejected))});const f=[];this.interceptors.response.forEach(function(p){f.push(p.fulfilled,p.rejected)});let u,d=0,h;if(!l){const v=[wp.bind(this),void 0];for(v.unshift.apply(v,s),v.push.apply(v,f),h=v.length,u=Promise.resolve(a);d<h;)u=u.then(v[d++],v[d++]);return u}h=s.length;let m=a;for(d=0;d<h;){const v=s[d++],p=s[d++];try{m=v(m)}catch(g){p.call(this,g);break}}try{u=wp.call(this,m)}catch(v){return Promise.reject(v)}for(d=0,h=f.length;d<h;)u=u.then(f[d++],f[d++]);return u}getUri(t){t=l6(this.defaults,t);const a=JA(t.baseURL,t.url);return GA(a,t.params,t.paramsSerializer)}}_1.forEach(["delete","get","head","options"],function(t){t5.prototype[t]=function(a,r){return this.request(l6(r||{},{method:t,url:a,data:(r||{}).data}))}});_1.forEach(["post","put","patch"],function(t){function a(r){return function(c,i,s){return this.request(l6(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:c,data:i}))}}t5.prototype[t]=a(),t5.prototype[t+"Form"]=a(!0)});const nc=t5;class zf{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let a;this.promise=new Promise(function(c){a=c});const r=this;this.promise.then(n=>{if(!r._listeners)return;let c=r._listeners.length;for(;c-- >0;)r._listeners[c](n);r._listeners=null}),this.promise.then=n=>{let c;const i=new Promise(s=>{r.subscribe(s),c=s}).then(n);return i.cancel=function(){r.unsubscribe(c)},i},t(function(c,i,s){r.reason||(r.reason=new ba(c,i,s),a(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const a=this._listeners.indexOf(t);a!==-1&&this._listeners.splice(a,1)}toAbortSignal(){const t=new AbortController,a=r=>{t.abort(r)};return this.subscribe(a),t.signal.unsubscribe=()=>this.unsubscribe(a),t.signal}static source(){let t;return{token:new zf(function(n){t=n}),cancel:t}}}const eY1=zf;function tY1(e){return function(a){return e.apply(null,a)}}function aY1(e){return _1.isObject(e)&&e.isAxiosError===!0}const to={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(to).forEach(([e,t])=>{to[t]=e});const rY1=to;function cT(e){const t=new nc(e),a=OA(nc.prototype.request,t);return _1.extend(a,nc.prototype,t,{allOwnKeys:!0}),_1.extend(a,t,null,{allOwnKeys:!0}),a.create=function(n){return cT(l6(e,n))},a}const ze=cT(Mf);ze.Axios=nc;ze.CanceledError=ba;ze.CancelToken=eY1;ze.isCancel=ZA;ze.VERSION=nT;ze.toFormData=di;ze.AxiosError=t2;ze.Cancel=ze.CanceledError;ze.all=function(t){return Promise.all(t)};ze.spread=tY1;ze.isAxiosError=aY1;ze.mergeConfig=l6;ze.AxiosHeaders=d4;ze.formToJSON=e=>KA(_1.isHTMLForm(e)?new FormData(e):e);ze.getAdapter=rT.getAdapter;ze.HttpStatusCode=rY1;ze.default=ze;const $a=ze;function nY1(e,t,a,r){if(e==="get")return $a.get(t,{params:a,...r});if(e==="post")return $a.post(t,a,r);if(e==="put")return $a.put(t,a,r);if(e==="patch")return $a.patch(t,a,r);if(e==="delete")return $a.delete(t,{data:a,...r})}function cY1(e,t){return e?Array.isArray(t)?t.map(a=>new e(a)):new e(t):t}const Hs=_2("apiConnectionsError");function iY1(e){var r,n;const t=(n=(r=e.response)==null?void 0:r.data)==null?void 0:n.errorCode;if(!t){vt("danger",()=>Hs("INTERNAL_SERVER_ERROR"));return}const a=Z2.getConfig();if(a.i18n.apiConnectionsError(t)){vt("danger",()=>a.i18n.apiConnectionsError(t));return}Hs(t)&&vt("danger",()=>Hs(t))}const kp=_2("apiConnectionsSuccess");function sY1(e){const t=Z2.getConfig();if(t.i18n.apiConnectionsSuccess(e)){vt("success",()=>t.i18n.apiConnectionsSuccess(e));return}kp(e)&&vt("success",()=>kp(e))}function oY1(e){const t=new FormData;return Object.entries(e).forEach(([a,r])=>{Array.isArray(r)?r.forEach(n=>{t.append(a,n)}):t.append(a,r)}),t}function lY1(e){const t={language:h4().language};return e.basicAuth||(t.Authorization=`Bearer ${Tp()||""}`),{headers:t,auth:e.basicAuth}}async function Pt(e,t,a,r,n){var c;try{n!=null&&n.isLoadingRef&&!(n!=null&&n.preventSetIsLoadingRef)&&(n.isLoadingRef.value=!0);const i=(c=a.meta)!=null&&c.sendAsFormData?oY1(r):r,s=lY1({basicAuth:n==null?void 0:n.basicAuth}),l=Z2.getConfig().backendUrl,f=await nY1(e,`${l}/${t}`,i,s),u=cY1(a.response,f.data.data);return((n==null?void 0:n.displaySuccess)!==void 0?n.displaySuccess:e!=="get")&&sY1(f.data.successCode),n!=null&&n.success&&n.success(u,f.data.totalCount),{data:u,totalCount:f.data.totalCount}}catch(i){if(n!=null&&n.preventDisplayError||iY1(i),n!=null&&n.error&&n.error(i),n!=null&&n.preventThrowError)return{data:null,totalCount:void 0};throw i}finally{n!=null&&n.isLoadingRef&&(n.isLoadingRef.value=!1),n!=null&&n.finally&&n.finally()}}function Vs(e,t){return t?`${e}/${t}`:e}function S6(e,t){return e?Array.isArray(t)?t.map(a=>new e(a)):new e(t):t}function fY1(e){return{getOne(t,a,r,n){const c=e[t].getOne,i=Vs(t,a),s=S6(c.params,r);return Pt("get",i,c,s,n)},getMany(t,a,r){const n=e[t].getMany,c=S6(n.params,a);return Pt("get",t,n,c,r)},postOne(t,a,r){const n=e[t].postOne,c=S6(n.params,a);return Pt("post",t,n,c,r)},postMany(t,a,r){const n=e[t].postMany,c=S6(n.params,a);return Pt("post",t,n,c,r)},putOne(t,a,r,n){const c=e[t].putOne,i=Vs(t,a),s=S6(c.params,r);return Pt("put",i,c,s,n)},putMany(t,a,r){const n=e[t].putMany,c=S6(n.params,a);return Pt("put",t,n,c,r)},deleteOne(t,a,r){const n=e[t].deleteOne,c=Vs(t,a);return Pt("delete",c,n,void 0,r)},deleteMany(t,a,r){const n=e[t].deleteMany;return Pt("delete",t,n,a,r)}}}class vi{constructor(t){g1(this,"id",0);g1(this,"createdAt",new Date);g1(this,"updatedAt",new Date);vi.CopyFields(this,t)}static CopyFields(t,a,r){xn(t,a,r)}}class hn extends vi{constructor(a){super(a);g1(this,"username","");hn.CopyFields(this,a)}}class uY1{constructor(t){g1(this,"accessToken","");g1(this,"user",new hn);xn(this,t,{user:hn})}}class V3{constructor(t){V3.CopyFields(this,t)}static CopyFields(t,a,r){xn(t,a,r)}}class dY1 extends V3{constructor(a){super(a);g1(this,"page");g1(this,"pageSize");g1(this,"search");V3.CopyFields(this,a)}}class hY1 extends V3{constructor(t){super(t),V3.CopyFields(this,t)}}class mY1 extends V3{constructor(a){super(a);g1(this,"index",0);V3.CopyFields(this,a)}}class pY1 extends V3{constructor(a){super(a);g1(this,"image");V3.CopyFields(this,a)}}class vY1 extends V3{constructor(a){super(a);g1(this,"images");V3.CopyFields(this,a)}}class wf{constructor(t){wf.CopyFields(this,t)}static CopyFields(t,a,r){xn(t,a,r)}}function gY1(e,t,a){return a||{top:0}}async function yY1(e,t,a){if(t.name&&t.name===e.name){a();return}const r=Z2.getConfig().routerHelpers;if(!r.validateRouteAccess(e.meta.access)){a({name:r.getDefaultRouteName(e)});return}xY1(e),a(),CY1()}function xY1(e){$3().currentRoute=e,bY1(e.name)}function bY1(e){const t=$3().currentRouteType;document.title=`${Z2.getConfig().appName} - ${bn(t,e)}`}async function CY1(){const e=Z2.getConfig(),t=e.routerHelpers;if(await Np(),!t.validateRouteAccess($3().currentRouteAccess)){e.router.push({name:t.getDefaultRouteName()});return}}function MY1(e){const t=Hr.createRouter({history:Hr.createWebHistory(),routes:e,scrollBehavior:gY1});return t.beforeEach(yY1),t}function zY1(e,t,a){const r=F4.createPinia();r.use(vF({storage:localStorage})),e.use(r),e.use(t.router),e.use(Cg),e.use(yR,xR),Z2.init(t),Fv(a==null?void 0:a.appOptions),h4().init(a==null?void 0:a.appOptionsStore);const n={...Us1,...a==null?void 0:a.components};Object.entries(n).forEach(([c,i])=>{e.component(c,i)})}exports.App=fF;exports.AuthUser=uY1;exports.BaseParams=V3;exports.BaseResponse=wf;exports.DatabaseDefault=vi;exports.GetManyBaseParams=dY1;exports.RemoveImageParams=hY1;exports.RemoveImagesParams=mY1;exports.UploadImageParams=pY1;exports.UploadImagesParams=vY1;exports.User=hn;exports.addNotification=vt;exports.animateElement=HT;exports.clearNotifications=Iv;exports.copyModelFields=xn;exports.createApiConnections=fY1;exports.createI18n=Sp;exports.createRouter=MY1;exports.default=zY1;exports.displayAlert=Xg;exports.environments=Bp;exports.getAccessToken=Tp;exports.getAppOptions=$e;exports.getCurrentEnvironment=ST;exports.getDateInString=Ss;exports.getDatetimeInString=m4;exports.getFinalValue=pt;exports.getIsUserAuth=Ap;exports.getMonthInString=LT;exports.getNavigationSectionsVisible=ko;exports.getNumberInString=Es;exports.getNumericDateInString=Ua;exports.getRandomColorSelectorColor=VT;exports.getRouteTitle=bn;exports.getRouteType=Pv;exports.getRoutesByNavigationSection=h5;exports.getRoutesVisible=_o;exports.getTimeInString=sc;exports.greaterEqualRule=QJ;exports.greaterThanRule=e11;exports.initAppOptions=Fv;exports.integerRule=KJ;exports.isAValidId=ZO;exports.isColorTemplateVariable=mn;exports.isCurrentUrl=Pp;exports.isMobileDevice=QO;exports.isSmallDevice=Ho;exports.lessEqualRule=ZJ;exports.lessThanRule=JJ;exports.login=Ep;exports.logout=Dp;exports.maxLengthRule=A7;exports.minLengthRule=S7;exports.removeHtmlTags=qp;exports.removeNotification=Lo;exports.requiredRule=L7;exports.rgba=Op;exports.sanitizeHtml=KT;exports.scrollToTop=Bv;exports.setBodyOverflow=ic;exports.setColorProperties=Vo;exports.setColorRootProperties=Ls;exports.setLayoutProperties=Rv;exports.setRootProperty=cc;exports.useAppOptionsStore=h4;exports.useElementPosition=tM;exports.useRouteStore=$3;exports.useScrollListener=Zo;exports.validateAccessToken=Np;
878
+ `+c):r.stack=c}catch{}}throw r}}_request(t,a){typeof t=="string"?(a=a||{},a.url=t):a=t||{},a=l6(this.defaults,a);const{transitional:r,paramsSerializer:n,headers:c}=a;r!==void 0&&rc.assertOptions(r,{silentJSONParsing:z4.transitional(z4.boolean),forcedJSONParsing:z4.transitional(z4.boolean),clarifyTimeoutError:z4.transitional(z4.boolean)},!1),n!=null&&(_1.isFunction(n)?a.paramsSerializer={serialize:n}:rc.assertOptions(n,{encode:z4.function,serialize:z4.function},!0)),rc.assertOptions(a,{baseUrl:z4.spelling("baseURL"),withXsrfToken:z4.spelling("withXSRFToken")},!0),a.method=(a.method||this.defaults.method||"get").toLowerCase();let i=c&&_1.merge(c.common,c[a.method]);c&&_1.forEach(["delete","get","head","post","put","patch","common"],v=>{delete c[v]}),a.headers=d4.concat(i,c);const s=[];let l=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(a)===!1||(l=l&&p.synchronous,s.unshift(p.fulfilled,p.rejected))});const f=[];this.interceptors.response.forEach(function(p){f.push(p.fulfilled,p.rejected)});let u,d=0,h;if(!l){const v=[wp.bind(this),void 0];for(v.unshift.apply(v,s),v.push.apply(v,f),h=v.length,u=Promise.resolve(a);d<h;)u=u.then(v[d++],v[d++]);return u}h=s.length;let m=a;for(d=0;d<h;){const v=s[d++],p=s[d++];try{m=v(m)}catch(g){p.call(this,g);break}}try{u=wp.call(this,m)}catch(v){return Promise.reject(v)}for(d=0,h=f.length;d<h;)u=u.then(f[d++],f[d++]);return u}getUri(t){t=l6(this.defaults,t);const a=JA(t.baseURL,t.url);return GA(a,t.params,t.paramsSerializer)}}_1.forEach(["delete","get","head","options"],function(t){t5.prototype[t]=function(a,r){return this.request(l6(r||{},{method:t,url:a,data:(r||{}).data}))}});_1.forEach(["post","put","patch"],function(t){function a(r){return function(c,i,s){return this.request(l6(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:c,data:i}))}}t5.prototype[t]=a(),t5.prototype[t+"Form"]=a(!0)});const nc=t5;class zf{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let a;this.promise=new Promise(function(c){a=c});const r=this;this.promise.then(n=>{if(!r._listeners)return;let c=r._listeners.length;for(;c-- >0;)r._listeners[c](n);r._listeners=null}),this.promise.then=n=>{let c;const i=new Promise(s=>{r.subscribe(s),c=s}).then(n);return i.cancel=function(){r.unsubscribe(c)},i},t(function(c,i,s){r.reason||(r.reason=new ba(c,i,s),a(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const a=this._listeners.indexOf(t);a!==-1&&this._listeners.splice(a,1)}toAbortSignal(){const t=new AbortController,a=r=>{t.abort(r)};return this.subscribe(a),t.signal.unsubscribe=()=>this.unsubscribe(a),t.signal}static source(){let t;return{token:new zf(function(n){t=n}),cancel:t}}}const eY1=zf;function tY1(e){return function(a){return e.apply(null,a)}}function aY1(e){return _1.isObject(e)&&e.isAxiosError===!0}const to={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(to).forEach(([e,t])=>{to[t]=e});const rY1=to;function cT(e){const t=new nc(e),a=OA(nc.prototype.request,t);return _1.extend(a,nc.prototype,t,{allOwnKeys:!0}),_1.extend(a,t,null,{allOwnKeys:!0}),a.create=function(n){return cT(l6(e,n))},a}const ze=cT(Mf);ze.Axios=nc;ze.CanceledError=ba;ze.CancelToken=eY1;ze.isCancel=ZA;ze.VERSION=nT;ze.toFormData=di;ze.AxiosError=t2;ze.Cancel=ze.CanceledError;ze.all=function(t){return Promise.all(t)};ze.spread=tY1;ze.isAxiosError=aY1;ze.mergeConfig=l6;ze.AxiosHeaders=d4;ze.formToJSON=e=>KA(_1.isHTMLForm(e)?new FormData(e):e);ze.getAdapter=rT.getAdapter;ze.HttpStatusCode=rY1;ze.default=ze;const $a=ze;function nY1(e,t,a,r){if(e==="get")return $a.get(t,{params:a,...r});if(e==="post")return $a.post(t,a,r);if(e==="put")return $a.put(t,a,r);if(e==="patch")return $a.patch(t,a,r);if(e==="delete")return $a.delete(t,{data:a,...r})}function cY1(e,t){return e?Array.isArray(t)?t.map(a=>new e(a)):new e(t):t}const Hs=_2("apiConnectionsError");function iY1(e){var r,n,c;const t=(c=(n=(r=e.response)==null?void 0:r.data)==null?void 0:n.error)==null?void 0:c.errorCode;if(!t){vt("danger",()=>Hs("INTERNAL_SERVER_ERROR"));return}const a=Z2.getConfig();if(a.i18n.apiConnectionsError(t)){vt("danger",()=>a.i18n.apiConnectionsError(t));return}Hs(t)&&vt("danger",()=>Hs(t))}const kp=_2("apiConnectionsSuccess");function sY1(e){const t=Z2.getConfig();if(t.i18n.apiConnectionsSuccess(e)){vt("success",()=>t.i18n.apiConnectionsSuccess(e));return}kp(e)&&vt("success",()=>kp(e))}function oY1(e){const t=new FormData;return Object.entries(e).forEach(([a,r])=>{Array.isArray(r)?r.forEach(n=>{t.append(a,n)}):t.append(a,r)}),t}function lY1(e){const t={language:h4().language};return e.basicAuth||(t.Authorization=`Bearer ${Tp()||""}`),{headers:t,auth:e.basicAuth}}async function Pt(e,t,a,r,n){var c;try{n!=null&&n.isLoadingRef&&!(n!=null&&n.preventSetIsLoadingRef)&&(n.isLoadingRef.value=!0);const i=(c=a.meta)!=null&&c.sendAsFormData?oY1(r):r,s=lY1({basicAuth:n==null?void 0:n.basicAuth}),l=Z2.getConfig().backendUrl,f=await nY1(e,`${l}/${t}`,i,s),u=cY1(a.response,f.data.data);return((n==null?void 0:n.displaySuccess)!==void 0?n.displaySuccess:e!=="get")&&sY1(f.data.successCode),n!=null&&n.success&&n.success(u,f.data.totalCount),{data:u,totalCount:f.data.totalCount}}catch(i){if(n!=null&&n.preventDisplayError||iY1(i),n!=null&&n.error&&n.error(i),n!=null&&n.preventThrowError)return{data:null,totalCount:void 0};throw i}finally{n!=null&&n.isLoadingRef&&(n.isLoadingRef.value=!1),n!=null&&n.finally&&n.finally()}}function Vs(e,t){return t?`${e}/${t}`:e}function S6(e,t){return e?Array.isArray(t)?t.map(a=>new e(a)):new e(t):t}function fY1(e){return{getOne(t,a,r,n){const c=e[t].getOne,i=Vs(t,a),s=S6(c.params,r);return Pt("get",i,c,s,n)},getMany(t,a,r){const n=e[t].getMany,c=S6(n.params,a);return Pt("get",t,n,c,r)},postOne(t,a,r){const n=e[t].postOne,c=S6(n.params,a);return Pt("post",t,n,c,r)},postMany(t,a,r){const n=e[t].postMany,c=S6(n.params,a);return Pt("post",t,n,c,r)},putOne(t,a,r,n){const c=e[t].putOne,i=Vs(t,a),s=S6(c.params,r);return Pt("put",i,c,s,n)},putMany(t,a,r){const n=e[t].putMany,c=S6(n.params,a);return Pt("put",t,n,c,r)},deleteOne(t,a,r){const n=e[t].deleteOne,c=Vs(t,a);return Pt("delete",c,n,void 0,r)},deleteMany(t,a,r){const n=e[t].deleteMany;return Pt("delete",t,n,a,r)}}}class vi{constructor(t){g1(this,"id",0);g1(this,"createdAt",new Date);g1(this,"updatedAt",new Date);vi.CopyFields(this,t)}static CopyFields(t,a,r){xn(t,a,r)}}class hn extends vi{constructor(a){super(a);g1(this,"username","");hn.CopyFields(this,a)}}class uY1{constructor(t){g1(this,"accessToken","");g1(this,"user",new hn);xn(this,t,{user:hn})}}class V3{constructor(t){V3.CopyFields(this,t)}static CopyFields(t,a,r){xn(t,a,r)}}class dY1 extends V3{constructor(a){super(a);g1(this,"page");g1(this,"pageSize");g1(this,"search");V3.CopyFields(this,a)}}class hY1 extends V3{constructor(t){super(t),V3.CopyFields(this,t)}}class mY1 extends V3{constructor(a){super(a);g1(this,"index",0);V3.CopyFields(this,a)}}class pY1 extends V3{constructor(a){super(a);g1(this,"image");V3.CopyFields(this,a)}}class vY1 extends V3{constructor(a){super(a);g1(this,"images");V3.CopyFields(this,a)}}class wf{constructor(t){wf.CopyFields(this,t)}static CopyFields(t,a,r){xn(t,a,r)}}function gY1(e,t,a){return a||{top:0}}async function yY1(e,t,a){if(t.name&&t.name===e.name){a();return}const r=Z2.getConfig().routerHelpers;if(!r.validateRouteAccess(e.meta.access)){a({name:r.getDefaultRouteName(e)});return}xY1(e),a(),CY1()}function xY1(e){$3().currentRoute=e,bY1(e.name)}function bY1(e){const t=$3().currentRouteType;document.title=`${Z2.getConfig().appName} - ${bn(t,e)}`}async function CY1(){const e=Z2.getConfig(),t=e.routerHelpers;if(await Np(),!t.validateRouteAccess($3().currentRouteAccess)){e.router.push({name:t.getDefaultRouteName()});return}}function MY1(e){const t=Hr.createRouter({history:Hr.createWebHistory(),routes:e,scrollBehavior:gY1});return t.beforeEach(yY1),t}function zY1(e,t,a){const r=F4.createPinia();r.use(vF({storage:localStorage})),e.use(r),e.use(t.router),e.use(Cg),e.use(yR,xR),Z2.init(t),Fv(a==null?void 0:a.appOptions),h4().init(a==null?void 0:a.appOptionsStore);const n={...Us1,...a==null?void 0:a.components};Object.entries(n).forEach(([c,i])=>{e.component(c,i)})}exports.App=fF;exports.AuthUser=uY1;exports.BaseParams=V3;exports.BaseResponse=wf;exports.DatabaseDefault=vi;exports.GetManyBaseParams=dY1;exports.RemoveImageParams=hY1;exports.RemoveImagesParams=mY1;exports.UploadImageParams=pY1;exports.UploadImagesParams=vY1;exports.User=hn;exports.addNotification=vt;exports.animateElement=HT;exports.clearNotifications=Iv;exports.copyModelFields=xn;exports.createApiConnections=fY1;exports.createI18n=Sp;exports.createRouter=MY1;exports.default=zY1;exports.displayAlert=Xg;exports.environments=Bp;exports.getAccessToken=Tp;exports.getAppOptions=$e;exports.getCurrentEnvironment=ST;exports.getDateInString=Ss;exports.getDatetimeInString=m4;exports.getFinalValue=pt;exports.getIsUserAuth=Ap;exports.getMonthInString=LT;exports.getNavigationSectionsVisible=ko;exports.getNumberInString=Es;exports.getNumericDateInString=Ua;exports.getRandomColorSelectorColor=VT;exports.getRouteTitle=bn;exports.getRouteType=Pv;exports.getRoutesByNavigationSection=h5;exports.getRoutesVisible=_o;exports.getTimeInString=sc;exports.greaterEqualRule=QJ;exports.greaterThanRule=e11;exports.initAppOptions=Fv;exports.integerRule=KJ;exports.isAValidId=ZO;exports.isColorTemplateVariable=mn;exports.isCurrentUrl=Pp;exports.isMobileDevice=QO;exports.isSmallDevice=Ho;exports.lessEqualRule=ZJ;exports.lessThanRule=JJ;exports.login=Ep;exports.logout=Dp;exports.maxLengthRule=A7;exports.minLengthRule=S7;exports.removeHtmlTags=qp;exports.removeNotification=Lo;exports.requiredRule=L7;exports.rgba=Op;exports.sanitizeHtml=KT;exports.scrollToTop=Bv;exports.setBodyOverflow=ic;exports.setColorProperties=Vo;exports.setColorRootProperties=Ls;exports.setLayoutProperties=Rv;exports.setRootProperty=cc;exports.useAppOptionsStore=h4;exports.useElementPosition=tM;exports.useRouteStore=$3;exports.useScrollListener=Zo;exports.validateAccessToken=Np;