@qratilabs/qrati-connect 2.5.5 → 2.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/element/{DtFKft47.js → BWU1Eb1i.js} +1 -1
- package/element/{DuQAOcHp.js → CAt6yWea.js} +1 -1
- package/element/{DbhqPPiL.js → CvA0vfrf.js} +1 -1
- package/element/{C93INkHE.js → DiiWe_SG.js} +1 -1
- package/element/web.es.js +3 -3
- package/package.json +1 -1
- package/react/{Bxg_NMbJ.js → BAbwOJvT.js} +1 -1
- package/react/{DgTTvPGB.js → BexGhdGA.js} +2 -2
- package/react/{YOBwf9_O.js → Czw0BHMZ.js} +1 -1
- package/react/{BlZs1n_V.js → D3jlv133.js} +1 -1
- package/react/{D7ez44M5.js → D4BACpJw.js} +1 -1
- package/react/{B_oJkm7C.js → D6cMN4OJ.js} +1 -1
- package/react/{DhOWed_t.js → DGIVHiX4.js} +1 -1
- package/react/{C83Z_RKp.js → Sb4c6EUR.js} +1 -1
- package/react/index.cjs +1 -1
- package/react/index.mjs +3 -3
- package/umd/web.umd.js +1 -1
package/element/web.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e,t}from"./2R3GoXB1.js";import{A as r,At as n,B as a,C as o,D as i,Dt as s,E as l,Et as c,Ft as d,G as u,H as h,I as p,It as m,L as g,Lt as f,M as v,Mt as w,N as b,Nt as y,O as _,Rt as x,S as C,T as k,Tt as S,U as M,V as E,W as A,_ as L,a as N,b as I,d as P,f as T,g as R,h as F,j as O,jt as z,k as D,kt as U,l as B,m as j,n as W,p as q,q as H,t as V,u as G,v as Z,w as K,wt as Q,x as Y,y as J,zt as X}from"./wHbQZdly.js";import{a as $,c as ee,i as te,n as re,o as ne,s as ae,t as oe}from"./
|
|
1
|
+
import{r as e,t}from"./2R3GoXB1.js";import{A as r,At as n,B as a,C as o,D as i,Dt as s,E as l,Et as c,Ft as d,G as u,H as h,I as p,It as m,L as g,Lt as f,M as v,Mt as w,N as b,Nt as y,O as _,Rt as x,S as C,T as k,Tt as S,U as M,V as E,W as A,_ as L,a as N,b as I,d as P,f as T,g as R,h as F,j as O,jt as z,k as D,kt as U,l as B,m as j,n as W,p as q,q as H,t as V,u as G,v as Z,w as K,wt as Q,x as Y,y as J,zt as X}from"./wHbQZdly.js";import{a as $,c as ee,i as te,n as re,o as ne,s as ae,t as oe}from"./DiiWe_SG.js";import{i as ie,n as se,r as le,t as ce}from"./CUOOhGTj.js";import{a as de,c as ue,d as he,f as pe,i as me,l as ge,m as fe,o as ve,p as we,s as be,t as ye,u as _e}from"./DPOkh0eJ.js";import{a as xe,c as Ce,d as ke,f as Se,i as Me,l as Ee,m as Ae,n as Le,o as Ne,p as Ie,r as Pe,s as Te,t as Re,u as Fe}from"./CAt6yWea.js";var Oe=class extends ee{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:ie()})}getOptimisticResult(e){return e.behavior=ie(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:r}=e,n=super.createResult(e,t),{isFetching:a,isRefetching:o,isError:i,isRefetchError:s}=n,l=r.fetchMeta?.fetchMore?.direction,c=i&&"forward"===l,d=a&&"forward"===l,u=i&&"backward"===l,h=a&&"backward"===l;return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:se(t,r.data),hasPreviousPage:le(t,r.data),isFetchNextPageError:c,isFetchingNextPage:d,isFetchPreviousPageError:u,isFetchingPreviousPage:h,isRefetchError:s&&!c&&!u,isRefetching:o&&!d&&!h}}},ze=({className:e,rounded:t=!1,...r})=>/* @__PURE__ */b("div",{className:V("bg-border animate-pulse",t?"rounded-full":"rounded",e),...r}),De=()=>/* @__PURE__ */b("div",{className:"text-muted-foreground text-center text-sm",children:["Powered by ",/* @__PURE__ */b("strong",{children:"Qrati"})]}),Ue=()=>{const e=pe(),t=we(),{initializing:r,organization:n,user:a}=re();return w(()=>{if(a){const r=e.state?.referrer;t(r||"/")}},[a]),r?/* @__PURE__ */b("div",{className:"mx-auto max-w-lg space-y-8 py-8",children:[
|
|
2
2
|
/* @__PURE__ */b(ze,{className:"h-8"}),
|
|
3
3
|
/* @__PURE__ */b(ze,{className:"h-8"}),
|
|
4
4
|
/* @__PURE__ */b(ze,{className:"h-8"}),
|
|
@@ -83,7 +83,7 @@ return b("div",{className:"mb-3 grid grid-cols-3 md:space-y-0 md:space-x-4",chil
|
|
|
83
83
|
/* @__PURE__ */b(Ki,{placeholder:"Search by keywords",value:p,className:"py-2",onChange:e=>m(e.target.value),onKeyUp:e=>{const t=e.key;"Enter"===t?c&&c(p.length>0?p:""):"Escape"===t&&(m(""),c&&c(""))}}),p?.length>0&&/* @__PURE__ */b("button",{className:"absolute inset-y-0 right-10 flex items-center",onClick:()=>{m(""),c&&c("")},children:/* @__PURE__ */b(Ie,{name:"material-symbols:close-rounded",className:"text-foreground w-5"})}),
|
|
84
84
|
/* @__PURE__ */b("button",{className:"absolute inset-y-0 right-3 flex items-center",onClick:()=>c&&c(p),children:/* @__PURE__ */b(Ie,{name:"material-symbols:search-rounded",className:"text-foreground w-5"})})]})}),h?.integrationSettings?.showFacialSearch&&/* @__PURE__ */b(Ls,{value:g,onChange:e=>{f(e),u?.(e?URL.createObjectURL(e):void 0)}})]}),
|
|
85
85
|
/* @__PURE__ */b("div",{className:"col-span-3 md:col-span-1"}),
|
|
86
|
-
/* @__PURE__ */b("div",{className:"col-span-3 mt-3 md:col-span-1 md:mt-0 lg:justify-self-end",children:/* @__PURE__ */b(Qi,{engagementStyle:e,sort:a,order:i,onSortChange:o,onSortOrderChange:l})})]})},Ts=e=>e?.meta?.currentPage<e?.meta?.totalPages?e.meta.currentPage+1:void 0,Rs=H(()=>import("./
|
|
86
|
+
/* @__PURE__ */b("div",{className:"col-span-3 mt-3 md:col-span-1 md:mt-0 lg:justify-self-end",children:/* @__PURE__ */b(Qi,{engagementStyle:e,sort:a,order:i,onSortChange:o,onSortOrderChange:l})})]})},Ts=e=>e?.meta?.currentPage<e?.meta?.totalPages?e.meta.currentPage+1:void 0,Rs=H(()=>import("./CvA0vfrf.js")),Fs=()=>{const e=fe().eventSlug,{loadingUser:t,organization:n}=re(),o=v(),[i,c]=s(""),[d,u]=s(void 0),[h,p]=s(L),[m,g]=s(Z),[f,y]=s("undefined"!=typeof window&&window.innerWidth<768?R.SINGLE:R.GRID),_=Q(null),{event:C,ads:M}=Be({eventSlug:e}),{loading:E,contentsWithAds:A,hasNextPage:N,fetchNextPage:F,isFetchingNextPage:O}=(({event:e,ads:t=[],sort:n=L,order:a=Z,keywords:o,face:i,limit:s=20,includeSummary:c=!1})=>{const{props:d,loadingUser:u,user:h}=re(),p=d?.organizationId,{isLoading:m,data:g,hasNextPage:f,fetchNextPage:v,isFetchingNextPage:w}=function(e){return ae(e,Oe,void 0)}({queryKey:[l.CONTENTS_BY_EVENT(e?._id??""),n,a,o,i],queryFn:async({pageParam:t=1})=>{try{return await $.get(B.GET_CONTENTS,{searchParams:{eventId:e?._id,page:t,keywords:o,faceImageUrl:i,sort:`${r[a].sortOrder}${T[n].sortField}`,limit:s,includeSummary:c},headers:{"x-org-id":p,Authorization:h?`Bearer ${h.token}`:void 0}}).json()}catch(l){throw new Error(l instanceof Error?l.message:String(l)||"Failed to fetch contents")}},enabled:!u&&!!e,initialPageParam:1,getPreviousPageParam:e=>(e=>e?.meta?.currentPage>1?e.meta.currentPage-1:void 0)(e),getNextPageParam:Ts}),b=S(()=>g?.pages?.flatMap(e=>e?.data??[])??[],[g]);return{contents:b,contentsWithAds:S(()=>((e=[],t=[],r)=>{if(!r||r<=0)return e;let n=0;const a=[];for(let o=0;o<(e?.length||0);o++)a.push(e[o]),t.length>0&&r>0&&(o+1)%r===0&&(a.push({...t[n],type:j.AD,adType:t[n].type}),n=(n+1)%t.length);return a})(b,t,e?.adPosition),[b,t,e?.adPosition]),loading:m,hasNextPage:f,fetchNextPage:v,isFetchingNextPage:w}})({event:C,ads:M,sort:h,order:m,keywords:i,face:d,includeSummary:n?.navigationSettings?.showAIDescription}),{incrementEventView:z}=Ee(),{start:D,initializing:U,running:W}=(({ref:e,onBottomReached:t,hasNextPage:r,fetchNextPage:n,isFetchingNextPage:a})=>{const o=Q(1),i=Q(null),l=Q(null),c=Q(null),[d,u]=s(!1),[h,p]=s(!1);w(()=>(d&&(l.current&&window.clearTimeout(l.current),l.current=window.setTimeout(()=>{i.current=window.requestAnimationFrame(m)},300)),()=>{i.current&&window.cancelAnimationFrame(i.current)}),[d,r,a,n,t]);const m=()=>{e.current&&(e.current.scrollTop+=o.current,r&&!a&&n&&e.current.scrollTop+e.current.clientHeight>=.5*e.current.scrollHeight&&n(),e.current.scrollTop+e.current.clientHeight>=e.current.scrollHeight?(u(!1),i.current&&window.cancelAnimationFrame(i.current),l.current=window.setTimeout(()=>{p(!0),t?.(),l.current=window.setTimeout(()=>{e.current&&(e.current.scrollTop=0),p(!1),u(!0)},1e3)},1e3)):i.current=window.requestAnimationFrame(m))},g=e=>{"+"===e.key&&(o.current=Math.min(o.current+1,10)),"-"===e.key&&(o.current=Math.max(o.current-1,1))},f=()=>{document.fullscreenElement||(null!==c.current?c.current.release().then(()=>(c.current=null,!0)).catch(e=>console.error(`Failed to release wake lock: ${e instanceof Error?e.message:String(e)}`)):console.error("No Wake Lock to release."),u(!1),p(!1),e.current&&(e.current.scrollTop=0),i.current&&window.cancelAnimationFrame(i.current),l.current&&window.clearTimeout(l.current),document.removeEventListener("keydown",g),document.removeEventListener("fullscreenchange",f))};return{start:()=>{if(e?.current?.requestFullscreen)e.current.requestFullscreen();else{const t=e.current;t?.webkitRequestFullscreen?t.webkitRequestFullscreen():t?.mozRequestFullScreen?t.mozRequestFullScreen():t?.msRequestFullscreen&&t.msRequestFullscreen()}(async()=>{try{"wakeLock"in navigator?(c.current=await navigator.wakeLock.request("screen"),document.addEventListener("visibilitychange",async()=>{null!==c.current&&"visible"===document.visibilityState&&(c.current=await navigator.wakeLock.request("screen"))})):console.error("Wake Lock API is not supported in this browser.")}catch(ud){console.error(`Failed to acquire wake lock: ${ud instanceof Error?ud.message:String(ud)}`)}})(),u(!0),document.addEventListener("keydown",g),document.addEventListener("fullscreenchange",f)},initializing:h,running:d}})({ref:_,hasNextPage:N,fetchNextPage:F,isFetchingNextPage:O,onBottomReached:()=>C?._id&&o.refetchQueries({queryKey:[l.CONTENTS_BY_EVENT(C._id)]})});w(()=>{C?.slug&&z(C.slug)},[C]);const q=S(()=>f===R.SINGLE,[f]),H=S(()=>/* @__PURE__ */b(Vi,{event:C,onAutoscrollClick:D}),[C?.galleryLayout,D]),G=Q(null),K=Q(null);return w(()=>(G.current&&G.current.disconnect(),G.current=new IntersectionObserver(e=>{e[0].isIntersecting&&N&&!O&&!E&&F()},{rootMargin:"200px"}),K.current&&G.current.observe(K.current),()=>{G.current&&G.current.disconnect()}),[N,O,E,F]),/* @__PURE__ */b("div",{className:"bg-background mx-auto min-h-[80vh] space-y-2",children:[
|
|
87
87
|
/* @__PURE__ */b("div",{className:"flex flex-row justify-end",children:H}),
|
|
88
88
|
/* @__PURE__ */b("div",{className:"pb-2",children:/* @__PURE__ */b(Ke,{})}),
|
|
89
89
|
/* @__PURE__ */b(Ps,{engagementStyle:C?.engagementStyle,disabled:t||E,mode:f,onModeChange:e=>y(e),sort:h,sortOrder:m,onSortChange:e=>p(e),onSortOrderChange:()=>g("asc"===m?"desc":"asc"),handleChange:c,face:d,onFaceImageChange:e=>u(e)}),d&&/* @__PURE__ */b("div",{className:"flex gap-4 py-2",children:[/* @__PURE__ */b("div",{className:"space-y-2",children:[/* @__PURE__ */b(Fe,{variant:"h4",children:"Searching using"}),/* @__PURE__ */b("img",{src:d,alt:"face",className:"h-32 rounded"})]}),/* @__PURE__ */b("div",{className:"flex flex-col justify-end gap-2",children:/* @__PURE__ */b(Se,{color:"error",icon:"material-symbols:close-rounded",onClick:()=>u(void 0),children:"Clear search"})})]}),t||E?/* @__PURE__ */b("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3",children:Array.from({length:8}).map((e,t)=>/* @__PURE__ */b(ze,{className:"h-72"},t))}):A?.length<=0?/* @__PURE__ */b("div",{className:"my-16 flex flex-col items-center gap-4",children:/* @__PURE__ */b(je,{title:"No Contents",description:"Check back soon for amazing contents.",iconSvg:/* @__PURE__ */b("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-full",width:"800",height:"469.317",viewBox:"0 0 800 469.317",role:"img",children:/* @__PURE__ */b("g",{transform:"translate(-443.142 -257.876)",children:[
|
|
@@ -258,7 +258,7 @@ return b("div",{className:"space-y-4",children:[e===p[0]&&/* @__PURE__ */b(Fe,{v
|
|
|
258
258
|
/* @__PURE__ */b("div",{className:"grid grid-cols-1 gap-4 gap-y-6 sm:grid-cols-2 lg:grid-cols-3",children:r.map(e=>/* @__PURE__ */b(C,{event:e},e._id))})]},`event-folder-${e}`)}):p.map(e=>{const r=_(e),n=f[e]||[],a=n.reduce((e,t)=>e+(t.contents?.length||0),0);/* @__PURE__ */
|
|
259
259
|
return b("div",{className:"space-y-4",children:[e===p[0]&&t&&/* @__PURE__ */b("div",{className:"mb-8 flex items-center gap-2",children:[/* @__PURE__ */b(Fe,{variant:"body1",className:"bg-primary/20 text-primary rounded px-2 py-1",children:t}),/* @__PURE__ */b("button",{type:"button","aria-label":"Clear search",className:"text-muted hover:text-primary",onClick:c,children:"×"})]}),e===p[0]&&/* @__PURE__ */b(Fe,{variant:"h3",className:"mb-4",children:["Contents (",h?.totalContentCount||u.length,") by Event (",h?.totalEventCount||g.length,")"]}),
|
|
260
260
|
/* @__PURE__ */b("div",{className:"flex items-center justify-between gap-3",children:[/* @__PURE__ */b("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */b("span",{className:"inline-block size-2 rounded-full",style:{backgroundColor:r.color||"#9ca3af"}}),/* @__PURE__ */b(Fe,{variant:"h5",className:"text-sm sm:text-base",children:r.pathLabel})]}),/* @__PURE__ */b(Fe,{variant:"body2",color:"muted",children:[a," media"]})]}),
|
|
261
|
-
/* @__PURE__ */b("div",{className:"space-y-6",children:n.map(e=>/* @__PURE__ */b("div",{className:"space-y-3",children:[/* @__PURE__ */b(C,{event:e.event}),/* @__PURE__ */b("div",{className:"grid grid-cols-3 gap-2",children:e.contents.slice(0,6).map(t=>/* @__PURE__ */b("button",{type:"button",className:"block overflow-hidden rounded",onClick:()=>y(e.event._id,t._id),children:/* @__PURE__ */b("img",{src:t.thumbnailUrl||t.url,alt:"Content preview",className:"w-full object-cover"})},t._id))})]},`content-event-${e.event._id}`))})]},`content-folder-${e}`)})),i&&o&&!a&&/* @__PURE__ */b("div",{className:"flex justify-center pt-2",children:/* @__PURE__ */b("button",{type:"button",disabled:n,className:"bg-primary text-primary-foreground disabled:bg-muted rounded px-4 py-2 text-sm font-medium disabled:cursor-not-allowed",onClick:l,children:n?"Loading...":"Load more"})})]})},pc=H(()=>import("./
|
|
261
|
+
/* @__PURE__ */b("div",{className:"space-y-6",children:n.map(e=>/* @__PURE__ */b("div",{className:"space-y-3",children:[/* @__PURE__ */b(C,{event:e.event}),/* @__PURE__ */b("div",{className:"grid grid-cols-3 gap-2",children:e.contents.slice(0,6).map(t=>/* @__PURE__ */b("button",{type:"button",className:"block overflow-hidden rounded",onClick:()=>y(e.event._id,t._id),children:/* @__PURE__ */b("img",{src:t.thumbnailUrl||t.url,alt:"Content preview",className:"w-full object-cover"})},t._id))})]},`content-event-${e.event._id}`))})]},`content-folder-${e}`)})),i&&o&&!a&&/* @__PURE__ */b("div",{className:"flex justify-center pt-2",children:/* @__PURE__ */b("button",{type:"button",disabled:n,className:"bg-primary text-primary-foreground disabled:bg-muted rounded px-4 py-2 text-sm font-medium disabled:cursor-not-allowed",onClick:l,children:n?"Loading...":"Load more"})})]})},pc=H(()=>import("./BWU1Eb1i.js")),mc={grid:{icon:/* @__PURE__ */b("svg",{xmlns:"http://www.w3.org/2000/svg",className:"size-full text-inherit",width:24,height:24,viewBox:"0 0 24 24",children:/* @__PURE__ */b("path",{fill:"currentColor",d:"M5 11q-.825 0-1.412-.587T3 9V5q0-.825.588-1.412T5 3h4q.825 0 1.413.588T11 5v4q0 .825-.587 1.413T9 11zm0 10q-.825 0-1.412-.587T3 19v-4q0-.825.588-1.412T5 13h4q.825 0 1.413.588T11 15v4q0 .825-.587 1.413T9 21zm10-10q-.825 0-1.412-.587T13 9V5q0-.825.588-1.412T15 3h4q.825 0 1.413.588T21 5v4q0 .825-.587 1.413T19 11zm0 10q-.825 0-1.412-.587T13 19v-4q0-.825.588-1.412T15 13h4q.825 0 1.413.588T21 15v4q0 .825-.587 1.413T19 21zM5 9h4V5H5zm10 0h4V5h-4zm0 10h4v-4h-4zM5 19h4v-4H5zM9 9"})})},map:{icon:/* @__PURE__ */b("svg",{xmlns:"http://www.w3.org/2000/svg",className:"size-full text-inherit",width:24,height:24,viewBox:"0 0 24 24",children:/* @__PURE__ */b("path",{fill:"currentColor",d:"M14.35 20.775L9 18.9l-4.65 1.8q-.25.1-.488.063t-.437-.163t-.312-.337T3 19.775V5.75q0-.325.188-.575T3.7 4.8l4.65-1.575q.15-.05.313-.075T9 3.125t.338.025t.312.075L15 5.1l4.65-1.8q.25-.1.488-.062t.437.162t.313.338t.112.487V18.25q0 .325-.187.575t-.513.375l-4.65 1.575q-.15.05-.312.075t-.338.025t-.337-.025t-.313-.075M14 18.55V6.85l-4-1.4v11.7zm2 0l3-1V5.7l-3 1.15zM5 18.3l3-1.15V5.45l-3 1zM16 6.85v11.7zm-8-1.4v11.7z"})})}},gc=Object.keys(mc).map(e=>({icon:mc[e].icon,value:e})),fc=()=>{const e=fe().folderId??"",t=re(),{folders:r,organization:n}=t,o=t.props?.organizationId,i=!1!==n?.integrationSettings?.enableGlobalSearch,l=((e,t)=>{const[r,n]=s(""),[a,o]=s("event"),[i,l]=s(1),[c,d]=s(!1),[u,h]=s(""),[p,m]=s(!1),[g,f]=s([]),[v,b]=s([]),[y,_]=s(null),x=Q(0),C=Q(null),k=S(()=>`org-inline-search-gallery-${e||"default"}`,[e]);w(()=>{if(!e||!r)return;const t=++x.current;(async()=>{d(!0),h("");try{const n="event"===a?B.SEARCH_EVENTS:B.SEARCH_CONTENTS,o=await $.get(n,{headers:{"x-org-id":e},searchParams:{query:r,page:String(i),limit:"event"===a?"12":"8"}}).json();if(t!==x.current)return;const s=o?.data||[],l=o?.meta?.totalPages||0;m((o?.meta?.currentPage||0)<l),"event"===a?f(e=>1===i?s:[...e,...s]):(_({totalContentCount:o?.meta?.totalContentCount,totalEventCount:o?.meta?.totalEventCount}),b(e=>1===i?s:[...e,...s]))}catch(n){if(t!==x.current)return;h(n?.message||"Failed to search")}finally{t===x.current&&d(!1)}})()},[e,i,r,a]);const M=S(()=>{const e={};return g.forEach(t=>{const r=t.folderId||"root";e[r]||(e[r]=[]),e[r].push(t)}),Object.values(e).forEach(e=>{e.sort((e,t)=>(e.name||"").localeCompare(t.name||"",void 0,{sensitivity:"base"}))}),e},[g]),E=S(()=>{const e=/* @__PURE__ */new Map,t=/* @__PURE__ */new Set;return v.forEach(r=>{if(!r?._id||t.has(r._id))return;t.add(r._id);const n=r.event?._id||r.eventId;n&&r.event&&(e.has(n)||e.set(n,{event:r.event,contents:[]}),e.get(n)?.contents.push({_id:r._id,thumbnailUrl:r.thumbnailUrl,url:r.url,caption:r.event?.name,type:"image"}))}),Array.from(e.values()).sort((e,t)=>(e.event?.name||"").localeCompare(t.event?.name||"",void 0,{sensitivity:"base"}))},[v]),A=S(()=>{const e={};return E.forEach(t=>{const r=t.event?.folderId||"root";e[r]||(e[r]=[]),e[r].push(t)}),e},[E]),L=S(()=>{const e=Object.keys("event"===a?M:A);return e.sort((e,r)=>{if("root"===e)return-1;if("root"===r)return 1;const n=oc(t,e).map(e=>e.name).join("/"),a=oc(t,r).map(e=>e.name).join("/");return n.localeCompare(a)}),e},[A,M,t,a]),N=S(()=>{if("content"!==a)return[];const e=[];return L.forEach(t=>{(A[t]||[]).forEach(t=>{t.contents.forEach(r=>{e.push({event:t.event,content:r})})})}),e},[L,A,a]);return w(()=>{if("content"!==a||!r||0===N.length)return C.current?.destroy?.(),void(C.current=null);const e=new Re({gallery:`#${k}`,children:"a.pswp-item",counter:!1,bgOpacity:1,wheelToZoom:!0,pinchToClose:!0,zoom:!1,pswpModule:()=>import("./B_TauT26.js")});return C.current=e,e.init(),()=>{C.current?.destroy?.(),C.current=null}},[N.length,k,r,a]),{handleSearch:(e,t)=>{l(1),h(""),m(!1),f([]),b([]),_(null),o(t),n(e)},clearSearch:()=>{n(""),h(""),m(!1),l(1),f([]),b([]),_(null)},isSearchActive:r.length>0,submittedQuery:r,submittedSearchType:a,isLoading:c,errorMessage:u,hasMore:p,page:i,setPage:l,eventResults:g,contentResults:v,contentMeta:y,activeFolderKeys:L,eventGroupsByFolder:M,contentGroups:E,contentGroupsByFolder:A,flattenedContentMedia:N,lightboxRef:C,galleryId:k,openMediaInLightbox:(e,t)=>{if(!C.current?.loadAndOpen)return;const r=N.findIndex(r=>r.event._id===e&&r.content._id===t);r>=0&&C.current.loadAndOpen(r)}}})(o,r||[]),c=!0===n?.integrationSettings?.enableMapView,[d,u]=s(()=>{try{return sessionStorage.getItem("qrati-view-mode")||"grid"}catch{return"grid"}}),{data:h,isLoading:p}=ne({queryKey:[`public-events-map-${o}`],enabled:c&&"map"===d,staleTime:3e5,queryFn:async()=>(await $.get(B.PUBLIC_EVENTS,{headers:{"x-org-id":o},searchParams:{limit:500,sort:"-views"}}).json()).data}),m=S(()=>{if("undefined"==typeof window)return null;if(window.history.state?.internalNavigation)return null;try{const e=new URLSearchParams(window.location?.search??"");let t=e.get("event"),r=e.get("page");if(!t&&!r&&window.location?.hash){const e=window.location.hash.split("?");if(e.length>1){const n=new URLSearchParams(e[1]);t=n.get("event"),r=n.get("page")}}if(t){if(r)switch(r.toLowerCase()){case"upload":return k.UPLOAD(t);case"curate":return k.CURATE(t);case"leaderboard":return k.LEADERBOARD(t);default:return k.GALLERY(t)}return k.GALLERY(t)}}catch(ud){console.error("Error parsing URL parameters:",ud)}return null},[]),g=(r??[]).filter(t=>t.parentFolderId===(e?.length>0?e:null)||t.parentFolderId===(e?.length>0?e:void 0)),{isLoading:f,data:v}=ne({queryKey:[`public-events-${o}`,e],queryFn:async()=>(await $.get(B.PUBLIC_EVENTS,{headers:{"x-org-id":o},searchParams:{folderId:e,sort:"-createdAt"}}).json()).data});return m?/* @__PURE__ */b(ue,{to:m,replace:!0}):/* @__PURE__ */b(x,f||!n?{children:[n?.navigationSettings?.enableNavbar&&/* @__PURE__ */b(We,{}),/* @__PURE__ */b("div",{className:"min-h-screen w-full",children:[
|
|
262
262
|
/* @__PURE__ */b(dc,{organization:n}),
|
|
263
263
|
/* @__PURE__ */b("div",{className:"mt-4 grid grid-cols-2 gap-3 md:grid-cols-3 lg:grid-cols-4 lg:gap-6",children:Array.from({length:4}).map((e,t)=>/* @__PURE__ */b(ze,{className:"h-24 rounded"},`folder-${t}`))}),
|
|
264
264
|
/* @__PURE__ */b("div",{className:"mt-4 grid grid-cols-1 gap-4 sm:grid-cols-3",children:Array.from({length:6}).map((e,t)=>/* @__PURE__ */b("div",{className:"space-y-4",children:[/* @__PURE__ */b(ze,{className:"h-72 overflow-hidden rounded sm:h-80"}),/* @__PURE__ */b(ze,{className:"h-6 w-64 rounded"})]},t))})]})]}:{children:[n?.navigationSettings?.enableNavbar&&/* @__PURE__ */b(We,{}),
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const t=require("./D4geS7mP.js"),e=require("./DV6DJ1Br.js"),o=require("./BlZs1n_V.js"),r=require("./BhU5cdLs.js");let n=require("react");n=t.__toESM(n);var i=Object.freeze({left:0,top:0,width:16,height:16}),a=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),s=Object.freeze({...i,...a}),c=Object.freeze({...s,body:"",hidden:!1});function l(t,e){const o=function(t,e){const o={};!t.hFlip!=!e.hFlip&&(o.hFlip=!0),!t.vFlip!=!e.vFlip&&(o.vFlip=!0);const r=((t.rotate||0)+(e.rotate||0))%4;return r&&(o.rotate=r),o}(t,e);for(const r in c)r in a?r in t&&!(r in o)&&(o[r]=a[r]):r in e?o[r]=e[r]:r in t&&(o[r]=t[r]);return o}function f(t,e,o){const r=t.icons,n=t.aliases||Object.create(null);let i={};function a(t){i=l(r[t]||n[t],i)}return a(e),o.forEach(a),l(t,i)}function d(t,e){const o=[];if("object"!=typeof t||"object"!=typeof t.icons)return o;t.not_found instanceof Array&&t.not_found.forEach(t=>{e(t,null),o.push(t)});const r=function(t){const e=t.icons,o=t.aliases||Object.create(null),r=Object.create(null);return Object.keys(e).concat(Object.keys(o)).forEach(function t(n){if(e[n])return r[n]=[];if(!(n in r)){r[n]=null;const e=o[n]&&o[n].parent,i=e&&t(e);i&&(r[n]=[e].concat(i))}return r[n]}),r}(t);for(const n in r){const i=r[n];i&&(e(n,f(t,n,i)),o.push(n))}return o}var u={provider:"",aliases:{},not_found:{},...i};function p(t,e){for(const o in e)if(o in t&&typeof t[o]!=typeof e[o])return!1;return!0}function g(t){if("object"!=typeof t||null===t)return null;const e=t;if("string"!=typeof e.prefix||!t.icons||"object"!=typeof t.icons)return null;if(!p(t,u))return null;const o=e.icons;for(const n in o){const t=o[n];if(!n||"string"!=typeof t.body||!p(t,c))return null}const r=e.aliases||Object.create(null);for(const n in r){const t=r[n],e=t.parent;if(!n||"string"!=typeof e||!o[e]&&!r[e]||!p(t,c))return null}return e}var m=Object.create(null);function y(t,e){const o=m[t]||(m[t]=Object.create(null));return o[e]||(o[e]=function(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}(t,e))}function h(t,e){return g(e)?d(e,(e,o)=>{o?t.icons[e]=o:t.missing.add(e)}):[]}var b=/^[a-z0-9]+(-[a-z0-9]+)*$/,v=(t,e,o,r="")=>{const n=t.split(":");if("@"===t.slice(0,1)){if(n.length<2||n.length>3)return null;r=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const t=n.pop(),o=n.pop(),i={provider:n.length>0?n[0]:r,prefix:o,name:t};return e&&!_(i)?null:i}const i=n[0],a=i.split("-");if(a.length>1){const t={provider:r,prefix:a.shift(),name:a.join("-")};return e&&!_(t)?null:t}if(o&&""===r){const t={provider:r,prefix:"",name:i};return e&&!_(t,o)?null:t}return null},_=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name),x=!1;function T(t){return"boolean"==typeof t&&(x=t),x}function w(t){const e="string"==typeof t?v(t,!0,x):t;if(e){const t=y(e.provider,e.prefix),o=e.name;return t.icons[o]||(t.missing.has(o)?null:void 0)}}var k=Object.freeze({width:null,height:null}),E=Object.freeze({...k,...a}),O=/(-?[0-9.]*[0-9]+[0-9.]*)/g,I=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function j(t,e,o){if(1===e)return t;if(o=o||100,"number"==typeof t)return Math.ceil(t*e*o)/o;if("string"!=typeof t)return t;const r=t.split(O);if(null===r||!r.length)return t;const n=[];let i=r.shift(),a=I.test(i);for(;;){if(a){const t=parseFloat(i);isNaN(t)?n.push(i):n.push(Math.ceil(t*e*o)/o)}else n.push(i);if(i=r.shift(),void 0===i)return n.join("");a=!a}}var S=/\sid="(\S+)"/g,A="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),P=0;function z(t,e=A){const o=[];let r;for(;r=S.exec(t);)o.push(r[1]);if(!o.length)return t;const n="suffix"+(16777216*Math.random()|Date.now()).toString(16);return o.forEach(o=>{const r="function"==typeof e?e(o):e+(P++).toString(),i=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+i+')([")]|\\.[a-z])',"g"),"$1"+r+n+"$3")}),t=t.replace(new RegExp(n,"g"),"")}var C=Object.create(null);function N(t){return C[t]||C[""]}function L(t){let e;if("string"==typeof t.resources)e=[t.resources];else if(e=t.resources,!(e instanceof Array&&e.length))return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:!0===t.random,index:t.index||0,dataAfterTimeout:!1!==t.dataAfterTimeout}}for(var F=Object.create(null),D=["https://api.simplesvg.com","https://api.unisvg.com"],R=[];D.length>0;)1===D.length||Math.random()>.5?R.push(D.shift()):R.push(D.pop());function M(t,e){const o=L(e);return null!==o&&(F[t]=o,!0)}function $(t){return F[t]}F[""]=L({resources:["https://api.iconify.design"].concat(R)});var U=(()=>{let t;try{if(t=fetch,"function"==typeof t)return t}catch(e){}})(),V={prepare:(t,e,o)=>{const r=[],n=function(t,e){const o=$(t);if(!o)return 0;let r;if(o.maxURL){let t=0;o.resources.forEach(e=>{t=Math.max(t,e.length)});const n=e+".json?icons=";r=o.maxURL-t-o.path.length-n.length}else r=0;return r}(t,e),i="icons";let a={type:i,provider:t,prefix:e,icons:[]},s=0;return o.forEach((o,c)=>{s+=o.length+1,s>=n&&c>0&&(r.push(a),a={type:i,provider:t,prefix:e,icons:[]},s=o.length),a.icons.push(o)}),r.push(a),r},send:(t,e,o)=>{if(!U)return void o("abort",424);let r=function(t){if("string"==typeof t){const e=$(t);if(e)return e.path}return"/"}(e.provider);switch(e.type){case"icons":{const t=e.prefix,o=e.icons.join(",");r+=t+".json?"+new URLSearchParams({icons:o}).toString();break}case"custom":{const t=e.uri;r+="/"===t.slice(0,1)?t.slice(1):t;break}default:return void o("abort",400)}let n=503;U(t+r).then(t=>{const e=t.status;if(200===e)return n=501,t.json();setTimeout(()=>{o(function(t){return 404===t}(e)?"abort":"next",e)})}).then(t=>{"object"==typeof t&&null!==t?setTimeout(()=>{o("success",t)}):setTimeout(()=>{404===t?o("abort",t):o("next",n)})}).catch(()=>{o("next",n)})}};function Y(t,e){t.forEach(t=>{const o=t.loaderCallbacks;o&&(t.loaderCallbacks=o.filter(t=>t.id!==e))})}var q=0,B={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function X(t){const e={...B,...t};let o=[];function r(){o=o.filter(t=>"pending"===t().status)}return{query:function(t,n,i){const a=function(t,e,o,r){const n=t.resources.length,i=t.random?Math.floor(Math.random()*n):t.index;let a;if(t.random){let e=t.resources.slice(0);for(a=[];e.length>1;){const t=Math.floor(Math.random()*e.length);a.push(e[t]),e=e.slice(0,t).concat(e.slice(t+1))}a=a.concat(e)}else a=t.resources.slice(i).concat(t.resources.slice(0,i));const s=Date.now();let c,l="pending",f=0,d=null,u=[],p=[];function g(){d&&(clearTimeout(d),d=null)}function m(){"pending"===l&&(l="aborted"),g(),u.forEach(t=>{"pending"===t.status&&(t.status="aborted")}),u=[]}function y(t,e){e&&(p=[]),"function"==typeof t&&p.push(t)}function h(){l="failed",p.forEach(t=>{t(void 0,c)})}function b(){u.forEach(t=>{"pending"===t.status&&(t.status="aborted")}),u=[]}return"function"==typeof r&&p.push(r),setTimeout(function r(){if("pending"!==l)return;g();const n=a.shift();if(void 0===n)return u.length?void(d=setTimeout(()=>{g(),"pending"===l&&(b(),h())},t.timeout)):void h();const i={status:"pending",resource:n,callback:(e,o)=>{!function(e,o,n){const i="success"!==o;switch(u=u.filter(t=>t!==e),l){case"pending":break;case"failed":if(i||!t.dataAfterTimeout)return;break;default:return}if("abort"===o)return c=n,void h();if(i)return c=n,void(u.length||(a.length?r():h()));if(g(),b(),!t.random){const o=t.resources.indexOf(e.resource);-1!==o&&o!==t.index&&(t.index=o)}l="completed",p.forEach(t=>{t(n)})}(i,e,o)}};u.push(i),f++,d=setTimeout(r,t.rotate),o(n,e,i.callback)}),function(){return{startTime:s,payload:e,status:l,queriesSent:f,queriesPending:u.length,subscribe:y,abort:m}}}(e,t,n,(t,e)=>{r(),i&&i(t,e)});return o.push(a),a},find:function(t){return o.find(e=>t(e))||null},setIndex:t=>{e.index=t},getIndex:()=>e.index,cleanup:r}}function G(){}var H=Object.create(null);function Q(){}function W(t,e,o){function r(){const o=t.pendingIcons;e.forEach(e=>{o&&o.delete(e),t.icons[e]||t.missing.add(e)})}if(o&&"object"==typeof o)try{if(!h(t,o).length)return void r()}catch(n){console.error(n)}r(),function(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,function(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let o=!1;const r=t.provider,n=t.prefix;e.forEach(e=>{const i=e.icons,a=i.pending.length;i.pending=i.pending.filter(e=>{if(e.prefix!==n)return!0;const a=e.name;if(t.icons[a])i.loaded.push({provider:r,prefix:n,name:a});else{if(!t.missing.has(a))return o=!0,!0;i.missing.push({provider:r,prefix:n,name:a})}return!1}),i.pending.length!==a&&(o||Y([t],e.id),e.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),e.abort))})}))}(t)}))}(t)}function K(t,e){t instanceof Promise?t.then(t=>{e(t)}).catch(()=>{e(null)}):e(t)}function J(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:e,prefix:o}=t,r=t.iconsToLoad;if(delete t.iconsToLoad,!r||!r.length)return;const n=t.loadIcon;if(t.loadIcons&&(r.length>1||!n))return void K(t.loadIcons(r,o,e),e=>{W(t,r,e)});if(n)return void r.forEach(r=>{K(n(r,o,e),e=>{W(t,[r],e?{prefix:o,icons:{[r]:e}}:null)})});const{valid:i,invalid:a}=function(t){const e=[],o=[];return t.forEach(t=>{(t.match(b)?e:o).push(t)}),{valid:e,invalid:o}}(r);if(a.length&&W(t,a,null),!i.length)return;const s=o.match(b)?N(e):null;s?s.prepare(e,o,i).forEach(o=>{!function(t,e,o){let r,n;if("string"==typeof t){const e=N(t);if(!e)return o(void 0,424),G;n=e.send;const i=function(t){if(!H[t]){const e=$(t);if(!e)return;H[t]={config:e,redundancy:X(e)}}return H[t]}(t);i&&(r=i.redundancy)}else{const e=L(t);if(e){r=X(e);const o=N(t.resources?t.resources[0]:"");o&&(n=o.send)}}r&&n?r.query(e,n,o)().abort:o(void 0,424)}(e,o,e=>{W(t,o.icons,e)})}):W(t,i,null)}))}var Z,tt=(t,e)=>{const o=function(t){const e={loaded:[],missing:[],pending:[]},o=Object.create(null);t.sort((t,e)=>t.provider!==e.provider?t.provider.localeCompare(e.provider):t.prefix!==e.prefix?t.prefix.localeCompare(e.prefix):t.name.localeCompare(e.name));let r={provider:"",prefix:"",name:""};return t.forEach(t=>{if(r.name===t.name&&r.prefix===t.prefix&&r.provider===t.provider)return;r=t;const n=t.provider,i=t.prefix,a=t.name,s=o[n]||(o[n]=Object.create(null)),c=s[i]||(s[i]=y(n,i));let l;l=a in c.icons?e.loaded:""===i||c.missing.has(a)?e.missing:e.pending;const f={provider:n,prefix:i,name:a};l.push(f)}),e}(function(t,e=!0,o=!1){const r=[];return t.forEach(t=>{const n="string"==typeof t?v(t,e,o):t;n&&r.push(n)}),r}(t,!0,T()));if(!o.pending.length){let t=!0;return e&&setTimeout(()=>{t&&e(o.loaded,o.missing,o.pending,Q)}),()=>{t=!1}}const r=Object.create(null),n=[];let i,a;return o.pending.forEach(t=>{const{provider:e,prefix:o}=t;if(o===a&&e===i)return;i=e,a=o,n.push(y(e,o));const s=r[e]||(r[e]=Object.create(null));s[o]||(s[o]=[])}),o.pending.forEach(t=>{const{provider:e,prefix:o,name:n}=t,i=y(e,o),a=i.pendingIcons||(i.pendingIcons=new Set);a.has(n)||(a.add(n),r[e][o].push(n))}),n.forEach(t=>{const e=r[t.provider][t.prefix];e.length&&J(t,e)}),e?function(t,e,o){const r=q++,n=Y.bind(null,o,r);if(!e.pending.length)return n;const i={id:r,icons:e,callback:t,abort:n};return o.forEach(t=>{(t.loaderCallbacks||(t.loaderCallbacks=[])).push(i)}),n}(e,o,n):Q},et=/[\s,]+/;function ot(t,e){e.split(et).forEach(e=>{switch(e.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0}})}function rt(t,e=0){const o=t.replace(/^-?[0-9.]*/,"");function r(t){for(;t<0;)t+=4;return t%4}if(""===o){const e=parseInt(t);return isNaN(e)?0:r(e)}if(o!==t){let e=0;switch(o){case"%":e=25;break;case"deg":e=90}if(e){let n=parseFloat(t.slice(0,t.length-o.length));return isNaN(n)?0:(n/=e,n%1==0?r(n):0)}}return e}function nt(t){return void 0===Z&&function(){try{Z=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch(t){Z=null}}(),Z?Z.createHTML(t):t}var it={...E,inline:!1},at={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},st={display:"inline-block"},ct={backgroundColor:"currentColor"},lt={backgroundColor:"transparent"},ft={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},dt={WebkitMask:ct,mask:ct,background:lt};for(const ne in dt){const t=dt[ne];for(const e in ft)t[ne+e]=ft[e]}var ut={...it,inline:!0};function pt(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}var gt;if(T(!0),gt=V,C[""]=gt,"undefined"!=typeof document&&"undefined"!=typeof window){const t=window;if(void 0!==t.IconifyPreload){const e=t.IconifyPreload,o="Invalid IconifyPreload syntax.";"object"==typeof e&&null!==e&&(e instanceof Array?e:[e]).forEach(t=>{try{("object"!=typeof t||null===t||t instanceof Array||"object"!=typeof t.icons||"string"!=typeof t.prefix||!function(t,e){if("object"!=typeof t)return!1;if("string"!=typeof e&&(e=t.provider||""),x&&!e&&!t.prefix){let e=!1;return g(t)&&(t.prefix="",d(t,(t,r)=>{(function(t,e){const r=v(t,!0,x);if(!r)return!1;const n=y(r.provider,r.prefix);return e?function(t,e,r){try{if("string"==typeof r.body)return t.icons[e]={...r},!0}catch(o){}return!1}(n,r.name,e):(n.missing.add(r.name),!0)})(t,r)&&(e=!0)})),e}const r=t.prefix;return!!_({prefix:r,name:"a"})&&!!h(y(e,r),t)}(t))&&console.error(o)}catch(e){console.error(o)}})}if(void 0!==t.IconifyProviders){const e=t.IconifyProviders;if("object"==typeof e&&null!==e)for(let t in e){const o="IconifyProviders["+t+"] is invalid.";try{const r=e[t];if("object"!=typeof r||!r||void 0===r.resources)continue;M(t,r)||console.error(o)}catch(re){console.error(o)}}}}function mt(t){const[e,o]=(0,n.useState)(!!t.ssr),[r,i]=(0,n.useState)({}),[a,c]=(0,n.useState)(function(e){if(e){const e=t.icon;if("object"==typeof e)return{name:"",data:e};const o=w(e);if(o)return{name:e,data:o}}return{name:""}}(!!t.ssr));function l(){const t=r.callback;t&&(t(),i({}))}function f(t){if(JSON.stringify(a)!==JSON.stringify(t))return l(),c(t),!0}function d(){var e;const o=t.icon;if("object"==typeof o)return void f({name:"",data:o});const r=w(o);f({name:o,data:r})&&(void 0===r?i({callback:tt([o],d)}):r&&(null===(e=t.onLoad)||void 0===e||e.call(t,o)))}(0,n.useEffect)(()=>(o(!0),l),[]),(0,n.useEffect)(()=>{e&&d()},[t.icon,e]);const{name:u,data:p}=a;return p?((t,e,o)=>{const r=e.inline?ut:it,i=function(t,e){const o={...t};for(const r in e){const t=e[r],n=typeof t;r in k?(null===t||t&&("string"===n||"number"===n))&&(o[r]=t):n===typeof o[r]&&(o[r]="rotate"===r?t%4:t)}return o}(r,e),a=e.mode||"svg",c={},l=e.style||{},f={..."svg"===a?at:{}};if(o){const t=v(o,!1,!0);if(t){const e=["iconify"];for(const o of["provider","prefix"])t[o]&&e.push("iconify--"+t[o]);f.className=e.join(" ")}}for(let n in e){const t=e[n];if(void 0!==t)switch(n){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":f.ref=t;break;case"className":f[n]=(f[n]?f[n]+" ":"")+t;break;case"inline":case"hFlip":case"vFlip":i[n]=!0===t||"true"===t||1===t;break;case"flip":"string"==typeof t&&ot(i,t);break;case"color":c.color=t;break;case"rotate":"string"==typeof t?i[n]=rt(t):"number"==typeof t&&(i[n]=t);break;case"ariaHidden":case"aria-hidden":!0!==t&&"true"!==t&&delete f["aria-hidden"];break;default:void 0===r[n]&&(f[n]=t)}}const d=function(t,e){const o={...s,...t},r={...E,...e},n={left:o.left,top:o.top,width:o.width,height:o.height};let i=o.body;[o,r].forEach(t=>{const e=[],o=t.hFlip,r=t.vFlip;let a,s=t.rotate;switch(o?r?s+=2:(e.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),e.push("scale(-1 1)"),n.top=n.left=0):r&&(e.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),e.push("scale(1 -1)"),n.top=n.left=0),s<0&&(s-=4*Math.floor(s/4)),s%=4,s){case 1:a=n.height/2+n.top,e.unshift("rotate(90 "+a.toString()+" "+a.toString()+")");break;case 2:e.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:a=n.width/2+n.left,e.unshift("rotate(-90 "+a.toString()+" "+a.toString()+")")}s%2==1&&(n.left!==n.top&&(a=n.left,n.left=n.top,n.top=a),n.width!==n.height&&(a=n.width,n.width=n.height,n.height=a)),e.length&&(i=function(t,e){const o=function(t,e="defs"){let o="";const r=t.indexOf("<"+e);for(;r>=0;){const n=t.indexOf(">",r),i=t.indexOf("</"+e);if(-1===n||-1===i)break;const a=t.indexOf(">",i);if(-1===a)break;o+=t.slice(n+1,i).trim(),t=t.slice(0,r).trim()+t.slice(a+1)}return{defs:o,content:t}}(t);return r=o.defs,n=e+o.content+"</g>",r?"<defs>"+r+"</defs>"+n:n;var r,n}(i,'<g transform="'+e.join(" ")+'">'))});const a=r.width,c=r.height,l=n.width,f=n.height;let d,u;null===a?(u=null===c?"1em":"auto"===c?f:c,d=j(u,l/f)):(d="auto"===a?l:a,u=null===c?j(d,f/l):"auto"===c?f:c);const p={},g=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(p[t]=e.toString())};g("width",d),g("height",u);const m=[n.left,n.top,l,f];return p.viewBox=m.join(" "),{attributes:p,viewBox:m,body:i}}(t,i),u=d.attributes;if(i.inline&&(c.verticalAlign="-0.125em"),"svg"===a){f.style={...c,...l},Object.assign(f,u);let t=0,o=e.id;return"string"==typeof o&&(o=o.replace(/-/g,"_")),f.dangerouslySetInnerHTML={__html:nt(z(d.body,o?()=>o+"ID"+t++:"iconifyReact"))},(0,n.createElement)("svg",f)}const{body:p,width:g,height:m}=t,y="mask"===a||"bg"!==a&&-1!==p.indexOf("currentColor"),h=function(t,e){let o=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in e)o+=" "+r+'="'+e[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+o+">"+t+"</svg>"}(p,{...u,width:g+"",height:m+""});var b;return f.style={...c,"--svg":(b=h,'url("'+function(t){return"data:image/svg+xml,"+function(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}(t)}(b)+'")'),width:pt(u.width),height:pt(u.height),...st,...y?ct:lt,...l},(0,n.createElement)("span",f)})({...s,...p},t,u):t.children?t.children:t.fallback?t.fallback:(0,n.createElement)("span",{})}var yt=(0,n.forwardRef)((t,e)=>mt({...t,_ref:e})),ht=((0,n.forwardRef)((t,e)=>mt({inline:!0,...t,_ref:e})),t=>"boolean"==typeof t?`${t}`:0===t?"0":t),bt=e.clsx,vt=(t,e)=>o=>{var r;if(null==(null==e?void 0:e.variants))return bt(t,null==o?void 0:o.class,null==o?void 0:o.className);const{variants:n,defaultVariants:i}=e,a=Object.keys(n).map(t=>{const e=null==o?void 0:o[t],r=null==i?void 0:i[t];if(null===e)return null;const a=ht(e)||ht(r);return n[t][a]}),s=o&&Object.entries(o).reduce((t,e)=>{let[o,r]=e;return void 0===r||(t[o]=r),t},{});return bt(t,a,null==e||null===(r=e.compoundVariants)||void 0===r?void 0:r.reduce((t,e)=>{let{class:o,className:r,...n}=e;return Object.entries(n).every(t=>{let[e,o]=t;return Array.isArray(o)?o.includes({...i,...s}[e]):{...i,...s}[e]===o})?[...t,o,r]:t},[]),null==o?void 0:o.class,null==o?void 0:o.className)},_t=vt("",{variants:{variant:{default:"border-none",outline:"rounded",solid:"bg-background"},size:{sm:"size-4",md:"size-5",lg:"size-6",xl:"size-7","2xl":"size-8","3xl":"size-9"},color:{foreground:"text-foreground",primary:"text-primary",secondary:"text-muted-foreground",info:"text-info",warning:"text-warning",success:"text-success",error:"text-destructive",a11y:"text-primary-foreground",inherit:""}},compoundVariants:[{variant:"outline",color:"primary",class:"border-primary"},{variant:"outline",color:"secondary",class:"border-border"},{variant:"outline",color:"info",class:"border-info"},{variant:"outline",color:"warning",class:"border-warning"},{variant:"outline",color:"success",class:"border-success"},{variant:"outline",color:"error",class:"border-destructive"},{variant:"solid",color:"primary",class:"bg-background text-foreground"},{variant:"solid",color:"secondary",class:"bg-background text-muted-foreground"},{variant:"solid",color:"info",class:"bg-info text-foreground text-text-primary-dark"},{variant:"solid",color:"warning",class:"bg-warning text-foreground text-text-primary-dark"},{variant:"solid",color:"success",class:"bg-success text-foreground text-text-primary-dark"},{variant:"solid",color:"error",class:"bg-destructive text-foreground text-text-primary-dark"}],defaultVariants:{variant:"default",size:"md",color:"foreground"}}),xt=({className:t,color:o="foreground",size:r="md",variant:n="default",name:i="line-md:iconify1",...a})=>e.u(yt,{icon:i,className:e.cn(_t({color:o,size:r,variant:n,className:t})),...a});function Tt({children:t,asChild:o=!1,...r}){if(o){const o=Array.isArray(t)?t[0]:t;if(o&&o.type)return e.Q(o,{...r,...o.props})}return e.u("button",{...r,children:t})}var wt=vt("shadow-outer inline-flex size-fit cursor-pointer items-center justify-center rounded font-medium transition-all duration-200 active:scale-95 disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"gap-1 p-2 text-sm",md:"gap-2 px-4 py-2 text-sm sm:text-base",lg:"gap-2 px-4 py-3 text-lg",icon:"h-9 w-9 p-0"},color:{foreground:"bg-background text-foreground hover:bg-muted active:bg-muted/80",primary:"bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary/80",info:"bg-info hover:bg-info/90 active:bg-info/80 text-white",warning:"bg-warning hover:bg-warning/90 active:bg-warning/80 text-white",success:"bg-success hover:bg-success/90 active:bg-success/80 text-white",error:"bg-destructive hover:bg-destructive/90 active:bg-destructive/80 text-white"},variant:{default:"",outlined:"bg-transparent hover:bg-current/10 active:bg-current/15",ghost:"border-transparent bg-transparent shadow-none hover:bg-current/10 active:bg-current/15"}},compoundVariants:[{variant:"default",color:"primary",class:"border-primary border"},{variant:"default",color:"info",class:"border-info border"},{variant:"default",color:"warning",class:"border-warning border"},{variant:"default",color:"success",class:"border-success border"},{variant:"default",color:"error",class:"border-destructive border"},{variant:"outlined",color:"foreground",class:"text-foreground border-muted-foreground hover:bg-foreground/10 border bg-transparent"},{variant:"outlined",color:"primary",class:"border-primary text-primary hover:bg-primary/10 border bg-transparent"},{variant:"outlined",color:"info",class:"border-info text-info hover:bg-info/10 border bg-transparent"},{variant:"outlined",color:"warning",class:"border-warning text-warning hover:bg-warning/10 border bg-transparent"},{variant:"outlined",color:"success",class:"border-success text-success hover:bg-success/10 border bg-transparent"},{variant:"outlined",color:"error",class:"border-destructive text-destructive hover:bg-destructive/10 border bg-transparent"},{variant:"ghost",color:"primary",class:"text-primary hover:bg-primary/10"},{variant:"ghost",color:"info",class:"text-info hover:bg-info/10"},{variant:"ghost",color:"warning",class:"text-warning hover:bg-warning/10"},{variant:"ghost",color:"success",class:"text-success hover:bg-success/10"},{variant:"ghost",color:"error",class:"text-destructive hover:bg-destructive/10"}],defaultVariants:{variant:"default",size:"md",color:"primary"}}),kt=({className:t,type:o="button",disabled:r,loading:n,fullWidth:i,color:a,size:s,variant:c,icon:l,iconName:f,iconSvg:d,asChild:u=!1,immutable:p,elementRef:g,children:m,...y})=>{const h=u?Tt:"button",b=u?{asChild:!0}:{},v=d||l||(f?e.u(xt,{name:f,className:"text-primary-foreground"}):null);return e.u(h,{ref:g,type:o,disabled:r||n,className:e.cn(wt({color:a,size:s,variant:c}),t,i&&"w-full"),...b,...y,children:[e.u("div",{className:e.cn(n?"collapse":"visible flex items-center gap-3"),children:[v&&!n&&v,m]}),n&&e.u("span",{className:"icon-[eos-icons--three-dots-loading] absolute size-6"})]})},Et={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",p:"p",blockquote:"blockquote",body1:"p",body2:"p",body3:"p",caption:"span",overline:"span",lead:"p"},Ot=vt("antialiased",{variants:{variant:{h1:"scroll-m-20 text-4xl font-bold tracking-tight lg:text-5xl",h2:"scroll-m-20 text-3xl font-bold tracking-tight lg:text-4xl",h3:"scroll-m-20 text-2xl font-semibold tracking-tight",h4:"scroll-m-20 text-xl font-semibold",h5:"scroll-m-20 text-lg font-semibold",h6:"scroll-m-20 text-base font-semibold",body1:"text-base leading-relaxed font-medium",body2:"text-sm leading-relaxed",body3:"text-sm leading-relaxed sm:text-base",p:"text-base leading-7",lead:"text-muted-foreground text-xl leading-relaxed",blockquote:"border-primary/30 text-muted-foreground border-l-4 pl-4 text-base italic",caption:"text-muted-foreground text-xs",overline:"text-muted-foreground text-xs font-medium tracking-widest uppercase"},color:{foreground:"text-foreground",muted:"text-muted-foreground",primary:"text-primary",info:"text-info",warning:"text-warning",success:"text-success",error:"text-destructive",inherit:"text-inherit",secondary:"text-muted-foreground",white:"text-white",black:"text-black",a11y:"text-primary-foreground",light:"text-text-primary-light"},align:{left:"text-left",right:"text-right",center:"text-center",justify:"text-justify"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{variant:"body1",color:"foreground",align:"left"}}),It=({variant:t="body1",color:o,align:r,weight:n,transform:i,lines:a,shadow:s,noWrap:c,className:l,immutable:f,...d})=>{const u=Et[t];return e.u(u,{className:e.cn(Ot({variant:t,color:o,align:r,weight:n}),i,a&&a>0?`line-clamp-${a}`:void 0,s&&"drop-shadow-[0_1px_2px_rgba(0,0,0,0.5)]",c&&"truncate",l),...d,children:d.children})},jt=async()=>{const t=await o.getBrowserFingerprint();return"string"==typeof t?t:t?.fingerprint},St=()=>{const t=e.A(null),{props:r,sessionId:n,user:i}=o.useSession(),a=r?.organizationId,s=e.A(null),c=e.A(null),l=async(r,n)=>{if(r&&n&&(t.current||(t.current=await jt()),t.current))try{await o.ky.post(e.API_ROUTES.UPDATE_AD_ANALYTICS,{json:{adId:r,type:n,browserFingerprint:t.current},headers:{"x-org-id":a}})}catch(re){console.error(re)}},f=async t=>{if(n)try{await o.ky.post(e.API_ROUTES.UPDATE_SESSION,{headers:{"x-org-id":a},json:{sessionId:n,pageViews:t}})}catch(re){console.error(re)}};return{incrementEventView:async r=>{if(r&&(t.current||(t.current=await jt()),t.current))try{await o.ky.post(e.API_ROUTES.INCREMENT_EVENT_VIEW,{json:{eventSlug:r,browserFingerprint:t.current},headers:{"x-org-id":a,Authorization:i?`Bearer ${i.token}`:void 0}})}catch(re){console.error(re)}},captureAdImpression:async t=>l(t,e.AD_ANALYTICS_TYPE.AD_IMPRESSION),captureAdEngagement:async t=>l(t,e.AD_ANALYTICS_TYPE.AD_ENGAGEMENT),captureAdClick:(t,o,r)=>{if(l(t,e.AD_ANALYTICS_TYPE.AD_CLICK),r)switch(o){case e.AD_TARGET_TYPES.LINK:window.open(String(r),"_blank");break;case e.AD_TARGET_TYPES.EMAIL:window.location.href=`mailto:${String(r)}`;break;case e.AD_TARGET_TYPES.PHONE:window.location.href=`tel:${String(r)}`;break;case e.AD_TARGET_TYPES.SMS:window.location.href=`sms:${String(r)}`;break;case e.AD_TARGET_TYPES.WHATSAPP:window.location.href=`https://wa.me/${String(r)}`;break;case e.AD_TARGET_TYPES.MESSENGER:window.location.href=`https://m.me/${String(r)}`;break;default:window.open(String(r),"_blank")}},trackPageView:t=>{s.current&&c.current&&f([{page:s.current,entryTime:c.current,exitTime:Date.now()}]),s.current=t??null,c.current=Date.now()},exportPageViewsData:f}},At=e.R(null),Pt=({open:t,onOpenChange:o,children:r})=>{const[n,i]=e.d(!!t);return e.y(()=>{"boolean"==typeof t&&i(t)},[t]),e.u(At.Provider,{value:{open:n,setOpen:t=>{i(t),o?.(t)}},children:r})},zt=({children:t})=>e.u(e.k,{children:t}),Ct=({className:t,...o})=>{const r=e.x(At);return e.u("div",{"data-state":r?.open?"open":"closed",className:e.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-2001 bg-black/15 backdrop-blur-md",t),...o})},Nt=({className:t,children:r,...n})=>{const{organization:i}=o.useSession(),a=e.x(At);return e.y(()=>{if(!a?.open)return;const t=t=>{"Escape"===t.key&&a.setOpen(!1)};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[a?.open]),a?.open?e.u(zt,{children:[e.u(Ct,{onClick:()=>a.setOpen(!1)}),e.u("div",{role:"dialog","aria-modal":"true","data-state":a?.open?"open":"closed",className:e.cn("shadow-outer border-border bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed bottom-0 left-0 z-2002 w-full max-w-5xl rounded-3xl border border-x-0 border-b-0 duration-300 sm:top-[50%] sm:left-[50%] sm:h-fit sm:w-auto sm:translate-x-[-50%] sm:translate-y-[-50%] sm:rounded sm:border",t),style:e.getStyleObject(i),...n,children:r})]}):null},Lt=({className:t,...o})=>e.u("div",{className:e.cn("flex flex-col space-y-1 p-3 text-center sm:text-left",t),...o}),Ft=({className:t,...o})=>e.u("div",{className:e.cn("flex flex-col-reverse p-4 sm:flex-row sm:justify-end sm:space-x-4",t),...o}),Dt=({className:t,...o})=>e.u("h2",{className:e.cn("text-center text-lg font-semibold",t),...o}),Rt=({className:t,...o})=>e.u("p",{className:e.cn("text-muted-foreground text-center text-sm",t),...o});!function(t){if("undefined"==typeof document)return;let e=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",e.firstChild?e.insertBefore(o,e.firstChild):e.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}(':root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n');var Mt=t=>"number"==typeof t&&!isNaN(t),$t=t=>"string"==typeof t,Ut=t=>"function"==typeof t;function Vt({enter:t,exit:e,appendPosition:o=!1,collapse:r=!0,collapseDuration:i=300}){return function({children:a,position:s,preventExitTransition:c,done:l,nodeRef:f,isIn:d,playToast:u}){let p=o?`${t}--${s}`:t,g=o?`${e}--${s}`:e,m=(0,n.useRef)(0);return(0,n.useLayoutEffect)(()=>{let t=f.current,e=p.split(" "),o=r=>{r.target===f.current&&(u(),t.removeEventListener("animationend",o),t.removeEventListener("animationcancel",o),0===m.current&&"animationcancel"!==r.type&&t.classList.remove(...e))};t.classList.add(...e),t.addEventListener("animationend",o),t.addEventListener("animationcancel",o)},[]),(0,n.useEffect)(()=>{let t=f.current,e=()=>{t.removeEventListener("animationend",e),r?function(t,e,o=300){let{scrollHeight:r,style:n}=t;requestAnimationFrame(()=>{n.minHeight="initial",n.height=r+"px",n.transition=`all ${o}ms`,requestAnimationFrame(()=>{n.height="0",n.padding="0",n.margin="0",setTimeout(e,o)})})}(t,l,i):l()};d||(c?e():(m.current=1,t.className+=` ${g}`,t.addEventListener("animationend",e)))},[d]),n.default.createElement(n.default.Fragment,null,a)}}var Yt=1,qt=()=>""+Yt++,Bt=new Map,Xt=[],Gt=new Set,Ht=()=>Bt.size>0;function Qt(t,e){Bt.forEach(o=>{(null==e||null==e||!e.containerId||(null==e?void 0:e.containerId)===o.id)&&o.toggle(t,null==e?void 0:e.id)})}function Wt(t){return t&&($t(t.toastId)||Mt(t.toastId))?t.toastId:qt()}function Kt(t,e){return function(t,e){(t=>(0,n.isValidElement)(t)||$t(t)||Ut(t)||Mt(t))(t)&&(Ht()||Xt.push({content:t,options:e}),Bt.forEach(o=>{o.buildToast(t,e)}))}(t,e),e.toastId}function Jt(t,e){return{...e,type:e&&e.type||t,toastId:Wt(e)}}function Zt(t){return(e,o)=>Kt(e,Jt(t,o))}function te(t,e){return Kt(t,Jt("default",e))}te.loading=(t,e)=>Kt(t,Jt("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...e})),te.promise=function(t,{pending:e,error:o,success:r},n){let i;e&&(i=$t(e)?te.loading(e,n):te.loading(e.render,{...n,...e}));let a={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},s=(t,e,o)=>{if(null==e)return void te.dismiss(i);let r={type:t,...a,...n,data:o},s=$t(e)?{render:e}:e;return i?te.update(i,{...r,...s}):te(s.render,{...r,...s}),o},c=Ut(t)?t():t;return c.then(t=>s("success",r,t)).catch(t=>s("error",o,t)),c},te.success=Zt("success"),te.info=Zt("info"),te.error=Zt("error"),te.warning=Zt("warning"),te.warn=te.warning,te.dark=(t,e)=>Kt(t,Jt("default",{theme:"dark",...e})),te.dismiss=function(t){!function(t){if(Ht()){if(null==t||(t=>$t(t)||Mt(t))(t))Bt.forEach(e=>{e.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){let e=Bt.get(t.containerId);e?e.removeToast(t.id):Bt.forEach(e=>{e.removeToast(t.id)})}}else Xt=Xt.filter(e=>null!=t&&e.options.toastId!==t)}(t)},te.clearWaitingQueue=(t={})=>{Bt.forEach(e=>{e.props.limit&&(!t.containerId||e.id===t.containerId)&&e.clearQueue()})},te.isActive=function(t,e){var o;if(e)return!(null==(o=Bt.get(e))||!o.isToastActive(t));let r=!1;return Bt.forEach(e=>{e.isToastActive(t)&&(r=!0)}),r},te.update=(t,e={})=>{let o=((t,{containerId:e})=>{var o;return null==(o=Bt.get(e||1))?void 0:o.toasts.get(t)})(t,e);if(o){let{props:r,content:n}=o,i={delay:100,...r,...e,toastId:e.toastId||t,updateId:qt()};i.toastId!==t&&(i.staleId=t);let a=i.render||n;delete i.render,Kt(a,i)}},te.done=t=>{te.update(t,{progress:1})},te.onChange=function(t){return Gt.add(t),()=>{Gt.delete(t)}},te.play=t=>Qt(!0,t),te.pause=t=>Qt(!1,t);var ee=(t,e=!1)=>({enter:`Toastify--animate Toastify__${t}-enter`,exit:`Toastify--animate Toastify__${t}-exit`,appendPosition:e}),oe=(Vt(ee("bounce",!0)),Vt(ee("slide",!0)),Vt(ee("zoom")),Vt(ee("flip")),class extends r.PhotoSwipeBase{constructor(t){super(),this.options=t||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){r.getElementsFromOption(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(t){if(r.specialKeyUsed(t)||window.pswp)return;let e={x:t.clientX,y:t.clientY};e.x||e.y||(e=null);let o=this.getClickedIndex(t);o=this.applyFilters("clickedIndex",o,t,this);const n={gallery:t.currentTarget};o>=0&&(t.preventDefault(),this.loadAndOpen(o,n,e))}getClickedIndex(t){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,t);const e=t.target,o=r.getElementsFromOption(this.options.children,this.options.childSelector,t.currentTarget).findIndex(t=>t===e||t.contains(e));return-1!==o?o:this.options.children||this.options.childSelector?-1:0}loadAndOpen(t,e,o){if(window.pswp||!this.options)return!1;if(!e&&this.options.gallery&&this.options.children){const t=r.getElementsFromOption(this.options.gallery);t[0]&&(e={gallery:t[0]})}return this.options.index=t,this.options.initialPointerPos=o,this.shouldOpen=!0,this.preload(t,e),!0}preload(t,e){const{options:o}=this;e&&(o.dataSource=e);const n=[],i=typeof o.pswpModule;if(r.isPswpClass(o.pswpModule))n.push(Promise.resolve(o.pswpModule));else{if("string"===i)throw new Error("pswpModule as string is no longer supported");if("function"!==i)throw new Error("pswpModule is not valid");n.push(o.pswpModule())}"function"==typeof o.openPromise&&n.push(o.openPromise()),!1!==o.preloadFirstSlide&&t>=0&&(this._preloadedContent=r.lazyLoadSlide(t,this));const a=++this._uid;Promise.all(n).then(t=>{if(this.shouldOpen){const e=t[0];this._openPhotoswipe(e,a)}})}_openPhotoswipe(t,e){if(e!==this._uid&&this.shouldOpen)return;if(this.shouldOpen=!1,window.pswp)return;const o="object"==typeof t?new t.default(this.options):new t(this.options);this.pswp=o,window.pswp=o,Object.keys(this._listeners).forEach(t=>{this._listeners[t]?.forEach(e=>{o.on(t,e)})}),Object.keys(this._filters).forEach(t=>{this._filters[t]?.forEach(e=>{o.addFilter(t,e.fn,e.priority)})}),this._preloadedContent&&(o.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),o.on("destroy",()=>{this.pswp=void 0,delete window.pswp}),o.init()}destroy(){this.pswp?.destroy(),this.shouldOpen=!1,this._listeners={},r.getElementsFromOption(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.removeEventListener("click",this.onThumbnailsClick,!1)})}});Object.defineProperty(exports,"Button",{enumerable:!0,get:function(){return kt}}),Object.defineProperty(exports,"Dialog",{enumerable:!0,get:function(){return Pt}}),Object.defineProperty(exports,"DialogContent",{enumerable:!0,get:function(){return Nt}}),Object.defineProperty(exports,"DialogDescription",{enumerable:!0,get:function(){return Rt}}),Object.defineProperty(exports,"DialogFooter",{enumerable:!0,get:function(){return Ft}}),Object.defineProperty(exports,"DialogHeader",{enumerable:!0,get:function(){return Lt}}),Object.defineProperty(exports,"DialogTitle",{enumerable:!0,get:function(){return Dt}}),Object.defineProperty(exports,"Iconify",{enumerable:!0,get:function(){return xt}}),Object.defineProperty(exports,"Typography",{enumerable:!0,get:function(){return It}}),Object.defineProperty(exports,"cva",{enumerable:!0,get:function(){return vt}}),Object.defineProperty(exports,"lightbox_default",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(exports,"typographyVariants",{enumerable:!0,get:function(){return Ot}}),Object.defineProperty(exports,"useAnalytics",{enumerable:!0,get:function(){return St}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return te}});
|
|
1
|
+
const t=require("./D4geS7mP.js"),e=require("./DV6DJ1Br.js"),o=require("./D3jlv133.js"),r=require("./BhU5cdLs.js");let n=require("react");n=t.__toESM(n);var i=Object.freeze({left:0,top:0,width:16,height:16}),a=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),s=Object.freeze({...i,...a}),c=Object.freeze({...s,body:"",hidden:!1});function l(t,e){const o=function(t,e){const o={};!t.hFlip!=!e.hFlip&&(o.hFlip=!0),!t.vFlip!=!e.vFlip&&(o.vFlip=!0);const r=((t.rotate||0)+(e.rotate||0))%4;return r&&(o.rotate=r),o}(t,e);for(const r in c)r in a?r in t&&!(r in o)&&(o[r]=a[r]):r in e?o[r]=e[r]:r in t&&(o[r]=t[r]);return o}function f(t,e,o){const r=t.icons,n=t.aliases||Object.create(null);let i={};function a(t){i=l(r[t]||n[t],i)}return a(e),o.forEach(a),l(t,i)}function d(t,e){const o=[];if("object"!=typeof t||"object"!=typeof t.icons)return o;t.not_found instanceof Array&&t.not_found.forEach(t=>{e(t,null),o.push(t)});const r=function(t){const e=t.icons,o=t.aliases||Object.create(null),r=Object.create(null);return Object.keys(e).concat(Object.keys(o)).forEach(function t(n){if(e[n])return r[n]=[];if(!(n in r)){r[n]=null;const e=o[n]&&o[n].parent,i=e&&t(e);i&&(r[n]=[e].concat(i))}return r[n]}),r}(t);for(const n in r){const i=r[n];i&&(e(n,f(t,n,i)),o.push(n))}return o}var u={provider:"",aliases:{},not_found:{},...i};function p(t,e){for(const o in e)if(o in t&&typeof t[o]!=typeof e[o])return!1;return!0}function g(t){if("object"!=typeof t||null===t)return null;const e=t;if("string"!=typeof e.prefix||!t.icons||"object"!=typeof t.icons)return null;if(!p(t,u))return null;const o=e.icons;for(const n in o){const t=o[n];if(!n||"string"!=typeof t.body||!p(t,c))return null}const r=e.aliases||Object.create(null);for(const n in r){const t=r[n],e=t.parent;if(!n||"string"!=typeof e||!o[e]&&!r[e]||!p(t,c))return null}return e}var m=Object.create(null);function y(t,e){const o=m[t]||(m[t]=Object.create(null));return o[e]||(o[e]=function(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}(t,e))}function h(t,e){return g(e)?d(e,(e,o)=>{o?t.icons[e]=o:t.missing.add(e)}):[]}var b=/^[a-z0-9]+(-[a-z0-9]+)*$/,v=(t,e,o,r="")=>{const n=t.split(":");if("@"===t.slice(0,1)){if(n.length<2||n.length>3)return null;r=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const t=n.pop(),o=n.pop(),i={provider:n.length>0?n[0]:r,prefix:o,name:t};return e&&!_(i)?null:i}const i=n[0],a=i.split("-");if(a.length>1){const t={provider:r,prefix:a.shift(),name:a.join("-")};return e&&!_(t)?null:t}if(o&&""===r){const t={provider:r,prefix:"",name:i};return e&&!_(t,o)?null:t}return null},_=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name),x=!1;function T(t){return"boolean"==typeof t&&(x=t),x}function w(t){const e="string"==typeof t?v(t,!0,x):t;if(e){const t=y(e.provider,e.prefix),o=e.name;return t.icons[o]||(t.missing.has(o)?null:void 0)}}var k=Object.freeze({width:null,height:null}),E=Object.freeze({...k,...a}),O=/(-?[0-9.]*[0-9]+[0-9.]*)/g,I=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function j(t,e,o){if(1===e)return t;if(o=o||100,"number"==typeof t)return Math.ceil(t*e*o)/o;if("string"!=typeof t)return t;const r=t.split(O);if(null===r||!r.length)return t;const n=[];let i=r.shift(),a=I.test(i);for(;;){if(a){const t=parseFloat(i);isNaN(t)?n.push(i):n.push(Math.ceil(t*e*o)/o)}else n.push(i);if(i=r.shift(),void 0===i)return n.join("");a=!a}}var S=/\sid="(\S+)"/g,A="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),P=0;function z(t,e=A){const o=[];let r;for(;r=S.exec(t);)o.push(r[1]);if(!o.length)return t;const n="suffix"+(16777216*Math.random()|Date.now()).toString(16);return o.forEach(o=>{const r="function"==typeof e?e(o):e+(P++).toString(),i=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+i+')([")]|\\.[a-z])',"g"),"$1"+r+n+"$3")}),t=t.replace(new RegExp(n,"g"),"")}var C=Object.create(null);function N(t){return C[t]||C[""]}function L(t){let e;if("string"==typeof t.resources)e=[t.resources];else if(e=t.resources,!(e instanceof Array&&e.length))return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:!0===t.random,index:t.index||0,dataAfterTimeout:!1!==t.dataAfterTimeout}}for(var F=Object.create(null),D=["https://api.simplesvg.com","https://api.unisvg.com"],R=[];D.length>0;)1===D.length||Math.random()>.5?R.push(D.shift()):R.push(D.pop());function M(t,e){const o=L(e);return null!==o&&(F[t]=o,!0)}function $(t){return F[t]}F[""]=L({resources:["https://api.iconify.design"].concat(R)});var U=(()=>{let t;try{if(t=fetch,"function"==typeof t)return t}catch(e){}})(),V={prepare:(t,e,o)=>{const r=[],n=function(t,e){const o=$(t);if(!o)return 0;let r;if(o.maxURL){let t=0;o.resources.forEach(e=>{t=Math.max(t,e.length)});const n=e+".json?icons=";r=o.maxURL-t-o.path.length-n.length}else r=0;return r}(t,e),i="icons";let a={type:i,provider:t,prefix:e,icons:[]},s=0;return o.forEach((o,c)=>{s+=o.length+1,s>=n&&c>0&&(r.push(a),a={type:i,provider:t,prefix:e,icons:[]},s=o.length),a.icons.push(o)}),r.push(a),r},send:(t,e,o)=>{if(!U)return void o("abort",424);let r=function(t){if("string"==typeof t){const e=$(t);if(e)return e.path}return"/"}(e.provider);switch(e.type){case"icons":{const t=e.prefix,o=e.icons.join(",");r+=t+".json?"+new URLSearchParams({icons:o}).toString();break}case"custom":{const t=e.uri;r+="/"===t.slice(0,1)?t.slice(1):t;break}default:return void o("abort",400)}let n=503;U(t+r).then(t=>{const e=t.status;if(200===e)return n=501,t.json();setTimeout(()=>{o(function(t){return 404===t}(e)?"abort":"next",e)})}).then(t=>{"object"==typeof t&&null!==t?setTimeout(()=>{o("success",t)}):setTimeout(()=>{404===t?o("abort",t):o("next",n)})}).catch(()=>{o("next",n)})}};function Y(t,e){t.forEach(t=>{const o=t.loaderCallbacks;o&&(t.loaderCallbacks=o.filter(t=>t.id!==e))})}var q=0,B={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function X(t){const e={...B,...t};let o=[];function r(){o=o.filter(t=>"pending"===t().status)}return{query:function(t,n,i){const a=function(t,e,o,r){const n=t.resources.length,i=t.random?Math.floor(Math.random()*n):t.index;let a;if(t.random){let e=t.resources.slice(0);for(a=[];e.length>1;){const t=Math.floor(Math.random()*e.length);a.push(e[t]),e=e.slice(0,t).concat(e.slice(t+1))}a=a.concat(e)}else a=t.resources.slice(i).concat(t.resources.slice(0,i));const s=Date.now();let c,l="pending",f=0,d=null,u=[],p=[];function g(){d&&(clearTimeout(d),d=null)}function m(){"pending"===l&&(l="aborted"),g(),u.forEach(t=>{"pending"===t.status&&(t.status="aborted")}),u=[]}function y(t,e){e&&(p=[]),"function"==typeof t&&p.push(t)}function h(){l="failed",p.forEach(t=>{t(void 0,c)})}function b(){u.forEach(t=>{"pending"===t.status&&(t.status="aborted")}),u=[]}return"function"==typeof r&&p.push(r),setTimeout(function r(){if("pending"!==l)return;g();const n=a.shift();if(void 0===n)return u.length?void(d=setTimeout(()=>{g(),"pending"===l&&(b(),h())},t.timeout)):void h();const i={status:"pending",resource:n,callback:(e,o)=>{!function(e,o,n){const i="success"!==o;switch(u=u.filter(t=>t!==e),l){case"pending":break;case"failed":if(i||!t.dataAfterTimeout)return;break;default:return}if("abort"===o)return c=n,void h();if(i)return c=n,void(u.length||(a.length?r():h()));if(g(),b(),!t.random){const o=t.resources.indexOf(e.resource);-1!==o&&o!==t.index&&(t.index=o)}l="completed",p.forEach(t=>{t(n)})}(i,e,o)}};u.push(i),f++,d=setTimeout(r,t.rotate),o(n,e,i.callback)}),function(){return{startTime:s,payload:e,status:l,queriesSent:f,queriesPending:u.length,subscribe:y,abort:m}}}(e,t,n,(t,e)=>{r(),i&&i(t,e)});return o.push(a),a},find:function(t){return o.find(e=>t(e))||null},setIndex:t=>{e.index=t},getIndex:()=>e.index,cleanup:r}}function G(){}var H=Object.create(null);function Q(){}function W(t,e,o){function r(){const o=t.pendingIcons;e.forEach(e=>{o&&o.delete(e),t.icons[e]||t.missing.add(e)})}if(o&&"object"==typeof o)try{if(!h(t,o).length)return void r()}catch(n){console.error(n)}r(),function(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,function(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let o=!1;const r=t.provider,n=t.prefix;e.forEach(e=>{const i=e.icons,a=i.pending.length;i.pending=i.pending.filter(e=>{if(e.prefix!==n)return!0;const a=e.name;if(t.icons[a])i.loaded.push({provider:r,prefix:n,name:a});else{if(!t.missing.has(a))return o=!0,!0;i.missing.push({provider:r,prefix:n,name:a})}return!1}),i.pending.length!==a&&(o||Y([t],e.id),e.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),e.abort))})}))}(t)}))}(t)}function K(t,e){t instanceof Promise?t.then(t=>{e(t)}).catch(()=>{e(null)}):e(t)}function J(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:e,prefix:o}=t,r=t.iconsToLoad;if(delete t.iconsToLoad,!r||!r.length)return;const n=t.loadIcon;if(t.loadIcons&&(r.length>1||!n))return void K(t.loadIcons(r,o,e),e=>{W(t,r,e)});if(n)return void r.forEach(r=>{K(n(r,o,e),e=>{W(t,[r],e?{prefix:o,icons:{[r]:e}}:null)})});const{valid:i,invalid:a}=function(t){const e=[],o=[];return t.forEach(t=>{(t.match(b)?e:o).push(t)}),{valid:e,invalid:o}}(r);if(a.length&&W(t,a,null),!i.length)return;const s=o.match(b)?N(e):null;s?s.prepare(e,o,i).forEach(o=>{!function(t,e,o){let r,n;if("string"==typeof t){const e=N(t);if(!e)return o(void 0,424),G;n=e.send;const i=function(t){if(!H[t]){const e=$(t);if(!e)return;H[t]={config:e,redundancy:X(e)}}return H[t]}(t);i&&(r=i.redundancy)}else{const e=L(t);if(e){r=X(e);const o=N(t.resources?t.resources[0]:"");o&&(n=o.send)}}r&&n?r.query(e,n,o)().abort:o(void 0,424)}(e,o,e=>{W(t,o.icons,e)})}):W(t,i,null)}))}var Z,tt=(t,e)=>{const o=function(t){const e={loaded:[],missing:[],pending:[]},o=Object.create(null);t.sort((t,e)=>t.provider!==e.provider?t.provider.localeCompare(e.provider):t.prefix!==e.prefix?t.prefix.localeCompare(e.prefix):t.name.localeCompare(e.name));let r={provider:"",prefix:"",name:""};return t.forEach(t=>{if(r.name===t.name&&r.prefix===t.prefix&&r.provider===t.provider)return;r=t;const n=t.provider,i=t.prefix,a=t.name,s=o[n]||(o[n]=Object.create(null)),c=s[i]||(s[i]=y(n,i));let l;l=a in c.icons?e.loaded:""===i||c.missing.has(a)?e.missing:e.pending;const f={provider:n,prefix:i,name:a};l.push(f)}),e}(function(t,e=!0,o=!1){const r=[];return t.forEach(t=>{const n="string"==typeof t?v(t,e,o):t;n&&r.push(n)}),r}(t,!0,T()));if(!o.pending.length){let t=!0;return e&&setTimeout(()=>{t&&e(o.loaded,o.missing,o.pending,Q)}),()=>{t=!1}}const r=Object.create(null),n=[];let i,a;return o.pending.forEach(t=>{const{provider:e,prefix:o}=t;if(o===a&&e===i)return;i=e,a=o,n.push(y(e,o));const s=r[e]||(r[e]=Object.create(null));s[o]||(s[o]=[])}),o.pending.forEach(t=>{const{provider:e,prefix:o,name:n}=t,i=y(e,o),a=i.pendingIcons||(i.pendingIcons=new Set);a.has(n)||(a.add(n),r[e][o].push(n))}),n.forEach(t=>{const e=r[t.provider][t.prefix];e.length&&J(t,e)}),e?function(t,e,o){const r=q++,n=Y.bind(null,o,r);if(!e.pending.length)return n;const i={id:r,icons:e,callback:t,abort:n};return o.forEach(t=>{(t.loaderCallbacks||(t.loaderCallbacks=[])).push(i)}),n}(e,o,n):Q},et=/[\s,]+/;function ot(t,e){e.split(et).forEach(e=>{switch(e.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0}})}function rt(t,e=0){const o=t.replace(/^-?[0-9.]*/,"");function r(t){for(;t<0;)t+=4;return t%4}if(""===o){const e=parseInt(t);return isNaN(e)?0:r(e)}if(o!==t){let e=0;switch(o){case"%":e=25;break;case"deg":e=90}if(e){let n=parseFloat(t.slice(0,t.length-o.length));return isNaN(n)?0:(n/=e,n%1==0?r(n):0)}}return e}function nt(t){return void 0===Z&&function(){try{Z=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch(t){Z=null}}(),Z?Z.createHTML(t):t}var it={...E,inline:!1},at={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},st={display:"inline-block"},ct={backgroundColor:"currentColor"},lt={backgroundColor:"transparent"},ft={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},dt={WebkitMask:ct,mask:ct,background:lt};for(const ne in dt){const t=dt[ne];for(const e in ft)t[ne+e]=ft[e]}var ut={...it,inline:!0};function pt(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}var gt;if(T(!0),gt=V,C[""]=gt,"undefined"!=typeof document&&"undefined"!=typeof window){const t=window;if(void 0!==t.IconifyPreload){const e=t.IconifyPreload,o="Invalid IconifyPreload syntax.";"object"==typeof e&&null!==e&&(e instanceof Array?e:[e]).forEach(t=>{try{("object"!=typeof t||null===t||t instanceof Array||"object"!=typeof t.icons||"string"!=typeof t.prefix||!function(t,e){if("object"!=typeof t)return!1;if("string"!=typeof e&&(e=t.provider||""),x&&!e&&!t.prefix){let e=!1;return g(t)&&(t.prefix="",d(t,(t,r)=>{(function(t,e){const r=v(t,!0,x);if(!r)return!1;const n=y(r.provider,r.prefix);return e?function(t,e,r){try{if("string"==typeof r.body)return t.icons[e]={...r},!0}catch(o){}return!1}(n,r.name,e):(n.missing.add(r.name),!0)})(t,r)&&(e=!0)})),e}const r=t.prefix;return!!_({prefix:r,name:"a"})&&!!h(y(e,r),t)}(t))&&console.error(o)}catch(e){console.error(o)}})}if(void 0!==t.IconifyProviders){const e=t.IconifyProviders;if("object"==typeof e&&null!==e)for(let t in e){const o="IconifyProviders["+t+"] is invalid.";try{const r=e[t];if("object"!=typeof r||!r||void 0===r.resources)continue;M(t,r)||console.error(o)}catch(re){console.error(o)}}}}function mt(t){const[e,o]=(0,n.useState)(!!t.ssr),[r,i]=(0,n.useState)({}),[a,c]=(0,n.useState)(function(e){if(e){const e=t.icon;if("object"==typeof e)return{name:"",data:e};const o=w(e);if(o)return{name:e,data:o}}return{name:""}}(!!t.ssr));function l(){const t=r.callback;t&&(t(),i({}))}function f(t){if(JSON.stringify(a)!==JSON.stringify(t))return l(),c(t),!0}function d(){var e;const o=t.icon;if("object"==typeof o)return void f({name:"",data:o});const r=w(o);f({name:o,data:r})&&(void 0===r?i({callback:tt([o],d)}):r&&(null===(e=t.onLoad)||void 0===e||e.call(t,o)))}(0,n.useEffect)(()=>(o(!0),l),[]),(0,n.useEffect)(()=>{e&&d()},[t.icon,e]);const{name:u,data:p}=a;return p?((t,e,o)=>{const r=e.inline?ut:it,i=function(t,e){const o={...t};for(const r in e){const t=e[r],n=typeof t;r in k?(null===t||t&&("string"===n||"number"===n))&&(o[r]=t):n===typeof o[r]&&(o[r]="rotate"===r?t%4:t)}return o}(r,e),a=e.mode||"svg",c={},l=e.style||{},f={..."svg"===a?at:{}};if(o){const t=v(o,!1,!0);if(t){const e=["iconify"];for(const o of["provider","prefix"])t[o]&&e.push("iconify--"+t[o]);f.className=e.join(" ")}}for(let n in e){const t=e[n];if(void 0!==t)switch(n){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":f.ref=t;break;case"className":f[n]=(f[n]?f[n]+" ":"")+t;break;case"inline":case"hFlip":case"vFlip":i[n]=!0===t||"true"===t||1===t;break;case"flip":"string"==typeof t&&ot(i,t);break;case"color":c.color=t;break;case"rotate":"string"==typeof t?i[n]=rt(t):"number"==typeof t&&(i[n]=t);break;case"ariaHidden":case"aria-hidden":!0!==t&&"true"!==t&&delete f["aria-hidden"];break;default:void 0===r[n]&&(f[n]=t)}}const d=function(t,e){const o={...s,...t},r={...E,...e},n={left:o.left,top:o.top,width:o.width,height:o.height};let i=o.body;[o,r].forEach(t=>{const e=[],o=t.hFlip,r=t.vFlip;let a,s=t.rotate;switch(o?r?s+=2:(e.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),e.push("scale(-1 1)"),n.top=n.left=0):r&&(e.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),e.push("scale(1 -1)"),n.top=n.left=0),s<0&&(s-=4*Math.floor(s/4)),s%=4,s){case 1:a=n.height/2+n.top,e.unshift("rotate(90 "+a.toString()+" "+a.toString()+")");break;case 2:e.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:a=n.width/2+n.left,e.unshift("rotate(-90 "+a.toString()+" "+a.toString()+")")}s%2==1&&(n.left!==n.top&&(a=n.left,n.left=n.top,n.top=a),n.width!==n.height&&(a=n.width,n.width=n.height,n.height=a)),e.length&&(i=function(t,e){const o=function(t,e="defs"){let o="";const r=t.indexOf("<"+e);for(;r>=0;){const n=t.indexOf(">",r),i=t.indexOf("</"+e);if(-1===n||-1===i)break;const a=t.indexOf(">",i);if(-1===a)break;o+=t.slice(n+1,i).trim(),t=t.slice(0,r).trim()+t.slice(a+1)}return{defs:o,content:t}}(t);return r=o.defs,n=e+o.content+"</g>",r?"<defs>"+r+"</defs>"+n:n;var r,n}(i,'<g transform="'+e.join(" ")+'">'))});const a=r.width,c=r.height,l=n.width,f=n.height;let d,u;null===a?(u=null===c?"1em":"auto"===c?f:c,d=j(u,l/f)):(d="auto"===a?l:a,u=null===c?j(d,f/l):"auto"===c?f:c);const p={},g=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(p[t]=e.toString())};g("width",d),g("height",u);const m=[n.left,n.top,l,f];return p.viewBox=m.join(" "),{attributes:p,viewBox:m,body:i}}(t,i),u=d.attributes;if(i.inline&&(c.verticalAlign="-0.125em"),"svg"===a){f.style={...c,...l},Object.assign(f,u);let t=0,o=e.id;return"string"==typeof o&&(o=o.replace(/-/g,"_")),f.dangerouslySetInnerHTML={__html:nt(z(d.body,o?()=>o+"ID"+t++:"iconifyReact"))},(0,n.createElement)("svg",f)}const{body:p,width:g,height:m}=t,y="mask"===a||"bg"!==a&&-1!==p.indexOf("currentColor"),h=function(t,e){let o=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in e)o+=" "+r+'="'+e[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+o+">"+t+"</svg>"}(p,{...u,width:g+"",height:m+""});var b;return f.style={...c,"--svg":(b=h,'url("'+function(t){return"data:image/svg+xml,"+function(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}(t)}(b)+'")'),width:pt(u.width),height:pt(u.height),...st,...y?ct:lt,...l},(0,n.createElement)("span",f)})({...s,...p},t,u):t.children?t.children:t.fallback?t.fallback:(0,n.createElement)("span",{})}var yt=(0,n.forwardRef)((t,e)=>mt({...t,_ref:e})),ht=((0,n.forwardRef)((t,e)=>mt({inline:!0,...t,_ref:e})),t=>"boolean"==typeof t?`${t}`:0===t?"0":t),bt=e.clsx,vt=(t,e)=>o=>{var r;if(null==(null==e?void 0:e.variants))return bt(t,null==o?void 0:o.class,null==o?void 0:o.className);const{variants:n,defaultVariants:i}=e,a=Object.keys(n).map(t=>{const e=null==o?void 0:o[t],r=null==i?void 0:i[t];if(null===e)return null;const a=ht(e)||ht(r);return n[t][a]}),s=o&&Object.entries(o).reduce((t,e)=>{let[o,r]=e;return void 0===r||(t[o]=r),t},{});return bt(t,a,null==e||null===(r=e.compoundVariants)||void 0===r?void 0:r.reduce((t,e)=>{let{class:o,className:r,...n}=e;return Object.entries(n).every(t=>{let[e,o]=t;return Array.isArray(o)?o.includes({...i,...s}[e]):{...i,...s}[e]===o})?[...t,o,r]:t},[]),null==o?void 0:o.class,null==o?void 0:o.className)},_t=vt("",{variants:{variant:{default:"border-none",outline:"rounded",solid:"bg-background"},size:{sm:"size-4",md:"size-5",lg:"size-6",xl:"size-7","2xl":"size-8","3xl":"size-9"},color:{foreground:"text-foreground",primary:"text-primary",secondary:"text-muted-foreground",info:"text-info",warning:"text-warning",success:"text-success",error:"text-destructive",a11y:"text-primary-foreground",inherit:""}},compoundVariants:[{variant:"outline",color:"primary",class:"border-primary"},{variant:"outline",color:"secondary",class:"border-border"},{variant:"outline",color:"info",class:"border-info"},{variant:"outline",color:"warning",class:"border-warning"},{variant:"outline",color:"success",class:"border-success"},{variant:"outline",color:"error",class:"border-destructive"},{variant:"solid",color:"primary",class:"bg-background text-foreground"},{variant:"solid",color:"secondary",class:"bg-background text-muted-foreground"},{variant:"solid",color:"info",class:"bg-info text-foreground text-text-primary-dark"},{variant:"solid",color:"warning",class:"bg-warning text-foreground text-text-primary-dark"},{variant:"solid",color:"success",class:"bg-success text-foreground text-text-primary-dark"},{variant:"solid",color:"error",class:"bg-destructive text-foreground text-text-primary-dark"}],defaultVariants:{variant:"default",size:"md",color:"foreground"}}),xt=({className:t,color:o="foreground",size:r="md",variant:n="default",name:i="line-md:iconify1",...a})=>e.u(yt,{icon:i,className:e.cn(_t({color:o,size:r,variant:n,className:t})),...a});function Tt({children:t,asChild:o=!1,...r}){if(o){const o=Array.isArray(t)?t[0]:t;if(o&&o.type)return e.Q(o,{...r,...o.props})}return e.u("button",{...r,children:t})}var wt=vt("shadow-outer inline-flex size-fit cursor-pointer items-center justify-center rounded font-medium transition-all duration-200 active:scale-95 disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"gap-1 p-2 text-sm",md:"gap-2 px-4 py-2 text-sm sm:text-base",lg:"gap-2 px-4 py-3 text-lg",icon:"h-9 w-9 p-0"},color:{foreground:"bg-background text-foreground hover:bg-muted active:bg-muted/80",primary:"bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary/80",info:"bg-info hover:bg-info/90 active:bg-info/80 text-white",warning:"bg-warning hover:bg-warning/90 active:bg-warning/80 text-white",success:"bg-success hover:bg-success/90 active:bg-success/80 text-white",error:"bg-destructive hover:bg-destructive/90 active:bg-destructive/80 text-white"},variant:{default:"",outlined:"bg-transparent hover:bg-current/10 active:bg-current/15",ghost:"border-transparent bg-transparent shadow-none hover:bg-current/10 active:bg-current/15"}},compoundVariants:[{variant:"default",color:"primary",class:"border-primary border"},{variant:"default",color:"info",class:"border-info border"},{variant:"default",color:"warning",class:"border-warning border"},{variant:"default",color:"success",class:"border-success border"},{variant:"default",color:"error",class:"border-destructive border"},{variant:"outlined",color:"foreground",class:"text-foreground border-muted-foreground hover:bg-foreground/10 border bg-transparent"},{variant:"outlined",color:"primary",class:"border-primary text-primary hover:bg-primary/10 border bg-transparent"},{variant:"outlined",color:"info",class:"border-info text-info hover:bg-info/10 border bg-transparent"},{variant:"outlined",color:"warning",class:"border-warning text-warning hover:bg-warning/10 border bg-transparent"},{variant:"outlined",color:"success",class:"border-success text-success hover:bg-success/10 border bg-transparent"},{variant:"outlined",color:"error",class:"border-destructive text-destructive hover:bg-destructive/10 border bg-transparent"},{variant:"ghost",color:"primary",class:"text-primary hover:bg-primary/10"},{variant:"ghost",color:"info",class:"text-info hover:bg-info/10"},{variant:"ghost",color:"warning",class:"text-warning hover:bg-warning/10"},{variant:"ghost",color:"success",class:"text-success hover:bg-success/10"},{variant:"ghost",color:"error",class:"text-destructive hover:bg-destructive/10"}],defaultVariants:{variant:"default",size:"md",color:"primary"}}),kt=({className:t,type:o="button",disabled:r,loading:n,fullWidth:i,color:a,size:s,variant:c,icon:l,iconName:f,iconSvg:d,asChild:u=!1,immutable:p,elementRef:g,children:m,...y})=>{const h=u?Tt:"button",b=u?{asChild:!0}:{},v=d||l||(f?e.u(xt,{name:f,className:"text-primary-foreground"}):null);return e.u(h,{ref:g,type:o,disabled:r||n,className:e.cn(wt({color:a,size:s,variant:c}),t,i&&"w-full"),...b,...y,children:[e.u("div",{className:e.cn(n?"collapse":"visible flex items-center gap-3"),children:[v&&!n&&v,m]}),n&&e.u("span",{className:"icon-[eos-icons--three-dots-loading] absolute size-6"})]})},Et={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",p:"p",blockquote:"blockquote",body1:"p",body2:"p",body3:"p",caption:"span",overline:"span",lead:"p"},Ot=vt("antialiased",{variants:{variant:{h1:"scroll-m-20 text-4xl font-bold tracking-tight lg:text-5xl",h2:"scroll-m-20 text-3xl font-bold tracking-tight lg:text-4xl",h3:"scroll-m-20 text-2xl font-semibold tracking-tight",h4:"scroll-m-20 text-xl font-semibold",h5:"scroll-m-20 text-lg font-semibold",h6:"scroll-m-20 text-base font-semibold",body1:"text-base leading-relaxed font-medium",body2:"text-sm leading-relaxed",body3:"text-sm leading-relaxed sm:text-base",p:"text-base leading-7",lead:"text-muted-foreground text-xl leading-relaxed",blockquote:"border-primary/30 text-muted-foreground border-l-4 pl-4 text-base italic",caption:"text-muted-foreground text-xs",overline:"text-muted-foreground text-xs font-medium tracking-widest uppercase"},color:{foreground:"text-foreground",muted:"text-muted-foreground",primary:"text-primary",info:"text-info",warning:"text-warning",success:"text-success",error:"text-destructive",inherit:"text-inherit",secondary:"text-muted-foreground",white:"text-white",black:"text-black",a11y:"text-primary-foreground",light:"text-text-primary-light"},align:{left:"text-left",right:"text-right",center:"text-center",justify:"text-justify"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{variant:"body1",color:"foreground",align:"left"}}),It=({variant:t="body1",color:o,align:r,weight:n,transform:i,lines:a,shadow:s,noWrap:c,className:l,immutable:f,...d})=>{const u=Et[t];return e.u(u,{className:e.cn(Ot({variant:t,color:o,align:r,weight:n}),i,a&&a>0?`line-clamp-${a}`:void 0,s&&"drop-shadow-[0_1px_2px_rgba(0,0,0,0.5)]",c&&"truncate",l),...d,children:d.children})},jt=async()=>{const t=await o.getBrowserFingerprint();return"string"==typeof t?t:t?.fingerprint},St=()=>{const t=e.A(null),{props:r,sessionId:n,user:i}=o.useSession(),a=r?.organizationId,s=e.A(null),c=e.A(null),l=async(r,n)=>{if(r&&n&&(t.current||(t.current=await jt()),t.current))try{await o.ky.post(e.API_ROUTES.UPDATE_AD_ANALYTICS,{json:{adId:r,type:n,browserFingerprint:t.current},headers:{"x-org-id":a}})}catch(re){console.error(re)}},f=async t=>{if(n)try{await o.ky.post(e.API_ROUTES.UPDATE_SESSION,{headers:{"x-org-id":a},json:{sessionId:n,pageViews:t}})}catch(re){console.error(re)}};return{incrementEventView:async r=>{if(r&&(t.current||(t.current=await jt()),t.current))try{await o.ky.post(e.API_ROUTES.INCREMENT_EVENT_VIEW,{json:{eventSlug:r,browserFingerprint:t.current},headers:{"x-org-id":a,Authorization:i?`Bearer ${i.token}`:void 0}})}catch(re){console.error(re)}},captureAdImpression:async t=>l(t,e.AD_ANALYTICS_TYPE.AD_IMPRESSION),captureAdEngagement:async t=>l(t,e.AD_ANALYTICS_TYPE.AD_ENGAGEMENT),captureAdClick:(t,o,r)=>{if(l(t,e.AD_ANALYTICS_TYPE.AD_CLICK),r)switch(o){case e.AD_TARGET_TYPES.LINK:window.open(String(r),"_blank");break;case e.AD_TARGET_TYPES.EMAIL:window.location.href=`mailto:${String(r)}`;break;case e.AD_TARGET_TYPES.PHONE:window.location.href=`tel:${String(r)}`;break;case e.AD_TARGET_TYPES.SMS:window.location.href=`sms:${String(r)}`;break;case e.AD_TARGET_TYPES.WHATSAPP:window.location.href=`https://wa.me/${String(r)}`;break;case e.AD_TARGET_TYPES.MESSENGER:window.location.href=`https://m.me/${String(r)}`;break;default:window.open(String(r),"_blank")}},trackPageView:t=>{s.current&&c.current&&f([{page:s.current,entryTime:c.current,exitTime:Date.now()}]),s.current=t??null,c.current=Date.now()},exportPageViewsData:f}},At=e.R(null),Pt=({open:t,onOpenChange:o,children:r})=>{const[n,i]=e.d(!!t);return e.y(()=>{"boolean"==typeof t&&i(t)},[t]),e.u(At.Provider,{value:{open:n,setOpen:t=>{i(t),o?.(t)}},children:r})},zt=({children:t})=>e.u(e.k,{children:t}),Ct=({className:t,...o})=>{const r=e.x(At);return e.u("div",{"data-state":r?.open?"open":"closed",className:e.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-2001 bg-black/15 backdrop-blur-md",t),...o})},Nt=({className:t,children:r,...n})=>{const{organization:i}=o.useSession(),a=e.x(At);return e.y(()=>{if(!a?.open)return;const t=t=>{"Escape"===t.key&&a.setOpen(!1)};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[a?.open]),a?.open?e.u(zt,{children:[e.u(Ct,{onClick:()=>a.setOpen(!1)}),e.u("div",{role:"dialog","aria-modal":"true","data-state":a?.open?"open":"closed",className:e.cn("shadow-outer border-border bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed bottom-0 left-0 z-2002 w-full max-w-5xl rounded-3xl border border-x-0 border-b-0 duration-300 sm:top-[50%] sm:left-[50%] sm:h-fit sm:w-auto sm:translate-x-[-50%] sm:translate-y-[-50%] sm:rounded sm:border",t),style:e.getStyleObject(i),...n,children:r})]}):null},Lt=({className:t,...o})=>e.u("div",{className:e.cn("flex flex-col space-y-1 p-3 text-center sm:text-left",t),...o}),Ft=({className:t,...o})=>e.u("div",{className:e.cn("flex flex-col-reverse p-4 sm:flex-row sm:justify-end sm:space-x-4",t),...o}),Dt=({className:t,...o})=>e.u("h2",{className:e.cn("text-center text-lg font-semibold",t),...o}),Rt=({className:t,...o})=>e.u("p",{className:e.cn("text-muted-foreground text-center text-sm",t),...o});!function(t){if("undefined"==typeof document)return;let e=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",e.firstChild?e.insertBefore(o,e.firstChild):e.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}(':root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n');var Mt=t=>"number"==typeof t&&!isNaN(t),$t=t=>"string"==typeof t,Ut=t=>"function"==typeof t;function Vt({enter:t,exit:e,appendPosition:o=!1,collapse:r=!0,collapseDuration:i=300}){return function({children:a,position:s,preventExitTransition:c,done:l,nodeRef:f,isIn:d,playToast:u}){let p=o?`${t}--${s}`:t,g=o?`${e}--${s}`:e,m=(0,n.useRef)(0);return(0,n.useLayoutEffect)(()=>{let t=f.current,e=p.split(" "),o=r=>{r.target===f.current&&(u(),t.removeEventListener("animationend",o),t.removeEventListener("animationcancel",o),0===m.current&&"animationcancel"!==r.type&&t.classList.remove(...e))};t.classList.add(...e),t.addEventListener("animationend",o),t.addEventListener("animationcancel",o)},[]),(0,n.useEffect)(()=>{let t=f.current,e=()=>{t.removeEventListener("animationend",e),r?function(t,e,o=300){let{scrollHeight:r,style:n}=t;requestAnimationFrame(()=>{n.minHeight="initial",n.height=r+"px",n.transition=`all ${o}ms`,requestAnimationFrame(()=>{n.height="0",n.padding="0",n.margin="0",setTimeout(e,o)})})}(t,l,i):l()};d||(c?e():(m.current=1,t.className+=` ${g}`,t.addEventListener("animationend",e)))},[d]),n.default.createElement(n.default.Fragment,null,a)}}var Yt=1,qt=()=>""+Yt++,Bt=new Map,Xt=[],Gt=new Set,Ht=()=>Bt.size>0;function Qt(t,e){Bt.forEach(o=>{(null==e||null==e||!e.containerId||(null==e?void 0:e.containerId)===o.id)&&o.toggle(t,null==e?void 0:e.id)})}function Wt(t){return t&&($t(t.toastId)||Mt(t.toastId))?t.toastId:qt()}function Kt(t,e){return function(t,e){(t=>(0,n.isValidElement)(t)||$t(t)||Ut(t)||Mt(t))(t)&&(Ht()||Xt.push({content:t,options:e}),Bt.forEach(o=>{o.buildToast(t,e)}))}(t,e),e.toastId}function Jt(t,e){return{...e,type:e&&e.type||t,toastId:Wt(e)}}function Zt(t){return(e,o)=>Kt(e,Jt(t,o))}function te(t,e){return Kt(t,Jt("default",e))}te.loading=(t,e)=>Kt(t,Jt("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...e})),te.promise=function(t,{pending:e,error:o,success:r},n){let i;e&&(i=$t(e)?te.loading(e,n):te.loading(e.render,{...n,...e}));let a={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},s=(t,e,o)=>{if(null==e)return void te.dismiss(i);let r={type:t,...a,...n,data:o},s=$t(e)?{render:e}:e;return i?te.update(i,{...r,...s}):te(s.render,{...r,...s}),o},c=Ut(t)?t():t;return c.then(t=>s("success",r,t)).catch(t=>s("error",o,t)),c},te.success=Zt("success"),te.info=Zt("info"),te.error=Zt("error"),te.warning=Zt("warning"),te.warn=te.warning,te.dark=(t,e)=>Kt(t,Jt("default",{theme:"dark",...e})),te.dismiss=function(t){!function(t){if(Ht()){if(null==t||(t=>$t(t)||Mt(t))(t))Bt.forEach(e=>{e.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){let e=Bt.get(t.containerId);e?e.removeToast(t.id):Bt.forEach(e=>{e.removeToast(t.id)})}}else Xt=Xt.filter(e=>null!=t&&e.options.toastId!==t)}(t)},te.clearWaitingQueue=(t={})=>{Bt.forEach(e=>{e.props.limit&&(!t.containerId||e.id===t.containerId)&&e.clearQueue()})},te.isActive=function(t,e){var o;if(e)return!(null==(o=Bt.get(e))||!o.isToastActive(t));let r=!1;return Bt.forEach(e=>{e.isToastActive(t)&&(r=!0)}),r},te.update=(t,e={})=>{let o=((t,{containerId:e})=>{var o;return null==(o=Bt.get(e||1))?void 0:o.toasts.get(t)})(t,e);if(o){let{props:r,content:n}=o,i={delay:100,...r,...e,toastId:e.toastId||t,updateId:qt()};i.toastId!==t&&(i.staleId=t);let a=i.render||n;delete i.render,Kt(a,i)}},te.done=t=>{te.update(t,{progress:1})},te.onChange=function(t){return Gt.add(t),()=>{Gt.delete(t)}},te.play=t=>Qt(!0,t),te.pause=t=>Qt(!1,t);var ee=(t,e=!1)=>({enter:`Toastify--animate Toastify__${t}-enter`,exit:`Toastify--animate Toastify__${t}-exit`,appendPosition:e}),oe=(Vt(ee("bounce",!0)),Vt(ee("slide",!0)),Vt(ee("zoom")),Vt(ee("flip")),class extends r.PhotoSwipeBase{constructor(t){super(),this.options=t||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){r.getElementsFromOption(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(t){if(r.specialKeyUsed(t)||window.pswp)return;let e={x:t.clientX,y:t.clientY};e.x||e.y||(e=null);let o=this.getClickedIndex(t);o=this.applyFilters("clickedIndex",o,t,this);const n={gallery:t.currentTarget};o>=0&&(t.preventDefault(),this.loadAndOpen(o,n,e))}getClickedIndex(t){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,t);const e=t.target,o=r.getElementsFromOption(this.options.children,this.options.childSelector,t.currentTarget).findIndex(t=>t===e||t.contains(e));return-1!==o?o:this.options.children||this.options.childSelector?-1:0}loadAndOpen(t,e,o){if(window.pswp||!this.options)return!1;if(!e&&this.options.gallery&&this.options.children){const t=r.getElementsFromOption(this.options.gallery);t[0]&&(e={gallery:t[0]})}return this.options.index=t,this.options.initialPointerPos=o,this.shouldOpen=!0,this.preload(t,e),!0}preload(t,e){const{options:o}=this;e&&(o.dataSource=e);const n=[],i=typeof o.pswpModule;if(r.isPswpClass(o.pswpModule))n.push(Promise.resolve(o.pswpModule));else{if("string"===i)throw new Error("pswpModule as string is no longer supported");if("function"!==i)throw new Error("pswpModule is not valid");n.push(o.pswpModule())}"function"==typeof o.openPromise&&n.push(o.openPromise()),!1!==o.preloadFirstSlide&&t>=0&&(this._preloadedContent=r.lazyLoadSlide(t,this));const a=++this._uid;Promise.all(n).then(t=>{if(this.shouldOpen){const e=t[0];this._openPhotoswipe(e,a)}})}_openPhotoswipe(t,e){if(e!==this._uid&&this.shouldOpen)return;if(this.shouldOpen=!1,window.pswp)return;const o="object"==typeof t?new t.default(this.options):new t(this.options);this.pswp=o,window.pswp=o,Object.keys(this._listeners).forEach(t=>{this._listeners[t]?.forEach(e=>{o.on(t,e)})}),Object.keys(this._filters).forEach(t=>{this._filters[t]?.forEach(e=>{o.addFilter(t,e.fn,e.priority)})}),this._preloadedContent&&(o.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),o.on("destroy",()=>{this.pswp=void 0,delete window.pswp}),o.init()}destroy(){this.pswp?.destroy(),this.shouldOpen=!1,this._listeners={},r.getElementsFromOption(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.removeEventListener("click",this.onThumbnailsClick,!1)})}});Object.defineProperty(exports,"Button",{enumerable:!0,get:function(){return kt}}),Object.defineProperty(exports,"Dialog",{enumerable:!0,get:function(){return Pt}}),Object.defineProperty(exports,"DialogContent",{enumerable:!0,get:function(){return Nt}}),Object.defineProperty(exports,"DialogDescription",{enumerable:!0,get:function(){return Rt}}),Object.defineProperty(exports,"DialogFooter",{enumerable:!0,get:function(){return Ft}}),Object.defineProperty(exports,"DialogHeader",{enumerable:!0,get:function(){return Lt}}),Object.defineProperty(exports,"DialogTitle",{enumerable:!0,get:function(){return Dt}}),Object.defineProperty(exports,"Iconify",{enumerable:!0,get:function(){return xt}}),Object.defineProperty(exports,"Typography",{enumerable:!0,get:function(){return It}}),Object.defineProperty(exports,"cva",{enumerable:!0,get:function(){return vt}}),Object.defineProperty(exports,"lightbox_default",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(exports,"typographyVariants",{enumerable:!0,get:function(){return Ot}}),Object.defineProperty(exports,"useAnalytics",{enumerable:!0,get:function(){return St}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return te}});
|