From 968f07749e933f58460c09807074d192019a907d Mon Sep 17 00:00:00 2001 From: michaelsboost Date: Mon, 5 Aug 2024 23:59:58 -0500 Subject: [PATCH] performance improvement --- .DS_Store | Bin 8196 -> 8196 bytes go/.DS_Store | Bin 10244 -> 6148 bytes go/dist/App.js | 2 +- go/dist/App.js.map | 4 +- go/dist/main.css | 6 + go/dist/main.js | 1683 ++++++++++++++++++++++++++++++++++++++++++++ go/index.html | 10 +- go/src/App.js | 2 +- 8 files changed, 1699 insertions(+), 8 deletions(-) create mode 100644 go/dist/main.css create mode 100644 go/dist/main.js diff --git a/.DS_Store b/.DS_Store index 2386946ac24ea391f536b42ad89a24e7896af15f..4c0628ad5b70d583ee12d94dcdf444f791240e21 100644 GIT binary patch delta 42 ycmZp1XmQx!Ej-y$NNBRXNHT|+g{6*ysfEGh1p@YqSw&bjvrBwq+5B6Cof!ZNJ`6$t delta 50 zcmZp1XmQx!EzG!WvVlk;r&x8hfsTTyvB~5G0@92flMe{WGj?uf5n*Q8%qsDNW%GX# Gc4h#J<_{$R diff --git a/go/.DS_Store b/go/.DS_Store index 66999f1d0f66fe1f7f8ed58af0d22f5412ca2fb8..da3963bfce73d1056894b1f8c84e98bb88a04e21 100644 GIT binary patch delta 118 zcmZn(XfcprU|?W$DortDU=RQ@Ie-{Mvv5r;6q~50$jGrVU^g=($7CLX9u6}LOC1GM z3xmxI1gx1hGs@^NE@tQ85M&0b2Lb_ZAmIwqy0P#(^JIP%Pmnr$-QUp zx#!%u=ey_J#|!{qb55%RhyZ{{nNdZi;v9*!vpg;dKBs~xl0Kw{ouQOzr>K5xoOHkl z5C{+m5C{+m5C{;s91x&An z=viS8L?b?p`*f63YN3Q&l_*z5|B8WJo%j)7F7DG&PPsaufB8WF&FJ4y(0e=eAMwNi z%eKu_;aN@f82WHhscf+=S2Zj>>nRwTP9nQ{4NJ3!o9&#XIi7BUH;9rbC6)Oj zBaN%-sw1)5)d#C1BaJI-t0SxGV+RjP;+$yB+Ro%&Gh^8ga1+p924F^!Nr%STlTTzV z)3){ykI9#kl^NIr&Ly|Ap`PrltG{47eS3=Rl)xlQQ;-FfvH|*KVDZJ7*>hM{WV;L& z*yPVTBx$bMQ;yKM3=oK|ra5mQf4(r^p3pwcNt-E(MHUYe3Ykv6g@2$cX($BvmxTbA zrkBYxLS5ZGy?t_0nU$wV-ah0Sw&nEbS%+v+DR(I1+taqyk=0pyZ`w9<8Oup36=~H> z=SNJ%M#|K?hYigg+@U&Y z-O>zePd_a=mTTN*=vk=(tEDbW&FH6QDHY}OuL_0waw%h9&TtPXQBmZ5Eeu5@uM?%dw4KS&pdHTJ5NZ;Y6XI_6;w`GJ*hvNJlZO zyg}`uzr~;N7yMN~VY*N$ z%n{}aVId+c7NSB-SS`ebcA-<~6$bdwg~IOAUog$*t3)RYF8}MdaP-{46~6hF_D!3w zoZvb=lZDgl$~klAMOcijS>JTV8M*Hk+;waic%FY&ym+4Pc}KC=QqWz!ph^yRQ)uY> zi-WZg#L6@ls^Tdoy=bu>5~Q<(O=+$JB-qJwwhUF7HYkf$HQ!}uURgb(AB_!K_vdHWH30bj(I@O3rI;~$fG^^lv|l5^ZF$;2Q52iQ50_R|d1 zKo9M&Che~ow!c!nmChS3Ci1N*npHA0NC5%?0uv%o!doKj`+wWS z|Nke{4;lgl0tBvn1hBL<(b`OQ6s|qRCb4hr5y}IUSz>adoO&u$ob@AsD(rLo^^}>c he
- ${v} + ${v}
${v} diff --git a/go/dist/App.js.map b/go/dist/App.js.map index 3386fb5f..1cb8ae2a 100644 --- a/go/dist/App.js.map +++ b/go/dist/App.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../src/App.js"], - "sourcesContent": ["// Function for reactive state management\nfunction onChange(target, callback, path = []) {\n function createProxy(target, path) {\n if (typeof target !== 'object' || target === null) {\n return target;\n }\n\n return new Proxy(target, {\n set(obj, property, value) {\n const fullPath = [...path, property];\n const oldValue = obj[property];\n const result = Reflect.set(obj, property, createProxy(value, fullPath));\n\n if (oldValue !== value) {\n callback(fullPath, oldValue, value);\n }\n\n return result;\n },\n get(obj, property) {\n const value = obj[property];\n if (typeof value === 'object' && value !== null) {\n return createProxy(value, [...path, property]);\n }\n return value;\n }\n });\n }\n\n return createProxy(target, path);\n}\n\n// Keep project and data in the global scope\nlet app = {\n name: 'kodeWeave',\n author: {\n name: 'Michael Schwartz',\n href: 'https://michaelsboost.com/',\n src: 'imgs/author.jpg'\n },\n version: '1.2',\n url: 'https://github.com/michaelsboost/kodeWeave/',\n license: 'https://github.com/michaelsboost/kodeWeave/blob/main/LICENSE'\n}\nlet p = {\n name: \"App name\",\n version: 0.01,\n title: \"An attractive title\",\n description: \"The most attractive description ever!\",\n author: \"kodeWeave\",\n url: \"https://michaelsboost.com/\",\n meta: \"\",\n libraries: [],\n html_pre_processor: \"html\",\n css_pre_processor: \"css\",\n javascript_pre_processor: \"javascript\",\n html: ``,\n css: ``,\n javascript: ``,\n logo: \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiCiAgIHZpZXdCb3g9IjAgMCA1MTEuOTk5OTkgNTExLjk5OTk5IgogICBoZWlnaHQ9IjUxMiIKICAgd2lkdGg9IjUxMiIKICAgdmVyc2lvbj0iMS4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S4wNTg1NiA0MS45MzgzMywtNjYuMjkxNzggMzguODMwODEsLTcyLjg0MjQ3IC0yLjU1NzU1LC01LjM5MTM2IC0xNS4zNjI2MiwtMTkuNjU4MDkgLTI2LjEzMTI5LC0yOS4xMTU4NyAtMTEuNDU0NTksLTEwLjA2MDE5MSAtMzUuMDY0MTMsLTI1Ljk1MDI3NiAtMzkuOTA2MTIsLTI2Ljg1ODkzNCAtMi45NDE1NCwtMC41NTIwMSAtMy45NzUxOSwtMC4yNDY3ODggLTUuOTE3NjYsMS43NDIyMDEgLTEuMjk1NjQsMS4zMjY2NDggLTIwLjM1MDEyLDMyLjM0ODMwMyAtNDIuMzQwNDgsNjguOTM1NzIzIC0yMS45OTAzNiwzNi41ODc0IC00MS4wNjUzOSw2Ny45OTE2NyAtNDIuMzg2NjUsNjkuNzg3MDIgLTIuNjE5NTQsMy41NTkzNyAtNi43MzI4MSw2LjA5MzA2IC04LjczNDYzLDUuMzc4MzggLTAuOTk5NDcsLTAuMzU2ODMgLTEuMjY2NjUsLTE4LjE3MDM1IC0xLjI2NjY1LC04NC40NDM5NCAwLC00OS41MTMxOTYgLTAuMzc4NjQsLTg0LjIxOTIyNiAtMC45MjM2LC04NC41NTYxMzggLTAuMTE5ODQsLTAuMDc0MSAtMC41MzYwMSwtMC4xMDI0NDYgLTEuMTg3NDgsLTAuMDkyMzggeiIKICAgICAgIGlkPSJwYXRoNDI2MCIgLz4KICA8L2c+Cjwvc3ZnPgo=\",\n console: false,\n dark: true,\n module: true,\n autorun: true,\n pwa: false,\n preview: true,\n activePanel: 'html',\n columns: false,\n columnsRight: true\n};\nlet d = {\n searchLibKey: null,\n librarySuggestions: null,\n iframeSize: null,\n activePanel: 'html',\n selectedSize: 'none',\n compiledJSX: null,\n menuDialog: null,\n settings: null,\n libraries: null,\n safeRender: null,\n demos: null\n};\nconst icons = (function() {\n const SidebarIconCSS = \"h-4 w-4\";\n const navIconCSS = \"h-3 w-3\";\n const modalIconCSS = \"h-4 w-4\";\n const panelIconCSS = \"h-3 w-3\";\n const previewIconCSS = \"h-3 -mt-1\";\n\n return {\n logo: `\n \n \n \n image/svg+xml\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n `,\n twitterfill: `\n \n `,\n twitter: `\n \n `,\n heart: `\n \n `,\n html: `\n \n `,\n css: `\n \n `,\n javascript: `\n \n `,\n columns: `\n \n `,\n leftChev: `\n \n `,\n rightChev: `\n \n `,\n console: `\n \n \n `,\n play: `\n \n `,\n camera: `\n \n \n `,\n cog: `\n \n \n `,\n tidy: `\n \n `,\n rotate: `\n \n `,\n times: `\n \n `,\n file: `\n \n `,\n import: `\n \n `,\n download: `\n \n `,\n codepen: `\n \n `,\n trash: `\n \n `,\n undo: `\n \n `,\n redo: `\n \n `,\n cut: `\n \n `,\n copy: `\n \n `,\n paste: `\n \n `,\n indent: `\n \n `,\n outdent: `\n \n `,\n search: `\n \n `,\n goto: `\n \n `,\n comment: `\n \n `,\n fold: `\n \n `,\n unfold: `\n \n `,\n cursor: `\n \n `\n };\n})();\n\n// Reactive objects\nconst project = onChange(p, (property, oldValue, newValue) => {\n const iframe = document.getElementById('iframe');\n const doc = iframe.contentWindow.document;\n if (oldValue !== newValue) {\n localStorage.setItem('kodeWeave', JSON.stringify(project));\n App.render('#app');\n if (property.toString() === 'activePanel') {\n if (!window.editorManager) return;\n if (project.activePanel === 'html') setActiveEditor(editorManager.htmlEditor)\n if (project.activePanel === 'css') setActiveEditor(editorManager.cssEditor)\n if (project.activePanel === 'javascript') setActiveEditor(editorManager.javascriptEditor)\n }\n if (!App.initialRender) {\n let string = property.toString();\n // diff nodes\n if (string === 'css' || string === 'console') {\n let consoleCSS = `\n [data-zwj=zwjkonsole] {\n display: ${project.console ? 'flex' : 'none'};\n }\n \n ${project.css}`\n doc.getElementById('cuxjju3ew').textContent = consoleCSS;\n\n if (!window.editorManager) return;\n if (string === 'css' && editorManager.cssEditor.state.doc.toString() !== project.css) {\n dispatchChanges(editorManager.cssEditor, project.css);\n }\n }\n // render right away\n if (string === 'html') {\n if (project.autorun) renderPreview(true);\n if (!window.editorManager) return;\n if (window.editorManager.htmlEditor.state.doc.toString() !== project.html) {\n dispatchChanges(editorManager.htmlEditor, project.html);\n }\n }\n\n if (string === 'javascript') {\n if (project.autorun) renderPreview(true);\n if (!window.editorManager) return;\n if (window.editorManager.jsEditor.state.doc.toString() !== project.javascript) {\n dispatchChanges(editorManager.jsEditor, project.javascript);\n }\n }\n\n if (string === 'meta' || string === 'libraries' || string === 'html_pre_processor' || string === 'css_pre_processor' || string === 'javascript_pre_processor') {\n if (project.autorun) renderPreview(true);\n }\n if (string === \"dark\") {\n App.render('#app');\n document.documentElement.setAttribute('data-theme', project.dark ? 'dark' : 'light');\n doc.documentElement.setAttribute('data-theme', project.dark ? 'dark' : 'light');\n document.querySelector('meta[name=apple-mobile-web-app-status-bar-style]').setAttribute('content', project.dark ? 'black-translucent' : 'default');\n document.querySelector('meta[name=theme-color]').setAttribute('content', project.dark ? '#13171f' : '#ffffff');\n document.querySelector('meta[name=msapplication-navbutton-color]').setAttribute('content', project.dark ? '#13171f' : '#ffffff');\n }\n }\n }\n});\nconst data = onChange(d, (property, oldValue, newValue) => {\n // Only render if the actual value has changed\n if (oldValue !== newValue) App.render('#app');\n});\nwindow.project = project;\nwindow.data = data;\n\n// Components\nfunction LeftMenubar() {\n const buttonSize = \"w-full\";\n\n return `
    \n
  • \n \n ${icons.logo}\n \n
  • \n
  • \n \n ${icons.twitter}\n \n
  • \n
  • \n \n ${icons.heart}\n \n
  • \n
\n
    \n
  • \n
    \n
  • \n
  • \n \n ${icons.html}\n \n
  • \n
  • \n \n ${icons.css}\n \n
  • \n
  • \n \n ${icons.javascript}\n \n
  • \n
  • \n
    \n
  • \n
\n
    \n
  • \n \n ${icons.play}\n \n
  • \n
  • \n \n ${icons.console}\n \n
  • \n
  • \n \n ${icons.camera}\n \n
  • \n
  • \n \n ${icons.cog}\n \n
  • \n
`;\n}\nfunction PreviewMenu() {\n const buttonClass = 'border-0 bg-transparent text-sm';\n const selectClass = 'mx-0 my-2 w-auto rounded-md capitalize text-[.6rem]';\n const selectStyle = 'padding: 0.5rem;';\n\n const sizeOptions = {\n Phones: {\n '320x480': 'iPhone 3GS',\n '375x667': 'iPhone 6/7/8',\n '414x736': 'iPhone 6/7/8 Plus',\n '375x812': 'iPhone X/XS/11 Pro',\n '414x896': 'iPhone XR/XS Max/11/11 Pro Max',\n '360x640': 'Samsung Galaxy S5',\n '360x740': 'Samsung Galaxy S8+',\n '1440x3200': 'Samsung Galaxy S21 Ultra',\n '1080x2340': 'Google Pixel 5',\n '1080x2400': 'OnePlus 8 Pro',\n '1440x3200': 'Xiaomi Mi 11 Ultra',\n '1644x3840': 'Sony Xperia 1 III'\n },\n Tablets: {\n '2048x2732': 'iPad Pro 12.9\" (3rd/4th Gen)',\n '2388x1668': 'iPad Pro 11\" (1st/2nd/3rd Gen)',\n '2736x1824': 'Microsoft Surface Pro 7',\n '2800x1752': 'Samsung Galaxy Tab S7+',\n '2560x1600': 'Huawei MatePad Pro',\n '2000x1200': 'Lenovo Tab P11 Pro',\n '1920x1200': 'Amazon Fire HD 10',\n '1536x2048': 'iPad Air (3rd Gen)',\n '1620x2160': 'iPad Air (4th Gen)',\n '1620x2160': 'iPad 10.2\" (8th Gen)',\n '1668x2224': 'iPad Pro 11\" (2021)'\n },\n Desktops: {\n '3840x2160': '4K UHD (3840x2160)',\n '2560x1440': 'WQHD (2560x1440)',\n '1920x1080': 'Full HD (1920x1080)',\n '1366x768': 'Laptop (1366x768)',\n '3440x1440': 'UltraWide QHD (3440x1440)',\n '5120x2880': '5K Retina (5120x2880)',\n '1280x800': 'MacBook (1280x800)',\n '2560x1600': 'MacBook Pro (2560x1600)',\n '2880x1800': 'MacBook Pro Retina (2880x1800)'\n }\n };\n\n const previewSize = ``;\n\n function canTidyShow() {\n if (!project.activePanel) return 'hidden'\n if (project.activePanel) {\n if (project.activePanel === 'html') {\n if (project.html_pre_processor !== 'html') {\n return 'hidden'\n }\n }\n if (project.activePanel === 'css') {\n if (project.css_pre_processor !== 'css') {\n return 'hidden'\n }\n }\n if (project.activePanel === 'javascript') {\n if (project.javascript_pre_processor !== 'javascript') {\n return 'hidden'\n }\n }\n }\n }\n\n return `
\n ${previewSize}\n\n
    \n
  • \n \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n \n
  • \n
  • \n \n ${icons.play}\n \n
  • \n
\n
`;\n}\nconst App = {\n initialRender: true,\n render(container) {\n // Calculate zoom transform based on viewport size and iframe size\n const size = data.selectedSize;\n let viewportWidth, viewportHeight;\n const previewElm = document.getElementById('previewElm');\n if (document.getElementById('previewElm')) {\n viewportWidth = previewElm.clientWidth;\n viewportHeight = previewElm.clientHeight;\n }\n let [width, height] = size.split('x').map(Number);\n\n let menuDialog = `
    \n
  • \n
    \n
    \n \n \"logo\"\n\n \n
    \n About ${app.name}\n
    \n
    \n Version ${app.version}\n
    \n \n Open Source License\n \n
    \n
    \n
  • \n
  • \n
    \n
  • \n
  • \n \n
  • \n
  • \n \n
  • \n
  • \n \n
  • \n
  • \n \n
  • \n
  • \n \n
  • \n
  • \n \n
  • \n
`;\n menuDialog = `\n
\n
\n

\n file menu\n

\n \n
\n
\n ${menuDialog}\n
\n
\n \n
\n
\n
`;\n\n let settingsHTML = `
    \n
  • \n
    \n \n \n
    \n
  • \n
  • \n \n
  • \n
  • \n \n
  • \n
  • \n \n
  • \n
  • \n \n
  • \n
  • \n
    \n
  • \n
  • \n \n\n
    \n ${project.libraries.map((library, index) => `\n \n `).join('')}\n
    \n \n
  • \n
  • \n
    \n
  • \n \n
  • \n
    \n
  • \n
  • \n \n
  • \n
  • \n
    \n
  • \n
  • \n
    \n Project name:\n
    \n \n
  • \n
  • \n
    \n
  • \n
  • \n
    \n Project version:\n
    \n \n
  • \n
  • \n
    \n
  • \n
  • \n
    \n Project title:\n
    \n \n
  • \n
  • \n
    \n
  • \n
  • \n
    \n Project description:\n
    \n \n
  • \n
  • \n
    \n
  • \n
  • \n
    \n Project author:\n
    \n \n
  • \n
  • \n
    \n
  • \n
  • \n
    \n Project url:\n
    \n \n
  • \n
  • \n
    \n
  • \n
  • \n
    \n HTML before closing head tag:\n
    \n \n
  • \n
`;\n settingsHTML = `\n
\n
\n

\n settings\n

\n \n
\n
\n ${settingsHTML}\n
\n
\n \n
\n
\n
`;\n\n let librariesDialog = `\n
\n
\n

\n Search for resources (JQuery, Bootstrap, Foundation...)\n

\n \n
\n
\n
\n \n \n
\n ${data.librarySuggestions && data.searchLibKey ? data.librarySuggestions : ''}\n
\n
\n
\n
\n \n
\n
\n
`;\n const buttonClass = \"grid grid-rows-1 items-center bg-transparent border-0 focus-within:shadow-none\";\n const buttonContentClass = \"flex flex-col justify-between h-full\";\n const imageContentClass = \"grid h-full items-center\";\n const textContentClass = \"capitalize text-center mt-4\";\n \n const frameworks = [\n \"javascript\",\n \"typescript\",\n \"react\",\n \"vue\",\n \"preact\",\n \"angular\",\n \"alpine\",\n \"solid\",\n \"stimulus\",\n \"mithril\",\n \"hyperapp\",\n \"aurelia\",\n \"lit\"\n ]\n \n let buttonHTML = \"\";\n for (const name of frameworks) {\n buttonHTML += `\n
\n
\n \"${name}\"\n
\n
\n ${name}\n
\n
\n `;\n }\n\n let demosDialog = `\n
\n
\n

\n Are you sure you want to start a new project?\n

\n \n
\n
\n
All current data will be lost.
\n
\n
\n ${buttonHTML}\n
\n
\n
\n
\n \n
\n
\n
`;\n \n const html = `\n
\n
\n ${LeftMenubar()}\n
\n \n \n
\n
\n \n
\n
\n\n ${menuDialog}\n ${settingsHTML}\n ${librariesDialog}\n ${demosDialog}\n
`\n \n const element = document.querySelector(container);\n if (!element) return;\n\n // Create a new temporary element to compare\n const parser = new DOMParser();\n const doc = parser.parseFromString(html, 'text/html');\n if (doc.body.innerHTML.trim() === html.trim()) return;\n if (App.initialRender) {\n element.innerHTML = html;\n renderPreview(true);\n App.initialRender = false;\n return false;\n }\n\n // Compare and update only the changed parts\n const currentDoc = element.firstElementChild;\n const newDoc = doc.body.firstElementChild;\n diffNodes(currentDoc, newDoc);\n }\n}\nconst Modal = {\n render({\n large,\n title = \"Are you sure you want to proceed?\",\n content,\n CloseLabel,\n ConfirmLabel,\n onLoad,\n onClose,\n onConfirm\n }) {\n // if (!options) return false;\n const hClass = \"text-lg font-thin m-0\";\n const buttonClass = \"text-xs w-auto px-3 py-2 m-0 capitalize rounded-md\";\n const svgClass = \"w-3\";\n const times = `\n \n `;\n\n const html = `
\n
\n

${title}

\n \n
\n
\n ${content ? content : ''}\n
\n
\n \n ${onConfirm ? `` : ''}\n
\n
`;\n\n const modal = document.createElement('dialog');\n modal.open = true;\n modal.innerHTML = html;\n\n document.body.appendChild(modal);\n if (onLoad && typeof onLoad === 'function') {\n onLoad();\n }\n\n const timesBtn = modal.querySelector('header button');\n const closeBtn = modal.querySelector('footer button:first-child');\n const confirmBtn = modal.querySelector('footer button:last-child');\n\n // Confirm handler function\n timesBtn.onclick = function() {\n if (onClose && typeof onClose === 'function') {\n onClose();\n }\n document.body.removeChild(modal);\n }\n closeBtn.onclick = function() {\n if (onClose && typeof onClose === 'function') {\n onClose();\n }\n document.body.removeChild(modal);\n }\n confirmBtn.onclick = function() {\n if (onConfirm && typeof onConfirm === 'function') {\n onConfirm();\n }\n document.body.removeChild(modal);\n }\n }\n}\nfunction editorNav() {\n const buttonClass = \"border-0 bg-transparent py-1\";\n\n return `
\n \n ${icons.indent}\n \n \n ${icons.outdent}\n \n \n ${icons.undo}\n \n \n ${icons.redo}\n \n \n ${icons.search}\n \n \n ${icons.goto}\n \n
\n\n
\n \n ${icons.comment}\n \n \n ${icons.fold}\n \n \n ${icons.unfold}\n \n \n ${icons.cut}\n \n \n ${icons.copy}\n \n \n ${icons.paste}\n \n \n ${icons.cursor}\n \n
`;\n}\nfunction emptyStorage() {\n // Clear local storage\n localStorage.removeItem('kodeWeave');\n\n // Clear session storage\n sessionStorage.clear();\n\n // Clear cookies\n document.cookie.split(\";\").forEach(function(c) {\n document.cookie = c.trim().split(\"=\")[0] + '=;expires=Thu, 01 Jan 1970 00:00:00 UTC;path=/';\n });\n\n // Clear service worker caches\n if ('caches' in window) {\n caches.keys().then(function(names) {\n for (let name of names) caches.delete(name)\n });\n }\n\n // Unregister all service workers\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.getRegistrations().then(function(registrations) {\n for (let registration of registrations) registration.unregister()\n });\n }\n\n console.log('All saved data, cookies, and service worker caches have been cleared.');\n location.reload();\n}\n\n// editor functions\nconst addLibrary = url => {\n if (!url) {\n project.libraries.push('');\n document.getElementById('librariesBox').innerHTML = renderLibraries();\n return false;\n }\n\n if (!project.libraries.includes(url)) {\n project.libraries.push(url);\n } else {\n console.error(`Library already exists: ${url}`);\n }\n\n if (document.getElementById('librariesBox')) {\n document.getElementById('librariesBox').innerHTML = renderLibraries();\n }\n};\nfunction renderLibraries() {\n return project.libraries.map((library, index) => `\n \n `).join('')\n}\nfunction fetchSuggestions(key) {\n fetch(\n `https://api.cdnjs.com/libraries?search=${key}&fields=filename,description,version`\n )\n .then(response => {\n if (!response.ok) {\n throw new Error(\"Network response was not ok\");\n }\n return response.json();\n })\n .then(item => {\n if (item && item.results && item.results.length > 0) {\n const suggestions = item.results.map(result => result);\n\n data.librarySuggestions = suggestions.map(result => {\n return `\n
\n
\n ${result.name}\n ${result.version}\n
\n
${result.description}

\n
`;\n }).join('');\n }\n })\n .catch(error => {\n console.error(\"Error fetching data:\", error);\n });\n}\nfunction removeScript(src) {\n const script = document.querySelector(`script[src=\"${src}\"]`);\n if (script) script.remove();\n}\nfunction removeScripts(scripts) {\n scripts.forEach(src => {\n const script = document.querySelector(`script[src=\"${src}\"]`);\n if (script) script.remove();\n });\n}\nasync function loadScript(scriptUrl) {\n return new Promise((resolve, reject) => {\n // Check if the script is already loaded\n const existingScript = document.querySelector(`script[src=\"${scriptUrl}\"]`);\n if (existingScript) {\n resolve(); // If the script is already present, resolve immediately\n return;\n }\n\n // Create a new script element if not present\n const scriptElement = document.createElement('script');\n scriptElement.src = scriptUrl;\n scriptElement.onload = resolve; // Resolve when the script is successfully loaded\n scriptElement.onerror = () => reject(new Error(`Failed to load script: ${scriptUrl}`)); // Reject on error\n document.body.appendChild(scriptElement); // Append the script to the body\n });\n}\nasync function loadScripts(srcArray) {\n return Promise.all(srcArray.map(loadScript));\n}\nasync function setPreprocessor(editor, value) {\n const scriptMap = {\n html: {\n markdown: \"libraries/preprocessors/marked.min.js\",\n jade: \"libraries/preprocessors/jade.js\",\n pug: \"libraries/preprocessors/pug.js\"\n },\n css: {\n sass: \"libraries/preprocessors/sass.sync.min.js\",\n less: \"libraries/preprocessors/less.min.js\",\n stylus: \"libraries/preprocessors/stylus.min.js\"\n },\n javascript: {\n typescript: \"libraries/preprocessors/typescript.min.js\",\n babel: \"libraries/preprocessors/babel.min.js\",\n jsxtypescript: [\n \"libraries/preprocessors/typescript.min.js\",\n \"libraries/preprocessors/babel.min.js\"\n ]\n }\n };\n\n const currentPreprocessors = {\n html: project.html_pre_processor,\n css: project.css_pre_processor,\n javascript: project.javascript_pre_processor\n };\n\n try {\n const scriptSrcCondition = (value !== 'html' || value !== 'css' || value !== 'javascript');\n const scriptSrc = scriptSrcCondition ? scriptMap[editor][value] : null;\n\n // Remove the current preprocessor scripts\n if (currentPreprocessors[editor] && scriptSrcCondition) {\n const currentScriptSrc = scriptMap[editor][currentPreprocessors[editor]];\n Array.isArray(currentScriptSrc) ? removeScripts(currentScriptSrc) : removeScript(currentScriptSrc)\n\n // Load the new preprocessor scripts\n if (Array.isArray(scriptSrc)) {\n await loadScripts(scriptSrc);\n } else if (scriptSrc) {\n await loadScript(scriptSrc);\n }\n }\n\n // Set the new preprocessor\n if (editor === 'html') {\n project.html_pre_processor = value;\n // if (!window.editorManager || !window.editorManager.htmlEditor) return;\n // window.editorManager.setMode(project.html_pre_processor === 'html' ? 'html' : value, editorManager.htmlEditor);\n } else if (editor === 'css') {\n project.css_pre_processor = value;\n // if (!window.editorManager || !window.editorManager.cssEditor) return;\n // window.editorManager.setMode(project.css_pre_processor === 'css' ? 'css' : value, editorManager.cssEditor);\n } else if (editor === 'javascript') {\n project.javascript_pre_processor = value;\n if (!window.editorManager || !window.editorManager.jsEditor) return;\n window.editorManager.setMode(project.javascript_pre_processor === 'javascript' ? 'javascript' : value, editorManager.jsEditor);\n }\n } catch (error) {\n console.error('Error setting preprocessor:', error);\n }\n}\nasync function initializePreprocessors() {\n await Promise.all([\n setPreprocessor('html', project.html_pre_processor),\n setPreprocessor('css', project.css_pre_processor),\n setPreprocessor('javascript', project.javascript_pre_processor)\n ]);\n \n if (!window.editorManager) return;\n dispatchChanges(editorManager.htmlEditor, project.html);\n dispatchChanges(editorManager.cssEditor, project.css);\n dispatchChanges(editorManager.jsEditor, project.javascript);\n renderPreview(true);\n}\nasync function loadBeautifyLibraries() {\n const beautifyLibraries = [\n \"libraries/js-beautify/beautify.min.js\",\n \"libraries/js-beautify/beautify-css.min.js\",\n \"libraries/js-beautify/beautify-html.min.js\"\n ];\n await loadScripts(beautifyLibraries);\n}\nasync function removeBeautifyLibraries() {\n const beautifyLibraries = [\n \"libraries/js-beautify/beautify.min.js\",\n \"libraries/js-beautify/beautify-css.min.js\",\n \"libraries/js-beautify/beautify-html.min.js\"\n ];\n removeScripts(beautifyLibraries);\n}\nasync function tidy() {\n await loadBeautifyLibraries();\n\n let formattedCode;\n switch (project.activePanel) {\n case 'html':\n formattedCode = html_beautify(project.html, {\n indent_size: 2,\n max_preserve_newlines: 1\n });\n dispatchChanges(editorManager.htmlEditor, formattedCode);\n break;\n case 'css':\n formattedCode = css_beautify(project.css, {\n indent_size: 2,\n max_preserve_newlines: 1\n });\n project.css = formattedCode;\n dispatchChanges(editorManager.cssEditor, formattedCode);\n break;\n case 'javascript':\n formattedCode = js_beautify(project.javascript, {\n indent_size: 2,\n max_preserve_newlines: 1\n });\n project.javascript = formattedCode;\n dispatchChanges(editorManager.jsEditor, formattedCode);\n break;\n default:\n formattedCode = 'Unknown editor panel.';\n }\n\n await removeBeautifyLibraries();\n}\n\n// iframe functions\nfunction generateId() {\n let id = '';\n while (!/^[a-zA-Z]/.test(id)) {\n id = Math.random().toString(36).substr(2, 9);\n }\n return id;\n}\nfunction resizeCanvas(size) {\n data.selectedSize = size;\n getIFrameClientSize();\n}\nfunction rotateCanvas() {\n const iframe = document.getElementById('previewElm').firstElementChild;\n if (iframe.style.width === '100%') return false;\n\n // Extract current width and height\n let width = parseInt(iframe.style.width);\n let height = parseInt(iframe.style.height);\n\n // Swap width and height\n [width, height] = [height, width];\n\n // Calculate the new transform scale\n const viewportWidth = previewElm.clientWidth;\n const viewportHeight = previewElm.clientHeight;\n const scale = Math.min(viewportWidth / width, viewportHeight / height);\n\n // Apply the new styles\n iframe.style.width = `${width}px`;\n iframe.style.height = `${height}px`;\n iframe.style.transform = `scale(${scale})`;\n iframe.style.marginTop = `-${height / 2}px`;\n iframe.style.marginLeft = `-${width / 2}px`;\n data.selectedSize = width+'x'+height;\n}\nfunction defineScale() {\n const iframe = document.getElementById('previewElm').firstElementChild;\n if (iframe.style.width === '100%') return false;\n\n // Extract current width and height\n let width = parseInt(iframe.style.width);\n let height = parseInt(iframe.style.height);\n\n // Calculate the new transform scale\n const viewportWidth = previewElm.clientWidth;\n const viewportHeight = previewElm.clientHeight;\n const scale = Math.min(viewportWidth / width, viewportHeight / height);\n\n // Apply the new styles\n iframe.style.width = `${width}px`;\n iframe.style.height = `${height}px`;\n iframe.style.transform = `scale(${scale})`;\n iframe.style.marginTop = `-${height / 2}px`;\n iframe.style.marginLeft = `-${width / 2}px`;\n}\nlet fadeTimeout;\nfunction getIFrameClientSize() {\n if (data.selectedSize === 'none') {\n const iframe = document.getElementById('iframe');\n data.iframeSize = `${iframe.clientWidth}px x ${iframe.clientHeight}px`;\n const element = document.getElementById('iframeClientSize');\n \n if (element.classList.contains('hidden')) {\n // Clear existing timeout to prevent multiple calls\n if (fadeTimeout) clearTimeout(fadeTimeout);\n \n // Remove hidden and add opacity-100 to show the element\n element.classList.remove('hidden', 'opacity-0');\n element.classList.add('opacity-100');\n \n // Set a timeout to handle fade-out\n fadeTimeout = setTimeout(() => {\n element.classList.remove('opacity-100');\n element.classList.add('opacity-0');\n \n // Add hidden class after fade-out\n setTimeout(() => {\n element.classList.add('hidden');\n }, 300); // Match the duration of the opacity transition\n }, 2000); // Show duration\n }\n } else {\n defineScale();\n }\n}\nasync function compileCode(detect) {\n try {\n if (detect === 'html') {\n switch (project.html_pre_processor) {\n case 'markdown':\n return marked.parse(project.html);\n case 'jade':\n return jade.render(project.html, { pretty: true });\n case 'pug':\n const appScript = document.getElementById('appScript');\n if (appScript.hasAttribute('type') && appScript.getAttribute('type') === 'module') {\n // import pug from 'libraries/preprocessors/pug.js';\n console.error('Cannot import pug as script is a module!');\n return false;\n }\n\n const pug = require(\"pug\");\n return pug.compile(project.html)({name: this.name });\n default:\n return project.html;\n }\n }\n\n if (detect === 'css') {\n switch (project.css_pre_processor) {\n case 'stylus':\n return stylus.render(project.css);\n case 'less':\n return new Promise((resolve, reject) => {\n less.render(project.css, (err, output) => err ? reject(err) : resolve(output.css));\n });\n case 'sass':\n return new Promise((resolve, reject) => {\n Sass.compile(project.css, result => result.status === 0 ? resolve(result.text) : reject(new Error(result.message)));\n });\n default:\n return project.css;\n }\n }\n\n if (detect === 'javascript') {\n switch (project.javascript_pre_processor) {\n case 'babel':\n if (typeof Babel === 'undefined') {\n await loadScript(\"libraries/preprocessors/babel.min.js\");\n }\n return Babel.transform(project.javascript, { presets: ['env', 'react'] }).code;\n case 'typescript':\n return ts.transpileModule(project.javascript, { compilerOptions: { module: ts.ModuleKind.CommonJS } }).outputText;\n case 'jsxtypescript':\n const result = ts.transpileModule(project.javascript, {\n compilerOptions: { module: ts.ModuleKind.CommonJS, target: ts.ScriptTarget.ES5, jsx: ts.JsxEmit.React }\n }).outputText;\n data.compiledJSX = Babel.transform(result, {\n presets: ['env', 'react']\n }).code;\n return data.compiledJSX;\n default:\n return project.javascript;\n }\n }\n } catch (error) {\n console.error('Error compiling code:', error);\n }\n}\n\n// save functions\nasync function handleLogoChange(event) {\n const file = event.target.files[0];\n if (!file) return; // If no file selected, return\n\n try {\n // Convert file to base64 string\n const base64String = await fileToBase64(file);\n // Update project.logo with base64String\n project.logo = base64String;\n } catch (error) {\n console.error('Error converting image to base64:', error);\n }\n}\nfunction fileToBase64(file) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.readAsDataURL(file);\n reader.onload = () => resolve(reader.result);\n reader.onerror = error => reject(error);\n });\n}\n\nfunction newProject(name) {\n function capitalizeFirstLetter(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n }\n const capitalizedTitle = capitalizeFirstLetter(name);\n setPreprocessor('html', 'html');\n setPreprocessor('css', 'css');\n if (name !== \"typescript\") setPreprocessor('javascript', 'javascript');\n if (name === \"typescript\" || name === \"angular\") setPreprocessor('javascript', 'typescript');\n project.name = `${capitalizedTitle} name`;\n project.version = 0.01;\n project.title = `A Cool ${capitalizedTitle} App`;\n project.description = `A modern ${capitalizedTitle} application!`;\n project.author = \"kodeWeave\";\n project.url = \"https://michaelsboost.com/\";\n project.module = true;\n project.preview = true;\n if (name === 'angular') project.module = false;\n project.pwa = false;\n\n if (name === 'javascript') {\n project.meta = \"\";\n project.libraries = [\n \"https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css\",\n \"https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js\"\n ];\n project.html = `
\n

\uD83D\uDC4B Hello, ${capitalizedTitle}! \uD83C\uDF0E

\n

Counter: 0

\n \n
`;\n project.css = ``;\n project.javascript = `let counter = 0;\nconst counterElement = document.getElementById('counter');\nconst incrementButton = document.getElementById('incrementButton');\n\nincrementButton.addEventListener('click', function() {\n counter++;\n counterElement.textContent = counter;\n});`;\n }\n if (name === 'typescript') {\n project.meta = \"\";\n project.libraries = [\n \"https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css\",\n \"https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js\"\n ];\n project.html = `
\n

\uD83D\uDC4B Hello, ${capitalizedTitle}! \uD83C\uDF0E

\n

Counter: 0

\n \n
`;\n project.css = ``;\n project.javascript = `let counter: number = 0;\nconst counterElement: HTMLElement | null = document.getElementById('counter');\nconst incrementButton: HTMLElement | null = document.getElementById('incrementButton');\n\nif (counterElement && incrementButton) {\n incrementButton.addEventListener('click', function() {\n counter++;\n counterElement.textContent = counter.toString();\n });\n}`;\n }\n if (name === 'react') {\n project.meta = \"\";\n project.libraries = [\n \"https://unpkg.com/react@latest/umd/react.development.js\",\n \"https://unpkg.com/react-dom@latest/umd/react-dom.development.js\",\n \"https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css\",\n \"https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js\"\n ];\n project.html = `
`;\n project.css = ``;\n project.javascript = `/** @jsxRuntime classic */\n/** @jsx React.createElement */\nconst { useState } = React;\n\nfunction App() {\n const [counter, setCounter] = useState(0);\n\n return (\n
\n

\uD83D\uDC4B Hello, ${capitalizedTitle}! \uD83C\uDF0E

\n

Counter: {counter}

\n setCounter(counter + 1)}\n >\n +\n \n
\n );\n}\n\nconst root = ReactDOM.createRoot(document.getElementById('root'));\nroot.render();`;\n }\n if (name === 'vue') {\n project.meta = \"\";\n project.libraries = [\n \"https://cdnjs.cloudflare.com/ajax/libs/vue/3.2.37/vue.global.prod.min.js\",\n \"https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css\",\n \"https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js\"\n ];\n project.html = `
`;\n project.css = ``;\n project.javascript = `const App = {\n data() {\n return {\n counter: 0,\n message: '\uD83D\uDC4B Hello, ${capitalizedTitle}! \uD83C\uDF0E'\n };\n },\n methods: {\n incrementCounter() {\n this.counter++;\n }\n },\n template: \\`\n
\n

{{ message }}

\n

Counter: {{ counter }}

\n \n +\n \n
\n \\`\n};\n\nconst app = Vue.createApp(App);\napp.mount('#root');`;\n }\n if (name === 'preact') {\n project.meta = ``;\n project.libraries = [\n \"https://unpkg.com/preact@latest/dist/preact.min.js\",\n \"https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css\",\n \"https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js\"\n ];\n project.html = `
`;\n project.css = ``;\n project.javascript = `/** @jsx h */\nimport { html, render, useState, useEffect } from 'https://unpkg.com/htm@3.1.1/preact/standalone.module.js';\n\nfunction App() {\n const [counter, setCounter] = useState(0);\n\n return html\\`\n
\n

\uD83D\uDC4B Hello, ${capitalizedTitle}! \uD83C\uDF0E

\n

Counter: \\${counter}

\n setCounter(counter + 1)}\n >\n +\n \n
\n \\`;\n}\n\nrender(html\\`<\\${App} />\\`, document.getElementById('root'));`;\n }\n if (name === 'angularold') {\n project.meta = ``;\n project.libraries = [\n \"https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular.min.js\",\n \"https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css\",\n \"https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js\"\n ];\n project.html = `
\n

\uD83D\uDC4B Hello, ${capitalizedTitle}! \uD83C\uDF0E

\n

Counter: {{counter}}

\n \n +\n \n
`;\n project.css = ``;\n project.javascript = `angular.module('myApp', [])\n .controller('MainController', function($scope) {\n $scope.counter = 0;\n $scope.incrementCounter = function() {\n $scope.counter++;\n };\n });`;\n }\n if (name === 'angular') {\n project.meta = ``;\n project.libraries = [\n \"https://cdnjs.cloudflare.com/ajax/libs/rxjs/6.6.3/rxjs.umd.min.js\",\n \"https://cdnjs.cloudflare.com/ajax/libs/core-js/2.5.7/core.js\",\n \"https://unpkg.com/@angular/core@11.0.5/bundles/core.umd.js\",\n \"https://cdnjs.cloudflare.com/ajax/libs/zone.js/0.10.3/zone.min.js\",\n \"https://unpkg.com/@angular/common@11.0.5/bundles/common.umd.js\",\n \"https://unpkg.com/@angular/compiler@11.0.5/bundles/compiler.umd.js\",\n \"https://unpkg.com/@angular/platform-browser@11.0.5/bundles/platform-browser.umd.js\",\n \"https://unpkg.com/@angular/platform-browser-dynamic@11.0.5/bundles/platform-browser-dynamic.umd.js\",\n \"https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css\",\n \"https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js\"\n ];\n project.html = `Loading...`;\n project.css = ``;\n project.javascript = `const { Component, NgModule, enableProdMode } = ng.core;\nconst { BrowserModule } = ng.platformBrowser;\nconst { platformBrowserDynamic } = ng.platformBrowserDynamic;\n\nenableProdMode();\n\n@Component({\n selector: 'app-root',\n template: \\`\n
\n

\uD83D\uDC4B Hello, ${capitalizedTitle}! \uD83C\uDF0E

\n

Counter: {{ counter }}

\n \n +\n \n
\n \\`,\n})\nclass AppComponent {\n counter = 0;\n \n incrementCounter() {\n this.counter++;\n }\n}\n\n@NgModule({\n declarations: [AppComponent],\n imports: [BrowserModule],\n bootstrap: [AppComponent]\n})\nclass AppModule {}\n\nplatformBrowserDynamic().bootstrapModule(AppModule);`;\n }\n if (name === 'alpine') {\n project.meta = ``;\n project.libraries = [\n \"https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css\",\n \"https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js\"\n ];\n project.html = `
\n
\n

\uD83D\uDC4B Hello, ${capitalizedTitle}! \uD83C\uDF0E

\n

Counter:

\n \n +\n \n
\n
`;\n project.css = ``;\n project.javascript = ``;\n }\n if (name === 'solid') {\n project.meta = ``;\n project.libraries = [\n \"https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css\",\n \"https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js\"\n ];\n project.html = `
`;\n project.css = ``;\n project.javascript = `import { createSignal } from \"https://cdn.skypack.dev/solid-js@1.2.6\";\nimport { render } from \"https://cdn.skypack.dev/solid-js@1.2.6/web\";\nimport html from \"https://cdn.skypack.dev/solid-js@1.2.6/html\";\n\nfunction Counter() {\n const [count, setCount] = createSignal(0);\n const increment = () => setCount(count() + 1);\n\n return html\\`\n
\n

\uD83D\uDC4B Hello, ${capitalizedTitle}! \uD83C\uDF0E

\n

Counter: \\${count}

\n \n
\n \\`;\n}\n\nrender(Counter, document.getElementById(\"root\"));`;\n }\n if (name === 'stimulus') {\n project.meta = \"\";\n project.libraries = [\n \"https://cdn.jsdelivr.net/npm/@hotwired/stimulus@3.1.0/dist/stimulus.umd.js\",\n \"https://cdn.jsdelivr.net/npm/@hotwired/stimulus-loading@1.0.0/dist/stimulus-loading.umd.js\",\n \"https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css\",\n \"https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js\"\n ];\n project.html = `
\n

\uD83D\uDC4B Hello, ${capitalizedTitle}! \uD83C\uDF0E

\n

Counter: 0

\n counter#increment\"\n class=\"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-700 transition\"\n >\n +\n \n
`;\n project.css = ``;\n project.javascript = `const application = Stimulus.Application.start();\n\napplication.register('counter', class extends Stimulus.Controller {\n static targets = ['output'];\n\n initialize() {\n this.counter = 0;\n }\n\n increment() {\n this.counter += 1;\n this.outputTarget.textContent = this.counter;\n }\n});`;\n }\n if (name === 'mithril') {\n project.meta = \"\";\n project.libraries = [\n \"https://cdn.jsdelivr.net/npm/mithril@2.0.4/mithril.min.js\",\n \"https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css\",\n \"https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js\"\n ];\n project.html = `
`;\n project.css = ``;\n project.javascript = `import htm from 'https://unpkg.com/htm?module'\nconst html = htm.bind(m)\n\nconst app = () => {\n let count = 0\n \n return {\n view: () => html\\`\n
\n

\uD83D\uDC4B Hello, Mithril! \uD83C\uDF0E

\n

Counter: \\${count}

\n \n
\\`\n }\n}\n\nm.mount(document.getElementById('root'), app)`;\n }\n if (name === 'hyperapp') {\n project.meta = ``;\n project.libraries = [\n \"https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css\",\n \"https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js\"\n ];\n project.html = `

`;\n project.css = ``;\n project.javascript = `import { app } from 'https://unpkg.com/hyperapp';\nimport html from 'https://unpkg.com/hyperlit';\n\napp({\n init: 0,\n view: count => html\\`\n
\n

\uD83D\uDC4B Hello, Hyperapp! \uD83C\uDF0E

\n

Counter: \\${count}

\n \n
\\`,\n node: document.getElementById('root')\n})`;\n }\n if (name === 'aurelia') {\n project.meta = '';\n project.libraries = [\n \"https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css\",\n \"https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js\"\n ];\n project.html = ``;\n project.css = ``;\n project.javascript = `class App {\n static $view() {\n return document.querySelector('#root');\n }\n constructor() {\n this.message = '${capitalizedTitle}';\n this.counter = 0;\n }\n incrementCounter() {\n this.counter++;\n document.getElementById('counter').textContent = this.counter;\n }\n}\n\nau.start({ root: App });`;\n }\n if (name === 'lit') {\n project.meta = \"\";\n project.libraries = [\n \"https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css\"\n ];\n project.html = ``;\n project.css = ``;\n project.javascript = `import {LitElement, html} from 'https://cdn.jsdelivr.net/gh/lit/dist@2/core/lit-core.min.js';\n \nclass MyElement extends LitElement {\n static properties = {\n counter: { type: Number }\n };\n\n constructor() {\n super();\n this.counter = 0;\n }\n\n incrementCounter() {\n this.counter++;\n }\n\n render() {\n return html\\`\n
\n

\uD83D\uDC4B Hello, ${capitalizedTitle}! \uD83C\uDF0E

\n

Counter: \\${this.counter}

\n \n
\n \\`;\n }\n}\ncustomElements.define('my-element', MyElement);`;\n }\n\n dispatchChanges(editorManager.htmlEditor, project.html);\n dispatchChanges(editorManager.cssEditor, project.css);\n dispatchChanges(editorManager.jsEditor, project.javascript);\n if (name === 'react') setPreprocessor('javascript', 'babel');\n data.demos = false;\n renderPreview(true);\n}\nfunction importJSON(obj) {\n if (obj === null) return;\n project.obj = {};\n if (data.safeRender) data.safeRender = null;\n setPreprocessor('html', obj.html_pre_processor);\n setPreprocessor('css', obj.css_pre_processor);\n setPreprocessor('javascript', obj.javascript_pre_processor);\n project.name = obj.name;\n project.version = obj.version;\n project.title = obj.title;\n project.description = obj.description;\n project.author = obj.author;\n project.url = obj.url;\n project.logo = obj.logo;\n project.console = obj.console;\n project.dark = obj.dark;\n project.module = obj.module;\n project.autorun = obj.autorun;\n project.pwa = obj.pwa;\n project.activePanel = obj.activePanel;\n project.preview = obj.preview;\n project.columns = obj.columns;\n project.columnsRight = obj.columnsRight;\n \n project.meta = obj.meta;\n project.libraries = obj.libraries;\n project.html = obj.html;\n project.css = obj.css;\n project.javascript = obj.javascript;\n\n // Dispatch changes to editors\n if (window.editorManager) {\n dispatchChanges(editorManager.htmlEditor, project.html);\n dispatchChanges(editorManager.cssEditor, project.css);\n dispatchChanges(editorManager.jsEditor, project.javascript);\n }\n\n data.safeRender = true;\n renderPreview(true);\n}\nfunction importProject() {\n Modal.render({\n title: \"Are you sure you want to load a new project?\",\n content: `
All current data will be lost.
`,\n onClose: function () {\n data.menuDialog = true;\n },\n onConfirm: function() {\n const input = document.createElement('input');\n input.type = 'file';\n input.accept = '.json';\n\n input.addEventListener('change', (event) => {\n const file = event.target.files[0];\n \n if (!file) {\n console.error('No file selected.');\n return;\n }\n \n const reader = new FileReader();\n \n reader.onload = event => {\n try {\n importJSON(JSON.parse(event.target.result));\n } catch (error) {\n console.error('Error parsing JSON file:', error);\n }\n };\n \n reader.readAsText(file);\n input.remove();\n });\n \n input.click();\n }\n });\n}\n\nfunction getFileNameAndType(url) {\n // Extract the file name with extension from the URL\n const fileName = url.substring(url.lastIndexOf('/') + 1);\n \n // Extract the file extension\n const fileExtension = fileName.split('.').pop().toLowerCase();\n \n // Map file extensions to MIME types\n const mimeTypes = {\n 'jpeg': 'image/jpeg',\n 'jpg': 'image/jpeg',\n 'png': 'image/png',\n 'gif': 'image/gif',\n 'bmp': 'image/bmp',\n 'webp': 'image/webp',\n 'svg': 'image/svg+xml',\n 'mp3': 'audio/mpeg',\n 'wav': 'audio/wav',\n 'ogg': 'audio/ogg',\n 'mp4': 'video/mp4',\n 'webm': 'video/webm',\n 'ogv': 'video/ogg'\n };\n \n // Get the MIME type based on the file extension\n const fileType = mimeTypes[fileExtension] || 'application/octet-stream';\n \n return {\n fileName,\n fileType\n };\n}\nfunction fetchResources(obj) {\n try {\n const doc = new DOMParser().parseFromString(obj.html, 'text/html');\n const body = doc.body;\n\n const imageUrls = [];\n const audioUrls = [];\n const vectors = [];\n const videoUrls = [];\n\n // Extract image URLs\n body.querySelectorAll('img').forEach(img => {\n if (img.hasAttribute('src')) {\n imageUrls.push(img.getAttribute('src'));\n img.src = `imgs/${getFileNameAndType(img.getAttribute('src')).fileName}`;\n }\n });\n\n // Extract audio URLs\n body.querySelectorAll('audio').forEach(audio => {\n audio.querySelectorAll('source').forEach(source => {\n if (source.hasAttribute('src')) {\n audioUrls.push(source.getAttribute('src'));\n source.src = `audios/${getFileNameAndType(source.getAttribute('src')).fileName}`;\n }\n });\n });\n\n // Extract vectors\n body.querySelectorAll('svg').forEach(svg => {\n vectors.push(svg.outerHTML);\n });\n\n // Extract video URLs\n body.querySelectorAll('video').forEach(video => {\n video.querySelectorAll('source').forEach(source => {\n if (source.hasAttribute('src')) {\n videoUrls.push(source.getAttribute('src'));\n source.src = `vids/${getFileNameAndType(source.getAttribute('src')).fileName}`;\n }\n });\n });\n\n return {\n imageUrls,\n audioUrls,\n vectors,\n videoUrls\n };\n } catch (error) {\n console.error('Error fetching resources:', error);\n return null; // Or handle the error in an appropriate way\n }\n}\nasync function getBase64Media(mediaUrl) {\n const response = await fetch(mediaUrl);\n const blob = await response.blob();\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onloadend = () => resolve(reader.result.split(',')[1]);\n reader.onerror = reject;\n reader.readAsDataURL(blob);\n });\n}\nasync function downloadJSON() {\n try {\n await loadScript(\"libraries/jszip/FileSaver.min.js\");\n let blob = new Blob([JSON.stringify(project, null, 2)], {type: \"application/json\"});\n saveAs(blob, `${project.name.split(' ').join('').toLowerCase()}-kodeWeave.json`);\n\n } catch (error) {\n console.error('Error:', error);\n } finally {\n // Clean up scripts after use\n removeScript(\"libraries/jszip/FileSaver.min.js\");\n }\n}\nasync function downloadProject() {\n try {\n await loadScripts([\n \"libraries/jszip/jszip.min.js\",\n \"libraries/jszip/FileSaver.min.js\"\n ]);\n \n let { imageUrls, audioUrls, vectors, videoUrls } = fetchResources(project);\n\n // Extract srcset URLs\n const iframe = document.getElementById('iframe');\n if (!iframe) return;\n\n const idoc = iframe.contentDocument || iframe.contentWindow.document;\n const srcsetUrls = idoc.querySelectorAll('img[srcset]').forEach(img => {\n img.srcset.split(',').forEach(srcset => {\n const url = srcset.trim().split(' ')[0];\n imageUrls.push(url);\n });\n });\n\n function extractBackgroundImageUrls(css) {\n const urls = [];\n const regex = /background-image\\s*:\\s*url\\(([^)]+)\\)/g;\n let match;\n while ((match = regex.exec(css)) !== null) {\n let url = match[1].replace(/['\"]/g, \"\"); // Remove quotes around URLs\n if (!url.startsWith(\"data:\")) {\n urls.push(url);\n }\n }\n return urls;\n }\n \n // Extract background-image URLs from project CSS\n const backgroundUrls = extractBackgroundImageUrls(await compileCode('css'));\n imageUrls = imageUrls.concat(backgroundUrls); // Add to image URLs to download\n\n const zip = new JSZip();\n\n // Project file\n zip.file(`${project.name.split(' ').join('').toLowerCase()}-kodeWeave.json`, JSON.stringify(project, null, 2));\n\n function checkCSSDependencies() {\n if (project.css.trim() !== '') {\n return `\n \"postcss\": \"^8.4.6\",\n \"autoprefixer\": \"^10.4.2\",\n \"cssnano\": \"^5.0.12\"`;\n }\n return '';\n }\n \n function checkJSDependencies() {\n if (project.javascript_pre_processor === 'babel' || project.javascript_pre_processor === 'jsxtypescript') {\n return `,\n \"@babel/core\": \"^7.15.5\",\n \"@babel/preset-env\": \"^7.15.6\",\n \"@babel/preset-react\": \"^7.14.5\",\n \"rollup-plugin-babel\": \"^4.4.0\"`;\n }\n if (project.javascript_pre_processor === 'typescript' || project.javascript_pre_processor === 'jsxtypescript') {\n return `,\n \"rollup-plugin-typescript2\": \"^0.31.1\",\n \"typescript\": \"^4.4.3\"`;\n }\n return '';\n }\n \n // Nodejs Package JSON\n let nodeStr = `{\n \"name\": \"${project.name.toLowerCase().split(' ').join('')}\",\n \"version\": \"${project.version}\",\n \"type\": \"module\",\n \"scripts\": {\n ${project.css.trim() !== '' ? `\"build:css\": \"postcss src/styles.css -o dist/styles.min.css\",\n ` : ''}\"build:js\": \"rollup -c && terser dist/script.js -o dist/script.min.js\",\n \"build\": \"${project.css.trim() !== '' ? 'npm run build:css && ' : ''}npm run build:js\",\n \"serve\": \"http-server -c-1 -p 8081\"\n },\n \"devDependencies\": {\n \"rollup\": \"^2.79.1\",\n \"rollup-plugin-terser\": \"^7.0.2\",\n \"terser\": \"^5.10.0\",\n \"http-server\": \"^14.1.1\"${checkCSSDependencies()}${checkJSDependencies()}\n }\n}`;\n zip.file(\"package.json\", nodeStr);\n \n // Rollup Configuration\n let rollupPlugins = `import { terser } from 'rollup-plugin-terser';\n`;\n \n if (project.javascript_pre_processor === 'babel' || project.javascript_pre_processor === 'jsxtypescript') {\n rollupPlugins += `import babel from 'rollup-plugin-babel';\n`;\n }\n \n if (project.javascript_pre_processor === 'typescript' || project.javascript_pre_processor === 'jsxtypescript') {\n rollupPlugins += `import typescript from 'rollup-plugin-typescript2';\n`;\n }\n \n let rollupStr = `${rollupPlugins}\nexport default {\n ${project.javascript_pre_processor === 'typescript' || project.javascript_pre_processor === 'jsxtypescript' ? \"input: 'src/script.ts', // entry point for your TypeScript\" : \"input: 'src/script.js', // entry point to your Javascript\"}\n output: {\n file: 'dist/script.js',\n format: ${project.module ? \"'es'\" : \"'iife'\"}, // Immediately Invoked Function Expression, suitable for \n `;\n const swjs = `// Service worker code\nimportScripts('https://storage.googleapis.com/workbox-cdn/releases/6.4.1/workbox-sw.js');\n\nconst { registerRoute } = workbox.routing;\nconst { CacheFirst } = workbox.strategies;\n\nconst cacheName = '${project.name.split(' ').join('')}-cache';\n\nworkbox.routing.registerRoute(\n({ request }) => request.destination === 'script' ||\n request.destination === 'style' ||\n request.destination === 'document' ||\n request.destination === 'image' ||\n request.destination === 'font' ||\n request.destination === 'audio' ||\n request.destination === 'video',\nnew CacheFirst({\ncacheName: cacheName,\nplugins: [\n// Any additional plugins can be added here\n],\n})\n);`\n zip.file(\"dist/sw.js\", swjs);\n }\n\n // Iterate over each library\n let scriptTags = '';\n let cssTags = '';\n project.libraries.forEach(library => {\n if (library.endsWith('.js')) {\n scriptTags += `\\n `;\n } else if (library.endsWith('.css')) {\n cssTags += `\\n `;\n } else {\n // Assuming it's a Google font\n cssTags += `\\n `;\n }\n });\n \n // Add index.html\n const indexHtmlContentCompiled = `\n\n \n ${project.title}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ${cssTags}${project.css ? '' : ''}\n ${project.meta ? `${project.meta}\\n ` : ''}\n ${scriptTags ? scriptTags : ''}\n \n \n\n${await compileCode('html')}\n\n${project.javascript ? '' : ''}\n${(project.pwa ? swinit : '')}\n \n`;\n if (project.html_pre_processor === 'html') zip.file('src/index.html', project.html);\n if (project.html_pre_processor === 'html') zip.file('index.html', indexHtmlContentCompiled);\n if (project.html_pre_processor === 'markdown') zip.file('src/index.md', project.html);\n if (project.html_pre_processor === 'markdown') zip.file('index.html', indexHtmlContentCompiled);\n if (project.html_pre_processor === 'pug') zip.file('src/index.pug', project.html);\n if (project.html_pre_processor === 'pug') zip.file('index.html', indexHtmlContentCompiled);\n if (project.html_pre_processor === 'jade') zip.file('src/index.jade', project.html);\n if (project.html_pre_processor === 'jade') zip.file('index.html', indexHtmlContentCompiled);\n\n // Create a folder \"imgs\" and add images inside it with their correct MIME types\n if (audioUrls.length > 0) {\n const audioFolder = zip.folder('audios');\n try {\n for (const audioUrl of audioUrls) {\n const base64Audio = await getBase64Media(audioUrl);\n audioFolder.file(audioUrl.substring(audioUrl.lastIndexOf('/') + 1), base64Audio, { base64: true });\n }\n } catch (error) {\n console.error('Error adding audio to ZIP:', error);\n return;\n }\n }\n if (imageUrls.length > 0) {\n const imgFolder = zip.folder('imgs');\n try {\n // Convert each image URL to Base64 and add to ZIP folder\n for (const imageUrl of imageUrls) {\n const base64Image = await getBase64Media(imageUrl);\n imgFolder.file(imageUrl.substring(imageUrl.lastIndexOf('/') + 1), base64Image, { base64: true });\n }\n } catch (error) {\n console.error('Error adding images to ZIP:', error);\n return; // Exit method or handle error as needed\n }\n }\n if (vectors.length > 0) {\n const svgFolder = zip.folder('svgs');\n try {\n // Convert each SVG to a file inside the 'svgs' folder\n vectors.forEach((svg, index) => {\n svgFolder.file(`vector-${index + 1}.svg`, svg);\n });\n } catch (error) {\n console.error('Error adding images to ZIP:', error);\n return; // Exit method or handle error as needed\n }\n }\n if (videoUrls.length > 0) {\n const videoFolder = zip.folder('vids');\n try {\n for (const videoUrl of videoUrls) {\n const base64Video = await getBase64Media(videoUrl);\n videoFolder.file(videoUrl.substring(videoUrl.lastIndexOf('/') + 1), base64Video, { base64: true });\n }\n } catch (error) {\n console.error('Error adding videos to ZIP:', error);\n return;\n }\n }\n\n // Generate the ZIP file\n const blob = await zip.generateAsync({ type: 'blob' });\n saveAs(blob, `${project.name.toLowerCase().split(' ').join('')}.zip`);\n \n // Clear all arrays after saving\n imageUrls.length = audioUrls.length = videoUrls.length = 0;\n } catch (error) {\n console.error('Error:', error);\n } finally {\n // Clean up scripts after use\n const scriptsToRemove = [\n 'libraries/jszip/FileSaver.min.js',\n 'libraries/jszip/jszip.min.js'\n ];\n\n removeScripts(scriptsToRemove);\n }\n}\nasync function share() {\n try {\n // Compile code if necessary\n const javascriptCode = project.javascript_pre_processor === 'jsxtypescript'\n ? data.compiledJSX\n : project.javascript;\n\n let jsPreprocessor = null;\n if (project.javascript_pre_processor === 'jsxtypescript' || project.javascript_pre_processor === 'javascript') {\n jsPreprocessor = \"none\";\n } else {\n jsPreprocessor = project.javascript_pre_processor;\n }\n\n const shareProject = {\n title: project.title,\n description: project.description,\n head: project.meta,\n html: project.html,\n html_pre_processor: project.html_pre_processor === \"html\" ? \"none\" : \"\",\n css: project.css,\n css_pre_processor: project.css_pre_processor === \"css\" ? \"none\" : \"\",\n css_external: project.libraries.filter(lib => lib.endsWith('.css')).join(';'),\n css_starter: \"neither\",\n css_prefix: \"neither\",\n js_module: project.module,\n js: javascriptCode,\n js_pre_processor: jsPreprocessor,\n js_external: project.libraries.filter(lib => lib.endsWith('.js')).join(';'),\n editors: '111',\n layout: 'left'\n };\n\n // Stringify the JSON object and escape quotes\n const JSONstring = JSON.stringify(shareProject)\n .replace(/\"/g, \""\")\n .replace(/'/g, \"'\");\n\n // Create form element\n const form = `\n
\n \n \n
`;\n\n // Append form to the document body and submit\n document.body.insertAdjacentHTML('beforeend', form);\n document.querySelector('form').submit();\n document.querySelector('form').remove();\n } catch (error) {\n console.error('Error sharing project:', error);\n }\n}\n\nasync function screenshot() {\n const iframe = document.getElementById('iframe');\n const iframeDocument = iframe.contentDocument || iframe.contentWindow.document;\n\n try {\n await loadScripts([\n \"libraries/html2canvas/html2canvas.min.js\",\n \"libraries/jszip/FileSaver.min.js\"\n ]);\n \n html2canvas(iframeDocument.documentElement).then(canvas => {\n const context = canvas.getContext('2d');\n const videoElements = iframeDocument.getElementsByTagName('video');\n\n // Draw video elements\n Array.from(videoElements).forEach(video => {\n const { currentTime, paused, volume } = video;\n\n // Set volume to 0 for the screenshot process\n video.volume = 0;\n\n // Draw the video frame\n if (!paused) video.pause();\n context.drawImage(video, video.offsetLeft, video.offsetTop, video.clientWidth, video.clientHeight);\n\n // Restore the original volume and playback state\n video.volume = volume;\n video.currentTime = currentTime;\n if (!paused) video.play();\n });\n\n // Convert canvas to Blob\n canvas.toBlob(blob => {\n // Save the Blob using FileSaver.js\n saveAs(blob, 'screenshot.png');\n }, 'image/png');\n }).catch(error => {\n console.error('Error taking screenshot:', error);\n });\n } catch (error) {\n console.error('Error:', error);\n } finally {\n // Clean up scripts after use\n removeScript(\"../libraries/html2canvas/html2canvas.min.js\");\n removeScript(\"../libraries/jszip/FileSaver.min.js\");\n }\n}\nasync function renderPreview(forceRun = false) {\n if (!forceRun || !project.autorun || !data.safeRender) return;\n\n if (data.safeRender) {\n let scriptTags = '';\n let cssTags = '';\n project.libraries.forEach(library => {\n if (library.endsWith('.js')) {\n scriptTags += `\\n `;\n } else if (library.endsWith('.css')) {\n cssTags += `\\n `;\n } else {\n cssTags += `\\n `;\n }\n });\n\n const javascriptCode = await compileCode('javascript');\n const cssCode = await compileCode('css');\n const consoleCSS = `\n [data-zwj=zwjkonsole] {\n display: ${project.console ? 'flex' : 'none'};\n }`\n const iframeSrc = `\n \n ${project.title}\n \n \n \n \n ${project.meta ? project.meta : ''}\n ${cssTags}\n \n \n \n \n ${await compileCode('html')}\n ${scriptTags ? scriptTags : ''}\n ${project.css_pre_processor === 'less' ? '' : ''}\n \n`;\n\n const iframe = document.getElementById('iframe');\n if (!iframe) return;\n\n const parser = new DOMParser();\n const doc = parser.parseFromString(iframeSrc, 'text/html');\n const idoc = iframe.contentDocument || iframe.contentWindow.document;\n\n if (!forceRun && !App.initialRender) {\n diffNodes(idoc.documentElement, doc.documentElement);\n return false;\n } else {\n iframe.setAttribute('srcdoc', iframeSrc);\n iframe.onload = () => {\n // Initialize script within the iframe\n const idoc = iframe.contentDocument || iframe.contentWindow.document;\n const script = idoc.createElement('script');\n script.id = \"zzkiapxab\";\n script.type = project.module ? 'module' : 'text/javascript';\n script.textContent = javascriptCode;\n idoc.body.appendChild(script);\n };\n }\n }\n}\n\n// Make functions available in global space\nwindow.Modal = Modal;\nwindow.emptyStorage = emptyStorage;\nwindow.addLibrary = addLibrary;\nwindow.fetchSuggestions = fetchSuggestions;\nwindow.setPreprocessor = setPreprocessor;\nwindow.initializePreprocessors = initializePreprocessors;\nwindow.loadBeautifyLibraries = loadBeautifyLibraries\nwindow.removeBeautifyLibraries = removeBeautifyLibraries;\nwindow.tidy = tidy;\nwindow.generateId = generateId;\nwindow.resizeCanvas = resizeCanvas;\nwindow.rotateCanvas = rotateCanvas;\nwindow.defineScale = defineScale;\nwindow.getIFrameClientSize = getIFrameClientSize;\nwindow.handleLogoChange = handleLogoChange;\nwindow.newProject = newProject;\nwindow.importProject = importProject;\nwindow.downloadJSON = downloadJSON;\nwindow.downloadProject = downloadProject;\nwindow.share = share;\nwindow.screenshot = screenshot;\nwindow.renderPreview = renderPreview;\n\n// Diffing algorithm to update ui when changes occur\nfunction diffNodes(oldNode, newNode) {\n if (!oldNode || !newNode) {\n return;\n }\n\n // Check for data-ignore attribute\n if (oldNode.hasAttribute && oldNode.hasAttribute('data-ignore') || \n newNode.hasAttribute && newNode.hasAttribute('data-ignore')) {\n return;\n }\n\n // Check if nodes are iframe elements\n if (oldNode.nodeName === 'IFRAME' && newNode.nodeName === 'IFRAME') {\n const acceptableIframeAttributes = ['id', 'title', 'class', 'style', 'sandbox'];\n // Compare acceptable attributes only\n acceptableIframeAttributes.forEach(attr => {\n if (oldNode.getAttribute(attr) !== newNode.getAttribute(attr)) {\n oldNode.setAttribute(attr, newNode.getAttribute(attr));\n }\n });\n\n const oldSrcdoc = oldNode.getAttribute('srcdoc');\n const newSrcdoc = newNode.getAttribute('srcdoc');\n // Ignore srcdoc attribute if it hasn't changed\n if (oldSrcdoc === newSrcdoc) return;\n return;\n }\n\n // If nodes are different types, replace the old node\n if (oldNode.nodeName !== newNode.nodeName) {\n oldNode.replaceWith(newNode.cloneNode(true));\n // console.log('Different node names:', oldNode, newNode);\n return;\n }\n\n // Diff the attributes of the nodes\n if (oldNode.nodeType === Node.ELEMENT_NODE && newNode.nodeType === Node.ELEMENT_NODE) {\n const oldAttributes = Array.from(oldNode.attributes);\n const newAttributes = Array.from(newNode.attributes);\n\n // Remove old attributes not present in the new node\n oldAttributes.forEach(attr => {\n if (!newNode.hasAttribute(attr.name)) {\n oldNode.removeAttribute(attr.name);\n }\n });\n\n // Add or update attributes from the new node\n newAttributes.forEach(attr => {\n if (oldNode.getAttribute(attr.name) !== attr.value) {\n oldNode.setAttribute(attr.name, attr.value);\n }\n });\n }\n\n const oldChildren = Array.from(oldNode.childNodes);\n const newChildren = Array.from(newNode.childNodes);\n\n // Update or remove existing child nodes\n oldChildren.forEach((oldChild, index) => {\n const newChild = newChildren[index];\n if (!newChild) {\n oldNode.removeChild(oldChild);\n return;\n }\n // Special handling for elements\n if (oldNode.tagName === 'TITLE' || oldNode.tagName === 'STYLE' && oldNode.textContent !== newNode.textContent) {\n oldNode.textContent = newNode.textContent;\n } else if (oldChild.nodeType === Node.TEXT_NODE && oldChild.nodeValue !== newChild.nodeValue) {\n oldChild.nodeValue = newChild.nodeValue;\n }\n diffNodes(oldChild, newChild);\n });\n\n // Add new child nodes\n newChildren.slice(oldChildren.length).forEach(newChild => {\n oldNode.appendChild(newChild.cloneNode(true));\n });\n}\n\n// Once dom has loaded init functions\ndocument.addEventListener('DOMContentLoaded', function() {\n window.onload = () => {\n App.render('#app');\n if (window.initEditors) initEditors();\n getIFrameClientSize();\n\n if (localStorage.getItem('kodeWeave')) {\n setTimeout(function() {\n importJSON(JSON.parse(localStorage.getItem('kodeWeave')));\n }, 100);\n } else {\n data.safeRender = true;\n }\n }\n window.onresize = () => getIFrameClientSize();\n});"], - "mappings": "gQACA,SAASA,EAASC,EAAQC,EAAUC,EAAO,CAAC,EAAG,CAC7C,SAASC,EAAYH,EAAQE,EAAM,CACjC,OAAI,OAAOF,GAAW,UAAYA,IAAW,KACpCA,EAGF,IAAI,MAAMA,EAAQ,CACvB,IAAII,EAAKC,EAAUC,EAAO,CACxB,IAAMC,EAAW,CAAC,GAAGL,EAAMG,CAAQ,EAC7BG,EAAWJ,EAAIC,CAAQ,EACvBI,EAAS,QAAQ,IAAIL,EAAKC,EAAUF,EAAYG,EAAO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IAAM,CACpBjN,EAAI,OAAO,MAAM,EACb,OAAO,aAAa,YAAY,EACpCgG,EAAoB,EAEhB,aAAa,QAAQ,WAAW,EAClC,WAAW,UAAW,CACpBoB,GAAW,KAAK,MAAM,aAAa,QAAQ,WAAW,CAAC,CAAC,CAC1D,EAAG,GAAG,EAENhH,EAAK,WAAa,EAEtB,EACA,OAAO,SAAW,IAAM4F,EAAoB,CAC9C,CAAC", + "sourcesContent": ["// Function for reactive state management\nfunction onChange(target, callback, path = []) {\n function createProxy(target, path) {\n if (typeof target !== 'object' || target === null) {\n return target;\n }\n\n return new Proxy(target, {\n set(obj, property, value) {\n const fullPath = [...path, property];\n const oldValue = obj[property];\n const result = Reflect.set(obj, property, createProxy(value, fullPath));\n\n if (oldValue !== value) {\n callback(fullPath, oldValue, value);\n }\n\n return result;\n },\n get(obj, property) {\n const value = obj[property];\n if (typeof value === 'object' && value !== null) {\n return createProxy(value, [...path, property]);\n }\n return value;\n }\n });\n }\n\n return createProxy(target, path);\n}\n\n// Keep project and data in the global scope\nlet app = {\n name: 'kodeWeave',\n author: {\n name: 'Michael Schwartz',\n href: 'https://michaelsboost.com/',\n src: 'imgs/author.jpg'\n },\n version: '1.2',\n url: 'https://github.com/michaelsboost/kodeWeave/',\n license: 'https://github.com/michaelsboost/kodeWeave/blob/main/LICENSE'\n}\nlet p = {\n name: \"App name\",\n version: 0.01,\n title: \"An attractive title\",\n description: \"The most attractive description ever!\",\n author: \"kodeWeave\",\n url: \"https://michaelsboost.com/\",\n meta: \"\",\n libraries: [],\n html_pre_processor: \"html\",\n css_pre_processor: \"css\",\n javascript_pre_processor: \"javascript\",\n html: ``,\n css: ``,\n javascript: ``,\n logo: \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvI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LTAuMTE5ODQsLTAuMDc0MSAtMC41MzYwMSwtMC4xMDI0NDYgLTEuMTg3NDgsLTAuMDkyMzggeiIKICAgICAgIGlkPSJwYXRoNDI2MCIgLz4KICA8L2c+Cjwvc3ZnPgo=\",\n console: false,\n dark: true,\n module: true,\n autorun: true,\n pwa: false,\n preview: true,\n activePanel: 'html',\n columns: false,\n columnsRight: true\n};\nlet d = {\n searchLibKey: null,\n librarySuggestions: null,\n iframeSize: null,\n activePanel: 'html',\n selectedSize: 'none',\n compiledJSX: null,\n menuDialog: null,\n settings: null,\n libraries: null,\n safeRender: null,\n demos: null\n};\nconst icons = (function() {\n const SidebarIconCSS = \"h-4 w-4\";\n const navIconCSS = \"h-3 w-3\";\n const modalIconCSS = \"h-4 w-4\";\n const panelIconCSS = \"h-3 w-3\";\n const previewIconCSS = \"h-3 -mt-1\";\n\n return {\n logo: `<svg\n class=\"${SidebarIconCSS}\" \n xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\n xmlns:cc=\"http://creativecommons.org/ns#\"\n xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n xmlns:svg=\"http://www.w3.org/2000/svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n viewBox=\"0 0 511.99999 511.99999\"\n height=\"512\"\n width=\"512\"\n version=\"1.1\"\n id=\"svg4190\">\n <metadata\n id=\"metadata4196\">\n <rdf:RDF>\n <cc:Work\n rdf:about=\"\">\n <dc:format>image/svg+xml</dc:format>\n <dc:type\n rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" />\n <dc:title></dc:title>\n </cc:Work>\n </rdf:RDF>\n </metadata>\n <defs\n id=\"defs4194\">\n <linearGradient\n id=\"linearGradient4276\">\n <stop\n id=\"stop4278\"\n offset=\"0\"\n style=\"stop-color:#fd5d92;stop-opacity:1\" />\n <stop\n id=\"stop4280\"\n offset=\"1\"\n style=\"stop-color:#ff0000;stop-opacity:1\" />\n </linearGradient>\n <linearGradient\n gradientUnits=\"userSpaceOnUse\"\n y2=\"257.3125\"\n x2=\"0.13404165\"\n y1=\"257.3125\"\n x1=\"511.71875\"\n id=\"linearGradient4282\"\n xlink:href=\"#linearGradient4276\" />\n </defs>\n <g\n id=\"g4284\">\n <circle\n style=\"opacity:1;fill:url(#linearGradient4282);fill-opacity:1;stroke:none;stroke-width:12;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:72, 72;stroke-dashoffset:0;stroke-opacity:1\"\n id=\"path4270\"\n cx=\"256\"\n cy=\"256\"\n r=\"256\" />\n <path\n style=\"opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:12;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:72, 72;stroke-dashoffset:0;stroke-opacity:1\"\n d=\"m 251.06068,58.678272 c -4.56032,0.07035 -20.76061,2.041945 -29.29792,3.655984 -28.34391,5.35862 -66.88081,22.619814 -73.03699,32.719061 -1.89755,3.112935 -1.94616,7.147013 -1.94616,160.817023 0,152.2588 0.0671,157.72464 1.89998,160.73121 5.20599,8.53989 36.72003,23.70934 63.45133,30.54134 9.76572,2.49593 34.33509,6.3448 38.50754,6.03169 2.00388,-0.15036 2.03203,-0.97469 2.28921,-73.09324 0.14558,-40.83759 0.65643,-73.33414 1.16109,-73.83896 1.37751,-1.37795 7.34739,1.88473 10.35752,5.66215 1.46202,1.83468 13.79755,20.65528 27.41774,41.81943 51.44452,79.93847 50.46511,78.47798 53.30494,79.19094 3.32478,0.83474 12.56708,-3.78947 27.57606,-13.78583 14.24338,-9.48646 23.8855,-17.7831 34.81972,-29.96717 11.29502,-12.58615 14.83039,-17.41785 14.83039,-20.25308 0,-1.22009 -14.9706,-24.54033 -33.40133,-52.02846 -18.37057,-27.39837 -34.10107,-51.16876 -34.95828,-52.82696 -0.85723,-1.6582 -1.55693,-4.07335 -1.55693,-5.36519 0,-1.32123 12.48959,-22.29487 28.54584,-47.94352 44.48315,-71.05856 41.93833,-66.29178 38.83081,-72.84247 -2.55755,-5.39136 -15.36262,-19.65809 -26.13129,-29.11587 -11.45459,-10.060191 -35.06413,-25.950276 -39.90612,-26.858934 -2.94154,-0.55201 -3.97519,-0.246788 -5.91766,1.742201 -1.29564,1.326648 -20.35012,32.348303 -42.34048,68.935723 -21.99036,36.5874 -41.06539,67.99167 -42.38665,69.78702 -2.61954,3.55937 -6.73281,6.09306 -8.73463,5.37838 -0.99947,-0.35683 -1.26665,-18.17035 -1.26665,-84.44394 0,-49.513196 -0.37864,-84.219226 -0.9236,-84.556138 -0.11984,-0.0741 -0.53601,-0.102446 -1.18748,-0.09238 z\"\n id=\"path4260\" />\n </g>\n </svg>`,\n twitterfill: `<svg class=\"${SidebarIconCSS}\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path d=\"M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z\"/>\n </svg>`,\n twitter: `<svg class=\"${SidebarIconCSS}\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <defs\n id=\"defs2\"><clipPath\n clipPathUnits=\"userSpaceOnUse\"\n id=\"clipPath7\"><path\n style=\"display:none;fill:#2a34ff;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1\"\n d=\"M 2.7194315,3.6106111 H 8.5920036 L 21.280954,20.389389 h -5.727371 z\"\n id=\"path7\" /><path\n id=\"lpe_path-effect7\"\n style=\"fill:#2a34ff;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1\"\n class=\"powerclip\"\n d=\"M -2.8448815,-3.9722732 H 26.113213 V 27.972273 H -2.8448815 Z M 2.7194315,3.6106111 15.553583,20.389389 h 5.727371 L 8.5920036,3.6106111 Z\" /></clipPath><clipPath\n clipPathUnits=\"userSpaceOnUse\"\n id=\"clipPath11\"><rect\n style=\"fill:#ff2a2a;fill-opacity:1;stroke:none;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1\"\n id=\"rect11\"\n width=\"21.586601\"\n height=\"18.278778\"\n x=\"1.2021173\"\n y=\"2.8606112\" /></clipPath></defs><g\n style=\"fill:none;stroke:currentColor;stroke-width:1.5\"\n id=\"g2\"\n transform=\"translate(-0.04613684)\"><g\n id=\"g8\"\n clip-path=\"url(#clipPath11)\"><path\n d=\"M 2.7194315,3.6106111 H 8.5920036 L 21.280954,20.389389 h -5.727371 z\"\n id=\"path2-8\" /><path\n d=\"M 20.541589,1.5132639 19.650846,2.5619375 18.760104,3.6106111 17.869362,4.6592848 16.978619,5.7079584 16.087877,6.756632 15.197135,7.8053056 14.306392,8.8539793 13.41565,9.9026529 12.524908,10.951326 11.634165,12 10.743423,13.048674 9.852681,14.097347 8.961938,15.146021 8.071196,16.194695 7.1804539,17.243368 6.2897116,18.292042 5.3989693,19.340715 4.5082269,20.389389 3.6174846,21.438063 2.7267423,22.486736\"\n id=\"path4\"\n clip-path=\"url(#clipPath7)\" /></g></g>\n </svg>`,\n heart: `<svg class=\"w-3\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path d=\"M47.6 300.4L228.3 469.1c7.5 7 17.4 10.9 27.7 10.9s20.2-3.9 27.7-10.9L464.4 300.4c30.4-28.3 47.6-68 47.6-109.5v-5.8c0-69.9-50.5-129.5-119.4-141C347 36.5 300.6 51.4 268 84L256 96 244 84c-32.6-32.6-79-47.5-124.6-39.9C50.5 55.6 0 115.2 0 185.1v5.8c0 41.5 17.2 81.2 47.6 109.5z\" />\n </svg>`,\n html: `<svg class=\"${SidebarIconCSS}\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"currentColor\" viewBox=\"0 0 384 512\">\n <path \n d=\"M0 32l34.9 395.8L191.5 480l157.6-52.2L384 32H0zm308.2 127.9H124.4l4.1 49.4h175.6l-13.6 148.4-97.9 27v.3h-1.1l-98.7-27.3-6-75.8h47.7L138 320l53.5 14.5 53.7-14.5 6-62.2H84.3L71.5 112.2h241.1l-4.4 47.7z\"/>\n </svg>`,\n css: `<svg class=\"${SidebarIconCSS}\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"currentColor\" viewBox=\"0 0 512 512\">\n <path \n d=\"M480 32l-64 368-223.3 80L0 400l19.6-94.8h82l-8 40.6L210 390.2l134.1-44.4 18.8-97.1H29.5l16-82h333.7l10.5-52.7H56.3l16.3-82H480z\"/>\n </svg>`,\n javascript: `<svg class=\"${SidebarIconCSS}\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"currentColor\" viewBox=\"0 0 448 512\">\n <path \n d=\"M0 32v448h448V32H0zm243.8 349.4c0 43.6-25.6 63.5-62.9 63.5-33.7 0-53.2-17.4-63.2-38.5l34.3-20.7c6.6 11.7 12.6 21.6 27.1 21.6 13.8 0 22.6-5.4 22.6-26.5V237.7h42.1v143.7zm99.6 63.5c-39.1 0-64.4-18.6-76.7-43l34.3-19.8c9 14.7 20.8 25.6 41.5 25.6 17.4 0 28.6-8.7 28.6-20.8 0-14.4-11.4-19.5-30.7-28l-10.5-4.5c-30.4-12.9-50.5-29.2-50.5-63.5 0-31.6 24.1-55.6 61.6-55.6 26.8 0 46 9.3 59.8 33.7L368 290c-7.2-12.9-15-18-27.1-18-12.3 0-20.1 7.8-20.1 18 0 12.6 7.8 17.7 25.9 25.6l10.5 4.5c35.8 15.3 55.9 31 55.9 66.2 0 37.8-29.8 58.6-69.7 58.6z\"/>\n </svg>`,\n columns: `<svg class=\"${SidebarIconCSS}\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 4.5v15m6-15v15m-10.875 0h15.75c.621 0 1.125-.504 1.125-1.125V5.625c0-.621-.504-1.125-1.125-1.125H4.125C3.504 4.5 3 5.004 3 5.625v12.75c0 .621.504 1.125 1.125 1.125Z\" />\n </svg>`,\n leftChev: `<svg class=\"${SidebarIconCSS}\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M15.75 19.5 8.25 12l7.5-7.5\" />\n </svg>`,\n rightChev: `<svg class=\"${SidebarIconCSS}\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"m8.25 4.5 7.5 7.5-7.5 7.5\" />\n </svg>`,\n console: `<svg class=\"${SidebarIconCSS}\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"m 12,18.340203 h 8.757019\" />\n <path d=\"M 3.3316546,18.340203 10.159567,11.778315 3.2429806,5.6597968\" />\n </svg>`,\n play: `<svg class=\"${SidebarIconCSS}\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 0 1 0 1.972l-11.54 6.347a1.125 1.125 0 0 1-1.667-.986V5.653Z\" />\n </svg>`,\n camera: `<svg class=\"${SidebarIconCSS}\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6.827 6.175A2.31 2.31 0 0 1 5.186 7.23c-.38.054-.757.112-1.134.175C2.999 7.58 2.25 8.507 2.25 9.574V18a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9.574c0-1.067-.75-1.994-1.802-2.169a47.865 47.865 0 0 0-1.134-.175 2.31 2.31 0 0 1-1.64-1.055l-.822-1.316a2.192 2.192 0 0 0-1.736-1.039 48.774 48.774 0 0 0-5.232 0 2.192 2.192 0 0 0-1.736 1.039l-.821 1.316Z\" />\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 12.75a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0ZM18.75 10.5h.008v.008h-.008V10.5Z\" />\n </svg>`,\n cog: `<svg class=\"${SidebarIconCSS}\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z\" />\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z\" />\n </svg>`,\n tidy: `<svg class=\"${previewIconCSS}\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 576 512\">\n <path d=\"M566.6 54.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192-34.7-34.7c-4.2-4.2-10-6.6-16-6.6c-12.5 0-22.6 10.1-22.6 22.6l0 29.1L364.3 320l29.1 0c12.5 0 22.6-10.1 22.6-22.6c0-6-2.4-11.8-6.6-16l-34.7-34.7 192-192zM341.1 353.4L222.6 234.9c-42.7-3.7-85.2 11.7-115.8 42.3l-8 8C76.5 307.5 64 337.7 64 369.2c0 6.8 7.1 11.2 13.2 8.2l51.1-25.5c5-2.5 9.5 4.1 5.4 7.9L7.3 473.4C2.7 477.6 0 483.6 0 489.9C0 502.1 9.9 512 22.1 512l173.3 0c38.8 0 75.9-15.4 103.4-42.8c30.6-30.6 45.9-73.1 42.3-115.8z\"/>\n </svg>`,\n rotate: `<svg class=\"${previewIconCSS}\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path d=\"M463.5 224H472c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1c-87.5 87.5-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8H463.5z\" />\n </svg>`,\n times: `<svg class=\"${modalIconCSS}\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18 18 6M6 6l12 12\" />\n </svg>`,\n file: `<svg class=\"h-3 -mt-1\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\">\n <path d=\"M0 64C0 28.7 28.7 0 64 0H224V128c0 17.7 14.3 32 32 32H384V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64zm384 64H256V0L384 128z\" />\n </svg>`,\n import: `<svg class=\"h-3 -mt-1 transform origin-center scale-125\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path d=\"M128 64c0-35.3 28.7-64 64-64H352V128c0 17.7 14.3 32 32 32H512V448c0 35.3-28.7 64-64 64H192c-35.3 0-64-28.7-64-64V336H302.1l-39 39c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l80-80c9.4-9.4 9.4-24.6 0-33.9l-80-80c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l39 39H128V64zm0 224v48H24c-13.3 0-24-10.7-24-24s10.7-24 24-24H128zM512 128H384V0L512 128z\" />\n </svg>`,\n download: `<svg class=\"h-3 -mt-1 transform origin-center scale-125\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path d=\"M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32V274.7l-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7V32zM64 352c-35.3 0-64 28.7-64 64v32c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V416c0-35.3-28.7-64-64-64H346.5l-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352H64zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z\" />\n </svg>`,\n codepen: `<svg class=\"h-3 -mt-1 transform origin-center scale-125\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path d=\"M502.285 159.704l-234-156c-7.987-4.915-16.511-4.96-24.571 0l-234 156C3.714 163.703 0 170.847 0 177.989v155.999c0 7.143 3.714 14.286 9.715 18.286l234 156.022c7.987 4.915 16.511 4.96 24.571 0l234-156.022c6-3.999 9.715-11.143 9.715-18.286V177.989c-.001-7.142-3.715-14.286-9.716-18.285zM278 63.131l172.286 114.858-76.857 51.429L278 165.703V63.131zm-44 0v102.572l-95.429 63.715-76.857-51.429L234 63.131zM44 219.132l55.143 36.857L44 292.846v-73.714zm190 229.715L61.714 333.989l76.857-51.429L234 346.275v102.572zm22-140.858l-77.715-52 77.715-52 77.715 52-77.715 52zm22 140.858V346.275l95.429-63.715 76.857 51.429L278 448.847zm190-156.001l-55.143-36.857L468 219.132v73.714z\" />\n </svg>`,\n trash: `<svg class=\"${panelIconCSS}\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0\" />\n </svg>`,\n undo: `<svg class=\"${navIconCSS}\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"m7.49 12-3.75 3.75m0 0 3.75 3.75m-3.75-3.75h16.5V4.499\" />\n </svg>`,\n redo: `<svg class=\"${navIconCSS}\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"m16.49 12 3.75 3.75m0 0-3.75 3.75m3.75-3.75H3.74V4.499\" />\n </svg>`,\n cut: `<svg class=\"${navIconCSS}\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"m7.848 8.25 1.536.887M7.848 8.25a3 3 0 1 1-5.196-3 3 3 0 0 1 5.196 3Zm1.536.887a2.165 2.165 0 0 1 1.083 1.839c.005.351.054.695.14 1.024M9.384 9.137l2.077 1.199M7.848 15.75l1.536-.887m-1.536.887a3 3 0 1 1-5.196 3 3 3 0 0 1 5.196-3Zm1.536-.887a2.165 2.165 0 0 0 1.083-1.838c.005-.352.054-.695.14-1.025m-1.223 2.863 2.077-1.199m0-3.328a4.323 4.323 0 0 1 2.068-1.379l5.325-1.628a4.5 4.5 0 0 1 2.48-.044l.803.215-7.794 4.5m-2.882-1.664A4.33 4.33 0 0 0 10.607 12m3.736 0 7.794 4.5-.802.215a4.5 4.5 0 0 1-2.48-.043l-5.326-1.629a4.324 4.324 0 0 1-2.068-1.379M14.343 12l-2.882 1.664\" />\n </svg>`,\n copy: `<svg class=\"${navIconCSS}\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M15.666 3.888A2.25 2.25 0 0 0 13.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 0 1-.75.75H9a.75.75 0 0 1-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 0 1-2.25 2.25H6.75A2.25 2.25 0 0 1 4.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 0 1 1.927-.184\" />\n </svg>`,\n paste: `<svg class=\"${navIconCSS}\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M8.25 7.5V6.108c0-1.135.845-2.098 1.976-2.192.373-.03.748-.057 1.123-.08M15.75 18H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 0 0-1.123-.08M15.75 18.75v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5A3.375 3.375 0 0 0 6.375 7.5H5.25m11.9-3.664A2.251 2.251 0 0 0 15 2.25h-1.5a2.251 2.251 0 0 0-2.15 1.586m5.8 0c.065.21.1.433.1.664v.75h-6V4.5c0-.231.035-.454.1-.664M6.75 7.5H4.875c-.621 0-1.125.504-1.125 1.125v12c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V16.5a9 9 0 0 0-9-9Z\" />\n </svg>`,\n indent: `<svg class=\"${navIconCSS}\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M17.25 8.25 21 12m0 0-3.75 3.75M21 12H3\" />\n </svg>`,\n outdent: `<svg class=\"${navIconCSS}\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6.75 15.75 3 12m0 0 3.75-3.75M3 12h18\" />\n </svg>`,\n search: `<svg class=\"${navIconCSS}\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z\" />\n </svg>`,\n goto: `<svg class=\"${navIconCSS}\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m5.231 13.481L15 17.25m-4.5-15H5.625c-.621 0-1.125.504-1.125 1.125v16.5c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Zm3.75 11.625a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z\" />\n </svg>`,\n comment: `<svg class=\"${navIconCSS}\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M2.25 12.76c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.076-4.076a1.526 1.526 0 0 1 1.037-.443 48.282 48.282 0 0 0 5.68-.494c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z\" />\n </svg>`,\n fold: `<svg class=\"${SidebarIconCSS}\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"m8.25 4.5 7.5 7.5-7.5 7.5\" />\n </svg>`,\n unfold: `<svg class=\"${SidebarIconCSS}\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"m19.5 8.25-7.5 7.5-7.5-7.5\" />\n </svg>`,\n cursor: `<svg class=\"${SidebarIconCSS}\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M15.042 21.672 13.684 16.6m0 0-2.51 2.225.569-9.47 5.227 7.917-3.286-.672ZM12 2.25V4.5m5.834.166-1.591 1.591M20.25 10.5H18M7.757 14.743l-1.59 1.59M6 10.5H3.75m4.007-4.243-1.59-1.59\" />\n </svg>`\n };\n})();\n\n// Reactive objects\nconst project = onChange(p, (property, oldValue, newValue) => {\n const iframe = document.getElementById('iframe');\n const doc = iframe.contentWindow.document;\n if (oldValue !== newValue) {\n localStorage.setItem('kodeWeave', JSON.stringify(project));\n App.render('#app');\n if (property.toString() === 'activePanel') {\n if (!window.editorManager) return;\n if (project.activePanel === 'html') setActiveEditor(editorManager.htmlEditor)\n if (project.activePanel === 'css') setActiveEditor(editorManager.cssEditor)\n if (project.activePanel === 'javascript') setActiveEditor(editorManager.javascriptEditor)\n }\n if (!App.initialRender) {\n let string = property.toString();\n // diff nodes\n if (string === 'css' || string === 'console') {\n let consoleCSS = `\n [data-zwj=zwjkonsole] {\n display: ${project.console ? 'flex' : 'none'};\n }\n \n ${project.css}`\n doc.getElementById('cuxjju3ew').textContent = consoleCSS;\n\n if (!window.editorManager) return;\n if (string === 'css' && editorManager.cssEditor.state.doc.toString() !== project.css) {\n dispatchChanges(editorManager.cssEditor, project.css);\n }\n }\n // render right away\n if (string === 'html') {\n if (project.autorun) renderPreview(true);\n if (!window.editorManager) return;\n if (window.editorManager.htmlEditor.state.doc.toString() !== project.html) {\n dispatchChanges(editorManager.htmlEditor, project.html);\n }\n }\n\n if (string === 'javascript') {\n if (project.autorun) renderPreview(true);\n if (!window.editorManager) return;\n if (window.editorManager.jsEditor.state.doc.toString() !== project.javascript) {\n dispatchChanges(editorManager.jsEditor, project.javascript);\n }\n }\n\n if (string === 'meta' || string === 'libraries' || string === 'html_pre_processor' || string === 'css_pre_processor' || string === 'javascript_pre_processor') {\n if (project.autorun) renderPreview(true);\n }\n if (string === \"dark\") {\n App.render('#app');\n document.documentElement.setAttribute('data-theme', project.dark ? 'dark' : 'light');\n doc.documentElement.setAttribute('data-theme', project.dark ? 'dark' : 'light');\n document.querySelector('meta[name=apple-mobile-web-app-status-bar-style]').setAttribute('content', project.dark ? 'black-translucent' : 'default');\n document.querySelector('meta[name=theme-color]').setAttribute('content', project.dark ? '#13171f' : '#ffffff');\n document.querySelector('meta[name=msapplication-navbutton-color]').setAttribute('content', project.dark ? '#13171f' : '#ffffff');\n }\n }\n }\n});\nconst data = onChange(d, (property, oldValue, newValue) => {\n // Only render if the actual value has changed\n if (oldValue !== newValue) App.render('#app');\n});\nwindow.project = project;\nwindow.data = data;\n\n// Components\nfunction LeftMenubar() {\n const buttonSize = \"w-full\";\n\n return `<ul class=\"p-0 m-0\">\n <li class=\"list-none m-0\">\n <button\n aria-label=\"toggle menu\"\n name=\"toggle menu\"\n class=\"${buttonSize} text-sm border-0 px-0 py-3 rounded-md bg-transparent\"\n style=\"color: unset;\"\n onclick=\"data.menuDialog = true\"\n >\n ${icons.logo}\n </button>\n </li>\n <li class=\"list-none m-0\">\n <a\n aria-label=\"toggle html\"\n name=\"toggle html\"\n class=\"${buttonSize} text-sm border-0 px-4 py-3 rounded-md bg-transparent\"\n style=\"color: unset;\"\n role=\"button\"\n href=\"https://twitter.com/kodeweave_app\"\n >\n ${icons.twitter}\n </a>\n </li>\n <li class=\"list-none m-0\">\n <a\n href=\"https://michaelsboost.com/donate/\"\n aria-label=\"Donation helps developer maintence\"\n target=\"_blank\"\n role=\"button\"\n class=\"${buttonSize} text-sm border-0 px-4 py-3 rounded-md bg-transparent text-red-400\"\n >\n ${icons.heart}\n </a>\n </li>\n</ul>\n<ul class=\"p-0 m-0\">\n <li class=\"list-none m-0\">\n <hr />\n </li>\n <li class=\"list-none m-0\">\n <button\n aria-label=\"toggle html\"\n name=\"toggle html\"\n class=\"${buttonSize} text-sm border-0 px-0 py-3 rounded-md bg-transparent ${project.activePanel === 'html' ? 'text-blue-500' : ''}\"\n ${project.activePanel === 'html' ? '' : 'style=\"color: unset;\"'}\n onclick=\"setActiveEditor(htmlEditor); project.activePanel = project.activePanel === 'html' ? null : 'html'; defineScale();\"\n >\n ${icons.html}\n </button>\n </li>\n <li class=\"list-none m-0\">\n <button\n aria-label=\"toggle css\"\n name=\"toggle css\"\n class=\"${buttonSize} text-sm border-0 px-0 py-3 rounded-md bg-transparent ${project.activePanel === 'css' ? 'text-blue-500' : ''}\"\n ${project.activePanel === 'css' ? '' : 'style=\"color: unset;\"'}\n onclick=\"setActiveEditor(cssEditor); project.activePanel = project.activePanel === 'css' ? null : 'css'; defineScale();\"\n >\n ${icons.css}\n </button>\n </li>\n <li class=\"list-none m-0\">\n <button\n aria-label=\"toggle javascript\"\n name=\"toggle javascript\"\n class=\"${buttonSize} text-sm border-0 px-0 py-3 rounded-md bg-transparent ${project.activePanel === 'javascript' ? 'text-blue-500' : ''}\"\n ${project.activePanel === 'javascript' ? '' : 'style=\"color: unset;\"'}\n onclick=\"setActiveEditor(jsEditor); project.activePanel = project.activePanel === 'javascript' ? null : 'javascript'; defineScale();\"\n >\n ${icons.javascript}\n </button>\n </li>\n <li class=\"list-none m-0\">\n <hr />\n </li>\n</ul>\n<ul class=\"p-0 m-0\">\n <li class=\"list-none m-0\">\n <button\n aria-label=\"toggle preview\"\n name=\"toggle preview\"\n class=\"${buttonSize} text-sm border-0 px-0 py-3 rounded-md bg-transparent ${project.preview ? 'text-blue-500' : ''}\"\n onclick=\"project.preview = !project.preview\"\n >\n ${icons.play}\n </button>\n </li>\n <li class=\"list-none m-0\">\n <button\n aria-label=\"toggle console\"\n name=\"toggle console\"\n class=\"${buttonSize} text-sm border-0 px-0 py-3 rounded-md bg-transparent ${project.console ? 'text-green-500' : ''}\"\n onclick=\"project.console = !project.console;\"\n style=\"${project.dark ? '' : `${project.console ? '' : 'color: unset;'}`}\"\n >\n ${icons.console}\n </button>\n </li>\n <li class=\"list-none m-0\">\n <button\n aria-label=\"full page screenshot\"\n name=\"full page screenshot\"\n class=\"${buttonSize} text-sm border-0 px-0 py-3 rounded-md bg-transparent\"\n style=\"color: unset;\"\n onclick=\"screenshot()\"\n >\n ${icons.camera}\n </button>\n </li>\n <li class=\"list-none m-0\">\n <button\n aria-label=\"settings button\"\n name=\"settings\"\n class=\"${buttonSize} text-sm border-0 px-4 py-3 rounded-md bg-transparent -mt-1\"\n style=\"color: unset;\"\n onclick=\"data.settings = !data.settings\"\n >\n ${icons.cog}\n </button>\n </li>\n</ul>`;\n}\nfunction PreviewMenu() {\n const buttonClass = 'border-0 bg-transparent text-sm';\n const selectClass = 'mx-0 my-2 w-auto rounded-md capitalize text-[.6rem]';\n const selectStyle = 'padding: 0.5rem;';\n\n const sizeOptions = {\n Phones: {\n '320x480': 'iPhone 3GS',\n '375x667': 'iPhone 6/7/8',\n '414x736': 'iPhone 6/7/8 Plus',\n '375x812': 'iPhone X/XS/11 Pro',\n '414x896': 'iPhone XR/XS Max/11/11 Pro Max',\n '360x640': 'Samsung Galaxy S5',\n '360x740': 'Samsung Galaxy S8+',\n '1440x3200': 'Samsung Galaxy S21 Ultra',\n '1080x2340': 'Google Pixel 5',\n '1080x2400': 'OnePlus 8 Pro',\n '1440x3200': 'Xiaomi Mi 11 Ultra',\n '1644x3840': 'Sony Xperia 1 III'\n },\n Tablets: {\n '2048x2732': 'iPad Pro 12.9\" (3rd/4th Gen)',\n '2388x1668': 'iPad Pro 11\" (1st/2nd/3rd Gen)',\n '2736x1824': 'Microsoft Surface Pro 7',\n '2800x1752': 'Samsung Galaxy Tab S7+',\n '2560x1600': 'Huawei MatePad Pro',\n '2000x1200': 'Lenovo Tab P11 Pro',\n '1920x1200': 'Amazon Fire HD 10',\n '1536x2048': 'iPad Air (3rd Gen)',\n '1620x2160': 'iPad Air (4th Gen)',\n '1620x2160': 'iPad 10.2\" (8th Gen)',\n '1668x2224': 'iPad Pro 11\" (2021)'\n },\n Desktops: {\n '3840x2160': '4K UHD (3840x2160)',\n '2560x1440': 'WQHD (2560x1440)',\n '1920x1080': 'Full HD (1920x1080)',\n '1366x768': 'Laptop (1366x768)',\n '3440x1440': 'UltraWide QHD (3440x1440)',\n '5120x2880': '5K Retina (5120x2880)',\n '1280x800': 'MacBook (1280x800)',\n '2560x1600': 'MacBook Pro (2560x1600)',\n '2880x1800': 'MacBook Pro Retina (2880x1800)'\n }\n };\n\n const previewSize = `<label for=\"selectedSize\" aria-label=\"resize canvas\" class=\"mx-2\">\n <select id=\"selectedSize\" onchange=\"resizeCanvas(this.value)\" class=\"${selectClass}\" style=\"${selectStyle}\">\n <option value=\"none\">Select Size</option>\n ${Object.keys(sizeOptions).map(group => `\n <optgroup label=\"${group}\">\n ${Object.keys(sizeOptions[group]).map(option => `\n <option value=\"${option}\">${sizeOptions[group][option]}</option>\n `).join('')}\n </optgroup>\n `).join('')}\n </select>\n </label>`;\n\n function canTidyShow() {\n if (!project.activePanel) return 'hidden'\n if (project.activePanel) {\n if (project.activePanel === 'html') {\n if (project.html_pre_processor !== 'html') {\n return 'hidden'\n }\n }\n if (project.activePanel === 'css') {\n if (project.css_pre_processor !== 'css') {\n return 'hidden'\n }\n }\n if (project.activePanel === 'javascript') {\n if (project.javascript_pre_processor !== 'javascript') {\n return 'hidden'\n }\n }\n }\n }\n\n return `<div class=\"flex justify-between items-center overflow-auto\">\n ${previewSize}\n\n <ul class=\"m-0 p-0 flex whitespace-nowrap overflow-x-auto overflow-y-hidden\">\n <li class=\"list-none\">\n <button \n aria-label=\"rotate canvas\"\n name=\"rotate canvas\" \n class=\"${buttonClass} ${data.selectedSize === 'none' ? 'hidden' : ''}\"\n style=\"color: unset;\"\n onclick=\"rotateCanvas()\">\n ${icons.rotate}\n </button>\n </li>\n <li class=\"list-none ${project.activePanel ? '' : 'hidden'}\">\n <button\n aria-label=\"change view\"\n name=\"change view\"\n class=\"${buttonClass} hidden sm:inline-block\"\n style=\"color: unset; ${project.columns ? '' : 'transform: rotate(90deg);'}\"\n onclick=\"project.columns = !project.columns;\"\n >\n ${icons.columns}\n </button>\n </li>\n <li class=\"list-none ${project.activePanel ? '' : 'hidden'}\">\n <button\n aria-label=\"toggle columns left or right\"\n name=\"toggle columns left or right\"\n class=\"${buttonClass} hidden ${project.activePanel ? `${project.columns ? '' : 'sm:inline-block'}` : ''}\"\n style=\"color: unset;\"\n onclick=\"project.columnsRight = !project.columnsRight;\"\n >\n ${project.columnsRight ? icons.leftChev : icons.rightChev}\n </button>\n </li>\n <li class=\"list-none\">\n <button \n aria-label=\"tidy code\"\n name=\"tidy code\"\n class=\"${buttonClass} ${canTidyShow()}\"\n style=\"color: unset;\"\n onclick=\"tidy()\">\n ${icons.tidy}\n </button>\n </li>\n <li class=\"list-none\">\n <button\n aria-label=\"run preview\"\n name=\"run preview\"\n class=\"${buttonClass} ${project.autorun ? 'hidden' : ''}\"\n style=\"color: unset;\"\n onclick=\"renderPreview(true)\"\n >\n ${icons.play}\n </button>\n </li>\n </ul>\n</div>`;\n}\nconst App = {\n initialRender: true,\n render(container) {\n // Calculate zoom transform based on viewport size and iframe size\n const size = data.selectedSize;\n let viewportWidth, viewportHeight;\n const previewElm = document.getElementById('previewElm');\n if (document.getElementById('previewElm')) {\n viewportWidth = previewElm.clientWidth;\n viewportHeight = previewElm.clientHeight;\n }\n let [width, height] = size.split('x').map(Number);\n\n let menuDialog = `<ul class=\"py-4 px-0\">\n <li class=\"list-none\">\n <div class=\"items-center text-center\">\n <div>\n <a \n aria-label=\"project homepage\"\n name=\"project homepage\"\n target=\"_blank\" \n href=\"${app.url}\">\n <img \n alt=\"logo\"\n class=\"my-4 w-24 m-auto\"\n src=\"../imgs/logo.svg\"\n loading=\"lazy\" />\n </a>\n <div class=\"text-2xl\">\n About ${app.name}\n </div>\n <div class=\"my-2 text-xs\">\n Version ${app.version}\n </div>\n <a \n target=\"_blank\" \n class=\"text-sm underline mb-2 text-blue-500\" \n href=\"${app.license}\">\n Open Source License\n </a>\n </div>\n </div>\n </li>\n <li class=\"p-0 list-none\">\n <hr />\n </li>\n <li class=\"p-0 list-none -mt-2\">\n <button \n class=\"w-full flex gap-2 text-sm capitalize border-0 p-2 rounded-md bg-transparent\" \n style=\"color: unset;\" \n onclick=\"data.menuDialog = null; data.demos = true;\">\n <svg class=\"h-5 w-5\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z\" />\n </svg>\n <span>new project</span>\n </button>\n </li>\n <li class=\"p-0 list-none\">\n <button \n class=\"w-full flex gap-2 text-sm capitalize border-0 p-2 rounded-md bg-transparent\" \n style=\"color: unset;\" \n onclick=\"data.menuDialog = null; importProject()\">\n <svg class=\"h-5 w-5\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m6.75 12-3-3m0 0-3 3m3-3v6m-1.5-15H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z\" />\n </svg>\n <span>import project</span>\n </button>\n </li>\n <li class=\"p-0 list-none\">\n <button \n class=\"w-full flex gap-2 text-sm capitalize border-0 p-2 rounded-md bg-transparent\" \n style=\"color: unset;\" \n onclick=\"data.menuDialog = null; downloadJSON()\">\n <svg class=\"h-5 w-5\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 8.25H7.5a2.25 2.25 0 0 0-2.25 2.25v9a2.25 2.25 0 0 0 2.25 2.25h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25H15M9 12l3 3m0 0 3-3m-3 3V2.25\" />\n </svg>\n <span>download json</span>\n </button>\n </li>\n <li class=\"p-0 list-none\">\n <button \n class=\"w-full flex gap-2 text-sm capitalize border-0 p-2 rounded-md bg-transparent\" \n style=\"color: unset;\" \n onclick=\"data.menuDialog = null; downloadProject()\">\n <svg class=\"h-5 w-5\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3\" />\n </svg>\n <span>download zip</span>\n </button>\n </li>\n <li class=\"p-0 list-none\">\n <button \n class=\"w-full flex gap-2 text-sm capitalize border-0 p-2 rounded-md bg-transparent\" \n style=\"color: unset;\" \n onclick=\"data.menuDialog = null; share()\">\n <svg class=\"h-5 w-5\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M7.217 10.907a2.25 2.25 0 1 0 0 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186 9.566-5.314m-9.566 7.5 9.566 5.314m0 0a2.25 2.25 0 1 0 3.935 2.186 2.25 2.25 0 0 0-3.935-2.186Zm0-12.814a2.25 2.25 0 1 0 3.933-2.185 2.25 2.25 0 0 0-3.933 2.185Z\" />\n </svg>\n <span>share to codepen</span>\n </button>\n </li>\n <li class=\"p-0 list-none\">\n <button \n aria-label=\"Empty storage saved from kodeWeave\"\n name=\"Empty storage saved from kodeWeave\"\n class=\"w-full flex gap-2 text-sm capitalize border-0 p-2 rounded-md bg-transparent\" \n style=\"color: unset;\" \n onclick=\"emptyStorage()\">\n <svg class=\"h-5 w-5\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 576 512\">\n <path d=\"M566.6 54.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192-34.7-34.7c-4.2-4.2-10-6.6-16-6.6c-12.5 0-22.6 10.1-22.6 22.6l0 29.1L364.3 320l29.1 0c12.5 0 22.6-10.1 22.6-22.6c0-6-2.4-11.8-6.6-16l-34.7-34.7 192-192zM341.1 353.4L222.6 234.9c-42.7-3.7-85.2 11.7-115.8 42.3l-8 8C76.5 307.5 64 337.7 64 369.2c0 6.8 7.1 11.2 13.2 8.2l51.1-25.5c5-2.5 9.5 4.1 5.4 7.9L7.3 473.4C2.7 477.6 0 483.6 0 489.9C0 502.1 9.9 512 22.1 512l173.3 0c38.8 0 75.9-15.4 103.4-42.8c30.6-30.6 45.9-73.1 42.3-115.8z\"/>\n </svg>\n <span>empty storage</span>\n </button>\n </li>\n </ul>`;\n menuDialog = `<dialog ${data.menuDialog ? 'open' : ''}>\n <article class=\"rounded-md\">\n <header class=\"flex justify-between items-center\">\n <h1 class=\"text-lg font-thin m-0 capitalize\">\n file menu\n </h1>\n <button \n class=\"text-xs w-auto px-3 py-2 m-0 capitalize rounded-md bg-transparent border-0\" \n style=\"color: unset;\" \n aria-label=\"Close\"\n onclick=\"data.menuDialog = null\">\n ${icons.times}\n </button>\n </header>\n <main class=\"font-thin\">\n ${menuDialog}\n </main>\n <footer>\n <button \n class=\"text-xs w-auto px-3 py-2 m-0 capitalize rounded-md bg-transparent border ${project.dark ? 'border-gray-600' : 'border-gray-200'}\" \n style=\"color: unset;\" \n aria-label=\"Close\" \n onclick=\"data.menuDialog = null\">\n close\n </button>\n </footer>\n </article>\n </dialog>`;\n\n let settingsHTML = `<ul class=\"px-0\">\n <li class=\"list-none\">\n <div class=\"mb-2\">\n <input \n id=\"pjqgd1wka\"\n type=\"file\" \n name=\"project logo\" \n class=\"hidden\"\n onchange=\"handleLogoChange(event)\"\n />\n <label \n for=\"pjqgd1wka\"\n class=\"mb-2 flex justify-between items-center cursor-pointer\">\n <span>Project logo:</span>\n\n <img \n id=\"projectLogo\"\n class=\"w-8\"\n alt=\"Project Logo\"\n src=\"${project.logo}\"\n loading=\"lazy\">\n </label>\n </div>\n </li>\n <li class=\"list-none\">\n <nav class=\"flex justify-between mt-5 items-center\">\n <label \n for=\"o14tigo4m\"\n class=\"mb-2 flex justify-between items-center cursor-pointer\">\n <span>Dark:</span>\n </label>\n\n <input \n id=\"o14tigo4m\"\n class=\"m-0\"\n type=\"checkbox\" \n role=\"switch\"\n name=\"toggle css reset\"\n onchange=\"project.dark = this.checked;\"\n ${project.dark ? 'checked' : ''}\n />\n </nav>\n </li>\n <li class=\"list-none\">\n <nav class=\"flex justify-between mt-5 items-center\">\n <label \n for=\"ep0b8bd4c\"\n class=\"mb-2 flex justify-between items-center cursor-pointer\">\n <span>Module:</span>\n </label>\n\n <input \n id=\"ep0b8bd4c\"\n class=\"m-0\"\n type=\"checkbox\" \n role=\"switch\"\n name=\"toggle module\"\n onchange=\"project.module = this.checked;\"\n ${project.module ? 'checked' : ''}\n />\n </nav>\n </li>\n <li class=\"list-none\">\n <nav class=\"flex justify-between mt-5 items-center\">\n <label \n for=\"if2s51d22\"\n class=\"mb-2 flex justify-between items-center cursor-pointer\">\n <span>Auto run:</span>\n </label>\n\n <input \n id=\"if2s51d22\"\n class=\"m-0\"\n type=\"checkbox\" \n role=\"switch\"\n name=\"toggle auto run\"\n onchange=\"project.autorun = this.checked;\"\n ${project.autorun ? 'checked' : ''}\n />\n </nav>\n </li>\n <li class=\"list-none\">\n <nav class=\"flex justify-between mt-5 items-center\">\n <label \n for=\"osbpm2k0q\"\n class=\"mb-2 flex justify-between items-center cursor-pointer\">\n <span>PWA:</span>\n </label>\n\n <input \n id=\"osbpm2k0q\"\n class=\"m-0\"\n type=\"checkbox\" \n role=\"switch\"\n name=\"export project as a pwa\"\n onchange=\"project.pwa = this.checked\"\n ${project.pwa ? 'checked' : ''}\n />\n </nav>\n </li>\n <li class=\"p-0 list-none\">\n <hr />\n </li>\n <li class=\"list-none\">\n <nav class=\"flex justifu-between -mt-3 items-center\">\n <label \n for=\"wl7i1adq7\"\n class=\"m-0 flex justify-between items-center cursor-pointer\">\n <span>Libraries:</span>\n </label>\n\n <button\n aria-label=\"search libraries\"\n name=\"search libraries\"\n class=\"bg-transparent border-0 focus-within:shadow-none\"\n style=\"color: unset;\"\n onclick=\"data.libraries = true; searchInput.focus();\">\n ${icons.search}\n </button>\n </nav>\n\n <div id=\"librariesBox\">\n ${project.libraries.map((library, index) => `\n <nav class=\"flex justify-between py-2\" data-index=\"${index}\">\n <input \n type=\"text\" \n placeholder=\"https://cdnjs.cloudflare.com/ajax/libs/Sortable/1.15.2/Sortable.min.js\" \n data=\"library\" \n class=\"w-full pl-3 pr-0 rounded-md rounded-r-none focus:shadow-none\"\n style=\"margin-bottom: 0;\"\n value=\"${library}\" \n oninput=\"project.libraries[${index}] = this.value; renderPreview(true);\" />\n <button \n aria-label=\"delete library\"\n name=\"delete library\"\n class=\"px-3 py-[15px] h-full border-0 rounded-md rounded-l-none\"\n onclick=\"project.libraries.splice(${index}, 1); renderPreview(true);\">\n ${icons.trash}\n </button>\n </nav>\n `).join('')}\n </div>\n <button \n aria-label=\"add another library or framework\" \n name=\"add another library or framework\" \n onclick=\"project.libraries.push('')\" \n class=\"capitalize py-2 w-full items-center rounded-md\">\n <span class=\"text-[.75rem]\">\n Add another\n </span>\n </button>\n </li>\n <li class=\"p-0 list-none\">\n <hr />\n </li>\n <!--\n <li class=\"list-none\">\n <nav class=\"flex justify-between mt-5 items-center\">\n <div class=\"mb-2\">\n HTML:\n </div>\n\n <select \n aria-label=\"html preprocessor\"\n name=\"html preprocessor\"\n onchange=\"setPreprocessor('html', this.value);\" \n class=\"w-auto my-0 text-[.75rem]\">\n <option value=\"html\" ${project.html_pre_processor === 'html' ? 'selected' : ''}>HTML</option>\n <option value=\"markdown\" ${project.html_pre_processor === 'markdown' ? 'selected' : ''}>Markdown</option>\n <option value=\"pug\" ${project.html_pre_processor === 'pug' ? 'selected' : ''}>Pug</option>\n </select>\n </nav>\n </li>\n <li class=\"p-0 list-none\">\n <hr />\n </li>\n <li class=\"list-none\">\n <nav class=\"flex justify-between mt-5 items-center\">\n <div class=\"mb-2\">\n CSS:\n </div>\n\n <select \n aria-label=\"css preprocessor\"\n name=\"css preprocessor\"\n onchange=\"setPreprocessor('css', this.value);\" \n class=\"w-auto my-0 text-[.75rem]\">\n <option value=\"css\" ${project.css_pre_processor === 'css' ? 'selected' : ''}>CSS</option>\n <option value=\"sass\" ${project.css_pre_processor === 'sass' ? 'selected' : ''}>Sass</option>\n <option value=\"less\" ${project.css_pre_processor === 'less' ? 'selected' : ''}>LESS</option>\n <option value=\"stylus\" ${project.css_pre_processor === 'stylus' ? 'selected' : ''}>Stylus</option>\n </select>\n </nav>\n </li>\n -->\n <li class=\"p-0 list-none\">\n <hr />\n </li>\n <li class=\"list-none\">\n <nav class=\"flex justify-between mt-5 items-center\">\n <div class=\"mb-2\">\n JS:\n </div>\n\n <select \n aria-label=\"javascript preprocessor\"\n name=\"javascript preprocessor\"\n onchange=\"setPreprocessor('javascript', this.value);\" \n class=\"w-auto my-0 text-[.75rem]\">\n <option value=\"javascript\" ${project.javascript_pre_processor === 'javascript' ? 'selected' : ''}>Javascript</option>\n <option value=\"babel\" ${project.javascript_pre_processor === 'babel' ? 'selected' : ''}>Babel (JSX / ES6)</option>\n <option value=\"typescript\" ${project.javascript_pre_processor === 'typescript' ? 'selected' : ''}>Typescript</option>\n </select>\n </nav>\n </li>\n <li class=\"p-0 list-none\">\n <hr />\n </li>\n <li class=\"list-none\">\n <div class=\"mb-2\">\n Project name:\n </div>\n <input \n type=\"text\" \n name=\"project name\"\n placeholder=\"Project name\" \n class=\"p-2 rounded-md w-full\" \n value=\"${project.name}\"\n oninput=\"project.name = this.value;\"\n />\n </li>\n <li class=\"p-0 list-none\">\n <hr />\n </li>\n <li class=\"list-none\">\n <div class=\"mb-2\">\n Project version:\n </div>\n <input \n type=\"number\" \n min=\"0\"\n step=\"0.01\"\n name=\"project version\"\n placeholder=\"Project version\" \n class=\"p-2 rounded-md w-full\" \n value=\"${project.version}\"\n oninput=\"project.version = this.value;\"\n />\n </li>\n <li class=\"p-0 list-none\">\n <hr />\n </li>\n <li class=\"list-none\">\n <div class=\"mb-2\">\n Project title:\n </div>\n <input \n type=\"text\" \n name=\"project title\"\n placeholder=\"Project title\"\n class=\"p-2 rounded-md w-full\" \n value=\"${project.title}\"\n oninput=\"project.title = this.value;\"\n />\n </li>\n <li class=\"p-0 list-none\">\n <hr />\n </li>\n <li class=\"list-none\">\n <div class=\"mb-2\">\n Project description:\n </div>\n <textarea \n name=\"project description\"\n placeholder=\"Project description\" \n class=\"p-2 rounded-md w-full resize-vertical h-56\"\n oninput=\"project.description = this.value;\"\n >${project.description}</textarea>\n </li>\n <li class=\"p-0 list-none\">\n <hr />\n </li>\n <li class=\"list-none\">\n <div class=\"mb-2\">\n Project author:\n </div>\n <input \n type=\"text\" \n name=\"project author\"\n placeholder=\"Project author\" \n class=\"p-2 rounded-md w-full\" \n value=\"${project.author}\"\n oninput=\"project.author = this.value;\"\n />\n </li>\n <li class=\"p-0 list-none\">\n <hr />\n </li>\n <li class=\"list-none\">\n <div class=\"mb-2\">\n Project url:\n </div>\n <input \n type=\"text\" \n name=\"project url\"\n placeholder=\"Project url\" \n class=\"p-2 rounded-md w-full\" \n value=\"${project.url}\"\n oninput=\"project.url = this.value;\"\n />\n </li>\n <li class=\"p-0 list-none\">\n <hr />\n </li>\n <li class=\"list-none\">\n <div class=\"my-2\">\n HTML before closing head tag:\n </div>\n <textarea \n placeholder=\"HTML before closing </head> tag\" \n class=\"p-2 rounded-md w-full resize-vertical h-56\"\n oninput=\"project.meta = this.value;\"\n >${project.meta}</textarea>\n </li>\n</ul>`;\n settingsHTML = `<dialog ${data.settings ? 'open' : ''}>\n <article class=\"rounded-md\">\n <header class=\"flex justify-between items-center\">\n <h1 class=\"text-lg font-thin m-0 capitalize\">\n settings\n </h1>\n <button \n class=\"text-xs w-auto px-3 py-2 m-0 capitalize rounded-md bg-transparent border-0\" \n style=\"color: unset;\" \n aria-label=\"Close\"\n onclick=\"data.settings = null\">\n ${icons.times}\n </button>\n </header>\n <main class=\"font-thin\">\n ${settingsHTML}\n </main>\n <footer>\n <button \n class=\"text-xs w-auto px-3 py-2 m-0 capitalize rounded-md bg-transparent border ${project.dark ? 'border-gray-600' : 'border-gray-200'}\" \n style=\"color: unset;\" \n aria-label=\"Close\" \n onclick=\"data.settings = null\">\n close\n </button>\n </footer>\n </article>\n </dialog>`;\n\n let librariesDialog = `<dialog ${data.libraries ? 'open' : ''}>\n <article class=\"rounded-md\">\n <header class=\"flex justify-between items-center\">\n <h1 class=\"text-lg font-thin m-0\">\n Search for resources (JQuery, Bootstrap, Foundation...)\n </h1>\n <button \n class=\"text-xs w-auto px-3 py-2 m-0 capitalize rounded-md bg-transparent border-0\" \n style=\"color: unset;\" \n aria-label=\"Close\"\n onclick=\"data.libraries = null; data.searchLibKey = null; searchInput.value = null;\">\n ${icons.times}\n </button>\n </header>\n <main class=\"font-thin\">\n <div class=\"p-4\">\n <input \n id=\"searchInput\" \n type=\"search\" \n placeholder=\"Search for resources (JQuery, Bootstrap, Foundation...)\" \n class=\"w-full p-3 rounded-full bg-[#1c212c]\" \n oninput=\"this.value ? data.searchLibKey = this.value : data.searchLibKey = null; data.searchLibKey ? fetchSuggestions(data.searchLibKey) : ''\" />\n \n <div class=\"relative px-4 capitalize h-auto max-h-64 overflow-auto\">\n ${data.librarySuggestions && data.searchLibKey ? data.librarySuggestions : ''}\n </div>\n </div>\n </main>\n <footer>\n <button \n class=\"text-xs w-auto px-3 py-2 m-0 capitalize rounded-md bg-transparent border ${project.dark ? 'border-gray-600' : 'border-gray-200'}\" \n style=\"color: unset;\" \n aria-label=\"Close\" \n onclick=\"data.libraries = null; data.searchLibKey = null; searchInput.value = null;\">\n close\n </button>\n </footer>\n </article>\n </dialog>`;\n const buttonClass = \"grid grid-rows-1 items-center bg-transparent border-0 focus-within:shadow-none\";\n const buttonContentClass = \"flex flex-col justify-between h-full\";\n const imageContentClass = \"grid h-full items-center\";\n const textContentClass = \"capitalize text-center mt-4\";\n \n const frameworks = [\n \"javascript\",\n \"typescript\",\n \"react\",\n \"vue\",\n \"preact\",\n \"angular\",\n \"alpine\",\n \"solid\",\n \"stimulus\",\n \"mithril\",\n \"hyperapp\",\n \"aurelia\",\n \"lit\"\n ]\n \n let buttonHTML = \"\";\n for (const name of frameworks) {\n buttonHTML += `<button\n aria-label=\"new ${name} project\"\n name=\"new ${name} project\"\n class=\"${buttonClass}\"\n style=\"color: unset;\"\n onclick=\"newProject('${name}')\">\n <div class=\"${buttonContentClass}\">\n <div class=\"${imageContentClass}\">\n <img loading=\"lazy\" width=\"256\" height=\"256\" src=\"imgs/frameworks/${name}.svg\" alt=\"${name}\" />\n </div>\n <div class=\"${textContentClass}\">\n ${name}\n </div>\n </div>\n </button>`;\n }\n\n let demosDialog = `<dialog ${data.demos ? 'open' : ''}>\n <article class=\"rounded-md\">\n <header class=\"flex justify-between items-center\">\n <h1 class=\"text-lg font-thin m-0\">\n Are you sure you want to start a new project?\n </h1>\n <button \n class=\"text-xs w-auto px-3 py-2 m-0 capitalize rounded-md bg-transparent border-0\" \n style=\"color: unset;\" \n aria-label=\"Close\"\n onclick=\"data.demos = null;\">\n ${icons.times}\n </button>\n </header>\n <main class=\"font-thin\">\n <div class=\"p-4 text-center\">All current data will be lost.</div>\n <div class=\"p-4 relative h-80 overflow-auto\">\n <div class=\"grid grid-cols-2 sm:grid-cols-4 gap-4\">\n ${buttonHTML}\n </div>\n </div>\n </main>\n <footer>\n <button \n class=\"text-xs w-auto px-3 py-2 m-0 capitalize rounded-md bg-transparent border ${project.dark ? 'border-gray-600' : 'border-gray-200'}\" \n style=\"color: unset;\" \n aria-label=\"Close\" \n onclick=\"data.demos = null;\">\n close\n </button>\n </footer>\n </article>\n </dialog>`;\n \n const html = `\n <div>\n <div class=\"absolute inset-y-0 left-0 flex flex-col text-center justify-between px-2 py-4 overflow-auto no-scrollbar\">\n ${LeftMenubar()}\n </div>\n \n <!-- flexbox for panels and preview -->\n <div class=\"flex flex-col flex-col-reverse sm:flex-row absolute inset-y-0 right-0 left-16 bottom-0 overflow-hidden\">\n <div class=\"relative w-full h-full border-0 border-x border-solid overflow-auto p-4 ${project.dark ? \"border-gray-800\" : \"border-gray-200\"}\">\n <nav class=\"absolute inset-0 flex flex-col ${project.columns ? 'flex-col' : `sm:flex-row ${project.columnsRight ? 'sm:flex-row-reverse' : ''}`}\">\n <div class=\"flex-grow w-full h-full flex flex-col ${project.columns ? '' : `border-0 border-x border-solid ${project.dark ? \"border-gray-800\" : \"border-gray-200\"}`} ${project.preview ? '' : 'hidden'}\">\n <div class=\"flex-none border-0 border-b border-solid ${project.dark ? \"border-gray-800\" : \"border-gray-200\"}\">\n ${PreviewMenu()}\n </div>\n <div class=\"flex-grow overflow-hidden h-full\">\n <div id=\"previewElm\" class=\"relative grid grid-cols-1 align-center items-center w-full h-full\">\n <iframe\n id=\"iframe\"\n title=\"${project.title}\"\n class=\"bg-white ${data.selectedSize !== 'none' ? `border border-solid ${project.dark ? \"border-gray-800\" : \"border-gray-200\"} shadow-2xl shadow-blue-500` : ''}\"\n style=\"${data.selectedSize === 'none' ? 'width: 100%; height: 100%' : `\n width: ${width}px;\n height: ${height}px;\n transform: scale(${Math.min(viewportWidth / width, viewportHeight / height)});\n position: absolute;\n top: 50%;\n left: 50%;\n margin-top: -${height / 2}px;\n margin-left: -${width / 2}px;`}\"\n allow=\"accelerometer *; bluetooth *; camera *; encrypted-media *; display-capture *; geolocation *; gyroscope *; microphone *; midi *; clipboard-read *; clipboard-write *; web-share *; serial *; xr-spatial-tracking *\"\n allowfullscreen=\"true\"\n allowpaymentrequest=\"true\"\n allowtransparency=\"true\"\n sandbox=\"allow-downloads allow-forms allow-modals allow-pointer-lock allow-popups-to-escape-sandbox allow-popups allow-presentation allow-same-origin allow-scripts allow-top-navigation-by-user-activation\"\n loading=\"lazy\"\n ></iframe>\n\n <span \n id=\"iframeClientSize\" \n class=\"hidden opacity-0 transition-opacity duration-300 absolute top-0 right-0 ${project.dark ? 'bg-gray-800' : 'bg-gray-200'} p-1 text-xs\">\n ${data.iframeSize}\n </span>\n </div>\n </div>\n </div>\n <div class=\"relative flex-grow w-full h-full ${project.columns ? '' : '2xl:w-1/2 sm:border-solid sm:border-0 lg:border-r '+project.dark ? \"border-gray-800\" : \"border-gray-200\"+''} ${project.activePanel ? '' : 'hidden'}\">\n <div class=\"absolute inset-0 flex flex-col justify-between\">\n <div class=\"flex-grow overflow-auto ${project.columns ? `border-0 border-t border-solid ${project.dark ? \"border-gray-800\" : \"border-gray-200\"}` : ''}\">\n <div class=\"h-full ${project.activePanel === 'html' ? '' : 'hidden'}\">\n <div \n data-ignore\n class=\"h-full\"\n aria-label=\"html editor\"\n name=\"html editor\"\n id=\"htmlEditor\"></div>\n </div>\n <div class=\"h-full ${project.activePanel === 'css' ? '' : 'hidden'}\">\n <div \n data-ignore\n class=\"h-full\"\n aria-label=\"css editor\"\n name=\"css editor\"\n id=\"cssEditor\"></div>\n </div>\n <div class=\"h-full ${project.activePanel === 'javascript' ? '' : 'hidden'}\">\n <div \n data-ignore\n class=\"h-full\"\n aria-label=\"javascript editor\"\n name=\"javascript editor\"\n id=\"jsEditor\"></div>\n </div>\n </div>\n <div class=\"flex-none overflow-auto border-0 border-t border-solid ${project.dark ? \"border-gray-800\" : \"border-gray-200\"}\">\n ${editorNav()}\n </div>\n </div>\n </div>\n </nav>\n </div>\n </div>\n\n ${menuDialog}\n ${settingsHTML}\n ${librariesDialog}\n ${demosDialog}\n </div>`\n \n const element = document.querySelector(container);\n if (!element) return;\n\n // Create a new temporary element to compare\n const parser = new DOMParser();\n const doc = parser.parseFromString(html, 'text/html');\n if (doc.body.innerHTML.trim() === html.trim()) return;\n if (App.initialRender) {\n element.innerHTML = html;\n renderPreview(true);\n App.initialRender = false;\n return false;\n }\n\n // Compare and update only the changed parts\n const currentDoc = element.firstElementChild;\n const newDoc = doc.body.firstElementChild;\n diffNodes(currentDoc, newDoc);\n }\n}\nconst Modal = {\n render({\n large,\n title = \"Are you sure you want to proceed?\",\n content,\n CloseLabel,\n ConfirmLabel,\n onLoad,\n onClose,\n onConfirm\n }) {\n // if (!options) return false;\n const hClass = \"text-lg font-thin m-0\";\n const buttonClass = \"text-xs w-auto px-3 py-2 m-0 capitalize rounded-md\";\n const svgClass = \"w-3\";\n const times = `<svg class=\"${svgClass}\" viewBox=\"0 0 384 512\">\n <path \n fill=\"currentColor\" \n d=\"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z\"/>\n </svg>`;\n\n const html = `<article class=\"${large ? 'flex flex-col h-3/4' : ''} rounded-md\">\n <header class=\"${large ? 'flex-none' : ''} flex justify-between items-center\">\n <h1 class=\"${hClass}\">${title}</h1>\n <button class=\"${buttonClass} bg-transparent border-0\" style=\"color: unset;\" aria-label=\"Close\">\n ${times}\n </button>\n </header>\n <main class=\"font-thin ${large ? 'flex-grow' : ''}\">\n ${content ? content : ''}\n </main>\n <footer ${large ? 'class=\"flex-none\"' : ''}>\n <button class=\"${buttonClass} bg-transparent border ${project.dark ? 'border-gray-600' : 'border-gray-200'}\" style=\"color: unset;\" aria-label=\"Close\" onclick=\"this.closest('dialog').close()\">${CloseLabel ? CloseLabel : 'close'}</button>\n ${onConfirm ? `<button class=\"${buttonClass}\" aria-label=\"Confirm\">${ConfirmLabel ? ConfirmLabel : 'confirm'}</button>` : ''}\n </footer>\n </article>`;\n\n const modal = document.createElement('dialog');\n modal.open = true;\n modal.innerHTML = html;\n\n document.body.appendChild(modal);\n if (onLoad && typeof onLoad === 'function') {\n onLoad();\n }\n\n const timesBtn = modal.querySelector('header button');\n const closeBtn = modal.querySelector('footer button:first-child');\n const confirmBtn = modal.querySelector('footer button:last-child');\n\n // Confirm handler function\n timesBtn.onclick = function() {\n if (onClose && typeof onClose === 'function') {\n onClose();\n }\n document.body.removeChild(modal);\n }\n closeBtn.onclick = function() {\n if (onClose && typeof onClose === 'function') {\n onClose();\n }\n document.body.removeChild(modal);\n }\n confirmBtn.onclick = function() {\n if (onConfirm && typeof onConfirm === 'function') {\n onConfirm();\n }\n document.body.removeChild(modal);\n }\n }\n}\nfunction editorNav() {\n const buttonClass = \"border-0 bg-transparent py-1\";\n\n return `<div class=\"flex justify-between\">\n <button\n aria-label=\"indent\"\n name=\"indent\"\n class=\"${buttonClass}\"\n style=\"color: unset;\"\n onclick=\"editorCommand('indent', getActiveEditor())\">\n ${icons.indent}\n </button>\n <button\n aria-label=\"outdent\"\n name=\"outdent\"\n class=\"${buttonClass}\"\n style=\"color: unset;\"\n onclick=\"editorCommand('outdent', getActiveEditor())\">\n ${icons.outdent}\n </button>\n <button\n aria-label=\"undo\"\n name=\"undo\"\n class=\"${buttonClass}\"\n style=\"color: unset;\"\n onclick=\"editorCommand('undo', getActiveEditor())\">\n ${icons.undo}\n </button>\n <button\n aria-label=\"redo\"\n name=\"redo\"\n class=\"${buttonClass}\"\n style=\"color: unset;\"\n onclick=\"editorCommand('redo', getActiveEditor())\">\n ${icons.redo}\n </button>\n <button\n aria-label=\"search\"\n name=\"search\"\n class=\"${buttonClass}\"\n style=\"color: unset;\"\n onclick=\"editorCommand('search', getActiveEditor())\">\n ${icons.search}\n </button>\n <button\n aria-label=\"goto line\"\n name=\"goto line\"\n class=\"${buttonClass}\"\n style=\"color: unset;\"\n onclick=\"editorCommand('goto', getActiveEditor())\">\n ${icons.goto}\n </button>\n </div>\n\n <div class=\"flex justify-between\">\n <button\n aria-label=\"comment\"\n name=\"comment\"\n class=\"${buttonClass}\"\n style=\"color: unset;\"\n onclick=\"editorCommand('toggleComment', getActiveEditor())\">\n ${icons.comment}\n </button>\n <button\n aria-label=\"fold\"\n name=\"fold\"\n class=\"${buttonClass}\"\n style=\"color: unset;\"\n onclick=\"editorCommand('foldAll', getActiveEditor())\">\n ${icons.fold}\n </button>\n <button\n aria-label=\"unfold\"\n name=\"unfold\"\n class=\"${buttonClass}\"\n style=\"color: unset;\"\n onclick=\"editorCommand('unfoldAll', getActiveEditor())\">\n ${icons.unfold}\n </button>\n <button\n aria-label=\"cut\"\n name=\"cut\"\n class=\"${buttonClass}\"\n style=\"color: unset;\"\n onclick=\"editorCommand('cut', getActiveEditor())\">\n ${icons.cut}\n </button>\n <button\n aria-label=\"copy\"\n name=\"copy\"\n class=\"${buttonClass}\"\n style=\"color: unset;\"\n onclick=\"editorCommand('copy', getActiveEditor())\">\n ${icons.copy}\n </button>\n <button\n aria-label=\"paste\"\n name=\"paste\"\n class=\"${buttonClass}\"\n style=\"color: unset;\"\n onclick=\"editorCommand('paste', getActiveEditor())\">\n ${icons.paste}\n </button>\n <button\n aria-label=\"select all\"\n name=\"select all\"\n class=\"${buttonClass}\"\n style=\"color: unset;\"\n onclick=\"editorCommand('selectAll', getActiveEditor())\">\n ${icons.cursor}\n </button>\n </div>`;\n}\nfunction emptyStorage() {\n // Clear local storage\n localStorage.removeItem('kodeWeave');\n\n // Clear session storage\n sessionStorage.clear();\n\n // Clear cookies\n document.cookie.split(\";\").forEach(function(c) {\n document.cookie = c.trim().split(\"=\")[0] + '=;expires=Thu, 01 Jan 1970 00:00:00 UTC;path=/';\n });\n\n // Clear service worker caches\n if ('caches' in window) {\n caches.keys().then(function(names) {\n for (let name of names) caches.delete(name)\n });\n }\n\n // Unregister all service workers\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.getRegistrations().then(function(registrations) {\n for (let registration of registrations) registration.unregister()\n });\n }\n\n console.log('All saved data, cookies, and service worker caches have been cleared.');\n location.reload();\n}\n\n// editor functions\nconst addLibrary = url => {\n if (!url) {\n project.libraries.push('');\n document.getElementById('librariesBox').innerHTML = renderLibraries();\n return false;\n }\n\n if (!project.libraries.includes(url)) {\n project.libraries.push(url);\n } else {\n console.error(`Library already exists: ${url}`);\n }\n\n if (document.getElementById('librariesBox')) {\n document.getElementById('librariesBox').innerHTML = renderLibraries();\n }\n};\nfunction renderLibraries() {\n return project.libraries.map((library, index) => `\n <nav class=\"flex justify-between py-2\" data-index=\"${index}\">\n <input \n type=\"text\" \n placeholder=\"https://cdnjs.cloudflare.com/ajax/libs/Sortable/1.15.2/Sortable.min.js\" \n data=\"library\" \n class=\"w-full pl-3 pr-0 rounded-md rounded-r-none focus:shadow-none\"\n style=\"margin-bottom: 0;\"\n value=\"${library}\" \n oninput=\"project.libraries[${index}] = this.value\" />\n <button \n aria-label=\"delete library\"\n name=\"delete library\"\n class=\"px-3 py-[15px] h-full border-0 rounded-md rounded-l-none\"\n onclick=\"project.libraries.splice(${index}, 1);\">\n ${icons.trash}\n </button>\n </nav>\n `).join('')\n}\nfunction fetchSuggestions(key) {\n fetch(\n `https://api.cdnjs.com/libraries?search=${key}&fields=filename,description,version`\n )\n .then(response => {\n if (!response.ok) {\n throw new Error(\"Network response was not ok\");\n }\n return response.json();\n })\n .then(item => {\n if (item && item.results && item.results.length > 0) {\n const suggestions = item.results.map(result => result);\n\n data.librarySuggestions = suggestions.map(result => {\n return `\n <section \n class=\"cursor-pointer\"\n onclick=\"\n if (!project.libraries.includes('${result.latest}')) project.libraries.push('${result.latest}'); \n data.libraries = null;\n data.searchLibKey = null;\n data.librarySuggestions = null;\n searchInput.value = null;\n \">\n <div class=\"flex justify-between mb-2 font-bold text-1xl\">\n <span class=\"font-bold\">${result.name}</span>\n <span class=\"font-bold\">${result.version}</span>\n </div>\n <div class=\"text-sm font-thin\">${result.description}<br><hr></div>\n </section>`;\n }).join('');\n }\n })\n .catch(error => {\n console.error(\"Error fetching data:\", error);\n });\n}\nfunction removeScript(src) {\n const script = document.querySelector(`script[src=\"${src}\"]`);\n if (script) script.remove();\n}\nfunction removeScripts(scripts) {\n scripts.forEach(src => {\n const script = document.querySelector(`script[src=\"${src}\"]`);\n if (script) script.remove();\n });\n}\nasync function loadScript(scriptUrl) {\n return new Promise((resolve, reject) => {\n // Check if the script is already loaded\n const existingScript = document.querySelector(`script[src=\"${scriptUrl}\"]`);\n if (existingScript) {\n resolve(); // If the script is already present, resolve immediately\n return;\n }\n\n // Create a new script element if not present\n const scriptElement = document.createElement('script');\n scriptElement.src = scriptUrl;\n scriptElement.onload = resolve; // Resolve when the script is successfully loaded\n scriptElement.onerror = () => reject(new Error(`Failed to load script: ${scriptUrl}`)); // Reject on error\n document.body.appendChild(scriptElement); // Append the script to the body\n });\n}\nasync function loadScripts(srcArray) {\n return Promise.all(srcArray.map(loadScript));\n}\nasync function setPreprocessor(editor, value) {\n const scriptMap = {\n html: {\n markdown: \"libraries/preprocessors/marked.min.js\",\n jade: \"libraries/preprocessors/jade.js\",\n pug: \"libraries/preprocessors/pug.js\"\n },\n css: {\n sass: \"libraries/preprocessors/sass.sync.min.js\",\n less: \"libraries/preprocessors/less.min.js\",\n stylus: \"libraries/preprocessors/stylus.min.js\"\n },\n javascript: {\n typescript: \"libraries/preprocessors/typescript.min.js\",\n babel: \"libraries/preprocessors/babel.min.js\",\n jsxtypescript: [\n \"libraries/preprocessors/typescript.min.js\",\n \"libraries/preprocessors/babel.min.js\"\n ]\n }\n };\n\n const currentPreprocessors = {\n html: project.html_pre_processor,\n css: project.css_pre_processor,\n javascript: project.javascript_pre_processor\n };\n\n try {\n const scriptSrcCondition = (value !== 'html' || value !== 'css' || value !== 'javascript');\n const scriptSrc = scriptSrcCondition ? scriptMap[editor][value] : null;\n\n // Remove the current preprocessor scripts\n if (currentPreprocessors[editor] && scriptSrcCondition) {\n const currentScriptSrc = scriptMap[editor][currentPreprocessors[editor]];\n Array.isArray(currentScriptSrc) ? removeScripts(currentScriptSrc) : removeScript(currentScriptSrc)\n\n // Load the new preprocessor scripts\n if (Array.isArray(scriptSrc)) {\n await loadScripts(scriptSrc);\n } else if (scriptSrc) {\n await loadScript(scriptSrc);\n }\n }\n\n // Set the new preprocessor\n if (editor === 'html') {\n project.html_pre_processor = value;\n // if (!window.editorManager || !window.editorManager.htmlEditor) return;\n // window.editorManager.setMode(project.html_pre_processor === 'html' ? 'html' : value, editorManager.htmlEditor);\n } else if (editor === 'css') {\n project.css_pre_processor = value;\n // if (!window.editorManager || !window.editorManager.cssEditor) return;\n // window.editorManager.setMode(project.css_pre_processor === 'css' ? 'css' : value, editorManager.cssEditor);\n } else if (editor === 'javascript') {\n project.javascript_pre_processor = value;\n if (!window.editorManager || !window.editorManager.jsEditor) return;\n window.editorManager.setMode(project.javascript_pre_processor === 'javascript' ? 'javascript' : value, editorManager.jsEditor);\n }\n } catch (error) {\n console.error('Error setting preprocessor:', error);\n }\n}\nasync function initializePreprocessors() {\n await Promise.all([\n setPreprocessor('html', project.html_pre_processor),\n setPreprocessor('css', project.css_pre_processor),\n setPreprocessor('javascript', project.javascript_pre_processor)\n ]);\n \n if (!window.editorManager) return;\n dispatchChanges(editorManager.htmlEditor, project.html);\n dispatchChanges(editorManager.cssEditor, project.css);\n dispatchChanges(editorManager.jsEditor, project.javascript);\n renderPreview(true);\n}\nasync function loadBeautifyLibraries() {\n const beautifyLibraries = [\n \"libraries/js-beautify/beautify.min.js\",\n \"libraries/js-beautify/beautify-css.min.js\",\n \"libraries/js-beautify/beautify-html.min.js\"\n ];\n await loadScripts(beautifyLibraries);\n}\nasync function removeBeautifyLibraries() {\n const beautifyLibraries = [\n \"libraries/js-beautify/beautify.min.js\",\n \"libraries/js-beautify/beautify-css.min.js\",\n \"libraries/js-beautify/beautify-html.min.js\"\n ];\n removeScripts(beautifyLibraries);\n}\nasync function tidy() {\n await loadBeautifyLibraries();\n\n let formattedCode;\n switch (project.activePanel) {\n case 'html':\n formattedCode = html_beautify(project.html, {\n indent_size: 2,\n max_preserve_newlines: 1\n });\n dispatchChanges(editorManager.htmlEditor, formattedCode);\n break;\n case 'css':\n formattedCode = css_beautify(project.css, {\n indent_size: 2,\n max_preserve_newlines: 1\n });\n project.css = formattedCode;\n dispatchChanges(editorManager.cssEditor, formattedCode);\n break;\n case 'javascript':\n formattedCode = js_beautify(project.javascript, {\n indent_size: 2,\n max_preserve_newlines: 1\n });\n project.javascript = formattedCode;\n dispatchChanges(editorManager.jsEditor, formattedCode);\n break;\n default:\n formattedCode = 'Unknown editor panel.';\n }\n\n await removeBeautifyLibraries();\n}\n\n// iframe functions\nfunction generateId() {\n let id = '';\n while (!/^[a-zA-Z]/.test(id)) {\n id = Math.random().toString(36).substr(2, 9);\n }\n return id;\n}\nfunction resizeCanvas(size) {\n data.selectedSize = size;\n getIFrameClientSize();\n}\nfunction rotateCanvas() {\n const iframe = document.getElementById('previewElm').firstElementChild;\n if (iframe.style.width === '100%') return false;\n\n // Extract current width and height\n let width = parseInt(iframe.style.width);\n let height = parseInt(iframe.style.height);\n\n // Swap width and height\n [width, height] = [height, width];\n\n // Calculate the new transform scale\n const viewportWidth = previewElm.clientWidth;\n const viewportHeight = previewElm.clientHeight;\n const scale = Math.min(viewportWidth / width, viewportHeight / height);\n\n // Apply the new styles\n iframe.style.width = `${width}px`;\n iframe.style.height = `${height}px`;\n iframe.style.transform = `scale(${scale})`;\n iframe.style.marginTop = `-${height / 2}px`;\n iframe.style.marginLeft = `-${width / 2}px`;\n data.selectedSize = width+'x'+height;\n}\nfunction defineScale() {\n const iframe = document.getElementById('previewElm').firstElementChild;\n if (iframe.style.width === '100%') return false;\n\n // Extract current width and height\n let width = parseInt(iframe.style.width);\n let height = parseInt(iframe.style.height);\n\n // Calculate the new transform scale\n const viewportWidth = previewElm.clientWidth;\n const viewportHeight = previewElm.clientHeight;\n const scale = Math.min(viewportWidth / width, viewportHeight / height);\n\n // Apply the new styles\n iframe.style.width = `${width}px`;\n iframe.style.height = `${height}px`;\n iframe.style.transform = `scale(${scale})`;\n iframe.style.marginTop = `-${height / 2}px`;\n iframe.style.marginLeft = `-${width / 2}px`;\n}\nlet fadeTimeout;\nfunction getIFrameClientSize() {\n if (data.selectedSize === 'none') {\n const iframe = document.getElementById('iframe');\n data.iframeSize = `${iframe.clientWidth}px x ${iframe.clientHeight}px`;\n const element = document.getElementById('iframeClientSize');\n \n if (element.classList.contains('hidden')) {\n // Clear existing timeout to prevent multiple calls\n if (fadeTimeout) clearTimeout(fadeTimeout);\n \n // Remove hidden and add opacity-100 to show the element\n element.classList.remove('hidden', 'opacity-0');\n element.classList.add('opacity-100');\n \n // Set a timeout to handle fade-out\n fadeTimeout = setTimeout(() => {\n element.classList.remove('opacity-100');\n element.classList.add('opacity-0');\n \n // Add hidden class after fade-out\n setTimeout(() => {\n element.classList.add('hidden');\n }, 300); // Match the duration of the opacity transition\n }, 2000); // Show duration\n }\n } else {\n defineScale();\n }\n}\nasync function compileCode(detect) {\n try {\n if (detect === 'html') {\n switch (project.html_pre_processor) {\n case 'markdown':\n return marked.parse(project.html);\n case 'jade':\n return jade.render(project.html, { pretty: true });\n case 'pug':\n const appScript = document.getElementById('appScript');\n if (appScript.hasAttribute('type') && appScript.getAttribute('type') === 'module') {\n // import pug from 'libraries/preprocessors/pug.js';\n console.error('Cannot import pug as script is a module!');\n return false;\n }\n\n const pug = require(\"pug\");\n return pug.compile(project.html)({name: this.name });\n default:\n return project.html;\n }\n }\n\n if (detect === 'css') {\n switch (project.css_pre_processor) {\n case 'stylus':\n return stylus.render(project.css);\n case 'less':\n return new Promise((resolve, reject) => {\n less.render(project.css, (err, output) => err ? reject(err) : resolve(output.css));\n });\n case 'sass':\n return new Promise((resolve, reject) => {\n Sass.compile(project.css, result => result.status === 0 ? resolve(result.text) : reject(new Error(result.message)));\n });\n default:\n return project.css;\n }\n }\n\n if (detect === 'javascript') {\n switch (project.javascript_pre_processor) {\n case 'babel':\n if (typeof Babel === 'undefined') {\n await loadScript(\"libraries/preprocessors/babel.min.js\");\n }\n return Babel.transform(project.javascript, { presets: ['env', 'react'] }).code;\n case 'typescript':\n return ts.transpileModule(project.javascript, { compilerOptions: { module: ts.ModuleKind.CommonJS } }).outputText;\n case 'jsxtypescript':\n const result = ts.transpileModule(project.javascript, {\n compilerOptions: { module: ts.ModuleKind.CommonJS, target: ts.ScriptTarget.ES5, jsx: ts.JsxEmit.React }\n }).outputText;\n data.compiledJSX = Babel.transform(result, {\n presets: ['env', 'react']\n }).code;\n return data.compiledJSX;\n default:\n return project.javascript;\n }\n }\n } catch (error) {\n console.error('Error compiling code:', error);\n }\n}\n\n// save functions\nasync function handleLogoChange(event) {\n const file = event.target.files[0];\n if (!file) return; // If no file selected, return\n\n try {\n // Convert file to base64 string\n const base64String = await fileToBase64(file);\n // Update project.logo with base64String\n project.logo = base64String;\n } catch (error) {\n console.error('Error converting image to base64:', error);\n }\n}\nfunction fileToBase64(file) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.readAsDataURL(file);\n reader.onload = () => resolve(reader.result);\n reader.onerror = error => reject(error);\n });\n}\n\nfunction newProject(name) {\n function capitalizeFirstLetter(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n }\n const capitalizedTitle = capitalizeFirstLetter(name);\n setPreprocessor('html', 'html');\n setPreprocessor('css', 'css');\n if (name !== \"typescript\") setPreprocessor('javascript', 'javascript');\n if (name === \"typescript\" || name === \"angular\") setPreprocessor('javascript', 'typescript');\n project.name = `${capitalizedTitle} name`;\n project.version = 0.01;\n project.title = `A Cool ${capitalizedTitle} App`;\n project.description = `A modern ${capitalizedTitle} application!`;\n project.author = \"kodeWeave\";\n project.url = \"https://michaelsboost.com/\";\n project.module = true;\n project.preview = true;\n if (name === 'angular') project.module = false;\n project.pwa = false;\n\n if (name === 'javascript') {\n project.meta = \"\";\n project.libraries = [\n \"https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css\",\n \"https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js\"\n ];\n project.html = `<div class=\"flex flex-col items-center justify-center absolute inset-0\">\n <h1 class=\"text-3xl font-thin mb-4\">\uD83D\uDC4B Hello, ${capitalizedTitle}! \uD83C\uDF0E</h1>\n <p class=\"text-xl mb-4\">Counter: <span id=\"counter\" class=\"font-mono\">0</span></p>\n <button id=\"incrementButton\" class=\"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-700 transition\">\n +\n </button>\n</div>`;\n project.css = ``;\n project.javascript = `let counter = 0;\nconst counterElement = document.getElementById('counter');\nconst incrementButton = document.getElementById('incrementButton');\n\nincrementButton.addEventListener('click', function() {\n counter++;\n counterElement.textContent = counter;\n});`;\n }\n if (name === 'typescript') {\n project.meta = \"\";\n project.libraries = [\n \"https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css\",\n \"https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js\"\n ];\n project.html = `<div class=\"flex flex-col items-center justify-center absolute inset-0\">\n <h1 class=\"text-3xl font-thin mb-4\">\uD83D\uDC4B Hello, ${capitalizedTitle}! \uD83C\uDF0E</h1>\n <p class=\"text-xl mb-4\">Counter: <span id=\"counter\" class=\"font-mono\">0</span></p>\n <button id=\"incrementButton\" class=\"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-700 transition\">\n +\n </button>\n</div>`;\n project.css = ``;\n project.javascript = `let counter: number = 0;\nconst counterElement: HTMLElement | null = document.getElementById('counter');\nconst incrementButton: HTMLElement | null = document.getElementById('incrementButton');\n\nif (counterElement && incrementButton) {\n incrementButton.addEventListener('click', function() {\n counter++;\n counterElement.textContent = counter.toString();\n });\n}`;\n }\n if (name === 'react') {\n project.meta = \"\";\n project.libraries = [\n \"https://unpkg.com/react@latest/umd/react.development.js\",\n \"https://unpkg.com/react-dom@latest/umd/react-dom.development.js\",\n \"https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css\",\n \"https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js\"\n ];\n project.html = `<div id=\"root\"></div>`;\n project.css = ``;\n project.javascript = `/** @jsxRuntime classic */\n/** @jsx React.createElement */\nconst { useState } = React;\n\nfunction App() {\n const [counter, setCounter] = useState(0);\n\n return (\n <div className=\"flex flex-col items-center justify-center absolute inset-0\">\n <h1 className=\"text-3xl font-thin mb-4\">\uD83D\uDC4B Hello, ${capitalizedTitle}! \uD83C\uDF0E</h1>\n <p className=\"text-xl mb-4\">Counter: <span id=\"counter\" className=\"font-mono\">{counter}</span></p>\n <button\n id=\"incrementButton\"\n className=\"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-700 transition\"\n onClick={() => setCounter(counter + 1)}\n >\n +\n </button>\n </div>\n );\n}\n\nconst root = ReactDOM.createRoot(document.getElementById('root'));\nroot.render(<App />);`;\n }\n if (name === 'vue') {\n project.meta = \"\";\n project.libraries = [\n \"https://cdnjs.cloudflare.com/ajax/libs/vue/3.2.37/vue.global.prod.min.js\",\n \"https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css\",\n \"https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js\"\n ];\n project.html = `<div id=\"root\"></div>`;\n project.css = ``;\n project.javascript = `const App = {\n data() {\n return {\n counter: 0,\n message: '\uD83D\uDC4B Hello, ${capitalizedTitle}! \uD83C\uDF0E'\n };\n },\n methods: {\n incrementCounter() {\n this.counter++;\n }\n },\n template: \\`\n <div class=\"flex flex-col items-center justify-center absolute inset-0\">\n <h1 class=\"text-3xl font-thin mb-4\">{{ message }}</h1>\n <p class=\"text-xl mb-4\">Counter: <span id=\"counter\" class=\"font-mono\">{{ counter }}</span></p>\n <button\n id=\"incrementButton\"\n class=\"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-700 transition\"\n @click=\"incrementCounter\"\n >\n +\n </button>\n </div>\n \\`\n};\n\nconst app = Vue.createApp(App);\napp.mount('#root');`;\n }\n if (name === 'preact') {\n project.meta = `<script src=\"https://cdn.jsdelivr.net/npm/alpinejs@3.14.1/dist/cdn.min.js\" defer></script>`;\n project.libraries = [\n \"https://unpkg.com/preact@latest/dist/preact.min.js\",\n \"https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css\",\n \"https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js\"\n ];\n project.html = `<div id=\"root\"></div>`;\n project.css = ``;\n project.javascript = `/** @jsx h */\nimport { html, render, useState, useEffect } from 'https://unpkg.com/htm@3.1.1/preact/standalone.module.js';\n\nfunction App() {\n const [counter, setCounter] = useState(0);\n\n return html\\`\n <div class=\"flex flex-col items-center justify-center absolute inset-0\">\n <h1 class=\"text-3xl font-thin mb-4\">\uD83D\uDC4B Hello, ${capitalizedTitle}! \uD83C\uDF0E</h1>\n <p class=\"text-xl mb-4\">Counter: <span id=\"counter\" class=\"font-mono\">\\${counter}</span></p>\n <button\n id=\"incrementButton\"\n class=\"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-700 transition\"\n onClick=\\${() => setCounter(counter + 1)}\n >\n +\n </button>\n </div>\n \\`;\n}\n\nrender(html\\`<\\${App} />\\`, document.getElementById('root'));`;\n }\n if (name === 'angularold') {\n project.meta = ``;\n project.libraries = [\n \"https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular.min.js\",\n \"https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css\",\n \"https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js\"\n ];\n project.html = `<div ng-app=\"myApp\" ng-controller=\"MainController\" class=\"flex flex-col items-center justify-center absolute inset-0\">\n <h1 class=\"text-3xl font-thin mb-4\">\uD83D\uDC4B Hello, ${capitalizedTitle}! \uD83C\uDF0E</h1>\n <p class=\"text-xl mb-4\">Counter: <span id=\"counter\" class=\"font-mono\">{{counter}}</span></p>\n <button\n id=\"incrementButton\"\n class=\"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-700 transition\"\n ng-click=\"incrementCounter()\"\n >\n +\n </button>\n </div>`;\n project.css = ``;\n project.javascript = `angular.module('myApp', [])\n .controller('MainController', function($scope) {\n $scope.counter = 0;\n $scope.incrementCounter = function() {\n $scope.counter++;\n };\n });`;\n }\n if (name === 'angular') {\n project.meta = ``;\n project.libraries = [\n \"https://cdnjs.cloudflare.com/ajax/libs/rxjs/6.6.3/rxjs.umd.min.js\",\n \"https://cdnjs.cloudflare.com/ajax/libs/core-js/2.5.7/core.js\",\n \"https://unpkg.com/@angular/core@11.0.5/bundles/core.umd.js\",\n \"https://cdnjs.cloudflare.com/ajax/libs/zone.js/0.10.3/zone.min.js\",\n \"https://unpkg.com/@angular/common@11.0.5/bundles/common.umd.js\",\n \"https://unpkg.com/@angular/compiler@11.0.5/bundles/compiler.umd.js\",\n \"https://unpkg.com/@angular/platform-browser@11.0.5/bundles/platform-browser.umd.js\",\n \"https://unpkg.com/@angular/platform-browser-dynamic@11.0.5/bundles/platform-browser-dynamic.umd.js\",\n \"https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css\",\n \"https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js\"\n ];\n project.html = `<app-root>Loading...</app-root>`;\n project.css = ``;\n project.javascript = `const { Component, NgModule, enableProdMode } = ng.core;\nconst { BrowserModule } = ng.platformBrowser;\nconst { platformBrowserDynamic } = ng.platformBrowserDynamic;\n\nenableProdMode();\n\n@Component({\n selector: 'app-root',\n template: \\`\n <div class=\"flex flex-col items-center justify-center absolute inset-0\">\n <h1 class=\"text-3xl font-thin mb-4\">\uD83D\uDC4B Hello, ${capitalizedTitle}! \uD83C\uDF0E</h1>\n <p class=\"text-xl mb-4\">Counter: <span id=\"counter\" class=\"font-mono\">{{ counter }}</span></p>\n <button\n id=\"incrementButton\"\n class=\"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-700 transition\"\n (click)=\"incrementCounter()\"\n >\n +\n </button>\n </div>\n \\`,\n})\nclass AppComponent {\n counter = 0;\n \n incrementCounter() {\n this.counter++;\n }\n}\n\n@NgModule({\n declarations: [AppComponent],\n imports: [BrowserModule],\n bootstrap: [AppComponent]\n})\nclass AppModule {}\n\nplatformBrowserDynamic().bootstrapModule(AppModule);`;\n }\n if (name === 'alpine') {\n project.meta = `<script src=\"https://cdn.jsdelivr.net/npm/alpinejs@3.14.1/dist/cdn.min.js\" defer></script>`;\n project.libraries = [\n \"https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css\",\n \"https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js\"\n ];\n project.html = `<div x-data=\"{ counter: 0 }\" class=\"flex flex-col items-center justify-center absolute inset-0\">\n <div class=\"flex flex-col items-center justify-center absolute inset-0\">\n <h1 class=\"text-3xl font-thin mb-4\">\uD83D\uDC4B Hello, ${capitalizedTitle}! \uD83C\uDF0E</h1>\n <p class=\"text-xl mb-4\">Counter: <span class=\"font-mono\" x-text=\"counter\"></span></p>\n <button\n class=\"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-700 transition\"\n x-on:click=\"counter++\"\n >\n +\n </button>\n </div>\n</div>`;\n project.css = ``;\n project.javascript = ``;\n }\n if (name === 'solid') {\n project.meta = ``;\n project.libraries = [\n \"https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css\",\n \"https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js\"\n ];\n project.html = `<div id=\"root\"></div>`;\n project.css = ``;\n project.javascript = `import { createSignal } from \"https://cdn.skypack.dev/solid-js@1.2.6\";\nimport { render } from \"https://cdn.skypack.dev/solid-js@1.2.6/web\";\nimport html from \"https://cdn.skypack.dev/solid-js@1.2.6/html\";\n\nfunction Counter() {\n const [count, setCount] = createSignal(0);\n const increment = () => setCount(count() + 1);\n\n return html\\`\n <div class=\"flex flex-col items-center justify-center absolute inset-0\">\n <h1 class=\"text-3xl font-thin mb-4\">\uD83D\uDC4B Hello, ${capitalizedTitle}! \uD83C\uDF0E</h1>\n <p class=\"text-xl mb-4\">Counter: <span class=\"font-mono\">\\${count}</span></p>\n <button type=\"button\" onClick=\\${increment}>\n +\n </button>\n </div>\n \\`;\n}\n\nrender(Counter, document.getElementById(\"root\"));`;\n }\n if (name === 'stimulus') {\n project.meta = \"\";\n project.libraries = [\n \"https://cdn.jsdelivr.net/npm/@hotwired/stimulus@3.1.0/dist/stimulus.umd.js\",\n \"https://cdn.jsdelivr.net/npm/@hotwired/stimulus-loading@1.0.0/dist/stimulus-loading.umd.js\",\n \"https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css\",\n \"https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js\"\n ];\n project.html = `<div data-controller=\"counter\" class=\"flex flex-col items-center justify-center absolute inset-0\">\n <h1 class=\"text-3xl font-thin mb-4\">\uD83D\uDC4B Hello, ${capitalizedTitle}! \uD83C\uDF0E</h1>\n <p class=\"text-xl mb-4\">Counter: <span data-counter-target=\"output\" class=\"font-mono\">0</span></p>\n <button\n data-action=\"click->counter#increment\"\n class=\"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-700 transition\"\n >\n +\n </button>\n</div>`;\n project.css = ``;\n project.javascript = `const application = Stimulus.Application.start();\n\napplication.register('counter', class extends Stimulus.Controller {\n static targets = ['output'];\n\n initialize() {\n this.counter = 0;\n }\n\n increment() {\n this.counter += 1;\n this.outputTarget.textContent = this.counter;\n }\n});`;\n }\n if (name === 'mithril') {\n project.meta = \"\";\n project.libraries = [\n \"https://cdn.jsdelivr.net/npm/mithril@2.0.4/mithril.min.js\",\n \"https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css\",\n \"https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js\"\n ];\n project.html = `<div id=\"root\"></div>`;\n project.css = ``;\n project.javascript = `import htm from 'https://unpkg.com/htm?module'\nconst html = htm.bind(m)\n\nconst app = () => {\n let count = 0\n \n return {\n view: () => html\\`\n <div class=\"flex flex-col items-center justify-center absolute inset-0\">\n <h1 class=\"text-3xl font-thin mb-4\">\uD83D\uDC4B Hello, Mithril! \uD83C\uDF0E</h1>\n <p class=\"text-xl mb-4\">Counter: <span class=\"font-mono\">\\${count}</span></p>\n <button onclick=\\${() => count++}>+</button>\n </div>\\`\n }\n}\n\nm.mount(document.getElementById('root'), app)`;\n }\n if (name === 'hyperapp') {\n project.meta = `<script src=\"https://unpkg.com/hyperapp@0.16.0\"></script>`;\n project.libraries = [\n \"https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css\",\n \"https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js\"\n ];\n project.html = `<h1 id=\"root\"></h1>`;\n project.css = ``;\n project.javascript = `import { app } from 'https://unpkg.com/hyperapp';\nimport html from 'https://unpkg.com/hyperlit';\n\napp({\n init: 0,\n view: count => html\\`\n <div class=\"flex flex-col items-center justify-center absolute inset-0\">\n <h1 class=\"text-3xl font-thin mb-4\">\uD83D\uDC4B Hello, Hyperapp! \uD83C\uDF0E</h1>\n <p class=\"text-xl mb-4\">Counter: <span class=\"font-mono\">\\${count}</span></p>\n <button onclick=\\${count => count + 1}>+</button>\n </div>\\`,\n node: document.getElementById('root')\n})`;\n }\n if (name === 'aurelia') {\n project.meta = '<script src=\"https://cdn.jsdelivr.net/npm/aurelia-script@1.4.0\"></script>';\n project.libraries = [\n \"https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css\",\n \"https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js\"\n ];\n project.html = `<template id=\"root\">\n <div class=\"flex flex-col items-center justify-center absolute inset-0\">\n <h1 class=\"text-3xl font-thin mb-4\">\uD83D\uDC4B Hello, ${capitalizedTitle}! \uD83C\uDF0E</h1>\n <p class=\"text-xl mb-4\">Counter: <span id=\"counter\" class=\"font-mono\">0</span></p>\n <button \n class=\"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-700 transition\"\n click.delegate=\"incrementCounter()\">\n +\n </button>\n </div>\n</template>`;\n project.css = ``;\n project.javascript = `class App {\n static $view() {\n return document.querySelector('#root');\n }\n constructor() {\n this.message = '${capitalizedTitle}';\n this.counter = 0;\n }\n incrementCounter() {\n this.counter++;\n document.getElementById('counter').textContent = this.counter;\n }\n}\n\nau.start({ root: App });`;\n }\n if (name === 'lit') {\n project.meta = \"\";\n project.libraries = [\n \"https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css\"\n ];\n project.html = `<my-element></my-element>`;\n project.css = ``;\n project.javascript = `import {LitElement, html} from 'https://cdn.jsdelivr.net/gh/lit/dist@2/core/lit-core.min.js';\n \nclass MyElement extends LitElement {\n static properties = {\n counter: { type: Number }\n };\n\n constructor() {\n super();\n this.counter = 0;\n }\n\n incrementCounter() {\n this.counter++;\n }\n\n render() {\n return html\\`\n <main>\n <h1>\uD83D\uDC4B Hello, ${capitalizedTitle}! \uD83C\uDF0E</h1>\n <p>Counter: \\${this.counter}</p>\n <button @click=\"\\${this.incrementCounter}\">\n +\n </button>\n </main>\n \\`;\n }\n}\ncustomElements.define('my-element', MyElement);`;\n }\n\n dispatchChanges(editorManager.htmlEditor, project.html);\n dispatchChanges(editorManager.cssEditor, project.css);\n dispatchChanges(editorManager.jsEditor, project.javascript);\n if (name === 'react') setPreprocessor('javascript', 'babel');\n data.demos = false;\n renderPreview(true);\n}\nfunction importJSON(obj) {\n if (obj === null) return;\n project.obj = {};\n if (data.safeRender) data.safeRender = null;\n setPreprocessor('html', obj.html_pre_processor);\n setPreprocessor('css', obj.css_pre_processor);\n setPreprocessor('javascript', obj.javascript_pre_processor);\n project.name = obj.name;\n project.version = obj.version;\n project.title = obj.title;\n project.description = obj.description;\n project.author = obj.author;\n project.url = obj.url;\n project.logo = obj.logo;\n project.console = obj.console;\n project.dark = obj.dark;\n project.module = obj.module;\n project.autorun = obj.autorun;\n project.pwa = obj.pwa;\n project.activePanel = obj.activePanel;\n project.preview = obj.preview;\n project.columns = obj.columns;\n project.columnsRight = obj.columnsRight;\n \n project.meta = obj.meta;\n project.libraries = obj.libraries;\n project.html = obj.html;\n project.css = obj.css;\n project.javascript = obj.javascript;\n\n // Dispatch changes to editors\n if (window.editorManager) {\n dispatchChanges(editorManager.htmlEditor, project.html);\n dispatchChanges(editorManager.cssEditor, project.css);\n dispatchChanges(editorManager.jsEditor, project.javascript);\n }\n\n data.safeRender = true;\n renderPreview(true);\n}\nfunction importProject() {\n Modal.render({\n title: \"Are you sure you want to load a new project?\",\n content: `<div class=\"p-4 text-center\">All current data will be lost.</div>`,\n onClose: function () {\n data.menuDialog = true;\n },\n onConfirm: function() {\n const input = document.createElement('input');\n input.type = 'file';\n input.accept = '.json';\n\n input.addEventListener('change', (event) => {\n const file = event.target.files[0];\n \n if (!file) {\n console.error('No file selected.');\n return;\n }\n \n const reader = new FileReader();\n \n reader.onload = event => {\n try {\n importJSON(JSON.parse(event.target.result));\n } catch (error) {\n console.error('Error parsing JSON file:', error);\n }\n };\n \n reader.readAsText(file);\n input.remove();\n });\n \n input.click();\n }\n });\n}\n\nfunction getFileNameAndType(url) {\n // Extract the file name with extension from the URL\n const fileName = url.substring(url.lastIndexOf('/') + 1);\n \n // Extract the file extension\n const fileExtension = fileName.split('.').pop().toLowerCase();\n \n // Map file extensions to MIME types\n const mimeTypes = {\n 'jpeg': 'image/jpeg',\n 'jpg': 'image/jpeg',\n 'png': 'image/png',\n 'gif': 'image/gif',\n 'bmp': 'image/bmp',\n 'webp': 'image/webp',\n 'svg': 'image/svg+xml',\n 'mp3': 'audio/mpeg',\n 'wav': 'audio/wav',\n 'ogg': 'audio/ogg',\n 'mp4': 'video/mp4',\n 'webm': 'video/webm',\n 'ogv': 'video/ogg'\n };\n \n // Get the MIME type based on the file extension\n const fileType = mimeTypes[fileExtension] || 'application/octet-stream';\n \n return {\n fileName,\n fileType\n };\n}\nfunction fetchResources(obj) {\n try {\n const doc = new DOMParser().parseFromString(obj.html, 'text/html');\n const body = doc.body;\n\n const imageUrls = [];\n const audioUrls = [];\n const vectors = [];\n const videoUrls = [];\n\n // Extract image URLs\n body.querySelectorAll('img').forEach(img => {\n if (img.hasAttribute('src')) {\n imageUrls.push(img.getAttribute('src'));\n img.src = `imgs/${getFileNameAndType(img.getAttribute('src')).fileName}`;\n }\n });\n\n // Extract audio URLs\n body.querySelectorAll('audio').forEach(audio => {\n audio.querySelectorAll('source').forEach(source => {\n if (source.hasAttribute('src')) {\n audioUrls.push(source.getAttribute('src'));\n source.src = `audios/${getFileNameAndType(source.getAttribute('src')).fileName}`;\n }\n });\n });\n\n // Extract vectors\n body.querySelectorAll('svg').forEach(svg => {\n vectors.push(svg.outerHTML);\n });\n\n // Extract video URLs\n body.querySelectorAll('video').forEach(video => {\n video.querySelectorAll('source').forEach(source => {\n if (source.hasAttribute('src')) {\n videoUrls.push(source.getAttribute('src'));\n source.src = `vids/${getFileNameAndType(source.getAttribute('src')).fileName}`;\n }\n });\n });\n\n return {\n imageUrls,\n audioUrls,\n vectors,\n videoUrls\n };\n } catch (error) {\n console.error('Error fetching resources:', error);\n return null; // Or handle the error in an appropriate way\n }\n}\nasync function getBase64Media(mediaUrl) {\n const response = await fetch(mediaUrl);\n const blob = await response.blob();\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onloadend = () => resolve(reader.result.split(',')[1]);\n reader.onerror = reject;\n reader.readAsDataURL(blob);\n });\n}\nasync function downloadJSON() {\n try {\n await loadScript(\"libraries/jszip/FileSaver.min.js\");\n let blob = new Blob([JSON.stringify(project, null, 2)], {type: \"application/json\"});\n saveAs(blob, `${project.name.split(' ').join('').toLowerCase()}-kodeWeave.json`);\n\n } catch (error) {\n console.error('Error:', error);\n } finally {\n // Clean up scripts after use\n removeScript(\"libraries/jszip/FileSaver.min.js\");\n }\n}\nasync function downloadProject() {\n try {\n await loadScripts([\n \"libraries/jszip/jszip.min.js\",\n \"libraries/jszip/FileSaver.min.js\"\n ]);\n \n let { imageUrls, audioUrls, vectors, videoUrls } = fetchResources(project);\n\n // Extract srcset URLs\n const iframe = document.getElementById('iframe');\n if (!iframe) return;\n\n const idoc = iframe.contentDocument || iframe.contentWindow.document;\n const srcsetUrls = idoc.querySelectorAll('img[srcset]').forEach(img => {\n img.srcset.split(',').forEach(srcset => {\n const url = srcset.trim().split(' ')[0];\n imageUrls.push(url);\n });\n });\n\n function extractBackgroundImageUrls(css) {\n const urls = [];\n const regex = /background-image\\s*:\\s*url\\(([^)]+)\\)/g;\n let match;\n while ((match = regex.exec(css)) !== null) {\n let url = match[1].replace(/['\"]/g, \"\"); // Remove quotes around URLs\n if (!url.startsWith(\"data:\")) {\n urls.push(url);\n }\n }\n return urls;\n }\n \n // Extract background-image URLs from project CSS\n const backgroundUrls = extractBackgroundImageUrls(await compileCode('css'));\n imageUrls = imageUrls.concat(backgroundUrls); // Add to image URLs to download\n\n const zip = new JSZip();\n\n // Project file\n zip.file(`${project.name.split(' ').join('').toLowerCase()}-kodeWeave.json`, JSON.stringify(project, null, 2));\n\n function checkCSSDependencies() {\n if (project.css.trim() !== '') {\n return `\n \"postcss\": \"^8.4.6\",\n \"autoprefixer\": \"^10.4.2\",\n \"cssnano\": \"^5.0.12\"`;\n }\n return '';\n }\n \n function checkJSDependencies() {\n if (project.javascript_pre_processor === 'babel' || project.javascript_pre_processor === 'jsxtypescript') {\n return `,\n \"@babel/core\": \"^7.15.5\",\n \"@babel/preset-env\": \"^7.15.6\",\n \"@babel/preset-react\": \"^7.14.5\",\n \"rollup-plugin-babel\": \"^4.4.0\"`;\n }\n if (project.javascript_pre_processor === 'typescript' || project.javascript_pre_processor === 'jsxtypescript') {\n return `,\n \"rollup-plugin-typescript2\": \"^0.31.1\",\n \"typescript\": \"^4.4.3\"`;\n }\n return '';\n }\n \n // Nodejs Package JSON\n let nodeStr = `{\n \"name\": \"${project.name.toLowerCase().split(' ').join('')}\",\n \"version\": \"${project.version}\",\n \"type\": \"module\",\n \"scripts\": {\n ${project.css.trim() !== '' ? `\"build:css\": \"postcss src/styles.css -o dist/styles.min.css\",\n ` : ''}\"build:js\": \"rollup -c && terser dist/script.js -o dist/script.min.js\",\n \"build\": \"${project.css.trim() !== '' ? 'npm run build:css && ' : ''}npm run build:js\",\n \"serve\": \"http-server -c-1 -p 8081\"\n },\n \"devDependencies\": {\n \"rollup\": \"^2.79.1\",\n \"rollup-plugin-terser\": \"^7.0.2\",\n \"terser\": \"^5.10.0\",\n \"http-server\": \"^14.1.1\"${checkCSSDependencies()}${checkJSDependencies()}\n }\n}`;\n zip.file(\"package.json\", nodeStr);\n \n // Rollup Configuration\n let rollupPlugins = `import { terser } from 'rollup-plugin-terser';\n`;\n \n if (project.javascript_pre_processor === 'babel' || project.javascript_pre_processor === 'jsxtypescript') {\n rollupPlugins += `import babel from 'rollup-plugin-babel';\n`;\n }\n \n if (project.javascript_pre_processor === 'typescript' || project.javascript_pre_processor === 'jsxtypescript') {\n rollupPlugins += `import typescript from 'rollup-plugin-typescript2';\n`;\n }\n \n let rollupStr = `${rollupPlugins}\nexport default {\n ${project.javascript_pre_processor === 'typescript' || project.javascript_pre_processor === 'jsxtypescript' ? \"input: 'src/script.ts', // entry point for your TypeScript\" : \"input: 'src/script.js', // entry point to your Javascript\"}\n output: {\n file: 'dist/script.js',\n format: ${project.module ? \"'es'\" : \"'iife'\"}, // Immediately Invoked Function Expression, suitable for <script> tags\n name: '${project.name.toLowerCase().split(' ').join('')}'\n },\n plugins: [\n ${project.javascript_pre_processor === 'typescript' || project.javascript_pre_processor === 'jsxtypescript' ? 'typescript(),' : ''}\n ${project.javascript_pre_processor === 'babel' || project.javascript_pre_processor === 'jsxtypescript' ? 'babel({ exclude: \"node_modules/**\" }),' : ''}\n terser() // minifies the JavaScript\n ]\n};`;\n zip.file(\"rollup.config.js\", rollupStr);\n \n // PostCSS Configuration\n if (project.css.trim() !== '') {\n let postcssStr = `module.exports = {\n plugins: [\n require('autoprefixer'), // adds vendor prefixes\n require('cssnano') // minifies the CSS\n ]\n};`;\n zip.file(\"postcss.config.js\", postcssStr);\n }\n \n // Babel Configuration\n if (project.javascript_pre_processor === 'babel' || project.javascript_pre_processor === 'jsxtypescript') {\n let babelStr = `{\n \"presets\": [\n \"@babel/preset-env\",\n ${project.javascript_pre_processor === 'jsxtypescript' ? `\"@babel/preset-typescript\",` : ''}\n \"@babel/preset-react\"\n ]\n}`;\n zip.file(\"babel.config.json\", babelStr);\n }\n \n // TypeScript Configuration\n if (project.javascript_pre_processor === 'typescript' || project.javascript_pre_processor === 'jsxtypescript') {\n let tsconfig = `{\n \"compilerOptions\": {\n \"target\": \"ES5\",\n \"module\": \"ESNext\",\n \"moduleResolution\": \"Node\",\n \"jsx\": \"react\",\n \"allowJs\": true,\n \"checkJs\": false,\n \"outDir\": \"./dist\",\n \"strict\": true\n },\n \"include\": [\"src/**/*\"]\n}`;\n zip.file(\"tsconfig.json\", tsconfig);\n } \n\n let licenseStr = `The MIT License (MIT)\nCopyright (c) ${new Date().getFullYear()} ${project.author}\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.`;\n zip.file(\"LICENSE.md\", licenseStr);\n\n let READMEStr = `# ${project.name}\n\nA Weave created on [kodeWeave](https://michaelsboost.com/kodeWeave/go)\n\n${project.description}`;\n zip.file(\"README.md\", READMEStr);\n\n // Always include the original logo\n if (project.logo) {\n try {\n let base64Logo = '';\n \n if (project.logo.startsWith('data:')) {\n // If logo is already a data URL, extract base64 part\n base64Logo = project.logo; // Get the base64 part\n } else {\n // Otherwise fetch and convert to base64\n base64Logo = await getBase64Media(project.logo);\n }\n \n // Determine file extension based on MIME type\n let logoType;\n if (project.logo.startsWith('data:image/png')) {\n logoType = 'png';\n } else if (project.logo.startsWith('data:image/jpeg')) {\n logoType = 'jpeg';\n } else if (project.logo.startsWith('data:image/svg+xml')) {\n logoType = 'svg';\n } else {\n console.error('Unsupported logo MIME type:', project.logo);\n return; // Exit or handle error appropriately\n }\n \n const logoFileName = `logo.${logoType}`;\n zip.folder('imgs').file(logoFileName, base64Logo.split(\",\")[1], { base64: true });\n \n // Add icons to manifest.json based on image sizes\n const sizes = ['192x192', '256x256', '384x384', '512x512'];\n const icons = sizes.map(size => ({\n \"src\": `../imgs/logo-${size}.png`,\n \"sizes\": size,\n \"type\": \"image/png\",\n \"purpose\": \"any\"\n }));\n for (const size of sizes) {\n const canvas = document.createElement('canvas');\n canvas.width = parseInt(size.split('x')[0]);\n canvas.height = parseInt(size.split('x')[1]);\n const ctx = canvas.getContext('2d');\n\n // Draw logo on canvas at the desired size\n const img = new Image();\n img.src = base64Logo;\n img.onload = function() {\n ctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n const base64Image = canvas.toDataURL('image/png').replace(/^data:image\\/(png|jpg);base64,/, '');\n zip.folder('imgs').file(`logo-${size}.png`, base64Image, { base64: true });\n };\n\n // Clean up canvas element\n canvas.remove();\n }\n \n zip.file(`dist/manifest.json`, JSON.stringify({\n \"theme_color\": \"#13171f\",\n \"background_color\": \"#13171f\",\n \"display\": \"standalone\",\n \"start_url\": \"./index.html\",\n \"lang\": \"en-US\",\n \"name\": project.name,\n \"short_name\": project.name,\n \"description\": project.description,\n \"icons\": icons\n }, null, 2));\n \n } catch (error) {\n console.error('Error adding logo to ZIP:', error);\n return; // Exit method or handle error as needed\n }\n }\n\n function minifyCSS(cssCode) {\n let input = cssCode;\n const output = input\n .replace(/\\/\\*.*\\*\\/|\\/\\*[\\s\\S]*?\\*\\/|\\n|\\t|\\v|\\s{2,}/g, '')\n .replace(/\\s*\\{\\s*/g, '{')\n .replace(/\\s*\\}\\s*/g, '}')\n .replace(/\\s*\\:\\s*/g, ':')\n .replace(/\\s*\\;\\s*/g, ';')\n .replace(/\\s*\\,\\s*/g, ',')\n .replace(/\\s*\\~\\s*/g, '~')\n .replace(/\\s*\\>\\s*/g, '>')\n .replace(/\\s*\\+\\s*/g, '+')\n .replace(/\\s*\\!\\s*/g, ' !');\n return output;\n }\n\n // let minifiedLESS = minifyCSS(iframe.contentDocument.getElementById('aeoibrfa1').textContent);\n let minifiedCSS = minifyCSS(await compileCode('css'));\n\n // Add style.css\n if (project.css_pre_processor === 'css') zip.file('src/style.css', project.css);\n if (project.css_pre_processor === 'css') zip.file('dist/style.css', project.css);\n if (project.css_pre_processor === 'stylus') zip.file('src/style.styl', project.css);\n if (project.css_pre_processor === 'stylus') zip.file('dist/style.css', minifiedCSS);\n if (project.css_pre_processor === 'less') zip.file('src/style.less', project.css);\n if (project.css_pre_processor === 'less') zip.file('dist/style.css', iframe.contentDocument.getElementById('aeoibrfa1').textContent);\n if (project.css_pre_processor === 'sass') zip.file('src/style.scss', project.css);\n if (project.css_pre_processor === 'sass') zip.file('dist/style.css', minifiedCSS);\n\n async function minifyJS(jsCode) {\n // detect if terser exists\n if (!document.querySelector(\"script[src='libraries/terser/bundle.min.js']\")) {\n await loadScript(\"libraries/terser/bundle.min.js\");\n }\n return Terser.minify(jsCode);\n }\n\n let minifiedJS = await minifyJS(await compileCode('javascript'));\n minifiedJS = minifiedJS.code;\n\n // Add script.js\n if (project.javascript_pre_processor === 'javascript') zip.file('src/script.js', project.javascript);\n if (project.javascript_pre_processor === 'javascript') zip.file('dist/script.js', project.javascript);\n if (project.javascript_pre_processor === 'babel') zip.file('src/script.js', project.javascript);\n if (project.javascript_pre_processor === 'babel') zip.file('dist/script.js', minifiedJS);\n if (project.javascript_pre_processor === 'typescript') zip.file('src/script.ts', project.javascript);\n if (project.javascript_pre_processor === 'typescript') zip.file('dist/script.js', minifiedJS);\n if (project.javascript_pre_processor === 'jsxtypescript') zip.file('src/script.ts', project.javascript);\n if (project.javascript_pre_processor === 'jsxtypescript') zip.file('dist/script.js', minifiedJS);\n\n // if pwa is enabled\n let swinit = '';\n if (project.pwa) {\n swinit = `\n <script src=\"https://storage.googleapis.com/workbox-cdn/releases/6.4.1/workbox-sw.js\"></script>\n <script>\n // service worker for progressive web app\n if ('serviceWorker' in navigator) {\n window.addEventListener('load', () => {\n navigator.serviceWorker.register('./dist/sw.js')\n })\n }\n </script>`;\n const swjs = `// Service worker code\nimportScripts('https://storage.googleapis.com/workbox-cdn/releases/6.4.1/workbox-sw.js');\n\nconst { registerRoute } = workbox.routing;\nconst { CacheFirst } = workbox.strategies;\n\nconst cacheName = '${project.name.split(' ').join('')}-cache';\n\nworkbox.routing.registerRoute(\n({ request }) => request.destination === 'script' ||\n request.destination === 'style' ||\n request.destination === 'document' ||\n request.destination === 'image' ||\n request.destination === 'font' ||\n request.destination === 'audio' ||\n request.destination === 'video',\nnew CacheFirst({\ncacheName: cacheName,\nplugins: [\n// Any additional plugins can be added here\n],\n})\n);`\n zip.file(\"dist/sw.js\", swjs);\n }\n\n // Iterate over each library\n let scriptTags = '';\n let cssTags = '';\n project.libraries.forEach(library => {\n if (library.endsWith('.js')) {\n scriptTags += `<script src=\"${library}\"></script>\\n `;\n } else if (library.endsWith('.css')) {\n cssTags += `<link rel=\"stylesheet\" href=\"${library}\">\\n `;\n } else {\n // Assuming it's a Google font\n cssTags += `<link href=\"${library}\" rel=\"stylesheet\">\\n `;\n }\n });\n \n // Add index.html\n const indexHtmlContentCompiled = `<!DOCTYPE html>\n<html lang=\"en\" data-theme=\"${project.dark ? 'dark' : 'light'}\">\n <head>\n <title>${project.title}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ${cssTags}${project.css ? '' : ''}\n ${project.meta ? `${project.meta}\\n ` : ''}\n ${scriptTags ? scriptTags : ''}\n \n \n\n${await compileCode('html')}\n\n${project.javascript ? '' : ''}\n${(project.pwa ? swinit : '')}\n \n`;\n if (project.html_pre_processor === 'html') zip.file('src/index.html', project.html);\n if (project.html_pre_processor === 'html') zip.file('index.html', indexHtmlContentCompiled);\n if (project.html_pre_processor === 'markdown') zip.file('src/index.md', project.html);\n if (project.html_pre_processor === 'markdown') zip.file('index.html', indexHtmlContentCompiled);\n if (project.html_pre_processor === 'pug') zip.file('src/index.pug', project.html);\n if (project.html_pre_processor === 'pug') zip.file('index.html', indexHtmlContentCompiled);\n if (project.html_pre_processor === 'jade') zip.file('src/index.jade', project.html);\n if (project.html_pre_processor === 'jade') zip.file('index.html', indexHtmlContentCompiled);\n\n // Create a folder \"imgs\" and add images inside it with their correct MIME types\n if (audioUrls.length > 0) {\n const audioFolder = zip.folder('audios');\n try {\n for (const audioUrl of audioUrls) {\n const base64Audio = await getBase64Media(audioUrl);\n audioFolder.file(audioUrl.substring(audioUrl.lastIndexOf('/') + 1), base64Audio, { base64: true });\n }\n } catch (error) {\n console.error('Error adding audio to ZIP:', error);\n return;\n }\n }\n if (imageUrls.length > 0) {\n const imgFolder = zip.folder('imgs');\n try {\n // Convert each image URL to Base64 and add to ZIP folder\n for (const imageUrl of imageUrls) {\n const base64Image = await getBase64Media(imageUrl);\n imgFolder.file(imageUrl.substring(imageUrl.lastIndexOf('/') + 1), base64Image, { base64: true });\n }\n } catch (error) {\n console.error('Error adding images to ZIP:', error);\n return; // Exit method or handle error as needed\n }\n }\n if (vectors.length > 0) {\n const svgFolder = zip.folder('svgs');\n try {\n // Convert each SVG to a file inside the 'svgs' folder\n vectors.forEach((svg, index) => {\n svgFolder.file(`vector-${index + 1}.svg`, svg);\n });\n } catch (error) {\n console.error('Error adding images to ZIP:', error);\n return; // Exit method or handle error as needed\n }\n }\n if (videoUrls.length > 0) {\n const videoFolder = zip.folder('vids');\n try {\n for (const videoUrl of videoUrls) {\n const base64Video = await getBase64Media(videoUrl);\n videoFolder.file(videoUrl.substring(videoUrl.lastIndexOf('/') + 1), base64Video, { base64: true });\n }\n } catch (error) {\n console.error('Error adding videos to ZIP:', error);\n return;\n }\n }\n\n // Generate the ZIP file\n const blob = await zip.generateAsync({ type: 'blob' });\n saveAs(blob, `${project.name.toLowerCase().split(' ').join('')}.zip`);\n \n // Clear all arrays after saving\n imageUrls.length = audioUrls.length = videoUrls.length = 0;\n } catch (error) {\n console.error('Error:', error);\n } finally {\n // Clean up scripts after use\n const scriptsToRemove = [\n 'libraries/jszip/FileSaver.min.js',\n 'libraries/jszip/jszip.min.js'\n ];\n\n removeScripts(scriptsToRemove);\n }\n}\nasync function share() {\n try {\n // Compile code if necessary\n const javascriptCode = project.javascript_pre_processor === 'jsxtypescript'\n ? data.compiledJSX\n : project.javascript;\n\n let jsPreprocessor = null;\n if (project.javascript_pre_processor === 'jsxtypescript' || project.javascript_pre_processor === 'javascript') {\n jsPreprocessor = \"none\";\n } else {\n jsPreprocessor = project.javascript_pre_processor;\n }\n\n const shareProject = {\n title: project.title,\n description: project.description,\n head: project.meta,\n html: project.html,\n html_pre_processor: project.html_pre_processor === \"html\" ? \"none\" : \"\",\n css: project.css,\n css_pre_processor: project.css_pre_processor === \"css\" ? \"none\" : \"\",\n css_external: project.libraries.filter(lib => lib.endsWith('.css')).join(';'),\n css_starter: \"neither\",\n css_prefix: \"neither\",\n js_module: project.module,\n js: javascriptCode,\n js_pre_processor: jsPreprocessor,\n js_external: project.libraries.filter(lib => lib.endsWith('.js')).join(';'),\n editors: '111',\n layout: 'left'\n };\n\n // Stringify the JSON object and escape quotes\n const JSONstring = JSON.stringify(shareProject)\n .replace(/\"/g, \""\")\n .replace(/'/g, \"'\");\n\n // Create form element\n const form = `\n
\n \n \n
`;\n\n // Append form to the document body and submit\n document.body.insertAdjacentHTML('beforeend', form);\n document.querySelector('form').submit();\n document.querySelector('form').remove();\n } catch (error) {\n console.error('Error sharing project:', error);\n }\n}\n\nasync function screenshot() {\n const iframe = document.getElementById('iframe');\n const iframeDocument = iframe.contentDocument || iframe.contentWindow.document;\n\n try {\n await loadScripts([\n \"libraries/html2canvas/html2canvas.min.js\",\n \"libraries/jszip/FileSaver.min.js\"\n ]);\n \n html2canvas(iframeDocument.documentElement).then(canvas => {\n const context = canvas.getContext('2d');\n const videoElements = iframeDocument.getElementsByTagName('video');\n\n // Draw video elements\n Array.from(videoElements).forEach(video => {\n const { currentTime, paused, volume } = video;\n\n // Set volume to 0 for the screenshot process\n video.volume = 0;\n\n // Draw the video frame\n if (!paused) video.pause();\n context.drawImage(video, video.offsetLeft, video.offsetTop, video.clientWidth, video.clientHeight);\n\n // Restore the original volume and playback state\n video.volume = volume;\n video.currentTime = currentTime;\n if (!paused) video.play();\n });\n\n // Convert canvas to Blob\n canvas.toBlob(blob => {\n // Save the Blob using FileSaver.js\n saveAs(blob, 'screenshot.png');\n }, 'image/png');\n }).catch(error => {\n console.error('Error taking screenshot:', error);\n });\n } catch (error) {\n console.error('Error:', error);\n } finally {\n // Clean up scripts after use\n removeScript(\"../libraries/html2canvas/html2canvas.min.js\");\n removeScript(\"../libraries/jszip/FileSaver.min.js\");\n }\n}\nasync function renderPreview(forceRun = false) {\n if (!forceRun || !project.autorun || !data.safeRender) return;\n\n if (data.safeRender) {\n let scriptTags = '';\n let cssTags = '';\n project.libraries.forEach(library => {\n if (library.endsWith('.js')) {\n scriptTags += `\\n `;\n } else if (library.endsWith('.css')) {\n cssTags += `\\n `;\n } else {\n cssTags += `\\n `;\n }\n });\n\n const javascriptCode = await compileCode('javascript');\n const cssCode = await compileCode('css');\n const consoleCSS = `\n [data-zwj=zwjkonsole] {\n display: ${project.console ? 'flex' : 'none'};\n }`\n const iframeSrc = `\n \n ${project.title}\n \n \n \n \n ${project.meta ? project.meta : ''}\n ${cssTags}\n \n \n \n \n ${await compileCode('html')}\n ${scriptTags ? scriptTags : ''}\n ${project.css_pre_processor === 'less' ? '' : ''}\n \n`;\n\n const iframe = document.getElementById('iframe');\n if (!iframe) return;\n\n const parser = new DOMParser();\n const doc = parser.parseFromString(iframeSrc, 'text/html');\n const idoc = iframe.contentDocument || iframe.contentWindow.document;\n\n if (!forceRun && !App.initialRender) {\n diffNodes(idoc.documentElement, doc.documentElement);\n return false;\n } else {\n iframe.setAttribute('srcdoc', iframeSrc);\n iframe.onload = () => {\n // Initialize script within the iframe\n const idoc = iframe.contentDocument || iframe.contentWindow.document;\n const script = idoc.createElement('script');\n script.id = \"zzkiapxab\";\n script.type = project.module ? 'module' : 'text/javascript';\n script.textContent = javascriptCode;\n idoc.body.appendChild(script);\n };\n }\n }\n}\n\n// Make functions available in global space\nwindow.Modal = Modal;\nwindow.emptyStorage = emptyStorage;\nwindow.addLibrary = addLibrary;\nwindow.fetchSuggestions = fetchSuggestions;\nwindow.setPreprocessor = setPreprocessor;\nwindow.initializePreprocessors = initializePreprocessors;\nwindow.loadBeautifyLibraries = loadBeautifyLibraries\nwindow.removeBeautifyLibraries = removeBeautifyLibraries;\nwindow.tidy = tidy;\nwindow.generateId = generateId;\nwindow.resizeCanvas = resizeCanvas;\nwindow.rotateCanvas = rotateCanvas;\nwindow.defineScale = defineScale;\nwindow.getIFrameClientSize = getIFrameClientSize;\nwindow.handleLogoChange = handleLogoChange;\nwindow.newProject = newProject;\nwindow.importProject = importProject;\nwindow.downloadJSON = downloadJSON;\nwindow.downloadProject = downloadProject;\nwindow.share = share;\nwindow.screenshot = screenshot;\nwindow.renderPreview = renderPreview;\n\n// Diffing algorithm to update ui when changes occur\nfunction diffNodes(oldNode, newNode) {\n if (!oldNode || !newNode) {\n return;\n }\n\n // Check for data-ignore attribute\n if (oldNode.hasAttribute && oldNode.hasAttribute('data-ignore') || \n newNode.hasAttribute && newNode.hasAttribute('data-ignore')) {\n return;\n }\n\n // Check if nodes are iframe elements\n if (oldNode.nodeName === 'IFRAME' && newNode.nodeName === 'IFRAME') {\n const acceptableIframeAttributes = ['id', 'title', 'class', 'style', 'sandbox'];\n // Compare acceptable attributes only\n acceptableIframeAttributes.forEach(attr => {\n if (oldNode.getAttribute(attr) !== newNode.getAttribute(attr)) {\n oldNode.setAttribute(attr, newNode.getAttribute(attr));\n }\n });\n\n const oldSrcdoc = oldNode.getAttribute('srcdoc');\n const newSrcdoc = newNode.getAttribute('srcdoc');\n // Ignore srcdoc attribute if it hasn't changed\n if (oldSrcdoc === newSrcdoc) return;\n return;\n }\n\n // If nodes are different types, replace the old node\n if (oldNode.nodeName !== newNode.nodeName) {\n oldNode.replaceWith(newNode.cloneNode(true));\n // console.log('Different node names:', oldNode, newNode);\n return;\n }\n\n // Diff the attributes of the nodes\n if (oldNode.nodeType === Node.ELEMENT_NODE && newNode.nodeType === Node.ELEMENT_NODE) {\n const oldAttributes = Array.from(oldNode.attributes);\n const newAttributes = Array.from(newNode.attributes);\n\n // Remove old attributes not present in the new node\n oldAttributes.forEach(attr => {\n if (!newNode.hasAttribute(attr.name)) {\n oldNode.removeAttribute(attr.name);\n }\n });\n\n // Add or update attributes from the new node\n newAttributes.forEach(attr => {\n if (oldNode.getAttribute(attr.name) !== attr.value) {\n oldNode.setAttribute(attr.name, attr.value);\n }\n });\n }\n\n const oldChildren = Array.from(oldNode.childNodes);\n const newChildren = Array.from(newNode.childNodes);\n\n // Update or remove existing child nodes\n oldChildren.forEach((oldChild, index) => {\n const newChild = newChildren[index];\n if (!newChild) {\n oldNode.removeChild(oldChild);\n return;\n }\n // Special handling for elements\n if (oldNode.tagName === 'TITLE' || oldNode.tagName === 'STYLE' && oldNode.textContent !== newNode.textContent) {\n oldNode.textContent = newNode.textContent;\n } else if (oldChild.nodeType === Node.TEXT_NODE && oldChild.nodeValue !== newChild.nodeValue) {\n oldChild.nodeValue = newChild.nodeValue;\n }\n diffNodes(oldChild, newChild);\n });\n\n // Add new child nodes\n newChildren.slice(oldChildren.length).forEach(newChild => {\n oldNode.appendChild(newChild.cloneNode(true));\n });\n}\n\n// Once dom has loaded init functions\ndocument.addEventListener('DOMContentLoaded', function() {\n window.onload = () => {\n App.render('#app');\n if (window.initEditors) initEditors();\n getIFrameClientSize();\n\n if (localStorage.getItem('kodeWeave')) {\n setTimeout(function() {\n importJSON(JSON.parse(localStorage.getItem('kodeWeave')));\n }, 100);\n } else {\n data.safeRender = true;\n }\n }\n window.onresize = () => getIFrameClientSize();\n});"], + "mappings": "gQACA,SAASA,EAASC,EAAQC,EAAUC,EAAO,CAAC,EAAG,CAC7C,SAASC,EAAYH,EAAQE,EAAM,CACjC,OAAI,OAAOF,GAAW,UAAYA,IAAW,KACpCA,EAGF,IAAI,MAAMA,EAAQ,CACvB,IAAII,EAAKC,EAAUC,EAAO,CACxB,IAAMC,EAAW,CAAC,GAAGL,EAAMG,CAAQ,EAC7BG,EAAWJ,EAAIC,CAAQ,EACvBI,EAAS,QAAQ,IAAIL,EAAKC,EAAUF,EAAYG,EAAOC,CAAQ,CAAC,EAEtE,OAAIC,IAAaF,GACfL,EAASM,EAAUC,EAAUF,CAAK,EAG7BG,CACT,EACA,IAAIL,EAAKC,EAAU,CACjB,IAAMC,EAAQF,EAAIC,CAAQ,EAC1B,OAAI,OAAOC,GAAU,UAAYA,IAAU,KAClCH,EAAYG,EAAO,CAAC,GAAGJ,EAAMG,CAAQ,CAAC,EAExCC,CACT,CACF,CAAC,CACH,CAEA,OAAOH,EAAYH,EAAQE,CAAI,CACjC,CAGA,IAAIQ,EAAM,CACR,KAAM,YACN,OAAQ,CACN,KAAM,mBACN,KAAM,6BACN,IAAK,iBACP,EACA,QAAS,MACT,IAAK,8CACL,QAAS,8DACX,EACIC,GAAI,CACN,KAAM,WACN,QAAS,IACT,MAAO,sBACP,YAAa,wCACb,OAAQ,YACR,IAAK,6BACL,KAAM,GACN,UAAW,CAAC,EACZ,mBAAoB,OACpB,kBAAmB,MACnB,yBAA0B,aAC1B,KAAM,GACN,IAAK,GACL,WAAY,GACZ,KAAM,q+IACN,QAAS,GACT,KAAM,GACN,OAAQ,GACR,QAAS,GACT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P,EAAQ,UAAU,EAGjDM,EAAY,QAAQ,CAACE,EAAUtL,IAAU,CACvC,IAAMuL,EAAWF,EAAYrL,CAAK,EAClC,GAAI,CAACuL,EAAU,CACbV,EAAQ,YAAYS,CAAQ,EAC5B,MACF,CAEIT,EAAQ,UAAY,SAAWA,EAAQ,UAAY,SAAWA,EAAQ,cAAgBC,EAAQ,YAChGD,EAAQ,YAAcC,EAAQ,YACrBQ,EAAS,WAAa,KAAK,WAAaA,EAAS,YAAcC,EAAS,YACjFD,EAAS,UAAYC,EAAS,WAEhCzK,EAAUwK,EAAUC,CAAQ,CAC9B,CAAC,EAGDF,EAAY,MAAMD,EAAY,MAAM,EAAE,QAAQG,GAAY,CACxDV,EAAQ,YAAYU,EAAS,UAAU,EAAI,CAAC,CAC9C,CAAC,CACH,CAGA,SAAS,iBAAiB,mBAAoB,UAAW,CACvD,OAAO,OAAS,IAAM,CACpBjN,EAAI,OAAO,MAAM,EACb,OAAO,aAAa,YAAY,EACpCgG,EAAoB,EAEhB,aAAa,QAAQ,WAAW,EAClC,WAAW,UAAW,CACpBoB,GAAW,KAAK,MAAM,aAAa,QAAQ,WAAW,CAAC,CAAC,CAC1D,EAAG,GAAG,EAENhH,EAAK,WAAa,EAEtB,EACA,OAAO,SAAW,IAAM4F,EAAoB,CAC9C,CAAC", "names": ["onChange", "target", "callback", "path", "createProxy", "obj", "property", "value", "fullPath", "oldValue", "result", "app", "p", "d", "icons", "SidebarIconCSS", "navIconCSS", "modalIconCSS", "panelIconCSS", "previewIconCSS", "project", "newValue", "doc", "App", "string", "consoleCSS", "renderPreview", "data", "LeftMenubar", "buttonSize", "PreviewMenu", "buttonClass", "selectClass", "selectStyle", "sizeOptions", "previewSize", "group", "option", "canTidyShow", "container", "size", "viewportWidth", "viewportHeight", "previewElm", "width", "height", "menuDialog", "settingsHTML", "library", "index", "librariesDialog", "buttonContentClass", "imageContentClass", "textContentClass", "frameworks", "buttonHTML", "name", "demosDialog", "html", "editorNav", "element", "currentDoc", "newDoc", "diffNodes", "Modal", "large", "title", "content", "CloseLabel", "ConfirmLabel", "onLoad", "onClose", "onConfirm", "hClass", "modal", "timesBtn", "closeBtn", "confirmBtn", "emptyStorage", "c", "names", "registrations", "registration", "addLibrary", "url", "renderLibraries", "fetchSuggestions", "key", "response", "item", "suggestions", "error", "removeScript", "src", "script", "removeScripts", "scripts", "loadScript", "scriptUrl", "resolve", "reject", "scriptElement", "loadScripts", "srcArray", "setPreprocessor", "editor", "scriptMap", "currentPreprocessors", "scriptSrcCondition", "scriptSrc", "currentScriptSrc", "initializePreprocessors", "loadBeautifyLibraries", "removeBeautifyLibraries", "tidy", "formattedCode", "generateId", "id", "resizeCanvas", "getIFrameClientSize", "rotateCanvas", "iframe", "scale", "defineScale", "fadeTimeout", "compileCode", "detect", "appScript", "err", "output", "handleLogoChange", "event", "file", "base64String", "fileToBase64", "reader", "newProject", "capitalizeFirstLetter", "capitalizedTitle", "importJSON", "importProject", "input", "getFileNameAndType", "fileName", "fileExtension", "fileType", "fetchResources", "body", "imageUrls", "audioUrls", "vectors", "videoUrls", "img", "audio", "source", "svg", "video", "getBase64Media", "mediaUrl", "blob", "downloadJSON", "downloadProject", "extractBackgroundImageUrls", "css", "urls", "regex", "match", "checkCSSDependencies", "checkJSDependencies", "minifyCSS", "cssCode", "srcsetUrls", "srcset", "backgroundUrls", "zip", "nodeStr", "rollupPlugins", "rollupStr", "babelStr", "licenseStr", "READMEStr", "base64Logo", "logoType", "logoFileName", "sizes", "canvas", "ctx", "base64Image", "minifiedCSS", "minifyJS", "jsCode", "minifiedJS", "swinit", "swjs", "scriptTags", "cssTags", "indexHtmlContentCompiled", "audioFolder", "audioUrl", "base64Audio", "imgFolder", "imageUrl", "svgFolder", "videoFolder", "videoUrl", "base64Video", "share", "javascriptCode", "jsPreprocessor", "shareProject", "lib", "form", "screenshot", "iframeDocument", "context", "videoElements", "currentTime", "paused", "volume", "forceRun", "iframeSrc", "idoc", "oldNode", "newNode", "attr", "oldSrcdoc", "newSrcdoc", "oldAttributes", "newAttributes", "oldChildren", "newChildren", "oldChild", "newChild"] } diff --git a/go/dist/main.css b/go/dist/main.css new file mode 100644 index 00000000..04d9d3a0 --- /dev/null +++ b/go/dist/main.css @@ -0,0 +1,6 @@ +@charset "UTF-8"; + +/*! + * Pico CSS ✨ v2.0.6 (https://picocss.com) + * Copyright 2019-2024 - Licensed under MIT + */:root{--pico-font-family-emoji:"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--pico-font-family-sans-serif:system-ui,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,Helvetica,Arial,"Helvetica Neue",sans-serif,var(--pico-font-family-emoji);--pico-font-family-monospace:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace,var(--pico-font-family-emoji);--pico-font-family:var(--pico-font-family-sans-serif);--pico-line-height:1.5;--pico-font-weight:400;--pico-font-size:100%;--pico-text-underline-offset:0.1rem;--pico-border-radius:0.25rem;--pico-border-width:0.0625rem;--pico-outline-width:0.125rem;--pico-transition:0.2s ease-in-out;--pico-spacing:1rem;--pico-typography-spacing-vertical:1rem;--pico-block-spacing-vertical:var(--pico-spacing);--pico-block-spacing-horizontal:var(--pico-spacing);--pico-form-element-spacing-vertical:0.75rem;--pico-form-element-spacing-horizontal:1rem;--pico-group-box-shadow:0 0 0 transparent;--pico-group-box-shadow-focus-with-button:0 0 0 var(--pico-outline-width) var(--pico-primary-focus);--pico-group-box-shadow-focus-with-input:0 0 0 0.0625rem var(--pico-form-element-border-color);--pico-modal-overlay-backdrop-filter:blur(0.375rem);--pico-nav-element-spacing-vertical:1rem;--pico-nav-element-spacing-horizontal:0.5rem;--pico-nav-link-spacing-vertical:0.5rem;--pico-nav-link-spacing-horizontal:0.5rem;--pico-nav-breadcrumb-divider:">";--pico-icon-checkbox:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%23FFF' stroke-linecap='round' stroke-linejoin='round' stroke-width='4' viewBox='0 0 24 24'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");--pico-icon-minus:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%23FFF' stroke-linecap='round' stroke-linejoin='round' stroke-width='4' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E");--pico-icon-chevron:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%238891A4' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");--pico-icon-date:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%238891A4' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='18' height='18' x='3' y='4' rx='2' ry='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");--pico-icon-time:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%238891A4' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E");--pico-icon-search:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%238891A4' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");--pico-icon-close:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%238891A4' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' viewBox='0 0 24 24'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");--pico-icon-loading:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' viewBox='0 0 24 24'%3E%3Cstyle%3E@keyframes rotate{0%25{transform:rotate(0deg)}to{transform:rotate(360deg)}}@keyframes dash{0%25{stroke-dasharray:1,100;stroke-dashoffset:0}50%25{stroke-dasharray:44.5,100;stroke-dashoffset:-17.5}to{stroke-dasharray:44.5,100;stroke-dashoffset:-62}}%3C/style%3E%3Cg style='animation:rotate 2s linear infinite;transform-origin:center center'%3E%3Ccircle cx='12' cy='12' r='10' stroke='%238891A4' stroke-width='4' style='stroke-dasharray:75,100;stroke-dashoffset:-5;animation:dash 1.5s ease-in-out infinite;stroke-linecap:round'/%3E%3C/g%3E%3C/svg%3E")}@media (min-width:576px){:root{--pico-font-size:106.25%}}@media (min-width:768px){:root{--pico-font-size:112.5%}}@media (min-width:1024px){:root{--pico-font-size:118.75%}}@media (min-width:1280px){:root{--pico-font-size:125%}}@media (min-width:1536px){:root{--pico-font-size:131.25%}}:where(select,textarea),input:not([type=submit],[type=button],[type=reset],[type=checkbox],[type=radio],[type=file]){--pico-outline-width:0.0625rem}[type=search]{--pico-border-radius:5rem}[type=checkbox],[type=radio]{--pico-border-width:0.125rem}[type=checkbox][role=switch]{--pico-border-width:0.1875rem}[role=search]{--pico-border-radius:5rem}[role=group] [role=button],[role=group] [type=button],[role=group] [type=submit],[role=group] button,[role=search] [role=button],[role=search] [type=button],[role=search] [type=submit],[role=search] button{--pico-form-element-spacing-horizontal:2rem}details summary[role=button]:after{filter:brightness(0) invert(1)}:root:not([data-theme=dark]),[data-theme=light]{--pico-background-color:#fff;--pico-color:#373c44;--pico-text-selection-color:rgba(2,154,232,.25);--pico-muted-color:#646b79;--pico-muted-border-color:#e7eaf0;--pico-primary:#0172ad;--pico-primary-background:#0172ad;--pico-primary-border:var(--pico-primary-background);--pico-primary-underline:rgba(1,114,173,.5);--pico-primary-hover:#015887;--pico-primary-hover-background:#02659a;--pico-primary-hover-border:var(--pico-primary-hover-background);--pico-primary-hover-underline:var(--pico-primary-hover);--pico-primary-focus:rgba(2,154,232,.5);--pico-primary-inverse:#fff;--pico-secondary:#5d6b89;--pico-secondary-background:#525f7a;--pico-secondary-border:var(--pico-secondary-background);--pico-secondary-underline:rgba(93,107,137,.5);--pico-secondary-hover:#48536b;--pico-secondary-hover-background:#48536b;--pico-secondary-hover-border:var(--pico-secondary-hover-background);--pico-secondary-hover-underline:var(--pico-secondary-hover);--pico-secondary-focus:rgba(93,107,137,.25);--pico-secondary-inverse:#fff;--pico-contrast:#181c25;--pico-contrast-background:#181c25;--pico-contrast-border:var(--pico-contrast-background);--pico-contrast-underline:rgba(24,28,37,.5);--pico-contrast-hover:#000;--pico-contrast-hover-background:#000;--pico-contrast-hover-border:var(--pico-contrast-hover-background);--pico-contrast-hover-underline:var(--pico-secondary-hover);--pico-contrast-focus:rgba(93,107,137,.25);--pico-contrast-inverse:#fff;--pico-box-shadow:0.0145rem 0.029rem 0.174rem rgba(129,145,181,.017),0.0335rem 0.067rem 0.402rem rgba(129,145,181,.024),0.0625rem 0.125rem 0.75rem rgba(129,145,181,.03),0.1125rem 0.225rem 1.35rem rgba(129,145,181,.036),0.2085rem 0.417rem 2.502rem rgba(129,145,181,.043),0.5rem 1rem 6rem rgba(129,145,181,.06),0 0 0 0.0625rem rgba(129,145,181,.015);--pico-h1-color:#2d3138;--pico-h2-color:#373c44;--pico-h3-color:#424751;--pico-h4-color:#4d535e;--pico-h5-color:#5c6370;--pico-h6-color:#646b79;--pico-mark-background-color:#fde7c0;--pico-mark-color:#0f1114;--pico-ins-color:#1d6a54;--pico-del-color:#883935;--pico-blockquote-border-color:var(--pico-muted-border-color);--pico-blockquote-footer-color:var(--pico-muted-color);--pico-button-box-shadow:0 0 0 transparent;--pico-button-hover-box-shadow:0 0 0 transparent;--pico-table-border-color:var(--pico-muted-border-color);--pico-table-row-stripped-background-color:rgba(111,120,135,.038);--pico-code-background-color:#f3f5f7;--pico-code-color:#646b79;--pico-code-kbd-background-color:var(--pico-color);--pico-code-kbd-color:var(--pico-background-color);--pico-form-element-background-color:#fbfcfc;--pico-form-element-selected-background-color:#dfe3eb;--pico-form-element-border-color:#cfd5e2;--pico-form-element-color:#23262c;--pico-form-element-placeholder-color:var(--pico-muted-color);--pico-form-element-active-background-color:#fff;--pico-form-element-active-border-color:var(--pico-primary-border);--pico-form-element-focus-color:var(--pico-primary-border);--pico-form-element-disabled-opacity:0.5;--pico-form-element-invalid-border-color:#b86a6b;--pico-form-element-invalid-active-border-color:#c84f48;--pico-form-element-invalid-focus-color:var(--pico-form-element-invalid-active-border-color);--pico-form-element-valid-border-color:#4c9b8a;--pico-form-element-valid-active-border-color:#279977;--pico-form-element-valid-focus-color:var(--pico-form-element-valid-active-border-color);--pico-switch-background-color:#bfc7d9;--pico-switch-checked-background-color:var(--pico-primary-background);--pico-switch-color:#fff;--pico-switch-thumb-box-shadow:0 0 0 transparent;--pico-range-border-color:#dfe3eb;--pico-range-active-border-color:#bfc7d9;--pico-range-thumb-border-color:var(--pico-background-color);--pico-range-thumb-color:var(--pico-secondary-background);--pico-range-thumb-active-color:var(--pico-primary-background);--pico-accordion-border-color:var(--pico-muted-border-color);--pico-accordion-active-summary-color:var(--pico-primary-hover);--pico-accordion-close-summary-color:var(--pico-color);--pico-accordion-open-summary-color:var(--pico-muted-color);--pico-card-background-color:var(--pico-background-color);--pico-card-border-color:var(--pico-muted-border-color);--pico-card-box-shadow:var(--pico-box-shadow);--pico-card-sectioning-background-color:#fbfcfc;--pico-loading-spinner-opacity:0.5;--pico-modal-overlay-background-color:rgba(232,234,237,.75);--pico-progress-background-color:#dfe3eb;--pico-progress-color:var(--pico-primary-background);--pico-tooltip-background-color:var(--pico-contrast-background);--pico-tooltip-color:var(--pico-contrast-inverse);--pico-icon-valid:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%234C9B8A' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");--pico-icon-invalid:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%23C84F48' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 8v4M12 16h.01'/%3E%3C/svg%3E");color-scheme:light}:root:not([data-theme=dark]) input:is([type=submit],[type=button],[type=reset],[type=checkbox],[type=radio],[type=file]),[data-theme=light] input:is([type=submit],[type=button],[type=reset],[type=checkbox],[type=radio],[type=file]){--pico-form-element-focus-color:var(--pico-primary-focus)}@media only screen and (prefers-color-scheme:dark){:root:not([data-theme]){--pico-background-color:#13171f;--pico-color:#c2c7d0;--pico-text-selection-color:rgba(1,170,255,.188);--pico-muted-color:#7b8495;--pico-muted-border-color:#202632;--pico-primary:#01aaff;--pico-primary-background:#0172ad;--pico-primary-border:var(--pico-primary-background);--pico-primary-underline:rgba(1,170,255,.5);--pico-primary-hover:#79c0ff;--pico-primary-hover-background:#017fc0;--pico-primary-hover-border:var(--pico-primary-hover-background);--pico-primary-hover-underline:var(--pico-primary-hover);--pico-primary-focus:rgba(1,170,255,.375);--pico-primary-inverse:#fff;--pico-secondary:#969eaf;--pico-secondary-background:#525f7a;--pico-secondary-border:var(--pico-secondary-background);--pico-secondary-underline:rgba(150,158,175,.5);--pico-secondary-hover:#b3b9c5;--pico-secondary-hover-background:#5d6b89;--pico-secondary-hover-border:var(--pico-secondary-hover-background);--pico-secondary-hover-underline:var(--pico-secondary-hover);--pico-secondary-focus:rgba(144,158,190,.25);--pico-secondary-inverse:#fff;--pico-contrast:#dfe3eb;--pico-contrast-background:#eff1f4;--pico-contrast-border:var(--pico-contrast-background);--pico-contrast-underline:rgba(223,227,235,.5);--pico-contrast-hover:#fff;--pico-contrast-hover-background:#fff;--pico-contrast-hover-border:var(--pico-contrast-hover-background);--pico-contrast-hover-underline:var(--pico-contrast-hover);--pico-contrast-focus:rgba(207,213,226,.25);--pico-contrast-inverse:#000;--pico-box-shadow:0.0145rem 0.029rem 0.174rem rgba(7,9,12,.017),0.0335rem 0.067rem 0.402rem rgba(7,9,12,.024),0.0625rem 0.125rem 0.75rem rgba(7,9,12,.03),0.1125rem 0.225rem 1.35rem rgba(7,9,12,.036),0.2085rem 0.417rem 2.502rem rgba(7,9,12,.043),0.5rem 1rem 6rem rgba(7,9,12,.06),0 0 0 0.0625rem rgba(7,9,12,.015);--pico-h1-color:#f0f1f3;--pico-h2-color:#e0e3e7;--pico-h3-color:#c2c7d0;--pico-h4-color:#b3b9c5;--pico-h5-color:#a4acba;--pico-h6-color:#8891a4;--pico-mark-background-color:#014063;--pico-mark-color:#fff;--pico-ins-color:#62af9a;--pico-del-color:#ce7e7b;--pico-blockquote-border-color:var(--pico-muted-border-color);--pico-blockquote-footer-color:var(--pico-muted-color);--pico-button-box-shadow:0 0 0 transparent;--pico-button-hover-box-shadow:0 0 0 transparent;--pico-table-border-color:var(--pico-muted-border-color);--pico-table-row-stripped-background-color:rgba(111,120,135,.038);--pico-code-background-color:#1a1f28;--pico-code-color:#8891a4;--pico-code-kbd-background-color:var(--pico-color);--pico-code-kbd-color:var(--pico-background-color);--pico-form-element-background-color:#1c212c;--pico-form-element-selected-background-color:#2a3140;--pico-form-element-border-color:#2a3140;--pico-form-element-color:#e0e3e7;--pico-form-element-placeholder-color:#8891a4;--pico-form-element-active-background-color:#1a1f28;--pico-form-element-active-border-color:var(--pico-primary-border);--pico-form-element-focus-color:var(--pico-primary-border);--pico-form-element-disabled-opacity:0.5;--pico-form-element-invalid-border-color:#964a50;--pico-form-element-invalid-active-border-color:#b7403b;--pico-form-element-invalid-focus-color:var(--pico-form-element-invalid-active-border-color);--pico-form-element-valid-border-color:#2a7b6f;--pico-form-element-valid-active-border-color:#16896a;--pico-form-element-valid-focus-color:var(--pico-form-element-valid-active-border-color);--pico-switch-background-color:#333c4e;--pico-switch-checked-background-color:var(--pico-primary-background);--pico-switch-color:#fff;--pico-switch-thumb-box-shadow:0 0 0 transparent;--pico-range-border-color:#202632;--pico-range-active-border-color:#2a3140;--pico-range-thumb-border-color:var(--pico-background-color);--pico-range-thumb-color:var(--pico-secondary-background);--pico-range-thumb-active-color:var(--pico-primary-background);--pico-accordion-border-color:var(--pico-muted-border-color);--pico-accordion-active-summary-color:var(--pico-primary-hover);--pico-accordion-close-summary-color:var(--pico-color);--pico-accordion-open-summary-color:var(--pico-muted-color);--pico-card-background-color:#181c25;--pico-card-border-color:var(--pico-card-background-color);--pico-card-box-shadow:var(--pico-box-shadow);--pico-card-sectioning-background-color:#1a1f28;--pico-loading-spinner-opacity:0.5;--pico-modal-overlay-background-color:rgba(8,9,10,.75);--pico-progress-background-color:#202632;--pico-progress-color:var(--pico-primary-background);--pico-tooltip-background-color:var(--pico-contrast-background);--pico-tooltip-color:var(--pico-contrast-inverse);--pico-icon-valid:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%232A7B6F' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");--pico-icon-invalid:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%23964A50' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 8v4M12 16h.01'/%3E%3C/svg%3E");color-scheme:dark}:root:not([data-theme]) input:is([type=submit],[type=button],[type=reset],[type=checkbox],[type=radio],[type=file]){--pico-form-element-focus-color:var(--pico-primary-focus)}}[data-theme=dark]{--pico-background-color:#13171f;--pico-color:#c2c7d0;--pico-text-selection-color:rgba(1,170,255,.188);--pico-muted-color:#7b8495;--pico-muted-border-color:#202632;--pico-primary:#01aaff;--pico-primary-background:#0172ad;--pico-primary-border:var(--pico-primary-background);--pico-primary-underline:rgba(1,170,255,.5);--pico-primary-hover:#79c0ff;--pico-primary-hover-background:#017fc0;--pico-primary-hover-border:var(--pico-primary-hover-background);--pico-primary-hover-underline:var(--pico-primary-hover);--pico-primary-focus:rgba(1,170,255,.375);--pico-primary-inverse:#fff;--pico-secondary:#969eaf;--pico-secondary-background:#525f7a;--pico-secondary-border:var(--pico-secondary-background);--pico-secondary-underline:rgba(150,158,175,.5);--pico-secondary-hover:#b3b9c5;--pico-secondary-hover-background:#5d6b89;--pico-secondary-hover-border:var(--pico-secondary-hover-background);--pico-secondary-hover-underline:var(--pico-secondary-hover);--pico-secondary-focus:rgba(144,158,190,.25);--pico-secondary-inverse:#fff;--pico-contrast:#dfe3eb;--pico-contrast-background:#eff1f4;--pico-contrast-border:var(--pico-contrast-background);--pico-contrast-underline:rgba(223,227,235,.5);--pico-contrast-hover:#fff;--pico-contrast-hover-background:#fff;--pico-contrast-hover-border:var(--pico-contrast-hover-background);--pico-contrast-hover-underline:var(--pico-contrast-hover);--pico-contrast-focus:rgba(207,213,226,.25);--pico-contrast-inverse:#000;--pico-box-shadow:0.0145rem 0.029rem 0.174rem rgba(7,9,12,.017),0.0335rem 0.067rem 0.402rem rgba(7,9,12,.024),0.0625rem 0.125rem 0.75rem rgba(7,9,12,.03),0.1125rem 0.225rem 1.35rem rgba(7,9,12,.036),0.2085rem 0.417rem 2.502rem rgba(7,9,12,.043),0.5rem 1rem 6rem rgba(7,9,12,.06),0 0 0 0.0625rem rgba(7,9,12,.015);--pico-h1-color:#f0f1f3;--pico-h2-color:#e0e3e7;--pico-h3-color:#c2c7d0;--pico-h4-color:#b3b9c5;--pico-h5-color:#a4acba;--pico-h6-color:#8891a4;--pico-mark-background-color:#014063;--pico-mark-color:#fff;--pico-ins-color:#62af9a;--pico-del-color:#ce7e7b;--pico-blockquote-border-color:var(--pico-muted-border-color);--pico-blockquote-footer-color:var(--pico-muted-color);--pico-button-box-shadow:0 0 0 transparent;--pico-button-hover-box-shadow:0 0 0 transparent;--pico-table-border-color:var(--pico-muted-border-color);--pico-table-row-stripped-background-color:rgba(111,120,135,.038);--pico-code-background-color:#1a1f28;--pico-code-color:#8891a4;--pico-code-kbd-background-color:var(--pico-color);--pico-code-kbd-color:var(--pico-background-color);--pico-form-element-background-color:#1c212c;--pico-form-element-selected-background-color:#2a3140;--pico-form-element-border-color:#2a3140;--pico-form-element-color:#e0e3e7;--pico-form-element-placeholder-color:#8891a4;--pico-form-element-active-background-color:#1a1f28;--pico-form-element-active-border-color:var(--pico-primary-border);--pico-form-element-focus-color:var(--pico-primary-border);--pico-form-element-disabled-opacity:0.5;--pico-form-element-invalid-border-color:#964a50;--pico-form-element-invalid-active-border-color:#b7403b;--pico-form-element-invalid-focus-color:var(--pico-form-element-invalid-active-border-color);--pico-form-element-valid-border-color:#2a7b6f;--pico-form-element-valid-active-border-color:#16896a;--pico-form-element-valid-focus-color:var(--pico-form-element-valid-active-border-color);--pico-switch-background-color:#333c4e;--pico-switch-checked-background-color:var(--pico-primary-background);--pico-switch-color:#fff;--pico-switch-thumb-box-shadow:0 0 0 transparent;--pico-range-border-color:#202632;--pico-range-active-border-color:#2a3140;--pico-range-thumb-border-color:var(--pico-background-color);--pico-range-thumb-color:var(--pico-secondary-background);--pico-range-thumb-active-color:var(--pico-primary-background);--pico-accordion-border-color:var(--pico-muted-border-color);--pico-accordion-active-summary-color:var(--pico-primary-hover);--pico-accordion-close-summary-color:var(--pico-color);--pico-accordion-open-summary-color:var(--pico-muted-color);--pico-card-background-color:#181c25;--pico-card-border-color:var(--pico-card-background-color);--pico-card-box-shadow:var(--pico-box-shadow);--pico-card-sectioning-background-color:#1a1f28;--pico-loading-spinner-opacity:0.5;--pico-modal-overlay-background-color:rgba(8,9,10,.75);--pico-progress-background-color:#202632;--pico-progress-color:var(--pico-primary-background);--pico-tooltip-background-color:var(--pico-contrast-background);--pico-tooltip-color:var(--pico-contrast-inverse);--pico-icon-valid:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%232A7B6F' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");--pico-icon-invalid:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%23964A50' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 8v4M12 16h.01'/%3E%3C/svg%3E");color-scheme:dark}[data-theme=dark] input:is([type=submit],[type=button],[type=reset],[type=checkbox],[type=radio],[type=file]){--pico-form-element-focus-color:var(--pico-primary-focus)}[type=checkbox],[type=radio],[type=range],progress{accent-color:var(--pico-primary)}*,:after,:before{background-repeat:no-repeat;box-sizing:border-box}:after,:before{text-decoration:inherit;vertical-align:inherit}:where(:root){-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;background-color:var(--pico-background-color);color:var(--pico-color);font-family:var(--pico-font-family);font-size:var(--pico-font-size);font-weight:var(--pico-font-weight);line-height:var(--pico-line-height);overflow-wrap:break-word;-moz-tab-size:4;-o-tab-size:4;tab-size:4;text-rendering:optimizeLegibility;text-underline-offset:var(--pico-text-underline-offset)}body{margin:0;width:100%}main{display:block}body>footer,body>header,body>main{margin-left:auto;margin-right:auto;padding:var(--pico-block-spacing-vertical) var(--pico-block-spacing-horizontal);width:100%}@media (min-width:576px){body>footer,body>header,body>main{max-width:510px;padding-left:0;padding-right:0}}@media (min-width:768px){body>footer,body>header,body>main{max-width:700px}}@media (min-width:1024px){body>footer,body>header,body>main{max-width:950px}}@media (min-width:1280px){body>footer,body>header,body>main{max-width:1200px}}@media (min-width:1536px){body>footer,body>header,body>main{max-width:1450px}}a[role=button]{display:inline-block}button{font-family:inherit;margin:0;overflow:visible;text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[role=button],[type=button],[type=file]::file-selector-button,[type=reset],[type=submit],button{--pico-background-color:var(--pico-primary-background);--pico-border-color:var(--pico-primary-border);--pico-color:var(--pico-primary-inverse);--pico-box-shadow:var(--pico-button-box-shadow,0 0 0 transparent);background-color:var(--pico-background-color);border:var(--pico-border-width) solid var(--pico-border-color);border-radius:var(--pico-border-radius);box-shadow:var(--pico-box-shadow);color:var(--pico-color);cursor:pointer;font-size:1rem;font-weight:var(--pico-font-weight);line-height:var(--pico-line-height);outline:0;padding:var(--pico-form-element-spacing-vertical) var(--pico-form-element-spacing-horizontal);text-align:center;text-decoration:none;transition:background-color var(--pico-transition),border-color var(--pico-transition),color var(--pico-transition),box-shadow var(--pico-transition);-webkit-user-select:none;-moz-user-select:none;user-select:none}:where(audio,canvas,iframe,img,svg,video){vertical-align:middle}img{border-style:none;height:auto;max-width:100%}:where(iframe){border-style:none}hr{border:0;border-top:1px solid var(--pico-muted-border-color);color:inherit;height:0;margin:var(--pico-typography-spacing-vertical) 0}input,optgroup,select,textarea{font-family:inherit;font-size:1rem;letter-spacing:inherit;line-height:var(--pico-line-height);margin:0}input{overflow:visible}select{text-transform:none}legend{color:inherit;max-width:100%;padding:0;white-space:normal}textarea{overflow:auto}[type=checkbox],[type=radio]{padding:0}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}::-moz-focus-inner{border-style:none;padding:0}:-moz-focusring{outline:0}:-moz-ui-invalid{box-shadow:none}::-ms-expand{display:none}[type=file],[type=range]{border-width:0;padding:0}input:not([type=checkbox],[type=radio],[type=range]){height:calc(1rem*var(--pico-line-height) + var(--pico-form-element-spacing-vertical)*2 + var(--pico-border-width)*2)}button[type=submit],input:not([type=checkbox],[type=radio]),select,textarea{width:100%}input:not([type=checkbox],[type=radio],[type=range],[type=file]),select,textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:var(--pico-form-element-spacing-vertical) var(--pico-form-element-spacing-horizontal)}input,select,textarea{--pico-background-color:var(--pico-form-element-background-color);--pico-border-color:var(--pico-form-element-border-color);--pico-color:var(--pico-form-element-color);--pico-box-shadow:none;background-color:var(--pico-background-color);border:var(--pico-border-width) solid var(--pico-border-color);border-radius:var(--pico-border-radius);box-shadow:var(--pico-box-shadow);color:var(--pico-color);font-weight:var(--pico-font-weight);outline:0;transition:background-color var(--pico-transition),border-color var(--pico-transition),color var(--pico-transition),box-shadow var(--pico-transition)}:where(select,textarea):not([readonly]):is(:active,:focus),input:not([type=submit],[type=button],[type=reset],[type=checkbox],[type=radio],[readonly]):is(:active,:focus){--pico-background-color:var(--pico-form-element-active-background-color)}:where(select,textarea):not([readonly]):is(:active,:focus),input:not([type=submit],[type=button],[type=reset],[role=switch],[readonly]):is(:active,:focus){--pico-border-color:var(--pico-form-element-active-border-color)}:where(select,textarea):not([readonly]):focus,input:not([type=submit],[type=button],[type=reset],[type=range],[type=file],[readonly]):focus{--pico-box-shadow:0 0 0 var(--pico-outline-width) var(--pico-form-element-focus-color)}:where(fieldset[disabled]) :is(input:not([type=submit],[type=button],[type=reset]),select,textarea),input:not([type=submit],[type=button],[type=reset])[disabled],label[aria-disabled=true],select[disabled],textarea[disabled]{opacity:var(--pico-form-element-disabled-opacity);pointer-events:none}label[aria-disabled=true] input[disabled]{opacity:1}:where(input,select,textarea):not([type=checkbox],[type=radio],[type=date],[type=datetime-local],[type=month],[type=time],[type=week],[type=range])[aria-invalid]{background-position:center right .75rem;background-repeat:no-repeat;background-size:1rem auto;padding-left:var(--pico-form-element-spacing-horizontal);padding-right:calc(var(--pico-form-element-spacing-horizontal) + 1.5rem)!important;padding-inline-end:calc(var(--pico-form-element-spacing-horizontal) + 1.5rem)!important;padding-inline-start:var(--pico-form-element-spacing-horizontal)!important}:where(input,select,textarea):not([type=checkbox],[type=radio],[type=date],[type=datetime-local],[type=month],[type=time],[type=week],[type=range])[aria-invalid=false]:not(select){background-image:var(--pico-icon-valid)}:where(input,select,textarea):not([type=checkbox],[type=radio],[type=date],[type=datetime-local],[type=month],[type=time],[type=week],[type=range])[aria-invalid=true]:not(select){background-image:var(--pico-icon-invalid)}:where(input,select,textarea)[aria-invalid=false]{--pico-border-color:var(--pico-form-element-valid-border-color)}:where(input,select,textarea)[aria-invalid=false]:is(:active,:focus){--pico-border-color:var(--pico-form-element-valid-active-border-color)!important}:where(input,select,textarea)[aria-invalid=false]:is(:active,:focus):not([type=checkbox],[type=radio]){--pico-box-shadow:0 0 0 var(--pico-outline-width) var(--pico-form-element-valid-focus-color)!important}:where(input,select,textarea)[aria-invalid=true]{--pico-border-color:var(--pico-form-element-invalid-border-color)}:where(input,select,textarea)[aria-invalid=true]:is(:active,:focus){--pico-border-color:var(--pico-form-element-invalid-active-border-color)!important}:where(input,select,textarea)[aria-invalid=true]:is(:active,:focus):not([type=checkbox],[type=radio]){--pico-box-shadow:0 0 0 var(--pico-outline-width) var(--pico-form-element-invalid-focus-color)!important}[dir=rtl] :where(input,select,textarea):not([type=checkbox],[type=radio]):is([aria-invalid],[aria-invalid=true],[aria-invalid=false]){background-position:center left .75rem}input::-webkit-input-placeholder,input::placeholder,select:invalid,textarea::-webkit-input-placeholder,textarea::placeholder{color:var(--pico-form-element-placeholder-color);opacity:1}input:not([type=checkbox],[type=radio]),select,textarea{margin-bottom:var(--pico-spacing)}select::-ms-expand{background-color:transparent;border:0}select:not([multiple],[size]){background-image:var(--pico-icon-chevron);background-position:center right .75rem;background-repeat:no-repeat;background-size:1rem auto;padding-left:var(--pico-form-element-spacing-horizontal);padding-right:calc(var(--pico-form-element-spacing-horizontal) + 1.5rem);padding-inline-end:calc(var(--pico-form-element-spacing-horizontal) + 1.5rem);padding-inline-start:var(--pico-form-element-spacing-horizontal)}select[multiple] option:checked{background:var(--pico-form-element-selected-background-color);color:var(--pico-form-element-color)}[dir=rtl] select:not([multiple],[size]){background-position:center left .75rem}textarea{display:block;resize:vertical}textarea[aria-invalid]{--pico-icon-height:calc(1rem*var(--pico-line-height) + var(--pico-form-element-spacing-vertical)*2 + var(--pico-border-width)*2);background-position:top right .75rem!important;background-size:1rem var(--pico-icon-height)!important}:where(input,select,textarea,fieldset)+small{color:var(--pico-muted-color);display:block;margin-bottom:var(--pico-spacing);margin-top:calc(var(--pico-spacing)*-.75);width:100%}:where(input,select,textarea,fieldset)[aria-invalid=false]+small{color:var(--pico-ins-color)}:where(input,select,textarea,fieldset)[aria-invalid=true]+small{color:var(--pico-del-color)}label>:where(input,select,textarea){margin-top:calc(var(--pico-spacing)*.25)}label:has([type=checkbox],[type=radio]){cursor:pointer;width:-moz-fit-content;width:fit-content}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-width:var(--pico-border-width);cursor:pointer;height:1.25em;margin-top:-.125em;margin-inline-end:.5em;vertical-align:middle;width:1.25em}[type=checkbox]::-ms-check,[type=radio]::-ms-check{display:none}[type=checkbox]:checked,[type=checkbox]:checked:active,[type=checkbox]:checked:focus,[type=radio]:checked,[type=radio]:checked:active,[type=radio]:checked:focus{--pico-background-color:var(--pico-primary-background);--pico-border-color:var(--pico-primary-border);background-image:var(--pico-icon-checkbox);background-position:50%;background-repeat:no-repeat;background-size:.75em auto}[type=checkbox]~label,[type=radio]~label{cursor:pointer;display:inline-block;margin-bottom:0}[type=checkbox]~label:not(:last-of-type),[type=radio]~label:not(:last-of-type){margin-inline-end:1em}[type=checkbox]:indeterminate{--pico-background-color:var(--pico-primary-background);--pico-border-color:var(--pico-primary-border);background-image:var(--pico-icon-minus);background-position:50%;background-repeat:no-repeat;background-size:.75em auto}[type=radio]{border-radius:50%}[type=radio]:checked,[type=radio]:checked:active,[type=radio]:checked:focus{--pico-background-color:var(--pico-primary-inverse);background-image:none;border-width:.35em}[type=checkbox][role=switch]{--pico-background-color:var(--pico-switch-background-color);--pico-color:var(--pico-switch-color);background-color:var(--pico-background-color);border:var(--pico-border-width) solid var(--pico-border-color);border-radius:1.25em;height:1.25em;line-height:1.25em;width:2.25em}[type=checkbox][role=switch]:not([aria-invalid]){--pico-border-color:var(--pico-switch-background-color)}[type=checkbox][role=switch]:before{aspect-ratio:1;background-color:var(--pico-color);border-radius:50%;box-shadow:var(--pico-switch-thumb-box-shadow);content:"";display:block;height:100%;transition:margin .1s ease-in-out}[type=checkbox][role=switch]:focus{--pico-background-color:var(--pico-switch-background-color);--pico-border-color:var(--pico-switch-background-color)}[type=checkbox][role=switch]:checked{--pico-background-color:var(--pico-switch-checked-background-color);--pico-border-color:var(--pico-switch-checked-background-color);background-image:none}[type=checkbox][role=switch]:checked:before{margin-inline-start:1em}[type=checkbox][role=switch][disabled]{--pico-background-color:var(--pico-border-color)}[type=checkbox][aria-invalid=false]:checked,[type=checkbox][aria-invalid=false]:checked:active,[type=checkbox][aria-invalid=false]:checked:focus,[type=checkbox][role=switch][aria-invalid=false]:checked,[type=checkbox][role=switch][aria-invalid=false]:checked:active,[type=checkbox][role=switch][aria-invalid=false]:checked:focus{--pico-background-color:var(--pico-form-element-valid-border-color)}[type=checkbox]:checked:active[aria-invalid=true],[type=checkbox]:checked:focus[aria-invalid=true],[type=checkbox]:checked[aria-invalid=true],[type=checkbox][role=switch]:checked:active[aria-invalid=true],[type=checkbox][role=switch]:checked:focus[aria-invalid=true],[type=checkbox][role=switch]:checked[aria-invalid=true]{--pico-background-color:var(--pico-form-element-invalid-border-color)}[type=checkbox][aria-invalid=false]:checked,[type=checkbox][aria-invalid=false]:checked:active,[type=checkbox][aria-invalid=false]:checked:focus,[type=checkbox][role=switch][aria-invalid=false]:checked,[type=checkbox][role=switch][aria-invalid=false]:checked:active,[type=checkbox][role=switch][aria-invalid=false]:checked:focus,[type=radio][aria-invalid=false]:checked,[type=radio][aria-invalid=false]:checked:active,[type=radio][aria-invalid=false]:checked:focus{--pico-border-color:var(--pico-form-element-valid-border-color)}[type=checkbox]:checked:active[aria-invalid=true],[type=checkbox]:checked:focus[aria-invalid=true],[type=checkbox]:checked[aria-invalid=true],[type=checkbox][role=switch]:checked:active[aria-invalid=true],[type=checkbox][role=switch]:checked:focus[aria-invalid=true],[type=checkbox][role=switch]:checked[aria-invalid=true],[type=radio]:checked:active[aria-invalid=true],[type=radio]:checked:focus[aria-invalid=true],[type=radio]:checked[aria-invalid=true]{--pico-border-color:var(--pico-form-element-invalid-border-color)}[type=color]::-webkit-color-swatch-wrapper{padding:0}[type=color]::-moz-focus-inner{padding:0}[type=color]::-webkit-color-swatch{border:0;border-radius:calc(var(--pico-border-radius)*.5)}[type=color]::-moz-color-swatch{border:0;border-radius:calc(var(--pico-border-radius)*.5)}input:not([type=checkbox],[type=radio],[type=range],[type=file]):is([type=date],[type=datetime-local],[type=month],[type=time],[type=week]){--pico-icon-position:0.75rem;--pico-icon-width:1rem;background-image:var(--pico-icon-date);background-position:center right var(--pico-icon-position);background-repeat:no-repeat;background-size:var(--pico-icon-width) auto;padding-right:calc(var(--pico-icon-width) + var(--pico-icon-position))}input:not([type=checkbox],[type=radio],[type=range],[type=file])[type=time]{background-image:var(--pico-icon-time)}[type=date]::-webkit-calendar-picker-indicator,[type=datetime-local]::-webkit-calendar-picker-indicator,[type=month]::-webkit-calendar-picker-indicator,[type=time]::-webkit-calendar-picker-indicator,[type=week]::-webkit-calendar-picker-indicator{margin-left:var(--pico-icon-position);margin-right:calc(var(--pico-icon-width)*-1);opacity:0;width:var(--pico-icon-width)}@-moz-document url-prefix(){[type=date],[type=datetime-local],[type=month],[type=time],[type=week]{background-image:none!important;padding-right:var(--pico-form-element-spacing-horizontal)!important}}[dir=rtl] :is([type=date],[type=datetime-local],[type=month],[type=time],[type=week]){text-align:right}[type=file]{--pico-color:var(--pico-muted-color);background:0 0;border:0;border-radius:0;margin-left:calc(var(--pico-outline-width)*-1);padding:calc(var(--pico-form-element-spacing-vertical)*.5) 0;padding-left:var(--pico-outline-width)}[type=file]::file-selector-button{margin-right:calc(var(--pico-spacing)/2);padding:calc(var(--pico-form-element-spacing-vertical)*.5) var(--pico-form-element-spacing-horizontal)}[type=file]:is(:hover,:active,:focus)::file-selector-button{--pico-background-color:var(--pico-secondary-hover-background);--pico-border-color:var(--pico-secondary-hover-border)}[type=file]:focus::file-selector-button{--pico-box-shadow:var(--pico-button-hover-box-shadow,0 0 0 transparent),0 0 0 var(--pico-outline-width) var(--pico-secondary-focus)}[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:0 0;height:1.25rem;width:100%}[type=range]::-webkit-slider-runnable-track{background-color:var(--pico-range-border-color);border-radius:var(--pico-border-radius);height:.375rem;-webkit-transition:background-color var(--pico-transition),box-shadow var(--pico-transition);transition:background-color var(--pico-transition),box-shadow var(--pico-transition);width:100%}[type=range]::-moz-range-track{background-color:var(--pico-range-border-color);border-radius:var(--pico-border-radius);height:.375rem;-moz-transition:background-color var(--pico-transition),box-shadow var(--pico-transition);transition:background-color var(--pico-transition),box-shadow var(--pico-transition);width:100%}[type=range]::-ms-track{background-color:var(--pico-range-border-color);border-radius:var(--pico-border-radius);height:.375rem;-ms-transition:background-color var(--pico-transition),box-shadow var(--pico-transition);transition:background-color var(--pico-transition),box-shadow var(--pico-transition);width:100%}[type=range]::-webkit-slider-thumb{-webkit-appearance:none;background-color:var(--pico-range-thumb-color);border:2px solid var(--pico-range-thumb-border-color);border-radius:50%;cursor:pointer;height:1.25rem;margin-top:-.4375rem;-webkit-transition:background-color var(--pico-transition),transform var(--pico-transition);transition:background-color var(--pico-transition),transform var(--pico-transition);width:1.25rem}[type=range]::-moz-range-thumb{-webkit-appearance:none;background-color:var(--pico-range-thumb-color);border:2px solid var(--pico-range-thumb-border-color);border-radius:50%;cursor:pointer;height:1.25rem;margin-top:-.4375rem;-moz-transition:background-color var(--pico-transition),transform var(--pico-transition);transition:background-color var(--pico-transition),transform var(--pico-transition);width:1.25rem}[type=range]::-ms-thumb{-webkit-appearance:none;background-color:var(--pico-range-thumb-color);border:2px solid var(--pico-range-thumb-border-color);border-radius:50%;cursor:pointer;height:1.25rem;margin-top:-.4375rem;-ms-transition:background-color var(--pico-transition),transform var(--pico-transition);transition:background-color var(--pico-transition),transform var(--pico-transition);width:1.25rem}[type=range]:active,[type=range]:focus-within{--pico-range-border-color:var(--pico-range-active-border-color);--pico-range-thumb-color:var(--pico-range-thumb-active-color)}[type=range]:active::-webkit-slider-thumb{transform:scale(1.25)}[type=range]:active::-moz-range-thumb{transform:scale(1.25)}[type=range]:active::-ms-thumb{transform:scale(1.25)}input:not([type=checkbox],[type=radio],[type=range],[type=file])[type=search]{background-image:var(--pico-icon-search);background-position:center left calc(var(--pico-form-element-spacing-horizontal) + .125rem);background-repeat:no-repeat;background-size:1rem auto;padding-inline-start:calc(var(--pico-form-element-spacing-horizontal) + 1.75rem)}input:not([type=checkbox],[type=radio],[type=range],[type=file])[type=search][aria-invalid]{background-position:center left 1.125rem,center right .75rem;padding-inline-start:calc(var(--pico-form-element-spacing-horizontal) + 1.75rem)!important}input:not([type=checkbox],[type=radio],[type=range],[type=file])[type=search][aria-invalid=false]{background-image:var(--pico-icon-search),var(--pico-icon-valid)}input:not([type=checkbox],[type=radio],[type=range],[type=file])[type=search][aria-invalid=true]{background-image:var(--pico-icon-search),var(--pico-icon-invalid)}[dir=rtl] :where(input):not([type=checkbox],[type=radio],[type=range],[type=file])[type=search]{background-position:center right 1.125rem}[dir=rtl] :where(input):not([type=checkbox],[type=radio],[type=range],[type=file])[type=search][aria-invalid]{background-position:center right 1.125rem,center left .75rem}details{display:block;margin-bottom:var(--pico-spacing)}details summary{cursor:pointer;line-height:1rem;list-style-type:none;transition:color var(--pico-transition)}details summary:not([role]){color:var(--pico-accordion-close-summary-color)}details summary::-webkit-details-marker{display:none}details summary::marker{display:none}details summary::-moz-list-bullet{list-style-type:none}details summary:after{background-image:var(--pico-icon-chevron);background-position:100%;background-repeat:no-repeat;background-size:1rem auto;content:"";display:block;float:right;height:1rem;margin-inline-start:calc(var(--pico-spacing, 1rem)*.5);transform:rotate(-90deg);transition:transform var(--pico-transition);width:1rem}details summary:focus{outline:0}details summary:focus:not([role]){color:var(--pico-accordion-active-summary-color)}details summary:focus-visible:not([role]){color:var(--pico-primary);outline:var(--pico-outline-width) solid var(--pico-primary-focus);outline-offset:calc(var(--pico-spacing, 1rem)*.5)}details summary[role=button]{text-align:left;width:100%}details summary[role=button]:after{height:calc(1rem*var(--pico-line-height, 1.5))}details[open]>summary{margin-bottom:var(--pico-spacing)}details[open]>summary:not([role]):not(:focus){color:var(--pico-accordion-open-summary-color)}details[open]>summary:after{transform:rotate(0)}[dir=rtl] details summary{text-align:right}[dir=rtl] details summary:after{background-position:0;float:left}[role=group],[role=search]{border-radius:var(--pico-border-radius);box-shadow:var(--pico-group-box-shadow,0 0 0 transparent);display:inline-flex;margin-bottom:var(--pico-spacing);position:relative;transition:box-shadow var(--pico-transition);vertical-align:middle;width:100%}[role=group] input:not([type=checkbox],[type=radio]),[role=group] select,[role=group]>*,[role=search] input:not([type=checkbox],[type=radio]),[role=search] select,[role=search]>*{flex:1 1 auto;margin-bottom:0;position:relative}[role=group] input:not([type=checkbox],[type=radio]):not(:first-child),[role=group] select:not(:first-child),[role=group]>:not(:first-child),[role=search] input:not([type=checkbox],[type=radio]):not(:first-child),[role=search] select:not(:first-child),[role=search]>:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:0}[role=group] input:not([type=checkbox],[type=radio]):not(:last-child),[role=group] select:not(:last-child),[role=group]>:not(:last-child),[role=search] input:not([type=checkbox],[type=radio]):not(:last-child),[role=search] select:not(:last-child),[role=search]>:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}[role=group] input:not([type=checkbox],[type=radio]):focus,[role=group] select:focus,[role=group]>:focus,[role=search] input:not([type=checkbox],[type=radio]):focus,[role=search] select:focus,[role=search]>:focus{z-index:2}[role=group] [role=button]:not(:first-child),[role=group] [type=button]:not(:first-child),[role=group] [type=reset]:not(:first-child),[role=group] [type=submit]:not(:first-child),[role=group] button:not(:first-child),[role=group] input:not([type=checkbox],[type=radio]):not(:first-child),[role=group] select:not(:first-child),[role=search] [role=button]:not(:first-child),[role=search] [type=button]:not(:first-child),[role=search] [type=reset]:not(:first-child),[role=search] [type=submit]:not(:first-child),[role=search] button:not(:first-child),[role=search] input:not([type=checkbox],[type=radio]):not(:first-child),[role=search] select:not(:first-child){margin-left:calc(var(--pico-border-width)*-1)}[role=group] [role=button],[role=group] [type=button],[role=group] [type=reset],[role=group] [type=submit],[role=group] button,[role=search] [role=button],[role=search] [type=button],[role=search] [type=reset],[role=search] [type=submit],[role=search] button{width:auto}@supports selector(:has(*)){[role=group]:has(button:focus,[type=submit]:focus,[type=button]:focus,[role=button]:focus),[role=search]:has(button:focus,[type=submit]:focus,[type=button]:focus,[role=button]:focus){--pico-group-box-shadow:var(--pico-group-box-shadow-focus-with-button)}[role=group]:has(button:focus,[type=submit]:focus,[type=button]:focus,[role=button]:focus) input:not([type=checkbox],[type=radio]),[role=group]:has(button:focus,[type=submit]:focus,[type=button]:focus,[role=button]:focus) select,[role=search]:has(button:focus,[type=submit]:focus,[type=button]:focus,[role=button]:focus) input:not([type=checkbox],[type=radio]),[role=search]:has(button:focus,[type=submit]:focus,[type=button]:focus,[role=button]:focus) select{border-color:transparent}[role=group]:has(input:not([type=submit],[type=button]):focus,select:focus),[role=search]:has(input:not([type=submit],[type=button]):focus,select:focus){--pico-group-box-shadow:var(--pico-group-box-shadow-focus-with-input)}[role=group]:has(input:not([type=submit],[type=button]):focus,select:focus) [role=button],[role=group]:has(input:not([type=submit],[type=button]):focus,select:focus) [type=button],[role=group]:has(input:not([type=submit],[type=button]):focus,select:focus) [type=submit],[role=group]:has(input:not([type=submit],[type=button]):focus,select:focus) button,[role=search]:has(input:not([type=submit],[type=button]):focus,select:focus) [role=button],[role=search]:has(input:not([type=submit],[type=button]):focus,select:focus) [type=button],[role=search]:has(input:not([type=submit],[type=button]):focus,select:focus) [type=submit],[role=search]:has(input:not([type=submit],[type=button]):focus,select:focus) button{--pico-button-box-shadow:0 0 0 var(--pico-border-width) var(--pico-primary-border);--pico-button-hover-box-shadow:0 0 0 var(--pico-border-width) var(--pico-primary-hover-border)}[role=group] [role=button]:focus,[role=group] [type=button]:focus,[role=group] [type=reset]:focus,[role=group] [type=submit]:focus,[role=group] button:focus,[role=search] [role=button]:focus,[role=search] [type=button]:focus,[role=search] [type=reset]:focus,[role=search] [type=submit]:focus,[role=search] button:focus{box-shadow:none}}:root{--pico-scrollbar-width:0px}article{background:var(--pico-card-background-color);border-radius:var(--pico-border-radius);box-shadow:var(--pico-card-box-shadow);margin-bottom:var(--pico-block-spacing-vertical);padding:var(--pico-block-spacing-vertical) var(--pico-block-spacing-horizontal)}article>footer,article>header{background-color:var(--pico-card-sectioning-background-color);margin-left:calc(var(--pico-block-spacing-horizontal)*-1);margin-right:calc(var(--pico-block-spacing-horizontal)*-1);padding:calc(var(--pico-block-spacing-vertical)*.66) var(--pico-block-spacing-horizontal)}article>header{border-bottom:var(--pico-border-width) solid var(--pico-card-border-color);border-top-left-radius:var(--pico-border-radius);border-top-right-radius:var(--pico-border-radius);margin-bottom:var(--pico-block-spacing-vertical);margin-top:calc(var(--pico-block-spacing-vertical)*-1)}article>footer{border-bottom-left-radius:var(--pico-border-radius);border-bottom-right-radius:var(--pico-border-radius);border-top:var(--pico-border-width) solid var(--pico-card-border-color);margin-bottom:calc(var(--pico-block-spacing-vertical)*-1);margin-top:var(--pico-block-spacing-vertical)}dialog{align-items:center;-webkit-backdrop-filter:var(--pico-modal-overlay-backdrop-filter);backdrop-filter:var(--pico-modal-overlay-backdrop-filter);background-color:var(--pico-modal-overlay-background-color);border:0;bottom:0;color:var(--pico-color);display:flex;height:inherit;justify-content:center;left:0;min-height:100%;min-width:100%;padding:0;position:fixed;right:0;top:0;width:inherit;z-index:999}dialog article{margin:var(--pico-spacing);max-height:calc(100vh - var(--pico-spacing)*2);overflow:auto;width:100%}@media (min-width:576px){dialog article{max-width:510px}}@media (min-width:768px){dialog article{max-width:700px}}dialog article>header>*{margin-bottom:0}dialog article>header :is(a,button)[rel=prev]{float:right;margin:0;margin-left:var(--pico-spacing);padding:0}dialog article>footer{text-align:right}dialog article>footer [role=button],dialog article>footer button{margin-bottom:0}dialog article>footer [role=button]:not(:first-of-type),dialog article>footer button:not(:first-of-type){margin-left:calc(var(--pico-spacing)*.5)}dialog article :is(a,button)[rel=prev]{background-color:transparent;background-image:var(--pico-icon-close);background-position:50%;background-repeat:no-repeat;background-size:auto 1rem;border:none;display:block;height:1rem;margin-bottom:var(--pico-spacing);margin-left:auto;margin-top:calc(var(--pico-spacing)*-1);opacity:.5;transition:opacity var(--pico-transition);width:1rem}dialog article :is(a,button)[rel=prev]:is([aria-current]:not([aria-current=false]),:hover,:active,:focus){opacity:1}dialog:not([open]),dialog[open=false]{display:none}[tabindex],a,area,button,input,label,select,summary,textarea{-ms-touch-action:manipulation}.cm-editor{background-color:var(--pico-background-color);height:100%}[data-theme=dark] .cm-editor,[data-theme=dark] .ͼ5,[data-theme=dark] .ͼg,[data-theme=dark] .ͼl{color:#9cdcfe}[data-theme=dark] .ͼ1.cm-focused{outline:1px dotted #212121}[data-theme=dark] .ͼ2 .cm-content{caret-color:#000}[data-theme=dark] .ͼ3 .cm-content{caret-color:#fff}.ͼ3 .cm-selectionBackground,[data-theme=dark] .ͼ2 .cm-selectionBackground{background:#3a3d41}.ͼ3.cm-focused .cm-selectionBackground,[data-theme=dark] .ͼ2.cm-focused .cm-selectionBackground{background:#264f78}.ͼo .cm-content ::-moz-selection{background:#3e4451}.ͼo .cm-content ::selection,.ͼo .cm-selectionBackground,[data-theme=dark] .ͼo.cm-focused>.cm-scroller>.cm-selectionLayer .cm-selectionBackground{background:#3e4451}.ͼ1 .cm-dropCursor,[data-theme=dark] .ͼ1 .cm-cursor{border-left:1.2px solid #000}[data-theme=dark] .ͼ3 .cm-cursor{border-left-color:#444}[data-theme=dark] .ͼ1.cm-focused .cm-cursor{display:block}[data-theme=dark] .ͼ2 .cm-activeLine{background-color:#cceeff44}[data-theme=dark] .ͼ3 .cm-activeLine{background-color:#99eeff33}[data-theme=dark] .ͼ2 .cm-specialChar{color:red}[data-theme=dark] .ͼ3 .cm-specialChar{color:#f78}[data-theme=dark] .ͼ2 .cm-gutters{background-color:transparent;border-right:1px solid #1f2937;color:#6c6c6c}[data-theme=dark] .ͼ3 .cm-gutters{background-color:#333338;color:#ccc}[data-theme=dark] .ͼ2 .cm-activeLineGutter{background:#ffffff22;color:#e2f2ff}[data-theme=dark] .ͼ1 .cm-placeholder{color:#888}[data-theme=dark] .ͼ1 .cm-trailingSpace{background-color:#ff332255}[data-theme=dark] .ͼ3 .cm-button:active{background-image:linear-gradient(#111,#333)}[data-theme=dark] .ͼ3 .cm-button{background-image:linear-gradient(#393939,#111);border:1px solid #888}[data-theme=dark] .ͼ2 .cm-textfield{background-color:#fff}[data-theme=dark] .ͼ3 .cm-textfield{background-color:inherit;border:1px solid #555}[data-theme=dark] .ͼ1 .cm-diagnostic-error{border-left:5px solid #d11}[data-theme=dark] .ͼ1 .cm-diagnostic-warning{border-left:5px solid orange}[data-theme=dark] .ͼ1 .cm-diagnostic-info{border-left:5px solid #999}[data-theme=dark] .ͼ1 .cm-diagnosticAction{background-color:#444;color:#fff}[data-theme=dark] .ͼ1 .cm-lintRange-active{background-color:#ffdd9980}[data-theme=dark] .ͼ1 .cm-lintPoint-warning:after{border-bottom-color:orange}[data-theme=dark] .ͼ1 .cm-lintPoint-info:after{border-bottom-color:#999}[data-theme=dark] .ͼ1 .cm-panel.cm-panel-lint ul [aria-selected]{background-color:#ddd}[data-theme=dark] .ͼ1 .cm-panel.cm-panel-lint ul:focus [aria-selected]{background:#bdf;background-color:Highlight;color:#fff;color:HighlightText}[data-theme=dark] .ͼ1 .emmet-tracker{-webkit-text-decoration:underline 1px green;text-decoration:underline 1px green}[data-theme=dark] .ͼ2 .cm-tooltip{background-color:#111828;border:1px solid #3e5b9f}[data-theme=dark] .ͼ2 .cm-tooltip-section:not(:first-child){border-top:1px solid #bbb}[data-theme=dark] .ͼ3 .cm-tooltip{background-color:#333338;color:#fff}[data-theme=dark] .ͼ1 .cm-tooltip-above .cm-tooltip-arrow:before{border-top:7px solid #bbb}[data-theme=dark] .ͼ1 .cm-tooltip-above .cm-tooltip-arrow:after{border-top:7px solid #f5f5f5;bottom:1px}[data-theme=dark] .ͼ1 .cm-tooltip-below .cm-tooltip-arrow:before{border-bottom:7px solid #bbb}[data-theme=dark] .ͼ1 .cm-tooltip-below .cm-tooltip-arrow:after{border-bottom:7px solid #f5f5f5;top:1px}[data-theme=dark] .ͼ3 .cm-tooltip .cm-tooltip-arrow:before{border-bottom-color:#333338;border-top-color:#333338}[data-theme=dark] .ͼ1.cm-focused .cm-matchingBracket{background-color:#328c8252}[data-theme=dark] .ͼ1.cm-focused .cm-nonmatchingBracket{background-color:#bb555544}[data-theme=dark] .ͼ1 .cm-foldPlaceholder{background-color:#eee;border:1px solid #ddd;border-radius:.2em;color:#888}[data-theme=dark] .ͼp{color:#c678dd}[data-theme=dark] .ͼq{color:#e06c75}[data-theme=dark] .ͼr{color:#61afef}[data-theme=dark] .ͼs{color:#d19a66}[data-theme=dark] .ͼt{color:#abb2bf}[data-theme=dark] .ͼu{color:#e5c07b}[data-theme=dark] .ͼv{color:#56b6c2}[data-theme=dark] .ͼw{color:#7d8799}[data-theme=dark] .ͼ11{color:#e06c75;font-weight:700}[data-theme=dark] .ͼ12{color:#d19a66}[data-theme=dark] .ͼ13{color:#98c379}[data-theme=dark] .ͼ14{color:#fff}[data-theme=dark] .ͼo{background-color:#282c34;color:#abb2bf}[data-theme=dark] .ͼo .cm-content{caret-color:#528bff}.ͼo .cm-dropCursor,[data-theme=dark] .ͼo .cm-cursor{border-left-color:#528bff}[data-theme=dark] .ͼo .cm-panels{background-color:#21252b;color:#abb2bf}[data-theme=dark] .ͼo .cm-panels.cm-panels-top{border-bottom:2px solid #000}[data-theme=dark] .ͼo .cm-panels.cm-panels-bottom{border-top:2px solid #000}[data-theme=dark] .ͼo .cm-searchMatch{background-color:#72a1ff59;outline:1px solid #457dff}[data-theme=dark] .ͼo .cm-searchMatch.cm-searchMatch-selected{background-color:#6199ff2f}[data-theme=dark] .ͼo .cm-activeLine{background-color:#6699ff0b}[data-theme=dark] .ͼo .cm-selectionMatch{background-color:#aafe661a}.ͼo.cm-focused .cm-nonmatchingBracket,[data-theme=dark] .ͼo.cm-focused .cm-matchingBracket{background-color:#bad0f847}[data-theme=dark] .ͼo .cm-gutters{background-color:#282c34;border:none;color:#7d8799}[data-theme=dark] .ͼo .cm-activeLineGutter{background-color:#2c313a}[data-theme=dark] .ͼo .cm-foldPlaceholder{background-color:transparent;border:none;color:#ddd}[data-theme=dark] .ͼo .cm-tooltip{background-color:#353a42;border:none}[data-theme=dark] .ͼo .cm-tooltip .cm-tooltip-arrow:before{border-bottom-color:transparent;border-top-color:transparent}[data-theme=dark] .ͼo .cm-tooltip .cm-tooltip-arrow:after{border-bottom-color:#353a42;border-top-color:#353a42}[data-theme=dark] .ͼ7{color:#cbcbcb}[data-theme=dark] .ͼc{color:#569cd5}.ͼ6,.ͼb,.ͼd,.ͼe,.ͼj,[data-theme=dark] .ͼf{color:#ce9178}[data-theme=dark] .ͼ6.ͼ5,[data-theme=dark] .ͼ6.ͼc{color:#9cdcfe}[data-theme=dark] .ͼh{color:#30a}[data-theme=dark] .ͼi{color:#569bd5}[data-theme=dark] .ͼk{color:#256}[data-theme=dark] .ͼm{color:#699754}[data-theme=dark] .ͼn{color:red}.cm-gutterElement{padding:0 .5rem}.cm-search.cm-panel button[type=button][aria-label=close]{color:unset;font-size:2rem;font-weight:100;margin-right:.75rem}.ͼ2 .cm-panels-bottom{border:0}.ͼ2 .cm-panels{background-color:transparent;color:unset}.cm-gotoLine.cm-panel .cm-textfield,.cm-search.cm-panel .cm-textfield,.ͼ1 .cm-textfield{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:auto;padding:.75rem;--pico-outline-width:0.0625rem;--pico-background-color:var(--pico-form-element-background-color);--pico-border-color:var(--pico-form-element-border-color);--pico-color:var(--pico-form-element-color);--pico-box-shadow:none}.cm-button,.cm-gotoLine.cm-panel .cm-button,.cm-gotoLine.cm-panel .cm-textfield,.cm-search.cm-panel .cm-textfield,.ͼ1 .cm-panel.cm-search button,.ͼ1 .cm-textfield{background-color:var(--pico-background-color);border:var(--pico-border-width) solid var(--pico-border-color);border-radius:var(--pico-border-radius);box-shadow:var(--pico-box-shadow);color:var(--pico-color);font-size:.75rem;font-weight:var(--pico-font-weight);outline:0;transition:background-color var(--pico-transition),border-color var(--pico-transition),color var(--pico-transition),box-shadow var(--pico-transition)}.cm-button,.cm-gotoLine.cm-panel .cm-button,.ͼ1 .cm-panel.cm-search button{background-image:none;margin:.5rem .5rem .5rem 0;--pico-background-color:var(--pico-primary-background);--pico-border-color:var(--pico-primary-border);--pico-color:var(--pico-primary-inverse);--pico-box-shadow:var(--pico-button-box-shadow,0 0 0 transparent);cursor:pointer;line-height:var(--pico-line-height);padding:.5rem .75rem;text-align:center;text-decoration:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.cm-button:hover,.cm-gotoLine.cm-panel .cm-button:hover,.ͼ1 .cm-panel.cm-search button:hover{--pico-background-color:var(--pico-primary-hover-background);--pico-border-color:var(--pico-primary-hover-border);--pico-box-shadow:var(--pico-button-hover-box-shadow,0 0 0 transparent);--pico-color:var(--pico-primary-inverse)}.cm-button:focus,.cm-gotoLine.cm-panel .cm-button:focus,.ͼ1 .cm-panel.cm-search button:focus{--pico-box-shadow:var(--pico-button-hover-box-shadow,0 0 0 transparent),0 0 0 var(--pico-outline-width) var(--pico-primary-focus)}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-y-0{bottom:0;top:0}.bottom-0{bottom:0}.left-0{left:0}.left-16{left:4rem}.right-0{right:0}.top-0{top:0}.isolate{isolation:isolate}.m-0{margin:0}.m-auto{margin:auto}.mx-0{margin-left:0;margin-right:0}.mx-2{margin-left:.5rem;margin-right:.5rem}.my-0{margin-bottom:0;margin-top:0}.my-2{margin-bottom:.5rem;margin-top:.5rem}.my-4{margin-bottom:1rem;margin-top:1rem}.-mt-1{margin-top:-.25rem}.-mt-2{margin-top:-.5rem}.-mt-3{margin-top:-.75rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.\!block{display:block!important}.block{display:block}.inline-block{display:inline-block}.\!inline{display:inline!important}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.inline-table{display:inline-table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row-group{display:table-row-group}.table-row{display:table-row}.grid{display:grid}.inline-grid{display:inline-grid}.contents{display:contents}.list-item{display:list-item}.hidden{display:none}.h-3{height:.75rem}.h-3\/4{height:75%}.h-4{height:1rem}.h-5{height:1.25rem}.h-56{height:14rem}.h-80{height:20rem}.h-auto{height:auto}.h-full{height:100%}.max-h-64{max-height:16rem}.w-24{width:6rem}.w-3{width:.75rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-8{width:2rem}.w-auto{width:auto}.w-full{width:100%}.flex-none{flex:none}.flex-shrink,.shrink{flex-shrink:1}.flex-grow{flex-grow:1}.origin-center{transform-origin:center}.scale-125{--tw-scale-x:1.25;--tw-scale-y:1.25}.scale-125,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.resize{resize:both}.list-none{list-style-type:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-rows-1{grid-template-rows:repeat(1,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-4{gap:1rem}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-hidden{overflow-y:hidden}.whitespace-nowrap{white-space:nowrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-md{border-radius:.375rem}.rounded-l-none{border-bottom-left-radius:0;border-top-left-radius:0}.rounded-r-none{border-bottom-right-radius:0;border-top-right-radius:0}.border{border-width:1px}.border-0{border-width:0}.border-x{border-left-width:1px;border-right-width:1px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-solid{border-style:solid}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-gray-600{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity))}.border-gray-800{--tw-border-opacity:1;border-color:rgb(31 41 55/var(--tw-border-opacity))}.bg-\[\#1c212c\]{--tw-bg-opacity:1;background-color:rgb(28 33 44/var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.px-0{padding-left:0;padding-right:0}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-4{padding-bottom:1rem;padding-top:1rem}.py-\[15px\]{padding-bottom:15px;padding-top:15px}.pl-3{padding-left:.75rem}.pr-0{padding-right:0}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[\.6rem\]{font-size:.6rem}.text-\[\.75rem\]{font-size:.75rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-thin{font-weight:100}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.text-\[\#ffffff00\]{color:#ffffff00}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity))}.text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.overline{text-decoration-line:overline}.line-through{text-decoration-line:line-through}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-2xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)}.shadow-blue-500{--tw-shadow-color:#3b82f6;--tw-shadow:var(--tw-shadow-colored)}.outline{outline-style:solid}.blur{--tw-blur:blur(8px)}.blur,.invert{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert:invert(100%)}.\!filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.focus-within\:shadow-none:focus-within{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\:bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity))}.focus\:shadow-none:focus{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}@media (min-width:640px){.sm\:inline-block{display:inline-block}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:flex-row-reverse{flex-direction:row-reverse}.sm\:border-0{border-width:0}.sm\:border-solid{border-style:solid}}@media (min-width:1024px){.lg\:border-r{border-right-width:1px}}@media (min-width:1536px){.\32xl\:w-1\/2{width:50%}}.cm-editor{height:100%;background-color:var(--pico-background-color)}[data-theme=dark] .cm-editor,[data-theme=dark] .ͼ5,[data-theme=dark] .ͼ6.ͼ5,[data-theme=dark] .ͼ6.ͼc,[data-theme=dark] .ͼg,[data-theme=dark] .ͼl{color:#9cdcfe}[data-theme=dark] .ͼ1.cm-focused{outline:#212121 dotted 1px}[data-theme=dark] .ͼ2 .cm-content{caret-color:black}[data-theme=dark] .ͼ3 .cm-content{caret-color:white}.ͼ3 .cm-selectionBackground,[data-theme=dark] .ͼ2 .cm-selectionBackground{background:#3a3d41}.ͼ3.cm-focused .cm-selectionBackground,[data-theme=dark] .ͼ2.cm-focused .cm-selectionBackground{background:#264f78}.ͼo .cm-content ::selection,.ͼo .cm-selectionBackground,[data-theme=dark] .ͼo.cm-focused>.cm-scroller>.cm-selectionLayer .cm-selectionBackground{background:#3e4451}.ͼ1 .cm-dropCursor,[data-theme=dark] .ͼ1 .cm-cursor{border-left:1.2px solid #000}[data-theme=dark] .ͼ3 .cm-cursor{border-left-color:#444}[data-theme=dark] .ͼ1.cm-focused .cm-cursor{display:block}[data-theme=dark] .ͼ2 .cm-activeLine{background-color:#cceeff44}[data-theme=dark] .ͼ3 .cm-activeLine{background-color:#99eeff33}[data-theme=dark] .ͼ2 .cm-specialChar,[data-theme=dark] .ͼn{color:red}[data-theme=dark] .ͼ3 .cm-specialChar{color:#f78}[data-theme=dark] .ͼ2 .cm-gutters{background-color:transparent;color:#6c6c6c;border-right:1px solid #1f2937}[data-theme=dark] .ͼ3 .cm-gutters{background-color:#333338;color:#ccc}[data-theme=dark] .ͼ2 .cm-activeLineGutter{color:#e2f2ff;background:#ffffff22}[data-theme=dark] .ͼ1 .cm-placeholder{color:#888}[data-theme=dark] .ͼ1 .cm-trailingSpace{background-color:#ff332255}[data-theme=dark] .ͼ3 .cm-button:active{background-image:linear-gradient(#111,#333)}[data-theme=dark] .ͼ3 .cm-button{background-image:linear-gradient(#393939,#111);border:1px solid #888}[data-theme=dark] .ͼ2 .cm-textfield{background-color:#fff}[data-theme=dark] .ͼ3 .cm-textfield{border:1px solid #555;background-color:inherit}[data-theme=dark] .ͼ1 .cm-diagnostic-error{border-left:5px solid #d11}[data-theme=dark] .ͼ1 .cm-diagnostic-warning{border-left:5px solid orange}[data-theme=dark] .ͼ1 .cm-diagnostic-info{border-left:5px solid #999}[data-theme=dark] .ͼ1 .cm-diagnosticAction{background-color:#444;color:#fff}[data-theme=dark] .ͼ1 .cm-lintRange-active{background-color:#ffdd9980}[data-theme=dark] .ͼ1 .cm-lintPoint-warning:after{border-bottom-color:orange}[data-theme=dark] .ͼ1 .cm-lintPoint-info:after{border-bottom-color:#999}[data-theme=dark] .ͼ1 .cm-panel.cm-panel-lint ul [aria-selected]{background-color:#ddd}[data-theme=dark] .ͼ1 .cm-panel.cm-panel-lint ul:focus [aria-selected]{background:Highlight;color:HighlightText}[data-theme=dark] .ͼ1 .emmet-tracker{text-decoration:underline 1px green}[data-theme=dark] .ͼ2 .cm-tooltip{border:1px solid #3e5b9f;background-color:#111828}[data-theme=dark] .ͼ2 .cm-tooltip-section:not(:first-child){border-top:1px solid #bbb}[data-theme=dark] .ͼ3 .cm-tooltip{background-color:#333338;color:#fff}[data-theme=dark] .ͼ1 .cm-tooltip-above .cm-tooltip-arrow:before{border-top:7px solid #bbb}[data-theme=dark] .ͼ1 .cm-tooltip-above .cm-tooltip-arrow:after{border-top:7px solid #f5f5f5;bottom:1px}[data-theme=dark] .ͼ1 .cm-tooltip-below .cm-tooltip-arrow:before{border-bottom:7px solid #bbb}[data-theme=dark] .ͼ1 .cm-tooltip-below .cm-tooltip-arrow:after{border-bottom:7px solid #f5f5f5;top:1px}[data-theme=dark] .ͼ3 .cm-tooltip .cm-tooltip-arrow:before{border-top-color:#333338;border-bottom-color:#333338}[data-theme=dark] .ͼ1.cm-focused .cm-matchingBracket{background-color:#328c8252}[data-theme=dark] .ͼ1.cm-focused .cm-nonmatchingBracket{background-color:#bb555544}[data-theme=dark] .ͼ1 .cm-foldPlaceholder{background-color:#eee;border:1px solid #ddd;color:#888;border-radius:.2em}[data-theme=dark] .ͼp{color:#c678dd}[data-theme=dark] .ͼq{color:#e06c75}[data-theme=dark] .ͼr{color:#61afef}[data-theme=dark] .ͼ12,[data-theme=dark] .ͼs{color:#d19a66}[data-theme=dark] .ͼt{color:#abb2bf}[data-theme=dark] .ͼu{color:#e5c07b}[data-theme=dark] .ͼv{color:#56b6c2}[data-theme=dark] .ͼw{color:#7d8799}[data-theme=dark] .ͼ11{font-weight:700;color:#e06c75}[data-theme=dark] .ͼ13{color:#98c379}[data-theme=dark] .ͼ14{color:#fff}[data-theme=dark] .ͼo{color:#abb2bf;background-color:#282c34}[data-theme=dark] .ͼo .cm-content{caret-color:#528bff}.ͼo .cm-dropCursor,[data-theme=dark] .ͼo .cm-cursor{border-left-color:#528bff}[data-theme=dark] .ͼo .cm-panels{background-color:#21252b;color:#abb2bf}[data-theme=dark] .ͼo .cm-panels.cm-panels-top{border-bottom:2px solid #000}[data-theme=dark] .ͼo .cm-panels.cm-panels-bottom{border-top:2px solid #000}[data-theme=dark] .ͼo .cm-searchMatch{background-color:#72a1ff59;outline:#457dff solid 1px}[data-theme=dark] .ͼo .cm-searchMatch.cm-searchMatch-selected{background-color:#6199ff2f}[data-theme=dark] .ͼo .cm-activeLine{background-color:#6699ff0b}[data-theme=dark] .ͼo .cm-selectionMatch{background-color:#aafe661a}.ͼo.cm-focused .cm-nonmatchingBracket,[data-theme=dark] .ͼo.cm-focused .cm-matchingBracket{background-color:#bad0f847}[data-theme=dark] .ͼo .cm-gutters{background-color:#282c34;color:#7d8799;border:none}[data-theme=dark] .ͼo .cm-activeLineGutter{background-color:#2c313a}[data-theme=dark] .ͼo .cm-foldPlaceholder{background-color:transparent;border:none;color:#ddd}[data-theme=dark] .ͼo .cm-tooltip{border:none;background-color:#353a42}[data-theme=dark] .ͼo .cm-tooltip .cm-tooltip-arrow:before{border-top-color:transparent;border-bottom-color:transparent}[data-theme=dark] .ͼo .cm-tooltip .cm-tooltip-arrow:after{border-top-color:#353a42;border-bottom-color:#353a42}[data-theme=dark] .ͼ7{color:#cbcbcb}[data-theme=dark] .ͼc{color:#569cd5}.ͼ6,.ͼb,.ͼd,.ͼe,.ͼj,[data-theme=dark] .ͼf{color:#ce9178}[data-theme=dark] .ͼh{color:#30a}[data-theme=dark] .ͼi{color:#569bd5}[data-theme=dark] .ͼk{color:#256}[data-theme=dark] .ͼm{color:#699754}.cm-gutterElement{padding:0 .5rem}.cm-search.cm-panel button[type=button][aria-label=close]{color:unset;font-size:2rem;margin-right:.75rem;font-weight:100}.ͼ2 .cm-panels-bottom{border:0}.ͼ2 .cm-panels{background-color:transparent;color:unset}.cm-button,.cm-gotoLine.cm-panel .cm-button,.cm-gotoLine.cm-panel .cm-textfield,.cm-search.cm-panel .cm-textfield,.ͼ1 .cm-panel.cm-search button,.ͼ1 .cm-textfield{outline:0;background-color:var(--pico-background-color);box-shadow:var(--pico-box-shadow);color:var(--pico-color);font-weight:var(--pico-font-weight);font-size:.75rem;transition:background-color var(--pico-transition),border-color var(--pico-transition),color var(--pico-transition),box-shadow var(--pico-transition)}.cm-gotoLine.cm-panel .cm-textfield,.cm-search.cm-panel .cm-textfield,.ͼ1 .cm-textfield{appearance:none;padding:.75rem;height:auto;--pico-outline-width:0.0625rem;--pico-background-color:var(--pico-form-element-background-color);--pico-border-color:var(--pico-form-element-border-color);--pico-color:var(--pico-form-element-color);--pico-box-shadow:none;border:var(--pico-border-width) solid var(--pico-border-color);border-radius:var(--pico-border-radius)}.cm-button,.cm-gotoLine.cm-panel .cm-button,.ͼ1 .cm-panel.cm-search button{background-image:none;margin:.5rem .5rem .5rem 0;--pico-background-color:var(--pico-primary-background);--pico-border-color:var(--pico-primary-border);--pico-color:var(--pico-primary-inverse);--pico-box-shadow:var(--pico-button-box-shadow, 0 0 0 rgba(0, 0, 0, 0));padding:.5rem .75rem;border:var(--pico-border-width) solid var(--pico-border-color);border-radius:var(--pico-border-radius);line-height:var(--pico-line-height);text-align:center;text-decoration:none;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.cm-button:hover,.cm-gotoLine.cm-panel .cm-button:hover,.ͼ1 .cm-panel.cm-search button:hover{--pico-background-color:var(--pico-primary-hover-background);--pico-border-color:var(--pico-primary-hover-border);--pico-box-shadow:var(--pico-button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0));--pico-color:var(--pico-primary-inverse)}.cm-button:focus,.cm-gotoLine.cm-panel .cm-button:focus,.ͼ1 .cm-panel.cm-search button:focus{--pico-box-shadow:var(--pico-button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0)),0 0 0 var(--pico-outline-width) var(--pico-primary-focus)}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none} \ No newline at end of file diff --git a/go/dist/main.js b/go/dist/main.js new file mode 100644 index 00000000..0986b1c1 --- /dev/null +++ b/go/dist/main.js @@ -0,0 +1,1683 @@ +(()=>{var ne=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(s,r)=>(typeof require<"u"?require:s)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});function q(t,s,r=[]){function i(n,o){return typeof n!="object"||n===null?n:new Proxy(n,{set(l,c,m){let a=[...o,c],x=l[c],h=Reflect.set(l,c,i(m,a));return x!==m&&s(a,x,m),h},get(l,c){let m=l[c];return typeof m=="object"&&m!==null?i(m,[...o,c]):m}})}return i(t,r)}var H={name:"kodeWeave",author:{name:"Michael Schwartz",href:"https://michaelsboost.com/",src:"imgs/author.jpg"},version:"1.2",url:"https://github.com/michaelsboost/kodeWeave/",license:"https://github.com/michaelsboost/kodeWeave/blob/main/LICENSE"},ae={name:"App name",version:.01,title:"An attractive title",description:"The most attractive description ever!",author:"kodeWeave",url:"https://michaelsboost.com/",meta:"",libraries:[],html_pre_processor:"html",css_pre_processor:"css",javascript_pre_processor:"javascript",html:"",css:"",javascript:"",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3c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JwYXRoNDI2MCIgLz4KICA8L2c+Cjwvc3ZnPgo=",console:!1,dark:!0,module:!0,autorun:!0,pwa:!1,preview:!0,activePanel:"html",columns:!1,columnsRight:!0},le={searchLibKey:null,librarySuggestions:null,iframeSize:null,activePanel:"html",selectedSize:"none",compiledJSX:null,menuDialog:null,settings:null,libraries:null,safeRender:null,demos:null},p=function(){let t="h-4 w-4",s="h-3 w-3",r="h-4 w-4",i="h-3 w-3",n="h-3 -mt-1";return{logo:`<svg + class="${t}" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + viewBox="0 0 511.99999 511.99999" + height="512" + width="512" + version="1.1" + id="svg4190"> + <metadata + id="metadata4196"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <defs + id="defs4194"> + <linearGradient + id="linearGradient4276"> + <stop + id="stop4278" + offset="0" + style="stop-color:#fd5d92;stop-opacity:1" /> + <stop + id="stop4280" + offset="1" + style="stop-color:#ff0000;stop-opacity:1" /> + </linearGradient> + <linearGradient + gradientUnits="userSpaceOnUse" + y2="257.3125" + x2="0.13404165" + y1="257.3125" + x1="511.71875" + id="linearGradient4282" + xlink:href="#linearGradient4276" /> + </defs> + <g + id="g4284"> + <circle + style="opacity:1;fill:url(#linearGradient4282);fill-opacity:1;stroke:none;stroke-width:12;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:72, 72;stroke-dashoffset:0;stroke-opacity:1" + id="path4270" + cx="256" + cy="256" + r="256" /> + <path + style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:12;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:72, 72;stroke-dashoffset:0;stroke-opacity:1" + d="m 251.06068,58.678272 c -4.56032,0.07035 -20.76061,2.041945 -29.29792,3.655984 -28.34391,5.35862 -66.88081,22.619814 -73.03699,32.719061 -1.89755,3.112935 -1.94616,7.147013 -1.94616,160.817023 0,152.2588 0.0671,157.72464 1.89998,160.73121 5.20599,8.53989 36.72003,23.70934 63.45133,30.54134 9.76572,2.49593 34.33509,6.3448 38.50754,6.03169 2.00388,-0.15036 2.03203,-0.97469 2.28921,-73.09324 0.14558,-40.83759 0.65643,-73.33414 1.16109,-73.83896 1.37751,-1.37795 7.34739,1.88473 10.35752,5.66215 1.46202,1.83468 13.79755,20.65528 27.41774,41.81943 51.44452,79.93847 50.46511,78.47798 53.30494,79.19094 3.32478,0.83474 12.56708,-3.78947 27.57606,-13.78583 14.24338,-9.48646 23.8855,-17.7831 34.81972,-29.96717 11.29502,-12.58615 14.83039,-17.41785 14.83039,-20.25308 0,-1.22009 -14.9706,-24.54033 -33.40133,-52.02846 -18.37057,-27.39837 -34.10107,-51.16876 -34.95828,-52.82696 -0.85723,-1.6582 -1.55693,-4.07335 -1.55693,-5.36519 0,-1.32123 12.48959,-22.29487 28.54584,-47.94352 44.48315,-71.05856 41.93833,-66.29178 38.83081,-72.84247 -2.55755,-5.39136 -15.36262,-19.65809 -26.13129,-29.11587 -11.45459,-10.060191 -35.06413,-25.950276 -39.90612,-26.858934 -2.94154,-0.55201 -3.97519,-0.246788 -5.91766,1.742201 -1.29564,1.326648 -20.35012,32.348303 -42.34048,68.935723 -21.99036,36.5874 -41.06539,67.99167 -42.38665,69.78702 -2.61954,3.55937 -6.73281,6.09306 -8.73463,5.37838 -0.99947,-0.35683 -1.26665,-18.17035 -1.26665,-84.44394 0,-49.513196 -0.37864,-84.219226 -0.9236,-84.556138 -0.11984,-0.0741 -0.53601,-0.102446 -1.18748,-0.09238 z" + id="path4260" /> + </g> + </svg>`,twitterfill:`<svg class="${t}" fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"> + <path d="M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z"/> + </svg>`,twitter:`<svg class="${t}" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> + <defs + id="defs2"><clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath7"><path + style="display:none;fill:#2a34ff;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1" + d="M 2.7194315,3.6106111 H 8.5920036 L 21.280954,20.389389 h -5.727371 z" + id="path7" /><path + id="lpe_path-effect7" + style="fill:#2a34ff;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1" + class="powerclip" + d="M -2.8448815,-3.9722732 H 26.113213 V 27.972273 H -2.8448815 Z M 2.7194315,3.6106111 15.553583,20.389389 h 5.727371 L 8.5920036,3.6106111 Z" /></clipPath><clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath11"><rect + style="fill:#ff2a2a;fill-opacity:1;stroke:none;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1" + id="rect11" + width="21.586601" + height="18.278778" + x="1.2021173" + y="2.8606112" /></clipPath></defs><g + style="fill:none;stroke:currentColor;stroke-width:1.5" + id="g2" + transform="translate(-0.04613684)"><g + id="g8" + clip-path="url(#clipPath11)"><path + d="M 2.7194315,3.6106111 H 8.5920036 L 21.280954,20.389389 h -5.727371 z" + id="path2-8" /><path + d="M 20.541589,1.5132639 19.650846,2.5619375 18.760104,3.6106111 17.869362,4.6592848 16.978619,5.7079584 16.087877,6.756632 15.197135,7.8053056 14.306392,8.8539793 13.41565,9.9026529 12.524908,10.951326 11.634165,12 10.743423,13.048674 9.852681,14.097347 8.961938,15.146021 8.071196,16.194695 7.1804539,17.243368 6.2897116,18.292042 5.3989693,19.340715 4.5082269,20.389389 3.6174846,21.438063 2.7267423,22.486736" + id="path4" + clip-path="url(#clipPath7)" /></g></g> + </svg>`,heart:`<svg class="w-3" fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"> + <path d="M47.6 300.4L228.3 469.1c7.5 7 17.4 10.9 27.7 10.9s20.2-3.9 27.7-10.9L464.4 300.4c30.4-28.3 47.6-68 47.6-109.5v-5.8c0-69.9-50.5-129.5-119.4-141C347 36.5 300.6 51.4 268 84L256 96 244 84c-32.6-32.6-79-47.5-124.6-39.9C50.5 55.6 0 115.2 0 185.1v5.8c0 41.5 17.2 81.2 47.6 109.5z" /> + </svg>`,html:`<svg class="${t}" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 384 512"> + <path + d="M0 32l34.9 395.8L191.5 480l157.6-52.2L384 32H0zm308.2 127.9H124.4l4.1 49.4h175.6l-13.6 148.4-97.9 27v.3h-1.1l-98.7-27.3-6-75.8h47.7L138 320l53.5 14.5 53.7-14.5 6-62.2H84.3L71.5 112.2h241.1l-4.4 47.7z"/> + </svg>`,css:`<svg class="${t}" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 512 512"> + <path + d="M480 32l-64 368-223.3 80L0 400l19.6-94.8h82l-8 40.6L210 390.2l134.1-44.4 18.8-97.1H29.5l16-82h333.7l10.5-52.7H56.3l16.3-82H480z"/> + </svg>`,javascript:`<svg class="${t}" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 448 512"> + <path + d="M0 32v448h448V32H0zm243.8 349.4c0 43.6-25.6 63.5-62.9 63.5-33.7 0-53.2-17.4-63.2-38.5l34.3-20.7c6.6 11.7 12.6 21.6 27.1 21.6 13.8 0 22.6-5.4 22.6-26.5V237.7h42.1v143.7zm99.6 63.5c-39.1 0-64.4-18.6-76.7-43l34.3-19.8c9 14.7 20.8 25.6 41.5 25.6 17.4 0 28.6-8.7 28.6-20.8 0-14.4-11.4-19.5-30.7-28l-10.5-4.5c-30.4-12.9-50.5-29.2-50.5-63.5 0-31.6 24.1-55.6 61.6-55.6 26.8 0 46 9.3 59.8 33.7L368 290c-7.2-12.9-15-18-27.1-18-12.3 0-20.1 7.8-20.1 18 0 12.6 7.8 17.7 25.9 25.6l10.5 4.5c35.8 15.3 55.9 31 55.9 66.2 0 37.8-29.8 58.6-69.7 58.6z"/> + </svg>`,columns:`<svg class="${t}" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" d="M9 4.5v15m6-15v15m-10.875 0h15.75c.621 0 1.125-.504 1.125-1.125V5.625c0-.621-.504-1.125-1.125-1.125H4.125C3.504 4.5 3 5.004 3 5.625v12.75c0 .621.504 1.125 1.125 1.125Z" /> + </svg>`,leftChev:`<svg class="${t}" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" d="M15.75 19.5 8.25 12l7.5-7.5" /> + </svg>`,rightChev:`<svg class="${t}" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" d="m8.25 4.5 7.5 7.5-7.5 7.5" /> + </svg>`,console:`<svg class="${t}" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> + <path d="m 12,18.340203 h 8.757019" /> + <path d="M 3.3316546,18.340203 10.159567,11.778315 3.2429806,5.6597968" /> + </svg>`,play:`<svg class="${t}" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" d="M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 0 1 0 1.972l-11.54 6.347a1.125 1.125 0 0 1-1.667-.986V5.653Z" /> + </svg>`,camera:`<svg class="${t}" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" d="M6.827 6.175A2.31 2.31 0 0 1 5.186 7.23c-.38.054-.757.112-1.134.175C2.999 7.58 2.25 8.507 2.25 9.574V18a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9.574c0-1.067-.75-1.994-1.802-2.169a47.865 47.865 0 0 0-1.134-.175 2.31 2.31 0 0 1-1.64-1.055l-.822-1.316a2.192 2.192 0 0 0-1.736-1.039 48.774 48.774 0 0 0-5.232 0 2.192 2.192 0 0 0-1.736 1.039l-.821 1.316Z" /> + <path stroke-linecap="round" stroke-linejoin="round" d="M16.5 12.75a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0ZM18.75 10.5h.008v.008h-.008V10.5Z" /> + </svg>`,cog:`<svg class="${t}" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z" /> + <path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" /> + </svg>`,tidy:`<svg class="${n}" fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"> + <path d="M566.6 54.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192-34.7-34.7c-4.2-4.2-10-6.6-16-6.6c-12.5 0-22.6 10.1-22.6 22.6l0 29.1L364.3 320l29.1 0c12.5 0 22.6-10.1 22.6-22.6c0-6-2.4-11.8-6.6-16l-34.7-34.7 192-192zM341.1 353.4L222.6 234.9c-42.7-3.7-85.2 11.7-115.8 42.3l-8 8C76.5 307.5 64 337.7 64 369.2c0 6.8 7.1 11.2 13.2 8.2l51.1-25.5c5-2.5 9.5 4.1 5.4 7.9L7.3 473.4C2.7 477.6 0 483.6 0 489.9C0 502.1 9.9 512 22.1 512l173.3 0c38.8 0 75.9-15.4 103.4-42.8c30.6-30.6 45.9-73.1 42.3-115.8z"/> + </svg>`,rotate:`<svg class="${n}" fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"> + <path d="M463.5 224H472c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1c-87.5 87.5-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8H463.5z" /> + </svg>`,times:`<svg class="${r}" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12" /> + </svg>`,file:`<svg class="h-3 -mt-1" fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"> + <path d="M0 64C0 28.7 28.7 0 64 0H224V128c0 17.7 14.3 32 32 32H384V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64zm384 64H256V0L384 128z" /> + </svg>`,import:`<svg class="h-3 -mt-1 transform origin-center scale-125" fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"> + <path d="M128 64c0-35.3 28.7-64 64-64H352V128c0 17.7 14.3 32 32 32H512V448c0 35.3-28.7 64-64 64H192c-35.3 0-64-28.7-64-64V336H302.1l-39 39c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l80-80c9.4-9.4 9.4-24.6 0-33.9l-80-80c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l39 39H128V64zm0 224v48H24c-13.3 0-24-10.7-24-24s10.7-24 24-24H128zM512 128H384V0L512 128z" /> + </svg>`,download:`<svg class="h-3 -mt-1 transform origin-center scale-125" fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"> + <path d="M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32V274.7l-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7V32zM64 352c-35.3 0-64 28.7-64 64v32c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V416c0-35.3-28.7-64-64-64H346.5l-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352H64zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z" /> + </svg>`,codepen:`<svg class="h-3 -mt-1 transform origin-center scale-125" fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"> + <path d="M502.285 159.704l-234-156c-7.987-4.915-16.511-4.96-24.571 0l-234 156C3.714 163.703 0 170.847 0 177.989v155.999c0 7.143 3.714 14.286 9.715 18.286l234 156.022c7.987 4.915 16.511 4.96 24.571 0l234-156.022c6-3.999 9.715-11.143 9.715-18.286V177.989c-.001-7.142-3.715-14.286-9.716-18.285zM278 63.131l172.286 114.858-76.857 51.429L278 165.703V63.131zm-44 0v102.572l-95.429 63.715-76.857-51.429L234 63.131zM44 219.132l55.143 36.857L44 292.846v-73.714zm190 229.715L61.714 333.989l76.857-51.429L234 346.275v102.572zm22-140.858l-77.715-52 77.715-52 77.715 52-77.715 52zm22 140.858V346.275l95.429-63.715 76.857 51.429L278 448.847zm190-156.001l-55.143-36.857L468 219.132v73.714z" /> + </svg>`,trash:`<svg class="${i}" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0" /> + </svg>`,undo:`<svg class="${s}" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" d="m7.49 12-3.75 3.75m0 0 3.75 3.75m-3.75-3.75h16.5V4.499" /> + </svg>`,redo:`<svg class="${s}" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" d="m16.49 12 3.75 3.75m0 0-3.75 3.75m3.75-3.75H3.74V4.499" /> + </svg>`,cut:`<svg class="${s}" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" d="m7.848 8.25 1.536.887M7.848 8.25a3 3 0 1 1-5.196-3 3 3 0 0 1 5.196 3Zm1.536.887a2.165 2.165 0 0 1 1.083 1.839c.005.351.054.695.14 1.024M9.384 9.137l2.077 1.199M7.848 15.75l1.536-.887m-1.536.887a3 3 0 1 1-5.196 3 3 3 0 0 1 5.196-3Zm1.536-.887a2.165 2.165 0 0 0 1.083-1.838c.005-.352.054-.695.14-1.025m-1.223 2.863 2.077-1.199m0-3.328a4.323 4.323 0 0 1 2.068-1.379l5.325-1.628a4.5 4.5 0 0 1 2.48-.044l.803.215-7.794 4.5m-2.882-1.664A4.33 4.33 0 0 0 10.607 12m3.736 0 7.794 4.5-.802.215a4.5 4.5 0 0 1-2.48-.043l-5.326-1.629a4.324 4.324 0 0 1-2.068-1.379M14.343 12l-2.882 1.664" /> + </svg>`,copy:`<svg class="${s}" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" d="M15.666 3.888A2.25 2.25 0 0 0 13.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 0 1-.75.75H9a.75.75 0 0 1-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 0 1-2.25 2.25H6.75A2.25 2.25 0 0 1 4.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 0 1 1.927-.184" /> + </svg>`,paste:`<svg class="${s}" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" d="M8.25 7.5V6.108c0-1.135.845-2.098 1.976-2.192.373-.03.748-.057 1.123-.08M15.75 18H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 0 0-1.123-.08M15.75 18.75v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5A3.375 3.375 0 0 0 6.375 7.5H5.25m11.9-3.664A2.251 2.251 0 0 0 15 2.25h-1.5a2.251 2.251 0 0 0-2.15 1.586m5.8 0c.065.21.1.433.1.664v.75h-6V4.5c0-.231.035-.454.1-.664M6.75 7.5H4.875c-.621 0-1.125.504-1.125 1.125v12c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V16.5a9 9 0 0 0-9-9Z" /> + </svg>`,indent:`<svg class="${s}" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" d="M17.25 8.25 21 12m0 0-3.75 3.75M21 12H3" /> + </svg>`,outdent:`<svg class="${s}" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" d="M6.75 15.75 3 12m0 0 3.75-3.75M3 12h18" /> + </svg>`,search:`<svg class="${s}" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z" /> + </svg>`,goto:`<svg class="${s}" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m5.231 13.481L15 17.25m-4.5-15H5.625c-.621 0-1.125.504-1.125 1.125v16.5c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Zm3.75 11.625a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z" /> + </svg>`,comment:`<svg class="${s}" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" d="M2.25 12.76c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.076-4.076a1.526 1.526 0 0 1 1.037-.443 48.282 48.282 0 0 0 5.68-.494c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z" /> + </svg>`,fold:`<svg class="${t}" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" d="m8.25 4.5 7.5 7.5-7.5 7.5" /> + </svg>`,unfold:`<svg class="${t}" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" d="m19.5 8.25-7.5 7.5-7.5-7.5" /> + </svg>`,cursor:`<svg class="${t}" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" d="M15.042 21.672 13.684 16.6m0 0-2.51 2.225.569-9.47 5.227 7.917-3.286-.672ZM12 2.25V4.5m5.834.166-1.591 1.591M20.25 10.5H18M7.757 14.743l-1.59 1.59M6 10.5H3.75m4.007-4.243-1.59-1.59" /> + </svg>`}}(),e=q(ae,(t,s,r)=>{let n=document.getElementById("iframe").contentWindow.document;if(s!==r){if(localStorage.setItem("kodeWeave",JSON.stringify(e)),k.render("#app"),t.toString()==="activePanel"){if(!window.editorManager)return;e.activePanel==="html"&&setActiveEditor(editorManager.htmlEditor),e.activePanel==="css"&&setActiveEditor(editorManager.cssEditor),e.activePanel==="javascript"&&setActiveEditor(editorManager.javascriptEditor)}if(!k.initialRender){let o=t.toString();if(o==="css"||o==="console"){let l=` + [data-zwj=zwjkonsole] { + display: ${e.console?"flex":"none"}; + } + + ${e.css}`;if(n.getElementById("cuxjju3ew").textContent=l,!window.editorManager)return;o==="css"&&editorManager.cssEditor.state.doc.toString()!==e.css&&dispatchChanges(editorManager.cssEditor,e.css)}if(o==="html"){if(e.autorun&&C(!0),!window.editorManager)return;window.editorManager.htmlEditor.state.doc.toString()!==e.html&&dispatchChanges(editorManager.htmlEditor,e.html)}if(o==="javascript"){if(e.autorun&&C(!0),!window.editorManager)return;window.editorManager.jsEditor.state.doc.toString()!==e.javascript&&dispatchChanges(editorManager.jsEditor,e.javascript)}(o==="meta"||o==="libraries"||o==="html_pre_processor"||o==="css_pre_processor"||o==="javascript_pre_processor")&&e.autorun&&C(!0),o==="dark"&&(k.render("#app"),document.documentElement.setAttribute("data-theme",e.dark?"dark":"light"),n.documentElement.setAttribute("data-theme",e.dark?"dark":"light"),document.querySelector("meta[name=apple-mobile-web-app-status-bar-style]").setAttribute("content",e.dark?"black-translucent":"default"),document.querySelector("meta[name=theme-color]").setAttribute("content",e.dark?"#13171f":"#ffffff"),document.querySelector("meta[name=msapplication-navbutton-color]").setAttribute("content",e.dark?"#13171f":"#ffffff"))}}}),g=q(le,(t,s,r)=>{s!==r&&k.render("#app")});window.project=e;window.data=g;function ce(){let t="w-full";return`<ul class="p-0 m-0"> + <li class="list-none m-0"> + <button + aria-label="toggle menu" + name="toggle menu" + class="${t} text-sm border-0 px-0 py-3 rounded-md bg-transparent" + style="color: unset;" + onclick="data.menuDialog = true" + > + ${p.logo} + </button> + </li> + <li class="list-none m-0"> + <a + aria-label="toggle html" + name="toggle html" + class="${t} text-sm border-0 px-4 py-3 rounded-md bg-transparent" + style="color: unset;" + role="button" + href="https://twitter.com/kodeweave_app" + > + ${p.twitter} + </a> + </li> + <li class="list-none m-0"> + <a + href="https://michaelsboost.com/donate/" + aria-label="Donation helps developer maintence" + target="_blank" + role="button" + class="${t} text-sm border-0 px-4 py-3 rounded-md bg-transparent text-red-400" + > + ${p.heart} + </a> + </li> +</ul> +<ul class="p-0 m-0"> + <li class="list-none m-0"> + <hr /> + </li> + <li class="list-none m-0"> + <button + aria-label="toggle html" + name="toggle html" + class="${t} text-sm border-0 px-0 py-3 rounded-md bg-transparent ${e.activePanel==="html"?"text-blue-500":""}" + ${e.activePanel==="html"?"":'style="color: unset;"'} + onclick="setActiveEditor(htmlEditor); project.activePanel = project.activePanel === 'html' ? null : 'html'; defineScale();" + > + ${p.html} + </button> + </li> + <li class="list-none m-0"> + <button + aria-label="toggle css" + name="toggle css" + class="${t} text-sm border-0 px-0 py-3 rounded-md bg-transparent ${e.activePanel==="css"?"text-blue-500":""}" + ${e.activePanel==="css"?"":'style="color: unset;"'} + onclick="setActiveEditor(cssEditor); project.activePanel = project.activePanel === 'css' ? null : 'css'; defineScale();" + > + ${p.css} + </button> + </li> + <li class="list-none m-0"> + <button + aria-label="toggle javascript" + name="toggle javascript" + class="${t} text-sm border-0 px-0 py-3 rounded-md bg-transparent ${e.activePanel==="javascript"?"text-blue-500":""}" + ${e.activePanel==="javascript"?"":'style="color: unset;"'} + onclick="setActiveEditor(jsEditor); project.activePanel = project.activePanel === 'javascript' ? null : 'javascript'; defineScale();" + > + ${p.javascript} + </button> + </li> + <li class="list-none m-0"> + <hr /> + </li> +</ul> +<ul class="p-0 m-0"> + <li class="list-none m-0"> + <button + aria-label="toggle preview" + name="toggle preview" + class="${t} text-sm border-0 px-0 py-3 rounded-md bg-transparent ${e.preview?"text-blue-500":""}" + onclick="project.preview = !project.preview" + > + ${p.play} + </button> + </li> + <li class="list-none m-0"> + <button + aria-label="toggle console" + name="toggle console" + class="${t} text-sm border-0 px-0 py-3 rounded-md bg-transparent ${e.console?"text-green-500":""}" + onclick="project.console = !project.console;" + style="${e.dark?"":`${e.console?"":"color: unset;"}`}" + > + ${p.console} + </button> + </li> + <li class="list-none m-0"> + <button + aria-label="full page screenshot" + name="full page screenshot" + class="${t} text-sm border-0 px-0 py-3 rounded-md bg-transparent" + style="color: unset;" + onclick="screenshot()" + > + ${p.camera} + </button> + </li> + <li class="list-none m-0"> + <button + aria-label="settings button" + name="settings" + class="${t} text-sm border-0 px-4 py-3 rounded-md bg-transparent -mt-1" + style="color: unset;" + onclick="data.settings = !data.settings" + > + ${p.cog} + </button> + </li> +</ul>`}function pe(){let t="border-0 bg-transparent text-sm",s="mx-0 my-2 w-auto rounded-md capitalize text-[.6rem]",r="padding: 0.5rem;",i={Phones:{"320x480":"iPhone 3GS","375x667":"iPhone 6/7/8","414x736":"iPhone 6/7/8 Plus","375x812":"iPhone X/XS/11 Pro","414x896":"iPhone XR/XS Max/11/11 Pro Max","360x640":"Samsung Galaxy S5","360x740":"Samsung Galaxy S8+","1440x3200":"Samsung Galaxy S21 Ultra","1080x2340":"Google Pixel 5","1080x2400":"OnePlus 8 Pro","1440x3200":"Xiaomi Mi 11 Ultra","1644x3840":"Sony Xperia 1 III"},Tablets:{"2048x2732":'iPad Pro 12.9" (3rd/4th Gen)',"2388x1668":'iPad Pro 11" (1st/2nd/3rd Gen)',"2736x1824":"Microsoft Surface Pro 7","2800x1752":"Samsung Galaxy Tab S7+","2560x1600":"Huawei MatePad Pro","2000x1200":"Lenovo Tab P11 Pro","1920x1200":"Amazon Fire HD 10","1536x2048":"iPad Air (3rd Gen)","1620x2160":"iPad Air (4th Gen)","1620x2160":'iPad 10.2" (8th Gen)',"1668x2224":'iPad Pro 11" (2021)'},Desktops:{"3840x2160":"4K UHD (3840x2160)","2560x1440":"WQHD (2560x1440)","1920x1080":"Full HD (1920x1080)","1366x768":"Laptop (1366x768)","3440x1440":"UltraWide QHD (3440x1440)","5120x2880":"5K Retina (5120x2880)","1280x800":"MacBook (1280x800)","2560x1600":"MacBook Pro (2560x1600)","2880x1800":"MacBook Pro Retina (2880x1800)"}},n=`<label for="selectedSize" aria-label="resize canvas" class="mx-2"> + <select id="selectedSize" onchange="resizeCanvas(this.value)" class="${s}" style="${r}"> + <option value="none">Select Size</option> + ${Object.keys(i).map(l=>` + <optgroup label="${l}"> + ${Object.keys(i[l]).map(c=>` + <option value="${c}">${i[l][c]}</option> + `).join("")} + </optgroup> + `).join("")} + </select> + </label>`;function o(){if(!e.activePanel||e.activePanel&&(e.activePanel==="html"&&e.html_pre_processor!=="html"||e.activePanel==="css"&&e.css_pre_processor!=="css"||e.activePanel==="javascript"&&e.javascript_pre_processor!=="javascript"))return"hidden"}return`<div class="flex justify-between items-center overflow-auto"> + ${n} + + <ul class="m-0 p-0 flex whitespace-nowrap overflow-x-auto overflow-y-hidden"> + <li class="list-none"> + <button + aria-label="rotate canvas" + name="rotate canvas" + class="${t} ${g.selectedSize==="none"?"hidden":""}" + style="color: unset;" + onclick="rotateCanvas()"> + ${p.rotate} + </button> + </li> + <li class="list-none ${e.activePanel?"":"hidden"}"> + <button + aria-label="change view" + name="change view" + class="${t} hidden sm:inline-block" + style="color: unset; ${e.columns?"":"transform: rotate(90deg);"}" + onclick="project.columns = !project.columns;" + > + ${p.columns} + </button> + </li> + <li class="list-none ${e.activePanel?"":"hidden"}"> + <button + aria-label="toggle columns left or right" + name="toggle columns left or right" + class="${t} hidden ${e.activePanel?`${e.columns?"":"sm:inline-block"}`:""}" + style="color: unset;" + onclick="project.columnsRight = !project.columnsRight;" + > + ${e.columnsRight?p.leftChev:p.rightChev} + </button> + </li> + <li class="list-none"> + <button + aria-label="tidy code" + name="tidy code" + class="${t} ${o()}" + style="color: unset;" + onclick="tidy()"> + ${p.tidy} + </button> + </li> + <li class="list-none"> + <button + aria-label="run preview" + name="run preview" + class="${t} ${e.autorun?"hidden":""}" + style="color: unset;" + onclick="renderPreview(true)" + > + ${p.play} + </button> + </li> + </ul> +</div>`}var k={initialRender:!0,render(t){let s=g.selectedSize,r,i,n=document.getElementById("previewElm");document.getElementById("previewElm")&&(r=n.clientWidth,i=n.clientHeight);let[o,l]=s.split("x").map(Number),c=`<ul class="py-4 px-0"> + <li class="list-none"> + <div class="items-center text-center"> + <div> + <a + aria-label="project homepage" + name="project homepage" + target="_blank" + href="${H.url}"> + <img + alt="logo" + class="my-4 w-24 m-auto" + src="../imgs/logo.svg" + loading="lazy" /> + </a> + <div class="text-2xl"> + About ${H.name} + </div> + <div class="my-2 text-xs"> + Version ${H.version} + </div> + <a + target="_blank" + class="text-sm underline mb-2 text-blue-500" + href="${H.license}"> + Open Source License + </a> + </div> + </div> + </li> + <li class="p-0 list-none"> + <hr /> + </li> + <li class="p-0 list-none -mt-2"> + <button + class="w-full flex gap-2 text-sm capitalize border-0 p-2 rounded-md bg-transparent" + style="color: unset;" + onclick="data.menuDialog = null; data.demos = true;"> + <svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z" /> + </svg> + <span>new project</span> + </button> + </li> + <li class="p-0 list-none"> + <button + class="w-full flex gap-2 text-sm capitalize border-0 p-2 rounded-md bg-transparent" + style="color: unset;" + onclick="data.menuDialog = null; importProject()"> + <svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m6.75 12-3-3m0 0-3 3m3-3v6m-1.5-15H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z" /> + </svg> + <span>import project</span> + </button> + </li> + <li class="p-0 list-none"> + <button + class="w-full flex gap-2 text-sm capitalize border-0 p-2 rounded-md bg-transparent" + style="color: unset;" + onclick="data.menuDialog = null; downloadJSON()"> + <svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" d="M9 8.25H7.5a2.25 2.25 0 0 0-2.25 2.25v9a2.25 2.25 0 0 0 2.25 2.25h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25H15M9 12l3 3m0 0 3-3m-3 3V2.25" /> + </svg> + <span>download json</span> + </button> + </li> + <li class="p-0 list-none"> + <button + class="w-full flex gap-2 text-sm capitalize border-0 p-2 rounded-md bg-transparent" + style="color: unset;" + onclick="data.menuDialog = null; downloadProject()"> + <svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" d="M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3" /> + </svg> + <span>download zip</span> + </button> + </li> + <li class="p-0 list-none"> + <button + class="w-full flex gap-2 text-sm capitalize border-0 p-2 rounded-md bg-transparent" + style="color: unset;" + onclick="data.menuDialog = null; share()"> + <svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" d="M7.217 10.907a2.25 2.25 0 1 0 0 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186 9.566-5.314m-9.566 7.5 9.566 5.314m0 0a2.25 2.25 0 1 0 3.935 2.186 2.25 2.25 0 0 0-3.935-2.186Zm0-12.814a2.25 2.25 0 1 0 3.933-2.185 2.25 2.25 0 0 0-3.933 2.185Z" /> + </svg> + <span>share to codepen</span> + </button> + </li> + <li class="p-0 list-none"> + <button + aria-label="Empty storage saved from kodeWeave" + name="Empty storage saved from kodeWeave" + class="w-full flex gap-2 text-sm capitalize border-0 p-2 rounded-md bg-transparent" + style="color: unset;" + onclick="emptyStorage()"> + <svg class="h-5 w-5" fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"> + <path d="M566.6 54.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192-34.7-34.7c-4.2-4.2-10-6.6-16-6.6c-12.5 0-22.6 10.1-22.6 22.6l0 29.1L364.3 320l29.1 0c12.5 0 22.6-10.1 22.6-22.6c0-6-2.4-11.8-6.6-16l-34.7-34.7 192-192zM341.1 353.4L222.6 234.9c-42.7-3.7-85.2 11.7-115.8 42.3l-8 8C76.5 307.5 64 337.7 64 369.2c0 6.8 7.1 11.2 13.2 8.2l51.1-25.5c5-2.5 9.5 4.1 5.4 7.9L7.3 473.4C2.7 477.6 0 483.6 0 489.9C0 502.1 9.9 512 22.1 512l173.3 0c38.8 0 75.9-15.4 103.4-42.8c30.6-30.6 45.9-73.1 42.3-115.8z"/> + </svg> + <span>empty storage</span> + </button> + </li> + </ul>`;c=`<dialog ${g.menuDialog?"open":""}> + <article class="rounded-md"> + <header class="flex justify-between items-center"> + <h1 class="text-lg font-thin m-0 capitalize"> + file menu + </h1> + <button + class="text-xs w-auto px-3 py-2 m-0 capitalize rounded-md bg-transparent border-0" + style="color: unset;" + aria-label="Close" + onclick="data.menuDialog = null"> + ${p.times} + </button> + </header> + <main class="font-thin"> + ${c} + </main> + <footer> + <button + class="text-xs w-auto px-3 py-2 m-0 capitalize rounded-md bg-transparent border ${e.dark?"border-gray-600":"border-gray-200"}" + style="color: unset;" + aria-label="Close" + onclick="data.menuDialog = null"> + close + </button> + </footer> + </article> + </dialog>`;let m=`<ul class="px-0"> + <li class="list-none"> + <div class="mb-2"> + <input + id="pjqgd1wka" + type="file" + name="project logo" + class="hidden" + onchange="handleLogoChange(event)" + /> + <label + for="pjqgd1wka" + class="mb-2 flex justify-between items-center cursor-pointer"> + <span>Project logo:</span> + + <img + id="projectLogo" + class="w-8" + alt="Project Logo" + src="${e.logo}" + loading="lazy"> + </label> + </div> + </li> + <li class="list-none"> + <nav class="flex justify-between mt-5 items-center"> + <label + for="o14tigo4m" + class="mb-2 flex justify-between items-center cursor-pointer"> + <span>Dark:</span> + </label> + + <input + id="o14tigo4m" + class="m-0" + type="checkbox" + role="switch" + name="toggle css reset" + onchange="project.dark = this.checked;" + ${e.dark?"checked":""} + /> + </nav> + </li> + <li class="list-none"> + <nav class="flex justify-between mt-5 items-center"> + <label + for="ep0b8bd4c" + class="mb-2 flex justify-between items-center cursor-pointer"> + <span>Module:</span> + </label> + + <input + id="ep0b8bd4c" + class="m-0" + type="checkbox" + role="switch" + name="toggle module" + onchange="project.module = this.checked;" + ${e.module?"checked":""} + /> + </nav> + </li> + <li class="list-none"> + <nav class="flex justify-between mt-5 items-center"> + <label + for="if2s51d22" + class="mb-2 flex justify-between items-center cursor-pointer"> + <span>Auto run:</span> + </label> + + <input + id="if2s51d22" + class="m-0" + type="checkbox" + role="switch" + name="toggle auto run" + onchange="project.autorun = this.checked;" + ${e.autorun?"checked":""} + /> + </nav> + </li> + <li class="list-none"> + <nav class="flex justify-between mt-5 items-center"> + <label + for="osbpm2k0q" + class="mb-2 flex justify-between items-center cursor-pointer"> + <span>PWA:</span> + </label> + + <input + id="osbpm2k0q" + class="m-0" + type="checkbox" + role="switch" + name="export project as a pwa" + onchange="project.pwa = this.checked" + ${e.pwa?"checked":""} + /> + </nav> + </li> + <li class="p-0 list-none"> + <hr /> + </li> + <li class="list-none"> + <nav class="flex justifu-between -mt-3 items-center"> + <label + for="wl7i1adq7" + class="m-0 flex justify-between items-center cursor-pointer"> + <span>Libraries:</span> + </label> + + <button + aria-label="search libraries" + name="search libraries" + class="bg-transparent border-0 focus-within:shadow-none" + style="color: unset;" + onclick="data.libraries = true; searchInput.focus();"> + ${p.search} + </button> + </nav> + + <div id="librariesBox"> + ${e.libraries.map((v,M)=>` + <nav class="flex justify-between py-2" data-index="${M}"> + <input + type="text" + placeholder="https://cdnjs.cloudflare.com/ajax/libs/Sortable/1.15.2/Sortable.min.js" + data="library" + class="w-full pl-3 pr-0 rounded-md rounded-r-none focus:shadow-none" + style="margin-bottom: 0;" + value="${v}" + oninput="project.libraries[${M}] = this.value; renderPreview(true);" /> + <button + aria-label="delete library" + name="delete library" + class="px-3 py-[15px] h-full border-0 rounded-md rounded-l-none" + onclick="project.libraries.splice(${M}, 1); renderPreview(true);"> + ${p.trash} + </button> + </nav> + `).join("")} + </div> + <button + aria-label="add another library or framework" + name="add another library or framework" + onclick="project.libraries.push('')" + class="capitalize py-2 w-full items-center rounded-md"> + <span class="text-[.75rem]"> + Add another + </span> + </button> + </li> + <li class="p-0 list-none"> + <hr /> + </li> + <!-- + <li class="list-none"> + <nav class="flex justify-between mt-5 items-center"> + <div class="mb-2"> + HTML: + </div> + + <select + aria-label="html preprocessor" + name="html preprocessor" + onchange="setPreprocessor('html', this.value);" + class="w-auto my-0 text-[.75rem]"> + <option value="html" ${e.html_pre_processor==="html"?"selected":""}>HTML</option> + <option value="markdown" ${e.html_pre_processor==="markdown"?"selected":""}>Markdown</option> + <option value="pug" ${e.html_pre_processor==="pug"?"selected":""}>Pug</option> + </select> + </nav> + </li> + <li class="p-0 list-none"> + <hr /> + </li> + <li class="list-none"> + <nav class="flex justify-between mt-5 items-center"> + <div class="mb-2"> + CSS: + </div> + + <select + aria-label="css preprocessor" + name="css preprocessor" + onchange="setPreprocessor('css', this.value);" + class="w-auto my-0 text-[.75rem]"> + <option value="css" ${e.css_pre_processor==="css"?"selected":""}>CSS</option> + <option value="sass" ${e.css_pre_processor==="sass"?"selected":""}>Sass</option> + <option value="less" ${e.css_pre_processor==="less"?"selected":""}>LESS</option> + <option value="stylus" ${e.css_pre_processor==="stylus"?"selected":""}>Stylus</option> + </select> + </nav> + </li> + --> + <li class="p-0 list-none"> + <hr /> + </li> + <li class="list-none"> + <nav class="flex justify-between mt-5 items-center"> + <div class="mb-2"> + JS: + </div> + + <select + aria-label="javascript preprocessor" + name="javascript preprocessor" + onchange="setPreprocessor('javascript', this.value);" + class="w-auto my-0 text-[.75rem]"> + <option value="javascript" ${e.javascript_pre_processor==="javascript"?"selected":""}>Javascript</option> + <option value="babel" ${e.javascript_pre_processor==="babel"?"selected":""}>Babel (JSX / ES6)</option> + <option value="typescript" ${e.javascript_pre_processor==="typescript"?"selected":""}>Typescript</option> + </select> + </nav> + </li> + <li class="p-0 list-none"> + <hr /> + </li> + <li class="list-none"> + <div class="mb-2"> + Project name: + </div> + <input + type="text" + name="project name" + placeholder="Project name" + class="p-2 rounded-md w-full" + value="${e.name}" + oninput="project.name = this.value;" + /> + </li> + <li class="p-0 list-none"> + <hr /> + </li> + <li class="list-none"> + <div class="mb-2"> + Project version: + </div> + <input + type="number" + min="0" + step="0.01" + name="project version" + placeholder="Project version" + class="p-2 rounded-md w-full" + value="${e.version}" + oninput="project.version = this.value;" + /> + </li> + <li class="p-0 list-none"> + <hr /> + </li> + <li class="list-none"> + <div class="mb-2"> + Project title: + </div> + <input + type="text" + name="project title" + placeholder="Project title" + class="p-2 rounded-md w-full" + value="${e.title}" + oninput="project.title = this.value;" + /> + </li> + <li class="p-0 list-none"> + <hr /> + </li> + <li class="list-none"> + <div class="mb-2"> + Project description: + </div> + <textarea + name="project description" + placeholder="Project description" + class="p-2 rounded-md w-full resize-vertical h-56" + oninput="project.description = this.value;" + >${e.description}</textarea> + </li> + <li class="p-0 list-none"> + <hr /> + </li> + <li class="list-none"> + <div class="mb-2"> + Project author: + </div> + <input + type="text" + name="project author" + placeholder="Project author" + class="p-2 rounded-md w-full" + value="${e.author}" + oninput="project.author = this.value;" + /> + </li> + <li class="p-0 list-none"> + <hr /> + </li> + <li class="list-none"> + <div class="mb-2"> + Project url: + </div> + <input + type="text" + name="project url" + placeholder="Project url" + class="p-2 rounded-md w-full" + value="${e.url}" + oninput="project.url = this.value;" + /> + </li> + <li class="p-0 list-none"> + <hr /> + </li> + <li class="list-none"> + <div class="my-2"> + HTML before closing head tag: + </div> + <textarea + placeholder="HTML before closing </head> tag" + class="p-2 rounded-md w-full resize-vertical h-56" + oninput="project.meta = this.value;" + >${e.meta}</textarea> + </li> +</ul>`;m=`<dialog ${g.settings?"open":""}> + <article class="rounded-md"> + <header class="flex justify-between items-center"> + <h1 class="text-lg font-thin m-0 capitalize"> + settings + </h1> + <button + class="text-xs w-auto px-3 py-2 m-0 capitalize rounded-md bg-transparent border-0" + style="color: unset;" + aria-label="Close" + onclick="data.settings = null"> + ${p.times} + </button> + </header> + <main class="font-thin"> + ${m} + </main> + <footer> + <button + class="text-xs w-auto px-3 py-2 m-0 capitalize rounded-md bg-transparent border ${e.dark?"border-gray-600":"border-gray-200"}" + style="color: unset;" + aria-label="Close" + onclick="data.settings = null"> + close + </button> + </footer> + </article> + </dialog>`;let a=`<dialog ${g.libraries?"open":""}> + <article class="rounded-md"> + <header class="flex justify-between items-center"> + <h1 class="text-lg font-thin m-0"> + Search for resources (JQuery, Bootstrap, Foundation...) + </h1> + <button + class="text-xs w-auto px-3 py-2 m-0 capitalize rounded-md bg-transparent border-0" + style="color: unset;" + aria-label="Close" + onclick="data.libraries = null; data.searchLibKey = null; searchInput.value = null;"> + ${p.times} + </button> + </header> + <main class="font-thin"> + <div class="p-4"> + <input + id="searchInput" + type="search" + placeholder="Search for resources (JQuery, Bootstrap, Foundation...)" + class="w-full p-3 rounded-full bg-[#1c212c]" + oninput="this.value ? data.searchLibKey = this.value : data.searchLibKey = null; data.searchLibKey ? fetchSuggestions(data.searchLibKey) : ''" /> + + <div class="relative px-4 capitalize h-auto max-h-64 overflow-auto"> + ${g.librarySuggestions&&g.searchLibKey?g.librarySuggestions:""} + </div> + </div> + </main> + <footer> + <button + class="text-xs w-auto px-3 py-2 m-0 capitalize rounded-md bg-transparent border ${e.dark?"border-gray-600":"border-gray-200"}" + style="color: unset;" + aria-label="Close" + onclick="data.libraries = null; data.searchLibKey = null; searchInput.value = null;"> + close + </button> + </footer> + </article> + </dialog>`,x="grid grid-rows-1 items-center bg-transparent border-0 focus-within:shadow-none",h="flex flex-col justify-between h-full",y="grid h-full items-center",f="capitalize text-center mt-4",L=["javascript","typescript","react","vue","preact","angular","alpine","solid","stimulus","mithril","hyperapp","aurelia","lit"],A="";for(let v of L)A+=`<button + aria-label="new ${v} project" + name="new ${v} project" + class="${x}" + style="color: unset;" + onclick="newProject('${v}')"> + <div class="${h}"> + <div class="${y}"> + <img loading="lazy" width="256" height="256" src="imgs/frameworks/${v}.svg" alt="${v}" /> + </div> + <div class="${f}"> + ${v} + </div> + </div> + </button>`;let T=`<dialog ${g.demos?"open":""}> + <article class="rounded-md"> + <header class="flex justify-between items-center"> + <h1 class="text-lg font-thin m-0"> + Are you sure you want to start a new project? + </h1> + <button + class="text-xs w-auto px-3 py-2 m-0 capitalize rounded-md bg-transparent border-0" + style="color: unset;" + aria-label="Close" + onclick="data.demos = null;"> + ${p.times} + </button> + </header> + <main class="font-thin"> + <div class="p-4 text-center">All current data will be lost.</div> + <div class="p-4 relative h-80 overflow-auto"> + <div class="grid grid-cols-2 sm:grid-cols-4 gap-4"> + ${A} + </div> + </div> + </main> + <footer> + <button + class="text-xs w-auto px-3 py-2 m-0 capitalize rounded-md bg-transparent border ${e.dark?"border-gray-600":"border-gray-200"}" + style="color: unset;" + aria-label="Close" + onclick="data.demos = null;"> + close + </button> + </footer> + </article> + </dialog>`,z=` + <div> + <div class="absolute inset-y-0 left-0 flex flex-col text-center justify-between px-2 py-4 overflow-auto no-scrollbar"> + ${ce()} + </div> + + <!-- flexbox for panels and preview --> + <div class="flex flex-col flex-col-reverse sm:flex-row absolute inset-y-0 right-0 left-16 bottom-0 overflow-hidden"> + <div class="relative w-full h-full border-0 border-x border-solid overflow-auto p-4 ${e.dark?"border-gray-800":"border-gray-200"}"> + <nav class="absolute inset-0 flex flex-col ${e.columns?"flex-col":`sm:flex-row ${e.columnsRight?"sm:flex-row-reverse":""}`}"> + <div class="flex-grow w-full h-full flex flex-col ${e.columns?"":`border-0 border-x border-solid ${e.dark?"border-gray-800":"border-gray-200"}`} ${e.preview?"":"hidden"}"> + <div class="flex-none border-0 border-b border-solid ${e.dark?"border-gray-800":"border-gray-200"}"> + ${pe()} + </div> + <div class="flex-grow overflow-hidden h-full"> + <div id="previewElm" class="relative grid grid-cols-1 align-center items-center w-full h-full"> + <iframe + id="iframe" + title="${e.title}" + class="bg-white ${g.selectedSize!=="none"?`border border-solid ${e.dark?"border-gray-800":"border-gray-200"} shadow-2xl shadow-blue-500`:""}" + style="${g.selectedSize==="none"?"width: 100%; height: 100%":` + width: ${o}px; + height: ${l}px; + transform: scale(${Math.min(r/o,i/l)}); + position: absolute; + top: 50%; + left: 50%; + margin-top: -${l/2}px; + margin-left: -${o/2}px;`}" + allow="accelerometer *; bluetooth *; camera *; encrypted-media *; display-capture *; geolocation *; gyroscope *; microphone *; midi *; clipboard-read *; clipboard-write *; web-share *; serial *; xr-spatial-tracking *" + allowfullscreen="true" + allowpaymentrequest="true" + allowtransparency="true" + sandbox="allow-downloads allow-forms allow-modals allow-pointer-lock allow-popups-to-escape-sandbox allow-popups allow-presentation allow-same-origin allow-scripts allow-top-navigation-by-user-activation" + loading="lazy" + ></iframe> + + <span + id="iframeClientSize" + class="hidden opacity-0 transition-opacity duration-300 absolute top-0 right-0 ${e.dark?"bg-gray-800":"bg-gray-200"} p-1 text-xs"> + ${g.iframeSize} + </span> + </div> + </div> + </div> + <div class="relative flex-grow w-full h-full ${e.columns?"":"2xl:w-1/2 sm:border-solid sm:border-0 lg:border-r "+e.dark?"border-gray-800":"border-gray-200"} ${e.activePanel?"":"hidden"}"> + <div class="absolute inset-0 flex flex-col justify-between"> + <div class="flex-grow overflow-auto ${e.columns?`border-0 border-t border-solid ${e.dark?"border-gray-800":"border-gray-200"}`:""}"> + <div class="h-full ${e.activePanel==="html"?"":"hidden"}"> + <div + data-ignore + class="h-full" + aria-label="html editor" + name="html editor" + id="htmlEditor"></div> + </div> + <div class="h-full ${e.activePanel==="css"?"":"hidden"}"> + <div + data-ignore + class="h-full" + aria-label="css editor" + name="css editor" + id="cssEditor"></div> + </div> + <div class="h-full ${e.activePanel==="javascript"?"":"hidden"}"> + <div + data-ignore + class="h-full" + aria-label="javascript editor" + name="javascript editor" + id="jsEditor"></div> + </div> + </div> + <div class="flex-none overflow-auto border-0 border-t border-solid ${e.dark?"border-gray-800":"border-gray-200"}"> + ${de()} + </div> + </div> + </div> + </nav> + </div> + </div> + + ${c} + ${m} + ${a} + ${T} + </div>`,S=document.querySelector(t);if(!S)return;let j=new DOMParser().parseFromString(z,"text/html");if(j.body.innerHTML.trim()===z.trim())return;if(k.initialRender)return S.innerHTML=z,C(!0),k.initialRender=!1,!1;let O=S.firstElementChild,N=j.body.firstElementChild;J(O,N)}},X={render({large:t,title:s="Are you sure you want to proceed?",content:r,CloseLabel:i,ConfirmLabel:n,onLoad:o,onClose:l,onConfirm:c}){let m="text-lg font-thin m-0",a="text-xs w-auto px-3 py-2 m-0 capitalize rounded-md",y=`<article class="${t?"flex flex-col h-3/4":""} rounded-md"> + <header class="${t?"flex-none":""} flex justify-between items-center"> + <h1 class="${m}">${s}</h1> + <button class="${a} bg-transparent border-0" style="color: unset;" aria-label="Close"> + <svg class="w-3" viewBox="0 0 384 512"> + <path + fill="currentColor" + d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"/> + </svg> + </button> + </header> + <main class="font-thin ${t?"flex-grow":""}"> + ${r||""} + </main> + <footer ${t?'class="flex-none"':""}> + <button class="${a} bg-transparent border ${e.dark?"border-gray-600":"border-gray-200"}" style="color: unset;" aria-label="Close" onclick="this.closest('dialog').close()">${i||"close"}</button> + ${c?`<button class="${a}" aria-label="Confirm">${n||"confirm"}</button>`:""} + </footer> + </article>`,f=document.createElement("dialog");f.open=!0,f.innerHTML=y,document.body.appendChild(f),o&&typeof o=="function"&&o();let L=f.querySelector("header button"),A=f.querySelector("footer button:first-child"),T=f.querySelector("footer button:last-child");L.onclick=function(){l&&typeof l=="function"&&l(),document.body.removeChild(f)},A.onclick=function(){l&&typeof l=="function"&&l(),document.body.removeChild(f)},T.onclick=function(){c&&typeof c=="function"&&c(),document.body.removeChild(f)}}};function de(){let t="border-0 bg-transparent py-1";return`<div class="flex justify-between"> + <button + aria-label="indent" + name="indent" + class="${t}" + style="color: unset;" + onclick="editorCommand('indent', getActiveEditor())"> + ${p.indent} + </button> + <button + aria-label="outdent" + name="outdent" + class="${t}" + style="color: unset;" + onclick="editorCommand('outdent', getActiveEditor())"> + ${p.outdent} + </button> + <button + aria-label="undo" + name="undo" + class="${t}" + style="color: unset;" + onclick="editorCommand('undo', getActiveEditor())"> + ${p.undo} + </button> + <button + aria-label="redo" + name="redo" + class="${t}" + style="color: unset;" + onclick="editorCommand('redo', getActiveEditor())"> + ${p.redo} + </button> + <button + aria-label="search" + name="search" + class="${t}" + style="color: unset;" + onclick="editorCommand('search', getActiveEditor())"> + ${p.search} + </button> + <button + aria-label="goto line" + name="goto line" + class="${t}" + style="color: unset;" + onclick="editorCommand('goto', getActiveEditor())"> + ${p.goto} + </button> + </div> + + <div class="flex justify-between"> + <button + aria-label="comment" + name="comment" + class="${t}" + style="color: unset;" + onclick="editorCommand('toggleComment', getActiveEditor())"> + ${p.comment} + </button> + <button + aria-label="fold" + name="fold" + class="${t}" + style="color: unset;" + onclick="editorCommand('foldAll', getActiveEditor())"> + ${p.fold} + </button> + <button + aria-label="unfold" + name="unfold" + class="${t}" + style="color: unset;" + onclick="editorCommand('unfoldAll', getActiveEditor())"> + ${p.unfold} + </button> + <button + aria-label="cut" + name="cut" + class="${t}" + style="color: unset;" + onclick="editorCommand('cut', getActiveEditor())"> + ${p.cut} + </button> + <button + aria-label="copy" + name="copy" + class="${t}" + style="color: unset;" + onclick="editorCommand('copy', getActiveEditor())"> + ${p.copy} + </button> + <button + aria-label="paste" + name="paste" + class="${t}" + style="color: unset;" + onclick="editorCommand('paste', getActiveEditor())"> + ${p.paste} + </button> + <button + aria-label="select all" + name="select all" + class="${t}" + style="color: unset;" + onclick="editorCommand('selectAll', getActiveEditor())"> + ${p.cursor} + </button> + </div>`}function ue(){localStorage.removeItem("kodeWeave"),sessionStorage.clear(),document.cookie.split(";").forEach(function(t){document.cookie=t.trim().split("=")[0]+"=;expires=Thu, 01 Jan 1970 00:00:00 UTC;path=/"}),"caches"in window&&caches.keys().then(function(t){for(let s of t)caches.delete(s)}),"serviceWorker"in navigator&&navigator.serviceWorker.getRegistrations().then(function(t){for(let s of t)s.unregister()}),console.log("All saved data, cookies, and service worker caches have been cleared."),location.reload()}var me=t=>{if(!t)return e.libraries.push(""),document.getElementById("librariesBox").innerHTML=Q(),!1;e.libraries.includes(t)?console.error(`Library already exists: ${t}`):e.libraries.push(t),document.getElementById("librariesBox")&&(document.getElementById("librariesBox").innerHTML=Q())};function Q(){return e.libraries.map((t,s)=>` + <nav class="flex justify-between py-2" data-index="${s}"> + <input + type="text" + placeholder="https://cdnjs.cloudflare.com/ajax/libs/Sortable/1.15.2/Sortable.min.js" + data="library" + class="w-full pl-3 pr-0 rounded-md rounded-r-none focus:shadow-none" + style="margin-bottom: 0;" + value="${t}" + oninput="project.libraries[${s}] = this.value" /> + <button + aria-label="delete library" + name="delete library" + class="px-3 py-[15px] h-full border-0 rounded-md rounded-l-none" + onclick="project.libraries.splice(${s}, 1);"> + ${p.trash} + </button> + </nav> + `).join("")}function ge(t){fetch(`https://api.cdnjs.com/libraries?search=${t}&fields=filename,description,version`).then(s=>{if(!s.ok)throw new Error("Network response was not ok");return s.json()}).then(s=>{if(s&&s.results&&s.results.length>0){let r=s.results.map(i=>i);g.librarySuggestions=r.map(i=>` + <section + class="cursor-pointer" + onclick=" + if (!project.libraries.includes('${i.latest}')) project.libraries.push('${i.latest}'); + data.libraries = null; + data.searchLibKey = null; + data.librarySuggestions = null; + searchInput.value = null; + "> + <div class="flex justify-between mb-2 font-bold text-1xl"> + <span class="font-bold">${i.name}</span> + <span class="font-bold">${i.version}</span> + </div> + <div class="text-sm font-thin">${i.description}<br><hr></div> + </section>`).join("")}}).catch(s=>{console.error("Error fetching data:",s)})}function R(t){let s=document.querySelector(`script[src="${t}"]`);s&&s.remove()}function V(t){t.forEach(s=>{let r=document.querySelector(`script[src="${s}"]`);r&&r.remove()})}async function D(t){return new Promise((s,r)=>{if(document.querySelector(`script[src="${t}"]`)){s();return}let n=document.createElement("script");n.src=t,n.onload=s,n.onerror=()=>r(new Error(`Failed to load script: ${t}`)),document.body.appendChild(n)})}async function Z(t){return Promise.all(t.map(D))}async function w(t,s){let r={html:{markdown:"libraries/preprocessors/marked.min.js",jade:"libraries/preprocessors/jade.js",pug:"libraries/preprocessors/pug.js"},css:{sass:"libraries/preprocessors/sass.sync.min.js",less:"libraries/preprocessors/less.min.js",stylus:"libraries/preprocessors/stylus.min.js"},javascript:{typescript:"libraries/preprocessors/typescript.min.js",babel:"libraries/preprocessors/babel.min.js",jsxtypescript:["libraries/preprocessors/typescript.min.js","libraries/preprocessors/babel.min.js"]}},i={html:e.html_pre_processor,css:e.css_pre_processor,javascript:e.javascript_pre_processor};try{let n=s!=="html"||s!=="css"||s!=="javascript",o=n?r[t][s]:null;if(i[t]&&n){let l=r[t][i[t]];Array.isArray(l)?V(l):R(l),Array.isArray(o)?await Z(o):o&&await D(o)}if(t==="html")e.html_pre_processor=s;else if(t==="css")e.css_pre_processor=s;else if(t==="javascript"){if(e.javascript_pre_processor=s,!window.editorManager||!window.editorManager.jsEditor)return;window.editorManager.setMode(e.javascript_pre_processor==="javascript"?"javascript":s,editorManager.jsEditor)}}catch(n){console.error("Error setting preprocessor:",n)}}async function he(){await Promise.all([w("html",e.html_pre_processor),w("css",e.css_pre_processor),w("javascript",e.javascript_pre_processor)]),window.editorManager&&(dispatchChanges(editorManager.htmlEditor,e.html),dispatchChanges(editorManager.cssEditor,e.css),dispatchChanges(editorManager.jsEditor,e.javascript),C(!0))}async function K(){await Z(["libraries/js-beautify/beautify.min.js","libraries/js-beautify/beautify-css.min.js","libraries/js-beautify/beautify-html.min.js"])}async function ee(){V(["libraries/js-beautify/beautify.min.js","libraries/js-beautify/beautify-css.min.js","libraries/js-beautify/beautify-html.min.js"])}async function fe(){await K();let t;switch(e.activePanel){case"html":t=html_beautify(e.html,{indent_size:2,max_preserve_newlines:1}),dispatchChanges(editorManager.htmlEditor,t);break;case"css":t=css_beautify(e.css,{indent_size:2,max_preserve_newlines:1}),e.css=t,dispatchChanges(editorManager.cssEditor,t);break;case"javascript":t=js_beautify(e.javascript,{indent_size:2,max_preserve_newlines:1}),e.javascript=t,dispatchChanges(editorManager.jsEditor,t);break;default:t="Unknown editor panel."}await ee()}function be(){let t="";for(;!/^[a-zA-Z]/.test(t);)t=Math.random().toString(36).substr(2,9);return t}function ve(t){g.selectedSize=t,W()}function we(){let t=document.getElementById("previewElm").firstElementChild;if(t.style.width==="100%")return!1;let s=parseInt(t.style.width),r=parseInt(t.style.height);[s,r]=[r,s];let i=previewElm.clientWidth,n=previewElm.clientHeight,o=Math.min(i/s,n/r);t.style.width=`${s}px`,t.style.height=`${r}px`,t.style.transform=`scale(${o})`,t.style.marginTop=`-${r/2}px`,t.style.marginLeft=`-${s/2}px`,g.selectedSize=s+"x"+r}function te(){let t=document.getElementById("previewElm").firstElementChild;if(t.style.width==="100%")return!1;let s=parseInt(t.style.width),r=parseInt(t.style.height),i=previewElm.clientWidth,n=previewElm.clientHeight,o=Math.min(i/s,n/r);t.style.width=`${s}px`,t.style.height=`${r}px`,t.style.transform=`scale(${o})`,t.style.marginTop=`-${r/2}px`,t.style.marginLeft=`-${s/2}px`}var G;function W(){if(g.selectedSize==="none"){let t=document.getElementById("iframe");g.iframeSize=`${t.clientWidth}px x ${t.clientHeight}px`;let s=document.getElementById("iframeClientSize");s.classList.contains("hidden")&&(G&&clearTimeout(G),s.classList.remove("hidden","opacity-0"),s.classList.add("opacity-100"),G=setTimeout(()=>{s.classList.remove("opacity-100"),s.classList.add("opacity-0"),setTimeout(()=>{s.classList.add("hidden")},300)},2e3))}else te()}async function I(t){try{if(t==="html")switch(e.html_pre_processor){case"markdown":return marked.parse(e.html);case"jade":return jade.render(e.html,{pretty:!0});case"pug":let s=document.getElementById("appScript");return s.hasAttribute("type")&&s.getAttribute("type")==="module"?(console.error("Cannot import pug as script is a module!"),!1):ne("pug").compile(e.html)({name:this.name});default:return e.html}if(t==="css")switch(e.css_pre_processor){case"stylus":return stylus.render(e.css);case"less":return new Promise((s,r)=>{less.render(e.css,(i,n)=>i?r(i):s(n.css))});case"sass":return new Promise((s,r)=>{Sass.compile(e.css,i=>i.status===0?s(i.text):r(new Error(i.message)))});default:return e.css}if(t==="javascript")switch(e.javascript_pre_processor){case"babel":return typeof Babel>"u"&&await D("libraries/preprocessors/babel.min.js"),Babel.transform(e.javascript,{presets:["env","react"]}).code;case"typescript":return ts.transpileModule(e.javascript,{compilerOptions:{module:ts.ModuleKind.CommonJS}}).outputText;case"jsxtypescript":let s=ts.transpileModule(e.javascript,{compilerOptions:{module:ts.ModuleKind.CommonJS,target:ts.ScriptTarget.ES5,jsx:ts.JsxEmit.React}}).outputText;return g.compiledJSX=Babel.transform(s,{presets:["env","react"]}).code,g.compiledJSX;default:return e.javascript}}catch(s){console.error("Error compiling code:",s)}}async function ye(t){let s=t.target.files[0];if(s)try{let r=await xe(s);e.logo=r}catch(r){console.error("Error converting image to base64:",r)}}function xe(t){return new Promise((s,r)=>{let i=new FileReader;i.readAsDataURL(t),i.onload=()=>s(i.result),i.onerror=n=>r(n)})}function je(t){function s(i){return i.charAt(0).toUpperCase()+i.slice(1)}let r=s(t);w("html","html"),w("css","css"),t!=="typescript"&&w("javascript","javascript"),(t==="typescript"||t==="angular")&&w("javascript","typescript"),e.name=`${r} name`,e.version=.01,e.title=`A Cool ${r} App`,e.description=`A modern ${r} application!`,e.author="kodeWeave",e.url="https://michaelsboost.com/",e.module=!0,e.preview=!0,t==="angular"&&(e.module=!1),e.pwa=!1,t==="javascript"&&(e.meta="",e.libraries=["https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css","https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js"],e.html=`<div class="flex flex-col items-center justify-center absolute inset-0"> + <h1 class="text-3xl font-thin mb-4">\u{1F44B} Hello, ${r}! \u{1F30E}</h1> + <p class="text-xl mb-4">Counter: <span id="counter" class="font-mono">0</span></p> + <button id="incrementButton" class="px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-700 transition"> + + + </button> +</div>`,e.css="",e.javascript=`let counter = 0; +const counterElement = document.getElementById('counter'); +const incrementButton = document.getElementById('incrementButton'); + +incrementButton.addEventListener('click', function() { + counter++; + counterElement.textContent = counter; +});`),t==="typescript"&&(e.meta="",e.libraries=["https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css","https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js"],e.html=`<div class="flex flex-col items-center justify-center absolute inset-0"> + <h1 class="text-3xl font-thin mb-4">\u{1F44B} Hello, ${r}! \u{1F30E}</h1> + <p class="text-xl mb-4">Counter: <span id="counter" class="font-mono">0</span></p> + <button id="incrementButton" class="px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-700 transition"> + + + </button> +</div>`,e.css="",e.javascript=`let counter: number = 0; +const counterElement: HTMLElement | null = document.getElementById('counter'); +const incrementButton: HTMLElement | null = document.getElementById('incrementButton'); + +if (counterElement && incrementButton) { + incrementButton.addEventListener('click', function() { + counter++; + counterElement.textContent = counter.toString(); + }); +}`),t==="react"&&(e.meta="",e.libraries=["https://unpkg.com/react@latest/umd/react.development.js","https://unpkg.com/react-dom@latest/umd/react-dom.development.js","https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css","https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js"],e.html='<div id="root"></div>',e.css="",e.javascript=`/** @jsxRuntime classic */ +/** @jsx React.createElement */ +const { useState } = React; + +function App() { + const [counter, setCounter] = useState(0); + + return ( + <div className="flex flex-col items-center justify-center absolute inset-0"> + <h1 className="text-3xl font-thin mb-4">\u{1F44B} Hello, ${r}! \u{1F30E}</h1> + <p className="text-xl mb-4">Counter: <span id="counter" className="font-mono">{counter}</span></p> + <button + id="incrementButton" + className="px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-700 transition" + onClick={() => setCounter(counter + 1)} + > + + + </button> + </div> + ); +} + +const root = ReactDOM.createRoot(document.getElementById('root')); +root.render(<App />);`),t==="vue"&&(e.meta="",e.libraries=["https://cdnjs.cloudflare.com/ajax/libs/vue/3.2.37/vue.global.prod.min.js","https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css","https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js"],e.html='<div id="root"></div>',e.css="",e.javascript=`const App = { + data() { + return { + counter: 0, + message: '\u{1F44B} Hello, ${r}! \u{1F30E}' + }; + }, + methods: { + incrementCounter() { + this.counter++; + } + }, + template: \` + <div class="flex flex-col items-center justify-center absolute inset-0"> + <h1 class="text-3xl font-thin mb-4">{{ message }}</h1> + <p class="text-xl mb-4">Counter: <span id="counter" class="font-mono">{{ counter }}</span></p> + <button + id="incrementButton" + class="px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-700 transition" + @click="incrementCounter" + > + + + </button> + </div> + \` +}; + +const app = Vue.createApp(App); +app.mount('#root');`),t==="preact"&&(e.meta='<script src="https://cdn.jsdelivr.net/npm/alpinejs@3.14.1/dist/cdn.min.js" defer><\/script>',e.libraries=["https://unpkg.com/preact@latest/dist/preact.min.js","https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css","https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js"],e.html='<div id="root"></div>',e.css="",e.javascript=`/** @jsx h */ +import { html, render, useState, useEffect } from 'https://unpkg.com/htm@3.1.1/preact/standalone.module.js'; + +function App() { + const [counter, setCounter] = useState(0); + + return html\` + <div class="flex flex-col items-center justify-center absolute inset-0"> + <h1 class="text-3xl font-thin mb-4">\u{1F44B} Hello, ${r}! \u{1F30E}</h1> + <p class="text-xl mb-4">Counter: <span id="counter" class="font-mono">\${counter}</span></p> + <button + id="incrementButton" + class="px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-700 transition" + onClick=\${() => setCounter(counter + 1)} + > + + + </button> + </div> + \`; +} + +render(html\`<\${App} />\`, document.getElementById('root'));`),t==="angularold"&&(e.meta="",e.libraries=["https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular.min.js","https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css","https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js"],e.html=`<div ng-app="myApp" ng-controller="MainController" class="flex flex-col items-center justify-center absolute inset-0"> + <h1 class="text-3xl font-thin mb-4">\u{1F44B} Hello, ${r}! \u{1F30E}</h1> + <p class="text-xl mb-4">Counter: <span id="counter" class="font-mono">{{counter}}</span></p> + <button + id="incrementButton" + class="px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-700 transition" + ng-click="incrementCounter()" + > + + + </button> + </div>`,e.css="",e.javascript=`angular.module('myApp', []) + .controller('MainController', function($scope) { + $scope.counter = 0; + $scope.incrementCounter = function() { + $scope.counter++; + }; + });`),t==="angular"&&(e.meta="",e.libraries=["https://cdnjs.cloudflare.com/ajax/libs/rxjs/6.6.3/rxjs.umd.min.js","https://cdnjs.cloudflare.com/ajax/libs/core-js/2.5.7/core.js","https://unpkg.com/@angular/core@11.0.5/bundles/core.umd.js","https://cdnjs.cloudflare.com/ajax/libs/zone.js/0.10.3/zone.min.js","https://unpkg.com/@angular/common@11.0.5/bundles/common.umd.js","https://unpkg.com/@angular/compiler@11.0.5/bundles/compiler.umd.js","https://unpkg.com/@angular/platform-browser@11.0.5/bundles/platform-browser.umd.js","https://unpkg.com/@angular/platform-browser-dynamic@11.0.5/bundles/platform-browser-dynamic.umd.js","https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css","https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js"],e.html="<app-root>Loading...</app-root>",e.css="",e.javascript=`const { Component, NgModule, enableProdMode } = ng.core; +const { BrowserModule } = ng.platformBrowser; +const { platformBrowserDynamic } = ng.platformBrowserDynamic; + +enableProdMode(); + +@Component({ + selector: 'app-root', + template: \` + <div class="flex flex-col items-center justify-center absolute inset-0"> + <h1 class="text-3xl font-thin mb-4">\u{1F44B} Hello, ${r}! \u{1F30E}</h1> + <p class="text-xl mb-4">Counter: <span id="counter" class="font-mono">{{ counter }}</span></p> + <button + id="incrementButton" + class="px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-700 transition" + (click)="incrementCounter()" + > + + + </button> + </div> + \`, +}) +class AppComponent { + counter = 0; + + incrementCounter() { + this.counter++; + } +} + +@NgModule({ + declarations: [AppComponent], + imports: [BrowserModule], + bootstrap: [AppComponent] +}) +class AppModule {} + +platformBrowserDynamic().bootstrapModule(AppModule);`),t==="alpine"&&(e.meta='<script src="https://cdn.jsdelivr.net/npm/alpinejs@3.14.1/dist/cdn.min.js" defer><\/script>',e.libraries=["https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css","https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js"],e.html=`<div x-data="{ counter: 0 }" class="flex flex-col items-center justify-center absolute inset-0"> + <div class="flex flex-col items-center justify-center absolute inset-0"> + <h1 class="text-3xl font-thin mb-4">\u{1F44B} Hello, ${r}! \u{1F30E}</h1> + <p class="text-xl mb-4">Counter: <span class="font-mono" x-text="counter"></span></p> + <button + class="px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-700 transition" + x-on:click="counter++" + > + + + </button> + </div> +</div>`,e.css="",e.javascript=""),t==="solid"&&(e.meta="",e.libraries=["https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css","https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js"],e.html='<div id="root"></div>',e.css="",e.javascript=`import { createSignal } from "https://cdn.skypack.dev/solid-js@1.2.6"; +import { render } from "https://cdn.skypack.dev/solid-js@1.2.6/web"; +import html from "https://cdn.skypack.dev/solid-js@1.2.6/html"; + +function Counter() { + const [count, setCount] = createSignal(0); + const increment = () => setCount(count() + 1); + + return html\` + <div class="flex flex-col items-center justify-center absolute inset-0"> + <h1 class="text-3xl font-thin mb-4">\u{1F44B} Hello, ${r}! \u{1F30E}</h1> + <p class="text-xl mb-4">Counter: <span class="font-mono">\${count}</span></p> + <button type="button" onClick=\${increment}> + + + </button> + </div> + \`; +} + +render(Counter, document.getElementById("root"));`),t==="stimulus"&&(e.meta="",e.libraries=["https://cdn.jsdelivr.net/npm/@hotwired/stimulus@3.1.0/dist/stimulus.umd.js","https://cdn.jsdelivr.net/npm/@hotwired/stimulus-loading@1.0.0/dist/stimulus-loading.umd.js","https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css","https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js"],e.html=`<div data-controller="counter" class="flex flex-col items-center justify-center absolute inset-0"> + <h1 class="text-3xl font-thin mb-4">\u{1F44B} Hello, ${r}! \u{1F30E}</h1> + <p class="text-xl mb-4">Counter: <span data-counter-target="output" class="font-mono">0</span></p> + <button + data-action="click->counter#increment" + class="px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-700 transition" + > + + + </button> +</div>`,e.css="",e.javascript=`const application = Stimulus.Application.start(); + +application.register('counter', class extends Stimulus.Controller { + static targets = ['output']; + + initialize() { + this.counter = 0; + } + + increment() { + this.counter += 1; + this.outputTarget.textContent = this.counter; + } +});`),t==="mithril"&&(e.meta="",e.libraries=["https://cdn.jsdelivr.net/npm/mithril@2.0.4/mithril.min.js","https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css","https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js"],e.html='<div id="root"></div>',e.css="",e.javascript=`import htm from 'https://unpkg.com/htm?module' +const html = htm.bind(m) + +const app = () => { + let count = 0 + + return { + view: () => html\` + <div class="flex flex-col items-center justify-center absolute inset-0"> + <h1 class="text-3xl font-thin mb-4">\u{1F44B} Hello, Mithril! \u{1F30E}</h1> + <p class="text-xl mb-4">Counter: <span class="font-mono">\${count}</span></p> + <button onclick=\${() => count++}>+</button> + </div>\` + } +} + +m.mount(document.getElementById('root'), app)`),t==="hyperapp"&&(e.meta='<script src="https://unpkg.com/hyperapp@0.16.0"><\/script>',e.libraries=["https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css","https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js"],e.html='<h1 id="root"></h1>',e.css="",e.javascript=`import { app } from 'https://unpkg.com/hyperapp'; +import html from 'https://unpkg.com/hyperlit'; + +app({ + init: 0, + view: count => html\` + <div class="flex flex-col items-center justify-center absolute inset-0"> + <h1 class="text-3xl font-thin mb-4">\u{1F44B} Hello, Hyperapp! \u{1F30E}</h1> + <p class="text-xl mb-4">Counter: <span class="font-mono">\${count}</span></p> + <button onclick=\${count => count + 1}>+</button> + </div>\`, + node: document.getElementById('root') +})`),t==="aurelia"&&(e.meta='<script src="https://cdn.jsdelivr.net/npm/aurelia-script@1.4.0"><\/script>',e.libraries=["https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css","https://michaelsboost.com/TailwindCSSMod/tailwind-mod.min.js"],e.html=`<template id="root"> + <div class="flex flex-col items-center justify-center absolute inset-0"> + <h1 class="text-3xl font-thin mb-4">\u{1F44B} Hello, ${r}! \u{1F30E}</h1> + <p class="text-xl mb-4">Counter: <span id="counter" class="font-mono">0</span></p> + <button + class="px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-700 transition" + click.delegate="incrementCounter()"> + + + </button> + </div> +</template>`,e.css="",e.javascript=`class App { + static $view() { + return document.querySelector('#root'); + } + constructor() { + this.message = '${r}'; + this.counter = 0; + } + incrementCounter() { + this.counter++; + document.getElementById('counter').textContent = this.counter; + } +} + +au.start({ root: App });`),t==="lit"&&(e.meta="",e.libraries=["https://cdnjs.cloudflare.com/ajax/libs/picocss/2.0.6/pico.min.css"],e.html="<my-element></my-element>",e.css="",e.javascript=`import {LitElement, html} from 'https://cdn.jsdelivr.net/gh/lit/dist@2/core/lit-core.min.js'; + +class MyElement extends LitElement { + static properties = { + counter: { type: Number } + }; + + constructor() { + super(); + this.counter = 0; + } + + incrementCounter() { + this.counter++; + } + + render() { + return html\` + <main> + <h1>\u{1F44B} Hello, ${r}! \u{1F30E}</h1> + <p>Counter: \${this.counter}</p> + <button @click="\${this.incrementCounter}"> + + + </button> + </main> + \`; + } +} +customElements.define('my-element', MyElement);`),dispatchChanges(editorManager.htmlEditor,e.html),dispatchChanges(editorManager.cssEditor,e.css),dispatchChanges(editorManager.jsEditor,e.javascript),t==="react"&&w("javascript","babel"),g.demos=!1,C(!0)}function se(t){t!==null&&(e.obj={},g.safeRender&&(g.safeRender=null),w("html",t.html_pre_processor),w("css",t.css_pre_processor),w("javascript",t.javascript_pre_processor),e.name=t.name,e.version=t.version,e.title=t.title,e.description=t.description,e.author=t.author,e.url=t.url,e.logo=t.logo,e.console=t.console,e.dark=t.dark,e.module=t.module,e.autorun=t.autorun,e.pwa=t.pwa,e.activePanel=t.activePanel,e.preview=t.preview,e.columns=t.columns,e.columnsRight=t.columnsRight,e.meta=t.meta,e.libraries=t.libraries,e.html=t.html,e.css=t.css,e.javascript=t.javascript,window.editorManager&&(dispatchChanges(editorManager.htmlEditor,e.html),dispatchChanges(editorManager.cssEditor,e.css),dispatchChanges(editorManager.jsEditor,e.javascript)),g.safeRender=!0,C(!0))}function Me(){X.render({title:"Are you sure you want to load a new project?",content:'<div class="p-4 text-center">All current data will be lost.</div>',onClose:function(){g.menuDialog=!0},onConfirm:function(){let t=document.createElement("input");t.type="file",t.accept=".json",t.addEventListener("change",s=>{let r=s.target.files[0];if(!r){console.error("No file selected.");return}let i=new FileReader;i.onload=n=>{try{se(JSON.parse(n.target.result))}catch(o){console.error("Error parsing JSON file:",o)}},i.readAsText(r),t.remove()}),t.click()}})}function Y(t){let s=t.substring(t.lastIndexOf("/")+1),r=s.split(".").pop().toLowerCase(),n={jpeg:"image/jpeg",jpg:"image/jpeg",png:"image/png",gif:"image/gif",bmp:"image/bmp",webp:"image/webp",svg:"image/svg+xml",mp3:"audio/mpeg",wav:"audio/wav",ogg:"audio/ogg",mp4:"video/mp4",webm:"video/webm",ogv:"video/ogg"}[r]||"application/octet-stream";return{fileName:s,fileType:n}}function ke(t){try{let r=new DOMParser().parseFromString(t.html,"text/html").body,i=[],n=[],o=[],l=[];return r.querySelectorAll("img").forEach(c=>{c.hasAttribute("src")&&(i.push(c.getAttribute("src")),c.src=`imgs/${Y(c.getAttribute("src")).fileName}`)}),r.querySelectorAll("audio").forEach(c=>{c.querySelectorAll("source").forEach(m=>{m.hasAttribute("src")&&(n.push(m.getAttribute("src")),m.src=`audios/${Y(m.getAttribute("src")).fileName}`)})}),r.querySelectorAll("svg").forEach(c=>{o.push(c.outerHTML)}),r.querySelectorAll("video").forEach(c=>{c.querySelectorAll("source").forEach(m=>{m.hasAttribute("src")&&(l.push(m.getAttribute("src")),m.src=`vids/${Y(m.getAttribute("src")).fileName}`)})}),{imageUrls:i,audioUrls:n,vectors:o,videoUrls:l}}catch(s){return console.error("Error fetching resources:",s),null}}async function B(t){let r=await(await fetch(t)).blob();return new Promise((i,n)=>{let o=new FileReader;o.onloadend=()=>i(o.result.split(",")[1]),o.onerror=n,o.readAsDataURL(r)})}async function Ce(){try{await D("libraries/jszip/FileSaver.min.js");let t=new Blob([JSON.stringify(e,null,2)],{type:"application/json"});saveAs(t,`${e.name.split(" ").join("").toLowerCase()}-kodeWeave.json`)}catch(t){console.error("Error:",t)}finally{R("libraries/jszip/FileSaver.min.js")}}async function $e(){try{let c=function(d){let u=[],b=/background-image\s*:\s*url\(([^)]+)\)/g,_;for(;(_=b.exec(d))!==null;){let P=_[1].replace(/['"]/g,"");P.startsWith("data:")||u.push(P)}return u},x=function(){return e.css.trim()!==""?` + "postcss": "^8.4.6", + "autoprefixer": "^10.4.2", + "cssnano": "^5.0.12"`:""},h=function(){return e.javascript_pre_processor==="babel"||e.javascript_pre_processor==="jsxtypescript"?`, + "@babel/core": "^7.15.5", + "@babel/preset-env": "^7.15.6", + "@babel/preset-react": "^7.14.5", + "rollup-plugin-babel": "^4.4.0"`:e.javascript_pre_processor==="typescript"||e.javascript_pre_processor==="jsxtypescript"?`, + "rollup-plugin-typescript2": "^0.31.1", + "typescript": "^4.4.3"`:""},z=function(d){return d.replace(/\/\*.*\*\/|\/\*[\s\S]*?\*\/|\n|\t|\v|\s{2,}/g,"").replace(/\s*\{\s*/g,"{").replace(/\s*\}\s*/g,"}").replace(/\s*\:\s*/g,":").replace(/\s*\;\s*/g,";").replace(/\s*\,\s*/g,",").replace(/\s*\~\s*/g,"~").replace(/\s*\>\s*/g,">").replace(/\s*\+\s*/g,"+").replace(/\s*\!\s*/g," !")};await Z(["libraries/jszip/jszip.min.js","libraries/jszip/FileSaver.min.js"]);let{imageUrls:t,audioUrls:s,vectors:r,videoUrls:i}=ke(e),n=document.getElementById("iframe");if(!n)return;let l=(n.contentDocument||n.contentWindow.document).querySelectorAll("img[srcset]").forEach(d=>{d.srcset.split(",").forEach(u=>{let b=u.trim().split(" ")[0];t.push(b)})}),m=c(await I("css"));t=t.concat(m);let a=new JSZip;a.file(`${e.name.split(" ").join("").toLowerCase()}-kodeWeave.json`,JSON.stringify(e,null,2));let y=`{ + "name": "${e.name.toLowerCase().split(" ").join("")}", + "version": "${e.version}", + "type": "module", + "scripts": { + ${e.css.trim()!==""?`"build:css": "postcss src/styles.css -o dist/styles.min.css", + `:""}"build:js": "rollup -c && terser dist/script.js -o dist/script.min.js", + "build": "${e.css.trim()!==""?"npm run build:css && ":""}npm run build:js", + "serve": "http-server -c-1 -p 8081" + }, + "devDependencies": { + "rollup": "^2.79.1", + "rollup-plugin-terser": "^7.0.2", + "terser": "^5.10.0", + "http-server": "^14.1.1"${x()}${h()} + } +}`;a.file("package.json",y);let f=`import { terser } from 'rollup-plugin-terser'; +`;(e.javascript_pre_processor==="babel"||e.javascript_pre_processor==="jsxtypescript")&&(f+=`import babel from 'rollup-plugin-babel'; +`),(e.javascript_pre_processor==="typescript"||e.javascript_pre_processor==="jsxtypescript")&&(f+=`import typescript from 'rollup-plugin-typescript2'; +`);let L=`${f} +export default { + ${e.javascript_pre_processor==="typescript"||e.javascript_pre_processor==="jsxtypescript"?"input: 'src/script.ts', // entry point for your TypeScript":"input: 'src/script.js', // entry point to your Javascript"} + output: { + file: 'dist/script.js', + format: ${e.module?"'es'":"'iife'"}, // Immediately Invoked Function Expression, suitable for <script> tags + name: '${e.name.toLowerCase().split(" ").join("")}' + }, + plugins: [ + ${e.javascript_pre_processor==="typescript"||e.javascript_pre_processor==="jsxtypescript"?"typescript(),":""} + ${e.javascript_pre_processor==="babel"||e.javascript_pre_processor==="jsxtypescript"?'babel({ exclude: "node_modules/**" }),':""} + terser() // minifies the JavaScript + ] +};`;if(a.file("rollup.config.js",L),e.css.trim()!==""&&a.file("postcss.config.js",`module.exports = { + plugins: [ + require('autoprefixer'), // adds vendor prefixes + require('cssnano') // minifies the CSS + ] +};`),e.javascript_pre_processor==="babel"||e.javascript_pre_processor==="jsxtypescript"){let d=`{ + "presets": [ + "@babel/preset-env", + ${e.javascript_pre_processor==="jsxtypescript"?'"@babel/preset-typescript",':""} + "@babel/preset-react" + ] +}`;a.file("babel.config.json",d)}(e.javascript_pre_processor==="typescript"||e.javascript_pre_processor==="jsxtypescript")&&a.file("tsconfig.json",`{ + "compilerOptions": { + "target": "ES5", + "module": "ESNext", + "moduleResolution": "Node", + "jsx": "react", + "allowJs": true, + "checkJs": false, + "outDir": "./dist", + "strict": true + }, + "include": ["src/**/*"] +}`);let A=`The MIT License (MIT) +Copyright (c) ${new Date().getFullYear()} ${e.author} + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE.`;a.file("LICENSE.md",A);let T=`# ${e.name} + +A Weave created on [kodeWeave](https://michaelsboost.com/kodeWeave/go) + +${e.description}`;if(a.file("README.md",T),e.logo)try{let d="";e.logo.startsWith("data:")?d=e.logo:d=await B(e.logo);let u;if(e.logo.startsWith("data:image/png"))u="png";else if(e.logo.startsWith("data:image/jpeg"))u="jpeg";else if(e.logo.startsWith("data:image/svg+xml"))u="svg";else{console.error("Unsupported logo MIME type:",e.logo);return}let b=`logo.${u}`;a.folder("imgs").file(b,d.split(",")[1],{base64:!0});let _=["192x192","256x256","384x384","512x512"],P=_.map(E=>({src:`../imgs/logo-${E}.png`,sizes:E,type:"image/png",purpose:"any"}));for(let E of _){let $=document.createElement("canvas");$.width=parseInt(E.split("x")[0]),$.height=parseInt(E.split("x")[1]);let oe=$.getContext("2d"),U=new Image;U.src=d,U.onload=function(){oe.drawImage(U,0,0,$.width,$.height);let ie=$.toDataURL("image/png").replace(/^data:image\/(png|jpg);base64,/,"");a.folder("imgs").file(`logo-${E}.png`,ie,{base64:!0})},$.remove()}a.file("dist/manifest.json",JSON.stringify({theme_color:"#13171f",background_color:"#13171f",display:"standalone",start_url:"./index.html",lang:"en-US",name:e.name,short_name:e.name,description:e.description,icons:P},null,2))}catch(d){console.error("Error adding logo to ZIP:",d);return}let S=z(await I("css"));e.css_pre_processor==="css"&&a.file("src/style.css",e.css),e.css_pre_processor==="css"&&a.file("dist/style.css",e.css),e.css_pre_processor==="stylus"&&a.file("src/style.styl",e.css),e.css_pre_processor==="stylus"&&a.file("dist/style.css",S),e.css_pre_processor==="less"&&a.file("src/style.less",e.css),e.css_pre_processor==="less"&&a.file("dist/style.css",n.contentDocument.getElementById("aeoibrfa1").textContent),e.css_pre_processor==="sass"&&a.file("src/style.scss",e.css),e.css_pre_processor==="sass"&&a.file("dist/style.css",S);async function F(d){return document.querySelector("script[src='libraries/terser/bundle.min.js']")||await D("libraries/terser/bundle.min.js"),Terser.minify(d)}let j=await F(await I("javascript"));j=j.code,e.javascript_pre_processor==="javascript"&&a.file("src/script.js",e.javascript),e.javascript_pre_processor==="javascript"&&a.file("dist/script.js",e.javascript),e.javascript_pre_processor==="babel"&&a.file("src/script.js",e.javascript),e.javascript_pre_processor==="babel"&&a.file("dist/script.js",j),e.javascript_pre_processor==="typescript"&&a.file("src/script.ts",e.javascript),e.javascript_pre_processor==="typescript"&&a.file("dist/script.js",j),e.javascript_pre_processor==="jsxtypescript"&&a.file("src/script.ts",e.javascript),e.javascript_pre_processor==="jsxtypescript"&&a.file("dist/script.js",j);let O="";if(e.pwa){O=` + <script src="https://storage.googleapis.com/workbox-cdn/releases/6.4.1/workbox-sw.js"><\/script> + <script> + // service worker for progressive web app + if ('serviceWorker' in navigator) { + window.addEventListener('load', () => { + navigator.serviceWorker.register('./dist/sw.js') + }) + } + <\/script>`;let d=`// Service worker code +importScripts('https://storage.googleapis.com/workbox-cdn/releases/6.4.1/workbox-sw.js'); + +const { registerRoute } = workbox.routing; +const { CacheFirst } = workbox.strategies; + +const cacheName = '${e.name.split(" ").join("")}-cache'; + +workbox.routing.registerRoute( +({ request }) => request.destination === 'script' || + request.destination === 'style' || + request.destination === 'document' || + request.destination === 'image' || + request.destination === 'font' || + request.destination === 'audio' || + request.destination === 'video', +new CacheFirst({ +cacheName: cacheName, +plugins: [ +// Any additional plugins can be added here +], +}) +);`;a.file("dist/sw.js",d)}let N="",v="";e.libraries.forEach(d=>{d.endsWith(".js")?N+=`<script src="${d}"><\/script> + `:d.endsWith(".css")?v+=`<link rel="stylesheet" href="${d}"> + `:v+=`<link href="${d}" rel="stylesheet"> + `});let M=`<!DOCTYPE html> +<html lang="en" data-theme="${e.dark?"dark":"light"}"> + <head> + <title>${e.title} + + + + + + + + + + + + + + + + + + + + + ${v}${e.css?'':""} + ${e.meta?`${e.meta} + `:""} + ${N||""} + + + +${await I("html")} + +${e.javascript?' - + +