{"version":3,"sources":["jsdelivr-header.js","/npm/@2gis/mapgl@1.72.0/dist/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aAGA,IAAI,IACJ,SAAS,KAAK,GAEV,QADiB,IAAb,IAAuB,EAAW,iCAChB,oBAAX,OACP,MAAM,IAAI,MAAM,kDAEpB,OAAI,IACO,QAAQ,QAAQ,KAEpB,oBAAoB,GAAU,MAAK,WAEtC,OADA,IAAM,OAAO,KAEjB,GACJ,CAEA,SAAS,oBAAoB,GACzB,OAAO,IAAI,SAAQ,SAAU,EAAS,GAElC,IAAI,EAAS,SAAS,cAAc,UACpC,EAAO,KAAO,kBACd,EAAO,OAAQ,EACf,EAAO,YAAc,YACrB,EAAO,IAAM,EAEb,SAAS,KAAK,YAAY,GAE1B,EAAO,iBAAiB,QAAQ,WAC5B,GACJ,IAEA,EAAO,iBAAiB,SAAS,SAAU,GACvC,EAAO,EACX,GACJ,GACJ,CApCA,OAAO,eAAe,QAAS,aAAc,CAAE,OAAO,IACtD,QAAQ,UAAO,EAef,QAAQ,KAAO","file":"/npm/@2gis/mapgl@1.72.0/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@2gis/mapgl@1.72.0/dist/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.load = void 0;\nvar map;\nfunction load(mapglURL) {\n    if (mapglURL === void 0) { mapglURL = 'https://mapgl.2gis.com/api/js'; }\n    if (typeof window === 'undefined') {\n        throw new Error('mapgl is supported only in browser environment');\n    }\n    if (map) {\n        return Promise.resolve(map);\n    }\n    return createScriptAndLoad(mapglURL).then(function () {\n        map = window.mapgl;\n        return map;\n    });\n}\nexports.load = load;\nfunction createScriptAndLoad(mapglURL) {\n    return new Promise(function (resolve, reject) {\n        // Create script element and set attributes\n        var script = document.createElement('script');\n        script.type = 'text/javascript';\n        script.async = true;\n        script.crossOrigin = 'anonymous';\n        script.src = mapglURL;\n        // Append the script to the DOM\n        document.body.appendChild(script);\n        // Resolve the promise once the script is loaded\n        script.addEventListener('load', function () {\n            resolve();\n        });\n        // Catch any errors while loading the script\n        script.addEventListener('error', function (error) {\n            reject(error);\n        });\n    });\n}\n"]}