uhuu-components 0.2.69 → 0.2.70

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.
@@ -831,7 +831,7 @@
831
831
  `;async function Pp(t,e={}){return new Promise(function(r,n){let a=new XMLHttpRequest;a.open(e.method||"get",t,!0);for(let i in e.headers)a.setRequestHeader(i,e.headers[i]);a.withCredentials=e.credentials==="include",a.onload=()=>{const i=a.status===0&&t.startsWith("file://")?200:a.status;r(new Response(a.responseText,{status:i}))},a.onerror=n,a.send(e.body||null)})}class ax{constructor(e){this.sheets=[],this.inserted=[],this.hooks={},this.hooks.onUrl=new oe(this),this.hooks.onAtPage=new oe(this),this.hooks.onAtMedia=new oe(this),this.hooks.onRule=new oe(this),this.hooks.onDeclaration=new oe(this),this.hooks.onContent=new oe(this),this.hooks.onSelector=new oe(this),this.hooks.onPseudoSelector=new oe(this),this.hooks.onImport=new oe(this),this.hooks.beforeTreeParse=new oe(this),this.hooks.beforeTreeWalk=new oe(this),this.hooks.afterTreeWalk=new oe(this),e!==!1&&this.setup()}setup(){return this.base=this.insert(nx),this.styleEl=document.createElement("style"),document.head.appendChild(this.styleEl),this.styleSheet=this.styleEl.sheet,this.styleSheet}async add(){let e=[],r=[];for(var n=0;n<arguments.length;n++){let a;if(typeof arguments[n]=="object")for(let i in arguments[n]){let o=arguments[n];a=new Promise(function(s,l){r.push(i),s(o[i])})}else r.push(arguments[n]),a=Pp(arguments[n]).then(i=>i.text());e.push(a)}return await Promise.all(e).then(async a=>{let i="";for(let o=0;o<a.length;o++)i=await this.convertViaSheet(a[o],r[o]),this.insert(i);return i})}async convertViaSheet(e,r){let n=new rx(r,this.hooks);await n.parse(e);for(let a of n.imported){let i=await Pp(a).then(s=>s.text()),o=await this.convertViaSheet(i,a);this.insert(o)}return this.sheets.push(n),typeof n.width<"u"&&(this.width=n.width),typeof n.height<"u"&&(this.height=n.height),typeof n.orientation<"u"&&(this.orientation=n.orientation),n.toString()}insert(e){let r=document.querySelector("head"),n=document.createElement("style");return n.setAttribute("data-pagedjs-inserted-styles","true"),n.appendChild(document.createTextNode(e)),r.appendChild(n),this.inserted.push(n),n}destroy(){this.styleEl.remove(),this.inserted.forEach(e=>{e.remove()}),this.sheets=[]}}class Se{constructor(e,r,n){let a=Object.assign({},e&&e.hooks,r&&r.hooks,n&&n.hooks);this.chunker=e,this.polisher=r,this.caller=n;for(let i in a)i in this&&a[i].register(this[i].bind(this))}}Ut(Se.prototype);const Ip={A0:{width:{value:841,unit:"mm"},height:{value:1189,unit:"mm"}},A1:{width:{value:594,unit:"mm"},height:{value:841,unit:"mm"}},A2:{width:{value:420,unit:"mm"},height:{value:594,unit:"mm"}},A3:{width:{value:297,unit:"mm"},height:{value:420,unit:"mm"}},A4:{width:{value:210,unit:"mm"},height:{value:297,unit:"mm"}},A5:{width:{value:148,unit:"mm"},height:{value:210,unit:"mm"}},A6:{width:{value:105,unit:"mm"},height:{value:148,unit:"mm"}},A7:{width:{value:74,unit:"mm"},height:{value:105,unit:"mm"}},A8:{width:{value:52,unit:"mm"},height:{value:74,unit:"mm"}},A9:{width:{value:37,unit:"mm"},height:{value:52,unit:"mm"}},A10:{width:{value:26,unit:"mm"},height:{value:37,unit:"mm"}},B4:{width:{value:250,unit:"mm"},height:{value:353,unit:"mm"}},B5:{width:{value:176,unit:"mm"},height:{value:250,unit:"mm"}},letter:{width:{value:8.5,unit:"in"},height:{value:11,unit:"in"}},legal:{width:{value:8.5,unit:"in"},height:{value:14,unit:"in"}},ledger:{width:{value:11,unit:"in"},height:{value:17,unit:"in"}}};class ix extends Se{constructor(e,r,n){super(e,r,n),this.pages={},this.width=void 0,this.height=void 0,this.orientation=void 0,this.marginalia={}}pageModel(e){return{selector:e,name:void 0,psuedo:void 0,nth:void 0,marginalia:{},width:void 0,height:void 0,orientation:void 0,margin:{top:{},right:{},left:{},bottom:{}},padding:{top:{},right:{},left:{},bottom:{}},border:{top:{},right:{},left:{},bottom:{}},backgroundOrigin:void 0,block:{},marks:void 0,notes:void 0,added:!1}}onAtPage(e,r,n){let a,i,o="",s,l,c,d=!1;e.prelude?(s=this.getTypeSelector(e),l=this.getPsuedoSelector(e),c=this.getNthSelector(e),o=V.generate(e.prelude)):o="*",o in this.pages?(a=this.pages[o],i=this.replaceMarginalia(e),d=!0,a.added=!1):(a=this.pageModel(o),i=this.replaceMarginalia(e),this.pages[o]=a),a.name=s,a.psuedo=l,a.nth=c,d?a.marginalia=Object.assign(a.marginalia,i):a.marginalia=i;let u=this.replaceNotes(e);a.notes=u;let p=this.replaceDeclarations(e);if(p.size&&(a.size=p.size,a.width=p.size.width,a.height=p.size.height,a.orientation=p.size.orientation,a.format=p.size.format),p.bleed&&p.bleed[0]!="auto")switch(p.bleed.length){case 4:a.bleed={top:p.bleed[0],right:p.bleed[1],bottom:p.bleed[2],left:p.bleed[3]};break;case 3:a.bleed={top:p.bleed[0],right:p.bleed[1],bottom:p.bleed[2],left:p.bleed[1]};break;case 2:a.bleed={top:p.bleed[0],right:p.bleed[1],bottom:p.bleed[0],left:p.bleed[1]};break;default:a.bleed={top:p.bleed[0],right:p.bleed[0],bottom:p.bleed[0],left:p.bleed[0]}}p.marks&&((!p.bleed||p.bleed&&p.bleed[0]==="auto")&&(a.bleed={top:{value:6,unit:"mm"},right:{value:6,unit:"mm"},bottom:{value:6,unit:"mm"},left:{value:6,unit:"mm"}}),a.marks=p.marks),p.margin&&(a.margin=p.margin),p.padding&&(a.padding=p.padding),p.border&&(a.border=p.border),p.marks&&(a.marks=p.marks),d?a.block.children.appendList(e.block.children):a.block=e.block,n.remove(r)}afterTreeWalk(e,r){let n="*"in this.pages&&this.pages["*"].added===!1;if(this.addPageClasses(this.pages,e,r),n){let a=this.pages["*"].width,i=this.pages["*"].height,o=this.pages["*"].format,s=this.pages["*"].orientation,l=this.pages["*"].bleed,c=this.pages["*"].marks,d,u;":left"in this.pages&&(d=this.pages[":left"].bleed),":right"in this.pages&&(u=this.pages[":right"].bleed),a&&i&&(this.width!==a||this.height!==i)&&(this.width=a,this.height=i,this.format=o,this.orientation=s,this.addRootVars(e,a,i,s,l,u,d,c),this.addRootPage(e,this.pages["*"].size,l,u,d),this.emit("size",{width:a,height:i,orientation:s,format:o,bleed:l}),this.emit("atpages",this.pages))}}getTypeSelector(e){let r;return V.walk(e,{visit:"TypeSelector",enter:(n,a,i)=>{r=n.name}}),r}getPsuedoSelector(e){let r;return V.walk(e,{visit:"PseudoClassSelector",enter:(n,a,i)=>{n.name!=="nth"&&(r=n.name)}}),r}getNthSelector(e){let r;return V.walk(e,{visit:"PseudoClassSelector",enter:(n,a,i)=>{n.name==="nth"&&n.children&&(r=n.children.first().value)}}),r}replaceMarginalia(e){let r={};const n=["top-left-corner","top-left","top","top-center","top-right","top-right-corner","bottom-left-corner","bottom-left","bottom","bottom-center","bottom-right","bottom-right-corner","left-top","left-middle","left","left-bottom","top-right-corner","right-top","right-middle","right","right-bottom","right-right-corner"];return V.walk(e.block,{visit:"Atrule",enter:(a,i,o)=>{let s=a.name;n.includes(s)&&(s==="top"&&(s="top-center"),s==="right"&&(s="right-middle"),s==="left"&&(s="left-middle"),s==="bottom"&&(s="bottom-center"),r[s]=a.block,o.remove(i))}}),r}replaceNotes(e){let r={};return V.walk(e.block,{visit:"Atrule",enter:(n,a,i)=>{let o=n.name;o==="footnote"&&(r[o]=n.block,i.remove(a))}}),r}replaceDeclarations(e){let r={};return V.walk(e.block,{visit:"Declaration",enter:(n,a,i)=>{let o=V.property(n.property).name;if(o==="marks")r.marks=[],V.walk(n,{visit:"Identifier",enter:s=>{r.marks.push(s.name)}}),i.remove(a);else if(o==="margin")r.margin=this.getMargins(n),i.remove(a);else if(o.indexOf("margin-")===0){let s=o.substring(7);r.margin||(r.margin={top:{},right:{},left:{},bottom:{}}),r.margin[s]=n.value.children.first(),i.remove(a)}else if(o==="padding")r.padding=this.getPaddings(n.value),i.remove(a);else if(o.indexOf("padding-")===0){let s=o.substring(8);r.padding||(r.padding={top:{},right:{},left:{},bottom:{}}),r.padding[s]=n.value.children.first(),i.remove(a)}else if(o==="border")r.border||(r.border={top:{},right:{},left:{},bottom:{}}),r.border.top=V.generate(n.value),r.border.right=V.generate(n.value),r.border.left=V.generate(n.value),r.border.bottom=V.generate(n.value),i.remove(a);else if(o.indexOf("border-")===0){r.border||(r.border={top:{},right:{},left:{},bottom:{}});let s=o.substring(7);r.border[s]=V.generate(n.value),i.remove(a)}else o==="size"?(r.size=this.getSize(n),i.remove(a)):o==="bleed"&&(r.bleed=[],V.walk(n,{enter:s=>{switch(s.type){case"String":s.value.indexOf("auto")>-1&&r.bleed.push("auto");break;case"Dimension":r.bleed.push({value:s.value,unit:s.unit});break;case"Number":r.bleed.push({value:s.value,unit:"px"});break}}}),i.remove(a))}}),r}getSize(e){let r,n,a,i;return V.walk(e,{visit:"Dimension",enter:(o,s,l)=>{let{value:c,unit:d}=o;typeof r>"u"?r={value:c,unit:d}:typeof n>"u"&&(n={value:c,unit:d})}}),V.walk(e,{visit:"String",enter:(o,s,l)=>{let c=o.value.replace(/["|']/g,""),d=Ip[c];d&&(r=d.width,n=d.height)}}),V.walk(e,{visit:"Identifier",enter:(o,s,l)=>{let c=o.name;if(c==="landscape"||c==="portrait")a=o.name;else if(c!=="auto"){let d=Ip[c];d&&(r=d.width,n=d.height),i=c}}}),{width:r,height:n,orientation:a,format:i}}getMargins(e){let r=[],n={top:{},right:{},left:{},bottom:{}};if(V.walk(e,{enter:a=>{switch(a.type){case"Dimension":r.push(a);break;case"Number":r.push({value:a.value,unit:"px"});break}}}),r.length===1)for(let a in n)n[a]=r[0];else r.length===2?(n.top=r[0],n.right=r[1],n.bottom=r[0],n.left=r[1]):r.length===3?(n.top=r[0],n.right=r[1],n.bottom=r[2],n.left=r[1]):r.length===4&&(n.top=r[0],n.right=r[1],n.bottom=r[2],n.left=r[3]);return n}getPaddings(e){let r=[],n={top:{},right:{},left:{},bottom:{}};if(V.walk(e,{enter:a=>{switch(a.type){case"Dimension":r.push(a);break;case"Number":r.push({value:a.value,unit:"px"});break}}}),r.length===1)for(let a in n)n[a]=r[0];else r.length===2?(n.top=r[0],n.right=r[1],n.bottom=r[0],n.left=r[1]):r.length===3?(n.top=r[0],n.right=r[1],n.bottom=r[2],n.left=r[1]):r.length===4&&(n.top=r[0],n.right=r[1],n.bottom=r[2],n.left=r[3]);return n}getBorders(e){let r={top:{},right:{},left:{},bottom:{}};return e.prop=="border"?(r.top=V.generate(e.value),r.right=V.generate(e.value),r.bottom=V.generate(e.value),r.left=V.generate(e.value)):e.prop=="border-top"?r.top=V.generate(e.value):e.prop=="border-right"?r.right=V.generate(e.value):e.prop=="border-bottom"?r.bottom=V.generate(e.value):e.prop=="border-left"&&(r.left=V.generate(e.value)),r}addPageClasses(e,r,n){if("*"in e&&e["*"].added===!1){let a=this.createPage(e["*"],r.children,n);n.insertRule(a),e["*"].added=!0}if(":left"in e&&e[":left"].added===!1){let a=this.createPage(e[":left"],r.children,n);n.insertRule(a),e[":left"].added=!0}if(":right"in e&&e[":right"].added===!1){let a=this.createPage(e[":right"],r.children,n);n.insertRule(a),e[":right"].added=!0}if(":first"in e&&e[":first"].added===!1){let a=this.createPage(e[":first"],r.children,n);n.insertRule(a),e[":first"].added=!0}if(":blank"in e&&e[":blank"].added===!1){let a=this.createPage(e[":blank"],r.children,n);n.insertRule(a),e[":blank"].added=!0}for(let a in e)if(e[a].nth&&e[a].added===!1){let i=this.createPage(e[a],r.children,n);n.insertRule(i),e[a].added=!0}for(let a in e)if(e[a].name&&e[a].added===!1){let i=this.createPage(e[a],r.children,n);n.insertRule(i),e[a].added=!0}}createPage(e,r,n){let a=this.selectorsForPage(e),i=e.block.children.copy(),o={type:"Block",loc:0,children:i},s=this.createRule(a,o);return this.addMarginVars(e.margin,i,i.first()),this.addPaddingVars(e.padding,i,i.first()),this.addBorderVars(e.border,i,i.first()),e.width&&this.addDimensions(e.width,e.height,e.orientation,i,i.first()),e.marginalia&&(this.addMarginaliaStyles(e,r,s,n),this.addMarginaliaContent(e,r,s,n)),e.notes&&this.addNotesStyles(e.notes,e,r,s,n),s}addMarginVars(e,r,n){for(let a in e)if(typeof e[a].value<"u"){let i=e[a].value+(e[a].unit||""),o=r.createItem({type:"Declaration",property:"--pagedjs-margin-"+a,value:{type:"Raw",value:i}});r.append(o,n)}}addPaddingVars(e,r,n){for(let a in e)if(typeof e[a].value<"u"){let i=e[a].value+(e[a].unit||""),o=r.createItem({type:"Declaration",property:"--pagedjs-padding-"+a,value:{type:"Raw",value:i}});r.append(o,n)}}addBorderVars(e,r,n){for(const a of Object.keys(e)){const i=e[a];if(typeof i=="string"){const o=r.createItem({type:"Declaration",property:"--pagedjs-border-"+a,value:{type:"Raw",value:i}});r.append(o,n)}}}addDimensions(e,r,n,a,i){let o,s;o=te(e),s=te(r),n&&n!=="portrait"&&([o,s]=[s,o]);let l=this.createVariable("--pagedjs-pagebox-width",o);a.appendData(l);let c=this.createVariable("--pagedjs-pagebox-height",s);a.appendData(c)}addMarginaliaStyles(e,r,n,a){for(let i in e.marginalia){let o=V.clone(e.marginalia[i]),s=!1;if(o.children.isEmpty())continue;V.walk(o,{visit:"Declaration",enter:(u,p,f)=>{if(u.property==="content"&&(u.value.children&&u.value.children.first().name==="none"?s=!1:s=!0,f.remove(p)),u.property==="vertical-align"&&(V.walk(u,{visit:"Identifier",enter:(v,m,g)=>{let w=v.name;w==="top"?v.name="flex-start":w==="middle"?v.name="center":w==="bottom"&&(v.name="flex-end")}}),u.property="align-items"),u.property==="width"&&(i==="top-left"||i==="top-center"||i==="top-right"||i==="bottom-left"||i==="bottom-center"||i==="bottom-right")){let v=V.clone(u);v.property="max-width",f.appendData(v)}if(u.property==="height"&&(i==="left-top"||i==="left-middle"||i==="left-bottom"||i==="right-top"||i==="right-middle"||i==="right-bottom")){let v=V.clone(u);v.property="max-height",f.appendData(v)}}});let l=this.selectorsForPageMargin(e,i),c=this.createRule(l,o);r.appendData(c);let d=V.generate({type:"Selector",children:l});this.marginalia[d]={page:e,selector:d,block:e.marginalia[i],hasContent:s}}}addMarginaliaContent(e,r,n,a){let i;for(let o in e.marginalia){let s=V.clone(e.marginalia[o]);if(V.walk(s,{visit:"Declaration",enter:(f,v,m)=>{f.property!=="content"&&m.remove(v),f.value.children&&f.value.children.first().name==="none"&&(i=!0)}}),s.children.isEmpty())continue;let l=this.selectorsForPageMargin(e,o),c;l.insertData({type:"Combinator",name:">"}),l.insertData({type:"ClassSelector",name:"pagedjs_margin-content"}),l.insertData({type:"Combinator",name:">"}),l.insertData({type:"TypeSelector",name:"*"}),i?c=this.createDeclaration("display","none"):c=this.createDeclaration("display","block");let d=this.createRule(l,[c]);a.insertRule(d);let u=this.selectorsForPageMargin(e,o);u.insertData({type:"Combinator",name:">"}),u.insertData({type:"ClassSelector",name:"pagedjs_margin-content"}),u.insertData({type:"PseudoElementSelector",name:"after",children:null});let p=this.createRule(u,s);a.insertRule(p)}}addRootVars(e,r,n,a,i,o,s,l){let c=[],d=new V.List;d.insertData({type:"PseudoClassSelector",name:"root",children:null});let u,p,f,v,m,g;if(!i)u=te(r),p=te(n),f=te(r),v=te(n),m=te(r),g=te(n);else{u=`calc( ${te(r)} + ${te(i.left)} + ${te(i.right)} )`,p=`calc( ${te(n)} + ${te(i.top)} + ${te(i.bottom)} )`,f=`calc( ${te(r)} + ${te(i.left)} + ${te(i.right)} )`,v=`calc( ${te(n)} + ${te(i.top)} + ${te(i.bottom)} )`,m=`calc( ${te(r)} + ${te(i.left)} + ${te(i.right)} )`,g=`calc( ${te(n)} + ${te(i.top)} + ${te(i.bottom)} )`;let C=this.createVariable("--pagedjs-bleed-top",te(i.top)),_=this.createVariable("--pagedjs-bleed-right",te(i.right)),A=this.createVariable("--pagedjs-bleed-bottom",te(i.bottom)),I=this.createVariable("--pagedjs-bleed-left",te(i.left)),N=this.createVariable("--pagedjs-bleed-right-top",te(i.top)),D=this.createVariable("--pagedjs-bleed-right-right",te(i.right)),j=this.createVariable("--pagedjs-bleed-right-bottom",te(i.bottom)),U=this.createVariable("--pagedjs-bleed-right-left",te(i.left)),W=this.createVariable("--pagedjs-bleed-left-top",te(i.top)),q=this.createVariable("--pagedjs-bleed-left-right",te(i.right)),F=this.createVariable("--pagedjs-bleed-left-bottom",te(i.bottom)),P=this.createVariable("--pagedjs-bleed-left-left",te(i.left));o&&(N=this.createVariable("--pagedjs-bleed-right-top",te(o.top)),D=this.createVariable("--pagedjs-bleed-right-right",te(o.right)),j=this.createVariable("--pagedjs-bleed-right-bottom",te(o.bottom)),U=this.createVariable("--pagedjs-bleed-right-left",te(o.left)),f=`calc( ${te(r)} + ${te(o.left)} + ${te(o.right)} )`,v=`calc( ${te(n)} + ${te(o.top)} + ${te(o.bottom)} )`),s&&(W=this.createVariable("--pagedjs-bleed-left-top",te(s.top)),q=this.createVariable("--pagedjs-bleed-left-right",te(s.right)),F=this.createVariable("--pagedjs-bleed-left-bottom",te(s.bottom)),P=this.createVariable("--pagedjs-bleed-left-left",te(s.left)),m=`calc( ${te(r)} + ${te(s.left)} + ${te(s.right)} )`,g=`calc( ${te(n)} + ${te(s.top)} + ${te(s.bottom)} )`);let R=this.createVariable("--pagedjs-width",te(r)),Y=this.createVariable("--pagedjs-height",te(n));c.push(C,_,A,I,N,D,j,U,W,q,F,P,R,Y)}if(l&&l.forEach(C=>{let _=this.createVariable("--pagedjs-mark-"+C+"-display","block");c.push(_)}),a){let C=this.createVariable("--pagedjs-orientation",a);c.push(C),a!=="portrait"&&([u,p]=[p,u],[f,v]=[v,f],[m,g]=[g,m])}let w=this.createVariable("--pagedjs-width",u),x=this.createVariable("--pagedjs-height",p),h=this.createVariable("--pagedjs-width-right",f),b=this.createVariable("--pagedjs-height-right",v),S=this.createVariable("--pagedjs-width-left",m),E=this.createVariable("--pagedjs-height-left",g);c.push(w,x,h,b,S,E);let k=this.createRule(d,c);e.children.appendData(k)}addNotesStyles(e,r,n,a,i){for(const o in e){let s=this.selectorsForPage(r);s.insertData({type:"Combinator",name:" "}),s.insertData({type:"ClassSelector",name:"pagedjs_"+o+"_content"});let l=this.createRule(s,e[o]);n.appendData(l)}}addRootPage(e,r,n,a,i){let{width:o,height:s,orientation:l,format:c}=r,d=new V.List,u=new V.List,p=new V.List,f=new V.List,v=new V.List,m=new V.List;if(n){let w=new V.List,x=new V.List;w.appendData({type:"Dimension",unit:o.unit,value:o.value}),w.appendData({type:"WhiteSpace",value:" "}),w.appendData({type:"Operator",value:"+"}),w.appendData({type:"WhiteSpace",value:" "}),w.appendData({type:"Dimension",unit:n.left.unit,value:n.left.value}),w.appendData({type:"WhiteSpace",value:" "}),w.appendData({type:"Operator",value:"+"}),w.appendData({type:"WhiteSpace",value:" "}),w.appendData({type:"Dimension",unit:n.right.unit,value:n.right.value}),x.appendData({type:"Dimension",unit:s.unit,value:s.value}),x.appendData({type:"WhiteSpace",value:" "}),x.appendData({type:"Operator",value:"+"}),x.appendData({type:"WhiteSpace",value:" "}),x.appendData({type:"Dimension",unit:n.top.unit,value:n.top.value}),x.appendData({type:"WhiteSpace",value:" "}),x.appendData({type:"Operator",value:"+"}),x.appendData({type:"WhiteSpace",value:" "}),x.appendData({type:"Dimension",unit:n.bottom.unit,value:n.bottom.value}),f.appendData({type:"Function",name:"calc",children:w}),f.appendData({type:"WhiteSpace",value:" "}),f.appendData({type:"Function",name:"calc",children:x})}else c?(f.appendData({type:"Identifier",name:c}),l&&(f.appendData({type:"WhiteSpace",value:" "}),f.appendData({type:"Identifier",name:l}))):(f.appendData({type:"Dimension",unit:o.unit,value:o.value}),f.appendData({type:"WhiteSpace",value:" "}),f.appendData({type:"Dimension",unit:s.unit,value:s.value}));d.appendData({type:"Declaration",property:"size",loc:null,value:{type:"Value",children:f}}),d.appendData({type:"Declaration",property:"margin",loc:null,value:{type:"Value",children:[{type:"Dimension",unit:"px",value:0}]}}),d.appendData({type:"Declaration",property:"padding",loc:null,value:{type:"Value",children:[{type:"Dimension",unit:"px",value:0}]}}),d.appendData({type:"Declaration",property:"padding",loc:null,value:{type:"Value",children:[{type:"Dimension",unit:"px",value:0}]}});let g=e.children.createItem({type:"Atrule",prelude:null,name:"page",block:{type:"Block",loc:null,children:d}});if(e.children.append(g),i){let w=new V.List,x=new V.List;w.appendData({type:"Dimension",unit:o.unit,value:o.value}),w.appendData({type:"WhiteSpace",value:" "}),w.appendData({type:"Operator",value:"+"}),w.appendData({type:"WhiteSpace",value:" "}),w.appendData({type:"Dimension",unit:i.left.unit,value:i.left.value}),w.appendData({type:"WhiteSpace",value:" "}),w.appendData({type:"Operator",value:"+"}),w.appendData({type:"WhiteSpace",value:" "}),w.appendData({type:"Dimension",unit:i.right.unit,value:i.right.value}),x.appendData({type:"Dimension",unit:s.unit,value:s.value}),x.appendData({type:"WhiteSpace",value:" "}),x.appendData({type:"Operator",value:"+"}),x.appendData({type:"WhiteSpace",value:" "}),x.appendData({type:"Dimension",unit:i.top.unit,value:i.top.value}),x.appendData({type:"WhiteSpace",value:" "}),x.appendData({type:"Operator",value:"+"}),x.appendData({type:"WhiteSpace",value:" "}),x.appendData({type:"Dimension",unit:i.bottom.unit,value:i.bottom.value}),v.appendData({type:"Function",name:"calc",children:w}),v.appendData({type:"WhiteSpace",value:" "}),v.appendData({type:"Function",name:"calc",children:x}),u.appendData({type:"Declaration",property:"size",loc:null,value:{type:"Value",children:v}});let h=e.children.createItem({type:"Atrule",prelude:null,name:"page :left",block:{type:"Block",loc:null,children:u}});e.children.append(h)}if(a){let w=new V.List,x=new V.List;w.appendData({type:"Dimension",unit:o.unit,value:o.value}),w.appendData({type:"WhiteSpace",value:" "}),w.appendData({type:"Operator",value:"+"}),w.appendData({type:"WhiteSpace",value:" "}),w.appendData({type:"Dimension",unit:a.left.unit,value:a.left.value}),w.appendData({type:"WhiteSpace",value:" "}),w.appendData({type:"Operator",value:"+"}),w.appendData({type:"WhiteSpace",value:" "}),w.appendData({type:"Dimension",unit:a.right.unit,value:a.right.value}),x.appendData({type:"Dimension",unit:s.unit,value:s.value}),x.appendData({type:"WhiteSpace",value:" "}),x.appendData({type:"Operator",value:"+"}),x.appendData({type:"WhiteSpace",value:" "}),x.appendData({type:"Dimension",unit:a.top.unit,value:a.top.value}),x.appendData({type:"WhiteSpace",value:" "}),x.appendData({type:"Operator",value:"+"}),x.appendData({type:"WhiteSpace",value:" "}),x.appendData({type:"Dimension",unit:a.bottom.unit,value:a.bottom.value}),m.appendData({type:"Function",name:"calc",children:w}),m.appendData({type:"WhiteSpace",value:" "}),m.appendData({type:"Function",name:"calc",children:x}),p.appendData({type:"Declaration",property:"size",loc:null,value:{type:"Value",children:m}});let h=e.children.createItem({type:"Atrule",prelude:null,name:"page :right",block:{type:"Block",loc:null,children:p}});e.children.append(h)}}getNth(e){let r=e.indexOf("n"),n=e.indexOf("+"),a=e.split("n"),i=e.split("+"),o=null,s=null;return r>-1?(o=a[0],n>-1&&(s=i[1])):s=e,{type:"Nth",loc:null,selector:null,nth:{type:"AnPlusB",loc:null,a:o,b:s}}}addPageAttributes(e,r,n){let a=[r.dataset.page];if(a&&a.length)for(const i of a)i&&(e.name=i,e.element.classList.add("pagedjs_named_page"),e.element.classList.add("pagedjs_"+i+"_page"),r.dataset.splitFrom||e.element.classList.add("pagedjs_"+i+"_first_page"))}getStartElement(e,r){let n=r&&r.node;if(!e&&!r)return;if(!n)return e.children[0];if(n.nodeType===1&&n.parentNode.nodeType===11||n.nodeType===1&&n.dataset.page)return n;let a=Mc(n),i=a.querySelectorAll("[data-page]");return i.length?i[i.length-1]:a.children[0]}beforePageLayout(e,r,n,a){let i=this.getStartElement(r,n);i&&this.addPageAttributes(e,i,a.pages)}finalizePage(e,r,n,a){for(let i in this.marginalia){let o=this.marginalia[i],s=i.split(" "),l;r.element.matches(s[0])&&o.hasContent&&(l=r.element.querySelector(s[1]),l.classList.add("hasContent"))}["top","bottom"].forEach(i=>{let o=r.element.querySelector(".pagedjs_margin-"+i),s=r.element.querySelector(".pagedjs_margin-"+i+"-center"),l=r.element.querySelector(".pagedjs_margin-"+i+"-left"),c=r.element.querySelector(".pagedjs_margin-"+i+"-right"),d=s.classList.contains("hasContent"),u=l.classList.contains("hasContent"),p=c.classList.contains("hasContent"),f,v,m;if(u&&(v=window.getComputedStyle(l)["max-width"]),p&&(m=window.getComputedStyle(c)["max-width"]),d)if(f=window.getComputedStyle(s)["max-width"],f==="none"||f==="auto")if(!u&&!p)o.style["grid-template-columns"]="0 1fr 0";else if(u)if(p)if(v!=="none"&&v!=="auto")m!=="none"&&m!=="auto"?o.style["grid-template-columns"]=v+" 1fr "+m:o.style["grid-template-columns"]=v+" 1fr "+v;else if(m!=="none"&&m!=="auto")o.style["grid-template-columns"]=m+" 1fr "+m;else{o.style["grid-template-columns"]="auto auto 1fr",l.style["white-space"]="nowrap",s.style["white-space"]="nowrap",c.style["white-space"]="nowrap";let g=l.offsetWidth,w=s.offsetWidth,x=c.offsetWidth,h=g+w+x,b=w*100/h;b>40?o.style["grid-template-columns"]="minmax(16.66%, 1fr) minmax(33%, "+b+"%) minmax(16.66%, 1fr)":o.style["grid-template-columns"]="repeat(3, 1fr)",l.style["white-space"]="normal",s.style["white-space"]="normal",c.style["white-space"]="normal"}else if(v!=="none"&&v!=="auto")o.style["grid-template-columns"]=v+" 1fr "+v;else{o.style["grid-template-columns"]="auto auto 1fr",l.style["white-space"]="nowrap",s.style["white-space"]="nowrap";let g=l.offsetWidth,w=s.offsetWidth,x=g+w,h=w*100/x;o.style["grid-template-columns"]="minmax(16.66%, 1fr) minmax(33%, "+h+"%) minmax(16.66%, 1fr)",l.style["white-space"]="normal",s.style["white-space"]="normal"}else if(m!=="none"&&m!=="auto")o.style["grid-template-columns"]=m+" 1fr "+m;else{o.style["grid-template-columns"]="auto auto 1fr",c.style["white-space"]="nowrap",s.style["white-space"]="nowrap";let g=c.offsetWidth,w=s.offsetWidth,x=g+w,h=w*100/x;o.style["grid-template-columns"]="minmax(16.66%, 1fr) minmax(33%, "+h+"%) minmax(16.66%, 1fr)",c.style["white-space"]="normal",s.style["white-space"]="normal"}else f!=="none"&&f!=="auto"&&(u&&v!=="none"&&v!=="auto"?o.style["grid-template-columns"]=v+" "+f+" 1fr":p&&m!=="none"&&m!=="auto"?o.style["grid-template-columns"]="1fr "+f+" "+m:o.style["grid-template-columns"]="1fr "+f+" 1fr");else if(u)if(!p)o.style["grid-template-columns"]="1fr 0 0";else if(v!=="none"&&v!=="auto")m!=="none"&&m!=="auto"?o.style["grid-template-columns"]=v+" 1fr "+m:o.style["grid-template-columns"]=v+" 0 1fr";else if(m!=="none"&&m!=="auto")o.style["grid-template-columns"]="1fr 0 "+m;else{o.style["grid-template-columns"]="auto 1fr auto",l.style["white-space"]="nowrap",c.style["white-space"]="nowrap";let g=l.offsetWidth,w=c.offsetWidth,x=g+w,h=g*100/x;o.style["grid-template-columns"]="minmax(16.66%, "+h+"%) 0 1fr",l.style["white-space"]="normal",c.style["white-space"]="normal"}else m!=="none"&&m!=="auto"?o.style["grid-template-columns"]="1fr 0 "+m:o.style["grid-template-columns"]="0 0 1fr"}),["left","right"].forEach(i=>{let o=r.element.querySelector(".pagedjs_margin-"+i+"-middle.hasContent"),s=r.element.querySelector(".pagedjs_margin-"+i),l=r.element.querySelector(".pagedjs_margin-"+i+"-top"),c=r.element.querySelector(".pagedjs_margin-"+i+"-bottom"),d=l.classList.contains("hasContent"),u=c.classList.contains("hasContent"),p,f,v;d&&(f=window.getComputedStyle(l)["max-height"]),u&&(v=window.getComputedStyle(c)["max-height"]),o?(p=window.getComputedStyle(o)["max-height"],p==="none"||p==="auto"?!d&&!u?s.style["grid-template-rows"]="0 1fr 0":d?u?f!=="none"&&f!=="auto"?v!=="none"&&v!=="auto"?s.style["grid-template-rows"]=f+" calc(100% - "+f+" - "+v+") "+v:s.style["grid-template-rows"]=f+" calc(100% - "+f+"*2) "+f:v!=="none"&&v!=="auto"&&(s.style["grid-template-rows"]=v+" calc(100% - "+v+"*2) "+v):f!=="none"&&f!=="auto"&&(s.style["grid-template-rows"]=f+" calc(100% - "+f+"*2) "+f):v!=="none"&&v!=="auto"&&(s.style["grid-template-rows"]=v+" calc(100% - "+v+"*2) "+v):d&&f!=="none"&&f!=="auto"?s.style["grid-template-rows"]=f+" "+p+" calc(100% - ("+f+" + "+p+"))":u&&v!=="none"&&v!=="auto"?s.style["grid-template-rows"]="1fr "+p+" "+v:s.style["grid-template-rows"]="calc((100% - "+p+")/2) "+p+" calc((100% - "+p+")/2)"):d?u?f!=="none"&&f!=="auto"?v!=="none"&&v!=="auto"?s.style["grid-template-rows"]=f+" 1fr "+v:s.style["grid-template-rows"]=f+" 0 1fr":v!=="none"&&v!=="auto"?s.style["grid-template-rows"]="1fr 0 "+v:s.style["grid-template-rows"]="1fr 0 1fr":s.style["grid-template-rows"]="1fr 0 0":v!=="none"&&v!=="auto"?s.style["grid-template-rows"]="1fr 0 "+v:s.style["grid-template-rows"]="0 0 1fr"})}selectorsForPage(e){let r,n,a=new V.List;return a.insertData({type:"ClassSelector",name:"pagedjs_page"}),e.name&&(a.insertData({type:"ClassSelector",name:"pagedjs_named_page"}),a.insertData({type:"ClassSelector",name:"pagedjs_"+e.name+"_page"})),e.psuedo&&!(e.name&&e.psuedo==="first")&&a.insertData({type:"ClassSelector",name:"pagedjs_"+e.psuedo+"_page"}),e.name&&e.psuedo==="first"&&a.insertData({type:"ClassSelector",name:"pagedjs_"+e.name+"_"+e.psuedo+"_page"}),e.nth&&(r=new V.List,n=this.getNth(e.nth),r.insertData(n),a.insertData({type:"PseudoClassSelector",name:"nth-of-type",children:r})),a}selectorsForPageMargin(e,r){let n=this.selectorsForPage(e);return n.insertData({type:"Combinator",name:" "}),n.insertData({type:"ClassSelector",name:"pagedjs_margin-"+r}),n}createDeclaration(e,r,n){let a=new V.List;return a.insertData({type:"Identifier",loc:null,name:r}),{type:"Declaration",loc:null,important:n,property:e,value:{type:"Value",loc:null,children:a}}}createVariable(e,r){return{type:"Declaration",loc:null,property:e,value:{type:"Raw",value:r}}}createCalculatedDimension(e,r,n,a="+"){let i=new V.List,o=new V.List;return r.forEach((s,l)=>{o.appendData({type:"Dimension",unit:s.unit,value:s.value}),o.appendData({type:"WhiteSpace",value:" "}),l+1<r.length&&(o.appendData({type:"Operator",value:a}),o.appendData({type:"WhiteSpace",value:" "}))}),i.insertData({type:"Function",loc:null,name:"calc",children:o}),{type:"Declaration",loc:null,important:n,property:e,value:{type:"Value",loc:null,children:i}}}createDimension(e,r,n){let a=new V.List;return a.insertData({type:"Dimension",loc:null,value:r.value,unit:r.unit}),{type:"Declaration",loc:null,important:n,property:e,value:{type:"Value",loc:null,children:a}}}createBlock(e){let r=new V.List;return e.forEach(n=>{r.insertData(n)}),{type:"Block",loc:null,children:r}}createRule(e,r){let n=new V.List;return n.insertData({type:"Selector",children:e}),Array.isArray(r)&&(r=this.createBlock(r)),{type:"Rule",prelude:{type:"SelectorList",children:n},block:r}}}class ox extends Se{constructor(e,r,n){super(e,r,n),this.breaks={}}onDeclaration(e,r,n,a){let i=e.property;if(i==="page"){let s=e.value.children.first().name,l=V.generate(a.ruleNode.prelude),d={property:i,value:s,selector:l,name:s};l.split(",").forEach(u=>{this.breaks[u]?this.breaks[u].push(d):this.breaks[u]=[d]}),n.remove(r)}if(i==="break-before"||i==="break-after"||i==="page-break-before"||i==="page-break-after"){let s=e.value.children.first().name,l=V.generate(a.ruleNode.prelude);i==="page-break-before"?i="break-before":i==="page-break-after"&&(i="break-after");let c={property:i,value:s,selector:l};l.split(",").forEach(d=>{this.breaks[d]?this.breaks[d].push(c):this.breaks[d]=[c]}),n.remove(r)}}afterParsed(e){this.processBreaks(e,this.breaks)}processBreaks(e,r){for(let a in r){let i=e.querySelectorAll(a);for(var n=0;n<i.length;n++)for(let o of r[a])if(o.property==="break-after"){let s=Nc(i[n],e);i[n].setAttribute("data-break-after",o.value),s&&s.setAttribute("data-previous-break-after",o.value)}else if(o.property==="break-before"){let s=Dy(i[n],e);if(s){if(o.value==="page"&&Dc(i[n],s))continue;i[n].setAttribute("data-break-before",o.value),s.setAttribute("data-next-break-before",o.value)}}else if(o.property==="page"){i[n].setAttribute("data-page",o.value);let s=Nc(i[n],e);s&&s.setAttribute("data-after-page",o.value)}else i[n].setAttribute("data-"+o.property,o.value)}}mergeBreaks(e,r){for(let n in r)n in e?e[n]=e[n].concat(r[n]):e[n]=r[n];return e}addBreakAttributes(e,r){let n=e.querySelector("[data-break-before]"),a=e.querySelector("[data-break-after]"),i=e.querySelector("[data-previous-break-after]");n&&(n.dataset.splitFrom?(r.splitFrom=n.dataset.splitFrom,e.setAttribute("data-split-from",n.dataset.splitFrom)):n.dataset.breakBefore&&n.dataset.breakBefore!=="avoid"&&(r.breakBefore=n.dataset.breakBefore,e.setAttribute("data-break-before",n.dataset.breakBefore))),a&&a.dataset&&(a.dataset.splitTo?(r.splitTo=a.dataset.splitTo,e.setAttribute("data-split-to",a.dataset.splitTo)):a.dataset.breakAfter&&a.dataset.breakAfter!=="avoid"&&(r.breakAfter=a.dataset.breakAfter,e.setAttribute("data-break-after",a.dataset.breakAfter))),i&&i.dataset&&i.dataset.previousBreakAfter&&i.dataset.previousBreakAfter!=="avoid"&&(r.previousBreakAfter=i.dataset.previousBreakAfter)}afterPageLayout(e,r){this.addBreakAttributes(e,r)}}class sx extends Se{constructor(e,r,n){super(e,r,n)}onAtMedia(e,r,n){let a=this.getMediaName(e),i;a.includes("print")?(i=e.block.children,n.appendList(i),n.remove(r)):!a.includes("all")&&!a.includes("pagedjs-ignore")&&n.remove(r)}getMediaName(e){let r=[];if(!(typeof e.prelude>"u"||e.prelude.type!=="AtrulePrelude"))return V.walk(e.prelude,{visit:"Identifier",enter:(n,a,i)=>{r.push(n.name)}}),r}}class lx extends Se{constructor(e,r,n){super(e,r,n)}afterPageLayout(e,r,n,a){let i=Array.from(e.querySelectorAll("[data-split-from]")),o=e.parentNode,s=Array.prototype.indexOf.call(o.children,e),l;if(s===0)return;l=o.children[s-1];let c;i.forEach(d=>{let u=d.dataset.ref;c=l.querySelector("[data-ref='"+u+"']:not([data-split-to])"),c&&(c.dataset.splitTo=u,c.dataset.splitFrom||(c.dataset.splitOriginal=!0))}),c&&this.handleAlignment(c)}handleAlignment(e){let r=window.getComputedStyle(e),n=r["text-align"],a=r["text-align-last"];e.dataset.lastSplitElement="true",n==="justify"&&a==="auto"?e.dataset.alignLastSplitElement="justify":e.dataset.alignLastSplitElement=a}}class cx extends Se{constructor(e,r,n){super(e,r,n),this.styleSheet=r.styleSheet,this.counters={},this.resetCountersMap=new Map}onDeclaration(e,r,n,a){let i=e.property;if(i==="counter-increment"){this.handleIncrement(e,a);let o=!1;e.value.children.forEach(s=>{s.type&&s.type!=="WhiteSpace"&&(o=!0)}),o||n.remove(r)}else if(i==="counter-reset"){this.handleReset(e,a);let o=!1;e.value.children.forEach(s=>{s.type&&s.type!=="WhiteSpace"&&(o=!0)}),o||n.remove(r)}}afterParsed(e){this.processCounters(e,this.counters),this.scopeCounters(this.counters)}addCounter(e){return e in this.counters?this.counters[e]:(this.counters[e]={name:e,increments:{},resets:{}},this.counters[e])}handleIncrement(e,r){let n=[],a=e.value.children;return a.forEach((i,o)=>{if(i.type&&i.type==="Identifier"){let s=i.name;if(s==="page"||s.indexOf("target-counter-")===0)return;let l,c,d;o.next&&o.next.data.type==="WhiteSpace"&&(l=o.next),l&&l.next&&l.next.data.type==="Number"&&(c=l.next,d=parseInt(c.data.value));let u=V.generate(r.ruleNode.prelude),p;s in this.counters?p=this.counters[s]:p=this.addCounter(s);let f={selector:u,number:d||1};p.increments[u]=f,n.push(f),a.remove(o),l&&a.remove(l),c&&a.remove(c)}}),n}handleReset(e,r){let n=e.value.children;n.forEach((a,i)=>{if(a.type&&a.type==="Identifier"){let o=a.name,s,l,c;i.next&&i.next.data.type==="WhiteSpace"&&(s=i.next),s&&s.next&&(s.next.data.type==="Number"?(l=s.next,c=parseInt(l.data.value)):s.next.data.type==="Function"&&s.next.data.name==="var"&&(l=s.next,c=s.next.data.children.head.data.name));let d,u,p=r.ruleNode.prelude;r.ruleNode.type==="Atrule"&&r.ruleNode.name==="page"?u=".pagedjs_page":u=V.generate(p||r.ruleNode),o==="footnote"&&this.addFootnoteMarkerCounter(e.value.children),o in this.counters?d=this.counters[o]:d=this.addCounter(o);let f={selector:u,number:c||0};d.resets[u]=f,u!==".pagedjs_page"&&(n.remove(i),s&&n.remove(s),l&&n.remove(l))}})}processCounters(e,r){let n;for(let a in r)n=this.counters[a],this.processCounterIncrements(e,n),this.processCounterResets(e,n),a!=="page"&&this.addCounterValues(e,n)}scopeCounters(e){let r=[];for(let n in e)n!=="page"&&r.push(`${e[n].name} 0`);this.insertRule(`.pagedjs_pages { counter-reset: ${r.join(" ")} page 0 pages var(--pagedjs-page-count) footnote var(--pagedjs-footnotes-count) footnote-marker var(--pagedjs-footnotes-count)}`)}insertRule(e){this.styleSheet.insertRule(e,this.styleSheet.cssRules.length)}processCounterIncrements(e,r){let n;for(let a in r.increments){n=r.increments[a];let i=e.querySelectorAll(n.selector);for(let o=0;o<i.length;o++)i[o].setAttribute("data-counter-"+r.name+"-increment",n.number),i[o].getAttribute("data-counter-increment")?i[o].setAttribute("data-counter-increment",i[o].getAttribute("data-counter-increment")+" "+r.name):i[o].setAttribute("data-counter-increment",r.name)}}processCounterResets(e,r){let n;for(let i in r.resets){n=r.resets[i];let o=e.querySelectorAll(n.selector);for(var a=0;a<o.length;a++){let s=n.number;typeof s=="string"&&s.startsWith("--")&&(s=o[a].style.getPropertyValue(s)||0),o[a].setAttribute("data-counter-"+r.name+"-reset",s),o[a].getAttribute("data-counter-reset")?o[a].setAttribute("data-counter-reset",o[a].getAttribute("data-counter-reset")+" "+r.name):o[a].setAttribute("data-counter-reset",r.name)}}}addCounterValues(e,r){let n=r.name;if(n==="page"||n==="footnote")return;let a=e.querySelectorAll("[data-counter-"+n+"-reset], [data-counter-"+n+"-increment]"),i=0,o,s,l,c,d,u,p;for(let f=0;f<a.length;f++)o=a[f],u=0,p=[],o.hasAttribute("data-counter-"+n+"-reset")&&(l=o.getAttribute("data-counter-"+n+"-reset"),c=parseInt(l),u=c-i,p.push(`${n} ${u}`),i=c),o.hasAttribute("data-counter-"+n+"-increment")&&(s=o.getAttribute("data-counter-"+n+"-increment"),d=parseInt(s),i+=d,o.setAttribute("data-counter-"+n+"-value",i),p.push(`${n} ${d}`)),p.length>0&&this.incrementCounterForElement(o,p)}addFootnoteMarkerCounter(e){let r=[];V.walk(e,{visit:"Identifier",enter:(n,a,i)=>{r.push(n.name)}}),!r.includes("footnote-maker")&&(e.insertData({type:"WhiteSpace",value:" "}),e.insertData({type:"Identifier",name:"footnote-marker"}),e.insertData({type:"WhiteSpace",value:" "}),e.insertData({type:"Number",value:0}))}incrementCounterForElement(e,r){if(!e||!r||r.length===0)return;const n=e.dataset.ref,a=Array.from(this.styleSheet.cssRules).filter(o=>o.selectorText===`[data-ref="${e.dataset.ref}"]:not([data-split-from])`&&o.style[0]==="counter-increment").map(o=>o.style.counterIncrement);a.push(this.mergeIncrements(r,(o,s)=>(parseInt(o)||0)+(parseInt(s)||0)));const i=this.mergeIncrements(a,(o,s)=>s);this.insertRule(`[data-ref="${n}"]:not([data-split-from]) { counter-increment: ${i} }`)}mergeIncrements(e,r){const n={};return e.forEach(a=>{let i=a.split(" ");for(let o=0;o<i.length;o+=2)n[i[o]]=r(n[i[o]],i[o+1])}),Object.entries(n).map(([a,i])=>`${a} ${i}`).join(" ")}afterPageLayout(e,r){let n=[];e.querySelectorAll("[data-counter-page-reset]:not([data-split-from])").forEach(o=>{const s=o.dataset&&o.dataset.ref;if(!(s&&this.resetCountersMap.has(s))){s&&this.resetCountersMap.set(s,"");let l=o.dataset.counterPageReset;n.push(`page ${l}`)}}),e.querySelectorAll("[data-counter-footnote-reset]:not([data-split-from])").forEach(o=>{let s=o.dataset.counterFootnoteReset;n.push(`footnote ${s}`),n.push(`footnote-marker ${s}`)}),n.length&&this.styleSheet.insertRule(`[data-page-number="${e.dataset.pageNumber}"] { counter-increment: none; counter-reset: ${n.join(" ")} }`,this.styleSheet.cssRules.length)}}class dx extends Se{constructor(e,r,n){super(e,r,n)}afterParsed(e){const r=e.querySelectorAll("ol");for(var n of r)this.addDataNumbers(n)}afterPageLayout(e,r,n,a){var i=e.getElementsByTagName("ol");for(var o of i)o.firstElementChild&&(o.start=o.firstElementChild.dataset.itemNum)}addDataNumbers(e){let r=1;e.hasAttribute("start")&&(r=parseInt(e.getAttribute("start"),10),isNaN(r)&&(r=1));let n=e.children;for(var a=0;a<n.length;a++)n[a].setAttribute("data-item-num",a+r)}}class ux extends Se{constructor(e,r,n){super(e,r,n),this.styleSheet=r.styleSheet,this.fixedElementsSelector=[],this.fixedElements=[]}onDeclaration(e,r,n,a){if(e.property==="position"&&e.value.children.first().name==="fixed"){let i=V.generate(a.ruleNode.prelude);this.fixedElementsSelector.push(i),n.remove(r)}}afterParsed(e){this.fixedElementsSelector.forEach(r=>{e.querySelectorAll(`${r}`).forEach(n=>{n.style.setProperty("position","absolute"),this.fixedElements.push(n),n.remove()})})}afterPageLayout(e,r,n){this.fixedElements.forEach(a=>{const i=a.cloneNode(!0);e.querySelector(".pagedjs_pagebox").insertAdjacentElement("afterbegin",i)})}}class px extends Se{constructor(e,r,n){super(e,r,n),this.styleSheet=r.styleSheet,this.pageCounter={name:"page",increments:{},resets:{}}}onDeclaration(e,r,n,a){e.property==="counter-increment"&&this.handleIncrement(e,a)&&n.remove(r)}afterParsed(e){for(const r in this.pageCounter.increments){const n=this.pageCounter.increments[r];this.insertRule(`${n.selector} { --pagedjs-page-counter-increment: ${n.number} }`)}}handleIncrement(e,r){const n=e.value.children.first(),a=e.value.children.getSize()>1?e.value.children.last().value:1,i=n&&n.name;if(i&&i.indexOf("target-counter-")===0||i!=="page"||r.ruleNode.name==="page"&&r.ruleNode.type==="Atrule")return;const o=V.generate(r.ruleNode.prelude);return this.pageCounter.increments[o]={selector:o,number:a}}insertRule(e){this.styleSheet.insertRule(e,this.styleSheet.cssRules.length)}}class fx extends Se{constructor(e,r,n){super(e,r,n),this.styleSheet=r.styleSheet,this.selectors={}}onRule(e,r,n){let a=V.generate(e.prelude);if(a.match(/:(first|last|nth)-of-type/)){let i=V.generate(e.block);i=i.replace(/[{}]/g,"");let o="nth-of-type-"+st();a.split(",").forEach(s=>{this.selectors[s]?this.selectors[s][1]=`${this.selectors[s][1]};${i}`:this.selectors[s]=[o,i]}),n.remove(r)}}afterParsed(e){this.processSelectors(e,this.selectors)}processSelectors(e,r){for(let a in r){let i=e.querySelectorAll(a);for(var n=0;n<i.length;n++){let s=i[n].getAttribute("data-nth-of-type");s&&s!=""?(s=`${s},${r[a][0]}`,i[n].setAttribute("data-nth-of-type",s)):i[n].setAttribute("data-nth-of-type",r[a][0])}let o=`*[data-nth-of-type*='${r[a][0]}'] { ${r[a][1]}; }`;this.styleSheet.insertRule(o,this.styleSheet.cssRules.length)}}}class mx extends Se{constructor(e,r,n){super(e,r,n),this.styleSheet=r.styleSheet,this.selectors={}}onRule(e,r,n){let a=V.generate(e.prelude);if(a.match(/\+/)){let i=V.generate(e.block);i=i.replace(/[{}]/g,"");let o="following-"+st();a.split(",").forEach(s=>{this.selectors[s]?this.selectors[s][1]=`${this.selectors[s][1]};${i}`:this.selectors[s]=[o,i]}),n.remove(r)}}afterParsed(e){this.processSelectors(e,this.selectors)}processSelectors(e,r){for(let a in r){let i=e.querySelectorAll(a);for(var n=0;n<i.length;n++){let s=i[n].getAttribute("data-following");s&&s!=""?(s=`${s},${r[a][0]}`,i[n].setAttribute("data-following",s)):i[n].setAttribute("data-following",r[a][0])}let o=`*[data-following*='${r[a][0]}'] { ${r[a][1]}; }`;this.styleSheet.insertRule(o,this.styleSheet.cssRules.length)}}}class hx extends Se{constructor(e,r,n){super(e,r,n),this.footnotes={},this.needsLayout=[]}onDeclaration(e,r,n,a){let i=e.property;if(i==="float"){let o=e.value.children&&e.value.children.first();if((o&&o.name)==="footnote"){let l=V.generate(a.ruleNode.prelude);this.footnotes[l]={selector:l,policy:"auto",display:"block"},n.remove(r)}}if(i==="footnote-policy"){let o=e.value.children&&e.value.children.first(),s=o&&o.name;if(s){let l=V.generate(a.ruleNode.prelude),c=this.footnotes[l];c&&(c.policy=s)}}if(i==="footnote-display"){let o=e.value.children&&e.value.children.first(),s=o&&o.name,l=V.generate(a.ruleNode.prelude);if(s&&this.footnotes[l]){let c=this.footnotes[l];c&&(c.display=s)}}}onPseudoSelector(e,r,n,a,i){let o=e.name;if(o==="footnote-marker"){let s=i.ruleNode.prelude,l=new V.List;s.children.first().children.each(c=>{c.type!=="PseudoElementSelector"&&l.appendData(c)}),l.appendData({type:"AttributeSelector",name:{type:"Identifier",name:"data-footnote-marker"},flags:null,loc:null,matcher:null,value:null}),l.appendData({type:"PseudoElementSelector",name:"marker",loc:null,children:null}),s.children.first().children=l}if(o==="footnote-call"){let s=i.ruleNode.prelude,l=new V.List;s.children.first().children.each(c=>{c.type!=="PseudoElementSelector"&&l.appendData(c)}),l.appendData({type:"AttributeSelector",name:{type:"Identifier",name:"data-footnote-call"},flags:null,loc:null,matcher:null,value:null}),l.appendData({type:"PseudoElementSelector",name:"after",loc:null,children:null}),s.children.first().children=l}}afterParsed(e){this.processFootnotes(e,this.footnotes)}processFootnotes(e,r){for(let a in r){let i=e.querySelectorAll(a),o,s=r[a];for(var n=0;n<i.length;n++)o=i[n],o.setAttribute("data-note","footnote"),o.setAttribute("data-break-before","avoid"),o.setAttribute("data-note-policy",s.policy||"auto"),o.setAttribute("data-note-display",s.display||"block"),this.processFootnoteContainer(o)}}processFootnoteContainer(e){let r=e.parentElement,n=r;for(;r;){if(zc(r)){n.setAttribute("data-has-notes","true");break}n=r,r=r.parentElement,r||n.setAttribute("data-has-notes","true")}}renderNode(e){if(e.nodeType==1){let r;if(!e.dataset)return;e.dataset.note==="footnote"?r=[e]:(e.dataset.hasNotes||e.querySelectorAll("[data-note='footnote']"))&&(r=e.querySelectorAll("[data-note='footnote']")),r&&r.length&&this.findVisibleFootnotes(r,e)}}findVisibleFootnotes(e,r){let n,a,i;n=r.closest(".pagedjs_page_content"),a=n.getBoundingClientRect(),i=a.left+a.width;for(let o=0;o<e.length;++o){let s=e[o];s.getBoundingClientRect().left<i&&this.moveFootnote(s,r.closest(".pagedjs_area"),!0)}}moveFootnote(e,r,n){let a=r.querySelector(".pagedjs_footnote_area"),i=a.querySelector(".pagedjs_footnote_content"),o=i.querySelector(".pagedjs_footnote_inner_content");if(!We(e))return;let s;if(n&&(s=this.createFootnoteCall(e)),e.removeAttribute("data-break-before"),o.querySelector(`[data-ref="${e.dataset.ref}"]`)){e.remove();return}o.appendChild(e),i.classList.contains("pagedjs_footnote_empty")&&i.classList.remove("pagedjs_footnote_empty"),e.dataset.footnoteMarker=e.dataset.ref,e.id=`note-${e.dataset.ref}`;let c=i.scrollHeight,u=r.querySelector(".pagedjs_page_content").getBoundingClientRect(),p=u.left+u.width,f=s&&s.getBoundingClientRect(),v=a.getBoundingClientRect(),m=this.marginsHeight(i),g=this.paddingHeight(i),w=this.borderHeight(i),x=m+g+w,h=Math.floor(v.top);v.height===0&&(h-=this.marginsHeight(i,!1),h-=this.paddingHeight(i,!1),h-=this.borderHeight(i,!1));let b=e.dataset.notePolicy,S=0,E=0;if(s){let I=s.previousSibling,N=new Range;I?N.setStartBefore(I):N.setStartBefore(s),N.setEndAfter(s);let D=N.getBoundingClientRect();if(S=D.bottom,!b||b==="auto")E=Math.ceil(D.bottom);else if(b==="line")E=Math.ceil(D.top);else if(b==="block"){let j=s.closest("p").previousElementSibling;j?E=Math.ceil(j.getBoundingClientRect().bottom):E=Math.ceil(D.bottom)}}let k=c+x-v.height,C=S?h-S:0,_=S?Math.floor(v.top)-E:0,A=a.querySelector("[data-note='footnote']");if(n&&f.left>p)e.remove();else if(!A&&n&&x>C){r.style.setProperty("--pagedjs-footnotes-height","0px");let I=document.createElement("div");I.appendChild(e),this.needsLayout.push(I)}else n?S<v.top-k?r.style.setProperty("--pagedjs-footnotes-height",`${c+m+w}px`):(r.style.setProperty("--pagedjs-footnotes-height",`${v.height+_}px`),o.style.height=v.height+_-x+"px"):r.style.setProperty("--pagedjs-footnotes-height",`${c+x}px`)}createFootnoteCall(e){let r=e.parentElement,n=document.createElement("a");for(const a of e.classList)n.classList.add(`${a}`);return n.dataset.footnoteCall=e.dataset.ref,n.dataset.ref=e.dataset.ref,n.dataset.dataCounterFootnoteIncrement=1,n.href=`#note-${e.dataset.ref}`,r.insertBefore(n,e),n}afterPageLayout(e,r,n,a){let i=e.querySelector(".pagedjs_area"),o=r.footnotesArea,s=o.querySelector(".pagedjs_footnote_content"),l=o.querySelector(".pagedjs_footnote_inner_content"),c=s.getBoundingClientRect(),{width:d}=c;l.style.columnWidth=Math.round(d)+"px",l.style.columnGap="calc(var(--pagedjs-margin-right) + var(--pagedjs-margin-left))";let p=new Va(o,void 0,a.settings).findOverflow(l,c);if(p){let{startContainer:f,startOffset:v}=p,m;if(We(f)){let E=f.childNodes[v];m=We(E)&&E.hasAttribute("data-footnote-marker")}let g=p.extractContents();if(!m){let E=g.firstElementChild;E.dataset.splitFrom=E.dataset.ref,this.handleAlignment(l.lastElementChild)}this.needsLayout.push(g),s.style.removeProperty("height"),l.style.removeProperty("height");let w=l.getBoundingClientRect(),{height:x}=w,h=this.marginsHeight(s),b=this.paddingHeight(s),S=this.borderHeight(s);if(i.style.setProperty("--pagedjs-footnotes-height",`${x+h+S+b}px`),l.childNodes.length===0&&s.classList.add("pagedjs_footnote_empty"),!n)a.clonePage(r);else{let E,k;n.node&&typeof n.node.dataset<"u"&&typeof n.node.dataset.previousBreakAfter<"u"&&(k=n.node.dataset.previousBreakAfter),n.node&&typeof n.node.dataset<"u"&&typeof n.node.dataset.breakBefore<"u"&&(E=n.node.dataset.breakBefore),(E||k)&&a.clonePage(r)}}l.style.height="auto"}handleAlignment(e){let n=window.getComputedStyle(e)["text-align-last"];e.dataset.lastSplitElement="true",n==="auto"?e.dataset.alignLastSplitElement="justify":e.dataset.alignLastSplitElement=n}beforePageLayout(e){for(;this.needsLayout.length;){let r=this.needsLayout.shift();Array.from(r.childNodes).forEach(n=>{this.moveFootnote(n,e.element.querySelector(".pagedjs_area"),!1)})}}afterOverflowRemoved(e,r){let n=r.closest(".pagedjs_area"),a=n.querySelectorAll(".pagedjs_footnote_area [data-note='footnote']");for(let o=0;o<a.length;o++){const s=a[o];e.querySelector(`[data-footnote-call="${s.dataset.ref}"]`)&&s.remove()}let i=n.querySelector(".pagedjs_footnote_inner_content");i&&i.childNodes.length===0&&i.parentElement.classList.add("pagedjs_footnote_empty")}marginsHeight(e,r=!0){let n=window.getComputedStyle(e),a=parseInt(n.marginTop),i=parseInt(n.marginBottom),o=0;return a&&(o+=a),i&&r&&(o+=i),o}paddingHeight(e,r=!0){let n=window.getComputedStyle(e),a=parseInt(n.paddingTop),i=parseInt(n.paddingBottom),o=0;return a&&(o+=a),i&&r&&(o+=i),o}borderHeight(e,r=!0){let n=window.getComputedStyle(e),a=parseInt(n.borderTop),i=parseInt(n.borderBottom),o=0;return a&&(o+=a),i&&r&&(o+=i),o}}const gx=[sx,ix,ox,lx,cx,dx,ux,px,fx,mx,hx];class vx extends Se{constructor(e,r,n){super(e,r,n),this.runningSelectors={},this.elements={}}onDeclaration(e,r,n,a){if(e.property==="position"){let i=V.generate(a.ruleNode.prelude),o=e.value.children.first().name;if(o==="running"){let s;V.walk(e,{visit:"Function",enter:(l,c,d)=>{s=l.children.first().name}}),this.runningSelectors[s]={identifier:o,value:s,selector:i}}}e.property==="content"&&V.walk(e,{visit:"Function",enter:(i,o,s)=>{if(i.name.indexOf("element")>-1){let l=V.generate(a.ruleNode.prelude),c=i.name,d=i.children.first().name,u=[d],p="first";l.split(",").forEach(f=>{f=f.replace(/::after|::before/,""),this.elements[f]={func:c,args:u,value:d,style:p,selector:f,fullSelector:l}})}}})}afterParsed(e){for(let r of Object.keys(this.runningSelectors)){let n=this.runningSelectors[r],a=Array.from(e.querySelectorAll(n.selector));if(n.identifier==="running")for(let i of a)i.style.display="none"}}afterPageLayout(e){for(let r of Object.keys(this.runningSelectors)){let n=this.runningSelectors[r],a=e.querySelector(n.selector);a&&(n.identifier==="running"?n.first=a:console.warn(n.value+"needs css replacement"))}this.orderedSelectors||(this.orderedSelectors=this.orderSelectors(this.elements));for(let r of this.orderedSelectors)if(r){let n=this.elements[r],a=e.querySelector(r);if(a){let i=this.runningSelectors[n.args[0]];if(i&&i.first){a.innerHTML="";let o=i.first.cloneNode(!0);o.style.display=null,a.appendChild(o)}}}}pageWeight(e){let r=1,n=e.split(" "),a=n.length&&n[0].split(".");switch(a.shift(),a.length){case 4:/^pagedjs_[\w-]+_first_page$/.test(a[3])?r=7:(a[3]==="pagedjs_left_page"||a[3]==="pagedjs_right_page")&&(r=6);break;case 3:a[1]==="pagedjs_named_page"&&(a[2].indexOf(":nth-of-type")>-1?r=7:r=5);break;case 2:a[1]==="pagedjs_first_page"?r=4:a[1]==="pagedjs_blank_page"?r=3:(a[1]==="pagedjs_left_page"||a[1]==="pagedjs_right_page")&&(r=2);break;default:a[0].indexOf(":nth-of-type")>-1?r=4:r=1}return r}orderSelectors(e){let r=Object.keys(e),n={1:[],2:[],3:[],4:[],5:[],6:[],7:[]},a=[];for(let o of r){let s=this.pageWeight(o);n[s].unshift(o)}for(var i=1;i<=7;i++)a=a.concat(n[i]);return a}beforeTreeParse(e,r){r.text=e.replace(/element[\s]*\(([^|^#)]*)\)/g,"element-ident($1)")}}function Yt(t,e=`"' `){if(t!=null)return t.replace(new RegExp(`^[${e}]+`),"").replace(new RegExp(`[${e}]+$`),"").replace(/["']/g,r=>"\\"+r).replace(/[\n]/g,r=>"\\00000A")}function yx(t){if(t!=null)return t.replace(new RegExp("::footnote-call","g"),"").replace(new RegExp("::footnote-marker","g"),"")}class bx extends Se{constructor(e,r,n){super(e,r,n),this.stringSetSelectors={},this.type,this.pageLastString}onDeclaration(e,r,n,a){if(e.property==="string-set"){let i=V.generate(a.ruleNode.prelude),o=[],s=[],l=[];e.value.children.forEach(c=>{c.type==="Identifier"&&o.push(c.name),c.type==="Function"&&(s.push(c.name),c.children.forEach(d=>{d.type==="Identifier"&&l.push(d.name)}))}),o.forEach((c,d)=>{let u=s[d],p=l[d];this.stringSetSelectors[c]={identifier:c,func:u,value:p,selector:i}})}}onContent(e,r,n,a,i){if(e.name==="string"){let o=e.children&&e.children.first().name;this.type=e.children.last().name,e.name="var",e.children=new V.List,this.type==="first"||this.type==="last"||this.type==="start"||this.type==="first-except"?e.children.append(e.children.createItem({type:"Identifier",loc:null,name:"--pagedjs-string-"+this.type+"-"+o})):e.children.append(e.children.createItem({type:"Identifier",loc:null,name:"--pagedjs-string-first-"+o}))}}afterPageLayout(e){this.pageLastString===void 0&&(this.pageLastString={});for(let r of Object.keys(this.stringSetSelectors)){let n=this.stringSetSelectors[r],a=n.value,i=n.func,o=e.querySelectorAll(n.selector),s=r in this.pageLastString?this.pageLastString[r]:"",l,c,d,u;if(o.length==0)l=s,c=s,d=s,u=s;else{o.forEach(m=>{i==="content"&&(this.pageLastString[r]=o[o.length-1].textContent),i==="attr"&&(this.pageLastString[r]=o[o.length-1].getAttribute(a)||"")}),i==="content"&&(l=o[0].textContent),i==="attr"&&(l=o[0].getAttribute(a)||""),i==="content"&&(c=o[o.length-1].textContent),i==="attr"&&(c=o[o.length-1].getAttribute(a)||"");let p=o[0].getBoundingClientRect().top,v=o[0].closest(".pagedjs_page_content").getBoundingClientRect().top;p==v?d=l:d=s,u=""}e.style.setProperty(`--pagedjs-string-first-${r}`,`"${Yt(l)}`),e.style.setProperty(`--pagedjs-string-last-${r}`,`"${Yt(c)}`),e.style.setProperty(`--pagedjs-string-start-${r}`,`"${Yt(d)}`),e.style.setProperty(`--pagedjs-string-first-except-${r}`,`"${Yt(u)}`)}}}class Sx extends Se{constructor(e,r,n){super(e,r,n),this.styleSheet=r.styleSheet,this.counterTargets={}}onContent(e,r,n,a,i){if(e.name==="target-counter"){let o=V.generate(i.ruleNode.prelude),s=e.children.first(),l=s.name,c=V.generate(e),d=[];s.children.forEach(m=>{m.type==="Identifier"&&d.push(m.name)});let u,p,f;e.children.forEach(m=>{m.type==="Identifier"&&(u?p||(f=V.clone(m),p=m.name):u=m.name)});let v="target-counter-"+st();o.split(",").forEach(m=>{this.counterTargets[m]={func:l,args:d,value:c,counter:u,style:p,selector:m,fullSelector:o,variable:v}}),e.name="counter",e.children=new V.List,e.children.appendData({type:"Identifier",loc:0,name:v}),f&&(e.children.appendData({type:"Operator",loc:null,value:","}),e.children.appendData(f))}}afterPageLayout(e,r,n,a){Object.keys(this.counterTargets).forEach(i=>{let o=this.counterTargets[i],s=o.selector.split(/::?/g),l=s[0];a.pagesArea.querySelectorAll(l+":not([data-"+o.variable+"])").forEach((d,u)=>{if(o.func!=="attr")return;let p=_c(d,o.args),f=a.pagesArea.querySelector(Oc(p));if(f){let v=st();d.setAttribute("data-"+o.variable,v);let m="";if(s.length>1&&(m+="::"+s[1]),o.counter==="page"){let w=a.pagesArea.querySelectorAll(".pagedjs_page"),x=0;for(let h=0;h<w.length;h++){let b=w[h],S=window.getComputedStyle(b),E=S["counter-reset"].replace("page","").trim(),k=S["counter-increment"].replace("page","").trim();if(E!=="none"&&(x=parseInt(E)),k!=="none"&&(x+=parseInt(k)),b.contains(f))break}this.styleSheet.insertRule(`[data-${o.variable}="${v}"]${m} { counter-reset: ${o.variable} ${x}; }`,this.styleSheet.cssRules.length)}else{let w=f.getAttribute(`data-counter-${o.counter}-value`);w&&this.styleSheet.insertRule(`[data-${o.variable}="${v}"]${m} { counter-reset: ${o.variable} ${o.variable} ${parseInt(w)}; }`,this.styleSheet.cssRules.length)}let g=document.querySelector(`[data-${o.variable}="${v}"]`);g&&(g.style.display="none",g.clientHeight,g.style.removeProperty("display"))}})})}}class xx extends Se{constructor(e,r,n){super(e,r,n),this.styleSheet=r.styleSheet,this.textTargets={},this.beforeContent="",this.afterContent="",this.selector={}}onContent(e,r,n,a,i){if(e.name==="target-text"){this.selector=V.generate(i.ruleNode.prelude);let o=e.children.first(),s=e.children.last(),l=o.name,c=V.generate(e),d=[];o.children.forEach(f=>{f.type==="Identifier"&&d.push(f.name)});let u;s!==o&&(u=s.name);let p="--pagedjs-"+st();this.selector.split(",").forEach(f=>{this.textTargets[f]={func:l,args:d,value:c,style:u||"content",selector:f,fullSelector:this.selector,variable:p}}),e.name="var",e.children=new V.List,e.children.appendData({type:"Identifier",loc:0,name:p})}}onPseudoSelector(e,r,n,a,i){i.ruleNode.block.children.forEach(o=>{e.name==="before"&&o.property==="content"?o.value.children.forEach(l=>{l.type==="String"&&(this.beforeContent=l.value)}):e.name==="after"&&o.property==="content"&&o.value.children.forEach(s=>{s.type==="String"&&(this.afterContent=s.value)})})}afterParsed(e){Object.keys(this.textTargets).forEach(r=>{let n=this.textTargets[r],a=n.selector.split("::"),i=a[0],o=e.querySelectorAll(i),s;o.forEach((l,c)=>{let d=_c(l,n.args),u=e.querySelector(Oc(d));if(u)if(n.style){this.selector=st(),l.setAttribute("data-target-text",this.selector);let p="";if(a.length>1&&(p+="::"+a[1]),n.style==="before"||n.style==="after"){const f=`${n.style}Content`;s=Yt(this[f])}else s=Yt(u.textContent," ");s=n.style==="first-letter"?s.charAt(0):s,this.styleSheet.insertRule(`[data-target-text="${this.selector}"]${p} { ${n.variable}: "${s}" }`)}else console.warn("missed target",d)})})}}const wx=[vx,bx,Sx,xx];class Cx extends Se{constructor(e,r,n){super(e,r,n)}filter(e){Wc(e,r=>this.filterEmpty(r),NodeFilter.SHOW_TEXT)}filterEmpty(e){if(e.textContent.length>1&&Qr(e)){let r=e.parentNode;if(We(r)&&r.closest("pre"))return NodeFilter.FILTER_REJECT;const a=Sa(e),i=wa(e);return i===null&&a===null?(e.textContent=" ",NodeFilter.FILTER_REJECT):i===null||a===null?NodeFilter.FILTER_ACCEPT:(e.textContent=" ",NodeFilter.FILTER_REJECT)}else return NodeFilter.FILTER_REJECT}}class kx extends Se{constructor(e,r,n){super(e,r,n)}filter(e){Wc(e,null,NodeFilter.SHOW_COMMENT)}}class Ex extends Se{constructor(e,r,n){super(e,r,n)}filter(e){e.querySelectorAll("script").forEach(r=>{r.remove()})}}var os={},Np;function Tx(){return Np||(Np=1,(function(t){var e=/(\[[^\]]+\])/g,r=/(#[^\s\+>~\.\[:]+)/g,n=/(\.[^\s\+>~\.\[:]+)/g,a=/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/g,i=/(:[^\s\+>~\.\[:]+)/g,o=/([^\s\+>~\.\[:]+)/g,s=/:not\(([^\)]*)\)/g,l=/\{[^]*/gm,c=/[\*\s\+>~]/g,d=/[#\.]/g,u=function(g,w,x,h){var b=h.match(g);if(b)for(var S=0;S<b.length;S++)x[w]++,h=h.replace(b[S]," ");return h},p=function(g){var w=g.indexOf(",");w!==-1&&(g=g.substring(0,w));var x={a:0,b:0,c:0};return g=g.replace(s," $1 "),g=g.replace(l," "),g=u(e,"b",x,g),g=u(r,"a",x,g),g=u(n,"b",x,g),g=u(a,"c",x,g),g=u(i,"b",x,g),g=g.replace(c," "),g=g.replace(d," "),u(o,"c",x,g),x.a*100+x.b*10+x.c*1},f={};t.calculateSpecificity=function(g){var w=f[g];return w===void 0&&(w=p(g),f[g]=w),w};var v={},m=null;t.isSelectorValid=function(g){var w=v[g];if(w===void 0){m==null&&(m=document.createElement("div"));try{m.querySelector(g),w=!0}catch{w=!1}v[g]=w}return w},t.validateSelector=function(g){if(!t.isSelectorValid(g)){var w=new SyntaxError(g+" is not a valid selector");throw w.code="EBADSELECTOR",w}}})(os)),os}var Ax=Tx();class _x extends Se{constructor(e,r,n){super(e,r,n),this.displayRules={}}onDeclaration(e,r,n,a){if(e.property==="display"){let i=V.generate(a.ruleNode.prelude),o=e.value.children.first().name;i.split(",").forEach(s=>{this.displayRules[s]={value:o,selector:s,specificity:Ax.calculateSpecificity(s),important:e.important}})}}filter(e){let{matches:r,selectors:n}=this.sortDisplayedSelectors(e,this.displayRules);for(let i=0;i<r.length;i++){let o=r[i],s=n[i],l=s[s.length-1].value;this.removable(o)&&l==="none"&&(o.dataset.undisplayed="undisplayed")}let a=e.querySelectorAll("[style]");for(let i=0;i<a.length;i++){let o=a[i];this.removable(o)&&(o.dataset.undisplayed="undisplayed")}}sorter(e,r){return e.important&&!r.important?1:r.important&&!e.important?-1:e.specificity-r.specificity}sortDisplayedSelectors(e,r=[]){let n=[],a=[];for(let i in r){let o=r[i],s=o.selector,l=[];try{try{l=e.querySelectorAll(s)}catch{l=e.querySelectorAll(yx(s))}}catch{l=[]}let c=Array.from(l);for(let d of c)if(n.includes(d)){let u=n.indexOf(d);a[u].push(o),a[u]=a[u].sort(this.sorter)}else n.push(d),a.push([o])}return{matches:n,selectors:a}}removable(e){return!(e.style&&e.style.display!==""&&e.style.display!=="none")}}const Ox=[Cx,kx,Ex,_x];var ss,Mp;function Px(){return Mp||(Mp=1,ss=function(){var t=Array.from,e,r;return typeof t!="function"?!1:(e=["raz","dwa"],r=t(e),!!(r&&r!==e&&r[1]==="dwa"))}),ss}var ls,Dp;function Ix(){return Dp||(Dp=1,ls=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}),ls}var cs,zp;function Nx(){if(zp)return cs;zp=1;var t=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};return cs=(function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return t()}try{return __global__||t()}finally{delete Object.prototype.__global__}})(),cs}var ds,Lp;function sn(){return Lp||(Lp=1,ds=Ix()()?globalThis:Nx()),ds}var us,jp;function Mx(){if(jp)return us;jp=1;var t=sn(),e={object:!0,symbol:!0};return us=function(){var r=t.Symbol,n;if(typeof r!="function")return!1;n=r("test symbol");try{String(n)}catch{return!1}return!(!e[typeof r.iterator]||!e[typeof r.toPrimitive]||!e[typeof r.toStringTag])},us}var ps,Wp;function Dx(){return Wp||(Wp=1,ps=function(t){return t?typeof t=="symbol"?!0:!t.constructor||t.constructor.name!=="Symbol"?!1:t[t.constructor.toStringTag]==="Symbol":!1}),ps}var fs,Bp;function qp(){if(Bp)return fs;Bp=1;var t=Dx();return fs=function(e){if(!t(e))throw new TypeError(e+" is not a symbol");return e},fs}var ms,Rp;function zx(){if(Rp)return ms;Rp=1;var t=Ht(),e=Object.create,r=Object.defineProperty,n=Object.prototype,a=e(null);return ms=function(i){for(var o=0,s,l;a[i+(o||"")];)++o;return i+=o||"",a[i]=!0,s="@@"+i,r(n,s,t.gs(null,function(c){l||(l=!0,r(this,s,t(c)),l=!1)})),s},ms}var hs,Fp;function Lx(){if(Fp)return hs;Fp=1;var t=Ht(),e=sn().Symbol;return hs=function(r){return Object.defineProperties(r,{hasInstance:t("",e&&e.hasInstance||r("hasInstance")),isConcatSpreadable:t("",e&&e.isConcatSpreadable||r("isConcatSpreadable")),iterator:t("",e&&e.iterator||r("iterator")),match:t("",e&&e.match||r("match")),replace:t("",e&&e.replace||r("replace")),search:t("",e&&e.search||r("search")),species:t("",e&&e.species||r("species")),split:t("",e&&e.split||r("split")),toPrimitive:t("",e&&e.toPrimitive||r("toPrimitive")),toStringTag:t("",e&&e.toStringTag||r("toStringTag")),unscopables:t("",e&&e.unscopables||r("unscopables"))})},hs}var gs,$p;function jx(){if($p)return gs;$p=1;var t=Ht(),e=qp(),r=Object.create(null);return gs=function(n){return Object.defineProperties(n,{for:t(function(a){return r[a]?r[a]:r[a]=n(String(a))}),keyFor:t(function(a){var i;e(a);for(i in r)if(r[i]===a)return i})})},gs}var vs,Gp;function Wx(){if(Gp)return vs;Gp=1;var t=Ht(),e=qp(),r=sn().Symbol,n=zx(),a=Lx(),i=jx(),o=Object.create,s=Object.defineProperties,l=Object.defineProperty,c,d,u;if(typeof r=="function")try{String(r()),u=!0}catch{}else r=null;return d=function(f){if(this instanceof d)throw new TypeError("Symbol is not a constructor");return c(f)},vs=c=function p(f){var v;if(this instanceof p)throw new TypeError("Symbol is not a constructor");return u?r(f):(v=o(d.prototype),f=f===void 0?"":String(f),s(v,{__description__:t("",f),__name__:t("",n(f))}))},a(c),i(c),s(d.prototype,{constructor:t(c),toString:t("",function(){return this.__name__})}),s(c.prototype,{toString:t(function(){return"Symbol ("+e(this).__description__+")"}),valueOf:t(function(){return e(this)})}),l(c.prototype,c.toPrimitive,t("",function(){var p=e(this);return typeof p=="symbol"?p:p.toString()})),l(c.prototype,c.toStringTag,t("c","Symbol")),l(d.prototype,c.toStringTag,t("c",c.prototype[c.toStringTag])),l(d.prototype,c.toPrimitive,t("c",c.prototype[c.toPrimitive])),vs}var ys,Vp;function Bx(){return Vp||(Vp=1,ys=Mx()()?sn().Symbol:Wx()),ys}var bs,Hp;function qx(){if(Hp)return bs;Hp=1;var t=Object.prototype.toString,e=t.call((function(){return arguments})());return bs=function(r){return t.call(r)===e},bs}var Ss,Up;function Rx(){if(Up)return Ss;Up=1;var t=Object.prototype.toString,e=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);return Ss=function(r){return typeof r=="function"&&e(t.call(r))},Ss}var xs,Kp;function Fx(){return Kp||(Kp=1,xs=function(){var t=Math.sign;return typeof t!="function"?!1:t(10)===1&&t(-20)===-1}),xs}var ws,Yp;function $x(){return Yp||(Yp=1,ws=function(t){return t=Number(t),isNaN(t)||t===0?t:t>0?1:-1}),ws}var Cs,Xp;function Gx(){return Xp||(Xp=1,Cs=Fx()()?Math.sign:$x()),Cs}var ks,Zp;function Vx(){if(Zp)return ks;Zp=1;var t=Gx(),e=Math.abs,r=Math.floor;return ks=function(n){return isNaN(n)?0:(n=Number(n),n===0||!isFinite(n)?n:t(n)*r(e(n)))},ks}var Es,Qp;function Jp(){if(Qp)return Es;Qp=1;var t=Vx(),e=Math.max;return Es=function(r){return e(0,t(r))},Es}var Ts,ef;function Hx(){if(ef)return Ts;ef=1;var t=Object.prototype.toString,e=t.call("");return Ts=function(r){return typeof r=="string"||r&&typeof r=="object"&&(r instanceof String||t.call(r)===e)||!1},Ts}var As,tf;function Ux(){if(tf)return As;tf=1;var t=Bx().iterator,e=qx(),r=Rx(),n=Jp(),a=od(),i=ja(),o=br(),s=Hx(),l=Array.isArray,c=Function.prototype.call,d={configurable:!0,enumerable:!0,writable:!0,value:null},u=Object.defineProperty;return As=function(p){var f=arguments[1],v=arguments[2],m,g,w,x,h,b,S,E,k,C;if(p=Object(i(p)),o(f)&&a(f),!this||this===Array||!r(this)){if(!f){if(e(p))return h=p.length,h!==1?Array.apply(null,p):(x=new Array(1),x[0]=p[0],x);if(l(p)){for(x=new Array(h=p.length),g=0;g<h;++g)x[g]=p[g];return x}}x=[]}else m=this;if(!l(p)){if((k=p[t])!==void 0){for(S=a(k).call(p),m&&(x=new m),E=S.next(),g=0;!E.done;)C=f?c.call(f,v,E.value,g):E.value,m?(d.value=C,u(x,g,d)):x[g]=C,E=S.next(),++g;h=g}else if(s(p)){for(h=p.length,m&&(x=new m),g=0,w=0;g<h;++g)C=p[g],g+1<h&&(b=C.charCodeAt(0),b>=55296&&b<=56319&&(C+=p[++g])),C=f?c.call(f,v,C,w):C,m?(d.value=C,u(x,w,d)):x[w]=C,++w;h=w}}if(h===void 0)for(h=n(p.length),m&&(x=new m(h)),g=0;g<h;++g)C=f?c.call(f,v,p[g],g):p[g],m?(d.value=C,u(x,g,d)):x[g]=C;return m&&(d.value=null,x.length=h),x},As}var _s,rf;function Kx(){return rf||(rf=1,_s=Px()()?Array.from:Ux()),_s}var Os,nf;function Yx(){return nf||(nf=1,Os=function(){var t=Number.isNaN;return typeof t!="function"?!1:!t({})&&t(NaN)&&!t(34)}),Os}var Ps,af;function Xx(){return af||(af=1,Ps=function(t){return t!==t}),Ps}var Is,of;function Zx(){return of||(of=1,Is=Yx()()?Number.isNaN:Xx()),Is}var Ns,sf;function Qx(){if(sf)return Ns;sf=1;var t=Zx(),e=Jp(),r=ja(),n=Array.prototype.indexOf,a=Object.prototype.hasOwnProperty,i=Math.abs,o=Math.floor;return Ns=function(s){var l,c,d,u;if(!t(s))return n.apply(this,arguments);for(c=e(r(this).length),d=arguments[1],isNaN(d)?d=0:d>=0?d=o(d):d=e(this.length)-o(i(d)),l=d;l<c;++l)if(a.call(this,l)&&(u=this[l],t(u)))return l;return-1},Ns}var Ms,lf;function Jx(){if(lf)return Ms;lf=1;var t=Qx(),e=Array.prototype.forEach,r=Array.prototype.splice;return Ms=function(n){e.call(arguments,function(a){var i=t.call(this,a);i!==-1&&r.call(this,i,1)},this)},Ms}var Ds,cf;function ew(){if(cf)return Ds;cf=1;var t=br(),e={function:!0,object:!0};return Ds=function(r){return t(r)&&e[typeof r]||!1},Ds}var zs,df;function tw(){if(df)return zs;df=1;var t=ew();return zs=function(e){if(!t(e))throw new TypeError(e+" is not an Object");return e},zs}var Ls,uf;function rw(){if(uf)return Ls;uf=1;var t=Kx(),e=Jx(),r=tw(),n=Ht(),a=ld().methods.emit,i=Object.defineProperty,o=Object.prototype.hasOwnProperty,s=Object.getOwnPropertyDescriptor;return Ls=function(l,c){var d,u,p,f;return r(l)&&r(c),f=arguments[2],f===void 0&&(f="emit"),u={close:function(){e.call(d,c)}},o.call(l,"__eePipes__")?((d=l.__eePipes__).push(c),u):(i(l,"__eePipes__",n("c",d=[c])),p=s(l,f),p?(delete p.get,delete p.set):p=n("c",void 0),p.value=function(){var v,m,g=t(d);for(a.apply(this,arguments),v=0;m=g[v];++v)a.apply(m,arguments)},i(l,f,p),u)},Ls}var nw=rw();const aw=Ca(nw);let pf=[...gx,...wx,...Ox];class ff{constructor(e,r,n){pf.forEach(a=>{let i=new a(e,r,n);aw(i,this)})}}Ut(ff.prototype);function mf(){for(var t=0;t<arguments.length;t++)pf.push(arguments[t])}function iw(t,e,r){return new ff(t,e,r)}class js{constructor(e){this.settings=e||{},this.polisher=new ax(!1),this.chunker=new cd(void 0,void 0,this.settings),this.hooks={},this.hooks.beforePreview=new oe(this),this.hooks.afterPreview=new oe(this),this.size={width:{value:8.5,unit:"in"},height:{value:11,unit:"in"},format:void 0,orientation:void 0},this.chunker.on("page",r=>{this.emit("page",r)}),this.chunker.on("rendering",()=>{this.emit("rendering",this.chunker)})}initializeHandlers(){let e=iw(this.chunker,this.polisher,this);return e.on("size",r=>{this.size=r,this.emit("size",r)}),e.on("atpages",r=>{this.atpages=r,this.emit("atpages",r)}),e}registerHandlers(){return mf.apply(mf,arguments)}getParams(e){let r,n=new URL(window.location),a=new URLSearchParams(n.search);for(var i of a.entries())i[0]===e&&(r=i[1]);return r}wrapContent(){let e=document.querySelector("body"),r;return r=e.querySelector(":scope > template[data-ref='pagedjs-content']"),r||(r=document.createElement("template"),r.dataset.ref="pagedjs-content",r.innerHTML=e.innerHTML,e.innerHTML="",e.appendChild(r)),r.content}removeStyles(e=document){const r=Array.from(e.querySelectorAll("link[rel='stylesheet']:not([data-pagedjs-ignore], [media~='screen'])")),n=Array.from(e.querySelectorAll("style:not([data-pagedjs-inserted-styles], [data-pagedjs-ignore], [media~='screen'])"));return[...r,...n].sort(function(i,o){const s=i.compareDocumentPosition(o);return s===Node.DOCUMENT_POSITION_PRECEDING?1:s===Node.DOCUMENT_POSITION_FOLLOWING?-1:0}).map(i=>{if(i.nodeName==="STYLE"){const o={};return o[window.location.href]=i.textContent,i.remove(),o}if(i.nodeName==="LINK")return i.remove(),i.href;console.warn(`Unable to process: ${i}, ignoring.`)})}async preview(e,r,n){await this.hooks.beforePreview.trigger(e,n),e||(e=this.wrapContent()),r||(r=this.removeStyles()),this.polisher.setup(),this.handlers=this.initializeHandlers(),await this.polisher.add(...r);let a=performance.now(),i=await this.chunker.flow(e,n),o=performance.now();return i.performance=o-a,i.size=this.size,this.emit("rendered",i),await this.hooks.afterPreview.trigger(i.pages),i}}Ut(js.prototype);function hf(t,e){let r;return function(...a){clearTimeout(r),r=setTimeout(()=>t.apply(this,a),e)}}let ow=class{prepareRendering(e){const{clientHeight:r,clientWidth:n}=e;e.innerHTML="",r&&(e.style.minHeight=`${r}px`),n&&window!==window.parent&&(e.style.minWidth=`${n}px`),document?.querySelectorAll("style[data-pagedjs-inserted-styles]").forEach(a=>a.remove()),this.resetZoom()}finalizeRendering(e){e&&(e.style.minWidth="auto",e.style.minHeight="auto"),this.attachEventListeners(),this.applyPagedCSS(),this.restoreZoom()}attachEventListeners(){document?.querySelectorAll("[data-uhuu]").forEach(e=>{const r=function(){const n=JSON.parse(this.getAttribute("data-uhuu"));$uhuu.editDialog(n)};e.removeEventListener("click",r),e.addEventListener("click",r)})}applyPagedCSS(){document?.querySelectorAll(".page-break-after[data-paged-css]").forEach(e=>{const r=e.closest("div.pagedjs_sheet"),n=e.getAttribute("data-paged-css");r&&n&&n.split(" ").filter(Boolean).forEach(a=>r.classList.add(a))})}getStyleUrls(e,r){if(e){const n=new Blob([e],{type:"text/css"});return[URL.createObjectURL(n)]}return r?[r]:[]}originalStyles;resetZoom(){if(typeof document>"u")return;const e=document?.body;e.style.transform&&(this.originalStyles={width:e.style.width,height:e.style.height,transform:e.style.transform,transformOrigin:e.style.transformOrigin||"center center"},e.style.opacity="0",e.style.width="100%",e.style.height="100%",e.style.transform="")}restoreZoom(){if(typeof document>"u")return;const e=document?.body;e.style.opacity="1",this.originalStyles?.transform&&(e.style.width=this.originalStyles.width,e.style.height=this.originalStyles.height,e.style.transform=this.originalStyles.transform)}};class gf{static PAGE_SIZES={A0:{width:841,height:1189},A1:{width:594,height:841},A2:{width:420,height:594},A3:{width:297,height:420},A4:{width:210,height:297},A5:{width:148,height:210},A6:{width:105,height:148},B0:{width:1e3,height:1414},B1:{width:707,height:1e3},B2:{width:500,height:707},B3:{width:353,height:500},B4:{width:250,height:353},B5:{width:176,height:250},B6:{width:125,height:176},C0:{width:917,height:1297},C1:{width:648,height:917},C2:{width:458,height:648},C3:{width:324,height:458},C4:{width:229,height:324},C5:{width:162,height:229},C6:{width:114,height:162},LETTER:{width:216,height:279},LEGAL:{width:216,height:356},TABLOID:{width:279,height:432},LEDGER:{width:432,height:279}};static getStandardFormats(){return["Custom","A3","A4","A5","LETTER","LEGAL"]}static getDimensions({format:e,orientation:r="portrait"}){const n=this.PAGE_SIZES[e.toUpperCase()];return n?r==="landscape"?{width:n.height,height:n.width}:{width:n.width,height:n.height}:null}static mmToPx(e,r=72){return e*r/25.4}static getDimensionsInPx({format:e,orientation:r="portrait",dpi:n=72}){const a=this.getDimensions({format:e,orientation:r});return a?{width:this.mmToPx(a.width,n),height:this.mmToPx(a.height,n)}:null}static hasFormat(e){return e.toUpperCase()in this.PAGE_SIZES}static getAvailableFormats(){return Object.keys(this.PAGE_SIZES)}static toValidCustomDimension(e){const r=typeof e=="string"&&e.trim()!==""?Number(e):e;return typeof r=="number"&&Number.isFinite(r)&&r>10&&r<4e3?r:null}static resolveDimensions(e={}){const{format:r,orientation:n,width:a,height:i}=e,o=typeof r=="string"?r:"",s=!o||o.toLowerCase()==="custom",l=this.toValidCustomDimension(a),c=this.toValidCustomDimension(i);if(s&&l!==null&&c!==null)return{width:l,height:c};const d=s?"A4":o;return this.getDimensions({format:d||"A4",orientation:n})??this.getDimensions({format:"A4",orientation:n})??{width:210,height:297}}static pageParams(e,r={}){if(typeof document>"u")return;const{format:n,orientation:a,bleed:i,showBleed:o,compatibility:s,printCssRaw:l,printCssUrl:c,preview:d}=r,u=this.resolveDimensions(r);return u&&(document.documentElement.style.setProperty("--uhuu-page-width",`${u.width}mm`),document.documentElement.style.setProperty("--uhuu-page-height",`${u.height}mm`)),document.documentElement.style.setProperty("--uhuu-page-bleed",`${Math.min(Math.max(i??0,0),400)}mm`),{page:{paginationType:e,format:n,orientation:a,bleed:i,width:u?.width,height:u?.height,preview:d,showBleed:o,compatibility:s,printCssRaw:l,printCssUrl:c}}}}const jt=O.createContext(null),vf=({config:t,children:e})=>y.jsx(jt.Provider,{value:t,children:e}),sw=({children:t,className:e,setup:r})=>{const[n,a]=O.useState(!1),i=O.useRef(null),o=O.useRef(null),s=O.useRef(new ow),l=O.useRef(!1),c=gf.pageParams("dynamic",r);let d=c?.page?.printCssRaw??"";if(!c?.page?.printCssRaw&&l.current,c?.page?.width&&c?.page?.height){const p=/@page\s*{([^}]*)}/,f=d.match(p),v=`
