← Back
Editing: maps.js
/*! * NAVER Maps API v3 - 3.10.1 - 2026-08-27 * * Copyright(c) 2026, NAVER corp, Team mantle */ !function(t,e){function i(t,e){n(t,0,t.children.length,e,t)}function n(t,e,i,n,r){r||(r=d(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var s=e;s<i;s++){var a=t.children[s];o(r,t.leaf?n(a):a)}return r}function o(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function r(t,e){return t.minX-e.minX}function s(t,e){return t.minY-e.minY}function a(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function h(t){return t.maxX-t.minX+(t.maxY-t.minY)}function l(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function c(t,e){var i=Math.max(t.minX,e.minX),n=Math.max(t.minY,e.minY),o=Math.min(t.maxX,e.maxX),r=Math.min(t.maxY,e.maxY);return Math.max(0,o-i)*Math.max(0,r-n)}function u(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function p(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function d(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function f(t,e,i,n,o){for(var r=[e,i];r.length;)if(i=r.pop(),e=r.pop(),!(i-e<=n)){var s=e+Math.ceil((i-e)/n/2)*n;g(t,s,e,i,o),r.push(e,s,s,i)}}function g(t,e,i,n,o){_(t,e,i||0,n||t.length-1,o||y)}function _(t,e,i,n,o){for(;n>i;){if(n-i>600){var r=n-i+1,s=e-i+1,a=Math.log(r),h=.5*Math.exp(2*a/3),l=.5*Math.sqrt(a*h*(r-h)/r)*(s-r/2<0?-1:1);_(t,e,Math.max(i,Math.floor(e-s*h/r+l)),Math.min(n,Math.floor(e+(r-s)*h/r+l)),o)}var c=t[e],u=i,p=n;for(m(t,i,e),o(t[n],c)>0&&m(t,i,n);u<p;){for(m(t,u,p),u++,p--;o(t[u],c)<0;)u++;for(;o(t[p],c)>0;)p--}0===o(t[i],c)?m(t,i,p):(p++,m(t,p,n)),p<=e&&(i=p+1),e<=p&&(n=p-1)}}function m(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function y(t,e){return t<e?-1:t>e?1:0}function v(){return t.XMLHttpRequest?new t.XMLHttpRequest:null}var T=t.document,x={},M=null;!function(){var t=function(){};t.prototype={constructor:t,__export:function(){return x}},M=new t}(),M.onJSContentLoaded=null,M.jsContentLoaded=!1;var b="",E=null,S=null,P=null,w=null,O=null,C=!1,I=null,A=null,k=/(o|open)api\.map\.naver\.com\/openapi\/v3\/maps\.js\b/,D=(t.location.href+"").replace(/\s+/g,"");!function(){for(var t=T.getElementsByTagName("script"),e="",i=t.length-1;i>=0&&(e=t[i].src||"",!k.test(e));i--)e="";if(t=null,e=(e||"").split("?")[1]){e=e.split("&");for(var n=e.length-1;n>=0;n--)0===e[n].indexOf("clientId=")?b=E=e[n].replace("clientId=",""):0===e[n].indexOf("ncpClientId=")?b=S=e[n].replace("ncpClientId=",""):0===e[n].indexOf("govClientId=")?b=P=e[n].replace("govClientId=",""):0===e[n].indexOf("finClientId=")?b=w=e[n].replace("finClientId=",""):0===e[n].indexOf("ncpKeyId=")?b=O=e[n].replace("ncpKeyId=",""):0===e[n].indexOf("env=")?I=e[n].replace("env=",""):0===e[n].indexOf("language=")&&(A=e[n].replace("language=","").toLowerCase());var o={getHostname:function(t){var e=t.split("/");return(t.indexOf("://")>-1?e[2]:e[0]).split(":")[0].split("?")[0]},getUrlParams:function(t){for(var e,i=(t.split("?")[1]||"").split("&"),n={},o=0,r=i.length;o<r;o++)e=i[o].split("="),n[e[0]]=e[1];return n},patterns:["webcache.googleusercontent.com"],handlers:{webcache_googleusercontent_com:function(t){var e=o.getUrlParams(t),i=t;return e.q&&(i=e.q.split(":").slice(2).join(":")),i}},getRealUrl:function(t){for(var e,i=o.getHostname(t),n=o.patterns,r=t,s=0,a=n.length;s<a;s++)if(e=n[s],i.indexOf(e)>-1){var h=o.handlers[e.replace(/\./g,"_")]||function(){};r=h(t)||t;break}return r}};D=o.getRealUrl(D),C=!!O}}();var z=!1,R=function(e){if(e instanceof x.Map!=!1){if(wt)return void(z&&(z=!1));Lt++;var i=function(){Lt--,wt=!1,Ot.push(function(){e&&e.destroy&&e.destroy(!0)}),t.setTimeout(function(){Lt<=0&&At()},100)},n=function(t,e){x.console.info([t," * Error Code / Error Message: "+e," * Client ID: "+b," * URI: "+encodeURI($)],{header:"background:#f00;color:#fff;display:block;"})};if(!b)return void i();var o=(new Date).getTime(),r=(et?"https":"http")+"://oapi.map.naver.com/v1/validatev3"+(E?"?clientId="+E:"")+(S?"?ncpClientId="+S:"")+(P?"?govClientId="+P:"")+(w?"?finClientId="+w:"")+(I?"&env="+I:"")+"&uri="+encodeURIComponent(D)+"&time="+o,s=(et?"https":"http")+"://oapi.map.naver.com/v3/auth"+(O?"?ncpKeyId="+O:"")+(I?"&env="+I:"")+"&url="+encodeURIComponent(D)+"&time="+o,a=C?s:r;z?(Lt--,Ot.push(function(){e&&e.destroy&&e.destroy(!0)}),t.setTimeout(function(){Lt<=0&&!wt&&At()},100)):(x.jsonp(a,{callback:function(t){if(t&&t.result)Lt--,wt=!0,Ot.length=0;else{if(t.error){var e=t.error.errorCode?t.error.errorCode:"",o="";t.error.errorMessage?o=t.error.errorMessage:t.error.message&&(o=t.error.message),n("\ub124\uc774\ubc84 \uc9c0\ub3c4 Open API \uc778\uc99d\uc774 \uc2e4\ud328\ud558\uc600\uc2b5\ub2c8\ub2e4. \ud074\ub77c\uc774\uc5b8\ud2b8 \uc544\uc774\ub514\uc640 \uc6f9 \uc11c\ube44\uc2a4 URL\uc744 \ud655\uc778\ud574 \uc8fc\uc138\uc694.",e+" / "+o)}else n("\ub124\uc774\ubc84 \uc9c0\ub3c4 Open API \uc778\uc99d\uc774 \uc2e4\ud328\ud558\uc600\uc2b5\ub2c8\ub2e4. \ud074\ub77c\uc774\uc5b8\ud2b8 \uc544\uc774\ub514\uc640 \uc6f9 \uc11c\ube44\uc2a4 URL\uc744 \ud655\uc778\ud574 \uc8fc\uc138\uc694.");i()}},error:function(){n("\uc7a0\uc2dc \ud6c4\uc5d0 \ub2e4\uc2dc \uc694\uccad\ud574 \uc8fc\uc138\uc694.","500 / Internal Server Error (\ub0b4\ubd80 \uc11c\ubc84 \uc624\ub958)"),x.console.log(jt.ANDROID_ERROR_GUIDE.slice(),Gt.DEFAULT_TWO_LINE.slice()),i()}}),z=!0)}};x.CLIENT_ID=b,x.OPENAPI_CLIENT_ID=E,x.NCP_CLIENT_ID=S,x.GOV_CLIENT_ID=P,x.FIN_CLIENT_ID=w,x.NCP_KEY_ID=O,x.USE_NCP_NEW_CONSOLE=C,x.NCP_ENV=I,x.USER_LANGUAGE=A,x.LOCATION_REAL_URL=D;var B,N,V,Z={onetile:"205",dv:"1912.002"},F=T.documentElement,U={CENTER:0,TOP_LEFT:1,TOP_CENTER:2,TOP_RIGHT:3,LEFT_CENTER:4,LEFT_TOP:5,LEFT_BOTTOM:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12},Y={LARGE:1,SMALL:2,BUTTON:1,DROPDOWN:2},X={KOREAN:"ko",ENGLISH:"en",CHINESE:"zh",JAPANESE:"ja"},j={BACKWARD_CLOSED_ARROW:1,BACKWARD_OPEN_ARROW:2,CIRCLE:3,FORWARD_CLOSED_ARROW:4,FORWARD_OPEN_ARROW:5},G={CIRCLE:"circle",PATH:"path",CLOSED_PATH:"closedPath"},W={OPEN_ARROW:1,BLOCK_ARROW:2,CIRCLE:3,DIAMOND:4},K={BOUNCE:1,DROP:2},H=["A","AREA","BUTTON","EMBED","INPUT","OBJECT","SELECT","TEXTAREA"],q=["click","dblclick","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick","dragstart","drag","dragend","touchstart","touchmove","touchend","pinchstart","pinch","pinchend","tap","longtap","twofingertap","keydown","keyup"],J={mouseenter:"mouseover",mouseleave:"mouseout",touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",contextmenu:"rightclick"},Q=5,$=((t.location.host+"").split(":")[0],t.location.href+""),tt=/^file(?=:\/\/\/)/.test($),et=tt||0===t.location.protocol.indexOf("https"),it=$.indexOf("mantle_debug=true")>-1,nt=(t.devicePixelRatio||1)>1?2:1,ot=et?"https://ssl.pstatic.net/static":"http://static.naver.net",rt=ot+"/maps/mantle/"+nt+"x",st=rt+"/dot.gif",at=st,ht='Helvetica,AppleSDGothicNeo-Light,nanumgothic,NanumGothic,"\ub098\ub214\uace0\ub515",Dotum,"\ub3cb\uc6c0",sans-serif',lt="margin:0;padding:0;border:solid 0 transparent;display:block;box-sizing:content-box !important;",ct="position:absolute;top:0;left:0;z-index:0;"+lt,ut=ct+"width:0;height:0;overflow:visible;",pt="max-width:none !important;max-height:none !important;min-width:0 !important;min-height:0 !important;",dt="-webkit-user-drag: none; -khtml-user-drag: none; -moz-user-drag: none; -o-user-drag: none; user-drag: none;",ft="-webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;",gt=1,_t={mousedown:!0,mouseup:!0,mousemove:!0,touchstart:!0,touchmove:!0,touchend:!0,dblclick:!0,doubletap:!0,longtap:!0},mt={image:1,circle:2,path:3,closedPath:4,html:5},yt={coords:[11,0,9,0,6,1,4,2,2,4,0,8,0,12,1,14,2,16,5,19,5,20,6,23,8,26,9,30,9,34,13,34,13,30,14,26,16,23,17,20,17,19,20,16,21,14,22,12,22,12,22,8,20,4,18,2,16,1,13,0],type:"poly"},vt=1,Tt="Point",xt="LineString",Mt="Polygon",bt="MultiLineString",Et="GeometryCollection",St="Feature",Pt="FeatureCollection",wt=!1,Lt=0,Ot=[],Ct=null,It=function(){t.navermap_authFailure&&"function"==typeof t.navermap_authFailure&&t.navermap_authFailure()},At=function(){if(0!==Ot.length){for(var e=0,i=Ot.length;e<i;e++)Ot[e]();Ot.length=0,t.clearTimeout(Ct),Ct=t.setTimeout(function(){t.N===t.naver.maps&&(t.N=null),x=null,t.naver.maps=null,It()},1e3)}},kt=nt>1,Dt=kt?"@2x":"",zt={},Rt=["basic","terrain","satellite"],Bt={basic:"normal",terrain:"terrain",satellite:"satellite",dbasic:"dark",dterrain:"dark_terrain"},Nt={BACKGROUND:"bg",BACKGROUND_DETAIL:"ol",POI_KOREAN:"lko",POI_ENGLISH:"len",POI_CHINESE:"lzh",POI_JAPANESE:"lja",BYCYCLE:"br",PANORAMA:"ps",CADASTRAL:"lp",HIKING_TRAIL:"ar",CTT:"ctt",SUBWAY:"sw",TRANSIT:"ts",BUS_STATION:"bs",INDOOR:"ib"},Vt=function(t){var e=t?et?"https://map.pstatic.net/nrb/styles/":"http://nrb.map.naver.net/styles/":et?"https://nrbe.pstatic.net/styles/":"http://nrbe.map.naver.net/styles/",i=[e+"basic"+Dt+".json?fmt=png",e+"terrain"+Dt+".json?fmt=png",e+"satellite"+Dt+".json?fmt=png"];return t&&(i.push(e+"dbasic"+Dt+".json?fmt=png"),i.push(e+"dterrain"+Dt+".json?fmt=png")),i},Zt=["bg","ol","sw","bs","ts","ps","pr","br","ar","lp","ctt","lko","len","lzh","lja","ib"],Ft=Zt,Ut=Ft.indexOf("bs"),Yt=Ft.indexOf("sw"),Xt=Ft.indexOf("ts"),jt={TRY_AGAIN_CONTROL:["init \uc774\ubca4\ud2b8 \uc774\ud6c4 Control\uc744 \uc0dd\uc131\ud574 \uc8fc\uc138\uc694.","\u25a0 Web Dynamic Map \ub9f5 \ud0c0\uc77c \uad6c\ubc84\uc804\uc5d0\uc11c \uc2e0\ubc84\uc804\uc73c\ub85c \uc804\ud658\ud558\uae30(https://navermaps.github.io/maps.js.ncp/docs/tutorial-StyleMap-1.html)"],TRY_AGAIN_LAYER:["init \uc774\ubca4\ud2b8 \uc774\ud6c4 Layer\ub97c \uc0dd\uc131\ud574 \uc8fc\uc138\uc694.","\u25a0 Web Dynamic Map \ub9f5 \ud0c0\uc77c \uad6c\ubc84\uc804\uc5d0\uc11c \uc2e0\ubc84\uc804\uc73c\ub85c \uc804\ud658\ud558\uae30(https://navermaps.github.io/maps.js.ncp/docs/tutorial-StyleMap-1.html)"],TEMPORARY_ERROR:["\uc77c\uc2dc\uc801\uc778 \uc11c\ube44\uc2a4 \uc624\ub958\uc785\ub2c8\ub2e4. \uc7a0\uc2dc \ud6c4 \ub2e4\uc2dc \uc2dc\ub3c4\ud574 \uc8fc\uc138\uc694.","Naver Cloud Platform \ubb38\uc758\ud558\uae30 > (https://www.ncloud.com/support/question)"],ANDROID_ERROR_GUIDE:["\uc548\ub4dc\ub85c\uc774\ub4dc 9 \uc774\uc0c1\uc5d0\uc11c\ub294 HTTP \ud3c9\ubb38 \ud1b5\uc2e0\uc774 \uae30\ubcf8\uc801\uc73c\ub85c \uc0ac\uc6a9\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.","\uc571\uc5d0\uc11c \ub124\ud2b8\uc6cc\ud06c \ubcf4\uc548 \uad6c\uc131 (https://developer.android.com/training/articles/security-config) \uc744 \ud1b5\ud574 *.map.naver.com, *.map.naver.net \uc5d0 \ub300\ud55c \ud3c9\ubb38 \ud1b5\uc2e0\uc744 \ud5c8\uc6a9\ud574 \uc8fc\uc138\uc694."]},Gt={DEFAULT_TWO_LINE:["font-family:helvetica,dotum; font-size:14px;color:green;","font-family:helvetica,dotum; font-size:14px;"]},Wt={NORMAL:"normal",TERRAIN:"terrain",SATELLITE:"satellite",HYBRID:"hybrid",DARK:"dark",DARK_TERRAIN:"dark_terrain"};x.TILE_TYPES=Rt,x.GET_STYLE_MAP_METADATA_URLS=Vt,x.SSL=et,x.IS_IN_HOUSE=!1,x.SOUTH_KOREA_AREA=[[123.97,38.05],[124.74,38.02],[125.17,37.64],[126.1,37.73],[126.35,37.86],[126.59,37.79],[127.13,38.35],[128.13,38.35],[128.51,38.72],[131.47,38.22],[132.06,37.7],[132.43,37.14],[131.72,37.02],[131.58,36.46],[131.65,36.21],[131.49,36.08],[130.04,35.44],[128.93,34.7],[128.36,33.62],[127.53,33.49],[125.34,32.01],[124.79,32.1],[122.78,35.72],[124.31,37.42],[123.97,38.05]];var Kt=t.console||{info:function(t){},log:function(t){},warn:function(t){},error:function(t){}},Ht={noop:function(){},isDefined:function(t){return t!==e},isNumber:function(t){return"number"==typeof t},isFloat:function(t){return Number(t)===t&&t%1!=0},isString:function(t){return"string"==typeof t},isFunction:function(t){return"function"==typeof t},isNull:function(t){return null===t},isElement:function(t){return!(!t||1!=t.nodeType)},hasValue:function(t){return Ht.isDefined(t)&&null!==t&&""!==t},isArray:function(){return Array.isArray?function(t){return Array.isArray(t)}:function(t){return t&&t instanceof Array&&t.constructor===Array}}(),isEmptyObject:function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0},nearRange:function(t,e,i){return Math.max(Math.min(t,i),e)},forEach:function(t,e){if(!t||!e)return t;if(Ht.isArray(t))for(var i=0,n=t.length;i<n&&!e(t[i],i,t);i++);else for(var o in t)if(t.hasOwnProperty(o)&&e(t[o],o,t))break;return t},getIndexOfElement:function(){return Array.prototype.indexOf?function(t,e,i){return t.indexOf(e,i)}:function(t,e,i){var n=t.length||0,o="number"==typeof i&&i<0?n+i:i||0;if(n<=0)return-1;for(o<0&&(o=0);o<n;){if(o in t&&t[o]===e)return o;o++}return-1}}(),keys:function(t){if(!t||"object"!=typeof t)return[];if(Object.keys)return Object.keys(t);var e=[];return x.forEach(t,function(t,i){e.push(i)}),e},extend:function(t){var e,i,n=!1;for("boolean"==typeof t&&(n=t,t=arguments[1]),i=1;i<arguments.length;i++)e=arguments[i],Ht.forEach(e,function(e,i){switch(typeof e){case"object":n&&e?e.clone?t[i]=e.clone():Ht.isArray(e)?t[i]=Qt([],e):t[i]=Qt({},e):t[i]=e;break;case"undefined":break;default:t[i]=e}});return t},equals:function(t,i){var n=typeof t,o=typeof i;if(n!==o)return!1;if("object"!==n)return t===i;if(t===i)return!0;if(t.equals)return t.equals(i);if("object"!==o)return!1;var r=Ht.keys(t),s=Ht.keys(i);if(r.length!==s.length)return!1;for(var a in t)if(t.hasOwnProperty(a)){var h=t[a],l=i?i[a]:e;if("object"!=typeof h){if(h!==l)return!1}else if(h&&h.equals){if(!1===h.equals(l))return!1}else if(!1===Ht.equals(h,l))return!1}return!0},clone:function(t){return Array.isArray(t)?t.map(x.clone):"object"==typeof t&&t?function(t,e){var i,n={};for(i in t)n[i]=e(t[i],i,t);return n}(t,x.clone):t},bind:function(){return Function.prototype.bind?function(t,e){for(var i=[],n=1,o=arguments.length;n<o;n++)i.push(arguments[n]);return t.bind.apply(t,i)}:function(t,e){for(var i=[],n=2,o=arguments.length;n<o;n++)i.push(arguments[n]);return function(){for(var n=[],o=0,r=arguments.length;o<r;o++)n[o]=arguments[o];return t.apply(e,i.concat(n))}}}(),capitalize:function(){var t={};return function(e){return t[e]||(t[e]=e.substring(0,1).toUpperCase()+e.substring(1)),t[e]}}(),toNumber:function(t){return parseFloat(t)||0}};Ht.extend(x,Ht),Ht.BLANK_IMAGE=st,x.calcFitZoomAndCenter=function(t,e,i,n,o,r){var s=i.fromCoordToPoint(e.getMin()),a=i.fromCoordToPoint(e.getMax()),h=ie.bounds(s,a);s=h.getMin(),a=h.getMax();for(var l=a.x-s.x,c=a.y-s.y,u=ee(l/2+s.x,c/2+s.y),p=r||0;function(t,e,i){return t.width>=e&&t.height>=i}(t,l,c)&&!(p>n);)p++,l*=2,c*=2;return p--,p=x.nearRange(p,o,n),{zoom:p,center:i.fromPointToCoord(u),centerPoint:u}},x.nearestPointOnLine=function(t,e,i){var n={x:i.x-e.x,y:i.y-e.y},o={x:t.x-e.x,y:t.y-e.y},r=n.x*n.x+n.y*n.y,s=o.x*n.x+o.y*n.y,a=Math.min(1,Math.max(0,s/r));return new x.Point(e.x+n.x*a,e.y+n.y*a)},x.calcAnchorPosition=function(t,e){if(e instanceof ee)return e;if(x.isFunction(e))return e(t.width,t.height);var i=t.width,n=t.height,o=i/2,r=n/2,s=null;switch(e){case U.CENTER:s=ee(o,r);break;case U.TOP_LEFT:case U.LEFT_TOP:s=ee();break;case U.TOP_CENTER:s=ee(o,0);break;case U.TOP_RIGHT:case U.RIGHT_TOP:s=ee(i,0);break;case U.LEFT_CENTER:s=ee(0,r);break;case U.LEFT_BOTTOM:case U.BOTTOM_LEFT:s=ee(0,n);break;case U.RIGHT_CENTER:s=ee(i,r);break;case U.RIGHT_BOTTOM:case U.BOTTOM_RIGHT:s=ee(i,n);break;case U.BOTTOM_CENTER:s=ee(o,n);break;default:s=ee(o,n)}return s},x.round=Math.round,x.floor=Math.floor,x.ceil=Math.ceil,x.trbl=function(t){return t=Qt({top:0,right:0,bottom:0,left:0},t),t.top=parseFloat(t.top),t.right=parseFloat(t.right),t.bottom=parseFloat(t.bottom),t.left=parseFloat(t.left),t},x.trbl_isZero=function(t){return 0===t.top&&0===t.right&&0===t.bottom&&0===t.left},x.trbl_abs=function(t){return t.top=Math.abs(t.top),t.right=Math.abs(t.right),t.bottom=Math.abs(t.bottom),t.left=Math.abs(t.left),t},x.getLiteralType=function(t){var e={Point:["x","y"],LatLng:["lat","lng"],PointBounds:["minX","minY","maxX","maxY"],LatLngBounds:["west","south","east","north"]};if(x.isArray(t))return 2===t.length?x.Point:4===t.length?x.PointBounds:3===t.length?x.Point:null;for(var i in e)if(e.hasOwnProperty(i)&&x.isObjectLiteral(t,e[i]))return x[i];return null},x.isObjectLiteral=function(t,e){if(!t||"object"!=typeof t)return!1;for(var i=!0,n=0,o=e.length;n<o;n++)if(!(e[n]in t)){i=!1;break}return i},x.box=function(t){if(t instanceof x.Point||t instanceof x.PointBounds||t instanceof x.Size)return t;for(var e,i=[],n=0,o=arguments.length;n<o;n++){if("function"==typeof arguments[n]){e=arguments[n];break}i.push(arguments[n])}return e||(e=x.getLiteralType.apply(this,i)),e&&e.apply(e,i)},x.boxToIcon=function(t){if(!t)return{url:rt+"/marker-default.png",size:x.Size(22,33),scaledSize:x.Size(22,33),origin:x.Point(0,0),anchor:x.Point(11,33),type:"image"};if("string"==typeof t)return{url:t,type:"image"};var e=x.extend({},t);if(e.size&&(e.size=x.box(e.size,re)),e.scaledSize&&(e.scaledSize=x.box(e.scaledSize,re)),e.origin&&(e.origin=x.box(e.origin,ee)),e.anchor&&"number"!=typeof e.anchor&&(e.anchor=x.box(e.anchor,ee)),x.isString(e.url))e.type="image";else if(e.path||e.style){var i=[[ee(0,12),ee(12,0),ee(24,12)],[ee(0,0),ee(12,12),ee(24,0)]];switch(e.path){case j.CIRCLE:e.style=G.CIRCLE;break;case j.BACKWARD_CLOSED_ARROW:case j.FORWARD_CLOSED_ARROW:e.path=i[e.path%2],e.style=G.CLOSED_PATH;break;case j.BACKWARD_OPEN_ARROW:case j.FORWARD_OPEN_ARROW:e.path=i[(e.path-1)%2],e.style=G.PATH;break;default:x.isArray(e.path)&&(e.path=x.boxToPath(e.path))}var n;e.style===G.CLOSED_PATH?(n=x.DrawingUtil.getBounds(e.path),e.minBoundPoint=n.min,e.maxBoundPoint=n.max,e.paths=[e.path]):e.style===G.PATH?(n=x.DrawingUtil.getBounds(e.path),e.minBoundPoint=n.min,e.maxBoundPoint=n.max):e.style===G.CIRCLE&&(e.path=null,e.radius=e.radius||10,e.center={x:e.radius,y:e.radius}),e.type=e.style}else e.content&&(e.type="html");return e},x.boxToPath=function(t){var e=[];return x.forEach(t,function(t){e.push(x.box(t))}),e},x.now=function(){return Date.now?function(){return Date.now()}:function(){return(new Date).getTime()}}(),x.guid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}).toUpperCase()},x.jsonp=function(e,i){var n=Qt({charset:"utf-8",callbackname:"callback",callback:null,data:{}},i),o=se.createElement("script"),r=T.getElementsByTagName("head")[0],s=T.body;o.type="text/javascript",o.charset=n.charset,r?r.appendChild(o):s&&s.appendChild(o);var a=x.jsonp.id++,h="__naver_maps_callback__"+a,l=function(){t.setTimeout(function(){try{se.removeElement(o),t[h]=null}catch(t){}},10)},c=function(t){o.onreadystatechange&&(o.onreadystatechange=null),n.callback&&n.callback(t),l()},u=function(){n.error&&n.error(),l()};t[h]=function(t){try{c(t)}catch(t){}},"onreadystatechange"in o?o.onreadystatechange=function(){"loaded"===o.readyState&&(t[h]?u(o.readyState):l(),o.onreadystatechange=null)}:(o.onload=function(){o.onload=null,o.onerror=null},o.onerror=function(){u(),o.onload=null,o.onerror=null}),i&&(e+=(-1===e.indexOf("?")?"?":"&")+n.callbackname+"="+h),n.data&&x.forEach(n.data,function(t,i){e+=["&",i,"=",t].join("")}),o.src=e},x.jsonp.id=0;var qt=x.noop,Jt=x.bind,Qt=x.extend;x.glSupported=function(){return!1},x.useGL=function(){return!!(t.naver&&t.naver.maps&&t.naver.maps.glEnabled)};x.asyncAll=function(t,e,i){if(!t.length)return i(null,[]);var n=t.length,o=new Array(t.length),r=null;t.forEach(function(t,s){e(t,function(t,e){t&&(r=t),o[s]=e,0==--n&&i(r,o)})})},x.ajax=function(t,e){var i=new XMLHttpRequest;i.open(t.method||"GET",t.url,!0);for(var n in t.headers)i.setRequestHeader(n,t.headers[n]);return"json"===t.type&&(i.responseType="text",i.setRequestHeader("Accept","application/json")),i.withCredentials="include"===t.credentials,i.onerror=function(){e(new Error(i.statusText))},i.onload=function(){if((i.status>=200&&i.status<300||0===i.status)&&null!==i.response){var n=i.response;if("json"===t.type)try{n=JSON.parse(i.response)}catch(t){return e(t)}e(null,n,i.getResponseHeader("Cache-Control"),i.getResponseHeader("Expires"))}else e(new Error(i.statusText))},i.send(t.body),{cancel:function(){return i.abort()}}},function(){for(var e=navigator.userAgent.toLowerCase(),i=function(t){var e,i;return(e=/(webkit)[ \/]([\w.]+)/.exec(t))?((i=/chrome\/([\w.]+)/.exec(t))?(e[2]=i[1],e[3]="chrome"):(i=/version\/([\w.]+)/.exec(t))&&(e[2]=i[1],/safari\/([\w.]+)/.exec(t)&&(e[3]="safari")),t.indexOf(" edge")>-1&&(e[3]="edge"),t.indexOf("naver(")>-1&&(e[3]="naver"),e):(e=/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(t))?e:(e=/(msie) ([\w.]+)/.exec(t))?e:(e=/(mozilla)(?:.*? rv:([\w.]+))?/.exec(t))?(i=/rv:([\w.]+)/.exec(t),e[2]=i&&i[1]?i[1]:"",t.indexOf("trident")>-1&&(e[1]="msie"),t.indexOf("googlebot")>-1&&(e[3]="googlebot"),e):[]}(e),n={},o="",r=!1,s=!1,a=["ipad","ipod","iphone"],h=["android","nokia","webos","opera mini","blackberry"].concat(a),l=0;l<h.length;l++)if(e.indexOf(h[l])>-1){r=h[l],o=h[l];break}for(l=0;l<a.length;l++)if(r===a[l]){r="iOS",o=a[l];break}if("MacIntel"===navigator.platform&&navigator.maxTouchPoints>1&&(r="iOS",o="ipad"),s=/naver\(inapp; search;/.test(e)||/naver\(inapp; map;/.test(e),n[i[1]]=!0,n.version=parseFloat(i[2]),n.msie){var c=/trident\/([\w.]+)/.exec(e);c&&c[1]&&(n.trident=parseFloat(c[1])),(T.documentMode&&T.documentMode<=8||n.version<=8)&&(n.csszoom=!0)}if(i[3]&&(n[i[3]]=!0),"android"!==r||n.chrome||n.naver||!n.webkit||(n.android=!0),x.Agent={browser:n,devicePixelRatio:t.devicePixelRatio||1,mobile:r,device:o,naverApp:s},"android"===r){var u=e.match(/android\s([0-9\.]*)/);u&&u[1]&&(x.Agent.version=u[1])}var p=!1,d=!1,f=!1;if(r){if("iOS"===r)d=!0;else if("android"===r){var g=parseFloat(x.Agent.version);g>=4.1&&(d=!0,g<4.2&&(p=!0))}}else d=!0,n.chrome?(f=!0,d=!1):n.msie&&n.version<10?d=!1:n.safari&&5.1===n.version&&(d=!1);!r&&("ontouchstart"in t||navigator.maxTouchPoints)&&(x.Agent.touchablePC=!0),x.Agent.usingGPU=d,x.Agent.restrictiveGPU=p,x.Agent.poorGPU=f}();var $t=x.Agent;Ht.Agent=$t,function(){$t.mobile?(B=["touchstart","touchend","click"],N=B.concat(["touchmove"]),V=B,GROUND_DOMEVENTS=B,Q=8):(B=["click","mousedown","mouseup","contextmenu"],N=B.concat(["mousemove","mouseout","mouseover"]),V=$t.browser.safari&&5.1===$t.browser.version?B.concat(["mouseover","mouseout"]):B.concat(["mouseenter","mouseleave"]),GROUND_DOMEVENTS=B,Q=5,$t.touchablePC&&(Q=8,N=N.concat("touchstart"),V=V.concat("touchstart")))}(),function(){var t=x.Agent.browser.msie||x.Agent.browser.edge,e="font-family:helvetica,dotum;";x.console={header:t?" NAVER Maps JavaScript API v3 \n\n":"%c NAVER Maps JavaScript API v3 %c\n\n",multiMessageHeader:t?" NAVER Maps JavaScript API v3 \n\n":"%c NAVER Maps JavaScript API v3 \n\n",headerStyle:t?"":e+"font-size:16px;background: #2db400; color: white; display: block;",msgStyle:t?"":e+"font-size:14px;background: #fff; color: #334231; display: inline;",once:function(){var e={};return function(i,n){if(!e[i])try{var o=Qt({header:x.console.headerStyle,msg:x.console.msgStyle},n||{});t&&(o.header="",o.msg=""),Kt.info(x.console.header+i,o.header,o.msg),e[i]=1}catch(t){}}}(),info:function(e,i){try{var n=Qt({header:x.console.headerStyle,msg:x.console.msgStyle},i||{});t&&(n.header="",n.msg=""),Kt.info(x.console.header+e,n.header,n.msg)}catch(t){}},log:function(e,i){if(e){var n=x.isArray(i),o=x.isArray(e),r=o?"":e,s=o?e.length:1,a=i||x.console.msgStyle,h=n?a:[a],l=n?x.console.msgStyle:a,c=o?x.console.multiMessageHeader:x.console.header;try{o&&x.forEach(e,function(t){r+="%c"+t+"\n",n||h.push(l)}),h.length>s&&(h.length=s);if(h.length<s)for(;s>h.length;)h.push(l);if(h.unshift(x.console.headerStyle),r=c+r,t){var u=r.split("%c");return void Kt.log(u.join(""))}Kt.log.apply(Kt,[r].concat(h))}catch(t){Kt.log(o?e.join(" "):e)}}}}}();var te=function(t,e,i,n){var o=function(){},r=[],s={},a={};e&&(o.prototype=e.prototype,a=new o),Ht.isArray(i)?(r=i,s=n):s=i||{};for(var h=0,l=r.length;h<l;h++)Ht.forEach(r[h],function(t,e){if(a[e])throw new Error("property '"+e+"' is already exist.");a[e]=t});return Ht.forEach(s,function(t,e){a[e]=t}),a.constructor=t,t.prototype=a,t};te.getMembers=function(t){var e={};return Ht.forEach(t.prototype,function(t,i){"constructor"!==i&&(e[i]=t)}),e},Ht.ClassExtend=te,x.easing={linear:function(t,e,i){return t*i+e},easeInQuad:function(t,e,i){return i*t*t+e},easeOutQuad:function(t,e,i){return-i*t*(t-2)+e},easeInCubic:function(t,e,i){return i*t*t*t+e},easeOutCubic:function(t,e,i){return i*((t-=1)*t*t+1)+e},easeOutBounce:function(t,e,i){return t<1/2.75?i*(7.5625*t*t)+e:t<2/2.75?i*(7.5625*(t-=1.5/2.75)*t+.75)+e:t<2.5/2.75?i*(7.5625*(t-=2.25/2.75)*t+.9375)+e:i*(7.5625*(t-=2.625/2.75)*t+.984375)+e}},x.TransitionQueue=function(){var t=[],e=null;return{getQueue:function(){return t},addJob:function(e){return 1===t.push(e)&&this._run(),e},pop:function(){var e=t.pop();return 0===t.length&&this._stop(),e},removeJob:function(e){var i=x.getIndexOfElement(t,e);return i>-1&&t.splice(i,1),0===t.length&&this._stop(),i>-1?e:null},_run:function(){e||(this._fProcess||(this._fProcess=Jt(this._process,this)),e=x.requestAnimationFrame(this._fProcess))},_process:function(){var i,n=t.length;if(n>0){for(n-=1;n>=0;n--)(i=t[n])&&i();e=x.requestAnimationFrame(this._fProcess)}else e=null,this._stop()},_stop:function(){!e||t.length>0||(x.cancelAnimationFrame(e),e=null,t.length=0,t=[])}}}(),x.Transition=function(t){this.relations=[],this.options=Qt({start:qt,progress:qt,complete:qt,stop:qt,step:0,duration:0,easing:x.easing.linear},t)},x.Transition.prototype={constructor:x.Transition,isRunning:function(){return this._animLoop!==e},_getEasing:function(t){return x.isFunction(t)?t:x.easing[t]},run:function(t,e,i){i=i||{};var n=this.options,o=this._getEasing(i.easing||n.easing),r=i.duration||n.duration,s=x.now(),a=n.step,h=i.infinity||!1,l=s,c={from:t,to:e,easing:o,progress:{}},u=this;this.stop(),n.start(),he.trigger(u,"start"),this._animLoop=function(){var i=x.now(),p=i-s,d=p/r;if(!(i-l<a)){if(l=i,p>=r?c.progress=e:x.forEach(t,function(t,i){c.progress[i]=o(d,t,e[i]-t)}),c.factor=d,p<r)return n.progress(c),he.trigger(u,"progress",c);n.progress(c),he.trigger(u,"progress",c),h||(u.stop(),n.complete(),he.trigger(u,"complete"))}},x.TransitionQueue.addJob(this._animLoop)},stop:function(){this.isRunning()&&(x.TransitionQueue.removeJob(this._animLoop),this._animLoop=null,delete this._animLoop,this.options.stop(),he.trigger(this,"stop"))},addListener:function(t,i){if("string"!=typeof t&&i===e){var n=t,o=[],r=this;return x.forEach(n,function(t,e){o.push(he.addListener(r,e,t))}),this.relations=this.relations.concat(o),o}var s=he.addListener(this,t,i);return this.relations.push(s),s},removeListener:function(t){var e=x.getIndexOfElement(this.relations,t);e>-1&&this.relations.splice(e,1),he.removeListener(t)},clearListeners:function(){for(var t=0,e=this.relations.length;t<e;t++)he.removeListener(this.relations[t]);this.relations.length=0,this.relations=[]}},function(){for(var e=0,i=["webkit","moz"],n=0;n<i.length&&!t.requestAnimationFrame;++n)t.requestAnimationFrame=t[i[n]+"RequestAnimationFrame"],t.cancelAnimationFrame=t[i[n]+"CancelAnimationFrame"]||t[i[n]+"CancelRequestAnimationFrame"];x.requestAnimationFrame=function(i,n){var o=x.now(),r=Math.max(0,16-(o-e)),s=t.setTimeout(function(){i(o+r)},r);return e=o+r,s},x.cancelAnimationFrame=function(t){clearTimeout(t)},t.requestAnimationFrame||(t.requestAnimationFrame=x.requestAnimationFrame),t.cancelAnimationFrame||(t.cancelAnimationFrame=x.cancelAnimationFrame)}(),x.Point=function(t,e){if(!(this instanceof x.Point))return new x.Point(t,e);var i=this._unbox(t,e);this.x=i[0],this.y=i[1]},x.Point.prototype={constructor:x.Point,_unbox:function(t,e){var i,n,o=t,r=o&&x.getLiteralType(o);if(x.isArray(o))i=o[0],n=o[1];else if(r){if(r!==ee)throw new Error("not a PointLiteral");i=o.x,n=o.y}else i="number"==typeof t?t:parseFloat(t),n="number"==typeof e?e:parseFloat(e);return[i||0,n||0]},clone:function(){return new x.Point(this.x,this.y)},toString:function(){return"("+this.x+","+this.y+")"},equals:function(t){return t=x.box(t,ee),this.x==t.x&&this.y==t.y},add:function(t,e){return t=x.box(t,e,ee),this.x+=t.x,this.y+=t.y,this},sub:function(t,e){return t=x.box(t,e,ee),this.x-=t.x,this.y-=t.y,this},mul:function(t,e){return t=x.box(t,e,ee),this.x*=t.x,this.y*=t.y,this},div:function(t,e){return t=x.box(t,e,ee),this.x/=t.x,this.y/=t.y,this},round:function(){return this.x=x.round(this.x),this.y=x.round(this.y),this},floor:function(){return this.x=x.floor(this.x),this.y=x.floor(this.y),this},ceil:function(){return this.x=x.ceil(this.x),this.y=x.ceil(this.y),this},toArray:function(){return[this.x,this.y]},isEmpty:function(){return!this.x&&!this.y}};var ee=x.Point;x.PointBounds=function(t,e){if(!(this instanceof ie))return new ie(t,e);var i=this._unbox(t,e);this._min=i[0],this._max=i[1]},x.PointBounds.prototype={constructor:x.PointBounds,_unbox:function(t,e){var i,n,o=e?null:t;if(o)if(x.isArray(o))i=new ee(o[0],o[1]),n=new ee(o[2],o[3]);else{if(x.getLiteralType(o)!==ie)throw new Error("not a PointBoundsLiteral");i=new ee(o.minX,o.minY),n=new ee(o.maxX,o.maxY)}else i=new ee(t),n=new ee(e);return[i||t,n||e]},clone:function(){return new ie(this._min.clone(),this._max.clone())},toString:function(){return"("+this._min+","+this._max+")"},hasPoint:function(t){t=x.box(t,ee);var e=t.x,i=t.y,n=this.minX(),o=this.maxX(),r=i>=this.minY()&&i<=this.maxY();return r&&(r=e>=n&&e<=o),r},hasBounds:function(t){t=x.box(t,ie);var e=t.getMin(),i=t.getMax();return!(!this.hasPoint(e)||!this.hasPoint(i))},intersects:function(t){t=x.box(t,ie);var e=this.minX(),i=this.maxX(),n=t.minX(),o=t.maxX();return this.minY()<=t.maxY()&&this.maxY()>=t.minY()&&e<=o&&i>=n},isInsidePolygon:function(t){var e,i,n,o=this.minX(),r=this.maxX(),s=this.minY(),a=this.maxY(),h=[new ee(o,s),new ee(o,a),new ee(r,a),new ee(r,s)],l=[];for(e=0,i=t.length;e<i;e++)n=x.box(t[e],ee),l.push(n);for(e=0,i=h.length;e<i;e++)if(!x.Intersection.polygonContainsPoint(l,h[e]))return!1;return!0},getCenter:function(){var t=this.minX()+Math.abs(this.maxX()-this.minX())/2,e=this.minY()+Math.abs(this.maxY()-this.minY())/2;return ee(t,e)},equals:function(t){return t=x.box(t,ie),this.getMin().equals(t.getMin())&&this.getMax().equals(t.getMax())},getMin:function(){return this._min},getMax:function(){return this._max},minX:function(){return this._min.x},minY:function(){return this._min.y},maxX:function(){return this._max.x},maxY:function(){return this._max.y},extend:function(t){t=x.box(t,ee);var e,i,n=this._min,o=this._max;return e=t,i=t,n.x=Math.min(e.x,n.x),n.y=Math.min(e.y,n.y),o.x=Math.max(i.x,o.x),o.y=Math.max(i.y,o.y),this},union:function(t){t=x.box(t,ie);var e=Math.min(this.minY(),t.minY()),i=Math.max(this.maxY(),t.maxY()),n=Math.min(this.minX(),t.minX()),o=Math.max(this.maxX(),t.maxX());return new ie(ee(n,e),ee(o,i))},toArray:function(){return[this.getMin().toArray(),this.getMax().toArray()]}},x.PointBounds.bounds=function(){if(arguments.length<2)return null;for(var t=[],e=0,i=arguments.length;e<i;e++)t[e]=x.box(arguments[e],ee);for(var n,o,r,s,a=[],h=[],l=0,c=t.length;l<c;l++)a.push(t[l].x),h.push(t[l].y);return n=Math.min.apply(Math,a),r=Math.max.apply(Math,a),o=Math.min.apply(Math,h),s=Math.max.apply(Math,h),ie(ee(n,o),ee(r,s))};var ie=x.PointBounds;x.LatLng=function(t,e){if(!(this instanceof x.LatLng))return new x.LatLng(t,e);var i=this._unbox(t,e);this._lat=this.y=i[1],this._lng=this.x=i[0]},te(x.LatLng,x.Point,{_unbox:function(t,e){var i,n,o=t,r=x.getLiteralType(o);return x.isArray(o)?(i=o[0],n=o[1]):r?r===ne?(i=o.lng,n=o.lat):r===ee&&(i=o.x,n=o.y):(i="number"==typeof e?e:parseFloat(e),n="number"==typeof t?t:parseFloat(t)),[i||0,n||0]},lat:function(){return this._lat},lng:function(){return this._lng},clone:function(){return new x.LatLng(this._lat,this._lng)},equals:function(t,i){return t=x.box(t,ne),Math.max(Math.abs(this.lat()-t.y),Math.abs(this.lng()-t.x))<=(i===e?1e-9:i)},destinationPoint:function(t,e){var i=x.Math.fromDegreesToRadians,n=x.Math.fromRadiansToDegrees;e/=6378137,t=i(t);var o=i(this.lat()),r=i(this.lng()),s=Math.asin(Math.sin(o)*Math.cos(e)+Math.cos(o)*Math.sin(e)*Math.cos(t)),a=Math.atan2(Math.sin(t)*Math.sin(e)*Math.cos(o),Math.cos(e)-Math.sin(o)*Math.sin(s))+r;return isNaN(s)||isNaN(a)?null:new x.LatLng(n(s),n(a))},toPoint:function(){return new x.Point(this.lng(),this.lat())},isEmpty:function(){return!this._lat&&!this._lng},add:qt,sub:qt,mul:qt,div:qt,round:qt,floor:qt,ceil:qt});var ne=x.LatLng;ne.prototype.toString=function(){return"(lat:"+this._lat+",lng:"+this._lng+")"},x.LatLngBounds=function(t,e){if(!(this instanceof oe))return new oe(t,e);var i=this._unbox(t,e);if(this._sw=this._min=i[0],this._ne=this._max=i[1],!this._sw||this._ne&&!this._ne.isEmpty()){if(this.maxX()<this.minX()||this.maxY()<this.minY()){var n=oe.bounds(this.getMin(),this.getMax());this._sw=this._min=n.getMin(),this._ne=this._max=n.getMax()}}else this._ne=this._max=this._sw.clone()},te(x.LatLngBounds,x.PointBounds,{_unbox:function(t,e){var i,n,o=e?null:t,r=o&&x.getLiteralType(o);return o?x.isArray(o)?(i=new ne(o[1],o[0]),n=new ne(o[3],o[2])):r&&(r===oe?(i=new ne(o.south,o.west),n=new ne(o.north,o.east)):r==ie&&(i=new ne(o.minY,o.minX),n=new ne(o.maxY,o.maxX))):(i=new ne(t),n=new ne(e)),[i||t,n||e]},clone:function(){return new oe(this._sw.clone(),this._ne.clone())},hasPoint:function(t){t=x.box(t,ne);var e=t.x,i=t.y,n=this.minX(),o=this.maxX(),r=i>=this.minY()&&i<=this.maxY();return r&&(r=n<=o?e>=n&&e<=o:e>=o&&e<=n),r},hasLatLng:function(t){return t=x.box(t,ne),this.hasPoint(t)},intersects:function(t){t=x.box(t,oe);var e=this.minX(),i=this.maxX(),n=i<e?i+360:i,o=t.minX(),r=t.maxX(),s=r<o?r+360:r;return this.minY()<=t.maxY()&&this.maxY()>=t.minY()&&e<=s&&n>=o},getCenter:function(){var t=this.minY()+Math.abs(this.maxY()-this.minY())/2,e=this.minX()+Math.abs((this.minX()>this.maxX()?360:0)+this.maxX()-this.minX())/2;return x.LatLng(t,e)},equals:function(t){return t=x.box(t,oe),this.getMin().equals(t.getMin())&&this.getMax().equals(t.getMax())},getSW:function(){return this.getMin()},getNE:function(){return this.getMax()},minX:function(){return this._sw.lng()},minY:function(){return this._sw.lat()},maxX:function(){return this._ne.lng()},maxY:function(){return this._ne.lat()},south:function(){return this.minY()},west:function(){return this.minX()},north:function(){return this.maxY()},east:function(){return this.maxX()},extend:function(t){t=x.box(t,ne);var e,i,n=this._sw,o=this._ne;return e=t,i=t,n._lat=this._min.y=Math.min(e.y,n.y),n._lng=this._min.x=Math.min(e.x,n.x),o._lat=this._max.y=Math.max(i.y,o.y),o._lng=this._max.x=Math.max(i.x,o.x),n.isEmpty()&&(this._sw=this._min=o.clone()),this},union:function(t){t=x.box(t,oe);var e,i,n=Math.min(this.minY(),t.minY()),o=Math.max(this.maxY(),t.maxY()),r=function(t,e){var i=Math.abs(e.maxX()-t.minX());return t.minX()>0&&e.maxX()<0&&(i+=360),i};return r(this,t)<r(t,this)?(e=t.minX(),i=this.maxX()):(e=this.minX(),i=t.maxX()),new x.LatLngBounds(x.LatLng(n,e),x.LatLng(o,i))},toPointBounds:function(){return new x.PointBounds(this.getMin().toPoint(),this.getMax().toPoint())}}),x.LatLngBounds.bounds=function(){if(arguments.length<2)return null;for(var t=[],e=0,i=arguments.length;e<i;e++)t[e]=x.box(arguments[e],ne);for(var n,o,r,s,a=[],h=[],l=0,c=t.length;l<c;l++)a.push(t[l].lat()),h.push(t[l].lng());return n=Math.min.apply(Math,a),r=Math.max.apply(Math,a),o=Math.min.apply(Math,h),s=Math.max.apply(Math,h),oe(ne(n,o),ne(r,s))};var oe=x.LatLngBounds;x.Size=function(t,e){if(!(this instanceof x.Size))return new x.Size(t,e);var i=["width","height"];x.isArray(t)?(e=t[1],t=t[0]):x.isObjectLiteral(t,i)?(e=t.height,t=t.width):("number"!=typeof t&&(t=parseFloat(t)),"number"!=typeof e&&(e=parseFloat(e))),this.width=t||0,this.height=e||0},x.Size.prototype={constructor:x.Size,clone:function(){return new x.Size(this.width,this.height)},toString:function(){return"(w:"+this.width+",h:"+this.height+")"},equals:function(t){return t=x.box(t,re),this.width==t.width&&this.height==t.height},add:function(t,e){return t=x.box(t,e,re),this.width+=t.width,this.height+=t.height,this},sub:function(t,e){return t=x.box(t,e,re),this.width-=t.width,this.height-=t.height,this},mul:function(t,e){return t=x.box(t,e,re),this.width*=t.width,this.height*=t.height,this},div:function(t,e){return t=x.box(t,e,re),this.width/=t.width,this.height/=t.height,this},round:function(){return this.width=x.round(this.width),this.height=x.round(this.height),this},floor:function(){return this.width=x.floor(this.width),this.height=x.floor(this.height),this},ceil:function(){return this.width=x.ceil(this.width),this.height=x.ceil(this.height),this}};var re=x.Size;x.DOM={createElement:function(t,e){var i=T.createElement(t);return e&&(i.style.cssText=e),i},addElement:function(t,e){t&&e&&e.appendChild(t)},removeElement:function(t){if(t){var e=t.parentNode;e&&e.removeChild(t)}},insertAt:function(t,e,i){var n=t.childNodes,o=n.length;0===o||i>=o?t.appendChild(e):t.insertBefore(e,n[i])},removeAt:function(t,e){var i=t.childNodes,n=i[e];i.length;n&&this.removeElement(n)},calculateSize:function(t,e){var i,n=se.SIZE_ELEMENT,o=x.Size();return n||(n=se.createElement("div","position:absolute;margin:0;padding:0;border:0 none;top:-100000px;left:-100000px;"),se.SIZE_ELEMENT=n),e?e.appendChild(n):T.body.appendChild(n),i=t.cloneNode(!0),i.style.position="relative",n.innerHTML="",n.appendChild(i),o=se.getSize(n),o.width=Math.ceil(o.width),o.height=Math.ceil(o.height),n.innerHTML="",se.removeElement(n),o},visible:function(t,e){var i=t.style;return"boolean"==typeof e&&(i.display=e?"":"none"),"none"!==i.display},toggle:function(t){return se.visible(t,!se.visible(t))},setZIndex:function(t,e){t.style.zIndex=e||0},getCSS:function(){if(T.defaultView&&T.defaultView.getComputedStyle)return function(e,i){return t.getComputedStyle?T.defaultView.getComputedStyle(e,null).getPropertyValue(i.replace(/([A-Z])/g,"-$1").toLowerCase())||e.style[i]:e.style[i]};if(F.currentStyle){var e=function(t){return"float"==t?"styleFloat":t},i=function(t,e){return t.currentStyle?t.currentStyle[e]||t.style[e]:t.style[e]};return $t.browser.msie?function(t,n){return i(t,e(n))}:i}}(),getCSSValue:function(t,e){return parseFloat(se.getCSS(t,e))||0},contains:function(){return F.compareDocumentPosition?function(t,e){return!!(16&t.compareDocumentPosition(e))}:F.contains?function(t,e){var i=9===t.nodeType?t.documentElement:t,n=e.parentNode;return i===n||!!(n&&1===n.nodeType&&i.contains&&i.contains(n))}:function(t,e){for(;e=e.parentNode;)if(e===t)return!0;return!1}}(),setBackgroundSize:function(t,e){t.style[se.vendorPrefix+"BackgroundSize"]=e,t.style.backgroundSize=e}};var se=x.DOM;!function(){var i=F,n=i.style,o={},r={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"},s={input:null,form:null,img:null,div:null},a=function(t){var e=r[t]||"div";return s[e]||(s[e]=T.createElement(e)),s[e]};se.isSupportedStyle=function(t){return n[t]!==e},se.isSupportedEvent=function(i){if(o[i]===e){var n=a(i),r="on"+i,s=r in n||r in t;s||(n.setAttribute(r,"return;"),s="function"==typeof n[r]),o[i]=s}return o[i]}}(),x.DOMEvent=function(){function i(t){t.target||(t.target=t.srcElement||T),3===t.target.nodeType&&(t.target=t.target.parentNode)}function n(t){x.hasValue(t.which)||(t.which=x.hasValue(t.charCode)?t.charCode:t.keyCode)}function o(t){if(!x.hasValue(t.pageX)||x.hasValue(t.clientX)){var e=t.target&&t.target.ownerDocument||T,i=e.documentElement,n=e.body;t.pageX=t.clientX+(i&&i.scrollLeft||n&&n.scrollLeft||0)-(i&&i.clientLeft||n&&n.clientLeft||0),t.pageY=t.clientY+(i&&i.scrollTop||n&&n.scrollTop||0)-(i&&i.clientTop||n&&n.clientTop||0)}return t}function r(t){o(t),a(t),h(t)}function s(t){var e=t.touches||[],i=t.changedTouches||[],n=0,r=0;for(n=0,r=e.length;n<r;n++)o(e[n]);for(n=0,r=i.length;n<r;n++)o(i[n])}function a(t){var e=t.relatedTarget,i=t.fromElement,n=t.toElement;!e&&i&&n&&(t.relatedTarget=i==t.target?n:i)}function h(t){if(!t.which&&t.button!==e){var i=t.button;t.which=1&i?g:2&i?m:4&i?_:f}}function l(t){return t%120==0?t/120:t%3==0?t/3:t}function c(){var e=!1;try{var i=Object.defineProperty({},"passive",{get:function(){e=!0}});t.addEventListener("test",null,i)}catch(t){}return e}var u=/mouse|click$|^context/i,p=/^touch/i,d=/^key/i,f=0,g=1,_=2,m=3,y=!1;return{MOUSE_NO_BUTTON:f,MOUSE_LBUTTON:g,MOUSE_MBUTTON:_,MOUSE_RBUTTON:m,startTouch:function(t){y=!t||p.test(t.type)},endTouch:function(){y=!1},isTouchStarted:function(){return y},isMouseWheelSupport:se.isSupportedEvent("mousewheel"),isGestureSupport:se.isSupportedEvent("gesturestart"),preventDefault:function(e){e=e||t.event,e.preventDefault?e.preventDefault():e.returnValue=!1},stopPropagation:function(e){e=e||t.event,e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},stop:function(t){this.preventDefault(t),this.stopPropagation(t)},fix:function(e){e=e||t.event;var o=e.type;return i(e),e.preventDefault||(e.preventDefault=function(){this.returnValue=!1}),e.stopPropagation||(e.stopPropagation=function(){this.cancelBubble=!0}),e.stop=function(){this.preventDefault(),this.stopPropagation()},d.test(o)?n(e):u.test(o)?r(e):p.test(o)&&s(e),e.pos=function(){var t={};return e.touches&&e.touches.length?t=e.touches[0]:e.changedTouches&&e.changedTouches.length&&(t=e.changedTouches[e.changedTouches.length-1]),{clientX:t.clientX||e.clientX||0,clientY:t.clientY||e.clientY||0,pageX:t.pageX||e.pageX||0,pageY:t.pageY||e.pageY||0,screenX:t.screenX||e.screenX||0,screenY:t.screenY||e.screenY||0}},e},getWheelDelta:function(t){if("mousewheel"!==t.type&&"DOMMouseScroll"!==t.type&&"wheel"!==t.type)return null;var i={deltaX:0,deltaY:0};return t.deltaY?i.deltaY=l(-t.deltaY):t.wheelDelta?i.deltaY=l(t.wheelDelta):t.detail&&(i.deltaY=-t.detail),t.axis!==e&&t.axis===t.HORIZONTAL_AXIS&&(i.deltaX=-1*i.deltaY,i.deltaY=0),t.wheelDeltaY!==e&&(i.deltaY=l(t.wheelDeltaY)),t.wheelDeltaX!==e&&(i.deltaX=-1*l(t.wheelDeltaX)),i},getOffsetsByEvent:function(t){return ee("offsetX"in t?t.offsetX:"layerX"in t?t.layerX:0,"offsetY"in t?t.offsetY:"layerY"in t?t.layerY:0)},attach:function(){var t=c();return T.addEventListener?function(e,i,n,o){var r=!1;return t&&o?(r=Qt({capture:!1,passive:!1,once:!1},o),e.addEventListener(i,n,r)):e.addEventListener(i,n,!1)}:function(t,e,i){return t.attachEvent("on"+e,i)}}(),detach:function(){return T.removeEventListener?function(t,e,i){return t.removeEventListener(e,i,!1)}:function(t,e,i){return t.detachEvent("on"+e,i)}}()}}();var ae=x.DOMEvent;se.css3Styles={transition:null,transform:null,transformOrigin:null,backfaceVisibility:null,willChange:null},se.vendorPrefix=null,function(){var t=["Webkit","Moz","O"],e=x.Agent.poorGPU||"android"===$t.mobile&&parseFloat($t.version)<4.1&&!$t.browser.mozilla&&!$t.browser.chrome,i=$t.browser&&$t.browser.msie&&$t.browser.version<10;if($t.browser.csszoom||e||x.forEach(x.keys(se.css3Styles),function(e){for(var i,n,o=0,r=t.length;o<r;o++)if(i=t[o],n=i+x.capitalize(e),se.isSupportedStyle(n)){se.vendorPrefix=i.toLowerCase(),se.css3Styles[e]=n;break}!se.css3Styles[e]&&se.isSupportedStyle(e)&&(se.css3Styles[e]=e)}),se.isSupportedCSS3Style=function(t){return null!==se.css3Styles[t]},se.isSupportedCSS3Style("transform")&&!i){var n=(T.documentMode&&T.documentMode,function(t,e,i,n,o,r,s){var a="matrix("+e+",0,0,"+e+","+i+","+n+")";t.style[se.css3Styles.transform]=a;var h=o.x+"px "+o.y+"px";s&&(h=h.replace(/px/gi,s)),t.style[se.css3Styles.transformOrigin]=h}),o=function(t){var e=/\([0-9epx\.\, \t\-]+/gi;return(t.style[se.css3Styles.transform]||"matrix(1, 0, 0, 1, 0, 0)").match(e)[0].substr(1).split(",")};se.transform=function(t,e,i,o,r,s){n(t,e,i,o,r)},se.setScale=function(t,e,i,n){se.transform(t,e,0,0,i,n)},se.setScaleByPercent=function(t,e,i,o){n(t,e,0,0,i,0,"%")},se.translate=function(t,e){n(t,1,e.x,e.y,{x:0,y:0})},se.getTranslate=function(t){var e=o(t),i=ee(0,0);return e.length>1&&i.add(parseFloat(e[4]),parseFloat(e[5])),i.add(se.getRawOffset(t)),i}}else se.transform=function(t,e,i,n,o){o=o||ee(0,0);var r=-(o.x*e-o.x),s=-(o.y*e-o.y);$t.browser.msie?(i*=e,n*=e):(r/=e,s/=e),r+=i,s+=n,t.style.zoom=e,t.style.left=r+"px",t.style.top=s+"px"},se.setScale=function(t,e,i){se.transform(t,e,0,0,i)},se.translate=function(t,e){se.setOffset(t,e)},se.getTranslate=function(t){return se.getRawOffset(t)};var r=se.css3Styles.transform,s=x.Agent.usingGPU&&r;se.backfaceVisibility=function(){var t=se.css3Styles.backfaceVisibility;return t&&!$t.mobile?function(e,i){e.style[t]=i}:qt}(),se.forceGPU=function(){return s?function(t){t.style[r]="translateZ(0)"}:qt}(),se.clearGPU=function(){return s?function(t){t.style[r]="none"}:qt}(),se.createDummyForRestrictiveGPU=function(){var t=se.createElement("div","color:transparent;width:0;height:0;overflow:visible;");return se.setText(t," "),t},se.willChange=function(){var t=se.css3Styles.willChange;return t?function(e,i){e.style[t]=i||"auto"}:qt}()}(),Qt(se,{setSize:function(t,e,i){var n=e instanceof re?e.clone():re(e,i);n.round(),t.style.width=n.width+"px",t.style.height=n.height+"px"},_getSize:function(){var t={position:"absolute",visibility:"hidden",display:"block"};return function(e,i){var n=0,o=0,r=0,s=0,a={};if("getBoundingClientRect"in F){var h;try{h=e.getBoundingClientRect()}catch(t){}h&&"width"in h?(r=h.width,s=h.height):(r=e.offsetWidth,s=e.offsetHeight)}else try{r=e.offsetWidth,s=e.offsetHeight}catch(t){}if(0===r&&0===s){var l=e.style;x.forEach(t,function(t,e){a[e]=l[e],l[e]=t}),n=se.getCSSValue(e,"width"),o=se.getCSSValue(e,"height"),x.forEach(t,function(t,e){l[e]=a[e],a[e]=null})}else n=r,o=s;switch(i){case 1:return n;case 2:return o;default:return x.Size(n,o)}}}(),getSize:function(t){return se._getSize(t)},getWidth:function(t){return se._getSize(t,1)},getHeight:function(t){return se._getSize(t,2)},getSizeWithMargin:function(t){var e=se.getSize(t),i=t.style;return e.width=x.toNumber(i.marginLeft)+e.width+x.toNumber(i.marginRight),e.height=x.toNumber(i.marginTop)+e.height+x.toNumber(i.marginBottom),e},getRawSize:function(t){var e=t.style,i=x.toNumber(e.width),n=x.toNumber(e.height);return x.Size(i,n)},getOffset:function(){if("getBoundingClientRect"in F){var t="CSS1Compat"===T.compatMode;return function(e){var i,n,o,r=e&&e.ownerDocument,s=r.window||r.defaultView||r.parentWindow,a=r.body,h=r.documentElement;try{i=e.getBoundingClientRect()}catch(t){}if(se.contains(h,e)){var l=h.clientTop||a.clientTop||0,c=h.clientLeft||a.clientLeft||0,u=s.pageYOffset||t&&h.scrollTop||a.scrollTop,p=s.pageXOffset||t&&h.scrollLeft||a.scrollLeft;n=i.top+u-l,o=i.left+p-c}else i?(o=i.left,n=i.top):(o=0,n=0);return ee(o,n)}}return $t.browser.webkit?function(t){for(var e=t,i=e.offsetParent,n=0,o=0;e=e.parentNode;)e.offsetParent&&(n-=e.scrollLeft,o-=e.scrollTop),e==i&&(n+=t.offsetLeft+e.clientLeft,o+=t.offsetTop+e.clientTop,e.offsetParent||(n+=e.offsetLeft,o+=e.offsetTop),i=e.offsetParent,t=e);return ee(n,o)}:function(t){var e=0,i=0,n=t.ownerDocument||t.document||T;if(n.getBoxObjectFor){var o=n.getBoxObjectFor(t),r=n.getBoxObjectFor(n.documentElement||n.body);e=o.screenX-r.screenX,i=o.screenY-r.screenY}else{var s;for(s=t;s;s=s.offsetParent)e+=s.offsetLeft,i+=s.offsetTop;for(s=t.parentNode;s&&"BODY"!=s.tagName;s=s.parentNode)"TR"==s.tagName&&(i+=2),e-=s.scrollLeft,i-=s.scrollTop}return ee(e,i)}}(),getRawOffset:function(t){var e=t.style,i=x.toNumber(e.left),n=x.toNumber(e.top);return ee(i,n)},setOffset:function(t,e,i){var n=e instanceof ee?e.clone():ee(e,i);n.round(),t.style.left=n.x+"px",t.style.top=n.y+"px"},setOffsetWithAnchor:function(t,e,i){e=e||ee(0,0),i=i||ee(0,0);var n=e.x-i.x,o=e.y-i.y;se.setOffset(t,n,o)},getScrollOffset:function(){var t=F,e=T.body,i=(t&&t.scrollLeft||e&&e.scrollLeft||0)-(t&&t.clientLeft||e&&e.clientLeft||0),n=(t&&t.scrollTop||e&&e.scrollTop||0)-(t&&t.clientTop||e&&e.clientTop||0);return ee(i,n)},disableSelection:function(){for(var t,e=["ms","webkit","Khtml","Moz"],i=0,n=e.length;i<n&&(t=e[i]+"UserSelect",!se.isSupportedStyle(t));i++)t=null;return t?function(e){e.style[t]="none"}:function(t){t.unselectable="on",t.onselectstart=function(t){ae.stop(t)}}}(),disableUserDrag:function(){for(var t,e=["ms","webkit","Khtml","Moz"],i=0,n=e.length;i<n&&(t=e[i]+"UserDrag",!se.isSupportedStyle(t));i++);return function(e){if(t)return void(e.style[t]="none");e.style.userDrag="none"}}(),setOpacity:function(){return se.isSupportedStyle("opacity")?function(t,e){t&&(t.style.opacity=e)}:function(t,e){var i=t.style,n=x.isNumber(e)?"alpha(opacity="+x.round(100*e)+")":"",o=i.filter||"",r=/alpha\([^)]*\)/i,s=/^\s*|\s*$/g;if(i.zoom=1,e>=1)return i.filter=o.replace(r,"").replace(s,""),void(""===o&&i.removeAttribute&&i.removeAttribute("filter"));i.filter=r.test(o)?o.replace(r,n):o+" "+n}}(),getOpacity:function(){return se.isSupportedStyle("opacity")?function(t){var e=parseFloat(t.style.opacity);return isNaN(e)?1:e}:function(t){try{if(t&&t.filters&&t.filters.alpha){var i=t.filters.alpha.opacity;return(i!==e?i:100)/100}if(t&&t.style&&t.style.filter){return/opacity=([^)]*)/.test(t.style.filter||"")?parseFloat(RegExp.$1)/100:1}return 1}catch(t){return 1}}}()}),se.Image=function(t){var e=this;e.DEFAULT_OPTIONS={contextmenu:null,disableSelection:!1,onload:qt,onerror:qt,opacity:null},t=Qt({},e.DEFAULT_OPTIONS,t),e._fLoad=t.onload||qt,e._fError=t.onerror||qt,e._img=se.createElement("img",lt+pt+ft+dt),e._img.setAttribute("draggable",!1),e._img.setAttribute("unselectable","on"),t.disableSelection&&se.disableSelection(e._img),x.forEach(t,function(t,i){var n="set"+x.capitalize(i);x.isFunction(e[n])&&e[n](t)})},se.Image.prototype={constructor:se.Image,setHandler:function(t){var e=Qt({onload:this._fLoad,onerror:this._fError},t);this._fLoad=e.onload||qt,this._fError=e.onerror||qt},setOpacity:function(t){this._opacity=t,se.setOpacity(this._img,t)},setPosition:function(t){this._img.style.position=t},setUrl:function(t,e,i){var n=this._img;return t&&(t===n.src?(this._fLoad&&this._fLoad(n),e&&e(n)):(n.style.width="",n.style.height="",n.removeAttribute("width"),n.removeAttribute("height"),this._setUrl(n,t,e,i))),this},setSize:function(t){var e=this._img;se.setSize(e,t),e.setAttribute("width",t.width),e.setAttribute("height",t.height)},setAlt:function(t){this._img.setAttribute("alt",t)},setContextmenu:function(t){this._img.contextmenu=t},getElement:function(){return this._img},_setUrl:function(){var e,i=$t.browser.msie,n=$t.browser.version,o=i&&n>6&&n<9;return e=o?function(e,i,n,o){function r(){e.onload=e.onerror=null,s._fLoad(e),n&&n(e)}var s=this;e.onload=function(){t.setTimeout(r,1)},e.onerror=function(){e.onload=e.onerror=null,s._fError(e),o&&o(e)},e.galleryImg="no",e.src=i}:function(t,e,i,n){var o=this;t.onload=function(){t.onload=t.onerror=null,o._fLoad(t),i&&i(t)},t.onerror=function(){t.onload=t.onerror=null,o._fError(t),n&&n(t)},t.src=e},i=n=null,o=null,e}()},function(){var t=$t.browser.csszoom?"innerText":"textContent",e=function(t,e,i){if(!x.isDefined(i))return t[e];t[e]=i},i=function(i,n){i.nodeType;switch(i.nodeType){case 1:case 9:case 11:return e(i,t,n);case 3:case 4:return e(i,"nodeValue",n);default:return""}};se.setText=i,se.getText=i}(),function(){function e(t){var e=t.getAttribute("data-ntranid");return e||(e="NTran-"+ ++r,t.setAttribute("data-ntranid",e)),e}function i(t){var i=e(t),n=s[i];return n||(n={timer:null,props:null},s[i]=n),n}function n(t){t.complete&&(he.removeDOMListener(t.complete),t.complete=null)}function o(t,e){e&&x.forEach(e,function(e,i){"opacity"===i?se.setOpacity(t,e):(-1===i.indexOf("tran")&&"number"==typeof e&&(e+="px"),t.style[i]=e)})}var r=0,s={},a=se.css3Styles.transition,h="transitionend";if(a){var l=["transitionend","webkitTransitionEnd","oTransitionEnd"];x.forEach(l,function(t){return se.isSupportedEvent(t.toLowerCase())?(h=t,!0):se.isSupportedEvent(t)?(h=t,!0):void 0})}se.animate=function(e,r,s){var l=i(e);s=Qt({duration:0,delay:0,easing:"linear"},s),this.stop(e,{});var c=[];if(x.forEach(r,function(t,e){c.push(e)}),l.props=Qt({},r),a)l.complete=he.addDOMListener(e,h,function(){l.props=null,e.style[a]="none","function"==typeof s.complete&&s.complete(),n(l)}),l.timer=t.setTimeout(function(){l.timer=null;var t=s.easing;t.indexOf("Cubic")>-1&&(t="easeOutCubic"===t?"ease-out":"ease-in"),e.style[a]=[c.join(","),s.duration+"ms",t,s.delay+"ms"].join(" "),o(e,r)},100);else{var u,p=s.easing;u="function"==typeof p?p:x.easing[p||"linear"];for(var d={},f=0,g=c.length;f<g;f++)key=c[f],"opacity"===key?d[key]=se.getOpacity(e):d[key]=parseFloat(se.getCSS(e,key));var _=x.now();l.animLoop=function(){var t=x.now()-_,i=t/s.duration,n={};x.forEach(r,function(t,e){n[e]=u(i,d[e],t-d[e])}),t<s.duration?o(e,n):(o(e,r),x.TransitionQueue.removeJob(l.animLoop),l.animLoop=null,l.props=null,"function"==typeof s.complete&&s.complete())},x.TransitionQueue.addJob(l.animLoop)}},se.stop=function(r,h){var l=e(r),c=i(r);a?(t.clearTimeout(c.timer),c.timer=null,n(c),r.style[a]="none"):(x.TransitionQueue.removeJob(c.animLoop),c.animLoop=null),o(r,h||c.props),c.props=null,s[l]=null,delete s[l]}}(),x.Event=function(){function t(t){return t.__event_relations__||(t.__event_relations__={}),t.__event_relations__}function i(){return"NEvent_"+n++}var n=0,o=function(){return String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/gm,"")}}();return{addListener:function(e,n,r){var s=o(n),a=s.split(" ");if(a.length>1){for(var h=[],l=0,c=a.length;l<c;l++)o(a[l])&&h.push(he.addListener(e,a[l],r));return h}var u=t(e),p=i();return u[s]||(u[s]={},"__BEGIN_DISPATCH__"!==s&&"__STOP_DISPATCH__"!==s&&he.trigger(e,"__BEGIN_DISPATCH__",s)),u[s][p]=r,{target:e,eventName:s,listenerId:p,listener:r}},hasListener:function(e,i){var n=t(e);return!!n[i]&&!1===x.isEmptyObject(n[i])},once:function(t,e,i){var n=he.addListener(t,e,function(){for(var t=[],e=0,o=arguments.length;e<o;e++)t[e]=arguments[e];i.apply(null,t),he.removeListener(n),n=null});return n},removeListener:function(e){if(e)if(x.isArray(e))for(var i=0,n=e.length;i<n;i++)he.removeListener(e[i]);else{var o=e.target,r=e.eventName,s=e.listenerId,a=t(o);if(!a[r])return;a[r][s]=null,delete a[r][s],!0===x.isEmptyObject(a[r])&&(a[r]=null,delete a[r]),"__STOP_DISPATCH__"===r||"__BEGIN_DISPATCH__"===r||a[r]||he.trigger(o,"__STOP_DISPATCH__",r)}},trigger:function(e,i){for(var n,r=o(i),s=r.split(" "),a=[],h=0,l=arguments.length;h<l;h++)a[h]=arguments[h];if(s.length>1)for(var c=0,u=s.length;c<u;c++)o(s[c])&&(n=[e,s[c]].concat(a.slice(2)),he.trigger.apply(he,n));else{var p=t(e),d=p[r];!(p.__ALL_STOPPED||p["__"+r+"_STOPPED"])&&d&&(n=a.slice(2),0===n.length&&e._getDefaultEventParameters&&(n=e._getDefaultEventParameters(r)||[]),x.forEach(d,function(t){t&&t.apply(null,n)}))}},getDispatcher:function(e,i){var n=t(e),r=o(i||"");return i?n[r]:n},stopDispatch:function(e,i){var n=t(e),r=o(i||"");r?n["__"+r+"_STOPPED"]=!0:n.__ALL_STOPPED=!0},resumeDispatch:function(e,i){var n=t(e),r=o(i||"");r?n["__"+r+"_STOPPED"]=!1:n.__ALL_STOPPED=!1},forward:function(t,e,i,n){var o=n||e;return he.addListener(t,e,Jt(he.trigger,he,i,o))},clearInstanceListeners:function(t){t.__event_relations__=null,delete t.__event_relations__},clearListeners:function(e,i){var n=t(e);n[i]=null,delete n[i]},addDOMListener:function(t,e,i,n){var r=o(e),s=r.split(" ");if(s.length>1){for(var a=[],h=0,l=s.length;h<l;h++)o(s[h])&&a.push(he.addDOMListener(t,s[h],i,n));return a}return"mousewheel"!==r||ae.isMouseWheelSupport||(r="wheel"),ae.attach(t,r,i,n),{target:t,eventName:r,listener:i}},removeDOMListener:function(t,i,n){if(t)if(x.isArray(t))for(var r=0,s=t.length;r<s;r++)he.removeDOMListener(t[r]);else{if(t!==e&&i===e&&n===e){var a=t;i=a.eventName,n=a.listener,t=a.target}i=o(i),"mousewheel"!==i||ae.isMouseWheelSupport||(i="wheel"),ae.detach(t,i,n)}}}}();var he=x.Event;x.KVO=function(){},x.KVO.prototype={constructor:x.KVO,set:function(t,e,i){var n=this.__getTargets()[t];if(n){var o=n.target,r=n.targetKey,s="set"+x.capitalize(t);o[s]?o[s](e,i):o.set(r,e,i)}else this[t]=e,!0!==i&&this.__notifyChanged(t)},__lazySet:function(t,e,i){this.get(t)!==e&&this.set(t,e,i)},get:function(t){var e=this.__getTargets()[t];if(e){var i=e.target,n=e.targetKey,o="get"+x.capitalize(t);return i[o]?i[o](n):i.get(n)}return this[t]},__notifyChanged:function(t){var e=this.get(t),i=t+"_changed";this[i]?this[i](e):this.changed&&this.changed(t,e),he.trigger(this,i,e)},bindTo:function(t,e,i){if("string"==typeof t){i=i||t,this.unbind(t);var n=Jt(function(t){this.__notifyChanged(t)},this,t),o=e.__bind(e,i,n);o.targetKey=i,this.__getTargets()[t]=o,this.__notifyChanged(t)}else if(x.isArray(t))for(var r=t,s=0,a=r.length;s<a;s++)this.bindTo(r[s],e)},__bind:function(t,e,i){return he.addListener(t,e+"_changed",i)},unbind:function(t){if(x.isArray(t))x.forEach(t,Jt(this.unbind,this));else{var e=this.__getTargets()[t];if(e){var i=e.target,n=this.get(t);i.__unbind(e),this.__getTargets()[t]=null,delete this.__getTargets()[t],this[t]=n}}},__unbind:function(t){he.removeListener(t)},unbindAll:function(){var t=this;x.forEach(t.__getTargets(),function(e,i){t.unbind(i)})},setValues:function(t){var e=this;x.forEach(t,function(t,i){var n="set"+x.capitalize(i);e[n]?e[n](t):e.set(i,t)})},__getTargets:function(){return this.__targets||(this.__targets={})},addListener:function(t,e){return he.addListener(this,t,e)},hasListener:function(t){return he.hasListener(this,t)},addListenerOnce:function(t,e){return he.once(this,t,e)},removeListener:function(t){return he.removeListener(t)},trigger:function(t){var e=[this,t];if(arguments.length>1)for(var i=1,n=arguments.length;i<n;i++)e.push(arguments[i]);return he.trigger.apply(he,e)},clearListeners:function(t){return t?he.clearListeners(this,t):he.clearInstanceListeners(this)}},x.KVOArray=function(t){this._array=t||[],this.set("length",this._array.length)},te(x.KVOArray,x.KVO,{setAt:function(t,i){var n=this._array[t],o=this.getLength();if(t>o-1){for(var r=o;r<t;r++)this.insertAt(r,e);this.insertAt(t,i)}else this._array[t]=i,this.set("length",this._array.length),he.trigger(this,"set_at",t,n)},insertAt:function(t,e){if(t<0)throw new Error("index number should be positive");this.splice(t,0,e)},removeAt:function(t){if(t<0)throw new Error("index number should be positive");return this.splice(t,1)[0]},splice:function(t,e){for(var i=e||0,n=[],o=this._array,r=o.length,s=2,a=arguments.length;s<a;s++)n.push(arguments[s]);var h=o.splice.apply(o,[t,i].concat(n));if(this.set("length",o.length),t<0?(t=r+t)<0&&(t=0):t>=r&&(t=r),h.length>0)for(var l=t+i-1,c=h.length;l>=t;l--)he.trigger(this,"remove_at",l,h[--c]);if(n.length>0){var u=(n.length,t);for(s=0,a=n.length;s<a;s++)he.trigger(this,"insert_at",u++,n[s])}return h},removeElement:function(t){var e=this.getIndexOfElement(t);-1!==e&&this.removeAt(e)},push:function(t){return this.insertAt(this._array.length,t),this._array.length},pop:function(){return this.removeAt(this.getLength()-1)},getAt:function(t){return this._array[t]},getIndexOfElement:function(t){return x.getIndexOfElement(this._array,t)},getLength:function(){return this.get("length")},getArray:function(){return this._array},clear:function(){for(var t=this.getLength()-1;t>=0;t--)this.removeAt(t)},forEach:function(t){for(var e=0,i=this.getLength();e<i;e++)t(this.getAt(e),e)}}),function(){x.Math={radianPerDegree:Math.PI/180,degreePerRadian:180/Math.PI,fromDegreesToRadians:function(t){return t*x.Math.radianPerDegree},fromRadiansToDegrees:function(t){return t*x.Math.degreePerRadian},distance:function(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},area:function(t){if(!t||3!==t.length)return 0;var e=t[0],i=t[1],n=t[2],o=(e+i+n)/2;return Math.sqrt(o*(o-e)*(o-i)*(o-n))},getPolygonSize:function(t,i){if(!t||!i)return 0;var o=0,r=e(t).concat(t),s=null;return r.sort(function(t,e){return t.x-e.x}),x.forEach(r,function(e){var r=e.x;s&&s!==r&&(o+=n(t,s,r,i)),s=r}),o},getDegrees:function(t,e){var i=t.x,n=t.y,o=e.x,r=e.y;return x.Math.fromRadiansToDegrees(Math.atan2(i*r-n*o,i*o+n*r))},getHorizontalDegrees:function(t,e){var i={x:t.x,y:e.y},n={x:e.x-i.x,y:e.y-i.y},o={x:e.x-t.x,y:e.y-t.y};return x.Math.getDegrees(n,o)},magnitude:function(t){var e=t.x,i=t.y;return Math.sqrt(e*e+i*i)},getVector:function(t,e){var i=t.x,n=t.y,o=e.x,r=e.y;return ee(i-o,n-r)}};var t=function(t,e,i,n){var o={x:e.x-t.x,y:e.y-t.y},r={x:n.x-i.x,y:n.y-i.y},s=r.x*(t.y-i.y)-r.y*(t.x-i.x),a=o.x*(t.y-i.y)-o.y*(t.x-i.x),h=r.y*o.x-r.x*o.y;if(0===h)return null;if(s/=h,a/=h,!(0<s&&s<=1&&0<a&&a<=1))return null;var l=ee(t.x+s*(e.x-t.x),t.y+s*(e.y-t.y));return(l.x<=Math.min(t.x,e.x)||l.x>=Math.max(t.x,e.x)||l.y<=Math.min(t.y,e.y)||l.y<=Math.min(t.y,e.y))&&(l.x<=Math.min(i.x,n.x)||l.x>=Math.max(i.x,n.x)||l.y<=Math.min(i.y,n.y)||l.y<=Math.min(i.y,n.y))?null:l},e=function(e){for(var i=e.length,n=[],o=0;o<i;o++)for(var r=e[o],s=e[(o+1)%i],a=0;a<i;a++){var h=e[a],l=e[(a+1)%i],c=t(r,s,h,l);c&&n.push(c)}return n},i=function(t,e,i){return(i-t.x)*(e.y-t.y)/(e.x-t.x)+t.y},n=function(t,e,n,o){var s,a=0,h=[],l=[],c=t.length;for(s=0;s<c;s++){var u=t[s],p=t[(s+1)%c];if(Math.min(u.x,p.x)<=e&&n<=Math.max(u.x,p.x)){var d,f;u instanceof ne?(d=ne(i(u,p,e),e),f=ne(i(u,p,n),n)):(d=ee(e,i(u,p,e)),f=ee(n,i(u,p,n))),h.push(d),l.push(f)}}if(h.sort(function(t,e){return t.y-e.y}),l.sort(function(t,e){return t.y-e.y}),h.length!=l.length||h.length<2)return 0;for(c=h.length,s=0;s<c;s+=2)a+=r([h[s],l[s],l[s+1],h[s+1]],o);return a},o=function(t){for(var e=[],i=0,n=t.length;i<n;i++){for(var o=!1,r=0,s=e.length;r<s;r++)if(e[r].equals(t[i])){o=!0;break}o||e.push(t[i])}return e},r=function(t,e){var i,n=0,r=o(t);return 3===r.length?i=[r]:4===r.length&&(i=[[r[0],r[1],r[2]],[r[0],r[2],r[3]]]),x.forEach(i,function(t){for(var i=[],o=0,r=t.length;o<r;o++){var s,a=t[o];s=o+1===r?t[0]:t[o+1],i.push(e.getDistance(a,s))}n+=x.Math.area(i)}),n}}(),function(){x.LocalStorage={available:function(){try{return t.localStorage.setItem("__mantle_available","true"),t.localStorage.removeItem("__mantle_available"),!0}catch(t){return!1}},has:function(e){return!!t.localStorage.getItem(e)},getItem:function(e){var i=t.localStorage.getItem(e);if(i)return"{"===i[0]||"["===i[0]?JSON.parse(i):i},setItem:function(e,i){var n=typeof i;"object"===n||Array.isArray(i)?t.localStorage.setItem(e,JSON.stringify(i)):"number"!==n&&"boolean"!==n||t.localStorage.setItem(e,i.toString()),"string"===n&&t.localStorage.setItem(e,i)},removeItem:function(e){t.localStorage.removeItem(e)},clear:function(){t.localStorage.clear()}}}();var le=x.LocalStorage;!function(){x.Intersection={polygonContainsPoint:function(t,e){for(var i,n,o=!1,r=0,s=t.length-1;r<t.length;s=r++)i=t[r],n=t[s],i.y>e.y!=n.y>e.y&&e.x<(n.x-i.x)*(e.y-i.y)/(n.y-i.y)+i.x&&(o=!o);return o}}}(),x.RBush=function(t){this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()},x.RBush.prototype={search:function(t){var e=this.data,i=[];if(!p(t,e))return i;for(var n=this.toBBox,o=[];e;){for(var r=0;r<e.children.length;r++){var s=e.children[r],a=e.leaf?n(s):s;p(t,a)&&(e.leaf?i.push(s):u(t,a)?this._all(s,i):o.push(s))}e=o.pop()}return i},load:function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var i=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===i.height)this._splitRoot(this.data,i);else{if(this.data.height<i.height){var n=this.data;this.data=i,i=n}this._insert(i,this.data.height-i.height-1,!0)}else this.data=i;return this},insert:function(t){return t&&this._insert(t,this.data.height-1),this},clear:function(){return this.data=d([]),this},toBBox:function(t){return t},compareMinX:function(t,e){return t.minX-e.minX},compareMinY:function(t,e){return t.minY-e.minY},_all:function(t,e){for(var i=[];t;)t.leaf?Array.prototype.push.apply(e,t.children):Array.prototype.push.apply(i,t.children),t=i.pop();return e},_build:function(t,e,n,o){var r,s=n-e+1,a=this._maxEntries;if(s<=a)return r=d(t.slice(e,n+1)),i(r,this.toBBox),r;o||(o=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,o-1))),r=d([]),r.leaf=!1,r.height=o;var h=Math.ceil(s/a),l=h*Math.ceil(Math.sqrt(a));f(t,e,n,l,this.compareMinX);for(var c=e;c<=n;c+=l){var u=Math.min(c+l-1,n);f(t,c,u,h,this.compareMinY);for(var p=c;p<=u;p+=h){var g=Math.min(p+h-1,u);r.children.push(this._build(t,p,g,o-1))}}return i(r,this.toBBox),r},_chooseSubtree:function(t,e,i,n){for(;;){if(n.push(e),e.leaf||n.length-1===i)break;for(var o,r=1/0,s=1/0,h=0;h<e.children.length;h++){var c=e.children[h],u=a(c),p=l(t,c)-u;p<s?(s=p,r=u<r?u:r,o=c):p===s&&u<r&&(r=u,o=c)}e=o||e.children[0]}return e},_insert:function(t,e,i){var n=i?t:this.toBBox(t),r=[],s=this._chooseSubtree(n,this.data,e,r);for(s.children.push(t),o(s,n);e>=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},_split:function(t,e){var n=t[e],o=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,o);var s=this._chooseSplitIndex(n,r,o),a=d(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,i(n,this.toBBox),i(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)},_splitRoot:function(t,e){this.data=d([t,e]),this.data.height=t.height+1,this.data.leaf=!1,i(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){for(var o,r=1/0,s=1/0,h=e;h<=i-e;h++){var l=n(t,0,h,this.toBBox),u=n(t,h,i,this.toBBox),p=c(l,u),d=a(l)+a(u);p<r?(r=p,o=h,s=d<s?d:s):p===r&&d<s&&(s=d,o=h)}return o||i-e},_chooseSplitAxis:function(t,e,i){var n=t.leaf?this.compareMinX:r,o=t.leaf?this.compareMinY:s;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,o)&&t.children.sort(n)},_allDistMargin:function(t,e,i,r){t.children.sort(r);for(var s,a=this.toBBox,l=n(t,0,e,a),c=n(t,i-e,i,a),u=h(l)+h(c),p=e;p<i-e;p++)s=t.children[p],o(l,t.leaf?a(s):s),u+=h(l);for(var d=i-e-1;d>=e;d--)s=t.children[d],o(c,t.leaf?a(s):s),u+=h(c);return u},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)o(e[n],t)},_condense:function(t){for(var e,n=t.length-1;n>=0;n--)0===t[n].children.length?n>0?(e=t[n-1].children,e.splice(e.indexOf(t[n]),1)):this.clear():i(t[n],this.toBBox)}},x.AsyncEventsModel=function(t){this._tranId=null,this.bindTo(["transformOrigin_px","projection","zoom","containerTopLeft","scale"],t),this._fProgress=Jt(this.progressZooming,this)},te(x.AsyncEventsModel,x.KVO,{SCALE_FACTOR:$t.browser.csszoom?.08:.04,_tranId:null,startZooming:function(t,e,i){if(this.set("transformOrigin_px",e),this.isZooming()){this._delta=this._delta+t;var n=this._getScaleBy(this._delta);0===n?this.stopZooming():this._dstScale=n}else this._delta=t,this.set("scale",1),this.set("containerTopLeft_px",i),this._dstScale=this._getScaleBy(this._delta),he.trigger(this,"zoomstart",this),this._tranId=x.TransitionQueue.addJob(this._fProgress)},progressZooming:function(){if(this.isZooming()){var t,e=this.get("scale"),i=this._dstScale,n=Math.abs(this._delta),o=this.SCALE_FACTOR*(n>3?.4:1),r=n*o;e<i?t=Math.min(e*(1+r),i):e>i&&(t=Math.max(e*(1-r),i)),this.set("scale",t),t===i&&this.stopZooming()}},stopZooming:function(){this.isZooming()&&(x.TransitionQueue.removeJob(this._fProgress),this._tranId=null,this._delta=null,this._dstScale=null,this.set("scale",1),this.set("containerTopLeft_px",this.get("containerTopLeft")),this.set("transformOrigin_px",ee(0,0)),he.trigger(this,"zoomend",this))},zoomingWithScale:function(t,e){var i=this.getContainerTopLeft();this._isPinching||(this.set("transformOrigin_px",e),this.set("containerTopLeft_px",i),this._isPinching=!0,he.trigger(this,"zoomstart",this)),this.set("scale",t)},stopZoomingWithScale:function(){this._isPinching&&(this.set("scale",1),this.set("containerTopLeft_px",this.get("containerTopLeft")),this.set("transformOrigin_px",ee(0,0)),this._isPinching=!1,he.trigger(this,"zoomend",this))},_getScaleBy:function(t){return 0===t?0:Math.pow(2,t)},getContainerTopLeft:function(){return this.isZooming()?this.get("containerTopLeft_px"):this.get("containerTopLeft")},startPanning:function(){this.isZooming()&&this.stopZooming()},isZooming:function(){return null!==this._tranId}}),function(){x.ZoomScaleChecker={getFittableMinZoom:function(t){t=x.isDefined(t)?t:this.get("zoom");var e=Math.max(this.getMinZoom(),t);return e!==t&&e},getFittableMaxZoom:function(t){t=x.isDefined(t)?t:this.get("zoom");var e=Math.min(this.getMaxZoom(),t);return e!==t&&e},isValidZoom:function(t){return!(this.get("userMinZoom")>t||this.get("mapTypeMinZoom")>t)&&!(this.get("userMaxZoom")<t||this.get("mapTypeMaxZoom")<t)},getMinZoom:function(){return Math.max(this.get("mapTypeMinZoom"),this.get("userMinZoom"))},getMaxZoom:function(){return Math.min(this.get("mapTypeMaxZoom"),this.get("userMaxZoom"))},getValidZoom:function(t){var e=this.get("zoom")+t,i=this.getMinZoom();if(e<=i)return i;var n=this.getMaxZoom();return e>=n?n:Math.round(e)},getValidDeltaZoom:function(t){var e=this.get("zoom"),i=e+t,n=this.getMinZoom(),o=this.getMaxZoom();return i<n?t+=n-i:i>o&&(t+=o-i),t},getFittableScale:function(t){var e=this.getMinZoom(),i=this.getMaxZoom();this._minScale=Math.pow(2,e-1),this._maxScale=Math.pow(2,i-1);var n,o=this.get("zoom"),r=Math.pow(2,o-1)*t,s=t;return r>this._maxScale?(n=i-o,s=Math.pow(2,n)):r<this._minScale&&(n=e-o,s=Math.pow(2,n)),s},getFittableZoomAndScale:function(t){var e=this.getMinZoom(),i=this.getMaxZoom();this._minScale=Math.pow(2,e-1),this._maxScale=Math.pow(2,i-1);var n=this.get("zoom");return{scale:Math.pow(2,n-1)*t,deltaLevel:Math.log(t,2)}}}}(),x.KeyRecognizer={_initMetaKeys:function(){this.set("shiftKey",!1),this.set("ctrlKey",!1),this.set("metaKey",!1),this.set("altKey",!1)},_setMetaKeys:function(t){this.__lazySet("shiftKey",t.shiftKey),this.__lazySet("ctrlKey",t.ctrlKey),this.__lazySet("metaKey",t.metaKey),this.__lazySet("altKey",t.altKey)},listenKey:function(){function e(t,e,i){return he.addDOMListener(t,e,i)}this._initMetaKeys(),this._keyInfo={},this._keyTran=new x.Transition({easing:x.easing.easeOutCubic,step:30,duration:1e3,progress:Jt(this._onKeyTransition,this),stop:Jt(this._onKeyTranEnd,this)});var i=this.getElement();this._keyListeners=[e(t,"blur",Jt(this._onWindowBlur,this)),e(T,"click",Jt(this._onCheckFocus,this)),e(T,"keydown",Jt(this._onKeyDown,this)),e(T,"keyup",Jt(this._onKeyUp,this)),e(i,"focus",Jt(this._onCheckFocus,this)),e(i,"blur",Jt(this._onMapBlur,this))]},unlistenKey:function(){he.removeDOMListener(this._keyListeners),this._keyInfo={},this._keyTran&&this._keyTran.stop(),this._keyTran=null},_focused:!1,_isDirKey:function(t){return 38===t||40===t||37===t||39===t},_getXFactor:function(){var t=0;return this._keyInfo[37]&&(t-=1),this._keyInfo[39]&&(t+=1),t},_getYFactor:function(){var t=0;return this._keyInfo[38]&&(t-=1),this._keyInfo[40]&&(t+=1),t},_onMapBlur:function(){this._focused=!1;var t=this._keyTran;t&&t.isRunning()&&(this._keyInfo={},t.stop())},_onWindowBlur:function(){this._keyInfo={}},_isFocusable:function(t){return!!t&&x.getIndexOfElement(H,t.tagName)>-1},_onCheckFocus:function(t){t=ae.fix(t);var e=t.target,i=t.target,n=this.getElement();for(this._focused=!1;e&&"BODY"!==e.tagName&&"HTML"!==e.tagName;){if(e===n&&!this._isFocusable(i)){this._focused=!0;break}e=e.parentNode}this._focused&&n.focus({preventScroll:!0})},_onKeyTransition:function(t){var e=t.progress,i=(this._keyInfo,this._getXFactor()),n=this._getYFactor(),o=e.weight,r=ee(i*o,n*o);he.trigger(this,"keytransition",r)},_onKeyTranEnd:function(t){he.trigger(this,"keytransitionend")},_onKeyDown:function(t){if(this._setMetaKeys(t),this._focused&&(t=ae.fix(t),he.trigger(this,"keydown",t),this.get("keyboardShortcuts")&&!this._isFocusable(t.target))){var e=t.which,i=this._keyInfo,n=this._keyTran;this._isDirKey(e)&&(i[e]=!0,n.isRunning()||n.run({weight:1},{weight:70},{infinity:!0}),ae.preventDefault(t))}},_onKeyUp:function(t){if(this._setMetaKeys(t),this._focused&&(t=ae.fix(t),he.trigger(this,"keyup",t),this.get("keyboardShortcuts"))){var e=t.which,i=this._keyInfo,n=this._keyTran;this._isDirKey(e)&&(i[e]=!1,!n.isRunning()||i[38]||i[40]||i[37]||i[39]||n.stop())}}},x.MouseRecognizer={listenMouse:function(){function t(t,e,n){return he.addDOMListener(t,e,n||i._getTrigger(e))}var e=this.getTarget(),i=this;i._dragListeners=[],i._dragStart=!1,i._panEl=e.setCapture?e:T,i._mouseListeners=[t(e,"mousedown",Jt(i._onDown,i)),t(e,"mousemove",Jt(i._onMove,i)),t(e,"mouseup",Jt(i._onUp,i)),t(e,"mousewheel",Jt(i._onWheel,i)),t(e,"contextmenu",Jt(i._onContextMenu,i)),t(e,"mouseenter",Jt(i._onEnter,i)),t(e,"mouseleave",Jt(i._onLeave,i))],!1===$t.mobile&&i._mouseListeners.push(t(e,"click",Jt(i._onClick,i)))},unlistenMouse:function(){he.removeDOMListener(this._mouseListeners),he.removeDOMListener(this._dragListeners),this._dragStart=!1,this._panEl=null},_onEnter:function(t){t=ae.fix(t),t.preventDefault(),he.trigger(this,"mouseover",t)},_onLeave:function(t){t=ae.fix(t),t.preventDefault(),he.trigger(this,"mouseout",t)},_onClick:function(t){t=ae.fix(t),this._triggerSingleClick(t)},_triggerSingleClick:function(t,e){var i=x.now(),n={x:t.pageX,y:t.pageY},o=this.__ct__?i-this.__ct__:1e4,r=this.__cp__?x.Math.distance(this.__cp__,n):1e4;if(o<250&&r<=Q)this.__ct__=null,this.__cp__=null,this._triggerDblClick(t);else{if(e)return;this.__ct__=i,this.__cp__=n,this._triggerClick(t)}},_isMapEvent:function(t){for(var e=this.__ie_dtarget__||t.target,i=this.getTarget(),n=!0;e&&e!==i;){if(!1===e.__clickable){n=!0;break}if(e.__clickable||e===this.panes.floatPane||x.getIndexOfElement(H,e.tagName)>-1){n=!1;break}e=e.parentNode}return n},_triggerClick:function(t){if(this._dragStart)return void(this._dragStart=!1);this._isMapEvent(t)&&(t.preventDefault&&t.preventDefault(),he.trigger(this,"click",t))},_triggerDblClick:function(t){this._isMapEvent(t)&&he.trigger(this,"dblclick",t)},_onDown:function(e){if(!ae.isTouchStarted()&&(e=ae.fix(e),$t.mobile&&"ipad"!==$t.device&&e.preventDefault(),this.__dp__={x:e.pageX,y:e.pageY},this.__ie_dtarget__=$t.browser.msie&&$t.browser.version>8&&e.target,ae.startTouch(e),he.trigger(this,"mousedown",e),this.get("draggable"))){var i=this._panEl;this._dragEndTimer&&(t.clearTimeout(this._dragEndTimer),this._dragEndTimer=null,delete this._dragEndTimer),this._dragListeners.length&&(this._initDrag(),this._dragStart=!1),i.setCapture&&i.setCapture(),this._eventButton=e.button,he.trigger(this,"dragready",e),this._dragListeners=[he.addDOMListener(i,"mousemove",Jt(this._onDrag,this)),he.addDOMListener(i,"mouseup",Jt(this._onDragEnd,this)),he.addDOMListener(i,"dragstart",Jt(this._resetDrag,this))]}},_initDrag:function(){this._dragListeners.length&&(this._panEl.releaseCapture&&this._panEl.releaseCapture(),he.removeDOMListener(this._dragListeners),this._dragListeners.length=0,this._dragListeners=[],this._eventButton=null)},_onDrag:function(t){this._dragListeners.length&&!ae.isTouchStarted()&&(t=ae.fix(t),t.preventDefault(),this.__dp__&&x.Math.distance(this.__dp__,{x:t.pageX,y:t.pageY})<=5||(this.__dp__=null,this._dragStart||(this._dragStart=!0),he.trigger(this,"drag",t)))},_onDragEnd:function(e){ae.endTouch(),e=ae.fix(e),this._dragStart&&(e.preventDefault(),he.trigger(this,"dragend",e)),this._initDrag();var i=this;i._dragEndTimer=t.setTimeout(function(){i._dragStart=!1},0)},_onMove:function(t){ae.isTouchStarted()||(t=ae.fix(t),he.trigger(this,"mousemove",t))},_onUp:function(t){ae.endTouch(),t=ae.fix(t),he.trigger(this,"mouseup",t),this._isMapEvent(t)&&t.which===ae.MOUSE_RBUTTON&&!this._dragStart&&he.trigger(this,"rightclick",t),$t.browser.msie&&8===$t.browser.version&&this._triggerSingleClick(t,!0),this.__ie_dtarget__=null},_onWheel:function(t){return t=ae.fix(t),he.trigger(this,"mousewheel",t),!1},_onContextMenu:function(t){t=ae.fix(t),t.preventDefault()},_resetDrag:function(t){this._isMapEvent(t)||-1===x.getIndexOfElement(["A","IMG"],t.target.tagName)||(this._initDrag(),this._dragStart=!1)}};x.TouchRecognizer={listenTouch:function(){function t(t,e,i,n){return he.addDOMListener(t,e,i,n||{passive:!1})}var e=this.getTarget();this._clearTouches(),this._swipeListeners=[],this._swipeEl=e.setCapture?e:T,this._touchListeners=[t(e,"touchstart",Jt(this._onTouchStart,this),{passive:!0}),t(e,"touchmove",Jt(this._onTouchMove,this)),t(e,"touchend",Jt(this._onTouchEnd,this))]},unlistenTouch:function(){he.removeDOMListener(this._touchListeners),he.removeDOMListener(this._swipeListeners),this._swipeStart=!1,this._swipeEl=null},_clearTouches:function(){this._swipeStart=!1,this._startTouches=null,this._moveTouches=null,this._endTouches=null,this._pinching=!1,this._startDistance=null,this._tilting=!1,this._startVec=null,delete this._startVec},_isValidParent:function(t){for(var e=this.getTarget();t;){if(t===e)return!0;t=t.parentElement}return!1},_getTouches:function(t){for(var e=t.touches||[],i=[],n=0,o=e.length;n<o;n++)i.push({pageX:e[n].pageX,pageY:e[n].pageY,clientX:e[n].clientX,clientY:e[n].clientY,target:e[n].target||t.target});return i},_excludeOutsideTouches:function(t){for(var e=[],i=0,n=t.length;i<n;i++){var o=t[i],r=o.target;this._isValidParent(r)&&e.push(o)}return e},_onTouchStart:function(t){ae.startTouch(t),t=ae.fix(t),this._endSwipe(),this._clearTouches();var e=this._getTouches(t);switch(e=this._excludeOutsideTouches(e),this._startTouches=e,he.trigger(this,"touchstart",t),e.length>1&&this._clearDoubleTap(),e.length){case 1:this._oneFingerStart(t);break;case 2:this._twoFingerStart(t)}},_onTouchMove:function(t){if(ae.isTouchStarted()){t=ae.fix(t);var e=this._getTouches(t),i=this._startTouches;switch(this._moveTouches=e,he.trigger(this,"touchmove",t),e.length>1&&this._clearDoubleTap(),i&&i.length){case 1:this._oneFingerMove(t);break;case 2:this._twoFingerMove(t)}}},_onTouchEnd:function(t){ae.endTouch(),t=ae.fix(t);var e=this._startTouches,i=this._endTouches||[].concat(this._moveTouches||e||[]),n=t.changedTouches;if(this._endTouches=i,he.trigger(this,"touchend",t),i){switch(e&&e.length){case 1:this._oneFingerEnd(t);break;case 2:this._twoFingerEnd(t)}if(n&&n.length>0)for(var o=0,r=n.length;o<r;o++)this._endTouches.pop()}},_clearSwipe:function(){this._swipeEl.releaseCapture&&this._swipeEl.releaseCapture(),he.removeDOMListener(this._swipeListeners),this._swipeListeners.length=0,this._swipeListeners=[],this._swipeStart=!1,this._lastSwipeEvent=null},_endSwipe:function(){this._swipeStart&&(this._lastSwipeEvent&&he.trigger(this,"dragend",this._lastSwipeEvent),this._clearSwipe())},_readySwipe:function(t){if(this.get("draggable")&&!this._pinching){var e=this._swipeEl;e.setCapture&&e.setCapture(),this._swipeListeners=[he.addDOMListener(e,"touchmove",Jt(this._onSwipe,this),{passive:!1}),he.addDOMListener(e,"touchend",Jt(this._onSwipeEnd,this),{passive:!1})],he.trigger(this,"dragready",t),this._swipeStart=!0}},_onSwipe:function(t){if(this._swipeStart){if(t=ae.fix(t),t.preventDefault(),t.touches&&t.touches.length>1)return void this._clearSwipe();this._lastSwipeEvent=t,he.trigger(this,"drag",t)}},_onSwipeEnd:function(t){ae.endTouch(),t=ae.fix(t),this._swipeStart&&he.trigger(this,"dragend",t),this._clearSwipe()},_getCenter:function(t){function e(t,e){var i=Math.min.apply(Math,t),n=Math.max.apply(Math,t),o=Math.min.apply(Math,e),r=Math.max.apply(Math,e);return ee((i+n)/2,(o+r)/2)}var i,n=0,o=t.length,r=[],s=[],a=[],h=[];for(n=0;n<o;n++)i=t[n],r.push(i.pageX),s.push(i.pageY),a.push(i.clientX),h.push(i.clientY);return{pageXY:e(r,s),clientXY:e(a,h)}},_getDistance:function(t){if(!t||t.length<2)return 0;var e=t[0],i=t[1];if(null===e||null===i)return 0;var n=this.getPaddingOffset();return x.Math.distance({x:e.pageX+n.x,y:e.pageY+n.y},{x:i.pageX+n.x,y:i.pageY+n.y})},_refineGesture:function(t){var e,i=this._getCenter(t.touches).pageXY,n=this._getDistance(t.touches);return null===this._startDistance?(this._startDistance=n,e=1):e=n/this._startDistance,{pageX:i.x,pageY:i.y,scale:e,originalEvent:t}},_clearPinch:function(){this._pinchEndCallback?this._pinchEndCallback():this._pinchEnd(),this._clearPinchTimer(),this._startDistance=null},_clearPinchTimer:function(){t.clearTimeout(this._pinchTimer),this._pinchEndCallback=null,delete this._pinchEndCallback,this._pinchTimer=null,delete this._pinchTimer},_getTwoTouches:function(t){var e=t.touches,i=[ee(0,0),ee(0,0)];return e&&e.length>=2&&(i=[ee(e[0].pageX,e[0].pageY),ee(e[1].pageX,e[1].pageY)]),i},_isTiltGesture:function(t){var e=t.scale,i=Math.abs(1-e),n=i<=.009,o=Math.abs(t.rotation)<2,r=!this._pinching&&n&&o;return(!r||1!==e)&&r},_processTilt:function(t,e){var i=t.originalEvent,n=this._getTwoTouches(i),o=Qt({scale:t.scale,center:ee(t.pageX,t.pageY),pageX:t.pageX,pageY:t.pageY,originalEvent:i},e);if(!this._tilting){Math.abs(x.Math.getHorizontalDegrees(n[0],n[1]))<15&&(this._tilting=!0,he.trigger(this,"tiltstart",o))}this._tilting&&he.trigger(this,"tilt",o)},_processPinch:function(t,e){var i=Qt({scale:t.scale,center:ee(t.pageX,t.pageY),pageX:t.pageX,pageY:t.pageY,rotation:t.rotation,originalEvent:t.originalEvent},e);this._pinching||(this._pinching=!0,he.trigger(this,"pinchstart",i)),he.trigger(this,"pinch",i)},_pinchStart:function(t){var e=this._getTwoTouches(t.originalEvent);this._tilting=!1,this._startVec=x.Math.getVector(e[0],e[1]),this._pinching=!1,this._startDistance=null},_pinchChange:function(t){if(2===t.originalEvent.touches.length){var e=this._getTwoTouches(t.originalEvent),i=x.Math.getVector(e[0],e[1]);this._startVec&&(t.rotation=x.Math.getDegrees(i,this._startVec)),this.get("pinchZoom")&&!this._tilting&&1!==t.scale&&this._processPinch(t)}},_pinchEnd:function(t){this._tilting&&he.trigger(this,"tiltend",t),this._startVec=null,delete this._startVec,this._tilting=!1,this._clearPinchTimer(),this.get("pinchZoom")&&(this._startDistance=null,he.trigger(this,"pinchend",t))},_clearDoubleTap:function(){t.clearTimeout(this._dbltapTimer),this._dbltapTimer=null,this._prevTouch=null},_isOverSwipeThreshold:function(t){if(!this._prevTouch)return!1;var e=ee(this._prevTouch.pageX,this._prevTouch.pageY),i=ee(t.pageX,t.pageY);return x.Math.distance(e,i)>=15},_tapClick:function(t){var e=this._startTouches,i=this._moveTouches,n=e?e[0]:null,o=i?i[0]:null,r=n&&1===e.length,s=!o||this._getDistance([o,n])<=15;r&&s&&(n=ee(n.pageX,n.pageY),this._triggerClick&&this._triggerClick({type:"click",pageX:n.x,pageY:n.y,target:t.target}))},_twofingerTap:function(){var t=this._startTouches,e=this._getCenter(t),i=e.pageXY;e.clientXY;he.trigger(this,"twofingertap",{pageX:i.x,pageY:i.y})},_doubleTap:function(e){var i=this._startTouches[0];ee(i.pageX,i.pageY);if(this._isMapEvent(e))if(this._prevTouch)if(this._prevTouch&&this._isOverSwipeThreshold(i))this._clearDoubleTap();else{this._clearDoubleTap();var n=this,o=x.now(),r=he.addListener(this,"touchend",function(){he.removeListener(r),n._clearDoubleTap(),x.now()-o>250||he.trigger(n,"doubletap",{pageX:i.pageX,pageY:i.pageY,target:e.target})})}else this._dbltapTimer=t.setTimeout(Jt(this._clearDoubleTap,this),500)},_longTap:function(e){var i=this;this._clearLongTap(),this._longTapTimer=t.setTimeout(function(){i._clearTouches(),i._clearSwipe(),he.trigger(i,"longtap",e)},1e3)},_clearLongTap:function(){t.clearTimeout(this._longTapTimer),this._longTapTimer=null},_oneFingerStart:function(t){var e=this._startTouches[0];this._clearPinch(),this._clearSwipe(),this._readySwipe(t),this._longTap(t),this._doubleTap(t),this._prevTouch=e},_twoFingerStart:function(t){if(this._clearLongTap(),this._clearDoubleTap(),this._clearSwipe(),this._startDistance=null,this._twoTouchAngle=null,t.touches&&t.touches.length>=2){var e=this._getTwoTouches(t);this._twoTouchAngle=Math.abs(x.Math.getHorizontalDegrees(e[0],e[1]))}this._pinchStart(this._refineGesture(t))},_oneFingerMove:function(t){var e=this._moveTouches[0];this._swipeStart&&this._isOverSwipeThreshold(e)&&(this._clearLongTap(),this._clearDoubleTap())},_twoFingerMove:function(e){this.get("pinchZoom")&&e.preventDefault();var i=this._refineGesture(e);if(e.touches&&e.touches.length>=2){var n=this._getTwoTouches(e);this._twoTouchAngle=Math.abs(x.Math.getHorizontalDegrees(n[0],n[1]))}this._pinchChange(i),this._clearPinchTimer(),this._pinchEndCallback=Jt(this._pinchEnd,this,i),this._pinchTimer=t.setTimeout(this._pinchEndCallback,500)},_oneFingerEnd:function(t){this._clearLongTap(),this._tapClick(t)},_twoFingerEnd:function(t){if(!this._pinching&&!this._tilting){var e=this._twoTouchAngle;null!==e&&e<15&&this._twofingerTap()}(this._pinching||this._tilting)&&this._pinchEnd(t),this._twoTouchAngle=null}},x.MapUpdater={update:function(t,e,i,n,o){var r={},s=this.get("zoom"),a=this.get("centerPoint"),h=this.get("mapSystemProjection"),l=(this.get("projection"),this.get("maxBounds")),c=x.hasValue(i),u=2===this.get("renderMode");if(c&&(i=x.nearRange(u?i:Math.round(i),this.get("userMinZoom"),this.get("userMaxZoom"))),l){if(t&&!l.hasPoint(t))return;if(e&&!t&&!l.hasPoint(h.fromPointToCoord(e)))return}if(!t&&e?(r.center=h.fromPointToCoord(e),r.centerPoint=e):t&&!e?(e=h.fromCoordToPoint(t),r.center=t,r.centerPoint=e):t&&e&&(r.center=t,r.centerPoint=e),c&&!n&&s!==i&&(n=ee(0,0)),x.hasValue(n))this.get("containerTopLeft").equals(n)||(r.containerTopLeft=n);else{n=this.get("containerTopLeft").clone();var p=r.centerPoint,d=h.scaleUp(a.x-p.x,s),f=h.scaleUp(a.y-p.y,s);n.add(d,f),r.containerTopLeft=n}if(c&&(r.zoom=i),c||x.hasValue(r.centerPoint)||x.hasValue(r.containerTopLeft)){i=c?i:s,e=e||this.get("centerPoint");var g=this.get("size"),_=h.scaleDown(g.width,i)/2,m=h.scaleDown(g.height,i)/2,y=e.clone(),v=this.get("tileSize");this.get("repeatX")&&((y.x<0||y.x>v.width)&&(y.x=y.x%v.width,y.x<0&&(y.x=v.width+y.x)),r.centerPoint&&(r.centerPoint=y.clone())),r.projectionTopLeft=y.clone().sub(_,m),r.projectionBottomRight=y.clone().add(_,m)}this._fireEvents(r,o)},_fireEvents:function(t,e){var i,n=["projectionTopLeft","containerTopLeft","center","centerPoint","zoom"];t.centerPoint&&x.isDefined(t.zoom)&&this.set("bounds",this.calcBoundsBy(t.centerPoint,t.zoom),!0);for(var o=0;o<n.length;o++)i=n[o],x.isDefined(t[i])&&this.set(i,t[i],e);this.set("bounds",this.calcBounds(),e)}},x.MapView=function(e,i){var n=x.isString(e)?T.getElementById(e):e,o=n.style;"absolute"!==o.position&&(o.position="relative"),o.overflow="hidden",t.navigator.pointerEnabled?(o.touchAction="none",o.contentZooming="none"):t.navigator.msPointerEnabled&&(o.msTouchAction="none",o.msContentZooming="none"),this._mapDiv=n,this.set("mapDiv",n),this._mapOptions=i,this._initMetaKeys(),this._prepareDOM(),this.setCursor("open"),this._etarget=this.get("containerFillDiv"),this._bindMapOption(i)},te(x.MapView,x.KVO,[x.MouseRecognizer,x.KeyRecognizer,x.TouchRecognizer],{DEFAULT_STYLE:"position:absolute;display:block;margin:0;padding:0;border:0px none;top:0;left:0;",_createPane:function(t,e,i,n,o){e=e||0,n=n||"overflow:visible;width:100%;height:0;"+this.DEFAULT_STYLE,n+="z-index:"+e+";",n+=o||"";var r=se.createElement("div",n);return it&&i&&r.setAttribute("data-pane-name",i),t.appendChild(r),r},_prepareDOM:function(){var t=Jt(this._createPane,this),e=this.DEFAULT_STYLE,i=e+"overflow:visible;width:100%;height:100%;-webkit-tap-highlight-color: rgba(0,0,0,0);",n=t(this._mapDiv,0,"fillMapDiv",i),o=t(n,0,"containerFillDiv",i),r=t(o,1,"containerDiv"),s=t(o,1e4,"loadingDiv",i+"background-color:#fff;"),a=t(r,0,"zoomPane"),h=t(r,1,"tilePane"),l=t(r,100,"overlayPane");$t.mobile||(this._mapDiv.tabIndex=0),a.style.display="none",se.disableSelection(h),se.disableSelection(a),se.setOpacity(s,.5),s.style.display="none",this.set("fillMapDiv",n),this.set("containerFillDiv",o),this.set("containerDiv",r),this.set("loadingDiv",s),this.set("zoomPane",a),this.set("tilePane",h),this.set("overlayPane",l);var c={overlayLayer:t(l,101,"overlayLayer"),overlayImage:t(l,103,"overlayImage"),floatPane:t(l,106,"floatPane")};this.set("panes",c),this.set("tileindexpanes",new x.KVOArray),this._zIndex=107,this._overlayZIndex=107},addTilePane:function(t){this.get("tileindexpanes").push(t)},removeTilePane:function(t){this.get("tileindexpanes").removeElement(t)},getTilePanes:function(){return this.get("tileindexpanes")},addPane:function(t,e){var i,n=e;return x.isNumber(n)||!x.hasValue(n)?(i=n||this._zIndex++,n=this._createPane(this.get("containerDiv"),i,t)):this.get("containerDiv").appendChild(n),this.get("panes")[t]=n,n},removePane:function(t){var e=this.get("panes"),i=e[t];i&&(se.removeElement(i),i=null,e[t]=null,delete e[t])},addOverlayPane:function(t,e){var i,n=this.get("overlayPane"),o=e;return x.isNumber(o)||!x.hasValue(o)?(i=o||this._overlayZIndex++,o=this._createPane(n,i,t)):n.appendChild(o),this.get("panes")[t]=o,o},removeOverlayPane:function(t){this.removePane(t)},_bindMapOption:function(t){this.bindTo(["padding","draggable","scrollWheel","keyboardShortcuts","pinchZoom","background"],t)},background_changed:function(t){var e=this.get("mapDiv"),i="transparent";i=0===t.indexOf("#")||0===t.indexOf("rgb")?t:"url('"+t+"') repeat 0 0 transparent";try{e.style.background=i}catch(t){}},swapTilePane:function(){var t,e=this.get("tilePane"),i=this.get("zoomPane");he.trigger(this,"before_tilepane_swap"),t=e,e=i,i=t,e.style.zIndex=1,i.style.zIndex=0,this.set("tilePane",e),this.set("zoomPane",i),t=null,he.trigger(this,"tilepane_swapped")},setCursor:function(t){var e=t;t&&"auto"!==t||(t="open"),"open"!==t&&"closed"!==t||(e="url('"+rt+"/"+t+"hand.cur'), default"),this._cursorType=t,this.get("fillMapDiv").style.cursor=e},getCursor:function(){return this._cursorType},toggleHand:function(t){if(t&&("open"===t||"closed"===t)){var e="open"===t?"closed":"open";this.getCursor()===e&&this.setCursor(t)}},getInfoWindowElement:function(){function t(t){ae.stopPropagation(t)}var e=this._infoWindowEl;if(e)return e;e=se.createElement("div",ut+"cursor:default;");for(var i=["click","mousedown","dblclick","mousewheel","touchstart","gesturestart"],n=0,o=i.length;n<o;n++)he.addDOMListener(e,i[n],t);return this._infoWindowEl=e,e},getElement:function(){return this.get("mapDiv")},getMapOffset:function(){return se.getOffset(this.get("mapDiv")).add(this.getPaddingOffset())},getContainerDivOffset:function(){var t=(this.get("padding"),se.getTranslate(this.get("containerDiv"))),e=this.getPaddingOffset();return t.add(e)},getTarget:function(){return this._etarget},_getTrigger:function(t){var e=this;return function(i){i=ae.fix(i),i.preventDefault(),he.trigger(e,t,i)}},listen:function(){this.unlisten(),this.listenMouse(),this.listenKey(),this.listenTouch()},unlisten:function(){this.unlistenMouse(),this.unlistenKey(),this.unlistenTouch()},padding_changed:function(){var t=this.get("containerDiv"),e=this.getPaddingOffset();t.style.marginLeft=e.x+"px",t.style.marginTop=e.y+"px"},getPaddingOffset:function(){var t=this.get("padding");return ee((t.right-t.left)/2,(t.bottom-t.top)/2).mul(-1,-1)},setSize:function(t){!t||this._size&&this._size.equals(t)||(this._size=t.clone(),se.setSize(this.get("mapDiv"),t))},getSize:function(){return this._size||(this._size=se.getSize(this.get("mapDiv")).round()),this._size},destroy:function(){se.removeElement(this.get("fillMapDiv")),this.unlisten(),this.unbindAll()}}),x.MapModel=function(t){var e=this;e.bindTo(["userMinZoom","userMaxZoom","padding","resizeOrigin","maxBounds","tileTransition","tileSpare","mapTypeId"],t),e.set("instantTiling",!0),e.set("mapTypeId",t.get("mapTypeId")),e.set("mapSystemProjection",new x.MapSystemProjection(e)),e.set("containerTopLeft",ee()),e.set("scale",1),e.set("transformOrigin_px",ee()),e.set("infowindow",null),e.set("renderMode",vt)},te(x.MapModel,x.KVO,[x.MapUpdater,x.ZoomScaleChecker],{padding_changed:function(t){var e=ee(t.left,t.top),i=ee(t.right,t.bottom);this.set("paddingOffset",ee((i.x-e.x)/2,(i.y-e.y)/2).mul(-1,-1)),this.getCenter()&&this.setProjBounds(this.get("size"),this.get("centerPoint"),this.get("zoom"))},initPrimaryData:function(t){var e,i=this,n=i.get("userMinZoom"),o=i.get("userMaxZoom"),r=t.mapTypes.getSelectedType(),s=r.tileSize||re(256,256),a=r.projection||x.EmptyProjection,h=t.get("bounds"),l=t.get("maxBounds"),c=t.get("center"),u=t.get("zoom"),p=t.get("gl");!1===x.hasValue(n)&&(n=-1),!1===x.hasValue(o)&&(o=100),i.set("tileSize",s),i.set("projection",a),i.set("isTilingSystemChanged",!1),i.set("repeatX",r.repeatX||!1),h&&(e=this.getFitZoomAndCenter(h),u=Math.max(e.zoom,n),c=e.center,p&&(u-=1),t.set("bounds",null)),l&&!l.hasPoint(c)&&(e=this.getFitZoomAndCenter(l),u=Math.max(e.zoom,n),c=e.center),n>u&&(u=n),o<u&&(u=o),t.set("zoom",u),t.set("center",c),i.set("zoom",u),i.set("center",c),i.set("centerPoint",i.get("mapSystemProjection").fromCoordToPoint(c)),i.set("tilt",t.get("tilt")),i.set("rotation",t.get("rotation")),i.setProjBounds(i.get("size"),i.get("centerPoint"),u)},setCenter:function(t){return!t.equals(this.get("center"))&&(this.setCenterPoint(this.get("mapSystemProjection").fromCoordToPoint(t)),!0)},getCenter:function(){return this.get("center")},setCenterPoint:function(t){var e=!1===t.equals(this.get("centerPoint")),i=this._getTileChanges();return this.set("instantTiling",!0),this.update(null,t,null),i===this._getTileChanges()&&this.set("instantTiling",!1),e},getCenterPoint:function(){return this.get("centerPoint")},getCenterPixel:function(){var t=this.get("size");return ee(t.width/2,t.height/2).sub(this.get("containerTopLeft"))},getZoom:function(){return this.get("zoom")},setProjBounds:function(t,e,i){var n=this.get("mapSystemProjection"),o=n.scaleDown(t.width,i)/2,r=n.scaleDown(t.height,i)/2;this.set("projectionTopLeft",e.clone().sub(o,r)),this.set("projectionBottomRight",e.clone().add(o,r)),this.set("bounds",this.calcBounds())},_fromCoordToOffsetAtZoom:function(t,e){var i=this.get("mapSystemProjection"),n=i.fromCoordToPoint(t.clone());return n.sub(this.get("projectionTopLeft")),i.scaleUp(n,e),n.sub(this.get("containerTopLeft")),n},_fromOffsetToCoordAtZoom:function(t,e){var i=this.get("mapSystemProjection"),n=t.clone();return n.add(this.get("containerTopLeft")),i.scaleDown(n,e),n.add(this.get("projectionTopLeft")),i.fromPointToCoord(n)},getBoundsWithMargin:function(t,e,i){if(t=t||this.getBounds(),e=x.trbl(e),e=x.trbl_abs(e),i=x.isDefined(i)?i:this.get("zoom"),x.trbl_isZero(e))return t;var n=this._fromCoordToOffsetAtZoom(t.getMin(),i),o=this._fromCoordToOffsetAtZoom(t.getMax(),i);return n.sub(e.left,-1*e.bottom),o.add(e.right,-1*e.top),n=this._fromOffsetToCoordAtZoom(n,i),o=this._fromOffsetToCoordAtZoom(o,i),n instanceof ne?oe.bounds(n,o):ie.bounds(n,o)},fitBounds:function(t,e){var i=this.getBounds(),n=this.getFitZoomAndCenter(t),o=this._getTileChanges(),r=this.calcBoundsBy(n.centerPoint,n.zoom),s=this.getBoundsWithMargin(t,e,n.zoom),a=e&&e.maxZoom&&"number"==typeof e.maxZoom,h=a?e.maxZoom:n.zoom;if(i.equals(s))return!1;for(n.center=s.getCenter(),n.centerPoint=this.get("mapSystemProjection").fromCoordToPoint(n.center);!1===r.hasBounds(s)&&(n.zoom-=1,r=this.calcBoundsBy(n.centerPoint,n.zoom),!(n.zoom<=this.get("mapTypeMinZoom")||r.hasBounds(s))););this.set("instantTiling",!0);var l=Math.min(n.zoom,h);return this.update(null,n.centerPoint,l),o===this._getTileChanges()&&this.set("instantTiling",!1),!1===this.getBounds().equals(i)},getBounds:function(){return this.get("bounds")},getFitZoomAndCenter:function(t){var e=this.get("size").clone(),i=(this.get("padding"),this.get("mapSystemProjection")),n=this.get("userMinZoom"),o=this.get("userMaxZoom"),r=this.get("mapTypeMinZoom");!1===x.hasValue(n)&&(n=-1),!1===x.hasValue(o)&&(o=100);var s=x.calcFitZoomAndCenter(e,t,i,o,n,r),a=this.getFittableMinZoom(s.zoom);return!1===a&&(a=s.zoom),s.zoom=a,s},calcBoundsBy:function(t,e){var i=this.get("mapSystemProjection"),n=this.get("tileSize"),o=this.get("padding"),r=this.get("size").clone().sub(o.left+o.right,o.top+o.bottom),s=i.scaleDown(r.width,e)/2,a=i.scaleDown(r.height,e)/2,h=t.clone().add(-1*s,a),l=t.clone().add(s,-1*a);return h.x=Math.max(h.x,0),h.y=Math.min(h.y,n.height),l.x=Math.min(l.x,n.width),l.y=Math.max(l.y,0),h=i.fromPointToCoord(h),l=i.fromPointToCoord(l),(h instanceof ne?oe:ie).bounds(h,l)},calcBounds:function(){return this.calcBoundsBy(this.get("centerPoint"),this.get("zoom"))},getSize:function(){return this.get("size")},setSize:function(t){this.getCenter()&&!this.get("size").equals(t)&&(t=t.clone(),this._applyResizeOrigin(this.get("size").clone(),t.clone()),this.set("size",t),this.setProjBounds(t,this.get("centerPoint"),this.get("zoom")),this.set("instantTiling",!1))},setTilt:function(t){this.set("tilt",t||0)},getTilt:function(){return this.get("tilt")||0},setRotation:function(t){this.set("rotation",t||0)},getRotation:function(){return this.get("rotation")||0},_applyResizeOrigin:function(t,e){var i=this.get("resizeOrigin");if(i!==U.CENTER){var n=this.get("mapSystemProjection"),o=this.get("zoom"),r=this.get("centerPoint").clone(),s=n.scaleDown(e.sub(t).div(2,2),o);switch(s=ee(s.width,s.height),i){case U.TOP_LEFT:case U.LEFT_TOP:r.add(s);break;case U.TOP_RIGHT:case U.RIGHT_TOP:r.add(-s.x,s.y);break;case U.BOTTOM_RIGHT:case U.RIGHT_BOTTOM:r.sub(s);break;case U.BOTTOM_LEFT:case U.LEFT_BOTTOM:r.sub(-s.x,s.y)}this.setCenterPoint(r)}},_calcBaseOffset:function(){this.set("baseOffset",this.get("mapSystemProjection").fromPointToOffset(ee(0,0)))},_calcLinearCenterPoint:function(){var t=this.get("centerPoint").clone();if(this.get("repeatX")){var e=this.get("mapSystemProjection"),i=this.get("zoom"),n=e.scaleDown(this.get("baseOffset").clone(),i),o=e.scaleDown(e.fromPointToOffset(ee(0,0)),i),r=o.sub(n);t.add(r);var s=this._cpdiff,a=t.clone().sub(this.get("centerPoint"));s&&!1===s.equals(a)&&he.trigger(this,"__point_shifted"),this._cpdiff=a}this.set("__linearCenterPoint",t)},bounds_changed:function(){var t=this.get("zoom"),e=this.get("size"),i=this.__prevZoom!==t,n=!this.__prevSize||!1===this.__prevSize.equals(e),o=this.get("isTilingSystemChanged");(n||i||o)&&this._calcBaseOffset(),this._calcLinearCenterPoint(),this.__prevZoom=this.get("zoom"),this.__prevSize=this.get("size");var r=this.get("tileIndexArray");r&&(i||o?r.build():r.update(n),o&&this.set("isTilingSystemChanged",!1))},initTilePaneModel:function(){var t=new x.TileIndexArray(this),e=0,i=function(){e>1e3?e=0:e++};this.set("tileIndexArray",t),this._getTileChanges=function(){return e||0},he.addListener(t,"insert_at",i)},refreshTiles:function(t){t&&this.set("instantTiling",!0),he.trigger(this,"refresh",t)},projection_changed:function(){var t=this.getCenter();if(t){var e=this.get("mapSystemProjection").fromCoordToPoint(t);this.set("isTilingSystemChanged",!0),this.set("centerPoint",e),this.setProjBounds(this.getSize(),e,this.getZoom())}},maxBounds_changed:function(t){var e=this.getCenter();if(e&&t&&!t.hasPoint(e))return this.setCenter(t.getCenter())}}),x.MapAction=function(t){var e=this;e._mapView=null,e._mapModel=null,e._zoomEffector=null,this._asyncEventsModel=null,e._trans={},e._listeningEvents={},he.addListener(e,"__BEGIN_DISPATCH__",Jt(e._onBeginDispatch,e)),he.addListener(e,"__STOP_DISPATCH__",Jt(e._onStopDispatch,e)),e.bindTo(["draggable","scrollWheel","disableDoubleClickZoom","disableKineticPan","keyboardShortcuts","disableDoubleTapZoom","disableTwoFingerTapZoom","zoomOrigin"],t),e._map=t.map,!se.isSupportedCSS3Style("transform")||$t.browser.msie&&$t.browser.version<10||e.bindTo("overlayZoomEffect",t)},te(x.MapAction,x.KVO,{setMapModel:function(t){this.bindTo(["mapSystemProjection","centerPoint","maxBounds","scale","containerTopLeft","zoom","center","tilt","rotation","projection","bounds","padding","paddingOffset","size","tileTransition","instantTiling","mapTypeMinZoom","mapTypeMaxZoom","tileSize","repeatX"],t),this._mapModel=t;var e=new x.AsyncEventsModel(t);he.forward(e,"zoomstart",this),he.forward(e,"zoomend",this),this._asyncEventsModel=e,this.forwardZooming(),this.forwardIdle()},overlayZoomEffect_changed:function(t){var e=x.hasValue(t);if(this.setValues({ef_overlay:e,ef_overlaylayer:!1,ef_overlayimage:!1,ef_floatpane:!1}),e)if("all"===t)this.setValues({ef_overlaylayer:!0,ef_overlayimage:!0,ef_floatpane:!0});else{var i=t.split(",");x.forEach(i,function(t){this.set("ef_"+t.toLowerCase().trim(),!0)}.bind(this))}},repeatX_changed:function(){this.triggerIdle()},forwardZooming:function(){var t=this,e=t._asyncEventsModel;t.clearZooming(),t._zforwards=he.forward(e,"zoomstart",t,"zooming")},forwardIdle:function(){var t=this,e=t._asyncEventsModel;t.clearIdle(),t._iforwards=he.forward(e,"zoomend",t,"idle")},clearZooming:function(){he.removeListener(this._zforwards),this._zforwards=null},clearIdle:function(){he.removeListener(this._iforwards),this._iforwards=null},triggerIdle:function(){this._map.isReady&&2!==this._map.get("renderMode")&&he.trigger(this,"idle",this._asyncEventsModel)},setMapView:function(t){this.bindTo(["zoomPane","tilePane","shiftKey","ctrlKey","metaKey","altKey"],t),this._mapView=t,this.listenView(t)},initZoomEffector:function(){var t=new x.ZoomEffector(this._mapView,this);this.bindTo("tileszooming",t),he.forward(t,"scale",this),he.forward(t,"clearpaneposition",this),this._zoomEffector=t},clearOverlayPanePosition:function(){this._zoomEffector.clearOverlayPanePosition()},panBy:function(t,e){if(!t.equals(ee(0,0))){var i,n=this.get("mapSystemProjection"),o=this.get("centerPoint").clone(),r=this.get("maxBounds"),s=this.get("scale")||1,a=this.get("containerTopLeft").clone();t=t.clone().round(),a.sub(t),t.div(s,s),n.scaleDown(t,this.get("zoom")),o.add(t),i=n.fromPointToCoord(o),this._asyncEventsModel.startPanning(t),r&&!r.hasPoint(i)||(a.round(),e&&(this.set("containerTopLeft",a),this._mapModel.set("center",i,e)),this._mapModel.update(null,o,null,a,e))}},_getPageXYPointBy:function(t){if(t){if(t.pos){var e=t.pos();return ee(e.pageX,e.pageY)}return"pageX"in t&&"pageY"in t?ee(t.pageX,t.pageY):void 0}},fromEventToPointerEvent:function(t){return this._getPointerEvent(t)},_getPointerEvent:function(t,e){var i=this._getPageXYPointBy(t);if(i){var n={type:e||t.type||"",originalEvent:t,domEvent:t};if(n.type){if(0===n.type.indexOf("key"))return n.keyboardEvent=t,n}else n.type=null,delete n.type;var o=this.get("mapSystemProjection"),r=this.get("projection"),s=this._mapView.getMapOffset(),a=i.clone().sub(s).sub(this.get("containerTopLeft")),h=o.fromOffsetToPoint(a),l=o.fromPointToCoord(h);return n.pointerEvent=t,n.offset=a,n.point=h,r!==x.EmptyProjection&&(n.coord=l),r.fromPointToLatLng&&(n.latlng=l),this.get("repeatX")&&(n.point=o.fromCoordToPoint(l)),n}},_triggerTap:function(t){var e={type:"tap",target:t.pointerEvent.target,pageX:t.pointerEvent.pageX,pageY:t.pointerEvent.pageY},i={domEvent:e,pointerEvent:e,offset:t.offset,point:t.point,coord:t.coord};t.latlng&&(i.latlng=t.latlng),he.trigger(this,"tap",i)},_isMapEvent:function(t,e){return!(_t[e]&&!this._mapView._isMapEvent(t))},handleEvent:function(t,e){var i=!t;if(e=e||t.type,t&&this._listeningEvents[e]&&this._isMapEvent(t,e)&&(i=!0),i){var n=[this,e],o=null;t&&(o=this._getPointerEvent(t,e),n.push(o)),o&&$t.mobile&&"click"===e&&this._triggerTap(o),he.trigger.apply(he,n)}},zoomBy:function(e,i,n){i=this._eventOrigin_px||i,e=Math.round(e);var o=this._asyncEventsModel,r=this._mapModel.getValidDeltaZoom(e),s=this.get("zoom"),a=s+r,h=this.get("mapSystemProjection"),l=this;if(!this._mapModel.isValidZoom(a)||s===a)return!1;this.stopTransition(),this.stopKineticPan();var c=this.get("size"),u=o.getContainerTopLeft(),p=this.get("centerPoint").clone(),d=i.clone(),f=this.get("maxBounds"),g=f&&this._getBufferedBounds(f,3);if(g&&!g.hasPoint(h.fromOffsetToCoord(i)))p=this.get("centerPoint").clone(),i=this._mapModel.getCenterPixel();else{d.sub(c.width/2,c.height/2),d.add(u.x,u.y);var _=d.clone();h.scaleDown(d,s),h.scaleDown(_,a),p.add(d),p.sub(_)}return n&&(o.isZooming()||(this._eventOrigin_px=i.clone(),he.removeListener(l._zbl),this._zbl=he.addListener(this,"idle",function(){t.setTimeout(function(){he.removeListener(l._zbl),l._eventOrigin_px=null,l._zbl=null},100)})),o.startZooming(r,i,u)),this._mapModel.update(null,p,a),!0},zoomingBy:function(t,e,i){switch(t){case"start":this._onStartZoomingBy();break;case"change":this._onChangeZoomingBy(e,i);break;case"end":this._onEndZoomingBy()}},_onStartZoomingBy:function(){var t=this.get("scale");this._startScale=t-1,this._trans.pinch&&(this._trans.pinch.stop(),this._trans.pinch=null,delete this._trans.pinch)},_onChangeZoomingBy:function(t,e){e&&!this._scaleEventOrigin&&(e=this._getZoomOriginByPoint(e),this._scaleEventOrigin=e);var i,n=this._getZoomOrigin()||this._scaleEventOrigin||this._mapModel.getCenterPixel();t<1?(t-=1,i=this._startScale+1+t):i=this._startScale+t,1!==(i=this._mapModel.getFittableScale(i))&&(this._prevPinch&&(i<.1&&(i=.1),i>16&&(i=16)),this._asyncEventsModel.zoomingWithScale(i,n))},_onEndZoomingBy:function(){function t(t,e){a.zoomingWithScale(t,e||s)}function e(){l._scaleEventOrigin=null,delete l._scaleEventOrigin,a.stopZoomingWithScale()}function i(t){l._trans.pinch&&(l._trans.pinch.stop(),l._trans.pinch=null,delete l._trans.pinch);var e=new x.Transition(Qt({duration:100},t));l.stopTransition(),e.run({scale:o},{scale:n}),l._trans.pinch=e}var n,o=this.get("scale"),r=this.get("zoom"),s=this._getZoomOrigin()||this._scaleEventOrigin||this._mapModel.getCenterPixel(),a=this._asyncEventsModel,h=0,l=this;if(o&&s){if(1===o)return e();var c=Math.pow(2,r),u=c*o,p=Math.floor(Math.log(u)/Math.log(2));h=p-r,0===h&&o>1&&(h=1),n=Math.pow(2,h),o>1&&o>n&&(h+=1,n=Math.pow(2,h));var d,f=!1;0===h?(d=function(){f||(l._mapModel.update(null,l.get("centerPoint"),r),e(),f=!0)},i({progress:function(e){t(e.progress.scale)},complete:d,stop:d})):n!==o?(d=function(){f||(l.zoomBy(h,s,!1),e(),f=!0)},i({progress:function(e){t(e.progress.scale)},complete:d,stop:d})):(this.zoomBy(h,s,!1),e())}},isZooming:function(){return!!this._asyncEventsModel&&this._asyncEventsModel.isZooming()},changeScale:function(t){this._asyncEventsModel&&(this._startScale=0,this._onChangeZoomingBy(t),this._onEndZoomingBy())},isTranRunning:function(t){var e=this._trans;if(t){var i=e[t]||null;return!!i&&i.isRunning()}var n=!1;for(var o in e)if(e.hasOwnProperty(o)&&e[o]&&e[o].isRunning()){n=!0;break}return n},stopTransition:function(){x.forEach(this._trans,function(t){t&&t.stop()})},stopEasing:function(){this.stopTransition(),this.stopKineticPan()},__isFar:function(t){var e=this.get("mapSystemProjection"),i=e.fromPointToOffset(this.get("centerPoint")),n=e.fromCoordToOffset(t).sub(i),o=this.get("size").clone().mul(5,5);return n.x=Math.abs(n.x),n.y=Math.abs(n.y),n.x>o.width||n.y>o.height},panTo:function(t,e){if(!this.get("center").equals(t)){var i=this.get("mapSystemProjection"),n=this._trans.panto,o=i.fromPointToOffset(this.get("centerPoint")),r=i.fromCoordToOffset(t),s=this;if(this.stopTransition(),this.__isFar(t))return this._mapModel.setCenter(t),e.complete&&e.complete(),void s.triggerIdle();he.trigger(this,"panning"),n||(n=new x.Transition({easing:"easeOutCubic"}),this._trans.panto=n);var a=o.clone().round();n.clearListeners(),n.addListener({progress:function(t){var i=ee(t.progress.x,t.progress.y);i.sub(a).round(),s.set("instantTiling",!0),s.panBy(i),a.add(i),e.progress&&e.progress(t)},complete:function(){s._mapModel.setCenter(t),s.set("instantTiling",!1),e.complete&&e.complete(),s.triggerIdle()}}),n.run({x:o.x,y:o.y},{x:r.x,y:r.y},e||{})}},panToBounds:function(t,e,i){var n=this._mapModel.getFitZoomAndCenter(t);if(i){var o=this._mapModel.calcBoundsBy(n.centerPoint,n.zoom),r=this._mapModel.getBoundsWithMargin(t,i,n.zoom);for(n.center=r.getCenter(),n.centerPoint=this.get("mapSystemProjection").fromCoordToPoint(n.center);!1===o.hasBounds(r)&&(n.zoom-=1,o=this._mapModel.calcBoundsBy(n.centerPoint,n.zoom),!(n.zoom<=this.get("mapTypeMinZoom")||o.hasBounds(r))););}this.morph(n.center,n.zoom,e)},morph:function(t,i,n){n=n||{};var o,r=this.get("zoom"),s={duration:500,easing:"easeOutCubic"};if(x.hasValue(i)&&(i=this._mapModel.getValidZoom(i-r)),o=i-r,i===e||0===o)return this.panTo(t,Qt(s,n));var a=this.get("mapSystemProjection"),h=Math.pow(2,o)-1,l=this.get("centerPoint").clone(),c=a.fromCoordToPoint(t),u=l.sub(c).div(h,h),p=c.clone().sub(u),d=a.fromPointToOffset(p);h<1&&(s.easing="eastInCubic"),this.zoomBy(o,d,Qt(s,n))},kineticPan:function(t,e){if(!t||!e)return this.stopKineticPan();var i=this._trans.kinetic;if(i){var n=ee(t.x-e.x,t.y-e.y),o=parseInt(Math.sqrt(n.x*n.x+n.y*n.y),10),r=x.nearRange(12*o,500,800),s=e.clone(),a=this;n.mul(5,5),n.x=x.nearRange(n.x,-500,500),n.y=x.nearRange(n.y,-500,500),s.sub(n),this.stopKineticPan(),this.stopTransition(),i.addListener({progress:function(t){var i=ee(t.progress.x,t.progress.y);a.panBy(e.clone().sub(i)),e=i.clone()},complete:function(){a.triggerIdle()}}),i.run({x:e.x,y:e.y},{x:s.x,y:s.y},{duration:r})}},stopKineticPan:function(){var t=this._trans.kinetic;t&&(t.isRunning()&&(t.stop(),this.triggerIdle()),t.clearListeners())},disableKineticPan_changed:function(t){this.stopKineticPan(),!1===t?this._trans.kinetic||(this._trans.kinetic=new x.Transition({easing:"easeOutCubic"})):this._trans.kinetic&&(this._trans.kinetic=null,delete this._trans.kinetic)},setZoom:function(t,e){t=Math.round(t);var i=this.get("zoom"),n=this._mapModel.getValidDeltaZoom(t-i);if((t=i+n)===i||!this._mapModel.isValidZoom(t))return!1;if(e){var o=this._getZoomOrigin()||this._eventOrigin_px;o||(o=this._mapModel.getCenterPixel(),this._eventOrigin_px=o);var r=this;he.once(r,"zoomend",function(){r._eventOrigin_px=null,delete r._eventOrigin_px}),this.zoomBy(n,o,e)}else{this.set("instantTiling",!0);var s=this._getZoomOrigin()||this._mapModel.getCenterPixel();this.zoomBy(n,s,!1)}return!0},mapTypeMinZoom_changed:function(){if(this._mapModel){var t=this._mapModel.getFittableMinZoom();!1!==t&&this.setZoom(t,!0)}},mapTypeMaxZoom_changed:function(){if(this._mapModel){var t=this._mapModel.getFittableMaxZoom();!1!==t&&this.setZoom(t,!0)}},_onBeginDispatch:function(t){this._listeningEvents[t]=!0,($t.mobile&&"tap"===t||"click"===t)&&(this._listeningEvents.tap=!0,this._listeningEvents.click=!0)},_onStopDispatch:function(t){this._listeningEvents[t]=null,delete this._listeningEvents[t],($t.mobile&&"tap"===t||"click"===t)&&(this._listeningEvents.tap=null,delete this._listeningEvents.tap,this._listeningEvents.click=null,delete this._listeningEvents.click)},listenView:function(t){var e=this,i=Jt(e.handleEvent,e),n=function(n,o){return he.addListener(t,n,o?Jt(o,e):i)};t.listen(),e._viewListeners=[n("click",e._onClick),n("rightclick",e._onRightClick),n("mousedown",e._onDown),n("mousemove"),n("mouseup",e._onUp),n("dblclick",e._onDblClick),n("mouseover",e._onOver),n("mouseout",e._onOut),n("dragready",e._onDragReady),n("drag",e._onDrag),n("dragend",e._onDragEnd),n("mousewheel",e._onWheel),n("keydown"),n("keytransition",e._onKeyTransition),n("keytransitionend",e._onKeyTransitionEnd),n("keyup"),n("touchstart"),n("touchmove"),n("touchend"),n("pinchstart",e._onPinchStart),n("pinch",e._onPinch),n("pinchend",e._onPinchEnd),n("twofingertap",e._onTwoFingerTap),n("doubletap",e._onDoubleTap),n("longtap",e._onLongTap),n("tiltstart",e._onTiltStart),n("tilt",e._onTilt),n("tiltend",e._onTiltEnd)]},unlistenView:function(){he.removeListener(this._viewListeners)},_onDown:function(t){this._mapView.toggleHand("closed"),this.handleEvent(t,"mousedown")},_onUp:function(t){this._mapView.toggleHand("open"),this.handleEvent(t,"mouseup")},_onClick:function(t){this.handleEvent(t,"click")},_onRightClick:function(t){this.handleEvent(t,"rightclick")},_initDrag:function(){this._down=null,this._curPoint=null,this._prevPoint=null,this._isMapDragging=null},_firePanning:function(t,e){var i=ee(0,0),n=this._curPoint?this._curPoint:this._startPoint;i.x=n.x-t.x,i.y=n.y-t.y,this._curPoint=t,this.panBy(i,e)},_onDragReady:function(t){if(t.which!==ae.MOUSE_RBUTTON&&!this._prevPinch&&!this.isTranRunning("pinch")){this.kineticPan(null);var e=t.pos();this._down&&this._initDrag(),this._startPoint=ee(e.pageX,e.pageY),this._prevPoint=[this._startPoint],this._down=!0}},_onDrag:function(t){if(this._down){var e=t.pos(),i=ee(e.pageX,e.pageY);if(!this._isMapDragging){if(x.Math.distance(this._startPoint,i)<4)return;this._isMapDragging=!0,this.handleEvent(t,"dragstart")}2===this._prevPoint.length&&this._prevPoint.shift(),this._prevPoint.push(this._curPoint),this._firePanning(i,!!$t.mobile),this.handleEvent(t,"drag")}},_onDragEnd:function(t){if(this._down){var e,i,n=t.pos(),o=ee(n.pageX,n.pageY);0===t.type.indexOf("touch")&&0===o.x&&0===o.y?(o=this._prevPoint.pop()||this._startPoint,e=this._prevPoint.pop()||this._startPoint):e=this._prevPoint.pop(),i=e?e.clone().sub(o):ee(0,0),this._isMapDragging&&(-1===t.type.indexOf("touch")&&this._mapView.toggleHand("open"),this.get("disableKineticPan")||0===i.x&&0===i.y?(this._firePanning(o,!!$t.mobile),$t.mobile&&this._mapModel.update(null,this.get("centerPoint"),null),this.handleEvent(t,"dragend"),this.triggerIdle()):(this.handleEvent(t,"dragend"),this.kineticPan(e.clone(),o.clone()))),this._initDrag()}},_getZoomOriginByPoint:function(t){var e=t.clone(),i=this._mapView.getContainerDivOffset(),n=se.getOffset(this._mapView.getElement());return e.sub(i).sub(n),e},_getZoomOriginByOption:function(){var t=this.get("zoomOrigin");return t&&this.get("bounds").hasPoint(t)?this.get("mapSystemProjection").fromCoordToOffset(t):null},_getZoomOrigin:function(t){return this._getZoomOriginByOption()||(t?this._getZoomOriginByPoint(ee(t.pageX,t.pageY)):null)},_onDblClick:function(t){if(this.handleEvent(t,"dblclick"),!this.get("disableDoubleClickZoom")){var e=this._getZoomOrigin(t);this.zoomBy(1,e,!0)}},_onOver:function(t){if(this._isMapDragging)return void(this._overMap||(this._overMap=!0,this.handleEvent(t,"mouseover")));this._overMap=!0,this.handleEvent(t,"mouseover")},_onOut:function(t){this._overMap=!1,this.handleEvent(t,"mouseout")},_onWheel:function(t){if(this.handleEvent(t,"mousewheel"),!this.get("scrollWheel")||ae.isTouchStarted())return!1;t.stop();var e=x.now(),i=null!==this._wheelTime&&e-this._wheelTime<100,n="wheelDeltaY"in t?t.wheelDeltaY:"wheelDelta"in t?t.wheelDelta:null,o=null!==n&&Math.abs(n)<=6;if(!i&&!o){this._wheelTime=e;var r=ae.getWheelDelta(t).deltaY>0?1:-1,s=this._getZoomOrigin(t);this.zoomBy(r,s,!0)}},_onKeyTransition:function(t){this.panBy(t)},_onKeyTransitionEnd:function(){this.triggerIdle()},_onPinchStart:function(t){this._prevPinch=t.center,this.zoomingBy("start"),this.handleEvent(t,"pinchstart")},_onPinch:function(t){this._prevPinch&&(this.zoomingBy("change",t.scale,t.center),this.handleEvent(t,"pinch"),this._prevPinch=t.center)},_onPinchEnd:function(t){this._prevPinch&&(this.zoomingBy("end"),this.handleEvent(t,"pinchend"),this._prevPinch=null)},_onTiltStart:function(t){this._tiltCenter=t.center.clone(),this.handleEvent(t,"tiltstart")},_onTilt:function(t){this._tiltCenter&&t.center&&(this._tiltCenter=t.center.clone(),this.handleEvent(t,"tilt"))},_onTiltEnd:function(t){this._tiltCenter=null,delete this._tiltCenter,this.handleEvent(t,"tiltend")},_onTap:function(t){this.handleEvent(t,"tap")},_onTwoFingerTap:function(t){if(this.handleEvent(t,"twofingertap"),!this.get("disableTwoFingerTapZoom")){var e=this._getZoomOrigin(t);this.zoomBy(-1,e,!0)}},_onDoubleTap:function(t){if(this.handleEvent(t,"doubletap"),!this.get("disableDoubleTapZoom")){var e=this._getZoomOrigin(t);this.zoomBy(1,e,!0)}},_onLongTap:function(t){this.handleEvent(t,"longtap")},containerTopLeft_changed:function(t){this._zoomEffector&&!0!==this.get("tileszooming")&&se.translate(this._mapView.get("containerDiv"),t.clone().round())},destroy:function(){this.trigger("willDestroy",this),this.unlistenView(),this.unbindAll(),he.clearInstanceListeners(this)},reset:function(){this._eventOrigin_px=null},_getBufferedBounds:function(t,e){var i=t.minX(),n=t.minY(),o=t.maxX(),r=t.maxY();return oe(ne(n-e,i-e),ne(r+e,o+e))}}),x.TileIndexArray=function(t){this._halfSize=x.Size(0,0),this._forwards=[],this.set("startXIndex",0),this.set("startYIndex",0),this.set("startX_px",0),this.set("startY_px",0),this.set("indexes",new x.KVOArray),this._forwardEvents(this.get("indexes")),this.bindTo(["mapSystemProjection","centerPoint","__linearCenterPoint","containerTopLeft","size","tileSize","isTilingSystemChanged","zoom","scale","tileSpare","padding"],t),this._size=this.get("size"),this._zoom=this.get("zoom"),this._inited=!0,this.build()},te(x.TileIndexArray,x.KVO,{BASE_FOR_EXTRA_TILE:.5,_tileSize:null,_baseForExtraTile_px:null,_oldRange:null,_forwardEvents:function(t){this._clearEvents(),this._forwards=[he.forward(t,"insert_at",this),he.forward(t,"set_at",this),he.forward(t,"remove_at",this)]},_clearEvents:function(){he.removeListener(this._forwards),this._forwards.length=0,this._forwards=[]},getRotatedIndexes:function(){for(var t=[],e=this.get("indexes").getLength(),i=0,n=[];i<e;i++)t.push(i);for(;e;){var o=t.splice(Math.min(Math.floor(e/2),e-1),1)[0];n.push(o),e--}return n},_rotateFire:function(t){for(var e=this.getRotatedIndexes(),i=0,n=e.length;i<n;i++)he.trigger(this,"insert_at",e[i],t.getAt(e[i]));this._forwardEvents(t)},tileSize_changed:function(t){this._tileSize=t,this._baseForExtraTile_px=new x.Point(parseInt(t.width*this.BASE_FOR_EXTRA_TILE,10),parseInt(t.height*this.BASE_FOR_EXTRA_TILE,10)).round()},size_changed:function(t){this._halfSize=t.clone().mul(.5,.5)},tileSpare_changed:function(){this.update()},build:function(){if(this._inited){var t=this.get("indexes"),e=this.getIndexesRange(this.get("centerPoint"),this.get("zoom"));he.trigger(this,"cleared",e),t.clear(),this.set("startXIndex",e.startXIndex),this.set("startYIndex",e.startYIndex),this.set("endXIndex",e.endXIndex),this.set("endYIndex",e.endYIndex),this.set("startX_px",e.startX_px),this.set("startY_px",e.startY_px),this._clearEvents();for(var i=e.startXIndex;i<=e.endXIndex;i++)for(var n=e.startYIndex;n<=e.endYIndex;n++)t.push({xIndex:i,yIndex:n});this._rotateFire(t),this._oldRange=e,this._basePx=new ee(e.startX_px,e.startY_px),he.trigger(this,"built",e)}},refresh:function(){he.trigger(this,"refresh",range)},update:function(t){if(this._inited){var e=this.get("indexes"),i=this.getIndexesRange(this.get("__linearCenterPoint"),this.get("zoom")),n=this._getDiffOfTiles(this._oldRange,i),o=this._getDiffOfTiles(i,this._oldRange);this._removeHiddenTiles(e,n),this._addShowingTiles(e,o),t||o.length===e.getLength()?(this._basePx.x=i.startX_px,this._basePx.y=i.startY_px):this._interpolate(i),this.set("startXIndex",i.startXIndex),this.set("startYIndex",i.startYIndex),this.set("endXIndex",i.endXIndex),this.set("endYIndex",i.endYIndex),this.set("startX_px",i.startX_px),this.set("startY_px",i.startY_px),this._oldRange=i,he.trigger(this,"updated",i),t&&he.trigger(this,"resized",i)}},_interpolate:function(t){var e=this._oldRange,i=this._basePx;if(e&&i){var n=this._tileSize,o=n.width,r=n.height,s=ee(t.startX_px,t.startY_px),a=s.clone().sub(i);a.clone();return a.x=a.x%o,(a.y=a.y%r,a.equals(ee(0,0)))?t:(a.x>0?a.x>o/2&&(a.x=-1*(o-a.x)):-a.x>o/2&&(a.x=1*(o+a.x)),a.y>0?a.y>r/2&&(a.y=-1*(r-a.y)):-a.y>r/2&&(a.y=1*(r+a.y)),s.sub(a),t.startX_px=s.x,t.startY_px=s.y,this._basePx.x=s.x,this._basePx.y=s.y,t)}},_removeHiddenTiles:function(t,e){if(!(t.getLength()<=0)){var i,n;for(n=e.length-1;n>=0;n--)i=e[n].tileIndex,t.getAt(i)&&t.removeAt(i)}},_addShowingTiles:function(t,e){for(var i,n=0,o=e.length;n<o;n++)i=e[n],t.insertAt(i.tileIndex,i),i.tileIndex=null,delete i.tileIndex},_getDiffOfTiles:function(t,e){var i,n=[],o=t.endYIndex-t.startYIndex+1;if(this._isCoveredByDst(t,e))return n;for(var r=t.startXIndex;r<=t.endXIndex;r++)for(var s=r<e.startXIndex||r>e.endXIndex,a=t.startYIndex;a<=t.endYIndex;a++){var h=a<e.startYIndex||a>e.endYIndex;s||h?(i=(r-t.startXIndex)*o+(a-t.startYIndex),n.push({tileIndex:i,xIndex:r,yIndex:a})):s||a!==e.startYIndex||(a=e.endYIndex)}return n},_isCoveredByDst:function(t,e){return t.startXIndex>=e.startXIndex&&t.startYIndex>=e.startYIndex&&t.endXIndex<=e.endXIndex&&t.endYIndex<=e.endYIndex},getIndexesRange:function(t,e){var i=this.get("mapSystemProjection"),n=this.get("containerTopLeft").clone().round(),o=(this.get("scale"),x.round(this.get("tileSpare"))),r=this._tileSize,s=r.width,a=r.height,h=this._halfSize.width,l=this._halfSize.height,c=x.floor(i.scaleUp(t.x,e)),u=x.floor(i.scaleUp(t.y,e)),p=x.floor(c/s),d=x.floor(u/a),f=h,g=h,_=l,m=l;2*h%2==1&&(f-=.5,g+=.5),2*l%2==1&&(_-=.5,m+=.5);var y=this._getCenterGap(c,"width"),v=this._getCenterGap(u,"height"),T=Math.round(f-y),M=Math.round(g-(s-y)),b=Math.round(_-v),E=Math.round(m-(a-v)),S=Math.max(x.round(o/2),0),P=Math.max(o-S,0),w=this._getEdgeIndex(p,T,-1,"width"),L=this._getEdgeIndex(d,b,-1,"height"),O=this._getEdgeIndex(p,M,1,"width"),C=this._getEdgeIndex(d,E,1,"height"),I={centerXIndex:p,centerYIndex:d,startXIndex:w,startYIndex:L,endXIndex:O,endYIndex:C,cx_px:c,cy_px:u};return 0!==S&&(I.startXIndex-=S,I.startYIndex-=S),0!==P&&(I.endXIndex+=S,I.endYIndex+=S),I.startX_px=x.round((I.startXIndex-p)*s+T-n.x),I.startY_px=x.round((I.startYIndex-d)*a+b-n.y),I},_getCenterGap:function(t,e){return t%=this._tileSize[e],t<0&&(t+=this._tileSize[e]),t},_getEdgeIndex:function(t,e,i,n){var o=this._divideAndCeil(e,this._tileSize[n]),r=this._needsExtraTile(e,o,n),s=r?1:0;return Math.round(t+o*i+s*i)},_divideAndCeil:function(t,e){return t<0?0:Math.ceil(t/e)},_needsExtraTile:function(t,e,i){return e*this._tileSize[i]-t<("width"===i?this._baseForExtraTile_px.x:this._baseForExtraTile_px.y)},forEach:function(t){this.get("indexes").forEach(t)},getAt:function(t){return this.get("indexes").getAt(t)},getLength:function(){return this.get("indexes").getLength()},getArray:function(){return this.get("indexes").getArray()},getRange:function(){return this._oldRange},getTileCount:function(){return{x:Math.abs(this.get("endXIndex")-this.get("startXIndex")),y:Math.abs(this.get("endYIndex")-this.get("startYIndex"))}}}),x.TileIndexPane=function(t,e){this._paneName=t||x.guid(),this._options=Qt({overlayMap:!0},e),this._pool=new x.TilePool,this.set("paneElement",se.createElement("div",ut)),this.set("tileopacity",1),this._options.overlayMap&&this.set("spareElement",se.createElement("div",ut))},te(x.TileIndexPane,x.KVO,{setMap:function(t){var e=!this._options.overlayMap;if(null===t)this._unlistenSwap(),this._unlistenTile(),this._removeAllTiles(),this.unbindAll(),this.get("view").removeTilePane(this),e?this.get("view").removePane(this._paneName):(se.removeElement(this.getElement()),se.removeElement(this.getSpareElement())),this.set("model",null),this.set("action",null),this.set("view",null),this._tileIndexArray=null;else{var i=t.getMapModel(),n=t.getMapView(),o=t.getMapAction();if(2===i.get("renderMode"))return;n.addTilePane(this);var r=i.get("tileIndexArray");this.set("model",i),this.set("action",o),this.set("view",n),this.bindTo(["tileTransition","instantTiling","zoom","tileSize","padding"],i),this.bindTo(["tilePane","zoomPane"],n),this.bindTo("tileszooming",o),this.bindTo(["startXIndex","startYIndex","startX_px","startY_px"],r),this._tileIndexArray=r,this._listenSwap(n),this._initTiles(),e?n.addPane(this._paneName,this.getElement()):se.addElement(this.getElement(),this.get("tilePane"))}},setMapTypeRegistry:function(t){this._mapTypes=t,this.bindTo("selectedMapType",t)},tileSize_changed:function(){},_initTiles:function(){this._pool.init(),this._listenTile(this._tileIndexArray),this._addAllTiles(this._tileIndexArray)},_listenTile:function(t){this._unlistenTile(),this._relationArray=[he.addListener(t,"insert_at",Jt(this._addTileAt,this)),he.addListener(t,"remove_at",Jt(this._removeTileAt,this)),he.addListener(t,"resized",Jt(this._rearrangeTiles,this)),he.addListener(this.get("model"),"refresh",Jt(this.refresh,this))]},_listenSwap:function(t){this._swapRelation=[he.addListener(t,"before_tilepane_swap",Jt(this._beforeTilePaneSwap,this)),he.addListener(t,"tilepane_swapped",Jt(this._onTilePaneSwapped,this))]},_unlistenTile:function(){he.removeListener(this._relationArray),this._relationArray=null},_unlistenSwap:function(){he.removeListener(this._swapRelation),he.removeListener(this._tsL),this._swapRelation=null,this._tsL=null},_getTile:function(t,e,i){var n=this.get("selectedMapType"),o=null;if(!n)return null;var r=this.get("tileopacity");return o=n.getTile(t,e,i),o instanceof x.Tile||(o=new x.Tile(o,{tileIndex:{xIndex:t,yIndex:e},size:this.get("tileSize")})),o.setOpacity(r),o.getTileIndex()||o.setTileIndex({xIndex:t,yIndex:e}),o.addListener("loaded",Jt(this._onLoadTile,this)),o},_getTileOffset:function(t,e){"number"!=typeof t&&"string"!=typeof t&&(e=t.y||t.yIndex||0,t=t.x||t.xIndex||0);var i=this.get("tileSize"),n=(t-this.get("startXIndex"))*i.width+this.get("startX_px"),o=(e-this.get("startYIndex"))*i.height+this.get("startY_px");return ee(n,o)},_addTileAt:function(t,e){var i=e.xIndex,n=e.yIndex,o=this._getTile(i,n,this.get("zoom")),r=this._getTileOffset(i,n);this._pool.add(o),o.load({offset:r,pane:this.get("paneElement"),transition:this.get("tileTransition")&&!this.get("instantTiling")})},_addAllTiles:function(){var t=this,e=t._tileIndexArray,i=e.getRotatedIndexes();t._pool.clearState(),x.forEach(i,function(i){var n=e.getAt(i);t._addTileAt(i,n)})},_rearrangeTiles:function(){var t=this;this._pool.forEach(function(e){var i=e.getTileIndex(),n=t._getTileOffset(i);e.setOffset(n)})},_removeTileAt:function(t,e){this._pool.remove(e)},_removeAllTiles:function(){this._pool.removeAll()},refresh:function(t){t&&this.set("instantTiling",!0);var e=this.get("selectedMapType");e&&this._pool.reset(e,this.get("zoom"),{transition:!t})},_onLoadTile:function(t){var e=t.getTileIndex();this._pool.markAt(e,!0),this._pool.getLoadedCount()===(this._tileIndexArray&&this._tileIndexArray.getLength())&&he.trigger(this,"tilesloaded")},getMinZoom:function(){var t=this.get("selectedMapType");return t?t.minZoom:0},getMaxZoom:function(){var t=this.get("selectedMapType");return t?t.maxZoom:0},getElement:function(){return this.get("paneElement")},getSpareElement:function(){return this.get("spareElement")||null},selectedMapType_changed:function(t){if(this.get("model")){var e=this._mapTypes,i=e.get(e.getPreviousTypeId()),n=!i||!1,o=i?i.constructor:null;n||(n=o!==t.constructor,o===Object&&(n=!0)),n?(this._pool.clearState(),this._removeAllTiles(),this._addAllTiles()):this.refresh(!0),this.get("zoomPane").style.display="none"}},_swapPane:function(){var t,e=this.getSpareElement();e&&(e.parentNode||this.get("tilePane").appendChild(e),t=this.get("paneElement"),e.innerHTML="",this.set("paneElement",e),this.set("spareElement",t))},_beforeTilePaneSwap:function(){this._unlistenTile()},_onTilePaneSwapped:function(){var t=this,e=t._pool,i=t._options.overlayMap;i&&(t._swapPane(),e.swap()),he.removeListener(t._tsL),t._tsL=he.once(t.get("action"),"zoomend",function(){i||e.removeAll(),t._initTiles(),t._tsL=null,delete t._tsL})},getSwapped:function(){return this._pool.getSwapped()},setOpacity:function(t){var e=Math.min(Math.max(t,0),1)||(0===t?0:1);this.set("tileopacity",e)},getOpacity:function(){var t=this.get("tileopacity");return t===e?1:t},tileopacity_changed:function(t){this._pool.forEach(function(e){e.setOpacity(t)})},tileszooming_changed:function(t){t&&this.get("tileTransition")&&!this.get("instantTiling")&&this._pool.forEach(function(t){t.cancelFadeIn()})}}),x.ZoomEffector=function(t,e){var i=this;i.csszoom=$t.browser.csszoom,i._topLeft=null,i._curTopLeft=null,i._origin=null,i._containerDiv=t.get("containerDiv"),i._zoomPane=t.get("zoomPane"),i._tilePane=t.get("tilePane"),i._panes=t.get("panes"),i._overlayPane=t.get("overlayPane"),i.listen(e),i.set("tileszooming",!1),i._working=!1,i._view=t},te(x.ZoomEffector,x.KVO,{listen:function(t){he.addListener(t,"tilesloaded",Jt(this._onTilesloaded,this)),he.addListener(t,"zoomstart",Jt(this._onZoomStart,this)),he.addListener(t,"zoomend",Jt(this._onZoomEnd,this)),this.bindTo("tileSize",t),this.bindTo("ef_overlay",t),this.bindTo("ef_overlaylayer",t),this.bindTo("ef_overlayimage",t),this.bindTo("ef_floatpane",t)},_onTilesloaded:function(){if(this._working){this.clearPanePosition(),this._zoomPane.style.display="none",this._tilePane.style.display="",this._working=!1;var t=this.get("ef_overlay");t&&this._showPane(t)}},_onZoomStart:function(t){!1===this.get("tileszooming")&&(se.willChange(this._tilePane,"transform"),se.backfaceVisibility(this._tilePane,"hidden"),this._hidePane(this.get("ef_overlay")),this.set("tileszooming",!0)),this.start(t)},_onZoomEnd:function(){if(!1!==this.get("tileszooming")){this.set("tileszooming",!1),this.finish();var t=this.get("ef_overlay");t||this._showPane(t),se.backfaceVisibility(this._zoomPane,"visible"),se.willChange(this._zoomPane,"auto")}},_hidePane:function(t){var e=this;x.forEach(this._panes,function(i,n){t?e.get("ef_"+n.toLowerCase())||se.visible(i,!1):se.visible(i,!1)})},_showPane:function(t){var e=this;x.forEach(this._panes,function(i,n){t?e.get("ef_"+n.toLowerCase())||se.visible(i,!0):se.visible(i,!0)})},clearOverlayPanePosition:function(){if(this.get("ef_overlay")){var t=this._overlayPane;se.transform(t,1,0,0,{x:0,y:0}),se.setOffset(t,0,0)}},isZooming:function(){return this.get("tileszooming")},clearPanePosition:function(){var t=this._zoomPane,e=this._tilePane;se.transform(t,1,0,0,{x:0,y:0}),se.transform(e,1,0,0,{x:0,y:0}),se.setOffset(t,0,0),se.setOffset(e,0,0),this.clearOverlayPanePosition();var i=this._tiles;i&&(x.forEach(i,function(t){t.setOffset(t.offsetSnapShot)}),this._tiles.length=0,this._tiles=[]),he.trigger(this,"clearpaneposition")},_swap:function(){var t=this._view;t.swapTilePane(),this._tilePane=t.get("tilePane"),this._zoomPane=t.get("zoomPane"),this._zoomPane.style.display="",this._tilePane.style.display="none",this._working=!0},start:function(t){this._topLeft=t.get("containerTopLeft_px"),this._origin=t.get("transformOrigin_px"),this._curTopLeft=this._topLeft.clone(),this._swap(),this.csszoom&&this._prepareIEZoom(),this.bindTo("scale",t),this.bindTo("transformOrigin_px",t),this.bindTo("containerTopLeft_px",t)},_prepareIEZoom:function(){var t=[];this._view.getTilePanes().forEach(function(e){var i=e.getSwapped();x.forEach(i,function(e){e.offsetSnapShot=e.getOffset().clone(),t.push(e)})}),this._tiles=t},scale_changed:function(t){1!==t&&(this._curTopLeft=this._topLeft.clone(),this._curScale=t,this._scaleZoomPane(t))},_scaleZoomPane:function(t){var e=this._zoomPane,i=this._overlayPane,n=this._origin.clone()||ee(0,0);if(this.csszoom){var o=this._tiles,r=n.clone().mul(t,t).sub(n).mul(-1,-1),s=this.get("tileSize").clone().mul(t,t).ceil();se.setOffset(e,r),x.forEach(o,function(e){var i=e.offsetSnapShot.clone().mul(t,t).ceil();e.setSize(s),e.setOffset(i)})}else se.setScale(e,t,n,!0),this.get("ef_overlay")&&se.setScale(i,t,n,!0);he.trigger(this,"scale",t)},transformOrigin_px_changed:function(t){this._origin=t},containerTopLeft_px_changed:function(t){this._topLeft=t},_teardown:function(){se.transform(this._containerDiv,1,0,0,{x:0,y:0});var t=this._curTopLeft,e=this._zoomPane,i=this._overlayPane,n=this._curScale;se.isSupportedCSS3Style("transform")||($t.browser.msie||t.div(n,n),t.add(se.getRawOffset(e))),se.setOffset(e,t),this.get("ef_overlay")&&se.setOffset(i,t),this._tilePane.style.display=""},finish:function(){this.unbind(["scale","transformOrigin_px","containerTopLeft_px"]),this._teardown(),this._topLeft=null,this._origin=null,this._curTopLeft=null,this._curScale=1},tileszooming_changed:function(t){t&&this.clearPanePosition()}}),x.MapPicker=function(t){this.CACHE_SIZE=256,this.LAYER_PRIORITY=["PANORAMA","TRANSIT","POI"],this._map=t,this._cache={},this._cacheOrders=[],this._features=[],this._tree=new x.RBush,this._listen(),this._update()},x.MapPicker.prototype={destroy:function(){this._unlisten(),this._cache={},this._cacheOrders=[],this._features=[],this._tree.clear(),this._tree=null},queryFeatures:function(t){var e=this._tree,i=this.LAYER_PRIORITY,n=this._features,o=e.search({minX:t.x,minY:t.y,maxX:t.x,maxY:t.y})||[];if(0===o.length)return[];for(var r=[],s=[],a=0,h=o.length;a<h;a++)for(var l=0,c=n.length;l<c;l++)s.indexOf(n[l].properties.id)>-1||o[a].id===n[l].properties.id&&(s.push(o[a].id),r.push(n[l]));return r.sort(function(t,e){return i.indexOf(t.source)-i.indexOf(e.source)})},_listen:function(){var t=this._map;this._listeners=[he.addListener(t,"idle",Jt(this._update,this)),he.addListener(t,"mapType_changed",Jt(this._refresh,this)),he.addListener(t,"addLayer",Jt(this._refresh,this)),he.addListener(t,"removeLayer",Jt(this._refresh,this))]},_unlisten:function(){he.removeListener(this._listeners),this._listeners=[]},_refresh:function(){this._cache={},this._cacheOrders=[],this._update()},_update:function(){var t=this,e=t._map,i=e.mapTypes,n=e.getMapTypeId(),o=e.getMapModel(),r=o.get("zoom"),s=o.get("tileIndexArray").get("indexes"),a=i.getSelectedType(),h=a.getOptions(),l=[],c=h.tileType||"basic",u=h.tileSet&&h.tileSet[0],p=h.overlayType?h.overlayType.split("."):[],d=x.NaverStyleMapTypeOptions.getVersions(),f=d[c];s.forEach(function(e){var i=t._toPickerTileUrl(u,e.xIndex,e.yIndex,r,c,n,f,p);i&&l.push(i)});var g=[],_=t._cache,m=t.CACHE_SIZE;cacheOrders=t._cacheOrders,x.asyncAll(l,function(t,e){if(_[t])return void e(null,_[t]);x.ajax({url:t,type:"json"},function(i,n){if(i)return e(i);if(_[t]=n,cacheOrders.push(t),cacheOrders.length>m){var o=cacheOrders.shift();delete _[o]}e(null,n)})},function(e,i){if(!e){var n=[],o=[];t._tree.clear();for(var r=0,s=i.length;r<s;r++)Array.prototype.push.apply(g,i[r].features);for(var a=0,h=g.length;a<h;a++){var l=g[a];if(l.boundary&&l.properties.id&&!(o.indexOf(l.properties.id)>-1)){for(var c=0,u=l.boundary.length;c<u;c++){var p=l.boundary[c].bbox,d=l.properties.id;n.push({id:d,minX:p[0],minY:p[1],maxX:p[2],maxY:p[3]})}o.push(l.properties.id)}}t._tree.load(n),t._features=g}})},_toPickerTileUrl:function(t,e,i,n,o,r,s,a){var h,l,c,u;if(t)u=t.match(/[?&]mt=([^&]+)/),h=x.TILE_URL_SCHEME_REPLACER(t,{x:e,y:i,z:n},{}),h=h.replace(/\/styles\//g,"/picker/"),h=h.replace(/\@2x/g,""),h=h.replace(/\.png/g,".json"),u&&u[1]&&(l=this._filterSubTypes(r,u[1].split("."),!0),c=l.join("."),h=h.replace(/([?&]mt=)[^&#]*/,"$1"+c));else{if(!(l=this._filterSubTypes(r,a,!1))||0===l.length)return null;c=l.join("."),h=this._getLocation(),h+="/"+o+"/"+s,h+="/"+n+"/"+e+"/"+i+".json",h+="?mt="+l.join(".")}return h+"&crs=EPSG:4326"},_getLocation:function(){return et?"https://map.pstatic.net/nrb/picker":"http://nrb.map.naver.net/picker"},_filterSubTypes:function(t,e,i){var n=["lko","len","lzh","lja"],o=["bs","pr"].concat(n);if(i)return e.filter(function(t){return o.indexOf(t)>-1});for(var r,s=this._map,a=s.layers,h=0,l=e.length;h<l;h++)if(n.indexOf(e[h])>-1){r=e[h];break}return"satellite"===t||a.cadastral?[]:[r]}};var ce=function(){};ce.prototype={constructor:ce,fromCoordToPoint:function(t){var e,i;return t instanceof ne?(e=t.lng(),i=t.lat()):(e=t.x,i=t.y),ee(e,i)},fromPointToCoord:function(t){var e=t.x,i=t.y;return ee(e,i)}},x.EmptyProjection=new ce,function(){var t=x.Math.fromRadiansToDegrees,e=x.Math.fromDegreesToRadians,i=1/(4*Math.PI),n=-1/(2*Math.PI),o=function(){};te(o,ce,{name:"EPSG:3857",fromCoordToPoint:function(t){return this.fromLatLngToPoint(t)},fromLatLngToPoint:function(t){var n,o,r=t.y,s=t.x;return t instanceof ne&&(r=t.lat(),s=t.lng()),n=s*(1/360)+.5,r>=85.051128?o=0:r<=-85.051128?o=1:(o=Math.sin(e(r)),o=.5-Math.log((1+o)/(1-o))*i),ee(n,o)},fromPointToCoord:function(t){return this.fromPointToLatLng(t)},fromPointToLatLng:function(e){var i=e.x,o=e.y;return i=360*(i-.5),o=2*Math.atan(Math.exp((o-.5)/n)),o=t(o-Math.PI/2),x.LatLng(parseFloat(o.toFixed(7)),parseFloat(i.toFixed(7)))},fromCoordToLatLng:function(t){return t.clone()},fromLatLngToCoord:function(t){return t.clone()},getDistance:function(t,e){var i=x.Math.radianPerDegree,n=t.y,o=e.y,r=t.x,s=e.x,a=(o-n)*i,h=(s-r)*i,l=Math.sin(a/2)*Math.sin(a/2)+Math.cos(n*i)*Math.cos(o*i)*Math.sin(h/2)*Math.sin(h/2);return 2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l))*6378137},getDestinationCoord:function(t,e,i){return new ne(t.y,t.x).destinationPoint(e,i)}}),x.EPSG3857Projection=o,x.EPSG3857=new o}(),x.MapSystemProjection=function(t){this.bindTo(["projection","zoom","tileSize","mapTypeMinZoom","projectionTopLeft","containerTopLeft","repeatX"],t)},te(x.MapSystemProjection,x.KVO,{factor:function(t){var e=this.get("projection").minZoom||0;return Math.pow(2,t-e)},scaleUp:function(t,e){var i=this.factor(e);return t instanceof ee||t instanceof re?t.mul(i,i):t*i},scaleDown:function(t,e){var i=this.factor(e);return t instanceof ee||t instanceof re?t.div(i,i):t/i},fromCoordToPoint:function(t){var e=this.get("projection"),i=this.get("tileSize"),n=e.fromCoordToPoint(t);return e!==x.EmptyProjection&&n.mul(i.width,i.height),this._interpolate(n)},fromPointToCoord:function(t){var e=this.get("projection"),i=this.get("tileSize"),n=t.clone();return e!==x.EmptyProjection&&n.div(i.width,i.height),e.fromPointToCoord(n)},fromCoordToOffset:function(t){var e=this.fromCoordToPoint(t);return this.fromPointToOffset(e)},fromPointToOffset:function(t){var e=(this.get("tileSize"),t.clone());return e.sub(this.get("projectionTopLeft")),this.scaleUp(e,this.get("zoom")),e.sub(this.get("containerTopLeft")),e},fromOffsetToCoord:function(t){var e=this.fromOffsetToPoint(t);return this.fromPointToCoord(e)},fromOffsetToPoint:function(t){var e=t.clone();return e.add(this.get("containerTopLeft")),this.scaleDown(e,this.get("zoom")),e.add(this.get("projectionTopLeft")),this._interpolate(e)},fromCoordToPixelPoint:function(t){var e=this.get("zoom"),i=this.fromCoordToPoint(t),n=i.clone();return this.scaleUp(n,e),n},getDistance:function(t,e){var i=this.get("projection");return i.getDistance?i.getDistance(t,e):0},getDestinationCoord:function(t,e,i){var n=this.get("projection");return n.getDestinationCoord?n.getDestinationCoord(t,e,i):null},getProjectionName:function(){return this.get("projection").name||"unknown"},_interpolate:function(t){var e=t.clone(),i=this.get("tileSize"),n=i.width,o=i.height,r=this.get("tileExtra")||0,s=n+n*r,a=o+o*r;return this.get("repeatX")?(e.x>s?e.x=e.x%s:e.x<0&&(e.x=s+e.x%s),e.y>a?e.y=e.y%a:e.y<0&&(e.y=a+e.y%a)):(e.x=Math.min(Math.max(e.x,0),s),e.y=Math.min(Math.max(e.y,0),s)),e}}),function(){function t(t,e,i,n,o){return t*o-e*Math.sin(2*o)+i*Math.sin(4*o)-n*Math.sin(6*o)}function e(t){return t<0?-1:1}function i(t){return Math.abs(t)<r?t:t-e(t)*s}var n=x.Math.fromRadiansToDegrees,o=x.Math.fromDegreesToRadians,r=3.141592653589793,s=6.283185307179586,a={name:"UTMK",datum:"GRS80",lat0:38,lng0:127.5,a:6378137,b:6356752.314140356,falseNorthing:2e6,falseEasting:1e6,scaleFactor:.9996,minX:340901120,maxX:359494656,minY:141928960,maxY:157454848,TILE_SIZE:256,BASE_X:90112,BASE_Y:668608,POINT_UNIT_PER_METER:8192};a.lat0=o(a.lat0),a.lng0=o(a.lng0),a.a2=a.a*a.a,a.b2=a.b*a.b,a.es=(a.a2-a.b2)/a.a2,a.e=Math.sqrt(a.es),a.ep2=(a.a2-a.b2)/a.b2,a.e0=function(t){return 1-.25*t*(1+t/16*(3+1.25*t))}(a.es),a.e1=function(t){return.375*t*(1+.25*t*(1+.46875*t))}(a.es),a.e2=function(t){return.05859375*t*t*(1+.75*t)}(a.es),a.e3=function(t){return t*t*t*(35/3072)}(a.es),a.ml0=a.a*t(a.e0,a.e1,a.e2,a.e3,a.lat0);var h=function(){};te(h,ce,{name:"UTMK",minZoom:-1,fromCoordToUTMK:function(t){return this.fromLatLngToUTMK(t)},fromLatLngToUTMK:function(t){return this._fromCoordToPlane("LATLNG_TO_UTMK",t)},fromUTMKToPoint:function(t){return this._fromCoordToPlane("UTMK_TO_POINT",t)},fromCoordToPoint:function(t){return this.fromLatLngToPoint(t)},fromLatLngToPoint:function(t){return this._fromCoordToPlane("LATLNG_TO_POINT",t)},fromPointToUTMK:function(t){return this._fromPlaneToCoord("POINT_TO_UTMK",t)},fromUTMKToCoord:function(t){return this.fromUTMKToLatLng(t)},fromUTMKToLatLng:function(t){return this._fromPlaneToCoord("UTMK_TO_LATLNG",t)},fromPointToCoord:function(t){return this.fromPointToLatLng(t)},fromPointToLatLng:function(t){return this._fromPlaneToCoord("POINT_TO_LATLNG",t)},fromLatLngToCoord:function(t){return t.clone()},fromCoordToLatLng:function(t){return t.clone()},pointPerMeter:a.POINT_UNIT_PER_METER,getDistance:function(t,e){var i=this.fromCoordToPoint(t),n=this.fromCoordToPoint(e);return x.Math.distance(i,n)*a.POINT_UNIT_PER_METER*a.TILE_SIZE},getDestinationCoord:function(t,e,i){var n=(e||0)-90,o=this.fromCoordToPoint(t),r=i/(a.POINT_UNIT_PER_METER*a.TILE_SIZE),s=n*x.Math.radianPerDegree,h=o.clone();return h.add(r*Math.cos(s),r*Math.sin(s)),this.fromPointToCoord(h)},_fromCoordToPlane:function(e,n){var r,s;if("UTMK_TO_POINT"!==e){r=o(n.x),s=o(n.y);var h=i(r-a.lng0),l=Math.sin(s),c=Math.cos(s),u=c*h,p=Math.pow(u,2),d=a.ep2*Math.pow(c,2),f=Math.tan(s),g=Math.pow(f,2),_=1-a.es*Math.pow(l,2),m=a.a/Math.sqrt(_),y=a.a*t(a.e0,a.e1,a.e2,a.e3,s);r=a.scaleFactor*m*u*(1+p/6*(1-g+d+p/20*(5-18*g+Math.pow(g,2)+72*d-58*a.ep2)))+a.falseEasting,s=a.scaleFactor*(y-a.ml0+m*f*(p*(.5+p/24*(5-g+9*d+4*Math.pow(d,2)+p/30*(61-58*g+Math.pow(g,2)+600*d-330*a.ep2)))))+a.falseNorthing,r=parseFloat(r),s=parseFloat(s)}return"LATLNG_TO_UTMK"===e?ee(parseFloat(r.toFixed(1)),parseFloat(s.toFixed(1))):("UTMK_TO_POINT"===e&&(r=arguments[1].x,s=arguments[1].y),r=(r-a.BASE_X)/a.POINT_UNIT_PER_METER,s=1.25*a.TILE_SIZE-(s-a.BASE_Y)/a.POINT_UNIT_PER_METER,r/=a.TILE_SIZE,s/=a.TILE_SIZE,ee(r,s))},_fromPlaneToCoord:function(t,o){var r,s;if("UTMK_TO_LATLNG"!==t?(r=o.x*a.TILE_SIZE,s=o.y*a.TILE_SIZE):(r=o.x,s=o.y),"UTMK_TO_LATLNG"!==t&&(r=r*a.POINT_UNIT_PER_METER+a.BASE_X,s=(1.25*a.TILE_SIZE-s)*a.POINT_UNIT_PER_METER+a.BASE_Y),"POINT_TO_UTMK"===t)return ee(parseFloat(r.toFixed(1)),parseFloat(s.toFixed(1)));"UTMK_TO_LATLNG"===t&&(r=r,s=s);var h,l,c,u;for(r-=a.falseEasting,s-=a.falseNorthing,h=(a.ml0+s/a.scaleFactor)/a.a,l=h,u=0;c=(h+a.e1*Math.sin(2*l)-a.e2*Math.sin(4*l)+a.e3*Math.sin(6*l))/a.e0-l,l+=c,!(Math.abs(c)<=1e-10);u++)if(u>=6)return!1;if(Math.abs(l)<1.5707963267948966){var p=Math.sin(l),d=Math.cos(l),f=Math.tan(l),g=a.ep2*Math.pow(d,2),_=Math.pow(g,2),m=Math.pow(f,2),y=Math.pow(m,2);h=1-a.es*Math.pow(p,2);var v=a.a/Math.sqrt(h),T=v*(1-a.es)/h,M=r/(v*a.scaleFactor),b=Math.pow(M,2);r=i(a.lng0+M*(1-b/6*(1+2*m+g-b/20*(5-2*g+28*m-3*_+8*a.ep2+24*y)))/d),s=l-v*f*b/T*(.5-b/24*(5+3*m+10*g-4*_-9*a.ep2-b/30*(61+90*m+298*g+45*y-252*a.ep2-3*_)))}else r=a.lng0,s=1.5707963267948966*e(s);return r=n(r),s=n(s),r=parseFloat(r.toFixed(7)),s=parseFloat(s.toFixed(7)),x.LatLng(s,r)}}),x.UTMKProjection=h,x.UTMK=new h}(),function(){var t=function(){};te(t,x.UTMKProjection,{name:"UTMK_NAVER",fromCoordToNaver:function(t){return this.fromLatLngToNaver(t)},fromLatLngToNaver:function(t){var e=this._fromCoordToPlane("LATLNG_TO_UTMK",t);return this.fromUTMKToNaver(e)},fromUTMKToNaver:function(t){var e=parseInt(10*t.x+34e7,10),i=parseInt(10*t.y+13e7,10);return ee(e,i)},fromNaverToPoint:function(t){var e=this.fromNaverToUTMK(t);return this.fromUTMKToPoint(e)},fromPointToNaver:function(t){var e=this.fromPointToUTMK(t);return this.fromUTMKToNaver(e)},fromNaverToUTMK:function(t){var e=parseFloat((t.x-34e7)/10),i=parseFloat((t.y-13e7)/10);return ee(e,i)},fromNaverToCoord:function(t){return this.fromNaverToLatLng(t)},fromNaverToLatLng:function(t){var e=this.fromNaverToUTMK(t);return this.fromUTMKToCoord(e)}}),x.UTMK_NAVERProjection=t,x.UTMK_NAVER=new t}(),x.MapTypeRegistry=function(t,i){this._typeIds=[],this._typeId=null,this._prevId=null,this.setValues(t),i!==e&&this.setSelectedTypeId(i)},te(x.MapTypeRegistry,x.KVO,{set:function(t,e){if("selectedPaneType"!==t&&"selectedMapType"!==t){var i=this.get(t),n=x.getIndexOfElement(this._typeIds,t);x.KVO.prototype.set.apply(this,arguments),n>-1&&this._typeIds.splice(n,1),null!==e?(this._typeIds.push(t),he.trigger(this,"add_paneType",t,e),he.trigger(this,"addMapType",t,e)):i&&(he.trigger(this,"remove_paneType",t,i),he.trigger(this,"removeMapType",t,i))}},setSelectedTypeId:function(t){this._prevId=this._typeId,this._typeId=t,x.KVO.prototype.set.apply(this,["selectedMapType",this.get(t)]),x.KVO.prototype.set.apply(this,["selectedPaneType",this.get(t)])},getSelectedTypeId:function(){return this._typeId},getPreviousTypeId:function(){return this._prevId},getSelectedType:function(){return this.get("selectedMapType")},getTypeIds:function(){return this._typeIds.slice(0)}}),x.Tile=function(t,e){var i=Qt({opacity:1,transition:!0,zIndex:0,duration:se.css3Styles.transition?300:600},e||{});this._prepareDOM(),t&&this._el.appendChild(t),this.setValues(i)},te(x.Tile,x.KVO,{_prepareDOM:function(){var t=se.createElement("div",ct+ft+dt);t.setAttribute("draggable",!1),t.setAttribute("unselectable","on"),!$t.mobile&&$t.browser.safari&&(t.style.pointerEvents="none"),$t.usingGPU&&$t.restrictiveGPU&&se.addElement(se.createDummyForRestrictiveGPU(),t),$t.usingGPU&&se.forceGPU(t),this._el=t},appendTo:function(t){this._el.parentNode!==t&&se.addElement(this._el,t)},getElement:function(){return this._el},getElements:function(){return[this._el]},show:function(){this._el&&(this._el.style.display="")},hide:function(){this._el&&(this._el.style.display="none")},fadeIn:function(){return function(t,e){var i=this._el,n=this.getDuration(),o=this.getOpacity();se.setOpacity(i,e||0),se.animate(i,{opacity:o},{duration:n,easing:"easeOutCubic",complete:function(){t&&t()}})}}(),cancelFadeIn:function(){se.stop(this._el,{opacity:this.getOpacity()})},load:function(t,e){var i=Qt({},t);this.getOffset()||i.offset||(i.offset=ee(0,0)),this.setValues(i),this.show(),e&&e(),this.get("transition")?this.fadeIn(Jt(this._triggerLoaded,this)):this._triggerLoaded()},reset:function(t,e,i){t instanceof x.AbstractMapType&&!(arguments.length<2)&&this.load(i)},setBlank:function(){this.hide()},remove:function(){se.removeElement(this._el)},destroy:function(){this.remove(),this._el=null},setDuration:function(t){t!==this.getDuration()&&this.set("duration",t)},getDuration:function(){return this.get("duration")},setOffset:function(t,e){var i=t instanceof ee?t.clone():ee(t,e);i!==this.getOffset()&&this.set("offset",i)},getOffset:function(){return this.get("offset")},setOpacity:function(t){t!==this.getOpacity()&&this.set("opacity",t)},getOpacity:function(){return this.get("opacity")},setZIndex:function(t){t!==this.getZIndex()&&this.set("zIndex",t)},getZIndex:function(){return this.get("zIndex")},setSize:function(t){this.getSize();this.set("size",t)},getSize:function(){return this.get("size")},setTileIndex:function(t){var e=t.xIndex,i=t.yIndex;"x"in t&&(e=t.x,i=t.y),this.set("tileIndex",{xIndex:e||0,yIndex:i||0})},disable:function(){this._triggerLoaded=qt},getTileIndex:function(){return this.get("tileIndex")||null},_triggerLoaded:function(){he.trigger(this,"loaded",this)},offset_changed:function(t){se.setOffset(this._el,t)},opacity_changed:function(t){se.setOpacity(this._el,t)},zIndex_changed:function(t){this._el.style.zIndex=t},size_changed:function(t){se.setSize(this._el,t)},pane_changed:function(t){this.appendTo(t)}}),x.ImageTile=function(t){var e=Qt({urls:"",opacity:1,zIndex:0,imgonload:null,imgonerror:null},t);this._imgs=[],x.Tile.apply(this,[null,e])},te(x.ImageTile,x.Tile,{_prepareImage:function(){var t=this.getUrls(),e=this._imgs.length,i=t.length-e,n=this.getElement(),o=0,r=null,s=null;if(i>0)for(o=0;o<i;o++)r=new se.Image({contextmenu:null,disableSelection:!0,position:"absolute",opacity:1,alt:""}),s=r.getElement(),s.setAttribute("crossOrigin","anonymous"),se.setOffset(s,0,0),se.setZIndex(s,e+o),n.appendChild(s),this._imgs.push(r);else if(i<0)for(i=Math.abs(i),o=0;o<i;o++)r=this._imgs.pop(),n.removeChild(r.getElement()),r=null},forEachImages:function(t){return x.forEach(this._imgs,t)},getElements:function(){return[this._el].concat(this.getImageElements())},setUrls:function(t){return this.set("urls",t),this},getUrls:function(){return this.get("urls")},load:function(t){var e=Qt({},t);this.getOffset()||e.offset||(e.offset=ee(0,0)),this.setValues(e),this.get("transition")&&this.hide(),this.loadImage(e.urls||this.get("urls"))},reset:function(t,e,i){if(t instanceof x.AbstractMapType&&!(arguments.length<2)){var n=this,o=t.getImageOptions()||{},r=Qt({size:t.tileSize,imgonload:o.onload||null,imgonerror:o.onerror||null},i);x.forEach(r,function(t,e){n.set(e,t,!0)});var s=this.getTileIndex(),a=t.getTileUrls(s.xIndex,s.yIndex,e);this.setUrls(a),this.load(r)}},loadImage:function(t){var e=t;if(!e)return this.setBlank(),void this._triggerLoaded();x.isString(e)&&(e=[e]);var i=this,n=e.length,o=function(){if(i.show(),i.get("transition"))i.fadeIn(function(){--n>0||i._triggerLoaded()});else{if(--n>0)return;i._triggerLoaded()}};this.forEachImages(function(t,i){var n=t.getElement(),r=n.src+"",s=e[i];r||(n.src=at,r=at),s===r?o():t._setUrl(n,s,o,o)})},setBlank:function(){this.forEachImages(function(t){var e=t.getElement();e.onload=null,e.onerror=null,e.src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="})},disable:function(){this.forEachImages(function(t){var e=t.getElement();e.onload=null,e.onerror=null}),x.Tile.prototype.disable.apply(this)},remove:function(){this.setBlank(),x.Tile.prototype.remove.apply(this)},destroy:function(){x.Tile.prototype.destroy.apply(this),this._imgs.length=0,this._imgs=null},getImageElements:function(){var t=[];return this.forEachImages(function(e){t.push(e.getElement())}),t},urls_changed:function(t){this._imgs.length!==t.length&&this._prepareImage()},size_changed:function(t){this.forEachImages(function(e){e.setSize(t)}),se.setSize(this._el,t)},imgonload_changed:function(t){this.forEachImages(function(e){e.setHandler({onload:t})})},imgonerror_changed:function(t){this.forEachImages(function(e){e.setHandler({onerror:t})})}}),x.CanvasTile=function(t){var e=Qt({opacity:1},t);this._prepareDOM(e),x.Tile.apply(this,[null,e])},te(x.CanvasTile,x.Tile,{_prepareDOM:function(){x.Tile.prototype._prepareDOM.apply(this);var t=se.createElement("canvas"),e=t.getContext("2d");this._canvas=t,this._ctx=e,this._el.appendChild(t)},getElements:function(){return[this._el,this._canvas]},reset:function(t,e,i){if(t instanceof x.AbstractMapType&&!(arguments.length<2)){var n=this,o=Qt({size:t.tileSize},i);x.forEach(o,function(t,e){n.set(e,t,!0)});var r=this.getTileIndex(),s=t.getTileData(r.xIndex,r.yIndex,e);this.load(o,function(){n.set("imageData",s)})}},setBlank:function(){var t=this._ctx;if(t){var e=this.getSize();t.clearRect(0,0,e.width,e.height)}},remove:function(){this.setBlank(),x.Tile.prototype.remove.apply(this)},destroy:function(){x.Tile.prototype.destroy.apply(this),this._ctx=null,this._canvas=null},size_changed:function(t){if(t){var e=this._canvas;e.width=t.width,e.height=t.height,se.setSize(e,t),se.setSize(this._el,t)}},imageData_changed:function(t){t&&(this.setBlank(),this._ctx.putImageData(t,0,0))}}),x.TilePool=function(){this._tiles={},this._loadState={},this._swapped=[]},te(x.TilePool,x.KVO,{init:function(){this._tiles={},this._loadState={}},add:function(t,e){var i=e||t.getTileIndex(),n=this.fromIndexToKey(i);this._loadState[n]=!1,this._tiles[n]=t},remove:function(t){var e,i;t instanceof x.Tile?(e=t,i=this.fromIndexToKey(e.getTileIndex())):(i=this.fromIndexToKey(t),e=this._tiles[i]),e&&(e.destroy(),e=null,this._loadState[i]=null,delete this._loadState[i],this._tiles[i]=null,delete this._tiles[i])},removeAll:function(){var t=this;x.forEach(this._tiles,function(e){t.remove(e)}),t.init()},getAt:function(t){var e=this.fromIndexToKey(t);return this._tiles[e]},getLength:function(){var t=0;return x.forEach(this._tiles,function(){t++}),t},clearState:function(){this._loadState={}},markAt:function(t,i){i===e&&(i=!0),this._loadState[this.fromIndexToKey(t)]=i},getLoadedCount:function(){var t=0;return x.forEach(this._loadState,function(e){e&&t++}),t},swap:function(){var t=this._swapped;x.forEach(t,function(t){t.destroy(),t=null}),t.length=0,t=[],x.forEach(this._tiles,function(e){e.disable(),t.push(e),se.clearGPU(e.getElement())}),this._tiles={},this._swapped=t},getSwapped:function(){return this._swapped},reload:function(t){this.clearState(),this.forEach(function(e){e.reload(t)})},reset:function(t,e,i){this.clearState(),this.forEach(function(n){n.reset(t,e,i)})},forEach:function(t){x.forEach(this._tiles,t)},fromIndexToKey:function(t){return"tile_"+t.xIndex+"x"+t.yIndex}}),x.AbstractMapType=function(t){this.setMapTypeOptions(t)},x.AbstractMapType.prototype={constructor:x.AbstractMapType,setMapTypeOptions:function(t){var i=this,n=t.tileSize||re(256,256);n=x.isNumber(n)?re(n,n):x.box(n,re),i.tileSize=n,i.minZoom=(x.isDefined(t.minZoom)?t.minZoom:t.maxZoom)||0,i.maxZoom=t.maxZoom||0,i.name=t.name||"unknown",i.projection=t.projection||x.EmptyProjection,i.repeatX=t.repeatX||!1,i.provider=t.provider||e,i.vendor=t.vendor||e,i.darktheme=t.darktheme||!1,i.uid=t.uid,i.uid||(gt++,i.uid="unknown:unknown-"+gt),i._options=t},getMapTypeOptions:function(){return this._options},_getTileCount:function(t){return Math.pow(2,t-(this.projection.minZoom||0))},getMinZoom:function(){return this.minZoom},getMaxZoom:function(){return this.maxZoom},getName:function(){return this.name}},x.ImageMapType=function(t){x.AbstractMapType.apply(this,arguments)},te(x.ImageMapType,x.AbstractMapType,{setMapTypeOptions:function(t){if("function"!=typeof t.getTileUrl&&!t.tileSet)throw new Error("'getTileUrl' or 'tileSet' options is required.");x.AbstractMapType.prototype.setMapTypeOptions.apply(this,arguments);var e=this;t.tileSet?e.tileSet=x.isString(t.tileSet)?[t.tileSet]:t.tileSet:(x.isArray(e.tileSet)&&(e.tileSet.length=0),e.tileSet=[]),e._imgOptions=e._getImageOptions()},getTileUrls:function(t,e,i){var n,o=this._options,r=o.tileExtra||0,s=this._getTileCount(i)+r;return this.repeatX&&(t%=s)<0&&(t+=s),!this.repeatX&&(t<0||t>=s)||e<0||e>=s?n=o.TRANSPARENT_URL||at:o.getTileUrl?n=o.getTileUrl(t,e,i):o.tileSet&&(n=this._getUrlFromTileSet({x:t,y:e,z:i})),null===n?[]:x.isString(n)?[n]:n},getTile:function(t,e,i){var n=this.getImageOptions()||{},o=this.getOptions()||{},r=o.tileDuration;return new x.ImageTile({tileIndex:{xIndex:t,yIndex:e},urls:this.getTileUrls(t,e,i),size:this.tileSize,imgonload:n.onload||null,imgonerror:n.onerror||null,duration:r})},getOptions:function(){return this._options},_getUrlFromTileSet:function(t){var e=this.tileSet||[],i=this.getMapTypeOptions(),n=e.length||0,o=0,r=[];if(e.length){o=parseInt((t.x+t.y)%n,10);var s=e[o];if(x.isArray(s))x.forEach(s,function(e){r.push(ue(e,t,i))});else{var a=s;r.push(ue(a,t,i))}}else r.push(this._options.TRANSPARENT_URL||at);return r},getImageOptions:function(){return this._imgOptions},_getImageOptions:function(){var t=this._options;return{tileSize:this.tileSize,onload:function(e){t&&t.onload&&t.onload(e)},onerror:function(e){t&&t.onerror&&t.onerror(e)},position:t.position||"absolute",disableSelection:!0,alt:""}}});var ue=function(t,e,i){return t.replace(/\{(-?)(\w+)\}/g,function(t,n,o){return("x"===o||"y"===o||"z"===o)&&o in e?"-"===n?"z"===o?i.maxZoom-e[o]:Math.pow(2,e.z-i.minZoom)-1-e[o]:e[o]:o in i?i[o]:t})};x.TILE_URL_SCHEME_REPLACER=ue,x.CanvasMapType=function(t){x.AbstractMapType.apply(this,arguments)},te(x.CanvasMapType,x.AbstractMapType,{setMapTypeOptions:function(t){if("function"!=typeof t.getTileData)throw new Error("'getTileData' option is required.");x.AbstractMapType.prototype.setMapTypeOptions.apply(this,arguments)},getTileData:function(t,e,i){var n,o=this._getTileCount(i),r=this._options;return this.repeatX&&(t%=o)<0&&(t+=o),!this.repeatX&&(t<0||t>=o)||e<0||e>=o?n=null:r.getTileData&&(n=r.getTileData(t,e,i)),n},getTile:function(t,e,i){var n=this.getTileData(t,e,i),o=this.getOptions()||{},r=o.tileDuration;return new x.CanvasTile({tileIndex:{xIndex:t,yIndex:e},size:this.tileSize,imageData:n,duration:r})},getOptions:function(){return this._options}});var pe=["enus","zhcn","jajp"],de=function(t){var e=this;x.forEach(t,function(t,i){e[i]=t}),e.vendor="\xa9 NAVER Corp.",e._langSuffix=e._getLanguageSuffix(),e.uid||(gt++,e.uid="naver:unknown-"+gt),x.console.once("[DEPRECATED]\nThe NaverImagePaneTypeOptions is deprecated.\nnaver.maps.NaverMapTypeOptions \uc740 \uc9c0\uc6d0 \uc911\ub2e8\ub418\uc5c8\uc2b5\ub2c8\ub2e4.\nnaver.maps.NaverStyleMapTypeOptions \uc744 \uc0ac\uc6a9\ud574 \uc8fc\uc138\uc694.")};de.prototype={constructor:de,name:"",version:Z.onetile,tileSize:new x.Size(256,256),minZoom:-1,maxZoom:14,projection:x.UTMK_NAVER,serverCount:4,timeStamp:"0",imgFormat:0,hd:nt>1,prefix:"",postfix:"",overview:!0,darktheme:!1,language:"ko-KR",_getLanguageSuffix:function(){var t=(this.language||"").toLowerCase().replace("-","")||"kokr";return"kokr"===t||-1===x.getIndexOfElement(pe,t)?"":"_"+t},getTileUrl:function(t,e,i){if(!this.overview&&i<1)return at;var n,o;i<1?(n=Math.pow(2,i+1)-1,o=n):(n=3*Math.pow(2,i-1),o=n-1),e=Math.pow(2,i+1)-1-e;var r=this.version,s=this.timeStamp,a=this.imgFormat,h=this.overlayType,l=0,c=0;if(x.isArray(a)||(a=[a]),x.isArray(h)||(h=[h]),a.length<h.length)for(l=a.length,c=h.length;l<c;l++)a[l]=a[0];if(t>=0&&t<=n&&e>=0&&e<=o){var u=[];for(l=0,c=h.length;l<c;l++)u.push(this.toTileUrl(t,e,i,r,s,a[l],h[l]));return u}return at},_xyToServerNum:function(t,e){return this.serverCount<=1?"":parseInt((t+e)%this.serverCount+1,10)},toTileUrl:function(t,e,i,n,o,r,s){return s&&s.indexOf("_an")===s.length-3&&(s+=this._langSuffix),[this._getLocation(t,e),this.hd?"hd":"get",n,o,r,i,t,e,s].join("/")+this.postfix},_getLocation:function(){return et?function(){return this._ssl_proxy?this._ssl_proxy+this.prefix+"onetile":"https://simg.pstatic.net/onetile"}:function(t,e){return"http://"+this.prefix+"onetile"+this._xyToServerNum(t,e)+".map.naver.net"}}(),onerror:function(t){var e=t.src;if(e){var i=e.split("://"),n=i[0],o=i[1].split(".");0===o[0].indexOf("onetile")?(o[0]="nc.onetile",t.src=n+"://"+o.join(".")):t.src=at}else t.src=at}},function(){var t=function(){for(var t=[],i=0,n=arguments.length;i<n;i++)t[i]=arguments[i];var o;return t.unshift({imgFormat:"0"}),o=Qt.apply(null,t),o&&(o.provider=e[o.uid.split(":")[1]]),new x.ImageMapType(new de(o))},e={world:[{title:" OpenStreetMap",link:"http://www.openstreetmap.org/copyright"},{title:" Natural Earth",link:"http://www.naturalearthdata.com/"}],normal:[{title:" /OpenStreetMap",bounds:oe(ne(37.659996,124.019911),ne(42.99527,130.51321)),link:"http://www.openstreetmap.org/copyright"}],satellite:[{title:" /OpenStreetMap",bounds:oe(ne(37.659996,124.019911),ne(42.99527,130.51321)),link:"http://www.openstreetmap.org/copyright"},{title:" /SPOT"},{title:" /\uc778\ucc9c\uad11\uc5ed\uc2dc",bounds:oe(ne(36.915887,125.690716),ne(37.687529,126.853252))},{title:" /\uad6d\ud1a0\uc9c0\ub9ac\uc815\ubcf4\uc6d0",bounds:[oe(ne(36.9604682,126.7654746),ne(38.1834428,127.8062689)),oe(ne(33.1940984,126.1631646),ne(33.5666617,126.9448023)),oe(ne(34.2894075,126.1667903),ne(36.157058,127.916409)),oe(ne(37.0338716,127.1017059),ne(38.6097027,129.4009515)),oe(ne(34.7636795,127.5739401),ne(37.1422076,129.6170151)),oe(ne(37.2844933,130.6524052),ne(37.6950155,131.0788897)),oe(ne(35.9625217,125.5567761),ne(37.2537581,128.6557701))]}],traffic:[{title:" /\uad6d\ud1a0\uad50\ud1b5\ubd80"},{title:" /\uacbd\ucc30\uccad(UTIC)"}],cadastral:[{title:" /\ub2e4\uc6b8\uc9c0\uc624\uc778\ud3ec"}]};Qt(de,{getMapTypes:function(t){var e=new x.MapTypeRegistry({normal:de.getNormalMap(t),terrain:de.getTerrainMap(t),satellite:de.getSatelliteMap(t),hybrid:de.getHybridMap(t)});return e.VENDOR="\xa9 NAVER Corp.",e.uid="naver:imagemap:default",e},getWorldMap:function(e){return t({uid:"naver:world",name:"\uc77c\ubc18",minZoom:0,maxZoom:7,projection:x.EPSG3857,tileSize:new x.Size(256,256),overlayType:"g_bl_vc_bg/g_ol_vc_rd/g_ol_vc_an",repeatX:!0,getTileUrl:function(t,e,i){var n=Math.pow(2,i);return e>=0&&e<n?(e=n-1-e,this.toTileUrl(t,e,i,this.version,this.timeStamp,this.imgFormat,this.overlayType)):at}},e)},getVectorMap:function(e){return t({uid:"naver:normal:bg",name:"\uc77c\ubc18",overlayType:"bl_vc_bg"},e)},getNormalMap:function(e){return t({uid:"naver:normal",name:"\uc77c\ubc18",overlayType:"bl_vc_bg/ol_vc_an"},e)},getTerrainMap:function(e){return t({uid:"naver:normal:terrain",name:"\uc9c0\ud615\ub3c4",overlayType:"bl_tn_bg/ol_vc_bg/ol_vc_an"},e)},getSatelliteMap:function(e){return t({uid:"naver:satellite",name:"\uc704\uc131",imgFormat:"1",overlayType:"bl_st_bg",darktheme:!0},e)},getHybridMap:function(e){return t({uid:"naver:satellite:hybrid",name:"\uacb9\uccd0\ubcf4\uae30",overlayType:["bl_st_bg","empty/ol_st_rd/ol_st_an"],imgFormat:[1,0],darktheme:!0},e)},getBlankMap:function(e){return t({uid:"naver:blank",name:"\ud22c\uba85",getTileUrl:function(){return at}},e)},getLiteMap:function(e){return t({uid:"naver:normal:lite",name:"Lite",overlayType:"bl_cs_bg/ol_cs_an",minZoom:1,maxZoom:9,repeatX:!1},e)},getNormalLabelLayer:function(e){return t({uid:"naver:normal:label",name:"\uc8fc\uae30",overlayType:"empty/ol_vc_an"},e)},getSatelliteLabelLayer:function(e){return t({uid:"naver:satellite:label",name:"\uc8fc\uae30",overlayType:"empty/ol_st_an"},e)},getTrafficLayer:function(e){return t({uid:"naver:traffic",name:"\uad50\ud1b5",overlayType:"empty/ol_tr_rt/ol_vc_an",overview:!1},e)},getBicycleLayer:function(e){return t({uid:"naver:bicycle",name:"\uc790\uc804\uac70",overlayType:"empty/ol_bc_hb/ol_vc_an",overview:!1},e)},getTrafficBicycleLayer:function(e){return t({uid:"naver:trafficbicycle",name:"\uad50\ud1b5/\uc790\uc804\uac70",overlayType:"empty/ol_bc_hb/ol_tr_rt/ol_vc_an",overview:!1},e)},getCadastralLayer:function(e){return t({uid:"naver:cadastral",name:"\uc9c0\uc801\ub3c4",overlayType:"empty/ol_lp_cn",overview:!1},e)},getStreetLayer:function(e){return t({uid:"naver:street",name:"\uac70\ub9ac\ubdf0",overlayType:"empty/ol_pn_rd",overview:!1,postfix:"?dv="+Z.dv},e)}})}(),x.NaverImagePaneTypeOption=de,x.NaverImagePaneTypeOptions=de;var fe=function(t){var e=this;x.forEach(t,function(t,i){e[i]=t}),e.vendor="\xa9 NAVER Corp.",e.uid||(gt++,e.uid="naver:unknown-"+gt)};fe.prototype={constructor:fe,name:"",version:"",tileSize:new x.Size(256,256),minZoom:0,maxZoom:21,timeStamp:"0",projection:x.EPSG3857,hd:kt,prefix:"",postfix:"",overview:!0,overlayType:"",darktheme:!1,blankMap:!1,getTileUrl:function(t,e,i){var n=this.map;if(!this.overview&&i<1||this.blankMap||!n)return at;var o=n.mapTypes,r=o&&o.getSelectedType()||null,s=r.getMapTypeOptions().tileType||"basic",a=this.versions[s]||null;if(!a)return x.console.log(jt.TEMPORARY_ERROR.slice(),Gt.DEFAULT_TWO_LINE.slice()),at;if(!r)return at;var h=this._getFormat(this.imgFormat),l=this._getScaleFactor(),c=this._getOverlayType(this.overlayType),u=this._getRtsVersionQuery(),p=this.query||"",d=0,f=0;if(x.isArray(h)||(h=[h]),x.isArray(c)||(c=[c]),h.length<c.length)for(d=h.length,f=c.length;d<f;d++)h[d]=h[0];var g=[];for(d=0,f=c.length;d<f;d++)g.push(this.toTileUrl(t,e,i,s,a,h[d],l,c[d],p,u));return g},toTileUrl:function(t,e,i,n,o,r,s,a,h,l){return[this._getLocation(t,e),n,o,i,t,e].join("/")+s+"."+r+this._getQuery(a,l)},_getLocation:function(){return et?"https://nrbe.pstatic.net/styles":"http://nrbe.map.naver.net/styles"},_getLocationInHouse:function(){return et?"https://map.pstatic.net/nrb/styles":"http://nrb.map.naver.net/styles"},_getScaleFactor:function(){return this.hd?"@2x":""},_getExclusionOverlayTypes:function(){return[Nt.HIKING_TRAIL,Nt.POI_KOREAN,Nt.POI_ENGLISH,Nt.POI_CHINESE,Nt.POI_JAPANESE]},_getOverlayType:function(t){function e(t){return t?t.getOptions().overlayType:""}var i=this._getExclusionOverlayTypes(),n=this.map.layers.getLayerNames(),o="",r=null,s=this;if(!n||0===n.length)return t;if(x.forEach(n,function(t){if((r=s.map.layers[t])&&r.options.forceOverlayToMapType){var i=e(r.registry[t]);i&&(o+="."+i)}}),!o)return t;var a=s.map.layers.cadastral,h=(t+o).split("."),l=[];return x.forEach(h,function(t){l.indexOf(t)>=0||a&&i.indexOf(t)>=0||l.push(t)}),fe.sortOverlay(l.join("."))},_getRtsVersionQuery:function(){var t="",e=null,i=null,n=this;return(e=n.map.layers.traffic)?(i=e.registry.traffic.getOptions(),t=i&&i.timeStamp?i.timeStamp:"",""!==t?"rtsVersion="+t:""):(t="0"===n.timeStamp?"":n.timeStamp,""===t?"":"rtsVersion="+t)},_getFormat:function(t){return t=parseInt(t,10),1===t?"jpg":"png"},_appendQuery:function(t,e){return e&&""!==e?t+e:""},_getQuery:function(t,e){return t&&""!==t?"?mt="+t+this._appendQuery("&",e):this._appendQuery("?",e)},onerror:function(t){t.src=at}},function(){var t=function(){for(var t=[],e=0,n=arguments.length;e<n;e++)t[e]=arguments[e];var o,r;return t.unshift({imgFormat:"0"}),o=Qt.apply(null,t),x.forEach(o,function(t,e){"overlayType"!==e&&"originalOverlayType"!==e||(t=fe.sortOverlay(t),o[e]=fe.convertToUserLanguage(t))}),o&&(r=i[o.uid.split(":")[1]],"naver:satellite"===o.uid?o.provider=r.filter(function(t){return-1===t.title.indexOf("OpenStreetMap")}):o.provider=r),new x.ImageMapType(new fe(o))},e={title:" /OpenStreetMap",area:x.SOUTH_KOREA_AREA,link:"http://www.openstreetmap.org/copyright",exclude:!0},i={world:[{title:" OpenStreetMap",link:"http://www.openstreetmap.org/copyright"},{title:" Natural Earth",link:"http://www.naturalearthdata.com/"}],normal:[e],satellite:[e,{title:" /\uad6d\ud1a0\uc9c0\ub9ac\uc815\ubcf4\uc6d0",bounds:[oe(ne(36.9604682,126.7654746),ne(38.1834428,127.8062689)),oe(ne(33.1940984,126.1631646),ne(33.5666617,126.9448023)),oe(ne(34.2894075,126.1667903),ne(36.157058,127.916409)),oe(ne(37.0338716,127.1017059),ne(38.6097027,129.4009515)),oe(ne(34.7636795,127.5739401),ne(37.1422076,129.6170151)),oe(ne(37.2844933,130.6524052),ne(37.6950155,131.0788897)),oe(ne(35.9625217,125.5567761),ne(37.2537581,128.6557701))]}],traffic:[{title:" /\uad6d\ud1a0\uad50\ud1b5\ubd80"},{title:" /\uacbd\ucc30\uccad(UTIC)"}],cadastral:[{title:" /\ub2e4\uc6b8\uc9c0\uc624\uc778\ud3ec"}]};Qt(fe,{getMapTypes:function(t){var e={normal:fe.getNormalMap(t),terrain:fe.getTerrainMap(t),satellite:fe.getSatelliteMap(t),hybrid:fe.getHybridMap(t)},i=new x.MapTypeRegistry(e);return i.VENDOR="\xa9 NAVER Corp.",i.uid="naver:imagemap:default",i},getWorldMap:function(e){return t({uid:"naver:world",name:"\uc77c\ubc18",repeatX:!0,tileType:"basic",overlayType:"ar.bg.ol.sw.lko"},e)},getVectorMap:function(e){return t({uid:"naver:normal:bg",name:"\uc77c\ubc18",tileType:"basic",overlayType:"ar.bg.ol.sw"},e)},getNormalMap:function(e){return t({uid:"naver:normal",name:"\uc77c\ubc18",tileType:"basic",overlayType:"ar.bg.ol.sw.lko",originalOverlayType:"ar.bg.ol.sw.lko"},e)},getTerrainMap:function(e){return t({uid:"naver:normal:terrain",name:"\uc9c0\ud615\ub3c4",tileType:"terrain",overlayType:"bg.ol.sw.lko",originalOverlayType:"bg.ol.sw.lko"},e)},getSatelliteMap:function(e){return t({uid:"naver:satellite",name:"\uc704\uc131",tileType:"satellite",overlayType:"bg",originalOverlayType:"bg",darktheme:!0},e)},getHybridMap:function(e){return t({uid:"naver:satellite:hybrid",name:"\uacb9\uccd0\ubcf4\uae30",tileType:"satellite",overlayType:"ar.bg.ol.sw.lko",originalOverlayType:"ar.bg.ol.sw.lko",darktheme:!0},e)},getDarkMap:function(e){return t({uid:"naver:dark",name:"\ub2e4\ud06c",tileType:"dbasic",overlayType:"ar.bg.ol.sw.lko",originalOverlayType:"ar.bg.ol.sw.lko",darktheme:!0},e)},getDarkTerrainMap:function(e){return t({uid:"naver:dark:terrain",name:"\ub2e4\ud06c\uc9c0\ud615",tileType:"dterrain",overlayType:"ar.bg.ol.sw.lko",originalOverlayType:"ar.bg.ol.sw.lko",darktheme:!0},e)},getBlankMap:function(e){return t({uid:"naver:blank",name:"\ud22c\uba85",getTileUrl:function(){return at}},e)},getLiteMap:function(e){return t({uid:"naver:normal:lite",name:"Lite",tileType:"basic",overlayType:"bg.ol.lko",repeatX:!1},e)},getNormalLabelLayer:function(e){return t({uid:"naver:normal:label",name:"\uc8fc\uae30",tileType:"basic",overlayType:"lko"},e)},getSatelliteLabelLayer:function(e){return t({uid:"naver:satellite:label",name:"\uc8fc\uae30",tileType:"satellite",overlayType:"lko"},e)},getTrafficLayer:function(e){return t({uid:"naver:traffic",name:"\uad50\ud1b5",imgFormat:0,tileType:"basic",overlayType:"ctt"},e)},getBicycleLayer:function(e){return t({uid:"naver:bicycle",name:"\uc790\uc804\uac70",imgFormat:0,tileType:"basic",overlayType:"br",overview:!1},e)},getTrafficBicycleLayer:function(e){return t({uid:"naver:trafficbicycle",name:"\uad50\ud1b5/\uc790\uc804\uac70",imgFormat:0,tileType:"basic",overlayType:"br.ctt",overview:!1},e)},getCadastralLayer:function(e){return t({uid:"naver:cadastral",name:"\uc9c0\uc801\ub3c4",imgFormat:0,tileType:"basic",overlayType:"bg.ol.lp.sw",overview:!1},e)},getStreetLayer:function(e){return t({uid:"naver:street",name:"\uac70\ub9ac\ubdf0",imgFormat:0,tileType:"basic",overlayType:"ps",overview:!1},e)},convertToUserLanguage:function(t){return x.USER_LANGUAGE?(x.forEach(X,function(e){-1!==t.indexOf(e)&&(t=t.replace("l"+e,"l"+x.USER_LANGUAGE))}),t):t},emptyValueFilter:function(t){return!!t},sortOverlay:function(t){var e,i=[],n=t.split("."),o=!1,r=!1,s=!1;return x.forEach(n,function(t){-1!==(e=Ft.indexOf(t))&&(i[e]=t,"bs"===t?o=!0:"sw"===t?r=!0:"ts"===t&&(s=!0))}),s?(i[Ut]="",i[Yt]=""):o&&r&&(i[Ut]="",i[Yt]="",i[Xt]="ts"),i.filter(this.emptyValueFilter).join(".")},getVersions:function(){return this.prototype.versions}})}(),x.NaverStyleMapTypeOption=fe,x.NaverStyleMapTypeOptions=fe,x.Layer=function(t,e,i){this.name=t,this._initRegistry(e);var n=this.registry;if(!n.getSelectedTypeId()){var o=n.getTypeIds();o.length&&n.setSelectedTypeId(o[0])}this.options=Qt({zIndex:0,overlayMap:!1,forceOverlayToMapType:!1},i)},te(x.Layer,x.KVO,{_initRegistry:function(t){if(t instanceof x.MapTypeRegistry)return void(this.registry=t);var e=this.name||x.guid(),i=t,n={};n[e]=i,this.registry=new x.MapTypeRegistry(n,e)},_initPane:function(){var t=this.options.overlayMap,e=this.options.zIndex||(t?0:90);return this.pane=new x.TileIndexPane(this.name,{overlayMap:t}),this.pane.getElement().style.zIndex=e,t&&(this.pane.getSpareElement().style.zIndex=e),this.pane},_beforeSetMap:qt,setMap:function(t){var e=this.getMap();if(t!==e){if(this._beforeSetMap(t),t){this.map=t;var i=this.getLayerType(),n=i.getMapTypeOptions?i.getMapTypeOptions():null,o=null,r=!this.options.forceOverlayToMapType;n&&(n.map=t),r&&(o=this._initPane(),o.setMapTypeRegistry(this.registry)),this._updateRegistry(t),this._addToMap(t)}else e&&this._destroy();return this.set("map",t),this._afterSetMap(t),!0}},_addToMap:function(t){this.pane&&this.pane.setMap(t),t.layers.set(this.name,this),t.set(this.name+"Layer",this),this.options.forceOverlayToMapType&&this.refresh()},_afterSetMap:qt,getMap:function(){return this.get("map")||null},setLayerTypeId:function(t){this.registry.setSelectedTypeId(t)},getLayerTypeId:function(){return this.registry.getSelectedTypeId()},getLayerType:function(){return this.registry.getSelectedType()},getPaneElement:function(){return this.pane?this.pane.get("paneElement"):null},refresh:function(t){var e=this.getMap(),i=null;if(e){if(this.pane)return void this.pane.refresh(t);i=e.getMapModel(),i&&i.refreshTiles(t)}},setOpacity:function(t){this.pane&&this.pane.setOpacity(t)},getOpacity:function(){return this.pane?this.pane.getOpacity():1},_updateRegistry:qt,_destroy:function(){this.pane&&(this.pane.unbindAll(),this.pane.setMap(null),this.pane=null,delete this.pane);var t=this.getMap();return t&&(t.layers.set(this.name,null),t.set(this.name+"Layer",null),this.options.forceOverlayToMapType&&this.refresh(),this.set("map",null),this.map=null,delete this.map),!1}}),x.LabelLayer=function(t,e,i){var n=Qt({zIndex:99,overlayMap:!0,forceOverlayToMapType:!0},i);x.Layer.apply(this,["label",fe.getNormalLabelLayer(),n])},te(x.LabelLayer,x.Layer),x.BicycleLayer=function(t){var e=Qt({zIndex:3,overlayMap:!0,forceOverlayToMapType:!0},t);x.Layer.apply(this,["bicycle",fe.getBicycleLayer(),e])},te(x.BicycleLayer,x.Layer),x.CadastralLayer=function(t){var e=Qt({zIndex:1,overlayMap:!1,forceOverlayToMapType:!0},t);x.Layer.apply(this,["cadastral",fe.getCadastralLayer(),e])},te(x.CadastralLayer,x.Layer),x.LayerRegistry=function(){this._layerNames=[]},te(x.LayerRegistry,x.KVO,{set:function(t,e){var i=this.get(t),n=x.getIndexOfElement(this._layerNames,t);x.KVO.prototype.set.apply(this,arguments),n>-1&&this._layerNames.splice(n,1),null!==e?(this._layerNames.push(t),he.trigger(this,"addLayer",e)):i&&he.trigger(this,"removeLayer",t)},getLayerNames:function(){return this._layerNames.slice(0)}}),x.StreetLayer=function(t){var e=Qt({zIndex:10,overlayMap:!0,smartSymbol:!0,forceOverlayToMapType:!0},t);x.Layer.apply(this,["street",fe.getStreetLayer(),e])},te(x.StreetLayer,x.Layer),x.TrafficLayer=function(t){var e=Qt({zIndex:2,overlayMap:!0,interval:3e5,forceOverlayToMapType:!0},t);x.Layer.apply(this,["traffic",fe.getTrafficLayer(),e])},te(x.TrafficLayer,x.Layer,{_addToMap:function(t){var e=this;e._rtsVersionLoader||(e._rtsVersionLoader=new xe),e._rtsVersionLoader.start({mapOrLayer:e,interval:this.options.interval,imageMapType:this.registry.get(this.name),callback:function(){x.Layer.prototype._addToMap.apply(e,[t])}})},_destroy:function(){this._rtsVersionLoader&&(this._rtsVersionLoader.stop(),this._rtsVersionLoader=null),x.Layer.prototype._destroy.apply(this)},refreshRTSVersion:function(){if(this._rtsVersionLoader){var t=this,e=t.getRTSVersion();this._rtsVersionLoader.loadRTSVersion(function(i){i&&i.version!==e&&t.refresh(!0)})}},startAutoRefresh:function(){this._rtsVersionLoader&&this._rtsVersionLoader.startAutoRefresh()},endAutoRefresh:function(){this._rtsVersionLoader&&this._rtsVersionLoader.endAutoRefresh()},getRTSVersion:function(){return this._rtsVersionLoader?this._rtsVersionLoader.getRTSVersion():0}}),x.MapOptions=function(t,e){e=e||{},this.map=t,at=e.blankTileImage||st;var i=[Wt.SATELLITE,Wt.HYBRID],n=i.indexOf(e&&e.mapTypeId)>-1;if(Qt(this,{gl:!1,background:n?"#111213":"#f8f9fa",tileSpare:0,pixelRatio:nt,center:ne(37.5666103,126.9783882),bounds:null,tilt:0,rotation:0,maxBounds:null,padding:x.trbl(),overlayZoomEffect:null,tileTransition:!0,tileDuration:null,baseTileOpacity:1,disableKineticPan:!0,zoomOrigin:null,size:null,zoom:16,minZoom:null,maxZoom:null,mapTypes:null,mapTypeId:"normal",resizeOrigin:U.CENTER,draggable:!0,disableDoubleClickZoom:!1,disableDoubleTapZoom:!1,disableTwoFingerTapZoom:!1,keyboardShortcuts:!0,scrollWheel:!0,pinchZoom:!0,scaleControl:!0,scaleControlOptions:{position:U.BOTTOM_RIGHT},logoControl:!0,logoControlOptions:{position:U.BOTTOM_RIGHT},mapDataControl:!0,mapDataControlOptions:{position:U.BOTTOM_LEFT},mapTypeControl:!1,mapTypeControlOptions:{position:U.TOP_RIGHT},zoomControl:!1,zoomControlOptions:{position:U.TOP_LEFT},compassControl:!1,compassControlOptions:{position:U.TOP_LEFT},disablePicker:!0}),e.logoControl=e.logoControl||!0,"mapTypes"in e||(e.mapTypes=fe.getMapTypes({map:t,tileDuration:e.tileDuration})),e.center){if(!(e.center instanceof x.Point)){var o=e.mapTypes.get(e.mapTypeId||this.mapTypeId).projection;["UTMK","UTMK_NAVER","EPSG:3857"].indexOf(o.name)>-1?e.center=x.box(e.center,ne):e.center=x.box(e.center)}}else e.center=this.center;!e.zoomOrigin||e.zoomOrigin instanceof x.Point||(e.zoomOrigin=x.box(e.zoomOrigin)),!e.bounds||e.bounds instanceof x.PointBounds||(e.bounds=x.box(e.bounds)),!e.maxBounds||e.maxBounds instanceof x.PointBounds||(e.maxBounds=x.box(e.maxBounds)),!e.size||e.size instanceof x.Size||(e.size=x.box(e.size,x.Size)),e.padding&&(e.padding=x.trbl(e.padding)),!x.glSupported()&&e.zoom&&x.isFloat(e.zoom)&&(x.console.once("\uc2e4\uc218\ud615 \uc90c \ub808\ubca8\uc744 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\n\uc90c \ub808\ubca8\uc744 \uc815\uc218\ub85c \uc124\uc815\ud574 \uc8fc\uc138\uc694. \uc2e4\uc218\ud615 \uc90c \ub808\ubca8 \uc124\uc815 \uc2dc \uac15\uc81c\ub85c \ubc18\uc62c\ub9bc \ucc98\ub9ac\ud569\ub2c8\ub2e4.\n"),e.zoom=Math.round(e.zoom)),this.setValues(e),this.set("__optionsOrder",x.keys(Qt(e,{scaleControl:this.scaleControl,logoControl:this.logoControl,mapDataControl:this.mapDataControl,mapTypeControl:this.mapTypeControl,zoomControl:this.zoomControl,compassControl:this.compassControl}))),this.get("tileTransition")&&$t.browser.csszoom&&this.set("tileTransition",!1)},te(x.MapOptions,x.KVO,{setRefinedOption:function(t,e){"size"===t?e=x.box(e,re):"center"===t||"zoomOrigin"===t||"bounds"===t?e=x.box(e):"maxBounds"===t?e=this.limitMaxBounds(e):"minZoom"===t?e=this.limitMinZoom(e):"logoControl"===t&&(e=e||!0),this.set(t,e)},updateSilently:function(t,e){var i=this.get(t);i instanceof ee||i instanceof ie||i instanceof re?!1===i.equals(e)&&this.set(t,e,!0):"object"!=typeof i?i!==e&&this.set(t,e,!0):this.set(t,e,!0)},isDefaultMapType:function(){var t=this.map,e=t.getMapType(),i=e&&e.vendor||null;if(!i||"\xa9 NAVER Corp."!==i)return!1;var n=e&&e.projection||null;return!(!n||n!==x.EPSG3857)},limitMaxBounds:function(t){if(!this.isDefaultMapType())return t;t=x.box(t);var e=x.LatLngBounds({lng:124.2694863,lat:32.122953},{lng:131.969556,lat:38.6152377});return e.hasBounds(t)?t:e},limitMinZoom:function(t){if(!this.isDefaultMapType())return t;return t>6?t:6},minZoom_changed:function(){this.set("minZoom",this.limitMinZoom(this.get("minZoom")),!0)},maxBounds_changed:function(){this.set("maxBounds",this.limitMaxBounds(this.get("maxBounds")),!0)},destroy:function(){for(var t=this.get("mapTypes"),e=t.getTypeIds(),i=0,n=e.length;i<n;i+=1){t.get(e[i]).map=null}this.map=null}}),x.Map=function(t,e){if(R(this),!t)throw new Error('Invalid type: "mapDiv" must be a String or HTMLElement.');if(x.isString(t)&&!T.getElementById(t))throw new Error("Container "+t+" not found.");this.mapTypeId="normal",this._pendingOptions=[],this.isReady=!1,this._initUserLanguage(e);var i=this._initMapOptions(e);this._loadMeta(),this.id="nmap-"+x.guid(),this.__WILL_REDRAW=!1,this._mapModel=new x.MapModel(i),this._initRenderMode(),this._initMapView(t,i),this.switchTo(this.get("renderMode")),this._initTilePane(),this._initLayers(),this._initMapTypes(),this._initDataLayer(),this._initRtsVersionLoader(),this._initEventGL(),x.Map.__instances.push(this),ve&&ve()},te(x.Map,x.KVO,{initMap:function(t){this._updateMapTypeOptions(),this.isReady=!0,this._unsetMapTypeSetting(),this._assembleRest(),this._setPendingOptions(),this.initStatus=t,this._initPicker(),2!==this.get("renderMode")&&(this.trigger("init_stylemap",t),this.trigger("init",t),x.useGL()&&this._triggerIdle())},isCustomMapType:function(){var t=this.get("mapTypeId"),e=this.get("mapType");return!(t&&e&&e.uid&&-1!==e.uid.indexOf("naver:"))},_unsetMapTypeSetting:function(){this.mapTypes&&this.mapTypes.selectedMapType&&this.mapTypes.selectedMapType instanceof x.ImageMapType&&(this.mapTypes.setSelectedTypeId(this.mapTypes.getSelectedTypeId()),this.mapTypes.selectedMapType.getMapTypeOptions().map=this)},_setPendingOptions:function(){if(this._pendingOptions){for(var t=0,e=this._pendingOptions.length;t<e;t+=1)this.setOptions.apply(this,this._pendingOptions[t]);delete this._pendingOptions}},_loadMeta:function(){Ee(this)},_updateMapTypeOptions:function(){fe.prototype.versions=zt.versions||{},fe.prototype.minZoom=zt.minzoom||0,fe.prototype.maxZoom=zt.maxzoom||21},switchTo:function(t){this._initParts()},_initParts:function(){var t=this._mapOptions;this._mapModel.setMapbox&&this._mapModel.setMapbox(null),this._mapAction=new x.MapAction(t)},setCenter:function(t){if(t=x.box(t),this._stopTransition(),!this.__reserveMove("setCenter",[t])){this._mapModel.setCenter(t)&&this._triggerIdle()}},setCenterPoint:function(t){if(t=x.box(t,ee),this._stopTransition(),!this.__reserveMove("setCenterPoint",[t])){this._mapModel.setCenterPoint(t)&&this._triggerIdle()}},setZoom:function(t,e){var i=this._mapAction.setZoom(t,e);!e&&i&&this._triggerIdle()},zoomBy:function(t,e,i){e=e?x.box(e):this.getCenter();var n=this.getProjection(),o=n.fromCoordToOffset(e);this._stopTransition();var r=this._mapAction.zoomBy(t,o,i);!i&&r&&this._triggerIdle()},updateBy:function(t,e){t=x.box(t),this.getCenter().equals(t)&&this.getZoom()===e||(this._stopTransition(),this.__reserveMove("updateBy",[t,e])||(this._mapModel.set("instantTiling",!0),this._mapModel.update(t,null,e),this._triggerIdle()))},fitBounds:function(t,e){if(x.isArray(t)&&"number"!=typeof t[0]){if(t.length<2)return;x.forEach(t,function(e,i){e instanceof ee||(t[i]=x.box(e))});var i=oe;t[0]instanceof ne||(i=ie),t=i.bounds.apply(i,t)}else t=x.box(t);if(this._stopTransition(),!this.__reserveMove("fitBounds",[t,e])){this._mapModel.fitBounds(t,e)&&this._triggerIdle()}},panTo:function(t,e){t=x.box(t),this.__reserveMove("panTo",[t,e])||this._mapAction.panTo(t,Qt({duration:1e3,easing:"easeOutCubic"},e))},panToBounds:function(t,e,i){t=x.box(t),this.__reserveMove("panToBounds",[t,e,i])||this._mapAction.panToBounds(t,Qt({duration:1e3,easing:"easeOutCubic"},e),i)},panBy:function(t){t&&(t=x.box(t,ee),this._stopTransition(),this.__reserveMove("panBy",[t])||(this._mapAction.panBy(t),this._triggerIdle()))},morph:function(t,e,i){t=x.box(t),this._stopTransition(),this.__reserveMove("morph",[t,e,i])||this._mapAction.morph(t,e,i)},setTilt:function(t){this._mapModel.setTilt(t)},getTilt:function(){return this._mapModel.getTilt()},setRotation:function(t){this._mapModel.setRotation(t)},getRotation:function(){return this._mapModel.getRotation()},stop:function(){this._mapAction.stopEasing()},setOptions:function(t){if(!this.isReady)return void this._pendingOptions.push(arguments);var e=this._mapOptions;if("string"==typeof t){var i=t,n=arguments[1];"padding"===i&&(n=Qt(e.get("padding"),n)),e.setRefinedOption(i,n)}else x.forEach(t,Jt(function(t,e){this.setOptions(e,t)},this))},getOptions:function(t){var i=this._mapOptions;return t!==e?"minZoom"===t||"maxZoom"===t?i.get("user"+x.capitalize(t)):i.get(t):i},getProjection:function(){return this.get("mapSystemProjection")},getPrimitiveProjection:function(){return this.get("projection")},getCenterPoint:function(){return this._mapModel.getCenterPoint().clone()},getCenter:function(){return this._mapModel.getCenter().clone()},getZoom:function(){return this._mapModel.getZoom()},getMinZoom:function(){return this.getOptions("minZoom")},getMaxZoom:function(){return this.getOptions("maxZoom")},setMapTypeId:function(t){this._assembleListener&&(he.removeListener(this._assembleListener),this._assembleListener=null,delete this._assembleListener,this._assemble(t)),this.mapTypes.setSelectedTypeId(t),this.__sendNeloMapTypeId(t)},refresh:function(t){var e=this._mapModel,i=this.getMapType(),n=i.projection||x.EmptyProjection,o=i.tileSize||re(256,256),r=!1;r=e.get("projection")!==n||!1===e.get("tileSize").equals(o),r&&(e.set("tileSize",o),e.set("projection",n)),e.refreshTiles(t),this._triggerIdle()},autoResize:function(){this._onResizeWindow(null)},setSize:function(t){t=x.box(t,re),this.getSize().equals(t)||(this._resizeListener&&(he.removeDOMListener(this._resizeListener),this._resizeListener=null,delete this._resizeListener),this._resizeMapListener&&(he.removeListener(this._resizeMapListener),this._resizeMapListener=null,delete this._resizeMapListener),this._mapModel.setSize(t),he.trigger(this,"resize"),this._triggerIdle())},getSize:function(){return this._mapModel.getSize().clone()},getBounds:function(){return this._mapModel.getBounds().clone()},getFitZoomAndCenter:function(t){return this._mapModel.getFitZoomAndCenter(t)},getElement:function(){return this._mapView.getElement()},setCursor:function(t){this._mapView.setCursor(t)},getCursor:function(){return this._mapView.getCursor()},getCurrentInfoWindow:function(){return this._mapModel.get("infowindow")},closeInfoWindow:function(){this._mapModel.get("infowindow")&&this._mapModel.get("infowindow").close()},getPanes:function(){return this._mapView.get("panes")},addPane:function(t,e){return this._mapView.addPane(t,e)},removePane:function(t){this._mapView.removePane(t)},addOverlayPane:function(t,e){return this._mapView.addOverlayPane(t,e)},removeOverlayPane:function(t){this._mapView.removeOverlayPane(t)},pickAll:function(t){t=x.box(t);var e={type:Pt,features:[]};return this._mapPicker?(e.features=this._mapPicker.queryFeatures(t),e):e},__reserveMove:function(t,e){return!!this._mapAction.isZooming()&&(this.__RESERVED_MOVE=[t,e],!0)},_initMinMaxZoom:function(t,e){var i=t.get("minZoom"),n=t.limitMinZoom(i),o=t.get("maxZoom");null!==n&&t.set("userMinZoom",n),null!==o&&t.set("userMaxZoom",o),e&&t.isDefaultMapType()&&i&&i<6&&x.console.once("[minZoom]\nPlease set the minimum zoom level to 6 or higher.\n\ucd5c\uc18c \uc90c \ub808\ubca8\uc744 6 \uc774\uc0c1\uc73c\ub85c \uc124\uc815\ud574 \uc8fc\uc138\uc694.\n")},_initMapOptions:function(t){var e=new x.MapOptions(this,t);return this._initMinMaxZoom(e),this._listenMapOptions(e),this._mapOptions=e,e},_initRenderMode:function(){var t=this._mapOptions,e=this._mapModel;t.get("gl")&&x.glSupported()?e.set("renderMode",2):e.set("renderMode",vt),he.addListener(this,"renderMode_changed",function(e){var i=!1;2===e&&(i=!0),t.set("gl",i,!0)}),this.bindTo("renderMode",e)},__unlisten__:function(t){this[t]&&(he.removeListener(this[t]),this[t]=null,delete this[t])},__listen__:function(t,e){this.__unlisten__(t),this[t]=e},_listenMapOptions:function(t){var e=this,i=function(){e.controlPositioner.update()};he.once(this,"init",function(){if(!e.controlPositioner)return void he.once(e,"assemble",i);i()}),he.once(this,"assemble",function(){e.__listen__("_mapOptionsListeners",[he.addListener(t,"minZoom_changed",function(i){t.set("userMinZoom",i),i>e.get("zoom")&&e.setZoom(i,!0)}),he.addListener(t,"maxZoom_changed",function(i){t.set("userMaxZoom",i),i<e.get("zoom")&&e.setZoom(i,!0)}),he.addListener(t,"mapTypes_changed",function(t){e._changeRegistry(t)}),he.addListener(t,"center_changed",function(t){e.setCenter(t)}),he.addListener(t,"zoom_changed",function(t){e.setZoom(t)}),he.addListener(t,"bounds_changed",function(t){e.fitBounds(t)}),he.addListener(t,"size_changed",function(t){e.setSize(t)}),he.addListener(t,"tilt_changed",function(t){e.setTilt(t)}),he.addListener(t,"rotation_changed",function(t){e.setRotation(t)}),he.addListener(t,"gl_changed",function(t){e.switchTo(t?2:vt)})])})},_initMapView:function(t,e){var i=new x.MapView(t,e),n=e.get("size");this._resizeMapListener=he.addListener(this,"resize",Jt(this._onResize,this)),n?i.setSize(n):(e.set("size",i.getSize(),!0),this._listenResize()),this._mapView=i},_listenResize:function(){this._resizeListener=he.addDOMListener(t,"resize",Jt(this._onResizeWindow,this))},_onResizeWindow:function(t){this._resizeByTrigger(),he.trigger(this,"resize","__SILENTLY__")},_onResize:function(t){this._resizeListener&&(t&&"__SILENTLY__"===t||this._resizeByTrigger())},_resizeByTrigger:function(){if(this._mapModel&&this._resizeListener){var t=se.getSize(this.getElement()).round();this.getSize().equals(t)||(this._mapModel.setSize(t),this._sizeChanged=!0,this._triggerIdle())}},_initTilePane:function(){this.mapPane=new x.TileIndexPane("basemap"),this.mapPane.bindTo("tileopacity",this._mapOptions,"baseTileOpacity"),this._listenTilePane(this.mapPane)},_listenTilePane:function(t){var e=this;this.__listen__("_tilePaneListeners",[he.forward(t,"tilesloaded",this),he.addListener(this,"tilesloaded",function(){e._mapModel.set("instantTiling",!1)})])},_initLayers:function(){this.layers=new x.LayerRegistry,this._listenLayers(this.layers)},_listenLayers:function(t){this.__listen__("_layersListeners",[he.forward(t,"addLayer",this),he.forward(t,"removeLayer",this)])},_initMapAction:function(){var t=this._mapAction;t.setMapModel(this._mapModel),t.setMapView(this._mapView),t.initZoomEffector(),this._listenMapAction(t)},_listenMapAction:function(t){var e=this;e.__listen__("_mapActionListeners",[he.forward(e,"tilesloaded",t),he.addListener(t,"idle",Jt(e.__onIdle,e)),he.addListener(t,"willDestroy",Jt(e.__unlisten__,e,"_mapActionListeners"))])},_initMapTypes:function(){var t=this._mapOptions.get("mapTypeId"),e=this._mapOptions.get("mapTypes");if(this.mapTypes=e,!e.get(t))return void(this._assembleListener=he.once(e,t+"_changed",Jt(this._assemble,this,t)));this._assemble(t)},_initDataLayer:function(){var t=new x.DataLayer;t.setMap(this),this.data=t},_initRtsVersionLoader:function(){this._rtsVersionLoader=new xe},_initUserLanguage:qt,_initEventGL:qt,_assemble:function(t){if(this._initRegistry(t||this.mapTypes.getSelectedTypeId()),this._initMapModel(),this._initMapAction(),this.__FORWARDS){var e=this;x.forEach(this.__FORWARDS,function(t,i){t=he.forward(e._mapAction,i,e),e._mapActionListeners&&e._mapActionListeners.push(t)})}this._listenDispatchStatus(),this.isReady&&this._assembleRest()},_assembleRest:function(){this.mapPane.setMap(this),this._initControl(),this.trigger("assemble")},_listenDispatchStatus:function(){this.__listen__("_dispatchStatusListeners",[he.addListener(this,"__BEGIN_DISPATCH__",Jt(this._onBeginDispatch,this,this)),he.addListener(this,"__STOP_DISPATCH__",Jt(this._onStopDispatch,this,this))])},_initRegistry:function(t){var e=this.mapTypes;e.setSelectedTypeId(t),this.unbind("mapType"),this._listenMapTypes(),this.bindTo("mapType",e,"selectedMapType"),this.mapPane.setMapTypeRegistry(e),this._adjustZoomLimit(this.get("mapType")),this.__sendNeloMapTypeId(t)},_listenMapTypes:function(){var t=this;this.__listen__("_mapTypesListeners",[he.addListener(this,"mapType_changed",function(e){t._mapType_changed(e)})])},_changeRegistry:function(t){var e=this.getMapTypeId(),i=this.mapTypeControl;this.mapTypes=t,this._initRegistry(e),i&&i.getMap()&&(i.setMap(null),i.setMap(this))},_extendProj:function(){var t=this.get("mapSystemProjection");if(t&&!t.fromPageXYToOffset){var e=this._mapView;t.fromPageXYToOffset=function(t){var i=e.getMapOffset();return t.clone().sub(i).sub(this.get("containerTopLeft"))},t.fromPageXYToPoint=function(t){var e=this.fromPageXYToOffset(t);return this.fromOffsetToPoint(e)},t.fromPageXYToCoord=function(t){var e=this.fromPageXYToOffset(t);return this.fromOffsetToCoord(e)}}},_initMapModel:function(){function t(t,e){l[t]=e}function i(){x.forEach(s,function(t){t in l&&o.set(t,l[t])}),l={}}function n(i){return function(n){var r=o.get(i);if(r===e)return o.set(i,n);r.equals&&r.equals(n)||r===n||(o.get("renderMode")===vt&&o._mapAction.isZooming()&&h[i]?t(i,n):o.set(i,n))}}var o=this,r=o._mapModel;if(!r.get("center")){r.set("size",o._mapView.getSize()),r.initPrimaryData(o._mapOptions),r.initTilePaneModel(),o.bindTo(["projection","mapSystemProjection","mapTypeId","padding","repeatX"],r),o._extendProj();var s=["center","centerPoint","zoom","bounds"],a=s.concat(["size","tilt","rotation","scale"]),h={};x.forEach(s,function(t){h[t]=1});var l={};o._zcl&&he.removeListener(o._zcl),o._zcl=he.addListener(o._mapAction,"zoomend",function(){i()}),x.forEach(a,function(t){he.addListener(o,t+"_m_changed",n(t)),o.bindTo(t+"_m",r,t)}),he.addListener(r,"__point_shifted",function(){o._pointShifted=!0}),he.addListener(o,"size_changed",function(t){o._size_changed(t)})}},getMapModel:function(){return this._mapModel},getMapView:function(){return this._mapView},getMapAction:function(){return this._mapAction},_adjustZoomLimit:function(t){var e=this._mapOptions,i=this._mapModel,n=t.minZoom,o=t.maxZoom;null===e.get("minZoom")&&e.set("userMinZoom",e.limitMinZoom(n)),null===e.get("maxZoom")&&e.set("userMaxZoom",o),i.set("mapTypeMinZoom",n),i.set("mapTypeMaxZoom",o),this._initMinMaxZoom(e,t)},_addInternalControl:function(t,e){if(e){var i=this._mapOptions,n=this,o=function(t){n[t]?n[t].getMap()!==n&&n[t].setMap(n):(n[t]=new e(i[t+"Options"]),n[t].setMap(n))};i[t]&&o(t),he.addListener(i,t+"_changed",function(t){return function(e){e?o(t):n[t]&&n[t].setMap(null)}}(t)),he.addListener(i,t+"Options_changed",function(t){return function(e){n[t]&&n[t].setOptions(e)}}(t))}},_addCopyrightControls:function(){var t=this,e=this.getPrimitiveProjection(),i=this._mapOptions.get("scaleControlOptions"),n=i&&i.position===U.BOTTOM_LEFT,o=n?["logoControl","mapDataControl","scaleControl"]:["scaleControl","logoControl","mapDataControl"];x.forEach(o,function(i){if("scaleControl"!==i||e===x.UTMK||e===x.UTMK_NAVER||e===x.EPSG3857){var n=x.capitalize(i);t._addInternalControl(i,x[n])}})},_addDefaultControls:function(){var t=this._mapOptions.get("__optionsOrder"),e=this;x.forEach(t,function(t){"mapTypeControl"!==t&&"zoomControl"!==t&&"compassControl"!==t||e._addInternalControl(t,x[x.capitalize(t)])})},_onBeginDispatch:function(t,e){var i=e.match(/\S+_changed$/gi);if(!i||!i.length){t=t||this,t.__FORWARDS||(t.__FORWARDS={});var n=he.forward(this._mapAction,e,t);t.__FORWARDS[e]=n,this._mapActionListeners&&this._mapActionListeners.push(n)}},_onStopDispatch:function(t,e){t=t||this,t.__FORWARDS&&(he.removeListener(t.__FORWARDS[e]),t.__FORWARDS[e]=null,delete t.__FORWARDS[e])},_initControl:function(){if(!this.controls){var t=this,e=this.controlPositioner=new x.CalcControlPosition(t),i=[];x.forEach(U,function(t,n){var o=new x.KVOArray;e.bind(o,n),i[t]=o}),this.controls=i,t._addCopyrightControls(),t._addDefaultControls()}},_triggerIdle:function(){this._mapAction.triggerIdle()},_triggerRedraw:function(){this._sizeChanged&&(this._sizeChanged=!1),this._pointShifted&&(this._pointShifted=!1),this._isTilingSystemChanged&&(this._isTilingSystemChanged=!1),this.trigger("redraw")},setScale:function(t){this._stopTransition(),this._mapAction.changeScale(t)},_stopTransition:function(){this._mapAction.stopTransition()},getMapTypeId:function(){return this.mapTypes.getSelectedTypeId()},getMapType:function(){return this.mapTypes?this.mapTypes.getSelectedType():null},fromEventToPointerEvent:function(t){return t=ae.fix(t.originalEvent||t),this._mapAction.fromEventToPointerEvent(t)},destroy:function(t){var e=this,i=t||!1;this._resizeListener&&(he.removeDOMListener(this._resizeListener),this._resizeListener=null,delete this._resizeListener),this._resizeMapListener&&(he.removeListener(this._resizeMapListener),this._resizeMapListener=null,delete this._resizeMapListener),this._mapPicker&&(this._mapPicker.destroy(),this._mapPicker=null,delete this._mapPicker),this._mapView.destroy(),this._mapAction.destroy(),this._mapOptions.destroy(),this._rtsVersionLoader.stop();var n=this.getElement();if(n.innerHTML="",i){n.style.backgroundImage='url("'+rt+'/auth_fail.png")',n.style.backgroundPosition="center center";try{n.style.backgroundSize="256px 256px"}catch(t){}}else n.style.background="none";for(var o,r=-1,s=0,a=x.Map.__instances.length;s<a;s++)if(o=x.Map.__instances[s],o.id===e.id){r=s;break}r>-1&&x.Map.__instances.splice(r,1)},_mapType_changed:function(t){this._rtsVersionLoader&&this._rtsVersionLoader.stop();var e=this.getOptions(),i=this.get("projection");if(t&&i){t.projection&&(e.maxBounds=e.limitMaxBounds(e.maxBounds));var n=this._mapModel,o=n.get("tileSize")||re(256,256),r=t.projection||x.EmptyProjection,s=t.tileSize||re(256,256);this._isTilingSystemChanged=i!==r||!1===o.equals(s),t.map=this;var a,h=t.getMapTypeOptions?t.getMapTypeOptions():null;h&&(h.map=this,a=h.overlayType,this.getProjection().set("tileExtra",h.tileExtra||0)),this.mapTypeId=this.getMapTypeId(),n.set("instantTiling",!0),n.set("mapTypeId",this.getMapTypeId()),this._adjustZoomLimit(t);var l=t.repeatX||!1,c=n.get("repeatX")!==l;this._isTilingSystemChanged&&this.refresh(!0),c&&this._mapModel.set("repeatX",l,this._isTilingSystemChanged),this._rtsVersionLoader&&a&&-1!==a.indexOf("ctt")&&this._rtsVersionLoader.start({mapOrLayer:this,imageMapType:t})}},_size_changed:function(t){this._resizeListener||this._mapView.setSize(t),this._sizeChanged=!0},_checkRedrawRequired:function(){var t=this._mapModel,e=t.get("containerTopLeft"),i=t.get("repeatX");if(this.__WILL_REDRAW)return this.__WILL_REDRAW=!1,this._triggerRedraw();(this._sizeChanged||this._isTilingSystemChanged||0===e.x&&0===e.y||i&&(!i||this._pointShifted))&&this._triggerRedraw()},__onIdle:function(){var t=this._mapOptions;if(t.updateSilently("center",this.getCenter()),t.updateSilently("zoom",this.getZoom()),t.updateSilently("bounds",this.getBounds()),t.updateSilently("size",this.getSize()),t.updateSilently("tilt",this.getTilt()),t.updateSilently("rotation",this.getRotation()),this._checkRedrawRequired(),this.__RESERVED_MOVE&&!this._mapAction.isZooming()){var e=this.__RESERVED_MOVE,i=e[0],n=e[1];this.__RESERVED_MOVE=null,delete this.__RESERVED_MOVE,this.__WILL_REDRAW=!0,this._mapAction.reset(),this[i].apply(this,n)}},_getPointerEvent:function(){var t=this.getProjection(),e=this.getCenter();if(t&&e){var i=this.getPrimitiveProjection(),n=t.fromCoordToOffset(e),o=t.fromOffsetToPoint(n),r={coord:e.clone(),point:o,offset:n,pointerEvent:null,domEvent:null};return i.fromPointToLatLng&&(r.latlng=e.clone()),r}},_getDefaultEventParameters:function(t){for(var e=!1,i=[],n=0,o=q.length;n<o;n++)if(q[n]===t){e=!0;break}return e&&0!==t.indexOf("key")?i.push(this._getPointerEvent()):t.indexOf("_changed")===t.length-8&&i.push(this.get(t.replace("_changed",""))),i},__sendNeloMapTypeId:function(t){if(x.CLIENT_ID){this.__prevMapTypeId=this.__mapTypeId,this.__mapTypeId=t;var e=["normal","terrain","satellite","hybrid","dark","dark_terrain"];this.__prevMapTypeId!==t&&-1!==e.indexOf(t)&&Me.send("setMapTypeId","log",{ncpKeyId:x.CLIENT_ID,mapTypeId:t})}},_initPicker:function(){var t=this._mapOptions;t.get("disablePicker"),this.get("renderMode")}}),x.Map.__instances=[],x.CustomControl=function(t,e){"string"!=typeof t&&(e=t,t=null),this.DEFAULT_OPTIONS=this.DEFAULT_OPTIONS||this._getDefaultControlOptions();var i=Qt({zIndex:gt++},this.DEFAULT_OPTIONS);this.setOptions(Qt({},i,e||{})),this._element=this._createElement(t),this._oldPosition=null,this._oldMap=null},te(x.CustomControl,x.KVO,{_beforeSetMap:qt,setMap:function(t){if(t&&t instanceof naver.maps.Map&&(!t.controls||!t.isReady))return void x.console.log(jt.TRY_AGAIN_CONTROL.slice(),Gt.DEFAULT_TWO_LINE.slice());var e=this.get("map"),i=this.get("position");t!==e&&(e&&(he.removeListener(this._renderModeListener),this.unbind("renderMode")),t&&(this._renderModeListener=he.addListener(this,"renderMode_changed",Jt(this._renderMode_changed,this)),this.bindTo("renderMode",t.getMapModel())),this._beforeSetMap(t),t?this._addControl(t,i):e&&this._removeControl(e,i),this.set("map",t),this._afterSetMap(t))},_afterSetMap:qt,_getDefaultControlOptions:function(){return{position:U.TOP_LEFT}},getMap:function(){return this.get("map")},setPosition:function(t){var e=this.get("map"),i=this.get("position"),n=this.DEFAULT_OPTIONS||{position:U.TOP_LEFT};"number"!=typeof t&&(t=n.position),e&&(this._removeControl(e,i),this._addControl(e,t)),this.set("position",t)},_createElement:function(t){var e=se.createElement("div","position:relative;");return t&&(e.innerHTML=t),se.setZIndex(e,this.get("zIndex")),e},html:function(t){if(!t)return this._element.innerHTML;this._element.innerHTML=t},getElement:function(){return this._element},_addControl:function(t,e){t.controls[e].push(this._element)},_removeControl:function(t,e){t.controls[e].removeElement(this._element)},setOptions:function(t){var e=this;if("string"==typeof t){var i=t,n=arguments[1];"position"===i?e.setPosition(n):e.set(i,n)}else x.forEach(t,function(t,i){e.setOptions(i,t)})},getOptions:function(t){var i=this,n={};return t!==e?this.get(t):(x.forEach(i.DEFAULT_OPTIONS,function(t,e){n[e]=i.get(e)}),n)},zIndex_changed:function(t){var e=this.getElement();e&&se.setZIndex(e,t)},_setAdvancedOptions:qt,_renderMode_changed:function(t){this._onRenderModeChanged&&this._onRenderModeChanged(t)}}),x.CalcControlPosition=function(t){this._panes={},this._mapDiv=t.getElement(),this._mapSize=t.getSize(),he.addListener(t,"size_changed",Jt(this._onSizeChanged,this))},x.CalcControlPosition.prototype={constructor:x.CalcControlPosition,bind:function(t,e){this._listeners=[he.addListener(t,"insert_at",Jt(this.insertAt,this,e,t)),he.addListener(t,"set_at",Jt(this.setAt,this,e,t)),he.addListener(t,"remove_at",Jt(this.removeAt,this,e,t))]},unbind:function(){he.removeListener(this._listeners),this._listeners.length=0,this._listeners=[]},insertAt:function(t,e,i){var n=this._typeToStyle(t);this._arrange(n,e,i)},setAt:function(t,e,i,n){n&&se.removeElement(n.parentNode);var o=this._typeToStyle(t);this._arrange(o,e,i)},removeAt:function(t,e,i,n){if(n){var o=this._typeToStyle(t),r=o[0],s=o[1];se.removeElement(n.parentNode),"bottom"===r&&this._alignBottom(o),"center"!==r&&"center"!==s||this._alignCenter(o)}},update:function(t){this._onSizeChanged(t||this._mapSize)},_getWrapper:function(t){var e=t.join("_"),i="border:0 none;margin:0;padding:0;pointer-events:none;";switch(e){case"top_left":case"bottom_left":case"left_center":i+="float:left";break;case"top_right":case"bottom_right":case"right_center":i+="float:right"}return se.createElement("div",i)},_bottomBaseline:function(t,e){var i=e.offsetHeight;if(t.minElement)if(i<t.minHeight){t.minElement=e,t.minHeight=i;for(var n,o=0,r=t.element.childNodes.length;o<r;o++)(n=t.element.childNodes[o])!==e&&1===n.nodeType&&(n.style.marginTop=-(n.offsetHeight-i)+"px")}else e.style.marginTop=-(i-t.minHeight)+"px",e.style.height=i+"px";else t.minElement=e,t.minHeight=i,e.style.height=i+"px"},_arrange:function(t,e,i){var n=this._getPaneInfo(t),o=n.element,r=e.getAt(i),s=t[0],a=t[1],h=this._getWrapper(t);"none"!==r.style.pointerEvents&&(r.style.pointerEvents="auto"),h.appendChild(r),se.insertAt(o,h,"bottom"!==a?i:0),"bottom"===s&&this._bottomBaseline(n,h),"center"!==s&&"center"!==a||this._alignCenter(t)},_typeToStyle:function(t){return t.toLowerCase().split("_")},_getPaneInfo:function(t){var e=t.join("_"),i=this._panes[e],n=i?i.element:null;if(posPane=this._panes[e],n)return i;var o=t[0],r=t[1],s="position:absolute;z-index:100;margin:0;padding:0;pointer-events:none;";if("center"===r)s+=o+":0;";else for(var a=0,h=t.length;a<h;a++)s+=t[a]+":0;";return n=se.createElement("div",s),i={element:n},this._panes[e]=i,this._mapDiv.appendChild(n),i},_alignCenter:function(t){var e=t[0],i=t[1],n=this._getPaneInfo(t).element,o=this._mapSize,r=se.getSize(n),s=x.round((o.width-r.width)/2)+"px",a=x.round((o.height-r.height)/2)+"px";if(1===t.length&&"center"===e)return n.style.left=s,void(n.style.top=a);"center"===i&&("top"===e||"bottom"===e?n.style.left=s:n.style.top=a)},_alignBottom:function(t){if("bottom"===t[0]){for(var e,i=this._getPaneInfo(t),n=[],o=1/0,r=null,s=0,a=i.element.childNodes.length;s<a;s++)e=i.element.childNodes[s],1===e.nodeType&&n.push(e);0!==n.length&&(x.forEach(n,function(t){var e=t.offsetHeight;t.offsetHeight<o&&(o=e,r=t)}),r.style.marginTop=0,r.style.height=o+"px",i.minElement=r,i.minHeight=o,x.forEach(n,function(t){if(t!==r){var e=t.offsetHeight;t.style.marginTop=-(e-o)+"px",t.style.height=e+"px"}}))}},_onSizeChanged:function(t){var e=this;e._mapSize=t,x.forEach(e._panes,function(t,i){-1!==i.indexOf("center")&&e._alignCenter(i.split("_"))})}},x.MapTypeControl=function(t){this.set("id","nmaptypecontrol-"+x.guid()),this._domListeners=[],this._registryListeners=[],this._registry=null,this._lazyMapTypeId=null,this.DEFAULT_OPTIONS={position:U.TOP_RIGHT,mapTypeIds:null,style:Y.BUTTON,hideTime:2e3},x.CustomControl.apply(this,[t])},te(x.MapTypeControl,x.CustomControl,{_beforeSetMap:function(t){if(t){var e=t.mapTypes;this._registry=e,this._prepareDOM(e),this._bindEvent(e)}else this._unbindEvent(),this._registry=null},_afterSetMap:function(t){t||(this._removeDOMEvents(),this._element.innerHTML="")},_addControl:function(t,e){x.CustomControl.prototype._addControl.apply(this,arguments),this._adjustUI(e)},_adjustUI:function(t){var e=t||this.get("position");if(this.get("style")===Y.DROPDOWN)switch(e){case U.BOTTOM_LEFT:case U.BOTTOM_CENTER:case U.BOTTOM_RIGHT:this._mapTypeListWrap.style.top="auto",this._mapTypeListWrap.style.bottom="29px";break;default:this._mapTypeListWrap.style.top="29px",this._mapTypeListWrap.style.bottom="auto"}else switch(e){case U.BOTTOM_LEFT:case U.BOTTOM_CENTER:case U.BOTTOM_RIGHT:this._subMapTypeWrap.style.top="-32px";break;default:this._subMapTypeWrap.style.top="32px"}},_bindEvent:function(t){this._registryListeners=[he.addListener(t,"addMapType",Jt(this._onAddMapType,this)),he.addListener(t,"removeMapType",Jt(this._onRemoveMapType,this)),he.addListener(t,"selectedMapType_changed",Jt(this._onMapTypeChanged,this))]},_unbindEvent:function(){he.removeListener(this._registryListeners),this._registryListeners.length=0},_onAddMapType:function(t,e){this.get("style")===Y.DROPDOWN?this._addMapTypeList(t,e):this._addMapTypeButton(t,e),this._lazyMapTypeId&&this._lazyMapTypeId===t&&(this._onMapTypeChanged(this._registry.getSelectedType()),this._lazyMapTypeId=null,delete this._lazyMapTypeId)},_onRemoveMapType:function(t,e){this.get("style")===Y.DROPDOWN?this._removeMapTypeList(t,e):this._removeMapTypeButton(t,e)},_clearMapType:function(){var t=this._registry;if(t){var e=this._mapTypeScheme,i=this;x.forEach(e,function(e,n){var o=e.subs||{};x.forEach(o,function(e,n){i._onRemoveMapType(n,t.get(n))}),i._onRemoveMapType(n,t.get(n))}),this._mapTypeScheme={}}},_onMapTypeChanged:function(t){if(t){var e=this._registry.getSelectedTypeId(),i=null,n=null,o=null;if(this.get("style")===Y.DROPDOWN)i=this._mapTypeScheme[e],n=i.element,this._mapTypeNameWrap.innerHTML=t.name||(t.getName?t.getName():e),n.style.backgroundColor="#f6f6f6",o=this.get("mapTypeElement"),o&&(o.style.backgroundColor="#fff"),this.set("mapTypeElement",n);else{var r=this._getParentMapTypeId(t);if(i=this._mapTypeScheme[r||e],!(n=i.element))return;o=this.get("mapTypeElement"),o&&(o.style.borderColor="#fff",o.style.backgroundColor="#fff",o.style.color="#444"),n.style.borderColor="#2A7CDD",n.style.backgroundColor="#2F87EC",n.style.color="#fff",x.forEach(i.subs,function(t,i){var n=t.element.getElementsByTagName("img")[0],o="-checked",r="-unchecked";e===i&&(r="-checked",o="-unchecked"),n.src=n.src.replace(o,r)}),this.set("mapTypeElement",n)}this.set("mapTypeId",e)}},_prepareDOM:function(t){this._element.style.margin="10px",this._element.innerHTML="",this.get("style")===Y.DROPDOWN?this._prepareDropdown(t):this._prepareButton(t);var e=t.getSelectedTypeId(),i=this.get("mapTypeIds")||t.getTypeIds();x.getIndexOfElement(i,e)>-1?this._onMapTypeChanged(t.getSelectedType()):this._lazyMapTypeId=e,this._style=this.get("style"),this._adjustUI()},_prepareButton:function(t){var e=this.get("mapTypeIds")||t.getTypeIds(),i="position:relative;z-index:1;padding:0;margin:0;list-style:none;display:block;height:30px;box-sizing:content-box !important;",n=se.createElement("ul",i),o=se.createElement("ul",i.replace("position:relative","position:absolute")+"left:0;width:100%;");n.style.borderRight="solid 1px #444",o.style.top="34px",o.style.display="none",this._mapTypeWrap=n,this._subMapTypeWrap=o,this._mapTypeScheme={};var r=Jt(this._addMapTypeButton,this);x.forEach(e,function(e){var i=t.get(e);i.uid.split(":").length<3&&r(e,i)}),x.forEach(e,function(e){var i=t.get(e);i.uid.split(":").length>=3&&r(e,i)}),this._element.appendChild(n),this._element.appendChild(o),this._domListeners=[he.addDOMListener(n,"mousedown",Jt(this._onDownButton,this)),he.addDOMListener(n,"mouseover",Jt(this._onOverButton,this)),he.addDOMListener(n,"mouseout",Jt(this._onOutButton,this)),he.addDOMListener(o,"mousedown",Jt(this._onDownCheckbox,this)),he.addDOMListener(o,"mouseover",Jt(this._onOverCheckbox,this)),he.addDOMListener(o,"mouseout",Jt(this._onOutCheckbox,this))]},_updateSubMapTypeStyle:function(t){var e=x.keys(t),i=e.length;0!==i&&(1===i?t[e[0]].listElement.style.border="solid 1px #444":x.forEach(e,function(e,n){var o=t[e].listElement;o.style.borderBottom=n<i-1?"0 none":"solid 1px #444",n>0&&(o.style.borderTop="solid 1px #ddd")}))},_addMapTypeButton:function(t,e){var i="position:relative;z-index:1;float:left;display:block;margin:0;padding:0;list-style:none;border:solid 1px #444;box-sizing:content-box !important;",n=lt+"height:26px;line-height:26px;border:solid 1px #fff;background-color:#fff;text-decoration:none;color:#000;font-size:13px;letter-spacing:-1px;font-family:"+ht,o="<a href='#' style='"+n+"'>{{name}}</a>",r=["<a href='#' style='"+n.replace("color:#000","color:#666")+"' title='{{name}}'>",'<img src="'+rt+'/maptype-unchecked.png" width="13" height="13" alt="" style="position:absolute;display:block;top:7px;left:7px;width:13px;height:13px;border:0 none;cursor:pointer;'+pt+'" />',"<span style='display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0;padding:0;color:#666;font-size:13px;letter-spacing:-1px;font-family:"+ht+";'>{{name}}</span>","</a>"].join(""),s=this._mapTypeScheme,a=e.name||(e.getName?e.getName():t),h=this._getParentMapTypeId(e),l=null,c=null;if(h&&h!==t){h=this._getParentMapTypeId(e),l=se.createElement("li",i.replace("float:left;",""));var u=r.replace(/\{\{name\}\}/g,a);"naver:satellite:hybrid"===e.uid&&(u=u.replace("-unchecked","-checked")),l.innerHTML=u,l.style.display="none",c=l.getElementsByTagName("a")[0],c.style.position="relative",c.style.paddingLeft="25px",c.__mapTypeId=t,c.onclick=Jt(this._preventLink,this),s[h]||(s[h]={element:null,listElement:null,uid:null,subs:{}}),s[h].subs[t]={element:c,listElement:l},this._updateSubMapTypeStyle(s[h].subs),this._subMapTypeWrap.appendChild(l)}else l=se.createElement("li",i),l.style.borderRight="0 none",l.innerHTML=o.replace("{{name}}",a),c=l.getElementsByTagName("a")[0],c.style.padding="0 7px",c.__mapTypeId=t,c.onclick=Jt(this._preventLink,this),s[t]?(s[t].element=c,s[t].uid=e.uid):s[t]={element:c,listElement:l,uid:e.uid,subs:{}},this._mapTypeWrap.appendChild(l)},_removeMapTypeButton:function(t,e){var i=this._getParentMapTypeId(e),n=this._mapTypeScheme[i||t];if(i===t){se.removeElement(n.element.parentNode),n.element=null;var o=!1;if(n.subs)for(var r in n.subs)if(n.subs.hasOwnProperty(r)&&n.subs[r]){o=!0;break}o||(n.uid=null)}else se.removeElement(n.subs[t].listElement),n.subs[t]=null,delete n.subs[t],this._updateSubMapTypeStyle(n.subs)},_getParentMapTypeId:function(t){var e=this._mapTypeScheme,i=t.uid,n=i.split(":"),o=n[0]+":"+n[1],r=null;for(var s in e)if(e.hasOwnProperty(s)&&e[s].uid===o){r=s;break}return r},_getButtonElement:function(t){if("A"===t.tagName&&t.__mapTypeId)return t;for(;t&&"A"!==t.tagName&&"DIV"!==t.tagName;)t=t.parentNode;return t&&t.__mapTypeId?t:null},_hideCheckbox:function(e){function i(){for(var t=0,e=r.length;t<e;t++)r[t].style.display="none";o.style.display="none"}var n=e||0,o=this._subMapTypeWrap,r=o.getElementsByTagName("li");t.clearTimeout(this._hoverTimer),n?this._hoverTimer=t.setTimeout(i,n):i()},_showCheckboxOf:function(t){var e=this._mapTypeScheme[t];if(e){var i=0;x.forEach(e.subs,function(t){t.listElement.style.display="block",i++}),i&&(this._subMapTypeWrap.style.display="block")}},_onDownButton:function(e){var i=ae.fix(e),n=this._getButtonElement(i.target);if(n){var o=n.__mapTypeId,r=this._mapTypeScheme[o];t.clearTimeout(this._hoverTimer),this._hideCheckbox(),this._showCheckboxOf(o),x.forEach(r.subs,function(t,e){if(t.element.getElementsByTagName("img")[0].src.indexOf("-checked")>-1)return o=e,!0}),this.setMapTypeId(o)}},_onOverButton:function(e){var i=ae.fix(e),n=this._getButtonElement(i.target);if(n){var o=this._registry.getSelectedType(),r=this._getParentMapTypeId(o)||this._registry.getSelectedTypeId(),s=this._registry.get(n.__mapTypeId),a=this._getParentMapTypeId(s)||n.__mapTypeId;this._mapTypeScheme[a];r===a&&(t.clearTimeout(this._hoverTimer),this._showCheckboxOf(a))}},_onOutButton:function(t){this._hideCheckbox(this._getHideTime())},_onDownCheckbox:function(t){var e=ae.fix(t),i=this._getButtonElement(e.target);if(i){var n=this._registry.getSelectedTypeId(),o=i.__mapTypeId;n===o&&(o=this._getParentMapTypeId(this._registry.get(o))),this.setMapTypeId(o)}},_onOverCheckbox:function(e){t.clearTimeout(this._hoverTimer)},_onOutCheckbox:function(t){this._hideCheckbox(this._getHideTime())},_prepareDropdown:function(t){var e=this.get("mapTypeIds")||t.getTypeIds(),i=t.getSelectedType(),n="\uc9c0\ub3c4 \uc720\ud615 \ubcc0\uacbd";i&&(n=i.name||(i.getName?i.getName():t.getSelectedTypeId()));var o=se.createElement("div",lt+"position:relative;z-index:0;"),r=se.createElement("ul","position:absolute;z-index:1;top:29px;left:0;padding:0;margin:0;list-style:none;display:none;width:100%;border-top:solid 1px #444;border-bottom:solid 1px #444;box-sizing:content-box !important;"),s=se.createElement("a","text-decoration:none;color:#000;font-size:13px;letter-spacing:-1px;display:block;padding:0 21px 0 9px;text-align:left;background-color:#fff;border:solid 1px #444;height:28px;line-height:28px;min-width:69px !important;box-sizing:content-box !important;font-family:"+ht);s.innerHTML="<span>"+n+'</span><img src="'+rt+'/maptype-arrow-down.png" width="8" height="4" alt="\ud3bc\uce58\uae30" style="position:absolute;z-index:0;top:14px;right:8px;width:8px;height:4px;'+pt+'" />',s.href="#",s.title="\uc9c0\ub3c4 \uc720\ud615 \ubcc0\uacbd",s.onclick=Jt(this._preventLink,this),o.appendChild(s),this._mapTypeNameWrap=s.getElementsByTagName("span")[0],this._dropDownArrow=s.getElementsByTagName("img")[0],this._mapTypeListWrap=r,this._mapTypeScheme={};var a=Jt(this._addMapTypeList,this);x.forEach(e,function(e){a(e,t.get(e))}),this._element.appendChild(o),this._element.appendChild(r),this._domListeners=[he.addDOMListener(s,"mousedown",Jt(this._onToggleList,this)),he.addDOMListener(r,"mousedown",Jt(this._onDownListItem,this)),he.addDOMListener(r,"mouseover",Jt(this._onOverListItem,this)),he.addDOMListener(r,"mouseout",Jt(this._onOutListItem,this))]},_addMapTypeList:function(t,e){var i=lt+"height:28px;line-height:28px;background-color:#fff;text-decoration:none;color:#666;font-size:13px;letter-spacing:-1px;padding:0 9px;font-family:"+ht,n="<a href='#'' style='"+i+"'>{{name}}</a>",o=this._mapTypeScheme,r=e.name||(e.getName?e.getName():t),s=se.createElement("li","display:block;margin:0;padding:0;list-style:none;background-color:#fff;border:solid 1px #444;box-sizing:content-box !important;");s.innerHTML=n.replace("{{name}}",r),s.style.borderTop="0 none",s.style.borderBottom="0 none";var a=s.getElementsByTagName("a")[0];a.__mapTypeId=t,a.onclick=Jt(this._preventLink,this),o[t]={element:a,uid:e.uid,listElement:s},this._mapTypeListWrap.appendChild(s)},_removeMapTypeList:function(t,e){var i=this._mapTypeScheme[t];se.removeElement(i.listElement),i=null,this._mapTypeScheme[t]=null,delete this._mapTypeScheme[t]},_toggleList:function(t){var e="-down",i="-up";t||(e="-up",i="-down"),se.visible(this._mapTypeListWrap,t),this._dropDownArrow.src=this._dropDownArrow.src.replace(e,i)},_onToggleList:function(){this._toggleList(!1===se.visible(this._mapTypeListWrap))},_onDownListItem:function(t){var e=ae.fix(t),i=this._getButtonElement(e.target);if(i){var n=i.__mapTypeId;this.setMapTypeId(n),this._toggleList(!1)}},_onOverListItem:function(t){var e=ae.fix(t),i=this._getButtonElement(e.target);i&&(i.style.backgroundColor="#f6f6f6")},_onOutListItem:function(t){var e=ae.fix(t),i=this._getButtonElement(e.target);i&&i.__mapTypeId!==this._registry.getSelectedTypeId()&&(i.style.backgroundColor="#fff")},_preventLink:function(t){ae.fix(t).preventDefault()},setMapTypeId:function(t){t!==this._registry.getSelectedTypeId()&&this._registry.setSelectedTypeId(t)},mapTypeIds_changed:function(t){var e=this;if(e._registry){var i=e._registry,n=t||i.getTypeIds();e._clearMapType(),e._lazyMapTypeId=i.getSelectedTypeId(),x.forEach(n,function(t){var n=i.get(t);e._onAddMapType(t,n)})}},_removeDOMEvents:function(){x.forEach(this._domListeners,function(t){he.removeDOMListener(t)}),this._domListeners.length=0},style_changed:function(t){this._element&&(this._style!==t&&(this._removeDOMEvents(),ae.endTouch(),this._prepareDOM(this._registry)),this._style=t)},_getHideTime:function(){return Math.max(parseInt(this.getOptions("hideTime"),10),150)}});var ge=[["\ubd80\ub3d9\uc0b0",17],["\uac70\ub9ac",15],["\uc74d,\uba74,\ub3d9",13],["\uc2dc,\uad70,\uad6c",10],["\uc2dc,\ub3c4",7],["\uad6d\uac00",5]];x.ZoomControl=function(t){this.DEFAULT_OPTIONS={position:U.TOP_LEFT,style:Y.LARGE,legendDisabled:!1},this.__LEGEND_SCHEME__=ge,this.SCALER_GAP=10,this._domListeners=[],this.set("legendAllowed",!0),x.CustomControl.apply(this,[t])},te(x.ZoomControl,x.CustomControl,{_beforeSetMap:function(t){if(t){if(t instanceof naver.maps.Map&&!t.isReady)return;this._prepareDOM(),this._bindDOMEvent()}else this._unbindDOMEvent(),this._destroyDOM()},_afterSetMap:function(t){if(t){if(t instanceof naver.maps.Map&&!t.isReady)return;var e=t.getMapModel();this.bindTo("minZoom",e,"userMinZoom"),this.bindTo("maxZoom",e,"userMaxZoom"),this.bindTo("mapTypeMinZoom",e),this.bindTo("mapTypeMaxZoom",e),this.bindTo("zoom",t),this.bindTo("mapType",t),this._adjustLegend()}else this.unbind("minZoom"),this.unbind("maxZoom"),this.unbind("mapTypeMinZoom"),this.unbind("mapTypeMaxZoom"),this.unbind("zoom"),this.unbind("mapType",t)},_addControl:function(t,e){x.CustomControl.prototype._addControl.apply(this,arguments),this._adjustLegend(e)},_prepareDOM:function(){var t=function(t,e,i){var n=se.createElement(t,e);return i&&(n.innerHTML=i),n},e=function(t,e){for(var i=0,n=e.length;i<n;i++)t.appendChild(e[i])},i=function(t,e,i,n){var o={url:rt+"/zoom-"+t,width:e||0,height:i||0,alt:n||""};return'<img src="{{url}}" width="{{width}}" height="{{height}}" alt="{{alt}}" style="margin:0;padding:0;border:solid 0 transparent;display:block;box-sizing:content-box !important;max-width:none !important;max-height:none !important;min-width:0 !important;min-height:0 !important;width:{{width}}px;height:{{height}}px;" />'.replace(/{{(\w+)}}/g,function(t,e){return o[e]})},n="position:relative;z-index:2;width:28px;height:22px;cursor:pointer;display:block;overflow:hidden;box-sizing:content-box !important;",o="position:absolute;top:7px;bottom:7px;left:12px;width:4px;height:100%;display:block;",r=t("div","position:relative;z-index:0;width:28px;margin:10px;border:solid 1px #444;box-sizing:content-box !important;"),s=t("a",n+"border-bottom:solid 1px #cacdd1;",i("in-large-normal.png",28,22,"\uc9c0\ub3c4 \ud655\ub300")),a=t("div","position:relative;width:28px;height:118px;overflow:hidden;margin:0;padding:7px 0;background-color:#fff;cursor:pointer;box-sizing:content-box !important;"),h=t("div",o+"background-color:#2F87EC;"),l=t("div",o+"background-color:#CACDD1;"),c=t("a","position:absolute;left:4px;width:18px;height:10px;top:27px;border:solid 1px #444;cursor:move;display:block;overflow:hidden;box-sizing:content-box !important;",i("handle.png",18,10,"\uc9c0\ub3c4 \ud655\ub300/\ucd95\uc18c \uc2ac\ub77c\uc774\ub354")),u=t("a",n+"border-top:solid 1px #cacdd1;",i("out-large-normal.png",28,22,"\uc9c0\ub3c4 \ucd95\uc18c")),p=t("div","position:absolute;top:22px;width:44px;height:0;overflow:visible;display:none;"),d=t("div","display:block;margin:0;padding:0;");se.disableSelection(r),s.href="#",u.href="#",c.href="#",e(a,[h,l,c]),e(r,[s,a,u]),p.appendChild(d),r.appendChild(p),this._doms={wrap:r,zoomIn:s,zoomOut:u,zoomInImg:s.getElementsByTagName("img")[0],zoomOutImg:u.getElementsByTagName("img")[0],scaler:a,scalerOn:h,scalerOff:l,slider:c,legend:p,legendInner:d},this.style_changed(this.get("style")||Y.LARGE),this._element.appendChild(r),this._drawLegend()},_createLegendItem:function(t,e){var i=this.SCALER_GAP,n=this.get("maxZoom")||21,o=se.createElement("div","position:absolute;top:0;left:0;z-index:0;margin:0;padding:0;border:solid 0 transparent;display:block;box-sizing:content-box !important;width:44px;height:17px;overflow:hidden;"),r=t||"",s=e||1,a=(n-21)*i+3,h=se.createElement("img",ct+pt+"width:44px;height:17px;"),l=se.createElement("span",lt+"font-family:"+ht+";position:relative;z-index:2;line-height:17px;color:#fff;font-size:11px;padding:0 4px 0 0;text-align:center;letter-spacing:-1px;");return h.src=rt+"/zoom-legend-left-normal.png",h.alt="",l.innerHTML=r,o.appendChild(h),o.appendChild(l),o.style.top=a+i*(21-s)+"px",{zoom:s,element:o,imgEl:h,textEl:l}},_drawLegend:function(){var t=this._doms.legendInner,e=[],i=Jt(this._createLegendItem,this);t.innerHTML='<h4 style="visibility:hidden;width:0;height:0;overflow:hidden;margin:0;padding:0;">\uc9c0\ub3c4 \ucee8\ud2b8\ub864\ub7ec \ubc94\ub840</h4>',x.forEach(this.__LEGEND_SCHEME__,function(n,o){var r=n[0],s=n[1],a=i(r,s);0===o&&(a.imgEl.src=a.imgEl.src.replace("-normal","-on")),a.zoom=s,e.push(a),t.appendChild(a.element)}),this.__legends__=e,this._adjustLegend()},_bindDOMEvent:function(){var t=(this.get("map"),this._doms),e=t.zoomIn,i=t.zoomOut,n=t.scaler,o=t.slider,r=he.addDOMListener,s=function(t){ae.stop(t)};this._domListeners=[r(e,"click",s),r(i,"click",s),r(e,"mousedown",Jt(this._onClickZoomIn,this)),r(i,"mousedown",Jt(this._onClickZoomOut,this)),r(n,"mouseover",Jt(this._onMouseOver,this)),r(n,"mouseout",Jt(this._onMouseOut,this)),r(n,"mousedown",Jt(this._onMouseDownScaler,this)),r(o,"mousedown",Jt(this._onMouseDownSlider,this)),r(o,"click",s)]},_unbindDOMEvent:function(){he.removeDOMListener(this._domListeners),this._domListeners.length=0,this._domListeners=[]},_onClickZoomIn:function(t){ae.stop(t);var e=this.getMap(),i=e.getZoom()+1;e.setZoom(i,!0)},_onClickZoomOut:function(t){ae.stop(t);var e=this.getMap(),i=e.getZoom()-1;e.setZoom(i,!0)},_onMouseOver:function(){!this.get("legendDisabled")&&this.get("legendAllowed")&&(this._doms.legend.style.display="")},_onMouseOut:function(){!this.get("legendDisabled")&&this.get("legendAllowed")&&(this._doms.legend.style.display="none")},_onMouseDownScaler:function(t){t=ae.fix(t),t.stop();var e,i=t.target||t.srcElement,n=t.pos(),o=this._doms.scaler,r=n.pageY-se.getOffset(o).y;if(i!==this._doms.slider){e=Math.floor(r/this.SCALER_GAP);var s=this.getMap(),a=s.getZoom(),h=this.get("maxZoom")-e;h!==a&&s.setZoom(h,!0)}},_onMouseDownSlider:function(t){t=ae.fix(t),t.stop();var e=this,i=this._doms.scaler,n=this.getMap(),o=[he.addDOMListener(T,"mousemove",function(t){t=ae.fix(t),t.stop();var o,r=t.target||t.srcElement,s=t.pos(),a=s.pageY-se.getOffset(i).y;r!==i&&r.parentNode!==i||(o=Math.floor((a+2)/e.SCALER_GAP),n.setZoom(e.get("maxZoom")-o,!0))}),he.addDOMListener(T,"mouseup",function(t){he.removeDOMListener(o),o=null})]},zoom_changed:function(t){var i,n=this.get("maxZoom");if(n!==e&&(i=n-t),!(t===e||n===e||i<0)){var o=this._doms,r=(this.getMap(),this.get("minZoom")),s=this.SCALER_GAP,a=i*s+4,h=o.zoomIn,l=o.zoomOut,c=o.zoomInImg,u=o.zoomOutImg;t===r?(l.style.cursor="default",c.src=c.src.replace("-dimmed","-normal"),u.src=u.src.replace("-normal","-dimmed")):t===n?(h.style.cursor="default",c.src=c.src.replace("-normal","-dimmed"),u.src=u.src.replace("-dimmed","-normal")):(h.style.cursor="pointer",l.style.cursor="pointer",c.src=c.src.replace("-dimmed","-normal"),u.src=u.src.replace("-dimmed","-normal")),o.slider.style.top=a+"px",o.scalerOff.style.height=a+"px"}},minZoom_changed:function(){this._setScalerHeight(),this.zoom_changed(this.get("zoom"))},maxZoom_changed:function(){this._setScalerHeight(),this.zoom_changed(this.get("zoom"))},mapTypeMinZoom_changed:function(t){this._setScalerHeight(),this.zoom_changed(this.get("zoom"))},mapTypeMaxZoom_changed:function(t){this._setScalerHeight(),this.zoom_changed(this.get("zoom"))},mapType_changed:function(t){var e=!t||"\xa9 NAVER Corp."!==t.vendor||t.projection!==x.EPSG3857;this.get("legendAllowed")===e&&this.set("legendAllowed",!e)},legendAllowed_changed:function(t){this._doms&&!t&&this.get("legendDisabled")&&se.visible(this._doms.legend,!1)},style_changed:function(t){var e=this._doms;if(e&&e.wrap){var i=e.scaler,n=e.zoomIn,o=e.zoomInImg,r=e.zoomOut,s=e.zoomOutImg,a=22,h="block",l="solid 1px #cacdd1",c="-small",u="-large";t===Y.SMALL&&(h="none",l="0 none",a=28,c="-large",u="-small"),i.style.display=h,n.style.height=a+"px",n.style.borderBottom=l,o.style.height=a+"px",o.height=a,o.src=o.src.replace(c,u),r.style.height=a+"px",s.style.height=a+"px",s.height=a,s.src=s.src.replace(c,u)}},_setScalerHeight:function(){var t=this.get("minZoom"),i=this.get("maxZoom"),n=this.get("mapTypeMaxZoom"),o=119;i!==e&&t!==e&&n!==e&&(o=(i-t)*this.SCALER_GAP+6,this._doms.scaler.style.height=o+"px",this._doms.scalerOn.style.height=o+"px",this._adjustLegend())},_adjustLegend:function(t){var e=this.getMap();if(!(!e||e.isCustomMapType&&e.isCustomMapType())){var i=t||this.get("position"),n=this.get("minZoom"),o=this.get("maxZoom");x.forEach(this.__legends__,function(t){var e=t.zoom,i=t.element;i.style.visibility=e>o||e<n?"hidden":"visible"});var r=this._doms.legend,s=36,a="-left-",h="-right-",l="0 0 0 4px";switch(i){case U.TOP_RIGHT:case U.RIGHT_TOP:case U.BOTTOM_RIGHT:case U.RIGHT_BOTTOM:case U.RIGHT_CENTER:s=-51,a="-right-",h="-left-",l="0 4px 0 0"}r.style.left=s+"px";var c=this.SCALER_GAP;defaultTop=((o||21)-21)*c+3,this.__legends__&&x.forEach(this.__legends__,function(t){var e=t.imgEl,i=t.textEl,n=t.element,o=t.zoom;e.src=e.src.replace(a,h),i.style.padding=l,n.style.top=defaultTop+c*(21-o)+"px"})}},_destroyDOM:function(){this._doms=null,delete this._doms,this._element.innerHTML="",this._doms={}}}),x.LogoControl=function(t){this.DEFAULT_OPTIONS={position:U.BOTTOM_RIGHT},x.CustomControl.apply(this,arguments)},te(x.LogoControl,x.CustomControl,{_beforeSetMap:function(t){t?this._bindEvent(t):this._unbindEvent()},_bindEvent:function(t){this.bindTo("mapType",t)},_unbindEvent:function(t){this.unbind("mapType")},_createElement:function(){var t=rt+"/new-naver-logo-normal.png",e="display:block;width:45px;height:10px;overflow:hidden;",i=se.createElement("a",e+"margin:0 5px 7px 12px;");return"A"===i.tagName&&(i.href="https://ssl.pstatic.net/static/maps/mantle/notice/legal.html",i.target="_blank"),i.innerHTML='<img src="'+t+'" width="45" height="10" alt="NAVER" style="'+e+"border:0 none;margin:0;padding:0;"+pt+'" />',this._logoImg=i.getElementsByTagName("img")[0],i},mapType_changed:function(t){t&&(t.darktheme?this._logoImg.src=this._logoImg.src.replace("-normal.png","-dark.png"):this._logoImg.src=this._logoImg.src.replace("-dark.png","-normal.png"))}}),x.MapDataControl=function(t){this.DEFAULT_OPTIONS={position:U.BOTTOM_RIGHT},this.POPUP_PADDING=15,this._providers={},x.CustomControl.apply(this,arguments)},te(x.MapDataControl,x.CustomControl,{_afterSetMap:function(t){t?(this.bindTo("mapType",t),this.bindTo("size",t),this._listeners=[he.addListener(t,"addLayer",Jt(this._onAddLayer,this)),he.addListener(t,"removeLayer",Jt(this._onRemoveLayer,this)),he.addListener(t,"idle",Jt(this._onIdle,this))],t.getElement().appendChild(this._popupEl),this._syncToLayers(t.layers)):(this.unbind("mapType"),this.unbind("size"),he.removeListener(this._listeners),this._popupEl.parentElement.removeChild(this._popupEl))},_onIdle:function(){x.forEach(this._providers,function(t,e){t.checkValid()})},_createElement:function(){var t=this,e=function(){var t=se.createElement("div","margin:0;padding:0 0 2px 10px;height:19px;line-height:19px;color:#444;font-family:"+ht+";font-size:11px;clear:both;white-space:nowrap;pointer-events:none;");return t.className="map_copyright",t}();return t._viewMoreAnchor=function(){var e=se.createElement("a","font-family:"+ht+";font-size:11px;line-height: 19px;margin:0 0 0 5px;padding:0;color:#444;float:left;pointer-events:auto;text-decoration:underline;display:none;");return e.setAttribute("href","#"),se.setText(e,"\ub354\ubcf4\uae30"),he.addDOMListener(e,"click",function(e){ae.preventDefault(e),t._toggleViewMoreEl()}),e}(),t._popupEl=function(){var e=se.createElement("div","border:1px solid #292930;background:#fff;padding:"+t.POPUP_PADDING+"px;color:#333;position:absolute;font-size:11px;max-width:350px !important;line-height:1.5;max-height:300px !important;clear:both;display:none"),i=se.createElement("h5","font-size: 12px;margin-top: 0px;margin-bottom: 10px;"),n=se.createElement("a","position:absolute;top:8px;right:8px;width:14px;height:14px;font-size:14px;line-height:14px;display:block;overflow:hidden;color:#444;text-decoration:none;font-weight:bold;text-align:center;"),o=se.createElement("div");return se.setText(i,"\uc9c0\ub3c4 \ub370\uc774\ud130"),n.setAttribute("href","#"),se.setText(n,"x"),he.addDOMListener(n,"click",function(t){ae.stop(t),se.visible(e,!1)}),e.appendChild(i),e.appendChild(n),e.appendChild(o),e}(),e.appendChild(this._viewMoreAnchor),e},size_changed:function(t){this._layout(t),this._updatePopupSize()},mapType_changed:function(t){if(this.getMap()){var e=this._providers.basemap;e?e.setMapType(this.get("mapType")):this._providers.basemap=new x.MapDataProvider(this),this._adjColor(t),this._layout()}},_adjColor:function(t){var e=t,i="#444";e.darktheme&&(i="#fff"),this._element.style.color=i,this._viewMoreAnchor.style.color=i,x.forEach(this._providers,function(t,e){t.setColor(i)})},_syncToLayers:function(t){var e=this,i=t.getLayerNames();x.forEach(this._providers,function(t,n){if("basemap"!==n){var o=x.getIndexOfElement(i,n);o<0?e._removeProvider(n):i.splice(o,1)}}),x.forEach(i,function(i){e._addProvider(t.get(i))}),this._layout()},_addProvider:function(t){var e=t.get("name");this._providers[e]||(this._providers[e]=new x.MapDataProvider(this,t.getLayerType()))},_removeProvider:function(t){this._providers[t]&&(this._providers[t].setMapType(null),this._providers[t]=null,delete this._providers[t])},_onAddLayer:function(t){this._addProvider(t),this._layout()},_onRemoveLayer:function(t){this._removeProvider(t)},_layout:function(){var t=this.getMap().getSize(),e=t.width<300;se.visible(this._viewMoreAnchor,e),x.forEach(this._providers,function(t,i){t.setVisible(!e)})},_toggleViewMoreEl:function(){se.toggle(this._popupEl),this._updatePopupSize()},_updatePopupSize:function(){if(se.visible(this._popupEl)){var t=this.getMap().getSize(),e=4*this.POPUP_PADDING;this._popupEl.style.width=x.round(t.width-e)+"px";var i=se.getSize(this._popupEl),n=t.height/2-i.height/2,o=t.width/2-i.width/2;se.setOffset(this._popupEl,ee(x.round(o),x.round(n)))}},getElement:function(){return this._element},getPopupElement:function(){return this._popupEl}}),x.MapDataProvider=function(t,e){this._isBasemap=!1,this._items=[],this._control=t,e||(this._isBasemap=!0,e=t.get("mapType")),this._createElement(),this.setMapType(e)},te(x.MapDataProvider,x.KVO,{_createElement:function(){var t=this._control.getElement();this._isBasemap&&(this._vendorElement=se.createElement("div","float:left"),t.insertBefore(this._vendorElement,t.firstChild)),this._element=se.createElement("div","float:left"),t.appendChild(this._element)},setMapType:function(t){this.set("mapType",t)},setVisible:function(t){se.visible(this._element,t)},setColor:function(t){x.forEach(this._items,function(e){e.el.style.color=t}),this._vendorElement&&(this._vendorElement.firstChild.style.color=t)},mapType_changed:function(t){t?(this._isBasemap&&this._removeItemElements(),this._create(t),this.checkValid()):this._destroy()},_create:function(t){var e=t,i=T.createDocumentFragment(),n=T.createDocumentFragment(),o=this._control.getPopupElement().getElementsByTagName("div")[0];if(x.forEach(e.provider,Jt(function(t,e){var o=this._createItemElements(t),r=t.bounds&&[],s=t.area||null;if(t.bounds){!x.getLiteralType(t.bounds)&&t.bounds.length?x.forEach(t.bounds,function(t){r.push(x.box(t))}):r=[x.box(t.bounds)]}this._items.push({el:o[0],cloneEl:o[1],area:s,bounds:r,exclude:t.exclude}),i.appendChild(o[0]),n.appendChild(o[1])},this)),this._isBasemap){var r=this._createItemElements({title:t.vendor||""});this._items.push({el:r[0],cloneEl:r[1]}),this._vendorElement.appendChild(r[0]),n.insertBefore(r[1],n.firstChild),o.insertBefore(n,o.firstChild)}else o.appendChild(n);this._element.appendChild(i)},_createItemElements:function(t){var e,i;return t.link?(e=se.createElement("a","pointer-events:auto;white-space:pre;"),e.setAttribute("target","_blank"),e.setAttribute("href",t.link)):e=se.createElement("span","white-space:pre;"),$t.browser.msie&&(e.style.opacity="0.99"),i=e.cloneNode(),i.style.color="#444",i.style.float="left",se.setText(e,t.title),se.setText(i,t.title),[e,i]},_removeItemElements:function(){x.forEach(this._items,function(t){se.removeElement(t.el),se.removeElement(t.cloneEl),t=null}),this._items.length=0,this._items=[]},checkValid:function(){var t=this._control.getMap().getBounds();x.forEach(this._items,function(e){var i=!1;if(e.bounds||e.area){if(e.area){var n=t.isInsidePolygon(e.area);i=e.exclude?!n:n}else x.forEach(e.bounds,function(n){var o=null;o=n instanceof oe?ie.bounds(n.getSW(),n.getNE()):n,i=e.exclude?!o.hasBounds(t):o.intersects(t)});se.visible(e.el,i),se.visible(e.cloneEl,i)}})},_destroy:function(){this._removeItemElements(),se.removeElement(this._element),this._isBasemap&&se.removeElement(this._vendorElement),this._items=null,delete this._items}}),x.ScaleControl=function(t){this._IMG_SCALE=[rt+"/new-scale-normal-l.png",rt+"/new-scale-normal-b.png",rt+"/new-scale-normal-r.png"],this._SCALE_SIZE=50,this._MAX_SCALE_SIZE=100,this._textEl=null,this._textShadowCss="-1px 0 rgba(255, 255, 255, 0.8), 0 1px rgba(255, 255, 255, 0.8), 1px 0 rgba(255, 255, 255, 0.8), 0 -1px rgba(255, 255, 255, 0.8)",this.DEFAULT_OPTIONS={position:U.BOTTOM_RIGHT},x.CustomControl.apply(this,arguments)},te(x.ScaleControl,x.CustomControl,{getScaleText:function(){var t=this._textEl;return t?t.innerHTML:""},_afterSetMap:function(t){if(t){var e=t.getMapModel(),i=2===t.get("renderMode");this.bindTo(["mapTypeMinZoom","mapTypeMaxZoom","mapSystemProjection","projection","tileSize"],e),this.bindTo(["zoom","center","mapType"],t),i&&(this._listeners=[he.addListener(t,"idle",Jt(this._update,this))])}else this.unbind(["mapTypeMinZoom","mapTypeMaxZoom","projection","tileSize","zoom","center","mapType"]),this._listeners&&he.removeListener(this._listeners)},zoom_changed:function(){var t=this.get("map");t&&2===t.get("renderMode")||this._update()},center_changed:function(){var t=this.get("map"),e=this.get("projection");t&&2===t.get("renderMode")||e.pointPerMeter||this._update()},projection_changed:function(){this.get("mapSystemProjection")&&(this._calcPointPerMeter(),this._update())},tileSize_changed:function(){this.get("mapSystemProjection")&&(this._calcPointPerMeter(),this._update())},mapType_changed:function(t){if(t){var e="#222225",i=this._textShadowCss,n="-dark-",o="-normal-";t.darktheme&&(e="#fff",i=i.replace(/rgba\(255, 255, 255, 0\.8/g,"rgba(48, 48, 51, 0.8"),n="-normal-",o="-dark-"),this._textEl.style.color=e;try{this._textEl.style.textShadow=i}catch(t){}x.forEach(this._barEls,function(t){t.src=t.src.replace(n,o)})}},_calcPointPerMeter:function(t,e){var i=t||this.get("projection"),n=e||this.get("tileSize");if(i&&n){if(!i.name||i.name.indexOf("EPSG:3857")>-1||!i.pointPerMeter)return void(this._pointPerMeter=null);var o=n.width,r=256/o;this._pointPerMeter=i.pointPerMeter*r}},_update:function(){var t,e=this.get("map"),i=e.getZoom(),n=this.get("projection"),o=this.getElement(),r=this._barEls[1],s=parseInt(o.style.width,10),a=52,h=a-6;if(x.useGL()&&(i+=1),"UTMK_NAVER"===n.name||"UTMK"===n.name){s!==a&&(o.style.width=a+"px",r.style.width=h+"px");var l=this._calcMeterPerPixel(i);t=this._SCALE_SIZE*l}else{var c=this._calcMeterPerPixel(i,this._MAX_SCALE_SIZE);t=this._getRoundNum(c),a=Math.round(this._MAX_SCALE_SIZE*(t/c)),h=a-6,o.style.width=a+"px",r.style.width=h+"px",r.width=h}t=this._addUnitToDistance(t),se.setText(this._textEl,t)},_addUnitToDistance:function(t){return t=t>1e3?x.round(t/100)/10+"km":x.round(10*t)/10+"m"},_calcMeterPerPixel:function(t,e){var i=this.get("map"),n=this.get("projection"),o=this.get("mapSystemProjection"),r=0;if(this._pointPerMeter)r=this._pointPerMeter/o.scaleUp(1,t);else{var s=i.getCenterPoint(),a=o.scaleUp(s.clone(),t),h=o.scaleDown(new x.Point(a.x+e,a.y),t),l=o.fromPointToCoord(s),c=o.fromPointToCoord(h);r=n.getDistance?n.getDistance(l,c):0}return r},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i},_createElement:function(){var t="position:absolute;left:0;bottom:0;z-index:2;display:block;width:3px;height:8px;overflow:hidden;margin:0;padding:0;border:0 none;"+pt,e="text-shadow:"+this._textShadowCss+";",i=this._IMG_SCALE,n=se.createElement("div","position:relative;width:52px;height:14px;margin:0 12px 6px 2px;overflow:hidden;");n.innerHTML=["<span style='display:block;margin:0;padding:0 4px;text-align:center;font-size:10px;line-height:11px;font-family:"+ht+";font-weight:700;color:#000;"+e+"'></span>",'<img src="'+i[1]+'" width="43" height="3" alt="" style="'+t.replace("h:3px","h:43px").replace("t:8px","t:3px").replace("left:0","left:3px;")+'" />','<img src="'+i[0]+'" width="3" height="8" alt="" style="'+t+'" />','<img src="'+i[2]+'" width="3" height="8" alt="" style="'+t.replace("left:","right:")+'" />'].join(""),this._textEl=n.getElementsByTagName("span")[0];var o=n.getElementsByTagName("img");return this._barEls=[o[1],o[0],o[2]],n}}),x.DrawingUtil={getDrawingType:function(){if(!this._drawingType){var t="NONE";this.isSupportedSVG()?t="SVG":this.isSupportedVML()&&(t="VML"),this._drawingType=t}return this._drawingType},isSupportedSVG:function(){return T.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")},isSupportedVML:function(){if(this.__isSupportedVML===e){var t=T.createElement("div");t.innerHTML='<v:shape id="vml_flag1" adj="1" />';var i=t.firstChild;i.style.behavior="url(#default#VML)",this.__isSupportedVML=!i||"object"==typeof i.adj}return this.__isSupportedVML},isSupportedCanvas:function(){if(this.__isSupportedCanvas===e){var t=T.createElement("canvas");this.__isSupportedCanvas=!(!t.getContext||!t.getContext("2d"))}return this.__isSupportedCanvas},getBounds:function(t){var e,i,n,o=t.length,r=1/0,s=1/0,a=-1/0,h=-1/0;for(e=0;e<o;e++)i=t[e].x,n=t[e].y,r=Math.min(r,i),s=Math.min(s,n),a=Math.max(a,i),h=Math.max(h,n);return{min:ee(r,s),max:ee(a,h)}}},x.LineUtil={simplify:function(t,e){var i=Math.min(e||1,150);if(!t.length)return t.slice();var n=i*i;return t=this._reducePoints(t,n),t=this._simplifyDP(t,n)},pointToSegmentDistance:function(t,e,i){return Math.sqrt(this._sqClosestPointOnSegment(t,e,i,!0))},closestPointOnSegment:function(t,e,i){return this._sqClosestPointOnSegment(t,e,i)},_simplifyDP:function(t,i){var n=t.length,o=typeof Uint8Array!=e+""?Uint8Array:Array,r=new o(n);r[0]=r[n-1]=1,this._simplifyDPStep(t,r,i,0,n-1);var s,a=[];for(s=0;s<n;s++)r[s]&&a.push(t[s]);return a},_simplifyDPStep:function(t,e,i,n,o){var r,s,a,h=0;for(s=n+1;s<=o-1;s++)(a=this._sqClosestPointOnSegment(t[s],t[n],t[o],!0))>h&&(r=s,h=a);h>i&&(e[r]=1,this._simplifyDPStep(t,e,i,n,r),this._simplifyDPStep(t,e,i,r,o))},_reducePoints:function(t,e){for(var i=[t[0]],n=1,o=0,r=t.length;n<r;n++)this._sqDist(t[n],t[o])>e&&(i.push(t[n]),o=n);return o<r-1&&i.push(t[r-1]),i},clipSegment:function(t,e,i,n){var o,r,s,a=n?this._lastCode:this._getBitCode(t,i),h=this._getBitCode(e,i);for(this._lastCode=h;;){if(!(a|h))return[t,e];if(a&h)return!1;o=a||h,r=this._getEdgeIntersection(t,e,o,i),s=this._getBitCode(r,i),o===a?(t=r,a=s):(e=r,h=s)}},_getEdgeIntersection:function(t,e,i,n){var o,r,s=e.x-t.x,a=e.y-t.y,h=n.min,l=n.max;return 8&i?(o=t.x+s*(l.y-t.y)/a,r=l.y):4&i?(o=t.x+s*(h.y-t.y)/a,r=h.y):2&i?(o=l.x,r=t.y+a*(l.x-t.x)/s):1&i&&(o=h.x,r=t.y+a*(h.x-t.x)/s),new L.Point(o,r,!0)},_getBitCode:function(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n},_sqClosestPointOnSegment:function(t,e,i,n){var o,r=e.x,s=e.y,a=i.x-r,h=i.y-s,l=a*a+h*h;return l>0&&(o=((t.x-r)*a+(t.y-s)*h)/l,o>1?(r=i.x,s=i.y):o>0&&(r+=a*o,s+=h*o)),a=t.x-r,h=t.y-s,n?a*a+h*h:new L.Point(r,s)}},x.shapes={},x.shapes.Shape=function(t){this.options=Qt({},this.options,t),this.element=this._initShape(),this._updateShape(),this._updateStyle()},x.shapes.Shape.prototype={constructor:x.shapes.Shape,setOptions:function(t){this.options=Qt(this.options,t),this.isShapeChanged(t)&&this._updateShape(),this.isStyleChanged(t)&&this._updateStyle()},_initShape:function(){return null},_updateShape:qt,_updateStyle:function(){var t=this.getElement(),e=this.options;se.setZIndex(t,e.zIndex),se.visible(t,e.visible)},_calcBounds:function(t,e,i,n,o){return 0===t&&0===e&&0===i&&0===n?{x:0,y:0,w:0,h:0}:{x:x.round(t-o),y:x.round(e-o),w:x.round(i+2*o),h:x.round(n+2*o)}},getElement:function(){return this.element},getShapeElement:function(){return this._shapeElement||this.element||null}},function(){if(x.shapes.CommonShape={isStyleChanged:function(t){return t.strokeColor!==e||t.strokeOpacity!==e||t.strokeWeight!==e||t.strokeStyle!==e||t.strokeLineCap!==e||t.strokeLineJoin!==e||t.fillColor!==e||t.fillOpacity!==e||t.visible!==e||t.zIndex!==e},toPathString:function(t){var e=[];if(0===t.length)return"";e.push("M");for(var i=0,n=t.length;i<n;i++)e.push(t[i].x+","+t[i].y),0===i&&e.push("L");return e.join(" ")}},x.shapes.CommonShape.circle={options:{strokeColor:"#007EEA",strokeOpacity:1,strokeWeight:1,strokeStyle:"solid",fillColor:"none",fillOpacity:1,center:ee(0,0),radius:0},isShapeChanged:function(t){return t.center!==e||t.radius!==e},isStyleChanged:x.shapes.CommonShape.isStyleChanged},x.shapes.CommonShape.rectangle={options:{strokeColor:"#007EEA",strokeOpacity:1,strokeWeight:1,strokeStyle:"solid",fillColor:"none",fillOpacity:1,minBoundPoint:ee(0,0),maxBoundPoint:ee(0,0)},isShapeChanged:function(t){return t.minBoundPoint!==e||t.maxBoundPoint!==e},isStyleChanged:x.shapes.CommonShape.isStyleChanged},x.shapes.CommonShape.path={options:{strokeColor:"#007EEA",strokeOpacity:1,strokeWeight:1,strokeStyle:"solid",fillColor:"none",fillOpacity:1,path:[],minBoundPoint:ee(0,0),maxBoundPoint:ee(0,0)},isShapeChanged:function(t){return t.path!==e},isStyleChanged:function(t){return t.strokeColor!==e||t.strokeOpacity!==e||t.strokeWeight!==e||t.strokeStyle!==e||t.strokeLineCap!==e||t.strokeLineJoin!==e||t.visible!==e||t.zIndex!==e},isIconChanged:function(t){return t.startIcon!==e||t.endIcon!==e||t.startIconSize!==e||t.endIconSize!==e||t.strokeColor!==e},toPathString:x.shapes.CommonShape.toPathString},x.shapes.CommonShape.closedPath={options:{strokeColor:"#007EEA",strokeOpacity:1,strokeWeight:1,strokeStyle:"solid",fillColor:"#007EEA",fillOpacity:.3,paths:[[]],minBoundPoint:ee(0,0),maxBoundPoint:ee(0,0)},isShapeChanged:function(t){return t.path!==e},isStyleChanged:x.shapes.CommonShape.isStyleChanged,toPathString:x.shapes.CommonShape.toPathString},"NONE"===x.DrawingUtil.getDrawingType()){var t=function(){};t.prototype={constructor:t,_initShape:qt,setCenter:qt,setRadius:qt,setOptions:qt,getOptions:qt,setBounds:qt,getBounds:qt,getShapeElement:qt,getElement:qt,setPath:qt},x.shapes.Circle=function(){},te(x.shapes.Circle,t),x.shapes.Ellipse=function(){},te(x.shapes.Ellipse,t),x.shapes.Rectangle=function(){},te(x.shapes.Rectangle,t),x.shapes.Path=function(){},te(x.shapes.Path,t),x.shapes.ClosedPath=function(){},te(x.shapes.ClosedPath,t)}}(),function(){x.DrawingUtil.isSupportedSVG()&&(x.shapes.ShapeSVG=function(t){this.DASH_STYLE={solid:"0",shortdash:"2,1",shortdot:"1,1",shortdashdot:"2,1,1,1",shortdashdotdot:"2,1,1,1,1,1",dot:"1,2",dash:"3,2",longdash:"7,2",dashdot:"3,2,1,2",longdashdot:"7,2,1,2",longdashdotdot:"7,2,1,2,1,2"},x.shapes.Shape.call(this,t),this._setBounds()},te(x.shapes.ShapeSVG,x.shapes.Shape,{_initShape:function(){function t(t,e){i.setAttribute(t,e)}var e=this._calcBoundsFromOptions(),i=this._makeSVGTag($t.browser.msie?"svg":"svg:svg");return t("version","1.1"),t("width",e.w+"px"),t("height",e.h+"px"),t("viewBox",e.x+" "+e.y+" "+e.w+" "+e.h),t("overflow","visible"),i.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),t("style","position:absolute;overflow:visible;margin:0;padding:0;border:0;width:"+e.w+"px; height:"+e.h+"px;pointer-events:none;"),this._shapeElement=this._makeSVGTag("path"),this._shapeElement.setAttribute("fill-rule","evenodd"),i.appendChild(this._shapeElement),i},setOptions:function(t){x.shapes.Shape.prototype.setOptions.call(this,t),this._setBounds()},_makeSVGTag:function(t){return T.createElementNS("http://www.w3.org/2000/svg",t)},_updateShape:function(){},_updateStyle:function(){var t=this._getCssText(this.options,this.__outlineWeight);this._shapeElement.setAttribute("style",t+"pointer-events:visiblePainted;"),x.shapes.Shape.prototype._updateStyle.call(this)},_setBounds:function(){var t=this.getElement(),e=this._calcBoundsFromOptions(),i=t.style;return i.left=e.x+"px",i.top=e.y+"px",i.width=e.w+"px",i.height=e.h+"px",t.setAttribute("width",e.w+"px"),t.setAttribute("height",e.h+"px"),t.setAttribute("viewBox",e.x+" "+e.y+" "+e.w+" "+e.h),this._bounds=e,e},getBounds:function(){return this._bounds},_calcBoundsFromOptions:function(){return this._calcBounds(0,0,0,0,0)},_getCssText:function(t,e){if(x.isEmptyObject(t))return"";var i=e||0,n=parseInt(t.strokeWeight,10)+i,o=[];if("none"!=t.strokeColor){o.push("stroke:"+t.strokeColor,"stroke-width:"+n+"px","stroke-opacity:"+t.strokeOpacity);var r=this._getLineCap(t.strokeLineCap),s=this._getLineJoin(t.strokeLineJoin),a=this._getDashStyle(t.strokeStyle,t.strokeWeight,r);r&&o.push("stroke-linecap:"+r),s&&o.push("stroke-linejoin:"+s),a&&o.push("stroke-dasharray:"+a)}else o.push("stroke:none");"none"!=t.fillColor?o.push("fill:"+t.fillColor,"fill-opacity:"+t.fillOpacity):o.push("fill:none");var h=o.join(";");return h?h+";":""},_getDashStyle:function(t,e,i){var n;if(x.isArray(t))n=t.join(",");else{n=[];for(var o,r=parseFloat(e),s=(this.DASH_STYLE[t]||"0").split(","),a=0,h=s.length;a<h;a++)o=parseInt(s[a],10),o=o*r+(o>1?r:0),i&&h>1&&(a%2==0?o=Math.max(1,o-r):o*=2),n[a]=o;n=n.join(",")}return n=n||this.DASH_STYLE.solid,"0"===n?null:n},_getLineCap:function(t){var e=(t||"").toLowerCase(),i=["flat","butt","round","square"];return x.getIndexOfElement(i,e)>-1?("flat"===e&&(e="butt"),e):null},_getLineJoin:function(t){var e=(t||"").toLowerCase(),i=["miter","round","bevel"];return x.getIndexOfElement(i,e)>-1?e:null},_setOutlineWeight:function(t){this.__outlineWeight=t,this._updateStyle()}}))}(),function(){x.DrawingUtil.isSupportedSVG()&&(x.shapes.CircleSVG=function(t){x.shapes.ShapeSVG.call(this,t)},te(x.shapes.CircleSVG,x.shapes.ShapeSVG,[x.shapes.CommonShape.circle],{setCenter:function(t){this.options.center=t,this._updateShape(),this._setBounds()},setRadius:function(t){this.options.radius=t,this._updateShape(),this._setBounds()},_updateShape:function(){var t=this.options,e=t.radius,i=t.center.x-e,n=t.center.y-e;this._shapeElement.setAttribute("d",["M",i,n+e,"A",e,e,0,1,0,i,n+e-1,"Z"].join(" "))},_calcBoundsFromOptions:function(){var t=this.options,e=t.radius,i=t.center.x-e,n=t.center.y-e,o=2*e,r=o,s=t.strokeWeight;return this._calcBounds(i,n,o,r,s)}}),"SVG"===x.DrawingUtil.getDrawingType()&&(x.shapes.Circle=x.shapes.CircleSVG))}(),function(){x.DrawingUtil.isSupportedSVG()&&(x.shapes.ClosedPathSVG=function(t){x.shapes.ShapeSVG.call(this,t),this._shapeElement.setAttribute("stroke-linejoin","round")},te(x.shapes.ClosedPathSVG,x.shapes.ShapeSVG,[x.shapes.CommonShape.closedPath],{setPath:function(t,e,i,n){var o=this.options;o.paths=t,o.minBoundPoint=e,o.maxBoundPoint=i,this._updateShape(n),this._setBounds()},_updateShape:function(t){for(var e,i=[],n=this.options.paths,o=0,r=n.length;o<r;o++)e=x.LineUtil.simplify(n[o],t),i.push(this.toPathString(e));0!==i.length&&i[0]||(i=["M 0,0"]),this._shapeElement.setAttribute("d",i.join(" Z ")+" Z")},_calcBoundsFromOptions:function(){var t=this.options,e=t.minBoundPoint,i=t.maxBoundPoint,n=e.x,o=e.y,r=Math.abs(i.x-n),s=Math.abs(i.y-o),a=t.strokeWeight;return this._calcBounds(n,o,r,s,a)}}),"SVG"===x.DrawingUtil.getDrawingType()&&(x.shapes.ClosedPath=x.shapes.ClosedPathSVG))}(),function(){if(x.DrawingUtil.isSupportedSVG()){x.shapes.PathSVG=function(t){t&&t.fillColor&&(t.fillColor="none"),x.shapes.ShapeSVG.call(this,t),this._shapeElement.setAttribute("stroke-linejoin","round")},te(x.shapes.PathSVG,x.shapes.ShapeSVG,[x.shapes.CommonShape.path],{setOptions:function(t){t.fillColor&&(t.fillColor="none"),x.shapes.ShapeSVG.prototype.setOptions.call(this,t),this.isIconChanged(t)&&this._updateIcons(t)},_updateIcons:function(t){this._defsElement||(this._defsElement=this._makeSVGTag("defs"),this.element.insertBefore(this._defsElement,this._shapeElement)),t.startIcon&&(this._startIcon=this._startIcon||this._addMarker(0),this._setIconShape(this._startIcon,t.startIcon,0)),t.endIcon&&(this._endIcon=this._endIcon||this._addMarker(1),this._setIconShape(this._endIcon,t.endIcon,1)),this._startIcon&&null===t.startIcon&&(this._removeMarker(this._startIcon,0),this._startIcon=null),this._endIcon&&null===t.endIcon&&(this._removeMarker(this._endIcon,1),this._endIcon=null),this._setIconSize(),this._updateIconsStyle(),this._startIcon||this._endIcon||!this._defsElement||(this._defsElement.parentNode.removeChild(this._defsElement),this._defsElement=null),this._defsElement&&x.Agent.browser.msie&&x.Agent.browser.version>9&&this._forceRender()},_setIconShape:function(t,e,i){if(t){var n,o,r=t.childNodes[0],s=10,a=[0,0,s,s],h=[[ee(s,s),ee(0,5),ee(s,0)],[ee(0,0),ee(s,5),ee(0,s)]],l=[["M",0,5,"A",5,5,0,1,0,0,4.99],[ee(0,5),ee(5,s),ee(s,5),ee(5,0)]],c=5;switch(e){case W.OPEN_ARROW:var u=0===i?-1:1;n=h[i],n[0].x=n[0].y+=u,n[1].x-=2*u,n[2].x+=u,n[2].y-=u,c=n[1].x-2*u,o=this.toPathString(n);break;case W.BLOCK_ARROW:n=h[i],o=this.toPathString(n)+" Z";break;case W.CIRCLE:n=l[0],o=n.join(" ")+" Z";break;case W.DIAMOND:n=l[1],o=this.toPathString(n)+" Z"}r.setAttribute("d",o),t.setAttribute("viewBox",a.join(" ")),t.setAttribute("refX",c),t.setAttribute("refY",5)}},_setIconSize:function(){var t=function(t,e,i){t&&(i?t.setAttribute("markerUnits","userSpaceOnUse"):(t.setAttribute("markerUnits","strokeWidth"),i=e===W.OPEN_ARROW?5:3),t.setAttribute("markerWidth",i),t.setAttribute("markerHeight",i))};t(this._startIcon,this.options.startIcon,this.options.startIconSize),t(this._endIcon,this.options.endIcon,this.options.endIconSize)},_updateIconsStyle:function(){var t=this.options.strokeColor,e=function(e,i){var n="";e&&(n=i<2?"fill:none; stroke-width:2px; stroke-linecap:round; stroke:"+t+";":"fill:"+t+"; stroke:none;",e.childNodes[0].setAttribute("style",n))};e(this._startIcon,this.options.startIcon),e(this._endIcon,this.options.endIcon)},_addMarker:function(t){var e=x.guid(),i=this._makeSVGTag("marker"),n=this._makeSVGTag("path"),o=0===t?"marker-start":"marker-end";return i.setAttribute("id",e),i.setAttribute("orient","auto"),i.appendChild(n),this._defsElement.appendChild(i),this._shapeElement.setAttribute(o,"url(#"+e+")"),i},_removeMarker:function(t,e){var i=0===e?"marker-start":"marker-end";this._shapeElement.removeAttribute(i),this._defsElement.removeChild(t)},setPath:function(t,e,i,n){var o=this.options;o.path=t,o.minBoundPoint=e,o.maxBoundPoint=i,this._updateShape(n),this._setBounds()},_updateShape:function(t){var e=x.LineUtil.simplify(this.options.path,t),i=this.toPathString(e);i||(i="M 0 0"),this._shapeElement.setAttribute("d",i),this._defsElement&&x.Agent.browser.msie&&x.Agent.browser.version>9&&this._forceRender()},_forceRender:function(){var t=this.getElement();t&&t.parentNode&&t.parentNode.insertBefore(t,t)},_calcBoundsFromOptions:function(){var t=this.options,e=t.minBoundPoint,i=t.maxBoundPoint,n=e.x,o=e.y,r=Math.abs(i.x-n),s=Math.abs(i.y-o),a=t.strokeWeight;return this._calcBounds(n,o,r,s,a)}}),"SVG"===x.DrawingUtil.getDrawingType()&&(x.shapes.Path=x.shapes.PathSVG)}}(),function(){x.DrawingUtil.isSupportedSVG()&&(x.shapes.RectangleSVG=function(t){x.shapes.ShapeSVG.call(this,t)},te(x.shapes.RectangleSVG,x.shapes.ShapeSVG,[x.shapes.CommonShape.rectangle],{setBounds:function(t,e){var i=this.options;i.minBoundPoint=t,i.maxBoundPoint=e,this._updateShape(),this._setBounds()},_updateShape:function(){var t=this.options,e=t.minBoundPoint,i=t.maxBoundPoint,n=e.x,o=e.y,r=Math.abs(i.x-n),s=Math.abs(i.y-o);this._shapeElement.setAttribute("d",["M",n,o,"L",n+r,o,n+r,o+s,n,o+s,"Z"].join(" "))},_calcBoundsFromOptions:function(){var t=this.options,e=t.minBoundPoint,i=t.maxBoundPoint,n=e.x,o=e.y,r=Math.abs(i.x-n),s=Math.abs(i.y-o),a=t.strokeWeight;return this._calcBounds(n,o,r,s,a)}}),"SVG"===x.DrawingUtil.getDrawingType()&&(x.shapes.Rectangle=x.shapes.RectangleSVG))}(),function(){x.DrawingUtil.isSupportedSVG()&&(x.shapes.EllipseSVG=function(t){x.shapes.ShapeSVG.call(this,t)},te(x.shapes.EllipseSVG,x.shapes.RectangleSVG,{_updateShape:function(){var t=this.options,e=t.minBoundPoint,i=t.maxBoundPoint,n=e.x,o=e.y,r=Math.abs(i.x-n)/2,s=Math.abs(i.y-o)/2;this._shapeElement.setAttribute("d",["M",n,o+s,"A",r,s,0,1,0,n,o+s-1,"Z"].join(" "))}}),"SVG"===x.DrawingUtil.getDrawingType()&&(x.shapes.Ellipse=x.shapes.EllipseSVG))}(),function(){if(x.DrawingUtil.isSupportedVML()){try{T.namespaces.add("v","urn:schemas-microsoft-com:vml");var t=T.createElement("style"),e=T.getElementsByTagName("head")[0];e.insertBefore(t,e.firstChild.firstChild);var i=t.styleSheet,n="behavior: url(#default#VML);";i.addRule("v\\:shape",n),i.addRule("v\\:path",n),i.addRule("v\\:fill",n),i.addRule("v\\:stroke",n)}catch(t){}x.shapes.ShapeVML=function(t){x.shapes.Shape.call(this,t)},te(x.shapes.ShapeVML,x.shapes.Shape,{setOptions:function(t){this.options=Qt(this.options,t),this._updateShape()},_initShape:function(){var t=se.createElement("v:shape","position:absolute;width:1px;height:1px;margin:0;padding:0;border:0;"),e=se.createElement("v:path"),i=se.createElement("v:fill"),n=se.createElement("v:stroke");t.setAttribute("coordorigin","0 0"),t.setAttribute("coordsize","1 1"),i.setAttribute("on",!1),n.setAttribute("on",!1),t.appendChild(e),t.appendChild(i),t.appendChild(n),this._shapeElement=t,this._pathElement=e,this._fillElement=i,this._strokeElement=n;var o=se.createElement("div","position:absolute;overflow:visible;margin:0;padding:0;border:0;top:0;left:0;");return o.appendChild(t),o},_updateShape:function(){},_updateStyle:function(){var t=this.options;if(!x.isEmptyObject(t)){var e=this._strokeElement,i=this._fillElement;if("none"==t.strokeColor)e.on=!1;else{e.on=!0,e.color=t.strokeColor||"transparent",e.weight=t.strokeWeight+"px",e.opacity=t.strokeOpacity;var n=this._getLineCap(t.strokeLineCap),o=this._getLineJoin(t.strokeLineJoin),r=this._getDashStyle(t.strokeStyle);n&&(e.endcap=n),o&&(e.joinstyle=o),r&&(e.dashstyle=r)}"none"==t.fillColor?i.on=!1:(i.on=!0,i.color=t.fillColor||"transparent",i.opacity=t.fillOpacity),x.shapes.Shape.prototype._updateStyle.call(this)}},_getDashStyle:function(t){if(!t)return null;return x.isArray(t)?t.join(" "):t},_getLineCap:function(t){var e=(t||"").toLowerCase(),i=["flat","butt","square","round"];return x.getIndexOfElement(i,e)>-1?("butt"===e&&(e="flat"),e):null},_getLineJoin:function(t){var e=(t||"").toLowerCase(),i=["miter","round","bevel"];return x.getIndexOfElement(i,e)>-1?e:null}})}}(),function(){x.DrawingUtil.isSupportedVML()&&(x.shapes.CircleVML=function(t){x.shapes.ShapeVML.call(this,t)},te(x.shapes.CircleVML,x.shapes.ShapeVML,[x.shapes.CommonShape.circle],{setCenter:function(t){this.options.center=t,this._updateShape()},setRadius:function(t){this.options.radius=t,this._updateShape()},_updateShape:function(){this._updateStyle();var t=this.options,e=t.radius,i=2*e,n=t.center.x-e,o=t.center.y-e;this._pathElement.v=["AR",n,o,n+i,o+i,"0 0 0 0 X E"].join(" ")}}),"VML"===x.DrawingUtil.getDrawingType()&&(x.shapes.Circle=x.shapes.CircleVML))}(),function(){x.DrawingUtil.isSupportedVML()&&(x.shapes.ClosedPathVML=function(t){x.shapes.ShapeVML.call(this,t)},te(x.shapes.ClosedPathVML,x.shapes.ShapeVML,[x.shapes.CommonShape.closedPath],{setPath:function(t,e,i,n){var o=this.options;o.paths=t,o.minBoundPoint=e,o.maxBoundPoint=i,this._updateShape(n)},_updateShape:function(t){this._updateStyle();for(var e,i=[],n=this.options.paths,o=0,r=n.length;o<r;o++)e=x.LineUtil.simplify(n[o],t),i.push(this.toPathString(e));this._shapeElement.style.display="none",this._pathElement.v=i.join(" X ")+" X E",this._shapeElement.style.display=""}}),"VML"===x.DrawingUtil.getDrawingType()&&(x.shapes.ClosedPath=x.shapes.ClosedPathVML))}(),function(){x.DrawingUtil.isSupportedVML()&&(x.shapes.PathVML=function(t){t&&t.fillColor&&(t.fillColor="none"),x.shapes.ShapeVML.call(this,t)},te(x.shapes.PathVML,x.shapes.ShapeVML,[x.shapes.CommonShape.path],{setPath:function(t,e,i,n){var o=this.options;o.path=t,o.minBoundPoint=e,o.maxBoundPoint=i,this._updateShape(n)},setOptions:function(t){t.fillColor&&(t.fillColor="none"),x.shapes.ShapeVML.prototype.setOptions.call(this,t),(t.hasOwnProperty("startIcon")||t.hasOwnProperty("endIcon"))&&this._updateIcons(t)},_updateIcons:function(t){var e=x.keys(t)[0],i="startIcon"===e?"startArrow":"endArrow",n=["open","block","oval","diamond"];this._shapeElement.getElementsByTagName("stroke")[0][i]=n[t[e]-1]||"none"},_updateShape:function(t){this._updateStyle(),this._shapeElement.style.display="none";var e=x.LineUtil.simplify(this.options.path,t),i=this.toPathString(e);i||(i="M 0 0"),i+=" E",this._pathElement.v=i,this._shapeElement.style.display=""}}),"VML"===x.DrawingUtil.getDrawingType()&&(x.shapes.Path=x.shapes.PathVML))}(),function(){x.DrawingUtil.isSupportedVML()&&(x.shapes.RectangleVML=function(t){x.shapes.ShapeVML.call(this,t)},te(x.shapes.RectangleVML,x.shapes.ShapeVML,[x.shapes.CommonShape.rectangle],{setBounds:function(t,e){this.options.minBoundPoint=t,this.options.maxBoundPoint=e,this._updateShape()},_updateShape:function(){this._updateStyle();var t=this.options,e=t.minBoundPoint,i=t.maxBoundPoint,n=e.x,o=e.y,r=Math.abs(i.x-n),s=Math.abs(i.y-o),a=n,h=o,l=n+r,c=o+s;this._pathElement.v=["M",a,h,"L",l,h,l,c,a,c,"X E"].join(" ")}}),"VML"===x.DrawingUtil.getDrawingType()&&(x.shapes.Rectangle=x.shapes.RectangleVML))}(),function(){x.DrawingUtil.isSupportedVML()&&(x.shapes.EllipseVML=function(t){x.shapes.ShapeVML.call(this,t)},te(x.shapes.EllipseVML,x.shapes.RectangleVML,{_updateShape:function(){this._updateStyle();var t=this.options,e=t.minBoundPoint,i=t.maxBoundPoint,n=e.x,o=e.y,r=Math.abs(i.x-n),s=Math.abs(i.y-o);this._pathElement.v=["AR",n,o,n+r,o+s,"0 0 0 0 X E"].join(" ")}}),"VML"===x.DrawingUtil.getDrawingType()&&(x.shapes.Ellipse=x.shapes.EllipseVML))}(),x.OverlayView=function(){},te(x.OverlayView,x.KVO,{__notifyChanged:function(t){var e=this.get(t),i="_"+t+"_changed";this[i]&&this[i](e),x.KVO.prototype.__notifyChanged.apply(this,[t])},_bindMap:function(t){var e=this,i=t.getMapModel(),n=t.getMapView(),o=t.getMapAction();e.bindTo("mapCenter",t,"center"),e.bindTo("mapZoom",t,"zoom"),e.bindTo("mapSize",t,"size"),e.bindTo("mapBounds",t,"bounds"),e.bindTo("tileRepeatX",t,"repeatX"),e.bindTo(["panes","mapDiv"],n),e._renderModeListener=he.addListener(this,"renderMode_changed",Jt(this._renderMode_changed,this)),e.bindTo(["mapSystemProjection","padding","paddingOffset","containerTopLeft","renderMode"],i),e.bindTo(["ef_overlay","ef_overlaylayer","ef_overlayimage","ef_floatpane"],o),e._redrawListeners=[he.addListener(t,"redraw",Jt(e._onRedraw,e)),he.addListener(t,"zoom_changed",Jt(e._onRedraw,e))],e._isAdded=!0,e._isZoomEffect=!1,e._isEffectCustomOverlay=!1},_onEffectEnd:function(){this._isZoomEffect&&(this._isZoomEffect=!1,this._onRedraw())},_onEffectStart:function(){this._isZoomEffect=!0},_onScale:function(t){if(this.get("ef_overlay"))if(this.scale)this.scale(t);else if(this.getElement&&this.getEffectAnchor){var e=this.getElement(),i=this.getEffectAnchor();this._isEffectCustomOverlay=!0,se.setScale(e,1/t,{x:i.x,y:i.y},!0)}},_onRedraw:function(){this._isAdded&&(this._isZoomEffect||(this.draw(),he.trigger(this,"draw"),this._isEffectCustomOverlay&&se.transform(this.getElement(),1,0,0,{x:0,y:0})))},_unbindMap:function(){this._isAdded&&(this.unbind("mapSystemProjection"),this.unbind("padding"),this.unbind("paddingOffset"),this.unbind("mapCenter"),this.unbind("mapZoom"),this.unbind("mapSize"),this.unbind("mapBounds"),this.unbind("tileRepeatX"),this.unbind("panes"),this.unbind("mapDiv"),this.unbind("containerTopLeft"),this.unbind("renderMode"),this.unbind("ef_overlay"),this.unbind("ef_overlaylayer"),this.unbind("ef_overlayimage"),this.unbind("ef_floatpane"),he.removeListener(this._renderModeListener),he.removeListener(this._redrawListeners),this._effectListener&&he.removeListener(this._effectListener),this._isAdded=!1,this._isZoomEffect=!1,this._isEffectCustomOverlay=!1,this._effectListener=null)},setMap:function(t){if(t&&t.getMapModel||(t=null),t&&2===t.get("renderMode")){var e=this instanceof naver.maps.OverlayView&&["Polygon","Polyline","Rectangle","Circle","Ellipse","PathOverlay","PatternPolyline","MarkerGroup"].indexOf(this.OVERLAY_TYPE)<0;if(!!!this.get("pane")&&!(this instanceof naver.maps.Marker||this instanceof naver.maps.InfoWindow||e))return void this.switchTo(2,t)}this.getMap()&&(this.get("ef_overlay")&&this.getMap().getMapAction().clearOverlayPanePosition(),this.onRemove(),this._unbindMap(),he.trigger(this,"removed")),this.set("map",t),t&&(this._bindMap(t),this.onAdd(),he.trigger(this,"added"),this.draw(),he.trigger(this,"draw"))},getMap:function(){return this.get("map")},getProjection:function(){return this.getMap()?this.get("mapSystemProjection"):null},getContainerTopLeft:function(){return this.getMap()?this.get("containerTopLeft"):null},getMapOffset:function(){if(!this.getMap())return null;var t=this.get("paddingOffset");return se.getOffset(this.get("mapDiv")).add(t)},getPanes:function(){return this.getMap()?this.get("panes"):null},toFeature:function(){if(!x.isFunction(this.toGeometry))return null;var t=this.toGeometry(),e={type:St,geometry:t,properties:{}};return x.forEach(t.mantle_properties,function(t,i){e.properties[i]=t}),e},toGeoJson:function(){if(!x.isFunction(this.toGeometry))return null;var t={type:Pt,features:[]},e=this.toFeature();return t.features.push(e),t},_getMantleProperties:function(){var t=["map","position","simplifyLevel","path","paths","bounds","center"],e=this.getOptions(),i={};return x.forEach(e,function(e,n){-1===t.indexOf(n)&&x.hasValue(e)&&(i[n]=e)}),i.overlayType=this.OVERLAY_TYPE,i},_fromCoordToPointerEvent:function(t){var e=this.getProjection();if(e&&t){var i=e.get("projection"),n=e.fromCoordToOffset(t),o=e.fromOffsetToPoint(n),r={coord:t.clone(),point:o,offset:n,pointerEvent:null,domEvent:null,originalEvent:null,overlay:this};return i.fromPointToLatLng&&(r.latlng=t.clone()),r}},_renderMode_changed:function(t){this.get("pane")||this._onRenderModeChanged&&this._onRenderModeChanged(t)},switchTo:qt,_getDefaultEventParameters:function(t){for(var e=!1,i=[],n=0,o=q.length;n<o;n++)if(q[n]===t){e=!0;break}return e&&this._getPointerEvent?i.push(this._getPointerEvent()):t.indexOf("_changed")===t.length-8&&i.push(this.get(t.replace("_changed",""))),i},_getSingleClickType:function(t,e){var i,n=x.now(),o={x:t.pageX,y:t.pageY},r=this.__ct__?n-this.__ct__:1e4,s=this.__cp__?x.Math.distance(this.__cp__,o):1e4;if(r<250&&s<=Q)this.__ct__=null,this.__cp__=null,t.stopPropagation(),i="dblclick";else{if(e)return;this.__ct__=n,this.__cp__=o,i="click"}return i},ef_overlay_changed:function(t){var e=this.getMap();if(e)if(t){var i=e.getMapAction();this._effectListener=[he.addListener(i,"clearpaneposition",Jt(this._onEffectEnd,this)),he.addListener(i,"zoomstart",Jt(this._onEffectStart,this)),he.addListener(i,"scale",Jt(this._onScale,this))]}else he.removeListener(this._effectListener),this._effectListener=null},_getPaneName:qt,_getZoomEffectName:function(){return"ef_"+this._getPaneName().toLowerCase().trim()}}),x.CalcShapeDrawingPixelBounds={getDrawingRect:function(){return this.getDrawingPixelBounds()},getDrawingPixelBounds:function(){var t=this.getProjection(),e=this.getBounds();if(!e)return null;var i=t.fromCoordToPixelPoint(e.getMin()),n=t.fromCoordToPixelPoint(e.getMax()),o=ee(i.x,n.y),r=ee(n.x,i.y),s=this.getOptions().strokeWeight;return s&&(o=o.sub(s,s),r=r.add(s,s)),ie.bounds(o,r)}},x.MarkerIcon=function(t){this.type=t.type},x.MarkerIcon.prototype={constructor:x.MarkerIcon,update:function(t,e){},destroy:function(){se.removeElement(this._element),delete this._element,this.size=null,this.anchor=null,this._manager&&delete this._manager},getElement:function(){return this._element}},x.ImageIcon=function(t){this.type=mt.image},te(x.ImageIcon,x.MarkerIcon,{update:function(t,e){var i=x.bind(this._onLoad,this,t,e),n=x.bind(this._onError,this,e);this._manager?(new se.Image({url:t.url,onload:x.bind(function(){this._manager.setUrl(t.url)},this),onerror:n}),this._manager.setHandler({onload:i,onerror:n})):(this._manager=new se.Image({url:t.url,onload:i,onerror:n,disableSelection:!0,alt:"",position:"absolute"}),this._element=this._manager.getElement(),this._element.ondragstart=function(){return!1},x.Agent.browser.msie&&this._element.setAttribute("crossOrigin","anonymous")),(t.size||t.scaledSize)&&(this.size=t.size||t.scaledSize,this.anchor=x.calcAnchorPosition(this.size,t.anchor))},_onLoad:function(t,e,i){var n=x.Size(i.width,i.height),o=t.origin?t.origin.clone().mul(-1,-1):x.Point(0,0);se.setSize(i,t.scaledSize||n),se.setOffset(i,o),this.size=t.size||t.scaledSize||n,this.anchor=x.calcAnchorPosition(this.size,t.anchor),e()},_onError:function(t){this.update(x.boxToIcon(),t)}}),x.SymbolIcon=function(){this.isSymbol=!0},te(x.SymbolIcon,x.MarkerIcon,{update:function(t,e){t=x.extend({},x.SymbolIcon.DEFAULT_OPTIONS,t),this._manager?this._manager.setOptions(t):(this._manager=new(x.shapes[x.capitalize(t.style)])(t),this._element=this._manager.getElement(),this._element.style.position="static",$t.browser.msie&&$t.browser.version<9&&(this._element.style.padding=t.strokeWeight)),this.size=this._calcSize(t),this.anchor=x.calcAnchorPosition(this.size,t.anchor),e()},_calcSize:function(t){var e,i,n=2*t.strokeWeight;if(t.style===G.CIRCLE)e=i=2*t.radius;else{var o=t.minBoundPoint,r=t.maxBoundPoint;e=Math.abs(r.x-o.x),i=Math.abs(r.y-o.y)}return x.Size(e+n,i+n)},getShapeElement:function(){return this._manager.getShapeElement()}}),x.SymbolIcon.DEFAULT_OPTIONS={fillColor:"#000000",fillOpacity:0,strokeColor:"#000000",strokeOpacity:1,strokeStyle:"solid",strokeWeight:1,simplifyLevel:1},x.CircleIcon=function(){this.type=mt.circle},te(x.CircleIcon,x.SymbolIcon,{}),x.PathIcon=function(){this.type=mt.path},te(x.PathIcon,x.SymbolIcon,{}),x.ClosedPathIcon=function(){this.type=mt.closedPath},te(x.ClosedPathIcon,x.SymbolIcon,{}),x.HtmlIcon=function(){this.type=mt.html},te(x.HtmlIcon,x.MarkerIcon,{update:function(t,e){this._element&&se.removeElement(this._element),x.isString(t.content)?this._element=this._makeElement(t.content):this._element=t.content,this.size=t.scaledSize||t.size||x.Size(0,0),this.anchor=x.calcAnchorPosition(this.size,t.anchor),e()},_makeElement:function(t){var e=se.createElement("DIV");return e.innerHTML=t,1==e.childNodes.length?e.removeChild(e.firstChild):e}}),x.MarkerAnimation={_animation_changed:function(){if(!this._trans){var t=new x.Transition({easing:x.easing.easeOutBounce,duration:700}),e=new x.Transition({easing:x.easing.easeOutQuad,duration:350}),i=new x.Transition({easing:x.easing.easeInQuad,duration:350});this._trans={drop:t,bounceUp:e,bounceDown:i}}this.draw()},startTransition:function(t,e,i){var n=this._getAnimation(t,e,i),o=n.startTran,r=n.startTranOptions;o.run(r.from,r.to)},stopTransition:function(){x.forEach(this._trans,function(t){t&&(t.clearListeners(),t.stop())})},_getAnimation:function(t,e,i){var n=this,o=function(e){var n=e.progress;t.style.left=n.left-i.x+"px",t.style.top=n.top-i.y+"px"},r=null,s=null,a=null;switch(this.animation){case K.BOUNCE:var h=this._trans.bounceUp,l=this._trans.bounceDown;r=h,s={top:e.y,left:e.x},a={top:e.y-20,left:e.x},h.addListener({start:function(){se.setOffsetWithAnchor(t,e,i)},progress:o,complete:function(){l.run(a,s)}}),l.addListener({progress:o,complete:function(){h.run(s,a)}});break;case K.DROP:var c=this._trans.drop,u=this.get("containerTopLeft");r=c,s={top:-u.y,left:e.x},a={top:e.y,left:e.x},c.addListener({start:function(){se.setOffsetWithAnchor(t,e,i)},progress:o,complete:function(){se.setOffsetWithAnchor(t,e,i),n.stopTransition(),n.set("animation",null,!0)}});break;default:throw Error("Invalid animation.")}return{startTran:r,startTranOptions:{from:s,to:a}}}},x.MarkerDraggble={THRESHOLD:50,EVENT_NAME:{move:$t.mobile?"touchmove":"mousemove",up:$t.mobile?"touchend":"mouseup"},_init:function(){this._keyInfo={}},_cleanUp:function(){this._dragReady=null,this._deltaMouseToMarker=null,this._startPageXY=null,this._startMousePoint=null,this._prevCursor=null,this._keyInfo=null,this._dragReadyListener=null},_enableDrag:function(){this.eventTarget&&!this._dragReadyListener&&(this._init(),this._dragReadyListener=this.addListener("mousedown",x.bind(this._onMouseDown,this)),this._panningTran||(this._panningTran=new x.Transition({easing:x.easing.easeOutCubic,step:30,duration:1e3,progress:Jt(this._onPanningTransition,this)})))},_disableDrag:function(){this.removeListener(this._dragReadyListener),this._dragReadyListener=null,this._panningTran&&this._panningTran.stop(),this._dragStarted&&(this._dragStarted=null,this._attachToMarkerPane(),this._prevCoord&&(this.set("position",this._prevCoord),this._prevCoord=null),this._prevCursor&&(this.set("cursor",this._prevCursor),this._prevCursor=null),this._dragReady=null),this._cleanUp()},_onMouseDown:function(t){if(ae.preventDefault(t.domEvent),ae.stopPropagation(t.domEvent),!($t.touchablePC&&t.domEvent.which>1||!$t.touchablePC&&!$t.mobile&&1!==t.domEvent.which)){this.animation&&this.stopTransition(),this._dListener=[he.addDOMListener(F,this.EVENT_NAME.move,Jt(this._onMouseMove,this),{passive:!1}),he.addDOMListener(F,this.EVENT_NAME.up,Jt(this._onMouseUp,this))],$t.touchablePC&&(this._dListener.push(he.addDOMListener(F,"touchmove",Jt(this._onMouseMove,this),{passive:!1})),this._dListener.push(he.addDOMListener(F,"touchend",Jt(this._onMouseUp,this))));var e=t.pointerEvent.pos(),i=t.point,n=ee(e.pageX,e.pageY),o=se.getOffset(this._wrapper);this._deltaMouseToMarker=n.sub(o),this._startMousePoint=i,this._startPageXY=n,this._dragReady=!0}},_onMouseMove:function(t){if(this._dragReady){t=ae.fix(t),ae.preventDefault(t);var e=t.pos(),i=ee(e.pageX,e.pageY);if(this._isMoved(i)){var n=this._getDraggablePointerEvent(t),o=i.sub(this.getMapOffset()).sub(this._deltaMouseToMarker);this._dragStarted||(this._prevCursor=this.cursor,this.set("cursor","url('"+rt+"/closedhand.cur'), default"),he.trigger(this,"dragstart",n),this._detachToMarkerPane(),this._dragStarted=!0),se.setOffset(this._wrapper,o),this._detectDirection(o),this._prevCoord=n.coord,he.trigger(this,"drag",n)}}},_onMouseUp:function(t){if(this._dragReady){t=ae.fix(t),ae.stopPropagation(t),he.removeDOMListener(this._dListener),this._panningTran.isRunning()&&this._panningTran.stop();var e=this._getDraggablePointerEvent(t),i=e.coord,n=this.getMap();this._dragStarted?(this._dragStarted=null,n.getBounds().hasPoint(i)||n.setCenter(i),this._attachToMarkerPane(),this.set("position",i),this.set("cursor",this._prevCursor),this._prevCoord=i,this._prevCursor=null,this._dragReady=null,he.trigger(this,"dragend",e)):this.draw()}},_detachToMarkerPane:function(){se.addElement(this._wrapper,this.getMap().getElement())},_attachToMarkerPane:function(){se.addElement(this._wrapper,this.getPanes().overlayImage)},_detectDirection:function(t){var e=this._keyInfo,i=this._panningTran,n=i.isRunning(),o=this.get("mapSize"),r=this.THRESHOLD,s=t.x,a=t.y,h=s>=o.width-r,l=s<=0+r,c=a>=o.height-r,u=a<=0+r;e[39]=h,e[37]=l,e[40]=c,e[38]=u,!n&&(h||l||c||u)&&i.run({weight:1},{weight:40},{infinity:!0}),!n||h||l||c||u||i.stop()},_getXFactor:function(){var t=0,e=this._keyInfo;return e[37]&&(t-=1),e[39]&&(t+=1),t},_getYFactor:function(){var t=0,e=this._keyInfo;return e[38]&&(t-=1),e[40]&&(t+=1),t},_onPanningTransition:function(t){var e=t.progress,i=this._getXFactor(),n=this._getYFactor(),o=e.weight,r=ee(i*o,n*o);this.getMap().panBy(r)},_isMoved:function(t){return x.Math.distance(this._startPageXY,t)>=5},_getDraggablePointerEvent:function(t){var e=t.pos(),i=ee(e.pageX,e.pageY),n=this._calcNewMarkerCoordinates(i),o=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t;return{offset:n.offset,point:n.point,coord:n.coord,pointerEvent:o,domEvent:o,originalEvent:o,overlay:this}},_calcNewMarkerCoordinates:function(t){var e=this.getProjection(),i=t.sub(this.getMapOffset()).sub(this.get("containerTopLeft")),n=e.fromOffsetToPoint(i),o=this.getPosition(),r=e.fromCoordToPoint(o),s=n.sub(this._startMousePoint),a=r.add(s);return{offset:e.fromPointToOffset(a),point:a,coord:e.fromPointToCoord(a)}}},x.Marker=function(t){this.OVERLAY_TYPE="Marker",this.DEFAULT_OPTIONS={icon:null,shape:null,cursor:"pointer",clickable:!0,draggable:!1,position:null,map:null,title:"",visible:!0,zIndex:null,simplifyLevel:1,animation:null},this._wrapper=this._createWrapper(),this.set("_nmarker_id","nmarker-"+x.guid()),this.setOptions(Qt({},this.DEFAULT_OPTIONS,t))},te(x.Marker,x.OverlayView,[x.MarkerAnimation,x.MarkerDraggble],{setOptions:function(t){var e=this;if("string"==typeof t){var i=t,n=arguments[1],o="set"+x.capitalize(i);if("shadow"===t)return void x.console.once("[DEPRECATED] The 'shadow' option of naver.maps.Marker is DEPRECATED.\nnaver.maps.Marker\uc758 'shadow' \uc635\uc158\uc740 \uc9c0\uc6d0 \uc911\ub2e8\ub418\uc5c8\uc2b5\ub2c8\ub2e4.");e[o]?e[o](n):e.set(i,n)}else x.forEach(t,function(t,i){"map"!==i&&e.setOptions(i,t)}),t.map&&this.setMap(t.map)},setShadow:function(){x.console.info("[DEPRECATED] The 'setShadow' method is DEPRECATED.\n'setShadow' \uba54\uc11c\ub4dc\ub294 \uc9c0\uc6d0 \uc911\ub2e8\ub418\uc5c8\uc2b5\ub2c8\ub2e4.")},getShadow:function(){x.console.info("[DEPRECATED] The 'getShadow' method is DEPRECATED.\n'getShadow' \uba54\uc11c\ub4dc\ub294 \uc9c0\uc6d0 \uc911\ub2e8\ub418\uc5c8\uc2b5\ub2c8\ub2e4.")},getOptions:function(t){var e=this,i={};return t?this.get(t):(x.forEach(this.DEFAULT_OPTIONS,function(t,n){i[n]=e.get(n)}),i)},setPosition:function(t){this.set("position",x.box(t)),this._updateGL()},setIcon:function(t){this.set("icon",t)},getDrawingRect:function(){var t=this._icon.size,e=this._icon.anchor,i=this._toPixelPoint(this.position);if(!t)return ie.bounds(i.clone(),i.clone());var n=new ee(i.x-e.x,i.y-e.y),o=new ee(i.x+t.width-e.x,i.y+t.height-e.y);return ie.bounds(n,o)},toGeometry:function(){return{type:Tt,coordinates:x.DataUtil.toPoint(this.getPosition()),mantle_properties:this._getMantleProperties()}},getWrapElement:function(){return this._wrapper},getElement:function(){return this._wrapper},_toPixelPoint:function(t){return this.getProjection().fromCoordToPixelPoint(t)},getAnchor:function(){if(this._icon)return this._icon.anchor},getSize:function(){if(this._icon)return this._icon.size},onAdd:function(){var t=this._getPaneName(),e=this.getPanes()[t],i=this.getMap().getMapAction();e.appendChild(this._wrapper),this._addWrapListener(this._wrapper),this._addListener(this.eventTarget),this.bindTo("ef_overlayImage",i),this._onAddGL()},onRemove:function(){this.unbind("ef_overlayImage"),this._removeListener(),this._removeWrapListener(this._wrapper),se.removeElement(this._wrapper),this.stopTransition(),this._onRemoveGL()},_zIndex_changed:function(t){(0===t||t)&&se.setZIndex(this._wrapper,t)},_visible_changed:function(t){se.visible(this._wrapper,!!t)},_position_changed:function(){this.draw()},_title_changed:function(t){this._wrapper.title=t},_clickable_changed:function(t){this.eventTarget&&(this._wrapper.__clickable=!!t,this.eventTarget.__clickable=!!t,this._icon.getElement().__clickable=!!t,this.set("cursor",this.cursor))},_cursor_changed:function(t){if(this.eventTarget){var e=this._getCursorState(t||"pointer"),i=this._icon.getElement();this._icon.isSymbol?(this._wrapper.style.cursor="inherit",this.eventTarget.style.cursor=e,i.style.cursor=e):(this._wrapper.style.cursor="inherit",i.style.cursor="inherit",this.eventTarget.style.cursor=e)}},_draggable_changed:function(t){this._updateDraggable(t)},_shape_changed:function(t){this.updateShape(t)},_equalsIgnoreKey:function(t,i,n){for(var o in t)if(t.hasOwnProperty(o)){if(o===n)continue;var r=t[o],s=i?i[o]:e;if(r&&r.equals){if(!1===r.equals(s))return!1}else if(!1===Ht.equals(r,s))return!1}return!0},_icon_changed:function(t){var e=x.boxToIcon(t);if(!x.equals(e,this._beforeBoxedIcon)){if(this._icon&&this._icon.type===mt.image&&!x.equals(e.origin,this._beforeBoxedIcon.origin)&&this._equalsIgnoreKey(e,this._beforeBoxedIcon,"origin")){var i=e.origin?e.origin.clone().mul(-1,-1):x.Point(0,0);return se.setOffset(this._icon.getElement(),i),void(this._beforeBoxedIcon=e)}this._icon&&this._icon.type===mt[e.type]||(this._icon&&(this._removeFromWrapper(this._icon.getElement()),this._icon.destroy()),this._icon=new(x[x.capitalize(e.type)+"Icon"])),this._beforeBoxedIcon=e,this._icon.update(e,x.bind(this._icon_loaded,this))}},_icon_loaded:function(){this._icon.type===mt.html?this._wrapper.style.overflow="visible":(se.setSize(this._wrapper,this._icon.size),this._wrapper.style.overflow="hidden"),this._transformOriginX=this._icon.anchor.x/this._icon.size.width*100,this._transformOriginY=this._icon.anchor.y/this._icon.size.height*100,this.draw(),this._addToWrapper(this._icon.getElement()),this.updateShape(this.shape),this._updateGL(),he.trigger(this,"icon_loaded",this)},draw:function(){if(this.map&&this.position&&this._icon.anchor&&!this._dragStarted){var t=this.getProjection(),e=this.position,i=t.fromCoordToOffset(e);i&&i instanceof ee&&i.round(),this.stopTransition(),this.animation?this.startTransition(this._wrapper,i,this._icon.anchor,this.animation):se.setOffsetWithAnchor(this._wrapper,i,this._icon.anchor),this.get("ef_overlayimage")&&se.transform(this._wrapper,1,0,0,{x:0,y:0})}},scale:function(t){this.getMap()&&this.get("ef_overlayimage")&&this._transformOriginX&&this._transformOriginY&&se.setScaleByPercent(this._wrapper,1/t,{x:this._transformOriginX,y:this._transformOriginY},!0)},updateShape:function(t){this._icon.getElement()&&(this.icon||this.shape||(t=yt),t?(this._updateMaskTarget(),this._updateMask(t),this._updateAccessibility(),this._setEventTarget(this._mask.childNodes[0])):(this._removeMaskTarget(),this._removeMask(),this._icon.isSymbol?this._setEventTarget(this._icon.getShapeElement()):this._setEventTarget(this._icon.getElement())))},_updateMaskTarget:function(){this._dummImg||(this._dummImg=this._createDummImg()),this._addToWrapper(this._dummImg),se.setSize(this._dummImg,this._icon.size),this._dummImg.useMap="#"+this._nmarker_id},_updateMask:function(t){this._mask||(this._mask=this._createShapeMap(t),this._addToWrapper(this._mask));var e=this._mask.getElementsByTagName("area")[0];e.shape=t.type,e.coords=t.coords},_updateAccessibility:function(){this._mask.getElementsByTagName("area")[0].alt="\ub9c8\ucee4\uc758 \uacbd\uc704\ub3c4\ub294 "+x.DataUtil.toPoint(this.getPosition())+" \uc785\ub2c8\ub2e4."},_removeMaskTarget:function(){this._removeFromWrapper(this._dummImg),this._dummImg=null},_removeMask:function(){this._mask&&(this._removeFromWrapper(this._mask),delete this._mask)},_addToWrapper:function(t){this._wrapper&&this._wrapper.appendChild(t)},_removeFromWrapper:function(t){if(this._wrapper)try{this._wrapper.removeChild(t)}catch(t){}},_setEventTarget:function(t){this.eventTarget!==t&&(this.eventTarget=t,this.set("clickable",this.clickable),this._removeListener(),this._addListener(this.eventTarget),this._updateDraggable(this.draggable))},_updateDraggable:function(t){t?this._enableDrag():this._disableDrag()},_getCursorState:function(t){return t=t||this.cursor,this.clickable?t||"pointer":"inherit"},_createWrapper:function(){var t=["position:absolute;","overflow:hidden;","box-sizing:content-box !important"].join("");return se.createElement("div",t)},_createDummImg:function(){var t=se.createElement("img","position:absolute;border:0;left:0px;top:0px;"+pt);return se.disableSelection(t),t.src=st,t.alt="",t},_createShapeMap:function(t){var e=se.createElement("map"),i=se.createElement("area","display: block"),n=this;return e.name=this._nmarker_id,i.href="#",i.onclick=function(t){return ae.preventDefault(t),!1},($t.browser.msie||$t.browser.edge)&&(i.onmouseover=function(t){if(!n.__hover){n._getListener("mouseenter")(t)}n._dummImg.style.cursor=n._getCursorState()},i.onmouseout=function(t){n._getListener("mouseleave")(t),n._dummImg.style.cursor=""}),e.appendChild(i),e},_addListener:function(t){if(t&&(this.clickable||this.draggable))for(var e,i=0,n=V.length;i<n;i++)e=V[i],this._listeners.push(x.Event.addDOMListener(t,e,this._getListener(e)))},_removeListener:function(){x.Event.removeDOMListener(this._listeners),this._listeners=[]},_addWrapListener:function(t){var e=this;e._wrapListeners=x.Event.addDOMListener(t,"mouseleave",function(t){e._getListener("mouseleave")(ae.fix(t))})},_removeWrapListener:function(){x.Event.removeDOMListener(this._wrapListeners),this._wrapListeners=null},_getListener:function(t){var e,i=this,n=$t.browser.msie&&$t.browser.version<9;return e=x.Agent.mobile?function(t,e){var n;switch(t){case"click":n=i._getSingleClickType(e)}return[n||t]}:function(t,e){var o,r=t,s=i._dragStarted;switch(t){case"mouseenter":case"mouseover":if(s||i.__hover)return;i.__hover=!0;break;case"mouseleave":case"mouseout":if(s||!i.__hover)return;i.__hover=null;break;case"mousedown":i.__dp__={x:e.pageX,y:e.pageY};break;case"click":if(s)return;r=x.Math.distance(i.__dp__,{x:e.pageX,y:e.pageY})<4?i._getSingleClickType(e):null;break;case"mouseup":n&&(o=i._getSingleClickType(e,n))}return[void 0,r,o]},function(n){if(i.map&&i.clickable){var o=ae.fix(n),r=i._getPointerEvent(o),s=e(t,o);x.forEach(s,function(t){t&&he.trigger(i,J[t]||t,r)})}}},_getPointerEvent:function(t){if(!t)return this._fromCoordToPointerEvent(this.getPosition());var e=t.pos(),i=ee(e.pageX,e.pageY),n=this.getProjection(),o=this.get("containerTopLeft"),r=this.getMapOffset(),s=ee(i.x-r.x,i.y-r.y).sub(o),a=n.fromOffsetToPoint(s),h={offset:s,point:a,coord:n.fromPointToCoord(a),pointerEvent:t,domEvent:t,originalEvent:t,overlay:this};return this.get("tileRepeatX")&&(h.point=n.fromCoordToPoint(h.coord)),h},_getPaneName:function(){return this.get("pane")||"overlayImage"},_updateGL:qt,_onAddGL:qt,_onRemoveGL:qt}),x.forEach(["position","icon","shape","cursor","clickable","draggable","title","visible","zIndex","animation"],function(t){var e=x.capitalize(t),i="set"+e,n="get"+e;x.Marker.prototype[i]||(x.Marker.prototype[i]=function(){this.get(t)!==arguments[0]&&this.set(t,arguments[0])}),x.Marker.prototype[n]||(x.Marker.prototype[n]=function(){return this.get(t)})}),x.InfoWindow=function(t){this.DEFAULT_OPTIONS={position:null,zIndex:0,maxWidth:0,pixelOffset:ee(0,0),backgroundColor:"#fff",borderColor:"#333333",borderWidth:1,disableAutoPan:!1,disableAnchor:!1,anchorSkew:!1,anchorSize:re(20,24),anchorColor:"#ffffff",autoPanPadding:ee(20,20)},this._iconAnchor=ee(0,0),this._boundary={x:0,y:0,w:0,h:0},this._disabled=!1,this._drawRequired=!1,this._resizeRequired=!1,this._prepareDOM(),this.setOptions(Qt({},this.DEFAULT_OPTIONS,t),!0)},te(x.InfoWindow,x.OverlayView,{_prepareDOM:function(){var t=function(t){return se.createElement("div",t)},e=lt+"width:0;height:0;position:absolute;border:solid 0 transparent;pointer-events:none;",i=t(ct+"cursor:default;"),n=t("margin:0;padding:0;border:solid 0 transparent;display:inline-block;box-sizing:content-box !important;"),o=t(e),r=t(e);se.isSupportedCSS3Style("transform")&&(o.style[se.css3Styles.transformOrigin]="right bottom",r.style[se.css3Styles.transformOrigin]="right bottom"),i.appendChild(n),i.appendChild(o),i.appendChild(r),this.wrapper=i,this.contentWrap=n,this.anchorBack=o,this.anchorFore=r},_calculateSize:function(){var t=this.getPanes(),e=this.getContentElement(),i=this.get("maxWidth")||0,n=re(60,30);if(t){var o=t.floatPane;if(e&&(n=se.calculateSize(e,o)),i>0&&n.width>i){var r=e.cloneNode(!0);r.style.width=i+"px",n=se.calculateSize(r,o),se.removeElement(r),r=null}}this.set("contentSize",n)},getElement:function(t){if(!t&&!this.element)return null;var e=this.element||t.getMapView().getInfoWindowElement();return this.element=e,e},getWrapElement:function(){return this.wrapper},getContentElement:function(){return this.contentElement},setOptions:function(t){var e=this,i=function(t,i){"position"===t&&(i=x.box(i)),"anchorSize"===t&&(i=x.box(i,x.Size)),"pixelOffset"===t&&(i=x.box(i,x.Point)),e.set(t,i)};if("string"==typeof t){var n=t,o=arguments[1];i(n,o)}else x.forEach(t,function(t,e){i(e,t)});this._disabled=!1,this._resizeRequired?this.resize():this._drawRequired&&this.draw(),this._resizeRequired=!1,this._drawRequired=!1},getOptions:function(t){var i=this,n={};return t!==e?this.get(t):(x.forEach(i.DEFAULT_OPTIONS,function(t,e){n[e]=i.get(e)}),n)},open:function(t,e){if(!t)throw new Error("unassigned map");if(e){var i=e.getPosition?e.getPosition().clone():x.box(e);this._iconAnchor=e.getAnchor&&e.getAnchor()?e.getAnchor().clone():ee(0,0),this.set("position",i,!0)}if(!this.get("position"))throw new Error("position or anchor should be assigned.");this.getContent()||this.setContent(""),this.setMap(t),!1===this.get("disableAutoPan")&&this._panToVisible()},close:function(){this.setMap(null)},_panToVisible:function(){if(this.getMap()){var t=this.getMap();if(!t.getMapAction().isTranRunning()){var e=t.getMapModel(),i=this.getProjection(),n=i.fromCoordToOffset(t.getCenter()),o=t.getSize(),r=this._boundary,s=e.get("containerTopLeft"),a=ee(0,0),h={left:s.x+r.x,top:s.y+r.y,right:s.x+r.x+r.w,bottom:s.y+r.y+r.h},l={left:h.left<0,top:h.top<0,right:h.right>o.width,bottom:h.bottom>o.height},c=this.get("autoPanPadding");l.left&&!l.right?a.x+=h.left-c.x:!l.left&&l.right&&(a.x+=h.right-o.width+c.x),l.top&&!l.bottom?a.y+=h.top-c.y:!l.top&&l.bottom&&(a.y+=h.bottom-o.height+c.y),0===a.x&&0===a.y||(a.y>0&&(a.y+=this._iconAnchor.y),n.add(a),t.panTo(i.fromOffsetToCoord(n),{duration:200}))}}},setContent:function(t){this.set("content",t)},getContent:function(){return this.get("content")},setPosition:function(t){if(!t)throw new Error("Property 'position' is required.");this.set("position",x.box(t))},getPosition:function(){return this.get("position")},setZIndex:function(t){t=parseInt(t||0,10),this.set("zIndex",t)},getZIndex:function(){return this.get("zIndex")},onAdd:function(){if(this.getMap()){var t=this.getMap(),e=this.getPanes().floatPane,i=this.getElement(t);i.style.zIndex=x.toNumber(this.get("zIndex")),t.closeInfoWindow(),t.getMapModel().set("infowindow",this),e.appendChild(i),this._calculateSize();var n=this.getPosition();he.trigger(this,"open",this._fromCoordToPointerEvent(n))}},draw:function(){if(this.getMap()){if(this._disabled)return void(this._drawRequired=!0);var t=this.getElement(),e=this.wrapper;e.parentNode!==t&&(t.innerHTML="",t.appendChild(e));var i=this.getBoundary();se.setOffset(t,i.x,i.y),this.get("ef_floatpane")&&se.transform(t,1,0,0,{x:0,y:0})}},scale:function(t){if(this.get("ef_floatpane")){var e=this.getElement(),i=this.getBoundary();se.setScale(e,1/t,{x:i.w/2,y:i.h},!0)}},resize:function(){if(this.getMap()){if(this._disabled)return void(this._resizeRequired=!0);this._calculateSize(),this.draw()}},getBoundary:function(){var t=this.getProjection(),e=this.get("position"),i=t.fromCoordToOffset(e).clone().round(),n=this.get("contentSize"),o=2*this.get("borderWidth"),r=this.get("pixelOffset"),s=this._iconAnchor,a=this.get("disableAnchor")?0:this.get("anchorSize").height,h=ee((n.width+o)/2,n.height+o+a),l=i.clone().sub(h.sub(r.x,r.y-s.y));return this._boundary={x:l.x,y:l.y,w:n.width+o,h:i.y-s.y-l.y,anchor:s},this._boundary},onRemove:function(){if(this.getMap()){this.getMap().getMapModel().set("infowindow",null),se.removeElement(this.element),se.removeElement(this.wrapper),he.trigger(this,"close",this._fromCoordToPointerEvent(this.getPosition()))}},_changeContent:function(t){var e=this.contentWrap,i=t||this.contentElement;this._calculateSize(),e.innerHTML="",i&&e.appendChild(i),this.draw()},_content_changed:function(t){var e=null;if("string"==typeof t){var i=se.createElement("div");i.innerHTML=t;for(var n=i.childNodes,o=n.length,r=0,s=o;r<s;r++){var a=n[r].nodeType;if(1===a){if(e){e=i;break}e=n[r]}else 1===o&&3===a&&(e=i)}}else e=t;this.contentElement=e,this._changeContent(e)},_contentSize_changed:function(t){var e=this.anchorBack,i=this.anchorFore,n=this.get("anchorSize"),o=this.get("pixelOffset"),r=this.get("borderWidth"),s=0===r?0:2;se.setSize(this.contentWrap,t),e.style.left=i.style.left=x.round(t.width/2-n.width/2-o.x)+"px",e.style.bottom=x.round(-1*(n.height-o.y)-r)+"px",i.style.bottom=x.round(-1*(n.height-o.y)+s)+"px"},_position_changed:function(t){this.draw()},_borderColor_changed:function(t){this.wrapper.style.borderColor=t,this.anchorBack.style.borderTopColor=t},_borderWidth_changed:function(t){this.wrapper.style.borderWidth=t+"px",this.resize()},_maxWidth_changed:function(t){this.resize()},_anchorSize_changed:function(t){var e=t.width/2,i=this.anchorBack.style,n=this.anchorFore.style,o=this.get("pixelOffset"),r=this.get("borderWidth"),s=0===r?0:2;i.borderLeftWidth=n.borderLeftWidth=e+"px",i.borderRightWidth=n.borderRightWidth=e+"px";var a=t.height-o.y;i.borderTopWidth=n.borderTopWidth=(a<0?0:a)+"px",i.bottom=-1*(t.height-o.y)-r+"px",n.bottom=-1*(t.height-o.y)+s+"px",this.resize()},_anchorSkew_changed:function(t){if(se.isSupportedCSS3Style("transform")){var e=!0===t?-40:0;this.anchorBack.style[se.css3Styles.transform]="skewX("+e+"deg)",this.anchorFore.style[se.css3Styles.transform]="skewX("+e+"deg)",this.anchorBack.style.marginLeft=!0===t?-1-this.get("borderWidth")+"px":0,this.draw()}},_anchorColor_changed:function(t){this.anchorFore.style.borderTopColor=t},_pixelOffset_changed:function(t){if(this.get("contentSize")){var e=this.get("contentSize"),i=this.anchorBack.style,n=this.anchorFore.style,o=this.get("anchorSize");i.left=n.left=e.width/2-o.width/2-t.x+"px",this.set("anchorSize",this.get("anchorSize"))}},_disableAnchor_changed:function(t){var e=this.anchorBack.style,i=this.anchorFore.style;e.display=i.display=t?"none":"",this.draw()},_zIndex_changed:function(t){var e=this.getElement();e&&(e.style.zIndex=t)},_backgroundColor_changed:function(t){this.wrapper.style.background=t},_getPointerEvent:function(t){return this._fromCoordToPointerEvent(this.getPosition())}}),x.GroundOverlay=function(t,i,n){this.DEFAULT_OPTIONS={clickable:!0,map:null,opacity:1,crossOrigin:e},this.set("url",t),this.set("bounds",x.box(i)),this._clonedWrapper=null,this._prepareDOM(),this._setOptions(Qt({},this.DEFAULT_OPTIONS,n)),this._initEvent()},te(x.GroundOverlay,x.OverlayView,{_prepareDOM:function(){var t=se.createElement("div","position:absolute;overflow:hidden;z-index:10;"),e=se.createElement("img","position:absolute;left:0px;top:0px;border:0px;padding:0px;margin:0px;");e.src=this.get("url"),e.alt="",se.disableSelection(e),se.disableUserDrag(e),se.addElement(e,t),this._wrapper=t,this._img=e},_setOptions:function(t){var e={};x.forEach(this.DEFAULT_OPTIONS,function(i,n){n in t&&"map"!==n&&(e[n]=t[n])}),this.setValues(e),t.map&&this.setMap(t.map)},_bindDefaultEvent:function(t,e){this._defaultListener=[he.addListener(e,"zooming",Jt(this._copyWrapperIntoZoomPane,this)),he.addListener(e,"idle",Jt(this._removeWrapperFromZoomPane,this))]},_initEvent:function(){var t=this._wrapper,e=this;t&&x.forEach(GROUND_DOMEVENTS,function(i){he.addDOMListener(t,i,e._getListener(i))})},_getListener:function(t){var e,i=this,n=$t.browser.msie&&$t.browser.version<9;return e=$t.mobile?function(t,e){var n;switch(t){case"click":n=i._getSingleClickType(e)}return[n||t]}:function(t,e){var o,r=t;switch(t){case"mousedown":i.__dp__={x:e.pageX,y:e.pageY};break;case"click":r=x.Math.distance(i.__dp__,{x:e.pageX,y:e.pageY})<4?i._getSingleClickType(e):null;break;case"mouseup":n&&(o=i._getSingleClickType(e,n))}return[void 0,r,o]},function(n){if(i.getMap()&&i.get("clickable")){var o=ae.fix(n),r=i._getPointerEvent(o),s=e(t,o);x.forEach(s,function(t){t&&he.trigger(i,J[t]||t,r)})}}},_getPointerEvent:function(t){var e=t.pos(),i=ee(e.pageX,e.pageY),n=this.getProjection(),o=this.get("containerTopLeft"),r=this.getMapOffset(),s=ee(i.x-r.x,i.y-r.y).sub(o),a=n.fromOffsetToPoint(s),h={offset:s,point:a,coord:n.fromPointToCoord(a),pointerEvent:t,domEvent:t,originalEvent:t,overlay:this};return this.get("tileRepeatX")&&(h.point=n.fromCoordToPoint(h.coord)),h},_unbindEvent:function(){he.removeListener(this._defaultListener),this._defaultListener.length=0,this._defaultListener=[],this.get("clickable")&&(he.removeListener(this._clickableListener),this._clickableListener=[])},_copyWrapperIntoZoomPane:function(){if(!this._clonedWrapper){var t=this._wrapper.cloneNode(!0);se.addElement(t,this.get("zoomPane")),this._clonedWrapper=t}},_removeWrapperFromZoomPane:function(){this._clonedWrapper&&(se.removeElement(this._clonedWrapper),this._clonedWrapper=null)},_clickable_changed:function(t){this._wrapper&&(t?(this._wrapper.__clickable=!0,this._wrapper.style.cursor="pointer"):(this._wrapper.__clickable=!1,this._wrapper.style.cursor=""))},getBounds:function(){return this.get("bounds")},getOpacity:function(){return this.get("opacity")},setOpacity:function(t){this.set("opacity",t)},getUrl:function(){return this.get("url")},setUrl:function(t){this._img&&(this._img.src=t,this.draw())},onAdd:function(){var t=this.getMap();t&&(se.addElement(this._wrapper,this.getPanes().overlayLayer),this.bindTo("zoomPane",t.getMapView()),this._bindDefaultEvent(t,t.getMapAction()))},draw:function(){if(this.getMap()){var t=this.getBounds(),e=this.getProjection(),i=e.fromCoordToOffset(t.getMax()).round(),n=e.fromCoordToOffset(t.getMin()).round(),o=ie.bounds(i,n),r=o.getMin(),s=o.getMax(),a=r.x,h=r.y,l=s.x,c=s.y,u=re(Math.abs(l-a),Math.abs(c-h));se.setOffset(this._wrapper,a,h),se.setSize(this._wrapper,u),se.setSize(this._img,u)}},onRemove:function(){this.getMap()&&(this._removeWrapperFromZoomPane(),this.unbind("zoomPane"),this._unbindEvent(),se.removeElement(this._wrapper))},_opacity_changed:function(t){se.setOpacity(this._wrapper,t)},_crossOrigin_changed:function(t){this._img&&(this._img.crossOrigin=t)}}),x.AbstractShapeOverlay=function(t){this._shape=this._createShape(),t=Qt({},this.DEFAULT_OPTIONS||{},t),this.setOptions(t),this._initEvent()},te(x.AbstractShapeOverlay,x.OverlayView,[x.CalcShapeDrawingPixelBounds],{_initEvent:function(){var t=this._shape.getShapeElement();if(t)for(var e,i=0,n=N.length;i<n;i++)e=N[i],he.addDOMListener(t,e,this._getListener(e))},_getPointerEvent:function(t){if(t){var e=t.pos(),i=ee(e.pageX,e.pageY),n=this.getProjection(),o=this.get("containerTopLeft"),r=this.getMapOffset(),s=ee(i.x-r.x,i.y-r.y).sub(o),a=n.fromOffsetToPoint(s),h={offset:s,point:a,coord:n.fromPointToCoord(a),pointerEvent:t,domEvent:t,originalEvent:t,overlay:this};return this.get("tileRepeatX")&&(h.point=n.fromCoordToPoint(h.coord)),h}if(this.getCenter)return this._fromCoordToPointerEvent(this.getCenter());if(this.getBounds){var l=this.getBounds();return l?this._fromCoordToPointerEvent(l.getCenter()):{}}},_getListener:function(t){var e,i=this,n=$t.browser.msie&&$t.browser.version<9;return e=$t.mobile?function(t,e){var n;switch(t){case"click":n=i._getSingleClickType(e)}return[n||t]}:function(t,e){var o,r,s=t;switch(t){case"mousedown":i.__dp__={x:e.pageX,y:e.pageY};break;case"click":$t.browser.msie&&(o="mouseup"),s=x.Math.distance(i.__dp__,{x:e.pageX,y:e.pageY})<4?i._getSingleClickType(e):null;break;case"mouseup":n&&(r=i._getSingleClickType(e,n))}return[o,s,r]},function(n){if(i.getMap()&&i.getClickable()){var o=ae.fix(n),r=i._getPointerEvent(o),s=e(t,o);x.forEach(s,function(t){t&&he.trigger(i,J[t]||t,r)})}}},setOptions:function(t){var i=this.PROPERTIES_NAME||[],n=this;if("string"==typeof t){var o=t,r=arguments[1],s={};-1===x.getIndexOfElement(i,o)?n.setStyles(o,r):(s[o]=r,n.setValues(s))}else x.forEach(t,function(t,e){"map"!==e&&n.setOptions(e,t)}),t.map!==e&&this.setMap(t.map)},getOptions:function(t){var i={},n=this;return t!==e?n.get(t):(x.forEach(n.DEFAULT_OPTIONS||{},function(t,e){i[e]=n.get(e)}),i)},setStyles:function(t){var e=this.PROPERTIES_NAME||[],i=this;if("string"==typeof t){var n=t,o=arguments[1],r={};if(-1!==x.getIndexOfElement(e,n))throw new Error("The '"+n+"' is not style property.");i.set(n,o),r[n]=o,i._shape.setOptions(r)}else x.forEach(t,function(t,e){i.setStyles(e,t)})},getStyles:function(t){var i=this.PROPERTIES_NAME||[],n={},o=this;if(t!==e){if(-1===x.getIndexOfElement(i,t))return o.get(t);throw new Error("The '"+t+"' is not style property.")}return x.forEach(o.DEFAULT_OPTIONS||{},function(t,e){-1===x.getIndexOfElement(i,e)&&(n[e]=o.get(e))}),n},setVisible:function(t){this.set("visible",t),this._shape.setOptions({visible:t})},getVisible:function(){return this.get("visible")},setZIndex:function(t){this.set("zIndex",t),this._shape.setOptions({zIndex:t})},getZIndex:function(){return this.get("zIndex")||0},setClickable:function(t){this.set("clickable",t)},getClickable:function(){return this.get("clickable")},_clickable_changed:function(t){var e=this.getWrapElement();e&&(t?(e.__clickable=!0,e.style.cursor="pointer"):(e.__clickable=!1,e.style.cursor=""))},draw:function(){if(this.getMap()&&(this._draw(),this.get(this._getZoomEffectName()))){var t=this.getElement(),e=this.strokeWeight;t.style.strokeWidth=e+"px"}},onAdd:function(){if(this.getMap()&&this._shape.element){var t=this._getPaneName(),e=this._getZoomEffectName(),i=this.getPanes()[t],n=this.getMap().getMapAction();i.appendChild(this._shape.element),this.__added=!0,this.get(e)&&(this._mapActionListener=he.addListener(n,"scale",Jt(this._onScale,this)))}},onRemove:function(){if(this.getMap()&&this._shape.element&&this.__added){var t=this._getPaneName();this.getPanes()[t].removeChild(this._shape.element),he.removeListener(this._clickableListener),this._mapActionListener&&he.removeListener(this._mapActionListener),this.__added=!1,this._mapActionListener=null}},scale:function(t){if(this.get(this._getZoomEffectName())&&this.strokeWeight){var e=this.getElement(),i=this.strokeWeight;e.style.strokeWidth=1*i/t+"px"}},_createShape:function(){throw new Error("please implement this method")},getShape:function(){return this._shape||null},getBounds:function(){return null},_draw:function(){throw new Error("please implement this method")},getElement:function(){return this._shape.getShapeElement()},getWrapElement:function(){return this._shape.getElement()},_getPaneName:function(){return this.get("pane")||"overlayLayer"}}),x.Polyline=function(t){this.DEFAULT_OPTIONS={map:null,path:[],strokeColor:"#007EEA",strokeOpacity:1,strokeWeight:2,strokeStyle:"solid",strokeLineCap:"butt",strokeLineJoin:"miter",visible:!0,clickable:!1,simplifyLevel:1,startIcon:null,startIconSize:null,endIcon:null,endIconSize:null,zIndex:0},this.OVERLAY_TYPE="Polyline",this.PROPERTIES_NAME=["path","map"],x.AbstractShapeOverlay.call(this,t)},te(x.Polyline,x.AbstractShapeOverlay,{setPath:function(t){if(!x.isArray(t)&&t.constructor!==x.KVOArray)throw new Error("path must be Array or naver.maps.KVOArray");var e;e=x.isArray(t)?t[0]instanceof ee?new x.KVOArray(t):new x.KVOArray(x.boxToPath(t)):t,this._unbindPath(),this.set("path",e),this._bindPath(),this.draw()},_bindPath:function(){var t=this.getPath(),e=Jt(this.draw,this);he.addListener(t,"insert_at",e),he.addListener(t,"remove_at",e),he.addListener(t,"set_at",e)},_unbindPath:function(){var t=this.getPath();t&&he.clearInstanceListeners(t)},getPath:function(){return this.get("path")},getBounds:function(){var t=this.getPath();if(!t||0===t.getLength())return null;var e=t.getAt(0),i=ie(e.clone(),e.clone());if(t.forEach(function(t){i.extend(t)}),e instanceof ne){var n=i.getMin(),o=i.getMax();i=oe([n.x,n.y,o.x,o.y])}return i},getDistance:function(){var t=this.getPath().getArray(),e=this.getProjection();if(!t||0===t.length||!e)return 0;for(var i=0,n=0,o=t.length;n<o&&n+1!==o;n++)i+=e.getDistance(t[n],t[n+1]);return i},_createShape:function(){return new x.shapes.Path},_draw:function(){var t=this._project(this.getPath());t.path.length>0&&this._shape.setPath(t.path,t.minBoundPoint,t.maxBoundPoint,this.get("simplifyLevel"))},_project:function(t){var e=this.getProjection(),i=[],n=1/0,o=1/0,r=-1/0,s=-1/0;return t.forEach(function(t){var a=e.fromCoordToOffset(t).round();n=Math.min(a.x,n),o=Math.min(a.y,o),r=Math.max(a.x,r),s=Math.max(a.y,s),i.push(a)}),1===i.length&&i.push(i[0].clone()),{path:i,minBoundPoint:ee(n,o),maxBoundPoint:ee(r,s)}},_simplifyLevel_changed:function(){this.getMap()&&this._draw()},_path_changed:function(){},toGeometry:function(){return{type:xt,coordinates:x.DataUtil.fromPointArrayToCoordinates(this.getPath()),mantle_properties:this._getMantleProperties()}}}),x.Polygon=function(t){this.DEFAULT_OPTIONS={map:null,paths:[],strokeColor:"#007EEA",strokeOpacity:1,strokeWeight:1,strokeStyle:"solid",fillColor:"none",fillOpacity:1,visible:!0,strokeLineCap:"butt",strokeLineJoin:"miter",clickable:!1,simplifyLevel:1,zIndex:0},this.OVERLAY_TYPE="Polygon",this.PROPERTIES_NAME=["paths","map"],x.AbstractShapeOverlay.call(this,t)},te(x.Polygon,x.AbstractShapeOverlay,{_isPath:function(t){var e="array";if(!x.isArray(t)&&(e="kvoArray",t.constructor!==x.KVOArray))throw e=null,new Error("path must be Array or naver.maps.KVOArray");return e},setPaths:function(t){var e=this._isPath(t),i="kvoArray"===e?t:new x.KVOArray;this._unbindPaths(),"array"===e&&t.length>0&&(t[0]instanceof ee?i.push(new x.KVOArray(t)):x.isArray(t[0])&&(!t[0][0]||t[0][0]instanceof ee?x.forEach(t,function(t){i.push(new x.KVOArray(t))}):"number"==typeof t[0][0]?i.push(new x.KVOArray(x.boxToPath(t))):x.forEach(t,function(t){i.push(new x.KVOArray(x.boxToPath(t)))}))),this.set("paths",i),this._bindPaths(),i.getLength()>0&&this.draw()},setPath:function(t){var e,i=this._isPath(t);e="array"===i?t[0]instanceof ee?new x.KVOArray(t):new x.KVOArray(x.boxToPath(t)):t,this._unbindPaths(),this.getPaths().setAt(0,e),this._bindPaths(),this.draw()},_bindPaths:function(){var t=this.getPaths(),e=Jt(this.draw,this);t.forEach(function(t){he.addListener(t,"insert_at",e),he.addListener(t,"remove_at",e),he.addListener(t,"set_at",e)})},_unbindPaths:function(){var t=this.getPaths();t&&t.forEach(function(t){he.clearInstanceListeners(t)})},getPaths:function(){return this.get("paths")},getPath:function(){return this.get("paths").getAt(0)},getBounds:function(){var t,e=this.getPaths();if(!e||0===e.getLength())return null;if(!(t=this.getPath())||0===t.getLength())return null;var i=t.getAt(0),n=ie(i.clone(),i.clone());if(e.forEach(function(t){t.forEach(function(t){n.extend(t)})}),i instanceof ne){var o=n.getMin(),r=n.getMax();n=oe([o.x,o.y,r.x,r.y])}return n},_createShape:function(){return new x.shapes.ClosedPath},_draw:function(){var t=this._project(this.getPaths());t.paths.length>0&&this._shape.setPath(t.paths,t.minBoundPoint,t.maxBoundPoint,this.get("simplifyLevel"))},_project:function(t){var e=this.getProjection(),i=[],n=1/0,o=1/0,r=-1/0,s=-1/0,a=!1;return t.forEach(function(t){var h=[];t.forEach(function(i){var l=e.fromCoordToOffset(i).round();n=Math.min(l.x,n),o=Math.min(l.y,o),r=Math.max(l.x,r),s=Math.max(l.y,s),h.push(l),1===t.getLength()&&h.push(l.clone()),a=!0}),i.push(h)}),a||(i=[]),{paths:i,minBoundPoint:ee(n,o),maxBoundPoint:ee(r,s)}},getAreaSize:function(){var t=this.getProjection(),e=this.getPaths(),i=0;return e.forEach(function(e){var n=e.getArray();i+=x.Math.getPolygonSize(n,t)}),i},_simplifyLevel_changed:function(){this.getMap()&&this._draw()},_paths_changed:function(){},toGeometry:function(){var t=x.DataUtil.fromPolygonArrayToCoordinates([this.getPaths()])[0];return x.forEach(t,function(t){var e=t.length,i=new ne(t[0]),n=new ne(t[e-1]);i.equals(n)||t.push(t[0])}),{type:Mt,coordinates:t,mantle_properties:this._getMantleProperties()}}}),x.Rectangle=function(t){this.DEFAULT_OPTIONS={map:null,bounds:oe(ne(0,0),ne(0,0)),strokeColor:"#007EEA",strokeOpacity:1,strokeWeight:1,strokeStyle:"solid",fillColor:"none",fillOpacity:1,visible:!0,clickable:!1,zIndex:0},this.OVERLAY_TYPE="Rectangle",this.PROPERTIES_NAME=["bounds","map"],x.AbstractShapeOverlay.call(this,t)},te(x.Rectangle,x.AbstractShapeOverlay,{setBounds:function(t){t=x.box(t);var e=t.getMin(),i=t.getMax();t=t instanceof oe?oe.bounds(e,i):ie.bounds(e,i),this.set("bounds",t),this.draw()},getBounds:function(){return this.get("bounds")},_createShape:function(){return new x.shapes.Rectangle},_draw:function(){var t=this.get("bounds"),e=this.getProjection(),i=e.fromCoordToOffset(t.getMin()).round(),n=e.fromCoordToOffset(t.getMax()).round(),o=ie.bounds(i,n);this._shape.setBounds(o.getMin(),o.getMax())},getAreaSize:function(){var t,e=this.getBounds(),i=this.getProjection(),n=e.getMin(),o=e.getMax();return t=e instanceof oe?ne(e.south(),e.east()):ee(e.maxX(),e.minY()),i.getDistance(t,n)*i.getDistance(t,o)},_bounds_changed:function(){},toGeometry:function(){return{type:"MultiPoint",coordinates:this.getBounds().toArray(),mantle_properties:this._getMantleProperties()}}}),x.Circle=function(t){this.DEFAULT_OPTIONS={map:null,center:ne(0,0),radius:0,strokeColor:"#007EEA",strokeOpacity:1,strokeWeight:1,strokeStyle:"solid",fillColor:"none",fillOpacity:1,visible:!0,clickable:!1,zIndex:0},this.OVERLAY_TYPE="Circle",this.PROPERTIES_NAME=["center","radius","map"],x.AbstractShapeOverlay.call(this,t)},te(x.Circle,x.AbstractShapeOverlay,{setCenter:function(t){this.set("center",x.box(t)),this.draw()},getCenter:function(){return this.get("center")},setRadius:function(t){this.set("radius",t),this.draw()},getRadius:function(){return this.get("radius")},getBounds:function(){var t=this.getProjection(),e=this.getCenter(),i=this.getRadius(),n=t.getDestinationCoord(e,0,i),o=t.getDestinationCoord(e,180,i),r=t.getDestinationCoord(e,90,i),s=t.getDestinationCoord(e,270,i),a=ie([s.x,o.y,r.x,n.y]);return e instanceof ne&&(a=oe([s.x,o.y,r.x,n.y])),a},_createShape:function(){return new x.shapes.Circle},_draw:function(){var t=this.get("center"),e=this.get("radius"),i=this.getProjection(),n=i.fromCoordToOffset(t).round(),o=i.getDestinationCoord(t,90,e),r=e;if(o){r=i.fromCoordToOffset(o).round().x-n.x}this._shape.setOptions({center:n,radius:r})},getAreaSize:function(){var t=this.getRadius();this.getProjection();return t*t*Math.PI},_center_changed:function(){},toGeometry:function(){return{type:Tt,coordinates:this.getCenter().toArray(),mantle_properties:this._getMantleProperties()}}}),x.Ellipse=function(t){this.DEFAULT_OPTIONS={map:null,bounds:oe(ne(0,0),ne(0,0)),strokeColor:"#007EEA",strokeOpacity:1,strokeWeight:1,strokeStyle:"solid",fillColor:"none",fillOpacity:1,visible:!0,clickable:!1,zIndex:0},this.OVERLAY_TYPE="Ellipse",this.PROPERTIES_NAME=["bounds","map"],x.AbstractShapeOverlay.call(this,t)},te(x.Ellipse,x.Rectangle,{_createShape:function(){return new x.shapes.Ellipse},getAreaSize:function(){var t,e=this.getBounds(),i=this.getProjection(),n=e.getMin(),o=e.getMax();t=e instanceof oe?ne(e.south(),e.east()):ee(e.maxX(),e.minY());var r=i.getDistance(t,n)/2,s=i.getDistance(t,o)/2;return Math.PI*r*s},toGeometry:function(){this.getBounds();return{type:"MultiPoint",coordinates:this.getBounds().toArray(),mantle_properties:this._getMantleProperties()}}}),x.PatternPolyline=function(t){this.DEFAULT_OPTIONS={map:null,path:[],strokeStyle:"shortdot",strokeLineCap:"round",strokeLineJoin:"round",strokeColor:"#007EEA",strokeOpacity:1,strokeWeight:5,outlineColor:"#000000",outlineOpacity:1,outlineWeight:2,patternIcon:null,patternInterval:0,zIndex:1},this.OVERLAY_TYPE="PatternPolyline",t=Qt({},this.DEFAULT_OPTIONS||{},t),this.setOptions(t)},te(x.PatternPolyline,x.OverlayView,{setOptions:function(t){var i=this;if("string"==typeof t){var n=t,o=arguments[1],r={};r[n]=o,i.setValues(r)}else x.forEach(t,function(t,e){"map"!==e&&i.setOptions(e,t)}),t.map!==e&&this.setMap(t.map)},setPath:function(t){if(!x.isArray(t)&&t.constructor!==x.KVOArray)throw new Error("path must be Array or naver.maps.KVOArray");var e;e=x.isArray(t)?t[0]instanceof ee?new x.KVOArray(t):new x.KVOArray(x.boxToPath(t)):t,this.set("path",e),this.draw()},getPath:function(){return this.get("path")},onAdd:function(){var t=this.get("map"),e=this.get("path"),i=this.get("strokeStyle"),n=this.get("strokeWeight"),o=this.get("strokeLineCap"),r=this.get("strokeLineJoin"),s=this.get("strokeColor"),a=this.get("strokeOpacity"),h=this.get("outlineColor"),l=this.get("outlineOpacity"),c=this.get("outlineWeight"),u=this.get("zIndex");this._basePolyline=new x.Polyline({map:t,path:e,strokeStyle:i,strokeWeight:n,strokeLineCap:o,strokeLineJoin:r,strokeColor:s,strokeOpacity:a,zIndex:u}),this._outPolyline=new x.Polyline({map:t,path:e,strokeStyle:i,strokeWeight:n,strokeLineCap:o,strokeLineJoin:r,strokeColor:h,strokeOpacity:l,zIndex:u-1}),this._outPolyline._shape._setOutlineWeight(c)},onRemove:function(){this._basePolyline&&(this._basePolyline.setMap(null),this._basePolyline=null),this._outPolyline&&(this._outPolyline.setMap(null),this._outPolyline=null)},draw:function(){}}),x.ConverterUtil={isXMLDoc:function(t){if(!t)return!1;var e=(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},isHexColor:function(t){return/(^[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{6}$)/i.test(t)},isAlphabet:function(t){return/^[A-Z]+$/i.test(t)},getElementsByTagName:function(t,e,i){var n=t.getElementsByTagName(e);return 0===n.length&&-1!==e.indexOf(":")&&(n=t.getElementsByTagName(e.split(":")[1])),i?[].slice.call(n):n},getOneElementByTagName:function(t,e){var i=x.ConverterUtil.getElementsByTagName(t,e,!0);return i.length>0?i[0]:null},getElementByTagNameInParent:function(t,e,i){for(var n,o=x.ConverterUtil.getElementsByTagName(t,e),r=0,s=o.length;r<s;r++){var a=o[r];if(a.parentNode.nodeName===i){n=a;break}}return n},getValueByTagName:function(t,e){var i=void 0!==e?x.ConverterUtil.getElementsByTagName(t,e,!0):t,n="";return i&&(n=i.length?i[0].textContent||i[0].innerText:i.textContent||i.innerText),n},getAttribute:function(t,e){return t.getAttribute(e)},parseColor:function(t){t=t||"","#"===t.substr(0,1)&&(t=t.substr(1));var e,i=t.length,n="",o=[];switch(i){case 3:case 6:n=t;break;case 8:e=parseInt(t.substr(0,2),16)/255,n=t.substr(6,2)+t.substr(4,2)+t.substr(2,2)}return 0===n.length||(o.push("#"+n),isNaN(e))?o[0]:(o.push(e),o)}};var _e=x.ConverterUtil;!function(){function t(t){var e=_e.getElementsByTagName(t,"bounds"),i=null;if(e&&e.length){var n=e[0],o=parseFloat(_e.getAttribute(n,"minlat")),r=parseFloat(_e.getAttribute(n,"minlon")),s=parseFloat(_e.getAttribute(n,"maxlat"));i=[r,o,parseFloat(_e.getAttribute(n,"maxlon")),s]}return i}function e(t){var e={};return x.forEach(u,function(i){var n=_e.getValueByTagName(t,i);n&&(e[i]=n)}),x.isEmptyObject(e)?null:e}function i(t,e){var i=_e.getElementByTagNameInParent(t,"extensions",e),n=null;return i&&(n=o(i)),n}function n(t,e,i,n){var o=null,r=null;switch(t){case"width":r="strokeWeight",o=Math.floor(+e/25.4*96),isNaN(o)&&(r=null);break;case"opacity":r="strokeOpacity",o=parseFloat(e),isNaN(o)&&(r=null);break;case"linecap":r="strokeLineCap",o=e.toLowerCase();break;case"pattern":r="strokeStyle",o=e.toLowerCase();break;case"color":r="strokeColor",o=_e.parseColor(e)}r&&(i[t]=o,n[r]=o)}function o(t){var e={},i={};if(t)for(var o=0,r=p.length;o<r;o++){var s=p[o],a=_e.getValueByTagName(t,s);a&&n(s,a,e,i)}return{bypassStyle:x.isEmptyObject(e)?null:e,mantleStyle:x.isEmptyObject(i)?null:i}}function r(t){var e=_e.getAttribute(t,"lat"),i=_e.getAttribute(t,"lon"),n=_e.getValueByTagName(t,"ele"),o=[parseFloat(i),parseFloat(e)];return n&&(n=parseFloat(n),isNaN(n)||o.push(n)),o}function s(t,e,i){var n={type:St,geometry:{type:t,coordinates:e}};return i&&(i.bypassStyle&&(n.properties=i.bypassStyle),i.mantleStyle&&(n.geometry.mantle_properties=i.mantleStyle,n.geometry.mantle_properties.overlayType="PolyLine")),n}function a(t){var i=r(t),n=e(t),o={type:St,geometry:{type:Tt,coordinates:i}};return n&&(o.properties=n),o}function h(t,e){var i=_e.getElementsByTagName(t,"trkseg",!0),n=1===i.length,o=[];return x.forEach(i,function(t){var e=_e.getElementsByTagName(t,"trkpt",!0),i=[];x.forEach(e,function(t){i.push(r(t))}),o.push(i)}),s(n?xt:bt,n?o[0]:o,e)}function l(t,e){var i=_e.getElementsByTagName(t,"rtept",!0),n=[];return x.forEach(i,function(t){n.push(r(t))}),s(xt,n,e)}function c(e){var n=_e.getElementsByTagName(e,"wpt",!0),o=_e.getElementsByTagName(e,"trk",!0),r=_e.getElementsByTagName(e,"rte",!0),s=null,c={type:Pt,features:[]},u=t(e);return u&&(c.bbox=u),x.forEach(n,function(t){(s=a(t))&&c.features.push(s)}),x.forEach(o,function(t){(s=h(t,i(t,"trk")))&&c.features.push(s)}),x.forEach(r,function(t){(s=l(t,i(t,"rte")))&&c.features.push(s)}),c}var u=["time","name","desc","cmt","type","sym"],p=["color","opacity","width","linecap","pattern"];x.GPX={fromGpxToGeoJson:c}}(),function(){function t(t,e){e=e||",",t=t.split(e);for(var i=[],n=0,o=t.length;n<o;n++)i[n]=parseFloat(u(t[n]));return i}function e(e){e=e.replace(/^\s*|\s*$/g,"").split(/\s+/);var i=[];return x.forEach(e,function(e){i.push(t(e))}),i}function i(t,e,i){e&&(e=u(e))&&(i[t]=e)}function n(t){return!!+t}function o(t,e){var o=r(t),s={},a={};if(0===o.length)return[];var h=_e.getOneElementByTagName(t,"visibility");if(h){var l=_e.getValueByTagName(h);l=n(l),s.visibility=l,a.visible=l}var c=_e.getValueByTagName(t,"styleUrl");if(c&&"#"===c[0]){s.styleUrl=c;var u=e[c];if(u.normal&&u.highlight){var p=u.normal,d=u.highlight,f=e[p],g=e[d];s[p]=f.o,s[d]=g.o,a[p]=f.m,a[d]=g.m,x.extend(a,f.m)}else{var _=u.o,m=u.m;_&&x.extend(s,_),m&&x.extend(a,m)}}return i("name",_e.getValueByTagName(t,"name"),s),i("address",_e.getValueByTagName(t,"address"),s),i("description",_e.getValueByTagName(t,"description"),s),x.isEmptyObject(a)||x.forEach(o,function(t){t.mantle_properties=x.extend(t.mantle_properties,a)}),{type:St,geometry:1===o.length?o[0]:{type:Et,geometries:o},properties:s}}function r(i){var n=_e.getOneElementByTagName(i,"MultiGeometry"),o=_e.getOneElementByTagName(i,"gx:MultiTrack");if(n)return r(n);if(o)return r(o);var s=[];return x.forEach(l,function(n){var o=_e.getElementsByTagName(i,n);o&&o.length>0&&x.forEach(o,function(i){var o=null,r=n,a=null;switch(n){case Tt:a="Marker",o=t(_e.getValueByTagName(i,"coordinates"));break;case xt:a="Polyline",o=e(_e.getValueByTagName(i,"coordinates"));break;case Mt:a="Polygon";var h=_e.getOneElementByTagName(i,"outerBoundaryIs"),l=_e.getElementsByTagName(i,"innerBoundaryIs"),c=null;o=[],h&&(c=_e.getOneElementByTagName(h,"LinearRing"),o.push(e(_e.getValueByTagName(c,"coordinates")))),x.forEach(l,function(t){c=_e.getOneElementByTagName(t,"LinearRing"),o.push(e(_e.getValueByTagName(c,"coordinates")))});break;case"gx:Track":a="Polyline",r=xt,o=[];var u=_e.getElementsByTagName(i,"gx:coord",!0);x.forEach(u,function(e){o.push(t(_e.getValueByTagName(e)," "))})}o&&o.length>0&&s.push({type:r,coordinates:o,mantle_properties:{overlayType:a}})})}),s}function s(t){var e=_e.getValueByTagName(t,"color"),i=_e.getElementsByTagName(t,"width"),n={o:{},m:{}};if(e){var o=_e.parseColor(e);n.o.color=e,n.m.strokeColor=o[0],n.m.strokeOpacity=o[1]}return i&&i.length>0&&(i=_e.getValueByTagName(i),n.o.width=i,n.m.strokeWeight=i),n}function a(t){var e=_e.getValueByTagName(t,"color"),i=(_e.getElementsByTagName(t,"fill"),_e.getElementsByTagName(t,"outline"),{o:{},m:{}});if(e){var n=_e.parseColor(e);i.o.color=e,i.m.fillColor=n[0],i.m.fillOpacity=n[1]}return i}function h(t){var e={type:Pt,features:[]},i=_e.getElementsByTagName(t,"Style",!0),n=_e.getElementsByTagName(t,"StyleMap",!0),r=_e.getElementsByTagName(t,"Placemark",!0),h={};return x.forEach(i,function(t){var e=_e.getAttribute(t,"id"),i="#"+e;h[i]={},i.length>1&&x.forEach(c,function(e){var n=_e.getElementsByTagName(t,e,!0);x.forEach(n,function(t){var n=null;switch(e){case"LineStyle":n=s(t);break;case"PolyStyle":n=a(t)}h[i]=x.extend(h[i],n)})})}),x.forEach(n,function(t){var e=_e.getAttribute(t,"id"),i="#"+e,n=_e.getElementsByTagName(t,"Pair",!0),o={};x.forEach(n,function(t){var e=_e.getValueByTagName(t,"key"),i=_e.getValueByTagName(t,"styleUrl");o[e]=i}),h[i]=o}),x.forEach(r,function(t){e.features.push(o(t,h))}),e}var l=[Mt,xt,Tt,"gx:Track"],c=["LineStyle","PolyStyle"],u=function(){return String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/gm,"")}}();x.KML={fromKmlToGeoJson:h}}(),x.Converter={gpx:function(t){if(!_e.isXMLDoc(t))throw new Error("Invalid Parameter Type Error.");return x.GPX.fromGpxToGeoJson(t)},kml:function(t){if(!_e.isXMLDoc(t))throw new Error("Invalid Parameter Type Error.");return x.KML.fromKmlToGeoJson(t)}};x.Converter;x.DataUtil={toPoint:function(t){return t?[t.x,t.y]:[]},fromPointArrayToCoordinates:function(t){var e=[];return t instanceof x.KVOArray&&(t=t.getArray()),x.forEach(t,function(t){e.push(x.DataUtil.toPoint(t))}),e},fromPointArrayListToCoordinates:function(t){var e=[];return x.forEach(t,function(t){t instanceof x.KVOArray&&(t=t.getArray()),e.push(x.DataUtil.fromPointArrayToCoordinates(t))}),e},fromPolygonArrayToCoordinates:function(t){var e=[];return t instanceof x.KVOArray&&(t=t.getArray()),x.forEach(t,function(t){t instanceof x.KVOArray&&(t=t.getArray()),e.push(x.DataUtil.fromPointArrayListToCoordinates(t))}),e},_parsePoint:function(t){return new naver.maps.Point(t)},_parseLineString:function(t){var e=[];return x.forEach(t,function(t){e.push(x.DataUtil._parsePoint(t))}),e},_parseMultiLineString:function(t){var e=[];return x.forEach(t,function(t){e.push(x.DataUtil._parseLineString(t))}),e},_parseMultiPolygon:function(t){var e=[];return x.forEach(t,function(t,i){e.push(x.DataUtil._parseMultiLineString(t))}),e}};x.DataUtil;x.DataLayer=function(){this._features=[],this._stylist=null,this._styleType=null},te(x.DataLayer,x.KVO,{setMap:function(t){this.set("map",t)},getMap:function(){return this.get("map")},addGeoJson:function(t,e){for(var i=this._getFeaturesFrom(t),n=0,o=i.length;n<o;n++)this.addFeature(i[n],e);return t.bbox&&this.getMap().fitBounds(t.bbox),i},addGpx:function(t,e){var i=[],n=x.Converter.gpx(t);return n&&(i=this.addGeoJson(n,e)),i},addKml:function(t,e){var i=[],n=x.Converter.kml(t);return n&&(i=this.addGeoJson(n,e)),i},removeGeoJson:function(t){var e=this._features,i=[];if(t.type===St)i.push(t);else{if(t.type!==Pt)return;i=i.concat(t.features)}for(var n,o,r=e.length-1;r>=0;r--){n=e[r],o=n.getRaw();for(var s=0,a=i.length;s<a;s++)if(x.equals(o,i[s])){this.removeFeature(n),i.splice(s,1);break}}},addFeature:function(t,e){return t.setDataLayer(this),e&&t.autoStyle(),this._listenFeature(t),this._features.push(t),he.trigger(this,"addfeature",{feature:t}),t},removeFeature:function(t){var e=this._features,i=t.getId(),n=x.getIndexOfElement(e,t);return n>-1&&(t.setDataLayer(null),this._unlistenFeature(t),e.splice(n,1),he.trigger(this,"removefeature",{feature:t})),i},getAllFeature:function(){return this._features},getFeatureById:function(t){var e=null;return this.forEach(function(i){if(i.getId()===t)return e=i,!0}),e},forEach:function(t){var e=this.getAllFeature();return x.forEach(e,t)},_getFeaturesFrom:function(t){var e=[],i=this;switch(t.type){case Pt:x.forEach(t.features,function(t){e=e.concat(i._getFeaturesFrom(t))});break;case St:e.push(new x.Feature(t))}return e},_listenFeature:function(t){this._unlistenFeature(t);var e=t.EVENT_LIST,i=this;t.__dataLayerListeners=[],x.forEach(e,function(e){t.__dataLayerListeners.push(he.forward(t,e,i))}),t.__dataLayerListeners.push(he.forward(t,"property_changed",this))},_unlistenFeature:function(t){var e=t.__dataLayerListeners;e&&(he.removeListener(e),t.__overlayListeners=null,delete t.__overlayListeners)},setStyle:function(t){var e=t||null,i=null,n=this;e&&(i=x.isFunction(e)?"function":"object",x.isFunction(e)||(e=function(){return t})),this._stylelist=e,this._styleType=i,e&&this.forEach(function(t){n._setFeatureStyle(t)})},getStyle:function(){return this._stylelist?"function"!==this._styleType?this._stylelist():this._stylelist:null},overrideStyle:function(t,e){this.set("overriden_style",e),this._setFeatureStyle(t,e)},revertStyle:function(t){if(this.set("overriden_style",null),t)this._setFeatureStyle(t);else{var e=this;this.forEach(function(t){e._setFeatureStyle(t)})}},_setFeatureStyle:function(t,e){if(this._stylelist||e){var i=this._stylelist,n=e||(i?i(t):null);n&&t.setStyle(n)}},toGeoJson:function(){var t={type:Pt,features:[]};return this.forEach(function(e){t.features.push(e.toGeoJson())}),1===t.features.length&&(t=t.features[0]),t}}),x.Geometry=function(t){if(this._raw=t,!t.type||!t.coordinates)throw new Error("Invalid geojson!");this.set("id",x.guid()),this.set("type",t.type),this.set("coords",[]),this._parseCoordinates()},te(x.Geometry,x.KVO,{getRaw:function(){return this._raw},getMantleProperties:function(){return this._raw.mantle_properties},getId:function(){return this.get("id")},getType:function(){return this.get("type")},getCoords:function(){return this.get("coords")},_parseCoordinates:function(){var t=this.get("type"),e=this._raw.coordinates,i=[];switch(t){case Tt:i=[x.DataUtil._parsePoint(e)];break;case"MultiPoint":i=x.DataUtil._parseLineString(e);break;case xt:i=[x.DataUtil._parseLineString(e)];break;case bt:i=x.DataUtil._parseMultiLineString(e);break;case Mt:i=[x.DataUtil._parseMultiLineString(e)];break;case"MultiPolygon":i=x.DataUtil._parseMultiPolygon(e)}this.set("coords",i)},toGeoJson:function(){var t=(this.getRaw(),this.getType()),e=this.getCoords(),i={type:t,coordinates:[]};switch(t){case Tt:i.coordinates=x.DataUtil.toPoint(e[0]);break;case"MultiPoint":i.coordinates=x.DataUtil.fromPointArrayToCoordinates(e);break;case xt:i.coordinates=x.DataUtil.fromPointArrayToCoordinates(e[0]);break;case bt:i.coordinates=x.DataUtil.fromPointArrayListToCoordinates(e);break;case Mt:i.coordinates=x.DataUtil.fromPolygonArrayToCoordinates(e)[0];break;case"MultiPolygon":i.coordinates=x.DataUtil.fromPolygonArrayToCoordinates(e)}return i}}),x.Feature=function(t){this._raw=t,this.EVENT_LIST=["click","dblclick","mouseover","mouseout","mousedown","mouseup","rightclick"],this.DEFAULT_OVERLAY_STYLE={strokeColor:"#000",strokeOpacity:.8,strokeWeight:3,fillColor:"#000",fillOpacity:.3,clickable:!0},this.set("type",t.type),this.set("id",t.id||x.guid()),this._initProperties(),this._initGeometryCollection(),this._initOverlay()},te(x.Feature,x.KVO,{getRaw:function(){return this._raw},getId:function(){return this.get("id")},setProperty:function(t,e){var i=this._propertyList||[],n=this.getProperty(t);-1===x.getIndexOfElement(i,t)&&i.push(t),this.set("property_"+t,e),he.trigger(this,"property_changed",{feature:this,name:t,newValue:e,oldValue:n}),this._applyStyle()},getProperty:function(t){return this.get("property_"+t)},getBounds:function(){return this.get("bounds")||null},getGeometries:function(){return this.get("geometryCollection")},getOverlays:function(){return this._overlays},forEachOverlay:function(t){return x.forEach(this._overlays,t)},setStyle:function(t){this.forEachOverlay(function(e){var i=Qt(!0,{},t||{});e instanceof naver.maps.Marker&&!i.icon&&null===e.getIcon()&&(i.icon=null,delete i.icon),e.setOptions(i)})},autoStyle:function(){var t=this.getGeometries();this.forEachOverlay(function(e){var i=e.__geometryId;i&&x.forEach(t,function(t){t.getId()===i&&e.setOptions(t.getMantleProperties())})})},setDataLayer:function(t){this.set("dataLayer",t)},_initBounds:function(){var t=this._raw.bbox,e=null;t?e=new naver.maps.PointBounds(this._raw.bbox):this.forEachOverlay(function(t){var i=null;t.getBounds?i=t.getBounds():t.getPosition&&(i=ie(t.getPosition().clone(),t.getPosition().clone())),i&&(e=e?e.union(i):i.clone())}),this.set("bounds",e)},_initProperties:function(){var t=this._raw,e=t.properties,i=[],n=this;x.forEach(e,function(t,e){i.push(e),n.set("property_"+e,t)}),this._propertyList=i},_initGeometryCollection:function(){var t=this._parseGeometry(this._raw.geometry);this.set("geometryCollection",t)},_parseGeometry:function(t){var e=[],i=this;return t.type===Et?x.forEach(t.geometries,function(t){e=e.concat(i._parseGeometry(t))}):e.push(new x.Geometry(t)),e},_initOverlay:function(){var t=this.get("geometryCollection"),e=this.DEFAULT_OVERLAY_STYLE,i=[],n=this;x.forEach(t,function(t){var o=t.getType(),r=t.getCoords(),s=t.getMantleProperties(),a=s?s.overlayType:null,h=s?t.getId():null;switch(o){case Tt:s&&"Circle"===a?i.push(new naver.maps.Circle({center:r[0],radius:s.radius,__geometryId:h})):i.push(new naver.maps.Marker({position:r[0],__geometryId:h}));break;case"MultiPoint":s&&"Marker"!==a?i.push(new naver.maps[a]({bounds:new naver.maps.PointBounds(r[0],r[1]),__geometryId:h})):x.forEach(r,function(t){i.push(new naver.maps.Marker({position:t,__geometryId:h}))});break;case xt:case bt:x.forEach(r,function(t){i.push(new naver.maps.Polyline(Qt({path:t,__geometryId:h},e)))});break;case Mt:case"MultiPolygon":var l=[];x.forEach(r,function(t){x.forEach(t,function(t){l.push(t)})}),i.push(new naver.maps.Polygon(Qt({paths:l,_raw:n.getRaw(),__geometryId:h},e)))}}),this._initFeatureEvent(i),this._overlays=i},_initFeatureEvent:function(t){var e=this,i=function(t,i){return he.addListener(t,i,function(t){var n=t||{};n.feature=e,he.trigger(e,i,n)})},n=e.EVENT_LIST,o=[];x.forEach(t,function(t){x.forEach(n,function(e){o.push(i(t,e))})}),e._listeners=o},_applyStyle:function(){var t=this.get("dataLayer");if(t){var e=t.getStyle(),i=null,n=t.get("overriden_style");e&&(i=x.isFunction(e)?e(this):e),i&&this.setStyle(i),n&&this.setStyle(n)}},dataLayer_changed:function(t){t?(this._applyStyle(),this.bindTo("map",t)):(this.unbind("map"),this.map_changed(null))},map_changed:function(t){this.forEachOverlay(function(e){e.setMap(t)}),this._initBounds()},toGeoJson:function(){var t=this._propertyList,e=this.getRaw(),i={id:this.getId(),type:St,properties:{},geometry:{}},n=this.getOverlays(),o=this;return x.forEach(t,function(t){var e=o.getProperty(t);x.hasValue(e)&&(i.properties[t]=e)}),e.bbox&&(i.bbox=e.bbox),e.crs&&(i.crs=e.crs),n.length>1?(i.geometry.type=Et,i.geometry.geometries=[],x.forEach(n,function(t){i.geometry.geometries.push(t.toGeometry())})):i.geometry=n[0].toGeometry(),i}});var me=function(){for(var t=T.getElementsByTagName("script"),e="",i=t.length-1;i>=0&&(e=t[i].src||"",!k.test(e));i--)e="";return t=null,e},ye=function(t){var e=T.createElement("a");e.href=t;var i=e.protocol,n=e.hostname||e.host;return 0!==i.indexOf("http")&&(i="https:"),e=null,i+"//"+n+"/openapi/v3/maps-"};!function(){var e=function(t,e){this._parse(t);var i=this.submodules;if(i){for(var n=[],o=0,r=i.length;o<r;o++)n.push(e+i[o]+".js");this.load(n,Jt(this.boot,this))}else this.boot()};e.prototype={constructor:e,exec:function(e){function i(){if(n){var e=function(e){for(var i=t,n=e.split("."),o=n.length-1,r=n[o],s=0,a=o;s<a;s++){var h=n[s];if(!(h in i))return null;i=i[h]}return i[r]}(n);e&&(M.jsContentLoaded=!0,e())}M.onJSContentLoaded&&(M.jsContentLoaded=!0,M.onJSContentLoaded())}if(!M.jsContentLoaded){var n=this.callback;t.clearTimeout(this._t),x.isNumber(e)?this._t=t.setTimeout(i,e):i()}},boot:function(){var e=he.addDOMListener(t,"load",Jt(function(){he.removeDOMListener(e),e=null,this.exec()},this));this.exec(),M.jsContentLoaded||"complete"!==T.readyState||this.exec(10)},load:function(t,e){var i=navigator.connection||{},n="cellular"===i.type&&i.downlinkMax<=.115;"loading"!==T.readyState||n?this._async(t,e):this._sync(t,e)},_parse:function(t){var e=t.split("?")[1];if(e){e=e.replace(/&/gi,"&").split("&");for(var i=e.length-1;i>=0;i--){var n=e[i];if(0===n.indexOf("submodules=")){var o=n.replace("submodules=","");o&&(this.submodules=o.split(","))}else 0===n.indexOf("callback=")&&(this.callback=n.replace("callback=",""))}}},_sync:function(t,e){x.forEach(t,function(t){T.write('<script type="text/javascript" src="'+t+'"><\/script>')}),e()},_async:function(t,e){for(var i=t.length,n=0,o=function(){++n>=i&&e()},r=T.body||T.getElementsByTagName("head")[0],s=0,a=i;s<a;s++){var h=T.createElement("script");h.type="text/javascript",h.src=t[s],"readyState"in h?h.onreadystatechange=function(){"loaded"!=h.readyState&&"complete"!=h.readyState||(h.onreadystatechange=null,o())}:h.onload=o,r.appendChild(h)}}};var i=(me||qt)()||"";new e(i,(ye||qt)(i)||"")}();var ve=function(){try{if(x.IS_IN_HOUSE||x.USE_NCP_NEW_CONSOLE)return;if(new Date>new Date("2025-12-31T23:59:59"))return;var t=x.GOV_CLIENT_ID?"https://www.gov-ncloud.com/support/notice/all/499":x.FIN_CLIENT_ID?"https://www.fin-ncloud.com/support/notice/all/1620":"https://www.ncloud.com/support/notice/all/1930",e="font-family:helvetica,dotum; font-size:15px;",i=[e+"color:red;",e,e,e],n=["\uc2e0\uaddc Maps API \uc804\ud658 \uc548\ub0b4","\uc548\ub155\ud558\uc138\uc694. \ub124\uc774\ubc84 \ud074\ub77c\uc6b0\ub4dc \ud50c\ub7ab\ud3fc\uc785\ub2c8\ub2e4. AI NAVER API \uc0c1\ud488\uc5d0\uc11c \uc81c\uacf5\ub418\ub358 \uc9c0\ub3c4 API \uc11c\ube44\uc2a4\ub294 \uc810\uc9c4\uc801\uc73c\ub85c \uc885\ub8cc\ub420 \uc608\uc815\uc5d0 \uc788\uc2b5\ub2c8\ub2e4. \uc544\ub798 \uacf5\uc9c0\uc0ac\ud56d \ubc0f \uac00\uc774\ub4dc \ucc38\uace0\ud574\uc11c \uc2e0\uaddc \ud074\ub77c\uc774\uc5b8\ud2b8 \uc544\uc774\ub514 \ubc1c\uae09\ubc1b\uc544 \uc0ac\uc6a9 \ubd80\ud0c1\ub4dc\ub9bd\ub2c8\ub2e4.","\u25a0 \uacf5\uc9c0\uc0ac\ud56d : "+t,"\u25a0 \ubcc0\uacbd \uc801\uc6a9 \uac00\uc774\ub4dc : https://navermaps.github.io/maps.js.ncp/docs/tutorial-2-Getting-Started.html"];x.console.log(n,i)}catch(t){}},Te=function(t,e){this._initialize(t,e)};Te.prototype={constructor:Te,_initialize:function(t,e){this._urls=e,this._metadata={tileTypes:[],versions:{},isFailed:!1},this._loadCounts=0,this._isFailed=!1,this._isSetDefaultMetadata=!1,this._defaultMetadata="attribution,bounds,center,format,maxzoom,minzoom,name,scheme,tilejson,version";for(var i=0,n=t.length;i<n;i++)this._load(t[i],e[i]);he.trigger(this,"style_map_metadata_load_started")},_load:function(t,e){Ht.jsonp(e,{callbackname:"callback",callback:Jt(function(e){this._onLoadMetadata(t,this._parse(e))},this),error:Jt(function(e){e&&"loaded"===e||this._onLoadFailed(t)},this)})},_parse:function(t){return this._setDefaultMetadata(t),t},_setDefaultMetadata:function(t){if(!this._isSetDefaultMetadata){for(var e,i=this._metadata,n=this._defaultMetadata.split(",");e=n.pop();)i[e]=t[e];this._isSetDefaultMetadata=!0}},_checkComplete:function(){this._loadCounts+=1,this._loadCounts===this._urls.length&&this._onLoadComplete(this._metadata)},_onLoadMetadata:function(t,e){this._metadata[t]=e,this._metadata.tileTypes.push(t),this._metadata.versions[t]=e.version,this._checkComplete()},_onLoadFailed:function(t){he.trigger(this,"style_map_metadata_load_failed",t),this._isFailed=!0,this._metadata.isFailed=!0,this._metadata.tileTypes.push(t),this._metadata[t]={isFailed:!0},this._checkComplete()},_onLoadComplete:function(t){he.trigger(this,"style_map_metadata_load_completed",t)}},x.TileMetadataLoader=Te;var xe=function(){this._lastVersion={version:0,updateDate:""},this._checkInterval=3e5};xe.prototype={CTT_METADATA_API:et?"https://map.pstatic.net/nvc/ctt/wmts/naver/getMetadata/v1":"http://map.pstatic.net/nvc/ctt/wmts/naver/getMetadata/v1",RTS_VERSION_API:et?"https://map.pstatic.net/nvc/ctt/rts/naver/getLatestVersion/v1":"http://map.pstatic.net/nvc/ctt/rts/naver/getLatestVersion/v1",constructor:xe,start:function(t){var e=this;e.options=Qt({interval:3e5},t);var i=e.options.callback;e._getCheckInterval(function(){e.startAutoRefresh()}),e.loadRTSVersion(function(){e.startAutoRefresh(),i&&i()})},stop:function(){this.endAutoRefresh(),this.options=null,this._metadata=null,this._lastVersion={version:0,updateDate:""},this._checkInterval=3e5},loadRTSVersion:function(t){var e=this;x.jsonp(this.RTS_VERSION_API,{callbackname:"callbackname",callback:function(i){e._setLastVersion(i),t&&t(i)},error:function(){t&&t()}})},_getCheckInterval:function(t){var e=this;x.jsonp(this.CTT_METADATA_API,{callbackname:"callbackname",callback:function(i){e._setCheckInterval(i),t&&t(i)},error:function(){Me.send("Failure to load ctt meta information","error")}})},_setCheckInterval:function(t){this._metadata=t,this._updateCheckInterval()},_updateCheckInterval:function(){var t,e=this._metadata;try{t=e["dynamic-properties"].update["check-interval"]}catch(e){t=300}this._checkInterval=1e3*t},_setLastVersion:function(t){this._lastVersion=t,this._updateRTSVersion()},_updateRTSVersion:function(){var t=this.options.imageMapType;if(t&&t.getMapTypeOptions){t.getMapTypeOptions().timeStamp=this._lastVersion.version}},getRTSVersion:function(){return this._lastVersion.version},startAutoRefresh:function(){var e=this,i=e.options.mapOrLayer,n=e.options.interval,o=e._checkInterval||n;if(e._timer&&t.clearTimeout(e._timer),i){var r=n<o?o:n;e._timer=t.setTimeout(function o(){e.loadRTSVersion(function(r){r&&i.refresh(!0),e._timer=t.setTimeout(o,n)})},r)}},endAutoRefresh:function(){this._timer&&(t.clearTimeout(this._timer),this._timer=null,delete this._timer)}};var Me={send:function(t,e,i){try{var n=v();if(!n)return;var o=e||"log",r={log:t,logLevel:o,projectName:"P2d9044KR18970a3501d_mantle",projectVersion:"3.10.1"};i&&x.extend(r,i),n.open("POST","https://kr-col-ext.nelo.navercorp.com/_store",!0),n.timeout=3e3,n.send(JSON.stringify(r))}catch(t){}}};!function(){if(!t.naver||!t.naver.maps){x.isDefined(t.naver)||(t.naver={}),Ht.DOM=se,Ht.DOMEvent=ae,Ht.jsonp=x.jsonp,Ht.CalcControlPosition=x.CalcControlPosition,Ht.glSupported=x.glSupported,Qt(M,{Map:x.Map,MapTypeId:Wt,Point:ee,PointBounds:ie,LatLng:ne,LatLngBounds:oe,Size:re,Event:he,KVO:x.KVO,KVOArray:x.KVOArray,Layer:x.Layer,BicycleLayer:x.BicycleLayer,CadastralLayer:x.CadastralLayer,LabelLayer:x.LabelLayer,StreetLayer:x.StreetLayer,TrafficLayer:x.TrafficLayer,Marker:x.Marker,InfoWindow:x.InfoWindow,GroundOverlay:x.GroundOverlay,OverlayView:x.OverlayView,PaneTypeRegistry:x.MapTypeRegistry,MapTypeRegistry:x.MapTypeRegistry,Polyline:x.Polyline,Polygon:x.Polygon,Rectangle:x.Rectangle,Ellipse:x.Ellipse,Circle:x.Circle,PatternPolyline:x.PatternPolyline,Projection:ce,EmptyProjection:x.EmptyProjection,UTMK:x.UTMK,UTMK_NAVER:x.UTMK_NAVER,EPSG3857:x.EPSG3857,Tile:x.Tile,ImageTile:x.ImageTile,CanvasTile:x.CanvasTile,ImageMapType:x.ImageMapType,CanvasMapType:x.CanvasMapType,NaverMapTypeOption:de,NaverMapTypeOptions:de,NaverStyleMapTypeOption:fe,NaverStyleMapTypeOptions:fe,TileIndexPane:x.TileIndexPane,CustomControl:x.CustomControl,ScaleControl:x.ScaleControl,LogoControl:x.LogoControl,MapDataControl:x.MapDataControl,MapTypeControl:x.MapTypeControl,MapTypeControlStyle:Y,ZoomControl:x.ZoomControl,ZoomControlStyle:Y,SymbolPath:j,SymbolStyle:G,Position:U,Animation:K,PointingIcon:W,Util:Ht,Data:x.DataLayer,Feature:x.Feature,Geometry:x.Geometry,DataConverter:x.Converter,TileMetadataLoader:x.TileMetadataLoader}),delete M.MapTypeId.DARK,delete M.MapTypeId.DARK_TERRAIN,t.naver.maps=M;var e=he.addListener(M,"__sbinit",function(t){wt?(he.removeListener(e),e=null):R(t)});it&&(M.VERSION="3.10.1")}}(),!t.N&&t.naver.maps&&(t.N=t.naver.maps);var be=function(t){var e={mapTypes:[],listOfFailed:[],tileTypes:[],listOfTileFailed:[],isFailed:t.isFailed};return x.forEach(t.tileTypes,function(i){var n=Bt[i]||"";e.mapTypes.push(n),e.tileTypes.push(i),t[i].hasOwnProperty("isFailed")&&(e.listOfFailed.push(n),e.listOfTileFailed.push(i))}),e},Ee=function(t){var e=new Te(x.TILE_TYPES,x.GET_STYLE_MAP_METADATA_URLS(!1));he.addListener(e,"style_map_metadata_load_completed",function(e){if(e.isFailed){if(le.available()&&le.has("__mantle_tile_meta_data"))try{var i=le.getItem("__mantle_tile_meta_data");return zt=i,void t.initMap(be(i))}catch(t){}return void x.console.log("\uc77c\uc2dc\uc801\uc778 \uc11c\ube44\uc2a4 \uc624\ub958\uc785\ub2c8\ub2e4. \uc7a0\uc2dc \ud6c4 \ub2e4\uc2dc \uc2dc\ub3c4\ud574 \uc8fc\uc138\uc694.")}zt=e,t.initMap(be(e)),t.trigger("style_map_metadata_load_completed");try{le.available()&&le.setItem("__mantle_tile_meta_data",e)}catch(t){}}),he.addListener(e,"style_map_metadata_load_failed",function(t){Me.send("Failure to load tile meta information: ("+t+")","error")})}}(window)
Save File
Cancel