Files
louiscklaw 6c60a73f30 update,
2025-01-31 19:15:17 +08:00

7 lines
6.1 KiB
Plaintext

/*! For license information please see a6e91a3e397f31ce.min.js.LICENSE.txt */
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4a7cab80-92e2-5ff5-93ea-e6a1840e346b")}catch(e){}}();
(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[14],{1923:(e,t,i)=>{"use strict";i.d(t,{aN:()=>o});var r=function e(t,i){if(t===i)return!0;if(t&&i&&"object"==typeof t&&"object"==typeof i){if(t.constructor!==i.constructor)return!1;var r,s,n;if(Array.isArray(t)){if((r=t.length)!=i.length)return!1;for(s=r;0!=s--;)if(!e(t[s],i[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===i.source&&t.flags===i.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===i.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===i.toString();if((r=(n=Object.keys(t)).length)!==Object.keys(i).length)return!1;for(s=r;0!=s--;)if(!Object.prototype.hasOwnProperty.call(i,n[s]))return!1;for(s=r;0!=s--;){var o=n[s];if(!e(t[o],i[o]))return!1}return!0}return t!=t&&i!=i};const s="__googleMapsScriptId";var n;!function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.LOADING=1]="LOADING",e[e.SUCCESS=2]="SUCCESS",e[e.FAILURE=3]="FAILURE"}(n||(n={}));class o{constructor({apiKey:e,authReferrerPolicy:t,channel:i,client:n,id:a=s,language:l,libraries:h=[],mapIds:c,nonce:u,region:d,retries:g=3,url:p="https://maps.googleapis.com/maps/api/js",version:f}){if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=e,this.authReferrerPolicy=t,this.channel=i,this.client=n,this.id=a||s,this.language=l,this.libraries=h,this.mapIds=c,this.nonce=u,this.region=d,this.retries=g,this.url=p,this.version=f,o.instance){if(!r(this.options,o.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(o.instance.options)}`);return o.instance}o.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?n.FAILURE:this.done?n.SUCCESS:this.loading?n.LOADING:n.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let e=this.url;return e+="?callback=__googleMapsCallback",this.apiKey&&(e+=`&key=${this.apiKey}`),this.channel&&(e+=`&channel=${this.channel}`),this.client&&(e+=`&client=${this.client}`),this.libraries.length>0&&(e+=`&libraries=${this.libraries.join(",")}`),this.language&&(e+=`&language=${this.language}`),this.region&&(e+=`&region=${this.region}`),this.version&&(e+=`&v=${this.version}`),this.mapIds&&(e+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(e+=`&auth_referrer_policy=${this.authReferrerPolicy}`),e}deleteScript(){const e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise(((e,t)=>{this.loadCallback((i=>{i?t(i.error):e(window.google)}))}))}importLibrary(e){return this.execute(),google.maps.importLibrary(e)}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){var e,t;if(document.getElementById(this.id))return void this.callback();const i={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(i).forEach((e=>!i[e]&&delete i[e])),(null===(t=null===(e=null===window||void 0===window?void 0:window.google)||void 0===e?void 0:e.maps)||void 0===t?void 0:t.importLibrary)||(e=>{let t,i,r,s="The Google Maps JavaScript API",n="google",o="importLibrary",a="__ib__",l=document,h=window;h=h[n]||(h[n]={});const c=h.maps||(h.maps={}),u=new Set,d=new URLSearchParams,g=()=>t||(t=new Promise(((o,h)=>{return g=this,p=void 0,y=function*(){var g;for(r in yield i=l.createElement("script"),i.id=this.id,d.set("libraries",[...u]+""),e)d.set(r.replace(/[A-Z]/g,(e=>"_"+e[0].toLowerCase())),e[r]);d.set("callback",n+".maps."+a),i.src=this.url+"?"+d,c[a]=o,i.onerror=()=>t=h(Error(s+" could not load.")),i.nonce=this.nonce||(null===(g=l.querySelector("script[nonce]"))||void 0===g?void 0:g.nonce)||"",l.head.append(i)},new((f=void 0)||(f=Promise))((function(e,t){function i(e){try{s(y.next(e))}catch(e){t(e)}}function r(e){try{s(y.throw(e))}catch(e){t(e)}}function s(t){var s;t.done?e(t.value):(s=t.value,s instanceof f?s:new f((function(e){e(s)}))).then(i,r)}s((y=y.apply(g,p||[])).next())}));var g,p,f,y})));c[o]?console.warn(s+" only loads once. Ignoring:",e):c[o]=(e,...t)=>u.add(e)&&g().then((()=>c[o](e,...t)))})(i);const r=this.libraries.map((e=>this.importLibrary(e)));r.length||r.push(this.importLibrary("core")),Promise.all(r).then((()=>this.callback()),(e=>{const t=new ErrorEvent("error",{error:e});this.loadErrorCallback(t)}))}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){const e=this.errors.length*Math.pow(2,this.errors.length);console.error(`Failed to load Google Maps script, retrying in ${e} ms.`),setTimeout((()=>{this.deleteScript(),this.setScript()}),e)}else this.onerrorEvent=e,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach((e=>{e(this.onerrorEvent)})),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version)return console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."),void this.callback();this.loading||(this.loading=!0,this.setScript())}}}},1302:(e,t,i)=>{var r=i(121);e.exports=function(e,t){return r(e,t)}}}]);
//# sourceMappingURL=https://mdev.llesuorac.com/872d9a325b1c9576132523bfac3e739f6f67875f/a6e91a3e397f31ce.min.js.map
//# debugId=4a7cab80-92e2-5ff5-93ea-e6a1840e346b