plot.js 82 KB

1
  1. !function(t,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n(require("babel-polyfill"));else if("function"==typeof define&&define.amd)define(["babel-polyfill"],n);else{var e="object"==typeof exports?n(require("babel-polyfill")):n(t["babel-polyfill"]);for(var r in e)("object"==typeof exports?exports:t)[r]=e[r]}}(window,(function(t){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=71)}([function(t,n,e){e(61)("asyncIterator")},function(t,n,e){"use strict";var r=e(17),i=e(21),o=e(12),a=e(11),s=e(19),u=e(85).KEY,c=e(15),h=e(33),l=e(45),f=e(27),p=e(10),d=e(62),y=e(61),g=e(86),v=e(48),m=e(14),b=e(18),w=e(25),S=e(22),P=e(37),A=e(26),x=e(57),M=e(87),L=e(88),k=e(47),O=e(13),T=e(24),j=L.f,E=O.f,I=M.f,C=r.Symbol,D=r.JSON,F=D&&D.stringify,z=p("_hidden"),_=p("toPrimitive"),B={}.propertyIsEnumerable,R=h("symbol-registry"),N=h("symbols"),W=h("op-symbols"),H=Object.prototype,U="function"==typeof C&&!!k.f,$=r.QObject,q=!$||!$.prototype||!$.prototype.findChild,G=o&&c((function(){return 7!=x(E({},"a",{get:function(){return E(this,"a",{value:7}).a}})).a}))?function(t,n,e){var r=j(H,n);r&&delete H[n],E(t,n,e),r&&t!==H&&E(H,n,r)}:E,J=function(t){var n=N[t]=x(C.prototype);return n._k=t,n},V=U&&"symbol"==typeof C.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof C},K=function(t,n,e){return t===H&&K(W,n,e),m(t),n=P(n,!0),m(e),i(N,n)?(e.enumerable?(i(t,z)&&t[z][n]&&(t[z][n]=!1),e=x(e,{enumerable:A(0,!1)})):(i(t,z)||E(t,z,A(1,{})),t[z][n]=!0),G(t,n,e)):E(t,n,e)},Y=function(t,n){m(t);for(var e,r=g(n=S(n)),i=0,o=r.length;o>i;)K(t,e=r[i++],n[e]);return t},Z=function(t){var n=B.call(this,t=P(t,!0));return!(this===H&&i(N,t)&&!i(W,t))&&(!(n||!i(this,t)||!i(N,t)||i(this,z)&&this[z][t])||n)},Q=function(t,n){if(t=S(t),n=P(n,!0),t!==H||!i(N,n)||i(W,n)){var e=j(t,n);return!e||!i(N,n)||i(t,z)&&t[z][n]||(e.enumerable=!0),e}},X=function(t){for(var n,e=I(S(t)),r=[],o=0;e.length>o;)i(N,n=e[o++])||n==z||n==u||r.push(n);return r},tt=function(t){for(var n,e=t===H,r=I(e?W:S(t)),o=[],a=0;r.length>a;)!i(N,n=r[a++])||e&&!i(H,n)||o.push(N[n]);return o};U||(s((C=function(){if(this instanceof C)throw TypeError("Symbol is not a constructor!");var t=f(arguments.length>0?arguments[0]:void 0),n=function(e){this===H&&n.call(W,e),i(this,z)&&i(this[z],t)&&(this[z][t]=!1),G(this,t,A(1,e))};return o&&q&&G(H,t,{configurable:!0,set:n}),J(t)}).prototype,"toString",(function(){return this._k})),L.f=Q,O.f=K,e(63).f=M.f=X,e(32).f=Z,k.f=tt,o&&!e(34)&&s(H,"propertyIsEnumerable",Z,!0),d.f=function(t){return J(p(t))}),a(a.G+a.W+a.F*!U,{Symbol:C});for(var nt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),et=0;nt.length>et;)p(nt[et++]);for(var rt=T(p.store),it=0;rt.length>it;)y(rt[it++]);a(a.S+a.F*!U,"Symbol",{for:function(t){return i(R,t+="")?R[t]:R[t]=C(t)},keyFor:function(t){if(!V(t))throw TypeError(t+" is not a symbol!");for(var n in R)if(R[n]===t)return n},useSetter:function(){q=!0},useSimple:function(){q=!1}}),a(a.S+a.F*!U,"Object",{create:function(t,n){return void 0===n?x(t):Y(x(t),n)},defineProperty:K,defineProperties:Y,getOwnPropertyDescriptor:Q,getOwnPropertyNames:X,getOwnPropertySymbols:tt});var ot=c((function(){k.f(1)}));a(a.S+a.F*ot,"Object",{getOwnPropertySymbols:function(t){return k.f(w(t))}}),D&&a(a.S+a.F*(!U||c((function(){var t=C();return"[null]"!=F([t])||"{}"!=F({a:t})||"{}"!=F(Object(t))}))),"JSON",{stringify:function(t){for(var n,e,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(e=n=r[1],(b(n)||void 0!==t)&&!V(t))return v(n)||(n=function(t,n){if("function"==typeof e&&(n=e.call(this,t,n)),!V(n))return n}),r[1]=n,F.apply(D,r)}}),C.prototype[_]||e(20)(C.prototype,_,C.prototype.valueOf),l(C,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,n,e){var r=e(11);r(r.S,"Array",{isArray:e(48)})},function(t,n,e){var r=e(13).f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||e(12)&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(t){return""}}})},function(t,n,e){"use strict";e(72);var r=e(14),i=e(38),o=e(12),a=/./.toString,s=function(t){e(19)(RegExp.prototype,"toString",t,!0)};e(15)((function(){return"/a/b"!=a.call({source:"a",flags:"b"})}))?s((function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)})):"toString"!=a.name&&s((function(){return a.call(this)}))},function(t,n,e){var r=Date.prototype,i=r.toString,o=r.getTime;new Date(NaN)+""!="Invalid Date"&&e(19)(r,"toString",(function(){var t=o.call(this);return t==t?i.call(this):"Invalid Date"}))},function(t,n,e){"use strict";var r=e(39),i={};i[e(10)("toStringTag")]="z",i+""!="[object z]"&&e(19)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(t,n,e){"use strict";var r=e(55)(!0);e(56)(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,n=this._t,e=this._i;return e>=n.length?{value:void 0,done:!0}:(t=r(n,e),this._i+=t.length,{value:t,done:!1})}))},function(t,n,e){"use strict";var r=e(40),i=e(11),o=e(25),a=e(79),s=e(80),u=e(31),c=e(81),h=e(82);i(i.S+i.F*!e(83)((function(t){Array.from(t)})),"Array",{from:function(t){var n,e,i,l,f=o(t),p="function"==typeof this?this:Array,d=arguments.length,y=d>1?arguments[1]:void 0,g=void 0!==y,v=0,m=h(f);if(g&&(y=r(y,d>2?arguments[2]:void 0,2)),null==m||p==Array&&s(m))for(e=new p(n=u(f.length));n>v;v++)c(e,v,g?y(f[v],v):f[v]);else for(l=m.call(f),e=new p;!(i=l.next()).done;v++)c(e,v,g?a(l,y,[i.value,v],!0):i.value);return e.length=v,e}})},function(t,n,e){for(var r=e(60),i=e(24),o=e(19),a=e(17),s=e(20),u=e(30),c=e(10),h=c("iterator"),l=c("toStringTag"),f=u.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},d=i(p),y=0;y<d.length;y++){var g,v=d[y],m=p[v],b=a[v],w=b&&b.prototype;if(w&&(w[h]||s(w,h,f),w[l]||s(w,l,v),u[v]=f,m))for(g in r)w[g]||o(w,g,r[g],!0)}},function(t,n,e){var r=e(33)("wks"),i=e(27),o=e(17).Symbol,a="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))}).store=r},function(t,n,e){var r=e(17),i=e(28),o=e(20),a=e(19),s=e(40),u=function(t,n,e){var c,h,l,f,p=t&u.F,d=t&u.G,y=t&u.S,g=t&u.P,v=t&u.B,m=d?r:y?r[n]||(r[n]={}):(r[n]||{}).prototype,b=d?i:i[n]||(i[n]={}),w=b.prototype||(b.prototype={});for(c in d&&(e=n),e)l=((h=!p&&m&&void 0!==m[c])?m:e)[c],f=v&&h?s(l,r):g&&"function"==typeof l?s(Function.call,l):l,m&&a(m,c,l,t&u.U),b[c]!=l&&o(b,c,f),g&&w[c]!=l&&(w[c]=l)};r.core=i,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,n,e){t.exports=!e(15)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,n,e){var r=e(14),i=e(53),o=e(37),a=Object.defineProperty;n.f=e(12)?Object.defineProperty:function(t,n,e){if(r(t),n=o(n,!0),r(e),i)try{return a(t,n,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t}},function(t,n,e){var r=e(18);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n,e){"use strict";var r=e(11),i=e(36)(1);r(r.P+r.F*!e(49)([].map,!0),"Array",{map:function(t){return i(this,t,arguments[1])}})},function(t,n){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,e){var r=e(17),i=e(20),o=e(21),a=e(27)("src"),s=e(73),u=(""+s).split("toString");e(28).inspectSource=function(t){return s.call(t)},(t.exports=function(t,n,e,s){var c="function"==typeof e;c&&(o(e,"name")||i(e,"name",n)),t[n]!==e&&(c&&(o(e,a)||i(e,a,t[n]?""+t[n]:u.join(String(n)))),t===r?t[n]=e:s?t[n]?t[n]=e:i(t,n,e):(delete t[n],i(t,n,e)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[a]||s.call(this)}))},function(t,n,e){var r=e(13),i=e(26);t.exports=e(12)?function(t,n,e){return r.f(t,n,i(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n,e){var r=e(42),i=e(23);t.exports=function(t){return r(i(t))}},function(t,n){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,n,e){var r=e(58),i=e(44);t.exports=Object.keys||function(t){return r(t,i)}},function(t,n,e){var r=e(23);t.exports=function(t){return Object(r(t))}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n){var e=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++e+r).toString(36))}},function(t,n){var e=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=e)},function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:e)(t)}},function(t,n){t.exports={}},function(t,n,e){var r=e(29),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,n){n.f={}.propertyIsEnumerable},function(t,n,e){var r=e(28),i=e(17),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,n){return o[t]||(o[t]=void 0!==n?n:{})})("versions",[]).push({version:r.version,mode:e(34)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(t,n){t.exports=!1},function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t,n,e){var r=e(40),i=e(42),o=e(25),a=e(31),s=e(89);t.exports=function(t,n){var e=1==t,u=2==t,c=3==t,h=4==t,l=6==t,f=5==t||l,p=n||s;return function(n,s,d){for(var y,g,v=o(n),m=i(v),b=r(s,d,3),w=a(m.length),S=0,P=e?p(n,w):u?p(n,0):void 0;w>S;S++)if((f||S in m)&&(g=b(y=m[S],S,v),t))if(e)P[S]=g;else if(g)switch(t){case 3:return!0;case 5:return y;case 6:return S;case 2:P.push(y)}else if(h)return!1;return l?-1:c||h?h:P}}},function(t,n,e){var r=e(18);t.exports=function(t,n){if(!r(t))return t;var e,i;if(n&&"function"==typeof(e=t.toString)&&!r(i=e.call(t)))return i;if("function"==typeof(e=t.valueOf)&&!r(i=e.call(t)))return i;if(!n&&"function"==typeof(e=t.toString)&&!r(i=e.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,n,e){"use strict";var r=e(14);t.exports=function(){var t=r(this),n="";return t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),t.sticky&&(n+="y"),n}},function(t,n,e){var r=e(35),i=e(10)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var n,e,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=function(t,n){try{return t[n]}catch(t){}}(n=Object(t),i))?e:o?r(n):"Object"==(a=r(n))&&"function"==typeof n.callee?"Arguments":a}},function(t,n,e){var r=e(41);t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,i){return t.call(n,e,r,i)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n,e){var r=e(35);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,n,e){var r=e(33)("keys"),i=e(27);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n,e){var r=e(13).f,i=e(21),o=e(10)("toStringTag");t.exports=function(t,n,e){t&&!i(t=e?t:t.prototype,o)&&r(t,o,{configurable:!0,value:n})}},function(t,n,e){var r=e(10)("unscopables"),i=Array.prototype;null==i[r]&&e(20)(i,r,{}),t.exports=function(t){i[r][t]=!0}},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n,e){var r=e(35);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,n,e){"use strict";var r=e(15);t.exports=function(t,n){return!!t&&r((function(){n?t.call(null,(function(){}),1):t.call(null)}))}},function(t,n,e){var r=e(11);r(r.P,"Function",{bind:e(91)})},function(t,n,e){"use strict";var r,i,o=e(38),a=RegExp.prototype.exec,s=String.prototype.replace,u=a,c=(r=/a/,i=/b*/g,a.call(r,"a"),a.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),h=void 0!==/()??/.exec("")[1];(c||h)&&(u=function(t){var n,e,r,i,u=this;return h&&(e=new RegExp("^"+u.source+"$(?!\\s)",o.call(u))),c&&(n=u.lastIndex),r=a.call(u,t),c&&r&&(u.lastIndex=u.global?r.index+r[0].length:n),h&&r&&r.length>1&&s.call(r[0],e,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),t.exports=u},function(n,e){n.exports=t},function(t,n,e){t.exports=!e(12)&&!e(15)((function(){return 7!=Object.defineProperty(e(54)("div"),"a",{get:function(){return 7}}).a}))},function(t,n,e){var r=e(18),i=e(17).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,n,e){var r=e(29),i=e(23);t.exports=function(t){return function(n,e){var o,a,s=String(i(n)),u=r(e),c=s.length;return u<0||u>=c?t?"":void 0:(o=s.charCodeAt(u))<55296||o>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?t?s.charAt(u):o:t?s.slice(u,u+2):a-56320+(o-55296<<10)+65536}}},function(t,n,e){"use strict";var r=e(34),i=e(11),o=e(19),a=e(20),s=e(30),u=e(74),c=e(45),h=e(78),l=e(10)("iterator"),f=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,n,e,d,y,g,v){u(e,n,d);var m,b,w,S=function(t){if(!f&&t in M)return M[t];switch(t){case"keys":case"values":return function(){return new e(this,t)}}return function(){return new e(this,t)}},P=n+" Iterator",A="values"==y,x=!1,M=t.prototype,L=M[l]||M["@@iterator"]||y&&M[y],k=L||S(y),O=y?A?S("entries"):k:void 0,T="Array"==n&&M.entries||L;if(T&&(w=h(T.call(new t)))!==Object.prototype&&w.next&&(c(w,P,!0),r||"function"==typeof w[l]||a(w,l,p)),A&&L&&"values"!==L.name&&(x=!0,k=function(){return L.call(this)}),r&&!v||!f&&!x&&M[l]||a(M,l,k),s[n]=k,s[P]=p,y)if(m={values:A?k:S("values"),keys:g?k:S("keys"),entries:O},v)for(b in m)b in M||o(M,b,m[b]);else i(i.P+i.F*(f||x),n,m);return m}},function(t,n,e){var r=e(14),i=e(75),o=e(44),a=e(43)("IE_PROTO"),s=function(){},u=function(){var t,n=e(54)("iframe"),r=o.length;for(n.style.display="none",e(77).appendChild(n),n.src="javascript:",(t=n.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;r--;)delete u.prototype[o[r]];return u()};t.exports=Object.create||function(t,n){var e;return null!==t?(s.prototype=r(t),e=new s,s.prototype=null,e[a]=t):e=u(),void 0===n?e:i(e,n)}},function(t,n,e){var r=e(21),i=e(22),o=e(59)(!1),a=e(43)("IE_PROTO");t.exports=function(t,n){var e,s=i(t),u=0,c=[];for(e in s)e!=a&&r(s,e)&&c.push(e);for(;n.length>u;)r(s,e=n[u++])&&(~o(c,e)||c.push(e));return c}},function(t,n,e){var r=e(22),i=e(31),o=e(76);t.exports=function(t){return function(n,e,a){var s,u=r(n),c=i(u.length),h=o(a,c);if(t&&e!=e){for(;c>h;)if((s=u[h++])!=s)return!0}else for(;c>h;h++)if((t||h in u)&&u[h]===e)return t||h||0;return!t&&-1}}},function(t,n,e){"use strict";var r=e(46),i=e(84),o=e(30),a=e(22);t.exports=e(56)(Array,"Array",(function(t,n){this._t=a(t),this._i=0,this._k=n}),(function(){var t=this._t,n=this._k,e=this._i++;return!t||e>=t.length?(this._t=void 0,i(1)):i(0,"keys"==n?e:"values"==n?t[e]:[e,t[e]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,n,e){var r=e(17),i=e(28),o=e(34),a=e(62),s=e(13).f;t.exports=function(t){var n=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in n||s(n,t,{value:a.f(t)})}},function(t,n,e){n.f=e(10)},function(t,n,e){var r=e(58),i=e(44).concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,n,e){"use strict";var r=e(55)(!0);t.exports=function(t,n,e){return n+(e?r(t,n).length:1)}},function(t,n,e){"use strict";var r=e(39),i=RegExp.prototype.exec;t.exports=function(t,n){var e=t.exec;if("function"==typeof e){var o=e.call(t,n);if("object"!=typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(t,n)}},function(t,n,e){"use strict";e(96);var r=e(19),i=e(20),o=e(15),a=e(23),s=e(10),u=e(51),c=s("species"),h=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),l=function(){var t=/(?:)/,n=t.exec;t.exec=function(){return n.apply(this,arguments)};var e="ab".split(t);return 2===e.length&&"a"===e[0]&&"b"===e[1]}();t.exports=function(t,n,e){var f=s(t),p=!o((function(){var n={};return n[f]=function(){return 7},7!=""[t](n)})),d=p?!o((function(){var n=!1,e=/a/;return e.exec=function(){return n=!0,null},"split"===t&&(e.constructor={},e.constructor[c]=function(){return e}),e[f](""),!n})):void 0;if(!p||!d||"replace"===t&&!h||"split"===t&&!l){var y=/./[f],g=e(a,f,""[t],(function(t,n,e,r,i){return n.exec===u?p&&!i?{done:!0,value:y.call(n,e,r)}:{done:!0,value:t.call(e,n,r)}:{done:!1}})),v=g[0],m=g[1];r(String.prototype,t,v),i(RegExp.prototype,f,2==n?function(t,n){return m.call(t,this,n)}:function(t){return m.call(t,this)})}}},function(t,n,e){var r=e(11);r(r.S+r.F*!e(12),"Object",{defineProperty:e(13).f})},function(t,n,e){"use strict";var r=e(11),i=e(36)(6),o="findIndex",a=!0;o in[]&&Array(1)[o]((function(){a=!1})),r(r.P+r.F*a,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),e(46)(o)},function(t,n,e){"use strict";var r=e(11),i=e(36)(5),o=!0;"find"in[]&&Array(1).find((function(){o=!1})),r(r.P+r.F*o,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),e(46)("find")},function(t,n,e){var r=e(11);r(r.S+r.F,"Object",{assign:e(104)})},function(t,n,e){e(52),t.exports=e(108)},function(t,n,e){e(12)&&"g"!=/./g.flags&&e(13).f(RegExp.prototype,"flags",{configurable:!0,get:e(38)})},function(t,n,e){t.exports=e(33)("native-function-to-string",Function.toString)},function(t,n,e){"use strict";var r=e(57),i=e(26),o=e(45),a={};e(20)(a,e(10)("iterator"),(function(){return this})),t.exports=function(t,n,e){t.prototype=r(a,{next:i(1,e)}),o(t,n+" Iterator")}},function(t,n,e){var r=e(13),i=e(14),o=e(24);t.exports=e(12)?Object.defineProperties:function(t,n){i(t);for(var e,a=o(n),s=a.length,u=0;s>u;)r.f(t,e=a[u++],n[e]);return t}},function(t,n,e){var r=e(29),i=Math.max,o=Math.min;t.exports=function(t,n){return(t=r(t))<0?i(t+n,0):o(t,n)}},function(t,n,e){var r=e(17).document;t.exports=r&&r.documentElement},function(t,n,e){var r=e(21),i=e(25),o=e(43)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,n,e){var r=e(14);t.exports=function(t,n,e,i){try{return i?n(r(e)[0],e[1]):n(e)}catch(n){var o=t.return;throw void 0!==o&&r(o.call(t)),n}}},function(t,n,e){var r=e(30),i=e(10)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,n,e){"use strict";var r=e(13),i=e(26);t.exports=function(t,n,e){n in t?r.f(t,n,i(0,e)):t[n]=e}},function(t,n,e){var r=e(39),i=e(10)("iterator"),o=e(30);t.exports=e(28).getIteratorMethod=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,n,e){var r=e(10)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,n){if(!n&&!i)return!1;var e=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:e=!0}},o[r]=function(){return a},t(o)}catch(t){}return e}},function(t,n){t.exports=function(t,n){return{value:n,done:!!t}}},function(t,n,e){var r=e(27)("meta"),i=e(18),o=e(21),a=e(13).f,s=0,u=Object.isExtensible||function(){return!0},c=!e(15)((function(){return u(Object.preventExtensions({}))})),h=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},l=t.exports={KEY:r,NEED:!1,fastKey:function(t,n){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!u(t))return"F";if(!n)return"E";h(t)}return t[r].i},getWeak:function(t,n){if(!o(t,r)){if(!u(t))return!0;if(!n)return!1;h(t)}return t[r].w},onFreeze:function(t){return c&&l.NEED&&u(t)&&!o(t,r)&&h(t),t}}},function(t,n,e){var r=e(24),i=e(47),o=e(32);t.exports=function(t){var n=r(t),e=i.f;if(e)for(var a,s=e(t),u=o.f,c=0;s.length>c;)u.call(t,a=s[c++])&&n.push(a);return n}},function(t,n,e){var r=e(22),i=e(63).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(t){return a.slice()}}(t):i(r(t))}},function(t,n,e){var r=e(32),i=e(26),o=e(22),a=e(37),s=e(21),u=e(53),c=Object.getOwnPropertyDescriptor;n.f=e(12)?c:function(t,n){if(t=o(t),n=a(n,!0),u)try{return c(t,n)}catch(t){}if(s(t,n))return i(!r.f.call(t,n),t[n])}},function(t,n,e){var r=e(90);t.exports=function(t,n){return new(r(t))(n)}},function(t,n,e){var r=e(18),i=e(48),o=e(10)("species");t.exports=function(t){var n;return i(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!i(n.prototype)||(n=void 0),r(n)&&null===(n=n[o])&&(n=void 0)),void 0===n?Array:n}},function(t,n,e){"use strict";var r=e(41),i=e(18),o=e(92),a=[].slice,s={},u=function(t,n,e){if(!(n in s)){for(var r=[],i=0;i<n;i++)r[i]="a["+i+"]";s[n]=Function("F,a","return new F("+r.join(",")+")")}return s[n](t,e)};t.exports=Function.bind||function(t){var n=r(this),e=a.call(arguments,1),s=function(){var r=e.concat(a.call(arguments));return this instanceof s?u(n,r.length,r):o(n,r,t)};return i(n.prototype)&&(s.prototype=n.prototype),s}},function(t,n){t.exports=function(t,n,e){var r=void 0===e;switch(n.length){case 0:return r?t():t.call(e);case 1:return r?t(n[0]):t.call(e,n[0]);case 2:return r?t(n[0],n[1]):t.call(e,n[0],n[1]);case 3:return r?t(n[0],n[1],n[2]):t.call(e,n[0],n[1],n[2]);case 4:return r?t(n[0],n[1],n[2],n[3]):t.call(e,n[0],n[1],n[2],n[3])}return t.apply(e,n)}},function(t,n,e){"use strict";var r=e(94),i=e(14),o=e(95),a=e(64),s=e(31),u=e(65),c=e(51),h=e(15),l=Math.min,f=[].push,p="length",d=!h((function(){RegExp(4294967295,"y")}));e(66)("split",2,(function(t,n,e,h){var y;return y="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[p]||2!="ab".split(/(?:ab)*/)[p]||4!=".".split(/(.?)(.?)/)[p]||".".split(/()()/)[p]>1||"".split(/.?/)[p]?function(t,n){var i=String(this);if(void 0===t&&0===n)return[];if(!r(t))return e.call(i,t,n);for(var o,a,s,u=[],h=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),l=0,d=void 0===n?4294967295:n>>>0,y=new RegExp(t.source,h+"g");(o=c.call(y,i))&&!((a=y.lastIndex)>l&&(u.push(i.slice(l,o.index)),o[p]>1&&o.index<i[p]&&f.apply(u,o.slice(1)),s=o[0][p],l=a,u[p]>=d));)y.lastIndex===o.index&&y.lastIndex++;return l===i[p]?!s&&y.test("")||u.push(""):u.push(i.slice(l)),u[p]>d?u.slice(0,d):u}:"0".split(void 0,0)[p]?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,r){var i=t(this),o=null==e?void 0:e[n];return void 0!==o?o.call(e,i,r):y.call(String(i),e,r)},function(t,n){var r=h(y,t,this,n,y!==e);if(r.done)return r.value;var c=i(t),f=String(this),p=o(c,RegExp),g=c.unicode,v=(c.ignoreCase?"i":"")+(c.multiline?"m":"")+(c.unicode?"u":"")+(d?"y":"g"),m=new p(d?c:"^(?:"+c.source+")",v),b=void 0===n?4294967295:n>>>0;if(0===b)return[];if(0===f.length)return null===u(m,f)?[f]:[];for(var w=0,S=0,P=[];S<f.length;){m.lastIndex=d?S:0;var A,x=u(m,d?f:f.slice(S));if(null===x||(A=l(s(m.lastIndex+(d?0:S)),f.length))===w)S=a(f,S,g);else{if(P.push(f.slice(w,S)),P.length===b)return P;for(var M=1;M<=x.length-1;M++)if(P.push(x[M]),P.length===b)return P;S=w=A}}return P.push(f.slice(w)),P}]}))},function(t,n,e){var r=e(18),i=e(35),o=e(10)("match");t.exports=function(t){var n;return r(t)&&(void 0!==(n=t[o])?!!n:"RegExp"==i(t))}},function(t,n,e){var r=e(14),i=e(41),o=e(10)("species");t.exports=function(t,n){var e,a=r(t).constructor;return void 0===a||null==(e=r(a)[o])?n:i(e)}},function(t,n,e){"use strict";var r=e(51);e(11)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},function(t,n,e){"use strict";var r=e(14),i=e(25),o=e(31),a=e(29),s=e(64),u=e(65),c=Math.max,h=Math.min,l=Math.floor,f=/\$([$&`']|\d\d?|<[^>]*>)/g,p=/\$([$&`']|\d\d?)/g;e(66)("replace",2,(function(t,n,e,d){return[function(r,i){var o=t(this),a=null==r?void 0:r[n];return void 0!==a?a.call(r,o,i):e.call(String(o),r,i)},function(t,n){var i=d(e,t,this,n);if(i.done)return i.value;var l=r(t),f=String(this),p="function"==typeof n;p||(n=String(n));var g=l.global;if(g){var v=l.unicode;l.lastIndex=0}for(var m=[];;){var b=u(l,f);if(null===b)break;if(m.push(b),!g)break;""===String(b[0])&&(l.lastIndex=s(f,o(l.lastIndex),v))}for(var w,S="",P=0,A=0;A<m.length;A++){b=m[A];for(var x=String(b[0]),M=c(h(a(b.index),f.length),0),L=[],k=1;k<b.length;k++)L.push(void 0===(w=b[k])?w:String(w));var O=b.groups;if(p){var T=[x].concat(L,M,f);void 0!==O&&T.push(O);var j=String(n.apply(void 0,T))}else j=y(x,f,M,L,O,n);M>=P&&(S+=f.slice(P,M)+j,P=M+x.length)}return S+f.slice(P)}];function y(t,n,r,o,a,s){var u=r+t.length,c=o.length,h=p;return void 0!==a&&(a=i(a),h=f),e.call(s,h,(function(e,i){var s;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return n.slice(0,r);case"'":return n.slice(u);case"<":s=a[i.slice(1,-1)];break;default:var h=+i;if(0===h)return e;if(h>c){var f=l(h/10);return 0===f?e:f<=c?void 0===o[f-1]?i.charAt(1):o[f-1]+i.charAt(1):e}s=o[h-1]}return void 0===s?"":s}))}}))},function(t,n,e){"use strict";e(99)("trim",(function(t){return function(){return t(this,3)}}))},function(t,n,e){var r=e(11),i=e(23),o=e(15),a=e(100),s="["+a+"]",u=RegExp("^"+s+s+"*"),c=RegExp(s+s+"*$"),h=function(t,n,e){var i={},s=o((function(){return!!a[t]()||"​…"!="​…"[t]()})),u=i[t]=s?n(l):a[t];e&&(i[e]=u),r(r.P+r.F*s,"String",i)},l=h.trim=function(t,n){return t=String(i(t)),1&n&&(t=t.replace(u,"")),2&n&&(t=t.replace(c,"")),t};t.exports=h},function(t,n){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(t,n,e){"use strict";var r=e(11),i=e(36)(0),o=e(49)([].forEach,!0);r(r.P+r.F*!o,"Array",{forEach:function(t){return i(this,t,arguments[1])}})},function(t,n,e){var r=e(11);r(r.P,"String",{repeat:e(103)})},function(t,n,e){"use strict";var r=e(29),i=e(23);t.exports=function(t){var n=String(i(this)),e="",o=r(t);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(n+=n))1&o&&(e+=n);return e}},function(t,n,e){"use strict";var r=e(12),i=e(24),o=e(47),a=e(32),s=e(25),u=e(42),c=Object.assign;t.exports=!c||e(15)((function(){var t={},n={},e=Symbol(),r="abcdefghijklmnopqrst";return t[e]=7,r.split("").forEach((function(t){n[t]=t})),7!=c({},t)[e]||Object.keys(c({},n)).join("")!=r}))?function(t,n){for(var e=s(t),c=arguments.length,h=1,l=o.f,f=a.f;c>h;)for(var p,d=u(arguments[h++]),y=l?i(d).concat(l(d)):i(d),g=y.length,v=0;g>v;)p=y[v++],r&&!f.call(d,p)||(e[p]=d[p]);return e}:c},function(t,n,e){var r=e(11),i=e(106)(!1);r(r.S,"Object",{values:function(t){return i(t)}})},function(t,n,e){var r=e(12),i=e(24),o=e(22),a=e(32).f;t.exports=function(t){return function(n){for(var e,s=o(n),u=i(s),c=u.length,h=0,l=[];c>h;)e=u[h++],r&&!a.call(s,e)||l.push(t?[e,s[e]]:s[e]);return l}}},function(t,n,e){"use strict";var r=e(11),i=e(59)(!1),o=[].indexOf,a=!!o&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(a||!e(49)(o)),"Array",{indexOf:function(t){return a?o.apply(this,arguments)||0:i(this,t,arguments[1])}})},function(t,n,e){"use strict";e.r(n);var r={};e.r(r),e.d(r,"ARC",(function(){return E})),e.d(r,"CURVE",(function(){return I})),e.d(r,"GATHERING_PLACE",(function(){return C})),e.d(r,"POLYLINE",(function(){return D})),e.d(r,"FREELINE",(function(){return F})),e.d(r,"MARKER",(function(){return z})),e.d(r,"PENNANT",(function(){return _})),e.d(r,"RECTANGLE",(function(){return B})),e.d(r,"CIRCLE",(function(){return R})),e.d(r,"ELLIPSE",(function(){return N})),e.d(r,"LUNE",(function(){return W})),e.d(r,"SECTOR",(function(){return H})),e.d(r,"CLOSED_CURVE",(function(){return U})),e.d(r,"POLYGON",(function(){return $})),e.d(r,"FREE_POLYGON",(function(){return q})),e.d(r,"ATTACK_ARROW",(function(){return G})),e.d(r,"DOUBLE_ARROW",(function(){return J})),e.d(r,"STRAIGHT_ARROW",(function(){return V})),e.d(r,"FINE_ARROW",(function(){return K})),e.d(r,"ASSAULT_DIRECTION",(function(){return Y})),e.d(r,"TAILED_SQUAD_COMBAT",(function(){return X})),e.d(r,"TAILED_ATTACK_ARROW",(function(){return Z})),e.d(r,"SQUAD_COMBAT",(function(){return Q})),e.d(r,"RECTFLAG",(function(){return tt})),e.d(r,"TRIANGLEFLAG",(function(){return nt})),e.d(r,"CURVEFLAG",(function(){return et}));e(3),e(4),e(5),e(6),e(7),e(8),e(9),e(0),e(1),e(2),e(16),e(50),e(93),e(97),e(98),e(101);var i=Math.PI/2;Math.PI;var o=function(t,n){return Math.sqrt(Math.pow(t[0]-n[0],2)+Math.pow(t[1]-n[1],2))},a=function(t){var n=0;return t&&Array.isArray(t)&&t.length>0&&t.forEach((function(e,r){r<t.length-1&&(n+=o(e,t[r+1]))})),n},s=function(t){return Math.pow(a(t),.99)},u=function(t,n){return[(t[0]+n[0])/2,(t[1]+n[1])/2]},c=function(t,n,e){var r=[(t[0]+n[0])/2,(t[1]+n[1])/2],i=[r[0]-t[1]+n[1],r[1]+t[0]-n[0]],o=[(t[0]+e[0])/2,(t[1]+e[1])/2],a=[o[0]-t[1]+e[1],o[1]+t[0]-e[0]];return h(r,i,o,a)},h=function(t,n,e,r){if(t[1]===n[1])return[(r[0]-e[0])/(r[1]-e[1])*(t[1]-e[1])+e[0],t[1]];if(e[1]===r[1])return[(n[0]-t[0])/(n[1]-t[1])*(e[1]-t[1])+t[0],e[1]];var i=(n[0]-t[0])/(n[1]-t[1]),o=(r[0]-e[0])/(r[1]-e[1]),a=(i*t[1]-t[0]-o*e[1]+e[0])/(i-o);return[i*a-i*t[1]+t[0],a]},l=function(t,n){var e,r=Math.asin(Math.abs(n[1]-t[1])/o(t,n));return n[1]>=t[1]&&n[0]>=t[0]?e=r+Math.PI:n[1]>=t[1]&&n[0]<t[0]?e=2*Math.PI-r:n[1]<t[1]&&n[0]<t[0]?e=r:n[1]<t[1]&&n[0]>=t[0]&&(e=Math.PI-r),e},f=function(t,n,e){var r=l(n,t)-l(n,e);return r<0?r+2*Math.PI:r},p=function(t,n,e){return(e[1]-t[1])*(n[0]-t[0])>(n[1]-t[1])*(e[0]-t[0])},d=function(t,n,e,r,i){var o=1-(t=Math.max(Math.min(t,1),0)),a=t*t,s=a*t,u=o*o,c=u*o;return[c*n[0]+3*u*t*e[0]+3*o*a*r[0]+s*i[0],c*n[1]+3*u*t*e[1]+3*o*a*r[1]+s*i[1]]},y=function(t,n,e,r,i){var o=l(t,n),a=i?o+e:o-e,s=r*Math.cos(a),u=r*Math.sin(a);return[n[0]+s,n[1]+u]},g=function(t,n,e,r){var i=null,o=null,a=[],s=r-e;s=s<0?s+2*Math.PI:s;for(var u=0;u<=100;u++){var c=e+s*u/100;i=t[0]+n*Math.cos(c),o=t[1]+n*Math.sin(c),a.push([i,o])}return a},v=function(t,n,e,r){var i=m(n,e,r),a=null,s=null,u=null,c=Math.sqrt(i[0]*i[0]+i[1]*i[1]),h=i[0]/c,l=i[1]/c,f=o(n,e),d=o(e,r);return c>1e-4?p(n,e,r)?(u=t*f,a=[e[0]-u*l,e[1]+u*h],u=t*d,s=[e[0]+u*l,e[1]-u*h]):(u=t*f,a=[e[0]+u*l,e[1]-u*h],u=t*d,s=[e[0]-u*l,e[1]+u*h]):(a=[e[0]+t*(n[0]-e[0]),e[1]+t*(n[1]-e[1])],s=[e[0]+t*(r[0]-e[0]),e[1]+t*(r[1]-e[1])]),[a,s]},m=function(t,n,e){var r=t[0]-n[0],i=t[1]-n[1],o=Math.sqrt(r*r+i*i);r/=o,i/=o;var a=e[0]-n[0],s=e[1]-n[1],u=Math.sqrt(a*a+s*s);return[r+(a/=u),i+(s/=u)]},b=function(t,n){for(var e=function(t,n){var e=[t[0],t[1],t[2],null,null],r=e[0],i=e[1],a=e[2],s=e[3],c=e[4],h=v(0,r,i,a)[0],l=m(r,i,a);if(Math.sqrt(l[0]*l[0]+l[1]*l[1])>1e-4){var f=u(r,i),p=r[0]-f[0],d=r[1]-f[1],y=2/o(r,i),g=-y*d,b=y*p,w=g*g-b*b,S=2*g*b,P=b*b-g*g,A=h[0]-f[0],x=h[1]-f[1];s=f[0]+w*A+S*x,c=f[1]+S*A+P*x}else s=r[0]+n*(i[0]-r[0]),c=r[1]+n*(i[1]-r[1]);return[s,c]}(n,t),r=null,i=null,a=[e],s=[],c=0;c<n.length-2;c++){var h=[n[c],n[c+1],n[c+2]],l=v(t,r=h[0],i=h[1],h[2]);a=a.concat(l)}var f=function(t,n){var e=t.length,r=t[e-3],i=t[e-2],a=t[e-1],s=v(0,r,i,a)[1],c=m(r,i,a),h=null,l=null;if(Math.sqrt(c[0]*c[0]+c[1]*c[1])>1e-4){var f=u(i,a),p=a[0]-f[0],d=a[1]-f[1],y=2/o(i,a),g=-y*d,b=y*p,w=g*g-b*b,S=2*g*b,P=b*b-g*g,A=s[0]-f[0],x=s[1]-f[1];h=f[0]+w*A+S*x,l=f[1]+S*A+P*x}else h=a[0]+n*(i[0]-a[0]),l=a[1]+n*(i[1]-a[1]);return[h,l]}(n,t);f&&a.push(f);for(var p=0;p<n.length-1;p++){r=n[p],i=n[p+1],s.push(r);for(var y=0;y<100;y++){var g=d(y/100,r,a[2*p],a[2*p+1],i);s.push(g)}s.push(i)}return s},w=function(t){if(t.length<=2)return t;for(var n=[],e=t.length-1,r=0;r<=1;r+=.01){for(var i=0,o=0,a=0;a<=e;a++){var s=P(e,a),u=Math.pow(r,a),c=Math.pow(1-r,e-a);i+=s*u*c*t[a][0],o+=s*u*c*t[a][1]}n.push([i,o])}return n.push(t[e]),n},S=function(t){var n=1;switch(t){case t<=1:n=1;break;case 2===t:n=2;break;case 3===t:n=6;break;case 24===t:n=24;break;case 5===t:n=120;break;default:for(var e=1;e<=t;e++)n*=e}return n},P=function(t,n){return S(t)/(S(n)*S(t-n))},A=function(t){if(t.length<=2)return t;var n=[],e=t.length-2-1;n.push(t[0]);for(var r=0;r<=e;r++)for(var i=0;i<=1;i+=.05){for(var o=0,a=0,s=0;s<=2;s++){var u=x(s,i);o+=u*t[r+s][0],a+=u*t[r+s][1]}n.push([o,a])}return n.push(t[t.length-1]),n},x=function(t,n){var e=0;return 0===t?e=Math.pow(n-1,2)/2:1===t?e=(-2*Math.pow(n,2)+2*n+1)/2:2===t&&(e=Math.pow(n,2)/2),e},M=function(t){return Array.isArray(t)?Math.abs(t[0])<85&&Math.abs(t[1])<=180:Math.abs(t.lat)<85&&Math.abs(t.lng)<=180},L=function(t,n,e){n=(n+360)%360;var r=Math.PI/180,i=180/Math.PI,o=6378137,a=t.lng*r,s=t.lat*r,u=n*r,c=Math.sin(s),h=Math.cos(s),l=Math.cos(e/o),f=Math.sin(e/o),p=Math.asin(c*l+h*f*Math.cos(u)),d=a+Math.atan2(Math.sin(u)*f*h,l-c*Math.sin(p));return[p*i,d=(d*=i)>180?d-360:d<-180?d+360:d]};function k(t,n,e,r){(!r||r<=1)&&(r=1);var i=Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)),o=Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2)),a=Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2));return(i+o).toFixed(1)-a.toFixed(1)<r/10}function O(t,n,e){return e||(e=5),T(t,n)<=e}function T(t,n){return Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2))}function j(t,n,e){for(var r,i,o,a,s,u,c,h,l=n.map.project(t),f=n.map.getBounds(),p=0;p<n.absorb.length;p++)if(!e||e._bigemap_id!==n.absorb[p]._bigemap_id)switch(!0){case n.absorb[p]instanceof window.BM.Marker:if(!f.contains(n.absorb[p].getLatLng()))continue;if(O(l,n.map.project(n.absorb[p].getLatLng()),n.options.absorb.distance))return n.absorb[p].getLatLng();break;case n.absorb[p]instanceof window.BM.Polyline:case n.absorb[p]instanceof window.BM.Polygon:var d=n.absorb[p].getLatLngs();d=d.flat(1/0),n.absorb[p]instanceof window.BM.Polygon&&d.push(d[0]);for(var y=0;y<d.length;y++){if(O(l,n.map.project(d[y]),n.options.absorb.distance))return d[y];if(d[y+1]&&k(l,n.map.project(d[y]),n.map.project(d[y+1]),n.options.absorb.distance)){var g=(r=n.map,i=t,o=d[y],a=d[y+1],s=void 0,u=void 0,c=void 0,h=void 0,s=r.project(i,24),u=r.project(o,24),c=r.project(a,24),h=window.BM.LineUtil.closestPointOnSegment(s,u,c),r.unproject(h,24));return T(l,n.map.project(g))<=n.options.absorb.distance&&g}}}return!1}var E="arc",I="curve",C="gatheringPlace",D="polyline",F="freeLine",z="marker",_="pennant",B="rectangle",R="circle",N="ellipse",W="lune",H="sector",U="closedCurve",$="polygon",q="freePolygon",G="attackArrow",J="doubleArrow",V="straightArrow",K="fineArrow",Y="assaultDirection",Z="tailedAttackArrow",Q="squadCombat",X="tailedSquadCombat",tt="rectFlag",nt="triangleFlag",et="curveFlag";function rt(t){return function(t){if(Array.isArray(t))return it(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return it(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return it(t,n)}(t)||function(){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 it(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var ot=window.BM.Polygon.extend({getType:function(){return C},initialize:function(t,n){this.maxSize=3,this.minSize=2,this.t=.4,this.drawData={path:rt(t)},this.fixPointCount=3,window.BM.Polygon.prototype.initialize.apply(this,arguments),this.generate(t)},addPath:function(t){this.drawData.path.push(t),this.generate()},setPath:function(t){this.drawData.path=t,this.generate()},getPath:function(){return this.drawData.path},generate:function(t){var n=t||rt(this.drawData.path);if(!(n.length<this.minSize)){if(2===n.length){var e=u(n[0],n[1]),r=o(n[0],e)/.9,a=y(n[0],e,i,r,!0);n=[n[0],a,n[1]]}var s=u(n[0],n[2]);n.push(s,n[0],n[1]);for(var c=[],h=void 0,l=void 0,f=void 0,p=[],g=0;g<n.length-2;g++){h=n[g],l=n[g+1],f=n[g+2];var m=v(this.t,h,l,f);c=c.concat(m)}var b=c.length;c=[c[b-1]].concat(c.slice(0,b-1));for(var w=0;w<n.length-2;w++){h=n[w],l=n[w+1],p.push(h);for(var S=0;S<=100;S++){var P=d(S/100,h,c[2*w],c[2*w+1],l);p.push(P)}p.push(l)}this.setLatLngs(p)}},end:function(){}}),at=window.BM.Marker.include({minSize:1,maxSize:1,getType:function(){return z},addPath:function(t){this.setLatLng(t)},setPath:function(t){this.setLatLng(t)},getPath:function(){return this.getLatLng()},generate:function(t){t=t||this.drawData.path,this.setLatLng(t)}}),st=window.BM.Polyline.include({minSize:2,getType:function(){return D},setPath:function(t){this.setLatLngs(t)},getPath:function(){return this.getLatLngs().map((function(t){return[t.lat,t.lng]}))},generate:function(t){t=t||this.getLatLngs(),this.setLatLngs(t)},end:function(){}});function ut(t){return function(t){if(Array.isArray(t))return ct(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return ct(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return ct(t,n)}(t)||function(){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 ct(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var ht=window.BM.Polyline.extend({getType:function(){return I},initialize:function(t,n){this.minSize=2,this.t=.3,this.drawData={path:ut(t)},this.fixPointCount=3,window.BM.Polyline.prototype.initialize.apply(this,arguments),this.generate(t)},addPath:function(t){this.drawData.path.push(t),this.generate()},setPath:function(t){this.drawData.path=t,this.generate()},getPath:function(){return this.drawData.path},generate:function(t){var n=t||ut(this.drawData.path);if(!(n.length<this.minSize))if(2===n.length)this.setLatLngs(n);else{var e=b(this.t,n);this.setLatLngs(e)}},end:function(){}}),lt=window.BM.Circle.include({minSize:2,maxSize:2,getType:function(){return R},setPath:function(t){this.generate(t)},getPath:function(){return[this.getLatLng().lat,this.getLatLng().lng]},generate:function(t){if(!(t.length<this.minSize)){var n=window.BM.latLng(t[0][0],t[0][1]).distanceTo(t[1]);this.setRadius(n),this.setLatLng(t[0])}},end:function(){}}),ft=st.extend({minSize:2,getType:function(){return F},setPath:function(t){this.setLatLngs(t)},getPath:function(){return this.getLatLngs().map((function(t){return[t.lat,t.lng]}))},generate:function(t){t=t||this.getLatLngs(),this.setLatLngs(t)},end:function(){}}),pt=window.BM.Polygon.extend({minSize:3,getType:function(){return q},setPath:function(t){this.setLatLngs(t)},getPath:function(){return this.getLatLngs()[0].map((function(t){return[t.lat,t.lng]}))},generate:function(t){t=t||this.getLatLngs(),this.setLatLngs(t)},end:function(){}}),dt=window.BM.Rectangle.include({minSize:2,maxSize:2,getType:function(){return B},setPath:function(t){this.generate(t)},getPath:function(){var t=this.getBounds();return[[t.getSouthWest().lat,t.getSouthWest().lng],[t.getNorthEast().lat,t.getNorthEast().lng]]},generate:function(t){if(!(t.length<this.minSize)){var n=window.BM.latLngBounds([Math.min(t[0][0],t[1][0]),Math.min(t[1][1],t[0][1])],[Math.max(t[0][0],t[1][0]),Math.max(t[1][1],t[0][1])]);this.setBounds(n)}},end:function(){}});function yt(t){return function(t){if(Array.isArray(t))return gt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return gt(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return gt(t,n)}(t)||function(){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 gt(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var vt=window.BM.Polyline.extend({getType:function(){return E},initialize:function(t,n){this.maxSize=3,this.minSize=2,this.t=.4,this.drawData={path:yt(t)},this.fixPointCount=3,window.BM.Polyline.prototype.initialize.apply(this,arguments),this.generate(t)},addPath:function(t){this.drawData.path.push(t),this.generate()},setPath:function(t){this.drawData.path=t,this.generate()},getPath:function(){return this.drawData.path},generate:function(t){var n=t||yt(this.drawData.path);if(!(n.length<this.minSize))if(2!==n.length){var e=[n[0],n[1],n[2],null,null],r=e[0],i=e[1],a=e[2],s=e[3],u=e[4],h=c(r,i,a),f=o(r,h),d=l(r,h),y=l(i,h);p(r,i,a)?(s=y,u=d):(s=d,u=y),this.setLatLngs(g(h,f,s,u))}else this.setLatLngs(n)},end:function(){}});function mt(t){return function(t){if(Array.isArray(t))return bt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return bt(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return bt(t,n)}(t)||function(){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 bt(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var wt=window.BM.Polygon.extend({getType:function(){return W},initialize:function(t,n){this.maxSize=3,this.minSize=2,this.t=.4,this.drawData={path:mt(t)},this.fixPointCount=3,window.BM.Polygon.prototype.initialize.apply(this,arguments),this.generate(t)},addPath:function(t){this.drawData.path.push(t),this.generate()},setPath:function(t){this.drawData.path=t,this.generate()},getPath:function(){return this.drawData.path},generate:function(t){var n=t||mt(this.drawData.path);if(!(n.length<this.minSize))if(2!==n.length){var e=[n[0],n[1],n[2],null,null],r=e[0],i=e[1],a=e[2],s=e[3],u=e[4],h=c(r,i,a),f=o(r,h),d=l(r,h),y=l(i,h);p(r,i,a)?(s=y,u=d):(s=d,u=y),this.setLatLngs(g(h,f,s,u))}else this.setLatLngs(n)},end:function(){}});function St(t){return function(t){if(Array.isArray(t))return Pt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return Pt(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return Pt(t,n)}(t)||function(){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 Pt(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var At=window.BM.Polygon.extend({getType:function(){return N},initialize:function(t,n){this.maxSize=2,this.minSize=2,this.t=.4,this.drawData={path:St(t)},this.fixPointCount=3,window.BM.Polygon.prototype.initialize.apply(this,arguments),this.generate(t)},addPath:function(t){this.drawData.path.push(t),this.generate()},setPath:function(t){this.drawData.path=t,this.generate()},getPath:function(){return this.drawData.path},generate:function(t){var n=t||St(this.drawData.path);if(!(n.length<this.minSize)){var e=[n[0],n[1]],r=e[0],i=e[1],o=u(r,i),a=Math.abs((r[0]-i[0])/2),s=Math.abs((r[1]-i[1])/2),c=this.generatePoints(o,a,s);this.setLatLngs([c])}},generatePoints:function(t,n,e){for(var r=null,i=null,o=null,a=[],s=0;s<=100;s++)o=2*Math.PI*s/100,r=t[0]+n*Math.cos(o),i=t[1]+e*Math.sin(o),a.push([r,i]);return a},end:function(){}});function xt(t){return function(t){if(Array.isArray(t))return Mt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return Mt(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return Mt(t,n)}(t)||function(){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 Mt(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var Lt=window.BM.Polygon.extend({getType:function(){return H},initialize:function(t,n){this.maxSize=3,this.minSize=2,this.t=.4,this.drawData={path:xt(t)},this.fixPointCount=3,window.BM.Polygon.prototype.initialize.apply(this,arguments),this.generate(t)},addPath:function(t){this.drawData.path.push(t),this.generate()},setPath:function(t){this.drawData.path=t,this.generate()},getPath:function(){return this.drawData.path},generate:function(t){var n=t||xt(this.drawData.path);if(!(n.length<this.minSize))if(2!==n.length){var e=[n[0],n[1],n[2]],r=e[0],i=e[1],a=e[2],s=o(i,r),u=l(i,r),c=l(a,r),h=g(r,s,u,c);h.push(r,h[0]),this.setLatLngs([h])}else this.setLatLngs(n)},end:function(){}});function kt(t){return function(t){if(Array.isArray(t))return Ot(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return Ot(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return Ot(t,n)}(t)||function(){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 Ot(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var Tt=window.BM.Polygon.extend({getType:function(){return U},initialize:function(t,n){this.minSize=2,this.t=.3,this.drawData={path:kt(t)},this.fixPointCount=3,window.BM.Polygon.prototype.initialize.apply(this,arguments),this.generate(t)},addPath:function(t){this.drawData.path.push(t),this.generate()},setPath:function(t){this.drawData.path=t,this.generate()},getPath:function(){return this.drawData.path},generate:function(t){var n=t||kt(this.drawData.path);if(!(n.length<this.minSize))if(2===n.length)this.setLatLngs(n);else{n.push(n[0],n[1]);for(var e=[],r=[],i=0;i<n.length-2;i++){var o=v(this.t,n[i],n[i+1],n[i+2]);e=e.concat(o)}var a=e.length;e=[e[a-1]].concat(e.slice(0,a-1));for(var s=0;s<n.length-2;s++){var u=n[s],c=n[s+1];r.push(u);for(var h=0;h<=100;h++){var l=d(h/100,u,e[2*s],e[2*s+1],c);r.push(l)}r.push(c)}this.setLatLngs([r])}},end:function(){}}),jt=window.BM.Polygon.include({minSize:3,getType:function(){return $},setPath:function(t){this.setLatLngs(t)},getPath:function(){return this.getLatLngs()[0].map((function(t){return[t.lat,t.lng]}))},generate:function(t){t=t||this.getLatLngs(),this.setLatLngs(t)},end:function(){}});function Et(t){return function(t){if(Array.isArray(t))return It(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return It(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return It(t,n)}(t)||function(){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 It(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var Ct=window.BM.Polygon.extend({getType:function(){return J},initialize:function(t,n){this.maxSize=4,this.minSize=2,this.t=.4,this.headHeightFactor=.25,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.fixPointCount=4,this.drawData={path:Et(t)},window.BM.Polygon.prototype.initialize.apply(this,arguments),this.generate(t)},addPath:function(t){this.drawData.path.push(t),this.generate()},setPath:function(t){this.drawData.path=t,this.generate()},getPath:function(){return this.drawData.path},generate:function(t){var n=t||Et(this.drawData.path);if(!(n.length<this.minSize)){var e=n.length;if(2!==e){if(e>2){var r=[n[0],n[1],n[2]],i=r[0],o=r[1],a=r[2];3===e?(this.tempPoint4=this.getTempPoint4(i,o,a),this.connPoint=u(i,o)):4===e?(this.tempPoint4=n[3],this.connPoint=u(i,o)):(this.tempPoint4=n[3],this.connPoint=n[4]);var s=void 0,c=void 0;p(i,o,a)?(s=this.getArrowPoints(i,this.connPoint,this.tempPoint4,!1),c=this.getArrowPoints(this.connPoint,o,a,!0)):(s=this.getArrowPoints(o,this.connPoint,a,!1),c=this.getArrowPoints(this.connPoint,i,this.tempPoint4,!0));var h=s.length,l=(h-5)/2,f=s.slice(0,l),d=s.slice(l,l+5),y=s.slice(l+5,h),g=c.slice(0,l),v=c.slice(l,l+5),m=c.slice(l+5,h);g=w(g);var b=w(m.concat(f.slice(1)));y=w(y);var S=g.concat(v,b,d,y);this.setLatLngs([S])}}else this.setLatLngs(n)}},getTempPoint4:function(t,n,e){try{var r=u(t,n),a=o(r,e),s=f(t,r,e),c=void 0,h=void 0,l=void 0,p=void 0;return s<i?(h=a*Math.sin(s),l=a*Math.cos(s),p=y(t,r,i,h,!1),c=y(r,p,i,l,!0)):s>=i&&s<Math.PI?(h=a*Math.sin(Math.PI-s),l=a*Math.cos(Math.PI-s),p=y(t,r,i,h,!1),c=y(r,p,i,l,!1)):s>=Math.PI&&s<1.5*Math.PI?(h=a*Math.sin(s-Math.PI),l=a*Math.cos(s-Math.PI),p=y(t,r,i,h,!0),c=y(r,p,i,l,!0)):(h=a*Math.sin(2*Math.PI-s),l=a*Math.cos(2*Math.PI-s),p=y(t,r,i,h,!0),c=y(r,p,i,l,!1)),c}catch(t){console.log(t)}},getArrowPoints:function(t,n,e,r){var a=u(t,n),c=o(a,e),h=y(e,a,0,.3*c,!0),l=y(e,a,0,.5*c,!0),f=[a,h=y(a,h,i,c/5,r),l=y(a,l,i,c/4,r),e],p=this.getArrowHeadPoints(f);if(!(p&&Array.isArray(p)&&p.length>0))throw new Error("插值出错");var d=[p[0],p[4]],g=d[0],v=d[1],m=o(t,n)/s(f)/2,b=this.getArrowBodyPoints(f,g,v,m);if(b){var w=b.length,S=b.slice(0,w/2),P=b.slice(w/2,w);return S.push(g),P.push(v),(S=S.reverse()).push(n),(P=P.reverse()).push(t),S.reverse().concat(p,P)}},getArrowHeadPoints:function(t){try{var n=s(t)*this.headHeightFactor,e=t[t.length-1],r=n*this.headWidthFactor,o=n*this.neckWidthFactor,a=n*this.neckHeightFactor,u=y(t[t.length-2],e,0,n,!0),c=y(t[t.length-2],e,0,a,!0),h=y(e,u,i,r,!1),l=y(e,u,i,r,!0);return[y(e,c,i,o,!1),h,e,l,y(e,c,i,o,!0)]}catch(t){console.log(t)}},getArrowBodyPoints:function(t,n,e,r){for(var i=a(t),u=s(t)*r,c=(u-o(n,e))/2,h=0,l=[],p=[],d=1;d<t.length-1;d++){var g=f(t[d-1],t[d],t[d+1])/2,v=(u/2-(h+=o(t[d-1],t[d]))/i*c)/Math.sin(g),m=y(t[d-1],t[d],Math.PI-g,v,!0),b=y(t[d-1],t[d],g,v,!1);l.push(m),p.push(b)}return l.concat(p)},end:function(){}});function Dt(t){return function(t){if(Array.isArray(t))return Ft(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return Ft(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return Ft(t,n)}(t)||function(){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 Ft(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var zt=window.BM.Polyline.extend({getType:function(){return V},initialize:function(t,n){this.maxSize=2,this.minSize=2,this.maxArrowLength=3e6,this.arrowLengthScale=5,this.t=.4,this.drawData={path:Dt(t)},this.fixPointCount=2,window.BM.Polyline.prototype.initialize.apply(this,arguments),this.generate(t)},addPath:function(t){this.drawData.path.push(t),this.generate()},setPath:function(t){this.drawData.path=t,this.generate()},getPath:function(){return this.drawData.path},generate:function(t){var n=t||Dt(this.drawData.path);if(!(n.length<this.minSize)&&2===n.length){var e=[n[0],n[1]],r=e[0],i=e[1],a=o(r,i)/this.arrowLengthScale;a=a>this.maxArrowLength?this.maxArrowLength:a;var s=y(r,i,Math.PI/6,a,!1),u=y(r,i,Math.PI/6,a,!0);this.setLatLngs([r,i,s,i,u])}},end:function(){}});function _t(t){return function(t){if(Array.isArray(t))return Bt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return Bt(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return Bt(t,n)}(t)||function(){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 Bt(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var Rt=window.BM.Polygon.extend({getType:function(){return K},initialize:function(t,n){this.maxSize=2,this.minSize=2,this.tailWidthFactor=.1,this.neckWidthFactor=.2,this.headWidthFactor=.25,this.headAngle=Math.PI/8.5,this.neckAngle=Math.PI/13,this.fixPointCount=2,this.drawData={path:_t(t)},window.BM.Polygon.prototype.initialize.apply(this,arguments),this.generate(t)},addPath:function(t){this.drawData.path.push(t),this.generate()},setPath:function(t){this.drawData.path=t,this.generate()},getPath:function(){return this.drawData.path},generate:function(t){var n=t||_t(this.drawData.path);if(!(n.length<this.minSize)&&2===n.length){var e=[n[0],n[1]],r=e[0],o=e[1],a=s(n),u=a*this.tailWidthFactor,c=a*this.neckWidthFactor,h=a*this.headWidthFactor,l=y(o,r,i,u,!0),f=y(o,r,i,u,!1),p=y(r,o,this.headAngle,h,!1),d=y(r,o,this.headAngle,h,!0),g=[l,y(r,o,this.neckAngle,c,!1),p,o,d,y(r,o,this.neckAngle,c,!0),f];this.setLatLngs([g])}},end:function(){}});function Nt(t){return function(t){if(Array.isArray(t))return Wt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return Wt(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return Wt(t,n)}(t)||function(){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 Wt(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var Ht=window.BM.Polygon.extend({getType:function(){return G},initialize:function(t,n){this.minSize=2,this.headHeightFactor=.18,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.headTailFactor=.8,this.drawData={path:Nt(t)},window.BM.Polygon.prototype.initialize.apply(this,arguments),this.generate(t)},addPath:function(t){this.drawData.path.push(t),this.generate()},setPath:function(t){this.drawData.path=t,this.generate()},getPath:function(){return this.drawData.path},generate:function(t){var n=t||Nt(this.drawData.path);if(!(n.length<this.minSize))if(2!==n.length){var e=[n[0],n[1]],r=e[0],i=e[1];p(n[0],n[1],n[2])&&(r=n[1],i=n[0]);var a=[u(r,i)].concat(n.slice(2)),c=this.getArrowHeadPoints(a,r,i),h=[c[0],c[4]],l=h[0],f=h[1],d=o(r,i)/s(a),y=this.getArrowBodyPoints(a,l,f,d),g=y.length,v=[r].concat(y.slice(0,g/2));v.push(l);var m=[i].concat(y.slice(g/2,g));m.push(f),v=A(v),m=A(m),this.setLatLngs([v.concat(c,m.reverse())])}else this.setLatLngs(n)},getArrowHeadPoints:function(t,n,e){try{var r=s(t),a=r*this.headHeightFactor,u=t[t.length-1];r=o(u,t[t.length-2]);var c=o(n,e);a>c*this.headTailFactor&&(a=c*this.headTailFactor);var h=a*this.headWidthFactor,l=a*this.neckWidthFactor,f=(a=a>r?r:a)*this.neckHeightFactor,p=y(t[t.length-2],u,0,a,!0),d=y(t[t.length-2],u,0,f,!0),g=y(u,p,i,h,!1),v=y(u,p,i,h,!0);return[y(u,d,i,l,!1),g,u,v,y(u,d,i,l,!0)]}catch(t){console.log(t)}},getArrowBodyPoints:function(t,n,e,r){for(var i=a(t),u=s(t)*r,c=(u-o(n,e))/2,h=0,l=[],p=[],d=1;d<t.length-1;d++){var g=f(t[d-1],t[d],t[d+1])/2,v=(u/2-(h+=o(t[d-1],t[d]))/i*c)/Math.sin(g),m=y(t[d-1],t[d],Math.PI-g,v,!0),b=y(t[d-1],t[d],g,v,!1);l.push(m),p.push(b)}return l.concat(p)},end:function(){}}),Ut=Rt.extend({getType:function(){return Y},initialize:function(t,n){Rt.prototype.initialize.apply(this,arguments),this.tailWidthFactor=.05,this.neckWidthFactor=.1,this.headWidthFactor=.15,this.headAngle=Math.PI/4,this.neckAngle=.17741*Math.PI}});function $t(t){return function(t){if(Array.isArray(t))return qt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return qt(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return qt(t,n)}(t)||function(){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 qt(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var Gt=Ht.extend({getType:function(){return Z},initialize:function(t,n){this.headHeightFactor=.18,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.tailWidthFactor=.1,this.headTailFactor=.8,this.swallowTailFactor=1,this.swallowTailPnt=null,Ht.prototype.initialize.apply(this,arguments),this.generate(t)},generate:function(t){var n=t||$t(this.drawData.path);if(!(n.length<this.minSize))if(2!==n.length){var e=[n[0],n[1]],r=e[0],i=e[1];p(n[0],n[1],n[2])&&(r=n[1],i=n[0]);var a=[u(r,i)].concat(n.slice(2)),c=this.getArrowHeadPoints(a,r,i),h=[c[0],c[4]],l=h[0],f=h[1],d=o(r,i),g=s(a),v=g*this.tailWidthFactor*this.swallowTailFactor;this.swallowTailPnt=y(a[1],a[0],0,v,!0);var m=d/g,b=this.getArrowBodyPoints(a,l,f,m),w=b.length,S=[r].concat(b.slice(0,w/2));S.push(l);var P=[i].concat(b.slice(w/2,w));P.push(f),S=A(S),P=A(P),this.setLatLngs([S.concat(c,P.reverse(),[this.swallowTailPnt,S[0]])])}else this.setLatLngs(n)},end:function(){}});function Jt(t){return function(t){if(Array.isArray(t))return Vt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return Vt(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return Vt(t,n)}(t)||function(){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 Vt(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var Kt=Ht.extend({getType:function(){return Q},initialize:function(t,n){this.headHeightFactor=.18,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.tailWidthFactor=.1,Ht.prototype.initialize.apply(this,arguments),this.generate(t)},generate:function(t){var n=t||Jt(this.drawData.path);if(!(n.length<this.minSize)){var e=this.getTailPoints(n),r=this.getArrowHeadPoints(n,e[0],e[1]),i=r[0],o=r[4],a=this.getArrowBodyPoints(n,i,o,this.tailWidthFactor),s=a.length,u=[e[0]].concat(a.slice(0,s/2));u.push(i);var c=[e[1]].concat(a.slice(s/2,s));c.push(o),u=A(u),c=A(c),this.setLatLngs([u.concat(r,c.reverse())])}},getTailPoints:function(t){var n=s(t)*this.tailWidthFactor;return[y(t[1],t[0],i,n,!1),y(t[1],t[0],i,n,!0)]},end:function(){}});function Yt(t){return function(t){if(Array.isArray(t))return Zt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return Zt(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return Zt(t,n)}(t)||function(){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 Zt(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var Qt=Ht.extend({getType:function(){return X},initialize:function(t,n){this.headHeightFactor=.18,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.tailWidthFactor=.1,this.swallowTailFactor=1,this.swallowTailPnt=null,this.fixPointCount=2,Ht.prototype.initialize.apply(this,arguments),this.generate(t)},generate:function(t){var n=t||Yt(this.drawData.path);if(!(n.length<this.minSize)){var e=this.getTailPoints(n),r=this.getArrowHeadPoints(n,e[0],e[2]),i=r[0],o=r[4],a=this.getArrowBodyPoints(n,i,o,this.tailWidthFactor),s=a.length,u=[e[0]].concat(a.slice(0,s/2));u.push(i);var c=[e[2]].concat(a.slice(s/2,s));c.push(o),u=A(u),c=A(c),this.setLatLngs([u.concat(r,c.reverse(),[e[1],u[0]])])}},getTailPoints:function(t){var n=s(t)*this.tailWidthFactor,e=y(t[1],t[0],i,n,!1),r=y(t[1],t[0],i,n,!0),o=n*this.swallowTailFactor;return[e,y(t[1],t[0],0,o,!0),r]},end:function(){}});function Xt(t){return function(t){if(Array.isArray(t))return tn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return tn(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return tn(t,n)}(t)||function(){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 tn(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var nn=window.BM.Polygon.extend({getType:function(){return tt},initialize:function(t,n){this.maxSize=2,this.minSize=2,this.fixPointCount=2,this.drawData={path:Xt(t)},window.BM.Polygon.prototype.initialize.apply(this,arguments),this.generate(t)},addPath:function(t){this.drawData.path.push(t),this.generate()},setPath:function(t){this.drawData.path=t,this.generate()},getPath:function(){return this.drawData.path},generate:function(t){var n=t||Xt(this.drawData.path);if(!(n.length<this.minSize)){var e=(n=(n=JSON.parse(JSON.stringify(n))).map((function(t){return t.reverse()})))[0],r=n[n.length-1],i=[r[0],e[1]],o=[r[0],(e[1]+r[1])/2],a=[e[0],(e[1]+r[1])/2],s=[e[0],r[1]];this.setLatLngs([e,i,o,a,s].map((function(t){return t.reverse()})))}},end:function(){}});function en(t){return function(t){if(Array.isArray(t))return rn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return rn(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return rn(t,n)}(t)||function(){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 rn(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var on=window.BM.Polygon.extend({getType:function(){return et},initialize:function(t,n){this.maxSize=2,this.minSize=2,this.fixPointCount=2,this.drawData={path:en(t)},window.BM.Polygon.prototype.initialize.apply(this,arguments),this.generate(t)},addPath:function(t){this.drawData.path.push(t),this.generate()},setPath:function(t){this.drawData.path=t,this.generate()},getPath:function(){return this.drawData.path},generate:function(t){var n=t||en(this.drawData.path);if(!(n.length<this.minSize)){var e=[],r=(n=(n=JSON.parse(JSON.stringify(n))).map((function(t){return t.reverse()})))[0],i=n[n.length-1],o=r,a=[(i[0]-r[0])/4+r[0],(i[1]-r[1])/8+r[1]],s=[(r[0]+i[0])/2,r[1]],u=[3*(i[0]-r[0])/4+r[0],-(i[1]-r[1])/8+r[1]],c=[i[0],r[1]],h=[i[0],(r[1]+i[1])/2],l=[3*(i[0]-r[0])/4+r[0],3*(i[1]-r[1])/8+r[1]],f=[(r[0]+i[0])/2,(r[1]+i[1])/2],p=[(i[0]-r[0])/4+r[0],5*(i[1]-r[1])/8+r[1]],d=[r[0],(r[1]+i[1])/2],y=[r[0],i[1]],g=w([o,a,s,u,c]),v=w([h,l,f,p,d]);(e=g.concat(v)).push(y),this.setLatLngs(e.map((function(t){return t.reverse()})))}},end:function(){}});function an(t){return function(t){if(Array.isArray(t))return sn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return sn(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return sn(t,n)}(t)||function(){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 sn(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var un=window.BM.Polygon.extend({getType:function(){return nt},initialize:function(t,n){this.maxSize=2,this.minSize=2,this.drawData={path:an(t)},window.BM.Polygon.prototype.initialize.apply(this,arguments),this.generate(t)},addPath:function(t){this.drawData.path.push(t),this.generate()},setPath:function(t){this.drawData.path=t,this.generate()},getPath:function(){return this.drawData.path},generate:function(t){var n=t||an(this.drawData.path);if(!(n.length<this.minSize)){var e=(n=(n=JSON.parse(JSON.stringify(n))).map((function(t){return t.reverse()})))[0],r=n[n.length-1],i=[r[0],(e[1]+r[1])/2],o=[e[0],(e[1]+r[1])/2],a=[e[0],r[1]];this.setLatLngs([e,i,o,a].map((function(t){return t.reverse()})))}},end:function(){}});e(67),e(102),e(68),e(69),e(70);function cn(t){return function(t){if(Array.isArray(t))return hn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return hn(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return hn(t,n)}(t)||function(){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 hn(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function ln(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var fn=function(){function t(n,e){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this.listeners={},this.map=n,this.options=Object.assign({},{repeat:!0},e),this.options.absorb=Object.assign({},{distance:2,marker:window.BM.circleMarker([0,0],{radius:6,weight:1,fillOpacity:1,fillColor:"white"})},e.absorb||{}),this.overlay=null,this.path=[],this.size=0,this.absorb=[],this.plotType=null,this.clickHash="",this.dom=document.createElement("div")}var n,e,r;return n=t,(e=[{key:"on",value:function(t,n,e){if(this.listeners[t]||(this.listeners[t]=[]),"function"!=typeof n)return this;e||(e=this);var r=n.bind(e);return this.listeners[t].push({context:e,fn:r}),this.dom.addEventListener(t,r),this}},{key:"off",value:function(t,n,e){var r=this;return n||this.listeners[t]&&this.listeners[t].map((function(n){r.dom.removeEventListener(t,n.fn)})),e||(e=this),this.listeners[t]&&this.listeners[t].map((function(n){n.context==e&&r.dom.removeEventListener(t,n.fn)})),this}},{key:"addAbsorbLayer",value:function(t){switch(!0){case t instanceof BM.Polygon:case t instanceof BM.Marker:case t instanceof BM.Polyline:this.absorb.find((function(n){return n._bigemap_id===t._bigemap_id}))||this.absorb.push(t);break;default:console.error("addAbsorbLayer only support polygon,marker,polyline")}}},{key:"removeAbsorbLayer",value:function(t){switch(!0){case t instanceof BM.Polygon:case t instanceof BM.Marker:case t instanceof BM.Polyline:var n=this.absorb.findIndex((function(n){return n._bigemap_id===t._bigemap_id}));n>-1&&this.absorb.splice(n,1);break;default:console.error("removeAbsorbLayer only support null,undefined,polygon,marker,polyline")}}},{key:"enable",value:function(t){this.plotType&&this.disable(),this.cursor=this.map.getContainer().style.cursor,this.map.getContainer().style.cursor="crosshair",this.createPlot(t),this.plotType=t,this.initEvent()}},{key:"isDraw",value:function(){return!!this.plotType}},{key:"disable",value:function(){this.dblclick(),this.removeEvent()}},{key:"setOptions",value:function(t){return this.options=Object.assign({},this.options,t),this}},{key:"createPlot",value:function(t){switch(t){case C:this.overlay=new ot([],this.options.gatheringPlace).addTo(this.map);break;case z:break;case D:this.overlay=new st([],this.options.polyline).addTo(this.map);break;case I:this.overlay=new ht([],this.options.curve).addTo(this.map);break;case E:this.overlay=new vt([],this.options.arc).addTo(this.map);break;case N:this.overlay=new At([],this.options.ellipse).addTo(this.map);break;case W:this.overlay=new wt([],this.options.lune).addTo(this.map);break;case H:this.overlay=new Lt([],this.options.sector).addTo(this.map);break;case U:this.overlay=new Tt([],this.options.closedCurve).addTo(this.map);break;case $:this.overlay=new jt([],this.options.polygon).addTo(this.map);break;case J:this.overlay=new Ct([],this.options.doubleArrow).addTo(this.map);break;case V:this.overlay=new zt([],this.options.straightArrow).addTo(this.map);break;case K:this.overlay=new Rt([],this.options.fineArrow).addTo(this.map);break;case G:this.overlay=new Ht([],this.options.attackArrow).addTo(this.map);break;case Y:this.overlay=new Ut([],this.options.assaultDirection).addTo(this.map);break;case Z:this.overlay=new Gt([],this.options.tailedAttackArrow).addTo(this.map);break;case Q:this.overlay=new Kt([],this.options.squadCombat).addTo(this.map);break;case X:this.overlay=new Qt([],this.options.tailedSquadCombat).addTo(this.map);break;case tt:this.overlay=new nn([],this.options.rectFlag).addTo(this.map);break;case et:this.overlay=new on([],this.options.curveFlag).addTo(this.map);break;case nt:this.overlay=new un([],this.options.triangleFlag).addTo(this.map);break;case R:this.overlay=new lt([0,0],0,this.options.circle).addTo(this.map);break;case B:this.overlay=new dt([[0,0],[0,0]],this.options.rectangle).addTo(this.map);break;case F:this.overlay=new ft([],this.options.freeLine).addTo(this.map);break;case q:this.overlay=new pt([],this.options.freePolygon).addTo(this.map);break;default:throw new Error("unknown type")}}},{key:"initEvent",value:function(){this.map.on("click",this.click,this),this.map.on("mouseup",this.mouseup,this),this.map.on("mousedown",this.mousedown,this),this.map.on("dblclick",this.dblclick,this),this.map.on("mousemove",this.mousemove,this),this.map.doubleClickZoom.disable()}},{key:"click",value:function(t){var n=Math.floor(t.containerPoint.x)+"_"+Math.floor(t.containerPoint.y);if(this.clickHash!==n&&(this.clickHash=n,M(t.latlng))){if(this.absorb.length){var e=j(t.latlng,this);e&&(t.latlng=e)}switch(this.path.push([t.latlng.lat,t.latlng.lng]),this.size++,this.plotType){case z:this.overlay=new at(t.latlng,this.options.point).addTo(this.map),this.dblclick();break;case F:case q:break;default:this.overlay||this.createPlot(this.plotType),this.overlay.setPath(JSON.parse(JSON.stringify(this.path))),this.overlay.maxSize===this.path.length&&this.dblclick()}}}},{key:"dblclick",value:function(t){var n=this;if(this.overlay&&this.path.length>=this.overlay.minSize){var e=this.overlay,r=this.plotType;setTimeout((function(){switch(r){case z:n.dom.dispatchEvent(new CustomEvent("bm_draw_end",{detail:{path:e.getPath(),layer:e,type:r}}));break;case"Circle":n.dom.dispatchEvent(new CustomEvent("bm_draw_end",{detail:{path:e.getPath(),radius:e.getRadius(),layer:e,type:r}}));break;default:n.dom.dispatchEvent(new CustomEvent("bm_draw_end",{detail:{path:cn(e.getPath()),layer:e,type:r}}))}}),50)}else this.overlay&&this.overlay.remove();this.options.absorb&&this.options.absorb.marker.remove(),this.clickHash=null,this.path.length=0,this.overlay=null,this.map.dragging.enable(),this.options.repeat||(this.plotType=null,this.removeEvent())}},{key:"mouseup",value:function(){switch(this.plotType){case F:case q:this.clickHash=null,this.dblclick()}}},{key:"mousedown",value:function(t){switch(this.plotType){case F:case q:this.map.dragging.disable(),this.clickHash=t.containerPoint,this.overlay||(this.path.length=0,this.createPlot(this.plotType))}}},{key:"mousemove",value:function(t){var n=Math.floor(t.containerPoint.x)+"_"+Math.floor(t.containerPoint.y);if(this.clickHash!==n&&this.overlay&&M(t.latlng)){var e={};if(this.absorb.length){var r=j(t.latlng,this);r?(t.latlng=r,this.options.absorb.tmp=r,this.options.absorb.marker.setLatLng(r).addTo(this.map)):this.options.absorb.marker.remove()}else this.options.absorb.marker.remove();switch(this.plotType){case q:case F:if(!this.clickHash)return;if(Math.sqrt(Math.pow(t.containerPoint.x-this.clickHash.x,2)+Math.pow(t.containerPoint.y-this.clickHash.y,2))<20)return;this.path.push([t.latlng.lat,t.latlng.lng]),this.overlay.generate(JSON.parse(JSON.stringify(this.path))),this.clickHash=t.containerPoint,(e={type:this.plotType,layer:this.overlay,path:JSON.parse(JSON.stringify(this.path))}).path.length>=2&&this.dom.dispatchEvent(new CustomEvent("bm_drawing",{detail:e}));break;default:this.overlay.generate([].concat(cn(JSON.parse(JSON.stringify(this.path))),[[t.latlng.lat,t.latlng.lng]])),(e={type:this.plotType,layer:this.overlay,path:[].concat(cn(JSON.parse(JSON.stringify(this.path))),[[t.latlng.lat,t.latlng.lng]])}).path.length>=2&&this.dom.dispatchEvent(new CustomEvent("bm_drawing",{detail:e}))}}}},{key:"removeEvent",value:function(){this.map.getContainer().style.cursor=this.cursor,this.map.off("click",this.click,this),this.map.off("dblclick",this.dblclick,this),this.map.off("mousemove",this.mousemove,this),this.map.off("mouseup",this.mouseup,this),this.map.off("mousedown",this.mousedown,this),this.map.doubleClickZoom.enable()}}])&&ln(n.prototype,e),r&&ln(n,r),t}();e(60),e(105),e(107);function pn(t){return function(t){if(Array.isArray(t))return dn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return dn(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return dn(t,n)}(t)||function(){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 dn(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function yn(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var gn=function(){function t(n,e){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this.map=n,this.options=Object.assign({},{},e),this.options.absorb=Object.assign({},{distance:2,marker:window.BM.circleMarker([0,0],{radius:6,weight:1,fillOpacity:1,fillColor:"white"})},e.absorb||{}),this.overlay=null,this.path=[],this.absorb=[],this.markers=[],this.type="",this.downPosition=null,this.dom=document.createElement("div")}var n,e,i;return n=t,(e=[{key:"on",value:function(t,n){this.dom.addEventListener(t,n.bind(this))}},{key:"edit",value:function(t){var n=this;switch(this.overlay&&this.disable(),!0){case t.getType&&t.getType()===z:this.type=z,this.path=[t.getLatLng()];break;case t.getType&&t.getType()===R:this.path=[t.getLatLng(),L(t.getLatLng(),90,t.getRadius())],this.type=R;break;case t.getType&&Object.values(r).indexOf(t.getType())>-1:this.path=t.getPath(),this.type=t.getType();break;default:throw new Error("unknown type")}this.overlay=t,this.overlay.on("mousedown",this.overlayDown,this);var e=Object.assign({},this.options[this.type]||{},this.options);this.path.map((function(t,r){var i;i=Array.isArray(e.icon)?!1===e.icon[r]?window.BM.marker(t,{zIndex:(new Date).getTime(),icon:e.icon||window.BM.divIcon({iconSize:window.BM.point(0,0),html:"<span></span>"})}):window.BM.marker(t,{draggable:!0,zIndex:(new Date).getTime(),icon:e.icon[r]||window.BM.divIcon({html:"<span></span>"})}).addTo(n.map):window.BM.marker(t,{draggable:!0,zIndex:(new Date).getTime(),icon:e.icon||window.BM.divIcon({html:"<span></span>"})}).addTo(n.map),n.overlay.getType(),i.on("drag",n.dragging,n);var o=n;i.on("mousedown",(function(){o.tmpCurrent&&o.tmpCurrent.setOpacity(1),o.tmpCurrent=this})),i.on("click",n.editClick,n),i.index=r,n.markers.push(i)})),this.initEvent()}},{key:"isEdit",value:function(){return!!this.overlay}},{key:"addAbsorbLayer",value:function(t){switch(!0){case t instanceof window.BM.Polygon:case t instanceof window.BM.Marker:case t instanceof window.BM.Polyline:this.absorb.find((function(n){return n._bigemap_id===t._bigemap_id}))||this.absorb.push(t);break;default:console.error("addAbsorbLayer only support polygon,marker,polyline")}}},{key:"removeAbsorbLayer",value:function(t){switch(!0){case t instanceof window.BM.Polygon:case t instanceof window.BM.Marker:case t instanceof window.BM.Polyline:var n=this.absorb.findIndex((function(n){return n._bigemap_id===t._bigemap_id}));n>-1&&this.absorb.splice(n,1);break;default:console.error("removeAbsorbLayer only support null,undefined,polygon,marker,polyline")}}},{key:"disable",value:function(){var t=this;if(this.map.doubleClickZoom.enable(),this.tmpCurrent=null,this.options.absorb.marker.remove(),this.map.off("mouseup",this.mousemove,this),this.map.off("mousemove",this.mousemove,this),this.markers.map((function(n){n.off("drag",t.dragging,t),n.remove()})),this.markers.length=0,this.downPosition=null,this.overlay){switch(this.overlay.off("mousedown",this.overlayDown,this),this.overlay.getType()){case z:this.dom.dispatchEvent(new CustomEvent("bm_edit_end",{detail:{type:this.overlay.getType(),layer:this.overlay,path:this.overlay.getPath()}}));break;case R:this.dom.dispatchEvent(new CustomEvent("bm_edit_end",{detail:{type:this.overlay.getType(),layer:this.overlay,radius:this.overlay.getRadius(),path:this.overlay.getPath()}}));break;default:this.dom.dispatchEvent(new CustomEvent("bm_edit_end",{detail:{type:this.overlay.getType(),layer:this.overlay,path:pn(this.overlay.getPath())}}))}this.overlay=null}}},{key:"initEvent",value:function(){this.map.on("mouseup",this.mouseup,this),this.map.on("mousemove",this.mousemove,this),this.map.doubleClickZoom.disable()}},{key:"mouseup",value:function(){this.downPosition=null,this.map.dragging.enable()}},{key:"editClick",value:function(){}},{key:"dragging",value:function(t){var n=this,e=[];if(this.markers.map((function(t){var r=t.getLatLng();if(M(r)){if(t===n.tmpCurrent){var i=j(r,n,n.overlay);i?(t.setLatLng(i),r=i,t.setOpacity(0),n.options.absorb.marker.setLatLng(i).addTo(n.map)):(n.options.absorb.marker.remove(),t.setOpacity(1))}return e.push([r.lat,r.lng])}})),e.length===this.markers.length){var r=this.overlay.getType();if(this.dom.dispatchEvent(new CustomEvent("bm_editing",{detail:{from:"control",type:this.overlay.getType(),layer:this.overlay}})),this.options&&this.options[r]&&this.options[r].editable&&"function"==typeof this.options[r].editable){if(!1===this.options[r].editable(this.overlay,{index:t.target.index,path:e})){var i=this.overlay._bigemap_editting_path;switch(r){case R:i||(i=[this.overlay.getLatLng(),L(this.overlay.getLatLng(),90,this.overlay.getRadius())]);break;default:i||(i=this.overlay.getPath())}return void this.markers.map((function(t,n){i[n]&&t.setLatLng(i[n])}))}this.overlay._bigemap_editting_path=e}switch(r){case z:this.overlay.setLatLng(e[0]);break;case R:0===t.target.index?(e[1]=L(this.overlay.getLatLng(),90,this.overlay.getRadius()),this.markers[1].setLatLng(e[1]),this.overlay.setLatLng(e[0])):this.overlay.setPath(e);break;default:this.overlay.setPath(e)}}}},{key:"overlayDown",value:function(t){this.downPosition=t.containerPoint,this.map.dragging.disable()}},{key:"mousemove",value:function(t){var n=this;if(this.downPosition){for(var e=[],r=0;r<this.markers.length;r++){var i=this.map.project(this.markers[r].getLatLng());i.x+=t.containerPoint.x-this.downPosition.x,i.y+=t.containerPoint.y-this.downPosition.y;var o=this.map.unproject(i);if(!M(o))return;e.push([o.lat,o.lng])}switch(this.overlay.getType()){case z:case R:return;default:this.overlay.setPath(e)}this.dom.dispatchEvent(new CustomEvent("bm_editing",{detail:{from:"dragging",type:this.overlay.getType(),layer:this.overlay}})),e.map((function(t,e){return n.markers[e].setLatLng(t)})),this.downPosition=t.containerPoint}}}])&&yn(n.prototype,e),i&&yn(n,i),t}();!function(){function t(t,n){n=n||{bubbles:!1,cancelable:!1,detail:void 0};var e=document.createEvent("CustomEvent");return e.initCustomEvent(t,n.bubbles,n.cancelable,n.detail),e}t.prototype=window.Event.prototype,window.CustomEvent=t}(),e(52),window.BM.Plot={Draw:fn,Edit:gn,Marker:at,Circle:lt,FreeLine:ft,FreePolygon:pt,Rectangle:dt,Polyline:st,Curve:ht,Arc:vt,Lune:wt,Ellipse:At,Sector:Lt,ClosedCurve:Tt,Polygon:jt,StraightArrow:zt,FineArrow:Rt,AttackArrow:Ht,TailedAttackArrow:Gt,SquadCombat:Kt,TailedSquadCombat:Qt,RectFlag:nn,TriangleFlag:un,DoubleArrow:Ct,GatheringPlace:ot,CurveFlag:on,AssaultDirection:Ut}}])}));