_jsload_('AMap.MoveAnimation', '!function(){"use strict";var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function unwrapExports(x){return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,"default")?x.default:x}function createCommonjsModule(fn,module){return fn(module={exports:{}},module.exports),module.exports}var d1,d2,r,eventemitter=createCommonjsModule(function(module,exports){Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor};function defineProperties(target,props){for(var i=0;i>4|(3840&iv)>>8,240&iv|(240&iv)>>4,15&iv|(15&iv)<<4,1]:null:7===css_str.length&&0<=(iv=parseInt(css_str.substr(1),16))&&iv<=16777215?[(16711680&iv)>>16,(65280&iv)>>8,255&iv,1]:null;var iv=css_str.indexOf("("),ep=css_str.indexOf(")");if(-1!==iv&&ep+1===css_str.length){var h,l,s,fname=css_str.substr(0,iv),params=css_str.substr(iv+1,ep-(iv+1)).split(","),alpha=1;switch(fname){case"rgba":if(4!==params.length)return null;alpha=parse_css_float(params.pop());case"rgb":return 3!==params.length?null:[parse_css_int(params[0]),parse_css_int(params[1]),parse_css_int(params[2]),alpha];case"hsla":if(4!==params.length)return null;alpha=parse_css_float(params.pop());case"hsl":return 3!==params.length?null:(h=(parseFloat(params[0])%360+360)%360/360,s=parse_css_float(params[1]),[clamp_css_byte(255*css_hue_to_rgb(s=2*(l=parse_css_float(params[2]))-(l=l<=.5?l*(s+1):l+s-l*s),l,h+1/3)),clamp_css_byte(255*css_hue_to_rgb(s,l,h)),clamp_css_byte(255*css_hue_to_rgb(s,l,h-1/3)),alpha]);default:return null}}return null}}catch(e){}})),colorhelper=(csscolorparser.parseCSSColor,createCommonjsModule(function(module,exports){Object.defineProperty(exports,"__esModule",{value:!0});var obj,_slicedToArray=function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return function(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")},_csscolorparser2=(obj=csscolorparser)&&obj.__esModule?obj:{default:obj};var parseCSSColor=_csscolorparser2.default.parseCSSColor;function _clamp_css_byte(i){return(i=Math.round(i))<0?0:255>0,fn=interpolation;return function(p0,p1,t){var p0=_slicedToArray(p0,4),r0=p0[0],g0=p0[1],b0=p0[2],p0=p0[3],p1=_slicedToArray(p1,4),r1=p1[0],g1=p1[1],b1=p1[2],p1=p1[3];return[fn(r0,r1,t)>>0,fn(g0,g1,t)>>0,fn(b0,b1,t)>>0,fn(p0,p1,t)]}(steps[i],steps[m<1+i?m:1+i],progress-i)},mixColors:function(color,increase){var c=this.toNormal(color);return Array.isArray(increase)&&c?"rgba("+[(c=[_clamp_css_byte(c[0]+increase[0]||0),_clamp_css_byte(c[1]+increase[1]||0),_clamp_css_byte(c[2]+increase[2]||0),_clamp_css_float(c[3]+increase[3]||0)])[0],c[1],c[2],c[3]].join(",")+")":color},toRGBA:function(color){var alpha;return color&&3<=color.length?(alpha=void 0===color[3]?1:color[3],"rgba("+_clamp_css_byte(color[0])+","+_clamp_css_byte(color[1])+","+_clamp_css_byte(color[2])+","+_clamp_css_float(alpha)+")"):"transparent"},Utils:{Linear:function(p0,p1,t){return(p1-p0)*t+p0}}};exports.default=ColorHelper})),color=(unwrapExports(colorhelper),createCommonjsModule(function(module,exports){Object.defineProperty(exports,"__esModule",{value:!0});var _clip2=_interopRequireDefault(clip),_colorhelper2=_interopRequireDefault(colorhelper);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var plugin={type:"color",test:function(value,key){return _colorhelper2.default.isColor(value)},parse:function(value,key){return _colorhelper2.default.toNormalArray(value)},valueOf:function(parsedValue,progress,elapsed,key){parsedValue=_colorhelper2.default.linearGradient(parsedValue,progress);return _colorhelper2.default.toRGBA(parsedValue)}};_clip2.default.registerPlugin(plugin),exports.default=plugin})),vector_1=(unwrapExports(color),createCommonjsModule(function(module,exports){Object.defineProperty(exports,"__esModule",{value:!0});var ArrayCons="undefined"==typeof Float32Array?Array:Float32Array,vector={create:function(){var x=0b?1:a0){var middle=start+Math.floor(size/2);var key=keys[middle];var data=values[middle];var node={key:key,data:data,parent:parent};node.left=loadRecursive(node,keys,values,start,middle);node.right=loadRecursive(node,keys,values,middle+1,end);return node}return null}function sort(keys,values,left,right,compare){if(left>=right)return;var pivot=keys[left+right>>1];var i=left-1;var j=right+1;while(true){do{i++}while(compare(keys[i],pivot)<0);do{j--}while(compare(keys[j],pivot)>0);if(i>=j)break;var tmp=keys[i];keys[i]=keys[j];keys[j]=tmp;tmp=values[i];values[i]=values[j];values[j]=tmp}sort(keys,values,left,j,compare);sort(keys,values,j+1,right,compare)}SplayTree.prototype.rotateLeft=function rotateLeft(x){var y=x.right;if(y){x.right=y.left;if(y.left)y.left.parent=x;y.parent=x.parent}if(!x.parent)this._root=y;else if(x===x.parent.left)x.parent.left=y;else x.parent.right=y;if(y)y.left=x;x.parent=y},SplayTree.prototype.rotateRight=function rotateRight(x){var y=x.left;if(y){x.left=y.right;if(y.right)y.right.parent=x;y.parent=x.parent}if(!x.parent)this._root=y;else if(x===x.parent.left)x.parent.left=y;else x.parent.right=y;if(y)y.right=x;x.parent=y},SplayTree.prototype._splay=function _splay(x){while(x.parent){var p=x.parent;if(!p.parent)if(p.left===x)this.rotateRight(p);else this.rotateLeft(p);else if(p.left===x&&p.parent.left===p){this.rotateRight(p.parent);this.rotateRight(p)}else if(p.right===x&&p.parent.right===p){this.rotateLeft(p.parent);this.rotateLeft(p)}else if(p.left===x&&p.parent.right===p){this.rotateRight(p);this.rotateLeft(p)}else{this.rotateLeft(p);this.rotateRight(p)}}},SplayTree.prototype.splay=function splay(x){var p,gp,ggp,l,r;while(x.parent){p=x.parent;gp=p.parent;if(gp&&gp.parent){ggp=gp.parent;if(ggp.left===gp)ggp.left=x;else ggp.right=x;x.parent=ggp}else{x.parent=null;this._root=x}l=x.left;r=x.right;if(x===p.left){if(gp)if(gp.left===p){if(p.right){gp.left=p.right;gp.left.parent=gp}else gp.left=null;p.right=gp;gp.parent=p}else{if(l){gp.right=l;l.parent=gp}else gp.right=null;x.left=gp;gp.parent=x}if(r){p.left=r;r.parent=p}else p.left=null;x.right=p;p.parent=x}else{if(gp)if(gp.right===p){if(p.left){gp.right=p.left;gp.right.parent=gp}else gp.right=null;p.left=gp;gp.parent=p}else{if(r){gp.left=r;r.parent=gp}else gp.left=null;x.right=gp;gp.parent=x}if(l){p.right=l;l.parent=p}else p.right=null;x.left=p;p.parent=x}}},SplayTree.prototype.replace=function replace(u,v){if(!u.parent)this._root=v;else if(u===u.parent.left)u.parent.left=v;else u.parent.right=v;if(v)v.parent=u.parent},SplayTree.prototype.minNode=function minNode(u){if(u===void 0)u=this._root;if(u)while(u.left)u=u.left;return u},SplayTree.prototype.maxNode=function maxNode(u){if(u===void 0)u=this._root;if(u)while(u.right)u=u.right;return u},SplayTree.prototype.insert=function insert(key,data){var z=this._root;var p=null;var comp=this._compare;var cmp;if(this._noDuplicates)while(z){p=z;cmp=comp(z.key,key);if(cmp===0)return;else if(comp(z.key,key)<0)z=z.right;else z=z.left}else while(z){p=z;if(comp(z.key,key)<0)z=z.right;else z=z.left}z={key:key,data:data,left:null,right:null,parent:p};if(!p)this._root=z;else if(comp(p.key,z.key)<0)p.right=z;else p.left=z;this.splay(z);this._size++;return z},SplayTree.prototype.find=function find(key){var z=this._root;var comp=this._compare;while(z){var cmp=comp(z.key,key);if(cmp<0)z=z.right;else if(cmp>0)z=z.left;else return z}return null},SplayTree.prototype.contains=function contains(key){var node=this._root;var comparator=this._compare;while(node){var cmp=comparator(key,node.key);if(cmp===0)return true;else if(cmp<0)node=node.left;else node=node.right}return false},SplayTree.prototype.remove=function remove(key){var z=this.find(key);if(!z)return false;this.splay(z);if(!z.left)this.replace(z,z.right);else if(!z.right)this.replace(z,z.left);else{var y=this.minNode(z.right);if(y.parent!==z){this.replace(y,y.right);y.right=z.right;y.right.parent=y}this.replace(z,y);y.left=z.left;y.left.parent=y}this._size--;return true},SplayTree.prototype.removeNode=function removeNode(z){if(!z)return false;this.splay(z);if(!z.left)this.replace(z,z.right);else if(!z.right)this.replace(z,z.left);else{var y=this.minNode(z.right);if(y.parent!==z){this.replace(y,y.right);y.right=z.right;y.right.parent=y}this.replace(z,y);y.left=z.left;y.left.parent=y}this._size--;return true},SplayTree.prototype.erase=function erase(key){var z=this.find(key);if(!z)return;this.splay(z);var s=z.left;var t=z.right;var sMax=null;if(s){s.parent=null;sMax=this.maxNode(s);this.splay(sMax);this._root=sMax}if(t){if(s)sMax.right=t;else this._root=t;t.parent=sMax}this._size--},SplayTree.prototype.pop=function pop(){var node=this._root,returnValue=null;if(node){while(node.left)node=node.left;returnValue={key:node.key,data:node.data};this.remove(node.key)}return returnValue},SplayTree.prototype.next=function next(node){var successor=node;if(successor)if(successor.right){successor=successor.right;while(successor&&successor.left)successor=successor.left}else{successor=node.parent;while(successor&&successor.right===node){node=successor;successor=successor.parent}}return successor},SplayTree.prototype.prev=function prev(node){var predecessor=node;if(predecessor)if(predecessor.left){predecessor=predecessor.left;while(predecessor&&predecessor.right)predecessor=predecessor.right}else{predecessor=node.parent;while(predecessor&&predecessor.left===node){node=predecessor;predecessor=predecessor.parent}}return predecessor},SplayTree.prototype.forEach=function forEach(callback){var current=this._root;var s=[],done=false,i=0;while(!done)if(current){s.push(current);current=current.left}else if(s.length>0){current=s.pop();callback(current,i++);current=current.right}else done=true;return this},SplayTree.prototype.range=function range(low,high,fn,ctx){var Q=[];var compare=this._compare;var node=this._root,cmp;while(Q.length!==0||node)if(node){Q.push(node);node=node.left}else{node=Q.pop();cmp=compare(node.key,high);if(cmp>0)break;else if(compare(node.key,low)>=0)if(fn.call(ctx,node))return this;node=node.right}return this},SplayTree.prototype.keys=function keys(){var current=this._root;var s=[],r=[],done=false;while(!done)if(current){s.push(current);current=current.left}else if(s.length>0){current=s.pop();r.push(current.key);current=current.right}else done=true;return r},SplayTree.prototype.values=function values(){var current=this._root;var s=[],r=[],done=false;while(!done)if(current){s.push(current);current=current.left}else if(s.length>0){current=s.pop();r.push(current.data);current=current.right}else done=true;return r},SplayTree.prototype.at=function at(index){var current=this._root;var s=[],done=false,i=0;while(!done)if(current){s.push(current);current=current.left}else if(s.length>0){current=s.pop();if(i===index)return current;i++;current=current.right}else done=true;return null},SplayTree.prototype.load=function load(keys,values,presort){if(keys===void 0)keys=[];if(values===void 0)values=[];if(presort===void 0)presort=false;if(this._size!==0)throw new Error("bulk-load: tree is not empty");var size=keys.length;if(presort)sort(keys,values,0,size-1,this._compare);this._root=loadRecursive(null,keys,values,0,size);this._size=size;return this},SplayTree.prototype.min=function min(){var node=this.minNode(this._root);if(node)return node.key;else return null},SplayTree.prototype.max=function max(){var node=this.maxNode(this._root);if(node)return node.key;else return null},SplayTree.prototype.isEmpty=function isEmpty(){return this._root===null},prototypeAccessors.size.get=function(){return this._size},SplayTree.createTree=function createTree(keys,values,comparator,presort,noDuplicates){return new SplayTree(comparator,noDuplicates).load(keys,values,presort)},Object.defineProperties(SplayTree.prototype,prototypeAccessors);var NORMAL=0,NON_CONTRIBUTING=1,SAME_TRANSITION=2,DIFFERENT_TRANSITION=3,INTERSECTION=0,UNION=1,DIFFERENCE=2,XOR=3;function computeFields(event,prev,operation){if(prev===null){event.inOut=false;event.otherInOut=true}else{if(event.isSubject===prev.isSubject){event.inOut=!prev.inOut;event.otherInOut=prev.otherInOut}else{event.inOut=!prev.otherInOut;event.otherInOut=prev.isVertical()?!prev.inOut:prev.inOut}if(prev)event.prevInResult=!inResult(prev,operation)||prev.isVertical()?prev.prevInResult:prev}var isInResult=inResult(event,operation);if(isInResult)event.resultTransition=determineResultTransition(event,operation);else event.resultTransition=0}function inResult(event,operation){switch(event.type){case NORMAL:switch(operation){case INTERSECTION:return!event.otherInOut;case UNION:return event.otherInOut;case DIFFERENCE:return event.isSubject&&event.otherInOut||!event.isSubject&&!event.otherInOut;case XOR:return true}break;case SAME_TRANSITION:return operation===INTERSECTION||operation===UNION;case DIFFERENT_TRANSITION:return operation===DIFFERENCE;case NON_CONTRIBUTING:return false}return false}function determineResultTransition(event,operation){var thisIn=!event.inOut;var thatIn=!event.otherInOut;var isIn;switch(operation){case INTERSECTION:isIn=thisIn&&thatIn;break;case UNION:isIn=thisIn||thatIn;break;case XOR:isIn=thisIn^thatIn;break;case DIFFERENCE:if(event.isSubject)isIn=thisIn&&!thatIn;else isIn=thatIn&&!thisIn;break}return isIn?+1:-1}var SweepEvent=function SweepEvent(point,left,otherEvent,isSubject,edgeType){this.left=left;this.point=point;this.otherEvent=otherEvent;this.isSubject=isSubject;this.type=edgeType||NORMAL;this.inOut=false;this.otherInOut=false;this.prevInResult=null;this.resultTransition=0;this.otherPos=-1;this.outputContourId=-1;this.isExteriorRing=true},prototypeAccessors$1={inResult:{configurable:true}};function equals(p1,p2){if(p1[0]===p2[0])if(p1[1]===p2[1])return true;else return false;return false}SweepEvent.prototype.isBelow=function isBelow(p){var p0=this.point,p1=this.otherEvent.point;return this.left?(p0[0]-p[0])*(p1[1]-p[1])-(p1[0]-p[0])*(p0[1]-p[1])>0:(p1[0]-p[0])*(p0[1]-p[1])-(p0[0]-p[0])*(p1[1]-p[1])>0},SweepEvent.prototype.isAbove=function isAbove(p){return!this.isBelow(p)},SweepEvent.prototype.isVertical=function isVertical(){return this.point[0]===this.otherEvent.point[0]},prototypeAccessors$1.inResult.get=function(){return this.resultTransition!==0},SweepEvent.prototype.clone=function clone(){var copy=new SweepEvent(this.point,this.left,this.otherEvent,this.isSubject,this.type);copy.contourId=this.contourId;copy.resultTransition=this.resultTransition;copy.prevInResult=this.prevInResult;copy.isExteriorRing=this.isExteriorRing;copy.inOut=this.inOut;copy.otherInOut=this.otherInOut;return copy},Object.defineProperties(SweepEvent.prototype,prototypeAccessors$1);var epsilon=11102230246251565e-32,splitter=134217729,resulterrbound=(3+8*epsilon)*epsilon;function sum(elen,e,flen,f,h){var Q,Qnew,hh,bvirt;var enow=e[0];var fnow=f[0];var eindex=0;var findex=0;if(fnow>enow===fnow>-enow){Q=enow;enow=e[++eindex]}else{Q=fnow;fnow=f[++findex]}var hindex=0;if(eindexenow===fnow>-enow){Qnew=enow+Q;hh=Q-(Qnew-enow);enow=e[++eindex]}else{Qnew=fnow+Q;hh=Q-(Qnew-fnow);fnow=f[++findex]}Q=Qnew;if(hh!==0)h[hindex++]=hh;while(eindexenow===fnow>-enow){Qnew=Q+enow;bvirt=Qnew-Q;hh=Q-(Qnew-bvirt)+(enow-bvirt);enow=e[++eindex]}else{Qnew=Q+fnow;bvirt=Qnew-Q;hh=Q-(Qnew-bvirt)+(fnow-bvirt);fnow=f[++findex]}Q=Qnew;if(hh!==0)h[hindex++]=hh}}while(eindex=errbound||-det>=errbound)return det;bvirt=ax-acx;acxtail=ax-(acx+bvirt)+(bvirt-cx);bvirt=bx-bcx;bcxtail=bx-(bcx+bvirt)+(bvirt-cx);bvirt=ay-acy;acytail=ay-(acy+bvirt)+(bvirt-cy);bvirt=by-bcy;bcytail=by-(bcy+bvirt)+(bvirt-cy);if(acxtail===0&&acytail===0&&bcxtail===0&&bcytail===0)return det;errbound=ccwerrboundC*detsum+resulterrbound*Math.abs(det);det+=acx*bcytail+bcy*acxtail-(acy*bcxtail+bcx*acytail);if(det>=errbound||-det>=errbound)return det;s1=acxtail*bcy;c=splitter*acxtail;ahi=c-(c-acxtail);alo=acxtail-ahi;c=splitter*bcy;bhi=c-(c-bcy);blo=bcy-bhi;s0=alo*blo-(s1-ahi*bhi-alo*bhi-ahi*blo);t1=acytail*bcx;c=splitter*acytail;ahi=c-(c-acytail);alo=acytail-ahi;c=splitter*bcx;bhi=c-(c-bcx);blo=bcx-bhi;t0=alo*blo-(t1-ahi*bhi-alo*bhi-ahi*blo);_i=s0-t0;bvirt=s0-_i;u[0]=s0-(_i+bvirt)+(bvirt-t0);_j=s1+_i;bvirt=_j-s1;_0=s1-(_j-bvirt)+(_i-bvirt);_i=_0-t1;bvirt=_0-_i;u[1]=_0-(_i+bvirt)+(bvirt-t1);u3=_j+_i;bvirt=u3-_j;u[2]=_j-(u3-bvirt)+(_i-bvirt);u[3]=u3;var C1len=sum(4,B,4,u,C1);s1=acx*bcytail;c=splitter*acx;ahi=c-(c-acx);alo=acx-ahi;c=splitter*bcytail;bhi=c-(c-bcytail);blo=bcytail-bhi;s0=alo*blo-(s1-ahi*bhi-alo*bhi-ahi*blo);t1=acy*bcxtail;c=splitter*acy;ahi=c-(c-acy);alo=acy-ahi;c=splitter*bcxtail;bhi=c-(c-bcxtail);blo=bcxtail-bhi;t0=alo*blo-(t1-ahi*bhi-alo*bhi-ahi*blo);_i=s0-t0;bvirt=s0-_i;u[0]=s0-(_i+bvirt)+(bvirt-t0);_j=s1+_i;bvirt=_j-s1;_0=s1-(_j-bvirt)+(_i-bvirt);_i=_0-t1;bvirt=_0-_i;u[1]=_0-(_i+bvirt)+(bvirt-t1);u3=_j+_i;bvirt=u3-_j;u[2]=_j-(u3-bvirt)+(_i-bvirt);u[3]=u3;var C2len=sum(C1len,C1,4,u,C2);s1=acxtail*bcytail;c=splitter*acxtail;ahi=c-(c-acxtail);alo=acxtail-ahi;c=splitter*bcytail;bhi=c-(c-bcytail);blo=bcytail-bhi;s0=alo*blo-(s1-ahi*bhi-alo*bhi-ahi*blo);t1=acytail*bcxtail;c=splitter*acytail;ahi=c-(c-acytail);alo=acytail-ahi;c=splitter*bcxtail;bhi=c-(c-bcxtail);blo=bcxtail-bhi;t0=alo*blo-(t1-ahi*bhi-alo*bhi-ahi*blo);_i=s0-t0;bvirt=s0-_i;u[0]=s0-(_i+bvirt)+(bvirt-t0);_j=s1+_i;bvirt=_j-s1;_0=s1-(_j-bvirt)+(_i-bvirt);_i=_0-t1;bvirt=_0-_i;u[1]=_0-(_i+bvirt)+(bvirt-t1);u3=_j+_i;bvirt=u3-_j;u[2]=_j-(u3-bvirt)+(_i-bvirt);u[3]=u3;var Dlen=sum(C2len,C2,4,u,D);return D[Dlen-1]}function orient2d(ax,ay,bx,by,cx,cy){var detleft=(ay-cy)*(bx-cx);var detright=(ax-cx)*(by-cy);var det=detleft-detright;if(detleft===0||detright===0||detleft>0!==detright>0)return det;var detsum=Math.abs(detleft+detright);if(Math.abs(det)>=ccwerrboundA*detsum)return det;return-orient2dadapt(ax,ay,bx,by,cx,cy,detsum)}function signedArea(p0,p1,p2){var res=orient2d(p0[0],p0[1],p1[0],p1[1],p2[0],p2[1]);if(res>0)return-1;if(res<0)return 1;return 0}function compareEvents(e1,e2){var p1=e1.point;var p2=e2.point;if(p1[0]>p2[0])return 1;if(p1[0]p2[1]?1:-1;return specialCases(e1,e2,p1)}function specialCases(e1,e2,p1,p2){if(e1.left!==e2.left)return e1.left?1:-1;if(signedArea(p1,e1.otherEvent.point,e2.otherEvent.point)!==0)return!e1.isBelow(e2.otherEvent.point)?1:-1;return!e1.isSubject&&e2.isSubject?1:-1}function divideSegment(se,p,queue){var r=new SweepEvent(p,false,se,se.isSubject);var l=new SweepEvent(p,true,se.otherEvent,se.isSubject);if(equals(se.point,se.otherEvent.point))console.warn("what is that, a collapsed segment?",se);r.contourId=l.contourId=se.contourId;if(compareEvents(l,se.otherEvent)>0){se.otherEvent.left=true;l.left=false}se.otherEvent.otherEvent=l;se.otherEvent=r;queue.push(l);queue.push(r);return queue}function crossProduct(a,b){return a[0]*b[1]-a[1]*b[0]}function dotProduct(a,b){return a[0]*b[0]+a[1]*b[1]}function intersection(a1,a2,b1,b2,noEndpointTouch){var va=[a2[0]-a1[0],a2[1]-a1[1]];var vb=[b2[0]-b1[0],b2[1]-b1[1]];function toPoint(p,s,d){return[p[0]+s*d[0],p[1]+s*d[1]]}var e=[b1[0]-a1[0],b1[1]-a1[1]];var kross=crossProduct(va,vb);var sqrKross=kross*kross;var sqrLenA=dotProduct(va,va);if(sqrKross>0){var s=crossProduct(e,vb)/kross;if(s<0||s>1)return null;var t=crossProduct(e,va)/kross;if(t<0||t>1)return null;if(s===0||s===1)return noEndpointTouch?null:[toPoint(a1,s,va)];if(t===0||t===1)return noEndpointTouch?null:[toPoint(b1,t,vb)];return[toPoint(a1,s,va)]}kross=crossProduct(e,va);sqrKross=kross*kross;if(sqrKross>0)return null;var sa=dotProduct(va,e)/sqrLenA;var sb=sa+dotProduct(va,vb)/sqrLenA;var smin=Math.min(sa,sb);var smax=Math.max(sa,sb);if(smin<=1&&smax>=0){if(smin===1)return noEndpointTouch?null:[toPoint(a1,smin>0?smin:0,va)];if(smax===0)return noEndpointTouch?null:[toPoint(a1,smax<1?smax:1,va)];if(noEndpointTouch&&smin===0&&smax===1)return null;return[toPoint(a1,smin>0?smin:0,va),toPoint(a1,smax<1?smax:1,va)]}return null}function possibleIntersection(se1,se2,queue){var inter=intersection(se1.point,se1.otherEvent.point,se2.point,se2.otherEvent.point);var nintersections=inter?inter.length:0;if(nintersections===0)return 0;if(nintersections===1&&(equals(se1.point,se2.point)||equals(se1.otherEvent.point,se2.otherEvent.point)))return 0;if(nintersections===2&&se1.isSubject===se2.isSubject)return 0;if(nintersections===1){if(!equals(se1.point,inter[0])&&!equals(se1.otherEvent.point,inter[0]))divideSegment(se1,inter[0],queue);if(!equals(se2.point,inter[0])&&!equals(se2.otherEvent.point,inter[0]))divideSegment(se2,inter[0],queue);return 1}var events=[];var leftCoincide=false;var rightCoincide=false;if(equals(se1.point,se2.point))leftCoincide=true;else if(compareEvents(se1,se2)===1)events.push(se2,se1);else events.push(se1,se2);if(equals(se1.otherEvent.point,se2.otherEvent.point))rightCoincide=true;else if(compareEvents(se1.otherEvent,se2.otherEvent)===1)events.push(se2.otherEvent,se1.otherEvent);else events.push(se1.otherEvent,se2.otherEvent);if(leftCoincide&&rightCoincide||leftCoincide){se2.type=NON_CONTRIBUTING;se1.type=se2.inOut===se1.inOut?SAME_TRANSITION:DIFFERENT_TRANSITION;if(leftCoincide&&!rightCoincide)divideSegment(events[1].otherEvent,events[0].point,queue);return 2}if(rightCoincide){divideSegment(events[0],events[1].point,queue);return 3}if(events[0]!==events[3].otherEvent){divideSegment(events[0],events[1].point,queue);divideSegment(events[1],events[2].point,queue);return 3}divideSegment(events[0],events[1].point,queue);divideSegment(events[3].otherEvent,events[2].point,queue);return 3}function compareSegments(le1,le2){if(le1===le2)return 0;if(signedArea(le1.point,le1.otherEvent.point,le2.point)!==0||signedArea(le1.point,le1.otherEvent.point,le2.otherEvent.point)!==0){if(equals(le1.point,le2.point))return le1.isBelow(le2.otherEvent.point)?-1:1;if(le1.point[0]===le2.point[0])return le1.point[1]le2.contourId?1:-1}}else return le1.isSubject?-1:1;return compareEvents(le1,le2)===1?1:-1}function subdivide(eventQueue,subject,clipping,sbbox,cbbox,operation){var sweepLine=new SplayTree(compareSegments);var sortedEvents=[];var rightbound=Math.min(sbbox[2],cbbox[2]);var prev,next,begin;while(eventQueue.length!==0){var event=eventQueue.pop();sortedEvents.push(event);if(operation===INTERSECTION&&event.point[0]>rightbound||operation===DIFFERENCE&&event.point[0]>sbbox[2])break;if(event.left){next=prev=sweepLine.insert(event);begin=sweepLine.minNode();if(prev!==begin)prev=sweepLine.prev(prev);else prev=null;next=sweepLine.next(next);var prevEvent=prev?prev.key:null;var prevprevEvent=void 0;computeFields(event,prevEvent,operation);if(next)if(possibleIntersection(event,next.key,eventQueue)===2){computeFields(event,prevEvent,operation);computeFields(event,next.key,operation)}if(prev)if(possibleIntersection(prev.key,event,eventQueue)===2){var prevprev=prev;if(prevprev!==begin)prevprev=sweepLine.prev(prevprev);else prevprev=null;prevprevEvent=prevprev?prevprev.key:null;computeFields(prevEvent,prevprevEvent,operation);computeFields(event,prevEvent,operation)}}else{event=event.otherEvent;next=prev=sweepLine.find(event);if(prev&&next){if(prev!==begin)prev=sweepLine.prev(prev);else prev=null;next=sweepLine.next(next);sweepLine.remove(event);if(next&&prev)possibleIntersection(prev.key,next.key,eventQueue)}}}return sortedEvents}var Contour=function Contour(){this.points=[];this.holeIds=[];this.holeOf=null;this.depth=null};function orderEvents(sortedEvents){var event,i,len,tmp;var resultEvents=[];for(i=0,len=sortedEvents.length;iorigPos)newPos--;return newPos}function initializeContourFromContext(event,contours,contourId){var contour=new Contour;if(event.prevInResult!=null){var prevInResult=event.prevInResult;var lowerContourId=prevInResult.outputContourId;var lowerResultTransition=prevInResult.resultTransition;if(lowerResultTransition>0){var lowerContour=contours[lowerContourId];if(lowerContour.holeOf!=null){var parentContourId=lowerContour.holeOf;contours[parentContourId].holeIds.push(contourId);contour.holeOf=parentContourId;contour.depth=contours[lowerContourId].depth}else{contours[lowerContourId].holeIds.push(contourId);contour.holeOf=lowerContourId;contour.depth=contours[lowerContourId].depth+1}}else{contour.holeOf=null;contour.depth=contours[lowerContourId].depth}}else{contour.holeOf=null;contour.depth=0}return contour}function connectEdges(sortedEvents){var i,len;var resultEvents=orderEvents(sortedEvents);var processed={};var contours=[];var loop=function(){if(processed[i])return;var contourId=contours.length;var contour=initializeContourFromContext(resultEvents[i],contours,contourId);var markAsProcessed=function(pos){processed[pos]=true;resultEvents[pos].outputContourId=contourId};var pos=i;var origPos=i;var initial=resultEvents[i].point;contour.points.push(initial);while(true){markAsProcessed(pos);pos=resultEvents[pos].otherPos;markAsProcessed(pos);contour.points.push(resultEvents[pos].point);pos=nextPos(pos,resultEvents,processed,origPos);if(pos==origPos)break}contours.push(contour)};for(i=0,len=resultEvents.length;i0)for(var i=(this.length>>1)-1;i>=0;i--)this._down(i)}function defaultCompare(a,b){return ab?1:0}TinyQueue.prototype={push:function(item){this.data.push(item);this.length++;this._up(this.length-1)},pop:function(){if(this.length===0)return undefined;var top=this.data[0];this.length--;if(this.length>0){this.data[0]=this.data[this.length];this._down(0)}this.data.pop();return top},peek:function(){return this.data[0]},_up:function(pos){var data=this.data;var compare=this.compare;var item=data[pos];while(pos>0){var parent=pos-1>>1;var current=data[parent];if(compare(item,current)>=0)break;data[pos]=current;pos=parent}data[pos]=item},_down:function(pos){var data=this.data;var compare=this.compare;var halfLength=this.length>>1;var item=data[pos];while(pos=0)break;data[pos]=best;pos=left}data[pos]=item}},tinyqueue.default=default_1;var max=Math.max,min=Math.min,contourId=0;function processPolygon(contourOrHole,isSubject,depth,Q,bbox,isExteriorRing){var i,len,s1,s2,e1,e2;for(i=0,len=contourOrHole.length-1;i0)e2.left=true;else e1.left=true;var x=s1[0],y=s1[1];bbox[0]=min(bbox[0],x);bbox[1]=min(bbox[1],y);bbox[2]=max(bbox[2],x);bbox[3]=max(bbox[3],y);Q.push(e1);Q.push(e2)}}function fillQueue(subject,clipping,sbbox,cbbox,operation){var eventQueue=new tinyqueue(null,compareEvents);var polygonSet,isExteriorRing,i,ii,j,jj;for(i=0,ii=subject.length;icbbox[2]||cbbox[0]>sbbox[2]||sbbox[1]>cbbox[3]||cbbox[1]>sbbox[3])if(operation===INTERSECTION)result=EMPTY;else if(operation===DIFFERENCE)result=subject;else if(operation===UNION||operation===XOR)result=subject.concat(clipping);return result}function boolean(subject,clipping,operation){if(typeof subject[0][0][0]==="number")subject=[subject];if(typeof clipping[0][0][0]==="number")clipping=[clipping];var trivial=trivialOperation(subject,clipping,operation);if(trivial)return trivial===EMPTY?null:trivial;var sbbox=[Infinity,Infinity,-Infinity,-Infinity];var cbbox=[Infinity,Infinity,-Infinity,-Infinity];var eventQueue=fillQueue(subject,clipping,sbbox,cbbox,operation);trivial=compareBBoxes(subject,clipping,sbbox,cbbox,operation);if(trivial)return trivial===EMPTY?null:trivial;var sortedEvents=subdivide(eventQueue,subject,clipping,sbbox,cbbox,operation);var contours=connectEdges(sortedEvents);var polygons=[];for(var i=0;ipt[1]!=yj>pt[1]&&pt[0]<(xj-xi)*(pt[1]-yi)/(yj-yi)+xi&&(isInside=!isInside)}return isInside}return insidePoly},GeometryUtilCls.prototype.isPointInBbox=function(pt,bbox){for(var minX=1/0,minY=1/0,maxX=-1/0,maxY=-1/0,i=0;iminX&&pt[0]minY&&pt[1](cp2[1]-cp1[1])*(p[0]-cp1[0])},intersection=function(){var dc=[cp1[0]-cp2[0],cp1[1]-cp2[1]],dp=[s[0]-e[0],s[1]-e[1]],n1=cp1[0]*cp2[1]-cp1[1]*cp2[0],n2=s[0]*e[1]-s[1]*e[0],n3=1/(dc[0]*dp[1]-dc[1]*dp[0]);return[(n1*dp[0]-n2*dc[0])*n3,(n1*dp[1]-n2*dc[1])*n3]},outputList=subjectPolygon=this.makesureAntiClockwise(subjectPolygon),cp1=(clipPolygon=this.makesureClockwise(clipPolygon))[clipPolygon.length-1],j=0,jlen=clipPolygon.length;jSUBDIVISION_PRECISION&&++i>=0),easeFunction},createObjectURL:function(code,contentType){void 0===contentType&&(contentType="text/javascript; charset=utf-8");var url=null;try{url=(globalInstance.URL||globalInstance.webkitURL).createObjectURL(new Blob([code],{type:contentType}))}catch(e){url=null}return url},revokeObjectURL:function(url){try{(globalInstance.URL||globalInstance.webkitURL).revokeObjectURL(url)}catch(e){}},arrayToVIObj:function(array){for(var obj={},i=0,l=array.length;iarray.length&&(e=array.length);for(var j=s;j>24&255)/255,(hex>>16&255)/255,(hex>>8&255)/255,(255&hex)/255]},isEmpty:function(obj){for(var i in obj)if(obj.hasOwnProperty(i))return!1;return!0},delArrayItem:function(array,n){return 0<=n&&array.splice(n,1),array},startsWith:function(_long,_short){return _long.startsWith?_long.startsWith(_short):_long.substr(0,_short.length)===_short},deleteItemFromArray:function(array,item){item=Util.indexOf(array,item);return Util.delArrayItem(array,item)},deleteItemFromArrayByIndex:function(array,index){return Util.delArrayItem(array,index)},filter:function(array,fun,context){var ret=[];return Util.each(array,function(item,i){fun.call(context,item,i)&&ret.push(item)}),ret},indexOf:function(array,item){if(array&&array.length){if(array.indexOf)return array.indexOf(item);for(var i=0;i=zooms[0]&&zoom<=zooms[1]},getTileTagByZoom:function(key,optimalZoom,forceAll){void 0===forceAll&&(forceAll=!1);key=(key=void 0===key?"":key).split(",")[0]||"";return!forceAll&&key&&optimalZoom&&TagMap[optimalZoom]||"all"},getTileTagByZ:function(z,optimalZoom,forceAll){return!(forceAll=void 0!==forceAll&&forceAll)&&z&&optimalZoom&&TagMap[optimalZoom]||"all"},containTag:function(tag1,tag2){return!(!tag1||!tag2)&&(tag1=this.getNumberByTag(tag1),this.getNumberByTag(tag2)<=tag1)},getNumberTag:function(tag){var numberTag;switch(tag=void 0===tag?"all":tag){case"lite":numberTag=0;break;case"left":numberTag=1;break;default:numberTag=2}return numberTag},getStringTag:function(tag){var numberTag;switch(tag=void 0===tag?2:tag){case 0:numberTag=NebulaTagType.LITE;break;case 1:numberTag=NebulaTagType.LEFT;break;default:numberTag=NebulaTagType.ALL}return numberTag},getNumberByTag:function(tag){var tagNumber=0;switch(tag){case"lite":tagNumber=0;break;case"left":tagNumber=1;break;case"all":tagNumber=2}return tagNumber}};function timeoutDefer(fn){var time=+new Date,timeToCall=Math.max(0,(Browser.android?50:20)-(time-lastTime));return lastTime=time+timeToCall,globalInstance.setTimeout(fn,50)}function timeoutClear(id){globalInstance.clearTimeout(id)}function getPrefixed(name){for(var fn,prefixes=["webkit","moz","o","ms"],i=0;i.plan dt>.afterdt{height:100%}.amap-lib-driving .plan dt.walk .beforedt{left:-27px;width:10px;height:10px;margin-top:-6px;border:2px solid #ddd}.amap-lib-driving .plan dt.bus .beforedt,.amap-lib-driving .plan dt.subway .beforedt{left:-31px;width:24px;height:24px;margin-top:-12px;background-image:url(https://webapi.amap.com/theme/v1.3/images/newpc/diricon.png)}.amap-lib-driving .plan dt.bus .afterdt{background-color:#33a7ff}.amap-lib-driving .plan dt.subway .afterdt{background-color:#3baeca}.amap-lib-driving .plan dt.bus .beforedt{background-position:-164px -102px}.amap-lib-driving .plan dt.subway .beforedt{background-position:-243px -101px}.amap-lib-driving .plan-nobus{margin:0}.amap-lib-driving .plan-nobus dt span{display:block;line-height:18px}.amap-lib-driving .plan-nobus dt .beforedt{left:-31px;width:21px;height:21px;margin-top:-12px;border:1px solid #ddd;background-image:url(https://webapi.amap.com/theme/v1.3/images/newpc/diricon.png)}.amap-lib-driving .plan-nobus dt.end .beforedt,.amap-lib-driving .plan-nobus dt.start .beforedt,.amap-lib-driving .plan-nobus dt.via .beforedt{border:none}.amap-lib-driving .plan-nobus dt.turn-go .beforedt{background-image:url(https://webapi.amap.com/theme/v1.3/images/newpc/icon/turn-go.png)}.amap-lib-driving .plan-nobus dt.turn-advance .beforedt{background-position:-46px -23px}.amap-lib-driving .plan-nobus dt.turn-left .beforedt{background-position:-87px -23px}.amap-lib-driving .plan-nobus dt.turn-right .beforedt{background-position:-124px -23px}.amap-lib-driving .plan-nobus dt.turn-keepleft .beforedt{background-position:-406px -23px}.amap-lib-driving .plan-nobus dt.turn-keepright .beforedt{background-position:-445px -23px}.amap-lib-driving .plan-nobus dt.turn-leftup .beforedt{background-position:-165px -23px}.amap-lib-driving .plan-nobus dt.turn-leftdown .beforedt{background-position:-246px -23px}.amap-lib-driving .plan-nobus dt.turn-rightup .beforedt{background-position:-206px -23px}.amap-lib-driving .plan-nobus dt.turn-rightdown .beforedt{background-position:-284px -23px}.amap-lib-driving .plan-nobus dt.turn-leftback .beforedt{background-position:-327px -23px}.amap-lib-driving .plan-nobus dt.turn-rightback .beforedt{background-position:-365px -23px}.amap-lib-driving .plan-nobus dt.turn-enterRing .beforedt{background-position:-561px -23px}.amap-lib-driving .plan-nobus dt.turn-leaveRing .beforedt{background-position:-602px -23px}.amap-lib-driving .plan-nobus dt.turn-slow .beforedt{background-position:-524px -23px}.amap-lib-driving .plan-nobus dt.turn-crosswalk .beforedt{background-position:-126px -184px}.amap-lib-driving .plan-nobus dt.turn-overpass .beforedt{background-position:-164px -184px}.amap-lib-driving .plan-nobus dt.turn-underpass .beforedt{background-position:-85px -184px}.amap-lib-driving .plan-nobus dt.turn-squarepass .beforedt{background-position:-204px -184px}.amap-lib-marker-from,.amap-lib-marker-mid,.amap-lib-marker-to{position:absolute;width:25px;height:30px;color:#e90000;background-size:100% 100%}.amap-lib-marker-from{background-image:url(https://a.amap.com/jsapi/static/image/plugin/marker/start.png);cursor:pointer}.amap-lib-marker-to{background-image:url(https://a.amap.com/jsapi/static/image/plugin/marker/end.png);cursor:pointer}.amap-lib-marker-mid{background-image:url(https://a.amap.com/jsapi/static/image/plugin/marker/mid.png)}.amap-combo-close{position:absolute;top:11px;right:10px;background:url(https://webapi.amap.com/theme/v1.3/images/amap-info.png) no-repeat -1px -151px;width:12px;height:12px;cursor:pointer}.amap-content-body{min-width:200px;max-width:240px;font-family:Helvetica,Hiragino Sans GB,Microsoft Yahei,微软雅黑,Arial,sans-serif;box-shadow:0 0 .5px rgba(0,0,100,.6);background:none repeat scroll 0 0 #fff;border-radius:2px;text-align:left;border:1px solid silver}.amap-combo-sharp{margin:0 auto;bottom:1px;position:relative;background:url(https://webapi.amap.com/theme/v1.3/images/amap-info.png) no-repeat -5px -564px;width:18px;height:9px}.amap-lib-infowindow{padding:0;position:relative;background-color:#fff;margin:8px}.amap-lib-infowindow-title{line-height:22px;font-size:14px;border-bottom:1px solid #99adce;padding-right:15px}.amap-lib-infowindow-content{padding-top:5px;overflow:hidden;font-size:12px;zoom:1}'); _jsload_('AMap.Driving', '!function(AMap){"use strict";function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i0){drivingPaths=[drivingPaths]}drivingPaths.steps=steps;this.clearRoute();this._route=this.addOverlays([],walkPaths,drivingPaths,{strokeOpacity:.4})};me.clearRoute=function(){if(this._route){for(var i=0;i0){drivingPaths=[drivingPaths]}drivingPaths.steps=steps;this.clearOverlays(1);this._overlays=this.addOverlays(points,walkPaths,drivingPaths);if(me.options["autoFitView"]){me.options.map.setFitView(this._overlays)}};me.addOverlays=function(points,walkPaths,drivingPaths,styleOptions){var _this=this;var map=this.options.map;styleOptions=styleOptions||{strokeOpacity:1};var _overlays=[];if(!this.hideMarkers){if(points[0]){if(!this.startMarker){this.startMarker=new AMap.Marker({offset:markerOffset,map:map,content:\'
\',innerOverlay:true});this.startMarker.isOfficial=true}var start=this.startMarker;start.setPosition(points[0].location);start.setMap(map);start._data=points[0];start.on("click",this.listener.markerClick);AMap.Event.addListener(start,"click",this.listener.markerClick);_overlays.push(start)}if(points.length>1){if(!this.endMarker){this.endMarker=new AMap.Marker({offset:markerOffset,map:map,content:\'
\',innerOverlay:true});this.endMarker.isOfficial=true}var end=this.endMarker;end.setPosition(points[points.length-1].location);end.setMap(map);end._data=points[points.length-1];end.on("click",this.listener.markerClick);AMap.Event.addListener(end,"click",this.listener.markerClick);_overlays.push(end)}for(var i=1,point;i\',innerOverlay:true});point._data=points[i];AMap.Event.addListener(point,"click",this.listener.markerClick)}point.isOfficial=true;_overlays.push(point)}}styleOptions=me.util.extend({},me._styleOpts,styleOptions);for(var _i2=0,drivingPath;_i2"+route.policy+"":"";var result=me.util.getTime(route.time)+"("+me.util.getDistance(route.distance)+")"+policy;return result};me.util={};me.util.extend=function(dest){var sources=Array.prototype.slice.call(arguments,1),i,j,len,src;for(j=0,len=sources.length;j0){me.listener.unfocusTitleClick.call(unfocusTitles[0])}};me.listener={};me.listener.markerClick=function(){var data=this._data;if(data.type==="start"||data.type==="end"){me._infoWindow.setOffset(new AMap.Pixel(0,-30))}else{me._infoWindow.setOffset(new AMap.Pixel(0,0))}if(data.name==="起点"||data.name==="终点"||data.name==="途经点");else{me._infoWindow.setContent(me.view.createInfowindowContent(data));me._infoWindow.open(me.options.map,this.getPosition())}me.options.map.setCenter(this.getPosition())};me.listener.routeStepItem=function(){if(!me.options.map){var _p=this.parentNode;var _children=_p.children;var _stepIndex;for(var i=0,child;i<_children.length;i++){child=_children[i];if(child===this){_stepIndex=i;break}}me._eventSelf.emit("panelClick",{stepIndex:_stepIndex});return}if(me._highlightOverlay){me._highlightOverlay.setMap(null)}this.style.backgroundColor="rgb(240, 240, 240)";if(me.listener.routeStepItem.last){me.listener.routeStepItem.last.style.backgroundColor=""}me.listener.routeStepItem.last=this;var p=this.parentNode;var children=p.children;var stepIndex;for(var _i5=0,_child;_i5\');c.push(\'
\'+data.name+\' 详情»
\');c.push(\'
\');c.push(\'
\');c.push("
地址:"+data.address+"
");if(data.tel){c.push("
电话:"+data.tel+"
")}c.push("
");c.push("
");c.push("");div.innerHTML=c.join("");var sharp=document.createElement("div");sharp.className="amap-combo-sharp";div.appendChild(sharp);var close=document.createElement("div");close.className="amap-combo-close";div.appendChild(close);close.href="javascript: void(0)";AMap.Event.addDomListener(close,"touchend",function(e){me._infoWindow["close"]()});AMap.Event.addDomListener(close,"click",function(e){me._infoWindow["close"]()});content.appendChild(div);content.appendChild(close);content.appendChild(sharp);return content};me.view.createPanel=function(data){var div=document.createElement("div");div.className="amap-lib-driving";if(!data.routes){div.innerHTML="抱歉,没有合适的路线。";return div}var result=[];for(var i=0,route;i");if(roadNameArray.length>4){roadNameArray.splice(2,roadNameArray.length-4,"......");roadNames2=roadNameArray.join(">")}else{roadNames2=roadNames}var r=[];r.push(\'
\');r.push("

\');r.push(" "+roadNames2+"");r.push("

");r.push("

"+title+"

");var d=me.options.data;r.push(\' ");r.push("
");return r};me.view.createOpenitemDiv=function(index,title,data,isDisplay){var route=data.routes[index],steps=route.steps;var r=[];r.push(\'
\');r.push("
"+data.start.name+"
");for(var i=0,step;i \');r.push("
"+step.instruction);r.push(" ")}r.push("
"+data.end.name+"
");r.push("
");return r};me.getSigns=function(action){var signs="";var routeSign={"左转":"left","右转":"right","靠左":"keepleft","靠右":"keepright","向左前方行驶":"leftup","向左后方行驶":"leftdown","向右前方行驶":"rightup","向右后方行驶":"rightdown","左转调头":"leftback","右转调头":"rightback","进入环岛":"enterRing","离开环岛":"leaveRing","减速行驶":"slow","向左前方行走":"leftup","向左后方行走":"leftdown","向右前方行走":"rightup","向右后方行走":"rightdown","通过人行横道":"crosswalk","通过过街天桥":"overpass","通过地下通道":"underpass","通过广场":"squarepass"};signs=routeSign[action];if(!signs){signs="advance"}return signs}};var GetLL=function(){function GetLL(city){_classCallCheck(this,GetLL);this.city=city||"";this.CLASS_NAME="AMap.GetLL"}_createClass(GetLL,[{key:"getCity",value:function getCity(cbk){var url=AMap.getConfig().protocol+"://webapi.amap.com/maps/ipCity";AMap.WebService.get(url,{},function(status,data){if(status==="complete"){cbk(data)}else{cbk({})}})}},{key:"get",value:function get(keywordsList,defaultCity,cbk){var psearch=new PlaceSearch({extensions:"all"});var result=[];var getOne=function getOne(){if(keywordsList.length){var keyAndcity=keywordsList.shift();var keyword=keyAndcity["keyword"];var city=keyAndcity["city"]||defaultCity;if(!city){city=""}psearch["setCity"](city);psearch.search(keyword,function(status,data){if(status==="error"){cbk("error",data)}else if(status==="complete"){if(data["poiList"]&&data["poiList"]["pois"].length){result.push(data["poiList"]["pois"][0]);if(keywordsList.length){getOne()}else{cbk("complete",result)}}else{if(!city){cbk("no_city",keyAndcity)}else{cbk("no_poi",keyAndcity)}}}else if(status==="no_data"){if(!city){cbk("no_city",keyAndcity)}else{cbk("no_poi",keyAndcity)}}})}};getOne()}}]);return GetLL}();var PlaceSearch=function(_AMap$Event){_inherits(PlaceSearch,_AMap$Event);var _super=_createSuper(PlaceSearch);function PlaceSearch(opt){var _this;_classCallCheck(this,PlaceSearch);_this=_super.call(this);_this.closed=false;_this.opt=AMap.extend({showCover:true,autoFitView:true},opt||{});_this.opt["pageIndex"]=_this.opt["pageIndex"]||1;_this.opt["pageSize"]=typeof _this.opt["pageSize"]!=="number"||_this.opt["pageSize"]<0?10:_this.opt["pageSize"]>50?50:_this.opt["pageSize"];_this.url=AMap.getConfig().server+"/v3/place";return _this}_createClass(PlaceSearch,[{key:"search",value:function search(keyword,cbk){var params={s:"rsv3",children:+(this.opt["children"]?"1":"")};var map={city:"city",rankBy:"sortrule",type:"types",pageIndex:"page",pageSize:"offset",extensions:"extensions",citylimit:"citylimit"};this._mergeParams(this.opt,map,params);this._query(this.url+"/text",params,cbk,{keywords:keyword||""},"KEYWORD",arguments)}},{key:"setCity",value:function setCity(city){AMap.BuryPoint.add(this,"setCity");this.opt["city"]=city}},{key:"_mergeParams",value:function _mergeParams(data,map,params){for(var i in data){if(typeof data[i]!=="undefined"&&typeof map[i]!=="undefined"){params[map[i]]=data[i]}}return params}},{key:"_query",value:function _query(url,params,cbk,encodeURICom,type,args){var _this2=this;url=url+(params.length>0?"?"+params.join("&"):"");AMap.WebService.get(url,AMap.extend({type_:type,antiCrab:true},params,encodeURICom),function(status,data){if(status==="complete"){_this2._onComplete(data,cbk,type,args)}else{_this2._onError(data,cbk)}})}},{key:"_onComplete",value:function _onComplete(data,cbk,type,args){if(this.closed){return}var result;if(!parseInt(data.status,10)){result={info:data["info"]};AMap.Event.trigger(this,"error",result);if(cbk&&typeof cbk==="function"){cbk("error",data["info"])}}else{result={info:data["info"],poiList:{}};result["poiList"]={pois:[],count:parseInt(data["count"],10),pageIndex:this.opt["pageIndex"],pageSize:this.opt["pageSize"]};if(data["pois"]){for(var i=0;i0){poiDeepInfo["groupbuys"]=[]}for(var n=0;n0){poiDeepInfo["discounts"]=[]}for(var dis=0;dis0){args[0]=AMap.Util.parseLngLatData(args[0]);args[1]=AMap.Util.parseLngLatData(args[1]);if(args[0].lng&&args[0].lat){this.search_.apply(this,args)}else if(args[0]instanceof Array){var this_=this;var cbk=args[1];if(!this_.getLL){this_.getLL=new GetLL}this_.getLL.getCity(function(data){var city=data["citycode"]||"";this_.getLL.get(args[0],city,function(status,result){if(status==="error"){if(cbk&&typeof cbk==="function"){cbk("error",result)}}else if(status==="complete"){var start=result[0]["exit_location"]||result[0].location;var end=result[result.length-1]["entr_location"]||result[result.length-1].location;var wps=result.slice(1,result.length-1),ps=[];for(var i=0;i0)){result[pro]=filter.call(this,data[i][pro],pro,result)}else{result[pro]=data[i][pro]}}}results.push(result)}return results.length?results:null}},{key:"_isArray",value:function _isArray(array){if(Object.prototype.toString.call(array)==="[object Array]"){return true}return false}},{key:"close",value:function close(){this.closed=true}},{key:"open",value:function open(){this.closed=false}},{key:"_onComplete",value:function _onComplete(data,cbk,poiresult,extraOpts){if(this.closed){return}var result;var that=this;if(!parseInt(data["status"],10)){result={info:data["info"]};this.emit("error",result);if(cbk&&typeof cbk==="function"){cbk("error",data["info"])}}else{if(data["route"]){result={info:data["info"],origin:this._str2LngLat(data["route"]["origin"]),destination:this._str2LngLat(data["route"]["destination"]),routes:this._parseRoutes(data["route"]["paths"])};if(this.opt["extensions"]==="all"){result["taxi_cost"]=Math.ceil(data["route"]["taxi_cost"])}if(poiresult){result["start"]=poiresult[0];result["end"]=poiresult[poiresult.length-1];result["originName"]=result["start"].name;result["destinationName"]=result["end"].name;result["waypoints"]=poiresult.slice(1,poiresult.length-1);for(var i=0,len=result["waypoints"].length;i