@teiler/svelte 0.0.23 → 0.0.25

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.
@@ -1,2 +1,2 @@
1
- import{SvelteComponent as t,init as e,safe_not_equal as n,create_slot as c,update_slot_base as s,get_all_dirty_from_scope as i,get_slot_changes as r,transition_in as a,transition_out as l,empty as o,insert as u,detach as f,compute_rest_props as h,component_subscribe as d,assign as p,exclude_internal_props as g,element as m,set_dynamic_element_data as b,listen as y,get_spread_update as $,run_all as v,bubble as k}from"svelte/internal";import"svelte/internal/disclose-version";import{getContext as w,setContext as x}from"svelte";import{writable as j}from"svelte/store";var A=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","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","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);function _(t){const e={...t};let n=[];const c="undefined"==typeof document?function(){const t={};return{insertRule:function(e,n){return t[e]=n,Object.keys(t).length},deleteRule:function(e){delete t[e]},getRule:function(e){return t[e]||null},getAllRules:function(){return Object.values(t).join(" ")},getAllKeys:function(){return Object.keys(t)}}}():function(t){const e=function(t){const e=document.head,n=t||e,c=document.createElement("style");return c.setAttribute("data-teiler",""),n.appendChild(c),c}(t),n=new Map;return{insertRule:function(t,c){const s=document.createTextNode(c);return!1===n.has(t)&&(n.set(t,s),e.appendChild(s)),n.size},deleteRule:function(t){e.removeChild(n.get(t)),n.delete(t)},getRule:function(t){return n.get(t)?.textContent||null},getAllRules:function(){return Array.from(n.values()).reduce(((t,e)=>t+" "+e.textContent),"")},getAllKeys:function(){return Array.from(n.keys())}}}(e.container);return{insert:(t,e)=>{!1===n.includes(t)&&c.insertRule(t,e)},dump:()=>c.getAllRules(),extract:()=>({css:c.getAllRules(),ids:c.getAllKeys()}),hydrate:t=>{n=t||[]}}}function C(t){let e,n=t.length,c=n,s=0;for(;n>=4;)e=255&t.charCodeAt(s)|(255&t.charCodeAt(++s))<<8|(255&t.charCodeAt(++s))<<16|(255&t.charCodeAt(++s))<<24,e=1540483477*(65535&e)+((1540483477*(e>>>16)&65535)<<16),e^=e>>>24,e=1540483477*(65535&e)+((1540483477*(e>>>16)&65535)<<16),c=1540483477*(65535&c)+((1540483477*(c>>>16)&65535)<<16)^e,n-=4,++s;switch(n){case 3:c^=(255&t.charCodeAt(s+2))<<16;case 2:c^=(255&t.charCodeAt(s+1))<<8;case 1:c^=255&t.charCodeAt(s),c=1540483477*(65535&c)+((1540483477*(c>>>16)&65535)<<16)}return c^=c>>>13,c=1540483477*(65535&c)+((1540483477*(c>>>16)&65535)<<16),c^=c>>>15,(c>>>0).toString(36)}const D=t=>(e,...n)=>{if("__pattern__"in e)return(t,...n)=>{const c=[Array.from(t),n],s=[...e.styles,c],i=s.reduce(((t,[e])=>t+e.join("")),"");return{styles:s,id:"t"+C(i),tag:e.tag,__pattern__:!0}};{const c=e,s=[[Array.from(c),n]],i=s.reduce(((t,[e])=>t+e.join("")),"");return{styles:s,id:"t"+C(i),tag:t,__pattern__:!0}}},R=D("div");A.forEach((t=>{R[t]=D(t)})),R.global=D(null);var E="-ms-",O="-moz-",z="-webkit-",S="comm",N="rule",T="decl",K="@import",M="@keyframes",q="@layer",G=Math.abs,H=String.fromCharCode,P=Object.assign;function I(t){return t.trim()}function L(t,e){return(t=e.exec(t))?t[0]:t}function Y(t,e,n){return t.replace(e,n)}function B(t,e,n){return t.indexOf(e,n)}function F(t,e){return 0|t.charCodeAt(e)}function J(t,e,n){return t.slice(e,n)}function Q(t){return t.length}function U(t){return t.length}function V(t,e){return e.push(t),t}function W(t,e){return t.filter((function(t){return!L(t,e)}))}var X=1,Z=1,tt=0,et=0,nt=0,ct="";function st(t,e,n,c,s,i,r,a){return{value:t,root:e,parent:n,type:c,props:s,children:i,line:X,column:Z,length:r,return:"",siblings:a}}function it(t,e){return P(st("",null,null,"",null,null,0,t.siblings),t,{length:-t.length},e)}function rt(t){for(;t.root;)t=it(t.root,{children:[t]});V(t,t.siblings)}function at(){return nt=et<tt?F(ct,et++):0,Z++,10===nt&&(Z=1,X++),nt}function lt(){return F(ct,et)}function ot(){return et}function ut(t,e){return J(ct,t,e)}function ft(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function ht(t){return I(ut(et-1,gt(91===t?t+2:40===t?t+1:t)))}function dt(t){for(;(nt=lt())&&nt<33;)at();return ft(t)>2||ft(nt)>3?"":" "}function pt(t,e){for(;--e&&at()&&!(nt<48||nt>102||nt>57&&nt<65||nt>70&&nt<97););return ut(t,ot()+(e<6&&32==lt()&&32==at()))}function gt(t){for(;at();)switch(nt){case t:return et;case 34:case 39:34!==t&&39!==t&&gt(nt);break;case 40:41===t&&gt(t);break;case 92:at()}return et}function mt(t,e){for(;at()&&t+nt!==57&&(t+nt!==84||47!==lt()););return"/*"+ut(e,et-1)+"*"+H(47===t?t:at())}function bt(t){for(;!ft(lt());)at();return ut(t,et)}function yt(t){return function(t){return ct="",t}($t("",null,null,null,[""],(X=Z=1,tt=Q(ct=t),et=0,t=[]),0,[0],t))}function $t(t,e,n,c,s,i,r,a,l){for(var o=0,u=0,f=r,h=0,d=0,p=0,g=1,m=1,b=1,y=0,$="",v=s,k=i,w=c,x=$;m;)switch(p=y,y=at()){case 40:if(108!=p&&58==F(x,f-1)){-1!=B(x+=Y(ht(y),"&","&\f"),"&\f",G(o?a[o-1]:0))&&(b=-1);break}case 34:case 39:case 91:x+=ht(y);break;case 9:case 10:case 13:case 32:x+=dt(p);break;case 92:x+=pt(ot()-1,7);continue;case 47:switch(lt()){case 42:case 47:V(kt(mt(at(),ot()),e,n,l),l);break;default:x+="/"}break;case 123*g:a[o++]=Q(x)*b;case 125*g:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+u:-1==b&&(x=Y(x,/\f/g,"")),d>0&&Q(x)-f&&V(d>32?wt(x+";",c,n,f-1,l):wt(Y(x," ","")+";",c,n,f-2,l),l);break;case 59:x+=";";default:if(V(w=vt(x,e,n,o,u,s,a,$,v=[],k=[],f,i),i),123===y)if(0===u)$t(x,e,w,w,v,i,f,a,k);else switch(99===h&&110===F(x,3)?100:h){case 100:case 108:case 109:case 115:$t(t,w,w,c&&V(vt(t,w,w,0,0,s,a,$,s,v=[],f,k),k),s,k,f,a,c?v:k);break;default:$t(x,w,w,w,[""],k,0,a,k)}}o=u=d=0,g=b=1,$=x="",f=r;break;case 58:f=1+Q(x),d=p;default:if(g<1)if(123==y)--g;else if(125==y&&0==g++&&125==(nt=et>0?F(ct,--et):0,Z--,10===nt&&(Z=1,X--),nt))continue;switch(x+=H(y),y*g){case 38:b=u>0?1:(x+="\f",-1);break;case 44:a[o++]=(Q(x)-1)*b,b=1;break;case 64:45===lt()&&(x+=ht(at())),h=lt(),u=f=Q($=x+=bt(ot())),y++;break;case 45:45===p&&2==Q(x)&&(g=0)}}return i}function vt(t,e,n,c,s,i,r,a,l,o,u,f){for(var h=s-1,d=0===s?i:[""],p=U(d),g=0,m=0,b=0;g<c;++g)for(var y=0,$=J(t,h+1,h=G(m=r[g])),v=t;y<p;++y)(v=I(m>0?d[y]+" "+$:Y($,/&\f/g,d[y])))&&(l[b++]=v);return st(t,e,n,0===s?N:a,l,o,u,f)}function kt(t,e,n,c){return st(t,e,n,S,H(nt),J(t,2,-2),0,c)}function wt(t,e,n,c,s){return st(t,e,n,T,J(t,0,c),J(t,c+1,-1),c,s)}function xt(t,e,n){switch(s=e,45^F(c=t,0)?(((s<<2^F(c,0))<<2^F(c,1))<<2^F(c,2))<<2^F(c,3):0){case 5103:return z+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return z+t+t;case 4789:return O+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return z+t+O+t+E+t+t;case 5936:switch(F(t,e+11)){case 114:return z+t+E+Y(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return z+t+E+Y(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return z+t+E+Y(t,/[svh]\w+-[tblr]{2}/,"lr")+t}case 6828:case 4268:case 2903:return z+t+E+t+t;case 6165:return z+t+E+"flex-"+t+t;case 5187:return z+t+Y(t,/(\w+).+(:[^]+)/,z+"box-$1$2"+E+"flex-$1$2")+t;case 5443:return z+t+E+"flex-item-"+Y(t,/flex-|-self/g,"")+(L(t,/flex-|baseline/)?"":E+"grid-row-"+Y(t,/flex-|-self/g,""))+t;case 4675:return z+t+E+"flex-line-pack"+Y(t,/align-content|flex-|-self/g,"")+t;case 5548:return z+t+E+Y(t,"shrink","negative")+t;case 5292:return z+t+E+Y(t,"basis","preferred-size")+t;case 6060:return z+"box-"+Y(t,"-grow","")+z+t+E+Y(t,"grow","positive")+t;case 4554:return z+Y(t,/([^-])(transform)/g,"$1"+z+"$2")+t;case 6187:return Y(Y(Y(t,/(zoom-|grab)/,z+"$1"),/(image-set)/,z+"$1"),t,"")+t;case 5495:case 3959:return Y(t,/(image-set\([^]*)/,z+"$1$`$1");case 4968:return Y(Y(t,/(.+:)(flex-)?(.*)/,z+"box-pack:$3"+E+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+z+t+t;case 4200:if(!L(t,/flex-|baseline/))return E+"grid-column-align"+J(t,e)+t;break;case 2592:case 3360:return E+Y(t,"template-","")+t;case 4384:case 3616:return n&&n.some((function(t,n){return e=n,L(t.props,/grid-\w+-end/)}))?~B(t+(n=n[e].value),"span",0)?t:E+Y(t,"-start","")+t+E+"grid-row-span:"+(~B(n,"span",0)?L(n,/\d+/):+L(n,/\d+/)-+L(t,/\d+/))+";":E+Y(t,"-start","")+t;case 4896:case 4128:return n&&n.some((function(t){return L(t.props,/grid-\w+-start/)}))?t:E+Y(Y(t,"-end","-span"),"span ","")+t;case 4095:case 3583:case 4068:case 2532:return Y(t,/(.+)-inline(.+)/,z+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Q(t)-1-e>6)switch(F(t,e+1)){case 109:if(45!==F(t,e+4))break;case 102:return Y(t,/(.+:)(.+)-([^]+)/,"$1"+z+"$2-$3$1"+O+(108==F(t,e+3)?"$3":"$2-$3"))+t;case 115:return~B(t,"stretch",0)?xt(Y(t,"stretch","fill-available"),e,n)+t:t}break;case 5152:case 5920:return Y(t,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(e,n,c,s,i,r,a){return E+n+":"+c+a+(s?E+n+"-span:"+(i?r:+r-+c)+a:"")+t}));case 4949:if(121===F(t,e+6))return Y(t,":",":"+z)+t;break;case 6444:switch(F(t,45===F(t,14)?18:11)){case 120:return Y(t,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+z+(45===F(t,14)?"inline-":"")+"box$3$1"+z+"$2$3$1"+E+"$2box$3")+t;case 100:return Y(t,":",":"+E)+t}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Y(t,"scroll-","scroll-snap-")+t}var c,s;return t}function jt(t,e){for(var n="",c=0;c<t.length;c++)n+=e(t[c],c,t,e)||"";return n}function At(t,e,n,c){switch(t.type){case q:if(t.children.length)break;case K:case T:return t.return=t.return||t.value;case S:return"";case M:return t.return=t.value+"{"+jt(t.children,c)+"}";case N:if(!Q(t.value=t.props.join(",")))return""}return Q(n=jt(t.children,c))?t.return=t.value+"{"+n+"}":""}function _t(t,e,n,c){if(t.length>-1&&!t.return)switch(t.type){case T:return void(t.return=xt(t.value,t.length,n));case M:return jt([it(t,{value:Y(t.value,"@","@"+z)})],c);case N:if(t.length)return(n=t.props).map((function(e){switch(L(e,c=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":rt(it(t,{props:[Y(e,/:(read-\w+)/,":"+O+"$1")]})),rt(it(t,{props:[e]})),P(t,{props:W(n,c)});break;case"::placeholder":rt(it(t,{props:[Y(e,/:(plac\w+)/,":"+z+"input-$1")]})),rt(it(t,{props:[Y(e,/:(plac\w+)/,":"+O+"$1")]})),rt(it(t,{props:[Y(e,/:(plac\w+)/,E+"input-$1")]})),rt(it(t,{props:[e]})),P(t,{props:W(n,c)})}return""})).join("")}}const Ct=t=>null==t||!1===t||""===t;function Dt(t,e){return t.reduce(((t,[n,c])=>{const s=n.reduce(((n,s,i)=>{n=[...n,s];const r=c.at(i);if(r){let c=null;if("object"!=typeof r&&"function"!=typeof r||!("styleDefinition"in r))if("function"==typeof r){const n=r(e);if("object"==typeof n&&"__css__"in n){const{css:s,definitions:i}=Dt(n.styles,e);t.definitions=[...t.definitions,...i],c=s}else"string"==typeof n&&n.includes("[object Object]")&&console.error("[teiler]","If you trying to use nested component/pattern selector inside function use function `css`, sample: \n${({ someProperty }) => css`${NastedComponent} {...}`}"),c=n}else if("object"==typeof r&&"__pattern__"in r)c="."+r.id;else if("object"==typeof r){const e=r;t.definitions=[...t.definitions,e],c=e.id}else c=r;else{const e=r.styleDefinition;t.definitions=[...t.definitions,e],c="."+e.id}!1===Ct(c)&&(n=[...n,c])}return n}),[]).join("");return t.css=t.css+s,t}),{css:"",definitions:[]})}function Rt(t){const e=[];var n,c,s;return jt(yt(t),(c=[At,_t,(n=t=>{e.push(t)},function(t){t.root||(t=t.return)&&n(t)})],s=U(c),function(t,e,n,i){for(var r="",a=0;a<s;a++)r+=c[a](t,e,n,i)||"";return r})),e.join(" ")}const Et=(t,e)=>({type:"component",id:"t"+C(e.reduce(((t,[e])=>t+e.join("")),"")),styles:e,tag:t});function Ot(t,...e){const n=[Array.from(t),e];return{type:"keyframes",id:"teiler-"+C(t.join("")),styles:[n],tag:null}}function zt(t,e,n){const{styles:c,type:s}=e,{css:i,definitions:r}=Dt(c,n),a=C(i);if(r.forEach((e=>zt(t,e,n))),"component"===s){const e=Rt(`.teiler-${a} { ${i} }`);return t.insert(a,e),`teiler-${a}`}if("keyframes"===s){const{id:n}=e,c=Rt(`@keyframes ${n} { ${i} }`);t.insert(a,c)}else{const e=Rt(`${i}`);t.insert(a,e)}return null}let St=null;const Nt="STYLE_SHEET";function Tt(t){let e;const n=t[2].default,o=c(n,t,t[1],null);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,[c]){o&&o.p&&(!e||2&c)&&s(o,n,t,t[1],e?r(n,t[1],c,null):i(t[1]),null)},i(t){e||(a(o,t),e=!0)},o(t){l(o,t),e=!1},d(t){o&&o.d(t)}}}const Kt="THEME";function Mt(t,e,n){let{$$slots:c={},$$scope:s}=e,{theme:i}=e;const r=j(i);return x(Kt,r),t.$$set=t=>{"theme"in t&&n(0,i=t.theme),"$$scope"in t&&n(1,s=t.$$scope)},t.$$.update=()=>{1&t.$$.dirty&&r.set(i)},[i,s,c]}class qt extends t{constructor(t){super(),e(this,t,Mt,Tt,n,{theme:0})}}function Gt(t){let e,n,o,h;const d=t[8].default,g=c(d,t,t[7],null);let k=[{class:t[1]},t[2]],w={};for(let t=0;t<k.length;t+=1)w=p(w,k[t]);return{c(){e=m(t[0].tag),g&&g.c(),b(t[0].tag)(e,w)},m(c,s){u(c,e,s),g&&g.m(e,null),n=!0,o||(h=[y(e,"copy",t[9]),y(e,"cut",t[10]),y(e,"paste",t[11]),y(e,"compositionend",t[12]),y(e,"compositionstart",t[13]),y(e,"compositionupdate",t[14]),y(e,"focus",t[15]),y(e,"focusin",t[16]),y(e,"focusout",t[17]),y(e,"blur",t[18]),y(e,"change",t[19]),y(e,"beforeinput",t[20]),y(e,"input",t[21]),y(e,"reset",t[22]),y(e,"submit",t[23]),y(e,"invalid",t[24]),y(e,"formdata",t[25]),y(e,"load",t[26]),y(e,"error",t[27]),y(e,"beforetoggle",t[28]),y(e,"toggle",t[29]),y(e,"keydown",t[30]),y(e,"keypress",t[31]),y(e,"keyup",t[32]),y(e,"abort",t[33]),y(e,"canplay",t[34]),y(e,"canplaythrough",t[35]),y(e,"cuechange",t[36]),y(e,"durationchange",t[37]),y(e,"emptied",t[38]),y(e,"encrypted",t[39]),y(e,"ended",t[40]),y(e,"loadeddata",t[41]),y(e,"loadedmetadata",t[42]),y(e,"loadstart",t[43]),y(e,"pause",t[44]),y(e,"play",t[45]),y(e,"playing",t[46]),y(e,"progress",t[47]),y(e,"ratechange",t[48]),y(e,"seeked",t[49]),y(e,"seeking",t[50]),y(e,"stalled",t[51]),y(e,"suspend",t[52]),y(e,"timeupdate",t[53]),y(e,"volumechange",t[54]),y(e,"waiting",t[55]),y(e,"auxclick",t[56]),y(e,"click",t[57]),y(e,"contextmenu",t[58]),y(e,"dblclick",t[59]),y(e,"drag",t[60]),y(e,"dragend",t[61]),y(e,"dragenter",t[62]),y(e,"dragexit",t[63]),y(e,"dragleave",t[64]),y(e,"dragover",t[65]),y(e,"dragstart",t[66]),y(e,"drop",t[67]),y(e,"mousedown",t[68]),y(e,"mouseenter",t[69]),y(e,"mouseleave",t[70]),y(e,"mousemove",t[71]),y(e,"mouseout",t[72]),y(e,"mouseover",t[73]),y(e,"mouseup",t[74]),y(e,"select",t[75]),y(e,"selectionchange",t[76]),y(e,"selectstart",t[77]),y(e,"touchcancel",t[78]),y(e,"touchend",t[79]),y(e,"touchmove",t[80]),y(e,"touchstart",t[81]),y(e,"gotpointercapture",t[82]),y(e,"pointercancel",t[83]),y(e,"pointerdown",t[84]),y(e,"pointerenter",t[85]),y(e,"pointerleave",t[86]),y(e,"pointermove",t[87]),y(e,"pointerout",t[88]),y(e,"pointerover",t[89]),y(e,"pointerup",t[90]),y(e,"lostpointercapture",t[91]),y(e,"gamepadconnected",t[92]),y(e,"gamepaddisconnected",t[93]),y(e,"scroll",t[94]),y(e,"scrollend",t[95]),y(e,"resize",t[96]),y(e,"wheel",t[97]),y(e,"animationstart",t[98]),y(e,"animationend",t[99]),y(e,"animationiteration",t[100]),y(e,"transitionstart",t[101]),y(e,"transitionrun",t[102]),y(e,"transitionend",t[103]),y(e,"transitioncancel",t[104]),y(e,"outrostart",t[105]),y(e,"outroend",t[106]),y(e,"introstart",t[107]),y(e,"introend",t[108]),y(e,"message",t[109]),y(e,"messageerror",t[110]),y(e,"visibilitychange",t[111]),y(e,"cancel",t[112]),y(e,"close",t[113]),y(e,"fullscreenchange",t[114]),y(e,"fullscreenerror",t[115])],o=!0)},p(t,c){g&&g.p&&(!n||128&c[0])&&s(g,d,t,t[7],n?r(d,t[7],c,null):i(t[7]),null),b(t[0].tag)(e,w=$(k,[(!n||2&c[0])&&{class:t[1]},4&c[0]&&t[2]]))},i(t){n||(a(g,t),n=!0)},o(t){l(g,t),n=!1},d(t){t&&f(e),g&&g.d(t),o=!1,v(h)}}}function Ht(t){let e,c,s=t[0].tag,i=t[0].tag&&Gt(t);return{c(){i&&i.c(),e=o()},m(t,n){i&&i.m(t,n),u(t,e,n),c=!0},p(t,c){t[0].tag?s?n(s,t[0].tag)?(i.d(1),i=Gt(t),s=t[0].tag,i.c(),i.m(e.parentNode,e)):i.p(t,c):(i=Gt(t),s=t[0].tag,i.c(),i.m(e.parentNode,e)):s&&(i.d(1),i=null,s=t[0].tag)},i(t){c||(a(i,t),c=!0)},o(t){l(i,t),c=!1},d(t){t&&f(e),i&&i.d(t)}}}function Pt(t,e,n){let c,s,i,r;const a=["styleDefinition"];let l,o=h(e,a),{$$slots:u={},$$scope:f}=e,{styleDefinition:m}=e;const b=w(Nt)||(null===St&&(St=_({})),St),y=w(Kt);return d(t,y,(t=>n(6,l=t))),t.$$set=t=>{e=p(p({},e),g(t)),n(117,o=h(e,a)),"styleDefinition"in t&&n(0,m=t.styleDefinition),"$$scope"in t&&n(7,f=t.$$scope)},t.$$.update=()=>{n(4,c=zt(b,m,{...o,theme:l})),n(5,s=Object.entries(o).filter((([t,e])=>"_"!==t[0]&&"class"!==t))),32&t.$$.dirty[0]&&n(2,i=Object.fromEntries(s)),n(1,r=o.class?`${c} ${m.id} ${o.class}`:`${c} ${m.id}`)},[m,r,i,y,c,s,l,f,u,function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)},function(e){k.call(this,t,e)}]}class It extends t{constructor(t){super(),e(this,t,Pt,Ht,n,{styleDefinition:0},null,[-1,-1,-1,-1])}}const Lt=t=>{var e;return(e=class extends It{constructor(e){super({...e,props:{...e.props,styleDefinition:t}})}}).styleDefinition=t,e},Yt=(t,e)=>(n,...c)=>function(t,e,n,c,...s){if(Array.isArray(c)){const i=c,r=[Array.from(i),s],a=e(t,[r]);return n(a)}{const t=c;return(c,...s)=>{const i=[Array.from(c),s],r=e(t.styleDefinition.tag,[...t.styleDefinition.styles,i]);return n(r)}}}(t,e,Lt,n,...c),Bt=Yt("div",Et);A.forEach((t=>{Bt[t]=Yt(t,Et)}));const Ft=Bt,Jt=Yt(null,((t,e)=>({type:"global",id:"t"+C(e.reduce(((t,[e])=>t+e.join("")),"")),styles:e,tag:t})));export{qt as ThemeProvider,Ft as component,Lt as createComponent,Jt as global,Ot as keyframes};
1
+ var t=new Set(["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","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text"]);function e(t){const e={...t};let n=[];const c="undefined"==typeof document?function(){const t={};return{insertRule:function(e,n){return t[e]=n,Object.keys(t).length},deleteRule:function(e){delete t[e]},getRule:function(e){return t[e]||null},getAllRules:function(){return Object.values(t).join(" ")},getAllKeys:function(){return Object.keys(t)}}}():function(t){const e=function(t){const e=document.head,n=t||e,c=document.createElement("style");return c.setAttribute("data-teiler",""),n.appendChild(c),c}(t),n=new Map;return{insertRule:function(t,c){const r=document.createTextNode(c);return!1===n.has(t)&&(n.set(t,r),e.appendChild(r)),n.size},deleteRule:function(t){e.removeChild(n.get(t)),n.delete(t)},getRule:function(t){return n.get(t)?.textContent||null},getAllRules:function(){return Array.from(n.values()).reduce(((t,e)=>t+" "+e.textContent),"")},getAllKeys:function(){return Array.from(n.keys())}}}(e.container);return{insert:(t,e)=>{!1===n.includes(t)&&c.insertRule(t,e)},dump:()=>c.getAllRules(),extract:()=>({css:c.getAllRules(),ids:c.getAllKeys()}),hydrate:t=>{n=t||[]}}}function n(t){let e,n=t.length,c=n,r=0;for(;n>=4;)e=255&t.charCodeAt(r)|(255&t.charCodeAt(++r))<<8|(255&t.charCodeAt(++r))<<16|(255&t.charCodeAt(++r))<<24,e=1540483477*(65535&e)+((1540483477*(e>>>16)&65535)<<16),e^=e>>>24,e=1540483477*(65535&e)+((1540483477*(e>>>16)&65535)<<16),c=1540483477*(65535&c)+((1540483477*(c>>>16)&65535)<<16)^e,n-=4,++r;switch(n){case 3:c^=(255&t.charCodeAt(r+2))<<16;case 2:c^=(255&t.charCodeAt(r+1))<<8;case 1:c^=255&t.charCodeAt(r),c=1540483477*(65535&c)+((1540483477*(c>>>16)&65535)<<16)}return c^=c>>>13,c=1540483477*(65535&c)+((1540483477*(c>>>16)&65535)<<16),c^=c>>>15,(c>>>0).toString(36)}const c=t=>(e,...c)=>{if("__pattern__"in e)return(t,...c)=>{const r=[Array.from(t),c],o=[...e.styles,r],i=o.reduce(((t,[e])=>t+e.join("")),"");return{styles:o,id:"t"+n(i),tag:e.tag,__pattern__:!0}};{const r=e,o=[[Array.from(r),c]],i=o.reduce(((t,[e])=>t+e.join("")),"");return{styles:o,id:"t"+n(i),tag:t,__pattern__:!0}}},r=c("div");t.forEach((t=>{r[t]=c(t)})),r.global=c(null);var o="-ms-",i="-moz-",s="-webkit-",a="comm",l="rule",u="decl",f="@import",d="@keyframes",h="@layer",p=Math.abs,g=String.fromCharCode,m=Object.assign;function y(t){return t.trim()}function b(t,e){return(t=e.exec(t))?t[0]:t}function $(t,e,n){return t.replace(e,n)}function v(t,e,n){return t.indexOf(e,n)}function w(t,e){return 0|t.charCodeAt(e)}function k(t,e,n){return t.slice(e,n)}function x(t){return t.length}function _(t){return t.length}function j(t,e){return e.push(t),t}function O(t,e){return t.filter((function(t){return!b(t,e)}))}var A=1,E=1,C=0,S=0,D=0,P="";function R(t,e,n,c,r,o,i,s){return{value:t,root:e,parent:n,type:c,props:r,children:o,line:A,column:E,length:i,return:"",siblings:s}}function z(t,e){return m(R("",null,null,"",null,null,0,t.siblings),t,{length:-t.length},e)}function N(t){for(;t.root;)t=z(t.root,{children:[t]});j(t,t.siblings)}function T(){return D=S>0?w(P,--S):0,E--,10===D&&(E=1,A--),D}function M(){return D=S<C?w(P,S++):0,E++,10===D&&(E=1,A++),D}function I(){return w(P,S)}function L(){return S}function q(t,e){return k(P,t,e)}function K(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function G(t){return y(q(S-1,F(91===t?t+2:40===t?t+1:t)))}function H(t){for(;(D=I())&&D<33;)M();return K(t)>2||K(D)>3?"":" "}function B(t,e){for(;--e&&M()&&!(D<48||D>102||D>57&&D<65||D>70&&D<97););return q(t,L()+(e<6&&32==I()&&32==M()))}function F(t){for(;M();)switch(D){case t:return S;case 34:case 39:34!==t&&39!==t&&F(D);break;case 40:41===t&&F(t);break;case 92:M()}return S}function U(t,e){for(;M()&&t+D!==57&&(t+D!==84||47!==I()););return"/*"+q(e,S-1)+"*"+g(47===t?t:M())}function Y(t){for(;!K(I());)M();return q(t,S)}function J(t){return function(t){return P="",t}(Q("",null,null,null,[""],t=function(t){return A=E=1,C=x(P=t),S=0,[]}(t),0,[0],t))}function Q(t,e,n,c,r,o,i,s,a){for(var l=0,u=0,f=i,d=0,h=0,m=0,y=1,b=1,k=1,_=0,O="",A=r,E=o,C=c,S=O;b;)switch(m=_,_=M()){case 40:if(108!=m&&58==w(S,f-1)){-1!=v(S+=$(G(_),"&","&\f"),"&\f",p(l?s[l-1]:0))&&(k=-1);break}case 34:case 39:case 91:S+=G(_);break;case 9:case 10:case 13:case 32:S+=H(m);break;case 92:S+=B(L()-1,7);continue;case 47:switch(I()){case 42:case 47:j(W(U(M(),L()),e,n,a),a);break;default:S+="/"}break;case 123*y:s[l++]=x(S)*k;case 125*y:case 59:case 0:switch(_){case 0:case 125:b=0;case 59+u:-1==k&&(S=$(S,/\f/g,"")),h>0&&x(S)-f&&j(h>32?X(S+";",c,n,f-1,a):X($(S," ","")+";",c,n,f-2,a),a);break;case 59:S+=";";default:if(j(C=V(S,e,n,l,u,r,s,O,A=[],E=[],f,o),o),123===_)if(0===u)Q(S,e,C,C,A,o,f,s,E);else switch(99===d&&110===w(S,3)?100:d){case 100:case 108:case 109:case 115:Q(t,C,C,c&&j(V(t,C,C,0,0,r,s,O,r,A=[],f,E),E),r,E,f,s,c?A:E);break;default:Q(S,C,C,C,[""],E,0,s,E)}}l=u=h=0,y=k=1,O=S="",f=i;break;case 58:f=1+x(S),h=m;default:if(y<1)if(123==_)--y;else if(125==_&&0==y++&&125==T())continue;switch(S+=g(_),_*y){case 38:k=u>0?1:(S+="\f",-1);break;case 44:s[l++]=(x(S)-1)*k,k=1;break;case 64:45===I()&&(S+=G(M())),d=I(),u=f=x(O=S+=Y(L())),_++;break;case 45:45===m&&2==x(S)&&(y=0)}}return o}function V(t,e,n,c,r,o,i,s,a,u,f,d){for(var h=r-1,g=0===r?o:[""],m=_(g),b=0,v=0,w=0;b<c;++b)for(var x=0,j=k(t,h+1,h=p(v=i[b])),O=t;x<m;++x)(O=y(v>0?g[x]+" "+j:$(j,/&\f/g,g[x])))&&(a[w++]=O);return R(t,e,n,0===r?l:s,a,u,f,d)}function W(t,e,n,c){return R(t,e,n,a,g(D),k(t,2,-2),0,c)}function X(t,e,n,c,r){return R(t,e,n,u,k(t,0,c),k(t,c+1,-1),c,r)}function Z(t,e,n){switch(function(t,e){return 45^w(t,0)?(((e<<2^w(t,0))<<2^w(t,1))<<2^w(t,2))<<2^w(t,3):0}(t,e)){case 5103:return s+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return s+t+t;case 4789:return i+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return s+t+i+t+o+t+t;case 5936:switch(w(t,e+11)){case 114:return s+t+o+$(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return s+t+o+$(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return s+t+o+$(t,/[svh]\w+-[tblr]{2}/,"lr")+t}case 6828:case 4268:case 2903:return s+t+o+t+t;case 6165:return s+t+o+"flex-"+t+t;case 5187:return s+t+$(t,/(\w+).+(:[^]+)/,s+"box-$1$2"+o+"flex-$1$2")+t;case 5443:return s+t+o+"flex-item-"+$(t,/flex-|-self/g,"")+(b(t,/flex-|baseline/)?"":o+"grid-row-"+$(t,/flex-|-self/g,""))+t;case 4675:return s+t+o+"flex-line-pack"+$(t,/align-content|flex-|-self/g,"")+t;case 5548:return s+t+o+$(t,"shrink","negative")+t;case 5292:return s+t+o+$(t,"basis","preferred-size")+t;case 6060:return s+"box-"+$(t,"-grow","")+s+t+o+$(t,"grow","positive")+t;case 4554:return s+$(t,/([^-])(transform)/g,"$1"+s+"$2")+t;case 6187:return $($($(t,/(zoom-|grab)/,s+"$1"),/(image-set)/,s+"$1"),t,"")+t;case 5495:case 3959:return $(t,/(image-set\([^]*)/,s+"$1$`$1");case 4968:return $($(t,/(.+:)(flex-)?(.*)/,s+"box-pack:$3"+o+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+s+t+t;case 4200:if(!b(t,/flex-|baseline/))return o+"grid-column-align"+k(t,e)+t;break;case 2592:case 3360:return o+$(t,"template-","")+t;case 4384:case 3616:return n&&n.some((function(t,n){return e=n,b(t.props,/grid-\w+-end/)}))?~v(t+(n=n[e].value),"span",0)?t:o+$(t,"-start","")+t+o+"grid-row-span:"+(~v(n,"span",0)?b(n,/\d+/):+b(n,/\d+/)-+b(t,/\d+/))+";":o+$(t,"-start","")+t;case 4896:case 4128:return n&&n.some((function(t){return b(t.props,/grid-\w+-start/)}))?t:o+$($(t,"-end","-span"),"span ","")+t;case 4095:case 3583:case 4068:case 2532:return $(t,/(.+)-inline(.+)/,s+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(x(t)-1-e>6)switch(w(t,e+1)){case 109:if(45!==w(t,e+4))break;case 102:return $(t,/(.+:)(.+)-([^]+)/,"$1"+s+"$2-$3$1"+i+(108==w(t,e+3)?"$3":"$2-$3"))+t;case 115:return~v(t,"stretch",0)?Z($(t,"stretch","fill-available"),e,n)+t:t}break;case 5152:case 5920:return $(t,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(e,n,c,r,i,s,a){return o+n+":"+c+a+(r?o+n+"-span:"+(i?s:+s-+c)+a:"")+t}));case 4949:if(121===w(t,e+6))return $(t,":",":"+s)+t;break;case 6444:switch(w(t,45===w(t,14)?18:11)){case 120:return $(t,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+s+(45===w(t,14)?"inline-":"")+"box$3$1"+s+"$2$3$1"+o+"$2box$3")+t;case 100:return $(t,":",":"+o)+t}break;case 5719:case 2647:case 2135:case 3927:case 2391:return $(t,"scroll-","scroll-snap-")+t}return t}function tt(t,e){for(var n="",c=0;c<t.length;c++)n+=e(t[c],c,t,e)||"";return n}function et(t,e,n,c){switch(t.type){case h:if(t.children.length)break;case f:case u:return t.return=t.return||t.value;case a:return"";case d:return t.return=t.value+"{"+tt(t.children,c)+"}";case l:if(!x(t.value=t.props.join(",")))return""}return x(n=tt(t.children,c))?t.return=t.value+"{"+n+"}":""}function nt(t,e,n,c){if(t.length>-1&&!t.return)switch(t.type){case u:return void(t.return=Z(t.value,t.length,n));case d:return tt([z(t,{value:$(t.value,"@","@"+s)})],c);case l:if(t.length)return function(t,e){return t.map(e).join("")}(n=t.props,(function(e){switch(b(e,c=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":N(z(t,{props:[$(e,/:(read-\w+)/,":"+i+"$1")]})),N(z(t,{props:[e]})),m(t,{props:O(n,c)});break;case"::placeholder":N(z(t,{props:[$(e,/:(plac\w+)/,":"+s+"input-$1")]})),N(z(t,{props:[$(e,/:(plac\w+)/,":"+i+"$1")]})),N(z(t,{props:[$(e,/:(plac\w+)/,o+"input-$1")]})),N(z(t,{props:[e]})),m(t,{props:O(n,c)})}return""}))}}const ct=t=>null==t||!1===t||""===t;function rt(t,e){return t.reduce(((t,[n,c])=>{const r=n.reduce(((n,r,o)=>{n=[...n,r];const i=c.at(o);if(i){let c=null;if("object"!=typeof i&&"function"!=typeof i||!("styleDefinition"in i))if("function"==typeof i){const n=i(e);if("object"==typeof n&&"__css__"in n){const{css:r,definitions:o}=rt(n.styles,e);t.definitions=[...t.definitions,...o],c=r}else"string"==typeof n&&n.includes("[object Object]")&&console.error("[teiler]","If you trying to use nested component/pattern selector inside function use function `css`, sample: \n${({ someProperty }) => css`${NastedComponent} {...}`}"),c=n}else if("object"==typeof i&&"__pattern__"in i)c="."+i.id;else if("object"==typeof i){const e=i;t.definitions=[...t.definitions,e],c=e.id}else c=i;else{const e=i.styleDefinition;t.definitions=[...t.definitions,e],c="."+e.id}!1===ct(c)&&(n=[...n,c])}return n}),[]).join("");return t.css=t.css+r,t}),{css:"",definitions:[]})}function ot(t){const e=[];var n;return tt(J(t),function(t){var e=_(t);return function(n,c,r,o){for(var i="",s=0;s<e;s++)i+=t[s](n,c,r,o)||"";return i}}([et,nt,(n=t=>{e.push(t)},function(t){t.root||(t=t.return)&&n(t)})])),e.join(" ")}const it=(t,e)=>({type:"component",id:"t"+n(e.reduce(((t,[e])=>t+e.join("")),"")),styles:e,tag:t});function st(t,...e){const c=[Array.from(t),e];return{type:"keyframes",id:"teiler-"+n(t.join("")),styles:[c],tag:null}}function at(t,e,c){const{styles:r,type:o}=e,{css:i,definitions:s}=rt(r,c),a=n(i);if(s.forEach((e=>at(t,e,c))),"component"===o){const e=ot(`.teiler-${a} { ${i} }`);return t.insert(a,e),`teiler-${a}`}if("keyframes"===o){const{id:n}=e,c=ot(`@keyframes ${n} { ${i} }`);t.insert(a,c)}else{const e=ot(`${i}`);t.insert(a,e)}return null}function lt(){}function ut(t,e){for(const n in e)t[n]=e[n];return t}function ft(t){return t()}function dt(){return Object.create(null)}function ht(t){t.forEach(ft)}function pt(t){return"function"==typeof t}function gt(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function mt(t,e,n){t.$$.on_destroy.push(function(t,...e){if(null==t){for(const t of e)t(void 0);return lt}const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}(e,n))}function yt(t,e,n,c){if(t){const r=bt(t,e,n,c);return t[0](r)}}function bt(t,e,n,c){return t[1]&&c?ut(n.ctx.slice(),t[1](c(e))):n.ctx}function $t(t,e,n,c){if(t[2]&&c){const r=t[2](c(n));if(void 0===e.dirty)return r;if("object"==typeof r){const t=[],n=Math.max(e.dirty.length,r.length);for(let c=0;c<n;c+=1)t[c]=e.dirty[c]|r[c];return t}return e.dirty|r}return e.dirty}function vt(t,e,n,c,r,o){if(r){const i=bt(e,n,c,o);t.p(i,r)}}function wt(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let t=0;t<n;t++)e[t]=-1;return e}return-1}function kt(t,e){const n={};e=new Set(e);for(const c in t)e.has(c)||"$"===c[0]||(n[c]=t[c]);return n}function xt(t,e,n){t.insertBefore(e,n||null)}function _t(t){t.parentNode&&t.parentNode.removeChild(t)}function jt(){return t="",document.createTextNode(t);var t}function Ot(t,e,n,c){return t.addEventListener(e,n,c),()=>t.removeEventListener(e,n,c)}function At(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}const Et=["width","height"];function Ct(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const c in e)null==e[c]?t.removeAttribute(c):"style"===c?t.style.cssText=e[c]:"__value"===c?t.value=t[c]=e[c]:n[c]&&n[c].set&&-1===Et.indexOf(c)?t[c]=e[c]:At(t,c,e[c])}function St(t,e){Object.keys(e).forEach((n=>{!function(t,e,n){const c=e.toLowerCase();c in t?t[c]="boolean"==typeof t[c]&&""===n||n:e in t?t[e]="boolean"==typeof t[e]&&""===n||n:At(t,e,n)}(t,n,e[n])}))}function Dt(t){return/-/.test(t)?St:Ct}let Pt;function Rt(t){Pt=t}function zt(){if(!Pt)throw new Error("Function called outside component initialization");return Pt}function Nt(t){return zt().$$.context.get(t)}function Tt(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t.call(this,e)))}const Mt=[],It=[];let Lt=[];const qt=[],Kt=Promise.resolve();let Gt=!1;function Ht(t){Lt.push(t)}const Bt=new Set;let Ft=0;function Ut(){if(0!==Ft)return;const t=Pt;do{try{for(;Ft<Mt.length;){const t=Mt[Ft];Ft++,Rt(t),Yt(t.$$)}}catch(t){throw Mt.length=0,Ft=0,t}for(Rt(null),Mt.length=0,Ft=0;It.length;)It.pop()();for(let t=0;t<Lt.length;t+=1){const e=Lt[t];Bt.has(e)||(Bt.add(e),e())}Lt.length=0}while(Mt.length);for(;qt.length;)qt.pop()();Gt=!1,Bt.clear(),Rt(t)}function Yt(t){if(null!==t.fragment){t.update(),ht(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(Ht)}}const Jt=new Set;let Qt;function Vt(t,e){t&&t.i&&(Jt.delete(t),t.i(e))}function Wt(t,e,n,c){if(t&&t.o){if(Jt.has(t))return;Jt.add(t),Qt.c.push((()=>{Jt.delete(t)})),t.o(e)}}function Xt(t,e){const n=t.$$;null!==n.fragment&&(!function(t){const e=[],n=[];Lt.forEach((c=>-1===t.indexOf(c)?e.push(c):n.push(c))),n.forEach((t=>t())),Lt=e}(n.after_update),ht(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Zt(t,e){-1===t.$$.dirty[0]&&(Mt.push(t),Gt||(Gt=!0,Kt.then(Ut)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function te(t,e,n,c,r,o,i=null,s=[-1]){const a=Pt;Rt(t);const l=t.$$={fragment:null,ctx:[],props:o,update:lt,not_equal:r,bound:dt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(a?a.$$.context:[])),callbacks:dt(),dirty:s,skip_bound:!1,root:e.target||a.$$.root};i&&i(l.root);let u=!1;if(l.ctx=n?n(t,e.props||{},((e,n,...c)=>{const o=c.length?c[0]:n;return l.ctx&&r(l.ctx[e],l.ctx[e]=o)&&(!l.skip_bound&&l.bound[e]&&l.bound[e](o),u&&Zt(t,e)),n})):[],l.update(),u=!0,ht(l.before_update),l.fragment=!!c&&c(l.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);l.fragment&&l.fragment.l(t),t.forEach(_t)}else l.fragment&&l.fragment.c();e.intro&&Vt(t.$$.fragment),function(t,e,n){const{fragment:c,after_update:r}=t.$$;c&&c.m(e,n),Ht((()=>{const e=t.$$.on_mount.map(ft).filter(pt);t.$$.on_destroy?t.$$.on_destroy.push(...e):ht(e),t.$$.on_mount=[]})),r.forEach(Ht)}(t,e.target,e.anchor),Ut()}Rt(a)}class ee{$$=void 0;$$set=void 0;$destroy(){Xt(this,1),this.$destroy=lt}$on(t,e){if(!pt(e))return lt;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}"undefined"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add("4");let ne=null;const ce="STYLE_SHEET";const re=[];function oe(t){let e;const n=t[2].default,c=yt(n,t,t[1],null);return{c(){c&&c.c()},m(t,n){c&&c.m(t,n),e=!0},p(t,[r]){c&&c.p&&(!e||2&r)&&vt(c,n,t,t[1],e?$t(n,t[1],r,null):wt(t[1]),null)},i(t){e||(Vt(c,t),e=!0)},o(t){Wt(c,t),e=!1},d(t){c&&c.d(t)}}}const ie="THEME";function se(t,e,n){let{$$slots:c={},$$scope:r}=e,{theme:o}=e;var i=function(t,e=lt){let n;const c=new Set;function r(e){if(gt(t,e)&&(t=e,n)){const e=!re.length;for(const e of c)e[1](),re.push(e,t);if(e){for(let t=0;t<re.length;t+=2)re[t][0](re[t+1]);re.length=0}}}function o(e){r(e(t))}return{set:r,update:o,subscribe:function(i,s=lt){const a=[i,s];return c.add(a),1===c.size&&(n=e(r,o)||lt),i(t),()=>{c.delete(a),0===c.size&&n&&(n(),n=null)}}}}(o);return function(t,e){zt().$$.context.set(t,e)}(ie,i),t.$$set=t=>{"theme"in t&&n(0,o=t.theme),"$$scope"in t&&n(1,r=t.$$scope)},t.$$.update=()=>{1&t.$$.dirty&&i.set(o)},[o,r,c]}class ae extends ee{constructor(t){super(),te(this,t,se,oe,gt,{theme:0})}}function le(t){let e,n,c,r;const o=t[8].default,i=yt(o,t,t[7],null);let s=[{class:t[1]},t[2]],a={};for(let t=0;t<s.length;t+=1)a=ut(a,s[t]);return{c(){var n;n=t[0].tag,e=document.createElement(n),i&&i.c(),Dt(t[0].tag)(e,a)},m(o,s){xt(o,e,s),i&&i.m(e,null),n=!0,c||(r=[Ot(e,"copy",t[9]),Ot(e,"cut",t[10]),Ot(e,"paste",t[11]),Ot(e,"compositionend",t[12]),Ot(e,"compositionstart",t[13]),Ot(e,"compositionupdate",t[14]),Ot(e,"focus",t[15]),Ot(e,"focusin",t[16]),Ot(e,"focusout",t[17]),Ot(e,"blur",t[18]),Ot(e,"change",t[19]),Ot(e,"beforeinput",t[20]),Ot(e,"input",t[21]),Ot(e,"reset",t[22]),Ot(e,"submit",t[23]),Ot(e,"invalid",t[24]),Ot(e,"formdata",t[25]),Ot(e,"load",t[26]),Ot(e,"error",t[27]),Ot(e,"beforetoggle",t[28]),Ot(e,"toggle",t[29]),Ot(e,"keydown",t[30]),Ot(e,"keypress",t[31]),Ot(e,"keyup",t[32]),Ot(e,"abort",t[33]),Ot(e,"canplay",t[34]),Ot(e,"canplaythrough",t[35]),Ot(e,"cuechange",t[36]),Ot(e,"durationchange",t[37]),Ot(e,"emptied",t[38]),Ot(e,"encrypted",t[39]),Ot(e,"ended",t[40]),Ot(e,"loadeddata",t[41]),Ot(e,"loadedmetadata",t[42]),Ot(e,"loadstart",t[43]),Ot(e,"pause",t[44]),Ot(e,"play",t[45]),Ot(e,"playing",t[46]),Ot(e,"progress",t[47]),Ot(e,"ratechange",t[48]),Ot(e,"seeked",t[49]),Ot(e,"seeking",t[50]),Ot(e,"stalled",t[51]),Ot(e,"suspend",t[52]),Ot(e,"timeupdate",t[53]),Ot(e,"volumechange",t[54]),Ot(e,"waiting",t[55]),Ot(e,"auxclick",t[56]),Ot(e,"click",t[57]),Ot(e,"contextmenu",t[58]),Ot(e,"dblclick",t[59]),Ot(e,"drag",t[60]),Ot(e,"dragend",t[61]),Ot(e,"dragenter",t[62]),Ot(e,"dragexit",t[63]),Ot(e,"dragleave",t[64]),Ot(e,"dragover",t[65]),Ot(e,"dragstart",t[66]),Ot(e,"drop",t[67]),Ot(e,"mousedown",t[68]),Ot(e,"mouseenter",t[69]),Ot(e,"mouseleave",t[70]),Ot(e,"mousemove",t[71]),Ot(e,"mouseout",t[72]),Ot(e,"mouseover",t[73]),Ot(e,"mouseup",t[74]),Ot(e,"select",t[75]),Ot(e,"selectionchange",t[76]),Ot(e,"selectstart",t[77]),Ot(e,"touchcancel",t[78]),Ot(e,"touchend",t[79]),Ot(e,"touchmove",t[80]),Ot(e,"touchstart",t[81]),Ot(e,"gotpointercapture",t[82]),Ot(e,"pointercancel",t[83]),Ot(e,"pointerdown",t[84]),Ot(e,"pointerenter",t[85]),Ot(e,"pointerleave",t[86]),Ot(e,"pointermove",t[87]),Ot(e,"pointerout",t[88]),Ot(e,"pointerover",t[89]),Ot(e,"pointerup",t[90]),Ot(e,"lostpointercapture",t[91]),Ot(e,"gamepadconnected",t[92]),Ot(e,"gamepaddisconnected",t[93]),Ot(e,"scroll",t[94]),Ot(e,"scrollend",t[95]),Ot(e,"resize",t[96]),Ot(e,"wheel",t[97]),Ot(e,"animationstart",t[98]),Ot(e,"animationend",t[99]),Ot(e,"animationiteration",t[100]),Ot(e,"transitionstart",t[101]),Ot(e,"transitionrun",t[102]),Ot(e,"transitionend",t[103]),Ot(e,"transitioncancel",t[104]),Ot(e,"outrostart",t[105]),Ot(e,"outroend",t[106]),Ot(e,"introstart",t[107]),Ot(e,"introend",t[108]),Ot(e,"message",t[109]),Ot(e,"messageerror",t[110]),Ot(e,"visibilitychange",t[111]),Ot(e,"cancel",t[112]),Ot(e,"close",t[113]),Ot(e,"fullscreenchange",t[114]),Ot(e,"fullscreenerror",t[115])],c=!0)},p(t,c){i&&i.p&&(!n||128&c[0])&&vt(i,o,t,t[7],n?$t(o,t[7],c,null):wt(t[7]),null),Dt(t[0].tag)(e,a=function(t,e){const n={},c={},r={$$scope:1};let o=t.length;for(;o--;){const i=t[o],s=e[o];if(s){for(const t in i)t in s||(c[t]=1);for(const t in s)r[t]||(n[t]=s[t],r[t]=1);t[o]=s}else for(const t in i)r[t]=1}for(const t in c)t in n||(n[t]=void 0);return n}(s,[(!n||2&c[0])&&{class:t[1]},4&c[0]&&t[2]]))},i(t){n||(Vt(i,t),n=!0)},o(t){Wt(i,t),n=!1},d(t){t&&_t(e),i&&i.d(t),c=!1,ht(r)}}}function ue(t){let e,n,c=t[0].tag,r=t[0].tag&&le(t);return{c(){r&&r.c(),e=jt()},m(t,c){r&&r.m(t,c),xt(t,e,c),n=!0},p(t,n){t[0].tag?c?gt(c,t[0].tag)?(r.d(1),r=le(t),c=t[0].tag,r.c(),r.m(e.parentNode,e)):r.p(t,n):(r=le(t),c=t[0].tag,r.c(),r.m(e.parentNode,e)):c&&(r.d(1),r=null,c=t[0].tag)},i(t){n||(Vt(r,t),n=!0)},o(t){Wt(r,t),n=!1},d(t){t&&_t(e),r&&r.d(t)}}}function fe(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,c=new Array(e);n<e;n++)c[n]=t[n];return c}function de(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function he(t,e){return e=null!=e?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):function(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);n.push.apply(n,c)}return n}(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})),t}function pe(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var c,r,o=[],i=!0,s=!1;try{for(n=n.call(t);!(i=(c=n.next()).done)&&(o.push(c.value),!e||o.length!==e);i=!0);}catch(t){s=!0,r=t}finally{try{i||null==n.return||n.return()}finally{if(s)throw r}}return o}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return fe(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fe(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ge(t,n,c){let r,o,i,s;const a=["styleDefinition"];let l,u=kt(n,a),{$$slots:f={},$$scope:d}=n,{styleDefinition:h}=n;var p=Nt(ce)||(null===ne&&(ne=e({})),ne),g=Nt(ie);return mt(t,g,(t=>c(6,l=t))),t.$$set=t=>{n=ut(ut({},n),function(t){const e={};for(const n in t)"$"!==n[0]&&(e[n]=t[n]);return e}(t)),c(117,u=kt(n,a)),"styleDefinition"in t&&c(0,h=t.styleDefinition),"$$scope"in t&&c(7,d=t.$$scope)},t.$$.update=()=>{c(4,r=at(p,h,he(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},c=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(c=c.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),c.forEach((function(e){de(t,e,n[e])}))}return t}({},u),{theme:l}))),c(5,o=Object.entries(u).filter((function(t){var e=pe(t,2),n=e[0];return e[1],"_"!==n[0]&&"class"!==n}))),32&t.$$.dirty[0]&&c(2,i=Object.fromEntries(o)),c(1,s=u.class?"".concat(r," ").concat(h.id," ").concat(u.class):"".concat(r," ").concat(h.id))},[h,s,i,g,r,o,l,d,f,function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)},function(e){Tt.call(this,t,e)}]}class me extends ee{constructor(t){super(),te(this,t,ge,ue,gt,{styleDefinition:0},null,[-1,-1,-1,-1])}}const ye=t=>{var e;return(e=class extends me{constructor(e){super({...e,props:{...e.props,styleDefinition:t}})}}).styleDefinition=t,e},be=(t,e)=>(n,...c)=>function(t,e,n,c,...r){if(Array.isArray(c)){const o=c,i=[Array.from(o),r],s=e(t,[i]);return n(s)}{const t=c;return(c,...r)=>{const o=[Array.from(c),r],i=e(t.styleDefinition.tag,[...t.styleDefinition.styles,o]);return n(i)}}}(t,e,ye,n,...c),$e=be("div",it);t.forEach((t=>{$e[t]=be(t,it)}));const ve=$e,we=be(null,((t,e)=>({type:"global",id:"t"+n(e.reduce(((t,[e])=>t+e.join("")),"")),styles:e,tag:t})));export{ae as ThemeProvider,ve as component,ye as createComponent,we as global,st as keyframes};
2
2
  //# sourceMappingURL=teiler-svelte.esm.js.map