nuclo 0.1.128 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/runtimeBootstrap.d.ts.map +1 -1
- package/dist/nuclo.cjs +1 -1
- package/dist/nuclo.cjs.map +1 -1
- package/dist/nuclo.mjs +1 -1
- package/dist/nuclo.mjs.map +1 -1
- package/dist/nuclo.umd.js +1 -1
- package/dist/nuclo.umd.js.map +1 -1
- package/dist/polyfill/nuclo.polyfill.cjs +1 -1
- package/dist/polyfill/nuclo.polyfill.cjs.map +1 -1
- package/dist/polyfill/nuclo.polyfill.mjs +1 -1
- package/dist/polyfill/nuclo.polyfill.mjs.map +1 -1
- package/dist/ssr/index.d.ts +1 -1
- package/dist/ssr/index.d.ts.map +1 -1
- package/dist/ssr/nuclo.ssr.cjs +1 -1
- package/dist/ssr/nuclo.ssr.cjs.map +1 -1
- package/dist/ssr/nuclo.ssr.mjs +1 -1
- package/dist/ssr/nuclo.ssr.mjs.map +1 -1
- package/dist/style/css.d.ts +314 -0
- package/dist/style/css.d.ts.map +1 -0
- package/dist/style/engine.d.ts +34 -0
- package/dist/style/engine.d.ts.map +1 -0
- package/dist/style/index.d.ts +2 -4
- package/dist/style/index.d.ts.map +1 -1
- package/package.json +5 -5
- package/types/features/style.d.ts +61 -1954
- package/dist/environment-UucRvjm0.mjs +0 -2
- package/dist/environment-UucRvjm0.mjs.map +0 -1
- package/dist/environment-z8pVZwev.cjs +0 -2
- package/dist/environment-z8pVZwev.cjs.map +0 -1
- package/dist/style/cssGenerator.d.ts +0 -13
- package/dist/style/cssGenerator.d.ts.map +0 -1
- package/dist/style/cssPropertyTypes.d.ts +0 -98
- package/dist/style/cssPropertyTypes.d.ts.map +0 -1
- package/dist/style/styleBuilder.d.ts +0 -337
- package/dist/style/styleBuilder.d.ts.map +0 -1
- package/dist/style/styleCache.d.ts +0 -5
- package/dist/style/styleCache.d.ts.map +0 -1
- package/dist/style/styleProperties.d.ts +0 -13
- package/dist/style/styleProperties.d.ts.map +0 -1
- package/dist/style/styleQueries.d.ts +0 -25
- package/dist/style/styleQueries.d.ts.map +0 -1
package/dist/nuclo.umd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.Nuclo={}))})(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.defineProperty,n=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r};function r(e){return e===null||typeof e!=`object`&&typeof e!=`function`}function i(e){return e instanceof Node?!0:typeof e!=`object`||!e?!1:typeof e.nodeType==`number`}function a(e){return typeof e==`object`&&!!e}function o(e){return a(e)&&`tagName`in e}function s(e){return typeof e==`boolean`}function c(e){return typeof e==`function`}function l(e){return c(e)&&e.length===0}function u(e,t){typeof console<`u`&&console.error(`nuclo: ${e}`,t)}let d=typeof window<`u`&&typeof document<`u`,f=new WeakMap;function p(e,t,n,r,i,a){let o=f.get(e);o||(o=new Map,f.set(e,o));let s=o.get(t);s||(s=new Set,o.set(t,s)),s.add({original:n,wrapped:r,options:i,controller:a})}function ee(e,t,n){n.controller?n.controller.abort():e.removeEventListener(t,n.wrapped,n.options)}function te(e,t){let n=f.get(e);if(n)if(t){let r=n.get(t);if(r){for(let n of r)ee(e,t,n);n.delete(t)}}else{for(let[t,r]of n)for(let n of r)ee(e,t,n);f.delete(e)}}function ne(e,t,n){return function(r){if(!d||!r||typeof r.addEventListener!=`function`)return;let i=r,a=new AbortController,o=function(n){try{t.call(i,n)}catch(t){u(`Error in '${e}' listener`,t)}},s=typeof n==`boolean`?{capture:n,signal:a.signal}:{...n||{},signal:a.signal};i.addEventListener(e,o,s),p(i,e,t,o,n,a)}}let m=new Map,h=new WeakMap,g=new Map,_=new WeakMap;function re(e,t){let n=new WeakRef(e);m.set(n,t),h.set(e,{ref:n,info:t})}function ie(e,t){let n=new WeakRef(e);g.set(n,t),_.set(e,{ref:n,info:t})}function ae(e){m.delete(e)}function oe(e){g.delete(e)}function se(e){let t=h.get(e);t&&(m.delete(t.ref),h.delete(e))}function ce(e){let t=_.get(e);t&&(g.delete(t.ref),_.delete(e))}let le=new WeakMap,v=new Set,y=new WeakMap;function ue(e,t){le.set(e,t);let n=new WeakRef(e);v.add(n),y.set(e,n)}function b(e){le.delete(e);let t=y.get(e);t&&(v.delete(t),y.delete(e))}function de(){let e=[],t=[];for(let n of v){let r=n.deref();r===void 0?t.push(n):e.push(r)}for(let e of t)v.delete(e);return e}function fe(e){return le.get(e)??null}let x=`http://www.w3.org/2000/svg`;function S(e){return globalThis.document?document.createElement(e):null}function C(e,t){return globalThis.document?document.createElementNS(e,t):null}function w(e){return globalThis.document?document.createTextNode(e):null}function pe(){return globalThis.document?document.createDocumentFragment():null}function me(e,t){try{return e.appendChild(t),!0}catch(e){return u(`Failed to append child node`,e),!1}}function he(e){if(e.nodeType===Node.ELEMENT_NODE){let t=e;te(t),ce(t),b(t)}else e.nodeType===Node.TEXT_NODE?se(e):e.nodeType===Node.COMMENT_NODE&&b(e);if(e.childNodes&&e.childNodes.length>0)for(let t=0;t<e.childNodes.length;t++)he(e.childNodes[t])}function ge(e){if(!e?.parentNode)return!1;try{return he(e),e.parentNode.removeChild(e),!0}catch(e){return u(`Failed to remove child node`,e),!1}}function _e(e,t,n){try{return e.insertBefore(t,n),!0}catch(e){return u(`Failed to insert node before reference`,e),!1}}function T(e){return globalThis.document?globalThis.document.createComment(e):null}function ve(e,t=`hidden`){return globalThis.document?globalThis.document.createComment(`conditional-${e}-${t}`):null}function ye(e,t){let n=T(`${e}-end`);if(!n)throw Error(`Failed to create comment: document not available`);let r=T(`${e}-start-${t}`);if(!r)throw Error(`Failed to create comment: document not available`);return{start:r,end:n}}function be(e,t){let n=e.nextSibling;for(;n&&n!==t;){let e=n.nextSibling;ge(n),n=e}}function xe(e,t){let n=t.parentNode;if(n)for(let r=0;r<e.length;r++)_e(n,e[r],t)}function Se(e,...t){if(!e)return e;for(let n=0;n<t.length;n++){let r=t[n];if(r!=null){let t;if(typeof r==`string`){let e=w(r);if(e)t=e;else continue}else t=r;me(e,t)}}return e}function E(e){return e?e.isConnected===!0:!1}function D(e,t){if(!e?.parentNode)return!1;try{return e.parentNode.replaceChild(t,e),!0}catch(e){return u(`Error replacing conditional node`,e),!1}}let Ce={},we=!1;function Te(e){let t=e.target;if(!t||typeof Node>`u`||!(t instanceof Node))return;let n=t;for(;n;){if(n instanceof Element){let e=_.get(n);e&&(E(n)?ke(e.info):(oe(e.ref),_.delete(n)))}n=n.parentNode}}function Ee(){we||typeof document>`u`||typeof document.addEventListener!=`function`||(document.addEventListener(`update`,Te,!0),we=!0)}function De(e){let t=_.get(e);if(t)return t.info;let n={attributeResolvers:new Map};return ie(e,n),n}function Oe(e){return typeof e!=`object`||!e}function O(e,t){let n;try{n=t.resolver()}catch(t){u(`Failed to resolve reactive attribute: ${e}`,t);return}let r=Oe(n);if(!(r&&Object.is(n,t.lastValue)))try{t.applyValue(n),t.lastValue=r?n:Ce}catch(t){u(`Failed to apply reactive attribute: ${e}`,t)}}function ke(e){for(let[t,n]of e.attributeResolvers)O(t,n)}function Ae(e,t,n,r){if(!(e instanceof Element)||!t||typeof n!=`function`){u(`Invalid parameters for registerAttributeResolver`);return}let i={resolver:n,applyValue:r,lastValue:Ce};if(!d){O(t,i);return}Ee(),De(e).attributeResolvers.set(t,i),O(t,i)}function je(e){let t=[];for(let[n,r]of g){let i=n.deref();if(i===void 0){t.push(n);continue}if(!E(i)){_.delete(i),t.push(n);continue}e&&!e.contains(i)||ke(r)}for(let e of t)oe(e)}function Me(e){return e}function Ne(e,t,n){let r=Me(e),i=r.appendChild.bind(r),a=r.insertBefore.bind(r);r.appendChild=function(e){return a(e,t)};try{return n()}finally{r.appendChild=i}}function Pe(e,t,n){try{if(n==null||n===``)return e.style[t]=``,!0;let r=String(n);return e.style[t]=r,!0}catch{return!1}}function Fe(e,t){if(!(!e?.style||!t))for(let[n,r]of Object.entries(t))Pe(e,n,r)||u(`Failed to set style property '${n}'`)}function Ie(e,t){e&&(c(t)?Ae(e,`style`,t,function(t){Fe(e,t)}):Fe(e,t))}let k=new WeakMap,Le=new WeakSet;function A(e,t){let n=t.length,r=0;for(let i=0;i<=n;i++)(i===n||t.charCodeAt(i)===32)&&(i>r&&e.add(t.substring(r,i)),r=i+1)}function j(e){let t=``;for(let n of e)t&&(t+=` `),t+=n;return t}function Re(e){if(!k.has(e)){let t=new Set;e.className&&A(t,e.className),k.set(e,t)}Le.add(e)}function ze(e){return Le.has(e)}function Be(e,t){if(!t)return;let n=k.get(e);n||(n=new Set,k.set(e,n)),A(n,t)}function Ve(e,t){let n=k.get(e);if(!n||n.size===0){e.className=t||``;return}if(!t){e.className=j(n);return}let r=j(n),i=t.length,a=0;for(let e=0;e<=i;e++)if(e===i||t.charCodeAt(e)===32){if(e>a){let i=t.substring(a,e);n.has(i)||(r+=` `+i)}a=e+1}e.className=r}function He(e,t){if(!t)return;let n=e.className;if(n&&n!==t){let r=new Set;A(r,n),A(r,t),e.className=j(r)}else e.className=t}function Ue(e,t){if(typeof e!=`function`){u(`Invalid resolver provided to createReactiveTextNode`);let e=w(``);if(!e)throw Error(`Failed to create text node: document not available`);return e}let n;if(arguments.length>1)n=t;else try{n=e()}catch(e){u(`Failed to evaluate reactive text resolver`,e),n=``}let r=n===void 0?``:String(n),i=w(r);if(!i)throw Error(`Failed to create text node: document not available`);return d&&re(i,{resolver:e,lastValue:r}),i}function We(e){let t=[];for(let[n,r]of m){let i=n.deref();if(i===void 0){t.push(n);continue}if(!E(i)){h.delete(i),t.push(n);continue}if(e&&!e.contains(i))continue;let a;try{a=r.resolver()}catch(e){u(`Failed to update reactive text node`,e),a=void 0}let o=a===void 0?``:String(a);o!==r.lastValue&&(i.textContent=o,r.lastValue=o)}for(let e of t)ae(e)}function Ge(e,t,n,r=!1){if(n==null)return;if(t===`style`){Ie(e,n);return}let i=(n,r=!1)=>{if(n!=null){if(t===`className`&&e instanceof HTMLElement&&r){He(e,String(n));return}if(e instanceof Element&&e.namespaceURI===`http://www.w3.org/2000/svg`)e.setAttribute(String(t),String(n));else if(t in e)try{e[t]=n}catch{e instanceof Element&&e.setAttribute(String(t),String(n))}else e instanceof Element&&e.setAttribute(String(t),String(n))}};if(c(n)&&n.length===0){let r=n;t===`className`&&e instanceof HTMLElement?(Re(e),Ae(e,String(t),r,function(t){Ve(e,String(t||``))})):Ae(e,String(t),r,function(e){i(e,!1)})}else{if(t===`className`&&e instanceof HTMLElement&&ze(e)){let t=String(n||``);t&&(Be(e,t),He(e,t));return}i(n,r)}}function M(e,t,n=!0){if(t)for(let r of Object.keys(t)){let i=t[r];Ge(e,r,i,n&&r===`className`)}}let N=new WeakMap,P=!1,Ke=new WeakMap;function F(){return P}function qe(){P=!0}function Je(){P=!1}function I(e){return Ke.get(e)??0}function Ye(e,t){Ke.set(e,t)}function L(e){let t=I(e),n=e.childNodes[t]??null;return n&&Ye(e,t+1),n}function Xe(e,t){if(!P)return null;let n=e.childNodes[I(e)];return n&&n.nodeType===1&&n.tagName.toLowerCase()===t?L(e):null}function Ze(e,t){let n=I(e),r=t-n;for(;r-- >0;){let t=e.childNodes[n];t&&e.removeChild(t)}}function Qe(e){return a(e)&&!i(e)&&`className`in e&&typeof e.className==`string`&&Object.keys(e).length===1}function $e(e){let t=I(e),n=e.childNodes[t];return!!n&&n.nodeType===8&&n.textContent?.trimStart().startsWith(`text-`)===!0}function R(e,t,n){if(t==null)return null;if(c(t)){if(l(t))try{let i=N.get(t);if(i||(i={value:t(),error:!1},N.set(t,i)),i.error)return z(n,()=>``);let a=i.value;if(Qe(a))return M(e,{className:()=>{let e=t();return Qe(e)?e.className:``}}),null;if(r(a)&&a!=null){if(F()&&$e(e)){let n=e;L(n);let r=L(n);return r&&r.nodeType===3&&re(r,{resolver:t,lastValue:r.textContent||``}),null}return z(n,t,a)}return null}catch(e){return N.set(t,{value:void 0,error:!0}),u(`Error evaluating reactive text function:`,e),z(n,()=>``)}let o=t(e,n);return o==null?null:r(o)?et(n,o):i(o)?o:(a(o)&&M(e,o),null)}let o=t;if(r(o)){if(F()&&$e(e)){let t=e;return L(t),L(t),null}return et(n,o)}return i(o)?o:(M(e,o),null)}function z(e,t,n){let r=pe();if(!r)throw Error(`Failed to create document fragment: document not available`);let i=T(` text-${e} `);i&&r.appendChild(i);let a=Ue(t,n);return r.appendChild(a),r}function et(e,t){let n=pe();if(!n)throw Error(`Failed to create document fragment: document not available`);let r=T(` text-${e} `);r&&n.appendChild(r);let i=w(String(t));return i&&n.appendChild(i),n}function B(e,t,n=0){if(!t||t.length===0)return{element:e,nextIndex:n,appended:0};let r=n,i=0,a=e;for(let n=0;n<t.length;n+=1){let o=t[n];if(o==null)continue;let s=R(e,o,r);s&&(s.parentNode!==a&&a.appendChild(s),r+=1,i+=1)}return{element:e,nextIndex:r,appended:i}}function tt(e,t){let n=S(e);return B(n,t,0),n}function nt(e,t){let n=C(x,e);if(!n)throw Error(`Failed to create SVG element: ${e}`);return B(n,t,0),n}function rt(e,...t){return function(n,r=0){let i=n,a=i?Xe(i,e):null,o=a??S(e),s=o,c=a?s.childNodes.length:0;return B(o,t,r),a&&Ze(s,c),o}}function it(e,...t){return function(n,r=0){let i=n,a=i?Xe(i,e):null,o;if(a)o=a;else{let t=C(x,e);if(!t)throw Error(`Failed to create SVG element: ${e}`);o=t}let s=o,c=a?s.childNodes.length:0;return B(o,t,r),a&&Ze(s,c),o}}function at(e){return(...t)=>rt(e,...t)}function ot(e){return(...t)=>it(e,...t)}let V=`a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.label.legend.li.link.main.map.mark.menu.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.script.search.section.select.slot.small.source.span.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr`.split(`.`),H=`a.animate.animateMotion.animateTransform.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.filter.foreignObject.g.image.line.linearGradient.marker.mask.metadata.mpath.path.pattern.polygon.polyline.radialGradient.rect.script.set.stop.style.svg.switch.symbol.text.textPath.title.tspan.use.view`.split(`.`),st=[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`source`,`track`,`wbr`];function ct(e,t){t in e&&typeof e[t]!=`function`||(e[t]=at(t))}function lt(e,t){let n=`${t}Svg`;n in e||(e[n]=ot(t))}function ut(e=globalThis){let t=`__nuclo_tags_registered`;if(!e[t]){for(let t=0;t<H.length;t++)lt(e,H[t]);for(let t=0;t<V.length;t++)ct(e,V[t]);e[t]=!0}}function dt(e,t,n){if(c(e)){let r=e(t,n);return r&&o(r)?r:null}return e&&o(e)?e:null}function ft(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}let U=new Map;function pt(e){return Array.isArray(e)?e:Array.from(e)}function mt(e,t,n){return dt(e.renderItem(t,n),e.host,n)}function ht(e){ge(e.element);let t=e;t.element=null,t.item=null}function gt(e){let{host:t,startMarker:n,endMarker:r}=e,i=n.parentNode??t,a=pt(e.itemsProvider());if(ft(e.lastSyncedItems,a))return;let o=new Map,s=new Map;for(let t=0;t<e.records.length;t++){let n=e.records[t],r=s.get(n.item);r?r.push(n):s.set(n.item,[n])}for(let t=0;t<a.length;t++){let n=a[t];if(t<e.lastSyncedItems.length&&e.lastSyncedItems[t]===n){let r=e.records[t];if(r&&r.item===n){o.set(t,r);let e=s.get(n);e.splice(e.indexOf(r),1),e.length===0&&s.delete(n)}}}let c=Array(a.length),l=new Set(e.records),u=r;for(let t=a.length-1;t>=0;t--){let n=a[t],r=o.get(t);if(!r){let e=s.get(n);e&&e.length>0&&(r=e.shift(),e.length===0&&s.delete(n))}if(r)l.delete(r);else{let i=mt(e,n,t);if(!i){c[t]=null;continue}r={item:n,element:i}}c[t]=r;let d=r.element;d.nextSibling!==u&&i.insertBefore(d,u),u=d}for(let e of l)ht(e);e.records=c.filter(e=>e!==null),e.lastSyncedItems=a.slice(),c.length===0&&(e.records=[],e.lastSyncedItems=[])}function _t(e,t,n,r){return F()?yt(e,t,n,r):vt(e,t,n,r)}function vt(e,t,n,r){let{start:i,end:a}=ye(`list`,r),o={itemsProvider:e,renderItem:t,startMarker:i,endMarker:a,records:[],host:n,lastSyncedItems:[]},s=n;if(s.appendChild(i),s.appendChild(a),gt(o),d){let e={runtime:o};U.set(new WeakRef(i),e)}return o}function yt(e,t,n,r){let i=n,a=I(i),o=i.childNodes[a];if(!o||o.nodeType!==8||!o.textContent?.startsWith(`list-start-`))return vt(e,t,n,r);let s=L(i),c=I(i);for(;c<i.childNodes.length;){let e=i.childNodes[c];if(e.nodeType===8&&e.textContent===`list-end`)break;c++}let l=i.childNodes[c],u=pt(e()),f=[];for(let e=0;e<u.length;e++){let r=dt(t(u[e],e),n,e);r&&f.push({item:u[e],element:r})}Ye(i,c+1);let p={itemsProvider:e,renderItem:t,startMarker:s,endMarker:l,records:f,host:n,lastSyncedItems:u.slice()};if(d){let e={runtime:p};U.set(new WeakRef(s),e)}return p}function bt(e){for(let t=0;t<e.records.length;t++){let n=e.records[t];n.element=null,n.item=null}e.records=[]}function xt(e){let t=[];for(let[n,r]of U){let i=n.deref();if(!i||!E(i)||!E(r.runtime.endMarker)){bt(r.runtime),t.push(n);continue}e&&!e.contains(i)||gt(r.runtime)}for(let e of t)U.delete(e)}function St(e,t){return function(n,r){return _t(e,t,n,r).startMarker}}function Ct(e,t){try{return e()}catch(e){if(t)return t(e),!1;throw e}}function wt(e,t){return typeof e==`function`?Ct(e,t):!!e}function Tt(e,t,n,r){return c(e)?l(e)?(N.delete(e),R(t,e,n)):Ne(t,r,()=>{let r=R(t,e,n);return r&&!r.parentNode?r:null}):R(t,e,n)}function Et(e,t,n,r){let i=[];for(let a of e){let e=Tt(a,t,n,r);e&&i.push(e)}return i}let W=new Map;function Dt(e,t){for(let t=0;t<e.length;t++)if(wt(e[t].condition))return t;return t.length>0?-1:null}function Ot(e){let{groups:t,elseContent:n,host:r,index:i,endMarker:a}=e,o=Dt(t,n);o!==e.activeIndex&&(be(e.startMarker,e.endMarker),e.activeIndex=o,o!==null&&xe(Et(o>=0?t[o].content:n,r,i,a),a))}function kt(e){let t={runtime:e};W.set(new WeakRef(e.startMarker),t)}function At(e){let t=[];for(let[n,r]of W){let i=n.deref();if(i===void 0){t.push(n);continue}if(!E(i)||!E(r.runtime.endMarker)){t.push(n);continue}if(!(e&&!e.contains(i)))try{r.runtime.update()}catch{t.push(n)}}for(let e of t)W.delete(e)}var jt=class e{groups=[];elseContent=[];constructor(e,...t){this.groups.push({condition:e,content:t})}cloneWith(t,n){let r=Object.create(e.prototype);return r.groups=[...this.groups],t&&r.groups.push(t),r.elseContent=n??[...this.elseContent],r}when(e,...t){return this.groups.push({condition:e,content:t}),this}else(...e){return this.elseContent=e,this}render(e,t){return globalThis.document?F()?this.hydrateRender(e,t):this.freshRender(e,t):null}freshRender(e,t){let{start:n,end:r}=ye(`when`,t),i=this.createRuntimeFromMarkers(e,t,n,r),a=Me(e);return a.appendChild(n),a.appendChild(r),Ot(i),n}hydrateRender(e,t){let n=e,r=I(n),i=n.childNodes[r];if(!i||i.nodeType!==8||!i.textContent?.startsWith(`when-start-`))return this.freshRender(e,t);let a=L(n),o=I(n);for(;o<n.childNodes.length;){let e=n.childNodes[o];if(e.nodeType===8&&e.textContent===`when-end`)break;o++}let s=n.childNodes[o],c=Dt([...this.groups],[...this.elseContent]);if(c!==null){let n=c>=0?this.groups[c].content:this.elseContent;for(let r of n)R(e,r,t)}return Ye(n,o+1),this.createRuntimeFromMarkers(e,t,a,s,c),a}createRuntimeFromMarkers(e,t,n,r,i=null){let a={startMarker:n,endMarker:r,host:e,index:t,groups:[...this.groups],elseContent:[...this.elseContent],activeIndex:i,update:function(){Ot(a)}};return d&&kt(a),a}};function G(e){return Object.assign(function(t,n){return e.render(t,n)},{when:function(t,...n){return G(e.cloneWith({condition:t,content:n}))},else:function(...t){return G(e.cloneWith(void 0,t))}})}function Mt(e,...t){return G(new jt(e,...t))}function Nt(e){try{return e.isSvg?nt(e.tagName,e.modifiers):tt(e.tagName,e.modifiers)}catch(t){if(u(`Error applying modifiers in conditional element "${e.tagName}"`,t),e.isSvg){let n=C(x,e.tagName);if(!n)throw Error(`Failed to create SVG element: ${e.tagName}`,{cause:t});return n}let n=S(e.tagName);if(!n)throw Error(`Failed to create element: ${e.tagName}`,{cause:t});return n}}function Pt(e){let t=fe(e);if(!t)return;let n=Ct(t.condition,e=>{u(`Error evaluating conditional condition`,e)}),r=e.nodeType===Node.ELEMENT_NODE;if(n&&!r){let n=Nt(t);ue(n,t),D(e,n)}else if(!n&&r){let n=ve(t.tagName);n&&(ue(n,t),D(e,n))}}function Ft(e){if(d)try{let t=de();for(let n of t){if(!n.isConnected){b(n);continue}e&&!e.contains(n)||Pt(n)}}catch(e){u(`Error during conditional elements update`,e)}}function It(){if(typeof document>`u`)return;let e=document.body?[document.body,document]:[document];for(let t of e)try{t.dispatchEvent(new Event(`update`,{bubbles:!0}))}catch(e){u(`Error dispatching global update event`,e)}}let K=new Map;function Lt(e){let t=[],n=new Set;for(let r of e){if(typeof r!=`string`)continue;let e=r.trim();e&&(n.has(e)||(n.add(e),t.push(e)))}return t}function Rt(e,t){let n=K.get(e);n||(n=new Set,K.set(e,n)),n.add(new WeakRef(t))}function zt(e){let t=Lt(e);if(t.length===0)return[];let n=new Set;for(let e of t){let t=K.get(e);if(!t)continue;let r=[];for(let e of t){let t=e.deref();if(t===void 0){r.push(e);continue}if(!E(t)){r.push(e);continue}n.add(t)}for(let e of r)t.delete(e);t.size===0&&K.delete(e)}return Array.from(n)}function Bt(...e){let t=Lt(e);return function(e){if(d&&e instanceof Element)for(let n of t)Rt(n,e)}}let Vt=[xt,At,Ft,je,We,It];function Ht(...e){let t;if(e.length>0){let n=zt(e);if(n.length===1){let e=n[0];t={roots:n,contains:t=>e.contains(t)}}else t={roots:n,contains:e=>{for(let t of n)if(t.contains(e))return!0;return!1}}}for(let e of Vt)e(t)}function Ut(e,t,n=0){let r=e(t||document.body,n);return(t||document.body).appendChild(r),r}function Wt(e,t){let n=t||document.body;qe();try{return e(n,0)}finally{Je()}}let Gt=[{name:`display`,cssProperty:`display`},{name:`grid`,cssProperty:`display`,defaultValue:`grid`,isShorthand:!0},{name:`bg`,cssProperty:`background-color`},{name:`color`,cssProperty:`color`},{name:`accentColor`,cssProperty:`accent-color`},{name:`fontSize`,cssProperty:`font-size`},{name:`fontWeight`,cssProperty:`font-weight`},{name:`fontFamily`,cssProperty:`font-family`},{name:`lineHeight`,cssProperty:`line-height`},{name:`letterSpacing`,cssProperty:`letter-spacing`},{name:`textAlign`,cssProperty:`text-align`},{name:`textDecoration`,cssProperty:`text-decoration`},{name:`fontStyle`,cssProperty:`font-style`},{name:`fontVariant`,cssProperty:`font-variant`},{name:`fontStretch`,cssProperty:`font-stretch`},{name:`textTransform`,cssProperty:`text-transform`},{name:`textIndent`,cssProperty:`text-indent`},{name:`textOverflow`,cssProperty:`text-overflow`},{name:`textShadow`,cssProperty:`text-shadow`},{name:`whiteSpace`,cssProperty:`white-space`},{name:`wordSpacing`,cssProperty:`word-spacing`},{name:`wordWrap`,cssProperty:`word-wrap`},{name:`overflowWrap`,cssProperty:`overflow-wrap`},{name:`textAlignLast`,cssProperty:`text-align-last`},{name:`textJustify`,cssProperty:`text-justify`},{name:`textDecorationLine`,cssProperty:`text-decoration-line`},{name:`textDecorationColor`,cssProperty:`text-decoration-color`},{name:`textDecorationStyle`,cssProperty:`text-decoration-style`},{name:`textDecorationThickness`,cssProperty:`text-decoration-thickness`},{name:`textUnderlineOffset`,cssProperty:`text-underline-offset`},{name:`verticalAlign`,cssProperty:`vertical-align`},{name:`position`,cssProperty:`position`},{name:`padding`,cssProperty:`padding`},{name:`paddingTop`,cssProperty:`padding-top`},{name:`paddingRight`,cssProperty:`padding-right`},{name:`paddingBottom`,cssProperty:`padding-bottom`},{name:`paddingLeft`,cssProperty:`padding-left`},{name:`margin`,cssProperty:`margin`},{name:`marginTop`,cssProperty:`margin-top`},{name:`marginRight`,cssProperty:`margin-right`},{name:`marginBottom`,cssProperty:`margin-bottom`},{name:`marginLeft`,cssProperty:`margin-left`},{name:`width`,cssProperty:`width`},{name:`height`,cssProperty:`height`},{name:`minWidth`,cssProperty:`min-width`},{name:`maxWidth`,cssProperty:`max-width`},{name:`minHeight`,cssProperty:`min-height`},{name:`maxHeight`,cssProperty:`max-height`},{name:`boxSizing`,cssProperty:`box-sizing`},{name:`top`,cssProperty:`top`},{name:`right`,cssProperty:`right`},{name:`bottom`,cssProperty:`bottom`},{name:`left`,cssProperty:`left`},{name:`zIndex`,cssProperty:`z-index`},{name:`flexDirection`,cssProperty:`flex-direction`},{name:`alignItems`,cssProperty:`align-items`},{name:`justifyContent`,cssProperty:`justify-content`},{name:`gap`,cssProperty:`gap`},{name:`flexWrap`,cssProperty:`flex-wrap`},{name:`flexGrow`,cssProperty:`flex-grow`},{name:`flexShrink`,cssProperty:`flex-shrink`},{name:`flexBasis`,cssProperty:`flex-basis`},{name:`alignSelf`,cssProperty:`align-self`},{name:`alignContent`,cssProperty:`align-content`},{name:`justifySelf`,cssProperty:`justify-self`},{name:`justifyItems`,cssProperty:`justify-items`},{name:`gridTemplateColumns`,cssProperty:`grid-template-columns`},{name:`gridTemplateRows`,cssProperty:`grid-template-rows`},{name:`gridTemplateAreas`,cssProperty:`grid-template-areas`},{name:`gridColumn`,cssProperty:`grid-column`},{name:`gridRow`,cssProperty:`grid-row`},{name:`gridColumnStart`,cssProperty:`grid-column-start`},{name:`gridColumnEnd`,cssProperty:`grid-column-end`},{name:`gridRowStart`,cssProperty:`grid-row-start`},{name:`gridRowEnd`,cssProperty:`grid-row-end`},{name:`gridArea`,cssProperty:`grid-area`},{name:`gridAutoColumns`,cssProperty:`grid-auto-columns`},{name:`gridAutoRows`,cssProperty:`grid-auto-rows`},{name:`gridAutoFlow`,cssProperty:`grid-auto-flow`},{name:`border`,cssProperty:`border`},{name:`borderTop`,cssProperty:`border-top`},{name:`borderRight`,cssProperty:`border-right`},{name:`borderBottom`,cssProperty:`border-bottom`},{name:`borderLeft`,cssProperty:`border-left`},{name:`borderWidth`,cssProperty:`border-width`},{name:`borderStyle`,cssProperty:`border-style`},{name:`borderColor`,cssProperty:`border-color`},{name:`borderTopWidth`,cssProperty:`border-top-width`},{name:`borderRightWidth`,cssProperty:`border-right-width`},{name:`borderBottomWidth`,cssProperty:`border-bottom-width`},{name:`borderLeftWidth`,cssProperty:`border-left-width`},{name:`borderTopStyle`,cssProperty:`border-top-style`},{name:`borderRightStyle`,cssProperty:`border-right-style`},{name:`borderBottomStyle`,cssProperty:`border-bottom-style`},{name:`borderLeftStyle`,cssProperty:`border-left-style`},{name:`borderTopColor`,cssProperty:`border-top-color`},{name:`borderRightColor`,cssProperty:`border-right-color`},{name:`borderBottomColor`,cssProperty:`border-bottom-color`},{name:`borderLeftColor`,cssProperty:`border-left-color`},{name:`borderRadius`,cssProperty:`border-radius`},{name:`borderTopLeftRadius`,cssProperty:`border-top-left-radius`},{name:`borderTopRightRadius`,cssProperty:`border-top-right-radius`},{name:`borderBottomLeftRadius`,cssProperty:`border-bottom-left-radius`},{name:`borderBottomRightRadius`,cssProperty:`border-bottom-right-radius`},{name:`outline`,cssProperty:`outline`},{name:`outlineWidth`,cssProperty:`outline-width`},{name:`outlineStyle`,cssProperty:`outline-style`},{name:`outlineColor`,cssProperty:`outline-color`},{name:`outlineOffset`,cssProperty:`outline-offset`},{name:`backgroundColor`,cssProperty:`background-color`},{name:`backgroundImage`,cssProperty:`background-image`},{name:`backgroundRepeat`,cssProperty:`background-repeat`},{name:`backgroundPosition`,cssProperty:`background-position`},{name:`backgroundSize`,cssProperty:`background-size`},{name:`backgroundAttachment`,cssProperty:`background-attachment`},{name:`backgroundClip`,cssProperty:`background-clip`},{name:`backgroundOrigin`,cssProperty:`background-origin`},{name:`boxShadow`,cssProperty:`box-shadow`},{name:`opacity`,cssProperty:`opacity`},{name:`transition`,cssProperty:`transition`},{name:`transitionProperty`,cssProperty:`transition-property`},{name:`transitionDuration`,cssProperty:`transition-duration`},{name:`transitionTimingFunction`,cssProperty:`transition-timing-function`},{name:`transitionDelay`,cssProperty:`transition-delay`},{name:`transform`,cssProperty:`transform`},{name:`transformOrigin`,cssProperty:`transform-origin`},{name:`transformStyle`,cssProperty:`transform-style`},{name:`perspective`,cssProperty:`perspective`},{name:`perspectiveOrigin`,cssProperty:`perspective-origin`},{name:`backfaceVisibility`,cssProperty:`backface-visibility`},{name:`animation`,cssProperty:`animation`},{name:`animationName`,cssProperty:`animation-name`},{name:`animationDuration`,cssProperty:`animation-duration`},{name:`animationTimingFunction`,cssProperty:`animation-timing-function`},{name:`animationDelay`,cssProperty:`animation-delay`},{name:`animationIterationCount`,cssProperty:`animation-iteration-count`},{name:`animationDirection`,cssProperty:`animation-direction`},{name:`animationFillMode`,cssProperty:`animation-fill-mode`},{name:`animationPlayState`,cssProperty:`animation-play-state`},{name:`filter`,cssProperty:`filter`},{name:`backdropFilter`,cssProperty:`backdrop-filter`},{name:`overflow`,cssProperty:`overflow`},{name:`overflowX`,cssProperty:`overflow-x`},{name:`overflowY`,cssProperty:`overflow-y`},{name:`visibility`,cssProperty:`visibility`},{name:`objectFit`,cssProperty:`object-fit`},{name:`objectPosition`,cssProperty:`object-position`},{name:`listStyle`,cssProperty:`list-style`},{name:`listStyleType`,cssProperty:`list-style-type`},{name:`listStylePosition`,cssProperty:`list-style-position`},{name:`listStyleImage`,cssProperty:`list-style-image`},{name:`borderCollapse`,cssProperty:`border-collapse`},{name:`borderSpacing`,cssProperty:`border-spacing`},{name:`captionSide`,cssProperty:`caption-side`},{name:`emptyCells`,cssProperty:`empty-cells`},{name:`tableLayout`,cssProperty:`table-layout`},{name:`content`,cssProperty:`content`},{name:`quotes`,cssProperty:`quotes`},{name:`counterReset`,cssProperty:`counter-reset`},{name:`counterIncrement`,cssProperty:`counter-increment`},{name:`appearance`,cssProperty:`appearance`},{name:`userSelect`,cssProperty:`user-select`},{name:`pointerEvents`,cssProperty:`pointer-events`},{name:`resize`,cssProperty:`resize`},{name:`scrollBehavior`,cssProperty:`scroll-behavior`},{name:`clip`,cssProperty:`clip`},{name:`clipPath`,cssProperty:`clip-path`},{name:`isolation`,cssProperty:`isolation`},{name:`mixBlendMode`,cssProperty:`mix-blend-mode`},{name:`willChange`,cssProperty:`will-change`},{name:`contain`,cssProperty:`contain`},{name:`pageBreakBefore`,cssProperty:`page-break-before`},{name:`pageBreakAfter`,cssProperty:`page-break-after`},{name:`pageBreakInside`,cssProperty:`page-break-inside`},{name:`breakBefore`,cssProperty:`break-before`},{name:`breakAfter`,cssProperty:`break-after`},{name:`breakInside`,cssProperty:`break-inside`},{name:`orphans`,cssProperty:`orphans`},{name:`widows`,cssProperty:`widows`},{name:`columnCount`,cssProperty:`column-count`},{name:`columnFill`,cssProperty:`column-fill`},{name:`columnGap`,cssProperty:`column-gap`},{name:`columnRule`,cssProperty:`column-rule`},{name:`columnRuleColor`,cssProperty:`column-rule-color`},{name:`columnRuleStyle`,cssProperty:`column-rule-style`},{name:`columnRuleWidth`,cssProperty:`column-rule-width`},{name:`columnSpan`,cssProperty:`column-span`},{name:`columnWidth`,cssProperty:`column-width`},{name:`columns`,cssProperty:`columns`},{name:`cursor`,cssProperty:`cursor`},{name:`aspectRatio`,cssProperty:`aspect-ratio`},{name:`clear`,cssProperty:`clear`},{name:`float`,cssProperty:`float`},{name:`order`,cssProperty:`order`},{name:`placeContent`,cssProperty:`place-content`},{name:`placeItems`,cssProperty:`place-items`},{name:`placeSelf`,cssProperty:`place-self`},{name:`hyphens`,cssProperty:`hyphens`},{name:`lineBreak`,cssProperty:`line-break`},{name:`wordBreak`,cssProperty:`word-break`},{name:`textOrientation`,cssProperty:`text-orientation`},{name:`writingMode`,cssProperty:`writing-mode`},{name:`direction`,cssProperty:`direction`},{name:`unicodeBidi`,cssProperty:`unicode-bidi`},{name:`backgroundBlendMode`,cssProperty:`background-blend-mode`},{name:`backgroundPositionX`,cssProperty:`background-position-x`},{name:`backgroundPositionY`,cssProperty:`background-position-y`},{name:`borderImage`,cssProperty:`border-image`},{name:`borderImageSource`,cssProperty:`border-image-source`},{name:`borderImageSlice`,cssProperty:`border-image-slice`},{name:`borderImageWidth`,cssProperty:`border-image-width`},{name:`borderImageOutset`,cssProperty:`border-image-outset`},{name:`borderImageRepeat`,cssProperty:`border-image-repeat`},{name:`inset`,cssProperty:`inset`},{name:`insetBlock`,cssProperty:`inset-block`},{name:`insetBlockStart`,cssProperty:`inset-block-start`},{name:`insetBlockEnd`,cssProperty:`inset-block-end`},{name:`insetInline`,cssProperty:`inset-inline`},{name:`insetInlineStart`,cssProperty:`inset-inline-start`},{name:`insetInlineEnd`,cssProperty:`inset-inline-end`},{name:`marginBlock`,cssProperty:`margin-block`},{name:`marginBlockStart`,cssProperty:`margin-block-start`},{name:`marginBlockEnd`,cssProperty:`margin-block-end`},{name:`marginInline`,cssProperty:`margin-inline`},{name:`marginInlineStart`,cssProperty:`margin-inline-start`},{name:`marginInlineEnd`,cssProperty:`margin-inline-end`},{name:`paddingBlock`,cssProperty:`padding-block`},{name:`paddingBlockStart`,cssProperty:`padding-block-start`},{name:`paddingBlockEnd`,cssProperty:`padding-block-end`},{name:`paddingInline`,cssProperty:`padding-inline`},{name:`paddingInlineStart`,cssProperty:`padding-inline-start`},{name:`paddingInlineEnd`,cssProperty:`padding-inline-end`},{name:`inlineSize`,cssProperty:`inline-size`},{name:`blockSize`,cssProperty:`block-size`},{name:`minInlineSize`,cssProperty:`min-inline-size`},{name:`minBlockSize`,cssProperty:`min-block-size`},{name:`maxInlineSize`,cssProperty:`max-inline-size`},{name:`maxBlockSize`,cssProperty:`max-block-size`},{name:`borderBlock`,cssProperty:`border-block`},{name:`borderBlockStart`,cssProperty:`border-block-start`},{name:`borderBlockEnd`,cssProperty:`border-block-end`},{name:`borderInline`,cssProperty:`border-inline`},{name:`borderInlineStart`,cssProperty:`border-inline-start`},{name:`borderInlineEnd`,cssProperty:`border-inline-end`},{name:`borderBlockWidth`,cssProperty:`border-block-width`},{name:`borderBlockStartWidth`,cssProperty:`border-block-start-width`},{name:`borderBlockEndWidth`,cssProperty:`border-block-end-width`},{name:`borderInlineWidth`,cssProperty:`border-inline-width`},{name:`borderInlineStartWidth`,cssProperty:`border-inline-start-width`},{name:`borderInlineEndWidth`,cssProperty:`border-inline-end-width`},{name:`borderBlockStyle`,cssProperty:`border-block-style`},{name:`borderBlockStartStyle`,cssProperty:`border-block-start-style`},{name:`borderBlockEndStyle`,cssProperty:`border-block-end-style`},{name:`borderInlineStyle`,cssProperty:`border-inline-style`},{name:`borderInlineStartStyle`,cssProperty:`border-inline-start-style`},{name:`borderInlineEndStyle`,cssProperty:`border-inline-end-style`},{name:`borderBlockColor`,cssProperty:`border-block-color`},{name:`borderBlockStartColor`,cssProperty:`border-block-start-color`},{name:`borderBlockEndColor`,cssProperty:`border-block-end-color`},{name:`borderInlineColor`,cssProperty:`border-inline-color`},{name:`borderInlineStartColor`,cssProperty:`border-inline-start-color`},{name:`borderInlineEndColor`,cssProperty:`border-inline-end-color`},{name:`borderStartStartRadius`,cssProperty:`border-start-start-radius`},{name:`borderStartEndRadius`,cssProperty:`border-start-end-radius`},{name:`borderEndStartRadius`,cssProperty:`border-end-start-radius`},{name:`borderEndEndRadius`,cssProperty:`border-end-end-radius`},{name:`scrollMargin`,cssProperty:`scroll-margin`},{name:`scrollMarginTop`,cssProperty:`scroll-margin-top`},{name:`scrollMarginRight`,cssProperty:`scroll-margin-right`},{name:`scrollMarginBottom`,cssProperty:`scroll-margin-bottom`},{name:`scrollMarginLeft`,cssProperty:`scroll-margin-left`},{name:`scrollPadding`,cssProperty:`scroll-padding`},{name:`scrollPaddingTop`,cssProperty:`scroll-padding-top`},{name:`scrollPaddingRight`,cssProperty:`scroll-padding-right`},{name:`scrollPaddingBottom`,cssProperty:`scroll-padding-bottom`},{name:`scrollPaddingLeft`,cssProperty:`scroll-padding-left`},{name:`overscrollBehavior`,cssProperty:`overscroll-behavior`},{name:`overscrollBehaviorX`,cssProperty:`overscroll-behavior-x`},{name:`overscrollBehaviorY`,cssProperty:`overscroll-behavior-y`},{name:`caretColor`,cssProperty:`caret-color`},{name:`caretShape`,cssProperty:`caret-shape`},{name:`caretAnimation`,cssProperty:`caret-animation`},{name:`imageRendering`,cssProperty:`image-rendering`},{name:`colorScheme`,cssProperty:`color-scheme`},{name:`contentVisibility`,cssProperty:`content-visibility`},{name:`touchAction`,cssProperty:`touch-action`},{name:`containerType`,cssProperty:`container-type`},{name:`containerName`,cssProperty:`container-name`},{name:`container`,cssProperty:`container`},{name:`fontFeatureSettings`,cssProperty:`font-feature-settings`},{name:`fontKerning`,cssProperty:`font-kerning`},{name:`fontSynthesis`,cssProperty:`font-synthesis`},{name:`fontOpticalSizing`,cssProperty:`font-optical-sizing`},{name:`fontDisplay`,cssProperty:`font-display`},{name:`fontVariantCaps`,cssProperty:`font-variant-caps`},{name:`fontVariantNumeric`,cssProperty:`font-variant-numeric`},{name:`fontVariantLigatures`,cssProperty:`font-variant-ligatures`},{name:`fontVariantEastAsian`,cssProperty:`font-variant-east-asian`},{name:`fontVariantAlternates`,cssProperty:`font-variant-alternates`},{name:`fontVariantPosition`,cssProperty:`font-variant-position`},{name:`textRendering`,cssProperty:`text-rendering`},{name:`textCombineUpright`,cssProperty:`text-combine-upright`},{name:`textSizeAdjust`,cssProperty:`text-size-adjust`},{name:`mask`,cssProperty:`mask`},{name:`maskImage`,cssProperty:`mask-image`},{name:`maskMode`,cssProperty:`mask-mode`},{name:`maskRepeat`,cssProperty:`mask-repeat`},{name:`maskPosition`,cssProperty:`mask-position`},{name:`maskSize`,cssProperty:`mask-size`},{name:`maskOrigin`,cssProperty:`mask-origin`},{name:`maskClip`,cssProperty:`mask-clip`},{name:`maskComposite`,cssProperty:`mask-composite`},{name:`clipRule`,cssProperty:`clip-rule`},{name:`gridColumnGap`,cssProperty:`grid-column-gap`},{name:`gridRowGap`,cssProperty:`grid-row-gap`},{name:`gridGap`,cssProperty:`grid-gap`}],Kt=[`bold`,`center`,`flex`],qt=new Map;function q(e){let t=0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return Math.abs(t).toString(16).padStart(8,`0`).substring(0,8)}function J(e){return Object.entries(e).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>`${e}:${t}`).join(`|`)}function Jt(e){return qt.get(e)}function Yt(e,t){qt.set(e,t)}function Xt(e){return e instanceof CSSMediaRule||e instanceof CSSContainerRule||e instanceof CSSSupportsRule}function Zt(e,t,n){return t===`media`&&e instanceof CSSMediaRule?e.media.mediaText===n:t===`container`&&e instanceof CSSContainerRule||t===`supports`&&e instanceof CSSSupportsRule?e.conditionText===n:!1}function Y(e,t){for(let n=0;n<e.length;n++){let r=e[n];if(r instanceof CSSStyleRule&&r.selectorText===t)return r}return null}function X(e,t){e.style.cssText=``;for(let[n,r]of Object.entries(t))e.style.setProperty(n,r)}function Qt(){if(!d)return null;let e=document.querySelector(`#nuclo-styles`);return e||(e=S(`style`),e.id=`nuclo-styles`,document.head.appendChild(e)),e}function $t(e){let t=Object.entries(e),n=``;for(let e=0;e<t.length;e++)e>0&&(n+=`; `),n+=`${t[e][0]}: ${t[e][1]}`;return n}function en(e,t,n=`media`,r){if(!d)return!1;let i=document.querySelector(`#nuclo-styles`);if(!i?.sheet)return!1;let a=i.sheet.cssRules;if(r)return Y(a,`.${e}${r}`)!==null;if(t){for(let r=0;r<a.length;r++)if(Zt(a[r],n,t))return Y(a[r].cssRules,`.${e}`)!==null;return!1}return Y(a,`.${e}`)!==null}function Z(e,t,n,r=`media`,i){if(!d){let r=$t(t);i?`${e}${i}${r}`:n?`${n}${e}${r}`:`${e}${r}`;return}let a=Qt();if(!a)return;let o=a.sheet;if(!o)return;let s=$t(t);if(i){let n=`.${e}${i}`,r=o.cssRules,a=r.length,c=null,l=a;for(let e=0;e<a;e++){let t=r[e];if(t instanceof CSSStyleRule){if(t.selectorText===n){c=t;break}t.selectorText.includes(`:`)||(l=e+1)}}c?X(c,t):o.insertRule(`${n} { ${s} }`,l);return}if(n){let i=o.cssRules,a=i.length,c=null;for(let e=0;e<a;e++)if(Zt(i[e],r,n)){c=i[e];break}if(!c){let e=a;for(let t=a-1;t>=0;t--)if(Xt(i[t])||i[t]instanceof CSSStyleRule){e=t+1;break}let t=r===`media`?`@media`:r===`container`?`@container`:r===`supports`?`@supports`:`@media`;o.insertRule(`${t} ${n} {}`,e),c=o.cssRules[e]}let l=Y(c.cssRules,`.${e}`);l?X(l,t):c.insertRule(`.${e} { ${s} }`,c.cssRules.length)}else{let n=null,r=0,i=o.cssRules,a=i.length;for(let t=0;t<a;t++){let a=i[t];if(a instanceof CSSStyleRule&&a.selectorText===`.${e}`){n=a,r=t;break}Xt(a)||(r=t+1)}n?X(n,t):o.insertRule(`.${e} { ${s} }`,r)}}function tn(e,t){Z(e,t)}function nn(e,t=``,n){let r=J(e),i=t?`${t}:${r}`:r,a=Jt(i);if(a)return(!d||!en(a,n))&&Z(a,e,n),a;let o=q(r),s=t?`n${t}-${o}`:`n${o}`;return Yt(i,s),Z(s,e,n),s}var Q=class{styles={};getStyles(){return{...this.styles}}getClassName(e=``,t){return nn(this.styles,e,t)}getClassNames(){return[this.getClassName()]}getClassDefinitions(){return Object.entries(this.styles).map(([e,t])=>({className:this.getClassName(),property:e,value:t}))}toString(){return this.getClassName()}add(e,t){return this.styles[e]=t,this}bold(){return this.styles[`font-weight`]=`bold`,this}center(){return this.styles[`justify-content`]=`center`,this.styles[`align-items`]=`center`,this}flex(e){return e===void 0?this.styles.display=`flex`:this.styles.flex=e,this}};function rn(){let e=Q.prototype;for(let t of Gt)t.name in e||(t.isShorthand?e[t.name]=function(){return this.add(t.cssProperty,t.defaultValue||``),this}:e[t.name]=function(e){return this.add(t.cssProperty,e),this})}rn();function an(e){return e.isShorthand?()=>new Q().add(e.cssProperty,e.defaultValue||``):t=>new Q().add(e.cssProperty,t||``)}let $={};for(let e of Gt)$[e.name]=an(e);for(let e of Kt)e===`bold`||e===`center`?$[e]=()=>new Q()[e]():e===`flex`&&($[e]=e=>new Q().flex(e));let{display:on,flex:sn,grid:cn,bg:ln,color:un,accentColor:dn,fontSize:fn,fontWeight:pn,fontFamily:mn,lineHeight:hn,letterSpacing:gn,textAlign:_n,textDecoration:vn,bold:yn,fontStyle:bn,fontVariant:xn,fontStretch:Sn,textTransform:Cn,textIndent:wn,textOverflow:Tn,textShadow:En,whiteSpace:Dn,wordSpacing:On,wordWrap:kn,overflowWrap:An,textAlignLast:jn,textJustify:Mn,textDecorationLine:Nn,textDecorationColor:Pn,textDecorationStyle:Fn,textDecorationThickness:In,textUnderlineOffset:Ln,verticalAlign:Rn,position:zn,padding:Bn,paddingTop:Vn,paddingRight:Hn,paddingBottom:Un,paddingLeft:Wn,margin:Gn,marginTop:Kn,marginRight:qn,marginBottom:Jn,marginLeft:Yn,width:Xn,height:Zn,minWidth:Qn,maxWidth:$n,minHeight:er,maxHeight:tr,boxSizing:nr,top:rr,right:ir,bottom:ar,left:or,zIndex:sr,flexDirection:cr,alignItems:lr,justifyContent:ur,center:dr,gap:fr,flexWrap:pr,flexGrow:mr,flexShrink:hr,flexBasis:gr,alignSelf:_r,alignContent:vr,justifySelf:yr,justifyItems:br,gridTemplateColumns:xr,gridTemplateRows:Sr,gridTemplateAreas:Cr,gridColumn:wr,gridRow:Tr,gridColumnStart:Er,gridColumnEnd:Dr,gridRowStart:Or,gridRowEnd:kr,gridArea:Ar,gridAutoColumns:jr,gridAutoRows:Mr,gridAutoFlow:Nr,border:Pr,borderTop:Fr,borderRight:Ir,borderBottom:Lr,borderLeft:Rr,borderWidth:zr,borderStyle:Br,borderColor:Vr,borderTopWidth:Hr,borderRightWidth:Ur,borderBottomWidth:Wr,borderLeftWidth:Gr,borderTopStyle:Kr,borderRightStyle:qr,borderBottomStyle:Jr,borderLeftStyle:Yr,borderTopColor:Xr,borderRightColor:Zr,borderBottomColor:Qr,borderLeftColor:$r,borderRadius:ei,borderTopLeftRadius:ti,borderTopRightRadius:ni,borderBottomLeftRadius:ri,borderBottomRightRadius:ii,outline:ai,outlineWidth:oi,outlineStyle:si,outlineColor:ci,outlineOffset:li,backgroundColor:ui,backgroundImage:di,backgroundRepeat:fi,backgroundPosition:pi,backgroundSize:mi,backgroundAttachment:hi,backgroundClip:gi,backgroundOrigin:_i,boxShadow:vi,opacity:yi,transition:bi,transitionProperty:xi,transitionDuration:Si,transitionTimingFunction:Ci,transitionDelay:wi,transform:Ti,transformOrigin:Ei,transformStyle:Di,perspective:Oi,perspectiveOrigin:ki,backfaceVisibility:Ai,animation:ji,animationName:Mi,animationDuration:Ni,animationTimingFunction:Pi,animationDelay:Fi,animationIterationCount:Ii,animationDirection:Li,animationFillMode:Ri,animationPlayState:zi,filter:Bi,backdropFilter:Vi,overflow:Hi,overflowX:Ui,overflowY:Wi,visibility:Gi,objectFit:Ki,objectPosition:qi,listStyle:Ji,listStyleType:Yi,listStylePosition:Xi,listStyleImage:Zi,borderCollapse:Qi,borderSpacing:$i,captionSide:ea,emptyCells:ta,tableLayout:na,content:ra,quotes:ia,counterReset:aa,counterIncrement:oa,appearance:sa,userSelect:ca,pointerEvents:la,resize:ua,scrollBehavior:da,clip:fa,clipPath:pa,isolation:ma,mixBlendMode:ha,willChange:ga,contain:_a,pageBreakBefore:va,pageBreakAfter:ya,pageBreakInside:ba,breakBefore:xa,breakAfter:Sa,breakInside:Ca,orphans:wa,widows:Ta,columnCount:Ea,columnFill:Da,columnGap:Oa,columnRule:ka,columnRuleColor:Aa,columnRuleStyle:ja,columnRuleWidth:Ma,columnSpan:Na,columnWidth:Pa,columns:Fa,cursor:Ia,aspectRatio:La,clear:Ra,float:za,order:Ba,placeContent:Va,placeItems:Ha,placeSelf:Ua,hyphens:Wa,lineBreak:Ga,wordBreak:Ka,textOrientation:qa,writingMode:Ja,direction:Ya,unicodeBidi:Xa,backgroundBlendMode:Za,backgroundPositionX:Qa,backgroundPositionY:$a,borderImage:eo,borderImageSource:to,borderImageSlice:no,borderImageWidth:ro,borderImageOutset:io,borderImageRepeat:ao,inset:oo,insetBlock:so,insetBlockStart:co,insetBlockEnd:lo,insetInline:uo,insetInlineStart:fo,insetInlineEnd:po,marginBlock:mo,marginBlockStart:ho,marginBlockEnd:go,marginInline:_o,marginInlineStart:vo,marginInlineEnd:yo,paddingBlock:bo,paddingBlockStart:xo,paddingBlockEnd:So,paddingInline:Co,paddingInlineStart:wo,paddingInlineEnd:To,inlineSize:Eo,blockSize:Do,minInlineSize:Oo,minBlockSize:ko,maxInlineSize:Ao,maxBlockSize:jo,borderBlock:Mo,borderBlockStart:No,borderBlockEnd:Po,borderInline:Fo,borderInlineStart:Io,borderInlineEnd:Lo,borderBlockWidth:Ro,borderBlockStartWidth:zo,borderBlockEndWidth:Bo,borderInlineWidth:Vo,borderInlineStartWidth:Ho,borderInlineEndWidth:Uo,borderBlockStyle:Wo,borderBlockStartStyle:Go,borderBlockEndStyle:Ko,borderInlineStyle:qo,borderInlineStartStyle:Jo,borderInlineEndStyle:Yo,borderBlockColor:Xo,borderBlockStartColor:Zo,borderBlockEndColor:Qo,borderInlineColor:$o,borderInlineStartColor:es,borderInlineEndColor:ts,borderStartStartRadius:ns,borderStartEndRadius:rs,borderEndStartRadius:is,borderEndEndRadius:as,scrollMargin:os,scrollMarginTop:ss,scrollMarginRight:cs,scrollMarginBottom:ls,scrollMarginLeft:us,scrollPadding:ds,scrollPaddingTop:fs,scrollPaddingRight:ps,scrollPaddingBottom:ms,scrollPaddingLeft:hs,overscrollBehavior:gs,overscrollBehaviorX:_s,overscrollBehaviorY:vs,caretColor:ys,caretShape:bs,caretAnimation:xs,imageRendering:Ss,colorScheme:Cs,contentVisibility:ws,touchAction:Ts,containerType:Es,containerName:Ds,container:Os,fontFeatureSettings:ks,fontKerning:As,fontSynthesis:js,fontOpticalSizing:Ms,fontDisplay:Ns,fontVariantCaps:Ps,fontVariantNumeric:Fs,fontVariantLigatures:Is,fontVariantEastAsian:Ls,fontVariantAlternates:Rs,fontVariantPosition:zs,textRendering:Bs,textCombineUpright:Vs,textSizeAdjust:Hs,mask:Us,maskImage:Ws,maskMode:Gs,maskRepeat:Ks,maskPosition:qs,maskSize:Js,maskOrigin:Ys,maskClip:Xs,maskComposite:Zs,clipRule:Qs,gridColumnGap:$s,gridRowGap:ec,gridGap:tc}=$,nc=new Set(`hover.active.focus.focus-visible.focus-within.visited.link.target.root.empty.enabled.disabled.checked.indeterminate.default.required.optional.valid.invalid.in-range.out-of-range.placeholder-shown.autofill.read-only.read-write.first-child.last-child.only-child.first-of-type.last-of-type.only-of-type.nth-child.nth-last-child.nth-of-type.nth-last-of-type.lang.dir.not.is.where.has.any-link.local-link.scope.current.past.future.playing.paused.seeking.muted.volume-locked.buffering.stalled.picture-in-picture.fullscreen.modal.popover-open.user-invalid.user-valid`.split(`.`));function rc(e){let t=e.trim();return t.startsWith(`&:`)||t.startsWith(`:`)?{type:`pseudo`,pseudoClass:(t.startsWith(`&:`)?t.slice(1):t).trim()}:t.startsWith(`@media `)?{type:`media`,condition:t.slice(7).trim()}:t.startsWith(`@container `)?{type:`container`,condition:t.slice(11).trim()}:t.startsWith(`@supports `)?{type:`supports`,condition:t.slice(10).trim()}:t.startsWith(`@style `)?{type:`style`,condition:t.slice(7).trim()}:{type:`media`,condition:t}}function ic(e){return nc.has(e)}function ac(e,t){return`${e}_${q(t)}`}let oc=new Map;function sc(e){let t=Array.isArray(e)?[...e]:Object.entries(e),n=new Map;for(let[e,r]of t){let t=oc.get(r);t||(t=rc(r),oc.set(r,t)),n.set(e,t)}return function(e,r,i){let a,o,s;typeof e==`string`?(a=e.trim()||void 0,r instanceof Q?(o=r,s=i):s=r):r===void 0?e instanceof Q?o=e:s=e:(o=e,s=r);let c=s!=null&&Object.keys(s).length>0;if(!o&&!c)return{className:a??``};if(c){let e=[],r=new Set;for(let[i]of t){let t=s?.[i];t&&(r.add(i),e.push({queryName:i,query:n.get(i),styles:t.getStyles()}))}for(let[t,n]of Object.entries(s??{}))!r.has(t)&&ic(t)&&n instanceof Q&&e.push({queryName:t,query:{type:`pseudo`,pseudoClass:`:${t}`},styles:n.getStyles()});if(e.length===0&&!o)return{className:a??``};let i=[];i.length=e.length+ +!!o;let c=0;if(o){let e=o.getStyles();i[c++]=`default:${J(e)}`}for(let{queryName:t,styles:n}of e){let e=J(n);i[c++]=`${t}:${e}`}let l=i.sort().join(`||`),u=a?ac(a,l):`n${q(l)}`,d={};o&&(d={...o.getStyles()},Z(u,d));let f=[],p=[];for(let t of e)t.query.type===`pseudo`?p.push(t):f.push(t);for(let{query:e,styles:t}of f)d={...d,...t},Z(u,d,e.condition,e.type);for(let{query:e,styles:t}of p)Z(u,t,void 0,`pseudo`,e.pseudoClass);return{className:u}}if(a){let e=J(o.getStyles()),t=ac(a,e);return Z(t,o.getStyles()),{className:t}}return{className:o.getClassName()}}}let cc=sc;var lc=n({StyleBuilder:()=>Q,accentColor:()=>dn,alignContent:()=>vr,alignItems:()=>lr,alignSelf:()=>_r,animation:()=>ji,animationDelay:()=>Fi,animationDirection:()=>Li,animationDuration:()=>Ni,animationFillMode:()=>Ri,animationIterationCount:()=>Ii,animationName:()=>Mi,animationPlayState:()=>zi,animationTimingFunction:()=>Pi,appearance:()=>sa,backdropFilter:()=>Vi,backfaceVisibility:()=>Ai,backgroundAttachment:()=>hi,backgroundClip:()=>gi,backgroundColor:()=>ui,backgroundImage:()=>di,backgroundOrigin:()=>_i,backgroundPosition:()=>pi,backgroundRepeat:()=>fi,backgroundSize:()=>mi,bg:()=>ln,bold:()=>yn,border:()=>Pr,borderBottom:()=>Lr,borderBottomColor:()=>Qr,borderBottomLeftRadius:()=>ri,borderBottomRightRadius:()=>ii,borderBottomStyle:()=>Jr,borderBottomWidth:()=>Wr,borderCollapse:()=>Qi,borderColor:()=>Vr,borderLeft:()=>Rr,borderLeftColor:()=>$r,borderLeftStyle:()=>Yr,borderLeftWidth:()=>Gr,borderRadius:()=>ei,borderRight:()=>Ir,borderRightColor:()=>Zr,borderRightStyle:()=>qr,borderRightWidth:()=>Ur,borderSpacing:()=>$i,borderStyle:()=>Br,borderTop:()=>Fr,borderTopColor:()=>Xr,borderTopLeftRadius:()=>ti,borderTopRightRadius:()=>ni,borderTopStyle:()=>Kr,borderTopWidth:()=>Hr,borderWidth:()=>zr,bottom:()=>ar,boxShadow:()=>vi,boxSizing:()=>nr,breakAfter:()=>Sa,breakBefore:()=>xa,breakInside:()=>Ca,captionSide:()=>ea,center:()=>dr,clip:()=>fa,clipPath:()=>pa,color:()=>un,columnCount:()=>Ea,columnFill:()=>Da,columnGap:()=>Oa,columnRule:()=>ka,columnRuleColor:()=>Aa,columnRuleStyle:()=>ja,columnRuleWidth:()=>Ma,columnSpan:()=>Na,columnWidth:()=>Pa,columns:()=>Fa,contain:()=>_a,content:()=>ra,counterIncrement:()=>oa,counterReset:()=>aa,createBreakpoints:()=>cc,createCSSClass:()=>tn,createStyleQueries:()=>sc,cursor:()=>Ia,display:()=>on,emptyCells:()=>ta,filter:()=>Bi,flex:()=>sn,flexBasis:()=>gr,flexDirection:()=>cr,flexGrow:()=>mr,flexShrink:()=>hr,flexWrap:()=>pr,fontFamily:()=>mn,fontSize:()=>fn,fontStretch:()=>Sn,fontStyle:()=>bn,fontVariant:()=>xn,fontWeight:()=>pn,gap:()=>fr,grid:()=>cn,gridArea:()=>Ar,gridAutoColumns:()=>jr,gridAutoFlow:()=>Nr,gridAutoRows:()=>Mr,gridColumn:()=>wr,gridColumnEnd:()=>Dr,gridColumnStart:()=>Er,gridRow:()=>Tr,gridRowEnd:()=>kr,gridRowStart:()=>Or,gridTemplateAreas:()=>Cr,gridTemplateColumns:()=>xr,gridTemplateRows:()=>Sr,height:()=>Zn,isolation:()=>ma,justifyContent:()=>ur,justifyItems:()=>br,justifySelf:()=>yr,left:()=>or,letterSpacing:()=>gn,lineHeight:()=>hn,listStyle:()=>Ji,listStyleImage:()=>Zi,listStylePosition:()=>Xi,listStyleType:()=>Yi,margin:()=>Gn,marginBottom:()=>Jn,marginLeft:()=>Yn,marginRight:()=>qn,marginTop:()=>Kn,maxHeight:()=>tr,maxWidth:()=>$n,minHeight:()=>er,minWidth:()=>Qn,mixBlendMode:()=>ha,objectFit:()=>Ki,objectPosition:()=>qi,opacity:()=>yi,orphans:()=>wa,outline:()=>ai,outlineColor:()=>ci,outlineOffset:()=>li,outlineStyle:()=>si,outlineWidth:()=>oi,overflow:()=>Hi,overflowWrap:()=>An,overflowX:()=>Ui,overflowY:()=>Wi,padding:()=>Bn,paddingBottom:()=>Un,paddingLeft:()=>Wn,paddingRight:()=>Hn,paddingTop:()=>Vn,pageBreakAfter:()=>ya,pageBreakBefore:()=>va,pageBreakInside:()=>ba,perspective:()=>Oi,perspectiveOrigin:()=>ki,pointerEvents:()=>la,position:()=>zn,quotes:()=>ia,resize:()=>ua,right:()=>ir,scrollBehavior:()=>da,tableLayout:()=>na,textAlign:()=>_n,textAlignLast:()=>jn,textDecoration:()=>vn,textDecorationColor:()=>Pn,textDecorationLine:()=>Nn,textDecorationStyle:()=>Fn,textDecorationThickness:()=>In,textIndent:()=>wn,textJustify:()=>Mn,textOverflow:()=>Tn,textShadow:()=>En,textTransform:()=>Cn,textUnderlineOffset:()=>Ln,top:()=>rr,transform:()=>Ti,transformOrigin:()=>Ei,transformStyle:()=>Di,transition:()=>bi,transitionDelay:()=>wi,transitionDuration:()=>Si,transitionProperty:()=>xi,transitionTimingFunction:()=>Ci,userSelect:()=>ca,verticalAlign:()=>Rn,visibility:()=>Gi,whiteSpace:()=>Dn,widows:()=>Ta,width:()=>Xn,willChange:()=>ga,wordSpacing:()=>On,wordWrap:()=>kn,zIndex:()=>sr});function uc(){ut();let e=globalThis;e.list=St,e.update=Ht,e.when=Mt,e.on=ne,e.scope=Bt,e.render=Ut,e.hydrate=Wt;for(let[t,n]of Object.entries(lc))try{e[t]=n}catch{}}uc(),e.HTML_TAGS=V,e.SELF_CLOSING_TAGS=st,e.SVG_TAGS=H,e.StyleBuilder=Q,e.accentColor=dn,e.alignContent=vr,e.alignItems=lr,e.alignSelf=_r,e.animation=ji,e.animationDelay=Fi,e.animationDirection=Li,e.animationDuration=Ni,e.animationFillMode=Ri,e.animationIterationCount=Ii,e.animationName=Mi,e.animationPlayState=zi,e.animationTimingFunction=Pi,e.appearance=sa,e.appendChildren=Se,e.applyAttributes=M,e.applyNodeModifier=R,e.backdropFilter=Vi,e.backfaceVisibility=Ai,e.backgroundAttachment=hi,e.backgroundClip=gi,e.backgroundColor=ui,e.backgroundImage=di,e.backgroundOrigin=_i,e.backgroundPosition=pi,e.backgroundRepeat=fi,e.backgroundSize=mi,e.bg=ln,e.bold=yn,e.border=Pr,e.borderBottom=Lr,e.borderBottomColor=Qr,e.borderBottomLeftRadius=ri,e.borderBottomRightRadius=ii,e.borderBottomStyle=Jr,e.borderBottomWidth=Wr,e.borderCollapse=Qi,e.borderColor=Vr,e.borderLeft=Rr,e.borderLeftColor=$r,e.borderLeftStyle=Yr,e.borderLeftWidth=Gr,e.borderRadius=ei,e.borderRight=Ir,e.borderRightColor=Zr,e.borderRightStyle=qr,e.borderRightWidth=Ur,e.borderSpacing=$i,e.borderStyle=Br,e.borderTop=Fr,e.borderTopColor=Xr,e.borderTopLeftRadius=ti,e.borderTopRightRadius=ni,e.borderTopStyle=Kr,e.borderTopWidth=Hr,e.borderWidth=zr,e.bottom=ar,e.boxShadow=vi,e.boxSizing=nr,e.breakAfter=Sa,e.breakBefore=xa,e.breakInside=Ca,e.captionSide=ea,e.center=dr,e.clip=fa,e.clipPath=pa,e.color=un,e.columnCount=Ea,e.columnFill=Da,e.columnGap=Oa,e.columnRule=ka,e.columnRuleColor=Aa,e.columnRuleStyle=ja,e.columnRuleWidth=Ma,e.columnSpan=Na,e.columnWidth=Pa,e.columns=Fa,e.contain=_a,e.content=ra,e.counterIncrement=oa,e.counterReset=aa,e.createBreakpoints=cc,e.createCSSClass=tn,e.createComment=T,e.createConditionalComment=ve,e.createHtmlElementWithModifiers=tt,e.createHtmlTagBuilder=at,e.createStyleQueries=sc,e.createSvgElementWithModifiers=nt,e.createSvgTagBuilder=ot,e.cursor=Ia,e.display=on,e.emptyCells=ta,e.filter=Bi,e.flex=sn,e.flexBasis=gr,e.flexDirection=cr,e.flexGrow=mr,e.flexShrink=hr,e.flexWrap=pr,e.fontFamily=mn,e.fontSize=fn,e.fontStretch=Sn,e.fontStyle=bn,e.fontVariant=xn,e.fontWeight=pn,e.gap=fr,e.grid=cn,e.gridArea=Ar,e.gridAutoColumns=jr,e.gridAutoFlow=Nr,e.gridAutoRows=Mr,e.gridColumn=wr,e.gridColumnEnd=Dr,e.gridColumnStart=Er,e.gridRow=Tr,e.gridRowEnd=kr,e.gridRowStart=Or,e.gridTemplateAreas=Cr,e.gridTemplateColumns=xr,e.gridTemplateRows=Sr,e.height=Zn,e.hydrate=Wt,e.initializeRuntime=uc,e.isBoolean=s,e.isBrowser=d,e.isFunction=c,e.isNode=i,e.isObject=a,e.isPrimitive=r,e.isTagLike=o,e.isZeroArityFunction=l,e.isolation=ma,e.justifyContent=ur,e.justifyItems=br,e.justifySelf=yr,e.left=or,e.letterSpacing=gn,e.lineHeight=hn,e.list=St,e.listStyle=Ji,e.listStyleImage=Zi,e.listStylePosition=Xi,e.listStyleType=Yi,e.margin=Gn,e.marginBottom=Jn,e.marginLeft=Yn,e.marginRight=qn,e.marginTop=Kn,e.maxHeight=tr,e.maxWidth=$n,e.minHeight=er,e.minWidth=Qn,e.mixBlendMode=ha,e.objectFit=Ki,e.objectPosition=qi,e.on=ne,e.opacity=yi,e.orphans=wa,e.outline=ai,e.outlineColor=ci,e.outlineOffset=li,e.outlineStyle=si,e.outlineWidth=oi,e.overflow=Hi,e.overflowWrap=An,e.overflowX=Ui,e.overflowY=Wi,e.padding=Bn,e.paddingBottom=Un,e.paddingLeft=Wn,e.paddingRight=Hn,e.paddingTop=Vn,e.pageBreakAfter=ya,e.pageBreakBefore=va,e.pageBreakInside=ba,e.perspective=Oi,e.perspectiveOrigin=ki,e.pointerEvents=la,e.position=zn,e.quotes=ia,e.registerGlobalTagBuilders=ut,e.render=Ut,e.replaceNodeSafely=D,e.resize=ua,e.right=ir,e.scope=Bt,e.scrollBehavior=da,e.tableLayout=na,e.textAlign=_n,e.textAlignLast=jn,e.textDecoration=vn,e.textDecorationColor=Pn,e.textDecorationLine=Nn,e.textDecorationStyle=Fn,e.textDecorationThickness=In,e.textIndent=wn,e.textJustify=Mn,e.textOverflow=Tn,e.textShadow=En,e.textTransform=Cn,e.textUnderlineOffset=Ln,e.top=rr,e.transform=Ti,e.transformOrigin=Ei,e.transformStyle=Di,e.transition=bi,e.transitionDelay=wi,e.transitionDuration=Si,e.transitionProperty=xi,e.transitionTimingFunction=Ci,e.update=Ht,e.userSelect=ca,e.verticalAlign=Rn,e.visibility=Gi,e.when=Mt,e.whiteSpace=Dn,e.widows=Ta,e.width=Xn,e.willChange=ga,e.wordSpacing=On,e.wordWrap=kn,e.zIndex=sr});
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.Nuclo={}))})(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return e===null||typeof e!=`object`&&typeof e!=`function`}function n(e){return e instanceof Node?!0:typeof e!=`object`||!e?!1:typeof e.nodeType==`number`}function r(e){return typeof e==`object`&&!!e}function i(e){return r(e)&&`tagName`in e}function a(e){return typeof e==`boolean`}function o(e){return typeof e==`function`}function s(e){return o(e)&&e.length===0}function c(e,t){typeof console<`u`&&console.error(`nuclo: ${e}`,t)}let l=typeof window<`u`&&typeof document<`u`,u=new WeakMap;function d(e,t,n,r,i,a){let o=u.get(e);o||(o=new Map,u.set(e,o));let s=o.get(t);s||(s=new Set,o.set(t,s)),s.add({original:n,wrapped:r,options:i,controller:a})}function f(e,t,n){n.controller?n.controller.abort():e.removeEventListener(t,n.wrapped,n.options)}function p(e,t){let n=u.get(e);if(n)if(t){let r=n.get(t);if(r){for(let n of r)f(e,t,n);n.delete(t)}}else{for(let[t,r]of n)for(let n of r)f(e,t,n);u.delete(e)}}function ee(e,t,n){return function(r){if(!l||!r||typeof r.addEventListener!=`function`)return;let i=r,a=new AbortController,o=function(n){try{t.call(i,n)}catch(t){c(`Error in '${e}' listener`,t)}},s=typeof n==`boolean`?{capture:n,signal:a.signal}:{...n||{},signal:a.signal};i.addEventListener(e,o,s),d(i,e,t,o,n,a)}}let m=new Map,h=new WeakMap,g=new Map,_=new WeakMap;function te(e,t){let n=new WeakRef(e);m.set(n,t),h.set(e,{ref:n,info:t})}function ne(e,t){let n=new WeakRef(e);g.set(n,t),_.set(e,{ref:n,info:t})}function re(e){m.delete(e)}function ie(e){g.delete(e)}function ae(e){let t=h.get(e);t&&(m.delete(t.ref),h.delete(e))}function oe(e){let t=_.get(e);t&&(g.delete(t.ref),_.delete(e))}let v=new WeakMap,y=new Set,se=new WeakMap;function ce(e,t){v.set(e,t);let n=new WeakRef(e);y.add(n),se.set(e,n)}function le(e){v.delete(e);let t=se.get(e);t&&(y.delete(t),se.delete(e))}function ue(){let e=[],t=[];for(let n of y){let r=n.deref();r===void 0?t.push(n):e.push(r)}for(let e of t)y.delete(e);return e}function de(e){return v.get(e)??null}let fe=`http://www.w3.org/2000/svg`;function b(e){return globalThis.document?document.createElement(e):null}function x(e,t){return globalThis.document?document.createElementNS(e,t):null}function S(e){return globalThis.document?document.createTextNode(e):null}function pe(){return globalThis.document?document.createDocumentFragment():null}function me(e,t){try{return e.appendChild(t),!0}catch(e){return c(`Failed to append child node`,e),!1}}function he(e){if(e.nodeType===Node.ELEMENT_NODE){let t=e;p(t),oe(t),le(t)}else e.nodeType===Node.TEXT_NODE?ae(e):e.nodeType===Node.COMMENT_NODE&&le(e);if(e.childNodes&&e.childNodes.length>0)for(let t=0;t<e.childNodes.length;t++)he(e.childNodes[t])}function ge(e){if(!e?.parentNode)return!1;try{return he(e),e.parentNode.removeChild(e),!0}catch(e){return c(`Failed to remove child node`,e),!1}}function _e(e,t,n){try{return e.insertBefore(t,n),!0}catch(e){return c(`Failed to insert node before reference`,e),!1}}function C(e){return globalThis.document?globalThis.document.createComment(e):null}function ve(e,t=`hidden`){return globalThis.document?globalThis.document.createComment(`conditional-${e}-${t}`):null}function ye(e,t){let n=C(`${e}-end`);if(!n)throw Error(`Failed to create comment: document not available`);let r=C(`${e}-start-${t}`);if(!r)throw Error(`Failed to create comment: document not available`);return{start:r,end:n}}function be(e,t){let n=e.nextSibling;for(;n&&n!==t;){let e=n.nextSibling;ge(n),n=e}}function xe(e,t){let n=t.parentNode;if(n)for(let r=0;r<e.length;r++)_e(n,e[r],t)}function Se(e,...t){if(!e)return e;for(let n=0;n<t.length;n++){let r=t[n];if(r!=null){let t;if(typeof r==`string`){let e=S(r);if(e)t=e;else continue}else t=r;me(e,t)}}return e}function w(e){return e?e.isConnected===!0:!1}function T(e,t){if(!e?.parentNode)return!1;try{return e.parentNode.replaceChild(t,e),!0}catch(e){return c(`Error replacing conditional node`,e),!1}}let Ce={},we=!1;function Te(e){let t=e.target;if(!t||typeof Node>`u`||!(t instanceof Node))return;let n=t;for(;n;){if(n instanceof Element){let e=_.get(n);e&&(w(n)?Ae(e.info):(ie(e.ref),_.delete(n)))}n=n.parentNode}}function Ee(){we||typeof document>`u`||typeof document.addEventListener!=`function`||(document.addEventListener(`update`,Te,!0),we=!0)}function De(e){let t=_.get(e);if(t)return t.info;let n={attributeResolvers:new Map};return ne(e,n),n}function Oe(e){return typeof e!=`object`||!e}function ke(e,t){let n;try{n=t.resolver()}catch(t){c(`Failed to resolve reactive attribute: ${e}`,t);return}let r=Oe(n);if(!(r&&Object.is(n,t.lastValue)))try{t.applyValue(n),t.lastValue=r?n:Ce}catch(t){c(`Failed to apply reactive attribute: ${e}`,t)}}function Ae(e){for(let[t,n]of e.attributeResolvers)ke(t,n)}function E(e,t,n,r){if(!(e instanceof Element)||!t||typeof n!=`function`){c(`Invalid parameters for registerAttributeResolver`);return}let i={resolver:n,applyValue:r,lastValue:Ce};if(!l){ke(t,i);return}Ee(),De(e).attributeResolvers.set(t,i),ke(t,i)}function je(e){let t=[];for(let[n,r]of g){let i=n.deref();if(i===void 0){t.push(n);continue}if(!w(i)){_.delete(i),t.push(n);continue}e&&!e.contains(i)||Ae(r)}for(let e of t)ie(e)}function Me(e){return e}function Ne(e,t,n){let r=Me(e),i=r.appendChild.bind(r),a=r.insertBefore.bind(r);r.appendChild=function(e){return a(e,t)};try{return n()}finally{r.appendChild=i}}function Pe(e,t,n){try{if(n==null||n===``)return e.style[t]=``,!0;let r=String(n);return e.style[t]=r,!0}catch{return!1}}function Fe(e,t){if(!(!e?.style||!t))for(let[n,r]of Object.entries(t))Pe(e,n,r)||c(`Failed to set style property '${n}'`)}function Ie(e,t){e&&(o(t)?E(e,`style`,t,function(t){Fe(e,t)}):Fe(e,t))}let D=new WeakMap,Le=new WeakSet;function O(e,t){let n=t.length,r=0;for(let i=0;i<=n;i++)(i===n||t.charCodeAt(i)===32)&&(i>r&&e.add(t.substring(r,i)),r=i+1)}function k(e){let t=``;for(let n of e)t&&(t+=` `),t+=n;return t}function Re(e){if(!D.has(e)){let t=new Set;e.className&&O(t,e.className),D.set(e,t)}Le.add(e)}function ze(e){return Le.has(e)}function Be(e,t){if(!t)return;let n=D.get(e);n||(n=new Set,D.set(e,n)),O(n,t)}function Ve(e,t){let n=D.get(e);if(!n||n.size===0){e.className=t||``;return}if(!t){e.className=k(n);return}let r=k(n),i=t.length,a=0;for(let e=0;e<=i;e++)if(e===i||t.charCodeAt(e)===32){if(e>a){let i=t.substring(a,e);n.has(i)||(r+=` `+i)}a=e+1}e.className=r}function He(e,t){if(!t)return;let n=e.className;if(n&&n!==t){let r=new Set;O(r,n),O(r,t),e.className=k(r)}else e.className=t}function Ue(e,t){if(typeof e!=`function`){c(`Invalid resolver provided to createReactiveTextNode`);let e=S(``);if(!e)throw Error(`Failed to create text node: document not available`);return e}let n;if(arguments.length>1)n=t;else try{n=e()}catch(e){c(`Failed to evaluate reactive text resolver`,e),n=``}let r=n===void 0?``:String(n),i=S(r);if(!i)throw Error(`Failed to create text node: document not available`);return l&&te(i,{resolver:e,lastValue:r}),i}function We(e){let t=[];for(let[n,r]of m){let i=n.deref();if(i===void 0){t.push(n);continue}if(!w(i)){h.delete(i),t.push(n);continue}if(e&&!e.contains(i))continue;let a;try{a=r.resolver()}catch(e){c(`Failed to update reactive text node`,e),a=void 0}let o=a===void 0?``:String(a);o!==r.lastValue&&(i.textContent=o,r.lastValue=o)}for(let e of t)re(e)}function Ge(e,t,n,r=!1){if(n==null)return;if(t===`style`){Ie(e,n);return}let i=(n,r=!1)=>{if(n!=null){if(t===`className`&&e instanceof HTMLElement&&r){He(e,String(n));return}if(e instanceof Element&&e.namespaceURI===`http://www.w3.org/2000/svg`)e.setAttribute(String(t),String(n));else if(t in e)try{e[t]=n}catch{e instanceof Element&&e.setAttribute(String(t),String(n))}else e instanceof Element&&e.setAttribute(String(t),String(n))}};if(o(n)&&n.length===0){let r=n;t===`className`&&e instanceof HTMLElement?(Re(e),E(e,String(t),r,function(t){Ve(e,String(t||``))})):E(e,String(t),r,function(e){i(e,!1)})}else{if(t===`className`&&e instanceof HTMLElement&&ze(e)){let t=String(n||``);t&&(Be(e,t),He(e,t));return}i(n,r)}}function A(e,t,n=!0){if(t)for(let r of Object.keys(t)){let i=t[r];Ge(e,r,i,n&&r===`className`)}}let j=new WeakMap,M=!1,Ke=new WeakMap;function N(){return M}function qe(){M=!0}function Je(){M=!1}function P(e){return Ke.get(e)??0}function Ye(e,t){Ke.set(e,t)}function F(e){let t=P(e),n=e.childNodes[t]??null;return n&&Ye(e,t+1),n}function Xe(e,t){if(!M)return null;let n=e.childNodes[P(e)];return n&&n.nodeType===1&&n.tagName.toLowerCase()===t?F(e):null}function Ze(e,t){let n=P(e),r=t-n;for(;r-- >0;){let t=e.childNodes[n];t&&e.removeChild(t)}}function Qe(e){return r(e)&&!n(e)&&`className`in e&&typeof e.className==`string`&&Object.keys(e).length===1}function $e(e){let t=P(e),n=e.childNodes[t];return!!n&&n.nodeType===8&&n.textContent?.trimStart().startsWith(`text-`)===!0}function I(e,i,a){if(i==null)return null;if(o(i)){if(s(i))try{let n=j.get(i);if(n||(n={value:i(),error:!1},j.set(i,n)),n.error)return L(a,()=>``);let r=n.value;if(Qe(r))return A(e,{className:()=>{let e=i();return Qe(e)?e.className:``}}),null;if(t(r)&&r!=null){if(N()&&$e(e)){let t=e;F(t);let n=F(t);return n&&n.nodeType===3&&te(n,{resolver:i,lastValue:n.textContent||``}),null}return L(a,i,r)}return null}catch(e){return j.set(i,{value:void 0,error:!0}),c(`Error evaluating reactive text function:`,e),L(a,()=>``)}let o=i(e,a);return o==null?null:t(o)?et(a,o):n(o)?o:(r(o)&&A(e,o),null)}let l=i;if(t(l)){if(N()&&$e(e)){let t=e;return F(t),F(t),null}return et(a,l)}return n(l)?l:(A(e,l),null)}function L(e,t,n){let r=pe();if(!r)throw Error(`Failed to create document fragment: document not available`);let i=C(` text-${e} `);i&&r.appendChild(i);let a=Ue(t,n);return r.appendChild(a),r}function et(e,t){let n=pe();if(!n)throw Error(`Failed to create document fragment: document not available`);let r=C(` text-${e} `);r&&n.appendChild(r);let i=S(String(t));return i&&n.appendChild(i),n}function R(e,t,n=0){if(!t||t.length===0)return{element:e,nextIndex:n,appended:0};let r=n,i=0,a=e;for(let n=0;n<t.length;n+=1){let o=t[n];if(o==null)continue;let s=I(e,o,r);s&&(s.parentNode!==a&&a.appendChild(s),r+=1,i+=1)}return{element:e,nextIndex:r,appended:i}}function tt(e,t){let n=b(e);return R(n,t,0),n}function nt(e,t){let n=x(fe,e);if(!n)throw Error(`Failed to create SVG element: ${e}`);return R(n,t,0),n}function rt(e,...t){return function(n,r=0){let i=n,a=i?Xe(i,e):null,o=a??b(e),s=o,c=a?s.childNodes.length:0;return R(o,t,r),a&&Ze(s,c),o}}function it(e,...t){return function(n,r=0){let i=n,a=i?Xe(i,e):null,o;if(a)o=a;else{let t=x(fe,e);if(!t)throw Error(`Failed to create SVG element: ${e}`);o=t}let s=o,c=a?s.childNodes.length:0;return R(o,t,r),a&&Ze(s,c),o}}function at(e){return(...t)=>rt(e,...t)}function ot(e){return(...t)=>it(e,...t)}let z=`a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.label.legend.li.link.main.map.mark.menu.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.script.search.section.select.slot.small.source.span.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr`.split(`.`),B=`a.animate.animateMotion.animateTransform.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.filter.foreignObject.g.image.line.linearGradient.marker.mask.metadata.mpath.path.pattern.polygon.polyline.radialGradient.rect.script.set.stop.style.svg.switch.symbol.text.textPath.title.tspan.use.view`.split(`.`),st=[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`source`,`track`,`wbr`];function ct(e,t){t in e&&typeof e[t]!=`function`||(e[t]=at(t))}function lt(e,t){let n=`${t}Svg`;n in e||(e[n]=ot(t))}function ut(e=globalThis){let t=`__nuclo_tags_registered`;if(!e[t]){for(let t=0;t<B.length;t++)lt(e,B[t]);for(let t=0;t<z.length;t++)ct(e,z[t]);e[t]=!0}}function dt(e,t,n){if(o(e)){let r=e(t,n);return r&&i(r)?r:null}return e&&i(e)?e:null}function ft(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}let V=new Map;function pt(e){return Array.isArray(e)?e:Array.from(e)}function mt(e,t,n){return dt(e.renderItem(t,n),e.host,n)}function ht(e){ge(e.element);let t=e;t.element=null,t.item=null}function gt(e){let{host:t,startMarker:n,endMarker:r}=e,i=n.parentNode??t,a=pt(e.itemsProvider());if(ft(e.lastSyncedItems,a))return;let o=new Map,s=new Map;for(let t=0;t<e.records.length;t++){let n=e.records[t],r=s.get(n.item);r?r.push(n):s.set(n.item,[n])}for(let t=0;t<a.length;t++){let n=a[t];if(t<e.lastSyncedItems.length&&e.lastSyncedItems[t]===n){let r=e.records[t];if(r&&r.item===n){o.set(t,r);let e=s.get(n);e.splice(e.indexOf(r),1),e.length===0&&s.delete(n)}}}let c=Array(a.length),l=new Set(e.records),u=r;for(let t=a.length-1;t>=0;t--){let n=a[t],r=o.get(t);if(!r){let e=s.get(n);e&&e.length>0&&(r=e.shift(),e.length===0&&s.delete(n))}if(r)l.delete(r);else{let i=mt(e,n,t);if(!i){c[t]=null;continue}r={item:n,element:i}}c[t]=r;let d=r.element;d.nextSibling!==u&&i.insertBefore(d,u),u=d}for(let e of l)ht(e);e.records=c.filter(e=>e!==null),e.lastSyncedItems=a.slice(),c.length===0&&(e.records=[],e.lastSyncedItems=[])}function _t(e,t,n,r){return N()?yt(e,t,n,r):vt(e,t,n,r)}function vt(e,t,n,r){let{start:i,end:a}=ye(`list`,r),o={itemsProvider:e,renderItem:t,startMarker:i,endMarker:a,records:[],host:n,lastSyncedItems:[]},s=n;if(s.appendChild(i),s.appendChild(a),gt(o),l){let e={runtime:o};V.set(new WeakRef(i),e)}return o}function yt(e,t,n,r){let i=n,a=P(i),o=i.childNodes[a];if(!o||o.nodeType!==8||!o.textContent?.startsWith(`list-start-`))return vt(e,t,n,r);let s=F(i),c=P(i);for(;c<i.childNodes.length;){let e=i.childNodes[c];if(e.nodeType===8&&e.textContent===`list-end`)break;c++}let u=i.childNodes[c],d=pt(e()),f=[];for(let e=0;e<d.length;e++){let r=dt(t(d[e],e),n,e);r&&f.push({item:d[e],element:r})}Ye(i,c+1);let p={itemsProvider:e,renderItem:t,startMarker:s,endMarker:u,records:f,host:n,lastSyncedItems:d.slice()};if(l){let e={runtime:p};V.set(new WeakRef(s),e)}return p}function bt(e){for(let t=0;t<e.records.length;t++){let n=e.records[t];n.element=null,n.item=null}e.records=[]}function xt(e){let t=[];for(let[n,r]of V){let i=n.deref();if(!i||!w(i)||!w(r.runtime.endMarker)){bt(r.runtime),t.push(n);continue}e&&!e.contains(i)||gt(r.runtime)}for(let e of t)V.delete(e)}function St(e,t){return function(n,r){return _t(e,t,n,r).startMarker}}function Ct(e,t){try{return e()}catch(e){if(t)return t(e),!1;throw e}}function wt(e,t){return typeof e==`function`?Ct(e,t):!!e}function Tt(e,t,n,r){return o(e)?s(e)?(j.delete(e),I(t,e,n)):Ne(t,r,()=>{let r=I(t,e,n);return r&&!r.parentNode?r:null}):I(t,e,n)}function Et(e,t,n,r){let i=[];for(let a of e){let e=Tt(a,t,n,r);e&&i.push(e)}return i}let H=new Map;function Dt(e,t){for(let t=0;t<e.length;t++)if(wt(e[t].condition))return t;return t.length>0?-1:null}function Ot(e){let{groups:t,elseContent:n,host:r,index:i,endMarker:a}=e,o=Dt(t,n);o!==e.activeIndex&&(be(e.startMarker,e.endMarker),e.activeIndex=o,o!==null&&xe(Et(o>=0?t[o].content:n,r,i,a),a))}function kt(e){let t={runtime:e};H.set(new WeakRef(e.startMarker),t)}function At(e){let t=[];for(let[n,r]of H){let i=n.deref();if(i===void 0){t.push(n);continue}if(!w(i)||!w(r.runtime.endMarker)){t.push(n);continue}if(!(e&&!e.contains(i)))try{r.runtime.update()}catch{t.push(n)}}for(let e of t)H.delete(e)}var jt=class e{groups=[];elseContent=[];constructor(e,...t){this.groups.push({condition:e,content:t})}cloneWith(t,n){let r=Object.create(e.prototype);return r.groups=[...this.groups],t&&r.groups.push(t),r.elseContent=n??[...this.elseContent],r}when(e,...t){return this.groups.push({condition:e,content:t}),this}else(...e){return this.elseContent=e,this}render(e,t){return globalThis.document?N()?this.hydrateRender(e,t):this.freshRender(e,t):null}freshRender(e,t){let{start:n,end:r}=ye(`when`,t),i=this.createRuntimeFromMarkers(e,t,n,r),a=Me(e);return a.appendChild(n),a.appendChild(r),Ot(i),n}hydrateRender(e,t){let n=e,r=P(n),i=n.childNodes[r];if(!i||i.nodeType!==8||!i.textContent?.startsWith(`when-start-`))return this.freshRender(e,t);let a=F(n),o=P(n);for(;o<n.childNodes.length;){let e=n.childNodes[o];if(e.nodeType===8&&e.textContent===`when-end`)break;o++}let s=n.childNodes[o],c=Dt([...this.groups],[...this.elseContent]);if(c!==null){let n=c>=0?this.groups[c].content:this.elseContent;for(let r of n)I(e,r,t)}return Ye(n,o+1),this.createRuntimeFromMarkers(e,t,a,s,c),a}createRuntimeFromMarkers(e,t,n,r,i=null){let a={startMarker:n,endMarker:r,host:e,index:t,groups:[...this.groups],elseContent:[...this.elseContent],activeIndex:i,update:function(){Ot(a)}};return l&&kt(a),a}};function U(e){return Object.assign(function(t,n){return e.render(t,n)},{when:function(t,...n){return U(e.cloneWith({condition:t,content:n}))},else:function(...t){return U(e.cloneWith(void 0,t))}})}function Mt(e,...t){return U(new jt(e,...t))}function Nt(e){try{return e.isSvg?nt(e.tagName,e.modifiers):tt(e.tagName,e.modifiers)}catch(t){if(c(`Error applying modifiers in conditional element "${e.tagName}"`,t),e.isSvg){let n=x(fe,e.tagName);if(!n)throw Error(`Failed to create SVG element: ${e.tagName}`,{cause:t});return n}let n=b(e.tagName);if(!n)throw Error(`Failed to create element: ${e.tagName}`,{cause:t});return n}}function Pt(e){let t=de(e);if(!t)return;let n=Ct(t.condition,e=>{c(`Error evaluating conditional condition`,e)}),r=e.nodeType===Node.ELEMENT_NODE;if(n&&!r){let n=Nt(t);ce(n,t),T(e,n)}else if(!n&&r){let n=ve(t.tagName);n&&(ce(n,t),T(e,n))}}function Ft(e){if(l)try{let t=ue();for(let n of t){if(!n.isConnected){le(n);continue}e&&!e.contains(n)||Pt(n)}}catch(e){c(`Error during conditional elements update`,e)}}function It(){if(typeof document>`u`)return;let e=document.body?[document.body,document]:[document];for(let t of e)try{t.dispatchEvent(new Event(`update`,{bubbles:!0}))}catch(e){c(`Error dispatching global update event`,e)}}let W=new Map;function Lt(e){let t=[],n=new Set;for(let r of e){if(typeof r!=`string`)continue;let e=r.trim();e&&(n.has(e)||(n.add(e),t.push(e)))}return t}function Rt(e,t){let n=W.get(e);n||(n=new Set,W.set(e,n)),n.add(new WeakRef(t))}function zt(e){let t=Lt(e);if(t.length===0)return[];let n=new Set;for(let e of t){let t=W.get(e);if(!t)continue;let r=[];for(let e of t){let t=e.deref();if(t===void 0){r.push(e);continue}if(!w(t)){r.push(e);continue}n.add(t)}for(let e of r)t.delete(e);t.size===0&&W.delete(e)}return Array.from(n)}function Bt(...e){let t=Lt(e);return function(e){if(l&&e instanceof Element)for(let n of t)Rt(n,e)}}let Vt=[xt,At,Ft,je,We,It];function Ht(...e){let t;if(e.length>0){let n=zt(e);if(n.length===1){let e=n[0];t={roots:n,contains:t=>e.contains(t)}}else t={roots:n,contains:e=>{for(let t of n)if(t.contains(e))return!0;return!1}}}for(let e of Vt)e(t)}function Ut(e,t,n=0){let r=e(t||document.body,n);return(t||document.body).appendChild(r),r}function Wt(e,t){let n=t||document.body;qe();try{return e(n,0)}finally{Je()}}let Gt=null;function Kt(e){Gt=e}let G=new Map,K=new Map,q=new Set,J=[],Y=new Map,X=null,qt=null,Z=0,Q=new Map;function Jt(e){for(let t of e)Y.has(t)||Y.set(t,[])}function Yt(e,t){try{let n=e.cssRules.length;e.insertRule(t+`{}`,n);let r=e.cssRules[n];return Q.set(t,r),r}catch{return null}}function Xt(e,t){try{e.insertRule(t,Z),Z++}catch{}}function Zt(){if(typeof document>`u`||typeof document.getElementById!=`function`)return null;if(X&&qt===document&&X.ownerNode&&X.ownerNode.isConnected)return X;let e=document.getElementById(`nuclo-styles`);if(e||(e=document.createElement(`style`),e.id=`nuclo-styles`,document.head.appendChild(e)),X=e.sheet,qt=document,Q.clear(),Z=0,!X)return null;for(let e of J)Xt(X,e);for(let[e,t]of Y){let n=Yt(X,e);if(n)for(let e of t)try{n.insertRule(e,n.cssRules.length)}catch{}}return X}function Qt(e,t){if(t===void 0)J.push(e);else{let n=Y.get(t);n||(n=[],Y.set(t,n)),n.push(e)}Gt?.(t===void 0?e:t+`{`+e+`}`);let n=Zt();if(n)if(t===void 0)Xt(n,e);else{let r=Q.get(t)??Yt(n,t);if(r)try{r.insertRule(e,r.cssRules.length)}catch{}}}function $t(e){let t=2166136261,n=2128831035;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);t=Math.imul(t^i,16777619),n=Math.imul(n^i,2246822507)}return(t>>>0).toString(36)+((n>>>9)%1296).toString(36)}function $(e,t,n,r){let i=(e??``)+`|`+t+`|`+n+`:`+r,a=G.get(i);return a===void 0?(a=`n`+$t(i),G.set(i,a),K.set(a,(e??``)+`|`+t+`|`+n),Qt(`.`+a+t+`{`+n+`:`+r+`}`,e),a):(Zt(),a)}function en(e){return K.get(e)}function tn(e,t){if(q.has(e)){Zt();return}q.add(e),Qt(t,void 0)}function nn(){let e=J.join(``);for(let[t,n]of Y)n.length>0&&(e+=t+`{`+n.join(``)+`}`);return e}function rn(){G.clear(),K.clear(),q.clear(),J.length=0,Y.clear(),Q.clear(),Z=0,X=null,qt=null,typeof document<`u`&&document.getElementById(`nuclo-styles`)?.remove()}let an={hover:`:hover`,focus:`:focus`,focusVisible:`:focus-visible`,focusWithin:`:focus-within`,active:`:active`,visited:`:visited`,disabled:`:disabled`,enabled:`:enabled`,checked:`:checked`,required:`:required`,invalid:`:invalid`,valid:`:valid`,readOnly:`:read-only`,first:`:first-child`,last:`:last-child`,only:`:only-child`,odd:`:nth-child(odd)`,even:`:nth-child(even)`,empty:`:empty`,placeholderShown:`:placeholder-shown`,placeholder:`::placeholder`,before:`::before`,after:`::after`,selection:`::selection`,marker:`::marker`,firstLine:`::first-line`,firstLetter:`::first-letter`},on={bg:[`background`],p:[`padding`],px:[`padding-left`,`padding-right`],py:[`padding-top`,`padding-bottom`],pt:[`padding-top`],pr:[`padding-right`],pb:[`padding-bottom`],pl:[`padding-left`],m:[`margin`],mx:[`margin-left`,`margin-right`],my:[`margin-top`,`margin-bottom`],mt:[`margin-top`],mr:[`margin-right`],mb:[`margin-bottom`],ml:[`margin-left`],w:[`width`],h:[`height`],minW:[`min-width`],maxW:[`max-width`],minH:[`min-height`],maxH:[`max-height`],size:[`width`,`height`],text:[`font-size`],font:[`font-family`],weight:[`font-weight`],leading:[`line-height`],tracking:[`letter-spacing`],align:[`text-align`],items:[`align-items`],justify:[`justify-content`],z:[`z-index`],rounded:[`border-radius`],shadow:[`box-shadow`],select:[`user-select`]},sn={row:{display:`flex`,"flex-direction":`row`},col:{display:`flex`,"flex-direction":`column`},center:{"align-items":`center`,"justify-content":`center`},truncate:{overflow:`hidden`,"text-overflow":`ellipsis`,"white-space":`nowrap`}},cn={background:`colors`,"background-color":`colors`,color:`colors`,"border-color":`colors`,"border-top-color":`colors`,"border-right-color":`colors`,"border-bottom-color":`colors`,"border-left-color":`colors`,"outline-color":`colors`,"caret-color":`colors`,"text-decoration-color":`colors`,"font-family":`fonts`,"box-shadow":`shadows`,"border-radius":`radii`},ln=new Set([`z-index`,`opacity`,`font-weight`,`line-height`,`flex`,`flex-grow`,`flex-shrink`,`order`,`aspect-ratio`,`zoom`,`scale`,`column-count`,`orphans`,`widows`,`tab-size`,`animation-iteration-count`,`grid-column`,`grid-row`]),un=new Map;function dn(e){let t=un.get(e);return t===void 0&&(t=e.replace(/[A-Z]/g,e=>`-`+e.toLowerCase()),un.set(e,t)),t}function fn(e){return e.charCodeAt(0)===64?e:`@media `+e}function pn(e,t){return e!==void 0&&e.startsWith(`@media`)&&t.startsWith(`@media`)?e+` and`+t.slice(6):t}function mn(e){let t={className:e};return Object.defineProperty(t,"toString",{value:()=>e,enumerable:!1}),t}function hn(...e){let t=new Map;for(let n of e){if(!n)continue;let e=(typeof n==`string`?n:n.className).split(` `);for(let n of e)n&&t.set(en(n)??n,n)}let n=``;for(let e of t.values())n+=(n?` `:``)+e;return mn(n)}function gn(e={}){let t=e.screens??{};Jt(Object.values(t).map(fn));let n=new WeakMap;function r(t,n){if(typeof n==`number`)return n===0||ln.has(t)?String(n):n+`px`;let r=cn[t];if(r!==void 0){let t=e[r]?.[n];if(t!==void 0)return t}return n}function i(e,n,a,o){for(let s in e){let c=e[s];if(c==null||c===!1)continue;if(typeof c==`object`){if(s===`raw`){let e=c;for(let t in e)o.push($(n,a,t,r(t,e[t])));continue}let e=an[s];if(e!==void 0){i(c,n,a+e,o);continue}let l=t[s];if(l!==void 0){i(c,pn(n,fn(l)),a,o);continue}let u=s.charCodeAt(0);if(u===38){i(c,n,a+s.slice(1),o);continue}if(u===64){i(c,pn(n,s),a,o);continue}continue}if(c===!0){let e=sn[s];if(e)for(let t in e)o.push($(n,a,t,e[t]));continue}let l=on[s];if(l!==void 0)for(let e of l)o.push($(n,a,e,r(e,c)));else{let e=dn(s);o.push($(n,a,e,r(e,c)))}}}function a(e){let t=n.get(e);if(t)return t;let r=[];i(e,void 0,``,r);let a=mn(r.join(` `));return n.set(e,a),a}function o(e){let t=``,n=(e,n)=>{t+=(t?`;`:``)+e+`:`+n};for(let t in e){let i=e[t];if(i==null||i===!1)continue;if(t===`raw`&&typeof i==`object`){let e=i;for(let t in e)n(t,r(t,e[t]));continue}if(typeof i==`object`)continue;if(i===!0){let e=sn[t];if(e)for(let t in e)n(t,e[t]);continue}let a=on[t];if(a!==void 0)for(let e of a)n(e,r(e,i));else{let e=dn(t);n(e,r(e,i))}}return t}function s(e){let t=``;for(let n in e)t+=n+`{`+o(e[n])+`}`;let n=`nk`+$t(t);return tn(n,`@keyframes `+n+`{`+t+`}`),n}function c(e,t){let n=e+`{`+o(t)+`}`;tn(`g|`+n,n)}return{css:a,cx:hn,keyframes:s,globalStyle:c,theme:e}}let _n=gn({}),vn=_n.css,yn=_n.keyframes,bn=_n.globalStyle;function xn(){ut();let e=globalThis;e.list=St,e.update=Ht,e.when=Mt,e.on=ee,e.scope=Bt,e.render=Ut,e.hydrate=Wt,e.createCss=gn,e.css=vn,e.cx=hn,e.keyframes=yn,e.globalStyle=bn}xn(),e.HTML_TAGS=z,e.SELF_CLOSING_TAGS=st,e.SVG_TAGS=B,e.appendChildren=Se,e.applyAttributes=A,e.applyNodeModifier=I,e.createComment=C,e.createConditionalComment=ve,e.createCss=gn,e.createHtmlElementWithModifiers=tt,e.createHtmlTagBuilder=at,e.createSvgElementWithModifiers=nt,e.createSvgTagBuilder=ot,e.css=vn,e.cx=hn,e.getCssText=nn,e.globalStyle=bn,e.hydrate=Wt,e.initializeRuntime=xn,e.isBoolean=a,e.isBrowser=l,e.isFunction=o,e.isNode=n,e.isObject=r,e.isPrimitive=t,e.isTagLike=i,e.isZeroArityFunction=s,e.keyframes=yn,e.list=St,e.on=ee,e.registerGlobalTagBuilders=ut,e.render=Ut,e.replaceNodeSafely=T,e.resetStyles=rn,e.scope=Bt,e.setSSRCollector=Kt,e.update=Ht,e.when=Mt});
|
|
2
2
|
//# sourceMappingURL=nuclo.umd.js.map
|