FileMaster
Search
Toggle Dark Mode
Home
/
.
/
wp-content
/
plugins
/
sureforms
/
assets
/
build
Edit File: payments.js
/*! For license information please see payments.js.LICENSE.txt */ (()=>{var e,t,n={2694:(e,t,n)=>{"use strict";var r=n(6925);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},21020:(e,t,n)=>{"use strict";var r=n(51609),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:i,_owner:s.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},51609:e=>{"use strict";e.exports=window.React},74848:(e,t,n)=>{"use strict";e.exports=n(21020)}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return n[e](i,i.exports,o),i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var i=Object.create(null);o.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&r&&n;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>n[e]));return a.default=()=>n,o.d(i,a),i},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{"use strict";var e={};o.r(e),o.d(e,{Button:()=>Bg,CaptionLabel:()=>Yg,Chevron:()=>Qg,Day:()=>Vg,DayButton:()=>Wg,Dropdown:()=>Hg,DropdownNav:()=>qg,Footer:()=>$g,Month:()=>Gg,MonthCaption:()=>Kg,MonthGrid:()=>Zg,Months:()=>Xg,MonthsDropdown:()=>Jg,Nav:()=>ey,NextMonthButton:()=>ty,Option:()=>ny,PreviousMonthButton:()=>ry,Root:()=>oy,Select:()=>iy,Week:()=>ay,WeekNumber:()=>cy,WeekNumberHeader:()=>uy,Weekday:()=>sy,Weekdays:()=>ly,Weeks:()=>dy,YearsDropdown:()=>fy});var t={};o.r(t),o.d(t,{formatCaption:()=>hy,formatDay:()=>gy,formatMonthCaption:()=>py,formatMonthDropdown:()=>yy,formatWeekNumber:()=>vy,formatWeekNumberHeader:()=>by,formatWeekdayName:()=>wy,formatYearCaption:()=>My,formatYearDropdown:()=>xy});var n={};o.r(n),o.d(n,{labelCaption:()=>Ny,labelDay:()=>Dy,labelDayButton:()=>jy,labelGrid:()=>Ey,labelGridcell:()=>ky,labelMonthDropdown:()=>Sy,labelNav:()=>Ty,labelNext:()=>Cy,labelPrevious:()=>Ry,labelWeekNumber:()=>Ay,labelWeekNumberHeader:()=>Iy,labelWeekday:()=>Oy,labelYearDropdown:()=>_y});const r=window.wp.domReady;var i=o.n(r);const a=window.wp.element;let s=1;const l=new class{#e;#t;constructor(){this.#e=[],this.#t=[]}subscribe(e){return this.#t.push(e),()=>{this.#t=this.#t.filter((t=>t!==e))}}publish(e){this.#t.forEach((t=>t(e)))}add(e){this.#e.push(e),this.publish(e)}remove(e){return this.#e=this.#e.filter((t=>t.id!==e)),e}create(e){const{id:t,message:n="",jsx:r,...o}=e;if(!n&&"function"!=typeof r)return;const i="number"==typeof t?t:s++;return this.#e.find((e=>e.id===i))&&(this.#e=this.#e.map((e=>e.id===i?(this.publish({...e,title:n,jsx:r,...o}),{...e,title:n,jsx:r,...o}):e))),this.add({id:i,title:n,jsx:r,...o}),i}update(e,t){const{render:n}=t;let r=t;switch(typeof n){case"function":r={jsx:n,...t};break;case"string":r={title:n,...t}}this.#e=this.#e.map((t=>t.id===e?(this.publish({...t,...r}),{...t,...r}):t))}dismiss(e){return e||this.#e.forEach((e=>this.#t.forEach((t=>t({id:e.id,dismiss:!0}))))),this.#t.forEach((t=>t({id:e,dismiss:!0}))),e}history(){return this.#e}default(e="",t={}){return this.create({message:e,type:"neutral",...t})}success(e="",t={}){return this.create({message:e,type:"success",...t})}error(e="",t={}){return this.create({message:e,type:"error",...t})}warning(e="",t={}){return this.create({message:e,type:"warning",...t})}info(e="",t={}){return this.create({message:e,type:"info",...t})}custom(e,t={}){return this.create({jsx:e,type:"custom",...t})}},c=Object.seal(Object.assign(((e,t)=>l.default(e,t)),{success:l.success.bind(l),error:l.error.bind(l),warning:l.warning.bind(l),info:l.info.bind(l),custom:l.custom.bind(l),dismiss:l.dismiss.bind(l),update:l.update.bind(l)},{getHistory:l.history.bind(l)}));var u=o(74848),d=o(51609),f=o.t(d,2);const m=(...e)=>e.filter(((e,t,n)=>Boolean(e)&&n.indexOf(e)===t)).join(" ");var h={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const p=(0,d.forwardRef)((({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>(0,d.createElement)("svg",{ref:l,...h,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:m("lucide",o),...s},[...a.map((([e,t])=>(0,d.createElement)(e,t))),...Array.isArray(i)?i:[i]]))),g=(e,t)=>{const n=(0,d.forwardRef)((({className:n,...r},o)=>{return(0,d.createElement)(p,{ref:o,iconNode:t,className:m(`lucide-${i=e,i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,n),...r});var i}));return n.displayName=`${e}`,n},y=g("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),v=e=>{const t=M(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),b(n,t)||x(e)},getConflictingClassGroupIds:(e,t)=>{const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}},b=(e,t)=>{if(0===e.length)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?b(e.slice(1),r):void 0;if(o)return o;if(0===t.validators.length)return;const i=e.join("-");return t.validators.find((({validator:e})=>e(i)))?.classGroupId},w=/^\[(.+)\]$/,x=e=>{if(w.test(e)){const t=w.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},M=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return j(Object.entries(e.classGroups),n).forEach((([e,n])=>{E(n,r,e,t)})),r},E=(e,t,n,r)=>{e.forEach((e=>{if("string"!=typeof e){if("function"==typeof e)return k(e)?void E(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach((([e,o])=>{E(o,N(t,e),n,r)}))}else(""===e?t:N(t,e)).classGroupId=n}))},N=(e,t)=>{let n=e;return t.split("-").forEach((e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)})),n},k=e=>e.isThemeGetter,j=(e,t)=>t?e.map((([e,n])=>[e,n.map((e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map((([e,n])=>[t+e,n]))):e))])):e,D=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):o(e,t)}}},T=e=>{const{separator:t,experimentalParseClassName:n}=e,r=1===t.length,o=t[0],i=t.length,a=e=>{const n=[];let a,s=0,l=0;for(let c=0;c<e.length;c++){let u=e[c];if(0===s){if(u===o&&(r||e.slice(c,c+i)===t)){n.push(e.slice(l,c)),l=c+i;continue}if("/"===u){a=c;continue}}"["===u?s++:"]"===u&&s--}const c=0===n.length?e:e.substring(l),u=c.startsWith("!");return{modifiers:n,hasImportantModifier:u,baseClassName:u?c.substring(1):c,maybePostfixModifierPosition:a&&a>l?a-l:void 0}};return n?e=>n({className:e,parseClassName:a}):a},S=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach((e=>{"["===e[0]?(t.push(...n.sort(),e),n=[]):n.push(e)})),t.push(...n.sort()),t},C=/\s+/;function R(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=O(e))&&(r&&(r+=" "),r+=t);return r}const O=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=O(e[r]))&&(n&&(n+=" "),n+=t);return n};function A(e,...t){let n,r,o,i=function(s){const l=t.reduce(((e,t)=>t(e)),e());return n=(e=>({cache:D(e.cacheSize),parseClassName:T(e),...v(e)}))(l),r=n.cache.get,o=n.cache.set,i=a,a(s)};function a(e){const t=r(e);if(t)return t;const i=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],a=e.trim().split(C);let s="";for(let e=a.length-1;e>=0;e-=1){const t=a[e],{modifiers:l,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:d}=n(t);let f=Boolean(d),m=r(f?u.substring(0,d):u);if(!m){if(!f){s=t+(s.length>0?" "+s:s);continue}if(m=r(u),!m){s=t+(s.length>0?" "+s:s);continue}f=!1}const h=S(l).join(":"),p=c?h+"!":h,g=p+m;if(i.includes(g))continue;i.push(g);const y=o(m,f);for(let e=0;e<y.length;++e){const t=y[e];i.push(p+t)}s=t+(s.length>0?" "+s:s)}return s})(e,n);return o(e,i),i}return function(){return i(R.apply(null,arguments))}}const I=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},_=/^\[(?:([a-z-]+):)?(.+)\]$/i,P=/^\d+\/\d+$/,L=new Set(["px","full","screen"]),z=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,F=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,U=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,B=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Y=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Q=e=>W(e)||L.has(e)||P.test(e),V=e=>oe(e,"length",ie),W=e=>Boolean(e)&&!Number.isNaN(Number(e)),H=e=>oe(e,"number",W),q=e=>Boolean(e)&&Number.isInteger(Number(e)),$=e=>e.endsWith("%")&&W(e.slice(0,-1)),G=e=>_.test(e),K=e=>z.test(e),Z=new Set(["length","size","percentage"]),X=e=>oe(e,Z,ae),J=e=>oe(e,"position",ae),ee=new Set(["image","url"]),te=e=>oe(e,ee,le),ne=e=>oe(e,"",se),re=()=>!0,oe=(e,t,n)=>{const r=_.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},ie=e=>F.test(e)&&!U.test(e),ae=()=>!1,se=e=>B.test(e),le=e=>Y.test(e),ce=(Symbol.toStringTag,()=>{const e=I("colors"),t=I("spacing"),n=I("blur"),r=I("brightness"),o=I("borderColor"),i=I("borderRadius"),a=I("borderSpacing"),s=I("borderWidth"),l=I("contrast"),c=I("grayscale"),u=I("hueRotate"),d=I("invert"),f=I("gap"),m=I("gradientColorStops"),h=I("gradientColorStopPositions"),p=I("inset"),g=I("margin"),y=I("opacity"),v=I("padding"),b=I("saturate"),w=I("scale"),x=I("sepia"),M=I("skew"),E=I("space"),N=I("translate"),k=()=>["auto",G,t],j=()=>[G,t],D=()=>["",Q,V],T=()=>["auto",W,G],S=()=>["","0",G],C=()=>[W,G];return{cacheSize:500,separator:":",theme:{colors:[re],spacing:[Q,V],blur:["none","",K,G],brightness:C(),borderColor:[e],borderRadius:["none","","full",K,G],borderSpacing:j(),borderWidth:D(),contrast:C(),grayscale:S(),hueRotate:C(),invert:S(),gap:j(),gradientColorStops:[e],gradientColorStopPositions:[$,V],inset:k(),margin:k(),opacity:C(),padding:j(),saturate:C(),scale:C(),sepia:S(),skew:C(),space:j(),translate:j()},classGroups:{aspect:[{aspect:["auto","square","video",G]}],container:["container"],columns:[{columns:[K]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",G]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",q,G]}],basis:[{basis:k()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",G]}],grow:[{grow:S()}],shrink:[{shrink:S()}],order:[{order:["first","last","none",q,G]}],"grid-cols":[{"grid-cols":[re]}],"col-start-end":[{col:["auto",{span:["full",q,G]},G]}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":[re]}],"row-start-end":[{row:["auto",{span:[q,G]},G]}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",G]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",G]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",G,t]}],"min-w":[{"min-w":[G,t,"min","max","fit"]}],"max-w":[{"max-w":[G,t,"none","full","min","max","fit","prose",{screen:[K]},K]}],h:[{h:[G,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[G,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[G,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[G,t,"auto","min","max","fit"]}],"font-size":[{text:["base",K,V]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",H]}],"font-family":[{font:[re]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",G]}],"line-clamp":[{"line-clamp":["none",W,H]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Q,G]}],"list-image":[{"list-image":["none",G]}],"list-style-type":[{list:["none","disc","decimal",G]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Q,V]}],"underline-offset":[{"underline-offset":["auto",Q,G]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",G]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",G]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",J]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",X]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},te]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[Q,G]}],"outline-w":[{outline:[Q,V]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[Q,V]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",K,ne]}],"shadow-color":[{shadow:[re]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",K,G]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[b]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",G]}],duration:[{duration:C()}],ease:[{ease:["linear","in","out","in-out",G]}],delay:[{delay:C()}],animate:[{animate:["none","spin","ping","pulse","bounce",G]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[q,G]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",G]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",G]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",G]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Q,V,H]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}),ue=A(ce);function de(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=de(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function fe(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=de(e))&&(r&&(r+=" "),r+=t);return r}const me=fe,he=(...e)=>ue(fe(...e)),pe=(...e)=>(...t)=>e.filter(Boolean).forEach((e=>e?.(...t))),ge=e=>{const t={0:"gap-0",xxs:"gap-1",xs:"gap-2",sm:"gap-3",md:"gap-4",lg:"gap-5",xl:"gap-6","2xl":"gap-8"};return t[e]||t.md},ye=g("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),ve=g("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),be=g("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),we=g("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),xe=(0,d.forwardRef)(((e,t)=>{const{variant:n="primary",size:r="md",type:o="button",tag:i="button",className:a,children:s,disabled:l=!1,destructive:c=!1,icon:f=null,iconPosition:m="left",loading:h=!1,...p}=e,g=c&&"focus:ring-focus-error",y=h?"opacity-50 disabled:cursor-not-allowed":"",v={primary:"text-text-on-color bg-button-primary hover:bg-button-primary-hover outline-button-primary hover:outline-button-primary-hover shadow-xs disabled:shadow-none focus:shadow-none disabled:bg-button-disabled disabled:outline-button-disabled",secondary:"text-text-on-color bg-button-secondary hover:bg-button-secondary-hover outline-button-secondary hover:outline-button-secondary-hover shadow-xs focus:shadow-none disabled:shadow-none disabled:bg-button-disabled disabled:outline-button-disabled",outline:"text-button-tertiary-color outline-border-subtle bg-button-tertiary shadow-sm focus:shadow-none hover:bg-button-tertiary-hover hover:outline-border-subtle disabled:bg-button-tertiary disabled:outline-border-disabled",ghost:"text-text-primary bg-transparent outline-transparent hover:bg-button-tertiary-hover",link:"outline-none text-link-primary bg-transparent hover:text-link-primary-hover hover:underline p-0 border-0 leading-none"}[n],b=c&&!l?{primary:"bg-button-danger hover:bg-button-danger-hover outline-button-danger hover:outline-button-danger-hover",secondary:"bg-button-danger hover:bg-button-danger-hover outline-button-danger hover:outline-button-danger-hover",outline:"text-button-danger outline outline-1 outline-button-danger hover:outline-button-danger bg-button-tertiary hover:bg-field-background-error",ghost:"text-button-danger hover:bg-field-background-error",link:"text-button-danger hover:text-button-danger-secondary"}[n]:"",w={xs:"p-1 rounded [&>svg]:size-4",sm:"p-2 rounded [&>svg]:size-4 gap-0.5",md:"p-2.5 rounded-md text-sm [&>svg]:size-5 gap-1",lg:"p-3 rounded-lg text-base [&>svg]:size-6 gap-1"}[r];let x,M=null,E="";return f&&(E="flex items-center justify-center","left"===m?x=f:M=f),(0,u.jsxs)(i,{ref:t,type:o,className:he(E,"outline outline-1 border-none cursor-pointer transition-colors duration-300 ease-in-out text-xs font-semibold focus:ring-2 focus:ring-toggle-on focus:ring-offset-2 disabled:text-text-disabled",w,v,b,g,y,{"cursor-default":l},a),disabled:l,"aria-disabled":l,...p,children:[(0,u.jsx)(d.Fragment,{children:x},"left-icon"),s?(0,u.jsx)("span",{className:"px-1",children:s}):null,(0,u.jsx)(d.Fragment,{children:M},"right-icon")]})}));xe.displayName="Button";const Me="light",Ee="neutral",Ne=({icon:e,theme:t=Me,variant:n=Ee})=>{const r="[&>svg]:h-5 [&>svg]:w-5",o=(({theme:e=Me,variant:t=Ee})=>{let n="light"===e?"text-icon-secondary":"text-icon-inverse";return n={info:"light"===e?"text-support-info":"text-support-info-inverse",success:"light"===e?"text-support-success":"text-support-success-inverse",warning:"light"===e?"text-support-warning":"text-support-warning-inverse",error:"light"===e?"text-support-error":"text-support-error-inverse"}[t]||n,n})({theme:t,variant:n});if(e&&(0,d.isValidElement)(e))return(0,d.cloneElement)(e,{className:he(r,o,e?.props?.className??"")});const i={neutral:(0,u.jsx)(ye,{className:he(r,o)}),info:(0,u.jsx)(ye,{className:he(r,o)}),success:(0,u.jsx)(ve,{className:he(r,o)}),warning:(0,u.jsx)(be,{className:he(r,o)}),error:(0,u.jsx)(we,{className:he(r,o)})};return i[n]||i.neutral},ke=({actionType:e="button",onAction:t=()=>{},actionLabel:n="",theme:r=Me})=>{const o="focus:ring-0 focus:ring-offset-0 ring-offset-0 focus:outline-none";let i="text-button-primary border-button-primary hover:border-button-primary hover:text-button-primary-hover";switch("dark"===r&&(i="text-text-inverse border-text-inverse hover:border-text-inverse hover:text-text-inverse"),e){case"button":return(0,u.jsx)(xe,{variant:"outline",size:"xs",onClick:t,className:he("rounded",o,i,"dark"===r?"bg-transparent hover:bg-transparent":"bg-white hover:bg-white"),children:n});case"link":return(0,u.jsx)(xe,{variant:"link",size:"xs",onClick:t,className:he(o,i),children:n});default:return null}},je=({theme:e=Me,title:t="",inline:n=!1})=>t?(0,u.jsx)("span",{className:he("block",{light:"text-text-primary",dark:"text-text-inverse"}[e],"text-sm leading-5 font-semibold",n?"inline":"block"),children:t}):null,De=({theme:e=Me,content:t="",inline:n=!1})=>t?(0,u.jsx)("span",{className:he({light:"text-text-primary",dark:"text-text-inverse"}[e],"block text-sm [&_*]:text-sm leading-5 [&_*]:leading-5 font-normal [word-break:break-word]",n?"inline":"block"),children:t}):null,Te=(...e)=>t=>{e.forEach((e=>{"function"==typeof e?e(t):e&&(e.current=t)}))},Se={"top-left":"top-0 bottom-0 left-0 justify-start items-start","top-right":"top-0 bottom-0 right-0 justify-start items-end","bottom-left":"top-0 bottom-0 left-0 justify-end items-start","bottom-right":"top-0 bottom-0 right-0 justify-end items-end"},Ce={neutral:"border-alert-border-neutral bg-alert-background-neutral",custom:"border-alert-border-neutral bg-alert-background-neutral",info:"border-alert-border-info bg-alert-background-info",success:"border-alert-border-green bg-alert-background-green",warning:"border-alert-border-warning bg-alert-background-warning",error:"border-alert-border-danger bg-alert-background-danger"},Re="bg-background-inverse border-background-inverse",Oe={light:"text-icon-secondary",dark:"text-icon-inverse"},Ae=window.ReactDOM,Ie=(0,d.createContext)({});function _e(e){const t=(0,d.useRef)(null);return null===t.current&&(t.current=e()),t.current}const Pe=(0,d.createContext)(null),Le=(0,d.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class ze extends d.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Fe({children:e,isPresent:t}){const n=(0,d.useId)(),r=(0,d.useRef)(null),o=(0,d.useRef)({width:0,height:0,top:0,left:0}),{nonce:i}=(0,d.useContext)(Le);return(0,d.useInsertionEffect)((()=>{const{width:e,height:a,top:s,left:l}=o.current;if(t||!r.current||!e||!a)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return i&&(c.nonce=i),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`\n [data-motion-pop-id="${n}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${a}px !important;\n top: ${s}px !important;\n left: ${l}px !important;\n }\n `),()=>{document.head.removeChild(c)}}),[t]),(0,u.jsx)(ze,{isPresent:t,childRef:r,sizeRef:o,children:d.cloneElement(e,{ref:r})})}const Ue=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a})=>{const s=_e(Be),l=(0,d.useId)(),c=(0,d.useCallback)((e=>{s.set(e,!0);for(const e of s.values())if(!e)return;r&&r()}),[s,r]),f=(0,d.useMemo)((()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:c,register:e=>(s.set(e,!1),()=>s.delete(e))})),i?[Math.random(),c]:[n,c]);return(0,d.useMemo)((()=>{s.forEach(((e,t)=>s.set(t,!1)))}),[n]),d.useEffect((()=>{!n&&!s.size&&r&&r()}),[n]),"popLayout"===a&&(e=(0,u.jsx)(Fe,{isPresent:n,children:e})),(0,u.jsx)(Pe.Provider,{value:f,children:e})};function Be(){return new Map}function Ye(e=!0){const t=(0,d.useContext)(Pe);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=(0,d.useId)();(0,d.useEffect)((()=>{e&&o(i)}),[e]);const a=(0,d.useCallback)((()=>e&&r&&r(i)),[i,r,e]);return!n&&r?[!1,a]:[!0]}const Qe=e=>e.key||"";function Ve(e){const t=[];return d.Children.forEach(e,(e=>{(0,d.isValidElement)(e)&&t.push(e)})),t}const We="undefined"!=typeof window,He=We?d.useLayoutEffect:d.useEffect,qe=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1})=>{const[s,l]=Ye(a),c=(0,d.useMemo)((()=>Ve(e)),[e]),f=a&&!s?[]:c.map(Qe),m=(0,d.useRef)(!0),h=(0,d.useRef)(c),p=_e((()=>new Map)),[g,y]=(0,d.useState)(c),[v,b]=(0,d.useState)(c);He((()=>{m.current=!1,h.current=c;for(let e=0;e<v.length;e++){const t=Qe(v[e]);f.includes(t)?p.delete(t):!0!==p.get(t)&&p.set(t,!1)}}),[v,f.length,f.join("-")]);const w=[];if(c!==g){let e=[...c];for(let t=0;t<v.length;t++){const n=v[t],r=Qe(n);f.includes(r)||(e.splice(t,0,n),w.push(n))}return"wait"===i&&w.length&&(e=w),b(Ve(e)),void y(c)}const{forceRender:x}=(0,d.useContext)(Ie);return(0,u.jsx)(u.Fragment,{children:v.map((e=>{const d=Qe(e),g=!(a&&!s)&&(c===v||f.includes(d));return(0,u.jsx)(Ue,{isPresent:g,initial:!(m.current&&!n)&&void 0,custom:g?void 0:t,presenceAffectsLayout:o,mode:i,onExitComplete:g?void 0:()=>{if(!p.has(d))return;p.set(d,!0);let e=!0;p.forEach((t=>{t||(e=!1)})),e&&(null==x||x(),b(h.current),a&&(null==l||l()),r&&r())},children:e},d)}))})};function $e(e){if("undefined"==typeof Proxy)return e;const t=new Map;return new Proxy(((...t)=>e(...t)),{get:(n,r)=>"create"===r?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}function Ge(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}const Ke=e=>Array.isArray(e);function Ze(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Xe(e){return"string"==typeof e||Array.isArray(e)}function Je(e){const t=[{},{}];return null==e||e.values.forEach(((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()})),t}function et(e,t,n,r){if("function"==typeof t){const[o,i]=Je(r);t=t(void 0!==n?n:e.custom,o,i)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[o,i]=Je(r);t=t(void 0!==n?n:e.custom,o,i)}return t}function tt(e,t,n){const r=e.getProps();return et(r,t,void 0!==n?n:r.custom,e)}const nt=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],rt=["initial",...nt];function ot(e){let t;return()=>(void 0===t&&(t=e()),t)}const it=ot((()=>void 0!==window.ScrollTimeline));class at{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map((e=>"finished"in e?e.finished:e)))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e,t){const n=this.animations.map((n=>it()&&n.attachTimeline?n.attachTimeline(e):"function"==typeof t?t(n):void 0));return()=>{n.forEach(((e,t)=>{e&&e(),this.animations[t].stop()}))}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach((t=>t[e]()))}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class st extends at{then(e,t){return Promise.all(this.animations).then(e).catch(t)}}function lt(e,t){return e?e[t]||e.default||e:void 0}const ct=2e4;function ut(e){let t=0,n=e.next(t);for(;!n.done&&t<ct;)t+=50,n=e.next(t);return t>=ct?1/0:t}function dt(e){return"function"==typeof e}function ft(e,t){e.timeline=t,e.onfinish=null}const mt=e=>Array.isArray(e)&&"number"==typeof e[0],ht={linearEasing:void 0};function pt(e,t){const n=ot(e);return()=>{var e;return null!==(e=ht[t])&&void 0!==e?e:n()}}const gt=pt((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0}),"linearEasing"),yt=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},vt=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let t=0;t<o;t++)r+=e(yt(0,o-1,t))+", ";return`linear(${r.substring(0,r.length-2)})`};function bt(e){return Boolean("function"==typeof e&>()||!e||"string"==typeof e&&(e in xt||gt())||mt(e)||Array.isArray(e)&&e.every(bt))}const wt=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,xt={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:wt([0,.65,.55,1]),circOut:wt([.55,0,1,.45]),backIn:wt([.31,.01,.66,-.59]),backOut:wt([.33,1.53,.69,.99])};function Mt(e,t){return e?"function"==typeof e&>()?vt(e,t):mt(e)?wt(e):Array.isArray(e)?e.map((e=>Mt(e,t)||xt.easeOut)):xt[e]:void 0}const Et={x:!1,y:!1};function Nt(){return Et.x||Et.y}function kt(e,t){const n=function(e){if(e instanceof Element)return[e];if("string"==typeof e){let t=document;const n=t.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e)}(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function jt(e){return t=>{"touch"===t.pointerType||Nt()||e(t)}}const Dt=(e,t)=>!!t&&(e===t||Dt(e,t.parentElement)),Tt=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,St=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),Ct=new WeakSet;function Rt(e){return t=>{"Enter"===t.key&&e(t)}}function Ot(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function At(e){return Tt(e)&&!Nt()}const It=e=>1e3*e,_t=e=>e/1e3,Pt=e=>e,Lt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],zt=new Set(Lt),Ft=new Set(["width","height","top","left","right","bottom",...Lt]),Ut=["read","resolveKeyframes","update","preRender","render","postRender"];function Bt(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=Ut.reduce(((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,o=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function s(t){i.has(t)&&(l.schedule(t),e()),t(a)}const l={schedule:(e,o=!1,a=!1)=>{const s=a&&r?t:n;return o&&i.add(e),s.has(e)||s.add(e),e},cancel:e=>{n.delete(e),i.delete(e)},process:e=>{a=e,r?o=!0:(r=!0,[t,n]=[n,t],t.forEach(s),t.clear(),r=!1,o&&(o=!1,l.process(e)))}};return l}(i),e)),{}),{read:s,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=a,m=()=>{const i=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(i-o.timestamp,40),1),o.timestamp=i,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(m))};return{schedule:Ut.reduce(((t,i)=>{const s=a[i];return t[i]=(t,i=!1,a=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(m)),s.schedule(t,i,a)),t}),{}),cancel:e=>{for(let t=0;t<Ut.length;t++)a[Ut[t]].cancel(e)},state:o,steps:a}}const{schedule:Yt,cancel:Qt,state:Vt,steps:Wt}=Bt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Pt,!0);let Ht;function qt(){Ht=void 0}const $t={now:()=>(void 0===Ht&&$t.set(Vt.isProcessing?Vt.timestamp:performance.now()),Ht),set:e=>{Ht=e,queueMicrotask(qt)}};function Gt(e,t){-1===e.indexOf(t)&&e.push(t)}function Kt(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Zt{constructor(){this.subscriptions=[]}add(e){return Gt(this.subscriptions,e),()=>Kt(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Xt(e,t){return t?e*(1e3/t):0}const Jt={current:void 0};class en{constructor(e,t={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{const n=$t.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=$t.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new Zt);const n=this.events[e].add(t);return"change"===e?()=>{n(),Yt.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Jt.current&&Jt.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=$t.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Xt(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function tn(e,t){return new en(e,t)}function nn(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,tn(n))}const rn=e=>Boolean(e&&e.getVelocity);function on(e,t){const n=e.getValue("willChange");if(r=n,Boolean(rn(r)&&r.add))return n.add(t);var r}const an=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),sn="data-"+an("framerAppearId");function ln(e){return e.props[sn]}const cn=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function un(e,t,n,r){if(e===t&&n===r)return Pt;return o=>0===o||1===o?o:cn(function(e,t,n,r,o){let i,a,s=0;do{a=t+(n-t)/2,i=cn(a,r,o)-e,i>0?n=a:t=a}while(Math.abs(i)>1e-7&&++s<12);return a}(o,0,1,e,n),t,r)}const dn=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,fn=e=>t=>1-e(1-t),mn=un(.33,1.53,.69,.99),hn=fn(mn),pn=dn(hn),gn=e=>(e*=2)<1?.5*hn(e):.5*(2-Math.pow(2,-10*(e-1))),yn=e=>1-Math.sin(Math.acos(e)),vn=fn(yn),bn=dn(yn),wn=e=>/^0[^.\s]+$/u.test(e),xn=(e,t,n)=>n>t?t:n<e?e:n,Mn={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},En={...Mn,transform:e=>xn(0,1,e)},Nn={...Mn,default:1},kn=e=>Math.round(1e5*e)/1e5,jn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,Dn=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Tn=(e,t)=>n=>Boolean("string"==typeof n&&Dn.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),Sn=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[o,i,a,s]=r.match(jn);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},Cn={...Mn,transform:e=>Math.round((e=>xn(0,255,e))(e))},Rn={test:Tn("rgb","red"),parse:Sn("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Cn.transform(e)+", "+Cn.transform(t)+", "+Cn.transform(n)+", "+kn(En.transform(r))+")"},On={test:Tn("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:Rn.transform},An=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),In=An("deg"),_n=An("%"),Pn=An("px"),Ln=An("vh"),zn=An("vw"),Fn={..._n,parse:e=>_n.parse(e)/100,transform:e=>_n.transform(100*e)},Un={test:Tn("hsl","hue"),parse:Sn("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+_n.transform(kn(t))+", "+_n.transform(kn(n))+", "+kn(En.transform(r))+")"},Bn={test:e=>Rn.test(e)||On.test(e)||Un.test(e),parse:e=>Rn.test(e)?Rn.parse(e):Un.test(e)?Un.parse(e):On.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?Rn.transform(e):Un.transform(e)},Yn=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Qn="number",Vn="color",Wn=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Hn(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(Wn,(e=>(Bn.test(e)?(r.color.push(i),o.push(Vn),n.push(Bn.parse(e))):e.startsWith("var(")?(r.var.push(i),o.push("var"),n.push(e)):(r.number.push(i),o.push(Qn),n.push(parseFloat(e))),++i,"${}"))).split("${}");return{values:n,split:a,indexes:r,types:o}}function qn(e){return Hn(e).values}function $n(e){const{split:t,types:n}=Hn(e),r=t.length;return e=>{let o="";for(let i=0;i<r;i++)if(o+=t[i],void 0!==e[i]){const t=n[i];o+=t===Qn?kn(e[i]):t===Vn?Bn.transform(e[i]):e[i]}return o}}const Gn=e=>"number"==typeof e?0:e,Kn={test:function(e){var t,n;return isNaN(e)&&"string"==typeof e&&((null===(t=e.match(jn))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(Yn))||void 0===n?void 0:n.length)||0)>0},parse:qn,createTransformer:$n,getAnimatableNone:function(e){const t=qn(e);return $n(e)(t.map(Gn))}},Zn=new Set(["brightness","contrast","saturate","opacity"]);function Xn(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(jn)||[];if(!r)return e;const o=n.replace(r,"");let i=Zn.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const Jn=/\b([a-z-]*)\(.*?\)/gu,er={...Kn,getAnimatableNone:e=>{const t=e.match(Jn);return t?t.map(Xn).join(" "):e}},tr={borderWidth:Pn,borderTopWidth:Pn,borderRightWidth:Pn,borderBottomWidth:Pn,borderLeftWidth:Pn,borderRadius:Pn,radius:Pn,borderTopLeftRadius:Pn,borderTopRightRadius:Pn,borderBottomRightRadius:Pn,borderBottomLeftRadius:Pn,width:Pn,maxWidth:Pn,height:Pn,maxHeight:Pn,top:Pn,right:Pn,bottom:Pn,left:Pn,padding:Pn,paddingTop:Pn,paddingRight:Pn,paddingBottom:Pn,paddingLeft:Pn,margin:Pn,marginTop:Pn,marginRight:Pn,marginBottom:Pn,marginLeft:Pn,backgroundPositionX:Pn,backgroundPositionY:Pn},nr={rotate:In,rotateX:In,rotateY:In,rotateZ:In,scale:Nn,scaleX:Nn,scaleY:Nn,scaleZ:Nn,skew:In,skewX:In,skewY:In,distance:Pn,translateX:Pn,translateY:Pn,translateZ:Pn,x:Pn,y:Pn,z:Pn,perspective:Pn,transformPerspective:Pn,opacity:En,originX:Fn,originY:Fn,originZ:Pn},rr={...Mn,transform:Math.round},or={...tr,...nr,zIndex:rr,size:Pn,fillOpacity:En,strokeOpacity:En,numOctaves:rr},ir={...or,color:Bn,backgroundColor:Bn,outlineColor:Bn,fill:Bn,stroke:Bn,borderColor:Bn,borderTopColor:Bn,borderRightColor:Bn,borderBottomColor:Bn,borderLeftColor:Bn,filter:er,WebkitFilter:er},ar=e=>ir[e];function sr(e,t){let n=ar(e);return n!==er&&(n=Kn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const lr=new Set(["auto","none","0"]),cr=e=>e===Mn||e===Pn,ur=(e,t)=>parseFloat(e.split(", ")[t]),dr=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return ur(o[1],t);{const t=r.match(/^matrix\((.+)\)$/u);return t?ur(t[1],e):0}},fr=new Set(["x","y","z"]),mr=Lt.filter((e=>!fr.has(e))),hr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:dr(4,13),y:dr(5,14)};hr.translateX=hr.x,hr.translateY=hr.y;const pr=new Set;let gr=!1,yr=!1;function vr(){if(yr){const e=Array.from(pr).filter((e=>e.needsMeasurement)),t=new Set(e.map((e=>e.element))),n=new Map;t.forEach((e=>{const t=function(e){const t=[];return mr.forEach((n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t}(e);t.length&&(n.set(e,t),e.render())})),e.forEach((e=>e.measureInitialState())),t.forEach((e=>{e.render();const t=n.get(e);t&&t.forEach((([t,n])=>{var r;null===(r=e.getValue(t))||void 0===r||r.set(n)}))})),e.forEach((e=>e.measureEndState())),e.forEach((e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)}))}yr=!1,gr=!1,pr.forEach((e=>e.complete())),pr.clear()}function br(){pr.forEach((e=>{e.readKeyframes(),e.needsMeasurement&&(yr=!0)}))}class wr{constructor(e,t,n,r,o,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=o,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(pr.add(this),gr||(gr=!0,Yt.read(br),Yt.resolveKeyframes(vr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let o=0;o<e.length;o++)if(null===e[o])if(0===o){const o=null==r?void 0:r.get(),i=e[e.length-1];if(void 0!==o)e[0]=o;else if(n&&t){const r=n.readValue(t,i);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=i),r&&void 0===o&&r.set(e[0])}else e[o]=e[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),pr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,pr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}let xr=Pt,Mr=Pt;const Er=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Nr=e=>t=>"string"==typeof t&&t.startsWith(e),kr=Nr("--"),jr=Nr("var(--"),Dr=e=>!!jr(e)&&Tr.test(e.split("/*")[0].trim()),Tr=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Sr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Cr(e,t,n=1){Mr(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=function(e){const t=Sr.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${null!=n?n:r}`,o]}(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const e=i.trim();return Er(e)?parseFloat(e):e}return Dr(o)?Cr(o,t,n+1):o}const Rr=e=>t=>t.test(e),Or=[Mn,Pn,_n,In,zn,Ln,{test:e=>"auto"===e,parse:e=>e}],Ar=e=>Or.find(Rr(e));class Ir extends wr{constructor(e,t,n,r,o){super(e,t,n,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if("string"==typeof r&&(r=r.trim(),Dr(r))){const o=Cr(r,t.current);void 0!==o&&(e[n]=o),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Ft.has(n)||2!==e.length)return;const[r,o]=e,i=Ar(r),a=Ar(o);if(i!==a)if(cr(i)&&cr(a))for(let t=0;t<e.length;t++){const n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)("number"==typeof(r=e[t])?0===r:null===r||"none"===r||"0"===r||wn(r))&&n.push(t);var r;n.length&&function(e,t,n){let r,o=0;for(;o<e.length&&!r;){const t=e[o];"string"==typeof t&&!lr.has(t)&&Hn(t).values.length&&(r=e[o]),o++}if(r&&n)for(const o of t)e[o]=sr(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=hr[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=hr[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==a&&void 0===this.finalKeyframe&&(this.finalKeyframe=a),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach((([e,n])=>{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}}const _r=(e,t)=>!("zIndex"===t||"number"!=typeof e&&!Array.isArray(e)&&("string"!=typeof e||!Kn.test(e)&&"0"!==e||e.startsWith("url(")));function Pr(e,t,n,r){const o=e[0];if(null===o)return!1;if("display"===t||"visibility"===t)return!0;const i=e[e.length-1],a=_r(o,t),s=_r(i,t);return xr(a===s,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!(!a||!s)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||dt(n))&&r)}const Lr=e=>null!==e;function zr(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(Lr),i=t&&"loop"!==n&&t%2==1?0:o.length-1;return i&&void 0!==r?r:o[i]}class Fr{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=$t.now(),this.options={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:o,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(br(),vr()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=$t.now(),this.hasAttemptedResolve=!0;const{name:n,type:r,velocity:o,delay:i,onComplete:a,onUpdate:s,isGenerator:l}=this.options;if(!l&&!Pr(e,n,r,o)){if(!i)return s&&s(zr(e,this.options,t)),a&&a(),void this.resolveFinishedPromise();this.options.duration=0}const c=this.initPlayback(e,t);!1!==c&&(this._resolved={keyframes:e,finalKeyframe:t,...c},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise((e=>{this.resolveFinishedPromise=e}))}}const Ur=(e,t,n)=>e+(t-e)*n;function Br(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Yr(e,t){return n=>n>0?t:e}const Qr=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},Vr=[On,Rn,Un];function Wr(e){const t=(n=e,Vr.find((e=>e.test(n))));var n;if(xr(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`),!Boolean(t))return!1;let r=t.parse(e);return t===Un&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,i=0,a=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;o=Br(s,r,e+1/3),i=Br(s,r,e),a=Br(s,r,e-1/3)}else o=i=a=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:r}}(r)),r}const Hr=(e,t)=>{const n=Wr(e),r=Wr(t);if(!n||!r)return Yr(e,t);const o={...n};return e=>(o.red=Qr(n.red,r.red,e),o.green=Qr(n.green,r.green,e),o.blue=Qr(n.blue,r.blue,e),o.alpha=Ur(n.alpha,r.alpha,e),Rn.transform(o))},qr=(e,t)=>n=>t(e(n)),$r=(...e)=>e.reduce(qr),Gr=new Set(["none","hidden"]);function Kr(e,t){return n=>Ur(e,t,n)}function Zr(e){return"number"==typeof e?Kr:"string"==typeof e?Dr(e)?Yr:Bn.test(e)?Hr:eo:Array.isArray(e)?Xr:"object"==typeof e?Bn.test(e)?Hr:Jr:Yr}function Xr(e,t){const n=[...e],r=n.length,o=e.map(((e,n)=>Zr(e)(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}}function Jr(e,t){const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=Zr(e[o])(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const eo=(e,t)=>{const n=Kn.createTransformer(t),r=Hn(e),o=Hn(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Gr.has(e)&&!o.values.length||Gr.has(t)&&!r.values.length?function(e,t){return Gr.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):$r(Xr(function(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],s=e.indexes[a][o[a]],l=null!==(n=e.values[s])&&void 0!==n?n:0;r[i]=l,o[a]++}return r}(r,o),o.values),n):(xr(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Yr(e,t))};function to(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?Ur(e,t,n):Zr(e)(e,t)}function no(e,t,n){const r=Math.max(t-5,0);return Xt(n-e(r),t-r)}const ro=.01,oo=2,io=.005,ao=.5;const so=12;function lo(e,t){return e*Math.sqrt(1-t*t)}const co=["duration","bounce"],uo=["stiffness","damping","mass"];function fo(e,t){return t.some((t=>void 0!==e[t]))}function mo(e=.3,t=.3){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:m}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!fo(e,uo)&&fo(e,co))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),o=r*r,i=2*xn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:1,stiffness:o,damping:i}}else{const n=function({duration:e=800,bounce:t=.3,velocity:n=0,mass:r=1}){let o,i;xr(e<=It(10),"Spring duration must be 10 seconds or less");let a=1-t;a=xn(.05,1,a),e=xn(.01,10,_t(e)),a<1?(o=t=>{const r=t*a,o=r*e;return.001-(r-n)/lo(t,a)*Math.exp(-o)},i=t=>{const r=t*a*e,i=r*n+n,s=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=lo(Math.pow(t,2),a);return(.001-o(t)>0?-1:1)*((i-s)*l)/c}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let n=1;n<so;n++)r-=e(r)/t(r);return r}(o,i,5/e);if(e=It(e),isNaN(s))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}({...n,velocity:-_t(n.velocity||0)}),h=f||0,p=c/(2*Math.sqrt(l*u)),g=a-i,y=_t(Math.sqrt(l/u)),v=Math.abs(g)<5;let b;if(r||(r=v?ro:oo),o||(o=v?io:ao),p<1){const e=lo(y,p);b=t=>{const n=Math.exp(-p*y*t);return a-n*((h+p*y*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}}else if(1===p)b=e=>a-Math.exp(-y*e)*(g+(h+y*g)*e);else{const e=y*Math.sqrt(p*p-1);b=t=>{const n=Math.exp(-p*y*t),r=Math.min(e*t,300);return a-n*((h+p*y*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}const w={calculatedDuration:m&&d||null,next:e=>{const t=b(e);if(m)s.done=e>=d;else{let n=0;p<1&&(n=0===e?It(h):no(b,e,t));const i=Math.abs(n)<=r,l=Math.abs(a-t)<=o;s.done=i&&l}return s.value=s.done?a:t,s},toString:()=>{const e=Math.min(ut(w),ct),t=vt((t=>w.next(e*t).value),e,30);return e+"ms "+t}};return w}function ho({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},m=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let h=n*t;const p=d+h,g=void 0===a?p:a(p);g!==p&&(h=g-d);const y=e=>-h*Math.exp(-e/r),v=e=>g+y(e),b=e=>{const t=y(e),n=v(e);f.done=Math.abs(t)<=c,f.value=f.done?g:n};let w,x;const M=e=>{var t;t=f.value,(void 0!==s&&t<s||void 0!==l&&t>l)&&(w=e,x=mo({keyframes:[f.value,m(f.value)],velocity:no(v,e,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return M(0),{calculatedDuration:null,next:e=>{let t=!1;return x||void 0!==w||(t=!0,b(e),M(e)),void 0!==w&&e>=w?x.next(e-w):(!t&&b(e),f)}}}const po=un(.42,0,1,1),go=un(0,0,.58,1),yo=un(.42,0,.58,1),vo={linear:Pt,easeIn:po,easeInOut:yo,easeOut:go,circIn:yn,circInOut:bn,circOut:vn,backIn:hn,backInOut:pn,backOut:mn,anticipate:gn},bo=e=>{if(mt(e)){Mr(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return un(t,n,r,o)}return"string"==typeof e?(Mr(void 0!==vo[e],`Invalid easing type '${e}'`),vo[e]):e};function wo({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(bo):bo(r),i={done:!1,value:t[0]},a=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:function(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=yt(0,t,r);e.push(Ur(n,1,o))}}(t,e.length-1),t}(t),e),s=function(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(Mr(i===t.length,"Both input and output ranges must be the same length"),1===i)return()=>t[0];if(2===i&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],o=n||to,i=e.length-1;for(let n=0;n<i;n++){let i=o(e[n],e[n+1]);if(t){const e=Array.isArray(t)?t[n]||Pt:t;i=$r(e,i)}r.push(i)}return r}(t,r,o),l=s.length,c=n=>{if(a&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);const o=yt(e[r],e[r+1],n);return s[r](o)};return n?t=>c(xn(e[0],e[i-1],t)):c}(a,t,{ease:Array.isArray(o)?o:(l=t,c=o,l.map((()=>c||yo)).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(i.value=s(t),i.done=t>=e,i)}}const xo=e=>{const t=({timestamp:t})=>e(t);return{start:()=>Yt.update(t,!0),stop:()=>Qt(t),now:()=>Vt.isProcessing?Vt.timestamp:$t.now()}},Mo={decay:ho,inertia:ho,tween:wo,keyframes:wo,spring:mo},Eo=e=>e/100;class No extends Fr{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:e}=this.options;e&&e()};const{name:t,motionValue:n,element:r,keyframes:o}=this.options,i=(null==r?void 0:r.KeyframeResolver)||wr;this.resolver=new i(o,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:t="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=this.options,a=dt(t)?t:Mo[t]||wo;let s,l;a!==wo&&"number"!=typeof e[0]&&(s=$r(Eo,to(e[0],e[1])),e=[0,100]);const c=a({...this.options,keyframes:e});"mirror"===o&&(l=a({...this.options,keyframes:[...e].reverse(),velocity:-i})),null===c.calculatedDuration&&(c.calculatedDuration=ut(c));const{calculatedDuration:u}=c,d=u+r;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:s,calculatedDuration:u,resolvedDuration:d,totalDuration:d*(n+1)-r}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){const{resolved:n}=this;if(!n){const{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}const{finalKeyframe:r,generator:o,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:s,calculatedDuration:l,totalDuration:c,resolvedDuration:u}=n;if(null===this.startTime)return o.next(0);const{delay:d,repeat:f,repeatType:m,repeatDelay:h,onUpdate:p}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const g=this.currentTime-d*(this.speed>=0?1:-1),y=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=c);let v=this.currentTime,b=o;if(f){const e=Math.min(this.currentTime,c)/u;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,f+1),Boolean(t%2)&&("reverse"===m?(n=1-n,h&&(n-=h/u)):"mirror"===m&&(b=i)),v=xn(0,1,n)*u}const w=y?{done:!1,value:s[0]}:b.next(v);a&&(w.value=a(w.value));let{done:x}=w;y||null===l||(x=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const M=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return M&&void 0!==r&&(w.value=zr(s,this.options,r)),p&&p(w.value),M&&this.finish(),w}get duration(){const{resolved:e}=this;return e?_t(e.calculatedDuration):0}get time(){return _t(this.currentTime)}set time(e){e=It(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=_t(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=xo,onPlay:t,startTime:n}=this.options;this.driver||(this.driver=e((e=>this.tick(e)))),t&&t();const r=this.driver.now();null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=r):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;this._resolved?(this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const ko=new Set(["opacity","clipPath","filter","transform"]),jo=ot((()=>Object.hasOwnProperty.call(Element.prototype,"animate"))),Do={anticipate:gn,backInOut:pn,circInOut:bn};class To extends Fr{constructor(e){super(e);const{name:t,motionValue:n,element:r,keyframes:o}=this.options;this.resolver=new Ir(o,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}initPlayback(e,t){let{duration:n=300,times:r,ease:o,type:i,motionValue:a,name:s,startTime:l}=this.options;if(!a.owner||!a.owner.current)return!1;var c;if("string"==typeof o&>()&&o in Do&&(o=Do[o]),dt((c=this.options).type)||"spring"===c.type||!bt(c.ease)){const{onComplete:t,onUpdate:a,motionValue:s,element:l,...c}=this.options,u=function(e,t){const n=new No({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<2e4;)r=n.sample(i),o.push(r.value),i+=10;return{times:void 0,keyframes:o,duration:i-10,ease:"linear"}}(e,c);1===(e=u.keyframes).length&&(e[1]=e[0]),n=u.duration,r=u.times,o=u.ease,i="keyframes"}const u=function(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Mt(s,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:"reverse"===a?"alternate":"normal"})}(a.owner.current,s,e,{...this.options,duration:n,times:r,ease:o});return u.startTime=null!=l?l:this.calcStartTime(),this.pendingTimeline?(ft(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:n}=this.options;a.set(zr(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:n,times:r,type:i,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return _t(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return _t(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=It(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:t}=e;return t.playbackRate}set speed(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:t}=e;return t.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){const{resolved:t}=this;if(!t)return Pt;const{animation:n}=t;ft(n,e)}else this.pendingTimeline=e;return Pt}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:t,keyframes:n,duration:r,type:o,ease:i,times:a}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){const{motionValue:e,onUpdate:t,onComplete:s,element:l,...c}=this.options,u=new No({...c,keyframes:n,duration:r,type:o,ease:i,times:a,isGenerator:!0}),d=It(this.time);e.setWithVelocity(u.sample(d-10).value,u.sample(d).value,10)}const{onStop:s}=this.options;s&&s(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:a}=e;if(!(t&&t.owner&&t.owner.current instanceof HTMLElement))return!1;const{onUpdate:s,transformTemplate:l}=t.owner.getProps();return jo()&&n&&ko.has(n)&&!s&&!l&&!r&&"mirror"!==o&&0!==i&&"inertia"!==a}}const So={type:"spring",stiffness:500,damping:25,restSpeed:10},Co={type:"keyframes",duration:.8},Ro={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Oo=(e,{keyframes:t})=>t.length>2?Co:zt.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:So:Ro,Ao=(e,t,n,r={},o,i)=>a=>{const s=lt(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c-=It(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length})(s)||(u={...u,...Oo(e,u)}),u.duration&&(u.duration=It(u.duration)),u.repeatDelay&&(u.repeatDelay=It(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(u.duration=0,0===u.delay&&(d=!0)),d&&!i&&void 0!==t.get()){const e=zr(u.keyframes,s);if(void 0!==e)return Yt.update((()=>{u.onUpdate(e),u.onComplete()})),new st([])}return!i&&To.supports(u)?new To(u):new No(u)};function Io({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function _o(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=t;r&&(a=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const t in l){const r=e.getValue(t,null!==(i=e.latestValues[t])&&void 0!==i?i:null),o=l[t];if(void 0===o||u&&Io(u,t))continue;const s={delay:n,...lt(a||{},t)};let d=!1;if(window.MotionHandoffAnimation){const n=ln(e);if(n){const e=window.MotionHandoffAnimation(n,t,Yt);null!==e&&(s.startTime=e,d=!0)}}on(e,t),r.start(Ao(t,r,o,e.shouldReduceMotion&&Ft.has(t)?{type:!1}:s,e,d));const f=r.animation;f&&c.push(f)}return s&&Promise.all(c).then((()=>{Yt.update((()=>{s&&function(e,t){const n=tt(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const t in i)nn(e,t,(a=i[t],Ke(a)?a[a.length-1]||0:a));var a}(e,s)}))})),c}function Po(e,t,n={}){var r;const o=tt(e,t,"exit"===n.type?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const a=o?()=>Promise.all(_o(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:o=0,staggerChildren:a,staggerDirection:s}=i;return function(e,t,n=0,r=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*r,l=1===o?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort(Lo).forEach(((e,r)=>{e.notify("AnimationStart",t),a.push(Po(e,t,{...i,delay:n+l(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(a)}(e,t,o+r,a,s,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[e,t]="beforeChildren"===l?[a,s]:[s,a];return e().then((()=>t()))}return Promise.all([a(),s(n.delay)])}function Lo(e,t){return e.sortNodePosition(t)}const zo=rt.length;function Fo(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&Fo(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<zo;n++){const r=rt[n],o=e.props[r];(Xe(o)||!1===o)&&(t[r]=o)}return t}const Uo=[...nt].reverse(),Bo=nt.length;function Yo(e){let t=function(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map((t=>Po(e,t,n)));r=Promise.all(o)}else if("string"==typeof t)r=Po(e,t,n);else{const o="function"==typeof t?tt(e,t,n.custom):t;r=Promise.all(_o(e,o,n))}return r.then((()=>{e.notify("AnimationComplete",t)}))}(e,t,n))))}(e),n=Vo(),r=!0;const o=t=>(n,r)=>{var o;const i=tt(e,r,"exit"===t?null===(o=e.presenceContext)||void 0===o?void 0:o.custom:void 0);if(i){const{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function i(i){const{props:a}=e,s=Fo(e.parent)||{},l=[],c=new Set;let u={},d=1/0;for(let t=0;t<Bo;t++){const h=Uo[t],p=n[h],g=void 0!==a[h]?a[h]:s[h],y=Xe(g),v=h===i?p.isActive:null;!1===v&&(d=t);let b=g===s[h]&&g!==a[h]&&y;if(b&&r&&e.manuallyAnimateOnMount&&(b=!1),p.protectedKeys={...u},!p.isActive&&null===v||!g&&!p.prevProp||Ge(g)||"boolean"==typeof g)continue;const w=(f=p.prevProp,"string"==typeof(m=g)?m!==f:!!Array.isArray(m)&&!Ze(m,f));let x=w||h===i&&p.isActive&&!b&&y||t>d&&y,M=!1;const E=Array.isArray(g)?g:[g];let N=E.reduce(o(h),{});!1===v&&(N={});const{prevResolvedValues:k={}}=p,j={...k,...N},D=t=>{x=!0,c.has(t)&&(M=!0,c.delete(t)),p.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in j){const t=N[e],n=k[e];if(u.hasOwnProperty(e))continue;let r=!1;r=Ke(t)&&Ke(n)?!Ze(t,n):t!==n,r?null!=t?D(e):c.add(e):void 0!==t&&c.has(e)?D(e):p.protectedKeys[e]=!0}p.prevProp=g,p.prevResolvedValues=N,p.isActive&&(u={...u,...N}),r&&e.blockInitialAnimation&&(x=!1),x&&(!b||!w||M)&&l.push(...E.map((e=>({animation:e,options:{type:h}}))))}var f,m;if(c.size){const t={};c.forEach((n=>{const r=e.getBaseTarget(n),o=e.getValue(n);o&&(o.liveStyle=!0),t[n]=null!=r?r:null})),l.push({animation:t})}let h=Boolean(l.length);return!r||!1!==a.initial&&a.initial!==a.animate||e.manuallyAnimateOnMount||(h=!1),r=!1,h?t(l):Promise.resolve()}return{animateChanges:i,setActive:function(t,r){var o;if(n[t].isActive===r)return Promise.resolve();null===(o=e.variantChildren)||void 0===o||o.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const a=i(t);for(const e in n)n[e].protectedKeys={};return a},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=Vo(),r=!0}}}function Qo(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Vo(){return{animate:Qo(!0),whileInView:Qo(),whileHover:Qo(),whileTap:Qo(),whileDrag:Qo(),whileFocus:Qo(),exit:Qo()}}class Wo{constructor(e){this.isMounted=!1,this.node=e}update(){}}let Ho=0;const qo={animation:{Feature:class extends Wo{constructor(e){super(e),e.animationState||(e.animationState=Yo(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Ge(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}},exit:{Feature:class extends Wo{constructor(){super(...arguments),this.id=Ho++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then((()=>t(this.id)))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}};function $o(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Go(e){return{point:{x:e.pageX,y:e.pageY}}}function Ko(e,t,n,r){return $o(e,t,(e=>t=>Tt(t)&&e(t,Go(t)))(n),r)}const Zo=(e,t)=>Math.abs(e-t);class Xo{constructor(e,t,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=ti(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=Zo(e.x,t.x),r=Zo(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=Vt;this.history.push({...r,timestamp:o});const{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=Jo(t,this.transformPagePoint),Yt.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:o}=this.handlers;if(this.dragSnapToOrigin&&o&&o(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const i=ti("pointercancel"===e.type?this.lastMoveEventInfo:Jo(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,i),r&&r(e,i)},!Tt(e))return;this.dragSnapToOrigin=o,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;const i=Jo(Go(e),this.transformPagePoint),{point:a}=i,{timestamp:s}=Vt;this.history=[{...a,timestamp:s}];const{onSessionStart:l}=t;l&&l(e,ti(i,this.history)),this.removeListeners=$r(Ko(this.contextWindow,"pointermove",this.handlePointerMove),Ko(this.contextWindow,"pointerup",this.handlePointerUp),Ko(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Qt(this.updatePoint)}}function Jo(e,t){return t?{point:t(e.point)}:e}function ei(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ti({point:e},t){return{point:e,delta:ei(e,ri(t)),offset:ei(e,ni(t)),velocity:oi(t,.1)}}function ni(e){return e[0]}function ri(e){return e[e.length-1]}function oi(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=ri(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>It(t)));)n--;if(!r)return{x:0,y:0};const i=_t(o.timestamp-r.timestamp);if(0===i)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function ii(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function ai(e){return e.max-e.min}function si(e,t,n,r=.5){e.origin=r,e.originPoint=Ur(t.min,t.max,e.origin),e.scale=ai(n)/ai(t),e.translate=Ur(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function li(e,t,n,r){si(e.x,t.x,n.x,r?r.originX:void 0),si(e.y,t.y,n.y,r?r.originY:void 0)}function ci(e,t,n){e.min=n.min+t.min,e.max=e.min+ai(t)}function ui(e,t,n){e.min=t.min-n.min,e.max=e.min+ai(t)}function di(e,t,n){ui(e.x,t.x,n.x),ui(e.y,t.y,n.y)}function fi(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function mi(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const hi=.35;function pi(e,t,n){return{min:gi(e,t),max:gi(e,n)}}function gi(e,t){return"number"==typeof e?e:e[t]||0}const yi=()=>({x:{min:0,max:0},y:{min:0,max:0}});function vi(e){return[e("x"),e("y")]}function bi({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function wi(e){return void 0===e||1===e}function xi({scale:e,scaleX:t,scaleY:n}){return!wi(e)||!wi(t)||!wi(n)}function Mi(e){return xi(e)||Ei(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Ei(e){return Ni(e.x)||Ni(e.y)}function Ni(e){return e&&"0%"!==e}function ki(e,t,n){return n+t*(e-n)}function ji(e,t,n,r,o){return void 0!==o&&(e=ki(e,o,r)),ki(e,n,r)+t}function Di(e,t=0,n=1,r,o){e.min=ji(e.min,t,n,r,o),e.max=ji(e.max,t,n,r,o)}function Ti(e,{x:t,y:n}){Di(e.x,t.translate,t.scale,t.originPoint),Di(e.y,n.translate,n.scale,n.originPoint)}const Si=.999999999999,Ci=1.0000000000001;function Ri(e,t){e.min=e.min+t,e.max=e.max+t}function Oi(e,t,n,r,o=.5){Di(e,t,n,Ur(e.min,e.max,o),r)}function Ai(e,t){Oi(e.x,t.x,t.scaleX,t.scale,t.originX),Oi(e.y,t.y,t.scaleY,t.scale,t.originY)}function Ii(e,t){return bi(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const _i=({current:e})=>e?e.ownerDocument.defaultView:null,Pi=new WeakMap;class Li{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:r}=this.getProps();this.panSession=new Xo(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(Go(e).point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:o}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(i=n)||"y"===i?Et[i]?null:(Et[i]=!0,()=>{Et[i]=!1}):Et.x||Et.y?null:(Et.x=Et.y=!0,()=>{Et.x=Et.y=!1}),!this.openDragLock))return;var i;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),vi((e=>{let t=this.getAxisMotionValue(e).get()||0;if(_n.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];r&&(t=ai(r)*(parseFloat(t)/100))}}this.originPoint[e]=t})),o&&Yt.postRender((()=>o(e,t))),on(this.visualElement,"transform");const{animationState:a}=this.visualElement;a&&a.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:i}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:a}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(a),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),i&&i(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>vi((e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())}))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,contextWindow:_i(this.visualElement)})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:o}=this.getProps();o&&Yt.postRender((()=>o(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!zi(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?Ur(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?Ur(n,e,r.max):Math.min(e,n)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,o=this.constraints;t&&ii(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:fi(e.x,n,o),y:fi(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=hi){return!1===e?e=0:!0===e&&(e=hi),{x:pi(e,"left","right"),y:pi(e,"top","bottom")}}(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&vi((e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!ii(e))return!1;const n=e.current;Mr(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=function(e,t,n){const r=Ii(e,n),{scroll:o}=t;return o&&(Ri(r.x,o.offset.x),Ri(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:mi(e.x,t.x),y:mi(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=bi(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},l=vi((a=>{if(!zi(a,t,this.currentDirection))return;let l=s&&s[a]||{};i&&(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[a]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(a,d)}));return Promise.all(l).then(a)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return on(this.visualElement,e),n.start(Ao(e,n,0,t,this.visualElement,!1))}stopAnimation(){vi((e=>this.getAxisMotionValue(e).stop()))}pauseAnimation(){vi((e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()}))}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){vi((t=>{const{drag:n}=this.getProps();if(!zi(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:i}=r.layout.layoutBox[t];o.set(e[t]-Ur(n,i,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!ii(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};vi((e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=ai(e),o=ai(t);return o>r?n=yt(t.min,t.max-r,e.min):r>o&&(n=yt(e.min,e.max-o,t.min)),xn(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),vi((t=>{if(!zi(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];n.set(Ur(o,i,r[t]))}))}addListeners(){if(!this.visualElement.current)return;Pi.set(this.visualElement,this);const e=Ko(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();ii(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),Yt.read(t);const o=$o(window,"resize",(()=>this.scalePositionWithinConstraints())),i=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(vi((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{o(),e(),r(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=hi,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function zi(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const Fi=e=>(t,n)=>{e&&Yt.postRender((()=>e(t,n)))},Ui=(0,d.createContext)({}),Bi={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Yi(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Qi={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Pn.test(e))return e;e=parseFloat(e)}return`${Yi(e,t.target.x)}% ${Yi(e,t.target.y)}%`}},Vi={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Kn.parse(e);if(o.length>5)return r;const i=Kn.createTransformer(e),a="number"!=typeof o[0]?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const c=Ur(s,l,.5);return"number"==typeof o[2+a]&&(o[2+a]/=c),"number"==typeof o[3+a]&&(o[3+a]/=c),i(o)}},Wi={},{schedule:Hi,cancel:qi}=Bt(queueMicrotask,!1);class $i extends d.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;var i;i=Ki,Object.assign(Wi,i),o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",(()=>{this.safeToRemove()})),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Bi.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,i=n.projection;return i?(i.isPresent=o,r||e.layoutDependency!==t||void 0===t?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||Yt.postRender((()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Hi.postRender((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Gi(e){const[t,n]=Ye(),r=(0,d.useContext)(Ie);return(0,u.jsx)($i,{...e,layoutGroup:r,switchLayoutGroup:(0,d.useContext)(Ui),isPresent:t,safeToRemove:n})}const Ki={borderRadius:{...Qi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Qi,borderTopRightRadius:Qi,borderBottomLeftRadius:Qi,borderBottomRightRadius:Qi,boxShadow:Vi},Zi=(e,t)=>e.depth-t.depth;class Xi{constructor(){this.children=[],this.isDirty=!1}add(e){Gt(this.children,e),this.isDirty=!0}remove(e){Kt(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Zi),this.isDirty=!1,this.children.forEach(e)}}function Ji(e){const t=rn(e)?e.get():e;return n=t,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?t.toValue():t;var n}const ea=["TopLeft","TopRight","BottomLeft","BottomRight"],ta=ea.length,na=e=>"string"==typeof e?parseFloat(e):e,ra=e=>"number"==typeof e||Pn.test(e);function oa(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const ia=sa(0,.5,vn),aa=sa(.5,.95,Pt);function sa(e,t,n){return r=>r<e?0:r>t?1:n(yt(e,t,r))}function la(e,t){e.min=t.min,e.max=t.max}function ca(e,t){la(e.x,t.x),la(e.y,t.y)}function ua(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function da(e,t,n,r,o){return e=ki(e-=t,1/n,r),void 0!==o&&(e=ki(e,1/o,r)),e}function fa(e,t,[n,r,o],i,a){!function(e,t=0,n=1,r=.5,o,i=e,a=e){if(_n.test(t)&&(t=parseFloat(t),t=Ur(a.min,a.max,t/100)-a.min),"number"!=typeof t)return;let s=Ur(i.min,i.max,r);e===i&&(s-=t),e.min=da(e.min,t,n,s,o),e.max=da(e.max,t,n,s,o)}(e,t[n],t[r],t[o],t.scale,i,a)}const ma=["x","scaleX","originX"],ha=["y","scaleY","originY"];function pa(e,t,n,r){fa(e.x,t,ma,n?n.x:void 0,r?r.x:void 0),fa(e.y,t,ha,n?n.y:void 0,r?r.y:void 0)}function ga(e){return 0===e.translate&&1===e.scale}function ya(e){return ga(e.x)&&ga(e.y)}function va(e,t){return e.min===t.min&&e.max===t.max}function ba(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function wa(e,t){return ba(e.x,t.x)&&ba(e.y,t.y)}function xa(e){return ai(e.x)/ai(e.y)}function Ma(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Ea{constructor(){this.members=[]}add(e){Gt(this.members,e),e.scheduleRender()}remove(e){if(Kt(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let e=t;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Na={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},ka="undefined"!=typeof window&&void 0!==window.MotionDebug,ja=["","X","Y","Z"],Da={visibility:"hidden"};let Ta=0;function Sa(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Ca(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ln(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Yt,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Ca(r)}function Ra({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=Ta++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,ka&&(Na.totalNodes=Na.resolvedTargetDeltas=Na.recalculatedProjection=0),this.nodes.forEach(Ia),this.nodes.forEach(Ba),this.nodes.forEach(Ya),this.nodes.forEach(_a),ka&&window.MotionDebug.record(Na)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Xi)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Zt),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;var r;this.isSVG=(r=t)instanceof SVGElement&&"svg"!==r.tagName,this.instance=t;const{layoutId:o,layout:i,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||o)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=$t.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Qt(r),e(i-t))};return Yt.read(r,!0),()=>Qt(r)}(r,250),Bi.hasAnimatedSinceResize&&(Bi.hasAnimatedSinceResize=!1,this.nodes.forEach(Ua))}))}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&a&&(o||i)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||a.getDefaultTransition()||$a,{onLayoutAnimationStart:i,onLayoutAnimationComplete:s}=a.getProps(),l=!this.targetLayout||!wa(this.targetLayout,r)||n,c=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);const t={...lt(o,"layout"),onPlay:i,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||Ua(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Qt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Qa),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ca(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){const t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(La);this.isUpdating||this.nodes.forEach(za),this.isUpdating=!1,this.nodes.forEach(Fa),this.nodes.forEach(Oa),this.nodes.forEach(Aa),this.clearAllSnapshots();const e=$t.now();Vt.delta=xn(0,1e3/60,e-Vt.timestamp),Vt.timestamp=e,Vt.isProcessing=!0,Wt.update.process(Vt),Wt.preRender.process(Vt),Wt.render.process(Vt),Vt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Hi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Pa),this.sharedNodes.forEach(Va)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Yt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Yt.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!ya(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,i=r!==this.prevTransformTemplateValue;e&&(t||Mi(this.latestValues)||i)&&(o(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),Za((r=n).x),Za(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const n=t.measureViewportBox();if(!(null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)&&!this.path.some(Ja)){const{scroll:e}=this.root;e&&(Ri(n.x,e.offset.x),Ri(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n={x:{min:0,max:0},y:{min:0,max:0}};if(ca(n,e),null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)return n;for(let t=0;t<this.path.length;t++){const r=this.path[t],{scroll:o,options:i}=r;r!==this.root&&o&&i.layoutScroll&&(o.wasRoot&&ca(n,e),Ri(n.x,o.offset.x),Ri(n.y,o.offset.y))}return n}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};ca(n,e);for(let e=0;e<this.path.length;e++){const r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&Ai(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),Mi(r.latestValues)&&Ai(n,r.latestValues)}return Mi(this.latestValues)&&Ai(n,this.latestValues),n}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};ca(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!n.instance)continue;if(!Mi(n.latestValues))continue;xi(n.latestValues)&&n.updateSnapshot();const r={x:{min:0,max:0},y:{min:0,max:0}};ca(r,n.measurePageBox()),pa(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return Mi(this.latestValues)&&pa(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Vt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:o,layoutId:i}=this.options;if(this.layout&&(o||i)){if(this.resolvedRelativeTargetAt=Vt.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},di(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),ca(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var a,s,l;if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),a=this.target,s=this.relativeTarget,l=this.relativeParent.target,ci(a.x,s.x,l.x),ci(a.y,s.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):ca(this.target,this.layout.layoutBox),Ti(this.target,this.targetDelta)):ca(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},di(this.relativeTargetOrigin,this.target,e.target),ca(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}ka&&Na.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!xi(this.parent.latestValues)&&!Ei(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===Vt.timestamp&&(r=!1),r)return;const{layout:o,layoutId:i}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!o&&!i)return;ca(this.layoutCorrected,this.layout.layoutBox);const a=this.treeScale.x,s=this.treeScale.y;!function(e,t,n,r=!1){const o=n.length;if(!o)return;let i,a;t.x=t.y=1;for(let s=0;s<o;s++){i=n[s],a=i.projectionDelta;const{visualElement:o}=i.options;o&&o.props.style&&"contents"===o.props.style.display||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Ai(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Ti(e,a)),r&&Mi(i.latestValues)&&Ai(e,i.latestValues))}t.x<Ci&&t.x>Si&&(t.x=1),t.y<Ci&&t.y>Si&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(ua(this.prevProjectionDelta.x,this.projectionDelta.x),ua(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),li(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===a&&this.treeScale.y===s&&Ma(this.projectionDelta.x,this.prevProjectionDelta.x)&&Ma(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),ka&&Na.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null===(t=this.options.visualElement)||void 0===t||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},o={...this.latestValues},i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const a={x:{min:0,max:0},y:{min:0,max:0}},s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(s&&!c&&!0===this.options.crossfade&&!this.path.some(qa));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;Wa(i.x,e.x,n),Wa(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(di(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(e,t,n,r){Ha(e.x,t.x,n.x,r),Ha(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,a,n),d&&function(e,t){return va(e.x,t.x)&&va(e.y,t.y)}(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),ca(d,this.relativeTarget)),s&&(this.animationValues=o,function(e,t,n,r,o,i){o?(e.opacity=Ur(0,void 0!==n.opacity?n.opacity:1,ia(r)),e.opacityExit=Ur(void 0!==t.opacity?t.opacity:1,0,aa(r))):i&&(e.opacity=Ur(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let o=0;o<ta;o++){const i=`border${ea[o]}Radius`;let a=oa(t,i),s=oa(n,i);void 0===a&&void 0===s||(a||(a=0),s||(s=0),0===a||0===s||ra(a)===ra(s)?(e[i]=Math.max(Ur(na(a),na(s),r),0),(_n.test(s)||_n.test(a))&&(e[i]+="%")):e[i]=s)}(t.rotate||n.rotate)&&(e.rotate=Ur(t.rotate||0,n.rotate||0,r))}(o,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Qt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Yt.update((()=>{Bi.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=rn(0)?0:tn(0);return r.start(Ao("",r,1e3,n)),r.animation}(0,0,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&Xa(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=ai(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=ai(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}ca(t,n),Ai(t,o),li(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Ea),this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&Sa("z",e,r,this.animationValues);for(let t=0;t<ja.length;t++)Sa(`rotate${ja[t]}`,e,r,this.animationValues),Sa(`skew${ja[t]}`,e,r,this.animationValues);e.render();for(const t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}getProjectionStyles(e){var t,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Da;const r={visibility:""},o=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=Ji(null==e?void 0:e.pointerEvents)||"",r.transform=o?o(this.latestValues,""):"none",r;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Ji(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!Mi(this.latestValues)&&(t.transform=o?o({},""):"none",this.hasProjected=!1),t}const a=i.animationValues||i.latestValues;this.applyTransformsToTarget(),r.transform=function(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=(null==n?void 0:n.z)||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:o,rotateY:i,skewX:a,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),o&&(r+=`rotateX(${o}deg) `),i&&(r+=`rotateY(${i}deg) `),a&&(r+=`skewX(${a}deg) `),s&&(r+=`skewY(${s}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return 1===s&&1===l||(r+=`scale(${s}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,a),o&&(r.transform=o(a,r.transform));const{x:s,y:l}=this.projectionDelta;r.transformOrigin=`${100*s.origin}% ${100*l.origin}% 0`,i.animationValues?r.opacity=i===this?null!==(n=null!==(t=a.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:r.opacity=i===this?void 0!==a.opacity?a.opacity:"":void 0!==a.opacityExit?a.opacityExit:0;for(const e in Wi){if(void 0===a[e])continue;const{correct:t,applyTo:n}=Wi[e],o="none"===r.transform?a[e]:t(a[e],i);if(n){const e=n.length;for(let t=0;t<e;t++)r[n[t]]=o}else r[e]=o}return this.options.layoutId&&(r.pointerEvents=i===this?Ji(null==e?void 0:e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(La),this.root.sharedNodes.clear()}}}function Oa(e){e.updateLayout()}function Aa(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:o}=e.options,i=n.source!==e.layout.source;"size"===o?vi((e=>{const r=i?n.measuredBox[e]:n.layoutBox[e],o=ai(r);r.min=t[e].min,r.max=r.min+o})):Xa(o,n.layoutBox,t)&&vi((r=>{const o=i?n.measuredBox[r]:n.layoutBox[r],a=ai(t[r]);o.max=o.min+a,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+a)}));const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};li(a,t,n.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};i?li(s,e.applyTransform(r,!0),n.measuredBox):li(s,t,n.layoutBox);const l=!ya(a);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:i}=r;if(o&&i){const a={x:{min:0,max:0},y:{min:0,max:0}};di(a,n.layoutBox,o.layoutBox);const s={x:{min:0,max:0},y:{min:0,max:0}};di(s,t,i.layoutBox),wa(a,s)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=a,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Ia(e){ka&&Na.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function _a(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Pa(e){e.clearSnapshot()}function La(e){e.clearMeasurements()}function za(e){e.isLayoutDirty=!1}function Fa(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ua(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Ba(e){e.resolveTargetDelta()}function Ya(e){e.calcProjection()}function Qa(e){e.resetSkewAndRotation()}function Va(e){e.removeLeadSnapshot()}function Wa(e,t,n){e.translate=Ur(t.translate,0,n),e.scale=Ur(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Ha(e,t,n,r){e.min=Ur(t.min,n.min,r),e.max=Ur(t.max,n.max,r)}function qa(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const $a={duration:.45,ease:[.4,0,.1,1]},Ga=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ka=Ga("applewebkit/")&&!Ga("chrome/")?Math.round:Pt;function Za(e){e.min=Ka(e.min),e.max=Ka(e.max)}function Xa(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=xa(t),o=xa(n),!(Math.abs(r-o)<=.2));var r,o}function Ja(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}const es=Ra({attachResizeListener:(e,t)=>$o(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ts={current:void 0},ns=Ra({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ts.current){const e=new es({});e.mount(window),e.setOptions({layoutScroll:!0}),ts.current=e}return ts.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),rs={pan:{Feature:class extends Wo{constructor(){super(...arguments),this.removePointerDownListener=Pt}onPointerDown(e){this.session=new Xo(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:_i(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Fi(e),onStart:Fi(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&Yt.postRender((()=>r(e,t)))}}}mount(){this.removePointerDownListener=Ko(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Wo{constructor(e){super(e),this.removeGroupControls=Pt,this.removeListeners=Pt,this.controls=new Li(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Pt}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:ns,MeasureLayout:Gi}};function os(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const o=r["onHover"+n];o&&Yt.postRender((()=>o(t,Go(t))))}function is(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const o=r["onTap"+("End"===n?"":n)];o&&Yt.postRender((()=>o(t,Go(t))))}const as=new WeakMap,ss=new WeakMap,ls=e=>{const t=as.get(e.target);t&&t(e)},cs=e=>{e.forEach(ls)};const us={some:0,all:1},ds={inView:{Feature:class extends Wo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:o}=e,i={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:us[r]};return function(e,t,n){const r=function({root:e,...t}){const n=e||document;ss.has(n)||ss.set(n,{});const r=ss.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(cs,{root:e,...t})),r[o]}(t);return as.set(e,n),r.observe(e),()=>{as.delete(e),r.unobserve(e)}}(this.node.current,i,(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,o&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),i=t?n:r;i&&i(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Wo{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[r,o,i]=kt(e,n),a=e=>{const r=e.currentTarget;if(!At(e)||Ct.has(r))return;Ct.add(r);const i=t(e),a=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",l),At(e)&&Ct.has(r)&&(Ct.delete(r),"function"==typeof i&&i(e,{success:t}))},s=e=>{a(e,n.useGlobalTarget||Dt(r,e.target))},l=e=>{a(e,!1)};window.addEventListener("pointerup",s,o),window.addEventListener("pointercancel",l,o)};return r.forEach((e=>{(function(e){return St.has(e.tagName)||-1!==e.tabIndex})(e)||null!==e.getAttribute("tabindex")||(e.tabIndex=0),(n.useGlobalTarget?window:e).addEventListener("pointerdown",a,o),e.addEventListener("focus",(e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=Rt((()=>{if(Ct.has(n))return;Ot(n,"down");const e=Rt((()=>{Ot(n,"up")}));n.addEventListener("keyup",e,t),n.addEventListener("blur",(()=>Ot(n,"cancel")),t)}));n.addEventListener("keydown",r,t),n.addEventListener("blur",(()=>n.removeEventListener("keydown",r)),t)})(e,o)),o)})),i}(e,(e=>(is(this.node,e,"Start"),(e,{success:t})=>is(this.node,e,t?"End":"Cancel"))),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends Wo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=$r($o(this.node.current,"focus",(()=>this.onFocus())),$o(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends Wo{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[r,o,i]=kt(e,n),a=jt((e=>{const{target:n}=e,r=t(e);if("function"!=typeof r||!n)return;const i=jt((e=>{r(e),n.removeEventListener("pointerleave",i)}));n.addEventListener("pointerleave",i,o)}));return r.forEach((e=>{e.addEventListener("pointerenter",a,o)})),i}(e,(e=>(os(this.node,e,"Start"),e=>os(this.node,e,"End")))))}unmount(){}}}},fs={layout:{ProjectionNode:ns,MeasureLayout:Gi}},ms=(0,d.createContext)({strict:!1}),hs=(0,d.createContext)({});function ps(e){return Ge(e.animate)||rt.some((t=>Xe(e[t])))}function gs(e){return Boolean(ps(e)||e.variants)}function ys(e){return Array.isArray(e)?e.join(" "):e}const vs={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},bs={};for(const e in vs)bs[e]={isEnabled:t=>vs[e].some((e=>!!t[e]))};const ws=Symbol.for("motionComponentSymbol");function xs(e,t,n){return(0,d.useCallback)((r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):ii(n)&&(n.current=r))}),[t])}function Ms(e,t,n,r,o){var i,a;const{visualElement:s}=(0,d.useContext)(hs),l=(0,d.useContext)(ms),c=(0,d.useContext)(Pe),u=(0,d.useContext)(Le).reducedMotion,f=(0,d.useRef)(null);r=r||l.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:s,props:n,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:u}));const m=f.current,h=(0,d.useContext)(Ui);!m||m.projection||!o||"html"!==m.type&&"svg"!==m.type||function(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Es(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:Boolean(a)||s&&ii(s),visualElement:e,animationType:"string"==typeof i?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}(f.current,n,o,h);const p=(0,d.useRef)(!1);(0,d.useInsertionEffect)((()=>{m&&p.current&&m.update(n,c)}));const g=n[sn],y=(0,d.useRef)(Boolean(g)&&!(null===(i=window.MotionHandoffIsComplete)||void 0===i?void 0:i.call(window,g))&&(null===(a=window.MotionHasOptimisedAnimation)||void 0===a?void 0:a.call(window,g)));return He((()=>{m&&(p.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),Hi.render(m.render),y.current&&m.animationState&&m.animationState.animateChanges())})),(0,d.useEffect)((()=>{m&&(!y.current&&m.animationState&&m.animationState.animateChanges(),y.current&&(queueMicrotask((()=>{var e;null===(e=window.MotionHandoffMarkAsComplete)||void 0===e||e.call(window,g)})),y.current=!1))})),m}function Es(e){if(e)return!1!==e.options.allowProjection?e.projection:Es(e.parent)}function Ns({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var i,a;function s(e,i){let a;const s={...(0,d.useContext)(Le),...e,layoutId:ks(e)},{isStatic:l}=s,c=function(e){const{initial:t,animate:n}=function(e,t){if(ps(e)){const{initial:t,animate:n}=e;return{initial:!1===t||Xe(t)?t:void 0,animate:Xe(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,d.useContext)(hs));return(0,d.useMemo)((()=>({initial:t,animate:n})),[ys(t),ys(n)])}(e),f=r(e,l);if(!l&&We){(0,d.useContext)(ms).strict;const e=function(e){const{drag:t,layout:n}=bs;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(s);a=e.MeasureLayout,c.visualElement=Ms(o,f,s,t,e.ProjectionNode)}return(0,u.jsxs)(hs.Provider,{value:c,children:[a&&c.visualElement?(0,u.jsx)(a,{visualElement:c.visualElement,...s}):null,n(o,e,xs(f,c.visualElement,i),f,l,c.visualElement)]})}e&&function(e){for(const t in e)bs[t]={...bs[t],...e[t]}}(e),s.displayName=`motion.${"string"==typeof o?o:`create(${null!==(a=null!==(i=o.displayName)&&void 0!==i?i:o.name)&&void 0!==a?a:""})`}`;const l=(0,d.forwardRef)(s);return l[ws]=o,l}function ks({layoutId:e}){const t=(0,d.useContext)(Ie).id;return t&&void 0!==e?t+"-"+e:e}const js=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ds(e){return"string"==typeof e&&!e.includes("-")&&!!(js.indexOf(e)>-1||/[A-Z]/u.test(e))}const Ts=e=>(t,n)=>{const r=(0,d.useContext)(hs),o=(0,d.useContext)(Pe),i=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const a={latestValues:Ss(r,o,i,e),renderState:t()};return n&&(a.onMount=e=>n({props:r,current:e,...a}),a.onUpdate=e=>n(e)),a}(e,t,r,o);return n?i():_e(i)};function Ss(e,t,n,r){const o={},i=r(e,{});for(const e in i)o[e]=Ji(i[e]);let{initial:a,animate:s}=e;const l=ps(e),c=gs(e);t&&c&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===s&&(s=t.animate));let u=!!n&&!1===n.initial;u=u||!1===a;const d=u?s:a;if(d&&"boolean"!=typeof d&&!Ge(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=et(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const e in n){let t=n[e];Array.isArray(t)&&(t=t[u?t.length-1:0]),null!==t&&(o[e]=t)}for(const t in e)o[t]=e[t]}}}return o}const Cs=(e,t)=>t&&"number"==typeof e?t.transform(e):e,Rs={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Os=Lt.length;function As(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let a=!1,s=!1;for(const e in t){const n=t[e];if(zt.has(e))a=!0;else if(kr(e))o[e]=n;else{const t=Cs(n,or[e]);e.startsWith("origin")?(s=!0,i[e]=t):r[e]=t}}if(t.transform||(a||n?r.transform=function(e,t,n){let r="",o=!0;for(let i=0;i<Os;i++){const a=Lt[i],s=e[a];if(void 0===s)continue;let l=!0;if(l="number"==typeof s?s===(a.startsWith("scale")?1:0):0===parseFloat(s),!l||n){const e=Cs(s,or[a]);l||(o=!1,r+=`${Rs[a]||a}(${e}) `),n&&(t[a]=e)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:e="50%",originY:t="50%",originZ:n=0}=i;r.transformOrigin=`${e} ${t} ${n}`}}const Is={offset:"stroke-dashoffset",array:"stroke-dasharray"},_s={offset:"strokeDashoffset",array:"strokeDasharray"};function Ps(e,t,n){return"string"==typeof e?e:Pn.transform(t+n*e)}function Ls(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...c},u,d){if(As(e,c,d),u)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:f,style:m,dimensions:h}=e;f.transform&&(h&&(m.transform=f.transform),delete f.transform),h&&(void 0!==o||void 0!==i||m.transform)&&(m.transformOrigin=function(e,t,n){return`${Ps(t,e.x,e.width)} ${Ps(n,e.y,e.height)}`}(h,void 0!==o?o:.5,void 0!==i?i:.5)),void 0!==t&&(f.x=t),void 0!==n&&(f.y=n),void 0!==r&&(f.scale=r),void 0!==a&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?Is:_s;e[i.offset]=Pn.transform(-r);const a=Pn.transform(t),s=Pn.transform(n);e[i.array]=`${a} ${s}`}(f,a,s,l,!1)}const zs=e=>"string"==typeof e&&"svg"===e.toLowerCase();function Fs(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const t in n)e.style.setProperty(t,n[t])}const Us=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Bs(e,t,n,r){Fs(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(Us.has(n)?n:an(n),t.attrs[n])}function Ys(e,{layout:t,layoutId:n}){return zt.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Wi[e]||"opacity"===e)}function Qs(e,t,n){var r;const{style:o}=e,i={};for(const a in o)(rn(o[a])||t.style&&rn(t.style[a])||Ys(a,e)||void 0!==(null===(r=null==n?void 0:n.getValue(a))||void 0===r?void 0:r.liveStyle))&&(i[a]=o[a]);return i}function Vs(e,t,n){const r=Qs(e,t,n);for(const n in e)(rn(e[n])||rn(t[n]))&&(r[-1!==Lt.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]);return r}const Ws=["x","y","width","height","cx","cy","r"],Hs={useVisualState:Ts({scrapeMotionValuesFromProps:Vs,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let i=!!e.drag;if(!i)for(const e in o)if(zt.has(e)){i=!0;break}if(!i)return;let a=!t;if(t)for(let n=0;n<Ws.length;n++){const r=Ws[n];e[r]!==t[r]&&(a=!0)}a&&Yt.read((()=>{!function(e,t){try{t.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(e){t.dimensions={x:0,y:0,width:0,height:0}}}(n,r),Yt.render((()=>{Ls(r,o,zs(n.tagName),e.transformTemplate),Bs(n,r)}))}))}})},qs={useVisualState:Ts({scrapeMotionValuesFromProps:Qs,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{}})})};function $s(e,t,n){for(const r in t)rn(t[r])||Ys(r,n)||(e[r]=t[r])}function Gs(e,t){const n={},r=function(e,t){const n={};return $s(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return(0,d.useMemo)((()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return As(n,t,e),Object.assign({},n.vars,n.style)}),[t])}(e,t)),n}(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Ks=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Zs(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Ks.has(e)}let Xs=e=>!Zs(e);try{(Js=require("@emotion/is-prop-valid").default)&&(Xs=e=>e.startsWith("on")?!Zs(e):Js(e))}catch(e){}var Js;function el(e,t,n,r){const o=(0,d.useMemo)((()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Ls(n,t,zs(r),e.transformTemplate),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};$s(t,e.style,e),o.style={...t,...o.style}}return o}function tl(e=!1){return(t,n,r,{latestValues:o},i)=>{const a=(Ds(t)?el:Gs)(n,o,i,t),s=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||(Xs(o)||!0===n&&Zs(o)||!t&&!Zs(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(n,"string"==typeof t,e),l=t!==d.Fragment?{...s,...a,ref:r}:{},{children:c}=n,u=(0,d.useMemo)((()=>rn(c)?c.get():c),[c]);return(0,d.createElement)(t,{...l,children:u})}}function nl(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return Ns({...Ds(n)?Hs:qs,preloadedFeatures:e,useRender:tl(r),createVisualElement:t,Component:n})}}const rl={current:null},ol={current:!1},il=[...Or,Bn,Kn],al=new WeakMap,sl=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ll{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:o,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=wr,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=$t.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Yt.render(this.render,!1,!0))};const{latestValues:s,renderState:l,onUpdate:c}=i;this.onUpdate=c,this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=a,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=ps(t),this.isVariantNode=gs(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in d){const t=d[e];void 0!==s[e]&&rn(t)&&t.set(s[e],!1)}}mount(e){this.current=e,al.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),ol.current||function(){if(ol.current=!0,We)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>rl.current=e.matches;e.addListener(t),t()}else rl.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||rl.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){al.delete(this.current),this.projection&&this.projection.unmount(),Qt(this.notifyUpdate),Qt(this.render),this.valueSubscriptions.forEach((e=>e())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=zt.has(e),r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&Yt.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),o=t.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,(()=>{r(),o(),i&&i(),t.owner&&t.stop()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in bs){const t=bs[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<sl.length;t++){const n=sl[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const o=t[r],i=n[r];if(rn(o))e.addValue(r,o);else if(rn(i))e.addValue(r,tn(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(o):t.hasAnimated||t.set(o)}else{const t=e.getStaticValue(r);e.addValue(r,tn(void 0!==t?t:o,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=tn(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let r=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=r&&("string"==typeof r&&(Er(r)||wn(r))?r=parseFloat(r):(o=r,!il.find(Rr(o))&&Kn.test(t)&&(r=sr(e,t))),this.setBaseTarget(e,rn(r)?r.get():r)),rn(r)?r.get():r;var o}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let r;if("string"==typeof n||"object"==typeof n){const o=et(this.props,n,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);o&&(r=o[e])}if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||rn(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new Zt),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class cl extends ll{constructor(){super(...arguments),this.KeyframeResolver=Ir}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;rn(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}}class ul extends cl{constructor(){super(...arguments),this.type="html",this.renderInstance=Fs}readValueFromInstance(e,t){if(zt.has(t)){const e=ar(t);return e&&e.default||0}{const r=(n=e,window.getComputedStyle(n)),o=(kr(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return Ii(e,t)}build(e,t,n){As(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Qs(e,t,n)}}class dl extends cl{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=yi}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(zt.has(t)){const e=ar(t);return e&&e.default||0}return t=Us.has(t)?t:an(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Vs(e,t,n)}build(e,t,n){Ls(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){Bs(e,t,0,r)}mount(e){this.isSVGTag=zs(e.tagName),super.mount(e)}}const fl=$e(nl({...qo,...ds,...rs,...fs},((e,t)=>Ds(e)?new dl(t):new ul(t,{allowProjection:e!==d.Fragment}))));let ml=!1;const hl=({toastItem:e,title:t="",content:n="",autoDismiss:r=!0,dismissAfter:o=5e3,theme:i="light",design:a="stack",icon:s,variant:l="neutral",removeToast:c})=>{const f=(0,d.useRef)(0),m=(0,d.useRef)(0),h=(0,d.useRef)(),p=(e,t=o)=>{if(r&&!(o<0))return f.current=(new Date).getTime(),setTimeout((()=>{"function"==typeof c&&c(e.id)}),t)};(0,d.useEffect)((()=>{const t=o;return h.current=p(e,t),()=>{clearTimeout(h.current)}}),[]),(0,d.useEffect)((()=>{!e?.dismiss||"function"!=typeof c||c(e.id)}),[e]);const g=()=>{"function"==typeof c&&e?.action?.onClick?.((()=>c(e.id)))};let v=null;return"stack"===a&&(v=(0,u.jsx)("div",{className:he("flex items-center justify-start p-4 gap-2 relative border border-solid rounded-md shadow-lg","dark"===i?Re:Ce?.[l],"w-[22.5rem]"),onMouseEnter:()=>{clearTimeout(h.current),m.current=(new Date).getTime()},onMouseLeave:()=>{h.current=p(e,o-(m.current-f.current))},children:"custom"!==e.type?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:Ne({variant:l,icon:s,theme:i})}),(0,u.jsxs)("div",{className:"flex flex-col items-start justify-start gap-0.5 mr-6",children:[je({title:t,theme:i}),De({content:n,theme:i}),e?.action?.label&&"function"==typeof e?.action?.onClick&&(0,u.jsx)("div",{className:"mt-2.5",children:ke({actionLabel:e?.action?.label,actionType:e?.action?.type??"button",onAction:g,theme:i})})]}),(0,u.jsx)("div",{className:"absolute right-4 top-4 [&_svg]:size-5",children:(0,u.jsx)("button",{className:he("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",Oe[i]??Oe.light),onClick:t=>{t.preventDefault(),t.stopPropagation(),"function"==typeof c&&c(e.id)},children:(0,u.jsx)(y,{})})})]}):e?.jsx?.({close:()=>c(e.id),action:e?.action?{...e?.action,onClick:g}:null})})),"inline"===a&&(v=(0,u.jsxs)("div",{className:he("flex items-center justify-start p-3 gap-2 relative border border-solid rounded-md shadow-lg","dark"===i?Re:Ce?.[l],"lg:w-[47.5rem] w-full"),children:[(0,u.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:Ne({variant:l,icon:s,theme:i})}),(0,u.jsxs)("div",{className:"flex items-start justify-start gap-1 mr-10 [&>span:first-child]:shrink-0",children:[je({title:t,theme:i}),De({content:n,theme:i})]}),(0,u.jsx)("div",{className:"absolute right-3 top-3 [&_svg]:size-5",children:(0,u.jsx)("button",{className:he("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",Oe[i]??Oe.light),onClick:()=>c(e.id),children:(0,u.jsx)(y,{})})})]})),v},pl=(e=>(0,d.memo)((t=>{const n=t.singleTon;return ml&&n?null:(ml=!0,(0,u.jsx)(e,{...t}))})))((({position:e="top-right",design:t="stack",theme:n="light",className:r="",autoDismiss:o=!0,dismissAfter:i=5e3})=>{const[a,s]=(0,d.useState)([]);(0,d.useEffect)((()=>{l.subscribe((e=>{e?.dismiss?s((t=>t.map((t=>t.id===e.id?{...t,dismiss:!0}:t)))):setTimeout((()=>{(0,Ae.flushSync)((()=>s((t=>-1!==t.findIndex((t=>t.id===e.id))?t.map((t=>t.id===e.id?{...t,...e}:t)):[...t,e]))))}))}))}),[]);const c=e=>{s((t=>t.filter((t=>t.id!==e))))};return(0,u.jsx)("ul",{className:he("fui-toast-container fixed flex flex-col list-none z-20 p-10 pointer-events-none [&>li]:pointer-events-auto gap-3",Se[e]??Se["top-right"],r),children:(0,u.jsx)(qe,{initial:!1,children:a.map((e=>(0,u.jsx)(fl.li,{initial:{opacity:0,y:50,scale:.7},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.6,transition:{duration:.15}},layoutId:`toast-${e.id}`,children:(0,u.jsx)(hl,{toastItem:e,title:e.title,content:e?.description,icon:e?.icon??void 0,design:e?.design??t,autoDismiss:e?.autoDismiss??o,dismissAfter:e?.dismissAfter??i,removeToast:c,variant:e.type,theme:e?.theme??n})},e.id)))})})}));var gl={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},yl=new class{#n=gl;#r=!1;setTimeoutProvider(e){this.#n=e}setTimeout(e,t){return this.#n.setTimeout(e,t)}clearTimeout(e){this.#n.clearTimeout(e)}setInterval(e,t){return this.#n.setInterval(e,t)}clearInterval(e){this.#n.clearInterval(e)}},vl="undefined"==typeof window||"Deno"in globalThis;function bl(){}function wl(e){return"number"==typeof e&&e>=0&&e!==1/0}function xl(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ml(e,t){return"function"==typeof e?e(t):e}function El(e,t){return"function"==typeof e?e(t):e}function Nl(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:a,stale:s}=e;if(a)if(r){if(t.queryHash!==jl(a,t.options))return!1}else if(!Tl(t.queryKey,a))return!1;if("all"!==n){const e=t.isActive();if("active"===n&&!e)return!1;if("inactive"===n&&e)return!1}return!("boolean"==typeof s&&t.isStale()!==s||o&&o!==t.state.fetchStatus||i&&!i(t))}function kl(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Dl(t.options.mutationKey)!==Dl(i))return!1}else if(!Tl(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function jl(e,t){return(t?.queryKeyHashFn||Dl)(e)}function Dl(e){return JSON.stringify(e,((e,t)=>Al(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t))}function Tl(e,t){return e===t||typeof e==typeof t&&!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&Object.keys(t).every((n=>Tl(e[n],t[n])))}var Sl=Object.prototype.hasOwnProperty;function Cl(e,t){if(e===t)return e;const n=Ol(e)&&Ol(t);if(!(n||Al(e)&&Al(t)))return t;const r=(n?e:Object.keys(e)).length,o=n?t:Object.keys(t),i=o.length,a=n?new Array(i):{};let s=0;for(let l=0;l<i;l++){const i=n?l:o[l],c=e[i],u=t[i];if(c===u){a[i]=c,(n?l<r:Sl.call(e,i))&&s++;continue}if(null===c||null===u||"object"!=typeof c||"object"!=typeof u){a[i]=u;continue}const d=Cl(c,u);a[i]=d,d===c&&s++}return r===i&&s===r?e:a}function Rl(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Ol(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Al(e){if(!Il(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!!Il(n)&&!!n.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype}function Il(e){return"[object Object]"===Object.prototype.toString.call(e)}function _l(e,t,n){return"function"==typeof n.structuralSharing?n.structuralSharing(e,t):!1!==n.structuralSharing?Cl(e,t):t}function Pl(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Ll(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var zl=Symbol();function Fl(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==zl?e.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))}function Ul(e,t){return"function"==typeof e?e(...t):!!e}var Bl=function(e){setTimeout(e,0)},Yl=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()},o=Bl;const i=r=>{t?e.push(r):o((()=>{n(r)}))};return{batch:i=>{let a;t++;try{a=i()}finally{t--,t||(()=>{const t=e;e=[],t.length&&o((()=>{r((()=>{t.forEach((e=>{n(e)}))}))}))})()}return a},batchCalls:e=>(...t)=>{i((()=>{e(...t)}))},schedule:i,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{o=e}}}(),Ql=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Vl=new class extends Ql{#o;#i;#a;constructor(){super(),this.#a=e=>{if(!vl&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#i||this.setEventListener(this.#a)}onUnsubscribe(){this.hasListeners()||(this.#i?.(),this.#i=void 0)}setEventListener(e){this.#a=e,this.#i?.(),this.#i=e((e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()}))}setFocused(e){this.#o!==e&&(this.#o=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach((t=>{t(e)}))}isFocused(){return"boolean"==typeof this.#o?this.#o:"hidden"!==globalThis.document?.visibilityState}},Wl=new class extends Ql{#s=!0;#i;#a;constructor(){super(),this.#a=e=>{if(!vl&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#i||this.setEventListener(this.#a)}onUnsubscribe(){this.hasListeners()||(this.#i?.(),this.#i=void 0)}setEventListener(e){this.#a=e,this.#i?.(),this.#i=e(this.setOnline.bind(this))}setOnline(e){this.#s!==e&&(this.#s=e,this.listeners.forEach((t=>{t(e)})))}isOnline(){return this.#s}};function Hl(){let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.status="pending",n.catch((()=>{})),n.resolve=t=>{r({status:"fulfilled",value:t}),e(t)},n.reject=e=>{r({status:"rejected",reason:e}),t(e)},n}function ql(e){return Math.min(1e3*2**e,3e4)}function $l(e){return"online"!==(e??"online")||Wl.isOnline()}var Gl=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Kl(e){let t,n=!1,r=0;const o=Hl(),i=()=>"pending"!==o.status,a=()=>Vl.isFocused()&&("always"===e.networkMode||Wl.isOnline())&&e.canRun(),s=()=>$l(e.networkMode)&&e.canRun(),l=e=>{i()||(t?.(),o.resolve(e))},c=e=>{i()||(t?.(),o.reject(e))},u=()=>new Promise((n=>{t=e=>{(i()||a())&&n(e)},e.onPause?.()})).then((()=>{t=void 0,i()||e.onContinue?.()})),d=()=>{if(i())return;let t;const o=0===r?e.initialPromise:void 0;try{t=o??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(l).catch((t=>{if(i())return;const o=e.retry??(vl?0:3),s=e.retryDelay??ql,l="function"==typeof s?s(r,t):s,f=!0===o||"number"==typeof o&&r<o||"function"==typeof o&&o(r,t);var m;!n&&f?(r++,e.onFail?.(r,t),(m=l,new Promise((e=>{yl.setTimeout(e,m)}))).then((()=>a()?void 0:u())).then((()=>{n?c(t):d()}))):c(t)}))};return{promise:o,status:()=>o.status,cancel:t=>{if(!i()){const n=new Gl(t);c(n),e.onCancel?.(n)}},continue:()=>(t?.(),o),cancelRetry:()=>{n=!0},continueRetry:()=>{n=!1},canStart:s,start:()=>(s()?d():u().then(d),o)}}var Zl=class{#l;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),wl(this.gcTime)&&(this.#l=yl.setTimeout((()=>{this.optionalRemove()}),this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(vl?1/0:3e5))}clearGcTimeout(){this.#l&&(yl.clearTimeout(this.#l),this.#l=void 0)}},Xl=class extends Zl{#c;#u;#d;#f;#m;#h;#p;constructor(e){super(),this.#p=!1,this.#h=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#f=e.client,this.#d=this.#f.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#c=tc(this.options),this.state=e.state??this.#c,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#m?.promise}setOptions(e){if(this.options={...this.#h,...e},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){const e=tc(this.options);void 0!==e.data&&(this.setState(ec(e.data,e.dataUpdatedAt)),this.#c=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#d.remove(this)}setData(e,t){const n=_l(this.state.data,e,this.options);return this.#g({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#g({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#m?.promise;return this.#m?.cancel(e),t?t.then(bl).catch(bl):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#c)}isActive(){return this.observers.some((e=>!1!==El(e.options.enabled,this)))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===zl||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some((e=>"static"===Ml(e.options.staleTime,this)))}isStale(){return this.getObserversCount()>0?this.observers.some((e=>e.getCurrentResult().isStale)):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!xl(this.state.dataUpdatedAt,e))}onFocus(){const e=this.observers.find((e=>e.shouldFetchOnWindowFocus()));e?.refetch({cancelRefetch:!1}),this.#m?.continue()}onOnline(){const e=this.observers.find((e=>e.shouldFetchOnReconnect()));e?.refetch({cancelRefetch:!1}),this.#m?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#d.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter((t=>t!==e)),this.observers.length||(this.#m&&(this.#p?this.#m.cancel({revert:!0}):this.#m.cancelRetry()),this.scheduleGc()),this.#d.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#g({type:"invalidate"})}async fetch(e,t){if("idle"!==this.state.fetchStatus&&"rejected"!==this.#m?.status())if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#m)return this.#m.continueRetry(),this.#m.promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find((e=>e.options.queryFn));e&&this.setOptions(e.options)}const n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#p=!0,n.signal)})},o=()=>{const e=Fl(this.options,t),n=(()=>{const e={client:this.#f,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#p=!1,this.options.persister?this.options.persister(e,n,this):e(n)},i=(()=>{const e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#f,state:this.state,fetchFn:o};return r(e),e})();this.options.behavior?.onFetch(i,this),this.#u=this.state,"idle"!==this.state.fetchStatus&&this.state.fetchMeta===i.fetchOptions?.meta||this.#g({type:"fetch",meta:i.fetchOptions?.meta}),this.#m=Kl({initialPromise:t?.initialPromise,fn:i.fetchFn,onCancel:e=>{e instanceof Gl&&e.revert&&this.setState({...this.#u,fetchStatus:"idle"}),n.abort()},onFail:(e,t)=>{this.#g({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#g({type:"pause"})},onContinue:()=>{this.#g({type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0});try{const e=await this.#m.start();if(void 0===e)throw new Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#d.config.onSuccess?.(e,this),this.#d.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof Gl){if(e.silent)return this.#m.promise;if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw this.#g({type:"error",error:e}),this.#d.config.onError?.(e,this),this.#d.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#g(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...Jl(t.data,this.options),fetchMeta:e.meta??null};case"success":const n={...t,...ec(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#u=e.manual?n:void 0,n;case"error":const r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),Yl.batch((()=>{this.observers.forEach((e=>{e.onQueryUpdate()})),this.#d.notify({query:this,type:"updated",action:e})}))}};function Jl(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:$l(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function ec(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function tc(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,r=n?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var nc=class extends Ql{constructor(e={}){super(),this.config=e,this.#y=new Map}#y;build(e,t,n){const r=t.queryKey,o=t.queryHash??jl(r,t);let i=this.get(o);return i||(i=new Xl({client:e,queryKey:r,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(i)),i}add(e){this.#y.has(e.queryHash)||(this.#y.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#y.get(e.queryHash);t&&(e.destroy(),t===e&&this.#y.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Yl.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}get(e){return this.#y.get(e)}getAll(){return[...this.#y.values()]}find(e){const t={exact:!0,...e};return this.getAll().find((e=>Nl(t,e)))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter((t=>Nl(e,t))):t}notify(e){Yl.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}onFocus(){Yl.batch((()=>{this.getAll().forEach((e=>{e.onFocus()}))}))}onOnline(){Yl.batch((()=>{this.getAll().forEach((e=>{e.onOnline()}))}))}},rc=class extends Zl{#f;#v;#b;#m;constructor(e){super(),this.#f=e.client,this.mutationId=e.mutationId,this.#b=e.mutationCache,this.#v=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#v.includes(e)||(this.#v.push(e),this.clearGcTimeout(),this.#b.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#v=this.#v.filter((t=>t!==e)),this.scheduleGc(),this.#b.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#v.length||("pending"===this.state.status?this.scheduleGc():this.#b.remove(this))}continue(){return this.#m?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#g({type:"continue"})},n={client:this.#f,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#m=Kl({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{this.#g({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#g({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#b.canRun(this)});const r="pending"===this.state.status,o=!this.#m.canStart();try{if(r)t();else{this.#g({type:"pending",variables:e,isPaused:o}),await(this.#b.config.onMutate?.(e,this,n));const t=await(this.options.onMutate?.(e,n));t!==this.state.context&&this.#g({type:"pending",context:t,variables:e,isPaused:o})}const i=await this.#m.start();return await(this.#b.config.onSuccess?.(i,e,this.state.context,this,n)),await(this.options.onSuccess?.(i,e,this.state.context,n)),await(this.#b.config.onSettled?.(i,null,this.state.variables,this.state.context,this,n)),await(this.options.onSettled?.(i,null,e,this.state.context,n)),this.#g({type:"success",data:i}),i}catch(t){try{throw await(this.#b.config.onError?.(t,e,this.state.context,this,n)),await(this.options.onError?.(t,e,this.state.context,n)),await(this.#b.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)),await(this.options.onSettled?.(void 0,t,e,this.state.context,n)),t}finally{this.#g({type:"error",error:t})}}finally{this.#b.runNext(this)}}#g(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),Yl.batch((()=>{this.#v.forEach((t=>{t.onMutationUpdate(e)})),this.#b.notify({mutation:this,type:"updated",action:e})}))}},oc=class extends Ql{constructor(e={}){super(),this.config=e,this.#w=new Set,this.#x=new Map,this.#M=0}#w;#x;#M;build(e,t,n){const r=new rc({client:e,mutationCache:this,mutationId:++this.#M,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#w.add(e);const t=ic(e);if("string"==typeof t){const n=this.#x.get(t);n?n.push(e):this.#x.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#w.delete(e)){const t=ic(e);if("string"==typeof t){const n=this.#x.get(t);if(n)if(n.length>1){const t=n.indexOf(e);-1!==t&&n.splice(t,1)}else n[0]===e&&this.#x.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=ic(e);if("string"==typeof t){const n=this.#x.get(t),r=n?.find((e=>"pending"===e.state.status));return!r||r===e}return!0}runNext(e){const t=ic(e);if("string"==typeof t){const n=this.#x.get(t)?.find((t=>t!==e&&t.state.isPaused));return n?.continue()??Promise.resolve()}return Promise.resolve()}clear(){Yl.batch((()=>{this.#w.forEach((e=>{this.notify({type:"removed",mutation:e})})),this.#w.clear(),this.#x.clear()}))}getAll(){return Array.from(this.#w)}find(e){const t={exact:!0,...e};return this.getAll().find((e=>kl(t,e)))}findAll(e={}){return this.getAll().filter((t=>kl(e,t)))}notify(e){Yl.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}resumePausedMutations(){const e=this.getAll().filter((e=>e.state.isPaused));return Yl.batch((()=>Promise.all(e.map((e=>e.continue().catch(bl))))))}};function ic(e){return e.options.scope?.id}function ac(e){return{onFetch:(t,n)=>{const r=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],a=t.state.data?.pageParams||[];let s={pages:[],pageParams:[]},l=0;const c=async()=>{let n=!1;const c=Fl(t.options,t.fetchOptions),u=async(e,r,o)=>{if(n)return Promise.reject();if(null==r&&e.pages.length)return Promise.resolve(e);const i=(()=>{const e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:o?"backward":"forward",meta:t.options.meta};var i;return i=e,Object.defineProperty(i,"signal",{enumerable:!0,get:()=>(t.signal.aborted?n=!0:t.signal.addEventListener("abort",(()=>{n=!0})),t.signal)}),e})(),a=await c(i),{maxPages:s}=t.options,l=o?Ll:Pl;return{pages:l(e.pages,a,s),pageParams:l(e.pageParams,r,s)}};if(o&&i.length){const e="backward"===o,t={pages:i,pageParams:a},n=(e?lc:sc)(r,t);s=await u(t,n,e)}else{const t=e??i.length;do{const e=0===l?a[0]??r.initialPageParam:sc(r,s);if(l>0&&null==e)break;s=await u(s,e),l++}while(l<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=c}}}function sc(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function lc(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var cc=d.createContext(void 0),uc=e=>{const t=d.useContext(cc);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},dc=({client:e,children:t})=>(d.useEffect((()=>(e.mount(),()=>{e.unmount()})),[e]),(0,u.jsx)(cc.Provider,{value:e,children:t}));function fc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return mc(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mc(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var hc,pc=(0,a.createContext)(null),gc=function(e){var t=e.children,n=fc((0,a.useState)(!1),2),r=n[0],o=n[1],i=fc((0,a.useState)(!1),2),s={viewSinglePayment:r,setViewSinglePayment:o,singlePaymentType:i[0],setSinglePaymentType:i[1]};return React.createElement(pc.Provider,{value:s},t)};function yc(){return yc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yc.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(hc||(hc={}));const vc="popstate";function bc(e,t){if(!1===e||null==e)throw new Error(t)}function wc(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function xc(e,t){return{usr:e.state,key:e.key,idx:t}}function Mc(e,t,n,r){return void 0===n&&(n=null),yc({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?Nc(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function Ec(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function Nc(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var kc;function jc(e,t,n){return void 0===n&&(n="/"),function(e,t,n,r){let o=Uc(("string"==typeof t?Nc(t):t).pathname||"/",n);if(null==o)return null;let i=Dc(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let a=null;for(let e=0;null==a&&e<i.length;++e){let t=Fc(o);a=Lc(i[e],t,r)}return a}(e,t,n,!1)}function Dc(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");let o=(e,o,i)=>{let a={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};a.relativePath.startsWith("/")&&(bc(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),a.relativePath=a.relativePath.slice(r.length));let s=Vc([r,a.relativePath]),l=n.concat(a);e.children&&e.children.length>0&&(bc(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),Dc(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:Pc(s,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let n of Tc(e.path))o(e,t,n);else o(e,t)})),t}function Tc(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return o?[i,""]:[i];let a=Tc(r.join("/")),s=[];return s.push(...a.map((e=>""===e?i:[i,e].join("/")))),o&&s.push(...a),s.map((t=>e.startsWith("/")&&""===t?"/":t))}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(kc||(kc={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const Sc=/^:[\w-]+$/,Cc=3,Rc=2,Oc=1,Ac=10,Ic=-2,_c=e=>"*"===e;function Pc(e,t){let n=e.split("/"),r=n.length;return n.some(_c)&&(r+=Ic),t&&(r+=Rc),n.filter((e=>!_c(e))).reduce(((e,t)=>e+(Sc.test(t)?Cc:""===t?Oc:Ac)),r)}function Lc(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,o={},i="/",a=[];for(let e=0;e<r.length;++e){let s=r[e],l=e===r.length-1,c="/"===i?t:t.slice(i.length)||"/",u=zc({path:s.relativePath,caseSensitive:s.caseSensitive,end:l},c),d=s.route;if(!u&&l&&n&&!r[r.length-1].route.index&&(u=zc({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},c)),!u)return null;Object.assign(o,u.params),a.push({params:o,pathname:Vc([i,u.pathname]),pathnameBase:Wc(Vc([i,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(i=Vc([i,u.pathnameBase]))}return a}function zc(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!0),wc("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));return e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),s=o.slice(1),l=r.reduce(((e,t,n)=>{let{paramName:r,isOptional:o}=t;if("*"===r){let e=s[n]||"";a=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const l=s[n];return e[r]=o&&!l?void 0:(l||"").replace(/%2F/g,"/"),e}),{});return{params:l,pathname:i,pathnameBase:a,pattern:e}}function Fc(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return wc(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function Uc(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function Bc(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function Yc(e,t){let n=function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}function Qc(e,t,n,r){let o;void 0===r&&(r=!1),"string"==typeof e?o=Nc(e):(o=yc({},e),bc(!o.pathname||!o.pathname.includes("?"),Bc("?","pathname","search",o)),bc(!o.pathname||!o.pathname.includes("#"),Bc("#","pathname","hash",o)),bc(!o.search||!o.search.includes("#"),Bc("#","search","hash",o)));let i,a=""===e||""===o.pathname,s=a?"/":o.pathname;if(null==s)i=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}i=e>=0?t[e]:"/"}let l=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:o=""}="string"==typeof e?Nc(e):e,i=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:i,search:Hc(r),hash:qc(o)}}(o,i),c=s&&"/"!==s&&s.endsWith("/"),u=(a||"."===s)&&n.endsWith("/");return l.pathname.endsWith("/")||!c&&!u||(l.pathname+="/"),l}const Vc=e=>e.join("/").replace(/\/\/+/g,"/"),Wc=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Hc=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",qc=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;const $c=["post","put","patch","delete"],Gc=(new Set($c),["get",...$c]);function Kc(){return Kc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kc.apply(this,arguments)}new Set(Gc),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const Zc=d.createContext(null),Xc=d.createContext(null),Jc=d.createContext(null),eu=d.createContext(null),tu=d.createContext({outlet:null,matches:[],isDataRoute:!1}),nu=d.createContext(null);function ru(){return null!=d.useContext(eu)}function ou(){return ru()||bc(!1),d.useContext(eu).location}function iu(e){d.useContext(Jc).static||d.useLayoutEffect(e)}function au(){let{isDataRoute:e}=d.useContext(tu);return e?function(){let{router:e}=function(){let e=d.useContext(Zc);return e||bc(!1),e}(pu.UseNavigateStable),t=yu(gu.UseNavigateStable),n=d.useRef(!1);return iu((()=>{n.current=!0})),d.useCallback((function(r,o){void 0===o&&(o={}),n.current&&("number"==typeof r?e.navigate(r):e.navigate(r,Kc({fromRouteId:t},o)))}),[e,t])}():function(){ru()||bc(!1);let e=d.useContext(Zc),{basename:t,future:n,navigator:r}=d.useContext(Jc),{matches:o}=d.useContext(tu),{pathname:i}=ou(),a=JSON.stringify(Yc(o,n.v7_relativeSplatPath)),s=d.useRef(!1);return iu((()=>{s.current=!0})),d.useCallback((function(n,o){if(void 0===o&&(o={}),!s.current)return;if("number"==typeof n)return void r.go(n);let l=Qc(n,JSON.parse(a),i,"path"===o.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:Vc([t,l.pathname])),(o.replace?r.replace:r.push)(l,o.state,o)}),[t,r,a,i,e])}()}const su=d.createContext(null);function lu(){let{matches:e}=d.useContext(tu),t=e[e.length-1];return t?t.params:{}}function cu(e,t){let{relative:n}=void 0===t?{}:t,{future:r}=d.useContext(Jc),{matches:o}=d.useContext(tu),{pathname:i}=ou(),a=JSON.stringify(Yc(o,r.v7_relativeSplatPath));return d.useMemo((()=>Qc(e,JSON.parse(a),i,"path"===n)),[e,a,i,n])}function uu(e,t,n,r){ru()||bc(!1);let{navigator:o,static:i}=d.useContext(Jc),{matches:a}=d.useContext(tu),s=a[a.length-1],l=s?s.params:{},c=(s&&s.pathname,s?s.pathnameBase:"/");s&&s.route;let u,f=ou();if(t){var m;let e="string"==typeof t?Nc(t):t;"/"===c||(null==(m=e.pathname)?void 0:m.startsWith(c))||bc(!1),u=e}else u=f;let h=u.pathname||"/",p=h;if("/"!==c){let e=c.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(e.length).join("/")}let g=!i&&n&&n.matches&&n.matches.length>0?n.matches:jc(e,{pathname:p}),y=function(e,t,n,r){var o;if(void 0===t&&(t=[]),void 0===n&&(n=null),void 0===r&&(r=null),null==e){var i;if(!n)return null;if(n.errors)e=n.matches;else{if(!(null!=(i=r)&&i.v7_partialHydration&&0===t.length&&!n.initialized&&n.matches.length>0))return null;e=n.matches}}let a=e,s=null==(o=n)?void 0:o.errors;if(null!=s){let e=a.findIndex((e=>e.route.id&&void 0!==(null==s?void 0:s[e.route.id])));e>=0||bc(!1),a=a.slice(0,Math.min(a.length,e+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(c=e),t.route.id){let{loaderData:e,errors:r}=n,o=t.route.loader&&void 0===e[t.route.id]&&(!r||void 0===r[t.route.id]);if(t.route.lazy||o){l=!0,a=c>=0?a.slice(0,c+1):[a[0]];break}}}return a.reduceRight(((e,r,o)=>{let i,u=!1,f=null,m=null;var h;n&&(i=s&&r.route.id?s[r.route.id]:void 0,f=r.route.errorElement||fu,l&&(c<0&&0===o?(vu[h="route-fallback"]||(vu[h]=!0),u=!0,m=null):c===o&&(u=!0,m=r.route.hydrateFallbackElement||null)));let p=t.concat(a.slice(0,o+1)),g=()=>{let t;return t=i?f:u?m:r.route.Component?d.createElement(r.route.Component,null):r.route.element?r.route.element:e,d.createElement(hu,{match:r,routeContext:{outlet:e,matches:p,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===o)?d.createElement(mu,{location:n.location,revalidation:n.revalidation,component:f,error:i,children:g(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):g()}),null)}(g&&g.map((e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:Vc([c,o.encodeLocation?o.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?c:Vc([c,o.encodeLocation?o.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),a,n,r);return t&&y?d.createElement(eu.Provider,{value:{location:Kc({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:hc.Pop}},y):y}function du(){let e=function(){var e;let t=d.useContext(nu),n=function(){let e=d.useContext(Xc);return e||bc(!1),e}(gu.UseRouteError),r=yu(gu.UseRouteError);return void 0!==t?t:null==(e=n.errors)?void 0:e[r]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return d.createElement(d.Fragment,null,d.createElement("h2",null,"Unexpected Application Error!"),d.createElement("h3",{style:{fontStyle:"italic"}},t),n?d.createElement("pre",{style:r},n):null,null)}const fu=d.createElement(du,null);class mu extends d.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?d.createElement(tu.Provider,{value:this.props.routeContext},d.createElement(nu.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function hu(e){let{routeContext:t,match:n,children:r}=e,o=d.useContext(Zc);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),d.createElement(tu.Provider,{value:t},r)}var pu=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(pu||{}),gu=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(gu||{});function yu(e){let t=function(){let e=d.useContext(tu);return e||bc(!1),e}(),n=t.matches[t.matches.length-1];return n.route.id||bc(!1),n.route.id}const vu={};function bu(e){return function(e){let t=d.useContext(tu).outlet;return t?d.createElement(su.Provider,{value:e},t):t}(e.context)}function wu(e){bc(!1)}function xu(e){let{basename:t="/",children:n=null,location:r,navigationType:o=hc.Pop,navigator:i,static:a=!1,future:s}=e;ru()&&bc(!1);let l=t.replace(/^\/*/,"/"),c=d.useMemo((()=>({basename:l,navigator:i,static:a,future:Kc({v7_relativeSplatPath:!1},s)})),[l,s,i,a]);"string"==typeof r&&(r=Nc(r));let{pathname:u="/",search:f="",hash:m="",state:h=null,key:p="default"}=r,g=d.useMemo((()=>{let e=Uc(u,l);return null==e?null:{location:{pathname:e,search:f,hash:m,state:h,key:p},navigationType:o}}),[l,u,f,m,h,p,o]);return null==g?null:d.createElement(Jc.Provider,{value:c},d.createElement(eu.Provider,{children:n,value:g}))}function Mu(e){let{children:t,location:n}=e;return uu(Eu(t),n)}function Eu(e,t){void 0===t&&(t=[]);let n=[];return d.Children.forEach(e,((e,r)=>{if(!d.isValidElement(e))return;let o=[...t,r];if(e.type===d.Fragment)return void n.push.apply(n,Eu(e.props.children,o));e.type!==wu&&bc(!1),e.props.index&&e.props.children&&bc(!1);let i={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(i.children=Eu(e.props.children,o)),n.push(i)})),n}function Nu(){return Nu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nu.apply(this,arguments)}function ku(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}d.startTransition,new Promise((()=>{})),d.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const ju=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"];try{window.__reactRouterVersion="6"}catch(ml){}new Map;const Du=d.startTransition;function Tu(e){let{basename:t,children:n,future:r,window:o}=e,i=d.useRef();var a;null==i.current&&(i.current=(void 0===(a={window:o,v5Compat:!0})&&(a={}),function(e,t,n,r){void 0===r&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,s=hc.Pop,l=null,c=u();function u(){return(a.state||{idx:null}).idx}function d(){s=hc.Pop;let e=u(),t=null==e?null:e-c;c=e,l&&l({action:s,location:m.location,delta:t})}function f(e){let t="null"!==o.location.origin?o.location.origin:o.location.href,n="string"==typeof e?e:Ec(e);return n=n.replace(/ $/,"%20"),bc(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==c&&(c=0,a.replaceState(yc({},a.state,{idx:c}),""));let m={get action(){return s},get location(){return e(o,a)},listen(e){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(vc,d),l=e,()=>{o.removeEventListener(vc,d),l=null}},createHref:e=>t(o,e),createURL:f,encodeLocation(e){let t=f(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s=hc.Push;let r=Mc(m.location,e,t);n&&n(r,e),c=u()+1;let d=xc(r,c),f=m.createHref(r);try{a.pushState(d,"",f)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;o.location.assign(f)}i&&l&&l({action:s,location:m.location,delta:1})},replace:function(e,t){s=hc.Replace;let r=Mc(m.location,e,t);n&&n(r,e),c=u();let o=xc(r,c),d=m.createHref(r);a.replaceState(o,"",d),i&&l&&l({action:s,location:m.location,delta:0})},go:e=>a.go(e)};return m}((function(e,t){let{pathname:n="/",search:r="",hash:o=""}=Nc(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),Mc("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:Ec(t))}),(function(e,t){wc("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),a)));let s=i.current,[l,c]=d.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},f=d.useCallback((e=>{u&&Du?Du((()=>c(e))):c(e)}),[c,u]);return d.useLayoutEffect((()=>s.listen(f)),[s,f]),d.useEffect((()=>{return null==(e=r)||e.v7_startTransition,void 0!==(null==e?void 0:e.v7_relativeSplatPath)||t&&t.v7_relativeSplatPath,void(t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation));var e,t}),[r]),d.createElement(xu,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:s,future:r})}Ae.flushSync,d.useId;const Su="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Cu=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ru=d.forwardRef((function(e,t){let n,{onClick:r,relative:o,reloadDocument:i,replace:a,state:s,target:l,to:c,preventScrollReset:u,viewTransition:f}=e,m=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,ju),{basename:h}=d.useContext(Jc),p=!1;if("string"==typeof c&&Cu.test(c)&&(n=c,Su))try{let e=new URL(window.location.href),t=c.startsWith("//")?new URL(e.protocol+c):new URL(c),n=Uc(t.pathname,h);t.origin===e.origin&&null!=n?c=n+t.search+t.hash:p=!0}catch(e){}let g=function(e,t){let{relative:n}=void 0===t?{}:t;ru()||bc(!1);let{basename:r,navigator:o}=d.useContext(Jc),{hash:i,pathname:a,search:s}=cu(e,{relative:n}),l=a;return"/"!==r&&(l="/"===a?r:Vc([r,a])),o.createHref({pathname:l,search:s,hash:i})}(c,{relative:o}),y=function(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:a,viewTransition:s}=void 0===t?{}:t,l=au(),c=ou(),u=cu(e,{relative:a});return d.useCallback((t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();let n=void 0!==r?r:Ec(c)===Ec(u);l(e,{replace:n,state:o,preventScrollReset:i,relative:a,viewTransition:s})}}),[c,l,u,r,o,n,e,i,a,s])}(c,{replace:a,state:s,target:l,preventScrollReset:u,relative:o,viewTransition:f});return d.createElement("a",Nu({},m,{href:n||g,onClick:p||i?r:function(e){r&&r(e),e.defaultPrevented||y(e)},ref:t,target:l}))}));var Ou,Au;function Iu(e){let t=d.useRef(ku(e)),n=d.useRef(!1),r=ou(),o=d.useMemo((()=>function(e,t){let n=ku(e);return t&&t.forEach(((e,r)=>{n.has(r)||t.getAll(r).forEach((e=>{n.append(r,e)}))})),n}(r.search,n.current?null:t.current)),[r.search]),i=au(),a=d.useCallback(((e,t)=>{const r=ku("function"==typeof e?e(o):e);n.current=!0,i("?"+r,t)}),[i,o]);return[o,a]}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ou||(Ou={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Au||(Au={}));const _u=window.wp.i18n,Pu={400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold"},Lu={36:"text-4xl",30:"text-3xl",24:"text-2xl",20:"text-xl",18:"text-lg",16:"text-base",14:"text-sm",12:"text-xs"},zu={44:"leading-11",38:"leading-9.5",32:"leading-8",30:"leading-7.5",28:"leading-7",24:"leading-6",20:"leading-5",16:"leading-4"},Fu={2:"tracking-2"},Uu={brand600:"text-brand-primary-600",link:"text-link-primary",primary:"text-text-primary",secondary:"text-text-secondary",tertiary:"text-text-tertiary",disabled:"text-text-disabled",help:"text-field-helper",label:"text-field-label",info:"text-support-info",success:"text-support-success",warning:"text-support-warning",error:"text-support-error",inverse:"text-text-on-color"},Bu=(0,d.forwardRef)((function({as:e,children:t,weight:n,size:r,lineHeight:o,letterSpacing:i,color:a="primary",className:s,...l},c){return(0,u.jsx)(e||"p",{ref:c,className:he("m-0 p-0",n?Pu[n]:"",r?Lu[r]:"",o?zu[o]:"",i?Fu[i]:"",a?Uu[a]:"",s),...l,children:t})})),Yu={sm:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},md:{1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},lg:{1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"}},Qu={sm:{xs:"gap-2",sm:"gap-4",md:"gap-5",lg:"gap-6",xl:"gap-6","2xl":"gap-8"},md:{xs:"md:gap-2",sm:"md:gap-4",md:"md:gap-5",lg:"md:gap-6",xl:"md:gap-6","2xl":"md:gap-8"},lg:{xs:"lg:gap-2",sm:"lg:gap-4",md:"lg:gap-5",lg:"lg:gap-6",xl:"lg:gap-6","2xl":"lg:gap-8"}},Vu={sm:{xs:"gap-x-2",sm:"gap-x-4",md:"gap-x-5",lg:"gap-x-6",xl:"gap-x-6","2xl":"gap-x-8"},md:{xs:"md:gap-x-2",sm:"md:gap-x-4",md:"md:gap-x-5",lg:"md:gap-x-6",xl:"md:gap-x-6","2xl":"md:gap-x-8"},lg:{xs:"lg:gap-x-2",sm:"lg:gap-x-4",md:"lg:gap-x-5",lg:"lg:gap-x-6",xl:"lg:gap-x-6","2xl":"lg:gap-x-8"}},Wu={sm:{xs:"gap-y-2",sm:"gap-y-4",md:"gap-y-5",lg:"gap-y-6",xl:"gap-y-6","2xl":"gap-y-8"},md:{xs:"md:gap-y-2",sm:"md:gap-y-4",md:"md:gap-y-5",lg:"md:gap-y-6",xl:"md:gap-y-6","2xl":"md:gap-y-8"},lg:{xs:"lg:gap-y-2",sm:"lg:gap-y-4",md:"lg:gap-y-5",lg:"lg:gap-y-6",xl:"lg:gap-y-6","2xl":"lg:gap-y-8"}},Hu={sm:{1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12"},md:{1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12"},lg:{1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12"}},qu={sm:{1:"col-start-1",2:"col-start-2",3:"col-start-3",4:"col-start-4",5:"col-start-5",6:"col-start-6",7:"col-start-7",8:"col-start-8",9:"col-start-9",10:"col-start-10",11:"col-start-11",12:"col-start-12"},md:{1:"md:col-start-1",2:"md:col-start-2",3:"md:col-start-3",4:"md:col-start-4",5:"md:col-start-5",6:"md:col-start-6",7:"md:col-start-7",8:"md:col-start-8",9:"md:col-start-9",10:"md:col-start-10",11:"md:col-start-11",12:"md:col-start-12"},lg:{1:"lg:col-start-1",2:"lg:col-start-2",3:"lg:col-start-3",4:"lg:col-start-4",5:"lg:col-start-5",6:"lg:col-start-6",7:"lg:col-start-7",8:"lg:col-start-8",9:"lg:col-start-9",10:"lg:col-start-10",11:"lg:col-start-11",12:"lg:col-start-12"}},$u={sm:{row:"grid-flow-row",column:"grid-flow-col","row-dense":"grid-flow-row-dense","column-dense":"grid-flow-col-dense"},md:{row:"md:grid-flow-row",column:"md:grid-flow-col","row-dense":"md:grid-flow-row-dense","column-dense":"md:grid-flow-col-dense"},lg:{row:"lg:grid-flow-row",column:"lg:grid-flow-col","row-dense":"lg:grid-flow-row-dense","column-dense":"lg:grid-flow-col-dense"}},Gu={sm:{normal:"justify-normal",start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around",evenly:"justify-evenly",stretch:"justify-stretch"},md:{normal:"md:justify-normal",start:"md:justify-start",end:"md:justify-end",center:"md:justify-center",between:"md:justify-between",around:"md:justify-around",evenly:"md:justify-evenly",stretch:"md:justify-stretch"},lg:{normal:"lg:justify-normal",start:"lg:justify-start",end:"lg:justify-end",center:"lg:justify-center",between:"lg:justify-between",around:"lg:justify-around",evenly:"lg:justify-evenly",stretch:"lg:justify-stretch"}},Ku={sm:{start:"items-start",end:"items-end",center:"items-center",baseline:"items-baseline",stretch:"items-stretch"},md:{start:"md:items-start",end:"md:items-end",center:"md:items-center",baseline:"md:items-baseline",stretch:"md:items-stretch"},lg:{start:"lg:items-start",end:"lg:items-end",center:"lg:items-center",baseline:"lg:items-baseline",stretch:"lg:items-stretch"}},Zu={sm:{start:"self-start",end:"self-end",center:"self-center",baseline:"self-baseline",stretch:"self-stretch"},md:{start:"md:self-start",end:"md:self-end",center:"md:self-center",baseline:"md:self-baseline",stretch:"md:self-stretch"},lg:{start:"lg:self-start",end:"lg:self-end",center:"lg:self-center",baseline:"lg:self-baseline",stretch:"lg:self-stretch"}},Xu={sm:{auto:"justify-self-auto",start:"justify-self-start",end:"justify-self-end",center:"justify-self-center",baseline:"justify-self-baseline",stretch:"justify-self-stretch"},md:{auto:"md:justify-self-auto",start:"md:justify-self-start",end:"md:justify-self-end",center:"md:justify-self-center",baseline:"md:justify-self-baseline",stretch:"md:justify-self-stretch"},lg:{auto:"lg:justify-self-auto",start:"lg:justify-self-start",end:"lg:justify-self-end",center:"lg:justify-self-center",baseline:"lg:justify-self-baseline",stretch:"lg:justify-self-stretch"}},Ju={sm:{row:"flex-row","row-reverse":"flex-row-reverse",column:"flex-col","column-reverse":"flex-col-reverse"},md:{row:"md:flex-row","row-reverse":"md:flex-row-reverse",column:"md:flex-col","column-reverse":"md:flex-col-reverse"},lg:{row:"lg:flex-row","row-reverse":"lg:flex-row-reverse",column:"lg:flex-col","column-reverse":"lg:flex-col-reverse"}},ed={sm:{wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse",nowrap:"flex-nowrap"},md:{wrap:"md:flex-wrap","wrap-reverse":"md:flex-wrap-reverse",nowrap:"md:flex-nowrap"},lg:{wrap:"lg:flex-wrap","wrap-reverse":"lg:flex-wrap-reverse",nowrap:"lg:flex-nowrap"}},td={sm:{1:"w-full",2:"w-1/2",3:"w-1/3",4:"w-1/4",5:"w-1/5",6:"w-1/6",7:"w-1/7",8:"w-1/8",9:"w-1/9",10:"w-1/10",11:"w-1/11",12:"w-1/12"},md:{1:"md:w-full",2:"md:w-1/2",3:"md:w-1/3",4:"md:w-1/4",5:"md:w-1/5",6:"md:w-1/6",7:"md:w-1/7",8:"md:w-1/8",9:"md:w-1/9",10:"md:w-1/10",11:"md:w-1/11",12:"md:w-1/12"},lg:{1:"lg:w-full",2:"lg:w-1/2",3:"lg:w-1/3",4:"lg:w-1/4",5:"lg:w-1/5",6:"lg:w-1/6",7:"lg:w-1/7",8:"lg:w-1/8",9:"lg:w-1/9",10:"lg:w-1/10",11:"lg:w-1/11",12:"lg:w-1/12"}},nd={sm:{1:"order-1",2:"order-2",3:"order-3",4:"order-4",5:"order-5",6:"order-6",7:"order-7",8:"order-8",9:"order-9",10:"order-10",11:"order-11",12:"order-12",first:"order-first",last:"order-last",none:"order-none"},md:{1:"md:order-1",2:"md:order-2",3:"md:order-3",4:"md:order-4",5:"md:order-5",6:"md:order-6",7:"md:order-7",8:"md:order-8",9:"md:order-9",10:"md:order-10",11:"md:order-11",12:"md:order-12",first:"md:order-first",last:"md:order-last",none:"md:order-none"},lg:{1:"lg:order-1",2:"lg:order-2",3:"lg:order-3",4:"lg:order-4",5:"lg:order-5",6:"lg:order-6",7:"lg:order-7",8:"lg:order-8",9:"lg:order-9",10:"lg:order-10",11:"lg:order-11",12:"lg:order-12",first:"lg:order-first",last:"lg:order-last",none:"lg:order-none"}},rd={sm:{0:"grow-0",1:"grow"},md:{0:"md:grow-0",1:"md:grow"},lg:{0:"lg:grow-0",1:"lg:grow"}},od={sm:{0:"shrink-0",1:"shrink"},md:{0:"md:shrink-0",1:"md:shrink"},lg:{0:"lg:shrink-0",1:"lg:shrink"}},id=(e,t,n,r="sm")=>{const o=[];switch(typeof e){case"object":for(const[r,i]of Object.entries(e))t[r]&&o.push(t?.[r]?.[i]??t?.[r]?.[n?.[r]]??"");break;case"string":case"number":const i=r;o.push(t?.[i]?.[e]??t?.[i]?.[n?.[i]]??"");break;default:if(void 0===e)break;o.push(t?.[r]?.[n]??"")}return o.join(" ")},ad=({className:e,cols:t,gap:n,gapX:r,gapY:o,align:i,justify:a,gridFlow:s,colsSubGrid:l=!1,rowsSubGrid:c=!1,autoRows:d=!1,autoCols:f=!1,children:m,...h})=>{const p=id(t,Yu,1),g=id(n,Qu,"sm"),y=id(r,Vu,""),v=id(o,Wu,""),b=id(i,Ku,""),w=id(a,Gu,""),x=id(s,$u,"");return(0,u.jsx)("div",{className:he("grid",{"grid-cols-subgrid":l,"grid-rows-subgrid":c,"auto-cols-auto":f,"auto-rows-auto":d},p,g,y,v,b,w,x,e),...h,children:m})};ad.Item=({className:e,children:t,colSpan:n,colStart:r,alignSelf:o,justifySelf:i,...a})=>{const s=id(n,Hu,0),l=id(r,qu,0),c=id(o,Zu,""),d=id(i,Xu,"");return(0,u.jsx)("div",{className:he(s,l,c,d,e),...a,children:t})};const sd=(0,d.createContext)({}),ld=({containerType:e="flex",gap:t="sm",gapX:n,gapY:r,direction:o,justify:i,align:a,wrap:s,cols:l,className:c,children:d,...f})=>{if("grid"===e)return(0,u.jsx)(sd.Provider,{value:{containerType:e},children:(0,u.jsx)(ad,{className:c,gap:t,gapX:n,gapY:r,cols:l,children:d,align:a,justify:i,...f})});const m=id(s,ed,""),h=id(t,Qu,"sm"),p=id(n,Vu,""),g=id(r,Wu,""),y=id(o,Ju,""),v=id(i,Gu,""),b=id(a,Ku,""),w=he("flex",m,h,p,g,y,v,b,c);return(0,u.jsx)(sd.Provider,{value:{containerType:e,cols:l},children:"flex"===e?(0,u.jsx)("div",{className:w,children:d}):(0,u.jsx)(ad,{className:c,gap:t,gapX:n,gapY:r,cols:l,children:d,align:a,justify:i,...f})})},cd=({grow:e,shrink:t,order:n,alignSelf:r,justifySelf:o,className:i,children:a,...s})=>{const{containerType:l,cols:c}=(0,d.useContext)(sd);if("grid"===l)return(0,u.jsx)(ad.Item,{className:i,alignSelf:r,justifySelf:o,children:a,...s});const f=id(r,Zu,""),m=id(o,Xu,""),h=id(e,rd,0),p=id(t,od,0),g=id(n,nd,0),y=id(c,td,1);return(0,u.jsx)("div",{className:he("box-border",h,p,g,f,m,y,i),children:a})};ld.Item=cd,ld.displayName="Container",cd.displayName="Container.Item";const ud=window.wp.hooks,dd=(...e)=>e.filter(((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t)).join(" ").trim();var fd={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const md=(0,d.forwardRef)((({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>(0,d.createElement)("svg",{ref:l,...fd,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:dd("lucide",o),...s},[...a.map((([e,t])=>(0,d.createElement)(e,t))),...Array.isArray(i)?i:[i]]))),hd=(e,t)=>{const n=(0,d.forwardRef)((({className:n,...r},o)=>{return(0,d.createElement)(md,{ref:o,iconNode:t,className:dd(`lucide-${i=e,i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,n),...r});var i}));return n.displayName=`${e}`,n},pd=hd("Trash",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]]),gd=hd("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),yd=hd("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),vd=g("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]),bd=g("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),wd=g("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);function xd(){return"undefined"!=typeof window}function Md(e){return kd(e)?(e.nodeName||"").toLowerCase():"#document"}function Ed(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Nd(e){var t;return null==(t=(kd(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function kd(e){return!!xd()&&(e instanceof Node||e instanceof Ed(e).Node)}function jd(e){return!!xd()&&(e instanceof Element||e instanceof Ed(e).Element)}function Dd(e){return!!xd()&&(e instanceof HTMLElement||e instanceof Ed(e).HTMLElement)}function Td(e){return!(!xd()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Ed(e).ShadowRoot)}function Sd(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=_d(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Cd(e){return["table","td","th"].includes(Md(e))}function Rd(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Od(e){const t=Ad(),n=jd(e)?_d(e):e;return["transform","translate","scale","rotate","perspective"].some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Ad(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Id(e){return["html","body","#document"].includes(Md(e))}function _d(e){return Ed(e).getComputedStyle(e)}function Pd(e){return jd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ld(e){if("html"===Md(e))return e;const t=e.assignedSlot||e.parentNode||Td(e)&&e.host||Nd(e);return Td(t)?t.host:t}function zd(e){const t=Ld(e);return Id(t)?e.ownerDocument?e.ownerDocument.body:e.body:Dd(t)&&Sd(t)?t:zd(t)}function Fd(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=zd(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=Ed(o);if(i){const e=Ud(a);return t.concat(a,a.visualViewport||[],Sd(o)?o:[],e&&n?Fd(e):[])}return t.concat(o,Fd(o,[],n))}function Ud(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Bd(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}function Yd(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Td(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Qd(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function Vd(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:n}=e;return t+"/"+n})).join(" "):navigator.userAgent}function Wd(e){return!(0!==e.mozInputSource||!e.isTrusted)||($d()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function Hd(e){return!Vd().includes("jsdom/")&&(!$d()&&0===e.width&&0===e.height||$d()&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}function qd(){return/apple/i.test(navigator.vendor)}function $d(){const e=/android/i;return e.test(Qd())||e.test(Vd())}function Gd(){return Qd().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Kd(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function Zd(e){return(null==e?void 0:e.ownerDocument)||document}function Xd(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function Jd(e){return"composedPath"in e?e.composedPath()[0]:e.target}function ef(e){return Dd(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function tf(e){e.preventDefault(),e.stopPropagation()}function nf(e){return!!e&&"combobox"===e.getAttribute("role")&&ef(e)}const rf=Math.min,of=Math.max,af=Math.round,sf=Math.floor,lf=e=>({x:e,y:e}),cf={left:"right",right:"left",bottom:"top",top:"bottom"},uf={start:"end",end:"start"};function df(e,t,n){return of(e,rf(t,n))}function ff(e,t){return"function"==typeof e?e(t):e}function mf(e){return e.split("-")[0]}function hf(e){return e.split("-")[1]}function pf(e){return"x"===e?"y":"x"}function gf(e){return"y"===e?"height":"width"}function yf(e){return["top","bottom"].includes(mf(e))?"y":"x"}function vf(e){return pf(yf(e))}function bf(e){return e.replace(/start|end/g,(e=>uf[e]))}function wf(e){return e.replace(/left|right|bottom|top/g,(e=>cf[e]))}function xf(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Mf(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}var Ef=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),Nf="undefined"==typeof Element,kf=Nf?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,jf=!Nf&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},Df=function e(t,n){var r;void 0===n&&(n=!0);var o=null==t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"inert");return""===o||"true"===o||n&&t&&e(t.parentNode)},Tf=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Df(a,!1))if("SLOT"===a.tagName){var s=a.assignedElements(),l=e(s.length?s:a.children,!0,r);r.flatten?o.push.apply(o,l):o.push({scopeParent:a,candidates:l})}else{kf.call(a,Ef)&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var c=a.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(a),u=!Df(c,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(c&&u){var d=e(!0===c?a.children:c.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:a,candidates:d})}else i.unshift.apply(i,a.children)}}return o},Sf=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Cf=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!Sf(e)?0:e.tabIndex},Rf=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Of=function(e){return"INPUT"===e.tagName},Af=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},If=function(e,t){return!(t.disabled||Df(t)||function(e){return Of(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=kf.call(e,"details>summary:first-of-type")?e.parentElement:e;if(kf.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return Af(e)}else{if("function"==typeof r){for(var i=e;e;){var a=e.parentElement,s=jf(e);if(a&&!a.shadowRoot&&!0===r(a))return Af(e);e=e.assignedSlot?e.assignedSlot:a||s===e.ownerDocument?a:s.host}e=i}if(function(e){var t,n,r,o,i=e&&jf(e),a=null===(t=i)||void 0===t?void 0:t.host,s=!1;if(i&&i!==e)for(s=!!(null!==(n=a)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(a)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!s&&a;){var l,c,u;s=!(null===(c=a=null===(l=i=jf(a))||void 0===l?void 0:l.host)||void 0===c||null===(u=c.ownerDocument)||void 0===u||!u.contains(a))}return s}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!kf.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},_f=function(e,t){return!(function(e){return function(e){return Of(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||jf(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)}(t)||Cf(t)<0||!If(e,t))},Pf=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Lf=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scopeParent,a=i?t.scopeParent:t,s=function(e,t){var n=Cf(e);return n<0&&t&&!Sf(e)?0:n}(a,i),l=i?e(t.candidates):a;0===s?i?n.push.apply(n,l):n.push(a):r.push({documentOrder:o,tabIndex:s,item:t,isScope:i,content:l})})),r.sort(Rf).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},zf=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Tf([e],t.includeContainer,{filter:_f.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Pf}):function(e,t,n){if(Df(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Ef));return t&&kf.call(e,Ef)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,_f.bind(null,t)),Lf(n)};function Ff(e,t,n){let{reference:r,floating:o}=e;const i=yf(t),a=vf(t),s=gf(a),l=mf(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let m;switch(l){case"top":m={x:u,y:r.y-o.height};break;case"bottom":m={x:u,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-o.width,y:d};break;default:m={x:r.x,y:r.y}}switch(hf(t)){case"start":m[a]-=f*(n&&c?-1:1);break;case"end":m[a]+=f*(n&&c?-1:1)}return m}async function Uf(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:m=0}=ff(t,e),h=xf(m),p=s[f?"floating"===d?"reference":"floating":d],g=Mf(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(p)))||n?p:p.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),b=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},w=Mf(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:v,strategy:l}):y);return{top:(g.top-w.top+h.top)/b.y,bottom:(w.bottom-g.bottom+h.bottom)/b.y,left:(g.left-w.left+h.left)/b.x,right:(w.right-g.right+h.right)/b.x}}function Bf(e){const t=_d(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Dd(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=af(n)!==i||af(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Yf(e){return jd(e)?e:e.contextElement}function Qf(e){const t=Yf(e);if(!Dd(t))return lf(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Bf(t);let a=(i?af(n.width):n.width)/r,s=(i?af(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Vf=lf(0);function Wf(e){const t=Ed(e);return Ad()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Vf}function Hf(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Yf(e);let a=lf(1);t&&(r?jd(r)&&(a=Qf(r)):a=Qf(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Ed(e))&&t}(i,n,r)?Wf(i):lf(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=Ed(i),t=r&&jd(r)?Ed(r):r;let n=e,o=Ud(n);for(;o&&r&&t!==n;){const e=Qf(o),t=o.getBoundingClientRect(),r=_d(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,n=Ed(o),o=Ud(n)}}return Mf({width:u,height:d,x:l,y:c})}function qf(e,t){const n=Pd(e).scrollLeft;return t?t.left+n:Hf(Nd(e)).left+n}function $f(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:qf(e,r)),y:r.top+t.scrollTop}}function Gf(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Ed(e),r=Nd(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=Ad();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=Nd(e),n=Pd(e),r=e.ownerDocument.body,o=of(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=of(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+qf(e);const s=-n.scrollTop;return"rtl"===_d(r).direction&&(a+=of(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(Nd(e));else if(jd(t))r=function(e,t){const n=Hf(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Dd(e)?Qf(e):lf(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Wf(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Mf(r)}function Kf(e,t){const n=Ld(e);return!(n===t||!jd(n)||Id(n))&&("fixed"===_d(n).position||Kf(n,t))}function Zf(e,t,n){const r=Dd(t),o=Nd(t),i="fixed"===n,a=Hf(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=lf(0);function c(){l.x=qf(o)}if(r||!r&&!i)if(("body"!==Md(t)||Sd(o))&&(s=Pd(t)),r){const e=Hf(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=!o||r||i?lf(0):$f(o,s);return{x:a.left+s.scrollLeft-l.x-u.x,y:a.top+s.scrollTop-l.y-u.y,width:a.width,height:a.height}}function Xf(e){return"static"===_d(e).position}function Jf(e,t){if(!Dd(e)||"fixed"===_d(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Nd(e)===n&&(n=n.ownerDocument.body),n}function em(e,t){const n=Ed(e);if(Rd(e))return n;if(!Dd(e)){let t=Ld(e);for(;t&&!Id(t);){if(jd(t)&&!Xf(t))return t;t=Ld(t)}return n}let r=Jf(e,t);for(;r&&Cd(r)&&Xf(r);)r=Jf(r,t);return r&&Id(r)&&Xf(r)&&!Od(r)?n:r||function(e){let t=Ld(e);for(;Dd(t)&&!Id(t);){if(Od(t))return t;if(Rd(t))return null;t=Ld(t)}return null}(e)||n}const tm={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=Nd(r),s=!!t&&Rd(t.floating);if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=lf(1);const u=lf(0),d=Dd(r);if((d||!d&&!i)&&(("body"!==Md(r)||Sd(a))&&(l=Pd(r)),Dd(r))){const e=Hf(r);c=Qf(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const f=!a||d||i?lf(0):$f(a,l,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}},getDocumentElement:Nd,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?Rd(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Fd(e,[],!1).filter((e=>jd(e)&&"body"!==Md(e))),o=null;const i="fixed"===_d(e).position;let a=i?Ld(e):e;for(;jd(a)&&!Id(a);){const t=_d(a),n=Od(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Sd(a)&&!n&&Kf(e,a))?r=r.filter((e=>e!==a)):o=t,a=Ld(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=i[0],s=i.reduce(((e,n)=>{const r=Gf(t,n,o);return e.top=of(r.top,e.top),e.right=rf(r.right,e.right),e.bottom=rf(r.bottom,e.bottom),e.left=of(r.left,e.left),e}),Gf(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:em,getElementRects:async function(e){const t=this.getOffsetParent||em,n=this.getDimensions,r=await n(e.floating);return{reference:Zf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Bf(e);return{width:t,height:n}},getScale:Qf,isElement:jd,isRTL:function(e){return"rtl"===_d(e).direction}};function nm(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function rm(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Yf(e),u=o||i?[...c?Fd(c):[],...Fd(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const o=Nd(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:m}=c;if(s||t(),!f||!m)return;const h={rootMargin:-sf(d)+"px "+-sf(o.clientWidth-(u+f))+"px "+-sf(o.clientHeight-(d+m))+"px "+-sf(u)+"px",threshold:of(0,rf(1,l))||1};let p=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!p)return a();r?a(!1,r):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}1!==r||nm(c,e.getBoundingClientRect())||a(),p=!1}try{r=new IntersectionObserver(g,{...h,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,h)}r.observe(e)}(!0),i}(c,n):null;let f,m=-1,h=null;a&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!l&&h.observe(c),h.observe(t));let p=l?Hf(e):null;return l&&function t(){const r=Hf(e);p&&!nm(p,r)&&n(),p=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(f)}}const om=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=mf(n),s=hf(n),l="y"===yf(n),c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=ff(t,e);let{mainAxis:f,crossAxis:m,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof h&&(m="end"===s?-1*h:h),l?{x:m*u,y:f*c}:{x:f*c,y:m*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},im=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=ff(e,t),c={x:n,y:r},u=await Uf(t,l),d=yf(mf(o)),f=pf(d);let m=c[f],h=c[d];if(i){const e="y"===f?"bottom":"right";m=df(m+u["y"===f?"top":"left"],m,m-u[e])}if(a){const e="y"===d?"bottom":"right";h=df(h+u["y"===d?"top":"left"],h,h-u[e])}const p=s.fn({...t,[f]:m,[d]:h});return{...p,data:{x:p.x-n,y:p.y-r,enabled:{[f]:i,[d]:a}}}}}},am=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:p=!0,...g}=ff(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=mf(o),v=yf(s),b=mf(s)===s,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=f||(b||!p?[wf(s)]:function(e){const t=wf(e);return[bf(e),t,bf(t)]}(s)),M="none"!==h;!f&&M&&x.push(...function(e,t,n,r){const o=hf(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}(mf(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(bf)))),i}(s,p,h,w));const E=[s,...x],N=await Uf(t,g),k=[];let j=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&k.push(N[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=hf(e),o=vf(e),i=gf(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=wf(a)),[a,wf(a)]}(o,a,w);k.push(N[e[0]],N[e[1]])}if(j=[...j,{placement:o,overflows:k}],!k.every((e=>e<=0))){var D,T;const e=((null==(D=i.flip)?void 0:D.index)||0)+1,t=E[e];if(t){var S;const n="alignment"===d&&v!==yf(t),r=(null==(S=j[0])?void 0:S.overflows[0])>0;if(!n||r)return{data:{index:e,overflows:j},reset:{placement:t}}}let n=null==(T=j.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:T.placement;if(!n)switch(m){case"bestFit":{var C;const e=null==(C=j.filter((e=>{if(M){const t=yf(e.placement);return t===v||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:C[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},sm=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=ff(e,t),u=await Uf(t,c),d=mf(o),f=hf(o),m="y"===yf(o),{width:h,height:p}=i.floating;let g,y;"top"===d||"bottom"===d?(g=d,y=f===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,g="end"===f?"top":"bottom");const v=p-u.top-u.bottom,b=h-u.left-u.right,w=rf(p-u[g],v),x=rf(h-u[y],b),M=!t.middlewareData.shift;let E=w,N=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(N=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(E=v),M&&!f){const e=of(u.left,0),t=of(u.right,0),n=of(u.top,0),r=of(u.bottom,0);m?N=h-2*(0!==e||0!==t?e+t:of(u.left,u.right)):E=p-2*(0!==n||0!==r?n+r:of(u.top,u.bottom))}await l({...t,availableWidth:N,availableHeight:E});const k=await a.getDimensions(s.floating);return h!==k.width||p!==k.height?{reset:{rects:!0}}:{}}}},lm=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=ff(e,t)||{};if(null==c)return{};const d=xf(u),f={x:n,y:r},m=vf(o),h=gf(m),p=await a.getDimensions(c),g="y"===m,y=g?"top":"left",v=g?"bottom":"right",b=g?"clientHeight":"clientWidth",w=i.reference[h]+i.reference[m]-f[m]-i.floating[h],x=f[m]-i.reference[m],M=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let E=M?M[b]:0;E&&await(null==a.isElement?void 0:a.isElement(M))||(E=s.floating[b]||i.floating[h]);const N=w/2-x/2,k=E/2-p[h]/2-1,j=rf(d[y],k),D=rf(d[v],k),T=j,S=E-p[h]-D,C=E/2-p[h]/2+N,R=df(T,C,S),O=!l.arrow&&null!=hf(o)&&C!==R&&i.reference[h]/2-(C<T?j:D)-p[h]/2<0,A=O?C<T?C-T:C-S:0;return{[m]:f[m]+A,data:{[m]:R,centerOffset:C-R-A,...O&&{alignmentOffset:A}},reset:O}}}),cm=(e,t,n)=>{const r=new Map,o={platform:tm,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Ff(c,r,l),f=r,m={},h=0;for(let n=0;n<s.length;n++){const{name:i,fn:p}=s[n],{x:g,y,data:v,reset:b}=await p({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:m,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=y?y:d,m={...m,[i]:{...m[i],...v}},b&&h<=50&&(h++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:d}=Ff(c,f,l))),n=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:m}})(e,t,{...o,platform:i})};var um="undefined"!=typeof document?d.useLayoutEffect:d.useEffect;function dm(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!dm(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||dm(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function fm(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function mm(e,t){const n=fm(e);return Math.round(t*n)/n}function hm(e){const t=d.useRef(e);return um((()=>{t.current=e})),t}const pm=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?lm({element:n.current,padding:r}).fn(t):{}:n?lm({element:n,padding:r}).fn(t):{};var o}}),gm=(e,t)=>({...om(e),options:[e,t]}),ym=(e,t)=>({...am(e),options:[e,t]}),vm=(e,t)=>({...pm(e),options:[e,t]}),bm={...f},wm=bm.useInsertionEffect||(e=>e());function xm(e){const t=d.useRef((()=>{}));return wm((()=>{t.current=e})),d.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}const Mm="ArrowUp",Em="ArrowDown",Nm="ArrowLeft",km="ArrowRight";function jm(e,t,n){return Math.floor(e/t)!==n}function Dm(e,t){return t<0||t>=e.current.length}function Tm(e,t){return Cm(e,{disabledIndices:t})}function Sm(e,t){return Cm(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Cm(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=void 0===t?{}:t;const a=e.current;let s=n;do{s+=r?-i:i}while(s>=0&&s<=a.length-1&&Am(a,s,o));return s}function Rm(e,t,n,r,o){if(-1===e)return-1;const i=n.indexOf(e),a=t[e];switch(o){case"tl":return i;case"tr":return a?i+a.width-1:i;case"bl":return a?i+(a.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function Om(e,t){return t.flatMap(((t,n)=>e.includes(t)?[n]:[]))}function Am(e,t,n){if(n)return n.includes(t);const r=e[t];return null==r||r.hasAttribute("disabled")||"true"===r.getAttribute("aria-disabled")}var Im="undefined"!=typeof document?d.useLayoutEffect:d.useEffect;function _m(){return _m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_m.apply(this,arguments)}let Pm=!1,Lm=0;const zm=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Lm++,Fm=bm.useId||function(){const[e,t]=d.useState((()=>Pm?zm():void 0));return Im((()=>{null==e&&t(zm())}),[]),d.useEffect((()=>{Pm=!0}),[]),e},Um=d.forwardRef((function(e,t){const{context:{placement:n,elements:{floating:r},middlewareData:{arrow:o,shift:i}},width:a=14,height:s=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:f,d:m,style:{transform:h,...p}={},...g}=e,y=Fm(),[v,b]=d.useState(!1);if(Im((()=>{r&&"rtl"===_d(r).direction&&b(!0)}),[r]),!r)return null;const[w,x]=n.split("-"),M="top"===w||"bottom"===w;let E=u;(M&&null!=i&&i.x||!M&&null!=i&&i.y)&&(E=null);const N=2*c,k=N/2,j=a/2*(l/-8+1),D=s/2*l/4,T=!!m,S=E&&"end"===x?"bottom":"top";let C=E&&"end"===x?"right":"left";E&&v&&(C="end"===x?"left":"right");const R=null!=(null==o?void 0:o.x)?E||o.x:"",O=null!=(null==o?void 0:o.y)?E||o.y:"",A=m||"M0,0 H"+a+" L"+(a-j)+","+(s-D)+" Q"+a/2+","+s+" "+j+","+(s-D)+" Z",I={top:T?"rotate(180deg)":"",left:T?"rotate(90deg)":"rotate(-90deg)",bottom:T?"":"rotate(180deg)",right:T?"rotate(-90deg)":"rotate(90deg)"}[w];return d.createElement("svg",_m({},g,{"aria-hidden":!0,ref:t,width:T?a:a+N,height:a,viewBox:"0 0 "+a+" "+(s>a?s:a),style:{position:"absolute",pointerEvents:"none",[C]:R,[S]:O,[w]:M||T?"100%":"calc(100% - "+N/2+"px)",transform:[I,h].filter((e=>!!e)).join(" "),...p}}),N>0&&d.createElement("path",{clipPath:"url(#"+y+")",fill:"none",stroke:f,strokeWidth:N+(m?0:1),d:A}),d.createElement("path",{stroke:N&&!m?g.fill:"none",d:A}),d.createElement("clipPath",{id:y},d.createElement("rect",{x:-k,y:k*(T?-1:1),width:a+N,height:a})))}));const Bm=d.createContext(null),Ym=d.createContext(null),Qm=()=>{var e;return(null==(e=d.useContext(Bm))?void 0:e.id)||null},Vm=()=>d.useContext(Ym);function Wm(e){return"data-floating-ui-"+e}function Hm(e){const t=(0,d.useRef)(e);return Im((()=>{t.current=e})),t}const qm=Wm("safe-polygon");function $m(e,t,n){return n&&!Kd(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}let Gm=0;function Km(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Gm);const i=()=>null==e?void 0:e.focus({preventScroll:n});o?i():Gm=requestAnimationFrame(i)}function Zm(e,t){let n=e.filter((e=>{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)})),r=n;for(;r.length;)r=e.filter((e=>{var t;return null==(t=r)?void 0:t.some((t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)}))})),n=n.concat(r);return n}let Xm=new WeakMap,Jm=new WeakSet,eh={},th=0;const nh=e=>e&&(e.host||nh(e.parentNode));function rh(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=Zd(e[0]).body;return function(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=(s=t,e.map((e=>{if(s.contains(e))return e;const t=nh(e);return s.contains(t)?t:null})).filter((e=>null!=e)));var s;const l=new Set,c=new Set(a),u=[];eh[o]||(eh[o]=new WeakMap);const d=eh[o];return a.forEach((function e(t){t&&!l.has(t)&&(l.add(t),t.parentNode&&e(t.parentNode))})),function e(t){t&&!c.has(t)&&[].forEach.call(t.children,(t=>{if("script"!==Md(t))if(l.has(t))e(t);else{const e=i?t.getAttribute(i):null,n=null!==e&&"false"!==e,r=(Xm.get(t)||0)+1,a=(d.get(t)||0)+1;Xm.set(t,r),d.set(t,a),u.push(t),1===r&&n&&Jm.add(t),1===a&&t.setAttribute(o,""),!n&&i&&t.setAttribute(i,"true")}}))}(t),l.clear(),th++,()=>{u.forEach((e=>{const t=(Xm.get(e)||0)-1,n=(d.get(e)||0)-1;Xm.set(e,t),d.set(e,n),t||(!Jm.has(e)&&i&&e.removeAttribute(i),Jm.delete(e)),n||e.removeAttribute(o)})),th--,th||(Xm=new WeakMap,Xm=new WeakMap,Jm=new WeakSet,eh={})}}(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const oh=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function ih(e,t){const n=zf(e,oh());"prev"===t&&n.reverse();const r=n.indexOf(Bd(Zd(e)));return n.slice(r+1)[0]}function ah(){return ih(document.body,"next")}function sh(){return ih(document.body,"prev")}function lh(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Yd(n,r)}function ch(e){zf(e,oh()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function uh(e){e.querySelectorAll("[data-tabindex]").forEach((e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")}))}const dh={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function fh(e){"Tab"===e.key&&(e.target,clearTimeout(void 0))}const mh=d.forwardRef((function(e,t){const[n,r]=d.useState();Im((()=>(qd()&&r("button"),document.addEventListener("keydown",fh),()=>{document.removeEventListener("keydown",fh)})),[]);const o={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[Wm("focus-guard")]:"",style:dh};return d.createElement("span",_m({},e,o))})),hh=d.createContext(null),ph=Wm("portal");function gh(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=function(e){void 0===e&&(e={});const{id:t,root:n}=e,r=Fm(),o=yh(),[i,a]=d.useState(null),s=d.useRef(null);return Im((()=>()=>{null==i||i.remove(),queueMicrotask((()=>{s.current=null}))}),[i]),Im((()=>{if(!r)return;if(s.current)return;const e=t?document.getElementById(t):null;if(!e)return;const n=document.createElement("div");n.id=r,n.setAttribute(ph,""),e.appendChild(n),s.current=n,a(n)}),[t,r]),Im((()=>{if(null===n)return;if(!r)return;if(s.current)return;let e=n||(null==o?void 0:o.portalNode);e&&!jd(e)&&(e=e.current),e=e||document.body;let i=null;t&&(i=document.createElement("div"),i.id=t,e.appendChild(i));const l=document.createElement("div");l.id=r,l.setAttribute(ph,""),e=i||e,e.appendChild(l),s.current=l,a(l)}),[t,n,r,o]),i}({id:n,root:r}),[a,s]=d.useState(null),l=d.useRef(null),c=d.useRef(null),u=d.useRef(null),f=d.useRef(null),m=null==a?void 0:a.modal,h=null==a?void 0:a.open,p=!!a&&!a.modal&&a.open&&o&&!(!r&&!i);return d.useEffect((()=>{if(i&&o&&!m)return i.addEventListener("focusin",e,!0),i.addEventListener("focusout",e,!0),()=>{i.removeEventListener("focusin",e,!0),i.removeEventListener("focusout",e,!0)};function e(e){i&&lh(e)&&("focusin"===e.type?uh:ch)(i)}}),[i,o,m]),d.useEffect((()=>{i&&(h||uh(i))}),[h,i]),d.createElement(hh.Provider,{value:d.useMemo((()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:f,portalNode:i,setFocusManagerState:s})),[o,i])},p&&i&&d.createElement(mh,{"data-type":"outside",ref:l,onFocus:e=>{if(lh(e,i)){var t;null==(t=u.current)||t.focus()}else{const e=sh()||(null==a?void 0:a.refs.domReference.current);null==e||e.focus()}}}),p&&i&&d.createElement("span",{"aria-owns":i.id,style:dh}),i&&Ae.createPortal(t,i),p&&i&&d.createElement(mh,{"data-type":"outside",ref:c,onFocus:e=>{if(lh(e,i)){var t;null==(t=f.current)||t.focus()}else{const t=ah()||(null==a?void 0:a.refs.domReference.current);null==t||t.focus(),(null==a?void 0:a.closeOnFocusOut)&&(null==a||a.onOpenChange(!1,e.nativeEvent,"focus-out"))}}}))}const yh=()=>d.useContext(hh),vh="data-floating-ui-focusable";function bh(e){return e?e.hasAttribute(vh)?e:e.querySelector("["+vh+"]")||e:null}let wh=[];function xh(e){wh=wh.filter((e=>e.isConnected));let t=e;if(t&&"body"!==Md(t)){if(!function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==kf.call(e,Ef)&&_f(t,e)}(t,oh())){const e=zf(t,oh())[0];e&&(t=e)}wh.push(t),wh.length>20&&(wh=wh.slice(-20))}}function Mh(){return wh.slice().reverse().find((e=>e.isConnected))}const Eh=d.forwardRef((function(e,t){return d.createElement("button",_m({},e,{type:"button",ref:t,tabIndex:-1,style:dh}))}));function Nh(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:f=!0}=e,{open:m,refs:h,nodeId:p,onOpenChange:g,events:y,dataRef:v,floatingId:b,elements:{domReference:w,floating:x}}=t,M="number"==typeof a&&a<0,E=nf(w)&&M,N="undefined"==typeof HTMLElement||!("inert"in HTMLElement.prototype)||i,k=Hm(o),j=Hm(a),D=Hm(s),T=Vm(),S=yh(),C=d.useRef(null),R=d.useRef(null),O=d.useRef(!1),A=d.useRef(!1),I=d.useRef(-1),_=null!=S,P=bh(x),L=xm((function(e){return void 0===e&&(e=P),e?zf(e,oh()):[]})),z=xm((e=>{const t=L(e);return k.current.map((e=>w&&"reference"===e?w:P&&"floating"===e?P:t)).filter(Boolean).flat()}));function F(e){return!r&&u&&c?d.createElement(Eh,{ref:"start"===e?C:R,onClick:e=>g(!1,e.nativeEvent)},"string"==typeof u?u:"Dismiss"):null}d.useEffect((()=>{if(r)return;if(!c)return;function e(e){if("Tab"===e.key){Yd(P,Bd(Zd(P)))&&0===L().length&&!E&&tf(e);const t=z(),n=Jd(e);"reference"===k.current[0]&&n===w&&(tf(e),e.shiftKey?Km(t[t.length-1]):Km(t[1])),"floating"===k.current[1]&&n===P&&e.shiftKey&&(tf(e),Km(t[0]))}}const t=Zd(P);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}}),[r,w,P,c,k,E,L,z]),d.useEffect((()=>{if(!r&&x)return x.addEventListener("focusin",e),()=>{x.removeEventListener("focusin",e)};function e(e){const t=Jd(e),n=L().indexOf(t);-1!==n&&(I.current=n)}}),[r,x,L]),d.useEffect((()=>{if(!r&&f)return x&&Dd(w)?(w.addEventListener("focusout",t),w.addEventListener("pointerdown",e),x.addEventListener("focusout",t),()=>{w.removeEventListener("focusout",t),w.removeEventListener("pointerdown",e),x.removeEventListener("focusout",t)}):void 0;function e(){A.current=!0,setTimeout((()=>{A.current=!1}))}function t(e){const t=e.relatedTarget;queueMicrotask((()=>{const n=!(Yd(w,t)||Yd(x,t)||Yd(t,x)||Yd(null==S?void 0:S.portalNode,t)||null!=t&&t.hasAttribute(Wm("focus-guard"))||T&&(Zm(T.nodesRef.current,p).find((e=>{var n,r;return Yd(null==(n=e.context)?void 0:n.elements.floating,t)||Yd(null==(r=e.context)?void 0:r.elements.domReference,t)}))||function(e,t){var n;let r=[],o=null==(n=e.find((e=>e.id===t)))?void 0:n.parentId;for(;o;){const t=e.find((e=>e.id===o));o=null==t?void 0:t.parentId,t&&(r=r.concat(t))}return r}(T.nodesRef.current,p).find((e=>{var n,r;return(null==(n=e.context)?void 0:n.elements.floating)===t||(null==(r=e.context)?void 0:r.elements.domReference)===t}))));if(l&&n&&Bd(Zd(P))===Zd(P).body){Dd(P)&&P.focus();const e=I.current,t=L(),n=t[e]||t[t.length-1]||P;Dd(n)&&n.focus()}!E&&c||!t||!n||A.current||t===Mh()||(O.current=!0,g(!1,e,"focus-out"))}))}}),[r,w,x,P,c,p,T,S,g,f,l,L,E]),d.useEffect((()=>{var e;if(r)return;const t=Array.from((null==S||null==(e=S.portalNode)?void 0:e.querySelectorAll("["+Wm("portal")+"]"))||[]);if(x){const e=[x,...t,C.current,R.current,k.current.includes("reference")||E?w:null].filter((e=>null!=e)),n=c||E?rh(e,N,!N):rh(e);return()=>{n()}}}),[r,w,x,c,k,S,E,N]),Im((()=>{if(r||!Dd(P))return;const e=Bd(Zd(P));queueMicrotask((()=>{const t=z(P),n=j.current,r=("number"==typeof n?t[n]:n.current)||P,o=Yd(P,e);M||o||!m||Km(r,{preventScroll:r===P})}))}),[r,m,P,M,z,j]),Im((()=>{if(r||!P)return;let e=!1;const t=Zd(P),n=Bd(t);let o=v.current.openEvent;function i(t){let{open:n,reason:r,event:i,nested:a}=t;n&&(o=i),"escape-key"===r&&h.domReference.current&&xh(h.domReference.current),"hover"===r&&"mouseleave"===i.type&&(O.current=!0),"outside-press"===r&&(a?(O.current=!1,e=!0):O.current=!(Wd(i)||Hd(i)))}xh(n),y.on("openchange",i);const a=t.createElement("span");return a.setAttribute("tabindex","-1"),a.setAttribute("aria-hidden","true"),Object.assign(a.style,dh),_&&w&&w.insertAdjacentElement("afterend",a),()=>{y.off("openchange",i);const n=Bd(t),r=Yd(x,n)||T&&Zm(T.nodesRef.current,p).some((e=>{var t;return Yd(null==(t=e.context)?void 0:t.elements.floating,n)}));(r||o&&["click","mousedown"].includes(o.type))&&h.domReference.current&&xh(h.domReference.current);const s="boolean"==typeof D.current?Mh()||a:D.current.current||a;queueMicrotask((()=>{D.current&&!O.current&&Dd(s)&&(s===n||n===t.body||r)&&s.focus({preventScroll:e}),a.remove()}))}}),[r,x,P,D,v,h,y,T,p,_,w]),d.useEffect((()=>{queueMicrotask((()=>{O.current=!1}))}),[r]),Im((()=>{if(!r&&S)return S.setFocusManagerState({modal:c,closeOnFocusOut:f,open:m,onOpenChange:g,refs:h}),()=>{S.setFocusManagerState(null)}}),[r,S,c,m,g,h,f]),Im((()=>{if(r)return;if(!P)return;if("function"!=typeof MutationObserver)return;if(M)return;const e=()=>{const e=P.getAttribute("tabindex"),t=L(),n=Bd(Zd(x)),r=t.indexOf(n);-1!==r&&(I.current=r),k.current.includes("floating")||n!==h.domReference.current&&0===t.length?"0"!==e&&P.setAttribute("tabindex","0"):"-1"!==e&&P.setAttribute("tabindex","-1")};e();const t=new MutationObserver(e);return t.observe(P,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}}),[r,x,P,h,k,L,M]);const U=!r&&N&&(!c||!E)&&(_||c);return d.createElement(d.Fragment,null,U&&d.createElement(mh,{"data-type":"inside",ref:null==S?void 0:S.beforeInsideRef,onFocus:e=>{if(c){const e=z();Km("reference"===o[0]?e[0]:e[e.length-1])}else if(null!=S&&S.preserveTabOrder&&S.portalNode)if(O.current=!1,lh(e,S.portalNode)){const e=ah()||w;null==e||e.focus()}else{var t;null==(t=S.beforeOutsideRef.current)||t.focus()}}}),!E&&F("start"),n,F("end"),U&&d.createElement(mh,{"data-type":"inside",ref:null==S?void 0:S.afterInsideRef,onFocus:e=>{if(c)Km(z()[0]);else if(null!=S&&S.preserveTabOrder&&S.portalNode)if(f&&(O.current=!0),lh(e,S.portalNode)){const e=sh()||w;null==e||e.focus()}else{var t;null==(t=S.afterOutsideRef.current)||t.focus()}}}))}let kh=0,jh=()=>{};const Dh=d.forwardRef((function(e,t){const{lockScroll:n=!1,...r}=e;return Im((()=>{if(n)return kh++,1===kh&&(jh=function(){const e=/iP(hone|ad|od)|iOS/.test(Qd()),t=document.body.style,n=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",r=window.innerWidth-document.documentElement.clientWidth,o=t.left?parseFloat(t.left):window.scrollX,i=t.top?parseFloat(t.top):window.scrollY;if(t.overflow="hidden",r&&(t[n]=r+"px"),e){var a,s;const e=(null==(a=window.visualViewport)?void 0:a.offsetLeft)||0,n=(null==(s=window.visualViewport)?void 0:s.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(i-Math.floor(n))+"px",left:-(o-Math.floor(e))+"px",right:"0"})}return()=>{Object.assign(t,{overflow:"",[n]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(o,i))}}()),()=>{kh--,0===kh&&jh()}}),[n]),d.createElement("div",_m({ref:t},r,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...r.style}}))}));function Th(e){return Dd(e.target)&&"BUTTON"===e.target.tagName}function Sh(e){return ef(e)}function Ch(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:f=!0}=t,m=d.useRef(),h=d.useRef(!1),p=d.useMemo((()=>({onPointerDown(e){m.current=e.pointerType},onMouseDown(e){const t=m.current;0===e.button&&"click"!==s&&(Kd(t,!0)&&c||(!n||!l||o.current.openEvent&&f&&"mousedown"!==o.current.openEvent.type?(e.preventDefault(),r(!0,e.nativeEvent,"click")):r(!1,e.nativeEvent,"click")))},onClick(e){const t=m.current;"mousedown"===s&&m.current?m.current=void 0:Kd(t,!0)&&c||(!n||!l||o.current.openEvent&&f&&"click"!==o.current.openEvent.type?r(!0,e.nativeEvent,"click"):r(!1,e.nativeEvent,"click"))},onKeyDown(e){m.current=void 0,e.defaultPrevented||!u||Th(e)||(" "!==e.key||Sh(i)||(e.preventDefault(),h.current=!0),"Enter"===e.key&&r(!n||!l,e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!u||Th(e)||Sh(i)||" "===e.key&&h.current&&(h.current=!1,r(!n||!l,e.nativeEvent,"click"))}})),[o,i,s,c,u,r,n,f,l]);return d.useMemo((()=>a?{reference:p}:{}),[a,p])}const Rh={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Oh={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Ah=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function Ih(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:f="pointerdown",ancestorScroll:m=!1,bubbles:h,capture:p}=t,g=Vm(),y=xm("function"==typeof l?l:()=>!1),v="function"==typeof l?y:l,b=d.useRef(!1),w=d.useRef(!1),{escapeKey:x,outsidePress:M}=Ah(h),{escapeKey:E,outsidePress:N}=Ah(p),k=d.useRef(!1),j=xm((e=>{var t;if(!n||!a||!s||"Escape"!==e.key)return;if(k.current)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,l=g?Zm(g.nodesRef.current,o):[];if(!x&&(e.stopPropagation(),l.length>0)){let e=!0;if(l.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),D=xm((e=>{var t;const n=()=>{var t;j(e),null==(t=Jd(e))||t.removeEventListener("keydown",n)};null==(t=Jd(e))||t.addEventListener("keydown",n)})),T=xm((e=>{var t;const n=b.current;b.current=!1;const a=w.current;if(w.current=!1,"click"===c&&a)return;if(n)return;if("function"==typeof v&&!v(e))return;const s=Jd(e),l="["+Wm("inert")+"]",u=Zd(o.floating).querySelectorAll(l);let d=jd(s)?s:null;for(;d&&!Id(d);){const e=Ld(d);if(Id(e)||!jd(e))break;d=e}if(u.length&&jd(s)&&!s.matches("html,body")&&!Yd(s,o.floating)&&Array.from(u).every((e=>!Yd(d,e))))return;if(Dd(s)&&R){const t=s.clientWidth>0&&s.scrollWidth>s.clientWidth,n=s.clientHeight>0&&s.scrollHeight>s.clientHeight;let r=n&&e.offsetX>s.clientWidth;if(n&&"rtl"===_d(s).direction&&(r=e.offsetX<=s.offsetWidth-s.clientWidth),r||t&&e.offsetY>s.clientHeight)return}const f=null==(t=i.current.floatingContext)?void 0:t.nodeId,m=g&&Zm(g.nodesRef.current,f).some((t=>{var n;return Xd(e,null==(n=t.context)?void 0:n.elements.floating)}));if(Xd(e,o.floating)||Xd(e,o.domReference)||m)return;const h=g?Zm(g.nodesRef.current,f):[];if(h.length>0){let e=!0;if(h.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}r(!1,e,"outside-press")})),S=xm((e=>{var t;const n=()=>{var t;T(e),null==(t=Jd(e))||t.removeEventListener(c,n)};null==(t=Jd(e))||t.addEventListener(c,n)}));d.useEffect((()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=M;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function l(){window.clearTimeout(e),k.current=!0}function u(){e=window.setTimeout((()=>{k.current=!1}),Ad()?5:0)}const d=Zd(o.floating);s&&(d.addEventListener("keydown",E?D:j,E),d.addEventListener("compositionstart",l),d.addEventListener("compositionend",u)),v&&d.addEventListener(c,N?S:T,N);let f=[];return m&&(jd(o.domReference)&&(f=Fd(o.domReference)),jd(o.floating)&&(f=f.concat(Fd(o.floating))),!jd(o.reference)&&o.reference&&o.reference.contextElement&&(f=f.concat(Fd(o.reference.contextElement)))),f=f.filter((e=>{var t;return e!==(null==(t=d.defaultView)?void 0:t.visualViewport)})),f.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{s&&(d.removeEventListener("keydown",E?D:j,E),d.removeEventListener("compositionstart",l),d.removeEventListener("compositionend",u)),v&&d.removeEventListener(c,N?S:T,N),f.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[i,o,s,v,c,n,r,m,a,x,M,j,E,D,T,N,S]),d.useEffect((()=>{b.current=!1}),[v,c]);const C=d.useMemo((()=>({onKeyDown:j,[Rh[f]]:e=>{u&&r(!1,e.nativeEvent,"reference-press")}})),[j,r,u,f]),R=d.useMemo((()=>({onKeyDown:j,onMouseDown(){w.current=!0},onMouseUp(){w.current=!0},[Oh[c]]:()=>{b.current=!0}})),[j,c]);return d.useMemo((()=>a?{reference:C,floating:R}:{}),[a,C,R])}function _h(e){void 0===e&&(e={});const{nodeId:t}=e,n=function(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Fm(),i=d.useRef({}),[a]=d.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}())),s=null!=Qm(),[l,c]=d.useState(r.reference),u=xm(((e,t,r)=>{i.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:r,nested:s}),null==n||n(e,t,r)})),f=d.useMemo((()=>({setPositionReference:c})),[]),m=d.useMemo((()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference})),[l,r.reference,r.floating]);return d.useMemo((()=>({dataRef:i,open:t,onOpenChange:u,elements:m,events:a,floatingId:o,refs:f})),[t,u,m,a,o,f])}({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=d.useState(null),[s,l]=d.useState(null),c=(null==o?void 0:o.domReference)||i,u=d.useRef(null),f=Vm();Im((()=>{c&&(u.current=c)}),[c]);const m=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,f]=d.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=d.useState(r);dm(m,r)||h(r);const[p,g]=d.useState(null),[y,v]=d.useState(null),b=d.useCallback((e=>{e!==E.current&&(E.current=e,g(e))}),[]),w=d.useCallback((e=>{e!==N.current&&(N.current=e,v(e))}),[]),x=i||p,M=a||y,E=d.useRef(null),N=d.useRef(null),k=d.useRef(u),j=null!=l,D=hm(l),T=hm(o),S=hm(c),C=d.useCallback((()=>{if(!E.current||!N.current)return;const e={placement:t,strategy:n,middleware:m};T.current&&(e.platform=T.current),cm(E.current,N.current,e).then((e=>{const t={...e,isPositioned:!1!==S.current};R.current&&!dm(k.current,t)&&(k.current=t,Ae.flushSync((()=>{f(t)})))}))}),[m,t,n,T,S]);um((()=>{!1===c&&k.current.isPositioned&&(k.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[c]);const R=d.useRef(!1);um((()=>(R.current=!0,()=>{R.current=!1})),[]),um((()=>{if(x&&(E.current=x),M&&(N.current=M),x&&M){if(D.current)return D.current(x,M,C);C()}}),[x,M,C,D,j]);const O=d.useMemo((()=>({reference:E,floating:N,setReference:b,setFloating:w})),[b,w]),A=d.useMemo((()=>({reference:x,floating:M})),[x,M]),I=d.useMemo((()=>{const e={position:n,left:0,top:0};if(!A.floating)return e;const t=mm(A.floating,u.x),r=mm(A.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...fm(A.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,A.floating,u.x,u.y]);return d.useMemo((()=>({...u,update:C,refs:O,elements:A,floatingStyles:I})),[u,C,O,A,I])}({...e,elements:{...o,...s&&{reference:s}}}),h=d.useCallback((e=>{const t=jd(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;l(t),m.refs.setReference(t)}),[m.refs]),p=d.useCallback((e=>{(jd(e)||null===e)&&(u.current=e,a(e)),(jd(m.refs.reference.current)||null===m.refs.reference.current||null!==e&&!jd(e))&&m.refs.setReference(e)}),[m.refs]),g=d.useMemo((()=>({...m.refs,setReference:p,setPositionReference:h,domReference:u})),[m.refs,p,h]),y=d.useMemo((()=>({...m.elements,domReference:c})),[m.elements,c]),v=d.useMemo((()=>({...m,...r,refs:g,elements:y,nodeId:t})),[m,g,y,t,r]);return Im((()=>{r.dataRef.current.floatingContext=v;const e=null==f?void 0:f.nodesRef.current.find((e=>e.id===t));e&&(e.context=v)})),d.useMemo((()=>({...m,context:v,refs:g,elements:y})),[m,g,y,v])}const Ph="active",Lh="selected";function zh(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[Ph]:t,[Lh]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[vh]:""},...i,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,i]=t;var a;o&&[Ph,Lh].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(a=r.get(n))||a.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map((e=>e(...o))).find((e=>void 0!==e))})):e[n]=i)})),e):e),{})}}function Fh(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),o=d.useCallback((t=>zh(t,e,"reference")),t),i=d.useCallback((t=>zh(t,e,"floating")),n),a=d.useCallback((t=>zh(t,e,"item")),r);return d.useMemo((()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a})),[o,i,a])}let Uh=!1;function Bh(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Yh(e,t){return Bh(t,e===Mm||e===Em,e===Nm||e===km)}function Qh(e,t,n){return Bh(t,e===Em,n?e===Nm:e===km)||"Enter"===e||" "===e||""===e}function Vh(e,t,n){return Bh(t,n?e===km:e===Nm,e===Mm)}function Wh(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:i,activeIndex:a,onNavigate:s=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:f=!1,nested:m=!1,rtl:h=!1,virtual:p=!1,focusItemOnOpen:g="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:v=!0,disabledIndices:b,orientation:w="vertical",cols:x=1,scrollItemIntoView:M=!0,virtualItemRef:E,itemSizes:N,dense:k=!1}=t,j=Hm(bh(o.floating)),D=Qm(),T=Vm(),S=xm(s),C=nf(o.domReference),R=d.useRef(g),O=d.useRef(null!=c?c:-1),A=d.useRef(null),I=d.useRef(!0),_=d.useRef(S),P=d.useRef(!!o.floating),L=d.useRef(n),z=d.useRef(!1),F=d.useRef(!1),U=Hm(b),B=Hm(n),Y=Hm(M),Q=Hm(c),[V,W]=d.useState(),[H,q]=d.useState(),$=xm((function(e,t,n){function r(e){p?(W(e.id),null==T||T.events.emit("virtualfocus",e),E&&(E.current=e)):Km(e,{preventScroll:!0,sync:!(!Gd()||!qd())&&(Uh||z.current)})}void 0===n&&(n=!1);const o=e.current[t.current];o&&r(o),requestAnimationFrame((()=>{const i=e.current[t.current]||o;if(!i)return;o||r(i);const a=Y.current;a&&K&&(n||!I.current)&&(null==i.scrollIntoView||i.scrollIntoView("boolean"==typeof a?{block:"nearest",inline:"nearest"}:a))}))}));Im((()=>{document.createElement("div").focus({get preventScroll(){return Uh=!0,!1}})}),[]),Im((()=>{l&&(n&&o.floating?R.current&&null!=c&&(F.current=!0,O.current=c,S(c)):P.current&&(O.current=-1,_.current(null)))}),[l,n,o.floating,c,S]),Im((()=>{if(l&&n&&o.floating)if(null==a){if(z.current=!1,null!=Q.current)return;if(P.current&&(O.current=-1,$(i,O)),(!L.current||!P.current)&&R.current&&(null!=A.current||!0===R.current&&null==A.current)){let e=0;const t=()=>{null==i.current[0]?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e++):(O.current=null==A.current||Qh(A.current,w,h)||m?Tm(i,U.current):Sm(i,U.current),A.current=null,S(O.current))};t()}}else Dm(i,a)||(O.current=a,$(i,O,F.current),F.current=!1)}),[l,n,o.floating,a,Q,m,i,w,h,S,$,U]),Im((()=>{var e;if(!l||o.floating||!T||p||!P.current)return;const t=T.nodesRef.current,n=null==(e=t.find((e=>e.id===D)))||null==(e=e.context)?void 0:e.elements.floating,r=Bd(Zd(o.floating)),i=t.some((e=>e.context&&Yd(e.context.elements.floating,r)));n&&!i&&I.current&&n.focus({preventScroll:!0})}),[l,o.floating,T,D,p]),Im((()=>{if(l&&T&&p&&!D)return T.events.on("virtualfocus",e),()=>{T.events.off("virtualfocus",e)};function e(e){q(e.id),E&&(E.current=e)}}),[l,T,p,D,E]),Im((()=>{_.current=S,P.current=!!o.floating})),Im((()=>{n||(A.current=null)}),[n]),Im((()=>{L.current=n}),[n]);const G=null!=a,K=d.useMemo((()=>{function e(e){if(!n)return;const t=i.current.indexOf(e);-1!==t&&S(t)}return{onFocus(t){let{currentTarget:n}=t;e(n)},onClick:e=>{let{currentTarget:t}=e;return t.focus({preventScroll:!0})},...y&&{onMouseMove(t){let{currentTarget:n}=t;e(n)},onPointerLeave(e){let{pointerType:t}=e;I.current&&"touch"!==t&&(O.current=-1,$(i,O),S(null),p||Km(j.current,{preventScroll:!0}))}}}}),[n,j,$,y,i,S,p]),Z=xm((e=>{if(I.current=!1,z.current=!0,229===e.which)return;if(!B.current&&e.currentTarget===j.current)return;if(m&&Vh(e.key,w,h))return tf(e),r(!1,e.nativeEvent,"list-navigation"),void(Dd(o.domReference)&&(p?null==T||T.events.emit("virtualfocus",o.domReference):o.domReference.focus()));const t=O.current,a=Tm(i,b),s=Sm(i,b);if(C||("Home"===e.key&&(tf(e),O.current=a,S(O.current)),"End"===e.key&&(tf(e),O.current=s,S(O.current))),x>1){const t=N||Array.from({length:i.current.length},(()=>({width:1,height:1}))),n=function(e,t,n){const r=[];let o=0;return e.forEach(((e,i)=>{let{width:a,height:s}=e,l=!1;for(n&&(o=0);!l;){const e=[];for(let n=0;n<a;n++)for(let r=0;r<s;r++)e.push(o+n+r*t);o%t+a<=t&&e.every((e=>null==r[e]))?(e.forEach((e=>{r[e]=i})),l=!0):o++}})),[...r]}(t,x,k),r=n.findIndex((e=>null!=e&&!Am(i.current,e,b))),o=n.reduce(((e,t,n)=>null==t||Am(i.current,t,b)?e:n),-1),l=n[function(e,t){let{event:n,orientation:r,loop:o,rtl:i,cols:a,disabledIndices:s,minIndex:l,maxIndex:c,prevIndex:u,stopEvent:d=!1}=t,f=u;if(n.key===Mm){if(d&&tf(n),-1===u)f=c;else if(f=Cm(e,{startingIndex:f,amount:a,decrement:!0,disabledIndices:s}),o&&(u-a<l||f<0)){const e=u%a,t=c%a,n=c-(t-e);f=t===e?c:t>e?n:n-a}Dm(e,f)&&(f=u)}if(n.key===Em&&(d&&tf(n),-1===u?f=l:(f=Cm(e,{startingIndex:u,amount:a,disabledIndices:s}),o&&u+a>c&&(f=Cm(e,{startingIndex:u%a-a,amount:a,disabledIndices:s}))),Dm(e,f)&&(f=u)),"both"===r){const t=sf(u/a);n.key===(i?Nm:km)&&(d&&tf(n),u%a!=a-1?(f=Cm(e,{startingIndex:u,disabledIndices:s}),o&&jm(f,a,t)&&(f=Cm(e,{startingIndex:u-u%a-1,disabledIndices:s}))):o&&(f=Cm(e,{startingIndex:u-u%a-1,disabledIndices:s})),jm(f,a,t)&&(f=u)),n.key===(i?km:Nm)&&(d&&tf(n),u%a!=0?(f=Cm(e,{startingIndex:u,decrement:!0,disabledIndices:s}),o&&jm(f,a,t)&&(f=Cm(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s}))):o&&(f=Cm(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s})),jm(f,a,t)&&(f=u));const r=sf(c/a)===t;Dm(e,f)&&(f=o&&r?n.key===(i?km:Nm)?c:Cm(e,{startingIndex:u-u%a-1,disabledIndices:s}):u)}return f}({current:n.map((e=>null!=e?i.current[e]:null))},{event:e,orientation:w,loop:f,rtl:h,cols:x,disabledIndices:Om([...b||i.current.map(((e,t)=>Am(i.current,t)?t:void 0)),void 0],n),minIndex:r,maxIndex:o,prevIndex:Rm(O.current>s?a:O.current,t,n,x,e.key===Em?"bl":e.key===(h?Nm:km)?"tr":"tl"),stopEvent:!0})];if(null!=l&&(O.current=l,S(O.current)),"both"===w)return}if(Yh(e.key,w)){if(tf(e),n&&!p&&Bd(e.currentTarget.ownerDocument)===e.currentTarget)return O.current=Qh(e.key,w,h)?a:s,void S(O.current);Qh(e.key,w,h)?O.current=f?t>=s?u&&t!==i.current.length?-1:a:Cm(i,{startingIndex:t,disabledIndices:b}):Math.min(s,Cm(i,{startingIndex:t,disabledIndices:b})):O.current=f?t<=a?u&&-1!==t?i.current.length:s:Cm(i,{startingIndex:t,decrement:!0,disabledIndices:b}):Math.max(a,Cm(i,{startingIndex:t,decrement:!0,disabledIndices:b})),Dm(i,O.current)?S(null):S(O.current)}})),X=d.useMemo((()=>p&&n&&G&&{"aria-activedescendant":H||V}),[p,n,G,H,V]),J=d.useMemo((()=>({"aria-orientation":"both"===w?void 0:w,...!nf(o.domReference)&&X,onKeyDown:Z,onPointerMove(){I.current=!0}})),[X,Z,o.domReference,w]),ee=d.useMemo((()=>{function e(e){"auto"===g&&Wd(e.nativeEvent)&&(R.current=!0)}return{...X,onKeyDown(e){I.current=!1;const t=e.key.startsWith("Arrow"),o=["Home","End"].includes(e.key),a=t||o,s=function(e,t,n){return Bh(t,n?e===Nm:e===km,e===Em)}(e.key,w,h),l=Vh(e.key,w,h),u=Yh(e.key,w),d=(m?s:u)||"Enter"===e.key||""===e.key.trim();if(p&&n){const t=null==T?void 0:T.nodesRef.current.find((e=>null==e.parentId)),n=T&&t?function(e,t){let n,r=-1;return function t(o,i){i>r&&(n=o,r=i),Zm(e,o).forEach((e=>{t(e.id,i+1)}))}(t,0),e.find((e=>e.id===n))}(T.nodesRef.current,t.id):null;if(a&&n&&E){const t=new KeyboardEvent("keydown",{key:e.key,bubbles:!0});if(s||l){var f,g;const r=(null==(f=n.context)?void 0:f.elements.domReference)===e.currentTarget,o=l&&!r?null==(g=n.context)?void 0:g.elements.domReference:s?i.current.find((e=>(null==e?void 0:e.id)===V)):null;o&&(tf(e),o.dispatchEvent(t),q(void 0))}var y;if((u||o)&&n.context&&n.context.open&&n.parentId&&e.currentTarget!==n.context.elements.domReference)return tf(e),void(null==(y=n.context.elements.domReference)||y.dispatchEvent(t))}return Z(e)}(n||v||!t)&&(d&&(A.current=m&&u?null:e.key),m?s&&(tf(e),n?(O.current=Tm(i,U.current),S(O.current)):r(!0,e.nativeEvent,"list-navigation")):u&&(null!=c&&(O.current=c),tf(e),!n&&v?r(!0,e.nativeEvent,"list-navigation"):Z(e),n&&S(O.current)))},onFocus(){n&&!p&&S(null)},onPointerDown:function(e){R.current=g,"auto"===g&&Hd(e.nativeEvent)&&(R.current=!0)},onMouseDown:e,onClick:e}}),[V,X,Z,U,g,i,m,S,r,n,v,w,h,c,T,p,E]);return d.useMemo((()=>l?{reference:ee,floating:J,item:K}:{}),[l,ee,J,K])}const Hh=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function qh(e,t){var n;void 0===t&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,s=null!=(n=Hh.get(a))?n:a,l=Fm(),c=null!=Qm(),u=d.useMemo((()=>"tooltip"===s||"label"===a?{["aria-"+("label"===a?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":"alertdialog"===s?"dialog":s,"aria-controls":r?o:void 0,..."listbox"===s&&{role:"combobox"},..."menu"===s&&{id:l},..."menu"===s&&c&&{role:"menuitem"},..."select"===a&&{"aria-autocomplete":"none"},..."combobox"===a&&{"aria-autocomplete":"list"}}),[s,o,c,r,l,a]),f=d.useMemo((()=>{const e={id:o,...s&&{role:s}};return"tooltip"===s||"label"===a?e:{...e,..."menu"===s&&{"aria-labelledby":l}}}),[s,o,l,a]),m=d.useCallback((e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:o+"-option"}};switch(a){case"select":return{...r,"aria-selected":t&&n};case"combobox":return{...r,...t&&{"aria-selected":!0}}}return{}}),[o,a]);return d.useMemo((()=>i?{reference:u,floating:f,item:m}:{}),[i,u,f,m])}const $h=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,((e,t)=>(t?"-":"")+e.toLowerCase()));function Gh(e,t){return"function"==typeof e?e(t):e}function Kh(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let e=0,a=i-1;e<i;a=e++){const[i,s]=t[e]||[0,0],[l,c]=t[a]||[0,0];s>=r!=c>=r&&n<=(l-i)*(r-s)/(c-s)+i&&(o=!o)}return o}function Zh(e){void 0===e&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,a=null,s=null,l=performance.now();const c=e=>{let{x:n,y:c,placement:u,elements:d,onClose:f,nodeId:m,tree:h}=e;return function(e){function p(){clearTimeout(o),f()}if(clearTimeout(o),!d.domReference||!d.floating||null==u||null==n||null==c)return;const{clientX:g,clientY:y}=e,v=[g,y],b=Jd(e),w="mouseleave"===e.type,x=Yd(d.floating,b),M=Yd(d.domReference,b),E=d.domReference.getBoundingClientRect(),N=d.floating.getBoundingClientRect(),k=u.split("-")[0],j=n>N.right-N.width/2,D=c>N.bottom-N.height/2,T=function(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}(v,E),S=N.width>E.width,C=N.height>E.height,R=(S?E:N).left,O=(S?E:N).right,A=(C?E:N).top,I=(C?E:N).bottom;if(x&&(i=!0,!w))return;if(M&&(i=!1),M&&!w)return void(i=!0);if(w&&jd(e.relatedTarget)&&Yd(d.floating,e.relatedTarget))return;if(h&&Zm(h.nodesRef.current,m).some((e=>{let{context:t}=e;return null==t?void 0:t.open})))return;if("top"===k&&c>=E.bottom-1||"bottom"===k&&c<=E.top+1||"left"===k&&n>=E.right-1||"right"===k&&n<=E.left+1)return p();let _=[];switch(k){case"top":_=[[R,E.top+1],[R,N.bottom-1],[O,N.bottom-1],[O,E.top+1]];break;case"bottom":_=[[R,N.top+1],[R,E.bottom-1],[O,E.bottom-1],[O,N.top+1]];break;case"left":_=[[N.right-1,I],[N.right-1,A],[E.left+1,A],[E.left+1,I]];break;case"right":_=[[E.right-1,I],[E.right-1,A],[N.left+1,A],[N.left+1,I]]}if(!Kh([g,y],_)){if(i&&!T)return p();if(!w&&r){const t=function(e,t){const n=performance.now(),r=n-l;if(null===a||null===s||0===r)return a=e,s=t,l=n,null;const o=e-a,i=t-s,c=Math.sqrt(o*o+i*i);return a=e,s=t,l=n,c/r}(e.clientX,e.clientY);if(null!==t&&t<.1)return p()}Kh([g,y],function(e){let[n,r]=e;switch(k){case"top":return[[S?n+t/2:j?n+4*t:n-4*t,r+t+1],[S?n-t/2:j?n+4*t:n-4*t,r+t+1],[N.left,j||S?N.bottom-t:N.top],[N.right,j?S?N.bottom-t:N.top:N.bottom-t]];case"bottom":return[[S?n+t/2:j?n+4*t:n-4*t,r-t],[S?n-t/2:j?n+4*t:n-4*t,r-t],[N.left,j||S?N.top+t:N.bottom],[N.right,j?S?N.top+t:N.bottom:N.top+t]];case"left":{const e=[n+t+1,C?r+t/2:D?r+4*t:r-4*t],o=[n+t+1,C?r-t/2:D?r+4*t:r-4*t];return[[D||C?N.right-t:N.left,N.top],[D?C?N.right-t:N.left:N.right-t,N.bottom],e,o]}case"right":return[[n-t,C?r+t/2:D?r+4*t:r-4*t],[n-t,C?r-t/2:D?r+4*t:r-4*t],[D||C?N.left+t:N.right,N.top],[D?C?N.left+t:N.right:N.left+t,N.bottom]]}}([n,c]))?!i&&r&&(o=window.setTimeout(p,40)):p()}}};return c.__options={blockPointerEvents:n},c}let Xh=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t};const Jh={sm:{icon:"[&>svg]:size-4",searchIcon:"[&>svg]:size-4",selectButton:"px-2.5 py-2 rounded text-xs font-medium leading-4 min-h-[2rem]",multiSelect:"pl-2 pr-2 py-1.5",displaySelected:"text-xs font-normal",dropdown:"rounded-md",dropdownItemsWrapper:"p-1.5",searchbarWrapper:"p-3 flex items-center gap-0.5",searchbar:"font-medium text-sm",searchbarIcon:"size-4",label:"text-sm font-medium"},md:{icon:"[&>svg]:size-5",searchIcon:"[&>svg]:size-5",selectButton:"px-3.5 py-2.5 rounded-md text-sm font-medium leading-4 min-h-[2.5rem]",multiSelect:"pl-2 pr-2.5 py-2",displaySelected:"text-sm font-normal",dropdown:"rounded-lg",dropdownItemsWrapper:"p-2",searchbarWrapper:"p-2.5 flex items-center gap-1",searchbar:"font-medium text-sm",searchbarIcon:"size-5",label:"text-sm font-medium"},lg:{icon:"[&>svg]:size-6",searchIcon:"[&>svg]:size-5",selectButton:"px-4 py-3 rounded-lg text-sm font-medium leading-5 min-h-[3rem]",multiSelect:"pl-2.5 pr-3 py-2.5",displaySelected:"text-base font-normal",dropdown:"rounded-lg",dropdownItemsWrapper:"p-2",searchbarWrapper:"p-2.5 flex items-center gap-1",searchbar:"font-medium text-sm",searchbarIcon:"size-5",label:"text-base font-medium"}},ep="group-disabled:text-field-color-disabled",tp={sm:"w-[calc(100%+0.75rem)] translate-x-[-0.375rem]",md:"w-[calc(100%+1rem)] translate-x-[-0.5rem]",lg:"w-[calc(100%+1rem)] translate-x-[-0.5rem]"},np={sm:"py-1.5 px-2 text-xs font-normal",md:"p-2 text-sm font-normal",lg:"p-2 text-base font-normal"},rp=e=>null===e||"boolean"==typeof e?"":"string"==typeof e||"number"==typeof e?e.toString():Array.isArray(e)?e.map(rp).join(" ").trim():(0,d.isValidElement)(e)?e.props&&e.props.children?rp(e.props.children):"":"object"==typeof e&&"textContent"in e?e.textContent?.toString().toLowerCase()||"":"object"==typeof e&&"children"in e?rp(e.children):"",op=(0,d.forwardRef)((({label:e="",size:t="sm",className:n="",type:r="pill",variant:o="neutral",icon:i=null,disabled:a=!1,onClose:s=()=>{},closable:l=!1,onMouseDown:c=()=>{},disableHover:d=!1},f)=>{const m={neutral:"bg-badge-background-gray text-badge-color-gray border-badge-border-gray",red:"bg-badge-background-red text-badge-color-red border-badge-border-red",yellow:"bg-badge-background-yellow text-badge-color-yellow border-badge-border-yellow",green:"bg-badge-background-green text-badge-color-green border-badge-border-green",blue:"bg-badge-background-sky text-badge-color-sky border-badge-border-sky",inverse:"bg-background-inverse text-text-inverse border-background-inverse",disabled:"bg-badge-background-disabled text-badge-color-disabled border-badge-border-disabled disabled cursor-not-allowed"};let h="",p="group relative justify-center flex items-center cursor-pointer";const g={xxs:"[&>svg]:size-3",xs:"[&>svg]:size-3",sm:"[&>svg]:size-3",md:"[&>svg]:size-4",lg:"[&>svg]:size-5"};return a?(h=m.disabled,p+=" cursor-not-allowed disabled"):h=m[o],e?(0,u.jsxs)("span",{className:he("font-medium border-badge-border-gray flex items-center justify-center border border-solid box-border max-w-full transition-colors duration-150 ease-in-out",{xxs:"py-0.5 px-0.5 text-xs h-4",xs:"py-0.5 px-1 text-xs h-5",sm:"py-1 px-1.5 text-xs h-6",md:"py-1 px-1.5 text-sm h-7",lg:"py-1 px-1.5 text-base h-8"}[t],{pill:"rounded-full",rounded:"rounded"}[r],"gap-0.5",h,!d&&{neutral:"hover:bg-badge-hover-gray",red:"hover:bg-badge-hover-red",yellow:"hover:bg-badge-hover-yellow",green:"hover:bg-badge-hover-green",blue:"hover:bg-badge-hover-sky",inverse:"hover:bg-badge-hover-inverse",disabled:"hover:bg-badge-hover-disabled"}[o],n),ref:f,children:[i?(0,u.jsx)("span",{className:he("justify-center flex items-center",g[t]),children:i}):null,(0,u.jsx)("span",{className:"px-1 truncate inline-block",children:e}),l&&(0,u.jsxs)("span",{className:he(p,g[t]),onMouseDown:c,role:"button",tabIndex:0,...!a&&{onClick:s},children:[(0,u.jsx)("span",{className:"sr-only",children:`Remove ${e}`}),(0,u.jsx)(y,{}),(0,u.jsx)("span",{className:"absolute -inset-1"})]})]}):null}));op.displayName="Badge";const ip=g("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),ap=({variant:e="primary",size:t="md",icon:n=null,className:r=""})=>{const o={primary:"text-brand-primary-600",secondary:"text-background-primary"}[e],i={sm:"[&>svg]:size-4",md:"[&>svg]:size-5",lg:"[&>svg]:size-6",xl:"[&>svg]:size-8"}[t];return(0,u.jsx)("span",{className:he("flex",i,o,r),children:n||(0,u.jsx)(ip,{className:"animate-spin shrink-0"})})},sp=(0,d.createContext)({}),lp=()=>(0,d.useContext)(sp),cp=(0,d.forwardRef)((({children:e,icon:t=null,placeholder:n="Select an option",optionIcon:r=null,render:o,label:i,className:a,...s},l)=>{const{sizeValue:c,getReferenceProps:f,getValues:m,selectId:h,refs:p,isOpen:g,multiple:y,combobox:v,setSelected:b,onChange:w,isControlled:x,disabled:M,by:E}=lp(),N={sm:"xs",md:"sm",lg:"md"}[c],k=(0,d.useCallback)((()=>{if(t)return t;const e="text-field-placeholder group-disabled:text-icon-disabled";return v?(0,u.jsx)(vd,{className:e}):(0,u.jsx)(bd,{className:e})}),[t]),j=(0,d.useCallback)((()=>{const t=m();if(!t)return null;if(y)return t.map(((e,t)=>(0,u.jsx)(op,{className:"cursor-default",icon:r,type:"rounded",size:N,onMouseDown:D(e),label:"function"==typeof o?o(e):e.toString(),closable:!0,disabled:M},t)));let n="string"==typeof t?t:"";if("function"==typeof o&&(n=o(t)),"function"==typeof e&&"function"!=typeof o){const r={value:t,...y?{onClose:D(t)}:{}};n=e(r)}return((0,d.isValidElement)(e)||"string"==typeof e)&&"function"!=typeof o&&(n=e),(0,u.jsx)("span",{className:he("truncate",Jh[c].displaySelected,ep),children:n})}),[m,M]),D=e=>t=>{t?.preventDefault(),t?.stopPropagation();const n=[...m()??[]],r=n.findIndex((t=>null!==t&&null!==e&&"object"==typeof t?t[E]===e[E]:t===e));-1!==r&&(n.splice(r,1),x||b(n),"function"==typeof w&&w(n))};return(0,u.jsxs)("div",{className:"w-full flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[!!i&&(0,u.jsx)("label",{className:he(Jh[c]?.label,"text-field-label"),htmlFor:h,children:i}),(0,u.jsxs)("button",{id:h,ref:Te(p.setReference,l),className:he("flex items-center justify-between w-full box-border transition-[outline,background-color,color,box-shadow] duration-200 bg-white","outline outline-1 outline-field-border border-none cursor-pointer",!g&&"focus:ring-2 focus:ring-offset-2 focus:outline-focus-border focus:ring-focus [&:hover:not(:focus):not(:disabled)]:outline-border-strong",Jh[c].selectButton,y&&Jh[c].multiSelect,"group disabled:outline-field-border-disabled [&:hover:has(:disabled)]:outline-field-border-disabled disabled:cursor-default",a),tabIndex:0,disabled:M,...s,...f(),children:[(0,u.jsxs)("div",{className:he("flex-1 grid items-center justify-start gap-1.5 overflow-hidden",m()&&"flex flex-wrap"),children:[j(),(y?!m()?.length:!m())&&(0,u.jsx)("div",{className:he("[grid-area:1/1/2/3] text-field-input px-1",Jh[c].displaySelected,ep),children:n})]}),(0,u.jsx)("div",{className:he("flex items-center [&>svg]:shrink-0",Jh[c].icon),children:k()})]})]})}));function up({label:e,children:t,className:n,...r}){const{index:o,totalGroups:i}=r,{sizeValue:a}=lp();return(0,u.jsxs)(d.Fragment,{children:[(0,u.jsxs)("div",{className:"flex flex-col",role:"group","aria-label":e,children:[(0,u.jsx)("div",{className:he("p-2 font-normal text-text-tertiary",{sm:"text-xs",md:"text-xs",lg:"text-sm"}[a],n),id:`group-${e?.toLowerCase().replace(/\s+/g,"-")}`,children:e}),(0,u.jsx)("div",{className:"flex flex-col",role:"presentation","aria-labelledby":`group-${e?.toLowerCase().replace(/\s+/g,"-")}`,children:t})]}),o<i&&!!(t&&d.Children.count(t)>0)&&(0,u.jsx)("hr",{className:he("h-px my-2 w-full border-border-subtle border-b border-t-0 border-solid",tp[a])})]})}function dp({children:e,className:t}){const{isOpen:n,context:r,refs:o,combobox:i,floatingStyles:a,getFloatingProps:s,sizeValue:l,setSearchKeyword:c,setActiveIndex:f,setSelectedIndex:m,value:h,selected:p,getValues:g,searchKeyword:y,listContentRef:v,by:b,searchPlaceholder:w,activeIndex:x,searchFn:M,debounceDelay:E}=lp(),N=(0,d.useMemo)((()=>{const t=g();let n=-1;if(t){let r=d.Children.toArray(e);r.length>0&&(0,d.isValidElement)(r[0])&&r[0].type===up&&(r=d.Children.toArray(e).map((e=>(0,d.isValidElement)(e)?d.Children.toArray(e.props.children):[])).flat()),n=r.findIndex((e=>{if(!(0,d.isValidElement)(e))return!1;const n=e.props.value;return"object"==typeof n&&"object"==typeof t?n[b]===t[b]:n===t}))}return n}),[h,p,e,b]);(0,d.useLayoutEffect)((()=>{n||(f(N),m(N))}),[N,n]),(0,d.useLayoutEffect)((()=>{n&&(i&&[-1,null].includes(x)||f(-1))}),[y,n]);const k=(0,d.useMemo)((()=>{let t=0,n=0;d.Children.forEach(e,(e=>{if((0,d.isValidElement)(e)&&e.type===up){let n=!1;if(y&&!M){const t=y.toLowerCase(),r=(e.props.label?.toLowerCase()||"").includes(t),o=d.Children.toArray(e.props.children).some((e=>!!(0,d.isValidElement)(e)&&(rp(e.props.children)?.toLowerCase()).includes(t)));n=r||o}else n=!0;n&&t++}})),n=Math.max(0,t-1);let r=0,o=0;return d.Children.map(e,(e=>{if(!(0,d.isValidElement)(e))return null;if(e.type===up){let t=!1;if(y&&!M){const n=y.toLowerCase();t=(e.props.label?.toLowerCase()||"").includes(n)}const i=d.Children.map(e.props.children,(e=>{if(!(0,d.isValidElement)(e))return null;if(t){const t={...e.props,index:r++};return(0,d.cloneElement)(e,t)}if(y&&!M){const t=rp(e.props.children)?.toLowerCase(),n=y.toLowerCase();if(!t?.includes(n))return null}const n={...e.props,index:r++};return(0,d.cloneElement)(e,n)}));if(!i?.some((e=>null!==e)))return null;const a={...e.props,children:i,index:o,totalGroups:n};return o++,(0,d.cloneElement)(e,a)}if(y&&!M){const t=rp(e.props?.children)?.toLowerCase(),n=y.toLowerCase();if(!t?.includes(n))return null}return(0,d.cloneElement)(e,{...e.props,index:r++})}))}),[y,h,p,e,M]),j=d.Children.count(k);(0,d.useEffect)((()=>{v.current=[];let t=d.Children.toArray(e);t&&(0,d.isValidElement)(t[0])&&t[0].type===up&&(t=d.Children.toArray(t).map((e=>(0,d.isValidElement)(e)?e.props.children:null)).filter(Boolean)),d.Children.forEach(t,(e=>{if(!(0,d.isValidElement)(e))return;const t=rp(e.props?.children)?.toLowerCase();if(y&&!M){const e=y.toLowerCase();if(!t?.includes(e))return}v.current.push(t)}))}),[y,M]);const[D,T]=(0,d.useState)(!1),S=(0,d.useCallback)((async()=>{if(M&&"function"==typeof M&&!D){T(!0);try{await M(y)}catch(e){console.error(e)}finally{T(!1)}}}),[y]),C=((e,t=500)=>{const n=(0,d.useRef)(null);return(0,d.useCallback)(((...r)=>{n.current&&clearTimeout(n.current),n.current=setTimeout((()=>e(...r)),t)}),[e,t])})(S,E);return(0,d.useEffect)((()=>{"function"==typeof M&&C()}),[C]),(0,u.jsx)(u.Fragment,{children:n&&(0,u.jsx)(u.Fragment,{children:(0,u.jsx)(Nh,{context:r,modal:!1,visuallyHiddenDismiss:!0,children:(0,u.jsxs)("div",{ref:o.setFloating,className:he("box-border [&_*]:box-border w-full bg-white outline-none shadow-lg outline outline-1 outline-border-subtle",i&&"grid grid-cols-1 grid-rows-[auto_1fr] divide-y divide-x-0 divide-solid divide-border-subtle",Jh[l].dropdown,!i&&"h-auto",i?"overflow-hidden":"overflow-y-auto overflow-x-hidden",t),style:{...a,zIndex:1},...s(),children:[i&&(0,u.jsxs)("div",{className:he(Jh[l].searchbarWrapper),children:[D?(0,u.jsx)(ap,{className:Jh[l].searchbarIcon}):(0,u.jsx)(wd,{className:he("text-icon-secondary shrink-0",Jh[l].searchbarIcon)}),(0,u.jsx)("input",{className:he("px-1 w-full placeholder:text-field-placeholder border-0 focus:outline-none focus:shadow-none",Jh[l].searchbar),type:"search",name:"keyword",placeholder:w,onChange:e=>c(e.target.value),value:y,autoComplete:"off"})]}),(0,u.jsxs)("div",{className:he("overflow-y-auto overflow-x-hidden",!i&&"w-full h-full",Jh[l].dropdownItemsWrapper),children:[!!j&&k,!j&&(0,u.jsx)("div",{className:he("p-2 text-center font-medium text-field-placeholder",np[l]),children:"No items found"})]})]})})})})}function fp({children:e,root:t,id:n}){return(0,u.jsx)(gh,{id:n,root:t,children:e})}function mp({value:e,selected:t,children:n,className:r,...o}){const{sizeValue:i,getItemProps:a,onKeyDownItem:s,onClickItem:l,activeIndex:c,selectedIndex:f,updateListRef:m,getValues:h,by:p,multiple:g}=lp(),{index:y}=o,v=(0,d.useRef)(y),b=(0,d.useMemo)((()=>{if(!g)return!1;const t=h();return!!t&&t.some((t=>null!==t&&null!==e&&"object"==typeof t?t[p]===e[p]:t===e))}),[e,h]),w=(0,d.useMemo)((()=>"boolean"==typeof t?t:g?b:y===f),[b,f,t]);return(0,u.jsxs)("div",{className:he("w-full flex items-center justify-between text-text-primary hover:bg-button-tertiary-hover rounded-md transition-all duration-150 cursor-pointer focus:outline-none focus-within:outline-none outline-none",np[i],y===c&&"bg-button-tertiary-hover",r),ref:e=>{m(y,e)},role:"option",tabIndex:y===c?0:-1,"aria-selected":w&&y===c,...a({onClick(){l(v.current,e)},onKeyDown(t){s(t,v.current,e)}}),children:[(0,u.jsx)("span",{className:"w-full truncate",children:n}),w&&(0,u.jsx)(ve,{className:he("text-icon-on-color-disabled",{sm:"size-4",md:"size-4",lg:"size-5"}[i])})]})}const hp=({id:e,size:t="md",value:n,defaultValue:r,onChange:o,by:i="id",children:a,multiple:s=!1,combobox:l=!1,disabled:c=!1,searchPlaceholder:f="Search...",searchFn:m,debounceDelay:h=500})=>{const p=(0,d.useMemo)((()=>e||`select-${Xh()}`),[e]),g=(0,d.useMemo)((()=>typeof n<"u"),[n]),[y,v]=(0,d.useState)(r),[b,w]=(0,d.useState)(""),x=(0,d.useCallback)((()=>g?n:y),[g,n,y]),[M,E]=(0,d.useState)(!1),[N,k]=(0,d.useState)(null),[j,D]=(0,d.useState)(null),T={sm:l?256:172,md:l?256:216,lg:l?256:216},{refs:S,floatingStyles:C,context:R}=_h({strategy:"fixed",placement:"bottom-start",open:M,onOpenChange:E,whileElementsMounted:rm,middleware:[gm(5),ym({padding:10}),(W={apply({rects:e,elements:n,availableHeight:r}){Object.assign(n.floating.style,{maxHeight:`min(${r}px, ${T[t]}px)`,maxWidth:`${e.reference.width}px`})},padding:10},{...sm(W),options:[W,undefined]})]}),O=(0,d.useRef)([]),A=(0,d.useRef)([]),I=(0,d.useRef)(!1),_=Ch(R,{event:"mousedown"}),P=Ih(R),L=qh(R,{role:"listbox"}),z=Wh(R,{listRef:O,activeIndex:N,selectedIndex:j,onNavigate:k,loop:!0}),F=function(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:f=750,ignoreKeys:m=[],selectedIndex:h=null}=t,p=d.useRef(),g=d.useRef(""),y=d.useRef(null!=(n=null!=h?h:a)?n:-1),v=d.useRef(null),b=xm(s),w=xm(l),x=Hm(u),M=Hm(m);Im((()=>{r&&(clearTimeout(p.current),v.current=null,g.current="")}),[r]),Im((()=>{var e;r&&""===g.current&&(y.current=null!=(e=null!=h?h:a)?e:-1)}),[r,h,a]);const E=xm((e=>{e?o.current.typing||(o.current.typing=e,w(e)):o.current.typing&&(o.current.typing=e,w(e))})),N=xm((e=>{function t(e,t,n){const r=x.current?x.current(t,n):t.find((e=>0===(null==e?void 0:e.toLocaleLowerCase().indexOf(n.toLocaleLowerCase()))));return r?e.indexOf(r):-1}const n=i.current;if(g.current.length>0&&" "!==g.current[0]&&(-1===t(n,n,g.current)?E(!1):" "===e.key&&tf(e)),null==n||M.current.includes(e.key)||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;r&&" "!==e.key&&(tf(e),E(!0)),n.every((e=>{var t,n;return!e||(null==(t=e[0])?void 0:t.toLocaleLowerCase())!==(null==(n=e[1])?void 0:n.toLocaleLowerCase())}))&&g.current===e.key&&(g.current="",y.current=v.current),g.current+=e.key,clearTimeout(p.current),p.current=setTimeout((()=>{g.current="",y.current=v.current,E(!1)}),f);const o=y.current,a=t(n,[...n.slice((o||0)+1),...n.slice(0,(o||0)+1)],g.current);-1!==a?(b(a),v.current=a):" "!==e.key&&(g.current="",E(!1))})),k=d.useMemo((()=>({onKeyDown:N})),[N]),j=d.useMemo((()=>({onKeyDown:N,onKeyUp(e){" "===e.key&&E(!1)}})),[N,E]);return d.useMemo((()=>c?{reference:k,floating:j}:{}),[c,k,j])}(R,{listRef:A,activeIndex:N,selectedIndex:j,onMatch:M?k:D,onTypingChange(e){I.current=e}}),{getReferenceProps:U,getFloatingProps:B,getItemProps:Y}=Fh([P,L,z,_,...l?[]:[F]]),Q=(e,t)=>{if(s)return((e,t)=>{const n=[...x()??[]];-1===n.findIndex((e=>null!==e&&null!==t&&"object"==typeof e?e[i]===t[i]:e===t))&&(n.push(t),g||v(n),D(e),S.reference.current.focus(),E(!1),w(""),"function"==typeof o&&o(n))})(e,t);D(e),g||v(t),S.reference.current.focus(),E(!1),w(""),"function"==typeof o&&o(t)},V=(0,d.useCallback)(((e,t)=>{O.current[e]=t}),[]);var W;return(0,u.jsx)(sp.Provider,{value:{selectedIndex:j,setSelectedIndex:D,activeIndex:N,setActiveIndex:k,selected:y,setSelected:v,handleSelect:Q,combobox:l,sizeValue:t,multiple:s,onChange:o,isTypingRef:I,getItemProps:Y,onClickItem:(e,t)=>{Q(e,t)},onKeyDownItem:(e,t,n)=>{"Enter"===e.key&&(e.preventDefault(),Q(t,n))," "===e.key&&!I.current&&(e.preventDefault(),Q(t,n))},getValues:x,selectId:p,getReferenceProps:U,isOpen:M,value:n,updateListRef:V,refs:S,listContentRef:A,by:i,getFloatingProps:B,floatingStyles:C,context:R,searchKeyword:b,setSearchKeyword:w,disabled:c,isControlled:g,searchPlaceholder:f,searchFn:m,debounceDelay:h},children:a})};hp.displayName="Select";const pp=Object.assign(hp,{Portal:fp,Button:cp,Options:dp,Option:mp,OptionGroup:up});fp.displayName="Select.Portal",cp.displayName="Select.Button",dp.displayName="Select.Options",mp.displayName="Select.Option",up.displayName="Select.OptionGroup";const gp=g("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]),yp=(0,d.forwardRef)((({children:e=null,tag:t="label",size:n="sm",className:r="",variant:o="neutral",required:i=!1,...a},s)=>{if(!e)return null;let l="";return i&&(l="after:content-['*'] after:text-field-required after:ml-0.5"),(0,u.jsx)(t,{ref:s,className:he("font-medium text-field-label flex items-center gap-0.5",{xs:"text-xs [&>*]:text-xs [&>svg]:h-3 [&>svg]:w-3",sm:"text-sm [&>*]:text-sm [&>svg]:h-4 [&>svg]:w-4",md:"text-base [&>*]:text-base [&>svg]:h-5 [&>svg]:w-5"}[n],{neutral:"text-field-label [&>*]:text-field-label",help:"text-field-helper [&>*]:text-field-helper",error:"text-support-error [&>*]:text-support-error",disabled:"text-field-color-disabled disabled cursor-not-allowed [&>*]:text-field-color-disabled"}[o],l,{neutral:"",help:"font-normal",error:"font-normal",disabled:""}?.[o],r),...a,children:e})}));yp.displayName="Label";const vp=(0,d.forwardRef)((({id:e,type:t="text",defaultValue:n="",value:r,size:o="sm",className:i="",disabled:a=!1,onChange:s=()=>{},error:l=!1,onError:c=()=>{},prefix:f=null,suffix:m=null,label:h="",...p},g)=>{const v=(0,d.useRef)(null),b=(0,d.useMemo)((()=>e||`input-${t}-${Xh()}`),[e]),w=(0,d.useMemo)((()=>typeof r<"u"),[r]),[x,M]=(0,d.useState)(n),[E,N]=(0,d.useState)(null),k=(0,d.useCallback)((()=>w?r:x),[w,r,x]),j=e=>{if(a)return;let n;"file"===t?(n=e.target.files,n&&n.length>0?N(n[0].name):N(null)):n=e.target.value,!w&&"file"!==t&&M(n),"function"==typeof s&&s(n)},D=()=>{N(null),v.current&&(v.current.value=""),s(null)},T="bg-field-secondary-background font-normal placeholder-text-tertiary text-text-primary w-full outline outline-1 outline-border-subtle border-none transition-[color,box-shadow,outline] duration-200",S={xs:"px-2 py-1 rounded",sm:"p-3 py-2 rounded",md:"p-3.5 py-2.5 rounded-md",lg:"p-4 py-3 rounded-lg"},C={xs:"text-xs font-medium",sm:"text-sm font-medium",md:"text-sm font-medium",lg:"text-base font-medium"},R={xs:"text-xs",sm:"text-xs",md:"text-sm",lg:"text-base"},O={sm:f?"pl-8":"",md:f?"pl-9":"",lg:f?"pl-10":""},A={sm:m?"pr-8":"",md:m?"pr-9":"",lg:m?"pr-10":""},I=a?"hover:outline-border-disabled":"hover:outline-border-strong",_="focus:outline-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2",P=l?"focus:outline-focus-error-border focus:ring-field-color-error outline-focus-error-border":"",L=l?"focus:outline-focus-error-border focus:ring-field-color-error outline-focus-error-border":"",z=a?"outline-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled":"",F=a?"outline-border-disabled cursor-not-allowed text-text-disabled file:text-text-tertiary":"",U="font-normal placeholder-text-tertiary text-text-primary pointer-events-none absolute inset-y-0 flex flex-1 items-center [&>svg]:h-4 [&>svg]:w-4",B=a?"font-normal placeholder-text-tertiary text-icon-disabled pointer-events-none absolute inset-y-0 flex flex-1 items-center":"font-normal placeholder-text-tertiary text-field-placeholder pointer-events-none absolute inset-y-0 flex flex-1 items-center",Y={xs:"[&>svg]:size-4",sm:"[&>svg]:size-4",md:"[&>svg]:size-5",lg:"[&>svg]:size-6"},Q=(0,d.useMemo)((()=>h?(0,u.jsx)(yp,{className:he(C[o]),htmlFor:b,...p?.required&&{required:!0},children:h}):null),[h,o,b]),V=E?"file:border-0 file:bg-transparent pr-10":"text-text-tertiary file:border-0 file:bg-transparent pr-10";return"file"===t?(0,u.jsxs)("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[Q,(0,u.jsxs)("div",{className:he("w-full relative flex focus-within:z-10",i),children:[(0,u.jsx)("input",{ref:Te(v,g),id:b,type:"file",className:he(T,F,S[o],R[o],_,I,L,V),disabled:a,onChange:j,onInvalid:c,...p}),(0,u.jsx)("div",{className:he(B,"right-0 pr-3",Y[o]),children:(0,u.jsx)(gp,{})})]})]}):(0,u.jsxs)("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[Q,(0,u.jsxs)("div",{className:he("w-full relative flex focus-within:z-10",i),children:[f?(0,u.jsx)("div",{className:he(U,"left-0 pl-3",R[o]),children:f}):null,(0,u.jsx)("input",{ref:Te(v,g),id:b,type:t,className:he(T,z,S[o],R[o],O[o],A[o],_,I,P),disabled:a,onChange:j,onInvalid:c,value:k(),...p}),"file"===t?E?(0,u.jsx)("div",{className:he(B,"right-0 pr-3 cursor-pointer z-20 pointer-events-auto",Y[o]),onClick:D,role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&D()},children:(0,u.jsx)(y,{})}):(0,u.jsx)("div",{className:he(B,"right-0 pr-3",Y[o]),children:(0,u.jsx)(gp,{})}):m?(0,u.jsx)("div",{className:he(U,"right-0 pr-3",R[o]),children:m}):null]})]})}));vp.displayName="Input";const bp=g("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),wp=g("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),xp=(0,d.createContext)(void 0);function Mp(){const e=(0,d.useContext)(xp);if(void 0===e)throw new Error("useDayPicker() must be used within a custom component.");return e}var Ep,Np,kp,jp;!function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"}(Ep||(Ep={})),function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"}(Np||(Np={})),function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"}(kp||(kp={})),function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"}(jp||(jp={}));const Dp={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Tp(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Sp={date:Tp({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Tp({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Tp({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Cp={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Rp(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=n?.width?String(n.width):t;r=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=n?.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}const Op={ordinalNumber:(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"},era:Rp({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Rp({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Rp({values:{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"]},defaultWidth:"wide"}),day:Rp({values:{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"]},defaultWidth:"wide"}),dayPeriod:Rp({values:{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"}},defaultWidth:"wide",formattingValues:{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"}},defaultFormattingWidth:"wide"})};function Ap(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e){for(let t=0;t<e.length;t++)if(e[t].test(a))return t}(s):function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t].test(a))return t}(s);let c;return c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c,{value:c,rest:t.slice(a.length)}}}const Ip={ordinalNumber:(_p={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(_p.matchPattern);if(!n)return null;const r=n[0],o=e.match(_p.parsePattern);if(!o)return null;let i=_p.valueCallback?_p.valueCallback(o[0]):o[0];return i=t.valueCallback?t.valueCallback(i):i,{value:i,rest:e.slice(r.length)}}),era:Ap({matchPatterns:{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},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Ap({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ap({matchPatterns:{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},defaultMatchWidth:"wide",parsePatterns:{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]},defaultParseWidth:"any"}),day:Ap({matchPatterns:{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},defaultMatchWidth:"wide",parsePatterns:{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]},defaultParseWidth:"any"}),dayPeriod:Ap({matchPatterns:{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},defaultMatchWidth:"any",parsePatterns:{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}},defaultParseWidth:"any"})};var _p;const Pp={code:"en-US",formatDistance:(e,t,n)=>{let r;const o=Dp[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:Sp,formatRelative:(e,t,n,r)=>Cp[e],localize:Op,match:Ip,options:{weekStartsOn:0,firstWeekContainsDate:1}},Lp=(Symbol.for("constructDateFrom"),{}),zp={};function Fp(e,t){try{const n=(Lp[e]||=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format)(t).split("GMT")[1]||"";return n in zp?zp[n]:Bp(n,n.split(":"))}catch{if(e in zp)return zp[e];const t=e?.match(Up);return t?Bp(e,t.slice(1)):NaN}}const Up=/([+-]\d\d):?(\d\d)?/;function Bp(e,t){const n=+t[0],r=+(t[1]||0);return zp[e]=n>0?60*n+r:60*n-r}class Yp extends Date{constructor(...e){super(),e.length>1&&"string"==typeof e[e.length-1]&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(Fp(this.timeZone,this))?this.setTime(NaN):e.length?"number"==typeof e[0]&&(1===e.length||2===e.length&&"number"!=typeof e[1])?this.setTime(e[0]):"string"==typeof e[0]?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),Wp(this),Vp(this)):this.setTime(Date.now())}static tz(e,...t){return t.length?new Yp(...t,e):new Yp(Date.now(),e)}withTimeZone(e){return new Yp(+this,e)}getTimezoneOffset(){return-Fp(this.timeZone,this)}setTime(e){return Date.prototype.setTime.apply(this,arguments),Vp(this),+this}[Symbol.for("constructDateFrom")](e){return new Yp(+new Date(e),this.timeZone)}}const Qp=/^(get|set)(?!UTC)/;function Vp(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function Wp(e){const t=Fp(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),o=r- -new Date(+n).getTimezoneOffset(),i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();o&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+o);const a=r-t;a&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+a);const s=Fp(e.timeZone,e),l=-new Date(+e).getTimezoneOffset()-s-a;if(s!==t&&l){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);const t=s-Fp(e.timeZone,e);t&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+t),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+t))}}Object.getOwnPropertyNames(Date.prototype).forEach((e=>{if(!Qp.test(e))return;const t=e.replace(Qp,"$1UTC");Yp.prototype[t]&&(e.startsWith("get")?Yp.prototype[e]=function(){return this.internal[t]()}:(Yp.prototype[e]=function(){var e;return Date.prototype[t].apply(this.internal,arguments),e=this,Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),Wp(e),+this},Yp.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Vp(this),+this}))}));class Hp extends Yp{static tz(e,...t){return t.length?new Hp(...t,e):new Hp(Date.now(),e)}toISOString(){const[e,t,n]=this.tzComponents(),r=`${e}${t}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[e,t,n,r]=this.internal.toUTCString().split(" ");return`${e?.slice(0,-1)} ${n} ${t} ${r}`}toTimeString(){const e=this.internal.toUTCString().split(" ")[4],[t,n,r]=this.tzComponents();return`${e} GMT${t}${n}${r} (${o=this.timeZone,i=this,new Intl.DateTimeFormat("en-GB",{timeZone:o,timeZoneName:"long"}).format(i).slice(12)})`;var o,i}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){const e=this.getTimezoneOffset();return[e>0?"-":"+",String(Math.floor(Math.abs(e)/60)).padStart(2,"0"),String(Math.abs(e)%60).padStart(2,"0")]}withTimeZone(e){return new Hp(+this,e)}[Symbol.for("constructDateFrom")](e){return new Hp(+new Date(e),this.timeZone)}}Math.pow(10,8);const qp=6048e5,$p=Symbol.for("constructDateFrom");function Gp(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&$p in e?e[$p](t):e instanceof Date?new e.constructor(t):new Date(t)}function Kp(e,t){return Gp(t||e,e)}function Zp(e,t,n){const r=Kp(e,n?.in);return isNaN(t)?Gp(n?.in||e,NaN):t?(r.setDate(r.getDate()+t),r):r}function Xp(e,t,n){const r=Kp(e,n?.in);if(isNaN(t))return Gp(n?.in||e,NaN);if(!t)return r;const o=r.getDate(),i=Gp(n?.in||e,r.getTime());return i.setMonth(r.getMonth()+t+1,0),o>=i.getDate()?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function Jp(e){const t=Kp(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 eg(e,...t){const n=Gp.bind(null,e||t.find((e=>"object"==typeof e)));return t.map(n)}function tg(e,t){const n=Kp(e,t?.in);return n.setHours(0,0,0,0),n}function ng(e,t,n){const[r,o]=eg(n?.in,e,t),i=tg(r),a=tg(o),s=+i-Jp(i),l=+a-Jp(a);return Math.round((s-l)/864e5)}let rg={};function og(){return rg}function ig(e,t){const n=og(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Kp(e,t?.in),i=o.getDay(),a=6+(i<r?-7:0)-(i-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}function ag(e,t){const n=Kp(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function sg(e,t){const n=Kp(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function lg(e,t){const n=og(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Kp(e,t?.in),i=o.getDay(),a=(i<r?7:0)+i-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function cg(e,t){return lg(e,{...t,weekStartsOn:1})}function ug(e,t){const n=Kp(e,t?.in),r=n.getFullYear(),o=Gp(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=cg(o),a=Gp(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=cg(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function dg(e,t){const n=Kp(e,t?.in),r=+cg(n)-+function(e,t){const n=ug(e,t),r=Gp(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),cg(r)}(n);return Math.round(r/qp)+1}function fg(e,t){const n=Kp(e,t?.in),r=n.getFullYear(),o=og(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=Gp(t?.in||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=lg(a,t),l=Gp(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=lg(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function mg(e,t){const n=Kp(e,t?.in),r=+lg(n,t)-+function(e,t){const n=og(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=fg(e,t),i=Gp(t?.in||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),lg(i,t)}(n,t);return Math.round(r/qp)+1}function hg(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const pg={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return hg("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):hg(n+1,2)},d:(e,t)=>hg(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];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>hg(e.getHours()%12||12,t.length),H:(e,t)=>hg(e.getHours(),t.length),m:(e,t)=>hg(e.getMinutes(),t.length),s:(e,t)=>hg(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return hg(Math.trunc(r*Math.pow(10,n-3)),t.length)}},gg={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"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return pg.y(e,t)},Y:function(e,t,n,r){const o=fg(e,r),i=o>0?o:1-o;return"YY"===t?hg(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):hg(i,t.length)},R:function(e,t){return hg(ug(e),t.length)},u:function(e,t){return hg(e.getFullYear(),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 hg(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"});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 hg(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"});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 pg.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"});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 hg(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"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=mg(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):hg(o,t.length)},I:function(e,t,n){const r=dg(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):hg(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):pg.d(e,t)},D:function(e,t,n){const r=function(e,t){const n=Kp(e,t?.in);return ng(n,sg(n))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):hg(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"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return hg(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return hg(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return hg(o,t.length);case"io":return n.ordinalNumber(o,{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"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(o=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(o=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return pg.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):pg.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):hg(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):hg(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):pg.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):pg.s(e,t)},S:function(e,t){return pg.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return vg(r);case"XXXX":case"XX":return bg(r);default:return bg(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return vg(r);case"xxxx":case"xx":return bg(r);default:return bg(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+yg(r,":");default:return"GMT"+bg(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+yg(r,":");default:return"GMT"+bg(r,":")}},t:function(e,t,n){return hg(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return hg(+e,t.length)}};function yg(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return 0===i?n+String(o):n+String(o)+t+hg(i,2)}function vg(e,t){return e%60==0?(e>0?"-":"+")+hg(Math.abs(e)/60,2):bg(e,t)}function bg(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+hg(Math.trunc(r/60),2)+t+hg(r%60,2)}const wg=(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"});default:return t.date({width:"full"})}},xg=(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"});default:return t.time({width:"full"})}},Mg={p:xg,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return wg(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",wg(r,t)).replace("{{time}}",xg(o,t))}},Eg=/^D+$/,Ng=/^Y+$/,kg=["D","DD","YY","YYYY"];function jg(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}const Dg=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Tg=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Sg=/^'([^]*?)'?$/,Cg=/''/g,Rg=/[a-zA-Z]/;function Og(e,t,n){const r=og(),o=n?.locale??r.locale??Pp,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Kp(e,n?.in);if(!function(e){return!(!jg(e)&&"number"!=typeof e||isNaN(+Kp(e)))}(s))throw new RangeError("Invalid time value");let l=t.match(Tg).map((e=>{const t=e[0];return"p"===t||"P"===t?(0,Mg[t])(e,o.formatLong):e})).join("").match(Dg).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Ag(e)};if(gg[t])return{isToken:!0,value:e};if(t.match(Rg))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map((r=>{if(!r.isToken)return r.value;const i=r.value;return(!n?.useAdditionalWeekYearTokens&&function(e){return Ng.test(e)}(i)||!n?.useAdditionalDayOfYearTokens&&function(e){return Eg.test(e)}(i))&&function(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"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`}(e,t,n);if(console.warn(r),kg.includes(e))throw new RangeError(r)}(i,t,String(e)),(0,gg[i[0]])(s,i,o.localize,c)})).join("")}function Ag(e){const t=e.match(Sg);return t?t[1].replace(Cg,"'"):e}function Ig(e,t){return+Kp(e)>+Kp(t)}function _g(e,t){return+Kp(e)<+Kp(t)}function Pg(e,t,n){const r=Kp(e,n?.in),o=r.getFullYear(),i=r.getDate(),a=Gp(n?.in||e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const s=function(e,t){const n=Kp(e,t?.in),r=n.getFullYear(),o=n.getMonth(),i=Gp(n,0);return i.setFullYear(r,o+1,0),i.setHours(0,0,0,0),i.getDate()}(a);return r.setMonth(t,Math.min(i,s)),r}function Lg(e,t){const n=Kp(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function zg(e,t){const n=t.startOfMonth(e),r=n.getDay();return 1===r?n:0===r?t.addDays(n,-6):t.addDays(n,-1*(r-1))}class Fg{constructor(e,t){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?Hp.tz(this.options.timeZone):new this.Date,this.newDate=(e,t,n)=>this.overrides?.newDate?this.overrides.newDate(e,t,n):this.options.timeZone?new Hp(e,t,n,this.options.timeZone):new Date(e,t,n),this.addDays=(e,t)=>this.overrides?.addDays?this.overrides.addDays(e,t):Zp(e,t),this.addMonths=(e,t)=>this.overrides?.addMonths?this.overrides.addMonths(e,t):Xp(e,t),this.addWeeks=(e,t)=>this.overrides?.addWeeks?this.overrides.addWeeks(e,t):function(e,t,n){return Zp(e,7*t,n)}(e,t),this.addYears=(e,t)=>this.overrides?.addYears?this.overrides.addYears(e,t):function(e,t,n){return Xp(e,12*t,n)}(e,t),this.differenceInCalendarDays=(e,t)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(e,t):ng(e,t),this.differenceInCalendarMonths=(e,t)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(e,t):function(e,t,n){const[r,o]=eg(n?.in,e,t);return 12*(r.getFullYear()-o.getFullYear())+(r.getMonth()-o.getMonth())}(e,t),this.eachMonthOfInterval=e=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(e):function(e,t){const{start:n,end:r}=function(e,t){const[n,r]=eg(e,t.start,t.end);return{start:n,end:r}}(t?.in,e);let o=+n>+r;const i=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0),a.setDate(1);let s=t?.step??1;if(!s)return[];s<0&&(s=-s,o=!o);const l=[];for(;+a<=i;)l.push(Gp(n,a)),a.setMonth(a.getMonth()+s);return o?l.reverse():l}(e),this.endOfBroadcastWeek=e=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(e,this):function(e,t){const n=zg(e,t),r=function(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,1-r),i=t.addDays(o,34);return t.getMonth(e)===t.getMonth(i)?5:4}(e,t);return t.addDays(n,7*r-1)}(e,this),this.endOfISOWeek=e=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(e):function(e,t){return ig(e,{...t,weekStartsOn:1})}(e),this.endOfMonth=e=>this.overrides?.endOfMonth?this.overrides.endOfMonth(e):ag(e),this.endOfWeek=e=>this.overrides?.endOfWeek?this.overrides.endOfWeek(e,this.options):ig(e,this.options),this.endOfYear=e=>this.overrides?.endOfYear?this.overrides.endOfYear(e):function(e,t){const n=Kp(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}(e),this.format=(e,t)=>{const n=this.overrides?.format?this.overrides.format(e,t,this.options):Og(e,t,this.options);return this.options.numerals&&"latn"!==this.options.numerals?this.replaceDigits(n):n},this.getISOWeek=e=>this.overrides?.getISOWeek?this.overrides.getISOWeek(e):dg(e),this.getMonth=e=>this.overrides?.getMonth?this.overrides.getMonth(e,this.options):function(e,t){return Kp(e,t?.in).getMonth()}(e,this.options),this.getYear=e=>this.overrides?.getYear?this.overrides.getYear(e,this.options):function(e,t){return Kp(e,t?.in).getFullYear()}(e,this.options),this.getWeek=e=>this.overrides?.getWeek?this.overrides.getWeek(e,this.options):mg(e,this.options),this.isAfter=(e,t)=>this.overrides?.isAfter?this.overrides.isAfter(e,t):Ig(e,t),this.isBefore=(e,t)=>this.overrides?.isBefore?this.overrides.isBefore(e,t):_g(e,t),this.isDate=e=>this.overrides?.isDate?this.overrides.isDate(e):jg(e),this.isSameDay=(e,t)=>this.overrides?.isSameDay?this.overrides.isSameDay(e,t):function(e,t,n){const[r,o]=eg(n?.in,e,t);return+tg(r)==+tg(o)}(e,t),this.isSameMonth=(e,t)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(e,t):function(e,t,n){const[r,o]=eg(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}(e,t),this.isSameYear=(e,t)=>this.overrides?.isSameYear?this.overrides.isSameYear(e,t):function(e,t,n){const[r,o]=eg(n?.in,e,t);return r.getFullYear()===o.getFullYear()}(e,t),this.max=e=>this.overrides?.max?this.overrides.max(e):function(e,t){let n,r=t?.in;return e.forEach((e=>{r||"object"!=typeof e||(r=Gp.bind(null,e));const t=Kp(e,r);(!n||n<t||isNaN(+t))&&(n=t)})),Gp(r,n||NaN)}(e),this.min=e=>this.overrides?.min?this.overrides.min(e):function(e,t){let n,r=t?.in;return e.forEach((e=>{r||"object"!=typeof e||(r=Gp.bind(null,e));const t=Kp(e,r);(!n||n>t||isNaN(+t))&&(n=t)})),Gp(r,n||NaN)}(e),this.setMonth=(e,t)=>this.overrides?.setMonth?this.overrides.setMonth(e,t):Pg(e,t),this.setYear=(e,t)=>this.overrides?.setYear?this.overrides.setYear(e,t):function(e,t,n){const r=Kp(e,n?.in);return isNaN(+r)?Gp(n?.in||e,NaN):(r.setFullYear(t),r)}(e,t),this.startOfBroadcastWeek=e=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(e,this):zg(e,this),this.startOfDay=e=>this.overrides?.startOfDay?this.overrides.startOfDay(e):tg(e),this.startOfISOWeek=e=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(e):cg(e),this.startOfMonth=e=>this.overrides?.startOfMonth?this.overrides.startOfMonth(e):Lg(e),this.startOfWeek=e=>this.overrides?.startOfWeek?this.overrides.startOfWeek(e,this.options):lg(e,this.options),this.startOfYear=e=>this.overrides?.startOfYear?this.overrides.startOfYear(e):sg(e),this.options={locale:Pp,...e},this.overrides=t}getDigitMap(){const{numerals:e="latn"}=this.options,t=new Intl.NumberFormat("en-US",{numberingSystem:e}),n={};for(let e=0;e<10;e++)n[e.toString()]=t.format(e);return n}replaceDigits(e){const t=this.getDigitMap();return e.replace(/\d/g,(e=>t[e]||e))}formatNumber(e){return this.replaceDigits(e.toString())}}const Ug=new Fg;function Bg(e){return d.createElement("button",{...e})}function Yg(e){return d.createElement("span",{...e})}function Qg(e){const{size:t=24,orientation:n="left",className:r}=e;return d.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},"up"===n&&d.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),"down"===n&&d.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),"left"===n&&d.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),"right"===n&&d.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function Vg(e){const{day:t,modifiers:n,...r}=e;return d.createElement("td",{...r})}function Wg(e){const{day:t,modifiers:n,...r}=e,o=d.useRef(null);return d.useEffect((()=>{n.focused&&o.current?.focus()}),[n.focused]),d.createElement("button",{ref:o,...r})}function Hg(e){const{options:t,className:n,components:r,classNames:o,...i}=e,a=[o[Ep.Dropdown],n].join(" "),s=t?.find((({value:e})=>e===i.value));return d.createElement("span",{"data-disabled":i.disabled,className:o[Ep.DropdownRoot]},d.createElement(r.Select,{className:a,...i},t?.map((({value:e,label:t,disabled:n})=>d.createElement(r.Option,{key:e,value:e,disabled:n},t)))),d.createElement("span",{className:o[Ep.CaptionLabel],"aria-hidden":!0},s?.label,d.createElement(r.Chevron,{orientation:"down",size:18,className:o[Ep.Chevron]})))}function qg(e){return d.createElement("div",{...e})}function $g(e){return d.createElement("div",{...e})}function Gg(e){const{calendarMonth:t,displayIndex:n,...r}=e;return d.createElement("div",{...r},e.children)}function Kg(e){const{calendarMonth:t,displayIndex:n,...r}=e;return d.createElement("div",{...r})}function Zg(e){return d.createElement("table",{...e})}function Xg(e){return d.createElement("div",{...e})}function Jg(e){const{components:t}=Mp();return d.createElement(t.Dropdown,{...e})}function ey(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...i}=e,{components:a,classNames:s,labels:{labelPrevious:l,labelNext:c}}=Mp(),u=(0,d.useCallback)((e=>{o&&n?.(e)}),[o,n]),f=(0,d.useCallback)((e=>{r&&t?.(e)}),[r,t]);return d.createElement("nav",{...i},d.createElement(a.PreviousMonthButton,{type:"button",className:s[Ep.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":!r||void 0,"aria-label":l(r),onClick:f},d.createElement(a.Chevron,{disabled:!r||void 0,className:s[Ep.Chevron],orientation:"left"})),d.createElement(a.NextMonthButton,{type:"button",className:s[Ep.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":!o||void 0,"aria-label":c(o),onClick:u},d.createElement(a.Chevron,{disabled:!o||void 0,orientation:"right",className:s[Ep.Chevron]})))}function ty(e){const{components:t}=Mp();return d.createElement(t.Button,{...e})}function ny(e){return d.createElement("option",{...e})}function ry(e){const{components:t}=Mp();return d.createElement(t.Button,{...e})}function oy(e){const{rootRef:t,...n}=e;return d.createElement("div",{...n,ref:t})}function iy(e){return d.createElement("select",{...e})}function ay(e){const{week:t,...n}=e;return d.createElement("tr",{...n})}function sy(e){return d.createElement("th",{...e})}function ly(e){return d.createElement("thead",{"aria-hidden":!0},d.createElement("tr",{...e}))}function cy(e){const{week:t,...n}=e;return d.createElement("th",{...n})}function uy(e){return d.createElement("th",{...e})}function dy(e){return d.createElement("tbody",{...e})}function fy(e){const{components:t}=Mp();return d.createElement(t.Dropdown,{...e})}function my(){const e={};for(const t in Ep)e[Ep[t]]=`rdp-${Ep[t]}`;for(const t in Np)e[Np[t]]=`rdp-${Np[t]}`;for(const t in kp)e[kp[t]]=`rdp-${kp[t]}`;for(const t in jp)e[jp[t]]=`rdp-${jp[t]}`;return e}function hy(e,t,n){return(n??new Fg(t)).format(e,"LLLL y")}const py=hy;function gy(e,t,n){return(n??new Fg(t)).format(e,"d")}function yy(e,t=Ug){return t.format(e,"LLLL")}function vy(e){return e<10?`0${e.toLocaleString()}`:`${e.toLocaleString()}`}function by(){return""}function wy(e,t,n){return(n??new Fg(t)).format(e,"cccccc")}function xy(e,t=Ug){return t.format(e,"yyyy")}const My=xy;function Ey(e,t,n){return(n??new Fg(t)).format(e,"LLLL y")}const Ny=Ey;function ky(e,t,n,r){let o=(r??new Fg(n)).format(e,"PPPP");return t?.today&&(o=`Today, ${o}`),o}function jy(e,t,n,r){let o=(r??new Fg(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const Dy=jy;function Ty(){return""}function Sy(e){return"Choose the Month"}function Cy(e){return"Go to the Next Month"}function Ry(e){return"Go to the Previous Month"}function Oy(e,t,n){return(n??new Fg(t)).format(e,"cccc")}function Ay(e,t){return`Week ${e}`}function Iy(e){return"Week Number"}function _y(e){return"Choose the Year"}const Py=e=>e instanceof HTMLElement?e:null,Ly=e=>[...e.querySelectorAll("[data-animated-month]")??[]],zy=e=>Py(e.querySelector("[data-animated-caption]")),Fy=e=>Py(e.querySelector("[data-animated-weeks]"));function Uy(e,t){const{month:n,defaultMonth:r,today:o=t.today(),numberOfMonths:i=1,endMonth:a,startMonth:s,timeZone:l}=e;let c=n||r||o;const{differenceInCalendarMonths:u,addMonths:d,startOfMonth:f}=t;return a&&u(a,c)<0&&(c=d(a,-1*(i-1))),s&&u(c,s)<0&&(c=s),c=l?new Hp(c,l):c,f(c)}class By{constructor(e,t,n=Ug){this.date=e,this.displayMonth=t,this.outside=Boolean(t&&!n.isSameMonth(e,t)),this.dateLib=n}isEqualTo(e){return this.dateLib.isSameDay(e.date,this.date)&&this.dateLib.isSameMonth(e.displayMonth,this.displayMonth)}}class Yy{constructor(e,t){this.days=t,this.weekNumber=e}}class Qy{constructor(e,t){this.date=e,this.weeks=t}}function Vy(e,t){const[n,r]=(0,d.useState)(e);return[void 0===t?n:t,r]}var Wy;function Hy(e){return!e[Np.disabled]&&!e[Np.hidden]&&!e[Np.outside]}function qy(e,t,n=!1,r=Ug){let{from:o,to:i}=e;const{differenceInCalendarDays:a,isSameDay:s}=r;return o&&i?(a(i,o)<0&&([o,i]=[i,o]),a(t,o)>=(n?1:0)&&a(i,t)>=(n?1:0)):!n&&i?s(i,t):!(n||!o)&&s(o,t)}function $y(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}function Gy(e){return Boolean(e&&"object"==typeof e&&"from"in e)}function Ky(e){return Boolean(e&&"object"==typeof e&&"after"in e)}function Zy(e){return Boolean(e&&"object"==typeof e&&"before"in e)}function Xy(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}function Jy(e,t){return Array.isArray(e)&&e.every(t.isDate)}function ev(e,t,n=Ug){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:i,isAfter:a}=n;return r.some((t=>{if("boolean"==typeof t)return t;if(n.isDate(t))return o(e,t);if(Jy(t,n))return t.includes(e);if(Gy(t))return qy(t,e,!1,n);if(Xy(t))return Array.isArray(t.dayOfWeek)?t.dayOfWeek.includes(e.getDay()):t.dayOfWeek===e.getDay();if($y(t)){const n=i(t.before,e)>0,r=i(t.after,e)<0;return a(t.before,t.after)?r&&n:n||r}return Ky(t)?i(e,t.after)>0:Zy(t)?i(t.before,e)>0:"function"==typeof t&&t(e)}))}function tv(e,t,n,r,o,i,a,s=0){if(s>365)return;const l=function(e,t,n,r,o,i,a){const{ISOWeek:s,broadcastCalendar:l}=i,{addDays:c,addMonths:u,addWeeks:d,addYears:f,endOfBroadcastWeek:m,endOfISOWeek:h,endOfWeek:p,max:g,min:y,startOfBroadcastWeek:v,startOfISOWeek:b,startOfWeek:w}=a;let x={day:c,week:d,month:u,year:f,startOfWeek:e=>l?v(e,a):s?b(e):w(e),endOfWeek:e=>l?m(e,a):s?h(e):p(e)}[e](n,"after"===t?1:-1);return"before"===t&&r?x=g([r,x]):"after"===t&&o&&(x=y([o,x])),x}(e,t,n.date,r,o,i,a),c=Boolean(i.disabled&&ev(l,i.disabled,a)),u=Boolean(i.hidden&&ev(l,i.hidden,a)),d=new By(l,l,a);return c||u?tv(e,t,d,r,o,i,a,s+1):d}function nv(e,t,n,r,o){const{autoFocus:i}=e,[a,s]=(0,d.useState)(),l=function(e,t,n,r){let o,i=-1;for(const a of e){const e=t(a);Hy(e)&&(e[Np.focused]&&i<Wy.FocusedModifier?(o=a,i=Wy.FocusedModifier):r?.isEqualTo(a)&&i<Wy.LastFocused?(o=a,i=Wy.LastFocused):n(a.date)&&i<Wy.Selected?(o=a,i=Wy.Selected):e[Np.today]&&i<Wy.Today&&(o=a,i=Wy.Today))}return o||(o=e.find((e=>Hy(t(e))))),o}(t.days,n,r||(()=>!1),a),[c,u]=(0,d.useState)(i?l:void 0);return{isFocusTarget:e=>Boolean(l?.isEqualTo(e)),setFocused:u,focused:c,blur:()=>{s(c),u(void 0)},moveFocus:(n,r)=>{if(!c)return;const i=tv(n,r,c,t.navStart,t.navEnd,e,o);i&&(t.goToDay(i),u(i))}}}function rv(e,t,n=Ug){return qy(e,t.from,!1,n)||qy(e,t.to,!1,n)||qy(t,e.from,!1,n)||qy(t,e.to,!1,n)}function ov(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:i,onSelect:a}=e,[s,l]=Vy(o,a?o:void 0),c=a?o:s;return{selected:c,select:(o,s,u)=>{const{min:d,max:f}=e,m=o?function(e,t,n=0,r=0,o=!1,i=Ug){const{from:a,to:s}=t||{},{isSameDay:l,isAfter:c,isBefore:u}=i;let d;if(a||s){if(a&&!s)d=l(a,e)?o?{from:a,to:void 0}:void 0:u(e,a)?{from:e,to:a}:{from:a,to:e};else if(a&&s)if(l(a,e)&&l(s,e))d=o?{from:a,to:s}:void 0;else if(l(a,e))d={from:a,to:n>0?void 0:e};else if(l(s,e))d={from:e,to:n>0?void 0:e};else if(u(e,a))d={from:e,to:s};else if(c(e,a))d={from:a,to:e};else{if(!c(e,s))throw new Error("Invalid range");d={from:a,to:e}}}else d={from:e,to:n>0?void 0:e};if(d?.from&&d?.to){const t=i.differenceInCalendarDays(d.to,d.from);(r>0&&t>r||n>1&&t<n)&&(d={from:e,to:void 0})}return d}(o,c,d,f,i,t):void 0;return r&&n&&m?.from&&m.to&&function(e,t,n=Ug){const r=Array.isArray(t)?t:[t],o=r.filter((e=>"function"!=typeof e)).some((t=>"boolean"==typeof t?t:n.isDate(t)?qy(e,t,!1,n):Jy(t,n)?t.some((t=>qy(e,t,!1,n))):Gy(t)?!(!t.from||!t.to)&&rv(e,{from:t.from,to:t.to},n):Xy(t)?function(e,t,n=Ug){const r=Array.isArray(t)?t:[t];let o=e.from;const i=n.differenceInCalendarDays(e.to,e.from),a=Math.min(i,6);for(let e=0;e<=a;e++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}(e,t.dayOfWeek,n):$y(t)?n.isAfter(t.before,t.after)?rv(e,{from:n.addDays(t.after,1),to:n.addDays(t.before,-1)},n):ev(e.from,t,n)||ev(e.to,t,n):!(!Ky(t)&&!Zy(t))&&(ev(e.from,t,n)||ev(e.to,t,n))));if(o)return!0;const i=r.filter((e=>"function"==typeof e));if(i.length){let t=e.from;const r=n.differenceInCalendarDays(e.to,e.from);for(let e=0;e<=r;e++){if(i.some((e=>e(t))))return!0;t=n.addDays(t,1)}}return!1}({from:m.from,to:m.to},n,t)&&(m.from=o,m.to=void 0),a||l(m),a?.(m,o,s,u),m},isSelected:e=>c&&qy(c,e,!1,t)}}function iv(r){const{components:o,formatters:i,labels:a,dateLib:s,locale:l,classNames:c}=(0,d.useMemo)((()=>{const o={...Pp,...r.locale};return{dateLib:new Fg({locale:o,weekStartsOn:r.broadcastCalendar?1:r.weekStartsOn,firstWeekContainsDate:r.firstWeekContainsDate,useAdditionalWeekYearTokens:r.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:r.useAdditionalDayOfYearTokens,timeZone:r.timeZone,numerals:r.numerals},r.dateLib),components:(a=r.components,{...e,...a}),formatters:(i=r.formatters,i?.formatMonthCaption&&!i.formatCaption&&(i.formatCaption=i.formatMonthCaption),i?.formatYearCaption&&!i.formatYearDropdown&&(i.formatYearDropdown=i.formatYearCaption),{...t,...i}),labels:{...n,...r.labels},locale:o,classNames:{...my(),...r.classNames}};var i,a}),[r.locale,r.broadcastCalendar,r.weekStartsOn,r.firstWeekContainsDate,r.useAdditionalWeekYearTokens,r.useAdditionalDayOfYearTokens,r.timeZone,r.numerals,r.dateLib,r.components,r.formatters,r.labels,r.classNames]),{captionLayout:u,mode:f,onDayBlur:m,onDayClick:h,onDayFocus:p,onDayKeyDown:g,onDayMouseEnter:y,onDayMouseLeave:v,onNextClick:b,onPrevClick:w,showWeekNumber:x,styles:M}=r,{formatCaption:E,formatDay:N,formatMonthDropdown:k,formatWeekNumber:j,formatWeekNumberHeader:D,formatWeekdayName:T,formatYearDropdown:S}=i,C=function(e,t){const[n,r]=function(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:i,startOfMonth:a,endOfMonth:s,addYears:l,endOfYear:c,newDate:u,today:d}=t,{fromYear:f,toYear:m,fromMonth:h,toMonth:p}=e;!n&&h&&(n=h),!n&&f&&(n=t.newDate(f,0,1)),!r&&p&&(r=p),!r&&m&&(r=u(m,11,31));const g="dropdown"===e.captionLayout||"dropdown-years"===e.captionLayout;return n?n=a(n):f?n=u(f,0,1):!n&&g&&(n=o(l(e.today??d(),-100))),r?r=s(r):m?r=u(m,11,31):!r&&g&&(r=c(e.today??d())),[n?i(n):n,r?i(r):r]}(e,t),{startOfMonth:o,endOfMonth:i}=t,a=Uy(e,t),[s,l]=Vy(a,e.month?a:void 0);(0,d.useEffect)((()=>{const n=Uy(e,t);l(n)}),[e.timeZone]);const c=function(e,t,n,r){const{numberOfMonths:o=1}=n,i=[];for(let n=0;n<o;n++){const o=r.addMonths(e,n);if(t&&o>t)break;i.push(o)}return i}(s,r,e,t),u=function(e,t,n,r){const o=e[0],i=e[e.length-1],{ISOWeek:a,fixedWeeks:s,broadcastCalendar:l}=n??{},{addDays:c,differenceInCalendarDays:u,differenceInCalendarMonths:d,endOfBroadcastWeek:f,endOfISOWeek:m,endOfMonth:h,endOfWeek:p,isAfter:g,startOfBroadcastWeek:y,startOfISOWeek:v,startOfWeek:b}=r,w=l?y(o,r):a?v(o):b(o),x=u(l?f(i,r):a?m(h(i)):p(h(i)),w),M=d(i,o)+1,E=[];for(let e=0;e<=x;e++){const n=c(w,e);if(t&&g(n,t))break;E.push(n)}const N=(l?35:42)*M;if(s&&E.length<N){const e=N-E.length;for(let t=0;t<e;t++){const e=c(E[E.length-1],1);E.push(e)}}return E}(c,e.endMonth?i(e.endMonth):void 0,e,t),f=function(e,t,n,r){const{addDays:o,endOfBroadcastWeek:i,endOfISOWeek:a,endOfMonth:s,endOfWeek:l,getISOWeek:c,getWeek:u,startOfBroadcastWeek:d,startOfISOWeek:f,startOfWeek:m}=r,h=e.reduce(((e,h)=>{const p=n.broadcastCalendar?d(h,r):n.ISOWeek?f(h):m(h),g=n.broadcastCalendar?i(h,r):n.ISOWeek?a(s(h)):l(s(h)),y=t.filter((e=>e>=p&&e<=g)),v=n.broadcastCalendar?35:42;if(n.fixedWeeks&&y.length<v){const e=t.filter((e=>{const t=v-y.length;return e>g&&e<=o(g,t)}));y.push(...e)}const b=y.reduce(((e,t)=>{const o=n.ISOWeek?c(t):u(t),i=e.find((e=>e.weekNumber===o)),a=new By(t,h,r);return i?i.days.push(a):e.push(new Yy(o,[a])),e}),[]),w=new Qy(h,b);return e.push(w),e}),[]);return n.reverseMonths?h.reverse():h}(c,u,e,t),m=function(e){return e.reduce(((e,t)=>[...e,...t.weeks]),[])}(f),h=f.reduce(((e,t)=>[...e,...t.weeks.reduce(((e,t)=>[...e,...t.days]),[])]),[]),p=function(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:i}=n,{startOfMonth:a,addMonths:s,differenceInCalendarMonths:l}=r,c=o?i??1:1,u=a(e);return t&&l(u,t)<=0?void 0:s(u,-c)}(s,n,e,t),g=function(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:i=1}=n,{startOfMonth:a,addMonths:s,differenceInCalendarMonths:l}=r,c=o?i:1,u=a(e);return t&&l(t,e)<i?void 0:s(u,c)}(s,r,e,t),{disableNavigation:y,onMonthChange:v}=e,b=e=>{if(y)return;let t=o(e);n&&t<o(n)&&(t=o(n)),r&&t>o(r)&&(t=o(r)),l(t),v?.(t)};return{months:f,weeks:m,days:h,navStart:n,navEnd:r,previousMonth:p,nextMonth:g,goToMonth:b,goToDay:e=>{(e=>m.some((t=>t.days.some((t=>t.isEqualTo(e))))))(e)||b(e.date)}}}(r,s),{days:R,months:O,navStart:A,navEnd:I,previousMonth:_,nextMonth:P,goToMonth:L}=C,z=function(e,t,n){const{disabled:r,hidden:o,modifiers:i,showOutsideDays:a,broadcastCalendar:s,today:l}=t,{isSameDay:c,isSameMonth:u,startOfMonth:d,isBefore:f,endOfMonth:m,isAfter:h}=n,p=t.startMonth&&d(t.startMonth),g=t.endMonth&&m(t.endMonth),y={[Np.focused]:[],[Np.outside]:[],[Np.disabled]:[],[Np.hidden]:[],[Np.today]:[]},v={};for(const t of e){const{date:e,displayMonth:d}=t,m=Boolean(d&&!u(e,d)),b=Boolean(p&&f(e,p)),w=Boolean(g&&h(e,g)),x=Boolean(r&&ev(e,r,n)),M=Boolean(o&&ev(e,o,n))||b||w||!s&&!a&&m||s&&!1===a&&m,E=c(e,l??n.today());m&&y.outside.push(t),x&&y.disabled.push(t),M&&y.hidden.push(t),E&&y.today.push(t),i&&Object.keys(i).forEach((r=>{const o=i?.[r];o&&ev(e,o,n)&&(v[r]?v[r].push(t):v[r]=[t])}))}return e=>{const t={[Np.focused]:!1,[Np.disabled]:!1,[Np.hidden]:!1,[Np.outside]:!1,[Np.today]:!1},n={};for(const n in y){const r=y[n];t[n]=r.some((t=>t===e))}for(const t in v)n[t]=v[t].some((t=>t===e));return{...t,...n}}}(R,r,s),{isSelected:F,select:U,selected:B}=function(e,t){const n=function(e,t){const{selected:n,required:r,onSelect:o}=e,[i,a]=Vy(n,o?n:void 0),s=o?n:i,{isSameDay:l}=t;return{selected:s,select:(e,t,n)=>{let i=e;return!r&&s&&s&&l(e,s)&&(i=void 0),o||a(i),o?.(i,e,t,n),i},isSelected:e=>!!s&&l(s,e)}}(e,t),r=function(e,t){const{selected:n,required:r,onSelect:o}=e,[i,a]=Vy(n,o?n:void 0),s=o?n:i,{isSameDay:l}=t,c=e=>s?.some((t=>l(t,e)))??!1,{min:u,max:d}=e;return{selected:s,select:(e,t,n)=>{let i=[...s??[]];if(c(e)){if(s?.length===u)return;if(r&&1===s?.length)return;i=s?.filter((t=>!l(t,e)))}else i=s?.length===d?[e]:[...i,e];return o||a(i),o?.(i,e,t,n),i},isSelected:c}}(e,t),o=ov(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}(r,s)??{},{blur:Y,focused:Q,isFocusTarget:V,moveFocus:W,setFocused:H}=nv(r,C,z,F??(()=>!1),s),{labelDayButton:q,labelGridcell:$,labelGrid:G,labelMonthDropdown:K,labelNav:Z,labelWeekday:X,labelWeekNumber:J,labelWeekNumberHeader:ee,labelYearDropdown:te}=a,ne=(0,d.useMemo)((()=>function(e,t){const n=e.today(),r=t?e.startOfISOWeek(n):e.startOfWeek(n),o=[];for(let t=0;t<7;t++){const n=e.addDays(r,t);o.push(n)}return o}(s,r.ISOWeek)),[s,r.ISOWeek]),re=void 0!==f||void 0!==h,oe=(0,d.useCallback)((()=>{_&&(L(_),w?.(_))}),[_,L,w]),ie=(0,d.useCallback)((()=>{P&&(L(P),b?.(P))}),[L,P,b]),ae=(0,d.useCallback)(((e,t)=>n=>{n.preventDefault(),n.stopPropagation(),H(e),U?.(e.date,t,n),h?.(e.date,t,n)}),[U,h,H]),se=(0,d.useCallback)(((e,t)=>n=>{H(e),p?.(e.date,t,n)}),[p,H]),le=(0,d.useCallback)(((e,t)=>n=>{Y(),m?.(e.date,t,n)}),[Y,m]),ce=(0,d.useCallback)(((e,t)=>n=>{const o={ArrowLeft:["day","rtl"===r.dir?"after":"before"],ArrowRight:["day","rtl"===r.dir?"before":"after"],ArrowDown:["week","after"],ArrowUp:["week","before"],PageUp:[n.shiftKey?"year":"month","before"],PageDown:[n.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(o[n.key]){n.preventDefault(),n.stopPropagation();const[e,t]=o[n.key];W(e,t)}g?.(e.date,t,n)}),[W,g,r.dir]),ue=(0,d.useCallback)(((e,t)=>n=>{y?.(e.date,t,n)}),[y]),de=(0,d.useCallback)(((e,t)=>n=>{v?.(e.date,t,n)}),[v]),fe=(0,d.useCallback)((e=>t=>{const n=Number(t.target.value),r=s.setMonth(s.startOfMonth(e),n);L(r)}),[s,L]),me=(0,d.useCallback)((e=>t=>{const n=Number(t.target.value),r=s.setYear(s.startOfMonth(e),n);L(r)}),[s,L]),{className:he,style:pe}=(0,d.useMemo)((()=>({className:[c[Ep.Root],r.className].filter(Boolean).join(" "),style:{...M?.[Ep.Root],...r.style}})),[c,r.className,r.style,M]),ge=function(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0};return Object.entries(e).forEach((([e,n])=>{e.startsWith("data-")&&(t[e]=n)})),t}(r),ye=(0,d.useRef)(null);!function(e,t,{classNames:n,months:r,focused:o,dateLib:i}){const a=(0,d.useRef)(null),s=(0,d.useRef)(r),l=(0,d.useRef)(!1);(0,d.useLayoutEffect)((()=>{const c=s.current;if(s.current=r,!(t&&e.current&&e.current instanceof HTMLElement&&0!==r.length&&0!==c.length&&r.length===c.length))return;const u=i.isSameMonth(r[0].date,c[0].date),d=i.isAfter(r[0].date,c[0].date),f=d?n[jp.caption_after_enter]:n[jp.caption_before_enter],m=d?n[jp.weeks_after_enter]:n[jp.weeks_before_enter],h=a.current,p=e.current.cloneNode(!0);if(p instanceof HTMLElement?(Ly(p).forEach((e=>{if(!(e instanceof HTMLElement))return;const t=Py(e.querySelector("[data-animated-month]"));t&&e.contains(t)&&e.removeChild(t);const n=zy(e);n&&n.classList.remove(f);const r=Fy(e);r&&r.classList.remove(m)})),a.current=p):a.current=null,l.current||u||o)return;const g=h instanceof HTMLElement?Ly(h):[],y=Ly(e.current);if(y&&y.every((e=>e instanceof HTMLElement))&&g&&g.every((e=>e instanceof HTMLElement))){l.current=!0;const t=[];e.current.style.isolation="isolate";const r=(v=e.current,Py(v.querySelector("[data-animated-nav]")));r&&(r.style.zIndex="1"),y.forEach(((o,i)=>{const a=g[i];if(!a)return;o.style.position="relative",o.style.overflow="hidden";const s=zy(o);s&&s.classList.add(f);const c=Fy(o);c&&c.classList.add(m);const u=()=>{l.current=!1,e.current&&(e.current.style.isolation=""),r&&(r.style.zIndex=""),s&&s.classList.remove(f),c&&c.classList.remove(m),o.style.position="",o.style.overflow="",o.contains(a)&&o.removeChild(a)};t.push(u),a.style.pointerEvents="none",a.style.position="absolute",a.style.overflow="hidden",a.setAttribute("aria-hidden","true");const h=(e=>Py(e.querySelector("[data-animated-weekdays]")))(a);h&&(h.style.opacity="0");const p=zy(a);p&&(p.classList.add(d?n[jp.caption_before_exit]:n[jp.caption_after_exit]),p.addEventListener("animationend",u));const y=Fy(a);y&&y.classList.add(d?n[jp.weeks_before_exit]:n[jp.weeks_after_exit]),o.insertBefore(a,o.firstChild)}))}var v}))}(ye,Boolean(r.animate),{classNames:c,months:O,focused:Q,dateLib:s});const ve={dayPickerProps:r,selected:B,select:U,isSelected:F,months:O,nextMonth:P,previousMonth:_,goToMonth:L,getModifiers:z,components:o,classNames:c,styles:M,labels:a,formatters:i};return d.createElement(xp.Provider,{value:ve},d.createElement(o.Root,{rootRef:r.animate?ye:void 0,className:he,style:pe,dir:r.dir,id:r.id,lang:r.lang,nonce:r.nonce,title:r.title,role:r.role,"aria-label":r["aria-label"],...ge},d.createElement(o.Months,{className:c[Ep.Months],style:M?.[Ep.Months]},!r.hideNavigation&&d.createElement(o.Nav,{"data-animated-nav":r.animate?"true":void 0,className:c[Ep.Nav],style:M?.[Ep.Nav],"aria-label":Z(),onPreviousClick:oe,onNextClick:ie,previousMonth:_,nextMonth:P}),O.map(((e,t)=>{const n=function(e,t,n,r,o){const{startOfMonth:i,startOfYear:a,endOfYear:s,eachMonthOfInterval:l,getMonth:c}=o;return l({start:a(e),end:s(e)}).map((e=>{const a=r.formatMonthDropdown(e,o);return{value:c(e),label:a,disabled:t&&e<i(t)||n&&e>i(n)||!1}}))}(e.date,A,I,i,s),a=function(e,t,n,r){if(!e)return;if(!t)return;const{startOfYear:o,endOfYear:i,addYears:a,getYear:s,isBefore:l,isSameYear:c}=r,u=o(e),d=i(t),f=[];let m=u;for(;l(m,d)||c(m,d);)f.push(m),m=a(m,1);return f.map((e=>{const t=n.formatYearDropdown(e,r);return{value:s(e),label:t,disabled:!1}}))}(A,I,i,s);return d.createElement(o.Month,{"data-animated-month":r.animate?"true":void 0,className:c[Ep.Month],style:M?.[Ep.Month],key:t,displayIndex:t,calendarMonth:e},d.createElement(o.MonthCaption,{"data-animated-caption":r.animate?"true":void 0,className:c[Ep.MonthCaption],style:M?.[Ep.MonthCaption],calendarMonth:e,displayIndex:t},u?.startsWith("dropdown")?d.createElement(o.DropdownNav,{className:c[Ep.Dropdowns],style:M?.[Ep.Dropdowns]},"dropdown"===u||"dropdown-months"===u?d.createElement(o.MonthsDropdown,{className:c[Ep.MonthsDropdown],"aria-label":K(),classNames:c,components:o,disabled:Boolean(r.disableNavigation),onChange:fe(e.date),options:n,style:M?.[Ep.Dropdown],value:s.getMonth(e.date)}):d.createElement("span",null,k(e.date,s)),"dropdown"===u||"dropdown-years"===u?d.createElement(o.YearsDropdown,{className:c[Ep.YearsDropdown],"aria-label":te(s.options),classNames:c,components:o,disabled:Boolean(r.disableNavigation),onChange:me(e.date),options:a,style:M?.[Ep.Dropdown],value:s.getYear(e.date)}):d.createElement("span",null,S(e.date,s)),d.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},E(e.date,s.options,s))):d.createElement(o.CaptionLabel,{className:c[Ep.CaptionLabel],role:"status","aria-live":"polite"},E(e.date,s.options,s))),d.createElement(o.MonthGrid,{role:"grid","aria-multiselectable":"multiple"===f||"range"===f,"aria-label":G(e.date,s.options,s)||void 0,className:c[Ep.MonthGrid],style:M?.[Ep.MonthGrid]},!r.hideWeekdays&&d.createElement(o.Weekdays,{"data-animated-weekdays":r.animate?"true":void 0,className:c[Ep.Weekdays],style:M?.[Ep.Weekdays]},x&&d.createElement(o.WeekNumberHeader,{"aria-label":ee(s.options),className:c[Ep.WeekNumberHeader],style:M?.[Ep.WeekNumberHeader],scope:"col"},D()),ne.map(((e,t)=>d.createElement(o.Weekday,{"aria-label":X(e,s.options,s),className:c[Ep.Weekday],key:t,style:M?.[Ep.Weekday],scope:"col"},T(e,s.options,s))))),d.createElement(o.Weeks,{"data-animated-weeks":r.animate?"true":void 0,className:c[Ep.Weeks],style:M?.[Ep.Weeks]},e.weeks.map(((e,t)=>d.createElement(o.Week,{className:c[Ep.Week],key:e.weekNumber,style:M?.[Ep.Week],week:e},x&&d.createElement(o.WeekNumber,{week:e,style:M?.[Ep.WeekNumber],"aria-label":J(e.weekNumber,{locale:l}),className:c[Ep.WeekNumber],scope:"row",role:"rowheader"},j(e.weekNumber)),e.days.map((e=>{const{date:t}=e,n=z(e);if(n[Np.focused]=!n.hidden&&Boolean(Q?.isEqualTo(e)),n[kp.selected]=F?.(t)||n.selected,Gy(B)){const{from:e,to:r}=B;n[kp.range_start]=Boolean(e&&r&&s.isSameDay(t,e)),n[kp.range_end]=Boolean(e&&r&&s.isSameDay(t,r)),n[kp.range_middle]=qy(B,t,!0,s)}const i=function(e,t={},n={}){let r={...t?.[Ep.Day]};return Object.entries(e).filter((([,e])=>!0===e)).forEach((([e])=>{r={...r,...n?.[e]}})),r}(n,M,r.modifiersStyles),a=function(e,t,n={}){return Object.entries(e).filter((([,e])=>!0===e)).reduce(((e,[r])=>(n[r]?e.push(n[r]):t[Np[r]]?e.push(t[Np[r]]):t[kp[r]]&&e.push(t[kp[r]]),e)),[t[Ep.Day]])}(n,c,r.modifiersClassNames),l=re||n.hidden?void 0:$(t,n,s.options,s);return d.createElement(o.Day,{key:`${s.format(t,"yyyy-MM-dd")}_${s.format(e.displayMonth,"yyyy-MM")}`,day:e,modifiers:n,className:a.join(" "),style:i,role:"gridcell","aria-selected":n.selected||void 0,"aria-label":l,"data-day":s.format(t,"yyyy-MM-dd"),"data-month":e.outside?s.format(t,"yyyy-MM"):void 0,"data-selected":n.selected||void 0,"data-disabled":n.disabled||void 0,"data-hidden":n.hidden||void 0,"data-outside":e.outside||void 0,"data-focused":n.focused||void 0,"data-today":n.today||void 0},!n.hidden&&re?d.createElement(o.DayButton,{className:c[Ep.DayButton],style:M?.[Ep.DayButton],type:"button",day:e,modifiers:n,disabled:n.disabled||void 0,tabIndex:V(e)?0:-1,"aria-label":q(t,n,s.options,s),onClick:ae(e,n),onBlur:le(e,n),onFocus:se(e,n),onKeyDown:ce(e,n),onMouseEnter:ue(e,n),onMouseLeave:de(e,n)},N(t,s.options,s)):!n.hidden&&N(e.date,s.options,s))}))))))))}))),r.footer&&d.createElement(o.Footer,{className:c[Ep.Footer],style:M?.[Ep.Footer],role:"status","aria-live":"polite"},r.footer)))}function av(e,t){return+Kp(e)==+Kp(t)}!function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"}(Wy||(Wy={}));const sv=()=>(0,u.jsx)("span",{className:"bg-icon-interactive h-1 w-1 absolute rounded-full inline-block bottom-0 left-1/2 right-1/2"}),lv=e=>Og(e,"E").slice(0,1),cv=(e,t=24)=>Array.from({length:t},((t,n)=>e+n)),uv=e=>"multiple"===e?[]:"range"===e?{from:void 0,to:void 0}:void 0,dv=({width:e,className:t,classNames:n,selectedDates:r,setSelectedDates:o,showOutsideDays:i=!0,mode:a="single",variant:s="normal",alignment:l="horizontal",numberOfMonths:c,disabled:f,...m})=>{const h=d.isValidElement(m.footer)||"function"==typeof m.footer,[p,g]=(0,d.useState)(!1),[y,v]=(0,d.useState)(!1),[b,w]=(0,d.useState)((new Date).getFullYear()),[x,M]=(0,d.useState)(b-b%24);void 0===r&&(r="multiple"===a?[]:"range"===a?{from:void 0,to:void 0}:void 0);const E=({weekdays:e})=>(0,u.jsx)("div",{className:"flex justify-between",children:e.map(((e,t)=>(0,u.jsx)("button",{className:"h-10 w-10 px-1.5 py-2 text-center text-text-secondary text-sm font-normal content-center bg-transparent border-none shrink-0",children:e},t)))}),N=e=>(0,u.jsx)("div",{className:"flex flex-col bsf-force-ui-month-weeks",children:e.children[1].props.children.map(((e,t)=>(0,u.jsx)("div",{className:"flex flex-row justify-between",children:e},t)))}),k=he("relative bg-background-primary shadow-datepicker-wrapper",e,"vertical"===l?"flex flex-col":"flex flex-row gap-3","normal"===s?"rounded-tr-md rounded-tl-md border border-solid border-border-subtle":"","presets"===s?"rounded-tr-md border border-solid border-border-subtle":"","dualdate"===s?"rounded-tr-md rounded-tl-md border border-solid border-border-subtle":"",h?"rounded-b-none":"rounded-bl-md rounded-br-md");return(0,u.jsx)(u.Fragment,{children:(0,u.jsx)(iv,{mode:a,selected:r,onSelect:(e,t)=>{if("range"===a){const n=r;if(!n?.from&&!n?.to||n?.from&&n?.to)return n.from&&av(t,n?.from)||n.to&&av(t,n?.to)?void o({from:void 0,to:void 0}):void o({from:t,to:void 0});if(n?.from&&!n?.to)return t<n.from?void o({from:t,to:n.from}):void o({from:n.from,to:t});o(e)}else"multiple"===a?r.some((e=>Og(e,"yyyy-MM-dd")===Og(t,"yyyy-MM-dd")))?o(r.filter((e=>Og(e,"yyyy-MM-dd")!==Og(t,"yyyy-MM-dd")))):o([...r,t]):"single"===a&&o(e)},hideNavigation:!0,captionLayout:"label",className:he(t),formatters:{formatWeekdayName:lv},classNames:{months:k,month:"flex flex-col p-2 gap-1 text-center w-full",caption:"relative flex justify-center items-center",table:"w-full border-separate border-spacing-0",head_row:"flex mb-1",head_cell:"text-muted-foreground rounded-md w-10 font-normal text-sm",row:"flex w-full mt-2",cell:"h-10 w-10 text-center text-sm p-0 relative",...n},numberOfMonths:c,showOutsideDays:!0,components:{MonthCaption:function(e){const{goToMonth:t,nextMonth:n,previousMonth:r}=Mp(),o=Og(e.calendarMonth.date,"yyyy"),i=Og(e.calendarMonth.date,"MMMM"),a=new Date(e.calendarMonth.date);a.setDate(a.getDate()-a.getDay());const s=Array.from({length:7},((e,t)=>{const n=new Date(a);return n.setDate(a.getDate()+t),lv(n)}));let l;return l=y?`${x} - ${x+23}`:p?o:`${i} ${o}`,(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("div",{className:"flex justify-between",children:[(0,u.jsx)(xe,{variant:"ghost",onClick:()=>{if(y)M(x-24);else if(p){const n=new Date(b-1,e.calendarMonth.date.getMonth());w(n.getFullYear()),t(n)}else t(r)},className:"bg-background-primary border-none cursor-pointer","aria-label":"Previous Button",icon:(0,u.jsx)(bp,{className:"h-4 w-4 text-button-tertiary-color"})}),(0,u.jsx)(xe,{variant:"ghost",onClick:()=>{c>1||(p?(v(!0),g(!1)):y?v(!1):g(!p))},children:l}),(0,u.jsx)(xe,{variant:"ghost",onClick:()=>{if(y)M(x+24);else if(p){const n=new Date(b+1,e.calendarMonth.date.getMonth());w(n.getFullYear()),t(n)}else t(n)},className:"bg-background-primary border-none cursor-pointer","aria-label":"Next Button",icon:(0,u.jsx)(wp,{className:"h-4 w-4 text-button-tertiary-color"})})]}),y&&(0,u.jsx)("div",{className:"grid grid-cols-4 w-full",children:cv(x).map((n=>(0,u.jsxs)(xe,{variant:"ghost",onClick:()=>(n=>{w(n),v(!1),g(!0),t(new Date(n,e.calendarMonth.date.getMonth()))})(n),className:he("h-10 w-full text-center font-normal relative",n===b&&n!==(new Date).getFullYear()&&"bg-background-brand text-text-on-color hover:bg-background-brand hover:text-black",n===(new Date).getFullYear()&&"font-semibold"),children:[n,n===(new Date).getFullYear()&&sv()]},n)))}),p&&!y&&(0,u.jsx)("div",{className:"grid grid-cols-4 gap-2 my-12",children:Array.from({length:12},((n,r)=>(0,u.jsxs)(xe,{variant:"ghost",onClick:()=>{g(!1),t(new Date(b,r))},className:he("px-1.5 py-2 h-10 w-[4.375rem] text-center font-normal relative",r===e.calendarMonth.date.getMonth()&&r!==(new Date).getMonth()&&b===e.calendarMonth.date.getFullYear()&&e.calendarMonth.date.getFullYear()!==(new Date).getFullYear()&&"bg-background-brand text-text-on-color hover:bg-background-brand hover:text-black",r===(new Date).getMonth()&&(new Date).getFullYear()===b&&"font-semibold"),children:[Og(new Date(0,r),"MMM"),(new Date).getMonth()===r&&(new Date).getFullYear()===b&&sv()]},r)))}),!p&&!y&&(0,u.jsx)(E,{weekdays:s})]})},DayButton:({day:e,modifiers:t,...n})=>{const{selected:o,today:a,disabled:s,outside:l,range_middle:c,range_start:d,range_end:f}=t,m=d||f||c,h=new Date,p=r?.to,g=Og(e.displayMonth,"yyyy-MM")===Og(h,"yyyy-MM"),y=p&&Og(p,"yyyy-MM")===Og(e.date,"yyyy-MM"),v=Xp(h,-1,E),b=Og(e.date,"yyyy-MM")===Og(v,"yyyy-MM"),w=g||y||m,x=!i&&l,M=he("h-10 w-10 flex items-center justify-center transition text-text-secondary relative text-sm","border-none rounded",!o&&!m||l?"bg-transparent hover:bg-button-tertiary-hover":"bg-background-brand text-text-on-color",c&&w&&!l?"bg-brand-background-50 text-text-secondary rounded-none":"",s?"opacity-50 cursor-not-allowed text-text-disabled":"cursor-pointer",l&&!m||!w&&l||l&&!b||l?"bg-transparent opacity-50 text-text-disabled cursor-auto":"");var E;return(0,u.jsxs)("button",{className:he(M,a&&"font-semibold",x&&"opacity-0",d&&"fui-range-start",f&&"fui-range-end",c&&"fui-range-middle",{"[&:is([data-hover=true])]:bg-brand-background-50 [&:is([data-hover=true])]:rounded-none":!m&&!o}),disabled:s||l,onClick:e=>{"function"==typeof n.onClick&&n.onClick(e)},onMouseEnter:e=>{"function"==typeof n.onMouseEnter&&n.onMouseEnter(e),e.currentTarget.setAttribute("data-hover","true")},onMouseLeave:e=>{"function"==typeof n.onMouseLeave&&n.onMouseLeave(e),e.currentTarget.setAttribute("data-hover","false")},"aria-label":Og(e.date,"EEEE, MMMM do, yyyy"),"data-selected":o,"data-day":Og(e.date,"yyyy-MM-dd"),children:[n.children,a&&w&&(0,u.jsx)("span",{className:"absolute h-1 w-1 bg-background-brand rounded-full bottom-1"})]})},Day:e=>{const t=Object.entries(e).reduce(((e,[t,n])=>(t.startsWith("data-")&&(e[t]=n),e)),{});return(0,u.jsx)("div",{...t,className:he(e.className,"inline-flex"),children:e.children})},Weekdays:()=>(0,u.jsx)(u.Fragment,{}),Week:e=>(0,u.jsx)("div",{className:he("bsf-force-ui-month-week flex flex-row",e.className),children:e.children}),Months:e=>(0,u.jsx)(u.Fragment,{children:(0,u.jsx)("div",{className:he("bsf-force-ui-date-picker-month",k),children:e?.children?.map(((e,t)=>e?(0,u.jsx)(d.Fragment,{children:e.map(((e,t)=>(0,u.jsxs)(d.Fragment,{children:[t>0&&(0,u.jsx)("div",{className:"border border-solid border-border-subtle border-l-0"}),e]},t)))},t):null))})}),MonthGrid:e=>p||y?(0,u.jsx)(u.Fragment,{}):(0,u.jsx)(N,{...e})},..."range"===a?{required:!1}:{},...m,onDayMouseEnter:(e,t,n)=>{if("range"!==a)return;const o=r;if(o?.from&&o?.to||!o?.from&&!o?.to)return void Array.from(document.querySelectorAll("[data-hover]")).forEach((e=>{e.setAttribute("data-hover","false")}));const i=n.target,l=new Date(i.dataset.day),c=_g(l,o.from),u=Ig(l,o.to);let d;switch(s){case"dualdate":case"presets":d=i.closest(".bsf-force-ui-date-picker-month");break;default:d=i.closest(".bsf-force-ui-month-weeks")}const f=Array.from(d.querySelectorAll("button"));u&&f.sort(((e,t)=>Ig(new Date(e.dataset.day),new Date(t.dataset.day))?-1:1)),c&&f.sort(((e,t)=>_g(new Date(e.dataset.day),new Date(t.dataset.day))?1:-1));const m=f.indexOf(i),h=f.findIndex((e=>"true"===e.getAttribute("data-selected"))),p=[],g=Math.min(m,h),y=Math.max(m,h);for(let e=g;e<=y;e++)f[e]?.disabled||p.push(f[e]);f.forEach((e=>{e.setAttribute("data-hover",p.includes(e)?"true":"false")}))},disabled:f})})};function fv(e){return tg(Date.now(),e)}function mv(e){return Gp(e,Date.now())}function hv(e){const t=mv(e?.in),n=t.getFullYear(),r=t.getMonth(),o=t.getDate(),i=mv(e?.in);return i.setFullYear(n,r,o-1),i.setHours(0,0,0,0),i}function pv(e,t,n){return Zp(e,-t,n)}const gv=({selectionType:e="single",variant:t="normal",presets:n=[],onCancel:r,onApply:o,onDateSelect:i,applyButtonText:a="Apply",cancelButtonText:s="Cancel",showOutsideDays:l=!0,isFooter:c=!0,selected:f,disabled:m,...h})=>{const[p,g]=(0,d.useState)((()=>{if(!f)return uv(e);const t="multiple"===e&&Array.isArray(f),n="single"===e&&f instanceof Date;return t||"range"===e&&"from"in f&&"to"in f||n?f:uv(e)})),y=e=>{g(e),i&&i(e)},v=[{label:"Today",range:{from:fv(),to:fv()}},{label:"Yesterday",range:{from:hv(),to:hv()}},{label:"This Week",range:{from:lg(new Date,{weekStartsOn:1}),to:ig(new Date,{weekStartsOn:1})}},{label:"Last 7 Days",range:{from:tg(pv(new Date,6)),to:tg(new Date)}},{label:"This Month",range:{from:Lg(new Date),to:ag(new Date)}},{label:"Last 30 Days",range:{from:tg(pv(new Date,29)),to:tg(new Date)}}],b=n.length>0?n:v,w=()=>{g("multiple"===e?[]:{from:void 0,to:void 0}),r&&r()},x=()=>{o&&o(p)};return"normal"===t?(0,u.jsx)(dv,{...h,mode:e,variant:t,width:"w-[18.5rem]",selectedDates:p,showOutsideDays:l,setSelectedDates:y,footer:c&&(0,u.jsxs)("div",{className:"flex bg-background-primary justify-end p-2 gap-3 border border-solid border-border-subtle border-t-0 rounded-md rounded-tl-none rounded-tr-none",children:[(0,u.jsx)(xe,{variant:"outline",onClick:w,children:s}),(0,u.jsx)(xe,{onClick:x,children:a})]}),disabled:m}):"dualdate"===t?(0,u.jsx)(dv,{mode:e,numberOfMonths:2,alignment:"horizontal",selectedDates:p,setSelectedDates:y,showOutsideDays:l,variant:t,width:"w-auto",footer:(0,u.jsxs)("div",{className:"flex bg-background-primary justify-end p-2 gap-3 border border-solid border-border-subtle border-t-0 rounded-md rounded-tl-none rounded-tr-none",children:[(0,u.jsx)(xe,{variant:"outline",onClick:w,children:s}),(0,u.jsx)(xe,{onClick:x,children:a})]}),disabled:m,...h}):"presets"===t?(0,u.jsxs)("div",{className:"flex flex-row shadow-datepicker-wrapper",children:[(0,u.jsx)("div",{className:"flex flex-col gap-1 p-3 items-start border border-solid border-border-subtle border-r-0 rounded-tl-md rounded-bl-md bg-background-primary",children:b.map(((e,t)=>{const n=p&&"from"in p&&"to"in p&&p.from?.getTime()===e.range.from.getTime()&&p.to?.getTime()===e.range.to.getTime();return(0,u.jsx)(xe,{onClick:()=>(e=>{g(e)})(e.range),variant:"ghost",className:he("text-left font-medium text-sm text-nowrap w-full",n&&"bg-brand-background-50"),children:e.label},t)}))}),(0,u.jsx)(dv,{...h,mode:e,selectedDates:p,setSelectedDates:y,variant:t,showOutsideDays:l,width:"w-auto",numberOfMonths:2,footer:(0,u.jsxs)("div",{className:"flex justify-end p-2 gap-3 border-l border-r border-t-0 border-b border-solid border-border-subtle bg-background-primary rounded-br-md",children:[(0,u.jsx)(xe,{variant:"outline",onClick:w,children:s}),(0,u.jsx)(xe,{onClick:x,children:a})]}),disabled:m})]}):void 0},yv=hd("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),vv=({design:e="inline",theme:t="light",variant:n="neutral",className:r="",title:o="",content:i="",icon:a=null,onClose:s,action:l={label:"",onClick:()=>{},type:"link"}})=>{const c=()=>{"function"==typeof s&&s()},d={neutral:"ring-alert-border-neutral bg-alert-background-neutral",custom:"ring-alert-border-neutral bg-alert-background-neutral",info:"ring-alert-border-info bg-alert-background-info",success:"ring-alert-border-green bg-alert-background-green",warning:"ring-alert-border-warning bg-alert-background-warning",error:"ring-alert-border-danger bg-alert-background-danger"},f="bg-background-inverse ring-background-inverse",m={light:"text-icon-secondary",dark:"text-icon-inverse"},h=()=>{l?.onClick?.(c)};return"stack"===e?(0,u.jsx)("div",{className:he("flex items-center justify-start p-4 gap-2 relative ring-1 rounded-md shadow-lg","dark"===t?f:d?.[n],r),children:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:Ne({variant:n,icon:a,theme:t})}),(0,u.jsxs)("div",{className:"flex flex-col items-start justify-start gap-0.5 mr-7",children:[je({title:o,theme:t}),De({content:i,theme:t}),l?.label&&"function"==typeof l?.onClick&&(0,u.jsx)("div",{className:"mt-2.5",children:ke({actionLabel:l?.label,actionType:l?.type??"button",onAction:h,theme:t})})]}),(0,u.jsx)("div",{className:"absolute right-4 top-4 [&_svg]:size-5",children:(0,u.jsx)("button",{className:he("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",m[t]??m.light),onClick:()=>c(),"aria-label":"Close alert",children:(0,u.jsx)(y,{})})})]})}):(0,u.jsxs)("div",{className:he("flex items-center justify-between p-3 gap-2 relative ring-1 rounded-lg shadow-lg","dark"===t?f:d?.[n],r),children:[(0,u.jsxs)("div",{className:"flex items-center justify-start gap-2",children:[(0,u.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:Ne({variant:n,icon:a,theme:t})}),(0,u.jsxs)("p",{className:"content-start space-x-1 my-0 mr-10 px-1",children:[je({title:o,theme:t,inline:!0}),De({content:i,theme:t,inline:!0})]})]}),(0,u.jsxs)("div",{className:"flex h-full justify-start gap-4 [&_svg]:size-4",children:[l?.label&&"function"==typeof l?.onClick&&(0,u.jsx)("div",{className:"self-center flex h-5",children:ke({actionLabel:l?.label,actionType:l?.type??"button",onAction:h,theme:t})}),"function"==typeof s&&(0,u.jsx)("button",{className:he("self-start bg-transparent m-0 border-none p-0.5 focus:outline-none active:outline-none cursor-pointer size-5",m[t]??m.light),onClick:()=>c(),"aria-label":"Close alert",children:(0,u.jsx)(y,{})})]})]})},bv=hd("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);function wv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var xv=function(){var e,t,n=(null===(e=window.srfm_payment_admin)||void 0===e?void 0:e.currenciesData)||(null===(t=window.srfm_admin)||void 0===t||null===(t=t.payments)||void 0===t?void 0:t.currencies_data)||{},r=Object.entries(n).map((function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return wv(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wv(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),n=t[0],r=t[1];return{value:n,label:"".concat(n," - ").concat(r.name),symbol:r.symbol,decimalPlaces:r.decimal_places}}));return 0===r.length?[{value:"USD",label:(0,_u.__)("USD - US Dollar","sureforms"),symbol:"$",decimalPlaces:2}]:r}(),Mv=function(e){switch(e){case"succeeded":return"green";case"pending":case"partially_refunded":return"yellow";case"failed":return"red";case"refunded":return"blue";default:return"gray"}},Ev=function(e){var t,n,r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=(r=null==(n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"USD")?void 0:n.toUpperCase(),o=xv.find((function(e){return e.value===r})),o?o.symbol:n),s=parseFloat(e).toFixed(2);switch(i||(null===(t=window.srfm_admin)||void 0===t||null===(t=t.payments)||void 0===t?void 0:t.currency_sign_position)||"left"){case"right":return"".concat(s).concat(a);case"left_space":return"".concat(a," ").concat(s);case"right_space":return"".concat(s," ").concat(a);default:return"".concat(a).concat(s)}},Nv=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return"N/A";var n=new Date(e);if(isNaN(n.getTime()))return"N/A";var r=n.toLocaleString("en-US",{month:"short"}),o=n.getDate(),i=n.toLocaleString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}).replace(/^0/,"");return"".concat(r," ").concat(o,", ").concat(t?" ".concat(n.getFullYear(),","):""," ").concat(i)},kv=function(e){return{succeeded:(0,_u.__)("Paid","sureforms"),partially_refunded:(0,_u.__)("Partially Refunded","sureforms"),pending:(0,_u.__)("Pending","sureforms"),failed:(0,_u.__)("Failed","sureforms"),refunded:(0,_u.__)("Refunded","sureforms"),canceled:(0,_u.__)("Canceled","sureforms"),active:(0,_u.__)("Active","sureforms"),paused:(0,_u.__)("Paused","sureforms")}[e]||e},jv=function(e){var t=null!=e&&e.srfm_txn_id?e.srfm_txn_id:null==e?void 0:e.id;return"SF-#".concat(t)},Dv=function(e){var t=e.amount,n=e.partialAmount,r=e.currency;return React.createElement("span",{style:{display:"flex",gap:"8px"}},React.createElement("span",{style:{textDecoration:"line-through",color:"#6c757d"}},Ev(t,r)),Ev(n,r))},Tv=function(e){var t,n,r,o="live"===((null==e?void 0:e.mode)||"test")?null===(t=window)||void 0===t||null===(t=t.srfm_admin)||void 0===t||null===(t=t.payments)||void 0===t?void 0:t.webhook_live_connected:null===(n=window)||void 0===n||null===(n=n.srfm_admin)||void 0===n||null===(n=n.payments)||void 0===n?void 0:n.webhook_test_connected;if(!(null===(r=window)||void 0===r||null===(r=r.srfm_admin)||void 0===r||null===(r=r.payments)||void 0===r?void 0:r.stripe_connected))return null;if(o)return null;var i=(0,_u.sprintf)((0,_u.__)("Webhooks keep SureForms in sync with Stripe by automatically updating payment and subscription data. Please %1$s Webhook.","sureforms"),"%1$s").split("%1$s"),a=React.createElement("span",{className:"flex flex-col gap-3.5"},React.createElement("span",null,i[0],React.createElement(xe,{onClick:function(){return window.open(window.srfm_admin.payments.stripe_connect_url,"_blank","noopener,noreferrer")},variant:"link",size:"xs",className:"inline-flex text-link-primary p-0 [&>span]:p-0"},(0,_u.__)("configure","sureforms")),i[1]));return React.createElement(vv,{content:a,icon:React.createElement(bv,{className:"!size-6"}),title:null,variant:"error",className:"shadow-none bg-alert-background-danger"})},Sv=function(e){switch(e){case"stripe":return"Stripe";case"paypal":return"PayPal";default:return e}};function Cv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const Rv=function(e){var t,n=e.selectedDates,r=e.onApply,o=e.onCancel,i=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Cv(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Cv(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,a.useState)(!1),2),s=i[0],l=i[1],c=(0,a.useRef)(null);return(0,a.useEffect)((function(){if(s){var e=function(e){c.current&&!c.current.contains(e.target)&&(l(!1),o&&o())},t=function(e){"Escape"===e.key&&(l(!1),o&&o())};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),function(){document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}}}),[s,o]),React.createElement("div",{className:"relative",ref:c},React.createElement(vp,{type:"text",size:"sm",value:(t=n,t.from&&t.to?"".concat(t.from.toLocaleDateString()," - ").concat(t.to.toLocaleDateString()):""),suffix:React.createElement(yv,{className:"text-icon-secondary"}),onClick:function(){return l(!s)},placeholder:(0,_u.__)("mm/dd/yyyy - mm/dd/yyyy","sureforms"),className:"cursor-pointer w-52",readOnly:!0}),s&&React.createElement("div",{className:"absolute right-0 z-10 mt-2 rounded-lg shadow-lg"},React.createElement(gv,{applyButtonText:(0,_u.__)("Apply","sureforms"),cancelButtonText:(0,_u.__)("Cancel","sureforms"),selectionType:"range",showOutsideDays:!1,variant:"presets",onApply:function(e){l(!1),r(e)},onCancel:function(){l(!1),o&&o()},selected:n,disabled:{after:new Date}})))};function Ov(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const Av=function(e){var t=e.searchTerm,n=e.onSearchChange,r=e.selectedPayments,o=void 0===r?[]:r,i=e.onBulkDelete,s=e.statusFilter,l=e.onStatusFilterChange,c=e.formFilter,u=e.onFormFilterChange,d=e.paymentMode,f=e.onPaymentModeChange,m=e.selectedDates,h=void 0===m?{from:null,to:null}:m,p=e.onDateChange,g=e.formsList,y=void 0===g?[]:g,v=e.onClearFilters,b=e.hasActiveFilters,w=void 0!==b&&b,x=(0,a.useRef)(null),M=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ov(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ov(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,a.useState)(t),2),E=M[0],N=M[1],k=o.length>0;(0,a.useEffect)((function(){N(t)}),[t]);var j=[{value:"succeeded",label:(0,_u.__)("Paid","sureforms")},{value:"partially_refunded",label:(0,_u.__)("Partially Refunded","sureforms")},{value:"pending",label:(0,_u.__)("Pending","sureforms")},{value:"failed",label:(0,_u.__)("Failed","sureforms")},{value:"refunded",label:(0,_u.__)("Refunded","sureforms")}];return k?React.createElement("div",{className:"flex flex-wrap lg:flex-nowrap items-center justify-end gap-2 sm:gap-3 lg:gap-4 mt-4 lg:!mt-0"},React.createElement(xe,{variant:"outline",icon:React.createElement(pd,null),size:"sm",onClick:i,destructive:!0},(0,_u.__)("Delete","sureforms"))):React.createElement("div",{className:"flex flex-wrap lg:flex-nowrap items-center justify-space-between gap-2 sm:gap-3 lg:gap-4 mt-4 lg:!mt-0"},w&&React.createElement(xe,{variant:"outline",size:"sm",onClick:v,icon:React.createElement(gd,{className:"w-4 h-4"}),iconPosition:"left",className:"min-w-fit",destructive:!0},(0,_u.__)("Clear Filters","sureforms")),React.createElement("div",null,React.createElement(pp,{value:d,onChange:f,size:"sm"},React.createElement(pp.Button,{className:"w-36 h-[2rem] [&_div]:text-xs",placeholder:(0,_u.__)("Payment Mode","sureforms")},(function(e){var t=e.value;return"test"===t?(0,_u.__)("Test Mode","sureforms"):"live"===t?(0,_u.__)("Live Mode","sureforms"):void 0})),React.createElement(pp.Options,null,React.createElement(pp.Option,{value:"test"},(0,_u.__)("Test Mode","sureforms")),React.createElement(pp.Option,{value:"live"},(0,_u.__)("Live Mode","sureforms"))))),React.createElement("div",null,React.createElement(pp,{value:s,onChange:l,size:"sm"},React.createElement(pp.Button,{className:"w-52 h-[2rem] [&_div]:text-xs",placeholder:(0,_u.__)("Status","sureforms")},(function(e){var t,n,r=e.value;return r?(t=r,(n=j.find((function(e){return e.value===t})))?n.label:(0,_u.__)("Select Status","sureforms")):(0,_u.__)("Select Status","sureforms")})),React.createElement(pp.Options,null,j.map((function(e){return React.createElement(pp.Option,{key:e.value,value:e.value,className:"text-xs"},React.createElement("span",null,e.label))}))))),React.createElement("div",null,React.createElement(pp,{value:c,onChange:u,size:"sm"},React.createElement(pp.Button,{className:"w-52 h-[2rem] [&_div]:text-xs",placeholder:(0,_u.__)("Form","sureforms")},(function(e){var t=e.value;if(!t)return(0,_u.__)("Form","sureforms");var n=y.find((function(e){return e.id===parseInt(t)}));return n?n.title:(0,_u.__)("Form","sureforms")})),React.createElement(pp.Options,null,y.map((function(e){return React.createElement(pp.Option,{key:e.id,value:e.id,className:"text-xs"},React.createElement("span",null,e.title))}))))),React.createElement("div",{className:""},React.createElement(Rv,{selectedDates:h,onApply:p})),React.createElement("div",null,React.createElement(vp,{ref:x,type:"text",size:"sm",onChange:function(e){N(e)},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),n(E))},value:E,placeholder:(0,_u.__)("Search…","sureforms"),prefix:React.createElement(yd,{className:"text-icon-secondary"})})))},Iv=g("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]),_v=(0,d.forwardRef)((({id:e,label:t,defaultChecked:n=!1,checked:r,onChange:o,indeterminate:i,disabled:a,size:s="md",className:l,...c},f)=>{const m=(0,d.useMemo)((()=>e||`checkbox-${Xh()}`),[e]),h=(0,d.useMemo)((()=>typeof r<"u"),[r]),[p,g]=(0,d.useState)(n||!1),y="primary",v={sm:{checkbox:"size-4 rounded gap-1",icon:"size-3",text:"text-sm",description:"text-sm",gap:"gap-0.5"},md:{checkbox:"size-5 rounded gap-1",icon:"size-4",text:"text-base",description:"text-sm",gap:"gap-1"}},b={primary:{checkbox:"border-border-strong hover:border-border-interactive checked:border-border-interactive bg-white checked:bg-toggle-on checked:hover:bg-toggle-on-hover checked:hover:border-toggle-on-hover focus:ring-2 focus:ring-offset-2 focus:ring-focus",icon:"text-white"}},w=(0,d.useCallback)((()=>h?r:p),[h,r,p]),x=(0,d.useCallback)((()=>(0,d.isValidElement)(t)?t:t?.heading||t?.description?(0,u.jsxs)("div",{className:v[s].gap,children:[t?.heading&&(0,u.jsx)(yp,{className:he("text-text-primary font-medium leading-4 m-0",v[s].text,v[s].gap,a&&"text-text-disabled"),htmlFor:m,children:t?.heading}),t?.description&&(0,u.jsx)(yp,{tag:"p",className:he("font-normal leading-5 m-0",v[s].description,a&&"text-text-disabled"),variant:"help",children:t?.description})]}):null),[t,s,a]);return(0,u.jsxs)("div",{className:he("inline-flex items-center justify-center gap-2",!!t&&"items-start",a&&"cursor-not-allowed"),children:[(0,u.jsxs)("label",{className:he("relative flex items-center justify-center rounded-full p-0.5",!a&&"cursor-pointer"),htmlFor:m,children:[(0,u.jsx)("input",{ref:f,id:m,type:"checkbox",className:he("peer relative cursor-pointer appearance-none transition-all m-0 before:content-[''] checked:before:content-[''] checked:before:hidden before:hidden !border-1.5 border-solid",b[y].checkbox,v[s].checkbox,a&&"cursor-not-allowed disabled:bg-white checked:disabled:bg-white disabled:border-border-disabled checked:disabled:border-border-disabled",l),checked:w(),onChange:e=>{if(a)return;const t=e.target.checked;h||g(t),"function"==typeof o&&o(t)},disabled:a,...c}),(0,u.jsx)("span",{className:he("pointer-events-none inline-flex items-center absolute top-2/4 not-rtl:left-2/4 rtl:right-2/4 -translate-y-2/4 -translate-x-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100",b[y].icon,a&&"cursor-not-allowed peer-disabled:text-border-disabled"),children:i?(0,u.jsx)(Iv,{className:he(v[s]?.icon)}):(0,u.jsx)(ve,{className:he(v[s]?.icon)})})]}),!!t&&x()]})}));_v.displayName="Checkbox";const Pv=(0,d.createContext)(void 0),Lv=()=>{const e=(0,d.useContext)(Pv);if(!e)throw new Error("Table components must be used within Table component");return e},zv=({children:e,className:t,checkboxSelection:n=!1,...r})=>{const o={checkboxSelection:n},i=d.Children.toArray(e).find((e=>d.isValidElement(e)&&e.type===Vv)),a=d.Children.toArray(e).filter((e=>d.isValidElement(e)&&e.type!==Vv));return(0,u.jsx)(Pv.Provider,{value:o,children:(0,u.jsxs)("div",{className:"flow-root border-0.5 border-solid border-border-subtle rounded-md divide-y-0.5 divide-x-0 divide-solid divide-border-subtle overflow-hidden",children:[(0,u.jsx)("div",{className:"overflow-x-auto w-full",children:(0,u.jsx)("div",{className:"relative",children:(0,u.jsx)("table",{className:he("table-fixed min-w-full border-collapse border-spacing-0",t),...r,children:a})})}),i]})})},Fv=({children:e,className:t,selected:n,onChangeSelection:r,indeterminate:o,disabled:i,...a})=>{const{checkboxSelection:s}=Lv();return(0,u.jsx)("thead",{className:he("bg-background-secondary border-x-0 border-t-0 border-b-0.5 border-solid border-border-subtle",t),...a,children:(0,u.jsxs)("tr",{children:[s&&(0,u.jsx)("th",{scope:"col",className:"relative px-5.5 w-11 overflow-hidden",children:(0,u.jsx)("div",{className:"absolute inset-0 grid grid-cols-1 place-content-center",children:(0,u.jsx)(_v,{size:"sm",checked:n,indeterminate:o,disabled:i,onChange:e=>{"function"==typeof r&&r(e)},"aria-label":n?"Deselect all":"Select all"})})}),e]})})},Uv=({children:e,className:t,...n})=>(0,u.jsx)("th",{scope:"col",className:he("p-3 text-left text-sm font-medium leading-5 text-text-primary",t),...n,children:e}),Bv=({children:e,className:t,...n})=>(0,u.jsx)("tbody",{className:he("bg-background-primary divide-y-0.5 divide-x-0 divide-solid divide-border-subtle",t),...n,children:e}),Yv=({children:e,selected:t,value:n,className:r,onChangeSelection:o,...i})=>{const{checkboxSelection:a}=Lv();return(0,u.jsxs)("tr",{className:he("hover:bg-background-secondary",t&&"bg-background-secondary",r),...i,children:[a&&(0,u.jsx)("td",{className:"relative px-5.5 w-11 overflow-hidden",children:(0,u.jsx)("div",{className:"absolute inset-0 grid grid-cols-1 place-content-center",children:(0,u.jsx)(_v,{size:"sm",checked:t,onChange:e=>{"function"==typeof o&&o(e,n)},"aria-label":"Select row"})})}),e]})},Qv=({children:e,className:t,...n})=>(0,u.jsx)("td",{className:he("px-3 py-3.5 text-sm font-normal leading-5 text-text-secondary",t),...n,children:e}),Vv=({children:e,className:t,...n})=>{const{checkboxSelection:r}=Lv();return(0,u.jsx)("div",{className:he("px-3 py-3",r&&"px-4",t),...n,children:e})};zv.displayName="Table",Fv.displayName="Table.Head",Uv.displayName="Table.HeadCell",Bv.displayName="Table.Body",Yv.displayName="Table.Row",Qv.displayName="Table.Cell",Vv.displayName="Table.Footer",zv.Head=Fv,zv.HeadCell=Uv,zv.Body=Bv,zv.Row=Yv,zv.Cell=Qv,zv.Footer=Vv;const Wv=({variant:e="dark",placement:t="bottom",title:n="",content:r,arrow:o=!1,open:i,setOpen:a,children:s,className:l,tooltipPortalRoot:c,tooltipPortalId:f,boundary:m="clippingAncestors",strategy:h="fixed",offset:p=8,triggers:g=["hover","focus"],interactive:y=!1})=>{const v=(0,d.useMemo)((()=>"boolean"==typeof i&&"function"==typeof a),[i,a]),[b,w]=(0,d.useState)(!1),x=(0,d.useRef)(null),{refs:M,floatingStyles:E,context:N}=_h({open:v?i:b,onOpenChange:v?a:w,placement:t,strategy:h,middleware:[gm(p),ym({boundary:m}),(P={boundary:m},{...im(P),options:[P,undefined]}),vm({element:x})],whileElementsMounted:rm}),k=Ch(N,{enabled:!v&&g.includes("click")}),j=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:a}=e,{enabled:s=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:f=0,move:m=!0}=t,h=Vm(),p=Qm(),g=Hm(c),y=Hm(l),v=Hm(n),b=d.useRef(),w=d.useRef(-1),x=d.useRef(),M=d.useRef(-1),E=d.useRef(!0),N=d.useRef(!1),k=d.useRef((()=>{})),j=d.useRef(!1),D=d.useCallback((()=>{var e;const t=null==(e=o.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t}),[o]);d.useEffect((()=>{if(s)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){let{open:t}=e;t||(clearTimeout(w.current),clearTimeout(M.current),E.current=!0,j.current=!1)}}),[s,i]),d.useEffect((()=>{if(!s)return;if(!g.current)return;if(!n)return;function e(e){D()&&r(!1,e,"hover")}const t=Zd(a.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}}),[a.floating,n,r,s,g,D]);const T=d.useCallback((function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const o=$m(y.current,"close",b.current);o&&!x.current?(clearTimeout(w.current),w.current=window.setTimeout((()=>r(!1,e,n)),o)):t&&(clearTimeout(w.current),r(!1,e,n))}),[y,r]),S=xm((()=>{k.current(),x.current=void 0})),C=xm((()=>{if(N.current){const e=Zd(a.floating).body;e.style.pointerEvents="",e.removeAttribute(qm),N.current=!1}})),R=xm((()=>!!o.current.openEvent&&["click","mousedown"].includes(o.current.openEvent.type)));d.useEffect((()=>{if(s&&jd(a.domReference)){var e;const r=a.domReference;return n&&r.addEventListener("mouseleave",l),null==(e=a.floating)||e.addEventListener("mouseleave",l),m&&r.addEventListener("mousemove",t,{once:!0}),r.addEventListener("mouseenter",t),r.addEventListener("mouseleave",i),()=>{var e;n&&r.removeEventListener("mouseleave",l),null==(e=a.floating)||e.removeEventListener("mouseleave",l),m&&r.removeEventListener("mousemove",t),r.removeEventListener("mouseenter",t),r.removeEventListener("mouseleave",i)}}function t(e){if(clearTimeout(w.current),E.current=!1,u&&!Kd(b.current)||f>0&&!$m(y.current,"open"))return;const t=$m(y.current,"open",b.current);t?w.current=window.setTimeout((()=>{v.current||r(!0,e,"hover")}),t):n||r(!0,e,"hover")}function i(e){if(R())return;k.current();const t=Zd(a.floating);if(clearTimeout(M.current),j.current=!1,g.current&&o.current.floatingContext){n||clearTimeout(w.current),x.current=g.current({...o.current.floatingContext,tree:h,x:e.clientX,y:e.clientY,onClose(){C(),S(),R()||T(e,!0,"safe-polygon")}});const r=x.current;return t.addEventListener("mousemove",r),void(k.current=()=>{t.removeEventListener("mousemove",r)})}("touch"!==b.current||!Yd(a.floating,e.relatedTarget))&&T(e)}function l(e){R()||o.current.floatingContext&&(null==g.current||g.current({...o.current.floatingContext,tree:h,x:e.clientX,y:e.clientY,onClose(){C(),S(),R()||T(e)}})(e))}}),[a,s,e,u,f,m,T,S,C,r,n,v,h,y,g,o,R]),Im((()=>{var e;if(s&&n&&null!=(e=g.current)&&e.__options.blockPointerEvents&&D()){N.current=!0;const e=a.floating;if(jd(a.domReference)&&e){var t;const n=Zd(a.floating).body;n.setAttribute(qm,"");const r=a.domReference,o=null==h||null==(t=h.nodesRef.current.find((e=>e.id===p)))||null==(t=t.context)?void 0:t.elements.floating;return o&&(o.style.pointerEvents=""),n.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{n.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}}),[s,n,p,a,h,g,D]),Im((()=>{n||(b.current=void 0,j.current=!1,S(),C())}),[n,S,C]),d.useEffect((()=>()=>{S(),clearTimeout(w.current),clearTimeout(M.current),C()}),[s,a.domReference,S,C]);const O=d.useMemo((()=>{function e(e){b.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function o(){E.current||v.current||r(!0,t,"hover")}u&&!Kd(b.current)||n||0===f||j.current&&e.movementX**2+e.movementY**2<2||(clearTimeout(M.current),"touch"===b.current?o():(j.current=!0,M.current=window.setTimeout(o,f)))}}}),[u,r,n,v,f]),A=d.useMemo((()=>({onMouseEnter(){clearTimeout(w.current)},onMouseLeave(e){R()||T(e.nativeEvent,!1)}})),[T,R]);return d.useMemo((()=>s?{reference:O,floating:A}:{}),[s,O,A])}(N,{move:!1,enabled:!v&&g.includes("hover"),...y&&{handleClose:Zh()}}),D=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:a}=e,{enabled:s=!0,visibleOnly:l=!0}=t,c=d.useRef(!1),u=d.useRef(),f=d.useRef(!0);d.useEffect((()=>{if(!s)return;const e=Ed(a.domReference);function t(){!n&&Dd(a.domReference)&&a.domReference===Bd(Zd(a.domReference))&&(c.current=!0)}function r(){f.current=!0}return e.addEventListener("blur",t),e.addEventListener("keydown",r,!0),()=>{e.removeEventListener("blur",t),e.removeEventListener("keydown",r,!0)}}),[a.domReference,n,s]),d.useEffect((()=>{if(s)return o.on("openchange",e),()=>{o.off("openchange",e)};function e(e){let{reason:t}=e;"reference-press"!==t&&"escape-key"!==t||(c.current=!0)}}),[o,s]),d.useEffect((()=>()=>{clearTimeout(u.current)}),[]);const m=d.useMemo((()=>({onPointerDown(e){Hd(e.nativeEvent)||(f.current=!1)},onMouseLeave(){c.current=!1},onFocus(e){if(c.current)return;const t=Jd(e.nativeEvent);if(l&&jd(t))try{if(qd()&&Gd())throw Error();if(!t.matches(":focus-visible"))return}catch(e){if(!f.current&&!ef(t))return}r(!0,e.nativeEvent,"focus")},onBlur(e){c.current=!1;const t=e.relatedTarget,n=e.nativeEvent,o=jd(t)&&t.hasAttribute(Wm("focus-guard"))&&"outside"===t.getAttribute("data-type");u.current=window.setTimeout((()=>{var e;const s=Bd(a.domReference?a.domReference.ownerDocument:document);(t||s!==a.domReference)&&(Yd(null==(e=i.current.floatingContext)?void 0:e.refs.floating.current,s)||Yd(a.domReference,s)||o||r(!1,n,"focus"))}))}})),[i,a.domReference,r,l]);return d.useMemo((()=>s?{reference:m}:{}),[s,m])}(N,{enabled:!v&&g.includes("focus")}),T=Ih(N),S=qh(N,{role:"tooltip"}),{getReferenceProps:C,getFloatingProps:R}=Fh([k,j,D,T,S]),{isMounted:O,styles:A}=function(e,t){void 0===t&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:a=250}=t,s=e.placement,l=s.split("-")[0],c=d.useMemo((()=>({side:l,placement:s})),[l,s]),u="number"==typeof a,f=(u?a:a.open)||0,m=(u?a:a.close)||0,[h,p]=d.useState((()=>({...Gh(i,c),...Gh(n,c)}))),{isMounted:g,status:y}=function(e,t){void 0===t&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,i=("number"==typeof o?o:o.close)||0,[a,s]=d.useState("unmounted"),l=function(e,t){const[n,r]=d.useState(e);return e&&!n&&r(!0),d.useEffect((()=>{if(!e&&n){const e=setTimeout((()=>r(!1)),t);return()=>clearTimeout(e)}}),[e,n,t]),n}(n,i);return l||"close"!==a||s("unmounted"),Im((()=>{if(r){if(n){s("initial");const e=requestAnimationFrame((()=>{s("open")}));return()=>{cancelAnimationFrame(e)}}s("close")}}),[n,r]),{isMounted:l,status:a}}(e,{duration:a}),v=Hm(n),b=Hm(r),w=Hm(o),x=Hm(i);return Im((()=>{const e=Gh(v.current,c),t=Gh(w.current,c),n=Gh(x.current,c),r=Gh(b.current,c)||Object.keys(e).reduce(((e,t)=>(e[t]="",e)),{});if("initial"===y&&p((t=>({transitionProperty:t.transitionProperty,...n,...e}))),"open"===y&&p({transitionProperty:Object.keys(r).map($h).join(","),transitionDuration:f+"ms",...n,...r}),"close"===y){const r=t||e;p({transitionProperty:Object.keys(r).map($h).join(","),transitionDuration:m+"ms",...n,...r})}}),[m,w,v,b,x,f,y,c]),{isMounted:g,styles:h}}(N,{duration:150,initial:{opacity:0},open:{opacity:1},close:{opacity:0}}),I={light:"bg-tooltip-background-light text-text-primary",dark:"bg-tooltip-background-dark text-text-on-color"}[e],_="dark"===e?"text-tooltip-background-dark":"text-tooltip-background-light";var P;return(0,u.jsxs)(d.Fragment,{children:[(0,d.isValidElement)(s)&&(0,u.jsx)(d.Fragment,{children:(0,d.cloneElement)(s,{ref:Te(s.ref,M.setReference),className:he(s.props.className),...C()})},"tooltip-reference"),(0,u.jsx)(gh,{id:f,root:c,children:O&&(0,u.jsxs)("div",{className:he("absolute z-20 py-2 px-3 rounded-md text-xs leading-4 shadow-soft-shadow-lg",I,"max-w-80 w-fit",l),ref:M.setFloating,style:{...E,...A},...R(),children:[(0,u.jsxs)("div",{children:[!!n&&(0,u.jsx)("span",{className:"font-semibold",children:n},"tooltip-title"),!!r&&(0,u.jsx)("div",{className:"font-normal",children:r},"tooltip-content")]}),o&&(0,u.jsx)(Um,{ref:x,context:N,className:he("fill-current",_)})]})})]})};Wv.displayName="Tooltip";const Hv=({variant:e="rectangular",className:t,...n})=>{const r={circular:"rounded-full bg-gray-200 ",rectangular:"rounded-md bg-gray-200"}[e],o={circular:"size-10",rectangular:"w-96 h-3"}[e];return(0,u.jsx)("div",{className:he(r,"animate-pulse",o,t),...n})},qv={xs:{general:"text-xs min-w-6 h-6",ellipse:"text-xs min-w-6",icon:"size-4"},sm:{general:"text-xs min-w-8 h-8",ellipse:"text-xs min-w-8",icon:"size-4"},md:{general:"text-sm min-w-10 h-10",ellipse:"text-sm min-w-10",icon:"size-5"},lg:{general:"text-base min-w-12 h-12",ellipse:"text-base min-w-12",icon:"size-6"}},$v="group disabled:border-field-border-disabled opacity-50",Gv=(0,d.createContext)({size:"sm",disabled:!1}),Kv=()=>(0,d.useContext)(Gv),Zv=({size:e="sm",disabled:t=!1,children:n,className:r,...o})=>(0,u.jsx)(Gv.Provider,{value:{size:e,disabled:t},children:(0,u.jsx)("nav",{role:"navigation",className:he("flex w-full justify-center box-border m-0",r),...o,children:n})});Zv.displayName="Pagination";const Xv=(0,d.forwardRef)((({className:e,...t},n)=>(0,u.jsx)("ul",{ref:n,className:he("m-0 p-0 w-full flex justify-center flex-row items-center gap-1","list-none",e),...t})));Xv.displayName="Pagination.Content";const Jv=(0,d.forwardRef)((({isActive:e=!1,className:t,children:n,...r},o)=>{const{disabled:i}=Kv();return(0,u.jsx)("li",{ref:o,className:he("flex",i&&$v),children:(0,u.jsx)(eb,{isActive:e,disabled:i,className:t,...r,children:n})})}));Jv.displayName="Pagination.Item";const eb=({isActive:e=!1,tag:t="a",children:n,className:r,...o})=>{const{size:i,disabled:a}=Kv(),s=e=>e.preventDefault();return(0,u.jsx)(xe,{tag:t,size:i,variant:"ghost",className:he("no-underline bg-transparent p-0 m-0 border-none","flex justify-center items-center rounded text-button-secondary","focus:outline focus:outline-1 focus:outline-border-subtle focus:bg-button-tertiary-hover",qv[i].general,!a&&e&&"text-button-primary active:text-button-primary bg-brand-background-50",a&&[$v,"group-disabled:text-field-color-disabled","focus:ring-transparent cursor-not-allowed"],r),disabled:a,...o,"aria-current":e?"page":void 0,onClick:e=>pe(o.onClick||(()=>{}),a?s:()=>{})(e),children:(0,u.jsx)("span",{className:"px-1 flex",children:n})})},tb=e=>{const{size:t,disabled:n}=Kv();return(0,u.jsx)("li",{className:he("flex",n&&$v),"aria-label":"Go to previous page",children:(0,u.jsx)(eb,{className:he("[&>span]:flex [&>span]:items-center"),...e,children:(0,u.jsx)(bp,{className:he(qv[t].icon)})})})};tb.displayName="Pagination.Previous";const nb=e=>{const{size:t,disabled:n}=Kv();return(0,u.jsx)("li",{className:he("flex",n&&$v),"aria-label":"Go to next page",children:(0,u.jsx)(eb,{className:he("[&>span]:flex [&>span]:items-center"),...e,children:(0,u.jsx)(wp,{className:he(qv[t].icon)})})})};nb.displayName="Pagination.Next";const rb=e=>{const{size:t,disabled:n}=Kv();return(0,u.jsx)("li",{className:he("flex",n&&$v),children:(0,u.jsx)("span",{className:he("flex justify-center",qv[t].ellipse,n&&$v),"aria-hidden":"true",...e,children:"•••"})})};rb.displayName="Pagination.Ellipsis",Zv.Content=Xv,Zv.Item=Jv,Zv.Previous=tb,Zv.Next=nb,Zv.Ellipsis=rb;const ob=hd("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),ib=window.wp.apiFetch;var ab=o.n(ib);let sb={data:""},lb=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,cb=/\/\*[^]*?\*\/| +/g,ub=/\n+/g,db=(e,t)=>{let n="",r="",o="";for(let i in e){let a=e[i];"@"==i[0]?"i"==i[1]?n=i+" "+a+";":r+="f"==i[1]?db(a,i):i+"{"+db(a,"k"==i[1]?"":t)+"}":"object"==typeof a?r+=db(a,t?t.replace(/([^,])+/g,(e=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,(t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)))):i):null!=a&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=db.p?db.p(i,a):i+":"+a+";")}return n+(t&&o?t+"{"+o+"}":o)+r},fb={},mb=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+mb(e[n]);return t}return e};function hb(e){let t=this||{},n=e.call?e(t.p):e;return((e,t,n,r,o)=>{let i=mb(e),a=fb[i]||(fb[i]=(e=>{let t=0,n=11;for(;t<e.length;)n=101*n+e.charCodeAt(t++)>>>0;return"go"+n})(i));if(!fb[a]){let t=i!==e?e:(e=>{let t,n,r=[{}];for(;t=lb.exec(e.replace(cb,""));)t[4]?r.shift():t[3]?(n=t[3].replace(ub," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace(ub," ").trim();return r[0]})(e);fb[a]=db(o?{["@keyframes "+a]:t}:t,n?"":"."+a)}let s=n&&fb.g?fb.g:null;return n&&(fb.g=fb[a]),((e,t,n,r)=>{r?t.data=t.data.replace(r,e):-1===t.data.indexOf(e)&&(t.data=n?e+t.data:t.data+e)})(fb[a],t,r,s),a})(n.unshift?n.raw?((e,t,n)=>e.reduce(((e,r,o)=>{let i=t[o];if(i&&i.call){let e=i(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;i=t?"."+t:e&&"object"==typeof e?e.props?"":db(e,""):!1===e?"":e}return e+r+(null==i?"":i)}),""))(n,[].slice.call(arguments,1),t.p):n.reduce(((e,n)=>Object.assign(e,n&&n.call?n(t.p):n)),{}):n,(e=>"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||sb)(t.target),t.g,t.o,t.k)}hb.bind({g:1});let pb,gb,yb,vb=hb.bind({k:1});function bb(e,t){let n=this||{};return function(){let r=arguments;function o(i,a){let s=Object.assign({},i),l=s.className||o.className;n.p=Object.assign({theme:gb&&gb()},s),n.o=/ *go\d+/.test(l),s.className=hb.apply(n,r)+(l?" "+l:""),t&&(s.ref=a);let c=e;return e[0]&&(c=s.as||e,delete s.as),yb&&c[0]&&yb(s),pb(c,s)}return t?t(o):o}}var wb=(e,t)=>(e=>"function"==typeof e)(e)?e(t):e,xb=(()=>{let e=0;return()=>(++e).toString()})(),Mb=(()=>{let e;return()=>{if(void 0===e&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),Eb=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,20)};case 1:return{...e,toasts:e.toasts.map((e=>e.id===t.toast.id?{...e,...t.toast}:e))};case 2:let{toast:n}=t;return Eb(e,{type:e.toasts.find((e=>e.id===n.id))?1:0,toast:n});case 3:let{toastId:r}=t;return{...e,toasts:e.toasts.map((e=>e.id===r||void 0===r?{...e,dismissed:!0,visible:!1}:e))};case 4:return void 0===t.toastId?{...e,toasts:[]}:{...e,toasts:e.toasts.filter((e=>e.id!==t.toastId))};case 5:return{...e,pausedAt:t.time};case 6:let o=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map((e=>({...e,pauseDuration:e.pauseDuration+o})))}}},Nb=[],kb={toasts:[],pausedAt:void 0},jb=e=>{kb=Eb(kb,e),Nb.forEach((e=>{e(kb)}))},Db=e=>(t,n)=>{let r=((e,t="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(null==n?void 0:n.id)||xb()}))(t,e,n);return jb({type:2,toast:r}),r.id},Tb=(e,t)=>Db("blank")(e,t);Tb.error=Db("error"),Tb.success=Db("success"),Tb.loading=Db("loading"),Tb.custom=Db("custom"),Tb.dismiss=e=>{jb({type:3,toastId:e})},Tb.remove=e=>jb({type:4,toastId:e}),Tb.promise=(e,t,n)=>{let r=Tb.loading(t.loading,{...n,...null==n?void 0:n.loading});return"function"==typeof e&&(e=e()),e.then((e=>{let o=t.success?wb(t.success,e):void 0;return o?Tb.success(o,{id:r,...n,...null==n?void 0:n.success}):Tb.dismiss(r),e})).catch((e=>{let o=t.error?wb(t.error,e):void 0;o?Tb.error(o,{id:r,...n,...null==n?void 0:n.error}):Tb.dismiss(r)})),e},new Map;var Sb=vb` from { transform: scale(0) rotate(45deg); opacity: 0; } to { transform: scale(1) rotate(45deg); opacity: 1; }`,Cb=vb` from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; }`,Rb=vb` from { transform: scale(0) rotate(90deg); opacity: 0; } to { transform: scale(1) rotate(90deg); opacity: 1; }`,Ob=bb("div")` width: 20px; opacity: 0; height: 20px; border-radius: 10px; background: ${e=>e.primary||"#ff4b4b"}; position: relative; transform: rotate(45deg); animation: ${Sb} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; animation-delay: 100ms; &:after, &:before { content: ''; animation: ${Cb} 0.15s ease-out forwards; animation-delay: 150ms; position: absolute; border-radius: 3px; opacity: 0; background: ${e=>e.secondary||"#fff"}; bottom: 9px; left: 4px; height: 2px; width: 12px; } &:before { animation: ${Rb} 0.15s ease-out forwards; animation-delay: 180ms; transform: rotate(90deg); } `,Ab=vb` from { transform: rotate(0deg); } to { transform: rotate(360deg); } `,Ib=bb("div")` width: 12px; height: 12px; box-sizing: border-box; border: 2px solid; border-radius: 100%; border-color: ${e=>e.secondary||"#e0e0e0"}; border-right-color: ${e=>e.primary||"#616161"}; animation: ${Ab} 1s linear infinite; `,_b=vb` from { transform: scale(0) rotate(45deg); opacity: 0; } to { transform: scale(1) rotate(45deg); opacity: 1; }`,Pb=vb` 0% { height: 0; width: 0; opacity: 0; } 40% { height: 0; width: 6px; opacity: 1; } 100% { opacity: 1; height: 10px; }`,Lb=bb("div")` width: 20px; opacity: 0; height: 20px; border-radius: 10px; background: ${e=>e.primary||"#61d345"}; position: relative; transform: rotate(45deg); animation: ${_b} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; animation-delay: 100ms; &:after { content: ''; box-sizing: border-box; animation: ${Pb} 0.2s ease-out forwards; opacity: 0; animation-delay: 200ms; position: absolute; border-right: 2px solid; border-bottom: 2px solid; border-color: ${e=>e.secondary||"#fff"}; bottom: 6px; left: 6px; height: 10px; width: 6px; } `,zb=bb("div")` position: absolute; `,Fb=bb("div")` position: relative; display: flex; justify-content: center; align-items: center; min-width: 20px; min-height: 20px; `,Ub=vb` from { transform: scale(0.6); opacity: 0.4; } to { transform: scale(1); opacity: 1; }`,Bb=bb("div")` position: relative; transform: scale(0.6); opacity: 0.4; min-width: 20px; animation: ${Ub} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; `,Yb=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return void 0!==t?"string"==typeof t?d.createElement(Bb,null,t):t:"blank"===n?null:d.createElement(Fb,null,d.createElement(Ib,{...r}),"loading"!==n&&d.createElement(zb,null,"error"===n?d.createElement(Ob,{...r}):d.createElement(Lb,{...r})))},Qb=e=>`\n0% {transform: translate3d(0,${-200*e}%,0) scale(.6); opacity:.5;}\n100% {transform: translate3d(0,0,0) scale(1); opacity:1;}\n`,Vb=e=>`\n0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}\n100% {transform: translate3d(0,${-150*e}%,-1px) scale(.6); opacity:0;}\n`,Wb=bb("div")` display: flex; align-items: center; background: #fff; color: #363636; line-height: 1.3; will-change: transform; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05); max-width: 350px; pointer-events: auto; padding: 8px 10px; border-radius: 8px; `,Hb=bb("div")` display: flex; justify-content: center; margin: 4px 10px; color: inherit; flex: 1 1 auto; white-space: pre-line; `;d.memo((({toast:e,position:t,style:n,children:r})=>{let o=e.height?((e,t)=>{let n=e.includes("top")?1:-1,[r,o]=Mb()?["0%{opacity:0;} 100%{opacity:1;}","0%{opacity:1;} 100%{opacity:0;}"]:[Qb(n),Vb(n)];return{animation:t?`${vb(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${vb(o)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}})(e.position||t||"top-center",e.visible):{opacity:0},i=d.createElement(Yb,{toast:e}),a=d.createElement(Hb,{...e.ariaProps},wb(e.message,e));return d.createElement(Wb,{className:e.className,style:{...o,...n,...e.style}},"function"==typeof r?r({icon:i,message:a}):d.createElement(d.Fragment,null,i,a))})),function(e){db.p=void 0,pb=e,gb=void 0,yb=void 0}(d.createElement),hb` z-index: 9999; > * { pointer-events: auto; } `,window.wp.editor,window.wp.data,window.wp.url;const qb=e=>{const t=Zb(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),$b(n,t)||Kb(e)},getConflictingClassGroupIds:(e,t)=>{const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}},$b=(e,t)=>{if(0===e.length)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?$b(e.slice(1),r):void 0;if(o)return o;if(0===t.validators.length)return;const i=e.join("-");return t.validators.find((({validator:e})=>e(i)))?.classGroupId},Gb=/^\[(.+)\]$/,Kb=e=>{if(Gb.test(e)){const t=Gb.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Zb=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const e in n)Xb(n[e],r,e,t);return r},Xb=(e,t,n,r)=>{e.forEach((e=>{if("string"!=typeof e){if("function"==typeof e)return ew(e)?void Xb(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach((([e,o])=>{Xb(o,Jb(t,e),n,r)}))}else(""===e?t:Jb(t,e)).classGroupId=n}))},Jb=(e,t)=>{let n=e;return t.split("-").forEach((e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)})),n},ew=e=>e.isThemeGetter,tw=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):o(e,t)}}},nw=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=e=>{const t=[];let n,r=0,o=0,i=0;for(let a=0;a<e.length;a++){let s=e[a];if(0===r&&0===o){if(":"===s){t.push(e.slice(i,a)),i=a+1;continue}if("/"===s){n=a;continue}}"["===s?r++:"]"===s?r--:"("===s?o++:")"===s&&o--}const a=0===t.length?e:e.substring(i),s=rw(a);return{modifiers:t,hasImportantModifier:s!==a,baseClassName:s,maybePostfixModifierPosition:n&&n>i?n-i:void 0}};if(t){const e=t+":",n=r;r=t=>t.startsWith(e)?n(t.substring(e.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:t,maybePostfixModifierPosition:void 0}}if(n){const e=r;r=t=>n({className:t,parseClassName:e})}return r},rw=e=>e.endsWith("!")?e.substring(0,e.length-1):e.startsWith("!")?e.substring(1):e,ow=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map((e=>[e,!0])));return e=>{if(e.length<=1)return e;const n=[];let r=[];return e.forEach((e=>{"["===e[0]||t[e]?(n.push(...r.sort(),e),r=[]):r.push(e)})),n.push(...r.sort()),n}},iw=/\s+/;function aw(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=sw(e))&&(r&&(r+=" "),r+=t);return r}const sw=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=sw(e[r]))&&(n&&(n+=" "),n+=t);return n};function lw(e,...t){let n,r,o,i=function(s){const l=t.reduce(((e,t)=>t(e)),e());return n=(e=>({cache:tw(e.cacheSize),parseClassName:nw(e),sortModifiers:ow(e),...qb(e)}))(l),r=n.cache.get,o=n.cache.set,i=a,a(s)};function a(e){const t=r(e);if(t)return t;const i=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(iw);let l="";for(let e=s.length-1;e>=0;e-=1){const t=s[e],{isExternal:c,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:m}=n(t);if(c){l=t+(l.length>0?" "+l:l);continue}let h=!!m,p=r(h?f.substring(0,m):f);if(!p){if(!h){l=t+(l.length>0?" "+l:l);continue}if(p=r(f),!p){l=t+(l.length>0?" "+l:l);continue}h=!1}const g=i(u).join(":"),y=d?g+"!":g,v=y+p;if(a.includes(v))continue;a.push(v);const b=o(p,h);for(let e=0;e<b.length;++e){const t=b[e];a.push(y+t)}l=t+(l.length>0?" "+l:l)}return l})(e,n);return o(e,i),i}return function(){return i(aw.apply(null,arguments))}}const cw=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},uw=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,dw=/^\((?:(\w[\w-]*):)?(.+)\)$/i,fw=/^\d+\/\d+$/,mw=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hw=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,pw=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,gw=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,yw=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,vw=e=>fw.test(e),bw=e=>!!e&&!Number.isNaN(Number(e)),ww=e=>!!e&&Number.isInteger(Number(e)),xw=e=>e.endsWith("%")&&bw(e.slice(0,-1)),Mw=e=>mw.test(e),Ew=()=>!0,Nw=e=>hw.test(e)&&!pw.test(e),kw=()=>!1,jw=e=>gw.test(e),Dw=e=>yw.test(e),Tw=e=>!Cw(e)&&!Pw(e),Sw=e=>Qw(e,qw,kw),Cw=e=>uw.test(e),Rw=e=>Qw(e,$w,Nw),Ow=e=>Qw(e,Gw,bw),Aw=e=>Qw(e,Ww,kw),Iw=e=>Qw(e,Hw,Dw),_w=e=>Qw(e,Zw,jw),Pw=e=>dw.test(e),Lw=e=>Vw(e,$w),zw=e=>Vw(e,Kw),Fw=e=>Vw(e,Ww),Uw=e=>Vw(e,qw),Bw=e=>Vw(e,Hw),Yw=e=>Vw(e,Zw,!0),Qw=(e,t,n)=>{const r=uw.exec(e);return!!r&&(r[1]?t(r[1]):n(r[2]))},Vw=(e,t,n=!1)=>{const r=dw.exec(e);return!!r&&(r[1]?t(r[1]):n)},Ww=e=>"position"===e||"percentage"===e,Hw=e=>"image"===e||"url"===e,qw=e=>"length"===e||"size"===e||"bg-size"===e,$w=e=>"length"===e,Gw=e=>"number"===e,Kw=e=>"family-name"===e,Zw=e=>"shadow"===e,Xw=lw((Symbol.toStringTag,()=>{const e=cw("color"),t=cw("font"),n=cw("text"),r=cw("font-weight"),o=cw("tracking"),i=cw("leading"),a=cw("breakpoint"),s=cw("container"),l=cw("spacing"),c=cw("radius"),u=cw("shadow"),d=cw("inset-shadow"),f=cw("text-shadow"),m=cw("drop-shadow"),h=cw("blur"),p=cw("perspective"),g=cw("aspect"),y=cw("ease"),v=cw("animate"),b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Pw,Cw],w=()=>[Pw,Cw,l],x=()=>[vw,"full","auto",...w()],M=()=>[ww,"none","subgrid",Pw,Cw],E=()=>["auto",{span:["full",ww,Pw,Cw]},ww,Pw,Cw],N=()=>[ww,"auto",Pw,Cw],k=()=>["auto","min","max","fr",Pw,Cw],j=()=>["auto",...w()],D=()=>[vw,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],T=()=>[e,Pw,Cw],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Fw,Aw,{position:[Pw,Cw]}],C=()=>["auto","cover","contain",Uw,Sw,{size:[Pw,Cw]}],R=()=>[xw,Lw,Rw],O=()=>["","none","full",c,Pw,Cw],A=()=>["",bw,Lw,Rw],I=()=>[bw,xw,Fw,Aw],_=()=>["","none",h,Pw,Cw],P=()=>["none",bw,Pw,Cw],L=()=>["none",bw,Pw,Cw],z=()=>[bw,Pw,Cw],F=()=>[vw,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Mw],breakpoint:[Mw],color:[Ew],container:[Mw],"drop-shadow":[Mw],ease:["in","out","in-out"],font:[Tw],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Mw],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Mw],shadow:[Mw],spacing:["px",bw],text:[Mw],"text-shadow":[Mw],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",vw,Cw,Pw,g]}],container:["container"],columns:[{columns:[bw,Cw,Pw,s]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:b()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:x()}],"inset-x":[{"inset-x":x()}],"inset-y":[{"inset-y":x()}],start:[{start:x()}],end:[{end:x()}],top:[{top:x()}],right:[{right:x()}],bottom:[{bottom:x()}],left:[{left:x()}],visibility:["visible","invisible","collapse"],z:[{z:[ww,"auto",Pw,Cw]}],basis:[{basis:[vw,"full","auto",s,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[bw,vw,"auto","initial","none",Cw]}],grow:[{grow:["",bw,Pw,Cw]}],shrink:[{shrink:["",bw,Pw,Cw]}],order:[{order:[ww,"first","last","none",Pw,Cw]}],"grid-cols":[{"grid-cols":M()}],"col-start-end":[{col:E()}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":M()}],"row-start-end":[{row:E()}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:D()}],w:[{w:[s,"screen",...D()]}],"min-w":[{"min-w":[s,"screen","none",...D()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...D()]}],h:[{h:["screen","lh",...D()]}],"min-h":[{"min-h":["screen","lh","none",...D()]}],"max-h":[{"max-h":["screen","lh",...D()]}],"font-size":[{text:["base",n,Lw,Rw]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Pw,Ow]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",xw,Cw]}],"font-family":[{font:[zw,Cw,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Pw,Cw]}],"line-clamp":[{"line-clamp":[bw,"none",Pw,Ow]}],leading:[{leading:[i,...w()]}],"list-image":[{"list-image":["none",Pw,Cw]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Pw,Cw]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[bw,"from-font","auto",Pw,Rw]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[bw,"auto",Pw,Cw]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Pw,Cw]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Pw,Cw]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:S()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:C()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ww,Pw,Cw],radial:["",Pw,Cw],conic:[ww,Pw,Cw]},Bw,Iw]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:R()}],"gradient-via-pos":[{via:R()}],"gradient-to-pos":[{to:R()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:O()}],"rounded-s":[{"rounded-s":O()}],"rounded-e":[{"rounded-e":O()}],"rounded-t":[{"rounded-t":O()}],"rounded-r":[{"rounded-r":O()}],"rounded-b":[{"rounded-b":O()}],"rounded-l":[{"rounded-l":O()}],"rounded-ss":[{"rounded-ss":O()}],"rounded-se":[{"rounded-se":O()}],"rounded-ee":[{"rounded-ee":O()}],"rounded-es":[{"rounded-es":O()}],"rounded-tl":[{"rounded-tl":O()}],"rounded-tr":[{"rounded-tr":O()}],"rounded-br":[{"rounded-br":O()}],"rounded-bl":[{"rounded-bl":O()}],"border-w":[{border:A()}],"border-w-x":[{"border-x":A()}],"border-w-y":[{"border-y":A()}],"border-w-s":[{"border-s":A()}],"border-w-e":[{"border-e":A()}],"border-w-t":[{"border-t":A()}],"border-w-r":[{"border-r":A()}],"border-w-b":[{"border-b":A()}],"border-w-l":[{"border-l":A()}],"divide-x":[{"divide-x":A()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":A()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[bw,Pw,Cw]}],"outline-w":[{outline:["",bw,Lw,Rw]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",u,Yw,_w]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",d,Yw,_w]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:A()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[bw,Rw]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":A()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",f,Yw,_w]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[bw,Pw,Cw]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[bw]}],"mask-image-linear-from-pos":[{"mask-linear-from":I()}],"mask-image-linear-to-pos":[{"mask-linear-to":I()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":I()}],"mask-image-t-to-pos":[{"mask-t-to":I()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":I()}],"mask-image-r-to-pos":[{"mask-r-to":I()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":I()}],"mask-image-b-to-pos":[{"mask-b-to":I()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":I()}],"mask-image-l-to-pos":[{"mask-l-to":I()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":I()}],"mask-image-x-to-pos":[{"mask-x-to":I()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":I()}],"mask-image-y-to-pos":[{"mask-y-to":I()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[Pw,Cw]}],"mask-image-radial-from-pos":[{"mask-radial-from":I()}],"mask-image-radial-to-pos":[{"mask-radial-to":I()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[bw]}],"mask-image-conic-from-pos":[{"mask-conic-from":I()}],"mask-image-conic-to-pos":[{"mask-conic-to":I()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:S()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:C()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Pw,Cw]}],filter:[{filter:["","none",Pw,Cw]}],blur:[{blur:_()}],brightness:[{brightness:[bw,Pw,Cw]}],contrast:[{contrast:[bw,Pw,Cw]}],"drop-shadow":[{"drop-shadow":["","none",m,Yw,_w]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",bw,Pw,Cw]}],"hue-rotate":[{"hue-rotate":[bw,Pw,Cw]}],invert:[{invert:["",bw,Pw,Cw]}],saturate:[{saturate:[bw,Pw,Cw]}],sepia:[{sepia:["",bw,Pw,Cw]}],"backdrop-filter":[{"backdrop-filter":["","none",Pw,Cw]}],"backdrop-blur":[{"backdrop-blur":_()}],"backdrop-brightness":[{"backdrop-brightness":[bw,Pw,Cw]}],"backdrop-contrast":[{"backdrop-contrast":[bw,Pw,Cw]}],"backdrop-grayscale":[{"backdrop-grayscale":["",bw,Pw,Cw]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[bw,Pw,Cw]}],"backdrop-invert":[{"backdrop-invert":["",bw,Pw,Cw]}],"backdrop-opacity":[{"backdrop-opacity":[bw,Pw,Cw]}],"backdrop-saturate":[{"backdrop-saturate":[bw,Pw,Cw]}],"backdrop-sepia":[{"backdrop-sepia":["",bw,Pw,Cw]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Pw,Cw]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[bw,"initial",Pw,Cw]}],ease:[{ease:["linear","initial",y,Pw,Cw]}],delay:[{delay:[bw,Pw,Cw]}],animate:[{animate:["none",v,Pw,Cw]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,Pw,Cw]}],"perspective-origin":[{"perspective-origin":b()}],rotate:[{rotate:P()}],"rotate-x":[{"rotate-x":P()}],"rotate-y":[{"rotate-y":P()}],"rotate-z":[{"rotate-z":P()}],scale:[{scale:L()}],"scale-x":[{"scale-x":L()}],"scale-y":[{"scale-y":L()}],"scale-z":[{"scale-z":L()}],"scale-3d":["scale-3d"],skew:[{skew:z()}],"skew-x":[{"skew-x":z()}],"skew-y":[{"skew-y":z()}],transform:[{transform:[Pw,Cw,"","none","gpu","cpu"]}],"transform-origin":[{origin:b()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:F()}],"translate-x":[{"translate-x":F()}],"translate-y":[{"translate-y":F()}],"translate-z":[{"translate-z":F()}],"translate-none":["translate-none"],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Pw,Cw]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Pw,Cw]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[bw,Lw,Rw,Ow]}],stroke:[{stroke:["none",...T()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}));window.wp.blocks;var Jw=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"utm_medium";try{var r=new URL(e);return r.searchParams.set(n,t),r.toString()}catch(t){return console.error("Invalid URL:",t),e}},ex=function(){return Xw(me.apply(void 0,arguments))};void 0===window._srfmSlugAutoLabels&&(window._srfmSlugAutoLabels=new Map),window._srfmSlugAutoLabels;const tx=o.p+"images/stripe-logo.77640e72.png",nx=function(e){var t,n=e.payments,r=void 0===n?[]:n,o=e.selectedRows,i=void 0===o?[]:o,a=e.onSelectRow,s=e.onSelectAll,l=e.onView,c=e.onDelete,u=e.isLoading,d=void 0!==u&&u,f=e.currentPage,m=void 0===f?1:f,h=e.totalPages,p=void 0===h?0:h,g=e.itemsPerPage,y=void 0===g?10:g,v=e.onPageChange,b=e.onItemsPerPageChange;return React.createElement("div",{className:"overflow-x-auto"},React.createElement(zv,{className:"w-full",checkboxSelection:!0},(t=(0,ud.applyFilters)("srfm_payment_admin_table_head_content",[{key:"order_id",title:(0,_u.__)("Order ID","sureforms"),className:"w-[22%]"},{key:"customer_email",title:(0,_u.__)("Customer Email","sureforms"),className:"w-[18%]"},{key:"type",title:(0,_u.__)("Type","sureforms")},{key:"payment_method",title:(0,_u.__)("Payment Method","sureforms")},{key:"amountPaid",title:(0,_u.__)("Amount","sureforms")},{key:"status",title:(0,_u.__)("Status","sureforms")},{key:"dateTime",title:(0,_u.__)("Transaction Date","sureforms")},{key:"actions",title:(0,_u.__)("Actions","sureforms"),className:"text-right"}]),React.createElement(zv.Head,{onChangeSelection:s,indeterminate:i.length>0&&i.length<r.length,selected:i.length>0},t.map((function(e){return React.createElement(zv.HeadCell,{key:e.key,className:ex(e.className,"whitespace-nowrap")},e.title)})))),React.createElement(zv.Body,null,d?Array.from({length:10},(function(e,t){return React.createElement(zv.Row,{key:"skeleton-".concat(t),className:"[&_div:has(label)]:invisible"},Array.from({length:8},(function(e,t){return React.createElement(zv.Cell,{key:t},0===t&&React.createElement(Hv,{className:"absolute left-3.5 size-4 rounded-md"}),React.createElement(Hv,{variant:"rectangular",className:"h-4 rounded-md w-28"}))})))})):r.map((function(e){var t=React.createElement("div",{className:"flex items-center justify-end gap-2"},React.createElement(Wv,{arrow:!0,content:React.createElement("span",null,(0,_u.__)("View Form","sureforms")),placement:"top",variant:"dark",triggers:["hover","focus"],tooltipPortalId:"srfm-settings-container",interactive:!0,className:"z-999999"},React.createElement(xe,{variant:"ghost",size:"sm",tag:"a",href:e.form_url,target:"_blank",rel:"noopener noreferrer",className:"p-0"},React.createElement(ob,{className:"w-4 h-4"}))),React.createElement(Wv,{arrow:!0,content:React.createElement("span",null,(0,_u.__)("Remove Transaction","sureforms")),placement:"top",variant:"dark",triggers:["hover","focus"],tooltipPortalId:"srfm-settings-container",interactive:!0,className:"z-999999"},React.createElement(xe,{variant:"ghost",size:"sm",onClick:function(){return c(e.id)},className:"p-0"},React.createElement(pd,{className:"w-4 h-4"})))),n="active"===e.status?"succeeded":e.status,r=React.createElement(op,{label:kv(n),variant:Mv(n),size:"xs",className:"w-fit",disableHover:!0}),o="neutral";"subscription"===e.type?o="blue":"renewal"===e.type&&(o="purple");var s=React.createElement(op,{label:e.payment_type,variant:o,size:"xs",className:"w-fit",disableHover:!0}),u="partially_refunded"===e.status&&e.refunded_amount&&parseFloat(e.refunded_amount)>0,d=parseFloat(e.total_amount||e.amount),f=d-parseFloat(e.refunded_amount||0),m=u?React.createElement(Dv,{amount:d,partialAmount:f,currency:e.currency}):Ev(d,e.currency),h=jv(e);h=React.createElement(xe,{tag:"a",variant:"ghost",size:"sm",className:"p-0 text-text-secondary text-sm weight-medium font-normal no-underline hover:text-link-primary hover:underline",href:"subscription"===e.type?"/payment/".concat(e.id,"?type=subscription"):"/payment/".concat(e.id),onClick:function(t){t.ctrlKey||t.metaKey||2===t.which||(t.preventDefault(),l({id:e.id,type:e.type}))}},h);var p=React.createElement(Wv,{arrow:!0,content:React.createElement("span",null,Nv(e.datetime,!0)),placement:"top",variant:"dark",triggers:["hover","focus"],tooltipPortalId:"srfm-settings-container",interactive:!0,className:"z-999999"},React.createElement("span",null,Nv(e.datetime))),g=React.createElement("img",{src:tx,alt:(0,_u.__)("Stripe","sureforms"),className:"w-[36px]"}),y=(0,ud.applyFilters)("srfm_payment_admin_table_row_content",[{key:"order_id",content:h},{key:"customer_email",content:e.customer_email,className:"text-wrap break-words"},{key:"type",content:s},{key:"payment_method",content:g},{key:"amountPaid",content:m},{key:"status",content:r},{key:"dateTime",content:p},{key:"actions",content:t}],e);return React.createElement(zv.Row,{key:e.id,selected:i.includes(e.id),onChangeSelection:function(){return a(e.id)},value:e.id},y.map((function(e){return React.createElement(zv.Cell,{key:e.key,className:e.className},e.content)})))}))),React.createElement(zv.Footer,{className:"flex items-center justify-between"},d?React.createElement(React.Fragment,null,React.createElement(Hv,{className:"h-8 w-32 rounded-md"}),React.createElement(Hv,{className:"h-8 w-40 rounded-md"})):React.createElement(React.Fragment,null,React.createElement("div",{className:"text-sm font-normal text-text-secondary whitespace-nowrap flex items-center gap-2"},React.createElement("div",null,(0,_u.__)("Page","sureforms")," ",m," ",(0,_u.__)("out of","sureforms")," ",p),React.createElement("div",null,React.createElement(pp,{value:y,onChange:b,size:"sm"},React.createElement(pp.Button,{className:"w-16 h-[1.75rem]"},(function(e){return e.value||y})),React.createElement(pp.Options,null,[10,20,50,100].map((function(e){return React.createElement(pp.Option,{key:e,value:e},e)})))))),React.createElement("div",{className:"flex items-center space-x-2"},React.createElement(Zv,{size:"sm"},React.createElement(Zv.Content,{className:"[&>li]:m-0"},React.createElement(Zv.Previous,{tag:"button",onClick:function(){return v(Math.max(m-1,1))},disabled:1===m,className:ex(1===m&&"opacity-50 text-text-tertiary cursor-not-allowed")}),function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(n+5>=t)return Array.from({length:t},(function(e,t){return t+1}));var r=Math.max(e-n,1),o=Math.min(e+n,t),i=r>2,a=o<t-2,s=1,l=t;if(!i&&a){var c=3+2*n,u=Array.from({length:c},(function(e,t){return t+1}));return[].concat(u,["ellipsis",t])}if(i&&!a){var d=3+2*n,f=Array.from({length:d},(function(e,n){return t-d+(n+1)}));return[s,"ellipsis"].concat(f)}if(i&&a){var m=Array.from({length:o-r+1},(function(e,t){return r+t}));return[s,"ellipsis"].concat(m,["ellipsis",l])}return[]}(m,p,1).map((function(e,t){return"ellipsis"===e?React.createElement(Zv.Ellipsis,{key:"ellipsis-".concat(t)}):React.createElement(Zv.Item,{key:e,isActive:m===e,onClick:function(){return v(e)}},e)})),React.createElement(Zv.Next,{tag:"button",onClick:function(){return v(Math.min(m+1,p))},disabled:m===p,className:ex(m===p&&"opacity-50 text-text-tertiary cursor-not-allowed")}))))))))},rx=(0,d.createContext)({}),ox=()=>(0,d.useContext)(rx),ix={open:{opacity:1},exit:{opacity:0}},ax={duration:.2},sx=({open:e,setOpen:t,children:n,trigger:r=null,className:o,exitOnClickOutside:i=!1,exitOnEsc:a=!0,design:s="simple",scrollLock:l=!0})=>{const c=void 0!==e&&void 0!==t,[f,m]=(0,d.useState)(!1),h=(0,d.useRef)(null),p=(0,d.useRef)(null),g=(0,d.useMemo)((()=>c?e:f),[e,f]),y=(0,d.useMemo)((()=>c?t:m),[m,t]),{refs:v,context:b}=_h({open:g,onOpenChange:y}),w=Ch(b),x=Ih(b,{enabled:i||a,escapeKey:a,outsidePress:e=>!!i&&!e?.target?.closest("ul.fui-toast-container")}),M=qh(b,{role:"dialog"}),{getFloatingProps:E}=Fh([w,x,M]),N=()=>{g||y(!0)},k=(0,d.useCallback)((()=>(0,d.isValidElement)(r)?(0,d.cloneElement)(r,{onClick:pe(N,r?.props?.onClick),ref:v.setReference,"aria-haspopup":"dialog","aria-expanded":g}):"function"==typeof r?r({onClick:N}):null),[r,N,v.setReference,g]);return(0,u.jsxs)(u.Fragment,{children:[k(),(0,u.jsx)(rx.Provider,{value:{open:g,setOpen:y,handleClose:()=>{g&&y(!1)},design:s,context:b,getFloatingProps:E,refs:v,dialogContainerRef:p,dialogRef:h,scrollLock:l,className:o},children:n})]})};sx.displayName="Dialog";const lx=({children:e,className:t})=>{const{open:n,handleClose:r,context:o,getFloatingProps:i,dialogRef:a,scrollLock:s,dialogContainerRef:l,className:c,refs:d}=ox();return(0,u.jsx)(qe,{children:n&&(0,u.jsx)(Dh,{ref:l,lockScroll:s,className:he("z-999999",c),"aria-modal":"true",children:(0,u.jsx)(Nh,{context:o,...d?.reference&&{returnFocus:d.reference},children:(0,u.jsx)(fl.div,{className:"fixed inset-0 overflow-y-auto",initial:"exit",animate:"open",exit:"exit",variants:ix,role:"dialog","aria-modal":"true",transition:ax,children:(0,u.jsx)("div",{className:"flex items-center justify-center min-h-full",children:(0,u.jsx)("div",{ref:e=>{e&&(a.current=e,o&&o.refs.setFloating(e))},...i?.(),className:he("flex flex-col gap-5 w-120 h-fit bg-background-primary border border-solid border-border-subtle rounded-xl shadow-soft-shadow-2xl my-5 overflow-hidden",t),children:"function"==typeof e?e({close:r}):e})})})})})})};lx.displayName="Dialog.Panel";const cx=({children:e,...t})=>(0,u.jsx)(gh,{...t,children:e});cx.displayName="Dialog.Portal";const ux=({className:e,...t})=>{const{open:n,dialogContainerRef:r}=ox();return r?.current?(0,u.jsx)(u.Fragment,{children:(0,Ae.createPortal)((0,u.jsx)(qe,{children:n&&(0,u.jsx)(fl.div,{className:he("fixed inset-0 -z-10 bg-background-inverse/90",e),...t,initial:"exit",animate:"open",exit:"exit",variants:ix,transition:ax})}),r.current)}):null};ux.displayName="Dialog.Backdrop";const dx=({children:e,className:t,...n})=>(0,u.jsx)("div",{className:he("space-y-2 px-5 pt-5 pb-1",t),...n,children:e});dx.displayName="Dialog.Header";const fx=({children:e,as:t="h3",className:n,...r})=>(0,u.jsx)(t,{className:he("text-base font-semibold text-text-primary m-0 p-0",n),...r,children:e});fx.displayName="Dialog.Title";const mx=({children:e,as:t="p",className:n,...r})=>(0,u.jsx)(t,{className:he("text-sm font-normal text-text-secondary my-0 ml-0 mr-1 p-0",n),...r,children:e});mx.displayName="Dialog.Description";const hx=({className:e,...t})=>(0,u.jsx)("button",{className:he("bg-transparent inline-flex justify-center items-center border-0 p-1 m-0 cursor-pointer focus:outline-none outline-none shadow-none",e),"aria-label":"Close dialog",...t,children:(0,u.jsx)(y,{className:"size-4 text-text-primary shrink-0"})}),px=({children:e,as:t=d.Fragment,...n})=>{const{handleClose:r}=ox();return e?t===d.Fragment?"function"==typeof e?e({close:r}):(0,d.cloneElement)(e,{onClick:r}):(0,u.jsx)(t,{...n,onClick:r,"aria-label":"Close dialog",children:e}):(0,u.jsx)(hx,{onClick:r,...n})};px.displayName="Dialog.CloseButton";const gx=({children:e,className:t,...n})=>(0,u.jsx)("div",{className:he("px-5",t),...n,children:e});gx.displayName="Dialog.Body";const yx=({children:e,className:t})=>{const{design:n,handleClose:r}=ox();return(0,u.jsx)("div",{className:he("p-4 flex justify-end gap-3",{"bg-background-secondary":"footer-divided"===n},t),children:e?"function"==typeof e?e({close:r}):e:null})};yx.displayName="Dialog.Footer",sx.Panel=lx,sx.Portal=cx,sx.Title=fx,sx.Description=mx,sx.CloseButton=px,sx.Header=dx,sx.Body=gx,sx.Footer=yx,sx.Backdrop=ux;var vx=o(5556),bx=o.n(vx);function wx(e){return wx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wx(e)}function xx(){xx=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function l(e,t,n,r){return Object.defineProperty(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r})}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function c(t,n,r,o){var i=n&&n.prototype instanceof f?n:f,a=Object.create(i.prototype);return l(a,"_invoke",function(t,n,r){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var l=x(s,r);if(l){if(l===d)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(1===o)throw o=4,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=3;var c=u(t,n,r);if("normal"===c.type){if(o=r.done?4:2,c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=4,r.method="throw",r.arg=c.arg)}}}(t,r,new N(o||[])),!0),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var d={};function f(){}function m(){}function h(){}var p={};l(p,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(k([])));y&&y!==n&&r.call(y,i)&&(p=y);var v=h.prototype=f.prototype=Object.create(p);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function n(o,i,a,s){var l=u(e[o],e,i);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==wx(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;l(this,"_invoke",(function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}),!0)}function x(t,n){var r=n.method,o=t.i[r];if(o===e)return n.delegate=null,"throw"===r&&t.i.return&&(n.method="return",n.arg=e,x(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=u(o,t.i,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,d;var a=i.arg;return a?a.done?(n[t.r]=a.value,n.next=t.n,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function M(e){this.tryEntries.push(e)}function E(t){var n=t[4]||{};n.type="normal",n.arg=e,t[4]=n}function N(e){this.tryEntries=[[-1]],e.forEach(M,this),this.reset(!0)}function k(t){if(null!=t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(wx(t)+" is not iterable")}return m.prototype=h,l(v,"constructor",h),l(h,"constructor",m),m.displayName=l(h,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,s,"GeneratorFunction")),e.prototype=Object.create(v),e},t.awrap=function(e){return{__await:e}},b(w.prototype),l(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new w(c(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},b(v),l(v,s,"Generator"),l(v,i,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},t.values=k,N.prototype={constructor:N,reset:function(t){if(this.prev=this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(E),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0][4];if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(e){a.type="throw",a.arg=t,n.next=e}for(var o=n.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],s=this.prev,l=i[1],c=i[2];if(-1===i[0])return r("end"),!1;if(!l&&!c)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=s){if(s<l)return this.method="next",this.arg=e,r(l),!0;if(s<c)return r(c),!1}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r[0]>-1&&r[0]<=this.prev&&this.prev<r[2]){var o=r;break}}o&&("break"===e||"continue"===e)&&o[0]<=t&&t<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o[2],d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n[2]===e)return this.complete(n[4],n[3]),E(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n[0]===e){var r=n[4];if("throw"===r.type){var o=r.arg;E(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={i:k(t),r:n,n:r},"next"===this.method&&(this.arg=e),d}},t}function Mx(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function Ex(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Nx(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Nx(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var kx=function(e){var t=e.isOpen,n=e.title,r=e.description,o=e.onConfirm,i=void 0===o?function(){}:o,s=e.onCancel,l=void 0===s?function(){}:s,c=e.confirmButtonText,u=void 0===c?(0,_u.__)("Confirm","sureforms"):c,d=e.cancelButtonText,f=void 0===d?(0,_u.__)("Cancel","sureforms"):d,m=e.destructiveConfirmButton,h=void 0===m||m,p=e.requireConfirmation,g=void 0!==p&&p,y=e.verificationText,v=void 0===y?(0,_u.__)("delete","sureforms"):y,b=e.afterOpenBody,w=void 0===b?null:b,x=e.beforeClosingBody,M=void 0===x?null:x,E=v||(0,_u.__)("delete","sureforms"),N=Ex((0,a.useState)(""),2),k=N[0],j=N[1],D=Ex((0,a.useState)(""),2),T=D[0],S=D[1],C=Ex((0,a.useState)(!1),2),R=C[0],O=C[1],A=(0,a.useRef)(!0);(0,a.useEffect)((function(){return A.current=!0,function(){A.current=!1}}),[]);var I=function(){var e=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Mx(i,r,o,a,s,"next",e)}function s(e){Mx(i,r,o,a,s,"throw",e)}a(void 0)}))}}(xx().mark((function e(){return xx().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"==typeof i){e.next=2;break}return e.abrupt("return");case 2:if(!g||_(!0)){e.next=4;break}return e.abrupt("return");case 4:return O(!0),e.prev=5,e.next=8,i();case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.error("Confirmation dialog error:",e.t0);case 13:return e.prev=13,A.current&&O(!1),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[5,10,13,16]])})));return function(){return e.apply(this,arguments)}}(),_=function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return k.toLowerCase()!==E.toLowerCase()?(t&&(null===(e=document.querySelector('input[name="delete-confirmation-text"]'))||void 0===e||e.focus()),S((0,_u.sprintf)((0,_u.__)('Please type "%s" in the input box',"sureforms"),E)),!1):(S(""),!0)};return(0,a.useLayoutEffect)((function(){!t&&g&&(j(""),S(""))}),[t]),React.createElement(sx,{design:"simple",exitOnEsc:!0,scrollLock:!0,setOpen:l,open:t},React.createElement(sx.Backdrop,null),React.createElement(sx.Panel,{className:"gap-0"},React.createElement(sx.Header,null,React.createElement("div",{className:"flex items-center justify-between"},React.createElement(sx.Title,null,n),React.createElement(sx.CloseButton,{onClick:l})),React.createElement(sx.Description,null,r)),g?React.createElement(sx.Body,{className:"mt-3 space-y-3"},w,React.createElement(yp,{className:"text-text-secondary font-normal",tag:"p",variant:"neutral",size:"sm"},(0,_u.sprintf)((0,_u.__)('To confirm, type "%s" in the box below:',"sureforms"),E)),React.createElement("div",null,React.createElement(vp,{ref:function(e){e&&e.focus()},name:"delete-confirmation-text",size:"md",type:"text",placeholder:(0,_u.sprintf)((0,_u.__)('Type "%s"',"sureforms"),E),className:"w-full",value:k,onChange:function(e){j(e),g&&T&&S("")},error:T,autoComplete:"off"})),M):null,React.createElement(sx.Footer,null,React.createElement(xe,{variant:"outline",onClick:function(){"function"==typeof l&&l()}},f),React.createElement(xe,{variant:"primary",onClick:I,icon:R?React.createElement(ap,{className:"text-background-primary"}):null,iconPosition:"left",loading:R,destructive:h},u))))};kx.propTypes={isOpen:bx().bool.isRequired,title:bx().string.isRequired,description:bx().oneOfType([bx().string,bx().element]).isRequired,onConfirm:bx().func,onCancel:bx().func,confirmButtonText:bx().string,cancelButtonText:bx().string,destructiveConfirmButton:bx().bool,requireConfirmation:bx().bool,verificationText:bx().string};const jx=kx,Dx=hd("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),Tx=function(){var e,t,n,r=(null===(e=window.srfm_admin)||void 0===e||null===(e=e.payments)||void 0===e?void 0:e.stripe_connected)||!1,o=(0,ud.applyFilters)("srfm_payment_gateway_configured",r,(null===(t=window.srfm_admin)||void 0===t?void 0:t.payments)||{}),i=o?(0,_u.__)("No payments yet","sureforms"):(0,_u.__)("Turn Your Forms Into Checkout 💰","sureforms"),a=o?(0,_u.__)("It's quiet here because no one has made a payment yet. Once you receive payments, this page will let you:","sureforms"):(0,_u.__)("Activate payments and start accepting money for services, donations, products, and more.","sureforms"),s=[(0,_u.__)("Collect simple payments without heavy eCommerce plugins","sureforms"),(0,_u.__)("Accept single payments or subscriptions quickly","sureforms"),(0,_u.__)("Free to start: no extra plugins needed!","sureforms")];return React.createElement("div",{className:ex("srfm-single-payment-wrapper min-h-screen bg-background-secondary px-8 pb-8",!(null!==(n=window.srfm_admin)&&void 0!==n&&null!==(n=n.notices)&&void 0!==n&&n.length)&&"pt-8")},React.createElement(ld,{containerType:"flex",direction:"column",gap:"xs",className:"w-full bg-background-primary border-0.5 border-solid rounded-xl border-border-subtle p-4 gap-2 shadow-sm"},React.createElement(ld,{containerType:"flex",gap:"xs",className:"w-full bg-background-secondary rounded-xl p-2 shadow-sm"},React.createElement(ld,{containerType:"flex",gap:"xs",className:"w-full bg-background-primary border-0.5 border-solid rounded-xl border-border-subtle p-6 shadow-sm flex items-center gap-6"},React.createElement("div",{className:"min-h-[240px] min-w-[240px] bg-background-secondary"},React.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQwIiBoZWlnaHQ9IjI0MCIgdmlld0JveD0iMCAwIDI0MCAyNDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIyNDAiIGhlaWdodD0iMjQwIiByeD0iMTIiIGZpbGw9IiNGQ0YwRTEiLz4KPHBhdGggZD0iTTE5MC41MDEgNjcuNjcxMUwxODEuODQzIDE1NS43MThDMTgxLjUzNiAxNTguNjA0IDE3OC45NTggMTYwLjc1MyAxNzYuMDcyIDE2MC40NDZMMTU2LjkxNSAxNTguNTQyTDMwLjE4NjcgMTQ2LjA3OEMyNy4zMDA5IDE0NS43NzEgMjUuMTUxOSAxNDMuMTkzIDI1LjQ1ODkgMTQwLjMwN0wzNC4xMTYyIDUyLjE5ODRDMzQuNDIzMiA0OS4zMTI2IDM3LjAwMiA0Ny4xNjM2IDM5Ljg4NzggNDcuNDcwNkwxMDkuODIyIDU0LjM0NzRMMTg1Ljc3MyA2MS44MzgxQzE4OC42NTkgNjIuMTQ1MSAxOTAuODA4IDY0Ljc4NTMgMTkwLjUwMSA2Ny42NzExWiIgZmlsbD0iIzQzMTQwNyIvPgo8cGF0aCBkPSJNMTc2LjU2MiAxNjAuODc2QzE3Ni4zNzggMTYwLjg3NiAxNzYuMTkzIDE2MC44NzYgMTc2LjAwOSAxNjAuODc2TDMwLjEyMzkgMTQ2LjUwOUMyNi45OTI2IDE0Ni4yMDIgMjQuNzIwOCAxNDMuNDM5IDI1LjAyNzggMTQwLjMwOEwzMy42ODUxIDUyLjI2MDdDMzMuOTkyMSA0OS4xMjkzIDM2Ljc1NTEgNDYuODU3NSAzOS44ODY1IDQ3LjE2NDVMMTg1Ljc3MiA2MS41MzJDMTg4Ljg0MiA2MS44MzkgMTkxLjExMyA2NC42MDIgMTkwLjg2OCA2Ny42NzE5TDE4Mi4yMTEgMTU1Ljc4QzE4MS45MDQgMTU4LjY2NiAxNzkuNTA5IDE2MC44NzYgMTc2LjU2MiAxNjAuODc2Wk0zOS4zMzM5IDQ3LjkwMTNDMzYuODE2NSA0Ny45MDEzIDM0LjcyODkgNDkuODA0NyAzNC40ODMzIDUyLjMyMjFMMjUuODI2IDE0MC4zNjlDMjUuNTgwNCAxNDMuMDcxIDI3LjU0NTIgMTQ1LjQ2NSAzMC4yNDY3IDE0NS43MTFMMTc2LjEzMiAxNjAuMDc4QzE3OC44MzQgMTYwLjMyNCAxODEuMjI4IDE1OC4zNTkgMTgxLjQ3NCAxNTUuNjU4TDE5MC4xMzEgNjcuNjEwNUMxOTAuMzc3IDY0LjkwOSAxODguNDEyIDYyLjUxNDQgMTg1LjcxIDYyLjI2ODhMMzkuODI1MSA0Ny45MDEzQzM5LjcwMjMgNDcuOTAxMyAzOS41MTgxIDQ3LjgzOTkgMzkuMzMzOSA0Ny45MDEzWiIgZmlsbD0iIzQzMTQwNyIvPgo8cGF0aCBkPSJNMTM5Ljg0MiAxNjYuODkyQzE0Mi4yOTggMTY3LjA3NiAxNDQuMjYzIDE2NC40OTcgMTQ1Ljc5OCAxNjIuMTY0QzE0My43NzEgMTY1LjIzNCAxNDYuNDEyIDE2OS42NTUgMTQ4LjY4MyAxNzEuNjgxQzE1MC42NDggMTczLjMzOSAxNTIuOTIgMTc0LjYyOCAxNTUuMzE0IDE3NS40ODhDMTU5LjEyMSAxNzcuMDIzIDE2My4xNzQgMTc3Ljc2IDE2Ny4yMjYgMTc3LjY5OEMxNzEuMzQgMTc3LjU3NSAxNzUuMjY5IDE3Ni4yMjUgMTc4LjU4NSAxNzMuNzY5QzE4Mi4zOTIgMTcwLjgyMiAxODQuNzg2IDE2Ni4yNzggMTg1LjU4NCAxNjEuNTVDMTg2LjI2IDE1Ni43NjEgMTg1Ljc2OSAxNTEuOTEgMTg0LjA0OSAxNDcuMzY3QzE4My42MiAxNDUuODkzIDE4Mi44ODMgMTQ0LjU0MyAxODEuOSAxNDMuMzc2QzE4MC40ODggMTQxLjk2NCAxNzguNzA4IDE0MC45MiAxNzYuODA0IDE0MC40MjlDMTc0LjIyNSAxMzkuNjMxIDE3MS40NjIgMTM5LjIwMSAxNjguNzYxIDEzOS4yMDFDMTY0Ljk1NCAxMzkuMjAxIDE2Mi4yNTMgMTM4Ljk1NSAxNTguODE0IDEzNy4zNTlDMTU2LjE3NCAxMzYuMDY5IDE1My40MTEgMTM1LjA4NyAxNTAuNTI1IDEzNC4zNUMxNDUuMTg0IDEzMy4wNjEgMTM4LjU1MiAxMzMuMTIyIDEzNi4yODEgMTM5LjA3OEMxMzQuMDA5IDE0NC45NzIgMTMxLjU1MyAxNjYuMjc4IDEzOS44NDIgMTY2Ljg5MloiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0xNjYuMzA1IDE3OC4xMjhDMTYyLjQ5OCAxNzguMDY3IDE1OC42OTEgMTc3LjMzIDE1NS4xOTIgMTc1LjkxOEMxNTIuNzM2IDE3NS4wNTggMTUwLjQwMiAxNzMuNzY5IDE0OC40MzggMTcyLjA1QzE0Ni42NTcgMTcwLjQ1MyAxNDQuNTcgMTY3LjM4MyAxNDQuNjkyIDE2NC40OThDMTQzLjI4IDE2Ni4yMTcgMTQxLjc0NSAxNjcuNDQ1IDEzOS44NDIgMTY3LjMyMkMxMzguMTg0IDE2Ny4xOTkgMTM2LjcxIDE2Ni4yMTcgMTM1Ljg1MSAxNjQuODA1QzEzMi4wNDQgMTU4Ljg0OSAxMzQuMDA5IDE0My45MjkgMTM1Ljg1MSAxMzkuMDE3QzEzOC40MyAxMzIuMjAxIDE0Ni4xNjYgMTMyLjkzOCAxNTAuNTg3IDEzMy45ODJDMTUzLjQ3MiAxMzQuNzE5IDE1Ni4yMzUgMTM1LjcwMSAxNTguOTM3IDEzNi45OTFDMTYyLjI1MyAxMzguNTI2IDE2NC44MzEgMTM4Ljc3MSAxNjguNyAxMzguNzcxSDE2OC43NjFDMTcxLjUyNCAxMzguNzcxIDE3NC4yMjYgMTM5LjIwMSAxNzYuODY2IDE0MC4wNjFDMTc5LjMyMiAxNDAuODU5IDE4MC45NzkgMTQxLjg0MSAxODIuMTQ2IDE0My4xMzFDMTgzLjEyOCAxNDQuMzU5IDE4My44NjUgMTQ1Ljc3MSAxODQuMzU2IDE0Ny4yNDRDMTg2LjA3NiAxNTEuODQ5IDE4Ni42MjggMTU2Ljc2MSAxODUuODkxIDE2MS42MTJDMTg1LjE1NSAxNjYuNTI0IDE4Mi41NzYgMTcwLjk0NSAxNzguNzY5IDE3NC4xMzdDMTc1LjM5MiAxNzYuNjU1IDE3MS4zNCAxNzguMDA2IDE2Ny4xNjUgMTc4LjEyOEMxNjYuOTE5IDE3OC4wNjcgMTY2LjYxMiAxNzguMTI4IDE2Ni4zMDUgMTc4LjEyOFpNMTQ2LjE2NiAxNjIuMzQ5QzE0NC4zMjQgMTY1LjExMiAxNDYuNzE5IDE2OS4yODcgMTQ4LjkyOSAxNzEuMzc0QzE1MC44MzIgMTczLjAzMiAxNTMuMDQzIDE3NC4yNiAxNTUuNDM3IDE3NS4wNThDMTU5LjE4MyAxNzYuNTMyIDE2My4xNzQgMTc3LjI2OSAxNjcuMTY1IDE3Ny4yMDdDMTcxLjE1NiAxNzcuMTQ2IDE3NS4wODUgMTc1Ljc5NSAxNzguMjc4IDE3My40MDFDMTgxLjc3OCAxNzAuNjM4IDE4NC4yOTUgMTY2LjI3OCAxODUuMDkzIDE2MS40MjhDMTg1Ljc2OSAxNTYuNyAxODUuMjc3IDE1MS45MTEgMTgzLjU1OCAxNDcuNDI5QzE4My4xMjggMTQ2LjAxNiAxODIuMzkyIDE0NC43MjcgMTgxLjQ3MSAxNDMuNTZDMTgwLjM2NSAxNDIuMzMyIDE3OC44MyAxNDEuNDExIDE3Ni41NTkgMTQwLjczNkMxNzQuMDQxIDEzOS45MzggMTcxLjM0IDEzOS41MDggMTY4LjcgMTM5LjUwOEgxNjguNTE1QzE2NC43MDkgMTM5LjUwOCAxNjEuOTQ2IDEzOS4yMDEgMTU4LjYzIDEzNy42NjZDMTU1Ljk5IDEzNi40MzggMTUzLjIyNyAxMzUuNDU2IDE1MC40MDIgMTM0LjcxOUMxNDYuMjg5IDEzMy43MzYgMTM5LjA0NCAxMzMgMTM2LjY0OSAxMzkuMjAxQzEzNC44NjggMTQzLjg2NyAxMzIuOTA0IDE1OC42MDMgMTM2LjUyNiAxNjQuMjUyQzEzNy4yMDIgMTY1LjQ4IDEzOC40MyAxNjYuMjc4IDEzOS44NDIgMTY2LjQwMUMxNDIuMDUyIDE2Ni41MjQgMTQzLjgzMyAxNjQuMzEzIDE0NS40MjkgMTYxLjg1N0MxNDUuNTUyIDE2MS42NzMgMTQ1Ljg1OSAxNjEuNjczIDE0Ni4wNDMgMTYxLjc5NkMxNDYuMjI3IDE2MS45OCAxNDYuMjI3IDE2Mi4xNjQgMTQ2LjE2NiAxNjIuMzQ5WiIgZmlsbD0iIzQzMTQwNyIvPgo8cGF0aCBkPSJNMTM4LjMwOSAyMTEuMzQ4SDE5Ni41MTVDMjAzLjA4NSAxOTIuMDA3IDIxNC44MTIgMTU3LjAwOSAyMTQuNjI4IDE1NC44NkMyMTQuMzgzIDE1MS45MTMgMTkyLjg5MyAxMTAuMjg0IDE4My42MjIgMTAzLjcxNEMxNzQuMzUgOTcuMTQ0NSAxNTcuMTU4IDEwOC45MzMgMTU3LjE1OCAxMDguOTMzTDE1OS40MyAxMjUuOTQxTDE3My40OTEgMTI0LjgzNkwxNzYuMzE1IDE1MC4yNTVDMTc2LjMxNSAxNTAuMjU1IDE2Mi44NjggMTUwLjQzOSAxNTYuMDUzIDE1NC45ODNDMTQ5LjIzOCAxNTkuNTI2IDEzOS41MzcgMTc0LjI2MiAxMzguMzcgMTgzLjk2M0MxMzcuMjAzIDE5My42NjUgMTM4LjM3IDIwNS4yNjkgMTM4LjM3IDIwNS4yNjlMMTM4LjMwOSAyMTEuMzQ4WiIgZmlsbD0id2hpdGUiLz4KPHBhdGggZD0iTTE5Ni40NTIgMjExLjcxNUgxMzguMjQ1QzEzOCAyMTEuNzE1IDEzNy44MTUgMjExLjUzMSAxMzcuODE1IDIxMS4yODVWMjA1LjA4NEMxMzcuODE1IDIwNS4wMjIgMTM2LjcxIDE5My40MTggMTM3LjgxNSAxODMuNzE3QzEzOC45ODIgMTczLjc3IDE0OC43NDUgMTU5LjA5NSAxNTUuNjgzIDE1NC40MjlDMTYxLjg4NCAxNTAuMzE1IDE3My4yNDMgMTQ5Ljc2MyAxNzUuNjk5IDE0OS42NEwxNzIuOTk3IDEyNS4wOEwxNTkuMzY3IDEyNi4xODVDMTU5LjEyMSAxMjYuMTg1IDE1OC45MzcgMTI2LjA2MiAxNTguOTM3IDEyNS44MTdMMTU2LjY2NSAxMDguODA5QzE1Ni42NjUgMTA4LjYyNSAxNTYuNzI2IDEwOC41MDIgMTU2Ljg0OSAxMDguNDQxQzE1OS45MTkgMTA2LjQxNSAxNjMuMjM1IDEwNC42OTUgMTY2LjY3MyAxMDMuMzQ1QzE3My45OCAxMDAuNTIgMTc5Ljg3NCAxMDAuNDU5IDE4My44MDQgMTAzLjI4M0MxOTMuMDE0IDEwOS43OTEgMjE0Ljc0OSAxNTEuNTQzIDIxNC45OTUgMTU0LjczNkMyMTUuMTc5IDE1Ni44MjQgMjA1LjIzMiAxODYuNjY0IDE5Ni44MiAyMTEuMzQ2QzE5Ni43NTkgMjExLjU5MiAxOTYuNjM2IDIxMS43MTUgMTk2LjQ1MiAyMTEuNzE1Wk0xMzguNzM2IDIxMC45MTdIMTk2LjE0NUMyMDcuNjg4IDE3Ni43NzggMjE0LjI1OCAxNTYuMzk0IDIxNC4xMzUgMTU0LjkyQzIxMy44ODkgMTUxLjc4OSAxOTIuNCAxMTAuNTI4IDE4My4zMTIgMTA0LjA4MUMxNzQuOTAxIDk4LjEyNTYgMTU5LjQ4OSAxMDcuODI3IDE1Ny41MjUgMTA5LjE3OEwxNTkuNjc0IDEyNS41MUwxNzMuMzA0IDEyNC40MDVDMTczLjU1IDEyNC40MDUgMTczLjczNCAxMjQuNTI3IDE3My43MzQgMTI0Ljc3M0wxNzYuNTU5IDE1MC4xOTJDMTc2LjU1OSAxNTAuNDM4IDE3Ni40MzYgMTUwLjYyMiAxNzYuMTkgMTUwLjYyMkMxNzYuMTkgMTUwLjYyMiAxNzYuMTkgMTUwLjYyMiAxNzYuMTI5IDE1MC42MjJDMTc2LjAwNiAxNTAuNjIyIDE2Mi43NDQgMTUwLjg2OCAxNTYuMTEyIDE1NS4yODlDMTQ5LjQ4MSAxNTkuNzA5IDEzOS43MTkgMTc0LjQ0NSAxMzguNjE0IDE4My45NjJDMTM3LjUwOCAxOTMuNDc5IDEzOC42MTQgMjA1LjAyMiAxMzguNjE0IDIwNS4xNDVMMTM4LjczNiAyMTAuOTE3WiIgZmlsbD0iIzQzMTQwNyIvPgo8cGF0aCBkPSJNMjA1LjcyNSA2Ni40NDI1TDE4Ni43NTMgMTUyLjgzMkMxODYuMTM5IDE1NS42NTYgMTgzLjMxNCAxNTcuNDk4IDE4MC40MjggMTU2Ljg4NEwxNjEuNjQgMTUyLjc3TDM3LjI0NDggMTI1LjUwOUMzNC40MjA0IDEyNC44OTUgMzIuNTc4NCAxMjIuMDcgMzMuMTkyNCAxMTkuMjQ2TDUyLjE2NDggMzIuNzk1NUM1Mi43Nzg4IDI5Ljk3MTIgNTUuNjAzMiAyOC4xMjkyIDU4LjQyNzYgMjguNzQzMkwxMjcuMDcyIDQzLjc4NjFMMjAxLjY3MyA2MC4xMTg0QzIwNC40OTcgNjAuNzMyMyAyMDYuMzM5IDYzLjU1NjcgMjA1LjcyNSA2Ni40NDI1WiIgZmlsbD0iI0Y5NzMxNiIvPgo8cGF0aCBkPSJNMTgxLjU5NiAxNTcuNjIyQzE4MS4xNjYgMTU3LjYyMiAxODAuNzM2IDE1Ny41NiAxODAuMzA2IDE1Ny40OTlMMzcuMTIyNyAxMjYuMDYyQzMzLjkyOTkgMTI1LjM4NyAzMS45NjUxIDEyMi4yNTUgMzIuNjQwNSAxMTkuMDYzTDUxLjYxMyAzMi42MTIxQzUyLjI4ODQgMjkuNDgwNyA1NS40MTk3IDI3LjQ1NDUgNTguNTUxMSAyOC4xMjk5TDIwMS43MzUgNTkuNTY2NUMyMDQuODY2IDYwLjI0MTkgMjA2Ljg5MiA2My4zNzMzIDIwNi4yMTcgNjYuNTY2MUwxODcuMzA2IDE1My4wMTdDMTg2Ljc1MyAxNTUuNzE4IDE4NC4zNTkgMTU3LjYyMiAxODEuNTk2IDE1Ny42MjJaTTU3LjM4NDUgMjkuMTczN0M1NS4xNzQxIDI5LjE3MzcgNTMuMjcwOCAzMC43MDg3IDUyLjg0MSAzMi44NTc3TDMzLjg2ODUgMTE5LjMwOEMzMy4zMTU5IDEyMS44MjYgMzQuOTEyMyAxMjQuMzQzIDM3LjQyOTcgMTI0Ljg5NkwxODAuNjEzIDE1Ni4zMzJDMTgzLjEzMSAxNTYuODg1IDE4NS42NDggMTU1LjI4OCAxODYuMjAxIDE1Mi43NzFMMjA1LjE3MyA2Ni4zMjA1QzIwNS43MjYgNjMuODAzMSAyMDQuMTI5IDYxLjI4NTcgMjAxLjYxMiA2MC43MzMxTDU4LjQyODMgMjkuMjk2NUM1OC4wNTk5IDI5LjE3MzcgNTcuNzUyOSAyOS4xNzM3IDU3LjM4NDUgMjkuMTczN1oiIGZpbGw9IiM0MzE0MDciLz4KPHBhdGggZD0iTTY3LjE0NjUgNjguMTAxNUw4Mi4yNTA4IDcxLjQxN0M4My44NDcyIDcxLjc4NTQgODQuODkxIDczLjM4MTggODQuNTIyNiA3NC45NzgyTDgxLjg4MjQgODcuMDczOUM4MS41MTQgODguNjcwMyA3OS45MTc3IDg5LjcxNDEgNzguMzIxMyA4OS4zNDU3TDYzLjIxNyA4Ni4wMzAxQzYxLjYyMDYgODUuNjYxNyA2MC41NzY4IDg0LjA2NTMgNjAuOTQ1MiA4Mi40NjlMNjMuNTg1NCA3MC4zNzMyQzYzLjk1MzggNjguNzc2OCA2NS41NTAyIDY3LjczMzEgNjcuMTQ2NSA2OC4xMDE1WiIgZmlsbD0id2hpdGUiLz4KPHBhdGggZD0iTTY3LjQ1NDcgNjguMjg0OEM2Ny43NjE3IDY4LjI4NDggNjguMDY4NyA2OC4zNDYyIDY4LjM3NTcgNjguNDA3Nkw4MS4xNDY4IDcxLjIzMkM4My40MTg2IDcxLjcyMzIgODQuODMwNyA3My45MzM1IDg0LjMzOTYgNzYuMjA1M0w4Mi4xOTA2IDg1Ljk2NzhDODEuNjk5NCA4OC4yMzk2IDc5LjQ4OSA4OS42NTE4IDc3LjIxNzIgODkuMTYwNkw2NC40NDYxIDg2LjMzNjJDNjIuMTc0MyA4NS44NDUgNjAuNzYyMSA4My42MzQ3IDYxLjI1MzMgODEuMzYyOUw2My40MDIzIDcxLjYwMDNDNjMuNzcwNyA2OS42MzU2IDY1LjQ4OTkgNjguMjg0OCA2Ny40NTQ3IDY4LjI4NDhaTTY3LjQ1NDcgNjcuNjcwOEM2NS4xODI5IDY3LjY3MDggNjMuMjE4MSA2OS4yNjcyIDYyLjcyNjkgNzEuNDc3NUw2MC41Nzc5IDgxLjE3ODdDNjAuMDI1MyA4My43NTc1IDYxLjYyMTcgODYuMzM2MiA2NC4yMDA1IDg2Ljg4ODhDNjQuMjAwNSA4Ni44ODg4IDY0LjIwMDUgODYuODg4OCA2NC4yNjE5IDg2Ljg4ODhMNzcuMDMzIDg5LjcxMzJDNzcuNDAxNCA4OS43NzQ2IDc3LjcwODQgODkuODM2IDc4LjA3NjggODkuODM2QzgwLjM0ODYgODkuODM2IDgyLjMxMzQgODguMjM5NiA4Mi44MDQ2IDg2LjAyOTJMODQuOTUzNSA3Ni4yNjY3Qzg1LjUwNjEgNzMuNjg3OSA4My44NDg0IDcxLjEwOTIgODEuMjY5NiA3MC41NTY2TDY4LjQ5ODUgNjcuNzMyMkM2OC4xMzAxIDY3LjY3MDggNjcuODIzMSA2Ny42MDk0IDY3LjQ1NDcgNjcuNjA5NFY2Ny42NzA4WiIgZmlsbD0iIzQzMTQwNyIvPgo8cGF0aCBkPSJNNzAuODg5MiA2OC45MzY1TDY2Ljk1MzEgODYuODY3Mkw2Ny43OTI3IDg3LjA1MTVMNzEuNzI4NyA2OS4xMjA4TDcwLjg4OTIgNjguOTM2NVoiIGZpbGw9IiNEMUQzRDQiLz4KPHBhdGggZD0iTTc3LjczMjkgNzAuNDI0OEw3My43OTY5IDg4LjM1NTVMNzQuNjM2NCA4OC41Mzk4TDc4LjU3MjUgNzAuNjA5TDc3LjczMjkgNzAuNDI0OFoiIGZpbGw9IiNEMUQzRDQiLz4KPHBhdGggZD0iTTYzLjQ0NiA3MS4xNDQ4TDYzLjI2MTcgNzEuOTg0NEw4NC4xOTA5IDc2LjU3ODZMODQuMzc1MiA3NS43MzkxTDYzLjQ0NiA3MS4xNDQ4WiIgZmlsbD0iI0QxRDNENCIvPgo8cGF0aCBkPSJNNjEuMzAxNSA4MC45MTQzTDYxLjExNzIgODEuNzUzOUw4Mi4wNDYzIDg2LjM0ODJMODIuMjMwNiA4NS41MDg2TDYxLjMwMTUgODAuOTE0M1oiIGZpbGw9IiNEMUQzRDQiLz4KPHBhdGggZD0iTTYyLjc3MDIgNzQuMjU0Mkw2Mi41ODU5IDc1LjA5MzhMNjkuMjQyNSA3Ni41NTVMNjkuNDI2OCA3NS43MTU0TDYyLjc3MDIgNzQuMjU0MloiIGZpbGw9IiNEMUQzRDQiLz4KPHBhdGggZD0iTTYxLjk3NzMgNzcuNzgxNUw2MS43OTMgNzguNjIxMUw2OC40NDk1IDgwLjA4MjNMNjguNjMzOCA3OS4yNDI3TDYxLjk3NzMgNzcuNzgxNVoiIGZpbGw9IiNEMUQzRDQiLz4KPHBhdGggZD0iTTc2LjY4NDMgNzcuMjk3Mkw3Ni41IDc4LjEzNjdMODMuNTc2MyA3OS42OTAxTDgzLjc2MDYgNzguODUwNUw3Ni42ODQzIDc3LjI5NzJaIiBmaWxsPSIjRDFEM0Q0Ii8+CjxwYXRoIGQ9Ik03NS44NzU3IDgwLjg3OTJMNzUuNjkxNCA4MS43MTg4TDgyLjc2NzcgODMuMjcyMUw4Mi45NTIgODIuNDMyNUw3NS44NzU3IDgwLjg3OTJaIiBmaWxsPSIjRDFEM0Q0Ii8+CjxwYXRoIGQ9Ik02MC44MjM0IDkyLjkwNjdMNzYuOTcxNCA5Ni40Njc5Qzc4LjEzOCA5Ni43MTM1IDc4Ljg3NDggOTcuODgwMSA3OC41Njc4IDk4Ljk4NTNMNzguMDE1MiAxMDEuNDQxQzc3Ljc2OTYgMTAyLjYwOCA3Ni42MDMxIDEwMy4zNDUgNzUuNDk3OSAxMDMuMDM4TDU5LjM0OTggOTkuNDc2NUM1OC4xODMyIDk5LjIzMDkgNTcuNDQ2NCA5OC4wNjQzIDU3Ljc1MzQgOTYuOTU5MUw1OC4zMDYgOTQuNTAzMUM1OC41NTE2IDkzLjM5NzkgNTkuNzE4MiA5Mi42NjExIDYwLjgyMzQgOTIuOTA2N1oiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik04OC4yMDYyIDk4LjkyMjNMMTA0LjM1NCAxMDIuNDg0QzEwNS41MjEgMTAyLjcyOSAxMDYuMjU4IDEwMy44OTYgMTA1Ljk1MSAxMDUuMDAxTDEwNS4zOTggMTA3LjQ1N0MxMDUuMTUyIDEwOC42MjMgMTAzLjk4NiAxMDkuMzYgMTAyLjg4MSAxMDkuMDUzTDg2LjczMjYgMTA1LjQ5MkM4NS41NjYgMTA1LjI0NiA4NC44MjkyIDEwNC4wOCA4NS4xMzYyIDEwMi45NzVMODUuNjg4OCAxMDAuNTE5Qzg1Ljg3MyA5OS40MTM1IDg3LjAzOTYgOTguNjc2NyA4OC4yMDYyIDk4LjkyMjNaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNMTE1LjUzIDEwNC45NDFMMTMxLjY3OCAxMDguNTAyQzEzMi44NDUgMTA4Ljc0OCAxMzMuNTgyIDEwOS45MTQgMTMzLjI3NSAxMTEuMDE5TDEzMi43MjIgMTEzLjQ3NUMxMzIuNDc3IDExNC42NDIgMTMxLjMxIDExNS4zNzkgMTMwLjIwNSAxMTUuMDcyTDExNC4wNTcgMTExLjUxMUMxMTIuODkgMTExLjI2NSAxMTIuMTUzIDExMC4wOTggMTEyLjQ2IDEwOC45OTNMMTEzLjAxMyAxMDYuNTM3QzExMy4xOTcgMTA1LjM3MSAxMTQuMzY0IDEwNC42OTUgMTE1LjUzIDEwNC45NDFaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNMTQyLjg1MSAxMTAuODk1TDE1OC45OTkgMTE0LjQ1NkMxNjAuMTY1IDExNC43MDIgMTYwLjkwMiAxMTUuODY4IDE2MC41OTUgMTE2Ljk3NEwxNjAuMDQzIDExOS40M0MxNTkuNzk3IDEyMC41OTYgMTU4LjYzIDEyMS4zMzMgMTU3LjUyNSAxMjEuMDI2TDE0MS4zNzcgMTE3LjQ2NUMxNDAuMjExIDExNy4yMTkgMTM5LjQ3NCAxMTYuMDUzIDEzOS43ODEgMTE0Ljk0N0wxNDAuMzMzIDExMi40OTFDMTQwLjUxOCAxMTEuMzg2IDE0MS42ODQgMTEwLjY0OSAxNDIuODUxIDExMC44OTVaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNOTUuNDUzNiAxMjAuOTY0SDk1LjMzMDhMNTQuNTAwMiAxMTJDNTQuMTkzMiAxMTEuOTM4IDU0LjAwOSAxMTEuNjMxIDU0LjA3MDQgMTExLjMyNEM1NC4xMzE4IDExMS4wMTcgNTQuNDM4NyAxMTAuODMzIDU0Ljc0NTcgMTEwLjg5NUw5NS41NzY0IDExOS44NTlDOTUuODgzNCAxMTkuOTIgOTYuMDY3NiAxMjAuMjI3IDk2LjAwNjIgMTIwLjUzNEM5NS45NDQ4IDEyMC43OCA5NS42OTkyIDEyMC45NjQgOTUuNDUzNiAxMjAuOTY0WiIgZmlsbD0iIzQzMTQwNyIvPgo8cGF0aCBkPSJNMTEyLjU4NCAxMjQuNzcxSDExMi40NjFMMTA2LjEzNyAxMjMuMzU5QzEwNS44MyAxMjMuMjk4IDEwNS42NDYgMTIyLjk5MSAxMDUuNzA3IDEyMi42ODRDMTA1Ljc2OCAxMjIuMzc3IDEwNi4wNzUgMTIyLjE5MyAxMDYuMzgyIDEyMi4yNTRMMTEyLjcwNyAxMjMuNjY2QzExMy4wMTQgMTIzLjc4OSAxMTMuMTM2IDEyNC4xNTcgMTEzLjAxNCAxMjQuNDY0QzExMi45NTIgMTI0LjU4NyAxMTIuODI5IDEyNC43NzEgMTEyLjU4NCAxMjQuNzcxWiIgZmlsbD0iIzQzMTQwNyIvPgo8cGF0aCBkPSJNMTI1LjcyMSAxMjcuNTk3QzEyNS42NTkgMTI3LjU5NyAxMjUuNjU5IDEyNy41OTcgMTI1LjU5OCAxMjcuNTk3TDExOS4yNzQgMTI2LjI0NkMxMTguOTY3IDEyNi4xODQgMTE4Ljc4MiAxMjUuODc3IDExOC44NDQgMTI1LjU3QzExOC45MDUgMTI1LjI2MyAxMTkuMjEyIDEyNS4wNzkgMTE5LjUxOSAxMjUuMTQxTDEyNS44NDMgMTI2LjQ5MUMxMjYuMTUgMTI2LjYxNCAxMjYuMjczIDEyNi45ODMgMTI2LjE1IDEyNy4yOUMxMjYuMDg5IDEyNy40NzQgMTI1LjkwNSAxMjcuNTk3IDEyNS43MjEgMTI3LjU5N1oiIGZpbGw9IiM0MzE0MDciLz4KPHBhdGggZD0iTTExMy4xMzQgMTI4Ljk0NkMxMTMuMDExIDEyOC45NDYgMTEyLjgyNyAxMjguODg1IDExMi43MDQgMTI4Ljc2MkMxMTIuNDU4IDEyOC41MTYgMTEyLjQ1OCAxMjguMTQ4IDExMi43MDQgMTI3LjkwMkwxMTguNjU5IDEyMS42MzlDMTE4Ljk2NiAxMjEuNDU1IDExOS4zMzUgMTIxLjU3OCAxMTkuNTE5IDEyMS44MjRDMTE5LjY0MiAxMjIuMDA4IDExOS42NDIgMTIyLjI1MyAxMTkuNTE5IDEyMi40MzhMMTEzLjU2MyAxMjguN0MxMTMuNDQxIDEyOC44ODUgMTEzLjMxOCAxMjguOTQ2IDExMy4xMzQgMTI4Ljk0NloiIGZpbGw9IiM0MzE0MDciLz4KPHBhdGggZD0iTTEzOC45ODggMTgwLjMzOEMxMzguOTg4IDE4MC4zMzggMTUwLjI4NiAxNDMuODA1IDE0OS42MSAxMzYuMzE0QzE0OC45MzUgMTI4LjgyNCAxNDQuODgzIDEwNi45MDQgMTUxLjYzNyAxMDAuNzY0QzE1OC4zOTEgOTQuNjI0IDE2My40MjUgOTQuMTk0MiAxNjcuNzIzIDEwMy45NTdDMTcyLjAyMSAxMTMuNzE5IDE3My4zNzIgMTYxLjY3MiAxNzMuMzcyIDE2MS42NzIiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0xMzguOTg3IDE4MC43NjdDMTM4LjkyNSAxODAuNzY3IDEzOC45MjUgMTgwLjc2NyAxMzguODY0IDE4MC43NjdDMTM4LjYxOCAxODAuNzA2IDEzOC40OTYgMTgwLjQ2IDEzOC42MTggMTgwLjI3NkMxMzguNzQxIDE3OS45MDggMTQ5Ljg1NSAxNDMuNjgyIDE0OS4xNzkgMTM2LjM3NUMxNDkuMDU2IDEzNS4yNyAxNDguODcyIDEzMy43OTcgMTQ4LjY4OCAxMzIuMDc3QzE0Ny40NiAxMjIuMjUzIDE0NS40MzQgMTA1Ljc5OCAxNTEuMzkgMTAwLjUxOEMxNTUuMzgxIDk2Ljk1NjggMTU4LjQ1MSA5NS41NDQ3IDE2MS4xNTIgOTYuMTU4N0MxNjMuODU0IDk2Ljc3MjYgMTY2LjA2NCA5OS4yMjg2IDE2OC4xNTIgMTAzLjgzNEMxNzIuNDUgMTEzLjUzNSAxNzMuOCAxNTkuNzY5IDE3My44NjIgMTYxLjczM0MxNzMuODYyIDE2MS45NzkgMTczLjY3OCAxNjIuMTYzIDE3My40OTMgMTYyLjE2M0MxNzMuMjQ4IDE2Mi4xNjMgMTczLjA2NCAxNjEuOTc5IDE3My4wNjQgMTYxLjc5NUMxNzMuMDY0IDE2MS4zMDQgMTcxLjY1MSAxMTMuNzggMTY3LjQxNSAxMDQuMjAyQzE2NS41MTEgOTkuODQyNiAxNjMuNDI0IDk3LjUwOTQgMTYxLjAyOSA5Ni45NTY4QzE1OC42MzUgOTYuNDA0MyAxNTUuNzQ5IDk3Ljc1NSAxNTIuMDA0IDEwMS4xMzJDMTQ2LjQxNiAxMDYuMTY3IDE0OC41MDQgMTIyLjk5IDE0OS42MDkgMTMyLjAxNkMxNDkuNzkzIDEzMy43MzUgMTQ5Ljk3NyAxMzUuMjA5IDE1MC4xIDEzNi4zNzVDMTUwLjc3NiAxNDMuODY2IDEzOS45NjkgMTc5LjA0OCAxMzkuNDc4IDE4MC41ODNDMTM5LjM1NSAxODAuNjQ0IDEzOS4xNzEgMTgwLjc2NyAxMzguOTg3IDE4MC43NjdaIiBmaWxsPSIjNDMxNDA3Ii8+Cjwvc3ZnPgo=",alt:(0,_u.__)("Payment Placeholder","sureforms"),className:"w-60 h-60"})),React.createElement("div",{className:"flex flex-col gap-2"},React.createElement(Bu,{size:20,lineHeight:30,weight:600,letterSpacing:-.5,color:"primary"},i),React.createElement("div",{className:"flex flex-col"},React.createElement(Bu,{size:16,lineHeight:24,weight:400,color:"secondary"},a),React.createElement("ul",{className:"flex flex-col list-disc list-inside leading-7 ml-2.5 mt-2 mb-0 mr-0"},s.map((function(e,t){return React.createElement("li",{key:t,className:"m-0"},React.createElement(Bu,{className:"inline-block",size:16,lineHeight:28,weight:400,color:"secondary"},e))})))),o?React.createElement(xe,{onClick:function(){var e="".concat(window.location.origin,"/wp-admin/admin.php?page=add-new-form&form_type=payment");window.location.href=e},variant:"primary",size:"md",className:"w-fit flex",icon:React.createElement(Dx,{className:"!size-4"}),iconPosition:"right"},(0,_u.__)("Create New Payment Form","sureforms")):React.createElement(xe,{onClick:function(){var e=window.srfm_admin.payments.stripe_connect_url;window.open(e,"_blank","noopener,noreferrer")},variant:"primary",size:"md",className:"w-fit flex",icon:React.createElement(Dx,{className:"!size-4"}),iconPosition:"right"},(0,_u.__)("Connect Payment Gateway","sureforms")))))))};function Sx(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Cx(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Cx(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Cx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Rx(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ox(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ox(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ox(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Ax=class extends Ql{constructor(e,t){super(),this.options=t,this.#f=e,this.#E=null,this.#N=Hl(),this.bindMethods(),this.setOptions(t)}#f;#k=void 0;#j=void 0;#D=void 0;#T;#S;#N;#E;#C;#R;#O;#A;#I;#_;#P=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#k.addObserver(this),Ix(this.#k,this.options)?this.#L():this.updateResult(),this.#z())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return _x(this.#k,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return _x(this.#k,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#F(),this.#U(),this.#k.removeObserver(this)}setOptions(e){const t=this.options,n=this.#k;if(this.options=this.#f.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof El(this.options.enabled,this.#k))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#B(),this.#k.setOptions(this.options),t._defaulted&&!Rl(this.options,t)&&this.#f.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#k,observer:this});const r=this.hasListeners();r&&Px(this.#k,n,this.options,t)&&this.#L(),this.updateResult(),!r||this.#k===n&&El(this.options.enabled,this.#k)===El(t.enabled,this.#k)&&Ml(this.options.staleTime,this.#k)===Ml(t.staleTime,this.#k)||this.#Y();const o=this.#Q();!r||this.#k===n&&El(this.options.enabled,this.#k)===El(t.enabled,this.#k)&&o===this.#_||this.#V(o)}getOptimisticResult(e){const t=this.#f.getQueryCache().build(this.#f,e),n=this.createResult(t,e);return r=n,!Rl(this.getCurrentResult(),r)&&(this.#D=n,this.#S=this.options,this.#T=this.#k.state),n;var r}getCurrentResult(){return this.#D}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),"promise"===n&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#N.status||this.#N.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,n))})}trackProp(e){this.#P.add(e)}getCurrentQuery(){return this.#k}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#f.defaultQueryOptions(e),n=this.#f.getQueryCache().build(this.#f,t);return n.fetch().then((()=>this.createResult(n,t)))}fetch(e){return this.#L({...e,cancelRefetch:e.cancelRefetch??!0}).then((()=>(this.updateResult(),this.#D)))}#L(e){this.#B();let t=this.#k.fetch(this.options,e);return e?.throwOnError||(t=t.catch(bl)),t}#Y(){this.#F();const e=Ml(this.options.staleTime,this.#k);if(vl||this.#D.isStale||!wl(e))return;const t=xl(this.#D.dataUpdatedAt,e)+1;this.#A=yl.setTimeout((()=>{this.#D.isStale||this.updateResult()}),t)}#Q(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#k):this.options.refetchInterval)??!1}#V(e){this.#U(),this.#_=e,!vl&&!1!==El(this.options.enabled,this.#k)&&wl(this.#_)&&0!==this.#_&&(this.#I=yl.setInterval((()=>{(this.options.refetchIntervalInBackground||Vl.isFocused())&&this.#L()}),this.#_))}#z(){this.#Y(),this.#V(this.#Q())}#F(){this.#A&&(yl.clearTimeout(this.#A),this.#A=void 0)}#U(){this.#I&&(yl.clearInterval(this.#I),this.#I=void 0)}createResult(e,t){const n=this.#k,r=this.options,o=this.#D,i=this.#T,a=this.#S,s=e!==n?e.state:this.#j,{state:l}=e;let c,u={...l},d=!1;if(t._optimisticResults){const o=this.hasListeners(),i=!o&&Ix(e,t),a=o&&Px(e,n,t,r);(i||a)&&(u={...u,...Jl(l.data,e.options)}),"isRestoring"===t._optimisticResults&&(u.fetchStatus="idle")}let{error:f,errorUpdatedAt:m,status:h}=u;c=u.data;let p=!1;if(void 0!==t.placeholderData&&void 0===c&&"pending"===h){let e;o?.isPlaceholderData&&t.placeholderData===a?.placeholderData?(e=o.data,p=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#O?.state.data,this.#O):t.placeholderData,void 0!==e&&(h="success",c=_l(o?.data,e,t),d=!0)}if(t.select&&void 0!==c&&!p)if(o&&c===i?.data&&t.select===this.#C)c=this.#R;else try{this.#C=t.select,c=t.select(c),c=_l(o?.data,c,t),this.#R=c,this.#E=null}catch(e){this.#E=e}this.#E&&(f=this.#E,c=this.#R,m=Date.now(),h="error");const g="fetching"===u.fetchStatus,y="pending"===h,v="error"===h,b=y&&g,w=void 0!==c,x={status:h,fetchStatus:u.fetchStatus,isPending:y,isSuccess:"success"===h,isError:v,isInitialLoading:b,isLoading:b,data:c,dataUpdatedAt:u.dataUpdatedAt,error:f,errorUpdatedAt:m,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>s.dataUpdateCount||u.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!y,isLoadingError:v&&!w,isPaused:"paused"===u.fetchStatus,isPlaceholderData:d,isRefetchError:v&&w,isStale:Lx(e,t),refetch:this.refetch,promise:this.#N,isEnabled:!1!==El(t.enabled,e)};if(this.options.experimental_prefetchInRender){const t=e=>{"error"===x.status?e.reject(x.error):void 0!==x.data&&e.resolve(x.data)},r=()=>{const e=this.#N=x.promise=Hl();t(e)},o=this.#N;switch(o.status){case"pending":e.queryHash===n.queryHash&&t(o);break;case"fulfilled":"error"!==x.status&&x.data===o.value||r();break;case"rejected":"error"===x.status&&x.error===o.reason||r()}}return x}updateResult(){const e=this.#D,t=this.createResult(this.#k,this.options);this.#T=this.#k.state,this.#S=this.options,void 0!==this.#T.data&&(this.#O=this.#k),Rl(t,e)||(this.#D=t,this.#W({listeners:(()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,n="function"==typeof t?t():t;if("all"===n||!n&&!this.#P.size)return!0;const r=new Set(n??this.#P);return this.options.throwOnError&&r.add("error"),Object.keys(this.#D).some((t=>{const n=t;return this.#D[n]!==e[n]&&r.has(n)}))})()}))}#B(){const e=this.#f.getQueryCache().build(this.#f,this.options);if(e===this.#k)return;const t=this.#k;this.#k=e,this.#j=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#z()}#W(e){Yl.batch((()=>{e.listeners&&this.listeners.forEach((e=>{e(this.#D)})),this.#f.getQueryCache().notify({query:this.#k,type:"observerResultsUpdated"})}))}};function Ix(e,t){return function(e,t){return!1!==El(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||void 0!==e.state.data&&_x(e,t,t.refetchOnMount)}function _x(e,t,n){if(!1!==El(t.enabled,e)&&"static"!==Ml(t.staleTime,e)){const r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&Lx(e,t)}return!1}function Px(e,t,n,r){return(e!==t||!1===El(r.enabled,e))&&(!n.suspense||"error"!==e.state.status)&&Lx(e,n)}function Lx(e,t){return!1!==El(t.enabled,e)&&e.isStaleByTime(Ml(t.staleTime,e))}var zx=d.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),Fx=d.createContext(!1),Ux=(Fx.Provider,(e,t,n)=>t.fetchOptimistic(e).catch((()=>{n.clearReset()})));function Bx(e,t){return function(e,t,n){const r=d.useContext(Fx),o=d.useContext(zx),i=uc(n),a=i.defaultQueryOptions(e);i.getDefaultOptions().queries?._experimental_beforeQuery?.(a),a._optimisticResults=r?"isRestoring":"optimistic",(e=>{if(e.suspense){const t=1e3,n=e=>"static"===e?e:Math.max(e??t,t),r=e.staleTime;e.staleTime="function"==typeof r?(...e)=>n(r(...e)):n(r),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,t))}})(a),((e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))})(a,o),(e=>{d.useEffect((()=>{e.clearReset()}),[e])})(o);const s=!i.getQueryCache().get(a.queryHash),[l]=d.useState((()=>new t(i,a))),c=l.getOptimisticResult(a),u=!r&&!1!==e.subscribed;if(d.useSyncExternalStore(d.useCallback((e=>{const t=u?l.subscribe(Yl.batchCalls(e)):bl;return l.updateResult(),t}),[l,u]),(()=>l.getCurrentResult()),(()=>l.getCurrentResult())),d.useEffect((()=>{l.setOptions(a)}),[a,l]),((e,t)=>e?.suspense&&t.isPending)(a,c))throw Ux(a,l,o);if((({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&void 0===e.data||Ul(n,[e.error,r])))({result:c,errorResetBoundary:o,throwOnError:a.throwOnError,query:i.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw c.error;if(i.getDefaultOptions().queries?._experimental_afterQuery?.(a,c),a.experimental_prefetchInRender&&!vl&&((e,t)=>e.isLoading&&e.isFetching&&!t)(c,r)){const e=s?Ux(a,l,o):i.getQueryCache().get(a.queryHash)?.promise;e?.catch(bl).finally((()=>{l.updateResult()}))}return a.notifyOnChangeProps?c:l.trackResult(c)}(e,Ax,t)}var Yx=class extends Ql{#f;#D=void 0;#H;#q;constructor(e,t){super(),this.#f=e,this.setOptions(t),this.bindMethods(),this.#$()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#f.defaultMutationOptions(e),Rl(this.options,t)||this.#f.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#H,observer:this}),t?.mutationKey&&this.options.mutationKey&&Dl(t.mutationKey)!==Dl(this.options.mutationKey)?this.reset():"pending"===this.#H?.state.status&&this.#H.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#H?.removeObserver(this)}onMutationUpdate(e){this.#$(),this.#W(e)}getCurrentResult(){return this.#D}reset(){this.#H?.removeObserver(this),this.#H=void 0,this.#$(),this.#W()}mutate(e,t){return this.#q=t,this.#H?.removeObserver(this),this.#H=this.#f.getMutationCache().build(this.#f,this.options),this.#H.addObserver(this),this.#H.execute(e)}#$(){const e=this.#H?.state??{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0};this.#D={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#W(e){Yl.batch((()=>{if(this.#q&&this.hasListeners()){const t=this.#D.variables,n=this.#D.context,r={client:this.#f,meta:this.options.meta,mutationKey:this.options.mutationKey};"success"===e?.type?(this.#q.onSuccess?.(e.data,t,n,r),this.#q.onSettled?.(e.data,null,t,n,r)):"error"===e?.type&&(this.#q.onError?.(e.error,t,n,r),this.#q.onSettled?.(void 0,e.error,t,n,r))}this.listeners.forEach((e=>{e(this.#D)}))}))}};function Qx(e,t){const n=uc(t),[r]=d.useState((()=>new Yx(n,e)));d.useEffect((()=>{r.setOptions(e)}),[r,e]);const o=d.useSyncExternalStore(d.useCallback((e=>r.subscribe(Yl.batchCalls(e))),[r]),(()=>r.getCurrentResult()),(()=>r.getCurrentResult())),i=d.useCallback(((e,t)=>{r.mutate(e,t).catch(bl)}),[r]);if(o.error&&Ul(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:i,mutateAsync:o.mutate}}function Vx(e){return Vx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vx(e)}function Wx(){Wx=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function l(e,t,n,r){return Object.defineProperty(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r})}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function c(t,n,r,o){var i=n&&n.prototype instanceof f?n:f,a=Object.create(i.prototype);return l(a,"_invoke",function(t,n,r){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var l=x(s,r);if(l){if(l===d)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(1===o)throw o=4,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=3;var c=u(t,n,r);if("normal"===c.type){if(o=r.done?4:2,c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=4,r.method="throw",r.arg=c.arg)}}}(t,r,new N(o||[])),!0),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var d={};function f(){}function m(){}function h(){}var p={};l(p,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(k([])));y&&y!==n&&r.call(y,i)&&(p=y);var v=h.prototype=f.prototype=Object.create(p);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function n(o,i,a,s){var l=u(e[o],e,i);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==Vx(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;l(this,"_invoke",(function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}),!0)}function x(t,n){var r=n.method,o=t.i[r];if(o===e)return n.delegate=null,"throw"===r&&t.i.return&&(n.method="return",n.arg=e,x(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=u(o,t.i,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,d;var a=i.arg;return a?a.done?(n[t.r]=a.value,n.next=t.n,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function M(e){this.tryEntries.push(e)}function E(t){var n=t[4]||{};n.type="normal",n.arg=e,t[4]=n}function N(e){this.tryEntries=[[-1]],e.forEach(M,this),this.reset(!0)}function k(t){if(null!=t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(Vx(t)+" is not iterable")}return m.prototype=h,l(v,"constructor",h),l(h,"constructor",m),m.displayName=l(h,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,s,"GeneratorFunction")),e.prototype=Object.create(v),e},t.awrap=function(e){return{__await:e}},b(w.prototype),l(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new w(c(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},b(v),l(v,s,"Generator"),l(v,i,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},t.values=k,N.prototype={constructor:N,reset:function(t){if(this.prev=this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(E),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0][4];if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(e){a.type="throw",a.arg=t,n.next=e}for(var o=n.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],s=this.prev,l=i[1],c=i[2];if(-1===i[0])return r("end"),!1;if(!l&&!c)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=s){if(s<l)return this.method="next",this.arg=e,r(l),!0;if(s<c)return r(c),!1}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r[0]>-1&&r[0]<=this.prev&&this.prev<r[2]){var o=r;break}}o&&("break"===e||"continue"===e)&&o[0]<=t&&t<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o[2],d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n[2]===e)return this.complete(n[4],n[3]),E(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n[0]===e){var r=n[4];if("throw"===r.type){var o=r.arg;E(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={i:k(t),r:n,n:r},"next"===this.method&&(this.arg=e),d}},t}function Hx(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return qx(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qx(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function $x(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function Gx(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){$x(i,r,o,a,s,"next",e)}function s(e){$x(i,r,o,a,s,"throw",e)}a(void 0)}))}}var Kx=function(){var e=Gx(Wx().mark((function e(t){var n,r,o,i,a,s,l,c,u=arguments;return Wx().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=u.length>1&&void 0!==u[1]?u[1]:{},(i=new URLSearchParams).append("action",t),i.append("nonce",(null===(n=window.srfm_payment_admin)||void 0===n?void 0:n.srfm_payment_admin_nonce)||""),Object.entries(o).forEach((function(e){var t=Hx(e,2),n=t[0],r=t[1];null!=r&&i.append(n,r)})),e.next=7,ab()({url:null===(r=window.srfm_payment_admin)||void 0===r?void 0:r.ajax_url,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:i.toString()});case 7:if((a=e.sent).success){e.next=15;break}throw l=(null===(s=a.data)||void 0===s?void 0:s.message)||"Request failed",(c=new Error(l)).response=a,c.data=a.data,c.isApiError=!0,c;case 15:return e.abrupt("return",a.data);case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Zx=function(){var e=Gx(Wx().mark((function e(){var t,n,r,o,i,a,s,l,c,u,d,f,m,h,p,g,y,v=arguments;return Wx().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(t=v.length>0&&void 0!==v[0]?v[0]:{}).searchTerm,r=void 0===n?"":n,o=t.filter,i=void 0===o?"":o,a=t.formFilter,s=void 0===a?"":a,l=t.paymentMode,c=void 0===l?"":l,u=t.selectedDates,d=void 0===u?{}:u,f=t.page,m=void 0===f?1:f,h=t.itemsPerPage,p=void 0===h?10:h,g=t.sortBy,y=void 0===g?"":g,e.next=4,Kx("srfm_fetch_payments_transactions",{search:r,status:i,form_id:s,payment_mode:c,date_from:null!=d&&d.from?d.from.toISOString().split("T")[0]:"",date_to:null!=d&&d.to?d.to.toISOString().split("T")[0]:"",page:m,per_page:p,sort_by:y});case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Xx=function(){var e=Gx(Wx().mark((function e(){var t;return Wx().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Kx("srfm_fetch_forms_list");case 2:return t=e.sent,e.abrupt("return",t.forms||[]);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Jx=function(){var e=Gx(Wx().mark((function e(t){var n;return Wx().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Array.isArray(t)&&0!==t.length){e.next=4;break}throw(n=new Error("No payment IDs provided")).isValidationError=!0,n;case 4:return e.prev=4,e.next=7,Kx("srfm_bulk_delete_payments",{payment_ids:JSON.stringify(t)});case 7:return e.abrupt("return",e.sent);case 10:throw e.prev=10,e.t0=e.catch(4),e.t0.response||e.t0.data||e.t0.isValidationError||(e.t0.isNetworkError=!0),e.t0;case 14:case"end":return e.stop()}}),e,null,[[4,10]])})));return function(t){return e.apply(this,arguments)}}();function eM(e){return function(e){if(Array.isArray(e))return tM(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return tM(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tM(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tM(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var nM={all:["payments"],lists:function(){return[].concat(eM(nM.all),["list"])},list:function(e){return[].concat(eM(nM.lists()),[e])},details:function(){return[].concat(eM(nM.all),["detail"])},detail:function(e){return[].concat(eM(nM.details()),[e])},subscriptions:function(){return[].concat(eM(nM.all),["subscription"])},subscription:function(e){return[].concat(eM(nM.subscriptions()),[e])},forms:function(){return["forms","payment"]}};function rM(e){return rM="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rM(e)}function oM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function iM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oM(Object(n),!0).forEach((function(t){aM(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oM(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function aM(e,t,n){return(t=function(e){var t=function(e){if("object"!=rM(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=rM(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==rM(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sM(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||lM(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lM(e,t){if(e){if("string"==typeof e)return cM(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cM(e,t):void 0}}function cM(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const uM=function(){var e,t,n,r,o=au(),i=function(){var e,t=Sx(Iu(),2),n=t[0],r=t[1],o=(null===(e=window.srfm_admin)||void 0===e||null===(e=e.payments)||void 0===e?void 0:e.stripe_mode)||"test",i=Sx((0,a.useState)((function(){return n.get("search")||""})),2),s=i[0],l=i[1],c=Sx((0,a.useState)((function(){return n.get("status")||""})),2),u=c[0],d=c[1],f=Sx((0,a.useState)((function(){return n.get("form")||""})),2),m=f[0],h=f[1],p=Sx((0,a.useState)((function(){return n.get("mode")||o})),2),g=p[0],y=p[1],v=Sx((0,a.useState)((function(){var e=n.get("date_from"),t=n.get("date_to");if(e&&t)try{return{from:new Date(e),to:new Date(t)}}catch(e){return{from:null,to:null}}return{from:null,to:null}})),2),b=v[0],w=v[1];(0,a.useEffect)((function(){var e=new URLSearchParams(n);s?e.set("search",s):e.delete("search"),u?e.set("status",u):e.delete("status"),m?e.set("form",m):e.delete("form"),g&&g!==o?e.set("mode",g):e.delete("mode"),b.from?e.set("date_from",b.from.toISOString().split("T")[0]):e.delete("date_from"),b.to?e.set("date_to",b.to.toISOString().split("T")[0]):e.delete("date_to"),r(e,{replace:!0})}),[s,u,m,g,b,o]);var x=(0,a.useCallback)((function(e){l(e)}),[]),M=(0,a.useCallback)((function(e){d(e)}),[]),E=(0,a.useCallback)((function(e){h(e)}),[]),N=(0,a.useCallback)((function(e){y(e)}),[]),k=(0,a.useCallback)((function(e){w(e)}),[]),j=(0,a.useCallback)((function(){l(""),d(""),h(""),y(o),w({from:null,to:null})}),[o]),D=(0,a.useCallback)((function(){return!!(s||u||m||g&&g!==o||b.from||b.to)}),[s,u,m,g,b,o]);return{searchTerm:s,setSearchTerm:x,statusFilter:u,setStatusFilter:M,formFilter:m,setFormFilter:E,paymentMode:g,setPaymentMode:N,dateRange:b,setDateRange:k,resetFilters:j,hasActiveFilters:D}}(),s=i.searchTerm,l=i.setSearchTerm,u=i.statusFilter,d=i.setStatusFilter,f=i.formFilter,m=i.setFormFilter,h=i.paymentMode,p=i.setPaymentMode,g=i.dateRange,y=i.setDateRange,v=i.resetFilters,b=i.hasActiveFilters,w=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=Rx(Iu(),2),r=n[0],o=n[1],i=Rx((0,a.useState)((function(){var t=r.get("page");return t?parseInt(t,10):e})),2),s=i[0],l=i[1],c=Rx((0,a.useState)((function(){var e=r.get("per_page");return e?parseInt(e,10):t})),2),u=c[0],d=c[1];(0,a.useEffect)((function(){var e=new URLSearchParams(r);s>1?e.set("page",s.toString()):e.delete("page"),u!==t?e.set("per_page",u.toString()):e.delete("per_page"),o(e,{replace:!0})}),[s,u,t,r,o]);var f=(0,a.useCallback)((function(e){l(Math.max(1,e))}),[]),m=(0,a.useCallback)((function(e){d(Math.max(1,Math.min(100,e))),l(1)}),[]),h=(0,a.useCallback)((function(){l((function(e){return e+1}))}),[]),p=(0,a.useCallback)((function(){l((function(e){return Math.max(e-1,1)}))}),[]),g=(0,a.useCallback)((function(){l(1)}),[]);return{currentPage:s,itemsPerPage:u,setCurrentPage:f,setItemsPerPage:m,goToNextPage:h,goToPreviousPage:p,resetPage:g}}(),x=w.currentPage,M=w.itemsPerPage,E=w.setCurrentPage,N=w.setItemsPerPage,k=w.resetPage,j=sM((0,a.useState)([]),2),D=j[0],T=j[1],S=sM((0,a.useState)({open:!1,title:"",description:"",confirmLabel:"",onConfirm:null,isLoading:!1,destructive:!0,enableVerification:!1,afterInputContent:null}),2),C=S[0],R=S[1],O=(0,a.useMemo)((function(){return{searchTerm:s,filter:u,formFilter:f,paymentMode:h,selectedDates:g,page:x,itemsPerPage:M}}),[s,u,f,h,g,x,M]),A=(r=O,Bx({queryKey:nM.list(r),queryFn:function(){return Zx(r)},staleTime:3e5,refetchOnWindowFocus:!1,keepPreviousData:!0})),I=A.data,_=A.isLoading,P=Bx({queryKey:nM.forms(),queryFn:Xx,staleTime:6e5,refetchOnWindowFocus:!1}).data,L=function(){var e=uc();return Qx({mutationFn:Jx,onSuccess:function(){e.invalidateQueries({queryKey:nM.lists()})}})}(),z=(null==I?void 0:I.payments)||[],F=(null==I?void 0:I.total)||0,U=Math.ceil(F/M),B=P||[];(0,a.useEffect)((function(){1!==x&&k()}),[s,u,f,h,g.from,g.to]);var Y=React.createElement(Bu,{size:14,lineHeight:18,weight:400,className:"m-0 text-sm font-normal bg-alert-background-danger text-[#DC2626] p-3 rounded-[8px]"},(0,_u.__)("Warning: Deleting payments will permanently remove all associated data including notes, logs, and transaction information.","sureforms")),Q=function(e){L.mutate(e,{onSuccess:function(e){var t;e.partial?(t=e.message||(0,_u.__)("Some payments could not be deleted.","sureforms"),c.warning(t,{duration:5e3})):(t=e.message||(0,_u.__)("Payments deleted successfully","sureforms"),c.success(t,{duration:4e3})),T([]),R((function(e){return iM(iM({},e),{},{open:!1})}))},onError:function(e){var t,n;n=null!==(t=e.data)&&void 0!==t&&t.message?e.data.message:e.isValidationError?(0,_u.__)("No payment IDs provided.","sureforms"):e.isNetworkError?(0,_u.__)("Network error. Please check your connection and try again.","sureforms"):e.message&&"API request failed"!==e.message&&"Validation failed"!==e.message?e.message:(0,_u.__)("Failed to delete payments. Please try again.","sureforms"),c.error(n),R((function(e){return iM(iM({},e),{},{open:!1})}))}})},V=function(){v(),E(1)},W=(null===(e=window.srfm_admin)||void 0===e?void 0:e.payments)||{},H=W.stripe_connected||!1,q=(0,ud.applyFilters)("srfm_payment_gateway_configured",H,W),$=(null===(t=window.srfm_admin)||void 0===t||null===(t=t.payments)||void 0===t?void 0:t.is_transaction_present)||!1;return _||q&&$?React.createElement("div",{className:ex("min-h-screen px-8 pb-8 bg-background-secondary flex flex-col gap-[24px]",!(null!==(n=window.srfm_admin)&&void 0!==n&&null!==(n=n.notices)&&void 0!==n&&n.length)&&"pt-8")},React.createElement(Tv,{mode:h}),React.createElement("div",{className:"p-4 border-0.5 border-solid shadow-sm bg-background-primary rounded-xl border-border-subtle"},React.createElement("div",null,React.createElement("div",{className:"flex flex-col lg:flex-row lg:justify-between lg:items-center gap-4 xl:gap-5"},React.createElement("div",null,React.createElement("h1",{className:"text-xl whitespace-nowrap font-semibold text-text-primary leading-[30px] tracking-[-0.005em]"},(0,_u.__)("Payments","sureforms"))),React.createElement(Av,{searchTerm:s,onSearchChange:l,selectedPayments:D,onBulkDelete:function(){R({open:!0,title:(0,_u.__)("Delete Payments","sureforms"),description:(0,_u.sprintf)((0,_u.__)("Are you sure you want to delete %d payments? This action cannot be undone and will permanently remove all associated data including notes, logs, and transaction information.","sureforms"),D.length),confirmLabel:(0,_u.__)("Delete Permanently","sureforms"),onConfirm:function(){return Q(D)},isLoading:L.isPending,destructive:!0,enableVerification:!0,beforeClosingBody:Y})},statusFilter:u,onStatusFilterChange:d,formFilter:f,onFormFilterChange:m,paymentMode:h,onPaymentModeChange:p,selectedDates:g,onDateChange:y,formsList:B,onClearFilters:V,hasActiveFilters:b()}))),0!==z.length||_?React.createElement("div",{className:"bg-background-primary mt-4"},React.createElement(nx,{payments:z,selectedRows:D,onSelectRow:function(e){T((function(t){return t.includes(e)?t.filter((function(t){return t!==e})):[].concat(function(e){return function(e){if(Array.isArray(e))return cM(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||lM(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t),[e])}))},onSelectAll:function(){T(D.length===z.length?[]:z.map((function(e){return e.id})))},onView:function(e){var t=e.id,n=e.type;o("subscription"===n?"/payment/".concat(t,"?type=subscription"):"/payment/".concat(t))},onDelete:function(e){R({open:!0,title:(0,_u.__)("Delete Payment","sureforms"),description:(0,_u.__)("Are you sure you want to delete this payment? This action cannot be undone and will permanently remove all associated data including notes, logs, and transaction information.","sureforms"),confirmLabel:(0,_u.__)("Delete Payment","sureforms"),onConfirm:function(){return Q([e])},isLoading:L.isPending,destructive:!0,enableVerification:!0,beforeClosingBody:Y})},isLoading:_,currentPage:x,totalPages:U,itemsPerPage:M,onPageChange:function(e){E(e),T([])},onItemsPerPageChange:function(e){N(e),T([])}})):React.createElement(ld,{className:"flex items-center justify-center p-8 bg-background-primary rounded-lg"},React.createElement("div",{className:"text-center max-w-md"},React.createElement(Bu,{size:18,lineHeight:28,weight:600,color:"primary",className:"mb-2"},(0,_u.__)("No transactions found","sureforms")),React.createElement(Bu,{size:16,lineHeight:24,weight:400,color:"secondary",className:"mb-4"},b()?(0,_u.__)("No transactions found. Try adjusting your search terms or clearing filters.","sureforms"):(0,_u.__)("No transactions found for the selected mode.","sureforms")),b()&&React.createElement(xe,{size:"sm",variant:"outline",onClick:V},(0,_u.__)("Clear Filters","sureforms"))))),React.createElement(jx,{isOpen:C.open,onCancel:function(){return R((function(e){return iM(iM({},e),{},{open:!1})}))},onConfirm:C.onConfirm,title:C.title,description:C.description,confirmButtonText:C.confirmLabel,destructiveConfirmButton:C.destructive,requireConfirmation:C.enableVerification,beforeClosingBody:C.beforeClosingBody})):React.createElement(Tx,{paymentMode:h})},dM=hd("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),fM=hd("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);function mM(e){return mM="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mM(e)}function hM(){hM=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function l(e,t,n,r){return Object.defineProperty(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r})}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function c(t,n,r,o){var i=n&&n.prototype instanceof f?n:f,a=Object.create(i.prototype);return l(a,"_invoke",function(t,n,r){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var l=x(s,r);if(l){if(l===d)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(1===o)throw o=4,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=3;var c=u(t,n,r);if("normal"===c.type){if(o=r.done?4:2,c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=4,r.method="throw",r.arg=c.arg)}}}(t,r,new N(o||[])),!0),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var d={};function f(){}function m(){}function h(){}var p={};l(p,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(k([])));y&&y!==n&&r.call(y,i)&&(p=y);var v=h.prototype=f.prototype=Object.create(p);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function n(o,i,a,s){var l=u(e[o],e,i);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==mM(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;l(this,"_invoke",(function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}),!0)}function x(t,n){var r=n.method,o=t.i[r];if(o===e)return n.delegate=null,"throw"===r&&t.i.return&&(n.method="return",n.arg=e,x(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=u(o,t.i,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,d;var a=i.arg;return a?a.done?(n[t.r]=a.value,n.next=t.n,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function M(e){this.tryEntries.push(e)}function E(t){var n=t[4]||{};n.type="normal",n.arg=e,t[4]=n}function N(e){this.tryEntries=[[-1]],e.forEach(M,this),this.reset(!0)}function k(t){if(null!=t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(mM(t)+" is not iterable")}return m.prototype=h,l(v,"constructor",h),l(h,"constructor",m),m.displayName=l(h,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,s,"GeneratorFunction")),e.prototype=Object.create(v),e},t.awrap=function(e){return{__await:e}},b(w.prototype),l(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new w(c(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},b(v),l(v,s,"Generator"),l(v,i,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},t.values=k,N.prototype={constructor:N,reset:function(t){if(this.prev=this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(E),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0][4];if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(e){a.type="throw",a.arg=t,n.next=e}for(var o=n.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],s=this.prev,l=i[1],c=i[2];if(-1===i[0])return r("end"),!1;if(!l&&!c)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=s){if(s<l)return this.method="next",this.arg=e,r(l),!0;if(s<c)return r(c),!1}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r[0]>-1&&r[0]<=this.prev&&this.prev<r[2]){var o=r;break}}o&&("break"===e||"continue"===e)&&o[0]<=t&&t<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o[2],d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n[2]===e)return this.complete(n[4],n[3]),E(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n[0]===e){var r=n[4];if("throw"===r.type){var o=r.arg;E(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={i:k(t),r:n,n:r},"next"===this.method&&(this.arg=e),d}},t}function pM(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function gM(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){pM(i,r,o,a,s,"next",e)}function s(e){pM(i,r,o,a,s,"throw",e)}a(void 0)}))}}var yM=function(){var e=gM(hM().mark((function e(t){var n,r,o,i;return hM().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,(n=new URLSearchParams).append("action","srfm_fetch_single_payment"),n.append("nonce",window.srfm_payment_admin.srfm_payment_admin_nonce||""),n.append("payment_id",t),e.next=7,ab()({url:window.srfm_payment_admin.ajax_url,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:n.toString()});case 7:if((r=e.sent).success){e.next=12;break}throw i=(null===(o=r.data)||void 0===o?void 0:o.message)||"Failed to fetch payment details",console.error("Single payment AJAX error:",i),new Error(i);case 12:return e.abrupt("return",r.data);case 15:throw e.prev=15,e.t0=e.catch(0),console.error("Error fetching single payment:",e.t0),e.t0;case 19:case"end":return e.stop()}}),e,null,[[0,15]])})));return function(t){return e.apply(this,arguments)}}(),vM=function(){var e=gM(hM().mark((function e(t){var n,r,o,i,a,s,l,c,u,d;return hM().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.paymentId,r=t.transactionId,o=t.refundAmount,i=t.refundType,a=t.refundNotes,s=void 0===a?"":a,e.prev=1,(l=new URLSearchParams).append("action","srfm_refund_payment"),l.append("nonce",window.srfm_payment_admin.srfm_payment_admin_nonce||""),l.append("payment_id",n),l.append("transaction_id",r),l.append("refund_amount",o),l.append("refund_type",i),l.append("refund_notes",s),e.next=12,ab()({url:window.srfm_payment_admin.ajax_url,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:l.toString()});case 12:if((c=e.sent).success){e.next=17;break}throw d=(null===(u=c.data)||void 0===u?void 0:u.message)||"Failed to process refund",console.error("Refund AJAX error:",d),new Error(d);case 17:return e.abrupt("return",c.data);case 20:throw e.prev=20,e.t0=e.catch(1),console.error("Error processing refund:",e.t0),e.t0;case 24:case"end":return e.stop()}}),e,null,[[1,20]])})));return function(t){return e.apply(this,arguments)}}(),bM=function(){var e=gM(hM().mark((function e(t){var n,r,o,i;return hM().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,(n=new URLSearchParams).append("action","srfm_fetch_subscription"),n.append("nonce",window.srfm_payment_admin.srfm_payment_admin_nonce||""),n.append("subscription_id",t),e.next=7,ab()({url:window.srfm_payment_admin.ajax_url,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:n.toString()});case 7:if((r=e.sent).success){e.next=12;break}throw i=(null===(o=r.data)||void 0===o?void 0:o.message)||"Failed to fetch subscription details",console.error("Subscription AJAX error:",i),new Error(i);case 12:return e.abrupt("return",r.data);case 15:throw e.prev=15,e.t0=e.catch(0),console.error("Error fetching subscription:",e.t0),e.t0;case 19:case"end":return e.stop()}}),e,null,[[0,15]])})));return function(t){return e.apply(this,arguments)}}(),wM=function(){var e=gM(hM().mark((function e(t){var n,r,o,i;return hM().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,(n=new URLSearchParams).append("action","srfm_stripe_cancel_subscription"),n.append("nonce",window.srfm_payment_admin.srfm_payment_admin_nonce||""),n.append("payment_id",t),e.next=7,ab()({url:window.srfm_payment_admin.ajax_url,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:n.toString()});case 7:if((r=e.sent).success){e.next=12;break}throw i=(null===(o=r.data)||void 0===o?void 0:o.message)||"Failed to cancel subscription",console.error("Cancel subscription AJAX error:",i),new Error(i);case 12:return e.abrupt("return",r.data);case 15:throw e.prev=15,e.t0=e.catch(0),console.error("Error canceling subscription:",e.t0),e.t0;case 19:case"end":return e.stop()}}),e,null,[[0,15]])})));return function(t){return e.apply(this,arguments)}}(),xM=function(){var e=gM(hM().mark((function e(t){var n,r,o,i;return hM().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,(n=new URLSearchParams).append("action","srfm_stripe_pause_subscription"),n.append("nonce",window.srfm_payment_admin.srfm_payment_admin_nonce||""),n.append("payment_id",t),e.next=7,ab()({url:window.srfm_payment_admin.ajax_url,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:n.toString()});case 7:if((r=e.sent).success){e.next=12;break}throw i=(null===(o=r.data)||void 0===o?void 0:o.message)||"Failed to pause subscription",console.error("Pause subscription AJAX error:",i),new Error(i);case 12:return e.abrupt("return",r.data);case 15:throw e.prev=15,e.t0=e.catch(0),console.error("Error pausing subscription:",e.t0),e.t0;case 19:case"end":return e.stop()}}),e,null,[[0,15]])})));return function(t){return e.apply(this,arguments)}}(),MM=function(){var e=gM(hM().mark((function e(t,n){var r,o,i,a;return hM().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,(r=new URLSearchParams).append("action","srfm_add_payment_note"),r.append("nonce",window.srfm_payment_admin.srfm_payment_admin_nonce||""),r.append("payment_id",t),r.append("note_text",n),e.next=8,ab()({url:window.srfm_payment_admin.ajax_url,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:r.toString()});case 8:if((o=e.sent).success){e.next=13;break}throw a=(null===(i=o.data)||void 0===i?void 0:i.message)||"Failed to add note",console.error("Add note AJAX error:",a),new Error(a);case 13:return e.abrupt("return",o.data.notes);case 16:throw e.prev=16,e.t0=e.catch(0),console.error("Error adding note:",e.t0),e.t0;case 20:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(t,n){return e.apply(this,arguments)}}(),EM=function(){var e=gM(hM().mark((function e(t,n){var r,o,i,a;return hM().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,(r=new URLSearchParams).append("action","srfm_delete_payment_note"),r.append("nonce",window.srfm_payment_admin.srfm_payment_admin_nonce||""),r.append("payment_id",t),r.append("note_index",n),e.next=8,ab()({url:window.srfm_payment_admin.ajax_url,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:r.toString()});case 8:if((o=e.sent).success){e.next=13;break}throw a=(null===(i=o.data)||void 0===i?void 0:i.message)||"Failed to delete note",console.error("Delete note AJAX error:",a),new Error(a);case 13:return e.abrupt("return",o.data.notes);case 16:throw e.prev=16,e.t0=e.catch(0),console.error("Error deleting note:",e.t0),e.t0;case 20:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(t,n){return e.apply(this,arguments)}}(),NM=function(){var e=gM(hM().mark((function e(t,n){var r,o,i,a;return hM().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,(r=new URLSearchParams).append("action","srfm_delete_payment_log"),r.append("nonce",window.srfm_payment_admin.srfm_payment_admin_nonce||""),r.append("payment_id",t),r.append("log_index",n),e.next=8,ab()({url:window.srfm_payment_admin.ajax_url,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:r.toString()});case 8:if((o=e.sent).success){e.next=13;break}throw a=(null===(i=o.data)||void 0===i?void 0:i.message)||"Failed to delete log",console.error("Delete log AJAX error:",a),new Error(a);case 13:return e.abrupt("return",o.data.logs);case 16:throw e.prev=16,e.t0=e.catch(0),console.error("Error deleting log:",e.t0),e.t0;case 20:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(t,n){return e.apply(this,arguments)}}();const kM=(0,d.forwardRef)((({id:e,defaultValue:t="",value:n,size:r="sm",className:o="",disabled:i=!1,onChange:a=()=>{},error:s=!1,onError:l=()=>{},...c},f)=>{const m=(0,d.useMemo)((()=>e||`input-textarea-${Xh()}`),[e]),h=(0,d.useMemo)((()=>typeof n<"u"),[n]),[p,g]=(0,d.useState)(t),y=(0,d.useCallback)((()=>h?n:p),[h,n,p]),v=i?"hover:border-border-disabled":"hover:border-border-strong",b=s?"focus:border-focus-error-border focus:ring-field-color-error border-focus-error-border":"";return(0,u.jsx)("textarea",{ref:f,id:m,className:he("py-2 rounded border border-solid border-border-subtle bg-field-secondary-background font-normal placeholder-text-tertiary text-text-primary focus:outline-none transition ease-in-out duration-200",i?"border-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled":"",{sm:"px-3 rounded text-xs",md:"px-3 rounded-md text-sm",lg:"px-4 rounded-lg text-base"}[r],"focus:border-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2",v,b,o),disabled:i,onChange:e=>{if(i)return;const t=e.target.value;h||g(t),"function"==typeof a&&a(t)},onInvalid:l,value:y(),...c})}));kM.displayName="TextArea";const jM=hd("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),DM=hd("FileSearch",[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"ms7g94"}],["path",{d:"m9 18-1.5-1.5",key:"1j6qii"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]]),TM=hd("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);function SM(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const CM=function(e){var t=e.notes,n=e.isAddingNote,r=e.newNoteText,o=e.setNewNoteText,i=e.handleAddNoteClick,s=e.handleSaveNote,l=e.handleCancelNote,c=e.handleDeleteNote,u=e.addNoteMutation,d=e.deleteNoteMutation,f=e.onConfirmation,m=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return SM(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?SM(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,a.useState)(1),2),h=m[0],p=m[1],g=Math.ceil(((null==t?void 0:t.length)||0)/3),y=3*(h-1),v=y+3,b=(null==t?void 0:t.slice(y,v))||[];(0,a.useEffect)((function(){u.isSuccess&&!u.isPending&&p(1)}),[u.isSuccess,u.isPending]),(0,a.useEffect)((function(){if((null==t?void 0:t.length)>0){var e=Math.ceil(t.length/3);h>e&&p(e)}}),[null==t?void 0:t.length,h,3]);var w=(0,a.useCallback)((function(e){e&&e.focus()}),[]),x=t&&t.length>0;return React.createElement("div",{className:"bg-background-primary border-0.5 border-solid border-border-subtle rounded-lg shadow-sm"},React.createElement("div",{className:"pb-0 px-4 pt-4"},React.createElement("div",{className:"flex items-center justify-between"},React.createElement("h3",{className:"text-base font-semibold text-text-primary"},(0,_u.__)("Notes","sureforms")),React.createElement(xe,{variant:"link",size:"xs",icon:n?React.createElement(gd,{className:"w-4 h-4"}):React.createElement(jM,{className:"w-4 h-4"}),iconPosition:"left",onClick:n?l:i,disabled:u.isPending||d.isPending,className:"text-link-primary hover:text-link-primary-hover"},n?(0,_u.__)("Cancel Note","sureforms"):(0,_u.__)("Add Note","sureforms")))),React.createElement("div",{className:"p-4 space-y-1 relative before:content-[''] before:block before:absolute before:inset-3 before:bg-background-secondary before:rounded-lg"},n&&React.createElement("div",{className:"bg-background-primary rounded-md p-3 relative shadow-sm"},React.createElement(kM,{ref:w,value:r,onChange:function(e){return o(e)},placeholder:(0,_u.__)("Add an internal note…","sureforms"),required:!0,size:"md",rows:5,className:"w-full",onKeyDown:function(e){(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&(e.preventDefault(),s(e))}}),React.createElement("div",{className:"flex gap-2 mt-2 justify-end"},React.createElement(xe,{variant:"primary",size:"sm",onClick:s,disabled:u.isPending||!r.trim()},(0,_u.__)("Submit Note","sureforms")))),x?b.map((function(e,t){var n=y+t;return React.createElement("div",{key:t,className:"bg-background-primary rounded-md p-2 relative shadow-sm flex items-start justify-between gap-3"},React.createElement("div",{className:"flex-1 flex flex-col gap-2"},React.createElement(Bu,{className:"text-sm font-semibold text-text-secondary"},(0,_u.sprintf)((0,_u.__)("Submitted by %1$s - %2$s","sureforms"),e.created_by_user_name,function(e){if(!e)return"N/A";var t=new Date(e);if(isNaN(t.getTime()))return"N/A";var n=t.getDate(),r=t.toLocaleString("en-US",{month:"long"}).toLowerCase(),o=t.getFullYear();return"".concat(n).concat(function(e){var t=["th","st","nd","rd"],n=e%100;return t[(n-20)%10]||t[n]||t[0]}(n)," ").concat(r," ").concat(o)}(e.created_at))),React.createElement(Bu,{size:14,weight:400,color:"primary",className:"[overflow-wrap:anywhere]"},e.text)),React.createElement(xe,{variant:"ghost",size:"xs",icon:React.createElement(pd,{className:"w-4 h-4"}),onClick:function(){return e=n,void f({title:(0,_u.__)("Delete note?","sureforms"),description:(0,_u.__)("This action cannot be undone. The note will be permanently deleted.","sureforms"),confirmLabel:(0,_u.__)("Delete Permanently","sureforms"),onConfirm:function(){return c(e)},isLoading:d.isPending,destructive:!0});var e},disabled:d.isPending,className:"text-icon-secondary hover:text-icon-primary flex-shrink-0","aria-label":(0,_u.__)("Delete note","sureforms")}))})):!n&&React.createElement("div",{className:"relative flex items-center justify-center py-6 px-1 gap-2.5"},React.createElement(DM,{className:"text-icon-secondary size-4"}),React.createElement(Bu,{color:"secondary",size:12,weight:400},(0,_u.__)("Add an internal note.","sureforms")))),x&&g>1&&React.createElement("div",{className:"w-full flex items-center justify-end pb-3 pr-3 pl-3"},React.createElement("div",{className:"flex items-center gap-2"},React.createElement(xe,{variant:"ghost",size:"xs",icon:React.createElement(TM,null),iconPosition:"left",onClick:function(){p((function(e){return Math.max(e-1,1)}))},disabled:1===h},(0,_u.__)("Previous","sureforms")),React.createElement(xe,{variant:"ghost",size:"xs",icon:React.createElement(Dx,null),iconPosition:"right",onClick:function(){p((function(e){return Math.min(e+1,g)}))},disabled:h===g},(0,_u.__)("Next","sureforms")))))};function RM(e){return RM="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},RM(e)}function OM(e,t){if(e){if("string"==typeof e)return AM(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?AM(e,t):void 0}}function AM(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const IM=function(e){var t=e.logs,n=e.handleDeleteLog,r=e.deleteLogMutation,o=e.onConfirmation,i=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||OM(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,a.useState)(1),2),s=i[0],l=i[1],c=t?function(e){return function(e){if(Array.isArray(e))return AM(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||OM(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t).reverse():[],u=Math.ceil(((null==c?void 0:c.length)||0)/3),d=3*(s-1),f=d+3,m=(null==c?void 0:c.slice(d,f))||[];(0,a.useEffect)((function(){if((null==c?void 0:c.length)>0){var e=Math.ceil(c.length/3);s>e&&l(e)}}),[null==c?void 0:c.length,s,3]);var h=t&&t.length>0;return React.createElement("div",{className:"bg-background-primary border-0.5 border-solid border-border-subtle rounded-lg shadow-sm"},React.createElement("div",{className:"pb-0 px-4 pt-4"},React.createElement("h3",{className:"text-base font-semibold text-text-primary"},(0,_u.__)("Payment Logs","sureforms"))),React.createElement("div",{className:"p-4 space-y-1 relative before:content-[''] before:block before:absolute before:inset-3 before:bg-background-secondary before:rounded-lg"},h?m.map((function(e,i){var a=d+i,s=t.length-1-a;if(!e||"object"!==RM(e))return null;var l=e.title||(0,_u.__)("Untitled Log","sureforms"),c=Array.isArray(e.messages)?e.messages:[],u=React.createElement(xe,{variant:"ghost",size:"xs",icon:React.createElement(pd,{className:"!size-4"}),onClick:function(){return e=s,void o({title:(0,_u.__)("Delete log?","sureforms"),description:(0,_u.__)("This action cannot be undone. The log will be permanently deleted.","sureforms"),confirmLabel:(0,_u.__)("Delete Permanently","sureforms"),onConfirm:function(){return n(e)},isLoading:r.isPending,destructive:!0});var e},disabled:r.isPending,className:"text-icon-secondary hover:text-icon-primary","aria-label":(0,_u.__)("Delete log","sureforms")});return React.createElement("div",{key:i,className:"bg-background-primary rounded-md p-3 relative shadow-sm flex items-start justify-between gap-3"},React.createElement("div",{className:"flex-1 space-y-2"},React.createElement(Bu,{className:"text-sm font-semibold text-text-secondary"},l,(null==e?void 0:e.created_at)&&" at ".concat(Nv(e.created_at))),c.length>0&&React.createElement("div",{className:"flex flex-col gap-2"},c.map((function(e,t){return React.createElement(Bu,{key:t,size:14,weight:400,color:"primary",className:"[overflow-wrap:anywhere]"},e||"")})))),u)})):React.createElement("div",{className:"relative text-center py-4 text-text-secondary"},(0,_u.__)("No logs available.","sureforms"))),h&&React.createElement("div",{className:"w-full flex items-center justify-end pb-3 pr-3 pl-3"},React.createElement("div",{className:"flex items-center gap-2"},React.createElement(xe,{variant:"ghost",size:"xs",icon:React.createElement(TM,null),iconPosition:"left",onClick:function(){l((function(e){return Math.max(e-1,1)}))},disabled:1===s},(0,_u.__)("Previous","sureforms")),React.createElement(xe,{variant:"ghost",size:"xs",icon:React.createElement(Dx,null),iconPosition:"right",onClick:function(){l((function(e){return Math.min(e+1,u)}))},disabled:s===u},(0,_u.__)("Next","sureforms")))))},_M=function(e){var t=e.title,n=e.onBack,r=e.paymentData,o=e.handleViewEntry,i=r.entry_id,a=jv(r);return React.createElement("div",{className:"flex items-center justify-between gap-3"},React.createElement("div",{className:"flex items-center gap-3"},React.createElement(xe,{onClick:n,variant:"ghost",size:"md",className:"p-1",icon:React.createElement(TM,null)}),React.createElement(Bu,{size:24,color:"primary",weight:600},(0,_u.sprintf)((0,_u.__)("%1$s %2$s","sureforms"),t,a))),React.createElement(xe,{variant:"primary",size:"md",icon:React.createElement(fM,{className:"!size-4"}),iconPosition:"right",onClick:o,disabled:!i},(0,_u.__)("View Form Data","sureforms")))},PM=function(e){var t,n,r,o=e.loading,i=e.error,a=e.notFound,s=e.setViewSinglePayment;return o?React.createElement("div",{className:ex("px-8 pb-8 bg-background-secondary min-h-screen space-y-6",!(null!==(t=window.srfm_admin)&&void 0!==t&&null!==(t=t.notices)&&void 0!==t&&t.length)&&"pt-8")},React.createElement("div",{className:"flex items-center gap-3 mx-auto"},React.createElement(Hv,{className:"w-8 h-8 rounded-md"}),React.createElement(Hv,{className:"h-8 w-48"})),React.createElement("div",{className:"mx-auto"},React.createElement("div",{className:"space-y-6"},React.createElement("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6"},React.createElement("div",{className:"lg:col-span-2 space-y-6"},React.createElement("div",{className:"bg-background-primary border-0.5 border-solid border-border-subtle rounded-lg shadow-sm"},React.createElement("div",{className:"pb-0 px-4 pt-4"},React.createElement(Hv,{className:"h-5 w-32"})),React.createElement("div",{className:"p-4 space-y-1 relative before:content-[''] before:block before:absolute before:inset-3 before:bg-background-secondary before:rounded-lg"},React.createElement("div",{className:"bg-background-primary rounded-md shadow-sm p-3"},React.createElement("div",{className:"space-y-2"},React.createElement("div",{className:"flex gap-4"},React.createElement(Hv,{className:"w-24 h-4"}),React.createElement(Hv,{className:"w-24 h-4"}),React.createElement(Hv,{className:"w-32 h-4"}),React.createElement(Hv,{className:"flex-1 h-4"})),React.createElement("div",{className:"flex gap-4"},React.createElement(Hv,{className:"w-20 h-4"}),React.createElement(Hv,{className:"w-16 h-4"}),React.createElement(Hv,{className:"w-28 h-4"}),React.createElement(Hv,{className:"flex-1 h-4"})))))),React.createElement("div",{className:"bg-background-primary border-0.5 border-solid border-border-subtle rounded-lg shadow-sm"},React.createElement("div",{className:"pb-0 px-4 pt-4"},React.createElement("div",{className:"flex items-center justify-between"},React.createElement(Hv,{className:"h-5 w-40"}),React.createElement(Hv,{className:"w-24 h-6 rounded-md"}))),React.createElement("div",{className:"p-4 space-y-1 relative before:content-[''] before:block before:absolute before:inset-3 before:bg-background-secondary before:rounded-lg"},Array.from({length:8}).map((function(e,t){return React.createElement("div",{key:t,className:"bg-background-primary rounded-md shadow-sm p-3"},React.createElement("div",{className:"flex gap-4"},React.createElement(Hv,{className:"w-32 h-4"}),React.createElement(Hv,{className:"flex-1 h-4"})))}))))),React.createElement("div",{className:"space-y-4"},React.createElement("div",{className:"bg-background-primary border-0.5 border-solid border-border-subtle rounded-lg shadow-sm"},React.createElement("div",{className:"pb-0 px-4 pt-4"},React.createElement("div",{className:"flex items-center justify-between"},React.createElement(Hv,{className:"h-5 w-24"}),React.createElement(Hv,{className:"w-20 h-6 rounded-md"}))),React.createElement("div",{className:"p-4 space-y-1 relative before:content-[''] before:block before:absolute before:inset-3 before:bg-background-secondary before:rounded-lg"},React.createElement("div",{className:"bg-background-primary rounded-md shadow-sm p-3"},React.createElement(Hv,{className:"w-full h-16"})))),React.createElement("div",{className:"bg-background-primary border-0.5 border-solid border-border-subtle rounded-lg shadow-sm"},React.createElement("div",{className:"pb-0 px-4 pt-4"},React.createElement(Hv,{className:"h-5 w-28"})),React.createElement("div",{className:"p-4 space-y-1 relative before:content-[''] before:block before:absolute before:inset-3 before:bg-background-secondary before:rounded-lg"},Array.from({length:3}).map((function(e,t){return React.createElement("div",{key:t,className:"bg-background-primary rounded-md shadow-sm p-3"},React.createElement("div",{className:"space-y-2"},React.createElement(Hv,{className:"h-4 w-3/4"}),React.createElement(Hv,{className:"h-3 w-1/2"})))}))))))))):i?React.createElement("div",{className:ex("px-8 pb-8 bg-background-secondary min-h-screen",!(null!==(n=window.srfm_admin)&&void 0!==n&&null!==(n=n.notices)&&void 0!==n&&n.length)&&"pt-8")},React.createElement("div",{className:"flex items-center justify-center h-96"},React.createElement("div",{className:"text-center"},React.createElement(Bu,{className:"text-red-600 mb-4"},(0,_u.__)("Error loading payment details","sureforms")),React.createElement(xe,{variant:"outline",onClick:function(){return s(!1)}},(0,_u.__)("Back to Payments","sureforms"))))):a?React.createElement("div",{className:ex("px-8 pb-8 bg-background-secondary min-h-screen",!(null!==(r=window.srfm_admin)&&void 0!==r&&null!==(r=r.notices)&&void 0!==r&&r.length)&&"pt-8")},React.createElement("div",{className:"flex items-center justify-center h-96"},React.createElement("div",{className:"text-center"},React.createElement(Bu,{className:"mb-4"},(0,_u.__)("Payment not found","sureforms")),React.createElement(xe,{variant:"outline",onClick:function(){return s(!1)}},(0,_u.__)("Back to Payments","sureforms"))))):null};function LM(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return zM(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zM(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zM(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const FM=function(e){var t=e.isOpen,n=e.setIsOpen,r=e.payment,o=e.queryKey,i=uc(),s=LM((0,a.useState)(""),2),l=s[0],c=s[1],u=LM((0,a.useState)(""),2),d=u[0],f=u[1],m=r?parseFloat(r.total_amount):0,h=r?parseFloat(r.refunded_amount||0):0,p=m-h;(0,a.useEffect)((function(){t&&r&&c(p.toFixed(2))}),[t,r,p]);var g=Qx({mutationFn:vM,onSuccess:function(){i.invalidateQueries(o),i.invalidateQueries(["payments"]),y()},onError:function(e){console.error("Refund failed:",e),alert((0,_u.__)("Refund failed. Please try again.","sureforms"))}}),y=function(){n(!1),c(""),f("")},v=function(){if(!r||!l)return"";var e=parseFloat(l);if(isNaN(e)||e<=0)return{type:"error",message:(0,_u.__)("Please enter a valid refund amount.","sureforms")};if(e>p)return{type:"error",message:(0,_u.sprintf)((0,_u.__)("Amount cannot exceed %s.","sureforms"),Ev(p,r.currency))};if(Math.abs(e-p)<.01)return{type:"info",message:(0,_u.sprintf)((0,_u.__)("This will issue a complete refund of %s. The entire payment will be refunded.","sureforms"),Ev(e,r.currency))};var t=p-e;return{type:"warning",message:(0,_u.sprintf)((0,_u.__)("This will issue a partial refund of %1$s. Remaining balance of %2$s will still be valid.","sureforms"),Ev(e,r.currency),Ev(t,r.currency))}}(),b=v&&"error"!==v.type;return r?React.createElement(sx,{open:t,setOpen:n,design:"simple",exitOnEsc:!0,scrollLock:!0},React.createElement(sx.Backdrop,null),React.createElement(sx.Panel,null,React.createElement(sx.Header,null,React.createElement("div",{className:"flex items-center justify-between"},React.createElement(sx.Title,null,(0,_u.__)("Refund payment","sureforms")),React.createElement(sx.CloseButton,{onClick:y})),React.createElement(sx.Description,null,(0,_u.sprintf)((0,_u.__)("Process refund for payment #%s. The refunded amount will be sent to the customer's original payment method.","sureforms"),r.id))),React.createElement(sx.Body,null,React.createElement("div",{className:"space-y-4"},React.createElement("div",null,React.createElement(yp,{className:"text-sm font-medium"},(0,_u.__)("Refund amount","sureforms")),React.createElement(vp,{type:"number",value:l,onChange:c,placeholder:(0,_u.sprintf)((0,_u.__)("Max: %s","sureforms"),p.toFixed(2)),max:p,min:"0.01",step:"0.01",className:"mt-1"}),React.createElement(Bu,{className:"text-xs text-text-secondary mt-1"},(0,_u.sprintf)((0,_u.__)("Maximum refundable amount: %s","sureforms"),Ev(p,r.currency)))),React.createElement("div",null,React.createElement(yp,{className:"text-sm font-medium"},(0,_u.__)("Refund notes (optional)","sureforms")),React.createElement(kM,{value:d,onChange:f,placeholder:(0,_u.__)("Add a reason or note for this refund…","sureforms"),className:"mt-1 w-full",rows:3}),React.createElement(Bu,{className:"text-xs text-text-secondary mt-1"},(0,_u.__)("This note will be stored with the refund record for future reference.","sureforms"))),v&&React.createElement("div",{className:"p-3 rounded-md ".concat("error"===v.type?"bg-red-50 border border-red-200":"warning"===v.type?"bg-yellow-50 border border-yellow-200":"bg-blue-50 border border-blue-200")},React.createElement(Bu,{className:"text-sm ".concat("error"===v.type?"text-red-700":"warning"===v.type?"text-yellow-700":"text-blue-700")},v.message)),h>0&&React.createElement("div",{className:"p-3 border border-border-subtle rounded-md bg-background-secondary"},React.createElement(Bu,{className:"text-sm text-text-secondary"},(0,_u.sprintf)((0,_u.__)("Already refunded: %s","sureforms"),Ev(h,r.currency)))))),React.createElement(sx.Footer,{className:"flex justify-end gap-2"},React.createElement(xe,{variant:"outline",onClick:y,disabled:g.isPending},(0,_u.__)("Cancel","sureforms")),React.createElement(xe,{variant:"primary",onClick:function(){if(r&&l){var e,t=parseFloat(l),n=Math.abs(t-p)<.01?"full":"partial",o=(e=t,function(e){var t,n;return((null===(t=window.srfm_payment_admin)||void 0===t?void 0:t.zeroDecimalCurrencies)||(null===(n=window.srfm_admin)||void 0===n||null===(n=n.payments)||void 0===n?void 0:n.zero_decimal_currencies)||[]).includes(null==e?void 0:e.toUpperCase())}(r.currency)?Math.round(e):Math.round(100*e));g.mutate({paymentId:r.id,transactionId:r.transaction_id,refundAmount:o,refundType:n,refundNotes:d})}},disabled:g.isPending||!b||!l},g.isPending?(0,_u.__)("Processing…","sureforms"):(0,_u.__)("Process Refund","sureforms"))))):null};function UM(e){return UM="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},UM(e)}function BM(){BM=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function l(e,t,n,r){return Object.defineProperty(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r})}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function c(t,n,r,o){var i=n&&n.prototype instanceof f?n:f,a=Object.create(i.prototype);return l(a,"_invoke",function(t,n,r){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var l=x(s,r);if(l){if(l===d)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(1===o)throw o=4,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=3;var c=u(t,n,r);if("normal"===c.type){if(o=r.done?4:2,c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=4,r.method="throw",r.arg=c.arg)}}}(t,r,new N(o||[])),!0),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var d={};function f(){}function m(){}function h(){}var p={};l(p,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(k([])));y&&y!==n&&r.call(y,i)&&(p=y);var v=h.prototype=f.prototype=Object.create(p);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function n(o,i,a,s){var l=u(e[o],e,i);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==UM(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;l(this,"_invoke",(function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}),!0)}function x(t,n){var r=n.method,o=t.i[r];if(o===e)return n.delegate=null,"throw"===r&&t.i.return&&(n.method="return",n.arg=e,x(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=u(o,t.i,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,d;var a=i.arg;return a?a.done?(n[t.r]=a.value,n.next=t.n,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function M(e){this.tryEntries.push(e)}function E(t){var n=t[4]||{};n.type="normal",n.arg=e,t[4]=n}function N(e){this.tryEntries=[[-1]],e.forEach(M,this),this.reset(!0)}function k(t){if(null!=t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(UM(t)+" is not iterable")}return m.prototype=h,l(v,"constructor",h),l(h,"constructor",m),m.displayName=l(h,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,s,"GeneratorFunction")),e.prototype=Object.create(v),e},t.awrap=function(e){return{__await:e}},b(w.prototype),l(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new w(c(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},b(v),l(v,s,"Generator"),l(v,i,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},t.values=k,N.prototype={constructor:N,reset:function(t){if(this.prev=this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(E),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0][4];if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(e){a.type="throw",a.arg=t,n.next=e}for(var o=n.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],s=this.prev,l=i[1],c=i[2];if(-1===i[0])return r("end"),!1;if(!l&&!c)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=s){if(s<l)return this.method="next",this.arg=e,r(l),!0;if(s<c)return r(c),!1}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r[0]>-1&&r[0]<=this.prev&&this.prev<r[2]){var o=r;break}}o&&("break"===e||"continue"===e)&&o[0]<=t&&t<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o[2],d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n[2]===e)return this.complete(n[4],n[3]),E(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n[0]===e){var r=n[4];if("throw"===r.type){var o=r.arg;E(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={i:k(t),r:n,n:r},"next"===this.method&&(this.arg=e),d}},t}function YM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function QM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?YM(Object(n),!0).forEach((function(t){VM(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YM(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function VM(e,t,n){return(t=function(e){var t=function(e){if("object"!=UM(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=UM(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==UM(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WM(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function HM(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||qM(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qM(e,t){if(e){if("string"==typeof e)return $M(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$M(e,t):void 0}}function $M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const GM=function(){var e=lu().id,t=au(),n=uc(),r=e?parseInt(e):null,o=Bx({queryKey:["payment",r],queryFn:function(){return yM(r)},enabled:!!r,staleTime:3e5}),i=o.data,s=o.isLoading,l=o.error,c=HM((0,a.useState)([]),2),u=c[0],d=c[1],f=HM((0,a.useState)([]),2),m=f[0],h=f[1],p=HM((0,a.useState)(!1),2),g=p[0],y=p[1],v=HM((0,a.useState)(!1),2),b=v[0],w=v[1],x=HM((0,a.useState)(""),2),M=x[0],E=x[1],N=HM((0,a.useState)({open:!1,title:"",description:"",confirmLabel:"",onConfirm:null,isLoading:!1,destructive:!0}),2),k=N[0],j=N[1];(0,a.useEffect)((function(){null!=i&&i.notes&&d(i.notes)}),[null==i?void 0:i.notes]),(0,a.useEffect)((function(){null!=i&&i.logs&&h(i.logs)}),[null==i?void 0:i.logs]);var D=Qx({mutationFn:function(e){var t=e.paymentId,n=e.noteText;return MM(t,n)},onSuccess:function(e){d(e),E(""),w(!1),n.invalidateQueries(["payment",r])},onError:function(){alert((0,_u.__)("Failed to add note. Please try again.","sureforms"))}}),T=Qx({mutationFn:function(e){var t=e.paymentId,n=e.noteIndex;return EM(t,n)},onSuccess:function(e){d(e),n.invalidateQueries(["payment",r])},onError:function(){alert((0,_u.__)("Failed to delete note. Please try again.","sureforms"))}}),S=Qx({mutationFn:function(e){var t=e.paymentId,n=e.logIndex;return NM(t,n)},onSuccess:function(e){h(e),n.invalidateQueries(["payment",r])},onError:function(){alert((0,_u.__)("Failed to delete log. Please try again.","sureforms"))}});if(s||l||!i)return React.createElement(PM,{loading:s,error:l,notFound:!i,setViewSinglePayment:function(){return t("/")}});var C=function(e){var t;j({open:!0,title:e.title,description:e.description,confirmLabel:e.confirmLabel,onConfirm:(t=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){WM(i,r,o,a,s,"next",e)}function s(e){WM(i,r,o,a,s,"throw",e)}a(void 0)}))}}(BM().mark((function t(){return BM().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.onConfirm();case 3:j((function(e){return QM(QM({},e),{},{open:!1})})),t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),console.error("Confirmation action failed:",t.t0);case 9:case"end":return t.stop()}}),t,null,[[0,6]])}))),function(){return t.apply(this,arguments)}),isLoading:e.isLoading||!1,destructive:!1!==e.destructive})},R=[{id:i.id,amount_paid:parseFloat(i.total_amount),status:i.status,date_time:i.created_at,refunded_amount:parseFloat(i.refunded_amount||0)}],O=React.createElement("div",{className:"overflow-x-auto bg-background-primary rounded-md shadow-sm"},React.createElement(zv,{className:"w-full"},React.createElement(zv.Head,null,React.createElement(zv.HeadCell,null,(0,_u.__)("Amount","sureforms")),React.createElement(zv.HeadCell,null,(0,_u.__)("Status","sureforms")),React.createElement(zv.HeadCell,null,(0,_u.__)("Transaction Date","sureforms")),React.createElement(zv.HeadCell,{className:"w-1/6 text-right"},(0,_u.__)("Action","sureforms"))),React.createElement(zv.Body,null,R.map((function(e){var t=parseFloat(e.amount_paid)===parseFloat(e.refunded_amount)||"refunded"===e.status;return React.createElement(zv.Row,{key:e.id},React.createElement(zv.Cell,null,e.refunded_amount>0?React.createElement(Dv,{amount:e.amount_paid,partialAmount:e.amount_paid-e.refunded_amount,currency:i.currency}):Ev(e.amount_paid,i.currency)),React.createElement(zv.Cell,null,React.createElement(op,{variant:Mv("active"===e.status?"succeeded":e.status),size:"xs",label:kv("active"===e.status?"succeeded":e.status),type:"pill",className:"w-fit"})),React.createElement(zv.Cell,null,Nv(e.date_time,!0)),React.createElement(zv.Cell,{className:"flex justify-end"},React.createElement(xe,{icon:React.createElement(dM,{className:"!size-3"}),size:"xs",variant:"outline",onClick:function(){return e.id,void y(!0)},disabled:t},(0,_u.__)("Refund","sureforms"))))}))))),A=[{id:"payment-id",title:(0,_u.__)("Payment ID","sureforms"),value:"#".concat(i.id)},{id:"form-name",title:(0,_u.__)("Form Name","sureforms"),value:i.form_url?React.createElement(xe,{icon:React.createElement(fM,{className:"!size-4"}),iconPosition:"right",variant:"link",size:"sm",className:"h-full text-link-primary text-sm font-semibold no-underline hover:no-underline hover:text-link-primary-hover px-1 content-center [box-shadow:none] focus:[box-shadow:none] focus:outline-none",onClick:function(){return window.open(i.form_url,"_blank","noopener,noreferrer")}},i.form_title||(0,_u.__)("Unknown Form","sureforms")):i.form_title||(0,_u.__)("Unknown Form","sureforms")},{id:"payment-mode",title:(0,_u.__)("Payment Mode","sureforms"),value:"live"===i.mode?React.createElement(op,{className:"w-fit",variant:"green",size:"xs",label:(0,_u.__)("Live Mode","sureforms")}):React.createElement(op,{className:"w-fit",size:"xs",variant:"yellow",label:(0,_u.__)("Test Mode","sureforms")})},{id:"payment-method",title:(0,_u.__)("Payment Method","sureforms"),value:Sv(null==i?void 0:i.gateway)},{id:"payment-type",title:(0,_u.__)("Payment Type","sureforms"),value:i.payment_type||(0,_u.__)("One Time","sureforms")}].concat(function(e){return function(e){if(Array.isArray(e))return $M(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||qM(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(i.parent_subscription_id&&parseInt(i.parent_subscription_id)>0?[{id:"parent-subscription",title:(0,_u.__)("Parent Subscription","sureforms"),value:React.createElement(xe,{icon:React.createElement(fM,{className:"!size-4"}),iconPosition:"right",variant:"link",size:"sm",className:"text-link-primary hover:text-link-primary-hover text-sm font-semibold no-underline hover:no-underline px-0 [box-shadow:none] focus:[box-shadow:none] focus:outline-none",onClick:function(){return function(e){if(e){var n="string"==typeof e&&/^\d+$/.test(e)?parseInt(e,10):e;if("number"==typeof n&&!isNaN(n)&&n>0)return console.log("Navigating to parent subscription with ID:",n),void t("/payment/".concat(n,"?type=subscription"));console.error("handleViewSubscription: Invalid parent subscription ID",{received:e,converted:n,type:UM(e)}),alert((0,_u.__)("Cannot navigate to parent subscription. Invalid subscription ID.","sureforms"))}else console.error("handleViewSubscription: No parent subscription ID provided",{paymentData:{id:null==i?void 0:i.id,parent_subscription_id:null==i?void 0:i.parent_subscription_id,subscription_id:null==i?void 0:i.subscription_id}})}(i.parent_subscription_id)}},jv(i))}]:[]),[{id:"transaction-id",title:(0,_u.__)("Transaction ID","sureforms"),value:i.transaction_id||(0,_u.__)("N/A","sureforms")},{id:"customer-name",title:(0,_u.__)("Customer Name","sureforms"),value:i.customer_name||(0,_u.__)("Guest","sureforms")},{id:"customer-email",title:(0,_u.__)("Customer Email","sureforms"),value:i.customer_email||(0,_u.__)("N/A","sureforms")},{id:"received-on",title:(0,_u.__)("Received On","sureforms"),value:Nv(i.created_at,!0)}]),I=React.createElement("div",{className:"overflow-x-auto bg-background-primary rounded-md shadow-sm"},React.createElement(zv,{className:"w-full"},React.createElement(zv.Body,null,A.map((function(e,t){return React.createElement(zv.Row,{key:t},React.createElement(zv.Cell,{className:"w-1/3 font-medium text-text-primary"},e.title),React.createElement(zv.Cell,{className:"text-text-secondary"},"function"==typeof(null==e?void 0:e.render)?e.render(e.value):e.value))}))))),_=(0,ud.applyFilters)("srfm_view_single_payment_in_plate_form",React.createElement(xe,{icon:React.createElement(fM,{className:"!size-4"}),iconPosition:"right",variant:"link",size:"xs",className:"text-link-primary hover:text-link-primary-hover",onClick:function(){if(null!=i&&i.transaction_id){var e="test"===i.mode,t="".concat(e?"https://dashboard.stripe.com/test/payments":"https://dashboard.stripe.com/payments","/").concat(i.transaction_id);window.open(t,"_blank")}},disabled:!(null!=i&&i.transaction_id)},(0,_u.__)("View In Stripe","sureforms")),i),P=React.createElement(React.Fragment,null,React.createElement("div",{className:"bg-background-primary border-0.5 border-solid border-border-subtle rounded-lg shadow-sm"},React.createElement("div",{className:"pb-0 px-4 pt-4"},React.createElement("h3",{className:"text-base font-semibold text-text-primary"},(0,_u.__)("Billing Details","sureforms"))),React.createElement("div",{className:"p-4 space-y-1 relative before:content-[''] before:block before:absolute before:inset-3 before:bg-background-secondary before:rounded-lg"},O)),React.createElement("div",{className:"bg-background-primary border-0.5 border-solid border-border-subtle rounded-lg shadow-sm"},React.createElement("div",{className:"pb-0 px-4 pt-4"},React.createElement("div",{className:"flex items-center justify-between"},React.createElement("h3",{className:"text-sm font-semibold text-text-primary"},(0,_u.__)("Payment Information","sureforms")),_)),React.createElement("div",{className:"p-4"},I))),L=React.createElement(React.Fragment,null,React.createElement(CM,{notes:u,isAddingNote:b,newNoteText:M,setNewNoteText:E,handleAddNoteClick:function(){w(!0)},handleSaveNote:function(){M.trim()&&D.mutate({paymentId:i.id,noteText:M})},handleCancelNote:function(){E(""),w(!1)},handleDeleteNote:function(e){return new Promise((function(t,n){T.mutate({paymentId:i.id,noteIndex:e},{onSuccess:function(){t()},onError:function(e){n(e)}})}))},addNoteMutation:D,deleteNoteMutation:T,onConfirmation:C}),React.createElement(IM,{logs:m,handleDeleteLog:function(e){return new Promise((function(t,n){S.mutate({paymentId:i.id,logIndex:e},{onSuccess:function(){t()},onError:function(e){n(e)}})}))},deleteLogMutation:S,onConfirmation:C}));return React.createElement(React.Fragment,null,React.createElement(_M,{title:(0,_u.__)("Order ID","sureforms"),paymentData:i,handleViewEntry:function(){null!=i&&i.entry_id&&window.open("".concat(window.location.origin,"/wp-admin/admin.php?page=sureforms_entries#/entry/").concat(i.entry_id),"_blank")},onBack:function(){t("/")}}),React.createElement("div",{className:"mx-auto"},React.createElement("div",{className:"space-y-6"},React.createElement("div",{className:"space-y-6"},React.createElement("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6"},React.createElement("div",{className:"lg:col-span-2 space-y-6"},P),React.createElement("div",{className:"space-y-4"},L))))),React.createElement(FM,{isOpen:g,setIsOpen:y,payment:i,queryKey:["payment",r]}),React.createElement(jx,{isOpen:k.open,onCancel:function(){return j((function(e){return QM(QM({},e),{},{open:!1})}))},onConfirm:k.onConfirm,title:k.title,description:k.description,confirmButtonText:k.confirmLabel,destructiveConfirmButton:k.destructive}))},KM=hd("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);function ZM(e){return ZM="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ZM(e)}function XM(){XM=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function l(e,t,n,r){return Object.defineProperty(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r})}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function c(t,n,r,o){var i=n&&n.prototype instanceof f?n:f,a=Object.create(i.prototype);return l(a,"_invoke",function(t,n,r){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var l=x(s,r);if(l){if(l===d)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(1===o)throw o=4,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=3;var c=u(t,n,r);if("normal"===c.type){if(o=r.done?4:2,c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=4,r.method="throw",r.arg=c.arg)}}}(t,r,new N(o||[])),!0),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var d={};function f(){}function m(){}function h(){}var p={};l(p,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(k([])));y&&y!==n&&r.call(y,i)&&(p=y);var v=h.prototype=f.prototype=Object.create(p);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function n(o,i,a,s){var l=u(e[o],e,i);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==ZM(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;l(this,"_invoke",(function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}),!0)}function x(t,n){var r=n.method,o=t.i[r];if(o===e)return n.delegate=null,"throw"===r&&t.i.return&&(n.method="return",n.arg=e,x(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=u(o,t.i,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,d;var a=i.arg;return a?a.done?(n[t.r]=a.value,n.next=t.n,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function M(e){this.tryEntries.push(e)}function E(t){var n=t[4]||{};n.type="normal",n.arg=e,t[4]=n}function N(e){this.tryEntries=[[-1]],e.forEach(M,this),this.reset(!0)}function k(t){if(null!=t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(ZM(t)+" is not iterable")}return m.prototype=h,l(v,"constructor",h),l(h,"constructor",m),m.displayName=l(h,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,s,"GeneratorFunction")),e.prototype=Object.create(v),e},t.awrap=function(e){return{__await:e}},b(w.prototype),l(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new w(c(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},b(v),l(v,s,"Generator"),l(v,i,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},t.values=k,N.prototype={constructor:N,reset:function(t){if(this.prev=this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(E),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0][4];if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(e){a.type="throw",a.arg=t,n.next=e}for(var o=n.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],s=this.prev,l=i[1],c=i[2];if(-1===i[0])return r("end"),!1;if(!l&&!c)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=s){if(s<l)return this.method="next",this.arg=e,r(l),!0;if(s<c)return r(c),!1}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r[0]>-1&&r[0]<=this.prev&&this.prev<r[2]){var o=r;break}}o&&("break"===e||"continue"===e)&&o[0]<=t&&t<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o[2],d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n[2]===e)return this.complete(n[4],n[3]),E(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n[0]===e){var r=n[4];if("throw"===r.type){var o=r.arg;E(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={i:k(t),r:n,n:r},"next"===this.method&&(this.arg=e),d}},t}function JM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function eE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?JM(Object(n),!0).forEach((function(t){tE(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JM(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function tE(e,t,n){return(t=function(e){var t=function(e){if("object"!=ZM(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ZM(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ZM(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nE(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function rE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return oE(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oE(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const iE=function(){var e=lu().id,t=au(),n=uc(),r=e?parseInt(e):null,o=Bx({queryKey:["subscription",r],queryFn:function(){return bM(r)},enabled:!!r,staleTime:3e5}),i=o.data,s=o.isLoading,l=o.error,c=null==i?void 0:i.subscription,u=(null==i?void 0:i.payments)||[],d=Qx({mutationFn:wM,onSuccess:function(){n.invalidateQueries(["subscription",r]),n.invalidateQueries(["payments"]),D(!1)},onError:function(e){console.error("Cancel failed:",e),alert((0,_u.__)("Failed to cancel subscription. Please try again.","sureforms"))}}),f=Qx({mutationFn:xM,onSuccess:function(){n.invalidateQueries(["subscription",r]),n.invalidateQueries(["payments"]),C(!1)},onError:function(e){console.error("Pause failed:",e),alert((0,_u.__)("Failed to pause subscription. Please try again.","sureforms"))}}),m=Qx({mutationFn:function(e){var t=e.paymentId,n=e.noteText;return MM(t,n)},onSuccess:function(e){v(e),F(""),P(!1),n.invalidateQueries(["subscription",r])},onError:function(){alert((0,_u.__)("Failed to add note. Please try again.","sureforms"))}}),h=Qx({mutationFn:function(e){var t=e.paymentId,n=e.noteIndex;return EM(t,n)},onSuccess:function(e){v(e),n.invalidateQueries(["subscription",r])},onError:function(){alert((0,_u.__)("Failed to delete note. Please try again.","sureforms"))}}),p=Qx({mutationFn:function(e){var t=e.paymentId,n=e.logIndex;return NM(t,n)},onSuccess:function(e){x(e),n.invalidateQueries(["subscription",r])},onError:function(){alert((0,_u.__)("Failed to delete log. Please try again.","sureforms"))}}),g=rE((0,a.useState)([]),2),y=g[0],v=g[1],b=rE((0,a.useState)([]),2),w=b[0],x=b[1],M=rE((0,a.useState)(!1),2),E=M[0],N=M[1],k=rE((0,a.useState)(!1),2),j=k[0],D=k[1],T=rE((0,a.useState)(!1),2),S=T[0],C=T[1],R=rE((0,a.useState)(null),2),O=R[0],A=R[1],I=rE((0,a.useState)(!1),2),_=I[0],P=I[1],L=rE((0,a.useState)(""),2),z=L[0],F=L[1],U=rE((0,a.useState)({open:!1,title:"",description:"",confirmLabel:"",onConfirm:null,isLoading:!1,destructive:!0}),2),B=U[0],Y=U[1];if((0,a.useEffect)((function(){null!=c&&c.notes&&v(c.notes)}),[null==c?void 0:c.notes]),(0,a.useEffect)((function(){null!=c&&c.logs&&x(c.logs)}),[null==c?void 0:c.logs]),s||l||!c)return React.createElement(PM,{loading:s,error:l,notFound:!c,setViewSinglePayment:function(){return t("/")}});var Q=function(e){var t;Y({open:!0,title:e.title,description:e.description,confirmLabel:e.confirmLabel,onConfirm:(t=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){nE(i,r,o,a,s,"next",e)}function s(e){nE(i,r,o,a,s,"throw",e)}a(void 0)}))}}(XM().mark((function t(){return XM().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.onConfirm();case 3:Y((function(e){return eE(eE({},e),{},{open:!1})})),t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),console.error("Confirmation action failed:",t.t0);case 9:case"end":return t.stop()}}),t,null,[[0,6]])}))),function(){return t.apply(this,arguments)}),isLoading:e.isLoading||!1,destructive:!1!==e.destructive})},V=u||[],W=V.filter((function(e){return"active"===e.status||"paid"===e.status||"succeeded"===e.status||"partially_refunded"===e.status})).sort((function(e,t){return new Date(e.created_at)-new Date(t.created_at)}))[0],H=!!W&&(parseFloat(W.total_amount)===parseFloat(W.refunded_amount||0)||"refunded"===W.status),q=(0,ud.applyFilters)("srfm_view_subscription_payment_in_platform_button",React.createElement(xe,{icon:React.createElement(fM,{className:"!size-4"}),iconPosition:"right",variant:"link",size:"xs",className:"text-link-primary hover:text-link-primary-hover",onClick:function(){if(null!=c&&c.stripe_subscription_id){var e="test"===c.mode,t="".concat(e?"https://dashboard.stripe.com/test/subscriptions":"https://dashboard.stripe.com/subscriptions","/").concat(c.stripe_subscription_id);window.open(t,"_blank")}},disabled:!(null!=c&&c.stripe_subscription_id)},(0,_u.__)("View In Stripe","sureforms")),c),$=React.createElement(sx,{open:j,setOpen:D,design:"simple",exitOnEsc:!0,scrollLock:!0},React.createElement(sx.Backdrop,null),React.createElement(sx.Panel,null,React.createElement(sx.Header,null,React.createElement("div",{className:"flex items-center justify-between"},React.createElement(sx.Title,null,(0,_u.__)("Cancel Subscription","sureforms")),React.createElement(sx.CloseButton,{onClick:function(){return D(!1)}})),React.createElement(sx.Description,null,(0,_u.sprintf)((0,_u.__)("Are you sure you want to cancel subscription #%s? This action cannot be undone and the customer will lose access to their subscription benefits.","sureforms"),c.id))),React.createElement(sx.Body,null,React.createElement("div",{className:"space-y-4"},React.createElement("div",{className:"p-3 border border-red-200 rounded-md bg-red-50"},React.createElement(Bu,{className:"text-sm text-red-700"},(0,_u.__)("Warning: Canceling this subscription will immediately stop all future billing and the customer will lose access to subscription benefits.","sureforms"))))),React.createElement(sx.Footer,{className:"flex justify-end gap-2"},React.createElement(xe,{variant:"outline",onClick:function(){return D(!1)},disabled:d.isPending},(0,_u.__)("Keep Subscription","sureforms")),React.createElement(xe,{variant:"danger",onClick:function(){return d.mutate(r)},disabled:d.isPending},d.isPending?(0,_u.__)("Canceling…","sureforms"):(0,_u.__)("Cancel Subscription","sureforms"))))),G=React.createElement(sx,{open:S,setOpen:C,design:"simple",exitOnEsc:!0,scrollLock:!0},React.createElement(sx.Backdrop,null),React.createElement(sx.Panel,null,React.createElement(sx.Header,null,React.createElement("div",{className:"flex items-center justify-between"},React.createElement(sx.Title,null,(0,_u.__)("Pause Subscription","sureforms")),React.createElement(sx.CloseButton,{onClick:function(){return C(!1)}})),React.createElement(sx.Description,null,(0,_u.sprintf)((0,_u.__)("Are you sure you want to pause subscription #%s? The customer will not be charged until you resume the subscription.","sureforms"),c.id))),React.createElement(sx.Body,null,React.createElement("div",{className:"space-y-4"},React.createElement("div",{className:"p-3 border border-yellow-200 rounded-md bg-yellow-50"},React.createElement(Bu,{className:"text-sm text-yellow-700"},(0,_u.__)("Note: Pausing this subscription will stop billing temporarily. You can resume it later from the subscription details.","sureforms"))))),React.createElement(sx.Footer,{className:"flex justify-end gap-2"},React.createElement(xe,{variant:"outline",onClick:function(){return C(!1)},disabled:f.isPending},(0,_u.__)("Cancel","sureforms")),React.createElement(xe,{variant:"warning",onClick:function(){return f.mutate(r)},disabled:f.isPending},f.isPending?(0,_u.__)("Pausing…","sureforms"):(0,_u.__)("Pause Subscription","sureforms"))))),K=React.createElement("div",{className:"overflow-x-auto bg-background-primary rounded-md shadow-sm"},React.createElement(zv,{className:"w-full"},React.createElement(zv.Head,null,React.createElement(zv.HeadCell,null,(0,_u.__)("Amount","sureforms")),React.createElement(zv.HeadCell,null,(0,_u.__)("Status","sureforms")),React.createElement(zv.HeadCell,null,(0,_u.__)("Transaction Date","sureforms")),React.createElement(zv.HeadCell,{className:"w-20 text-right"},(0,_u.__)("Action","sureforms"))),React.createElement(zv.Body,null,V.map((function(e){return React.createElement(zv.Row,{key:e.id},React.createElement(zv.Cell,{className:"font-medium"},e.refunded_amount>0?React.createElement(Dv,{amount:e.total_amount,partialAmount:e.total_amount-e.refunded_amount,currency:c.currency}):Ev(e.total_amount,c.currency)),React.createElement(zv.Cell,null,React.createElement(op,{variant:Mv("active"===e.status?"succeeded":e.status),size:"xs",label:kv("active"===e.status?"succeeded":e.status),type:"pill",className:"w-fit"})),React.createElement(zv.Cell,null,Nv(e.created_at,!0)),React.createElement(zv.Cell,{className:"text-right flex justify-center"},React.createElement(xe,{icon:React.createElement(KM,{className:"!size-4"}),size:"xs",variant:"ghost",onClick:function(){var n;(n=e.id)&&t("/payment/".concat(n))}})))}))))),Z=[{title:(0,_u.__)("Subscription ID","sureforms"),value:"#".concat(c.id)},{title:(0,_u.__)("Form Name","sureforms"),value:c.form_url?React.createElement(xe,{icon:React.createElement(fM,{className:"!size-4"}),iconPosition:"right",variant:"link",size:"sm",className:"h-full text-link-primary text-sm font-semibold no-underline hover:no-underline hover:text-link-primary-hover px-1 content-center [box-shadow:none] focus:[box-shadow:none] focus:outline-none",onClick:function(){return window.open(c.form_url,"_blank","noopener,noreferrer")}},c.form_title||(0,_u.__)("Unknown Form","sureforms")):c.form_title||(0,_u.__)("Unknown Form","sureforms")},{id:"payment-mode",title:(0,_u.__)("Payment Mode","sureforms"),value:"live"===c.mode?React.createElement(op,{className:"w-fit",variant:"green",size:"xs",label:(0,_u.__)("Live Mode","sureforms")}):React.createElement(op,{className:"w-fit",variant:"yellow",size:"xs",label:(0,_u.__)("Test Mode","sureforms")})},{id:"payment-method",title:(0,_u.__)("Payment Method","sureforms"),value:Sv(null==c?void 0:c.gateway)},{title:(0,_u.__)("Payment Type","sureforms"),value:c.payment_type||(0,_u.__)("Subscription","sureforms")},{title:(0,_u.__)("Billing Cycle","sureforms"),value:c.interval||(0,_u.__)("N/A","sureforms")},{title:(0,_u.__)("Amount per Cycle","sureforms"),value:Ev(c.amount_per_cycle||c.total_amount,c.currency)},{title:(0,_u.__)("Stripe Subscription ID","sureforms"),value:c.stripe_subscription_id||(0,_u.__)("N/A","sureforms")},{id:"customer-name",title:(0,_u.__)("Customer Name","sureforms"),value:c.customer_name||(0,_u.__)("Guest","sureforms")},{id:"customer-email",title:(0,_u.__)("Customer Email","sureforms"),value:c.customer_email||(0,_u.__)("N/A","sureforms")},{title:(0,_u.__)("Customer ID","sureforms"),value:c.customer_id||(0,_u.__)("Guest","sureforms")},{title:(0,_u.__)("Received On","sureforms"),value:Nv(c.created_at,!0)}],X=React.createElement("div",{className:"overflow-x-auto bg-background-primary rounded-md shadow-sm"},React.createElement(zv,{className:"w-full"},React.createElement(zv.Body,null,Z.map((function(e,t){return React.createElement(zv.Row,{key:t},React.createElement(zv.Cell,{className:"w-1/3 font-medium text-text-primary"},e.title),React.createElement(zv.Cell,{className:"text-text-secondary"},"function"==typeof(null==e?void 0:e.render)?e.render(e.value):e.value))}))))),J=React.createElement(React.Fragment,null,React.createElement("div",{className:"bg-background-primary border-0.5 border-solid border-border-subtle rounded-lg shadow-sm"},React.createElement("div",{className:"pb-0 px-4 pt-4"},React.createElement("div",{className:"flex items-center justify-between"},React.createElement("div",{className:"flex items-center gap-2"},React.createElement("h3",{className:"text-base font-semibold text-text-primary"},(0,_u.__)("Subscription Details","sureforms")),React.createElement(op,{label:kv(c.subscription_status),variant:Mv(c.subscription_status),size:"xs",className:"max-w-fit",disableHover:!0})),React.createElement("div",{className:"flex gap-2"},React.createElement(xe,{onClick:function(){D(!0)},size:"xs",variant:"outline",disabled:"canceled"===c.subscription_status},(0,_u.__)("Cancel","sureforms")),React.createElement(xe,{onClick:function(){C(!0)},size:"xs",variant:"outline",disabled:"paused"===c.subscription_status||"canceled"===c.subscription_status,className:"!hidden"},(0,_u.__)("Pause","sureforms")),React.createElement(xe,{onClick:function(){var e,t=V.filter((function(e){return"active"===e.status||"paid"===e.status||"succeeded"===e.status||"partially_refunded"===e.status})).sort((function(e,t){return new Date(e.created_at)-new Date(t.created_at)}))[0];t?parseFloat(t.total_amount)===parseFloat(t.refunded_amount||0)||"refunded"===t.status?alert((0,_u.__)("This payment has already been fully refunded.","sureforms")):((e=t)&&A(e),N(!0)):alert((0,_u.__)("No paid EMI found to refund.","sureforms"))},size:"xs",variant:"outline",disabled:H||!W},(0,_u.__)("Refund","sureforms"))))),React.createElement("div",{className:"p-4 space-y-1 relative before:content-[''] before:block before:absolute before:inset-3 before:bg-background-secondary before:rounded-lg"},K)),React.createElement("div",{className:"bg-background-primary border-0.5 border-solid border-border-subtle rounded-lg shadow-sm"},React.createElement("div",{className:"pb-0 px-4 pt-4"},React.createElement("div",{className:"flex items-center justify-between"},React.createElement("h3",{className:"text-sm font-semibold text-text-primary"},(0,_u.__)("Payment Information","sureforms")),q)),React.createElement("div",{className:"p-4"},X))),ee=React.createElement(React.Fragment,null,React.createElement(CM,{notes:y,isAddingNote:_,newNoteText:z,setNewNoteText:F,handleAddNoteClick:function(){P(!0)},handleSaveNote:function(){z.trim()&&m.mutate({paymentId:c.id,noteText:z})},handleCancelNote:function(){F(""),P(!1)},handleDeleteNote:function(e){return new Promise((function(t,n){h.mutate({paymentId:c.id,noteIndex:e},{onSuccess:function(){t()},onError:function(e){n(e)}})}))},addNoteMutation:m,deleteNoteMutation:h,onConfirmation:Q}),React.createElement(IM,{logs:w,handleDeleteLog:function(e){return new Promise((function(t,n){p.mutate({paymentId:c.id,logIndex:e},{onSuccess:function(){t()},onError:function(e){n(e)}})}))},deleteLogMutation:p,onConfirmation:Q}));return React.createElement(React.Fragment,null,React.createElement(_M,{title:(0,_u.__)("Order ID","sureforms"),paymentData:c,handleViewEntry:function(){null!=c&&c.entry_id&&window.open("".concat(window.location.origin,"/wp-admin/admin.php?page=sureforms_entries#/entry/").concat(c.entry_id),"_blank")},onBack:function(){t("/")}}),React.createElement("div",{className:"mx-auto"},React.createElement("div",{className:"space-y-6"},React.createElement("div",{className:"space-y-6"},React.createElement("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6"},React.createElement("div",{className:"lg:col-span-2 space-y-6"},J),React.createElement("div",{className:"space-y-4"},ee))))),React.createElement(FM,{isOpen:E,setIsOpen:N,payment:O,queryKey:["subscription",r]}),$,G,React.createElement(jx,{isOpen:B.open,onCancel:function(){return Y((function(e){return eE(eE({},e),{},{open:!1})}))},onConfirm:B.onConfirm,title:B.title,description:B.description,confirmButtonText:B.confirmLabel,destructiveConfirmButton:B.destructive}))};function aE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const sE=function(){var e=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return aE(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?aE(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Iu(),1)[0].get("type")||"payment",t=null;return"subscription"===e?t=React.createElement(iE,null):"payment"===e&&(t=React.createElement(GM,null)),React.createElement("div",{className:"min-h-screen px-8 py-8 bg-background-secondary flex flex-col gap-[24px] mx-auto max-w-[1500px]"},t)};var lE=["className"];function cE(){return cE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cE.apply(null,arguments)}const uE=function(e){var t,n=e.className,r=void 0===n?"block":n,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,lE);return React.createElement("a",{href:null===(t=srfm_admin)||void 0===t?void 0:t.sureforms_dashboard_url},React.createElement("svg",cE({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:r},o),React.createElement("path",{d:"M24 0H0V24H24V0Z",fill:"#D54407"}),React.createElement("path",{d:"M6.8501 5.14209H17.1358V8.57068H8.56439L6.8501 10.285V8.57068V5.14209Z",fill:"white"}),React.createElement("path",{d:"M6.8501 10.2866H15.4215V13.7152H8.56439L6.8501 15.4294V13.7152V10.2866Z",fill:"white"}),React.createElement("path",{d:"M6.8501 15.4272H11.9929V18.8558H6.8501V15.4272Z",fill:"white"})))};function dE(e){return dE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dE(e)}var fE=["selector"];function mE(){mE=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function l(e,t,n,r){return Object.defineProperty(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r})}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function c(t,n,r,o){var i=n&&n.prototype instanceof f?n:f,a=Object.create(i.prototype);return l(a,"_invoke",function(t,n,r){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var l=x(s,r);if(l){if(l===d)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(1===o)throw o=4,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=3;var c=u(t,n,r);if("normal"===c.type){if(o=r.done?4:2,c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=4,r.method="throw",r.arg=c.arg)}}}(t,r,new N(o||[])),!0),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var d={};function f(){}function m(){}function h(){}var p={};l(p,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(k([])));y&&y!==n&&r.call(y,i)&&(p=y);var v=h.prototype=f.prototype=Object.create(p);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function n(o,i,a,s){var l=u(e[o],e,i);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==dE(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;l(this,"_invoke",(function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}),!0)}function x(t,n){var r=n.method,o=t.i[r];if(o===e)return n.delegate=null,"throw"===r&&t.i.return&&(n.method="return",n.arg=e,x(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=u(o,t.i,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,d;var a=i.arg;return a?a.done?(n[t.r]=a.value,n.next=t.n,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function M(e){this.tryEntries.push(e)}function E(t){var n=t[4]||{};n.type="normal",n.arg=e,t[4]=n}function N(e){this.tryEntries=[[-1]],e.forEach(M,this),this.reset(!0)}function k(t){if(null!=t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(dE(t)+" is not iterable")}return m.prototype=h,l(v,"constructor",h),l(h,"constructor",m),m.displayName=l(h,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,s,"GeneratorFunction")),e.prototype=Object.create(v),e},t.awrap=function(e){return{__await:e}},b(w.prototype),l(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new w(c(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},b(v),l(v,s,"Generator"),l(v,i,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},t.values=k,N.prototype={constructor:N,reset:function(t){if(this.prev=this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(E),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0][4];if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(e){a.type="throw",a.arg=t,n.next=e}for(var o=n.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],s=this.prev,l=i[1],c=i[2];if(-1===i[0])return r("end"),!1;if(!l&&!c)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=s){if(s<l)return this.method="next",this.arg=e,r(l),!0;if(s<c)return r(c),!1}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r[0]>-1&&r[0]<=this.prev&&this.prev<r[2]){var o=r;break}}o&&("break"===e||"continue"===e)&&o[0]<=t&&t<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o[2],d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n[2]===e)return this.complete(n[4],n[3]),E(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n[0]===e){var r=n[4];if("throw"===r.type){var o=r.arg;E(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={i:k(t),r:n,n:r},"next"===this.method&&(this.arg=e),d}},t}function hE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function pE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gE(e,t,n){return(t=function(e){var t=function(e){if("object"!=dE(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=dE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==dE(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yE(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function vE(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){yE(i,r,o,a,s,"next",e)}function s(e){yE(i,r,o,a,s,"throw",e)}a(void 0)}))}}var bE=function(){return bE=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},bE.apply(this,arguments)},wE=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},xE=function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},ME={rssFeedURL:"",selector:"",uniqueKey:"",loaderIcon:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">\n\t<circle cx="50" cy="50" fill="none" stroke="#9f9f9f" stroke-width="10" r="35" stroke-dasharray="164.93361431346415 56.97787143782138">\n\t\t<animateTransform attributeName="transform" type="rotate" repeatCount="indefinite" dur="1s" values="0 50 50;360 50 50" keyTimes="0;1"></animateTransform>\n\t</circle>\n\t</svg>',viewAll:{link:"",label:"View All"},triggerButton:{label:"",icon:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.61703 13.1998C8.04294 13.1503 7.46192 13.125 6.875 13.125H6.25C4.17893 13.125 2.5 11.4461 2.5 9.375C2.5 7.30393 4.17893 5.625 6.25 5.625H6.875C7.46192 5.625 8.04294 5.59972 8.61703 5.55018M8.61703 13.1998C8.82774 14.0012 9.1031 14.7764 9.43719 15.5195C9.64341 15.9782 9.48685 16.5273 9.05134 16.7787L8.50441 17.0945C8.04492 17.3598 7.45466 17.1921 7.23201 16.7106C6.70983 15.5811 6.30451 14.3866 6.03155 13.1425M8.61703 13.1998C8.29598 11.9787 8.125 10.6968 8.125 9.375C8.125 8.05316 8.29598 6.77125 8.61703 5.55018M8.61703 13.1998C11.25 13.427 13.737 14.1643 15.9789 15.3124M8.61703 5.55018C11.25 5.323 13.737 4.58569 15.9789 3.43757M15.9789 3.43757C15.8808 3.12162 15.7751 2.80903 15.662 2.5M15.9789 3.43757C16.4247 4.87356 16.7131 6.37885 16.8238 7.93326M15.9789 15.3124C15.8808 15.6284 15.7751 15.941 15.662 16.25M15.9789 15.3124C16.4247 13.8764 16.7131 12.3711 16.8238 10.8167M16.8238 7.93326C17.237 8.2772 17.5 8.79539 17.5 9.375C17.5 9.95461 17.237 10.4728 16.8238 10.8167M16.8238 7.93326C16.8578 8.40942 16.875 8.8902 16.875 9.375C16.875 9.8598 16.8578 10.3406 16.8238 10.8167" stroke="#94A3B8" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',beforeBtn:"",afterBtn:"",className:"",onClick:function(){}},notification:{setLastPostUnixTime:null,getLastPostUnixTime:null},flyout:{title:"What's New?",innerContent:{titleLink:!0,additionalClasses:[]},excerpt:{wordLimit:500,moreSymbol:"…",readMore:{label:"Read More",className:""}},className:"",closeOnEsc:!0,closeOnOverlayClick:!0,closeBtnIcon:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 18L18 6M6 6L18 18" stroke="#94A3B8" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',formatDate:null,onOpen:function(){},onClose:function(){},onReady:function(){}}},EE=function(){function e(e){this.rssFeedURLs=[],this.lastPostUnixTime=0,this.multiLastPostUnixTime={},this.notificationsCount=0,this.multiNotificationCount={},this.hasNewFeeds=!1,this.multiHasNewFeeds={},this.validateArgs(e),this.parseDefaults(e),this.setElement(),this.getElement()?(this.setID(),this.setRSSFeedURLs(),NE.setInstanceID(this.getID()),this.RSS_Fetch_Instance=new kE(this),this.RSS_View_Instance=new jE(this),this.setNotificationsCount(),this.setTriggers()):console.warn("WNR: Cannot find element with",this.getArgs().selector)}return e.prototype.validateArgs=function(e){["rssFeedURL","selector","uniqueKey"].forEach((function(t){if(!e[t])throw new Error("".concat(t," is a required argument. It cannot be empty or undefined."));if("rssFeedURL"===t){var n=e[t];Array.isArray(n)&&n.forEach((function(e){if(!(null==e?void 0:e.key))throw new Error('The parameter "key" is required for "'.concat(t,'" parameter in multi-feed mode.'));if(e.key.includes(" "))throw new Error('The parameter "key" cannot have spaces for "'.concat(t,'" parameter in multi-feed mode. Ref Key: "').concat(e.key,'"'))}))}}))},e.prototype.parseDefaults=function(e){var t,n;this.args=bE(bE(bE({},ME),e),{viewAll:bE(bE({},ME.viewAll),null==e?void 0:e.viewAll),triggerButton:bE(bE({},ME.triggerButton),null==e?void 0:e.triggerButton),flyout:bE(bE(bE({},ME.flyout),null==e?void 0:e.flyout),{innerContent:bE(bE({},ME.flyout.innerContent),null===(t=null==e?void 0:e.flyout)||void 0===t?void 0:t.innerContent),excerpt:bE(bE({},ME.flyout.excerpt),null===(n=null==e?void 0:e.flyout)||void 0===n?void 0:n.excerpt)})})},e.prototype.getArgs=function(){return this.args},e.prototype.setElement=function(){this.element=document.querySelector(this.args.selector)},e.prototype.getElement=function(){return this.element},e.prototype.setID=function(){var e=[this.getArgs().selector,this.getArgs().uniqueKey],t=this.getArgs().rssFeedURL;Array.isArray(t)?t.forEach((function(t){e.push(t.key)})):e.push(t),this.ID=btoa(e.join("-")).slice(-12).replace(/=/g,"")+"-"+this.getArgs().uniqueKey},e.prototype.isMultiFeedRSS=function(){return"string"!=typeof this.getArgs().rssFeedURL},e.prototype.setRSSFeedURLs=function(){var e=this,t=this.getArgs().rssFeedURL;this.isMultiFeedRSS()?Array.isArray(t)&&t.forEach((function(t){e.rssFeedURLs.push(t)})):this.rssFeedURLs.push({key:null,label:"",url:t.toString()})},e.prototype.getRSSFeedURLs=function(){return this.rssFeedURLs},e.prototype.getID=function(){return this.ID},e.prototype.setNotificationsCount=function(){return wE(this,void 0,void 0,(function(){var e=this;return xE(this,(function(t){switch(t.label){case 0:return[4,Promise.all(this.getRSSFeedURLs().map((function(t){return wE(e,[t],void 0,(function(e){var t,n=e.key;return xE(this,(function(e){switch(e.label){case 0:return t=0,"function"!=typeof this.getArgs().notification.getLastPostUnixTime?[3,2]:[4,this.getArgs().notification.getLastPostUnixTime(n,this)];case 1:return t=e.sent(),[3,3];case 2:t=NE.getLastPostUnixTime(n),e.label=3;case 3:return this.isMultiFeedRSS()?this.multiLastPostUnixTime[n]=+t:this.lastPostUnixTime=+t,[2]}}))}))})))];case 1:return t.sent(),[4,this.RSS_Fetch_Instance.fetchData().then((function(t){Object.keys(t).forEach((function(n){var r=t[n];if(r.length){e.multiNotificationCount[n]=0;var o=+r[0].date,i=e.isMultiFeedRSS()?e.multiLastPostUnixTime[n]:e.lastPostUnixTime;o>i&&(r.forEach((function(t){t.date>i&&(e.isMultiFeedRSS()&&(e.multiNotificationCount[n]++,e.multiHasNewFeeds[n]=!0),e.notificationsCount++,e.hasNewFeeds=!0)})),e.RSS_View_Instance.setNotification(e.notificationsCount))}}))})).catch(console.error)];case 2:return t.sent(),[2]}}))}))},e.prototype.getNotificationsCount=function(){return this.notificationsCount},e.prototype.setTriggers=function(){var e=this,t=document.getElementById(this.RSS_View_Instance.getTriggerButtonID()),n=document.getElementById(this.RSS_View_Instance.getFlyoutID()),r=n.querySelector(".whats-new-rss-flyout-inner-content"),o=document.getElementById(this.RSS_View_Instance.getFlyoutCloseBtnID()),i=document.getElementById(this.RSS_View_Instance.getFlyoutMultiFeedNavID()),a=function(t){e.RSS_Fetch_Instance.fetchData().then((function(o){r.innerHTML="";var i=o[t];if(i.length){var a=+i[0].date,s=e.isMultiFeedRSS()?e.multiLastPostUnixTime[t]:e.lastPostUnixTime;i.forEach((function(n){var o=!!s&&n.date>s,i=e.getArgs().flyout.innerContent.titleLink?'<a href="'.concat(n.postLink,'" target="_blank">\n\t\t\t\t\t\t\t\t<h2>').concat(n.title,"</h2>\n\t\t\t\t\t\t\t</a>"):"<h2>".concat(n.title,"</h2>"),a='\n\t\t\t\t\t\t\t\t<div class="rss-content-header">\n\t\t\t\t\t\t\t\t\t<p>'.concat(e.RSS_View_Instance.formatDate(new Date(n.date)),"</p>\n\t\t\t\t\t\t\t\t\t").concat(i,"\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t").concat(e.RSS_View_Instance.createExcerpt(n.description,n.postLink,e.getArgs().flyout.excerpt),"\n\t\t\t\t\t\t\t\t").concat(e.RSS_View_Instance.listChildrenPosts(n.children),"\n\t\t\t\t\t\t\t"),l=e.getArgs().flyout.innerContent.additionalClasses;t&&l.push("`inner-content-item-feed-key-${key}`"),r.innerHTML+=e.RSS_View_Instance.innerContentWrapper(a,o,l.join(" "))})),e.getArgs().viewAll.link&&(r.innerHTML+=e.RSS_View_Instance.innerContentWrapper('\n\t\t\t\t\t\t\t<a href="'.concat(e.getArgs().viewAll.link,'" class="button view-all">').concat(e.getArgs().viewAll.label,"</a>\n\t\t\t\t\t\t\t"))),e.RSS_View_Instance.setIsLoading(!1),n.classList.add("ready"),e.getArgs().flyout.onReady(e),n.focus(),e.isMultiFeedRSS()||(e.lastPostUnixTime=a,e.hasNewFeeds&&("function"==typeof e.getArgs().notification.setLastPostUnixTime?e.getArgs().notification.setLastPostUnixTime(a,t):NE.setLastPostUnixTime(a,t)))}})).catch(console.error)};t.addEventListener("click",(function(t){if(t.preventDefault(),e.getArgs().triggerButton.onClick(e),e.RSS_View_Instance.setIsLoading(!0),n.classList.remove("closed"),n.classList.add("open"),n.removeAttribute("style"),document.body.classList.add("whats-new-rss-is-active"),e.getArgs().flyout.onOpen(e),e.isMultiFeedRSS()){var r=i.querySelectorAll("button");r.forEach((function(t){e.RSS_View_Instance.setMultiFeedTabNotificationCount(t.dataset.feedKey,e.multiNotificationCount[t.dataset.feedKey]),t.addEventListener("click",(function(n){n.preventDefault();var o=t.dataset.feedKey;e.multiNotificationCount[o]=0,e.RSS_Fetch_Instance.fetchData().then((function(t){var n=t[o][0].date;e.multiLastPostUnixTime[o]=n,!0===e.multiHasNewFeeds[o]&&("function"==typeof e.getArgs().notification.setLastPostUnixTime?e.getArgs().notification.setLastPostUnixTime(n,o):NE.setLastPostUnixTime(n,o)),e.multiHasNewFeeds[o]=!1})).catch(console.error),r.forEach((function(e){e.classList.remove("selected");var t=e.dataset.feedKey,n=".inner-content-item-feed-key-".concat(t);document.querySelectorAll(n).forEach((function(e){o!==t?e.classList.add("hidden"):e.classList.remove("hidden")}))})),t.classList.add("selected"),a(o)}))})),r[0].click()}else a(null)}));var s=function(){n.classList.add("closed"),n.classList.remove("open"),n.classList.remove("ready"),document.body.classList.remove("whats-new-rss-is-active"),e.isMultiFeedRSS()?e.RSS_View_Instance.setNotification(Object.values(e.multiNotificationCount).filter(Boolean).length):(e.hasNewFeeds=!1,e.RSS_View_Instance.setNotification(!1)),r.innerHTML="",e.getArgs().flyout.onClose(e),t.focus()};this.getArgs().flyout.closeOnEsc&&document.addEventListener("keydown",(function(e){"Escape"===e.key&&n.classList.contains("open")&&s()})),this.getArgs().flyout.closeOnOverlayClick&&n.querySelector(".whats-new-rss-flyout-overlay").addEventListener("click",s),o.addEventListener("click",s)},e}(),NE=function(){function e(){}return e.setInstanceID=function(e){this.instanceID||(this.instanceID=e)},e.prefixer=function(e,t){if(void 0===t&&(t=""),!this.instanceID)throw new Error("Instance ID not set.");return t?"".concat(this.keys[e],"-").concat(this.instanceID,"-").concat(t):"".concat(this.keys[e],"-").concat(this.instanceID)},e._setDataExpiry=function(e){void 0===e&&(e="");var t=(new Date).getTime()+864e5;sessionStorage.setItem(this.prefixer("SESSION_DATA_EXPIRY",e),JSON.stringify(t))},e._isDataExpired=function(e){void 0===e&&(e="");var t=this.prefixer("SESSION_DATA_EXPIRY",e),n=window.sessionStorage.getItem(t);if(!n)return!0;var r=JSON.parse(n);return(new Date).getTime()>r&&(window.sessionStorage.removeItem(t),!0)},e.setSessionData=function(e,t){return void 0===t&&(t=""),this._setDataExpiry(t),window.sessionStorage.setItem(this.prefixer("SESSION",t),e)},e.getSessionData=function(e){return void 0===e&&(e=""),this._isDataExpired(e)?"{}":window.sessionStorage.getItem(this.prefixer("SESSION",e))},e.setLastPostUnixTime=function(e,t){return void 0===t&&(t=""),window.localStorage.setItem(this.prefixer("LAST_LATEST_POST",t),e.toString())},e.getLastPostUnixTime=function(e){return void 0===e&&(e=""),+window.localStorage.getItem(this.prefixer("LAST_LATEST_POST",e))},e.keys={SESSION_DATA_EXPIRY:"whats-new-cache-expiry",LAST_LATEST_POST:"whats-new-last-unixtime",SESSION:"whats-new-cache"},e}(),kE=function(){function e(e){var t=this;this.data={},this.RSS=e,this.RSS.getRSSFeedURLs().forEach((function(e){var n=JSON.parse(NE.getSessionData(e.key));n&&n.length&&(t.data[e.key]=n)}))}return e.prototype.fetchData=function(){return wE(this,void 0,void 0,(function(){var e,t=this;return xE(this,(function(n){switch(n.label){case 0:return Object.keys(this.data).length?[2,this.data]:(e=this.RSS.getRSSFeedURLs().map((function(e){return wE(t,void 0,void 0,(function(){var t,n,r=this;return xE(this,(function(o){switch(o.label){case 0:return this.data[e.key]=[],[4,fetch(e.url)];case 1:return[4,o.sent().text()];case 2:return t=(t=o.sent()).replace(/»/g,"&raquo;"),n=new DOMParser,n.parseFromString(t,"text/xml").querySelectorAll("item").forEach((function(t){var n,o=t.querySelector("title").textContent,i=t.querySelector("link").textContent,a=t.querySelector("content\\:encoded, encoded"),s=a?a.textContent:"",l=t.querySelector("pubDate").innerHTML;r.data[e.key].push({title:o,date:l?+new Date(l):null,postLink:i,description:s.replace(/<a\b((?:(?!target=)[^>])*)>/g,'<a$1 target="_blank">').replace(/<p>\s*<\/p>/g,""),children:JSON.parse((null===(n=t.querySelector("children"))||void 0===n?void 0:n.innerHTML)||"{}")})})),NE.setSessionData(JSON.stringify(this.data[e.key]),e.key),[2]}}))}))})),[4,Promise.all(e)]);case 1:return n.sent(),[2,this.data]}}))}))},e}(),jE=function(){function e(e){this.RSS=e,this.createTriggerButton(),this.createFlyOut()}return e.prototype.getTriggerButtonID=function(){return"whats-new-rss-btn-".concat(this.RSS.getID())},e.prototype.getFlyoutID=function(){return"whats-new-rss-flyout-".concat(this.RSS.getID())},e.prototype.getFlyoutCloseBtnID=function(){return"whats-new-rss-flyout-close-".concat(this.RSS.getID())},e.prototype.getFlyoutMultiFeedNavID=function(){return"whats-new-rss-flyout-multi-feed-nav-".concat(this.RSS.getID())},e.prototype.setIsLoading=function(e){void 0===e&&(e=!1);var t=document.getElementById(this.getFlyoutID());e?t.classList.add("is-loading"):t.classList.remove("is-loading")},e.prototype.setNotification=function(e){var t=document.querySelector("#".concat(this.getTriggerButtonID()," .whats-new-rss-notification-badge"));e?(this.RSS.isMultiFeedRSS()?(t.innerHTML="",t.classList.add("is-multi-feed")):t.innerHTML=e>9?"9+":e.toString(),t.classList.remove("hide")):t.classList.add("hide")},e.prototype.createTriggerButton=function(){var e,t=this.RSS.getArgs().triggerButton.label;e=t?"\n\t\t\t".concat(this.RSS.getArgs().triggerButton.beforeBtn,'\n\t\t\t<a class="whats-new-rss-trigger-button has-label" id="').concat(this.getTriggerButtonID(),'">\n\t\t\t\t<div class="icon-badge">\n\t\t\t\t\t').concat(this.RSS.getArgs().triggerButton.icon,'\n\t\t\t\t\t<div class="whats-new-rss-notification-badge hide">0</div>\n\t\t\t\t</div>\n\t\t\t\t').concat(t,"\n\t\t\t</a>\n\t\t\t").concat(this.RSS.getArgs().triggerButton.afterBtn,"\n\t\t\t"):"\n\t\t\t".concat(this.RSS.getArgs().triggerButton.beforeBtn,'\n\t\t\t<a class="whats-new-rss-trigger-button" id="').concat(this.getTriggerButtonID(),'">\n\t\t\t\t').concat(this.RSS.getArgs().triggerButton.icon,'\n\t\t\t\t<div class="whats-new-rss-notification-badge hide">0</div>\n\t\t\t</a>\n\t\t\t').concat(this.RSS.getArgs().triggerButton.afterBtn,"\n\t\t\t"),this.RSS.getElement().innerHTML+=e},e.prototype.createFlyOut=function(){var e=["whats-new-rss-flyout","closed"];this.RSS.getArgs().flyout.className&&e.push(this.RSS.getArgs().flyout.className);var t=[];this.RSS.isMultiFeedRSS()&&(t.push('<nav id="'.concat(this.getFlyoutMultiFeedNavID(),'" class="whats-new-rss-multi-feed-nav">')),this.RSS.getRSSFeedURLs().forEach((function(e){t.push('<button type="button" data-feed-key="'.concat(e.key,'">\n\t\t\t\t\t\t').concat(e.label,'\n\t\t\t\t\t\t<div class="new-notification-count"></div>\n\t\t\t\t\t</button>\n\t\t\t\t\t'))})),t.push("</nav>"));var n=document.createElement("div");n.setAttribute("id",this.getFlyoutID()),n.setAttribute("class",e.join(" ")),n.setAttribute("role","dialog"),n.setAttribute("style","visibility: hidden;"),n.innerHTML='\n\t\t<div class="whats-new-rss-flyout-contents">\n\n\t\t\t<div class="whats-new-rss-flyout-inner-header">\n\n\t\t\t\t<div class="whats-new-rss-flyout-inner-header__title-icon-wrapper">\n\t\t\t\t\t<h3>'.concat(this.RSS.getArgs().flyout.title,'</h3>\n\n\t\t\t\t\t<span class="whats-new-rss-flyout-inner-header__loading-icon">\n\t\t\t\t\t').concat(this.RSS.getArgs().loaderIcon,'\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\n\t\t\t\t<button type="button" id="').concat(this.getFlyoutCloseBtnID(),'">').concat(this.RSS.getArgs().flyout.closeBtnIcon,"</button>\n\t\t\t</div>\n\n\t\t\t").concat(t.join(""),'\n\n\t\t\t<div class="whats-new-rss-flyout-inner-content">\n\t\t\t\t<div class="skeleton-container">\n\t\t\t\t\t<div class="skeleton-row whats-new-rss-flyout-inner-content-item"></div>\n\t\t\t\t\t<div class="skeleton-row whats-new-rss-flyout-inner-content-item"></div>\n\t\t\t\t\t<div class="skeleton-row whats-new-rss-flyout-inner-content-item"></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t</div>\n\n\t\t<div class="whats-new-rss-flyout-overlay"></div>\n\t\t'),document.body.appendChild(n)},e.prototype.setMultiFeedTabNotificationCount=function(e,t){void 0===t&&(t=0);var n=document.querySelector("#".concat(this.getFlyoutMultiFeedNavID(),' button[data-feed-key="').concat(e,'"]'));if(n){var r=n.querySelector(".new-notification-count");if(t){var o=t>9?"9+":t;r.innerHTML=o.toString()}else r.innerHTML=""}},e.prototype.innerContentWrapper=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n="");var r=["whats-new-rss-flyout-inner-content-item"];return t&&r.push("rss-new-post"),n&&r.push(n),'\n\t\t<div class="'.concat(r.join(" "),'">\n\t\t\t').concat(t?'<small class="new-post-badge">New ✨</small>':"","\n\t\t\t").concat(e,"\n\t\t</div>\n\t\t")},e.prototype.createExcerpt=function(e,t,n){var r=n.wordLimit,o=n.moreSymbol,i=n.readMore;if(!r)return e;var a=e.replace(/<[^>]*>/g,"").split(/\s+/),s=a.slice(0,r).join(" ");return o&&(s+=o),r>a.length?e:t&&(null==i?void 0:i.label)?"<p>".concat(s,' <a href="').concat(t,'" target="_blank" class="').concat(i.className,'">').concat(i.label,"</a></p>"):"<p>".concat(s,"</p>")},e.prototype.listChildrenPosts=function(e){var t=this,n=Object.values(e);if(!n.length)return"";var r=document.createElement("details"),o=document.createElement("summary"),i=document.createElement("div");return n.forEach((function(e){var n=(new DOMParser).parseFromString(e.post_content,"text/html"),r=document.createElement("div");r.classList.add("sub-version-item"),r.innerHTML='\n\t\t\t\t<div class="sub-version-header">\n\t\t\t\t\t<h4 class="sub-version-title">'.concat(e.post_title,'</h4>\n\t\t\t\t\t<span class="sub-version-date">').concat(t.formatDate(new Date(e.post_date)),'</span>\n\t\t\t\t</div>\n\t\t\t\t<div class="sub-version-content">').concat(n.documentElement.textContent,"</div>\n\t\t\t"),i.appendChild(r)})),o.innerHTML='<p class="text-see-more">See More</p><p class="text-see-less">See Less</p>',r.appendChild(o),r.appendChild(i),i.classList.add("sub-version-items-wrapper"),r.classList.add("whats-new-rss-sub-version-details"),r.outerHTML},e.prototype.formatDate=function(e){if("function"==typeof this.RSS.getArgs().flyout.formatDate)return this.RSS.getArgs().flyout.formatDate(e);var t=new Date,n=e.getTime(),r=t.getTime()-n,o=36e5,i=24*o,a=7*i,s=30*i;if(r<6e4)return"Just now";if(r<o){var l=Math.floor(r/6e4);return"".concat(l," minute").concat(l>1?"s":""," ago")}if(r<i){var c=Math.floor(r/o);return"".concat(c," hour").concat(c>1?"s":""," ago")}if(r<a){var u=Math.floor(r/i);return"".concat(u," day").concat(u>1?"s":""," ago")}if(r<s){var d=Math.floor(r/a);return"".concat(d," week").concat(d>1?"s":""," ago")}var f=Math.floor(r/s);return"".concat(f," month").concat(f>1?"s":""," ago")},e}();function DE(){return TE.apply(this,arguments)}function TE(){return(TE=vE(mE().mark((function e(){return mE().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",'.whats-new-rss-is-active{overflow:hidden}.whats-new-rss-trigger-button{display:flex;align-items:center;position:relative;width:auto;padding:5px;cursor:pointer}.whats-new-rss-trigger-button.has-label{align-items:end;gap:10px}.whats-new-rss-trigger-button.has-label .icon-badge{position:relative;line-height:1}.whats-new-rss-trigger-button.has-label .icon-badge .whats-new-rss-notification-badge{top:-12px;right:-10px}.whats-new-rss-trigger-button .whats-new-rss-notification-badge{position:absolute;top:-8px;right:-5px;width:20px;font-size:10px;line-height:20px;text-align:center;border-radius:10px;color:#fff;background:red;transition:transform .2s ease-in-out}.whats-new-rss-trigger-button .whats-new-rss-notification-badge.is-multi-feed{top:-2px;right:-2px;font-size:0;width:10px;height:10px}.whats-new-rss-trigger-button .whats-new-rss-notification-badge.hide{display:none}.whats-new-rss-trigger-button:hover .whats-new-rss-notification-badge{transform:scale(1.2)}.whats-new-rss-flyout{position:fixed;top:0;right:0;bottom:0;width:100%;z-index:99999;transition:visibility .3s ease-in-out;font-family:Arial,Helvetica,sans-serif}.whats-new-rss-flyout .lightbox-trigger,.whats-new-rss-flyout.hidden{display:none}.whats-new-rss-flyout.is-loading .whats-new-rss-flyout-inner-header__loading-icon{display:block;margin:auto}.whats-new-rss-flyout.is-loading .whats-new-rss-flyout-inner-header__loading-icon svg{display:block;background:0 0;width:25px;height:25px}.whats-new-rss-flyout .whats-new-rss-flyout-contents{position:fixed;display:flex;right:0;width:30%;height:100%;flex-direction:column;background-color:#fff;transition:transform .3s ease-in-out;z-index:9999}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-header{display:flex;justify-content:space-between;align-items:center;padding:16px 20px 16px 24px;border-bottom:1px solid #ccc}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-header button{border:none;background:0 0;font-size:30px;cursor:pointer;color:#94a3b8;padding:0;margin:0;box-shadow:none}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-header .whats-new-rss-flyout-inner-header__title-icon-wrapper{display:flex;gap:10px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-header .whats-new-rss-flyout-inner-header__title-icon-wrapper h3{margin:0;padding:0;color:#0f172a;font-weight:600;font-size:16px;line-height:24px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-multi-feed-nav{display:flex;padding:0 30px;border-bottom:1px solid #ccc;gap:2em;overflow:auto;white-space:nowrap}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-multi-feed-nav button{position:relative;background:0 0;color:inherit;padding:15px 0;border-bottom:2px solid transparent}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-multi-feed-nav button:focus,.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-multi-feed-nav button:hover{border-color:inherit}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-multi-feed-nav button.selected{border-color:#5d5d5d}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-multi-feed-nav button .new-notification-count{position:absolute;top:0;right:-10px;width:20px;font-size:10px;line-height:20px;text-align:center;border-radius:10px;color:#fff;background:red}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content{flex:1;overflow-y:auto}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .skeleton-container{margin:30px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item{border-bottom:1px solid #d8dfe9;padding:30px 24px;color:#475569;font-weight:400;font-size:14px;line-height:20px;display:flex;flex-direction:column;gap:13px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item>*{margin:0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item.skeleton-row{height:25vh;margin:40px 0;background:linear-gradient(90deg,#eee 25%,#ddd 50%,#eee 75%);background-size:200% 100%;animation:shimmer 1.5s infinite}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item.rss-new-post{position:relative}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item.rss-new-post .new-post-badge{background:#ff3d3d;border-radius:5px;position:absolute;right:45px;padding:0 5px;color:#fff}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item .rss-content-header{display:flex;flex-direction:column;gap:15px;padding:0 0 8px 0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item .rss-content-header p{color:#94a3b8;margin:0;padding:0;font-weight:600;font-size:14px;line-height:16px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item .rss-content-header h2{margin:0;color:#0f172a;font-weight:700;line-height:28px;font-size:20px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item h2{font-weight:700;font-size:18px;line-height:24px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item h3{font-weight:700;font-size:16px;line-height:22px;margin-top:12px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item h4{font-weight:700;font-size:15px;line-height:20px;margin-top:12px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item h5{font-weight:700;font-size:14px;line-height:18px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item h6{font-weight:700;font-size:13px;line-height:16px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item p{padding:0;font-size:14px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item p:last-child{margin-bottom:0;padding-bottom:0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item a{color:#1170ff;text-decoration:none}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item figure{margin:10px 0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item figure.wp-block-embed.is-type-video{position:relative;width:100%;height:0;padding-bottom:56.25%}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item figure iframe{position:absolute;top:0;left:0;width:100%;height:100%;border:0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item img{box-sizing:border-box;height:auto;max-width:100%;vertical-align:bottom}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item video{vertical-align:middle;width:100%}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item strong{font-weight:600}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item ol,.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item ul{padding-inline-start:20px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item ol li,.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item ul li{margin-bottom:5px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item ul{list-style-type:disc}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item ol{list-style-type:decimal}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details{line-height:20px;font-size:.9em;margin:10px 0;background:#f9fafb}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details summary{display:flex;justify-content:space-between;cursor:pointer;padding:20px 15px;height:1em;line-height:20px;font-weight:800}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details summary::after{content:"⌃";font-size:20px;transform:rotateX(180deg);font-weight:800}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details summary .text-see-more{display:block}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details summary .text-see-less{display:none}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details[open] summary{border-bottom:1px solid #e2e8f0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details[open] summary::after{transform:rotateX(45deg)}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details[open] summary .text-see-more{display:none}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details[open] summary .text-see-less{display:block}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details .sub-version-item{position:relative;padding:1em;border-bottom:1px solid #e2e8f0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details .sub-version-item .sub-version-header{display:flex;justify-content:space-between}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details .sub-version-item .sub-version-content{margin-top:1em}.whats-new-rss-flyout .whats-new-rss-flyout-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.5);transition:all .3s ease-in-out}.whats-new-rss-flyout.closed{visibility:hidden}.whats-new-rss-flyout.closed .whats-new-rss-flyout-overlay{opacity:0;visibility:hidden}.whats-new-rss-flyout.closed .whats-new-rss-flyout-contents{transform:translateX(100%)}.whats-new-rss-flyout .whats-new-rss-flyout-inner-header__loading-icon{display:none}@keyframes shimmer{0%{background-position:-200% 0}100%{background-position:200% 0}}@media screen and (max-width:1024px){.whats-new-rss-flyout .whats-new-rss-flyout-contents{width:40%}}@media screen and (max-width:768px){.whats-new-rss-flyout .whats-new-rss-flyout-contents{width:85%}}');case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function SE(){return(SE=vE(mE().mark((function e(){var t,n;return mE().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t="whats-new-rss-styles",document.getElementById(t)){e.next=8;break}return(n=document.createElement("style")).id=t,e.next=6,DE();case 6:n.innerHTML=e.sent,document.head.appendChild(n);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}const CE=function(e){var t=e.selector,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,fE),r=(0,d.useRef)(null);return(0,d.useEffect)((function(){return function(){SE.apply(this,arguments)}(),r.current||(r.current=function(e){return new EE(e)}(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pE(Object(n),!0).forEach((function(t){gE(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({selector:t},n))),function(){r.current&&"function"==typeof r.current.destroy&&r.current.destroy()}}),[t].concat(function(e){return function(e){if(Array.isArray(e))return hE(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return hE(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hE(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Object.values(n)))),r.current},RE=({children:e,gap:t="lg",className:n,...r})=>(0,u.jsx)("div",{className:he("w-full box-border flex items-center justify-between bg-background-primary p-5 min-h-16",ge(t),n),...r,children:e});RE.displayName="Topbar";const OE=({gap:e="sm",children:t,className:n})=>(0,u.jsx)("div",{className:he("flex items-center",ge(e),n),children:t});OE.displayName="Topbar.Left";const AE=({gap:e="md",children:t,align:n="center",className:r})=>{const o={left:"justify-start",center:"justify-center",right:"justify-end"}[n];return(0,u.jsx)("div",{className:he("flex items-center grow",ge(e),o,r),children:t})};AE.displayName="Topbar.Middle";const IE=({gap:e="sm",children:t,className:n})=>(0,u.jsx)("div",{className:he("flex items-center",ge(e),n),children:t});IE.displayName="Topbar.Right";const _E=({children:e,className:t})=>(0,u.jsx)("div",{className:he("flex items-center [&>svg]:block h-full",t),children:e});_E.displayName="Topbar.Item",RE.Left=OE,RE.Middle=AE,RE.Right=IE,RE.Item=_E;const PE=(0,d.createContext)({}),LE=PE.Provider,zE=()=>(0,d.useContext)(PE),FE=(e,t,n)=>{if(!e||!t)return{open:()=>({}),closed:()=>({})};const r=e?.getBoundingClientRect(),o=t?.getBoundingClientRect(),i=n?r?.x-o?.x+r?.width/2:o?.width-(o?.right-r?.x)+r?.width/2,a=r?.y-o?.y+r?.height/2;return{open:(e=1e3)=>({clipPath:`circle(${2*e+200}px at ${i}px ${a}px)`,background:"rgb(255, 255, 255, 1)",transition:{type:"spring",stiffness:20,restDelta:2,background:{duration:0}}}),closed:{clipPath:`circle(${r?.width/2}px at ${i}px ${a}px)`,background:"rgb(255, 255, 255, 0)",transition:{delay:.5,type:"spring",stiffness:400,damping:40,background:{duration:0,delay:1e3}}}}},UE=e=>(0,u.jsx)(fl.path,{className:"stroke-icon-primary",fill:"transparent",strokeWidth:"3",strokeLinecap:"round",...e}),BE=({className:e})=>{const{toggleOpen:t,setTriggerRef:n}=zE();return(0,u.jsx)(xe,{ref:n,className:he("relative z-[1] rounded-full hover:shadow-sm focus:[box-shadow:none] pointer-events-auto bg-background-primary",e),variant:"ghost",size:"xs",onClick:t,"aria-label":"Toggle menu",icon:(0,u.jsxs)(fl.svg,{className:"shrink-0 stroke-icon-primary",width:"23",height:"23",variants:{open:{viewBox:"0 0 20 20"},closed:{viewBox:"0 0 23 18"}},children:[(0,u.jsx)(UE,{variants:{closed:{d:"M 2 2.5 L 20 2.5"},open:{d:"M 3 16.5 L 17 2.5"}}}),(0,u.jsx)(UE,{d:"M 2 9.423 L 20 9.423",variants:{closed:{opacity:1},open:{opacity:0}},transition:{duration:.1}}),(0,u.jsx)(UE,{variants:{closed:{d:"M 2 16.346 L 20 16.346"},open:{d:"M 3 2.5 L 17 16.346"}}})]})})},YE={open:{transition:{staggerChildren:.07,delayChildren:.2}},closed:{transition:{staggerChildren:.05,staggerDirection:-1}}},QE=({tag:e="a",active:t,icon:n,iconPosition:r="left",className:o,children:i,...a})=>{let s=null,l=null;const c=n&&(0,d.isValidElement)(n)?(0,d.cloneElement)(n,{key:"left-icon",className:he("size-5",t?"text-brand-800":"text-icon-secondary",n.props?.className??"")}):null;switch(r){case"left":s=c;break;case"right":l=c;break;default:s=null,l=null}return(0,u.jsx)(WE,{children:(0,u.jsxs)(e,{className:he("w-full no-underline hover:no-underline text-text-primary text-lg font-medium flex items-center gap-2 px-2.5 py-1.5 rounded-md hover:bg-background-secondary hover:text-text-primary focus:outline-none focus:shadow-none transition ease-in-out duration-150",t?"text-text-primary bg-background-secondary":"text-text-secondary",o),...a,children:[!!s&&s,(0,u.jsx)("span",{className:"contents",children:i}),!!l&&l]})})},VE={open:{y:0,opacity:1,transition:{y:{stiffness:1e3,velocity:-100}}},closed:{y:50,opacity:0,transition:{y:{stiffness:1e3}}}},WE=({children:e})=>(0,u.jsx)(fl.li,{className:"m-0 p-0 flex items-center justify-start w-full",variants:VE,whileHover:{scale:1.05},whileTap:{scale:.95},children:e}),HE=({children:e,className:t})=>{const{triggerRef:n,triggerOnRight:r,triggerOnLeft:o}=zE(),[i,a]=(0,d.useState)(null);return n?(0,u.jsxs)(fl.div,{ref:a,className:he("absolute top-0 bottom-0 w-80 h-screen",r?"right-0":"left-0",t),children:[i&&(0,u.jsx)(fl.div,{className:he("bg-background-primary shadow-lg absolute top-0 bottom-0 w-80 border-y-0 border-l-0 border-r border-solid border-border-subtle",r?"right-0":"left-0"),variants:FE(n,i,o??!1)}),(0,u.jsx)(fl.ul,{variants:YE,className:he("relative mt-14 mb-0 w-full px-5 pb-5 pt-2 flex flex-col items-start justify-start gap-0.5",t),children:e})]}):null},qE=({className:e,children:t})=>{const[n,r]=function(...e){const t=(0,d.useRef)(0),[n,r]=(0,d.useState)(e[t.current]);return[n,(0,d.useCallback)((n=>{t.current="number"!=typeof n?((e,t,n)=>{const r=t-0;return((n-0)%r+r)%r+0})(0,e.length,t.current+1):n,r(e[t.current])}),[e.length,...e])]}(!1,!0),[o,i]=(0,d.useState)(null),a=(0,d.useRef)(null),{height:s}=(e=>{const t=(0,d.useRef)({width:0,height:0});return(0,d.useEffect)((()=>{e.current&&(t.current.width=e.current.offsetWidth,t.current.height=e.current.offsetHeight)}),[]),t.current})(a),{isRight:l=!1,isLeft:c=!0}=(e=>{if(!e)return{error:"Element not found."};const t=e.getBoundingClientRect(),n=window.innerWidth,r=n/2,o=t.right<r,i=t.left>r;return{isLeft:o,isRight:i,isCenter:!o&&!i,elementRect:{left:t.left,right:t.right,width:t.width},viewport:{width:n,center:r}}})(o);return(0,u.jsx)(LE,{value:{isOpen:n,toggleOpen:r,setTriggerRef:e=>{(0,d.startTransition)((()=>{i(e)}))},triggerRef:o,triggerOnRight:l,triggerOnLeft:c},children:(0,u.jsx)("div",{className:he("size-6 z-[1]",e),children:(0,u.jsx)(fl.nav,{className:"h-full",initial:!1,animate:n?"open":"closed",custom:s,variants:{open:{pointerEvents:"auto"},closed:{pointerEvents:"none"}},ref:a,children:t})})})};qE.displayName="HamburgerMenu",BE.displayName="HamburgerMenu.Toggle",HE.displayName="HamburgerMenu.Options",QE.displayName="HamburgerMenu.Option",qE.Options=HE,qE.Option=QE,qE.Toggle=BE;const $E=hd("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]),GE=hd("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);function KE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ZE(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ZE(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ZE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var XE="srfm_upgrade_notice_seen";const JE=function(e){var t=e.onClose,n=KE((0,a.useState)(!0),2),r=n[0],o=n[1],i=KE((0,a.useState)(!1),2),s=i[0],l=i[1];return(0,a.useEffect)((function(){var e,t;e=XE,2===(t="; ".concat(document.cookie).split("; ".concat(e,"="))).length&&t.pop().split(";").shift()||l(!0)}),[]),s&&r?React.createElement(ld,{className:"relative bg-brand-background-hover-100 p-2 text-xs text-center w-full gap-1",align:"center"},React.createElement("p",{className:"text-text-primary w-full mx-7 lg:mx-0"},React.createElement("span",{className:" font-semibold text-xs"},(0,_u.__)("Ready to go beyond free plan?","sureforms"))," ",React.createElement(xe,{tag:"a",variant:"link",className:"p-0 [&>span]:p-0 underline underline-offset-2 font-normal",size:"xs",onClick:function(){var e,t;return window.open(Jw((null===(e=srfm_admin)||void 0===e?void 0:e.pricing_page_url)||(null===(t=srfm_admin)||void 0===t?void 0:t.sureforms_pricing_page),"dashboard-upgrade-notice-cta"),"_blank","noreferrer")}},(0,_u.__)("Upgrade now","sureforms"))," ",React.createElement("span",{className:"font-normal text-xs"},(0,_u.__)("and unlock the full power of SureForms!","sureforms"))),React.createElement(ld.Item,{className:"absolute right-2 inset-y-0 inline-flex items-center"},React.createElement(xe,{variant:"ghost",size:"xs",className:"p-1 hover:bg-transparent",icon:React.createElement(gd,{className:"size-4"}),onClick:function(){var e,n;o(!1),e=XE,(n=new Date).setTime(n.getTime()+864e6),document.cookie="".concat(e,"=").concat("true","; expires=").concat(n.toUTCString(),"; path=/"),"function"==typeof t&&t()}}))):null};function eN(){return eN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},eN.apply(null,arguments)}const tN=function(e){var t;return React.createElement("a",{href:null===(t=srfm_admin)||void 0===t?void 0:t.sureforms_dashboard_url,className:"inline-flex"},React.createElement("svg",eN({width:"120",height:"20",viewBox:"0 0 120 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),React.createElement("g",{clipPath:"url(#clip0_22722_181577)"},React.createElement("mask",{id:"mask0_22722_181577",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"120",height:"20"},React.createElement("path",{d:"M120 0H0V20H120V0Z",fill:"white"})),React.createElement("g",{mask:"url(#mask0_22722_181577)"},React.createElement("path",{d:"M20 0H0V20H20V0Z",fill:"#D54407"}),React.createElement("path",{d:"M5.71436 4.2854H14.2858V7.14256H7.14294L5.71436 8.57112V7.14256V4.2854Z",fill:"white"}),React.createElement("path",{d:"M5.71436 4.2854H14.2858V7.14256H7.14294L5.71436 8.57112V7.14256V4.2854Z",fill:"white"}),React.createElement("path",{d:"M5.71436 8.57129H12.8572V11.4284H7.14294L5.71436 12.857V11.4284V8.57129Z",fill:"white"}),React.createElement("path",{d:"M5.71436 8.57129H12.8572V11.4284H7.14294L5.71436 12.857V11.4284V8.57129Z",fill:"white"}),React.createElement("path",{d:"M5.71436 12.8572H10.0001V15.7143H5.71436V12.8572Z",fill:"white"}),React.createElement("path",{d:"M5.71436 12.8572H10.0001V15.7143H5.71436V12.8572Z",fill:"white"}),React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M26.6665 13.8361L27.4936 12.6205C27.8732 13.0586 28.3781 13.4272 29.0083 13.7265C29.6384 14.0258 30.3009 14.1754 30.9956 14.1754C31.7905 14.1754 32.41 14.0039 32.8539 13.6608C33.3051 13.3177 33.5308 12.8688 33.5308 12.3139C33.5308 11.9635 33.409 11.6678 33.1655 11.4269C32.922 11.186 32.6069 10.9998 32.2202 10.8684C31.8334 10.7371 31.4073 10.6166 30.9419 10.5071C30.4764 10.3976 30.0073 10.2698 29.5347 10.1238C29.0692 9.97782 28.6431 9.79894 28.2564 9.58725C27.8696 9.3755 27.5545 9.07619 27.311 8.68932C27.0675 8.29507 26.9458 7.82788 26.9458 7.28763C26.9458 6.39694 27.2967 5.65602 27.9986 5.06469C28.7004 4.46606 29.6636 4.16675 30.8882 4.16675C32.5066 4.16675 33.8172 4.69237 34.8198 5.74362L34.0571 6.90438C33.7276 6.49557 33.2836 6.16704 32.7251 5.91882C32.1736 5.66332 31.5613 5.53556 30.8882 5.53556C30.1792 5.53556 29.6098 5.69982 29.1801 6.02833C28.7505 6.34957 28.5356 6.75469 28.5356 7.24382C28.5356 7.55775 28.6574 7.82419 28.9009 8.04325C29.1443 8.25494 29.4559 8.42282 29.8354 8.54694C30.2221 8.66375 30.6483 8.77688 31.1138 8.88644C31.5864 8.98863 32.0554 9.11638 32.5209 9.26969C32.9936 9.42301 33.4197 9.61275 33.7993 9.83913C34.186 10.0581 34.5011 10.3757 34.7446 10.7918C34.9881 11.2079 35.1098 11.7007 35.1098 12.2701C35.1098 13.2191 34.7446 14.0039 34.0141 14.6244C33.2908 15.2377 32.2703 15.5443 30.9526 15.5443C29.1694 15.5443 27.7408 14.9749 26.6665 13.8361ZM36.9153 12.0839V4.44051H38.5589V11.5693C38.5589 12.4745 38.763 13.1133 39.1712 13.4856C39.5794 13.8506 40.1738 14.0331 40.9544 14.0331C41.5703 14.0331 42.1647 13.8761 42.7376 13.5623C43.3104 13.2483 43.7581 12.8614 44.0803 12.4015V4.44051H45.7346V15.2706H44.0803V13.7484C43.6363 14.2594 43.0813 14.6865 42.4153 15.0296C41.7493 15.3727 41.0439 15.5443 40.2991 15.5443C38.0433 15.5443 36.9153 14.3908 36.9153 12.0839ZM48.1524 15.2706H49.796V7.60519C50.0395 7.15988 50.4584 6.762 51.0529 6.41163C51.6473 6.05388 52.1987 5.87502 52.7071 5.87502C52.8718 5.87502 53.0831 5.88962 53.3409 5.91882V4.18865C52.6534 4.18865 52.0053 4.37116 51.3966 4.73617C50.7878 5.09389 50.2544 5.57206 49.796 6.17069V4.44051H48.1524V15.2706ZM53.9111 9.83913C53.9111 8.80244 54.1331 7.85344 54.5771 6.992C55.0283 6.12324 55.6549 5.437 56.457 4.93329C57.2591 4.42226 58.1578 4.16675 59.1533 4.16675C60.1988 4.16675 61.1119 4.42591 61.8925 4.94424C62.6731 5.46255 63.2606 6.15974 63.6543 7.03575C64.0549 7.9045 64.2556 8.88638 64.2556 9.98144V10.4085H55.6728C55.7373 11.4744 56.1096 12.365 56.79 13.0804C57.4775 13.7959 58.3726 14.1536 59.4755 14.1536C60.0986 14.1536 60.6966 14.0331 61.2694 13.7922C61.8496 13.5513 62.3544 13.2083 62.7843 12.7629L63.5681 13.8579C62.4439 14.9821 61.0368 15.5443 59.3466 15.5443C57.7568 15.5443 56.4534 15.015 55.4365 13.9565C54.4196 12.8979 53.9111 11.5255 53.9111 9.83913ZM55.6513 9.14925H62.6231C62.6162 8.73313 62.5406 8.32063 62.3974 7.91182C62.2613 7.503 62.0573 7.11969 61.7851 6.762C61.5129 6.40432 61.1477 6.11594 60.6894 5.89693C60.2311 5.67062 59.7118 5.55746 59.1318 5.55746C58.5875 5.55746 58.0934 5.66696 57.6494 5.88597C57.2054 6.10498 56.8437 6.39338 56.5644 6.75107C56.2923 7.1015 56.0774 7.48475 55.9199 7.90082C55.7623 8.30969 55.6728 8.72582 55.6513 9.14925Z",fill:"#030712"}),React.createElement("path",{d:"M68.2325 15.6356H65.9331V4.63989H73.5762V6.70057H68.2325V9.00851H73.4625V11.0692H68.2325V15.6356Z",fill:"#030712"}),React.createElement("path",{d:"M80.3168 15.8336C77.0462 15.8336 74.6655 13.4597 74.6655 10.1462C74.6655 6.83263 77.0462 4.45874 80.3168 4.45874C83.5712 4.45874 85.9518 6.83263 85.9518 10.1462C85.9518 13.4597 83.5712 15.8336 80.3168 15.8336ZM80.3168 13.7564C82.3087 13.7564 83.5874 12.1904 83.5874 10.1462C83.5874 8.08551 82.3087 6.53588 80.3168 6.53588C78.3087 6.53588 77.0299 8.08551 77.0299 10.1462C77.0299 12.1904 78.3087 13.7564 80.3168 13.7564Z",fill:"#030712"}),React.createElement("path",{d:"M96.3254 15.6356H93.6698L91.5486 11.7286H89.8648V15.6356H87.5654V4.63989H92.6173C94.8679 4.63989 96.2604 6.14006 96.2604 8.18426C96.2604 10.113 95.0461 11.1681 93.8804 11.4483L96.3254 15.6356ZM92.2936 9.66789C93.2004 9.66789 93.8967 9.10739 93.8967 8.16776C93.8967 7.26107 93.2004 6.70057 92.2936 6.70057H89.8648V9.66789H92.2936Z",fill:"#030712"}),React.createElement("path",{d:"M109.678 15.6356H107.362V7.70614L104.318 15.6356H103.314L100.27 7.70614V15.6356H97.9707V4.63989H101.193L103.816 11.5143L106.439 4.63989H109.678V15.6356Z",fill:"#030712"}),React.createElement("path",{d:"M115.676 15.8335C113.588 15.8335 112.098 15.1246 111.078 14.086L112.341 12.2562C113.102 13.0639 114.284 13.7563 115.774 13.7563C117.053 13.7563 117.652 13.1793 117.652 12.5364C117.652 10.6241 111.434 11.9594 111.434 7.82163C111.434 5.99175 112.989 4.4751 115.531 4.4751C117.247 4.4751 118.672 5.00263 119.741 6.00823L118.462 7.75569C117.588 6.93138 116.421 6.55225 115.32 6.55225C114.349 6.55225 113.798 6.98088 113.798 7.64025C113.798 9.37125 120 8.20075 120 12.3056C120 14.3168 118.575 15.8335 115.676 15.8335Z",fill:"#030712"}))),React.createElement("defs",null,React.createElement("clipPath",{id:"clip0_22722_181577"},React.createElement("rect",{width:"120",height:"20",fill:"white"})))))},nN=g("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]),rN={sm:{text:"text-sm",separator:"text-sm",separatorIconSize:16},md:{text:"text-base",separator:"text-base",separatorIconSize:18}},oN=(0,d.createContext)({sizes:rN.sm}),iN=({children:e,size:t="sm"})=>{const n=rN[t]||rN.sm;return(0,u.jsx)(oN.Provider,{value:{sizes:n},children:(0,u.jsx)("nav",{className:"flex m-0","aria-label":"Breadcrumb",children:(0,u.jsx)("ul",{className:"m-0 inline-flex items-center space-x-1 md:space-x-1",children:e})})})};iN.displayName="Breadcrumb";const aN=({children:e})=>(0,u.jsx)(u.Fragment,{children:e});aN.displayName="Breadcrumb.List";const sN=({children:e})=>(0,u.jsx)("li",{className:"m-0 inline-flex items-center gap-2",children:e});sN.displayName="Breadcrumb.Item";const lN=({href:e,children:t,className:n,as:r="a",...o})=>{const{sizes:i}=(0,d.useContext)(oN);return(0,u.jsx)(r,{href:e,className:he(i.text,"px-1 font-medium no-underline text-text-tertiary hover:text-text-primary hover:underline","focus:outline-none focus:ring-1 focus:ring-border-interactive focus:border-border-interactive focus:rounded-sm","transition-all duration-200",n),...o,children:t})};lN.displayName="Breadcrumb.Link";const cN=({type:e})=>{const{sizes:t}=(0,d.useContext)(oN),n={slash:(0,u.jsx)("span",{className:he("mx-1",t.separator),children:"/"}),arrow:(0,u.jsx)(wp,{size:t.separatorIconSize})};return(0,u.jsx)("li",{role:"separator",className:"flex items-center text-text-tertiary mx-2 p-0 list-none","aria-hidden":"true",children:n[e]||n.arrow})};cN.displayName="Breadcrumb.Separator";const uN=()=>{const{sizes:e}=(0,d.useContext)(oN);return(0,u.jsx)(nN,{className:"mt-[2px] cursor-pointer text-text-tertiary hover:text-text-primary",size:e.separatorIconSize+4})};uN.displayName="Breadcrumb.Ellipsis";const dN=({children:e})=>{const{sizes:t}=(0,d.useContext)(oN);return(0,u.jsx)("span",{className:he(t.text,"font-medium text-text-primary"),children:e})};dN.displayName="Breadcrumb.Page",iN.List=aN,iN.Item=sN,iN.Link=lN,iN.Separator=cN,iN.Ellipsis=uN,iN.Page=dN;const fN=function(e){var t=e.options;return React.createElement(iN,null,React.createElement(iN.List,null,t.map((function(e,t){switch(e.type){case"separator":return React.createElement(iN.Separator,{key:t});case"ellipsis":return React.createElement(iN.Item,{key:t},React.createElement(iN.Ellipsis,null));case"page":return React.createElement(iN.Item,{key:t},React.createElement(iN.Page,null,e.text));default:return React.createElement(iN.Item,{key:t},React.createElement(iN.Link,null==e?void 0:e.linkProps,e.text))}}))))};var mN=["title","content","placement","arrow","interactive","portalId","children"];function hN(){return hN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hN.apply(null,arguments)}const pN=function(e){var t=e.title,n=e.content,r=e.placement,o=void 0===r?"bottom":r,i=e.arrow,a=void 0===i||i,s=e.interactive,l=void 0!==s&&s,c=e.portalId,u=void 0===c?"srfm-settings-container":c,d=e.children,f=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,mN);return d?React.createElement(Wv,hN({title:t,content:n,placement:o,arrow:a,interactive:l,tooltipPortalId:u},f),d):null};function gN(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||yN(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yN(e,t){if(e){if("string"==typeof e)return vN(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vN(e,t):void 0}}function vN(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var bN=srfm_admin,wN=bN.site_url,xN=void 0===wN?"":wN,MN=bN.is_pro_active,EN=void 0!==MN&&MN,NN=bN.additional_header_nav_items,kN=void 0===NN?[]:NN,jN=[{slug:"sureforms_menu",text:(0,_u.__)("Dashboard","sureforms"),link:"".concat(xN,"/wp-admin/admin.php?page=sureforms_menu")},{slug:"sureforms_forms",text:(0,_u.__)("Forms","sureforms"),link:"".concat(xN,"/wp-admin/admin.php?page=sureforms_forms")},{slug:"sureforms_entries",text:(0,_u.__)("Entries","sureforms"),link:"".concat(xN,"/wp-admin/admin.php?page=sureforms_entries")},{slug:"sureforms_payments",text:(0,_u.__)("Payments","sureforms"),link:"".concat(xN,"/wp-admin/admin.php?page=sureforms_payments")}].concat(function(e){return function(e){if(Array.isArray(e))return vN(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||yN(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(kN),[{slug:"sureforms_form_settings",text:(0,_u.__)("Settings","sureforms"),link:"".concat(xN,"/wp-admin/admin.php?page=sureforms_form_settings&tab=general-settings")},{slug:"sureforms_learn",text:(0,_u.__)("Learn","sureforms"),link:"".concat(xN,"/wp-admin/admin.php?page=sureforms_learn")}]),DN=function(e){var t=e.title,n=e.icon,r=e.onClick,o=e.children;return React.createElement(RE.Item,{className:"p-1 gap-2"},React.createElement(pN,{title:t,placement:"bottom",className:"z-999999",portalId:"srfm-dashboard-container",variant:"dark"},o||React.createElement(xe,{size:"xs",variant:"ghost",className:"p-0 focus:[box-shadow:none] [box-shadow:none] text-text-primary",onClick:r,icon:n})))};const TN=function(e){var t,n,r,o,i,s,l=e.breadCrumb,c=gN((0,a.useState)(null),2),u=c[0],d=c[1],f=gN((0,a.useState)((null===(t=srfm_admin)||void 0===t?void 0:t.is_license_active)||!1),2),m=f[0],h=f[1],p=(null===(n=srfm_admin)||void 0===n?void 0:n.is_first_form_created)||!1;return(0,a.useEffect)((function(){var e=new URLSearchParams(window.location.search),t=e.get("page");t||(t=e.get("post_type")),d(jN.find((function(e){return e.slug===t})))}),[]),CE({uniqueKey:"sureforms",rssFeedURL:"https://sureforms.com/whats-new/feed/",selector:"#srfm_whats_new",icon:(0,a.renderToString)(React.createElement($E,{className:"size-4 m-1"})),flyout:{title:(0,_u.__)("What's New?","sureforms")},triggerButton:{icon:(0,a.renderToString)(React.createElement($E,{className:"size-4 m-1 text-text-primary"}))}}),(0,a.useEffect)((function(){window.addEventListener("srfm_license_status_updated",(function(e){null!=e&&e.detail&&h(e.detail.is_license_active)}))}),[]),React.createElement("div",{className:"top-8 z-[1]"},!EN&&!m&&"sureforms_menu"===(null==u?void 0:u.slug)&&p&&(null===(r=srfm_admin)||void 0===r?void 0:r.check_three_days_threshold)&&React.createElement(JE,null),React.createElement(RE,{className:"py-0 px-4 min-h-0 h-14 gap-4 shadow-sm bg-background-primary/75 backdrop-blur-[5px]"},React.createElement(RE.Left,{className:"gap-3"},React.createElement(RE.Item,{className:"w-auto h-auto lg:hidden"},React.createElement(qE,null,React.createElement(qE.Toggle,{className:"size-6"}),React.createElement(qE.Options,null,jN.map((function(e){return React.createElement(qE.Option,{key:e.slug,active:(null==u?void 0:u.slug)===e.slug,href:e.link,iconPosition:"left",rel:"noopener noreferrer",tag:"a",target:"_self"},e.text)})),!EN&&!m&&React.createElement(qE.Option,{href:jN[0].link,iconPosition:"left",rel:"noopener noreferrer",tag:"a",target:"_blank",className:"text-link-primary gap-1"},(0,_u.__)("Upgrade SureForms","sureforms")," ",React.createElement(fM,{className:"!size-5"}))))),React.createElement(RE.Item,null,l?React.createElement(tN,null):React.createElement(uE,null)),l&&!(null==l||!l.length)&&React.createElement(RE.Item,{className:"[&_li]:m-0 -ml-1"},React.createElement(fN,{options:l}))),React.createElement(RE.Middle,{align:"left",className:"h-full hidden lg:flex"},React.createElement(RE.Item,null,!l&&React.createElement("nav",{className:"flex items-center gap-4 h-full"},jN.map((function(e){return React.createElement("a",{className:ex("h-full text-text-secondary text-sm font-medium no-underline px-1 content-center relative focus:outline-none hover:text-text-primary focus:[box-shadow:none]",(null==u?void 0:u.slug)===(null==e?void 0:e.slug)&&'text-text-primary before:content-[""] before:absolute before:h-px before:bg-border-interactive before:bottom-0 before:inset-x-0'),href:e.link,key:e.slug},e.text)})))),!EN&&!m&&React.createElement(RE.Item,null,React.createElement(xe,{icon:React.createElement(fM,{className:"!size-5"}),iconPosition:"right",variant:"link",size:"sm",className:"h-full text-link-primary text-sm font-semibold no-underline hover:no-underline hover:text-link-primary-hover px-1 content-center [box-shadow:none] focus:[box-shadow:none] focus:outline-none",onClick:function(){var e,t;return window.open(Jw((null===(e=srfm_admin)||void 0===e?void 0:e.pricing_page_url)||(null===(t=srfm_admin)||void 0===t?void 0:t.sureforms_pricing_page),"dashboard-header-cta"),"_blank","noreferrer")}},(0,_u.__)("Upgrade SureForms","sureforms")))),React.createElement(RE.Right,null,React.createElement(RE.Item,{className:"flex gap-3 items-center"},React.createElement(yp,{size:"xs",variant:"neutral",className:"text-text-tertiary"},null===(o=srfm_admin)||void 0===o?void 0:o.plugin_version),React.createElement(op,{label:(0,_u.__)("Core","sureforms"),className:"text-text-tertiary",size:"xs",type:"rounded",variant:"neutral"}),EN&&React.createElement(React.Fragment,null,React.createElement("span",{className:"text-text-tertiary"},"|"),React.createElement(yp,{size:"xs",variant:"neutral",className:"text-text-tertiary"},null===(i=srfm_admin)||void 0===i?void 0:i.pro_plugin_version),React.createElement(op,{label:null===(s=srfm_admin)||void 0===s?void 0:s.pro_plugin_name.split(" ")[1],size:"xs",variant:"inverse",type:"rounded"}))),(EN||m)&&React.createElement(RE.Item,null,React.createElement(xe,{variant:"ghost",className:"p-0 hover:bg-transparent focus:[box-shadow:none] [box-shadow:none]",onClick:function(){m||window.open("".concat(xN,"/wp-admin/admin.php?page=sureforms_form_settings&tab=account-settings"),"_self","noopener noreferrer")},icon:React.createElement(op,{label:m?(0,_u.__)("Activated","sureforms"):(0,_u.__)("Unlicensed","sureforms"),size:"xs",variant:m?"green":"red"})})),React.createElement(DN,{title:(0,_u.__)("Knowledge Base","sureforms"),icon:React.createElement(GE,{className:"size-4"}),onClick:function(){return window.open("https://sureforms.com/docs/","_blank","noopener noreferrer")}}),React.createElement(DN,{title:(0,_u.__)("What’s New","sureforms")},React.createElement("div",{id:"srfm_whats_new",className:"[&>a]:p-0.5 [&>a]:pl-0"})))))},SN=hd("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),CN=hd("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]),RN=hd("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);var ON=function(e){switch(e){case"error":return React.createElement(SN,{className:"!size-6"});case"warning":return React.createElement(bv,{className:"!size-6"});case"success":return React.createElement(CN,{className:"!size-6"});default:return React.createElement(RN,{className:"!size-6"})}},AN=function(e){switch(e){case"error":return"shadow-none bg-alert-background-danger";case"warning":return"shadow-none bg-alert-background-warning";case"success":return"shadow-none bg-alert-background-success";default:return"shadow-none bg-alert-background-info"}},IN=function(e){var t=e.variant,n=void 0===t?"info":t,r=e.message,o=e.title,i=e.actions,a=void 0===i?[]:i,s=React.createElement("span",{className:"flex flex-col gap-3.5"},React.createElement("span",null,r,a.length>0&&a.map((function(e,t){return React.createElement("span",{key:t}," ",React.createElement(xe,{onClick:function(){e.url&&("_blank"===e.target?window.open(e.url,"_blank","noopener,noreferrer"):window.location.href=e.url),e.onClick&&e.onClick()},variant:"link",size:"xs",className:"inline-flex text-link-primary p-0 [&>span]:p-0"},e.label))}))));return React.createElement(vv,{content:s,icon:ON(n),title:o||null,variant:n,className:AN(n)})};const _N=function(e){var t,n=e.currentPage,r=void 0===n?"all":n,o=(null===(t=window.srfm_admin)||void 0===t?void 0:t.notices)||[];if(!o||0===o.length)return null;var i=o.filter((function(e){return!(e.pages&&!e.pages.includes("all"))||e.pages.includes(r)}));return 0===i.length?null:React.createElement("div",{className:"flex flex-col gap-4"},i.map((function(e){return React.createElement(IN,{key:e.id,variant:e.variant||"info",message:e.message,title:e.title,actions:e.actions||[]})})))};var PN=function(e){var t=e.className;return React.createElement("div",{className:ex("z-50 relative",t)},React.createElement(TN,null))};const LN=function(){var e;return React.createElement(React.Fragment,null,React.createElement(PN,null),(null===(e=window.srfm_admin)||void 0===e||null===(e=e.notices)||void 0===e?void 0:e.length)>0&&React.createElement("div",{className:"px-8 py-4"},React.createElement(_N,{currentPage:"sureforms_payments"})),React.createElement(bu,null))};function zN(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var FN=function(e){var t,n=e.className,r=lu().id;return t="subscription"===(function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return zN(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zN(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Iu(),1)[0].get("type")||"payment")?(0,_u.sprintf)((0,_u.__)("Subscription #%s","sureforms"),r||""):(0,_u.sprintf)((0,_u.__)("Payment #%s","sureforms"),r||""),React.createElement("div",{className:ex("z-50 relative",n)},React.createElement(TN,{breadCrumb:[{type:"separator"},{text:(0,_u.__)("Payments","sureforms"),linkProps:{as:Ru,to:"/"}},{type:"separator"},{text:t,type:"page"}]}))};const UN=function(){return React.createElement(React.Fragment,null,React.createElement(FN,null),React.createElement(bu,null))};var BN=function(){return React.createElement(Tu,{basename:"/",future:{v7_startTransition:!0,v7_relativeSplatPath:!0}},React.createElement(Mu,null,React.createElement(wu,{path:"/",element:React.createElement(LN,null)},React.createElement(wu,{index:!0,element:React.createElement(uM,null)})),React.createElement(wu,{path:"/payment/:id",element:React.createElement(UN,null)},React.createElement(wu,{index:!0,element:React.createElement(sE,null)}))))},YN=new class{#G;#b;#h;#K;#Z;#X;#J;#ee;constructor(e={}){this.#G=e.queryCache||new nc,this.#b=e.mutationCache||new oc,this.#h=e.defaultOptions||{},this.#K=new Map,this.#Z=new Map,this.#X=0}mount(){this.#X++,1===this.#X&&(this.#J=Vl.subscribe((async e=>{e&&(await this.resumePausedMutations(),this.#G.onFocus())})),this.#ee=Wl.subscribe((async e=>{e&&(await this.resumePausedMutations(),this.#G.onOnline())})))}unmount(){this.#X--,0===this.#X&&(this.#J?.(),this.#J=void 0,this.#ee?.(),this.#ee=void 0)}isFetching(e){return this.#G.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#b.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#G.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#G.build(this,t),r=n.state.data;return void 0===r?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ml(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#G.findAll(e).map((({queryKey:e,state:t})=>[e,t.data]))}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=this.#G.get(r.queryHash),i=o?.state.data,a=function(e,t){return"function"==typeof e?e(t):e}(t,i);if(void 0!==a)return this.#G.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Yl.batch((()=>this.#G.findAll(e).map((({queryKey:e})=>[e,this.setQueryData(e,t,n)]))))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#G.get(t.queryHash)?.state}removeQueries(e){const t=this.#G;Yl.batch((()=>{t.findAll(e).forEach((e=>{t.remove(e)}))}))}resetQueries(e,t){const n=this.#G;return Yl.batch((()=>(n.findAll(e).forEach((e=>{e.reset()})),this.refetchQueries({type:"active",...e},t))))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Yl.batch((()=>this.#G.findAll(e).map((e=>e.cancel(n)))));return Promise.all(r).then(bl).catch(bl)}invalidateQueries(e,t={}){return Yl.batch((()=>(this.#G.findAll(e).forEach((e=>{e.invalidate()})),"none"===e?.refetchType?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Yl.batch((()=>this.#G.findAll(e).filter((e=>!e.isDisabled()&&!e.isStatic())).map((e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(bl)),"paused"===e.state.fetchStatus?Promise.resolve():t}))));return Promise.all(r).then(bl)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const n=this.#G.build(this,t);return n.isStaleByTime(Ml(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(bl).catch(bl)}fetchInfiniteQuery(e){return e.behavior=ac(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(bl).catch(bl)}ensureInfiniteQueryData(e){return e.behavior=ac(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Wl.isOnline()?this.#b.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#G}getMutationCache(){return this.#b}getDefaultOptions(){return this.#h}setDefaultOptions(e){this.#h=e}setQueryDefaults(e,t){this.#K.set(Dl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#K.values()],n={};return t.forEach((t=>{Tl(e,t.queryKey)&&Object.assign(n,t.defaultOptions)})),n}setMutationDefaults(e,t){this.#Z.set(Dl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#Z.values()],n={};return t.forEach((t=>{Tl(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)})),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#h.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=jl(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===zl&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#h.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#G.clear(),this.#b.clear()}}({defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnMount:!0,retry:1,staleTime:3e5}}});window.srfm_payment_query_client=YN,window.srfm_payment_toast=c,i()((function(){var e=document.getElementById("srfm-payments-react-container");e&&(0,a.createRoot)(e).render(React.createElement(gc,null,React.createElement(dc,{client:YN},React.createElement(BN,null),React.createElement(pl,{className:"z-999999"}))))}))})()})();
Save
Back