(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,211970,e=>{"use strict";var t=e.i(162115),n=e.i(890564),r=e.i(868729);e.i(816688);var i=e.i(675066),a=e.i(925521),s=e.i(10190),o=e.i(942347);e.i(201987);var l=e.i(207331),c=e.i(151094),u=e.i(525518),d=e.i(470284),m=e.i(897802);let p=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],f={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function h(e){let t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57}function g(e){let t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function x(e){let t;return(t="string"==typeof e?e.charCodeAt(0):e)>=97&&t<=122||t>=65&&t<=90||h(e)}var v=e.i(194772);let y=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function b(e,t){let n,r,i,a=t||{},s="string"==typeof a.additional?a.additional.charCodeAt(0):a.additional,o=[],l=0,c=-1,u="";a.position&&("start"in a.position||"indent"in a.position?(r=a.position.indent,n=a.position.start):n=a.position);let d=(n?n.line:0)||1,m=(n?n.column:0)||1,b=N();for(l--;++l<=e.length;)if(10===i&&(m=(r?r[c]:0)||1),38===(i=e.charCodeAt(l))){let t,n=e.charCodeAt(l+1);if(9===n||10===n||12===n||32===n||38===n||60===n||Number.isNaN(n)||s&&n===s){u+=String.fromCharCode(i),m++;continue}let r=l+1,c=r,d=r;if(35===n){d=++c;let n=e.charCodeAt(d);88===n||120===n?(t="hexadecimal",d=++c):t="decimal"}else t="named";let y="",E="",A="",S="named"===t?x:"decimal"===t?h:g;for(d--;++d<=e.length;){let n=e.charCodeAt(d);if(!S(n))break;A+=String.fromCharCode(n),"named"===t&&p.includes(A)&&(y=A,E=(0,v.decodeNamedCharacterReference)(A))}let _=59===e.charCodeAt(d);if(_){d++;let e="named"===t&&(0,v.decodeNamedCharacterReference)(A);e&&(y=A,E=e)}let L=1+d-r,T="";if(_||!1!==a.nonTerminated)if(A)if("named"===t){if(_&&!E)C(5,1);else if(y!==A&&(L=1+(d=c+y.length)-c,_=!1),!_){let t=y?1:3;if(a.attribute){let n=e.charCodeAt(d);61===n?(C(t,L),E=""):x(n)?E="":C(t,L)}else C(t,L)}T=E}else{var w,j;_||C(2,L);let e=Number.parseInt(A,"hexadecimal"===t?16:10);if((w=e)>=55296&&w<=57343||w>1114111)C(7,L),T=String.fromCharCode(65533);else if(e in f)C(6,L),T=f[e];else{let t="";((j=e)>=1&&j<=8||11===j||j>=13&&j<=31||j>=127&&j<=159||j>=64976&&j<=65007||(65535&j)==65535||(65535&j)==65534)&&C(6,L),e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10|55296),e=56320|1023&e),T=t+String.fromCharCode(e)}}else"named"!==t&&C(4,L);if(T){k(),b=N(),l=d-1,m+=d-r+1,o.push(T);let t=N();t.offset++,a.reference&&a.reference.call(a.referenceContext||void 0,T,{start:b,end:t},e.slice(r-1,d)),b=t}else A=e.slice(r-1,d),u+=A,m+=A.length,l=d-1}else 10===i&&(d++,c++,m=0),Number.isNaN(i)?k():(u+=String.fromCharCode(i),m++);return o.join("");function N(){return{line:d,column:m,offset:l+((n?n.offset:0)||0)}}function C(e,t){let n;a.warning&&(n=N(),n.column+=t,n.offset+=t,a.warning.call(a.warningContext||void 0,y[e],n,e))}function k(){u&&(o.push(u),a.text&&a.text.call(a.textContext||void 0,u,{start:b,end:N()}),u="")}}let w=/["&'<>`]/g,j=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,N=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,C=/[|\\{}()[\]^$+*?.]/g,k=new WeakMap;function E(e){return"&#x"+e.toString(16).toUpperCase()+";"}var A=e.i(402652);let S={}.hasOwnProperty,_={},L=/^[^\t\n\r "#'.<=>`}]+$/,T=/^[^\t\n\r "'<=>`}]+$/;function D(e){R.call(this,"containerDirective",e)}function P(e){R.call(this,"leafDirective",e)}function I(e){R.call(this,"textDirective",e)}function R(e,t){this.enter({type:e,name:"",attributes:{},children:[]},t)}function M(e){let t=this.stack[this.stack.length-1];(0,m.ok)("containerDirective"===t.type||"leafDirective"===t.type||"textDirective"===t.type),t.name=this.sliceSerialize(e)}function O(e){this.enter({type:"paragraph",data:{directiveLabel:!0},children:[]},e)}function F(e){this.exit(e)}function $(){this.data.directiveAttributes=[],this.buffer()}function z(e){let t=this.data.directiveAttributes;(0,m.ok)(t,"expected `directiveAttributes`"),t.push(["id",b(this.sliceSerialize(e),{attribute:!0})])}function W(e){let t=this.data.directiveAttributes;(0,m.ok)(t,"expected `directiveAttributes`"),t.push(["class",b(this.sliceSerialize(e),{attribute:!0})])}function U(e){let t=this.data.directiveAttributes;(0,m.ok)(t,"expected `directiveAttributes`"),t[t.length-1][1]=b(this.sliceSerialize(e),{attribute:!0})}function B(e){let t=this.data.directiveAttributes;(0,m.ok)(t,"expected `directiveAttributes`"),t.push([this.sliceSerialize(e),""])}function V(){let e=this.data.directiveAttributes;(0,m.ok)(e,"expected `directiveAttributes`");let t={},n=-1;for(;++n999||91===t&&++c>32?n(t):93!==t||c--?(0,Y.markdownLineEnding)(t)?s?n(t):(e.consume(t),e.exit("chunkText"),d):(e.consume(t),92===t?p:m):(e.exit("chunkText"),f(t))}function p(t){return 91===t||92===t||93===t?(e.consume(t),l++,m):m(t)}function f(n){return e.exit(a),e.enter(i),e.consume(n),e.exit(i),e.exit(r),t}}function J(e,t,n,r){let i=this;return function(t){return null===t||(0,Y.markdownLineEnding)(t)||(0,Y.unicodePunctuation)(t)||(0,Y.unicodeWhitespace)(t)?n(t):(e.enter(r),e.consume(t),a)};function a(s){return null===s||(0,Y.markdownLineEnding)(s)||(0,Y.unicodeWhitespace)(s)||(0,Y.unicodePunctuation)(s)&&45!==s&&95!==s?(e.exit(r),45===i.previous||95===i.previous?n(s):t(s)):(e.consume(s),a)}}let ee={tokenize:function(e,t,n){let r,i=this,a=i.events[i.events.length-1],s=a&&"linePrefix"===a[1].type?a[2].sliceSerialize(a[1],!0).length:0,o=0;return function(t){return e.enter("directiveContainer"),e.enter("directiveContainerFence"),e.enter("directiveContainerSequence"),function t(r){return 58===r?(e.consume(r),o++,t):o<3?n(r):(e.exit("directiveContainerSequence"),J.call(i,e,l,n,"directiveContainerName")(r))}(t)};function l(t){return 91===t?e.attempt(et,c,c)(t):c(t)}function c(t){return 123===t?e.attempt(en,u,u)(t):u(t)}function u(t){return(0,H.factorySpace)(e,d,"whitespace")(t)}function d(r){return(e.exit("directiveContainerFence"),null===r)?b(r):(0,Y.markdownLineEnding)(r)?i.interrupt?t(r):e.attempt(er,m,b)(r):n(r)}function m(t){return null===t?b(t):(0,Y.markdownLineEnding)(t)?e.check(er,g,b)(t):(e.enter("directiveContainerContent"),p(t))}function p(t){return e.attempt({tokenize:w,partial:!0},y,s?(0,H.factorySpace)(e,f,"linePrefix",s+1):f)(t)}function f(t){return null===t?y(t):(0,Y.markdownLineEnding)(t)?e.check(er,h,y)(t):h(t)}function h(t){let n=e.enter("chunkDocument",{contentType:"document",previous:r});return r&&(r.next=n),r=n,function t(n){if(null===n){let t=e.exit("chunkDocument");return i.parser.lazy[t.start.line]=!1,y(n)}return(0,Y.markdownLineEnding)(n)?e.check(er,x,v)(n):(e.consume(n),t)}(t)}function g(t){return e.enter("directiveContainerContent"),p(t)}function x(t){e.consume(t);let n=e.exit("chunkDocument");return i.parser.lazy[n.start.line]=!1,p}function v(t){let n=e.exit("chunkDocument");return i.parser.lazy[n.start.line]=!1,y(t)}function y(t){return e.exit("directiveContainerContent"),b(t)}function b(n){return e.exit("directiveContainer"),t(n)}function w(e,t,n){let r=0;return(0,H.factorySpace)(e,function(t){return e.enter("directiveContainerFence"),e.enter("directiveContainerSequence"),function t(i){return 58===i?(e.consume(i),r++,t):rs&&(s=n)}}),s+=3):s="leafDirective"===a.type?2:1,":".repeat(s)),u=r.enter(e.type),d=l.move(c+(e.name||""));if("containerDirective"===e.type){let t=(e.children||[])[0];o=G(t)?t:void 0}else o=e;if(o&&o.children&&o.children.length>0){let t=r.enter("label"),n=`${e.type}Label`,i=r.enter(n);d+=l.move("["),d+=l.move(r.containerPhrasing(o,{...l.current(),before:d,after:"]"})),d+=l.move("]"),i(),t()}if(d+=l.move(function(e,t){let r,i,a,s,o=e.attributes||{},l=[];for(s in o)if(S.call(o,s)&&void 0!==o[s]&&null!==o[s]){let c=String(o[s]);if("id"===s)a=!1!==_.preferShortcut&&L.test(c)?"#"+c:n("id",c,e,t);else if("class"===s){let a=c.split(/[\t\n\r ]+/g),s=[],o=[],l=-1;for(;++l0?n("class",s.join(" "),e,t):"",i=o.length>0?"."+o.join("."):""}else l.push(n(s,c,e,t))}return r&&l.unshift(r),i&&l.unshift(i),a&&l.unshift(a),l.length>0?"{"+l.join(" ")+"}":""}(e,r)),"containerDirective"===e.type){let t=(e.children||[])[0],n=e;G(t)&&(n=Object.assign({},e,{children:e.children.slice(1)})),n&&n.children&&n.children.length>0&&(d+=l.move("\n"),d+=l.move(r.containerFlow(n,l.current()))),d+=l.move("\n"+c)}return u(),d}function n(e,t,n,r){if(!1!==_.collapseEmptyAttributes&&!t)return e;if(_.preferUnquoted&&T.test(t))return e+"="+t;let i=_.quote||r.options.quote||'"',a='"'===i?"'":'"',s=_.quoteSmart&&(0,d.ccount)(t,i)>(0,d.ccount)(t,a)?a:i,o="textDirective"===n.type?[s]:[s,"\n","\r"];return e+"="+s+function(e,t){let n;var r,i=e,a=Object.assign({format:E},t);if(i=i.replace(a.subset?(r=a.subset,(n=k.get(r))||(n=function(e){let t=[],n=-1;for(;++nex.test(e),"icon must be a http/https URL")}).strict()};var ey=e.i(935139);let eb=function(e){let{icon:n,children:r,className:i,iconAlt:a}=e;return(0,t.jsxs)("div",{className:(0,ey.cn)("flex h-11 items-center space-x-3 rounded-lg bg-background-section px-2",i),children:[(0,t.jsx)("img",{src:n,className:"!border-none object-contain",alt:a??"","aria-hidden":!a||void 0,width:40,height:40}),(0,t.jsx)("div",{className:"min-w-0 grow overflow-hidden text-text-secondary system-sm-medium [&_p]:!m-0 [&_p]:block [&_p]:w-full [&_p]:overflow-hidden [&_p]:text-ellipsis [&_p]:whitespace-nowrap",children:r})]})},ew=function(e){let{children:n,className:r}=e;return(0,t.jsx)("div",{className:(0,ey.cn)("space-y-1",r),children:n})},ej=/^(\s*:+[a-z][\w-]*(?:\[[^\]\n]*\])?)\s+((?:\{[^}\n]*\}\s*)+)$/i,eN=/\{([^}\n]*)\}/g,eC={withiconcardlist:["className"],withiconcarditem:["icon","className"]},ek=function(){let[e,t]=ed.defaultRehypePlugins.sanitize,n=new Set([...t.tagNames??[],...Object.keys(eC)]),r={...t.attributes??{}};for(let[e,t]of Object.entries(eC))r[e]=[...r[e]??[],...t];let i={...t,tagNames:[...n],attributes:r};return[ed.defaultRehypePlugins.raw,[e,i],ed.defaultRehypePlugins.harden]}();function eE(e){let t={};if(!e)return t;for(let[n,r]of Object.entries(e))"string"==typeof r&&(t[n]=r);return t}let eA=/^\s*:{2,}[a-z][\w-]*/im;function eS(){return e=>{let t,n;(t=!0,(0,ep.visit)(e,["textDirective","leafDirective","containerDirective"],e=>{if(!t)return;let n=e.name?.toLowerCase();if(!n){t=!1;return}!function(e,t){if(!Object.hasOwn(ev,e))return console.error("[markdown-with-directive] Unknown directive name.",{attributes:t,directive:e}),!1;let n=ev[e].safeParse(t);return!!n.success||(console.error("[markdown-with-directive] Invalid directive props.",{attributes:t,directive:e,issues:n.error.issues.map(e=>({code:e.code,message:e.message,path:e.path.join(".")}))}),!1)}(n,eE(e.attributes))&&(t=!1)}),!t||(n=!1,(0,ep.visit)(e,"text",e=>{if(n)return;let t=e.value||"";eA.test(t)&&(n=!0)}),n))?"object"==typeof e&&null!==e&&"root"===e.type&&Array.isArray(e.children)&&(e.children=[{type:"paragraph",children:[{type:"text",value:"invalid content"}]}]):(0,ep.visit)(e,["textDirective","leafDirective","containerDirective"],e=>{let t={...eE(e.attributes)};t.class&&(t.className=t.class,delete t.class);let n=e.data||(e.data={});n.hName=e.name?.toLowerCase(),n.hProperties=t})}}let e_={withiconcardlist:function(e){let{children:n,className:r}=e;return(0,t.jsx)(ew,{children:n,className:"string"==typeof r?r:void 0})},withiconcarditem:function(e){let{icon:n,className:r,children:i}=e;return(0,t.jsx)(eb,{icon:"string"==typeof n?n:"",className:"string"==typeof r?r:void 0,children:i})}};function eL(e){let{markdown:n}=e,r=(!n?"":"function"==typeof u.default.sanitize?u.default.sanitize(n,{ALLOWED_ATTR:[],ALLOWED_TAGS:[]}):n).split("\n").map(e=>{let t=e.match(ej);if(!t)return e;let n=t[1],r=[...t[2].matchAll(eN)];if(0===r.length)return e;let i=r.map(e=>e[1].trim()).filter(Boolean).join(" ");return i?`${n}{${i}}`:n}).join("\n");return r?(0,t.jsx)("div",{className:"markdown-body",children:(0,t.jsx)(em.Streamdown,{mode:"static",remarkPlugins:[eu,eS],rehypePlugins:ek,components:e_,children:r})}):null}let eT=/\\n/g;function eD(e){return e.replace(eT,"\n")}let eP="/in-site-message/header-bg.svg",eI=function(e){let{notificationId:n,actions:r,className:i,headerBgUrl:a=eP,main:s,onAction:u,subtitle:d,title:m}=e,[p,f]=(0,o.useState)(!0),h=eD(m),g=eD(d),x=(0,o.useMemo)(()=>({backgroundImage:`url(${a||eP})`}),[a]);return((0,o.useEffect)(()=>{(0,l.trackEvent)("in_site_message_show",{notification_id:n})},[n]),p)?(0,t.jsxs)("div",{className:(0,ey.cn)("fixed bottom-3 right-3 z-50 w-[360px] overflow-hidden rounded-xl border border-components-panel-border-subtle bg-components-panel-bg shadow-2xl backdrop-blur-[5px]",i),children:[(0,t.jsxs)("div",{className:"flex min-h-[128px] flex-col justify-end gap-0.5 bg-cover px-4 pb-3 pt-6 text-text-primary-on-surface",style:x,children:[(0,t.jsx)("div",{className:"whitespace-pre-line title-3xl-bold",children:h}),(0,t.jsx)("div",{className:"whitespace-pre-line body-md-regular",children:g})]}),(0,t.jsx)("div",{className:"px-4 pb-2 pt-4 text-text-secondary body-md-regular",children:(0,t.jsx)(eL,{markdown:s})}),(0,t.jsx)("div",{className:"flex items-center justify-end gap-2 p-4",children:r.map(e=>(0,t.jsx)(c.default,{variant:"primary"===e.type?"primary":"ghost",size:"medium",className:(0,ey.cn)("default"===e.type&&"text-text-secondary"),onClick:()=>(e=>{var t;if((0,l.trackEvent)("in_site_message_action",{notification_id:n,action:e.action_name}),u?.(e),"close"===e.action)return void f(!1);let r="string"==typeof(t=e.data)?{href:t,target:"_blank"}:t&&"object"==typeof t&&"string"==typeof t.href&&t.href?{href:t.href,rel:"string"==typeof t.rel?t.rel:void 0,target:"string"==typeof t.target?t.target:"_blank"}:null;if(!r)return;let i=r.target??"_blank";"_self"===i?window.location.assign(r.href):window.open(r.href,i,r.rel||"noopener,noreferrer")})(e),children:e.text},`${e.type}-${e.action}-${e.text}`))})]}):null};function eR(e){return!!e&&"object"==typeof e&&"string"==typeof e.text&&("primary"===e.type||"default"===e.type)&&("link"===e.action||"close"===e.action)&&(void 0===e.data||"function"!=typeof e.data)}e.s(["default",0,function(){let{t:e}=(0,i.useTranslation)(),o=(0,n.useMutation)(s.consoleQuery.notificationDismiss.mutationOptions()),{data:l}=(0,r.useQuery)(s.consoleQuery.notification.queryOptions({enabled:a.IS_CLOUD_EDITION})),c=l?.notifications?.[0],u=c?function(e){try{let t=JSON.parse(e);if(!t||"object"!=typeof t||"string"!=typeof t.main)return null;let n=Array.isArray(t.actions)?t.actions.filter(eR):[];return{main:t.main,actions:n}}catch{return null}}(c.body):null;if(!a.IS_CLOUD_EDITION||!c)return null;let d=[{type:"default",action_name:"dismiss",text:e("operation.close",{ns:"common"}),action:"close"}],m=u?.actions?.length?u.actions:d,p=u?.main??c.body;return(0,t.jsx)(eI,{notificationId:c.notification_id,title:c.title,subtitle:c.subtitle,headerBgUrl:c.title_pic_url,main:p,actions:m,onAction:e=>{"close"===e.action&&o.mutate({body:{notification_id:c.notification_id}})}},c.notification_id)}],211970)},722832,e=>{"use strict";let t,n,r;var i,a,s,o,l,c,u,d,m,p=e.i(162115),f=/[\\\/_+.#"@\[\(\{&]/,h=/[\\\/_+.#"@\[\(\{&]/g,g=/[\s-]/,x=/[\s-]/g;function v(e){return e.toLowerCase().replace(x," ")}var y=e.i(942347);function b(e,t){let{checkForDefaultPrevented:n=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function w(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function j(){for(var e=arguments.length,t=Array(e),n=0;n{let n=!1,r=t.map(t=>{let r=w(t,e);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let e=0;etypeof window&&window.document&&window.document.createElement;var C=globalThis?.document?y.useLayoutEffect:()=>{},k=y[" useId ".trim().toString()]||(()=>void 0),E=0;function A(e){let[t,n]=y.useState(k());return C(()=>{e||n(e=>e??String(E++))},[e]),e||(t?`radix-${t}`:"")}y[" useEffectEvent ".trim().toString()],y[" useInsertionEffect ".trim().toString()];var S=y[" useInsertionEffect ".trim().toString()]||C;Symbol("RADIX:SYNC_STATE");var _=e.i(939050);function L(e){var t;let n,r=(t=e,(n=y.forwardRef((e,t)=>{let{children:n,...r}=e;if(y.isValidElement(n)){var i;let e,a,s=(i=n,(a=(e=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?i.ref:(a=(e=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?i.props.ref:i.props.ref||i.ref),o=function(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=function(){for(var e=arguments.length,t=Array(e),n=0;n1?y.Children.only(null):null})).displayName=`${t}.SlotClone`,n),i=y.forwardRef((e,t)=>{let{children:n,...i}=e,a=y.Children.toArray(n),s=a.find(D);if(s){let e=s.props.children,n=a.map(t=>t!==s?t:y.Children.count(e)>1?y.Children.only(null):y.isValidElement(e)?e.props.children:null);return(0,p.jsx)(r,{...i,ref:t,children:y.isValidElement(e)?y.cloneElement(e,void 0,n):null})}return(0,p.jsx)(r,{...i,ref:t,children:n})});return i.displayName=`${e}.Slot`,i}var T=Symbol("radix.slottable");function D(e){return y.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===T}var P=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=L(`Primitive.${t}`),r=y.forwardRef((e,r)=>{let{asChild:i,...a}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,p.jsx)(i?n:t,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function I(e){let t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>function(){for(var e=arguments.length,n=Array(e),r=0;r{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:o,...l}=e,c=y.useContext(M),[u,m]=y.useState(null),f=u?.ownerDocument??globalThis?.document,[,h]=y.useState({}),g=N(t,e=>m(e)),x=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),w=x.indexOf(v),j=u?x.indexOf(u):-1,C=c.layersWithOutsidePointerEventsDisabled.size>0,k=j>=w,E=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:globalThis?.document,n=I(e),r=y.useRef(!1),i=y.useRef(()=>{});return y.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){$("dismissableLayer.pointerDownOutside",n,a,{discrete:!0})},a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=r,t.addEventListener("click",i.current,{once:!0})):r()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}(e=>{let t=e.target,n=[...c.branches].some(e=>e.contains(t));k&&!n&&(i?.(e),s?.(e),e.defaultPrevented||o?.())},f),A=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:globalThis?.document,n=I(e),r=y.useRef(!1);return y.useEffect(()=>{let e=e=>{e.target&&!r.current&&$("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{let t=e.target;![...c.branches].some(e=>e.contains(t))&&(a?.(e),s?.(e),e.defaultPrevented||o?.())},f);return!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:globalThis?.document,n=I(e);y.useEffect(()=>{let e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{j===c.layers.size-1&&(r?.(e),!e.defaultPrevented&&o&&(e.preventDefault(),o()))},f),y.useEffect(()=>{if(u)return n&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(d=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),F(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(f.body.style.pointerEvents=d)}},[u,f,n,c]),y.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),F())},[u,c]),y.useEffect(()=>{let e=()=>h({});return document.addEventListener(R,e),()=>document.removeEventListener(R,e)},[]),(0,p.jsx)(P.div,{...l,ref:g,style:{pointerEvents:C?k?"auto":"none":void 0,...e.style},onFocusCapture:b(e.onFocusCapture,A.onFocusCapture),onBlurCapture:b(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:b(e.onPointerDownCapture,E.onPointerDownCapture)})});function F(){let e=new CustomEvent(R);document.dispatchEvent(e)}function $(e,t,n,r){let{discrete:i}=r,a=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});if(t&&a.addEventListener(e,t,{once:!0}),i)a&&_.flushSync(()=>a.dispatchEvent(s));else a.dispatchEvent(s)}O.displayName="DismissableLayer",y.forwardRef((e,t)=>{let n=y.useContext(M),r=y.useRef(null),i=N(t,r);return y.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,p.jsx)(P.div,{...e,ref:i})}).displayName="DismissableLayerBranch";var z="focusScope.autoFocusOnMount",W="focusScope.autoFocusOnUnmount",U={bubbles:!1,cancelable:!0},B=y.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=e,[o,l]=y.useState(null),c=I(i),u=I(a),d=y.useRef(null),m=N(t,e=>l(e)),f=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let e=function(e){if(f.paused||!o)return;let t=e.target;o.contains(t)?d.current=t:q(d.current,{select:!0})},t=function(e){if(f.paused||!o)return;let t=e.relatedTarget;null!==t&&(o.contains(t)||q(d.current,{select:!0}))};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let n=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&q(o)});return o&&n.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[r,o,f.paused]),y.useEffect(()=>{if(o){G.add(f);let e=document.activeElement;if(!o.contains(e)){let t=new CustomEvent(z,U);o.addEventListener(z,c),o.dispatchEvent(t),t.defaultPrevented||(function(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=document.activeElement;for(let r of e)if(q(r,{select:t}),document.activeElement!==n)return}(V(o).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&q(o))}return()=>{o.removeEventListener(z,c),setTimeout(()=>{let t=new CustomEvent(W,U);o.addEventListener(W,u),o.dispatchEvent(t),t.defaultPrevented||q(e??document.body,{select:!0}),o.removeEventListener(W,u),G.remove(f)},0)}}},[o,c,u,f]);let h=y.useCallback(e=>{if(!n&&!r||f.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){var a;let t,r=e.currentTarget,[s,o]=[K(t=V(a=r),a),K(t.reverse(),a)];s&&o?e.shiftKey||i!==o?e.shiftKey&&i===s&&(e.preventDefault(),n&&q(o,{select:!0})):(e.preventDefault(),n&&q(s,{select:!0})):i===r&&e.preventDefault()}},[n,r,f.paused]);return(0,p.jsx)(P.div,{tabIndex:-1,...s,ref:m,onKeyDown:h})});function V(e){let t=[],n=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(;n.nextNode();)t.push(n.currentNode);return t}function K(e,t){for(let n of e)if(!function(e,t){let{upTo:n}=t;if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===n||e!==n);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(n,{upTo:t}))return n}function q(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&e.focus){var n;let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&(n=e)instanceof HTMLInputElement&&"select"in n&&t&&e.select()}}B.displayName="FocusScope";var G=(r=[],{add(e){let t=r[0];e!==t&&t?.pause(),(r=H(r,e)).unshift(e)},remove(e){r=H(r,e),r[0]?.resume()}});function H(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}var Y=y.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=y.useState(!1);C(()=>a(!0),[]);let s=n||i&&globalThis?.document?.body;return s?_.default.createPortal((0,p.jsx)(P.div,{...r,ref:t}),s):null});Y.displayName="Portal";var X=e=>{var t;let n,r,{present:i,children:a}=e,s=function(e){var t,n;let[r,i]=y.useState(),a=y.useRef(null),s=y.useRef(e),o=y.useRef("none"),[l,c]=(t=e?"mounted":"unmounted",n={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},y.useReducer((e,t)=>n[e][t]??e,t));return y.useEffect(()=>{let e=Z(a.current);o.current="mounted"===l?e:"none"},[l]),C(()=>{let t=a.current,n=s.current;if(n!==e){let r=o.current,i=Z(t);e?c("MOUNT"):"none"===i||t?.display==="none"?c("UNMOUNT"):n&&r!==i?c("ANIMATION_OUT"):c("UNMOUNT"),s.current=e}},[e,c]),C(()=>{if(r){let e,t=r.ownerDocument.defaultView??window,n=n=>{let i=Z(a.current).includes(CSS.escape(n.animationName));if(n.target===r&&i&&(c("ANIMATION_END"),!s.current)){let n=r.style.animationFillMode;r.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=n)})}},i=e=>{e.target===r&&(o.current=Z(a.current))};return r.addEventListener("animationstart",i),r.addEventListener("animationcancel",n),r.addEventListener("animationend",n),()=>{t.clearTimeout(e),r.removeEventListener("animationstart",i),r.removeEventListener("animationcancel",n),r.removeEventListener("animationend",n)}}c("ANIMATION_END")},[r,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:y.useCallback(e=>{a.current=e?getComputedStyle(e):null,i(e)},[])}}(i),o="function"==typeof a?a({present:s.isPresent}):y.Children.only(a),l=N(s.ref,(t=o,(r=(n=Object.getOwnPropertyDescriptor(t.props,"ref")?.get)&&"isReactWarning"in n&&n.isReactWarning)?t.ref:(r=(n=Object.getOwnPropertyDescriptor(t,"ref")?.get)&&"isReactWarning"in n&&n.isReactWarning)?t.props.ref:t.props.ref||t.ref));return"function"==typeof a||s.isPresent?y.cloneElement(o,{ref:l}):null};function Z(e){return e?.animationName||"none"}X.displayName="Presence";var Q=0;function J(){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 ee=e.i(824627),et="right-scroll-bar-position",en="width-before-scroll-bar";function er(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var ei="u">typeof window?y.useLayoutEffect:y.useEffect,ea=new WeakMap,es=(void 0===i&&(i={}),(void 0===a&&(a=function(e){return e}),s=[],o=!1,l={read:function(){if(o)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return s.length?s[s.length-1]:null},useMedium:function(e){var t=a(e,o);return s.push(t),function(){s=s.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(o=!0;s.length;){var t=s;s=[],t.forEach(e)}s={push:function(t){return e(t)},filter:function(){return s}}},assignMedium:function(e){o=!0;var t=[];if(s.length){var n=s;s=[],n.forEach(e),t=s}var r=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(r)};i(),s={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),s}}}}).options=(0,ee.__assign)({async:!0,ssr:!1},i),l),eo=function(){},el=y.forwardRef(function(e,t){var n,r,i,a,s=y.useRef(null),o=y.useState({onScrollCapture:eo,onWheelCapture:eo,onTouchMoveCapture:eo}),l=o[0],c=o[1],u=e.forwardProps,d=e.children,m=e.className,p=e.removeScrollBar,f=e.enabled,h=e.shards,g=e.sideCar,x=e.noRelative,v=e.noIsolation,b=e.inert,w=e.allowPinchZoom,j=e.as,N=e.gapMode,C=(0,ee.__rest)(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=(n=[s,t],r=function(e){return n.forEach(function(t){return er(t,e)})},(i=(0,y.useState)(function(){return{value:null,callback:r,facade:{get current(){return i.value},set current(value){var e=i.value;e!==value&&(i.value=value,i.callback(value,e))}}}})[0]).callback=r,a=i.facade,ei(function(){var e=ea.get(a);if(e){var t=new Set(e),r=new Set(n),i=a.current;t.forEach(function(e){r.has(e)||er(e,null)}),r.forEach(function(e){t.has(e)||er(e,i)})}ea.set(a,n)},[n]),a),E=(0,ee.__assign)((0,ee.__assign)({},C),l);return y.createElement(y.Fragment,null,f&&y.createElement(g,{sideCar:es,removeScrollBar:p,shards:h,noRelative:x,noIsolation:v,inert:b,setCallbacks:c,allowPinchZoom:!!w,lockRef:s,gapMode:N}),u?y.cloneElement(y.Children.only(d),(0,ee.__assign)((0,ee.__assign)({},E),{ref:k})):y.createElement(void 0===j?"div":j,(0,ee.__assign)({},E,{className:m,ref:k}),d))});el.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},el.classNames={fullWidth:en,zeroRight:et};var ec=function(e){var t=e.sideCar,n=(0,ee.__rest)(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error("Sidecar medium not found");return y.createElement(r,(0,ee.__assign)({},n))};ec.isSideCarExport=!0;var eu=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=m||("u">typeof __webpack_nonce__?__webpack_nonce__:void 0);return t&&e.setAttribute("nonce",t),e}())){var r,i;(r=t).styleSheet?r.styleSheet.cssText=n:r.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)}}},ed=function(){var e=eu();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},em=function(){var e=ed();return function(t){return e(t.styles,t.dynamic),null}},ep={left:0,top:0,right:0,gap:0},ef=function(e){return parseInt(e||"",10)||0},eh=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],i=t["padding"===e?"paddingRight":"marginRight"];return[ef(n),ef(r),ef(i)]},eg=function(e){if(void 0===e&&(e="margin"),"u"