!function(t,r){"object"==typeofexports&&"undefined"!=typeofmodule?module.exports=r():"function"==typeofdefine&&define.amd?define(r):(t="undefined"!=typeofglobalThis?globalThis:t||self).GlMap=r()}(this,(function(){"use strict";functiont(t,r){(null==r||r>t.length)&&(r=t.length);for(vare=0,n=Array(r);e<r;e++)n[e]=t[e];returnn}functionr(t,r,e,n,o,i,a){try{varc=t[i](a),u=c.value}catch(t){returnvoide(t)}c.done?r(u):Promise.resolve(u).then(n,o)}functione(t,r,e){returnr&&function(t,r){for(vare=0;e<r.length;e++){varn=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}functionn(){n=function(){returnr};vart,r={},e=Object.prototype,o=e.hasOwnProperty,i=Object.defineProperty||function(t,r,e){t[r]=e.value},a="function"==typeofSymbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",f=a.toStringTag||"@@toStringTag";functionl(t,r,e){returnObject.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{l({},"")}catch(t){l=function(t,r,e){returnt[r]=e}}functions(t,r,e,n){varo=r&&r.prototypeinstanceofg?r:g,a=Object.create(o.prototype),c=newS(n||[]);returni(a,"_invoke",{value:k(t,e,c)}),a}functionh(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}r.wrap=s;varp="suspendedStart",y="suspendedYield",v="executing",d="completed",m={};functiong(){}functionw(){}functionb(){}varx={};l(x,c,(function(){returnthis}));varL=Object.getPrototypeOf,E=L&&L(L(T([])));E&&E!==e&&o.call(E,c)&&(x=E);varj=b.prototype=g.prototype=Object.create(x);functionO(t){["next","throw","return"].forEach((function(r){l(t,r,(function(t){returnthis._invoke(r,t)}))}))}function_(t,r){functione(n,i,a,c){varu=h(t[n],t,i);if("throw"!==u.type){varf=u.arg,l=f.value;returnl&&"object"==typeofl&&o.call(l,"__await")?r.resolve(l.__await).then((function(t){e("next",t,a,c)}),(function(t){e("throw",t,a,c)})):r.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){returne("throw",t,a,c)}))}c(u.arg)}varn;i(this,"_invoke",{value:function(t,o){functioni(){returnnewr((function(r,n){e(t,o,r,n)}))}returnn=n?n.then(i,i):i()}})}functionk(r,e,n){varo=p;returnfunction(i,a){if(o===v)throwError("Generator is already running");if(o===d){if("throw"===i)throwa;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){varc=n.delegate;if(c){varu=A(c,n);if(u){if(u===m)continue;returnu}}if("next"===n.method)n.sent=n._sent=n.arg;elseif("throw"===n.method){if(o===p)throwo=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;varf=h(r,e,n);if("normal"===f.type){if(o=n.done?d:y,f.arg===m)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(o=d,n.method="throw",n.arg=f.arg)}}}functionA(r,e){varn=e.method,o=r.iterator[n];if(o===t)returne.delegate=null,"throw"===n&&r.iterator.return&&(e.method="return",e.arg=t,A(r,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=newTypeError("The iterator does not provide a '"+n+"' method")),m;vari=h(o,r.iterator,e.arg);if("throw"===i.type)returne.method="throw",e.arg=i.arg,e.delegate=null,m;vara=i.arg;returna?a.done?(e[r.resultName]=a.value,e.next=r.nextLoc,"return"!==e.method&&(e.method="next",e.arg=t),e.delegate=null,m):a:(e.method="throw",e.arg=newTypeError("iterator result is not an object"),e.delegate=null,m)}functionP(t){varr={tryLoc:t[0]};1int&&(r.catchLoc=t[1]),2int&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}functionG(t){varr=t.completion||{};r.type="normal",deleter.arg,t.completion=r}functionS(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}functionT(r){if(r||""===r){vare=r[c];if(e)returne.call(r);if("function"==typeofr.next)returnr;if(!isNaN(r.length)){varn=-1,i=functione(){for(;++n<r.length;)if(o.call(r,n))returne.value=r[n],e.done=!1,e;returne.value=t,e.done=!0,e};returni.next=i}}thrownewTypeError(typeofr+" is not iterable")}returnw.prototype=b,i(j,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:w,configurable:!0}),w.displayName=l(b,f,"GeneratorFunction"),r.isGeneratorFunction=function(t){varr="function"==typeoft&&t.constructor;return!!r&&(r===w||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){returnObject.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,f,"GeneratorFunction")),t.prototype=Object.create(j),t},r.awrap=function(t){return{__await:t}},O(_.prototype),l(_.prototype,u,(function(){returnthis})),r.AsyncIterator=_,r.async=function(t,e,n,o,i){void0===i&&(i=Promise);vara=new_(s(t,e,n,o),i);returnr.isGeneratorFunction(e)?a:a.next().then((function(t){returnt.done?t.value:a.next()}))},O(j),l(j,f,"Generator"),l(j,c,(function(){returnthis})),l(j,"toString",(function(){return"[object Generator]"})),r.keys=function(t){varr=Object(t),e=[];for(varninr)e.push(n);returne.reverse(),functiont(){for(;e.length;){varn=e.pop();if(ninr)returnt.value=n,t.done=!1,t}returnt.done=!0,t}},r.values=T,S.prototype={constructor:S,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(G),!r)for(vareinthis)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=t)},stop:function(){this.done=!0;vart=this.tryEntries[0].completion;if("throw"===t.type)throwt.arg;returnthis.rval},dispatchException:function(r){if(this.done)throwr;vare=this;functionn(n,o){returnc.type="throw",c.arg=r,e.next=n,o&&(e.method="next",e.arg=t),!!o}for(vari=this.tryEntries.length-1;i>=0;--i){vara=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)returnn("end");if(a.tryLoc<=this.prev){varu=o.call(a,"catchLoc"),f=o.call(a,"finallyLoc");if(u&&f){if(this.prev<a.catchLoc)returnn(a.catchLoc,!0);if(this.prev<a.finallyLoc)returnn(a.finallyLoc)}elseif(u){if(this.prev<a.catchLoc)returnn(a.catchLoc,!0)}else{if(!f)throwError("try statement without catch or finally");if(this.prev<a.finallyLoc)returnn(a.finallyLoc)}}}},abrupt:function(t,r){for(vare=this.tryEntries.length-1;e>=0;--e){varn=this.tryEntries[e];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){vari=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);vara=i?i.completion:{};returna.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,r){if("throw"===t.type)throwt.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(varr=this.tryEntries.length-1;r>=0;--r){vare=this.tryEntries[r];if(e.finallyLoc===t)returnthis.complete(e.completion,e.afterLoc),G(e),m}},catch:function(t){for(varr=this.tryEntries.length-1;r>=0;--r){vare=this.tryEntries[r];if(e.tryLoc===t){varn=e.completion;if("throw"===n.type){varo=n.arg;G(e)}returno}}throwError("illegal catch attempt")},delegateYield:function(r,e,n){returnthis.delegate={iterator:T(r),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=t),m}},r}functiono(r){returnfunction(r){if(Array.isArray(r))returnt(r)}(r)||function(t){if("undefined"!=typeofSymbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])returnArray.from(t)}(r)||function(r,e){if(r){if("string"==typeofr)returnt(r,e);varn={}.toString.call(r).slice(8,-1);return"Object"===n&&r.constructor&&(n=r.constructor.name),"Map"===n||"Set"===n?Array.from(r):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(r,e):void0}}(r)||function(){thrownewTypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}functioni(t){varr=function(t,r){if("object"!=typeoft||!t)returnt;vare=t[Symbol.toPrimitive];if(void0!==e){varn=e.call(t,r);if("object"!=typeofn)returnn;thrownewTypeError("@@toPrimitive must return a primitive value.")}returnString(t)}(t,"string");return"symbol"==typeofr?r:r+""}vara={1:"develop",2:"test",3:"production",4:"beta"},c=function(){returne((functiont(){vare=this;!function(t,r){if(!(tinstanceofr))thrownewTypeError("Cannot call a class as a function")}(this,t);varo=1,i=arguments[0];if(arguments.length>1&&(o=arguments[0],i=arguments[1]),"undefined"!=typeofwindow){varc=function(){vart,c=(t=n().mark((functiont(){varr,c,u,f;returnn().wrap((function(t){for(;;)switch(t.prev=t.next){case0:returnt.prev=0,t.next=3,fetch("https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=map-api-js&env=".concat(a[o]));case3:returnr=t.sent,t.next=6,r.json();case6:c=t.sent,u=Array.from(document.head.getElementsByTagName("script")).some((function(t){returnt.src===c.apiUrl})),u?i&&"function"==typeofi&&i(e):((f=document.createElement("script")).src=c.apiUrl,document.head.appendChild(f),f.onload=function(){e.GLMap=newwindow.$GlMapApi((function(){i&&"function"==typeofi&&i(e)}))}),t.next=14;break;case11:t.prev=11,t.t0=t.catch(0),console.error("Failed to fetch configuration:",t.t0);case14:case"end":returnt.stop()}}),t,null,[[0,11]])})),function(){vare=this,n=arguments;returnnewPromise((function(o,i){vara=t.apply(e,n);functionc(t){r(a,o,i,c,u,"next",t)}functionu(t){r(a,o,i,c,u,"throw",t)}c(void0)}))});returnfunction(){returnc.apply(this,arguments)}}();c()}}),[{key:"invoke",value:function(t){varr,e=Array.prototype.slice.call(arguments,1);return(r=this.GLMap)[t].apply(r,o(e))}},{key:"map",get:function(){returnthis.GLMap._BMAP}}])}();returnc}));