diff --git a/app/View/Components/Editor.php b/app/View/Components/Editor.php new file mode 100644 index 00000000..95170d13 --- /dev/null +++ b/app/View/Components/Editor.php @@ -0,0 +1,47 @@ +id = $name.'-'.Str::random(8); + $this->name = $name; + $this->value = json_encode($value ?? ''); + $this->options = $this->getOptions(); + } + + private function getOptions(): array + { + return [ + 'id' => $this->id, + 'name' => $this->name, + 'lang' => $this->lang, + 'value' => $this->value, + ]; + } + + public function render(): View|Closure|string + { + return view('components.editor'); + } +} diff --git a/package-lock.json b/package-lock.json index 358bbb67..9a2bc691 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,13 +4,13 @@ "requires": true, "packages": { "": { - "name": "vito", "devDependencies": { "@tailwindcss/forms": "^0.5.2", "@tailwindcss/typography": "^0.5.9", "alpinejs": "^3.4.2", "apexcharts": "^3.44.2", "autoprefixer": "^10.4.2", + "brace": "^0.11.1", "flowbite": "^2.3.0", "flowbite-datepicker": "^1.2.6", "htmx.org": "^1.9.10", @@ -685,6 +685,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/brace": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/brace/-/brace-0.11.1.tgz", + "integrity": "sha512-Fc8Ne62jJlKHiG/ajlonC4Sd66Pq68fFwK4ihJGNZpGqboc324SQk+lRvMzpPRuJOmfrJefdG8/7JdWX4bzJ2Q==", + "dev": true + }, "node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", diff --git a/package.json b/package.json index d9326302..0e8c395b 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,11 @@ "@tailwindcss/forms": "^0.5.2", "@tailwindcss/typography": "^0.5.9", "alpinejs": "^3.4.2", + "apexcharts": "^3.44.2", "autoprefixer": "^10.4.2", + "brace": "^0.11.1", "flowbite": "^2.3.0", + "flowbite-datepicker": "^1.2.6", "htmx.org": "^1.9.10", "laravel-echo": "^1.15.0", "laravel-vite-plugin": "^0.7.2", @@ -21,8 +24,6 @@ "prettier-plugin-tailwindcss": "^0.5.11", "tailwindcss": "^3.1.0", "tippy.js": "^6.3.7", - "vite": "^4.5.3", - "apexcharts": "^3.44.2", - "flowbite-datepicker": "^1.2.6" + "vite": "^4.5.3" } } diff --git a/public/build/assets/app-01264060.js b/public/build/assets/app-01264060.js deleted file mode 100644 index 523613f4..00000000 --- a/public/build/assets/app-01264060.js +++ /dev/null @@ -1,732 +0,0 @@ -var Events=function(){function ii(ri,oi){oi===void 0&&(oi=[]),this._eventType=ri,this._eventFunctions=oi}return ii.prototype.init=function(){var ri=this;this._eventFunctions.forEach(function(oi){typeof window<"u"&&window.addEventListener(ri._eventType,oi)})},ii}(),Instances=function(){function ii(){this._instances={Accordion:{},Carousel:{},Collapse:{},Dial:{},Dismiss:{},Drawer:{},Dropdown:{},Modal:{},Popover:{},Tabs:{},Tooltip:{},InputCounter:{},CopyClipboard:{}}}return ii.prototype.addInstance=function(ri,oi,hi,gi){if(gi===void 0&&(gi=!1),!this._instances[ri])return console.warn("Flowbite: Component ".concat(ri," does not exist.")),!1;if(this._instances[ri][hi]&&!gi){console.warn("Flowbite: Instance with ID ".concat(hi," already exists."));return}gi&&this._instances[ri][hi]&&this._instances[ri][hi].destroyAndRemoveInstance(),this._instances[ri][hi||this._generateRandomId()]=oi},ii.prototype.getAllInstances=function(){return this._instances},ii.prototype.getInstances=function(ri){return this._instances[ri]?this._instances[ri]:(console.warn("Flowbite: Component ".concat(ri," does not exist.")),!1)},ii.prototype.getInstance=function(ri,oi){if(this._componentAndInstanceCheck(ri,oi)){if(!this._instances[ri][oi]){console.warn("Flowbite: Instance with ID ".concat(oi," does not exist."));return}return this._instances[ri][oi]}},ii.prototype.destroyAndRemoveInstance=function(ri,oi){this._componentAndInstanceCheck(ri,oi)&&(this.destroyInstanceObject(ri,oi),this.removeInstance(ri,oi))},ii.prototype.removeInstance=function(ri,oi){this._componentAndInstanceCheck(ri,oi)&&delete this._instances[ri][oi]},ii.prototype.destroyInstanceObject=function(ri,oi){this._componentAndInstanceCheck(ri,oi)&&this._instances[ri][oi].destroy()},ii.prototype.instanceExists=function(ri,oi){return!(!this._instances[ri]||!this._instances[ri][oi])},ii.prototype._generateRandomId=function(){return Math.random().toString(36).substr(2,9)},ii.prototype._componentAndInstanceCheck=function(ri,oi){return this._instances[ri]?this._instances[ri][oi]?!0:(console.warn("Flowbite: Instance with ID ".concat(oi," does not exist.")),!1):(console.warn("Flowbite: Component ".concat(ri," does not exist.")),!1)},ii}(),instances=new Instances;typeof window<"u"&&(window.FlowbiteInstances=instances);var __assign$c=globalThis&&globalThis.__assign||function(){return __assign$c=Object.assign||function(ii){for(var ri,oi=1,hi=arguments.length;oi"u")return!1;var ri=getWindow(ii).ShadowRoot;return ii instanceof ri||ii instanceof ShadowRoot}function applyStyles(ii){var ri=ii.state;Object.keys(ri.elements).forEach(function(oi){var hi=ri.styles[oi]||{},gi=ri.attributes[oi]||{},bi=ri.elements[oi];!isHTMLElement(bi)||!getNodeName(bi)||(Object.assign(bi.style,hi),Object.keys(gi).forEach(function(Ai){var Ci=gi[Ai];Ci===!1?bi.removeAttribute(Ai):bi.setAttribute(Ai,Ci===!0?"":Ci)}))})}function effect$3(ii){var ri=ii.state,oi={popper:{position:ri.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(ri.elements.popper.style,oi.popper),ri.styles=oi,ri.elements.arrow&&Object.assign(ri.elements.arrow.style,oi.arrow),function(){Object.keys(ri.elements).forEach(function(hi){var gi=ri.elements[hi],bi=ri.attributes[hi]||{},Ai=Object.keys(ri.styles.hasOwnProperty(hi)?ri.styles[hi]:oi[hi]),Ci=Ai.reduce(function(Pi,zi){return Pi[zi]="",Pi},{});!isHTMLElement(gi)||!getNodeName(gi)||(Object.assign(gi.style,Ci),Object.keys(bi).forEach(function(Pi){gi.removeAttribute(Pi)}))})}}const applyStyles$1={name:"applyStyles",enabled:!0,phase:"write",fn:applyStyles,effect:effect$3,requires:["computeStyles"]};function getBasePlacement$1(ii){return ii.split("-")[0]}var max=Math.max,min=Math.min,round=Math.round;function getUAString(){var ii=navigator.userAgentData;return ii!=null&&ii.brands&&Array.isArray(ii.brands)?ii.brands.map(function(ri){return ri.brand+"/"+ri.version}).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(ii,ri,oi){ri===void 0&&(ri=!1),oi===void 0&&(oi=!1);var hi=ii.getBoundingClientRect(),gi=1,bi=1;ri&&isHTMLElement(ii)&&(gi=ii.offsetWidth>0&&round(hi.width)/ii.offsetWidth||1,bi=ii.offsetHeight>0&&round(hi.height)/ii.offsetHeight||1);var Ai=isElement$1(ii)?getWindow(ii):window,Ci=Ai.visualViewport,Pi=!isLayoutViewport()&&oi,zi=(hi.left+(Pi&&Ci?Ci.offsetLeft:0))/gi,Xi=(hi.top+(Pi&&Ci?Ci.offsetTop:0))/bi,ji=hi.width/gi,Zi=hi.height/bi;return{width:ji,height:Zi,top:Xi,right:zi+ji,bottom:Xi+Zi,left:zi,x:zi,y:Xi}}function getLayoutRect(ii){var ri=getBoundingClientRect(ii),oi=ii.offsetWidth,hi=ii.offsetHeight;return Math.abs(ri.width-oi)<=1&&(oi=ri.width),Math.abs(ri.height-hi)<=1&&(hi=ri.height),{x:ii.offsetLeft,y:ii.offsetTop,width:oi,height:hi}}function contains(ii,ri){var oi=ri.getRootNode&&ri.getRootNode();if(ii.contains(ri))return!0;if(oi&&isShadowRoot(oi)){var hi=ri;do{if(hi&&ii.isSameNode(hi))return!0;hi=hi.parentNode||hi.host}while(hi)}return!1}function getComputedStyle$1(ii){return getWindow(ii).getComputedStyle(ii)}function isTableElement(ii){return["table","td","th"].indexOf(getNodeName(ii))>=0}function getDocumentElement(ii){return((isElement$1(ii)?ii.ownerDocument:ii.document)||window.document).documentElement}function getParentNode(ii){return getNodeName(ii)==="html"?ii:ii.assignedSlot||ii.parentNode||(isShadowRoot(ii)?ii.host:null)||getDocumentElement(ii)}function getTrueOffsetParent(ii){return!isHTMLElement(ii)||getComputedStyle$1(ii).position==="fixed"?null:ii.offsetParent}function getContainingBlock(ii){var ri=/firefox/i.test(getUAString()),oi=/Trident/i.test(getUAString());if(oi&&isHTMLElement(ii)){var hi=getComputedStyle$1(ii);if(hi.position==="fixed")return null}var gi=getParentNode(ii);for(isShadowRoot(gi)&&(gi=gi.host);isHTMLElement(gi)&&["html","body"].indexOf(getNodeName(gi))<0;){var bi=getComputedStyle$1(gi);if(bi.transform!=="none"||bi.perspective!=="none"||bi.contain==="paint"||["transform","perspective"].indexOf(bi.willChange)!==-1||ri&&bi.willChange==="filter"||ri&&bi.filter&&bi.filter!=="none")return gi;gi=gi.parentNode}return null}function getOffsetParent(ii){for(var ri=getWindow(ii),oi=getTrueOffsetParent(ii);oi&&isTableElement(oi)&&getComputedStyle$1(oi).position==="static";)oi=getTrueOffsetParent(oi);return oi&&(getNodeName(oi)==="html"||getNodeName(oi)==="body"&&getComputedStyle$1(oi).position==="static")?ri:oi||getContainingBlock(ii)||ri}function getMainAxisFromPlacement(ii){return["top","bottom"].indexOf(ii)>=0?"x":"y"}function within(ii,ri,oi){return max(ii,min(ri,oi))}function withinMaxClamp(ii,ri,oi){var hi=within(ii,ri,oi);return hi>oi?oi:hi}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(ii){return Object.assign({},getFreshSideObject(),ii)}function expandToHashMap(ii,ri){return ri.reduce(function(oi,hi){return oi[hi]=ii,oi},{})}var toPaddingObject=function(ri,oi){return ri=typeof ri=="function"?ri(Object.assign({},oi.rects,{placement:oi.placement})):ri,mergePaddingObject(typeof ri!="number"?ri:expandToHashMap(ri,basePlacements))};function arrow(ii){var ri,oi=ii.state,hi=ii.name,gi=ii.options,bi=oi.elements.arrow,Ai=oi.modifiersData.popperOffsets,Ci=getBasePlacement$1(oi.placement),Pi=getMainAxisFromPlacement(Ci),zi=[left,right].indexOf(Ci)>=0,Xi=zi?"height":"width";if(!(!bi||!Ai)){var ji=toPaddingObject(gi.padding,oi),Zi=getLayoutRect(bi),ia=Pi==="y"?top:left,la=Pi==="y"?bottom:right,ra=oi.rects.reference[Xi]+oi.rects.reference[Pi]-Ai[Pi]-oi.rects.popper[Xi],Ki=Ai[Pi]-oi.rects.reference[Pi],$i=getOffsetParent(bi),Ri=$i?Pi==="y"?$i.clientHeight||0:$i.clientWidth||0:0,ea=ra/2-Ki/2,Ni=ji[ia],Yi=Ri-Zi[Xi]-ji[la],Gi=Ri/2-Zi[Xi]/2+ea,sa=within(Ni,Gi,Yi),ha=Pi;oi.modifiersData[hi]=(ri={},ri[ha]=sa,ri.centerOffset=sa-Gi,ri)}}function effect$2(ii){var ri=ii.state,oi=ii.options,hi=oi.element,gi=hi===void 0?"[data-popper-arrow]":hi;gi!=null&&(typeof gi=="string"&&(gi=ri.elements.popper.querySelector(gi),!gi)||contains(ri.elements.popper,gi)&&(ri.elements.arrow=gi))}const arrow$1={name:"arrow",enabled:!0,phase:"main",fn:arrow,effect:effect$2,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(ii){return ii.split("-")[1]}var unsetSides={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(ii,ri){var oi=ii.x,hi=ii.y,gi=ri.devicePixelRatio||1;return{x:round(oi*gi)/gi||0,y:round(hi*gi)/gi||0}}function mapToStyles(ii){var ri,oi=ii.popper,hi=ii.popperRect,gi=ii.placement,bi=ii.variation,Ai=ii.offsets,Ci=ii.position,Pi=ii.gpuAcceleration,zi=ii.adaptive,Xi=ii.roundOffsets,ji=ii.isFixed,Zi=Ai.x,ia=Zi===void 0?0:Zi,la=Ai.y,ra=la===void 0?0:la,Ki=typeof Xi=="function"?Xi({x:ia,y:ra}):{x:ia,y:ra};ia=Ki.x,ra=Ki.y;var $i=Ai.hasOwnProperty("x"),Ri=Ai.hasOwnProperty("y"),ea=left,Ni=top,Yi=window;if(zi){var Gi=getOffsetParent(oi),sa="clientHeight",ha="clientWidth";if(Gi===getWindow(oi)&&(Gi=getDocumentElement(oi),getComputedStyle$1(Gi).position!=="static"&&Ci==="absolute"&&(sa="scrollHeight",ha="scrollWidth")),Gi=Gi,gi===top||(gi===left||gi===right)&&bi===end){Ni=bottom;var ua=ji&&Gi===Yi&&Yi.visualViewport?Yi.visualViewport.height:Gi[sa];ra-=ua-hi.height,ra*=Pi?1:-1}if(gi===left||(gi===top||gi===bottom)&&bi===end){ea=right;var ga=ji&&Gi===Yi&&Yi.visualViewport?Yi.visualViewport.width:Gi[ha];ia-=ga-hi.width,ia*=Pi?1:-1}}var pa=Object.assign({position:Ci},zi&&unsetSides),wa=Xi===!0?roundOffsetsByDPR({x:ia,y:ra},getWindow(oi)):{x:ia,y:ra};if(ia=wa.x,ra=wa.y,Pi){var ka;return Object.assign({},pa,(ka={},ka[Ni]=Ri?"0":"",ka[ea]=$i?"0":"",ka.transform=(Yi.devicePixelRatio||1)<=1?"translate("+ia+"px, "+ra+"px)":"translate3d("+ia+"px, "+ra+"px, 0)",ka))}return Object.assign({},pa,(ri={},ri[Ni]=Ri?ra+"px":"",ri[ea]=$i?ia+"px":"",ri.transform="",ri))}function computeStyles(ii){var ri=ii.state,oi=ii.options,hi=oi.gpuAcceleration,gi=hi===void 0?!0:hi,bi=oi.adaptive,Ai=bi===void 0?!0:bi,Ci=oi.roundOffsets,Pi=Ci===void 0?!0:Ci,zi={placement:getBasePlacement$1(ri.placement),variation:getVariation(ri.placement),popper:ri.elements.popper,popperRect:ri.rects.popper,gpuAcceleration:gi,isFixed:ri.options.strategy==="fixed"};ri.modifiersData.popperOffsets!=null&&(ri.styles.popper=Object.assign({},ri.styles.popper,mapToStyles(Object.assign({},zi,{offsets:ri.modifiersData.popperOffsets,position:ri.options.strategy,adaptive:Ai,roundOffsets:Pi})))),ri.modifiersData.arrow!=null&&(ri.styles.arrow=Object.assign({},ri.styles.arrow,mapToStyles(Object.assign({},zi,{offsets:ri.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:Pi})))),ri.attributes.popper=Object.assign({},ri.attributes.popper,{"data-popper-placement":ri.placement})}const computeStyles$1={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:computeStyles,data:{}};var passive={passive:!0};function effect$1(ii){var ri=ii.state,oi=ii.instance,hi=ii.options,gi=hi.scroll,bi=gi===void 0?!0:gi,Ai=hi.resize,Ci=Ai===void 0?!0:Ai,Pi=getWindow(ri.elements.popper),zi=[].concat(ri.scrollParents.reference,ri.scrollParents.popper);return bi&&zi.forEach(function(Xi){Xi.addEventListener("scroll",oi.update,passive)}),Ci&&Pi.addEventListener("resize",oi.update,passive),function(){bi&&zi.forEach(function(Xi){Xi.removeEventListener("scroll",oi.update,passive)}),Ci&&Pi.removeEventListener("resize",oi.update,passive)}}const eventListeners={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:effect$1,data:{}};var hash$1={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(ii){return ii.replace(/left|right|bottom|top/g,function(ri){return hash$1[ri]})}var hash={start:"end",end:"start"};function getOppositeVariationPlacement(ii){return ii.replace(/start|end/g,function(ri){return hash[ri]})}function getWindowScroll(ii){var ri=getWindow(ii),oi=ri.pageXOffset,hi=ri.pageYOffset;return{scrollLeft:oi,scrollTop:hi}}function getWindowScrollBarX(ii){return getBoundingClientRect(getDocumentElement(ii)).left+getWindowScroll(ii).scrollLeft}function getViewportRect(ii,ri){var oi=getWindow(ii),hi=getDocumentElement(ii),gi=oi.visualViewport,bi=hi.clientWidth,Ai=hi.clientHeight,Ci=0,Pi=0;if(gi){bi=gi.width,Ai=gi.height;var zi=isLayoutViewport();(zi||!zi&&ri==="fixed")&&(Ci=gi.offsetLeft,Pi=gi.offsetTop)}return{width:bi,height:Ai,x:Ci+getWindowScrollBarX(ii),y:Pi}}function getDocumentRect(ii){var ri,oi=getDocumentElement(ii),hi=getWindowScroll(ii),gi=(ri=ii.ownerDocument)==null?void 0:ri.body,bi=max(oi.scrollWidth,oi.clientWidth,gi?gi.scrollWidth:0,gi?gi.clientWidth:0),Ai=max(oi.scrollHeight,oi.clientHeight,gi?gi.scrollHeight:0,gi?gi.clientHeight:0),Ci=-hi.scrollLeft+getWindowScrollBarX(ii),Pi=-hi.scrollTop;return getComputedStyle$1(gi||oi).direction==="rtl"&&(Ci+=max(oi.clientWidth,gi?gi.clientWidth:0)-bi),{width:bi,height:Ai,x:Ci,y:Pi}}function isScrollParent(ii){var ri=getComputedStyle$1(ii),oi=ri.overflow,hi=ri.overflowX,gi=ri.overflowY;return/auto|scroll|overlay|hidden/.test(oi+gi+hi)}function getScrollParent(ii){return["html","body","#document"].indexOf(getNodeName(ii))>=0?ii.ownerDocument.body:isHTMLElement(ii)&&isScrollParent(ii)?ii:getScrollParent(getParentNode(ii))}function listScrollParents(ii,ri){var oi;ri===void 0&&(ri=[]);var hi=getScrollParent(ii),gi=hi===((oi=ii.ownerDocument)==null?void 0:oi.body),bi=getWindow(hi),Ai=gi?[bi].concat(bi.visualViewport||[],isScrollParent(hi)?hi:[]):hi,Ci=ri.concat(Ai);return gi?Ci:Ci.concat(listScrollParents(getParentNode(Ai)))}function rectToClientRect(ii){return Object.assign({},ii,{left:ii.x,top:ii.y,right:ii.x+ii.width,bottom:ii.y+ii.height})}function getInnerBoundingClientRect(ii,ri){var oi=getBoundingClientRect(ii,!1,ri==="fixed");return oi.top=oi.top+ii.clientTop,oi.left=oi.left+ii.clientLeft,oi.bottom=oi.top+ii.clientHeight,oi.right=oi.left+ii.clientWidth,oi.width=ii.clientWidth,oi.height=ii.clientHeight,oi.x=oi.left,oi.y=oi.top,oi}function getClientRectFromMixedType(ii,ri,oi){return ri===viewport?rectToClientRect(getViewportRect(ii,oi)):isElement$1(ri)?getInnerBoundingClientRect(ri,oi):rectToClientRect(getDocumentRect(getDocumentElement(ii)))}function getClippingParents(ii){var ri=listScrollParents(getParentNode(ii)),oi=["absolute","fixed"].indexOf(getComputedStyle$1(ii).position)>=0,hi=oi&&isHTMLElement(ii)?getOffsetParent(ii):ii;return isElement$1(hi)?ri.filter(function(gi){return isElement$1(gi)&&contains(gi,hi)&&getNodeName(gi)!=="body"}):[]}function getClippingRect(ii,ri,oi,hi){var gi=ri==="clippingParents"?getClippingParents(ii):[].concat(ri),bi=[].concat(gi,[oi]),Ai=bi[0],Ci=bi.reduce(function(Pi,zi){var Xi=getClientRectFromMixedType(ii,zi,hi);return Pi.top=max(Xi.top,Pi.top),Pi.right=min(Xi.right,Pi.right),Pi.bottom=min(Xi.bottom,Pi.bottom),Pi.left=max(Xi.left,Pi.left),Pi},getClientRectFromMixedType(ii,Ai,hi));return Ci.width=Ci.right-Ci.left,Ci.height=Ci.bottom-Ci.top,Ci.x=Ci.left,Ci.y=Ci.top,Ci}function computeOffsets(ii){var ri=ii.reference,oi=ii.element,hi=ii.placement,gi=hi?getBasePlacement$1(hi):null,bi=hi?getVariation(hi):null,Ai=ri.x+ri.width/2-oi.width/2,Ci=ri.y+ri.height/2-oi.height/2,Pi;switch(gi){case top:Pi={x:Ai,y:ri.y-oi.height};break;case bottom:Pi={x:Ai,y:ri.y+ri.height};break;case right:Pi={x:ri.x+ri.width,y:Ci};break;case left:Pi={x:ri.x-oi.width,y:Ci};break;default:Pi={x:ri.x,y:ri.y}}var zi=gi?getMainAxisFromPlacement(gi):null;if(zi!=null){var Xi=zi==="y"?"height":"width";switch(bi){case start$1:Pi[zi]=Pi[zi]-(ri[Xi]/2-oi[Xi]/2);break;case end:Pi[zi]=Pi[zi]+(ri[Xi]/2-oi[Xi]/2);break}}return Pi}function detectOverflow(ii,ri){ri===void 0&&(ri={});var oi=ri,hi=oi.placement,gi=hi===void 0?ii.placement:hi,bi=oi.strategy,Ai=bi===void 0?ii.strategy:bi,Ci=oi.boundary,Pi=Ci===void 0?clippingParents:Ci,zi=oi.rootBoundary,Xi=zi===void 0?viewport:zi,ji=oi.elementContext,Zi=ji===void 0?popper:ji,ia=oi.altBoundary,la=ia===void 0?!1:ia,ra=oi.padding,Ki=ra===void 0?0:ra,$i=mergePaddingObject(typeof Ki!="number"?Ki:expandToHashMap(Ki,basePlacements)),Ri=Zi===popper?reference:popper,ea=ii.rects.popper,Ni=ii.elements[la?Ri:Zi],Yi=getClippingRect(isElement$1(Ni)?Ni:Ni.contextElement||getDocumentElement(ii.elements.popper),Pi,Xi,Ai),Gi=getBoundingClientRect(ii.elements.reference),sa=computeOffsets({reference:Gi,element:ea,strategy:"absolute",placement:gi}),ha=rectToClientRect(Object.assign({},ea,sa)),ua=Zi===popper?ha:Gi,ga={top:Yi.top-ua.top+$i.top,bottom:ua.bottom-Yi.bottom+$i.bottom,left:Yi.left-ua.left+$i.left,right:ua.right-Yi.right+$i.right},pa=ii.modifiersData.offset;if(Zi===popper&&pa){var wa=pa[gi];Object.keys(ga).forEach(function(ka){var La=[right,bottom].indexOf(ka)>=0?1:-1,ma=[top,bottom].indexOf(ka)>=0?"y":"x";ga[ka]+=wa[ma]*La})}return ga}function computeAutoPlacement(ii,ri){ri===void 0&&(ri={});var oi=ri,hi=oi.placement,gi=oi.boundary,bi=oi.rootBoundary,Ai=oi.padding,Ci=oi.flipVariations,Pi=oi.allowedAutoPlacements,zi=Pi===void 0?placements:Pi,Xi=getVariation(hi),ji=Xi?Ci?variationPlacements:variationPlacements.filter(function(la){return getVariation(la)===Xi}):basePlacements,Zi=ji.filter(function(la){return zi.indexOf(la)>=0});Zi.length===0&&(Zi=ji);var ia=Zi.reduce(function(la,ra){return la[ra]=detectOverflow(ii,{placement:ra,boundary:gi,rootBoundary:bi,padding:Ai})[getBasePlacement$1(ra)],la},{});return Object.keys(ia).sort(function(la,ra){return ia[la]-ia[ra]})}function getExpandedFallbackPlacements(ii){if(getBasePlacement$1(ii)===auto)return[];var ri=getOppositePlacement(ii);return[getOppositeVariationPlacement(ii),ri,getOppositeVariationPlacement(ri)]}function flip(ii){var ri=ii.state,oi=ii.options,hi=ii.name;if(!ri.modifiersData[hi]._skip){for(var gi=oi.mainAxis,bi=gi===void 0?!0:gi,Ai=oi.altAxis,Ci=Ai===void 0?!0:Ai,Pi=oi.fallbackPlacements,zi=oi.padding,Xi=oi.boundary,ji=oi.rootBoundary,Zi=oi.altBoundary,ia=oi.flipVariations,la=ia===void 0?!0:ia,ra=oi.allowedAutoPlacements,Ki=ri.options.placement,$i=getBasePlacement$1(Ki),Ri=$i===Ki,ea=Pi||(Ri||!la?[getOppositePlacement(Ki)]:getExpandedFallbackPlacements(Ki)),Ni=[Ki].concat(ea).reduce(function(Va,Pa){return Va.concat(getBasePlacement$1(Pa)===auto?computeAutoPlacement(ri,{placement:Pa,boundary:Xi,rootBoundary:ji,padding:zi,flipVariations:la,allowedAutoPlacements:ra}):Pa)},[]),Yi=ri.rects.reference,Gi=ri.rects.popper,sa=new Map,ha=!0,ua=Ni[0],ga=0;ga=0,ma=La?"width":"height",Ra=detectOverflow(ri,{placement:pa,boundary:Xi,rootBoundary:ji,altBoundary:Zi,padding:zi}),Oa=La?ka?right:left:ka?bottom:top;Yi[ma]>Gi[ma]&&(Oa=getOppositePlacement(Oa));var Ia=getOppositePlacement(Oa),Ua=[];if(bi&&Ua.push(Ra[wa]<=0),Ci&&Ua.push(Ra[Oa]<=0,Ra[Ia]<=0),Ua.every(function(Va){return Va})){ua=pa,ha=!1;break}sa.set(pa,Ua)}if(ha)for(var Wa=la?3:1,Qa=function(Pa){var Fa=Ni.find(function(Na){var Yr=sa.get(Na);if(Yr)return Yr.slice(0,Pa).every(function(Ba){return Ba})});if(Fa)return ua=Fa,"break"},Ja=Wa;Ja>0;Ja--){var Ya=Qa(Ja);if(Ya==="break")break}ri.placement!==ua&&(ri.modifiersData[hi]._skip=!0,ri.placement=ua,ri.reset=!0)}}const flip$1={name:"flip",enabled:!0,phase:"main",fn:flip,requiresIfExists:["offset"],data:{_skip:!1}};function getSideOffsets(ii,ri,oi){return oi===void 0&&(oi={x:0,y:0}),{top:ii.top-ri.height-oi.y,right:ii.right-ri.width+oi.x,bottom:ii.bottom-ri.height+oi.y,left:ii.left-ri.width-oi.x}}function isAnySideFullyClipped(ii){return[top,right,bottom,left].some(function(ri){return ii[ri]>=0})}function hide(ii){var ri=ii.state,oi=ii.name,hi=ri.rects.reference,gi=ri.rects.popper,bi=ri.modifiersData.preventOverflow,Ai=detectOverflow(ri,{elementContext:"reference"}),Ci=detectOverflow(ri,{altBoundary:!0}),Pi=getSideOffsets(Ai,hi),zi=getSideOffsets(Ci,gi,bi),Xi=isAnySideFullyClipped(Pi),ji=isAnySideFullyClipped(zi);ri.modifiersData[oi]={referenceClippingOffsets:Pi,popperEscapeOffsets:zi,isReferenceHidden:Xi,hasPopperEscaped:ji},ri.attributes.popper=Object.assign({},ri.attributes.popper,{"data-popper-reference-hidden":Xi,"data-popper-escaped":ji})}const hide$1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hide};function distanceAndSkiddingToXY(ii,ri,oi){var hi=getBasePlacement$1(ii),gi=[left,top].indexOf(hi)>=0?-1:1,bi=typeof oi=="function"?oi(Object.assign({},ri,{placement:ii})):oi,Ai=bi[0],Ci=bi[1];return Ai=Ai||0,Ci=(Ci||0)*gi,[left,right].indexOf(hi)>=0?{x:Ci,y:Ai}:{x:Ai,y:Ci}}function offset(ii){var ri=ii.state,oi=ii.options,hi=ii.name,gi=oi.offset,bi=gi===void 0?[0,0]:gi,Ai=placements.reduce(function(Xi,ji){return Xi[ji]=distanceAndSkiddingToXY(ji,ri.rects,bi),Xi},{}),Ci=Ai[ri.placement],Pi=Ci.x,zi=Ci.y;ri.modifiersData.popperOffsets!=null&&(ri.modifiersData.popperOffsets.x+=Pi,ri.modifiersData.popperOffsets.y+=zi),ri.modifiersData[hi]=Ai}const offset$1={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:offset};function popperOffsets(ii){var ri=ii.state,oi=ii.name;ri.modifiersData[oi]=computeOffsets({reference:ri.rects.reference,element:ri.rects.popper,strategy:"absolute",placement:ri.placement})}const popperOffsets$1={name:"popperOffsets",enabled:!0,phase:"read",fn:popperOffsets,data:{}};function getAltAxis(ii){return ii==="x"?"y":"x"}function preventOverflow(ii){var ri=ii.state,oi=ii.options,hi=ii.name,gi=oi.mainAxis,bi=gi===void 0?!0:gi,Ai=oi.altAxis,Ci=Ai===void 0?!1:Ai,Pi=oi.boundary,zi=oi.rootBoundary,Xi=oi.altBoundary,ji=oi.padding,Zi=oi.tether,ia=Zi===void 0?!0:Zi,la=oi.tetherOffset,ra=la===void 0?0:la,Ki=detectOverflow(ri,{boundary:Pi,rootBoundary:zi,padding:ji,altBoundary:Xi}),$i=getBasePlacement$1(ri.placement),Ri=getVariation(ri.placement),ea=!Ri,Ni=getMainAxisFromPlacement($i),Yi=getAltAxis(Ni),Gi=ri.modifiersData.popperOffsets,sa=ri.rects.reference,ha=ri.rects.popper,ua=typeof ra=="function"?ra(Object.assign({},ri.rects,{placement:ri.placement})):ra,ga=typeof ua=="number"?{mainAxis:ua,altAxis:ua}:Object.assign({mainAxis:0,altAxis:0},ua),pa=ri.modifiersData.offset?ri.modifiersData.offset[ri.placement]:null,wa={x:0,y:0};if(Gi){if(bi){var ka,La=Ni==="y"?top:left,ma=Ni==="y"?bottom:right,Ra=Ni==="y"?"height":"width",Oa=Gi[Ni],Ia=Oa+Ki[La],Ua=Oa-Ki[ma],Wa=ia?-ha[Ra]/2:0,Qa=Ri===start$1?sa[Ra]:ha[Ra],Ja=Ri===start$1?-ha[Ra]:-sa[Ra],Ya=ri.elements.arrow,Va=ia&&Ya?getLayoutRect(Ya):{width:0,height:0},Pa=ri.modifiersData["arrow#persistent"]?ri.modifiersData["arrow#persistent"].padding:getFreshSideObject(),Fa=Pa[La],Na=Pa[ma],Yr=within(0,sa[Ra],Va[Ra]),Ba=ea?sa[Ra]/2-Wa-Yr-Fa-ga.mainAxis:Qa-Yr-Fa-ga.mainAxis,Wr=ea?-sa[Ra]/2+Wa+Yr+Na+ga.mainAxis:Ja+Yr+Na+ga.mainAxis,Jr=ri.elements.arrow&&getOffsetParent(ri.elements.arrow),us=Jr?Ni==="y"?Jr.clientTop||0:Jr.clientLeft||0:0,za=(ka=pa==null?void 0:pa[Ni])!=null?ka:0,es=Oa+Ba-za-us,ns=Oa+Wr-za,fs=within(ia?min(Ia,es):Ia,Oa,ia?max(Ua,ns):Ua);Gi[Ni]=fs,wa[Ni]=fs-Oa}if(Ci){var Ga,$a=Ni==="x"?top:left,Qr=Ni==="x"?bottom:right,Zr=Gi[Yi],rs=Yi==="y"?"height":"width",xs=Zr+Ki[$a],hs=Zr-Ki[Qr],ds=[top,left].indexOf($i)!==-1,ks=(Ga=pa==null?void 0:pa[Yi])!=null?Ga:0,gs=ds?xs:Zr-sa[rs]-ha[rs]-ks+ga.altAxis,As=ds?Zr+sa[rs]+ha[rs]-ks-ga.altAxis:hs,ms=ia&&ds?withinMaxClamp(gs,Zr,As):within(ia?gs:xs,Zr,ia?As:hs);Gi[Yi]=ms,wa[Yi]=ms-Zr}ri.modifiersData[hi]=wa}}const preventOverflow$1={name:"preventOverflow",enabled:!0,phase:"main",fn:preventOverflow,requiresIfExists:["offset"]};function getHTMLElementScroll(ii){return{scrollLeft:ii.scrollLeft,scrollTop:ii.scrollTop}}function getNodeScroll(ii){return ii===getWindow(ii)||!isHTMLElement(ii)?getWindowScroll(ii):getHTMLElementScroll(ii)}function isElementScaled(ii){var ri=ii.getBoundingClientRect(),oi=round(ri.width)/ii.offsetWidth||1,hi=round(ri.height)/ii.offsetHeight||1;return oi!==1||hi!==1}function getCompositeRect(ii,ri,oi){oi===void 0&&(oi=!1);var hi=isHTMLElement(ri),gi=isHTMLElement(ri)&&isElementScaled(ri),bi=getDocumentElement(ri),Ai=getBoundingClientRect(ii,gi,oi),Ci={scrollLeft:0,scrollTop:0},Pi={x:0,y:0};return(hi||!hi&&!oi)&&((getNodeName(ri)!=="body"||isScrollParent(bi))&&(Ci=getNodeScroll(ri)),isHTMLElement(ri)?(Pi=getBoundingClientRect(ri,!0),Pi.x+=ri.clientLeft,Pi.y+=ri.clientTop):bi&&(Pi.x=getWindowScrollBarX(bi))),{x:Ai.left+Ci.scrollLeft-Pi.x,y:Ai.top+Ci.scrollTop-Pi.y,width:Ai.width,height:Ai.height}}function order(ii){var ri=new Map,oi=new Set,hi=[];ii.forEach(function(bi){ri.set(bi.name,bi)});function gi(bi){oi.add(bi.name);var Ai=[].concat(bi.requires||[],bi.requiresIfExists||[]);Ai.forEach(function(Ci){if(!oi.has(Ci)){var Pi=ri.get(Ci);Pi&&gi(Pi)}}),hi.push(bi)}return ii.forEach(function(bi){oi.has(bi.name)||gi(bi)}),hi}function orderModifiers(ii){var ri=order(ii);return modifierPhases.reduce(function(oi,hi){return oi.concat(ri.filter(function(gi){return gi.phase===hi}))},[])}function debounce$2(ii){var ri;return function(){return ri||(ri=new Promise(function(oi){Promise.resolve().then(function(){ri=void 0,oi(ii())})})),ri}}function mergeByName(ii){var ri=ii.reduce(function(oi,hi){var gi=oi[hi.name];return oi[hi.name]=gi?Object.assign({},gi,hi,{options:Object.assign({},gi.options,hi.options),data:Object.assign({},gi.data,hi.data)}):hi,oi},{});return Object.keys(ri).map(function(oi){return ri[oi]})}var DEFAULT_OPTIONS={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var ii=arguments.length,ri=new Array(ii),oi=0;oiri._options.maxValue&&(hi.value=ri._options.maxValue.toString()),ri._options.minValue!==null&&parseInt(hi.value)=this._options.maxValue||(this._targetEl.value=(this.getCurrentValue()+1).toString(),this._options.onIncrement(this))},ii.prototype.decrement=function(){this._options.minValue!==null&&this.getCurrentValue()<=this._options.minValue||(this._targetEl.value=(this.getCurrentValue()-1).toString(),this._options.onDecrement(this))},ii.prototype.updateOnIncrement=function(ri){this._options.onIncrement=ri},ii.prototype.updateOnDecrement=function(ri){this._options.onDecrement=ri},ii}();function initInputCounters(){document.querySelectorAll("[data-input-counter]").forEach(function(ii){var ri=ii.id,oi=document.querySelector('[data-input-counter-increment="'+ri+'"]'),hi=document.querySelector('[data-input-counter-decrement="'+ri+'"]'),gi=ii.getAttribute("data-input-counter-min"),bi=ii.getAttribute("data-input-counter-max");ii?instances.instanceExists("InputCounter",ii.getAttribute("id"))||new InputCounter(ii,oi||null,hi||null,{minValue:gi?parseInt(gi):null,maxValue:bi?parseInt(bi):null}):console.error('The target element with id "'.concat(ri,'" does not exist. Please check the data-input-counter attribute.'))})}typeof window<"u"&&(window.InputCounter=InputCounter,window.initInputCounters=initInputCounters);var __assign=globalThis&&globalThis.__assign||function(){return __assign=Object.assign||function(ii){for(var ri,oi=1,hi=arguments.length;oiha?(ea[0].setDate(ha,Ni),ea[1].setDate(sa,Ni)):Yi===1&&sa0?la(this,{target:this.inputs[0]}):Gi[1].dates.length>0&&la(this,{target:this.inputs[1]})}get dates(){return this.datepickers.length===2?[this.datepickers[0].dates[0],this.datepickers[1].dates[0]]:void 0}setOptions($i){this.allowOneSidedRange=!!$i.allowOneSidedRange;const Ri=Zi($i);this.datepickers[0].setOptions(Ri),this.datepickers[1].setOptions(Ri)}destroy(){this.datepickers[0].destroy(),this.datepickers[1].destroy(),(0,zi.uV)(this),delete this.element.rangepicker}getDates($i=void 0){const Ri=$i?ea=>(0,Xi.p6)(ea,$i,this.datepickers[0].config.locale):ea=>new Date(ea);return this.dates.map(ea=>ea===void 0?ea:Ri(ea))}setDates($i,Ri){const[ea,Ni]=this.datepickers,Yi=this.dates;this._updating=!0,ea.setDate($i),Ni.setDate(Ri),delete this._updating,Ni.dates[0]!==Yi[1]?la(this,{target:this.inputs[1]}):ea.dates[0]!==Yi[0]&&la(this,{target:this.inputs[0]})}}},770:function(Ai,Ci,Pi){Pi.d(Ci,{Z:function(){return fa}});var zi=Pi(105),Xi=Pi(560),ji=Pi(963),Zi=Pi(698);const ia={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM y"}};var ra={autohide:!1,beforeShowDay:null,beforeShowDecade:null,beforeShowMonth:null,beforeShowYear:null,calendarWeeks:!1,clearBtn:!1,dateDelimiter:",",datesDisabled:[],daysOfWeekDisabled:[],daysOfWeekHighlighted:[],defaultViewDate:void 0,disableTouchKeyboard:!1,format:"mm/dd/yyyy",language:"en",maxDate:null,maxNumberOfDates:1,maxView:3,minDate:null,nextArrow:'',orientation:"auto",pickLevel:0,prevArrow:'',showDaysOfWeek:!0,showOnClick:!0,showOnFocus:!0,startView:0,title:"",todayBtn:!1,todayBtnMode:0,todayHighlight:!1,updateOnBlur:!0,weekStart:0};const Ki=document.createRange();function $i(Bi){return Ki.createContextualFragment(Bi)}function Ri(Bi){Bi.style.display!=="none"&&(Bi.style.display&&(Bi.dataset.styleDisplay=Bi.style.display),Bi.style.display="none")}function ea(Bi){Bi.style.display==="none"&&(Bi.dataset.styleDisplay?(Bi.style.display=Bi.dataset.styleDisplay,delete Bi.dataset.styleDisplay):Bi.style.display="")}function Ni(Bi){Bi.firstChild&&(Bi.removeChild(Bi.firstChild),Ni(Bi))}function Yi(Bi,Mi){Ni(Bi),Mi instanceof DocumentFragment?Bi.appendChild(Mi):typeof Mi=="string"?Bi.appendChild($i(Mi)):typeof Mi.forEach=="function"&&Mi.forEach(Di=>{Bi.appendChild(Di)})}const{language:Gi,format:sa,weekStart:ha}=ra;function ua(Bi,Mi){return Bi.length<6&&Mi>=0&&Mi<7?(0,zi.$C)(Bi,Mi):Bi}function ga(Bi){return(Bi+6)%7}function pa(Bi,Mi,Di,Wi){const Vi=(0,ji.sG)(Bi,Mi,Di);return Vi!==void 0?Vi:Wi}function wa(Bi,Mi,Di=3){const Wi=parseInt(Bi,10);return Wi>=0&&Wi<=Di?Wi:Mi}function ka(Bi,Mi){const Di=Object.assign({},Bi),Wi={},Vi=Mi.constructor.locales;let{format:ta,language:oa,locale:na,maxDate:ba,maxView:_a,minDate:Aa,pickLevel:Ea,startView:ts,weekStart:qa}=Mi.config||{};if(Di.language){let ya;if(Di.language!==oa&&(Vi[Di.language]?ya=Di.language:(ya=Di.language.split("-")[0],Vi[ya]===void 0&&(ya=!1))),delete Di.language,ya){oa=Wi.language=ya;const Za=na||Vi[Gi];na=Object.assign({format:sa,weekStart:ha},Vi[Gi]),oa!==Gi&&Object.assign(na,Vi[oa]),Wi.locale=na,ta===Za.format&&(ta=Wi.format=na.format),qa===Za.weekStart&&(qa=Wi.weekStart=na.weekStart,Wi.weekEnd=ga(na.weekStart))}}if(Di.format){const ya=typeof Di.format.toDisplay=="function",Za=typeof Di.format.toValue=="function",ys=ji.CL.test(Di.format);(ya&&Za||ys)&&(ta=Wi.format=Di.format),delete Di.format}let os=Aa,is=ba;if(Di.minDate!==void 0&&(os=Di.minDate===null?(0,Xi.by)(0,0,1):pa(Di.minDate,ta,na,os),delete Di.minDate),Di.maxDate!==void 0&&(is=Di.maxDate===null?void 0:pa(Di.maxDate,ta,na,is),delete Di.maxDate),is{const ys=(0,ji.sG)(Za,ta,na);return ys!==void 0?(0,zi.$C)(ya,ys):ya},[]),delete Di.datesDisabled),Di.defaultViewDate!==void 0){const ya=(0,ji.sG)(Di.defaultViewDate,ta,na);ya!==void 0&&(Wi.defaultViewDate=ya),delete Di.defaultViewDate}if(Di.weekStart!==void 0){const ya=Number(Di.weekStart)%7;isNaN(ya)||(qa=Wi.weekStart=ya,Wi.weekEnd=ga(ya)),delete Di.weekStart}if(Di.daysOfWeekDisabled&&(Wi.daysOfWeekDisabled=Di.daysOfWeekDisabled.reduce(ua,[]),delete Di.daysOfWeekDisabled),Di.daysOfWeekHighlighted&&(Wi.daysOfWeekHighlighted=Di.daysOfWeekHighlighted.reduce(ua,[]),delete Di.daysOfWeekHighlighted),Di.maxNumberOfDates!==void 0){const ya=parseInt(Di.maxNumberOfDates,10);ya>=0&&(Wi.maxNumberOfDates=ya,Wi.multidate=ya!==1),delete Di.maxNumberOfDates}Di.dateDelimiter&&(Wi.dateDelimiter=String(Di.dateDelimiter),delete Di.dateDelimiter);let vs=Ea;Di.pickLevel!==void 0&&(vs=wa(Di.pickLevel,2),delete Di.pickLevel),vs!==Ea&&(Ea=Wi.pickLevel=vs);let ss=_a;Di.maxView!==void 0&&(ss=wa(Di.maxView,_a),delete Di.maxView),ss=Ea>ss?Ea:ss,ss!==_a&&(_a=Wi.maxView=ss);let ja=ts;if(Di.startView!==void 0&&(ja=wa(Di.startView,ja),delete Di.startView),ja_a&&(ja=_a),ja!==ts&&(Wi.startView=ja),Di.prevArrow){const ya=$i(Di.prevArrow);ya.childNodes.length>0&&(Wi.prevArrow=ya.childNodes),delete Di.prevArrow}if(Di.nextArrow){const ya=$i(Di.nextArrow);ya.childNodes.length>0&&(Wi.nextArrow=ya.childNodes),delete Di.nextArrow}if(Di.disableTouchKeyboard!==void 0&&(Wi.disableTouchKeyboard="ontouchstart"in document&&!!Di.disableTouchKeyboard,delete Di.disableTouchKeyboard),Di.orientation){const ya=Di.orientation.toLowerCase().split(/\s+/g);Wi.orientation={x:ya.find(Za=>Za==="left"||Za==="right")||"auto",y:ya.find(Za=>Za==="top"||Za==="bottom")||"auto"},delete Di.orientation}if(Di.todayBtnMode!==void 0){switch(Di.todayBtnMode){case 0:case 1:Wi.todayBtnMode=Di.todayBtnMode}delete Di.todayBtnMode}return Object.keys(Di).forEach(ya=>{Di[ya]!==void 0&&(0,zi.l$)(ra,ya)&&(Wi[ya]=Di[ya])}),Wi}var ma=(0,zi.zh)(``),Oa=(0,zi.zh)(`
-
${(0,zi.em)("span",7,{class:"dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm"})}
-
${(0,zi.em)("span",42,{class:"block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400"})}
-
`),Ua=(0,zi.zh)(`
-
-
${(0,zi.em)("span",6,{class:"week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm"})}
-
`);class Wa{constructor(Mi,Di){Object.assign(this,Di,{picker:Mi,element:$i('
').firstChild,selected:[]}),this.init(this.picker.datepicker.config)}init(Mi){Mi.pickLevel!==void 0&&(this.isMinView=this.id===Mi.pickLevel),this.setOptions(Mi),this.updateFocus(),this.updateSelection()}performBeforeHook(Mi,Di,Wi){let Vi=this.beforeShow(new Date(Wi));switch(typeof Vi){case"boolean":Vi={enabled:Vi};break;case"string":Vi={classes:Vi}}if(Vi){if(Vi.enabled===!1&&(Mi.classList.add("disabled"),(0,zi.$C)(this.disabled,Di)),Vi.classes){const ta=Vi.classes.split(/\s+/);Mi.classList.add(...ta),ta.includes("disabled")&&(0,zi.$C)(this.disabled,Di)}Vi.content&&Yi(Mi,Vi.content)}}}class Qa extends Wa{constructor(Mi){super(Mi,{id:0,name:"days",cellClass:"day"})}init(Mi,Di=!0){if(Di){const Wi=$i(Oa).firstChild;this.dow=Wi.firstChild,this.grid=Wi.lastChild,this.element.appendChild(Wi)}super.init(Mi)}setOptions(Mi){let Di;if((0,zi.l$)(Mi,"minDate")&&(this.minDate=Mi.minDate),(0,zi.l$)(Mi,"maxDate")&&(this.maxDate=Mi.maxDate),Mi.datesDisabled&&(this.datesDisabled=Mi.datesDisabled),Mi.daysOfWeekDisabled&&(this.daysOfWeekDisabled=Mi.daysOfWeekDisabled,Di=!0),Mi.daysOfWeekHighlighted&&(this.daysOfWeekHighlighted=Mi.daysOfWeekHighlighted),Mi.todayHighlight!==void 0&&(this.todayHighlight=Mi.todayHighlight),Mi.weekStart!==void 0&&(this.weekStart=Mi.weekStart,this.weekEnd=Mi.weekEnd,Di=!0),Mi.locale){const Wi=this.locale=Mi.locale;this.dayNames=Wi.daysMin,this.switchLabelFormat=Wi.titleFormat,Di=!0}if(Mi.beforeShowDay!==void 0&&(this.beforeShow=typeof Mi.beforeShowDay=="function"?Mi.beforeShowDay:void 0),Mi.calendarWeeks!==void 0)if(Mi.calendarWeeks&&!this.calendarWeeks){const Wi=$i(Ua).firstChild;this.calendarWeeks={element:Wi,dow:Wi.firstChild,weeks:Wi.lastChild},this.element.insertBefore(Wi,this.element.firstChild)}else this.calendarWeeks&&!Mi.calendarWeeks&&(this.element.removeChild(this.calendarWeeks.element),this.calendarWeeks=null);Mi.showDaysOfWeek!==void 0&&(Mi.showDaysOfWeek?(ea(this.dow),this.calendarWeeks&&ea(this.calendarWeeks.dow)):(Ri(this.dow),this.calendarWeeks&&Ri(this.calendarWeeks.dow))),Di&&Array.from(this.dow.children).forEach((Wi,Vi)=>{const ta=(this.weekStart+Vi)%7;Wi.textContent=this.dayNames[ta],Wi.className=this.daysOfWeekDisabled.includes(ta)?"dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed":"dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400"})}updateFocus(){const Mi=new Date(this.picker.viewDate),Di=Mi.getFullYear(),Wi=Mi.getMonth(),Vi=(0,Xi.by)(Di,Wi,1),ta=(0,Xi.fr)(Vi,this.weekStart,this.weekStart);this.first=Vi,this.last=(0,Xi.by)(Di,Wi+1,0),this.start=ta,this.focused=this.picker.viewDate}updateSelection(){const{dates:Mi,rangepicker:Di}=this.picker.datepicker;this.selected=Mi,Di&&(this.range=Di.dates)}render(){this.today=this.todayHighlight?(0,Xi.Lg)():void 0,this.disabled=[...this.datesDisabled];const Mi=(0,ji.p6)(this.focused,this.switchLabelFormat,this.locale);if(this.picker.setViewSwitchLabel(Mi),this.picker.setPrevBtnDisabled(this.first<=this.minDate),this.picker.setNextBtnDisabled(this.last>=this.maxDate),this.calendarWeeks){const Di=(0,Xi.fr)(this.first,1,1);Array.from(this.calendarWeeks.weeks.children).forEach((Wi,Vi)=>{Wi.textContent=(0,Xi.Qk)((0,Xi.jh)(Di,Vi))})}Array.from(this.grid.children).forEach((Di,Wi)=>{const Vi=Di.classList,ta=(0,Xi.E4)(this.start,Wi),oa=new Date(ta),na=oa.getDay();if(Di.className=`datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`,Di.dataset.date=ta,Di.textContent=oa.getDate(),tathis.last&&Vi.add("next","text-gray-500","dark:text-white"),this.today===ta&&Vi.add("today","bg-gray-100","dark:bg-gray-600"),(tathis.maxDate||this.disabled.includes(ta))&&Vi.add("disabled","cursor-not-allowed"),this.daysOfWeekDisabled.includes(na)&&(Vi.add("disabled","cursor-not-allowed"),(0,zi.$C)(this.disabled,ta)),this.daysOfWeekHighlighted.includes(na)&&Vi.add("highlighted"),this.range){const[ba,_a]=this.range;ta>ba&&ta<_a&&(Vi.add("range","bg-gray-200","dark:bg-gray-600"),Vi.remove("rounded-lg","rounded-l-lg","rounded-r-lg")),ta===ba&&(Vi.add("range-start","bg-gray-100","dark:bg-gray-600","rounded-l-lg"),Vi.remove("rounded-lg","rounded-r-lg")),ta===_a&&(Vi.add("range-end","bg-gray-100","dark:bg-gray-600","rounded-r-lg"),Vi.remove("rounded-lg","rounded-l-lg"))}this.selected.includes(ta)&&(Vi.add("selected","bg-blue-700","!bg-primary-700","text-white","dark:bg-blue-600","dark:!bg-primary-600","dark:text-white"),Vi.remove("text-gray-900","text-gray-500","hover:bg-gray-100","dark:text-white","dark:hover:bg-gray-600","dark:bg-gray-600","bg-gray-100","bg-gray-200")),ta===this.focused&&Vi.add("focused"),this.beforeShow&&this.performBeforeHook(Di,ta,ta)})}refresh(){const[Mi,Di]=this.range||[];this.grid.querySelectorAll(".range, .range-start, .range-end, .selected, .focused").forEach(Wi=>{Wi.classList.remove("range","range-start","range-end","selected","bg-blue-700","!bg-primary-700","text-white","dark:bg-blue-600","dark:!bg-primary-600","dark:text-white","focused"),Wi.classList.add("text-gray-900","rounded-lg","dark:text-white")}),Array.from(this.grid.children).forEach(Wi=>{const Vi=Number(Wi.dataset.date),ta=Wi.classList;ta.remove("bg-gray-200","dark:bg-gray-600","rounded-l-lg","rounded-r-lg"),Vi>Mi&&Vi{Di.classList.remove("focused")}),this.grid.children[Mi].classList.add("focused")}}function Ja(Bi,Mi){if(!Bi||!Bi[0]||!Bi[1])return;const[[Di,Wi],[Vi,ta]]=Bi;if(!(Di>Mi||ViWi})))),super.init(Mi)}setOptions(Mi){if(Mi.locale&&(this.monthNames=Mi.locale.monthsShort),(0,zi.l$)(Mi,"minDate"))if(Mi.minDate===void 0)this.minYear=this.minMonth=this.minDate=void 0;else{const Di=new Date(Mi.minDate);this.minYear=Di.getFullYear(),this.minMonth=Di.getMonth(),this.minDate=Di.setDate(1)}if((0,zi.l$)(Mi,"maxDate"))if(Mi.maxDate===void 0)this.maxYear=this.maxMonth=this.maxDate=void 0;else{const Di=new Date(Mi.maxDate);this.maxYear=Di.getFullYear(),this.maxMonth=Di.getMonth(),this.maxDate=(0,Xi.by)(this.maxYear,this.maxMonth+1,0)}Mi.beforeShowMonth!==void 0&&(this.beforeShow=typeof Mi.beforeShowMonth=="function"?Mi.beforeShowMonth:void 0)}updateFocus(){const Mi=new Date(this.picker.viewDate);this.year=Mi.getFullYear(),this.focused=Mi.getMonth()}updateSelection(){const{dates:Mi,rangepicker:Di}=this.picker.datepicker;this.selected=Mi.reduce((Wi,Vi)=>{const ta=new Date(Vi),oa=ta.getFullYear(),na=ta.getMonth();return Wi[oa]===void 0?Wi[oa]=[na]:(0,zi.$C)(Wi[oa],na),Wi},{}),Di&&Di.dates&&(this.range=Di.dates.map(Wi=>{const Vi=new Date(Wi);return isNaN(Vi)?void 0:[Vi.getFullYear(),Vi.getMonth()]}))}render(){this.disabled=[],this.picker.setViewSwitchLabel(this.year),this.picker.setPrevBtnDisabled(this.year<=this.minYear),this.picker.setNextBtnDisabled(this.year>=this.maxYear);const Mi=this.selected[this.year]||[],Di=this.yearthis.maxYear,Wi=this.year===this.minYear,Vi=this.year===this.maxYear,ta=Ja(this.range,this.year);Array.from(this.grid.children).forEach((oa,na)=>{const ba=oa.classList,_a=(0,Xi.by)(this.year,na,1);if(oa.className=`datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`,this.isMinView&&(oa.dataset.date=_a),oa.textContent=this.monthNames[na],(Di||Wi&&nathis.maxMonth)&&ba.add("disabled"),ta){const[Aa,Ea]=ta;na>Aa&&na{Vi.classList.remove("range","range-start","range-end","selected","bg-blue-700","!bg-primary-700","dark:bg-blue-600","dark:!bg-primary-700","dark:text-white","text-white","focused"),Vi.classList.add("text-gray-900","hover:bg-gray-100","dark:text-white","dark:hover:bg-gray-600")}),Array.from(this.grid.children).forEach((Vi,ta)=>{const oa=Vi.classList;ta>Di&&ta{Mi.classList.remove("focused")}),this.grid.children[this.focused].classList.add("focused")}}function Va(Bi){return[...Bi].reduce((Mi,Di,Wi)=>Mi+=Wi?Di:Di.toUpperCase(),"")}class Pa extends Wa{constructor(Mi,Di){super(Mi,Di)}init(Mi,Di=!0){Di&&(this.navStep=this.step*10,this.beforeShowOption=`beforeShow${Va(this.cellClass)}`,this.grid=this.element,this.element.classList.add(this.name,"datepicker-grid","w-64","grid","grid-cols-4"),this.grid.appendChild($i((0,zi.em)("span",12)))),super.init(Mi)}setOptions(Mi){if((0,zi.l$)(Mi,"minDate")&&(Mi.minDate===void 0?this.minYear=this.minDate=void 0:(this.minYear=(0,Xi.ak)(Mi.minDate,this.step),this.minDate=(0,Xi.by)(this.minYear,0,1))),(0,zi.l$)(Mi,"maxDate")&&(Mi.maxDate===void 0?this.maxYear=this.maxDate=void 0:(this.maxYear=(0,Xi.ak)(Mi.maxDate,this.step),this.maxDate=(0,Xi.by)(this.maxYear,11,31))),Mi[this.beforeShowOption]!==void 0){const Di=Mi[this.beforeShowOption];this.beforeShow=typeof Di=="function"?Di:void 0}}updateFocus(){const Mi=new Date(this.picker.viewDate),Di=(0,Xi.ak)(Mi,this.navStep),Wi=Di+9*this.step;this.first=Di,this.last=Wi,this.start=Di-this.step,this.focused=(0,Xi.ak)(Mi,this.step)}updateSelection(){const{dates:Mi,rangepicker:Di}=this.picker.datepicker;this.selected=Mi.reduce((Wi,Vi)=>(0,zi.$C)(Wi,(0,Xi.ak)(Vi,this.step)),[]),Di&&Di.dates&&(this.range=Di.dates.map(Wi=>{if(Wi!==void 0)return(0,Xi.ak)(Wi,this.step)}))}render(){this.disabled=[],this.picker.setViewSwitchLabel(`${this.first}-${this.last}`),this.picker.setPrevBtnDisabled(this.first<=this.minYear),this.picker.setNextBtnDisabled(this.last>=this.maxYear),Array.from(this.grid.children).forEach((Mi,Di)=>{const Wi=Mi.classList,Vi=this.start+Di*this.step,ta=(0,Xi.by)(Vi,0,1);if(Mi.className=`datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ${this.cellClass}`,this.isMinView&&(Mi.dataset.date=ta),Mi.textContent=Mi.dataset.year=Vi,Di===0?Wi.add("prev"):Di===11&&Wi.add("next"),(Vithis.maxYear)&&Wi.add("disabled"),this.range){const[oa,na]=this.range;Vi>oa&&Vi{Wi.classList.remove("range","range-start","range-end","selected","bg-blue-700","!bg-primary-700","text-white","dark:bg-blue-600","dark!bg-primary-600","dark:text-white","focused")}),Array.from(this.grid.children).forEach(Wi=>{const Vi=Number(Wi.textContent),ta=Wi.classList;Vi>Mi&&Vi{Di.classList.remove("focused")}),this.grid.children[Mi].classList.add("focused")}}function Fa(Bi,Mi){const Di={date:Bi.getDate(),viewDate:new Date(Bi.picker.viewDate),viewId:Bi.picker.currentView.id,datepicker:Bi};Bi.element.dispatchEvent(new CustomEvent(Mi,{detail:Di}))}function Na(Bi,Mi){const{minDate:Di,maxDate:Wi}=Bi.config,{currentView:Vi,viewDate:ta}=Bi.picker;let oa;switch(Vi.id){case 0:oa=(0,Xi.zI)(ta,Mi);break;case 1:oa=(0,Xi.Bc)(ta,Mi);break;default:oa=(0,Xi.Bc)(ta,Mi*Vi.navStep)}oa=(0,zi.jG)(oa,Di,Wi),Bi.picker.changeFocus(oa).render()}function Yr(Bi){const Mi=Bi.picker.currentView.id;Mi!==Bi.config.maxView&&Bi.picker.changeView(Mi+1).render()}function Ba(Bi){Bi.config.updateOnBlur?Bi.update({autohide:!0}):(Bi.refresh("input"),Bi.hide())}function Wr(Bi,Mi){const Di=Bi.picker,Wi=new Date(Di.viewDate),Vi=Di.currentView.id,ta=Vi===1?(0,Xi.zI)(Wi,Mi-Wi.getMonth()):(0,Xi.Bc)(Wi,Mi-Wi.getFullYear());Di.changeFocus(ta).changeView(Vi-1).render()}function Jr(Bi){const Mi=Bi.picker,Di=(0,Xi.Lg)();if(Bi.config.todayBtnMode===1){if(Bi.config.autohide){Bi.setDate(Di);return}Bi.setDate(Di,{render:!1}),Mi.update()}Mi.viewDate!==Di&&Mi.changeFocus(Di),Mi.changeView(0).render()}function us(Bi){Bi.setDate({clear:!0})}function za(Bi){Yr(Bi)}function es(Bi){Na(Bi,-1)}function ns(Bi){Na(Bi,1)}function fs(Bi,Mi){const Di=(0,Zi.He)(Mi,".datepicker-cell");if(!Di||Di.classList.contains("disabled"))return;const{id:Wi,isMinView:Vi}=Bi.picker.currentView;Vi?Bi.setDate(Number(Di.dataset.date)):Wi===1?Wr(Bi,Number(Di.dataset.month)):Wr(Bi,Number(Di.dataset.year))}function Ga(Bi){!Bi.inline&&!Bi.config.disableTouchKeyboard&&Bi.inputField.focus()}function $a(Bi,Mi){if(Mi.title!==void 0&&(Mi.title?(Bi.controls.title.textContent=Mi.title,ea(Bi.controls.title)):(Bi.controls.title.textContent="",Ri(Bi.controls.title))),Mi.prevArrow){const Di=Bi.controls.prevBtn;Ni(Di),Mi.prevArrow.forEach(Wi=>{Di.appendChild(Wi.cloneNode(!0))})}if(Mi.nextArrow){const Di=Bi.controls.nextBtn;Ni(Di),Mi.nextArrow.forEach(Wi=>{Di.appendChild(Wi.cloneNode(!0))})}if(Mi.locale&&(Bi.controls.todayBtn.textContent=Mi.locale.today,Bi.controls.clearBtn.textContent=Mi.locale.clear),Mi.todayBtn!==void 0&&(Mi.todayBtn?ea(Bi.controls.todayBtn):Ri(Bi.controls.todayBtn)),(0,zi.l$)(Mi,"minDate")||(0,zi.l$)(Mi,"maxDate")){const{minDate:Di,maxDate:Wi}=Bi.datepicker.config;Bi.controls.todayBtn.disabled=!(0,zi.mh)((0,Xi.Lg)(),Di,Wi)}Mi.clearBtn!==void 0&&(Mi.clearBtn?ea(Bi.controls.clearBtn):Ri(Bi.controls.clearBtn))}function Qr(Bi){const{dates:Mi,config:Di}=Bi,Wi=Mi.length>0?(0,zi.Jm)(Mi):Di.defaultViewDate;return(0,zi.jG)(Wi,Di.minDate,Di.maxDate)}function Zr(Bi,Mi){const Di=new Date(Bi.viewDate),Wi=new Date(Mi),{id:Vi,year:ta,first:oa,last:na}=Bi.currentView,ba=Wi.getFullYear();switch(Bi.viewDate=Mi,ba!==Di.getFullYear()&&Fa(Bi.datepicker,"changeYear"),Wi.getMonth()!==Di.getMonth()&&Fa(Bi.datepicker,"changeMonth"),Vi){case 0:return Mina;case 1:return ba!==ta;default:return bana}}function rs(Bi){return window.getComputedStyle(Bi).direction}class xs{constructor(Mi){this.datepicker=Mi;const Di=ma.replace(/%buttonClass%/g,Mi.config.buttonClass),Wi=this.element=$i(Di).firstChild,[Vi,ta,oa]=Wi.firstChild.children,na=Vi.firstElementChild,[ba,_a,Aa]=Vi.lastElementChild.children,[Ea,ts]=oa.firstChild.children,qa={title:na,prevBtn:ba,viewSwitch:_a,nextBtn:Aa,todayBtn:Ea,clearBtn:ts};this.main=ta,this.controls=qa;const os=Mi.inline?"inline":"dropdown";Wi.classList.add(`datepicker-${os}`),os==="dropdown"&&Wi.classList.add("dropdown","absolute","top-0","left-0","z-50","pt-2"),$a(this,Mi.config),this.viewDate=Qr(Mi),(0,Zi.cF)(Mi,[[Wi,"click",Ga.bind(null,Mi),{capture:!0}],[ta,"click",fs.bind(null,Mi)],[qa.viewSwitch,"click",za.bind(null,Mi)],[qa.prevBtn,"click",es.bind(null,Mi)],[qa.nextBtn,"click",ns.bind(null,Mi)],[qa.todayBtn,"click",Jr.bind(null,Mi)],[qa.clearBtn,"click",us.bind(null,Mi)]]),this.views=[new Qa(this),new Ya(this),new Pa(this,{id:2,name:"years",cellClass:"year",step:1}),new Pa(this,{id:3,name:"decades",cellClass:"decade",step:10})],this.currentView=this.views[Mi.config.startView],this.currentView.render(),this.main.appendChild(this.currentView.element),Mi.config.container.appendChild(this.element)}setOptions(Mi){$a(this,Mi),this.views.forEach(Di=>{Di.init(Mi,!1)}),this.currentView.render()}detach(){this.datepicker.config.container.removeChild(this.element)}show(){if(this.active)return;this.element.classList.add("active","block"),this.element.classList.remove("hidden"),this.active=!0;const Mi=this.datepicker;if(!Mi.inline){const Di=rs(Mi.inputField);Di!==rs(Mi.config.container)?this.element.dir=Di:this.element.dir&&this.element.removeAttribute("dir"),this.place(),Mi.config.disableTouchKeyboard&&Mi.inputField.blur()}Fa(Mi,"show")}hide(){this.active&&(this.datepicker.exitEditMode(),this.element.classList.remove("active","block"),this.element.classList.add("active","block","hidden"),this.active=!1,Fa(this.datepicker,"hide"))}place(){const{classList:Mi,style:Di}=this.element,{config:Wi,inputField:Vi}=this.datepicker,ta=Wi.container,{width:oa,height:na}=this.element.getBoundingClientRect(),{left:ba,top:_a,width:Aa}=ta.getBoundingClientRect(),{left:Ea,top:ts,width:qa,height:os}=Vi.getBoundingClientRect();let{x:is,y:vs}=Wi.orientation,ss,ja,ya;ta===document.body?(ss=window.scrollY,ja=Ea+window.scrollX,ya=ts+ss):(ss=ta.scrollTop,ja=Ea-ba,ya=ts-_a+ss),is==="auto"&&(ja<0?(is="left",ja=10):ja+oa>Aa?is="right":is=rs(Vi)==="rtl"?"right":"left"),is==="right"&&(ja-=oa-qa),vs==="auto"&&(vs=ya-na{Di.updateFocus()}),this}update(){const Mi=Qr(this.datepicker);return this._renderMethod=Zr(this,Mi)?"render":"refresh",this.views.forEach(Di=>{Di.updateFocus(),Di.updateSelection()}),this}render(Mi=!0){const Di=Mi&&this._renderMethod||"render";delete this._renderMethod,this.currentView[Di]()}}function hs(Bi,Mi,Di,Wi,Vi,ta){if((0,zi.mh)(Bi,Vi,ta)){if(Wi(Bi)){const oa=Mi(Bi,Di);return hs(oa,Mi,Di,Wi,Vi,ta)}return Bi}}function ds(Bi,Mi,Di,Wi){const Vi=Bi.picker,ta=Vi.currentView,oa=ta.step||1;let na=Vi.viewDate,ba,_a;switch(ta.id){case 0:Wi?na=(0,Xi.E4)(na,Di*7):Mi.ctrlKey||Mi.metaKey?na=(0,Xi.Bc)(na,Di):na=(0,Xi.E4)(na,Di),ba=Xi.E4,_a=Aa=>ta.disabled.includes(Aa);break;case 1:na=(0,Xi.zI)(na,Wi?Di*4:Di),ba=Xi.zI,_a=Aa=>{const Ea=new Date(Aa),{year:ts,disabled:qa}=ta;return Ea.getFullYear()===ts&&qa.includes(Ea.getMonth())};break;default:na=(0,Xi.Bc)(na,Di*(Wi?4:1)*oa),ba=Xi.Bc,_a=Aa=>ta.disabled.includes((0,Xi.ak)(Aa,oa))}na=hs(na,ba,Di<0?-oa:oa,_a,ta.minDate,ta.maxDate),na!==void 0&&Vi.changeFocus(na).render()}function ks(Bi,Mi){if(Mi.key==="Tab"){Ba(Bi);return}const Di=Bi.picker,{id:Wi,isMinView:Vi}=Di.currentView;if(Di.active)if(Bi.editMode)switch(Mi.key){case"Escape":Di.hide();break;case"Enter":Bi.exitEditMode({update:!0,autohide:Bi.config.autohide});break;default:return}else switch(Mi.key){case"Escape":Di.hide();break;case"ArrowLeft":if(Mi.ctrlKey||Mi.metaKey)Na(Bi,-1);else if(Mi.shiftKey){Bi.enterEditMode();return}else ds(Bi,Mi,-1,!1);break;case"ArrowRight":if(Mi.ctrlKey||Mi.metaKey)Na(Bi,1);else if(Mi.shiftKey){Bi.enterEditMode();return}else ds(Bi,Mi,1,!1);break;case"ArrowUp":if(Mi.ctrlKey||Mi.metaKey)Yr(Bi);else if(Mi.shiftKey){Bi.enterEditMode();return}else ds(Bi,Mi,-1,!0);break;case"ArrowDown":if(Mi.shiftKey&&!Mi.ctrlKey&&!Mi.metaKey){Bi.enterEditMode();return}ds(Bi,Mi,1,!0);break;case"Enter":Vi?Bi.setDate(Di.viewDate):Di.changeView(Wi-1).render();break;case"Backspace":case"Delete":Bi.enterEditMode();return;default:Mi.key.length===1&&!Mi.ctrlKey&&!Mi.metaKey&&Bi.enterEditMode();return}else switch(Mi.key){case"ArrowDown":case"Escape":Di.show();break;case"Enter":Bi.update();break;default:return}Mi.preventDefault(),Mi.stopPropagation()}function gs(Bi){Bi.config.showOnFocus&&!Bi._showing&&Bi.show()}function As(Bi,Mi){const Di=Mi.target;(Bi.picker.active||Bi.config.showOnClick)&&(Di._active=Di===document.activeElement,Di._clicking=setTimeout(()=>{delete Di._active,delete Di._clicking},2e3))}function ms(Bi,Mi){const Di=Mi.target;Di._clicking&&(clearTimeout(Di._clicking),delete Di._clicking,Di._active&&Bi.enterEditMode(),delete Di._active,Bi.config.showOnClick&&Bi.show())}function Cs(Bi,Mi){Mi.clipboardData.types.includes("text/plain")&&Bi.enterEditMode()}function Es(Bi,Mi){const Di=Bi.element;if(Di!==document.activeElement)return;const Wi=Bi.picker.element;(0,Zi.He)(Mi,Vi=>Vi===Di||Vi===Wi)||Ba(Bi)}function Ss(Bi,Mi){return Bi.map(Di=>(0,ji.p6)(Di,Mi.format,Mi.locale)).join(Mi.dateDelimiter)}function _s(Bi,Mi,Di=!1){const{config:Wi,dates:Vi,rangepicker:ta}=Bi;if(Mi.length===0)return Di?[]:void 0;const oa=ta&&Bi===ta.datepickers[1];let na=Mi.reduce((ba,_a)=>{let Aa=(0,ji.sG)(_a,Wi.format,Wi.locale);if(Aa===void 0)return ba;if(Wi.pickLevel>0){const Ea=new Date(Aa);Wi.pickLevel===1?Aa=oa?Ea.setMonth(Ea.getMonth()+1,0):Ea.setDate(1):Aa=oa?Ea.setFullYear(Ea.getFullYear()+1,0,0):Ea.setMonth(0,1)}return(0,zi.mh)(Aa,Wi.minDate,Wi.maxDate)&&!ba.includes(Aa)&&!Wi.datesDisabled.includes(Aa)&&!Wi.daysOfWeekDisabled.includes(new Date(Aa).getDay())&&ba.push(Aa),ba},[]);if(na.length!==0)return Wi.multidate&&!Di&&(na=na.reduce((ba,_a)=>(Vi.includes(_a)||ba.push(_a),ba),Vi.filter(ba=>!na.includes(ba)))),Wi.maxNumberOfDates&&na.length>Wi.maxNumberOfDates?na.slice(Wi.maxNumberOfDates*-1):na}function bs(Bi,Mi=3,Di=!0){const{config:Wi,picker:Vi,inputField:ta}=Bi;if(Mi&2){const oa=Vi.active?Wi.pickLevel:Wi.startView;Vi.update().changeView(oa).render(Di)}Mi&1&&ta&&(ta.value=Ss(Bi.dates,Wi))}function Ji(Bi,Mi,Di){let{clear:Wi,render:Vi,autohide:ta}=Di;Vi===void 0&&(Vi=!0),Vi?ta===void 0&&(ta=Bi.config.autohide):ta=!1;const oa=_s(Bi,Mi,Wi);oa&&(oa.toString()!==Bi.dates.toString()?(Bi.dates=oa,bs(Bi,Vi?3:1),Fa(Bi,"changeDate")):bs(Bi,1),ta&&Bi.hide())}class fa{constructor(Mi,Di={},Wi=void 0){Mi.datepicker=this,this.element=Mi;const Vi=this.config=Object.assign({buttonClass:Di.buttonClass&&String(Di.buttonClass)||"button",container:document.body,defaultViewDate:(0,Xi.Lg)(),maxDate:void 0,minDate:void 0},ka(ra,this));this._options=Di,Object.assign(Vi,ka(Di,this));const ta=this.inline=Mi.tagName!=="INPUT";let oa,na;if(ta)Vi.container=Mi,na=(0,zi.W7)(Mi.dataset.date,Vi.dateDelimiter),delete Mi.dataset.date;else{const Aa=Di.container?document.querySelector(Di.container):null;Aa&&(Vi.container=Aa),oa=this.inputField=Mi,oa.classList.add("datepicker-input"),na=(0,zi.W7)(oa.value,Vi.dateDelimiter)}if(Wi){const Aa=Wi.inputs.indexOf(oa),Ea=Wi.datepickers;if(Aa<0||Aa>1||!Array.isArray(Ea))throw Error("Invalid rangepicker object.");Ea[Aa]=this,Object.defineProperty(this,"rangepicker",{get(){return Wi}})}this.dates=[];const ba=_s(this,na);ba&&ba.length>0&&(this.dates=ba),oa&&(oa.value=Ss(this.dates,Vi));const _a=this.picker=new xs(this);if(ta)this.show();else{const Aa=Es.bind(null,this),Ea=[[oa,"keydown",ks.bind(null,this)],[oa,"focus",gs.bind(null,this)],[oa,"mousedown",As.bind(null,this)],[oa,"click",ms.bind(null,this)],[oa,"paste",Cs.bind(null,this)],[document,"mousedown",Aa],[document,"touchstart",Aa],[window,"resize",_a.place.bind(_a)]];(0,Zi.cF)(this,Ea)}}static formatDate(Mi,Di,Wi){return(0,ji.p6)(Mi,Di,Wi&&ia[Wi]||ia.en)}static parseDate(Mi,Di,Wi){return(0,ji.sG)(Mi,Di,Wi&&ia[Wi]||ia.en)}static get locales(){return ia}get active(){return!!(this.picker&&this.picker.active)}get pickerElement(){return this.picker?this.picker.element:void 0}setOptions(Mi){const Di=this.picker,Wi=ka(Mi,this);Object.assign(this._options,Mi),Object.assign(this.config,Wi),Di.setOptions(Wi),bs(this,3)}show(){if(this.inputField){if(this.inputField.disabled)return;this.inputField!==document.activeElement&&(this._showing=!0,this.inputField.focus(),delete this._showing)}this.picker.show()}hide(){this.inline||(this.picker.hide(),this.picker.update().changeView(this.config.startView).render())}destroy(){return this.hide(),(0,Zi.uV)(this),this.picker.detach(),this.inline||this.inputField.classList.remove("datepicker-input"),delete this.element.datepicker,this}getDate(Mi=void 0){const Di=Mi?Wi=>(0,ji.p6)(Wi,Mi,this.config.locale):Wi=>new Date(Wi);if(this.config.multidate)return this.dates.map(Di);if(this.dates.length>0)return Di(this.dates[0])}setDate(...Mi){const Di=[...Mi],Wi={},Vi=(0,zi.Jm)(Mi);typeof Vi=="object"&&!Array.isArray(Vi)&&!(Vi instanceof Date)&&Vi&&Object.assign(Wi,Di.pop());const ta=Array.isArray(Di[0])?Di[0]:Di;Ji(this,ta,Wi)}update(Mi=void 0){if(this.inline)return;const Di={clear:!0,autohide:!!(Mi&&Mi.autohide)},Wi=(0,zi.W7)(this.inputField.value,this.config.dateDelimiter);Ji(this,Wi,Di)}refresh(Mi=void 0,Di=!1){Mi&&typeof Mi!="string"&&(Di=Mi,Mi=void 0);let Wi;Mi==="picker"?Wi=2:Mi==="input"?Wi=1:Wi=3,bs(this,Wi,!Di)}enterEditMode(){this.inline||!this.picker.active||this.editMode||(this.editMode=!0,this.inputField.classList.add("in-edit","border-blue-700","!border-primary-700"))}exitEditMode(Mi=void 0){if(this.inline||!this.editMode)return;const Di=Object.assign({update:!1},Mi);delete this.editMode,this.inputField.classList.remove("in-edit","border-blue-700","!border-primary-700"),Di.update&&this.update(Di)}}},963:function(Ai,Ci,Pi){Pi.d(Ci,{CL:function(){return ji},p6:function(){return Ni},sG:function(){return ea}});var zi=Pi(560),Xi=Pi(105);const ji=/dd?|DD?|mm?|MM?|yy?(?:yy)?/,Zi=/[\s!-/:-@[-`{-~年月日]+/;let ia={};const la={y(Yi,Gi){return new Date(Yi).setFullYear(parseInt(Gi,10))},m(Yi,Gi,sa){const ha=new Date(Yi);let ua=parseInt(Gi,10)-1;if(isNaN(ua)){if(!Gi)return NaN;const ga=Gi.toLowerCase(),pa=wa=>wa.toLowerCase().startsWith(ga);if(ua=sa.monthsShort.findIndex(pa),ua<0&&(ua=sa.months.findIndex(pa)),ua<0)return NaN}return ha.setMonth(ua),ha.getMonth()!==Ki(ua)?ha.setDate(0):ha.getTime()},d(Yi,Gi){return new Date(Yi).setDate(parseInt(Gi,10))}},ra={d(Yi){return Yi.getDate()},dd(Yi){return $i(Yi.getDate(),2)},D(Yi,Gi){return Gi.daysShort[Yi.getDay()]},DD(Yi,Gi){return Gi.days[Yi.getDay()]},m(Yi){return Yi.getMonth()+1},mm(Yi){return $i(Yi.getMonth()+1,2)},M(Yi,Gi){return Gi.monthsShort[Yi.getMonth()]},MM(Yi,Gi){return Gi.months[Yi.getMonth()]},y(Yi){return Yi.getFullYear()},yy(Yi){return $i(Yi.getFullYear(),2).slice(-2)},yyyy(Yi){return $i(Yi.getFullYear(),4)}};function Ki(Yi){return Yi>-1?Yi%12:Ki(Yi+12)}function $i(Yi,Gi){return Yi.toString().padStart(Gi,"0")}function Ri(Yi){if(typeof Yi!="string")throw new Error("Invalid date format.");if(Yi in ia)return ia[Yi];const Gi=Yi.split(ji),sa=Yi.match(new RegExp(ji,"g"));if(Gi.length===0||!sa)throw new Error("Invalid date format.");const ha=sa.map(ga=>ra[ga]),ua=Object.keys(la).reduce((ga,pa)=>(sa.find(ka=>ka[0]!=="D"&&ka[0].toLowerCase()===pa)&&ga.push(pa),ga),[]);return ia[Yi]={parser(ga,pa){const wa=ga.split(Zi).reduce((ka,La,ma)=>{if(La.length>0&&sa[ma]){const Ra=sa[ma][0];Ra==="M"?ka.m=La:Ra!=="D"&&(ka[Ra]=La)}return ka},{});return ua.reduce((ka,La)=>{const ma=la[La](ka,wa[La],pa);return isNaN(ma)?ka:ma},(0,zi.Lg)())},formatter(ga,pa){let wa=ha.reduce((ka,La,ma)=>ka+=`${Gi[ma]}${La(ga,pa)}`,"");return wa+=(0,Xi.Jm)(Gi)}}}function ea(Yi,Gi,sa){if(Yi instanceof Date||typeof Yi=="number"){const ha=(0,zi.xR)(Yi);return isNaN(ha)?void 0:ha}if(Yi){if(Yi==="today")return(0,zi.Lg)();if(Gi&&Gi.toValue){const ha=Gi.toValue(Yi,Gi,sa);return isNaN(ha)?void 0:(0,zi.xR)(ha)}return Ri(Gi).parser(Yi,sa)}}function Ni(Yi,Gi,sa){if(isNaN(Yi)||!Yi&&Yi!==0)return"";const ha=typeof Yi=="number"?new Date(Yi):Yi;return Gi.toDisplay?Gi.toDisplay(ha,Gi,sa):Ri(Gi).formatter(ha,sa)}},560:function(Ai,Ci,Pi){Pi.d(Ci,{Bc:function(){return ra},E4:function(){return Zi},Lg:function(){return Xi},Qk:function(){return Ri},ak:function(){return ea},by:function(){return ji},fr:function(){return $i},jh:function(){return ia},xR:function(){return zi},zI:function(){return la}});function zi(Ni){return new Date(Ni).setHours(0,0,0,0)}function Xi(){return new Date().setHours(0,0,0,0)}function ji(...Ni){switch(Ni.length){case 0:return Xi();case 1:return zi(Ni[0])}const Yi=new Date(0);return Yi.setFullYear(...Ni),Yi.setHours(0,0,0,0)}function Zi(Ni,Yi){const Gi=new Date(Ni);return Gi.setDate(Gi.getDate()+Yi)}function ia(Ni,Yi){return Zi(Ni,Yi*7)}function la(Ni,Yi){const Gi=new Date(Ni),sa=Gi.getMonth()+Yi;let ha=sa%12;ha<0&&(ha+=12);const ua=Gi.setMonth(sa);return Gi.getMonth()!==ha?Gi.setDate(0):ua}function ra(Ni,Yi){const Gi=new Date(Ni),sa=Gi.getMonth(),ha=Gi.setFullYear(Gi.getFullYear()+Yi);return sa===1&&Gi.getMonth()===2?Gi.setDate(0):ha}function Ki(Ni,Yi){return(Ni-Yi+7)%7}function $i(Ni,Yi,Gi=0){const sa=new Date(Ni).getDay();return Zi(Ni,Ki(Yi,Gi)-Ki(sa,Gi))}function Ri(Ni){const Yi=$i(Ni,4,1),Gi=$i(new Date(Yi).setMonth(0,4),4,1);return Math.round((Yi-Gi)/6048e5)+1}function ea(Ni,Yi){const Gi=new Date(Ni).getFullYear();return Math.floor(Gi/Yi)*Yi}},698:function(Ai,Ci,Pi){Pi.d(Ci,{He:function(){return ra},cF:function(){return Zi},uV:function(){return ia}});const zi=new WeakMap,{addEventListener:Xi,removeEventListener:ji}=EventTarget.prototype;function Zi(Ki,$i){let Ri=zi.get(Ki);Ri||(Ri=[],zi.set(Ki,Ri)),$i.forEach(ea=>{Xi.call(...ea),Ri.push(ea)})}function ia(Ki){let $i=zi.get(Ki);$i&&($i.forEach(Ri=>{ji.call(...Ri)}),zi.delete(Ki))}if(!Event.prototype.composedPath){const Ki=($i,Ri=[])=>{Ri.push($i);let ea;return $i.parentNode?ea=$i.parentNode:$i.host?ea=$i.host:$i.defaultView&&(ea=$i.defaultView),ea?Ki(ea,Ri):Ri};Event.prototype.composedPath=function(){return Ki(this.target)}}function la(Ki,$i,Ri,ea=0){const Ni=Ki[ea];return $i(Ni)?Ni:Ni===Ri||!Ni.parentElement?void 0:la(Ki,$i,Ri,ea+1)}function ra(Ki,$i){const Ri=typeof $i=="function"?$i:ea=>ea.matches($i);return la(Ki.composedPath(),Ri,Ki.currentTarget)}},105:function(Ai,Ci,Pi){Pi.d(Ci,{$C:function(){return ji},Jm:function(){return Xi},W7:function(){return Zi},em:function(){return ra},jG:function(){return la},l$:function(){return zi},mh:function(){return ia},zh:function(){return Ki}});function zi($i,Ri){return Object.prototype.hasOwnProperty.call($i,Ri)}function Xi($i){return $i[$i.length-1]}function ji($i,...Ri){return Ri.forEach(ea=>{$i.includes(ea)||$i.push(ea)}),$i}function Zi($i,Ri){return $i?$i.split(Ri):[]}function ia($i,Ri,ea){const Ni=Ri===void 0||$i>=Ri,Yi=ea===void 0||$i<=ea;return Ni&&Yi}function la($i,Ri,ea){return $iea?ea:$i}function ra($i,Ri,ea={},Ni=0,Yi=""){const Gi=Object.keys(ea).reduce((ha,ua)=>{let ga=ea[ua];return typeof ga=="function"&&(ga=ga(Ni)),`${ha} ${ua}="${ga}"`},$i);Yi+=`<${Gi}>`;const sa=Ni+1;return sa\s+/g,">").replace(/\s+lastFlushedIndex&&queue.splice(ri,1)}function queueFlush(){!flushing&&!flushPending&&(flushPending=!0,queueMicrotask(flushJobs))}function flushJobs(){flushPending=!1,flushing=!0;for(let ii=0;iiii.effect(ri,{scheduler:oi=>{shouldSchedule?scheduler(oi):oi()}}),raw=ii.raw}function overrideEffect(ii){effect=ii}function elementBoundEffect(ii){let ri=()=>{};return[hi=>{let gi=effect(hi);return ii._x_effects||(ii._x_effects=new Set,ii._x_runEffects=()=>{ii._x_effects.forEach(bi=>bi())}),ii._x_effects.add(gi),ri=()=>{gi!==void 0&&(ii._x_effects.delete(gi),release(gi))},gi},()=>{ri()}]}function watch(ii,ri){let oi=!0,hi,gi=effect(()=>{let bi=ii();JSON.stringify(bi),oi?hi=bi:queueMicrotask(()=>{ri(bi,hi),hi=bi}),oi=!1});return()=>release(gi)}var onAttributeAddeds=[],onElRemoveds=[],onElAddeds=[];function onElAdded(ii){onElAddeds.push(ii)}function onElRemoved(ii,ri){typeof ri=="function"?(ii._x_cleanups||(ii._x_cleanups=[]),ii._x_cleanups.push(ri)):(ri=ii,onElRemoveds.push(ri))}function onAttributesAdded(ii){onAttributeAddeds.push(ii)}function onAttributeRemoved(ii,ri,oi){ii._x_attributeCleanups||(ii._x_attributeCleanups={}),ii._x_attributeCleanups[ri]||(ii._x_attributeCleanups[ri]=[]),ii._x_attributeCleanups[ri].push(oi)}function cleanupAttributes(ii,ri){ii._x_attributeCleanups&&Object.entries(ii._x_attributeCleanups).forEach(([oi,hi])=>{(ri===void 0||ri.includes(oi))&&(hi.forEach(gi=>gi()),delete ii._x_attributeCleanups[oi])})}function cleanupElement(ii){if(ii._x_cleanups)for(;ii._x_cleanups.length;)ii._x_cleanups.pop()()}var observer=new MutationObserver(onMutate),currentlyObserving=!1;function startObservingMutations(){observer.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),currentlyObserving=!0}function stopObservingMutations(){flushObserver(),observer.disconnect(),currentlyObserving=!1}var queuedMutations=[];function flushObserver(){let ii=observer.takeRecords();queuedMutations.push(()=>ii.length>0&&onMutate(ii));let ri=queuedMutations.length;queueMicrotask(()=>{if(queuedMutations.length===ri)for(;queuedMutations.length>0;)queuedMutations.shift()()})}function mutateDom(ii){if(!currentlyObserving)return ii();stopObservingMutations();let ri=ii();return startObservingMutations(),ri}var isCollecting=!1,deferredMutations=[];function deferMutations(){isCollecting=!0}function flushAndStopDeferringMutations(){isCollecting=!1,onMutate(deferredMutations),deferredMutations=[]}function onMutate(ii){if(isCollecting){deferredMutations=deferredMutations.concat(ii);return}let ri=new Set,oi=new Set,hi=new Map,gi=new Map;for(let bi=0;biAi.nodeType===1&&ri.add(Ai)),ii[bi].removedNodes.forEach(Ai=>Ai.nodeType===1&&oi.add(Ai))),ii[bi].type==="attributes")){let Ai=ii[bi].target,Ci=ii[bi].attributeName,Pi=ii[bi].oldValue,zi=()=>{hi.has(Ai)||hi.set(Ai,[]),hi.get(Ai).push({name:Ci,value:Ai.getAttribute(Ci)})},Xi=()=>{gi.has(Ai)||gi.set(Ai,[]),gi.get(Ai).push(Ci)};Ai.hasAttribute(Ci)&&Pi===null?zi():Ai.hasAttribute(Ci)?(Xi(),zi()):Xi()}gi.forEach((bi,Ai)=>{cleanupAttributes(Ai,bi)}),hi.forEach((bi,Ai)=>{onAttributeAddeds.forEach(Ci=>Ci(Ai,bi))});for(let bi of oi)ri.has(bi)||onElRemoveds.forEach(Ai=>Ai(bi));ri.forEach(bi=>{bi._x_ignoreSelf=!0,bi._x_ignore=!0});for(let bi of ri)oi.has(bi)||bi.isConnected&&(delete bi._x_ignoreSelf,delete bi._x_ignore,onElAddeds.forEach(Ai=>Ai(bi)),bi._x_ignore=!0,bi._x_ignoreSelf=!0);ri.forEach(bi=>{delete bi._x_ignoreSelf,delete bi._x_ignore}),ri=null,oi=null,hi=null,gi=null}function scope(ii){return mergeProxies(closestDataStack(ii))}function addScopeToNode(ii,ri,oi){return ii._x_dataStack=[ri,...closestDataStack(oi||ii)],()=>{ii._x_dataStack=ii._x_dataStack.filter(hi=>hi!==ri)}}function closestDataStack(ii){return ii._x_dataStack?ii._x_dataStack:typeof ShadowRoot=="function"&&ii instanceof ShadowRoot?closestDataStack(ii.host):ii.parentNode?closestDataStack(ii.parentNode):[]}function mergeProxies(ii){return new Proxy({objects:ii},mergeProxyTrap)}var mergeProxyTrap={ownKeys({objects:ii}){return Array.from(new Set(ii.flatMap(ri=>Object.keys(ri))))},has({objects:ii},ri){return ri==Symbol.unscopables?!1:ii.some(oi=>Object.prototype.hasOwnProperty.call(oi,ri)||Reflect.has(oi,ri))},get({objects:ii},ri,oi){return ri=="toJSON"?collapseProxies:Reflect.get(ii.find(hi=>Reflect.has(hi,ri))||{},ri,oi)},set({objects:ii},ri,oi,hi){const gi=ii.find(Ai=>Object.prototype.hasOwnProperty.call(Ai,ri))||ii[ii.length-1],bi=Object.getOwnPropertyDescriptor(gi,ri);return bi!=null&&bi.set&&(bi!=null&&bi.get)?Reflect.set(gi,ri,oi,hi):Reflect.set(gi,ri,oi)}};function collapseProxies(){return Reflect.ownKeys(this).reduce((ri,oi)=>(ri[oi]=Reflect.get(this,oi),ri),{})}function initInterceptors(ii){let ri=hi=>typeof hi=="object"&&!Array.isArray(hi)&&hi!==null,oi=(hi,gi="")=>{Object.entries(Object.getOwnPropertyDescriptors(hi)).forEach(([bi,{value:Ai,enumerable:Ci}])=>{if(Ci===!1||Ai===void 0||typeof Ai=="object"&&Ai!==null&&Ai.__v_skip)return;let Pi=gi===""?bi:`${gi}.${bi}`;typeof Ai=="object"&&Ai!==null&&Ai._x_interceptor?hi[bi]=Ai.initialize(ii,Pi,bi):ri(Ai)&&Ai!==hi&&!(Ai instanceof Element)&&oi(Ai,Pi)})};return oi(ii)}function interceptor(ii,ri=()=>{}){let oi={initialValue:void 0,_x_interceptor:!0,initialize(hi,gi,bi){return ii(this.initialValue,()=>get(hi,gi),Ai=>set(hi,gi,Ai),gi,bi)}};return ri(oi),hi=>{if(typeof hi=="object"&&hi!==null&&hi._x_interceptor){let gi=oi.initialize.bind(oi);oi.initialize=(bi,Ai,Ci)=>{let Pi=hi.initialize(bi,Ai,Ci);return oi.initialValue=Pi,gi(bi,Ai,Ci)}}else oi.initialValue=hi;return oi}}function get(ii,ri){return ri.split(".").reduce((oi,hi)=>oi[hi],ii)}function set(ii,ri,oi){if(typeof ri=="string"&&(ri=ri.split(".")),ri.length===1)ii[ri[0]]=oi;else{if(ri.length===0)throw error;return ii[ri[0]]||(ii[ri[0]]={}),set(ii[ri[0]],ri.slice(1),oi)}}var magics={};function magic(ii,ri){magics[ii]=ri}function injectMagics(ii,ri){return Object.entries(magics).forEach(([oi,hi])=>{let gi=null;function bi(){if(gi)return gi;{let[Ai,Ci]=getElementBoundUtilities(ri);return gi={interceptor,...Ai},onElRemoved(ri,Ci),gi}}Object.defineProperty(ii,`$${oi}`,{get(){return hi(ri,bi())},enumerable:!1})}),ii}function tryCatch(ii,ri,oi,...hi){try{return oi(...hi)}catch(gi){handleError(gi,ii,ri)}}function handleError(ii,ri,oi=void 0){ii=Object.assign(ii??{message:"No error message given."},{el:ri,expression:oi}),console.warn(`Alpine Expression Error: ${ii.message} - -${oi?'Expression: "'+oi+`" - -`:""}`,ri),setTimeout(()=>{throw ii},0)}var shouldAutoEvaluateFunctions=!0;function dontAutoEvaluateFunctions(ii){let ri=shouldAutoEvaluateFunctions;shouldAutoEvaluateFunctions=!1;let oi=ii();return shouldAutoEvaluateFunctions=ri,oi}function evaluate(ii,ri,oi={}){let hi;return evaluateLater(ii,ri)(gi=>hi=gi,oi),hi}function evaluateLater(...ii){return theEvaluatorFunction(...ii)}var theEvaluatorFunction=normalEvaluator;function setEvaluator(ii){theEvaluatorFunction=ii}function normalEvaluator(ii,ri){let oi={};injectMagics(oi,ii);let hi=[oi,...closestDataStack(ii)],gi=typeof ri=="function"?generateEvaluatorFromFunction(hi,ri):generateEvaluatorFromString(hi,ri,ii);return tryCatch.bind(null,ii,ri,gi)}function generateEvaluatorFromFunction(ii,ri){return(oi=()=>{},{scope:hi={},params:gi=[]}={})=>{let bi=ri.apply(mergeProxies([hi,...ii]),gi);runIfTypeOfFunction(oi,bi)}}var evaluatorMemo={};function generateFunctionFromString(ii,ri){if(evaluatorMemo[ii])return evaluatorMemo[ii];let oi=Object.getPrototypeOf(async function(){}).constructor,hi=/^[\n\s]*if.*\(.*\)/.test(ii.trim())||/^(let|const)\s/.test(ii.trim())?`(async()=>{ ${ii} })()`:ii,bi=(()=>{try{let Ai=new oi(["__self","scope"],`with (scope) { __self.result = ${hi} }; __self.finished = true; return __self.result;`);return Object.defineProperty(Ai,"name",{value:`[Alpine] ${ii}`}),Ai}catch(Ai){return handleError(Ai,ri,ii),Promise.resolve()}})();return evaluatorMemo[ii]=bi,bi}function generateEvaluatorFromString(ii,ri,oi){let hi=generateFunctionFromString(ri,oi);return(gi=()=>{},{scope:bi={},params:Ai=[]}={})=>{hi.result=void 0,hi.finished=!1;let Ci=mergeProxies([bi,...ii]);if(typeof hi=="function"){let Pi=hi(hi,Ci).catch(zi=>handleError(zi,oi,ri));hi.finished?(runIfTypeOfFunction(gi,hi.result,Ci,Ai,oi),hi.result=void 0):Pi.then(zi=>{runIfTypeOfFunction(gi,zi,Ci,Ai,oi)}).catch(zi=>handleError(zi,oi,ri)).finally(()=>hi.result=void 0)}}}function runIfTypeOfFunction(ii,ri,oi,hi,gi){if(shouldAutoEvaluateFunctions&&typeof ri=="function"){let bi=ri.apply(oi,hi);bi instanceof Promise?bi.then(Ai=>runIfTypeOfFunction(ii,Ai,oi,hi)).catch(Ai=>handleError(Ai,gi,ri)):ii(bi)}else typeof ri=="object"&&ri instanceof Promise?ri.then(bi=>ii(bi)):ii(ri)}var prefixAsString="x-";function prefix(ii=""){return prefixAsString+ii}function setPrefix(ii){prefixAsString=ii}var directiveHandlers={};function directive(ii,ri){return directiveHandlers[ii]=ri,{before(oi){if(!directiveHandlers[oi]){console.warn(String.raw`Cannot find directive \`${oi}\`. \`${ii}\` will use the default order of execution`);return}const hi=directiveOrder.indexOf(oi);directiveOrder.splice(hi>=0?hi:directiveOrder.indexOf("DEFAULT"),0,ii)}}}function directiveExists(ii){return Object.keys(directiveHandlers).includes(ii)}function directives(ii,ri,oi){if(ri=Array.from(ri),ii._x_virtualDirectives){let bi=Object.entries(ii._x_virtualDirectives).map(([Ci,Pi])=>({name:Ci,value:Pi})),Ai=attributesOnly(bi);bi=bi.map(Ci=>Ai.find(Pi=>Pi.name===Ci.name)?{name:`x-bind:${Ci.name}`,value:`"${Ci.value}"`}:Ci),ri=ri.concat(bi)}let hi={};return ri.map(toTransformedAttributes((bi,Ai)=>hi[bi]=Ai)).filter(outNonAlpineAttributes).map(toParsedDirectives(hi,oi)).sort(byPriority).map(bi=>getDirectiveHandler(ii,bi))}function attributesOnly(ii){return Array.from(ii).map(toTransformedAttributes()).filter(ri=>!outNonAlpineAttributes(ri))}var isDeferringHandlers=!1,directiveHandlerStacks=new Map,currentHandlerStackKey=Symbol();function deferHandlingDirectives(ii){isDeferringHandlers=!0;let ri=Symbol();currentHandlerStackKey=ri,directiveHandlerStacks.set(ri,[]);let oi=()=>{for(;directiveHandlerStacks.get(ri).length;)directiveHandlerStacks.get(ri).shift()();directiveHandlerStacks.delete(ri)},hi=()=>{isDeferringHandlers=!1,oi()};ii(oi),hi()}function getElementBoundUtilities(ii){let ri=[],oi=Ci=>ri.push(Ci),[hi,gi]=elementBoundEffect(ii);return ri.push(gi),[{Alpine:alpine_default,effect:hi,cleanup:oi,evaluateLater:evaluateLater.bind(evaluateLater,ii),evaluate:evaluate.bind(evaluate,ii)},()=>ri.forEach(Ci=>Ci())]}function getDirectiveHandler(ii,ri){let oi=()=>{},hi=directiveHandlers[ri.type]||oi,[gi,bi]=getElementBoundUtilities(ii);onAttributeRemoved(ii,ri.original,bi);let Ai=()=>{ii._x_ignore||ii._x_ignoreSelf||(hi.inline&&hi.inline(ii,ri,gi),hi=hi.bind(hi,ii,ri,gi),isDeferringHandlers?directiveHandlerStacks.get(currentHandlerStackKey).push(hi):hi())};return Ai.runCleanups=bi,Ai}var startingWith=(ii,ri)=>({name:oi,value:hi})=>(oi.startsWith(ii)&&(oi=oi.replace(ii,ri)),{name:oi,value:hi}),into=ii=>ii;function toTransformedAttributes(ii=()=>{}){return({name:ri,value:oi})=>{let{name:hi,value:gi}=attributeTransformers.reduce((bi,Ai)=>Ai(bi),{name:ri,value:oi});return hi!==ri&&ii(hi,ri),{name:hi,value:gi}}}var attributeTransformers=[];function mapAttributes(ii){attributeTransformers.push(ii)}function outNonAlpineAttributes({name:ii}){return alpineAttributeRegex().test(ii)}var alpineAttributeRegex=()=>new RegExp(`^${prefixAsString}([^:^.]+)\\b`);function toParsedDirectives(ii,ri){return({name:oi,value:hi})=>{let gi=oi.match(alpineAttributeRegex()),bi=oi.match(/:([a-zA-Z0-9\-_:]+)/),Ai=oi.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],Ci=ri||ii[oi]||oi;return{type:gi?gi[1]:null,value:bi?bi[1]:null,modifiers:Ai.map(Pi=>Pi.replace(".","")),expression:hi,original:Ci}}}var DEFAULT="DEFAULT",directiveOrder=["ignore","ref","data","id","anchor","bind","init","for","model","modelable","transition","show","if",DEFAULT,"teleport"];function byPriority(ii,ri){let oi=directiveOrder.indexOf(ii.type)===-1?DEFAULT:ii.type,hi=directiveOrder.indexOf(ri.type)===-1?DEFAULT:ri.type;return directiveOrder.indexOf(oi)-directiveOrder.indexOf(hi)}function dispatch(ii,ri,oi={}){ii.dispatchEvent(new CustomEvent(ri,{detail:oi,bubbles:!0,composed:!0,cancelable:!0}))}function walk(ii,ri){if(typeof ShadowRoot=="function"&&ii instanceof ShadowRoot){Array.from(ii.children).forEach(gi=>walk(gi,ri));return}let oi=!1;if(ri(ii,()=>oi=!0),oi)return;let hi=ii.firstElementChild;for(;hi;)walk(hi,ri),hi=hi.nextElementSibling}function warn(ii,...ri){console.warn(`Alpine Warning: ${ii}`,...ri)}var started=!1;function start(){started&&warn("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems."),started=!0,document.body||warn("Unable to initialize. Trying to load Alpine before `` is available. Did you forget to add `defer` in Alpine's ` + diff --git a/resources/views/php/partials/installed-versions.blade.php b/resources/views/php/partials/installed-versions.blade.php index 2410d123..567333b8 100644 --- a/resources/views/php/partials/installed-versions.blade.php +++ b/resources/views/php/partials/installed-versions.blade.php @@ -40,7 +40,7 @@ class="cursor-pointer" @foreach ([\App\Enums\PHPIniType::FPM, \App\Enums\PHPIniType::CLI] as $type) - - {{ old("ini", session()->get("ini")) }} - + @php($ini = old("ini", session()->get("ini") ?? "Loading...")) + @error("ini") @enderror diff --git a/resources/views/scripts/partials/fields/content.blade.php b/resources/views/scripts/partials/fields/content.blade.php index 578d51da..48b8951c 100644 --- a/resources/views/scripts/partials/fields/content.blade.php +++ b/resources/views/scripts/partials/fields/content.blade.php @@ -1,7 +1,5 @@ - - {{ $value }} - + @error("content") @enderror diff --git a/resources/views/site-settings/partials/update-v-host.blade.php b/resources/views/site-settings/partials/update-v-host.blade.php index e495e50c..ba0395b4 100644 --- a/resources/views/site-settings/partials/update-v-host.blade.php +++ b/resources/views/site-settings/partials/update-v-host.blade.php @@ -22,9 +22,8 @@ class="space-y-6" hx-swap="outerHTML" >
- - {{ session()->has("vhost") ? session()->get("vhost") : "Loading..." }} - + @php($vhost = old("vhost", session()->get("vhost") ?? "Loading...")) +
@error("vhost")