import{Ur as e}from"./vendor-misc-D7UZlQZq.js";function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function r(e){for(var r=1;r<arguments.length;r++){var i=arguments[r]==null?{}:arguments[r];r%2?n(Object(i),!0).forEach(function(n){t(e,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function i(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function a(e,t){if(e==null)return{};var n=i(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function o(e,t){return s(e)||c(e,t)||l(e,t)||d()}function s(e){if(Array.isArray(e))return e}function c(e,t){if(!(typeof Symbol>`u`||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw a}}return n}}function l(e,t){if(e){if(typeof e==`string`)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}}function u(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function d(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var f={paths:{vs:`https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs`}};function p(e){return function t(){var n=this,r=[...arguments];return r.length>=e.length?e.apply(this,r):function(){var e=[...arguments];return t.apply(n,[].concat(r,e))}}}function m(e){return{}.toString.call(e).includes(`Object`)}function h(e){return e||y(`configIsRequired`),m(e)||y(`configType`),e.urls?(g(),{paths:{vs:e.urls.monacoBase}}):e}function g(){console.warn(v.deprecation)}function _(e,t){throw Error(e[t]||e.default)}var v={configIsRequired:`the configuration object is required`,configType:`the configuration object should be an object`,default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
    You are using deprecated way of configuration.

    Instead of using
      monaco.config({ urls: { monacoBase: '...' } })
    use
      monaco.config({ paths: { vs: '...' } })

    For more please check the link https://github.com/suren-atoyan/monaco-loader#config
  `},y=p(_)(v),b={config:h},x=function(){var e=[...arguments];return function(t){return e.reduceRight(function(e,t){return t(e)},t)}};function S(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],S(e[n],t[n]))}),r(r({},e),t)}var C={type:`cancelation`,msg:`operation is manually canceled`};function w(e){var t=!1,n=new Promise(function(n,r){e.then(function(e){return t?r(C):n(e)}),e.catch(r)});return n.cancel=function(){return t=!0},n}var T=o(e.create({config:f,isInitialized:!1,resolve:null,reject:null,monaco:null}),2),E=T[0],D=T[1];function O(e){var t=b.config(e),n=t.monaco,r=a(t,[`monaco`]);D(function(e){return{config:S(e.config,r),monaco:n}})}function k(){var e=E(function(e){return{monaco:e.monaco,isInitialized:e.isInitialized,resolve:e.resolve}});if(!e.isInitialized){if(D({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),w(I);if(window.monaco&&window.monaco.editor)return P(window.monaco),e.resolve(window.monaco),w(I);x(A,M)(N)}return w(I)}function A(e){return document.body.appendChild(e)}function j(e){var t=document.createElement(`script`);return e&&(t.src=e),t}function M(e){var t=E(function(e){return{config:e.config,reject:e.reject}}),n=j(`${t.config.paths.vs}/loader.js`);return n.onload=function(){return e()},n.onerror=t.reject,n}function N(){var e=E(function(e){return{config:e.config,resolve:e.resolve,reject:e.reject}}),t=window.require;t.config(e.config),t([`vs/editor/editor.main`],function(t){P(t),e.resolve(t)},function(t){e.reject(t)})}function P(e){E().monaco||D({monaco:e})}function F(){return E(function(e){return e.monaco})}var I=new Promise(function(e,t){return D({resolve:e,reject:t})}),L={config:O,init:k,__getMonacoInstance:F};export{L as t};
//# sourceMappingURL=vendor-monaco-B3gKcUcU.js.map