@react-email/preview-server 5.0.0-canary.2 → 5.0.0-canary.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +6 -6
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_not-found/page.js +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page.js +1 -1
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/preview/[...slug]/page.js +14 -14
- package/.next/server/app/preview/[...slug]/page.js.nft.json +1 -1
- package/.next/server/app/preview/[...slug]/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/235.js +1 -1
- package/.next/server/chunks/74.js +1 -0
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/611-3eea98bdc9dc1702.js +1 -0
- package/.next/static/chunks/{615-5d1c40ffc3b18ab1.js → 615-72dd0f206c15c68c.js} +1 -1
- package/.next/static/chunks/app/layout-e10b48dd22650439.js +1 -0
- package/.next/static/chunks/app/preview/[...slug]/page-30fcc9fc52a5a560.js +1 -0
- package/.next/static/css/{7d8cf00703036864.css → 1d22a5c848552bfc.css} +1 -1
- package/.next/trace +28 -28
- package/CHANGELOG.md +6 -0
- package/package.json +4 -2
- package/src/app/preview/[...slug]/email-frame.tsx +306 -0
- package/src/app/preview/[...slug]/preview.tsx +48 -30
- package/src/components/icons/icon-base.tsx +2 -2
- package/src/components/icons/icon-moon.tsx +13 -0
- package/src/components/icons/icon-sun.tsx +13 -0
- package/src/components/topbar/emulated-dark-mode-toggle.tsx +36 -0
- package/.next/server/chunks/790.js +0 -1
- package/.next/static/chunks/442-9645091f2b304619.js +0 -1
- package/.next/static/chunks/app/layout-ea6f4b02162df87e.js +0 -1
- package/.next/static/chunks/app/preview/[...slug]/page-81c8c459505f042d.js +0 -1
- /package/.next/static/{H4DkyxG2nQQlRZrNfmsTn → ixMN5IIqPIc0E9e26HFvF}/_buildManifest.js +0 -0
- /package/.next/static/{H4DkyxG2nQQlRZrNfmsTn → ixMN5IIqPIc0E9e26HFvF}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[442],{1923:(e,t,r)=>{r.d(t,{B8:()=>T,UC:()=>j,bL:()=>S,l9:()=>N});var n=r(3611),a=r(9623),o=r(4233),i=r(4609),s=r(7586),l=r(8301),c=r(6184),u=r(2150),d=r(2390),f=r(1275),p="Tabs",[m,h]=(0,o.A)(p,[i.RG]),v=(0,i.RG)(),[g,b]=m(p),y=n.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,onValueChange:a,defaultValue:o,orientation:i="horizontal",dir:s,activationMode:m="automatic",...h}=e,v=(0,c.jH)(s),[b,y]=(0,u.i)({prop:n,onChange:a,defaultProp:null!=o?o:"",caller:p});return(0,f.jsx)(g,{scope:r,baseId:(0,d.B)(),value:b,onValueChange:y,orientation:i,dir:v,activationMode:m,children:(0,f.jsx)(l.sG.div,{dir:v,"data-orientation":i,...h,ref:t})})});y.displayName=p;var w="TabsList",x=n.forwardRef((e,t)=>{let{__scopeTabs:r,loop:n=!0,...a}=e,o=b(w,r),s=v(r);return(0,f.jsx)(i.bL,{asChild:!0,...s,orientation:o.orientation,dir:o.dir,loop:n,children:(0,f.jsx)(l.sG.div,{role:"tablist","aria-orientation":o.orientation,...a,ref:t})})});x.displayName=w;var E="TabsTrigger",k=n.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,disabled:o=!1,...s}=e,c=b(E,r),u=v(r),d=A(c.baseId,n),p=M(c.baseId,n),m=n===c.value;return(0,f.jsx)(i.q7,{asChild:!0,...u,focusable:!o,active:m,children:(0,f.jsx)(l.sG.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":p,"data-state":m?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:d,...s,ref:t,onMouseDown:(0,a.mK)(e.onMouseDown,e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():c.onValueChange(n)}),onKeyDown:(0,a.mK)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&c.onValueChange(n)}),onFocus:(0,a.mK)(e.onFocus,()=>{let e="manual"!==c.activationMode;m||o||!e||c.onValueChange(n)})})})});k.displayName=E;var C="TabsContent",R=n.forwardRef((e,t)=>{let{__scopeTabs:r,value:a,forceMount:o,children:i,...c}=e,u=b(C,r),d=A(u.baseId,a),p=M(u.baseId,a),m=a===u.value,h=n.useRef(m);return n.useEffect(()=>{let e=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,f.jsx)(s.C,{present:o||m,children:r=>{let{present:n}=r;return(0,f.jsx)(l.sG.div,{"data-state":m?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":d,hidden:!n,id:p,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:n&&i})}})});function A(e,t){return"".concat(e,"-trigger-").concat(t)}function M(e,t){return"".concat(e,"-content-").concat(t)}R.displayName=C;var S=y,T=x,N=k,j=R},4609:(e,t,r)=>{r.d(t,{q7:()=>O,bL:()=>F,RG:()=>S});var n,a=r(3611),o=r(9623);function i(e,t,r){if(!t.has(e))throw TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function s(e,t){var r=i(e,t,"get");return r.get?r.get.call(e):r.value}function l(e,t,r){var n=i(e,t,"set");if(n.set)n.set.call(e,r);else{if(!n.writable)throw TypeError("attempted to set read only private field");n.value=r}return r}var c=r(4233),u=r(7297),d=r(4957),f=r(1275),p=new WeakMap;function m(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let r=function(e,t){let r=e.length,n=h(t),a=n>=0?n:r+n;return a<0||a>=r?-1:a}(e,t);return -1===r?void 0:e[r]}function h(e){return e!=e||0===e?0:Math.trunc(e)}n=new WeakMap,class e extends Map{set(e,t){return p.get(this)&&(this.has(e)?s(this,n)[s(this,n).indexOf(e)]=e:s(this,n).push(e)),super.set(e,t),this}insert(e,t,r){let a,o=this.has(t),i=s(this,n).length,l=h(e),c=l>=0?l:i+l,u=c<0||c>=i?-1:c;if(u===this.size||o&&u===this.size-1||-1===u)return this.set(t,r),this;let d=this.size+ +!o;l<0&&c++;let f=[...s(this,n)],p=!1;for(let e=c;e<d;e++)if(c===e){let n=f[e];f[e]===t&&(n=f[e+1]),o&&this.delete(t),a=this.get(n),this.set(t,r)}else{p||f[e-1]!==t||(p=!0);let r=f[p?e:e-1],n=a;a=this.get(r),this.delete(r),this.set(r,n)}return this}with(t,r,n){let a=new e(this);return a.insert(t,r,n),a}before(e){let t=s(this,n).indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let a=s(this,n).indexOf(e);return -1===a?this:this.insert(a,t,r)}after(e){let t=s(this,n).indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let a=s(this,n).indexOf(e);return -1===a?this:this.insert(a+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return l(this,n,[]),super.clear()}delete(e){let t=super.delete(e);return t&&s(this,n).splice(s(this,n).indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=m(s(this,n),e);if(void 0!==t)return this.get(t)}entryAt(e){let t=m(s(this,n),e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return s(this,n).indexOf(e)}keyAt(e){return m(s(this,n),e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.at(n)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return n;r++}}findIndex(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return r;r++}return -1}filter(t,r){let n=[],a=0;for(let e of this)Reflect.apply(t,r,[e,a,this])&&n.push(e),a++;return new e(n)}map(t,r){let n=[],a=0;for(let e of this)n.push([e[0],Reflect.apply(t,r,[e,a,this])]),a++;return new e(n)}reduce(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let[n,a]=t,o=0,i=null!=a?a:this.at(0);for(let e of this)i=0===o&&1===t.length?e:Reflect.apply(n,this,[i,e,o,this]),o++;return i}reduceRight(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let[n,a]=t,o=null!=a?a:this.at(-1);for(let e=this.size-1;e>=0;e--){let r=this.at(e);o=e===this.size-1&&1===t.length?r:Reflect.apply(n,this,[o,r,e,this])}return o}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),n=this.get(r);t.set(r,n)}return t}toSpliced(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];let a=[...this.entries()];return a.splice(...r),new e(a)}slice(t,r){let n=new e,a=this.size-1;if(void 0===t)return n;t<0&&(t+=this.size),void 0!==r&&r>0&&(a=r-1);for(let e=t;e<=a;e++){let t=this.keyAt(e),r=this.get(t);n.set(t,r)}return n}every(e,t){let r=0;for(let n of this){if(!Reflect.apply(e,t,[n,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return!0;r++}return!1}constructor(e){super(e),function(e,t,r){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}(this,n,{writable:!0,value:void 0}),l(this,n,[...super.keys()]),p.set(this,!0)}};var v=r(2390),g=r(8301),b=r(5254),y=r(2150),w=r(6184),x="rovingFocusGroup.onEntryFocus",E={bubbles:!1,cancelable:!0},k="RovingFocusGroup",[C,R,A]=function(e){let t=e+"CollectionProvider",[r,n]=(0,c.A)(t),[o,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=e=>{let{scope:t,children:r}=e,n=a.useRef(null),i=a.useRef(new Map).current;return(0,f.jsx)(o,{scope:t,itemMap:i,collectionRef:n,children:r})};s.displayName=t;let l=e+"CollectionSlot",p=(0,d.TL)(l),m=a.forwardRef((e,t)=>{let{scope:r,children:n}=e,a=i(l,r),o=(0,u.s)(t,a.collectionRef);return(0,f.jsx)(p,{ref:o,children:n})});m.displayName=l;let h=e+"CollectionItemSlot",v="data-radix-collection-item",g=(0,d.TL)(h),b=a.forwardRef((e,t)=>{let{scope:r,children:n,...o}=e,s=a.useRef(null),l=(0,u.s)(t,s),c=i(h,r);return a.useEffect(()=>(c.itemMap.set(s,{ref:s,...o}),()=>void c.itemMap.delete(s))),(0,f.jsx)(g,{...{[v]:""},ref:l,children:n})});return b.displayName=h,[{Provider:s,Slot:m,ItemSlot:b},function(t){let r=i(e+"CollectionConsumer",t);return a.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll("[".concat(v,"]")));return Array.from(r.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[r.collectionRef,r.itemMap])},n]}(k),[M,S]=(0,c.A)(k,[A]),[T,N]=M(k),j=a.forwardRef((e,t)=>(0,f.jsx)(C.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,f.jsx)(C.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,f.jsx)(P,{...e,ref:t})})}));j.displayName=k;var P=a.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:s,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:d,onEntryFocus:p,preventScrollOnEntryFocus:m=!1,...h}=e,v=a.useRef(null),C=(0,u.s)(t,v),A=(0,w.jH)(s),[M,S]=(0,y.i)({prop:l,defaultProp:null!=c?c:null,onChange:d,caller:k}),[N,j]=a.useState(!1),P=(0,b.c)(p),B=R(r),I=a.useRef(!1),[D,F]=a.useState(0);return a.useEffect(()=>{let e=v.current;if(e)return e.addEventListener(x,P),()=>e.removeEventListener(x,P)},[P]),(0,f.jsx)(T,{scope:r,orientation:n,dir:A,loop:i,currentTabStopId:M,onItemFocus:a.useCallback(e=>S(e),[S]),onItemShiftTab:a.useCallback(()=>j(!0),[]),onFocusableItemAdd:a.useCallback(()=>F(e=>e+1),[]),onFocusableItemRemove:a.useCallback(()=>F(e=>e-1),[]),children:(0,f.jsx)(g.sG.div,{tabIndex:N||0===D?-1:0,"data-orientation":n,...h,ref:C,style:{outline:"none",...e.style},onMouseDown:(0,o.mK)(e.onMouseDown,()=>{I.current=!0}),onFocus:(0,o.mK)(e.onFocus,e=>{let t=!I.current;if(e.target===e.currentTarget&&t&&!N){let t=new CustomEvent(x,E);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=B().filter(e=>e.focusable);L([e.find(e=>e.active),e.find(e=>e.id===M),...e].filter(Boolean).map(e=>e.ref.current),m)}}I.current=!1}),onBlur:(0,o.mK)(e.onBlur,()=>j(!1))})})}),B="RovingFocusGroupItem",I=a.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:s,children:l,...c}=e,u=(0,v.B)(),d=s||u,p=N(B,r),m=p.currentTabStopId===d,h=R(r),{onFocusableItemAdd:b,onFocusableItemRemove:y,currentTabStopId:w}=p;return a.useEffect(()=>{if(n)return b(),()=>y()},[n,b,y]),(0,f.jsx)(C.ItemSlot,{scope:r,id:d,focusable:n,active:i,children:(0,f.jsx)(g.sG.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...c,ref:t,onMouseDown:(0,o.mK)(e.onMouseDown,e=>{n?p.onItemFocus(d):e.preventDefault()}),onFocus:(0,o.mK)(e.onFocus,()=>p.onItemFocus(d)),onKeyDown:(0,o.mK)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void p.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,r){var n;let a=(n=e.key,"rtl"!==r?n:"ArrowLeft"===n?"ArrowRight":"ArrowRight"===n?"ArrowLeft":n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(a))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(a)))return D[a]}(e,p.orientation,p.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let r=h().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)r.reverse();else if("prev"===t||"next"===t){"prev"===t&&r.reverse();let n=r.indexOf(e.currentTarget);r=p.loop?function(e,t){return e.map((r,n)=>e[(t+n)%e.length])}(r,n+1):r.slice(n+1)}setTimeout(()=>L(r))}}),children:"function"==typeof l?l({isCurrentTabStop:m,hasTabStop:null!=w}):l})})});I.displayName=B;var D={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function L(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}var F=j,O=I},5571:(e,t,r)=>{r.d(t,{q7:()=>T,bL:()=>S});var n=r(3611),a=r(4233),o=r(8301),i=r(4609),s=r(9623),l=r(2150),c=r(1275),u="Toggle",d=n.forwardRef((e,t)=>{let{pressed:r,defaultPressed:n,onPressedChange:a,...i}=e,[d,f]=(0,l.i)({prop:r,onChange:a,defaultProp:null!=n&&n,caller:u});return(0,c.jsx)(o.sG.button,{type:"button","aria-pressed":d,"data-state":d?"on":"off","data-disabled":e.disabled?"":void 0,...i,ref:t,onClick:(0,s.mK)(e.onClick,()=>{e.disabled||f(!d)})})});d.displayName=u;var f=r(6184),p="ToggleGroup",[m,h]=(0,a.A)(p,[i.RG]),v=(0,i.RG)(),g=n.forwardRef((e,t)=>{let{type:r,...n}=e;if("single"===r)return(0,c.jsx)(w,{...n,ref:t});if("multiple"===r)return(0,c.jsx)(x,{...n,ref:t});throw Error("Missing prop `type` expected on `".concat(p,"`"))});g.displayName=p;var[b,y]=m(p),w=n.forwardRef((e,t)=>{let{value:r,defaultValue:a,onValueChange:o=()=>{},...i}=e,[s,u]=(0,l.i)({prop:r,defaultProp:null!=a?a:"",onChange:o,caller:p});return(0,c.jsx)(b,{scope:e.__scopeToggleGroup,type:"single",value:n.useMemo(()=>s?[s]:[],[s]),onItemActivate:u,onItemDeactivate:n.useCallback(()=>u(""),[u]),children:(0,c.jsx)(C,{...i,ref:t})})}),x=n.forwardRef((e,t)=>{let{value:r,defaultValue:a,onValueChange:o=()=>{},...i}=e,[s,u]=(0,l.i)({prop:r,defaultProp:null!=a?a:[],onChange:o,caller:p}),d=n.useCallback(e=>u(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return[...t,e]}),[u]),f=n.useCallback(e=>u(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t.filter(t=>t!==e)}),[u]);return(0,c.jsx)(b,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:d,onItemDeactivate:f,children:(0,c.jsx)(C,{...i,ref:t})})});g.displayName=p;var[E,k]=m(p),C=n.forwardRef((e,t)=>{let{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:a=!0,orientation:s,dir:l,loop:u=!0,...d}=e,p=v(r),m=(0,f.jH)(l),h={role:"group",dir:m,...d};return(0,c.jsx)(E,{scope:r,rovingFocus:a,disabled:n,children:a?(0,c.jsx)(i.bL,{asChild:!0,...p,orientation:s,dir:m,loop:u,children:(0,c.jsx)(o.sG.div,{...h,ref:t})}):(0,c.jsx)(o.sG.div,{...h,ref:t})})}),R="ToggleGroupItem",A=n.forwardRef((e,t)=>{let r=y(R,e.__scopeToggleGroup),a=k(R,e.__scopeToggleGroup),o=v(e.__scopeToggleGroup),s=r.value.includes(e.value),l=a.disabled||e.disabled,u={...e,pressed:s,disabled:l},d=n.useRef(null);return a.rovingFocus?(0,c.jsx)(i.q7,{asChild:!0,...o,focusable:!l,active:s,ref:d,children:(0,c.jsx)(M,{...u,ref:t})}):(0,c.jsx)(M,{...u,ref:t})});A.displayName=R;var M=n.forwardRef((e,t)=>{let{__scopeToggleGroup:r,value:n,...a}=e,o=y(R,r),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},s="single"===o.type?i:void 0;return(0,c.jsx)(d,{...s,...a,ref:t,onPressedChange:e=>{e?o.onItemActivate(n):o.onItemDeactivate(n)}})}),S=g,T=A},6184:(e,t,r)=>{r.d(t,{jH:()=>o});var n=r(3611);r(1275);var a=n.createContext(void 0);function o(e){let t=n.useContext(a);return e||t||"ltr"}},7034:(e,t,r)=>{r.d(t,{YQ:()=>a});var n=r(3611);function a(e,t,r){var a=this,o=(0,n.useRef)(null),i=(0,n.useRef)(0),s=(0,n.useRef)(null),l=(0,n.useRef)([]),c=(0,n.useRef)(),u=(0,n.useRef)(),d=(0,n.useRef)(e),f=(0,n.useRef)(!0);d.current=e;var p="undefined"!=typeof window,m=!t&&0!==t&&p;if("function"!=typeof e)throw TypeError("Expected a function");t=+t||0;var h=!!(r=r||{}).leading,v=!("trailing"in r)||!!r.trailing,g="maxWait"in r,b="debounceOnServer"in r&&!!r.debounceOnServer,y=g?Math.max(+r.maxWait||0,t):null;return(0,n.useEffect)(function(){return f.current=!0,function(){f.current=!1}},[]),(0,n.useMemo)(function(){var e=function(e){var t=l.current,r=c.current;return l.current=c.current=null,i.current=e,u.current=d.current.apply(r,t)},r=function(e,t){m&&cancelAnimationFrame(s.current),s.current=m?requestAnimationFrame(e):setTimeout(e,t)},n=function(e){if(!f.current)return!1;var r=e-o.current;return!o.current||r>=t||r<0||g&&e-i.current>=y},w=function(t){return s.current=null,v&&l.current?e(t):(l.current=c.current=null,u.current)},x=function e(){var a=Date.now();if(n(a))return w(a);if(f.current){var s=t-(a-o.current);r(e,g?Math.min(s,y-(a-i.current)):s)}},E=function(){if(p||b){var d=Date.now(),m=n(d);if(l.current=[].slice.call(arguments),c.current=a,o.current=d,m){if(!s.current&&f.current)return i.current=o.current,r(x,t),h?e(o.current):u.current;if(g)return r(x,t),e(o.current)}return s.current||r(x,t),u.current}};return E.cancel=function(){s.current&&(m?cancelAnimationFrame(s.current):clearTimeout(s.current)),i.current=0,l.current=o.current=c.current=s.current=null},E.isPending=function(){return!!s.current},E.flush=function(){return s.current?w(Date.now()):u.current},E},[h,g,t,y,v,m,p,b])}},7148:(e,t,r)=>{r.d(t,{Mz:()=>eX,UC:()=>eZ,ZL:()=>eq,bL:()=>eU,l9:()=>eV});var n,a,o=r(3611),i=r(9623),s=r(7297),l=r(4233),c=r(486),u=0;function d(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var f=r(8301),p=r(5254),m=r(1275),h="focusScope.autoFocusOnMount",v="focusScope.autoFocusOnUnmount",g={bubbles:!1,cancelable:!0},b=o.forwardRef((e,t)=>{let{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...l}=e,[c,u]=o.useState(null),d=(0,p.c)(a),b=(0,p.c)(i),k=o.useRef(null),C=(0,s.s)(t,e=>u(e)),R=o.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;o.useEffect(()=>{if(n){let e=function(e){if(R.paused||!c)return;let t=e.target;c.contains(t)?k.current=t:x(k.current,{select:!0})},t=function(e){if(R.paused||!c)return;let t=e.relatedTarget;null!==t&&(c.contains(t)||x(k.current,{select:!0}))};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let r=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&x(c)});return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[n,c,R.paused]),o.useEffect(()=>{if(c){E.add(R);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent(h,g);c.addEventListener(h,d),c.dispatchEvent(t),t.defaultPrevented||(function(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=document.activeElement;for(let n of e)if(x(n,{select:t}),document.activeElement!==r)return}(y(c).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&x(c))}return()=>{c.removeEventListener(h,d),setTimeout(()=>{let t=new CustomEvent(v,g);c.addEventListener(v,b),c.dispatchEvent(t),t.defaultPrevented||x(null!=e?e:document.body,{select:!0}),c.removeEventListener(v,b),E.remove(R)},0)}}},[c,d,b,R]);let A=o.useCallback(e=>{if(!r&&!n||R.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,a=document.activeElement;if(t&&a){let t=e.currentTarget,[n,o]=function(e){let t=y(e);return[w(t,e),w(t.reverse(),e)]}(t);n&&o?e.shiftKey||a!==o?e.shiftKey&&a===n&&(e.preventDefault(),r&&x(o,{select:!0})):(e.preventDefault(),r&&x(n,{select:!0})):a===t&&e.preventDefault()}},[r,n,R.paused]);return(0,m.jsx)(f.sG.div,{tabIndex:-1,...l,ref:C,onKeyDown:A})});function y(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function w(e,t){for(let r of e)if(!function(e,t){let{upTo:r}=t;if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===r||e!==r);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(r,{upTo:t}))return r}function x(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&e.focus){var r;let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&(r=e)instanceof HTMLInputElement&&"select"in r&&t&&e.select()}}b.displayName="FocusScope";var E=function(){let e=[];return{add(t){let r=e[0];t!==r&&(null==r||r.pause()),(e=k(e,t)).unshift(t)},remove(t){var r;null==(r=(e=k(e,t))[0])||r.resume()}}}();function k(e,t){let r=[...e],n=r.indexOf(t);return -1!==n&&r.splice(n,1),r}var C=r(2390),R=r(6188),A=r(8774),M=r(7586),S=r(4957),T=r(2150),N=new WeakMap,j=new WeakMap,P={},B=0,I=function(e){return e&&(e.host||I(e.parentNode))},D=function(e,t,r,n){var a=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var r=I(e);return r&&t.contains(r)?r:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});P[r]||(P[r]=new WeakMap);var o=P[r],i=[],s=new Set,l=new Set(a),c=function(e){!e||s.has(e)||(s.add(e),c(e.parentNode))};a.forEach(c);var u=function(e){!e||l.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(n),a=null!==t&&"false"!==t,l=(N.get(e)||0)+1,c=(o.get(e)||0)+1;N.set(e,l),o.set(e,c),i.push(e),1===l&&a&&j.set(e,!0),1===c&&e.setAttribute(r,"true"),a||e.setAttribute(n,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return u(t),s.clear(),B++,function(){i.forEach(function(e){var t=N.get(e)-1,a=o.get(e)-1;N.set(e,t),o.set(e,a),t||(j.has(e)||e.removeAttribute(n),j.delete(e)),a||e.removeAttribute(r)}),--B||(N=new WeakMap,N=new WeakMap,j=new WeakMap,P={})}},L=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=t||("undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live]"))),D(n,a,r,"aria-hidden")):function(){return null}},F=function(){return(F=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function O(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}Object.create;Object.create;var z=("function"==typeof SuppressedError&&SuppressedError,"right-scroll-bar-position"),K="width-before-scroll-bar";function Y(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var G="undefined"!=typeof window?o.useLayoutEffect:o.useEffect,_=new WeakMap;function W(e){return e}var H=function(e){void 0===e&&(e={});var t,r,n,a=(void 0===t&&(t=W),r=[],n=!1,{read:function(){if(n)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:null},useMedium:function(e){var a=t(e,n);return r.push(a),function(){r=r.filter(function(e){return e!==a})}},assignSyncMedium:function(e){for(n=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){n=!0;var t=[];if(r.length){var a=r;r=[],a.forEach(e),t=r}var o=function(){var r=t;t=[],r.forEach(e)},i=function(){return Promise.resolve().then(o)};i(),r={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),r}}}});return a.options=F({async:!0,ssr:!1},e),a}(),U=function(){},X=o.forwardRef(function(e,t){var r,n,a,i,s=o.useRef(null),l=o.useState({onScrollCapture:U,onWheelCapture:U,onTouchMoveCapture:U}),c=l[0],u=l[1],d=e.forwardProps,f=e.children,p=e.className,m=e.removeScrollBar,h=e.enabled,v=e.shards,g=e.sideCar,b=e.noIsolation,y=e.inert,w=e.allowPinchZoom,x=e.as,E=e.gapMode,k=O(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=(r=[s,t],n=function(e){return r.forEach(function(t){return Y(t,e)})},(a=(0,o.useState)(function(){return{value:null,callback:n,facade:{get current(){return a.value},set current(value){var e=a.value;e!==value&&(a.value=value,a.callback(value,e))}}}})[0]).callback=n,i=a.facade,G(function(){var e=_.get(i);if(e){var t=new Set(e),n=new Set(r),a=i.current;t.forEach(function(e){n.has(e)||Y(e,null)}),n.forEach(function(e){t.has(e)||Y(e,a)})}_.set(i,r)},[r]),i),R=F(F({},k),c);return o.createElement(o.Fragment,null,h&&o.createElement(g,{sideCar:H,removeScrollBar:m,shards:v,noIsolation:b,inert:y,setCallbacks:u,allowPinchZoom:!!w,lockRef:s,gapMode:E}),d?o.cloneElement(o.Children.only(f),F(F({},R),{ref:C})):o.createElement(void 0===x?"div":x,F({},R,{className:p,ref:C}),f))});X.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},X.classNames={fullWidth:K,zeroRight:z};var V=function(e){var t=e.sideCar,r=O(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw Error("Sidecar medium not found");return o.createElement(n,F({},r))};V.isSideCarExport=!0;var q=function(){var e=0,t=null;return{add:function(n){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=a||r.nc;return t&&e.setAttribute("nonce",t),e}())){var o,i;(o=t).styleSheet?o.styleSheet.cssText=n:o.appendChild(document.createTextNode(n)),i=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(i)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Z=function(){var e=q();return function(t,r){o.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},$=function(){var e=Z();return function(t){return e(t.styles,t.dynamic),null}},Q={left:0,top:0,right:0,gap:0},J=function(e){return parseInt(e||"",10)||0},ee=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],a=t["padding"===e?"paddingRight":"marginRight"];return[J(r),J(n),J(a)]},et=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Q;var t=ee(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},er=$(),en="data-scroll-locked",ea=function(e,t,r,n){var a=e.left,o=e.top,i=e.right,s=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(s,"px ").concat(n,";\n }\n body[").concat(en,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(a,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(z," {\n right: ").concat(s,"px ").concat(n,";\n }\n \n .").concat(K," {\n margin-right: ").concat(s,"px ").concat(n,";\n }\n \n .").concat(z," .").concat(z," {\n right: 0 ").concat(n,";\n }\n \n .").concat(K," .").concat(K," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(en,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},eo=function(){var e=parseInt(document.body.getAttribute(en)||"0",10);return isFinite(e)?e:0},ei=function(){o.useEffect(function(){return document.body.setAttribute(en,(eo()+1).toString()),function(){var e=eo()-1;e<=0?document.body.removeAttribute(en):document.body.setAttribute(en,e.toString())}},[])},es=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,a=void 0===n?"margin":n;ei();var i=o.useMemo(function(){return et(a)},[a]);return o.createElement(er,{styles:ea(i,!t,a,r?"":"!important")})},el=!1;if("undefined"!=typeof window)try{var ec=Object.defineProperty({},"passive",{get:function(){return el=!0,!0}});window.addEventListener("test",ec,ec),window.removeEventListener("test",ec,ec)}catch(e){el=!1}var eu=!!el&&{passive:!1},ed=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&(r.overflowY!==r.overflowX||"TEXTAREA"===e.tagName||"visible"!==r[t])},ef=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),ep(e,n)){var a=em(e,n);if(a[1]>a[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},ep=function(e,t){return"v"===e?ed(t,"overflowY"):ed(t,"overflowX")},em=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},eh=function(e,t,r,n,a){var o,i=(o=window.getComputedStyle(t).direction,"h"===e&&"rtl"===o?-1:1),s=i*n,l=r.target,c=t.contains(l),u=!1,d=s>0,f=0,p=0;do{var m=em(e,l),h=m[0],v=m[1]-m[2]-i*h;(h||v)&&ep(e,l)&&(f+=v,p+=h),l=l instanceof ShadowRoot?l.host:l.parentNode}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return d&&(a&&1>Math.abs(f)||!a&&s>f)?u=!0:!d&&(a&&1>Math.abs(p)||!a&&-s>p)&&(u=!0),u},ev=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},eg=function(e){return[e.deltaX,e.deltaY]},eb=function(e){return e&&"current"in e?e.current:e},ey=0,ew=[];let ex=(n=function(e){var t=o.useRef([]),r=o.useRef([0,0]),n=o.useRef(),a=o.useState(ey++)[0],i=o.useState($)[0],s=o.useRef(e);o.useEffect(function(){s.current=e},[e]),o.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var t=(function(e,t,r){if(r||2==arguments.length)for(var n,a=0,o=t.length;a<o;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))})([e.lockRef.current],(e.shards||[]).map(eb),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var l=o.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!s.current.allowPinchZoom;var a,o=ev(e),i=r.current,l="deltaX"in e?e.deltaX:i[0]-o[0],c="deltaY"in e?e.deltaY:i[1]-o[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=ef(d,u);if(!f)return!0;if(f?a=d:(a="v"===d?"h":"v",f=ef(d,u)),!f)return!1;if(!n.current&&"changedTouches"in e&&(l||c)&&(n.current=a),!a)return!0;var p=n.current||a;return eh(p,t,e,"h"===p?l:c,!0)},[]),c=o.useCallback(function(e){if(ew.length&&ew[ew.length-1]===i){var r="deltaY"in e?eg(e):ev(e),n=t.current.filter(function(t){var n;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(n=t.delta,n[0]===r[0]&&n[1]===r[1])})[0];if(n&&n.should){e.cancelable&&e.preventDefault();return}if(!n){var a=(s.current.shards||[]).map(eb).filter(Boolean).filter(function(t){return t.contains(e.target)});(a.length>0?l(e,a[0]):!s.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),u=o.useCallback(function(e,r,n,a){var o={name:e,delta:r,target:n,should:a,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(n)};t.current.push(o),setTimeout(function(){t.current=t.current.filter(function(e){return e!==o})},1)},[]),d=o.useCallback(function(e){r.current=ev(e),n.current=void 0},[]),f=o.useCallback(function(t){u(t.type,eg(t),t.target,l(t,e.lockRef.current))},[]),p=o.useCallback(function(t){u(t.type,ev(t),t.target,l(t,e.lockRef.current))},[]);o.useEffect(function(){return ew.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,eu),document.addEventListener("touchmove",c,eu),document.addEventListener("touchstart",d,eu),function(){ew=ew.filter(function(e){return e!==i}),document.removeEventListener("wheel",c,eu),document.removeEventListener("touchmove",c,eu),document.removeEventListener("touchstart",d,eu)}},[]);var m=e.removeScrollBar,h=e.inert;return o.createElement(o.Fragment,null,h?o.createElement(i,{styles:"\n .block-interactivity-".concat(a," {pointer-events: none;}\n .allow-interactivity-").concat(a," {pointer-events: all;}\n")}):null,m?o.createElement(es,{gapMode:e.gapMode}):null)},H.useMedium(n),V);var eE=o.forwardRef(function(e,t){return o.createElement(X,F({},e,{ref:t,sideCar:ex}))});eE.classNames=X.classNames;var ek="Popover",[eC,eR]=(0,l.A)(ek,[R.Bk]),eA=(0,R.Bk)(),[eM,eS]=eC(ek),eT=e=>{let{__scopePopover:t,children:r,open:n,defaultOpen:a,onOpenChange:i,modal:s=!1}=e,l=eA(t),c=o.useRef(null),[u,d]=o.useState(!1),[f,p]=(0,T.i)({prop:n,defaultProp:null!=a&&a,onChange:i,caller:ek});return(0,m.jsx)(R.bL,{...l,children:(0,m.jsx)(eM,{scope:t,contentId:(0,C.B)(),triggerRef:c,open:f,onOpenChange:p,onOpenToggle:o.useCallback(()=>p(e=>!e),[p]),hasCustomAnchor:u,onCustomAnchorAdd:o.useCallback(()=>d(!0),[]),onCustomAnchorRemove:o.useCallback(()=>d(!1),[]),modal:s,children:r})})};eT.displayName=ek;var eN="PopoverAnchor",ej=o.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,a=eS(eN,r),i=eA(r),{onCustomAnchorAdd:s,onCustomAnchorRemove:l}=a;return o.useEffect(()=>(s(),()=>l()),[s,l]),(0,m.jsx)(R.Mz,{...i,...n,ref:t})});ej.displayName=eN;var eP="PopoverTrigger",eB=o.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,a=eS(eP,r),o=eA(r),l=(0,s.s)(t,a.triggerRef),c=(0,m.jsx)(f.sG.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":eH(a.open),...n,ref:l,onClick:(0,i.mK)(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?c:(0,m.jsx)(R.Mz,{asChild:!0,...o,children:c})});eB.displayName=eP;var eI="PopoverPortal",[eD,eL]=eC(eI,{forceMount:void 0}),eF=e=>{let{__scopePopover:t,forceMount:r,children:n,container:a}=e,o=eS(eI,t);return(0,m.jsx)(eD,{scope:t,forceMount:r,children:(0,m.jsx)(M.C,{present:r||o.open,children:(0,m.jsx)(A.Z,{asChild:!0,container:a,children:n})})})};eF.displayName=eI;var eO="PopoverContent",ez=o.forwardRef((e,t)=>{let r=eL(eO,e.__scopePopover),{forceMount:n=r.forceMount,...a}=e,o=eS(eO,e.__scopePopover);return(0,m.jsx)(M.C,{present:n||o.open,children:o.modal?(0,m.jsx)(eY,{...a,ref:t}):(0,m.jsx)(eG,{...a,ref:t})})});ez.displayName=eO;var eK=(0,S.TL)("PopoverContent.RemoveScroll"),eY=o.forwardRef((e,t)=>{let r=eS(eO,e.__scopePopover),n=o.useRef(null),a=(0,s.s)(t,n),l=o.useRef(!1);return o.useEffect(()=>{let e=n.current;if(e)return L(e)},[]),(0,m.jsx)(eE,{as:eK,allowPinchZoom:!0,children:(0,m.jsx)(e_,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,i.mK)(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),l.current||null==(t=r.triggerRef.current)||t.focus()}),onPointerDownOutside:(0,i.mK)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;l.current=2===t.button||r},{checkForDefaultPrevented:!1}),onFocusOutside:(0,i.mK)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),eG=o.forwardRef((e,t)=>{let r=eS(eO,e.__scopePopover),n=o.useRef(!1),a=o.useRef(!1);return(0,m.jsx)(e_,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var o,i;null==(o=e.onCloseAutoFocus)||o.call(e,t),t.defaultPrevented||(n.current||null==(i=r.triggerRef.current)||i.focus(),t.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:t=>{var o,i;null==(o=e.onInteractOutside)||o.call(e,t),t.defaultPrevented||(n.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));let s=t.target;(null==(i=r.triggerRef.current)?void 0:i.contains(s))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}})}),e_=o.forwardRef((e,t)=>{let{__scopePopover:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:h,...v}=e,g=eS(eO,r),y=eA(r);return o.useEffect(()=>{var e,t;let r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!=(e=r[0])?e:d()),document.body.insertAdjacentElement("beforeend",null!=(t=r[1])?t:d()),u++,()=>{1===u&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),u--}},[]),(0,m.jsx)(b,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:i,children:(0,m.jsx)(c.qW,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:h,onEscapeKeyDown:l,onPointerDownOutside:f,onFocusOutside:p,onDismiss:()=>g.onOpenChange(!1),children:(0,m.jsx)(R.UC,{"data-state":eH(g.open),role:"dialog",id:g.contentId,...y,...v,ref:t,style:{...v.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),eW="PopoverClose";function eH(e){return e?"open":"closed"}o.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,a=eS(eW,r);return(0,m.jsx)(f.sG.button,{type:"button",...n,ref:t,onClick:(0,i.mK)(e.onClick,()=>a.onOpenChange(!1))})}).displayName=eW,o.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,a=eA(r);return(0,m.jsx)(R.i3,{...a,...n,ref:t})}).displayName="PopoverArrow";var eU=eT,eX=ej,eV=eB,eq=eF,eZ=ez},8452:(e,t,r)=>{r.d(t,{A:()=>l});let n=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],a=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],o=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],i=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],s=(e,t,r)=>{let n=e;return"string"==typeof t||Array.isArray(t)?n=e.toLocaleString(t,r):(!0===t||void 0!==r)&&(n=e.toLocaleString(void 0,r)),n};function l(e,t){let r;if(!Number.isFinite(e))throw TypeError(`Expected a finite number, got ${typeof e}: ${e}`);let l=(t={bits:!1,binary:!1,space:!0,...t}).bits?t.binary?i:o:t.binary?a:n,c=t.space?" ":"";if(t.signed&&0===e)return` 0${c}${l[0]}`;let u=e<0,d=u?"-":t.signed?"+":"";if(u&&(e=-e),void 0!==t.minimumFractionDigits&&(r={minimumFractionDigits:t.minimumFractionDigits}),void 0!==t.maximumFractionDigits&&(r={maximumFractionDigits:t.maximumFractionDigits,...r}),e<1)return d+s(e,t.locale,r)+c+l[0];let f=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),l.length-1);return e/=(t.binary?1024:1e3)**f,r||(e=e.toPrecision(3)),d+s(Number(e),t.locale,r)+c+l[f]}},9361:(e,t,r)=>{r.d(t,{l$:()=>x,oR:()=>v});var n=r(3611),a=r(7722);let o=Array(12).fill(0),i=e=>{let{visible:t,className:r}=e;return n.createElement("div",{className:["sonner-loading-wrapper",r].filter(Boolean).join(" "),"data-visible":t},n.createElement("div",{className:"sonner-spinner"},o.map((e,t)=>n.createElement("div",{className:"sonner-loading-bar",key:"spinner-bar-".concat(t)}))))},s=n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},n.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),l=n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},n.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),c=n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},n.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),u=n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},n.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),d=n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},n.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),f=1;class p{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,a="number"==typeof(null==e?void 0:e.id)||(null==(t=e.id)?void 0:t.length)>0?e.id:f++,o=this.toasts.find(e=>e.id===a),i=void 0===e.dismissible||e.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),o?this.toasts=this.toasts.map(t=>t.id===a?(this.publish({...t,...e,id:a,title:r}),{...t,...e,id:a,dismissible:i,title:r}):t):this.addToast({title:r,...n,dismissible:i,id:a}),a},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{let r,a;if(!t)return;void 0!==t.loading&&(a=this.create({...t,promise:e,type:"loading",message:t.loading,description:"function"!=typeof t.description?t.description:void 0}));let o=Promise.resolve(e instanceof Function?e():e),i=void 0!==a,s=o.then(async e=>{if(r=["resolve",e],n.isValidElement(e))i=!1,this.create({id:a,type:"default",message:e});else if(h(e)&&!e.ok){i=!1;let r="function"==typeof t.error?await t.error("HTTP error! status: ".concat(e.status)):t.error,o="function"==typeof t.description?await t.description("HTTP error! status: ".concat(e.status)):t.description,s="object"!=typeof r||n.isValidElement(r)?{message:r}:r;this.create({id:a,type:"error",description:o,...s})}else if(e instanceof Error){i=!1;let r="function"==typeof t.error?await t.error(e):t.error,o="function"==typeof t.description?await t.description(e):t.description,s="object"!=typeof r||n.isValidElement(r)?{message:r}:r;this.create({id:a,type:"error",description:o,...s})}else if(void 0!==t.success){i=!1;let r="function"==typeof t.success?await t.success(e):t.success,o="function"==typeof t.description?await t.description(e):t.description,s="object"!=typeof r||n.isValidElement(r)?{message:r}:r;this.create({id:a,type:"success",description:o,...s})}}).catch(async e=>{if(r=["reject",e],void 0!==t.error){i=!1;let r="function"==typeof t.error?await t.error(e):t.error,o="function"==typeof t.description?await t.description(e):t.description,s="object"!=typeof r||n.isValidElement(r)?{message:r}:r;this.create({id:a,type:"error",description:o,...s})}}).finally(()=>{i&&(this.dismiss(a),a=void 0),null==t.finally||t.finally.call(t)}),l=()=>new Promise((e,t)=>s.then(()=>"reject"===r[0]?t(r[1]):e(r[1])).catch(t));return"string"!=typeof a&&"number"!=typeof a?{unwrap:l}:Object.assign(a,{unwrap:l})},this.custom=(e,t)=>{let r=(null==t?void 0:t.id)||f++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}let m=new p,h=e=>e&&"object"==typeof e&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status,v=Object.assign((e,t)=>{let r=(null==t?void 0:t.id)||f++;return m.addToast({title:e,...t,id:r}),r},{success:m.success,info:m.info,warning:m.warning,error:m.error,custom:m.custom,message:m.message,promise:m.promise,dismiss:m.dismiss,loading:m.loading},{getHistory:()=>m.toasts,getToasts:()=>m.getActiveToasts()});function g(e){return void 0!==e.label}function b(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter(Boolean).join(" ")}!function(e){if(!e||"undefined"==typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}[data-sonner-toaster][data-lifted=true]{transform:translateY(-8px)}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");let y=e=>{var t,r,a,o,f,p,m,h,v,y,w;let{invert:x,toast:E,unstyled:k,interacting:C,setHeights:R,visibleToasts:A,heights:M,index:S,toasts:T,expanded:N,removeToast:j,defaultRichColors:P,closeButton:B,style:I,cancelButtonStyle:D,actionButtonStyle:L,className:F="",descriptionClassName:O="",duration:z,position:K,gap:Y,expandByDefault:G,classNames:_,icons:W,closeButtonAriaLabel:H="Close toast"}=e,[U,X]=n.useState(null),[V,q]=n.useState(null),[Z,$]=n.useState(!1),[Q,J]=n.useState(!1),[ee,et]=n.useState(!1),[er,en]=n.useState(!1),[ea,eo]=n.useState(!1),[ei,es]=n.useState(0),[el,ec]=n.useState(0),eu=n.useRef(E.duration||z||4e3),ed=n.useRef(null),ef=n.useRef(null),ep=0===S,em=S+1<=A,eh=E.type,ev=!1!==E.dismissible,eg=E.className||"",eb=E.descriptionClassName||"",ey=n.useMemo(()=>M.findIndex(e=>e.toastId===E.id)||0,[M,E.id]),ew=n.useMemo(()=>{var e;return null!=(e=E.closeButton)?e:B},[E.closeButton,B]),ex=n.useMemo(()=>E.duration||z||4e3,[E.duration,z]),eE=n.useRef(0),ek=n.useRef(0),eC=n.useRef(0),eR=n.useRef(null),[eA,eM]=K.split("-"),eS=n.useMemo(()=>M.reduce((e,t,r)=>r>=ey?e:e+t.height,0),[M,ey]),eT=(()=>{let[e,t]=n.useState(document.hidden);return n.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)},[]),e})(),eN=E.invert||x,ej="loading"===eh;ek.current=n.useMemo(()=>ey*Y+eS,[ey,eS]),n.useEffect(()=>{eu.current=ex},[ex]),n.useEffect(()=>{$(!0)},[]),n.useEffect(()=>{let e=ef.current;if(e){let t=e.getBoundingClientRect().height;return ec(t),R(e=>[{toastId:E.id,height:t,position:E.position},...e]),()=>R(e=>e.filter(e=>e.toastId!==E.id))}},[R,E.id]),n.useLayoutEffect(()=>{if(!Z)return;let e=ef.current,t=e.style.height;e.style.height="auto";let r=e.getBoundingClientRect().height;e.style.height=t,ec(r),R(e=>e.find(e=>e.toastId===E.id)?e.map(e=>e.toastId===E.id?{...e,height:r}:e):[{toastId:E.id,height:r,position:E.position},...e])},[Z,E.title,E.description,R,E.id]);let eP=n.useCallback(()=>{J(!0),es(ek.current),R(e=>e.filter(e=>e.toastId!==E.id)),setTimeout(()=>{j(E)},200)},[E,j,R,ek]);n.useEffect(()=>{let e;if((!E.promise||"loading"!==eh)&&E.duration!==1/0&&"loading"!==E.type)return N||C||eT?(()=>{if(eC.current<eE.current){let e=new Date().getTime()-eE.current;eu.current=eu.current-e}eC.current=new Date().getTime()})():eu.current!==1/0&&(eE.current=new Date().getTime(),e=setTimeout(()=>{null==E.onAutoClose||E.onAutoClose.call(E,E),eP()},eu.current)),()=>clearTimeout(e)},[N,C,E,eh,eT,eP]),n.useEffect(()=>{E.delete&&eP()},[eP,E.delete]);let eB=E.icon||(null==W?void 0:W[eh])||(e=>{switch(e){case"success":return s;case"info":return c;case"warning":return l;case"error":return u;default:return null}})(eh);return n.createElement("li",{tabIndex:0,ref:ef,className:b(F,eg,null==_?void 0:_.toast,null==E||null==(t=E.classNames)?void 0:t.toast,null==_?void 0:_.default,null==_?void 0:_[eh],null==E||null==(r=E.classNames)?void 0:r[eh]),"data-sonner-toast":"","data-rich-colors":null!=(y=E.richColors)?y:P,"data-styled":!(E.jsx||E.unstyled||k),"data-mounted":Z,"data-promise":!!E.promise,"data-swiped":ea,"data-removed":Q,"data-visible":em,"data-y-position":eA,"data-x-position":eM,"data-index":S,"data-front":ep,"data-swiping":ee,"data-dismissible":ev,"data-type":eh,"data-invert":eN,"data-swipe-out":er,"data-swipe-direction":V,"data-expanded":!!(N||G&&Z),style:{"--index":S,"--toasts-before":S,"--z-index":T.length-S,"--offset":"".concat(Q?ei:ek.current,"px"),"--initial-height":G?"auto":"".concat(el,"px"),...I,...E.style},onDragEnd:()=>{et(!1),X(null),eR.current=null},onPointerDown:e=>{!ej&&ev&&(ed.current=new Date,es(ek.current),e.target.setPointerCapture(e.pointerId),"BUTTON"!==e.target.tagName&&(et(!0),eR.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{var e,t,r,n,a;if(er||!ev)return;eR.current=null;let o=Number((null==(e=ef.current)?void 0:e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),i=Number((null==(t=ef.current)?void 0:t.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),s=new Date().getTime()-(null==(r=ed.current)?void 0:r.getTime()),l="x"===U?o:i,c=Math.abs(l)/s;if(Math.abs(l)>=45||c>.11){es(ek.current),null==E.onDismiss||E.onDismiss.call(E,E),"x"===U?q(o>0?"right":"left"):q(i>0?"down":"up"),eP(),en(!0);return}null==(n=ef.current)||n.style.setProperty("--swipe-amount-x","0px"),null==(a=ef.current)||a.style.setProperty("--swipe-amount-y","0px"),eo(!1),et(!1),X(null)},onPointerMove:t=>{var r,n,a,o;if(!eR.current||!ev||(null==(r=window.getSelection())?void 0:r.toString().length)>0)return;let i=t.clientY-eR.current.y,s=t.clientX-eR.current.x,l=null!=(o=e.swipeDirections)?o:function(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}(K);!U&&(Math.abs(s)>1||Math.abs(i)>1)&&X(Math.abs(s)>Math.abs(i)?"x":"y");let c={x:0,y:0},u=e=>1/(1.5+Math.abs(e)/20);if("y"===U){if(l.includes("top")||l.includes("bottom"))if(l.includes("top")&&i<0||l.includes("bottom")&&i>0)c.y=i;else{let e=i*u(i);c.y=Math.abs(e)<Math.abs(i)?e:i}}else if("x"===U&&(l.includes("left")||l.includes("right")))if(l.includes("left")&&s<0||l.includes("right")&&s>0)c.x=s;else{let e=s*u(s);c.x=Math.abs(e)<Math.abs(s)?e:s}(Math.abs(c.x)>0||Math.abs(c.y)>0)&&eo(!0),null==(n=ef.current)||n.style.setProperty("--swipe-amount-x","".concat(c.x,"px")),null==(a=ef.current)||a.style.setProperty("--swipe-amount-y","".concat(c.y,"px"))}},ew&&!E.jsx&&"loading"!==eh?n.createElement("button",{"aria-label":H,"data-disabled":ej,"data-close-button":!0,onClick:ej||!ev?()=>{}:()=>{eP(),null==E.onDismiss||E.onDismiss.call(E,E)},className:b(null==_?void 0:_.closeButton,null==E||null==(a=E.classNames)?void 0:a.closeButton)},null!=(w=null==W?void 0:W.close)?w:d):null,(eh||E.icon||E.promise)&&null!==E.icon&&((null==W?void 0:W[eh])!==null||E.icon)?n.createElement("div",{"data-icon":"",className:b(null==_?void 0:_.icon,null==E||null==(o=E.classNames)?void 0:o.icon)},E.promise||"loading"===E.type&&!E.icon?E.icon||function(){var e,t;return(null==W?void 0:W.loading)?n.createElement("div",{className:b(null==_?void 0:_.loader,null==E||null==(t=E.classNames)?void 0:t.loader,"sonner-loader"),"data-visible":"loading"===eh},W.loading):n.createElement(i,{className:b(null==_?void 0:_.loader,null==E||null==(e=E.classNames)?void 0:e.loader),visible:"loading"===eh})}():null,"loading"!==E.type?eB:null):null,n.createElement("div",{"data-content":"",className:b(null==_?void 0:_.content,null==E||null==(f=E.classNames)?void 0:f.content)},n.createElement("div",{"data-title":"",className:b(null==_?void 0:_.title,null==E||null==(p=E.classNames)?void 0:p.title)},E.jsx?E.jsx:"function"==typeof E.title?E.title():E.title),E.description?n.createElement("div",{"data-description":"",className:b(O,eb,null==_?void 0:_.description,null==E||null==(m=E.classNames)?void 0:m.description)},"function"==typeof E.description?E.description():E.description):null),n.isValidElement(E.cancel)?E.cancel:E.cancel&&g(E.cancel)?n.createElement("button",{"data-button":!0,"data-cancel":!0,style:E.cancelButtonStyle||D,onClick:e=>{g(E.cancel)&&ev&&(null==E.cancel.onClick||E.cancel.onClick.call(E.cancel,e),eP())},className:b(null==_?void 0:_.cancelButton,null==E||null==(h=E.classNames)?void 0:h.cancelButton)},E.cancel.label):null,n.isValidElement(E.action)?E.action:E.action&&g(E.action)?n.createElement("button",{"data-button":!0,"data-action":!0,style:E.actionButtonStyle||L,onClick:e=>{g(E.action)&&(null==E.action.onClick||E.action.onClick.call(E.action,e),e.defaultPrevented||eP())},className:b(null==_?void 0:_.actionButton,null==E||null==(v=E.classNames)?void 0:v.actionButton)},E.action.label):null)};function w(){if("undefined"==typeof window||"undefined"==typeof document)return"ltr";let e=document.documentElement.getAttribute("dir");return"auto"!==e&&e?e:window.getComputedStyle(document.documentElement).direction}let x=n.forwardRef(function(e,t){let{invert:r,position:o="bottom-right",hotkey:i=["altKey","KeyT"],expand:s,closeButton:l,className:c,offset:u,mobileOffset:d,theme:f="light",richColors:p,duration:h,style:v,visibleToasts:g=3,toastOptions:b,dir:x=w(),gap:E=14,icons:k,containerAriaLabel:C="Notifications"}=e,[R,A]=n.useState([]),M=n.useMemo(()=>Array.from(new Set([o].concat(R.filter(e=>e.position).map(e=>e.position)))),[R,o]),[S,T]=n.useState([]),[N,j]=n.useState(!1),[P,B]=n.useState(!1),[I,D]=n.useState("system"!==f?f:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),L=n.useRef(null),F=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),O=n.useRef(null),z=n.useRef(!1),K=n.useCallback(e=>{A(t=>{var r;return(null==(r=t.find(t=>t.id===e.id))?void 0:r.delete)||m.dismiss(e.id),t.filter(t=>{let{id:r}=t;return r!==e.id})})},[]);return n.useEffect(()=>m.subscribe(e=>{if(e.dismiss)return void requestAnimationFrame(()=>{A(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});setTimeout(()=>{a.flushSync(()=>{A(t=>{let r=t.findIndex(t=>t.id===e.id);return -1!==r?[...t.slice(0,r),{...t[r],...e},...t.slice(r+1)]:[e,...t]})})})}),[R]),n.useEffect(()=>{if("system"!==f)return void D(f);if("system"===f&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?D("dark"):D("light")),"undefined"==typeof window)return;let e=window.matchMedia("(prefers-color-scheme: dark)");try{e.addEventListener("change",e=>{let{matches:t}=e;t?D("dark"):D("light")})}catch(t){e.addListener(e=>{let{matches:t}=e;try{t?D("dark"):D("light")}catch(e){console.error(e)}})}},[f]),n.useEffect(()=>{R.length<=1&&j(!1)},[R]),n.useEffect(()=>{let e=e=>{var t,r;i.every(t=>e[t]||e.code===t)&&(j(!0),null==(r=L.current)||r.focus()),"Escape"===e.code&&(document.activeElement===L.current||(null==(t=L.current)?void 0:t.contains(document.activeElement)))&&j(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[i]),n.useEffect(()=>{if(L.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,z.current=!1)}},[L.current]),n.createElement("section",{ref:t,"aria-label":"".concat(C," ").concat(F),tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},M.map((t,a)=>{var o;let[i,f]=t.split("-");return R.length?n.createElement("ol",{key:t,dir:"auto"===x?w():x,tabIndex:-1,ref:L,className:c,"data-sonner-toaster":!0,"data-sonner-theme":I,"data-y-position":i,"data-lifted":N&&R.length>1&&!s,"data-x-position":f,style:{"--front-toast-height":"".concat((null==(o=S[0])?void 0:o.height)||0,"px"),"--width":"".concat(356,"px"),"--gap":"".concat(E,"px"),...v,...function(e,t){let r={};return[e,t].forEach((e,t)=>{let n=1===t,a=n?"--mobile-offset":"--offset",o=n?"16px":"24px";function i(e){["top","right","bottom","left"].forEach(t=>{r["".concat(a,"-").concat(t)]="number"==typeof e?"".concat(e,"px"):e})}"number"==typeof e||"string"==typeof e?i(e):"object"==typeof e?["top","right","bottom","left"].forEach(t=>{void 0===e[t]?r["".concat(a,"-").concat(t)]=o:r["".concat(a,"-").concat(t)]="number"==typeof e[t]?"".concat(e[t],"px"):e[t]}):i(o)}),r}(u,d)},onBlur:e=>{z.current&&!e.currentTarget.contains(e.relatedTarget)&&(z.current=!1,O.current&&(O.current.focus({preventScroll:!0}),O.current=null))},onFocus:e=>{!(e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible)&&(z.current||(z.current=!0,O.current=e.relatedTarget))},onMouseEnter:()=>j(!0),onMouseMove:()=>j(!0),onMouseLeave:()=>{P||j(!1)},onDragEnd:()=>j(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||B(!0)},onPointerUp:()=>B(!1)},R.filter(e=>!e.position&&0===a||e.position===t).map((a,o)=>{var i,c;return n.createElement(y,{key:a.id,icons:k,index:o,toast:a,defaultRichColors:p,duration:null!=(i=null==b?void 0:b.duration)?i:h,className:null==b?void 0:b.className,descriptionClassName:null==b?void 0:b.descriptionClassName,invert:r,visibleToasts:g,closeButton:null!=(c=null==b?void 0:b.closeButton)?c:l,interacting:P,position:t,style:null==b?void 0:b.style,unstyled:null==b?void 0:b.unstyled,classNames:null==b?void 0:b.classNames,cancelButtonStyle:null==b?void 0:b.cancelButtonStyle,actionButtonStyle:null==b?void 0:b.actionButtonStyle,closeButtonAriaLabel:null==b?void 0:b.closeButtonAriaLabel,removeToast:K,toasts:R.filter(e=>e.position==a.position),heights:S.filter(e=>e.position==a.position),setHeights:T,expandByDefault:s,gap:E,expanded:N,swipeDirections:e.swipeDirections})})):null}))})}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[177],{6:e=>{e.exports={style:{fontFamily:"'Inter', 'Inter Fallback'",fontStyle:"normal"},className:"__className_f367f3",variable:"__variable_f367f3"}},1154:e=>{e.exports={style:{fontFamily:"'sfMono', 'sfMono Fallback'"},className:"__className_a0e4c0",variable:"__variable_a0e4c0"}},3526:(e,t,a)=>{Promise.resolve().then(a.t.bind(a,7979,23)),Promise.resolve().then(a.t.bind(a,6,23)),Promise.resolve().then(a.t.bind(a,1154,23)),Promise.resolve().then(a.bind(a,9307))},5224:(e,t,a)=>{"use strict";a.d(t,{a:()=>i});var r=a(3611),l=a(4512);let i=e=>{let t=(0,r.useRef)(null);(0,r.useEffect)(()=>{t.current||(t.current=(0,l.io)());let a=t.current;return a.on("reload",t=>{console.debug("Reloading..."),e(t)}),()=>{a.off()}},[e])}},7979:()=>{},9195:(e,t,a)=>{"use strict";a.d(t,{Hf:()=>l,m4:()=>i});var r=a(2248);r.env.USER_PROJECT_LOCATION,r.env.PREVIEW_SERVER_LOCATION,r.env.EMAILS_DIR_ABSOLUTE_PATH;let l="true"===r.env.NEXT_PUBLIC_IS_BUILDING,i="true"===r.env.NEXT_PUBLIC_IS_PREVIEW_DEVELOPMENT},9307:(e,t,a)=>{"use strict";a.d(t,{EmailsProvider:()=>d,J:()=>_});var r=a(1275),l=a(3611),i=a(4366);let o=(0,i.createServerReference)("7f78663884926fd2ab379beb6d084a69a243be8f50",i.callServer,void 0,i.findSourceMapURL,"getEmailsDirectoryMetadataAction");var s=a(9195),n=a(5224);let c=(0,l.createContext)(void 0),_=()=>{let e=(0,l.useContext)(c);if(void 0===e)throw Error("Cannot call `useEmails` outside of an `EmailsContext` provider.");return e},d=e=>{let[t,a]=(0,l.useState)(e.initialEmailsDirectoryMetadata);return s.Hf||s.m4||(0,n.a)(async()=>{let t=await o(e.initialEmailsDirectoryMetadata.absolutePath);if(t)a(t);else throw Error("Hot reloading: unable to find the emails directory to update the sidebar")}),(0,r.jsx)(c.Provider,{value:{emailsDirectoryMetadata:t},children:e.children})}}},e=>{e.O(0,[807,983,105,713,358],()=>e(e.s=3526)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[719],{616:(e,t,a)=>{"use strict";a.d(t,{i:()=>l});var s=a(1275),r=a(3611),n=a(4387);let l=r.forwardRef((e,t)=>{let{...a}=e;return(0,s.jsx)(n.z,{ref:t,...a,children:(0,s.jsx)("path",{d:"M16.25 8.75L10.406 15.25L7.75 12.75",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})})});l.displayName="IconCheck"},1156:(e,t,a)=>{"use strict";a.d(t,{PreviewProvider:()=>f,$:()=>g});var s=a(1275),r=a(2108),n=a(3611),l=a(9195),i=a(4366);let o=(0,i.createServerReference)("7f0c27ba832359eb08553f3bfeaa1fabadf3a5401f",i.callServer,void 0,i.findSourceMapURL,"getEmailPathFromSlug"),c=(0,i.createServerReference)("7f1e351c03c7a084ac9526176897de4e5646c672f8",i.callServer,void 0,i.findSourceMapURL,"renderEmailByPath");var d=a(9307);let u=(e,t)=>m(e.replace(t.relativePath,"").split("/").filter(Boolean),t),m=(e,t)=>{if(1===e.length){let a=(e=>{let t=e.split(".");return t.length>1?t.slice(0,-1).join("."):e})(e[0]);return t.emailFilenames.includes(a)}let a=e.join("/");for(let s of t.subDirectories)if(a.startsWith(s.directoryName)){let t=s.directoryName.split("/").filter(Boolean).length;return m(e.slice(t),s)}return!1};var h=a(5224);let x={},p=(0,n.createContext)(void 0),f=e=>{let{emailSlug:t,emailPath:a,serverRenderingResult:i,children:m}=e,f=(0,r.useRouter)(),g=((e,t)=>{let[a,s]=(0,n.useState)(t),{emailsDirectoryMetadata:r}=(0,d.J)();return l.Hf||l.m4||(0,h.a)(async t=>{for await(let a of t){let t=a.filename;if(!u(t,r))continue;let n=await o(t),l=await c(n,!0);n===e&&s(l)}}),a})(a,i),b=((e,t,a)=>((0,n.useEffect)(()=>{"markup"in t?x[e]=t:void 0!==a&&"markup"in a&&void 0===x[e]&&(x[e]=a)},[t,e,a]),"error"in t?x[e]:t))(a,g,i);return l.Hf||l.m4||(0,h.a)(e=>{let a=e.find(e=>e.filename.includes(t));void 0!==a&&"unlink"===a.event&&f.push("/")}),(0,s.jsx)(p.Provider,{value:{emailPath:a,emailSlug:t,renderedEmailMetadata:b,renderingResult:g},children:m})},g=()=>{let e=(0,n.useContext)(p);if(void 0===e)throw Error("Cannot call `usePreviewContext` outside of an `PreviewContext` provider.");return e}},2733:(e,t,a)=>{"use strict";a.d(t,{default:()=>J});var s=a(1275),r=a(2108),n=a(3611),l=a(7722),i=a(9361),o=a(7034),c=a(1464),d=a(2402);a(6209),a(1988),a(3560);var u=a(4957),m=a(4600);let h=n.forwardRef((e,t)=>{let{as:a="span",size:r="2",color:n="gray",transform:l,weight:i="normal",className:o,children:c,...d}=e;return(0,s.jsx)(u.DX,{className:(0,m.cn)(o,l,x(r),p(n),f(i)),ref:t,...d,children:(0,s.jsx)(a,{children:c})})}),x=e=>{switch(e){case"1":return"text-xs";case void 0:case"2":return"text-sm";case"3":return"text-base";case"4":return"text-lg";case"5":return["text-17px","md:text-xl tracking-[-0.16px]"];case"6":return"text-2xl tracking-[-0.288px]";case"7":return"text-[28px] leading-[34px] tracking-[-0.416px]";case"8":return"text-[35px] leading-[42px] tracking-[-0.64px]";case"9":return"text-6xl leading-[73px] tracking-[-0.896px]";default:return(0,m.HB)(e)}},p=e=>{switch(e){case"white":return"text-slate-12";case void 0:case"gray":return"text-slate-11";default:return(0,m.HB)(e)}},f=e=>{switch(e){case void 0:case"normal":return"font-normal";case"medium":return"font-medium";default:return(0,m.HB)(e)}};h.displayName="Text";var g=a(1789),b=a(4094),j=a(8031);let v={type:"spring",stiffness:2e3,damping:80,mass:1};var w=a(5155);let y=n.forwardRef((e,t)=>{let{children:a,className:r,...n}=e;return(0,s.jsx)("button",{type:"button",...n,className:(0,m.cn)("focus:ring-gray-8 rounded text-slate-11 transition duration-200 ease-in-out hover:text-slate-12 focus:text-slate-12 focus:outline-none focus:ring-2",r),ref:t,children:a})});y.displayName="IconButton";var C=a(616),N=a(4387);let k=n.forwardRef((e,t)=>{let{...a}=e;return(0,s.jsxs)(N.z,{ref:t,...a,children:[(0,s.jsx)("path",{d:"M9 6.75H7.75C6.64543 6.75 5.75 7.64543 5.75 8.75V17.25C5.75 18.3546 6.64543 19.25 7.75 19.25H16.25C17.3546 19.25 18.25 18.3546 18.25 17.25V8.75C18.25 7.64543 17.3546 6.75 16.25 6.75H15",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),(0,s.jsx)("path",{d:"M14 8.25H10C9.44772 8.25 9 7.80228 9 7.25V5.75C9 5.19772 9.44772 4.75 10 4.75H14C14.5523 4.75 15 5.19772 15 5.75V7.25C15 7.80228 14.5523 8.25 14 8.25Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),(0,s.jsx)("path",{d:"M9.75 12.25H14.25",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),(0,s.jsx)("path",{d:"M9.75 15.25H14.25",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})]})});k.displayName="IconClipboard";let S=n.forwardRef((e,t)=>{let{...a}=e;return(0,s.jsx)(N.z,{ref:t,...a,children:(0,s.jsx)("path",{d:"M4.75 14.75v1.5a3 3 0 0 0 3 3h8.5a3 3 0 0 0 3-3v-1.5M12 14.25v-9.5M8.75 10.75l3.25 3.5 3.25-3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5})})});S.displayName="IconDownload";var L=a(5877);let R=e=>{let{markups:t,activeLang:a,setActiveLang:r}=e,l=t.find(e=>{let{language:t}=e;return a===t});if(!l)throw Error("No markup found for the active language!",{cause:{activeLang:a,markups:t}});let i=n.useId();return(0,s.jsxs)("div",{className:"relative max-h-[650px] w-full h-full whitespace-pre rounded-md border border-slate-6 text-sm",style:{lineHeight:"130%",background:"linear-gradient(145.37deg, rgba(255, 255, 255, 0.09) -8.75%, rgba(255, 255, 255, 0.027) 83.95%)",boxShadow:"rgb(0 0 0 / 10%) 0px 5px 30px -5px"},children:[(0,s.jsxs)("div",{className:"h-9 border-b border-slate-6",children:[(0,s.jsx)("div",{className:"flex",children:(0,s.jsx)(b.o,{id:i,children:t.map(e=>{let{language:t}=e,n=a===t;return(0,s.jsxs)(j.P.button,{className:"relative px-4 py-[8px] font-sans text-sm font-medium transition duration-200 ease-in-out hover:text-slate-12 ".concat(a!==t?"text-slate-11":"text-slate-12"),onClick:()=>{r(t)},children:[n?(0,s.jsx)(j.P.span,{animate:{opacity:1},className:"absolute bottom-0 left-0 right-0 top-0 bg-slate-4",exit:{opacity:0},initial:{opacity:0},layoutId:"code",transition:v}):null,w.A[t]]},t)})})}),(0,s.jsx)(M,{content:l.content}),(0,s.jsx)(H,{content:l.content,filename:"email.".concat(l.language)})]}),(0,s.jsx)("div",{className:"h-[calc(100%-2.25rem)]",children:(0,s.jsx)(d.Code,{language:a,children:l.content})})]})},M=e=>{let{content:t}=e,[a,r]=n.useState(!1),l=n.useRef(void 0);return n.useEffect(()=>{r(!1),clearTimeout(l.current),l.current=void 0},[t]),(0,s.jsxs)(L.m,{children:[(0,s.jsx)(L.m.Trigger,{asChild:!0,className:"absolute right-2 top-2 hidden md:block",children:(0,s.jsx)(y,{onClick:async()=>{r(!0),await (0,m.eM)(t),l.current=setTimeout(()=>{r(!1)},3e3)},children:a?(0,s.jsx)(C.i,{}):(0,s.jsx)(k,{})})}),(0,s.jsx)(L.m.Content,{children:"Copy to Clipboard"})]})},H=e=>{let{content:t,filename:a}=e,r=n.useMemo(()=>{let e=new File([t],a);return URL.createObjectURL(e)},[t,a]),l=n.useSyncExternalStore(()=>()=>{},()=>r,()=>void 0);return(0,s.jsxs)(L.m,{children:[(0,s.jsx)(L.m.Trigger,{asChild:!0,className:"text-gray-11 absolute right-8 top-2 hidden md:block",children:(0,s.jsx)("a",{className:"text-slate-11 transition duration-200 ease-in-out hover:text-slate-12",download:a,href:l,children:(0,s.jsx)(S,{})})}),(0,s.jsx)(L.m.Content,{children:"Download"})]})};var T=a(7148),P=a(6516);let E=[{name:"Desktop",dimensions:{width:1024,height:600},icon:(0,s.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",children:(0,s.jsx)("path",{d:"M1 3.25C1 3.11193 1.11193 3 1.25 3H13.75C13.8881 3 14 3.11193 14 3.25V10.75C14 10.8881 13.8881 11 13.75 11H1.25C1.11193 11 1 10.8881 1 10.75V3.25ZM1.25 2C0.559643 2 0 2.55964 0 3.25V10.75C0 11.4404 0.559644 12 1.25 12H5.07341L4.82991 13.2986C4.76645 13.6371 5.02612 13.95 5.37049 13.95H9.62951C9.97389 13.95 10.2336 13.6371 10.1701 13.2986L9.92659 12H13.75C14.4404 12 15 11.4404 15 10.75V3.25C15 2.55964 14.4404 2 13.75 2H1.25ZM9.01091 12H5.98909L5.79222 13.05H9.20778L9.01091 12Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})},{name:"Mobile",dimensions:{width:375,height:667},icon:(0,s.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",children:(0,s.jsx)("path",{d:"M4 2.5C4 2.22386 4.22386 2 4.5 2H10.5C10.7761 2 11 2.22386 11 2.5V12.5C11 12.7761 10.7761 13 10.5 13H4.5C4.22386 13 4 12.7761 4 12.5V2.5ZM4.5 1C3.67157 1 3 1.67157 3 2.5V12.5C3 13.3284 3.67157 14 4.5 14H10.5C11.3284 14 12 13.3284 12 12.5V2.5C12 1.67157 11.3284 1 10.5 1H4.5ZM6 11.65C5.8067 11.65 5.65 11.8067 5.65 12C5.65 12.1933 5.8067 12.35 6 12.35H9C9.1933 12.35 9.35 12.1933 9.35 12C9.35 11.8067 9.1933 11.65 9 11.65H6Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}],V=e=>{let{minWidth:t,minHeight:a,viewWidth:r,viewHeight:l,setViewWidth:i,setViewHeight:o}=e,[c,d]=n.useState(!1),[u,h]=n.useState(r),[x,p]=n.useState(l);return n.useEffect(()=>{h(r),p(l)},[r,l]),(0,s.jsxs)("div",{className:"relative flex h-9 w-fit overflow-hidden rounded-lg border border-slate-6 text-sm transition-colors duration-300 ease-in-out",children:[E.map(e=>(0,s.jsxs)(L.m,{children:[(0,s.jsx)(L.m.Trigger,{asChild:!0,children:(0,s.jsx)("button",{onClick:()=>(e=>{i(e.width),o(e.height)})(e.dimensions),className:(0,m.cn)("relative flex items-center justify-center w-9 transition-colors hover:text-slate-12",{"bg-slate-4":r===e.dimensions.width&&l===e.dimensions.height}),type:"button",children:e.icon},e.name)}),(0,s.jsx)(L.m.Content,{children:e.name})]})),(0,s.jsxs)(T.bL,{open:c,onOpenChange:d,children:[(0,s.jsx)(T.l9,{asChild:!0,children:(0,s.jsxs)("button",{type:"button",className:"relative flex items-center justify-center overflow-hidden w-9 text-slate-11 text-sm leading-none outline-none transition-colors ease-linear focus-within:text-slate-12 hover:text-slate-12 focus:text-slate-12",children:[(0,s.jsx)("span",{className:"sr-only",children:"View presets"}),(0,s.jsx)(P.R,{className:(0,m.cn)("transform transition-transform duration-200 ease-[cubic-bezier(.36,.66,.6,1)]",{"-rotate-180":c})})]})}),(0,s.jsx)(T.ZL,{children:(0,s.jsxs)(T.UC,{align:"end",className:"flex min-w-[12rem] flex-col gap-2 rounded-md border border-slate-8 border-solid bg-black px-2 py-2 text-white",sideOffset:5,children:[(0,s.jsxs)("div",{className:"flex w-full items-center justify-between text-sm gap-2",children:[(0,s.jsx)("span",{className:"font-medium text-slate-11 text-xs",children:"Width"}),(0,s.jsx)("input",{type:"number",value:u,onChange:e=>{let a=Number(e.target.value);h(a),a>=t&&i(a)},className:"w-20 appearance-none rounded-lg border border-slate-6 bg-slate-5 px-1 py-1 text-sm text-slate-12 placeholder-slate-10 outline-none transition duration-300 ease-in-out focus:ring-1 focus:ring-slate-10"})]}),(0,s.jsxs)("div",{className:"flex w-full items-center justify-between text-sm gap-2",children:[(0,s.jsx)("span",{className:"font-medium text-slate-11 text-xs",children:"Height"}),(0,s.jsx)("input",{type:"number",value:x,onChange:e=>{let t=Number(e.target.value);p(t),t>=a&&o(t)},className:"w-20 appearance-none rounded-lg border border-slate-6 bg-slate-5 px-1 py-1 text-sm text-slate-12 placeholder-slate-10 outline-none transition duration-300 ease-in-out focus:ring-1 focus:ring-slate-10"})]})]})})]})]})},I=e=>{let{width:t,height:a,onResize:r,onResizeEnd:l,children:i,maxHeight:o,maxWidth:c,minHeight:d,minWidth:h,...x}=e,p=(0,n.useRef)(null),[f,g]=(0,n.useState)(!1),b=(0,n.useRef)(null),[j,v]=(0,n.useState)(null),w=(0,n.useCallback)(()=>{b.current&&document.removeEventListener("mousemove",b.current),document.removeEventListener("mouseup",w),g(!1),v(null),null==l||l()},[]),y=e=>{b.current=t=>{if(0===t.button&&p.current){let a="east"===e||"west"===e,s=a?t.clientX:t.clientY,n=p.current.getBoundingClientRect(),l=a?n.x+n.width/2:n.y+n.height/2,i=2*Math.abs(s-l);g(!0),v(e);for(let t=0;t<E.length;t++){let s=E[t];if(s){if(a&&i>s.dimensions.width-12&&i<s.dimensions.width+12)return void r(s.dimensions.width,e);if(!a&&i>s.dimensions.height-12&&i<s.dimensions.height+12)return void r(s.dimensions.height,e)}}r(2*Math.abs(s-l),e)}else w()},document.addEventListener("mouseup",w),document.addEventListener("mousemove",b.current)};return(0,n.useEffect)(()=>{if(window.document)return()=>{w()}},[]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:" overflow-hidden absolute inset-0",children:(0,s.jsx)("div",{className:"absolute mx-auto box-content -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2",children:E.map(e=>(0,s.jsxs)("div",{className:"-translate-x-1/2 -translate-y-1/2 absolute pointer-events-none select-none",style:{width:e.dimensions.width,height:e.dimensions.height},children:[t===e.dimensions.width&&f&&("east"===j||"west"===j)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"absolute right-0 -top-[100vw] -bottom-[100vw] border-r-2 border-cyan-5"}),(0,s.jsx)("div",{className:"absolute left-0 -top-[100vw] -bottom-[100vw] border-l-2 border-cyan-5"})]}),a===e.dimensions.height&&f&&("north"===j||"south"===j)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"absolute top-0 -left-[100vw] -right-[100vw] border-t-2 border-cyan-5"}),(0,s.jsx)("div",{className:"absolute bottom-0 -left-[100vw] -right-[100vw] border-b-2 border-cyan-5"})]})]},e.name))})}),(0,s.jsxs)("div",{...x,className:(0,m.cn)("relative mx-auto my-auto box-content",x.className),children:[(0,s.jsx)("div",{"aria-label":"resize-west","aria-valuenow":t,"aria-valuemin":h,"aria-valuemax":c,className:"-translate-x-1/2 -translate-y-1/2 absolute top-1/2 -left-2 cursor-w-resize p-2 [user-drag:none]",onDragStart:e=>e.preventDefault(),draggable:"false",onMouseDown:()=>{y("west")},role:"slider",tabIndex:0,children:(0,s.jsx)("div",{className:(0,m.cn)("h-8 w-1 rounded-md bg-black/50 transition-colors",{"bg-black":"west"===j})})}),(0,s.jsx)("div",{"aria-label":"resize-east","aria-valuenow":t,"aria-valuemin":h,"aria-valuemax":c,onDragStart:e=>e.preventDefault(),className:"translate-x-1/2 -translate-y-1/2 absolute top-1/2 -right-2 cursor-e-resize p-2 [user-drag:none]",draggable:"false",onMouseDown:()=>{y("east")},role:"slider",tabIndex:0,children:(0,s.jsx)("div",{className:(0,m.cn)("h-8 w-1 rounded-md bg-black/50 transition-colors",{"bg-black":"east"===j})})}),(0,s.jsx)("div",{"aria-label":"resize-north","aria-valuenow":a,"aria-valuemin":d,"aria-valuemax":o,onDragStart:e=>e.preventDefault(),className:"-translate-x-1/2 -translate-y-1/2 absolute -top-2 left-1/2 cursor-n-resize p-2 [user-drag:none]",draggable:"false",onMouseDown:()=>{y("north")},role:"slider",tabIndex:0,children:(0,s.jsx)("div",{className:(0,m.cn)("h-1 w-8 rounded-md bg-black/50 transition-colors",{"bg-black":"north"===j})})}),(0,s.jsx)("div",{"aria-label":"resize-south","aria-valuenow":a,"aria-valuemin":d,"aria-valuemax":o,onDragStart:e=>e.preventDefault(),className:"-translate-x-1/2 translate-y-1/2 absolute -bottom-2 left-1/2 cursor-s-resize p-2 [user-drag:none]",draggable:"false",onMouseDown:()=>{y("south")},role:"slider",tabIndex:0,children:(0,s.jsx)("div",{className:(0,m.cn)("h-1 w-8 rounded-md bg-black/50 transition-colors",{"bg-black":"south"===j})})}),(0,s.jsx)(u.DX,{ref:p,className:f?"pointer-events-none select-none":"",children:i})]})]})},z=e=>{let{markup:t}=e,[a,r]=n.useState(""),[l,o]=n.useState("Testing React Email"),[d,u]=n.useState(!1),[m,x]=n.useState(!1),p=async e=>{try{e.preventDefault(),u(!0);let s=await fetch("https://react.email/api/send/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({to:a,subject:l,html:t})});if(429===s.status){let{error:e}=await s.json();i.oR.error(e)}i.oR.success("Email sent! Check your inbox.")}catch(e){i.oR.error("Something went wrong. Please try again.")}finally{u(!1)}},f=n.useId(),g=n.useId();return(0,s.jsxs)(T.bL,{onOpenChange:()=>{m?(document.body.classList.remove("popup-open"),x(!1)):(document.body.classList.add("popup-open"),x(!0))},open:m,children:[(0,s.jsx)(T.l9,{asChild:!0,children:(0,s.jsx)("button",{className:"box-border flex h-5 w-20 items-center justify-center self-center rounded-lg border border-slate-6 bg-slate-2 px-4 py-4 text-center font-sans text-sm text-slate-11 outline-none transition duration-300 ease-in-out hover:border-slate-10 hover:text-slate-12",type:"submit",children:"Send"})}),(0,s.jsx)(T.Mz,{}),(0,s.jsx)(T.ZL,{children:(0,s.jsx)(T.UC,{align:"end",className:"-mt-10 w-80 rounded-lg border border-slate-6 bg-black/70 p-3 text-slate-11 shadow-md backdrop-blur-lg font-sans",sideOffset:48,children:(0,s.jsxs)("form",{className:"mt-1",onSubmit:e=>void p(e),children:[(0,s.jsx)("label",{className:"mb-2 block text-xs uppercase text-slate-10",htmlFor:f,children:"Recipient"}),(0,s.jsx)("input",{autoFocus:!0,className:"mb-3 w-full appearance-none rounded-lg border border-slate-6 bg-slate-3 px-2 py-1 text-sm text-slate-12 placeholder-slate-10 outline-none transition duration-300 ease-in-out focus:ring-1 focus:ring-slate-10",defaultValue:a,id:f,onChange:e=>{r(e.target.value)},placeholder:"you@example.com",required:!0,type:"email"}),(0,s.jsx)("label",{className:"mb-2 mt-1 block text-xs uppercase text-slate-10",htmlFor:g,children:"Subject"}),(0,s.jsx)("input",{className:"mb-3 w-full appearance-none rounded-lg border border-slate-6 bg-slate-3 px-2 py-1 text-sm text-slate-12 placeholder-slate-10 outline-none transition duration-300 ease-in-out focus:ring-1 focus:ring-slate-10",defaultValue:l,id:g,onChange:e=>{o(e.target.value)},placeholder:"My Email",required:!0,type:"text"}),(0,s.jsx)("input",{className:"appearance-none checked:bg-blue-500",type:"checkbox"}),(0,s.jsxs)("div",{className:"mt-3 flex items-center justify-between",children:[(0,s.jsxs)(h,{className:"inline-block",size:"1",children:["Powered by"," ",(0,s.jsx)("a",{className:"text-white/85 transition duration-300 ease-in-out hover:text-slate-12",href:"https://resend.com",rel:"noreferrer",target:"_blank",children:"Resend"})]}),(0,s.jsx)(c.Button,{className:"disabled:border-transparent disabled:bg-slate-11",disabled:0===l.length||0===a.length||d,type:"submit",children:"Send"})]})]})})})]})};var D=a(4215),_=a(5571);let F=n.forwardRef((e,t)=>{let{...a}=e;return(0,s.jsx)(N.z,{ref:t,...a,children:(0,s.jsx)("path",{d:"M9.75 15.25H17.25C18.3546 15.25 19.25 14.3546 19.25 13.25V6.75C19.25 5.64543 18.3546 4.75 17.25 4.75H6.75C5.64543 4.75 4.75 5.64543 4.75 6.75V13.25C4.75 14.3546 5.64543 15.25 6.75 15.25H9.75ZM9.75 15.25C9.75 15.25 10 18.25 8 19.25H16C14 18.25 14.25 15.25 14.25 15.25",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})})});F.displayName="IconMonitor";let O=n.forwardRef((e,t)=>{let{...a}=e;return(0,s.jsx)(N.z,{ref:t,...a,children:(0,s.jsx)("path",{d:"M17.4 15L21 11.5L17.4 8M6.6 8L3 11.5L6.6 15M14.25 4.5L9.75 18.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})})});O.displayName="IconSource";let U=e=>{let{activeView:t,setActiveView:a}=e;return(0,s.jsxs)(_.bL,{"aria-label":"View mode",className:"inline-block items-center bg-slate-2 border border-slate-6 rounded-md overflow-hidden h-[36px]",onValueChange:e=>{e&&a(e)},type:"single",value:t,children:[(0,s.jsx)(_.q7,{value:"preview",children:(0,s.jsxs)(L.m,{children:[(0,s.jsx)(L.m.Trigger,{asChild:!0,children:(0,s.jsxs)("div",{className:(0,m.cn)("w-9 flex items-center py-2 transition ease-in-out duration-200 relative hover:text-slate-12",{"text-slate-11":"desktop"!==t,"text-slate-12":"desktop"===t}),children:["preview"===t&&(0,s.jsx)(j.P.span,{animate:{opacity:1},className:"absolute left-0 right-0 top-0 bottom-0 bg-slate-4",exit:{opacity:0},initial:{opacity:0},layoutId:"topbar-tabs",transition:v}),(0,s.jsx)(F,{className:"m-auto"})]})}),(0,s.jsx)(L.m.Content,{children:"Preview"})]})}),(0,s.jsx)(_.q7,{value:"source",children:(0,s.jsxs)(L.m,{children:[(0,s.jsx)(L.m.Trigger,{asChild:!0,children:(0,s.jsxs)("div",{className:(0,m.cn)("w-9 flex py-2 transition ease-in-out duration-200 relative hover:text-slate-12",{"text-slate-11":"source"!==t,"text-slate-12":"source"===t}),children:["source"===t&&(0,s.jsx)(j.P.span,{animate:{opacity:1},className:"absolute left-0 right-0 top-0 bottom-0 bg-slate-4",exit:{opacity:0},initial:{opacity:0},layoutId:"topbar-tabs",transition:v}),(0,s.jsx)(O,{className:"m-auto"})]})}),(0,s.jsx)(L.m.Content,{children:"Code"})]})})]})};var W=a(1156);let Z=(e,t,a)=>Math.min(Math.max(e,t),a),B=(e,t,a)=>{let[s,r]=(0,n.useState)(e);return[Z(s,t,a),e=>{"function"==typeof e?r(s=>{let r=Z(s,t,a);return Z(e(r),t,a)}):r(Z(e,t,a))}]},A=e=>{let{children:t}=e,a=t.match(/(Unexpected closing tag "[^"]+". It may happen when the tag has already been closed by another tag). (For more info see) (.+)/);if(a){let[e,t,r,n]=a;return(0,s.jsxs)(s.Fragment,{children:[t,".",(0,s.jsxs)("p",{className:"text-lg",children:[r," ",(0,s.jsx)("a",{className:"underline",rel:"noreferrer",target:"_blank",href:n,children:n})]})]})}return t},Y=e=>{let{error:t}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"absolute inset-0 z-50 bg-black/80"}),(0,s.jsxs)("div",{className:" min-h-[50vh] w-full max-w-lg sm:rounded-lg md:max-w-[568px] lg:max-w-[920px] absolute left-[50%] top-[50%] z-50 translate-x-[-50%] translate-y-[-50%] rounded-t-sm overflow-hidden bg-white text-black shadow-lg duration-200 flex flex-col selection:!text-black ",children:[(0,s.jsx)("div",{className:"bg-red-500 h-3"}),(0,s.jsxs)("div",{className:"flex flex-grow p-6 min-w-0 max-w-full flex-col space-y-1.5",children:[(0,s.jsxs)("div",{className:"flex-shrink pb-2 text-xl tracking-tight",children:[(0,s.jsx)("b",{children:t.name}),": ",(0,s.jsx)(A,{children:t.message})]}),t.stack?(0,s.jsx)("div",{className:"flex-grow scroll-px-4 overflow-x-auto rounded-lg bg-black p-2 text-gray-100",children:(0,s.jsx)("pre",{className:"w-full min-w-0 font-mono leading-6 selection:!text-cyan-12 text-xs",children:t.stack})}):void 0]})]})]})},J=e=>{var t,a;let{emailTitle:c,className:d,...u}=e,{renderingResult:h,renderedEmailMetadata:x}=(0,W.$)(),p=(0,r.useRouter)(),f=(0,r.usePathname)(),b=(0,r.useSearchParams)(),j=null!=(t=b.get("view"))?t:"preview",v=null!=(a=b.get("lang"))?a:"jsx",w=void 0!==x,y="error"in h,[C,N]=(0,n.useState)(1/0),[k,S]=(0,n.useState)(1/0),M=b.get("width"),H=b.get("height"),[T,P]=B(M?Number.parseInt(M):1024,220,C),[E,_]=B(H?Number.parseInt(H):600,352,k),F=(0,o.YQ)(()=>{let e=new URLSearchParams(b);e.set("width",T.toString()),e.set("height",E.toString()),p.push("".concat(f,"?").concat(e.toString()).concat(location.hash))},300),{toggled:O}=(0,D.S)();return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(g.Topbar,{emailTitle:c,children:["preview"===j&&(0,s.jsx)(V,{setViewHeight:e=>{_(e),(0,l.flushSync)(()=>{F()})},setViewWidth:e=>{P(e),(0,l.flushSync)(()=>{F()})},viewHeight:E,viewWidth:T,minWidth:220,minHeight:352}),(0,s.jsx)(U,{activeView:j,setActiveView:e=>{let t=new URLSearchParams(b);t.set("view",e),p.push("".concat(f,"?").concat(t.toString()).concat(location.hash))}}),w?(0,s.jsx)("div",{className:"flex justify-end",children:(0,s.jsx)(z,{markup:x.markup})}):null]}),(0,s.jsxs)("div",{...u,className:(0,m.cn)("h-[calc(100%-3.5rem-2.375rem)] will-change-[height] flex p-4 transition-[height] duration-300 relative","preview"===j&&"bg-gray-200",O&&"h-[calc(100%-3.5rem-13rem)]",d),ref:e=>{let t=new ResizeObserver(e=>{let[t]=e;t&&(N(t.contentRect.width),S(t.contentRect.height))});return e&&t.observe(e),()=>{t.disconnect()}},children:[y?(0,s.jsx)(Y,{error:h.error}):null,w?(0,s.jsxs)(s.Fragment,{children:["preview"===j&&(0,s.jsx)(I,{minHeight:352,minWidth:220,maxHeight:k,maxWidth:C,height:E,onResizeEnd:()=>{F()},onResize:(e,t)=>{"east"===t||"west"===t?P(Math.round(e)):_(Math.round(e))},width:T,children:(0,s.jsx)("iframe",{className:"max-h-full rounded-lg bg-white [color-scheme:auto]",ref:e=>{if(e)return(e=>{var t,a;let s=t=>{let a=e.getBoundingClientRect();document.dispatchEvent(new MouseEvent("mousemove",{...t,clientX:t.clientX+a.x,clientY:t.clientY+a.y}))},r=e=>{document.dispatchEvent(new MouseEvent("mouseup",e))};return null==(t=e.contentDocument)||t.addEventListener("mousemove",s),null==(a=e.contentDocument)||a.addEventListener("mouseup",r),()=>{var t,a;null==(t=e.contentDocument)||t.removeEventListener("mousemove",s),null==(a=e.contentDocument)||a.removeEventListener("mouseup",r)}})(e)},srcDoc:x.markup,style:{width:"".concat(T,"px"),height:"".concat(E,"px")},title:c})}),"source"===j&&(0,s.jsx)("div",{className:"h-full w-full",children:(0,s.jsx)("div",{className:"m-auto h-full flex max-w-3xl p-6",children:(0,s.jsx)(L.m.Provider,{children:(0,s.jsx)(R,{activeLang:v,markups:[{language:"jsx",content:x.reactMarkup},{language:"markup",content:x.prettyMarkup},{language:"markdown",content:x.plainText}],setActiveLang:e=>{let t=new URLSearchParams(b);t.set("view","source"),t.set("lang",e);let a=b.get("lang")===e;p.push("".concat(f,"?").concat(t.toString()).concat(a?location.hash:""))}})})})})]}):null,(0,s.jsx)(i.l$,{})]})]})}},4137:(e,t,a)=>{Promise.resolve().then(a.bind(a,2733)),Promise.resolve().then(a.bind(a,6197)),Promise.resolve().then(a.bind(a,4215)),Promise.resolve().then(a.bind(a,1156))},4215:(e,t,a)=>{"use strict";a.d(t,{Toolbar:()=>A,S:()=>_});var s=a(1275),r=a(1923),n=a(4094),l=a(2108),i=a(3611),o=a(9195),c=a(1156),d=a(4600),u=a(6516),m=a(616),h=a(4387);let x=i.forwardRef((e,t)=>{let{...a}=e;return(0,s.jsx)(h.z,{ref:t,...a,children:(0,s.jsx)("path",{d:"M12 4C7.58173 4 4 7.58172 4 12C4 16.4182 7.58173 20 12 20C16.4183 20 20 16.4182 20 12C20 7.58172 16.4183 4 12 4ZM5.14754 12C5.14754 8.21549 8.21551 5.14754 12 5.14754C15.7845 5.14754 18.8525 8.21549 18.8525 12C18.8525 15.7844 15.7845 18.8525 12 18.8525C8.21551 18.8525 5.14754 15.7844 5.14754 12ZM12.906 8.37648C12.906 8.87682 12.5004 9.28243 12 9.28243C11.4997 9.28243 11.0941 8.87682 11.0941 8.37648C11.0941 7.87613 11.4997 7.47053 12 7.47053C12.5004 7.47053 12.906 7.87613 12.906 8.37648ZM10.1883 10.1884H10.7922H12.0002C12.3337 10.1884 12.6041 10.4588 12.6041 10.7924V15.0201H13.2081H13.8121V16.2281H13.2081H12.0002H10.7922H10.1883V15.0201H10.7922H11.3962V11.3963H10.7922H10.1883V10.1884Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})});x.displayName="IconInfo";let p=i.forwardRef((e,t)=>{let{...a}=e;return(0,s.jsx)(h.z,{ref:t,...a,children:(0,s.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.9354 12C17.9354 9.01537 15.5828 6.05264 11.9202 6.05264C8.96229 6.05264 7.50033 8.21724 6.87735 9.36841H8.72625C9.02024 9.36841 9.25858 9.60406 9.25858 9.89473C9.25858 10.1854 9.02024 10.421 8.72625 10.421H5.53232C5.23833 10.421 5 10.1854 5 9.89473V6.73684C5 6.44617 5.23833 6.21052 5.53232 6.21052C5.82631 6.21052 6.06465 6.44617 6.06465 6.73684V8.64548C6.81471 7.33819 8.54959 5 11.9202 5C16.2456 5 19 8.51094 19 12C19 15.4891 16.2456 19 11.9202 19C9.8507 19 8.12769 18.1904 6.9009 16.9562C6.24405 16.2954 5.73107 15.5148 5.38132 14.6744C5.26942 14.4057 5.39911 14.0981 5.67098 13.9875C5.94285 13.8768 6.25395 14.0051 6.36583 14.2738C6.66482 14.9921 7.10262 15.6574 7.66023 16.2183C8.69486 17.2593 10.1475 17.9474 11.9202 17.9474C15.5828 17.9474 17.9354 14.9846 17.9354 12Z",fill:"currentColor"})})});p.displayName="IconReload";var f=a(9361);let g={family:{gmail:"Gmail",outlook:"Outlook",yahoo:"Yahoo! Mail","apple-mail":"Apple Mail",aol:"AOL",thunderbird:"Mozilla Thunderbird",microsoft:"Microsoft","samsung-email":"Samsung Email",sfr:"SFR",orange:"Orange",protonmail:"ProtonMail",hey:"HEY","mail-ru":"Mail.ru",fastmail:"Fastmail",laposte:"LaPoste.net","t-online-de":"T-online.de","free-fr":"Free.fr",gmx:"GMX","web-de":"WEB.DE","ionos-1and1":"1&1",rainloop:"RainLoop","wp-pl":"WP.pl"}};var b=a(4366);let j=(0,b.createServerReference)("7f0eee639c2277fbd03d1e396f508bd1308191abf9",b.callServer,void 0,b.findSourceMapURL,"checkCompatibility");async function*v(e){let t=e.getReader();try{for(;;){let{value:e,done:a}=await t.read();if(a)break;yield e}}finally{t.releaseLock()}}let w=e=>(0,s.jsxs)("svg",{width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,s.jsx)("path",{d:"M10.8777 8.99999L6.87766 1.99999C6.79044 1.84609 6.66396 1.71808 6.51112 1.62902C6.35828 1.53997 6.18455 1.49304 6.00766 1.49304C5.83077 1.49304 5.65704 1.53997 5.5042 1.62902C5.35136 1.71808 5.22488 1.84609 5.13766 1.99999L1.13766 8.99999C1.0495 9.15267 1.00327 9.32594 1.00366 9.50224C1.00405 9.67855 1.05105 9.85161 1.13988 10.0039C1.22872 10.1562 1.35623 10.2823 1.50951 10.3694C1.66278 10.4565 1.83636 10.5016 2.01266 10.5H10.0127C10.1881 10.4998 10.3604 10.4535 10.5123 10.3656C10.6642 10.2778 10.7903 10.1515 10.8779 9.99955C10.9656 9.84756 11.0117 9.67518 11.0116 9.49973C11.0116 9.32428 10.9654 9.15193 10.8777 8.99999Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M6.0127 4.5V6.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M6.0127 8.5H6.01853",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]});w.displayName="IconCircleWarning";var y=a(2664),C=a.n(y);let N=e=>{let{line:t,type:a}=e,r=new URLSearchParams((0,l.useSearchParams)());r.set("view","source"),"html"===a?r.set("lang","markup"):"react"===a&&r.set("lang","jsx");let n="#L".concat(t);return(0,s.jsxs)(C(),{href:{search:r.toString(),hash:n},scroll:!1,className:"appearance-none underline mx-2",children:["L",t.toString().padStart(2,"0")]})},k=e=>{let{children:t,className:a,...r}=e;return(0,s.jsx)("table",{...r,className:(0,d.cn)("group relative w-full border-collapse text-left text-slate-10 text-sm",a),children:(0,s.jsx)("tbody",{children:t})})};k.Row=e=>{let{children:t,className:a,...r}=e;return(0,s.jsx)("tr",{className:(0,d.cn)("border-collapse align-bottom border-slate-6 border-b last:border-b-0",a),...r,children:t})},k.Column=e=>{let{children:t,className:a,...r}=e;return(0,s.jsx)("td",{className:(0,d.cn)("py-1.5 align-bottom font-regular",a),...r,children:t})};let S=e=>{let{results:t}=e;return(0,s.jsx)(k,{children:null==t?void 0:t.map((e,t)=>{let a=Object.entries(e.statsPerEmailClient).filter(e=>{let[,t]=e;return"error"===t.status}),r=a.map(e=>{let[t]=e;return g.family[t]}).join(", ");return(0,s.jsxs)(k.Row,{children:[(0,s.jsx)(k.Column,{children:(0,s.jsxs)("span",{className:"flex text-red-400 uppercase gap-2 items-center",children:[(0,s.jsx)(w,{}),(0,d.aj)(e.entry.title)]})}),(0,s.jsxs)(k.Column,{children:[a.length>0?"Not supported in ".concat(r):null,(0,s.jsx)("a",{href:e.entry.url,className:"underline ml-2 decoration-slate-9 decoration-1 hover:decoration-slate-11 transition-colors hover:text-slate-12",rel:"noreferrer",target:"_blank",children:"More ↗"})]}),(0,s.jsx)(k.Column,{className:"font-mono text-slate-11 text-right",children:(0,s.jsx)(N,{line:e.location.start.line,column:e.location.start.column,type:"react"})})]},t)})})};var L=a(8452);let R=(0,b.createServerReference)("7f6338929555661d36cc0b2e92a50a2f9b151e4984",b.callServer,void 0,b.findSourceMapURL,"checkImages"),M=(0,b.createServerReference)("7f6fcc7cf2a076c83bf9bd10188f82ee7b0035f981",b.callServer,void 0,b.findSourceMapURL,"checkLinks");async function*H(e){for await(let t of e)for await(let e of v(await t.getStream())){let a=t.mapValue(e);a&&(yield a)}}let T=e=>{let{rows:t}=e;return void 0===t?null:(0,s.jsx)(k,{children:t.map((e,t)=>{if("link"===e.source){let a=e.result.checks.find(e=>!1===e.passed),r=[];for(let t of e.result.checks)"fetch_attempt"===t.type&&t.metadata.fetchStatusCode&&r.push((0,s.jsxs)(s.Fragment,{children:["HTTP ",t.metadata.fetchStatusCode]}));return r.push((0,s.jsx)(N,{line:e.result.codeLocation.line,column:e.result.codeLocation.column,type:"html"})),(0,s.jsxs)(P,{status:e.result.status,children:[(0,s.jsx)(P.Name,{children:(0,d.aj)(a.type)}),(0,s.jsxs)(P.Description,{children:["security"===a.type?"Insecure URL, use HTTPS instead of HTTP":null,"fetch_attempt"===a.type&&a.metadata.fetchStatusCode&&a.metadata.fetchStatusCode>=300&&a.metadata.fetchStatusCode<400?"There was a redirect, the content may have been moved":null,"fetch_attempt"===a.type&&a.metadata.fetchStatusCode&&a.metadata.fetchStatusCode>=400?"The link is broken":null,"fetch_attempt"===a.type&&void 0===a.metadata.fetchStatusCode?"The link could not be reached":null,"syntax"===a.type?"The link is broken due to invalid syntax":null,(0,s.jsx)("span",{className:"ml-2 text-ellipsis overflow-hidden text-nowrap max-w-[30ch]",children:e.result.link})]}),(0,s.jsx)(P.Metadata,{children:r})]},t)}if("image"===e.source){let a=e.result.checks.find(e=>!1===e.passed),r=[];for(let t of e.result.checks)"image_size"===t.type&&t.metadata.byteCount&&r.push((0,L.A)(t.metadata.byteCount)),"fetch_attempt"===t.type&&t.metadata.fetchStatusCode&&r.push((0,s.jsxs)(s.Fragment,{children:["HTTP ",t.metadata.fetchStatusCode]}));return r.push((0,s.jsx)(N,{line:e.result.codeLocation.line,column:e.result.codeLocation.column,type:"html"})),(0,s.jsxs)(P,{status:e.result.status,children:[(0,s.jsx)(P.Name,{children:(0,d.aj)(a.type)}),(0,s.jsxs)(P.Description,{children:["security"===a.type?"Insecure URL, use HTTPS instead of HTTP":null,"fetch_attempt"===a.type&&a.metadata.fetchStatusCode&&a.metadata.fetchStatusCode>=300&&a.metadata.fetchStatusCode<400?"There was a redirect, the image may have been moved":null,"fetch_attempt"===a.type&&a.metadata.fetchStatusCode&&a.metadata.fetchStatusCode>=400?"The image is broken":null,"fetch_attempt"===a.type&&void 0===a.metadata.fetchStatusCode?"The image could not be reached":null,"syntax"===a.type?"The image is broken due to an invalid source":null,"accessibility"===a.type?"Missing alt text":null,"image_size"===a.type&&a.metadata.byteCount?"This image is too large, keep it under 1mb":null,(0,s.jsx)("span",{className:"ml-2 text-ellipsis overflow-hidden text-nowrap max-w-[30ch]",children:e.result.source})]}),(0,s.jsx)(P.Metadata,{children:r})]},t)}})})},P=e=>{let{children:t,className:a,status:r,...n}=e;return(0,s.jsx)(k.Row,{"data-status":r,...n,className:(0,d.cn)("group/result",a),children:t})};P.Name=e=>{let{children:t,...a}=e;return(0,s.jsx)(k.Column,{...a,children:(0,s.jsxs)("span",{className:"flex uppercase gap-2 items-center group-data-[status=error]/result:text-red-400 group-data-[status=warning]/result:text-orange-300",children:[(0,s.jsx)(w,{}),"string"==typeof t?(0,d.aj)(t):t]})})},P.Description=e=>{let{children:t,className:a,...r}=e;return(0,s.jsx)(k.Column,{...r,children:t})},P.Metadata=e=>{let{children:t,className:a,...r}=e;return(0,s.jsx)(k.Column,{align:"right",...r,className:(0,d.cn)("font-mono text-slate-11",a),children:i.Children.map(t,(e,t)=>(0,s.jsxs)(s.Fragment,{children:[t>0?" \xb7 ":null,e]}))})};let E=e=>{let{result:t}=e;return(0,s.jsx)(s.Fragment,{children:t?(0,s.jsxs)(k,{children:[(0,s.jsxs)(k.Row,{className:"sticky border-b top-0",children:[(0,s.jsx)(k.Column,{className:"uppercase",children:(0,s.jsxs)("span",{className:"flex gap-2 items-center",children:[(0,s.jsx)(w,{className:(0,d.cn)(0===t.points?"text-green-400":null,(t.points>0&&t.points,null),t.points>1.5?"text-yellow-100":null,t.points>3?"text-orange-400":null,t.points>=5?"text-red-400":null)}),"Score"]})}),(0,s.jsx)(k.Column,{children:0===t.points?"Congratulations! Your email is clean of abuse indicators.":"Higher scores are better"}),(0,s.jsxs)(k.Column,{className:"text-right tracking-tighter font-bold",children:[(0,s.jsx)("span",{className:(0,d.cn)("text-3xl",0===t.points?"text-green-400":null,(t.points>0&&t.points,null),t.points>1.5?"text-yellow-200":null,t.points>3?"text-orange-400":null,t.points>=5?"text-red-400":null),children:(10-t.points).toFixed(1)})," ",(0,s.jsx)("span",{className:"text-lg",children:"/ 10"})]})]}),(function(e,t){let a=[...e];return a.sort(t),a})(t.checks,(e,t)=>t.points-e.points).map(e=>(0,s.jsxs)(k.Row,{children:[(0,s.jsx)(k.Column,{className:"uppercase",children:(0,s.jsxs)("span",{className:"flex gap-2 items-center",children:[(0,s.jsx)(w,{className:(0,d.cn)(e.points>1?"text-yellow-200":null,e.points>2?"text-orange-400":null,e.points>3?"text-red-400":null)}),(0,d.aj)(e.name)]})}),(0,s.jsx)(k.Column,{children:e.description}),(0,s.jsxs)(k.Column,{className:(0,d.cn)("text-right font-mono tracking-tighter",e.points>1?"text-yellow-200":null,e.points>2?"text-orange-400":null,e.points>3?"text-red-400":null),children:["-",e.points.toFixed(1)]})]},e.name))]}):null})};var V=a(8031),I=a(5877);let z=e=>{let{children:t,className:a,active:r,tooltip:n,delayDuration:l=500,...i}=e;return(0,s.jsx)(I.m.Provider,{children:(0,s.jsxs)(I.m,{delayDuration:l,children:[(0,s.jsx)(I.m.Trigger,{asChild:!0,children:(0,s.jsxs)("button",{type:"button",...i,className:(0,d.cn)("h-full w-fit font-regular flex text-sm text-slate-10 items-center align-middle justify-center px-1 gap-2 relative","hover:text-slate-12 transition-colors",r&&"data-[state=active]:text-cyan-11",a),children:[t,r?(0,s.jsx)(V.P.span,{className:"-bottom-px absolute rounded-sm left-0 w-full bg-cyan-11 h-px",layoutId:"active-toolbar-button",transition:{type:"spring",bounce:.2,duration:.6}}):null]})}),n?(0,s.jsx)(I.m.Content,{children:n}):null]})})},D=e=>{let t;if("localStorage"in a.g){let s=a.g.localStorage.getItem(e);if(null!==s&&"undefined"!==s)try{t=JSON.parse(s)}catch(t){console.warn("Failed to load stored value for",e,"with value",s)}}return[(0,i.useSyncExternalStore)(()=>()=>{},()=>t,()=>void 0),function(t){"localStorage"in a.g&&a.g.localStorage.setItem(e,JSON.stringify(t))}]},_=()=>{var e;let t=null!=(e=(0,l.useSearchParams)().get("toolbar-panel"))?e:void 0;return{activeTab:t,toggled:void 0!==t}},F=e=>{let{serverLintingRows:t,serverSpamCheckingResult:c,serverCompatibilityResults:m,prettyMarkup:h,reactMarkup:g,plainText:b,emailPath:w,emailSlug:y}=e,C=(0,l.usePathname)(),N=(0,l.useSearchParams)(),k=(0,l.useRouter)(),{activeTab:L,toggled:P}=_(),V=e=>{let t=new URLSearchParams(N);void 0===e?t.delete("toolbar-panel"):t.set("toolbar-panel",e),k.push("".concat(C,"?").concat(t.toString()).concat(location.hash))},[I,F]=D("spam-assassin-".concat(y.replaceAll("/","-"))),[A,{load:Y,loading:J}]=(e=>{let{markup:t,plainText:a,initialResult:s}=e,[r,n]=(0,i.useState)(s),[l,o]=(0,i.useState)(!1),c=(0,i.useRef)(!1);return[r,{loading:l,load:async()=>{if(!c.current){c.current=!0,o(!0);try{let e=await fetch("https://react.email/api/check-spam",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({html:t,plainText:a})}),s=await e.json();if(!("error"in s))return n(s),s;f.oR.error(s.error)}catch(e){console.error(e),f.oR.error(JSON.stringify(e))}finally{o(!1),c.current=!1}}}}]})({markup:h,plainText:b,initialResult:null!=c?c:I}),[X,q]=D("linter-".concat(y.replaceAll("/","-"))),[G,{load:$,loading:Q}]=(e=>{let{markup:t,initialRows:s}=e,[r,n]=(0,i.useState)(s),l=function(e,t){return[{getStream:()=>R(e,t),mapValue(e){if(e&&"success"!==e.status)return{result:e,source:"image"}}},{getStream:()=>M(e),mapValue(e){if(e&&"success"!==e.status)return{result:e,source:"link"}}}]}(t,"location"in a.g?"".concat(a.g.location.protocol,"//").concat(a.g.location.host):""),[o,c]=(0,i.useState)(!1),d=(0,i.useRef)(!1);return[r,{loading:o,load:async()=>{if(!d.current){d.current=!0,c(!0),n([]);try{let e=[];for await(let t of H(l))n(a=>{if(!a)return[t];let s=[...a,t];return s.sort((e,t)=>"error"===e.result.status&&"warning"===t.result.status?-1:+("warning"===e.result.status&&"error"===t.result.status)),e=s,s});return e}finally{c(!1),d.current=!1}}}}]})({markup:h,initialRows:null!=t?t:X}),[K,ee]=D("compatibility-".concat(y.replaceAll("/","-"))),[et,{load:ea,loading:es}]=(e=>{let{reactMarkup:t,emailPath:a,initialResults:s}=e,[r,n]=(0,i.useState)(s),[l,o]=(0,i.useState)(!1),c=(0,i.useRef)(!1);return[r,{loading:l,load:async()=>{if(c.current)return;c.current=!0,o(!0),n([]);let e=[];try{let s=await j(t,a);for await(let t of v(s))"error"===t.status&&n(a=>a?e=[...a,t]:[t])}catch(e){console.error(e),f.oR.error(JSON.stringify(e))}finally{o(!1),c.current=!1}return e}}]})({emailPath:w,reactMarkup:g,initialResults:null!=m?m:K});o.Hf||i.useEffect(()=>{(async()=>{q(await $()),F(await Y()),ee(await ea())})()},[]);let er=i.useId();return(0,s.jsx)("div",{"data-toggled":P,className:(0,d.cn)("absolute bottom-0 left-0 right-0","border-t border-slate-6 group/toolbar text-xs text-slate-11 h-52 transition-transform","data-[toggled=false]:translate-y-[10.625rem]"),children:(0,s.jsx)(r.bL,{value:null!=L?L:"",onValueChange:e=>{V(e)},asChild:!0,children:(0,s.jsxs)("div",{className:"flex flex-col h-full",children:[(0,s.jsxs)(r.B8,{className:"flex gap-4 px-4 border-b border-solid border-slate-6 h-10 w-full flex-shrink-0",children:[(0,s.jsxs)(n.o,{id:"toolbar-".concat(er),children:[(0,s.jsx)(r.l9,{asChild:!0,value:"linter",children:(0,s.jsx)(z,{active:"linter"===L,children:"Linter"})}),(0,s.jsx)(r.l9,{asChild:!0,value:"compatibility",children:(0,s.jsx)(z,{active:"compatibility"===L,children:"Compatibility"})}),(0,s.jsx)(r.l9,{asChild:!0,value:"spam-assassin",children:(0,s.jsx)(z,{active:"spam-assassin"===L,children:"Spam"})})]}),(0,s.jsxs)("div",{className:"flex gap-0.5 ml-auto",children:[(0,s.jsx)(z,{delayDuration:0,tooltip:"linter"===L&&"The Linter tab checks all the images and links for common issues like missing alt text, broken URLs, insecure HTTP methods, and more."||"spam-assassin"===L&&"The Spam tab will look at the content and use a robust scoring framework to determine if the email is likely to be spam. Powered by SpamAssassin."||"compatibility"===L&&"The Compatibility tab shows how well the HTML/CSS is supported across mail clients like Outlook, Gmail, etc. Powered by Can I Email."||"Info",children:(0,s.jsx)(x,{size:24})}),o.Hf?null:(0,s.jsx)(z,{tooltip:"Reload",disabled:Q||J,onClick:async()=>{void 0===L&&V("linter"),"spam-assassin"===L?await Y():"linter"===L?await $():"compatibility"===L&&await ea()},children:(0,s.jsx)(p,{size:24,className:(0,d.cn)({"opacity-60 animate-spin-fast":Q||J})})}),(0,s.jsx)(z,{tooltip:"Toggle toolbar",onClick:()=>{void 0===L?V("linter"):V(void 0)},children:(0,s.jsx)(u.R,{size:24,className:"transition-transform group-data-[toggled=false]/toolbar:rotate-180"})})]})]}),(0,s.jsxs)("div",{className:"flex-grow transition-opacity opacity-100 group-data-[toggled=false]/toolbar:opacity-0 overflow-y-auto pr-3 pl-4 pt-3",children:[(0,s.jsx)(r.UC,{value:"linter",children:Q?(0,s.jsx)(O,{message:"Analyzing your code for linting issues..."}):(null==G?void 0:G.length)===0?(0,s.jsxs)(U,{children:[(0,s.jsx)(W,{}),(0,s.jsx)(Z,{children:"All good"}),(0,s.jsx)(B,{children:"No linting issues found."})]}):(0,s.jsx)(T,{rows:null!=G?G:[]})}),(0,s.jsx)(r.UC,{value:"compatibility",children:es?(0,s.jsx)(O,{message:"Checking email compatibility..."}):(null==et?void 0:et.length)===0?(0,s.jsxs)(U,{children:[(0,s.jsx)(W,{}),(0,s.jsx)(Z,{children:"Great compatibility"}),(0,s.jsx)(B,{children:"Template should render properly everywhere."})]}):(0,s.jsx)(S,{results:null!=et?et:[]})}),(0,s.jsx)(r.UC,{value:"spam-assassin",children:J?(0,s.jsx)(O,{message:"Evaluating your email for spam indicators..."}):(null==A?void 0:A.isSpam)===!1?(0,s.jsxs)(U,{children:[(0,s.jsx)(W,{}),(0,s.jsx)(Z,{children:"10/10"}),(0,s.jsx)(B,{children:"Your email is clean of abuse indicators."})]}):(0,s.jsx)(E,{result:A})})]})]})})})},O=e=>{let{message:t}=e;return(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center pt-8",children:[(0,s.jsxs)("div",{className:"relative mb-8 flex items-center justify-center",children:[(0,s.jsx)("div",{className:"h-12 w-12 rounded-full bg-gradient-to-br from-cyan-400/80 to-cyan-600/80 opacity-10 blur-xl absolute m-auto left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 animate-pulse"}),(0,s.jsx)("div",{className:"h-12 w-12 rounded-full border border-slate-4 absolute m-auto left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"}),(0,s.jsx)("div",{className:"h-10 w-10 rounded-full flex items-center justify-center absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2",children:(0,s.jsx)("div",{className:"h-5 w-5 rounded-full border-2 border-white/50 border-t-transparent animate-spin-fast"})})]}),(0,s.jsx)("h3",{className:"text-slate-12 font-medium text-base mb-1",children:"Processing"}),(0,s.jsx)("p",{className:"text-slate-11 text-sm text-center max-w-[320px]",children:t})]})},U=e=>{let{children:t}=e;return(0,s.jsx)("div",{className:"flex flex-col items-center justify-center pt-8",children:t})},W=()=>(0,s.jsxs)("div",{className:"relative mb-8 flex items-center justify-center",children:[(0,s.jsx)("div",{className:"h-16 w-16 rounded-full bg-gradient-to-br from-green-300/20 opacity-80 to-emerald-500/30 blur-md absolute m-auto left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"}),(0,s.jsx)("div",{className:"h-12 w-12 rounded-full bg-gradient-to-br from-green-400/80 opacity-10 to-emerald-600/80 absolute m-auto left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 shadow-lg"}),(0,s.jsx)("div",{className:"h-10 w-10 rounded-full bg-gradient-to-br from-green-400 to-emerald-600 flex items-center justify-center absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 shadow-[inset_0_1px_1px_rgba(255,255,255,0.4)]",children:(0,s.jsx)(m.i,{size:24,className:"text-white drop-shadow-sm"})})]}),Z=e=>{let{children:t}=e;return(0,s.jsx)("h3",{className:"text-slate-12 font-medium text-base mb-1",children:t})},B=e=>{let{children:t}=e;return(0,s.jsx)("p",{className:"text-slate-11 text-sm text-center max-w-[320px]",children:t})},A=e=>{let{serverLintingRows:t,serverSpamCheckingResult:a,serverCompatibilityResults:r}=e,{emailPath:n,emailSlug:l,renderedEmailMetadata:i}=(0,c.$)();if(void 0===i)return null;let{prettyMarkup:o,plainText:d,reactMarkup:u}=i;return(0,s.jsx)(F,{emailPath:n,emailSlug:l,prettyMarkup:o,reactMarkup:u,plainText:d,serverLintingRows:t,serverSpamCheckingResult:a,serverCompatibilityResults:r})}}},e=>{e.O(0,[979,983,900,442,615,105,713,358],()=>e(e.s=4137)),_N_E=e.O()}]);
|
|
File without changes
|
|
File without changes
|