@veevarts/design-system 2.23.0 → 2.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -195,6 +195,14 @@ For `mode="datetime"`, the design system does not convert timezones. The consumi
195
195
  </HeroUIProvider>
196
196
  ```
197
197
 
198
+ **React Aria locale (`HeroUIProvider`).** Set `locale` (BCP 47, e.g. `"fr-FR"`) so the strings React Aria renders follow the app's language: the hidden "Dismiss" buttons of every overlay, date and number formatting. Without it HeroUI uses `"en-US"`. `closeLabel` stays separate because HeroUI's close button text is not a React Aria string.
199
+
200
+ ```tsx
201
+ <HeroUIProvider locale="fr-FR" closeLabel="Fermer">
202
+ {/* ... */}
203
+ </HeroUIProvider>
204
+ ```
205
+
198
206
  **Table header contrast (`Table`).** Column headers default to `text-default-600` (`text-default-700` on a hovered sortable column) so 12px header text clears 4.5:1 (WCAG 1.4.3). Your classes win: a `classNames.th` color on the table, or a `className` on a `TableColumn`, replaces the default.
199
207
 
200
208
  For complete HeroUI documentation, visit: [HeroUI Storybook](https://storybook.heroui.com/)
package/dist/index.cjs CHANGED
@@ -4,7 +4,7 @@
4
4
  color: var(--ink);`:"";return`${e} {
5
5
  ${s}${a}
6
6
  }
7
- `}const ie={line:"#E7E7E9","line-2":"#F1F1F3",hair:"#F0F0F1",page:"#FBFBFB",field:"#E5E5E5","line-strong":"#D4D4D8",ink:"#18181B",muted:"#71717A",faint:"#A1A1AA","ok-fill":"#EAF3DE",ok:"#3B6D11","warn-fill":"#FAEEDA",warn:"#854F0B","warn-icon":"#EFD9B2","danger-fill":"#FCEBEB",danger:De.semantic.danger,"danger-icon":"#F3D3CF","info-fill":"#EAF1FC",info:"#1D4FA8","violet-fill":"#F1ECFB",violet:"#6D28D9","neutral-fill":"#F4F4F5",neutral:"#52525B",destructive:"#A32D2D"};({...ie});const kr=h.createContext(void 0);function Sr(){return h.useContext(kr)}function Cc({children:e,closeLabel:n}){const s=Sr();return t.jsx(c.HeroUIProvider,{children:t.jsx(kr.Provider,{value:n??s,children:e})})}const $r=h.createContext("default");function Cn(){return h.useContext($r)}function kc(e){return Cn()==="touch"?"lg":e}function Sc({density:e,children:n}){return t.jsx($r.Provider,{value:e,children:n})}function $c(e,n){const s=e.icons,a=e.aliases||Object.create(null),r=Object.create(null);function i(o){if(s[o])return r[o]=[];if(!(o in r)){r[o]=null;const l=a[o]&&a[o].parent,d=l&&i(l);d&&(r[o]=[l].concat(d))}return r[o]}return Object.keys(s).concat(Object.keys(a)).forEach(i),r}const Ar=Object.freeze({left:0,top:0,width:16,height:16}),xn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Cs=Object.freeze({...Ar,...xn}),rs=Object.freeze({...Cs,body:"",hidden:!1});function Ac(e,n){const s={};!e.hFlip!=!n.hFlip&&(s.hFlip=!0),!e.vFlip!=!n.vFlip&&(s.vFlip=!0);const a=((e.rotate||0)+(n.rotate||0))%4;return a&&(s.rotate=a),s}function fa(e,n){const s=Ac(e,n);for(const a in rs)a in xn?a in e&&!(a in s)&&(s[a]=xn[a]):a in n?s[a]=n[a]:a in e&&(s[a]=e[a]);return s}function Dc(e,n,s){const a=e.icons,r=e.aliases||Object.create(null);let i={};function o(l){i=fa(a[l]||r[l],i)}return o(n),s.forEach(o),fa(e,i)}function Dr(e,n){const s=[];if(typeof e!="object"||typeof e.icons!="object")return s;e.not_found instanceof Array&&e.not_found.forEach(r=>{n(r,null),s.push(r)});const a=$c(e);for(const r in a){const i=a[r];i&&(n(r,Dc(e,r,i)),s.push(r))}return s}const Ec={provider:"",aliases:{},not_found:{},...Ar};function Tn(e,n){for(const s in n)if(s in e&&typeof e[s]!=typeof n[s])return!1;return!0}function Er(e){if(typeof e!="object"||e===null)return null;const n=e;if(typeof n.prefix!="string"||!e.icons||typeof e.icons!="object"||!Tn(e,Ec))return null;const s=n.icons;for(const r in s){const i=s[r];if(!r||typeof i.body!="string"||!Tn(i,rs))return null}const a=n.aliases||Object.create(null);for(const r in a){const i=a[r],o=i.parent;if(!r||typeof o!="string"||!s[o]&&!a[o]||!Tn(i,rs))return null}return n}const xa=Object.create(null);function Lc(e,n){return{provider:e,prefix:n,icons:Object.create(null),missing:new Set}}function At(e,n){const s=xa[e]||(xa[e]=Object.create(null));return s[n]||(s[n]=Lc(e,n))}function Lr(e,n){return Er(n)?Dr(n,(s,a)=>{a?e.icons[s]=a:e.missing.add(s)}):[]}function Fc(e,n,s){try{if(typeof s.body=="string")return e.icons[n]={...s},!0}catch{}return!1}const Fr=/^[a-z0-9]+(-[a-z0-9]+)*$/,kn=(e,n,s,a="")=>{const r=e.split(":");if(e.slice(0,1)==="@"){if(r.length<2||r.length>3)return null;a=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){const l=r.pop(),d=r.pop(),u={provider:r.length>0?r[0]:a,prefix:d,name:l};return n&&!on(u)?null:u}const i=r[0],o=i.split("-");if(o.length>1){const l={provider:a,prefix:o.shift(),name:o.join("-")};return n&&!on(l)?null:l}if(s&&a===""){const l={provider:a,prefix:"",name:i};return n&&!on(l,s)?null:l}return null},on=(e,n)=>e?!!((n&&e.prefix===""||e.prefix)&&e.name):!1;let qt=!1;function Rr(e){return typeof e=="boolean"&&(qt=e),qt}function pa(e){const n=typeof e=="string"?kn(e,!0,qt):e;if(n){const s=At(n.provider,n.prefix),a=n.name;return s.icons[a]||(s.missing.has(a)?null:void 0)}}function Rc(e,n){const s=kn(e,!0,qt);if(!s)return!1;const a=At(s.provider,s.prefix);return n?Fc(a,s.name,n):(a.missing.add(s.name),!0)}function _c(e,n){if(typeof e!="object")return!1;if(typeof n!="string"&&(n=e.provider||""),qt&&!n&&!e.prefix){let r=!1;return Er(e)&&(e.prefix="",Dr(e,(i,o)=>{Rc(i,o)&&(r=!0)})),r}const s=e.prefix;if(!on({prefix:s,name:"a"}))return!1;const a=At(n,s);return!!Lr(a,e)}const _r=Object.freeze({width:null,height:null}),Mr=Object.freeze({..._r,...xn}),Mc=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Pc=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ha(e,n,s){if(n===1)return e;if(s=s||100,typeof e=="number")return Math.ceil(e*n*s)/s;if(typeof e!="string")return e;const a=e.split(Mc);if(a===null||!a.length)return e;const r=[];let i=a.shift(),o=Pc.test(i);for(;;){if(o){const l=parseFloat(i);isNaN(l)?r.push(i):r.push(Math.ceil(l*n*s)/s)}else r.push(i);if(i=a.shift(),i===void 0)return r.join("");o=!o}}function Tc(e,n="defs"){let s="";const a=e.indexOf("<"+n);for(;a>=0;){const r=e.indexOf(">",a),i=e.indexOf("</"+n);if(r===-1||i===-1)break;const o=e.indexOf(">",i);if(o===-1)break;s+=e.slice(r+1,i).trim(),e=e.slice(0,a).trim()+e.slice(o+1)}return{defs:s,content:e}}function Ic(e,n){return e?"<defs>"+e+"</defs>"+n:n}function Oc(e,n,s){const a=Tc(e);return Ic(a.defs,n+a.content+s)}const zc=e=>e==="unset"||e==="undefined"||e==="none";function Bc(e,n){const s={...Cs,...e},a={...Mr,...n},r={left:s.left,top:s.top,width:s.width,height:s.height};let i=s.body;[s,a].forEach(y=>{const b=[],j=y.hFlip,w=y.vFlip;let $=y.rotate;j?w?$+=2:(b.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),b.push("scale(-1 1)"),r.top=r.left=0):w&&(b.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),b.push("scale(1 -1)"),r.top=r.left=0);let N;switch($<0&&($-=Math.floor($/4)*4),$=$%4,$){case 1:N=r.height/2+r.top,b.unshift("rotate(90 "+N.toString()+" "+N.toString()+")");break;case 2:b.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:N=r.width/2+r.left,b.unshift("rotate(-90 "+N.toString()+" "+N.toString()+")");break}$%2===1&&(r.left!==r.top&&(N=r.left,r.left=r.top,r.top=N),r.width!==r.height&&(N=r.width,r.width=r.height,r.height=N)),b.length&&(i=Oc(i,'<g transform="'+b.join(" ")+'">',"</g>"))});const o=a.width,l=a.height,d=r.width,u=r.height;let f,m;o===null?(m=l===null?"1em":l==="auto"?u:l,f=ha(m,d/u)):(f=o==="auto"?d:o,m=l===null?ha(f,u/d):l==="auto"?u:l);const p={},x=(y,b)=>{zc(b)||(p[y]=b.toString())};x("width",f),x("height",m);const g=[r.left,r.top,d,u];return p.viewBox=g.join(" "),{attributes:p,viewBox:g,body:i}}const Vc=/\sid="(\S+)"/g,Uc="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Hc=0;function Wc(e,n=Uc){const s=[];let a;for(;a=Vc.exec(e);)s.push(a[1]);if(!s.length)return e;const r="suffix"+(Math.random()*16777216|Date.now()).toString(16);return s.forEach(i=>{const o=typeof n=="function"?n(i):n+(Hc++).toString(),l=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+o+r+"$3")}),e=e.replace(new RegExp(r,"g"),""),e}const is=Object.create(null);function qc(e,n){is[e]=n}function ls(e){return is[e]||is[""]}function ks(e){let n;if(typeof e.resources=="string")n=[e.resources];else if(n=e.resources,!(n instanceof Array)||!n.length)return null;return{resources:n,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Ss=Object.create(null),Rt=["https://api.simplesvg.com","https://api.unisvg.com"],cn=[];for(;Rt.length>0;)Rt.length===1||Math.random()>.5?cn.push(Rt.shift()):cn.push(Rt.pop());Ss[""]=ks({resources:["https://api.iconify.design"].concat(cn)});function Gc(e,n){const s=ks(n);return s===null?!1:(Ss[e]=s,!0)}function $s(e){return Ss[e]}const Kc=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let ba=Kc();function Yc(e,n){const s=$s(e);if(!s)return 0;let a;if(!s.maxURL)a=0;else{let r=0;s.resources.forEach(o=>{r=Math.max(r,o.length)});const i=n+".json?icons=";a=s.maxURL-r-s.path.length-i.length}return a}function Qc(e){return e===404}const Zc=(e,n,s)=>{const a=[],r=Yc(e,n),i="icons";let o={type:i,provider:e,prefix:n,icons:[]},l=0;return s.forEach((d,u)=>{l+=d.length+1,l>=r&&u>0&&(a.push(o),o={type:i,provider:e,prefix:n,icons:[]},l=d.length),o.icons.push(d)}),a.push(o),a};function Xc(e){if(typeof e=="string"){const n=$s(e);if(n)return n.path}return"/"}const Jc=(e,n,s)=>{if(!ba){s("abort",424);return}let a=Xc(n.provider);switch(n.type){case"icons":{const i=n.prefix,l=n.icons.join(","),d=new URLSearchParams({icons:l});a+=i+".json?"+d.toString();break}case"custom":{const i=n.uri;a+=i.slice(0,1)==="/"?i.slice(1):i;break}default:s("abort",400);return}let r=503;ba(e+a).then(i=>{const o=i.status;if(o!==200){setTimeout(()=>{s(Qc(o)?"abort":"next",o)});return}return r=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?s("abort",i):s("next",r)});return}setTimeout(()=>{s("success",i)})}).catch(()=>{s("next",r)})},ed={prepare:Zc,send:Jc};function Pr(e,n){e.forEach(s=>{const a=s.loaderCallbacks;a&&(s.loaderCallbacks=a.filter(r=>r.id!==n))})}function td(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const n=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!n.length)return;let s=!1;const a=e.provider,r=e.prefix;n.forEach(i=>{const o=i.icons,l=o.pending.length;o.pending=o.pending.filter(d=>{if(d.prefix!==r)return!0;const u=d.name;if(e.icons[u])o.loaded.push({provider:a,prefix:r,name:u});else if(e.missing.has(u))o.missing.push({provider:a,prefix:r,name:u});else return s=!0,!0;return!1}),o.pending.length!==l&&(s||Pr([e],i.id),i.callback(o.loaded.slice(0),o.missing.slice(0),o.pending.slice(0),i.abort))})}))}let nd=0;function sd(e,n,s){const a=nd++,r=Pr.bind(null,s,a);if(!n.pending.length)return r;const i={id:a,icons:n,callback:e,abort:r};return s.forEach(o=>{(o.loaderCallbacks||(o.loaderCallbacks=[])).push(i)}),r}function ad(e){const n={loaded:[],missing:[],pending:[]},s=Object.create(null);e.sort((r,i)=>r.provider!==i.provider?r.provider.localeCompare(i.provider):r.prefix!==i.prefix?r.prefix.localeCompare(i.prefix):r.name.localeCompare(i.name));let a={provider:"",prefix:"",name:""};return e.forEach(r=>{if(a.name===r.name&&a.prefix===r.prefix&&a.provider===r.provider)return;a=r;const i=r.provider,o=r.prefix,l=r.name,d=s[i]||(s[i]=Object.create(null)),u=d[o]||(d[o]=At(i,o));let f;l in u.icons?f=n.loaded:o===""||u.missing.has(l)?f=n.missing:f=n.pending;const m={provider:i,prefix:o,name:l};f.push(m)}),n}function rd(e,n=!0,s=!1){const a=[];return e.forEach(r=>{const i=typeof r=="string"?kn(r,n,s):r;i&&a.push(i)}),a}const id={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function ld(e,n,s,a){const r=e.resources.length,i=e.random?Math.floor(Math.random()*r):e.index;let o;if(e.random){let k=e.resources.slice(0);for(o=[];k.length>1;){const C=Math.floor(Math.random()*k.length);o.push(k[C]),k=k.slice(0,C).concat(k.slice(C+1))}o=o.concat(k)}else o=e.resources.slice(i).concat(e.resources.slice(0,i));const l=Date.now();let d="pending",u=0,f,m=null,p=[],x=[];typeof a=="function"&&x.push(a);function g(){m&&(clearTimeout(m),m=null)}function y(){d==="pending"&&(d="aborted"),g(),p.forEach(k=>{k.status==="pending"&&(k.status="aborted")}),p=[]}function b(k,C){C&&(x=[]),typeof k=="function"&&x.push(k)}function j(){return{startTime:l,payload:n,status:d,queriesSent:u,queriesPending:p.length,subscribe:b,abort:y}}function w(){d="failed",x.forEach(k=>{k(void 0,f)})}function $(){p.forEach(k=>{k.status==="pending"&&(k.status="aborted")}),p=[]}function N(k,C,D){const S=C!=="success";switch(p=p.filter(_=>_!==k),d){case"pending":break;case"failed":if(S||!e.dataAfterTimeout)return;break;default:return}if(C==="abort"){f=D,w();return}if(S){f=D,p.length||(o.length?A():w());return}if(g(),$(),!e.random){const _=e.resources.indexOf(k.resource);_!==-1&&_!==e.index&&(e.index=_)}d="completed",x.forEach(_=>{_(D)})}function A(){if(d!=="pending")return;g();const k=o.shift();if(k===void 0){if(p.length){m=setTimeout(()=>{g(),d==="pending"&&($(),w())},e.timeout);return}w();return}const C={status:"pending",resource:k,callback:(D,S)=>{N(C,D,S)}};p.push(C),u++,m=setTimeout(A,e.rotate),s(k,n,C.callback)}return setTimeout(A),j}function Tr(e){const n={...id,...e};let s=[];function a(){s=s.filter(l=>l().status==="pending")}function r(l,d,u){const f=ld(n,l,d,(m,p)=>{a(),u&&u(m,p)});return s.push(f),f}function i(l){return s.find(d=>l(d))||null}return{query:r,find:i,setIndex:l=>{n.index=l},getIndex:()=>n.index,cleanup:a}}function ga(){}const In=Object.create(null);function od(e){if(!In[e]){const n=$s(e);if(!n)return;const s=Tr(n),a={config:n,redundancy:s};In[e]=a}return In[e]}function cd(e,n,s){let a,r;if(typeof e=="string"){const i=ls(e);if(!i)return s(void 0,424),ga;r=i.send;const o=od(e);o&&(a=o.redundancy)}else{const i=ks(e);if(i){a=Tr(i);const o=e.resources?e.resources[0]:"",l=ls(o);l&&(r=l.send)}}return!a||!r?(s(void 0,424),ga):a.query(n,r,s)().abort}function ya(){}function dd(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,td(e)}))}function ud(e){const n=[],s=[];return e.forEach(a=>{(a.match(Fr)?n:s).push(a)}),{valid:n,invalid:s}}function _t(e,n,s){function a(){const r=e.pendingIcons;n.forEach(i=>{r&&r.delete(i),e.icons[i]||e.missing.add(i)})}if(s&&typeof s=="object")try{if(!Lr(e,s).length){a();return}}catch(r){console.error(r)}a(),dd(e)}function va(e,n){e instanceof Promise?e.then(s=>{n(s)}).catch(()=>{n(null)}):n(e)}function md(e,n){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(n).sort():e.iconsToLoad=n,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:s,prefix:a}=e,r=e.iconsToLoad;if(delete e.iconsToLoad,!r||!r.length)return;const i=e.loadIcon;if(e.loadIcons&&(r.length>1||!i)){va(e.loadIcons(r,a,s),f=>{_t(e,r,f)});return}if(i){r.forEach(f=>{const m=i(f,a,s);va(m,p=>{const x=p?{prefix:a,icons:{[f]:p}}:null;_t(e,[f],x)})});return}const{valid:o,invalid:l}=ud(r);if(l.length&&_t(e,l,null),!o.length)return;const d=a.match(Fr)?ls(s):null;if(!d){_t(e,o,null);return}d.prepare(s,a,o).forEach(f=>{cd(s,f,m=>{_t(e,f.icons,m)})})}))}const fd=(e,n)=>{const s=rd(e,!0,Rr()),a=ad(s);if(!a.pending.length){let d=!0;return n&&setTimeout(()=>{d&&n(a.loaded,a.missing,a.pending,ya)}),()=>{d=!1}}const r=Object.create(null),i=[];let o,l;return a.pending.forEach(d=>{const{provider:u,prefix:f}=d;if(f===l&&u===o)return;o=u,l=f,i.push(At(u,f));const m=r[u]||(r[u]=Object.create(null));m[f]||(m[f]=[])}),a.pending.forEach(d=>{const{provider:u,prefix:f,name:m}=d,p=At(u,f),x=p.pendingIcons||(p.pendingIcons=new Set);x.has(m)||(x.add(m),r[u][f].push(m))}),i.forEach(d=>{const u=r[d.provider][d.prefix];u.length&&md(d,u)}),n?sd(n,a,i):ya};function xd(e,n){const s={...e};for(const a in n){const r=n[a],i=typeof r;a in _r?(r===null||r&&(i==="string"||i==="number"))&&(s[a]=r):i===typeof s[a]&&(s[a]=a==="rotate"?r%4:r)}return s}const pd=/[\s,]+/;function hd(e,n){n.split(pd).forEach(s=>{switch(s.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function bd(e,n=0){const s=e.replace(/^-?[0-9.]*/,"");function a(r){for(;r<0;)r+=4;return r%4}if(s===""){const r=parseInt(e);return isNaN(r)?0:a(r)}else if(s!==e){let r=0;switch(s){case"%":r=25;break;case"deg":r=90}if(r){let i=parseFloat(e.slice(0,e.length-s.length));return isNaN(i)?0:(i=i/r,i%1===0?a(i):0)}}return n}function gd(e,n){let s=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const a in n)s+=" "+a+'="'+n[a]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+s+">"+e+"</svg>"}function yd(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function vd(e){return"data:image/svg+xml,"+yd(e)}function jd(e){return'url("'+vd(e)+'")'}let Ut;function wd(){try{Ut=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Ut=null}}function Nd(e){return Ut===void 0&&wd(),Ut?Ut.createHTML(e):e}const Ir={...Mr,inline:!1},Cd={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},kd={display:"inline-block"},os={backgroundColor:"currentColor"},Or={backgroundColor:"transparent"},ja={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},wa={WebkitMask:os,mask:os,background:Or};for(const e in wa){const n=wa[e];for(const s in ja)n[e+s]=ja[s]}const Sd={...Ir,inline:!0};function Na(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const $d=(e,n,s)=>{const a=n.inline?Sd:Ir,r=xd(a,n),i=n.mode||"svg",o={},l=n.style||{},d={...i==="svg"?Cd:{}};if(s){const b=kn(s,!1,!0);if(b){const j=["iconify"],w=["provider","prefix"];for(const $ of w)b[$]&&j.push("iconify--"+b[$]);d.className=j.join(" ")}}for(let b in n){const j=n[b];if(j!==void 0)switch(b){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":d.ref=j;break;case"className":d[b]=(d[b]?d[b]+" ":"")+j;break;case"inline":case"hFlip":case"vFlip":r[b]=j===!0||j==="true"||j===1;break;case"flip":typeof j=="string"&&hd(r,j);break;case"color":o.color=j;break;case"rotate":typeof j=="string"?r[b]=bd(j):typeof j=="number"&&(r[b]=j);break;case"ariaHidden":case"aria-hidden":j!==!0&&j!=="true"&&delete d["aria-hidden"];break;default:a[b]===void 0&&(d[b]=j)}}const u=Bc(e,r),f=u.attributes;if(r.inline&&(o.verticalAlign="-0.125em"),i==="svg"){d.style={...o,...l},Object.assign(d,f);let b=0,j=n.id;return typeof j=="string"&&(j=j.replace(/-/g,"_")),d.dangerouslySetInnerHTML={__html:Nd(Wc(u.body,j?()=>j+"ID"+b++:"iconifyReact"))},h.createElement("svg",d)}const{body:m,width:p,height:x}=e,g=i==="mask"||(i==="bg"?!1:m.indexOf("currentColor")!==-1),y=gd(m,{...f,width:p+"",height:x+""});return d.style={...o,"--svg":jd(y),width:Na(f.width),height:Na(f.height),...kd,...g?os:Or,...l},h.createElement("span",d)};Rr(!0);qc("",ed);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const n=e.IconifyPreload,s="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(a=>{try{(typeof a!="object"||a===null||a instanceof Array||typeof a.icons!="object"||typeof a.prefix!="string"||!_c(a))&&console.error(s)}catch{console.error(s)}})}if(e.IconifyProviders!==void 0){const n=e.IconifyProviders;if(typeof n=="object"&&n!==null)for(let s in n){const a="IconifyProviders["+s+"] is invalid.";try{const r=n[s];if(typeof r!="object"||!r||r.resources===void 0)continue;Gc(s,r)||console.error(a)}catch{console.error(a)}}}}function zr(e){const[n,s]=h.useState(!!e.ssr),[a,r]=h.useState({});function i(x){if(x){const g=e.icon;if(typeof g=="object")return{name:"",data:g};const y=pa(g);if(y)return{name:g,data:y}}return{name:""}}const[o,l]=h.useState(i(!!e.ssr));function d(){const x=a.callback;x&&(x(),r({}))}function u(x){if(JSON.stringify(o)!==JSON.stringify(x))return d(),l(x),!0}function f(){var x;const g=e.icon;if(typeof g=="object"){u({name:"",data:g});return}const y=pa(g);if(u({name:g,data:y}))if(y===void 0){const b=fd([g],f);r({callback:b})}else y&&((x=e.onLoad)===null||x===void 0||x.call(e,g))}h.useEffect(()=>(s(!0),d),[]),h.useEffect(()=>{n&&f()},[e.icon,n]);const{name:m,data:p}=o;return p?$d({...Cs,...p},e,m):e.children?e.children:e.fallback?e.fallback:h.createElement("span",{})}const P=h.forwardRef((e,n)=>zr({...e,_ref:n}));h.forwardRef((e,n)=>zr({inline:!0,...e,_ref:n}));const O=h.forwardRef(({color:e="primary",radius:n="full",testId:s="veevart-button",...a},r)=>t.jsx(c.Button,{ref:r,color:e,radius:n,"data-testid":s,...a}));O.displayName="Button";function Br({code:e,amount:n,onRemove:s,label:a="Gift Card",removeAriaLabel:r="Remove gift card",testId:i="veevart-applied-code-card"}){return t.jsx(c.Card,{"data-testid":i,shadow:"sm",className:"w-full",children:t.jsxs(c.CardBody,{className:"flex flex-row items-start justify-between gap-2 p-4",children:[t.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[t.jsx("span",{className:"text-xs text-default-500",children:a}),t.jsx("span",{"data-testid":`${i}-code`,className:"truncate font-medium text-foreground",children:e}),t.jsx("span",{"data-testid":`${i}-amount`,className:"text-lg font-semibold text-primary",children:n})]}),t.jsx(O,{testId:`${i}-remove`,isIconOnly:!0,size:"sm",variant:"light","aria-label":r,onPress:s,children:t.jsx(P,{icon:"solar:close-circle-linear",className:"size-4","aria-hidden":"true"})})]})})}function On(e,n){return e-n*Math.floor(e/n)}const Vr=1721426;function tn(e,n,s,a){n=As(e,n);let r=n-1,i=-2;return s<=2?i=0:dn(n)&&(i=-1),Vr-1+365*r+Math.floor(r/4)-Math.floor(r/100)+Math.floor(r/400)+Math.floor((367*s-362)/12+i+a)}function dn(e){return e%4===0&&(e%100!==0||e%400===0)}function As(e,n){return e==="BC"?1-n:n}function Ad(e){let n="AD";return e<=0&&(n="BC",e=1-e),[n,e]}const Dd={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class Sn{fromJulianDay(n){let s=n,a=s-Vr,r=Math.floor(a/146097),i=On(a,146097),o=Math.floor(i/36524),l=On(i,36524),d=Math.floor(l/1461),u=On(l,1461),f=Math.floor(u/365),m=r*400+o*100+d*4+f+(o!==4&&f!==4?1:0),[p,x]=Ad(m),g=s-tn(p,x,1,1),y=2;s<tn(p,x,3,1)?y=0:dn(x)&&(y=1);let b=Math.floor(((g+y)*12+373)/367),j=s-tn(p,x,b,1)+1;return new Gt(p,x,b,j)}toJulianDay(n){return tn(n.era,n.year,n.month,n.day)}getDaysInMonth(n){return Dd[dn(n.year)?"leapyear":"standard"][n.month-1]}getMonthsInYear(n){return 12}getDaysInYear(n){return dn(n.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(n){return 9999}getEras(){return["BC","AD"]}isInverseEra(n){return n.era==="BC"}balanceDate(n){n.year<=0&&(n.era=n.era==="BC"?"AD":"BC",n.year=1-n.year)}constructor(){this.identifier="gregory"}}function Ed(e,n){var s,a,r,i;return(i=(r=(s=e.isEqual)===null||s===void 0?void 0:s.call(e,n))!==null&&r!==void 0?r:(a=n.isEqual)===null||a===void 0?void 0:a.call(n,e))!==null&&i!==void 0?i:e.identifier===n.identifier}function Ur(e,n){return e.calendar.toJulianDay(e)-n.calendar.toJulianDay(n)}function Hr(e,n){return Ca(e)-Ca(n)}function Ca(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let zn=null;function Wr(){return zn==null&&(zn=new Intl.DateTimeFormat().resolvedOptions().timeZone),zn}function ka(e){e=Ds(e,new Sn);let n=As(e.era,e.year);return qr(n,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function qr(e,n,s,a,r,i,o){let l=new Date;return l.setUTCHours(a,r,i,o),l.setUTCFullYear(e,n-1,s),l.getTime()}function Sa(e,n){if(n==="UTC")return 0;if(e>0&&n===Wr())return new Date(e).getTimezoneOffset()*-6e4;let{year:s,month:a,day:r,hour:i,minute:o,second:l}=Gr(e,n);return qr(s,a,r,i,o,l,0)-Math.floor(e/1e3)*1e3}const $a=new Map;function Gr(e,n){let s=$a.get(n);s||(s=new Intl.DateTimeFormat("en-US",{timeZone:n,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),$a.set(n,s));let a=s.formatToParts(new Date(e)),r={};for(let i of a)i.type!=="literal"&&(r[i.type]=i.value);return{year:r.era==="BC"||r.era==="B"?-r.year+1:+r.year,month:+r.month,day:+r.day,hour:r.hour==="24"?0:+r.hour,minute:+r.minute,second:+r.second}}const Aa=864e5;function Ld(e,n,s,a){return(s===a?[s]:[s,a]).filter(i=>Fd(e,n,i))}function Fd(e,n,s){let a=Gr(s,n);return e.year===a.year&&e.month===a.month&&e.day===a.day&&e.hour===a.hour&&e.minute===a.minute&&e.second===a.second}function Rd(e,n,s="compatible"){let a=Yr(e);if(n==="UTC")return ka(a);if(n===Wr()&&s==="compatible"){a=Ds(a,new Sn);let d=new Date,u=As(a.era,a.year);return d.setFullYear(u,a.month-1,a.day),d.setHours(a.hour,a.minute,a.second,a.millisecond),d.getTime()}let r=ka(a),i=Sa(r-Aa,n),o=Sa(r+Aa,n),l=Ld(a,n,r-i,r-o);if(l.length===1)return l[0];if(l.length>1)switch(s){case"compatible":case"earlier":return l[0];case"later":return l[l.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(s){case"earlier":return Math.min(r-i,r-o);case"compatible":case"later":return Math.max(r-i,r-o);case"reject":throw new RangeError("No such absolute time found")}}function Kr(e,n,s="compatible"){return new Date(Rd(e,n,s))}function Yr(e,n){let s=0,a=0,r=0,i=0;if("timeZone"in e)({hour:s,minute:a,second:r,millisecond:i}=e);else if("hour"in e&&!n)return e;return n&&({hour:s,minute:a,second:r,millisecond:i}=n),new pn(e.calendar,e.era,e.year,e.month,e.day,s,a,r,i)}function Ds(e,n){if(Ed(e.calendar,n))return e;let s=n.fromJulianDay(e.calendar.toJulianDay(e)),a=e.copy();return a.calendar=n,a.era=s.era,a.year=s.year,a.month=s.month,a.day=s.day,Dt(a),a}function Es(e,n){let s=e.copy(),a="hour"in s?ni(s,n):0;cs(s,n.years||0),s.calendar.balanceYearMonth&&s.calendar.balanceYearMonth(s,e),s.month+=n.months||0,ds(s),Qr(s),s.day+=(n.weeks||0)*7,s.day+=n.days||0,s.day+=a,_d(s),s.calendar.balanceDate&&s.calendar.balanceDate(s),s.year<1&&(s.year=1,s.month=1,s.day=1);let r=s.calendar.getYearsInEra(s);if(s.year>r){var i,o;let d=(i=(o=s.calendar).isInverseEra)===null||i===void 0?void 0:i.call(o,s);s.year=r,s.month=d?1:s.calendar.getMonthsInYear(s),s.day=d?1:s.calendar.getDaysInMonth(s)}s.month<1&&(s.month=1,s.day=1);let l=s.calendar.getMonthsInYear(s);return s.month>l&&(s.month=l,s.day=s.calendar.getDaysInMonth(s)),s.day=Math.max(1,Math.min(s.calendar.getDaysInMonth(s),s.day)),s}function cs(e,n){var s,a;!((s=(a=e.calendar).isInverseEra)===null||s===void 0)&&s.call(a,e)&&(n=-n),e.year+=n}function ds(e){for(;e.month<1;)cs(e,-1),e.month+=e.calendar.getMonthsInYear(e);let n=0;for(;e.month>(n=e.calendar.getMonthsInYear(e));)e.month-=n,cs(e,1)}function _d(e){for(;e.day<1;)e.month--,ds(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,ds(e)}function Qr(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function Dt(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),Qr(e)}function Zr(e){let n={};for(let s in e)typeof e[s]=="number"&&(n[s]=-e[s]);return n}function Xr(e,n){return Es(e,Zr(n))}function Jr(e,n){let s=e.copy();return n.era!=null&&(s.era=n.era),n.year!=null&&(s.year=n.year),n.month!=null&&(s.month=n.month),n.day!=null&&(s.day=n.day),Dt(s),s}function ei(e,n){let s=e.copy();return n.hour!=null&&(s.hour=n.hour),n.minute!=null&&(s.minute=n.minute),n.second!=null&&(s.second=n.second),n.millisecond!=null&&(s.millisecond=n.millisecond),ti(s),s}function Md(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=nn(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=nn(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=nn(e.minute,60);let n=Math.floor(e.hour/24);return e.hour=nn(e.hour,24),n}function ti(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function nn(e,n){let s=e%n;return s<0&&(s+=n),s}function ni(e,n){return e.hour+=n.hours||0,e.minute+=n.minutes||0,e.second+=n.seconds||0,e.millisecond+=n.milliseconds||0,Md(e)}function si(e,n){let s=e.copy();return ni(s,n),s}function Pd(e,n){return si(e,Zr(n))}function ai(e,n,s,a){let r=e.copy();switch(n){case"era":{let l=e.calendar.getEras(),d=l.indexOf(e.era);if(d<0)throw new Error("Invalid era: "+e.era);d=mt(d,s,0,l.length-1,a?.round),r.era=l[d],Dt(r);break}case"year":var i,o;!((i=(o=r.calendar).isInverseEra)===null||i===void 0)&&i.call(o,r)&&(s=-s),r.year=mt(e.year,s,-1/0,9999,a?.round),r.year===-1/0&&(r.year=1),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e);break;case"month":r.month=mt(e.month,s,1,e.calendar.getMonthsInYear(e),a?.round);break;case"day":r.day=mt(e.day,s,1,e.calendar.getDaysInMonth(e),a?.round);break;default:throw new Error("Unsupported field "+n)}return e.calendar.balanceDate&&e.calendar.balanceDate(r),Dt(r),r}function ri(e,n,s,a){let r=e.copy();switch(n){case"hour":{let i=e.hour,o=0,l=23;if(a?.hourCycle===12){let d=i>=12;o=d?12:0,l=d?23:11}r.hour=mt(i,s,o,l,a?.round);break}case"minute":r.minute=mt(e.minute,s,0,59,a?.round);break;case"second":r.second=mt(e.second,s,0,59,a?.round);break;case"millisecond":r.millisecond=mt(e.millisecond,s,0,999,a?.round);break;default:throw new Error("Unsupported field "+n)}return r}function mt(e,n,s,a,r=!1){if(r){e+=Math.sign(n),e<s&&(e=a);let i=Math.abs(n);n>0?e=Math.ceil(e/i)*i:e=Math.floor(e/i)*i,e>a&&(e=s)}else e+=n,e<s?e=a-(s-e-1):e>a&&(e=s+(e-a-1));return e}const Td=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,Id=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function Od(e){let n=e.match(Td);if(!n)throw Id.test(e)?new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+e);let s=new Gt(Bn(n[1],0,9999),Bn(n[2],1,12),1);return s.day=Bn(n[3],1,s.calendar.getDaysInMonth(s)),s}function Bn(e,n,s){let a=Number(e);if(a<n||a>s)throw new RangeError(`Value out of range: ${n} <= ${a} <= ${s}`);return a}function ii(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function li(e){let n=Ds(e,new Sn),s;return n.era==="BC"?s=n.year===1?"0000":"-"+String(Math.abs(1-n.year)).padStart(6,"00"):s=String(n.year).padStart(4,"0"),`${s}-${String(n.month).padStart(2,"0")}-${String(n.day).padStart(2,"0")}`}function zd(e){return`${li(e)}T${ii(e)}`}function Bd(e,n){if(n.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ls(e,n,s){Bd(e,n),n.set(e,s)}function oi(e){let n=typeof e[0]=="object"?e.shift():new Sn,s;if(typeof e[0]=="string")s=e.shift();else{let o=n.getEras();s=o[o.length-1]}let a=e.shift(),r=e.shift(),i=e.shift();return[n,s,a,r,i]}var Vd=new WeakMap;class Gt{copy(){return this.era?new Gt(this.calendar,this.era,this.year,this.month,this.day):new Gt(this.calendar,this.year,this.month,this.day)}add(n){return Es(this,n)}subtract(n){return Xr(this,n)}set(n){return Jr(this,n)}cycle(n,s,a){return ai(this,n,s,a)}toDate(n){return Kr(this,n)}toString(){return li(this)}compare(n){return Ur(this,n)}constructor(...n){Ls(this,Vd,{writable:!0,value:void 0});let[s,a,r,i,o]=oi(n);this.calendar=s,this.era=a,this.year=r,this.month=i,this.day=o,Dt(this)}}var Ud=new WeakMap;class $n{copy(){return new $n(this.hour,this.minute,this.second,this.millisecond)}add(n){return si(this,n)}subtract(n){return Pd(this,n)}set(n){return ei(this,n)}cycle(n,s,a){return ri(this,n,s,a)}toString(){return ii(this)}compare(n){return Hr(this,n)}constructor(n=0,s=0,a=0,r=0){Ls(this,Ud,{writable:!0,value:void 0}),this.hour=n,this.minute=s,this.second=a,this.millisecond=r,ti(this)}}var Hd=new WeakMap;class pn{copy(){return this.era?new pn(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new pn(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(n){return Es(this,n)}subtract(n){return Xr(this,n)}set(n){return Jr(ei(this,n),n)}cycle(n,s,a){switch(n){case"era":case"year":case"month":case"day":return ai(this,n,s,a);default:return ri(this,n,s,a)}}toDate(n,s){return Kr(this,n,s)}toString(){return zd(this)}compare(n){let s=Ur(this,n);return s===0?Hr(this,Yr(n)):s}constructor(...n){Ls(this,Hd,{writable:!0,value:void 0});let[s,a,r,i,o]=oi(n);this.calendar=s,this.era=a,this.year=r,this.month=i,this.day=o,this.hour=n.shift()||0,this.minute=n.shift()||0,this.second=n.shift()||0,this.millisecond=n.shift()||0,Dt(this)}}const Wd="Open time options",qd=320;function Da(e,n){return typeof n=="string"&&n.length>0?`${e} ${n}`:e}function Vn(e){if(!e)return null;const n="hour"in e&&typeof e.hour=="number"?e.hour:0,s="minute"in e&&typeof e.minute=="number"?e.minute:0,a="second"in e&&typeof e.second=="number"?e.second:0;return new $n(n,s,a)}function Gd(e,n){const s=new Date(2e3,0,1,e.hour,e.minute,e.second);return new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",hour12:n===12}).format(s)}function Kd(e){const n=[];for(let s=0;s<24;s+=1)for(let a=0;a<60;a+=e)n.push(new $n(s,a));return n}function Yd(e){const{minuteStep:n=15,timeListClassName:s,timeListLabel:a=Wd,selectorButtonProps:r,endContent:i,onChange:o,value:l,defaultValue:d,hourCycle:u=12,...f}=e,m=l!==void 0,[p,x]=h.useState(()=>Vn(d)),g=m?Vn(l):p,y=h.useMemo(()=>Kd(n),[n]),b=w=>{m||x(w),o?.(w)},j=t.jsxs(c.Popover,{placement:"bottom-end",children:[t.jsx(c.PopoverTrigger,{children:t.jsx(c.Button,{isIconOnly:!0,variant:"light","aria-label":a,...r,onPress:void 0,children:t.jsx(X.Clock3,{className:"size-4",strokeWidth:1.75})})}),t.jsx(c.PopoverContent,{className:"min-w-[8.5rem] p-0",children:t.jsx(c.ScrollShadow,{className:s??"max-h-64 py-1",children:t.jsx("div",{className:"flex flex-col p-1",children:y.map(w=>{const $=g?.hour===w.hour&&g?.minute===w.minute;return t.jsx(c.Button,{variant:$?"flat":"light",color:$?"primary":"default",className:"h-9 min-w-0 justify-start px-3",onPress:()=>b(w),children:Gd(w,u)},`${w.hour}:${w.minute}`)})})})})]});return t.jsx(c.TimeInput,{...f,value:m?g:void 0,defaultValue:m?void 0:d,hourCycle:u,endContent:t.jsxs("div",{className:"flex items-center gap-1",children:[i,j]}),onChange:w=>b(Vn(w))})}function Fs(e){if(e.mode==="time")return t.jsx(Yd,{...e});if(e.mode==="datetime"){const{mode:r,granularity:i="minute",hideTimeZone:o=!0,calendarWidth:l=qd,disableAnimation:d=!0,classNames:u,...f}=e;return t.jsx(c.DatePicker,{...f,calendarWidth:l,classNames:{...u,popoverContent:Da("min-w-[20rem]",u?.popoverContent),calendarContent:Da("min-h-[18rem]",u?.calendarContent)},disableAnimation:d,granularity:i,hideTimeZone:o})}const{mode:n,granularity:s="day",...a}=e;return t.jsx(c.DatePicker,{...a,granularity:s})}function Qd({label:e,...n}){return t.jsx("button",{...n,"aria-label":e,children:t.jsx("svg",{"aria-hidden":"true",className:"fill-current",fill:"none",focusable:"false",height:"1em",role:"presentation",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",width:"1em",children:t.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})}function Zd(e){return e!==void 0&&e.trim()!==""}function ci(e,n){const s=Sr();if(h.isValidElement(n))return n;const a=[e,s].find(Zd);return a===void 0?void 0:t.jsx(Qd,{label:a})}const di=h.forwardRef(({closeLabel:e,closeButton:n,...s},a)=>{const r=ci(e,n);return t.jsx(c.Drawer,{ref:a,...s,closeButton:r})});di.displayName="Drawer";const Qt=h.forwardRef(({closeLabel:e,closeButton:n,...s},a)=>{const r=ci(e,n);return t.jsx(c.Modal,{ref:a,...s,closeButton:r})});Qt.displayName="Modal";function Xd(e){const n=e?.closest('[role="dialog"]');return n?.parentElement??n??void 0}const Xe=h.forwardRef(({popoverProps:e,...n},s)=>{const a=h.useRef(null),[r,i]=h.useState(void 0),{"data-react-aria-top-layer":o,...l}=e??{},d=o==="true"||o===void 0&&r!==void 0,u={...l,disableDialogFocus:l.disableDialogFocus??(r?!0:void 0),portalContainer:l.portalContainer??r,...d?{"data-react-aria-top-layer":"true"}:{}};return h.useEffect(()=>{i(Xd(a.current))},[]),t.jsx("span",{ref:a,className:"contents",children:t.jsx(c.Select,{ref:s,...n,popoverProps:u})})});Xe.displayName="Select";const Jd="text-default-600 data-[hover=true]:text-default-700",Rs=h.forwardRef(({classNames:e,...n},s)=>t.jsx(c.Table,{ref:s,...n,classNames:{...e,th:c.cn(Jd,e?.th)}}));Rs.displayName="Table";function eu({state:e,onSubmit:n,onRemove:s,appliedCredit:a,errorMessage:r,label:i="Gift Card",placeholder:o="GC-XXXX-XXXX-XXXX",applyLabel:l="Apply",removeAriaLabel:d="Remove gift card",testId:u="veevart-redeem-code-input"}){const[f,m]=h.useState(""),p=h.useId(),[x,g]=h.useState(e);e!==x&&(g(e),e==="applied"&&m(""));const y=()=>{const w=f.trim();w&&n(w)},b=w=>{w.key==="Enter"&&(w.preventDefault(),y())};if(e==="applied"&&a)return t.jsx("div",{"data-testid":u,children:t.jsx(Br,{code:a.code,amount:a.amount,onRemove:s,removeAriaLabel:d,testId:`${u}-card`})});const j=e==="error"&&r!=null;return t.jsxs("div",{"data-testid":u,className:"flex flex-col gap-1",children:[t.jsxs("div",{className:"flex items-end gap-2",children:[t.jsx(c.Input,{"data-testid":`${u}-input`,label:i,labelPlacement:"outside",variant:"bordered",radius:"lg",classNames:{label:"text-xs text-default-500 group-data-[filled-within=true]:text-default-500 group-data-[filled-within=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_16px)]",inputWrapper:"border-small"},placeholder:o,value:f,onValueChange:m,onKeyDown:b,isDisabled:e==="loading",isInvalid:e==="error","aria-describedby":j?p:void 0}),t.jsx(O,{testId:`${u}-button`,isLoading:e==="loading",isDisabled:!f.trim(),onPress:y,children:l})]}),j&&t.jsx("p",{id:p,"data-testid":`${u}-error`,className:"text-tiny text-danger",children:r})]})}const tu={login:"Login",logout:"Logout",selectLanguage:"Select your language"};function nu({languages:e,selectedLanguage:n,onLanguageChange:s,label:a}){const r=e.find(i=>i.code===n);return t.jsx("div",{className:"flex items-center",children:t.jsxs("div",{className:"relative flex items-center",children:[t.jsx(Xe,{"data-testid":"language-select-desktop",variant:"bordered","aria-label":a,selectedKeys:n?[n]:[],onSelectionChange:i=>{const o=Array.from(i)[0]||n;s?.(o)},className:"min-w-36 hidden md:inline-flex",isDisabled:e.length===0,placeholder:a,startContent:t.jsx(X.Globe,{className:"w-5 h-5 text-black"}),renderValue:()=>t.jsx("span",{children:r?.label||a}),size:"md",radius:"full",children:e.map(i=>t.jsx(c.SelectItem,{textValue:i.label,"data-testid":`language-select-option-${i.code}`,children:i.label},i.code))}),t.jsx(Xe,{"aria-label":a,"data-testid":"language-select-mobile",variant:"bordered",selectedKeys:n?[n]:[],onSelectionChange:i=>{const o=Array.from(i)[0]||n;s?.(o)},className:"w-24 inline-flex md:hidden",isDisabled:e.length===0,placeholder:"",startContent:t.jsx(X.Globe,{className:"w-6 h-6 text-black"}),renderValue:()=>t.jsx("span",{children:r?.code.toUpperCase()||""}),size:"md",radius:"full",children:e.map(i=>t.jsx(c.SelectItem,{textValue:i.code.toUpperCase(),"data-testid":`language-select-option-mobile-${i.code}`,children:i.code.toUpperCase()},i.code))})]})})}function su({isLoggedIn:e,onLogin:n,onLogout:s,labels:a}){return e?t.jsxs(O,{"data-testid":"navbar-auth-button",className:"px-2 py-1 w-1 min-w-12 md:min-w-24 rounded-full bg-black text-white text-sm flex items-center",onPress:s,size:"md",children:[t.jsx(X.User,{className:"inline w-5 h-5"}),t.jsx("span",{className:"hidden md:inline",children:a.logout})]}):t.jsxs(O,{"data-testid":"navbar-auth-button",className:"px-2 py-1 min-w-12 md:min-w-24 rounded-full bg-black text-white text-sm flex items-center",onPress:n,size:"md",children:[t.jsx(X.User,{className:"inline w-5 h-5"}),t.jsx("span",{className:"hidden md:inline",children:a.login})]})}function au({logo:e,languages:n=[],selectedLanguage:s,onLanguageChange:a,isLoggedIn:r,onLogin:i,onLogout:o,hasLanguages:l,hasAuth:d,labels:u={},className:f}){const m={...tu,...u};return t.jsxs("nav",{"data-testid":"navbar",className:c.cn("w-full px-4 md:px-8 py-3 bg-white border-b border-zinc-100 flex items-center justify-between",f),children:[t.jsx("div",{className:"flex items-center min-w-10",children:e&&t.jsx("a",{href:"/",className:"block",children:t.jsx("img",{"data-testid":"navbar-logo",src:e,alt:"Logo",className:"h-8 w-auto max-w-28 md:max-w-40 object-contain"})})}),t.jsxs("div",{className:"flex items-center gap-2 md:gap-4",children:[(l||n.length>0)&&t.jsx(nu,{languages:n,selectedLanguage:s,onLanguageChange:a,label:m.selectLanguage}),d&&t.jsx(su,{isLoggedIn:r,onLogin:i,onLogout:o,labels:m})]})]})}function ru(e){return t.jsx("div",{className:"min-h-screen flex flex-col",children:t.jsx("div",{className:"flex-1 flex items-center justify-center p-12",children:t.jsx(c.Alert,{description:"This template combines Navbar, Footer, and a confirmation Card. Include title, message, confirmation number, details list, icon, and action buttons. Use Card for the confirmation content.",title:"TODO: Implement ConfirmationPageTemplate",variant:"faded",className:"max-w-2xl"})})})}var Un;const iu=typeof document<"u"?(Un=h.useInsertionEffect)!==null&&Un!==void 0?Un:h.useLayoutEffect:()=>{};function An(e,n,s){let[a,r]=h.useState(e||n),i=h.useRef(a),o=h.useRef(e!==void 0),l=e!==void 0;h.useEffect(()=>{let m=o.current;m!==l&&process.env.NODE_ENV!=="production"&&console.warn(`WARN: A component changed from ${m?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}.`),o.current=l},[l]);let d=l?e:a;iu(()=>{i.current=d});let[,u]=h.useReducer(()=>({}),{}),f=h.useCallback((m,...p)=>{let x=typeof m=="function"?m(i.current):m;Object.is(i.current,x)||(i.current=x,r(x),u(),s?.(x,...p))},[s]);return[d,f]}function ui(e){return t.jsx("svg",{...e,fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:t.jsx(Te.m.path,{animate:{pathLength:1},d:"M5 13l4 4L19 7",initial:{pathLength:0},strokeLinecap:"round",strokeLinejoin:"round",transition:{delay:.2,type:"tween",ease:"easeOut",duration:.3}})})}const mi=h.forwardRef(({color:e="primary",variant:n="default",stepsCount:s=3,defaultStep:a=0,label:r,stepLabels:i,showStepLabelTooltip:o=!1,stepLabelTooltipPlacement:l="top",showStepCounter:d=!1,stepCounterPosition:u="right",layout:f="compact",stepCounterFormat:m,onStepChange:p,currentStep:x,hideProgressBars:g=!1,stepClassName:y,className:b,isDisabled:j=!1,...w},$)=>{const[N,A]=An(x,a,p),k=h.useMemo(()=>{let C,D;const S=["[--active-fg-color:hsl(var(--step-fg-color))]","[--active-border-color:hsl(var(--step-color))]","[--active-color:hsl(var(--step-color))]","[--complete-background-color:hsl(var(--step-color))]","[--complete-border-color:hsl(var(--step-color))]","[--inactive-border-color:hsl(var(--heroui-default-300))]","[--inactive-color:hsl(var(--heroui-default-300))]"];switch(e){case"primary":C="[--step-color:var(--heroui-primary)]",D="[--step-fg-color:var(--heroui-primary-foreground)]";break;case"secondary":C="[--step-color:var(--heroui-secondary)]",D="[--step-fg-color:var(--heroui-secondary-foreground)]";break;case"success":C="[--step-color:var(--heroui-success)]",D="[--step-fg-color:var(--heroui-success-foreground)]";break;case"warning":C="[--step-color:var(--heroui-warning)]",D="[--step-fg-color:var(--heroui-warning-foreground)]";break;case"danger":C="[--step-color:var(--heroui-danger)]",D="[--step-fg-color:var(--heroui-danger-foreground)]";break;case"default":C="[--step-color:var(--heroui-default)]",D="[--step-fg-color:var(--heroui-default-foreground)]";break;default:C="[--step-color:var(--heroui-primary)]",D="[--step-fg-color:var(--heroui-primary-foreground)]";break}return S.unshift(D),S.unshift(C),S},[e]);return t.jsxs("nav",{ref:$,"aria-label":"Progress",className:c.cn("flex items-center overflow-x-auto",f==="spread"?"w-full justify-between gap-6":"max-w-fit gap-3",b),"data-testid":"stepper-root",...w,children:[d&&u==="left"?t.jsx("span",{className:"text-default-500 text-2xl whitespace-nowrap","data-testid":"stepper-counter",children:m?m(N+1,s):`Step ${N+1} of ${s}`}):null,r&&t.jsx("label",{className:"text-small text-default-foreground lg:text-medium font-light whitespace-nowrap me-3","data-testid":"stepper-label",children:r}),t.jsx("ol",{className:c.cn("flex flex-row flex-nowrap gap-x-3",k,b),"data-testid":"stepper-list",children:Array.from({length:s})?.map((C,D)=>{const S=N===D?"active":N<D?"inactive":"complete",_=n==="activeLabel"&&S==="active"&&!!i?.[D],F=o&&S!=="active"&&!!i?.[D];return t.jsxs("li",{className:"relative flex shrink-0 items-center gap-x-3","data-testid":`stepper-step-${D}`,children:[t.jsx(c.Tooltip,{content:F?i?.[D]:void 0,isDisabled:!F,offset:12,placement:l,classNames:{base:"px-0 py-0",content:"rounded-full border border-default-200 bg-white px-4 py-2 text-small font-medium text-default-700 shadow-sm"},children:t.jsxs("button",{"aria-current":S==="active"?"step":void 0,className:c.cn("group rounded-large flex w-full cursor-pointer flex-row items-center justify-center gap-x-3 py-2.5",{"rounded-full border border-(--active-border-color)/20 bg-(--active-border-color)/10 pl-2 pr-4 py-1.5":_},{"cursor-not-allowed opacity-50":j},y),onClick:()=>!j&&A(D),disabled:j,"data-testid":`stepper-step-btn-${D}`,children:[t.jsx("div",{className:"h-full relative flex items-center",children:t.jsx(Te.LazyMotion,{features:Te.domAnimation,children:t.jsx(Te.m.div,{animate:S,className:"relative z-10",children:t.jsx(Te.m.div,{animate:S,className:c.cn("border-medium text-large text-default-foreground relative z-10 flex h-[26px] w-[26px] shrink-0 items-center justify-center rounded-full font-semibold bg-white",{"border-(--complete-border-color) bg-(--complete-background-color) text-(--active-fg-color)":_,"bg-(--complete-background-color)":S==="complete","shadow-lg":S==="complete"}),initial:!1,transition:{duration:.25},variants:{inactive:{backgroundColor:"transparent",borderColor:"var(--inactive-border-color)",color:"var(--inactive-color)"},active:{backgroundColor:"transparent",borderColor:"var(--active-border-color)",color:"var(--active-color)"},complete:{backgroundColor:"var(--complete-background-color)",borderColor:"var(--complete-border-color)",color:"var(--active-fg-color)"}},children:t.jsx("div",{className:"flex items-center justify-center",children:S==="complete"&&n==="default"?t.jsx(ui,{className:"h-5 w-5 text-(--active-fg-color)","data-testid":`stepper-step-check-${D}`}):t.jsx("span",{children:D+1})})})})})}),_?t.jsx("span",{className:"pr-2 text-2xl leading-none font-medium whitespace-nowrap text-(--active-color)","data-testid":`stepper-step-label-${D}`,children:i[D]}):null]},D)}),D<s-1&&!g&&t.jsx("div",{"aria-hidden":"true",className:"pointer-events-none z-0 w-12 flex-none items-center",style:{"--idx":D},children:t.jsx("div",{className:c.cn("bg-default-200 relative h-0.5 w-full transition-colors duration-300","after:absolute after:block after:h-full after:w-0 after:bg-(--active-border-color) after:transition-[width] after:duration-300 after:content-['']",{"after:w-full":D<N})})})]},D)})}),d&&u==="right"?t.jsx("span",{className:"text-default-500 text-2xl whitespace-nowrap","data-testid":"stepper-counter",children:m?m(N+1,s):`Step ${N+1} of ${s}`}):null]})});mi.displayName="Stepper";function lu(e){return t.jsx("div",{className:"min-h-screen flex flex-col",children:t.jsx("div",{className:"flex-1 flex items-center justify-center p-12",children:t.jsx(c.Alert,{description:"This template combines Navbar, Stepper, Footer, and an event details Card. Include event image, category/spots chips, tags, details grid, and action buttons. Use Card, CardHeader, CardBody for content structure.",title:"TODO: Implement EventDetailsTemplate",variant:"faded",className:"max-w-2xl"})})})}function fe(e,n="en-US",s="USD"){try{return new Intl.NumberFormat(n,{style:"currency",currency:s}).format(e)}catch{return`${s} ${e.toFixed(2)}`}}function Et(e,n="en-US"){try{const s=new Intl.NumberFormat(n,{style:"currency",currency:e}).resolvedOptions();return typeof s.maximumFractionDigits=="number"?s.maximumFractionDigits:2}catch{return 2}}function _s(e,n,s="en-US"){const a=Et(n,s),r=Math.pow(10,a);return Math.round(e*r)/r}function us(e,n,s,a){return _s(e-n,s,a)}const Ea={primary:{active:"hsl(var(--heroui-primary))",fg:"hsl(var(--heroui-primary-foreground))"},secondary:{active:"hsl(var(--heroui-secondary))",fg:"hsl(var(--heroui-secondary-foreground))"},success:{active:"hsl(var(--heroui-success))",fg:"hsl(var(--heroui-success-foreground))"},warning:{active:"hsl(var(--heroui-warning))",fg:"hsl(var(--heroui-warning-foreground))"},danger:{active:"hsl(var(--heroui-danger))",fg:"hsl(var(--heroui-danger-foreground))"},default:{active:"hsl(var(--heroui-default))",fg:"hsl(var(--heroui-default-foreground))"}},ou="rgb(156 163 175)",cu="rgb(107 114 128)",fi=h.forwardRef(function({color:n="primary",steps:s=[],defaultStep:a=0,onStepChange:r,currentStep:i,hideProgressBars:o=!1,activeColor:l,activeForegroundColor:d,inactiveColor:u=ou,inactiveLabelColor:f=cu,activeStepVariant:m="bordered",stepClassName:p,circleClassName:x,progressBarClassName:g,labelsClassName:y,labelSlotClassName:b,activeLabelClassName:j,inactiveLabelClassName:w,className:$,ariaLabel:N="Progress",invalidLabelSuffix:A=", has errors",testId:k,isStepReachable:C,...D},S){const[_,F]=An(i,a,r),L=Ea[n]??Ea.primary,M=l??L.active,I=d??L.fg,W=(K,z)=>{const G=K.ariaLabel??(typeof K.title=="string"?K.title:null)??`${z+1}`;return K.invalid?`${G}${A}`:G};return t.jsxs("nav",{...D,"aria-label":N,...k?{"data-testid":k}:{},children:[t.jsx("div",{className:c.cn("flex items-center",$),children:s?.map((K,z)=>{const ne=z===_?"active":z<_?"complete":"inactive",G=C?C(z):!0;return t.jsxs(h.Fragment,{children:[t.jsx(O,{ref:S,isIconOnly:!0,disableAnimation:!0,radius:"full",variant:"light",testId:`${k??"horizontal-steps"}-step-${z}`,"aria-current":ne==="active"?"step":void 0,"aria-describedby":K.describedBy,"aria-label":W(K,z),"data-invalid":K.invalid?"true":void 0,isDisabled:!G,className:c.cn("size-8 min-w-8 shrink-0 overflow-visible bg-transparent p-0","data-[hover=true]:bg-transparent",G?"cursor-pointer":"cursor-not-allowed","data-[disabled=true]:opacity-40",K.className,p),onPress:()=>{if(i===void 0){F(z);return}r?.(z)},children:t.jsx(Te.LazyMotion,{features:Te.domAnimation,children:t.jsx(Te.m.div,{animate:ne,className:c.cn("relative flex size-8 items-center justify-center rounded-full text-[13px] font-medium",x),initial:!1,transition:{duration:.2},variants:{inactive:{backgroundColor:"transparent",borderColor:u,borderWidth:"1.5px",color:u},active:{backgroundColor:m==="solid"?M:"transparent",borderColor:M,borderWidth:"1.5px",color:m==="solid"?I:M},complete:{backgroundColor:M,borderColor:M,borderWidth:"1.5px",color:M}},children:ne==="complete"?t.jsx(ui,{className:"size-4",style:{color:I}}):t.jsx("span",{children:z+1})})})}),z<s.length-1&&!o&&t.jsx("div",{"aria-hidden":!0,className:c.cn("mx-1 h-px w-6 shrink-0 transition-colors duration-300 sm:mx-1.5 sm:w-14 md:w-20",g),style:{backgroundColor:z<_?M:u}})]},z)})}),t.jsx("div",{className:c.cn("mt-2.5 hidden md:flex",y),children:s?.map((K,z)=>{const ne=z<=_;return t.jsxs(h.Fragment,{children:[t.jsx("div",{className:c.cn("relative flex w-8 shrink-0 justify-center overflow-visible",b),children:t.jsx("span",{className:c.cn("absolute left-1/2 top-0 -translate-x-1/2 whitespace-nowrap text-center text-[12px] font-medium transition-colors duration-200",ne?j:w),style:{color:ne?M:f},children:K.title})}),z<s.length-1&&!o&&t.jsx("div",{className:c.cn("mx-1 w-6 shrink-0 sm:mx-1.5 sm:w-14 md:w-20",g)})]},z)})})]})});fi.displayName="HorizontalSteps";function du(){return t.jsxs("footer",{"data-testid":"footer",className:"fixed left-0 bottom-0 w-full text-left p-4 bg-white font-inter font-light text-base text-zinc-500",children:["Powered by Veevart ® ",new Date().getFullYear()]})}const uu=e=>{const n=h.useMemo(()=>JSON.stringify({allItems:e.allItems,selected:e.selected}),[e.allItems,e.selected]);return t.jsx(mu,{...e},n)},mu=({allItems:e,selected:n,onSelectedChange:s,titleLeft:a,titleRight:r})=>{const[i,o]=h.useState([]),[l,d]=h.useState([]),[u,f]=h.useState(null),[m,p]=h.useState(null),x=h.useMemo(()=>new Set(n),[n]),g=h.useMemo(()=>new Set(e),[e]),y=h.useMemo(()=>e.filter(F=>!x.has(F)),[e,x]),b=F=>{if(F.length===0)return;const L=Array.from(new Set([...n,...F]));s(L)},j=F=>{if(F.length===0)return;const L=new Set(F);s(n.filter(M=>!L.has(M)))},w=()=>{i.length!==0&&(b(i),o([]))},$=()=>{l.length!==0&&(j(l),d([]))},N=()=>{y.length!==0&&(b(y),o([]))},A=()=>{n.length!==0&&(s([]),d([]))},k=(F,L,M)=>{const I=Math.min(L,M),W=Math.max(L,M);return F.slice(I,W+1)},C=(F,L,M)=>{if(M&&u!==null){o(k(y,u,L)),d([]),f(L);return}const I=i.includes(F);o(I?i.filter(W=>W!==F):[...i,F]),d([]),f(L)},D=(F,L,M)=>{if(M&&m!==null){d(k(n,m,L)),o([]),p(L);return}const I=l.includes(F);d(I?l.filter(W=>W!==F):[...l,F]),o([]),p(L)},S=(F,L,M)=>{const I=M==="available"?i.includes(L)?i:[L]:l.includes(L)?l:[L];F.dataTransfer.setData("text/plain",JSON.stringify({source:M,items:I})),F.dataTransfer.effectAllowed="move"},_=(F,L)=>{F.preventDefault();const M=F.dataTransfer.getData("text/plain");if(M)try{const I=JSON.parse(M),W=(I.items||[]).filter(K=>g.has(K));if(W.length===0||I.source===L)return;L==="selected"?(b(W),o([])):(j(W),d([]))}catch{return}};return t.jsxs("div",{className:"flex flex-col gap-6 md:flex-row md:items-start md:justify-between",children:[t.jsxs("div",{className:"flex w-full flex-col gap-3 md:w-2/5",children:[t.jsx("h2",{className:"text-sm font-medium text-gray-700",children:a}),t.jsx(c.Card,{className:"w-full border border-gray-200 shadow-none",children:t.jsx(c.CardBody,{className:"h-60 gap-2 overflow-y-auto",onDragOver:F=>F.preventDefault(),onDrop:F=>_(F,"available"),children:y.map((F,L)=>{const M=i.includes(F);return t.jsx("button",{type:"button",onClick:I=>{C(F,L,I.shiftKey)},onMouseDown:I=>{I.shiftKey&&I.preventDefault()},draggable:!0,onDragStart:I=>S(I,F,"available"),className:`rounded-md px-3 py-2 text-left text-sm transition ${M?"bg-[#E4571E]/10 text-[#E4571E]":"text-gray-700 hover:bg-gray-100"}`,children:F},F)})})})]}),t.jsxs("div",{className:"flex flex-row items-center justify-center gap-3 md:flex-col md:pt-6",children:[t.jsx(O,{variant:"light",className:"h-10 w-10 min-w-0 text-2xl font-semibold text-[#E4571E] hover:bg-[#E4571E]/10",isIconOnly:!0,"data-testid":"move-selected-to-available",onPress:w,isDisabled:i.length===0,"aria-label":"Move selected to right",children:"›"}),t.jsx(O,{variant:"light",className:"h-10 w-10 min-w-0 text-2xl font-semibold text-[#E4571E] hover:bg-[#E4571E]/10",isIconOnly:!0,"data-testid":"move-selected-to-available",onPress:$,isDisabled:l.length===0,"aria-label":"Move selected to left",children:"‹"}),t.jsx(O,{variant:"light",className:"h-10 w-10 min-w-0 text-2xl font-semibold text-[#E4571E] hover:bg-[#E4571E]/10",isIconOnly:!0,"data-testid":"move-all-to-selected",onPress:N,isDisabled:y.length===0,"aria-label":"Move all to right",children:"»"}),t.jsx(O,{variant:"light",className:"h-10 w-10 min-w-0 text-2xl font-semibold text-[#E4571E] hover:bg-[#E4571E]/10",isIconOnly:!0,onPress:A,"data-testid":"move-all-to-available",isDisabled:n.length===0,"aria-label":"Move all to left",children:"«"})]}),t.jsxs("div",{className:"flex w-full flex-col gap-3 md:w-2/5",children:[t.jsx("h2",{className:"text-sm font-medium text-gray-700",children:r}),t.jsx(c.Card,{className:"w-full border border-gray-200 shadow-none",children:t.jsx(c.CardBody,{className:"h-60 gap-2 overflow-y-auto",onDragOver:F=>F.preventDefault(),onDrop:F=>_(F,"selected"),children:n.map((F,L)=>{const M=l.includes(F);return t.jsx("button",{type:"button",onClick:I=>{D(F,L,I.shiftKey)},onMouseDown:I=>{I.shiftKey&&I.preventDefault()},draggable:!0,onDragStart:I=>S(I,F,"selected"),className:`rounded-md px-3 py-2 text-left text-sm transition ${M?"bg-[#E4571E]/10 text-[#E4571E]":"text-gray-700 hover:bg-gray-100"}`,children:F},F)})})})]})]})};function Kt(e){return typeof e=="string"?e:e.type}function xt({className:e}){return t.jsx("div",{className:`flex items-center h-6 ${e||""}`,children:t.jsx(c.Divider,{orientation:"vertical"})})}function ht({icon:e,label:n,isActive:s=!1,isDisabled:a=!1,onClick:r,shortcut:i,iconSize:o=16,className:l}){const d=i?`${n} (${i})`:n;return t.jsx(c.Tooltip,{content:d,placement:"top",offset:10,children:t.jsx(O,{size:"sm",radius:"sm",color:s?"primary":"default",variant:s?"solid":"bordered",isIconOnly:!0,isDisabled:a,onPress:r,"aria-label":n,className:l,children:t.jsx(e,{size:o})})})}const lt={bold:{execute:({editor:e})=>e.chain().focus().toggleBold().run(),canExecute:e=>e.can().chain().focus().toggleBold().run(),isActive:e=>e.isActive("bold"),shortcut:"Mod-b",label:"Bold"},italic:{execute:({editor:e})=>e.chain().focus().toggleItalic().run(),canExecute:e=>e.can().chain().focus().toggleItalic().run(),isActive:e=>e.isActive("italic"),shortcut:"Mod-i",label:"Italic"},strike:{execute:({editor:e})=>e.chain().focus().toggleStrike().run(),canExecute:e=>e.can().chain().focus().toggleStrike().run(),isActive:e=>e.isActive("strike"),shortcut:"Mod-Shift-x",label:"Strikethrough"},underline:{execute:({editor:e})=>e.chain().focus().toggleUnderline().run(),canExecute:e=>e.can().chain().focus().toggleUnderline().run(),isActive:e=>e.isActive("underline"),shortcut:"Mod-u",label:"Underline"},code:{execute:({editor:e})=>e.chain().focus().toggleCode().run(),canExecute:e=>e.can().chain().focus().toggleCode().run(),isActive:e=>e.isActive("code"),shortcut:"Mod-e",label:"Inline code"},textColor:{execute:({editor:e,config:n})=>{const s=n?.type==="textColor"?n.color:"";s?e.chain().focus().setColor(s).run():e.chain().focus().unsetColor().run()},canExecute:()=>!0,isActive:e=>e.isActive("textStyle"),label:"Text color"},highlight:{execute:({editor:e,config:n})=>{const s=n?.type==="highlight"?n.color:"";s?e.chain().focus().setHighlight({color:s}).run():e.chain().focus().unsetHighlight().run()},canExecute:()=>!0,isActive:e=>e.isActive("highlight"),label:"Highlight"},link:{execute:({editor:e,config:n})=>{const s=n?.type==="link"?n.href:"";if(s){const a=n?.type==="link"?n.target:void 0,r=n?.type==="link"?n.rel:void 0;e.chain().focus().setLink({href:s,target:a,rel:r}).run()}else e.chain().focus().unsetLink().run()},canExecute:()=>!0,isActive:e=>e.isActive("link"),shortcut:"Mod-k",label:"Link"},paragraph:{execute:({editor:e})=>e.chain().focus().setParagraph().run(),canExecute:e=>e.can().chain().focus().setParagraph().run(),isActive:e=>e.isActive("paragraph"),shortcut:"Mod-Alt-0",label:"Paragraph"},heading:{execute:({editor:e,config:n})=>{const s=n?.type==="heading"?n.level:1;e.chain().focus().toggleHeading({level:s}).run()},canExecute:(e,n)=>{const s=n?.type==="heading"?n.level:1;return e.can().chain().focus().toggleHeading({level:s}).run()},isActive:(e,n)=>n?.type==="heading"?e.isActive("heading",{level:n.level}):e.isActive("heading"),label:"Heading"},bulletList:{execute:({editor:e})=>e.chain().focus().toggleBulletList().run(),canExecute:e=>e.can().chain().focus().toggleBulletList().run(),isActive:e=>e.isActive("bulletList"),shortcut:"Mod-Shift-8",label:"Bullet list"},orderedList:{execute:({editor:e})=>e.chain().focus().toggleOrderedList().run(),canExecute:e=>e.can().chain().focus().toggleOrderedList().run(),isActive:e=>e.isActive("orderedList"),shortcut:"Mod-Shift-7",label:"Numbered list"},taskList:{execute:({editor:e})=>e.chain().focus().toggleTaskList().run(),canExecute:e=>e.can().chain().focus().toggleTaskList().run(),isActive:e=>e.isActive("taskList"),label:"Task list"},codeBlock:{execute:({editor:e})=>e.chain().focus().toggleCodeBlock().run(),canExecute:e=>e.can().chain().focus().toggleCodeBlock().run(),isActive:e=>e.isActive("codeBlock"),shortcut:"Mod-Alt-c",label:"Code block"},blockquote:{execute:({editor:e})=>e.chain().focus().toggleBlockquote().run(),canExecute:e=>e.can().chain().focus().toggleBlockquote().run(),isActive:e=>e.isActive("blockquote"),shortcut:"Mod-Shift-b",label:"Blockquote"},horizontalRule:{execute:({editor:e})=>e.chain().focus().setHorizontalRule().run(),canExecute:e=>e.can().chain().focus().setHorizontalRule().run(),isActive:()=>!1,label:"Horizontal rule"},hardBreak:{execute:({editor:e})=>e.chain().focus().setHardBreak().run(),canExecute:e=>e.can().chain().focus().setHardBreak().run(),isActive:()=>!1,shortcut:"Mod-Enter",label:"Line break"},textAlign:{execute:({editor:e,config:n})=>{const s=n?.type==="textAlign"?n.alignment:"left";e.chain().focus().setTextAlign(s).run()},canExecute:()=>!0,isActive:(e,n)=>n?.type==="textAlign"?e.isActive({textAlign:n.alignment}):!1,label:"Text alignment"},clearMarks:{execute:({editor:e})=>e.chain().focus().unsetAllMarks().run(),canExecute:e=>e.can().chain().focus().unsetAllMarks().run(),isActive:()=>!1,label:"Clear formatting"},clearNodes:{execute:({editor:e})=>e.chain().focus().clearNodes().run(),canExecute:e=>e.can().chain().focus().clearNodes().run(),isActive:()=>!1,label:"Clear nodes"},undo:{execute:({editor:e})=>e.chain().focus().undo().run(),canExecute:e=>e.can().chain().focus().undo().run(),isActive:()=>!1,shortcut:"Mod-z",label:"Undo"},redo:{execute:({editor:e})=>e.chain().focus().redo().run(),canExecute:e=>e.can().chain().focus().redo().run(),isActive:()=>!1,shortcut:"Mod-Shift-z",label:"Redo"}},fu={1:"Heading 1",2:"Heading 2",3:"Heading 3",4:"Heading 4",5:"Heading 5",6:"Heading 6"};function xu({editor:e,levels:n=[1,2,3,4,5,6],isDisabled:s=!1}){const[,a]=h.useState(0);h.useEffect(()=>{const o=()=>a(l=>l+1);return e.on("selectionUpdate",o),e.on("transaction",o),()=>{e.off("selectionUpdate",o),e.off("transaction",o)}},[e]);const r=n.find(o=>e.isActive("heading",{level:o})),i=o=>{const l=Number(o),d=lt.heading;d&&d.execute({editor:e,config:{type:"heading",level:l}})};return t.jsxs(c.Dropdown,{placement:"top-start",offset:10,children:[t.jsx(c.DropdownTrigger,{children:t.jsx(O,{size:"sm",radius:"sm",variant:r?"solid":"bordered",color:r?"primary":"default",isDisabled:s,startContent:t.jsx(X.Heading,{size:16}),"aria-label":"Select heading level",children:r?`H${r}`:"H"})}),t.jsx(c.DropdownMenu,{"aria-label":"Heading levels",selectionMode:"single",selectedKeys:r?new Set([String(r)]):new Set,onAction:i,children:n.map(o=>t.jsx(c.DropdownItem,{startContent:e.isActive("heading",{level:o})?t.jsx(X.Check,{size:16}):t.jsx("div",{className:"w-4"}),children:fu[o]},o))})]})}const Hn={bulletList:{label:"Bullet List",icon:X.List},orderedList:{label:"Numbered List",icon:X.ListOrdered},taskList:{label:"Task List",icon:X.ListTodo}};function pu({editor:e,types:n=["bulletList","orderedList","taskList"],isDisabled:s=!1}){const[,a]=h.useState(0);h.useEffect(()=>{const l=()=>a(d=>d+1);return e.on("selectionUpdate",l),e.on("transaction",l),()=>{e.off("selectionUpdate",l),e.off("transaction",l)}},[e]);const r=n.find(l=>e.isActive(l)),i=r?Hn[r].icon:X.List,o=l=>{const u=lt[l];u&&u.execute({editor:e})};return t.jsxs(c.Dropdown,{placement:"top-start",offset:10,children:[t.jsx(c.DropdownTrigger,{children:t.jsx(O,{size:"sm",radius:"sm",variant:r?"solid":"bordered",color:r?"primary":"default",isDisabled:s,isIconOnly:!0,"aria-label":"Select list type",children:t.jsx(i,{size:16})})}),t.jsx(c.DropdownMenu,{"aria-label":"List types",selectionMode:"single",selectedKeys:r?new Set([r]):new Set,onAction:o,children:n.map(l=>{const d=Hn[l].icon;return t.jsx(c.DropdownItem,{startContent:t.jsx(d,{size:16}),children:Hn[l].label},l)})})]})}function hu({colors:e,selectedColor:n,onColorSelect:s,columns:a=4}){return t.jsx("div",{className:"grid gap-2",style:{gridTemplateColumns:`repeat(${a}, minmax(0, 1fr))`},children:e.map(r=>{const i=n===r;return t.jsx("button",{type:"button",onClick:()=>s(r),className:`
7
+ `}const ie={line:"#E7E7E9","line-2":"#F1F1F3",hair:"#F0F0F1",page:"#FBFBFB",field:"#E5E5E5","line-strong":"#D4D4D8",ink:"#18181B",muted:"#71717A",faint:"#A1A1AA","ok-fill":"#EAF3DE",ok:"#3B6D11","warn-fill":"#FAEEDA",warn:"#854F0B","warn-icon":"#EFD9B2","danger-fill":"#FCEBEB",danger:De.semantic.danger,"danger-icon":"#F3D3CF","info-fill":"#EAF1FC",info:"#1D4FA8","violet-fill":"#F1ECFB",violet:"#6D28D9","neutral-fill":"#F4F4F5",neutral:"#52525B",destructive:"#A32D2D"};({...ie});const kr=h.createContext(void 0);function Sr(){return h.useContext(kr)}function Cc({children:e,closeLabel:n,locale:s}){const a=Sr();return t.jsx(c.HeroUIProvider,{locale:s,children:t.jsx(kr.Provider,{value:n??a,children:e})})}const $r=h.createContext("default");function Cn(){return h.useContext($r)}function kc(e){return Cn()==="touch"?"lg":e}function Sc({density:e,children:n}){return t.jsx($r.Provider,{value:e,children:n})}function $c(e,n){const s=e.icons,a=e.aliases||Object.create(null),r=Object.create(null);function i(o){if(s[o])return r[o]=[];if(!(o in r)){r[o]=null;const l=a[o]&&a[o].parent,d=l&&i(l);d&&(r[o]=[l].concat(d))}return r[o]}return Object.keys(s).concat(Object.keys(a)).forEach(i),r}const Ar=Object.freeze({left:0,top:0,width:16,height:16}),xn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Cs=Object.freeze({...Ar,...xn}),rs=Object.freeze({...Cs,body:"",hidden:!1});function Ac(e,n){const s={};!e.hFlip!=!n.hFlip&&(s.hFlip=!0),!e.vFlip!=!n.vFlip&&(s.vFlip=!0);const a=((e.rotate||0)+(n.rotate||0))%4;return a&&(s.rotate=a),s}function fa(e,n){const s=Ac(e,n);for(const a in rs)a in xn?a in e&&!(a in s)&&(s[a]=xn[a]):a in n?s[a]=n[a]:a in e&&(s[a]=e[a]);return s}function Dc(e,n,s){const a=e.icons,r=e.aliases||Object.create(null);let i={};function o(l){i=fa(a[l]||r[l],i)}return o(n),s.forEach(o),fa(e,i)}function Dr(e,n){const s=[];if(typeof e!="object"||typeof e.icons!="object")return s;e.not_found instanceof Array&&e.not_found.forEach(r=>{n(r,null),s.push(r)});const a=$c(e);for(const r in a){const i=a[r];i&&(n(r,Dc(e,r,i)),s.push(r))}return s}const Ec={provider:"",aliases:{},not_found:{},...Ar};function Tn(e,n){for(const s in n)if(s in e&&typeof e[s]!=typeof n[s])return!1;return!0}function Er(e){if(typeof e!="object"||e===null)return null;const n=e;if(typeof n.prefix!="string"||!e.icons||typeof e.icons!="object"||!Tn(e,Ec))return null;const s=n.icons;for(const r in s){const i=s[r];if(!r||typeof i.body!="string"||!Tn(i,rs))return null}const a=n.aliases||Object.create(null);for(const r in a){const i=a[r],o=i.parent;if(!r||typeof o!="string"||!s[o]&&!a[o]||!Tn(i,rs))return null}return n}const xa=Object.create(null);function Lc(e,n){return{provider:e,prefix:n,icons:Object.create(null),missing:new Set}}function At(e,n){const s=xa[e]||(xa[e]=Object.create(null));return s[n]||(s[n]=Lc(e,n))}function Lr(e,n){return Er(n)?Dr(n,(s,a)=>{a?e.icons[s]=a:e.missing.add(s)}):[]}function Fc(e,n,s){try{if(typeof s.body=="string")return e.icons[n]={...s},!0}catch{}return!1}const Fr=/^[a-z0-9]+(-[a-z0-9]+)*$/,kn=(e,n,s,a="")=>{const r=e.split(":");if(e.slice(0,1)==="@"){if(r.length<2||r.length>3)return null;a=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){const l=r.pop(),d=r.pop(),u={provider:r.length>0?r[0]:a,prefix:d,name:l};return n&&!on(u)?null:u}const i=r[0],o=i.split("-");if(o.length>1){const l={provider:a,prefix:o.shift(),name:o.join("-")};return n&&!on(l)?null:l}if(s&&a===""){const l={provider:a,prefix:"",name:i};return n&&!on(l,s)?null:l}return null},on=(e,n)=>e?!!((n&&e.prefix===""||e.prefix)&&e.name):!1;let qt=!1;function Rr(e){return typeof e=="boolean"&&(qt=e),qt}function pa(e){const n=typeof e=="string"?kn(e,!0,qt):e;if(n){const s=At(n.provider,n.prefix),a=n.name;return s.icons[a]||(s.missing.has(a)?null:void 0)}}function Rc(e,n){const s=kn(e,!0,qt);if(!s)return!1;const a=At(s.provider,s.prefix);return n?Fc(a,s.name,n):(a.missing.add(s.name),!0)}function _c(e,n){if(typeof e!="object")return!1;if(typeof n!="string"&&(n=e.provider||""),qt&&!n&&!e.prefix){let r=!1;return Er(e)&&(e.prefix="",Dr(e,(i,o)=>{Rc(i,o)&&(r=!0)})),r}const s=e.prefix;if(!on({prefix:s,name:"a"}))return!1;const a=At(n,s);return!!Lr(a,e)}const _r=Object.freeze({width:null,height:null}),Mr=Object.freeze({..._r,...xn}),Mc=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Pc=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ha(e,n,s){if(n===1)return e;if(s=s||100,typeof e=="number")return Math.ceil(e*n*s)/s;if(typeof e!="string")return e;const a=e.split(Mc);if(a===null||!a.length)return e;const r=[];let i=a.shift(),o=Pc.test(i);for(;;){if(o){const l=parseFloat(i);isNaN(l)?r.push(i):r.push(Math.ceil(l*n*s)/s)}else r.push(i);if(i=a.shift(),i===void 0)return r.join("");o=!o}}function Tc(e,n="defs"){let s="";const a=e.indexOf("<"+n);for(;a>=0;){const r=e.indexOf(">",a),i=e.indexOf("</"+n);if(r===-1||i===-1)break;const o=e.indexOf(">",i);if(o===-1)break;s+=e.slice(r+1,i).trim(),e=e.slice(0,a).trim()+e.slice(o+1)}return{defs:s,content:e}}function Ic(e,n){return e?"<defs>"+e+"</defs>"+n:n}function Oc(e,n,s){const a=Tc(e);return Ic(a.defs,n+a.content+s)}const zc=e=>e==="unset"||e==="undefined"||e==="none";function Bc(e,n){const s={...Cs,...e},a={...Mr,...n},r={left:s.left,top:s.top,width:s.width,height:s.height};let i=s.body;[s,a].forEach(y=>{const b=[],j=y.hFlip,w=y.vFlip;let $=y.rotate;j?w?$+=2:(b.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),b.push("scale(-1 1)"),r.top=r.left=0):w&&(b.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),b.push("scale(1 -1)"),r.top=r.left=0);let N;switch($<0&&($-=Math.floor($/4)*4),$=$%4,$){case 1:N=r.height/2+r.top,b.unshift("rotate(90 "+N.toString()+" "+N.toString()+")");break;case 2:b.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:N=r.width/2+r.left,b.unshift("rotate(-90 "+N.toString()+" "+N.toString()+")");break}$%2===1&&(r.left!==r.top&&(N=r.left,r.left=r.top,r.top=N),r.width!==r.height&&(N=r.width,r.width=r.height,r.height=N)),b.length&&(i=Oc(i,'<g transform="'+b.join(" ")+'">',"</g>"))});const o=a.width,l=a.height,d=r.width,u=r.height;let f,m;o===null?(m=l===null?"1em":l==="auto"?u:l,f=ha(m,d/u)):(f=o==="auto"?d:o,m=l===null?ha(f,u/d):l==="auto"?u:l);const p={},x=(y,b)=>{zc(b)||(p[y]=b.toString())};x("width",f),x("height",m);const g=[r.left,r.top,d,u];return p.viewBox=g.join(" "),{attributes:p,viewBox:g,body:i}}const Vc=/\sid="(\S+)"/g,Uc="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Hc=0;function Wc(e,n=Uc){const s=[];let a;for(;a=Vc.exec(e);)s.push(a[1]);if(!s.length)return e;const r="suffix"+(Math.random()*16777216|Date.now()).toString(16);return s.forEach(i=>{const o=typeof n=="function"?n(i):n+(Hc++).toString(),l=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+o+r+"$3")}),e=e.replace(new RegExp(r,"g"),""),e}const is=Object.create(null);function qc(e,n){is[e]=n}function ls(e){return is[e]||is[""]}function ks(e){let n;if(typeof e.resources=="string")n=[e.resources];else if(n=e.resources,!(n instanceof Array)||!n.length)return null;return{resources:n,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Ss=Object.create(null),Rt=["https://api.simplesvg.com","https://api.unisvg.com"],cn=[];for(;Rt.length>0;)Rt.length===1||Math.random()>.5?cn.push(Rt.shift()):cn.push(Rt.pop());Ss[""]=ks({resources:["https://api.iconify.design"].concat(cn)});function Gc(e,n){const s=ks(n);return s===null?!1:(Ss[e]=s,!0)}function $s(e){return Ss[e]}const Kc=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let ba=Kc();function Yc(e,n){const s=$s(e);if(!s)return 0;let a;if(!s.maxURL)a=0;else{let r=0;s.resources.forEach(o=>{r=Math.max(r,o.length)});const i=n+".json?icons=";a=s.maxURL-r-s.path.length-i.length}return a}function Qc(e){return e===404}const Zc=(e,n,s)=>{const a=[],r=Yc(e,n),i="icons";let o={type:i,provider:e,prefix:n,icons:[]},l=0;return s.forEach((d,u)=>{l+=d.length+1,l>=r&&u>0&&(a.push(o),o={type:i,provider:e,prefix:n,icons:[]},l=d.length),o.icons.push(d)}),a.push(o),a};function Xc(e){if(typeof e=="string"){const n=$s(e);if(n)return n.path}return"/"}const Jc=(e,n,s)=>{if(!ba){s("abort",424);return}let a=Xc(n.provider);switch(n.type){case"icons":{const i=n.prefix,l=n.icons.join(","),d=new URLSearchParams({icons:l});a+=i+".json?"+d.toString();break}case"custom":{const i=n.uri;a+=i.slice(0,1)==="/"?i.slice(1):i;break}default:s("abort",400);return}let r=503;ba(e+a).then(i=>{const o=i.status;if(o!==200){setTimeout(()=>{s(Qc(o)?"abort":"next",o)});return}return r=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?s("abort",i):s("next",r)});return}setTimeout(()=>{s("success",i)})}).catch(()=>{s("next",r)})},ed={prepare:Zc,send:Jc};function Pr(e,n){e.forEach(s=>{const a=s.loaderCallbacks;a&&(s.loaderCallbacks=a.filter(r=>r.id!==n))})}function td(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const n=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!n.length)return;let s=!1;const a=e.provider,r=e.prefix;n.forEach(i=>{const o=i.icons,l=o.pending.length;o.pending=o.pending.filter(d=>{if(d.prefix!==r)return!0;const u=d.name;if(e.icons[u])o.loaded.push({provider:a,prefix:r,name:u});else if(e.missing.has(u))o.missing.push({provider:a,prefix:r,name:u});else return s=!0,!0;return!1}),o.pending.length!==l&&(s||Pr([e],i.id),i.callback(o.loaded.slice(0),o.missing.slice(0),o.pending.slice(0),i.abort))})}))}let nd=0;function sd(e,n,s){const a=nd++,r=Pr.bind(null,s,a);if(!n.pending.length)return r;const i={id:a,icons:n,callback:e,abort:r};return s.forEach(o=>{(o.loaderCallbacks||(o.loaderCallbacks=[])).push(i)}),r}function ad(e){const n={loaded:[],missing:[],pending:[]},s=Object.create(null);e.sort((r,i)=>r.provider!==i.provider?r.provider.localeCompare(i.provider):r.prefix!==i.prefix?r.prefix.localeCompare(i.prefix):r.name.localeCompare(i.name));let a={provider:"",prefix:"",name:""};return e.forEach(r=>{if(a.name===r.name&&a.prefix===r.prefix&&a.provider===r.provider)return;a=r;const i=r.provider,o=r.prefix,l=r.name,d=s[i]||(s[i]=Object.create(null)),u=d[o]||(d[o]=At(i,o));let f;l in u.icons?f=n.loaded:o===""||u.missing.has(l)?f=n.missing:f=n.pending;const m={provider:i,prefix:o,name:l};f.push(m)}),n}function rd(e,n=!0,s=!1){const a=[];return e.forEach(r=>{const i=typeof r=="string"?kn(r,n,s):r;i&&a.push(i)}),a}const id={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function ld(e,n,s,a){const r=e.resources.length,i=e.random?Math.floor(Math.random()*r):e.index;let o;if(e.random){let k=e.resources.slice(0);for(o=[];k.length>1;){const C=Math.floor(Math.random()*k.length);o.push(k[C]),k=k.slice(0,C).concat(k.slice(C+1))}o=o.concat(k)}else o=e.resources.slice(i).concat(e.resources.slice(0,i));const l=Date.now();let d="pending",u=0,f,m=null,p=[],x=[];typeof a=="function"&&x.push(a);function g(){m&&(clearTimeout(m),m=null)}function y(){d==="pending"&&(d="aborted"),g(),p.forEach(k=>{k.status==="pending"&&(k.status="aborted")}),p=[]}function b(k,C){C&&(x=[]),typeof k=="function"&&x.push(k)}function j(){return{startTime:l,payload:n,status:d,queriesSent:u,queriesPending:p.length,subscribe:b,abort:y}}function w(){d="failed",x.forEach(k=>{k(void 0,f)})}function $(){p.forEach(k=>{k.status==="pending"&&(k.status="aborted")}),p=[]}function N(k,C,D){const S=C!=="success";switch(p=p.filter(_=>_!==k),d){case"pending":break;case"failed":if(S||!e.dataAfterTimeout)return;break;default:return}if(C==="abort"){f=D,w();return}if(S){f=D,p.length||(o.length?A():w());return}if(g(),$(),!e.random){const _=e.resources.indexOf(k.resource);_!==-1&&_!==e.index&&(e.index=_)}d="completed",x.forEach(_=>{_(D)})}function A(){if(d!=="pending")return;g();const k=o.shift();if(k===void 0){if(p.length){m=setTimeout(()=>{g(),d==="pending"&&($(),w())},e.timeout);return}w();return}const C={status:"pending",resource:k,callback:(D,S)=>{N(C,D,S)}};p.push(C),u++,m=setTimeout(A,e.rotate),s(k,n,C.callback)}return setTimeout(A),j}function Tr(e){const n={...id,...e};let s=[];function a(){s=s.filter(l=>l().status==="pending")}function r(l,d,u){const f=ld(n,l,d,(m,p)=>{a(),u&&u(m,p)});return s.push(f),f}function i(l){return s.find(d=>l(d))||null}return{query:r,find:i,setIndex:l=>{n.index=l},getIndex:()=>n.index,cleanup:a}}function ga(){}const In=Object.create(null);function od(e){if(!In[e]){const n=$s(e);if(!n)return;const s=Tr(n),a={config:n,redundancy:s};In[e]=a}return In[e]}function cd(e,n,s){let a,r;if(typeof e=="string"){const i=ls(e);if(!i)return s(void 0,424),ga;r=i.send;const o=od(e);o&&(a=o.redundancy)}else{const i=ks(e);if(i){a=Tr(i);const o=e.resources?e.resources[0]:"",l=ls(o);l&&(r=l.send)}}return!a||!r?(s(void 0,424),ga):a.query(n,r,s)().abort}function ya(){}function dd(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,td(e)}))}function ud(e){const n=[],s=[];return e.forEach(a=>{(a.match(Fr)?n:s).push(a)}),{valid:n,invalid:s}}function _t(e,n,s){function a(){const r=e.pendingIcons;n.forEach(i=>{r&&r.delete(i),e.icons[i]||e.missing.add(i)})}if(s&&typeof s=="object")try{if(!Lr(e,s).length){a();return}}catch(r){console.error(r)}a(),dd(e)}function va(e,n){e instanceof Promise?e.then(s=>{n(s)}).catch(()=>{n(null)}):n(e)}function md(e,n){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(n).sort():e.iconsToLoad=n,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:s,prefix:a}=e,r=e.iconsToLoad;if(delete e.iconsToLoad,!r||!r.length)return;const i=e.loadIcon;if(e.loadIcons&&(r.length>1||!i)){va(e.loadIcons(r,a,s),f=>{_t(e,r,f)});return}if(i){r.forEach(f=>{const m=i(f,a,s);va(m,p=>{const x=p?{prefix:a,icons:{[f]:p}}:null;_t(e,[f],x)})});return}const{valid:o,invalid:l}=ud(r);if(l.length&&_t(e,l,null),!o.length)return;const d=a.match(Fr)?ls(s):null;if(!d){_t(e,o,null);return}d.prepare(s,a,o).forEach(f=>{cd(s,f,m=>{_t(e,f.icons,m)})})}))}const fd=(e,n)=>{const s=rd(e,!0,Rr()),a=ad(s);if(!a.pending.length){let d=!0;return n&&setTimeout(()=>{d&&n(a.loaded,a.missing,a.pending,ya)}),()=>{d=!1}}const r=Object.create(null),i=[];let o,l;return a.pending.forEach(d=>{const{provider:u,prefix:f}=d;if(f===l&&u===o)return;o=u,l=f,i.push(At(u,f));const m=r[u]||(r[u]=Object.create(null));m[f]||(m[f]=[])}),a.pending.forEach(d=>{const{provider:u,prefix:f,name:m}=d,p=At(u,f),x=p.pendingIcons||(p.pendingIcons=new Set);x.has(m)||(x.add(m),r[u][f].push(m))}),i.forEach(d=>{const u=r[d.provider][d.prefix];u.length&&md(d,u)}),n?sd(n,a,i):ya};function xd(e,n){const s={...e};for(const a in n){const r=n[a],i=typeof r;a in _r?(r===null||r&&(i==="string"||i==="number"))&&(s[a]=r):i===typeof s[a]&&(s[a]=a==="rotate"?r%4:r)}return s}const pd=/[\s,]+/;function hd(e,n){n.split(pd).forEach(s=>{switch(s.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function bd(e,n=0){const s=e.replace(/^-?[0-9.]*/,"");function a(r){for(;r<0;)r+=4;return r%4}if(s===""){const r=parseInt(e);return isNaN(r)?0:a(r)}else if(s!==e){let r=0;switch(s){case"%":r=25;break;case"deg":r=90}if(r){let i=parseFloat(e.slice(0,e.length-s.length));return isNaN(i)?0:(i=i/r,i%1===0?a(i):0)}}return n}function gd(e,n){let s=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const a in n)s+=" "+a+'="'+n[a]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+s+">"+e+"</svg>"}function yd(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function vd(e){return"data:image/svg+xml,"+yd(e)}function jd(e){return'url("'+vd(e)+'")'}let Ut;function wd(){try{Ut=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Ut=null}}function Nd(e){return Ut===void 0&&wd(),Ut?Ut.createHTML(e):e}const Ir={...Mr,inline:!1},Cd={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},kd={display:"inline-block"},os={backgroundColor:"currentColor"},Or={backgroundColor:"transparent"},ja={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},wa={WebkitMask:os,mask:os,background:Or};for(const e in wa){const n=wa[e];for(const s in ja)n[e+s]=ja[s]}const Sd={...Ir,inline:!0};function Na(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const $d=(e,n,s)=>{const a=n.inline?Sd:Ir,r=xd(a,n),i=n.mode||"svg",o={},l=n.style||{},d={...i==="svg"?Cd:{}};if(s){const b=kn(s,!1,!0);if(b){const j=["iconify"],w=["provider","prefix"];for(const $ of w)b[$]&&j.push("iconify--"+b[$]);d.className=j.join(" ")}}for(let b in n){const j=n[b];if(j!==void 0)switch(b){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":d.ref=j;break;case"className":d[b]=(d[b]?d[b]+" ":"")+j;break;case"inline":case"hFlip":case"vFlip":r[b]=j===!0||j==="true"||j===1;break;case"flip":typeof j=="string"&&hd(r,j);break;case"color":o.color=j;break;case"rotate":typeof j=="string"?r[b]=bd(j):typeof j=="number"&&(r[b]=j);break;case"ariaHidden":case"aria-hidden":j!==!0&&j!=="true"&&delete d["aria-hidden"];break;default:a[b]===void 0&&(d[b]=j)}}const u=Bc(e,r),f=u.attributes;if(r.inline&&(o.verticalAlign="-0.125em"),i==="svg"){d.style={...o,...l},Object.assign(d,f);let b=0,j=n.id;return typeof j=="string"&&(j=j.replace(/-/g,"_")),d.dangerouslySetInnerHTML={__html:Nd(Wc(u.body,j?()=>j+"ID"+b++:"iconifyReact"))},h.createElement("svg",d)}const{body:m,width:p,height:x}=e,g=i==="mask"||(i==="bg"?!1:m.indexOf("currentColor")!==-1),y=gd(m,{...f,width:p+"",height:x+""});return d.style={...o,"--svg":jd(y),width:Na(f.width),height:Na(f.height),...kd,...g?os:Or,...l},h.createElement("span",d)};Rr(!0);qc("",ed);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const n=e.IconifyPreload,s="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(a=>{try{(typeof a!="object"||a===null||a instanceof Array||typeof a.icons!="object"||typeof a.prefix!="string"||!_c(a))&&console.error(s)}catch{console.error(s)}})}if(e.IconifyProviders!==void 0){const n=e.IconifyProviders;if(typeof n=="object"&&n!==null)for(let s in n){const a="IconifyProviders["+s+"] is invalid.";try{const r=n[s];if(typeof r!="object"||!r||r.resources===void 0)continue;Gc(s,r)||console.error(a)}catch{console.error(a)}}}}function zr(e){const[n,s]=h.useState(!!e.ssr),[a,r]=h.useState({});function i(x){if(x){const g=e.icon;if(typeof g=="object")return{name:"",data:g};const y=pa(g);if(y)return{name:g,data:y}}return{name:""}}const[o,l]=h.useState(i(!!e.ssr));function d(){const x=a.callback;x&&(x(),r({}))}function u(x){if(JSON.stringify(o)!==JSON.stringify(x))return d(),l(x),!0}function f(){var x;const g=e.icon;if(typeof g=="object"){u({name:"",data:g});return}const y=pa(g);if(u({name:g,data:y}))if(y===void 0){const b=fd([g],f);r({callback:b})}else y&&((x=e.onLoad)===null||x===void 0||x.call(e,g))}h.useEffect(()=>(s(!0),d),[]),h.useEffect(()=>{n&&f()},[e.icon,n]);const{name:m,data:p}=o;return p?$d({...Cs,...p},e,m):e.children?e.children:e.fallback?e.fallback:h.createElement("span",{})}const P=h.forwardRef((e,n)=>zr({...e,_ref:n}));h.forwardRef((e,n)=>zr({inline:!0,...e,_ref:n}));const O=h.forwardRef(({color:e="primary",radius:n="full",testId:s="veevart-button",...a},r)=>t.jsx(c.Button,{ref:r,color:e,radius:n,"data-testid":s,...a}));O.displayName="Button";function Br({code:e,amount:n,onRemove:s,label:a="Gift Card",removeAriaLabel:r="Remove gift card",testId:i="veevart-applied-code-card"}){return t.jsx(c.Card,{"data-testid":i,shadow:"sm",className:"w-full",children:t.jsxs(c.CardBody,{className:"flex flex-row items-start justify-between gap-2 p-4",children:[t.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[t.jsx("span",{className:"text-xs text-default-500",children:a}),t.jsx("span",{"data-testid":`${i}-code`,className:"truncate font-medium text-foreground",children:e}),t.jsx("span",{"data-testid":`${i}-amount`,className:"text-lg font-semibold text-primary",children:n})]}),t.jsx(O,{testId:`${i}-remove`,isIconOnly:!0,size:"sm",variant:"light","aria-label":r,onPress:s,children:t.jsx(P,{icon:"solar:close-circle-linear",className:"size-4","aria-hidden":"true"})})]})})}function On(e,n){return e-n*Math.floor(e/n)}const Vr=1721426;function tn(e,n,s,a){n=As(e,n);let r=n-1,i=-2;return s<=2?i=0:dn(n)&&(i=-1),Vr-1+365*r+Math.floor(r/4)-Math.floor(r/100)+Math.floor(r/400)+Math.floor((367*s-362)/12+i+a)}function dn(e){return e%4===0&&(e%100!==0||e%400===0)}function As(e,n){return e==="BC"?1-n:n}function Ad(e){let n="AD";return e<=0&&(n="BC",e=1-e),[n,e]}const Dd={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class Sn{fromJulianDay(n){let s=n,a=s-Vr,r=Math.floor(a/146097),i=On(a,146097),o=Math.floor(i/36524),l=On(i,36524),d=Math.floor(l/1461),u=On(l,1461),f=Math.floor(u/365),m=r*400+o*100+d*4+f+(o!==4&&f!==4?1:0),[p,x]=Ad(m),g=s-tn(p,x,1,1),y=2;s<tn(p,x,3,1)?y=0:dn(x)&&(y=1);let b=Math.floor(((g+y)*12+373)/367),j=s-tn(p,x,b,1)+1;return new Gt(p,x,b,j)}toJulianDay(n){return tn(n.era,n.year,n.month,n.day)}getDaysInMonth(n){return Dd[dn(n.year)?"leapyear":"standard"][n.month-1]}getMonthsInYear(n){return 12}getDaysInYear(n){return dn(n.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(n){return 9999}getEras(){return["BC","AD"]}isInverseEra(n){return n.era==="BC"}balanceDate(n){n.year<=0&&(n.era=n.era==="BC"?"AD":"BC",n.year=1-n.year)}constructor(){this.identifier="gregory"}}function Ed(e,n){var s,a,r,i;return(i=(r=(s=e.isEqual)===null||s===void 0?void 0:s.call(e,n))!==null&&r!==void 0?r:(a=n.isEqual)===null||a===void 0?void 0:a.call(n,e))!==null&&i!==void 0?i:e.identifier===n.identifier}function Ur(e,n){return e.calendar.toJulianDay(e)-n.calendar.toJulianDay(n)}function Hr(e,n){return Ca(e)-Ca(n)}function Ca(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let zn=null;function Wr(){return zn==null&&(zn=new Intl.DateTimeFormat().resolvedOptions().timeZone),zn}function ka(e){e=Ds(e,new Sn);let n=As(e.era,e.year);return qr(n,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function qr(e,n,s,a,r,i,o){let l=new Date;return l.setUTCHours(a,r,i,o),l.setUTCFullYear(e,n-1,s),l.getTime()}function Sa(e,n){if(n==="UTC")return 0;if(e>0&&n===Wr())return new Date(e).getTimezoneOffset()*-6e4;let{year:s,month:a,day:r,hour:i,minute:o,second:l}=Gr(e,n);return qr(s,a,r,i,o,l,0)-Math.floor(e/1e3)*1e3}const $a=new Map;function Gr(e,n){let s=$a.get(n);s||(s=new Intl.DateTimeFormat("en-US",{timeZone:n,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),$a.set(n,s));let a=s.formatToParts(new Date(e)),r={};for(let i of a)i.type!=="literal"&&(r[i.type]=i.value);return{year:r.era==="BC"||r.era==="B"?-r.year+1:+r.year,month:+r.month,day:+r.day,hour:r.hour==="24"?0:+r.hour,minute:+r.minute,second:+r.second}}const Aa=864e5;function Ld(e,n,s,a){return(s===a?[s]:[s,a]).filter(i=>Fd(e,n,i))}function Fd(e,n,s){let a=Gr(s,n);return e.year===a.year&&e.month===a.month&&e.day===a.day&&e.hour===a.hour&&e.minute===a.minute&&e.second===a.second}function Rd(e,n,s="compatible"){let a=Yr(e);if(n==="UTC")return ka(a);if(n===Wr()&&s==="compatible"){a=Ds(a,new Sn);let d=new Date,u=As(a.era,a.year);return d.setFullYear(u,a.month-1,a.day),d.setHours(a.hour,a.minute,a.second,a.millisecond),d.getTime()}let r=ka(a),i=Sa(r-Aa,n),o=Sa(r+Aa,n),l=Ld(a,n,r-i,r-o);if(l.length===1)return l[0];if(l.length>1)switch(s){case"compatible":case"earlier":return l[0];case"later":return l[l.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(s){case"earlier":return Math.min(r-i,r-o);case"compatible":case"later":return Math.max(r-i,r-o);case"reject":throw new RangeError("No such absolute time found")}}function Kr(e,n,s="compatible"){return new Date(Rd(e,n,s))}function Yr(e,n){let s=0,a=0,r=0,i=0;if("timeZone"in e)({hour:s,minute:a,second:r,millisecond:i}=e);else if("hour"in e&&!n)return e;return n&&({hour:s,minute:a,second:r,millisecond:i}=n),new pn(e.calendar,e.era,e.year,e.month,e.day,s,a,r,i)}function Ds(e,n){if(Ed(e.calendar,n))return e;let s=n.fromJulianDay(e.calendar.toJulianDay(e)),a=e.copy();return a.calendar=n,a.era=s.era,a.year=s.year,a.month=s.month,a.day=s.day,Dt(a),a}function Es(e,n){let s=e.copy(),a="hour"in s?ni(s,n):0;cs(s,n.years||0),s.calendar.balanceYearMonth&&s.calendar.balanceYearMonth(s,e),s.month+=n.months||0,ds(s),Qr(s),s.day+=(n.weeks||0)*7,s.day+=n.days||0,s.day+=a,_d(s),s.calendar.balanceDate&&s.calendar.balanceDate(s),s.year<1&&(s.year=1,s.month=1,s.day=1);let r=s.calendar.getYearsInEra(s);if(s.year>r){var i,o;let d=(i=(o=s.calendar).isInverseEra)===null||i===void 0?void 0:i.call(o,s);s.year=r,s.month=d?1:s.calendar.getMonthsInYear(s),s.day=d?1:s.calendar.getDaysInMonth(s)}s.month<1&&(s.month=1,s.day=1);let l=s.calendar.getMonthsInYear(s);return s.month>l&&(s.month=l,s.day=s.calendar.getDaysInMonth(s)),s.day=Math.max(1,Math.min(s.calendar.getDaysInMonth(s),s.day)),s}function cs(e,n){var s,a;!((s=(a=e.calendar).isInverseEra)===null||s===void 0)&&s.call(a,e)&&(n=-n),e.year+=n}function ds(e){for(;e.month<1;)cs(e,-1),e.month+=e.calendar.getMonthsInYear(e);let n=0;for(;e.month>(n=e.calendar.getMonthsInYear(e));)e.month-=n,cs(e,1)}function _d(e){for(;e.day<1;)e.month--,ds(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,ds(e)}function Qr(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function Dt(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),Qr(e)}function Zr(e){let n={};for(let s in e)typeof e[s]=="number"&&(n[s]=-e[s]);return n}function Xr(e,n){return Es(e,Zr(n))}function Jr(e,n){let s=e.copy();return n.era!=null&&(s.era=n.era),n.year!=null&&(s.year=n.year),n.month!=null&&(s.month=n.month),n.day!=null&&(s.day=n.day),Dt(s),s}function ei(e,n){let s=e.copy();return n.hour!=null&&(s.hour=n.hour),n.minute!=null&&(s.minute=n.minute),n.second!=null&&(s.second=n.second),n.millisecond!=null&&(s.millisecond=n.millisecond),ti(s),s}function Md(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=nn(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=nn(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=nn(e.minute,60);let n=Math.floor(e.hour/24);return e.hour=nn(e.hour,24),n}function ti(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function nn(e,n){let s=e%n;return s<0&&(s+=n),s}function ni(e,n){return e.hour+=n.hours||0,e.minute+=n.minutes||0,e.second+=n.seconds||0,e.millisecond+=n.milliseconds||0,Md(e)}function si(e,n){let s=e.copy();return ni(s,n),s}function Pd(e,n){return si(e,Zr(n))}function ai(e,n,s,a){let r=e.copy();switch(n){case"era":{let l=e.calendar.getEras(),d=l.indexOf(e.era);if(d<0)throw new Error("Invalid era: "+e.era);d=mt(d,s,0,l.length-1,a?.round),r.era=l[d],Dt(r);break}case"year":var i,o;!((i=(o=r.calendar).isInverseEra)===null||i===void 0)&&i.call(o,r)&&(s=-s),r.year=mt(e.year,s,-1/0,9999,a?.round),r.year===-1/0&&(r.year=1),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e);break;case"month":r.month=mt(e.month,s,1,e.calendar.getMonthsInYear(e),a?.round);break;case"day":r.day=mt(e.day,s,1,e.calendar.getDaysInMonth(e),a?.round);break;default:throw new Error("Unsupported field "+n)}return e.calendar.balanceDate&&e.calendar.balanceDate(r),Dt(r),r}function ri(e,n,s,a){let r=e.copy();switch(n){case"hour":{let i=e.hour,o=0,l=23;if(a?.hourCycle===12){let d=i>=12;o=d?12:0,l=d?23:11}r.hour=mt(i,s,o,l,a?.round);break}case"minute":r.minute=mt(e.minute,s,0,59,a?.round);break;case"second":r.second=mt(e.second,s,0,59,a?.round);break;case"millisecond":r.millisecond=mt(e.millisecond,s,0,999,a?.round);break;default:throw new Error("Unsupported field "+n)}return r}function mt(e,n,s,a,r=!1){if(r){e+=Math.sign(n),e<s&&(e=a);let i=Math.abs(n);n>0?e=Math.ceil(e/i)*i:e=Math.floor(e/i)*i,e>a&&(e=s)}else e+=n,e<s?e=a-(s-e-1):e>a&&(e=s+(e-a-1));return e}const Td=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,Id=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function Od(e){let n=e.match(Td);if(!n)throw Id.test(e)?new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+e);let s=new Gt(Bn(n[1],0,9999),Bn(n[2],1,12),1);return s.day=Bn(n[3],1,s.calendar.getDaysInMonth(s)),s}function Bn(e,n,s){let a=Number(e);if(a<n||a>s)throw new RangeError(`Value out of range: ${n} <= ${a} <= ${s}`);return a}function ii(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function li(e){let n=Ds(e,new Sn),s;return n.era==="BC"?s=n.year===1?"0000":"-"+String(Math.abs(1-n.year)).padStart(6,"00"):s=String(n.year).padStart(4,"0"),`${s}-${String(n.month).padStart(2,"0")}-${String(n.day).padStart(2,"0")}`}function zd(e){return`${li(e)}T${ii(e)}`}function Bd(e,n){if(n.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ls(e,n,s){Bd(e,n),n.set(e,s)}function oi(e){let n=typeof e[0]=="object"?e.shift():new Sn,s;if(typeof e[0]=="string")s=e.shift();else{let o=n.getEras();s=o[o.length-1]}let a=e.shift(),r=e.shift(),i=e.shift();return[n,s,a,r,i]}var Vd=new WeakMap;class Gt{copy(){return this.era?new Gt(this.calendar,this.era,this.year,this.month,this.day):new Gt(this.calendar,this.year,this.month,this.day)}add(n){return Es(this,n)}subtract(n){return Xr(this,n)}set(n){return Jr(this,n)}cycle(n,s,a){return ai(this,n,s,a)}toDate(n){return Kr(this,n)}toString(){return li(this)}compare(n){return Ur(this,n)}constructor(...n){Ls(this,Vd,{writable:!0,value:void 0});let[s,a,r,i,o]=oi(n);this.calendar=s,this.era=a,this.year=r,this.month=i,this.day=o,Dt(this)}}var Ud=new WeakMap;class $n{copy(){return new $n(this.hour,this.minute,this.second,this.millisecond)}add(n){return si(this,n)}subtract(n){return Pd(this,n)}set(n){return ei(this,n)}cycle(n,s,a){return ri(this,n,s,a)}toString(){return ii(this)}compare(n){return Hr(this,n)}constructor(n=0,s=0,a=0,r=0){Ls(this,Ud,{writable:!0,value:void 0}),this.hour=n,this.minute=s,this.second=a,this.millisecond=r,ti(this)}}var Hd=new WeakMap;class pn{copy(){return this.era?new pn(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new pn(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(n){return Es(this,n)}subtract(n){return Xr(this,n)}set(n){return Jr(ei(this,n),n)}cycle(n,s,a){switch(n){case"era":case"year":case"month":case"day":return ai(this,n,s,a);default:return ri(this,n,s,a)}}toDate(n,s){return Kr(this,n,s)}toString(){return zd(this)}compare(n){let s=Ur(this,n);return s===0?Hr(this,Yr(n)):s}constructor(...n){Ls(this,Hd,{writable:!0,value:void 0});let[s,a,r,i,o]=oi(n);this.calendar=s,this.era=a,this.year=r,this.month=i,this.day=o,this.hour=n.shift()||0,this.minute=n.shift()||0,this.second=n.shift()||0,this.millisecond=n.shift()||0,Dt(this)}}const Wd="Open time options",qd=320;function Da(e,n){return typeof n=="string"&&n.length>0?`${e} ${n}`:e}function Vn(e){if(!e)return null;const n="hour"in e&&typeof e.hour=="number"?e.hour:0,s="minute"in e&&typeof e.minute=="number"?e.minute:0,a="second"in e&&typeof e.second=="number"?e.second:0;return new $n(n,s,a)}function Gd(e,n){const s=new Date(2e3,0,1,e.hour,e.minute,e.second);return new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",hour12:n===12}).format(s)}function Kd(e){const n=[];for(let s=0;s<24;s+=1)for(let a=0;a<60;a+=e)n.push(new $n(s,a));return n}function Yd(e){const{minuteStep:n=15,timeListClassName:s,timeListLabel:a=Wd,selectorButtonProps:r,endContent:i,onChange:o,value:l,defaultValue:d,hourCycle:u=12,...f}=e,m=l!==void 0,[p,x]=h.useState(()=>Vn(d)),g=m?Vn(l):p,y=h.useMemo(()=>Kd(n),[n]),b=w=>{m||x(w),o?.(w)},j=t.jsxs(c.Popover,{placement:"bottom-end",children:[t.jsx(c.PopoverTrigger,{children:t.jsx(c.Button,{isIconOnly:!0,variant:"light","aria-label":a,...r,onPress:void 0,children:t.jsx(X.Clock3,{className:"size-4",strokeWidth:1.75})})}),t.jsx(c.PopoverContent,{className:"min-w-[8.5rem] p-0",children:t.jsx(c.ScrollShadow,{className:s??"max-h-64 py-1",children:t.jsx("div",{className:"flex flex-col p-1",children:y.map(w=>{const $=g?.hour===w.hour&&g?.minute===w.minute;return t.jsx(c.Button,{variant:$?"flat":"light",color:$?"primary":"default",className:"h-9 min-w-0 justify-start px-3",onPress:()=>b(w),children:Gd(w,u)},`${w.hour}:${w.minute}`)})})})})]});return t.jsx(c.TimeInput,{...f,value:m?g:void 0,defaultValue:m?void 0:d,hourCycle:u,endContent:t.jsxs("div",{className:"flex items-center gap-1",children:[i,j]}),onChange:w=>b(Vn(w))})}function Fs(e){if(e.mode==="time")return t.jsx(Yd,{...e});if(e.mode==="datetime"){const{mode:r,granularity:i="minute",hideTimeZone:o=!0,calendarWidth:l=qd,disableAnimation:d=!0,classNames:u,...f}=e;return t.jsx(c.DatePicker,{...f,calendarWidth:l,classNames:{...u,popoverContent:Da("min-w-[20rem]",u?.popoverContent),calendarContent:Da("min-h-[18rem]",u?.calendarContent)},disableAnimation:d,granularity:i,hideTimeZone:o})}const{mode:n,granularity:s="day",...a}=e;return t.jsx(c.DatePicker,{...a,granularity:s})}function Qd({label:e,...n}){return t.jsx("button",{...n,"aria-label":e,children:t.jsx("svg",{"aria-hidden":"true",className:"fill-current",fill:"none",focusable:"false",height:"1em",role:"presentation",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",width:"1em",children:t.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})}function Zd(e){return e!==void 0&&e.trim()!==""}function ci(e,n){const s=Sr();if(h.isValidElement(n))return n;const a=[e,s].find(Zd);return a===void 0?void 0:t.jsx(Qd,{label:a})}const di=h.forwardRef(({closeLabel:e,closeButton:n,...s},a)=>{const r=ci(e,n);return t.jsx(c.Drawer,{ref:a,...s,closeButton:r})});di.displayName="Drawer";const Qt=h.forwardRef(({closeLabel:e,closeButton:n,...s},a)=>{const r=ci(e,n);return t.jsx(c.Modal,{ref:a,...s,closeButton:r})});Qt.displayName="Modal";function Xd(e){const n=e?.closest('[role="dialog"]');return n?.parentElement??n??void 0}const Xe=h.forwardRef(({popoverProps:e,...n},s)=>{const a=h.useRef(null),[r,i]=h.useState(void 0),{"data-react-aria-top-layer":o,...l}=e??{},d=o==="true"||o===void 0&&r!==void 0,u={...l,disableDialogFocus:l.disableDialogFocus??(r?!0:void 0),portalContainer:l.portalContainer??r,...d?{"data-react-aria-top-layer":"true"}:{}};return h.useEffect(()=>{i(Xd(a.current))},[]),t.jsx("span",{ref:a,className:"contents",children:t.jsx(c.Select,{ref:s,...n,popoverProps:u})})});Xe.displayName="Select";const Jd="text-default-600 data-[hover=true]:text-default-700",Rs=h.forwardRef(({classNames:e,...n},s)=>t.jsx(c.Table,{ref:s,...n,classNames:{...e,th:c.cn(Jd,e?.th)}}));Rs.displayName="Table";function eu({state:e,onSubmit:n,onRemove:s,appliedCredit:a,errorMessage:r,label:i="Gift Card",placeholder:o="GC-XXXX-XXXX-XXXX",applyLabel:l="Apply",removeAriaLabel:d="Remove gift card",testId:u="veevart-redeem-code-input"}){const[f,m]=h.useState(""),p=h.useId(),[x,g]=h.useState(e);e!==x&&(g(e),e==="applied"&&m(""));const y=()=>{const w=f.trim();w&&n(w)},b=w=>{w.key==="Enter"&&(w.preventDefault(),y())};if(e==="applied"&&a)return t.jsx("div",{"data-testid":u,children:t.jsx(Br,{code:a.code,amount:a.amount,onRemove:s,removeAriaLabel:d,testId:`${u}-card`})});const j=e==="error"&&r!=null;return t.jsxs("div",{"data-testid":u,className:"flex flex-col gap-1",children:[t.jsxs("div",{className:"flex items-end gap-2",children:[t.jsx(c.Input,{"data-testid":`${u}-input`,label:i,labelPlacement:"outside",variant:"bordered",radius:"lg",classNames:{label:"text-xs text-default-500 group-data-[filled-within=true]:text-default-500 group-data-[filled-within=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_16px)]",inputWrapper:"border-small"},placeholder:o,value:f,onValueChange:m,onKeyDown:b,isDisabled:e==="loading",isInvalid:e==="error","aria-describedby":j?p:void 0}),t.jsx(O,{testId:`${u}-button`,isLoading:e==="loading",isDisabled:!f.trim(),onPress:y,children:l})]}),j&&t.jsx("p",{id:p,"data-testid":`${u}-error`,className:"text-tiny text-danger",children:r})]})}const tu={login:"Login",logout:"Logout",selectLanguage:"Select your language"};function nu({languages:e,selectedLanguage:n,onLanguageChange:s,label:a}){const r=e.find(i=>i.code===n);return t.jsx("div",{className:"flex items-center",children:t.jsxs("div",{className:"relative flex items-center",children:[t.jsx(Xe,{"data-testid":"language-select-desktop",variant:"bordered","aria-label":a,selectedKeys:n?[n]:[],onSelectionChange:i=>{const o=Array.from(i)[0]||n;s?.(o)},className:"min-w-36 hidden md:inline-flex",isDisabled:e.length===0,placeholder:a,startContent:t.jsx(X.Globe,{className:"w-5 h-5 text-black"}),renderValue:()=>t.jsx("span",{children:r?.label||a}),size:"md",radius:"full",children:e.map(i=>t.jsx(c.SelectItem,{textValue:i.label,"data-testid":`language-select-option-${i.code}`,children:i.label},i.code))}),t.jsx(Xe,{"aria-label":a,"data-testid":"language-select-mobile",variant:"bordered",selectedKeys:n?[n]:[],onSelectionChange:i=>{const o=Array.from(i)[0]||n;s?.(o)},className:"w-24 inline-flex md:hidden",isDisabled:e.length===0,placeholder:"",startContent:t.jsx(X.Globe,{className:"w-6 h-6 text-black"}),renderValue:()=>t.jsx("span",{children:r?.code.toUpperCase()||""}),size:"md",radius:"full",children:e.map(i=>t.jsx(c.SelectItem,{textValue:i.code.toUpperCase(),"data-testid":`language-select-option-mobile-${i.code}`,children:i.code.toUpperCase()},i.code))})]})})}function su({isLoggedIn:e,onLogin:n,onLogout:s,labels:a}){return e?t.jsxs(O,{"data-testid":"navbar-auth-button",className:"px-2 py-1 w-1 min-w-12 md:min-w-24 rounded-full bg-black text-white text-sm flex items-center",onPress:s,size:"md",children:[t.jsx(X.User,{className:"inline w-5 h-5"}),t.jsx("span",{className:"hidden md:inline",children:a.logout})]}):t.jsxs(O,{"data-testid":"navbar-auth-button",className:"px-2 py-1 min-w-12 md:min-w-24 rounded-full bg-black text-white text-sm flex items-center",onPress:n,size:"md",children:[t.jsx(X.User,{className:"inline w-5 h-5"}),t.jsx("span",{className:"hidden md:inline",children:a.login})]})}function au({logo:e,languages:n=[],selectedLanguage:s,onLanguageChange:a,isLoggedIn:r,onLogin:i,onLogout:o,hasLanguages:l,hasAuth:d,labels:u={},className:f}){const m={...tu,...u};return t.jsxs("nav",{"data-testid":"navbar",className:c.cn("w-full px-4 md:px-8 py-3 bg-white border-b border-zinc-100 flex items-center justify-between",f),children:[t.jsx("div",{className:"flex items-center min-w-10",children:e&&t.jsx("a",{href:"/",className:"block",children:t.jsx("img",{"data-testid":"navbar-logo",src:e,alt:"Logo",className:"h-8 w-auto max-w-28 md:max-w-40 object-contain"})})}),t.jsxs("div",{className:"flex items-center gap-2 md:gap-4",children:[(l||n.length>0)&&t.jsx(nu,{languages:n,selectedLanguage:s,onLanguageChange:a,label:m.selectLanguage}),d&&t.jsx(su,{isLoggedIn:r,onLogin:i,onLogout:o,labels:m})]})]})}function ru(e){return t.jsx("div",{className:"min-h-screen flex flex-col",children:t.jsx("div",{className:"flex-1 flex items-center justify-center p-12",children:t.jsx(c.Alert,{description:"This template combines Navbar, Footer, and a confirmation Card. Include title, message, confirmation number, details list, icon, and action buttons. Use Card for the confirmation content.",title:"TODO: Implement ConfirmationPageTemplate",variant:"faded",className:"max-w-2xl"})})})}var Un;const iu=typeof document<"u"?(Un=h.useInsertionEffect)!==null&&Un!==void 0?Un:h.useLayoutEffect:()=>{};function An(e,n,s){let[a,r]=h.useState(e||n),i=h.useRef(a),o=h.useRef(e!==void 0),l=e!==void 0;h.useEffect(()=>{let m=o.current;m!==l&&process.env.NODE_ENV!=="production"&&console.warn(`WARN: A component changed from ${m?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}.`),o.current=l},[l]);let d=l?e:a;iu(()=>{i.current=d});let[,u]=h.useReducer(()=>({}),{}),f=h.useCallback((m,...p)=>{let x=typeof m=="function"?m(i.current):m;Object.is(i.current,x)||(i.current=x,r(x),u(),s?.(x,...p))},[s]);return[d,f]}function ui(e){return t.jsx("svg",{...e,fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:t.jsx(Te.m.path,{animate:{pathLength:1},d:"M5 13l4 4L19 7",initial:{pathLength:0},strokeLinecap:"round",strokeLinejoin:"round",transition:{delay:.2,type:"tween",ease:"easeOut",duration:.3}})})}const mi=h.forwardRef(({color:e="primary",variant:n="default",stepsCount:s=3,defaultStep:a=0,label:r,stepLabels:i,showStepLabelTooltip:o=!1,stepLabelTooltipPlacement:l="top",showStepCounter:d=!1,stepCounterPosition:u="right",layout:f="compact",stepCounterFormat:m,onStepChange:p,currentStep:x,hideProgressBars:g=!1,stepClassName:y,className:b,isDisabled:j=!1,...w},$)=>{const[N,A]=An(x,a,p),k=h.useMemo(()=>{let C,D;const S=["[--active-fg-color:hsl(var(--step-fg-color))]","[--active-border-color:hsl(var(--step-color))]","[--active-color:hsl(var(--step-color))]","[--complete-background-color:hsl(var(--step-color))]","[--complete-border-color:hsl(var(--step-color))]","[--inactive-border-color:hsl(var(--heroui-default-300))]","[--inactive-color:hsl(var(--heroui-default-300))]"];switch(e){case"primary":C="[--step-color:var(--heroui-primary)]",D="[--step-fg-color:var(--heroui-primary-foreground)]";break;case"secondary":C="[--step-color:var(--heroui-secondary)]",D="[--step-fg-color:var(--heroui-secondary-foreground)]";break;case"success":C="[--step-color:var(--heroui-success)]",D="[--step-fg-color:var(--heroui-success-foreground)]";break;case"warning":C="[--step-color:var(--heroui-warning)]",D="[--step-fg-color:var(--heroui-warning-foreground)]";break;case"danger":C="[--step-color:var(--heroui-danger)]",D="[--step-fg-color:var(--heroui-danger-foreground)]";break;case"default":C="[--step-color:var(--heroui-default)]",D="[--step-fg-color:var(--heroui-default-foreground)]";break;default:C="[--step-color:var(--heroui-primary)]",D="[--step-fg-color:var(--heroui-primary-foreground)]";break}return S.unshift(D),S.unshift(C),S},[e]);return t.jsxs("nav",{ref:$,"aria-label":"Progress",className:c.cn("flex items-center overflow-x-auto",f==="spread"?"w-full justify-between gap-6":"max-w-fit gap-3",b),"data-testid":"stepper-root",...w,children:[d&&u==="left"?t.jsx("span",{className:"text-default-500 text-2xl whitespace-nowrap","data-testid":"stepper-counter",children:m?m(N+1,s):`Step ${N+1} of ${s}`}):null,r&&t.jsx("label",{className:"text-small text-default-foreground lg:text-medium font-light whitespace-nowrap me-3","data-testid":"stepper-label",children:r}),t.jsx("ol",{className:c.cn("flex flex-row flex-nowrap gap-x-3",k,b),"data-testid":"stepper-list",children:Array.from({length:s})?.map((C,D)=>{const S=N===D?"active":N<D?"inactive":"complete",_=n==="activeLabel"&&S==="active"&&!!i?.[D],F=o&&S!=="active"&&!!i?.[D];return t.jsxs("li",{className:"relative flex shrink-0 items-center gap-x-3","data-testid":`stepper-step-${D}`,children:[t.jsx(c.Tooltip,{content:F?i?.[D]:void 0,isDisabled:!F,offset:12,placement:l,classNames:{base:"px-0 py-0",content:"rounded-full border border-default-200 bg-white px-4 py-2 text-small font-medium text-default-700 shadow-sm"},children:t.jsxs("button",{"aria-current":S==="active"?"step":void 0,className:c.cn("group rounded-large flex w-full cursor-pointer flex-row items-center justify-center gap-x-3 py-2.5",{"rounded-full border border-(--active-border-color)/20 bg-(--active-border-color)/10 pl-2 pr-4 py-1.5":_},{"cursor-not-allowed opacity-50":j},y),onClick:()=>!j&&A(D),disabled:j,"data-testid":`stepper-step-btn-${D}`,children:[t.jsx("div",{className:"h-full relative flex items-center",children:t.jsx(Te.LazyMotion,{features:Te.domAnimation,children:t.jsx(Te.m.div,{animate:S,className:"relative z-10",children:t.jsx(Te.m.div,{animate:S,className:c.cn("border-medium text-large text-default-foreground relative z-10 flex h-[26px] w-[26px] shrink-0 items-center justify-center rounded-full font-semibold bg-white",{"border-(--complete-border-color) bg-(--complete-background-color) text-(--active-fg-color)":_,"bg-(--complete-background-color)":S==="complete","shadow-lg":S==="complete"}),initial:!1,transition:{duration:.25},variants:{inactive:{backgroundColor:"transparent",borderColor:"var(--inactive-border-color)",color:"var(--inactive-color)"},active:{backgroundColor:"transparent",borderColor:"var(--active-border-color)",color:"var(--active-color)"},complete:{backgroundColor:"var(--complete-background-color)",borderColor:"var(--complete-border-color)",color:"var(--active-fg-color)"}},children:t.jsx("div",{className:"flex items-center justify-center",children:S==="complete"&&n==="default"?t.jsx(ui,{className:"h-5 w-5 text-(--active-fg-color)","data-testid":`stepper-step-check-${D}`}):t.jsx("span",{children:D+1})})})})})}),_?t.jsx("span",{className:"pr-2 text-2xl leading-none font-medium whitespace-nowrap text-(--active-color)","data-testid":`stepper-step-label-${D}`,children:i[D]}):null]},D)}),D<s-1&&!g&&t.jsx("div",{"aria-hidden":"true",className:"pointer-events-none z-0 w-12 flex-none items-center",style:{"--idx":D},children:t.jsx("div",{className:c.cn("bg-default-200 relative h-0.5 w-full transition-colors duration-300","after:absolute after:block after:h-full after:w-0 after:bg-(--active-border-color) after:transition-[width] after:duration-300 after:content-['']",{"after:w-full":D<N})})})]},D)})}),d&&u==="right"?t.jsx("span",{className:"text-default-500 text-2xl whitespace-nowrap","data-testid":"stepper-counter",children:m?m(N+1,s):`Step ${N+1} of ${s}`}):null]})});mi.displayName="Stepper";function lu(e){return t.jsx("div",{className:"min-h-screen flex flex-col",children:t.jsx("div",{className:"flex-1 flex items-center justify-center p-12",children:t.jsx(c.Alert,{description:"This template combines Navbar, Stepper, Footer, and an event details Card. Include event image, category/spots chips, tags, details grid, and action buttons. Use Card, CardHeader, CardBody for content structure.",title:"TODO: Implement EventDetailsTemplate",variant:"faded",className:"max-w-2xl"})})})}function fe(e,n="en-US",s="USD"){try{return new Intl.NumberFormat(n,{style:"currency",currency:s}).format(e)}catch{return`${s} ${e.toFixed(2)}`}}function Et(e,n="en-US"){try{const s=new Intl.NumberFormat(n,{style:"currency",currency:e}).resolvedOptions();return typeof s.maximumFractionDigits=="number"?s.maximumFractionDigits:2}catch{return 2}}function _s(e,n,s="en-US"){const a=Et(n,s),r=Math.pow(10,a);return Math.round(e*r)/r}function us(e,n,s,a){return _s(e-n,s,a)}const Ea={primary:{active:"hsl(var(--heroui-primary))",fg:"hsl(var(--heroui-primary-foreground))"},secondary:{active:"hsl(var(--heroui-secondary))",fg:"hsl(var(--heroui-secondary-foreground))"},success:{active:"hsl(var(--heroui-success))",fg:"hsl(var(--heroui-success-foreground))"},warning:{active:"hsl(var(--heroui-warning))",fg:"hsl(var(--heroui-warning-foreground))"},danger:{active:"hsl(var(--heroui-danger))",fg:"hsl(var(--heroui-danger-foreground))"},default:{active:"hsl(var(--heroui-default))",fg:"hsl(var(--heroui-default-foreground))"}},ou="rgb(156 163 175)",cu="rgb(107 114 128)",fi=h.forwardRef(function({color:n="primary",steps:s=[],defaultStep:a=0,onStepChange:r,currentStep:i,hideProgressBars:o=!1,activeColor:l,activeForegroundColor:d,inactiveColor:u=ou,inactiveLabelColor:f=cu,activeStepVariant:m="bordered",stepClassName:p,circleClassName:x,progressBarClassName:g,labelsClassName:y,labelSlotClassName:b,activeLabelClassName:j,inactiveLabelClassName:w,className:$,ariaLabel:N="Progress",invalidLabelSuffix:A=", has errors",testId:k,isStepReachable:C,...D},S){const[_,F]=An(i,a,r),L=Ea[n]??Ea.primary,M=l??L.active,I=d??L.fg,W=(K,z)=>{const G=K.ariaLabel??(typeof K.title=="string"?K.title:null)??`${z+1}`;return K.invalid?`${G}${A}`:G};return t.jsxs("nav",{...D,"aria-label":N,...k?{"data-testid":k}:{},children:[t.jsx("div",{className:c.cn("flex items-center",$),children:s?.map((K,z)=>{const ne=z===_?"active":z<_?"complete":"inactive",G=C?C(z):!0;return t.jsxs(h.Fragment,{children:[t.jsx(O,{ref:S,isIconOnly:!0,disableAnimation:!0,radius:"full",variant:"light",testId:`${k??"horizontal-steps"}-step-${z}`,"aria-current":ne==="active"?"step":void 0,"aria-describedby":K.describedBy,"aria-label":W(K,z),"data-invalid":K.invalid?"true":void 0,isDisabled:!G,className:c.cn("size-8 min-w-8 shrink-0 overflow-visible bg-transparent p-0","data-[hover=true]:bg-transparent",G?"cursor-pointer":"cursor-not-allowed","data-[disabled=true]:opacity-40",K.className,p),onPress:()=>{if(i===void 0){F(z);return}r?.(z)},children:t.jsx(Te.LazyMotion,{features:Te.domAnimation,children:t.jsx(Te.m.div,{animate:ne,className:c.cn("relative flex size-8 items-center justify-center rounded-full text-[13px] font-medium",x),initial:!1,transition:{duration:.2},variants:{inactive:{backgroundColor:"transparent",borderColor:u,borderWidth:"1.5px",color:u},active:{backgroundColor:m==="solid"?M:"transparent",borderColor:M,borderWidth:"1.5px",color:m==="solid"?I:M},complete:{backgroundColor:M,borderColor:M,borderWidth:"1.5px",color:M}},children:ne==="complete"?t.jsx(ui,{className:"size-4",style:{color:I}}):t.jsx("span",{children:z+1})})})}),z<s.length-1&&!o&&t.jsx("div",{"aria-hidden":!0,className:c.cn("mx-1 h-px w-6 shrink-0 transition-colors duration-300 sm:mx-1.5 sm:w-14 md:w-20",g),style:{backgroundColor:z<_?M:u}})]},z)})}),t.jsx("div",{className:c.cn("mt-2.5 hidden md:flex",y),children:s?.map((K,z)=>{const ne=z<=_;return t.jsxs(h.Fragment,{children:[t.jsx("div",{className:c.cn("relative flex w-8 shrink-0 justify-center overflow-visible",b),children:t.jsx("span",{className:c.cn("absolute left-1/2 top-0 -translate-x-1/2 whitespace-nowrap text-center text-[12px] font-medium transition-colors duration-200",ne?j:w),style:{color:ne?M:f},children:K.title})}),z<s.length-1&&!o&&t.jsx("div",{className:c.cn("mx-1 w-6 shrink-0 sm:mx-1.5 sm:w-14 md:w-20",g)})]},z)})})]})});fi.displayName="HorizontalSteps";function du(){return t.jsxs("footer",{"data-testid":"footer",className:"fixed left-0 bottom-0 w-full text-left p-4 bg-white font-inter font-light text-base text-zinc-500",children:["Powered by Veevart ® ",new Date().getFullYear()]})}const uu=e=>{const n=h.useMemo(()=>JSON.stringify({allItems:e.allItems,selected:e.selected}),[e.allItems,e.selected]);return t.jsx(mu,{...e},n)},mu=({allItems:e,selected:n,onSelectedChange:s,titleLeft:a,titleRight:r})=>{const[i,o]=h.useState([]),[l,d]=h.useState([]),[u,f]=h.useState(null),[m,p]=h.useState(null),x=h.useMemo(()=>new Set(n),[n]),g=h.useMemo(()=>new Set(e),[e]),y=h.useMemo(()=>e.filter(F=>!x.has(F)),[e,x]),b=F=>{if(F.length===0)return;const L=Array.from(new Set([...n,...F]));s(L)},j=F=>{if(F.length===0)return;const L=new Set(F);s(n.filter(M=>!L.has(M)))},w=()=>{i.length!==0&&(b(i),o([]))},$=()=>{l.length!==0&&(j(l),d([]))},N=()=>{y.length!==0&&(b(y),o([]))},A=()=>{n.length!==0&&(s([]),d([]))},k=(F,L,M)=>{const I=Math.min(L,M),W=Math.max(L,M);return F.slice(I,W+1)},C=(F,L,M)=>{if(M&&u!==null){o(k(y,u,L)),d([]),f(L);return}const I=i.includes(F);o(I?i.filter(W=>W!==F):[...i,F]),d([]),f(L)},D=(F,L,M)=>{if(M&&m!==null){d(k(n,m,L)),o([]),p(L);return}const I=l.includes(F);d(I?l.filter(W=>W!==F):[...l,F]),o([]),p(L)},S=(F,L,M)=>{const I=M==="available"?i.includes(L)?i:[L]:l.includes(L)?l:[L];F.dataTransfer.setData("text/plain",JSON.stringify({source:M,items:I})),F.dataTransfer.effectAllowed="move"},_=(F,L)=>{F.preventDefault();const M=F.dataTransfer.getData("text/plain");if(M)try{const I=JSON.parse(M),W=(I.items||[]).filter(K=>g.has(K));if(W.length===0||I.source===L)return;L==="selected"?(b(W),o([])):(j(W),d([]))}catch{return}};return t.jsxs("div",{className:"flex flex-col gap-6 md:flex-row md:items-start md:justify-between",children:[t.jsxs("div",{className:"flex w-full flex-col gap-3 md:w-2/5",children:[t.jsx("h2",{className:"text-sm font-medium text-gray-700",children:a}),t.jsx(c.Card,{className:"w-full border border-gray-200 shadow-none",children:t.jsx(c.CardBody,{className:"h-60 gap-2 overflow-y-auto",onDragOver:F=>F.preventDefault(),onDrop:F=>_(F,"available"),children:y.map((F,L)=>{const M=i.includes(F);return t.jsx("button",{type:"button",onClick:I=>{C(F,L,I.shiftKey)},onMouseDown:I=>{I.shiftKey&&I.preventDefault()},draggable:!0,onDragStart:I=>S(I,F,"available"),className:`rounded-md px-3 py-2 text-left text-sm transition ${M?"bg-[#E4571E]/10 text-[#E4571E]":"text-gray-700 hover:bg-gray-100"}`,children:F},F)})})})]}),t.jsxs("div",{className:"flex flex-row items-center justify-center gap-3 md:flex-col md:pt-6",children:[t.jsx(O,{variant:"light",className:"h-10 w-10 min-w-0 text-2xl font-semibold text-[#E4571E] hover:bg-[#E4571E]/10",isIconOnly:!0,"data-testid":"move-selected-to-available",onPress:w,isDisabled:i.length===0,"aria-label":"Move selected to right",children:"›"}),t.jsx(O,{variant:"light",className:"h-10 w-10 min-w-0 text-2xl font-semibold text-[#E4571E] hover:bg-[#E4571E]/10",isIconOnly:!0,"data-testid":"move-selected-to-available",onPress:$,isDisabled:l.length===0,"aria-label":"Move selected to left",children:"‹"}),t.jsx(O,{variant:"light",className:"h-10 w-10 min-w-0 text-2xl font-semibold text-[#E4571E] hover:bg-[#E4571E]/10",isIconOnly:!0,"data-testid":"move-all-to-selected",onPress:N,isDisabled:y.length===0,"aria-label":"Move all to right",children:"»"}),t.jsx(O,{variant:"light",className:"h-10 w-10 min-w-0 text-2xl font-semibold text-[#E4571E] hover:bg-[#E4571E]/10",isIconOnly:!0,onPress:A,"data-testid":"move-all-to-available",isDisabled:n.length===0,"aria-label":"Move all to left",children:"«"})]}),t.jsxs("div",{className:"flex w-full flex-col gap-3 md:w-2/5",children:[t.jsx("h2",{className:"text-sm font-medium text-gray-700",children:r}),t.jsx(c.Card,{className:"w-full border border-gray-200 shadow-none",children:t.jsx(c.CardBody,{className:"h-60 gap-2 overflow-y-auto",onDragOver:F=>F.preventDefault(),onDrop:F=>_(F,"selected"),children:n.map((F,L)=>{const M=l.includes(F);return t.jsx("button",{type:"button",onClick:I=>{D(F,L,I.shiftKey)},onMouseDown:I=>{I.shiftKey&&I.preventDefault()},draggable:!0,onDragStart:I=>S(I,F,"selected"),className:`rounded-md px-3 py-2 text-left text-sm transition ${M?"bg-[#E4571E]/10 text-[#E4571E]":"text-gray-700 hover:bg-gray-100"}`,children:F},F)})})})]})]})};function Kt(e){return typeof e=="string"?e:e.type}function xt({className:e}){return t.jsx("div",{className:`flex items-center h-6 ${e||""}`,children:t.jsx(c.Divider,{orientation:"vertical"})})}function ht({icon:e,label:n,isActive:s=!1,isDisabled:a=!1,onClick:r,shortcut:i,iconSize:o=16,className:l}){const d=i?`${n} (${i})`:n;return t.jsx(c.Tooltip,{content:d,placement:"top",offset:10,children:t.jsx(O,{size:"sm",radius:"sm",color:s?"primary":"default",variant:s?"solid":"bordered",isIconOnly:!0,isDisabled:a,onPress:r,"aria-label":n,className:l,children:t.jsx(e,{size:o})})})}const lt={bold:{execute:({editor:e})=>e.chain().focus().toggleBold().run(),canExecute:e=>e.can().chain().focus().toggleBold().run(),isActive:e=>e.isActive("bold"),shortcut:"Mod-b",label:"Bold"},italic:{execute:({editor:e})=>e.chain().focus().toggleItalic().run(),canExecute:e=>e.can().chain().focus().toggleItalic().run(),isActive:e=>e.isActive("italic"),shortcut:"Mod-i",label:"Italic"},strike:{execute:({editor:e})=>e.chain().focus().toggleStrike().run(),canExecute:e=>e.can().chain().focus().toggleStrike().run(),isActive:e=>e.isActive("strike"),shortcut:"Mod-Shift-x",label:"Strikethrough"},underline:{execute:({editor:e})=>e.chain().focus().toggleUnderline().run(),canExecute:e=>e.can().chain().focus().toggleUnderline().run(),isActive:e=>e.isActive("underline"),shortcut:"Mod-u",label:"Underline"},code:{execute:({editor:e})=>e.chain().focus().toggleCode().run(),canExecute:e=>e.can().chain().focus().toggleCode().run(),isActive:e=>e.isActive("code"),shortcut:"Mod-e",label:"Inline code"},textColor:{execute:({editor:e,config:n})=>{const s=n?.type==="textColor"?n.color:"";s?e.chain().focus().setColor(s).run():e.chain().focus().unsetColor().run()},canExecute:()=>!0,isActive:e=>e.isActive("textStyle"),label:"Text color"},highlight:{execute:({editor:e,config:n})=>{const s=n?.type==="highlight"?n.color:"";s?e.chain().focus().setHighlight({color:s}).run():e.chain().focus().unsetHighlight().run()},canExecute:()=>!0,isActive:e=>e.isActive("highlight"),label:"Highlight"},link:{execute:({editor:e,config:n})=>{const s=n?.type==="link"?n.href:"";if(s){const a=n?.type==="link"?n.target:void 0,r=n?.type==="link"?n.rel:void 0;e.chain().focus().setLink({href:s,target:a,rel:r}).run()}else e.chain().focus().unsetLink().run()},canExecute:()=>!0,isActive:e=>e.isActive("link"),shortcut:"Mod-k",label:"Link"},paragraph:{execute:({editor:e})=>e.chain().focus().setParagraph().run(),canExecute:e=>e.can().chain().focus().setParagraph().run(),isActive:e=>e.isActive("paragraph"),shortcut:"Mod-Alt-0",label:"Paragraph"},heading:{execute:({editor:e,config:n})=>{const s=n?.type==="heading"?n.level:1;e.chain().focus().toggleHeading({level:s}).run()},canExecute:(e,n)=>{const s=n?.type==="heading"?n.level:1;return e.can().chain().focus().toggleHeading({level:s}).run()},isActive:(e,n)=>n?.type==="heading"?e.isActive("heading",{level:n.level}):e.isActive("heading"),label:"Heading"},bulletList:{execute:({editor:e})=>e.chain().focus().toggleBulletList().run(),canExecute:e=>e.can().chain().focus().toggleBulletList().run(),isActive:e=>e.isActive("bulletList"),shortcut:"Mod-Shift-8",label:"Bullet list"},orderedList:{execute:({editor:e})=>e.chain().focus().toggleOrderedList().run(),canExecute:e=>e.can().chain().focus().toggleOrderedList().run(),isActive:e=>e.isActive("orderedList"),shortcut:"Mod-Shift-7",label:"Numbered list"},taskList:{execute:({editor:e})=>e.chain().focus().toggleTaskList().run(),canExecute:e=>e.can().chain().focus().toggleTaskList().run(),isActive:e=>e.isActive("taskList"),label:"Task list"},codeBlock:{execute:({editor:e})=>e.chain().focus().toggleCodeBlock().run(),canExecute:e=>e.can().chain().focus().toggleCodeBlock().run(),isActive:e=>e.isActive("codeBlock"),shortcut:"Mod-Alt-c",label:"Code block"},blockquote:{execute:({editor:e})=>e.chain().focus().toggleBlockquote().run(),canExecute:e=>e.can().chain().focus().toggleBlockquote().run(),isActive:e=>e.isActive("blockquote"),shortcut:"Mod-Shift-b",label:"Blockquote"},horizontalRule:{execute:({editor:e})=>e.chain().focus().setHorizontalRule().run(),canExecute:e=>e.can().chain().focus().setHorizontalRule().run(),isActive:()=>!1,label:"Horizontal rule"},hardBreak:{execute:({editor:e})=>e.chain().focus().setHardBreak().run(),canExecute:e=>e.can().chain().focus().setHardBreak().run(),isActive:()=>!1,shortcut:"Mod-Enter",label:"Line break"},textAlign:{execute:({editor:e,config:n})=>{const s=n?.type==="textAlign"?n.alignment:"left";e.chain().focus().setTextAlign(s).run()},canExecute:()=>!0,isActive:(e,n)=>n?.type==="textAlign"?e.isActive({textAlign:n.alignment}):!1,label:"Text alignment"},clearMarks:{execute:({editor:e})=>e.chain().focus().unsetAllMarks().run(),canExecute:e=>e.can().chain().focus().unsetAllMarks().run(),isActive:()=>!1,label:"Clear formatting"},clearNodes:{execute:({editor:e})=>e.chain().focus().clearNodes().run(),canExecute:e=>e.can().chain().focus().clearNodes().run(),isActive:()=>!1,label:"Clear nodes"},undo:{execute:({editor:e})=>e.chain().focus().undo().run(),canExecute:e=>e.can().chain().focus().undo().run(),isActive:()=>!1,shortcut:"Mod-z",label:"Undo"},redo:{execute:({editor:e})=>e.chain().focus().redo().run(),canExecute:e=>e.can().chain().focus().redo().run(),isActive:()=>!1,shortcut:"Mod-Shift-z",label:"Redo"}},fu={1:"Heading 1",2:"Heading 2",3:"Heading 3",4:"Heading 4",5:"Heading 5",6:"Heading 6"};function xu({editor:e,levels:n=[1,2,3,4,5,6],isDisabled:s=!1}){const[,a]=h.useState(0);h.useEffect(()=>{const o=()=>a(l=>l+1);return e.on("selectionUpdate",o),e.on("transaction",o),()=>{e.off("selectionUpdate",o),e.off("transaction",o)}},[e]);const r=n.find(o=>e.isActive("heading",{level:o})),i=o=>{const l=Number(o),d=lt.heading;d&&d.execute({editor:e,config:{type:"heading",level:l}})};return t.jsxs(c.Dropdown,{placement:"top-start",offset:10,children:[t.jsx(c.DropdownTrigger,{children:t.jsx(O,{size:"sm",radius:"sm",variant:r?"solid":"bordered",color:r?"primary":"default",isDisabled:s,startContent:t.jsx(X.Heading,{size:16}),"aria-label":"Select heading level",children:r?`H${r}`:"H"})}),t.jsx(c.DropdownMenu,{"aria-label":"Heading levels",selectionMode:"single",selectedKeys:r?new Set([String(r)]):new Set,onAction:i,children:n.map(o=>t.jsx(c.DropdownItem,{startContent:e.isActive("heading",{level:o})?t.jsx(X.Check,{size:16}):t.jsx("div",{className:"w-4"}),children:fu[o]},o))})]})}const Hn={bulletList:{label:"Bullet List",icon:X.List},orderedList:{label:"Numbered List",icon:X.ListOrdered},taskList:{label:"Task List",icon:X.ListTodo}};function pu({editor:e,types:n=["bulletList","orderedList","taskList"],isDisabled:s=!1}){const[,a]=h.useState(0);h.useEffect(()=>{const l=()=>a(d=>d+1);return e.on("selectionUpdate",l),e.on("transaction",l),()=>{e.off("selectionUpdate",l),e.off("transaction",l)}},[e]);const r=n.find(l=>e.isActive(l)),i=r?Hn[r].icon:X.List,o=l=>{const u=lt[l];u&&u.execute({editor:e})};return t.jsxs(c.Dropdown,{placement:"top-start",offset:10,children:[t.jsx(c.DropdownTrigger,{children:t.jsx(O,{size:"sm",radius:"sm",variant:r?"solid":"bordered",color:r?"primary":"default",isDisabled:s,isIconOnly:!0,"aria-label":"Select list type",children:t.jsx(i,{size:16})})}),t.jsx(c.DropdownMenu,{"aria-label":"List types",selectionMode:"single",selectedKeys:r?new Set([r]):new Set,onAction:o,children:n.map(l=>{const d=Hn[l].icon;return t.jsx(c.DropdownItem,{startContent:t.jsx(d,{size:16}),children:Hn[l].label},l)})})]})}function hu({colors:e,selectedColor:n,onColorSelect:s,columns:a=4}){return t.jsx("div",{className:"grid gap-2",style:{gridTemplateColumns:`repeat(${a}, minmax(0, 1fr))`},children:e.map(r=>{const i=n===r;return t.jsx("button",{type:"button",onClick:()=>s(r),className:`
8
8
  w-8 h-8 rounded-full border-2 cursor-pointer
