define("common:static/js/swipe.js",function(n,t,e){"use strict";function i(n,t){function e(){m=T.children,E=m.length,m.length<2&&(t.continuous=!1),h.transitions&&t.continuous&&m.length<3&&(T.appendChild(m[0].cloneNode(!0)),T.appendChild(T.children[1].cloneNode(!0)),m=T.children),w=new Array(m.length),p=n.getBoundingClientRect().width-y-2*k||n.offsetWidth-y-2*k,T.style.width=m.length*p+"px";for(var e=m.length;e--;){var i=m[e];i.style.width=p+"px",i.setAttribute("data-index",e),h.transitions&&(i.style.left=e*-p+y+k+"px",a(e,x>e?-p:e>x?p:0,0))}t.continuous&&h.transitions&&(a(s(x-1),-p,0),a(s(x+1),p,0)),h.transitions||(T.style.left=x*-p+y+k+"px"),n.style.visibility="visible"}function i(){t.continuous?r(x-1):x&&r(x-1)}function o(){t.continuous?r(x+1):x<m.length-1&&r(x+1)}function s(n){return(m.length+n%m.length)%m.length}function r(n,e){if(x!=n){if(h.transitions){var i=Math.abs(x-n)/(x-n);if(t.continuous){var o=i;i=-w[s(n)]/p,i!==o&&(n=-i*m.length+n)}for(var r=Math.abs(x-n)-1;r--;)a(s((n>x?n:x)-r-1),p*i,0);n=s(n),a(x,p*i,e||g),a(n,0,e||g),t.continuous&&a(s(n-i),-(p*i),0)}else n=s(n),c(x*-p,n*-p,e||g);x=n,f(t.callback&&t.callback(x,m[x]))}}function a(n,t,e){u(n,t,e),w[n]=t}function u(n,t,e){var i=m[n],o=i&&i.style;o&&(o.webkitTransitionTimingFunction=o.MozTransitionTimingFunction=o.msTransitionTimingFunction=o.OTransitionTimingFunction=o.transitionTimingFunction="cubic-bezier(0.000, 1.105, 0.340, 0.990)",o.webkitTransitionDuration=o.MozTransitionDuration=o.msTransitionDuration=o.OTransitionDuration=o.transitionDuration=e+"ms",o.webkitTransform="translate("+t+"px,0)translateZ(0)",o.msTransform=o.MozTransform=o.OTransform="translateX("+t+"px)")}function c(n,e,i){if(!i)return void(T.style.left=e+"px");var o=+new Date,s=setInterval(function(){var r=+new Date-o;return r>i?(T.style.left=e+"px",D&&d(),t.transitionEnd&&t.transitionEnd.call(event,x,m[x]),void clearInterval(s)):void(T.style.left=(e-n)*(Math.floor(r/i*100)/100)+n+"px")},4)}function d(){b=setTimeout(o,D)}function l(){clearTimeout(b)}var v=function(){},f=function(n){setTimeout(n||v,0)},h={addEventListener:!!window.addEventListener,touch:"ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch,transitions:function(n){var t=["transitionProperty","WebkitTransition","MozTransition","OTransition","msTransition"];for(var e in t)if(void 0!==n.style[t[e]])return!0;return!1}(document.createElement("swipe"))};if(n){var m,w,p,E,T=n.children[0];t=t||{};var x=parseInt(t.startSlide,10)||0,g=t.speed||300;t.continuous=void 0!==t.continuous?t.continuous:!0;var b,L,y=t.spacing||0,k=t.uncoveredWidth||0,D=t.auto||0,M={},z={},S={handleEvent:function(n){switch(n.type){case"touchstart":this.start(n);break;case"touchmove":this.move(n);break;case"touchend":f(this.end(n));break;case"webkitTransitionEnd":case"msTransitionEnd":case"oTransitionEnd":case"otransitionend":case"transitionend":f(this.transitionEnd(n));break;case"resize":f(e.call())}t.stopPropagation&&n.stopPropagation()},start:function(n){var t=n.touches[0];M={x:t.pageX,y:t.pageY,time:+new Date},L=void 0,z={},T.addEventListener("touchmove",this,!1),T.addEventListener("touchend",this,!1)},move:function(n){if(!(n.touches.length>1||n.scale&&1!==n.scale)){t.disableScroll&&n.preventDefault();var e=n.touches[0];z={x:e.pageX-M.x,y:e.pageY-M.y},"undefined"==typeof L&&(L=!!(L||Math.abs(z.x)<Math.abs(z.y))),L||(n.preventDefault(),l(),t.continuous?(u(s(x-1),z.x+w[s(x-1)],0),u(x,z.x+w[x],0),u(s(x+1),z.x+w[s(x+1)],0)):(z.x=z.x/(!x&&z.x>0||x==m.length-1&&z.x<0?Math.abs(z.x)/p+1:1),u(x-1,z.x+w[x-1],0),u(x,z.x+w[x],0),u(x+1,z.x+w[x+1],0)))}},end:function(){var n=+new Date-M.time,e=Number(n)<250&&Math.abs(z.x)>20||Math.abs(z.x)>p/2,i=!x&&z.x>0||x==m.length-1&&z.x<0;t.continuous&&(i=!1);var o=z.x<0;L||(e&&!i?(o?(t.continuous?(a(s(x-1),-p,0),a(s(x+2),p,0)):a(x-1,-p,0),a(x,w[x]-p,g),a(s(x+1),w[s(x+1)]-p,g),x=s(x+1)):(t.continuous?(a(s(x+1),p,0),a(s(x-2),-p,0)):a(x+1,p,0),a(x,w[x]+p,g),a(s(x-1),w[s(x-1)]+p,g),x=s(x-1)),t.callback&&t.callback(x,m[x])):t.continuous?(a(s(x-1),-p,g),a(x,0,g),a(s(x+1),p,g)):(a(x-1,-p,g),a(x,0,g),a(x+1,p,g))),T.removeEventListener("touchmove",S,!1),T.removeEventListener("touchend",S,!1)},transitionEnd:function(n){parseInt(n.target.getAttribute("data-index"),10)==x&&(D&&d(),t.transitionEnd&&t.transitionEnd.call(n,x,m[x]))}};return e(),D&&d(),h.addEventListener?(h.touch&&T.addEventListener("touchstart",S,!1),h.transitions&&(T.addEventListener("webkitTransitionEnd",S,!1),T.addEventListener("msTransitionEnd",S,!1),T.addEventListener("oTransitionEnd",S,!1),T.addEventListener("otransitionend",S,!1),T.addEventListener("transitionend",S,!1)),window.addEventListener("resize",S,!1)):window.onresize=function(){e()},{setup:function(){e()},slide:function(n,t){l(),r(n,t)},prev:function(){l(),i()},next:function(){l(),o()},getPos:function(){return x},getNumSlides:function(){return E},kill:function(){l(),h.addEventListener?(T.removeEventListener("touchstart",S,!1),T.removeEventListener("webkitTransitionEnd",S,!1),T.removeEventListener("msTransitionEnd",S,!1),T.removeEventListener("oTransitionEnd",S,!1),T.removeEventListener("otransitionend",S,!1),T.removeEventListener("transitionend",S,!1),window.removeEventListener("resize",S,!1)):window.onresize=null}}}}e.exports={creatSwipe:function(n,t){return new i(n,t)}},(window.jQuery||window.Zepto)&&!function(n){n.fn.Swipe=function(t){return this.each(function(){n(this).data("Swipe",new i(n(this)[0],t))})}}(window.jQuery||window.Zepto)});
;define("common:widget/lineslide/lineslide.js",function(i,s,e){"use strict";i.loadCss({url:"//webmap1.bdimg.com/mobile/simple/static/common/widget/lineslide/lineslide.inline_01dcc33.css"});var n=i("common:static/js/swipe.js");e.exports={init:function(i,s){this.pos=parseInt(s.index),this.render(i,s),this.bind(s.class);var e=this;listener.once("common.page","switchstart",function(){e.mySwipe.kill(),e.mySwipe=null})},bind:function(i){var s=$(".common-widget-lineslide"),e=this;null!=i&&s.addClass(i),$(".common-widget-lineslide .next").click(function(){e.mySwipe.next()}),$(".common-widget-lineslide .prev").click(function(){e.mySwipe.prev()})},render:function(i,s){var e=this,l=$(".swipe-wrap .wrap").length;if(s.showpoint){var o=[],t=$(".swipe-wrap .wrap").length;if($(".swipe").after('<div class="slide_dots"><ul id="position"></ul></div>'),t>1){o.push('<li class="on"></li>');for(var a=0;t-1>a;a++)o.push('<li class=" "></li>');document.getElementById("position").innerHTML=o.join("")}var c=$("#position li");$(c[s.index]).addClass("on").siblings("li").removeClass("on"),$(".next").css("visibility","hidden"),$(".prev").css("visibility","hidden")}else $(".swipe").before('<div class="-col1 prev" style="height:62px"><i class="icon -back-arrow backarrow"></i></div>'),$(".swipe").after('<div class="-col1 next " style="height:62px;"><i class="icon -forward-arrow forwardarrow"></i></div>');this.mySwipe=n.creatSwipe(i,{startSlide:s.index,speed:600,continuous:!0,disableScroll:!1,stopPropagation:!1,transitionEnd:function(i){if(e.pos!=i){e.pos=i;var n=i%l;s.showpoint&&$(c[n]).addClass("on").siblings("li").removeClass("on"),s.callback(n)}}})}}});
;define("common:widget/poicardcontainer/poicardcontainer.js",function(e,n,i){"use strict";var t=e("core:widget/url/url.js"),o=e("common:static/js/swipe.js"),a=e("common:widget/callnatohere/callnatohere.js"),d=e("common:widget/callnastreetscape/callnastreetscape.js");i.exports=Widget.extend({el:".common-widget-poicardcontainer",init:function(){function e(e,n){return function(){clearTimeout(n.orientationChangedTimeout);var i=Array.prototype.slice.call(arguments,0);n.orientationChangedTimeout=setTimeout($.proxy(function(){var t=window.orientation;t!==n.lastOrientation&&e.apply(n,i),n.lastOrientation=t},n),$.os.android?300:0)}}var n=this;n.damoce();var i=t.get(),a=(i.query,"");if(1===$(".common-widget-poicardcontainer>div").children().length)return $(".common-widget-poicardcontainer").removeClass("swipe").addClass("single-card"),void $(".common-widget-poicardcontainer>div").removeClass("swipe-wrap").addClass("inner");var d=document.body.clientWidth;$(".common-widget-poicardcontainer").css("width",d+"px"),this.mySwipe=o.creatSwipe(document.getElementById("slider"),{startSlide:0,speed:800,continuous:!0,disableScroll:!1,stopPropagation:!1,spacing:5,uncoveredWidth:10,transitionEnd:function(e){listener.trigger("common.slidePoiCard","slide",{index:e,switchType:a}),n.index=e,a=""}}),n.index=0,listener.on("place.switchSelectedMarker","tap",function(e,i){a=i.switchType||"";for(var t=i.index-n.index>0?i.index-n.index:n.index-i.index,o=0;t>o;o++)i.index>n.index?n.mySwipe.next():i.index<n.index&&n.mySwipe.prev();n.index=i.index}),window.addEventListener("orientationchange",e(function(){$("#slider").css("width",window.innerWidth+"px"),n.mySwipe.setup()},window),!1),n.bindCallNaEvent()},events:{},destroy:function(){this.mySwipe.stop()},damoce:function(){$(".place-widget-ecomadmap .moceda-goto").on("click",function(){var e=$(this).data("name"),n=$(this).data("x"),i=$(this).data("y"),o="/mobile/webapp/place/linesearch/foo=bar/from=place&end=",a=[];a.push("word="+e),a.push("point="+n+","+i),o+=encodeURIComponent(a.join("&")),t.navigate(o)})},bindCallNaEvent:function(){$("a.callnatohere").on("touchend",function(){var e=this.href||"";e&&a.gotoHere(e,{stat:"callnatoheremaplist"})}),$("a.callna-streetview").on("touchend",function(){var e=this.href||"";e&&d.gotoNaStreetScape(e,{stat:"callnaplacemapliststreetscape"})})}})});
;define("common:widget/sharefriends/sharefriends.js",function(e,t,n){"use strict";var r=e("core:widget/util/url-util.js"),s=e("core:widget/url/url.js"),o=e("core:widget/stat/pbstat.js"),i={init:function(e,t){t=t||{},this.type=e,this.shareSmsContent=t.shareSmsContent||"",this.bindEvent()},bindEvent:function(){$(".send-phone").on("click",$.proxy(this.shareToFriends,this))},shareToFriends:function(e){var t,n=this,r=$("#share-to-friends"),s=r.attr("href");if(!(s&&s.indexOf("body")>-1)){t="transit"===this.type?n.getTransitSmsUrl():n.getSmsUrl();var i=function(e){if(e){var t=e.sms_content||n.shareSmsContent+" "+e.short_url;r.attr("href","sms:?body="+t),location.href="sms:?body="+t}},a=function(){};$.ajax({url:t,dataType:"jsonp",success:i,error:a}),e.preventDefault(),o.addStat(COM_PB_STAT.SHARE_SMS_BTN)}},getTransitSmsUrl:function(){var e=s.get(),t=e.query||{},n=e.pageState||{},o=n.i+",1,1",i="//map.baidu.com/ag/sms/ready?url=",a="http://map.baidu.com/?i="+o+"&s="+t.qt,u=encodeURIComponent("&"+r.jsonToQuery(t)),d=i+encodeURIComponent(a+u+"&smsf=1&shareurl=1")+"&t="+(new Date).getTime();return d},getSmsUrl:function(){var e=s.get(),t=e.query||{},n="//map.baidu.com/ag/sms/ready?url=",o="http://map.baidu.com/?s="+t.qt;delete t.version;var i=encodeURIComponent("&"+r.jsonToQuery(t)),a=n+encodeURIComponent(o+i+"&smsf=1&shareurl=1")+"&t="+(new Date).getTime();return a},fireEvent:function(e,t){var n=e;if(document.createEvent){var r=document.createEvent("MouseEvents");r.initEvent(t,!0,!1),n.dispatchEvent(r)}}};n.exports=i});