25 lines
19 KiB
JavaScript
25 lines
19 KiB
JavaScript
"use strict";(()=>{var s={init:"livecodes-init",getConfig:"livecodes-get-config",config:"livecodes-config",load:"livecodes-load",appLoaded:"livecodes-app-loaded",ready:"livecodes-ready",change:"livecodes-change",testResults:"livecodes-test-results",console:"livecodes-console",destroy:"livecodes-destroy",resizeEditor:"livecodes-resize-editor",apiResponse:"livecodes-api-response",i18n:"livecodes-i18n"};var B='<!doctype html><html lang="en" dir="ltr"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1">{{codeiumMeta}}<title>LiveCodes</title><style>body{overflow:hidden}</style><link rel="preconnect" href="https://cdn.jsdelivr.net/" crossorigin><link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"><link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin><link rel="stylesheet" href="{{baseUrl}}app.2a950fbc50b54e9258bcdaa712d7ba30.css" id="app-styles"><script src="{{esModuleShimsUrl}}" async><\/script><script type="importmap">{ "imports": { "codemirror": "{{codemirrorCoreUrl}}", "@codemirror/autocomplete": "{{codemirrorCoreUrl}}", "@codemirror/commands": "{{codemirrorCoreUrl}}", "@codemirror/language": "{{codemirrorCoreUrl}}", "@codemirror/lint": "{{codemirrorCoreUrl}}", "@codemirror/search": "{{codemirrorCoreUrl}}", "@codemirror/state": "{{codemirrorCoreUrl}}", "@codemirror/theme-one-dark": "{{codemirrorCoreUrl}}", "@codemirror/view": "{{codemirrorCoreUrl}}", "@codemirror/lang-html": "{{codemirrorCoreUrl}}", "@codemirror/lang-css": "{{codemirrorCoreUrl}}", "@codemirror/lang-javascript": "{{codemirrorCoreUrl}}", "@codemirror/lang-json": "{{codemirrorCoreUrl}}", "@lezer/common": "{{codemirrorCoreUrl}}", "@lezer/highlight": "{{codemirrorCoreUrl}}", "@lezer/lr": "{{codemirrorCoreUrl}}", "@replit/codemirror-indentation-markers": "{{codemirrorCoreUrl}}", "@replit/codemirror-vscode-keymap": "{{codemirrorCoreUrl}}", "@replit/codemirror-css-color-picker": "{{codemirrorCoreUrl}}" } }<\/script></head><body><div id="container"><div id="toolbar"><div class="toolbar-app"><div class="toolbar-menu"><a href="/" id="logo" title="LiveCodes: A Code Playground That Just Works!" data-i18n="app.logo.title" data-i18n-prop="title"><img alt="LiveCodes Logo" src="{{baseUrl}}assets/images/livecodes-logo.svg" loading="lazy"> </a><a href="javascript:void(0)" id="app-menu-button-project" class="app-menu-button menu" title="Project" data-i18n="menu.appProject.hint" data-i18n-prop="title" aria-label="Project"><i class="icon-nav"></i> <span class="menu-text" data-i18n="menu.appProject.heading">Project</span></a><div id="app-menu-container-project" class="menu-scroller"></div><a href="javascript:void(0)" id="app-menu-button-settings" class="app-menu-button menu" title="App Settings" data-i18n="menu.appSettings.hint" data-i18n-prop="title" aria-label="Settings"><i class="icon-settings"></i> <span class="menu-text" data-i18n="menu.appSettings.heading">Settings</span></a><div id="app-menu-container-settings" class="menu-scroller"></div><a href="javascript:void(0)" id="app-menu-button-help" class="app-menu-button menu" title="Help" data-i18n="menu.appHelp.hint" data-i18n-prop="title" aria-label="Help"><i class="icon-help"></i> <span class="menu-text" data-i18n="menu.appHelp.heading">Help</span></a><div id="app-menu-container-help" class="menu-scroller"></div><a href="javascript:void(0)" id="app-menu-button-i18n" class="app-menu-button button" title="UI Language" data-i18n="app.i18nButton.hint" data-i18n-prop="title"><i class="icon-i18n"></i></a><div id="app-menu-container-i18n" class="menu-scroller"></div><a href="javascript:void(0)" id="light-theme-button" class="button" title="Change Theme" data-i18n="app.changeTheme.hint" data-i18n-prop="title"><i class="icon-theme-light"></i> </a><a href="javascript:void(0)" id="dark-theme-button" class="button" title="Change Theme" data-i18n="app.changeTheme.hint" data-i18n-prop="title"><i class="icon-theme-dark"></i></a><div class="enable-motion"></div></div><div id="select-editor"></div></div><div class="toolbar-render"><div><div id="project-title" contenteditable="true" spellcheck="false" data-i18n="app.untitledProject">Untitled Project</div><a href="javascript:void(0)" id="run-button" class="button" title="Run (Shift + Enter)" data-i18n="app.run.hint" data-i18n-prop="title"><i class="icon-run"></i> </a><a href="javascript:void(0)" id="share-button" class="button" title="Share (Ctrl/\u2318 + Alt + S)" data-i18n="app.share.hint" data-i18n-prop="title"><i class="icon-share"></i> </a><a href="javascript:void(0)" id="result-button" class="button" title="Result (Ctrl/\u2318 + Alt + R)" data-i18n="app.result.hint" data-i18n-prop="title"><i class="icon-result"></i> </a><a href="javascript:void(0)" id="fullscreen-button" title="Full Screen" class="button -left" data-i18n="app.fullscreen.hint" data-i18n-prop="title"><i class="icon-full-screen"></i></a></div><a href="#" id="login-link" class="menu -left" title="Login" aria-label="Login"><i class="icon-login"></i> <span class="menu-text" data-i18n="menu.login">Login</span></a> <a href="#" id="logout-link" class="menu -left" aria-label="Logout" style="display:none"><i class="icon-logout"></i> <span class="menu-text" data-i18n="menu.logout">Log out</span></a></div></div><div id="editor-container"><div id="editors"><div id="markup" class="editor"></div><div id="style" class="editor"></div><div id="script" class="editor"></div><div id="editor-tools" class="tool-buttons"><button type="button" id="focus-btn" title="Toggle Focus mode (Ctrl/\u2318 + K, Z)" data-i18n="app.focus.hint" data-i18n-prop="title"><i class="icon-editor-focus"></i></button> <button type="button" id="format-btn" title="Format (Alt + Shift + F)" data-i18n="app.format.hint" data-i18n-prop="title"><i class="icon-editor-format"></i></button> <button type="button" id="undo-btn" title="Undo (Ctrl/\u2318 + Z)" data-i18n="app.undo.hint" data-i18n-prop="title"><i class="icon-editor-undo"></i></button> <button type="button" id="redo-btn" title="Redo (Ctrl/\u2318 + Shift + Z)" data-i18n="app.redo.hint" data-i18n-prop="title"><i class="icon-editor-redo"></i></button> <button type="button" id="copy-btn" title="Copy (Ctrl/\u2318 + A, Ctrl/\u2318 + C)" data-i18n="app.copy.hint" data-i18n-prop="title"><i class="icon-editor-copy"></i></button> <button type="button" id="copy-as-url-btn" title="Copy code as data URL" data-i18n="app.copyAsUrl.hint" data-i18n-prop="title"><i class="icon-editor-copy-url"></i></button> <button type="button" id="code-to-img-btn" title="Code to Image" data-i18n="app.codeToImage.hint" data-i18n-prop="title"><i class="icon-camera"></i></button> <span id="editor-status"><span id="editor-mode" title="Editor Mode"></span> <span data-status="markup"></span> <span data-status="style"></span> <span data-status="script"></span> </span><button type="button" id="external-resources-btn" title="External Resources" data-i18n="app.externalResources.hint" data-i18n-prop="title"><i class="icon-editor-external"></i> <span id="external-resources-mark" class="mark"></span></button> <button type="button" id="project-info-btn" title="Project Info" data-i18n="app.projectInfo.hint" data-i18n-prop="title"><i class="icon-editor-project"></i></button> <button type="button" id="custom-settings-btn" title="Custom Settings" data-i18n="app.customSettings.hint" data-i18n-prop="title"><i class="icon-editor-settings-custom"></i> <span id="custom-settings-mark" class="mark"></span></button> <button type="button" id="editor-settings-btn" title="Editor Settings" data-i18n="app.editorSettings.hint" data-i18n-prop="title"><i class="icon-editor-settings"></i></button></div></div><div id="output"><div id="result" class="full"></div><div id="tools-pane"></div></div></div></div><div id="overlay" style="display:none"></div><dialog id="modal"><div id="modal-container"></div><div class="snackbars-left"></div></dialog><ninja-keys placeholder="Type a command or search..." data-i18n="commandMenu.placeholder" data-i18n-prop="placeholder" highlight-matches disablehotkeys></ninja-keys><div id="result-mode-drawer" class="hidden"><a href="#"><div id="drawer-logo"><img alt="LiveCodes Logo" src="{{baseUrl}}assets/images/livecodes-logo.svg" loading="lazy"></div><div id="drawer-text"><span data-i18n="resultMode.linkText">Edit on LiveCodes</span> <svg viewBox="6 6 12 12" xmlns="http://www.w3.org/2000/svg"><g><path d="M15 13.5V9M15 9H10.5M15 9L9.00019 14.9999" stroke="currentColor" stroke-width="2" stroke-linecap="round"></path></g></svg></div></a><div><button id="drawer-close"><svg viewBox="0 0 16 16"><path fill="rgb(119, 128, 137)" d="M9.41 8l3.29-3.29c.19-.18.3-.43.3-.71a1.003 1.003 0 00-1.71-.71L8 6.59l-3.29-3.3a1.003 1.003 0 00-1.42 1.42L6.59 8 3.3 11.29c-.19.18-.3.43-.3.71a1.003 1.003 0 001.71.71L8 9.41l3.29 3.29c.18.19.43.3.71.3a1.003 1.003 0 00.71-1.71L9.41 8z" fill-rule="evenodd"></path></svg></button></div></div><script src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js" crossorigin="anonymous"><\/script><script>window.appCDN="{{appCDN}}"<\/script>{{codemirrorModule}}<script type="module">import{app}from"{{baseUrl}}{{script}}";window.app=app<\/script></body></html>';var D=["esm.sh","skypack","esm.run","jsdelivr.esm","fastly.jsdelivr.esm","gcore.jsdelivr.esm","testingcf.jsdelivr.esm","jsdelivr.b-cdn.esm","jspm"],P=["jsdelivr","fastly.jsdelivr","unpkg","gcore.jsdelivr","testingcf.jsdelivr","jsdelivr.b-cdn","npmcdn"],R=["jsdelivr.gh","fastly.jsdelivr.gh","statically","gcore.jsdelivr.gh","testingcf.jsdelivr.gh","jsdelivr.b-cdn.gh"],u={getModuleUrl:(e,{isModule:o=!0,defaultCDN:c="esm.sh",external:n}={})=>{e=e.replace(/#nobundle/g,"");let i=m=>!n||!m.includes("https://esm.sh")?m:m.includes("?")?`${m}&external=${n}`:`${m}?external=${n}`,f=I(e,o,c);return f?i(f):o?i("https://esm.sh/"+e):"https://cdn.jsdelivr.net/npm/"+e},getUrl:(e,o)=>e.startsWith("http")||e.startsWith("data:")?e:I(e,!1,o||_())||e,cdnLists:{npm:P,module:D,gh:R},checkCDNs:async(e,o)=>{let c=[o,...u.cdnLists.npm].filter(Boolean);for(let n of c)try{if((await fetch(u.getUrl(e,n),{method:"HEAD"})).ok)return n}catch{}return u.cdnLists.npm[0]}},_=()=>{if(globalThis.appCDN)return globalThis.appCDN;try{return new URL(location.href).searchParams.get("appCDN")||u.cdnLists.npm[0]}catch{return u.cdnLists.npm[0]}},I=(e,o,c)=>{let n=o&&e.startsWith("unpkg:")?"?module":"";e.startsWith("gh:")?e=e.replace("gh",R[0]):e.includes(":")||(e=(c||(o?D[0]:P[0]))+":"+e);for(let i of K){let[f,m]=i;if(f.test(e))return e.replace(f,m)+n}return null},K=[[/^(esm\.sh:)(.+)/i,"https://esm.sh/$2"],[/^(npm:)(.+)/i,"https://esm.sh/$2"],[/^(node:)(.+)/i,"https://esm.sh/$2"],[/^(jsr:)(.+)/i,"https://esm.sh/jsr/$2"],[/^(skypack:)(.+)/i,"https://cdn.skypack.dev/$2"],[/^(jsdelivr:)(.+)/i,"https://cdn.jsdelivr.net/npm/$2"],[/^(fastly\.jsdelivr:)(.+)/i,"https://fastly.jsdelivr.net/npm/$2"],[/^(gcore\.jsdelivr:)(.+)/i,"https://gcore.jsdelivr.net/npm/$2"],[/^(testingcf\.jsdelivr:)(.+)/i,"https://testingcf.jsdelivr.net/npm/$2"],[/^(jsdelivr\.b-cdn:)(.+)/i,"https://jsdelivr.b-cdn.net/npm/$2"],[/^(jsdelivr\.gh:)(.+)/i,"https://cdn.jsdelivr.net/gh/$2"],[/^(fastly\.jsdelivr\.gh:)(.+)/i,"https://fastly.jsdelivr.net/gh/$2"],[/^(gcore\.jsdelivr\.gh:)(.+)/i,"https://gcore.jsdelivr.net/gh/$2"],[/^(testingcf\.jsdelivr\.gh:)(.+)/i,"https://testingcf.jsdelivr.net/gh/$2"],[/^(jsdelivr\.b-cdn\.gh:)(.+)/i,"https://jsdelivr.b-cdn.net/gh/$2"],[/^(statically:)(.+)/i,"https://cdn.statically.io/gh/$2"],[/^(esm\.run:)(.+)/i,"https://esm.run/$2"],[/^(jsdelivr\.esm:)(.+)/i,"https://cdn.jsdelivr.net/npm/$2/+esm"],[/^(fastly\.jsdelivr\.esm:)(.+)/i,"https://fastly.jsdelivr.net/npm/$2/+esm"],[/^(gcore\.jsdelivr\.esm:)(.+)/i,"https://gcore.jsdelivr.net/npm/$2/+esm"],[/^(testingcf\.jsdelivr\.esm:)(.+)/i,"https://testingcf.jsdelivr.net/npm/$2/+esm"],[/^(jsdelivr\.b-cdn\.esm:)(.+)/i,"https://jsdelivr.b-cdn.net/npm/$2/+esm"],[/^(jspm:)(.+)/i,"https://jspm.dev/$2"],[/^(esbuild:)(.+)/i,"https://esbuild.vercel.app/$2"],[/^(bundle\.run:)(.+)/i,"https://bundle.run/$2"],[/^(unpkg:)(.+)/i,"https://unpkg.com/$2"],[/^(npmcdn:)(.+)/i,"https://npmcdn.com/$2"],[/^(bundlejs:)(.+)/i,"https://deno.bundlejs.com/?file&q=$2"],[/^(bundle:)(.+)/i,"https://deno.bundlejs.com/?file&q=$2"],[/^(deno:)(.+)/i,"https://deno.bundlejs.com/?file&q=https://deno.land/x/$2/mod.ts"],[/^(https:\/\/deno\.land\/.+)/i,"https://deno.bundlejs.com/?file&q=$1"],[/^(github:|https:\/\/github\.com\/)(.[^\/]+?)\/(.[^\/]+?)\/(?!releases\/)(?:(?:blob|raw)\/)?(.+?\/.+)/i,"https://deno.bundlejs.com/?file&q=https://cdn.jsdelivr.net/gh/$2/$3@$4"],[/^(gist\.github:)(.+?\/[0-9a-f]+\/raw\/(?:[0-9a-f]+\/)?.+)$/i,"https://gist.githack.com/$2"],[/^(gitlab:|https:\/\/gitlab\.com\/)([^\/]+.*\/[^\/]+)\/(?:raw|blob)\/(.+?)(?:\?.*)?$/i,"https://deno.bundlejs.com/?file&q=https://gl.githack.com/$2/raw/$3"],[/^(bitbucket:|https:\/\/bitbucket\.org\/)([^\/]+\/[^\/]+)\/(?:raw|src)\/(.+?)(?:\?.*)?$/i,"https://deno.bundlejs.com/?file&q=https://bb.githack.com/$2/raw/$3"],[/^(bitbucket:)snippets\/([^\/]+\/[^\/]+)\/revisions\/([^\/\#\?]+)(?:\?[^#]*)?(?:\#file-(.+?))$/i,"https://bb.githack.com/!api/2.0/snippets/$2/$3/files/$4"],[/^(bitbucket:)snippets\/([^\/]+\/[^\/\#\?]+)(?:\?[^#]*)?(?:\#file-(.+?))$/i,"https://bb.githack.com/!api/2.0/snippets/$2/HEAD/files/$3"],[/^(bitbucket:)\!api\/2.0\/snippets\/([^\/]+\/[^\/]+\/[^\/]+)\/files\/(.+?)(?:\?.*)?$/i,"https://bb.githack.com/!api/2.0/snippets/$2/files/$3"],[/^(api\.bitbucket:)2.0\/snippets\/([^\/]+\/[^\/]+\/[^\/]+)\/files\/(.+?)(?:\?.*)?$/i,"https://bb.githack.com/!api/2.0/snippets/$2/files/$3"],[/^(rawgit:)(.+?\/[0-9a-f]+\/raw\/(?:[0-9a-f]+\/)?.+)$/i,"https://gist.githack.com/$2"],[/^(rawgit:|https:\/\/raw\.githubusercontent\.com)(\/[^\/]+\/[^\/]+|[0-9A-Za-z-]+\/[0-9a-f]+\/raw)\/(.+)/i,"https://deno.bundlejs.com/?file&q=https://raw.githack.com/$2/$3"]];var q=()=>{if(location.hostname==="localhost"||location.hostname==="127.0.0.1")return!1;try{return window.self!==window.top}catch{return!0}};var{getUrl:J,getModuleUrl:re}=u;var N=J("@live-codes/codemirror@0.3.2/build/");var T="es-module-shims@1.10.0/dist/es-module-shims.js";var r=new URLSearchParams(location.search),w=r.get("headless")!=null&&r.get("headless")!=="false"||r.get("view")==="headless",Z=r.get("mode")==="lite"||r.get("lite")!=null&&r.get("lite")!=="false",d=w||Z||r.get("embed")!=null&&r.get("embed")!=="false"||q(),j=r.get("loading"),C=d&&j!=="eager",O=d?j==="lazy"||j==="click"||j==="eager"?j:"lazy":"eager",H=r.get("disableAI")!=null&&r.get("disableAI")!=="false"||r.get("enableAI")==="false",E=(e,o={})=>new Promise(async c=>{let n=document.querySelector(e);if(!n)throw new Error(`Cannot find element with the selector: "${e}"`);let i=(location.origin+location.pathname).split("/").slice(0,-1).join("/")+"/livecodes/";o.mode==="lite"&&(d=!0);let f=w?"headless.1deeb2a1bfc437f7ed32af547a1ae9b2.js":d?"embed.06bfcff86e7d279e37fb002fffa99d10.js":"app.7fcf1b21cbdffdecc9025269aedd73c1.js",m="*",M=document.createElement("style");M.innerHTML=`
|
|
${e} {
|
|
min-width: 300px;
|
|
min-height: 200px;
|
|
padding: 0;
|
|
overflow: hidden;
|
|
}
|
|
${e} > iframe {
|
|
border: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
${e}.embed iframe {
|
|
width: calc(100% - 2px);
|
|
height: calc(100% - 2px);
|
|
border: 1px solid #001b25;
|
|
border-radius: 8px;
|
|
}
|
|
`,document.head.appendChild(M);let $=async()=>{let v=await u.checkCDNs(T,r.get("appCDN")),W=HTMLScriptElement.supports?HTMLScriptElement.supports("importmap"):!1,l=document.createElement("iframe");l.name="app",l.style.display="none";let F=H?"?disableAI":"";l.src="./app.html"+F;let A=!1;if(l.onload=()=>{if(A)return;let t=B.replace(/{{baseUrl}}/g,i).replace(/{{script}}/g,f).replace(/{{appCDN}}/g,v).replace(/{{esModuleShimsUrl}}/g,u.getUrl(T,v)).replace(/{{codemirrorModule}}/g,W?"":`
|
|
<script type="module">
|
|
import * as mod from '${i}codemirror.0c9c84124f5b0a4a82ccbc67c05153d0.js';
|
|
window['${i}codemirror.0c9c84124f5b0a4a82ccbc67c05153d0.js'] = mod;
|
|
<\/script>
|
|
`).replace(/{{codemirrorCoreUrl}}/g,`${N}codemirror-core.js`).replace(/src="[^"]*?\.svg"/g,a=>w?'src=""':a).replace(/{{codeiumMeta}}/g,`<meta name="codeium:type" content="${H?"none":"monaco"}" />`);l.contentWindow?.postMessage({content:t},location.origin),A=!0},n.appendChild(l),d){let t=(a,y=!1)=>{window.addEventListener(a,g=>{y&&g.detail==null||parent.postMessage({type:a,...y?{payload:g.detail}:{}},m)})};t(s.appLoaded),t(s.ready),t(s.change,!0),t(s.testResults,!0),t(s.console,!0),t(s.destroy)}let U=null;addEventListener("message",async t=>{if(t.data?.args==="i18n"){if(t.source!==l.contentWindow)return;if(!d){let b=t.data.payload.data;for(let[h,x]of Object.entries(b))localStorage.setItem(`i18n_splash.${h}`,x)}let a=t.data.payload.lang;document.documentElement.lang=a;let y=t.data.payload.reload,g=t.data.payload.url;if(y){let b=new URL(g||location.href);g&&a?b.searchParams.set("appLanguage",a):b.searchParams.delete("appLanguage"),d&&b.searchParams.set("embed",""),location.href=b.href}return}if(d){if(t.source!==parent||U==null)return;let{method:a,id:y,args:g}=t.data??{};if(!a||!y)return;let b=Array.isArray(g)?g:[g],h;try{h=await U[a](...b)}catch(x){h={error:x.message||x}}typeof h=="object"&&Object.keys(h).forEach(x=>{typeof h[x]=="function"&&delete h[x]}),parent.postMessage({type:s.apiResponse,method:a,id:y,payload:h},m)}else{if(t.source!==l.contentWindow)return;t.data?.args==="home"?location.href=location.origin+location.pathname:t.data?.args==="console-message"&&console.info(...t.data.payload??[])}}),l.addEventListener("load",async()=>{let t=l.contentWindow?.app;typeof t=="function"&&(U=await t(o,i),w||(l.style.display="block"),window.dispatchEvent(new CustomEvent(s.appLoaded,{detail:U})),c(U))})};if(C){window.addEventListener(s.load,()=>{$()},{once:!0});let v=document.createElement("link");v.href=i+f,v.rel="preload",v.as="script",document.head.appendChild(v)}else $()});var G=r.get("sdkVersion"),Q="#livecodes",p=document.querySelector("#loading"),z=document.querySelector("#loading-text"),X=p.innerHTML;if(d)parent.postMessage({type:s.init,payload:{appVersion:"46"}},"*"),document.body.classList.add("embed"),C&&(p.classList.add("click-to-load"),p.title="Click to Load",z.innerText="Click to load LiveCodes",p.addEventListener("click",L),addEventListener("message",e=>{e.source===parent&&e.data?.type===s.load&&L()}),O==="lazy"&&"IntersectionObserver"in window&&new IntersectionObserver((o,c)=>{o.forEach(n=>{n.isIntersecting&&(L(),c.unobserve(document.body))})},{rootMargin:"150px"}).observe(document.body));else{let e=c=>`i18n_${c}`,o=localStorage.getItem(e("splash.loading"));o&&(z.innerText=o)}function L(){window.dispatchEvent(new Event(s.load)),C&&(p.style.opacity="0",setTimeout(()=>{p.classList.remove("click-to-load"),p.innerHTML=X,p.title="",p.style.opacity="1"},500))}function S(){p.style.opacity="0",setTimeout(()=>{p.remove()},500),document.querySelector(Q).style.opacity="1"}function k(){document.body.style.height=window.innerHeight+"px"}k();window.addEventListener("resize",k,!1);setTimeout(k,500);window.addEventListener(s.appLoaded,e=>{S(),window.livecodes=e.detail});window.addEventListener(s.destroy,()=>{window.removeEventListener("resize",k),document.body.innerHTML="",document.head.innerHTML=""});d&&r.get("config")==="sdk"&&!G?(addEventListener("message",function e(o){o.source!==parent||o.data?.type!==s.config||(removeEventListener("message",e),E("#livecodes",o.data.payload).then(S))}),parent.postMessage({type:s.getConfig},"*")):E("#livecodes").then(S);})();
|