index-b30db17c.js 121 KB

123456
  1. import{n as K,v as fe,V as pe}from"./index-f4ef3c99.js";const ot=(n,t)=>{const e=t.x-n.x,r=t.y-n.y;return Math.sqrt(e*e+r*r)},he=(n,t)=>{const e=t.x-n.x,r=t.y-n.y;return me(Math.atan2(r,e))},de=(n,t,e)=>{const r={x:0,y:0};return e=ht(e),r.x=n.x-t*Math.cos(e),r.y=n.y-t*Math.sin(e),r},ht=n=>n*(Math.PI/180),me=n=>n*(180/Math.PI),ve=n=>isNaN(n.buttons)?n.pressure!==0:n.buttons!==0,ft=new Map,kt=n=>{ft.has(n)&&clearTimeout(ft.get(n)),ft.set(n,setTimeout(n,100))},ut=(n,t,e)=>{const r=t.split(/[ ,]+/g);let o;for(let i=0;i<r.length;i+=1)o=r[i],n.addEventListener?n.addEventListener(o,e,!1):n.attachEvent&&n.attachEvent(o,e)},Ot=(n,t,e)=>{const r=t.split(/[ ,]+/g);let o;for(let i=0;i<r.length;i+=1)o=r[i],n.removeEventListener?n.removeEventListener(o,e):n.detachEvent&&n.detachEvent(o,e)},Wt=n=>(n.preventDefault(),n.type.match(/^touch/)?n.changedTouches:n),Et=()=>{const n=window.pageXOffset!==void 0?window.pageXOffset:(document.documentElement||document.body.parentNode||document.body).scrollLeft,t=window.pageYOffset!==void 0?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop;return{x:n,y:t}},dt=(n,t)=>{t.top||t.right||t.bottom||t.left?(n.style.top=t.top,n.style.right=t.right,n.style.bottom=t.bottom,n.style.left=t.left):(n.style.left=t.x+"px",n.style.top=t.y+"px")},wt=(n,t,e)=>{const r=Yt(n);for(let o in r)if(r.hasOwnProperty(o))if(typeof t=="string")r[o]=t+" "+e;else{let i="";for(let c=0,s=t.length;c<s;c+=1)i+=t[c]+" "+e+", ";r[o]=i.slice(0,-2)}return r},ye=(n,t)=>{const e=Yt(n);for(let r in e)e.hasOwnProperty(r)&&(e[r]=t);return e},Yt=n=>{const t={};return t[n]="",["webkit","Moz","o"].forEach(function(r){t[r+n.charAt(0).toUpperCase()+n.slice(1)]=""}),t},pt=(n,t)=>{for(let e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n},ge=(n,t)=>{const e={};for(let r in n)n.hasOwnProperty(r)&&t.hasOwnProperty(r)?e[r]=t[r]:n.hasOwnProperty(r)&&(e[r]=n[r]);return e},mt=(n,t)=>{if(n.length)for(let e=0,r=n.length;e<r;e+=1)t(n[e]);else t(n)},_e=(n,t,e)=>({x:Math.min(Math.max(n.x,t.x-e),t.x+e),y:Math.min(Math.max(n.y,t.y-e),t.y+e)});var be="ontouchstart"in window,we=!!window.PointerEvent,xe=!!window.MSPointerEvent,Q={touch:{start:"touchstart",move:"touchmove",end:"touchend, touchcancel"},mouse:{start:"mousedown",move:"mousemove",end:"mouseup"},pointer:{start:"pointerdown",move:"pointermove",end:"pointerup, pointercancel"},MSPointer:{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}},G,et={};we?G=Q.pointer:xe?G=Q.MSPointer:be?(G=Q.touch,et=Q.mouse):G=Q.mouse;function U(){}U.prototype.on=function(n,t){var e=this,r=n.split(/[ ,]+/g),o;e._handlers_=e._handlers_||{};for(var i=0;i<r.length;i+=1)o=r[i],e._handlers_[o]=e._handlers_[o]||[],e._handlers_[o].push(t);return e};U.prototype.off=function(n,t){var e=this;return e._handlers_=e._handlers_||{},n===void 0?e._handlers_={}:t===void 0?e._handlers_[n]=null:e._handlers_[n]&&e._handlers_[n].indexOf(t)>=0&&e._handlers_[n].splice(e._handlers_[n].indexOf(t),1),e};U.prototype.trigger=function(n,t){var e=this,r=n.split(/[ ,]+/g),o;e._handlers_=e._handlers_||{};for(var i=0;i<r.length;i+=1)o=r[i],e._handlers_[o]&&e._handlers_[o].length&&e._handlers_[o].forEach(function(c){c.call(e,{type:o,target:e},t)})};U.prototype.config=function(n){var t=this;t.options=t.defaults||{},n&&(t.options=ge(t.options,n))};U.prototype.bindEvt=function(n,t){var e=this;return e._domHandlers_=e._domHandlers_||{},e._domHandlers_[t]=function(){typeof e["on"+t]=="function"?e["on"+t].apply(e,arguments):console.warn('[WARNING] : Missing "on'+t+'" handler.')},ut(n,G[t],e._domHandlers_[t]),et[t]&&ut(n,et[t],e._domHandlers_[t]),e};U.prototype.unbindEvt=function(n,t){var e=this;return e._domHandlers_=e._domHandlers_||{},Ot(n,G[t],e._domHandlers_[t]),et[t]&&Ot(n,et[t],e._domHandlers_[t]),delete e._domHandlers_[t],this};function P(n,t){return this.identifier=t.identifier,this.position=t.position,this.frontPosition=t.frontPosition,this.collection=n,this.defaults={size:100,threshold:.1,color:"white",fadeTime:250,dataOnly:!1,restJoystick:!0,restOpacity:.5,mode:"dynamic",zone:document.body,lockX:!1,lockY:!1,shape:"circle"},this.config(t),this.options.mode==="dynamic"&&(this.options.restOpacity=0),this.id=P.id,P.id+=1,this.buildEl().stylize(),this.instance={el:this.ui.el,on:this.on.bind(this),off:this.off.bind(this),show:this.show.bind(this),hide:this.hide.bind(this),add:this.addToDom.bind(this),remove:this.removeFromDom.bind(this),destroy:this.destroy.bind(this),setPosition:this.setPosition.bind(this),resetDirection:this.resetDirection.bind(this),computeDirection:this.computeDirection.bind(this),trigger:this.trigger.bind(this),position:this.position,frontPosition:this.frontPosition,ui:this.ui,identifier:this.identifier,id:this.id,options:this.options},this.instance}P.prototype=new U;P.constructor=P;P.id=0;P.prototype.buildEl=function(n){return this.ui={},this.options.dataOnly?this:(this.ui.el=document.createElement("div"),this.ui.back=document.createElement("div"),this.ui.front=document.createElement("div"),this.ui.el.className="nipple collection_"+this.collection.id,this.ui.back.className="back",this.ui.front.className="front",this.ui.el.setAttribute("id","nipple_"+this.collection.id+"_"+this.id),this.ui.el.appendChild(this.ui.back),this.ui.el.appendChild(this.ui.front),this)};P.prototype.stylize=function(){if(this.options.dataOnly)return this;var n=this.options.fadeTime+"ms",t=ye("borderRadius","50%"),e=wt("transition","opacity",n),r={};return r.el={position:"absolute",opacity:this.options.restOpacity,display:"block",zIndex:999},r.back={position:"absolute",display:"block",width:this.options.size+"px",height:this.options.size+"px",marginLeft:-this.options.size/2+"px",marginTop:-this.options.size/2+"px",background:this.options.color,opacity:".5"},r.front={width:this.options.size/2+"px",height:this.options.size/2+"px",position:"absolute",display:"block",marginLeft:-this.options.size/4+"px",marginTop:-this.options.size/4+"px",background:this.options.color,opacity:".5"},pt(r.el,e),this.options.shape==="circle"&&pt(r.back,t),pt(r.front,t),this.applyStyles(r),this};P.prototype.applyStyles=function(n){for(var t in this.ui)if(this.ui.hasOwnProperty(t))for(var e in n[t])this.ui[t].style[e]=n[t][e];return this};P.prototype.addToDom=function(){return this.options.dataOnly||document.body.contains(this.ui.el)?this:(this.options.zone.appendChild(this.ui.el),this)};P.prototype.removeFromDom=function(){return this.options.dataOnly||!document.body.contains(this.ui.el)?this:(this.options.zone.removeChild(this.ui.el),this)};P.prototype.destroy=function(){clearTimeout(this.removeTimeout),clearTimeout(this.showTimeout),clearTimeout(this.restTimeout),this.trigger("destroyed",this.instance),this.removeFromDom(),this.off()};P.prototype.show=function(n){var t=this;return t.options.dataOnly||(clearTimeout(t.removeTimeout),clearTimeout(t.showTimeout),clearTimeout(t.restTimeout),t.addToDom(),t.restCallback(),setTimeout(function(){t.ui.el.style.opacity=1},0),t.showTimeout=setTimeout(function(){t.trigger("shown",t.instance),typeof n=="function"&&n.call(this)},t.options.fadeTime)),t};P.prototype.hide=function(n){var t=this;if(t.options.dataOnly)return t;if(t.ui.el.style.opacity=t.options.restOpacity,clearTimeout(t.removeTimeout),clearTimeout(t.showTimeout),clearTimeout(t.restTimeout),t.removeTimeout=setTimeout(function(){var e=t.options.mode==="dynamic"?"none":"block";t.ui.el.style.display=e,typeof n=="function"&&n.call(t),t.trigger("hidden",t.instance)},t.options.fadeTime),t.options.restJoystick){const e=t.options.restJoystick,r={};r.x=e===!0||e.x!==!1?0:t.instance.frontPosition.x,r.y=e===!0||e.y!==!1?0:t.instance.frontPosition.y,t.setPosition(n,r)}return t};P.prototype.setPosition=function(n,t){var e=this;e.frontPosition={x:t.x,y:t.y};var r=e.options.fadeTime+"ms",o={};o.front=wt("transition",["top","left"],r);var i={front:{}};i.front={left:e.frontPosition.x+"px",top:e.frontPosition.y+"px"},e.applyStyles(o),e.applyStyles(i),e.restTimeout=setTimeout(function(){typeof n=="function"&&n.call(e),e.restCallback()},e.options.fadeTime)};P.prototype.restCallback=function(){var n=this,t={};t.front=wt("transition","none",""),n.applyStyles(t),n.trigger("rested",n.instance)};P.prototype.resetDirection=function(){this.direction={x:!1,y:!1,angle:!1}};P.prototype.computeDirection=function(n){var t=n.angle.radian,e=Math.PI/4,r=Math.PI/2,o,i,c;if(t>e&&t<e*3&&!n.lockX?o="up":t>-e&&t<=e&&!n.lockY?o="left":t>-e*3&&t<=-e&&!n.lockX?o="down":n.lockY||(o="right"),n.lockY||(t>-r&&t<r?i="left":i="right"),n.lockX||(t>0?c="up":c="down"),n.force>this.options.threshold){var s={},a;for(a in this.direction)this.direction.hasOwnProperty(a)&&(s[a]=this.direction[a]);var u={};this.direction={x:i,y:c,angle:o},n.direction=this.direction;for(a in s)s[a]===this.direction[a]&&(u[a]=!0);if(u.x&&u.y&&u.angle)return n;(!u.x||!u.y)&&this.trigger("plain",n),u.x||this.trigger("plain:"+i,n),u.y||this.trigger("plain:"+c,n),u.angle||this.trigger("dir dir:"+o,n)}else this.resetDirection();return n};function R(n,t){var e=this;e.nipples=[],e.idles=[],e.actives=[],e.ids=[],e.pressureIntervals={},e.manager=n,e.id=R.id,R.id+=1,e.defaults={zone:document.body,multitouch:!1,maxNumberOfNipples:10,mode:"dynamic",position:{top:0,left:0},catchDistance:200,size:100,threshold:.1,color:"white",fadeTime:250,dataOnly:!1,restJoystick:!0,restOpacity:.5,lockX:!1,lockY:!1,shape:"circle",dynamicPage:!1,follow:!1},e.config(t),(e.options.mode==="static"||e.options.mode==="semi")&&(e.options.multitouch=!1),e.options.multitouch||(e.options.maxNumberOfNipples=1);const r=getComputedStyle(e.options.zone.parentElement);return r&&r.display==="flex"&&(e.parentIsFlex=!0),e.updateBox(),e.prepareNipples(),e.bindings(),e.begin(),e.nipples}R.prototype=new U;R.constructor=R;R.id=0;R.prototype.prepareNipples=function(){var n=this,t=n.nipples;t.on=n.on.bind(n),t.off=n.off.bind(n),t.options=n.options,t.destroy=n.destroy.bind(n),t.ids=n.ids,t.id=n.id,t.processOnMove=n.processOnMove.bind(n),t.processOnEnd=n.processOnEnd.bind(n),t.get=function(e){if(e===void 0)return t[0];for(var r=0,o=t.length;r<o;r+=1)if(t[r].identifier===e)return t[r];return!1}};R.prototype.bindings=function(){var n=this;n.bindEvt(n.options.zone,"start"),n.options.zone.style.touchAction="none",n.options.zone.style.msTouchAction="none"};R.prototype.begin=function(){var n=this,t=n.options;if(t.mode==="static"){var e=n.createNipple(t.position,n.manager.getIdentifier());e.add(),n.idles.push(e)}};R.prototype.createNipple=function(n,t){var e=this,r=e.manager.scroll,o={},i=e.options,c={x:e.parentIsFlex?r.x:r.x+e.box.left,y:e.parentIsFlex?r.y:r.y+e.box.top};if(n.x&&n.y)o={x:n.x-c.x,y:n.y-c.y};else if(n.top||n.right||n.bottom||n.left){var s=document.createElement("DIV");s.style.display="hidden",s.style.top=n.top,s.style.right=n.right,s.style.bottom=n.bottom,s.style.left=n.left,s.style.position="absolute",i.zone.appendChild(s);var a=s.getBoundingClientRect();i.zone.removeChild(s),o=n,n={x:a.left+r.x,y:a.top+r.y}}var u=new P(e,{color:i.color,size:i.size,threshold:i.threshold,fadeTime:i.fadeTime,dataOnly:i.dataOnly,restJoystick:i.restJoystick,restOpacity:i.restOpacity,mode:i.mode,identifier:t,position:n,zone:i.zone,frontPosition:{x:0,y:0},shape:i.shape});return i.dataOnly||(dt(u.ui.el,o),dt(u.ui.front,u.frontPosition)),e.nipples.push(u),e.trigger("added "+u.identifier+":added",u),e.manager.trigger("added "+u.identifier+":added",u),e.bindNipple(u),u};R.prototype.updateBox=function(){var n=this;n.box=n.options.zone.getBoundingClientRect()};R.prototype.bindNipple=function(n){var t=this,e,r=function(o,i){e=o.type+" "+i.id+":"+o.type,t.trigger(e,i)};n.on("destroyed",t.onDestroyed.bind(t)),n.on("shown hidden rested dir plain",r),n.on("dir:up dir:right dir:down dir:left",r),n.on("plain:up plain:right plain:down plain:left",r)};R.prototype.pressureFn=function(n,t,e){var r=this,o=0;clearInterval(r.pressureIntervals[e]),r.pressureIntervals[e]=setInterval(function(){var i=n.force||n.pressure||n.webkitForce||0;i!==o&&(t.trigger("pressure",i),r.trigger("pressure "+t.identifier+":pressure",i),o=i)}.bind(r),100)};R.prototype.onstart=function(n){var t=this,e=t.options,r=n;n=Wt(n),t.updateBox();var o=function(i){t.actives.length<e.maxNumberOfNipples?t.processOnStart(i):r.type.match(/^touch/)&&(Object.keys(t.manager.ids).forEach(function(c){if(Object.values(r.touches).findIndex(function(a){return a.identifier===c})<0){var s=[n[0]];s.identifier=c,t.processOnEnd(s)}}),t.actives.length<e.maxNumberOfNipples&&t.processOnStart(i))};return mt(n,o),t.manager.bindDocument(),!1};R.prototype.processOnStart=function(n){var t=this,e=t.options,r,o=t.manager.getIdentifier(n),i=n.force||n.pressure||n.webkitForce||0,c={x:n.pageX,y:n.pageY},s=t.getOrCreate(o,c);s.identifier!==o&&t.manager.removeIdentifier(s.identifier),s.identifier=o;var a=function(p){p.trigger("start",p),t.trigger("start "+p.id+":start",p),p.show(),i>0&&t.pressureFn(n,p,p.identifier),t.processOnMove(n)};if((r=t.idles.indexOf(s))>=0&&t.idles.splice(r,1),t.actives.push(s),t.ids.push(s.identifier),e.mode!=="semi")a(s);else{var u=ot(c,s.position);if(u<=e.catchDistance)a(s);else{s.destroy(),t.processOnStart(n);return}}return s};R.prototype.getOrCreate=function(n,t){var e=this,r=e.options,o;return/(semi|static)/.test(r.mode)?(o=e.idles[0],o?(e.idles.splice(0,1),o):r.mode==="semi"?e.createNipple(t,n):(console.warn("Coudln't find the needed nipple."),!1)):(o=e.createNipple(t,n),o)};R.prototype.processOnMove=function(n){var t=this,e=t.options,r=t.manager.getIdentifier(n),o=t.nipples.get(r),i=t.manager.scroll;if(!ve(n)){this.processOnEnd(n);return}if(!o){console.error("Found zombie joystick with ID "+r),t.manager.removeIdentifier(r);return}if(e.dynamicPage){var c=o.el.getBoundingClientRect();o.position={x:i.x+c.left,y:i.y+c.top}}o.identifier=r;var s=o.options.size/2,a={x:n.pageX,y:n.pageY};e.lockX&&(a.y=o.position.y),e.lockY&&(a.x=o.position.x);var u=ot(a,o.position),p=he(a,o.position),h=ht(p),l=u/s,f={distance:u,position:a},d,m;if(o.options.shape==="circle"?(d=Math.min(u,s),m=de(o.position,d,p)):(m=_e(a,o.position,s),d=ot(m,o.position)),e.follow){if(u>s){let S=a.x-m.x,O=a.y-m.y;o.position.x+=S,o.position.y+=O,o.el.style.top=o.position.y-(t.box.top+i.y)+"px",o.el.style.left=o.position.x-(t.box.left+i.x)+"px",u=ot(a,o.position)}}else a=m,u=d;var g=a.x-o.position.x,y=a.y-o.position.y;o.frontPosition={x:g,y},e.dataOnly||dt(o.ui.front,o.frontPosition);var _={identifier:o.identifier,position:a,force:l,pressure:n.force||n.pressure||n.webkitForce||0,distance:u,angle:{radian:h,degree:p},vector:{x:g/s,y:-y/s},raw:f,instance:o,lockX:e.lockX,lockY:e.lockY};_=o.computeDirection(_),_.angle={radian:ht(180-p),degree:180-p},o.trigger("move",_),t.trigger("move "+o.id+":move",_)};R.prototype.processOnEnd=function(n){var t=this,e=t.options,r=t.manager.getIdentifier(n),o=t.nipples.get(r),i=t.manager.removeIdentifier(o.identifier);!o||(e.dataOnly||o.hide(function(){e.mode==="dynamic"&&(o.trigger("removed",o),t.trigger("removed "+o.id+":removed",o),t.manager.trigger("removed "+o.id+":removed",o),o.destroy())}),clearInterval(t.pressureIntervals[o.identifier]),o.resetDirection(),o.trigger("end",o),t.trigger("end "+o.id+":end",o),t.ids.indexOf(o.identifier)>=0&&t.ids.splice(t.ids.indexOf(o.identifier),1),t.actives.indexOf(o)>=0&&t.actives.splice(t.actives.indexOf(o),1),/(semi|static)/.test(e.mode)?t.idles.push(o):t.nipples.indexOf(o)>=0&&t.nipples.splice(t.nipples.indexOf(o),1),t.manager.unbindDocument(),/(semi|static)/.test(e.mode)&&(t.manager.ids[i.id]=i.identifier))};R.prototype.onDestroyed=function(n,t){var e=this;e.nipples.indexOf(t)>=0&&e.nipples.splice(e.nipples.indexOf(t),1),e.actives.indexOf(t)>=0&&e.actives.splice(e.actives.indexOf(t),1),e.idles.indexOf(t)>=0&&e.idles.splice(e.idles.indexOf(t),1),e.ids.indexOf(t.identifier)>=0&&e.ids.splice(e.ids.indexOf(t.identifier),1),e.manager.removeIdentifier(t.identifier),e.manager.unbindDocument()};R.prototype.destroy=function(){var n=this;n.unbindEvt(n.options.zone,"start"),n.nipples.forEach(function(e){e.destroy()});for(var t in n.pressureIntervals)n.pressureIntervals.hasOwnProperty(t)&&clearInterval(n.pressureIntervals[t]);n.trigger("destroyed",n.nipples),n.manager.unbindDocument(),n.off()};function N(n){var t=this;t.ids={},t.index=0,t.collections=[],t.scroll=Et(),t.config(n),t.prepareCollections();var e=function(){var o;t.collections.forEach(function(i){i.forEach(function(c){o=c.el.getBoundingClientRect(),c.position={x:t.scroll.x+o.left,y:t.scroll.y+o.top}})})};ut(window,"resize",function(){kt(e)});var r=function(){t.scroll=Et()};return ut(window,"scroll",function(){kt(r)}),t.collections}N.prototype=new U;N.constructor=N;N.prototype.prepareCollections=function(){var n=this;n.collections.create=n.create.bind(n),n.collections.on=n.on.bind(n),n.collections.off=n.off.bind(n),n.collections.destroy=n.destroy.bind(n),n.collections.get=function(t){var e;return n.collections.every(function(r){return e=r.get(t),!e}),e}};N.prototype.create=function(n){return this.createCollection(n)};N.prototype.createCollection=function(n){var t=this,e=new R(t,n);return t.bindCollection(e),t.collections.push(e),e};N.prototype.bindCollection=function(n){var t=this,e,r=function(o,i){e=o.type+" "+i.id+":"+o.type,t.trigger(e,i)};n.on("destroyed",t.onDestroyed.bind(t)),n.on("shown hidden rested dir plain",r),n.on("dir:up dir:right dir:down dir:left",r),n.on("plain:up plain:right plain:down plain:left",r)};N.prototype.bindDocument=function(){var n=this;n.binded||(n.bindEvt(document,"move").bindEvt(document,"end"),n.binded=!0)};N.prototype.unbindDocument=function(n){var t=this;(!Object.keys(t.ids).length||n===!0)&&(t.unbindEvt(document,"move").unbindEvt(document,"end"),t.binded=!1)};N.prototype.getIdentifier=function(n){var t;return n?(t=n.identifier===void 0?n.pointerId:n.identifier,t===void 0&&(t=this.latest||0)):t=this.index,this.ids[t]===void 0&&(this.ids[t]=this.index,this.index+=1),this.latest=t,this.ids[t]};N.prototype.removeIdentifier=function(n){var t={};for(var e in this.ids)if(this.ids[e]===n){t.id=e,t.identifier=this.ids[e],delete this.ids[e];break}return t};N.prototype.onmove=function(n){var t=this;return t.onAny("move",n),!1};N.prototype.onend=function(n){var t=this;return t.onAny("end",n),!1};N.prototype.oncancel=function(n){var t=this;return t.onAny("end",n),!1};N.prototype.onAny=function(n,t){var e=this,r,o="processOn"+n.charAt(0).toUpperCase()+n.slice(1);t=Wt(t);var i=function(s,a,u){u.ids.indexOf(a)>=0&&(u[o](s),s._found_=!0)},c=function(s){r=e.getIdentifier(s),mt(e.collections,i.bind(null,s,r)),s._found_||e.removeIdentifier(r)};return mt(t,c),!1};N.prototype.destroy=function(){var n=this;n.unbindDocument(!0),n.ids={},n.index=0,n.collections.forEach(function(t){t.destroy()}),n.off()};N.prototype.onDestroyed=function(n,t){var e=this;if(e.collections.indexOf(t)<0)return!1;e.collections.splice(e.collections.indexOf(t),1)};const St=new N;var At={create:function(n){return St.create(n)},factory:St},Ce=function(){var n=this,t=n.$createElement;return n._self._c,n._m(0)},ke=[function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("div",[e("div",{attrs:{id:"ctrl-left"}}),e("div",{attrs:{id:"ctrl-right"}})])}];const Oe=n=>new Promise(t=>setTimeout(t,n)),Ee={data(){return{contrlR:null,contrlL:null,timer:null,Option:{left:"20%",right:"20%",bottom:"30%",mode:"static",lcolor:"red",rcolor:"green"},contrlData:{v0:128,v1:128,v2:128,v3:128}}},methods:{initContrl(){this.contrlL=At.create({zone:document.getElementById("ctrl-left"),mode:this.Option.mode,position:{left:this.Option.left,bottom:this.Option.bottom},color:this.Option.lcolor}),this.contrlR=At.create({zone:document.getElementById("ctrl-right"),mode:this.Option.mode,position:{right:this.Option.right,bottom:this.Option.bottom},color:this.Option.rcolor}),this.contrlL.on("move",this.contrlLeft),this.contrlR.on("move",this.contrlRight),this.contrlL.on("end",this.contrlLeft),this.contrlR.on("end",this.contrlRight),this.loop()},contrlLeft(n,t){const e=t.vector||{x:0,y:0};this.contrlData.v2=this.rotailContrl(e.x),this.contrlData.v3=this.rotailContrl(e.y)},contrlRight(n,t){const e=t.vector||{x:0,y:0};this.contrlData.v0=this.rotailContrl(e.x),this.contrlData.v1=this.rotailContrl(e.y)},rotailContrl(n){return Math.floor(Math.abs(n*128-128))},async loop(){await Oe(50),this.$emit("callBack",this.contrlData),this.timer=requestAnimationFrame(this.loop)},clearContrl(){this.timer&&cancelAnimationFrame(this.timer),this.contrlL&&this.contrlL.destroy(),this.contrlR&&this.contrlR.destroy()}},destroyed(){this.clearContrl()}},Tt={};var Se=K(Ee,Ce,ke,!1,Ae,null,null,null);function Ae(n){for(let t in Tt)this[t]=Tt[t]}var Te=function(){return Se.exports}(),$e=function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("div",{staticClass:"electric-panel",class:n.bgClass},[e("div",{staticClass:"panel"},[e("div",{staticClass:"remainder",style:{width:n.quantity+"%"}})])])},Re=[];const Me={name:"ElectricQuantity",props:["quantity"],computed:{bgClass(){return this.quantity>=40?"success":this.quantity>=20?"warning":(this.quantity>=1,"danger")}}},$t={};var Pe=K(Me,$e,Re,!1,Le,"405f4b07",null,null);function Le(n){for(let t in $t)this[t]=$t[t]}var Ne=function(){return Pe.exports}(),Be=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Ie(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function De(n){if(n.__esModule)return n;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(n).forEach(function(e){var r=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(t,e,r.get?r:{enumerable:!0,get:function(){return n[e]}})}),t}var Xt={exports:{}},je=De(fe);(function(n,t){(function(e,r){n.exports=r(je)})(typeof self!="undefined"?self:Be,function(e){return function(r){function o(c){if(i[c])return i[c].exports;var s=i[c]={i:c,l:!1,exports:{}};return r[c].call(s.exports,s,s.exports,o),s.l=!0,s.exports}var i={};return o.m=r,o.c=i,o.d=function(c,s,a){o.o(c,s)||Object.defineProperty(c,s,{configurable:!1,enumerable:!0,get:a})},o.n=function(c){var s=c&&c.__esModule?function(){return c.default}:function(){return c};return o.d(s,"a",s),s},o.o=function(c,s){return Object.prototype.hasOwnProperty.call(c,s)},o.p="./",o(o.s=64)}([function(r,o,i){var c=i(45),s=i.n(c),a=i(6),u=i(50),p=i(13),h=i(49),l=i(27);o.a={data:function(){return{unwatchFns:[]}},mounted:function(){var f=this;p.b&&p.b.load().then(function(){f.__contextReady&&f.__contextReady.call(f,f.convertProps())}),this.$amap=this.$amap||this.$parent.$amap,this.$amap?this.register():this.$on(h.a.AMAP_READY_EVENT,function(d){f.$amap=d,f.register()})},destroyed:function(){this.unregisterEvents(),this.$amapComponent&&(this.$amapComponent.setMap&&this.$amapComponent.setMap(null),this.$amapComponent.close&&this.$amapComponent.close(),this.$amapComponent.editor&&this.$amapComponent.editor.close(),this.unwatchFns.forEach(function(f){return f()}),this.unwatchFns=[])},methods:{getHandlerFun:function(f){return this.handlers&&this.handlers[f]?this.handlers[f]:this.$amapComponent["set"+s()(f)]||this.$amapComponent.setOptions},convertProps:function(){var f=this,d={};this.$amap&&(d.map=this.$amap);var m=this.$options.propsData,g=m===void 0?{}:m,y=this.propsRedirect;return Object.keys(g).reduce(function(_,S){var O=S,b=f.convertSignalProp(O,g[O]);return b===void 0||(y&&y[S]&&(O=y[O]),d[O]=b),_},d)},convertSignalProp:function(f,d){var m="",g="";if(this.amapTagName)try{var y=s()(this.amapTagName).replace(/^El/,"");g=(l.default[y]||"").props[f].$type,m=a.a[g]}catch{}if(g&&m)return m(d);if(this.converters&&this.converters[f])return this.converters[f].call(this,d);var _=a.a[f];return _?_(d):d},registerEvents:function(){if(this.setEditorEvents&&this.setEditorEvents(),this.$options.propsData){if(this.$options.propsData.events)for(var f in this.events)u.a.addListener(this.$amapComponent,f,this.events[f]);if(this.$options.propsData.onceEvents)for(var d in this.onceEvents)u.a.addListenerOnce(this.$amapComponent,d,this.onceEvents[d])}},unregisterEvents:function(){u.a.clearListeners(this.$amapComponent)},setPropWatchers:function(){var f=this,d=this.propsRedirect,m=this.$options.propsData,g=m===void 0?{}:m;Object.keys(g).forEach(function(y){var _=y;d&&d[y]&&(_=d[y]);var S=f.getHandlerFun(_);if(S||y==="events"){var O=f.$watch(y,function(b){if(y==="events")return f.unregisterEvents(),void f.registerEvents();if(S&&S===f.$amapComponent.setOptions){var k;return S.call(f.$amapComponent,(k={},k[_]=f.convertSignalProp(y,b),k))}S.call(f.$amapComponent,f.convertSignalProp(y,b))});f.unwatchFns.push(O)}})},registerToManager:function(){var f=this.amapManager||this.$parent.amapManager;f&&this.vid!==void 0&&f.setComponent(this.vid,this.$amapComponent)},initProps:function(){var f=this;["editable","visible"].forEach(function(d){if(f[d]!==void 0){var m=f.getHandlerFun(d);m&&m.call(f.$amapComponent,f.convertSignalProp(d,f[d]))}})},printReactiveProp:function(){var f=this;Object.keys(this._props).forEach(function(d){f.$amapComponent["set"+s()(d)]&&console.log(d)})},register:function(){var f=this,d=this.__initComponent&&this.__initComponent(this.convertProps());d&&d.then?d.then(function(m){return f.registerRest(m)}):this.registerRest(d)},registerRest:function(f){!this.$amapComponent&&f&&(this.$amapComponent=f),this.registerEvents(),this.initProps(),this.setPropWatchers(),this.registerToManager(),this.events&&this.events.init&&this.events.init(this.$amapComponent,this.$amap,this.amapManager||this.$parent.amapManager)},$$getInstance:function(){return this.$amapComponent}}}},function(r,o,i){function c(s,a,u,p,h,l,f,d){s=s||{};var m=typeof s.default;m!=="object"&&m!=="function"||(s=s.default);var g=typeof s=="function"?s.options:s;a&&(g.render=a,g.staticRenderFns=u,g._compiled=!0),p&&(g.functional=!0),l&&(g._scopeId=l);var y;if(f?(y=function(O){O=O||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,O||typeof __VUE_SSR_CONTEXT__=="undefined"||(O=__VUE_SSR_CONTEXT__),h&&h.call(this,O),O&&O._registeredComponents&&O._registeredComponents.add(f)},g._ssrRegister=y):h&&(y=d?function(){h.call(this,this.$root.$options.shadowRoot)}:h),y)if(g.functional){g._injectStyles=y;var _=g.render;g.render=function(O,b){return y.call(b),_(O,b)}}else{var S=g.beforeCreate;g.beforeCreate=S?[].concat(S,y):[y]}return{exports:s,options:g}}o.a=c},function(r,o,i){var c=i(30)("wks"),s=i(14),a=i(3).Symbol,u=typeof a=="function";(r.exports=function(p){return c[p]||(c[p]=u&&a[p]||(u?a:s)("Symbol."+p))}).store=c},function(r,o){var i=r.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=i)},function(r,o){r.exports=function(i){return typeof i=="object"?i!==null:typeof i=="function"}},function(r,o,i){r.exports=!i(15)(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},function(r,o,i){function c(f){return new AMap.Pixel(f[0],f[1])}function s(f){return new AMap.Size(f[0],f[1])}function a(f){return Array.isArray(f)?f:[f.getX(),f.getY()]}function u(f){return new AMap.LngLat(f[0],f[1])}function p(f){if(f)return Array.isArray(f)?f.slice():[f.getLng(),f.getLat()]}function h(f){return new AMap.Bounds(u(f[0]),u(f[1]))}o.e=c,o.c=a,o.d=u,o.b=p,i.d(o,"a",function(){return l});var l={position:u,offset:c,bounds:h,LngLat:u,Pixel:c,Size:s,Bounds:h}},function(r,o,i){var c=i(3),s=i(8),a=i(11),u=i(14)("src"),p=Function.toString,h=(""+p).split("toString");i(16).inspectSource=function(l){return p.call(l)},(r.exports=function(l,f,d,m){var g=typeof d=="function";g&&(a(d,"name")||s(d,"name",f)),l[f]!==d&&(g&&(a(d,u)||s(d,u,l[f]?""+l[f]:h.join(String(f)))),l===c?l[f]=d:m?l[f]?l[f]=d:s(l,f,d):(delete l[f],s(l,f,d)))})(Function.prototype,"toString",function(){return typeof this=="function"&&this[u]||p.call(this)})},function(r,o,i){var c=i(9),s=i(20);r.exports=i(5)?function(a,u,p){return c.f(a,u,s(1,p))}:function(a,u,p){return a[u]=p,a}},function(r,o,i){var c=i(10),s=i(31),a=i(33),u=Object.defineProperty;o.f=i(5)?Object.defineProperty:function(p,h,l){if(c(p),h=a(h,!0),c(l),s)try{return u(p,h,l)}catch{}if("get"in l||"set"in l)throw TypeError("Accessors not supported!");return"value"in l&&(p[h]=l.value),p}},function(r,o,i){var c=i(4);r.exports=function(s){if(!c(s))throw TypeError(s+" is not an object!");return s}},function(r,o){var i={}.hasOwnProperty;r.exports=function(c,s){return i.call(c,s)}},function(r,o){r.exports={}},function(r,o,i){i.d(o,"a",function(){return p}),i.d(o,"b",function(){return u});var c=i(97),s=i(19),a=i.n(s),u=null,p=function(h){a.a.prototype.$isServer||u||(u||(u=new c.a(h)),u.load())}},function(r,o){var i=0,c=Math.random();r.exports=function(s){return"Symbol(".concat(s===void 0?"":s,")_",(++i+c).toString(36))}},function(r,o){r.exports=function(i){try{return!!i()}catch{return!0}}},function(r,o){var i=r.exports={version:"2.5.5"};typeof __e=="number"&&(__e=i)},function(r,o,i){var c=i(71);r.exports=function(s,a,u){if(c(s),a===void 0)return s;switch(u){case 1:return function(p){return s.call(a,p)};case 2:return function(p,h){return s.call(a,p,h)};case 3:return function(p,h,l){return s.call(a,p,h,l)}}return function(){return s.apply(a,arguments)}}},function(r,o,i){var c=i(75),s=i(22);r.exports=function(a){return c(s(a))}},function(r,o){r.exports=e},function(r,o){r.exports=function(i,c){return{enumerable:!(1&i),configurable:!(2&i),writable:!(4&i),value:c}}},function(r,o){var i=Math.ceil,c=Math.floor;r.exports=function(s){return isNaN(s=+s)?0:(s>0?c:i)(s)}},function(r,o){r.exports=function(i){if(i==null)throw TypeError("Can't call method on "+i);return i}},function(r,o,i){var c=i(70),s=i(34),a=i(7),u=i(8),p=i(12),h=i(72),l=i(25),f=i(79),d=i(2)("iterator"),m=!([].keys&&"next"in[].keys()),g=function(){return this};r.exports=function(y,_,S,O,b,k,w){h(S,_,O);var x,v,C,E=function(L){if(!m&&L in j)return j[L];switch(L){case"keys":case"values":return function(){return new S(this,L)}}return function(){return new S(this,L)}},D=_+" Iterator",T=b=="values",z=!1,j=y.prototype,H=j[d]||j["@@iterator"]||b&&j[b],W=H||E(b),nt=b?T?E("entries"):W:void 0,B=_=="Array"&&j.entries||H;if(B&&(C=f(B.call(new y)))!==Object.prototype&&C.next&&(l(C,D,!0),c||typeof C[d]=="function"||u(C,d,g)),T&&H&&H.name!=="values"&&(z=!0,W=function(){return H.call(this)}),c&&!w||!m&&!z&&j[d]||u(j,d,W),p[_]=W,p[D]=g,b)if(x={values:T?W:E("values"),keys:k?W:E("keys"),entries:nt},w)for(v in x)v in j||a(j,v,x[v]);else s(s.P+s.F*(m||z),_,x);return x}},function(r,o,i){var c=i(30)("keys"),s=i(14);r.exports=function(a){return c[a]||(c[a]=s(a))}},function(r,o,i){var c=i(9).f,s=i(11),a=i(2)("toStringTag");r.exports=function(u,p,h){u&&!s(u=h?u:u.prototype,a)&&c(u,a,{configurable:!0,value:p})}},function(r,o,i){var c=i(50);o.a={methods:{setEditorEvents:function(){var s=this;if(this.$amapComponent.editor&&this.events){var a=["addnode","adjust","removenode","end","move"],u={};Object.keys(this.events).forEach(function(p){a.indexOf(p)!==-1&&(u[p]=s.events[p])}),Object.keys(u).forEach(function(p){c.a.addListener(s.$amapComponent.editor,p,u[p])})}}}}},function(r,o,i){Object.defineProperty(o,"__esModule",{value:!0});var c=(i(65),i(45)),s=i.n(c),a=i(13),u=i(100),p=i(106),h=i(107),l=i(111),f=i(113),d=i(115),m=i(116),g=i(118),y=i(120),_=i(122),S=i(124),O=i(126),b=i(128),k=i(130),w=i(131);i.d(o,"AMapManager",function(){return k.a}),i.d(o,"initAMapApiLoader",function(){return a.a}),i.d(o,"createCustomComponent",function(){return w.a}),i.d(o,"lazyAMapApiLoaderInstance",function(){return a.b});var x=[u.a,p.a,h.a,l.a,f.a,d.a,g.a,m.a,y.a,_.a,S.a,O.a,b.a],v={initAMapApiLoader:a.a,AMapManager:k.a};v.install=function(C){v.installed||(C.config.optionMergeStrategies.deferredReady=C.config.optionMergeStrategies.created,x.map(function(E){C.component(E.name,E),v[s()(E.name).replace(/^El/,"")]=E}))},typeof window!="undefined"&&window.Vue&&function C(E){C.installed||v.install(E)}(window.Vue),o.default=v},function(r,o,i){var c=i(29),s=i(2)("toStringTag"),a=c(function(){return arguments}())=="Arguments",u=function(p,h){try{return p[h]}catch{}};r.exports=function(p){var h,l,f;return p===void 0?"Undefined":p===null?"Null":typeof(l=u(h=Object(p),s))=="string"?l:a?c(h):(f=c(h))=="Object"&&typeof h.callee=="function"?"Arguments":f}},function(r,o){var i={}.toString;r.exports=function(c){return i.call(c).slice(8,-1)}},function(r,o,i){var c=i(3),s=c["__core-js_shared__"]||(c["__core-js_shared__"]={});r.exports=function(a){return s[a]||(s[a]={})}},function(r,o,i){r.exports=!i(5)&&!i(15)(function(){return Object.defineProperty(i(32)("div"),"a",{get:function(){return 7}}).a!=7})},function(r,o,i){var c=i(4),s=i(3).document,a=c(s)&&c(s.createElement);r.exports=function(u){return a?s.createElement(u):{}}},function(r,o,i){var c=i(4);r.exports=function(s,a){if(!c(s))return s;var u,p;if(a&&typeof(u=s.toString)=="function"&&!c(p=u.call(s))||typeof(u=s.valueOf)=="function"&&!c(p=u.call(s))||!a&&typeof(u=s.toString)=="function"&&!c(p=u.call(s)))return p;throw TypeError("Can't convert object to primitive value")}},function(r,o,i){var c=i(3),s=i(16),a=i(8),u=i(7),p=i(17),h=function(l,f,d){var m,g,y,_,S=l&h.F,O=l&h.G,b=l&h.S,k=l&h.P,w=l&h.B,x=O?c:b?c[f]||(c[f]={}):(c[f]||{}).prototype,v=O?s:s[f]||(s[f]={}),C=v.prototype||(v.prototype={});O&&(d=f);for(m in d)g=!S&&x&&x[m]!==void 0,y=(g?x:d)[m],_=w&&g?p(y,c):k&&typeof y=="function"?p(Function.call,y):y,x&&u(x,m,y,l&h.U),v[m]!=y&&a(v,m,_),k&&C[m]!=y&&(C[m]=y)};c.core=s,h.F=1,h.G=2,h.S=4,h.P=8,h.B=16,h.W=32,h.U=64,h.R=128,r.exports=h},function(r,o,i){var c=i(10),s=i(73),a=i(38),u=i(24)("IE_PROTO"),p=function(){},h=function(){var l,f=i(32)("iframe"),d=a.length;for(f.style.display="none",i(78).appendChild(f),f.src="javascript:",l=f.contentWindow.document,l.open(),l.write("<script>document.F=Object<\/script>"),l.close(),h=l.F;d--;)delete h.prototype[a[d]];return h()};r.exports=Object.create||function(l,f){var d;return l!==null?(p.prototype=c(l),d=new p,p.prototype=null,d[u]=l):d=h(),f===void 0?d:s(d,f)}},function(r,o,i){var c=i(74),s=i(38);r.exports=Object.keys||function(a){return c(a,s)}},function(r,o,i){var c=i(21),s=Math.min;r.exports=function(a){return a>0?s(c(a),9007199254740991):0}},function(r,o){r.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(r,o){r.exports=function(i,c){return{value:c,done:!!i}}},function(r,o,i){var c=i(7);r.exports=function(s,a,u){for(var p in a)c(s,p,a[p],u);return s}},function(r,o){r.exports=function(i,c,s,a){if(!(i instanceof c)||a!==void 0&&a in i)throw TypeError(s+": incorrect invocation!");return i}},function(r,d,i){var c=i(17),s=i(86),a=i(87),u=i(10),p=i(37),h=i(88),l={},f={},d=r.exports=function(m,g,y,_,S){var O,b,k,w,x=S?function(){return m}:h(m),v=c(y,_,g?2:1),C=0;if(typeof x!="function")throw TypeError(m+" is not iterable!");if(a(x)){for(O=p(m.length);O>C;C++)if((w=g?v(u(b=m[C])[0],b[1]):v(m[C]))===l||w===f)return w}else for(k=x.call(m);!(b=k.next()).done;)if((w=s(k,v,b.value,g))===l||w===f)return w};d.BREAK=l,d.RETURN=f},function(r,o,i){var c=i(14)("meta"),s=i(4),a=i(11),u=i(9).f,p=0,h=Object.isExtensible||function(){return!0},l=!i(15)(function(){return h(Object.preventExtensions({}))}),f=function(_){u(_,c,{value:{i:"O"+ ++p,w:{}}})},d=function(_,S){if(!s(_))return typeof _=="symbol"?_:(typeof _=="string"?"S":"P")+_;if(!a(_,c)){if(!h(_))return"F";if(!S)return"E";f(_)}return _[c].i},m=function(_,S){if(!a(_,c)){if(!h(_))return!0;if(!S)return!1;f(_)}return _[c].w},g=function(_){return l&&y.NEED&&h(_)&&!a(_,c)&&f(_),_},y=r.exports={KEY:c,NEED:!1,fastKey:d,getWeak:m,onFreeze:g}},function(r,o,i){var c=i(4);r.exports=function(s,a){if(!c(s)||s._t!==a)throw TypeError("Incompatible receiver, "+a+" required!");return s}},function(r,o,i){var c=i(96);r.exports=function(){var s=c.apply(c,arguments);return s.charAt(0).toUpperCase()+s.slice(1)}},function(r,o){function i(s,a){var u=s[1]||"",p=s[3];if(!p)return u;if(a&&typeof btoa=="function"){var h=c(p);return[u].concat(p.sources.map(function(l){return"/*# sourceURL="+p.sourceRoot+l+" */"})).concat([h]).join(`
  2. `)}return[u].join(`
  3. `)}function c(s){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(s))))+" */"}r.exports=function(s){var a=[];return a.toString=function(){return this.map(function(u){var p=i(u,s);return u[2]?"@media "+u[2]+"{"+p+"}":p}).join("")},a.i=function(u,p){typeof u=="string"&&(u=[[null,u,""]]);for(var h={},l=0;l<this.length;l++){var f=this[l][0];typeof f=="number"&&(h[f]=!0)}for(l=0;l<u.length;l++){var d=u[l];typeof d[0]=="number"&&h[d[0]]||(p&&!d[2]?d[2]=p:p&&(d[2]="("+d[2]+") and ("+p+")"),a.push(d))}},a}},function(r,o,i){function c(b){for(var k=0;k<b.length;k++){var w=b[k],x=f[w.id];if(x){x.refs++;for(var v=0;v<x.parts.length;v++)x.parts[v](w.parts[v]);for(;v<w.parts.length;v++)x.parts.push(a(w.parts[v]));x.parts.length>w.parts.length&&(x.parts.length=w.parts.length)}else{for(var C=[],v=0;v<w.parts.length;v++)C.push(a(w.parts[v]));f[w.id]={id:w.id,refs:1,parts:C}}}}function s(){var b=document.createElement("style");return b.type="text/css",d.appendChild(b),b}function a(b){var k,w,x=document.querySelector('style[data-vue-ssr-id~="'+b.id+'"]');if(x){if(y)return _;x.parentNode.removeChild(x)}if(S){var v=g++;x=m||(m=s()),k=u.bind(null,x,v,!1),w=u.bind(null,x,v,!0)}else x=s(),k=p.bind(null,x),w=function(){x.parentNode.removeChild(x)};return k(b),function(C){if(C){if(C.css===b.css&&C.media===b.media&&C.sourceMap===b.sourceMap)return;k(b=C)}else w()}}function u(b,k,w,x){var v=w?"":x.css;if(b.styleSheet)b.styleSheet.cssText=O(k,v);else{var C=document.createTextNode(v),E=b.childNodes;E[k]&&b.removeChild(E[k]),E.length?b.insertBefore(C,E[k]):b.appendChild(C)}}function p(b,k){var w=k.css,x=k.media,v=k.sourceMap;if(x&&b.setAttribute("media",x),v&&(w+=`
  4. /*# sourceURL=`+v.sources[0]+" */",w+=`
  5. /*# sourceMappingURL=data:application/json;base64,`+btoa(unescape(encodeURIComponent(JSON.stringify(v))))+" */"),b.styleSheet)b.styleSheet.cssText=w;else{for(;b.firstChild;)b.removeChild(b.firstChild);b.appendChild(document.createTextNode(w))}}var h=typeof document!="undefined";if(typeof DEBUG!="undefined"&&DEBUG&&!h)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var l=i(103),f={},d=h&&(document.head||document.getElementsByTagName("head")[0]),m=null,g=0,y=!1,_=function(){},S=typeof navigator!="undefined"&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());r.exports=function(b,k,w){y=w;var x=l(b,k);return c(x),function(v){for(var C=[],E=0;E<x.length;E++){var D=x[E],T=f[D.id];T.refs--,C.push(T)}v?(x=l(b,v),c(x)):x=[];for(var E=0;E<C.length;E++){var T=C[E];if(T.refs===0){for(var z=0;z<T.parts.length;z++)T.parts[z]();delete f[T.id]}}}};var O=function(){var b=[];return function(k,w){return b[k]=w,b.filter(Boolean).join(`
  6. `)}}()},function(r,o,i){var c=i(104),s=i(49),a=i(6),u=i(0),p=i(13),h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l};o.a={name:"el-amap",mixins:[u.a],props:["viewMode","skyColor","rotateEnable","pitch","buildingAnimation","pitchEnable","vid","events","center","zoom","draggEnable","level","zooms","lang","defaultCursor","crs","animateEnable","isHotspot","defaultLayer","rotateEnable","resizeEnable","showIndoorMap","indoorMap","expandZoomRange","dragEnable","zoomEnable","doubleClickZoom","keyboardEnable","jogEnable","scrollWheel","touchZoom","mapStyle","plugin","features","amapManager"],beforeCreate:function(){this._loadPromise=p.b.load()},destroyed:function(){this.$amap&&this.$amap.destroy()},computed:{plugins:function(){var l=[],f=/^AMap./,d=function(g){return f.test(g)?g:"AMap."+g},m=function(g){return g.replace(f,"")};return typeof this.plugin=="string"?l.push({pName:d(this.plugin),sName:m(this.plugin)}):this.plugin instanceof Array&&(l=this.plugin.map(function(g){var y={};return typeof g=="string"?y={pName:d(g),sName:m(g)}:(g.pName=d(g.pName),g.sName=m(g.pName),y=g),y})),l}},data:function(){return{converters:{center:function(l){return Object(a.d)(l)}},handlers:{zoomEnable:function(l){this.setStatus({zoomEnable:l})},dragEnable:function(l){this.setStatus({dragEnable:l})},rotateEnable:function(l){this.setStatus({rotateEnable:l})}}}},mounted:function(){this.createMap()},addEvents:function(){var l=this;this.$amapComponent.on("moveend",function(){var f=l.$amapComponent.getCenter();l.center=[f.getLng(),f.getLat()]})},methods:{addPlugins:function(){var l=this.plugins.filter(function(f){return!AMap[f.sName]});return l&&l.length?this.$amapComponent.plugin(l,this.addMapControls):this.addMapControls()},addMapControls:function(){var l=this;this.plugins&&this.plugins.length&&(this.$plugins=this.$plugins||{},this.plugins.forEach(function(f){var d=l.convertAMapPluginProps(f),m=l.$plugins[d.pName]=new AMap[d.sName](d);if(l.$amapComponent.addControl(m),f.events)for(var g in f.events){var y=f.events[g];g==="init"?y(m):AMap.event.addListener(m,g,y)}}))},convertAMapPluginProps:function(l){if((l===void 0?"undefined":h(l))==="object"&&l.pName){switch(l.pName){case"AMap.ToolBar":case"AMap.Scale":l.offset&&l.offset instanceof Array&&(l.offset=Object(a.e)(l.offset))}return l}return""},setStatus:function(l){this.$amap.setStatus(l)},createMap:function(){var l=this;this._loadPromise.then(function(){var f=l.$el.querySelector(".el-vue-amap"),d=l.vid||Object(c.a)();f.id=d,l.$amap=l.$amapComponent=new AMap.Map(d,l.convertProps()),l.amapManager&&l.amapManager.setMap(l.$amap),l.$emit(s.a.AMAP_READY_EVENT,l.$amap),l.$children.forEach(function(m){m.$emit(s.a.AMAP_READY_EVENT,l.$amap)}),l.plugins&&l.plugins.length&&l.addPlugins()})},$$getCenter:function(){return this.$amap?Object(a.b)(this.$amap.getCenter()):Object(a.b)(this.center)}}}},function(r,o,i){o.a={AMAP_READY_EVENT:"AMAP_READY_EVENT"}},function(r,o,i){function c(u,p){if(!(u instanceof p))throw new TypeError("Cannot call a class as a function")}var s=void 0,a=function(){function u(){c(this,u),this._listener=new Map}return u.prototype.addListener=function(p,h,l,f){if(!AMap.event)throw new Error("please wait for Map API load");var d=AMap.event.addListener(p,h,l,f);this._listener.get(p)||this._listener.set(p,{});var m=this._listener.get(p);m[h]||(m[h]=[]),m[h].push(d)},u.prototype.removeListener=function(p,h,l){if(!AMap.event)throw new Error("please wait for Map API load");if(this._listener.get(p)&&this._listener.get(p)[h]){var f=this._listener.get(p)[h];if(l){var d=f.indexOf(l);AMap.event.removeListener(f[d]),f.splice(d,1)}else f.forEach(function(m){AMap.event.removeListener(m)}),this._listener.get(p)[h]=[]}},u.prototype.addListenerOnce=function(p,h,l,f){return AMap.event.addListenerOnce(p,h,l,f)},u.prototype.trigger=function(p,h,l){return AMap.event.trigger(p,h,l)},u.prototype.clearListeners=function(p){var h=this,l=this._listener.get(p);l&&Object.keys(l).map(function(f){h.removeListener(p,f)})},u}();s=s||new a,o.a=s},function(r,o,i){var c=i(0),s=i(6),a=i(52),u=i(19),p=i.n(u),h="el-amap-marker";o.a={name:h,mixins:[c.a],props:["vid","position","offset","icon","content","topWhenClick","bubble","draggable","raiseOnDrag","cursor","visible","zIndex","angle","autoRotation","animation","shadow","title","clickable","shape","extData","label","events","onceEvents","template","vnode","contentRender"],data:function(){var l=this;return{$tagName:h,withSlots:!1,tmpVM:null,propsRedirect:{template:"content",vnode:"content",contentRender:"content"},converters:{shape:function(f){return new AMap.MarkerShape(f)},shadow:function(f){return new AMap.Icon(f)},template:function(f){var d=Object(a.a)(f,l);return this.$customContent=d,d.$el},vnode:function(f){var d=typeof f=="function"?f(l):f,m=Object(a.c)(d);return this.$customContent=m,m.$el},contentRender:function(f){var d=Object(a.b)(f,l);return this.$customContent=d,d.$el},label:function(f){var d=f.content,m=d===void 0?"":d,g=f.offset,y=g===void 0?[0,0]:g;return{content:m,offset:Object(s.e)(y)}}},handlers:{zIndex:function(f){this.setzIndex(f)},visible:function(f){f===!1?this.hide():this.show()}}}},created:function(){this.tmpVM=new p.a({data:function(){return{node:""}},render:function(l){var f=this.node;return l("div",{ref:"node"},Array.isArray(f)?f:[f])}}).$mount()},methods:{__initComponent:function(l){this.$slots.default&&this.$slots.default.length&&(l.content=this.tmpVM.$refs.node),this.$amapComponent=new AMap.Marker(l)},$$getExtData:function(){return this.$amapComponent.getExtData()},$$getPosition:function(){return Object(s.b)(this.$amapComponent.getPosition())},$$getOffset:function(){return Object(s.c)(this.$amapComponent.getOffset())}},render:function(l){var f=this.$slots.default||[];return f.length&&(this.tmpVM.node=f),null},destroyed:function(){this.tmpVM.$destroy(),this.$customContent&&this.$customContent.$destroy&&this.$customContent.$destroy()}}},function(r,o,i){i.d(o,"a",function(){return u}),i.d(o,"c",function(){return p}),i.d(o,"b",function(){return h});var c=i(19),s=i.n(c),a=Object.assign||function(l){for(var f=1;f<arguments.length;f++){var d=arguments[f];for(var m in d)Object.prototype.hasOwnProperty.call(d,m)&&(l[m]=d[m])}return l},u=function(l,f){var d=["methods","computed","data","filters"],m={},g=s.a.compile(l);d.forEach(function(_){m[_]=f.$parent.$parent.$options[_],_==="data"&&typeof m[_]=="function"&&(m[_]=m[_]())});var y=new s.a(a({},m,g));return y.$mount(),y},p=function(l){var f=new s.a({render:function(d){return d("div",l)}});return f.$mount(),f},h=function(l,f){var d=new s.a({render:function(m){return l(m,f)}});return d.$mount(),d}},function(r,o,i){var c=i(0),s=i(13);o.a={name:"el-amap-search-box",mixins:[c.a],props:["searchOption","onSearchResult","events","default"],data:function(){return{keyword:this.default||"",tips:[],selectedTip:-1,loaded:!1,adcode:null}},mounted:function(){var a=this;s.b.load().then(function(){a.loaded=!0,a._onSearchResult=a.onSearchResult,a.events&&a.events.init&&a.events.init({autoComplete:a._autoComplete,placeSearch:a._placeSearch})})},computed:{_autoComplete:function(){if(this.loaded)return new AMap.Autocomplete(this.searchOption||{})},_placeSearch:function(){if(this.loaded)return new AMap.PlaceSearch(this.searchOption||{})}},methods:{autoComplete:function(){var a=this;this.keyword&&this._autoComplete&&this._autoComplete.search(this.keyword,function(u,p){u==="complete"&&(a.tips=p.tips)})},search:function(){var a=this;if(this.tips=[],this._placeSearch){var u=null;u=this.searchOption.citylimit&&this.searchOption.city?this.searchOption.city:this.adcode,this._placeSearch.setCity(u||this.searchOption.city),this._placeSearch.search(this.keyword,function(p,h){if(h&&h.poiList&&h.poiList.count){var l=h.poiList.pois,f=l.map(function(d){return d.lat=d.location.lat,d.lng=d.location.lng,d});a._onSearchResult(f)}else if(h.poiList===void 0)throw new Error(h)})}},changeTip:function(a){this.adcode=a.adcode,this.keyword=a.name,this.search()},selectTip:function(a){a==="up"&&this.selectedTip>0?(this.selectedTip-=1,this.keyword=this.tips[this.selectedTip].name,this.adcode=this.tips[this.selectedTip].adcode):a==="down"&&this.selectedTip+1<this.tips.length&&(this.selectedTip+=1,this.keyword=this.tips[this.selectedTip].name,this.adcode=this.tips[this.selectedTip].adcode)}}}},function(r,o,i){var c=i(0),s=i(6),a=i(26);o.a={name:"el-amap-circle",mixins:[c.a,a.a],props:["vid","zIndex","center","bubble","radius","strokeColor","strokeOpacity","strokeWeight","editable","fillColor","fillOpacity","strokeStyle","extData","strokeDasharray","events","visible","extData","onceEvents"],data:function(){return{converters:{center:function(u){return Object(s.d)(u)}},handlers:{zIndex:function(u){this.setzIndex(u)},visible:function(u){u===!1?this.hide():this.show()},editable:function(u){u===!0?this.editor.open():this.editor.close()}}}},methods:{__initComponent:function(u){this.$amapComponent=new AMap.Circle(u),this.$amapComponent.editor=new AMap.CircleEditor(this.$amap,this.$amapComponent)},$$getCenter:function(){return Object(s.b)(this.$amapComponent.getCenter())}}}},function(r,o,i){var c=i(0);o.a={name:"el-amap-ground-image",mixins:[c.a],props:["vid","clickable","opacity","url","bounds","visible","events","onceEvents"],destroyed:function(){this.$amapComponent.setMap(null)},data:function(){return{converters:{},handlers:{visible:function(s){s===!1?this.setMap(null):this.setMap(this.$amap)}}}},methods:{__initComponent:function(s){this.$amapComponent=new AMap.ImageLayer(s)}}}},function(r,o,i){var c=i(6),s=i(0),a=i(52),u=i(19),p=i.n(u);o.a={name:"el-amap-info-window",mixins:[s.a],props:["vid","isCustom","autoMove","closeWhenClickMap","content","size","offset","position","showShadow","visible","events","template","vnode","contentRender"],data:function(){var h=this;return{withSlots:!1,tmpVM:null,propsRedirect:{template:"content",vnode:"content",contentRender:"content"},converters:{template:function(l){var f=Object(a.a)(l,h);return this.$customContent=f,f.$el},vnode:function(l){var f=typeof l=="function"?l(h):l,d=Object(a.c)(f);return this.$customContent=d,d.$el},contentRender:function(l){var f=Object(a.b)(l,h);return this.$customContent=f,f.$el}},handlers:{visible:function(l){var f=this.getPosition();f&&(l===!1?this.close():this.open(h.$amap,[f.lng,f.lat]))},template:function(l){this.setContent(l)}}}},created:function(){this.tmpVM=new p.a({data:function(){return{node:""}},render:function(h){var l=this.node;return h("div",{ref:"node"},Array.isArray(l)?l:[l])}}).$mount()},destroyed:function(){this.$amapComponent.close(),this.tmpVM.$destroy(),this.$customContent&&this.$customContent.$destroy&&this.$customContent.$destroy()},methods:{__initComponent:function(h){this.$slots.default&&this.$slots.default.length&&(h.content=this.tmpVM.$refs.node),delete h.map,this.$amapComponent=new AMap.InfoWindow(h),this.visible!==!1&&this.$amapComponent.open(this.$amap,Object(c.d)(this.position))}},render:function(h){var l=this.$slots.default||[];return l.length&&(this.tmpVM.node=l),null}}},function(r,o,i){var c=i(0),s=i(26),a=i(6);o.a={name:"el-amap-polyline",mixins:[c.a,s.a],props:["vid","zIndex","visible","editable","bubble","geodesic","isOutline","outlineColor","path","strokeColor","strokeOpacity","strokeWeight","strokeStyle","strokeDasharray","events","extData","onceEvents","lineJoin"],data:function(){return{converters:{},handlers:{visible:function(u){u===!1?this.hide():this.show()},editable:function(u){u===!0?this.editor.open():this.editor.close()}}}},methods:{__initComponent:function(u){this.$amapComponent=new AMap.Polyline(u),this.$amapComponent.editor=new AMap.PolyEditor(this.$amap,this.$amapComponent)},$$getPath:function(){return this.$amapComponent.getPath().map(a.b)},$$getBounds:function(){return this.$amapComponent.getBounds()},$$getExtData:function(){return this.$amapComponent.getExtData()}}}},function(r,o,i){var c=i(0),s=i(26),a=i(6);o.a={name:"el-amap-polygon",mixins:[c.a,s.a],props:["vid","zIndex","path","bubble","strokeColor","strokeOpacity","strokeWeight","fillColor","editable","fillOpacity","extData","strokeStyle","visible","strokeDasharray","events","onceEvents","draggable"],data:function(){return{converters:{},handlers:{visible:function(u){u===!1?this.hide():this.show()},zIndex:function(u){this.setOptions({zIndex:u})},editable:function(u){u===!0?this.editor.open():this.editor.close()}}}},methods:{__initComponent:function(){var u=this.convertProps();this.$amapComponent=new AMap.Polygon(u),this.$amapComponent.editor=new AMap.PolyEditor(this.$amap,this.$amapComponent)},$$getPath:function(){return this.$amapComponent.getPath().map(a.b)},$$getExtData:function(){return this.$amapComponent.getExtData()},$$contains:function(u){return Array.isArray(u)&&(u=new AMap.LngLat(u[0],u[1])),this.$amapComponent.getBounds().contains(u)}}}},function(r,o,i){var c=i(0),s="el-amap-text";o.a={name:s,mixins:[c.a],props:{vid:{type:String,default:""},text:{type:String,default:""},textAlign:{type:String,default:""},verticalAlign:{type:String,default:""},position:{type:Array,default:function(){return[0,0]},$type:"LngLat"},offset:{type:Array,default:function(){return[0,0]},$type:"Pixel"},topWhenClick:{type:Boolean,default:function(){return!1}},bubble:{type:Boolean,default:function(){return!1}},draggable:{type:Boolean,default:function(){return!1}},raiseOnDrag:{type:Boolean,default:function(){return!1}},cursor:{type:String,default:function(){return""}},visible:{type:Boolean,default:function(){return!0}},zIndex:{type:Number,default:function(){return 100}},angle:{type:Number,default:function(){return 0}},autoRotation:{type:Boolean,default:function(){return!1}},animation:{type:String,default:function(){return"\u201CAMAP_ANIMATION_NONE\u201D"}},shadow:{type:Object,default:function(){return{}},$type:"Icon"},title:{type:String,default:function(){return""}},clickable:{type:Boolean,default:!0},events:{type:Object,default:function(){return{}}}},data:function(){return{converters:{},handlers:{zIndex:function(a){this.setzIndex(a)},visible:function(a){a===!1?this.hide():this.show()}},amapTagName:s}},methods:{__initComponent:function(a){this.$amapComponent=new AMap.Text(a)}}}},function(r,o,i){var c=i(0),s="el-amap-bezier-curve";o.a={name:s,mixins:[c.a],props:{vid:{type:String},path:{type:Array},strokeColor:{type:String},strokeOpacity:{type:Number},strokeWeight:{type:Number,default:function(){return 1}},strokeStyle:{type:String},strokeDasharray:{type:Array},zIndex:{type:Number},showDir:{type:Boolean},bubble:{type:Boolean},cursor:{type:String},outlineColor:{type:Boolean},isOutline:{type:Boolean},visible:{type:Boolean,default:!0},events:{type:Object,default:function(){return{}}}},data:function(){return{converters:{},handlers:{zIndex:function(a){this.setzIndex(a)},visible:function(a){a===!1?this.hide():this.show()}},amapTagName:s}},methods:{__initComponent:function(a){this.$amapComponent=new AMap.BezierCurve(a)}}}},function(r,o,i){var c=i(0),s="el-amap-circle-marker";o.a={name:s,mixins:[c.a],props:{vid:{type:String},zIndex:{type:Number},visible:{type:Boolean,default:!0},center:{type:Array,$type:"LngLat"},bubble:{type:Boolean},radius:{type:Number},strokeColor:{type:String},strokeOpacity:{type:Number},strokeWeight:{type:Number},fillColor:{type:String},fillOpacity:{type:Number},extData:{type:Object},events:{type:Object,default:function(){return{}}}},data:function(){return{converters:{},handlers:{zIndex:function(a){this.setzIndex(a)},visible:function(a){a===!1?this.hide():this.show()}},amapTagName:s}},methods:{__initComponent:function(a){this.$amapComponent=new AMap.CircleMarker(a)}}}},function(r,o,i){var c=i(0),s="el-amap-ellipse";o.a={name:s,mixins:[c.a],props:{vid:{type:String},zIndex:{type:Number},center:{type:Array,$type:"LngLat"},radius:{type:Array,default:function(){return[1e3,1e3]}},bubble:{type:Boolean},cursor:{type:String},strokeColor:{type:String},strokeOpacity:{type:Number},strokeWeight:{type:Number},fillColor:{type:String},fillOpacity:{type:Number},strokeStyle:{type:String},extData:{type:Object,default:function(){return{}}},visible:{type:Boolean,default:!0},events:{type:Object,default:function(){return{}}}},data:function(){return{converters:{},handlers:{zIndex:function(a){this.setzIndex(a)},visible:function(a){a===!1?this.hide():this.show()}},amapTagName:s}},methods:{__initComponent:function(a){this.$amapComponent=new AMap.Ellipse(a)}}}},function(r,o,i){var c=i(0),s="el-amap-rectangle";o.a={name:s,mixins:[c.a],props:{vid:{type:String},zIndex:{type:Number},center:{type:Array,$type:"LngLat"},bounds:{type:Array,$type:"Bounds"},bubble:{type:Boolean},cursor:{type:String},strokeColor:{type:String},strokeOpacity:{type:Number},strokeWeight:{type:Number},fillColor:{type:String},fillOpacity:{type:Number},strokeStyle:{type:String},extData:{type:Object,default:function(){return{}}},visible:{type:Boolean,default:!0},events:{type:Object,default:function(){return{}}}},data:function(){return{converters:{},handlers:{zIndex:function(a){this.setzIndex(a)},visible:function(a){a===!1?this.hide():this.show()}},amapTagName:s}},methods:{__initComponent:function(a){this.$amapComponent=new AMap.Rectangle(a)}}}},function(r,o,i){r.exports=i(27)},function(r,o,i){var c=i(66);i.n(c)},function(r,o,i){i(67),i(68),i(81),i(84),r.exports=i(16).Map},function(r,o,i){var c=i(28),s={};s[i(2)("toStringTag")]="z",s+""!="[object z]"&&i(7)(Object.prototype,"toString",function(){return"[object "+c(this)+"]"},!0)},function(r,o,i){var c=i(69)(!0);i(23)(String,"String",function(s){this._t=String(s),this._i=0},function(){var s,a=this._t,u=this._i;return u>=a.length?{value:void 0,done:!0}:(s=c(a,u),this._i+=s.length,{value:s,done:!1})})},function(r,o,i){var c=i(21),s=i(22);r.exports=function(a){return function(u,p){var h,l,f=String(s(u)),d=c(p),m=f.length;return d<0||d>=m?a?"":void 0:(h=f.charCodeAt(d),h<55296||h>56319||d+1===m||(l=f.charCodeAt(d+1))<56320||l>57343?a?f.charAt(d):h:a?f.slice(d,d+2):l-56320+(h-55296<<10)+65536)}}},function(r,o){r.exports=!1},function(r,o){r.exports=function(i){if(typeof i!="function")throw TypeError(i+" is not a function!");return i}},function(r,o,i){var c=i(35),s=i(20),a=i(25),u={};i(8)(u,i(2)("iterator"),function(){return this}),r.exports=function(p,h,l){p.prototype=c(u,{next:s(1,l)}),a(p,h+" Iterator")}},function(r,o,i){var c=i(9),s=i(10),a=i(36);r.exports=i(5)?Object.defineProperties:function(u,p){s(u);for(var h,l=a(p),f=l.length,d=0;f>d;)c.f(u,h=l[d++],p[h]);return u}},function(r,o,i){var c=i(11),s=i(18),a=i(76)(!1),u=i(24)("IE_PROTO");r.exports=function(p,h){var l,f=s(p),d=0,m=[];for(l in f)l!=u&&c(f,l)&&m.push(l);for(;h.length>d;)c(f,l=h[d++])&&(~a(m,l)||m.push(l));return m}},function(r,o,i){var c=i(29);r.exports=Object("z").propertyIsEnumerable(0)?Object:function(s){return c(s)=="String"?s.split(""):Object(s)}},function(r,o,i){var c=i(18),s=i(37),a=i(77);r.exports=function(u){return function(p,h,l){var f,d=c(p),m=s(d.length),g=a(l,m);if(u&&h!=h){for(;m>g;)if((f=d[g++])!=f)return!0}else for(;m>g;g++)if((u||g in d)&&d[g]===h)return u||g||0;return!u&&-1}}},function(r,o,i){var c=i(21),s=Math.max,a=Math.min;r.exports=function(u,p){return u=c(u),u<0?s(u+p,0):a(u,p)}},function(r,o,i){var c=i(3).document;r.exports=c&&c.documentElement},function(r,o,i){var c=i(11),s=i(80),a=i(24)("IE_PROTO"),u=Object.prototype;r.exports=Object.getPrototypeOf||function(p){return p=s(p),c(p,a)?p[a]:typeof p.constructor=="function"&&p instanceof p.constructor?p.constructor.prototype:p instanceof Object?u:null}},function(r,o,i){var c=i(22);r.exports=function(s){return Object(c(s))}},function(r,o,i){for(var c=i(82),s=i(36),a=i(7),u=i(3),p=i(8),h=i(12),l=i(2),f=l("iterator"),d=l("toStringTag"),m=h.Array,g={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},y=s(g),_=0;_<y.length;_++){var S,O=y[_],b=g[O],k=u[O],w=k&&k.prototype;if(w&&(w[f]||p(w,f,m),w[d]||p(w,d,O),h[O]=m,b))for(S in c)w[S]||a(w,S,c[S],!0)}},function(r,o,i){var c=i(83),s=i(39),a=i(12),u=i(18);r.exports=i(23)(Array,"Array",function(p,h){this._t=u(p),this._i=0,this._k=h},function(){var p=this._t,h=this._k,l=this._i++;return!p||l>=p.length?(this._t=void 0,s(1)):h=="keys"?s(0,l):h=="values"?s(0,p[l]):s(0,[l,p[l]])},"values"),a.Arguments=a.Array,c("keys"),c("values"),c("entries")},function(r,o,i){var c=i(2)("unscopables"),s=Array.prototype;s[c]==null&&i(8)(s,c,{}),r.exports=function(a){s[c][a]=!0}},function(r,o,i){var c=i(85),s=i(44);r.exports=i(90)("Map",function(a){return function(){return a(this,arguments.length>0?arguments[0]:void 0)}},{get:function(a){var u=c.getEntry(s(this,"Map"),a);return u&&u.v},set:function(a,u){return c.def(s(this,"Map"),a===0?0:a,u)}},c,!0)},function(r,o,i){var c=i(9).f,s=i(35),a=i(40),u=i(17),p=i(41),h=i(42),l=i(23),f=i(39),d=i(89),m=i(5),g=i(43).fastKey,y=i(44),_=m?"_s":"size",S=function(O,b){var k,w=g(b);if(w!=="F")return O._i[w];for(k=O._f;k;k=k.n)if(k.k==b)return k};r.exports={getConstructor:function(O,b,k,w){var x=O(function(v,C){p(v,x,b,"_i"),v._t=b,v._i=s(null),v._f=void 0,v._l=void 0,v[_]=0,C!=null&&h(C,k,v[w],v)});return a(x.prototype,{clear:function(){for(var v=y(this,b),C=v._i,E=v._f;E;E=E.n)E.r=!0,E.p&&(E.p=E.p.n=void 0),delete C[E.i];v._f=v._l=void 0,v[_]=0},delete:function(v){var C=y(this,b),E=S(C,v);if(E){var D=E.n,T=E.p;delete C._i[E.i],E.r=!0,T&&(T.n=D),D&&(D.p=T),C._f==E&&(C._f=D),C._l==E&&(C._l=T),C[_]--}return!!E},forEach:function(v){y(this,b);for(var C,E=u(v,arguments.length>1?arguments[1]:void 0,3);C=C?C.n:this._f;)for(E(C.v,C.k,this);C&&C.r;)C=C.p},has:function(v){return!!S(y(this,b),v)}}),m&&c(x.prototype,"size",{get:function(){return y(this,b)[_]}}),x},def:function(O,b,k){var w,x,v=S(O,b);return v?v.v=k:(O._l=v={i:x=g(b,!0),k:b,v:k,p:w=O._l,n:void 0,r:!1},O._f||(O._f=v),w&&(w.n=v),O[_]++,x!=="F"&&(O._i[x]=v)),O},getEntry:S,setStrong:function(O,b,k){l(O,b,function(w,x){this._t=y(w,b),this._k=x,this._l=void 0},function(){for(var w=this,x=w._k,v=w._l;v&&v.r;)v=v.p;return w._t&&(w._l=v=v?v.n:w._t._f)?x=="keys"?f(0,v.k):x=="values"?f(0,v.v):f(0,[v.k,v.v]):(w._t=void 0,f(1))},k?"entries":"values",!k,!0),d(b)}}},function(r,o,i){var c=i(10);r.exports=function(s,a,u,p){try{return p?a(c(u)[0],u[1]):a(u)}catch(l){var h=s.return;throw h!==void 0&&c(h.call(s)),l}}},function(r,o,i){var c=i(12),s=i(2)("iterator"),a=Array.prototype;r.exports=function(u){return u!==void 0&&(c.Array===u||a[s]===u)}},function(r,o,i){var c=i(28),s=i(2)("iterator"),a=i(12);r.exports=i(16).getIteratorMethod=function(u){if(u!=null)return u[s]||u["@@iterator"]||a[c(u)]}},function(r,o,i){var c=i(3),s=i(9),a=i(5),u=i(2)("species");r.exports=function(p){var h=c[p];a&&h&&!h[u]&&s.f(h,u,{configurable:!0,get:function(){return this}})}},function(r,o,i){var c=i(3),s=i(34),a=i(7),u=i(40),p=i(43),h=i(42),l=i(41),f=i(4),d=i(15),m=i(91),g=i(25),y=i(92);r.exports=function(_,S,O,b,k,w){var x=c[_],v=x,C=k?"set":"add",E=v&&v.prototype,D={},T=function(B){var L=E[B];a(E,B,B=="delete"?function($){return!(w&&!f($))&&L.call(this,$===0?0:$)}:B=="has"?function($){return!(w&&!f($))&&L.call(this,$===0?0:$)}:B=="get"?function($){return w&&!f($)?void 0:L.call(this,$===0?0:$)}:B=="add"?function($){return L.call(this,$===0?0:$),this}:function($,le){return L.call(this,$===0?0:$,le),this})};if(typeof v=="function"&&(w||E.forEach&&!d(function(){new v().entries().next()}))){var z=new v,j=z[C](w?{}:-0,1)!=z,H=d(function(){z.has(1)}),W=m(function(B){new v(B)}),nt=!w&&d(function(){for(var B=new v,L=5;L--;)B[C](L,L);return!B.has(-0)});W||(v=S(function(B,L){l(B,v,_);var $=y(new x,B,v);return L!=null&&h(L,k,$[C],$),$}),v.prototype=E,E.constructor=v),(H||nt)&&(T("delete"),T("has"),k&&T("get")),(nt||j)&&T(C),w&&E.clear&&delete E.clear}else v=b.getConstructor(S,_,k,C),u(v.prototype,O),p.NEED=!0;return g(v,_),D[_]=v,s(s.G+s.W+s.F*(v!=x),D),w||b.setStrong(v,_,k),v}},function(r,o,i){var c=i(2)("iterator"),s=!1;try{var a=[7][c]();a.return=function(){s=!0},Array.from(a,function(){throw 2})}catch{}r.exports=function(u,p){if(!p&&!s)return!1;var h=!1;try{var l=[7],f=l[c]();f.next=function(){return{done:h=!0}},l[c]=function(){return f},u(l)}catch{}return h}},function(r,o,i){var c=i(4),s=i(93).set;r.exports=function(a,u,p){var h,l=u.constructor;return l!==p&&typeof l=="function"&&(h=l.prototype)!==p.prototype&&c(h)&&s&&s(a,h),a}},function(r,o,i){var c=i(4),s=i(10),a=function(u,p){if(s(u),!c(p)&&p!==null)throw TypeError(p+": can't set as prototype!")};r.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(u,p,h){try{h=i(17)(Function.call,i(94).f(Object.prototype,"__proto__").set,2),h(u,[]),p=!(u instanceof Array)}catch{p=!0}return function(l,f){return a(l,f),p?l.__proto__=f:h(l,f),l}}({},!1):void 0),check:a}},function(r,o,i){var c=i(95),s=i(20),a=i(18),u=i(33),p=i(11),h=i(31),l=Object.getOwnPropertyDescriptor;o.f=i(5)?l:function(f,d){if(f=a(f),d=u(d,!0),h)try{return l(f,d)}catch{}if(p(f,d))return s(!c.f.call(f,d),f[d])}},function(r,o){o.f={}.propertyIsEnumerable},function(r,o,i){r.exports=function(){var c=[].map.call(arguments,function(s){return s.trim()}).filter(function(s){return s.length}).join("-");return c.length?c.length!==1&&/[_.\- ]+/.test(c)?c.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,function(s,a){return a.toUpperCase()}):c[0]===c[0].toLowerCase()&&c.slice(1)!==c.slice(1).toLowerCase()?c:c.toLowerCase():""}},function(r,o,i){function c(h,l){if(!(h instanceof l))throw new TypeError("Cannot call a class as a function")}var s=i(98),a=Object.assign||function(h){for(var l=1;l<arguments.length;l++){var f=arguments[l];for(var d in f)Object.prototype.hasOwnProperty.call(f,d)&&(h[d]=f[d])}return h},u={key:null,v:"1.4.4",protocol:"https",hostAndPath:"webapi.amap.com/maps",plugin:[],callback:"amapInitComponent"},p=function(){function h(l){c(this,h),this._config=a({},u,l),this._document=document,this._window=window,this._scriptLoaded=!1,this._queueEvents=[s.a]}return h.prototype.load=function(){var l=this;if(this._window.AMap&&this._window.AMap.Map)return this.loadUIAMap();if(this._scriptLoadingPromise)return this._scriptLoadingPromise;var f=this._document.createElement("script");f.type="text/javascript",f.async=!0,f.defer=!0,f.src=this._getScriptSrc();var d=this._config.uiVersion?this.loadUIAMap():null;return this._scriptLoadingPromise=new Promise(function(m,g){l._window.amapInitComponent=function(){for(;l._queueEvents.length;)l._queueEvents.pop().apply();if(!d)return m();d.then(function(){window.initAMapUI(),setTimeout(m)})},f.onerror=function(y){return g(y)}}),this._document.head.appendChild(f),this._scriptLoadingPromise},h.prototype.loadUIAMap=function(){var l=this;return!this._config.uiVersion||window.AMapUI?Promise.resolve():new Promise(function(f,d){var m=document.createElement("script"),g=l._config.uiVersion.split("."),y=g[0],_=g[1],S=g[2];if(y===void 0||_===void 0)return void console.error("amap ui version is not correct, please check! version: ",l._config.uiVersion);var O=l._config.protocol+"://webapi.amap.com/ui/"+y+"."+_+"/main-async.js";S&&(O+="?v="+y+"."+_+"."+S),m.src=O,m.type="text/javascript",m.async=!0,l._document.head.appendChild(m),m.onload=function(){setTimeout(f,0)},m.onerror=function(){return d()}})},h.prototype._getScriptSrc=function(){var l=/^AMap./,f=this._config,d=["v","key","plugin","callback"];if(f.plugin&&f.plugin.length>0){f.plugin.push("Autocomplete","PlaceSearch","PolyEditor","CircleEditor");var m=[];f.plugin.forEach(function(y){var _=l.test(y)?y:"AMap."+y,S=_.replace(l,"");m.push(_,S)}),f.plugin=m}var g=Object.keys(f).filter(function(y){return~d.indexOf(y)}).filter(function(y){return f[y]!=null}).filter(function(y){return!Array.isArray(f[y])||Array.isArray(f[y])&&f[y].length>0}).map(function(y){var _=f[y];return Array.isArray(_)?{key:y,value:_.join(",")}:{key:y,value:_}}).map(function(y){return y.key+"="+y.value}).join("&");return this._config.protocol+"://"+this._config.hostAndPath+"?"+g},h}();o.a=p},function(r,o,i){function c(){if(AMap.UA.ios&&document.location.protocol!=="https:"){var a=new s.a;navigator.geolocation.getCurrentPosition=function(){return a.getCurrentPosition.apply(a,arguments)},navigator.geolocation.watchPosition=function(){return a.watchPosition.apply(a,arguments)}}}o.a=c;var s=i(99)},function(r,o,i){function c(){this._remoteSvrUrl="https://webapi.amap.com/html/geolocate.html",this._callbackList=[],this._seqBase=1,this._frameReady=0,this._watchIdMap={}}c.prototype={_getSeq:function(){return this._seqBase++},_onRrameReady:function(s){if(this._frameReady===0)return this._frameReadyList||(this._frameReadyList=[]),this._frameReadyList.push(s),void this._prepareIframe();s.call(this)},_prepareIframe:function(){if(!this._iframeWin){var s=document.createElement("iframe");s.src=this._remoteSvrUrl+(this._remoteSvrUrl.indexOf("?")>0?"&":"?"),s.width="0px",s.height="0px",s.style.position="absolute",s.style.display="none",s.allow="geolocation";var a=this,u=setTimeout(function(){a._frameReady=!1,a._callbackFrameReadyList()},5e3);s.onload=function(){clearTimeout(u),a._frameReady=!0,a._callbackFrameReadyList(),s.onload=null},document.body.appendChild(s),this._iframeWin=s.contentWindow,window.addEventListener("message",function(p){a._remoteSvrUrl.indexOf(p.origin)===0&&a._handleRemoteMsg(p.data)},!1)}},_callbackFrameReadyList:function(){if(this._frameReadyList){var s=this._frameReadyList;this._frameReadyList=null;for(var a=0,u=s.length;a<u;a++)s[a].call(this,this._frameReady)}},_pickCallback:function(s,a){for(var u=this._callbackList,p=0,h=u.length;p<h;p++){var l=u[p];if(s===l.seq)return a||u.splice(p,1),l}},_handleRemoteMsg:function(s){var a=s.seq,u=this._pickCallback(a,!!s.notify);u?u.cbk.call(null,s.error,s.result):console.warn("Receive remote msg: ",s)},_postMessage:function(s,a,u,p){this._prepareIframe();var h={cmd:s,args:a,seq:p||this._getSeq()};this._callbackList.push({cbk:u,seq:h.seq}),this._onRrameReady(function(){if(this._frameReady===!0)try{this._iframeWin.postMessage(h,"*")}catch(l){this._pickCallback(h.seq),u(l)}else this._pickCallback(h.seq),u({message:"iFrame load failed!"})})},getCurrentPosition:function(s,a,u){this._postMessage("getCurrentPosition",[u],function(p,h){if(p)return void(a&&a(p));s&&s(h)})},watchPosition:function(s,a,u){var p="wk"+this._getSeq(),h=this._getSeq();this._watchIdMap[p]={stat:0,seq:h};var l=this;return this._postMessage("watchPosition",[u],function(f,d){var m=null;d&&(m=d.id);var g=l._watchIdMap[p];if(g.id=m,g.stat=1,g.callbackList){var y=g.callbackList;g.callbackList=null;for(var _=0,S=y.length;_<S;_++)y[_].call(l,m)}if(f)return void(a&&a(f));s&&s(d.pos)},h),p},clearWatch:function(s,a){function u(l){h._postMessage("clearWatch",[l],function(f,d){f||(h._pickCallback(p.seq),delete h._watchIdMap[s]),a&&a(f,d)})}if(!this._watchIdMap[s])return void a("Id not exists: "+s);var p=this._watchIdMap[s],h=this;p.stat<1?(p.callbackList||(p.callbackList=[]),p.callbackList.push(function(l){u(l)})):u(p.id)}},o.a=c},function(r,o,i){function c(l){i(101)}var s=i(48),a=i(105),u=i(1),p=c,h=Object(u.a)(s.a,a.a,a.b,!1,p,null,null);o.a=h.exports},function(r,o,i){var c=i(102);typeof c=="string"&&(c=[[r.i,c,""]]),c.locals&&(r.exports=c.locals),i(47)("d6014b94",c,!0)},function(r,o,i){o=r.exports=i(46)(!1),o.push([r.i,".el-vue-amap-container,.el-vue-amap-container .el-vue-amap{height:100%}",""])},function(r,o){r.exports=function(i,c){for(var s=[],a={},u=0;u<c.length;u++){var p=c[u],h=p[0],l=p[1],f=p[2],d=p[3],m={id:i+":"+u,css:l,media:f,sourceMap:d};a[h]?a[h].parts.push(m):s.push(a[h]={id:h,parts:[m]})}return s}},function(r,o,i){function c(){for(var s=[],a="0123456789abcdef",u=0;u<36;u++)s[u]=a.substr(Math.floor(16*Math.random()),1);return s[14]="4",s[19]=a.substr(3&s[19]|8,1),s[8]=s[13]=s[18]=s[23]="-",s.join("")}o.a=c},function(r,o,i){i.d(o,"a",function(){return c}),i.d(o,"b",function(){return s});var c=function(){var a=this,u=a.$createElement,p=a._self._c||u;return p("div",{staticClass:"el-vue-amap-container"},[p("div",{staticClass:"el-vue-amap"}),a._v(" "),a._t("default")],2)},s=[]},function(r,o,i){var c=i(51),s=i(1),a=Object(s.a)(c.a,void 0,void 0,!1,null,null,null);o.a=a.exports},function(r,o,i){function c(l){i(108)}var s=i(53),a=i(110),u=i(1),p=c,h=Object(u.a)(s.a,a.a,a.b,!1,p,null,null);o.a=h.exports},function(r,o,i){var c=i(109);typeof c=="string"&&(c=[[r.i,c,""]]),c.locals&&(r.exports=c.locals),i(47)("80e271aa",c,!0)},function(r,o,i){o=r.exports=i(46)(!1),o.push([r.i,".el-vue-search-box-container{position:relative;width:360px;height:45px;background:#fff;box-shadow:0 2px 2px rgba(0,0,0,.15);border-radius:2px 3px 3px 2px;z-index:10}.el-vue-search-box-container .search-box-wrapper{position:absolute;display:flex;align-items:center;left:0;top:0;width:100%;height:100%;box-sizing:border-box}.el-vue-search-box-container .search-box-wrapper input{flex:1;height:20px;line-height:20px;letter-spacing:.5px;font-size:14px;text-indent:10px;box-sizing:border-box;border:none;outline:none}.el-vue-search-box-container .search-box-wrapper .search-btn{width:45px;height:100%;display:flex;align-items:center;justify-content:center;background:transparent;cursor:pointer}.el-vue-search-box-container .search-tips{position:absolute;top:100%;border:1px solid #dbdbdb;background:#fff;overflow:auto}.el-vue-search-box-container .search-tips ul{padding:0;margin:0}.el-vue-search-box-container .search-tips ul li{height:40px;line-height:40px;box-shadow:0 1px 1px rgba(0,0,0,.1);padding:0 10px;cursor:pointer}.el-vue-search-box-container .search-tips ul li.autocomplete-selected{background:#eee}",""])},function(r,o,i){i.d(o,"a",function(){return c}),i.d(o,"b",function(){return s});var c=function(){var a=this,u=a.$createElement,p=a._self._c||u;return p("div",{staticClass:"el-vue-search-box-container",on:{keydown:[function(h){if(!("button"in h)&&a._k(h.keyCode,"up",38,h.key,["Up","ArrowUp"]))return null;a.selectTip("up")},function(h){if(!("button"in h)&&a._k(h.keyCode,"down",40,h.key,["Down","ArrowDown"]))return null;a.selectTip("down")}]}},[p("div",{staticClass:"search-box-wrapper"},[p("input",{directives:[{name:"model",rawName:"v-model",value:a.keyword,expression:"keyword"}],attrs:{type:"text"},domProps:{value:a.keyword},on:{keyup:function(h){return"button"in h||!a._k(h.keyCode,"enter",13,h.key,"Enter")?a.search(h):null},input:[function(h){h.target.composing||(a.keyword=h.target.value)},a.autoComplete]}}),a._v(" "),p("span",{staticClass:"search-btn",on:{click:a.search}},[a._v("\u641C\u7D22")])]),a._v(" "),p("div",{staticClass:"search-tips"},[p("ul",a._l(a.tips,function(h,l){return p("li",{key:l,class:{"autocomplete-selected":l===a.selectedTip},on:{click:function(f){a.changeTip(h)},mouseover:function(f){a.selectedTip=l}}},[a._v(a._s(h.name))])}))])])},s=[]},function(r,o,i){var c=i(54),s=i(112),a=i(1),u=Object(a.a)(c.a,s.a,s.b,!1,null,null,null);o.a=u.exports},function(r,o,i){i.d(o,"a",function(){return c}),i.d(o,"b",function(){return s});var c=function(){var a=this,u=a.$createElement;return(a._self._c||u)("div")},s=[]},function(r,o,i){var c=i(55),s=i(114),a=i(1),u=Object(a.a)(c.a,s.a,s.b,!1,null,null,null);o.a=u.exports},function(r,o,i){i.d(o,"a",function(){return c}),i.d(o,"b",function(){return s});var c=function(){var a=this,u=a.$createElement;return(a._self._c||u)("div")},s=[]},function(r,o,i){var c=i(56),s=i(1),a=Object(s.a)(c.a,void 0,void 0,!1,null,null,null);o.a=a.exports},function(r,o,i){var c=i(57),s=i(117),a=i(1),u=Object(a.a)(c.a,s.a,s.b,!1,null,null,null);o.a=u.exports},function(r,o,i){i.d(o,"a",function(){return c}),i.d(o,"b",function(){return s});var c=function(){var a=this,u=a.$createElement;return(a._self._c||u)("div")},s=[]},function(r,o,i){var c=i(58),s=i(119),a=i(1),u=Object(a.a)(c.a,s.a,s.b,!1,null,null,null);o.a=u.exports},function(r,o,i){i.d(o,"a",function(){return c}),i.d(o,"b",function(){return s});var c=function(){var a=this,u=a.$createElement;return(a._self._c||u)("div")},s=[]},function(r,o,i){var c=i(59),s=i(121),a=i(1),u=Object(a.a)(c.a,s.a,s.b,!1,null,null,null);o.a=u.exports},function(r,o,i){i.d(o,"a",function(){return c}),i.d(o,"b",function(){return s});var c=function(){var a=this,u=a.$createElement;return(a._self._c||u)("div")},s=[]},function(r,o,i){var c=i(60),s=i(123),a=i(1),u=Object(a.a)(c.a,s.a,s.b,!1,null,null,null);o.a=u.exports},function(r,o,i){i.d(o,"a",function(){return c}),i.d(o,"b",function(){return s});var c=function(){var a=this,u=a.$createElement;return(a._self._c||u)("div")},s=[]},function(r,o,i){var c=i(61),s=i(125),a=i(1),u=Object(a.a)(c.a,s.a,s.b,!1,null,null,null);o.a=u.exports},function(r,o,i){i.d(o,"a",function(){return c}),i.d(o,"b",function(){return s});var c=function(){var a=this,u=a.$createElement;return(a._self._c||u)("div")},s=[]},function(r,o,i){var c=i(62),s=i(127),a=i(1),u=Object(a.a)(c.a,s.a,s.b,!1,null,null,null);o.a=u.exports},function(r,o,i){i.d(o,"a",function(){return c}),i.d(o,"b",function(){return s});var c=function(){var a=this,u=a.$createElement;return(a._self._c||u)("div")},s=[]},function(r,o,i){var c=i(63),s=i(129),a=i(1),u=Object(a.a)(c.a,s.a,s.b,!1,null,null,null);o.a=u.exports},function(r,o,i){i.d(o,"a",function(){return c}),i.d(o,"b",function(){return s});var c=function(){var a=this,u=a.$createElement;return(a._self._c||u)("div")},s=[]},function(r,o,i){function c(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}var s=function(){function a(){c(this,a),this._componentMap=new Map,this._map=null}return a.prototype.setMap=function(u){this._map=u},a.prototype.getMap=function(){return this._map},a.prototype.setComponent=function(u,p){this._componentMap.set(u,p)},a.prototype.getComponent=function(u){return this._componentMap.get(u)},a.prototype.getChildInstance=function(u){return this.getComponent(u)},a.prototype.removeComponent=function(u){this._componentMap.delete(u)},a}();o.a=s},function(r,o,i){var c=i(0),s=Object.assign||function(a){for(var u=1;u<arguments.length;u++){var p=arguments[u];for(var h in p)Object.prototype.hasOwnProperty.call(p,h)&&(a[h]=p[h])}return a};o.a=function(a){var u=a.init,p=a.data,h=p===void 0?function(){return{}}:p,l=a.converters,f=l===void 0?{}:l,d=a.handlers,m=d===void 0?{}:d,g=a.computed,y=a.methods,_=a.name,S=a.render,O=a.contextReady,b=a.template,k=a.mixins,w=k===void 0?[]:k,x=a.props,v=x===void 0?{}:x,C=s({},a,{props:v,data:function(){return s({},h(),{converters:f,handlers:m})},mixins:[c.a].concat(w),computed:g,methods:s({},y,{__initComponent:u,__contextReady:O})});return b||S||(C.render=function(){return null}),C.install=function(E){return E.use(_,C)},C}}])})})(Xt);var Kt=Ie(Xt.exports),ze=function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("div",{staticClass:"maps",style:n.MapStyle,on:{click:n.changeMap}},[e("el-amap",{attrs:{zoom:n.Option.zoom,center:n.Option.position}},[e("el-amap-circle-marker",{attrs:{center:n.Option.position,radius:5,fillColor:"#3E86F1",strokeWeight:0}})],1)],1)},Fe=[];Kt.initAMapApiLoader({key:"99f684b9a7773a40ca224894816f7c68",plugin:["AMap.Autocomplete","AMap.Geolocation","Geocoder","AMap.OverView"],v:"1.4.15"});pe.use(Kt);const Ve={props:{Option:{type:Object,defualt:()=>({position:[104.056608,30.695942],zoom:5})}},data(){return{num:0,MapStyle:{top:"5px",left:"5px",width:"50px",height:"50px"}}},methods:{changeMap(){this.num++,this.num%2?this.MapStyle={top:"20px",left:"50%",transform:"translateX(-50%)",width:"400px",height:"200px",borderRadius:"10px"}:this.MapStyle={top:"5px",left:"5px",width:"50px",height:"50px",borderRadius:"50%"}}}},Rt={};var qe=K(Ve,ze,Fe,!1,Ue,"e7163fae",null,null);function Ue(n){for(let t in Rt)this[t]=Rt[t]}var He=function(){return qe.exports}(),We=function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("div",{staticClass:"signal-box"},[e("ul",[e("li",{class:n.signalValue==1?"signal-red":n.signalValue==2?"signal-yellow":n.signalValue==3?"signal-green":"signal-default"}),e("li",{class:n.signalValue==1?"signal-default":n.signalValue==2?"signal-yellow":n.signalValue==3?"signal-green":"signal-default"}),e("li",{class:n.signalValue==1||n.signalValue==2?"signal-default":n.signalValue==3?"signal-green":"signal-default"})]),n.signalText!=1?e("span",{style:n.signalText>200?"color:red":"color:white"},[n._v(n._s(n.signalText))]):n._e()])},Ye=[];const Xe={name:"SignalTower",props:["signalValue","signalText"],computed:{}},Mt={};var Ke=K(Xe,We,Ye,!1,Ge,"40f89c37",null,null);function Ge(n){for(let t in Mt)this[t]=Mt[t]}var Je=function(){return Ke.exports}(),Qe=function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("div",{staticClass:"login"},[e("div",[e("div",{staticClass:"logo"},[n._v("Caner \u8F66\u63A7")]),e("input",{directives:[{name:"model",rawName:"v-model",value:n.roomID,expression:"roomID"}],attrs:{type:"text",placeholder:"\u623F\u95F4",maxlength:"20"},domProps:{value:n.roomID},on:{input:function(r){r.target.composing||(n.roomID=r.target.value)}}}),e("input",{directives:[{name:"model",rawName:"v-model",value:n.name,expression:"name"}],attrs:{type:"text",placeholder:"\u6635\u79F0",maxlength:"20"},domProps:{value:n.name},on:{input:function(r){r.target.composing||(n.name=r.target.value)}}}),e("div",{staticClass:"err"},[n._v(n._s(n.err||n.error))]),e("button",{attrs:{disabled:n.disabled},on:{click:n.login}},[n._v("\u52A0\u5165")])])])},Ze=[];const tn=n=>new Promise(t=>setTimeout(t,n)),en={props:{err:{type:String,default:()=>""}},data(){return{name:"",roomID:"",error:"",disabled:!1}},methods:{async login(){this.name&&this.roomID?(this.$emit("loginBack",{name:this.name,roomID:this.roomID}),this.disabled=!0,await tn(5e3),this.disabled=!1):(this.error="\u8BF7\u8F93\u5165\u623F\u95F4\u548C\u7528\u6237\u540D\u79F0",this.disabled=!1)}}},Pt={};var nn=K(en,Qe,Ze,!1,rn,"3593f994",null,null);function rn(n){for(let t in Pt)this[t]=Pt[t]}var on=function(){return nn.exports}(),sn=function(){var n=this,t=n.$createElement;return n._self._c,n._m(0)},an=[function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("div",{staticClass:"loading"},[e("figure",[e("div",{staticClass:"dot white"}),e("div",{staticClass:"dot"}),e("div",{staticClass:"dot"}),e("div",{staticClass:"dot"}),e("div",{staticClass:"dot"})])])}];const cn={},Lt={};var un=K(cn,sn,an,!1,ln,"dd6c531a",null,null);function ln(n){for(let t in Lt)this[t]=Lt[t]}var fn=function(){return un.exports}();const pn=n=>new Promise(t=>setTimeout(t,n));class hn{constructor(){this.iceServers=[{urls:["stun:caner.top:3478","stun:stun.l.google.com:19302","stun:stun1.l.google.com:19302","stun:stun2.l.google.com:19302","stun:stun3.l.google.com:19302"]},{urls:"turn:caner.top:3478",username:"admin",credential:"123456"}],this.RTC=null}init(){const t=window.RTCPeerConnection||window.mozRTCPeerConnection||window.webkitRTCPeerConnection;this.RTC=new t({iceServers:this.iceServers})}onicecandidate(t){this.RTC.onicecandidate=t}oniceconnectionstatechange(t){this.RTC.oniceconnectionstatechange=t}ontrack(t){this.RTC.ontrack=t}setRemoteDescription(t){this.RTC.setRemoteDescription(t)}setLocalDescription(t){this.RTC.setLocalDescription(t)}addIceCandidate(t){this.RTC.addIceCandidate(t)}async createAnswer(){return await this.RTC.createAnswer()}async createOffer(){return await this.RTC.createOffer()}async getReaport(t){if(!this.RTC)return;const e=await this.RTC.getStats(null);t(e),await pn(1e3*2),this.getReaport(t)}close(){!this.RTC||(this.RTC.close(),this.RTC=null)}}var I=new hn,dn=function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("div",[n.show?e("div",{on:{click:function(r){return n.audioCapture()}}},[e("svg",{attrs:{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20"}},[e("path",{attrs:{d:"M801.728 364.8a32 32 0 0 0-32 32v91.392c0 129.28-115.648 234.432-257.728 234.432S254.272 617.408 254.272 488.192V393.216a32 32 0 0 0-64 0v94.976c0 157.888 133.248 286.208 300.672 296.448v99.392H357.632c-16.128 0-29.184 14.336-29.184 32.064 0 17.664 13.056 31.936 29.184 31.936h319.04c16.064 0 29.184-14.272 29.184-31.936 0-17.728-13.12-32.064-29.184-32.064H554.944v-101.376c156.992-19.776 278.784-143.488 278.784-294.464V396.8c0-17.728-14.272-32-32-32z",fill:"#40d7c1"}}),e("path",{attrs:{d:"M517.12 678.656a199.104 199.104 0 0 0 198.912-198.848V268.736A199.168 199.168 0 0 0 517.12 69.888a199.04 199.04 0 0 0-198.784 198.848v211.072a199.04 199.04 0 0 0 198.784 198.848z m85.056-126.784a49.856 49.856 0 1 1 0-99.648 49.856 49.856 0 0 1 0 99.648zM382.336 268.736c0-74.368 60.48-134.848 134.784-134.848a135.04 135.04 0 0 1 134.912 134.848v28.48H382.336v-28.48z",fill:"#40d7c1"}})])]):e("div",{staticClass:"loading"},[e("span"),e("span"),e("span")])])},mn=[];const vn=n=>new Promise(t=>setTimeout(t,n)),yn={data(){return{chunks:[],mediaRecorder:null,show:!0}},async mounted(){try{const n=await navigator.mediaDevices.getUserMedia({audio:!0});this.mediaRecorder=new MediaRecorder(n),this.mediaRecorder.ondataavailable=t=>{this.chunks.push(t.data)},this.mediaRecorder.onstart=()=>{this.chunks=[]},this.mediaRecorder.onstop=()=>{const t=new Blob(this.chunks,{type:"audio/webm;codecs=opus"});this.$emit("callBack",t)}}catch{this.show=!1,alert("\u4E0D\u652F\u6301\u97F3\u9891\u8F93\u5165")}},methods:{async audioCapture(){this.mediaRecorder.start(),this.show=!1,await vn(1e3*5),this.mediaRecorder.stop(),this.show=!0},blob2audioBuffer(n){const t=new FileReader;t.onload=function(){console.log(123,this.result),new AudioContext().decodeAudioData(this.result,function(r){console.log(r)})},t.readAsArrayBuffer(n)}}},Nt={};var gn=K(yn,dn,mn,!1,_n,"5deda52a",null,null);function _n(n){for(let t in Nt)this[t]=Nt[t]}var bn=function(){return gn.exports}();const q=Object.create(null);q.open="0";q.close="1";q.ping="2";q.pong="3";q.message="4";q.upgrade="5";q.noop="6";const st=Object.create(null);Object.keys(q).forEach(n=>{st[q[n]]=n});const wn={type:"error",data:"parser error"},xn=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Cn=typeof ArrayBuffer=="function",kn=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,Gt=({type:n,data:t},e,r)=>xn&&t instanceof Blob?e?r(t):Bt(t,r):Cn&&(t instanceof ArrayBuffer||kn(t))?e?r(t):Bt(new Blob([t]),r):r(q[n]+(t||"")),Bt=(n,t)=>{const e=new FileReader;return e.onload=function(){const r=e.result.split(",")[1];t("b"+r)},e.readAsDataURL(n)},It="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",tt=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let n=0;n<It.length;n++)tt[It.charCodeAt(n)]=n;const On=n=>{let t=n.length*.75,e=n.length,r,o=0,i,c,s,a;n[n.length-1]==="="&&(t--,n[n.length-2]==="="&&t--);const u=new ArrayBuffer(t),p=new Uint8Array(u);for(r=0;r<e;r+=4)i=tt[n.charCodeAt(r)],c=tt[n.charCodeAt(r+1)],s=tt[n.charCodeAt(r+2)],a=tt[n.charCodeAt(r+3)],p[o++]=i<<2|c>>4,p[o++]=(c&15)<<4|s>>2,p[o++]=(s&3)<<6|a&63;return u},En=typeof ArrayBuffer=="function",Jt=(n,t)=>{if(typeof n!="string")return{type:"message",data:Qt(n,t)};const e=n.charAt(0);return e==="b"?{type:"message",data:Sn(n.substring(1),t)}:st[e]?n.length>1?{type:st[e],data:n.substring(1)}:{type:st[e]}:wn},Sn=(n,t)=>{if(En){const e=On(n);return Qt(e,t)}else return{base64:!0,data:n}},Qt=(n,t)=>{switch(t){case"blob":return n instanceof ArrayBuffer?new Blob([n]):n;case"arraybuffer":default:return n}},Zt=String.fromCharCode(30),An=(n,t)=>{const e=n.length,r=new Array(e);let o=0;n.forEach((i,c)=>{Gt(i,!1,s=>{r[c]=s,++o===e&&t(r.join(Zt))})})},Tn=(n,t)=>{const e=n.split(Zt),r=[];for(let o=0;o<e.length;o++){const i=Jt(e[o],t);if(r.push(i),i.type==="error")break}return r},te=4;function M(n){if(n)return $n(n)}function $n(n){for(var t in M.prototype)n[t]=M.prototype[t];return n}M.prototype.on=M.prototype.addEventListener=function(n,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(t),this};M.prototype.once=function(n,t){function e(){this.off(n,e),t.apply(this,arguments)}return e.fn=t,this.on(n,e),this};M.prototype.off=M.prototype.removeListener=M.prototype.removeAllListeners=M.prototype.removeEventListener=function(n,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var e=this._callbacks["$"+n];if(!e)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var r,o=0;o<e.length;o++)if(r=e[o],r===t||r.fn===t){e.splice(o,1);break}return e.length===0&&delete this._callbacks["$"+n],this};M.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),e=this._callbacks["$"+n],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(e){e=e.slice(0);for(var r=0,o=e.length;r<o;++r)e[r].apply(this,t)}return this};M.prototype.emitReserved=M.prototype.emit;M.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};M.prototype.hasListeners=function(n){return!!this.listeners(n).length};const X=(()=>typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")())();function ee(n,...t){return t.reduce((e,r)=>(n.hasOwnProperty(r)&&(e[r]=n[r]),e),{})}const Rn=setTimeout,Mn=clearTimeout;function lt(n,t){t.useNativeTimers?(n.setTimeoutFn=Rn.bind(X),n.clearTimeoutFn=Mn.bind(X)):(n.setTimeoutFn=setTimeout.bind(X),n.clearTimeoutFn=clearTimeout.bind(X))}const Pn=1.33;function Ln(n){return typeof n=="string"?Nn(n):Math.ceil((n.byteLength||n.size)*Pn)}function Nn(n){let t=0,e=0;for(let r=0,o=n.length;r<o;r++)t=n.charCodeAt(r),t<128?e+=1:t<2048?e+=2:t<55296||t>=57344?e+=3:(r++,e+=4);return e}class Bn extends Error{constructor(t,e,r){super(t),this.description=e,this.context=r,this.type="TransportError"}}class ne extends M{constructor(t){super(),this.writable=!1,lt(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,e,r){return super.emitReserved("error",new Bn(t,e,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const e=Jt(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const ie="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),vt=64,In={};let Dt=0,it=0,jt;function zt(n){let t="";do t=ie[n%vt]+t,n=Math.floor(n/vt);while(n>0);return t}function re(){const n=zt(+new Date);return n!==jt?(Dt=0,jt=n):n+"."+zt(Dt++)}for(;it<vt;it++)In[ie[it]]=it;function oe(n){let t="";for(let e in n)n.hasOwnProperty(e)&&(t.length&&(t+="&"),t+=encodeURIComponent(e)+"="+encodeURIComponent(n[e]));return t}function Dn(n){let t={},e=n.split("&");for(let r=0,o=e.length;r<o;r++){let i=e[r].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}let se=!1;try{se=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch{}const jn=se;function ae(n){const t=n.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||jn))return new XMLHttpRequest}catch{}if(!t)try{return new X[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function zn(){}const Fn=function(){return new ae({xdomain:!1}).responseType!=null}();class Vn extends ne{constructor(t){if(super(t),this.polling=!1,typeof location!="undefined"){const r=location.protocol==="https:";let o=location.port;o||(o=r?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||o!==t.port,this.xs=t.secure!==r}const e=t&&t.forceBase64;this.supportsBinary=Fn&&!e}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const e=()=>{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||e()})),this.writable||(r++,this.once("drain",function(){--r||e()}))}else e()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const e=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};Tn(t,this.socket.binaryType).forEach(e),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,An(t,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const e=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=re()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(e==="https"&&Number(this.opts.port)!==443||e==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const o=oe(t),i=this.opts.hostname.indexOf(":")!==-1;return e+"://"+(i?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(o.length?"?"+o:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new V(this.uri(),t)}doWrite(t,e){const r=this.request({method:"POST",data:t});r.on("success",e),r.on("error",(o,i)=>{this.onError("xhr post error",o,i)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(e,r)=>{this.onError("xhr poll error",e,r)}),this.pollXhr=t}}class V extends M{constructor(t,e){super(),lt(this,e),this.opts=e,this.method=e.method||"GET",this.uri=t,this.async=e.async!==!1,this.data=e.data!==void 0?e.data:null,this.create()}create(){const t=ee(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const e=this.xhr=new ae(t);try{e.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){e.setDisableHeaderCheck&&e.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&e.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{e.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{e.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in e&&(e.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(e.timeout=this.opts.requestTimeout),e.onreadystatechange=()=>{e.readyState===4&&(e.status===200||e.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof e.status=="number"?e.status:0)},0))},e.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document!="undefined"&&(this.index=V.requestsCount++,V.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr=="undefined"||this.xhr===null)){if(this.xhr.onreadystatechange=zn,t)try{this.xhr.abort()}catch{}typeof document!="undefined"&&delete V.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}V.requestsCount=0;V.requests={};if(typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",Ft);else if(typeof addEventListener=="function"){const n="onpagehide"in X?"pagehide":"unload";addEventListener(n,Ft,!1)}}function Ft(){for(let n in V.requests)V.requests.hasOwnProperty(n)&&V.requests[n].abort()}const qn=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,e)=>e(t,0))(),rt=X.WebSocket||X.MozWebSocket,Vt=!0,Un="arraybuffer",qt=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Hn extends ne{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),e=this.opts.protocols,r=qt?{}:ee(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=Vt&&!qt?e?new rt(t,e):new rt(t):new rt(t,e,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType||Un,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const r=t[e],o=e===t.length-1;Gt(r,this.supportsBinary,i=>{const c={};try{Vt&&this.ws.send(i)}catch{}o&&qn(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const e=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(e==="wss"&&Number(this.opts.port)!==443||e==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=re()),this.supportsBinary||(t.b64=1);const o=oe(t),i=this.opts.hostname.indexOf(":")!==-1;return e+"://"+(i?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(o.length?"?"+o:"")}check(){return!!rt}}const Wn={websocket:Hn,polling:Vn},Yn=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Xn=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function yt(n){const t=n,e=n.indexOf("["),r=n.indexOf("]");e!=-1&&r!=-1&&(n=n.substring(0,e)+n.substring(e,r).replace(/:/g,";")+n.substring(r,n.length));let o=Yn.exec(n||""),i={},c=14;for(;c--;)i[Xn[c]]=o[c]||"";return e!=-1&&r!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=Kn(i,i.path),i.queryKey=Gn(i,i.query),i}function Kn(n,t){const e=/\/{2,9}/g,r=t.replace(e,"/").split("/");return(t.substr(0,1)=="/"||t.length===0)&&r.splice(0,1),t.substr(t.length-1,1)=="/"&&r.splice(r.length-1,1),r}function Gn(n,t){const e={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,i){o&&(e[o]=i)}),e}class Y extends M{constructor(t,e={}){super(),t&&typeof t=="object"&&(e=t,t=null),t?(t=yt(t),e.hostname=t.host,e.secure=t.protocol==="https"||t.protocol==="wss",e.port=t.port,t.query&&(e.query=t.query)):e.host&&(e.hostname=yt(e.host).host),lt(this,e),this.secure=e.secure!=null?e.secure:typeof location!="undefined"&&location.protocol==="https:",e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=e.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=e.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},e),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=Dn(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&addEventListener("beforeunload",()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},!1),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const e=Object.assign({},this.opts.query);e.EIO=te,e.transport=t,this.id&&(e.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new Wn[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Y.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",e=>this.onClose("transport close",e))}probe(t){let e=this.createTransport(t),r=!1;Y.priorWebsocketSuccess=!1;const o=()=>{r||(e.send([{type:"ping",data:"probe"}]),e.once("packet",h=>{if(!r)if(h.type==="pong"&&h.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;Y.priorWebsocketSuccess=e.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(p(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())})}else{const l=new Error("probe error");l.transport=e.name,this.emitReserved("upgradeError",l)}}))};function i(){r||(r=!0,p(),e.close(),e=null)}const c=h=>{const l=new Error("probe error: "+h);l.transport=e.name,i(),this.emitReserved("upgradeError",l)};function s(){c("transport closed")}function a(){c("socket closed")}function u(h){e&&h.name!==e.name&&i()}const p=()=>{e.removeListener("open",o),e.removeListener("error",c),e.removeListener("close",s),this.off("close",a),this.off("upgrading",u)};e.once("open",o),e.once("error",c),e.once("close",s),this.once("close",a),this.once("upgrading",u),e.open()}onOpen(){if(this.readyState="open",Y.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const e=this.upgrades.length;for(;t<e;t++)this.probe(this.upgrades[t])}}onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.resetPingTimeout(),this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const e=new Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let r=0;r<this.writeBuffer.length;r++){const o=this.writeBuffer[r].data;if(o&&(e+=Ln(o)),r>0&&e>this.maxPayload)return this.writeBuffer.slice(0,r);e+=2}return this.writeBuffer}write(t,e,r){return this.sendPacket("message",t,e,r),this}send(t,e,r){return this.sendPacket("message",t,e,r),this}sendPacket(t,e,r,o){if(typeof e=="function"&&(o=e,e=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const i={type:t,data:e,options:r};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},r=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Y.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,e){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&removeEventListener("offline",this.offlineEventListener,!1),this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const e=[];let r=0;const o=t.length;for(;r<o;r++)~this.transports.indexOf(t[r])&&e.push(t[r]);return e}}Y.protocol=te;function Jn(n,t="",e){let r=n;e=e||typeof location!="undefined"&&location,n==null&&(n=e.protocol+"//"+e.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=e.protocol+n:n=e.host+n),/^(https?|wss?):\/\//.test(n)||(typeof e!="undefined"?n=e.protocol+"//"+n:n="https://"+n),r=yt(n)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const i=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+t,r.href=r.protocol+"://"+i+(e&&e.port===r.port?"":":"+r.port),r}const Qn=typeof ArrayBuffer=="function",Zn=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,ce=Object.prototype.toString,ti=typeof Blob=="function"||typeof Blob!="undefined"&&ce.call(Blob)==="[object BlobConstructor]",ei=typeof File=="function"||typeof File!="undefined"&&ce.call(File)==="[object FileConstructor]";function xt(n){return Qn&&(n instanceof ArrayBuffer||Zn(n))||ti&&n instanceof Blob||ei&&n instanceof File}function at(n,t){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let e=0,r=n.length;e<r;e++)if(at(n[e]))return!0;return!1}if(xt(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return at(n.toJSON(),!0);for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&at(n[e]))return!0;return!1}function ni(n){const t=[],e=n.data,r=n;return r.data=gt(e,t),r.attachments=t.length,{packet:r,buffers:t}}function gt(n,t){if(!n)return n;if(xt(n)){const e={_placeholder:!0,num:t.length};return t.push(n),e}else if(Array.isArray(n)){const e=new Array(n.length);for(let r=0;r<n.length;r++)e[r]=gt(n[r],t);return e}else if(typeof n=="object"&&!(n instanceof Date)){const e={};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=gt(n[r],t));return e}return n}function ii(n,t){return n.data=_t(n.data,t),n.attachments=void 0,n}function _t(n,t){if(!n)return n;if(n&&n._placeholder)return t[n.num];if(Array.isArray(n))for(let e=0;e<n.length;e++)n[e]=_t(n[e],t);else if(typeof n=="object")for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&(n[e]=_t(n[e],t));return n}const ri=5;var A;(function(n){n[n.CONNECT=0]="CONNECT",n[n.DISCONNECT=1]="DISCONNECT",n[n.EVENT=2]="EVENT",n[n.ACK=3]="ACK",n[n.CONNECT_ERROR=4]="CONNECT_ERROR",n[n.BINARY_EVENT=5]="BINARY_EVENT",n[n.BINARY_ACK=6]="BINARY_ACK"})(A||(A={}));class oi{constructor(t){this.replacer=t}encode(t){return(t.type===A.EVENT||t.type===A.ACK)&&at(t)?(t.type=t.type===A.EVENT?A.BINARY_EVENT:A.BINARY_ACK,this.encodeAsBinary(t)):[this.encodeAsString(t)]}encodeAsString(t){let e=""+t.type;return(t.type===A.BINARY_EVENT||t.type===A.BINARY_ACK)&&(e+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(e+=t.nsp+","),t.id!=null&&(e+=t.id),t.data!=null&&(e+=JSON.stringify(t.data,this.replacer)),e}encodeAsBinary(t){const e=ni(t),r=this.encodeAsString(e.packet),o=e.buffers;return o.unshift(r),o}}class Ct extends M{constructor(t){super(),this.reviver=t}add(t){let e;if(typeof t=="string")e=this.decodeString(t),e.type===A.BINARY_EVENT||e.type===A.BINARY_ACK?(this.reconstructor=new si(e),e.attachments===0&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e);else if(xt(t)||t.base64)if(this.reconstructor)e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emitReserved("decoded",e));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let e=0;const r={type:Number(t.charAt(0))};if(A[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===A.BINARY_EVENT||r.type===A.BINARY_ACK){const i=e+1;for(;t.charAt(++e)!=="-"&&e!=t.length;);const c=t.substring(i,e);if(c!=Number(c)||t.charAt(e)!=="-")throw new Error("Illegal attachments");r.attachments=Number(c)}if(t.charAt(e+1)==="/"){const i=e+1;for(;++e&&!(t.charAt(e)===","||e===t.length););r.nsp=t.substring(i,e)}else r.nsp="/";const o=t.charAt(e+1);if(o!==""&&Number(o)==o){const i=e+1;for(;++e;){const c=t.charAt(e);if(c==null||Number(c)!=c){--e;break}if(e===t.length)break}r.id=Number(t.substring(i,e+1))}if(t.charAt(++e)){const i=this.tryParse(t.substr(e));if(Ct.isPayloadValid(r.type,i))r.data=i;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,e){switch(t){case A.CONNECT:return typeof e=="object";case A.DISCONNECT:return e===void 0;case A.CONNECT_ERROR:return typeof e=="string"||typeof e=="object";case A.EVENT:case A.BINARY_EVENT:return Array.isArray(e)&&e.length>0;case A.ACK:case A.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class si{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const e=ii(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}var ai=Object.freeze(Object.defineProperty({__proto__:null,protocol:ri,get PacketType(){return A},Encoder:oi,Decoder:Ct},Symbol.toStringTag,{value:"Module"}));function F(n,t,e){return n.on(t,e),function(){n.off(t,e)}}const ci=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ue extends M{constructor(t,e,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=e,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[F(t,"open",this.onopen.bind(this)),F(t,"packet",this.onpacket.bind(this)),F(t,"error",this.onerror.bind(this)),F(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){if(ci.hasOwnProperty(t))throw new Error('"'+t+'" is a reserved event name');e.unshift(t);const r={type:A.EVENT,data:e};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof e[e.length-1]=="function"){const c=this.ids++,s=e.pop();this._registerAckCallback(c,s),r.id=c}const o=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!o||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,e){const r=this.flags.timeout;if(r===void 0){this.acks[t]=e;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let i=0;i<this.sendBuffer.length;i++)this.sendBuffer[i].id===t&&this.sendBuffer.splice(i,1);e.call(this,new Error("operation has timed out"))},r);this.acks[t]=(...i)=>{this.io.clearTimeoutFn(o),e.apply(this,[null,...i])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:A.CONNECT,data:t})}):this.packet({type:A.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,e){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case A.CONNECT:if(t.data&&t.data.sid){const o=t.data.sid;this.onconnect(o)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case A.EVENT:case A.BINARY_EVENT:this.onevent(t);break;case A.ACK:case A.BINARY_ACK:this.onack(t);break;case A.DISCONNECT:this.ondisconnect();break;case A.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const e=t.data||[];t.id!=null&&e.push(this.ack(t.id)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const r of e)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const e=this;let r=!1;return function(...o){r||(r=!0,e.packet({type:A.ACK,id:t,data:o}))}}onack(t){const e=this.acks[t.id];typeof e=="function"&&(e.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:A.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const e=this._anyListeners;for(let r=0;r<e.length;r++)if(t===e[r])return e.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const e=this._anyOutgoingListeners;for(let r=0;r<e.length;r++)if(t===e[r])return e.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const e=this._anyOutgoingListeners.slice();for(const r of e)r.apply(this,t.data)}}}function J(n){n=n||{},this.ms=n.min||100,this.max=n.max||1e4,this.factor=n.factor||2,this.jitter=n.jitter>0&&n.jitter<=1?n.jitter:0,this.attempts=0}J.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),e=Math.floor(t*this.jitter*n);n=(Math.floor(t*10)&1)==0?n-e:n+e}return Math.min(n,this.max)|0};J.prototype.reset=function(){this.attempts=0};J.prototype.setMin=function(n){this.ms=n};J.prototype.setMax=function(n){this.max=n};J.prototype.setJitter=function(n){this.jitter=n};class bt extends M{constructor(t,e){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(e=t,t=void 0),e=e||{},e.path=e.path||"/socket.io",this.opts=e,lt(this,e),this.reconnection(e.reconnection!==!1),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor((r=e.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new J({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(e.timeout==null?2e4:e.timeout),this._readyState="closed",this.uri=t;const o=e.parser||ai;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=e.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(e=this.backoff)===null||e===void 0||e.setMin(t),this)}randomizationFactor(t){var e;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(e=this.backoff)===null||e===void 0||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(e=this.backoff)===null||e===void 0||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Y(this.uri,this.opts);const e=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=F(e,"open",function(){r.onopen(),t&&t()}),i=F(e,"error",c=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",c),t?t(c):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const c=this._timeout;c===0&&o();const s=this.setTimeoutFn(()=>{o(),e.close(),e.emit("error",new Error("timeout"))},c);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(o),this.subs.push(i),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(F(t,"ping",this.onping.bind(this)),F(t,"data",this.ondata.bind(this)),F(t,"error",this.onerror.bind(this)),F(t,"close",this.onclose.bind(this)),F(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){this.decoder.add(t)}ondecoded(t){this.emitReserved("packet",t)}onerror(t){this.emitReserved("error",t)}socket(t,e){let r=this.nsps[t];return r||(r=new ue(this,t,e),this.nsps[t]=r),r}_destroy(t){const e=Object.keys(this.nsps);for(const r of e)if(this.nsps[r].active)return;this._close()}_packet(t){const e=this.encoder.encode(t);for(let r=0;r<e.length;r++)this.engine.write(e[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,e){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const e=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},e);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Z={};function ct(n,t){typeof n=="object"&&(t=n,n=void 0),t=t||{};const e=Jn(n,t.path||"/socket.io"),r=e.source,o=e.id,i=e.path,c=Z[o]&&i in Z[o].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||c;let a;return s?a=new bt(r,t):(Z[o]||(Z[o]=new bt(r,t)),a=Z[o]),e.query&&!t.query&&(t.query=e.queryKey),a.socket(e.path,t)}Object.assign(ct,{Manager:bt,Socket:ue,io:ct,connect:ct});var ui=function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("div",{staticClass:"box"},[n.isLogin?e("div",[e("video",{attrs:{id:"v2",autoplay:"",playsinline:""}}),e("Contrl",{ref:"Contrl",staticClass:"ctrl",on:{callBack:n.contrlBack}}),e("Battery",{staticClass:"battery",attrs:{quantity:n.Battery}}),e("Map",{attrs:{Option:n.GPS}}),e("Signal",{staticClass:"signal",attrs:{signalValue:n.Signal,signalText:n.SignalText}}),e("Record",{staticClass:"audio",on:{callBack:n.AudioBack}}),n.showLoading?e("Loading"):n._e()],1):e("Login",{attrs:{err:n.error},on:{loginBack:n.login}})],1)},li=[];const Ut=n=>new Promise(t=>setTimeout(t,n)),fi={components:{Battery:Ne,Contrl:Te,Map:He,Signal:Je,Login:on,Loading:fn,Record:bn},data(){return{socket:null,HOST:"wss://car.caner.top",error:"",isLogin:!1,showLoading:!0,GPS:{position:[104.056608,30.695942],zoom:18},Signal:3,SignalText:0,Battery:100,remoteVideo:null}},methods:{intSoketRtc(n){this.socket=ct(n,{autoConnect:!1,transports:["websocket"]}),this.socket.on("connect",()=>{this.connect()}),this.socket.on("leaved",()=>{this.close("\u8F66\u7AEF\u79BB\u5F00")}),this.socket.on("joined",()=>{this.socket.emit("msg",{type:"startRTC"})}),this.socket.on("msg",t=>{this.msg(t)}),this.socket.on("connect_error",t=>{console.log("\u8FDE\u63A5\u5931\u8D25",t),this.close(t)})},async connect(){console.log("\u8FDE\u63A5\u6210\u529F",this.socket.auth),this.isLogin=!0;try{I.init(),await Ut(100),this.remoteVideo=document.getElementById("v2"),I.ontrack(n=>{this.remoteVideo.srcObject=n.streams[0]}),I.onicecandidate(n=>{n.candidate&&this.socket.emit("msg",{type:"candidate",candidate:n.candidate})}),I.oniceconnectionstatechange(async()=>{(I.RTC.iceConnectionState==="failed"||I.RTC.iceConnectionState==="disconnected"||I.RTC.iceConnectionState==="closed")&&this.close("ICE\u901A\u4FE1\u5931\u8D25"),I.RTC.iceConnectionState==="connected"&&(await Ut(1e3*2),this.$refs.Contrl.initContrl(),this.showLoading=!1)}),I.getReaport(n=>{this.SignalText=n.size})}catch{this.socket.disconnect(),this.isLogin=!1,alert("\u4E0D\u652F\u6301Webrtc")}},async msg(n){if(n.type==="offer"){I.setRemoteDescription(n.offer);const t=await I.createAnswer();I.setLocalDescription(t),this.socket.emit("msg",{type:"answer",answer:t})}else n.type==="candidate"?I.addIceCandidate(n.candidate):n.type==="power"?this.Battery=n.power:n.type==="LTE"?this.Signal=n.LTE:n.type==="GPS"&&(this.GPS.position=n.GPS)},login(n){this.socket?(this.socket.auth={roomID:n.roomID,name:n.name},this.socket.connect()):this.error="\u670D\u52A1\u5668\u8FDE\u63A5\u5931\u8D25"},contrlBack(n){!this.socket&&!this.socket.connected||this.socket.emit("msg",{type:"conctrl",conctrl:n})},AudioBack(n){!this.socket&&!this.socket.connected||(console.log("\u56DE\u8C03",n),this.socket.emit("msg",{type:"Meadia",Meadia:n}))},close(n){I&&I.close(),this.remoteVideo&&(this.remoteVideo.srcObject=null),this.$refs.Contrl&&this.$refs.Contrl.clearContrl(),this.socket.disconnect(),this.isLogin=!1,this.showLoading=!0,this.error=n||""}},mounted(){this.intSoketRtc(this.HOST)}},Ht={};var pi=K(fi,ui,li,!1,hi,"0bcf1ceb",null,null);function hi(n){for(let t in Ht)this[t]=Ht[t]}var mi=function(){return pi.exports}();export{mi as default};