3 lines
56 KiB
JavaScript
3 lines
56 KiB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).QuHuaSdk=e()}(this,(function(){"use strict";function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function e(e){for(var r=1;arguments.length>r;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?t(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function r(){r=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=Object.create((e&&e.prototype instanceof d?e:d).prototype),a=new j(n||[]);return o(i,"_invoke",{value:E(t,r,a)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var h={};function d(){}function p(){}function v(){}var y={};c(y,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(P([])));g&&g!==e&&n.call(g,a)&&(y=g);var b=v.prototype=d.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,a,s){var u=f(t[o],t,i);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return k()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=x(a,r);if(s){if(s===h)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function x(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=f(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function P(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return p.prototype=v,o(b,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:p,configurable:!0}),p.displayName=c(v,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},w(O.prototype),c(O.prototype,s,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new O(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(b),c(b,u,"Generator"),c(b,a,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=P,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(this.prev>=i.tryLoc){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(i.catchLoc>this.prev)return r(i.catchLoc,!0);if(i.finallyLoc>this.prev)return r(i.finallyLoc)}else if(s){if(i.catchLoc>this.prev)return r(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(this.prev>=o.tryLoc&&n.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.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&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function s(t){o(a,n,i,s,u,"next",t)}function u(t){o(a,n,i,s,u,"throw",t)}s(void 0)}))}}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var r=0;e.length>r;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,f(n.key),n)}}function u(t,e,r){return e&&s(t.prototype,e),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t,e,r){return(e=f(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function l(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;i.length>n;n++)0>e.indexOf(r=i[n])&&(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;i.length>n;n++)0>e.indexOf(r=i[n])&&Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function f(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}var h="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var d=function(t,e,r){return t(r={path:e,exports:{},require:function(t,e){return function(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},r.exports),r.exports}((function(t,e){t.exports=function(){function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function e(e){for(var r=1;arguments.length>r;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?t(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function r(){r=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=Object.create((e&&e.prototype instanceof h?e:h).prototype),i=new S(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return j()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=O(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=l(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,i),o}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function h(){}function d(){}function p(){}var v={};u(v,i,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(_([])));m&&m!==e&&n.call(m,i)&&(v=m);var g=p.prototype=h.prototype=Object.create(v);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function O(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,O(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=l(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function _(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return d.prototype=p,u(g,"constructor",p),u(p,"constructor",d),d.displayName=u(p,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,u(t,s,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},b(w.prototype),u(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(c(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(g),u(g,s,"Generator"),u(g,i,(function(){return this})),u(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(this.prev>=i.tryLoc){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(i.catchLoc>this.prev)return r(i.catchLoc,!0);if(i.finallyLoc>this.prev)return r(i.finallyLoc)}else if(s){if(i.catchLoc>this.prev)return r(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(this.prev>=o.tryLoc&&n.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.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&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function s(t){o(a,n,i,s,u,"next",t)}function u(t){o(a,n,i,s,u,"throw",t)}s(void 0)}))}}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var r=0;e.length>r;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function u(t,e,r){return e&&s(t.prototype,e),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function l(t,e){return v(t)||m(t,e)||g(t,e)||O()}function f(t){return v(t)||y(t)||g(t)||O()}function d(t){return p(t)||y(t)||g(t)||w()}function p(t){if(Array.isArray(t))return b(t)}function v(t){if(Array.isArray(t))return t}function y(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function m(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,s=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){s=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}}function g(t,e){if(t){if("string"==typeof t)return b(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?b(t,e):void 0}}function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);e>r;r++)n[r]=t[r];return n}function w(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function O(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function E(t,e){return function(){return t.apply(e,arguments)}}var x,S=Object.prototype.toString,_=Object.getPrototypeOf,j=(x=Object.create(null),function(t){var e=S.call(t);return x[e]||(x[e]=e.slice(8,-1).toLowerCase())}),P=function(t){return t=t.toLowerCase(),function(e){return j(e)===t}},k=function(t){return function(e){return n(e)===t}},L=Array.isArray,A=k("undefined");function R(t){return null!==t&&!A(t)&&null!==t.constructor&&!A(t.constructor)&&C(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}var T=P("ArrayBuffer");function N(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&T(t.buffer)}var F=k("string"),C=k("function"),B=k("number"),D=function(t){return null!==t&&"object"===n(t)},U=function(t){return!0===t||!1===t},I=function(t){if("object"!==j(t))return!1;var e=_(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},M=P("Date"),q=P("File"),z=P("Blob"),G=P("FileList"),H=function(t){return D(t)&&C(t.pipe)},J=function(t){var e;return t&&("function"==typeof FormData&&t instanceof FormData||C(t.append)&&("formdata"===(e=j(t))||"object"===e&&C(t.toString)&&""+t=="[object FormData]"))},W=P("URLSearchParams"),K=function(t){return t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function V(t,e){var r,o,i=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).allOwnKeys,a=void 0!==i&&i;if(null!=t)if("object"!==n(t)&&(t=[t]),L(t))for(r=0,o=t.length;o>r;r++)e.call(null,t[r],r,t);else{var s,u=a?Object.getOwnPropertyNames(t):Object.keys(t),c=u.length;for(r=0;c>r;r++)e.call(null,t[s=u[r]],s,t)}}function X(t,e){e=e.toLowerCase();for(var r,n=Object.keys(t),o=n.length;o-- >0;)if(e===(r=n[o]).toLowerCase())return r;return null}var $="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:h,Y=function(t){return!A(t)&&t!==$};function Q(){for(var t=(Y(this)&&this||{}).caseless,e={},r=function(r,n){var o=t&&X(e,n)||n;e[o]=I(e[o])&&I(r)?Q(e[o],r):I(r)?Q({},r):L(r)?r.slice():r},n=0,o=arguments.length;o>n;n++)arguments[n]&&V(arguments[n],r);return e}var Z,tt=function(t,e,r){return V(e,(function(e,n){t[n]=r&&C(e)?E(e,r):e}),{allOwnKeys:(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).allOwnKeys}),t},et=function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t},rt=function(t,e,r,n){t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},nt=function(t,e,r,n){var o,i,a,s={};if(e=e||{},null==t)return e;do{for(i=(o=Object.getOwnPropertyNames(t)).length;i-- >0;)a=o[i],n&&!n(a,t,e)||s[a]||(e[a]=t[a],s[a]=!0);t=!1!==r&&_(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},ot=function(t,e,r){t+="",(void 0===r||r>t.length)&&(r=t.length);var n=t.indexOf(e,r-=e.length);return-1!==n&&n===r},it=function(t){if(!t)return null;if(L(t))return t;var e=t.length;if(!B(e))return null;for(var r=Array(e);e-- >0;)r[e]=t[e];return r},at=(Z="undefined"!=typeof Uint8Array&&_(Uint8Array),function(t){return Z&&t instanceof Z}),st=function(t,e){for(var r,n=(t&&t[Symbol.iterator]).call(t);(r=n.next())&&!r.done;){var o=r.value;e.call(t,o[0],o[1])}},ut=function(t,e){for(var r,n=[];null!==(r=t.exec(e));)n.push(r);return n},ct=P("HTMLFormElement"),lt=function(t){return t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,r){return e.toUpperCase()+r}))},ft=function(t){var e=Object.prototype.hasOwnProperty;return function(t,r){return e.call(t,r)}}(),ht=P("RegExp"),dt=function(t,e){var r=Object.getOwnPropertyDescriptors(t),n={};V(r,(function(r,o){var i;!1!==(i=e(r,o,t))&&(n[o]=i||r)})),Object.defineProperties(t,n)},pt=function(t){dt(t,(function(e,r){if(C(t)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;C(t[r])&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=function(){throw Error("Can not rewrite read-only method '"+r+"'")}))}))},vt=function(t,e){var r={},n=function(t){t.forEach((function(t){r[t]=!0}))};return L(t)?n(t):n((t+"").split(e)),r},yt=function(){},mt=function(t,e){return Number.isFinite(t=+t)?t:e},gt="abcdefghijklmnopqrstuvwxyz",bt="0123456789",wt={DIGIT:bt,ALPHA:gt,ALPHA_DIGIT:gt+gt.toUpperCase()+bt},Ot=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:wt.ALPHA_DIGIT,r="",n=e.length;t--;)r+=e[Math.random()*n|0];return r};function Et(t){return!!(t&&C(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])}var xt=function(t){var e=[,,,,,,,,,,];return function t(r,n){if(D(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[n]=r;var o=L(r)?[]:{};return V(r,(function(e,r){var i=t(e,n+1);!A(i)&&(o[r]=i)})),e[n]=void 0,o}}return r}(t,0)},St=P("AsyncFunction"),_t=function(t){return t&&(D(t)||C(t))&&C(t.then)&&C(t.catch)},jt={isArray:L,isArrayBuffer:T,isBuffer:R,isFormData:J,isArrayBufferView:N,isString:F,isNumber:B,isBoolean:U,isObject:D,isPlainObject:I,isUndefined:A,isDate:M,isFile:q,isBlob:z,isRegExp:ht,isFunction:C,isStream:H,isURLSearchParams:W,isTypedArray:at,isFileList:G,forEach:V,merge:Q,extend:tt,trim:K,stripBOM:et,inherits:rt,toFlatObject:nt,kindOf:j,kindOfTest:P,endsWith:ot,toArray:it,forEachEntry:st,matchAll:ut,isHTMLForm:ct,hasOwnProperty:ft,hasOwnProp:ft,reduceDescriptors:dt,freezeMethods:pt,toObjectSet:vt,toCamelCase:lt,noop:yt,toFiniteNumber:mt,findKey:X,global:$,isContextDefined:Y,ALPHABET:wt,generateString:Ot,isSpecCompliantForm:Et,toJSONObject:xt,isAsyncFn:St,isThenable:_t};function Pt(t,e,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}jt.inherits(Pt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:jt.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var kt=Pt.prototype,Lt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(t){Lt[t]={value:t}})),Object.defineProperties(Pt,Lt),Object.defineProperty(kt,"isAxiosError",{value:!0}),Pt.from=function(t,e,r,n,o,i){var a=Object.create(kt);return jt.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(function(t){return"isAxiosError"!==t})),Pt.call(a,t.message,e,r,n,o),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};var At=null;function Rt(t){return jt.isPlainObject(t)||jt.isArray(t)}function Tt(t){return jt.endsWith(t,"[]")?t.slice(0,-2):t}function Nt(t,e,r){return t?t.concat(e).map((function(t,e){return t=Tt(t),!r&&e?"["+t+"]":t})).join(r?".":""):e}function Ft(t){return jt.isArray(t)&&!t.some(Rt)}var Ct=jt.toFlatObject(jt,{},null,(function(t){return/^is[A-Z]/.test(t)}));function Bt(t,e,r){if(!jt.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;var o=(r=jt.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!jt.isUndefined(e[t])}))).metaTokens,i=r.visitor||l,a=r.dots,s=r.indexes,u=(r.Blob||"undefined"!=typeof Blob&&Blob)&&jt.isSpecCompliantForm(e);if(!jt.isFunction(i))throw new TypeError("visitor must be a function");function c(t){if(null===t)return"";if(jt.isDate(t))return t.toISOString();if(!u&&jt.isBlob(t))throw new Pt("Blob is not supported. Use a Buffer instead.");return jt.isArrayBuffer(t)||jt.isTypedArray(t)?u&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function l(t,r,i){var u=t;if(t&&!i&&"object"===n(t))if(jt.endsWith(r,"{}"))r=o?r:r.slice(0,-2),t=JSON.stringify(t);else if(jt.isArray(t)&&Ft(t)||(jt.isFileList(t)||jt.endsWith(r,"[]"))&&(u=jt.toArray(t)))return r=Tt(r),u.forEach((function(t,n){!jt.isUndefined(t)&&null!==t&&e.append(!0===s?Nt([r],n,a):null===s?r:r+"[]",c(t))})),!1;return!!Rt(t)||(e.append(Nt(i,r,a),c(t)),!1)}var f=[],h=Object.assign(Ct,{defaultVisitor:l,convertValue:c,isVisitable:Rt});function d(t,r){if(!jt.isUndefined(t)){if(-1!==f.indexOf(t))throw Error("Circular reference detected in "+r.join("."));f.push(t),jt.forEach(t,(function(t,n){!0===(!(jt.isUndefined(t)||null===t)&&i.call(e,t,jt.isString(n)?n.trim():n,r,h))&&d(t,r?r.concat(n):[n])})),f.pop()}}if(!jt.isObject(t))throw new TypeError("data must be an object");return d(t),e}function Dt(t){var e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function Ut(t,e){this._pairs=[],t&&Bt(t,this,e)}var It=Ut.prototype;function Mt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function qt(t,e,r){if(!e)return t;var n,o=r&&r.encode||Mt,i=r&&r.serialize;if(n=i?i(e,r):jt.isURLSearchParams(e)?""+e:new Ut(e,r).toString(o)){var a=t.indexOf("#");-1!==a&&(t=t.slice(0,a)),t+=(-1===t.indexOf("?")?"?":"&")+n}return t}It.append=function(t,e){this._pairs.push([t,e])},It.toString=function(t){var e=t?function(e){return t.call(this,e,Dt)}:Dt;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};var zt,Gt=function(){function t(){a(this,t),this.handlers=[]}return u(t,[{key:"use",value:function(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}},{key:"eject",value:function(t){this.handlers[t]&&(this.handlers[t]=null)}},{key:"clear",value:function(){this.handlers&&(this.handlers=[])}},{key:"forEach",value:function(t){jt.forEach(this.handlers,(function(e){null!==e&&t(e)}))}}]),t}(),Ht={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Jt="undefined"!=typeof URLSearchParams?URLSearchParams:Ut,Wt="undefined"!=typeof FormData?FormData:null,Kt="undefined"!=typeof Blob?Blob:null,Vt={isBrowser:!0,classes:{URLSearchParams:Jt,FormData:Wt,Blob:Kt},protocols:["http","https","file","blob","url","data"]},Xt="undefined"!=typeof window&&"undefined"!=typeof document,$t=(zt="undefined"!=typeof navigator&&navigator.product,Xt&&0>["ReactNative","NativeScript","NS"].indexOf(zt)),Yt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Qt=e(e({},Object.freeze({__proto__:null,hasBrowserEnv:Xt,hasStandardBrowserWebWorkerEnv:Yt,hasStandardBrowserEnv:$t})),Vt);function Zt(t,e){return Bt(t,new Qt.classes.URLSearchParams,Object.assign({visitor:function(t,e,r,n){return Qt.isNode&&jt.isBuffer(t)?(this.append(e,t.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},e))}function te(t){return jt.matchAll(/\w+|\[(\w*)]/g,t).map((function(t){return"[]"===t[0]?"":t[1]||t[0]}))}function ee(t){var e,r,n={},o=Object.keys(t),i=o.length;for(e=0;i>e;e++)n[r=o[e]]=t[r];return n}function re(t){function e(t,r,n,o){var i=t[o++];if("__proto__"===i)return!0;var a=Number.isFinite(+i),s=o>=t.length;return i=!i&&jt.isArray(n)?n.length:i,s?(n[i]=jt.hasOwnProp(n,i)?[n[i],r]:r,!a):(n[i]&&jt.isObject(n[i])||(n[i]=[]),e(t,r,n[i],o)&&jt.isArray(n[i])&&(n[i]=ee(n[i])),!a)}if(jt.isFormData(t)&&jt.isFunction(t.entries)){var r={};return jt.forEachEntry(t,(function(t,n){e(te(t),n,r,0)})),r}return null}function ne(t,e,r){if(jt.isString(t))try{return(e||JSON.parse)(t),jt.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(r||JSON.stringify)(t)}var oe={transitional:Ht,adapter:["xhr","http"],transformRequest:[function(t,e){var r,n=e.getContentType()||"",o=n.indexOf("application/json")>-1,i=jt.isObject(t);if(i&&jt.isHTMLForm(t)&&(t=new FormData(t)),jt.isFormData(t))return o?JSON.stringify(re(t)):t;if(jt.isArrayBuffer(t)||jt.isBuffer(t)||jt.isStream(t)||jt.isFile(t)||jt.isBlob(t))return t;if(jt.isArrayBufferView(t))return t.buffer;if(jt.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),""+t;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return""+Zt(t,this.formSerializer);if((r=jt.isFileList(t))||n.indexOf("multipart/form-data")>-1){var a=this.env&&this.env.FormData;return Bt(r?{"files[]":t}:t,a&&new a,this.formSerializer)}}return i||o?(e.setContentType("application/json",!1),ne(t)):t}],transformResponse:[function(t){var e=this.transitional||oe.transitional,r=e&&e.forcedJSONParsing,n="json"===this.responseType;if(t&&jt.isString(t)&&(r&&!this.responseType||n)){var o=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(t){if(o){if("SyntaxError"===t.name)throw Pt.from(t,Pt.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Qt.classes.FormData,Blob:Qt.classes.Blob},validateStatus:function(t){return t>=200&&300>t},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};jt.forEach(["delete","get","head","post","put","patch"],(function(t){oe.headers[t]={}}));var ie=oe,ae=jt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),se=function(t){var e,r,n,o={};return t&&t.split("\n").forEach((function(t){n=t.indexOf(":"),e=t.substring(0,n).trim().toLowerCase(),r=t.substring(n+1).trim(),!e||o[e]&&ae[e]||("set-cookie"===e?o[e]?o[e].push(r):o[e]=[r]:o[e]=o[e]?o[e]+", "+r:r)})),o},ue=Symbol("internals");function ce(t){return t&&(t+"").trim().toLowerCase()}function le(t){return!1===t||null==t?t:jt.isArray(t)?t.map(le):t+""}function fe(t){for(var e,r=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;e=n.exec(t);)r[e[1]]=e[2];return r}var he=function(t){return/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim())};function de(t,e,r,n,o){return jt.isFunction(n)?n.call(this,e,r):(o&&(e=r),jt.isString(e)?jt.isString(n)?-1!==e.indexOf(n):jt.isRegExp(n)?n.test(e):void 0:void 0)}function pe(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(t,e,r){return e.toUpperCase()+r}))}function ve(t,e){var r=jt.toCamelCase(" "+e);["get","set","has"].forEach((function(n){Object.defineProperty(t,n+r,{value:function(t,r,o){return this[n].call(this,e,t,r,o)},configurable:!0})}))}var ye=function(t,e){function r(t){a(this,r),t&&this.set(t)}return u(r,[{key:"set",value:function(t,e,r){var n=this;function o(t,e,r){var o=ce(e);if(!o)throw Error("header name must be a non-empty string");var i=jt.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||e]=le(t))}var i=function(t,e){return jt.forEach(t,(function(t,r){return o(t,r,e)}))};return jt.isPlainObject(t)||t instanceof this.constructor?i(t,e):jt.isString(t)&&(t=t.trim())&&!he(t)?i(se(t),e):null!=t&&o(e,t,r),this}},{key:"get",value:function(t,e){if(t=ce(t)){var r=jt.findKey(this,t);if(r){var n=this[r];if(!e)return n;if(!0===e)return fe(n);if(jt.isFunction(e))return e.call(this,n,r);if(jt.isRegExp(e))return e.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}},{key:"has",value:function(t,e){if(t=ce(t)){var r=jt.findKey(this,t);return!(!r||void 0===this[r]||e&&!de(this,this[r],r,e))}return!1}},{key:"delete",value:function(t,e){var r=this,n=!1;function o(t){if(t=ce(t)){var o=jt.findKey(r,t);!o||e&&!de(r,r[o],o,e)||(delete r[o],n=!0)}}return jt.isArray(t)?t.forEach(o):o(t),n}},{key:"clear",value:function(t){for(var e=Object.keys(this),r=e.length,n=!1;r--;){var o=e[r];t&&!de(this,this[o],o,t,!0)||(delete this[o],n=!0)}return n}},{key:"normalize",value:function(t){var e=this,r={};return jt.forEach(this,(function(n,o){var i=jt.findKey(r,o);if(i)return e[i]=le(n),void delete e[o];var a=t?pe(o):(o+"").trim();a!==o&&delete e[o],e[a]=le(n),r[a]=!0})),this}},{key:"concat",value:function(){for(var t,e=arguments.length,r=Array(e),n=0;e>n;n++)r[n]=arguments[n];return(t=this.constructor).concat.apply(t,[this].concat(r))}},{key:"toJSON",value:function(t){var e=Object.create(null);return jt.forEach(this,(function(r,n){null!=r&&!1!==r&&(e[n]=t&&jt.isArray(r)?r.join(", "):r)})),e}},{key:Symbol.iterator,value:function(){return Object.entries(this.toJSON())[Symbol.iterator]()}},{key:"toString",value:function(){return Object.entries(this.toJSON()).map((function(t){var e=l(t,2);return e[0]+": "+e[1]})).join("\n")}},{key:Symbol.toStringTag,get:function(){return"AxiosHeaders"}}],[{key:"from",value:function(t){return t instanceof this?t:new this(t)}},{key:"concat",value:function(t){for(var e=new this(t),r=arguments.length,n=Array(r>1?r-1:0),o=1;r>o;o++)n[o-1]=arguments[o];return n.forEach((function(t){return e.set(t)})),e}},{key:"accessor",value:function(t){var e=(this[ue]=this[ue]={accessors:{}}).accessors,r=this.prototype;function n(t){var n=ce(t);e[n]||(ve(r,t),e[n]=!0)}return jt.isArray(t)?t.forEach(n):n(t),this}}]),r}();ye.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),jt.reduceDescriptors(ye.prototype,(function(t,e){var r=t.value,n=e[0].toUpperCase()+e.slice(1);return{get:function(){return r},set:function(t){this[n]=t}}})),jt.freezeMethods(ye);var me=ye;function ge(t,e){var r=this||ie,n=e||r,o=me.from(n.headers),i=n.data;return jt.forEach(t,(function(t){i=t.call(r,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function be(t){return!(!t||!t.__CANCEL__)}function we(t,e,r){Pt.call(this,null==t?"canceled":t,Pt.ERR_CANCELED,e,r),this.name="CanceledError"}function Oe(t,e,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?e(new Pt("Request failed with status code "+r.status,[Pt.ERR_BAD_REQUEST,Pt.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}jt.inherits(we,Pt,{__CANCEL__:!0});var Ee=Qt.hasStandardBrowserEnv?{write:function(t,e,r,n,o,i){var a=[t+"="+encodeURIComponent(e)];jt.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),jt.isString(n)&&a.push("path="+n),jt.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function xe(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Se(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function _e(t,e){return t&&!xe(e)?Se(t,e):e}var je=Qt.hasStandardBrowserEnv?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(t){var n=t;return e&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return t=n(window.location.href),function(e){var r=jt.isString(e)?n(e):e;return r.protocol===t.protocol&&r.host===t.host}}():function(){return!0};function Pe(t){var e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function ke(t,e){var r,n=Array(t=t||10),o=Array(t),i=0,a=0;return e=void 0!==e?e:1e3,function(s){var u=Date.now(),c=o[a];r||(r=u),n[i]=s,o[i]=u;for(var l=a,f=0;l!==i;)f+=n[l++],l%=t;if((i=(i+1)%t)===a&&(a=(a+1)%t),u-r>=e){var h=c&&u-c;return h?Math.round(1e3*f/h):void 0}}}function Le(t,e){var r=0,n=ke(50,250);return function(o){var i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-r,u=n(s);r=i;var c={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:u||void 0,estimated:u&&a&&a>=i?(a-i)/u:void 0,event:o};c[e?"download":"upload"]=!0,t(c)}}var Ae="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,r){var n,o,i=t.data,a=me.from(t.headers).normalize(),s=t.responseType,u=t.withXSRFToken;function c(){t.cancelToken&&t.cancelToken.unsubscribe(n),t.signal&&t.signal.removeEventListener("abort",n)}if(jt.isFormData(i))if(Qt.hasStandardBrowserEnv||Qt.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if(!1!==(o=a.getContentType())){var l=f(o?o.split(";").map((function(t){return t.trim()})).filter(Boolean):[]),h=l[0],p=l.slice(1);a.setContentType([h||"multipart/form-data"].concat(d(p)).join("; "))}var v=new XMLHttpRequest;t.auth&&a.set("Authorization","Basic "+btoa((t.auth.username||"")+":"+(t.auth.password?unescape(encodeURIComponent(t.auth.password)):"")));var y=_e(t.baseURL,t.url);function m(){if(v){var n=me.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders());Oe((function(t){e(t),c()}),(function(t){r(t),c()}),{data:s&&"text"!==s&&"json"!==s?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:n,config:t,request:v}),v=null}}if(v.open(t.method.toUpperCase(),qt(y,t.params,t.paramsSerializer),!0),v.timeout=t.timeout,"onloadend"in v?v.onloadend=m:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(m)},v.onabort=function(){v&&(r(new Pt("Request aborted",Pt.ECONNABORTED,t,v)),v=null)},v.onerror=function(){r(new Pt("Network Error",Pt.ERR_NETWORK,t,v)),v=null},v.ontimeout=function(){var e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(new Pt(e,(t.transitional||Ht).clarifyTimeoutError?Pt.ETIMEDOUT:Pt.ECONNABORTED,t,v)),v=null},Qt.hasStandardBrowserEnv&&(u&&jt.isFunction(u)&&(u=u(t)),u||!1!==u&&je(y))){var g=t.xsrfHeaderName&&t.xsrfCookieName&&Ee.read(t.xsrfCookieName);g&&a.set(t.xsrfHeaderName,g)}void 0===i&&a.setContentType(null),"setRequestHeader"in v&&jt.forEach(a.toJSON(),(function(t,e){v.setRequestHeader(e,t)})),jt.isUndefined(t.withCredentials)||(v.withCredentials=!!t.withCredentials),s&&"json"!==s&&(v.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&v.addEventListener("progress",Le(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&v.upload&&v.upload.addEventListener("progress",Le(t.onUploadProgress)),(t.cancelToken||t.signal)&&(n=function(e){v&&(r(!e||e.type?new we(null,t,v):e),v.abort(),v=null)},t.cancelToken&&t.cancelToken.subscribe(n),t.signal&&(t.signal.aborted?n():t.signal.addEventListener("abort",n)));var b=Pe(y);b&&-1===Qt.protocols.indexOf(b)?r(new Pt("Unsupported protocol "+b+":",Pt.ERR_BAD_REQUEST,t)):v.send(i||null)}))},Re={http:At,xhr:Ae};jt.forEach(Re,(function(t,e){if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));var Te=function(t){return"- ".concat(t)},Ne=function(t){return jt.isFunction(t)||null===t||!1===t},Fe={getAdapter:function(t){for(var e,r,n=(t=jt.isArray(t)?t:[t]).length,o={},i=0;n>i;i++){var a=void 0;if(r=e=t[i],!Ne(e)&&void 0===(r=Re[(a=e+"").toLowerCase()]))throw new Pt("Unknown adapter '".concat(a,"'"));if(r)break;o[a||"#"+i]=r}if(!r){var s=Object.entries(o).map((function(t){var e=l(t,2),r=e[1];return"adapter ".concat(e[0]," ")+(!1===r?"is not supported by the environment":"is not available in the build")}));throw new Pt("There is no suitable adapter to dispatch the request "+(n?s.length>1?"since :\n"+s.map(Te).join("\n"):" "+Te(s[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r},adapters:Re};function Ce(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new we(null,t)}function Be(t){return Ce(t),t.headers=me.from(t.headers),t.data=ge.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Fe.getAdapter(t.adapter||ie.adapter)(t).then((function(e){return Ce(t),e.data=ge.call(t,t.transformResponse,e),e.headers=me.from(e.headers),e}),(function(e){return be(e)||(Ce(t),e&&e.response&&(e.response.data=ge.call(t,t.transformResponse,e.response),e.response.headers=me.from(e.response.headers))),Promise.reject(e)}))}var De=function(t){return t instanceof me?t.toJSON():t};function Ue(t,e){var r={};function n(t,e,r){return jt.isPlainObject(t)&&jt.isPlainObject(e)?jt.merge.call({caseless:r},t,e):jt.isPlainObject(e)?jt.merge({},e):jt.isArray(e)?e.slice():e}function o(t,e,r){return jt.isUndefined(e)?jt.isUndefined(t)?void 0:n(void 0,t,r):n(t,e,r)}function i(t,e){if(!jt.isUndefined(e))return n(void 0,e)}function a(t,e){return jt.isUndefined(e)?jt.isUndefined(t)?void 0:n(void 0,t):n(void 0,e)}function s(r,o,i){return i in e?n(r,o):i in t?n(void 0,r):void 0}var u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:function(t,e){return o(De(t),De(e),!0)}};return jt.forEach(Object.keys(Object.assign({},t,e=e||{})),(function(n){var i=u[n]||o,a=i(t[n],e[n],n);jt.isUndefined(a)&&i!==s||(r[n]=a)})),r}var Ie="1.6.7",Me={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){Me[t]=function(r){return n(r)===t||"a"+(1>e?"n ":" ")+t}}));var qe={};function ze(t,e,r){if("object"!==n(t))throw new Pt("options must be an object",Pt.ERR_BAD_OPTION_VALUE);for(var o=Object.keys(t),i=o.length;i-- >0;){var a=o[i],s=e[a];if(s){var u=t[a],c=void 0===u||s(u,a,t);if(!0!==c)throw new Pt("option "+a+" must be "+c,Pt.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new Pt("Unknown option "+a,Pt.ERR_BAD_OPTION)}}Me.transitional=function(t,e,r){function n(t,e){return"[Axios v"+Ie+"] Transitional option '"+t+"'"+e+(r?". "+r:"")}return function(r,o,i){if(!1===t)throw new Pt(n(o," has been removed"+(e?" in "+e:"")),Pt.ERR_DEPRECATED);return e&&!qe[o]&&(qe[o]=!0,console.warn(n(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,o,i)}};var Ge={assertOptions:ze,validators:Me},He=Ge.validators,Je=function(){function t(e){a(this,t),this.defaults=e,this.interceptors={request:new Gt,response:new Gt}}return u(t,[{key:"request",value:function(){var t=i(r().mark((function t(e,n){var o,i;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this._request(e,n);case 3:return t.abrupt("return",t.sent);case 6:throw t.prev=6,t.t0=t.catch(0),t.t0 instanceof Error&&(Error.captureStackTrace?Error.captureStackTrace(o={}):o=Error(),i=o.stack?o.stack.replace(/^.+\n/,""):"",t.t0.stack?i&&!(t.t0.stack+"").endsWith(i.replace(/^.+\n.+\n/,""))&&(t.t0.stack+="\n"+i):t.t0.stack=i),t.t0;case 10:case"end":return t.stop()}}),t,this,[[0,6]])})));function e(e,r){return t.apply(this,arguments)}return e}()},{key:"_request",value:function(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{};var r=(e=Ue(this.defaults,e)).transitional,n=e.paramsSerializer,o=e.headers;void 0!==r&&Ge.assertOptions(r,{silentJSONParsing:He.transitional(He.boolean),forcedJSONParsing:He.transitional(He.boolean),clarifyTimeoutError:He.transitional(He.boolean)},!1),null!=n&&(jt.isFunction(n)?e.paramsSerializer={serialize:n}:Ge.assertOptions(n,{encode:He.function,serialize:He.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();var i=o&&jt.merge(o.common,o[e.method]);o&&jt.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete o[t]})),e.headers=me.concat(i,o);var a=[],s=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(s=s&&t.synchronous,a.unshift(t.fulfilled,t.rejected))}));var u,c=[];this.interceptors.response.forEach((function(t){c.push(t.fulfilled,t.rejected)}));var l,f=0;if(!s){var h=[Be.bind(this),void 0];for(h.unshift.apply(h,a),h.push.apply(h,c),l=h.length,u=Promise.resolve(e);l>f;)u=u.then(h[f++],h[f++]);return u}l=a.length;var d=e;for(f=0;l>f;){var p=a[f++],v=a[f++];try{d=p(d)}catch(t){v.call(this,t);break}}try{u=Be.call(this,d)}catch(t){return Promise.reject(t)}for(f=0,l=c.length;l>f;)u=u.then(c[f++],c[f++]);return u}},{key:"getUri",value:function(t){return qt(_e((t=Ue(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}]),t}();jt.forEach(["delete","get","head","options"],(function(t){Je.prototype[t]=function(e,r){return this.request(Ue(r||{},{method:t,url:e,data:(r||{}).data}))}})),jt.forEach(["post","put","patch"],(function(t){function e(e){return function(r,n,o){return this.request(Ue(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Je.prototype[t]=e(),Je.prototype[t+"Form"]=e(!0)}));var We=Je,Ke=function(){function t(e){if(a(this,t),"function"!=typeof e)throw new TypeError("executor must be a function.");var r;this.promise=new Promise((function(t){r=t}));var n=this;this.promise.then((function(t){if(n._listeners){for(var e=n._listeners.length;e-- >0;)n._listeners[e](t);n._listeners=null}})),this.promise.then=function(t){var e,r=new Promise((function(t){n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},e((function(t,e,o){n.reason||(n.reason=new we(t,e,o),r(n.reason))}))}return u(t,[{key:"throwIfRequested",value:function(){if(this.reason)throw this.reason}},{key:"subscribe",value:function(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}},{key:"unsubscribe",value:function(t){if(this._listeners){var e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}}}],[{key:"source",value:function(){var e;return{token:new t((function(t){e=t})),cancel:e}}}]),t}(),Ve=Ke;function Xe(t){return function(e){return t.apply(null,e)}}function $e(t){return jt.isObject(t)&&!0===t.isAxiosError}var Ye={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ye).forEach((function(t){var e=l(t,2);Ye[e[1]]=e[0]}));var Qe=Ye;function Ze(t){var e=new We(t),r=E(We.prototype.request,e);return jt.extend(r,We.prototype,e,{allOwnKeys:!0}),jt.extend(r,e,null,{allOwnKeys:!0}),r.create=function(e){return Ze(Ue(t,e))},r}var tr=Ze(ie);return tr.Axios=We,tr.CanceledError=we,tr.CancelToken=Ve,tr.isCancel=be,tr.VERSION=Ie,tr.toFormData=Bt,tr.AxiosError=Pt,tr.Cancel=tr.CanceledError,tr.all=function(t){return Promise.all(t)},tr.spread=Xe,tr.isAxiosError=$e,tr.mergeConfig=Ue,tr.AxiosHeaders=me,tr.formToJSON=function(t){return re(jt.isHTMLForm(t)?new FormData(t):t)},tr.getAdapter=Fe.getAdapter,tr.HttpStatusCode=Qe,tr.default=tr,tr}()})),p="SEND",v="CALLBACKSEND";window.__receiveMessage_options={};var y=u((function t(e){var r=this;a(this,t),this.onFunctions={},this.callBackFunctions={},this.iframe=void 0,this._receiveMessage=function(t){if(t.source===r.iframe.contentWindow){var e=t.data,n=e.type,o=e.callBackId,i=e.tag,a=e.values;n===p?r.onFunctions[i]&&r.onFunctions[i]({type:n,callBackId:o,tag:i,values:a}):n===v&&r.callBackFunctions[i]&&r.callBackFunctions[i]({type:n,callBackId:o,tag:i,values:a})}},this._send=function(t){r.iframe&&r.iframe.contentWindow.postMessage(t,"*")},this._callBackSendOnce=function(t,e){r._send({type:v,tag:t,values:e},"*")},this.send=function(t,e){var n=Date.now()+"_"+Math.random()+"_callback";return new Promise((function(o){r.callBackFunctions[n]=function(t){var e=t.values;r.uninstallCallBack(n),o(e)},r._send({type:p,tag:t,values:e,callBackId:n})}))},this.sendOnce=function(t,e){r._send({type:p,tag:t,values:e},"*")},this.on=function(t,e){r.onFunctions[t]=function(t){var n=t.callBackId;e&&e(t.values,(function(t){n?r._callBackSendOnce(n,t):console.error("不存在回调监听")}))}},this.once=function(t,e){r.onFunctions[t]=function(n){var o=n.callBackId,i=n.values;r.uninstallOn(t);e&&e(i,(function(t){o?r._callBackSendOnce(o,t):console.error("不存在回调监听")}))}},this.uninstallOn=function(t){delete r.onFunctions[t]},this.uninstallCallBack=function(t){delete r.callBackFunctions[t]},this.destroy=function(){var t,e,r=null===(t=window.__receiveMessage_options)||void 0===t?void 0:t._iframe,n=null===(e=window.__receiveMessage_options)||void 0===e?void 0:e._receiveMessage;if(r)try{r.remove()}catch(t){}n&&window.removeEventListener("message",n,!1),window.__receiveMessage_options={}},this.iframe=e,this.destroy(),window.__receiveMessage_options={_receiveMessage:this._receiveMessage,_iframe:this.iframe},window.addEventListener("message",this._receiveMessage,!1)})),m=["domId","ak","isProxy","prefixPath","datafeed","functionField","eventCallBack","hooks","route","_isDev","_baseUrl","whiteListProxy"],g=u((function t(o){var s=this,u=o.domId,c=o.ak,f=o.isProxy,h=void 0!==f&&f,p=o.prefixPath,v=void 0===p?"":p,g=o.datafeed,b=void 0===g?{}:g,w=o.functionField,O=void 0===w?{}:w,E=o.eventCallBack,x=o.hooks,S=void 0===x?{}:x,_=o.route,j=void 0===_?"editlayers":_,P=o._isDev,k=void 0!==P&&P,L=o._baseUrl,A=o.whiteListProxy,R=l(o,m);a(this,t),this.domId=void 0,this.ak=void 0,this.isProxy=!1,this.iframe=void 0,this.prefixPath=void 0,this.datafeed={},this.functionField={},this.config={},this.eventCallBack=void 0,this.route="editlayers",this._isDev=!1,this._baseUrl=void 0,this.whiteListProxy=void 0,this.hooks={},this.dispatch=function(){var t=i(r().mark((function t(e,n){var o;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=3;break}return console.warn("type is null"),t.abrupt("return",Promise.reject("type is null"));case 3:return t.abrupt("return",null===(o=s.postMessage)||void 0===o?void 0:o.send("onDispatch",{type:e,data:n}));case 4:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),this.destroy=function(){try{var t;null===(t=s.postMessage)||void 0===t||t.destroy()}catch(t){console.error(t)}s.iframe=null},this.setOptions=function(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s.config=e(e({},s.config),r),null===(t=s.postMessage)||void 0===t||t.sendOnce("optionsChange",r)},this._init=function(){var t=document.getElementById(s.domId);s.iframe=document.createElement("iframe"),s.postMessage=new y(s.iframe);var e={editlayers:"layers/editlayers",hotlayers:"layers/hot",allocationlayers:"layers/allocation",passports:"road/passports",privaterule:"road/privaterule",plan:"road/plan",storeroad:"road/storeroad",log:"log",dhlsearch:"dhlsearch"};s.postMessage.once("options",s._getOptions),s.postMessage.on("proxy",s._proxy),s.postMessage.on("whiteListProxy",s._whiteListProxy),s.postMessage.on("onEvent",s._onEvent),s.iframe.style="width: 100%;height: 100%;padding: 0;margin: 0;border: 0;";var r="".concat(s._baseUrl?s._baseUrl:s._isDev?"https://apitest.map.baidu.com/logisticsWeb-quhua":"https://api.map.baidu.com/logisticsWeb-quhua","/").concat(e[s.route]||e.editlayers,"?_t=").concat(Date.now());s.iframe.src="".concat(r),t.appendChild(s.iframe)},this._getOptions=function(t,r){r(e({ak:s.ak,isProxy:s.isProxy,datafeed:s.datafeed,functionField:s.functionField},s.config))},this._onEvent=function(t){try{s.eventCallBack&&s.eventCallBack(t)}catch(t){console.error(t)}},this._whiteListProxy=function(){var t=i(r().mark((function t(e,o){var i,a,u,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.newOptions._isFormData&&!(null===(i=e.newOptions)||void 0===i?void 0:i.headers["Content-Type"])&&"object"===n(e.newOptions.data)){for(u in a=e.newOptions.data,e.newOptions.data=new FormData,a)Object.hasOwnProperty.call(a,u)&&(c=a[u]).newOptions.data.append(u,c);delete e.newOptions._isFormData}if(t.prev=1,!s.whiteListProxy){t.next=7;break}return t.next=5,s.whiteListProxy(e);case 5:o({success:!0,data:t.sent.data});case 7:t.next=13;break;case 9:t.prev=9,t.t0=t.catch(1),console.error(t.t0),o({success:!1,response:{status:t.t0.status,data:null==t.t0?void 0:t.t0.data}});case 13:case"end":return t.stop()}}),t,null,[[1,9]])})));return function(e,r){return t.apply(this,arguments)}}(),this._proxy=function(t,r){var o;(function(t,r,o){var i=t.newOptions,a=r+t.url;if(o&&(a=o(a,i)),i._isFormData&&!(null==i?void 0:i.headers["Content-Type"])&&"object"===n(i.data)){var s=i.data;for(var u in i.data=new FormData,s)Object.hasOwnProperty.call(s,u)&&i.data.append(u,s[u]);delete i._isFormData}return d(e({url:a},i)).then((function(t){return{success:!0,data:t.data}}),(function(t){var e=t.response;return{success:!1,response:{status:t.response.status,data:null==e?void 0:e.data}}}))})(t,s.prefixPath,null===(o=s.hooks)||void 0===o?void 0:o.onProxyUrl).then((function(t){var e;if(null===(e=s.hooks)||void 0===e?void 0:e.onResponse){var n,o=null===(n=s.hooks)||void 0===n?void 0:n.onResponse(t);r(o)}else r(t)}))},this.domId=u,this.ak=c,this.route=j,this.isProxy=h,this.datafeed=b,this.functionField=O,this.eventCallBack=E,this.prefixPath=v,this.hooks=S,this.whiteListProxy=A,this.config=R,this._isDev=k,this._baseUrl=L,this.domId&&this._init()}));return g}));
|
|
//# sourceMappingURL=index.umd.min.js.map
|