import{c as e,d as t,b as n,H as o,e as s,o as r,g as a,h as l,p as i,j as c,k as p,l as u,m as f,r as h,J as d,A as m,y as v,S as g,D as $,E as b,q as w,F as x,G as y,f as A,i as j}from"./chunk.82446879.js";import{d as k,f as C}from"./chunk.f5a3f321.js";import{a as M}from"./chunk.b01e898f.js";var _=k(function(e){var t=function(){var e=String.fromCharCode,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",o={};function s(e,t){if(!o[e]){o[e]={};for(var n=0;n>>8,n[2*o+1]=a%256}return n},decompressFromUint8Array:function(t){if(null==t)return r.decompress(t);for(var n=new Array(t.length/2),o=0,s=n.length;o>=1}else{for(s=1,o=0;o>=1}0==--u&&(u=Math.pow(2,h),h++),delete l[p]}else for(s=a[p],o=0;o>=1;0==--u&&(u=Math.pow(2,h),h++),a[c]=f++,p=String(i)}if(""!==p){if(Object.prototype.hasOwnProperty.call(l,p)){if(p.charCodeAt(0)<256){for(o=0;o>=1}else{for(s=1,o=0;o>=1}0==--u&&(u=Math.pow(2,h),h++),delete l[p]}else for(s=a[p],o=0;o>=1;0==--u&&(u=Math.pow(2,h),h++)}for(s=2,o=0;o>=1;for(;;){if(m<<=1,v==t-1){d.push(n(m));break}v++}return d.join("")},decompress:function(e){return null==e?"":""==e?null:r._decompress(e.length,32768,function(t){return e.charCodeAt(t)})},_decompress:function(t,n,o){var s,r,a,l,i,c,p,u=[],f=4,h=4,d=3,m="",v=[],g={val:o(0),position:n,index:1};for(s=0;s<3;s+=1)u[s]=s;for(a=0,i=Math.pow(2,2),c=1;c!=i;)l=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=o(g.index++)),a|=(l>0?1:0)*c,c<<=1;switch(a){case 0:for(a=0,i=Math.pow(2,8),c=1;c!=i;)l=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=o(g.index++)),a|=(l>0?1:0)*c,c<<=1;p=e(a);break;case 1:for(a=0,i=Math.pow(2,16),c=1;c!=i;)l=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=o(g.index++)),a|=(l>0?1:0)*c,c<<=1;p=e(a);break;case 2:return""}for(u[3]=p,r=p,v.push(p);;){if(g.index>t)return"";for(a=0,i=Math.pow(2,d),c=1;c!=i;)l=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=o(g.index++)),a|=(l>0?1:0)*c,c<<=1;switch(p=a){case 0:for(a=0,i=Math.pow(2,8),c=1;c!=i;)l=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=o(g.index++)),a|=(l>0?1:0)*c,c<<=1;u[h++]=e(a),p=h-1,f--;break;case 1:for(a=0,i=Math.pow(2,16),c=1;c!=i;)l=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=o(g.index++)),a|=(l>0?1:0)*c,c<<=1;u[h++]=e(a),p=h-1,f--;break;case 2:return v.join("")}if(0==f&&(f=Math.pow(2,d),d++),u[p])m=u[p];else{if(p!==h)return null;m=r+r.charAt(0)}v.push(m),u[h++]=r+m.charAt(0),r=m,0==--f&&(f=Math.pow(2,d),d++)}}};return r}();null!=e&&(e.exports=t)}),P=k(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getParameters=function(e){return t=JSON.stringify(e),_.compressToBase64(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");var t}});C(P);P.getParameters;var E=k(function(e,t){t.__esModule=!0,t.getParameters=P.getParameters});C(E);var O=E.getParameters;function I(e){let t,n,g,$,b,w,x;const y=e[6].default,A=o(y,e,e[5],null);return{c(){t=s("form"),n=s("input"),g=r(),$=s("div"),A&&A.c(),this.h()},l(e){t=a(e,"FORM",{action:!0,method:!0,target:!0});var o=l(t);n=a(o,"INPUT",{type:!0,name:!0,value:!0}),g=i(o),$=a(o,"DIV",{class:!0});var s=l($);A&&A.l(s),s.forEach(c),o.forEach(c),this.h()},h(){p(n,"type","hidden"),p(n,"name","parameters"),n.value=e[1],p($,"class","slot-wrap svelte-7fflr3"),p(t,"action","https://codesandbox.io/api/v1/sandboxes/define"),p(t,"method","POST"),p(t,"target","_blank")},m(o,s){u(o,t,s),f(t,n),f(t,g),f(t,$),A&&A.m($,null),e[7](t),b=!0,w||(x=h($,"click",e[2]),w=!0)},p(e,[t]){(!b||2&t)&&(n.value=e[1]),A&&A.p&&32&t&&d(A,y,e,e[5],t,null,null)},i(e){b||(m(A,e),b=!0)},o(e){v(A,e),b=!1},d(n){n&&c(t),A&&A.d(n),e[7](null),w=!1,x()}}}function T(e,t,n){let o,{title:s="Svelma Example"}=t,{code:r}=t;let a,{$$slots:l={},$$scope:i}=t;return e.$set=(e=>{"title"in e&&n(3,s=e.title),"code"in e&&n(4,r=e.code),"$$scope"in e&&n(5,i=e.$$scope)}),e.$$.update=(()=>{16&e.$$.dirty&&n(1,a=O({files:{"sandbox.config.json":{content:{template:"svelte"}},"index.html":{content:'\n \n \n \n \n'},"index.js":{content:'import App from "./App.svelte";\n\nconst app = new App({\n target: document.body\n});\n\nexport default app;'},"App.svelte":{content:r},"package.json":{content:{name:"svelma-example",version:"1.0.0",devDependencies:{"npm-run-all":"^4.1.5",rollup:"^1.10.1","rollup-plugin-commonjs":"^9.3.4","rollup-plugin-node-resolve":"^4.2.3","rollup-plugin-svelte":"^5.0.3","rollup-plugin-terser":"^4.0.4","sirv-cli":"^0.3.1"},dependencies:{svelte:"latest",svelma:"latest","@fortawesome/fontawesome-free":"latest",bulma:"latest"},scripts:{build:"rollup -c",autobuild:"rollup -c -w",dev:"run-p start:dev autobuild",start:"sirv public","start:dev":"sirv public --dev"}}}}}))}),[o,a,function(){o.submit()},s,r,i,l,function(e){g[e?"unshift":"push"](()=>{n(0,o=e)})}]}class F extends e{constructor(e){super(),t(this,e,T,I,n,{title:3,code:4})}}const U=e=>({}),D=e=>({});function z(e){let t,n,o;return{c(){t=s("div"),n=A("Codesandbox\n "),o=s("i"),this.h()},l(e){t=a(e,"DIV",{class:!0});var s=l(t);n=j(s,"Codesandbox\n "),o=a(s,"I",{class:!0}),l(o).forEach(c),s.forEach(c),this.h()},h(){p(o,"class","icon is-small fas fa-external-link-alt"),p(t,"class","codepen-button svelte-150a96u")},m(e,s){u(e,t,s),f(t,n),f(t,o)},d(e){e&&c(t)}}}function S(e){let t,n,h,g,A,j;const k=new F({props:{code:e[1],$$slots:{default:[z]},$$scope:{ctx:e}}}),C=e[6].preview,_=o(C,e,e[7],D),P=new M({props:{lang:e[0],code:e[1]}});return{c(){t=s("div"),$(k.$$.fragment),n=r(),h=s("div"),_&&_.c(),g=r(),A=s("div"),$(P.$$.fragment),this.h()},l(e){t=a(e,"DIV",{class:!0});var o=l(t);b(k.$$.fragment,o),n=i(o),h=a(o,"DIV",{class:!0});var s=l(h);_&&_.l(s),s.forEach(c),g=i(o),A=a(o,"DIV",{class:!0});var r=l(A);b(P.$$.fragment,r),r.forEach(c),o.forEach(c),this.h()},h(){p(h,"class","preview svelte-150a96u"),p(A,"class","code svelte-150a96u"),p(t,"class","snippet svelte-150a96u"),w(t,"horizontal",e[2])},m(e,o){u(e,t,o),x(k,t,null),f(t,n),f(t,h),_&&_.m(h,null),f(t,g),f(t,A),x(P,A,null),j=!0},p(e,[n]){const o={};2&n&&(o.code=e[1]),128&n&&(o.$$scope={dirty:n,ctx:e}),k.$set(o),_&&_.p&&128&n&&d(_,C,e,e[7],n,U,D);const s={};1&n&&(s.lang=e[0]),2&n&&(s.code=e[1]),P.$set(s),4&n&&w(t,"horizontal",e[2])},i(e){j||(m(k.$$.fragment,e),m(_,e),m(P.$$.fragment,e),j=!0)},o(e){v(k.$$.fragment,e),v(_,e),v(P.$$.fragment,e),j=!1},d(e){e&&c(t),y(k),_&&_.d(e),y(P)}}}function V(e,t,n){let{lang:o="xml"}=t,{code:s}=t,{horizontal:r=!1}=t,a=!1;let{$$slots:l={},$$scope:i}=t;return e.$set=(e=>{"lang"in e&&n(0,o=e.lang),"code"in e&&n(1,s=e.code),"horizontal"in e&&n(2,r=e.horizontal),"$$scope"in e&&n(7,i=e.$$scope)}),[o,s,r,a,function(){a=!0},function(e){e.stopPropagation(),a=!1},l,i]}class B extends e{constructor(e){super(),t(this,e,V,S,n,{lang:0,code:1,horizontal:2})}}export{B as a}; //# sourceMappingURL=chunk.fb378401.js.map