832
832
  size: ${c.page.width}mm ${c.page.height}mm;
833
833
  bleed: ${c.page.bleed??0}mm;`;if(f){const m=f[1].replace(/\s*(size|bleed)\s*:[^;]*;/g,""),g=`@page {${v}${m}}`;d=d.replace(p,g)}else d=`@page {${v}}
834
- ${d}`}const u=hf(()=>{if(!i.current||!o.current){console.warn("Container or page content reference is missing.");return}if(n)return;a(!0),s.current.prepareRendering(i.current);const p=new js,f=s.current.getStyleUrls(d,c?.page?.printCssUrl??"");try{p.preview(o.current?.innerHTML??"",f,i.current).then(()=>{a(!1),s.current.finalizeRendering(i.current)})}catch(v){console.error("Error during Paged.js preview rendering:",v),a(!1)}},500);return O.useEffect(()=>{u()},[t,r]),y.jsxs(vf,{config:c,children:[y.jsx("div",{className:[e??"",n?"rendering":"rendered",c?.page?.showBleed?"uhuu-bleed-visible":"",c?.page?.preview??""].filter(Boolean).join(" "),ref:i}),y.jsx("div",{className:"uhuu-reactive-content",style:{display:"none"},ref:o,children:t})]})},lw=({children:t})=>y.jsx(y.Fragment,{children:t});class ln{static handlePageBreakStyles(){document?.querySelectorAll(".page-break-after[data-paged-css]").forEach(e=>{const r=e.closest("div.uhuu-page-sheet"),n=e.getAttribute("data-paged-css");r&&n&&n.split(" ").filter(Boolean).forEach(i=>r.classList.add(i))})}static handleUhuuDialogs(){const e=function(){const r=JSON.parse(this.getAttribute("data-uhuu")||"{}");$uhuu.editDialog(r)};document?.querySelectorAll("[data-uhuu]").forEach(r=>{r.removeEventListener("click",e),r.addEventListener("click",e)})}static handle(){ln.handlePageBreakStyles(),ln.handleUhuuDialogs()}}class yf{static setupPageStyles(e){if(!e||typeof document>"u")return;const r=document.createElement("link");return r.rel="stylesheet",r.href=e,document.head.appendChild(r),r}static removePageStyles(e){e&&typeof document<"u"&&document?.head.removeChild(e)}}const Ws=({children:t,className:e,setup:r})=>{const n=gf.pageParams("static",r);O.useEffect(()=>{n?.page?.compatibility&&ln.handle();const i=yf.setupPageStyles(n?.page?.printCssUrl);return()=>{i&&yf.removePageStyles(i)}},[r,n?.page?.compatibility,n?.page?.printCssUrl]);const a=[e,n?.page?.preview].filter(Boolean).join(" ");return y.jsx(vf,{config:n,children:y.jsx("div",{className:a,children:t})})},Bs=O.forwardRef(({children:t,className:e="",style:r,pageNo:n,overlay:a,showBleed:i,"data-page-key":o},s)=>{const l=O.useContext(jt),c=i??l?.page?.showBleed??!1;return y.jsxs("div",{className:`uhuu-page-sheet ${e}`,style:r,ref:s,"data-page-key":o,children:[t,a&&a({pageNo:n}),c&&y.jsx("div",{className:"uhuu-bleed-area"})]})});function cn(){if(typeof window<"u"){const t=window.location.hostname;return t==="localhost"||t==="127.0.0.1"||t.endsWith(".local")||window.location.port!==""}return!1}function cw({heights:t=[],keys:e=[],metas:r=[],availableHeight:n=0}={}){const a=[{indexes:[],keys:[]}];let i=0;const o=()=>{a[a.length-1].indexes.length>0&&(a.push({indexes:[],keys:[]}),i=0)};for(let l=0;l<t.length;l+=1){const c=r[l]??{},d=t[l]??0,u=e[l]??String(l),p=c.keepWithNext?t[l+1]??0:0,f=d+p;c.breakBefore&&o(),a[a.length-1].indexes.length>0&&i+f>n&&o(),a[a.length-1].indexes.push(l),a[a.length-1].keys.push(u),i+=d,c.breakAfter&&l<t.length-1&&o()}const s=a.filter(l=>l.indexes.length>0);return s.length?s:[{indexes:[],keys:[]}]}const dn=T.createContext(null),dw=typeof window>"u"?T.useEffect:T.useLayoutEffect;function bf(t){const e=t.getBoundingClientRect(),r=window.getComputedStyle(t),n=Number.parseFloat(r.marginTop||"0")||0,a=Number.parseFloat(r.marginBottom||"0")||0;return e.height+n+a}function uw(t){return{breakBefore:t.dataset.uhuuFlowBreakBefore==="true",breakAfter:t.dataset.uhuuFlowBreakAfter==="true",keepWithNext:t.dataset.uhuuFlowKeepWithNext==="true"}}function pw(t,e,r={}){const n=e.dataset.uhuuFlowId;if(!n)return null;const a=Array.from(e.querySelectorAll('[data-uhuu-flow-item="true"]'));if(!a.length)return{flowId:n,chunks:[{indexes:[],keys:[]}],signature:`${n}:empty`};const i=t.getBoundingClientRect(),o=t.clientHeight||i.height,s=Number.isFinite(o)&&o>0,l=s?o:a.reduce((v,m)=>v+bf(m),0),c=a.map(bf),d=a.map(uw),u=a.map((v,m)=>v.dataset.uhuuFlowKey||String(m));if(s||r.onZeroHeight?.(),s){const v=c.findIndex(m=>m>l);v>=0&&r.onOversizedItem?.(u[v],c[v],l)}const p=cw({heights:c,keys:u,metas:d,availableHeight:l}),f=JSON.stringify({flowId:n,availableHeight:Math.round(l*100)/100,heights:c.map(v=>Math.round(v*100)/100),keys:u,metas:d,chunks:p});return{flowId:n,chunks:p,signature:f}}function fw({children:t,className:e="",style:r}){const n=T.useContext(dn),a=T.useRef(null),i=T.useRef(""),o=T.useRef(!1),s=T.useRef(!1),l=T.useRef(new Set);return dw(()=>{if(n?.mode!=="measure"||!n.registerMeasurement||!a.current)return;const c=a.current;let d=0,u=null;i.current="";const p=()=>{window.cancelAnimationFrame(d),d=window.requestAnimationFrame(m)},f=new Set,v=()=>{if(u){for(const w of Array.from(f))c.contains(w)||(u.unobserve(w),f.delete(w));c.querySelectorAll('[data-uhuu-flow-item="true"]').forEach(w=>{f.has(w)||(f.add(w),u?.observe(w))})}},m=()=>{v();const w=c.querySelectorAll('[data-uhuu-flow="true"]');w.length>1&&!o.current&&cn()&&(o.current=!0,console.warn("[uhuu-components] Static.FlowArea supports one Static.Flow child. Additional Static.Flow elements in the same area are ignored. Use one FlowArea per flow region."));const x=w[0];if(!x)return;const h=pw(c,x,{onZeroHeight:()=>{s.current||!cn()||(s.current=!0,console.warn("[uhuu-components] Static.FlowArea has flow items but no measurable height. Give the area an explicit height or use a constrained flex layout such as flex-1 min-h-0."))},onOversizedItem:(b,S,E)=>{l.current.has(b)||!cn()||(l.current.add(b),console.warn(`[uhuu-components] Static.Flow item "${b}" is taller than its FlowArea (${Math.round(S)}px > ${Math.round(E)}px). V1 can only move whole items, so split this item if it must fit within a page.`))}});!h||h.signature===i.current||(i.current=h.signature,n.registerMeasurement?.(h))};u=new ResizeObserver(p),u.observe(c),v(),p();const g=new MutationObserver(()=>{v(),p()});return g.observe(c,{attributes:!0,attributeFilter:["class","style","data-uhuu-flow","data-uhuu-flow-id","data-uhuu-flow-item","data-uhuu-flow-key","data-uhuu-flow-break-before","data-uhuu-flow-break-after","data-uhuu-flow-keep-with-next"],characterData:!0,childList:!0,subtree:!0}),()=>{window.cancelAnimationFrame(d),u?.disconnect(),g.disconnect()}},[n]),y.jsx("div",{ref:a,className:e,style:r,"data-uhuu-flow-area":"true",children:t})}function mw({id:t,items:e,getKey:r,renderItem:n,getItemMeta:a,className:i="",itemClassName:o}){const s=T.useContext(dn),l=s?.chunksByFlowId?.[t],d=(s?.mode==="visible"&&l?l[s.pageIndex]?.indexes??[]:s?.mode==="visible"&&s.pageIndex>0?[]:e.map((u,p)=>p)).filter(u=>Number.isInteger(u)&&u>=0&&u<e.length);return y.jsx("div",{className:i,"data-uhuu-flow":"true","data-uhuu-flow-id":t,children:d.map(u=>{const p=e[u];if(p===void 0)return null;const f=r(p,u),v=a?.(p,u)??{},m=typeof o=="function"?o(p,u):o;return y.jsx("div",{className:m,style:{display:"flow-root"},"data-uhuu-flow-item":"true","data-uhuu-flow-key":String(f),"data-uhuu-flow-index":u,"data-uhuu-flow-break-before":v.breakBefore?"true":void 0,"data-uhuu-flow-break-after":v.breakAfter?"true":void 0,"data-uhuu-flow-keep-with-next":v.keepWithNext?"true":void 0,children:n(p,u)},f)})})}const Xt=(t,e)=>{const r=t.dialog;return r?e?.page?.paginationType==="dynamic"?{"data-uhuu":JSON.stringify(r)}:{onClick:n=>{n.stopPropagation(),window.$uhuu?.editDialog(r)},"data-uhuu":""}:{}},qs=({onError:t})=>r=>{t?.(r)},Rs=t=>{const e=O.useContext(jt),r=qs({onError:t.onError}),n=t.bleed??e?.page?.bleed??0,a=t.pageWidth??e?.page?.width??210,i=t.pageHeight??e?.page?.height??297,{src:o,backgroundColor:s,width:l,height:c,left:d=0,right:u=0,top:p=0,bottom:f=0}=t,v=E=>`${E}mm`,m=()=>{let E=l;return l?!d&&!u&&(E+=n):(E=a,d||(E+=n),u||(E+=n),(d||u)&&(E-=(d??0)+(u??0))),E},g=()=>{let E=c;return c?!p&&!f&&(E+=n):(E=i,p||(E+=n),f||(E+=n),(p||f)&&(E-=(p??0)+(f??0))),E},w=m(),x=g(),h=E=>E!==void 0?v(E):void 0,S=(E=>Object.fromEntries(Object.entries(E).filter(([k,C])=>C!==void 0)))({backgroundColor:s,width:h(w),height:h(x),left:h(d>0?d+n:d),right:h(u>0?u+n:u),top:h(p>0?p+n:p),bottom:h(f>0?f+n:f)});return y.jsx("div",{className:"uhuu-image-container",style:S,...t.dataUhuu!==void 0?{"data-uhuu":t.dataUhuu}:{},children:y.jsxs("div",{className:"uhuu-image-inner",...Xt(t,e),children:[y.jsx("img",{className:"cover-image object-cover object-center",src:o||null,onError:r}),t.children]})})};const hw=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),gw=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,n)=>n?n.toUpperCase():r.toLowerCase()),Sf=t=>{const e=gw(t);return e.charAt(0).toUpperCase()+e.slice(1)},xf=(...t)=>t.filter((e,r,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===r).join(" ").trim(),vw=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var yw={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const bw=O.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:i,iconNode:o,...s},l)=>O.createElement("svg",{ref:l,...yw,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:xf("lucide",a),...!i&&!vw(s)&&{"aria-hidden":"true"},...s},[...o.map(([c,d])=>O.createElement(c,d)),...Array.isArray(i)?i:[i]]));const be=(t,e)=>{const r=O.forwardRef(({className:n,...a},i)=>O.createElement(bw,{ref:i,iconNode:e,className:xf(`lucide-${hw(Sf(t))}`,`lucide-${t}`,n),...a}));return r.displayName=Sf(t),r};const Sw=be("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);const wf=be("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);const xw=be("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);const ww=be("book-dashed",[["path",{d:"M12 17h1.5",key:"1gkc67"}],["path",{d:"M12 22h1.5",key:"1my7sn"}],["path",{d:"M12 2h1.5",key:"19tvb7"}],["path",{d:"M17.5 22H19a1 1 0 0 0 1-1",key:"10akbh"}],["path",{d:"M17.5 2H19a1 1 0 0 1 1 1v1.5",key:"1vrfjs"}],["path",{d:"M20 14v3h-2.5",key:"1naeju"}],["path",{d:"M20 8.5V10",key:"1ctpfu"}],["path",{d:"M4 10V8.5",key:"1o3zg5"}],["path",{d:"M4 19.5V14",key:"ob81pf"}],["path",{d:"M4 4.5A2.5 2.5 0 0 1 6.5 2H8",key:"s8vcyb"}],["path",{d:"M8 22H6.5a1 1 0 0 1 0-5H8",key:"1cu73q"}]]);const un=be("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Cf=be("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Cw=be("clipboard-list",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);const kw=be("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const kf=be("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);const Ef=be("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);const Fs=be("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const Ew=be("maximize",[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]]);const Tw=be("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);const Aw=be("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);const lt=be("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const _w=be("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);const Ow=be("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const Pw=be("unfold-horizontal",[["path",{d:"M16 12h6",key:"15xry1"}],["path",{d:"M8 12H2",key:"1jqql6"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 8v2",key:"1woqiv"}],["path",{d:"M12 14v2",key:"8jcxud"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m19 15 3-3-3-3",key:"wjy7rq"}],["path",{d:"m5 9-3 3 3 3",key:"j64kie"}]]);const Iw=be("unfold-vertical",[["path",{d:"M12 22v-6",key:"6o8u61"}],["path",{d:"M12 8V2",key:"1wkif3"}],["path",{d:"M4 12H2",key:"rhcxmi"}],["path",{d:"M10 12H8",key:"s88cx1"}],["path",{d:"M16 12h-2",key:"10asgb"}],["path",{d:"M22 12h-2",key:"14jgyd"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m15 5-3-3-3 3",key:"itvq4r"}]]);const Tf=be("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);const Nw=be("zoom-in",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);const Mw=be("zoom-out",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),Af=T.createContext({portalContainer:null});function $s(){return T.useContext(Af)}function Dw({children:t}){const[e,r]=T.useState(null);return T.useEffect(()=>{if(typeof document>"u")return;const n=document.createElement("div");return n.setAttribute("data-uhuu-portal",""),n.style.cssText="position: fixed; top: 0; left: 0; z-index: 9999;",document.body.appendChild(n),r(n),()=>{document.body.removeChild(n)}},[]),y.jsx(Af.Provider,{value:{portalContainer:e},children:t})}const _f=O.createContext({interactive:!0,setInteractive:()=>{},enableDevTools:!1});function Gs(){return O.useContext(_f)}function Vs(){const{interactive:t}=Gs();return!t}function zw({children:t,defaultInteractive:e=!0,enableDevTools:r=!1}){const a=!!(typeof window<"u"&&window?.$uhuu_renderer)?!1:e,[i,o]=O.useState(a);return y.jsx(_f.Provider,{value:{interactive:i,setInteractive:o,enableDevTools:r},children:y.jsx(Dw,{children:y.jsx("div",{"data-uhuu-interactive":i?"":void 0,style:{display:"contents"},children:t})})})}function Of(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(e=0;e<a;e++)t[e]&&(r=Of(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Pf(){for(var t,e,r=0,n="",a=arguments.length;r<a;r++)(t=arguments[r])&&(e=Of(t))&&(n&&(n+=" "),n+=e);return n}const If=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Nf=Pf,Mf=(t,e)=>r=>{var n;if(e?.variants==null)return Nf(t,r?.class,r?.className);const{variants:a,defaultVariants:i}=e,o=Object.keys(a).map(c=>{const d=r?.[c],u=i?.[c];if(d===null)return null;const p=If(d)||If(u);return a[c][p]}),s=r&&Object.entries(r).reduce((c,d)=>{let[u,p]=d;return p===void 0||(c[u]=p),c},{}),l=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((c,d)=>{let{class:u,className:p,...f}=d;return Object.entries(f).every(v=>{let[m,g]=v;return Array.isArray(g)?g.includes({...i,...s}[m]):{...i,...s}[m]===g})?[...c,u,p]:c},[]);return Nf(t,o,l,r?.class,r?.className)},Lw=(t,e)=>{const r=new Array(t.length+e.length);for(let n=0;n<t.length;n++)r[n]=t[n];for(let n=0;n<e.length;n++)r[t.length+n]=e[n];return r},jw=(t,e)=>({classGroupId:t,validator:e}),Df=(t=new Map,e=null,r)=>({nextPart:t,validators:e,classGroupId:r}),pn="-",zf=[],Ww="arbitrary..",Bw=t=>{const e=Rw(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return qw(o);const s=o.split(pn),l=s[0]===""&&s.length>1?1:0;return Lf(s,l,e)},getConflictingClassGroupIds:(o,s)=>{if(s){const l=n[o],c=r[o];return l?c?Lw(c,l):l:c||zf}return r[o]||zf}}},Lf=(t,e,r)=>{if(t.length-e===0)return r.classGroupId;const a=t[e],i=r.nextPart.get(a);if(i){const c=Lf(t,e+1,i);if(c)return c}const o=r.validators;if(o===null)return;const s=e===0?t.join(pn):t.slice(e).join(pn),l=o.length;for(let c=0;c<l;c++){const d=o[c];if(d.validator(s))return d.classGroupId}},qw=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),r=e.indexOf(":"),n=e.slice(0,r);return n?Ww+n:void 0})(),Rw=t=>{const{theme:e,classGroups:r}=t;return Fw(r,e)},Fw=(t,e)=>{const r=Df();for(const n in t){const a=t[n];Hs(a,r,n,e)}return r},Hs=(t,e,r,n)=>{const a=t.length;for(let i=0;i<a;i++){const o=t[i];$w(o,e,r,n)}},$w=(t,e,r,n)=>{if(typeof t=="string"){Gw(t,e,r);return}if(typeof t=="function"){Vw(t,e,r,n);return}Hw(t,e,r,n)},Gw=(t,e,r)=>{const n=t===""?e:jf(e,t);n.classGroupId=r},Vw=(t,e,r,n)=>{if(Uw(t)){Hs(t(n),e,r,n);return}e.validators===null&&(e.validators=[]),e.validators.push(jw(r,t))},Hw=(t,e,r,n)=>{const a=Object.entries(t),i=a.length;for(let o=0;o<i;o++){const[s,l]=a[o];Hs(l,jf(e,s),r,n)}},jf=(t,e)=>{let r=t;const n=e.split(pn),a=n.length;for(let i=0;i<a;i++){const o=n[i];let s=r.nextPart.get(o);s||(s=Df(),r.nextPart.set(o,s)),r=s}return r},Uw=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,Kw=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=Object.create(null),n=Object.create(null);const a=(i,o)=>{r[i]=o,e++,e>t&&(e=0,n=r,r=Object.create(null))};return{get(i){let o=r[i];if(o!==void 0)return o;if((o=n[i])!==void 0)return a(i,o),o},set(i,o){i in r?r[i]=o:a(i,o)}}},Us="!",Wf=":",Yw=[],Bf=(t,e,r,n,a)=>({modifiers:t,hasImportantModifier:e,baseClassName:r,maybePostfixModifierPosition:n,isExternal:a}),Xw=t=>{const{prefix:e,experimentalParseClassName:r}=t;let n=a=>{const i=[];let o=0,s=0,l=0,c;const d=a.length;for(let m=0;m<d;m++){const g=a[m];if(o===0&&s===0){if(g===Wf){i.push(a.slice(l,m)),l=m+1;continue}if(g==="/"){c=m;continue}}g==="["?o++:g==="]"?o--:g==="("?s++:g===")"&&s--}const u=i.length===0?a:a.slice(l);let p=u,f=!1;u.endsWith(Us)?(p=u.slice(0,-1),f=!0):u.startsWith(Us)&&(p=u.slice(1),f=!0);const v=c&&c>l?c-l:void 0;return Bf(i,f,p,v)};if(e){const a=e+Wf,i=n;n=o=>o.startsWith(a)?i(o.slice(a.length)):Bf(Yw,!1,o,void 0,!0)}if(r){const a=n;n=i=>r({className:i,parseClassName:a})}return n},Zw=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((r,n)=>{e.set(r,1e6+n)}),r=>{const n=[];let a=[];for(let i=0;i<r.length;i++){const o=r[i],s=o[0]==="[",l=e.has(o);s||l?(a.length>0&&(a.sort(),n.push(...a),a=[]),n.push(o)):a.push(o)}return a.length>0&&(a.sort(),n.push(...a)),n}},Qw=t=>({cache:Kw(t.cacheSize),parseClassName:Xw(t),sortModifiers:Zw(t),...Bw(t)}),Jw=/\s+/,eC=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a,sortModifiers:i}=e,o=[],s=t.trim().split(Jw);let l="";for(let c=s.length-1;c>=0;c-=1){const d=s[c],{isExternal:u,modifiers:p,hasImportantModifier:f,baseClassName:v,maybePostfixModifierPosition:m}=r(d);if(u){l=d+(l.length>0?" "+l:l);continue}let g=!!m,w=n(g?v.substring(0,m):v);if(!w){if(!g){l=d+(l.length>0?" "+l:l);continue}if(w=n(v),!w){l=d+(l.length>0?" "+l:l);continue}g=!1}const x=p.length===0?"":p.length===1?p[0]:i(p).join(":"),h=f?x+Us:x,b=h+w;if(o.indexOf(b)>-1)continue;o.push(b);const S=a(w,g);for(let E=0;E<S.length;++E){const k=S[E];o.push(h+k)}l=d+(l.length>0?" "+l:l)}return l},tC=(...t)=>{let e=0,r,n,a="";for(;e<t.length;)(r=t[e++])&&(n=qf(r))&&(a&&(a+=" "),a+=n);return a},qf=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=qf(t[n]))&&(r&&(r+=" "),r+=e);return r},rC=(t,...e)=>{let r,n,a,i;const o=l=>{const c=e.reduce((d,u)=>u(d),t());return r=Qw(c),n=r.cache.get,a=r.cache.set,i=s,s(l)},s=l=>{const c=n(l);if(c)return c;const d=eC(l,r);return a(l,d),d};return i=o,(...l)=>i(tC(...l))},nC=[],we=t=>{const e=r=>r[t]||nC;return e.isThemeGetter=!0,e},Rf=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ff=/^\((?:(\w[\w-]*):)?(.+)\)$/i,aC=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,iC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,oC=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,sC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,lC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,cC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,bt=t=>aC.test(t),pe=t=>!!t&&!Number.isNaN(Number(t)),St=t=>!!t&&Number.isInteger(Number(t)),Ks=t=>t.endsWith("%")&&pe(t.slice(0,-1)),ct=t=>iC.test(t),$f=()=>!0,dC=t=>oC.test(t)&&!sC.test(t),Ys=()=>!1,uC=t=>lC.test(t),pC=t=>cC.test(t),fC=t=>!Q(t)&&!ee(t),mC=t=>xt(t,Yf,Ys),Q=t=>Rf.test(t),Wt=t=>xt(t,Xf,dC),Gf=t=>xt(t,wC,pe),hC=t=>xt(t,Qf,$f),gC=t=>xt(t,Zf,Ys),Vf=t=>xt(t,Uf,Ys),vC=t=>xt(t,Kf,pC),fn=t=>xt(t,Jf,uC),ee=t=>Ff.test(t),xr=t=>Bt(t,Xf),yC=t=>Bt(t,Zf),Hf=t=>Bt(t,Uf),bC=t=>Bt(t,Yf),SC=t=>Bt(t,Kf),mn=t=>Bt(t,Jf,!0),xC=t=>Bt(t,Qf,!0),xt=(t,e,r)=>{const n=Rf.exec(t);return n?n[1]?e(n[1]):r(n[2]):!1},Bt=(t,e,r=!1)=>{const n=Ff.exec(t);return n?n[1]?e(n[1]):r:!1},Uf=t=>t==="position"||t==="percentage",Kf=t=>t==="image"||t==="url",Yf=t=>t==="length"||t==="size"||t==="bg-size",Xf=t=>t==="length",wC=t=>t==="number",Zf=t=>t==="family-name",Qf=t=>t==="number"||t==="weight",Jf=t=>t==="shadow",CC=rC(()=>{const t=we("color"),e=we("font"),r=we("text"),n=we("font-weight"),a=we("tracking"),i=we("leading"),o=we("breakpoint"),s=we("container"),l=we("spacing"),c=we("radius"),d=we("shadow"),u=we("inset-shadow"),p=we("text-shadow"),f=we("drop-shadow"),v=we("blur"),m=we("perspective"),g=we("aspect"),w=we("ease"),x=we("animate"),h=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...b(),ee,Q],E=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],C=()=>[ee,Q,l],_=()=>[bt,"full","auto",...C()],A=()=>[St,"none","subgrid",ee,Q],I=()=>["auto",{span:["full",St,ee,Q]},St,ee,Q],N=()=>[St,"auto",ee,Q],D=()=>["auto","min","max","fr",ee,Q],j=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],U=()=>["start","end","center","stretch","center-safe","end-safe"],W=()=>["auto",...C()],q=()=>[bt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],F=()=>[bt,"screen","full","dvw","lvw","svw","min","max","fit",...C()],P=()=>[bt,"screen","full","lh","dvh","lvh","svh","min","max","fit",...C()],R=()=>[t,ee,Q],Y=()=>[...b(),Hf,Vf,{position:[ee,Q]}],Z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",bC,mC,{size:[ee,Q]}],z=()=>[Ks,xr,Wt],H=()=>["","none","full",c,ee,Q],G=()=>["",pe,xr,Wt],K=()=>["solid","dashed","dotted","double"],ie=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ne=()=>[pe,Ks,Hf,Vf],M=()=>["","none",v,ee,Q],$=()=>["none",pe,ee,Q],X=()=>["none",pe,ee,Q],ae=()=>[pe,ee,Q],se=()=>[bt,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ct],breakpoint:[ct],color:[$f],container:[ct],"drop-shadow":[ct],ease:["in","out","in-out"],font:[fC],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ct],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ct],shadow:[ct],spacing:["px",pe],text:[ct],"text-shadow":[ct],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",bt,Q,ee,g]}],container:["container"],columns:[{columns:[pe,Q,ee,s]}],"break-after":[{"break-after":h()}],"break-before":[{"break-before":h()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:S()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:_()}],"inset-x":[{"inset-x":_()}],"inset-y":[{"inset-y":_()}],start:[{"inset-s":_(),start:_()}],end:[{"inset-e":_(),end:_()}],"inset-bs":[{"inset-bs":_()}],"inset-be":[{"inset-be":_()}],top:[{top:_()}],right:[{right:_()}],bottom:[{bottom:_()}],left:[{left:_()}],visibility:["visible","invisible","collapse"],z:[{z:[St,"auto",ee,Q]}],basis:[{basis:[bt,"full","auto",s,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[pe,bt,"auto","initial","none",Q]}],grow:[{grow:["",pe,ee,Q]}],shrink:[{shrink:["",pe,ee,Q]}],order:[{order:[St,"first","last","none",ee,Q]}],"grid-cols":[{"grid-cols":A()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":A()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":D()}],"auto-rows":[{"auto-rows":D()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...j(),"normal"]}],"justify-items":[{"justify-items":[...U(),"normal"]}],"justify-self":[{"justify-self":["auto",...U()]}],"align-content":[{content:["normal",...j()]}],"align-items":[{items:[...U(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...U(),{baseline:["","last"]}]}],"place-content":[{"place-content":j()}],"place-items":[{"place-items":[...U(),"baseline"]}],"place-self":[{"place-self":["auto",...U()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pbs:[{pbs:C()}],pbe:[{pbe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:W()}],mx:[{mx:W()}],my:[{my:W()}],ms:[{ms:W()}],me:[{me:W()}],mbs:[{mbs:W()}],mbe:[{mbe:W()}],mt:[{mt:W()}],mr:[{mr:W()}],mb:[{mb:W()}],ml:[{ml:W()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:q()}],"inline-size":[{inline:["auto",...F()]}],"min-inline-size":[{"min-inline":["auto",...F()]}],"max-inline-size":[{"max-inline":["none",...F()]}],"block-size":[{block:["auto",...P()]}],"min-block-size":[{"min-block":["auto",...P()]}],"max-block-size":[{"max-block":["none",...P()]}],w:[{w:[s,"screen",...q()]}],"min-w":[{"min-w":[s,"screen","none",...q()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[o]},...q()]}],h:[{h:["screen","lh",...q()]}],"min-h":[{"min-h":["screen","lh","none",...q()]}],"max-h":[{"max-h":["screen","lh",...q()]}],"font-size":[{text:["base",r,xr,Wt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,xC,hC]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ks,Q]}],"font-family":[{font:[yC,gC,e]}],"font-features":[{"font-features":[Q]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,ee,Q]}],"line-clamp":[{"line-clamp":[pe,"none",ee,Gf]}],leading:[{leading:[i,...C()]}],"list-image":[{"list-image":["none",ee,Q]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ee,Q]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:[pe,"from-font","auto",ee,Wt]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[pe,"auto",ee,Q]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ee,Q]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ee,Q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Y()}],"bg-repeat":[{bg:Z()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},St,ee,Q],radial:["",ee,Q],conic:[St,ee,Q]},SC,vC]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:z()}],"gradient-via-pos":[{via:z()}],"gradient-to-pos":[{to:z()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:G()}],"border-w-x":[{"border-x":G()}],"border-w-y":[{"border-y":G()}],"border-w-s":[{"border-s":G()}],"border-w-e":[{"border-e":G()}],"border-w-bs":[{"border-bs":G()}],"border-w-be":[{"border-be":G()}],"border-w-t":[{"border-t":G()}],"border-w-r":[{"border-r":G()}],"border-w-b":[{"border-b":G()}],"border-w-l":[{"border-l":G()}],"divide-x":[{"divide-x":G()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":G()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...K(),"hidden","none"]}],"divide-style":[{divide:[...K(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-bs":[{"border-bs":R()}],"border-color-be":[{"border-be":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...K(),"none","hidden"]}],"outline-offset":[{"outline-offset":[pe,ee,Q]}],"outline-w":[{outline:["",pe,xr,Wt]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",d,mn,fn]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",u,mn,fn]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[pe,Wt]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":G()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",p,mn,fn]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[pe,ee,Q]}],"mix-blend":[{"mix-blend":[...ie(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ie()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[pe]}],"mask-image-linear-from-pos":[{"mask-linear-from":ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":ne()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":ne()}],"mask-image-t-to-pos":[{"mask-t-to":ne()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":ne()}],"mask-image-r-to-pos":[{"mask-r-to":ne()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":ne()}],"mask-image-b-to-pos":[{"mask-b-to":ne()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":ne()}],"mask-image-l-to-pos":[{"mask-l-to":ne()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":ne()}],"mask-image-x-to-pos":[{"mask-x-to":ne()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":ne()}],"mask-image-y-to-pos":[{"mask-y-to":ne()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[ee,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":ne()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[pe]}],"mask-image-conic-from-pos":[{"mask-conic-from":ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":ne()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Y()}],"mask-repeat":[{mask:Z()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ee,Q]}],filter:[{filter:["","none",ee,Q]}],blur:[{blur:M()}],brightness:[{brightness:[pe,ee,Q]}],contrast:[{contrast:[pe,ee,Q]}],"drop-shadow":[{"drop-shadow":["","none",f,mn,fn]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",pe,ee,Q]}],"hue-rotate":[{"hue-rotate":[pe,ee,Q]}],invert:[{invert:["",pe,ee,Q]}],saturate:[{saturate:[pe,ee,Q]}],sepia:[{sepia:["",pe,ee,Q]}],"backdrop-filter":[{"backdrop-filter":["","none",ee,Q]}],"backdrop-blur":[{"backdrop-blur":M()}],"backdrop-brightness":[{"backdrop-brightness":[pe,ee,Q]}],"backdrop-contrast":[{"backdrop-contrast":[pe,ee,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":["",pe,ee,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[pe,ee,Q]}],"backdrop-invert":[{"backdrop-invert":["",pe,ee,Q]}],"backdrop-opacity":[{"backdrop-opacity":[pe,ee,Q]}],"backdrop-saturate":[{"backdrop-saturate":[pe,ee,Q]}],"backdrop-sepia":[{"backdrop-sepia":["",pe,ee,Q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ee,Q]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[pe,"initial",ee,Q]}],ease:[{ease:["linear","initial",w,ee,Q]}],delay:[{delay:[pe,ee,Q]}],animate:[{animate:["none",x,ee,Q]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,ee,Q]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:$()}],"rotate-x":[{"rotate-x":$()}],"rotate-y":[{"rotate-y":$()}],"rotate-z":[{"rotate-z":$()}],scale:[{scale:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"scale-3d":["scale-3d"],skew:[{skew:ae()}],"skew-x":[{"skew-x":ae()}],"skew-y":[{"skew-y":ae()}],transform:[{transform:[ee,Q,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:se()}],"translate-x":[{"translate-x":se()}],"translate-y":[{"translate-y":se()}],"translate-z":[{"translate-z":se()}],"translate-none":["translate-none"],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ee,Q]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mbs":[{"scroll-mbs":C()}],"scroll-mbe":[{"scroll-mbe":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pbs":[{"scroll-pbs":C()}],"scroll-pbe":[{"scroll-pbe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ee,Q]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[pe,xr,Wt,Gf]}],stroke:[{stroke:["none",...R()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function fe(...t){return CC(Pf(t))}const kC=Mf("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-gray-900 text-white hover:bg-gray-800",outline:"border border-gray-300 bg-white hover:bg-gray-50 text-gray-900",ghost:"hover:bg-gray-100 text-gray-900",secondary:"bg-gray-100 text-gray-900 hover:bg-gray-200"},size:{default:"h-10 px-4 py-2",sm:"h-9 px-3 text-sm",lg:"h-11 px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ie=T.forwardRef(({className:t,variant:e,size:r,...n},a)=>y.jsx("button",{className:fe(kC({variant:e,size:r,className:t})),ref:a,...n}));Ie.displayName="Button";function ce(t,e,{checkForDefaultPrevented:r=!0}={}){return function(a){if(t?.(a),r===!1||!a.defaultPrevented)return e?.(a)}}function em(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function wr(...t){return e=>{let r=!1;const n=t.map(a=>{const i=em(a,e);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let a=0;a<n.length;a++){const i=n[a];typeof i=="function"?i():em(t[a],null)}}}}function he(...t){return T.useCallback(wr(...t),t)}function EC(t,e){const r=T.createContext(e),n=i=>{const{children:o,...s}=i,l=T.useMemo(()=>s,Object.values(s));return y.jsx(r.Provider,{value:l,children:o})};n.displayName=t+"Provider";function a(i){const o=T.useContext(r);if(o)return o;if(e!==void 0)return e;throw new Error(`\`${i}\` must be used within \`${t}\``)}return[n,a]}function dt(t,e=[]){let r=[];function n(i,o){const s=T.createContext(o),l=r.length;r=[...r,o];const c=u=>{const{scope:p,children:f,...v}=u,m=p?.[t]?.[l]||s,g=T.useMemo(()=>v,Object.values(v));return y.jsx(m.Provider,{value:g,children:f})};c.displayName=i+"Provider";function d(u,p){const f=p?.[t]?.[l]||s,v=T.useContext(f);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${u}\` must be used within \`${i}\``)}return[c,d]}const a=()=>{const i=r.map(o=>T.createContext(o));return function(s){const l=s?.[t]||i;return T.useMemo(()=>({[`__scope${t}`]:{...s,[t]:l}}),[s,l])}};return a.scopeName=t,[n,TC(a,...e)]}function TC(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const o=n.reduce((s,{useScope:l,scopeName:c})=>{const u=l(i)[`__scope${c}`];return{...s,...u}},{});return T.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}var wt=globalThis?.document?T.useLayoutEffect:()=>{},AC=T[" useInsertionEffect ".trim().toString()]||wt;function Cr({prop:t,defaultProp:e,onChange:r=()=>{},caller:n}){const[a,i,o]=_C({defaultProp:e,onChange:r}),s=t!==void 0,l=s?t:a;{const d=T.useRef(t!==void 0);T.useEffect(()=>{const u=d.current;u!==s&&console.warn(`${n} is changing from ${u?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=s},[s,n])}const c=T.useCallback(d=>{if(s){const u=OC(d)?d(t):d;u!==t&&o.current?.(u)}else i(d)},[s,t,i,o]);return[l,c]}function _C({defaultProp:t,onChange:e}){const[r,n]=T.useState(t),a=T.useRef(r),i=T.useRef(e);return AC(()=>{i.current=e},[e]),T.useEffect(()=>{a.current!==r&&(i.current?.(r),a.current=r)},[r,a]),[r,n,i]}function OC(t){return typeof t=="function"}function kr(t){const e=PC(t),r=T.forwardRef((n,a)=>{const{children:i,...o}=n,s=T.Children.toArray(i),l=s.find(NC);if(l){const c=l.props.children,d=s.map(u=>u===l?T.Children.count(c)>1?T.Children.only(null):T.isValidElement(c)?c.props.children:null:u);return y.jsx(e,{...o,ref:a,children:T.isValidElement(c)?T.cloneElement(c,void 0,d):null})}return y.jsx(e,{...o,ref:a,children:i})});return r.displayName=`${t}.Slot`,r}function PC(t){const e=T.forwardRef((r,n)=>{const{children:a,...i}=r;if(T.isValidElement(a)){const o=DC(a),s=MC(i,a.props);return a.type!==T.Fragment&&(s.ref=n?wr(n,o):o),T.cloneElement(a,s)}return T.Children.count(a)>1?T.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var tm=Symbol("radix.slottable");function IC(t){const e=({children:r})=>y.jsx(y.Fragment,{children:r});return e.displayName=`${t}.Slottable`,e.__radixId=tm,e}function NC(t){return T.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===tm}function MC(t,e){const r={...e};for(const n in e){const a=t[n],i=e[n];/^on[A-Z]/.test(n)?a&&i?r[n]=(...s)=>{const l=i(...s);return a(...s),l}:a&&(r[n]=a):n==="style"?r[n]={...a,...i}:n==="className"&&(r[n]=[a,i].filter(Boolean).join(" "))}return{...t,...r}}function DC(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var zC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ge=zC.reduce((t,e)=>{const r=kr(`Primitive.${e}`),n=T.forwardRef((a,i)=>{const{asChild:o,...s}=a,l=o?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(l,{...s,ref:i})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function rm(t,e){t&&Ac.flushSync(()=>t.dispatchEvent(e))}function Xs(t){const e=t+"CollectionProvider",[r,n]=dt(e),[a,i]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=m=>{const{scope:g,children:w}=m,x=O.useRef(null),h=O.useRef(new Map).current;return y.jsx(a,{scope:g,itemMap:h,collectionRef:x,children:w})};o.displayName=e;const s=t+"CollectionSlot",l=kr(s),c=O.forwardRef((m,g)=>{const{scope:w,children:x}=m,h=i(s,w),b=he(g,h.collectionRef);return y.jsx(l,{ref:b,children:x})});c.displayName=s;const d=t+"CollectionItemSlot",u="data-radix-collection-item",p=kr(d),f=O.forwardRef((m,g)=>{const{scope:w,children:x,...h}=m,b=O.useRef(null),S=he(g,b),E=i(d,w);return O.useEffect(()=>(E.itemMap.set(b,{ref:b,...h}),()=>{E.itemMap.delete(b)})),y.jsx(p,{[u]:"",ref:S,children:x})});f.displayName=d;function v(m){const g=i(t+"CollectionConsumer",m);return O.useCallback(()=>{const x=g.collectionRef.current;if(!x)return[];const h=Array.from(x.querySelectorAll(`[${u}]`));return Array.from(g.itemMap.values()).sort((E,k)=>h.indexOf(E.ref.current)-h.indexOf(k.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:o,Slot:c,ItemSlot:f},v,n]}var LC=T.createContext(void 0);function Zs(t){const e=T.useContext(LC);return t||e||"ltr"}function ut(t){const e=T.useRef(t);return T.useEffect(()=>{e.current=t}),T.useMemo(()=>(...r)=>e.current?.(...r),[])}function jC(t,e=globalThis?.document){const r=ut(t);T.useEffect(()=>{const n=a=>{a.key==="Escape"&&r(a)};return e.addEventListener("keydown",n,{capture:!0}),()=>e.removeEventListener("keydown",n,{capture:!0})},[r,e])}var WC="DismissableLayer",Qs="dismissableLayer.update",BC="dismissableLayer.pointerDownOutside",qC="dismissableLayer.focusOutside",nm,am=T.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Js=T.forwardRef((t,e)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:o,onDismiss:s,...l}=t,c=T.useContext(am),[d,u]=T.useState(null),p=d?.ownerDocument??globalThis?.document,[,f]=T.useState({}),v=he(e,k=>u(k)),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),w=m.indexOf(g),x=d?m.indexOf(d):-1,h=c.layersWithOutsidePointerEventsDisabled.size>0,b=x>=w,S=$C(k=>{const C=k.target,_=[...c.branches].some(A=>A.contains(C));!b||_||(a?.(k),o?.(k),k.defaultPrevented||s?.())},p),E=GC(k=>{const C=k.target;[...c.branches].some(A=>A.contains(C))||(i?.(k),o?.(k),k.defaultPrevented||s?.())},p);return jC(k=>{x===c.layers.size-1&&(n?.(k),!k.defaultPrevented&&s&&(k.preventDefault(),s()))},p),T.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(nm=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),im(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=nm)}},[d,p,r,c]),T.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),im())},[d,c]),T.useEffect(()=>{const k=()=>f({});return document.addEventListener(Qs,k),()=>document.removeEventListener(Qs,k)},[]),y.jsx(ge.div,{...l,ref:v,style:{pointerEvents:h?b?"auto":"none":void 0,...t.style},onFocusCapture:ce(t.onFocusCapture,E.onFocusCapture),onBlurCapture:ce(t.onBlurCapture,E.onBlurCapture),onPointerDownCapture:ce(t.onPointerDownCapture,S.onPointerDownCapture)})});Js.displayName=WC;var RC="DismissableLayerBranch",FC=T.forwardRef((t,e)=>{const r=T.useContext(am),n=T.useRef(null),a=he(e,n);return T.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),y.jsx(ge.div,{...t,ref:a})});FC.displayName=RC;function $C(t,e=globalThis?.document){const r=ut(t),n=T.useRef(!1),a=T.useRef(()=>{});return T.useEffect(()=>{const i=s=>{if(s.target&&!n.current){let l=function(){om(BC,r,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(e.removeEventListener("click",a.current),a.current=l,e.addEventListener("click",a.current,{once:!0})):l()}else e.removeEventListener("click",a.current);n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",a.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function GC(t,e=globalThis?.document){const r=ut(t),n=T.useRef(!1);return T.useEffect(()=>{const a=i=>{i.target&&!n.current&&om(qC,r,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",a),()=>e.removeEventListener("focusin",a)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function im(){const t=new CustomEvent(Qs);document.dispatchEvent(t)}function om(t,e,r,{discrete:n}){const a=r.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&a.addEventListener(t,e,{once:!0}),n?rm(a,i):a.dispatchEvent(i)}var el=0;function sm(){T.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??lm()),document.body.insertAdjacentElement("beforeend",t[1]??lm()),el++,()=>{el===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),el--}},[])}function lm(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var tl="focusScope.autoFocusOnMount",rl="focusScope.autoFocusOnUnmount",cm={bubbles:!1,cancelable:!0},VC="FocusScope",nl=T.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...o}=t,[s,l]=T.useState(null),c=ut(a),d=ut(i),u=T.useRef(null),p=he(e,m=>l(m)),f=T.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;T.useEffect(()=>{if(n){let m=function(h){if(f.paused||!s)return;const b=h.target;s.contains(b)?u.current=b:Ct(u.current,{select:!0})},g=function(h){if(f.paused||!s)return;const b=h.relatedTarget;b!==null&&(s.contains(b)||Ct(u.current,{select:!0}))},w=function(h){if(document.activeElement===document.body)for(const S of h)S.removedNodes.length>0&&Ct(s)};document.addEventListener("focusin",m),document.addEventListener("focusout",g);const x=new MutationObserver(w);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),x.disconnect()}}},[n,s,f.paused]),T.useEffect(()=>{if(s){pm.add(f);const m=document.activeElement;if(!s.contains(m)){const w=new CustomEvent(tl,cm);s.addEventListener(tl,c),s.dispatchEvent(w),w.defaultPrevented||(HC(ZC(dm(s)),{select:!0}),document.activeElement===m&&Ct(s))}return()=>{s.removeEventListener(tl,c),setTimeout(()=>{const w=new CustomEvent(rl,cm);s.addEventListener(rl,d),s.dispatchEvent(w),w.defaultPrevented||Ct(m??document.body,{select:!0}),s.removeEventListener(rl,d),pm.remove(f)},0)}}},[s,c,d,f]);const v=T.useCallback(m=>{if(!r&&!n||f.paused)return;const g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,w=document.activeElement;if(g&&w){const x=m.currentTarget,[h,b]=UC(x);h&&b?!m.shiftKey&&w===b?(m.preventDefault(),r&&Ct(h,{select:!0})):m.shiftKey&&w===h&&(m.preventDefault(),r&&Ct(b,{select:!0})):w===x&&m.preventDefault()}},[r,n,f.paused]);return y.jsx(ge.div,{tabIndex:-1,...o,ref:p,onKeyDown:v})});nl.displayName=VC;function HC(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Ct(n,{select:e}),document.activeElement!==r)return}function UC(t){const e=dm(t),r=um(e,t),n=um(e.reverse(),t);return[r,n]}function dm(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function um(t,e){for(const r of t)if(!KC(r,{upTo:e}))return r}function KC(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function YC(t){return t instanceof HTMLInputElement&&"select"in t}function Ct(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&YC(t)&&e&&t.select()}}var pm=XC();function XC(){let t=[];return{add(e){const r=t[0];e!==r&&r?.pause(),t=fm(t,e),t.unshift(e)},remove(e){t=fm(t,e),t[0]?.resume()}}}function fm(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function ZC(t){return t.filter(e=>e.tagName!=="A")}var QC=T[" useId ".trim().toString()]||(()=>{}),JC=0;function Zt(t){const[e,r]=T.useState(QC());return wt(()=>{r(n=>n??String(JC++))},[t]),e?`radix-${e}`:""}const e0=["top","right","bottom","left"],kt=Math.min,qe=Math.max,hn=Math.round,gn=Math.floor,tt=t=>({x:t,y:t}),t0={left:"right",right:"left",bottom:"top",top:"bottom"},r0={start:"end",end:"start"};function al(t,e,r){return qe(t,kt(e,r))}function pt(t,e){return typeof t=="function"?t(e):t}function ft(t){return t.split("-")[0]}function Qt(t){return t.split("-")[1]}function il(t){return t==="x"?"y":"x"}function ol(t){return t==="y"?"height":"width"}const n0=new Set(["top","bottom"]);function rt(t){return n0.has(ft(t))?"y":"x"}function sl(t){return il(rt(t))}function a0(t,e,r){r===void 0&&(r=!1);const n=Qt(t),a=sl(t),i=ol(a);let o=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=vn(o)),[o,vn(o)]}function i0(t){const e=vn(t);return[ll(t),e,ll(e)]}function ll(t){return t.replace(/start|end/g,e=>r0[e])}const mm=["left","right"],hm=["right","left"],o0=["top","bottom"],s0=["bottom","top"];function l0(t,e,r){switch(t){case"top":case"bottom":return r?e?hm:mm:e?mm:hm;case"left":case"right":return e?o0:s0;default:return[]}}function c0(t,e,r,n){const a=Qt(t);let i=l0(ft(t),r==="start",n);return a&&(i=i.map(o=>o+"-"+a),e&&(i=i.concat(i.map(ll)))),i}function vn(t){return t.replace(/left|right|bottom|top/g,e=>t0[e])}function d0(t){return{top:0,right:0,bottom:0,left:0,...t}}function gm(t){return typeof t!="number"?d0(t):{top:t,right:t,bottom:t,left:t}}function yn(t){const{x:e,y:r,width:n,height:a}=t;return{width:n,height:a,top:r,left:e,right:e+n,bottom:r+a,x:e,y:r}}function vm(t,e,r){let{reference:n,floating:a}=t;const i=rt(e),o=sl(e),s=ol(o),l=ft(e),c=i==="y",d=n.x+n.width/2-a.width/2,u=n.y+n.height/2-a.height/2,p=n[s]/2-a[s]/2;let f;switch(l){case"top":f={x:d,y:n.y-a.height};break;case"bottom":f={x:d,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:u};break;case"left":f={x:n.x-a.width,y:u};break;default:f={x:n.x,y:n.y}}switch(Qt(e)){case"start":f[o]-=p*(r&&c?-1:1);break;case"end":f[o]+=p*(r&&c?-1:1);break}return f}async function u0(t,e){var r;e===void 0&&(e={});const{x:n,y:a,platform:i,rects:o,elements:s,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:f=0}=pt(e,t),v=gm(f),g=s[p?u==="floating"?"reference":"floating":u],w=yn(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(g)))==null||r?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),x=u==="floating"?{x:n,y:a,width:o.floating.width,height:o.floating.height}:o.reference,h=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),b=await(i.isElement==null?void 0:i.isElement(h))?await(i.getScale==null?void 0:i.getScale(h))||{x:1,y:1}:{x:1,y:1},S=yn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:h,strategy:l}):x);return{top:(w.top-S.top+v.top)/b.y,bottom:(S.bottom-w.bottom+v.bottom)/b.y,left:(w.left-S.left+v.left)/b.x,right:(S.right-w.right+v.right)/b.x}}const p0=async(t,e,r)=>{const{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:o}=r,s=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:a}),{x:d,y:u}=vm(c,n,l),p=n,f={},v=0;for(let g=0;g<s.length;g++){var m;const{name:w,fn:x}=s[g],{x:h,y:b,data:S,reset:E}=await x({x:d,y:u,initialPlacement:n,placement:p,strategy:a,middlewareData:f,rects:c,platform:{...o,detectOverflow:(m=o.detectOverflow)!=null?m:u0},elements:{reference:t,floating:e}});d=h??d,u=b??u,f={...f,[w]:{...f[w],...S}},E&&v<=50&&(v++,typeof E=="object"&&(E.placement&&(p=E.placement),E.rects&&(c=E.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:a}):E.rects),{x:d,y:u}=vm(c,p,l)),g=-1)}return{x:d,y:u,placement:p,strategy:a,middlewareData:f}},f0=t=>({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:a,rects:i,platform:o,elements:s,middlewareData:l}=e,{element:c,padding:d=0}=pt(t,e)||{};if(c==null)return{};const u=gm(d),p={x:r,y:n},f=sl(a),v=ol(f),m=await o.getDimensions(c),g=f==="y",w=g?"top":"left",x=g?"bottom":"right",h=g?"clientHeight":"clientWidth",b=i.reference[v]+i.reference[f]-p[f]-i.floating[v],S=p[f]-i.reference[f],E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let k=E?E[h]:0;(!k||!await(o.isElement==null?void 0:o.isElement(E)))&&(k=s.floating[h]||i.floating[v]);const C=b/2-S/2,_=k/2-m[v]/2-1,A=kt(u[w],_),I=kt(u[x],_),N=A,D=k-m[v]-I,j=k/2-m[v]/2+C,U=al(N,j,D),W=!l.arrow&&Qt(a)!=null&&j!==U&&i.reference[v]/2-(j<N?A:I)-m[v]/2<0,q=W?j<N?j-N:j-D:0;return{[f]:p[f]+q,data:{[f]:U,centerOffset:j-U-q,...W&&{alignmentOffset:q}},reset:W}}}),m0=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,n;const{placement:a,middlewareData:i,rects:o,initialPlacement:s,platform:l,elements:c}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:m=!0,...g}=pt(t,e);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const w=ft(a),x=rt(s),h=ft(s)===s,b=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=p||(h||!m?[vn(s)]:i0(s)),E=v!=="none";!p&&E&&S.push(...c0(s,m,v,b));const k=[s,...S],C=await l.detectOverflow(e,g),_=[];let A=((n=i.flip)==null?void 0:n.overflows)||[];if(d&&_.push(C[w]),u){const j=a0(a,o,b);_.push(C[j[0]],C[j[1]])}if(A=[...A,{placement:a,overflows:_}],!_.every(j=>j<=0)){var I,N;const j=(((I=i.flip)==null?void 0:I.index)||0)+1,U=k[j];if(U&&(!(u==="alignment"?x!==rt(U):!1)||A.every(F=>rt(F.placement)===x?F.overflows[0]>0:!0)))return{data:{index:j,overflows:A},reset:{placement:U}};let W=(N=A.filter(q=>q.overflows[0]<=0).sort((q,F)=>q.overflows[1]-F.overflows[1])[0])==null?void 0:N.placement;if(!W)switch(f){case"bestFit":{var D;const q=(D=A.filter(F=>{if(E){const P=rt(F.placement);return P===x||P==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(P=>P>0).reduce((P,R)=>P+R,0)]).sort((F,P)=>F[1]-P[1])[0])==null?void 0:D[0];q&&(W=q);break}case"initialPlacement":W=s;break}if(a!==W)return{reset:{placement:W}}}return{}}}};function ym(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function bm(t){return e0.some(e=>t[e]>=0)}const h0=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r,platform:n}=e,{strategy:a="referenceHidden",...i}=pt(t,e);switch(a){case"referenceHidden":{const o=await n.detectOverflow(e,{...i,elementContext:"reference"}),s=ym(o,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:bm(s)}}}case"escaped":{const o=await n.detectOverflow(e,{...i,altBoundary:!0}),s=ym(o,r.floating);return{data:{escapedOffsets:s,escaped:bm(s)}}}default:return{}}}}},Sm=new Set(["left","top"]);async function g0(t,e){const{placement:r,platform:n,elements:a}=t,i=await(n.isRTL==null?void 0:n.isRTL(a.floating)),o=ft(r),s=Qt(r),l=rt(r)==="y",c=Sm.has(o)?-1:1,d=i&&l?-1:1,u=pt(e,t);let{mainAxis:p,crossAxis:f,alignmentAxis:v}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&typeof v=="number"&&(f=s==="end"?v*-1:v),l?{x:f*d,y:p*c}:{x:p*c,y:f*d}}const v0=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:a,y:i,placement:o,middlewareData:s}=e,l=await g0(e,t);return o===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:a+l.x,y:i+l.y,data:{...l,placement:o}}}}},y0=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:a,platform:i}=e,{mainAxis:o=!0,crossAxis:s=!1,limiter:l={fn:w=>{let{x,y:h}=w;return{x,y:h}}},...c}=pt(t,e),d={x:r,y:n},u=await i.detectOverflow(e,c),p=rt(ft(a)),f=il(p);let v=d[f],m=d[p];if(o){const w=f==="y"?"top":"left",x=f==="y"?"bottom":"right",h=v+u[w],b=v-u[x];v=al(h,v,b)}if(s){const w=p==="y"?"top":"left",x=p==="y"?"bottom":"right",h=m+u[w],b=m-u[x];m=al(h,m,b)}const g=l.fn({...e,[f]:v,[p]:m});return{...g,data:{x:g.x-r,y:g.y-n,enabled:{[f]:o,[p]:s}}}}}},b0=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:a,rects:i,middlewareData:o}=e,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=pt(t,e),d={x:r,y:n},u=rt(a),p=il(u);let f=d[p],v=d[u];const m=pt(s,e),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const h=p==="y"?"height":"width",b=i.reference[p]-i.floating[h]+g.mainAxis,S=i.reference[p]+i.reference[h]-g.mainAxis;f<b?f=b:f>S&&(f=S)}if(c){var w,x;const h=p==="y"?"width":"height",b=Sm.has(ft(a)),S=i.reference[u]-i.floating[h]+(b&&((w=o.offset)==null?void 0:w[u])||0)+(b?0:g.crossAxis),E=i.reference[u]+i.reference[h]+(b?0:((x=o.offset)==null?void 0:x[u])||0)-(b?g.crossAxis:0);v<S?v=S:v>E&&(v=E)}return{[p]:f,[u]:v}}}},S0=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var r,n;const{placement:a,rects:i,platform:o,elements:s}=e,{apply:l=()=>{},...c}=pt(t,e),d=await o.detectOverflow(e,c),u=ft(a),p=Qt(a),f=rt(a)==="y",{width:v,height:m}=i.floating;let g,w;u==="top"||u==="bottom"?(g=u,w=p===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(w=u,g=p==="end"?"top":"bottom");const x=m-d.top-d.bottom,h=v-d.left-d.right,b=kt(m-d[g],x),S=kt(v-d[w],h),E=!e.middlewareData.shift;let k=b,C=S;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(C=h),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(k=x),E&&!p){const A=qe(d.left,0),I=qe(d.right,0),N=qe(d.top,0),D=qe(d.bottom,0);f?C=v-2*(A!==0||I!==0?A+I:qe(d.left,d.right)):k=m-2*(N!==0||D!==0?N+D:qe(d.top,d.bottom))}await l({...e,availableWidth:C,availableHeight:k});const _=await o.getDimensions(s.floating);return v!==_.width||m!==_.height?{reset:{rects:!0}}:{}}}};function bn(){return typeof window<"u"}function Jt(t){return xm(t)?(t.nodeName||"").toLowerCase():"#document"}function Re(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function nt(t){var e;return(e=(xm(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function xm(t){return bn()?t instanceof Node||t instanceof Re(t).Node:!1}function Ue(t){return bn()?t instanceof Element||t instanceof Re(t).Element:!1}function at(t){return bn()?t instanceof HTMLElement||t instanceof Re(t).HTMLElement:!1}function wm(t){return!bn()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Re(t).ShadowRoot}const x0=new Set(["inline","contents"]);function Er(t){const{overflow:e,overflowX:r,overflowY:n,display:a}=Ke(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!x0.has(a)}const w0=new Set(["table","td","th"]);function C0(t){return w0.has(Jt(t))}const k0=[":popover-open",":modal"];function Sn(t){return k0.some(e=>{try{return t.matches(e)}catch{return!1}})}const E0=["transform","translate","scale","rotate","perspective"],T0=["transform","translate","scale","rotate","perspective","filter"],A0=["paint","layout","strict","content"];function cl(t){const e=dl(),r=Ue(t)?Ke(t):t;return E0.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||T0.some(n=>(r.willChange||"").includes(n))||A0.some(n=>(r.contain||"").includes(n))}function _0(t){let e=Et(t);for(;at(e)&&!er(e);){if(cl(e))return e;if(Sn(e))return null;e=Et(e)}return null}function dl(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const O0=new Set(["html","body","#document"]);function er(t){return O0.has(Jt(t))}function Ke(t){return Re(t).getComputedStyle(t)}function xn(t){return Ue(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Et(t){if(Jt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||wm(t)&&t.host||nt(t);return wm(e)?e.host:e}function Cm(t){const e=Et(t);return er(e)?t.ownerDocument?t.ownerDocument.body:t.body:at(e)&&Er(e)?e:Cm(e)}function Tr(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const a=Cm(t),i=a===((n=t.ownerDocument)==null?void 0:n.body),o=Re(a);if(i){const s=ul(o);return e.concat(o,o.visualViewport||[],Er(a)?a:[],s&&r?Tr(s):[])}return e.concat(a,Tr(a,[],r))}function ul(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function km(t){const e=Ke(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const a=at(t),i=a?t.offsetWidth:r,o=a?t.offsetHeight:n,s=hn(r)!==i||hn(n)!==o;return s&&(r=i,n=o),{width:r,height:n,$:s}}function pl(t){return Ue(t)?t:t.contextElement}function tr(t){const e=pl(t);if(!at(e))return tt(1);const r=e.getBoundingClientRect(),{width:n,height:a,$:i}=km(e);let o=(i?hn(r.width):r.width)/n,s=(i?hn(r.height):r.height)/a;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const P0=tt(0);function Em(t){const e=Re(t);return!dl()||!e.visualViewport?P0:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function I0(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Re(t)?!1:e}function qt(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const a=t.getBoundingClientRect(),i=pl(t);let o=tt(1);e&&(n?Ue(n)&&(o=tr(n)):o=tr(t));const s=I0(i,r,n)?Em(i):tt(0);let l=(a.left+s.x)/o.x,c=(a.top+s.y)/o.y,d=a.width/o.x,u=a.height/o.y;if(i){const p=Re(i),f=n&&Ue(n)?Re(n):n;let v=p,m=ul(v);for(;m&&n&&f!==v;){const g=tr(m),w=m.getBoundingClientRect(),x=Ke(m),h=w.left+(m.clientLeft+parseFloat(x.paddingLeft))*g.x,b=w.top+(m.clientTop+parseFloat(x.paddingTop))*g.y;l*=g.x,c*=g.y,d*=g.x,u*=g.y,l+=h,c+=b,v=Re(m),m=ul(v)}}return yn({width:d,height:u,x:l,y:c})}function wn(t,e){const r=xn(t).scrollLeft;return e?e.left+r:qt(nt(t)).left+r}function Tm(t,e){const r=t.getBoundingClientRect(),n=r.left+e.scrollLeft-wn(t,r),a=r.top+e.scrollTop;return{x:n,y:a}}function N0(t){let{elements:e,rect:r,offsetParent:n,strategy:a}=t;const i=a==="fixed",o=nt(n),s=e?Sn(e.floating):!1;if(n===o||s&&i)return r;let l={scrollLeft:0,scrollTop:0},c=tt(1);const d=tt(0),u=at(n);if((u||!u&&!i)&&((Jt(n)!=="body"||Er(o))&&(l=xn(n)),at(n))){const f=qt(n);c=tr(n),d.x=f.x+n.clientLeft,d.y=f.y+n.clientTop}const p=o&&!u&&!i?Tm(o,l):tt(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+p.x,y:r.y*c.y-l.scrollTop*c.y+d.y+p.y}}function M0(t){return Array.from(t.getClientRects())}function D0(t){const e=nt(t),r=xn(t),n=t.ownerDocument.body,a=qe(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=qe(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+wn(t);const s=-r.scrollTop;return Ke(n).direction==="rtl"&&(o+=qe(e.clientWidth,n.clientWidth)-a),{width:a,height:i,x:o,y:s}}const Am=25;function z0(t,e){const r=Re(t),n=nt(t),a=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,s=0,l=0;if(a){i=a.width,o=a.height;const d=dl();(!d||d&&e==="fixed")&&(s=a.offsetLeft,l=a.offsetTop)}const c=wn(n);if(c<=0){const d=n.ownerDocument,u=d.body,p=getComputedStyle(u),f=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,v=Math.abs(n.clientWidth-u.clientWidth-f);v<=Am&&(i-=v)}else c<=Am&&(i+=c);return{width:i,height:o,x:s,y:l}}const L0=new Set(["absolute","fixed"]);function j0(t,e){const r=qt(t,!0,e==="fixed"),n=r.top+t.clientTop,a=r.left+t.clientLeft,i=at(t)?tr(t):tt(1),o=t.clientWidth*i.x,s=t.clientHeight*i.y,l=a*i.x,c=n*i.y;return{width:o,height:s,x:l,y:c}}function _m(t,e,r){let n;if(e==="viewport")n=z0(t,r);else if(e==="document")n=D0(nt(t));else if(Ue(e))n=j0(e,r);else{const a=Em(t);n={x:e.x-a.x,y:e.y-a.y,width:e.width,height:e.height}}return yn(n)}function Om(t,e){const r=Et(t);return r===e||!Ue(r)||er(r)?!1:Ke(r).position==="fixed"||Om(r,e)}function W0(t,e){const r=e.get(t);if(r)return r;let n=Tr(t,[],!1).filter(s=>Ue(s)&&Jt(s)!=="body"),a=null;const i=Ke(t).position==="fixed";let o=i?Et(t):t;for(;Ue(o)&&!er(o);){const s=Ke(o),l=cl(o);!l&&s.position==="fixed"&&(a=null),(i?!l&&!a:!l&&s.position==="static"&&!!a&&L0.has(a.position)||Er(o)&&!l&&Om(t,o))?n=n.filter(d=>d!==o):a=s,o=Et(o)}return e.set(t,n),n}function B0(t){let{element:e,boundary:r,rootBoundary:n,strategy:a}=t;const o=[...r==="clippingAncestors"?Sn(e)?[]:W0(e,this._c):[].concat(r),n],s=o[0],l=o.reduce((c,d)=>{const u=_m(e,d,a);return c.top=qe(u.top,c.top),c.right=kt(u.right,c.right),c.bottom=kt(u.bottom,c.bottom),c.left=qe(u.left,c.left),c},_m(e,s,a));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function q0(t){const{width:e,height:r}=km(t);return{width:e,height:r}}function R0(t,e,r){const n=at(e),a=nt(e),i=r==="fixed",o=qt(t,!0,i,e);let s={scrollLeft:0,scrollTop:0};const l=tt(0);function c(){l.x=wn(a)}if(n||!n&&!i)if((Jt(e)!=="body"||Er(a))&&(s=xn(e)),n){const f=qt(e,!0,i,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else a&&c();i&&!n&&a&&c();const d=a&&!n&&!i?Tm(a,s):tt(0),u=o.left+s.scrollLeft-l.x-d.x,p=o.top+s.scrollTop-l.y-d.y;return{x:u,y:p,width:o.width,height:o.height}}function fl(t){return Ke(t).position==="static"}function Pm(t,e){if(!at(t)||Ke(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return nt(t)===r&&(r=r.ownerDocument.body),r}function Im(t,e){const r=Re(t);if(Sn(t))return r;if(!at(t)){let a=Et(t);for(;a&&!er(a);){if(Ue(a)&&!fl(a))return a;a=Et(a)}return r}let n=Pm(t,e);for(;n&&C0(n)&&fl(n);)n=Pm(n,e);return n&&er(n)&&fl(n)&&!cl(n)?r:n||_0(t)||r}const F0=async function(t){const e=this.getOffsetParent||Im,r=this.getDimensions,n=await r(t.floating);return{reference:R0(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function $0(t){return Ke(t).direction==="rtl"}const G0={convertOffsetParentRelativeRectToViewportRelativeRect:N0,getDocumentElement:nt,getClippingRect:B0,getOffsetParent:Im,getElementRects:F0,getClientRects:M0,getDimensions:q0,getScale:tr,isElement:Ue,isRTL:$0};function Nm(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function V0(t,e){let r=null,n;const a=nt(t);function i(){var s;clearTimeout(n),(s=r)==null||s.disconnect(),r=null}function o(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const c=t.getBoundingClientRect(),{left:d,top:u,width:p,height:f}=c;if(s||e(),!p||!f)return;const v=gn(u),m=gn(a.clientWidth-(d+p)),g=gn(a.clientHeight-(u+f)),w=gn(d),h={rootMargin:-v+"px "+-m+"px "+-g+"px "+-w+"px",threshold:qe(0,kt(1,l))||1};let b=!0;function S(E){const k=E[0].intersectionRatio;if(k!==l){if(!b)return o();k?o(!1,k):n=setTimeout(()=>{o(!1,1e-7)},1e3)}k===1&&!Nm(c,t.getBoundingClientRect())&&o(),b=!1}try{r=new IntersectionObserver(S,{...h,root:a.ownerDocument})}catch{r=new IntersectionObserver(S,h)}r.observe(t)}return o(!0),i}function H0(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=pl(t),d=a||i?[...c?Tr(c):[],...Tr(e)]:[];d.forEach(w=>{a&&w.addEventListener("scroll",r,{passive:!0}),i&&w.addEventListener("resize",r)});const u=c&&s?V0(c,r):null;let p=-1,f=null;o&&(f=new ResizeObserver(w=>{let[x]=w;x&&x.target===c&&f&&(f.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var h;(h=f)==null||h.observe(e)})),r()}),c&&!l&&f.observe(c),f.observe(e));let v,m=l?qt(t):null;l&&g();function g(){const w=qt(t);m&&!Nm(m,w)&&r(),m=w,v=requestAnimationFrame(g)}return r(),()=>{var w;d.forEach(x=>{a&&x.removeEventListener("scroll",r),i&&x.removeEventListener("resize",r)}),u?.(),(w=f)==null||w.disconnect(),f=null,l&&cancelAnimationFrame(v)}}const U0=v0,K0=y0,Y0=m0,X0=S0,Z0=h0,Mm=f0,Q0=b0,J0=(t,e,r)=>{const n=new Map,a={platform:G0,...r},i={...a.platform,_c:n};return p0(t,e,{...a,platform:i})};var ek=typeof document<"u",tk=function(){},Cn=ek?O.useLayoutEffect:tk;function kn(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,a;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!==e.length)return!1;for(n=r;n--!==0;)if(!kn(t[n],e[n]))return!1;return!0}if(a=Object.keys(t),r=a.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,a[n]))return!1;for(n=r;n--!==0;){const i=a[n];if(!(i==="_owner"&&t.$$typeof)&&!kn(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function Dm(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function zm(t,e){const r=Dm(t);return Math.round(e*r)/r}function ml(t){const e=T.useRef(t);return Cn(()=>{e.current=t}),e}function rk(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:a,elements:{reference:i,floating:o}={},transform:s=!0,whileElementsMounted:l,open:c}=t,[d,u]=T.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[p,f]=T.useState(n);kn(p,n)||f(n);const[v,m]=T.useState(null),[g,w]=T.useState(null),x=T.useCallback(F=>{F!==E.current&&(E.current=F,m(F))},[]),h=T.useCallback(F=>{F!==k.current&&(k.current=F,w(F))},[]),b=i||v,S=o||g,E=T.useRef(null),k=T.useRef(null),C=T.useRef(d),_=l!=null,A=ml(l),I=ml(a),N=ml(c),D=T.useCallback(()=>{if(!E.current||!k.current)return;const F={placement:e,strategy:r,middleware:p};I.current&&(F.platform=I.current),J0(E.current,k.current,F).then(P=>{const R={...P,isPositioned:N.current!==!1};j.current&&!kn(C.current,R)&&(C.current=R,Ac.flushSync(()=>{u(R)}))})},[p,e,r,I,N]);Cn(()=>{c===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,u(F=>({...F,isPositioned:!1})))},[c]);const j=T.useRef(!1);Cn(()=>(j.current=!0,()=>{j.current=!1}),[]),Cn(()=>{if(b&&(E.current=b),S&&(k.current=S),b&&S){if(A.current)return A.current(b,S,D);D()}},[b,S,D,A,_]);const U=T.useMemo(()=>({reference:E,floating:k,setReference:x,setFloating:h}),[x,h]),W=T.useMemo(()=>({reference:b,floating:S}),[b,S]),q=T.useMemo(()=>{const F={position:r,left:0,top:0};if(!W.floating)return F;const P=zm(W.floating,d.x),R=zm(W.floating,d.y);return s?{...F,transform:"translate("+P+"px, "+R+"px)",...Dm(W.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:P,top:R}},[r,s,W.floating,d.x,d.y]);return T.useMemo(()=>({...d,update:D,refs:U,elements:W,floatingStyles:q}),[d,D,U,W,q])}const nk=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:a}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?Mm({element:n.current,padding:a}).fn(r):{}:n?Mm({element:n,padding:a}).fn(r):{}}}},ak=(t,e)=>({...U0(t),options:[t,e]}),ik=(t,e)=>({...K0(t),options:[t,e]}),ok=(t,e)=>({...Q0(t),options:[t,e]}),sk=(t,e)=>({...Y0(t),options:[t,e]}),lk=(t,e)=>({...X0(t),options:[t,e]}),ck=(t,e)=>({...Z0(t),options:[t,e]}),dk=(t,e)=>({...nk(t),options:[t,e]});var uk="Arrow",Lm=T.forwardRef((t,e)=>{const{children:r,width:n=10,height:a=5,...i}=t;return y.jsx(ge.svg,{...i,ref:e,width:n,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:y.jsx("polygon",{points:"0,0 30,0 15,10"})})});Lm.displayName=uk;var pk=Lm;function hl(t){const[e,r]=T.useState(void 0);return wt(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const i=a[0];let o,s;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,s=c.blockSize}else o=t.offsetWidth,s=t.offsetHeight;r({width:o,height:s})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}var gl="Popper",[jm,Wm]=dt(gl),[fk,Bm]=jm(gl),qm=t=>{const{__scopePopper:e,children:r}=t,[n,a]=T.useState(null);return y.jsx(fk,{scope:e,anchor:n,onAnchorChange:a,children:r})};qm.displayName=gl;var Rm="PopperAnchor",Fm=T.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...a}=t,i=Bm(Rm,r),o=T.useRef(null),s=he(e,o),l=T.useRef(null);return T.useEffect(()=>{const c=l.current;l.current=n?.current||o.current,c!==l.current&&i.onAnchorChange(l.current)}),n?null:y.jsx(ge.div,{...a,ref:s})});Fm.displayName=Rm;var vl="PopperContent",[mk,hk]=jm(vl),$m=T.forwardRef((t,e)=>{const{__scopePopper:r,side:n="bottom",sideOffset:a=0,align:i="center",alignOffset:o=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:u="partial",hideWhenDetached:p=!1,updatePositionStrategy:f="optimized",onPlaced:v,...m}=t,g=Bm(vl,r),[w,x]=T.useState(null),h=he(e,K=>x(K)),[b,S]=T.useState(null),E=hl(b),k=E?.width??0,C=E?.height??0,_=n+(i!=="center"?"-"+i:""),A=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},I=Array.isArray(c)?c:[c],N=I.length>0,D={padding:A,boundary:I.filter(vk),altBoundary:N},{refs:j,floatingStyles:U,placement:W,isPositioned:q,middlewareData:F}=rk({strategy:"fixed",placement:_,whileElementsMounted:(...K)=>H0(...K,{animationFrame:f==="always"}),elements:{reference:g.anchor},middleware:[ak({mainAxis:a+C,alignmentAxis:o}),l&&ik({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?ok():void 0,...D}),l&&sk({...D}),lk({...D,apply:({elements:K,rects:ie,availableWidth:ne,availableHeight:M})=>{const{width:$,height:X}=ie.reference,ae=K.floating.style;ae.setProperty("--radix-popper-available-width",`${ne}px`),ae.setProperty("--radix-popper-available-height",`${M}px`),ae.setProperty("--radix-popper-anchor-width",`${$}px`),ae.setProperty("--radix-popper-anchor-height",`${X}px`)}}),b&&dk({element:b,padding:s}),yk({arrowWidth:k,arrowHeight:C}),p&&ck({strategy:"referenceHidden",...D})]}),[P,R]=Hm(W),Y=ut(v);wt(()=>{q&&Y?.()},[q,Y]);const Z=F.arrow?.x,B=F.arrow?.y,z=F.arrow?.centerOffset!==0,[H,G]=T.useState();return wt(()=>{w&&G(window.getComputedStyle(w).zIndex)},[w]),y.jsx("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:q?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(" "),...F.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:y.jsx(mk,{scope:r,placedSide:P,onArrowChange:S,arrowX:Z,arrowY:B,shouldHideArrow:z,children:y.jsx(ge.div,{"data-side":P,"data-align":R,...m,ref:h,style:{...m.style,animation:q?void 0:"none"}})})})});$m.displayName=vl;var Gm="PopperArrow",gk={top:"bottom",right:"left",bottom:"top",left:"right"},Vm=T.forwardRef(function(e,r){const{__scopePopper:n,...a}=e,i=hk(Gm,n),o=gk[i.placedSide];return y.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:y.jsx(pk,{...a,ref:r,style:{...a.style,display:"block"}})})});Vm.displayName=Gm;function vk(t){return t!==null}var yk=t=>({name:"transformOrigin",options:t,fn(e){const{placement:r,rects:n,middlewareData:a}=e,o=a.arrow?.centerOffset!==0,s=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[c,d]=Hm(r),u={start:"0%",center:"50%",end:"100%"}[d],p=(a.arrow?.x??0)+s/2,f=(a.arrow?.y??0)+l/2;let v="",m="";return c==="bottom"?(v=o?u:`${p}px`,m=`${-l}px`):c==="top"?(v=o?u:`${p}px`,m=`${n.floating.height+l}px`):c==="right"?(v=`${-l}px`,m=o?u:`${f}px`):c==="left"&&(v=`${n.floating.width+l}px`,m=o?u:`${f}px`),{data:{x:v,y:m}}}});function Hm(t){const[e,r="center"]=t.split("-");return[e,r]}var bk=qm,Sk=Fm,xk=$m,wk=Vm,Ck="Portal",yl=T.forwardRef((t,e)=>{const{container:r,...n}=t,[a,i]=T.useState(!1);wt(()=>i(!0),[]);const o=r||a&&globalThis?.document?.body;return o?Dt.createPortal(y.jsx(ge.div,{...n,ref:e}),o):null});yl.displayName=Ck;function kk(t,e){return T.useReducer((r,n)=>e[r][n]??r,t)}var Tt=t=>{const{present:e,children:r}=t,n=Ek(e),a=typeof r=="function"?r({present:n.isPresent}):T.Children.only(r),i=he(n.ref,Tk(a));return typeof r=="function"||n.isPresent?T.cloneElement(a,{ref:i}):null};Tt.displayName="Presence";function Ek(t){const[e,r]=T.useState(),n=T.useRef(null),a=T.useRef(t),i=T.useRef("none"),o=t?"mounted":"unmounted",[s,l]=kk(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return T.useEffect(()=>{const c=En(n.current);i.current=s==="mounted"?c:"none"},[s]),wt(()=>{const c=n.current,d=a.current;if(d!==t){const p=i.current,f=En(c);t?l("MOUNT"):f==="none"||c?.display==="none"?l("UNMOUNT"):l(d&&p!==f?"ANIMATION_OUT":"UNMOUNT"),a.current=t}},[t,l]),wt(()=>{if(e){let c;const d=e.ownerDocument.defaultView??window,u=f=>{const m=En(n.current).includes(CSS.escape(f.animationName));if(f.target===e&&m&&(l("ANIMATION_END"),!a.current)){const g=e.style.animationFillMode;e.style.animationFillMode="forwards",c=d.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=g)})}},p=f=>{f.target===e&&(i.current=En(n.current))};return e.addEventListener("animationstart",p),e.addEventListener("animationcancel",u),e.addEventListener("animationend",u),()=>{d.clearTimeout(c),e.removeEventListener("animationstart",p),e.removeEventListener("animationcancel",u),e.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:T.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function En(t){return t?.animationName||"none"}function Tk(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var bl="rovingFocusGroup.onEntryFocus",Ak={bubbles:!1,cancelable:!0},Ar="RovingFocusGroup",[Sl,Um,_k]=Xs(Ar),[Ok,Km]=dt(Ar,[_k]),[Pk,Ik]=Ok(Ar),Ym=T.forwardRef((t,e)=>y.jsx(Sl.Provider,{scope:t.__scopeRovingFocusGroup,children:y.jsx(Sl.Slot,{scope:t.__scopeRovingFocusGroup,children:y.jsx(Nk,{...t,ref:e})})}));Ym.displayName=Ar;var Nk=T.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:a=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...u}=t,p=T.useRef(null),f=he(e,p),v=Zs(i),[m,g]=Cr({prop:o,defaultProp:s??null,onChange:l,caller:Ar}),[w,x]=T.useState(!1),h=ut(c),b=Um(r),S=T.useRef(!1),[E,k]=T.useState(0);return T.useEffect(()=>{const C=p.current;if(C)return C.addEventListener(bl,h),()=>C.removeEventListener(bl,h)},[h]),y.jsx(Pk,{scope:r,orientation:n,dir:v,loop:a,currentTabStopId:m,onItemFocus:T.useCallback(C=>g(C),[g]),onItemShiftTab:T.useCallback(()=>x(!0),[]),onFocusableItemAdd:T.useCallback(()=>k(C=>C+1),[]),onFocusableItemRemove:T.useCallback(()=>k(C=>C-1),[]),children:y.jsx(ge.div,{tabIndex:w||E===0?-1:0,"data-orientation":n,...u,ref:f,style:{outline:"none",...t.style},onMouseDown:ce(t.onMouseDown,()=>{S.current=!0}),onFocus:ce(t.onFocus,C=>{const _=!S.current;if(C.target===C.currentTarget&&_&&!w){const A=new CustomEvent(bl,Ak);if(C.currentTarget.dispatchEvent(A),!A.defaultPrevented){const I=b().filter(W=>W.focusable),N=I.find(W=>W.active),D=I.find(W=>W.id===m),U=[N,D,...I].filter(Boolean).map(W=>W.ref.current);Qm(U,d)}}S.current=!1}),onBlur:ce(t.onBlur,()=>x(!1))})})}),Xm="RovingFocusGroupItem",Zm=T.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:a=!1,tabStopId:i,children:o,...s}=t,l=Zt(),c=i||l,d=Ik(Xm,r),u=d.currentTabStopId===c,p=Um(r),{onFocusableItemAdd:f,onFocusableItemRemove:v,currentTabStopId:m}=d;return T.useEffect(()=>{if(n)return f(),()=>v()},[n,f,v]),y.jsx(Sl.ItemSlot,{scope:r,id:c,focusable:n,active:a,children:y.jsx(ge.span,{tabIndex:u?0:-1,"data-orientation":d.orientation,...s,ref:e,onMouseDown:ce(t.onMouseDown,g=>{n?d.onItemFocus(c):g.preventDefault()}),onFocus:ce(t.onFocus,()=>d.onItemFocus(c)),onKeyDown:ce(t.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){d.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const w=zk(g,d.orientation,d.dir);if(w!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let h=p().filter(b=>b.focusable).map(b=>b.ref.current);if(w==="last")h.reverse();else if(w==="prev"||w==="next"){w==="prev"&&h.reverse();const b=h.indexOf(g.currentTarget);h=d.loop?Lk(h,b+1):h.slice(b+1)}setTimeout(()=>Qm(h))}}),children:typeof o=="function"?o({isCurrentTabStop:u,hasTabStop:m!=null}):o})})});Zm.displayName=Xm;var Mk={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Dk(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function zk(t,e,r){const n=Dk(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Mk[n]}function Qm(t,e=!1){const r=document.activeElement;for(const n of t)if(n===r||(n.focus({preventScroll:e}),document.activeElement!==r))return}function Lk(t,e){return t.map((r,n)=>t[(e+n)%t.length])}var jk=Ym,Wk=Zm,Bk=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},rr=new WeakMap,Tn=new WeakMap,An={},xl=0,Jm=function(t){return t&&(t.host||Jm(t.parentNode))},qk=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=Jm(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},Rk=function(t,e,r,n){var a=qk(e,Array.isArray(t)?t:[t]);An[r]||(An[r]=new WeakMap);var i=An[r],o=[],s=new Set,l=new Set(a),c=function(u){!u||s.has(u)||(s.add(u),c(u.parentNode))};a.forEach(c);var d=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(p){if(s.has(p))d(p);else try{var f=p.getAttribute(n),v=f!==null&&f!=="false",m=(rr.get(p)||0)+1,g=(i.get(p)||0)+1;rr.set(p,m),i.set(p,g),o.push(p),m===1&&v&&Tn.set(p,!0),g===1&&p.setAttribute(r,"true"),v||p.setAttribute(n,"true")}catch(w){console.error("aria-hidden: cannot operate on ",p,w)}})};return d(e),s.clear(),xl++,function(){o.forEach(function(u){var p=rr.get(u)-1,f=i.get(u)-1;rr.set(u,p),i.set(u,f),p||(Tn.has(u)||u.removeAttribute(n),Tn.delete(u)),f||u.removeAttribute(r)}),xl--,xl||(rr=new WeakMap,rr=new WeakMap,Tn=new WeakMap,An={})}},eh=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),a=Bk(t);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live], script"))),Rk(n,a,r,"aria-hidden")):function(){return null}},it=function(){return it=Object.assign||function(e){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},it.apply(this,arguments)};function th(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(t);a<n.length;a++)e.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(t,n[a])&&(r[n[a]]=t[n[a]]);return r}function Fk(t,e,r){if(r||arguments.length===2)for(var n=0,a=e.length,i;n<a;n++)(i||!(n in e))&&(i||(i=Array.prototype.slice.call(e,0,n)),i[n]=e[n]);return t.concat(i||Array.prototype.slice.call(e))}typeof SuppressedError=="function"&&SuppressedError;var _n="right-scroll-bar-position",On="width-before-scroll-bar",$k="with-scroll-bars-hidden",Gk="--removed-body-scroll-bar-size";function wl(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function Vk(t,e){var r=O.useState(function(){return{value:t,callback:e,facade:{get current(){return r.value},set current(n){var a=r.value;a!==n&&(r.value=n,r.callback(n,a))}}}})[0];return r.callback=e,r.facade}var Hk=typeof window<"u"?T.useLayoutEffect:T.useEffect,rh=new WeakMap;function Uk(t,e){var r=Vk(null,function(n){return t.forEach(function(a){return wl(a,n)})});return Hk(function(){var n=rh.get(r);if(n){var a=new Set(n),i=new Set(t),o=r.current;a.forEach(function(s){i.has(s)||wl(s,null)}),i.forEach(function(s){a.has(s)||wl(s,o)})}rh.set(r,t)},[t]),r}function Kk(t){return t}function Yk(t,e){e===void 0&&(e=Kk);var r=[],n=!1,a={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:t},useMedium:function(i){var o=e(i,n);return r.push(o),function(){r=r.filter(function(s){return s!==o})}},assignSyncMedium:function(i){for(n=!0;r.length;){var o=r;r=[],o.forEach(i)}r={push:function(s){return i(s)},filter:function(){return r}}},assignMedium:function(i){n=!0;var o=[];if(r.length){var s=r;r=[],s.forEach(i),o=r}var l=function(){var d=o;o=[],d.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(d){o.push(d),c()},filter:function(d){return o=o.filter(d),r}}}};return a}function Xk(t){t===void 0&&(t={});var e=Yk(null);return e.options=it({async:!0,ssr:!1},t),e}var nh=function(t){var e=t.sideCar,r=th(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=e.read();if(!n)throw new Error("Sidecar medium not found");return T.createElement(n,it({},r))};nh.isSideCarExport=!0;function Zk(t,e){return t.useMedium(e),nh}var ah=Xk(),Cl=function(){},Pn=T.forwardRef(function(t,e){var r=T.useRef(null),n=T.useState({onScrollCapture:Cl,onWheelCapture:Cl,onTouchMoveCapture:Cl}),a=n[0],i=n[1],o=t.forwardProps,s=t.children,l=t.className,c=t.removeScrollBar,d=t.enabled,u=t.shards,p=t.sideCar,f=t.noRelative,v=t.noIsolation,m=t.inert,g=t.allowPinchZoom,w=t.as,x=w===void 0?"div":w,h=t.gapMode,b=th(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=p,E=Uk([r,e]),k=it(it({},b),a);return T.createElement(T.Fragment,null,d&&T.createElement(S,{sideCar:ah,removeScrollBar:c,shards:u,noRelative:f,noIsolation:v,inert:m,setCallbacks:i,allowPinchZoom:!!g,lockRef:r,gapMode:h}),o?T.cloneElement(T.Children.only(s),it(it({},k),{ref:E})):T.createElement(x,it({},k,{className:l,ref:E}),s))});Pn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Pn.classNames={fullWidth:On,zeroRight:_n};var Qk=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Jk(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=Qk();return e&&t.setAttribute("nonce",e),t}function eE(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function tE(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var rE=function(){var t=0,e=null;return{add:function(r){t==0&&(e=Jk())&&(eE(e,r),tE(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},nE=function(){var t=rE();return function(e,r){T.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&r])}},ih=function(){var t=nE(),e=function(r){var n=r.styles,a=r.dynamic;return t(n,a),null};return e},aE={left:0,top:0,right:0,gap:0},kl=function(t){return parseInt(t||"",10)||0},iE=function(t){var e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],n=e[t==="padding"?"paddingTop":"marginTop"],a=e[t==="padding"?"paddingRight":"marginRight"];return[kl(r),kl(n),kl(a)]},oE=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return aE;var e=iE(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},sE=ih(),nr="data-scroll-locked",lE=function(t,e,r,n){var a=t.left,i=t.top,o=t.right,s=t.gap;return r===void 0&&(r="margin"),`
834
+ ${d}`}const u=hf(()=>{if(!i.current||!o.current){console.warn("Container or page content reference is missing.");return}if(n)return;a(!0),s.current.prepareRendering(i.current);const p=new js,f=s.current.getStyleUrls(d,c?.page?.printCssUrl??"");try{p.preview(o.current?.innerHTML??"",f,i.current).then(()=>{a(!1),s.current.finalizeRendering(i.current)})}catch(v){console.error("Error during Paged.js preview rendering:",v),a(!1)}},500);return O.useEffect(()=>{u()},[t,r]),y.jsxs(vf,{config:c,children:[y.jsx("div",{className:[e??"",n?"rendering":"rendered",c?.page?.showBleed?"uhuu-bleed-visible":"",c?.page?.preview??""].filter(Boolean).join(" "),ref:i}),y.jsx("div",{className:"uhuu-reactive-content",style:{display:"none"},ref:o,children:t})]})},lw=({children:t})=>y.jsx(y.Fragment,{children:t});class ln{static handlePageBreakStyles(){document?.querySelectorAll(".page-break-after[data-paged-css]").forEach(e=>{const r=e.closest("div.uhuu-page-sheet"),n=e.getAttribute("data-paged-css");r&&n&&n.split(" ").filter(Boolean).forEach(i=>r.classList.add(i))})}static handleUhuuDialogs(){const e=function(){const r=JSON.parse(this.getAttribute("data-uhuu")||"{}");$uhuu.editDialog(r)};document?.querySelectorAll("[data-uhuu]").forEach(r=>{r.removeEventListener("click",e),r.addEventListener("click",e)})}static handle(){ln.handlePageBreakStyles(),ln.handleUhuuDialogs()}}class yf{static setupPageStyles(e){if(!e||typeof document>"u")return;const r=document.createElement("link");return r.rel="stylesheet",r.href=e,document.head.appendChild(r),r}static removePageStyles(e){e&&typeof document<"u"&&document?.head.removeChild(e)}}const Ws=({children:t,className:e,setup:r})=>{const n=gf.pageParams("static",r);O.useEffect(()=>{n?.page?.compatibility&&ln.handle();const i=yf.setupPageStyles(n?.page?.printCssUrl);return()=>{i&&yf.removePageStyles(i)}},[r,n?.page?.compatibility,n?.page?.printCssUrl]);const a=[e,n?.page?.preview].filter(Boolean).join(" ");return y.jsx(vf,{config:n,children:y.jsx("div",{className:a,children:t})})},Bs=O.forwardRef(({children:t,className:e="",style:r,pageNo:n,overlay:a,showBleed:i,"data-page-key":o},s)=>{const l=O.useContext(jt),c=i??l?.page?.showBleed??!1;return y.jsxs("div",{className:`uhuu-page-sheet ${e}`,style:r,ref:s,"data-page-key":o,children:[t,a&&a({pageNo:n}),c&&y.jsx("div",{className:"uhuu-bleed-area"})]})});function cn(){if(typeof window<"u"){const t=window.location.hostname;return t==="localhost"||t==="127.0.0.1"||t.endsWith(".local")||window.location.port!==""}return!1}function cw({heights:t=[],keys:e=[],metas:r=[],availableHeight:n=0}={}){const a=[{indexes:[],keys:[]}];let i=0;const o=()=>{a[a.length-1].indexes.length>0&&(a.push({indexes:[],keys:[]}),i=0)};for(let l=0;l<t.length;l+=1){const c=r[l]??{},d=t[l]??0,u=e[l]??String(l),p=c.keepWithNext?t[l+1]??0:0,f=d+p;c.breakBefore&&o(),a[a.length-1].indexes.length>0&&i+f>n&&o(),a[a.length-1].indexes.push(l),a[a.length-1].keys.push(u),i+=d,c.breakAfter&&l<t.length-1&&o()}const s=a.filter(l=>l.indexes.length>0);return s.length?s:[{indexes:[],keys:[]}]}const dn=T.createContext(null),dw=typeof window>"u"?T.useEffect:T.useLayoutEffect;function bf(t){const e=t.getBoundingClientRect(),r=window.getComputedStyle(t),n=Number.parseFloat(r.marginTop||"0")||0,a=Number.parseFloat(r.marginBottom||"0")||0;return e.height+n+a}function uw(t){return{breakBefore:t.dataset.uhuuFlowBreakBefore==="true",breakAfter:t.dataset.uhuuFlowBreakAfter==="true",keepWithNext:t.dataset.uhuuFlowKeepWithNext==="true"}}function pw(t,e,r={}){const n=e.dataset.uhuuFlowId;if(!n)return null;const a=Array.from(e.querySelectorAll('[data-uhuu-flow-item="true"]'));if(!a.length)return{flowId:n,chunks:[{indexes:[],keys:[]}],signature:`${n}:empty`};const o=t.getBoundingClientRect().height||t.clientHeight,s=Number.isFinite(o)&&o>0,l=s?o:a.reduce((v,m)=>v+bf(m),0),c=a.map(bf),d=a.map(uw),u=a.map((v,m)=>v.dataset.uhuuFlowKey||String(m));if(s||r.onZeroHeight?.(),s){const v=c.findIndex(m=>m>l);v>=0&&r.onOversizedItem?.(u[v],c[v],l)}const p=cw({heights:c,keys:u,metas:d,availableHeight:l}),f=JSON.stringify({flowId:n,availableHeight:Math.round(l*100)/100,heights:c.map(v=>Math.round(v*100)/100),keys:u,metas:d,chunks:p});return{flowId:n,chunks:p,signature:f}}function fw({children:t,className:e="",style:r}){const n=T.useContext(dn),a=T.useRef(null),i=T.useRef(""),o=T.useRef(!1),s=T.useRef(!1),l=T.useRef(new Set);return dw(()=>{if(n?.mode!=="measure"||!n.registerMeasurement||!a.current)return;const c=a.current;let d=0,u=null;i.current="";const p=()=>{window.cancelAnimationFrame(d),d=window.requestAnimationFrame(m)},f=new Set,v=()=>{if(u){for(const w of Array.from(f))c.contains(w)||(u.unobserve(w),f.delete(w));c.querySelectorAll('[data-uhuu-flow-item="true"]').forEach(w=>{f.has(w)||(f.add(w),u?.observe(w))})}},m=()=>{v();const w=c.querySelectorAll('[data-uhuu-flow="true"]');w.length>1&&!o.current&&cn()&&(o.current=!0,console.warn("[uhuu-components] Static.FlowArea supports one Static.Flow child. Additional Static.Flow elements in the same area are ignored. Use one FlowArea per flow region."));const x=w[0];if(!x)return;const h=pw(c,x,{onZeroHeight:()=>{s.current||!cn()||(s.current=!0,console.warn("[uhuu-components] Static.FlowArea has flow items but no measurable height. Give the area an explicit height or use a constrained flex layout such as flex-1 min-h-0."))},onOversizedItem:(b,S,E)=>{l.current.has(b)||!cn()||(l.current.add(b),console.warn(`[uhuu-components] Static.Flow item "${b}" is taller than its FlowArea (${Math.round(S)}px > ${Math.round(E)}px). V1 can only move whole items, so split this item if it must fit within a page.`))}});!h||h.signature===i.current||(i.current=h.signature,n.registerMeasurement?.(h))};u=new ResizeObserver(p),u.observe(c),v(),p();const g=new MutationObserver(()=>{v(),p()});return g.observe(c,{attributes:!0,attributeFilter:["class","style","data-uhuu-flow","data-uhuu-flow-id","data-uhuu-flow-item","data-uhuu-flow-key","data-uhuu-flow-break-before","data-uhuu-flow-break-after","data-uhuu-flow-keep-with-next"],characterData:!0,childList:!0,subtree:!0}),()=>{window.cancelAnimationFrame(d),u?.disconnect(),g.disconnect()}},[n]),y.jsx("div",{ref:a,className:e,style:r,"data-uhuu-flow-area":"true",children:t})}function mw({id:t,items:e,getKey:r,renderItem:n,getItemMeta:a,className:i="",itemClassName:o}){const s=T.useContext(dn),l=s?.chunksByFlowId?.[t],d=(s?.mode==="visible"&&l?l[s.pageIndex]?.indexes??[]:s?.mode==="visible"&&s.pageIndex>0?[]:e.map((u,p)=>p)).filter(u=>Number.isInteger(u)&&u>=0&&u<e.length);return y.jsx("div",{className:i,"data-uhuu-flow":"true","data-uhuu-flow-id":t,children:d.map(u=>{const p=e[u];if(p===void 0)return null;const f=r(p,u),v=a?.(p,u)??{},m=typeof o=="function"?o(p,u):o;return y.jsx("div",{className:m,style:{display:"flow-root"},"data-uhuu-flow-item":"true","data-uhuu-flow-key":String(f),"data-uhuu-flow-index":u,"data-uhuu-flow-break-before":v.breakBefore?"true":void 0,"data-uhuu-flow-break-after":v.breakAfter?"true":void 0,"data-uhuu-flow-keep-with-next":v.keepWithNext?"true":void 0,children:n(p,u)},f)})})}const Xt=(t,e)=>{const r=t.dialog;return r?e?.page?.paginationType==="dynamic"?{"data-uhuu":JSON.stringify(r)}:{onClick:n=>{n.stopPropagation(),window.$uhuu?.editDialog(r)},"data-uhuu":""}:{}},qs=({onError:t})=>r=>{t?.(r)},Rs=t=>{const e=O.useContext(jt),r=qs({onError:t.onError}),n=t.bleed??e?.page?.bleed??0,a=t.pageWidth??e?.page?.width??210,i=t.pageHeight??e?.page?.height??297,{src:o,backgroundColor:s,width:l,height:c,left:d=0,right:u=0,top:p=0,bottom:f=0}=t,v=E=>`${E}mm`,m=()=>{let E=l;return l?!d&&!u&&(E+=n):(E=a,d||(E+=n),u||(E+=n),(d||u)&&(E-=(d??0)+(u??0))),E},g=()=>{let E=c;return c?!p&&!f&&(E+=n):(E=i,p||(E+=n),f||(E+=n),(p||f)&&(E-=(p??0)+(f??0))),E},w=m(),x=g(),h=E=>E!==void 0?v(E):void 0,S=(E=>Object.fromEntries(Object.entries(E).filter(([k,C])=>C!==void 0)))({backgroundColor:s,width:h(w),height:h(x),left:h(d>0?d+n:d),right:h(u>0?u+n:u),top:h(p>0?p+n:p),bottom:h(f>0?f+n:f)});return y.jsx("div",{className:"uhuu-image-container",style:S,...t.dataUhuu!==void 0?{"data-uhuu":t.dataUhuu}:{},children:y.jsxs("div",{className:"uhuu-image-inner",...Xt(t,e),children:[y.jsx("img",{className:"cover-image object-cover object-center",src:o||null,onError:r}),t.children]})})};const hw=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),gw=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,n)=>n?n.toUpperCase():r.toLowerCase()),Sf=t=>{const e=gw(t);return e.charAt(0).toUpperCase()+e.slice(1)},xf=(...t)=>t.filter((e,r,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===r).join(" ").trim(),vw=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var yw={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const bw=O.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:i,iconNode:o,...s},l)=>O.createElement("svg",{ref:l,...yw,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:xf("lucide",a),...!i&&!vw(s)&&{"aria-hidden":"true"},...s},[...o.map(([c,d])=>O.createElement(c,d)),...Array.isArray(i)?i:[i]]));const be=(t,e)=>{const r=O.forwardRef(({className:n,...a},i)=>O.createElement(bw,{ref:i,iconNode:e,className:xf(`lucide-${hw(Sf(t))}`,`lucide-${t}`,n),...a}));return r.displayName=Sf(t),r};const Sw=be("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);const wf=be("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);const xw=be("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);const ww=be("book-dashed",[["path",{d:"M12 17h1.5",key:"1gkc67"}],["path",{d:"M12 22h1.5",key:"1my7sn"}],["path",{d:"M12 2h1.5",key:"19tvb7"}],["path",{d:"M17.5 22H19a1 1 0 0 0 1-1",key:"10akbh"}],["path",{d:"M17.5 2H19a1 1 0 0 1 1 1v1.5",key:"1vrfjs"}],["path",{d:"M20 14v3h-2.5",key:"1naeju"}],["path",{d:"M20 8.5V10",key:"1ctpfu"}],["path",{d:"M4 10V8.5",key:"1o3zg5"}],["path",{d:"M4 19.5V14",key:"ob81pf"}],["path",{d:"M4 4.5A2.5 2.5 0 0 1 6.5 2H8",key:"s8vcyb"}],["path",{d:"M8 22H6.5a1 1 0 0 1 0-5H8",key:"1cu73q"}]]);const un=be("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Cf=be("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Cw=be("clipboard-list",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);const kw=be("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const kf=be("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);const Ef=be("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);const Fs=be("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const Ew=be("maximize",[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]]);const Tw=be("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);const Aw=be("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);const lt=be("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const _w=be("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);const Ow=be("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const Pw=be("unfold-horizontal",[["path",{d:"M16 12h6",key:"15xry1"}],["path",{d:"M8 12H2",key:"1jqql6"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 8v2",key:"1woqiv"}],["path",{d:"M12 14v2",key:"8jcxud"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m19 15 3-3-3-3",key:"wjy7rq"}],["path",{d:"m5 9-3 3 3 3",key:"j64kie"}]]);const Iw=be("unfold-vertical",[["path",{d:"M12 22v-6",key:"6o8u61"}],["path",{d:"M12 8V2",key:"1wkif3"}],["path",{d:"M4 12H2",key:"rhcxmi"}],["path",{d:"M10 12H8",key:"s88cx1"}],["path",{d:"M16 12h-2",key:"10asgb"}],["path",{d:"M22 12h-2",key:"14jgyd"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m15 5-3-3-3 3",key:"itvq4r"}]]);const Tf=be("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);const Nw=be("zoom-in",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);const Mw=be("zoom-out",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),Af=T.createContext({portalContainer:null});function $s(){return T.useContext(Af)}function Dw({children:t}){const[e,r]=T.useState(null);return T.useEffect(()=>{if(typeof document>"u")return;const n=document.createElement("div");return n.setAttribute("data-uhuu-portal",""),n.style.cssText="position: fixed; top: 0; left: 0; z-index: 9999;",document.body.appendChild(n),r(n),()=>{document.body.removeChild(n)}},[]),y.jsx(Af.Provider,{value:{portalContainer:e},children:t})}const _f=O.createContext({interactive:!0,setInteractive:()=>{},enableDevTools:!1});function Gs(){return O.useContext(_f)}function Vs(){const{interactive:t}=Gs();return!t}function zw({children:t,defaultInteractive:e=!0,enableDevTools:r=!1}){const a=!!(typeof window<"u"&&window?.$uhuu_renderer)?!1:e,[i,o]=O.useState(a);return y.jsx(_f.Provider,{value:{interactive:i,setInteractive:o,enableDevTools:r},children:y.jsx(Dw,{children:y.jsx("div",{"data-uhuu-interactive":i?"":void 0,style:{display:"contents"},children:t})})})}function Of(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(e=0;e<a;e++)t[e]&&(r=Of(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Pf(){for(var t,e,r=0,n="",a=arguments.length;r<a;r++)(t=arguments[r])&&(e=Of(t))&&(n&&(n+=" "),n+=e);return n}const If=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Nf=Pf,Mf=(t,e)=>r=>{var n;if(e?.variants==null)return Nf(t,r?.class,r?.className);const{variants:a,defaultVariants:i}=e,o=Object.keys(a).map(c=>{const d=r?.[c],u=i?.[c];if(d===null)return null;const p=If(d)||If(u);return a[c][p]}),s=r&&Object.entries(r).reduce((c,d)=>{let[u,p]=d;return p===void 0||(c[u]=p),c},{}),l=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((c,d)=>{let{class:u,className:p,...f}=d;return Object.entries(f).every(v=>{let[m,g]=v;return Array.isArray(g)?g.includes({...i,...s}[m]):{...i,...s}[m]===g})?[...c,u,p]:c},[]);return Nf(t,o,l,r?.class,r?.className)},Lw=(t,e)=>{const r=new Array(t.length+e.length);for(let n=0;n<t.length;n++)r[n]=t[n];for(let n=0;n<e.length;n++)r[t.length+n]=e[n];return r},jw=(t,e)=>({classGroupId:t,validator:e}),Df=(t=new Map,e=null,r)=>({nextPart:t,validators:e,classGroupId:r}),pn="-",zf=[],Ww="arbitrary..",Bw=t=>{const e=Rw(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return qw(o);const s=o.split(pn),l=s[0]===""&&s.length>1?1:0;return Lf(s,l,e)},getConflictingClassGroupIds:(o,s)=>{if(s){const l=n[o],c=r[o];return l?c?Lw(c,l):l:c||zf}return r[o]||zf}}},Lf=(t,e,r)=>{if(t.length-e===0)return r.classGroupId;const a=t[e],i=r.nextPart.get(a);if(i){const c=Lf(t,e+1,i);if(c)return c}const o=r.validators;if(o===null)return;const s=e===0?t.join(pn):t.slice(e).join(pn),l=o.length;for(let c=0;c<l;c++){const d=o[c];if(d.validator(s))return d.classGroupId}},qw=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),r=e.indexOf(":"),n=e.slice(0,r);return n?Ww+n:void 0})(),Rw=t=>{const{theme:e,classGroups:r}=t;return Fw(r,e)},Fw=(t,e)=>{const r=Df();for(const n in t){const a=t[n];Hs(a,r,n,e)}return r},Hs=(t,e,r,n)=>{const a=t.length;for(let i=0;i<a;i++){const o=t[i];$w(o,e,r,n)}},$w=(t,e,r,n)=>{if(typeof t=="string"){Gw(t,e,r);return}if(typeof t=="function"){Vw(t,e,r,n);return}Hw(t,e,r,n)},Gw=(t,e,r)=>{const n=t===""?e:jf(e,t);n.classGroupId=r},Vw=(t,e,r,n)=>{if(Uw(t)){Hs(t(n),e,r,n);return}e.validators===null&&(e.validators=[]),e.validators.push(jw(r,t))},Hw=(t,e,r,n)=>{const a=Object.entries(t),i=a.length;for(let o=0;o<i;o++){const[s,l]=a[o];Hs(l,jf(e,s),r,n)}},jf=(t,e)=>{let r=t;const n=e.split(pn),a=n.length;for(let i=0;i<a;i++){const o=n[i];let s=r.nextPart.get(o);s||(s=Df(),r.nextPart.set(o,s)),r=s}return r},Uw=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,Kw=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=Object.create(null),n=Object.create(null);const a=(i,o)=>{r[i]=o,e++,e>t&&(e=0,n=r,r=Object.create(null))};return{get(i){let o=r[i];if(o!==void 0)return o;if((o=n[i])!==void 0)return a(i,o),o},set(i,o){i in r?r[i]=o:a(i,o)}}},Us="!",Wf=":",Yw=[],Bf=(t,e,r,n,a)=>({modifiers:t,hasImportantModifier:e,baseClassName:r,maybePostfixModifierPosition:n,isExternal:a}),Xw=t=>{const{prefix:e,experimentalParseClassName:r}=t;let n=a=>{const i=[];let o=0,s=0,l=0,c;const d=a.length;for(let m=0;m<d;m++){const g=a[m];if(o===0&&s===0){if(g===Wf){i.push(a.slice(l,m)),l=m+1;continue}if(g==="/"){c=m;continue}}g==="["?o++:g==="]"?o--:g==="("?s++:g===")"&&s--}const u=i.length===0?a:a.slice(l);let p=u,f=!1;u.endsWith(Us)?(p=u.slice(0,-1),f=!0):u.startsWith(Us)&&(p=u.slice(1),f=!0);const v=c&&c>l?c-l:void 0;return Bf(i,f,p,v)};if(e){const a=e+Wf,i=n;n=o=>o.startsWith(a)?i(o.slice(a.length)):Bf(Yw,!1,o,void 0,!0)}if(r){const a=n;n=i=>r({className:i,parseClassName:a})}return n},Zw=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((r,n)=>{e.set(r,1e6+n)}),r=>{const n=[];let a=[];for(let i=0;i<r.length;i++){const o=r[i],s=o[0]==="[",l=e.has(o);s||l?(a.length>0&&(a.sort(),n.push(...a),a=[]),n.push(o)):a.push(o)}return a.length>0&&(a.sort(),n.push(...a)),n}},Qw=t=>({cache:Kw(t.cacheSize),parseClassName:Xw(t),sortModifiers:Zw(t),...Bw(t)}),Jw=/\s+/,eC=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a,sortModifiers:i}=e,o=[],s=t.trim().split(Jw);let l="";for(let c=s.length-1;c>=0;c-=1){const d=s[c],{isExternal:u,modifiers:p,hasImportantModifier:f,baseClassName:v,maybePostfixModifierPosition:m}=r(d);if(u){l=d+(l.length>0?" "+l:l);continue}let g=!!m,w=n(g?v.substring(0,m):v);if(!w){if(!g){l=d+(l.length>0?" "+l:l);continue}if(w=n(v),!w){l=d+(l.length>0?" "+l:l);continue}g=!1}const x=p.length===0?"":p.length===1?p[0]:i(p).join(":"),h=f?x+Us:x,b=h+w;if(o.indexOf(b)>-1)continue;o.push(b);const S=a(w,g);for(let E=0;E<S.length;++E){const k=S[E];o.push(h+k)}l=d+(l.length>0?" "+l:l)}return l},tC=(...t)=>{let e=0,r,n,a="";for(;e<t.length;)(r=t[e++])&&(n=qf(r))&&(a&&(a+=" "),a+=n);return a},qf=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=qf(t[n]))&&(r&&(r+=" "),r+=e);return r},rC=(t,...e)=>{let r,n,a,i;const o=l=>{const c=e.reduce((d,u)=>u(d),t());return r=Qw(c),n=r.cache.get,a=r.cache.set,i=s,s(l)},s=l=>{const c=n(l);if(c)return c;const d=eC(l,r);return a(l,d),d};return i=o,(...l)=>i(tC(...l))},nC=[],we=t=>{const e=r=>r[t]||nC;return e.isThemeGetter=!0,e},Rf=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ff=/^\((?:(\w[\w-]*):)?(.+)\)$/i,aC=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,iC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,oC=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,sC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,lC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,cC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,bt=t=>aC.test(t),pe=t=>!!t&&!Number.isNaN(Number(t)),St=t=>!!t&&Number.isInteger(Number(t)),Ks=t=>t.endsWith("%")&&pe(t.slice(0,-1)),ct=t=>iC.test(t),$f=()=>!0,dC=t=>oC.test(t)&&!sC.test(t),Ys=()=>!1,uC=t=>lC.test(t),pC=t=>cC.test(t),fC=t=>!Q(t)&&!ee(t),mC=t=>xt(t,Yf,Ys),Q=t=>Rf.test(t),Wt=t=>xt(t,Xf,dC),Gf=t=>xt(t,wC,pe),hC=t=>xt(t,Qf,$f),gC=t=>xt(t,Zf,Ys),Vf=t=>xt(t,Uf,Ys),vC=t=>xt(t,Kf,pC),fn=t=>xt(t,Jf,uC),ee=t=>Ff.test(t),xr=t=>Bt(t,Xf),yC=t=>Bt(t,Zf),Hf=t=>Bt(t,Uf),bC=t=>Bt(t,Yf),SC=t=>Bt(t,Kf),mn=t=>Bt(t,Jf,!0),xC=t=>Bt(t,Qf,!0),xt=(t,e,r)=>{const n=Rf.exec(t);return n?n[1]?e(n[1]):r(n[2]):!1},Bt=(t,e,r=!1)=>{const n=Ff.exec(t);return n?n[1]?e(n[1]):r:!1},Uf=t=>t==="position"||t==="percentage",Kf=t=>t==="image"||t==="url",Yf=t=>t==="length"||t==="size"||t==="bg-size",Xf=t=>t==="length",wC=t=>t==="number",Zf=t=>t==="family-name",Qf=t=>t==="number"||t==="weight",Jf=t=>t==="shadow",CC=rC(()=>{const t=we("color"),e=we("font"),r=we("text"),n=we("font-weight"),a=we("tracking"),i=we("leading"),o=we("breakpoint"),s=we("container"),l=we("spacing"),c=we("radius"),d=we("shadow"),u=we("inset-shadow"),p=we("text-shadow"),f=we("drop-shadow"),v=we("blur"),m=we("perspective"),g=we("aspect"),w=we("ease"),x=we("animate"),h=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...b(),ee,Q],E=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],C=()=>[ee,Q,l],_=()=>[bt,"full","auto",...C()],A=()=>[St,"none","subgrid",ee,Q],I=()=>["auto",{span:["full",St,ee,Q]},St,ee,Q],N=()=>[St,"auto",ee,Q],D=()=>["auto","min","max","fr",ee,Q],j=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],U=()=>["start","end","center","stretch","center-safe","end-safe"],W=()=>["auto",...C()],q=()=>[bt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],F=()=>[bt,"screen","full","dvw","lvw","svw","min","max","fit",...C()],P=()=>[bt,"screen","full","lh","dvh","lvh","svh","min","max","fit",...C()],R=()=>[t,ee,Q],Y=()=>[...b(),Hf,Vf,{position:[ee,Q]}],Z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",bC,mC,{size:[ee,Q]}],z=()=>[Ks,xr,Wt],H=()=>["","none","full",c,ee,Q],G=()=>["",pe,xr,Wt],K=()=>["solid","dashed","dotted","double"],ie=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ne=()=>[pe,Ks,Hf,Vf],M=()=>["","none",v,ee,Q],$=()=>["none",pe,ee,Q],X=()=>["none",pe,ee,Q],ae=()=>[pe,ee,Q],se=()=>[bt,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ct],breakpoint:[ct],color:[$f],container:[ct],"drop-shadow":[ct],ease:["in","out","in-out"],font:[fC],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ct],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ct],shadow:[ct],spacing:["px",pe],text:[ct],"text-shadow":[ct],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",bt,Q,ee,g]}],container:["container"],columns:[{columns:[pe,Q,ee,s]}],"break-after":[{"break-after":h()}],"break-before":[{"break-before":h()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:S()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:_()}],"inset-x":[{"inset-x":_()}],"inset-y":[{"inset-y":_()}],start:[{"inset-s":_(),start:_()}],end:[{"inset-e":_(),end:_()}],"inset-bs":[{"inset-bs":_()}],"inset-be":[{"inset-be":_()}],top:[{top:_()}],right:[{right:_()}],bottom:[{bottom:_()}],left:[{left:_()}],visibility:["visible","invisible","collapse"],z:[{z:[St,"auto",ee,Q]}],basis:[{basis:[bt,"full","auto",s,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[pe,bt,"auto","initial","none",Q]}],grow:[{grow:["",pe,ee,Q]}],shrink:[{shrink:["",pe,ee,Q]}],order:[{order:[St,"first","last","none",ee,Q]}],"grid-cols":[{"grid-cols":A()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":A()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":D()}],"auto-rows":[{"auto-rows":D()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...j(),"normal"]}],"justify-items":[{"justify-items":[...U(),"normal"]}],"justify-self":[{"justify-self":["auto",...U()]}],"align-content":[{content:["normal",...j()]}],"align-items":[{items:[...U(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...U(),{baseline:["","last"]}]}],"place-content":[{"place-content":j()}],"place-items":[{"place-items":[...U(),"baseline"]}],"place-self":[{"place-self":["auto",...U()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pbs:[{pbs:C()}],pbe:[{pbe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:W()}],mx:[{mx:W()}],my:[{my:W()}],ms:[{ms:W()}],me:[{me:W()}],mbs:[{mbs:W()}],mbe:[{mbe:W()}],mt:[{mt:W()}],mr:[{mr:W()}],mb:[{mb:W()}],ml:[{ml:W()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:q()}],"inline-size":[{inline:["auto",...F()]}],"min-inline-size":[{"min-inline":["auto",...F()]}],"max-inline-size":[{"max-inline":["none",...F()]}],"block-size":[{block:["auto",...P()]}],"min-block-size":[{"min-block":["auto",...P()]}],"max-block-size":[{"max-block":["none",...P()]}],w:[{w:[s,"screen",...q()]}],"min-w":[{"min-w":[s,"screen","none",...q()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[o]},...q()]}],h:[{h:["screen","lh",...q()]}],"min-h":[{"min-h":["screen","lh","none",...q()]}],"max-h":[{"max-h":["screen","lh",...q()]}],"font-size":[{text:["base",r,xr,Wt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,xC,hC]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ks,Q]}],"font-family":[{font:[yC,gC,e]}],"font-features":[{"font-features":[Q]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,ee,Q]}],"line-clamp":[{"line-clamp":[pe,"none",ee,Gf]}],leading:[{leading:[i,...C()]}],"list-image":[{"list-image":["none",ee,Q]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ee,Q]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:[pe,"from-font","auto",ee,Wt]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[pe,"auto",ee,Q]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ee,Q]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ee,Q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Y()}],"bg-repeat":[{bg:Z()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},St,ee,Q],radial:["",ee,Q],conic:[St,ee,Q]},SC,vC]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:z()}],"gradient-via-pos":[{via:z()}],"gradient-to-pos":[{to:z()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:G()}],"border-w-x":[{"border-x":G()}],"border-w-y":[{"border-y":G()}],"border-w-s":[{"border-s":G()}],"border-w-e":[{"border-e":G()}],"border-w-bs":[{"border-bs":G()}],"border-w-be":[{"border-be":G()}],"border-w-t":[{"border-t":G()}],"border-w-r":[{"border-r":G()}],"border-w-b":[{"border-b":G()}],"border-w-l":[{"border-l":G()}],"divide-x":[{"divide-x":G()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":G()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...K(),"hidden","none"]}],"divide-style":[{divide:[...K(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-bs":[{"border-bs":R()}],"border-color-be":[{"border-be":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...K(),"none","hidden"]}],"outline-offset":[{"outline-offset":[pe,ee,Q]}],"outline-w":[{outline:["",pe,xr,Wt]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",d,mn,fn]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",u,mn,fn]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[pe,Wt]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":G()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",p,mn,fn]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[pe,ee,Q]}],"mix-blend":[{"mix-blend":[...ie(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ie()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[pe]}],"mask-image-linear-from-pos":[{"mask-linear-from":ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":ne()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":ne()}],"mask-image-t-to-pos":[{"mask-t-to":ne()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":ne()}],"mask-image-r-to-pos":[{"mask-r-to":ne()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":ne()}],"mask-image-b-to-pos":[{"mask-b-to":ne()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":ne()}],"mask-image-l-to-pos":[{"mask-l-to":ne()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":ne()}],"mask-image-x-to-pos":[{"mask-x-to":ne()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":ne()}],"mask-image-y-to-pos":[{"mask-y-to":ne()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[ee,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":ne()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[pe]}],"mask-image-conic-from-pos":[{"mask-conic-from":ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":ne()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Y()}],"mask-repeat":[{mask:Z()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ee,Q]}],filter:[{filter:["","none",ee,Q]}],blur:[{blur:M()}],brightness:[{brightness:[pe,ee,Q]}],contrast:[{contrast:[pe,ee,Q]}],"drop-shadow":[{"drop-shadow":["","none",f,mn,fn]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",pe,ee,Q]}],"hue-rotate":[{"hue-rotate":[pe,ee,Q]}],invert:[{invert:["",pe,ee,Q]}],saturate:[{saturate:[pe,ee,Q]}],sepia:[{sepia:["",pe,ee,Q]}],"backdrop-filter":[{"backdrop-filter":["","none",ee,Q]}],"backdrop-blur":[{"backdrop-blur":M()}],"backdrop-brightness":[{"backdrop-brightness":[pe,ee,Q]}],"backdrop-contrast":[{"backdrop-contrast":[pe,ee,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":["",pe,ee,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[pe,ee,Q]}],"backdrop-invert":[{"backdrop-invert":["",pe,ee,Q]}],"backdrop-opacity":[{"backdrop-opacity":[pe,ee,Q]}],"backdrop-saturate":[{"backdrop-saturate":[pe,ee,Q]}],"backdrop-sepia":[{"backdrop-sepia":["",pe,ee,Q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ee,Q]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[pe,"initial",ee,Q]}],ease:[{ease:["linear","initial",w,ee,Q]}],delay:[{delay:[pe,ee,Q]}],animate:[{animate:["none",x,ee,Q]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,ee,Q]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:$()}],"rotate-x":[{"rotate-x":$()}],"rotate-y":[{"rotate-y":$()}],"rotate-z":[{"rotate-z":$()}],scale:[{scale:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"scale-3d":["scale-3d"],skew:[{skew:ae()}],"skew-x":[{"skew-x":ae()}],"skew-y":[{"skew-y":ae()}],transform:[{transform:[ee,Q,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:se()}],"translate-x":[{"translate-x":se()}],"translate-y":[{"translate-y":se()}],"translate-z":[{"translate-z":se()}],"translate-none":["translate-none"],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ee,Q]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mbs":[{"scroll-mbs":C()}],"scroll-mbe":[{"scroll-mbe":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pbs":[{"scroll-pbs":C()}],"scroll-pbe":[{"scroll-pbe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ee,Q]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[pe,xr,Wt,Gf]}],stroke:[{stroke:["none",...R()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function fe(...t){return CC(Pf(t))}const kC=Mf("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-gray-900 text-white hover:bg-gray-800",outline:"border border-gray-300 bg-white hover:bg-gray-50 text-gray-900",ghost:"hover:bg-gray-100 text-gray-900",secondary:"bg-gray-100 text-gray-900 hover:bg-gray-200"},size:{default:"h-10 px-4 py-2",sm:"h-9 px-3 text-sm",lg:"h-11 px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ie=T.forwardRef(({className:t,variant:e,size:r,...n},a)=>y.jsx("button",{className:fe(kC({variant:e,size:r,className:t})),ref:a,...n}));Ie.displayName="Button";function ce(t,e,{checkForDefaultPrevented:r=!0}={}){return function(a){if(t?.(a),r===!1||!a.defaultPrevented)return e?.(a)}}function em(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function wr(...t){return e=>{let r=!1;const n=t.map(a=>{const i=em(a,e);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let a=0;a<n.length;a++){const i=n[a];typeof i=="function"?i():em(t[a],null)}}}}function he(...t){return T.useCallback(wr(...t),t)}function EC(t,e){const r=T.createContext(e),n=i=>{const{children:o,...s}=i,l=T.useMemo(()=>s,Object.values(s));return y.jsx(r.Provider,{value:l,children:o})};n.displayName=t+"Provider";function a(i){const o=T.useContext(r);if(o)return o;if(e!==void 0)return e;throw new Error(`\`${i}\` must be used within \`${t}\``)}return[n,a]}function dt(t,e=[]){let r=[];function n(i,o){const s=T.createContext(o),l=r.length;r=[...r,o];const c=u=>{const{scope:p,children:f,...v}=u,m=p?.[t]?.[l]||s,g=T.useMemo(()=>v,Object.values(v));return y.jsx(m.Provider,{value:g,children:f})};c.displayName=i+"Provider";function d(u,p){const f=p?.[t]?.[l]||s,v=T.useContext(f);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${u}\` must be used within \`${i}\``)}return[c,d]}const a=()=>{const i=r.map(o=>T.createContext(o));return function(s){const l=s?.[t]||i;return T.useMemo(()=>({[`__scope${t}`]:{...s,[t]:l}}),[s,l])}};return a.scopeName=t,[n,TC(a,...e)]}function TC(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const o=n.reduce((s,{useScope:l,scopeName:c})=>{const u=l(i)[`__scope${c}`];return{...s,...u}},{});return T.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}var wt=globalThis?.document?T.useLayoutEffect:()=>{},AC=T[" useInsertionEffect ".trim().toString()]||wt;function Cr({prop:t,defaultProp:e,onChange:r=()=>{},caller:n}){const[a,i,o]=_C({defaultProp:e,onChange:r}),s=t!==void 0,l=s?t:a;{const d=T.useRef(t!==void 0);T.useEffect(()=>{const u=d.current;u!==s&&console.warn(`${n} is changing from ${u?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=s},[s,n])}const c=T.useCallback(d=>{if(s){const u=OC(d)?d(t):d;u!==t&&o.current?.(u)}else i(d)},[s,t,i,o]);return[l,c]}function _C({defaultProp:t,onChange:e}){const[r,n]=T.useState(t),a=T.useRef(r),i=T.useRef(e);return AC(()=>{i.current=e},[e]),T.useEffect(()=>{a.current!==r&&(i.current?.(r),a.current=r)},[r,a]),[r,n,i]}function OC(t){return typeof t=="function"}function kr(t){const e=PC(t),r=T.forwardRef((n,a)=>{const{children:i,...o}=n,s=T.Children.toArray(i),l=s.find(NC);if(l){const c=l.props.children,d=s.map(u=>u===l?T.Children.count(c)>1?T.Children.only(null):T.isValidElement(c)?c.props.children:null:u);return y.jsx(e,{...o,ref:a,children:T.isValidElement(c)?T.cloneElement(c,void 0,d):null})}return y.jsx(e,{...o,ref:a,children:i})});return r.displayName=`${t}.Slot`,r}function PC(t){const e=T.forwardRef((r,n)=>{const{children:a,...i}=r;if(T.isValidElement(a)){const o=DC(a),s=MC(i,a.props);return a.type!==T.Fragment&&(s.ref=n?wr(n,o):o),T.cloneElement(a,s)}return T.Children.count(a)>1?T.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var tm=Symbol("radix.slottable");function IC(t){const e=({children:r})=>y.jsx(y.Fragment,{children:r});return e.displayName=`${t}.Slottable`,e.__radixId=tm,e}function NC(t){return T.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===tm}function MC(t,e){const r={...e};for(const n in e){const a=t[n],i=e[n];/^on[A-Z]/.test(n)?a&&i?r[n]=(...s)=>{const l=i(...s);return a(...s),l}:a&&(r[n]=a):n==="style"?r[n]={...a,...i}:n==="className"&&(r[n]=[a,i].filter(Boolean).join(" "))}return{...t,...r}}function DC(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var zC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ge=zC.reduce((t,e)=>{const r=kr(`Primitive.${e}`),n=T.forwardRef((a,i)=>{const{asChild:o,...s}=a,l=o?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(l,{...s,ref:i})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function rm(t,e){t&&Ac.flushSync(()=>t.dispatchEvent(e))}function Xs(t){const e=t+"CollectionProvider",[r,n]=dt(e),[a,i]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=m=>{const{scope:g,children:w}=m,x=O.useRef(null),h=O.useRef(new Map).current;return y.jsx(a,{scope:g,itemMap:h,collectionRef:x,children:w})};o.displayName=e;const s=t+"CollectionSlot",l=kr(s),c=O.forwardRef((m,g)=>{const{scope:w,children:x}=m,h=i(s,w),b=he(g,h.collectionRef);return y.jsx(l,{ref:b,children:x})});c.displayName=s;const d=t+"CollectionItemSlot",u="data-radix-collection-item",p=kr(d),f=O.forwardRef((m,g)=>{const{scope:w,children:x,...h}=m,b=O.useRef(null),S=he(g,b),E=i(d,w);return O.useEffect(()=>(E.itemMap.set(b,{ref:b,...h}),()=>{E.itemMap.delete(b)})),y.jsx(p,{[u]:"",ref:S,children:x})});f.displayName=d;function v(m){const g=i(t+"CollectionConsumer",m);return O.useCallback(()=>{const x=g.collectionRef.current;if(!x)return[];const h=Array.from(x.querySelectorAll(`[${u}]`));return Array.from(g.itemMap.values()).sort((E,k)=>h.indexOf(E.ref.current)-h.indexOf(k.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:o,Slot:c,ItemSlot:f},v,n]}var LC=T.createContext(void 0);function Zs(t){const e=T.useContext(LC);return t||e||"ltr"}function ut(t){const e=T.useRef(t);return T.useEffect(()=>{e.current=t}),T.useMemo(()=>(...r)=>e.current?.(...r),[])}function jC(t,e=globalThis?.document){const r=ut(t);T.useEffect(()=>{const n=a=>{a.key==="Escape"&&r(a)};return e.addEventListener("keydown",n,{capture:!0}),()=>e.removeEventListener("keydown",n,{capture:!0})},[r,e])}var WC="DismissableLayer",Qs="dismissableLayer.update",BC="dismissableLayer.pointerDownOutside",qC="dismissableLayer.focusOutside",nm,am=T.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Js=T.forwardRef((t,e)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:o,onDismiss:s,...l}=t,c=T.useContext(am),[d,u]=T.useState(null),p=d?.ownerDocument??globalThis?.document,[,f]=T.useState({}),v=he(e,k=>u(k)),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),w=m.indexOf(g),x=d?m.indexOf(d):-1,h=c.layersWithOutsidePointerEventsDisabled.size>0,b=x>=w,S=$C(k=>{const C=k.target,_=[...c.branches].some(A=>A.contains(C));!b||_||(a?.(k),o?.(k),k.defaultPrevented||s?.())},p),E=GC(k=>{const C=k.target;[...c.branches].some(A=>A.contains(C))||(i?.(k),o?.(k),k.defaultPrevented||s?.())},p);return jC(k=>{x===c.layers.size-1&&(n?.(k),!k.defaultPrevented&&s&&(k.preventDefault(),s()))},p),T.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(nm=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),im(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=nm)}},[d,p,r,c]),T.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),im())},[d,c]),T.useEffect(()=>{const k=()=>f({});return document.addEventListener(Qs,k),()=>document.removeEventListener(Qs,k)},[]),y.jsx(ge.div,{...l,ref:v,style:{pointerEvents:h?b?"auto":"none":void 0,...t.style},onFocusCapture:ce(t.onFocusCapture,E.onFocusCapture),onBlurCapture:ce(t.onBlurCapture,E.onBlurCapture),onPointerDownCapture:ce(t.onPointerDownCapture,S.onPointerDownCapture)})});Js.displayName=WC;var RC="DismissableLayerBranch",FC=T.forwardRef((t,e)=>{const r=T.useContext(am),n=T.useRef(null),a=he(e,n);return T.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),y.jsx(ge.div,{...t,ref:a})});FC.displayName=RC;function $C(t,e=globalThis?.document){const r=ut(t),n=T.useRef(!1),a=T.useRef(()=>{});return T.useEffect(()=>{const i=s=>{if(s.target&&!n.current){let l=function(){om(BC,r,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(e.removeEventListener("click",a.current),a.current=l,e.addEventListener("click",a.current,{once:!0})):l()}else e.removeEventListener("click",a.current);n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",a.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function GC(t,e=globalThis?.document){const r=ut(t),n=T.useRef(!1);return T.useEffect(()=>{const a=i=>{i.target&&!n.current&&om(qC,r,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",a),()=>e.removeEventListener("focusin",a)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function im(){const t=new CustomEvent(Qs);document.dispatchEvent(t)}function om(t,e,r,{discrete:n}){const a=r.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&a.addEventListener(t,e,{once:!0}),n?rm(a,i):a.dispatchEvent(i)}var el=0;function sm(){T.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??lm()),document.body.insertAdjacentElement("beforeend",t[1]??lm()),el++,()=>{el===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),el--}},[])}function lm(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var tl="focusScope.autoFocusOnMount",rl="focusScope.autoFocusOnUnmount",cm={bubbles:!1,cancelable:!0},VC="FocusScope",nl=T.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...o}=t,[s,l]=T.useState(null),c=ut(a),d=ut(i),u=T.useRef(null),p=he(e,m=>l(m)),f=T.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;T.useEffect(()=>{if(n){let m=function(h){if(f.paused||!s)return;const b=h.target;s.contains(b)?u.current=b:Ct(u.current,{select:!0})},g=function(h){if(f.paused||!s)return;const b=h.relatedTarget;b!==null&&(s.contains(b)||Ct(u.current,{select:!0}))},w=function(h){if(document.activeElement===document.body)for(const S of h)S.removedNodes.length>0&&Ct(s)};document.addEventListener("focusin",m),document.addEventListener("focusout",g);const x=new MutationObserver(w);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),x.disconnect()}}},[n,s,f.paused]),T.useEffect(()=>{if(s){pm.add(f);const m=document.activeElement;if(!s.contains(m)){const w=new CustomEvent(tl,cm);s.addEventListener(tl,c),s.dispatchEvent(w),w.defaultPrevented||(HC(ZC(dm(s)),{select:!0}),document.activeElement===m&&Ct(s))}return()=>{s.removeEventListener(tl,c),setTimeout(()=>{const w=new CustomEvent(rl,cm);s.addEventListener(rl,d),s.dispatchEvent(w),w.defaultPrevented||Ct(m??document.body,{select:!0}),s.removeEventListener(rl,d),pm.remove(f)},0)}}},[s,c,d,f]);const v=T.useCallback(m=>{if(!r&&!n||f.paused)return;const g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,w=document.activeElement;if(g&&w){const x=m.currentTarget,[h,b]=UC(x);h&&b?!m.shiftKey&&w===b?(m.preventDefault(),r&&Ct(h,{select:!0})):m.shiftKey&&w===h&&(m.preventDefault(),r&&Ct(b,{select:!0})):w===x&&m.preventDefault()}},[r,n,f.paused]);return y.jsx(ge.div,{tabIndex:-1,...o,ref:p,onKeyDown:v})});nl.displayName=VC;function HC(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Ct(n,{select:e}),document.activeElement!==r)return}function UC(t){const e=dm(t),r=um(e,t),n=um(e.reverse(),t);return[r,n]}function dm(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function um(t,e){for(const r of t)if(!KC(r,{upTo:e}))return r}function KC(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function YC(t){return t instanceof HTMLInputElement&&"select"in t}function Ct(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&YC(t)&&e&&t.select()}}var pm=XC();function XC(){let t=[];return{add(e){const r=t[0];e!==r&&r?.pause(),t=fm(t,e),t.unshift(e)},remove(e){t=fm(t,e),t[0]?.resume()}}}function fm(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function ZC(t){return t.filter(e=>e.tagName!=="A")}var QC=T[" useId ".trim().toString()]||(()=>{}),JC=0;function Zt(t){const[e,r]=T.useState(QC());return wt(()=>{r(n=>n??String(JC++))},[t]),e?`radix-${e}`:""}const e0=["top","right","bottom","left"],kt=Math.min,qe=Math.max,hn=Math.round,gn=Math.floor,tt=t=>({x:t,y:t}),t0={left:"right",right:"left",bottom:"top",top:"bottom"},r0={start:"end",end:"start"};function al(t,e,r){return qe(t,kt(e,r))}function pt(t,e){return typeof t=="function"?t(e):t}function ft(t){return t.split("-")[0]}function Qt(t){return t.split("-")[1]}function il(t){return t==="x"?"y":"x"}function ol(t){return t==="y"?"height":"width"}const n0=new Set(["top","bottom"]);function rt(t){return n0.has(ft(t))?"y":"x"}function sl(t){return il(rt(t))}function a0(t,e,r){r===void 0&&(r=!1);const n=Qt(t),a=sl(t),i=ol(a);let o=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=vn(o)),[o,vn(o)]}function i0(t){const e=vn(t);return[ll(t),e,ll(e)]}function ll(t){return t.replace(/start|end/g,e=>r0[e])}const mm=["left","right"],hm=["right","left"],o0=["top","bottom"],s0=["bottom","top"];function l0(t,e,r){switch(t){case"top":case"bottom":return r?e?hm:mm:e?mm:hm;case"left":case"right":return e?o0:s0;default:return[]}}function c0(t,e,r,n){const a=Qt(t);let i=l0(ft(t),r==="start",n);return a&&(i=i.map(o=>o+"-"+a),e&&(i=i.concat(i.map(ll)))),i}function vn(t){return t.replace(/left|right|bottom|top/g,e=>t0[e])}function d0(t){return{top:0,right:0,bottom:0,left:0,...t}}function gm(t){return typeof t!="number"?d0(t):{top:t,right:t,bottom:t,left:t}}function yn(t){const{x:e,y:r,width:n,height:a}=t;return{width:n,height:a,top:r,left:e,right:e+n,bottom:r+a,x:e,y:r}}function vm(t,e,r){let{reference:n,floating:a}=t;const i=rt(e),o=sl(e),s=ol(o),l=ft(e),c=i==="y",d=n.x+n.width/2-a.width/2,u=n.y+n.height/2-a.height/2,p=n[s]/2-a[s]/2;let f;switch(l){case"top":f={x:d,y:n.y-a.height};break;case"bottom":f={x:d,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:u};break;case"left":f={x:n.x-a.width,y:u};break;default:f={x:n.x,y:n.y}}switch(Qt(e)){case"start":f[o]-=p*(r&&c?-1:1);break;case"end":f[o]+=p*(r&&c?-1:1);break}return f}async function u0(t,e){var r;e===void 0&&(e={});const{x:n,y:a,platform:i,rects:o,elements:s,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:f=0}=pt(e,t),v=gm(f),g=s[p?u==="floating"?"reference":"floating":u],w=yn(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(g)))==null||r?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),x=u==="floating"?{x:n,y:a,width:o.floating.width,height:o.floating.height}:o.reference,h=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),b=await(i.isElement==null?void 0:i.isElement(h))?await(i.getScale==null?void 0:i.getScale(h))||{x:1,y:1}:{x:1,y:1},S=yn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:h,strategy:l}):x);return{top:(w.top-S.top+v.top)/b.y,bottom:(S.bottom-w.bottom+v.bottom)/b.y,left:(w.left-S.left+v.left)/b.x,right:(S.right-w.right+v.right)/b.x}}const p0=async(t,e,r)=>{const{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:o}=r,s=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:a}),{x:d,y:u}=vm(c,n,l),p=n,f={},v=0;for(let g=0;g<s.length;g++){var m;const{name:w,fn:x}=s[g],{x:h,y:b,data:S,reset:E}=await x({x:d,y:u,initialPlacement:n,placement:p,strategy:a,middlewareData:f,rects:c,platform:{...o,detectOverflow:(m=o.detectOverflow)!=null?m:u0},elements:{reference:t,floating:e}});d=h??d,u=b??u,f={...f,[w]:{...f[w],...S}},E&&v<=50&&(v++,typeof E=="object"&&(E.placement&&(p=E.placement),E.rects&&(c=E.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:a}):E.rects),{x:d,y:u}=vm(c,p,l)),g=-1)}return{x:d,y:u,placement:p,strategy:a,middlewareData:f}},f0=t=>({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:a,rects:i,platform:o,elements:s,middlewareData:l}=e,{element:c,padding:d=0}=pt(t,e)||{};if(c==null)return{};const u=gm(d),p={x:r,y:n},f=sl(a),v=ol(f),m=await o.getDimensions(c),g=f==="y",w=g?"top":"left",x=g?"bottom":"right",h=g?"clientHeight":"clientWidth",b=i.reference[v]+i.reference[f]-p[f]-i.floating[v],S=p[f]-i.reference[f],E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let k=E?E[h]:0;(!k||!await(o.isElement==null?void 0:o.isElement(E)))&&(k=s.floating[h]||i.floating[v]);const C=b/2-S/2,_=k/2-m[v]/2-1,A=kt(u[w],_),I=kt(u[x],_),N=A,D=k-m[v]-I,j=k/2-m[v]/2+C,U=al(N,j,D),W=!l.arrow&&Qt(a)!=null&&j!==U&&i.reference[v]/2-(j<N?A:I)-m[v]/2<0,q=W?j<N?j-N:j-D:0;return{[f]:p[f]+q,data:{[f]:U,centerOffset:j-U-q,...W&&{alignmentOffset:q}},reset:W}}}),m0=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,n;const{placement:a,middlewareData:i,rects:o,initialPlacement:s,platform:l,elements:c}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:m=!0,...g}=pt(t,e);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const w=ft(a),x=rt(s),h=ft(s)===s,b=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=p||(h||!m?[vn(s)]:i0(s)),E=v!=="none";!p&&E&&S.push(...c0(s,m,v,b));const k=[s,...S],C=await l.detectOverflow(e,g),_=[];let A=((n=i.flip)==null?void 0:n.overflows)||[];if(d&&_.push(C[w]),u){const j=a0(a,o,b);_.push(C[j[0]],C[j[1]])}if(A=[...A,{placement:a,overflows:_}],!_.every(j=>j<=0)){var I,N;const j=(((I=i.flip)==null?void 0:I.index)||0)+1,U=k[j];if(U&&(!(u==="alignment"?x!==rt(U):!1)||A.every(F=>rt(F.placement)===x?F.overflows[0]>0:!0)))return{data:{index:j,overflows:A},reset:{placement:U}};let W=(N=A.filter(q=>q.overflows[0]<=0).sort((q,F)=>q.overflows[1]-F.overflows[1])[0])==null?void 0:N.placement;if(!W)switch(f){case"bestFit":{var D;const q=(D=A.filter(F=>{if(E){const P=rt(F.placement);return P===x||P==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(P=>P>0).reduce((P,R)=>P+R,0)]).sort((F,P)=>F[1]-P[1])[0])==null?void 0:D[0];q&&(W=q);break}case"initialPlacement":W=s;break}if(a!==W)return{reset:{placement:W}}}return{}}}};function ym(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function bm(t){return e0.some(e=>t[e]>=0)}const h0=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r,platform:n}=e,{strategy:a="referenceHidden",...i}=pt(t,e);switch(a){case"referenceHidden":{const o=await n.detectOverflow(e,{...i,elementContext:"reference"}),s=ym(o,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:bm(s)}}}case"escaped":{const o=await n.detectOverflow(e,{...i,altBoundary:!0}),s=ym(o,r.floating);return{data:{escapedOffsets:s,escaped:bm(s)}}}default:return{}}}}},Sm=new Set(["left","top"]);async function g0(t,e){const{placement:r,platform:n,elements:a}=t,i=await(n.isRTL==null?void 0:n.isRTL(a.floating)),o=ft(r),s=Qt(r),l=rt(r)==="y",c=Sm.has(o)?-1:1,d=i&&l?-1:1,u=pt(e,t);let{mainAxis:p,crossAxis:f,alignmentAxis:v}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&typeof v=="number"&&(f=s==="end"?v*-1:v),l?{x:f*d,y:p*c}:{x:p*c,y:f*d}}const v0=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:a,y:i,placement:o,middlewareData:s}=e,l=await g0(e,t);return o===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:a+l.x,y:i+l.y,data:{...l,placement:o}}}}},y0=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:a,platform:i}=e,{mainAxis:o=!0,crossAxis:s=!1,limiter:l={fn:w=>{let{x,y:h}=w;return{x,y:h}}},...c}=pt(t,e),d={x:r,y:n},u=await i.detectOverflow(e,c),p=rt(ft(a)),f=il(p);let v=d[f],m=d[p];if(o){const w=f==="y"?"top":"left",x=f==="y"?"bottom":"right",h=v+u[w],b=v-u[x];v=al(h,v,b)}if(s){const w=p==="y"?"top":"left",x=p==="y"?"bottom":"right",h=m+u[w],b=m-u[x];m=al(h,m,b)}const g=l.fn({...e,[f]:v,[p]:m});return{...g,data:{x:g.x-r,y:g.y-n,enabled:{[f]:o,[p]:s}}}}}},b0=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:a,rects:i,middlewareData:o}=e,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=pt(t,e),d={x:r,y:n},u=rt(a),p=il(u);let f=d[p],v=d[u];const m=pt(s,e),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const h=p==="y"?"height":"width",b=i.reference[p]-i.floating[h]+g.mainAxis,S=i.reference[p]+i.reference[h]-g.mainAxis;f<b?f=b:f>S&&(f=S)}if(c){var w,x;const h=p==="y"?"width":"height",b=Sm.has(ft(a)),S=i.reference[u]-i.floating[h]+(b&&((w=o.offset)==null?void 0:w[u])||0)+(b?0:g.crossAxis),E=i.reference[u]+i.reference[h]+(b?0:((x=o.offset)==null?void 0:x[u])||0)-(b?g.crossAxis:0);v<S?v=S:v>E&&(v=E)}return{[p]:f,[u]:v}}}},S0=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var r,n;const{placement:a,rects:i,platform:o,elements:s}=e,{apply:l=()=>{},...c}=pt(t,e),d=await o.detectOverflow(e,c),u=ft(a),p=Qt(a),f=rt(a)==="y",{width:v,height:m}=i.floating;let g,w;u==="top"||u==="bottom"?(g=u,w=p===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(w=u,g=p==="end"?"top":"bottom");const x=m-d.top-d.bottom,h=v-d.left-d.right,b=kt(m-d[g],x),S=kt(v-d[w],h),E=!e.middlewareData.shift;let k=b,C=S;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(C=h),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(k=x),E&&!p){const A=qe(d.left,0),I=qe(d.right,0),N=qe(d.top,0),D=qe(d.bottom,0);f?C=v-2*(A!==0||I!==0?A+I:qe(d.left,d.right)):k=m-2*(N!==0||D!==0?N+D:qe(d.top,d.bottom))}await l({...e,availableWidth:C,availableHeight:k});const _=await o.getDimensions(s.floating);return v!==_.width||m!==_.height?{reset:{rects:!0}}:{}}}};function bn(){return typeof window<"u"}function Jt(t){return xm(t)?(t.nodeName||"").toLowerCase():"#document"}function Re(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function nt(t){var e;return(e=(xm(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function xm(t){return bn()?t instanceof Node||t instanceof Re(t).Node:!1}function Ue(t){return bn()?t instanceof Element||t instanceof Re(t).Element:!1}function at(t){return bn()?t instanceof HTMLElement||t instanceof Re(t).HTMLElement:!1}function wm(t){return!bn()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Re(t).ShadowRoot}const x0=new Set(["inline","contents"]);function Er(t){const{overflow:e,overflowX:r,overflowY:n,display:a}=Ke(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!x0.has(a)}const w0=new Set(["table","td","th"]);function C0(t){return w0.has(Jt(t))}const k0=[":popover-open",":modal"];function Sn(t){return k0.some(e=>{try{return t.matches(e)}catch{return!1}})}const E0=["transform","translate","scale","rotate","perspective"],T0=["transform","translate","scale","rotate","perspective","filter"],A0=["paint","layout","strict","content"];function cl(t){const e=dl(),r=Ue(t)?Ke(t):t;return E0.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||T0.some(n=>(r.willChange||"").includes(n))||A0.some(n=>(r.contain||"").includes(n))}function _0(t){let e=Et(t);for(;at(e)&&!er(e);){if(cl(e))return e;if(Sn(e))return null;e=Et(e)}return null}function dl(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const O0=new Set(["html","body","#document"]);function er(t){return O0.has(Jt(t))}function Ke(t){return Re(t).getComputedStyle(t)}function xn(t){return Ue(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Et(t){if(Jt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||wm(t)&&t.host||nt(t);return wm(e)?e.host:e}function Cm(t){const e=Et(t);return er(e)?t.ownerDocument?t.ownerDocument.body:t.body:at(e)&&Er(e)?e:Cm(e)}function Tr(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const a=Cm(t),i=a===((n=t.ownerDocument)==null?void 0:n.body),o=Re(a);if(i){const s=ul(o);return e.concat(o,o.visualViewport||[],Er(a)?a:[],s&&r?Tr(s):[])}return e.concat(a,Tr(a,[],r))}function ul(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function km(t){const e=Ke(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const a=at(t),i=a?t.offsetWidth:r,o=a?t.offsetHeight:n,s=hn(r)!==i||hn(n)!==o;return s&&(r=i,n=o),{width:r,height:n,$:s}}function pl(t){return Ue(t)?t:t.contextElement}function tr(t){const e=pl(t);if(!at(e))return tt(1);const r=e.getBoundingClientRect(),{width:n,height:a,$:i}=km(e);let o=(i?hn(r.width):r.width)/n,s=(i?hn(r.height):r.height)/a;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const P0=tt(0);function Em(t){const e=Re(t);return!dl()||!e.visualViewport?P0:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function I0(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Re(t)?!1:e}function qt(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const a=t.getBoundingClientRect(),i=pl(t);let o=tt(1);e&&(n?Ue(n)&&(o=tr(n)):o=tr(t));const s=I0(i,r,n)?Em(i):tt(0);let l=(a.left+s.x)/o.x,c=(a.top+s.y)/o.y,d=a.width/o.x,u=a.height/o.y;if(i){const p=Re(i),f=n&&Ue(n)?Re(n):n;let v=p,m=ul(v);for(;m&&n&&f!==v;){const g=tr(m),w=m.getBoundingClientRect(),x=Ke(m),h=w.left+(m.clientLeft+parseFloat(x.paddingLeft))*g.x,b=w.top+(m.clientTop+parseFloat(x.paddingTop))*g.y;l*=g.x,c*=g.y,d*=g.x,u*=g.y,l+=h,c+=b,v=Re(m),m=ul(v)}}return yn({width:d,height:u,x:l,y:c})}function wn(t,e){const r=xn(t).scrollLeft;return e?e.left+r:qt(nt(t)).left+r}function Tm(t,e){const r=t.getBoundingClientRect(),n=r.left+e.scrollLeft-wn(t,r),a=r.top+e.scrollTop;return{x:n,y:a}}function N0(t){let{elements:e,rect:r,offsetParent:n,strategy:a}=t;const i=a==="fixed",o=nt(n),s=e?Sn(e.floating):!1;if(n===o||s&&i)return r;let l={scrollLeft:0,scrollTop:0},c=tt(1);const d=tt(0),u=at(n);if((u||!u&&!i)&&((Jt(n)!=="body"||Er(o))&&(l=xn(n)),at(n))){const f=qt(n);c=tr(n),d.x=f.x+n.clientLeft,d.y=f.y+n.clientTop}const p=o&&!u&&!i?Tm(o,l):tt(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+p.x,y:r.y*c.y-l.scrollTop*c.y+d.y+p.y}}function M0(t){return Array.from(t.getClientRects())}function D0(t){const e=nt(t),r=xn(t),n=t.ownerDocument.body,a=qe(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=qe(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+wn(t);const s=-r.scrollTop;return Ke(n).direction==="rtl"&&(o+=qe(e.clientWidth,n.clientWidth)-a),{width:a,height:i,x:o,y:s}}const Am=25;function z0(t,e){const r=Re(t),n=nt(t),a=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,s=0,l=0;if(a){i=a.width,o=a.height;const d=dl();(!d||d&&e==="fixed")&&(s=a.offsetLeft,l=a.offsetTop)}const c=wn(n);if(c<=0){const d=n.ownerDocument,u=d.body,p=getComputedStyle(u),f=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,v=Math.abs(n.clientWidth-u.clientWidth-f);v<=Am&&(i-=v)}else c<=Am&&(i+=c);return{width:i,height:o,x:s,y:l}}const L0=new Set(["absolute","fixed"]);function j0(t,e){const r=qt(t,!0,e==="fixed"),n=r.top+t.clientTop,a=r.left+t.clientLeft,i=at(t)?tr(t):tt(1),o=t.clientWidth*i.x,s=t.clientHeight*i.y,l=a*i.x,c=n*i.y;return{width:o,height:s,x:l,y:c}}function _m(t,e,r){let n;if(e==="viewport")n=z0(t,r);else if(e==="document")n=D0(nt(t));else if(Ue(e))n=j0(e,r);else{const a=Em(t);n={x:e.x-a.x,y:e.y-a.y,width:e.width,height:e.height}}return yn(n)}function Om(t,e){const r=Et(t);return r===e||!Ue(r)||er(r)?!1:Ke(r).position==="fixed"||Om(r,e)}function W0(t,e){const r=e.get(t);if(r)return r;let n=Tr(t,[],!1).filter(s=>Ue(s)&&Jt(s)!=="body"),a=null;const i=Ke(t).position==="fixed";let o=i?Et(t):t;for(;Ue(o)&&!er(o);){const s=Ke(o),l=cl(o);!l&&s.position==="fixed"&&(a=null),(i?!l&&!a:!l&&s.position==="static"&&!!a&&L0.has(a.position)||Er(o)&&!l&&Om(t,o))?n=n.filter(d=>d!==o):a=s,o=Et(o)}return e.set(t,n),n}function B0(t){let{element:e,boundary:r,rootBoundary:n,strategy:a}=t;const o=[...r==="clippingAncestors"?Sn(e)?[]:W0(e,this._c):[].concat(r),n],s=o[0],l=o.reduce((c,d)=>{const u=_m(e,d,a);return c.top=qe(u.top,c.top),c.right=kt(u.right,c.right),c.bottom=kt(u.bottom,c.bottom),c.left=qe(u.left,c.left),c},_m(e,s,a));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function q0(t){const{width:e,height:r}=km(t);return{width:e,height:r}}function R0(t,e,r){const n=at(e),a=nt(e),i=r==="fixed",o=qt(t,!0,i,e);let s={scrollLeft:0,scrollTop:0};const l=tt(0);function c(){l.x=wn(a)}if(n||!n&&!i)if((Jt(e)!=="body"||Er(a))&&(s=xn(e)),n){const f=qt(e,!0,i,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else a&&c();i&&!n&&a&&c();const d=a&&!n&&!i?Tm(a,s):tt(0),u=o.left+s.scrollLeft-l.x-d.x,p=o.top+s.scrollTop-l.y-d.y;return{x:u,y:p,width:o.width,height:o.height}}function fl(t){return Ke(t).position==="static"}function Pm(t,e){if(!at(t)||Ke(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return nt(t)===r&&(r=r.ownerDocument.body),r}function Im(t,e){const r=Re(t);if(Sn(t))return r;if(!at(t)){let a=Et(t);for(;a&&!er(a);){if(Ue(a)&&!fl(a))return a;a=Et(a)}return r}let n=Pm(t,e);for(;n&&C0(n)&&fl(n);)n=Pm(n,e);return n&&er(n)&&fl(n)&&!cl(n)?r:n||_0(t)||r}const F0=async function(t){const e=this.getOffsetParent||Im,r=this.getDimensions,n=await r(t.floating);return{reference:R0(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function $0(t){return Ke(t).direction==="rtl"}const G0={convertOffsetParentRelativeRectToViewportRelativeRect:N0,getDocumentElement:nt,getClippingRect:B0,getOffsetParent:Im,getElementRects:F0,getClientRects:M0,getDimensions:q0,getScale:tr,isElement:Ue,isRTL:$0};function Nm(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function V0(t,e){let r=null,n;const a=nt(t);function i(){var s;clearTimeout(n),(s=r)==null||s.disconnect(),r=null}function o(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const c=t.getBoundingClientRect(),{left:d,top:u,width:p,height:f}=c;if(s||e(),!p||!f)return;const v=gn(u),m=gn(a.clientWidth-(d+p)),g=gn(a.clientHeight-(u+f)),w=gn(d),h={rootMargin:-v+"px "+-m+"px "+-g+"px "+-w+"px",threshold:qe(0,kt(1,l))||1};let b=!0;function S(E){const k=E[0].intersectionRatio;if(k!==l){if(!b)return o();k?o(!1,k):n=setTimeout(()=>{o(!1,1e-7)},1e3)}k===1&&!Nm(c,t.getBoundingClientRect())&&o(),b=!1}try{r=new IntersectionObserver(S,{...h,root:a.ownerDocument})}catch{r=new IntersectionObserver(S,h)}r.observe(t)}return o(!0),i}function H0(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=pl(t),d=a||i?[...c?Tr(c):[],...Tr(e)]:[];d.forEach(w=>{a&&w.addEventListener("scroll",r,{passive:!0}),i&&w.addEventListener("resize",r)});const u=c&&s?V0(c,r):null;let p=-1,f=null;o&&(f=new ResizeObserver(w=>{let[x]=w;x&&x.target===c&&f&&(f.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var h;(h=f)==null||h.observe(e)})),r()}),c&&!l&&f.observe(c),f.observe(e));let v,m=l?qt(t):null;l&&g();function g(){const w=qt(t);m&&!Nm(m,w)&&r(),m=w,v=requestAnimationFrame(g)}return r(),()=>{var w;d.forEach(x=>{a&&x.removeEventListener("scroll",r),i&&x.removeEventListener("resize",r)}),u?.(),(w=f)==null||w.disconnect(),f=null,l&&cancelAnimationFrame(v)}}const U0=v0,K0=y0,Y0=m0,X0=S0,Z0=h0,Mm=f0,Q0=b0,J0=(t,e,r)=>{const n=new Map,a={platform:G0,...r},i={...a.platform,_c:n};return p0(t,e,{...a,platform:i})};var ek=typeof document<"u",tk=function(){},Cn=ek?O.useLayoutEffect:tk;function kn(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,a;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!==e.length)return!1;for(n=r;n--!==0;)if(!kn(t[n],e[n]))return!1;return!0}if(a=Object.keys(t),r=a.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,a[n]))return!1;for(n=r;n--!==0;){const i=a[n];if(!(i==="_owner"&&t.$$typeof)&&!kn(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function Dm(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function zm(t,e){const r=Dm(t);return Math.round(e*r)/r}function ml(t){const e=T.useRef(t);return Cn(()=>{e.current=t}),e}function rk(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:a,elements:{reference:i,floating:o}={},transform:s=!0,whileElementsMounted:l,open:c}=t,[d,u]=T.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[p,f]=T.useState(n);kn(p,n)||f(n);const[v,m]=T.useState(null),[g,w]=T.useState(null),x=T.useCallback(F=>{F!==E.current&&(E.current=F,m(F))},[]),h=T.useCallback(F=>{F!==k.current&&(k.current=F,w(F))},[]),b=i||v,S=o||g,E=T.useRef(null),k=T.useRef(null),C=T.useRef(d),_=l!=null,A=ml(l),I=ml(a),N=ml(c),D=T.useCallback(()=>{if(!E.current||!k.current)return;const F={placement:e,strategy:r,middleware:p};I.current&&(F.platform=I.current),J0(E.current,k.current,F).then(P=>{const R={...P,isPositioned:N.current!==!1};j.current&&!kn(C.current,R)&&(C.current=R,Ac.flushSync(()=>{u(R)}))})},[p,e,r,I,N]);Cn(()=>{c===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,u(F=>({...F,isPositioned:!1})))},[c]);const j=T.useRef(!1);Cn(()=>(j.current=!0,()=>{j.current=!1}),[]),Cn(()=>{if(b&&(E.current=b),S&&(k.current=S),b&&S){if(A.current)return A.current(b,S,D);D()}},[b,S,D,A,_]);const U=T.useMemo(()=>({reference:E,floating:k,setReference:x,setFloating:h}),[x,h]),W=T.useMemo(()=>({reference:b,floating:S}),[b,S]),q=T.useMemo(()=>{const F={position:r,left:0,top:0};if(!W.floating)return F;const P=zm(W.floating,d.x),R=zm(W.floating,d.y);return s?{...F,transform:"translate("+P+"px, "+R+"px)",...Dm(W.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:P,top:R}},[r,s,W.floating,d.x,d.y]);return T.useMemo(()=>({...d,update:D,refs:U,elements:W,floatingStyles:q}),[d,D,U,W,q])}const nk=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:a}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?Mm({element:n.current,padding:a}).fn(r):{}:n?Mm({element:n,padding:a}).fn(r):{}}}},ak=(t,e)=>({...U0(t),options:[t,e]}),ik=(t,e)=>({...K0(t),options:[t,e]}),ok=(t,e)=>({...Q0(t),options:[t,e]}),sk=(t,e)=>({...Y0(t),options:[t,e]}),lk=(t,e)=>({...X0(t),options:[t,e]}),ck=(t,e)=>({...Z0(t),options:[t,e]}),dk=(t,e)=>({...nk(t),options:[t,e]});var uk="Arrow",Lm=T.forwardRef((t,e)=>{const{children:r,width:n=10,height:a=5,...i}=t;return y.jsx(ge.svg,{...i,ref:e,width:n,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:y.jsx("polygon",{points:"0,0 30,0 15,10"})})});Lm.displayName=uk;var pk=Lm;function hl(t){const[e,r]=T.useState(void 0);return wt(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const i=a[0];let o,s;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,s=c.blockSize}else o=t.offsetWidth,s=t.offsetHeight;r({width:o,height:s})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}var gl="Popper",[jm,Wm]=dt(gl),[fk,Bm]=jm(gl),qm=t=>{const{__scopePopper:e,children:r}=t,[n,a]=T.useState(null);return y.jsx(fk,{scope:e,anchor:n,onAnchorChange:a,children:r})};qm.displayName=gl;var Rm="PopperAnchor",Fm=T.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...a}=t,i=Bm(Rm,r),o=T.useRef(null),s=he(e,o),l=T.useRef(null);return T.useEffect(()=>{const c=l.current;l.current=n?.current||o.current,c!==l.current&&i.onAnchorChange(l.current)}),n?null:y.jsx(ge.div,{...a,ref:s})});Fm.displayName=Rm;var vl="PopperContent",[mk,hk]=jm(vl),$m=T.forwardRef((t,e)=>{const{__scopePopper:r,side:n="bottom",sideOffset:a=0,align:i="center",alignOffset:o=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:u="partial",hideWhenDetached:p=!1,updatePositionStrategy:f="optimized",onPlaced:v,...m}=t,g=Bm(vl,r),[w,x]=T.useState(null),h=he(e,K=>x(K)),[b,S]=T.useState(null),E=hl(b),k=E?.width??0,C=E?.height??0,_=n+(i!=="center"?"-"+i:""),A=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},I=Array.isArray(c)?c:[c],N=I.length>0,D={padding:A,boundary:I.filter(vk),altBoundary:N},{refs:j,floatingStyles:U,placement:W,isPositioned:q,middlewareData:F}=rk({strategy:"fixed",placement:_,whileElementsMounted:(...K)=>H0(...K,{animationFrame:f==="always"}),elements:{reference:g.anchor},middleware:[ak({mainAxis:a+C,alignmentAxis:o}),l&&ik({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?ok():void 0,...D}),l&&sk({...D}),lk({...D,apply:({elements:K,rects:ie,availableWidth:ne,availableHeight:M})=>{const{width:$,height:X}=ie.reference,ae=K.floating.style;ae.setProperty("--radix-popper-available-width",`${ne}px`),ae.setProperty("--radix-popper-available-height",`${M}px`),ae.setProperty("--radix-popper-anchor-width",`${$}px`),ae.setProperty("--radix-popper-anchor-height",`${X}px`)}}),b&&dk({element:b,padding:s}),yk({arrowWidth:k,arrowHeight:C}),p&&ck({strategy:"referenceHidden",...D})]}),[P,R]=Hm(W),Y=ut(v);wt(()=>{q&&Y?.()},[q,Y]);const Z=F.arrow?.x,B=F.arrow?.y,z=F.arrow?.centerOffset!==0,[H,G]=T.useState();return wt(()=>{w&&G(window.getComputedStyle(w).zIndex)},[w]),y.jsx("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:q?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(" "),...F.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:y.jsx(mk,{scope:r,placedSide:P,onArrowChange:S,arrowX:Z,arrowY:B,shouldHideArrow:z,children:y.jsx(ge.div,{"data-side":P,"data-align":R,...m,ref:h,style:{...m.style,animation:q?void 0:"none"}})})})});$m.displayName=vl;var Gm="PopperArrow",gk={top:"bottom",right:"left",bottom:"top",left:"right"},Vm=T.forwardRef(function(e,r){const{__scopePopper:n,...a}=e,i=hk(Gm,n),o=gk[i.placedSide];return y.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:y.jsx(pk,{...a,ref:r,style:{...a.style,display:"block"}})})});Vm.displayName=Gm;function vk(t){return t!==null}var yk=t=>({name:"transformOrigin",options:t,fn(e){const{placement:r,rects:n,middlewareData:a}=e,o=a.arrow?.centerOffset!==0,s=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[c,d]=Hm(r),u={start:"0%",center:"50%",end:"100%"}[d],p=(a.arrow?.x??0)+s/2,f=(a.arrow?.y??0)+l/2;let v="",m="";return c==="bottom"?(v=o?u:`${p}px`,m=`${-l}px`):c==="top"?(v=o?u:`${p}px`,m=`${n.floating.height+l}px`):c==="right"?(v=`${-l}px`,m=o?u:`${f}px`):c==="left"&&(v=`${n.floating.width+l}px`,m=o?u:`${f}px`),{data:{x:v,y:m}}}});function Hm(t){const[e,r="center"]=t.split("-");return[e,r]}var bk=qm,Sk=Fm,xk=$m,wk=Vm,Ck="Portal",yl=T.forwardRef((t,e)=>{const{container:r,...n}=t,[a,i]=T.useState(!1);wt(()=>i(!0),[]);const o=r||a&&globalThis?.document?.body;return o?Dt.createPortal(y.jsx(ge.div,{...n,ref:e}),o):null});yl.displayName=Ck;function kk(t,e){return T.useReducer((r,n)=>e[r][n]??r,t)}var Tt=t=>{const{present:e,children:r}=t,n=Ek(e),a=typeof r=="function"?r({present:n.isPresent}):T.Children.only(r),i=he(n.ref,Tk(a));return typeof r=="function"||n.isPresent?T.cloneElement(a,{ref:i}):null};Tt.displayName="Presence";function Ek(t){const[e,r]=T.useState(),n=T.useRef(null),a=T.useRef(t),i=T.useRef("none"),o=t?"mounted":"unmounted",[s,l]=kk(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return T.useEffect(()=>{const c=En(n.current);i.current=s==="mounted"?c:"none"},[s]),wt(()=>{const c=n.current,d=a.current;if(d!==t){const p=i.current,f=En(c);t?l("MOUNT"):f==="none"||c?.display==="none"?l("UNMOUNT"):l(d&&p!==f?"ANIMATION_OUT":"UNMOUNT"),a.current=t}},[t,l]),wt(()=>{if(e){let c;const d=e.ownerDocument.defaultView??window,u=f=>{const m=En(n.current).includes(CSS.escape(f.animationName));if(f.target===e&&m&&(l("ANIMATION_END"),!a.current)){const g=e.style.animationFillMode;e.style.animationFillMode="forwards",c=d.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=g)})}},p=f=>{f.target===e&&(i.current=En(n.current))};return e.addEventListener("animationstart",p),e.addEventListener("animationcancel",u),e.addEventListener("animationend",u),()=>{d.clearTimeout(c),e.removeEventListener("animationstart",p),e.removeEventListener("animationcancel",u),e.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:T.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function En(t){return t?.animationName||"none"}function Tk(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var bl="rovingFocusGroup.onEntryFocus",Ak={bubbles:!1,cancelable:!0},Ar="RovingFocusGroup",[Sl,Um,_k]=Xs(Ar),[Ok,Km]=dt(Ar,[_k]),[Pk,Ik]=Ok(Ar),Ym=T.forwardRef((t,e)=>y.jsx(Sl.Provider,{scope:t.__scopeRovingFocusGroup,children:y.jsx(Sl.Slot,{scope:t.__scopeRovingFocusGroup,children:y.jsx(Nk,{...t,ref:e})})}));Ym.displayName=Ar;var Nk=T.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:a=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...u}=t,p=T.useRef(null),f=he(e,p),v=Zs(i),[m,g]=Cr({prop:o,defaultProp:s??null,onChange:l,caller:Ar}),[w,x]=T.useState(!1),h=ut(c),b=Um(r),S=T.useRef(!1),[E,k]=T.useState(0);return T.useEffect(()=>{const C=p.current;if(C)return C.addEventListener(bl,h),()=>C.removeEventListener(bl,h)},[h]),y.jsx(Pk,{scope:r,orientation:n,dir:v,loop:a,currentTabStopId:m,onItemFocus:T.useCallback(C=>g(C),[g]),onItemShiftTab:T.useCallback(()=>x(!0),[]),onFocusableItemAdd:T.useCallback(()=>k(C=>C+1),[]),onFocusableItemRemove:T.useCallback(()=>k(C=>C-1),[]),children:y.jsx(ge.div,{tabIndex:w||E===0?-1:0,"data-orientation":n,...u,ref:f,style:{outline:"none",...t.style},onMouseDown:ce(t.onMouseDown,()=>{S.current=!0}),onFocus:ce(t.onFocus,C=>{const _=!S.current;if(C.target===C.currentTarget&&_&&!w){const A=new CustomEvent(bl,Ak);if(C.currentTarget.dispatchEvent(A),!A.defaultPrevented){const I=b().filter(W=>W.focusable),N=I.find(W=>W.active),D=I.find(W=>W.id===m),U=[N,D,...I].filter(Boolean).map(W=>W.ref.current);Qm(U,d)}}S.current=!1}),onBlur:ce(t.onBlur,()=>x(!1))})})}),Xm="RovingFocusGroupItem",Zm=T.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:a=!1,tabStopId:i,children:o,...s}=t,l=Zt(),c=i||l,d=Ik(Xm,r),u=d.currentTabStopId===c,p=Um(r),{onFocusableItemAdd:f,onFocusableItemRemove:v,currentTabStopId:m}=d;return T.useEffect(()=>{if(n)return f(),()=>v()},[n,f,v]),y.jsx(Sl.ItemSlot,{scope:r,id:c,focusable:n,active:a,children:y.jsx(ge.span,{tabIndex:u?0:-1,"data-orientation":d.orientation,...s,ref:e,onMouseDown:ce(t.onMouseDown,g=>{n?d.onItemFocus(c):g.preventDefault()}),onFocus:ce(t.onFocus,()=>d.onItemFocus(c)),onKeyDown:ce(t.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){d.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const w=zk(g,d.orientation,d.dir);if(w!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let h=p().filter(b=>b.focusable).map(b=>b.ref.current);if(w==="last")h.reverse();else if(w==="prev"||w==="next"){w==="prev"&&h.reverse();const b=h.indexOf(g.currentTarget);h=d.loop?Lk(h,b+1):h.slice(b+1)}setTimeout(()=>Qm(h))}}),children:typeof o=="function"?o({isCurrentTabStop:u,hasTabStop:m!=null}):o})})});Zm.displayName=Xm;var Mk={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Dk(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function zk(t,e,r){const n=Dk(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Mk[n]}function Qm(t,e=!1){const r=document.activeElement;for(const n of t)if(n===r||(n.focus({preventScroll:e}),document.activeElement!==r))return}function Lk(t,e){return t.map((r,n)=>t[(e+n)%t.length])}var jk=Ym,Wk=Zm,Bk=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},rr=new WeakMap,Tn=new WeakMap,An={},xl=0,Jm=function(t){return t&&(t.host||Jm(t.parentNode))},qk=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=Jm(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},Rk=function(t,e,r,n){var a=qk(e,Array.isArray(t)?t:[t]);An[r]||(An[r]=new WeakMap);var i=An[r],o=[],s=new Set,l=new Set(a),c=function(u){!u||s.has(u)||(s.add(u),c(u.parentNode))};a.forEach(c);var d=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(p){if(s.has(p))d(p);else try{var f=p.getAttribute(n),v=f!==null&&f!=="false",m=(rr.get(p)||0)+1,g=(i.get(p)||0)+1;rr.set(p,m),i.set(p,g),o.push(p),m===1&&v&&Tn.set(p,!0),g===1&&p.setAttribute(r,"true"),v||p.setAttribute(n,"true")}catch(w){console.error("aria-hidden: cannot operate on ",p,w)}})};return d(e),s.clear(),xl++,function(){o.forEach(function(u){var p=rr.get(u)-1,f=i.get(u)-1;rr.set(u,p),i.set(u,f),p||(Tn.has(u)||u.removeAttribute(n),Tn.delete(u)),f||u.removeAttribute(r)}),xl--,xl||(rr=new WeakMap,rr=new WeakMap,Tn=new WeakMap,An={})}},eh=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),a=Bk(t);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live], script"))),Rk(n,a,r,"aria-hidden")):function(){return null}},it=function(){return it=Object.assign||function(e){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},it.apply(this,arguments)};function th(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(t);a<n.length;a++)e.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(t,n[a])&&(r[n[a]]=t[n[a]]);return r}function Fk(t,e,r){if(r||arguments.length===2)for(var n=0,a=e.length,i;n<a;n++)(i||!(n in e))&&(i||(i=Array.prototype.slice.call(e,0,n)),i[n]=e[n]);return t.concat(i||Array.prototype.slice.call(e))}typeof SuppressedError=="function"&&SuppressedError;var _n="right-scroll-bar-position",On="width-before-scroll-bar",$k="with-scroll-bars-hidden",Gk="--removed-body-scroll-bar-size";function wl(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function Vk(t,e){var r=O.useState(function(){return{value:t,callback:e,facade:{get current(){return r.value},set current(n){var a=r.value;a!==n&&(r.value=n,r.callback(n,a))}}}})[0];return r.callback=e,r.facade}var Hk=typeof window<"u"?T.useLayoutEffect:T.useEffect,rh=new WeakMap;function Uk(t,e){var r=Vk(null,function(n){return t.forEach(function(a){return wl(a,n)})});return Hk(function(){var n=rh.get(r);if(n){var a=new Set(n),i=new Set(t),o=r.current;a.forEach(function(s){i.has(s)||wl(s,null)}),i.forEach(function(s){a.has(s)||wl(s,o)})}rh.set(r,t)},[t]),r}function Kk(t){return t}function Yk(t,e){e===void 0&&(e=Kk);var r=[],n=!1,a={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:t},useMedium:function(i){var o=e(i,n);return r.push(o),function(){r=r.filter(function(s){return s!==o})}},assignSyncMedium:function(i){for(n=!0;r.length;){var o=r;r=[],o.forEach(i)}r={push:function(s){return i(s)},filter:function(){return r}}},assignMedium:function(i){n=!0;var o=[];if(r.length){var s=r;r=[],s.forEach(i),o=r}var l=function(){var d=o;o=[],d.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(d){o.push(d),c()},filter:function(d){return o=o.filter(d),r}}}};return a}function Xk(t){t===void 0&&(t={});var e=Yk(null);return e.options=it({async:!0,ssr:!1},t),e}var nh=function(t){var e=t.sideCar,r=th(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=e.read();if(!n)throw new Error("Sidecar medium not found");return T.createElement(n,it({},r))};nh.isSideCarExport=!0;function Zk(t,e){return t.useMedium(e),nh}var ah=Xk(),Cl=function(){},Pn=T.forwardRef(function(t,e){var r=T.useRef(null),n=T.useState({onScrollCapture:Cl,onWheelCapture:Cl,onTouchMoveCapture:Cl}),a=n[0],i=n[1],o=t.forwardProps,s=t.children,l=t.className,c=t.removeScrollBar,d=t.enabled,u=t.shards,p=t.sideCar,f=t.noRelative,v=t.noIsolation,m=t.inert,g=t.allowPinchZoom,w=t.as,x=w===void 0?"div":w,h=t.gapMode,b=th(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=p,E=Uk([r,e]),k=it(it({},b),a);return T.createElement(T.Fragment,null,d&&T.createElement(S,{sideCar:ah,removeScrollBar:c,shards:u,noRelative:f,noIsolation:v,inert:m,setCallbacks:i,allowPinchZoom:!!g,lockRef:r,gapMode:h}),o?T.cloneElement(T.Children.only(s),it(it({},k),{ref:E})):T.createElement(x,it({},k,{className:l,ref:E}),s))});Pn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Pn.classNames={fullWidth:On,zeroRight:_n};var Qk=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Jk(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=Qk();return e&&t.setAttribute("nonce",e),t}function eE(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function tE(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var rE=function(){var t=0,e=null;return{add:function(r){t==0&&(e=Jk())&&(eE(e,r),tE(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},nE=function(){var t=rE();return function(e,r){T.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&r])}},ih=function(){var t=nE(),e=function(r){var n=r.styles,a=r.dynamic;return t(n,a),null};return e},aE={left:0,top:0,right:0,gap:0},kl=function(t){return parseInt(t||"",10)||0},iE=function(t){var e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],n=e[t==="padding"?"paddingTop":"marginTop"],a=e[t==="padding"?"paddingRight":"marginRight"];return[kl(r),kl(n),kl(a)]},oE=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return aE;var e=iE(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},sE=ih(),nr="data-scroll-locked",lE=function(t,e,r,n){var a=t.left,i=t.top,o=t.right,s=t.gap;return r===void 0&&(r="margin"),`
835
835
  .`.concat($k,` {
836
836
  overflow: hidden `).concat(n,`;
837
837
  padding-right: `).concat(s,"px ").concat(n,`;