(("undefined"!=typeof globalThis?globalThis:self).makoChunk_antd=("undefined"!=typeof globalThis?globalThis:self).makoChunk_antd||[]).push([["393b8aad"],{"393b8aad":function(e,t,n){"use strict";n.d(t,"__esModule",{value:!0}),n.d(t,"SandpackRuntime",{enumerable:!0,get:function(){return L;}});var i=n("777fffbe"),r=n("405d9267"),o=n("cc7c7c76"),s=n("b9d61f4f"),a=i._(n("9231682e"));n("5810ef27");for(var c=function(){function e(e,t,n){var i=this;this.type=e,this.handleMessage=t,this.protocol=n,this._disposeMessageListener=this.protocol.channelListen(function(e){return(0,r._)(i,void 0,void 0,function(){var t,n,i,o;return(0,r.a)(this,function(r){switch(r.label){case 0:if(!(e.type===this.getTypeId()&&e.method))return[3,4];t=e,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.handleMessage(t)];case 2:return n=r.sent(),i={type:this.getTypeId(),msgId:t.msgId,result:n},this.protocol.dispatch(i),[3,4];case 3:return o=r.sent(),i={type:this.getTypeId(),msgId:t.msgId,error:{message:o.message}},this.protocol.dispatch(i),[3,4];case 4:return[2];}});});});}return e.prototype.getTypeId=function(){return"protocol-".concat(this.type);},e.prototype.dispose=function(){this._disposeMessageListener();},e;}(),d=function(){function e(e,t){this.globalListeners={},this.globalListenersCount=0,this.channelListeners={},this.channelListenersCount=0,this.channelId=Math.floor(1e6*Math.random()),this.frameWindow=e.contentWindow,this.origin=t,this.globalListeners=[],this.channelListeners=[],this.eventListener=this.eventListener.bind(this),"undefined"!=typeof window&&window.addEventListener("message",this.eventListener);}return e.prototype.cleanup=function(){window.removeEventListener("message",this.eventListener),this.globalListeners={},this.channelListeners={},this.globalListenersCount=0,this.channelListenersCount=0;},e.prototype.register=function(){this.frameWindow&&this.frameWindow.postMessage({type:"register-frame",origin:document.location.origin,id:this.channelId},this.origin);},e.prototype.dispatch=function(e){this.frameWindow&&this.frameWindow.postMessage((0,r.h)({$id:this.channelId,codesandbox:!0},e),this.origin);},e.prototype.globalListen=function(e){var t=this;if("function"!=typeof e)return function(){};var n=this.globalListenersCount;return this.globalListeners[n]=e,this.globalListenersCount++,function(){delete t.globalListeners[n];};},e.prototype.channelListen=function(e){var t=this;if("function"!=typeof e)return function(){};var n=this.channelListenersCount;return this.channelListeners[n]=e,this.channelListenersCount++,function(){delete t.channelListeners[n];};},e.prototype.eventListener=function(e){if(e.source===this.frameWindow){var t=e.data;t.codesandbox&&(Object.values(this.globalListeners).forEach(function(e){return e(t);}),t.$id===this.channelId&&Object.values(this.channelListeners).forEach(function(e){return e(t);}));}},e;}(),l=new Map,u=Object.entries(a.default),p=0;p-1;}))return"adonis";var d=["nuxt","nuxt-edge","nuxt-ts","nuxt-ts-edge","nuxt3"];if(s.some(function(e){return d.indexOf(e)>-1;}))return"nuxt";if(s.indexOf("next")>-1)return"next";var l=["apollo-server","apollo-server-express","apollo-server-hapi","apollo-server-koa","apollo-server-lambda","apollo-server-micro"];if(s.some(function(e){return l.indexOf(e)>-1;}))return"apollo";if(s.indexOf("mdx-deck")>-1)return"mdx-deck";if(s.indexOf("gridsome")>-1)return"gridsome";if(s.indexOf("vuepress")>-1)return"vuepress";if(s.indexOf("ember-cli")>-1)return"ember";if(s.indexOf("sapper")>-1)return"sapper";if(s.indexOf("gatsby")>-1)return"gatsby";if(s.indexOf("quasar")>-1)return"quasar";if(s.indexOf("@docusaurus/core")>-1)return"docusaurus";if(s.indexOf("remix")>-1)return"remix";if(s.indexOf("astro")>-1)return"node";if(a.some(function(e){return e.endsWith(".re");}))return"reason";var u=["parcel-bundler","parcel"];if(s.some(function(e){return u.indexOf(e)>-1;}))return"parcel";var p=["@dojo/core","@dojo/framework"];if(s.some(function(e){return p.indexOf(e)>-1;}))return"@dojo/cli-create-app";if(s.indexOf("@nestjs/core")>-1||s.indexOf("@nestjs/common")>-1)return"nest";if(s.indexOf("react-styleguidist")>-1)return"styleguidist";if(s.indexOf("react-scripts")>-1)return"create-react-app";if(s.indexOf("react-scripts-ts")>-1)return"create-react-app-typescript";if(s.indexOf("@angular/core")>-1)return"angular-cli";if(s.indexOf("preact-cli")>-1)return"preact-cli";if(s.indexOf("@sveltech/routify")>-1||s.indexOf("@roxi/routify")>-1||s.indexOf("vite")>-1||s.indexOf("@frontity/core")>-1)return"node";if(s.indexOf("svelte")>-1)return"svelte";if(s.indexOf("vue")>-1)return"vue-cli";if(s.indexOf("cx")>-1)return"cxjs";var h=["express","koa","nodemon","ts-node","@tensorflow/tfjs-node","webpack-dev-server","snowpack"];if(s.some(function(e){return h.indexOf(e)>-1;})||Object.keys(i).length>=50)return"node";}(d,l),showOpenInCodeSandbox:null===(n=this.options.showOpenInCodeSandbox)||void 0===n||n,showErrorScreen:null===(i=this.options.showErrorScreen)||void 0===i||i,showLoadingScreen:null!==(o=this.options.showLoadingScreen)&&void 0!==o&&o,skipEval:this.options.skipEval||!1,clearConsoleDisabled:!this.options.clearConsoleOnFirstCompile,logLevel:null!==(s=this.options.logLevel)&&void 0!==s?s:r.S.Info,customNpmRegistries:this.options.customNpmRegistries,teamId:this.options.teamId,sandboxId:this.options.sandboxId}));},t.prototype.dispatch=function(e){"refresh"===e.type&&(this.setLocationURLIntoIFrame(),this.options.experimental_enableServiceWorker&&this.serviceWorkerHandshake()),this.iframeProtocol.dispatch(e);},t.prototype.listen=function(e){return this.iframeProtocol.channelListen(e);},t.prototype.getCodeSandboxURL=function(){var e=this.getFiles();return fetch("https://codesandbox.io/api/v1/sandboxes/define?json=1",{method:"POST",body:JSON.stringify({files:Object.keys(e).reduce(function(t,n){var i;return(0,r.h)((0,r.h)({},t),((i={})[n.replace("/","")]={content:e[n].code,isBinary:!1},i));},{})}),headers:{Accept:"application/json","Content-Type":"application/json"}}).then(function(e){return e.json();}).then(function(e){return{sandboxId:e.sandbox_id,editorUrl:"https://codesandbox.io/s/".concat(e.sandbox_id),embedUrl:"https://codesandbox.io/embed/".concat(e.sandbox_id)};});},t.prototype.getFiles=function(){var e=this.sandboxSetup;return void 0===e.files["/package.json"]?(0,r.d)(e.files,e.dependencies,e.devDependencies,e.entry):this.sandboxSetup.files;},t.prototype.initializeElement=function(){this.iframe.style.border="0",this.iframe.style.width=this.options.width||"100%",this.iframe.style.height=this.options.height||"100%",this.iframe.style.overflow="hidden",(0,r.n)(this.element.parentNode,"The given iframe does not have a parent."),this.element.parentNode.replaceChild(this.iframe,this.element);},t;}(s.S);}}]);