diff --git a/redux-hooks/assets/index-DXlA2lIk.js b/redux-hooks/assets/index-BaNzopln.js similarity index 98% rename from redux-hooks/assets/index-DXlA2lIk.js rename to redux-hooks/assets/index-BaNzopln.js index 9f1b54b9..b24bf805 100644 --- a/redux-hooks/assets/index-DXlA2lIk.js +++ b/redux-hooks/assets/index-BaNzopln.js @@ -569,7 +569,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `);n.setAttribute(Du,""),n.innerHTML=l}};function jT(e){e()}function MR(e,t){var n=typeof t=="function"?t:Ng;if(e.length===0)n();else{var r=jT;it.mutateApproach===_G&&(r=hl.requestAnimationFrame||jT),r(function(){var i=gY(),o=$_.begin("mutate");e.map(i),o(),n()})}}var V_=!1;function PR(){V_=!0}function K2(){V_=!1}var Xg=null;function MT(e){if(mT&&it.observeMutations){var t=e.treeCallback,n=t===void 0?Ng:t,r=e.nodeCallback,i=r===void 0?Ng:r,o=e.pseudoElementsCallback,l=o===void 0?Ng:o,c=e.observeMutationsRoot,f=c===void 0?sn:c;Xg=new mT(function(h){if(!V_){var m=ml();Af(h).forEach(function(y){if(y.type==="childList"&&y.addedNodes.length>0&&!OT(y.addedNodes[0])&&(it.searchPseudoElements&&l(y.target),n(y.target)),y.type==="attributes"&&y.target.parentNode&&it.searchPseudoElements&&l([y.target],!0),y.type==="attributes"&&OT(y.target)&&~OG.indexOf(y.attributeName))if(y.attributeName==="class"&&mY(y.target)){var x=vy(I_(y.target)),b=x.prefix,C=x.iconName;y.target.setAttribute(R_,b||m),C&&y.target.setAttribute(D_,C)}else pY(y.target)&&i(y.target)})}}),is&&Xg.observe(f,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function xY(){Xg&&Xg.disconnect()}function wY(e){var t=e.getAttribute("style"),n=[];return t&&(n=t.split(";").reduce(function(r,i){var o=i.split(":"),l=o[0],c=o.slice(1);return l&&c.length>0&&(r[l]=c.join(":").trim()),r},{})),n}function _Y(e){var t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"",i=vy(I_(e));return i.prefix||(i.prefix=ml()),t&&n&&(i.prefix=t,i.iconName=n),i.iconName&&i.prefix||(i.prefix&&r.length>0&&(i.iconName=GG(i.prefix,e.innerText)||B_(i.prefix,vR(e.innerText))),!i.iconName&&it.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function SY(e){var t=Af(e.attributes).reduce(function(n,r){return n.name!=="class"&&n.name!=="style"&&(n[r.name]=r.value),n},{});return t}function CY(){return{iconName:null,prefix:null,transform:Ja,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function PT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=_Y(e),r=n.iconName,i=n.prefix,o=n.rest,l=SY(e),c=H2("parseNodeAttributes",{},e),f=t.styleParser?wY(e):[];return Fe({iconName:r,prefix:i,transform:Ja,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:f,attributes:l}},c)}var EY=_a.styles;function LR(e){var t=it.autoReplaceSvg==="nest"?PT(e,{styleParser:!1}):PT(e);return~t.extra.classes.indexOf(fR)?pl("generateLayersText",e,t):pl("generateSvgReplacementMutation",e,t)}function AY(){return[].concat(Ea(rR),Ea(iR))}function LT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!is)return Promise.resolve();var n=sn.documentElement.classList,r=function(y){return n.add("".concat(vT,"-").concat(y))},i=function(y){return n.remove("".concat(vT,"-").concat(y))},o=it.autoFetchSvg?AY():UN.concat(Object.keys(EY));o.includes("fa")||o.push("fa");var l=[".".concat(fR,":not([").concat(Du,"])")].concat(o.map(function(m){return".".concat(m,":not([").concat(Du,"])")})).join(", ");if(l.length===0)return Promise.resolve();var c=[];try{c=Af(e.querySelectorAll(l))}catch{}if(c.length>0)r("pending"),i("complete");else return Promise.resolve();var f=$_.begin("onTree"),h=c.reduce(function(m,y){try{var x=LR(y);x&&m.push(x)}catch(b){uR||b.name==="MissingIcon"&&console.error(b)}return m},[]);return new Promise(function(m,y){Promise.all(h).then(function(x){MR(x,function(){r("active"),r("complete"),i("pending"),typeof t=="function"&&t(),f(),m()})}).catch(function(x){f(),y(x)})})}function TY(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;LR(e).then(function(n){n&&MR([n],t)})}function OY(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:q2(t||{}),i=n.mask;return i&&(i=(i||{}).icon?i:q2(i||{})),e(r,Fe(Fe({},n),{},{mask:i}))}}var jY=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,i=r===void 0?Ja:r,o=n.symbol,l=o===void 0?!1:o,c=n.mask,f=c===void 0?null:c,h=n.maskId,m=h===void 0?null:h,y=n.classes,x=y===void 0?[]:y,b=n.attributes,C=b===void 0?{}:b,_=n.styles,A=_===void 0?{}:_;if(t){var O=t.prefix,P=t.iconName,N=t.icon;return yy(Fe({type:"icon"},t),function(){return ku("beforeDOMElementCreation",{iconDefinition:t,params:n}),F_({icons:{main:G2(N),mask:f?G2(f.icon):{found:!1,width:null,height:null,icon:{}}},prefix:O,iconName:P,transform:Fe(Fe({},Ja),i),symbol:l,maskId:m,extra:{attributes:C,styles:A,classes:x}})})}},MY={mixout:function(){return{icon:OY(jY)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=LT,n.nodeCallback=TY,n}}},provides:function(t){t.i2svg=function(n){var r=n.node,i=r===void 0?sn:r,o=n.callback,l=o===void 0?function(){}:o;return LT(i,l)},t.generateSvgReplacementMutation=function(n,r){var i=r.iconName,o=r.prefix,l=r.transform,c=r.symbol,f=r.mask,h=r.maskId,m=r.extra;return new Promise(function(y,x){Promise.all([Y2(i,o),f.iconName?Y2(f.iconName,f.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(b){var C=my(b,2),_=C[0],A=C[1];y([n,F_({icons:{main:_,mask:A},prefix:o,iconName:i,transform:l,symbol:c,maskId:h,extra:m,watchable:!0})])}).catch(x)})},t.generateAbstractIcon=function(n){var r=n.children,i=n.attributes,o=n.main,l=n.transform,c=n.styles,f=py(c);f.length>0&&(i.style=f);var h;return z_(l)&&(h=pl("generateAbstractTransformGrouping",{main:o,transform:l,containerWidth:o.width,iconWidth:o.width})),r.push(h||o.icon),{children:r,attributes:i}}}},PY={mixout:function(){return{layer:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.classes,o=i===void 0?[]:i;return yy({type:"layer"},function(){ku("beforeDOMElementCreation",{assembler:n,params:r});var l=[];return n(function(c){Array.isArray(c)?c.map(function(f){l=l.concat(f.abstract)}):l=l.concat(c.abstract)}),[{tag:"span",attributes:{class:["".concat(it.cssPrefix,"-layers")].concat(Ea(o)).join(" ")},children:l}]})}}}},LY={mixout:function(){return{counter:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};r.title;var i=r.classes,o=i===void 0?[]:i,l=r.attributes,c=l===void 0?{}:l,f=r.styles,h=f===void 0?{}:f;return yy({type:"counter",content:n},function(){return ku("beforeDOMElementCreation",{content:n,params:r}),cY({content:n.toString(),extra:{attributes:c,styles:h,classes:["".concat(it.cssPrefix,"-layers-counter")].concat(Ea(o))}})})}}}},NY={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.transform,o=i===void 0?Ja:i,l=r.classes,c=l===void 0?[]:l,f=r.attributes,h=f===void 0?{}:f,m=r.styles,y=m===void 0?{}:m;return yy({type:"text",content:n},function(){return ku("beforeDOMElementCreation",{content:n,params:r}),AT({content:n,transform:Fe(Fe({},Ja),o),extra:{attributes:h,styles:y,classes:["".concat(it.cssPrefix,"-layers-text")].concat(Ea(c))}})})}}},provides:function(t){t.generateLayersText=function(n,r){var i=r.transform,o=r.extra,l=null,c=null;if(IN){var f=parseInt(getComputedStyle(n).fontSize,10),h=n.getBoundingClientRect();l=h.width/f,c=h.height/f}return Promise.resolve([n,AT({content:n.innerHTML,width:l,height:c,transform:i,extra:o,watchable:!0})])}}},NR=new RegExp('"',"ug"),NT=[1105920,1112319],RT=Fe(Fe(Fe(Fe({},{FontAwesome:{normal:"fas",400:"fas"}}),pq),xG),Cq),Z2=Object.keys(RT).reduce(function(e,t){return e[t.toLowerCase()]=RT[t],e},{}),RY=Object.keys(Z2).reduce(function(e,t){var n=Z2[t];return e[t]=n[900]||Ea(Object.entries(n))[0][1],e},{});function DY(e){var t=e.replace(NR,"");return vR(Ea(t)[0]||"")}function kY(e){var t=e.getPropertyValue("font-feature-settings").includes("ss01"),n=e.getPropertyValue("content"),r=n.replace(NR,""),i=r.codePointAt(0),o=i>=NT[0]&&i<=NT[1],l=r.length===2?r[0]===r[1]:!1;return o||l||t}function IY(e,t){var n=e.replace(/^['"]|['"]$/g,"").toLowerCase(),r=parseInt(t),i=isNaN(r)?"normal":r;return(Z2[n]||{})[i]||RY[n]}function DT(e,t){var n="".concat(wG).concat(t.replace(":","-"));return new Promise(function(r,i){if(e.getAttribute(n)!==null)return r();var o=Af(e.children),l=o.filter(function(W){return W.getAttribute(U2)===t})[0],c=hl.getComputedStyle(e,t),f=c.getPropertyValue("font-family"),h=f.match(AG),m=c.getPropertyValue("font-weight"),y=c.getPropertyValue("content");if(l&&!h)return e.removeChild(l),r();if(h&&y!=="none"&&y!==""){var x=c.getPropertyValue("content"),b=IY(f,m),C=DY(x),_=h[0].startsWith("FontAwesome"),A=kY(c),O=B_(b,C),P=O;if(_){var N=YG(C);N.iconName&&N.prefix&&(O=N.iconName,b=N.prefix)}if(O&&!A&&(!l||l.getAttribute(R_)!==b||l.getAttribute(D_)!==P)){e.setAttribute(n,P),l&&e.removeChild(l);var F=CY(),U=F.extra;U.attributes[U2]=t,Y2(O,b).then(function(W){var X=F_(Fe(Fe({},F),{},{icons:{main:W,mask:AR()},prefix:b,iconName:P,extra:U,watchable:!0})),ae=sn.createElementNS("http://www.w3.org/2000/svg","svg");t==="::before"?e.insertBefore(ae,e.firstChild):e.appendChild(ae),ae.outerHTML=X.map(function(ce){return Jh(ce)}).join(` `),e.removeAttribute(n),r()}).catch(i)}else r()}else r()})}function zY(e){return Promise.all([DT(e,"::before"),DT(e,"::after")])}function UY(e){return e.parentNode!==document.head&&!~SG.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(U2)&&(!e.parentNode||e.parentNode.tagName!=="svg")}var BY=function(t){return!!t&&lR.some(function(n){return t.includes(n)})},FY=function(t){if(!t)return[];var n=new Set,r=t.split(/,(?![^()]*\))/).map(function(f){return f.trim()});r=r.flatMap(function(f){return f.includes("(")?f:f.split(",").map(function(h){return h.trim()})});var i=Lg(r),o;try{for(i.s();!(o=i.n()).done;){var l=o.value;if(BY(l)){var c=lR.reduce(function(f,h){return f.replace(h,"")},l);c!==""&&c!=="*"&&n.add(c)}}}catch(f){i.e(f)}finally{i.f()}return n};function kT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(is){var n;if(t)n=e;else if(it.searchPseudoElementsFullScan)n=e.querySelectorAll("*");else{var r=new Set,i=Lg(document.styleSheets),o;try{for(i.s();!(o=i.n()).done;){var l=o.value;try{var c=Lg(l.cssRules),f;try{for(c.s();!(f=c.n()).done;){var h=f.value,m=FY(h.selectorText),y=Lg(m),x;try{for(y.s();!(x=y.n()).done;){var b=x.value;r.add(b)}}catch(_){y.e(_)}finally{y.f()}}}catch(_){c.e(_)}finally{c.f()}}catch(_){it.searchPseudoElementsWarnings&&console.warn("Font Awesome: cannot parse stylesheet: ".concat(l.href," (").concat(_.message,`) If it declares any Font Awesome CSS pseudo-elements, they will not be rendered as SVG icons. Add crossorigin="anonymous" to the , enable searchPseudoElementsFullScan for slower but more thorough DOM parsing, or suppress this warning by setting searchPseudoElementsWarnings to false.`))}}}catch(_){i.e(_)}finally{i.f()}if(!r.size)return;var C=Array.from(r).join(", ");try{n=e.querySelectorAll(C)}catch{}}return new Promise(function(_,A){var O=Af(n).filter(UY).map(zY),P=$_.begin("searchPseudoElements");PR(),Promise.all(O).then(function(){P(),K2(),_()}).catch(function(){P(),K2(),A()})})}}var $Y={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=kT,n}}},provides:function(t){t.pseudoElements2svg=function(n){var r=n.node,i=r===void 0?sn:r;it.searchPseudoElements&&kT(i)}}},IT=!1,VY={mixout:function(){return{dom:{unwatch:function(){PR(),IT=!0}}}},hooks:function(){return{bootstrap:function(){MT(H2("mutationObserverCallbacks",{}))},noAuto:function(){xY()},watch:function(n){var r=n.observeMutationsRoot;IT?K2():MT(H2("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},zT=function(t){var n={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t.toLowerCase().split(" ").reduce(function(r,i){var o=i.toLowerCase().split("-"),l=o[0],c=o.slice(1).join("-");if(l&&c==="h")return r.flipX=!0,r;if(l&&c==="v")return r.flipY=!0,r;if(c=parseFloat(c),isNaN(c))return r;switch(l){case"grow":r.size=r.size+c;break;case"shrink":r.size=r.size-c;break;case"left":r.x=r.x-c;break;case"right":r.x=r.x+c;break;case"up":r.y=r.y-c;break;case"down":r.y=r.y+c;break;case"rotate":r.rotate=r.rotate+c;break}return r},n)},HY={mixout:function(){return{parse:{transform:function(n){return zT(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-transform");return i&&(n.transform=zT(i)),n}}},provides:function(t){t.generateAbstractTransformGrouping=function(n){var r=n.main,i=n.transform,o=n.containerWidth,l=n.iconWidth,c={transform:"translate(".concat(o/2," 256)")},f="translate(".concat(i.x*32,", ").concat(i.y*32,") "),h="scale(".concat(i.size/16*(i.flipX?-1:1),", ").concat(i.size/16*(i.flipY?-1:1),") "),m="rotate(".concat(i.rotate," 0 0)"),y={transform:"".concat(f," ").concat(h," ").concat(m)},x={transform:"translate(".concat(l/2*-1," -256)")},b={outer:c,inner:y,path:x};return{tag:"g",attributes:Fe({},b.outer),children:[{tag:"g",attributes:Fe({},b.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:Fe(Fe({},r.icon.attributes),b.path)}]}]}}}},Lb={x:0,y:0,width:"100%",height:"100%"};function UT(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 qY(e){return e.tag==="g"?e.children:[e]}var GY={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-mask"),o=i?vy(i.split(" ").map(function(l){return l.trim()})):AR();return o.prefix||(o.prefix=ml()),n.mask=o,n.maskId=r.getAttribute("data-fa-mask-id"),n}}},provides:function(t){t.generateAbstractMask=function(n){var r=n.children,i=n.attributes,o=n.main,l=n.mask,c=n.maskId,f=n.transform,h=o.width,m=o.icon,y=l.width,x=l.icon,b=IG({transform:f,containerWidth:y,iconWidth:h}),C={tag:"rect",attributes:Fe(Fe({},Lb),{},{fill:"white"})},_=m.children?{children:m.children.map(UT)}:{},A={tag:"g",attributes:Fe({},b.inner),children:[UT(Fe({tag:m.tag,attributes:Fe(Fe({},m.attributes),b.path)},_))]},O={tag:"g",attributes:Fe({},b.outer),children:[A]},P="mask-".concat(c||bT()),N="clip-".concat(c||bT()),F={tag:"mask",attributes:Fe(Fe({},Lb),{},{id:P,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[C,O]},U={tag:"defs",children:[{tag:"clipPath",attributes:{id:N},children:qY(x)},F]};return r.push(U,{tag:"rect",attributes:Fe({fill:"currentColor","clip-path":"url(#".concat(N,")"),mask:"url(#".concat(P,")")},Lb)}),{children:r,attributes:i}}}},YY={provides:function(t){var n=!1;hl.matchMedia&&(n=hl.matchMedia("(prefers-reduced-motion: reduce)").matches),t.missingIconAbstract=function(){var r=[],i={fill:"currentColor"},o={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:Fe(Fe({},i),{},{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 l=Fe(Fe({},o),{},{attributeName:"opacity"}),c={tag:"circle",attributes:Fe(Fe({},i),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||c.children.push({tag:"animate",attributes:Fe(Fe({},o),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:Fe(Fe({},l),{},{values:"1;0;1;1;0;1;"})}),r.push(c),r.push({tag:"path",attributes:Fe(Fe({},i),{},{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:n?[]:[{tag:"animate",attributes:Fe(Fe({},l),{},{values:"1;0;0;0;0;1;"})}]}),n||r.push({tag:"path",attributes:Fe(Fe({},i),{},{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:Fe(Fe({},l),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},WY={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-symbol"),o=i===null?!1:i===""?!0:i;return n.symbol=o,n}}}},KY=[BG,MY,PY,LY,NY,$Y,VY,HY,GY,YY,WY];nY(KY,{mixoutsTo:Ii});Ii.noAuto;var Oh=Ii.config;Ii.library;Ii.dom;var RR=Ii.parse;Ii.findIconDefinition;Ii.toHtml;var ZY=Ii.icon;Ii.layer;Ii.text;Ii.counter;function XY(e){return e=e-0,e===e}function DR(e){return XY(e)?e:(e=e.replace(/[_-]+(.)?/g,(t,n)=>n?n.toUpperCase():""),e.charAt(0).toLowerCase()+e.slice(1))}function QY(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Vc=new Map,JY=1e3;function eW(e){if(Vc.has(e))return Vc.get(e);const t={};let n=0;const r=e.length;for(;n0){const f=l.slice(0,c).trim(),h=l.slice(c+1).trim();if(f&&h){const m=DR(f);t[m.startsWith("webkit")?QY(m):m]=h}}}n=o+1}if(Vc.size===JY){const i=Vc.keys().next().value;i&&Vc.delete(i)}return Vc.set(e,t),t}function kR(e,t,n={}){if(typeof t=="string")return t;const r=(t.children||[]).map(h=>kR(e,h)),i=t.attributes||{},o={};for(const[h,m]of Object.entries(i))switch(!0){case h==="class":{o.className=m;break}case h==="style":{o.style=eW(String(m));break}case h.startsWith("aria-"):case h.startsWith("data-"):{o[h.toLowerCase()]=m;break}default:o[DR(h)]=m}const{style:l,"aria-label":c,...f}=n;return l&&(o.style=o.style?{...o.style,...l}:l),c&&(o["aria-label"]=c,o["aria-hidden"]="false"),e(t.tag,{...f,...o},...r)}var tW=kR.bind(null,uf.createElement),BT=(e,t)=>{const n=w.useId();return e||(t?n:void 0)},nW=class{constructor(e="react-fontawesome"){this.enabled=!1;let t=!1;try{t=typeof process<"u"&&!1}catch{}this.scope=e,this.enabled=t}log(...e){this.enabled&&console.log(`[${this.scope}]`,...e)}warn(...e){this.enabled&&console.warn(`[${this.scope}]`,...e)}error(...e){this.enabled&&console.error(`[${this.scope}]`,...e)}},rW="searchPseudoElementsFullScan"in Oh?"7.0.0":"6.0.0",iW=Number.parseInt(rW)>=7,wh="fa",ko={beat:"fa-beat",fade:"fa-fade",beatFade:"fa-beat-fade",bounce:"fa-bounce",shake:"fa-shake",spin:"fa-spin",spinPulse:"fa-spin-pulse",spinReverse:"fa-spin-reverse",pulse:"fa-pulse"},aW={left:"fa-pull-left",right:"fa-pull-right"},oW={90:"fa-rotate-90",180:"fa-rotate-180",270:"fa-rotate-270"},sW={"2xs":"fa-2xs",xs:"fa-xs",sm:"fa-sm",lg:"fa-lg",xl:"fa-xl","2xl":"fa-2xl","1x":"fa-1x","2x":"fa-2x","3x":"fa-3x","4x":"fa-4x","5x":"fa-5x","6x":"fa-6x","7x":"fa-7x","8x":"fa-8x","9x":"fa-9x","10x":"fa-10x"},Io={border:"fa-border",fixedWidth:"fa-fw",flip:"fa-flip",flipHorizontal:"fa-flip-horizontal",flipVertical:"fa-flip-vertical",inverse:"fa-inverse",rotateBy:"fa-rotate-by",swapOpacity:"fa-swap-opacity",widthAuto:"fa-width-auto"};function lW(e){const t=Oh.cssPrefix||Oh.familyPrefix||wh;return t===wh?e:e.replace(new RegExp(`(?<=^|\\s)${wh}-`,"g"),`${t}-`)}function uW(e){const{beat:t,fade:n,beatFade:r,bounce:i,shake:o,spin:l,spinPulse:c,spinReverse:f,pulse:h,fixedWidth:m,inverse:y,border:x,flip:b,size:C,rotation:_,pull:A,swapOpacity:O,rotateBy:P,widthAuto:N,className:F}=e,U=[];return F&&U.push(...F.split(" ")),t&&U.push(ko.beat),n&&U.push(ko.fade),r&&U.push(ko.beatFade),i&&U.push(ko.bounce),o&&U.push(ko.shake),l&&U.push(ko.spin),f&&U.push(ko.spinReverse),c&&U.push(ko.spinPulse),h&&U.push(ko.pulse),m&&U.push(Io.fixedWidth),y&&U.push(Io.inverse),x&&U.push(Io.border),b===!0&&U.push(Io.flip),(b==="horizontal"||b==="both")&&U.push(Io.flipHorizontal),(b==="vertical"||b==="both")&&U.push(Io.flipVertical),C!=null&&U.push(sW[C]),_!=null&&_!==0&&U.push(oW[_]),A!=null&&U.push(aW[A]),O&&U.push(Io.swapOpacity),iW?(P&&U.push(Io.rotateBy),N&&U.push(Io.widthAuto),(Oh.cssPrefix||Oh.familyPrefix||wh)===wh?U:U.map(lW)):U}var cW=e=>typeof e=="object"&&"icon"in e&&!!e.icon;function FT(e){if(e)return cW(e)?e:RR.icon(e)}function fW(e){return Object.keys(e)}var $T=new nW("FontAwesomeIcon"),IR={border:!1,className:"",mask:void 0,maskId:void 0,fixedWidth:!1,inverse:!1,flip:!1,icon:void 0,listItem:!1,pull:void 0,pulse:!1,rotation:void 0,rotateBy:!1,size:void 0,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:void 0,transform:void 0,swapOpacity:!1,widthAuto:!1},dW=new Set(Object.keys(IR)),Be=uf.forwardRef((e,t)=>{const n={...IR,...e},{icon:r,mask:i,symbol:o,title:l,titleId:c,maskId:f,transform:h}=n,m=BT(f,!!i),y=BT(c,!!l),x=FT(r);if(!x)return $T.error("Icon lookup is undefined",r),null;const b=uW(n),C=typeof h=="string"?RR.transform(h):h,_=FT(i),A=ZY(x,{...b.length>0&&{classes:b},...C&&{transform:C},..._&&{mask:_},symbol:o,title:l,titleId:y,maskId:m});if(!A)return $T.error("Could not find icon",x),null;const{abstract:O}=A,P={ref:t};for(const N of fW(n))dW.has(N)||(P[N]=n[N]);return tW(O[0],P)});Be.displayName="FontAwesomeIcon";function by(){return typeof window<"u"}function Tf(e){return zR(e)?(e.nodeName||"").toLowerCase():"#document"}function Mi(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function as(e){var t;return(t=(zR(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function zR(e){return by()?e instanceof Node||e instanceof Mi(e).Node:!1}function Er(e){return by()?e instanceof Element||e instanceof Mi(e).Element:!1}function Ni(e){return by()?e instanceof HTMLElement||e instanceof Mi(e).HTMLElement:!1}function X2(e){return!by()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Mi(e).ShadowRoot}const hW=new Set(["inline","contents"]);function em(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Aa(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!hW.has(i)}const mW=new Set(["table","td","th"]);function pW(e){return mW.has(Tf(e))}const gW=[":popover-open",":modal"];function xy(e){return gW.some(t=>{try{return e.matches(t)}catch{return!1}})}const vW=["transform","translate","scale","rotate","perspective"],yW=["transform","translate","scale","rotate","perspective","filter"],bW=["paint","layout","strict","content"];function H_(e){const t=q_(),n=Er(e)?Aa(e):e;return vW.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||yW.some(r=>(n.willChange||"").includes(r))||bW.some(r=>(n.contain||"").includes(r))}function xW(e){let t=gl(e);for(;Ni(t)&&!ff(t);){if(H_(t))return t;if(xy(t))return null;t=gl(t)}return null}function q_(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const wW=new Set(["html","body","#document"]);function ff(e){return wW.has(Tf(e))}function Aa(e){return Mi(e).getComputedStyle(e)}function wy(e){return Er(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function gl(e){if(Tf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||X2(e)&&e.host||as(e);return X2(t)?t.host:t}function UR(e){const t=gl(e);return ff(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ni(t)&&em(t)?t:UR(t)}function BR(e,t,n){var r;t===void 0&&(t=[]);const i=UR(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),l=Mi(i);return o?(Q2(l),t.concat(l,l.visualViewport||[],em(i)?i:[],[])):t.concat(i,BR(i,[]))}function Q2(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const _W=["top","right","bottom","left"],VT=["start","end"],HT=_W.reduce((e,t)=>e.concat(t,t+"-"+VT[0],t+"-"+VT[1]),[]),jh=Math.min,nf=Math.max,Qg=Math.round,to=e=>({x:e,y:e}),SW={left:"right",right:"left",bottom:"top",top:"bottom"},CW={start:"end",end:"start"};function EW(e,t,n){return nf(e,jh(t,n))}function tm(e,t){return typeof e=="function"?e(t):e}function vl(e){return e.split("-")[0]}function no(e){return e.split("-")[1]}function AW(e){return e==="x"?"y":"x"}function G_(e){return e==="y"?"height":"width"}const TW=new Set(["top","bottom"]);function Eu(e){return TW.has(vl(e))?"y":"x"}function Y_(e){return AW(Eu(e))}function FR(e,t,n){n===void 0&&(n=!1);const r=no(e),i=Y_(e),o=G_(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=ev(l)),[l,ev(l)]}function OW(e){const t=ev(e);return[Jg(e),t,Jg(t)]}function Jg(e){return e.replace(/start|end/g,t=>CW[t])}const qT=["left","right"],GT=["right","left"],jW=["top","bottom"],MW=["bottom","top"];function PW(e,t,n){switch(e){case"top":case"bottom":return n?t?GT:qT:t?qT:GT;case"left":case"right":return t?jW:MW;default:return[]}}function LW(e,t,n,r){const i=no(e);let o=PW(vl(e),n==="start",r);return i&&(o=o.map(l=>l+"-"+i),t&&(o=o.concat(o.map(Jg)))),o}function ev(e){return e.replace(/left|right|bottom|top/g,t=>SW[t])}function NW(e){return{top:0,right:0,bottom:0,left:0,...e}}function $R(e){return typeof e!="number"?NW(e):{top:e,right:e,bottom:e,left:e}}function tv(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}const RW="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function DW(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&X2(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function tg(e){return e?.ownerDocument||document}function kW(e){return Ni(e)&&e.matches(RW)}function Mh(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var IW=typeof document<"u",zW=function(){},yl=IW?w.useLayoutEffect:zW;const UW={...u_};function ol(e){const t=w.useRef(e);return yl(()=>{t.current=e}),t}const BW=UW.useInsertionEffect,FW=BW||(e=>e());function fh(e){const t=w.useRef(()=>{});return FW(()=>{t.current=e}),w.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=n,c=o.filter(Boolean),f=await(l.isRTL==null?void 0:l.isRTL(t));let h=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:m,y}=YT(h,r,f),x=r,b={},C=0;for(let _=0;_({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:l,elements:c,middlewareData:f}=t,{element:h,padding:m=0}=tm(e,t)||{};if(h==null)return{};const y=$R(m),x={x:n,y:r},b=Y_(i),C=G_(b),_=await l.getDimensions(h),A=b==="y",O=A?"top":"left",P=A?"bottom":"right",N=A?"clientHeight":"clientWidth",F=o.reference[C]+o.reference[b]-x[b]-o.floating[C],U=x[b]-o.reference[b],W=await(l.getOffsetParent==null?void 0:l.getOffsetParent(h));let X=W?W[N]:0;(!X||!await(l.isElement==null?void 0:l.isElement(W)))&&(X=c.floating[N]||o.floating[C]);const ae=F/2-U/2,ce=X/2-_[C]/2-1,re=jh(y[O],ce),J=jh(y[P],ce),oe=re,we=X-_[C]-J,se=X/2-_[C]/2+ae,ue=EW(oe,se,we),Y=!f.arrow&&no(i)!=null&&se!==ue&&o.reference[C]/2-(seno(i)===e),...n.filter(i=>no(i)!==e)]:n.filter(i=>vl(i)===i)).filter(i=>e?no(i)===e||(t?Jg(i)!==i:!1):!0)}const qW=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,i;const{rects:o,middlewareData:l,placement:c,platform:f,elements:h}=t,{crossAxis:m=!1,alignment:y,allowedPlacements:x=HT,autoAlignment:b=!0,...C}=tm(e,t),_=y!==void 0||x===HT?HW(y||null,b,x):x,A=await VR(t,C),O=((n=l.autoPlacement)==null?void 0:n.index)||0,P=_[O];if(P==null)return{};const N=FR(P,o,await(f.isRTL==null?void 0:f.isRTL(h.floating)));if(c!==P)return{reset:{placement:_[0]}};const F=[A[vl(P)],A[N[0]],A[N[1]]],U=[...((r=l.autoPlacement)==null?void 0:r.overflows)||[],{placement:P,overflows:F}],W=_[O+1];if(W)return{data:{index:O+1,overflows:U},reset:{placement:W}};const X=U.map(re=>{const J=no(re.placement);return[re.placement,J&&m?re.overflows.slice(0,2).reduce((oe,we)=>oe+we,0):re.overflows[0],re.overflows]}).sort((re,J)=>re[1]-J[1]),ce=((i=X.filter(re=>re[2].slice(0,no(re[0])?2:3).every(J=>J<=0))[0])==null?void 0:i[0])||X[0][0];return ce!==c?{data:{index:O+1,overflows:U},reset:{placement:ce}}:{}}}},GW=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:l,initialPlacement:c,platform:f,elements:h}=t,{mainAxis:m=!0,crossAxis:y=!0,fallbackPlacements:x,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:_=!0,...A}=tm(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const O=vl(i),P=Eu(c),N=vl(c)===c,F=await(f.isRTL==null?void 0:f.isRTL(h.floating)),U=x||(N||!_?[ev(c)]:OW(c)),W=C!=="none";!x&&W&&U.push(...LW(c,_,C,F));const X=[c,...U],ae=await VR(t,A),ce=[];let re=((r=o.flip)==null?void 0:r.overflows)||[];if(m&&ce.push(ae[O]),y){const se=FR(i,l,F);ce.push(ae[se[0]],ae[se[1]])}if(re=[...re,{placement:i,overflows:ce}],!ce.every(se=>se<=0)){var J,oe;const se=(((J=o.flip)==null?void 0:J.index)||0)+1,ue=X[se];if(ue&&(!(y==="alignment"?P!==Eu(ue):!1)||re.every(z=>Eu(z.placement)===P?z.overflows[0]>0:!0)))return{data:{index:se,overflows:re},reset:{placement:ue}};let Y=(oe=re.filter(k=>k.overflows[0]<=0).sort((k,z)=>k.overflows[1]-z.overflows[1])[0])==null?void 0:oe.placement;if(!Y)switch(b){case"bestFit":{var we;const k=(we=re.filter(z=>{if(W){const H=Eu(z.placement);return H===P||H==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(H=>H>0).reduce((H,I)=>H+I,0)]).sort((z,H)=>z[1]-H[1])[0])==null?void 0:we[0];k&&(Y=k);break}case"initialPlacement":Y=c;break}if(i!==Y)return{reset:{placement:Y}}}return{}}}},YW=new Set(["left","top"]);async function WW(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=vl(n),c=no(n),f=Eu(n)==="y",h=YW.has(l)?-1:1,m=o&&f?-1:1,y=tm(t,e);let{mainAxis:x,crossAxis:b,alignmentAxis:C}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return c&&typeof C=="number"&&(b=c==="end"?C*-1:C),f?{x:b*m,y:x*h}:{x:x*h,y:b*m}}const KW=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:l,middlewareData:c}=t,f=await WW(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:i+f.x,y:o+f.y,data:{...f,placement:l}}}}};function HR(e){const t=Aa(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Ni(e),o=i?e.offsetWidth:n,l=i?e.offsetHeight:r,c=Qg(n)!==o||Qg(r)!==l;return c&&(n=o,r=l),{width:n,height:r,$:c}}function qR(e){return Er(e)?e:e.contextElement}function rf(e){const t=qR(e);if(!Ni(t))return to(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=HR(t);let l=(o?Qg(n.width):n.width)/r,c=(o?Qg(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const ZW=to(0);function GR(e){const t=Mi(e);return!q_()||!t.visualViewport?ZW:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function XW(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Mi(e)?!1:t}function Ph(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=qR(e);let l=to(1);t&&(r?Er(r)&&(l=rf(r)):l=rf(e));const c=XW(o,n,r)?GR(o):to(0);let f=(i.left+c.x)/l.x,h=(i.top+c.y)/l.y,m=i.width/l.x,y=i.height/l.y;if(o){const x=Mi(o),b=r&&Er(r)?Mi(r):r;let C=x,_=Q2(C);for(;_&&r&&b!==C;){const A=rf(_),O=_.getBoundingClientRect(),P=Aa(_),N=O.left+(_.clientLeft+parseFloat(P.paddingLeft))*A.x,F=O.top+(_.clientTop+parseFloat(P.paddingTop))*A.y;f*=A.x,h*=A.y,m*=A.x,y*=A.y,f+=N,h+=F,C=Mi(_),_=Q2(C)}}return tv({width:m,height:y,x:f,y:h})}function _y(e,t){const n=wy(e).scrollLeft;return t?t.left+n:Ph(as(e)).left+n}function YR(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-_y(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function QW(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",l=as(r),c=t?xy(t.floating):!1;if(r===l||c&&o)return n;let f={scrollLeft:0,scrollTop:0},h=to(1);const m=to(0),y=Ni(r);if((y||!y&&!o)&&((Tf(r)!=="body"||em(l))&&(f=wy(r)),Ni(r))){const b=Ph(r);h=rf(r),m.x=b.x+r.clientLeft,m.y=b.y+r.clientTop}const x=l&&!y&&!o?YR(l,f):to(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-f.scrollLeft*h.x+m.x+x.x,y:n.y*h.y-f.scrollTop*h.y+m.y+x.y}}function JW(e){return Array.from(e.getClientRects())}function eK(e){const t=as(e),n=wy(e),r=e.ownerDocument.body,i=nf(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=nf(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+_y(e);const c=-n.scrollTop;return Aa(r).direction==="rtl"&&(l+=nf(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:l,y:c}}const WT=25;function tK(e,t){const n=Mi(e),r=as(e),i=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,c=0,f=0;if(i){o=i.width,l=i.height;const m=q_();(!m||m&&t==="fixed")&&(c=i.offsetLeft,f=i.offsetTop)}const h=_y(r);if(h<=0){const m=r.ownerDocument,y=m.body,x=getComputedStyle(y),b=m.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,C=Math.abs(r.clientWidth-y.clientWidth-b);C<=WT&&(o-=C)}else h<=WT&&(o+=h);return{width:o,height:l,x:c,y:f}}const nK=new Set(["absolute","fixed"]);function rK(e,t){const n=Ph(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Ni(e)?rf(e):to(1),l=e.clientWidth*o.x,c=e.clientHeight*o.y,f=i*o.x,h=r*o.y;return{width:l,height:c,x:f,y:h}}function KT(e,t,n){let r;if(t==="viewport")r=tK(e,n);else if(t==="document")r=eK(as(e));else if(Er(t))r=rK(t,n);else{const i=GR(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return tv(r)}function WR(e,t){const n=gl(e);return n===t||!Er(n)||ff(n)?!1:Aa(n).position==="fixed"||WR(n,t)}function iK(e,t){const n=t.get(e);if(n)return n;let r=BR(e,[]).filter(c=>Er(c)&&Tf(c)!=="body"),i=null;const o=Aa(e).position==="fixed";let l=o?gl(e):e;for(;Er(l)&&!ff(l);){const c=Aa(l),f=H_(l);!f&&c.position==="fixed"&&(i=null),(o?!f&&!i:!f&&c.position==="static"&&!!i&&nK.has(i.position)||em(l)&&!f&&WR(e,l))?r=r.filter(m=>m!==l):i=c,l=gl(l)}return t.set(e,r),r}function aK(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?xy(t)?[]:iK(t,this._c):[].concat(n),r],c=l[0],f=l.reduce((h,m)=>{const y=KT(t,m,i);return h.top=nf(y.top,h.top),h.right=jh(y.right,h.right),h.bottom=jh(y.bottom,h.bottom),h.left=nf(y.left,h.left),h},KT(t,c,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function oK(e){const{width:t,height:n}=HR(e);return{width:t,height:n}}function sK(e,t,n){const r=Ni(t),i=as(t),o=n==="fixed",l=Ph(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const f=to(0);function h(){f.x=_y(i)}if(r||!r&&!o)if((Tf(t)!=="body"||em(i))&&(c=wy(t)),r){const b=Ph(t,!0,o,t);f.x=b.x+t.clientLeft,f.y=b.y+t.clientTop}else i&&h();o&&!r&&i&&h();const m=i&&!r&&!o?YR(i,c):to(0),y=l.left+c.scrollLeft-f.x-m.x,x=l.top+c.scrollTop-f.y-m.y;return{x:y,y:x,width:l.width,height:l.height}}function Nb(e){return Aa(e).position==="static"}function ZT(e,t){if(!Ni(e)||Aa(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return as(e)===n&&(n=n.ownerDocument.body),n}function KR(e,t){const n=Mi(e);if(xy(e))return n;if(!Ni(e)){let i=gl(e);for(;i&&!ff(i);){if(Er(i)&&!Nb(i))return i;i=gl(i)}return n}let r=ZT(e,t);for(;r&&pW(r)&&Nb(r);)r=ZT(r,t);return r&&ff(r)&&Nb(r)&&!H_(r)?n:r||xW(e)||n}const lK=async function(e){const t=this.getOffsetParent||KR,n=this.getDimensions,r=await n(e.floating);return{reference:sK(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function uK(e){return Aa(e).direction==="rtl"}const cK={convertOffsetParentRelativeRectToViewportRelativeRect:QW,getDocumentElement:as,getClippingRect:aK,getOffsetParent:KR,getElementRects:lK,getClientRects:JW,getDimensions:oK,getScale:rf,isElement:Er,isRTL:uK},fK=KW,dK=qW,hK=GW,XT=VW,mK=(e,t,n)=>{const r=new Map,i={platform:cK,...n},o={...i.platform,_c:r};return $W(e,t,{...i,platform:o})};var pK=typeof document<"u",gK=function(){},Dg=pK?w.useLayoutEffect:gK;function nv(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!nv(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!nv(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function ZR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function QT(e,t){const n=ZR(e);return Math.round(t*n)/n}function Rb(e){const t=w.useRef(e);return Dg(()=>{t.current=e}),t}function vK(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:l}={},transform:c=!0,whileElementsMounted:f,open:h}=e,[m,y]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[x,b]=w.useState(r);nv(x,r)||b(r);const[C,_]=w.useState(null),[A,O]=w.useState(null),P=w.useCallback(z=>{z!==W.current&&(W.current=z,_(z))},[]),N=w.useCallback(z=>{z!==X.current&&(X.current=z,O(z))},[]),F=o||C,U=l||A,W=w.useRef(null),X=w.useRef(null),ae=w.useRef(m),ce=f!=null,re=Rb(f),J=Rb(i),oe=Rb(h),we=w.useCallback(()=>{if(!W.current||!X.current)return;const z={placement:t,strategy:n,middleware:x};J.current&&(z.platform=J.current),mK(W.current,X.current,z).then(H=>{const I={...H,isPositioned:oe.current!==!1};se.current&&!nv(ae.current,I)&&(ae.current=I,Of.flushSync(()=>{y(I)}))})},[x,t,n,J,oe]);Dg(()=>{h===!1&&ae.current.isPositioned&&(ae.current.isPositioned=!1,y(z=>({...z,isPositioned:!1})))},[h]);const se=w.useRef(!1);Dg(()=>(se.current=!0,()=>{se.current=!1}),[]),Dg(()=>{if(F&&(W.current=F),U&&(X.current=U),F&&U){if(re.current)return re.current(F,U,we);we()}},[F,U,we,re,ce]);const ue=w.useMemo(()=>({reference:W,floating:X,setReference:P,setFloating:N}),[P,N]),Y=w.useMemo(()=>({reference:F,floating:U}),[F,U]),k=w.useMemo(()=>{const z={position:n,left:0,top:0};if(!Y.floating)return z;const H=QT(Y.floating,m.x),I=QT(Y.floating,m.y);return c?{...z,transform:"translate("+H+"px, "+I+"px)",...ZR(Y.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:I}},[n,c,Y.floating,m.x,m.y]);return w.useMemo(()=>({...m,update:we,refs:ue,elements:Y,floatingStyles:k}),[m,we,ue,Y,k])}const yK=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?XT({element:r.current,padding:i}).fn(n):{}:r?XT({element:r,padding:i}).fn(n):{}}}},bK=(e,t)=>({...fK(e),options:[e,t]}),xK=(e,t)=>({...hK(e),options:[e,t]}),wK=(e,t)=>({...dK(e),options:[e,t]}),_K=(e,t)=>({...yK(e),options:[e,t]}),SK="data-floating-ui-focusable",JT="active",eO="selected",CK={...u_};let tO=!1,EK=0;const nO=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+EK++;function AK(){const[e,t]=w.useState(()=>tO?nO():void 0);return yl(()=>{e==null&&t(nO())},[]),w.useEffect(()=>{tO=!0},[]),e}const TK=CK.useId,OK=TK||AK;function jK(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const MK=w.createContext(null),PK=w.createContext(null),XR=()=>{var e;return((e=w.useContext(MK))==null?void 0:e.id)||null},QR=()=>w.useContext(PK);function LK(e){return"data-floating-ui-"+e}function ya(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const rO=LK("safe-polygon");function Db(e,t,n){if(n&&!Mh(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}function kb(e){return typeof e=="function"?e():e}function NK(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,events:o,elements:l}=e,{enabled:c=!0,delay:f=0,handleClose:h=null,mouseOnly:m=!1,restMs:y=0,move:x=!0}=t,b=QR(),C=XR(),_=ol(h),A=ol(f),O=ol(n),P=ol(y),N=w.useRef(),F=w.useRef(-1),U=w.useRef(),W=w.useRef(-1),X=w.useRef(!0),ae=w.useRef(!1),ce=w.useRef(()=>{}),re=w.useRef(!1),J=fh(()=>{var k;const z=(k=i.current.openEvent)==null?void 0:k.type;return z?.includes("mouse")&&z!=="mousedown"});w.useEffect(()=>{if(!c)return;function k(z){let{open:H}=z;H||(ya(F),ya(W),X.current=!0,re.current=!1)}return o.on("openchange",k),()=>{o.off("openchange",k)}},[c,o]),w.useEffect(()=>{if(!c||!_.current||!n)return;function k(H){J()&&r(!1,H,"hover")}const z=tg(l.floating).documentElement;return z.addEventListener("mouseleave",k),()=>{z.removeEventListener("mouseleave",k)}},[l.floating,n,r,c,_,J]);const oe=w.useCallback(function(k,z,H){z===void 0&&(z=!0),H===void 0&&(H="hover");const I=Db(A.current,"close",N.current);I&&!U.current?(ya(F),F.current=window.setTimeout(()=>r(!1,k,H),I)):z&&(ya(F),r(!1,k,H))},[A,r]),we=fh(()=>{ce.current(),U.current=void 0}),se=fh(()=>{if(ae.current){const k=tg(l.floating).body;k.style.pointerEvents="",k.removeAttribute(rO),ae.current=!1}}),ue=fh(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);w.useEffect(()=>{if(!c)return;function k(q){if(ya(F),X.current=!1,m&&!Mh(N.current)||kb(P.current)>0&&!Db(A.current,"open"))return;const ee=Db(A.current,"open",N.current);ee?F.current=window.setTimeout(()=>{O.current||r(!0,q,"hover")},ee):n||r(!0,q,"hover")}function z(q){if(ue()){se();return}ce.current();const ee=tg(l.floating);if(ya(W),re.current=!1,_.current&&i.current.floatingContext){n||ya(F),U.current=_.current({...i.current.floatingContext,tree:b,x:q.clientX,y:q.clientY,onClose(){se(),we(),ue()||oe(q,!0,"safe-polygon")}});const pe=U.current;ee.addEventListener("mousemove",pe),ce.current=()=>{ee.removeEventListener("mousemove",pe)};return}(N.current==="touch"?!DW(l.floating,q.relatedTarget):!0)&&oe(q)}function H(q){ue()||i.current.floatingContext&&(_.current==null||_.current({...i.current.floatingContext,tree:b,x:q.clientX,y:q.clientY,onClose(){se(),we(),ue()||oe(q)}})(q))}function I(){ya(F)}function j(q){ue()||oe(q,!1)}if(Er(l.domReference)){const q=l.domReference,ee=l.floating;return n&&q.addEventListener("mouseleave",H),x&&q.addEventListener("mousemove",k,{once:!0}),q.addEventListener("mouseenter",k),q.addEventListener("mouseleave",z),ee&&(ee.addEventListener("mouseleave",H),ee.addEventListener("mouseenter",I),ee.addEventListener("mouseleave",j)),()=>{n&&q.removeEventListener("mouseleave",H),x&&q.removeEventListener("mousemove",k),q.removeEventListener("mouseenter",k),q.removeEventListener("mouseleave",z),ee&&(ee.removeEventListener("mouseleave",H),ee.removeEventListener("mouseenter",I),ee.removeEventListener("mouseleave",j))}}},[l,c,e,m,x,oe,we,se,r,n,O,b,A,_,i,ue,P]),yl(()=>{var k;if(c&&n&&(k=_.current)!=null&&(k=k.__options)!=null&&k.blockPointerEvents&&J()){ae.current=!0;const H=l.floating;if(Er(l.domReference)&&H){var z;const I=tg(l.floating).body;I.setAttribute(rO,"");const j=l.domReference,q=b==null||(z=b.nodesRef.current.find(ee=>ee.id===C))==null||(z=z.context)==null?void 0:z.elements.floating;return q&&(q.style.pointerEvents=""),I.style.pointerEvents="none",j.style.pointerEvents="auto",H.style.pointerEvents="auto",()=>{I.style.pointerEvents="",j.style.pointerEvents="",H.style.pointerEvents=""}}}},[c,n,C,l,b,_,J]),yl(()=>{n||(N.current=void 0,re.current=!1,we(),se())},[n,we,se]),w.useEffect(()=>()=>{we(),ya(F),ya(W),se()},[c,l.domReference,we,se]);const Y=w.useMemo(()=>{function k(z){N.current=z.pointerType}return{onPointerDown:k,onPointerEnter:k,onMouseMove(z){const{nativeEvent:H}=z;function I(){!X.current&&!O.current&&r(!0,H,"hover")}m&&!Mh(N.current)||n||kb(P.current)===0||re.current&&z.movementX**2+z.movementY**2<2||(ya(W),N.current==="touch"?I():(re.current=!0,W.current=window.setTimeout(I,kb(P.current))))}}},[m,r,n,O,P]);return w.useMemo(()=>c?{reference:Y}:{},[c,Y])}function iO(e){return Ni(e.target)&&e.target.tagName==="BUTTON"}function RK(e){return Ni(e.target)&&e.target.tagName==="A"}function aO(e){return kW(e)}function DK(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:o}}=e,{enabled:l=!0,event:c="click",toggle:f=!0,ignoreMouse:h=!1,keyboardHandlers:m=!0,stickIfOpen:y=!0}=t,x=w.useRef(),b=w.useRef(!1),C=w.useMemo(()=>({onPointerDown(_){x.current=_.pointerType},onMouseDown(_){const A=x.current;_.button===0&&c!=="click"&&(Mh(A,!0)&&h||(n&&f&&(!(i.current.openEvent&&y)||i.current.openEvent.type==="mousedown")?r(!1,_.nativeEvent,"click"):(_.preventDefault(),r(!0,_.nativeEvent,"click"))))},onClick(_){const A=x.current;if(c==="mousedown"&&x.current){x.current=void 0;return}Mh(A,!0)&&h||(n&&f&&(!(i.current.openEvent&&y)||i.current.openEvent.type==="click")?r(!1,_.nativeEvent,"click"):r(!0,_.nativeEvent,"click"))},onKeyDown(_){x.current=void 0,!(_.defaultPrevented||!m||iO(_))&&(_.key===" "&&!aO(o)&&(_.preventDefault(),b.current=!0),!RK(_)&&_.key==="Enter"&&r(!(n&&f),_.nativeEvent,"click"))},onKeyUp(_){_.defaultPrevented||!m||iO(_)||aO(o)||_.key===" "&&b.current&&(b.current=!1,r(!(n&&f),_.nativeEvent,"click"))}}),[i,o,c,h,m,r,n,y,f]);return w.useMemo(()=>l?{reference:C}:{},[l,C])}function kK(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=OK(),o=w.useRef({}),[l]=w.useState(()=>jK()),c=XR()!=null,[f,h]=w.useState(r.reference),m=fh((b,C,_)=>{o.current.openEvent=b?C:void 0,l.emit("openchange",{open:b,event:C,reason:_,nested:c}),n?.(b,C,_)}),y=w.useMemo(()=>({setPositionReference:h}),[]),x=w.useMemo(()=>({reference:f||r.reference||null,floating:r.floating||null,domReference:r.reference}),[f,r.reference,r.floating]);return w.useMemo(()=>({dataRef:o,open:t,onOpenChange:m,elements:x,events:l,floatingId:i,refs:y}),[t,m,x,l,i,y])}function JR(e){e===void 0&&(e={});const{nodeId:t}=e,n=kK({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[o,l]=w.useState(null),[c,f]=w.useState(null),m=i?.domReference||o,y=w.useRef(null),x=QR();yl(()=>{m&&(y.current=m)},[m]);const b=vK({...e,elements:{...i,...c&&{reference:c}}}),C=w.useCallback(N=>{const F=Er(N)?{getBoundingClientRect:()=>N.getBoundingClientRect(),getClientRects:()=>N.getClientRects(),contextElement:N}:N;f(F),b.refs.setReference(F)},[b.refs]),_=w.useCallback(N=>{(Er(N)||N===null)&&(y.current=N,l(N)),(Er(b.refs.reference.current)||b.refs.reference.current===null||N!==null&&!Er(N))&&b.refs.setReference(N)},[b.refs]),A=w.useMemo(()=>({...b.refs,setReference:_,setPositionReference:C,domReference:y}),[b.refs,_,C]),O=w.useMemo(()=>({...b.elements,domReference:m}),[b.elements,m]),P=w.useMemo(()=>({...b,...r,refs:A,elements:O,nodeId:t}),[b,A,O,t,r]);return yl(()=>{r.dataRef.current.floatingContext=P;const N=x?.nodesRef.current.find(F=>F.id===t);N&&(N.context=P)}),w.useMemo(()=>({...b,context:P,refs:A,elements:O}),[b,A,O,P])}function Ib(e,t,n){const r=new Map,i=n==="item";let o=e;if(i&&e){const{[JT]:l,[eO]:c,...f}=e;o=f}return{...n==="floating"&&{tabIndex:-1,[SK]:""},...o,...t.map(l=>{const c=l?l[n]:null;return typeof c=="function"?e?c(e):null:c}).concat(e).reduce((l,c)=>(c&&Object.entries(c).forEach(f=>{let[h,m]=f;if(!(i&&[JT,eO].includes(h)))if(h.indexOf("on")===0){if(r.has(h)||r.set(h,[]),typeof m=="function"){var y;(y=r.get(h))==null||y.push(m),l[h]=function(){for(var x,b=arguments.length,C=new Array(b),_=0;_A(...C)).find(A=>A!==void 0)}}}else l[h]=m}),l),{})}}function e6(e){e===void 0&&(e=[]);const t=e.map(c=>c?.reference),n=e.map(c=>c?.floating),r=e.map(c=>c?.item),i=w.useCallback(c=>Ib(c,e,"reference"),t),o=w.useCallback(c=>Ib(c,e,"floating"),n),l=w.useCallback(c=>Ib(c,e,"item"),r);return w.useMemo(()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:l}),[i,o,l])}const oO=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Hc(e,t){return typeof e=="function"?e(t):e}function IK(e,t){const[n,r]=w.useState(e);return e&&!n&&r(!0),w.useEffect(()=>{if(!e&&n){const i=setTimeout(()=>r(!1),t);return()=>clearTimeout(i)}},[e,n,t]),n}function zK(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:i=250}=t,l=(typeof i=="number"?i:i.close)||0,[c,f]=w.useState("unmounted"),h=IK(n,l);return!h&&c==="close"&&f("unmounted"),yl(()=>{if(r){if(n){f("initial");const m=requestAnimationFrame(()=>{Of.flushSync(()=>{f("open")})});return()=>{cancelAnimationFrame(m)}}f("close")}},[n,r]),{isMounted:h,status:c}}function UK(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:i,common:o,duration:l=250}=t,c=e.placement,f=c.split("-")[0],h=w.useMemo(()=>({side:f,placement:c}),[f,c]),m=typeof l=="number",y=(m?l:l.open)||0,x=(m?l:l.close)||0,[b,C]=w.useState(()=>({...Hc(o,h),...Hc(n,h)})),{isMounted:_,status:A}=zK(e,{duration:l}),O=ol(n),P=ol(r),N=ol(i),F=ol(o);return yl(()=>{const U=Hc(O.current,h),W=Hc(N.current,h),X=Hc(F.current,h),ae=Hc(P.current,h)||Object.keys(U).reduce((ce,re)=>(ce[re]="",ce),{});if(A==="initial"&&C(ce=>({transitionProperty:ce.transitionProperty,...X,...U})),A==="open"&&C({transitionProperty:Object.keys(ae).map(oO).join(","),transitionDuration:y+"ms",...X,...ae}),A==="close"){const ce=W||U;C({transitionProperty:Object.keys(ce).map(oO).join(","),transitionDuration:x+"ms",...X,...ce})}},[x,N,O,P,F,y,A,h]),{isMounted:_,styles:b}}var t6={prefix:"far",iconName:"clone",icon:[512,512,[],"f24d","M288 464L64 464c-8.8 0-16-7.2-16-16l0-224c0-8.8 7.2-16 16-16l48 0 0-48-48 0c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l224 0c35.3 0 64-28.7 64-64l0-48-48 0 0 48c0 8.8-7.2 16-16 16zM224 304c-8.8 0-16-7.2-16-16l0-224c0-8.8 7.2-16 16-16l224 0c8.8 0 16 7.2 16 16l0 224c0 8.8-7.2 16-16 16l-224 0zm-64-16c0 35.3 28.7 64 64 64l224 0c35.3 0 64-28.7 64-64l0-224c0-35.3-28.7-64-64-64L224 0c-35.3 0-64 28.7-64 64l0 224z"]},BK={prefix:"far",iconName:"image",icon:[448,512,[],"f03e","M64 80c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l320 0c8.8 0 16-7.2 16-16l0-320c0-8.8-7.2-16-16-16L64 80zM0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zm128 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm136 72c8.5 0 16.4 4.5 20.7 11.8l80 136c4.4 7.4 4.4 16.6 .1 24.1S352.6 384 344 384l-240 0c-8.9 0-17.2-5-21.3-12.9s-3.5-17.5 1.6-24.8l56-80c4.5-6.4 11.8-10.2 19.7-10.2s15.2 3.8 19.7 10.2l17.2 24.6 46.5-79c4.3-7.3 12.2-11.8 20.7-11.8z"]},FK={prefix:"far",iconName:"circle",icon:[512,512,[128308,128309,128992,128993,128994,128995,128996,9679,9898,9899,11044,61708,61915],"f111","M464 256a208 208 0 1 0 -416 0 208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0 256 256 0 1 1 -512 0z"]},$K={prefix:"far",iconName:"circle-right",icon:[512,512,[61838,"arrow-alt-circle-right"],"f35a","M464 256a208 208 0 1 1 -416 0 208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0 256 256 0 1 0 -512 0zm387.3 11.3c6.2-6.2 6.2-16.4 0-22.6l-104-104c-4.6-4.6-11.5-5.9-17.4-3.5S256 145.5 256 152l0 72-104 0c-13.3 0-24 10.7-24 24l0 16c0 13.3 10.7 24 24 24l104 0 0 72c0 6.5 3.9 12.3 9.9 14.8s12.9 1.1 17.4-3.5l104-104z"]},VK=$K;const HK=({children:e,summary:t,summaryClasses:n,...r})=>{const i=w.useRef(null),[o,l]=w.useState(!1);return w.useEffect(()=>{const c=i.current,f=()=>l(!!c?.open);return c?.addEventListener("toggle",f),()=>c?.removeEventListener("toggle",f)},[]),g.jsxs("details",{ref:i,...r,children:[g.jsx("summary",{className:Oe("focus-ring px-1 -mx-1 rounded-sm",n),children:t}),o&&g.jsx("div",{className:"mt-3 flex flex-col gap-y-3",children:e})]})},qK=w.forwardRef(({className:e,...t},n)=>g.jsx("div",{className:Oe("px-4 py-3 rounded-t-md","bg-lm-primary dark:bg-dm-primary border-b border-lm-border dark:border-dm-border",e),...t,ref:n})),GK=w.forwardRef(({className:e,...t},n)=>g.jsx("div",{className:Oe("p-4 bg-lm-primary dark:bg-dm-primary first:rounded-t-md","first:rounded-t-md last:rounded-b-md",e),...t,ref:n})),YK=w.forwardRef(({className:e,...t},n)=>g.jsx("div",{className:Oe("px-4 py-3 rounded-b-md","bg-lm-primary dark:bg-dm-primary border-t border-lm-border dark:border-dm-border",e),...t,ref:n})),WK=w.forwardRef(({className:e,...t},n)=>g.jsx("div",{className:Oe("group/card rounded-md shadow-md","border border-lm-border dark:border-dm-border bg-lm-primary dark:bg-dm-primary",e),...t,ref:n})),ln=Object.assign(WK,{Body:GK,Header:qK,Footer:YK}),Nt=w.forwardRef(({bodyClassName:e,children:t,...n},r)=>{const{title:i,titleSize:o="md",...l}="title"in n?n:{...n,title:void 0,titleSize:void 0};return g.jsxs(ln,{...l,ref:r,children:[i&&g.jsxs(ln.Header,{children:[o==="lg"&&g.jsx("h4",{children:i}),o==="md"&&g.jsx("h5",{children:i}),o==="sm"&&g.jsx("h6",{children:i})]}),g.jsx(ln.Body,{className:e,children:t})]})});function KK({id:e,items:t,onSelectItem:n,onActiveItemChange:r,renderItem:i,className:o,noItemsMessage:l="No items",anchor:c,"aria-label":f="Items",...h}){const[m,y]=w.useState(0),x=w.useCallback(b=>{if(y(b),r){const[C,_]=[...t.entries()][b];r(C,_)}},[t,r]);return w.useEffect(()=>{const b=c?.current;if(!b)return;const C=_=>{["Enter","ArrowUp","ArrowDown"].includes(_.key)&&_.preventDefault(),_.key==="ArrowDown"?x(Math.min(m+1,t.size-1)):_.key==="ArrowUp"?x(Math.max(m-1,0)):_.key==="Enter"&&n([...t.values()][m])};return b.addEventListener("keydown",C),()=>b.removeEventListener("keydown",C)},[m,c,x,t,n]),g.jsxs(ln,{id:e,className:Oe("py-1 flex flex-col",o),role:"listbox","aria-orientation":"vertical","aria-label":f,...h,children:[t.size===0&&g.jsx("i",{role:"option","aria-disabled":!0,"aria-selected":!1,"data-testid":"no-items",className:"px-2 py-1",children:l}),[...t.entries()].map(([b,C],_)=>g.jsx("button",{id:`${e}_${b}`,type:"button",role:"option","aria-selected":_===m,className:Oe("px-2 py-1 text-left truncate",{"bg-lm-secondary dark:bg-dm-secondary":_===m}),tabIndex:-1,onClick:()=>n(C),onMouseOver:()=>x(_),children:i(C)},b))]})}const nm=w.createContext(void 0),jf=w.createContext({responsive:!0,size:"md"}),ZK=({children:e,className:t})=>{const{responsive:n}=w.useContext(jf);return g.jsx(nm.Provider,{value:{section:"head"},children:g.jsx("thead",{className:Oe({"hidden lg:table-header-group":n},t),children:e})})},XK=({children:e,className:t})=>{const{responsive:n}=w.useContext(jf);return g.jsx(nm.Provider,{value:{section:"body"},children:g.jsx("tbody",{className:Oe({"lg:table-row-group flex flex-col gap-y-3":n},t),children:e})})},QK=({children:e,className:t})=>{const{responsive:n}=w.useContext(jf);return g.jsx(nm.Provider,{value:{section:"footer"},children:g.jsx("tfoot",{className:Oe({"lg:table-row-group flex flex-col gap-y-3 mt-4":n},t),children:e})})},JK=({children:e,className:t,...n})=>{const r=w.useContext(nm)?.section==="body",{responsive:i}=w.useContext(jf);return g.jsx("tr",{className:Oe("group",{"lg:table-row flex flex-col":i,"lg:border-0 border-y-2 border-lm-border dark:border-dm-border":i,"hover:bg-lm-primary dark:hover:bg-dm-primary":r,"group-[&]/card:hover:bg-lm-secondary dark:group-[&]/card:hover:bg-dm-secondary":r},t),...n,children:e})},eZ=({children:e,className:t,columnName:n,type:r,...i})=>{const o=w.useContext(nm),l=r??(o?.section!=="body"?"th":"td"),{responsive:c,size:f}=w.useContext(jf);return g.jsx(l,{"data-column":c?n:void 0,className:Oe("border-lm-border dark:border-dm-border",{"p-1":f==="sm","p-2":f==="md","p-3":f==="lg","border-b-1":!c,"block lg:table-cell not-last:border-b-1 lg:border-b-1":c,"text-left":l==="th","before:lg:hidden before:content-[attr(data-column)] before:font-bold before:mr-1":c&&l==="td"},t),...i,children:e})},tZ=({header:e,footer:t,children:n,responsive:r=!0,size:i="md",...o})=>g.jsx(jf.Provider,{value:{responsive:r,size:i},children:g.jsxs("table",{className:"w-full",...o,children:[g.jsx(ZK,{children:e}),g.jsx(XK,{children:n}),t&&g.jsx(QK,{children:t})]})}),$e=Object.assign(tZ,{Row:JK,Cell:eZ}),Tt=w.forwardRef(({className:e,disabled:t,variant:n="primary",size:r="md",inline:i=!1,solid:o=!1,type:l="button",...c},f)=>{const h="to"in c&&typeof c.to=="string",m=h?Ir:"button",y=h?void 0:l;return g.jsx(m,{ref:f,className:Oe({"inline-flex":i,flex:!i},"gap-2 items-center justify-center","border rounded-md no-underline","transition-colors",{"focus-ring":n==="primary","focus-ring-secondary":n==="secondary","focus-ring-danger":n==="danger"},{"px-1.5 py-1 text-sm":r==="sm","px-3 py-1.5":r==="md","px-4 py-2 text-lg":r==="lg"},{"border-lm-brand dark:border-dm-brand":n==="primary","text-lm-brand dark:text-dm-brand":n==="primary"&&!o,"border-zinc-500":n==="secondary","text-zinc-500":n==="secondary"&&!o,"border-danger":n==="danger","text-danger":n==="danger"&&!o},o&&{"text-white":!0,"bg-lm-brand dark:bg-dm-brand":n==="primary","highlight:bg-lm-brand-dark dark:highlight:bg-dm-brand-dark":n==="primary","highlight:border-lm-brand-dark dark:highlight:border-dm-brand-dark":n==="primary","bg-zinc-500":n==="secondary","highlight:bg-zinc-600 highlight:border-zinc-600":n==="secondary","bg-danger":n==="danger","highlight:bg-danger-dark highlight:border-danger-dark":n==="danger"},!t&&{"highlight:text-white":!o,"highlight:bg-lm-brand dark:highlight:bg-dm-brand":n==="primary","highlight:bg-zinc-500":n==="secondary","highlight:bg-danger":n==="danger"},{"cursor-pointer":!t,"pointer-events-none opacity-65":t},e),disabled:h?void 0:t,"aria-disabled":h?t:void 0,type:y,...c})}),n6=w.forwardRef(({className:e,onChange:t,...n},r)=>{const i=w.useCallback(o=>t?.(o.target.checked,o),[t]);return g.jsx("input",{ref:r,type:"checkbox",className:Oe("appearance-none focus-ring cursor-[inherit]","border-1 border-lm-input-border dark:border-dm-input-border","bg-lm-primary dark:bg-dm-primary checked:bg-lm-brand dark:checked:bg-dm-brand bg-no-repeat","group-[&]/card:bg-lm-input group-[&]/card:dark:bg-dm-input",e),onChange:i,...n})}),W_=w.forwardRef(({className:e,...t},n)=>g.jsx(n6,{ref:n,className:Oe("rounded-sm w-4 h-4 checked:bg-(image:--tick) bg-center",e),...t})),Iu=w.forwardRef(({onClick:e,className:t,label:n="Close",size:r="lg",solid:i},o)=>g.jsx("button",{ref:o,type:"button",onClick:e,className:Oe("rounded-md focus-ring cursor-pointer",{"opacity-50 highlight:opacity-80 transition-opacity":!i},t),"aria-label":n,children:g.jsx(Be,{icon:dy,size:r==="lg"?"xl":r==="md"?"lg":void 0})})),Ti=w.forwardRef(({borderless:e=!1,size:t="md",feedback:n,variant:r="default",className:i,disabled:o,...l},c)=>g.jsx("input",{ref:c,className:Oe("outline-none",r==="default"&&["w-full",{"focus-ring":!n,"focus-ring-danger":n==="error","px-2 py-1 text-sm":t==="sm","px-3 py-1.5":t==="md","px-4 py-2 text-xl":t==="lg","rounded-md border":!e,"border-lm-input-border dark:border-dm-input-border":!e&&!n,"border-danger":!e&&n==="error","bg-lm-disabled-input dark:bg-dm-disabled-input":o,"bg-lm-primary dark:bg-dm-primary":!o,"group-[&]/card:bg-lm-input group-[&]/card:dark:bg-dm-input":!o}],i),disabled:o,...l})),Ma=({required:e,children:t,className:n,...r})=>g.jsxs("label",{className:Oe("cursor-pointer",n),...r,children:[t,e&&g.jsx("span",{className:"text-danger ml-1","data-testid":"required-indicator",children:"*"})]}),K_=({children:e,helpText:t,error:n,"data-testid":r})=>g.jsxs("div",{className:"flex flex-col gap-1","data-testid":r,children:[e,t&&g.jsx("small",{"data-testid":r?`${r}-help-text`:"help-text",className:"text-gray-500 dark:text-gray-400",children:t}),n&&g.jsx("span",{"data-testid":r?`${r}-error`:"error",className:"text-danger",children:n})]}),di=w.forwardRef(({label:e,inputClassName:t,required:n,hiddenRequired:r,error:i,helpText:o,"data-testid":l,...c},f)=>{const h=w.useId();return g.jsxs(K_,{error:i,helpText:o,"data-testid":l,children:[g.jsx(Ma,{htmlFor:h,required:n,children:e}),g.jsx(Ti,{ref:f,id:h,className:t,required:n||r,feedback:i?"error":void 0,...c})]})}),nZ=w.forwardRef(({containerClassName:e,className:t,size:n,...r},i)=>{const{flag:o,toggle:l,setToFalse:c}=Cn(),f=w.useRef(null),h=w.useCallback(({relatedTarget:m})=>{f.current?.contains(m)||c()},[f,c]);return g.jsxs("div",{className:Oe("group relative",e),ref:f,onBlurCapture:h,children:[g.jsx(Ti,{ref:i,type:o?"text":"password",className:Oe({"pr-10":n!=="sm","pr-8":n==="sm"},t),size:n,"data-testid":"input",...r}),g.jsx("button",{type:"button",onClick:l,title:o?"Hide password":"Show password","aria-label":o?"Hide password":"Show password",className:Oe("absolute top-[50%] translate-y-[-50%] px-1 cursor-pointer","text-placeholder hover:text-lm-text hover:dark:text-dm-text transition-colors",{"right-1.5":n!=="sm","scale-85 right-1":n==="sm"}),tabIndex:-1,children:g.jsx(Be,{icon:o?EH:GV})})]})}),rZ=w.forwardRef(({label:e,inputClassName:t,required:n,hiddenRequired:r,error:i,helpText:o,"data-testid":l,...c},f)=>{const h=w.useId();return g.jsxs(K_,{error:i,helpText:o,"data-testid":l,children:[g.jsx(Ma,{htmlFor:h,required:n,children:e}),g.jsx(nZ,{ref:f,id:h,className:t,required:n||r,feedback:i?"error":void 0,...c})]})}),iZ=w.forwardRef(({className:e,size:t="md",feedback:n,disabled:r,...i},o)=>g.jsx("select",{ref:o,className:Oe("w-full rounded-md border appearance-none pr-9","bg-(image:--chevron-down) bg-no-repeat bg-position-[right_0.75rem_center] bg-size-[16px_12px]",{"focus-ring":!n,"focus-ring-danger":n==="error","border-lm-input-border dark:border-dm-input-border":!n,"border-danger":n==="error","pl-2 py-1 text-sm":t==="sm","pl-3 py-1.5":t==="md","pl-4 py-2 text-xl":t==="lg","bg-lm-disabled-input dark:bg-dm-disabled-input":r,"bg-lm-primary dark:bg-dm-primary group-[&]/card:bg-lm-input group-[&]/card:dark:bg-dm-input":!r},e),disabled:r,...i})),Z_=w.forwardRef(({selectClassName:e,label:t,error:n,helpText:r,required:i,hiddenRequired:o,"data-testid":l,...c},f)=>{const h=w.useId();return g.jsxs(K_,{error:n,helpText:r,"data-testid":l,children:[g.jsx(Ma,{htmlFor:h,required:i,children:t}),g.jsx(iZ,{ref:f,id:h,className:e,required:i||o,feedback:n?"error":void 0,...c})]})}),Mf=w.forwardRef(({onChange:e,containerClassName:t,inputClassName:n,size:r="lg",loading:i=!1,variant:o="default",immediate:l=!1,...c},f)=>{const{setTimeout:h,clearCurrentTimeout:m}=s6(500),y=w.useCallback(x=>{!x||l?(m(),e(x)):h(()=>e(x))},[m,l,e,h]);return g.jsxs("div",{className:Oe("group relative focus-within:z-10",t),children:[o==="default"&&g.jsx(Be,{icon:i?O_:VV,spin:i,className:Oe("absolute top-[50%] translate-y-[-50%] transition-colors","text-placeholder group-focus-within:text-lm-text dark:group-focus-within:text-dm-text",{"left-3":r!=="sm","scale-85 left-2":r==="sm"})}),g.jsx(Ti,{ref:f,variant:o,type:"search",className:Oe(o==="default"&&{"pl-9":r!=="sm","pl-7":r==="sm"},n),placeholder:"Search...",onChange:x=>y(x.target.value),size:r,...c})]})});function aZ({searchResults:e,onSearch:t,onSelectSearchResult:n,renderSearchResult:r,size:i="md",listboxSpan:o="full",onFocus:l,containerClassName:c,listboxClassName:f,...h},m){const y=w.useId(),[x,b]=w.useState(),C=w.useRef(null);w.useImperativeHandle(m,()=>C.current);const _=w.useMemo(()=>e?x??[...e.keys()][0]:void 0,[x,e]),A=w.useCallback(O=>{n(O),t(""),C.current.value=""},[t,n,C]);return g.jsxs("div",{className:Oe("relative",c),onBlur:O=>{O.currentTarget.contains(O.relatedTarget)||t("")},children:[g.jsx(Mf,{onChange:t,size:i,ref:C,role:"combobox","aria-autocomplete":"list","aria-expanded":!!e,"aria-controls":y,"aria-activedescendant":_?`${y}_${_}`:void 0,autoComplete:"off",autoCorrect:"off",onFocus:O=>{l?.(O),t(O.target.value)},...h}),e&&g.jsx(KK,{id:y,items:e,anchor:C,onSelectItem:A,onActiveItemChange:b,renderItem:r,className:Oe("absolute top-full mt-1 z-10",{"min-w-60":o==="auto","w-full":o==="full"},f),"aria-label":"Matching items",noItemsMessage:"No results found matching search"})]})}const r6=w.forwardRef(aZ),oZ=({name:e,color:t})=>g.jsxs("div",{className:"inline-flex items-center gap-2",children:[g.jsx("div",{"aria-hidden":!0,className:"w-4 h-4 rounded-full",style:{backgroundColor:t}}),e]}),sZ=({tag:e,color:t,size:n,onRemove:r})=>g.jsxs("li",{className:Oe("inline-flex items-center gap-1 font-bold [&]:rounded-md",{"px-1 text-sm":n==="sm","py-0.25 px-1.5":n==="md","py-0.5 px-1.5":n==="lg"}),style:{backgroundColor:t,color:X_(t)?"#000":"#fff"},onClick:i=>i.stopPropagation(),children:[e,g.jsx(Iu,{label:`Remove ${e}`,solid:!0,size:"sm",onClick:()=>r(e)})]}),sO="#99a1af",lZ=({tags:e,selectedTags:t=[],onTagsChange:n,getColorForTag:r,searchMode:i="startsWith",immutable:o=!1,size:l="md",disabled:c,containerClassName:f,...h})=>{const{searchResults:m,onSearch:y}=o6({tags:e,selectedTags:t,searchMode:i,allowAdding:!o}),x=w.useCallback(_=>{const A=(_.match(/Add\s+"([^"]+)"\s+tag/)?.[1]??_).split(",").map(J_);n?.([...new Set([...t,...A])])},[n,t]),b=w.useCallback(_=>n?.(t.filter(A=>A!==_)),[n,t]),C=w.useRef(null);return g.jsxs("div",{className:Oe("rounded-md flex flex-wrap gap-1","border border-lm-input-border dark:border-dm-input-border","cursor-text focus-within:focus-within-ring",{"p-0.5":l==="sm","p-1.25":l==="md","p-2":l==="lg","bg-lm-disabled-input dark:bg-dm-disabled-input":c,"bg-lm-primary dark:bg-dm-primary":!c,"group-[&]/card:bg-lm-input group-[&]/card:dark:bg-dm-input":!c},f),onClick:_=>{_.target!==C.current&&C.current?.focus()},children:[g.jsx("ul",{className:"m-0 p-0 flex flex-wrap gap-1",children:t.map((_,A)=>{const O=r?.(_)??sO;return g.jsx(sZ,{tag:_,color:O,onRemove:b,size:l},`${_}${A}`)})}),g.jsx(r6,{variant:"unstyled",listboxSpan:"auto",containerClassName:"flex items-center",listboxClassName:"whitespace-nowrap",inputClassName:Oe("no-clear-button",{"px-1 text-sm":l==="sm","px-2 h-[26px]":l==="md","px-3 text-xl":l==="lg"}),searchResults:m,onSearch:y,onSelectSearchResult:x,renderSearchResult:_=>_.match(/Add\s+"([^"]+)"\s+tag/)?_:g.jsx(oZ,{name:_,color:r?.(_)??sO}),onKeyDown:_=>{_.key==="Backspace"&&!m&&b(t[t.length-1])},size:l,disabled:c,ref:C,immediate:!0,...h})]})},uZ=w.forwardRef(({className:e,...t},n)=>g.jsx(n6,{ref:n,className:Oe("rounded-full w-8 h-4","bg-(image:--circle-grey-dark) dark:bg-(image:--circle-grey-light) checked:bg-(image:--circle-white)","focus-visible:not-checked:bg-(image:--circle-blue-light)","checked:bg-right transition-[background-position]",e),...t}));function cZ(e,{elementsSelector:t,focusFirstItem:n=!1,vertical:r=!0,horizontal:i=!0}){const o=w.useMemo(()=>{const f=[];return r&&f.push("ArrowDown"),i&&f.push("ArrowRight"),f},[i,r]),l=w.useMemo(()=>{const f=[];return r&&f.push("ArrowUp"),i&&f.push("ArrowLeft"),f},[i,r]),c=w.useMemo(()=>[...o,...l],[o,l]);w.useEffect(()=>{const f=e.current;if(!f)return()=>{};const h=new AbortController,m=()=>[...f.querySelectorAll(t)],y=m(),x=Math.max(y.findIndex(b=>b.dataset.selected==="true"),0);return y.forEach((b,C)=>{b.tabIndex=C===x?0:-1,n&&C===x&&b.focus()}),f.addEventListener("keydown",b=>{if(!c.includes(b.key))return;b.preventDefault();const C=m(),_=C.findIndex(O=>O.tabIndex===0),A=o.includes(b.key)?C[_+1]??C[0]:C[_-1]??C[C.length-1];C.forEach(O=>{O.tabIndex=-1}),A.tabIndex=0,A.focus()},{signal:h.signal}),()=>h.abort()},[c,e,t,n,o])}const fZ=()=>{const e=uo();return w.useCallback(()=>e(-1),[e])},dZ=128;function X_(e){const[t,n,r]=(e.match(/../g)??[]).map(i=>parseInt(i,16)||0);return Math.round(Math.sqrt(.299*t**2+.587*n**2+.114*r**2))>=dZ}const i6=({text:e,className:t,size:n="lg",initialCopied:r=!1,navigator_:i=globalThis.navigator,...o})=>{const[l,c]=Sy({initialValue:r}),f=w.useCallback(()=>i.clipboard.writeText(e).then(c),[i.clipboard,e,c]);return g.jsx("button",{type:"button",className:Oe("focus-ring rounded-sm cursor-pointer",{"text-md":n==="sm","text-lg":n==="md","text-xl":n==="lg"},t),"aria-label":`Copy ${e} to clipboard`,title:"Copy to clipboard",onClick:f,...o,children:g.jsx(Be,{icon:l?Ru:t6})})},a6=e=>{const t=new URLSearchParams(e),n={};return t.forEach((r,i)=>{if(i.endsWith("[]")){const o=i.slice(0,-2);n[o]??=[],n[o].push(r)}else n[i]=r}),n},Q_=e=>{const t=new URLSearchParams;for(const[n,r]of Object.entries(e))r!==void 0&&(Array.isArray(r)?r.forEach(i=>t.append(`${n}[]`,`${i}`)):t.append(n,`${r}`));return t.toString()},Zu=()=>{const{search:e}=Or();return w.useMemo(()=>a6(e),[e])},hZ=/\s+/g,J_=e=>e.trim().toLowerCase().replace(hZ,"-"),mZ=new Intl.NumberFormat("en-US"),Sn=e=>mZ.format(Number(e)),lO=10,pZ=e=>Math.ceil(e/lO)*lO,qc=2,rv="...",gZ=(e,t)=>Array.from({length:t-e},(n,r)=>e+r),vZ=(e,t)=>{const n=gZ(Math.max(qc,e-qc),Math.min(t-1,e+qc)+1);return e-qc>qc&&n.unshift(rv),e+qce===rv,yZ=e=>_h(e)?e:Sn(e),bZ=(e,t)=>_h(e)?`${e}_${t}`:`${e}`;function o6({tags:e,selectedTags:t,searchMode:n,searchLimit:r=5,allowAdding:i=!1}){const[o,l]=w.useState(),c=w.useCallback(f=>{const h=f.toLowerCase().trim();if(!h){l(void 0);return}const m=e.filter(y=>t.includes(y)?!1:y.toLowerCase()[n](h)).slice(0,r);i&&m.push(`Add "${h.split(",").map(J_).join(",")}" tag`),l(new Map(m.map(y=>[y,y])))},[i,r,n,t,e]);return{searchResults:o,onSearch:c}}function s6(e,t=globalThis.setTimeout,n=globalThis.clearTimeout){const r=w.useRef(null),i=w.useCallback(()=>{r.current&&n(r.current)},[n]),o=w.useCallback((l,c)=>{i(),r.current=t(()=>{l(),r.current=null},c??e)},[i,e,t]);return w.useEffect(()=>i,[i]),w.useMemo(()=>({setTimeout:o,clearCurrentTimeout:i}),[i,o])}const xZ=2e3,Sy=({initialValue:e=!1,delay:t=xZ}={},n=globalThis.setTimeout,r=globalThis.clearTimeout)=>{const{setTimeout:i}=s6(t,n,r),[o,l]=w.useState(e),c=w.useRef(e),f=w.useCallback(()=>{l(!c.current),i(()=>l(c.current))},[i]);return[o,f]};function Cn(e=!1){const[t,n]=w.useState(e),r=w.useCallback(()=>n(l=>!l),[]),i=w.useCallback(()=>n(!0),[]),o=w.useCallback(()=>n(!1),[]);return{flag:t,toggle:r,setToTrue:i,setToFalse:o}}const l6=w.createContext({}),wZ=({className:e,selected:t,disabled:n,onClick:r,...i})=>{const o="to"in i&&typeof i.to=="string",l=o?Ir:"button",{onItemClick:c}=w.useContext(l6);return g.jsx(l,{role:"menuitem","data-selected":t,className:Oe("flex items-center gap-2","w-full px-3 py-1.5 focus-ring","no-underline text-inherit",{"cursor-pointer":!n,"pointer-events-none opacity-50":n,"bg-lm-secondary dark:bg-dm-secondary":t&&!n,"highlight:bg-lm-secondary dark:highlight:bg-dm-secondary highlight:z-1 relative":!t&&!n},e),tabIndex:-1,disabled:o?void 0:n,"aria-disabled":o?n:void 0,type:o?void 0:"button",onClick:f=>{r?.(f),c?.()},...i})},_Z=()=>g.jsx("div",{role:"separator","aria-hidden":!0,className:"border-b border-lm-border dark:border-dm-border my-2"}),SZ=({children:e})=>g.jsx("div",{role:"heading","aria-level":6,"aria-hidden":!0,className:Oe("flex items-center w-full px-3 py-1.5","text-gray-500 text-sm font-semibold"),onClick:t=>t.stopPropagation(),children:e}),CZ=({className:e,...t})=>g.jsx("div",{className:Oe("px-3 py-1.5",e),...t}),EZ=({children:e,className:t,focusableElementsSelector:n='[role="menuitem"]:not([disabled]):not([aria-disabled])',focusFirstItem:r=!1,onItemClick:i,...o})=>{const l=w.useRef(null);return cZ(l,{elementsSelector:n,focusFirstItem:r}),g.jsx(ln,{ref:l,role:"menu",className:Oe("py-2 whitespace-nowrap",t),...o,children:g.jsx(l6.Provider,{value:{onItemClick:i},children:e})})},dh=Object.assign(EZ,{Item:wZ,Separator:_Z,Title:SZ,Misc:CZ}),AZ=({children:e,menuAlignment:t="left",buttonVariant:n="button",buttonContent:r,buttonClassName:i,buttonSize:o="md",buttonDisabled:l=!1,containerClassName:c,menuClassName:f,caretless:h,buttonLabel:m,menuOffset:y=3})=>{const[x,b]=w.useState(!1),C=w.useCallback(()=>b(!1),[]),_=w.useRef(null),{refs:A,floatingStyles:O,context:P}=JR({open:x,onOpenChange:b,placement:t==="right"?"bottom-end":"bottom-start",middleware:[xK(),bK(y)],elements:{reference:_.current}}),N=DK(P),{getReferenceProps:F,getFloatingProps:U}=e6([N]),W=w.useId(),X=w.useRef(null);return w.useEffect(()=>{const ae=X.current;if(!ae||!x)return()=>{};const ce=new AbortController;return document.body.addEventListener("click",re=>{re.composedPath().includes(ae)||C()},{signal:ce.signal}),()=>ce.abort()},[C,x]),g.jsxs("div",{ref:X,className:Oe("relative inline-block",c),onKeyDown:ae=>{ae.key==="Escape"&&C()},onBlur:ae=>{ae.relatedTarget&&!X.current.contains(ae.relatedTarget)&&C()},children:[g.jsxs("button",{ref:_,...F(),type:"button","aria-haspopup":!0,"aria-expanded":x,"aria-controls":W,"aria-label":m,disabled:l,className:Oe("flex items-center rounded-md focus-ring",{"justify-between":!h,"cursor-pointer":!l,"pointer-events-none opacity-50":l,"border border-lm-border dark:border-dm-border":n==="button","bg-lm-primary dark:bg-dm-primary":n==="button","group-[&]/card:bg-lm-input group-[&]/card:dark:bg-dm-input":n==="button","text-lm-brand dark:text-dm-brand":n==="link","highlight:text-lm-brand-dark dark:highlight:text-dm-brand-dark highlight:underline":n==="link","px-1.5 py-1 text-sm":n!=="text"&&o==="sm","px-3 py-1.5":n!=="text"&&o==="md","px-4 py-2 text-lg":n!=="text"&&o==="lg","gap-x-1.5":o==="sm","gap-x-2":o!=="sm"},i),onKeyDown:ae=>{ae.key==="ArrowDown"&&(ae.preventDefault(),b(!0))},children:[r,!h&&g.jsx(Be,{icon:PN,size:"xs",widthAuto:!0})]}),x&&g.jsx("div",{ref:A.setFloating,style:O,className:"min-w-full z-500",...U(),children:g.jsx(dh,{className:f,id:W,focusableElementsSelector:'[role="menuitem"]:not([disabled]):not([aria-disabled]),input:not([disabled]),select:not([disabled])',focusFirstItem:!0,onItemClick:C,children:e})})]})},qe=Object.assign(AZ,{Item:dh.Item,Separator:dh.Separator,Title:dh.Title,Misc:dh.Misc}),Cy=w.forwardRef(({className:e,disabled:t,size:n="md",type:r="button",...i},o)=>g.jsx("button",{className:Oe("inline-flex rounded-md focus-ring","text-lm-brand dark:text-dm-brand","highlight:text-lm-brand-dark dark:highlight:text-dm-brand-dark highlight:underline",{"px-1.5 py-1 text-sm":n==="sm","px-3 py-1.5":n==="md","px-4 py-2 text-lg":n==="lg","cursor-pointer":!t,"pointer-events-none opacity-65":t},e),disabled:t,type:r,...i,ref:o})),TZ=({className:e,active:t,...n})=>g.jsx("li",{role:"menuitem",className:"w-full flex","data-active":t,children:g.jsx(Ir,{className:Oe("px-2 py-3","max-md:w-full max-md:px-3 max-md:py-2","text-white no-underline highlight:opacity-100 transition-opacity",{"opacity-60":!t,"opacity-100":t},e),...n})}),OZ=({containerClassName:e,buttonClassName:t,menuClassName:n,active:r,...i})=>g.jsx("li",{role:"menuitem","aria-haspopup":!0,className:"w-full flex","data-active":r,children:g.jsx(qe,{containerClassName:Oe("max-md:w-full",e),buttonVariant:"text",buttonClassName:Oe("px-2 py-3","max-md:w-full max-md:px-3 max-md:py-2","text-white highlight:opacity-100 transition-opacity",{"opacity-60":!r,"opacity-100":r},t),menuAlignment:"right",menuOffset:-3,menuClassName:Oe("mx-2",n),...i})}),jZ=({className:e,brand:t,children:n})=>{const{flag:r,toggle:i,setToFalse:o}=Cn(),l=w.useId(),c=w.useId(),{pathname:f}=Or();return w.useEffect(()=>o(),[f,o]),g.jsxs("nav",{className:Oe("w-full relative","bg-lm-main dark:bg-dm-main","flex max-md:flex-col items-center justify-between",e),children:[g.jsxs("div",{className:"w-full relative",children:[g.jsx("h4",{className:Oe("text-white px-4 py-3","max-md:w-full max-md:flex max-md:flex-col items-center"),children:t}),g.jsx(Tt,{id:c,variant:"secondary",className:Oe("absolute right-0 top-[50%] translate-y-[-50%]","md:hidden mx-2 [&]:px-2","opacity-60 highlight:opacity-100 transition-opacity","[&]:text-white [&]:border-white [&]:highlight:bg-transparent"),onClick:i,"aria-label":`${r?"Hide":"Show"} menu`,"aria-controls":l,children:g.jsx(Be,{icon:r?WV:dH})})]}),g.jsx("ul",{id:l,"aria-labelledby":c,role:"menu",className:Oe("m-0 p-0","max-md:w-full md:mr-2 max-md:absolute max-md:top-full z-2000","flex max-md:flex-col items-center","bg-lm-main dark:bg-dm-main",{"max-md:hidden":!r}),children:n})]})},J2=Object.assign(jZ,{MenuItem:TZ,Dropdown:OZ}),u6=w.createContext(null),MZ=({className:e,to:t,...n})=>{const r=w.useContext(u6);return g.jsx(__,{role:"menuitem",to:t,className:({isActive:i})=>Oe("px-4 pt-2 pb-[calc(0.5rem-3px)] border-b-3","highlight:text-lm-brand dark:highlight:text-dm-brand","font-bold text-center no-underline transition-colors","rounded-none outline-none focus-visible:inset-ring-2","focus-visible:inset-ring-lm-brand/50 dark:focus-visible:inset-ring-dm-brand/50",{"text-lm-brand dark:text-dm-brand":i,"border-b-lm-brand dark:border-b-dm-brand active":i,"border-b-transparent text-gray-500":!i,"flex-grow":r?.fill},e),...n})},PZ=({children:e,className:t,fill:n})=>g.jsx(u6.Provider,{value:{fill:n},children:g.jsx(ln,{role:"menubar",className:Oe("flex overflow-hidden",t),children:e})}),nl=Object.assign(PZ,{Pill:MZ}),c6=["border border-r-0 last:border-r border-lm-border dark:border-dm-border","rounded-none first:rounded-l last:rounded-r"],f6=(e=!1)=>Oe(c6,"px-3 py-2 cursor-pointer no-underline","focus-ring focus-visible:z-1",!e&&["text-lm-brand dark:text-dm-brand","bg-lm-primary dark:bg-dm-primary","highlight:bg-lm-secondary dark:highlight:bg-dm-secondary"],e&&"bg-lm-main dark:bg-dm-main text-white"),ew=({children:e})=>g.jsx("span",{"aria-hidden":!0,className:Oe(c6,"px-3 py-2 text-gray-400"),children:e}),d6=()=>g.jsx(ew,{children:rv});function LZ({children:e,active:t,isEllipsis:n,href:r,...i}){const o=w.useMemo(()=>f6(t),[t]);return n?g.jsx(d6,{}):g.jsx(Ir,{className:o,to:r,...i,"data-active":t,children:e})}function NZ({children:e,active:t,isEllipsis:n,...r}){const i=w.useMemo(()=>f6(t),[t]);return n?g.jsx(d6,{}):g.jsx("button",{type:"button",className:i,...r,"data-active":t,children:e})}const Ey=({currentPage:e,pagesCount:t,...n})=>{const r="urlForPage"in n,i=r?LZ:NZ,o=w.useCallback(l=>r?{href:_h(l)?void 0:n.urlForPage(l)}:{onClick:()=>!_h(l)&&n.onPageChange(l)},[r,n]);return t<2?null:g.jsxs("div",{className:"select-none flex","data-testid":"paginator",children:[e===1?g.jsx(ew,{children:g.jsx(Be,{size:"xs",icon:uT})}):g.jsx(i,{...o(Math.max(1,e-1)),"aria-label":"Previous",children:g.jsx(Be,{size:"xs",icon:uT})}),vZ(e,t).map((l,c)=>g.jsx(i,{active:l===e,isEllipsis:_h(l),...o(l),children:yZ(l)},bZ(l,c))),e===t?g.jsx(ew,{children:g.jsx(Be,{size:"xs",icon:Wg})}):g.jsx(i,{...o(Math.min(t,e+1)),"aria-label":"Next",children:g.jsx(Be,{size:"xs",icon:Wg})})]})},RZ=({buttonLabel:e="Options",buttonSize:t="md",...n})=>g.jsx(qe,{buttonContent:g.jsx(Be,{icon:ZV,widthAuto:!0,className:Oe({"px-1":t==="sm"})}),caretless:!0,buttonLabel:e,buttonSize:t,...n}),tn=Object.assign(RZ,{Item:qe.Item,Separator:qe.Separator,Title:qe.Title,Misc:qe.Misc}),DZ=({open:e,children:t,className:n,onClose:r,...i})=>{const o=w.useRef(null);return w.useEffect(()=>{const l=document.body,c=l.style.overflow,f=l.style.paddingRight;if(e){const h=window.outerWidth-l.clientWidth,m=l.scrollHeight>l.clientHeight;l.style.overflow="hidden",m&&(l.style.paddingRight=`${h}px`),o.current?.showModal()}else o.current?.close();return()=>{l.style.overflow=c,l.style.paddingRight=f}},[e]),Of.createPortal(g.jsx("dialog",{ref:o,className:Oe("bg-transparent backdrop:bg-black/50",n),onCancel:l=>{l.preventDefault(),r()},...i,children:e&&t}),document.body)},co=({open:e,onClose:t,variant:n="default",title:r,children:i,className:o,...l})=>{const{size:c="md",confirmText:f="Confirm",cancelText:h="Cancel",confirmDisabled:m,onConfirm:y,onClosed:x,...b}="onConfirm"in l?l:{...l},[C,_]=w.useState(e),A=w.useRef(null),O=w.useRef("cancel"),P=w.useCallback(N=>{N.preventDefault(),N.stopPropagation(),O.current="confirm",y?.()},[y]);return w.useEffect(()=>{if(e){O.current="cancel",_(!0);return}const N=A.current;if(N){delete A.current.dataset.open;let F=!1;const U=W=>{F||W.target!==N||(F=!0,_(!1),x?.(O.current))};return N.addEventListener("transitionend",U),()=>{N.removeEventListener("transitionend",U)}}},[x,e]),w.useEffect(()=>{const N=A.current;C&&N&&(N.dataset.open="")},[C]),g.jsx(DZ,{open:C,onClose:t,className:Oe({"flex w-screen h-screen max-w-screen max-h-screen":C,"overflow-hidden":n==="cover"},o),...b,children:g.jsx("form",{"data-testid":"transition-container",ref:A,className:Oe("w-full m-auto p-4 sm:p-6","-translate-y-4 data-open:translate-y-0 opacity-0 data-open:opacity-100","transition-[opacity_,_translate] duration-300",n!=="cover"&&{"sm:w-sm":c==="sm","md:w-lg":c==="md","md:w-4xl":c==="lg","md:w-6xl":c==="xl"},{"h-full":n==="cover"}),onSubmit:P,children:g.jsx(ln,{className:Oe("w-full",{"h-full relative overflow-auto":n==="cover"}),children:n==="cover"?g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:Oe("px-4 py-3 absolute top-0 left-0 right-0 z-3000","flex items-center justify-between","text-white bg-linear-to-b from-black/70 to-black/10","[text-shadow:_0_2px_4px_rgb(0_0_0/_0.8)]"),children:[g.jsx("h5",{children:r}),g.jsx(Iu,{onClick:t,label:"Close dialog"})]}),i]}):g.jsxs(g.Fragment,{children:[g.jsxs(ln.Header,{className:Oe("sticky top-0","flex items-center justify-between gap-x-2"),children:[g.jsx("h5",{className:Oe({"text-danger":n==="danger"}),children:r}),g.jsx(Iu,{onClick:t,label:"Close dialog"})]}),g.jsx(ln.Body,{children:i}),y&&g.jsxs(ln.Footer,{"data-testid":"footer",className:Oe("flex justify-end items-center gap-x-2","[&]:px-3 sticky bottom-0"),children:[g.jsx(Cy,{onClick:t,children:h}),g.jsx(Tt,{solid:!0,variant:n==="danger"?"danger":"primary",disabled:m,type:"submit",children:f})]})]})})})})},Ko=({className:e,children:t,loading:n=!1,variant:r="default"})=>g.jsx(Nt,{className:Oe({"[&]:border-danger":r==="error"},e),children:g.jsxs("h3",{className:Oe("text-center",{"text-gray-500 dark:text-gray-400":r==="default","text-danger":r==="error"}),children:[n&&g.jsxs(g.Fragment,{children:[g.jsx(Be,{icon:O_,spin:!0}),g.jsx("span",{className:"ml-2",children:t??"Loading..."})]}),!n&&t]})}),Gr=({variant:e,className:t,size:n="md",children:r})=>g.jsx("div",{className:Oe("rounded-md text-center",{"p-2":n==="sm","p-4":n==="md","p-6":n==="lg","[&]:text-white":e!=="warning","bg-lm-brand dark:bg-dm-brand":e==="success","bg-danger":e==="error","bg-warning text-black":e==="warning"},t),children:r}),os=({placement:e="auto"}={})=>{const t=w.useRef(null),n=(()=>{const _=[];return e==="auto"&&_.push(wK()),_.push(_K({element:t})),_})(),[r,i]=w.useState(!1),{refs:o,floatingStyles:l,context:c,middlewareData:f}=JR({placement:e==="auto"?void 0:e,open:r,onOpenChange:i,middleware:n}),h=NK(c,{delay:{open:300},move:!0}),{getFloatingProps:m,getReferenceProps:y}=e6([h]),{isMounted:x,styles:b}=UK(c,{duration:200}),C=w.useMemo(()=>{const _=c.placement.split("-")[0];return{top:"bottom",right:"left",bottom:"top",left:"right"}[_]??""},[c.placement]);return{anchor:{...y(),ref:o.setReference},tooltip:{...m(),refSetter:o.setFloating,isMounted:x,styles:{...l,...b},arrowPos:f.arrow,arrowRef:t,arrowSide:C}}},ss=({children:e,isMounted:t,styles:n,refSetter:r,arrowRef:i,arrowPos:o,arrowSide:l,...c})=>t&&g.jsx("div",{role:"tooltip","aria-live":"polite",className:Oe("z-500 max-w-64",{"pt-2.5":l==="top","pb-2.5":l==="bottom","pr-2.5":l==="right","pl-2.5":l==="left"}),ref:r,style:n,...c,children:g.jsxs("div",{className:"relative px-1.5 py-1 rounded bg-black/90 text-white text-center",children:[g.jsx("span",{className:"sr-only",children:"Tooltip: "}),e,g.jsx("div",{ref:i,className:Oe("absolute","border-l-6 border-r-6 border-b-6 border-l-transparent border-r-transparent border-b-black/90",{"rotate-180":l==="bottom","rotate-90 mr-[-3px]":l==="right","rotate-270 ml-[-3px]":l==="left"}),style:{left:o?.x,top:o?.y,[l]:`${-(i.current?.offsetWidth??0)/2}px`},"data-testid":"arrow"})]})});function h6(e){if(e.currentField!==e.newField)return"ASC";const t={ASC:"DESC",DESC:void 0};return e.currentOrderDir?t[e.currentOrderDir]:"ASC"}function eS(e){const t=h6(e);return{field:t?e.newField:void 0,dir:t}}const m6=(e,{field:t,dir:n})=>!t||!n?e:e.sort((r,i)=>{const o=n==="ASC"?1:-1,l=n==="ASC"?-1:1;return r[t]>i[t]?o:l}),kZ=e=>e.dir?`${e.field}-${e.dir}`:void 0,IZ=e=>{const[t,n]=e.split("-");return{field:t,dir:n}};function rm({items:e,order:t,onChange:n,prefixed:r=!0,buttonVariant:i="button",...o}){const l=w.useCallback(f=>{const h=eS({currentOrderDir:t.dir,currentField:t.field,newField:f});n(h)},[n,t.dir,t.field]),c=i==="button";return g.jsxs(qe,{buttonContent:g.jsxs(g.Fragment,{children:[!c&&"Order by",c&&!t.field&&g.jsx("i",{children:"Order by..."}),c&&t.field&&g.jsxs(g.Fragment,{children:[r&&"Order by: ",e[t.field]," - ",t.dir??"DESC"]})]}),buttonVariant:i,...o,children:[Object.entries(e).map(([f,h])=>g.jsxs(qe.Item,{selected:t.field===f,onClick:()=>l(f),className:"flex items-center justify-between gap-2",children:[h,t.field===f&&g.jsx(Be,{icon:t.dir==="ASC"?tH:CH})]},f)),g.jsx(qe.Separator,{}),g.jsx(qe.Item,{disabled:!t.field,onClick:()=>n({}),children:g.jsx("i",{children:"Clear selection"})})]})}const zZ="#4696e5",UZ="rgba(70, 150, 229, 0.4)",BZ="#2078CF",FZ="rgba(32, 120, 207, 0.4)",Lh=()=>ls()?zZ:BZ,$Z=()=>ls()?UZ:FZ,tw="#f77f28",VZ="rgba(247, 127, 40, 0.4)",HZ="white",qZ="#161b22",GZ=e=>document.querySelector("html")?.setAttribute("data-theme",e),ls=()=>document.querySelector("html")?.getAttribute("data-theme")==="dark",tS=(e=window.matchMedia.bind(window))=>e("(prefers-color-scheme: dark)").matches?"dark":"light",YZ=({isOpen:e,onClose:t,forceUpdate:n})=>{const{flag:r,setToTrue:i}=Cn(),o=w.useCallback(()=>{i(),n()},[n,i]);return e?g.jsxs(ln,{role:"alert",className:Oe("w-[700px] max-w-[calc(100%-30px)]","fixed top-[35px] left-[50%] translate-x-[-50%] z-[1040]"),children:[g.jsxs(ln.Header,{className:"flex items-center justify-between",children:[g.jsx("h5",{children:"This app has just been updated!"}),g.jsx(Iu,{onClick:t})]}),g.jsxs(ln.Body,{className:"flex gap-4 items-center justify-between max-md:flex-col",children:["Restart it to enjoy the new features.",g.jsxs(Tt,{disabled:r,variant:"secondary",solid:!0,onClick:o,children:[!r&&g.jsxs(g.Fragment,{children:["Restart now ",g.jsx(Be,{icon:RV})]}),r&&g.jsx(g.Fragment,{children:"Restarting..."})]})]})]}):null},p6=({children:e,title:t})=>g.jsx("div",{className:"pt-4",children:g.jsxs(Nt,{className:"p-4 w-full lg:w-[65%] m-auto",children:[g.jsx("h2",{children:t}),e]})}),g6=({to:e="/",children:t="Home"})=>g.jsxs(p6,{title:"Oops! We could not find requested route.",children:[g.jsx("p",{children:"Use your browser's back button to navigate to the page you have previously come from, or just press this button."}),g.jsx("br",{}),g.jsx(Tt,{inline:!0,to:e,size:"lg",children:t})]});function oa(e){return w.useMemo(()=>e,[e])}function Pa(e,t){return(n,r=globalThis.console)=>(t.forEach(i=>{const o=n[i];e[i]=o}),e)}const v6=(e,t)=>e.reduce((n,r)=>{const i=t(r);return n[i]=(n[i]||0)+1,n},{}),y6=(e,t)=>e.reduce((n,r)=>{const i=t(r);return(n[i]=n[i]||[]).push(r),n},{}),zb=e=>Object.prototype.toString.call(e)==="[object Object]",b6=(e,t)=>{const n={};return(...r)=>{const i=e(...r);if(n[i])return n[i];const o=t(...r);return n[i]=o,o}},Pf=(e,t)=>{const n={...e};return!zb(e)||!zb(t)||Object.keys(t).forEach(r=>{zb(t[r])?n[r]=r in e&&e[r]!==void 0?Pf(e[r],t[r]):{...t[r]}:n[r]=t[r]}),n},x6=(e,t)=>Array.from({length:t-e},(n,r)=>e+r),WZ=(e,t)=>[...e].sort((n,r)=>{const i=t(n),o=t(r);return i===o?0:i{const n=[];for(let r=0;rObject.fromEntries(e.map((n,r)=>[n,t[r]])),nS=(e,t,n=1)=>x6(n,e+1).map(t),KZ=e=>Array.isArray(e)&&e.length===0||typeof e=="string"&&e===""||typeof e=="object"&&Object.keys(e).length===0,Su=e=>e!=null&&!KZ(e),Ub=e=>e||null,nw=e=>e?"true":"false",Bb=e=>e===void 0?void 0:nw(e),ZZ=e=>{if(e.length<2)return e[0]??"";const[t,...n]=e.reverse();return`${n.reverse().join(", ")} and ${t}`},cO="[&]:p-0 [&]:md:w-1/4 [&]:rounded-none",XZ=({onChange:e,className:t})=>{const n=Fn("qrCodes",Lf),{color:r,bgColor:i}=n;return g.jsxs(Nt,{title:"Colors",className:t,bodyClassName:"flex flex-col gap-4",children:[g.jsx(di,{label:"Default color:",helpText:g.jsxs(g.Fragment,{children:["QR codes will initially use ",g.jsx("b",{"data-testid":"color",children:r})," color."]}),type:"color",value:r,onChange:o=>e({...n,color:o.target.value}),inputClassName:cO}),g.jsx(di,{label:"Default background color:",helpText:g.jsxs(g.Fragment,{children:["QR codes will initially use ",g.jsx("b",{"data-testid":"bg-color",children:i})," background color."]}),type:"color",value:i,onChange:o=>e({...n,bgColor:o.target.value}),inputClassName:cO})]})},w6=({errorCorrection:e,onChange:t})=>g.jsxs(qe,{buttonContent:e?`Error correction (${e})`:g.jsx("i",{children:"Default error correction"}),buttonClassName:"w-full",children:[g.jsxs(qe.Item,{selected:e==="L",onClick:()=>t("L"),children:[g.jsx("b",{children:"L"}),"ow"]}),g.jsxs(qe.Item,{selected:e==="M",onClick:()=>t("M"),children:[g.jsx("b",{children:"M"}),"edium"]}),g.jsxs(qe.Item,{selected:e==="Q",onClick:()=>t("Q"),children:[g.jsx("b",{children:"Q"}),"uartile"]}),g.jsxs(qe.Item,{selected:e==="H",onClick:()=>t("H"),children:[g.jsx("b",{children:"H"}),"igh"]})]}),QZ=["png","svg","webp","jpeg"],_6=({format:e,onChange:t})=>g.jsx(qe,{buttonContent:`Format (${e})`,buttonClassName:"w-full",children:QZ.map(n=>g.jsx(qe.Item,{selected:e===n,onClick:()=>t(n),children:n},n))}),Zo=({className:e,size:t,...n})=>g.jsx("span",{className:Oe("text-gray-500 dark:text-gray-400",{"text-sm":t==="sm","text-lg":t==="lg"},e),...n}),JZ=({onChange:e})=>{const t=Fn("qrCodes",Lf),{format:n,errorCorrection:r}=t;return g.jsxs(Nt,{title:"Format",className:"card",bodyClassName:"flex flex-col gap-4",children:[g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx(_6,{format:n,onChange:i=>e({...t,format:i})}),g.jsxs(Zo,{size:"sm",children:["When downloading a QR code, it will use ",g.jsx("b",{"data-testid":"format",children:n})," format by default."]})]}),g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx(w6,{errorCorrection:r,onChange:i=>e({...t,errorCorrection:i})}),g.jsxs(Zo,{size:"sm",children:["QR codes will initially have a ",g.jsx("b",{"data-testid":"error-correction",children:r})," error correction."]})]})]})},eX=({onChange:e,className:t})=>{const n=Fn("qrCodes",Lf),{size:r,margin:i}=n;return g.jsxs(Nt,{title:"Size",className:t,bodyClassName:"flex flex-col gap-4",children:[g.jsx(di,{label:"Default dimensions:",helpText:g.jsxs(g.Fragment,{children:["QR codes will be initially generated with ",g.jsxs("b",{"data-testid":"size",children:[r,"x",r,"px"]}),"."]}),type:"range",value:r,step:10,min:50,max:1e3,onChange:o=>e({...n,size:Number(o.target.value)}),inputClassName:"[&]:p-0"}),g.jsx(di,{label:"Default margin:",helpText:g.jsxs(g.Fragment,{children:["QR codes will be initially generated with a ",g.jsxs("b",{"data-testid":"margin",children:[i,"px"]})," margin."]}),type:"range",value:i,step:1,min:0,max:100,onChange:o=>e({...n,margin:Number(o.target.value)}),inputClassName:"[&]:p-0"})]})},bl=({children:e,helpText:t,"data-testid":n,...r})=>g.jsxs("div",{"data-testid":n,children:[g.jsxs(Ma,{className:"flex items-center gap-x-2",children:[g.jsx(uZ,{...r}),e]}),t&&g.jsx(Zo,{size:"sm","data-testid":n?`${n}-help-text`:"help-text",className:"pl-10",children:t})]}),tX=({toggleRealTimeUpdates:e,onIntervalChange:t})=>{const{enabled:n,interval:r}=Fn("realTimeUpdates",{enabled:!0});return g.jsxs(Nt,{title:"Real-time updates",className:"h-full",bodyClassName:"flex flex-col gap-y-4",children:[g.jsx(bl,{checked:n,onChange:e,helpText:g.jsxs(g.Fragment,{children:["Real-time updates are currently being ",g.jsx("b",{children:n?"processed":"ignored"}),"."]}),children:"Enable or disable real-time updates."}),g.jsxs("div",{children:[g.jsx(di,{label:g.jsx("span",{className:Oe({"dark:text-gray-400":!n}),children:"Real-time updates frequency (in minutes):"}),type:"number",min:0,placeholder:"Immediate",disabled:!n,value:`${r??""}`,onChange:({target:i})=>t(Number(i.value))}),n&&g.jsx(Zo,{size:"sm",children:r?g.jsxs("span",{children:["Updates will be reflected in the UI every ",g.jsx("b",{children:r})," minute",r>1&&"s","."]}):"Updates will be reflected in the UI as soon as they happen."})]})]})},Fb=e=>e==="includes"?"Suggest tags including input":"Suggest tags starting with input",nX=e=>e==="includes"?g.jsxs(g.Fragment,{children:["The list of suggested tags will contain those ",g.jsx("b",{children:"including"})," provided input."]}):g.jsxs(g.Fragment,{children:["The list of suggested tags will contain those ",g.jsx("b",{children:"starting with"})," provided input."]}),rX=({onChange:e})=>{const t=Fn("shortUrlCreation"),n=r=>()=>e({...t,tagFilteringMode:r});return g.jsxs(Nt,{title:"Short URLs form",className:"card",bodyClassName:"flex flex-col gap-4",children:[g.jsx(bl,{"data-testid":"forward-query",checked:t?.forwardQuery??!0,onChange:r=>e({...t,forwardQuery:r}),helpText:g.jsxs(g.Fragment,{children:["The initial state of the ",g.jsx("b",{children:"Forward query params on redirect"})," checkbox will be ",g.jsx("b",{children:t?.forwardQuery??!0?"checked":"unchecked"}),"."]}),children:"Make all new short URLs forward their query params to the long URL."}),g.jsxs("div",{className:"flex flex-col",children:[g.jsx(Ma,{className:"mb-1.5",children:"Tag suggestions search mode:"}),g.jsxs(qe,{buttonContent:Fb(t?.tagFilteringMode),buttonClassName:"w-full",children:[g.jsx(qe.Item,{selected:!t?.tagFilteringMode||t.tagFilteringMode==="startsWith",onClick:n("startsWith"),children:Fb("startsWith")}),g.jsx(qe.Item,{selected:t?.tagFilteringMode==="includes",onClick:n("includes"),children:Fb("includes")})]}),g.jsx(Zo,{size:"sm",className:"mt-0.5",children:nX(t?.tagFilteringMode)})]})]})},iX={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},aX=({onChange:e,defaultOrdering:t})=>{const n=Fn("shortUrlsList"),r=n?.confirmDeletions??!0;return g.jsxs(Nt,{title:"Short URLs list",className:"card",bodyClassName:"flex flex-col gap-4",children:[g.jsx(bl,{checked:r,onChange:i=>e({...n,confirmDeletions:i}),helpText:g.jsxs(g.Fragment,{children:["When deleting a short URL, confirmation ",g.jsx("b",{children:r?"will":"won't"})," be required."]}),children:"Request confirmation before deleting a short URL."}),g.jsxs("div",{className:"flex flex-col gap-1.5",children:[g.jsx(Ma,{children:"Default ordering for short URLs list:"}),g.jsx(rm,{buttonClassName:"w-full",items:iX,order:n?.defaultOrdering??t,onChange:i=>e({defaultOrdering:!i.dir&&!i.field?void 0:i})})]})]})},oX={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},sX=({onChange:e})=>{const t=Fn("tags",{});return g.jsx(Nt,{title:"Tags",className:"card",children:g.jsxs("div",{className:"flex flex-col gap-1.5",children:[g.jsx(Ma,{children:"Default ordering for tags list:"}),g.jsx(rm,{buttonClassName:"w-full",items:oX,order:t.defaultOrdering??{},onChange:n=>e({...t,defaultOrdering:!n.field&&!n.dir?void 0:n})})]})})},lX=({onChange:e,_matchMedia:t})=>{const n=Fn("ui"),r=w.useMemo(()=>n?.theme??tS(t),[n?.theme,t]);return g.jsxs(Nt,{title:"User interface",bodyClassName:"flex justify-between items-center",children:[g.jsx(bl,{checked:r==="dark",onChange:i=>e({...n,theme:i?"dark":"light"}),children:"Use dark theme."}),g.jsx(Be,{icon:r==="dark"?fH:nH})]})},fO={potentialBot:"Potential bot",date:"Date",country:"Country",region:"Region",city:"City",browser:"Browser",os:"OS",userAgent:"User agent",referer:"Referrer",visitedUrl:"Visited URL"},kg={browser:["userAgent"],os:["userAgent"],userAgent:["browser","os"]};Object.freeze(kg);const uX=({onChange:e})=>{const t=Fn("visitsList"),n=w.useMemo(()=>Pf(Ay,t?.columns??{}),[t?.columns]),r=w.useCallback((i,o)=>{const l={...n,[i]:o};o&&kg[i]?.forEach(c=>{l[c]=!1}),e({columns:l})},[n,e]);return g.jsxs(Nt,{title:"Visits list",children:[g.jsx("p",{className:"mb-2",children:"Columns to show in visits table:"}),g.jsx("ul",{className:"flex flex-col gap-y-1",children:Object.entries(fO).map(([i,o])=>g.jsx("li",{children:g.jsx(bl,{checked:n[i],onChange:l=>r(i,l),children:g.jsxs("span",{className:"inline-flex gap-2",children:[o,kg[i]&&g.jsxs(Zo,{children:["(excludes ",ZZ(kg[i].map(l=>fO[l])),")"]})]})})},i))})]})},S6={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days"},cX=(e,t)=>!e||e==="all"?t:S6[e],fX=({onChange:e,active:t,allText:n})=>g.jsxs(qe,{buttonContent:cX(t,n),buttonClassName:"w-full",children:[g.jsx(qe.Item,{selected:t==="all",onClick:()=>e("all"),children:n}),g.jsx(qe.Separator,{}),Object.entries(S6).map(([r,i])=>g.jsx(qe.Item,{selected:t===r,onClick:()=>e(r),children:i},r))]}),dO=e=>e?.defaultInterval??"last30Days",dX=({onChange:e})=>{const t=Fn("visits"),n=w.useCallback(({defaultInterval:r,...i})=>e({defaultInterval:r??dO(t),...i}),[e,t]);return g.jsxs(Nt,{title:"Visits",className:"card",bodyClassName:"flex flex-col gap-4",children:[g.jsx(bl,{"data-testid":"exclude-bots",checked:!!t?.excludeBots,onChange:r=>n({excludeBots:r}),helpText:g.jsxs(g.Fragment,{children:["The visits coming from potential bots will be ",g.jsx("b",{children:t?.excludeBots?"excluded":"included"}),"."]}),children:"Exclude bots wherever possible (this option‘s effect might depend on Shlink server‘s version)."}),g.jsx(bl,{"data-testid":"compare-visits",checked:!!t?.loadPrevInterval,onChange:r=>n({loadPrevInterval:r}),helpText:g.jsxs(g.Fragment,{children:["When loading visits, previous period ",g.jsx("b",{children:t?.loadPrevInterval?"will":"won't"})," be loaded by default."]}),children:"Compare visits with previous period."}),g.jsxs("div",{className:"flex flex-col",children:[g.jsx(Ma,{className:"mb-1.5",children:"Default interval to load on visits sections:"}),g.jsx(fX,{allText:"All visits",active:dO(t),onChange:r=>n({defaultInterval:r})})]})]})},Xd=({children:e,className:t})=>g.jsx("div",{className:Oe("flex flex-col gap-4",t),children:e}),hX=({settings:e,onUpdateSettings:t,defaultShortUrlsListOrdering:n})=>{const r=w.useCallback(f=>t?.(Pf(e,f)),[e,t]),i=w.useCallback(f=>r({realTimeUpdates:{enabled:f}}),[r]),o=w.useCallback(f=>r({realTimeUpdates:{interval:f}}),[r]),l=w.useCallback((f,h)=>r({[f]:h}),[r]),c=w.useCallback(f=>l("qrCodes",f),[l]);return g.jsxs(A6,{value:e,children:[g.jsxs(nl,{className:"mb-4 sticky top-(--header-height) z-2",children:[g.jsx(nl.Pill,{to:"../general",children:"General"}),g.jsx(nl.Pill,{to:"../short-urls",children:"Short URLs"}),g.jsx(nl.Pill,{to:"../visits",children:"Visits"}),g.jsx(nl.Pill,{to:"../tags",children:"Tags"}),g.jsx(nl.Pill,{to:"../qr-codes",children:"QR codes"})]}),g.jsxs(sy,{children:[g.jsx(ft,{path:"general",element:g.jsxs(Xd,{children:[g.jsx(lX,{onChange:f=>l("ui",f)}),g.jsx(tX,{toggleRealTimeUpdates:i,onIntervalChange:o})]})}),g.jsx(ft,{path:"short-urls",element:g.jsxs(Xd,{children:[g.jsx(rX,{onChange:f=>l("shortUrlCreation",f)}),g.jsx(aX,{defaultOrdering:n,onChange:f=>l("shortUrlsList",f)})]})}),g.jsx(ft,{path:"visits",element:g.jsxs(Xd,{children:[g.jsx(dX,{onChange:f=>l("visits",f)}),g.jsx(uX,{onChange:f=>l("visitsList",f)})]})}),g.jsx(ft,{path:"tags",element:g.jsx(Xd,{children:g.jsx(sX,{onChange:f=>l("tags",f)})})}),g.jsx(ft,{path:"qr-codes",element:g.jsxs(Xd,{children:[g.jsxs("div",{className:"flex flex-col lg:flex-row gap-4",children:[g.jsx(eX,{onChange:c,className:"w-full"}),g.jsx(XZ,{onChange:c,className:"w-full"})]}),g.jsx(JZ,{onChange:c})]})}),g.jsx(ft,{path:"*",element:g.jsx(b_,{replace:!0,to:"../general"})})]})]})},Lf={size:300,margin:0,color:"#000000",bgColor:"#ffffff",errorCorrection:"L",format:"png"};Object.freeze(Lf);const Ay={potentialBot:!0,date:!0,country:!0,region:!1,city:!0,browser:!0,os:!0,userAgent:!1,referer:!0,visitedUrl:!0};Object.freeze(Ay);const C6={realTimeUpdates:{enabled:!0},shortUrlCreation:{},visits:{defaultInterval:"last30Days"},visitsList:{columns:Ay},shortUrlsList:{defaultOrdering:{field:"dateCreated",dir:"DESC"}},qrCodes:Lf},E6=w.createContext(C6),{Provider:A6}=E6,rS=()=>w.useContext(E6)??C6;function Fn(e,t){return rS()[e]??t}const Nf=({children:e,className:t})=>g.jsx("div",{className:Oe("container mx-auto p-5 pt-8 max-md:p-3 max-md:py-4",t),children:e});function Cr(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var mX=typeof Symbol=="function"&&Symbol.observable||"@@observable",hO=mX,$b=()=>Math.random().toString(36).substring(7).split("").join("."),pX={INIT:`@@redux/INIT${$b()}`,REPLACE:`@@redux/REPLACE${$b()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${$b()}`},iv=pX;function iS(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function T6(e,t,n){if(typeof e!="function")throw new Error(Cr(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Cr(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Cr(1));return n(T6)(e,t)}let r=e,i=t,o=new Map,l=o,c=0,f=!1;function h(){l===o&&(l=new Map,o.forEach((A,O)=>{l.set(O,A)}))}function m(){if(f)throw new Error(Cr(3));return i}function y(A){if(typeof A!="function")throw new Error(Cr(4));if(f)throw new Error(Cr(5));let O=!0;h();const P=c++;return l.set(P,A),function(){if(O){if(f)throw new Error(Cr(6));O=!1,h(),l.delete(P),o=null}}}function x(A){if(!iS(A))throw new Error(Cr(7));if(typeof A.type>"u")throw new Error(Cr(8));if(typeof A.type!="string")throw new Error(Cr(17));if(f)throw new Error(Cr(9));try{f=!0,i=r(i,A)}finally{f=!1}return(o=l).forEach(P=>{P()}),A}function b(A){if(typeof A!="function")throw new Error(Cr(10));r=A,x({type:iv.REPLACE})}function C(){const A=y;return{subscribe(O){if(typeof O!="object"||O===null)throw new Error(Cr(11));function P(){const F=O;F.next&&F.next(m())}return P(),{unsubscribe:A(P)}},[hO](){return this}}}return x({type:iv.INIT}),{dispatch:x,subscribe:y,getState:m,replaceReducer:b,[hO]:C}}function gX(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:iv.INIT})>"u")throw new Error(Cr(12));if(typeof n(void 0,{type:iv.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Cr(13))})}function Ty(e){const t=Object.keys(e),n={};for(let o=0;o"u")throw c&&c.type,new Error(Cr(14));h[y]=C,f=f||C!==b}return f=f||r.length!==Object.keys(l).length,f?h:l}}function av(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function vX(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(Cr(15))};const l={getState:i.getState,dispatch:(f,...h)=>o(f,...h)},c=e.map(f=>f(l));return o=av(...c)(i.dispatch),{...i,dispatch:o}}}function O6(e){return iS(e)&&"type"in e&&typeof e.type=="string"}var j6=Symbol.for("immer-nothing"),mO=Symbol.for("immer-draftable"),Ri=Symbol.for("immer-state");function xa(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Nh=Object.getPrototypeOf;function zu(e){return!!e&&!!e[Ri]}function Xo(e){return e?M6(e)||Array.isArray(e)||!!e[mO]||!!e.constructor?.[mO]||im(e)||jy(e):!1}var yX=Object.prototype.constructor.toString(),pO=new WeakMap;function M6(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if(typeof n!="function")return!1;let r=pO.get(n);return r===void 0&&(r=Function.toString.call(n),pO.set(n,r)),r===yX}function ov(e,t,n=!0){Oy(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function Oy(e){const t=e[Ri];return t?t.type_:Array.isArray(e)?1:im(e)?2:jy(e)?3:0}function rw(e,t){return Oy(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function P6(e,t,n){const r=Oy(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function bX(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function im(e){return e instanceof Map}function jy(e){return e instanceof Set}function bu(e){return e.copy_||e.base_}function iw(e,t){if(im(e))return new Map(e);if(jy(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=M6(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Ri];let i=Reflect.ownKeys(r);for(let o=0;o1&&Object.defineProperties(e,{set:ng,add:ng,clear:ng,delete:ng}),Object.freeze(e),t&&Object.values(e).forEach(n=>aS(n,!0))),e}function xX(){xa(2)}var ng={value:xX};function My(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var wX={};function Uu(e){const t=wX[e];return t||xa(0,e),t}var Rh;function L6(){return Rh}function _X(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function gO(e,t){t&&(Uu("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function aw(e){ow(e),e.drafts_.forEach(SX),e.drafts_=null}function ow(e){e===Rh&&(Rh=e.parent_)}function vO(e){return Rh=_X(Rh,e)}function SX(e){const t=e[Ri];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function yO(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Ri].modified_&&(aw(t),xa(4)),Xo(e)&&(e=sv(t,e),t.parent_||lv(t,e)),t.patches_&&Uu("Patches").generateReplacementPatches_(n[Ri].base_,e,t.patches_,t.inversePatches_)):e=sv(t,n,[]),aw(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==j6?e:void 0}function sv(e,t,n){if(My(t))return t;const r=e.immer_.shouldUseStrictIteration(),i=t[Ri];if(!i)return ov(t,(o,l)=>bO(e,i,t,o,l,n),r),t;if(i.scope_!==e)return t;if(!i.modified_)return lv(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const o=i.copy_;let l=o,c=!1;i.type_===3&&(l=new Set(o),o.clear(),c=!0),ov(l,(f,h)=>bO(e,i,o,f,h,n,c),r),lv(e,o,!1),n&&e.patches_&&Uu("Patches").generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function bO(e,t,n,r,i,o,l){if(i==null||typeof i!="object"&&!l)return;const c=My(i);if(!(c&&!l)){if(zu(i)){const f=o&&t&&t.type_!==3&&!rw(t.assigned_,r)?o.concat(r):void 0,h=sv(e,i,f);if(P6(n,r,h),zu(h))e.canAutoFreeze_=!1;else return}else l&&n.add(i);if(Xo(i)&&!c){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[r]===i&&c)return;sv(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(im(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&lv(e,i)}}}function lv(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&aS(t,n)}function CX(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:L6(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=oS;n&&(i=[r],o=Dh);const{revoke:l,proxy:c}=Proxy.revocable(i,o);return r.draft_=c,r.revoke_=l,c}var oS={get(e,t){if(t===Ri)return e;const n=bu(e);if(!rw(n,t))return EX(e,n,t);const r=n[t];return e.finalized_||!Xo(r)?r:r===Vb(e.base_,t)?(Hb(e),e.copy_[t]=lw(r,e)):r},has(e,t){return t in bu(e)},ownKeys(e){return Reflect.ownKeys(bu(e))},set(e,t,n){const r=N6(bu(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=Vb(bu(e),t),o=i?.[Ri];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(bX(n,i)&&(n!==void 0||rw(e.base_,t)))return!0;Hb(e),sw(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Vb(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Hb(e),sw(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=bu(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){xa(11)},getPrototypeOf(e){return Nh(e.base_)},setPrototypeOf(){xa(12)}},Dh={};ov(oS,(e,t)=>{Dh[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Dh.deleteProperty=function(e,t){return Dh.set.call(this,e,t,void 0)};Dh.set=function(e,t,n){return oS.set.call(this,e[0],t,n,e[0])};function Vb(e,t){const n=e[Ri];return(n?bu(n):e)[t]}function EX(e,t,n){const r=N6(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function N6(e,t){if(!(t in e))return;let n=Nh(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Nh(n)}}function sw(e){e.modified_||(e.modified_=!0,e.parent_&&sw(e.parent_))}function Hb(e){e.copy_||(e.copy_=iw(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var AX=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const l=this;return function(f=o,...h){return l.produce(f,m=>n.call(this,m,...h))}}typeof n!="function"&&xa(6),r!==void 0&&typeof r!="function"&&xa(7);let i;if(Xo(t)){const o=vO(this),l=lw(t,void 0);let c=!0;try{i=n(l),c=!1}finally{c?aw(o):ow(o)}return gO(o,r),yO(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===j6&&(i=void 0),this.autoFreeze_&&aS(i,!0),r){const o=[],l=[];Uu("Patches").generateReplacementPatches_(t,i,o,l),r(o,l)}return i}else xa(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(l,...c)=>this.produceWithPatches(l,f=>t(f,...c));let r,i;return[this.produce(t,n,(l,c)=>{r=l,i=c}),r,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof e?.useStrictIteration=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Xo(e)||xa(8),zu(e)&&(e=Vo(e));const t=vO(this),n=lw(e,void 0);return n[Ri].isManual_=!0,ow(t),n}finishDraft(e,t){const n=e&&e[Ri];(!n||!n.isManual_)&&xa(9);const{scope_:r}=n;return gO(r,t),yO(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=Uu("Patches").applyPatches_;return zu(e)?r(e,t):this.produce(e,i=>r(i,t))}};function lw(e,t){const n=im(e)?Uu("MapSet").proxyMap_(e,t):jy(e)?Uu("MapSet").proxySet_(e,t):CX(e,t);return(t?t.scope_:L6()).drafts_.push(n),n}function Vo(e){return zu(e)||xa(10,e),R6(e)}function R6(e){if(!Xo(e)||My(e))return e;const t=e[Ri];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=iw(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=iw(e,!0);return ov(n,(i,o)=>{P6(n,i,R6(o))},r),t&&(t.finalized_=!1),n}var uw=new AX,D6=uw.produce,TX=uw.setUseStrictIteration.bind(uw);function OX(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function jX(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function MX(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var xO=e=>Array.isArray(e)?e:[e];function PX(e){const t=Array.isArray(e[0])?e[0]:e;return MX(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function LX(e,t){const n=[],{length:r}=e;for(let i=0;i{n=rg(),l.resetResultsCount()},l.resultsCount=()=>o,l.resetResultsCount=()=>{o=0},l}function kX(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,l=0,c,f={},h=i.pop();typeof h=="object"&&(f=h,h=i.pop()),OX(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const m={...n,...f},{memoize:y,memoizeOptions:x=[],argsMemoize:b=k6,argsMemoizeOptions:C=[]}=m,_=xO(x),A=xO(C),O=PX(i),P=y(function(){return o++,h.apply(null,arguments)},..._),N=b(function(){l++;const U=LX(O,arguments);return c=P.apply(null,U),c},...A);return Object.assign(N,{resultFunc:h,memoizedResultFunc:P,dependencies:O,dependencyRecomputations:()=>l,resetDependencyRecomputations:()=>{l=0},lastResult:()=>c,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:y,argsMemoize:b})};return Object.assign(r,{withTypes:()=>r}),r}var Ce=kX(k6),IX=Object.assign((e,t=Ce)=>{jX(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((l,c,f)=>(l[n[f]]=c,l),{}))},{withTypes:()=>IX});function I6(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var zX=I6(),UX=I6,BX=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?av:av.apply(null,arguments)},FX=e=>e&&typeof e.match=="function";function un(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(Pi(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>O6(r)&&r.type===e,n}var z6=class hh extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,hh.prototype)}static get[Symbol.species](){return hh}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new hh(...t[0].concat(this)):new hh(...t.concat(this))}};function _O(e){return Xo(e)?D6(e,()=>{}):e}function ig(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function $X(e){return typeof e=="boolean"}var VX=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let l=new z6;return n&&($X(n)?l.push(zX):l.push(UX(n.extraArgument))),l},U6="RTK_autoBatch",ir=()=>e=>({payload:e,meta:{[U6]:!0}}),SO=e=>t=>{setTimeout(t,e)},B6=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,l=!1;const c=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:SO(10):e.type==="callback"?e.queueNotification:SO(e.timeout),h=()=>{l=!1,o&&(o=!1,c.forEach(m=>m()))};return Object.assign({},r,{subscribe(m){const y=()=>i&&m(),x=r.subscribe(y);return c.add(m),()=>{x(),c.delete(m)}},dispatch(m){try{return i=!m?.meta?.[U6],o=!i,o&&(l||(l=!0,f(h))),r.dispatch(m)}finally{i=!0}}})},HX=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new z6(e);return r&&i.push(B6(typeof r=="object"?r:void 0)),i};function sS(e){const t=VX(),{reducer:n=void 0,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:o=!0,preloadedState:l=void 0,enhancers:c=void 0}=e||{};let f;if(typeof n=="function")f=n;else if(iS(n))f=Ty(n);else throw new Error(Pi(1));let h;typeof r=="function"?h=r(t):h=t();let m=av;i&&(m=BX({trace:!1,...typeof i=="object"&&i}));const y=vX(...h),x=HX(y);let b=typeof c=="function"?c(x):x();const C=m(...b);return T6(f,l,C)}function F6(e){const t={},n=[];let r;const i={addCase(o,l){const c=typeof o=="string"?o:o.type;if(!c)throw new Error(Pi(28));if(c in t)throw new Error(Pi(29));return t[c]=l,i},addAsyncThunk(o,l){return l.pending&&(t[o.pending.type]=l.pending),l.rejected&&(t[o.rejected.type]=l.rejected),l.fulfilled&&(t[o.fulfilled.type]=l.fulfilled),l.settled&&n.push({matcher:o.settled,reducer:l.settled}),i},addMatcher(o,l){return n.push({matcher:o,reducer:l}),i},addDefaultCase(o){return r=o,i}};return e(i),[t,n,r]}TX(!1);function qX(e){return typeof e=="function"}function GX(e,t){let[n,r,i]=F6(t),o;if(qX(e))o=()=>_O(e());else{const c=_O(e);o=()=>c}function l(c=o(),f){let h=[n[f.type],...r.filter(({matcher:m})=>m(f)).map(({reducer:m})=>m)];return h.filter(m=>!!m).length===0&&(h=[i]),h.reduce((m,y)=>{if(y)if(zu(m)){const b=y(m,f);return b===void 0?m:b}else{if(Xo(m))return D6(m,x=>y(x,f));{const x=y(m,f);if(x===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return x}}return m},c)}return l.getInitialState=o,l}var YX=(e,t)=>FX(e)?e.match(t):e(t);function WX(...e){return t=>e.some(n=>YX(n,t))}var KX="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",$6=(e=21)=>{let t="",n=e;for(;n--;)t+=KX[Math.random()*64|0];return t},ZX=["name","message","stack","code"],qb=class{constructor(e,t){this.payload=e,this.meta=t}_type},CO=class{constructor(e,t){this.payload=e,this.meta=t}_type},XX=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of ZX)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},EO="External signal was aborted",V6=(()=>{function e(t,n,r){const i=un(t+"/fulfilled",(f,h,m,y)=>({payload:f,meta:{...y||{},arg:m,requestId:h,requestStatus:"fulfilled"}})),o=un(t+"/pending",(f,h,m)=>({payload:void 0,meta:{...m||{},arg:h,requestId:f,requestStatus:"pending"}})),l=un(t+"/rejected",(f,h,m,y,x)=>({payload:y,error:(r&&r.serializeError||XX)(f||"Rejected"),meta:{...x||{},arg:m,requestId:h,rejectedWithValue:!!y,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"}}));function c(f,{signal:h}={}){return(m,y,x)=>{const b=r?.idGenerator?r.idGenerator(f):$6(),C=new AbortController;let _,A;function O(N){A=N,C.abort()}h&&(h.aborted?O(EO):h.addEventListener("abort",()=>O(EO),{once:!0}));const P=async function(){let N;try{let U=r?.condition?.(f,{getState:y,extra:x});if(JX(U)&&(U=await U),U===!1||C.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const W=new Promise((X,ae)=>{_=()=>{ae({name:"AbortError",message:A||"Aborted"})},C.signal.addEventListener("abort",_)});m(o(b,f,r?.getPendingMeta?.({requestId:b,arg:f},{getState:y,extra:x}))),N=await Promise.race([W,Promise.resolve(n(f,{dispatch:m,getState:y,extra:x,requestId:b,signal:C.signal,abort:O,rejectWithValue:(X,ae)=>new qb(X,ae),fulfillWithValue:(X,ae)=>new CO(X,ae)})).then(X=>{if(X instanceof qb)throw X;return X instanceof CO?i(X.payload,b,f,X.meta):i(X,b,f)})])}catch(U){N=U instanceof qb?l(null,b,f,U.payload,U.meta):l(U,b,f)}finally{_&&C.signal.removeEventListener("abort",_)}return r&&!r.dispatchConditionRejection&&l.match(N)&&N.meta.condition||m(N),N}();return Object.assign(P,{abort:O,requestId:b,arg:f,unwrap(){return P.then(QX)}})}}return Object.assign(c,{pending:o,rejected:l,fulfilled:i,settled:WX(l,i),typePrefix:t})}return e.withTypes=()=>e,e})();function QX(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function JX(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var eQ=Symbol.for("rtk-slice-createasyncthunk");function tQ(e,t){return`${e}/${t}`}function nQ({creators:e}={}){const t=e?.asyncThunk?.[eQ];return function(r){const{name:i,reducerPath:o=i}=r;if(!i)throw new Error(Pi(11));const l=(typeof r.reducers=="function"?r.reducers(iQ()):r.reducers)||{},c=Object.keys(l),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},h={addCase(N,F){const U=typeof N=="string"?N:N.type;if(!U)throw new Error(Pi(12));if(U in f.sliceCaseReducersByType)throw new Error(Pi(13));return f.sliceCaseReducersByType[U]=F,h},addMatcher(N,F){return f.sliceMatchers.push({matcher:N,reducer:F}),h},exposeAction(N,F){return f.actionCreators[N]=F,h},exposeCaseReducer(N,F){return f.sliceCaseReducersByName[N]=F,h}};c.forEach(N=>{const F=l[N],U={reducerName:N,type:tQ(i,N),createNotation:typeof r.reducers=="function"};oQ(F)?lQ(U,F,h,t):aQ(U,F,h)});function m(){const[N={},F=[],U=void 0]=typeof r.extraReducers=="function"?F6(r.extraReducers):[r.extraReducers],W={...N,...f.sliceCaseReducersByType};return GX(r.initialState,X=>{for(let ae in W)X.addCase(ae,W[ae]);for(let ae of f.sliceMatchers)X.addMatcher(ae.matcher,ae.reducer);for(let ae of F)X.addMatcher(ae.matcher,ae.reducer);U&&X.addDefaultCase(U)})}const y=N=>N,x=new Map,b=new WeakMap;let C;function _(N,F){return C||(C=m()),C(N,F)}function A(){return C||(C=m()),C.getInitialState()}function O(N,F=!1){function U(X){let ae=X[N];return typeof ae>"u"&&F&&(ae=ig(b,U,A)),ae}function W(X=y){const ae=ig(x,F,()=>new WeakMap);return ig(ae,X,()=>{const ce={};for(const[re,J]of Object.entries(r.selectors??{}))ce[re]=rQ(J,X,()=>ig(b,X,A),F);return ce})}return{reducerPath:N,getSelectors:W,get selectors(){return W(U)},selectSlice:U}}const P={name:i,reducer:_,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:A,...O(o),injectInto(N,{reducerPath:F,...U}={}){const W=F??o;return N.inject({reducerPath:W,reducer:_},U),{...P,...O(W,!0)}}};return P}}function rQ(e,t,n,r){function i(o,...l){let c=t(o);return typeof c>"u"&&r&&(c=n()),e(c,...l)}return i.unwrapped=e,i}var jt=nQ();function iQ(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function aQ({type:e,reducerName:t,createNotation:n},r,i){let o,l;if("reducer"in r){if(n&&!sQ(r))throw new Error(Pi(17));o=r.reducer,l=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,l?un(e,l):un(e))}function oQ(e){return e._reducerDefinitionType==="asyncThunk"}function sQ(e){return e._reducerDefinitionType==="reducerWithPrepare"}function lQ({type:e,reducerName:t},n,r,i){if(!i)throw new Error(Pi(18));const{payloadCreator:o,fulfilled:l,pending:c,rejected:f,settled:h,options:m}=n,y=i(e,o,m);r.exposeAction(t,y),l&&r.addCase(y.fulfilled,l),c&&r.addCase(y.pending,c),f&&r.addCase(y.rejected,f),h&&r.addMatcher(y.settled,h),r.exposeCaseReducer(t,{fulfilled:l||ag,pending:c||ag,rejected:f||ag,settled:h||ag})}function ag(){}var uQ="task",H6="listener",q6="completed",lS="cancelled",cQ=`task-${lS}`,fQ=`task-${q6}`,cw=`${H6}-${lS}`,dQ=`${H6}-${q6}`,Py=class{constructor(e){this.code=e,this.message=`${uQ} ${lS} (reason: ${e})`}name="TaskAbortError";message},uS=(e,t)=>{if(typeof e!="function")throw new TypeError(Pi(32))},uv=()=>{},G6=(e,t=uv)=>(e.catch(t),e),Y6=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),ju=(e,t)=>{const n=e.signal;n.aborted||("reason"in n||Object.defineProperty(n,"reason",{enumerable:!0,value:t,configurable:!0,writable:!0}),e.abort(t))},Mu=e=>{if(e.aborted){const{reason:t}=e;throw new Py(t)}};function W6(e,t){let n=uv;return new Promise((r,i)=>{const o=()=>i(new Py(e.reason));if(e.aborted){o();return}n=Y6(e,o),t.finally(()=>n()).then(r,i)}).finally(()=>{n=uv})}var hQ=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof Py?"cancelled":"rejected",error:n}}finally{t?.()}},cv=e=>t=>G6(W6(e,t).then(n=>(Mu(e),n))),K6=e=>{const t=cv(e);return n=>t(new Promise(r=>setTimeout(r,n)))},{assign:of}=Object,AO={},Ly="listenerMiddleware",mQ=(e,t)=>{const n=r=>Y6(e,()=>ju(r,e.reason));return(r,i)=>{uS(r);const o=new AbortController;n(o);const l=hQ(async()=>{Mu(e),Mu(o.signal);const c=await r({pause:cv(o.signal),delay:K6(o.signal),signal:o.signal});return Mu(o.signal),c},()=>ju(o,fQ));return i?.autoJoin&&t.push(l.catch(uv)),{result:cv(e)(l),cancel(){ju(o,cQ)}}}},pQ=(e,t)=>{const n=async(r,i)=>{Mu(t);let o=()=>{};const c=[new Promise((f,h)=>{let m=e({predicate:r,effect:(y,x)=>{x.unsubscribe(),f([y,x.getState(),x.getOriginalState()])}});o=()=>{m(),h()}})];i!=null&&c.push(new Promise(f=>setTimeout(f,i,null)));try{const f=await W6(t,Promise.race(c));return Mu(t),f}finally{o()}};return(r,i)=>G6(n(r,i))},Z6=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:o}=e;if(t)i=un(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error(Pi(21));return uS(o),{predicate:i,type:t,effect:o}},X6=of(e=>{const{type:t,predicate:n,effect:r}=Z6(e);return{id:$6(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Pi(22))}}},{withTypes:()=>X6}),TO=(e,t)=>{const{type:n,effect:r,predicate:i}=Z6(t);return Array.from(e.values()).find(o=>(typeof n=="string"?o.type===n:o.predicate===i)&&o.effect===r)},fw=e=>{e.pending.forEach(t=>{ju(t,cw)})},gQ=(e,t)=>()=>{for(const n of t.keys())fw(n);e.clear()},OO=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},Q6=of(un(`${Ly}/add`),{withTypes:()=>Q6}),vQ=un(`${Ly}/removeAll`),J6=of(un(`${Ly}/remove`),{withTypes:()=>J6}),yQ=(...e)=>{console.error(`${Ly}/error`,...e)},am=(e={})=>{const t=new Map,n=new Map,r=b=>{const C=n.get(b)??0;n.set(b,C+1)},i=b=>{const C=n.get(b)??1;C===1?n.delete(b):n.set(b,C-1)},{extra:o,onError:l=yQ}=e;uS(l);const c=b=>(b.unsubscribe=()=>t.delete(b.id),t.set(b.id,b),C=>{b.unsubscribe(),C?.cancelActive&&fw(b)}),f=b=>{const C=TO(t,b)??X6(b);return c(C)};of(f,{withTypes:()=>f});const h=b=>{const C=TO(t,b);return C&&(C.unsubscribe(),b.cancelActive&&fw(C)),!!C};of(h,{withTypes:()=>h});const m=async(b,C,_,A)=>{const O=new AbortController,P=pQ(f,O.signal),N=[];try{b.pending.add(O),r(b),await Promise.resolve(b.effect(C,of({},_,{getOriginalState:A,condition:(F,U)=>P(F,U).then(Boolean),take:P,delay:K6(O.signal),pause:cv(O.signal),extra:o,signal:O.signal,fork:mQ(O.signal,N),unsubscribe:b.unsubscribe,subscribe:()=>{t.set(b.id,b)},cancelActiveListeners:()=>{b.pending.forEach((F,U,W)=>{F!==O&&(ju(F,cw),W.delete(F))})},cancel:()=>{ju(O,cw),b.pending.delete(O)},throwIfCancelled:()=>{Mu(O.signal)}})))}catch(F){F instanceof Py||OO(l,F,{raisedBy:"effect"})}finally{await Promise.all(N),ju(O,dQ),i(b),b.pending.delete(O)}},y=gQ(t,n);return{middleware:b=>C=>_=>{if(!O6(_))return C(_);if(Q6.match(_))return f(_.payload);if(vQ.match(_)){y();return}if(J6.match(_))return h(_.payload);let A=b.getState();const O=()=>{if(A===AO)throw new Error(Pi(23));return A};let P;try{if(P=C(_),t.size>0){const N=b.getState(),F=Array.from(t.values());for(const U of F){let W=!1;try{W=U.predicate(_,N,A)}catch(X){W=!1,OO(l,X,{raisedBy:"predicate"})}W&&m(U,_,b,O)}}}finally{A=AO}return P},startListening:f,stopListening:h,clearListeners:y}};function Pi(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const eD={field:"dateCreated",dir:"DESC"},bQ={realTimeUpdates:{enabled:!0},shortUrlCreation:{},ui:{theme:tS()},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:eD}},{reducer:xQ,actions:tD}=jt({name:"shlink/settings",initialState:bQ,reducers:{setSettings:(e,{payload:t})=>Pf(e,t)}}),{setSettings:h_e}=tD,wQ=xQ,_Q=()=>{const e=KL(),t=w.useCallback(r=>e(tD.setSettings(r)),[e]);return{settings:ZL(r=>r.settings),setSettings:t}},SQ=()=>{const{settings:e,setSettings:t}=_Q();return g.jsx(Nf,{children:g.jsx(hX,{settings:e,onUpdateSettings:t,defaultShortUrlsListOrdering:eD})})},CQ=async()=>{(await navigator.serviceWorker?.getRegistrations()??[]).forEach(({waiting:t})=>{t?.addEventListener("statechange",n=>{n.target?.state==="activated"&&window.location.reload()}),t?.postMessage({type:"SKIP_WAITING"})})},nD=({fetchServers:e,servers:t,settings:n,appUpdated:r,resetAppUpdate:i})=>{const{MainHeader:o,Home:l,ShlinkWebComponentContainer:c,CreateServer:f,EditServer:h,ManageServers:m,ShlinkVersionsContainer:y}=oa(nD),x=Or(),b=w.useRef(t),C=x.pathname==="/";return w.useEffect(()=>{Object.keys(b.current).length===0&&e()},[e]),w.useEffect(()=>{GZ(n.ui?.theme??tS())},[n.ui?.theme]),g.jsxs("div",{className:"h-full",children:[g.jsxs(g.Fragment,{children:[g.jsx(o,{}),g.jsxs("div",{className:"h-full pt-(--header-height)",children:[g.jsx("div",{"data-testid":"shlink-wrapper",className:Oe("min-h-full pb-[calc(var(--footer-height)+var(--footer-margin))] -mb-[calc(var(--footer-height)+var(--footer-margin))]",{"flex items-center pt-4":C}),children:g.jsxs(sy,{children:[g.jsx(ft,{index:!0,element:g.jsx(l,{})}),g.jsx(ft,{path:"/settings",children:["","*"].map(_=>g.jsx(ft,{path:_,element:g.jsx(SQ,{})},_))}),g.jsx(ft,{path:"/manage-servers",element:g.jsx(m,{})}),g.jsx(ft,{path:"/server/create",element:g.jsx(f,{})}),g.jsx(ft,{path:"/server/:serverId/edit",element:g.jsx(h,{})}),g.jsx(ft,{path:"/server/:serverId",children:["","*"].map(_=>g.jsx(ft,{path:_,element:g.jsx(c,{})},_))}),g.jsx(ft,{path:"*",element:g.jsx(g6,{})})]})}),g.jsx("div",{className:"h-(--footer-height) mt-(--footer-margin) md:px-4",children:g.jsx(y,{})})]})]}),g.jsx(YZ,{isOpen:r,onClose:i,forceUpdate:CQ})]})},EQ=Pa(nD,["MainHeader","Home","ShlinkWebComponentContainer","CreateServer","EditServer","ManageServers","ShlinkVersionsContainer"]),{actions:AQ,reducer:TQ}=jt({name:"shlink/appUpdates",initialState:!1,reducers:{appUpdateAvailable:()=>!0,resetAppUpdate:()=>!1}}),{appUpdateAvailable:OQ,resetAppUpdate:jQ}=AQ,MQ=TQ,PQ=(e,t)=>{e.factory("App",EQ),e.decorator("App",t(["servers","settings","appUpdated"],["fetchServers","resetAppUpdate"])),e.serviceFactory("appUpdateAvailable",()=>OQ),e.serviceFactory("resetAppUpdate",()=>jQ)},jO={"Content-Type":"application/json"},MO=e=>e?.body?e?{...e,headers:{...e.headers??{},...jO}}:{headers:jO}:e;let LQ=class{#t;constructor(t=globalThis.fetch.bind(globalThis)){this.#t=t}async jsonRequest(t,n){const r=await this.#t(t,MO(n)),i=await r.json();if(!r.ok)throw i;return i}async emptyRequest(t,n){const r=await this.#t(t,MO(n));if(!r.ok)throw await r.json()}};var Gb={},og={exports:{}},PO;function NQ(){return PO||(PO=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=t.clone=t.recursive=t.merge=t.main=void 0,e.exports=t=n,t.default=n;function n(){for(var h=[],m=0;mH.length)&&(I=H.length);for(var j=0,q=Array(I);j(e.settings&&e.settings.visits&&e.settings.visits.defaultInterval==="last180days"&&(e.settings.visits.defaultInterval="last180Days"),e);function kQ(e){let t=e.url;try{const{host:n,pathname:r}=new URL(t);t=n;const i=r.substring(1);i.length>0&&(t=`${t} ${i}`)}catch{}return`${e.name} ${t}`.toLowerCase().replace(/[^a-zA-Z0-9-_.~]/g,"-")}function IQ(e){const t={};return e.forEach(n=>{t[n.id]=n}),t}const zQ=(e,{url:t,apiKey:n})=>e.some(r=>r.url===t&&r.apiKey===n);function UQ(e,t){const n=Object.values(e),{duplicatedServers:r=[],newServers:i=[]}=y6(t,o=>zQ(n,o)?"duplicatedServers":"newServers");return{duplicatedServers:r,newServers:i}}function fv(e,t){const n=new Set(Object.keys(e)),r=[];return t.forEach(i=>{const o=kQ(i);let l=o,c=1;for(;n.has(l);)l=`${o}-${c}`,c++;r.push({...i,id:l}),n.add(l)}),r}const BQ={},{actions:FQ,reducer:$Q}=jt({name:"shlink/servers",initialState:BQ,reducers:{editServer:{prepare:(e,t)=>({payload:{serverId:e,serverData:t}}),reducer:(e,{payload:t})=>{const{serverId:n,serverData:r}=t;return e[n]?{...e,[n]:{...e[n],...r}}:e}},deleteServer:(e,{payload:t})=>(delete e[t.id],e),setAutoConnect:{prepare:({id:e},t)=>({payload:{serverId:e,autoConnect:t}}),reducer:(e,{payload:t})=>{const{serverId:n,autoConnect:r}=t;return e[n]?r?Object.fromEntries(Object.entries(e).map(([i,o])=>[i,{...o,autoConnect:i===n}])):{...e,[n]:{...e[n],autoConnect:r}}:e}},createServers:{prepare:e=>({payload:IQ(e)}),reducer:(e,{payload:t})=>({...e,...t})}}}),{editServer:VQ,deleteServer:HQ,setAutoConnect:qQ,createServers:iD}=FQ,GQ=$Q,YQ=()=>Ty({appUpdated:MQ,servers:GQ,selectedServer:lJ,settings:wQ}),aD={states:["settings","servers"],namespace:"shlink",namespaceSeparator:".",debounce:300},WQ=()=>DQ(rD.load(aD)),KQ=(e=WQ())=>sS({devTools:!1,reducer:YQ(),preloadedState:e,middleware:t=>t({immutableCheck:!1,serializableCheck:!1}).concat(rD.save(aD))}),ZQ=KL.withTypes(),XQ=ZL.withTypes(),oD=(e,t)=>V6(e,t,{serializeError:n=>n}),QQ=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,NO=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(QQ);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},RO=e=>e==="*"||e==="x"||e==="X",DO=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},JQ=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],eJ=(e,t)=>{if(RO(e)||RO(t))return 0;const[n,r]=JQ(DO(e),DO(t));return n>r?1:n{for(let n=0;n{const n=NO(e),r=NO(t),i=n.pop(),o=r.pop(),l=kO(n,r);return l!==0?l:i&&o?kO(i.split("."),o.split(".")):i||o?i?-1:1:0},dw=(e,t,n)=>{nJ(n);const r=tJ(e,t);return sD[n].includes(r)},sD={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},IO=Object.keys(sD),nJ=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(IO.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${IO.join("|")}`)},lD=b6(e=>e,e=>{try{return dw(e,e,"=")}catch{return!1}}),uD=e=>lD(e)?`v${e}`:e,cD=(e,t="latest")=>lD(e)?e:t,cS="shlink/selectedServer",rJ="1.0.0",iJ="999.999.999",aJ="latest",oJ=e=>cD(e===aJ?iJ:e,rJ),sJ=b6(e=>`${e.id}_${e.url}_${e.apiKey}`,async(e,t)=>t().then(({version:n})=>({version:oJ(n),printableVersion:uD(n)}))),zO=null,fS=un(`${cS}/resetSelectedServer`),dS=oD(`${cS}/selectServer`,async({serverId:e,buildShlinkApiClient:t},{dispatch:n,getState:r})=>{n(fS());const{servers:i}=r(),o=i[e];if(!o)return{serverNotFound:!0};try{const l=t(o),{version:c,printableVersion:f}=await sJ(o,()=>l.health());return{...o,version:c,printableVersion:f}}catch{return{...o,serverNotReachable:!0}}}),{reducer:lJ}=jt({name:cS,initialState:zO,reducers:{},extraReducers:e=>{e.addCase(fS,()=>zO),e.addCase(dS.fulfilled,(t,{payload:n})=>n)}}),Xu=()=>{const e=ZQ(),t=w.useCallback(()=>e(fS()),[e]),n=w.useCallback(i=>e(dS(i)),[e]);return{selectedServer:XQ(({selectedServer:i})=>i),resetSelectedServer:t,selectServer:n}};function hw(e){return t=>{const{resetSelectedServer:n}=Xu();return w.useEffect(()=>{n()},[n]),g.jsx(e,{...t})}}let uJ=class extends w.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t){const{console:n=globalThis.console}=this.props;n.error(t)}render(){const{hasError:t}=this.state,{location:n=globalThis.location}=this.props;if(t)return g.jsxs(p6,{title:"Oops! This is awkward :S",children:[g.jsx("p",{children:"It seems that something went wrong. Try refreshing the page or just click this button."}),g.jsx("br",{}),g.jsx(Tt,{size:"lg",onClick:()=>n.reload(),children:"Take me back"})]});const{children:r}=this.props;return r}};const Li=({href:e,children:t,rel:n,...r})=>g.jsx("a",{target:"_blank",rel:`noopener noreferrer${n?` ${n}`:""}`,href:e,...r,children:t??e}),cJ=({id:e,name:t})=>g.jsxs(Ir,{to:`/server/${e}`,className:Oe("servers-list__server-item","flex items-center justify-between gap-x-2 px-4 py-3","rounded-none hover:bg-lm-secondary hover:dark:bg-dm-secondary","border-b last:border-0 border-lm-border dark:border-dm-border"),children:[g.jsx("span",{className:"truncate",children:t}),g.jsx(Be,{icon:Wg})]}),fD=({servers:e,borderless:t})=>g.jsx(g.Fragment,{children:e.length>0&&g.jsx("div",{"data-testid":"list",className:Oe("w-full border-lm-border dark:border-dm-border","md:max-h-56 md:overflow-y-auto -mb-1 scroll-thin",{"border-y":!t}),children:e.map(({id:n,name:r})=>g.jsx(cJ,{id:n,name:r},n))})}),dD=({color:e=Lh(),className:t})=>g.jsx("svg",{className:t,viewBox:"0 0 512 512",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:g.jsxs("g",{fill:e,children:[g.jsx("path",{d:" M 23.71 85.08 C 17.22 49.81 49.44 14.86 85.08 18.12 C 118.83 19.21 145.72 53.33 139.45 86.37 C 155.64 102.30 171.32 118.83 187.87 134.36 C 198.32 111.73 208.84 89.12 219.57 66.62 C 226.05 53.84 243.47 48.74 255.73 56.27 C 263.76 62.10 270.34 69.69 277.25 76.75 C 286.28 86.61 285.72 102.89 276.31 112.31 C 223.38 165.37 170.38 218.37 117.35 271.34 C 107.72 280.99 91.01 281.25 81.11 271.86 C 74.39 264.94 66.82 258.69 61.24 250.77 C 53.72 238.52 58.85 221.07 71.64 214.62 C 94.11 203.87 116.72 193.38 139.33 182.91 C 123.81 166.36 107.30 150.68 91.37 134.49 C 60.20 140.28 27.37 116.78 23.71 85.08 Z"}),g.jsx("path",{d:" M 205.21 201.23 C 225.32 181.36 260.88 181.11 281.14 200.86 C 299.25 218.75 317.37 236.65 335.10 254.93 C 356.73 278.01 352.01 318.70 326.03 336.56 C 320.07 330.47 313.73 324.65 308.12 318.28 C 323.86 309.39 328.76 286.18 316.63 272.39 C 301.73 256.95 286.30 242.03 271.24 226.75 C 264.49 219.65 256.80 212.00 246.37 211.52 C 224.65 208.64 205.52 233.36 214.49 253.58 C 221.09 266.81 234.22 275.12 243.62 286.24 C 240.43 295.96 238.09 306.13 238.29 316.46 C 225.55 304.29 213.16 291.73 200.89 279.09 C 180.97 257.57 183.10 220.45 205.21 201.23 Z"}),g.jsx("path",{d:" M 273.90 352.07 C 252.28 328.99 256.98 288.31 282.96 270.46 C 288.93 276.54 295.26 282.36 300.88 288.72 C 285.14 297.62 280.23 320.82 292.38 334.61 C 307.27 350.05 322.70 364.96 337.75 380.25 C 344.51 387.35 352.20 395.00 362.64 395.48 C 384.35 398.37 403.49 373.64 394.51 353.42 C 387.92 340.18 374.78 331.88 365.38 320.76 C 368.56 311.04 370.91 300.86 370.71 290.54 C 383.45 302.70 395.84 315.27 408.11 327.91 C 428.03 349.43 425.90 386.55 403.78 405.77 C 383.68 425.64 348.13 425.89 327.86 406.14 C 309.75 388.25 291.60 370.37 273.90 352.07 Z"}),g.jsx("path",{d:" M 422.11 403.83 C 431.96 394.07 441.60 384.06 451.66 374.51 C 460.90 383.74 471.89 392.70 474.89 406.11 C 480.16 429.97 484.08 454.13 488.76 478.12 C 490.00 483.41 484.47 488.29 479.35 486.63 C 454.66 481.52 429.55 478.12 405.14 471.84 C 393.17 467.97 385.20 457.75 376.55 449.27 C 386.39 439.49 396.13 429.60 406.06 419.91 C 416.37 433.45 435.74 414.00 422.11 403.83 Z"})]})}),fJ=({servers:e})=>{const t=uo(),n=Object.values(e),r=n.length>0;return w.useEffect(()=>{const i=n.find(({autoConnect:o})=>o);i&&t(`/server/${i.id}`)},[n,t]),g.jsx("div",{className:"px-3 w-full",children:g.jsx(ln,{className:"mx-auto max-w-[720px] overflow-hidden",children:g.jsxs("div",{className:"flex flex-col md:flex-row",children:[g.jsx("div",{className:"p-6 hidden md:flex items-center w-[40%]",children:g.jsx("div",{className:"w-full",children:g.jsx(dD,{})})}),g.jsxs("div",{className:"md:border-l border-lm-border dark:border-dm-border flex-grow",children:[g.jsx("h1",{className:Oe("p-4 text-center border-lm-border dark:border-dm-border",{"border-b":!r}),children:"Welcome!"}),r?g.jsx(fD,{servers:n}):g.jsxs("div",{className:"p-6 text-center flex flex-col gap-12 text-xl",children:[g.jsx("p",{children:"This application will help you manage your Shlink servers."}),g.jsx("p",{children:g.jsxs(Tt,{to:"/server/create",size:"lg",inline:!0,children:[g.jsx(Be,{icon:Zh,widthAuto:!0})," Add a server"]})}),g.jsx("p",{children:g.jsx(Li,{href:"https://shlink.io/documentation",children:g.jsxs("small",{children:[g.jsx("span",{className:"mr-2",children:"Learn more about Shlink"}),g.jsx(Be,{icon:BV})]})})})]})]})]})})})},hD=()=>{const{ServersDropdown:e}=oa(hD),{pathname:t}=Or(),n="/settings";return g.jsxs(J2,{className:"[&]:fixed top-0 z-900",brand:g.jsxs(Ir,{to:"/",className:"[&]:text-white no-underline flex items-center gap-2",children:[g.jsx(dD,{className:"w-7",color:"white"})," ",g.jsx("small",{className:"font-normal",children:"Shlink"})]}),children:[g.jsxs(J2.MenuItem,{to:n,active:t.startsWith(n),className:"flex items-center gap-1.5",children:[g.jsx(Be,{icon:DV})," Settings"]}),g.jsx(e,{})]})},dJ=Pa(hD,["ServersDropdown"]),hJ=({children:e})=>{const t=Or();return w.useEffect(()=>{scrollTo(0,0)},[t]),g.jsx(g.Fragment,{children:e})},mJ="%_VERSION_%",pJ=e=>uD(cD(e)),UO=({project:e,version:t})=>g.jsx(Li,{href:`https://github.com/shlinkio/${e}/releases/${t}`,className:"text-gray-500",children:g.jsx("b",{children:t})}),gJ=({selectedServer:e,clientVersion:t=mJ})=>{const n=pJ(t);return g.jsxs("small",{className:"text-gray-500",children:[T_(e)&&g.jsxs(g.Fragment,{children:["Server: ",g.jsx(UO,{project:"shlink",version:e.printableVersion})," - "]}),"Client: ",g.jsx(UO,{project:"shlink-web-client",version:n})]})},vJ=()=>{const{selectedServer:e}=Xu();return g.jsx("div",{className:Oe("text-center",{"md:ml-(--aside-menu-width)":T_(e)}),children:g.jsx(gJ,{selectedServer:e})})},hS={INVALID_ARGUMENT:"https://shlink.io/api/error/invalid-data",INVALID_SHORT_URL_DELETION:"https://shlink.io/api/error/invalid-short-url-deletion",DOMAIN_NOT_FOUND:"https://shlink.io/api/error/domain-not-found",FORBIDDEN_OPERATION:"https://shlink.io/api/error/forbidden-tag-operation",INVALID_SLUG:"https://shlink.io/api/error/non-unique-slug",INVALID_SHORTCODE:"https://shlink.io/api/error/short-url-not-found",TAG_CONFLICT:"https://shlink.io/api/error/tag-conflict",TAG_NOT_FOUND:"https://shlink.io/api/error/tag-not-found",MERCURE_NOT_CONFIGURED:"https://shlink.io/api/error/mercure-not-configured",INVALID_AUTHORIZATION:"https://shlink.io/api/error/missing-authentication",INVALID_API_KEY:"https://shlink.io/api/error/invalid-api-key",NOT_FOUND:"https://shlink.io/api/error/not-found",INVALID_URL:"https://shlink.io/api/error/invalid-url"};Object.freeze(hS);var mh={exports:{}};var yJ=mh.exports,BO;function bJ(){return BO||(BO=1,function(e,t){(function(n){var r=n.setTimeout,i=n.clearTimeout,o=n.XMLHttpRequest,l=n.XDomainRequest,c=n.ActiveXObject,f=n.EventSource,h=n.document,m=n.Promise,y=n.fetch,x=n.Response,b=n.TextDecoder,C=n.TextEncoder,_=n.AbortController;if(typeof window<"u"&&typeof h<"u"&&!("readyState"in h)&&h.body==null&&(h.readyState="loading",window.addEventListener("load",function(ie){h.readyState="complete"},!1)),o==null&&c!=null&&(o=function(){return new c("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(ie){function xe(){}return xe.prototype=ie,new xe}),Date.now||(Date.now=function(){return new Date().getTime()}),_==null){var A=y;y=function(ie,xe){var Ee=xe.signal;return A(ie,{headers:xe.headers,credentials:xe.credentials,cache:xe.cache}).then(function(Me){var Ue=Me.body.getReader();return Ee._reader=Ue,Ee._aborted&&Ee._reader.cancel(),{status:Me.status,statusText:Me.statusText,headers:Me.headers,body:{getReader:function(){return Ue}}}})},_=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function O(){this.bitsNeeded=0,this.codePoint=0}O.prototype.decode=function(ie){function xe(Qe,We,ze){if(ze===1)return Qe>=128>>We&&Qe<=2048>>We&&Qe<=57344>>We&&Qe<=65536>>We&&Qe<>6>15?3:We>31?2:1;if(Qe===6*2)return We>15?3:2;if(Qe===6*3)return 3;throw new Error}for(var Me=65533,Ue="",ke=this.bitsNeeded,Ve=this.codePoint,ot=0;ot191||!xe(Ve<<6|Ge&63,ke-6,Ee(ke,Ve)))&&(ke=0,Ve=Me,Ue+=String.fromCharCode(Ve)),ke===0?(Ge>=0&&Ge<=127?(ke=0,Ve=Ge):Ge>=192&&Ge<=223?(ke=6*1,Ve=Ge&31):Ge>=224&&Ge<=239?(ke=6*2,Ve=Ge&15):Ge>=240&&Ge<=247?(ke=6*3,Ve=Ge&7):(ke=0,Ve=Me),ke!==0&&!xe(Ve,ke,Ee(ke,Ve))&&(ke=0,Ve=Me)):(ke-=6,Ve=Ve<<6|Ge&63),ke===0&&(Ve<=65535?Ue+=String.fromCharCode(Ve):(Ue+=String.fromCharCode(55296+(Ve-65535-1>>10)),Ue+=String.fromCharCode(56320+(Ve-65535-1&1023))))}return this.bitsNeeded=ke,this.codePoint=Ve,Ue};var P=function(){try{return new b().decode(new C().encode("test"),{stream:!0})==="test"}catch(ie){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+ie)}return!1};(b==null||C==null||!P())&&(b=O);var N=function(){};function F(ie){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=N,this.onload=N,this.onerror=N,this.onreadystatechange=N,this._contentType="",this._xhr=ie,this._sendTimeout=0,this._abort=N}F.prototype.open=function(ie,xe){this._abort(!0);var Ee=this,Me=this._xhr,Ue=1,ke=0;this._abort=function(ze){Ee._sendTimeout!==0&&(i(Ee._sendTimeout),Ee._sendTimeout=0),(Ue===1||Ue===2||Ue===3)&&(Ue=4,Me.onload=N,Me.onerror=N,Me.onabort=N,Me.onprogress=N,Me.onreadystatechange=N,Me.abort(),ke!==0&&(i(ke),ke=0),ze||(Ee.readyState=4,Ee.onabort(null),Ee.onreadystatechange())),Ue=0};var Ve=function(){if(Ue===1){var ze=0,nt="",Pt=void 0;if("contentType"in Me)ze=200,nt="OK",Pt=Me.contentType;else try{ze=Me.status,nt=Me.statusText,Pt=Me.getResponseHeader("Content-Type")}catch{ze=0,nt="",Pt=void 0}ze!==0&&(Ue=2,Ee.readyState=2,Ee.status=ze,Ee.statusText=nt,Ee._contentType=Pt,Ee.onreadystatechange())}},ot=function(){if(Ve(),Ue===2||Ue===3){Ue=3;var ze="";try{ze=Me.responseText}catch{}Ee.readyState=3,Ee.responseText=ze,Ee.onprogress()}},Ge=function(ze,nt){if((nt==null||nt.preventDefault==null)&&(nt={preventDefault:N}),ot(),Ue===1||Ue===2||Ue===3){if(Ue=4,ke!==0&&(i(ke),ke=0),Ee.readyState=4,ze==="load")Ee.onload(nt);else if(ze==="error")Ee.onerror(nt);else if(ze==="abort")Ee.onabort(nt);else throw new TypeError;Ee.onreadystatechange()}},Qe=function(ze){Me!=null&&(Me.readyState===4?(!("onload"in Me)||!("onerror"in Me)||!("onabort"in Me))&&Ge(Me.responseText===""?"error":"load",ze):Me.readyState===3?"onprogress"in Me||ot():Me.readyState===2&&Ve())},We=function(){ke=r(function(){We()},500),Me.readyState===3&&ot()};"onload"in Me&&(Me.onload=function(ze){Ge("load",ze)}),"onerror"in Me&&(Me.onerror=function(ze){Ge("error",ze)}),"onabort"in Me&&(Me.onabort=function(ze){Ge("abort",ze)}),"onprogress"in Me&&(Me.onprogress=ot),"onreadystatechange"in Me&&(Me.onreadystatechange=function(ze){Qe(ze)}),("contentType"in Me||!("ontimeout"in o.prototype))&&(xe+=(xe.indexOf("?")===-1?"?":"&")+"padding=true"),Me.open(ie,xe,!0),"readyState"in Me&&(ke=r(function(){We()},0))},F.prototype.abort=function(){this._abort(!1)},F.prototype.getResponseHeader=function(ie){return this._contentType},F.prototype.setRequestHeader=function(ie,xe){var Ee=this._xhr;"setRequestHeader"in Ee&&Ee.setRequestHeader(ie,xe)},F.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},F.prototype.send=function(){if((!("ontimeout"in o.prototype)||!("sendAsBinary"in o.prototype)&&!("mozAnon"in o.prototype))&&h!=null&&h.readyState!=null&&h.readyState!=="complete"){var ie=this;ie._sendTimeout=r(function(){ie._sendTimeout=0,ie.send()},4);return}var xe=this._xhr;"withCredentials"in xe&&(xe.withCredentials=this.withCredentials);try{xe.send(void 0)}catch(Ee){throw Ee}};function U(ie){return ie.replace(/[A-Z]/g,function(xe){return String.fromCharCode(xe.charCodeAt(0)+32)})}function W(ie){for(var xe=Object.create(null),Ee=ie.split(`\r +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function o(H,I){if(H){if(typeof H=="string")return l(H,I);var j=Object.prototype.toString.call(H).slice(8,-1);return j==="Object"&&H.constructor&&(j=H.constructor.name),j==="Map"||j==="Set"?Array.from(H):j==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(j)?l(H,I):void 0}}function l(H,I){(I==null||I>H.length)&&(I=H.length);for(var j=0,q=Array(I);j(e.settings&&e.settings.visits&&e.settings.visits.defaultInterval==="last180days"&&(e.settings.visits.defaultInterval="last180Days"),e);function kQ(e){let t=e.url;try{const{host:n,pathname:r}=new URL(t);t=n;const i=r.substring(1);i.length>0&&(t=`${t} ${i}`)}catch{}return`${e.name} ${t}`.toLowerCase().replace(/[^a-zA-Z0-9-_.~]/g,"-")}function IQ(e){const t={};return e.forEach(n=>{t[n.id]=n}),t}const zQ=(e,{url:t,apiKey:n})=>e.some(r=>r.url===t&&r.apiKey===n);function UQ(e,t){const n=Object.values(e),{duplicatedServers:r=[],newServers:i=[]}=y6(t,o=>zQ(n,o)?"duplicatedServers":"newServers");return{duplicatedServers:r,newServers:i}}function fv(e,t){const n=new Set(Object.keys(e)),r=[];return t.forEach(i=>{const o=kQ(i);let l=o,c=1;for(;n.has(l);)l=`${o}-${c}`,c++;r.push({...i,id:l}),n.add(l)}),r}const BQ={},{actions:FQ,reducer:$Q}=jt({name:"shlink/servers",initialState:BQ,reducers:{editServer:{prepare:(e,t)=>({payload:{serverId:e,serverData:t}}),reducer:(e,{payload:t})=>{const{serverId:n,serverData:r}=t;return e[n]?{...e,[n]:{...e[n],...r}}:e}},deleteServer:(e,{payload:t})=>(delete e[t.id],e),setAutoConnect:{prepare:({id:e},t)=>({payload:{serverId:e,autoConnect:t}}),reducer:(e,{payload:t})=>{const{serverId:n,autoConnect:r}=t;return e[n]?r?Object.fromEntries(Object.entries(e).map(([i,o])=>[i,{...o,autoConnect:i===n}])):{...e,[n]:{...e[n],autoConnect:r}}:e}},createServers:{prepare:e=>({payload:IQ(e)}),reducer:(e,{payload:t})=>({...e,...t})}}}),{editServer:VQ,deleteServer:HQ,setAutoConnect:qQ,createServers:iD}=FQ,GQ=$Q,YQ=()=>Ty({appUpdated:MQ,servers:GQ,selectedServer:lJ,settings:wQ}),aD={states:["settings","servers"],namespace:"shlink",namespaceSeparator:".",debounce:300},WQ=()=>DQ(rD.load(aD)),KQ=(e=WQ())=>sS({devTools:!1,reducer:YQ(),preloadedState:e,middleware:t=>t().concat(rD.save(aD))}),ZQ=KL.withTypes(),XQ=ZL.withTypes(),oD=(e,t)=>V6(e,t,{serializeError:n=>n}),QQ=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,NO=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(QQ);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},RO=e=>e==="*"||e==="x"||e==="X",DO=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},JQ=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],eJ=(e,t)=>{if(RO(e)||RO(t))return 0;const[n,r]=JQ(DO(e),DO(t));return n>r?1:n{for(let n=0;n{const n=NO(e),r=NO(t),i=n.pop(),o=r.pop(),l=kO(n,r);return l!==0?l:i&&o?kO(i.split("."),o.split(".")):i||o?i?-1:1:0},dw=(e,t,n)=>{nJ(n);const r=tJ(e,t);return sD[n].includes(r)},sD={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},IO=Object.keys(sD),nJ=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(IO.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${IO.join("|")}`)},lD=b6(e=>e,e=>{try{return dw(e,e,"=")}catch{return!1}}),uD=e=>lD(e)?`v${e}`:e,cD=(e,t="latest")=>lD(e)?e:t,cS="shlink/selectedServer",rJ="1.0.0",iJ="999.999.999",aJ="latest",oJ=e=>cD(e===aJ?iJ:e,rJ),sJ=b6(e=>`${e.id}_${e.url}_${e.apiKey}`,async(e,t)=>t().then(({version:n})=>({version:oJ(n),printableVersion:uD(n)}))),zO=null,fS=un(`${cS}/resetSelectedServer`),dS=oD(`${cS}/selectServer`,async({serverId:e,buildShlinkApiClient:t},{dispatch:n,getState:r})=>{n(fS());const{servers:i}=r(),o=i[e];if(!o)return{serverNotFound:!0};try{const l=t(o),{version:c,printableVersion:f}=await sJ(o,()=>l.health());return{...o,version:c,printableVersion:f}}catch{return{...o,serverNotReachable:!0}}}),{reducer:lJ}=jt({name:cS,initialState:zO,reducers:{},extraReducers:e=>{e.addCase(fS,()=>zO),e.addCase(dS.fulfilled,(t,{payload:n})=>n)}}),Xu=()=>{const e=ZQ(),t=w.useCallback(()=>e(fS()),[e]),n=w.useCallback(i=>e(dS(i)),[e]);return{selectedServer:XQ(({selectedServer:i})=>i),resetSelectedServer:t,selectServer:n}};function hw(e){return t=>{const{resetSelectedServer:n}=Xu();return w.useEffect(()=>{n()},[n]),g.jsx(e,{...t})}}let uJ=class extends w.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t){const{console:n=globalThis.console}=this.props;n.error(t)}render(){const{hasError:t}=this.state,{location:n=globalThis.location}=this.props;if(t)return g.jsxs(p6,{title:"Oops! This is awkward :S",children:[g.jsx("p",{children:"It seems that something went wrong. Try refreshing the page or just click this button."}),g.jsx("br",{}),g.jsx(Tt,{size:"lg",onClick:()=>n.reload(),children:"Take me back"})]});const{children:r}=this.props;return r}};const Li=({href:e,children:t,rel:n,...r})=>g.jsx("a",{target:"_blank",rel:`noopener noreferrer${n?` ${n}`:""}`,href:e,...r,children:t??e}),cJ=({id:e,name:t})=>g.jsxs(Ir,{to:`/server/${e}`,className:Oe("servers-list__server-item","flex items-center justify-between gap-x-2 px-4 py-3","rounded-none hover:bg-lm-secondary hover:dark:bg-dm-secondary","border-b last:border-0 border-lm-border dark:border-dm-border"),children:[g.jsx("span",{className:"truncate",children:t}),g.jsx(Be,{icon:Wg})]}),fD=({servers:e,borderless:t})=>g.jsx(g.Fragment,{children:e.length>0&&g.jsx("div",{"data-testid":"list",className:Oe("w-full border-lm-border dark:border-dm-border","md:max-h-56 md:overflow-y-auto -mb-1 scroll-thin",{"border-y":!t}),children:e.map(({id:n,name:r})=>g.jsx(cJ,{id:n,name:r},n))})}),dD=({color:e=Lh(),className:t})=>g.jsx("svg",{className:t,viewBox:"0 0 512 512",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:g.jsxs("g",{fill:e,children:[g.jsx("path",{d:" M 23.71 85.08 C 17.22 49.81 49.44 14.86 85.08 18.12 C 118.83 19.21 145.72 53.33 139.45 86.37 C 155.64 102.30 171.32 118.83 187.87 134.36 C 198.32 111.73 208.84 89.12 219.57 66.62 C 226.05 53.84 243.47 48.74 255.73 56.27 C 263.76 62.10 270.34 69.69 277.25 76.75 C 286.28 86.61 285.72 102.89 276.31 112.31 C 223.38 165.37 170.38 218.37 117.35 271.34 C 107.72 280.99 91.01 281.25 81.11 271.86 C 74.39 264.94 66.82 258.69 61.24 250.77 C 53.72 238.52 58.85 221.07 71.64 214.62 C 94.11 203.87 116.72 193.38 139.33 182.91 C 123.81 166.36 107.30 150.68 91.37 134.49 C 60.20 140.28 27.37 116.78 23.71 85.08 Z"}),g.jsx("path",{d:" M 205.21 201.23 C 225.32 181.36 260.88 181.11 281.14 200.86 C 299.25 218.75 317.37 236.65 335.10 254.93 C 356.73 278.01 352.01 318.70 326.03 336.56 C 320.07 330.47 313.73 324.65 308.12 318.28 C 323.86 309.39 328.76 286.18 316.63 272.39 C 301.73 256.95 286.30 242.03 271.24 226.75 C 264.49 219.65 256.80 212.00 246.37 211.52 C 224.65 208.64 205.52 233.36 214.49 253.58 C 221.09 266.81 234.22 275.12 243.62 286.24 C 240.43 295.96 238.09 306.13 238.29 316.46 C 225.55 304.29 213.16 291.73 200.89 279.09 C 180.97 257.57 183.10 220.45 205.21 201.23 Z"}),g.jsx("path",{d:" M 273.90 352.07 C 252.28 328.99 256.98 288.31 282.96 270.46 C 288.93 276.54 295.26 282.36 300.88 288.72 C 285.14 297.62 280.23 320.82 292.38 334.61 C 307.27 350.05 322.70 364.96 337.75 380.25 C 344.51 387.35 352.20 395.00 362.64 395.48 C 384.35 398.37 403.49 373.64 394.51 353.42 C 387.92 340.18 374.78 331.88 365.38 320.76 C 368.56 311.04 370.91 300.86 370.71 290.54 C 383.45 302.70 395.84 315.27 408.11 327.91 C 428.03 349.43 425.90 386.55 403.78 405.77 C 383.68 425.64 348.13 425.89 327.86 406.14 C 309.75 388.25 291.60 370.37 273.90 352.07 Z"}),g.jsx("path",{d:" M 422.11 403.83 C 431.96 394.07 441.60 384.06 451.66 374.51 C 460.90 383.74 471.89 392.70 474.89 406.11 C 480.16 429.97 484.08 454.13 488.76 478.12 C 490.00 483.41 484.47 488.29 479.35 486.63 C 454.66 481.52 429.55 478.12 405.14 471.84 C 393.17 467.97 385.20 457.75 376.55 449.27 C 386.39 439.49 396.13 429.60 406.06 419.91 C 416.37 433.45 435.74 414.00 422.11 403.83 Z"})]})}),fJ=({servers:e})=>{const t=uo(),n=Object.values(e),r=n.length>0;return w.useEffect(()=>{const i=n.find(({autoConnect:o})=>o);i&&t(`/server/${i.id}`)},[n,t]),g.jsx("div",{className:"px-3 w-full",children:g.jsx(ln,{className:"mx-auto max-w-[720px] overflow-hidden",children:g.jsxs("div",{className:"flex flex-col md:flex-row",children:[g.jsx("div",{className:"p-6 hidden md:flex items-center w-[40%]",children:g.jsx("div",{className:"w-full",children:g.jsx(dD,{})})}),g.jsxs("div",{className:"md:border-l border-lm-border dark:border-dm-border flex-grow",children:[g.jsx("h1",{className:Oe("p-4 text-center border-lm-border dark:border-dm-border",{"border-b":!r}),children:"Welcome!"}),r?g.jsx(fD,{servers:n}):g.jsxs("div",{className:"p-6 text-center flex flex-col gap-12 text-xl",children:[g.jsx("p",{children:"This application will help you manage your Shlink servers."}),g.jsx("p",{children:g.jsxs(Tt,{to:"/server/create",size:"lg",inline:!0,children:[g.jsx(Be,{icon:Zh,widthAuto:!0})," Add a server"]})}),g.jsx("p",{children:g.jsx(Li,{href:"https://shlink.io/documentation",children:g.jsxs("small",{children:[g.jsx("span",{className:"mr-2",children:"Learn more about Shlink"}),g.jsx(Be,{icon:BV})]})})})]})]})]})})})},hD=()=>{const{ServersDropdown:e}=oa(hD),{pathname:t}=Or(),n="/settings";return g.jsxs(J2,{className:"[&]:fixed top-0 z-900",brand:g.jsxs(Ir,{to:"/",className:"[&]:text-white no-underline flex items-center gap-2",children:[g.jsx(dD,{className:"w-7",color:"white"})," ",g.jsx("small",{className:"font-normal",children:"Shlink"})]}),children:[g.jsxs(J2.MenuItem,{to:n,active:t.startsWith(n),className:"flex items-center gap-1.5",children:[g.jsx(Be,{icon:DV})," Settings"]}),g.jsx(e,{})]})},dJ=Pa(hD,["ServersDropdown"]),hJ=({children:e})=>{const t=Or();return w.useEffect(()=>{scrollTo(0,0)},[t]),g.jsx(g.Fragment,{children:e})},mJ="%_VERSION_%",pJ=e=>uD(cD(e)),UO=({project:e,version:t})=>g.jsx(Li,{href:`https://github.com/shlinkio/${e}/releases/${t}`,className:"text-gray-500",children:g.jsx("b",{children:t})}),gJ=({selectedServer:e,clientVersion:t=mJ})=>{const n=pJ(t);return g.jsxs("small",{className:"text-gray-500",children:[T_(e)&&g.jsxs(g.Fragment,{children:["Server: ",g.jsx(UO,{project:"shlink",version:e.printableVersion})," - "]}),"Client: ",g.jsx(UO,{project:"shlink-web-client",version:n})]})},vJ=()=>{const{selectedServer:e}=Xu();return g.jsx("div",{className:Oe("text-center",{"md:ml-(--aside-menu-width)":T_(e)}),children:g.jsx(gJ,{selectedServer:e})})},hS={INVALID_ARGUMENT:"https://shlink.io/api/error/invalid-data",INVALID_SHORT_URL_DELETION:"https://shlink.io/api/error/invalid-short-url-deletion",DOMAIN_NOT_FOUND:"https://shlink.io/api/error/domain-not-found",FORBIDDEN_OPERATION:"https://shlink.io/api/error/forbidden-tag-operation",INVALID_SLUG:"https://shlink.io/api/error/non-unique-slug",INVALID_SHORTCODE:"https://shlink.io/api/error/short-url-not-found",TAG_CONFLICT:"https://shlink.io/api/error/tag-conflict",TAG_NOT_FOUND:"https://shlink.io/api/error/tag-not-found",MERCURE_NOT_CONFIGURED:"https://shlink.io/api/error/mercure-not-configured",INVALID_AUTHORIZATION:"https://shlink.io/api/error/missing-authentication",INVALID_API_KEY:"https://shlink.io/api/error/invalid-api-key",NOT_FOUND:"https://shlink.io/api/error/not-found",INVALID_URL:"https://shlink.io/api/error/invalid-url"};Object.freeze(hS);var mh={exports:{}};var yJ=mh.exports,BO;function bJ(){return BO||(BO=1,function(e,t){(function(n){var r=n.setTimeout,i=n.clearTimeout,o=n.XMLHttpRequest,l=n.XDomainRequest,c=n.ActiveXObject,f=n.EventSource,h=n.document,m=n.Promise,y=n.fetch,x=n.Response,b=n.TextDecoder,C=n.TextEncoder,_=n.AbortController;if(typeof window<"u"&&typeof h<"u"&&!("readyState"in h)&&h.body==null&&(h.readyState="loading",window.addEventListener("load",function(ie){h.readyState="complete"},!1)),o==null&&c!=null&&(o=function(){return new c("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(ie){function xe(){}return xe.prototype=ie,new xe}),Date.now||(Date.now=function(){return new Date().getTime()}),_==null){var A=y;y=function(ie,xe){var Ee=xe.signal;return A(ie,{headers:xe.headers,credentials:xe.credentials,cache:xe.cache}).then(function(Me){var Ue=Me.body.getReader();return Ee._reader=Ue,Ee._aborted&&Ee._reader.cancel(),{status:Me.status,statusText:Me.statusText,headers:Me.headers,body:{getReader:function(){return Ue}}}})},_=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function O(){this.bitsNeeded=0,this.codePoint=0}O.prototype.decode=function(ie){function xe(Qe,We,ze){if(ze===1)return Qe>=128>>We&&Qe<=2048>>We&&Qe<=57344>>We&&Qe<=65536>>We&&Qe<>6>15?3:We>31?2:1;if(Qe===6*2)return We>15?3:2;if(Qe===6*3)return 3;throw new Error}for(var Me=65533,Ue="",ke=this.bitsNeeded,Ve=this.codePoint,ot=0;ot191||!xe(Ve<<6|Ge&63,ke-6,Ee(ke,Ve)))&&(ke=0,Ve=Me,Ue+=String.fromCharCode(Ve)),ke===0?(Ge>=0&&Ge<=127?(ke=0,Ve=Ge):Ge>=192&&Ge<=223?(ke=6*1,Ve=Ge&31):Ge>=224&&Ge<=239?(ke=6*2,Ve=Ge&15):Ge>=240&&Ge<=247?(ke=6*3,Ve=Ge&7):(ke=0,Ve=Me),ke!==0&&!xe(Ve,ke,Ee(ke,Ve))&&(ke=0,Ve=Me)):(ke-=6,Ve=Ve<<6|Ge&63),ke===0&&(Ve<=65535?Ue+=String.fromCharCode(Ve):(Ue+=String.fromCharCode(55296+(Ve-65535-1>>10)),Ue+=String.fromCharCode(56320+(Ve-65535-1&1023))))}return this.bitsNeeded=ke,this.codePoint=Ve,Ue};var P=function(){try{return new b().decode(new C().encode("test"),{stream:!0})==="test"}catch(ie){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+ie)}return!1};(b==null||C==null||!P())&&(b=O);var N=function(){};function F(ie){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=N,this.onload=N,this.onerror=N,this.onreadystatechange=N,this._contentType="",this._xhr=ie,this._sendTimeout=0,this._abort=N}F.prototype.open=function(ie,xe){this._abort(!0);var Ee=this,Me=this._xhr,Ue=1,ke=0;this._abort=function(ze){Ee._sendTimeout!==0&&(i(Ee._sendTimeout),Ee._sendTimeout=0),(Ue===1||Ue===2||Ue===3)&&(Ue=4,Me.onload=N,Me.onerror=N,Me.onabort=N,Me.onprogress=N,Me.onreadystatechange=N,Me.abort(),ke!==0&&(i(ke),ke=0),ze||(Ee.readyState=4,Ee.onabort(null),Ee.onreadystatechange())),Ue=0};var Ve=function(){if(Ue===1){var ze=0,nt="",Pt=void 0;if("contentType"in Me)ze=200,nt="OK",Pt=Me.contentType;else try{ze=Me.status,nt=Me.statusText,Pt=Me.getResponseHeader("Content-Type")}catch{ze=0,nt="",Pt=void 0}ze!==0&&(Ue=2,Ee.readyState=2,Ee.status=ze,Ee.statusText=nt,Ee._contentType=Pt,Ee.onreadystatechange())}},ot=function(){if(Ve(),Ue===2||Ue===3){Ue=3;var ze="";try{ze=Me.responseText}catch{}Ee.readyState=3,Ee.responseText=ze,Ee.onprogress()}},Ge=function(ze,nt){if((nt==null||nt.preventDefault==null)&&(nt={preventDefault:N}),ot(),Ue===1||Ue===2||Ue===3){if(Ue=4,ke!==0&&(i(ke),ke=0),Ee.readyState=4,ze==="load")Ee.onload(nt);else if(ze==="error")Ee.onerror(nt);else if(ze==="abort")Ee.onabort(nt);else throw new TypeError;Ee.onreadystatechange()}},Qe=function(ze){Me!=null&&(Me.readyState===4?(!("onload"in Me)||!("onerror"in Me)||!("onabort"in Me))&&Ge(Me.responseText===""?"error":"load",ze):Me.readyState===3?"onprogress"in Me||ot():Me.readyState===2&&Ve())},We=function(){ke=r(function(){We()},500),Me.readyState===3&&ot()};"onload"in Me&&(Me.onload=function(ze){Ge("load",ze)}),"onerror"in Me&&(Me.onerror=function(ze){Ge("error",ze)}),"onabort"in Me&&(Me.onabort=function(ze){Ge("abort",ze)}),"onprogress"in Me&&(Me.onprogress=ot),"onreadystatechange"in Me&&(Me.onreadystatechange=function(ze){Qe(ze)}),("contentType"in Me||!("ontimeout"in o.prototype))&&(xe+=(xe.indexOf("?")===-1?"?":"&")+"padding=true"),Me.open(ie,xe,!0),"readyState"in Me&&(ke=r(function(){We()},0))},F.prototype.abort=function(){this._abort(!1)},F.prototype.getResponseHeader=function(ie){return this._contentType},F.prototype.setRequestHeader=function(ie,xe){var Ee=this._xhr;"setRequestHeader"in Ee&&Ee.setRequestHeader(ie,xe)},F.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},F.prototype.send=function(){if((!("ontimeout"in o.prototype)||!("sendAsBinary"in o.prototype)&&!("mozAnon"in o.prototype))&&h!=null&&h.readyState!=null&&h.readyState!=="complete"){var ie=this;ie._sendTimeout=r(function(){ie._sendTimeout=0,ie.send()},4);return}var xe=this._xhr;"withCredentials"in xe&&(xe.withCredentials=this.withCredentials);try{xe.send(void 0)}catch(Ee){throw Ee}};function U(ie){return ie.replace(/[A-Z]/g,function(xe){return String.fromCharCode(xe.charCodeAt(0)+32)})}function W(ie){for(var xe=Object.create(null),Ee=ie.split(`\r `),Me=0;Me"u"?typeof window<"u"?window:typeof self<"u"?self:yJ:globalThis)}(mh,mh.exports)),mh.exports}var xJ=bJ();const mS=6048e5,wJ=864e5,mD=6e4,pS=36e5,sg=43200,FO=1440,$O=Symbol.for("constructDateFrom");function Tr(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&$O in e?e[$O](t):e instanceof Date?new e.constructor(t):new Date(t)}function St(e,t){return Tr(t||e,e)}function gS(e,t,n){const r=St(e,n?.in);return isNaN(t)?Tr(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function _J(e,t,n){const r=St(e,n?.in);if(isNaN(t))return Tr(e,NaN);if(!t)return r;const i=r.getDate(),o=Tr(e,r.getTime());o.setMonth(r.getMonth()+t+1,0);const l=o.getDate();return i>=l?o:(r.setFullYear(o.getFullYear(),o.getMonth(),i),r)}function SJ(e,t,n){const{years:r=0,months:i=0,weeks:o=0,days:l=0,hours:c=0,minutes:f=0,seconds:h=0}=t,m=St(e,n?.in),y=i||r?_J(m,i+r*12):m,x=l||o?gS(y,l+o*7):y,b=f+c*60,_=(h+b*60)*1e3;return Tr(e,+x+_)}let CJ={};function om(){return CJ}function Bu(e,t){const n=om(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=St(e,t?.in),o=i.getDay(),l=(o=o.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function df(e){const t=St(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Qu(e,...t){const n=Tr.bind(null,e||t.find(r=>typeof r=="object"));return t.map(n)}function Fu(e,t){const n=St(e,t?.in);return n.setHours(0,0,0,0),n}function Ny(e,t,n){const[r,i]=Qu(n?.in,e,t),o=Fu(r),l=Fu(i),c=+o-df(o),f=+l-df(l);return Math.round((c-f)/wJ)}function EJ(e,t){const n=pD(e,t),r=Tr(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),kh(r)}function gD(e,t){let n,r=t?.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=Tr.bind(null,i));const o=St(i,r);(!n||n{!r&&typeof i=="object"&&(r=Tr.bind(null,i));const o=St(i,r);(!n||n>o||isNaN(+o))&&(n=o)}),Tr(r,n||NaN)}function Ig(e,t){const n=+St(e)-+St(t);return n<0?-1:n>0?1:n}function TJ(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function OJ(e){return!(!TJ(e)&&typeof e!="number"||isNaN(+St(e)))}function dv(e,t,n){const[r,i]=Qu(n?.in,e,t),o=r.getFullYear()-i.getFullYear(),l=r.getMonth()-i.getMonth();return o*12+l}function jJ(e,t,n){const[r,i]=Qu(n?.in,e,t),o=Bu(r,n),l=Bu(i,n),c=+o-df(o),f=+l-df(l);return Math.round((c-f)/mS)}function vD(e,t,n){const[r,i]=Qu(n?.in,e,t),o=VO(r,i),l=Math.abs(Ny(r,i));r.setDate(r.getDate()-o*l);const c=+(VO(r,i)===-o),f=o*(l-c);return f===0?0:f}function VO(e,t){const n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function yD(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function MJ(e,t,n){const[r,i]=Qu(n?.in,e,t),o=(+r-+i)/pS;return yD(n?.roundingMethod)(o)}function PJ(e,t){return+St(e)-+St(t)}function hf(e,t){const n=St(e,t?.in);return n.setHours(23,59,59,999),n}function LJ(e,t){const n=St(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function NJ(e,t){const n=St(e,t?.in);return+hf(n,t)==+LJ(n,t)}function RJ(e,t,n){const[r,i,o]=Qu(n?.in,e,e,t),l=Ig(i,o),c=Math.abs(dv(i,o));if(c<1)return 0;i.getMonth()===1&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-l*c);let f=Ig(i,o)===-l;NJ(r)&&c===1&&Ig(r,o)===1&&(f=!1);const h=l*(c-+f);return h===0?0:h}function DJ(e,t,n){const r=PJ(e,t)/1e3;return yD(n?.roundingMethod)(r)}function kJ(e,t){const n=St(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function IJ(e,t){const n=t?.weekStartsOn,r=St(e,t?.in),i=r.getDay(),o=(i{let r;const i=UJ[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Yb(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const FJ={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},$J={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},VJ={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},HJ={date:Yb({formats:FJ,defaultWidth:"full"}),time:Yb({formats:$J,defaultWidth:"full"}),dateTime:Yb({formats:VJ,defaultWidth:"full"})},qJ={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},GJ=(e,t,n,r)=>qJ[e];function Qd(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const l=e.defaultFormattingWidth||e.defaultWidth,c=n?.width?String(n.width):l;i=e.formattingValues[c]||e.formattingValues[l]}else{const l=e.defaultWidth,c=n?.width?String(n.width):e.defaultWidth;i=e.values[c]||e.values[l]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const YJ={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},WJ={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},KJ={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"]},ZJ={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"]},XJ={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"}},QJ={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"}},JJ=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},eee={ordinalNumber:JJ,era:Qd({values:YJ,defaultWidth:"wide"}),quarter:Qd({values:WJ,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qd({values:KJ,defaultWidth:"wide"}),day:Qd({values:ZJ,defaultWidth:"wide"}),dayPeriod:Qd({values:XJ,defaultWidth:"wide",formattingValues:QJ,defaultFormattingWidth:"wide"})};function Jd(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const l=o[0],c=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],f=Array.isArray(c)?nee(c,y=>y.test(l)):tee(c,y=>y.test(l));let h;h=e.valueCallback?e.valueCallback(f):f,h=n.valueCallback?n.valueCallback(h):h;const m=t.slice(l.length);return{value:h,rest:m}}}function tee(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function nee(e,t){for(let n=0;n{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let l=e.valueCallback?e.valueCallback(o[0]):o[0];l=n.valueCallback?n.valueCallback(l):l;const c=t.slice(i.length);return{value:l,rest:c}}}const iee=/^(\d+)(th|st|nd|rd)?/i,aee=/\d+/i,oee={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},see={any:[/^b/i,/^(a|c)/i]},lee={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},uee={any:[/1/i,/2/i,/3/i,/4/i]},cee={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},fee={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]},dee={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},hee={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]},mee={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},pee={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}},gee={ordinalNumber:ree({matchPattern:iee,parsePattern:aee,valueCallback:e=>parseInt(e,10)}),era:Jd({matchPatterns:oee,defaultMatchWidth:"wide",parsePatterns:see,defaultParseWidth:"any"}),quarter:Jd({matchPatterns:lee,defaultMatchWidth:"wide",parsePatterns:uee,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Jd({matchPatterns:cee,defaultMatchWidth:"wide",parsePatterns:fee,defaultParseWidth:"any"}),day:Jd({matchPatterns:dee,defaultMatchWidth:"wide",parsePatterns:hee,defaultParseWidth:"any"}),dayPeriod:Jd({matchPatterns:mee,defaultMatchWidth:"any",parsePatterns:pee,defaultParseWidth:"any"})},bD={code:"en-US",formatDistance:BJ,formatLong:HJ,formatRelative:GJ,localize:eee,match:gee,options:{weekStartsOn:0,firstWeekContainsDate:1}};function vee(e,t){const n=St(e,t?.in);return Ny(n,kJ(n))+1}function yee(e,t){const n=St(e,t?.in),r=+kh(n)-+EJ(n);return Math.round(r/mS)+1}function xD(e,t){const n=St(e,t?.in),r=n.getFullYear(),i=om(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=Tr(t?.in||e,0);l.setFullYear(r+1,0,o),l.setHours(0,0,0,0);const c=Bu(l,t),f=Tr(t?.in||e,0);f.setFullYear(r,0,o),f.setHours(0,0,0,0);const h=Bu(f,t);return+n>=+c?r+1:+n>=+h?r:r-1}function bee(e,t){const n=om(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=xD(e,t),o=Tr(t?.in||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),Bu(o,t)}function xee(e,t){const n=St(e,t?.in),r=+Bu(n,t)-+bee(n,t);return Math.round(r/mS)+1}function _t(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Js={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return _t(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):_t(n+1,2)},d(e,t){return _t(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return _t(e.getHours()%12||12,t.length)},H(e,t){return _t(e.getHours(),t.length)},m(e,t){return _t(e.getMinutes(),t.length)},s(e,t){return _t(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return _t(i,t.length)}},Gc={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},HO={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Js.y(e,t)},Y:function(e,t,n,r){const i=xD(e,r),o=i>0?i:1-i;if(t==="YY"){const l=o%100;return _t(l,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):_t(o,t.length)},R:function(e,t){const n=pD(e);return _t(n,t.length)},u:function(e,t){const n=e.getFullYear();return _t(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return _t(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return _t(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Js.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return _t(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=xee(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):_t(i,t.length)},I:function(e,t,n){const r=yee(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):_t(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Js.d(e,t)},D:function(e,t,n){const r=vee(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):_t(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return _t(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return _t(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return _t(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Gc.noon:r===0?i=Gc.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Gc.evening:r>=12?i=Gc.afternoon:r>=4?i=Gc.morning:i=Gc.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Js.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Js.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):_t(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):_t(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Js.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Js.s(e,t)},S:function(e,t){return Js.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return GO(r);case"XXXX":case"XX":return xu(r);case"XXXXX":case"XXX":default:return xu(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return GO(r);case"xxxx":case"xx":return xu(r);case"xxxxx":case"xxx":default:return xu(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+qO(r,":");case"OOOO":default:return"GMT"+xu(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+qO(r,":");case"zzzz":default:return"GMT"+xu(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return _t(r,t.length)},T:function(e,t,n){return _t(+e,t.length)}};function qO(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+_t(o,2)}function GO(e,t){return e%60===0?(e>0?"-":"+")+_t(Math.abs(e)/60,2):xu(e,t)}function xu(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=_t(Math.trunc(r/60),2),o=_t(r%60,2);return n+i+t+o}const YO=(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"})}},wD=(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"})}},wee=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return YO(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",YO(r,t)).replace("{{time}}",wD(i,t))},_ee={p:wD,P:wee},See=/^D+$/,Cee=/^Y+$/,Eee=["D","DD","YY","YYYY"];function Aee(e){return See.test(e)}function Tee(e){return Cee.test(e)}function Oee(e,t,n){const r=jee(e,t,n);if(console.warn(r),Eee.includes(e))throw new RangeError(r)}function jee(e,t,n){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 \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Mee=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Pee=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Lee=/^'([^]*?)'?$/,Nee=/''/g,Ree=/[a-zA-Z]/;function hv(e,t,n){const r=om(),i=r.locale??bD,o=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,l=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,c=St(e,n?.in);if(!OJ(c))throw new RangeError("Invalid time value");let f=t.match(Pee).map(m=>{const y=m[0];if(y==="p"||y==="P"){const x=_ee[y];return x(m,i.formatLong)}return m}).join("").match(Mee).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const y=m[0];if(y==="'")return{isToken:!1,value:Dee(m)};if(HO[y])return{isToken:!0,value:m};if(y.match(Ree))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return{isToken:!1,value:m}});i.localize.preprocessor&&(f=i.localize.preprocessor(c,f));const h={firstWeekContainsDate:o,weekStartsOn:l,locale:i};return f.map(m=>{if(!m.isToken)return m.value;const y=m.value;(Tee(y)||Aee(y))&&Oee(y,t,String(e));const x=HO[y[0]];return x(c,y,i.localize,h)}).join("")}function Dee(e){const t=e.match(Lee);return t?t[1].replace(Nee,"'"):e}function kee(e,t,n){const r=om(),i=n?.locale??r.locale??bD,o=2520,l=Ig(e,t);if(isNaN(l))throw new RangeError("Invalid time value");const c=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:l}),[f,h]=Qu(n?.in,...l>0?[t,e]:[e,t]),m=DJ(h,f),y=(df(h)-df(f))/1e3,x=Math.round((m-y)/60);let b;if(x<2)return x===0?i.formatDistance("lessThanXMinutes",1,c):i.formatDistance("xMinutes",x,c);if(x<45)return i.formatDistance("xMinutes",x,c);if(x<90)return i.formatDistance("aboutXHours",1,c);if(x+St(t)}function mv(e,t){return+St(e)<+St(t)}function mw(e,t){return+St(e)==+St(t)}function Bee(e,t,n){const r=+St(e,n?.in),[i,o]=[+St(t.start,n?.in),+St(t.end,n?.in)].sort((l,c)=>l-c);return r>=i&&r<=o}function pv(e,t,n){return gS(e,-t,n)}function xl(e,t){const n=()=>Tr(t?.in,NaN),i=Hee(e);let o;if(i.date){const h=qee(i.date,2);o=Gee(h.restDateString,h.year)}if(!o||isNaN(+o))return n();const l=+o;let c=0,f;if(i.time&&(c=Yee(i.time),isNaN(c)))return n();if(i.timezone){if(f=Wee(i.timezone),isNaN(f))return n()}else{const h=new Date(l+c),m=St(0,t?.in);return m.setFullYear(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),m.setHours(h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()),m}return St(l+c+f,t?.in)}const lg={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Fee=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,$ee=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Vee=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Hee(e){const t={},n=e.split(lg.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],lg.timeZoneDelimiter.test(t.date)&&(t.date=e.split(lg.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const i=lg.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function qee(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const i=r[1]?parseInt(r[1]):null,o=r[2]?parseInt(r[2]):null;return{year:o===null?i:o*100,restDateString:e.slice((r[1]||r[2]).length)}}function Gee(e,t){if(t===null)return new Date(NaN);const n=e.match(Fee);if(!n)return new Date(NaN);const r=!!n[4],i=eh(n[1]),o=eh(n[2])-1,l=eh(n[3]),c=eh(n[4]),f=eh(n[5])-1;if(r)return Jee(t,c,f)?Kee(t,c,f):new Date(NaN);{const h=new Date(0);return!Xee(t,o,l)||!Qee(t,i)?new Date(NaN):(h.setUTCFullYear(t,o,Math.max(i,l)),h)}}function eh(e){return e?parseInt(e):1}function Yee(e){const t=e.match($ee);if(!t)return NaN;const n=Wb(t[1]),r=Wb(t[2]),i=Wb(t[3]);return ete(n,r,i)?n*pS+r*mD+i*1e3:NaN}function Wb(e){return e&&parseFloat(e.replace(",","."))||0}function Wee(e){if(e==="Z")return 0;const t=e.match(Vee);if(!t)return 0;const n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return tte(r,i)?n*(r*pS+i*mD):NaN}function Kee(e,t,n){const r=new Date(0);r.setUTCFullYear(e,0,4);const i=r.getUTCDay()||7,o=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+o),r}const Zee=[31,null,31,30,31,30,31,31,30,31,30,31];function _D(e){return e%400===0||e%4===0&&e%100!==0}function Xee(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(Zee[t]||(_D(e)?29:28))}function Qee(e,t){return t>=1&&t<=(_D(e)?366:365)}function Jee(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function ete(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function tte(e,t){return t>=0&&t<=59}var zg={exports:{}},nte=zg.exports,WO;function rte(){return WO||(WO=1,function(e,t){(function(n,r){e.exports=r()})(nte,()=>(()=>{var n={873:(l,c)=>{var f,h,m=function(){var y=function(se,ue){var Y=se,k=O[ue],z=null,H=0,I=null,j=[],q={},ee=function(V,Z){z=function(ne){for(var me=new Array(ne),ie=0;ie=7&&ve(V),I==null&&(I=G(Y,k,j)),R(I,Z)},le=function(V,Z){for(var ne=-1;ne<=7;ne+=1)if(!(V+ne<=-1||H<=V+ne))for(var me=-1;me<=7;me+=1)Z+me<=-1||H<=Z+me||(z[V+ne][Z+me]=0<=ne&&ne<=6&&(me==0||me==6)||0<=me&&me<=6&&(ne==0||ne==6)||2<=ne&&ne<=4&&2<=me&&me<=4)},pe=function(){for(var V=8;V>ne&1)==1;z[Math.floor(ne/3)][ne%3+H-8-3]=me}for(ne=0;ne<18;ne+=1)me=!V&&(Z>>ne&1)==1,z[ne%3+H-8-3][Math.floor(ne/3)]=me},D=function(V,Z){for(var ne=k<<3|Z,me=P.getBCHTypeInfo(ne),ie=0;ie<15;ie+=1){var xe=!V&&(me>>ie&1)==1;ie<6?z[ie][8]=xe:ie<8?z[ie+1][8]=xe:z[H-15+ie][8]=xe}for(ie=0;ie<15;ie+=1)xe=!V&&(me>>ie&1)==1,ie<8?z[8][H-ie-1]=xe:ie<9?z[8][15-ie-1+1]=xe:z[8][15-ie-1]=xe;z[H-8][8]=!V},R=function(V,Z){for(var ne=-1,me=H-1,ie=7,xe=0,Ee=P.getMaskFunction(Z),Me=H-1;Me>0;Me-=2)for(Me==6&&(Me-=1);;){for(var Ue=0;Ue<2;Ue+=1)if(z[me][Me-Ue]==null){var ke=!1;xe>>ie&1)==1),Ee(me,Me-Ue)&&(ke=!ke),z[me][Me-Ue]=ke,(ie-=1)==-1&&(xe+=1,ie=7)}if((me+=ne)<0||H<=me){me-=ne,ne=-ne;break}}},G=function(V,Z,ne){for(var me=U.getRSBlocks(V,Z),ie=W(),xe=0;xe8*Me)throw"code length overflow. ("+ie.getLengthInBits()+">"+8*Me+")";for(ie.getLengthInBits()+4<=8*Me&&ie.put(0,4);ie.getLengthInBits()%8!=0;)ie.putBit(!1);for(;!(ie.getLengthInBits()>=8*Me||(ie.put(236,8),ie.getLengthInBits()>=8*Me));)ie.put(17,8);return function(Ue,ke){for(var Ve=0,ot=0,Ge=0,Qe=new Array(ke.length),We=new Array(ke.length),ze=0;ze=0?Ot.getAt(gt):0}}var $t=0;for(at=0;atke)&&(Ee=ke,Me=Ue)}return Me}())},q.createTableTag=function(V,Z){V=V||2;var ne="";ne+='";for(var ie=0;ie';ne+=""}return(ne+="")+"
"},q.createSvgTag=function(V,Z,ne,me){var ie={};typeof arguments[0]=="object"&&(V=(ie=arguments[0]).cellSize,Z=ie.margin,ne=ie.alt,me=ie.title),V=V||2,Z=Z===void 0?4*V:Z,(ne=typeof ne=="string"?{text:ne}:ne||{}).text=ne.text||null,ne.id=ne.text?ne.id||"qrcode-description":null,(me=typeof me=="string"?{text:me}:me||{}).text=me.text||null,me.id=me.text?me.id||"qrcode-title":null;var xe,Ee,Me,Ue,ke=q.getModuleCount()*V+2*Z,Ve="";for(Ue="l"+V+",0 0,"+V+" -"+V+",0 0,-"+V+"z ",Ve+=''+te(me.text)+"":"",Ve+=ne.text?''+te(ne.text)+"":"",Ve+='',Ve+='"},q.createDataURL=function(V,Z){V=V||2,Z=Z===void 0?4*V:Z;var ne=q.getModuleCount()*V+2*Z,me=Z,ie=ne-Z;return we(ne,ne,function(xe,Ee){if(me<=xe&&xe"};var te=function(V){for(var Z="",ne=0;ne":Z+=">";break;case"&":Z+="&";break;case'"':Z+=""";break;default:Z+=me}}return Z};return q.createASCII=function(V,Z){if((V=V||1)<2)return function(Qe){Qe=Qe===void 0?2:Qe;var We,ze,nt,Pt,at,Lt=1*q.getModuleCount()+2*Qe,Ot=Qe,gt=Lt-Qe,$t={"██":"█","█ ":"▀"," █":"▄"," ":" "},On={"██":"▀","█ ":"▀"," █":" "," ":" "},vt="";for(We=0;We=gt?On[at]:$t[at];vt+=` `}return Lt%2&&Qe>0?vt.substring(0,vt.length-Lt-1)+Array(Lt+1).join("▀"):vt.substring(0,vt.length-1)}(Z);V-=1,Z=Z===void 0?2*V:Z;var ne,me,ie,xe,Ee=q.getModuleCount()*V+2*Z,Me=Z,Ue=Ee-Z,ke=Array(V+1).join("██"),Ve=Array(V+1).join(" "),ot="",Ge="";for(ne=0;ne Shlink — The URL shortener - + diff --git a/redux-hooks/service-worker.js b/redux-hooks/service-worker.js index d7ba0b55..cf7ab198 100644 --- a/redux-hooks/service-worker.js +++ b/redux-hooks/service-worker.js @@ -1,2 +1,2 @@ try{self["workbox:core:7.2.0"]&&_()}catch{}const G=(s,...e)=>{let t=s;return e.length>0&&(t+=` :: ${JSON.stringify(e)}`),t},Q=G;class l extends Error{constructor(e,t){const n=Q(e,t);super(n),this.name=e,this.details=t}}const j=new Set;function z(s){j.add(s)}const d={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:typeof registration<"u"?registration.scope:""},E=s=>[d.prefix,s,d.suffix].filter(e=>e&&e.length>0).join("-"),J=s=>{for(const e of Object.keys(d))s(e)},x={updateDetails:s=>{J(e=>{typeof s[e]=="string"&&(d[e]=s[e])})},getGoogleAnalyticsName:s=>s||E(d.googleAnalytics),getPrecacheName:s=>s||E(d.precache),getPrefix:()=>d.prefix,getRuntimeName:s=>s||E(d.runtime),getSuffix:()=>d.suffix};function K(s,e){const t=new URL(s);for(const n of e)t.searchParams.delete(n);return t.href}async function X(s,e,t,n){const a=K(e.url,t);if(e.url===a)return s.match(e,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),i=await s.keys(e,r);for(const c of i){const o=K(c.url,t);if(a===o)return s.match(c,n)}}let m;function Y(){if(m===void 0){const s=new Response("");if("body"in s)try{new Response(s.body),m=!0}catch{m=!1}m=!1}return m}function q(s){s.then(()=>{})}class Z{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}async function ee(){for(const s of j)await s()}const te=s=>new URL(String(s),location.href).href.replace(new RegExp(`^${location.origin}`),"");function se(s){return new Promise(e=>setTimeout(e,s))}function A(s,e){const t=e();return s.waitUntil(t),t}async function ne(s,e){let t=null;if(s.url&&(t=new URL(s.url).origin),t!==self.location.origin)throw new l("cross-origin-copy-response",{origin:t});const n=s.clone(),r={headers:new Headers(n.headers),status:n.status,statusText:n.statusText},i=Y()?n.body:await n.blob();return new Response(i,r)}function ae(){self.addEventListener("activate",()=>self.clients.claim())}const re=(s,e)=>e.some(t=>s instanceof t);let O,S;function ie(){return O||(O=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function ce(){return S||(S=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const F=new WeakMap,k=new WeakMap,H=new WeakMap,D=new WeakMap,I=new WeakMap;function oe(s){const e=new Promise((t,n)=>{const a=()=>{s.removeEventListener("success",r),s.removeEventListener("error",i)},r=()=>{t(f(s.result)),a()},i=()=>{n(s.error),a()};s.addEventListener("success",r),s.addEventListener("error",i)});return e.then(t=>{t instanceof IDBCursor&&F.set(t,s)}).catch(()=>{}),I.set(e,s),e}function he(s){if(k.has(s))return;const e=new Promise((t,n)=>{const a=()=>{s.removeEventListener("complete",r),s.removeEventListener("error",i),s.removeEventListener("abort",i)},r=()=>{t(),a()},i=()=>{n(s.error||new DOMException("AbortError","AbortError")),a()};s.addEventListener("complete",r),s.addEventListener("error",i),s.addEventListener("abort",i)});k.set(s,e)}let P={get(s,e,t){if(s instanceof IDBTransaction){if(e==="done")return k.get(s);if(e==="objectStoreNames")return s.objectStoreNames||H.get(s);if(e==="store")return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return f(s[e])},set(s,e,t){return s[e]=t,!0},has(s,e){return s instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in s}};function le(s){P=s(P)}function ue(s){return s===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...t){const n=s.call(L(this),e,...t);return H.set(n,e.sort?e.sort():[e]),f(n)}:ce().includes(s)?function(...e){return s.apply(L(this),e),f(F.get(this))}:function(...e){return f(s.apply(L(this),e))}}function de(s){return typeof s=="function"?ue(s):(s instanceof IDBTransaction&&he(s),re(s,ie())?new Proxy(s,P):s)}function f(s){if(s instanceof IDBRequest)return oe(s);if(D.has(s))return D.get(s);const e=de(s);return e!==s&&(D.set(s,e),I.set(e,s)),e}const L=s=>I.get(s);function fe(s,e,{blocked:t,upgrade:n,blocking:a,terminated:r}={}){const i=indexedDB.open(s,e),c=f(i);return n&&i.addEventListener("upgradeneeded",o=>{n(f(i.result),o.oldVersion,o.newVersion,f(i.transaction),o)}),t&&i.addEventListener("blocked",o=>t(o.oldVersion,o.newVersion,o)),c.then(o=>{r&&o.addEventListener("close",()=>r()),a&&o.addEventListener("versionchange",h=>a(h.oldVersion,h.newVersion,h))}).catch(()=>{}),c}function pe(s,{blocked:e}={}){const t=indexedDB.deleteDatabase(s);return e&&t.addEventListener("blocked",n=>e(n.oldVersion,n)),f(t).then(()=>{})}const ge=["get","getKey","getAll","getAllKeys","count"],me=["put","add","delete","clear"],U=new Map;function W(s,e){if(!(s instanceof IDBDatabase&&!(e in s)&&typeof e=="string"))return;if(U.get(e))return U.get(e);const t=e.replace(/FromIndex$/,""),n=e!==t,a=me.includes(t);if(!(t in(n?IDBIndex:IDBObjectStore).prototype)||!(a||ge.includes(t)))return;const r=async function(i,...c){const o=this.transaction(i,a?"readwrite":"readonly");let h=o.store;return n&&(h=h.index(c.shift())),(await Promise.all([h[t](...c),a&&o.done]))[0]};return U.set(e,r),r}le(s=>({...s,get:(e,t,n)=>W(e,t)||s.get(e,t,n),has:(e,t)=>!!W(e,t)||s.has(e,t)}));try{self["workbox:expiration:7.2.0"]&&_()}catch{}const we="workbox-expiration",w="cache-entries",B=s=>{const e=new URL(s,location.href);return e.hash="",e.href};class ye{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(w,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&pe(this._cacheName)}async setTimestamp(e,t){e=B(e);const n={url:e,timestamp:t,cacheName:this._cacheName,id:this._getId(e)},r=(await this.getDb()).transaction(w,"readwrite",{durability:"relaxed"});await r.store.put(n),await r.done}async getTimestamp(e){const n=await(await this.getDb()).get(w,this._getId(e));return n?.timestamp}async expireEntries(e,t){const n=await this.getDb();let a=await n.transaction(w).store.index("timestamp").openCursor(null,"prev");const r=[];let i=0;for(;a;){const o=a.value;o.cacheName===this._cacheName&&(e&&o.timestamp=t?r.push(a.value):i++),a=await a.continue()}const c=[];for(const o of r)await n.delete(w,o.id),c.push(o.url);return c}_getId(e){return this._cacheName+"|"+B(e)}async getDb(){return this._db||(this._db=await fe(we,1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class _e{constructor(e,t={}){this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new ye(e)}async expireEntries(){if(this._isRunning){this._rerunRequested=!0;return}this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-this._maxAgeSeconds*1e3:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),n=await self.caches.open(this._cacheName);for(const a of t)await n.delete(a,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,q(this.expireEntries()))}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(this._maxAgeSeconds){const t=await this._timestampModel.getTimestamp(e),n=Date.now()-this._maxAgeSeconds*1e3;return t!==void 0?t{if(!r)return null;const i=this._isResponseDateFresh(r),c=this._getCacheExpiration(a);q(c.expireEntries());const o=c.updateTimestamp(n.url);if(t)try{t.waitUntil(o)}catch{}return i?r:null},this.cacheDidUpdate=async({cacheName:t,request:n})=>{const a=this._getCacheExpiration(t);await a.updateTimestamp(n.url),await a.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&z(()=>this.deleteCacheAndMetadata())}_getCacheExpiration(e){if(e===x.getRuntimeName())throw new l("expire-custom-caches-only");let t=this._cacheExpirations.get(e);return t||(t=new _e(e,this._config),this._cacheExpirations.set(e,t)),t}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);if(t===null)return!0;const n=Date.now();return t>=n-this._maxAgeSeconds*1e3}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),a=new Date(t).getTime();return isNaN(a)?null:a}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}try{self["workbox:precaching:7.2.0"]&&_()}catch{}const be="__WB_REVISION__";function Ce(s){if(!s)throw new l("add-to-cache-list-unexpected-type",{entry:s});if(typeof s=="string"){const r=new URL(s,location.href);return{cacheKey:r.href,url:r.href}}const{revision:e,url:t}=s;if(!t)throw new l("add-to-cache-list-unexpected-type",{entry:s});if(!e){const r=new URL(t,location.href);return{cacheKey:r.href,url:r.href}}const n=new URL(t,location.href),a=new URL(t,location.href);return n.searchParams.set(be,e),{cacheKey:n.href,url:a.href}}class xe{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:e,state:t})=>{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:n})=>{if(e.type==="install"&&t&&t.originalRequest&&t.originalRequest instanceof Request){const a=t.originalRequest.url;n?this.notUpdatedURLs.push(a):this.updatedURLs.push(a)}return n}}}class Ee{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:t,params:n})=>{const a=n?.cacheKey||this._precacheController.getCacheKeyForURL(t.url);return a?new Request(a,{headers:t.headers}):t},this._precacheController=e}}try{self["workbox:strategies:7.2.0"]&&_()}catch{}function b(s){return typeof s=="string"?new Request(s):s}class De{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new Z,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const n of this._plugins)this._pluginStateMap.set(n,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:t}=this;let n=b(e);if(n.mode==="navigate"&&t instanceof FetchEvent&&t.preloadResponse){const i=await t.preloadResponse;if(i)return i}const a=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const i of this.iterateCallbacks("requestWillFetch"))n=await i({request:n.clone(),event:t})}catch(i){if(i instanceof Error)throw new l("plugin-error-request-will-fetch",{thrownErrorMessage:i.message})}const r=n.clone();try{let i;i=await fetch(n,n.mode==="navigate"?void 0:this._strategy.fetchOptions);for(const c of this.iterateCallbacks("fetchDidSucceed"))i=await c({event:t,request:r,response:i});return i}catch(i){throw a&&await this.runCallbacks("fetchDidFail",{error:i,event:t,originalRequest:a.clone(),request:r.clone()}),i}}async fetchAndCachePut(e){const t=await this.fetch(e),n=t.clone();return this.waitUntil(this.cachePut(e,n)),t}async cacheMatch(e){const t=b(e);let n;const{cacheName:a,matchOptions:r}=this._strategy,i=await this.getCacheKey(t,"read"),c=Object.assign(Object.assign({},r),{cacheName:a});n=await caches.match(i,c);for(const o of this.iterateCallbacks("cachedResponseWillBeUsed"))n=await o({cacheName:a,matchOptions:r,cachedResponse:n,request:i,event:this.event})||void 0;return n}async cachePut(e,t){const n=b(e);await se(0);const a=await this.getCacheKey(n,"write");if(!t)throw new l("cache-put-with-no-response",{url:te(a.url)});const r=await this._ensureResponseSafeToCache(t);if(!r)return!1;const{cacheName:i,matchOptions:c}=this._strategy,o=await self.caches.open(i),h=this.hasCallback("cacheDidUpdate"),g=h?await X(o,a.clone(),["__WB_REVISION__"],c):null;try{await o.put(a,h?r.clone():r)}catch(u){if(u instanceof Error)throw u.name==="QuotaExceededError"&&await ee(),u}for(const u of this.iterateCallbacks("cacheDidUpdate"))await u({cacheName:i,oldResponse:g,newResponse:r.clone(),request:a,event:this.event});return!0}async getCacheKey(e,t){const n=`${e.url} | ${t}`;if(!this._cacheKeys[n]){let a=e;for(const r of this.iterateCallbacks("cacheKeyWillBeUsed"))a=b(await r({mode:t,request:a,event:this.event,params:this.params}));this._cacheKeys[n]=a}return this._cacheKeys[n]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const n of this.iterateCallbacks(e))await n(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if(typeof t[e]=="function"){const n=this._pluginStateMap.get(t);yield r=>{const i=Object.assign(Object.assign({},r),{state:n});return t[e](i)}}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){let e;for(;e=this._extendLifetimePromises.shift();)await e}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,n=!1;for(const a of this.iterateCallbacks("cacheWillUpdate"))if(t=await a({request:this.request,response:t,event:this.event})||void 0,n=!0,!t)break;return n||t&&t.status!==200&&(t=void 0),t}}class V{constructor(e={}){this.cacheName=x.getRuntimeName(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,n=typeof e.request=="string"?new Request(e.request):e.request,a="params"in e?e.params:void 0,r=new De(this,{event:t,request:n,params:a}),i=this._getResponse(r,n,t),c=this._awaitComplete(i,r,n,t);return[i,c]}async _getResponse(e,t,n){await e.runCallbacks("handlerWillStart",{event:n,request:t});let a;try{if(a=await this._handle(t,e),!a||a.type==="error")throw new l("no-response",{url:t.url})}catch(r){if(r instanceof Error){for(const i of e.iterateCallbacks("handlerDidError"))if(a=await i({error:r,event:n,request:t}),a)break}if(!a)throw r}for(const r of e.iterateCallbacks("handlerWillRespond"))a=await r({event:n,request:t,response:a});return a}async _awaitComplete(e,t,n,a){let r,i;try{r=await e}catch{}try{await t.runCallbacks("handlerDidRespond",{event:a,request:n,response:r}),await t.doneWaiting()}catch(c){c instanceof Error&&(i=c)}if(await t.runCallbacks("handlerDidComplete",{event:a,request:n,response:r,error:i}),t.destroy(),i)throw i}}class p extends V{constructor(e={}){e.cacheName=x.getPrecacheName(e.cacheName),super(e),this._fallbackToNetwork=e.fallbackToNetwork!==!1,this.plugins.push(p.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){const n=await t.cacheMatch(e);return n||(t.event&&t.event.type==="install"?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,t){let n;const a=t.params||{};if(this._fallbackToNetwork){const r=a.integrity,i=e.integrity,c=!i||i===r;n=await t.fetch(new Request(e,{integrity:e.mode!=="no-cors"?i||r:void 0})),r&&c&&e.mode!=="no-cors"&&(this._useDefaultCacheabilityPluginIfNeeded(),await t.cachePut(e,n.clone()))}else throw new l("missing-precache-entry",{cacheName:this.cacheName,url:e.url});return n}async _handleInstall(e,t){this._useDefaultCacheabilityPluginIfNeeded();const n=await t.fetch(e);if(!await t.cachePut(e,n.clone()))throw new l("bad-precaching-response",{url:e.url,status:n.status});return n}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[n,a]of this.plugins.entries())a!==p.copyRedirectedCacheableResponsesPlugin&&(a===p.defaultPrecacheCacheabilityPlugin&&(e=n),a.cacheWillUpdate&&t++);t===0?this.plugins.push(p.defaultPrecacheCacheabilityPlugin):t>1&&e!==null&&this.plugins.splice(e,1)}}p.defaultPrecacheCacheabilityPlugin={async cacheWillUpdate({response:s}){return!s||s.status>=400?null:s}};p.copyRedirectedCacheableResponsesPlugin={async cacheWillUpdate({response:s}){return s.redirected?await ne(s):s}};class Le{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:n=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new p({cacheName:x.getPrecacheName(e),plugins:[...t,new Ee({precacheController:this})],fallbackToNetwork:n}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(e){const t=[];for(const n of e){typeof n=="string"?t.push(n):n&&n.revision===void 0&&t.push(n.url);const{cacheKey:a,url:r}=Ce(n),i=typeof n!="string"&&n.revision?"reload":"default";if(this._urlsToCacheKeys.has(r)&&this._urlsToCacheKeys.get(r)!==a)throw new l("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(r),secondEntry:a});if(typeof n!="string"&&n.integrity){if(this._cacheKeysToIntegrities.has(a)&&this._cacheKeysToIntegrities.get(a)!==n.integrity)throw new l("add-to-cache-list-conflicting-integrities",{url:r});this._cacheKeysToIntegrities.set(a,n.integrity)}if(this._urlsToCacheKeys.set(r,a),this._urlsToCacheModes.set(r,i),t.length>0){const c=`Workbox is precaching URLs without revision info: ${t.join(", ")} -This is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(c)}}}install(e){return A(e,async()=>{const t=new xe;this.strategy.plugins.push(t);for(const[r,i]of this._urlsToCacheKeys){const c=this._cacheKeysToIntegrities.get(i),o=this._urlsToCacheModes.get(r),h=new Request(r,{integrity:c,cache:o,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:i},request:h,event:e}))}const{updatedURLs:n,notUpdatedURLs:a}=t;return{updatedURLs:n,notUpdatedURLs:a}})}activate(e){return A(e,async()=>{const t=await self.caches.open(this.strategy.cacheName),n=await t.keys(),a=new Set(this._urlsToCacheKeys.values()),r=[];for(const i of n)a.has(i.url)||(await t.delete(i),r.push(i.url));return{deletedURLs:r}})}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,n=this.getCacheKeyForURL(t);if(n)return(await self.caches.open(this.strategy.cacheName)).match(n)}createHandlerBoundToURL(e){const t=this.getCacheKeyForURL(e);if(!t)throw new l("non-precached-url",{url:e});return n=>(n.request=new Request(e),n.params=Object.assign({cacheKey:t},n.params),this.strategy.handle(n))}}let T;const M=()=>(T||(T=new Le),T);try{self["workbox:routing:7.2.0"]&&_()}catch{}const $="GET",C=s=>s&&typeof s=="object"?s:{handle:s};class R{constructor(e,t,n=$){this.handler=C(t),this.match=e,this.method=n}setCatchHandler(e){this.catchHandler=C(e)}}class Ue extends R{constructor(e,t,n){const a=({url:r})=>{const i=e.exec(r.href);if(i&&!(r.origin!==location.origin&&i.index!==0))return i.slice(1)};super(a,t,n)}}class Te{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",e=>{const{request:t}=e,n=this.handleRequest({request:t,event:e});n&&e.respondWith(n)})}addCacheListener(){self.addEventListener("message",e=>{if(e.data&&e.data.type==="CACHE_URLS"){const{payload:t}=e.data,n=Promise.all(t.urlsToCache.map(a=>{typeof a=="string"&&(a=[a]);const r=new Request(...a);return this.handleRequest({request:r,event:e})}));e.waitUntil(n),e.ports&&e.ports[0]&&n.then(()=>e.ports[0].postMessage(!0))}})}handleRequest({request:e,event:t}){const n=new URL(e.url,location.href);if(!n.protocol.startsWith("http"))return;const a=n.origin===location.origin,{params:r,route:i}=this.findMatchingRoute({event:t,request:e,sameOrigin:a,url:n});let c=i&&i.handler;const o=e.method;if(!c&&this._defaultHandlerMap.has(o)&&(c=this._defaultHandlerMap.get(o)),!c)return;let h;try{h=c.handle({url:n,request:e,event:t,params:r})}catch(u){h=Promise.reject(u)}const g=i&&i.catchHandler;return h instanceof Promise&&(this._catchHandler||g)&&(h=h.catch(async u=>{if(g)try{return await g.handle({url:n,request:e,event:t,params:r})}catch(N){N instanceof Error&&(u=N)}if(this._catchHandler)return this._catchHandler.handle({url:n,request:e,event:t});throw u})),h}findMatchingRoute({url:e,sameOrigin:t,request:n,event:a}){const r=this._routes.get(n.method)||[];for(const i of r){let c;const o=i.match({url:e,sameOrigin:t,request:n,event:a});if(o)return c=o,(Array.isArray(c)&&c.length===0||o.constructor===Object&&Object.keys(o).length===0||typeof o=="boolean")&&(c=void 0),{route:i,params:c}}return{}}setDefaultHandler(e,t=$){this._defaultHandlerMap.set(t,C(e))}setCatchHandler(e){this._catchHandler=C(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new l("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(t>-1)this._routes.get(e.method).splice(t,1);else throw new l("unregister-route-route-not-registered")}}let y;const ke=()=>(y||(y=new Te,y.addFetchListener(),y.addCacheListener()),y);function v(s,e,t){let n;if(typeof s=="string"){const r=new URL(s,location.href),i=({url:c})=>c.href===r.href;n=new R(i,e,t)}else if(s instanceof RegExp)n=new Ue(s,e,t);else if(typeof s=="function")n=new R(s,e,t);else if(s instanceof R)n=s;else throw new l("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});return ke().registerRoute(n),n}function Pe(s,e=[]){for(const t of[...s.searchParams.keys()])e.some(n=>n.test(t))&&s.searchParams.delete(t);return s}function*Ie(s,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:t="index.html",cleanURLs:n=!0,urlManipulation:a}={}){const r=new URL(s,location.href);r.hash="",yield r.href;const i=Pe(r,e);if(yield i.href,t&&i.pathname.endsWith("/")){const c=new URL(i.href);c.pathname+=t,yield c.href}if(n){const c=new URL(i.href);c.pathname+=".html",yield c.href}if(a){const c=a({url:r});for(const o of c)yield o.href}}class Me extends R{constructor(e,t){const n=({request:a})=>{const r=e.getURLsToCacheKeys();for(const i of Ie(a.url,t)){const c=r.get(i);if(c){const o=e.getIntegrityForCacheKey(c);return{cacheKey:c,integrity:o}}}};super(n,e.strategy)}}function ve(s){const e=M(),t=new Me(e,s);v(t)}function Ne(s){return M().createHandlerBoundToURL(s)}function Ke(s){M().precache(s)}function Ae(s,e){Ke(s),ve(e)}const Oe={cacheWillUpdate:async({response:s})=>s.status===200||s.status===0?s:null};class Se extends V{constructor(e={}){super(e),this.plugins.some(t=>"cacheWillUpdate"in t)||this.plugins.unshift(Oe)}async _handle(e,t){const n=t.fetchAndCachePut(e).catch(()=>{});t.waitUntil(n);let a=await t.cacheMatch(e),r;if(!a)try{a=await n}catch(i){i instanceof Error&&(r=i)}if(!a)throw new l("no-response",{url:e.url,error:r});return a}}const We="/shlink-web-client/redux-hooks",Be={homepage:We};ae();Ae([{"revision":null,"url":"assets/index-DQHUni9_.css"},{"revision":null,"url":"assets/index-DXlA2lIk.js"},{"revision":"c6000384e41c15ba2b45e0282e8a6475","url":"index.html"},{"revision":"f3e729bb644bebe1dcffadcbba68f1ff","url":"icons/icon-1024x1024.png"},{"revision":"cd508d134aa805268381ead58279489b","url":"icons/icon-114x114.png"},{"revision":"0812cd0c539ec3bc3880201497ef5439","url":"icons/icon-120x120.png"},{"revision":"db11b5c2a48fbba615b39792e40f4c87","url":"icons/icon-128x128.png"},{"revision":"eb6d6cdd19cac779b6d7ac97463b888e","url":"icons/icon-144x144.png"},{"revision":"6088b31c860949672f7df75fccf9a9ba","url":"icons/icon-150x150.png"},{"revision":"e6f72b1eaa19a7c204b01f5d432b8d12","url":"icons/icon-152x152.png"},{"revision":"0e45616d9a2ada37a8cc9f27a670ca31","url":"icons/icon-160x160.png"},{"revision":"d1006b686a7ab98a5620b415792a33a6","url":"icons/icon-167x167.png"},{"revision":"d42b11e07581fa319271ae71f7093811","url":"icons/icon-16x16.png"},{"revision":"78f75b82e4ce73706359d19cb87c3b00","url":"icons/icon-180x180.png"},{"revision":"a536b5cee1e4a64fd54fc4be7b77efcf","url":"icons/icon-192x192.png"},{"revision":"9e994d55a0485b6bbaad7e63b13a0ef5","url":"icons/icon-196x196.png"},{"revision":"786e390718d25939056e8ef85e264d8a","url":"icons/icon-228x228.png"},{"revision":"556d9b9e027c4411745496790753cd73","url":"icons/icon-24x24.png"},{"revision":"7642a0a1530b73e8818bceceb3d3e7e2","url":"icons/icon-256x256.png"},{"revision":"06d7a4a92102470e88880d42920c7549","url":"icons/icon-310x310.png"},{"revision":"7fcbe3894492fb7f62a317ddd99a28d5","url":"icons/icon-32x32.png"},{"revision":"5a8a86ced62f17062326ae85d5ff352f","url":"icons/icon-384x384.png"},{"revision":"45146cbf5554683533638cb5d8b017ae","url":"icons/icon-40x40.png"},{"revision":"903d05ccefb480c98cd4cf2e484bd663","url":"icons/icon-48x48.png"},{"revision":"f25bdd85d754463f79f8ef441a035933","url":"icons/icon-512x512.png"},{"revision":"60f05c206db3360a51bef6105de2b995","url":"icons/icon-60x60.png"},{"revision":"492762bfada55a219fc687f2549ed05a","url":"icons/icon-64x64.png"},{"revision":"faa08e0d1df851afc410e939cc7bcbc4","url":"icons/icon-72x72.png"},{"revision":"6ae3db0007861108aa3db4e35450fe16","url":"icons/icon-76x76.png"},{"revision":"a5602a4acdef243f27b9acc94f49e9c2","url":"icons/icon-96x96.png"},{"revision":"01f09dc86c547f7d122d22dd2adb4f57","url":"manifest.json"}]);const je=new RegExp("/[^/?]+\\.[^/]+$");v(({request:s,url:e})=>!(s.mode!=="navigate"||e.pathname.startsWith("/_")||e.pathname.match(je)),Ne(`${Be.homepage}/index.html`));v(({url:s})=>s.origin===self.location.origin&&s.pathname.endsWith(".png"),new Se({cacheName:"images",plugins:[new Re({maxEntries:50})]}));self.addEventListener("message",s=>{s.data&&s.data.type==="SKIP_WAITING"&&self.skipWaiting()}); +This is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(c)}}}install(e){return A(e,async()=>{const t=new xe;this.strategy.plugins.push(t);for(const[r,i]of this._urlsToCacheKeys){const c=this._cacheKeysToIntegrities.get(i),o=this._urlsToCacheModes.get(r),h=new Request(r,{integrity:c,cache:o,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:i},request:h,event:e}))}const{updatedURLs:n,notUpdatedURLs:a}=t;return{updatedURLs:n,notUpdatedURLs:a}})}activate(e){return A(e,async()=>{const t=await self.caches.open(this.strategy.cacheName),n=await t.keys(),a=new Set(this._urlsToCacheKeys.values()),r=[];for(const i of n)a.has(i.url)||(await t.delete(i),r.push(i.url));return{deletedURLs:r}})}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,n=this.getCacheKeyForURL(t);if(n)return(await self.caches.open(this.strategy.cacheName)).match(n)}createHandlerBoundToURL(e){const t=this.getCacheKeyForURL(e);if(!t)throw new l("non-precached-url",{url:e});return n=>(n.request=new Request(e),n.params=Object.assign({cacheKey:t},n.params),this.strategy.handle(n))}}let T;const M=()=>(T||(T=new Le),T);try{self["workbox:routing:7.2.0"]&&_()}catch{}const $="GET",C=s=>s&&typeof s=="object"?s:{handle:s};class R{constructor(e,t,n=$){this.handler=C(t),this.match=e,this.method=n}setCatchHandler(e){this.catchHandler=C(e)}}class Ue extends R{constructor(e,t,n){const a=({url:r})=>{const i=e.exec(r.href);if(i&&!(r.origin!==location.origin&&i.index!==0))return i.slice(1)};super(a,t,n)}}class Te{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",e=>{const{request:t}=e,n=this.handleRequest({request:t,event:e});n&&e.respondWith(n)})}addCacheListener(){self.addEventListener("message",e=>{if(e.data&&e.data.type==="CACHE_URLS"){const{payload:t}=e.data,n=Promise.all(t.urlsToCache.map(a=>{typeof a=="string"&&(a=[a]);const r=new Request(...a);return this.handleRequest({request:r,event:e})}));e.waitUntil(n),e.ports&&e.ports[0]&&n.then(()=>e.ports[0].postMessage(!0))}})}handleRequest({request:e,event:t}){const n=new URL(e.url,location.href);if(!n.protocol.startsWith("http"))return;const a=n.origin===location.origin,{params:r,route:i}=this.findMatchingRoute({event:t,request:e,sameOrigin:a,url:n});let c=i&&i.handler;const o=e.method;if(!c&&this._defaultHandlerMap.has(o)&&(c=this._defaultHandlerMap.get(o)),!c)return;let h;try{h=c.handle({url:n,request:e,event:t,params:r})}catch(u){h=Promise.reject(u)}const g=i&&i.catchHandler;return h instanceof Promise&&(this._catchHandler||g)&&(h=h.catch(async u=>{if(g)try{return await g.handle({url:n,request:e,event:t,params:r})}catch(N){N instanceof Error&&(u=N)}if(this._catchHandler)return this._catchHandler.handle({url:n,request:e,event:t});throw u})),h}findMatchingRoute({url:e,sameOrigin:t,request:n,event:a}){const r=this._routes.get(n.method)||[];for(const i of r){let c;const o=i.match({url:e,sameOrigin:t,request:n,event:a});if(o)return c=o,(Array.isArray(c)&&c.length===0||o.constructor===Object&&Object.keys(o).length===0||typeof o=="boolean")&&(c=void 0),{route:i,params:c}}return{}}setDefaultHandler(e,t=$){this._defaultHandlerMap.set(t,C(e))}setCatchHandler(e){this._catchHandler=C(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new l("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(t>-1)this._routes.get(e.method).splice(t,1);else throw new l("unregister-route-route-not-registered")}}let y;const ke=()=>(y||(y=new Te,y.addFetchListener(),y.addCacheListener()),y);function v(s,e,t){let n;if(typeof s=="string"){const r=new URL(s,location.href),i=({url:c})=>c.href===r.href;n=new R(i,e,t)}else if(s instanceof RegExp)n=new Ue(s,e,t);else if(typeof s=="function")n=new R(s,e,t);else if(s instanceof R)n=s;else throw new l("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});return ke().registerRoute(n),n}function Pe(s,e=[]){for(const t of[...s.searchParams.keys()])e.some(n=>n.test(t))&&s.searchParams.delete(t);return s}function*Ie(s,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:t="index.html",cleanURLs:n=!0,urlManipulation:a}={}){const r=new URL(s,location.href);r.hash="",yield r.href;const i=Pe(r,e);if(yield i.href,t&&i.pathname.endsWith("/")){const c=new URL(i.href);c.pathname+=t,yield c.href}if(n){const c=new URL(i.href);c.pathname+=".html",yield c.href}if(a){const c=a({url:r});for(const o of c)yield o.href}}class Me extends R{constructor(e,t){const n=({request:a})=>{const r=e.getURLsToCacheKeys();for(const i of Ie(a.url,t)){const c=r.get(i);if(c){const o=e.getIntegrityForCacheKey(c);return{cacheKey:c,integrity:o}}}};super(n,e.strategy)}}function ve(s){const e=M(),t=new Me(e,s);v(t)}function Ne(s){return M().createHandlerBoundToURL(s)}function Ke(s){M().precache(s)}function Ae(s,e){Ke(s),ve(e)}const Oe={cacheWillUpdate:async({response:s})=>s.status===200||s.status===0?s:null};class Se extends V{constructor(e={}){super(e),this.plugins.some(t=>"cacheWillUpdate"in t)||this.plugins.unshift(Oe)}async _handle(e,t){const n=t.fetchAndCachePut(e).catch(()=>{});t.waitUntil(n);let a=await t.cacheMatch(e),r;if(!a)try{a=await n}catch(i){i instanceof Error&&(r=i)}if(!a)throw new l("no-response",{url:e.url,error:r});return a}}const We="/shlink-web-client/redux-hooks",Be={homepage:We};ae();Ae([{"revision":null,"url":"assets/index-BaNzopln.js"},{"revision":null,"url":"assets/index-DQHUni9_.css"},{"revision":"720f32e31f08c95a4ae0a1829af6fccf","url":"index.html"},{"revision":"f3e729bb644bebe1dcffadcbba68f1ff","url":"icons/icon-1024x1024.png"},{"revision":"cd508d134aa805268381ead58279489b","url":"icons/icon-114x114.png"},{"revision":"0812cd0c539ec3bc3880201497ef5439","url":"icons/icon-120x120.png"},{"revision":"db11b5c2a48fbba615b39792e40f4c87","url":"icons/icon-128x128.png"},{"revision":"eb6d6cdd19cac779b6d7ac97463b888e","url":"icons/icon-144x144.png"},{"revision":"6088b31c860949672f7df75fccf9a9ba","url":"icons/icon-150x150.png"},{"revision":"e6f72b1eaa19a7c204b01f5d432b8d12","url":"icons/icon-152x152.png"},{"revision":"0e45616d9a2ada37a8cc9f27a670ca31","url":"icons/icon-160x160.png"},{"revision":"d1006b686a7ab98a5620b415792a33a6","url":"icons/icon-167x167.png"},{"revision":"d42b11e07581fa319271ae71f7093811","url":"icons/icon-16x16.png"},{"revision":"78f75b82e4ce73706359d19cb87c3b00","url":"icons/icon-180x180.png"},{"revision":"a536b5cee1e4a64fd54fc4be7b77efcf","url":"icons/icon-192x192.png"},{"revision":"9e994d55a0485b6bbaad7e63b13a0ef5","url":"icons/icon-196x196.png"},{"revision":"786e390718d25939056e8ef85e264d8a","url":"icons/icon-228x228.png"},{"revision":"556d9b9e027c4411745496790753cd73","url":"icons/icon-24x24.png"},{"revision":"7642a0a1530b73e8818bceceb3d3e7e2","url":"icons/icon-256x256.png"},{"revision":"06d7a4a92102470e88880d42920c7549","url":"icons/icon-310x310.png"},{"revision":"7fcbe3894492fb7f62a317ddd99a28d5","url":"icons/icon-32x32.png"},{"revision":"5a8a86ced62f17062326ae85d5ff352f","url":"icons/icon-384x384.png"},{"revision":"45146cbf5554683533638cb5d8b017ae","url":"icons/icon-40x40.png"},{"revision":"903d05ccefb480c98cd4cf2e484bd663","url":"icons/icon-48x48.png"},{"revision":"f25bdd85d754463f79f8ef441a035933","url":"icons/icon-512x512.png"},{"revision":"60f05c206db3360a51bef6105de2b995","url":"icons/icon-60x60.png"},{"revision":"492762bfada55a219fc687f2549ed05a","url":"icons/icon-64x64.png"},{"revision":"faa08e0d1df851afc410e939cc7bcbc4","url":"icons/icon-72x72.png"},{"revision":"6ae3db0007861108aa3db4e35450fe16","url":"icons/icon-76x76.png"},{"revision":"a5602a4acdef243f27b9acc94f49e9c2","url":"icons/icon-96x96.png"},{"revision":"01f09dc86c547f7d122d22dd2adb4f57","url":"manifest.json"}]);const je=new RegExp("/[^/?]+\\.[^/]+$");v(({request:s,url:e})=>!(s.mode!=="navigate"||e.pathname.startsWith("/_")||e.pathname.match(je)),Ne(`${Be.homepage}/index.html`));v(({url:s})=>s.origin===self.location.origin&&s.pathname.endsWith(".png"),new Se({cacheName:"images",plugins:[new Re({maxEntries:50})]}));self.addEventListener("message",s=>{s.data&&s.data.type==="SKIP_WAITING"&&self.skipWaiting()});