@qratilabs/qrati-connect 2.5.4 → 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.
Files changed (44) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/element/{B59V0Mhr.js → B28y50Bi.js} +1 -1
  3. package/element/{DLz0G_z2.js → BWU1Eb1i.js} +1 -1
  4. package/element/{kdp9oLRU.js → CAt6yWea.js} +1 -1
  5. package/element/{D_N6wPLS.js → CH2f_afH.js} +1 -1
  6. package/element/{D43BQzpf.js → CUOOhGTj.js} +1 -1
  7. package/element/{BwemkCCJ.js → Cf1QDu0i.js} +1 -1
  8. package/element/{OucaMSbY.js → CvA0vfrf.js} +1 -1
  9. package/element/{DhfeoyBz.js → D4xTzxjA.js} +1 -1
  10. package/element/{J72K45YE.js → DODG2TX4.js} +1 -1
  11. package/element/{CPPs7pi-.js → DPOkh0eJ.js} +1 -1
  12. package/element/{DhcdFi7M.js → DiiWe_SG.js} +2 -2
  13. package/element/{BrMlCiWh.js → wHbQZdly.js} +1 -1
  14. package/element/web.es.js +3 -3
  15. package/package.json +1 -1
  16. package/react/{DXg0jviV.js → BAbwOJvT.js} +1 -1
  17. package/react/{DVhoieUG.js → BXiO9Rt2.js} +1 -1
  18. package/react/{B-MiXFkt.js → BaT1o9UO.js} +1 -1
  19. package/react/{q8ln6Sqn.js → BexGhdGA.js} +2 -2
  20. package/react/{CYK5EdMk.js → C4TTO8j2.js} +1 -1
  21. package/react/{DQq5P5kz.js → CNAEfadS.js} +1 -1
  22. package/react/{yjP1jdU0.js → CT_Cvh8-.js} +1 -1
  23. package/react/{DQRcftrx.js → Cs3wia2w.js} +1 -1
  24. package/react/{BBNhso7S.js → Czrz88CD.js} +1 -1
  25. package/react/{Rx2eXHSy.js → Czw0BHMZ.js} +1 -1
  26. package/react/{BaqVlxbd.js → D3jlv133.js} +1 -1
  27. package/react/{HzUDi5NE.js → D4BACpJw.js} +1 -1
  28. package/react/{Bh_3jcgw.js → D6cMN4OJ.js} +1 -1
  29. package/react/{B9vdeEQv.js → D7c4q3kj.js} +1 -1
  30. package/react/{t-ii7Ss0.js → DEIcfk-y.js} +1 -1
  31. package/react/{-k-ffFwP.js → DGIVHiX4.js} +1 -1
  32. package/react/{DMqKxwcb.js → DOw70z3P.js} +1 -1
  33. package/react/DV6DJ1Br.js +1 -0
  34. package/react/{r0vUVZIh.js → Dljj3ToS.js} +1 -1
  35. package/react/QPXxc9eb.js +1 -0
  36. package/react/{BQ7Q_1WB.js → Sb4c6EUR.js} +1 -1
  37. package/react/{Fhq5zLvg.js → aragUG-J.js} +1 -1
  38. package/react/{BRLq62Uv.js → e8YBtYhk.js} +1 -1
  39. package/react/index.cjs +1 -1
  40. package/react/index.mjs +3 -3
  41. package/react/{BTW-b-Wo.js → pIx9IeV5.js} +1 -1
  42. package/umd/web.umd.js +1 -1
  43. package/react/BJBX47Jb.js +0 -1
  44. package/react/C9yNmSQ8.js +0 -1