9
9
  transition-all duration-200
10
10
  hover:scale-110 hover:shadow-md
package/dist/index.js CHANGED
@@ -195,9 +195,9 @@ const gs = Zt(void 0);
195
195
  function xs() {
196
196
  return pt(gs);
197
197
  }
198
- function T0({ children: e, closeLabel: t }) {
199
- const a = xs();
200
- return /* @__PURE__ */ n(bo, { children: /* @__PURE__ */ n(gs.Provider, { value: t ?? a, children: e }) });
198
+ function T0({ children: e, closeLabel: t, locale: a }) {
199
+ const r = xs();
200
+ return /* @__PURE__ */ n(bo, { locale: a, children: /* @__PURE__ */ n(gs.Provider, { value: t ?? r, children: e }) });
201
201
  }
202
202
  const ys = Zt("default");
203
203
  function lr() {
@@ -9,6 +9,11 @@ interface HeroUIProviderProps {
9
9
  * outer provider's. With none anywhere, HeroUI's own button is rendered untouched.
10
10
  */
11
11
  closeLabel?: string;
12
+ /**
13
+ * BCP 47 locale for the React Aria strings HeroUI renders, e.g. `"fr-FR"`: the hidden "Dismiss"
14
+ * buttons of overlays, date and number formatting. Without it HeroUI uses `"en-US"`.
15
+ */
16
+ locale?: string;
12
17
  }
13
- export declare function HeroUIProvider({ children, closeLabel }: HeroUIProviderProps): import("react/jsx-runtime").JSX.Element;
18
+ export declare function HeroUIProvider({ children, closeLabel, locale }: HeroUIProviderProps): import("react/jsx-runtime").JSX.Element;
14
19
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@veevarts/design-system",
3
3
  "private": false,
4
- "version": "2.23.0",
4
+ "version": "2.25.0",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",