@@ -1 +1 @@
1
- const t=require("./D4geS7mP.js"),e=require("./C9yNmSQ8.js"),o=require("./BaqVlxbd.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}});
@@ -1 +1 @@
1
- import{n as e}from"./DqRj45SJ.js";import{M as t,_t as n,a as r,ut as o,vt as i}from"./BJBX47Jb.js";import{t as a}from"./Fhq5zLvg.js";import{o as s}from"./DQq5P5kz.js";import{t as l}from"./yjP1jdU0.js";var c=new a,u=(e,n)=>{i(/* @__PURE__ */r(t,{client:c,children:/* @__PURE__ */r(s,{children:/* @__PURE__ */r(l,{event:e})})}),n)},d=({events:t,apiKey:i,is3D:a})=>{const s=o(null),l=o(null),c=o(a);return n(()=>{if(!s.current||l.current)return;let n;return(async()=>{const r=(await import("./DYyT8DeU.js").then(t=>/* @__PURE__ */e(t.default,1))).default;if(await Promise.resolve({ }),!s.current)return;r.accessToken=i;const o=new r.Map({container:s.current,style:"mapbox://styles/mapbox/streets-v12",center:[0,20],zoom:2,pitch:c.current?60:0,bearing:c.current?-20:0,antialias:!0});l.current=o,o.on("style.load",()=>{o.getLayer("3d-buildings")||o.addLayer({id:"3d-buildings",source:"composite","source-layer":"building",filter:["==","extrude","true"],type:"fill-extrusion",minzoom:14,paint:{"fill-extrusion-color":"#aaa","fill-extrusion-height":["interpolate",["linear"],["zoom"],14,0,14.05,["get","height"]],"fill-extrusion-base":["interpolate",["linear"],["zoom"],14,0,14.05,["get","min_height"]],"fill-extrusion-opacity":.6}})}),o.on("load",()=>{const e=t.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y);if(0===e.length)return;const n=new r.LngLatBounds;for(const t of e){const e=t.location.x,i=t.location.y;n.extend([e,i]);const a=document.createElement("div");a.style.cssText="\n width: 28px; height: 28px; cursor: pointer;\n background: var(--color-primary, #6366f1);\n border-radius: 50% 50% 50% 0;\n transform: rotate(-45deg);\n border: 2px solid white;\n box-shadow: 0 2px 8px rgba(0,0,0,0.3);\n ";const s=document.createElement("div");u(t,s);const l=new r.Popup({closeButton:!0,closeOnClick:!1,maxWidth:"none",offset:[0,-20]}).setDOMContent(s);new r.Marker({element:a}).setLngLat([e,i]).setPopup(l).addTo(o)}n.isEmpty()||o.fitBounds(n,{padding:60,maxZoom:14,duration:1200})}),n=()=>{o.remove(),l.current=null}})(),()=>{n?.()}},[i]),n(()=>{l.current&&(c.current=a,l.current.easeTo({pitch:a?60:0,bearing:a?-20:0,duration:800}))},[a]),/* @__PURE__ */r("div",{ref:s,class:"size-full"})};export{d as default};
1
+ import{n as e}from"./DqRj45SJ.js";import{M as t,_t as n,a as r,ut as o,vt as i}from"./QPXxc9eb.js";import{t as a}from"./aragUG-J.js";import{o as s}from"./CNAEfadS.js";import{t as l}from"./CT_Cvh8-.js";var c=new a,u=(e,n)=>{i(/* @__PURE__ */r(t,{client:c,children:/* @__PURE__ */r(s,{children:/* @__PURE__ */r(l,{event:e})})}),n)},d=({events:t,apiKey:i,is3D:a})=>{const s=o(null),l=o(null),c=o(a);return n(()=>{if(!s.current||l.current)return;let n;return(async()=>{const r=(await import("./DYyT8DeU.js").then(t=>/* @__PURE__ */e(t.default,1))).default;if(await Promise.resolve({ }),!s.current)return;r.accessToken=i;const o=new r.Map({container:s.current,style:"mapbox://styles/mapbox/streets-v12",center:[0,20],zoom:2,pitch:c.current?60:0,bearing:c.current?-20:0,antialias:!0});l.current=o,o.on("style.load",()=>{o.getLayer("3d-buildings")||o.addLayer({id:"3d-buildings",source:"composite","source-layer":"building",filter:["==","extrude","true"],type:"fill-extrusion",minzoom:14,paint:{"fill-extrusion-color":"#aaa","fill-extrusion-height":["interpolate",["linear"],["zoom"],14,0,14.05,["get","height"]],"fill-extrusion-base":["interpolate",["linear"],["zoom"],14,0,14.05,["get","min_height"]],"fill-extrusion-opacity":.6}})}),o.on("load",()=>{const e=t.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y);if(0===e.length)return;const n=new r.LngLatBounds;for(const t of e){const e=t.location.x,i=t.location.y;n.extend([e,i]);const a=document.createElement("div");a.style.cssText="\n width: 28px; height: 28px; cursor: pointer;\n background: var(--color-primary, #6366f1);\n border-radius: 50% 50% 50% 0;\n transform: rotate(-45deg);\n border: 2px solid white;\n box-shadow: 0 2px 8px rgba(0,0,0,0.3);\n ";const s=document.createElement("div");u(t,s);const l=new r.Popup({closeButton:!0,closeOnClick:!1,maxWidth:"none",offset:[0,-20]}).setDOMContent(s);new r.Marker({element:a}).setLngLat([e,i]).setPopup(l).addTo(o)}n.isEmpty()||o.fitBounds(n,{padding:60,maxZoom:14,duration:1200})}),n=()=>{o.remove(),l.current=null}})(),()=>{n?.()}},[i]),n(()=>{l.current&&(c.current=a,l.current.easeTo({pitch:a?60:0,bearing:a?-20:0,duration:800}))},[a]),/* @__PURE__ */r("div",{ref:s,class:"size-full"})};export{d as default};
@@ -1 +1 @@
1
- const t=require("./C9yNmSQ8.js");function e(e){return{onFetch:(a,n)=>{const r=a.options,o=a.fetchOptions?.meta?.fetchMore?.direction,u=a.state.data?.pages||[],h=a.state.data?.pageParams||[];let c={pages:[],pageParams:[]},l=0;const y=async()=>{let n=!1;const y=t.ensureQueryFn(a.options,a.fetchOptions),d=async(e,s,i)=>{if(n)return Promise.reject();if(null==s&&e.pages.length)return Promise.resolve(e);const r=await y((()=>{const e={client:a.client,queryKey:a.queryKey,pageParam:s,direction:i?"backward":"forward",meta:a.options.meta};var r;return r=e,t.addConsumeAwareSignal(r,()=>a.signal,()=>n=!0),e})()),{maxPages:o}=a.options,u=i?t.addToStart:t.addToEnd;return{pages:u(e.pages,r,o),pageParams:u(e.pageParams,s,o)}};if(o&&u.length){const t="backward"===o,e=t?i:s,a={pages:u,pageParams:h};c=await d(a,e(r,a),t)}else{const t=e??u.length;do{const t=0===l?h[0]??r.initialPageParam:s(r,c);if(l>0&&null==t)break;c=await d(c,t),l++}while(l<t)}return c};a.options.persister?a.fetchFn=()=>a.options.persister?.(y,{client:a.client,queryKey:a.queryKey,meta:a.options.meta,signal:a.signal},n):a.fetchFn=y}}}function s(t,{pages:e,pageParams:s}){const i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,s[i],s):void 0}function i(t,{pages:e,pageParams:s}){return e.length>0?t.getPreviousPageParam?.(e[0],e,s[0],s):void 0}function a(t,e){return!!e&&null!=s(t,e)}function n(t,e){return!(!e||!t.getPreviousPageParam)&&null!=i(t,e)}var r=class extends t.Removable{#t;#e;#s;#i;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#e=[],this.state=t.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||("pending"===this.state.status?this.scheduleGc():this.#s.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){const s=()=>{this.#a({type:"continue"})},i={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=t.createRetryer({fn:()=>this.options.mutationFn?this.options.mutationFn(e,i):Promise.reject(new Error("No mutationFn found")),onFail:(t,e)=>{this.#a({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#a({type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});const a="pending"===this.state.status,n=!this.#i.canStart();try{if(a)s();else{this.#a({type:"pending",variables:e,isPaused:n}),this.#s.config.onMutate&&await this.#s.config.onMutate(e,this,i);const t=await(this.options.onMutate?.(e,i));t!==this.state.context&&this.#a({type:"pending",context:t,variables:e,isPaused:n})}const t=await this.#i.start();return await(this.#s.config.onSuccess?.(t,e,this.state.context,this,i)),await(this.options.onSuccess?.(t,e,this.state.context,i)),await(this.#s.config.onSettled?.(t,null,this.state.variables,this.state.context,this,i)),await(this.options.onSettled?.(t,null,e,this.state.context,i)),this.#a({type:"success",data:t}),t}catch(r){try{await(this.#s.config.onError?.(r,e,this.state.context,this,i))}catch(o){Promise.reject(o)}try{await(this.options.onError?.(r,e,this.state.context,i))}catch(o){Promise.reject(o)}try{await(this.#s.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this,i))}catch(o){Promise.reject(o)}try{await(this.options.onSettled?.(void 0,r,e,this.state.context,i))}catch(o){Promise.reject(o)}throw this.#a({type:"error",error:r}),r}finally{this.#s.runNext(this)}}#a(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),t.notifyManager.batch(()=>{this.#e.forEach(t=>{t.onMutationUpdate(e)}),this.#s.notify({mutation:this,type:"updated",action:e})})}},o=class extends t.Subscribable{constructor(t={}){super(),this.config=t,this.#n=new Set,this.#r=new Map,this.#o=0}#n;#r;#o;build(t,e,s){const i=new r({client:t,mutationCache:this,mutationId:++this.#o,options:t.defaultMutationOptions(e),state:s});return this.add(i),i}add(t){this.#n.add(t);const e=u(t);if("string"==typeof e){const s=this.#r.get(e);s?s.push(t):this.#r.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#n.delete(t)){const e=u(t);if("string"==typeof e){const s=this.#r.get(e);if(s)if(s.length>1){const e=s.indexOf(t);-1!==e&&s.splice(e,1)}else s[0]===t&&this.#r.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=u(t);if("string"==typeof e){const s=this.#r.get(e)?.find(t=>"pending"===t.state.status);return!s||s===t}return!0}runNext(t){const e=u(t);return"string"==typeof e?(this.#r.get(e)?.find(e=>e!==t&&e.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){t.notifyManager.batch(()=>{this.#n.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#n.clear(),this.#r.clear()})}getAll(){return Array.from(this.#n)}find(e){const s={exact:!0,...e};return this.getAll().find(e=>t.matchMutation(s,e))}findAll(e={}){return this.getAll().filter(s=>t.matchMutation(e,s))}notify(e){t.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return t.notifyManager.batch(()=>Promise.all(e.map(e=>e.continue().catch(t.noop))))}};function u(t){return t.options.scope?.id}var h=class extends t.Subscribable{constructor(t={}){super(),this.config=t,this.#u=new Map}#u;build(e,s,i){const a=s.queryKey,n=s.queryHash??t.hashQueryKeyByOptions(a,s);let r=this.get(n);return r||(r=new t.Query({client:e,queryKey:a,queryHash:n,options:e.defaultQueryOptions(s),state:i,defaultOptions:e.getQueryDefaults(a)}),this.add(r)),r}add(t){this.#u.has(t.queryHash)||(this.#u.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#u.get(t.queryHash);e&&(t.destroy(),e===t&&this.#u.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){t.notifyManager.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#u.get(t)}getAll(){return[...this.#u.values()]}find(e){const s={exact:!0,...e};return this.getAll().find(e=>t.matchQuery(s,e))}findAll(e={}){const s=this.getAll();return Object.keys(e).length>0?s.filter(s=>t.matchQuery(e,s)):s}notify(e){t.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){t.notifyManager.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){t.notifyManager.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},c=class{#h;#s;#c;#l;#y;#d;#f;#p;constructor(t={}){this.#h=t.queryCache||new h,this.#s=t.mutationCache||new o,this.#c=t.defaultOptions||{},this.#l=new Map,this.#y=new Map,this.#d=0}mount(){this.#d++,1===this.#d&&(this.#f=t.focusManager.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#h.onFocus())}),this.#p=t.onlineManager.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#h.onOnline())}))}unmount(){this.#d--,0===this.#d&&(this.#f?.(),this.#f=void 0,this.#p?.(),this.#p=void 0)}isFetching(t){return this.#h.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#s.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#h.get(e.queryHash)?.state.data}ensureQueryData(e){const s=this.defaultQueryOptions(e),i=this.#h.build(this,s),a=i.state.data;return void 0===a?this.fetchQuery(e):(e.revalidateIfStale&&i.isStaleByTime(t.resolveStaleTime(s.staleTime,i))&&this.prefetchQuery(s),Promise.resolve(a))}getQueriesData(t){return this.#h.findAll(t).map(({queryKey:t,state:e})=>[t,e.data])}setQueryData(e,s,i){const a=this.defaultQueryOptions({queryKey:e}),n=this.#h.get(a.queryHash)?.state.data,r=t.functionalUpdate(s,n);if(void 0!==r)return this.#h.build(this,a).setData(r,{...i,manual:!0})}setQueriesData(e,s,i){return t.notifyManager.batch(()=>this.#h.findAll(e).map(({queryKey:t})=>[t,this.setQueryData(t,s,i)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#h.get(e.queryHash)?.state}removeQueries(e){const s=this.#h;t.notifyManager.batch(()=>{s.findAll(e).forEach(t=>{s.remove(t)})})}resetQueries(e,s){const i=this.#h;return t.notifyManager.batch(()=>(i.findAll(e).forEach(t=>{t.reset()}),this.refetchQueries({type:"active",...e},s)))}cancelQueries(e,s={}){const i={revert:!0,...s},a=t.notifyManager.batch(()=>this.#h.findAll(e).map(t=>t.cancel(i)));return Promise.all(a).then(t.noop).catch(t.noop)}invalidateQueries(e,s={}){return t.notifyManager.batch(()=>(this.#h.findAll(e).forEach(t=>{t.invalidate()}),"none"===e?.refetchType?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},s)))}refetchQueries(e,s={}){const i={...s,cancelRefetch:s.cancelRefetch??!0},a=t.notifyManager.batch(()=>this.#h.findAll(e).filter(t=>!t.isDisabled()&&!t.isStatic()).map(e=>{let s=e.fetch(void 0,i);return i.throwOnError||(s=s.catch(t.noop)),"paused"===e.state.fetchStatus?Promise.resolve():s}));return Promise.all(a).then(t.noop)}fetchQuery(e){const s=this.defaultQueryOptions(e);void 0===s.retry&&(s.retry=!1);const i=this.#h.build(this,s);return i.isStaleByTime(t.resolveStaleTime(s.staleTime,i))?i.fetch(s):Promise.resolve(i.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(t.noop).catch(t.noop)}fetchInfiniteQuery(t){return t.behavior=e(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(t.noop).catch(t.noop)}ensureInfiniteQueryData(t){return t.behavior=e(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return t.onlineManager.isOnline()?this.#s.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#h}getMutationCache(){return this.#s}getDefaultOptions(){return this.#c}setDefaultOptions(t){this.#c=t}setQueryDefaults(e,s){this.#l.set(t.hashKey(e),{queryKey:e,defaultOptions:s})}getQueryDefaults(e){const s=[...this.#l.values()],i={};return s.forEach(s=>{t.partialMatchKey(e,s.queryKey)&&Object.assign(i,s.defaultOptions)}),i}setMutationDefaults(e,s){this.#y.set(t.hashKey(e),{mutationKey:e,defaultOptions:s})}getMutationDefaults(e){const s=[...this.#y.values()],i={};return s.forEach(s=>{t.partialMatchKey(e,s.mutationKey)&&Object.assign(i,s.defaultOptions)}),i}defaultQueryOptions(e){if(e._defaulted)return e;const s={...this.#c.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return s.queryHash||(s.queryHash=t.hashQueryKeyByOptions(s.queryKey,s)),void 0===s.refetchOnReconnect&&(s.refetchOnReconnect="always"!==s.networkMode),void 0===s.throwOnError&&(s.throwOnError=!!s.suspense),!s.networkMode&&s.persister&&(s.networkMode="offlineFirst"),s.queryFn===t.skipToken&&(s.enabled=!1),s}defaultMutationOptions(t){return t?._defaulted?t:{...this.#c.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#h.clear(),this.#s.clear()}};Object.defineProperty(exports,"QueryClient",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"hasNextPage",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"hasPreviousPage",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"infiniteQueryBehavior",{enumerable:!0,get:function(){return e}});
1
+ const t=require("./DV6DJ1Br.js");function e(e){return{onFetch:(a,n)=>{const r=a.options,o=a.fetchOptions?.meta?.fetchMore?.direction,u=a.state.data?.pages||[],h=a.state.data?.pageParams||[];let c={pages:[],pageParams:[]},l=0;const y=async()=>{let n=!1;const y=t.ensureQueryFn(a.options,a.fetchOptions),d=async(e,s,i)=>{if(n)return Promise.reject();if(null==s&&e.pages.length)return Promise.resolve(e);const r=await y((()=>{const e={client:a.client,queryKey:a.queryKey,pageParam:s,direction:i?"backward":"forward",meta:a.options.meta};var r;return r=e,t.addConsumeAwareSignal(r,()=>a.signal,()=>n=!0),e})()),{maxPages:o}=a.options,u=i?t.addToStart:t.addToEnd;return{pages:u(e.pages,r,o),pageParams:u(e.pageParams,s,o)}};if(o&&u.length){const t="backward"===o,e=t?i:s,a={pages:u,pageParams:h};c=await d(a,e(r,a),t)}else{const t=e??u.length;do{const t=0===l?h[0]??r.initialPageParam:s(r,c);if(l>0&&null==t)break;c=await d(c,t),l++}while(l<t)}return c};a.options.persister?a.fetchFn=()=>a.options.persister?.(y,{client:a.client,queryKey:a.queryKey,meta:a.options.meta,signal:a.signal},n):a.fetchFn=y}}}function s(t,{pages:e,pageParams:s}){const i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,s[i],s):void 0}function i(t,{pages:e,pageParams:s}){return e.length>0?t.getPreviousPageParam?.(e[0],e,s[0],s):void 0}function a(t,e){return!!e&&null!=s(t,e)}function n(t,e){return!(!e||!t.getPreviousPageParam)&&null!=i(t,e)}var r=class extends t.Removable{#t;#e;#s;#i;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#e=[],this.state=t.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||("pending"===this.state.status?this.scheduleGc():this.#s.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){const s=()=>{this.#a({type:"continue"})},i={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=t.createRetryer({fn:()=>this.options.mutationFn?this.options.mutationFn(e,i):Promise.reject(new Error("No mutationFn found")),onFail:(t,e)=>{this.#a({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#a({type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});const a="pending"===this.state.status,n=!this.#i.canStart();try{if(a)s();else{this.#a({type:"pending",variables:e,isPaused:n}),this.#s.config.onMutate&&await this.#s.config.onMutate(e,this,i);const t=await(this.options.onMutate?.(e,i));t!==this.state.context&&this.#a({type:"pending",context:t,variables:e,isPaused:n})}const t=await this.#i.start();return await(this.#s.config.onSuccess?.(t,e,this.state.context,this,i)),await(this.options.onSuccess?.(t,e,this.state.context,i)),await(this.#s.config.onSettled?.(t,null,this.state.variables,this.state.context,this,i)),await(this.options.onSettled?.(t,null,e,this.state.context,i)),this.#a({type:"success",data:t}),t}catch(r){try{await(this.#s.config.onError?.(r,e,this.state.context,this,i))}catch(o){Promise.reject(o)}try{await(this.options.onError?.(r,e,this.state.context,i))}catch(o){Promise.reject(o)}try{await(this.#s.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this,i))}catch(o){Promise.reject(o)}try{await(this.options.onSettled?.(void 0,r,e,this.state.context,i))}catch(o){Promise.reject(o)}throw this.#a({type:"error",error:r}),r}finally{this.#s.runNext(this)}}#a(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),t.notifyManager.batch(()=>{this.#e.forEach(t=>{t.onMutationUpdate(e)}),this.#s.notify({mutation:this,type:"updated",action:e})})}},o=class extends t.Subscribable{constructor(t={}){super(),this.config=t,this.#n=new Set,this.#r=new Map,this.#o=0}#n;#r;#o;build(t,e,s){const i=new r({client:t,mutationCache:this,mutationId:++this.#o,options:t.defaultMutationOptions(e),state:s});return this.add(i),i}add(t){this.#n.add(t);const e=u(t);if("string"==typeof e){const s=this.#r.get(e);s?s.push(t):this.#r.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#n.delete(t)){const e=u(t);if("string"==typeof e){const s=this.#r.get(e);if(s)if(s.length>1){const e=s.indexOf(t);-1!==e&&s.splice(e,1)}else s[0]===t&&this.#r.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=u(t);if("string"==typeof e){const s=this.#r.get(e)?.find(t=>"pending"===t.state.status);return!s||s===t}return!0}runNext(t){const e=u(t);return"string"==typeof e?(this.#r.get(e)?.find(e=>e!==t&&e.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){t.notifyManager.batch(()=>{this.#n.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#n.clear(),this.#r.clear()})}getAll(){return Array.from(this.#n)}find(e){const s={exact:!0,...e};return this.getAll().find(e=>t.matchMutation(s,e))}findAll(e={}){return this.getAll().filter(s=>t.matchMutation(e,s))}notify(e){t.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return t.notifyManager.batch(()=>Promise.all(e.map(e=>e.continue().catch(t.noop))))}};function u(t){return t.options.scope?.id}var h=class extends t.Subscribable{constructor(t={}){super(),this.config=t,this.#u=new Map}#u;build(e,s,i){const a=s.queryKey,n=s.queryHash??t.hashQueryKeyByOptions(a,s);let r=this.get(n);return r||(r=new t.Query({client:e,queryKey:a,queryHash:n,options:e.defaultQueryOptions(s),state:i,defaultOptions:e.getQueryDefaults(a)}),this.add(r)),r}add(t){this.#u.has(t.queryHash)||(this.#u.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#u.get(t.queryHash);e&&(t.destroy(),e===t&&this.#u.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){t.notifyManager.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#u.get(t)}getAll(){return[...this.#u.values()]}find(e){const s={exact:!0,...e};return this.getAll().find(e=>t.matchQuery(s,e))}findAll(e={}){const s=this.getAll();return Object.keys(e).length>0?s.filter(s=>t.matchQuery(e,s)):s}notify(e){t.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){t.notifyManager.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){t.notifyManager.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},c=class{#h;#s;#c;#l;#y;#d;#f;#p;constructor(t={}){this.#h=t.queryCache||new h,this.#s=t.mutationCache||new o,this.#c=t.defaultOptions||{},this.#l=new Map,this.#y=new Map,this.#d=0}mount(){this.#d++,1===this.#d&&(this.#f=t.focusManager.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#h.onFocus())}),this.#p=t.onlineManager.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#h.onOnline())}))}unmount(){this.#d--,0===this.#d&&(this.#f?.(),this.#f=void 0,this.#p?.(),this.#p=void 0)}isFetching(t){return this.#h.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#s.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#h.get(e.queryHash)?.state.data}ensureQueryData(e){const s=this.defaultQueryOptions(e),i=this.#h.build(this,s),a=i.state.data;return void 0===a?this.fetchQuery(e):(e.revalidateIfStale&&i.isStaleByTime(t.resolveStaleTime(s.staleTime,i))&&this.prefetchQuery(s),Promise.resolve(a))}getQueriesData(t){return this.#h.findAll(t).map(({queryKey:t,state:e})=>[t,e.data])}setQueryData(e,s,i){const a=this.defaultQueryOptions({queryKey:e}),n=this.#h.get(a.queryHash)?.state.data,r=t.functionalUpdate(s,n);if(void 0!==r)return this.#h.build(this,a).setData(r,{...i,manual:!0})}setQueriesData(e,s,i){return t.notifyManager.batch(()=>this.#h.findAll(e).map(({queryKey:t})=>[t,this.setQueryData(t,s,i)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#h.get(e.queryHash)?.state}removeQueries(e){const s=this.#h;t.notifyManager.batch(()=>{s.findAll(e).forEach(t=>{s.remove(t)})})}resetQueries(e,s){const i=this.#h;return t.notifyManager.batch(()=>(i.findAll(e).forEach(t=>{t.reset()}),this.refetchQueries({type:"active",...e},s)))}cancelQueries(e,s={}){const i={revert:!0,...s},a=t.notifyManager.batch(()=>this.#h.findAll(e).map(t=>t.cancel(i)));return Promise.all(a).then(t.noop).catch(t.noop)}invalidateQueries(e,s={}){return t.notifyManager.batch(()=>(this.#h.findAll(e).forEach(t=>{t.invalidate()}),"none"===e?.refetchType?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},s)))}refetchQueries(e,s={}){const i={...s,cancelRefetch:s.cancelRefetch??!0},a=t.notifyManager.batch(()=>this.#h.findAll(e).filter(t=>!t.isDisabled()&&!t.isStatic()).map(e=>{let s=e.fetch(void 0,i);return i.throwOnError||(s=s.catch(t.noop)),"paused"===e.state.fetchStatus?Promise.resolve():s}));return Promise.all(a).then(t.noop)}fetchQuery(e){const s=this.defaultQueryOptions(e);void 0===s.retry&&(s.retry=!1);const i=this.#h.build(this,s);return i.isStaleByTime(t.resolveStaleTime(s.staleTime,i))?i.fetch(s):Promise.resolve(i.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(t.noop).catch(t.noop)}fetchInfiniteQuery(t){return t.behavior=e(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(t.noop).catch(t.noop)}ensureInfiniteQueryData(t){return t.behavior=e(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return t.onlineManager.isOnline()?this.#s.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#h}getMutationCache(){return this.#s}getDefaultOptions(){return this.#c}setDefaultOptions(t){this.#c=t}setQueryDefaults(e,s){this.#l.set(t.hashKey(e),{queryKey:e,defaultOptions:s})}getQueryDefaults(e){const s=[...this.#l.values()],i={};return s.forEach(s=>{t.partialMatchKey(e,s.queryKey)&&Object.assign(i,s.defaultOptions)}),i}setMutationDefaults(e,s){this.#y.set(t.hashKey(e),{mutationKey:e,defaultOptions:s})}getMutationDefaults(e){const s=[...this.#y.values()],i={};return s.forEach(s=>{t.partialMatchKey(e,s.mutationKey)&&Object.assign(i,s.defaultOptions)}),i}defaultQueryOptions(e){if(e._defaulted)return e;const s={...this.#c.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return s.queryHash||(s.queryHash=t.hashQueryKeyByOptions(s.queryKey,s)),void 0===s.refetchOnReconnect&&(s.refetchOnReconnect="always"!==s.networkMode),void 0===s.throwOnError&&(s.throwOnError=!!s.suspense),!s.networkMode&&s.persister&&(s.networkMode="offlineFirst"),s.queryFn===t.skipToken&&(s.enabled=!1),s}defaultMutationOptions(t){return t?._defaulted?t:{...this.#c.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#h.clear(),this.#s.clear()}};Object.defineProperty(exports,"QueryClient",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"hasNextPage",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"hasPreviousPage",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"infiniteQueryBehavior",{enumerable:!0,get:function(){return e}});
@@ -1,4 +1,4 @@
1
- import{B as e,C as t,Ct as r,F as n,N as o,Q as s,St as i,Tt as a,V as l,Y as c,_t as u,a as h,ct as d,dt as f,et as p,gt as m,i as y,it as g,lt as w,n as b,nt as _,ot as v,pt as R,rt as S,st as T,t as x,tt as E,u as A,vt as C,wt as O,xt as I,yt as P,z as q}from"./BJBX47Jb.js";import*as k from"react";import{jsx as N}from"react/jsx-runtime";var U=class extends w{constructor(t,r){super(),this.options=r,this.#e=t,this.#t=null,this.#r=e(),this.bindMethods(),this.setOptions(r)}#e;#n=void 0;#o=void 0;#s=void 0;#i;#a;#r;#t;#l;#c;#u;#h;#d;#f;#p=/* @__PURE__ */new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#n.addObserver(this),D(this.#n,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return M(this.#n,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return M(this.#n,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=/* @__PURE__ */new Set,this.#g(),this.#w(),this.#n.removeObserver(this)}setOptions(e){const t=this.options,r=this.#n;if(this.options=this.#e.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof E(this.options.enabled,this.#n))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#b(),this.#n.setOptions(this.options),t._defaulted&&!S(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#n,observer:this});const n=this.hasListeners();n&&L(this.#n,r,this.options,t)&&this.#m(),this.updateResult(),!n||this.#n===r&&E(this.options.enabled,this.#n)===E(t.enabled,this.#n)&&_(this.options.staleTime,this.#n)===_(t.staleTime,this.#n)||this.#_();const o=this.#v();!n||this.#n===r&&E(this.options.enabled,this.#n)===E(t.enabled,this.#n)&&o===this.#f||this.#R(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),r=this.createResult(t,e);var n;return n=r,S(this.getCurrentResult(),n)||(this.#s=r,this.#a=this.options,this.#i=this.#n.state),r}getCurrentResult(){return this.#s}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),"promise"===r&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#r.status||this.#r.reject(/* @__PURE__ */new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#n}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#m(e){this.#b();let t=this.#n.fetch(this.options,e);return e?.throwOnError||(t=t.catch(s)),t}#_(){this.#g();const e=_(this.options.staleTime,this.#n);if(l.isServer()||this.#s.isStale||!c(e))return;const t=v(this.#s.dataUpdatedAt,e)+1;this.#h=T.setTimeout(()=>{this.#s.isStale||this.updateResult()},t)}#v(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#n):this.options.refetchInterval)??!1}#R(e){this.#w(),this.#f=e,!l.isServer()&&!1!==E(this.options.enabled,this.#n)&&c(this.#f)&&0!==this.#f&&(this.#d=T.setInterval(()=>{(this.options.refetchIntervalInBackground||d.isFocused())&&this.#m()},this.#f))}#y(){this.#_(),this.#R(this.#v())}#g(){this.#h&&(T.clearTimeout(this.#h),this.#h=void 0)}#w(){this.#d&&(T.clearInterval(this.#d),this.#d=void 0)}createResult(t,r){const o=this.#n,s=this.options,i=this.#s,a=this.#i,l=this.#a,c=t!==o?t.state:this.#o,{state:u}=t;let h,d={...u},f=!1;if(r._optimisticResults){const e=this.hasListeners(),i=!e&&D(t,r),a=e&&L(t,o,r,s);(i||a)&&(d={...d,...n(u.data,t.options)}),"isRestoring"===r._optimisticResults&&(d.fetchStatus="idle")}let{error:m,errorUpdatedAt:y,status:g}=d;h=d.data;let w=!1;if(void 0!==r.placeholderData&&void 0===h&&"pending"===g){let e;i?.isPlaceholderData&&r.placeholderData===l?.placeholderData?(e=i.data,w=!0):e="function"==typeof r.placeholderData?r.placeholderData(this.#u?.state.data,this.#u):r.placeholderData,void 0!==e&&(g="success",h=p(i?.data,e,r),f=!0)}if(r.select&&void 0!==h&&!w)if(i&&h===a?.data&&r.select===this.#l)h=this.#c;else try{this.#l=r.select,h=r.select(h),h=p(i?.data,h,r),this.#c=h,this.#t=null}catch(x){this.#t=x}this.#t&&(m=this.#t,h=this.#c,y=Date.now(),g="error");const b="fetching"===d.fetchStatus,_="pending"===g,v="error"===g,R=_&&b,S=void 0!==h,T={status:g,fetchStatus:d.fetchStatus,isPending:_,isSuccess:"success"===g,isError:v,isInitialLoading:R,isLoading:R,data:h,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:y,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!_,isLoadingError:v&&!S,isPaused:"paused"===d.fetchStatus,isPlaceholderData:f,isRefetchError:v&&S,isStale:Q(t,r),refetch:this.refetch,promise:this.#r,isEnabled:!1!==E(r.enabled,t)};if(this.options.experimental_prefetchInRender){const r=void 0!==T.data,n="error"===T.status&&!r,s=e=>{n?e.reject(T.error):r&&e.resolve(T.data)},i=()=>{s(this.#r=T.promise=e())},a=this.#r;switch(a.status){case"pending":t.queryHash===o.queryHash&&s(a);break;case"fulfilled":(n||T.data!==a.value)&&i();break;case"rejected":n&&T.error===a.reason||i()}}return T}updateResult(){const e=this.#s,t=this.createResult(this.#n,this.options);this.#i=this.#n.state,this.#a=this.options,void 0!==this.#i.data&&(this.#u=this.#n),S(t,e)||(this.#s=t,this.#S({listeners:(()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#p.size)return!0;const n=new Set(r??this.#p);return this.options.throwOnError&&n.add("error"),Object.keys(this.#s).some(t=>{const r=t;return this.#s[r]!==e[r]&&n.has(r)})})()}))}#b(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#n)return;const t=this.#n;this.#n=e,this.#o=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#S(e){q.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#s)}),this.#e.getQueryCache().notify({query:this.#n,type:"observerResultsUpdated"})})}};function D(e,t){return function(e,t){return!1!==E(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||void 0!==e.state.data&&M(e,t,t.refetchOnMount)}function M(e,t,r){if(!1!==E(t.enabled,e)&&"static"!==_(t.staleTime,e)){const n="function"==typeof r?r(e):r;return"always"===n||!1!==n&&Q(e,t)}return!1}function L(e,t,r,n){return(e!==t||!1===E(n.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&Q(e,r)}function Q(e,t){return!1!==E(t.enabled,e)&&e.isStaleByTime(_(t.staleTime,e))}var j=k.createContext(!1);j.Provider;var F=k.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),z=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function H(e,t,r){if("production"!==process.env.NODE_ENV&&("object"!=typeof e||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const n=k.useContext(j),i=k.useContext(F),a=o(r),c=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(c);const u=a.getQueryCache().get(c.queryHash);"production"!==process.env.NODE_ENV&&(c.queryFn||console.error(`[${c.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),c._optimisticResults=n?"isRestoring":"optimistic",(e=>{if(e.suspense){const t=1e3,r=e=>"static"===e?e:Math.max(e??t,t),n=e.staleTime;e.staleTime="function"==typeof n?(...e)=>r(n(...e)):r(n),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,t))}})(c),((e,t,r)=>{const n=r?.state.error&&"function"==typeof e.throwOnError?g(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))})(c,i,u),(e=>{k.useEffect(()=>{e.clearReset()},[e])})(i);const h=!a.getQueryCache().get(c.queryHash),[d]=k.useState(()=>new t(a,c)),f=d.getOptimisticResult(c),p=!n&&!1!==e.subscribed;if(k.useSyncExternalStore(k.useCallback(e=>{const t=p?d.subscribe(q.batchCalls(e)):s;return d.updateResult(),t},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),k.useEffect(()=>{d.setOptions(c)},[c,d]),((e,t)=>e?.suspense&&t.isPending)(c,f))throw z(c,d,i);if((({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(o&&void 0===e.data||g(r,[e.error,n])))({result:f,errorResetBoundary:i,throwOnError:c.throwOnError,query:u,suspense:c.suspense}))throw f.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(c,f),c.experimental_prefetchInRender&&!l.isServer()&&((e,t)=>e.isLoading&&e.isFetching&&!t)(f,n)&&(h?z(c,d,i):u?.promise)?.catch(s).finally(()=>{d.updateResult()}),c.notifyOnChangeProps?f:d.trackResult(f)}function B(e,t){return H(e,U,t)}function V(e,t){for(var r in e)if("__source"!==r&&!(r in t))return!0;for(var n in t)if("__source"!==n&&e[n]!==t[n])return!0;return!1}function W(e,t){this.props=e,this.context=t}(W.prototype=new a).isPureReactComponent=!0,W.prototype.shouldComponentUpdate=function(e,t){return V(this.props,e)||V(this.state,t)};var Z=O.__b;O.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Z&&Z(e)},"undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref");var $=O.__e;O.__e=function(e,t,r,n){if(e.then)for(var o,s=t;s=s.__;)if((o=s.__c)&&o.__c)return t.__e??(t.__e=r.__e,t.__k=r.__k),o.__c(e,t);$(e,t,r,n)};var G=O.unmount;function J(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),e.__c.__H=null),null!=(e=function(e,t){for(var r in t)e[r]=t[r];return e}({},e)).__c&&(e.__c.__P===r&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return J(e,t,r)})),e}function K(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return K(e,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=r)),e}function Y(){this.__u=0,this.o=null,this.__b=null}function X(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function ee(e){var t,r,n,o=null;function s(s){if(t||(t=e()).then(function(e){e&&(o=e.default||e),n=!0},function(e){r=e,n=!0}),r)throw r;if(!n)throw t;return o?i(o,s):null}return s.displayName="Lazy",s.__f=!0,s}function te(){this.i=null,this.l=null}O.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),G&&G(e)},(Y.prototype=new a).__c=function(e,t){var r=t.__c,n=this;n.o??=[],n.o.push(r);var o=X(n.__v),s=!1,i=function(){s||n.__z||(s=!0,r.__R=null,o?o(l):l())};r.__R=i;var a=r.__P;r.__P=null;var l=function(){if(! --n.__u){if(n.state.__a){var e=n.state.__a;n.__v.__k[0]=K(e,e.__c.__P,e.__c.__O)}var t;for(n.setState({__a:n.__b=null});t=n.o.pop();)t.__P=a,t.forceUpdate()}};n.__u++||32&t.__u||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(i,i)},Y.prototype.componentWillUnmount=function(){this.o=[]},Y.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=J(this.__b,n,o.__O=o.__P)}this.__b=null}var s=t.__a&&i(r,null,e.fallback);return s&&(s.__u&=-33),[i(r,null,t.__a?null:e.children),s]};var re=function(e,t,r){if(++r[1]===r[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(r=e.i;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.i=r=r[2]}};function ne(e){return this.getChildContext=function(){return e.context},e.children}function oe(e){var t=this,r=e.h;if(t.componentWillUnmount=function(){C(null,t.v),t.v=null,t.h=null},t.h&&t.h!==r&&t.componentWillUnmount(),!t.v){for(var n=t.__v;null!==n&&!n.__m&&null!==n.__;)n=n.__;t.h=r,t.v={nodeType:1,parentNode:r,childNodes:[],__k:{__m:n.__m},contains:function(){return!0},namespaceURI:r.namespaceURI,insertBefore:function(e,r){this.childNodes.push(e),t.h.insertBefore(e,r)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.h.removeChild(e)}}}C(i(ne,{context:t.context},e.__v),t.v)}function se(e,t){var r=i(oe,{__v:e,h:t});return r.containerInfo=t,r}(te.prototype=new a).__a=function(e){var t=this,r=X(t.__v),n=t.l.get(e);return n[0]++,function(o){var s=function(){t.props.revealOrder?(n.push(o),re(t,e,n)):o()};r?r(s):s()}},te.prototype.render=function(e){this.i=null,this.l=/* @__PURE__ */new Map;var t=P(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var r=t.length;r--;)this.l.set(t[r],this.i=[1,0,this.i]);return e.children},te.prototype.componentDidUpdate=te.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,r){re(e,r,t)})};var ie="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ae=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,le=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,ce=/[A-Z0-9]/g,ue="undefined"!=typeof document,he=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};a.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(a.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var de=O.event;O.event=function(e){return de&&(e=de(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var fe={configurable:!0,get:function(){return this.class}},pe=O.vnode;O.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,r=e.type,n={},o=-1==r.indexOf("-");for(var s in t){var i=t[s];if(!("value"===s&&"defaultValue"in t&&null==i||ue&&"children"===s&&"noscript"===r||"class"===s||"className"===s)){var a=s.toLowerCase();"defaultValue"===s&&"value"in t&&null==t.value?s="value":"download"===s&&!0===i?i="":"translate"===a&&"no"===i?i=!1:"o"===a[0]&&"n"===a[1]?"ondoubleclick"===a?s="ondblclick":"onchange"!==a||"input"!==r&&"textarea"!==r||he(t.type)?"onfocus"===a?s="onfocusin":"onblur"===a?s="onfocusout":le.test(s)&&(s=a):a=s="oninput":o&&ae.test(s)?s=s.replace(ce,"-$&").toLowerCase():null===i&&(i=void 0),"oninput"===a&&n[s=a]&&(s="oninputCapture"),n[s]=i}}"select"==r&&(n.multiple&&Array.isArray(n.value)&&(n.value=P(t.children).forEach(function(e){e.props.selected=-1!=n.value.indexOf(e.props.value)})),null!=n.defaultValue&&(n.value=P(t.children).forEach(function(e){e.props.selected=n.multiple?-1!=n.defaultValue.indexOf(e.props.value):n.defaultValue==e.props.value}))),t.class&&!t.className?(n.class=t.class,Object.defineProperty(n,"className",fe)):t.className&&(n.class=n.className=t.className),e.props=n}(e),e.$$typeof=ie,pe&&pe(e)};var me=O.__r;O.__r=function(e){me&&me(e),e.__c};var ye=O.diffed;O.diffed=function(e){ye&&ye(e);var t=e.props,r=e.__e;null!=r&&"textarea"===e.type&&"value"in t&&t.value!==r.value&&(r.value=null==t.value?"":t.value)};var ge=class extends Error{response;request;options;constructor(e,t,r){const n=`${e.status||0===e.status?e.status:""} ${e.statusText??""}`.trim();super(`Request failed with ${n?`status code ${n}`:"an unknown error"}: ${t.method} ${t.url}`),this.name="HTTPError",this.response=e,this.request=t,this.options=r}},we=class extends Error{name="NonError";value;constructor(e){let t="Non-error value was thrown";try{"string"==typeof e?t=e:e&&"object"==typeof e&&"message"in e&&"string"==typeof e.message&&(t=e.message)}catch{}super(t),this.value=e}},be=class extends Error{name="ForceRetryError";customDelay;code;customRequest;constructor(e){const t=e?.cause?e.cause instanceof Error?e.cause:new we(e.cause):void 0;super(e?.code?`Forced retry: ${e.code}`:"Forced retry",t?{cause:t}:void 0),this.customDelay=e?.delay,this.code=e?.code,this.customRequest=e?.request}},_e=(()=>{let e=!1,t=!1;const r="function"==typeof globalThis.ReadableStream,n="function"==typeof globalThis.Request;if(r&&n)try{t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")}catch(o){if(o instanceof Error&&"unsupported BodyInit type"===o.message)return!1;throw o}return e&&!t})(),ve="function"==typeof globalThis.AbortController,Re="function"==typeof globalThis.AbortSignal&&"function"==typeof globalThis.AbortSignal.any,Se="function"==typeof globalThis.ReadableStream,Te="function"==typeof globalThis.FormData,xe=["get","post","put","patch","head","delete"],Ee={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},Ae=(new TextEncoder).encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,Ce=Symbol("stop"),Oe=class{options;constructor(e){this.options=e}},Ie=e=>new Oe(e),Pe={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},qe={next:!0},ke={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},Ne=(e,t,r)=>{let n,o=0;return e.pipeThrough(new TransformStream({transform(e,s){if(s.enqueue(e),n){o+=n.byteLength;let e=0===t?0:o/t;e>=1&&(e=1-Number.EPSILON),r?.({percent:e,totalBytes:Math.max(t,o),transferredBytes:o},n)}n=e},flush(){n&&(o+=n.byteLength,r?.({percent:1,totalBytes:Math.max(t,o),transferredBytes:o},n))}}))},Ue=e=>null!==e&&"object"==typeof e,De=(...e)=>{for(const t of e)if((!Ue(t)||Array.isArray(t))&&void 0!==t)throw new TypeError("The `options` argument must be an object");return Fe({},...e)},Me=(e={},t={})=>{const r=new globalThis.Headers(e),n=t instanceof globalThis.Headers,o=new globalThis.Headers(t);for(const[s,i]of o.entries())n&&"undefined"===i||void 0===i?r.delete(s):r.set(s,i);return r};function Le(e,t,r){return Object.hasOwn(t,r)&&void 0===t[r]?[]:Fe(e[r]??[],t[r]??[])}var Qe=(e={},t={})=>({beforeRequest:Le(e,t,"beforeRequest"),beforeRetry:Le(e,t,"beforeRetry"),afterResponse:Le(e,t,"afterResponse"),beforeError:Le(e,t,"beforeError")}),je=(e,t)=>{const r=new URLSearchParams;for(const n of[e,t])if(void 0!==n)if(n instanceof URLSearchParams)for(const[e,t]of n.entries())r.append(e,t);else if(Array.isArray(n))for(const e of n){if(!Array.isArray(e)||2!==e.length)throw new TypeError("Array search parameters must be provided in [[key, value], ...] format");r.append(String(e[0]),String(e[1]))}else if(Ue(n))for(const[e,t]of Object.entries(n))void 0!==t&&r.append(e,String(t));else{const e=new URLSearchParams(n);for(const[t,n]of e.entries())r.append(t,n)}return r},Fe=(...e)=>{let t,r={},n={},o={};const s=[];for(const i of e)if(Array.isArray(i))Array.isArray(r)||(r=[]),r=[...r,...i];else if(Ue(i)){for(let[e,n]of Object.entries(i))if("signal"===e&&n instanceof globalThis.AbortSignal)s.push(n);else if("context"!==e)"searchParams"!==e?(Ue(n)&&e in r&&(n=Fe(r[e],n)),r={...r,[e]:n}):t=null==n?void 0:void 0===t?n:je(t,n);else{if(null!=n&&(!Ue(n)||Array.isArray(n)))throw new TypeError("The `context` option must be an object");r={...r,context:null==n?{}:{...r.context,...n}}}Ue(i.hooks)&&(o=Qe(o,i.hooks),r.hooks=o),Ue(i.headers)&&(n=Me(n,i.headers),r.headers=n)}return void 0!==t&&(r.searchParams=t),s.length>0&&(1===s.length?r.signal=s[0]:r.signal=Re?AbortSignal.any(s):s.at(-1)),r},ze=e=>xe.includes(e)?e.toUpperCase():e,He={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3,jitter:void 0,retryOnTimeout:!1},Be=(e={})=>{if("number"==typeof e)return{...He,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.methods&&=e.methods.map(e=>e.toLowerCase()),e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");const t=Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e));return{...He,...t}},Ve=class extends Error{request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.name="TimeoutError",this.request=e}},We=class e{static create(t,r){const n=new e(t,r),o=n.#T(async()=>{if("number"==typeof n.#x.timeout&&n.#x.timeout>2147483647)throw new RangeError("The `timeout` option cannot be greater than 2147483647");await Promise.resolve();let e=await n.#E();for(const r of n.#x.hooks.afterResponse){const o=n.#A(e.clone());let s;try{s=await r(n.request,n.#C(),o,{retryCount:n.#O})}catch(t){throw n.#I(o),n.#I(e),t}if(s instanceof Oe)throw n.#I(o),n.#I(e),new be(s.options);const i=s instanceof globalThis.Response?s:e;o!==i&&n.#I(o),e!==i&&n.#I(e),e=i}if(n.#A(e),!e.ok&&("function"==typeof n.#x.throwHttpErrors?n.#x.throwHttpErrors(e.status):n.#x.throwHttpErrors)){let t=new ge(e,n.request,n.#C());for(const e of n.#x.hooks.beforeError)t=await e(t,{retryCount:n.#O});throw t}if(n.#x.onDownloadProgress){if("function"!=typeof n.#x.onDownloadProgress)throw new TypeError("The `onDownloadProgress` option must be a function");if(!Se)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const t=e.clone();return n.#I(e),((e,t)=>{if(!e.body)return e;if(204===e.status)return new Response(null,{status:e.status,statusText:e.statusText,headers:e.headers});const r=Math.max(0,Number(e.headers.get("content-length"))||0);return new Response(Ne(e.body,r,t),{status:e.status,statusText:e.statusText,headers:e.headers})})(t,n.#x.onDownloadProgress)}return e}).finally(()=>{const e=n.#P;n.#q(e?.body??void 0),n.#q(n.request.body??void 0)});for(const[e,s]of Object.entries(Ee))"bytes"===e&&"function"!=typeof globalThis.Response?.prototype?.bytes||(o[e]=async()=>{n.request.headers.set("accept",n.request.headers.get("accept")||s);const t=await o;if("json"===e){if(204===t.status)return"";const e=await t.text();return""===e?"":r.parseJson?r.parseJson(e):JSON.parse(e)}return t[e]()});return o}static#k(e){return!e||"object"!=typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e))}request;#N;#O=0;#U;#x;#P;#D;#M;constructor(t,r={}){if(this.#U=t,this.#x={...r,headers:Me(this.#U.headers,r.headers),hooks:Qe({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},r.hooks),method:ze(r.method??this.#U.method??"GET"),prefixUrl:String(r.prefixUrl||""),retry:Be(r.retry),throwHttpErrors:r.throwHttpErrors??!0,timeout:r.timeout??1e4,fetch:r.fetch??globalThis.fetch.bind(globalThis),context:r.context??{}},"string"!=typeof this.#U&&!(this.#U instanceof URL||this.#U instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this.#x.prefixUrl&&"string"==typeof this.#U){if(this.#U.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this.#x.prefixUrl.endsWith("/")||(this.#x.prefixUrl+="/"),this.#U=this.#x.prefixUrl+this.#U}ve&&Re&&(this.#D=this.#x.signal??this.#U.signal,this.#N=new globalThis.AbortController,this.#x.signal=this.#D?AbortSignal.any([this.#D,this.#N.signal]):this.#N.signal),_e&&(this.#x.duplex="half"),void 0!==this.#x.json&&(this.#x.body=this.#x.stringifyJson?.(this.#x.json)??JSON.stringify(this.#x.json),this.#x.headers.set("content-type",this.#x.headers.get("content-type")??"application/json"));const n=r.headers&&new globalThis.Headers(r.headers).has("content-type");if(this.#U instanceof globalThis.Request&&(Te&&this.#x.body instanceof globalThis.FormData||this.#x.body instanceof URLSearchParams)&&!n&&this.#x.headers.delete("content-type"),this.request=new globalThis.Request(this.#U,this.#x),void 0!==(o=this.#x.searchParams)&&(Array.isArray(o)?o.length>0:o instanceof URLSearchParams?o.size>0:"object"==typeof o?Object.keys(o).length>0:"string"==typeof o?o.trim().length>0:Boolean(o))){const t="?"+("string"==typeof this.#x.searchParams?this.#x.searchParams.replace(/^\?/,""):new URLSearchParams(e.#k(this.#x.searchParams)).toString()),r=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,t);this.request=new globalThis.Request(r,this.#x)}var o;if(this.#x.onUploadProgress){if("function"!=typeof this.#x.onUploadProgress)throw new TypeError("The `onUploadProgress` option must be a function");if(!_e)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=this.#L(this.request,this.#x.body??void 0)}}#Q(){const e=this.#x.retry.delay(this.#O);let t=e;!0===this.#x.retry.jitter?t=Math.random()*e:"function"==typeof this.#x.retry.jitter&&(t=this.#x.retry.jitter(e),(!Number.isFinite(t)||t<0)&&(t=e));const r=this.#x.retry.backoffLimit??Number.POSITIVE_INFINITY;return Math.min(r,t)}async#j(e){if(this.#O++,this.#O>this.#x.retry.limit)throw e;const t=e instanceof Error?e:new we(e);if(t instanceof be)return t.customDelay??this.#Q();if(!this.#x.retry.methods.includes(this.request.method.toLowerCase()))throw e;if(void 0!==this.#x.retry.shouldRetry){const r=await this.#x.retry.shouldRetry({error:t,retryCount:this.#O});if(!1===r)throw e;if(!0===r)return this.#Q()}if(function(e){return e instanceof Ve||e?.name===Ve.name}(e)&&!this.#x.retry.retryOnTimeout)throw e;if(function(e){return e instanceof ge||e?.name===ge.name}(e)){if(!this.#x.retry.statusCodes.includes(e.response.status))throw e;const t=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Retry-After")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(t&&this.#x.retry.afterStatusCodes.includes(e.response.status)){let e=1e3*Number(t);Number.isNaN(e)?e=Date.parse(t)-Date.now():e>=Date.parse("2024-01-01")&&(e-=Date.now());const r=this.#x.retry.maxRetryAfter??e;return e<r?e:r}if(413===e.response.status)throw e}return this.#Q()}#A(e){return this.#x.parseJson&&(e.json=async()=>this.#x.parseJson(await e.text())),e}#q(e){e&&e.cancel().catch(()=>{})}#I(e){this.#q(e.body??void 0)}async#T(e){try{return await e()}catch(t){const r=Math.min(await this.#j(t),2147483647);if(this.#O<1)throw t;if(await async function(e,{signal:t}){return new Promise((r,n)=>{function o(){clearTimeout(s),n(t.reason)}t&&(t.throwIfAborted(),t.addEventListener("abort",o,{once:!0}));const s=setTimeout(()=>{t?.removeEventListener("abort",o),r()},e)})}(r,this.#D?{signal:this.#D}:{}),t instanceof be&&t.customRequest){const e=this.#x.signal?new globalThis.Request(t.customRequest,{signal:this.#x.signal}):new globalThis.Request(t.customRequest);this.#F(e)}for(const e of this.#x.hooks.beforeRetry){const r=await e({request:this.request,options:this.#C(),error:t,retryCount:this.#O});if(r instanceof globalThis.Request){this.#F(r);break}if(r instanceof globalThis.Response)return r;if(r===Ce)return}return this.#T(e)}}async#E(){this.#N?.signal.aborted&&(this.#N=new globalThis.AbortController,this.#x.signal=this.#D?AbortSignal.any([this.#D,this.#N.signal]):this.#N.signal,this.request=new globalThis.Request(this.request,{signal:this.#x.signal}));for(const t of this.#x.hooks.beforeRequest){const e=await t(this.request,this.#C(),{retryCount:this.#O});if(e instanceof Response)return e;if(e instanceof globalThis.Request){this.#F(e);break}}const e=((e,t)=>{const r={};for(const n in t)Object.hasOwn(t,n)&&(n in ke||n in Pe||n in e&&!(n in qe)||(r[n]=t[n]));return r})(this.request,this.#x);return this.#P=this.request,this.request=this.#P.clone(),!1===this.#x.timeout?this.#x.fetch(this.#P,e):async function(e,t,r,n){return new Promise((o,s)=>{const i=setTimeout(()=>{r&&r.abort(),s(new Ve(e))},n.timeout);n.fetch(e,t).then(o).catch(s).then(()=>{clearTimeout(i)})})}(this.#P,e,this.#N,this.#x)}#C(){if(!this.#M){const{hooks:e,...t}=this.#x;this.#M=Object.freeze(t)}return this.#M}#F(e){this.#M=void 0,this.request=this.#L(e)}#L(e,t){return this.#x.onUploadProgress&&e.body?((e,t,r)=>{if(!e.body)return e;const n=(e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(const[r,n]of e)t+=Ae,t+=(new TextEncoder).encode(`Content-Disposition: form-data; name="${r}"`).length,t+="string"==typeof n?(new TextEncoder).encode(n).length:n.size;return t}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength;if("string"==typeof e)return(new TextEncoder).encode(e).length;if(e instanceof URLSearchParams)return(new TextEncoder).encode(e.toString()).length;if("byteLength"in e)return e.byteLength;if("object"==typeof e&&null!==e)try{const t=JSON.stringify(e);return(new TextEncoder).encode(t).length}catch{return 0}return 0})(r??e.body);return new Request(e,{duplex:"half",body:Ne(e.body,n,t)})})(e,this.#x.onUploadProgress,t??this.#x.body??void 0):e}},Ze=e=>{const t=(t,r)=>We.create(t,De(e,r));for(const r of xe)t[r]=(t,n)=>We.create(t,De(e,n,{method:r}));return t.create=e=>Ze(De(e)),t.extend=t=>("function"==typeof t&&(t=t(e??{})),Ze(De(e,t))),t.stop=Ce,t.retry=Ie,t},$e=Ze();function Ge({title:e,children:t}){/* @__PURE__ */
1
+ import{B as e,C as t,Ct as r,F as n,N as o,Q as s,St as i,Tt as a,V as l,Y as c,_t as u,a as h,ct as d,dt as f,et as p,gt as m,i as y,it as g,lt as w,n as b,nt as _,ot as v,pt as R,rt as S,st as T,t as x,tt as A,u as E,vt as C,wt as O,xt as I,yt as P,z as q}from"./QPXxc9eb.js";import*as k from"react";import{jsx as N}from"react/jsx-runtime";var U=class extends w{constructor(t,r){super(),this.options=r,this.#e=t,this.#t=null,this.#r=e(),this.bindMethods(),this.setOptions(r)}#e;#n=void 0;#o=void 0;#s=void 0;#i;#a;#r;#t;#l;#c;#u;#h;#d;#f;#p=/* @__PURE__ */new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#n.addObserver(this),D(this.#n,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return M(this.#n,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return M(this.#n,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=/* @__PURE__ */new Set,this.#g(),this.#w(),this.#n.removeObserver(this)}setOptions(e){const t=this.options,r=this.#n;if(this.options=this.#e.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof A(this.options.enabled,this.#n))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#b(),this.#n.setOptions(this.options),t._defaulted&&!S(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#n,observer:this});const n=this.hasListeners();n&&L(this.#n,r,this.options,t)&&this.#m(),this.updateResult(),!n||this.#n===r&&A(this.options.enabled,this.#n)===A(t.enabled,this.#n)&&_(this.options.staleTime,this.#n)===_(t.staleTime,this.#n)||this.#_();const o=this.#v();!n||this.#n===r&&A(this.options.enabled,this.#n)===A(t.enabled,this.#n)&&o===this.#f||this.#R(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),r=this.createResult(t,e);var n;return n=r,S(this.getCurrentResult(),n)||(this.#s=r,this.#a=this.options,this.#i=this.#n.state),r}getCurrentResult(){return this.#s}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),"promise"===r&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#r.status||this.#r.reject(/* @__PURE__ */new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#n}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#m(e){this.#b();let t=this.#n.fetch(this.options,e);return e?.throwOnError||(t=t.catch(s)),t}#_(){this.#g();const e=_(this.options.staleTime,this.#n);if(l.isServer()||this.#s.isStale||!c(e))return;const t=v(this.#s.dataUpdatedAt,e)+1;this.#h=T.setTimeout(()=>{this.#s.isStale||this.updateResult()},t)}#v(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#n):this.options.refetchInterval)??!1}#R(e){this.#w(),this.#f=e,!l.isServer()&&!1!==A(this.options.enabled,this.#n)&&c(this.#f)&&0!==this.#f&&(this.#d=T.setInterval(()=>{(this.options.refetchIntervalInBackground||d.isFocused())&&this.#m()},this.#f))}#y(){this.#_(),this.#R(this.#v())}#g(){this.#h&&(T.clearTimeout(this.#h),this.#h=void 0)}#w(){this.#d&&(T.clearInterval(this.#d),this.#d=void 0)}createResult(t,r){const o=this.#n,s=this.options,i=this.#s,a=this.#i,l=this.#a,c=t!==o?t.state:this.#o,{state:u}=t;let h,d={...u},f=!1;if(r._optimisticResults){const e=this.hasListeners(),i=!e&&D(t,r),a=e&&L(t,o,r,s);(i||a)&&(d={...d,...n(u.data,t.options)}),"isRestoring"===r._optimisticResults&&(d.fetchStatus="idle")}let{error:m,errorUpdatedAt:y,status:g}=d;h=d.data;let w=!1;if(void 0!==r.placeholderData&&void 0===h&&"pending"===g){let e;i?.isPlaceholderData&&r.placeholderData===l?.placeholderData?(e=i.data,w=!0):e="function"==typeof r.placeholderData?r.placeholderData(this.#u?.state.data,this.#u):r.placeholderData,void 0!==e&&(g="success",h=p(i?.data,e,r),f=!0)}if(r.select&&void 0!==h&&!w)if(i&&h===a?.data&&r.select===this.#l)h=this.#c;else try{this.#l=r.select,h=r.select(h),h=p(i?.data,h,r),this.#c=h,this.#t=null}catch(x){this.#t=x}this.#t&&(m=this.#t,h=this.#c,y=Date.now(),g="error");const b="fetching"===d.fetchStatus,_="pending"===g,v="error"===g,R=_&&b,S=void 0!==h,T={status:g,fetchStatus:d.fetchStatus,isPending:_,isSuccess:"success"===g,isError:v,isInitialLoading:R,isLoading:R,data:h,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:y,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!_,isLoadingError:v&&!S,isPaused:"paused"===d.fetchStatus,isPlaceholderData:f,isRefetchError:v&&S,isStale:Q(t,r),refetch:this.refetch,promise:this.#r,isEnabled:!1!==A(r.enabled,t)};if(this.options.experimental_prefetchInRender){const r=void 0!==T.data,n="error"===T.status&&!r,s=e=>{n?e.reject(T.error):r&&e.resolve(T.data)},i=()=>{s(this.#r=T.promise=e())},a=this.#r;switch(a.status){case"pending":t.queryHash===o.queryHash&&s(a);break;case"fulfilled":(n||T.data!==a.value)&&i();break;case"rejected":n&&T.error===a.reason||i()}}return T}updateResult(){const e=this.#s,t=this.createResult(this.#n,this.options);this.#i=this.#n.state,this.#a=this.options,void 0!==this.#i.data&&(this.#u=this.#n),S(t,e)||(this.#s=t,this.#S({listeners:(()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#p.size)return!0;const n=new Set(r??this.#p);return this.options.throwOnError&&n.add("error"),Object.keys(this.#s).some(t=>{const r=t;return this.#s[r]!==e[r]&&n.has(r)})})()}))}#b(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#n)return;const t=this.#n;this.#n=e,this.#o=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#S(e){q.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#s)}),this.#e.getQueryCache().notify({query:this.#n,type:"observerResultsUpdated"})})}};function D(e,t){return function(e,t){return!1!==A(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||void 0!==e.state.data&&M(e,t,t.refetchOnMount)}function M(e,t,r){if(!1!==A(t.enabled,e)&&"static"!==_(t.staleTime,e)){const n="function"==typeof r?r(e):r;return"always"===n||!1!==n&&Q(e,t)}return!1}function L(e,t,r,n){return(e!==t||!1===A(n.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&Q(e,r)}function Q(e,t){return!1!==A(t.enabled,e)&&e.isStaleByTime(_(t.staleTime,e))}var j=k.createContext(!1);j.Provider;var F=k.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),z=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function H(e,t,r){if("production"!==process.env.NODE_ENV&&("object"!=typeof e||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const n=k.useContext(j),i=k.useContext(F),a=o(r),c=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(c);const u=a.getQueryCache().get(c.queryHash);"production"!==process.env.NODE_ENV&&(c.queryFn||console.error(`[${c.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),c._optimisticResults=n?"isRestoring":"optimistic",(e=>{if(e.suspense){const t=1e3,r=e=>"static"===e?e:Math.max(e??t,t),n=e.staleTime;e.staleTime="function"==typeof n?(...e)=>r(n(...e)):r(n),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,t))}})(c),((e,t,r)=>{const n=r?.state.error&&"function"==typeof e.throwOnError?g(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))})(c,i,u),(e=>{k.useEffect(()=>{e.clearReset()},[e])})(i);const h=!a.getQueryCache().get(c.queryHash),[d]=k.useState(()=>new t(a,c)),f=d.getOptimisticResult(c),p=!n&&!1!==e.subscribed;if(k.useSyncExternalStore(k.useCallback(e=>{const t=p?d.subscribe(q.batchCalls(e)):s;return d.updateResult(),t},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),k.useEffect(()=>{d.setOptions(c)},[c,d]),((e,t)=>e?.suspense&&t.isPending)(c,f))throw z(c,d,i);if((({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(o&&void 0===e.data||g(r,[e.error,n])))({result:f,errorResetBoundary:i,throwOnError:c.throwOnError,query:u,suspense:c.suspense}))throw f.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(c,f),c.experimental_prefetchInRender&&!l.isServer()&&((e,t)=>e.isLoading&&e.isFetching&&!t)(f,n)&&(h?z(c,d,i):u?.promise)?.catch(s).finally(()=>{d.updateResult()}),c.notifyOnChangeProps?f:d.trackResult(f)}function B(e,t){return H(e,U,t)}function V(e,t){for(var r in e)if("__source"!==r&&!(r in t))return!0;for(var n in t)if("__source"!==n&&e[n]!==t[n])return!0;return!1}function W(e,t){this.props=e,this.context=t}(W.prototype=new a).isPureReactComponent=!0,W.prototype.shouldComponentUpdate=function(e,t){return V(this.props,e)||V(this.state,t)};var Z=O.__b;O.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Z&&Z(e)},"undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref");var $=O.__e;O.__e=function(e,t,r,n){if(e.then)for(var o,s=t;s=s.__;)if((o=s.__c)&&o.__c)return t.__e??(t.__e=r.__e,t.__k=r.__k),o.__c(e,t);$(e,t,r,n)};var G=O.unmount;function J(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),e.__c.__H=null),null!=(e=function(e,t){for(var r in t)e[r]=t[r];return e}({},e)).__c&&(e.__c.__P===r&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return J(e,t,r)})),e}function K(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return K(e,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=r)),e}function Y(){this.__u=0,this.o=null,this.__b=null}function X(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function ee(e){var t,r,n,o=null;function s(s){if(t||(t=e()).then(function(e){e&&(o=e.default||e),n=!0},function(e){r=e,n=!0}),r)throw r;if(!n)throw t;return o?i(o,s):null}return s.displayName="Lazy",s.__f=!0,s}function te(){this.i=null,this.l=null}O.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),G&&G(e)},(Y.prototype=new a).__c=function(e,t){var r=t.__c,n=this;n.o??=[],n.o.push(r);var o=X(n.__v),s=!1,i=function(){s||n.__z||(s=!0,r.__R=null,o?o(l):l())};r.__R=i;var a=r.__P;r.__P=null;var l=function(){if(! --n.__u){if(n.state.__a){var e=n.state.__a;n.__v.__k[0]=K(e,e.__c.__P,e.__c.__O)}var t;for(n.setState({__a:n.__b=null});t=n.o.pop();)t.__P=a,t.forceUpdate()}};n.__u++||32&t.__u||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(i,i)},Y.prototype.componentWillUnmount=function(){this.o=[]},Y.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=J(this.__b,n,o.__O=o.__P)}this.__b=null}var s=t.__a&&i(r,null,e.fallback);return s&&(s.__u&=-33),[i(r,null,t.__a?null:e.children),s]};var re=function(e,t,r){if(++r[1]===r[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(r=e.i;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.i=r=r[2]}};function ne(e){return this.getChildContext=function(){return e.context},e.children}function oe(e){var t=this,r=e.h;if(t.componentWillUnmount=function(){C(null,t.v),t.v=null,t.h=null},t.h&&t.h!==r&&t.componentWillUnmount(),!t.v){for(var n=t.__v;null!==n&&!n.__m&&null!==n.__;)n=n.__;t.h=r,t.v={nodeType:1,parentNode:r,childNodes:[],__k:{__m:n.__m},contains:function(){return!0},namespaceURI:r.namespaceURI,insertBefore:function(e,r){this.childNodes.push(e),t.h.insertBefore(e,r)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.h.removeChild(e)}}}C(i(ne,{context:t.context},e.__v),t.v)}function se(e,t){var r=i(oe,{__v:e,h:t});return r.containerInfo=t,r}(te.prototype=new a).__a=function(e){var t=this,r=X(t.__v),n=t.l.get(e);return n[0]++,function(o){var s=function(){t.props.revealOrder?(n.push(o),re(t,e,n)):o()};r?r(s):s()}},te.prototype.render=function(e){this.i=null,this.l=/* @__PURE__ */new Map;var t=P(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var r=t.length;r--;)this.l.set(t[r],this.i=[1,0,this.i]);return e.children},te.prototype.componentDidUpdate=te.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,r){re(e,r,t)})};var ie="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ae=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,le=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,ce=/[A-Z0-9]/g,ue="undefined"!=typeof document,he=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};a.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(a.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var de=O.event;O.event=function(e){return de&&(e=de(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var fe={configurable:!0,get:function(){return this.class}},pe=O.vnode;O.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,r=e.type,n={},o=-1==r.indexOf("-");for(var s in t){var i=t[s];if(!("value"===s&&"defaultValue"in t&&null==i||ue&&"children"===s&&"noscript"===r||"class"===s||"className"===s)){var a=s.toLowerCase();"defaultValue"===s&&"value"in t&&null==t.value?s="value":"download"===s&&!0===i?i="":"translate"===a&&"no"===i?i=!1:"o"===a[0]&&"n"===a[1]?"ondoubleclick"===a?s="ondblclick":"onchange"!==a||"input"!==r&&"textarea"!==r||he(t.type)?"onfocus"===a?s="onfocusin":"onblur"===a?s="onfocusout":le.test(s)&&(s=a):a=s="oninput":o&&ae.test(s)?s=s.replace(ce,"-$&").toLowerCase():null===i&&(i=void 0),"oninput"===a&&n[s=a]&&(s="oninputCapture"),n[s]=i}}"select"==r&&(n.multiple&&Array.isArray(n.value)&&(n.value=P(t.children).forEach(function(e){e.props.selected=-1!=n.value.indexOf(e.props.value)})),null!=n.defaultValue&&(n.value=P(t.children).forEach(function(e){e.props.selected=n.multiple?-1!=n.defaultValue.indexOf(e.props.value):n.defaultValue==e.props.value}))),t.class&&!t.className?(n.class=t.class,Object.defineProperty(n,"className",fe)):t.className&&(n.class=n.className=t.className),e.props=n}(e),e.$$typeof=ie,pe&&pe(e)};var me=O.__r;O.__r=function(e){me&&me(e),e.__c};var ye=O.diffed;O.diffed=function(e){ye&&ye(e);var t=e.props,r=e.__e;null!=r&&"textarea"===e.type&&"value"in t&&t.value!==r.value&&(r.value=null==t.value?"":t.value)};var ge=class extends Error{response;request;options;constructor(e,t,r){const n=`${e.status||0===e.status?e.status:""} ${e.statusText??""}`.trim();super(`Request failed with ${n?`status code ${n}`:"an unknown error"}: ${t.method} ${t.url}`),this.name="HTTPError",this.response=e,this.request=t,this.options=r}},we=class extends Error{name="NonError";value;constructor(e){let t="Non-error value was thrown";try{"string"==typeof e?t=e:e&&"object"==typeof e&&"message"in e&&"string"==typeof e.message&&(t=e.message)}catch{}super(t),this.value=e}},be=class extends Error{name="ForceRetryError";customDelay;code;customRequest;constructor(e){const t=e?.cause?e.cause instanceof Error?e.cause:new we(e.cause):void 0;super(e?.code?`Forced retry: ${e.code}`:"Forced retry",t?{cause:t}:void 0),this.customDelay=e?.delay,this.code=e?.code,this.customRequest=e?.request}},_e=(()=>{let e=!1,t=!1;const r="function"==typeof globalThis.ReadableStream,n="function"==typeof globalThis.Request;if(r&&n)try{t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")}catch(o){if(o instanceof Error&&"unsupported BodyInit type"===o.message)return!1;throw o}return e&&!t})(),ve="function"==typeof globalThis.AbortController,Re="function"==typeof globalThis.AbortSignal&&"function"==typeof globalThis.AbortSignal.any,Se="function"==typeof globalThis.ReadableStream,Te="function"==typeof globalThis.FormData,xe=["get","post","put","patch","head","delete"],Ae={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},Ee=(new TextEncoder).encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,Ce=Symbol("stop"),Oe=class{options;constructor(e){this.options=e}},Ie=e=>new Oe(e),Pe={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},qe={next:!0},ke={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},Ne=(e,t,r)=>{let n,o=0;return e.pipeThrough(new TransformStream({transform(e,s){if(s.enqueue(e),n){o+=n.byteLength;let e=0===t?0:o/t;e>=1&&(e=1-Number.EPSILON),r?.({percent:e,totalBytes:Math.max(t,o),transferredBytes:o},n)}n=e},flush(){n&&(o+=n.byteLength,r?.({percent:1,totalBytes:Math.max(t,o),transferredBytes:o},n))}}))},Ue=e=>null!==e&&"object"==typeof e,De=(...e)=>{for(const t of e)if((!Ue(t)||Array.isArray(t))&&void 0!==t)throw new TypeError("The `options` argument must be an object");return Fe({},...e)},Me=(e={},t={})=>{const r=new globalThis.Headers(e),n=t instanceof globalThis.Headers,o=new globalThis.Headers(t);for(const[s,i]of o.entries())n&&"undefined"===i||void 0===i?r.delete(s):r.set(s,i);return r};function Le(e,t,r){return Object.hasOwn(t,r)&&void 0===t[r]?[]:Fe(e[r]??[],t[r]??[])}var Qe=(e={},t={})=>({beforeRequest:Le(e,t,"beforeRequest"),beforeRetry:Le(e,t,"beforeRetry"),afterResponse:Le(e,t,"afterResponse"),beforeError:Le(e,t,"beforeError")}),je=(e,t)=>{const r=new URLSearchParams;for(const n of[e,t])if(void 0!==n)if(n instanceof URLSearchParams)for(const[e,t]of n.entries())r.append(e,t);else if(Array.isArray(n))for(const e of n){if(!Array.isArray(e)||2!==e.length)throw new TypeError("Array search parameters must be provided in [[key, value], ...] format");r.append(String(e[0]),String(e[1]))}else if(Ue(n))for(const[e,t]of Object.entries(n))void 0!==t&&r.append(e,String(t));else{const e=new URLSearchParams(n);for(const[t,n]of e.entries())r.append(t,n)}return r},Fe=(...e)=>{let t,r={},n={},o={};const s=[];for(const i of e)if(Array.isArray(i))Array.isArray(r)||(r=[]),r=[...r,...i];else if(Ue(i)){for(let[e,n]of Object.entries(i))if("signal"===e&&n instanceof globalThis.AbortSignal)s.push(n);else if("context"!==e)"searchParams"!==e?(Ue(n)&&e in r&&(n=Fe(r[e],n)),r={...r,[e]:n}):t=null==n?void 0:void 0===t?n:je(t,n);else{if(null!=n&&(!Ue(n)||Array.isArray(n)))throw new TypeError("The `context` option must be an object");r={...r,context:null==n?{}:{...r.context,...n}}}Ue(i.hooks)&&(o=Qe(o,i.hooks),r.hooks=o),Ue(i.headers)&&(n=Me(n,i.headers),r.headers=n)}return void 0!==t&&(r.searchParams=t),s.length>0&&(1===s.length?r.signal=s[0]:r.signal=Re?AbortSignal.any(s):s.at(-1)),r},ze=e=>xe.includes(e)?e.toUpperCase():e,He={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3,jitter:void 0,retryOnTimeout:!1},Be=(e={})=>{if("number"==typeof e)return{...He,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.methods&&=e.methods.map(e=>e.toLowerCase()),e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");const t=Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e));return{...He,...t}},Ve=class extends Error{request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.name="TimeoutError",this.request=e}},We=class e{static create(t,r){const n=new e(t,r),o=n.#T(async()=>{if("number"==typeof n.#x.timeout&&n.#x.timeout>2147483647)throw new RangeError("The `timeout` option cannot be greater than 2147483647");await Promise.resolve();let e=await n.#A();for(const r of n.#x.hooks.afterResponse){const o=n.#E(e.clone());let s;try{s=await r(n.request,n.#C(),o,{retryCount:n.#O})}catch(t){throw n.#I(o),n.#I(e),t}if(s instanceof Oe)throw n.#I(o),n.#I(e),new be(s.options);const i=s instanceof globalThis.Response?s:e;o!==i&&n.#I(o),e!==i&&n.#I(e),e=i}if(n.#E(e),!e.ok&&("function"==typeof n.#x.throwHttpErrors?n.#x.throwHttpErrors(e.status):n.#x.throwHttpErrors)){let t=new ge(e,n.request,n.#C());for(const e of n.#x.hooks.beforeError)t=await e(t,{retryCount:n.#O});throw t}if(n.#x.onDownloadProgress){if("function"!=typeof n.#x.onDownloadProgress)throw new TypeError("The `onDownloadProgress` option must be a function");if(!Se)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const t=e.clone();return n.#I(e),((e,t)=>{if(!e.body)return e;if(204===e.status)return new Response(null,{status:e.status,statusText:e.statusText,headers:e.headers});const r=Math.max(0,Number(e.headers.get("content-length"))||0);return new Response(Ne(e.body,r,t),{status:e.status,statusText:e.statusText,headers:e.headers})})(t,n.#x.onDownloadProgress)}return e}).finally(()=>{const e=n.#P;n.#q(e?.body??void 0),n.#q(n.request.body??void 0)});for(const[e,s]of Object.entries(Ae))"bytes"===e&&"function"!=typeof globalThis.Response?.prototype?.bytes||(o[e]=async()=>{n.request.headers.set("accept",n.request.headers.get("accept")||s);const t=await o;if("json"===e){if(204===t.status)return"";const e=await t.text();return""===e?"":r.parseJson?r.parseJson(e):JSON.parse(e)}return t[e]()});return o}static#k(e){return!e||"object"!=typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e))}request;#N;#O=0;#U;#x;#P;#D;#M;constructor(t,r={}){if(this.#U=t,this.#x={...r,headers:Me(this.#U.headers,r.headers),hooks:Qe({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},r.hooks),method:ze(r.method??this.#U.method??"GET"),prefixUrl:String(r.prefixUrl||""),retry:Be(r.retry),throwHttpErrors:r.throwHttpErrors??!0,timeout:r.timeout??1e4,fetch:r.fetch??globalThis.fetch.bind(globalThis),context:r.context??{}},"string"!=typeof this.#U&&!(this.#U instanceof URL||this.#U instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this.#x.prefixUrl&&"string"==typeof this.#U){if(this.#U.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this.#x.prefixUrl.endsWith("/")||(this.#x.prefixUrl+="/"),this.#U=this.#x.prefixUrl+this.#U}ve&&Re&&(this.#D=this.#x.signal??this.#U.signal,this.#N=new globalThis.AbortController,this.#x.signal=this.#D?AbortSignal.any([this.#D,this.#N.signal]):this.#N.signal),_e&&(this.#x.duplex="half"),void 0!==this.#x.json&&(this.#x.body=this.#x.stringifyJson?.(this.#x.json)??JSON.stringify(this.#x.json),this.#x.headers.set("content-type",this.#x.headers.get("content-type")??"application/json"));const n=r.headers&&new globalThis.Headers(r.headers).has("content-type");if(this.#U instanceof globalThis.Request&&(Te&&this.#x.body instanceof globalThis.FormData||this.#x.body instanceof URLSearchParams)&&!n&&this.#x.headers.delete("content-type"),this.request=new globalThis.Request(this.#U,this.#x),void 0!==(o=this.#x.searchParams)&&(Array.isArray(o)?o.length>0:o instanceof URLSearchParams?o.size>0:"object"==typeof o?Object.keys(o).length>0:"string"==typeof o?o.trim().length>0:Boolean(o))){const t="?"+("string"==typeof this.#x.searchParams?this.#x.searchParams.replace(/^\?/,""):new URLSearchParams(e.#k(this.#x.searchParams)).toString()),r=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,t);this.request=new globalThis.Request(r,this.#x)}var o;if(this.#x.onUploadProgress){if("function"!=typeof this.#x.onUploadProgress)throw new TypeError("The `onUploadProgress` option must be a function");if(!_e)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=this.#L(this.request,this.#x.body??void 0)}}#Q(){const e=this.#x.retry.delay(this.#O);let t=e;!0===this.#x.retry.jitter?t=Math.random()*e:"function"==typeof this.#x.retry.jitter&&(t=this.#x.retry.jitter(e),(!Number.isFinite(t)||t<0)&&(t=e));const r=this.#x.retry.backoffLimit??Number.POSITIVE_INFINITY;return Math.min(r,t)}async#j(e){if(this.#O++,this.#O>this.#x.retry.limit)throw e;const t=e instanceof Error?e:new we(e);if(t instanceof be)return t.customDelay??this.#Q();if(!this.#x.retry.methods.includes(this.request.method.toLowerCase()))throw e;if(void 0!==this.#x.retry.shouldRetry){const r=await this.#x.retry.shouldRetry({error:t,retryCount:this.#O});if(!1===r)throw e;if(!0===r)return this.#Q()}if(function(e){return e instanceof Ve||e?.name===Ve.name}(e)&&!this.#x.retry.retryOnTimeout)throw e;if(function(e){return e instanceof ge||e?.name===ge.name}(e)){if(!this.#x.retry.statusCodes.includes(e.response.status))throw e;const t=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Retry-After")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(t&&this.#x.retry.afterStatusCodes.includes(e.response.status)){let e=1e3*Number(t);Number.isNaN(e)?e=Date.parse(t)-Date.now():e>=Date.parse("2024-01-01")&&(e-=Date.now());const r=this.#x.retry.maxRetryAfter??e;return e<r?e:r}if(413===e.response.status)throw e}return this.#Q()}#E(e){return this.#x.parseJson&&(e.json=async()=>this.#x.parseJson(await e.text())),e}#q(e){e&&e.cancel().catch(()=>{})}#I(e){this.#q(e.body??void 0)}async#T(e){try{return await e()}catch(t){const r=Math.min(await this.#j(t),2147483647);if(this.#O<1)throw t;if(await async function(e,{signal:t}){return new Promise((r,n)=>{function o(){clearTimeout(s),n(t.reason)}t&&(t.throwIfAborted(),t.addEventListener("abort",o,{once:!0}));const s=setTimeout(()=>{t?.removeEventListener("abort",o),r()},e)})}(r,this.#D?{signal:this.#D}:{}),t instanceof be&&t.customRequest){const e=this.#x.signal?new globalThis.Request(t.customRequest,{signal:this.#x.signal}):new globalThis.Request(t.customRequest);this.#F(e)}for(const e of this.#x.hooks.beforeRetry){const r=await e({request:this.request,options:this.#C(),error:t,retryCount:this.#O});if(r instanceof globalThis.Request){this.#F(r);break}if(r instanceof globalThis.Response)return r;if(r===Ce)return}return this.#T(e)}}async#A(){this.#N?.signal.aborted&&(this.#N=new globalThis.AbortController,this.#x.signal=this.#D?AbortSignal.any([this.#D,this.#N.signal]):this.#N.signal,this.request=new globalThis.Request(this.request,{signal:this.#x.signal}));for(const t of this.#x.hooks.beforeRequest){const e=await t(this.request,this.#C(),{retryCount:this.#O});if(e instanceof Response)return e;if(e instanceof globalThis.Request){this.#F(e);break}}const e=((e,t)=>{const r={};for(const n in t)Object.hasOwn(t,n)&&(n in ke||n in Pe||n in e&&!(n in qe)||(r[n]=t[n]));return r})(this.request,this.#x);return this.#P=this.request,this.request=this.#P.clone(),!1===this.#x.timeout?this.#x.fetch(this.#P,e):async function(e,t,r,n){return new Promise((o,s)=>{const i=setTimeout(()=>{r&&r.abort(),s(new Ve(e))},n.timeout);n.fetch(e,t).then(o).catch(s).then(()=>{clearTimeout(i)})})}(this.#P,e,this.#N,this.#x)}#C(){if(!this.#M){const{hooks:e,...t}=this.#x;this.#M=Object.freeze(t)}return this.#M}#F(e){this.#M=void 0,this.request=this.#L(e)}#L(e,t){return this.#x.onUploadProgress&&e.body?((e,t,r)=>{if(!e.body)return e;const n=(e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(const[r,n]of e)t+=Ee,t+=(new TextEncoder).encode(`Content-Disposition: form-data; name="${r}"`).length,t+="string"==typeof n?(new TextEncoder).encode(n).length:n.size;return t}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength;if("string"==typeof e)return(new TextEncoder).encode(e).length;if(e instanceof URLSearchParams)return(new TextEncoder).encode(e.toString()).length;if("byteLength"in e)return e.byteLength;if("object"==typeof e&&null!==e)try{const t=JSON.stringify(e);return(new TextEncoder).encode(t).length}catch{return 0}return 0})(r??e.body);return new Request(e,{duplex:"half",body:Ne(e.body,n,t)})})(e,this.#x.onUploadProgress,t??this.#x.body??void 0):e}},Ze=e=>{const t=(t,r)=>We.create(t,De(e,r));for(const r of xe)t[r]=(t,n)=>We.create(t,De(e,n,{method:r}));return t.create=e=>Ze(De(e)),t.extend=t=>("function"==typeof t&&(t=t(e??{})),Ze(De(e,t))),t.stop=Ce,t.retry=Ie,t},$e=Ze();function Ge({title:e,children:t}){/* @__PURE__ */
2
2
  return h("div",{className:"mx-auto mt-24 w-fit max-w-xl space-y-8",children:[/* @__PURE__ */h("svg",{xmlns:"http://www.w3.org/2000/svg",className:"mx-auto h-64 w-fit",width:"800",height:"469.317",viewBox:"0 0 800 469.317",role:"img","aria-label":"Error illustration",children:/* @__PURE__ */h("g",{transform:"translate(-443.142 -257.876)",children:[
3
3
  /* @__PURE__ */h("path",{d:"M898.247,664.1H371.155a30.276,30.276,0,0,1-30.241-30.241V352.525a30.276,30.276,0,0,1,30.241-30.241H898.247a30.276,30.276,0,0,1,30.241,30.241V633.862A30.276,30.276,0,0,1,898.247,664.1Z",transform:"translate(308.867 25.517)",fill:"#fff"}),
4
4
  /* @__PURE__ */h("path",{d:"M557.334,341.82H30.241A30.276,30.276,0,0,1,0,311.578V30.241A30.276,30.276,0,0,1,30.241,0H557.334a30.276,30.276,0,0,1,30.241,30.241V311.578A30.276,30.276,0,0,1,557.334,341.82ZM30.241,1.833A28.441,28.441,0,0,0,1.833,30.241V311.578a28.441,28.441,0,0,0,28.409,28.409H557.334a28.441,28.441,0,0,0,28.409-28.409V30.241A28.441,28.441,0,0,0,557.334,1.833Z",transform:"matrix(0.999, -0.035, 0.035, 0.999, 643.995, 358.158)",fill:"#d6d6e3"}),
@@ -29,4 +29,4 @@ return h("div",{className:"mx-auto mt-24 w-fit max-w-xl space-y-8",children:[/*
29
29
  /* @__PURE__ */h("path",{d:"M630.131,617.508a2.452,2.452,0,0,0-3.312-1.027l-9.931,5.228-3.4-195h-.272L608.039,707.89h10.353l-1.408-80.69,12.119-6.38A2.452,2.452,0,0,0,630.131,617.508Z",transform:"translate(-422.315 -280.9)",fill:"#3f3d56"})]})]})}),/* @__PURE__ */h("div",{className:"space-y-4",children:[/* @__PURE__ */h("h4",{className:"text-foreground text-center text-lg font-semibold",children:e}),/* @__PURE__ */h("p",{className:"text-muted-foreground text-center",children:t})]})]})}function Je({organizationId:e,errorType:r}){/* @__PURE__ */
30
30
  return h(Ge,"custom-auth-invalid"===r?{title:"Invalid input",children:"Custom auth mode requires uid, fname, lname. For more details please contact Qrati support."}:{title:"page-not-registered"===r?"Page not registered":"Something went wrong",children:["If you are an admin of this organization, please add the current page URL in Allowed URLs under"," ",
31
31
  /* @__PURE__ */h("a",{className:"font-medium text-blue-500",href:t.ORGANIZATION_SETTINGS(e),target:"_blank",rel:"noreferrer",children:"Organization Settings"})," ","⇨"," ",
32
- /* @__PURE__ */h("a",{className:"font-medium text-blue-500",href:t.ORGANIZATION_SETTINGS_INTEGRATION(e),target:"_blank",rel:"noreferrer",children:"Integration Settings"}),". For more details please contact Qrati support."]})}var Ke=e=>({google:"Google",apple:"Apple"}[e]||e.charAt(0).toUpperCase()+e.slice(1)),Ye=(e,t=0)=>{let r=t^e.length,n=0;const o=e.length;for(;n+3<o;){let t=255&e.charCodeAt(n)|(255&e.charCodeAt(n+1))<<8|(255&e.charCodeAt(n+2))<<16|(255&e.charCodeAt(n+3))<<24;t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),r^=t,r=r<<13|r>>>19,r=Math.imul(r,5)+3864292196,n+=4}let s=0;switch(o-n){case 3:s^=(255&e.charCodeAt(n+2))<<16;case 2:s^=(255&e.charCodeAt(n+1))<<8;case 1:s^=255&e.charCodeAt(n),s=Math.imul(s,3432918353),s=s<<15|s>>>17,s=Math.imul(s,461845907),r^=s}return r^=r>>>16,r=Math.imul(r,2246822507),r^=r>>>13,r=Math.imul(r,3266489909),r^=r>>>16,r>>>=0,r.toString(16).padStart(8,"0")},Xe=async e=>{try{return await e()}catch{return null}},et=e=>{if(null===e||"object"!=typeof e)return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(et).join(",")}]`;const t=Object.keys(e).sort(),r=[];for(const n of t){const t=e[n];void 0!==t&&r.push(`${et(n)}:${et(t)}`)}return`{${r.join(",")}}`},tt=async({debug:e=!1}={})=>{const t=await Xe(()=>it()),r=await Xe(()=>new Intl.NumberFormat(window.navigator.languages?.[0]||"en").resolvedOptions().numberingSystem),n=window.navigator.languages?Array.from(window.navigator.languages).join(","):window.navigator.language||null,o=Intl.DateTimeFormat().resolvedOptions().timeZone,s=/* @__PURE__ */(new Date).getTimezoneOffset(),i=window.matchMedia("(prefers-reduced-motion: reduce)").matches?"reduce":"no-preference",a=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",l=window.matchMedia("(forced-colors: active)").matches?"active":null,{pixelDepth:c,colorDepth:u}=window.screen,h="ontouchstart"in window||window.navigator.maxTouchPoints>0,d=await Xe(()=>rt(e)),f=await Xe(()=>nt()),p=await Xe(()=>ot(e)),m=await Xe(()=>st(e)),y=window.screen.width&&window.screen.height?(window.screen.width/window.screen.height).toFixed(4):null,g={vendor:window.navigator.vendor||null,platform:window.navigator.platform||null,fonts:t,numberingSystem:r,languages:n,timezone:o,timezoneOffset:s,reducedMotion:i,colorScheme:a,hardwareConcurrency:window.navigator.hardwareConcurrency||null,deviceMemory:window.navigator.deviceMemory||null,forcedColors:l,pixelDepth:c,colorDepth:u,touchSupport:h,canvasID:d,webglID:f,webgpuID:p,audioID:m},w={aspectRatio:y,width:window.screen.width,height:window.screen.height,maxTouchPoints:window.navigator.maxTouchPoints};return(!0===navigator.userAgentData?.mobile||/Mobi|Android|iPhone|iPad|iPod|webOS|BlackBerry|Windows Phone/i.test(navigator.userAgent)||navigator.maxTouchPoints>0&&matchMedia("(pointer:coarse)").matches&&innerWidth<=1024)&&Object.assign(g,w),{fingerprint:Ye(et(g)),...g}},rt=async e=>{const t=document.createElement("canvas");t.width=280,t.height=100;const r=t.getContext("2d"),n=r.createLinearGradient(0,0,280,100);return n.addColorStop(0,"#f60"),n.addColorStop(.4,"#09f"),n.addColorStop(.7,"#f09"),n.addColorStop(1,"#0f9"),r.fillStyle=n,r.fillRect(0,0,280,100),r.font='18px "Arial","Helvetica","DejaVu Sans",sans-serif',r.fillStyle="#000",r.textBaseline="alphabetic",r.fillText("Fingerprint ¼½¾™©®∆π∑€¶§",12,45),r.font='bold 22px "Georgia","Times New Roman",serif',r.fillStyle="#222",r.fillText("🦊🐱🚀 2026",12,78),r.globalAlpha=.7,r.fillStyle="rgba(255, 80, 0, 0.35)",r.fillRect(180,20,80,60),r.beginPath(),r.arc(220,50,32,0,2*Math.PI),r.strokeStyle="#fff",r.lineWidth=4,r.stroke(),r.beginPath(),r.moveTo(30,85),r.quadraticCurveTo(140,20,240,85),r.strokeStyle="#00f",r.lineWidth=3,r.stroke(),e&&(t.style.border="1px solid #444",document.body.appendChild(t)),Ye(t.toDataURL("image/png"))},nt=()=>{const e=document.createElement("canvas"),t=e.getContext("webgl")||e.getContext("experimental-webgl"),r=t.getExtension("WEBGL_debug_renderer_info");return Ye(et({vendor:r?t.getParameter(r.UNMASKED_VENDOR_WEBGL):t.getParameter(t.VENDOR),renderer:r?t.getParameter(r.UNMASKED_RENDERER_WEBGL):t.getParameter(t.RENDERER)}))},ot=async e=>{const t=await navigator.gpu.requestAdapter({powerPreference:"high-performance"}),r={vendor:t.info?.vendor??"",architecture:t.info?.architecture??"",description:t.info?.description??"",features:Array.from(t.features).sort(),limits:Array.from(t.limits).sort()};if(e){const e=document.createElement("pre");e.style.margin="10px 0",e.style.padding="10px",e.style.border="1px solid #444",e.style.background="#111",e.style.color="#0f8",e.style.fontFamily="monospace",e.textContent=`WebGPU:\n${JSON.stringify(r,null,2)}`,document.body.appendChild(e)}return Ye(et(r))},st=async e=>{const t=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,6e3,44100),r=t.createOscillator();r.type="sawtooth",r.frequency.value=8800;const n=t.createDynamicsCompressor();n.threshold.value=-48,n.knee.value=30,n.ratio.value=14,n.attack.value=0,n.release.value=.3;const o=t.createGain();o.gain.value=.4,r.connect(n),n.connect(o),o.connect(t.destination),r.start(0);const s=(await t.startRendering()).getChannelData(0);let i=0,a=0;for(let c=3e3;c<5800;c+=2){const e=s[c];i=31*i+Math.floor(1e5*(e+1))|0,a=Math.imul(a^Math.floor(98765*e),2246822519)}const l=i>>>0^a>>>0;if(e){const e=document.createElement("canvas");e.width=500,e.height=120,e.style.border="1px solid #444",e.style.margin="10px 0",e.title="Audio buffer snippet (4500–5000 samples)";const t=e.getContext("2d");t.fillStyle="#111",t.fillRect(0,0,e.width,e.height),t.font="14px monospace",t.fillStyle="#0f8",t.textAlign="left",t.fillText("AudioID",10,20),t.strokeStyle="#0f8",t.lineWidth=1.5,t.beginPath();const r=Array.from(s.slice(4500,5e3)),n=e.width/r.length;for(let o=0;o<r.length;o++){const s=o*n,i=(r[o]+1)/2*e.height;0===o?t.moveTo(s,i):t.lineTo(s,i)}t.stroke(),document.body.appendChild(e)}return Ye(l.toString(16))},it=()=>{const e=["monospace","serif","sans-serif"],t=["Arial","Helvetica","Verdana","Trebuchet MS","Comic Sans MS","Georgia","Times New Roman","Courier New","Segoe UI","Roboto","Open Sans","Noto Sans","system-ui","-apple-system","BlinkMacSystemFont"],r=document.createElement("span");r.style.fontSize="72px",r.style.position="absolute",r.style.visibility="hidden",r.style.whiteSpace="nowrap",r.textContent="mmmmmmmmmwwwwwww",document.body.appendChild(r);const n={};for(const s of e)r.style.fontFamily=s,n[s]=r.offsetWidth;const o=[];for(const s of t){let t=!1;for(const i of e)if(r.style.fontFamily=`"${s}", ${i}`,r.offsetWidth!==n[i]){o.push(s),t=!0;break}t||(r.style.fontFamily=`"${s}"`,r.offsetWidth!==n.monospace&&r.offsetWidth!==n.serif&&o.push(s))}return document.body.removeChild(r),o.length?o.sort().join(","):null};"undefined"!=typeof window&&(window.getBrowserFingerprint=tt);var at=I(void 0),lt=({props:e={},children:t})=>{const{organizationId:r,uid:n,fname:o,lname:s,theme:i="light"}=e,[a,l]=R(()=>{if("undefined"==typeof window)return null;if(n||o||s)return null;const e=localStorage.getItem("qrati_token");return e?{token:e}:null}),{isLoading:c,data:d,error:p}=B({queryKey:["qrati-connect-session",r],queryFn:async()=>{const e=await(async()=>{const e=await tt();return"string"==typeof e?e:e?.fingerprint})();return(await $e.post(A.INITIALIZE_SESSION,{json:{uid:n,fname:o,lname:s,browserFingerprint:e},headers:{"x-org-id":r,Authorization:n||o||s||!localStorage.getItem("qrati_token")?void 0:`Bearer ${localStorage.getItem("qrati_token")}`}}).json()).data},enabled:!!r});u(()=>{const e=d?.authSession?.session?.token,t=d?.authSession?.user;t&&e&&(l({...t,token:e}),d?.organization?.customAuth||localStorage.setItem("qrati_token",e))},[d]);const m=f(()=>y(d?.organization?.integrationSettings,d?.organization?.customFontUrl),[d?.organization?.integrationSettings,d?.organization?.customFontUrl]),g=async e=>{try{const t=await((e,t,r)=>new Promise((n,o)=>{if(!e)return void o(/* @__PURE__ */new Error("Provider is required"));if(!t)return void o(/* @__PURE__ */new Error("Organization ID is required"));const s=new URL(`${r}/qc-social-auth`);s.searchParams.set("provider",e),s.searchParams.set("organizationId",t),s.searchParams.set("origin",window.location.origin);const i=(window.screen.width-500)/2,a=(window.screen.height-600)/2,l=window.open(s.toString(),"qrati_social_auth",`width=500,height=600,left=${i},top=${a},scrollbars=yes,resizable=yes,status=yes`);if(!l)return void o(/* @__PURE__ */new Error("Failed to open popup window. Please allow popups and try again."));const c=()=>{clearInterval(h),clearTimeout(d),window.removeEventListener("message",u)},u=e=>{try{const t=new URL(r).origin;if(e.origin!==t)return void console.warn("Origin mismatch:",e.origin,"expected:",t)}catch(h){console.warn("Could not parse origin for verification")}const{type:s,data:i,error:a,organizationId:u}=e.data||{};if(u===t)switch(s){case"QRATI_SOCIAL_AUTH_SUCCESS":c(),l.close(),n({user:i.user,session:i.session,token:i.token});break;case"QRATI_SOCIAL_AUTH_ERROR":console.error("Authentication error:",a),c(),l.close(),o(new Error(a||"Social authentication failed"));break;case"QRATI_SOCIAL_AUTH_CANCELLED":c(),l.close(),o(/* @__PURE__ */new Error("Authentication was cancelled"))}else console.warn("Organization ID mismatch:",u,"expected:",t)},h=setInterval(()=>{try{l.closed&&(c(),o(/* @__PURE__ */new Error("Authentication was cancelled")))}catch(e){}},1e3);window.addEventListener("message",u);const d=setTimeout(()=>{c(),l.closed||l.close(),o(/* @__PURE__ */new Error("Authentication timeout. Please try again."))},3e5)}))(e,r??"","'https://qrati.com");return t?.user&&t?.token&&(l({...t.user,token:t.token}),localStorage.setItem("qrati_token",t.token)),t}catch(p){throw console.error("Social login error:",p),p}};return p?/* @__PURE__ */h(Y,{fallback:null,children:/* @__PURE__ */h(Je,{organizationId:r??"",errorType:401===p?.response?.status?"page-not-registered":"generic-error"})}):!d?.organization?.customAuth||n&&o&&s?/* @__PURE__ */h(at.Provider,{value:{props:e,initializing:c,sessionId:d?.sessionId,organization:d?.organization,folders:d?.folders,loadingUser:c,user:a,registerUsingEmail:async(e,t,n,o)=>{try{const s=await $e.post(A.REGISTER,{json:{email:e,password:t,fname:n,lname:o},headers:{"x-org-id":r}}).json();return s.error?{error:s.error}:(l({...s.user,token:s.token}),localStorage.setItem("qrati_token",s.token),s)}catch(p){return{error:p?.message}}},loginWithGoogle:async()=>{try{return await g("google")}catch(p){throw console.error("Google login error:",p),p}},loginWithApple:async()=>{try{return await g("apple")}catch(p){throw console.error("Apple login error:",p),p}},loginUsingEmail:async(e,t)=>{try{const n=await $e.post(A.LOGIN,{json:{email:e,password:t},headers:{"x-org-id":r}}).json();return n.error?{error:n.error}:(l({...n.user,token:n.token}),localStorage.setItem("qrati_token",n.token),n)}catch(p){return{error:p?.message}}},signout:async()=>{try{const e=await $e.post(A.LOGOUT,{headers:{"x-org-id":r,Authorization:`Bearer ${a?.token}`}}).json();return e.error?{error:e.error}:(localStorage.removeItem("qrati_token"),l(null),e)}catch(p){return console.error(p),{error:p?.message}}},error:p},children:/* @__PURE__ */h("div",{id:"qrati-connect-container",style:{...b(d?.organization,i),fontFamily:"var(--font-family)"},className:x("bg-background text-foreground relative min-h-[80vh]"),children:[m?/* @__PURE__ */h("style",{children:m}):null,t]})}):/* @__PURE__ */h(Y,{fallback:null,children:/* @__PURE__ */h(Je,{organizationId:r??"",errorType:"custom-auth-invalid"})})},ct=()=>{const e=m(at);if(void 0===e)throw new Error("useSession must be used within SessionProvider");return e};export{$e as a,ee as c,U as d,Ke as i,B as l,ct as n,se as o,tt as r,Y as s,lt as t,H as u};
32
+ /* @__PURE__ */h("a",{className:"font-medium text-blue-500",href:t.ORGANIZATION_SETTINGS_INTEGRATION(e),target:"_blank",rel:"noreferrer",children:"Integration Settings"}),". For more details please contact Qrati support."]})}var Ke=e=>({google:"Google",apple:"Apple"}[e]||e.charAt(0).toUpperCase()+e.slice(1)),Ye=(e,t=0)=>{let r=t^e.length,n=0;const o=e.length;for(;n+3<o;){let t=255&e.charCodeAt(n)|(255&e.charCodeAt(n+1))<<8|(255&e.charCodeAt(n+2))<<16|(255&e.charCodeAt(n+3))<<24;t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),r^=t,r=r<<13|r>>>19,r=Math.imul(r,5)+3864292196,n+=4}let s=0;switch(o-n){case 3:s^=(255&e.charCodeAt(n+2))<<16;case 2:s^=(255&e.charCodeAt(n+1))<<8;case 1:s^=255&e.charCodeAt(n),s=Math.imul(s,3432918353),s=s<<15|s>>>17,s=Math.imul(s,461845907),r^=s}return r^=r>>>16,r=Math.imul(r,2246822507),r^=r>>>13,r=Math.imul(r,3266489909),r^=r>>>16,r>>>=0,r.toString(16).padStart(8,"0")},Xe=async e=>{try{return await e()}catch{return null}},et=e=>{if(null===e||"object"!=typeof e)return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(et).join(",")}]`;const t=Object.keys(e).sort(),r=[];for(const n of t){const t=e[n];void 0!==t&&r.push(`${et(n)}:${et(t)}`)}return`{${r.join(",")}}`},tt=async({debug:e=!1}={})=>{const t=await Xe(()=>it()),r=await Xe(()=>new Intl.NumberFormat(window.navigator.languages?.[0]||"en").resolvedOptions().numberingSystem),n=window.navigator.languages?Array.from(window.navigator.languages).join(","):window.navigator.language||null,o=Intl.DateTimeFormat().resolvedOptions().timeZone,s=/* @__PURE__ */(new Date).getTimezoneOffset(),i=window.matchMedia("(prefers-reduced-motion: reduce)").matches?"reduce":"no-preference",a=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",l=window.matchMedia("(forced-colors: active)").matches?"active":null,{pixelDepth:c,colorDepth:u}=window.screen,h="ontouchstart"in window||window.navigator.maxTouchPoints>0,d=await Xe(()=>rt(e)),f=await Xe(()=>nt()),p=await Xe(()=>ot(e)),m=await Xe(()=>st(e)),y=window.screen.width&&window.screen.height?(window.screen.width/window.screen.height).toFixed(4):null,g={vendor:window.navigator.vendor||null,platform:window.navigator.platform||null,fonts:t,numberingSystem:r,languages:n,timezone:o,timezoneOffset:s,reducedMotion:i,colorScheme:a,hardwareConcurrency:window.navigator.hardwareConcurrency||null,deviceMemory:window.navigator.deviceMemory||null,forcedColors:l,pixelDepth:c,colorDepth:u,touchSupport:h,canvasID:d,webglID:f,webgpuID:p,audioID:m},w={aspectRatio:y,width:window.screen.width,height:window.screen.height,maxTouchPoints:window.navigator.maxTouchPoints};return(!0===navigator.userAgentData?.mobile||/Mobi|Android|iPhone|iPad|iPod|webOS|BlackBerry|Windows Phone/i.test(navigator.userAgent)||navigator.maxTouchPoints>0&&matchMedia("(pointer:coarse)").matches&&innerWidth<=1024)&&Object.assign(g,w),{fingerprint:Ye(et(g)),...g}},rt=async e=>{const t=document.createElement("canvas");t.width=280,t.height=100;const r=t.getContext("2d"),n=r.createLinearGradient(0,0,280,100);return n.addColorStop(0,"#f60"),n.addColorStop(.4,"#09f"),n.addColorStop(.7,"#f09"),n.addColorStop(1,"#0f9"),r.fillStyle=n,r.fillRect(0,0,280,100),r.font='18px "Arial","Helvetica","DejaVu Sans",sans-serif',r.fillStyle="#000",r.textBaseline="alphabetic",r.fillText("Fingerprint ¼½¾™©®∆π∑€¶§",12,45),r.font='bold 22px "Georgia","Times New Roman",serif',r.fillStyle="#222",r.fillText("🦊🐱🚀 2026",12,78),r.globalAlpha=.7,r.fillStyle="rgba(255, 80, 0, 0.35)",r.fillRect(180,20,80,60),r.beginPath(),r.arc(220,50,32,0,2*Math.PI),r.strokeStyle="#fff",r.lineWidth=4,r.stroke(),r.beginPath(),r.moveTo(30,85),r.quadraticCurveTo(140,20,240,85),r.strokeStyle="#00f",r.lineWidth=3,r.stroke(),e&&(t.style.border="1px solid #444",document.body.appendChild(t)),Ye(t.toDataURL("image/png"))},nt=()=>{const e=document.createElement("canvas"),t=e.getContext("webgl")||e.getContext("experimental-webgl"),r=t.getExtension("WEBGL_debug_renderer_info");return Ye(et({vendor:r?t.getParameter(r.UNMASKED_VENDOR_WEBGL):t.getParameter(t.VENDOR),renderer:r?t.getParameter(r.UNMASKED_RENDERER_WEBGL):t.getParameter(t.RENDERER)}))},ot=async e=>{const t=await navigator.gpu.requestAdapter({powerPreference:"high-performance"}),r={vendor:t.info?.vendor??"",architecture:t.info?.architecture??"",description:t.info?.description??"",features:Array.from(t.features).sort(),limits:Array.from(t.limits).sort()};if(e){const e=document.createElement("pre");e.style.margin="10px 0",e.style.padding="10px",e.style.border="1px solid #444",e.style.background="#111",e.style.color="#0f8",e.style.fontFamily="monospace",e.textContent=`WebGPU:\n${JSON.stringify(r,null,2)}`,document.body.appendChild(e)}return Ye(et(r))},st=async e=>{const t=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,6e3,44100),r=t.createOscillator();r.type="sawtooth",r.frequency.value=8800;const n=t.createDynamicsCompressor();n.threshold.value=-48,n.knee.value=30,n.ratio.value=14,n.attack.value=0,n.release.value=.3;const o=t.createGain();o.gain.value=.4,r.connect(n),n.connect(o),o.connect(t.destination),r.start(0);const s=(await t.startRendering()).getChannelData(0);let i=0,a=0;for(let c=3e3;c<5800;c+=2){const e=s[c];i=31*i+Math.floor(1e5*(e+1))|0,a=Math.imul(a^Math.floor(98765*e),2246822519)}const l=i>>>0^a>>>0;if(e){const e=document.createElement("canvas");e.width=500,e.height=120,e.style.border="1px solid #444",e.style.margin="10px 0",e.title="Audio buffer snippet (4500–5000 samples)";const t=e.getContext("2d");t.fillStyle="#111",t.fillRect(0,0,e.width,e.height),t.font="14px monospace",t.fillStyle="#0f8",t.textAlign="left",t.fillText("AudioID",10,20),t.strokeStyle="#0f8",t.lineWidth=1.5,t.beginPath();const r=Array.from(s.slice(4500,5e3)),n=e.width/r.length;for(let o=0;o<r.length;o++){const s=o*n,i=(r[o]+1)/2*e.height;0===o?t.moveTo(s,i):t.lineTo(s,i)}t.stroke(),document.body.appendChild(e)}return Ye(l.toString(16))},it=()=>{const e=["monospace","serif","sans-serif"],t=["Arial","Helvetica","Verdana","Trebuchet MS","Comic Sans MS","Georgia","Times New Roman","Courier New","Segoe UI","Roboto","Open Sans","Noto Sans","system-ui","-apple-system","BlinkMacSystemFont"],r=document.createElement("span");r.style.fontSize="72px",r.style.position="absolute",r.style.visibility="hidden",r.style.whiteSpace="nowrap",r.textContent="mmmmmmmmmwwwwwww",document.body.appendChild(r);const n={};for(const s of e)r.style.fontFamily=s,n[s]=r.offsetWidth;const o=[];for(const s of t){let t=!1;for(const i of e)if(r.style.fontFamily=`"${s}", ${i}`,r.offsetWidth!==n[i]){o.push(s),t=!0;break}t||(r.style.fontFamily=`"${s}"`,r.offsetWidth!==n.monospace&&r.offsetWidth!==n.serif&&o.push(s))}return document.body.removeChild(r),o.length?o.sort().join(","):null};"undefined"!=typeof window&&(window.getBrowserFingerprint=tt);var at=I(void 0),lt=({props:e={},children:t})=>{const{organizationId:r,uid:n,fname:o,lname:s,theme:i="light"}=e,[a,l]=R(()=>{if("undefined"==typeof window)return null;if(n||o||s)return null;const e=localStorage.getItem("qrati_token");return e?{token:e}:null}),{isLoading:c,data:d,error:p}=B({queryKey:["qrati-connect-session",r,n??null,o??null,s??null],queryFn:async()=>{const e=await(async()=>{const e=await tt();return"string"==typeof e?e:e?.fingerprint})();return(await $e.post(E.INITIALIZE_SESSION,{json:{uid:n,fname:o,lname:s,browserFingerprint:e},headers:{"x-org-id":r,Authorization:n||o||s||!localStorage.getItem("qrati_token")?void 0:`Bearer ${localStorage.getItem("qrati_token")}`}}).json()).data},enabled:!!r});u(()=>{const e=d?.authSession?.session?.token,t=d?.authSession?.user;t&&e?(l({...t,token:e}),d?.organization?.customAuth||localStorage.setItem("qrati_token",e)):d?.organization?.customAuth&&n&&o&&s&&l(e=>e??{uid:n,name:`${o} ${s}`,fname:o,lname:s})},[d]);const m=f(()=>y(d?.organization?.integrationSettings,d?.organization?.customFontUrl),[d?.organization?.integrationSettings,d?.organization?.customFontUrl]),g=async e=>{try{const t=await((e,t,r)=>new Promise((n,o)=>{if(!e)return void o(/* @__PURE__ */new Error("Provider is required"));if(!t)return void o(/* @__PURE__ */new Error("Organization ID is required"));const s=new URL(`${r}/qc-social-auth`);s.searchParams.set("provider",e),s.searchParams.set("organizationId",t),s.searchParams.set("origin",window.location.origin);const i=(window.screen.width-500)/2,a=(window.screen.height-600)/2,l=window.open(s.toString(),"qrati_social_auth",`width=500,height=600,left=${i},top=${a},scrollbars=yes,resizable=yes,status=yes`);if(!l)return void o(/* @__PURE__ */new Error("Failed to open popup window. Please allow popups and try again."));const c=()=>{clearInterval(h),clearTimeout(d),window.removeEventListener("message",u)},u=e=>{try{const t=new URL(r).origin;if(e.origin!==t)return void console.warn("Origin mismatch:",e.origin,"expected:",t)}catch(h){console.warn("Could not parse origin for verification")}const{type:s,data:i,error:a,organizationId:u}=e.data||{};if(u===t)switch(s){case"QRATI_SOCIAL_AUTH_SUCCESS":c(),l.close(),n({user:i.user,session:i.session,token:i.token});break;case"QRATI_SOCIAL_AUTH_ERROR":console.error("Authentication error:",a),c(),l.close(),o(new Error(a||"Social authentication failed"));break;case"QRATI_SOCIAL_AUTH_CANCELLED":c(),l.close(),o(/* @__PURE__ */new Error("Authentication was cancelled"))}else console.warn("Organization ID mismatch:",u,"expected:",t)},h=setInterval(()=>{try{l.closed&&(c(),o(/* @__PURE__ */new Error("Authentication was cancelled")))}catch(e){}},1e3);window.addEventListener("message",u);const d=setTimeout(()=>{c(),l.closed||l.close(),o(/* @__PURE__ */new Error("Authentication timeout. Please try again."))},3e5)}))(e,r??"","https://qrati.com");return t?.user&&t?.token&&(l({...t.user,token:t.token}),localStorage.setItem("qrati_token",t.token)),t}catch(p){throw console.error("Social login error:",p),p}};return p?/* @__PURE__ */h(Y,{fallback:null,children:/* @__PURE__ */h(Je,{organizationId:r??"",errorType:401===p?.response?.status?"page-not-registered":"generic-error"})}):!d?.organization?.customAuth||n&&o&&s?/* @__PURE__ */h(at.Provider,{value:{props:e,initializing:c,sessionId:d?.sessionId,organization:d?.organization,folders:d?.folders,loadingUser:c,user:a,registerUsingEmail:async(e,t,n,o)=>{try{const s=await $e.post(E.REGISTER,{json:{email:e,password:t,fname:n,lname:o},headers:{"x-org-id":r}}).json();return s.error?{error:s.error}:(l({...s.user,token:s.token}),localStorage.setItem("qrati_token",s.token),s)}catch(p){return{error:p?.message}}},loginWithGoogle:async()=>{try{return await g("google")}catch(p){throw console.error("Google login error:",p),p}},loginWithApple:async()=>{try{return await g("apple")}catch(p){throw console.error("Apple login error:",p),p}},loginUsingEmail:async(e,t)=>{try{const n=await $e.post(E.LOGIN,{json:{email:e,password:t},headers:{"x-org-id":r}}).json();return n.error?{error:n.error}:(l({...n.user,token:n.token}),localStorage.setItem("qrati_token",n.token),n)}catch(p){return{error:p?.message}}},signout:async()=>{try{const e=await $e.post(E.LOGOUT,{headers:{"x-org-id":r,Authorization:`Bearer ${a?.token}`}}).json();return e.error?{error:e.error}:(localStorage.removeItem("qrati_token"),l(null),e)}catch(p){return console.error(p),{error:p?.message}}},error:p},children:/* @__PURE__ */h("div",{id:"qrati-connect-container",style:{...b(d?.organization,i),fontFamily:"var(--font-family)"},className:x("bg-background text-foreground relative min-h-[80vh]"),children:[m?/* @__PURE__ */h("style",{children:m}):null,t]})}):/* @__PURE__ */h(Y,{fallback:null,children:/* @__PURE__ */h(Je,{organizationId:r??"",errorType:"custom-auth-invalid"})})},ct=()=>{const e=m(at);if(void 0===e)throw new Error("useSession must be used within SessionProvider");return e};export{$e as a,ee as c,U as d,Ke as i,B as l,ct as n,se as o,tt as r,Y as s,lt as t,H as u};