function launchCloudsponge(n){cloudSpongeReinit||(cloudsponge.options.afterSubmitContacts=function(n){for(var r=[],i,t=0;t<n.length;t++)i=n[t],$.trim(i.primaryEmail()).length>0&&r.push(i.primaryEmail());DisplayEmailPopup(r)},cloudSpongeReinit=!0);$(".popup-invite-mail .lightbox-popup .top img").hide();switch(n){case"gmail":$(".popup-invite-mail img.gmail-picture").show();break;case"yahoo":$(".popup-invite-mail img.yahoo-picture").show();break;case"windowslive":$(".popup-invite-mail img.wlh-picture").show();break;case"outlook":$(".popup-invite-mail img.outlook-picture").show()}return cloudsponge.launch(n)}function initFbPostWall(){FB.ui({method:"feed",link:$("#FacebookInviteLink").val()},function(n){n&&n.post_id&&($("#share-on-facebook").popover("show"),window.location.hash="SendPersonal2")})}function setEmails(n,t){var o,f,r,i,s,u,e;for(t.length==0&&$.unblockUI(),o=$("#friendsDiv").data("deletetext"),f=$(n),f.empty(),r=4,i=0;i<t.length;i++)s=i>=r?"hide":"",u=$('<div class="email-address-div '+s+'" data-email="'+t[i]+'">'),u.append(" "+t[i]+"&nbsp;"),e=$('<a href="#">'+o+"<\/a>"),e.click(function(n){var i,r,u,t,f;for(n.preventDefault&&n.preventDefault(),i=$(n.target).closest(".email-addresses-container"),$(n.target).closest(".email-address-div ").remove(),r=[],u=i.find(".email-address-div"),t=0;t<u.length;t++)f=$(u[t]).data("email"),$.trim(f).length>0&&r.push(f);setEmails(i,r)}),u.append(e),f.append(u);$(".popup-invite-mail .friends-nb").text(t.length);t.length>r?($(".popup-invite-mail .more-friends .nb").text(t.length-r),$(".popup-invite-mail .more-friends").show(),$(".popup-invite-mail .more-friends .nav-arrow.left").css("visibility","hidden"),$(".popup-invite-mail .email-addresses-container").data("pageIndex",0)):$(".popup-invite-mail .more-friends").hide()}function DisplayEmailPopup(n){n.length>0&&(setEmails(".popup-invite-mail .email-addresses-container",n),$(".popup-invite-mail .popup-success").hide(),$(".popup-invite-mail").css("top","0"),$(".popup-invite-mail .overlay").hide(),$(".popup-invite-mail .overlay img").show(),Vex.Util.showLightbox(700,450,Vex.LightboxModalMode.Semi,{message:$(".popup-invite-mail")}))}function ajaxInviteRequest(n,t,i,r){var u=n,o=$('#sendmail input[name$="CSRFToken"]').val(),e=100,f=[];u.length>e?f=u.splice(u.length-e):(f=u,u=null);$(".popup-invite-mail .overlay").show();$.ajax({type:"POST",url:"/"+Vex.Settings.Culture+"/Account/InviteMail",data:JSON.stringify({EmailAddresses:f,CampaignId:i,CSRFToken:o,Code:r}),contentType:"application/json",success:function(n){friendsInvitedData==null?friendsInvitedData=n:(friendsInvitedData.NumberInvited+=n.NumberInvited,friendsInvitedData.NumberAlreadyMember+=n.NumberAlreadyMember,friendsInvitedData.NumberAlreadyInvited+=n.NumberAlreadyInvited,friendsInvitedData.NumberInvalid+=n.NumberInvalid);u==null?($(".popup-invite-mail .overlay img").hide(),Vex.Util.slideUpPopup()):ajaxInviteRequest(u,t,i,r)}})}function useHeaderInvite(n){n.preventDefault&&n.preventDefault();var i=$("#invite-friend-email-header"),t=$.trim(i.val());if(t==""){window.location.href=$("#send-invite-header").data("href");return}if(!Vex.Util.isValidEmailAddress(t)){$("#invite-links").addClass("error");return}window.location.href=$("#send-invite-header").data("href")+t}var shopModule,lastScrollPosition,lastScrollDirection,headerOffset,previousWindowSize,homeModule,cloudSpongeReinit,friendsInvitedData,providerUsed,_this,Vex;(function(){"use strict";if(!window.addEventListener){window.XMLHttpRequest||(window.XMLHttpRequest=function(){var n=new ActiveXObject("Microsoft.XMLHTTP"),t={isFake:!0,send:function(t){return n.send(t)},open:function(t,i,r,u,f){return n.open(t,i,r,u,f)},abort:function(){return n.abort()},setRequestHeader:function(t,i){return n.setRequestHeader(t,i)},getResponseHeader:function(t){return n.getResponseHeader(t)},getAllResponseHeaders:function(){return n.getAllResponseHeaders()},overrideMimeType:function(t){return n.overrideMimeType(t)}};return n.onreadystatechange=function(){t.readyState=n.readyState;4===n.readyState&&200===n.status&&(t.status=n.status,t.responseText=n.responseText,t.responseXML=n.responseXML,t.statusText=n.statusText,t.onload&&t.onload.apply(this,arguments));t.onreadystatechange&&t.onreadystatechange.apply(this,arguments)},t});var n=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(){this.onreadystatechange||(this.onreadystatechange=function(){4===this.readyState&&this.onload&&this.onload()});n.apply(this,arguments)};Object.create=function(){var n=function(){};return function(t){if(1<arguments.length)throw Error("Second argument not supported");if("object"!=typeof t)throw TypeError("Argument must be an object");n.prototype=t;var i=new n;return n.prototype=null,i}}();"function"!=typeof Object.getPrototypeOf&&(Object.getPrototypeOf="".__proto__===String.prototype?function(n){return n.__proto__}:function(n){return n.constructor.prototype}),function(){var n=function(t){var i,r="",u=0;if(i=t.nodeType,i){if(1===i||9===i||11===i)for(t=t.firstChild;t;t=t.nextSibling)r+=n(t);else if(3===i||4===i)return t.nodeValue}else for(;i=t[u++];)r+=n(i);return r};Object.defineProperty&&Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(Element.prototype,"textContent")&&!Object.getOwnPropertyDescriptor(Element.prototype,"textContent").get&&(Object.getOwnPropertyDescriptor(Element.prototype,"innerText"),Object.defineProperty(Element.prototype,"textContent",{get:function(){return n(this)},set:function(n){for(;this.hasChildNodes();)this.removeChild(this.lastChild);return this.appendChild((this&&this.ownerDocument||document).createTextNode(n))}}))}();window.addEventListener||function(n,t,i,r,u,f,e){n[r]=t[r]=i[r]=function(n,t){var i=this,r;e.unshift([i,n,t,function(n){n.currentTarget=i;n.preventDefault=function(){n.returnValue=!1};n.stopPropagation=function(){n.cancelBubble=!0};n.target=n.srcElement||i;t.call(i,n)}]);"load"===n&&this.tagName&&"SCRIPT"===this.tagName?(r=e[0][3],this.onreadystatechange=function(){"loaded"!==this.readyState&&"complete"!==this.readyState||r.call(this,{type:"load"})}):this.attachEvent("on"+n,e[0][3])};n[u]=t[u]=i[u]=function(n,t){for(var r=0,i;i=e[r];++r)if(i[0]==this&&i[1]==n&&i[2]==t)return"load"===n&&this.tagName&&"SCRIPT"===this.tagName&&(this.onreadystatechange=null),this.detachEvent("on"+n,e.splice(r,1)[0][3])};n[f]=t[f]=i[f]=function(n){return this.fireEvent("on"+n.type,n)}}(Window.prototype,HTMLDocument.prototype,Element.prototype,"addEventListener","removeEventListener","dispatchEvent",[])}})(),function(n,t,i){function v(n){return function(){for(var i=arguments[0],u,t,r="["+(n?n+":":"")+i+"] http://errors.angularjs.org/1.4.0/"+(n?n+"/":"")+i,i=1;i<arguments.length;i++)r=r+(1==i?"?":"&")+"p"+(i-1)+"=",u=encodeURIComponent,t=arguments[i],t="function"==typeof t?t.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof t?"undefined":"string"!=typeof t?JSON.stringify(t):t,r+=u(t);return Error(r)}}function fi(n){if(null==n||tr(n))return!1;var t="length"in Object(n)&&n.length;return n.nodeType===pt&&t?!0:l(n)||a(n)||0===t||"number"==typeof t&&0<t&&t-1 in n}function r(n,t,i){var u,f,e;if(n)if(h(n))for(u in n)"prototype"==u||"length"==u||"name"==u||n.hasOwnProperty&&!n.hasOwnProperty(u)||t.call(i,n[u],u,n);else if(a(n)||fi(n))for(e="object"!=typeof n,u=0,f=n.length;u<f;u++)(e||u in n)&&t.call(i,n[u],u,n);else if(n.forEach&&n.forEach!==r)n.forEach(t,i,n);else if(ye(n))for(u in n)t.call(i,n[u],u,n);else if("function"==typeof n.hasOwnProperty)for(u in n)n.hasOwnProperty(u)&&t.call(i,n[u],u,n);else for(u in n)wu.call(n,u)&&t.call(i,n[u],u,n);return n}function le(n,t,i){for(var r=Object.keys(n).sort(),u=0;u<r.length;u++)t.call(i,n[r[u]],r[u]);return r}function ae(n){return function(t,i){n(i,t)}}function yc(){return++ku}function ve(n,t){t?n.$$hashKey=t:delete n.$$hashKey}function ef(n,t,i){for(var u,r,f,l=n.$$hashKey,e=0,v=t.length;e<v;++e)if(u=t[e],s(u)||h(u))for(var c=Object.keys(u),o=0,y=c.length;o<y;o++)r=c[o],f=u[r],i&&s(f)?(s(n[r])||(n[r]=a(f)?[]:{}),ef(n[r],[f],!0)):n[r]=f;return ve(n,l),n}function p(n){return ef(n,ni.call(arguments,1),!1)}function pc(n){return ef(n,ni.call(arguments,1),!0)}function tt(n){return parseInt(n,10)}function of(n,t){return p(Object.create(n),t)}function f(){}function gi(n){return n}function yt(n){return function(){return n}}function c(n){return"undefined"==typeof n}function e(n){return"undefined"!=typeof n}function s(n){return null!==n&&"object"==typeof n}function ye(n){return null!==n&&"object"==typeof n&&!uh(n)}function l(n){return"string"==typeof n}function k(n){return"number"==typeof n}function et(n){return"[object Date]"===ti.call(n)}function h(n){return"function"==typeof n}function nr(n){return"[object RegExp]"===ti.call(n)}function tr(n){return n&&n.window===n}function ir(n){return n&&n.$evalAsync&&n.$watch}function rr(n){return"boolean"==typeof n}function pe(n){return!(!n||!(n.nodeName||n.prop&&n.attr&&n.find))}function wc(n){var i={},t;for(n=n.split(","),t=0;t<n.length;t++)i[n[t]]=!0;return i}function wt(n){return y(n.nodeName||n[0]&&n[0].nodeName)}function ur(n,t){var i=n.indexOf(t);return 0<=i&&n.splice(i,1),i}function bt(n,t,i,u){function o(n,t,i,r,u){var f=bt(t,null,r,u);s(t)&&(r.push(t),u.push(f));i[n]=f}var e,f;if(tr(n)||ir(n))throw li("cpws");if(fh.test(ti.call(t)))throw li("cpta");if(t){if(n===t)throw li("cpi");if(i=i||[],u=u||[],s(n)){if(e=i.indexOf(n),-1!==e)return u[e];i.push(n);u.push(t)}if(a(n))for(e=t.length=0;e<n.length;e++)f=bt(n[e],null,i,u),s(n[e])&&(i.push(n[e]),u.push(f)),t.push(f);else{if(e=t.$$hashKey,a(t)?t.length=0:r(t,function(n,i){delete t[i]}),ye(n))for(f in n)o(f,n[f],t,i,u);else if(n&&"function"==typeof n.hasOwnProperty)for(f in n)n.hasOwnProperty(f)&&o(f,n[f],t,i,u);else for(f in n)wu.call(n,f)&&o(f,n[f],t,i,u);ve(t,e)}}else(t=n)&&(a(n)?t=bt(n,[],i,u):fh.test(ti.call(n))?t=new n.constructor(n):et(n)?t=new Date(n.getTime()):nr(n)?(t=new RegExp(n.source,n.toString().match(/[^\/]*$/)[0]),t.lastIndex=n.lastIndex):s(n)&&(f=Object.create(uh(n)),t=bt(n,f,i,u)));return t}function ht(n,t){if(a(n)){t=t||[];for(var i=0,r=n.length;i<r;i++)t[i]=n[i]}else if(s(n))for(i in t=t||{},n)("$"!==i.charAt(0)||"$"!==i.charAt(1))&&(t[i]=n[i]);return t||n}function ot(n,t){if(n===t)return!0;if(null===n||null===t)return!1;if(n!==n&&t!==t)return!0;var u=typeof n,r;if(u==typeof t&&"object"==u)if(a(n)){if(!a(t))return!1;if((u=n.length)==t.length){for(r=0;r<u;r++)if(!ot(n[r],t[r]))return!1;return!0}}else{if(et(n))return et(t)?ot(n.getTime(),t.getTime()):!1;if(nr(n))return nr(t)?n.toString()==t.toString():!1;if(ir(n)||ir(t)||tr(n)||tr(t)||a(t)||et(t)||nr(t))return!1;u=rt();for(r in n)if("$"!==r.charAt(0)&&!h(n[r])){if(!ot(n[r],t[r]))return!1;u[r]=!0}for(r in t)if(!(r in u||"$"===r.charAt(0)||t[r]===i||h(t[r])))return!1;return!0}return!1}function fr(n,t,i){return n.concat(ni.call(t,i))}function we(n,t){var i=2<arguments.length?ni.call(arguments,2):[];return!h(t)||t instanceof RegExp?t:i.length?function(){return arguments.length?t.apply(n,fr(i,arguments,0)):t.apply(n,i)}:function(){return arguments.length?t.apply(n,arguments):t.call(n)}}function bc(n,r){var u=r;return"string"==typeof n&&"$"===n.charAt(0)&&"$"===n.charAt(1)?u=i:tr(r)?u="$WINDOW":r&&t===r?u="$DOCUMENT":ir(r)&&(u="$SCOPE"),u}function er(n,t){return"undefined"==typeof n?i:(k(t)||(t=t?2:null),JSON.stringify(n,bc,t))}function be(n){return l(n)?JSON.parse(n):n}function ke(n,t){var i=Date.parse("Jan 01, 1970 00:00:00 "+n)/6e4;return isNaN(i)?t:i}function sf(n,t,i){i=i?-1:1;var r=ke(t,n.getTimezoneOffset());return t=n,n=i*(r-n.getTimezoneOffset()),t=new Date(t.getTime()),t.setMinutes(t.getMinutes()+n),t}function kt(n){n=o(n).clone();try{n.empty()}catch(i){}var t=o("<div>").append(n).html();try{return n[0].nodeType===pr?y(t):t.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(n,t){return"<"+y(t)})}catch(r){return y(t)}}function de(n){try{return decodeURIComponent(n)}catch(t){}}function ge(n){var i={},u,t;return r((n||"").split("&"),function(n){n&&(u=n.replace(/\+/g,"%20").split("="),t=de(u[0]),e(t)&&(n=e(u[1])?de(u[1]):!0,wu.call(i,t)?a(i[t])?i[t].push(n):i[t]=[i[t],n]:i[t]=n))}),i}function hf(n){var t=[];return r(n,function(n,i){a(n)?r(n,function(n){t.push(ct(i,!0)+(!0===n?"":"="+ct(n,!0)))}):t.push(ct(i,!0)+(!0===n?"":"="+ct(n,!0)))}),t.length?t.join("&"):""}function nu(n){return ct(n,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ct(n,t){return encodeURIComponent(n).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,t?"%20":"+")}function kc(n,t){for(var i,u=ki.length,r=0;r<u;++r)if(i=ki[r]+t,l(i=n.getAttribute(i)))return i;return null}function dc(n,t){var i,u,f={};r(ki,function(t){t+="app";!i&&n.hasAttribute&&n.hasAttribute(t)&&(i=n,u=n.getAttribute(t))});r(ki,function(t){t+="app";var r;!i&&(r=n.querySelector("["+t.replace(":","\\:")+"]"))&&(i=r,u=r.getAttribute(t))});i&&(f.strictDi=null!==kc(i,"strict-di"),t(i,u?[u]:[],f))}function no(i,u,f){s(f)||(f={});f=p({strictDi:!1},f);var e=function(){if(i=o(i),i.injector()){var n=i[0]===t?"document":kt(i);throw li("btstrpd",n.replace(/</,"&lt;").replace(/>/,"&gt;"));}return u=u||[],u.unshift(["$provide",function(n){n.value("$rootElement",i)}]),f.debugInfoEnabled&&u.push(["$compileProvider",function(n){n.debugInfoEnabled(!0)}]),u.unshift("ng"),n=sr(u,f.strictDi),n.invoke(["$rootScope","$rootElement","$compile","$injector",function(n,t,i,r){n.$apply(function(){t.data("$injector",r);i(t)(n)})}]),n},c=/^NG_ENABLE_DEBUG_INFO!/,l=/^NG_DEFER_BOOTSTRAP!/;if(n&&c.test(n.name)&&(f.debugInfoEnabled=!0,n.name=n.name.replace(c,"")),n&&!l.test(n.name))return e();n.name=n.name.replace(l,"");ut.resumeBootstrap=function(n){return r(n,function(n){u.push(n)}),e()};h(ut.resumeDeferredBootstrap)&&ut.resumeDeferredBootstrap()}function gc(){n.name="NG_ENABLE_DEBUG_INFO!"+n.name;n.location.reload()}function nl(n){if(n=ut.element(n).injector(),!n)throw li("test");return n.get("$$testability")}function to(n,t){return t=t||"_",n.replace(lv,function(n,i){return(i?t:"")+n.toLowerCase()})}function tl(){var r,t;oh||(t=du(),st=n.jQuery,e(t)&&(st=null===t?i:n[t]),st&&st.fn.on?(o=st,p(st.fn,{scope:ai.scope,isolateScope:ai.isolateScope,controller:ai.controller,injector:ai.injector,inheritedData:ai.inheritedData}),r=st.cleanData,st.cleanData=function(n){var u,t,i;if(ue)ue=!1;else for(t=0;null!=(i=n[t]);t++)(u=st._data(i,"events"))&&u.$destroy&&st(i).triggerHandler("$destroy");r(n)}):o=b,ut.element=o,oh=!0)}function cf(n,t,i){if(!n)throw li("areq",t||"?",i||"required");return n}function pi(n,t,i){return i&&a(n)&&(n=n[n.length-1]),cf(h(n),t,"not a function, got "+(n&&"object"==typeof n?n.constructor.name||"Object":typeof n)),n}function wi(n,t){if("hasOwnProperty"===n)throw li("badname",t);}function io(n,t,i){if(!t)return n;t=t.split(".");for(var u,f=n,e=t.length,r=0;r<e;r++)u=t[r],n&&(n=(f=n)[u]);return!i&&h(n)?we(f,n):n}function tu(n){var t=n[0],i;n=n[n.length-1];i=[t];do{if(t=t.nextSibling,!t)break;i.push(t)}while(t!==n);return o(i)}function rt(){return Object.create(null)}function il(n){function t(n,t,i){return n[t]||(n[t]=i())}var i=v("$injector"),r=v("ng");return n=t(n,"angular",Object),n.$$minErr=n.$$minErr||v,t(n,"module",function(){var n={};return function(u,f,e){if("hasOwnProperty"===u)throw r("badname","module");return f&&n.hasOwnProperty(u)&&(n[u]=null),t(n,u,function(){function n(n,i,r,u){return u||(u=t),function(){return u[r||"push"]([n,i,arguments]),h}}if(!f)throw i("nomod",u);var t=[],r=[],o=[],s=n("$injector","invoke","push",r),h={_invokeQueue:t,_configBlocks:r,_runBlocks:o,requires:f,name:u,provider:n("$provide","provider"),factory:n("$provide","factory"),service:n("$provide","service"),value:n("$provide","value"),constant:n("$provide","constant","unshift"),decorator:n("$provide","decorator"),animation:n("$animateProvider","register"),filter:n("$filterProvider","register"),controller:n("$controllerProvider","register"),directive:n("$compileProvider","directive"),config:s,run:function(n){return o.push(n),this}};return e&&s(e),h})}})}function rl(t){p(t,{bootstrap:no,copy:bt,extend:p,merge:pc,equals:ot,element:o,forEach:r,injector:sr,noop:f,bind:we,toJson:er,fromJson:be,identity:gi,isUndefined:c,isDefined:e,isString:l,isFunction:h,isObject:s,isNumber:k,isElement:pe,isArray:a,version:av,isDate:et,lowercase:y,uppercase:bu,callbacks:{counter:0},getTestability:nl,$$minErr:v,$$csp:yr,reloadWithDebugInfo:gc});vr=il(n);try{vr("ngLocale")}catch(i){vr("ngLocale",[]).provider("$locale",ea)}vr("ng",["ngLocale"],["$provide",function(n){n.provider({$$sanitizeUri:pa});n.provider("$compile",co).directive({a:gh,input:ec,textarea:ec,form:dy,script:bw,select:gw,style:tb,option:nb,ngBind:ep,ngBindHtml:sp,ngBindTemplate:op,ngClass:cp,ngClassEven:ap,ngClassOdd:lp,ngCloak:vp,ngController:yp,ngForm:gy,ngHide:lw,ngIf:wp,ngInclude:bp,ngInit:dp,ngNonBindable:uw,ngPluralize:sw,ngRepeat:hw,ngShow:cw,ngStyle:aw,ngSwitch:vw,ngSwitchWhen:yw,ngSwitchDefault:pw,ngOptions:ow,ngTransclude:ww,ngModel:tw,ngList:gp,ngChange:hp,pattern:lc,ngPattern:lc,required:cc,ngRequired:cc,minlength:vc,ngMinlength:vc,maxlength:ac,ngMaxlength:ac,ngValue:fp,ngModelOptions:rw}).directive({ngInclude:kp}).directive(kr).directive(oc);n.provider({$anchorScroll:hl,$animate:uy,$$animateQueue:ry,$$AnimateRunner:iy,$browser:vl,$cacheFactory:yl,$controller:wl,$document:bl,$exceptionHandler:kl,$filter:as,$interpolate:ua,$interval:fa,$http:na,$httpParamSerializer:dl,$httpParamSerializerJQLike:gl,$httpBackend:ia,$location:oa,$log:sa,$parse:ca,$rootScope:ya,$q:la,$$q:aa,$sce:ka,$sceDelegate:ba,$sniffer:da,$templateCache:pl,$templateRequest:ga,$$testability:nv,$timeout:tv,$window:iv,$$rAF:va,$$asyncCallback:ll,$$jqLite:ol,$$HashMap:gv,$$cookieReader:rv})}])}function or(n){return n.replace(vv,function(n,t,i,r){return r?i.toUpperCase():i}).replace(yv,"Moz$1")}function ro(n){return n=n.nodeType,n===pt||!n||9===n}function uo(n,t){var i,u,f=t.createDocumentFragment(),e=[];if(ee.test(n)){for(i=i||f.appendChild(t.createElement("div")),u=(bv.exec(n)||["",""])[1].toLowerCase(),u=at[u]||at._default,i.innerHTML=u[1]+n.replace(kv,"<$1><\/$2>")+u[2],u=u[0];u--;)i=i.lastChild;e=fr(e,i.childNodes);i=f.firstChild;i.textContent=""}else e.push(t.createTextNode(n));return f.textContent="",f.innerHTML="",r(e,function(n){f.appendChild(n)}),f}function b(n){var i,r;if(n instanceof b)return n;if(l(n)&&(n=w(n),i=!0),!(this instanceof b)){if(i&&"<"!=n.charAt(0))throw fe("nosel");return new b(n)}i&&(i=t,n=(r=wv.exec(n))?[i.createElement(r[1])]:(r=uo(n,i))?r.childNodes:[]);eo(this,n)}function lf(n){return n.cloneNode(!0)}function iu(n,t){if(t||ru(n),n.querySelectorAll)for(var r=n.querySelectorAll("*"),i=0,u=r.length;i<u;i++)ru(r[i])}function fo(n,t,i,u){if(e(u))throw fe("offargs");var f=(u=uu(n))&&u.events,o=u&&u.handle;if(o)if(t)r(t.split(" "),function(t){if(e(i)){var r=f[t];if(ur(r||[],i),r&&0<r.length)return}n.removeEventListener(t,o,!1);delete f[t]});else for(t in f)"$destroy"!==t&&n.removeEventListener(t,o,!1),delete f[t]}function ru(n,t){var u=n.ng339,r=u&&wr[u];r&&(t?delete r.data[t]:(r.handle&&(r.events.$destroy&&r.handle({},"$destroy"),fo(n)),delete wr[u],n.ng339=i))}function uu(n,t){var r=n.ng339,r=r&&wr[r];return t&&!r&&(n.ng339=r=++sh,r=wr[r]={events:{},data:{},handle:i}),r}function af(n,t,i){if(ro(n)){var r=e(i),u=!r&&t&&!s(t),f=!t;if(n=(n=uu(n,!u))&&n.data,r)n[t]=i;else{if(f)return n;if(u)return n&&n[t];p(n,t)}}}function fu(n,t){return n.getAttribute?-1<(" "+(n.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" "):!1}function eu(n,t){t&&n.setAttribute&&r(t.split(" "),function(t){n.setAttribute("class",w((" "+(n.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+w(t)+" "," ")))})}function ou(n,t){if(t&&n.setAttribute){var i=(" "+(n.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");r(t.split(" "),function(n){n=w(n);-1===i.indexOf(" "+n+" ")&&(i+=n+" ")});n.setAttribute("class",w(i))}}function eo(n,t){var i,r;if(t)if(t.nodeType)n[n.length++]=t;else if(i=t.length,"number"==typeof i&&t.window!==t){if(i)for(r=0;r<i;r++)n[n.length++]=t[r]}else n[n.length++]=t}function oo(n,t){return su(n,"$"+(t||"ngController")+"Controller")}function su(n,t,r){for(9==n.nodeType&&(n=n.documentElement),t=a(t)?t:[t];n;){for(var u=0,f=t.length;u<f;u++)if((r=o.data(n,t[u]))!==i)return r;n=n.parentNode||11===n.nodeType&&n.host}}function so(n){for(iu(n,!0);n.firstChild;)n.removeChild(n.firstChild)}function vf(n,t){t||iu(n);var i=n.parentNode;i&&i.removeChild(n)}function ul(t,i){if(i=i||n,"complete"===i.document.readyState)i.setTimeout(t);else o(i).on("load",t)}function ho(n,t){var i=br[t.toLowerCase()];return i&&oe[wt(n)]&&i}function fl(n,t){var i=n.nodeName;return("INPUT"===i||"TEXTAREA"===i)&&se[t]}function el(n,t){var i=function(i,r){var u,f,o,e;if(i.isDefaultPrevented=function(){return i.defaultPrevented},u=t[r||i.type],f=u?u.length:0,f)for(c(i.immediatePropagationStopped)&&(o=i.stopImmediatePropagation,i.stopImmediatePropagation=function(){i.immediatePropagationStopped=!0;i.stopPropagation&&i.stopPropagation();o&&o.call(i)}),i.isImmediatePropagationStopped=function(){return!0===i.immediatePropagationStopped},1<f&&(u=ht(u)),e=0;e<f;e++)i.isImmediatePropagationStopped()||u[e].call(n,i)};return i.elem=n,i}function ol(){this.$get=function(){return p(b,{hasClass:function(n,t){return n.attr&&(n=n[0]),fu(n,t)},addClass:function(n,t){return n.attr&&(n=n[0]),ou(n,t)},removeClass:function(n,t){return n.attr&&(n=n[0]),eu(n,t)}})}}function ei(n,t){var i=n&&n.$$hashKey;return i?("function"==typeof i&&(i=n.$$hashKey()),i):(i=typeof n,"function"==i||"object"==i&&null!==n?n.$$hashKey=i+":"+(t||yc)():i+":"+n)}function bi(n,t){if(t){var i=0;this.nextUid=function(){return++i}}r(n,this.put,this)}function sl(n){return(n=n.toString().replace(ch,"").match(hh))?"function("+(n[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function sr(n,t){function o(n){return function(t,i){if(s(t))r(t,ae(n));else return n(t,i)}}function k(n,t){if(wi(n,"service"),(h(t)||a(t))&&(t=u.instantiate(t)),!t.$get)throw vi("pget",n);return y[n+"Provider"]=t}function tt(n,t){return function(){var i=e.invoke(t,this);if(c(i))throw vi("undef",n);return i}}function p(n,t,i){return k(n,{$get:!1!==i?tt(n,t):t})}function d(n){var t=[],i;return r(n,function(n){function f(n){for(var i,r,t=0,f=n.length;t<f;t++)i=n[t],r=u.get(i[0]),r[i[1]].apply(r,i[2])}if(!nt.get(n)){nt.put(n,!0);try{l(n)?(i=vr(n),t=t.concat(d(i.requires)).concat(i._runBlocks),f(i._invokeQueue),f(i._configBlocks)):h(n)?t.push(u.invoke(n)):a(n)?t.push(u.invoke(n)):pi(n,"module")}catch(r){throw a(n)&&(n=n[n.length-1]),r.message&&r.stack&&-1==r.stack.indexOf(r.message)&&(r=r.message+"\n"+r.stack),vi("modulerr",n,r.stack||r.message||r);}}}),t}function g(n,i){function r(t,r){if(n.hasOwnProperty(t)){if(n[t]===w)throw vi("cdep",t+" <- "+v.join(" <- "));return n[t]}try{return v.unshift(t),n[t]=w,n[t]=i(t,r)}catch(u){throw n[t]===w&&delete n[t],u;}finally{v.shift()}}function u(n,i,u,f){"string"==typeof u&&(f=u,u=null);for(var h=[],c=sr.$$annotate(n,t,f),e,o=0,s=c.length;o<s;o++){if(e=c[o],"string"!=typeof e)throw vi("itkn",e);h.push(u&&u.hasOwnProperty(e)?u[e]:r(e,f))}return a(n)&&(n=n[s]),n.apply(i,h)}return{invoke:u,instantiate:function(n,t,i){var r=Object.create((a(n)?n[n.length-1]:n).prototype||null);return n=u(n,r,t,i),s(n)||h(n)?n:r},get:r,annotate:sr.$$annotate,has:function(t){return y.hasOwnProperty(t+"Provider")||n.hasOwnProperty(t)}}}t=!0===t;var w={},v=[],nt=new bi([],!0),y={$provide:{provider:o(k),factory:o(p),service:o(function(n,t){return p(n,["$injector",function(n){return n.instantiate(t)}])}),value:o(function(n,t){return p(n,yt(t),!1)}),constant:o(function(n,t){wi(n,"constant");y[n]=t;b[n]=t}),decorator:function(n,t){var i=u.get(n+"Provider"),r=i.$get;i.$get=function(){var n=e.invoke(r,i);return e.invoke(t,null,{$delegate:n})}}}},u=y.$injector=g(y,function(n,t){ut.isString(t)&&v.push(t);throw vi("unpr",v.join(" <- "));}),b={},e=b.$injector=g(b,function(n,t){var r=u.get(n+"Provider",t);return e.invoke(r.$get,r,i,n)});return r(d(n),function(n){e.invoke(n||f)}),e}function hl(){var n=!0;this.disableAutoScrolling=function(){n=!1};this.$get=["$window","$location","$rootScope",function(t,i,r){function o(n){var t=null;return Array.prototype.some.call(n,function(n){if("a"===wt(n))return t=n,!0}),t}function u(n){if(n){n.scrollIntoView();var i;i=f.yOffset;h(i)?i=i():pe(i)?(i=i[0],i="fixed"!==t.getComputedStyle(i).position?0:i.getBoundingClientRect().bottom):k(i)||(i=0);i&&(n=n.getBoundingClientRect().top,t.scrollBy(0,n-i))}else t.scrollTo(0,0)}function f(n){n=l(n)?n:i.hash();var t;n?(t=e.getElementById(n))?u(t):(t=o(e.getElementsByName(n)))?u(t):"top"===n&&u(null):u(null)}var e=t.document;return n&&r.$watch(function(){return i.hash()},function(n,t){n===t&&""===n||ul(function(){r.$evalAsync(f)})}),f}]}function hr(n,t){return!n&&!t?"":n?t?(a(n)&&(n=n.join(" ")),a(t)&&(t=t.join(" ")),n+" "+t):n:t}function cl(n){l(n)&&(n=n.split(" "));var t=rt();return r(n,function(n){n.length&&(t[n]=!0)}),t}function oi(n){return s(n)?n:{}}function ll(){this.$get=["$$rAF","$timeout",function(n,t){return n.supported?function(t){return n(t)}:function(n){return t(n,0,!1)}}]}function al(n,t,i,u){function b(n){try{n.apply(null,ni.call(arguments,1))}finally{if(l--,0===l)for(;w.length;)try{w.pop()()}catch(t){i.error(t)}}}function k(){d();nt()}function d(){n:{try{s=y.state;break n}catch(n){}s=void 0}s=c(s)?null:s;ot(s,g)&&(s=g);g=s}function nt(){(v!==e.url()||a!==s)&&(v=e.url(),a=s,r(it,function(n){n(e.url(),s)}))}var e=this,h=n.location,y=n.history,ut=n.setTimeout,ft=n.clearTimeout,p={},l,w;e.isMock=!1;l=0;w=[];e.$$completeOutstandingRequest=b;e.$$incOutstandingRequestCount=function(){l++};e.notifyWhenNoOutstandingRequests=function(n){0===l?n():w.push(n)};var s,a,v=h.href,et=t.find("base"),tt=null;d();a=s;e.url=function(t,i,r){var o,f;return(c(r)&&(r=null),h!==n.location&&(h=n.location),y!==n.history&&(y=n.history),t)?(o=a===r,v===t&&(!u.history||o))?e:(f=v&&si(v)===si(t),v=t,a=r,!u.history||f&&o?(f||(tt=t),i?h.replace(t):f?(i=h,r=t.indexOf("#"),t=-1===r?"":t.substr(r+1),i.hash=t):h.href=t):(y[i?"replaceState":"pushState"](r,"",t),d(),a=s),e):tt||h.href.replace(/%27/g,"'")};e.state=function(){return s};var it=[],rt=!1,g=null;e.onUrlChange=function(t){if(!rt){if(u.history)o(n).on("popstate",k);o(n).on("hashchange",k);rt=!0}return it.push(t),t};e.$$applicationDestroyed=function(){o(n).off("hashchange popstate",k)};e.$$checkUrlChange=nt;e.baseHref=function(){var n=et.attr("href");return n?n.replace(/^(https?\:)?\/\/[^\/]*/,""):""};e.defer=function(n,t){var i;return l++,i=ut(function(){delete p[i];b(n)},t||0),p[i]=!0,i};e.defer.cancel=function(n){return p[n]?(delete p[n],ft(n),b(f),!0):!1}}function vl(){this.$get=["$window","$log","$sniffer","$document",function(n,t,i,r){return new al(n,r,t,i)}]}function yl(){this.$get=function(){function t(t,i){function l(n){n!=f&&(r?r==n&&(r=n.n):r=n,h(n.n,n.p),h(n,f),f=n,f.n=null)}function h(n,t){n!=t&&(n&&(n.p=t),t&&(t.n=n))}if(t in n)throw v("$cacheFactory")("iid",t);var o=0,a=p({},i,{id:t}),e={},s=i&&i.capacity||Number.MAX_VALUE,u={},f=null,r=null;return n[t]={put:function(n,t){if(!c(t)){if(s<Number.MAX_VALUE){var i=u[n]||(u[n]={key:n});l(i)}return n in e||o++,e[n]=t,o>s&&this.remove(r.key),t}},get:function(n){if(s<Number.MAX_VALUE){var t=u[n];if(!t)return;l(t)}return e[n]},remove:function(n){if(s<Number.MAX_VALUE){var t=u[n];if(!t)return;t==f&&(f=t.p);t==r&&(r=t.n);h(t.n,t.p);delete u[n]}delete e[n];o--},removeAll:function(){e={};o=0;u={};f=r=null},destroy:function(){u=a=e=null;delete n[t]},info:function(){return p({},a,{size:o})}}}var n={};return t.info=function(){var t={};return r(n,function(n,i){t[i]=n.info()}),t},t.get=function(t){return n[t]},t}}function pl(){this.$get=["$cacheFactory",function(n){return n("templates")}]}function co(n,u){function b(n,t,i){var f=/^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/,u={};return r(n,function(n,r){var e=n.match(f);if(!e)throw it("iscp",t,r,n,i?"controller bindings definition":"isolate scope definition");u[r]={mode:e[1][0],collection:"*"===e[2],optional:"?"===e[3],attrName:e[4]||r}}),u}function k(n){var t=n.charAt(0);if(!t||t!==y(t))throw it("baddir",n);if(n!==n.trim())throw it("baddir",n);}var v={},d=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,g=/(([\w\-]+)(?:\:([^;]+))?;?)/,nt=wc("ngSrc,ngSrcset,src,srcset"),tt=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,ut=/^(on[a-z]+|formaction)$/,c;this.directive=function ft(t,i){return wi(t,"directive"),l(t)?(k(t),cf(i,"directiveFactory"),v.hasOwnProperty(t)||(v[t]=[],n.factory(t+"Directive",["$injector","$exceptionHandler",function(n,i){var u=[];return r(v[t],function(r,f){var e,v,y,p,w,k;try{e=n.invoke(r);h(e)?e={compile:yt(e)}:!e.compile&&e.link&&(e.compile=yt(e.link));e.priority=e.priority||0;e.index=f;e.name=e.name||t;e.require=e.require||e.controller&&e.name;e.restrict=e.restrict||"EA";var d=e,o=e,a=e.name,c={isolateScope:null,bindToController:null};if(s(o.scope)&&(!0===o.bindToController?(c.bindToController=b(o.scope,a,!0),c.isolateScope={}):c.isolateScope=b(o.scope,a,!1)),s(o.bindToController)&&(c.bindToController=b(o.bindToController,a,!0)),s(c.bindToController)){if(v=o.controller,y=o.controllerAs,!v)throw it("noctrl",a);n:if(y&&l(y))p=y;else{if(l(v)&&(w=vh.exec(v),w)){p=w[3];break n}p=void 0}if(!p)throw it("noident",a);}k=d.$$bindings=c;s(k.isolateScope)&&(e.$$isolateBindings=k.isolateScope);u.push(e)}catch(g){i(g)}}),u}])),v[t].push(i)):r(t,ae(ft)),this};this.aHrefSanitizationWhitelist=function(n){return e(n)?(u.aHrefSanitizationWhitelist(n),this):u.aHrefSanitizationWhitelist()};this.imgSrcSanitizationWhitelist=function(n){return e(n)?(u.imgSrcSanitizationWhitelist(n),this):u.imgSrcSanitizationWhitelist()};c=!0;this.debugInfoEnabled=function(n){return e(n)?(c=n,this):c};this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function(n,u,e,b,k,ft,et,ht,ct,lt,at){function bt(n,t){try{n.addClass(t)}catch(i){}}function vt(n,t,i,u,f){var s,e;return n instanceof o||(n=o(n)),r(n,function(t,i){t.nodeType==pr&&t.nodeValue.match(/\S+/)&&(n[i]=o(t).wrap("<span><\/span>").parent()[0])}),s=ri(n,t,n,i,u,f),vt.$$addScopeClass(n),e=null,function(t,i,r){var u,f,h;if(cf(t,"scope"),r=r||{},u=r.parentBoundTranscludeFn,f=r.transcludeControllers,r=r.futureParentElement,u&&u.$$boundTransclude&&(u=u.$$boundTransclude),e||(e=(r=r&&r[0])?"foreignobject"!==wt(r)&&r.toString().match(/SVG/)?"svg":"html":"html"),r="html"!==e?o(fi(e,o("<div>").append(n).html())):i?ai.clone.call(n):n,f)for(h in f)r.data("$"+h+"Controller",f[h].instance);return vt.$$addScopeInfo(r,t),i&&i(r,t),s&&s(t,r,r,u),r}}function ri(n,t,r,u,f,e){function p(n,r,u,f){var h,l,c,e,p,a,y;if(v)for(y=Array(r.length),e=0;e<s.length;e+=3)h=s[e],y[h]=r[h];else y=r;for(e=0,p=s.length;e<p;)(l=y[s[e++]],r=s[e++],h=s[e++],r)?(r.scope?(c=n.$new(),vt.$$addScopeInfo(o(l),c),a=r.$$destroyBindings)&&(r.$$destroyBindings=null,c.$on("$destroyed",a)):c=n,a=r.transcludeOnThisElement?gt(n,r.transclude,f,r.elementTranscludeOnThisElement):!r.templateOnThisElement&&f?f:!f&&t?gt(n,t):null,r(h,c,l,u,a,r)):h&&h(n,l.childNodes,i,f)}for(var s=[],h,l,a,y,v,c=0;c<n.length;c++)h=new oi,l=ui(n[c],[],h,0===c?u:i,f),(e=l.length?ci(l,n[c],h,t,r,null,[],[],e):null)&&e.scope&&vt.$$addScopeClass(h.$$element),h=e&&e.terminal||!(a=n[c].childNodes)||!a.length?null:ri(a,e?(e.transcludeOnThisElement||!e.templateOnThisElement)&&e.transclude:t),(e||h)&&(s.push(c,e,h),y=!0,v=v||e),e=null;return y?p:null}function gt(n,t,i){return function(r,u,f,e,o){return r||(r=n.$new(!1,o),r.$$transcluded=!0),t(r,u,{parentBoundTranscludeFn:i,transcludeControllers:f,futureParentElement:e})}}function ui(n,t,i,r,u){var b=i.$attr,e,v,y,p;switch(n.nodeType){case pt:ti(t,dt(wt(n)),"E",r,u);for(var f,o,h,c=n.attributes,a=0,k=c&&c.length;a<k;a++)v=!1,y=!1,f=c[a],e=f.name,o=w(f.value),f=dt(e),(h=or.test(f))&&(e=e.replace(ah,"").substr(8).replace(/_(.)/g,function(n,t){return t.toUpperCase()})),p=f.replace(/(Start|End)$/,""),di(p)&&f===p+"Start"&&(v=e,y=e.substr(0,e.length-5)+"end",e=e.substr(0,e.length-6)),f=dt(e.toLowerCase()),b[f]=e,(h||!i.hasOwnProperty(f))&&(i[f]=o,ho(n,f)&&(i[f]=!0)),er(n,t,o,f,h),ti(t,f,"A",r,u,v,y);if(n=n.className,s(n)&&(n=n.animVal),l(n)&&""!==n)for(;e=g.exec(n);)f=dt(e[2]),ti(t,f,"C",r,u)&&(i[f]=w(e[3])),n=n.substr(e.index+e[0].length);break;case pr:rr(t,n.nodeValue);break;case 8:try{(e=d.exec(n.nodeValue))&&(f=dt(e[1]),ti(t,f,"M",r,u)&&(i[f]=w(e[2])))}catch(nt){}}return t.sort(tr),t}function si(n,t,i){var r=[],u=0;if(t&&n.hasAttribute&&n.hasAttribute(t)){do{if(!n)throw it("uterdir",t,i);n.nodeType==pt&&(n.hasAttribute(t)&&u++,n.hasAttribute(i)&&u--);r.push(n);n=n.nextSibling}while(0<u)}else r.push(n);return o(r)}function hi(n,t,i){return function(r,u,f,e,o){return u=si(u[0],t,i),n(r,u,f,e,o)}}function ci(n,r,u,f,c,v,y,p,b){function bi(n,t,i,r){n&&(i&&(n=hi(n,i,r)),n.require=k.require,n.directiveName=ut,(g===k||k.$$isolateScope)&&(n=yi(n,{isolateScope:!0})),y.push(n));t&&(i&&(t=hi(t,i,r)),t.require=k.require,t.directiveName=ut,(g===k||k.$$isolateScope)&&(t=yi(t,{isolateScope:!0})),p.push(t))}function ci(n,t,i,r){var f,e,u;if(l(t)){if(u=t.match(tt),t=t.substring(u[0].length),e=u[1]||u[3],u="?"===u[2],"^^"===e?i=i.parent():f=(f=r&&r[t])&&f.instance,f||(r="$"+t+"Controller",f=e?i.inheritedData(r):i.data(r)),!f&&!u)throw it("ctreq",t,n);}else if(a(t))for(f=[],e=0,u=t.length;e<u;e++)f[e]=ci(n,t[e],i,r);return f||null}function gi(n,t,i,r,u,f){var h=rt(),c;for(c in r){var e=r[c],o={$scope:e===g||e.$$isolateScope?u:f,$element:n,$attrs:t,$transclude:i},s=e.controller;"@"==s&&(s=t[e.name]);o=ft(s,o,!0,e.controllerAs);h[e.name]=o;lt||n.data("$"+e.name+"Controller",o.instance)}return h}function et(n,t,f,e,s,h){function ut(n,t,r){var u;return ir(n)||(r=t,t=n,n=i),lt&&(u=b),r||(r=lt?l.parent():l),s(n,t,u,r,it)}var a,c,w,v,b,nt,l,d,rt,tt,it;if(r===f?(e=u,l=u.$$element):(l=o(f),e=new oi(l,u)),g&&(v=t.$new(!0)),s&&(nt=ut,nt.$$boundTransclude=s),st&&(b=gi(l,e,nt,st,v,t)),g&&(vt.$$addScopeInfo(l,v,!0,!(ot&&(ot===g||ot===g.$$originalDirective))),vt.$$addScopeClass(l,!0),v.$$isolateBindings=g.$$isolateBindings,ei(t,e,v,v.$$isolateBindings,g,v)),b){d=g||ct;d&&b[d.name]&&(c=d.$$bindings.bindToController,(w=b[d.name])&&w.identifier&&c&&(rt=w,h.$$destroyBindings=ei(t,e,w.instance,c,d)));for(a in b)w=b[a],tt=w(),tt!==w.instance&&(w.instance=tt,l.data("$"+k.name+"Controller",tt),w===rt&&(h.$$destroyBindings(),h.$$destroyBindings=ei(t,e,tt,c,d)))}for(a=0,h=y.length;a<h;a++)c=y[a],pi(c,c.isolateScope?v:t,l,e,c.require&&ci(c.directiveName,c.require,l,b),nt);for(it=t,g&&(g.template||null===g.templateUrl)&&(it=v),n&&n(it,f.childNodes,i,s),a=p.length-1;0<=a;a--)c=p[a],pi(c,c.isolateScope?v:t,l,e,c.require&&ci(c.directiveName,c.require,l,b),nt)}var gt,ri,di;b=b||{};for(var bt=-Number.MAX_VALUE,ct,st=b.controllerDirectives,g=b.newIsolateScopeDirective,ot=b.templateDirective,ti=b.nonTlbTranscludeDirective,ai=!1,wi=!1,lt=b.hasElementTranscludeDirective,nt=u.$$element=o(r),k,ut,d,dt=f,at,ht=0,wt=n.length;ht<wt;ht++){if(k=n[ht],gt=k.$$start,ri=k.$$end,gt&&(nt=si(r,gt,ri)),d=i,bt>k.priority)break;if((d=k.scope)&&(k.templateUrl||(s(d)?(yt("new/isolated scope",g||ct,k,nt),g=k):yt("new/isolated scope",g,k,nt)),ct=ct||k),ut=k.name,!k.templateUrl&&k.controller&&(d=k.controller,st=st||rt(),yt("'"+ut+"' controller",st[ut],k,nt),st[ut]=k),(d=k.transclude)&&(ai=!0,k.$$tlb||(yt("transclusion",ti,k,nt),ti=k),"element"==d?(lt=!0,bt=k.priority,d=nt,nt=u.$$element=o(t.createComment(" "+ut+": "+u[ut]+" ")),r=nt[0],ii(c,ni.call(d,0),r),dt=vt(d,f,bt,v&&v.name,{nonTlbTranscludeDirective:ti})):(d=o(lf(r)).contents(),nt.empty(),dt=vt(d,f))),k.template)if(wi=!0,yt("template",ot,k,nt),ot=k,d=h(k.template)?k.template(nt,u):k.template,d=ki(d),k.replace){if(v=k,d=ee.test(d)?ao(fi(k.templateNamespace,w(d))):[],r=d[0],1!=d.length||r.nodeType!==pt)throw it("tplrt",ut,"");ii(c,nt,r);wt={$attr:{}};d=ui(r,[],wt);di=n.splice(ht+1,n.length-(ht+1));g&&li(d);n=n.concat(d).concat(di);vi(u,wt);wt=n.length}else nt.html(d);if(k.templateUrl)wi=!0,yt("template",ot,k,nt),ot=k,k.replace&&(v=k),et=nr(n.splice(ht,n.length-ht),nt,u,c,ai&&dt,y,p,{controllerDirectives:st,newIsolateScopeDirective:g,templateDirective:ot,nonTlbTranscludeDirective:ti}),wt=n.length;else if(k.compile)try{at=k.compile(nt,u,dt);h(at)?bi(null,at,gt,ri):at&&bi(at.pre,at.post,gt,ri)}catch(tr){e(tr,kt(nt))}k.terminal&&(et.terminal=!0,bt=Math.max(bt,k.priority))}return et.scope=ct&&!0===ct.scope,et.transcludeOnThisElement=ai,et.elementTranscludeOnThisElement=lt,et.templateOnThisElement=wi,et.transclude=dt,b.hasElementTranscludeDirective=lt,et}function li(n){for(var t=0,i=n.length;t<i;t++)n[t]=of(n[t],{$$isolateScope:!0})}function ti(t,r,u,f,o,s,h){var c,l,a;if(r===o)return null;if(o=null,v.hasOwnProperty(r))for(r=n.get(r+"Directive"),l=0,a=r.length;l<a;l++)try{c=r[l];(f===i||f>c.priority)&&-1!=c.restrict.indexOf(u)&&(s&&(c=of(c,{$$start:s,$$end:h})),t.push(c),o=c)}catch(y){e(y)}return o}function di(t){if(v.hasOwnProperty(t))for(var r=n.get(t+"Directive"),i=0,u=r.length;i<u;i++)if(t=r[i],t.multiElement)return!0;return!1}function vi(n,t){var u=t.$attr,f=n.$attr,i=n.$$element;r(n,function(i,r){"$"!=r.charAt(0)&&(t[r]&&t[r]!==i&&(i+=("style"===r?";":" ")+t[r]),n.$set(r,i,!0,u[r]))});r(t,function(t,r){"class"==r?(bt(i,t),n["class"]=(n["class"]?n["class"]+" ":"")+t):"style"==r?(i.attr("style",i.attr("style")+";"+t),n.style=(n.style?n.style+";":"")+t):"$"==r.charAt(0)||n.hasOwnProperty(r)||(n[r]=t,f[r]=u[r])})}function nr(n,t,i,u,f,e,c,l){var y=[],v,p,k=t[0],a=n.shift(),g=of(a,{templateUrl:null,transclude:null,replace:null,$$originalDirective:a}),d=h(a.templateUrl)?a.templateUrl(t,i):a.templateUrl,nt=a.templateNamespace;return t.empty(),b(ct.getTrustedResourceUrl(d)).then(function(h){var b,rt,tt,ft;if(h=ki(h),a.replace){if(h=ee.test(h)?ao(fi(nt,w(h))):[],b=h[0],1!=h.length||b.nodeType!==pt)throw it("tplrt",a.name,d);h={$attr:{}};ii(u,t,b);tt=ui(b,[],h);s(a.scope)&&li(tt);n=tt.concat(n);vi(i,h)}else b=k,t.html(h);for(n.unshift(g),v=ci(n,b,i,f,t,a,e,c,l),r(u,function(n,i){n==b&&(u[i]=t[0])}),p=ri(t[0].childNodes,f);y.length;){h=y.shift();rt=y.shift();var et=y.shift(),ut=y.shift(),tt=t[0];h.$$destroyed||(rt!==k&&(ft=rt.className,l.hasElementTranscludeDirective&&a.replace||(tt=lf(b)),ii(et,o(rt),tt),bt(o(tt),ft)),rt=v.transcludeOnThisElement?gt(h,v.transclude,ut):ut,v(p,h,tt,u,rt,v))}y=null}),function(n,t,i,r,u){n=u;t.$$destroyed||(y?y.push(t,i,r,n):(v.transcludeOnThisElement&&(n=gt(t,v.transclude,u)),v(p,t,i,r,n,v)))}}function tr(n,t){var i=t.priority-n.priority;return 0!==i?i:n.name!==t.name?n.name<t.name?-1:1:n.index-t.index}function yt(n,t,i,r){if(t)throw it("multidir",t.name,i.name,n,kt(r));}function rr(n,t){var i=u(t,!0);i&&n.push({priority:0,compile:function(n){n=n.parent();var t=!!n.length;return t&&vt.$$addBindingClass(n),function(n,r){var u=r.parent();t||vt.$$addBindingClass(u);vt.$$addBindingInfo(u,i.expressions);n.$watch(i,function(n){r[0].nodeValue=n})}}})}function fi(n,i){n=y(n||"html");switch(n){case"svg":case"math":var r=t.createElement("div");return r.innerHTML="<"+n+">"+i+"<\/"+n+">",r.childNodes[0].childNodes;default:return i}}function fr(n,t){if("srcdoc"==t)return ct.HTML;var i=wt(n);if("xlinkHref"==t||"form"==i&&"action"==t||"img"!=i&&("src"==t||"ngSrc"==t))return ct.RESOURCE_URL}function er(n,t,i,r,f){var o=fr(n,r),e;if(f=nt[r]||f,e=u(i,!0,o,f),e){if("multiple"===r&&"select"===wt(n))throw it("selmulti",kt(n));t.push({priority:100,compile:function(){return{pre:function(n,t,s){if(t=s.$$observers||(s.$$observers={}),ut.test(r))throw it("nodomevents");var h=s[r];h!==i&&(e=h&&u(h,!0,o,f),i=h);e&&(s[r]=e(n),(t[r]||(t[r]=[])).$$inter=!0,(s.$$observers&&s.$$observers[r].$$scope||n).$watch(e,function(n,t){"class"===r&&n!=t?s.$updateClass(n,t):s.$set(r,n)}))}}}})}}function ii(n,i,r){var u=i[0],h=i.length,s=u.parentNode,f,e,c;if(n)for(f=0,e=n.length;f<e;f++)if(n[f]==u){for(n[f++]=r,e=f+h-1,c=n.length;f<c;f++,e++)e<c?n[f]=n[e]:delete n[f];n.length-=h-1;n.context===u&&(n.context=r);break}for(s&&s.replaceChild(r,u),n=t.createDocumentFragment(),n.appendChild(u),o(r).data(o(u).data()),st?(ue=!0,st.cleanData([u])):delete o.cache[u[o.expando]],u=1,h=i.length;u<h;u++)s=i[u],o(s).remove(),n.appendChild(s),delete i[u];i[0]=r;i.length=1}function yi(n,t){return p(function(){return n.apply(null,arguments)},n,t)}function pi(n,t,i,r,u,f){try{n(t,i,r,u,f)}catch(o){e(o,kt(i))}}function ei(n,t,i,e,o,s){var h;return r(e,function(r,e){var s=r.attrName,c=r.optional,a,l,y,v;switch(r.mode){case"@":t.$observe(s,function(n){i[e]=n});t.$$observers[s].$$scope=n;t[s]&&(i[e]=u(t[s])(n));break;case"=":if(c&&!t[s])break;l=k(t[s]);v=l.literal?ot:function(n,t){return n===t||n!==n&&t!==t};y=l.assign||function(){a=i[e]=l(n);throw it("nonassign",t[s],o.name);};a=i[e]=l(n);c=function(t){return v(t,i[e])||(v(t,a)?y(n,t=i[e]):i[e]=t),a=t};c.$stateful=!0;c=r.collection?n.$watchCollection(t[s],c):n.$watch(k(t[s],c),null,l.literal);h=h||[];h.push(c);break;case"&":if(!t.hasOwnProperty(s)&&c)break;if(l=k(t[s]),l===f&&c)break;i[e]=function(t){return l(n,t)}}}),e=h?function(){for(var n=0,t=h.length;n<t;++n)h[n]()}:f,s&&e!==f?(s.$on("$destroy",e),f):e}var oi=function(n,t){if(t)for(var u=Object.keys(t),r,i=0,f=u.length;i<f;i++)r=u[i],this[r]=t[r];else this.$attr={};this.$$element=n};oi.prototype={$normalize:dt,$addClass:function(n){n&&0<n.length&&lt.addClass(this.$$element,n)},$removeClass:function(n){n&&0<n.length&&lt.removeClass(this.$$element,n)},$updateClass:function(n,t){var i=lo(n,t);i&&i.length&&lt.addClass(this.$$element,i);(i=lo(t,n))&&i.length&&lt.removeClass(this.$$element,i)},$set:function(n,t,u,f){var h=this.$$element[0],s=ho(h,n),o=fl(h,n),h=n;if(s?(this.$$element.prop(n,t),f=s):o&&(this[o]=t,h=o),this[n]=t,f?this.$attr[n]=f:(f=this.$attr[n])||(this.$attr[n]=f=to(n,"-")),s=wt(this.$$element),"a"===s&&"href"===n||"img"===s&&"src"===n)this[n]=t=at(t,"src"===n);else if("img"===s&&"srcset"===n){for(var s="",o=w(t),c=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,c=/\s/.test(o)?c:/(,)/,o=o.split(c),c=Math.floor(o.length/2),l=0;l<c;l++)var a=2*l,s=s+at(w(o[a]),!0),s=s+(" "+w(o[a+1]));o=w(o[2*l]).split(/\s/);s+=at(w(o[0]),!0);2===o.length&&(s+=" "+w(o[1]));this[n]=t=s}!1!==u&&(null===t||t===i?this.$$element.removeAttr(f):this.$$element.attr(f,t));(n=this.$$observers)&&r(n[h],function(n){try{n(t)}catch(i){e(i)}})},$observe:function(n,t){var i=this,u=i.$$observers||(i.$$observers=rt()),r=u[n]||(u[n]=[]);return r.push(t),et.$evalAsync(function(){!r.$$inter&&i.hasOwnProperty(n)&&t(i[n])}),function(){ur(r,t)}}};var wi=u.startSymbol(),bi=u.endSymbol(),ki="{{"==wi||"}}"==bi?gi:function(n){return n.replace(/\{\{/g,wi).replace(/}}/g,bi)},or=/^ngAttr[A-Z]/;return vt.$$addBindingInfo=c?function(n,t){var i=n.data("$binding")||[];a(t)?i=i.concat(t):i.push(t);n.data("$binding",i)}:f,vt.$$addBindingClass=c?function(n){bt(n,"ng-binding")}:f,vt.$$addScopeInfo=c?function(n,t,i,r){n.data(i?r?"$isolateScopeNoTemplate":"$isolateScope":"$scope",t)}:f,vt.$$addScopeClass=c?function(n,t){bt(n,t?"ng-isolate-scope":"ng-scope")}:f,vt}]}function dt(n){return or(n.replace(ah,""))}function lo(n,t){var r="",e=n.split(/\s+/),o=t.split(/\s+/),u=0,f,i;n:for(;u<e.length;u++){for(f=e[u],i=0;i<o.length;i++)if(f==o[i])continue n;r+=(0<r.length?" ":"")+f}return r}function ao(n){n=o(n);var t=n.length;if(1>=t)return n;for(;t--;)8===n[t].nodeType&&hv.call(n,t,1);return n}function wl(){var n={},t=!1;this.register=function(t,i){wi(t,"controller");s(t)?p(n,t):n[t]=i};this.allowGlobals=function(){t=!0};this.$get=["$injector","$window",function(r,u){function f(n,t,i,r){if(!n||!s(n.$scope))throw v("$controller")("noscp",r,t);n.$scope[t]=i}return function(e,o,c,v){var y,w,b;if(c=!0===c,v&&l(v)&&(b=v),l(e)){if(v=e.match(vh),!v)throw fy("ctrlfmt",e);w=v[1];b=b||v[3];e=n.hasOwnProperty(w)?n[w]:io(o.$scope,w,!0)||(t?io(u,w,!0):i);pi(e,w,!0)}return c?(c=(a(e)?e[e.length-1]:e).prototype,y=Object.create(c||null),b&&f(o,b,y,w||e.name),p(function(){var n=r.invoke(e,y,o,w);return n!==y&&(s(n)||h(n))&&(y=n,b&&f(o,b,y,w||e.name)),y},{instance:y,identifier:b})):(y=r.instantiate(e,o,w),b&&f(o,b,y,w||e.name),y)}}]}function bl(){this.$get=["$window",function(n){return o(n.document)}]}function kl(){this.$get=["$log",function(n){return function(){n.error.apply(n,arguments)}}]}function yf(n){return s(n)?et(n)?n.toISOString():er(n):n}function dl(){this.$get=function(){return function(n){if(!n)return"";var t=[];return le(n,function(n,i){null===n||c(n)||(a(n)?r(n,function(n){t.push(ct(i)+"="+ct(yf(n)))}):t.push(ct(i)+"="+ct(yf(n))))}),t.join("&")}}}function gl(){this.$get=function(){return function(n){function t(n,u,f){null===n||c(n)||(a(n)?r(n,function(n){t(n,u+"[]")}):s(n)&&!et(n)?le(n,function(n,i){t(n,u+(f?"":"[")+i+(f?"":"]"))}):i.push(ct(u)+"="+ct(yf(n))))}if(!n)return"";var i=[];return t(n,"",!0),i.join("&")}}}function pf(n,t){var r,i;return l(n)&&(r=n.replace(sy,"").trim(),r&&(i=t("Content-Type"),(i=i&&0===i.indexOf(yh))||(i=(i=r.match(ey))&&oy[i[0]].test(r)),i&&(n=be(r)))),n}function vo(n){var t=rt(),i;return l(n)?r(n.split("\n"),function(n){i=n.indexOf(":");var r=y(w(n.substr(0,i)));n=w(n.substr(i+1));r&&(t[r]=t[r]?t[r]+", "+n:n)}):s(n)&&r(n,function(n,i){var r=y(i),u=w(n);r&&(t[r]=t[r]?t[r]+", "+u:u)}),t}function yo(n){var t;return function(i){return t||(t=vo(n)),i?(i=t[y(i)],void 0===i&&(i=null),i):t}}function po(n,t,i,u){return h(u)?u(n,t,i):(r(u,function(r){n=r(n,t,i)}),n)}function na(){var n=this.defaults={transformResponse:[pf],transformRequest:[function(n){return s(n)&&"[object File]"!==ti.call(n)&&"[object Blob]"!==ti.call(n)&&"[object FormData]"!==ti.call(n)?er(n):n}],headers:{common:{Accept:"application/json, text/plain, */*"},post:ht(he),put:ht(he),patch:ht(he)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},t=!1,u;this.useApplyAsync=function(n){return e(n)?(t=!!n,this):t};u=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(f,o,w,b,k,d){function g(t){function o(n){var t=p({},n);return t.data=n.data?po(n.data,n.headers,n.status,u.transformResponse):n.data,n=n.status,200<=n&&300>n?t:k.reject(t)}function a(n,t){var i,u={};return r(n,function(n,r){h(n)?(i=n(t),null!=i&&(u[r]=i)):u[r]=n}),u}var u,e,s,f;if(!ut.isObject(t))throw v("$http")("badreq",t);for(u=p({method:"get",transformRequest:n.transformRequest,transformResponse:n.transformResponse,paramSerializer:n.paramSerializer},t),u.headers=function(t){var i=n.headers,u=p({},t.headers),r,f,e,i=p({},i.common,i[y(t.method)]);n:for(r in i){f=y(r);for(e in u)if(y(e)===f)continue n;u[r]=i[r]}return a(u,ht(t))}(t),u.method=bu(u.method),u.paramSerializer=l(u.paramSerializer)?d.get(u.paramSerializer):u.paramSerializer,e=[function(t){var u=t.headers,f=po(t.data,yo(u),i,t.transformRequest);return c(f)&&r(u,function(n,t){"content-type"===y(t)&&delete u[t]}),c(t.withCredentials)&&!c(n.withCredentials)&&(t.withCredentials=n.withCredentials),tt(t,f).then(o,o)},i],f=k.when(u),r(nt,function(n){(n.request||n.requestError)&&e.unshift(n.request,n.requestError);(n.response||n.responseError)&&e.push(n.response,n.responseError)});e.length;)t=e.shift(),s=e.shift(),f=f.then(t,s);return f.success=function(n){return pi(n,"fn"),f.then(function(t){n(t.data,t.status,t.headers,u)}),f},f.error=function(n){return pi(n,"fn"),f.then(null,function(t){n(t.data,t.status,t.headers,u)}),f},f}function tt(r,u){function ft(n,i,r,u){function f(){p(i,n,r,u)}v&&(200<=n&&300>n?v.put(y,[n,i,vo(r),u]):v.remove(y));t?b.$applyAsync(f):(f(),b.$$phase||b.$apply())}function p(n,t,i,u){t=Math.max(t,0);(200<=t&&300>t?w.resolve:w.reject)({data:n,status:t,headers:yo(i),config:r,statusText:u})}function nt(n){p(n.data,n.status,ht(n.headers()),n.statusText)}function tt(){var n=g.pendingRequests.indexOf(r);-1!==n&&g.pendingRequests.splice(n,1)}var w=k.defer(),d=w.promise,v,l,ut=r.headers,y=it(r.url,r.paramSerializer(r.params));return g.pendingRequests.push(r),d.then(tt,tt),(r.cache||n.cache)&&!1!==r.cache&&("GET"===r.method||"JSONP"===r.method)&&(v=s(r.cache)?r.cache:s(n.cache)?n.cache:rt),v&&(l=v.get(y),e(l)?l&&h(l.then)?l.then(nt,nt):a(l)?p(l[1],l[0],ht(l[2]),l[3]):p(l,200,{},"OK"):v.put(y,d)),c(l)&&((l=cs(r.url)?o()[r.xsrfCookieName||n.xsrfCookieName]:i)&&(ut[r.xsrfHeaderName||n.xsrfHeaderName]=l),f(r.method,y,u,ft,ut,r.timeout,r.withCredentials,r.responseType)),d}function it(n,t){return 0<t.length&&(n+=(-1==n.indexOf("?")?"?":"&")+t),n}var rt=w("$http"),nt;return n.paramSerializer=l(n.paramSerializer)?d.get(n.paramSerializer):n.paramSerializer,nt=[],r(u,function(n){nt.unshift(l(n)?d.get(n):d.invoke(n))}),g.pendingRequests=[],function(){r(arguments,function(n){g[n]=function(t,i){return g(p({},i||{},{method:n,url:t}))}})}("get","delete","head","jsonp"),function(){r(arguments,function(n){g[n]=function(t,i,r){return g(p({},r||{},{method:n,url:t,data:i}))}})}("post","put","patch"),g.defaults=n,g}]}function ta(){return new n.XMLHttpRequest}function ia(){this.$get=["$browser","$window","$document",function(n,t,i){return ra(n,ta,n.defer,t.angular.callbacks,i[0])}]}function ra(n,t,u,o,s){function c(n,t,i){var r=s.createElement("script"),u=null;return r.type="text/javascript",r.src=n,r.async=!0,u=function(n){r.removeEventListener("load",u,!1);r.removeEventListener("error",u,!1);s.body.removeChild(r);r=null;var f=-1,e="unknown";n&&("load"!==n.type||o[t].called||(n={type:"error"}),e=n.type,f="error"===n.type?404:200);i&&i(f,e)},r.addEventListener("load",u,!1),r.addEventListener("error",u,!1),s.body.appendChild(r),u}return function(s,l,a,v,p,w,b,k){function rt(){nt&&nt();d&&d.abort()}function tt(t,r,e,o,s){it!==i&&u.cancel(it);nt=d=null;t(r,e,o,s);n.$$completeOutstandingRequest(f)}var g,nt,d,it;if(n.$$incOutstandingRequestCount(),l=l||n.url(),"jsonp"==y(s))g="_"+(o.counter++).toString(36),o[g]=function(n){o[g].data=n;o[g].called=!0},nt=c(l.replace("JSON_CALLBACK","angular.callbacks."+g),g,function(n,t){tt(v,n,o[g].data,"",t);o[g]=f});else{if(d=t(),d.open(s,l,!0),r(p,function(n,t){e(n)&&d.setRequestHeader(t,n)}),d.onload=function(){var i=d.statusText||"",t="response"in d?d.response:d.responseText,n=1223===d.status?204:d.status;0===n&&(n=t?200:"file"==ri(l).protocol?404:0);tt(v,n,t,d.getAllResponseHeaders(),i)},s=function(){tt(v,-1,null,null,"")},d.onerror=s,d.onabort=s,b&&(d.withCredentials=!0),k)try{d.responseType=k}catch(ut){if("json"!==k)throw ut;}d.send(a)}0<w?it=u(rt,w):w&&h(w.then)&&w.then(rt)}}function ua(){var n="{{",t="}}";this.startSymbol=function(t){return t?(n=t,this):n};this.endSymbol=function(n){return n?(t=n,this):t};this.$get=["$parse","$exceptionHandler","$sce",function(i,r,u){function o(n){return"\\\\\\"+n}function s(i){return i.replace(v,n).replace(y,t)}function f(f,o,v,y){function ut(n){var i,t;try{if(i=n,n=v?u.getTrusted(v,i):u.valueOf(i),y&&!e(n))t=n;else if(null==n)t="";else{switch(typeof n){case"string":break;case"number":n=""+n;break;default:n=er(n)}t=n}return t}catch(o){r(yi.interr(f,o))}}var tt;y=!!y;for(var k,g,w=0,d=[],nt=[],it=f.length,b=[],rt=[];w<it;)if(-1!=(k=f.indexOf(n,w))&&-1!=(g=f.indexOf(t,k+l)))w!==k&&b.push(s(f.substring(w,k))),w=f.substring(k+l,g),d.push(w),nt.push(i(w,ut)),w=g+a,rt.push(b.length),b.push("");else{w!==it&&b.push(s(f.substring(w)));break}return v&&1<b.length&&yi.throwNoconcat(f),!o||d.length?(tt=function(n){for(var t=0,i=d.length;t<i;t++){if(y&&c(n[t]))return;b[rt[t]]=n[t]}return b.join("")},p(function(n){var t=0,i=d.length,u=Array(i);try{for(;t<i;t++)u[t]=nt[t](n);return tt(u)}catch(e){r(yi.interr(f,e))}},{exp:f,expressions:d,$$watchDelegate:function(n,t){var i;return n.$watchGroup(nt,function(r,u){var f=tt(r);h(t)&&t.call(this,f,r!==u?i:f,n);i=f})}})):void 0}var l=n.length,a=t.length,v=new RegExp(n.replace(/./g,o),"g"),y=new RegExp(t.replace(/./g,o),"g");return f.startSymbol=function(){return n},f.endSymbol=function(){return t},f}]}function fa(){this.$get=["$rootScope","$window","$q","$$q",function(n,t,i,r){function f(f,o,s,h){var v=4<arguments.length,p=v?ni.call(arguments,4):[],w=t.setInterval,b=t.clearInterval,a=0,y=e(h)&&!h,l=(y?r:i).defer(),c=l.promise;return s=e(s)?s:0,c.then(null,null,v?function(){f.apply(null,p)}:f),c.$$intervalId=w(function(){l.notify(a++);0<s&&a>=s&&(l.resolve(a),b(c.$$intervalId),delete u[c.$$intervalId]);y||n.$apply()},o),u[c.$$intervalId]=l,c}var u={};return f.cancel=function(n){return n&&n.$$intervalId in u?(u[n.$$intervalId].reject("canceled"),t.clearInterval(n.$$intervalId),delete u[n.$$intervalId],!0):!1},f}]}function ea(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"¤",posSuf:"",negPre:"(¤",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January February March April May June July August September October November December".split(" "),SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a",short:"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a",ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"]},pluralCat:function(n){return 1===n?"one":"other"}}}}function wf(n){n=n.split("/");for(var t=n.length;t--;)n[t]=nu(n[t]);return n.join("/")}function wo(n,t){var i=ri(n);t.$$protocol=i.protocol;t.$$host=i.hostname;t.$$port=tt(i.port)||cy[i.protocol]||null}function bo(n,t){var r="/"!==n.charAt(0),i;r&&(n="/"+n);i=ri(n);t.$$path=decodeURIComponent(r&&"/"===i.pathname.charAt(0)?i.pathname.substring(1):i.pathname);t.$$search=ge(i.search);t.$$hash=decodeURIComponent(i.hash);t.$$path&&"/"!=t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function gt(n,t){if(0===t.indexOf(n))return t.substr(n.length)}function si(n){var t=n.indexOf("#");return-1==t?n:n.substr(0,t)}function hu(n){return n.replace(/(#.+)|#$/,"$1")}function bf(n){return n.substr(0,si(n).lastIndexOf("/")+1)}function kf(n,t){this.$$html5=!0;t=t||"";var r=bf(n);wo(n,this);this.$$parse=function(n){var t=gt(r,n);if(!l(t))throw gu("ipthprfx",n,r);bo(t,this);this.$$path||(this.$$path="/");this.$$compose()};this.$$compose=function(){var n=hf(this.$$search),t=this.$$hash?"#"+nu(this.$$hash):"";this.$$url=wf(this.$$path)+(n?"?"+n:"")+t;this.$$absUrl=r+this.$$url.substr(1)};this.$$parseLinkUrl=function(u,f){if(f&&"#"===f[0])return this.hash(f.slice(1)),!0;var e,o;return(e=gt(n,u))!==i?(o=e,o=(e=gt(t,e))!==i?r+(gt("/",e)||e):n+o):(e=gt(r,u))!==i?o=r+e:r==u+"/"&&(o=r),o&&this.$$parse(o),!!o}}function df(n,t){var i=bf(n);wo(n,this);this.$$parse=function(r){var u,f;r=gt(n,r)||gt(i,r);"#"===r.charAt(0)?(u=gt(t,r),c(u)&&(u=r)):u=this.$$html5?r:"";bo(u,this);r=this.$$path;f=/^\/[A-Z]:(\/.*)/;0===u.indexOf(n)&&(u=u.replace(n,""));f.exec(u)||(r=(u=f.exec(r))?u[1]:r);this.$$path=r;this.$$compose()};this.$$compose=function(){var i=hf(this.$$search),r=this.$$hash?"#"+nu(this.$$hash):"";this.$$url=wf(this.$$path)+(i?"?"+i:"")+r;this.$$absUrl=n+(this.$$url?t+this.$$url:"")};this.$$parseLinkUrl=function(t){return si(n)==si(t)?(this.$$parse(t),!0):!1}}function ko(n,t){this.$$html5=!0;df.apply(this,arguments);var i=bf(n);this.$$parseLinkUrl=function(r,u){if(u&&"#"===u[0])return this.hash(u.slice(1)),!0;var f,e;return n==si(r)?f=r:(e=gt(i,r))?f=n+t+e:i===r+"/"&&(f=i),f&&this.$$parse(f),!!f};this.$$compose=function(){var i=hf(this.$$search),r=this.$$hash?"#"+nu(this.$$hash):"";this.$$url=wf(this.$$path)+(i?"?"+i:"")+r;this.$$absUrl=n+t+this.$$url}}function cu(n){return function(){return this[n]}}function go(n,t){return function(i){return c(i)?this[n]:(this[n]=t(i),this.$$compose(),this)}}function oa(){var t="",n={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(n){return e(n)?(t=n,this):t};this.html5Mode=function(t){return rr(t)?(n.enabled=t,this):s(t)?(rr(t.enabled)&&(n.enabled=t.enabled),rr(t.requireBase)&&(n.requireBase=t.requireBase),rr(t.rewriteLinks)&&(n.rewriteLinks=t.rewriteLinks),this):n};this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(i,r,u,f,e){function y(n,t,i){var u=h.url(),f=h.$$state;try{r.url(n,t,i);h.$$state=r.state()}catch(e){throw h.url(u),h.$$state=f,e;}}function p(n,t){i.$broadcast("$locationChangeSuccess",h.absUrl(),n,h.$$state,t)}var h,l,c,v,w,a;if(l=r.baseHref(),c=r.url(),n.enabled){if(!l&&n.requireBase)throw gu("nobase");v=c.substring(0,c.indexOf("/",c.indexOf("//")+2))+(l||"/");l=u.history?kf:ko}else v=si(c),l=df;h=new l(v,"#"+t);h.$$parseLinkUrl(c,c);h.$$state=r.state();w=/^\s*(javascript|mailto):/i;f.on("click",function(t){var u,c,l;if(n.rewriteLinks&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey&&2!=t.which&&2!=t.button){for(u=o(t.target);"a"!==wt(u[0]);)if(u[0]===f[0]||!(u=u.parent())[0])return;c=u.prop("href");l=u.attr("href")||u.attr("xlink:href");s(c)&&"[object SVGAnimatedString]"===c.toString()&&(c=ri(c.animVal).href);w.test(c)||!c||u.attr("target")||t.isDefaultPrevented()||!h.$$parseLinkUrl(c,l)||(t.preventDefault(),h.absUrl()!=r.url()&&(i.$apply(),e.angular["ff-684208-preventDefault"]=!0))}});hu(h.absUrl())!=hu(c)&&r.url(h.absUrl(),!0);a=!0;r.onUrlChange(function(n,t){i.$evalAsync(function(){var r=h.absUrl(),u=h.$$state,f;h.$$parse(n);h.$$state=t;f=i.$broadcast("$locationChangeStart",n,r,t,u).defaultPrevented;h.absUrl()===n&&(f?(h.$$parse(r),h.$$state=u,y(r,!1,u)):(a=!1,p(r,u)))});i.$$phase||i.$digest()});return i.$watch(function(){var t=hu(r.url()),e=hu(h.absUrl()),n=r.state(),o=h.$$replace,f=t!==e||h.$$html5&&u.history&&n!==h.$$state;(a||f)&&(a=!1,i.$evalAsync(function(){var r=h.absUrl(),u=i.$broadcast("$locationChangeStart",r,t,h.$$state,n).defaultPrevented;h.absUrl()===r&&(u?(h.$$parse(t),h.$$state=n):(f&&y(r,o,n===h.$$state?null:h.$$state),p(t,n)))}));h.$$replace=!1}),h}]}function sa(){var n=!0,t=this;this.debugEnabled=function(t){return e(t)?(n=t,this):n};this.$get=["$window",function(i){function e(n){return n instanceof Error&&(n.stack?n=n.message&&-1===n.stack.indexOf(n.message)?"Error: "+n.message+"\n"+n.stack:n.stack:n.sourceURL&&(n=n.message+"\n"+n.sourceURL+":"+n.line)),n}function u(n){var t=i.console||{},u=t[n]||t.log||f;n=!1;try{n=!!u.apply}catch(o){}return n?function(){var n=[];return r(arguments,function(t){n.push(e(t))}),u.apply(t,n)}:function(n,t){u(n,null==t?"":t)}}return{log:u("log"),info:u("info"),warn:u("warn"),error:u("error"),debug:function(){var i=u("debug");return function(){n&&i.apply(t,arguments)}}()}}]}function ii(n,t){if("__defineGetter__"===n||"__defineSetter__"===n||"__lookupGetter__"===n||"__lookupSetter__"===n||"__proto__"===n)throw ft("isecfld",t);return n}function lt(n,t){if(n){if(n.constructor===n)throw ft("isecfn",t);if(n.window===n)throw ft("isecwindow",t);if(n.children&&(n.nodeName||n.prop&&n.attr&&n.find))throw ft("isecdom",t);if(n===Object)throw ft("isecobj",t);}return n}function ns(n,t){if(n){if(n.constructor===n)throw ft("isecfn",t);if(n===ay||n===vy||n===yy)throw ft("isecff",t);}}function ha(n,t){return"undefined"!=typeof n?n:t}function ts(n,t){return"undefined"==typeof n?t:"undefined"==typeof t?n:n+t}function d(n,t){var i,f;switch(n.type){case u.Program:i=!0;r(n.body,function(n){d(n.expression,t);i=i&&n.expression.constant});n.constant=i;break;case u.Literal:n.constant=!0;n.toWatch=[];break;case u.UnaryExpression:d(n.argument,t);n.constant=n.argument.constant;n.toWatch=n.argument.toWatch;break;case u.BinaryExpression:d(n.left,t);d(n.right,t);n.constant=n.left.constant&&n.right.constant;n.toWatch=n.left.toWatch.concat(n.right.toWatch);break;case u.LogicalExpression:d(n.left,t);d(n.right,t);n.constant=n.left.constant&&n.right.constant;n.toWatch=n.constant?[]:[n];break;case u.ConditionalExpression:d(n.test,t);d(n.alternate,t);d(n.consequent,t);n.constant=n.test.constant&&n.alternate.constant&&n.consequent.constant;n.toWatch=n.constant?[]:[n];break;case u.Identifier:n.constant=!1;n.toWatch=[n];break;case u.MemberExpression:d(n.object,t);n.computed&&d(n.property,t);n.constant=n.object.constant&&(!n.computed||n.property.constant);n.toWatch=[n];break;case u.CallExpression:i=n.filter?!t(n.callee.name).$stateful:!1;f=[];r(n.arguments,function(n){d(n,t);i=i&&n.constant;n.constant||f.push.apply(f,n.toWatch)});n.constant=i;n.toWatch=n.filter&&!t(n.callee.name).$stateful?f:[n];break;case u.AssignmentExpression:d(n.left,t);d(n.right,t);n.constant=n.left.constant&&n.right.constant;n.toWatch=[n];break;case u.ArrayExpression:i=!0;f=[];r(n.elements,function(n){d(n,t);i=i&&n.constant;n.constant||f.push.apply(f,n.toWatch)});n.constant=i;n.toWatch=f;break;case u.ObjectExpression:i=!0;f=[];r(n.properties,function(n){d(n.value,t);i=i&&n.value.constant;n.value.constant||f.push.apply(f,n.value.toWatch)});n.constant=i;n.toWatch=f;break;case u.ThisExpression:n.constant=!1;n.toWatch=[]}}function is(n){if(1==n.length){n=n[0].expression;var t=n.toWatch;return 1!==t.length?t:t[0]!==n?t:i}}function rs(n){return n.type===u.Identifier||n.type===u.MemberExpression}function us(n){if(1===n.body.length&&rs(n.body[0].expression))return{type:u.AssignmentExpression,left:n.body[0].expression,right:{type:u.NGValueParameter},operator:"="}}function fs(n){return 0===n.body.length||1===n.body.length&&(n.body[0].expression.type===u.Literal||n.body[0].expression.type===u.ArrayExpression||n.body[0].expression.type===u.ObjectExpression)}function es(n,t){this.astBuilder=n;this.$filter=t}function os(n,t){this.astBuilder=n;this.$filter=t}function lu(n,t,i,r){var u,e,f;for(lt(n,r),t=t.split("."),e=0;1<t.length;e++)u=ii(t.shift(),r),f=lt(n[u],r),f||(f={},n[u]=f),n=f;return u=ii(t.shift(),r),lt(n[u],r),n[u]=i}function au(n){return"constructor"==n}function gf(n){return h(n.valueOf)?n.valueOf():py.call(n)}function ca(){var n=rt(),t=rt();this.$get=["$filter","$sniffer",function(u,o){function s(n,t){return null==n||null==t?n===t:"object"==typeof n&&(n=gf(n),"object"==typeof n)?!1:n===t||n!==n&&t!==t}function c(n,t,r,u,f){var e=u.inputs,o,c;if(1===e.length)return c=s,e=e[0],n.$watch(function(n){var t=e(n);return s(t,c)||(o=u(n,i,i,[t]),c=t&&gf(t)),o},t,r,f);for(var l=[],a=[],h=0,v=e.length;h<v;h++)l[h]=s,a[h]=null;return n.$watch(function(n){for(var r,f=!1,t=0,h=e.length;t<h;t++)r=e[t](n),(f||(f=!s(r,l[t])))&&(a[t]=r,l[t]=r&&gf(r));return f&&(o=u(n,i,i,a)),o},t,r,f)}function l(n,t,i,r){var u,f;return u=n.$watch(function(n){return r(n)},function(n,i,r){f=n;h(t)&&t.apply(this,arguments);e(n)&&r.$$postDigest(function(){e(f)&&u()})},i)}function a(n,t,i,u){function f(n){var t=!0;return r(n,function(n){e(n)||(t=!1)}),t}var o,s;return o=n.$watch(function(n){return u(n)},function(n,i,r){s=n;h(t)&&t.call(this,n,i,r);f(n)&&r.$$postDigest(function(){f(s)&&o()})},i)}function y(n,t,i,r){var u;return u=n.$watch(function(n){return r(n)},function(){h(t)&&t.apply(this,arguments);u()},i)}function v(n,t){if(!t)return n;var i=n.$$watchDelegate,i=i!==a&&i!==l?function(i,r,u,f){return u=n(i,r,u,f),t(u,i,r)}:function(i,r,u,f){return u=n(i,r,u,f),i=t(u,i,r),e(u)?i:u};return n.$$watchDelegate&&n.$$watchDelegate!==c?i.$$watchDelegate=n.$$watchDelegate:t.$stateful||(i.$$watchDelegate=c,i.inputs=n.inputs?n.inputs:[n]),i}var p={csp:o.csp,expensiveChecks:!1},w={csp:o.csp,expensiveChecks:!0};return function(i,r,e){var o,b,s,h;switch(typeof i){case"string":return s=i=i.trim(),h=e?t:n,o=h[s],o||(":"===i.charAt(0)&&":"===i.charAt(1)&&(b=!0,i=i.substring(2)),e=e?w:p,o=new tf(e),o=new rf(o,u,e).parse(i),o.constant?o.$$watchDelegate=y:b?o.$$watchDelegate=o.literal?a:l:o.inputs&&(o.$$watchDelegate=c),h[s]=o),v(o,r);case"function":return v(i,r);default:return f}}}]}function la(){this.$get=["$rootScope","$exceptionHandler",function(n,t){return ss(function(t){n.$evalAsync(t)},t)}]}function aa(){this.$get=["$browser","$exceptionHandler",function(n,t){return ss(function(t){n.defer(t)},t)}]}function ss(n,t){function k(n,t,i){function r(t){return function(i){u||(u=!0,t.call(n,i))}}var u=!1;return[r(t),r(i)]}function l(){this.$$state={status:0}}function o(n,t){return function(i){t.call(n,i)}}function c(r){!r.processScheduled&&r.pending&&(r.processScheduled=!0,n(function(){var e,n,f,u,o;for(f=r.pending,r.processScheduled=!1,r.pending=i,u=0,o=f.length;u<o;++u){n=f[u][0];e=f[u][r.status];try{h(e)?n.resolve(e(r.value)):1===r.status?n.resolve(r.value):n.reject(r.value)}catch(s){n.reject(s);t(s)}}}))}function u(){this.promise=new l;this.resolve=o(this,this.resolve);this.reject=o(this,this.reject);this.notify=o(this,this.notify)}var y=v("$q",TypeError);l.prototype={then:function(n,t,i){var r=new u;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([r,n,t,i]),0<this.$$state.status&&c(this.$$state),r.promise},"catch":function(n){return this.then(null,n)},"finally":function(n,t){return this.then(function(t){return p(t,!0,n)},function(t){return p(t,!1,n)},t)}};u.prototype={resolve:function(n){this.promise.$$state.status||(n===this.promise?this.$$reject(y("qcycle",n)):this.$$resolve(n))},$$resolve:function(n){var i,r=k(this,this.$$resolve,this.$$reject);try{(s(n)||h(n))&&(i=n&&n.then);h(i)?(this.promise.$$state.status=-1,i.call(n,r[0],r[1],this.notify)):(this.promise.$$state.value=n,this.promise.$$state.status=1,c(this.promise.$$state))}catch(u){r[1](u);t(u)}},reject:function(n){this.promise.$$state.status||this.$$reject(n)},$$reject:function(n){this.promise.$$state.value=n;this.promise.$$state.status=2;c(this.promise.$$state)},notify:function(i){var r=this.promise.$$state.pending;0>=this.promise.$$state.status&&r&&r.length&&n(function(){for(var u,f,n=0,e=r.length;n<e;n++){f=r[n][0];u=r[n][3];try{f.notify(h(u)?u(i):i)}catch(o){t(o)}}})}};var e=function(n,t){var i=new u;return t?i.resolve(n):i.reject(n),i.promise},p=function(n,t,i){var r=null;try{h(i)&&(r=i())}catch(u){return e(u,!1)}return r&&h(r.then)?r.then(function(){return e(n,t)},function(n){return e(n,!1)}):e(n,t)},w=function(n,t,i,r){var f=new u;return f.resolve(n),f.promise.then(t,i,r)},f=function b(n){if(!h(n))throw y("norslvr",n);if(!(this instanceof b))return new b(n);var t=new u;return n(function(n){t.resolve(n)},function(n){t.reject(n)}),t.promise};return f.defer=function(){return new u},f.reject=function(n){var t=new u;return t.reject(n),t.promise},f.when=w,f.all=function(n){var i=new u,f=0,t=a(n)?[]:{};return r(n,function(n,r){f++;w(n).then(function(n){t.hasOwnProperty(r)||(t[r]=n,--f||i.resolve(t))},function(n){t.hasOwnProperty(r)||i.reject(n)})}),0===f&&i.resolve(t),i.promise},f}function va(){this.$get=["$window","$timeout",function(n,t){function s(){for(var t,n=0;n<i.length;n++)t=i[n],t&&(i[n]=null,t());u=i.length=0}function f(n){var t=i.length;return u++,i.push(n),0===t&&(r=c(s)),function(){0<=t&&(t=i[t]=null,0==--u&&r&&(r(),r=null,i.length=0))}}var e=n.requestAnimationFrame||n.webkitRequestAnimationFrame,h=n.cancelAnimationFrame||n.webkitCancelAnimationFrame||n.webkitCancelRequestAnimationFrame,o=!!e,c=o?function(n){var t=e(n);return function(){h(t)}}:function(n){var i=t(n,16.66,!1);return function(){t.cancel(i)}},r,u,i;return f.supported=o,u=0,i=[],f}]}function ya(){function e(n){function t(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$id=++ku;this.$$ChildScope=null}return t.prototype=n,t}var i=10,u=v("$rootScope"),n=null,t=null;this.digestTtl=function(n){return arguments.length&&(i=n),i};this.$get=["$injector","$exceptionHandler","$parse","$browser",function(o,l,a,v){function rt(n){n.currentScope.$$destroyed=!0}function w(){this.$id=++ku;this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this.$root=this;this.$$destroyed=!1;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$$isolateBindings=null}function g(n){if(y.$$phase)throw u("inprog",y.$$phase);y.$$phase=n}function b(n,t){do n.$$watchersCount+=t;while(n=n.$parent)}function nt(n,t,i){do n.$$listenerCount[i]-=t,0===n.$$listenerCount[i]&&delete n.$$listenerCount[i];while(n=n.$parent)}function tt(){}function it(){for(;d.length;)try{d.shift()()}catch(n){l(n)}t=null}function ut(){null===t&&(t=v.defer(function(){y.$apply(it)}))}w.prototype={constructor:w,$new:function(n,t){var i;return t=t||this,n?(i=new w,i.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=e(this)),i=new this.$$ChildScope),i.$parent=t,i.$$prevSibling=t.$$childTail,t.$$childHead?(t.$$childTail.$$nextSibling=i,t.$$childTail=i):t.$$childHead=t.$$childTail=i,(n||t!=this)&&i.$on("$destroy",rt),i},$watch:function(t,i,r,u){var e=a(t);if(e.$$watchDelegate)return e.$$watchDelegate(this,i,r,e,t);var s=this,o=s.$$watchers,c={fn:i,last:tt,get:e,exp:u||t,eq:!!r};return n=null,h(i)||(c.fn=f),o||(o=s.$$watchers=[]),o.unshift(c),b(this,1),function(){0<=ur(o,c)&&b(s,-1);n=null}},$watchGroup:function(n,t){function c(){o=!1;h?(h=!1,t(i,i,u)):t(i,f,u)}var f=Array(n.length),i=Array(n.length),e=[],u=this,o=!1,h=!0,s;return n.length?1===n.length?this.$watch(n[0],function(n,r,u){i[0]=n;f[0]=r;t(i,n===r?i:f,u)}):(r(n,function(n,t){var r=u.$watch(n,function(n,r){i[t]=n;f[t]=r;o||(o=!0,u.$evalAsync(c))});e.push(r)}),function(){for(;e.length;)e.shift()()}):(s=!0,u.$evalAsync(function(){s&&t(i,i,u)}),function(){s=!1})},$watchCollection:function(n,t){function o(n){i=n;var t,h,e,o;if(!c(i)){if(s(i))if(fi(i))for(r!==l&&(r=l,f=r.length=0,u++),n=i.length,f!==n&&(u++,r.length=f=n),t=0;t<n;t++)o=r[t],e=i[t],h=o!==o&&e!==e,h||o===e||(u++,r[t]=e);else{r!==v&&(r=v={},f=0,u++);n=0;for(t in i)i.hasOwnProperty(t)&&(n++,e=i[t],o=r[t],t in r?(h=o!==o&&e!==e,h||o===e||(u++,r[t]=e)):(f++,r[t]=e,u++));if(f>n)for(t in u++,r)i.hasOwnProperty(t)||(f--,delete r[t])}else r!==i&&(r=i,u++);return u}}o.$stateful=!0;var h=this,i,r,e,p=1<t.length,u=0,w=a(n,o),l=[],v={},y=!0,f=0;return this.$watch(w,function(){if(y?(y=!1,t(i,i,h)):t(i,e,h),p)if(s(i))if(fi(i)){e=Array(i.length);for(var n=0;n<i.length;n++)e[n]=i[n]}else for(n in e={},i)wu.call(i,n)&&(e[n]=i[n]);else e=i})},$digest:function(){var r,e,o,s,d,c,nt=i,f,a=[],w,b;g("$digest");v.$$checkUrlChange();this===y&&null!==t&&(v.defer.cancel(t),it());n=null;do{for(c=!1,f=this;p.length;){try{b=p.shift();b.scope.$eval(b.expression,b.locals)}catch(rt){l(rt)}n=null}n:do{if(s=f.$$watchers)for(d=s.length;d--;)try{if(r=s[d])if((e=r.get(f))===(o=r.last)||(r.eq?ot(e,o):"number"==typeof e&&"number"==typeof o&&isNaN(e)&&isNaN(o))){if(r===n){c=!1;break n}}else c=!0,n=r,r.last=r.eq?bt(e,null):e,r.fn(e,o===tt?e:o,f),5>nt&&(w=4-nt,a[w]||(a[w]=[]),a[w].push({msg:h(r.exp)?"fn: "+(r.exp.name||r.exp.toString()):r.exp,newVal:e,oldVal:o}))}catch(ut){l(ut)}if(!(s=f.$$watchersCount&&f.$$childHead||f!==this&&f.$$nextSibling))for(;f!==this&&!(s=f.$$nextSibling);)f=f.$parent}while(f=s);if((c||p.length)&&!nt--)throw y.$$phase=null,u("infdig",i,a);}while(c||p.length);for(y.$$phase=null;k.length;)try{k.shift()()}catch(ft){l(ft)}},$destroy:function(){var n,t;if(!this.$$destroyed){n=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;this===y&&v.$$applicationDestroyed();b(this,-this.$$watchersCount);for(t in this.$$listenerCount)nt(this,this.$$listenerCount[t],t);n&&n.$$childHead==this&&(n.$$childHead=this.$$nextSibling);n&&n.$$childTail==this&&(n.$$childTail=this.$$prevSibling);this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling);this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling);this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=f;this.$on=this.$watch=this.$watchGroup=function(){return f};this.$$listeners={};this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=this.$$watchers=null}},$eval:function(n,t){return a(n)(this,t)},$evalAsync:function(n,t){y.$$phase||p.length||v.defer(function(){p.length&&y.$digest()});p.push({scope:this,expression:n,locals:t})},$$postDigest:function(n){k.push(n)},$apply:function(n){try{return g("$apply"),this.$eval(n)}catch(i){l(i)}finally{y.$$phase=null;try{y.$digest()}catch(t){throw l(t),t;}}},$applyAsync:function(n){function t(){i.$eval(n)}var i=this;n&&d.push(t);ut()},$on:function(n,t){var r=this.$$listeners[n],i,u;r||(this.$$listeners[n]=r=[]);r.push(t);i=this;do i.$$listenerCount[n]||(i.$$listenerCount[n]=0),i.$$listenerCount[n]++;while(i=i.$parent);return u=this,function(){var i=r.indexOf(t);-1!==i&&(r[i]=null,nt(u,1,n))}},$emit:function(n){var o=[],u,r=this,e=!1,t={name:n,targetScope:r,stopPropagation:function(){e=!0},preventDefault:function(){t.defaultPrevented=!0},defaultPrevented:!1},s=fr([t],arguments,1),i,f;do{for(u=r.$$listeners[n]||o,t.currentScope=r,i=0,f=u.length;i<f;i++)if(u[i])try{u[i].apply(null,s)}catch(h){l(h)}else u.splice(i,1),i--,f--;if(e)return t.currentScope=null,t;r=r.$parent}while(r);return t.currentScope=null,t},$broadcast:function(n){var t=this,i=this,u={name:n,targetScope:this,preventDefault:function(){u.defaultPrevented=!0},defaultPrevented:!1},e,r,f;if(!this.$$listenerCount[n])return u;for(e=fr([u],arguments,1);t=i;){for(u.currentScope=t,i=t.$$listeners[n]||[],r=0,f=i.length;r<f;r++)if(i[r])try{i[r].apply(null,e)}catch(o){l(o)}else i.splice(r,1),r--,f--;if(!(i=t.$$listenerCount[n]&&t.$$childHead||t!==this&&t.$$nextSibling))for(;t!==this&&!(i=t.$$nextSibling);)t=t.$parent}return u.currentScope=null,u}};var y=new w,p=y.$$asyncQueue=[],k=y.$$postDigestQueue=[],d=y.$$applyAsyncQueue=[];return y}]}function pa(){var n=/^\s*(https?|ftp|mailto|tel|file):/,t=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(t){return e(t)?(n=t,this):n};this.imgSrcSanitizationWhitelist=function(n){return e(n)?(t=n,this):t};this.$get=function(){return function(i,r){var f=r?t:n,u;return u=ri(i).href,""===u||u.match(f)?i:"unsafe:"+u}}}function wa(n){if("self"===n)return n;if(l(n)){if(-1<n.indexOf("***"))throw ui("iwcard",n);return n=eh(n).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+n+"$")}if(nr(n))return new RegExp("^"+n.source+"$");throw ui("imatcher");}function hs(n){var t=[];return e(n)&&r(n,function(n){t.push(wa(n))}),t}function ba(){this.SCE_CONTEXTS=vt;var n=["self"],t=[];this.resourceUrlWhitelist=function(t){return arguments.length&&(n=hs(t)),n};this.resourceUrlBlacklist=function(n){return arguments.length&&(t=hs(n)),t};this.$get=["$injector",function(r){function o(n,t){return"self"===n?cs(t):!!n.exec(t.href)}function f(n){var t=function(n){this.$$unwrapTrustedValue=function(){return n}};return n&&(t.prototype=new n),t.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},t.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},t}var s=function(){throw ui("unsafe");},e,u;return r.has("$sanitize")&&(s=r.get("$sanitize")),e=f(),u={},u[vt.HTML]=f(e),u[vt.CSS]=f(e),u[vt.URL]=f(e),u[vt.JS]=f(e),u[vt.RESOURCE_URL]=f(u[vt.URL]),{trustAs:function(n,t){var r=u.hasOwnProperty(n)?u[n]:null;if(!r)throw ui("icontext",n,t);if(null===t||t===i||""===t)return t;if("string"!=typeof t)throw ui("itype",n);return new r(t)},getTrusted:function(r,f){var h,e,l,c;if(null===f||f===i||""===f)return f;if(h=u.hasOwnProperty(r)?u[r]:null,h&&f instanceof h)return f.$$unwrapTrustedValue();if(r===vt.RESOURCE_URL){for(h=ri(f.toString()),c=!1,e=0,l=n.length;e<l;e++)if(o(n[e],h)){c=!0;break}if(c)for(e=0,l=t.length;e<l;e++)if(o(t[e],h)){c=!1;break}if(c)return f;throw ui("insecurl",f.toString());}if(r===vt.HTML)return s(f);throw ui("unsafe");},valueOf:function(n){return n instanceof e?n.$$unwrapTrustedValue():n}}}]}function ka(){var n=!0;this.enabled=function(t){return arguments.length&&(n=!!t),n};this.$get=["$parse","$sceDelegate",function(t,i){var u;if(n&&8>ar)throw ui("iequirks");u=ht(vt);u.isEnabled=function(){return n};u.trustAs=i.trustAs;u.getTrusted=i.getTrusted;u.valueOf=i.valueOf;n||(u.trustAs=u.getTrusted=function(n,t){return t},u.valueOf=gi);u.parseAs=function(n,i){var r=t(i);return r.literal&&r.constant?r:t(i,function(t){return u.getTrusted(n,t)})};var f=u.parseAs,e=u.getTrusted,o=u.trustAs;return r(vt,function(n,t){var i=y(t);u[or("parse_as_"+i)]=function(t){return f(n,t)};u[or("get_trusted_"+i)]=function(t){return e(n,t)};u[or("trust_as_"+i)]=function(t){return o(n,t)}}),u}]}function da(){this.$get=["$window","$document",function(n,t){var e={},o=tt((/android (\d+)/.exec(y((n.navigator||{}).userAgent))||[])[1]),a=/Boxee/i.test((n.navigator||{}).userAgent),s=t[0]||{},i,r=s.body&&s.body.style,u=!1,f=!1,h;if(r){for(h in r)if(u=/^(Moz|webkit|ms)(?=[A-Z])/.exec(h)){i=u[0];i=i.substr(0,1).toUpperCase()+i.substr(1);break}i||(i="WebkitOpacity"in r&&"webkit");u=!!("transition"in r||i+"Transition"in r);f=!!("animation"in r||i+"Animation"in r);!o||u&&f||(u=l(r.webkitTransition),f=l(r.webkitAnimation))}return{history:!(!n.history||!n.history.pushState||4>o||a),hasEvent:function(n){if("input"===n&&11>=ar)return!1;if(c(e[n])){var t=s.createElement("div");e[n]="on"+n in t}return e[n]},csp:yr(),vendorPrefix:i,transitions:u,animations:f,android:o}}]}function ga(){this.$get=["$templateCache","$http","$q",function(n,t,i){function r(u,f){r.totalPendingRequests++;var e=t.defaults&&t.defaults.transformResponse;return a(e)?e=e.filter(function(n){return n!==pf}):e===pf&&(e=null),t.get(u,{cache:n,transformResponse:e})["finally"](function(){r.totalPendingRequests--}).then(function(t){return n.put(u,t.data),t.data},function(n){if(!f)throw it("tpload",u,n.status,n.statusText);return i.reject(n)})}return r.totalPendingRequests=0,r}]}function nv(){this.$get=["$rootScope","$browser","$location",function(n,t,i){return{findBindings:function(n,t,i){n=n.getElementsByClassName("ng-binding");var u=[];return r(n,function(n){var f=ut.element(n).data("$binding");f&&r(f,function(r){i?new RegExp("(^|\\s)"+eh(t)+"(\\s|\\||$)").test(r)&&u.push(n):-1!=r.indexOf(t)&&u.push(n)})}),u},findModels:function(n,t,i){for(var f,u=["ng-","data-ng-","ng\\:"],r=0;r<u.length;++r)if(f=n.querySelectorAll("["+u[r]+"model"+(i?"=":"*=")+'"'+t+'"]'),f.length)return f},getLocation:function(){return i.url()},setLocation:function(t){t!==i.url()&&(i.url(t),n.$digest())},whenStable:function(n){t.notifyWhenNoOutstandingRequests(n)}}}]}function tv(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(n,t,i,r,u){function s(s,c,l){h(s)||(l=c,c=s,s=f);var w=ni.call(arguments,3),p=e(l)&&!l,a=(p?r:i).defer(),v=a.promise,y;return y=t.defer(function(){try{a.resolve(s.apply(null,w))}catch(t){a.reject(t);u(t)}finally{delete o[v.$$timeoutId]}p||n.$apply()},c),v.$$timeoutId=y,o[y]=a,v}var o={};return s.cancel=function(n){return n&&n.$$timeoutId in o?(o[n.$$timeoutId].reject("canceled"),delete o[n.$$timeoutId],t.defer.cancel(n.$$timeoutId)):!1},s}]}function ri(n){return ar&&(nt.setAttribute("href",n),n=nt.href),nt.setAttribute("href",n),{href:nt.href,protocol:nt.protocol?nt.protocol.replace(/:$/,""):"",host:nt.host,search:nt.search?nt.search.replace(/^\?/,""):"",hash:nt.hash?nt.hash.replace(/^#/,""):"",hostname:nt.hostname,port:nt.port,pathname:"/"===nt.pathname.charAt(0)?nt.pathname:"/"+nt.pathname}}function cs(n){return n=l(n)?ri(n):n,n.protocol===wh.protocol&&n.host===wh.host}function iv(){this.$get=yt(n)}function ls(n){function u(n){try{return decodeURIComponent(n)}catch(t){return n}}var f=n[0]||{},t={},r="";return function(){var n,e,o,s,h;if(n=f.cookie||"",n!==r)for(r=n,n=r.split("; "),t={},o=0;o<n.length;o++)e=n[o],s=e.indexOf("="),0<s&&(h=u(e.substring(0,s)),t[h]===i&&(t[h]=u(e.substring(s+1))));return t}}function rv(){this.$get=ls}function as(n){function t(i,u){if(s(i)){var f={};return r(i,function(n,i){f[i]=t(i,n)}),f}return n.factory(i+"Filter",u)}this.register=t;this.$get=["$injector",function(n){return function(t){return n.get(t+"Filter")}}];t("currency",vs);t("date",ks);t("filter",uv);t("json",ev);t("limitTo",ov);t("lowercase",kh);t("number",ys);t("orderBy",ds);t("uppercase",dh)}function uv(){return function(n,t,i){if(!fi(n)){if(null==n)return n;throw v("filter")("notarray",n);}var r;switch(ne(t)){case"function":break;case"boolean":case"null":case"number":case"string":r=!0;case"object":t=fv(t,i,r);break;default:return n}return Array.prototype.filter.call(n,t)}}function fv(n,t,i){var r=s(n)&&"$"in n;return!0===t?t=ot:h(t)||(t=function(n,t){if(c(n))return!1;if(null===n||null===t)return n===t;var i;return((i=s(t))||!(i=s(n))||(i=n,i=!(h(i.toString)&&i.toString!==Object.prototype.toString)),i)?!1:(n=y(""+n),t=y(""+t),-1!==n.indexOf(t))}),function(u){return r&&!s(u)?hi(u,n.$,t,!1):hi(u,n,t,i)}}function hi(n,t,i,r,u){var e=ne(n),o=ne(t),f;if("string"===o&&"!"===t.charAt(0))return!hi(n,t.substring(1),i,r);if(a(n))return n.some(function(n){return hi(n,t,i,r)});switch(e){case"object":if(r){for(f in n)if("$"!==f.charAt(0)&&hi(n[f],t,i,!0))return!0;return u?!1:hi(n,t,i,!1)}if("object"===o){for(f in t)if(u=t[f],!h(u)&&!c(u)&&(e="$"===f,!hi(e?n:n[f],u,i,e,e)))return!1;return!0}return i(n,t);case"function":return!1;default:return i(n,t)}}function ne(n){return null===n?"null":typeof n}function vs(n){var t=n.NUMBER_FORMATS;return function(n,i,r){return c(i)&&(i=t.CURRENCY_SYM),c(r)&&(r=t.PATTERNS[1].maxFrac),null==n?n:ps(n,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,r).replace(/\u00A4/g,i)}}function ys(n){var t=n.NUMBER_FORMATS;return function(n,i){return null==n?n:ps(n,t.PATTERNS[0],t.GROUP_SEP,t.DECIMAL_SEP,i)}}function ps(n,t,i,r,u){var a,f,l;if(s(n)||(a=0>n,n=Math.abs(n),f=Infinity===n,!f&&!isFinite(n)))return"";var o=n+"",h="",e=!1,y=[];if(f&&(h="∞"),f||-1===o.indexOf("e")||(l=o.match(/([\d\.]+)e(-?)(\d+)/),l&&"-"==l[2]&&l[3]>u+1?n=0:(h=o,e=!0)),f||e)0<u&&1>n&&(h=n.toFixed(u),n=parseFloat(h));else{f=(o.split(bh)[1]||"").length;c(u)&&(u=Math.min(Math.max(t.minFrac,f),t.maxFrac));n=+(Math.round(+(n.toString()+"e"+u)).toString()+"e"+-u);var f=(""+n).split(bh),o=f[0],f=f[1]||"",l=0,v=t.lgSize,p=t.gSize;if(o.length>=v+p)for(l=o.length-v,e=0;e<l;e++)0==(l-e)%p&&0!==e&&(h+=i),h+=o.charAt(e);for(e=l;e<o.length;e++)0==(o.length-e)%v&&0!==e&&(h+=i),h+=o.charAt(e);for(;f.length<u;)f+="0";u&&"0"!==u&&(h+=r+f.substr(0,u))}return 0===n&&(a=!1),y.push(a?t.negPre:t.posPre,h,a?t.negSuf:t.posSuf),y.join("")}function vu(n,t,i){var r="";for(0>n&&(r="-",n=-n),n=""+n;n.length<t;)n="0"+n;return i&&(n=n.substr(n.length-t)),r+n}function g(n,t,i,r){return i=i||0,function(u){return u=u["get"+n](),(0<i||u>-i)&&(u+=i),0===u&&-12==i&&(u=12),vu(u,t,r)}}function yu(n,t){return function(i,r){var u=i["get"+n](),f=bu(t?"SHORT"+n:n);return r[f][u]}}function ws(n){var t=new Date(n,0,1).getDay();return new Date(n,0,(4>=t?5:12)-t)}function bs(n){return function(t){var i=ws(t.getFullYear());return t=+new Date(t.getFullYear(),t.getMonth(),t.getDate()+(4-t.getDay()))-+i,t=1+Math.round(t/6048e5),vu(t,n)}}function te(n,t){return 0>=n.getFullYear()?t.ERAS[0]:t.ERAS[1]}function ks(n){function t(n){var t;if(t=n.match(i)){n=new Date(0);var r=0,u=0,f=t[8]?n.setUTCFullYear:n.setFullYear,e=t[8]?n.setUTCHours:n.setHours;t[9]&&(r=tt(t[9]+t[10]),u=tt(t[9]+t[11]));f.call(n,tt(t[1]),tt(t[2])-1,tt(t[3]));r=tt(t[4]||0)-r;u=tt(t[5]||0)-u;f=tt(t[6]||0);t=Math.round(1e3*parseFloat("0."+(t[7]||0)));e.call(n,r,u,f,t)}return n}var i=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(i,u,f){var h="",e=[],o,c,s;if(u=u||"mediumDate",u=n.DATETIME_FORMATS[u]||u,l(i)&&(i=ky.test(i)?tt(i):t(i)),k(i)&&(i=new Date(i)),!et(i)||!isFinite(i.getTime()))return i;for(;u;)(c=by.exec(u))?(e=fr(e,c,1),u=e.pop()):(e.push(u),u=null);return s=i.getTimezoneOffset(),f&&(s=ke(f,i.getTimezoneOffset()),i=sf(i,f,!0)),r(e,function(t){o=wy[t];h+=o?o(i,n.DATETIME_FORMATS,s):t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),h}}function ev(){return function(n,t){return c(t)&&(t=2),er(n,t)}}function ov(){return function(n,t,i){return(t=Infinity===Math.abs(Number(t))?Number(t):tt(t),isNaN(t))?n:(k(n)&&(n=n.toString()),!a(n)&&!l(n))?n:(i=!i||isNaN(i)?0:tt(i),i=0>i&&i>=-n.length?n.length+i:i,0<=t?n.slice(i,i+t):0===i?n.slice(t,n.length):n.slice(Math.max(0,i+t),i))}}function ds(n){return function(t,i,r){function u(n,t){return t?function(t,i){return n(i,t)}:n}function e(n){switch(typeof n){case"number":case"boolean":case"string":return!0;default:return!1}}function o(n){return null===n?"null":"function"==typeof n.valueOf&&(n=n.valueOf(),e(n))||"function"==typeof n.toString&&(n=n.toString(),e(n))?n:""}function f(n,t){var i=typeof n,r=typeof t;return i===r&&"object"===i&&(n=o(n),t=o(t)),i===r?("string"===i&&(n=n.toLowerCase(),t=t.toLowerCase()),n===t?0:n<t?-1:1):i<r?-1:1}return fi(t)?(i=a(i)?i:[i],0===i.length&&(i=["+"]),i=i.map(function(t){var r=!1,i=t||gi,e;if(l(t)){if(("+"==t.charAt(0)||"-"==t.charAt(0))&&(r="-"==t.charAt(0),t=t.substring(1)),""===t)return u(f,r);if(i=n(t),i.constant)return e=i(),u(function(n,t){return f(n[e],t[e])},r)}return u(function(n,t){return f(i(n),i(t))},r)}),ni.call(t).sort(u(function(n,t){for(var u,r=0;r<i.length;r++)if(u=i[r](n,t),0!==u)return u;return 0},r))):t}}function ci(n){return h(n)&&(n={link:n}),n.restrict=n.restrict||"AC",yt(n)}function gs(n,t,u,f,e){var o=this,s=[],h=o.$$parentForm=n.parent().controller("form")||dr;o.$error={};o.$$success={};o.$pending=i;o.$name=e(t.name||t.ngForm||"")(u);o.$dirty=!1;o.$pristine=!0;o.$valid=!0;o.$invalid=!1;o.$submitted=!1;h.$addControl(o);o.$rollbackViewValue=function(){r(s,function(n){n.$rollbackViewValue()})};o.$commitViewValue=function(){r(s,function(n){n.$commitViewValue()})};o.$addControl=function(n){wi(n.$name,"input");s.push(n);n.$name&&(o[n.$name]=n)};o.$$renameControl=function(n,t){var i=n.$name;o[i]===n&&delete o[i];o[t]=n;n.$name=t};o.$removeControl=function(n){n.$name&&o[n.$name]===n&&delete o[n.$name];r(o.$pending,function(t,i){o.$setValidity(i,null,n)});r(o.$error,function(t,i){o.$setValidity(i,null,n)});r(o.$$success,function(t,i){o.$setValidity(i,null,n)});ur(s,n)};ih({ctrl:this,$element:n,set:function(n,t,i){var r=n[t];r?-1===r.indexOf(i)&&r.push(i):n[t]=[i]},unset:function(n,t,i){var r=n[t];r&&(ur(r,i),0===r.length&&delete n[t])},parentForm:h,$animate:f});o.$setDirty=function(){f.removeClass(n,di);f.addClass(n,uf);o.$dirty=!0;o.$pristine=!1;h.$setDirty()};o.$setPristine=function(){f.setClass(n,di,uf+" ng-submitted");o.$dirty=!1;o.$pristine=!0;o.$submitted=!1;r(s,function(n){n.$setPristine()})};o.$setUntouched=function(){r(s,function(n){n.$setUntouched()})};o.$setSubmitted=function(){f.addClass(n,"ng-submitted");o.$submitted=!0;h.$setSubmitted()}}function ie(n){n.$formatters.push(function(t){return n.$isEmpty(t)?t:t.toString()})}function cr(n,t,i,r,u,f){var c=y(t[0].type),s,o,e,h;if(!u.android){s=!1;t.on("compositionstart",function(){s=!0});t.on("compositionend",function(){s=!1;o()})}if(o=function(n){if(e&&(f.defer.cancel(e),e=null),!s){var u=t.val();n=n&&n.type;"password"===c||i.ngTrim&&"false"===i.ngTrim||(u=w(u));(r.$viewValue!==u||""===u&&r.$$hasNativeValidators)&&r.$setViewValue(u,n)}},u.hasEvent("input"))t.on("input",o);else{h=function(n,t,i){e||(e=f.defer(function(){e=null;t&&t.value===i||o(n)}))};t.on("keydown",function(n){var t=n.keyCode;91===t||15<t&&19>t||37<=t&&40>=t||h(n,this,this.value)});if(u.hasEvent("paste"))t.on("paste cut",h)}t.on("change",o);r.$render=function(){t.val(r.$isEmpty(r.$viewValue)?"":r.$viewValue)}}function pu(n,t){return function(i,u){var e,f;if(et(i))return i;if(l(i)){if('"'==i.charAt(0)&&'"'==i.charAt(i.length-1)&&(i=i.substring(1,i.length-1)),np.test(i))return new Date(i);if(n.lastIndex=0,e=n.exec(i))return e.shift(),f=u?{yyyy:u.getFullYear(),MM:u.getMonth()+1,dd:u.getDate(),HH:u.getHours(),mm:u.getMinutes(),ss:u.getSeconds(),sss:u.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},r(e,function(n,i){i<t.length&&(f[t[i]]=+n)}),new Date(f.yyyy,f.MM-1,f.dd,f.HH,f.mm,f.ss||0,1e3*f.sss||0)}return NaN}}function lr(n,t,r,u){return function(f,o,s,h,l,a,v){function w(n){return n&&!(n.getTime&&n.getTime()!==n.getTime())}function d(n){return e(n)?et(n)?n:r(n):i}var y,p,b,k;nh(f,o,s,h);cr(f,o,s,h,l,a);y=h&&h.$options&&h.$options.timezone;h.$$parserName=n;h.$parsers.push(function(n){return h.$isEmpty(n)?null:t.test(n)?(n=r(n,p),y&&(n=sf(n,y)),n):i});h.$formatters.push(function(n){if(n&&!et(n))throw ff("datefmt",n);return w(n)?((p=n)&&y&&(p=sf(p,y,!0)),v("date")(n,u,y)):(p=null,"")});(e(s.min)||s.ngMin)&&(h.$validators.min=function(n){return!w(n)||c(b)||r(n)>=b},s.$observe("min",function(n){b=d(n);h.$validate()}));(e(s.max)||s.ngMax)&&(h.$validators.max=function(n){return!w(n)||c(k)||r(n)<=k},s.$observe("max",function(n){k=d(n);h.$validate()}))}}function nh(n,t,r,u){(u.$$hasNativeValidators=s(t[0].validity))&&u.$parsers.push(function(n){var r=t.prop("validity")||{};return r.badInput&&!r.typeMismatch?i:n})}function th(n,t,i,r,u){if(e(r)){if(n=n(r),!n.constant)throw v("ngModel")("constexpr",i,r);return n(t)}return u}function re(n,t){return n="ngClass"+n,["$animate",function(i){function f(n,t){var f=[],r=0,u,i;n:for(;r<n.length;r++){for(u=n[r],i=0;i<t.length;i++)if(u==t[i])continue n;f.push(u)}return f}function u(n){var t=[];return a(n)?(r(n,function(n){t=t.concat(u(n))}),t):l(n)?n.split(" "):s(n)?(r(n,function(n,i){n&&(t=t.concat(i.split(" ")))}),t):n}return{restrict:"AC",link:function(e,o,s){function h(n,t){var i=o.data("$classCounts")||rt(),u=[];return r(n,function(n){(0<t||i[n])&&(i[n]=(i[n]||0)+t,i[n]===+(0<t)&&u.push(n))}),o.data("$classCounts",i),u.join(" ")}function l(n){var r,l;if(!0===t||e.$index%2===t)if(r=u(n||[]),c){if(!ot(n,c)){var a=u(c),l=f(r,a),r=f(a,r),l=h(l,1),r=h(r,-1);l&&l.length&&i.addClass(o,l);r&&r.length&&i.removeClass(o,r)}}else l=h(r,1),s.$addClass(l);c=ht(n)}var c;e.$watch(s[n],l,!0);s.$observe("class",function(){l(e.$eval(s[n]))});"ngClass"!==n&&e.$watch("$index",function(i,r){var f=i&1,o;f!==(r&1)&&(o=u(e.$eval(s[n])),f===t?(f=h(o,1),s.$addClass(f)):(f=h(o,-1),s.$removeClass(f)))})}}}]}function ih(n){function f(n,t){t&&!r[n]?(h.addClass(o,n),r[n]=!0):!t&&r[n]&&(h.removeClass(o,n),r[n]=!1)}function e(n,t){n=n?"-"+to(n,"-"):"";f(gr+n,!0===t);f(sc+n,!1===t)}var t=n.ctrl,o=n.$element,r={},s=n.set,u=n.unset,c=n.parentForm,h=n.$animate;r[sc]=!(r[gr]=o.hasClass(gr));t.$setValidity=function(n,r,o){r===i?(t.$pending||(t.$pending={}),s(t.$pending,n,o)):(t.$pending&&u(t.$pending,n,o),rh(t.$pending)&&(t.$pending=i));rr(r)?r?(u(t.$error,n,o),s(t.$$success,n,o)):(s(t.$error,n,o),u(t.$$success,n,o)):(u(t.$error,n,o),u(t.$$success,n,o));t.$pending?(f(hc,!0),t.$valid=t.$invalid=i,e("",null)):(f(hc,!1),t.$valid=rh(t.$error),t.$invalid=!t.$valid,e("",t.$valid));r=t.$pending&&t.$pending[n]?i:t.$error[n]?!1:t.$$success[n]?!0:null;e(n,r);c.$setValidity(n,r,t)}}function rh(n){if(n)for(var t in n)return!1;return!0}var sv=/^\/(.+)\/([a-z]*)$/,y=function(n){return l(n)?n.toLowerCase():n},wu=Object.prototype.hasOwnProperty,bu=function(n){return l(n)?n.toUpperCase():n},ar,o,st,ni=[].slice,hv=[].splice,cv=[].push,ti=Object.prototype.toString,uh=Object.getPrototypeOf,li=v("ng"),ut=n.angular||(n.angular={}),vr,ku=0,wr,sh,ai,br,oe,se,ph,tf,u,rf,kh,dh,gh,kr,dr;ar=t.documentMode;f.$inject=[];gi.$inject=[];var a=Array.isArray,fh=/^\[object (Uint8(Clamped)?)|(Uint16)|(Uint32)|(Int8)|(Int16)|(Int32)|(Float(32)|(64))Array\]$/,w=function(n){return l(n)?n.trim():n},eh=function(n){return n.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},yr=function(){if(e(yr.isActive_))return yr.isActive_;var n=!(!t.querySelector("[ng-csp]")&&!t.querySelector("[data-ng-csp]"));if(!n)try{new Function("")}catch(i){n=!0}return yr.isActive_=n},du=function(){if(e(du.name_))return du.name_;for(var r,f=ki.length,i,u,n=0;n<f;++n)if(i=ki[n],r=t.querySelector("["+i.replace(":","\\:")+"jq]")){u=r.getAttribute(i+"jq");break}return du.name_=u},ki=["ng-","data-ng-","ng:","x-ng-"],lv=/[A-Z]/g,oh=!1,ue,pt=1,pr=3,av={full:"1.4.0",major:1,minor:4,dot:0,codeName:"jaracimrman-existence"};b.expando="ng339";wr=b.cache={};sh=1;b._data=function(n){return this.cache[n[this.expando]]||{}};var vv=/([\:\-\_]+(.))/g,yv=/^moz([A-Z])/,pv={mouseleave:"mouseout",mouseenter:"mouseover"},fe=v("jqLite"),wv=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,ee=/<|&#?\w+;/,bv=/<([\w:]+)/,kv=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,at={option:[1,'<select multiple="multiple">',"<\/select>"],thead:[1,"<table>","<\/table>"],col:[2,"<table><colgroup>","<\/colgroup><\/table>"],tr:[2,"<table><tbody>","<\/tbody><\/table>"],td:[3,"<table><tbody><tr>","<\/tr><\/tbody><\/table>"],_default:[0,"",""]};at.optgroup=at.option;at.tbody=at.tfoot=at.colgroup=at.caption=at.thead;at.th=at.td;ai=b.prototype={ready:function(i){function r(){u||(u=!0,i())}var u=!1;"complete"===t.readyState?setTimeout(r):(this.on("DOMContentLoaded",r),b(n).on("load",r))},toString:function(){var n=[];return r(this,function(t){n.push(""+t)}),"["+n.join(", ")+"]"},eq:function(n){return 0<=n?o(this[n]):o(this[this.length+n])},length:0,push:cv,sort:[].sort,splice:[].splice};br={};r("multiple selected checked disabled readOnly required open".split(" "),function(n){br[y(n)]=n});oe={};r("input select option textarea button form details".split(" "),function(n){oe[n]=!0});se={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};r({data:af,removeData:ru},function(n,t){b[t]=n});r({data:af,inheritedData:su,scope:function(n){return o.data(n,"$scope")||su(n.parentNode||n,["$isolateScope","$scope"])},isolateScope:function(n){return o.data(n,"$isolateScope")||o.data(n,"$isolateScopeNoTemplate")},controller:oo,injector:function(n){return su(n,"$injector")},removeAttr:function(n,t){n.removeAttribute(t)},hasClass:fu,css:function(n,t,i){if(t=or(t),e(i))n.style[t]=i;else return n.style[t]},attr:function(n,t,r){var u=n.nodeType;if(u!==pr&&2!==u&&8!==u)if(u=y(t),br[u])if(e(r))r?(n[t]=!0,n.setAttribute(t,u)):(n[t]=!1,n.removeAttribute(u));else return n[t]||(n.attributes.getNamedItem(t)||f).specified?u:i;else if(e(r))n.setAttribute(t,r);else if(n.getAttribute)return n=n.getAttribute(t,2),null===n?i:n},prop:function(n,t,i){if(e(i))n[t]=i;else return n[t]},text:function(){function n(n,t){if(c(t)){var i=n.nodeType;return i===pt||i===pr?n.textContent:""}n.textContent=t}return n.$dv="",n}(),val:function(n,t){if(c(t)){if(n.multiple&&"select"===wt(n)){var i=[];return r(n.options,function(n){n.selected&&i.push(n.value||n.text)}),0===i.length?null:i}return n.value}n.value=t},html:function(n,t){if(c(t))return n.innerHTML;iu(n,!0);n.innerHTML=t},empty:so},function(n,t){b.prototype[t]=function(t,r){var u,f,e=this.length,o;if(n!==so&&(2==n.length&&n!==fu&&n!==oo?t:r)===i){if(s(t)){for(u=0;u<e;u++)if(n===af)n(this[u],t);else for(f in t)n(this[u],f,t[f]);return this}for(u=n.$dv,e=u===i?Math.min(e,1):e,f=0;f<e;f++)o=n(this[f],t,r),u=u?u+o:o;return u}for(u=0;u<e;u++)n(this[u],t,r);return this}});r({removeData:ru,on:function dv(n,t,i,r){var f,u,s,o;if(e(r))throw fe("onargs");if(ro(n))for(u=uu(n,!0),r=u.events,f=u.handle,f||(f=u.handle=el(n,r)),u=0<=t.indexOf(" ")?t.split(" "):[t],s=u.length;s--;)t=u[s],o=r[t],o||(r[t]=[],"mouseenter"===t||"mouseleave"===t?dv(n,pv[t],function(n){var i=n.relatedTarget;i&&(i===this||this.contains(i))||f(n,t)}):"$destroy"!==t&&n.addEventListener(t,f,!1),o=r[t]),o.push(i)},off:fo,one:function(n,t,i){n=o(n);n.on(t,function r(){n.off(t,i);n.off(t,r)});n.on(t,i)},replaceWith:function(n,t){var i,u=n.parentNode;iu(n);r(new b(t),function(t){i?u.insertBefore(t,i.nextSibling):u.replaceChild(t,n);i=t})},children:function(n){var t=[];return r(n.childNodes,function(n){n.nodeType===pt&&t.push(n)}),t},contents:function(n){return n.contentDocument||n.childNodes||[]},append:function(n,t){var i=n.nodeType,r;if(i===pt||11===i)for(t=new b(t),i=0,r=t.length;i<r;i++)n.appendChild(t[i])},prepend:function(n,t){if(n.nodeType===pt){var i=n.firstChild;r(new b(t),function(t){n.insertBefore(t,i)})}},wrap:function(n,t){t=o(t).eq(0).clone()[0];var i=n.parentNode;i&&i.replaceChild(t,n);t.appendChild(n)},remove:vf,detach:function(n){vf(n,!0)},after:function(n,t){var u=n,e=n.parentNode,i,f,r;for(t=new b(t),i=0,f=t.length;i<f;i++)r=t[i],e.insertBefore(r,u.nextSibling),u=r},addClass:ou,removeClass:eu,toggleClass:function(n,t,i){t&&r(t.split(" "),function(t){var r=i;c(r)&&(r=!fu(n,t));(r?ou:eu)(n,t)})},parent:function(n){return(n=n.parentNode)&&11!==n.nodeType?n:null},next:function(n){return n.nextElementSibling},find:function(n,t){return n.getElementsByTagName?n.getElementsByTagName(t):[]},clone:lf,triggerHandler:function(n,t,i){var u,o,s=t.type||t,e=uu(n);(e=(e=e&&e.events)&&e[s])&&(u={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:f,type:s,target:n},t.type&&(u=p(u,t)),t=ht(e),o=i?[u].concat(i):[u],r(t,function(t){u.isImmediatePropagationStopped()||t.apply(n,o)}))}},function(n,t){b.prototype[t]=function(t,i,r){for(var u,f=0,s=this.length;f<s;f++)c(u)?(u=n(this[f],t,i,r),e(u)&&(u=o(u))):eo(u,n(this[f],t,i,r));return e(u)?u:this};b.prototype.bind=b.prototype.on;b.prototype.unbind=b.prototype.off});bi.prototype={put:function(n,t){this[ei(n,this.nextUid)]=t},get:function(n){return this[ei(n,this.nextUid)]},remove:function(n){var t=this[n=ei(n,this.nextUid)];return delete this[n],t}};var gv=[function(){this.$get=[function(){return bi}]}],hh=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,ny=/,/,ty=/^\s*(_?)(\S+?)\1\s*$/,ch=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,vi=v("$injector");sr.$$annotate=function(n,t,i){var u;if("function"==typeof n){if(!(u=n.$inject)){if(u=[],n.length){if(t)throw l(i)&&i||(i=n.name||sl(n)),vi("strictdi",i);t=n.toString().replace(ch,"");t=t.match(hh);r(t[1].split(ny),function(n){n.replace(ty,function(n,t,i){u.push(i)})})}n.$inject=u}}else a(n)?(t=n.length-1,pi(n[t],"fn"),u=n.slice(0,t)):pi(n,"fn",!0);return u};var lh=v("$animate"),iy=function(){this.$get=["$q","$$rAF",function(n,t){function i(){}return i.all=f,i.chain=f,i.prototype={end:f,cancel:f,resume:f,pause:f,complete:f,then:function(i,r){return n(function(n){t(function(){n()})}).then(i,r)}},i}]},ry=function(){var n=new bi,t=[];this.$get=["$$AnimateRunner","$rootScope",function(i,u){function e(i,f,e){var o=n.get(i);o||(n.put(i,o={}),t.push(i));f&&r(f.split(" "),function(n){n&&(o[n]=!0)});e&&r(e.split(" "),function(n){n&&(o[n]=!1)});1<t.length||u.$$postDigest(function(){r(t,function(t){var f=n.get(t);if(f){var e=cl(t.attr("class")),i="",u="";r(f,function(n,t){n!==!!e[t]&&(n?i+=(i.length?" ":"")+t:u+=(u.length?" ":"")+t)});r(t,function(n){i&&ou(n,i);u&&eu(n,u)});n.remove(t)}});t.length=0})}return{enabled:f,on:f,off:f,pin:f,push:function(n,t,r,u){return u&&u(),r=r||{},r.from&&n.css(r.from),r.to&&n.css(r.to),(r.addClass||r.removeClass)&&e(n,r.addClass,r.removeClass),new i}}}]},uy=["$provide",function(n){var t=this;this.$$registeredAnimations=Object.create(null);this.register=function(i,r){if(i&&"."!==i.charAt(0))throw lh("notcsel",i);var u=i+"-animation";t.$$registeredAnimations[i.substr(1)]=u;n.factory(u,r)};this.classNameFilter=function(n){if(1===arguments.length&&(this.$$classNameFilter=n instanceof RegExp?n:null)&&/(\s+|\/)ng-animate(\s+|\/)/.test(this.$$classNameFilter.toString()))throw lh("nongcls","ng-animate");return this.$$classNameFilter};this.$get=["$$animateQueue",function(n){function t(n,t,i){var r,u;if(i){n:{for(r=0;r<i.length;r++)if(u=i[r],1===u.nodeType){r=u;break n}r=void 0}!r||r.parentNode||r.previousElementSibling||(i=null)}i?i.after(n):t.prepend(n)}return{on:n.on,off:n.off,pin:n.pin,enabled:n.enabled,cancel:function(n){n.end&&n.end()},enter:function(i,r,u,f){return r=r&&o(r),u=u&&o(u),r=r||u.parent(),t(i,r,u),n.push(i,"enter",oi(f))},move:function(i,r,u,f){return r=r&&o(r),u=u&&o(u),r=r||u.parent(),t(i,r,u),n.push(i,"move",oi(f))},leave:function(t,i){return n.push(t,"leave",oi(i),function(){t.remove()})},addClass:function(t,i,r){return r=oi(r),r.addClass=hr(r.addclass,i),n.push(t,"addClass",r)},removeClass:function(t,i,r){return r=oi(r),r.removeClass=hr(r.removeClass,i),n.push(t,"removeClass",r)},setClass:function(t,i,r,u){return u=oi(u),u.addClass=hr(u.addClass,i),u.removeClass=hr(u.removeClass,r),n.push(t,"setClass",u)},animate:function(t,i,r,u,f){return f=oi(f),f.from=f.from?p(f.from,i):i,f.to=f.to?p(f.to,r):r,f.tempClasses=hr(f.tempClasses,u||"ng-inline-animate"),n.push(t,"animate",f)}}}]}],it=v("$compile");co.$inject=["$provide","$$sanitizeUriProvider"];var ah=/^((?:x|data)[\:\-_])/i,fy=v("$controller"),vh=/^(\S+)(\s+as\s+(\w+))?$/,yh="application/json",he={"Content-Type":yh+";charset=utf-8"},ey=/^\[|^\{(?!\{)/,oy={"[":/]$/,"{":/}$/},sy=/^\)\]\}',?\n/,yi=ut.$interpolateMinErr=v("$interpolate");yi.throwNoconcat=function(n){throw yi("noconcat",n);};yi.interr=function(n,t){return yi("interr",n,t.toString())};var hy=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,cy={http:80,https:443,ftp:21},gu=v("$location"),ly={$$html5:!1,$$replace:!1,absUrl:cu("$$absUrl"),url:function(n){if(c(n))return this.$$url;var t=hy.exec(n);return(t[1]||""===n)&&this.path(decodeURIComponent(t[1])),(t[2]||t[1]||""===n)&&this.search(t[3]||""),this.hash(t[5]||""),this},protocol:cu("$$protocol"),host:cu("$$host"),port:cu("$$port"),path:go("$$path",function(n){return n=null!==n?n.toString():"","/"==n.charAt(0)?n:"/"+n}),search:function(n,t){switch(arguments.length){case 0:return this.$$search;case 1:if(l(n)||k(n))n=n.toString(),this.$$search=ge(n);else if(s(n))n=bt(n,{}),r(n,function(t,i){null==t&&delete n[i]}),this.$$search=n;else throw gu("isrcharg");break;default:c(t)||null===t?delete this.$$search[n]:this.$$search[n]=t}return this.$$compose(),this},hash:go("$$hash",function(n){return null!==n?n.toString():""}),replace:function(){return this.$$replace=!0,this}};r([ko,df,kf],function(n){n.prototype=Object.create(ly);n.prototype.state=function(t){if(!arguments.length)return this.$$state;if(n!==kf||!this.$$html5)throw gu("nostate");return this.$$state=c(t)?null:t,this}});var ft=v("$parse"),ay=Function.prototype.call,vy=Function.prototype.apply,yy=Function.prototype.bind,nf=rt();r("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(n){nf[n]=!0});ph={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'};tf=function(n){this.options=n};tf.prototype={constructor:tf,lex:function(n){for(this.text=n,this.index=0,this.tokens=[];this.index<this.text.length;)if(n=this.text.charAt(this.index),'"'===n||"'"===n)this.readString(n);else if(this.isNumber(n)||"."===n&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(n))this.readIdent();else if(this.is(n,"(){}[].,;:?"))this.tokens.push({index:this.index,text:n}),this.index++;else if(this.isWhitespace(n))this.index++;else{var t=n+this.peek(),i=t+this.peek(2),r=nf[t],u=nf[i];nf[n]||r||u?(n=u?i:r?t:n,this.tokens.push({index:this.index,text:n,operator:!0}),this.index+=n.length):this.throwError("Unexpected next character ",this.index,this.index+1)}return this.tokens},is:function(n,t){return-1!==t.indexOf(n)},peek:function(n){return n=n||1,this.index+n<this.text.length?this.text.charAt(this.index+n):!1},isNumber:function(n){return"0"<=n&&"9">=n&&"string"==typeof n},isWhitespace:function(n){return" "===n||"\r"===n||"\t"===n||"\n"===n||"\v"===n||" "===n},isIdent:function(n){return"a"<=n&&"z">=n||"A"<=n&&"Z">=n||"_"===n||"$"===n},isExpOperator:function(n){return"-"===n||"+"===n||this.isNumber(n)},throwError:function(n,t,i){i=i||this.index;t=e(t)?"s "+t+"-"+this.index+" ["+this.text.substring(t,i)+"]":" "+i;throw ft("lexerr",n,t,this.text);},readNumber:function(){for(var t,i,n="",r=this.index;this.index<this.text.length;){if(t=y(this.text.charAt(this.index)),"."==t||this.isNumber(t))n+=t;else if(i=this.peek(),"e"==t&&this.isExpOperator(i))n+=t;else if(this.isExpOperator(t)&&i&&this.isNumber(i)&&"e"==n.charAt(n.length-1))n+=t;else if(!this.isExpOperator(t)||i&&this.isNumber(i)||"e"!=n.charAt(n.length-1))break;else this.throwError("Invalid exponent");this.index++}this.tokens.push({index:r,text:n,constant:!0,value:Number(n)})},readIdent:function(){for(var t,n=this.index;this.index<this.text.length;){if(t=this.text.charAt(this.index),!this.isIdent(t)&&!this.isNumber(t))break;this.index++}this.tokens.push({index:n,text:this.text.slice(n,this.index),identifier:!0})},readString:function(n){var f=this.index,t,u;this.index++;for(var r="",u=n,i=!1;this.index<this.text.length;){if(t=this.text.charAt(this.index),u=u+t,i)"u"===t?(i=this.text.substring(this.index+1,this.index+5),i.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+i+"]"),this.index+=4,r+=String.fromCharCode(parseInt(i,16))):r+=ph[t]||t,i=!1;else if("\\"===t)i=!0;else{if(t===n){this.index++;this.tokens.push({index:f,text:u,constant:!0,value:r});return}r+=t}this.index++}this.throwError("Unterminated quote",f)}};u=function(n,t){this.lexer=n;this.options=t};u.Program="Program";u.ExpressionStatement="ExpressionStatement";u.AssignmentExpression="AssignmentExpression";u.ConditionalExpression="ConditionalExpression";u.LogicalExpression="LogicalExpression";u.BinaryExpression="BinaryExpression";u.UnaryExpression="UnaryExpression";u.CallExpression="CallExpression";u.MemberExpression="MemberExpression";u.Identifier="Identifier";u.Literal="Literal";u.ArrayExpression="ArrayExpression";u.Property="Property";u.ObjectExpression="ObjectExpression";u.ThisExpression="ThisExpression";u.NGValueParameter="NGValueParameter";u.prototype={ast:function(n){return this.text=n,this.tokens=this.lexer.lex(n),n=this.program(),0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),n},program:function(){for(var n=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&n.push(this.expressionStatement()),!this.expect(";"))return{type:u.Program,body:n}},expressionStatement:function(){return{type:u.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var n=this.expression();this.expect("|");)n=this.filter(n);return n},expression:function(){return this.assignment()},assignment:function(){var n=this.ternary();return this.expect("=")&&(n={type:u.AssignmentExpression,left:n,right:this.assignment(),operator:"="}),n},ternary:function(){var n=this.logicalOR(),t,i;return this.expect("?")&&(t=this.expression(),this.consume(":"))?(i=this.expression(),{type:u.ConditionalExpression,test:n,alternate:t,consequent:i}):n},logicalOR:function(){for(var n=this.logicalAND();this.expect("||");)n={type:u.LogicalExpression,operator:"||",left:n,right:this.logicalAND()};return n},logicalAND:function(){for(var n=this.equality();this.expect("&&");)n={type:u.LogicalExpression,operator:"&&",left:n,right:this.equality()};return n},equality:function(){for(var n=this.relational(),t;t=this.expect("==","!=","===","!==");)n={type:u.BinaryExpression,operator:t.text,left:n,right:this.relational()};return n},relational:function(){for(var n=this.additive(),t;t=this.expect("<",">","<=",">=");)n={type:u.BinaryExpression,operator:t.text,left:n,right:this.additive()};return n},additive:function(){for(var n=this.multiplicative(),t;t=this.expect("+","-");)n={type:u.BinaryExpression,operator:t.text,left:n,right:this.multiplicative()};return n},multiplicative:function(){for(var n=this.unary(),t;t=this.expect("*","/","%");)n={type:u.BinaryExpression,operator:t.text,left:n,right:this.unary()};return n},unary:function(){var n;return(n=this.expect("+","-","!"))?{type:u.UnaryExpression,operator:n.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var n,t;for(this.expect("(")?(n=this.filterChain(),this.consume(")")):this.expect("[")?n=this.arrayDeclaration():this.expect("{")?n=this.object():this.constants.hasOwnProperty(this.peek().text)?n=bt(this.constants[this.consume().text]):this.peek().identifier?n=this.identifier():this.peek().constant?n=this.constant():this.throwError("not a primary expression",this.peek());t=this.expect("(","[",".");)"("===t.text?(n={type:u.CallExpression,callee:n,arguments:this.parseArguments()},this.consume(")")):"["===t.text?(n={type:u.MemberExpression,object:n,property:this.expression(),computed:!0},this.consume("]")):"."===t.text?n={type:u.MemberExpression,object:n,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return n},filter:function(n){n=[n];for(var t={type:u.CallExpression,callee:this.identifier(),arguments:n,filter:!0};this.expect(":");)n.push(this.expression());return t},parseArguments:function(){var n=[];if(")"!==this.peekToken().text)do n.push(this.expression());while(this.expect(","));return n},identifier:function(){var n=this.consume();return n.identifier||this.throwError("is not a valid identifier",n),{type:u.Identifier,name:n.text}},constant:function(){return{type:u.Literal,value:this.consume().value}},arrayDeclaration:function(){var n=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;n.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:u.ArrayExpression,elements:n}},object:function(){var t=[],n;if("}"!==this.peekToken().text)do{if(this.peek("}"))break;n={type:u.Property,kind:"init"};this.peek().constant?n.key=this.constant():this.peek().identifier?n.key=this.identifier():this.throwError("invalid key",this.peek());this.consume(":");n.value=this.expression();t.push(n)}while(this.expect(","));return this.consume("}"),{type:u.ObjectExpression,properties:t}},throwError:function(n,t){throw ft("syntax",t.text,n,t.index+1,this.text,this.text.substring(t.index));},consume:function(n){if(0===this.tokens.length)throw ft("ueoe",this.text);var t=this.expect(n);return t||this.throwError("is unexpected, expecting ["+n+"]",this.peek()),t},peekToken:function(){if(0===this.tokens.length)throw ft("ueoe",this.text);return this.tokens[0]},peek:function(n,t,i,r){return this.peekAhead(0,n,t,i,r)},peekAhead:function(n,t,i,r,u){if(this.tokens.length>n){n=this.tokens[n];var f=n.text;if(f===t||f===i||f===r||f===u||!(t||i||r||u))return n}return!1},expect:function(n,t,i,r){return(n=this.peek(n,t,i,r))?(this.tokens.shift(),n):!1},constants:{"true":{type:u.Literal,value:!0},"false":{type:u.Literal,value:!1},"null":{type:u.Literal,value:null},undefined:{type:u.Literal,value:i},"this":{type:u.ThisExpression}}};es.prototype={compile:function(n,t){var f=this,e=this.astBuilder.ast(n),u,o;return this.state={nextId:0,filters:{},expensiveChecks:t,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},d(e,f.$filter),u="",this.stage="assign",(o=us(e))&&(this.state.computing="assign",u=this.nextId(),this.recurse(o,u),u="fn.assign="+this.generateFunction("assign","s,v,l")),o=is(e.body),f.stage="inputs",r(o,function(n,t){var i="fn"+t,r;f.state[i]={vars:[],body:[],own:{}};f.state.computing=i;r=f.nextId();f.recurse(n,r);f.return_(r);f.state.inputs.push(i);n.watchId=t}),this.state.computing="fn",this.stage="main",this.recurse(e),u='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+u+this.watchFns()+"return fn;",u=new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","ifDefined","plus","text",u)(this.$filter,ii,lt,ns,ha,ts,n),this.state=this.stage=i,u.literal=fs(e),u.constant=e.constant,u},USE:"use",STRICT:"strict",watchFns:function(){var n=[],t=this.state.inputs,i=this;return r(t,function(t){n.push("var "+t+"="+i.generateFunction(t,"s"))}),t.length&&n.push("fn.inputs=["+t.join(",")+"];"),n.join("")},generateFunction:function(n,t){return"function("+t+"){"+this.varsPrefix(n)+this.body(n)+"};"},filterPrefix:function(){var n=[],t=this;return r(this.state.filters,function(i,r){n.push(i+"=$filter("+t.escape(r)+")")}),n.length?"var "+n.join(",")+";":""},varsPrefix:function(n){return this.state[n].vars.length?"var "+this.state[n].vars.join(",")+";":""},body:function(n){return this.state[n].body.join("")},recurse:function(n,t,o,s,h,c){var v,y,l=this,p,a;if(s=s||f,!c&&e(n.watchId))t=t||this.nextId(),this.if_("i",this.lazyAssign(t,this.computedMember("i",n.watchId)),this.lazyRecurse(n,t,o,s,h,!0));else switch(n.type){case u.Program:r(n.body,function(t,r){l.recurse(t.expression,i,i,function(n){y=n});r!==n.body.length-1?l.current().body.push(y,";"):l.return_(y)});break;case u.Literal:a=this.escape(n.value);this.assign(t,a);s(a);break;case u.UnaryExpression:this.recurse(n.argument,i,i,function(n){y=n});a=n.operator+"("+this.ifDefined(y,0)+")";this.assign(t,a);s(a);break;case u.BinaryExpression:this.recurse(n.left,i,i,function(n){v=n});this.recurse(n.right,i,i,function(n){y=n});a="+"===n.operator?this.plus(v,y):"-"===n.operator?this.ifDefined(v,0)+n.operator+this.ifDefined(y,0):"("+v+")"+n.operator+"("+y+")";this.assign(t,a);s(a);break;case u.LogicalExpression:t=t||this.nextId();l.recurse(n.left,t);l.if_("&&"===n.operator?t:l.not(t),l.lazyRecurse(n.right,t));s(t);break;case u.ConditionalExpression:t=t||this.nextId();l.recurse(n.test,t);l.if_(t,l.lazyRecurse(n.alternate,t),l.lazyRecurse(n.consequent,t));s(t);break;case u.Identifier:t=t||this.nextId();o&&(o.context="inputs"===l.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",n.name)+"?l:s"),o.computed=!1,o.name=n.name);ii(n.name);l.if_("inputs"===l.stage||l.not(l.getHasOwnProperty("l",n.name)),function(){l.if_("inputs"===l.stage||"s",function(){h&&1!==h&&l.if_(l.not(l.nonComputedMember("s",n.name)),l.lazyAssign(l.nonComputedMember("s",n.name),"{}"));l.assign(t,l.nonComputedMember("s",n.name))})},t&&l.lazyAssign(t,l.nonComputedMember("l",n.name)));(l.state.expensiveChecks||au(n.name))&&l.addEnsureSafeObject(t);s(t);break;case u.MemberExpression:v=o&&(o.context=this.nextId())||this.nextId();t=t||this.nextId();l.recurse(n.object,v,i,function(){l.if_(l.notNull(v),function(){n.computed?(y=l.nextId(),l.recurse(n.property,y),l.addEnsureSafeMemberName(y),h&&1!==h&&l.if_(l.not(l.computedMember(v,y)),l.lazyAssign(l.computedMember(v,y),"{}")),a=l.ensureSafeObject(l.computedMember(v,y)),l.assign(t,a),o&&(o.computed=!0,o.name=y)):(ii(n.property.name),h&&1!==h&&l.if_(l.not(l.nonComputedMember(v,n.property.name)),l.lazyAssign(l.nonComputedMember(v,n.property.name),"{}")),a=l.nonComputedMember(v,n.property.name),(l.state.expensiveChecks||au(n.property.name))&&(a=l.ensureSafeObject(a)),l.assign(t,a),o&&(o.computed=!1,o.name=n.property.name));s(t)})},!!h);break;case u.CallExpression:t=t||this.nextId();n.filter?(y=l.filter(n.callee.name),p=[],r(n.arguments,function(n){var t=l.nextId();l.recurse(n,t);p.push(t)}),a=y+"("+p.join(",")+")",l.assign(t,a),s(t)):(y=l.nextId(),v={},p=[],l.recurse(n.callee,y,v,function(){l.if_(l.notNull(y),function(){l.addEnsureSafeFunction(y);r(n.arguments,function(n){l.recurse(n,l.nextId(),i,function(n){p.push(l.ensureSafeObject(n))})});v.name?(l.state.expensiveChecks||l.addEnsureSafeObject(v.context),a=l.member(v.context,v.name,v.computed)+"("+p.join(",")+")"):a=y+"("+p.join(",")+")";a=l.ensureSafeObject(a);l.assign(t,a);s(t)})}));break;case u.AssignmentExpression:if(y=this.nextId(),v={},!rs(n.left))throw ft("lval");this.recurse(n.left,i,v,function(){l.if_(l.notNull(v.context),function(){l.recurse(n.right,y);l.addEnsureSafeObject(l.member(v.context,v.name,v.computed));a=l.member(v.context,v.name,v.computed)+n.operator+y;l.assign(t,a);s(t||a)})},1);break;case u.ArrayExpression:p=[];r(n.elements,function(n){l.recurse(n,l.nextId(),i,function(n){p.push(n)})});a="["+p.join(",")+"]";this.assign(t,a);s(a);break;case u.ObjectExpression:p=[];r(n.properties,function(n){l.recurse(n.value,l.nextId(),i,function(t){p.push(l.escape(n.key.type===u.Identifier?n.key.name:""+n.key.value)+":"+t)})});a="{"+p.join(",")+"}";this.assign(t,a);s(a);break;case u.ThisExpression:this.assign(t,"s");s("s");break;case u.NGValueParameter:this.assign(t,"v");s("v")}},getHasOwnProperty:function(n,t){var i=n+"."+t,r=this.current().own;return r.hasOwnProperty(i)||(r[i]=this.nextId(!1,n+"&&("+this.escape(t)+" in "+n+")")),r[i]},assign:function(n,t){if(n)return this.current().body.push(n,"=",t,";"),n},filter:function(n){return this.state.filters.hasOwnProperty(n)||(this.state.filters[n]=this.nextId(!0)),this.state.filters[n]},ifDefined:function(n,t){return"ifDefined("+n+","+this.escape(t)+")"},plus:function(n,t){return"plus("+n+","+t+")"},return_:function(n){this.current().body.push("return ",n,";")},if_:function(n,t,i){if(!0===n)t();else{var r=this.current().body;r.push("if(",n,"){");t();r.push("}");i&&(r.push("else{"),i(),r.push("}"))}},not:function(n){return"!("+n+")"},notNull:function(n){return n+"!=null"},nonComputedMember:function(n,t){return n+"."+t},computedMember:function(n,t){return n+"["+t+"]"},member:function(n,t,i){return i?this.computedMember(n,t):this.nonComputedMember(n,t)},addEnsureSafeObject:function(n){this.current().body.push(this.ensureSafeObject(n),";")},addEnsureSafeMemberName:function(n){this.current().body.push(this.ensureSafeMemberName(n),";")},addEnsureSafeFunction:function(n){this.current().body.push(this.ensureSafeFunction(n),";")},ensureSafeObject:function(n){return"ensureSafeObject("+n+",text)"},ensureSafeMemberName:function(n){return"ensureSafeMemberName("+n+",text)"},ensureSafeFunction:function(n){return"ensureSafeFunction("+n+",text)"},lazyRecurse:function(n,t,i,r,u,f){var e=this;return function(){e.recurse(n,t,i,r,u,f)}},lazyAssign:function(n,t){var i=this;return function(){i.assign(n,t)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(n){return"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)},escape:function(n){if(l(n))return"'"+n.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(k(n))return n.toString();if(!0===n)return"true";if(!1===n)return"false";if(null===n)return"null";if("undefined"==typeof n)return"undefined";throw ft("esc");},nextId:function(n,t){var i="v"+this.state.nextId++;return n||this.current().vars.push(i+(t?"="+t:"")),i},current:function(){return this.state[this.state.computing]}};os.prototype={compile:function(n,t){var o=this,u=this.astBuilder.ast(n),i,s,f,e;return this.expression=n,this.expensiveChecks=t,d(u,o.$filter),(i=us(u))&&(s=this.recurse(i)),i=is(u.body),i&&(f=[],r(i,function(n,t){var i=o.recurse(n);n.input=i;f.push(i);n.watchId=t})),e=[],r(u.body,function(n){e.push(o.recurse(n.expression))}),i=0===u.body.length?function(){}:1===u.body.length?e[0]:function(n,t){var i;return r(e,function(r){i=r(n,t)}),i},s&&(i.assign=function(n,t,i){return s(n,i,t)}),f&&(i.inputs=f),i.literal=fs(u),i.constant=u.constant,i},recurse:function(n,t,f){var h,e,o=this,s;if(n.input)return this.inputs(n.input,n.watchId);switch(n.type){case u.Literal:return this.value(n.value,t);case u.UnaryExpression:return e=this.recurse(n.argument),this["unary"+n.operator](e,t);case u.BinaryExpression:return h=this.recurse(n.left),e=this.recurse(n.right),this["binary"+n.operator](h,e,t);case u.LogicalExpression:return h=this.recurse(n.left),e=this.recurse(n.right),this["binary"+n.operator](h,e,t);case u.ConditionalExpression:return this["ternary?:"](this.recurse(n.test),this.recurse(n.alternate),this.recurse(n.consequent),t);case u.Identifier:return ii(n.name,o.expression),o.identifier(n.name,o.expensiveChecks||au(n.name),t,f,o.expression);case u.MemberExpression:return h=this.recurse(n.object,!1,!!f),n.computed||(ii(n.property.name,o.expression),e=n.property.name),n.computed&&(e=this.recurse(n.property)),n.computed?this.computedMember(h,e,t,f,o.expression):this.nonComputedMember(h,e,o.expensiveChecks,t,f,o.expression);case u.CallExpression:return s=[],r(n.arguments,function(n){s.push(o.recurse(n))}),n.filter&&(e=this.$filter(n.callee.name)),n.filter||(e=this.recurse(n.callee,!0)),n.filter?function(n,r,u,f){for(var h=[],o=0;o<s.length;++o)h.push(s[o](n,r,u,f));return n=e.apply(i,h,f),t?{context:i,name:i,value:n}:n}:function(n,i,r,u){var h=e(n,i,r,u),f,c;if(null!=h.value){for(lt(h.context,o.expression),ns(h.value,o.expression),f=[],c=0;c<s.length;++c)f.push(lt(s[c](n,i,r,u),o.expression));f=lt(h.value.apply(h.context,f),o.expression)}return t?{value:f}:f};case u.AssignmentExpression:return h=this.recurse(n.left,!0,1),e=this.recurse(n.right),function(n,i,r,u){var f=h(n,i,r,u);return n=e(n,i,r,u),lt(f.value,o.expression),f.context[f.name]=n,t?{value:n}:n};case u.ArrayExpression:return s=[],r(n.elements,function(n){s.push(o.recurse(n))}),function(n,i,r,u){for(var f=[],e=0;e<s.length;++e)f.push(s[e](n,i,r,u));return t?{value:f}:f};case u.ObjectExpression:return s=[],r(n.properties,function(n){s.push({key:n.key.type===u.Identifier?n.key.name:""+n.key.value,value:o.recurse(n.value)})}),function(n,i,r,u){for(var e={},f=0;f<s.length;++f)e[s[f].key]=s[f].value(n,i,r,u);return t?{value:e}:e};case u.ThisExpression:return function(n){return t?{value:n}:n};case u.NGValueParameter:return function(n,i,r){return t?{value:r}:r}}},"unary+":function(n,t){return function(i,r,u,f){return i=n(i,r,u,f),i=e(i)?+i:0,t?{value:i}:i}},"unary-":function(n,t){return function(i,r,u,f){return i=n(i,r,u,f),i=e(i)?-i:0,t?{value:i}:i}},"unary!":function(n,t){return function(i,r,u,f){return i=!n(i,r,u,f),t?{value:i}:i}},"binary+":function(n,t,i){return function(r,u,f,e){var o=n(r,u,f,e);return r=t(r,u,f,e),o=ts(o,r),i?{value:o}:o}},"binary-":function(n,t,i){return function(r,u,f,o){var s=n(r,u,f,o);return r=t(r,u,f,o),s=(e(s)?s:0)-(e(r)?r:0),i?{value:s}:s}},"binary*":function(n,t,i){return function(r,u,f,e){return r=n(r,u,f,e)*t(r,u,f,e),i?{value:r}:r}},"binary/":function(n,t,i){return function(r,u,f,e){return r=n(r,u,f,e)/t(r,u,f,e),i?{value:r}:r}},"binary%":function(n,t,i){return function(r,u,f,e){return r=n(r,u,f,e)%t(r,u,f,e),i?{value:r}:r}},"binary===":function(n,t,i){return function(r,u,f,e){return r=n(r,u,f,e)===t(r,u,f,e),i?{value:r}:r}},"binary!==":function(n,t,i){return function(r,u,f,e){return r=n(r,u,f,e)!==t(r,u,f,e),i?{value:r}:r}},"binary==":function(n,t,i){return function(r,u,f,e){return r=n(r,u,f,e)==t(r,u,f,e),i?{value:r}:r}},"binary!=":function(n,t,i){return function(r,u,f,e){return r=n(r,u,f,e)!=t(r,u,f,e),i?{value:r}:r}},"binary<":function(n,t,i){return function(r,u,f,e){return r=n(r,u,f,e)<t(r,u,f,e),i?{value:r}:r}},"binary>":function(n,t,i){return function(r,u,f,e){return r=n(r,u,f,e)>t(r,u,f,e),i?{value:r}:r}},"binary<=":function(n,t,i){return function(r,u,f,e){return r=n(r,u,f,e)<=t(r,u,f,e),i?{value:r}:r}},"binary>=":function(n,t,i){return function(r,u,f,e){return r=n(r,u,f,e)>=t(r,u,f,e),i?{value:r}:r}},"binary&&":function(n,t,i){return function(r,u,f,e){return r=n(r,u,f,e)&&t(r,u,f,e),i?{value:r}:r}},"binary||":function(n,t,i){return function(r,u,f,e){return r=n(r,u,f,e)||t(r,u,f,e),i?{value:r}:r}},"ternary?:":function(n,t,i,r){return function(u,f,e,o){return u=n(u,f,e,o)?t(u,f,e,o):i(u,f,e,o),r?{value:u}:u}},value:function(n,t){return function(){return t?{context:i,name:i,value:n}:n}},identifier:function(n,t,r,u,f){return function(e,o){return e=o&&n in o?o:e,u&&1!==u&&e&&!e[n]&&(e[n]={}),o=e?e[n]:i,t&&lt(o,f),r?{context:e,name:n,value:o}:o}},computedMember:function(n,t,i,r,u){return function(f,e,o,s){var h=n(f,e,o,s),c,l;return null!=h&&(c=t(f,e,o,s),ii(c,u),r&&1!==r&&h&&!h[c]&&(h[c]={}),l=h[c],lt(l,u)),i?{context:h,name:c,value:l}:l}},nonComputedMember:function(n,t,r,u,f,e){return function(o,s,h,c){return o=n(o,s,h,c),f&&1!==f&&o&&!o[t]&&(o[t]={}),s=null!=o?o[t]:i,(r||au(t))&&lt(s,e),u?{context:o,name:t,value:s}:s}},inputs:function(n,t){return function(i,r,u,f){return f?f[t]:n(i,r,u)}}};rf=function(n,t,i){this.lexer=n;this.$filter=t;this.options=i;this.ast=new u(this.lexer);this.astCompiler=i.csp?new os(this.ast,t):new es(this.ast,t)};rf.prototype={constructor:rf,parse:function(n){return this.astCompiler.compile(n,this.options.expensiveChecks)}};rt();rt();var py=Object.prototype.valueOf,ui=v("$sce"),vt={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},it=v("$compile"),nt=t.createElement("a"),wh=ri(n.location.href);ls.$inject=["$document"];as.$inject=["$provide"];vs.$inject=["$locale"];ys.$inject=["$locale"];var bh=".",wy={yyyy:g("FullYear",4),yy:g("FullYear",2,0,!0),y:g("FullYear",1),MMMM:yu("Month"),MMM:yu("Month",!0),MM:g("Month",2,1),M:g("Month",1,1),dd:g("Date",2),d:g("Date",1),HH:g("Hours",2),H:g("Hours",1),hh:g("Hours",2,-12),h:g("Hours",1,-12),mm:g("Minutes",2),m:g("Minutes",1),ss:g("Seconds",2),s:g("Seconds",1),sss:g("Milliseconds",3),EEEE:yu("Day"),EEE:yu("Day",!0),a:function(n,t){return 12>n.getHours()?t.AMPMS[0]:t.AMPMS[1]},Z:function(n,t,i){return n=-1*i,(0<=n?"+":"")+(vu(Math[0<n?"floor":"ceil"](n/60),2)+vu(Math.abs(n%60),2))},ww:bs(2),w:bs(1),G:te,GG:te,GGG:te,GGGG:function(n,t){return 0>=n.getFullYear()?t.ERANAMES[0]:t.ERANAMES[1]}},by=/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,ky=/^\-?\d+$/;ks.$inject=["$locale"];kh=yt(y);dh=yt(bu);ds.$inject=["$parse"];gh=yt({restrict:"E",compile:function(n,t){if(!t.href&&!t.xlinkHref)return function(n,t){if("a"===t[0].nodeName.toLowerCase()){var i="[object SVGAnimatedString]"===ti.call(t.prop("href"))?"xlink:href":"href";t.on("click",function(n){t.attr(i)||n.preventDefault()})}}}});kr={};r(br,function(n,t){function r(n,r,u){n.$watch(u[i],function(n){u.$set(t,!!n)})}if("multiple"!=n){var i=dt("ng-"+t),u=r;"checked"===n&&(u=function(n,t,u){u.ngModel!==u[i]&&r(n,t,u)});kr[i]=function(){return{restrict:"A",priority:100,link:u}}}});r(se,function(n,t){kr[t]=function(){return{priority:100,link:function(n,i,r){if("ngPattern"===t&&"/"==r.ngPattern.charAt(0)&&(i=r.ngPattern.match(sv))){r.$set("ngPattern",new RegExp(i[1],i[2]));return}n.$watch(r[t],function(n){r.$set(t,n)})}}}});r(["src","srcset","href"],function(n){var t=dt("ng-"+n);kr[t]=function(){return{priority:99,link:function(i,r,u){var e=n,f=n;"href"===n&&"[object SVGAnimatedString]"===ti.call(r.prop("href"))&&(f="xlinkHref",u.$attr[f]="xlink:href",e=null);u.$observe(t,function(t){t?(u.$set(f,t),ar&&e&&r.prop(e,u[f])):"href"===n&&u.$set(f,null)})}}}});dr={$addControl:f,$$renameControl:function(n,t){n.$name=t},$removeControl:f,$setValidity:f,$setDirty:f,$setPristine:f,$setSubmitted:f};gs.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var nc=function(n){return["$timeout",function(t){return{name:"form",restrict:n?"EAC":"E",controller:gs,compile:function(r,u){r.addClass(di).addClass(gr);var f=u.name?"name":n&&u.ngForm?"ngForm":!1;return{pre:function(n,r,u,e){var o,s;if(!("action"in u)){o=function(t){n.$apply(function(){e.$commitViewValue();e.$setSubmitted()});t.preventDefault()};r[0].addEventListener("submit",o,!1);r.on("$destroy",function(){t(function(){r[0].removeEventListener("submit",o,!1)},0,!1)})}s=e.$$parentForm;f&&(lu(n,e.$name,e,e.$name),u.$observe(f,function(t){e.$name!==t&&(lu(n,e.$name,i,e.$name),s.$$renameControl(e,t),lu(n,e.$name,e,e.$name))}));r.on("$destroy",function(){s.$removeControl(e);f&&lu(n,u[f],i,e.$name);p(e,dr)})}}}}}]},dy=nc(),gy=nc(!0),np=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,tp=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,ip=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,rp=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,tc=/^(\d{4})-(\d{2})-(\d{2})$/,ic=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,ce=/^(\d{4})-W(\d\d)$/,rc=/^(\d{4})-(\d\d)$/,uc=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,fc={text:function(n,t,i,r,u,f){cr(n,t,i,r,u,f);ie(r)},date:lr("date",tc,pu(tc,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":lr("datetimelocal",ic,pu(ic,"yyyy MM dd HH mm ss sss".split(" ")),"yyyy-MM-ddTHH:mm:ss.sss"),time:lr("time",uc,pu(uc,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:lr("week",ce,function(n,t){var i;if(et(n))return n;if(l(n)&&(ce.lastIndex=0,i=ce.exec(n),i)){var u=+i[1],r=+i[2],f=i=0,e=0,o=0,s=ws(u),r=7*(r-1);return t&&(i=t.getHours(),f=t.getMinutes(),e=t.getSeconds(),o=t.getMilliseconds()),new Date(u,0,s.getDate()+r,i,f,e,o)}return NaN},"yyyy-Www"),month:lr("month",rc,pu(rc,["yyyy","MM"]),"yyyy-MM"),number:function(n,t,r,u,f,o){var s,h;nh(n,t,r,u);cr(n,t,r,u,f,o);u.$$parserName="number";u.$parsers.push(function(n){return u.$isEmpty(n)?null:rp.test(n)?parseFloat(n):i});u.$formatters.push(function(n){if(!u.$isEmpty(n)){if(!k(n))throw ff("numfmt",n);n=n.toString()}return n});(e(r.min)||r.ngMin)&&(u.$validators.min=function(n){return u.$isEmpty(n)||c(s)||n>=s},r.$observe("min",function(n){e(n)&&!k(n)&&(n=parseFloat(n,10));s=k(n)&&!isNaN(n)?n:i;u.$validate()}));(e(r.max)||r.ngMax)&&(u.$validators.max=function(n){return u.$isEmpty(n)||c(h)||n<=h},r.$observe("max",function(n){e(n)&&!k(n)&&(n=parseFloat(n,10));h=k(n)&&!isNaN(n)?n:i;u.$validate()}))},url:function(n,t,i,r,u,f){cr(n,t,i,r,u,f);ie(r);r.$$parserName="url";r.$validators.url=function(n,t){var i=n||t;return r.$isEmpty(i)||tp.test(i)}},email:function(n,t,i,r,u,f){cr(n,t,i,r,u,f);ie(r);r.$$parserName="email";r.$validators.email=function(n,t){var i=n||t;return r.$isEmpty(i)||ip.test(i)}},radio:function(n,t,i,r){c(i.name)&&t.attr("name",++ku);t.on("click",function(n){t[0].checked&&r.$setViewValue(i.value,n&&n.type)});r.$render=function(){t[0].checked=i.value==r.$viewValue};i.$observe("value",r.$render)},checkbox:function(n,t,i,r,u,f,e,o){var s=th(o,n,"ngTrueValue",i.ngTrueValue,!0),h=th(o,n,"ngFalseValue",i.ngFalseValue,!1);t.on("click",function(n){r.$setViewValue(t[0].checked,n&&n.type)});r.$render=function(){t[0].checked=r.$viewValue};r.$isEmpty=function(n){return!1===n};r.$formatters.push(function(n){return ot(n,s)});r.$parsers.push(function(n){return n?s:h})},hidden:f,button:f,submit:f,reset:f,file:f},ec=["$browser","$sniffer","$filter","$parse",function(n,t,i,r){return{restrict:"E",require:["?ngModel"],link:{pre:function(u,f,e,o){o[0]&&(fc[y(e.type)]||fc.text)(u,f,e,o[0],t,n,i,r)}}}}],up=/^(true|false|\d+)$/,fp=function(){return{restrict:"A",priority:100,compile:function(n,t){return up.test(t.ngValue)?function(n,t,i){i.$set("value",n.$eval(i.ngValue))}:function(n,t,i){n.$watch(i.ngValue,function(n){i.$set("value",n)})}}}},ep=["$compile",function(n){return{restrict:"AC",compile:function(t){return n.$$addBindingClass(t),function(t,r,u){n.$$addBindingInfo(r,u.ngBind);r=r[0];t.$watch(u.ngBind,function(n){r.textContent=n===i?"":n})}}}}],op=["$interpolate","$compile",function(n,t){return{compile:function(r){return t.$$addBindingClass(r),function(r,u,f){r=n(u.attr(f.$attr.ngBindTemplate));t.$$addBindingInfo(u,r.expressions);u=u[0];f.$observe("ngBindTemplate",function(n){u.textContent=n===i?"":n})}}}}],sp=["$sce","$parse","$compile",function(n,t,i){return{restrict:"A",compile:function(r,u){var f=t(u.ngBindHtml),e=t(u.ngBindHtml,function(n){return(n||"").toString()});return i.$$addBindingClass(r),function(t,r,u){i.$$addBindingInfo(r,u.ngBindHtml);t.$watch(e,function(){r.html(n.getTrustedHtml(f(t))||"")})}}}}],hp=yt({restrict:"A",require:"ngModel",link:function(n,t,i,r){r.$viewChangeListeners.push(function(){n.$eval(i.ngChange)})}}),cp=re("",!0),lp=re("Odd",0),ap=re("Even",1),vp=ci({compile:function(n,t){t.$set("ngCloak",i);n.removeClass("ng-cloak")}}),yp=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],oc={},pp={blur:!0,focus:!0};r("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(n){var t=dt("ng-"+n);oc[t]=["$parse","$rootScope",function(i,r){return{restrict:"A",compile:function(u,f){var e=i(f[t],null,!0);return function(t,i){i.on(n,function(i){var u=function(){e(t,{$event:i})};pp[n]&&r.$$phase?t.$evalAsync(u):t.$apply(u)})}}}}]});var wp=["$animate",function(n){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(i,r,u,f,e){var h,s,o;i.$watch(u.ngIf,function(i){i?s||e(function(i,f){s=f;i[i.length++]=t.createComment(" end ngIf: "+u.ngIf+" ");h={clone:i};n.enter(i,r.parent(),r)}):(o&&(o.remove(),o=null),s&&(s.$destroy(),s=null),h&&(o=tu(h.clone),n.leave(o).then(function(){o=null}),h=null))})}}}],bp=["$templateRequest","$anchorScroll","$animate","$sce",function(n,t,i,r){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:ut.noop,compile:function(u,f){var s=f.ngInclude||f.src,h=f.onload||"",o=f.autoscroll;return function(u,f,c,l,a){var w=0,v,y,p,b=function(){y&&(y.remove(),y=null);v&&(v.$destroy(),v=null);p&&(i.leave(p).then(function(){y=null}),y=p,p=null)};u.$watch(r.parseAsResourceUrl(s),function(r){var c=function(){e(o)&&(!o||u.$eval(o))&&t()},s=++w;r?(n(r,!0).then(function(n){if(s===w){var t=u.$new();l.template=n;n=a(t,function(n){b();i.enter(n,null,f).then(c)});v=t;p=n;v.$emit("$includeContentLoaded",r);u.$eval(h)}},function(){s===w&&(b(),u.$emit("$includeContentError",r))}),u.$emit("$includeContentRequested",r)):(b(),l.template=null)})}}}}],kp=["$compile",function(n){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(i,r,u,f){/SVG/.test(r[0].toString())?(r.empty(),n(uo(f.template,t).childNodes)(i,function(n){r.append(n)},{futureParentElement:r})):(r.html(f.template),n(r.contents())(i))}}}],dp=ci({priority:450,compile:function(){return{pre:function(n,t,i){n.$eval(i.ngInit)}}}}),gp=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(n,t,u,f){var e=t.attr(u.$attr.ngList)||", ",o="false"!==u.ngTrim,s=o?w(e):e;f.$parsers.push(function(n){if(!c(n)){var t=[];return n&&r(n.split(s),function(n){n&&t.push(o?w(n):n)}),t}});f.$formatters.push(function(n){return a(n)?n.join(e):i});f.$isEmpty=function(n){return!n||!n.length}}}},gr="ng-valid",sc="ng-invalid",di="ng-pristine",uf="ng-dirty",hc="ng-pending",ff=new v("ngModel"),nw=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(n,t,u,o,s,l,a,v,y,p){var it,g;this.$modelValue=this.$viewValue=Number.NaN;this.$$rawModelValue=i;this.$validators={};this.$asyncValidators={};this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$untouched=!0;this.$touched=!1;this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$error={};this.$$success={};this.$pending=i;this.$name=p(u.name||"",!1)(n);var d=s(u.ngModel),rt=d.assign,tt=d,ut=rt,nt=null,b,w=this;this.$$setOptions=function(n){if((w.$options=n)&&n.getterSetter){var t=s(u.ngModel+"()"),i=s(u.ngModel+"($$$p)");tt=function(n){var i=d(n);return h(i)&&(i=t(n)),i};ut=function(n){h(d(n))?i(n,{$$$p:w.$modelValue}):rt(n,w.$modelValue)}}else if(!d.assign)throw ff("nonassign",u.ngModel,kt(o));};this.$render=f;this.$isEmpty=function(n){return c(n)||""===n||null===n||n!==n};it=o.inheritedData("$formController")||dr;g=0;ih({ctrl:this,$element:o,set:function(n,t){n[t]=!0},unset:function(n,t){delete n[t]},parentForm:it,$animate:l});this.$setPristine=function(){w.$dirty=!1;w.$pristine=!0;l.removeClass(o,uf);l.addClass(o,di)};this.$setDirty=function(){w.$dirty=!0;w.$pristine=!1;l.removeClass(o,di);l.addClass(o,uf);it.$setDirty()};this.$setUntouched=function(){w.$touched=!1;w.$untouched=!0;l.setClass(o,"ng-untouched","ng-touched")};this.$setTouched=function(){w.$touched=!0;w.$untouched=!1;l.setClass(o,"ng-touched","ng-untouched")};this.$rollbackViewValue=function(){a.cancel(nt);w.$viewValue=w.$$lastCommittedViewValue;w.$render()};this.$validate=function(){if(!k(w.$modelValue)||!isNaN(w.$modelValue)){var n=w.$$rawModelValue,t=w.$valid,r=w.$modelValue,u=w.$options&&w.$options.allowInvalid;w.$$runValidators(n,w.$$lastCommittedViewValue,function(f){u||t===f||(w.$modelValue=f?n:i,w.$modelValue!==r&&w.$$writeModelToScope())})}};this.$$runValidators=function(n,t,u){function c(){var i=!0;return r(w.$validators,function(r,u){var f=r(n,t);i=i&&f;e(u,f)}),i?!0:(r(w.$asyncValidators,function(n,t){e(t,null)}),!1)}function l(){var u=[],s=!0;r(w.$asyncValidators,function(r,f){var o=r(n,t);if(!o||!h(o.then))throw ff("$asyncValidators",o);e(f,i);u.push(o.then(function(){e(f,!0)},function(){s=!1;e(f,!1)}))});u.length?y.all(u).then(function(){o(s)},f):o(!0)}function e(n,t){s===g&&w.$setValidity(n,t)}function o(n){s===g&&u(n)}g++;var s=g;(function(){var n=w.$$parserName||"parse";if(b===i)e(n,null);else return b||(r(w.$validators,function(n,t){e(t,null)}),r(w.$asyncValidators,function(n,t){e(t,null)})),e(n,b),b;return!0})()?c()?l():o(!1):o(!1)};this.$commitViewValue=function(){var n=w.$viewValue;a.cancel(nt);(w.$$lastCommittedViewValue!==n||""===n&&w.$$hasNativeValidators)&&(w.$$lastCommittedViewValue=n,w.$pristine&&this.$setDirty(),this.$$parseAndValidate())};this.$$parseAndValidate=function(){var t=w.$$lastCommittedViewValue,r,u,f;if(b=c(t)?i:!0)for(r=0;r<w.$parsers.length;r++)if(t=w.$parsers[r](t),c(t)){b=!1;break}k(w.$modelValue)&&isNaN(w.$modelValue)&&(w.$modelValue=tt(n));u=w.$modelValue;f=w.$options&&w.$options.allowInvalid;w.$$rawModelValue=t;f&&(w.$modelValue=t,w.$modelValue!==u&&w.$$writeModelToScope());w.$$runValidators(t,w.$$lastCommittedViewValue,function(n){f||(w.$modelValue=n?t:i,w.$modelValue!==u&&w.$$writeModelToScope())})};this.$$writeModelToScope=function(){ut(n,w.$modelValue);r(w.$viewChangeListeners,function(n){try{n()}catch(i){t(i)}})};this.$setViewValue=function(n,t){w.$viewValue=n;w.$options&&!w.$options.updateOnDefault||w.$$debounceViewValueCommit(t)};this.$$debounceViewValueCommit=function(t){var r=0,i=w.$options;i&&e(i.debounce)&&(i=i.debounce,k(i)?r=i:k(i[t])?r=i[t]:k(i["default"])&&(r=i["default"]));a.cancel(nt);r?nt=a(function(){w.$commitViewValue()},r):v.$$phase?w.$commitViewValue():n.$apply(function(){w.$commitViewValue()})};n.$watch(function(){var t=tt(n);if(t!==w.$modelValue&&(w.$modelValue===w.$modelValue||t===t)){w.$modelValue=w.$$rawModelValue=t;b=i;for(var u=w.$formatters,e=u.length,r=t;e--;)r=u[e](r);w.$viewValue!==r&&(w.$viewValue=w.$$lastCommittedViewValue=r,w.$render(),w.$$runValidators(t,r,f))}return t})}],tw=["$rootScope",function(n){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:nw,priority:1,compile:function(t){return t.addClass(di).addClass("ng-untouched").addClass(gr),{pre:function(n,t,i,r){var u=r[0],f=r[1]||dr;u.$$setOptions(r[2]&&r[2].$options);f.$addControl(u);i.$observe("name",function(n){u.$name!==n&&f.$$renameControl(u,n)});n.$on("$destroy",function(){f.$removeControl(u)})},post:function(t,i,r,u){var f=u[0];if(f.$options&&f.$options.updateOn)i.on(f.$options.updateOn,function(n){f.$$debounceViewValueCommit(n&&n.type)});i.on("blur",function(){f.$touched||(n.$$phase?t.$evalAsync(f.$setTouched):t.$apply(f.$setTouched))})}}}}}],iw=/(\s+|^)default(\s+|$)/,rw=function(){return{restrict:"A",controller:["$scope","$attrs",function(n,t){var r=this;this.$options=bt(n.$eval(t.ngModelOptions));this.$options.updateOn!==i?(this.$options.updateOnDefault=!1,this.$options.updateOn=w(this.$options.updateOn.replace(iw,function(){return r.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},uw=ci({terminal:!0,priority:1e3}),fw=v("ngOptions"),ew=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,ow=["$compile","$parse",function(n,i){function f(n,t,r){function p(n,t,i,r,u){this.selectValue=n;this.viewValue=t;this.label=i;this.group=r;this.disabled=u}var u=n.match(ew),o,s,f;if(!u)throw fw("iexp",n,kt(t));o=u[5]||u[7];s=u[6];n=/ as /.test(u[0])&&u[1];f=u[9];t=i(u[2]?u[1]:o);var w=n&&i(n)||t,b=f&&i(f),h=f?function(n,t){return b(r,t)}:function(n){return ei(n)},l=function(n,t){return h(n,c(n,t))},a=i(u[2]||u[1]),k=i(u[3]||""),v=i(u[4]||""),y=i(u[8]),e={},c=s?function(n,t){return e[s]=t,e[o]=n,e}:function(n){return e[o]=n,e};return{trackBy:f,getTrackByValue:l,getWatchables:i(y,function(n){var t=[];return n=n||[],Object.keys(n).forEach(function(i){var f=c(n[i],i);i=h(n[i],f);t.push(i);(u[2]||u[1])&&(i=a(r,f),t.push(i));u[4]&&(f=v(r,f),t.push(f))}),t}),getOptions:function(){var g=[],d={},t=y(r)||[],i,u,e;if(!s&&fi(t))i=t;else{i=[];for(u in t)t.hasOwnProperty(u)&&"$"!==u.charAt(0)&&i.push(u)}for(u=i.length,e=0;e<u;e++){var o=t===i?e:i[e],n=c(t[o],o),b=w(r,n),o=h(b,n),nt=a(r,n),tt=k(r,n),n=v(r,n),b=new p(o,b,nt,tt,n);g.push(b);d[o]=b}return{items:g,selectValueMap:d,getOptionFromViewValue:function(n){return d[l(n)]},getViewValueFromOption:function(n){return f?ut.copy(n.viewValue):n.viewValue}}}}}var u=t.createElement("option"),e=t.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","?ngModel"],link:function(t,i,s,h){function tt(n,t){n.element=t;t.disabled=n.disabled;n.value!==t.value&&(t.value=n.selectValue);n.label!==t.label&&(t.label=n.label,t.textContent=n.label)}function g(n,t,i,r){return t&&y(t.nodeName)===i?i=t:(i=r.cloneNode(!1),t?n.insertBefore(i,t):n.appendChild(i)),i}function it(n){for(var t;n;)t=n.nextSibling,vf(n),n=t}function ut(n){var t=c&&c[0],i=v&&v[0];if(t||i)for(;n&&(n===t||n===i);)n=n.nextSibling;return n}function rt(){var f=p&&k.readValue(),t,n,r;p=b.getOptions();t={};n=i[0].firstChild;w&&i.prepend(c);n=ut(n);p.items.forEach(function(r){var f,o;r.group?(f=t[r.group],f||(f=g(i[0],n,"optgroup",e),n=f.nextSibling,f.label=r.group,f=t[r.group]={groupElement:f,currentOptionElement:f.firstChild}),o=g(f.groupElement,f.currentOptionElement,"option",u),tt(r,o),f.currentOptionElement=o.nextSibling):(o=g(i[0],n,"option",u),tt(r,o),n=o.nextSibling)});Object.keys(t).forEach(function(n){it(t[n].currentOptionElement)});it(n);l.$render();l.$isEmpty(f)||(r=k.readValue(),(b.trackBy&&!ot(f,r)||f!==r)&&(l.$setViewValue(r),l.$render()))}var l=h[1],k,w,v,p,b;if(l){k=h[0];h=s.multiple;for(var c,d=0,nt=i.children(),ft=nt.length;d<ft;d++)if(""===nt[d].value){c=nt.eq(d);break}w=!!c;v=o(u.cloneNode(!1));v.val("?");b=f(s.ngOptions,i,t);h?(l.$isEmpty=function(n){return!n||0===n.length},k.writeValue=function(n){p.items.forEach(function(n){n.element.selected=!1});n&&n.forEach(function(n){(n=p.getOptionFromViewValue(n))&&!n.disabled&&(n.element.selected=!0)})},k.readValue=function(){var t=i.val()||[],n=[];return r(t,function(t){t=p.selectValueMap[t];t.disabled||n.push(p.getViewValueFromOption(t))}),n},b.trackBy&&t.$watchCollection(function(){if(a(l.$viewValue))return l.$viewValue.map(function(n){return b.getTrackByValue(n)})},function(){l.$render()})):(k.writeValue=function(n){var t=p.getOptionFromViewValue(n);t&&!t.disabled?i[0].value!==t.selectValue&&(v.remove(),w||c.remove(),i[0].value=t.selectValue,t.element.selected=!0,t.element.setAttribute("selected","selected")):null===n||w?(v.remove(),w||i.prepend(c),i.val(""),c.prop("selected",!0),c.attr("selected",!0)):(w||c.remove(),i.prepend(v),i.val("?"),v.prop("selected",!0),v.attr("selected",!0))},k.readValue=function(){var n=p.selectValueMap[i.val()];return n&&!n.disabled?(w||c.remove(),v.remove(),p.getViewValueFromOption(n)):null},b.trackBy&&t.$watch(function(){return b.getTrackByValue(l.$viewValue)},function(){l.$render()}));w?(c.remove(),n(c)(t),c.removeClass("ng-scope")):c=o(u.cloneNode(!1));rt();t.$watchCollection(b.getWatchables,rt)}}}}],sw=["$locale","$interpolate","$log",function(n,t,i){var u=/{}/g,e=/^when(Minus)?(.+)$/;return{link:function(o,s,h){function p(n){s.text(n||"")}var w=h.count,b=h.$attr.when&&s.attr(h.$attr.when),d=h.offset||0,a=o.$eval(b)||{},g={},nt=t.startSymbol(),tt=t.endSymbol(),it=nt+w+"-"+d+tt,v=ut.noop,l;r(h,function(n,t){var i=e.exec(t);i&&(i=(i[1]?"-":"")+y(i[2]),a[i]=s.attr(h.$attr[t]))});r(a,function(n,i){g[i]=t(n.replace(u,it))});o.$watch(w,function(t){var r=parseFloat(t),u=isNaN(r);u||r in a||(r=n.pluralCat(r-d));r===l||u&&k(l)&&isNaN(l)||(v(),u=g[r],c(u)?(null!=t&&i.debug("ngPluralize: no rule defined for '"+r+"' in "+b),v=f,p()):v=o.$watch(u,p),l=r)})}}}],hw=["$parse","$animate",function(n,u){var f=v("ngRepeat"),e=function(n,t,i,r,u,f,e){n[i]=r;u&&(n[u]=f);n.$index=t;n.$first=0===t;n.$last=t===e-1;n.$middle=!(n.$first||n.$last);n.$odd=!(n.$even=0==(t&1))};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(s,h){var y=h.ngRepeat,tt=t.createComment(" end ngRepeat: "+y+" "),c=y.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/),p,a,w,b,g,nt,v;if(!c)throw f("iexp",y);var k=c[1],it=c[2],l=c[3],d=c[4],c=k.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/);if(!c)throw f("iidexp",k);if(p=c[3]||c[1],a=c[2],l&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(l)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(l)))throw f("badident",l);return v={$id:ei},d?w=n(d):(g=function(n,t){return ei(t)},nt=function(n){return n}),function(n,t,s,h,c){w&&(b=function(t,i,r){return a&&(v[a]=t),v[p]=i,v.$index=r,w(n,v)});var k=rt();n.$watchCollection(it,function(s){var h,st,ht=t[0],it,ct=rt(),et,ft,ot,w,ut,v,d;if(l&&(n[l]=s),fi(s))ut=s,st=b||g;else for(d in st=b||nt,ut=[],s)s.hasOwnProperty(d)&&"$"!==d.charAt(0)&&ut.push(d);for(et=ut.length,d=Array(et),h=0;h<et;h++)if(ft=s===ut?h:ut[h],ot=s[ft],w=st(ft,ot,h),k[w])v=k[w],delete k[w],ct[w]=v,d[h]=v;else{if(ct[w])throw r(d,function(n){n&&n.scope&&(k[n.id]=n)}),f("dupes",y,w,ot);d[h]={id:w,scope:i,clone:i};ct[w]=!0}for(it in k){if(v=k[it],w=tu(v.clone),u.leave(w),w[0].parentNode)for(h=0,st=w.length;h<st;h++)w[h].$$NG_REMOVED=!0;v.scope.$destroy()}for(h=0;h<et;h++)if(ft=s===ut?h:ut[h],ot=s[ft],v=d[h],v.scope){it=ht;do it=it.nextSibling;while(it&&it.$$NG_REMOVED);v.clone[0]!=it&&u.move(tu(v.clone),null,o(ht));ht=v.clone[v.clone.length-1];e(v.scope,h,p,ot,a,ft,et)}else c(function(n,t){v.scope=t;var i=tt.cloneNode(!1);n[n.length++]=i;u.enter(n,null,o(ht));ht=i;v.clone=n;ct[v.id]=v;e(v.scope,h,p,ot,a,ft,et)});k=ct})}}}}],cw=["$animate",function(n){return{restrict:"A",multiElement:!0,link:function(t,i,r){t.$watch(r.ngShow,function(t){n[t?"removeClass":"addClass"](i,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],lw=["$animate",function(n){return{restrict:"A",multiElement:!0,link:function(t,i,r){t.$watch(r.ngHide,function(t){n[t?"addClass":"removeClass"](i,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],aw=ci(function(n,t,i){n.$watch(i.ngStyle,function(n,i){i&&n!==i&&r(i,function(n,i){t.css(i,"")});n&&t.css(n)},!0)}),vw=["$animate",function(n){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(i,u,f,e){var c=[],h=[],o=[],s=[],l=function(n,t){return function(){n.splice(t,1)}};i.$watch(f.ngSwitch||f.on,function(i){for(var a,u=0,f=o.length;u<f;++u)n.cancel(o[u]);for(u=o.length=0,f=s.length;u<f;++u)a=tu(h[u].clone),s[u].$destroy(),(o[u]=n.leave(a)).then(l(o,u));h.length=0;s.length=0;(c=e.cases["!"+i]||e.cases["?"])&&r(c,function(i){i.transclude(function(r,u){s.push(u);var f=i.element;r[r.length++]=t.createComment(" end ngSwitchWhen: ");h.push({clone:r});n.enter(r,f.parent(),f)})})})}}}],yw=ci({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(n,t,i,r,u){r.cases["!"+i.ngSwitchWhen]=r.cases["!"+i.ngSwitchWhen]||[];r.cases["!"+i.ngSwitchWhen].push({transclude:u,element:t})}}),pw=ci({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(n,t,i,r,u){r.cases["?"]=r.cases["?"]||[];r.cases["?"].push({transclude:u,element:t})}}),ww=ci({restrict:"EAC",link:function(n,t,i,r,u){if(!u)throw v("ngTransclude")("orphan",kt(t));u(function(n){t.empty();t.append(n)})}}),bw=["$templateCache",function(n){return{restrict:"E",terminal:!0,compile:function(t,i){"text/ng-template"==i.type&&n.put(i.id,t[0].text)}}}],kw={$setViewValue:f,$render:f},dw=["$element","$scope","$attrs",function(n,r){var u=this,e=new bi;u.ngModelCtrl=kw;u.unknownOption=o(t.createElement("option"));u.renderUnknownOption=function(t){t="? "+ei(t)+" ?";u.unknownOption.val(t);n.prepend(u.unknownOption);n.val(t)};r.$on("$destroy",function(){u.renderUnknownOption=f});u.removeUnknownOption=function(){u.unknownOption.parent()&&u.unknownOption.remove()};u.readValue=function(){return u.removeUnknownOption(),n.val()};u.writeValue=function(t){u.hasOption(t)?(u.removeUnknownOption(),n.val(t),""===t&&u.emptyOption.prop("selected",!0)):null==t&&u.emptyOption?(u.removeUnknownOption(),n.val("")):u.renderUnknownOption(t)};u.addOption=function(n,t){wi(n,'"option value"');""===n&&(u.emptyOption=t);var i=e.get(n)||0;e.put(n,i+1)};u.removeOption=function(n){var t=e.get(n);t&&(1===t?(e.remove(n),""===n&&(u.emptyOption=i)):e.put(n,t-1))};u.hasOption=function(n){return!!e.get(n)}}],gw=function(){return{restrict:"E",require:["select","?ngModel"],controller:dw,link:function(n,t,i,u){var f=u[1],o,h,s;if(f){o=u[0];o.ngModelCtrl=f;f.$render=function(){o.writeValue(f.$viewValue)};t.on("change",function(){n.$apply(function(){f.$setViewValue(o.readValue())})});i.multiple&&(o.readValue=function(){var n=[];return r(t.find("option"),function(t){t.selected&&n.push(t.value)}),n},o.writeValue=function(n){var i=new bi(n);r(t.find("option"),function(n){n.selected=e(i.get(n.value))})},s=NaN,n.$watch(function(){s!==f.$viewValue||ot(h,f.$viewValue)||(h=ht(f.$viewValue),f.$render());s=f.$viewValue}),f.$isEmpty=function(n){return!n||0===n.length})}}}},nb=["$interpolate",function(n){function t(n){n[0].hasAttribute("selected")&&(n[0].selected=!0)}return{restrict:"E",priority:100,compile:function(i,r){if(c(r.value)){var u=n(i.text(),!0);u||r.$set("value",i.text())}return function(n,i,r){var e=i.parent(),f=e.data("$selectController")||e.parent().data("$selectController");f&&f.ngModelCtrl&&(u?n.$watch(u,function(n,u){r.$set("value",n);u!==n&&f.removeOption(u);f.addOption(n,i);f.ngModelCtrl.$render();t(i)}):(f.addOption(r.value,i),f.ngModelCtrl.$render(),t(i)),i.on("$destroy",function(){f.removeOption(r.value);f.ngModelCtrl.$render()}))}}}}],tb=yt({restrict:"E",terminal:!1}),cc=function(){return{restrict:"A",require:"?ngModel",link:function(n,t,i,r){r&&(i.required=!0,r.$validators.required=function(n,t){return!i.required||!r.$isEmpty(t)},i.$observe("required",function(){r.$validate()}))}}},lc=function(){return{restrict:"A",require:"?ngModel",link:function(n,t,r,u){if(u){var f,e=r.ngPattern||r.pattern;r.$observe("pattern",function(n){if(l(n)&&0<n.length&&(n=new RegExp("^"+n+"$")),n&&!n.test)throw v("ngPattern")("noregexp",e,n,kt(t));f=n||i;u.$validate()});u.$validators.pattern=function(n){return u.$isEmpty(n)||c(f)||f.test(n)}}}}},ac=function(){return{restrict:"A",require:"?ngModel",link:function(n,t,i,r){if(r){var u=-1;i.$observe("maxlength",function(n){n=tt(n);u=isNaN(n)?-1:n;r.$validate()});r.$validators.maxlength=function(n,t){return 0>u||r.$isEmpty(t)||t.length<=u}}}}},vc=function(){return{restrict:"A",require:"?ngModel",link:function(n,t,i,r){if(r){var u=0;i.$observe("minlength",function(n){u=tt(n)||0;r.$validate()});r.$validators.minlength=function(n,t){return r.$isEmpty(t)||t.length>=u}}}}};n.angular.bootstrap?console.log("WARNING: Tried to load angular more than once."):(tl(),rl(ut),o(t).ready(function(){dc(t,no)}))}(window,document);window.angular.$$csp()||window.angular.element(document).find("head").prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}<\/style>');angular.element(document).find("head").prepend("<!--[if IE 8]><style>.ng-hide {display: none !important;}<\/style><![endif]-->"),function(){function d(n,t,i){for(var r=(i||0)-1,u=n?n.length:0;++r<u;)if(n[r]===t)return r;return-1}function ft(n,t){var i=typeof t,r;return(n=n.cache,i=="boolean"||t==null)?n[t]?0:-1:(i!="number"&&i!="string"&&(i="object"),r=i=="number"?t:ht+t,n=(n=n[i])&&n[r],i=="object"?n&&d(n,t)>-1?0:-1:n?0:-1)}function pi(n){var u=this.cache,t=typeof n,i,r;t=="boolean"||n==null?u[n]=!0:(t!="number"&&t!="string"&&(t="object"),i=t=="number"?n:ht+n,r=u[t]||(u[t]={}),t=="object"?(r[i]||(r[i]=[])).push(n):r[i]=!0)}function ni(n){return n.charCodeAt(0)}function wi(n,t){for(var f=n.criteria,e=t.criteria,u=-1,o=f.length,i,r;++u<o;)if(i=f[u],r=e[u],i!==r){if(i>r||typeof i=="undefined")return 1;if(i<r||typeof r=="undefined")return-1}return n.index-t.index}function at(n){var u=-1,r=n.length,f=n[0],e=n[r/2|0],o=n[r-1],t,i;if(f&&typeof f=="object"&&e&&typeof e=="object"&&o&&typeof o=="object")return!1;for(t=vt(),t["false"]=t["null"]=t["true"]=t.undefined=!1,i=vt(),i.array=n,i.cache=t,i.push=pi;++u<r;)i.push(n[u]);return i}function bi(n){return"\\"+vi[n]}function f(){return ot.pop()||[]}function vt(){return st.pop()||{array:null,cache:null,criteria:null,"false":!1,index:0,"null":!1,number:null,object:null,push:null,string:null,"true":!1,undefined:!1,value:null}}function et(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}function i(n){n.length=0;ot.length<pt&&ot.push(n)}function g(n){var t=n.cache;t&&g(t);n.array=n.cache=n.criteria=n.object=n.number=n.string=n.value=null;st.length<pt&&st.push(n)}function n(n,t,i){t||(t=0);typeof i=="undefined"&&(i=n?n.length:0);for(var r=-1,u=i-t||0,f=Array(u<0?0:u);++r<u;)f[r]=n[t+r];return f}function yt(b){function rt(n){return n&&typeof n=="object"&&!ot(n)&&vi.call(n,"__wrapped__")?n:new ar(n)}function ar(n,t){this.__chain__=!!t;this.__wrapped__=n}function us(t){function r(){var t,e,o;return(u&&(t=n(u),iu.apply(t,arguments)),this instanceof r)?(e=fu(i.prototype),o=i.apply(e,t||arguments),ki(o)?o:e):i.apply(f,t||arguments)}var i=t[0],u=t[2],f=t[4];return pu(r,t),r}function sf(t,r,e,o,s){var c,d,b,l,w,g,k;if(e&&(c=e(t),typeof c!="undefined"))return c;if(d=ki(t),d){if(b=pt.call(t),!u[b]||!ut.nodeClass&&et(t))return t;l=cr[b];switch(b){case a:case v:return new l(+t);case y:case h:return new l(t);case p:return c=l(t.source,oi.exec(t)),c.lastIndex=t.lastIndex,c}}else return t;if(w=ot(t),r){for(g=!o,o||(o=f()),s||(s=f()),k=o.length;k--;)if(o[k]==t)return s[k];c=w?l(t.length):{}}else c=w?n(t):bu({},t);return(w&&(vi.call(t,"index")&&(c.index=t.index),vi.call(t,"input")&&(c.input=t.input)),!r)?c:(o.push(t),s.push(c),(w?yi:er)(t,function(n,t){c[t]=sf(n,r,e,o,s)}),g&&(i(o),i(s)),c)}function fu(n){return ki(n)?au(n):{}}function ur(n,t,i){var r,u;if(typeof n!="function")return kf;if(typeof t=="undefined"||!("prototype"in n)||(r=n.__bindData__,typeof r=="undefined"&&(ut.funcNames&&(r=!n.name),r=r||!ut.funcDecomp,r||(u=ns.call(n),ut.funcNames||(r=!si.test(u)),r||(r=kt.test(u),pu(n,r)))),r===!1||r!==!0&&r[1]&1))return n;switch(i){case 1:return function(i){return n.call(t,i)};case 2:return function(i,r){return n.call(t,i,r)};case 3:return function(i,r,u){return n.call(t,i,r,u)};case 4:return function(i,r,u,f){return n.call(t,i,r,u,f)}}return eo(n,t)}function re(t){function f(){var y=c?o:this,t,p;return(e&&(t=n(e),iu.apply(t,arguments)),(u||h)&&(t||(t=n(arguments)),u&&iu.apply(t,u),h&&t.length<s))?(i|=16,re([r,a?i:i&-4,t,null,o,s])):(t||(t=arguments),l&&(r=y[v]),this instanceof f)?(y=fu(r.prototype),p=r.apply(y,t),ki(p)?p:y):r.apply(y,t)}var r=t[0],i=t[1],e=t[2],u=t[3],o=t[4],s=t[5],c=i&1,l=i&2,h=i&4,a=i&8,v=r;return pu(f,t),f}function eu(n,t){var e=-1,i=yu(),o=n?n.length:0,r=o>=ct&&i===d,s=[],u,f;for(r&&(u=at(t),u?(i=ft,t=u):r=!1);++e<o;)f=n[e],i(t,f)<0&&s.push(f);return r&&g(t),s}function vr(n,t,i,r){for(var e=(r||0)-1,h=n?n.length:0,f=[],u;++e<h;)if(u=n[e],u&&typeof u=="object"&&typeof u.length=="number"&&(ot(u)||nr(u))){t||(u=vr(u,t,i));var o=-1,s=u.length,c=f.length;for(f.length+=s;++o<s;)f[c++]=u[o]}else i||f.push(u);return f}function kr(n,t,u,o,s,w){var b,lt,at,d,it,rt,ft,ot,nt,tt,vt,g,k,ht,ct;if(u&&(b=u(n,t),typeof b!="undefined"))return!!b;if(n===t)return n!==0||1/n==1/t;if(lt=typeof n,at=typeof t,n===n&&!(n&&e[lt])&&!(t&&e[at]))return!1;if(n==null||t==null)return n===t;if(d=pt.call(n),it=pt.call(t),d==c&&(d=r),it==c&&(it=r),d!=it)return!1;switch(d){case a:case v:return+n==+t;case y:return n!=+n?t!=+t:n==0?1/n==1/t:n==+t;case p:case h:return n==sr(t)}if(rt=d==l,!rt){if(ft=vi.call(n,"__wrapped__"),ot=vi.call(t,"__wrapped__"),ft||ot)return kr(ft?n.__wrapped__:n,ot?t.__wrapped__:t,u,o,s,w);if(d!=r||!ut.nodeClass&&(et(n)||et(t))||(nt=!ut.argsObject&&nr(n)?rr:n.constructor,tt=!ut.argsObject&&nr(t)?rr:t.constructor,nt!=tt&&!(st(nt)&&nt instanceof nt&&st(tt)&&tt instanceof tt)&&"constructor"in n&&"constructor"in t))return!1}for(vt=!s,s||(s=f()),w||(w=f()),g=s.length;g--;)if(s[g]==n)return w[g]==t;if(k=0,b=!0,s.push(n),w.push(t),rt){if(g=n.length,k=t.length,b=k==g,b||o)while(k--)if(ht=g,ct=t[k],o){while(ht--)if(b=kr(n[ht],ct,u,o,s,w))break}else if(!(b=kr(n[k],ct,u,o,s,w)))break}else ir(t,function(t,i,r){if(vi.call(r,i))return k++,b=vi.call(n,i)&&kr(n[i],t,u,o,s,w)}),b&&!o&&ir(n,function(n,t,i){if(vi.call(i,t))return b=--k>-1});return s.pop(),w.pop(),vt&&(i(s),i(w)),b}function ue(n,t,i,r,u){(ot(t)?wr:er)(t,function(t,f){var c,l,o=t,e=n[f],s,h;if(t&&((l=ot(t))||du(t))){for(s=r.length;s--;)if(c=r[s]==t){e=u[s];break}c||(i&&(o=i(e,t),(h=typeof o!="undefined")&&(e=o)),h||(e=l?ot(e)?e:[]:du(e)?e:{}),r.push(t),u.push(e),h||ue(e,t,i,r,u))}else i&&(o=i(e,t),typeof o=="undefined"&&(o=t)),typeof o!="undefined"&&(e=o);n[f]=e})}function hf(n,t){return n+go(te()*(t-n+1))}function cf(n,t,r){var e=-1,c=yu(),a=n?n.length:0,l=[],o=!t&&a>=ct&&c===d,u=r||o?f():l,v,s,h;for(o&&(v=at(u),c=ft,u=v);++e<a;)s=n[e],h=r?r(s,e,n):s,(t?!e||u[u.length-1]!==h:c(u,h)<0)&&((r||o)&&u.push(h),l.push(s));return o?(i(u.array),g(u)):r&&i(u),l}function lf(n){return function(t,i,r){var f={},u,o,e;if(i=rt.createCallback(i,r,3),ot(t))for(u=-1,o=t.length;++u<o;)e=t[u],n(f,e,i(e,u,t),t);else yi(t,function(t,r,u){n(f,t,i(t,r,u),u)});return f}}function fr(t,i,r,u,f,e){var c=i&1,a=i&2,v=i&4,y=i&8,s=i&16,h=i&32,o,l;if(!a&&!st(t))throw new hr;return(s&&!r.length&&(i&=-17,s=r=!1),h&&!u.length&&(i&=-33,h=u=!1),o=t&&t.__bindData__,o&&o!==!0)?(o=n(o),o[2]&&(o[2]=n(o[2])),o[3]&&(o[3]=n(o[3])),!c||o[1]&1||(o[4]=f),!c&&o[1]&1&&(i|=8),!v||o[1]&4||(o[5]=e),s&&iu.apply(o[2]||(o[2]=[]),r),h&&ts.apply(o[3]||(o[3]=[]),u),o[1]|=i,fr.apply(null,o)):(l=i==1||i===17?us:re,l([t,i,r,u,f,e]))}function dr(){var n,i,r,u,f;for(t.shadowedProps=lt,t.array=t.bottom=t.loop=t.top="",t.init="iterable",t.useHas=!0,i=0;n=arguments[i];i++)for(r in n)t[r]=n[r];return u=t.args,t.firstArg=/^[^,]+/.exec(u)[0],f=gr("baseCreateCallback, errorClass, errorProto, hasOwnProperty, indicatorObject, isArguments, isArray, isString, keys, objectProto, objectTypes, nonEnumProps, stringClass, stringProto, toString","return function("+u+") {\n"+ie(t)+"\n}"),f(ur,dt,ff,vi,ii,nr,ot,or,t.keys,hu,e,pi,h,po,pt)}function fs(n){return vf[n]}function yu(){var n=(n=rt.indexOf)===to?d:n;return n}function yr(n){return typeof n=="function"&&bo.test(n)}function fe(n){var i,t;return!(n&&pt.call(n)==r)||(i=n.constructor,st(i)&&!(i instanceof i))||!ut.argsClass&&nr(n)||!ut.nodeClass&&et(n)?!1:ut.ownLast?(ir(n,function(n,i,r){return t=vi.call(r,i),!1}),t!==!1):(ir(n,function(n,i){t=i}),typeof t=="undefined"||vi.call(n,t))}function es(n){return se[n]}function nr(n){return n&&typeof n=="object"&&typeof n.length=="number"&&pt.call(n)==c||!1}function hs(n,t,i,r){return typeof t!="boolean"&&t!=null&&(r=i,i=t,t=!1),sf(n,t,typeof i=="function"&&ur(i,r,1))}function cs(n,t,i){return sf(n,!0,typeof t=="function"&&ur(t,i,1))}function ls(n,t){var i=fu(n);return t?bu(i,t):i}function as(n,t,i){var r;return t=rt.createCallback(t,i,3),er(n,function(n,i,u){if(t(n,i,u))return r=i,!1}),r}function vs(n,t,i){var r;return t=rt.createCallback(t,i,3),he(n,function(n,i,u){if(t(n,i,u))return r=i,!1}),r}function ys(n,t,i){var r=[],u;for(ir(n,function(n,t){r.push(t,n)}),u=r.length,t=ur(t,i,3);u--;)if(t(r[u--],r[u],n)===!1)break;return n}function he(n,t,i){var u=gi(n),f=u.length,r;for(t=ur(t,i,3);f--;)if(r=u[f],t(n[r],r,n)===!1)break;return n}function ou(n){var t=[];return ir(n,function(n,i){st(n)&&t.push(i)}),t.sort()}function ps(n,t){return n?vi.call(n,t):!1}function ce(n){for(var i=-1,r=gi(n),f=r.length,u={},t;++i<f;)t=r[i],u[n[t]]=t;return u}function ws(n){return n===!0||n===!1||n&&typeof n=="object"&&pt.call(n)==a||!1}function bs(n){return n&&typeof n=="object"&&pt.call(n)==v||!1}function ks(n){return n&&n.nodeType===1||!1}function ds(n){var i=!0,t,u;return n?(t=pt.call(n),u=n.length,t==l||t==h||(ut.argsClass?t==c:nr(n))||t==r&&typeof u=="number"&&st(n.splice))?!u:(er(n,function(){return i=!1}),i):i}function gs(n,t,i,r){return kr(n,t,typeof i=="function"&&ur(i,r,2))}function nh(n){return is(n)&&!rs(parseFloat(n))}function st(n){return typeof n=="function"}function ki(n){return!!(n&&e[typeof n])}function th(n){return le(n)&&n!=+n}function ih(n){return n===null}function le(n){return typeof n=="number"||n&&typeof n=="object"&&pt.call(n)==y||!1}function rh(n){return n&&e[typeof n]&&pt.call(n)==p||!1}function or(n){return typeof n=="string"||n&&typeof n=="object"&&pt.call(n)==h||!1}function uh(n){return typeof n=="undefined"}function fh(n,t,i){var r={};return t=rt.createCallback(t,i,3),er(n,function(n,i,u){r[i]=t(n,i,u)}),r}function eh(t){var u=arguments,r=2,e;if(!ki(t))return t;typeof u[2]!="number"&&(r=u.length);r>3&&typeof u[r-2]=="function"?e=ur(u[--r-1],u[r--],2):r>2&&typeof u[r-1]=="function"&&(e=u[--r]);for(var c=n(arguments,1,r),o=-1,s=f(),h=f();++o<r;)ue(t,c[o],e,s,h);return i(s),i(h),t}function oh(n,t,i){var u={},r,f,o,e;if(typeof t!="function")for(r=[],ir(n,function(n,t){r.push(t)}),r=eu(r,vr(arguments,!0,!1,1)),f=-1,o=r.length;++f<o;)e=r[f],u[e]=n[e];else t=rt.createCallback(t,i,3),ir(n,function(n,i,r){t(n,i,r)||(u[i]=n)});return u}function sh(n){for(var t=-1,r=gi(n),u=r.length,f=di(u),i;++t<u;)i=r[t],f[t]=[i,n[i]];return f}function hh(n,t,i){var u={},r;if(typeof t!="function")for(var f=-1,e=vr(arguments,!0,!1,1),o=ki(n)?e.length:0;++f<o;)r=e[f],r in n&&(u[r]=n[r]);else t=rt.createCallback(t,i,3),ir(n,function(n,i,r){t(n,i,r)&&(u[i]=n)});return u}function ch(n,t,i,r){var f=ot(n),u,e;return i==null&&(f?i=[]:(u=n&&n.constructor,e=u&&u.prototype,i=fu(e))),t&&(t=rt.createCallback(t,r,4),(f?yi:er)(n,function(n,r,u){return t(i,n,r,u)})),i}function gu(n){for(var t=-1,i=gi(n),r=i.length,u=di(r);++t<r;)u[t]=n[i[t]];return u}function lh(n){var t=arguments,i=-1,r=vr(t,!0,!1,1),u=t[2]&&t[2][t[1]]===n?1:r.length,f=di(u);for(ut.unindexedChars&&or(n)&&(n=n.split(""));++i<u;)f[i]=n[r[i]];return f}function ae(n,t,i){var e=-1,u=yu(),f=n?n.length:0,r=!1;return i=(i<0?tr(0,f+i):i)||0,ot(n)?r=u(n,t,i)>-1:typeof f=="number"?r=(or(n)?n.indexOf(t,i):u(n,t,i))>-1:yi(n,function(n){if(++e>=i)return!(r=n===t)}),r}function ye(n,t,i){var u=!0,r,f;if(t=rt.createCallback(t,i,3),ot(n)){for(r=-1,f=n.length;++r<f;)if(!(u=!!t(n[r],r,n)))break}else yi(n,function(n,i,r){return u=!!t(n,i,r)});return u}function nf(n,t,i){var u=[],r,e,f;if(t=rt.createCallback(t,i,3),ot(n))for(r=-1,e=n.length;++r<e;)f=n[r],t(f,r,n)&&u.push(f);else yi(n,function(n,i,r){t(n,i,r)&&u.push(n)});return u}function yf(n,t,i){var r,f,u,e;if(t=rt.createCallback(t,i,3),ot(n)){for(r=-1,f=n.length;++r<f;)if(u=n[r],t(u,r,n))return u}else return yi(n,function(n,i,r){if(t(n,i,r))return e=n,!1}),e}function ah(n,t,i){var r;return t=rt.createCallback(t,i,3),tf(n,function(n,i,u){if(t(n,i,u))return r=n,!1}),r}function wr(n,t,i){if(t&&typeof i=="undefined"&&ot(n)){for(var r=-1,u=n.length;++r<u;)if(t(n[r],r,n)===!1)break}else yi(n,t,i);return n}function tf(n,t,i){var f=n,r=n?n.length:0,u;if(t=t&&typeof i=="undefined"?t:ur(t,i,3),ot(n)){while(r--)if(t(n[r],r,n)===!1)break}else typeof r!="number"?(u=gi(n),r=u.length):ut.unindexedChars&&or(n)&&(f=n.split("")),yi(n,function(n,i,e){return i=u?u[--r]:--r,t(f[i],i,e)});return n}function vh(t,i){var f=n(arguments,2),e=-1,o=typeof i=="function",r=t?t.length:0,u=di(typeof r=="number"?r:0);return wr(t,function(n){u[++e]=(o?i:n[i]).apply(n,f)}),u}function su(n,t,i){var r=-1,u=n?n.length:0,f=di(typeof u=="number"?u:0);if(t=rt.createCallback(t,i,3),ot(n))while(++r<u)f[r]=t(n[r],r,n);else yi(n,function(n,i,u){f[++r]=t(n,i,u)});return f}function be(n,t,i){var u=-Infinity,r=u,f,o,e;if(typeof t!="function"&&i&&i[t]===n&&(t=null),t==null&&ot(n))for(f=-1,o=n.length;++f<o;)e=n[f],e>r&&(r=e);else t=t==null&&or(n)?ni:rt.createCallback(t,i,3),yi(n,function(n,i,f){var e=t(n,i,f);e>u&&(u=e,r=n)});return r}function yh(n,t,i){var u=Infinity,r=u,f,o,e;if(typeof t!="function"&&i&&i[t]===n&&(t=null),t==null&&ot(n))for(f=-1,o=n.length;++f<o;)e=n[f],e<r&&(r=e);else t=t==null&&or(n)?ni:rt.createCallback(t,i,3),yi(n,function(n,i,f){var e=t(n,i,f);e<u&&(u=e,r=n)});return r}function pf(n,t,i,r){var f=arguments.length<3,u,e;if(t=rt.createCallback(t,r,4),ot(n))for(u=-1,e=n.length,f&&(i=n[++u]);++u<e;)i=t(i,n[u],u,n);else yi(n,function(n,r,u){i=f?(f=!1,n):t(i,n,r,u)});return i}function ke(n,t,i,r){var u=arguments.length<3;return t=rt.createCallback(t,r,4),tf(n,function(n,r,f){i=u?(u=!1,n):t(i,n,r,f)}),i}function ph(n,t,i){return t=rt.createCallback(t,i,3),nf(n,function(n,i,r){return!t(n,i,r)})}function wh(n,t,i){if(n&&typeof n.length!="number"?n=gu(n):ut.unindexedChars&&or(n)&&(n=n.split("")),t==null||i)return n?n[hf(0,n.length-1)]:s;var r=de(n);return r.length=uu(tr(0,t),r.length),r}function de(n){var i=-1,r=n?n.length:0,t=di(typeof r=="number"?r:0);return wr(n,function(n){var r=hf(0,++i);t[i]=t[r];t[r]=n}),t}function bh(n){var t=n?n.length:0;return typeof t=="number"?t:gi(n).length}function ge(n,t,i){var u,r,f;if(t=rt.createCallback(t,i,3),ot(n)){for(r=-1,f=n.length;++r<f;)if(u=t(n[r],r,n))break}else yi(n,function(n,i,r){return!(u=t(n,i,r))});return!!u}function kh(n,t,r){var h=-1,s=ot(t),u=n?n.length:0,e=di(typeof u=="number"?u:0),o;for(s||(t=rt.createCallback(t,r,3)),wr(n,function(n,i,r){var u=e[++h]=vt();s?u.criteria=su(t,function(t){return n[t]}):(u.criteria=f())[0]=t(n,i,r);u.index=h;u.value=n}),u=e.length,e.sort(wi);u--;)o=e[u],e[u]=o.value,s||i(o.criteria),g(o);return e}function dh(t){return t&&typeof t.length=="number"?ut.unindexedChars&&or(t)?t.split(""):n(t):gu(t)}function gh(n){for(var i=-1,u=n?n.length:0,r=[],t;++i<u;)t=n[i],t&&r.push(t);return r}function nc(n){return eu(n,vr(arguments,!0,!0,1))}function tc(n,t,i){var r=-1,u=n?n.length:0;for(t=rt.createCallback(t,i,3);++r<u;)if(t(n[r],r,n))return r;return-1}function ic(n,t,i){var r=n?n.length:0;for(t=rt.createCallback(t,i,3);r--;)if(t(n[r],r,n))return r;return-1}function wf(t,i,r){var u=0,e=t?t.length:0,f;if(typeof i!="number"&&i!=null)for(f=-1,i=rt.createCallback(i,r,3);++f<e&&i(t[f],f,t);)u++;else if(u=i,u==null||r)return t?t[0]:s;return n(t,0,uu(tr(0,u),e))}function rc(n,t,i,r){return typeof t!="boolean"&&t!=null&&(r=i,i=typeof t!="function"&&r&&r[t]===n?null:t,t=!1),i!=null&&(n=su(n,i,r)),vr(n,t)}function to(n,t,i){var u,r;if(typeof i=="number")u=n?n.length:0,i=i<0?tr(0,u+i):i||0;else if(i)return r=io(n,t),n[r]===t?r:-1;return d(n,t,i)}function uc(t,i,r){var u=0,e=t?t.length:0,f;if(typeof i!="number"&&i!=null)for(f=e,i=rt.createCallback(i,r,3);f--&&i(t[f],f,t);)u++;else u=i==null||r?1:i||u;return n(t,0,uu(tr(0,e-u),e))}function fc(){for(var e=[],r=-1,o=arguments.length,u=f(),h=yu(),v=h===d,s=f(),n,t;++r<o;)n=arguments[r],(ot(n)||nr(n))&&(e.push(n),u.push(v&&n.length>=ct&&at(r?e[r]:s)));var c=e[0],l=-1,y=c?c.length:0,a=[];n:while(++l<y)if(t=u[0],n=c[l],(t?ft(t,n):h(s,n))<0){for(r=o,(t||s).push(n);--r;)if(t=u[r],(t?ft(t,n):h(e[r],n))<0)continue n;a.push(n)}while(o--)t=u[o],t&&g(t);return i(u),i(s),a}function ec(t,i,r){var u=0,e=t?t.length:0,f;if(typeof i!="number"&&i!=null)for(f=e,i=rt.createCallback(i,r,3);f--&&i(t[f],f,t);)u++;else if(u=i,u==null||r)return t?t[e-1]:s;return n(t,tr(0,e-u))}function oc(n,t,i){var r=n?n.length:0;for(typeof i=="number"&&(r=(i<0?tr(0,r+i):uu(i,r-1))+1);r--;)if(n[r]===t)return r;return-1}function sc(n){for(var i=arguments,r=0,e=i.length,u=n?n.length:0,t,f;++r<e;)for(t=-1,f=i[r];++t<u;)n[t]===f&&(gf.call(n,t--,1),u--);return n}function hc(n,t,i){n=+n||0;i=typeof i=="number"?i:+i||1;t==null&&(t=n,n=0);for(var r=-1,u=tr(0,ko((t-n)/(i||1))),f=di(u);++r<u;)f[r]=n,n+=i;return f}function cc(n,t,i){var r=-1,f=n?n.length:0,e=[],u;for(t=rt.createCallback(t,i,3);++r<f;)u=n[r],t(u,r,n)&&(e.push(u),gf.call(n,r--,1),f--);return e}function bf(t,i,r){if(typeof i!="number"&&i!=null){var u=0,f=-1,e=t?t.length:0;for(i=rt.createCallback(i,r,3);++f<e&&i(t[f],f,t);)u++}else u=i==null||r?1:tr(0,i);return n(t,u)}function io(n,t,i,r){var u=0,e=n?n.length:u,f;for(i=i?rt.createCallback(i,r,1):kf,t=i(t);u<e;)f=u+e>>>1,i(n[f])<t?u=f+1:e=f;return u}function lc(){return cf(vr(arguments,!0,!0))}function ro(n,t,i,r){return typeof t!="boolean"&&t!=null&&(r=i,i=typeof t!="function"&&r&&r[t]===n?null:t,t=!1),i!=null&&(i=rt.createCallback(i,r,3)),cf(n,t,i)}function ac(t){return eu(t,n(arguments,1))}function vc(){for(var i=-1,r=arguments.length,n,t;++i<r;)n=arguments[i],(ot(n)||nr(n))&&(t=t?cf(eu(t,n).concat(eu(n,t))):n);return t||[]}function uo(){for(var n=arguments.length>1?arguments:arguments[0],t=-1,i=n?be(rf(n,"length")):0,r=di(i<0?0:i);++t<i;)r[t]=rf(n,t);return r}function fo(n,t){var r=-1,f=n?n.length:0,u={},i;for(t||!f||ot(n[0])||(t=[]);++r<f;)i=n[r],t?u[i]=t[r]:i&&(u[i[0]]=i[1]);return u}function yc(n,t){if(!st(t))throw new hr;return function(){if(--n<1)return t.apply(this,arguments)}}function eo(t,i){return arguments.length>2?fr(t,17,n(arguments,2),null,i):fr(t,1,null,null,i)}function pc(n){for(var i=arguments.length>1?vr(arguments,!0,!1,1):ou(n),r=-1,u=i.length,t;++r<u;)t=i[r],n[t]=fr(n[t],1,null,null,n);return n}function wc(t,i){return arguments.length>2?fr(i,19,n(arguments,2),null,t):fr(i,3,null,null,t)}function bc(){for(var n=arguments,t=n.length;t--;)if(!st(n[t]))throw new hr;return function(){for(var t=arguments,i=n.length;i--;)t=[n[i].apply(this,t)];return t[0]}}function kc(n,t){return t=typeof t=="number"?t:+t||n.length,fr(n,4,null,null,null,t)}function oo(n,t,i){var f,u,o,h,e,r,y,c=0,l=!1,a=!0,v,p,w;if(!st(n))throw new hr;return t=tr(0,t)||0,i===!0?(v=!0,a=!1):ki(i)&&(v=i.leading,l="maxWait"in i&&(tr(t,i.maxWait)||0),a="trailing"in i?i.trailing:a),p=function(){var i=t-(pr()-h),l;i<=0?(u&&cu(u),l=y,u=r=y=s,l&&(c=pr(),o=n.apply(e,f),r||u||(f=e=null))):r=ru(p,i)},w=function(){r&&cu(r);u=r=y=s;(a||l!==t)&&(c=pr(),o=n.apply(e,f),r||u||(f=e=null))},function(){var b,s,i;return f=arguments,h=pr(),e=this,y=a&&(r||!v),l===!1?b=v&&!r:(u||v||(c=h),s=l-(h-c),i=s<=0,i?(u&&(u=cu(u)),c=h,o=n.apply(e,f)):u||(u=ru(w,s))),i&&r?r=cu(r):r||t===l||(r=ru(p,t)),b&&(i=!0,o=n.apply(e,f)),!i||r||u||(f=e=null),o}}function dc(t){if(!st(t))throw new hr;var i=n(arguments,1);return ru(function(){t.apply(s,i)},1)}function gc(t,i){if(!st(t))throw new hr;var r=n(arguments,2);return ru(function(){t.apply(s,r)},i)}function nl(n,t){if(!st(n))throw new hr;var i=function(){var r=i.cache,u=t?t.apply(this,arguments):ht+arguments[0];return vi.call(r,u)?r[u]:r[u]=n.apply(this,arguments)};return i.cache={},i}function tl(n){var i,t;if(!st(n))throw new hr;return function(){return i?t:(i=!0,t=n.apply(this,arguments),n=null,t)}}function il(t){return fr(t,16,n(arguments,1))}function rl(t){return fr(t,32,null,n(arguments,1))}function ul(n,t,i){var r=!0,u=!0;if(!st(n))throw new hr;return i===!1?r=!1:ki(i)&&(r="leading"in i?i.leading:r,u="trailing"in i?i.trailing:u),it.leading=r,it.maxWait=t,it.trailing=u,oo(n,t,it)}function fl(n,t){return fr(t,16,[n])}function el(n){return function(){return n}}function ol(n,t,i){var f=typeof n;if(n==null||f=="function")return ur(n,t,i);if(f!="object")return co(n);var u=gi(n),e=u[0],r=n[e];return u.length==1&&r===r&&!ki(r)?function(n){var t=n[e];return r===t&&(r!==0||1/r==1/t)}:function(t){for(var i=u.length,r=!1;i--;)if(!(r=kr(t[u[i]],n[u[i]],null,!0)))break;return r}}function sl(n){return n==null?"":sr(n).replace(ss,fs)}function kf(n){return n}function df(n,t,i){var u=!0,f=t&&ou(t),r,e;t&&(i||f.length)||(i==null&&(i=t),r=ar,t=n,n=rt,f=ou(t));i===!1?u=!1:ki(i)&&"chain"in i&&(u=i.chain);r=n;e=st(r);wr(f,function(i){var f=n[i]=t[i];e&&(r.prototype[i]=function(){var i=this.__chain__,e=this.__wrapped__,o=[e],t;if(iu.apply(o,arguments),t=f.apply(n,o),u||i){if(e===t&&ki(t))return this;t=new r(t);t.__chain__=i}return t})})}function hl(){return b._=wo,this}function so(){}function co(n){return function(t){return t[n]}}function cl(n,t,i){var f=n==null,r=t==null,u;return(i==null&&(typeof n=="boolean"&&r?(i=n,n=1):r||typeof t!="boolean"||(i=t,r=!0)),f&&r&&(t=1),n=+n||0,r?(t=n,n=0):t=+t||0,i||n%1||t%1)?(u=te(),uu(n+u*(t-n+parseFloat("1e-"+((u+"").length-1))),t)):hf(n,t)}function ll(n,t){if(n){var i=n[t];return st(i)?n[t]():i}}function al(n,t,i){var h=rt.templateSettings,u,o,v,f;n=sr(n||"");i=ku({},i,h);var c=ku({},i.imports,h.imports),p=gi(c),w=gu(c),e,l=0,a=i.interpolate||nt,r="__p += '",b=tu((i.escape||nt).source+"|"+a.source+"|"+(a===bt?ei:nt).source+"|"+(i.evaluate||nt).source+"|$","g");n.replace(b,function(t,i,u,f,o,s){return u||(u=f),r+=n.slice(l,s).replace(ci,bi),i&&(r+="' +\n__e("+i+") +\n'"),o&&(e=!0,r+="';\n"+o+";\n__p += '"),u&&(r+="' +\n((__t = ("+u+")) == null ? '' : __t) +\n'"),l=s+t.length,t});r+="';\n";u=i.variable;o=u;o||(u="obj",r="with ("+u+") {\n"+r+"\n}\n");r=(e?r.replace(ri,""):r).replace(ui,"$1").replace(fi,"$1;");r="function("+u+") {\n"+(o?"":u+" || ("+u+" = {});\n")+"var __t, __p = '', __e = _.escape"+(e?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+r+"return __p\n}";v="\n/*\n//# sourceURL="+(i.sourceURL||"/lodash/template/source["+ai+++"]")+"\n*/";try{f=gr(p,"return "+r+v).apply(s,w)}catch(y){y.source=r;throw y;}return t?f(t):(f.source=r,f)}function vl(n,t,i){n=(n=+n)>-1?n:0;var r=-1,u=di(n);for(t=ur(t,i,1);++r<n;)u[r]=t(r);return u}function yl(n){return n==null?"":sr(n).replace(os,es)}function pl(n){var t=++ti;return sr(n==null?"":n)+t}function wl(n){return n=new ar(n),n.__chain__=!0,n}function bl(n,t){return t(n),n}function kl(){return this.__chain__=!0,this}function dl(){return sr(this.__wrapped__)}function lo(){return this.__wrapped__}var pi,ut,ie,pu,ku,ir,er,du,ve,pe,we,rf,no,pr,ho;b=b?o.defaults(w.Object(),b,o.pick(w,li)):w;var di=b.Array,ao=b.Boolean,uf=b.Date,vo=b.Error,gr=b.Function,nu=b.Math,yo=b.Number,rr=b.Object,tu=b.RegExp,sr=b.String,hr=b.TypeError,lr=[],ff=vo.prototype,hu=rr.prototype,po=sr.prototype,wo=b._,pt=hu.toString,bo=tu("^"+sr(pt).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),ko=nu.ceil,cu=b.clearTimeout,go=nu.floor,ns=gr.prototype.toString,br=yr(br=rr.getPrototypeOf)&&br,vi=hu.hasOwnProperty,iu=lr.push,lu=hu.propertyIsEnumerable,ru=b.setTimeout,gf=lr.splice,ts=lr.unshift,ne=function(){try{var t={},n=yr(n=rr.defineProperty)&&n,i=n(t,t,t)&&n}catch(r){}return i}(),au=yr(au=rr.create)&&au,ef=yr(ef=di.isArray)&&ef,is=b.isFinite,rs=b.isNaN,vu=yr(vu=rr.keys)&&vu,tr=nu.max,uu=nu.min,of=b.parseInt,te=nu.random,cr={};cr[l]=di;cr[a]=ao;cr[v]=uf;cr[tt]=gr;cr[r]=rr;cr[y]=yo;cr[p]=tu;cr[h]=sr;pi={};pi[l]=pi[v]=pi[y]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0};pi[a]=pi[h]={constructor:!0,toString:!0,valueOf:!0};pi[dt]=pi[tt]=pi[p]={constructor:!0,toString:!0};pi[r]={constructor:!0},function(){for(var i=lt.length,t,n;i--;){t=lt[i];for(n in pi)vi.call(pi,n)&&!vi.call(pi[n],t)&&(pi[n][t]=!1)}}();ar.prototype=rt.prototype;ut=rt.support={},function(){var t=function(){this.x=1},u={"0":1,length:1},i=[],n;t.prototype={valueOf:1,y:1};for(n in new t)i.push(n);for(n in arguments);ut.argsClass=pt.call(arguments)==c;ut.argsObject=arguments.constructor==rr&&!(arguments instanceof di);ut.enumErrorProps=lu.call(ff,"message")||lu.call(ff,"name");ut.enumPrototypes=lu.call(t,"prototype");ut.funcDecomp=!yr(b.WinRTError)&&kt.test(yt);ut.funcNames=typeof gr.name=="string";ut.nonEnumArgs=n!=0;ut.nonEnumShadows=!/valueOf/.test(i);ut.ownLast=i[0]!="x";ut.spliceObjects=(lr.splice.call(u,0,1),!u[0]);ut.unindexedChars="x"[0]+rr("x")[0]!="xx";try{ut.nodeClass=!(pt.call(document)==r&&!({toString:0}+""))}catch(f){ut.nodeClass=!0}}(1);rt.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:bt,variable:"",imports:{_:rt}};ie=function(n){var t="var index, iterable = "+n.firstArg+", result = "+n.init+";\nif (!iterable) return result;\n"+n.top+";",i;if(n.array?(t+="\nvar length = iterable.length; index = -1;\nif ("+n.array+") {  ",ut.unindexedChars&&(t+="\n  if (isString(iterable)) {\n    iterable = iterable.split('')\n  }  "),t+="\n  while (++index < length) {\n    "+n.loop+";\n  }\n}\nelse {  "):ut.nonEnumArgs&&(t+="\n  var length = iterable.length; index = -1;\n  if (length && isArguments(iterable)) {\n    while (++index < length) {\n      index += '';\n      "+n.loop+";\n    }\n  } else {  "),ut.enumPrototypes&&(t+="\n  var skipProto = typeof iterable == 'function';\n  "),ut.enumErrorProps&&(t+="\n  var skipErrorProps = iterable === errorProto || iterable instanceof Error;\n  "),i=[],ut.enumPrototypes&&i.push('!(skipProto && index == "prototype")'),ut.enumErrorProps&&i.push('!(skipErrorProps && (index == "message" || index == "name"))'),n.useHas&&n.keys)t+="\n  var ownIndex = -1,\n      ownProps = objectTypes[typeof iterable] && keys(iterable),\n      length = ownProps ? ownProps.length : 0;\n\n  while (++ownIndex < length) {\n    index = ownProps[ownIndex];\n",i.length&&(t+="    if ("+i.join(" && ")+") {\n  "),t+=n.loop+";    ",i.length&&(t+="\n    }"),t+="\n  }  ";else if(t+="\n  for (index in iterable) {\n",n.useHas&&i.push("hasOwnProperty.call(iterable, index)"),i.length&&(t+="    if ("+i.join(" && ")+") {\n  "),t+=n.loop+";    ",i.length&&(t+="\n    }"),t+="\n  }    ",ut.nonEnumShadows){for(t+="\n\n  if (iterable !== objectProto) {\n    var ctor = iterable.constructor,\n        isProto = iterable === (ctor && ctor.prototype),\n        className = iterable === stringProto ? stringClass : iterable === errorProto ? errorClass : toString.call(iterable),\n        nonEnum = nonEnumProps[className];\n      ",k=0;k<7;k++)t+="\n    index = '"+n.shadowedProps[k]+"';\n    if ((!(isProto && nonEnum[index]) && hasOwnProperty.call(iterable, index))",n.useHas||(t+=" || (!nonEnum[index] && iterable[index] !== objectProto[index])"),t+=") {\n      "+n.loop+";\n    }      ";t+="\n  }    "}return(n.array||ut.nonEnumArgs)&&(t+="\n}"),t+(n.bottom+";\nreturn result")};au||(fu=function(){function n(){}return function(t){if(ki(t)){n.prototype=t;n.prototype=null}return{}||b.Object()}}());pu=ne?function(n,t){gt.value=t;ne(n,"__bindData__",gt)}:so;ut.argsClass||(nr=function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&vi.call(n,"callee")&&!lu.call(n,"callee")||!1});var ot=ef||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&pt.call(n)==l||!1},ee=dr({args:"object",init:"[]",top:"if (!(objectTypes[typeof object])) return result",loop:"result.push(index)"}),gi=vu?function(n){return ki(n)?ut.enumPrototypes&&typeof n=="function"||ut.nonEnumArgs&&n.length&&nr(n)?ee(n):vu(n):[]}:ee,wu={args:"collection, callback, thisArg",top:"callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3)",array:"typeof length == 'number'",keys:gi,loop:"if (callback(iterable[index], index, collection) === false) return result"},af={args:"object, source, guard",top:"var args = arguments,\n    argsIndex = 0,\n    argsLength = typeof guard == 'number' ? 2 : args.length;\nwhile (++argsIndex < argsLength) {\n  iterable = args[argsIndex];\n  if (iterable && objectTypes[typeof iterable]) {",keys:gi,loop:"if (typeof result[index] == 'undefined') result[index] = iterable[index]",bottom:"  }\n}"},oe={top:"if (!objectTypes[typeof iterable]) return result;\n"+wu.top,array:!1},vf={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},se=ce(vf),os=tu("("+gi(se).join("|")+")","g"),ss=tu("["+gi(vf).join("")+"]","g"),yi=dr(wu),bu=dr(af,{top:af.top.replace(";",";\nif (argsLength > 3 && typeof args[argsLength - 2] == 'function') {\n  var callback = baseCreateCallback(args[--argsLength - 1], args[argsLength--], 2);\n} else if (argsLength > 2 && typeof args[argsLength - 1] == 'function') {\n  callback = args[--argsLength];\n}"),loop:"result[index] = callback ? callback(result[index], iterable[index]) : iterable[index]"});return ku=dr(af),ir=dr(wu,oe,{useHas:!1}),er=dr(wu,oe),st(/x/)&&(st=function(n){return typeof n=="function"&&pt.call(n)==tt}),du=br?function(n){if(!(n&&pt.call(n)==r)||!ut.argsClass&&nr(n))return!1;var i=n.valueOf,t=yr(i)&&(t=br(i))&&br(t);return t?n==t||br(n)==t:fe(n)}:fe,ve=lf(function(n,t,i){vi.call(n,i)?n[i]++:n[i]=1}),pe=lf(function(n,t,i){(vi.call(n,i)?n[i]:n[i]=[]).push(t)}),we=lf(function(n,t,i){n[i]=t}),rf=su,no=nf,pr=yr(pr=uf.now)&&pr||function(){return(new uf).getTime()},ho=of(wt+"08")==8?of:function(n,t){return of(or(n)?n.replace(hi,""):n,t||0)},rt.after=yc,rt.assign=bu,rt.at=lh,rt.bind=eo,rt.bindAll=pc,rt.bindKey=wc,rt.chain=wl,rt.compact=gh,rt.compose=bc,rt.constant=el,rt.countBy=ve,rt.create=ls,rt.createCallback=ol,rt.curry=kc,rt.debounce=oo,rt.defaults=ku,rt.defer=dc,rt.delay=gc,rt.difference=nc,rt.filter=nf,rt.flatten=rc,rt.forEach=wr,rt.forEachRight=tf,rt.forIn=ir,rt.forInRight=ys,rt.forOwn=er,rt.forOwnRight=he,rt.functions=ou,rt.groupBy=pe,rt.indexBy=we,rt.initial=uc,rt.intersection=fc,rt.invert=ce,rt.invoke=vh,rt.keys=gi,rt.map=su,rt.mapValues=fh,rt.max=be,rt.memoize=nl,rt.merge=eh,rt.min=yh,rt.omit=oh,rt.once=tl,rt.pairs=sh,rt.partial=il,rt.partialRight=rl,rt.pick=hh,rt.pluck=rf,rt.property=co,rt.pull=sc,rt.range=hc,rt.reject=ph,rt.remove=cc,rt.rest=bf,rt.shuffle=de,rt.sortBy=kh,rt.tap=bl,rt.throttle=ul,rt.times=vl,rt.toArray=dh,rt.transform=ch,rt.union=lc,rt.uniq=ro,rt.values=gu,rt.where=no,rt.without=ac,rt.wrap=fl,rt.xor=vc,rt.zip=uo,rt.zipObject=fo,rt.collect=su,rt.drop=bf,rt.each=wr,rt.eachRight=tf,rt.extend=bu,rt.methods=ou,rt.object=fo,rt.select=nf,rt.tail=bf,rt.unique=ro,rt.unzip=uo,df(rt),rt.clone=hs,rt.cloneDeep=cs,rt.contains=ae,rt.escape=sl,rt.every=ye,rt.find=yf,rt.findIndex=tc,rt.findKey=as,rt.findLast=ah,rt.findLastIndex=ic,rt.findLastKey=vs,rt.has=ps,rt.identity=kf,rt.indexOf=to,rt.isArguments=nr,rt.isArray=ot,rt.isBoolean=ws,rt.isDate=bs,rt.isElement=ks,rt.isEmpty=ds,rt.isEqual=gs,rt.isFinite=nh,rt.isFunction=st,rt.isNaN=th,rt.isNull=ih,rt.isNumber=le,rt.isObject=ki,rt.isPlainObject=du,rt.isRegExp=rh,rt.isString=or,rt.isUndefined=uh,rt.lastIndexOf=oc,rt.mixin=df,rt.noConflict=hl,rt.noop=so,rt.now=pr,rt.parseInt=ho,rt.random=cl,rt.reduce=pf,rt.reduceRight=ke,rt.result=ll,rt.runInContext=yt,rt.size=bh,rt.some=ge,rt.sortedIndex=io,rt.template=al,rt.unescape=yl,rt.uniqueId=pl,rt.all=ye,rt.any=ge,rt.detect=yf,rt.findWhere=yf,rt.foldl=pf,rt.foldr=ke,rt.include=ae,rt.inject=pf,df(function(){var n={};return er(rt,function(t,i){rt.prototype[i]||(n[i]=t)}),n}(),!1),rt.first=wf,rt.last=ec,rt.sample=wh,rt.take=wf,rt.head=wf,er(rt,function(n,t){var i=t!=="sample";rt.prototype[t]||(rt.prototype[t]=function(t,r){var u=this.__chain__,f=n(this.__wrapped__,t,r);return!u&&(t==null||r&&!(i&&typeof t=="function"))?f:new ar(f,u)})}),rt.VERSION="2.4.1",rt.prototype.chain=kl,rt.prototype.toString=dl,rt.prototype.value=lo,rt.prototype.valueOf=lo,yi(["join","pop","shift"],function(n){var t=lr[n];rt.prototype[n]=function(){var n=this.__chain__,i=t.apply(this.__wrapped__,arguments);return n?new ar(i,n):i}}),yi(["push","reverse","sort","unshift"],function(n){var t=lr[n];rt.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),yi(["concat","slice","splice"],function(n){var t=lr[n];rt.prototype[n]=function(){return new ar(t.apply(this.__wrapped__,arguments),this.__chain__)}}),ut.spliceObjects||yi(["pop","shift","splice"],function(n){var t=lr[n],i=n=="splice";rt.prototype[n]=function(){var r=this.__chain__,n=this.__wrapped__,u=t.apply(n,arguments);return n.length===0&&delete n[0],r||i?new ar(u,r):u}}),rt}var s,ot=[],st=[],ti=0,ii={},ht=+new Date+"",ct=75,pt=40,wt=" \t\x0b\f ﻿\n\r\u2028\u2029 ᠎             　",ri=/\b__p \+= '';/g,ui=/\b(__p \+=) '' \+/g,fi=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ei=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,oi=/\w*$/,si=/^\s*function[ \n\r\t]+\w/,bt=/<%=([\s\S]+?)%>/g,hi=RegExp("^["+wt+"]*0+(?=.$)"),nt=/($^)/,kt=/\bthis\b/,ci=/['\n\r\t\u2028\u2029\\]/g,li=["Array","Boolean","Date","Error","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"],lt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ai=0,c="[object Arguments]",l="[object Array]",a="[object Boolean]",v="[object Date]",dt="[object Error]",tt="[object Function]",y="[object Number]",r="[object Object]",p="[object RegExp]",h="[object String]",u={},o;u[tt]=!1;u[c]=u[l]=u[a]=u[v]=u[y]=u[r]=u[p]=u[h]=!0;var it={leading:!1,maxWait:0,trailing:!1},gt={configurable:!1,enumerable:!1,value:null,writable:!1},t={args:"",array:null,bottom:"",firstArg:"",init:"",keys:null,loop:"",shadowedProps:null,support:null,top:"",useHas:!1},e={boolean:!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},vi={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},w=e[typeof window]&&window||this,rt=e[typeof exports]&&exports&&!exports.nodeType&&exports,ut=e[typeof module]&&module&&!module.nodeType&&module,yi=ut&&ut.exports===rt&&rt,b=e[typeof global]&&global;b&&(b.global===b||b.window===b)&&(w=b);o=yt();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(w._=o,define(function(){return o})):rt&&ut?yi?(ut.exports=o)._=o:rt._=o:w._=o}.call(this),function(n){function g(n,t,i){switch(arguments.length){case 2:return null!=n?n:t;case 3:return null!=n?n:null!=t?t:i;default:throw new Error("Implement me");}}function p(n,t){return nf.call(n,t)}function st(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function ni(n){t.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+n)}function e(n,t){var i=!0;return w(function(){return i&&(ni(n),i=!1),t.apply(this,arguments)},t)}function br(n,t){pr[n]||(ni(t),pr[n]=!0)}function ti(n,t){return function(i){return r(n.call(this,i),t)}}function kr(n,t){return function(i){return this.localeData().ordinal(n.call(this,i),t)}}function ii(){}function rt(n,t){t!==!1&&ai(n);ri(this,n);this._d=new Date(+n._d)}function ht(n){var i=si(n),r=i.year||0,u=i.quarter||0,f=i.month||0,e=i.week||0,o=i.day||0,s=i.hour||0,h=i.minute||0,c=i.second||0,l=i.millisecond||0;this._milliseconds=+l+1e3*c+6e4*h+36e5*s;this._days=+o+7*e;this._months=+f+3*u+12*r;this._data={};this._locale=t.localeData();this._bubble()}function w(n,t){for(var i in t)p(t,i)&&(n[i]=t[i]);return p(t,"toString")&&(n.toString=t.toString),p(t,"valueOf")&&(n.valueOf=t.valueOf),n}function ri(n,t){var u,i,r;if("undefined"!=typeof t._isAMomentObject&&(n._isAMomentObject=t._isAMomentObject),"undefined"!=typeof t._i&&(n._i=t._i),"undefined"!=typeof t._f&&(n._f=t._f),"undefined"!=typeof t._l&&(n._l=t._l),"undefined"!=typeof t._strict&&(n._strict=t._strict),"undefined"!=typeof t._tzm&&(n._tzm=t._tzm),"undefined"!=typeof t._isUTC&&(n._isUTC=t._isUTC),"undefined"!=typeof t._offset&&(n._offset=t._offset),"undefined"!=typeof t._pf&&(n._pf=t._pf),"undefined"!=typeof t._locale&&(n._locale=t._locale),et.length>0)for(u in et)i=et[u],r=t[i],"undefined"!=typeof r&&(n[i]=r);return n}function o(n){return 0>n?Math.ceil(n):Math.floor(n)}function r(n,t,i){for(var r=""+Math.abs(n),u=n>=0;r.length<t;)r="0"+r;return(u?i?"+":"":"-")+r}function ui(n,t){var i={milliseconds:0,months:0};return i.months=t.month()-n.month()+12*(t.year()-n.year()),n.clone().add(i.months,"M").isAfter(t)&&--i.months,i.milliseconds=+t-+n.clone().add(i.months,"M"),i}function dr(n,t){var i;return t=ft(t,n),n.isBefore(t)?i=ui(n,t):(i=ui(t,n),i.milliseconds=-i.milliseconds,i.months=-i.months),i}function fi(n,i){return function(r,u){var f,e;return null===u||isNaN(+u)||(br(i,"moment()."+i+"(period, number) is deprecated. Please use moment()."+i+"(number, period)."),e=r,r=u,u=e),r="string"==typeof r?+r:r,f=t.duration(r,u),ei(this,f,n),this}}function ei(n,i,r,u){var o=i._milliseconds,f=i._days,e=i._months;u=null==u?!0:u;o&&n._d.setTime(+n._d+o*r);f&&tr(n,"Date",pt(n,"Date")+f*r);e&&nr(n,pt(n,"Month")+e*r);u&&t.updateOffset(n,f||e)}function ut(n){return"[object Array]"===Object.prototype.toString.call(n)}function gr(n){return"[object Date]"===Object.prototype.toString.call(n)||n instanceof Date}function oi(n,t,r){for(var e=Math.min(n.length,t.length),o=Math.abs(n.length-t.length),f=0,u=0;e>u;u++)(r&&n[u]!==t[u]||!r&&i(n[u])!==i(t[u]))&&f++;return f+o}function f(n){if(n){var t=n.toLowerCase().replace(/(.)s$/,"$1");n=kf[n]||df[t]||t}return n}function si(n){var i,t,r={};for(t in n)p(n,t)&&(i=f(t),i&&(r[i]=n[t]));return r}function nu(i){var r,u;if(0===i.indexOf("week"))r=7,u="day";else{if(0!==i.indexOf("month"))return;r=12;u="month"}t[i]=function(f,e){var o,s,c=t._locale[i],h=[];if("number"==typeof f&&(e=f,f=n),s=function(n){var i=t().utc().set(u,n);return c.call(t._locale,i,f||"")},null!=e)return s(e);for(o=0;r>o;o++)h.push(s(o));return h}}function i(n){var t=+n,i=0;return 0!==t&&isFinite(t)&&(i=t>=0?Math.floor(t):Math.ceil(t)),i}function ct(n,t){return new Date(Date.UTC(n,t+1,0)).getUTCDate()}function hi(n,i,r){return b(t([n,11,31+i-r]),i,r).week}function ci(n){return li(n)?366:365}function li(n){return n%4==0&&n%100!=0||n%400==0}function ai(n){var t;n._a&&-2===n._pf.overflow&&(t=n._a[l]<0||n._a[l]>11?l:n._a[s]<1||n._a[s]>ct(n._a[c],n._a[l])?s:n._a[a]<0||n._a[a]>23?a:n._a[nt]<0||n._a[nt]>59?nt:n._a[tt]<0||n._a[tt]>59?tt:n._a[it]<0||n._a[it]>999?it:-1,n._pf._overflowDayOfYear&&(c>t||t>s)&&(t=s),n._pf.overflow=t)}function vi(n){return null==n._isValid&&(n._isValid=!isNaN(n._d.getTime())&&n._pf.overflow<0&&!n._pf.empty&&!n._pf.invalidMonth&&!n._pf.nullInput&&!n._pf.invalidFormat&&!n._pf.userInvalidated,n._strict&&(n._isValid=n._isValid&&0===n._pf.charsLeftOver&&0===n._pf.unusedTokens.length)),n._isValid}function yi(n){return n?n.toLowerCase().replace("_","-"):n}function tu(n){for(var i,t,f,r,u=0;u<n.length;){for(r=yi(n[u]).split("-"),i=r.length,t=yi(n[u+1]),t=t?t.split("-"):null;i>0;){if(f=pi(r.slice(0,i).join("-")))return f;if(t&&t.length>=i&&oi(r,t,!0)>=i-1)break;i--}u++}return null}function pi(n){var i=null;if(!d[n]&&er)try{i=t.locale();require("./locale/"+n);t.locale(i)}catch(r){}return d[n]}function ft(n,i){return i._isUTC?t(n).zone(i._offset||0):t(n).local()}function iu(n){return n.match(/\[[\s\S]/)?n.replace(/^\[|\]$/g,""):n.replace(/\\/g,"")}function ru(n){for(var i=n.match(or),t=0,r=i.length;r>t;t++)i[t]=v[i[t]]?v[i[t]]:iu(i[t]);return function(u){var f="";for(t=0;r>t;t++)f+=i[t]instanceof Function?i[t].call(u,n):i[t];return f}}function lt(n,t){return n.isValid()?(t=wi(t,n.localeData()),gt[t]||(gt[t]=ru(t)),gt[t](n)):n.localeData().invalidDate()}function wi(n,t){function r(n){return t.longDateFormat(n)||n}var i=5;for(ot.lastIndex=0;i>=0&&ot.test(n);)n=n.replace(ot,r),ot.lastIndex=0,i-=1;return n}function uu(n,t){var i=t._strict;switch(n){case"Q":return hr;case"DDDD":return lr;case"YYYY":case"GGGG":case"gggg":return i?vf:ef;case"Y":case"G":case"g":return pf;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return i?yf:of;case"S":if(i)return hr;case"SS":if(i)return cr;case"SSS":if(i)return lr;case"DDD":return ff;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return hf;case"a":case"A":return t._locale._meridiemParse;case"X":return lf;case"Z":case"ZZ":return bt;case"T":return cf;case"SSSS":return sf;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return i?cr:sr;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return sr;case"Do":return af;default:return new RegExp(cu(hu(n.replace("\\","")),"i"))}}function bi(n){n=n||"";var r=n.match(bt)||[],f=r[r.length-1]||[],t=(f+"").match(bf)||["-",0,0],u=+(60*t[1])+i(t[2]);return"+"===t[0]?-u:u}function fu(n,r,u){var e,f=u._a;switch(n){case"Q":null!=r&&(f[l]=3*(i(r)-1));break;case"M":case"MM":null!=r&&(f[l]=i(r)-1);break;case"MMM":case"MMMM":e=u._locale.monthsParse(r);null!=e?f[l]=e:u._pf.invalidMonth=r;break;case"D":case"DD":null!=r&&(f[s]=i(r));break;case"Do":null!=r&&(f[s]=i(parseInt(r,10)));break;case"DDD":case"DDDD":null!=r&&(u._dayOfYear=i(r));break;case"YY":f[c]=t.parseTwoDigitYear(r);break;case"YYYY":case"YYYYY":case"YYYYYY":f[c]=i(r);break;case"a":case"A":u._isPm=u._locale.isPM(r);break;case"H":case"HH":case"h":case"hh":f[a]=i(r);break;case"m":case"mm":f[nt]=i(r);break;case"s":case"ss":f[tt]=i(r);break;case"S":case"SS":case"SSS":case"SSSS":f[it]=i(1e3*("0."+r));break;case"X":u._d=new Date(1e3*parseFloat(r));break;case"Z":case"ZZ":u._useUTC=!0;u._tzm=bi(r);break;case"dd":case"ddd":case"dddd":e=u._locale.weekdaysParse(r);null!=e?(u._w=u._w||{},u._w.d=e):u._pf.invalidWeekday=r;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":n=n.substr(0,1);case"gggg":case"GGGG":case"GGGGG":n=n.substr(0,2);r&&(u._w=u._w||{},u._w[n]=i(r));break;case"gg":case"GG":u._w=u._w||{};u._w[n]=t.parseTwoDigitYear(r)}}function eu(n){var i,o,f,u,r,e,s;i=n._w;null!=i.GG||null!=i.W||null!=i.E?(r=1,e=4,o=g(i.GG,n._a[c],b(t(),1,4).year),f=g(i.W,1),u=g(i.E,1)):(r=n._locale._week.dow,e=n._locale._week.doy,o=g(i.gg,n._a[c],b(t(),r,e).year),f=g(i.w,1),null!=i.d?(u=i.d,r>u&&++f):u=null!=i.e?i.e+r:r);s=du(o,f,u,e,r);n._a[c]=s.year;n._dayOfYear=s.dayOfYear}function at(n){var t,i,r,u,f=[];if(!n._d){for(r=su(n),n._w&&null==n._a[s]&&null==n._a[l]&&eu(n),n._dayOfYear&&(u=g(n._a[c],r[c]),n._dayOfYear>ci(u)&&(n._pf._overflowDayOfYear=!0),i=yt(u,0,n._dayOfYear),n._a[l]=i.getUTCMonth(),n._a[s]=i.getUTCDate()),t=0;3>t&&null==n._a[t];++t)n._a[t]=f[t]=r[t];for(;7>t;t++)n._a[t]=f[t]=null==n._a[t]?2===t?1:0:n._a[t];n._d=(n._useUTC?yt:pu).apply(null,f);null!=n._tzm&&n._d.setUTCMinutes(n._d.getUTCMinutes()+n._tzm)}}function ou(n){var t;n._d||(t=si(n._i),n._a=[t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond],at(n))}function su(n){var t=new Date;return n._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function vt(n){if(n._f===t.ISO_8601)return void ki(n);n._a=[];n._pf.empty=!0;for(var i,u,o,r=""+n._i,h=r.length,s=0,e=wi(n._f,n._locale).match(or)||[],f=0;f<e.length;f++)u=e[f],i=(r.match(uu(u,n))||[])[0],i&&(o=r.substr(0,r.indexOf(i)),o.length>0&&n._pf.unusedInput.push(o),r=r.slice(r.indexOf(i)+i.length),s+=i.length),v[u]?(i?n._pf.empty=!1:n._pf.unusedTokens.push(u),fu(u,i,n)):n._strict&&!i&&n._pf.unusedTokens.push(u);n._pf.charsLeftOver=h-s;r.length>0&&n._pf.unusedInput.push(r);n._isPm&&n._a[a]<12&&(n._a[a]+=12);n._isPm===!1&&12===n._a[a]&&(n._a[a]=0);at(n);ai(n)}function hu(n){return n.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(n,t,i,r,u){return t||i||r||u})}function cu(n){return n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function lu(n){var t,f,u,r,i;if(0===n._f.length)return n._pf.invalidFormat=!0,void(n._d=new Date(NaN));for(r=0;r<n._f.length;r++)i=0,t=ri({},n),null!=n._useUTC&&(t._useUTC=n._useUTC),t._pf=st(),t._f=n._f[r],vt(t),vi(t)&&(i+=t._pf.charsLeftOver,i+=10*t._pf.unusedTokens.length,t._pf.score=i,(null==u||u>i)&&(u=i,f=t));w(n,f||t)}function ki(n){var t,i,r=n._i,u=wf.exec(r);if(u){for(n._pf.iso=!0,t=0,i=kt.length;i>t;t++)if(kt[t][1].exec(r)){n._f=kt[t][0]+(u[6]||" ");break}for(t=0,i=dt.length;i>t;t++)if(dt[t][1].exec(r)){n._f+=dt[t][0];break}r.match(bt)&&(n._f+="Z");vt(n)}else n._isValid=!1}function au(n){ki(n);n._isValid===!1&&(delete n._isValid,t.createFromInputFallback(n))}function vu(n,t){for(var r=[],i=0;i<n.length;++i)r.push(t(n[i],i));return r}function yu(i){var u,r=i._i;r===n?i._d=new Date:gr(r)?i._d=new Date(+r):null!==(u=tf.exec(r))?i._d=new Date(+u[1]):"string"==typeof r?au(i):ut(r)?(i._a=vu(r.slice(0),function(n){return parseInt(n,10)}),at(i)):"object"==typeof r?ou(i):"number"==typeof r?i._d=new Date(r):t.createFromInputFallback(i)}function pu(n,t,i,r,u,f,e){var o=new Date(n,t,i,r,u,f,e);return 1970>n&&o.setFullYear(n),o}function yt(n){var t=new Date(Date.UTC.apply(null,arguments));return 1970>n&&t.setUTCFullYear(n),t}function wu(n,t){if("string"==typeof n)if(isNaN(n)){if(n=t.weekdaysParse(n),"number"!=typeof n)return null}else n=parseInt(n,10);return n}function bu(n,t,i,r,u){return u.relativeTime(t||1,!!i,n,r)}function ku(n,i,r){var u=t.duration(n).abs(),c=k(u.as("s")),e=k(u.as("m")),o=k(u.as("h")),s=k(u.as("d")),h=k(u.as("M")),l=k(u.as("y")),f=c<y.s&&["s",c]||1===e&&["m"]||e<y.m&&["mm",e]||1===o&&["h"]||o<y.h&&["hh",o]||1===s&&["d"]||s<y.d&&["dd",s]||1===h&&["M"]||h<y.M&&["MM",h]||1===l&&["y"]||["yy",l];return f[2]=i,f[3]=+n>0,f[4]=r,bu.apply({},f)}function b(n,i,r){var f,e=r-i,u=r-n.day();return u>e&&(u-=7),e-7>u&&(u+=7),f=t(n).add(u,"d"),{week:Math.ceil(f.dayOfYear()/7),year:f.year()}}function du(n,t,i,r,u){var o,e,f=yt(n,0,1).getUTCDay();return f=0===f?7:f,i=null!=i?i:u,o=u-f+(f>r?7:0)-(u>f?7:0),e=7*(t-1)+(i-u)+o+1,{year:e>0?n:n-1,dayOfYear:e>0?e:ci(n-1)+e}}function di(i){var r=i._i,u=i._f;return i._locale=i._locale||t.localeData(i._l),null===r||u===n&&""===r?t.invalid({nullInput:!0}):("string"==typeof r&&(i._i=r=i._locale.preparse(r)),t.isMoment(r)?new rt(r,!0):(u?ut(u)?lu(i):vt(i):yu(i),new rt(i)))}function gi(n,i){var u,r;if(1===i.length&&ut(i[0])&&(i=i[0]),!i.length)return t();for(u=i[0],r=1;r<i.length;++r)i[r][n](u)&&(u=i[r]);return u}function nr(n,t){var i;return"string"==typeof t&&(t=n.localeData().monthsParse(t),"number"!=typeof t)?n:(i=Math.min(n.date(),ct(n.year(),t)),n._d["set"+(n._isUTC?"UTC":"")+"Month"](t,i),n)}function pt(n,t){return n._d["get"+(n._isUTC?"UTC":"")+t]()}function tr(n,t,i){return"Month"===t?nr(n,i):n._d["set"+(n._isUTC?"UTC":"")+t](i)}function h(n,i){return function(r){return null!=r?(tr(this,n,r),t.updateOffset(this,i),this):pt(this,n)}}function ir(n){return 400*n/146097}function rr(n){return 146097*n/400}function gu(n){t.duration.fn[n]=function(){return this._data[n]}}function ur(n){"undefined"==typeof ender&&(fr=wt.moment,wt.moment=n?e("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.",t):t)}for(var t,fr,u,wt="undefined"!=typeof global?global:this,k=Math.round,nf=Object.prototype.hasOwnProperty,c=0,l=1,s=2,a=3,nt=4,tt=5,it=6,d={},et=[],er="undefined"!=typeof module&&module.exports,tf=/^\/?Date\((\-?\d+)/i,rf=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,uf=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,or=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|X|zz?|ZZ?|.)/g,ot=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,sr=/\d\d?/,ff=/\d{1,3}/,ef=/\d{1,4}/,of=/[+\-]?\d{1,6}/,sf=/\d+/,hf=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,bt=/Z|[\+\-]\d\d:?\d\d/gi,cf=/T/i,lf=/[\+\-]?\d+(\.\d{1,3})?/,af=/\d{1,2}/,hr=/\d/,cr=/\d\d/,lr=/\d{3}/,vf=/\d{4}/,yf=/[+-]?\d{6}/,pf=/[+-]?\d+/,wf=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,kt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],dt=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],bf=/([\+\-]|\d\d)/gi,ar=("Date|Hours|Minutes|Seconds|Milliseconds".split("|"),{Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6}),kf={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",Q:"quarter",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},df={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},gt={},y={s:45,m:45,h:22,d:26,M:11},vr="DDD w W M D d".split(" "),yr="M D H h m s w W".split(" "),v={M:function(){return this.month()+1},MMM:function(n){return this.localeData().monthsShort(this,n)},MMMM:function(n){return this.localeData().months(this,n)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(n){return this.localeData().weekdaysMin(this,n)},ddd:function(n){return this.localeData().weekdaysShort(this,n)},dddd:function(n){return this.localeData().weekdays(this,n)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return r(this.year()%100,2)},YYYY:function(){return r(this.year(),4)},YYYYY:function(){return r(this.year(),5)},YYYYYY:function(){var n=this.year(),t=n>=0?"+":"-";return t+r(Math.abs(n),6)},gg:function(){return r(this.weekYear()%100,2)},gggg:function(){return r(this.weekYear(),4)},ggggg:function(){return r(this.weekYear(),5)},GG:function(){return r(this.isoWeekYear()%100,2)},GGGG:function(){return r(this.isoWeekYear(),4)},GGGGG:function(){return r(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return i(this.milliseconds()/100)},SS:function(){return r(i(this.milliseconds()/10),2)},SSS:function(){return r(this.milliseconds(),3)},SSSS:function(){return r(this.milliseconds(),3)},Z:function(){var n=-this.zone(),t="+";return 0>n&&(n=-n,t="-"),t+r(i(n/60),2)+":"+r(i(n)%60,2)},ZZ:function(){var n=-this.zone(),t="+";return 0>n&&(n=-n,t="-"),t+r(i(n/60),2)+r(i(n)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()},Q:function(){return this.quarter()}},pr={},wr=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];vr.length;)u=vr.pop(),v[u+"o"]=kr(v[u],u);for(;yr.length;)u=yr.pop(),v[u+u]=ti(v[u],2);for(v.DDDD=ti(v.DDD,3),w(ii.prototype,{set:function(n){var t,i;for(i in n)t=n[i],"function"==typeof t?this[i]=t:this["_"+i]=t},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(n){return this._months[n.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(n){return this._monthsShort[n.month()]},monthsParse:function(n){var i,r,u;for(this._monthsParse||(this._monthsParse=[]),i=0;12>i;i++)if(this._monthsParse[i]||(r=t.utc([2e3,i]),u="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[i]=new RegExp(u.replace(".",""),"i")),this._monthsParse[i].test(n))return i},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(n){return this._weekdays[n.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(n){return this._weekdaysShort[n.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(n){return this._weekdaysMin[n.day()]},weekdaysParse:function(n){var i,r,u;for(this._weekdaysParse||(this._weekdaysParse=[]),i=0;7>i;i++)if(this._weekdaysParse[i]||(r=t([2e3,1]).day(i),u="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[i]=new RegExp(u.replace(".",""),"i")),this._weekdaysParse[i].test(n))return i},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(n){var t=this._longDateFormat[n];return!t&&this._longDateFormat[n.toUpperCase()]&&(t=this._longDateFormat[n.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(n){return n.slice(1)}),this._longDateFormat[n]=t),t},isPM:function(n){return"p"===(n+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(n,t,i){return n>11?i?"pm":"PM":i?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(n,t){var i=this._calendar[n];return"function"==typeof i?i.apply(t):i},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(n,t,i,r){var u=this._relativeTime[i];return"function"==typeof u?u(n,t,i,r):u.replace(/%d/i,n)},pastFuture:function(n,t){var i=this._relativeTime[n>0?"future":"past"];return"function"==typeof i?i(t):i.replace(/%s/i,t)},ordinal:function(n){return this._ordinal.replace("%d",n)},_ordinal:"%d",preparse:function(n){return n},postformat:function(n){return n},week:function(n){return b(n,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),t=function(t,i,r,u){var f;return"boolean"==typeof r&&(u=r,r=n),f={},f._isAMomentObject=!0,f._i=t,f._f=i,f._l=r,f._strict=u,f._isUTC=!1,f._pf=st(),di(f)},t.suppressDeprecationWarnings=!1,t.createFromInputFallback=e("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(n){n._d=new Date(n._i)}),t.min=function(){var n=[].slice.call(arguments,0);return gi("isBefore",n)},t.max=function(){var n=[].slice.call(arguments,0);return gi("isAfter",n)},t.utc=function(t,i,r,u){var f;return"boolean"==typeof r&&(u=r,r=n),f={},f._isAMomentObject=!0,f._useUTC=!0,f._isUTC=!0,f._l=r,f._i=t,f._f=i,f._strict=u,f._pf=st(),di(f).utc()},t.unix=function(n){return t(1e3*n)},t.duration=function(n,r){var e,h,o,c,f=n,u=null;return t.isDuration(n)?f={ms:n._milliseconds,d:n._days,M:n._months}:"number"==typeof n?(f={},r?f[r]=n:f.milliseconds=n):(u=rf.exec(n))?(e="-"===u[1]?-1:1,f={y:0,d:i(u[s])*e,h:i(u[a])*e,m:i(u[nt])*e,s:i(u[tt])*e,ms:i(u[it])*e}):(u=uf.exec(n))?(e="-"===u[1]?-1:1,o=function(n){var t=n&&parseFloat(n.replace(",","."));return(isNaN(t)?0:t)*e},f={y:o(u[2]),M:o(u[3]),d:o(u[4]),h:o(u[5]),m:o(u[6]),s:o(u[7]),w:o(u[8])}):"object"==typeof f&&("from"in f||"to"in f)&&(c=dr(t(f.from),t(f.to)),f={},f.ms=c.milliseconds,f.M=c.months),h=new ht(f),t.isDuration(n)&&p(n,"_locale")&&(h._locale=n._locale),h},t.version="2.8.3",t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.ISO_8601=function(){},t.momentProperties=et,t.updateOffset=function(){},t.relativeTimeThreshold=function(t,i){return y[t]===n?!1:i===n?y[t]:(y[t]=i,!0)},t.lang=e("moment.lang is deprecated. Use moment.locale instead.",function(n,i){return t.locale(n,i)}),t.locale=function(n,i){var r;return n&&(r="undefined"!=typeof i?t.defineLocale(n,i):t.localeData(n),r&&(t.duration._locale=t._locale=r)),t._locale._abbr},t.defineLocale=function(n,i){return null!==i?(i.abbr=n,d[n]||(d[n]=new ii),d[n].set(i),t.locale(n),d[n]):(delete d[n],null)},t.langData=e("moment.langData is deprecated. Use moment.localeData instead.",function(n){return t.localeData(n)}),t.localeData=function(n){var i;if(n&&n._locale&&n._locale._abbr&&(n=n._locale._abbr),!n)return t._locale;if(!ut(n)){if(i=pi(n))return i;n=[n]}return tu(n)},t.isMoment=function(n){return n instanceof rt||null!=n&&p(n,"_isAMomentObject")},t.isDuration=function(n){return n instanceof ht},u=wr.length-1;u>=0;--u)nu(wr[u]);t.normalizeUnits=function(n){return f(n)};t.invalid=function(n){var i=t.utc(NaN);return null!=n?w(i._pf,n):i._pf.userInvalidated=!0,i};t.parseZone=function(){return t.apply(null,arguments).parseZone()};t.parseTwoDigitYear=function(n){return i(n)+(i(n)>68?1900:2e3)};w(t.fn=rt.prototype,{clone:function(){return t(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var n=t(this).utc();return 0<n.year()&&n.year()<=9999?lt(n,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):lt(n,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var n=this;return[n.year(),n.month(),n.date(),n.hours(),n.minutes(),n.seconds(),n.milliseconds()]},isValid:function(){return vi(this)},isDSTShifted:function(){return this._a?this.isValid()&&oi(this._a,(this._isUTC?t.utc(this._a):t(this._a)).toArray())>0:!1},parsingFlags:function(){return w({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(n){return this.zone(0,n)},local:function(n){return this._isUTC&&(this.zone(0,n),this._isUTC=!1,n&&this.add(this._dateTzOffset(),"m")),this},format:function(n){var i=lt(this,n||t.defaultFormat);return this.localeData().postformat(i)},add:fi(1,"add"),subtract:fi(-1,"subtract"),diff:function(n,i,r){var u,s,h,e=ft(n,this),c=6e4*(this.zone()-e.zone());return i=f(i),"year"===i||"month"===i?(u=432e5*(this.daysInMonth()+e.daysInMonth()),s=12*(this.year()-e.year())+(this.month()-e.month()),h=this-t(this).startOf("month")-(e-t(e).startOf("month")),h-=6e4*(this.zone()-t(this).startOf("month").zone()-(e.zone()-t(e).startOf("month").zone())),s+=h/u,"year"===i&&(s/=12)):(u=this-e,s="second"===i?u/1e3:"minute"===i?u/6e4:"hour"===i?u/36e5:"day"===i?(u-c)/864e5:"week"===i?(u-c)/6048e5:u),r?s:o(s)},from:function(n,i){return t.duration({to:this,from:n}).locale(this.locale()).humanize(!i)},fromNow:function(n){return this.from(t(),n)},calendar:function(n){var r=n||t(),u=ft(r,this).startOf("day"),i=this.diff(u,"days",!0),f=-6>i?"sameElse":-1>i?"lastWeek":0>i?"lastDay":1>i?"sameDay":2>i?"nextDay":7>i?"nextWeek":"sameElse";return this.format(this.localeData().calendar(f,this))},isLeapYear:function(){return li(this.year())},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(n){var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=n?(n=wu(n,this.localeData()),this.add(n-t,"d")):t},month:h("Month",!0),startOf:function(n){switch(n=f(n)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===n?this.weekday(0):"isoWeek"===n&&this.isoWeekday(1),"quarter"===n&&this.month(3*Math.floor(this.month()/3)),this},endOf:function(n){return n=f(n),this.startOf(n).add(1,"isoWeek"===n?"week":n).subtract(1,"ms")},isAfter:function(n,i){return i=f("undefined"!=typeof i?i:"millisecond"),"millisecond"===i?(n=t.isMoment(n)?n:t(n),+this>+n):+this.clone().startOf(i)>+t(n).startOf(i)},isBefore:function(n,i){return i=f("undefined"!=typeof i?i:"millisecond"),"millisecond"===i?(n=t.isMoment(n)?n:t(n),+n>+this):+this.clone().startOf(i)<+t(n).startOf(i)},isSame:function(n,i){return i=f(i||"millisecond"),"millisecond"===i?(n=t.isMoment(n)?n:t(n),+this==+n):+this.clone().startOf(i)==+ft(n,this).startOf(i)},min:e("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(n){return n=t.apply(null,arguments),this>n?this:n}),max:e("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(n){return n=t.apply(null,arguments),n>this?this:n}),zone:function(n,i){var r,u=this._offset||0;return null==n?this._isUTC?u:this._dateTzOffset():("string"==typeof n&&(n=bi(n)),Math.abs(n)<16&&(n=60*n),!this._isUTC&&i&&(r=this._dateTzOffset()),this._offset=n,this._isUTC=!0,null!=r&&this.subtract(r,"m"),u!==n&&(!i||this._changeInProgress?ei(this,t.duration(u-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.zone(this._tzm):"string"==typeof this._i&&this.zone(this._i),this},hasAlignedHourOffset:function(n){return n=n?t(n).zone():0,(this.zone()-n)%60==0},daysInMonth:function(){return ct(this.year(),this.month())},dayOfYear:function(n){var i=k((t(this).startOf("day")-t(this).startOf("year"))/864e5)+1;return null==n?i:this.add(n-i,"d")},quarter:function(n){return null==n?Math.ceil((this.month()+1)/3):this.month(3*(n-1)+this.month()%3)},weekYear:function(n){var t=b(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==n?t:this.add(n-t,"y")},isoWeekYear:function(n){var t=b(this,1,4).year;return null==n?t:this.add(n-t,"y")},week:function(n){var t=this.localeData().week(this);return null==n?t:this.add(7*(n-t),"d")},isoWeek:function(n){var t=b(this,1,4).week;return null==n?t:this.add(7*(n-t),"d")},weekday:function(n){var t=(this.day()+7-this.localeData()._week.dow)%7;return null==n?t:this.add(n-t,"d")},isoWeekday:function(n){return null==n?this.day()||7:this.day(this.day()%7?n:n-7)},isoWeeksInYear:function(){return hi(this.year(),1,4)},weeksInYear:function(){var n=this.localeData()._week;return hi(this.year(),n.dow,n.doy)},get:function(n){return n=f(n),this[n]()},set:function(n,t){return n=f(n),"function"==typeof this[n]&&this[n](t),this},locale:function(i){var r;return i===n?this._locale._abbr:(r=t.localeData(i),null!=r&&(this._locale=r),this)},lang:e("moment().lang() is deprecated. Use moment().localeData() instead.",function(t){return t===n?this.localeData():this.locale(t)}),localeData:function(){return this._locale},_dateTzOffset:function(){return 15*Math.round(this._d.getTimezoneOffset()/15)}});t.fn.millisecond=t.fn.milliseconds=h("Milliseconds",!1);t.fn.second=t.fn.seconds=h("Seconds",!1);t.fn.minute=t.fn.minutes=h("Minutes",!1);t.fn.hour=t.fn.hours=h("Hours",!0);t.fn.date=h("Date",!0);t.fn.dates=e("dates accessor is deprecated. Use date instead.",h("Date",!0));t.fn.year=h("FullYear",!0);t.fn.years=e("years accessor is deprecated. Use year instead.",h("FullYear",!0));t.fn.days=t.fn.day;t.fn.months=t.fn.month;t.fn.weeks=t.fn.week;t.fn.isoWeeks=t.fn.isoWeek;t.fn.quarters=t.fn.quarter;t.fn.toJSON=t.fn.toISOString;w(t.duration.fn=ht.prototype,{_bubble:function(){var u,f,e,s=this._milliseconds,t=this._days,i=this._months,n=this._data,r=0;n.milliseconds=s%1e3;u=o(s/1e3);n.seconds=u%60;f=o(u/60);n.minutes=f%60;e=o(f/60);n.hours=e%24;t+=o(e/24);r=o(ir(t));t-=o(rr(r));i+=o(t/30);t%=30;r+=o(i/12);i%=12;n.days=t;n.months=i;n.years=r},abs:function(){return this._milliseconds=Math.abs(this._milliseconds),this._days=Math.abs(this._days),this._months=Math.abs(this._months),this._data.milliseconds=Math.abs(this._data.milliseconds),this._data.seconds=Math.abs(this._data.seconds),this._data.minutes=Math.abs(this._data.minutes),this._data.hours=Math.abs(this._data.hours),this._data.months=Math.abs(this._data.months),this._data.years=Math.abs(this._data.years),this},weeks:function(){return o(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*i(this._months/12)},humanize:function(n){var t=ku(this,!n,this.localeData());return n&&(t=this.localeData().pastFuture(+this,t)),this.localeData().postformat(t)},add:function(n,i){var r=t.duration(n,i);return this._milliseconds+=r._milliseconds,this._days+=r._days,this._months+=r._months,this._bubble(),this},subtract:function(n,i){var r=t.duration(n,i);return this._milliseconds-=r._milliseconds,this._days-=r._days,this._months-=r._months,this._bubble(),this},get:function(n){return n=f(n),this[n.toLowerCase()+"s"]()},as:function(n){var t,i;if(n=f(n),"month"===n||"year"===n)return t=this._days+this._milliseconds/864e5,i=this._months+12*ir(t),"month"===n?i:i/12;switch(t=this._days+rr(this._months/12),n){case"week":return t/7+this._milliseconds/6048e5;case"day":return t+this._milliseconds/864e5;case"hour":return 24*t+this._milliseconds/36e5;case"minute":return 1440*t+this._milliseconds/6e4;case"second":return 86400*t+this._milliseconds/1e3;case"millisecond":return Math.floor(864e5*t)+this._milliseconds;default:throw new Error("Unknown unit "+n);}},lang:t.fn.lang,locale:t.fn.locale,toIsoString:e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var r=Math.abs(this.years()),u=Math.abs(this.months()),f=Math.abs(this.days()),n=Math.abs(this.hours()),t=Math.abs(this.minutes()),i=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(r?r+"Y":"")+(u?u+"M":"")+(f?f+"D":"")+(n||t||i?"T":"")+(n?n+"H":"")+(t?t+"M":"")+(i?i+"S":""):"P0D"},localeData:function(){return this._locale}});t.duration.fn.toString=t.duration.fn.toISOString;for(u in ar)p(ar,u)&&gu(u.toLowerCase());t.duration.fn.asMilliseconds=function(){return this.as("ms")};t.duration.fn.asSeconds=function(){return this.as("s")};t.duration.fn.asMinutes=function(){return this.as("m")};t.duration.fn.asHours=function(){return this.as("h")};t.duration.fn.asDays=function(){return this.as("d")};t.duration.fn.asWeeks=function(){return this.as("weeks")};t.duration.fn.asMonths=function(){return this.as("M")};t.duration.fn.asYears=function(){return this.as("y")};t.locale("en",{ordinal:function(n){var t=n%10,r=1===i(n%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return n+r}});er?module.exports=t:"function"==typeof define&&define.amd?(define("moment",function(n,i,r){return r.config&&r.config()&&r.config().noGlobal===!0&&(wt.moment=fr),t}),ur(!0)):ur()}.call(this);!function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiem:function(n,t,i){return 12>n?i?"vm":"VM":i?"nm":"NM"},longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},ordinal:function(n){return n+(1===n||8===n||n>=20?"ste":"de")},week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:6,doy:12}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},i={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"};return n.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:function(n){return 12>n?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(n){return n.replace(/[۰-۹]/g,function(n){return i[n]}).replace(/،/g,",")},postformat:function(n){return n.replace(/\d/g,function(n){return t[n]}).replace(/,/g,"،")},week:{dow:6,doy:12}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){var u={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},f={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},i=function(n){return 0===n?0:1===n?1:2===n?2:n%100>=3&&10>=n%100?3:n%100>=11?4:5},e={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},t=function(n){return function(t,r){var f=i(t),u=e[n][i(t)];return 2===f&&(u=u[r?0:1]),u.replace(/%d/i,t)}},r=["كانون الثاني يناير","شباط فبراير","آذار مارس","نيسان أبريل","أيار مايو","حزيران يونيو","تموز يوليو","آب أغسطس","أيلول سبتمبر","تشرين الأول أكتوبر","تشرين الثاني نوفمبر","كانون الأول ديسمبر"];return n.defineLocale("ar",{months:r,monthsShort:r,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:function(n){return 12>n?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:t("s"),m:t("m"),mm:t("m"),h:t("h"),hh:t("h"),d:t("d"),dd:t("d"),M:t("M"),MM:t("M"),y:t("y"),yy:t("y")},preparse:function(n){return n.replace(/[۰-۹]/g,function(n){return f[n]}).replace(/،/g,",")},postformat:function(n){return n.replace(/\d/g,function(n){return u[n]}).replace(/,/g,"،")},week:{dow:6,doy:12}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){var t={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"};return n.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"birneçə saniyyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiem:function(n){return 4>n?"gecə":12>n?"səhər":17>n?"gündüz":"axşam"},ordinal:function(n){if(0===n)return n+"-ıncı";var i=n%10,r=n%100-i,u=n>=100?100:null;return n+(t[i]||t[r]||t[u])},week:{dow:1,doy:7}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){function i(n,t){var i=n.split("_");return t%10==1&&t%100!=11?i[0]:t%10>=2&&4>=t%10&&(10>t%100||t%100>=20)?i[1]:i[2]}function t(n,t,r){var u={mm:t?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:t?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"};return"m"===r?t?"хвіліна":"хвіліну":"h"===r?t?"гадзіна":"гадзіну":n+" "+i(u[r],+n)}function r(n,t){var i={nominative:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_"),accusative:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_")},r=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(t)?"accusative":"nominative";return i[r][n.month()]}function u(n,t){var i={nominative:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),accusative:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_")},r=/\[ ?[Вв] ?(?:мінулую|наступную)? ?\] ?dddd/.test(t)?"accusative":"nominative";return i[r][n.day()]}return n.defineLocale("be",{months:r,monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:u,weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., LT",LLLL:"dddd, D MMMM YYYY г., LT"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:t,mm:t,h:t,hh:t,d:"дзень",dd:t,M:"месяц",MM:t,y:"год",yy:t},meridiem:function(n){return 4>n?"ночы":12>n?"раніцы":17>n?"дня":"вечара"},ordinal:function(n,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return n%10!=2&&n%10!=3||n%100==12||n%100==13?n+"-ы":n+"-і";case"D":return n+"-га";default:return n}},week:{dow:1,doy:7}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[В изминалата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[В изминалия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дни",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},ordinal:function(n){var t=n%10,i=n%100;return 0===n?n+"-ев":0===i?n+"-ен":i>10&&20>i?n+"-ти":1===t?n+"-ви":2===t?n+"-ри":7===t||8===t?n+"-ми":n+"-ти"},week:{dow:1,doy:7}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},i={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"};return n.defineLocale("bn",{months:"জানুয়ারী_ফেবুয়ারী_মার্চ_এপ্রিল_মে_জুন_জুলাই_অগাস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব_মার্চ_এপর_মে_জুন_জুল_অগ_সেপ্ট_অক্টো_নভ_ডিসেম্".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পত্তিবার_শুক্রুবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পত্তি_শুক্রু_শনি".split("_"),weekdaysMin:"রব_সম_মঙ্গ_বু_ব্রিহ_শু_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কএক সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(n){return n.replace(/[১২৩৪৫৬৭৮৯০]/g,function(n){return i[n]})},postformat:function(n){return n.replace(/\d/g,function(n){return t[n]})},meridiem:function(n){return 4>n?"রাত":10>n?"শকাল":17>n?"দুপুর":20>n?"বিকেল":"রাত"},week:{dow:0,doy:6}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){var t={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},i={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"};return n.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),longDateFormat:{LT:"A h:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(n){return n.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,function(n){return i[n]})},postformat:function(n){return n.replace(/\d/g,function(n){return t[n]})},meridiem:function(n){return 4>n?"མཚན་མོ":10>n?"ཞོགས་ཀས":17>n?"ཉིན་གུང":20>n?"དགོང་དག":"མཚན་མོ"},week:{dow:0,doy:6}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){function t(n,t,i){return n+" "+u({mm:"munutenn",MM:"miz",dd:"devezh"}[i],n)}function r(n){switch(i(n)){case 1:case 3:case 4:case 5:case 9:return n+" bloaz";default:return n+" vloaz"}}function i(n){return n>9?i(n%10):n}function u(n,t){return 2===t?f(n):n}function f(n){var t={m:"v",b:"v",d:"z"};return void 0===t[n.charAt(0)]?n:t[n.charAt(0)]+n.substring(1)}return n.defineLocale("br",{months:"Genver_C'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_C'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Merc'her_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),longDateFormat:{LT:"h[e]mm A",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY LT",LLLL:"dddd, D [a viz] MMMM YYYY LT"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warc'hoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Dec'h da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s 'zo",s:"un nebeud segondennoù",m:"ur vunutenn",mm:t,h:"un eur",hh:"%d eur",d:"un devezh",dd:t,M:"ur miz",MM:t,y:"ur bloaz",yy:r},ordinal:function(n){var t=1===n?"añ":"vet";return n+t},week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){function t(n,t,i){var r=n+" ";switch(i){case"m":return t?"jedna minuta":"jedne minute";case"mm":return r+(1===n?"minuta":2===n||3===n||4===n?"minute":"minuta");case"h":return t?"jedan sat":"jednog sata";case"hh":return r+(1===n?"sat":2===n||3===n||4===n?"sata":"sati");case"dd":return r+(1===n?"dan":"dana");case"MM":return r+(1===n?"mjesec":2===n||3===n||4===n?"mjeseca":"mjeseci");case"yy":return r+(1===n?"godina":2===n||3===n||4===n?"godine":"godina")}}return n.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),longDateFormat:{LT:"H:mm",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},ordinal:"%d.",week:{dow:1,doy:7}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("ca",{months:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),monthsShort:"gen._febr._mar._abr._mai._jun._jul._ag._set._oct._nov._des.".split("_"),weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"Dg_Dl_Dt_Dc_Dj_Dv_Ds".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fa %s",s:"uns segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},ordinal:"%dº",week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){function i(n){return n>1&&5>n&&1!=~~(n/10)}function t(n,t,r,u){var f=n+" ";switch(r){case"s":return t||u?"pár sekund":"pár sekundami";case"m":return t?"minuta":u?"minutu":"minutou";case"mm":return t||u?f+(i(n)?"minuty":"minut"):f+"minutami";case"h":return t?"hodina":u?"hodinu":"hodinou";case"hh":return t||u?f+(i(n)?"hodiny":"hodin"):f+"hodinami";case"d":return t||u?"den":"dnem";case"dd":return t||u?f+(i(n)?"dny":"dní"):f+"dny";case"M":return t||u?"měsíc":"měsícem";case"MM":return t||u?f+(i(n)?"měsíce":"měsíců"):f+"měsíci";case"y":return t||u?"rok":"rokem";case"yy":return t||u?f+(i(n)?"roky":"let"):f+"lety"}}var r="leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),u="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_");return n.defineLocale("cs",{months:r,monthsShort:u,monthsParse:function(n,t){for(var r=[],i=0;12>i;i++)r[i]=new RegExp("^"+n[i]+"$|^"+t[i]+"$","i");return r}(r,u),weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd D. MMMM YYYY LT"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},ordinal:"%d.",week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("cv",{months:"кăрлач_нарăс_пуш_ака_май_çĕртме_утă_çурла_авăн_юпа_чӳк_раштав".split("_"),monthsShort:"кăр_нар_пуш_ака_май_çĕр_утă_çур_ав_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кĕçнерникун_эрнекун_шăматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кĕç_эрн_шăм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кç_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"YYYY [çулхи] MMMM [уйăхĕн] D[-мĕшĕ]",LLL:"YYYY [çулхи] MMMM [уйăхĕн] D[-мĕшĕ], LT",LLLL:"dddd, YYYY [çулхи] MMMM [уйăхĕн] D[-мĕшĕ], LT"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ĕнер] LT [сехетре]",nextWeek:"[Çитес] dddd LT [сехетре]",lastWeek:"[Иртнĕ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(n){var t=/сехет$/i.exec(n)?"рен":/çул$/i.exec(n)?"тан":"ран";return n+t},past:"%s каялла",s:"пĕр-ик çеккунт",m:"пĕр минут",mm:"%d минут",h:"пĕр сехет",hh:"%d сехет",d:"пĕр кун",dd:"%d кун",M:"пĕр уйăх",MM:"%d уйăх",y:"пĕр çул",yy:"%d çул"},ordinal:"%d-мĕш",week:{dow:1,doy:7}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},ordinal:function(n){var t=n,i="";return t>20?i=40===t||50===t||60===t||80===t||100===t?"fed":"ain":t>0&&(i=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"][t]),n+i},week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd [d.] D. MMMM YYYY LT"},calendar:{sameDay:"[I dag kl.] LT",nextDay:"[I morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[I går kl.] LT",lastWeek:"[sidste] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},ordinal:"%d.",week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){function t(n,t,i){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[n+" Tage",n+" Tagen"],M:["ein Monat","einem Monat"],MM:[n+" Monate",n+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[n+" Jahre",n+" Jahren"]};return t?r[i][0]:r[i][1]}return n.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm [Uhr]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[Heute um] LT",sameElse:"L",nextDay:"[Morgen um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gestern um] LT",lastWeek:"[letzten] dddd [um] LT"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,M:t,MM:t,y:t,yy:t},ordinal:"%d.",week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){function t(n,t,i){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[n+" Tage",n+" Tagen"],M:["ein Monat","einem Monat"],MM:[n+" Monate",n+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[n+" Jahre",n+" Jahren"]};return t?r[i][0]:r[i][1]}return n.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm [Uhr]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[Heute um] LT",sameElse:"L",nextDay:"[Morgen um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gestern um] LT",lastWeek:"[letzten] dddd [um] LT"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,M:t,MM:t,y:t,yy:t},ordinal:"%d.",week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(n,t){return/D/.test(t.substring(0,t.indexOf("MMMM")))?this._monthsGenitiveEl[n.month()]:this._monthsNominativeEl[n.month()]},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(n,t,i){return n>11?i?"μμ":"ΜΜ":i?"πμ":"ΠΜ"},isPM:function(n){return"μ"===(n+"").toLowerCase()[0]},meridiemParse:/[ΠΜ]\.?Μ?\.?/i,longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[το προηγούμενο] dddd [{}] LT";default:return"[την προηγούμενη] dddd [{}] LT"}},sameElse:"L"},calendar:function(n,t){var i=this._calendarEl[n],r=t&&t.hours();return"function"==typeof i&&(i=i.apply(t)),i.replace("{}",r%12==1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},ordinal:function(n){return n+"η"},week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(n){var t=n%10,i=1==~~(n%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return n+i},week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",L:"YYYY-MM-DD",LL:"D MMMM, YYYY",LLL:"D MMMM, YYYY LT",LLLL:"dddd, D MMMM, YYYY LT"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(n){var t=n%10,i=1==~~(n%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return n+i}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(n){var t=n%10,i=1==~~(n%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return n+i},week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec".split("_"),weekdays:"Dimanĉo_Lundo_Mardo_Merkredo_Ĵaŭdo_Vendredo_Sabato".split("_"),weekdaysShort:"Dim_Lun_Mard_Merk_Ĵaŭ_Ven_Sab".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Ĵa_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D[-an de] MMMM, YYYY",LLL:"D[-an de] MMMM, YYYY LT",LLLL:"dddd, [la] D[-an de] MMMM, YYYY LT"},meridiem:function(n,t,i){return n>11?i?"p.t.m.":"P.T.M.":i?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd [je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasinta] dddd [je] LT",sameElse:"L"},relativeTime:{future:"je %s",past:"antaŭ %s",s:"sekundoj",m:"minuto",mm:"%d minutoj",h:"horo",hh:"%d horoj",d:"tago",dd:"%d tagoj",M:"monato",MM:"%d monatoj",y:"jaro",yy:"%d jaroj"},ordinal:"%da",week:{dow:1,doy:7}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),i="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_");return n.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(n,r){return/-MMM-/.test(r)?i[n.month()]:t[n.month()]},weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"Do_Lu_Ma_Mi_Ju_Vi_Sá".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY LT",LLLL:"dddd, D [de] MMMM [de] YYYY LT"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:"%dº",week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){function t(n,t,i,r){var u={s:["mõne sekundi","mõni sekund","paar sekundit"],m:["ühe minuti","üks minut"],mm:[n+" minuti",n+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[n+" tunni",n+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[n+" kuu",n+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[n+" aasta",n+" aastat"]};return t?u[i][2]?u[i][2]:u[i][1]:r?u[i][0]:u[i][1]}return n.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:t,m:t,mm:t,h:t,hh:t,d:t,dd:"%d päeva",M:t,MM:t,y:t,yy:t},ordinal:"%d.",week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] LT",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] LT",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] LT",llll:"ddd, YYYY[ko] MMM D[a] LT"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},ordinal:"%d.",week:{dow:1,doy:7}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){var t={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},i={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"};return n.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},meridiem:function(n){return 12>n?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چندین ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(n){return n.replace(/[۰-۹]/g,function(n){return i[n]}).replace(/،/g,",")},postformat:function(n){return n.replace(/\d/g,function(n){return t[n]}).replace(/,/g,"،")},ordinal:"%dم",week:{dow:6,doy:12}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){function t(n,t,i,u){var f="";switch(i){case"s":return u?"muutaman sekunnin":"muutama sekunti";case"m":return u?"minuutin":"minuutti";case"mm":f=u?"minuutin":"minuuttia";break;case"h":return u?"tunnin":"tunti";case"hh":f=u?"tunnin":"tuntia";break;case"d":return u?"päivän":"päivä";case"dd":f=u?"päivän":"päivää";break;case"M":return u?"kuukauden":"kuukausi";case"MM":f=u?"kuukauden":"kuukautta";break;case"y":return u?"vuoden":"vuosi";case"yy":f=u?"vuoden":"vuotta"}return r(n,u)+" "+f}function r(n,t){return 10>n?t?u[n]:i[n]:n}var i="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),u=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",i[7],i[8],i[9]];return n.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] LT",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] LT",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] LT",llll:"ddd, Do MMM YYYY, [klo] LT"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},ordinal:"%d.",week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D. MMMM, YYYY LT"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",m:"ein minutt",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaði",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},ordinal:"%d.",week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(n){return n+(1===n?"er":"")}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(n){return n+(1===n?"er":"")},week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("gl",{months:"Xaneiro_Febreiro_Marzo_Abril_Maio_Xuño_Xullo_Agosto_Setembro_Outubro_Novembro_Decembro".split("_"),monthsShort:"Xan._Feb._Mar._Abr._Mai._Xuñ._Xul._Ago._Set._Out._Nov._Dec.".split("_"),weekdays:"Domingo_Luns_Martes_Mércores_Xoves_Venres_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mér._Xov._Ven._Sáb.".split("_"),weekdaysMin:"Do_Lu_Ma_Mé_Xo_Ve_Sá".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(n){return"uns segundos"===n?"nuns segundos":"en "+n},past:"hai %s",s:"uns segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},ordinal:"%dº",week:{dow:1,doy:7}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY LT",LLLL:"dddd, D [ב]MMMM YYYY LT",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY LT",llll:"ddd, D MMM YYYY LT"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(n){return 2===n?"שעתיים":n+" שעות"},d:"יום",dd:function(n){return 2===n?"יומיים":n+" ימים"},M:"חודש",MM:function(n){return 2===n?"חודשיים":n+" חודשים"},y:"שנה",yy:function(n){return 2===n?"שנתיים":n+" שנים"}}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},i={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};return n.defineLocale("hi",{months:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(n){return n.replace(/[१२३४५६७८९०]/g,function(n){return i[n]})},postformat:function(n){return n.replace(/\d/g,function(n){return t[n]})},meridiem:function(n){return 4>n?"रात":10>n?"सुबह":17>n?"दोपहर":20>n?"शाम":"रात"},week:{dow:0,doy:6}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){function t(n,t,i){var r=n+" ";switch(i){case"m":return t?"jedna minuta":"jedne minute";case"mm":return r+(1===n?"minuta":2===n||3===n||4===n?"minute":"minuta");case"h":return t?"jedan sat":"jednog sata";case"hh":return r+(1===n?"sat":2===n||3===n||4===n?"sata":"sati");case"dd":return r+(1===n?"dan":"dana");case"MM":return r+(1===n?"mjesec":2===n||3===n||4===n?"mjeseca":"mjeseci");case"yy":return r+(1===n?"godina":2===n||3===n||4===n?"godine":"godina")}}return n.defineLocale("hr",{months:"sječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_"),monthsShort:"sje._vel._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),longDateFormat:{LT:"H:mm",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},ordinal:"%d.",week:{dow:1,doy:7}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){function t(n,t,i,r){var u=n;switch(i){case"s":return r||t?"néhány másodperc":"néhány másodperce";case"m":return"egy"+(r||t?" perc":" perce");case"mm":return u+(r||t?" perc":" perce");case"h":return"egy"+(r||t?" óra":" órája");case"hh":return u+(r||t?" óra":" órája");case"d":return"egy"+(r||t?" nap":" napja");case"dd":return u+(r||t?" nap":" napja");case"M":return"egy"+(r||t?" hónap":" hónapja");case"MM":return u+(r||t?" hónap":" hónapja");case"y":return"egy"+(r||t?" év":" éve");case"yy":return u+(r||t?" év":" éve")}return""}function i(n){return(n?"":"[múlt] ")+"["+r[this.day()]+"] LT[-kor]"}var r="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ");return n.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D., LT",LLLL:"YYYY. MMMM D., dddd LT"},meridiem:function(n,t,i){return 12>n?i===!0?"de":"DE":i===!0?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return i.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return i.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},ordinal:"%d.",week:{dow:1,doy:7}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){function t(n,t){var i={nominative:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_"),accusative:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_")},r=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(t)?"accusative":"nominative";return i[r][n.month()]}function i(n){var t="հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_");return t[n.month()]}function r(n){var t="կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_");return t[n.day()]}return n.defineLocale("hy-am",{months:t,monthsShort:i,weekdays:r,weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., LT",LLLL:"dddd, D MMMM YYYY թ., LT"},calendar:{sameDay:"[այսօր] LT",nextDay:"[վաղը] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT"},lastWeek:function(){return"[անցած] dddd [օրը ժամը] LT"},sameElse:"L"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"},meridiem:function(n){return 4>n?"գիշերվա":12>n?"առավոտվա":17>n?"ցերեկվա":"երեկոյան"},ordinal:function(n,t){switch(t){case"DDD":case"w":case"W":case"DDDo":return 1===n?n+"-ին":n+"-րդ";default:return n}},week:{dow:1,doy:7}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] LT",LLLL:"dddd, D MMMM YYYY [pukul] LT"},meridiem:function(n){return 11>n?"pagi":15>n?"siang":19>n?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){function i(n){return n%100==11?!0:n%10==1?!1:!0}function t(n,t,r,u){var f=n+" ";switch(r){case"s":return t||u?"nokkrar sekúndur":"nokkrum sekúndum";case"m":return t?"mínúta":"mínútu";case"mm":return i(n)?f+(t||u?"mínútur":"mínútum"):t?f+"mínúta":f+"mínútu";case"hh":return i(n)?f+(t||u?"klukkustundir":"klukkustundum"):f+"klukkustund";case"d":return t?"dagur":u?"dag":"degi";case"dd":return i(n)?t?f+"dagar":f+(u?"daga":"dögum"):t?f+"dagur":f+(u?"dag":"degi");case"M":return t?"mánuður":u?"mánuð":"mánuði";case"MM":return i(n)?t?f+"mánuðir":f+(u?"mánuði":"mánuðum"):t?f+"mánuður":f+(u?"mánuð":"mánuði");case"y":return t||u?"ár":"ári";case"yy":return i(n)?f+(t||u?"ár":"árum"):f+(t||u?"ár":"ári")}}return n.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] LT",LLLL:"dddd, D. MMMM YYYY [kl.] LT"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:t,m:t,mm:t,h:"klukkustund",hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},ordinal:"%d.",week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"Domenica_Lunedì_Martedì_Mercoledì_Giovedì_Venerdì_Sabato".split("_"),weekdaysShort:"Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),weekdaysMin:"D_L_Ma_Me_G_V_S".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:"[lo scorso] dddd [alle] LT",sameElse:"L"},relativeTime:{future:function(n){return(/^[0-9].+$/.test(n)?"tra":"in")+" "+n},past:"%s fa",s:"alcuni secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:"%dº",week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("ja",{months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"Ah時m分",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日LT",LLLL:"YYYY年M月D日LT dddd"},meridiem:function(n){return 12>n?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:"[来週]dddd LT",lastDay:"[昨日] LT",lastWeek:"[前週]dddd LT",sameElse:"L"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){function t(n,t){var i={nominative:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),accusative:"იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს".split("_")},r=/D[oD] *MMMM?/.test(t)?"accusative":"nominative";return i[r][n.month()]}function i(n,t){var i={nominative:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),accusative:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_")},r=/(წინა|შემდეგ)/.test(t)?"accusative":"nominative";return i[r][n.day()]}return n.defineLocale("ka",{months:t,monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:i,weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(n){return/(წამი|წუთი|საათი|წელი)/.test(n)?n.replace(/ი$/,"ში"):n+"ში"},past:function(n){return/(წამი|წუთი|საათი|დღე|თვე)/.test(n)?n.replace(/(ი|ე)$/,"ის წინ"):/წელი/.test(n)?n.replace(/წელი$/,"წლის წინ"):void 0},s:"რამდენიმე წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},ordinal:function(n){return 0===n?n:1===n?n+"-ლი":20>n||100>=n&&n%20==0||n%100==0?"მე-"+n:n+"-ე"},week:{dow:1,doy:7}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("km",{months:"មករា_កុម្ភៈ_មិនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មិនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysMin:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[ថ្ងៃនៈ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h시 m분",L:"YYYY.MM.DD",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 LT",LLLL:"YYYY년 MMMM D일 dddd LT"},meridiem:function(n){return 12>n?"오전":"오후"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇초",ss:"%d초",m:"일분",mm:"%d분",h:"한시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한달",MM:"%d달",y:"일년",yy:"%d년"},ordinal:"%d일",meridiemParse:/(오전|오후)/,isPM:function(n){return"오후"===n}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){function t(n,t,i){var r={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return t?r[i][0]:r[i][1]}function r(n){var t=n.substr(0,n.indexOf(" "));return i(t)?"a "+n:"an "+n}function u(n){var t=n.substr(0,n.indexOf(" "));return i(t)?"viru "+n:"virun "+n}function i(n){if(n=parseInt(n,10),isNaN(n))return!1;if(0>n)return!0;if(10>n)return n>=4&&7>=n?!0:!1;if(100>n){var t=n%10,r=n/10;return i(0===t?r:t)}if(1e4>n){for(;n>=10;)n/=10;return i(n)}return n/=1e3,i(n)}return n.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),longDateFormat:{LT:"H:mm [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:r,past:u,s:"e puer Sekonnen",m:t,mm:"%d Minutten",h:t,hh:"%d Stonnen",d:t,dd:"%d Deeg",M:t,MM:"%d Méint",y:t,yy:"%d Joer"},ordinal:"%d.",week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){function f(n,t,i,r){return t?"kelios sekundės":r?"kelių sekundžių":"kelias sekundes"}function i(n,i,r,u){return i?t(r)[0]:u?t(r)[1]:t(r)[2]}function u(n){return n%10==0||n>10&&20>n}function t(n){return o[n].split("_")}function r(n,r,f,e){var o=n+" ";return 1===n?o+i(n,r,f[0],e):r?o+(u(n)?t(f)[1]:t(f)[0]):e?o+t(f)[1]:o+(u(n)?t(f)[1]:t(f)[2])}function e(n,t){var r=-1===t.indexOf("dddd HH:mm"),i=s[n.day()];return r?i:i.substring(0,i.length-2)+"į"}var o={m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"},s="sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_");return n.defineLocale("lt",{months:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:e,weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], LT [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, LT [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], LT [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, LT [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:f,m:i,mm:r,h:i,hh:r,d:i,dd:r,M:i,MM:r,y:i,yy:r},ordinal:function(n){return n+"-oji"},week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){function i(n,t,i){var r=n.split("_");return i?t%10==1&&11!==t?r[2]:r[3]:t%10==1&&11!==t?r[0]:r[1]}function t(n,t,u){return n+" "+i(r[u],n,t)}var r={mm:"minūti_minūtes_minūte_minūtes",hh:"stundu_stundas_stunda_stundas",dd:"dienu_dienas_diena_dienas",MM:"mēnesi_mēnešus_mēnesis_mēneši",yy:"gadu_gadus_gads_gadi"};return n.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, LT",LLLL:"YYYY. [gada] D. MMMM, dddd, LT"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"%s vēlāk",past:"%s agrāk",s:"dažas sekundes",m:"minūti",mm:t,h:"stundu",hh:t,d:"dienu",dd:t,M:"mēnesi",MM:t,y:"gadu",yy:t},ordinal:"%d.",week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Во изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Во изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"после %s",past:"пред %s",s:"неколку секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",M:"месец",MM:"%d месеци",y:"година",yy:"%d години"},ordinal:function(n){var t=n%10,i=n%100;return 0===n?n+"-ев":0===i?n+"-ен":i>10&&20>i?n+"-ти":1===t?n+"-ви":2===t?n+"-ри":7===t||8===t?n+"-ми":n+"-ти"},week:{dow:1,doy:7}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiem:function(n){return 4>n?"രാത്രി":12>n?"രാവിലെ":17>n?"ഉച്ച കഴിഞ്ഞ്":20>n?"വൈകുന്നേരം":"രാത്രി"}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},i={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};return n.defineLocale("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%s नंतर",past:"%s पूर्वी",s:"सेकंद",m:"एक मिनिट",mm:"%d मिनिटे",h:"एक तास",hh:"%d तास",d:"एक दिवस",dd:"%d दिवस",M:"एक महिना",MM:"%d महिने",y:"एक वर्ष",yy:"%d वर्षे"},preparse:function(n){return n.replace(/[१२३४५६७८९०]/g,function(n){return i[n]})},postformat:function(n){return n.replace(/\d/g,function(n){return t[n]})},meridiem:function(n){return 4>n?"रात्री":10>n?"सकाळी":17>n?"दुपारी":20>n?"सायंकाळी":"रात्री"},week:{dow:0,doy:6}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] LT",LLLL:"dddd, D MMMM YYYY [pukul] LT"},meridiem:function(n){return 11>n?"pagi":15>n?"tengahari":19>n?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){var t={1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"},i={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"};return n.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_င်္ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_င်္ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနည်းငယ်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(n){return n.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,function(n){return i[n]})},postformat:function(n){return n.replace(/\d/g,function(n){return t[n]})},week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tirs_ons_tors_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"H.mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] LT",LLLL:"dddd D. MMMM YYYY [kl.] LT"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"for %s siden",s:"noen sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},ordinal:"%d.",week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},i={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};return n.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आइ._सो._मङ्_बु._बि._शु._श.".split("_"),longDateFormat:{LT:"Aको h:mm बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},preparse:function(n){return n.replace(/[१२३४५६७८९०]/g,function(n){return i[n]})},postformat:function(n){return n.replace(/\d/g,function(n){return t[n]})},meridiem:function(n){return 3>n?"राती":10>n?"बिहान":15>n?"दिउँसो":18>n?"बेलुका":20>n?"साँझ":"राती"},calendar:{sameDay:"[आज] LT",nextDay:"[भोली] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडी",s:"केही समय",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:1,doy:7}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),i="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_");return n.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(n,r){return/-MMM-/.test(r)?i[n.month()]:t[n.month()]},weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"Zo_Ma_Di_Wo_Do_Vr_Za".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},ordinal:function(n){return n+(1===n||8===n||n>=20?"ste":"de")},week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"sun_mån_tys_ons_tor_fre_lau".split("_"),weekdaysMin:"su_må_ty_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"for %s sidan",s:"nokre sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},ordinal:"%d.",week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){function i(n){return 5>n%10&&n%10>1&&~~(n/10)%10!=1}function t(n,t,r){var u=n+" ";switch(r){case"m":return t?"minuta":"minutę";case"mm":return u+(i(n)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return u+(i(n)?"godziny":"godzin");case"MM":return u+(i(n)?"miesiące":"miesięcy");case"yy":return u+(i(n)?"lata":"lat")}}var r="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),u="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_");return n.defineLocale("pl",{months:function(n,t){return/D MMMM/.test(t)?u[n.month()]:r[n.month()]},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"nie_pon_wt_śr_czw_pt_sb".split("_"),weekdaysMin:"N_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:"[W] dddd [o] LT",lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:t,mm:t,h:t,hh:t,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:t,y:"rok",yy:t},ordinal:"%d.",week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("pt-br",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sáb".split("_"),weekdaysMin:"dom_2ª_3ª_4ª_5ª_6ª_sáb".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] LT",LLLL:"dddd, D [de] MMMM [de] YYYY [às] LT"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atrás",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinal:"%dº"})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("pt",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sáb".split("_"),weekdaysMin:"dom_2ª_3ª_4ª_5ª_6ª_sáb".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY LT",LLLL:"dddd, D [de] MMMM [de] YYYY LT"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinal:"%dº",week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){function t(n,t,i){var r=" ";return(n%100>=20||n>=100&&n%100==0)&&(r=" de "),n+r+{mm:"minute",hh:"ore",dd:"zile",MM:"luni",yy:"ani"}[i]}return n.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",m:"un minut",mm:t,h:"o oră",hh:t,d:"o zi",dd:t,M:"o lună",MM:t,y:"un an",yy:t},week:{dow:1,doy:7}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){function i(n,t){var i=n.split("_");return t%10==1&&t%100!=11?i[0]:t%10>=2&&4>=t%10&&(10>t%100||t%100>=20)?i[1]:i[2]}function t(n,t,r){var u={mm:t?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"};return"m"===r?t?"минута":"минуту":n+" "+i(u[r],+n)}function r(n,t){var i={nominative:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),accusative:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_")},r=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(t)?"accusative":"nominative";return i[r][n.month()]}function u(n,t){var i={nominative:"янв_фев_мар_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),accusative:"янв_фев_мар_апр_мая_июня_июля_авг_сен_окт_ноя_дек".split("_")},r=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(t)?"accusative":"nominative";return i[r][n.month()]}function f(n,t){var i={nominative:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),accusative:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_")},r=/\[ ?[Вв] ?(?:прошлую|следующую)? ?\] ?dddd/.test(t)?"accusative":"nominative";return i[r][n.day()]}return n.defineLocale("ru",{months:r,monthsShort:u,weekdays:f,weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[й|я]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i],longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., LT",LLLL:"dddd, D MMMM YYYY г., LT"},calendar:{sameDay:"[Сегодня в] LT",nextDay:"[Завтра в] LT",lastDay:"[Вчера в] LT",nextWeek:function(){return 2===this.day()?"[Во] dddd [в] LT":"[В] dddd [в] LT"},lastWeek:function(){switch(this.day()){case 0:return"[В прошлое] dddd [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:t,mm:t,h:"час",hh:t,d:"день",dd:t,M:"месяц",MM:t,y:"год",yy:t},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(n){return/^(дня|вечера)$/.test(n)},meridiem:function(n){return 4>n?"ночи":12>n?"утра":17>n?"дня":"вечера"},ordinal:function(n,t){switch(t){case"M":case"d":case"DDD":return n+"-й";case"D":return n+"-го";case"w":case"W":return n+"-я";default:return n}},week:{dow:1,doy:7}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){function i(n){return n>1&&5>n}function t(n,t,r,u){var f=n+" ";switch(r){case"s":return t||u?"pár sekúnd":"pár sekundami";case"m":return t?"minúta":u?"minútu":"minútou";case"mm":return t||u?f+(i(n)?"minúty":"minút"):f+"minútami";case"h":return t?"hodina":u?"hodinu":"hodinou";case"hh":return t||u?f+(i(n)?"hodiny":"hodín"):f+"hodinami";case"d":return t||u?"deň":"dňom";case"dd":return t||u?f+(i(n)?"dni":"dní"):f+"dňami";case"M":return t||u?"mesiac":"mesiacom";case"MM":return t||u?f+(i(n)?"mesiace":"mesiacov"):f+"mesiacmi";case"y":return t||u?"rok":"rokom";case"yy":return t||u?f+(i(n)?"roky":"rokov"):f+"rokmi"}}var r="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),u="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");return n.defineLocale("sk",{months:r,monthsShort:u,monthsParse:function(n,t){for(var r=[],i=0;12>i;i++)r[i]=new RegExp("^"+n[i]+"$|^"+t[i]+"$","i");return r}(r,u),weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd D. MMMM YYYY LT"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 4:case 5:return"[minulý] dddd [o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},ordinal:"%d.",week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){function t(n,t,i){var r=n+" ";switch(i){case"m":return t?"ena minuta":"eno minuto";case"mm":return r+(1===n?"minuta":2===n?"minuti":3===n||4===n?"minute":"minut");case"h":return t?"ena ura":"eno uro";case"hh":return r+(1===n?"ura":2===n?"uri":3===n||4===n?"ure":"ur");case"dd":return r+(1===n?"dan":"dni");case"MM":return r+(1===n?"mesec":2===n?"meseca":3===n||4===n?"mesece":"mesecev");case"yy":return r+(1===n?"leto":2===n?"leti":3===n||4===n?"leta":"let")}}return n.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),longDateFormat:{LT:"H:mm",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[prejšnja] dddd [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"%s nazaj",s:"nekaj sekund",m:t,mm:t,h:t,hh:t,d:"en dan",dd:t,M:"en mesec",MM:t,y:"eno leto",yy:t},ordinal:"%d.",week:{dow:1,doy:7}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),meridiem:function(n){return 12>n?"PD":"MD"},longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},ordinal:"%d.",week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){var t={words:{m:["један минут","једне минуте"],mm:["минут","минуте","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],dd:["дан","дана","дана"],MM:["месец","месеца","месеци"],yy:["година","године","година"]},correctGrammaticalCase:function(n,t){return 1===n?t[0]:n>=2&&4>=n?t[1]:t[2]},translate:function(n,i,r){var u=t.words[r];return 1===r.length?i?u[0]:u[1]:n+" "+t.correctGrammaticalCase(n,u)}};return n.defineLocale("sr-cyrl",{months:["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар"],monthsShort:["јан.","феб.","мар.","апр.","мај","јун","јул","авг.","сеп.","окт.","нов.","дец."],weekdays:["недеља","понедељак","уторак","среда","четвртак","петак","субота"],weekdaysShort:["нед.","пон.","уто.","сре.","чет.","пет.","суб."],weekdaysMin:["не","по","ут","ср","че","пе","су"],longDateFormat:{LT:"H:mm",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){return["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"дан",dd:t.translate,M:"месец",MM:t.translate,y:"годину",yy:t.translate},ordinal:"%d.",week:{dow:1,doy:7}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){var t={words:{m:["jedan minut","jedne minute"],mm:["minut","minute","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mesec","meseca","meseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(n,t){return 1===n?t[0]:n>=2&&4>=n?t[1]:t[2]},translate:function(n,i,r){var u=t.words[r];return 1===r.length?i?u[0]:u[1]:n+" "+t.correctGrammaticalCase(n,u)}};return n.defineLocale("sr",{months:["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar"],monthsShort:["jan.","feb.","mar.","apr.","maj","jun","jul","avg.","sep.","okt.","nov.","dec."],weekdays:["nedelja","ponedeljak","utorak","sreda","četvrtak","petak","subota"],weekdaysShort:["ned.","pon.","uto.","sre.","čet.","pet.","sub."],weekdaysMin:["ne","po","ut","sr","če","pe","su"],longDateFormat:{LT:"H:mm",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mesec",MM:t.translate,y:"godinu",yy:t.translate},ordinal:"%d.",week:{dow:1,doy:7}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"dddd LT",lastWeek:"[Förra] dddd[en] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},ordinal:function(n){var t=n%10,i=1==~~(n%100/10)?"e":1===t?"a":2===t?"a":3===t?"e":"e";return n+i},week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},ordinal:function(n){return n+"வது"},meridiem:function(n){return n>=6&&10>=n?" காலை":n>=10&&14>=n?" நண்பகல்":n>=14&&18>=n?" எற்பாடு":n>=18&&20>=n?" மாலை":n>=20&&24>=n?" இரவு":n>=0&&6>=n?" வைகறை":void 0},week:{dow:0,doy:6}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"มกรา_กุมภา_มีนา_เมษา_พฤษภา_มิถุนา_กรกฎา_สิงหา_กันยา_ตุลา_พฤศจิกา_ธันวา".split("_"),weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),longDateFormat:{LT:"H นาฬิกา m นาที",L:"YYYY/MM/DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา LT",LLLL:"วันddddที่ D MMMM YYYY เวลา LT"},meridiem:function(n){return 12>n?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM DD, YYYY LT"},calendar:{sameDay:"[Ngayon sa] LT",nextDay:"[Bukas sa] LT",nextWeek:"dddd [sa] LT",lastDay:"[Kahapon sa] LT",lastWeek:"dddd [huling linggo] LT",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},ordinal:function(n){return n},week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){var t={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"};return n.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[haftaya] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen hafta] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(n){if(0===n)return n+"'ıncı";var i=n%10,r=n%100-i,u=n>=100?100:null;return n+(t[i]||t[r]||t[u])},week:{dow:1,doy:7}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){function r(n,t){var i=n.split("_");return t%10==1&&t%100!=11?i[0]:t%10>=2&&4>=t%10&&(10>t%100||t%100>=20)?i[1]:i[2]}function t(n,t,i){return"m"===i?t?"хвилина":"хвилину":"h"===i?t?"година":"годину":n+" "+r({mm:"хвилина_хвилини_хвилин",hh:"година_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"}[i],+n)}function u(n,t){var i={nominative:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_"),accusative:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_")},r=/D[oD]? *MMMM?/.test(t)?"accusative":"nominative";return i[r][n.month()]}function f(n,t){var i={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")},r=/(\[[ВвУу]\]) ?dddd/.test(t)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(t)?"genitive":"nominative";return i[r][n.day()]}function i(n){return function(){return n+"о"+(11===this.hours()?"б":"")+"] LT"}}return n.defineLocale("uk",{months:u,monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:f,weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., LT",LLLL:"dddd, D MMMM YYYY р., LT"},calendar:{sameDay:i("[Сьогодні "),nextDay:i("[Завтра "),lastDay:i("[Вчора "),nextWeek:i("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return i("[Минулої] dddd [").call(this);case 1:case 2:case 4:return i("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",m:t,mm:t,h:"годину",hh:t,d:"день",dd:t,M:"місяць",MM:t,y:"рік",yy:t},meridiem:function(n){return 4>n?"ночі":12>n?"ранку":17>n?"дня":"вечора"},ordinal:function(n,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return n+"-й";case"D":return n+"-го";default:return n}},week:{dow:1,doy:7}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("uz",{months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"D MMMM YYYY, dddd LT"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY LT",LLLL:"dddd, D MMMM [năm] YYYY LT",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY LT",llll:"ddd, D MMM YYYY LT"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần rồi lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},ordinal:function(n){return n},week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah点mm",L:"YYYY-MM-DD",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日LT",LLLL:"YYYY年MMMD日ddddLT",l:"YYYY-MM-DD",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日LT",llll:"YYYY年MMMD日ddddLT"},meridiem:function(n,t){var i=100*n+t;return 600>i?"凌晨":900>i?"早上":1130>i?"上午":1230>i?"中午":1800>i?"下午":"晚上"},calendar:{sameDay:function(){return 0===this.minutes()?"[今天]Ah[点整]":"[今天]LT"},nextDay:function(){return 0===this.minutes()?"[明天]Ah[点整]":"[明天]LT"},lastDay:function(){return 0===this.minutes()?"[昨天]Ah[点整]":"[昨天]LT"},nextWeek:function(){var i,t;return i=n().startOf("week"),t=this.unix()-i.unix()>=604800?"[下]":"[本]",0===this.minutes()?t+"dddAh点整":t+"dddAh点mm"},lastWeek:function(){var i,t;return i=n().startOf("week"),t=this.unix()<i.unix()?"[上]":"[本]",0===this.minutes()?t+"dddAh点整":t+"dddAh点mm"},sameElse:"LL"},ordinal:function(n,t){switch(t){case"d":case"D":case"DDD":return n+"日";case"M":return n+"月";case"w":case"W":return n+"周";default:return n}},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1分钟",mm:"%d分钟",h:"1小时",hh:"%d小时",d:"1天",dd:"%d天",M:"1个月",MM:"%d个月",y:"1年",yy:"%d年"},week:{dow:1,doy:4}})}),function(n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof exports?module.exports=n(require("../moment")):n(window.moment)}(function(n){return n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah點mm",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日LT",LLLL:"YYYY年MMMD日ddddLT",l:"YYYY年MMMD日",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日LT",llll:"YYYY年MMMD日ddddLT"},meridiem:function(n,t){var i=100*n+t;return 900>i?"早上":1130>i?"上午":1230>i?"中午":1800>i?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},ordinal:function(n,t){switch(t){case"d":case"D":case"DDD":return n+"日";case"M":return n+"月";case"w":case"W":return n+"週";default:return n}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"一分鐘",mm:"%d分鐘",h:"一小時",hh:"%d小時",d:"一天",dd:"%d天",M:"一個月",MM:"%d個月",y:"一年",yy:"%d年"}})});firstBy=function(){function t(n){return n}function i(n){return typeof n=="string"?n.toLowerCase():n}function r(n,r){var e,u,f;return(r=typeof r=="number"?{direction:r}:r||{},typeof n!="function"&&(e=n,n=function(n){return!n[e]?"":n[e]}),n.length===1&&(u=n,f=r.ignoreCase?i:t,n=function(n,t){return f(u(n))<f(u(t))?-1:f(u(n))>f(u(t))?1:0}),r.direction===-1)?function(t,i){return-n(t,i)}:n}function n(t,i){var u=typeof this=="function"?this:!1,f=r(t,i),e=u?function(n,t){return u(n,t)||f(n,t)}:f;return e.thenBy=n,e}return n}(),function(n,t){"use strict";function i(n,i,r){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(u,f,e,o,s){function v(){c&&(r.cancel(c),c=null);h&&(h.$destroy(),h=null);l&&(c=r.leave(l),c.then(function(){c=null}),l=null)}function y(){var e=n.current&&n.current.locals,o;t.isDefined(e&&e.$template)?(e=u.$new(),o=n.current,l=s(e,function(n){r.enter(n,null,l||f).then(function(){t.isDefined(a)&&(!a||u.$eval(a))&&i()});v()}),h=o.scope=e,h.$emit("$viewContentLoaded"),h.$eval(p)):v()}var h,l,c,a=e.autoscroll,p=e.onload||"";u.$on("$routeChangeSuccess",y);y()}}}function r(n,t,i){return{restrict:"ECA",priority:-400,link:function(r,u){var e=i.current,f=e.locals,o;u.html(f.$template);o=n(u.contents());e.controller&&(f.$scope=r,f=t(e.controller,f),e.controllerAs&&(r[e.controllerAs]=f),u.data("$ngControllerController",f),u.children().data("$ngControllerController",f));o(r)}}}n=t.module("ngRoute",["ng"]).provider("$route",function(){function i(n,i){return t.extend(Object.create(n),i)}function r(n,t){var r=t.caseInsensitiveMatch,i={originalPath:n,regexp:n},u=i.keys=[];return n=n.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(n,t,i,r){return n="?"===r?r:null,r="*"===r?r:null,u.push({name:i,optional:!!n}),t=t||"",""+(n?"":t)+"(?:"+(n?t:"")+(r&&"(.+?)"||"([^/]+)")+(n||"")+")"+(n||"")}).replace(/([\/$\*])/g,"\\$1"),i.regexp=new RegExp("^"+n+"$",r?"i":""),i}var n={};this.when=function(i,u){var f=t.copy(u),e;return t.isUndefined(f.reloadOnSearch)&&(f.reloadOnSearch=!0),t.isUndefined(f.caseInsensitiveMatch)&&(f.caseInsensitiveMatch=this.caseInsensitiveMatch),n[i]=t.extend(f,i&&r(i,f)),i&&(e="/"==i[i.length-1]?i.substr(0,i.length-1):i+"/",n[e]=t.extend({redirectTo:i},r(e,f))),this};this.caseInsensitiveMatch=!1;this.otherwise=function(n){return"string"==typeof n&&(n={redirectTo:n}),this.when(null,n),this};this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce",function(r,f,e,o,s,h,c){function y(n){var i=a.current;!(b=(l=k())&&i&&l.$$route===i.$$route&&t.equals(l.pathParams,i.pathParams)&&!l.reloadOnSearch&&!v)&&(i||l)&&r.$broadcast("$routeChangeStart",l,i).defaultPrevented&&n&&n.preventDefault()}function p(){var i=a.current,n=l;b?(i.params=n.params,t.copy(i.params,e),r.$broadcast("$routeUpdate",i)):(n||i)&&(v=!1,(a.current=n)&&n.redirectTo&&(t.isString(n.redirectTo)?f.path(w(n.redirectTo,n.params)).search(n.params).replace():f.url(n.redirectTo(n.pathParams,f.path(),f.search())).replace()),o.when(n).then(function(){if(n){var u=t.extend({},n.resolve),r,i;return t.forEach(u,function(n,i){u[i]=t.isString(n)?s.get(n):s.invoke(n,null,null,i)}),t.isDefined(r=n.template)?t.isFunction(r)&&(r=r(n.params)):t.isDefined(i=n.templateUrl)&&(t.isFunction(i)&&(i=i(n.params)),i=c.getTrustedResourceUrl(i),t.isDefined(i)&&(n.loadedTemplateUrl=i,r=h(i))),t.isDefined(r)&&(u.$template=r),o.all(u)}}).then(function(u){n==a.current&&(n&&(n.locals=u,t.copy(n.params,e)),r.$broadcast("$routeChangeSuccess",n,i))},function(t){n==a.current&&r.$broadcast("$routeChangeError",n,i,t)}))}function k(){var u,r;return t.forEach(n,function(n){var e,o,h,s,a,c,l;if(e=!r){if(o=f.path(),e=n.keys,h={},n.regexp)if(o=n.regexp.exec(o)){for(s=1,a=o.length;s<a;++s)c=e[s-1],l=o[s],c&&l&&(h[c.name]=l);e=h}else e=null;else e=null;e=u=e}e&&(r=i(n,{params:t.extend({},f.search(),u),pathParams:u}),r.$$route=n)}),r||n[null]&&i(n[null],{params:{},pathParams:{}})}function w(n,i){var r=[];return t.forEach((n||"").split(":"),function(n,t){if(0===t)r.push(n);else{var u=n.match(/(\w+)(?:[?*])?(.*)/),f=u[1];r.push(i[f]);r.push(u[2]||"");delete i[f]}}),r.join("")}var v=!1,l,b,a={routes:n,reload:function(){v=!0;r.$evalAsync(function(){y();p()})},updateParams:function(n){if(this.current&&this.current.$$route)n=t.extend({},this.current.params,n),f.path(w(this.current.$$route.originalPath,n)),f.search(n);else throw u("norout");}};return r.$on("$locationChangeStart",y),r.$on("$locationChangeSuccess",p),a}]});var u=t.$$minErr("ngRoute");n.provider("$routeParams",function(){this.$get=function(){return{}}});n.directive("ngView",i);n.directive("ngView",r);i.$inject=["$route","$anchorScroll","$animate"];r.$inject=["$compile","$controller","$route"]}(window,window.angular),function(n,t,i){"use strict";function d(n){var i=[];return o(i,t.noop).chars(n),i.join("")}function r(n,i){for(var f={},u=n.split(","),r=0;r<u.length;r++)f[i?t.lowercase(u[r]):u[r]]=!0;return f}function g(n,i){function k(n,r,e,s){if(r=t.lowercase(r),v[r])for(;f.last()&&y[f.last()];)o("",f.last());a[r]&&f.last()==r&&o("",r);(s=l[r]||!!s)||f.push(r);var h={};e.replace(tt,function(n,t,i,r,f){h[t]=u(i||r||f||"")});i.start&&i.start(r,h,s)}function o(n,r){var u=0,e;if(r=t.lowercase(r))for(u=f.length-1;0<=u&&f[u]!=r;u--);if(0<=u){for(e=f.length-1;e>=u;e--)i.end&&i.end(f[e]);f.length=u}}"string"!=typeof n&&(n=null===n||"undefined"==typeof n?"":""+n);var r,e,f=[],b=n,w;for(f.last=function(){return f[f.length-1]};n;){if(w="",e=!0,f.last()&&p[f.last()]?(n=n.replace(new RegExp("([\\W\\w]*)<\\s*\\/\\s*"+f.last()+"[^>]*>","i"),function(n,t){return t=t.replace(ut,"$1").replace(ft,"$1"),i.chars&&i.chars(u(t)),""}),o("",f.last())):(0===n.indexOf("<!--")?(r=n.indexOf("--",4),0<=r&&n.lastIndexOf("-->",r)===r&&(i.comment&&i.comment(n.substring(4,r)),n=n.substring(r+3),e=!1)):c.test(n)?(r=n.match(c))&&(n=n.replace(r[0],""),e=!1):rt.test(n)?(r=n.match(h))&&(n=n.substring(r[0].length),r[0].replace(h,o),e=!1):it.test(n)&&((r=n.match(s))?(r[4]&&(n=n.substring(r[0].length),r[0].replace(s,k)),e=!1):(w+="<",n=n.substring(1))),e&&(r=n.indexOf("<"),w+=0>r?n:n.substring(0,r),n=0>r?"":n.substring(r),i.chars&&i.chars(u(w)))),n==b)throw nt("badparse",n);b=n}o()}function u(n){return n?(f.innerHTML=n.replace(/</g,"&lt;"),f.textContent):""}function e(n){return n.replace(/&/g,"&amp;").replace(et,function(n){var t=n.charCodeAt(0);return n=n.charCodeAt(1),"&#"+(1024*(t-55296)+(n-56320)+65536)+";"}).replace(ot,function(n){return"&#"+n.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function o(n,i){var u=!1,r=t.bind(n,n.push);return{start:function(n,f,o){n=t.lowercase(n);!u&&p[n]&&(u=n);u||!0!==w[n]||(r("<"),r(n),t.forEach(f,function(u,f){var o=t.lowercase(f),s="img"===n&&"src"===o||"background"===o;!0===k[o]&&(!0!==b[o]||i(u,s))&&(r(" "),r(f),r('="'),r(e(u)),r('"'))}),r(o?"/>":">"))},end:function(n){n=t.lowercase(n);u||!0!==w[n]||(r("<\/"),r(n),r(">"));n==u&&(u=!1)},chars:function(n){u||r(e(n))}}}var nt=t.$$minErr("$sanitize"),s=/^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,h=/^<\/\s*([\w:-]+)[^>]*>/,tt=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,it=/^</,rt=/^<\//,ut=/\x3c!--(.*?)--\x3e/g,c=/<!DOCTYPE([^>]*?)>/i,ft=/<!\[CDATA\[(.*?)]]\x3e/g,et=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ot=/([^\#-~| |!])/g,l=r("area,br,col,hr,img,wbr"),k,f;n=r("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr");i=r("rp,rt");var a=t.extend({},i,n),v=t.extend({},n,r("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")),y=t.extend({},i,r("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var"));n=r("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan,use");var p=r("script,style"),w=t.extend({},l,v,y,a,n),b=r("background,cite,href,longdesc,src,usemap,xlink:href");n=r("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,target,title,type,valign,value,vspace,width");i=r("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",!0);k=t.extend({},b,i,n);f=document.createElement("pre");t.module("ngSanitize",[]).provider("$sanitize",function(){this.$get=["$$sanitizeUri",function(n){return function(t){var i=[];return g(t,o(i,function(t,i){return!/^unsafe/.test(n(t,i))})),i.join("")}}]});t.module("ngSanitize").filter("linky",["$sanitize",function(n){var i=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/,r=/^mailto:/;return function(u,f){function c(n){n&&o.push(d(n))}function a(n,i){o.push("<a ");t.isDefined(f)&&o.push('target="',f,'" ');o.push('href="',n.replace(/"/g,"&quot;"),'">');c(i);o.push("<\/a>")}if(!u)return u;for(var e,s=u,o=[],h,l;e=s.match(i);)h=e[0],e[2]||e[4]||(h=(e[3]?"http://":"mailto:")+h),l=e.index,c(s.substr(0,l)),a(h,e[0].replace(r,"")),s=s.substring(l+e[0].length);return c(s),n(o.join(""))}}])}(window,window.angular),function(n,t,i){"use strict";function ot(n,t,i){if(!n)throw ngMinErr("areq",t||"?",i||"required");return n}function st(n,t){return!n&&!t?"":n?t?(h(n)&&(n=n.join(" ")),h(t)&&(t=t.join(" ")),n+" "+t):n:t}function kt(n){var t={};return n&&(n.to||n.from)&&(t.to=n.to,t.from=n.from),t}function c(n,t,i){var u="";return n=h(n)?n:n&&k(n)&&n.length?n.split(/\s+/):[],r(n,function(n,r){n&&0<n.length&&(u+=0<r?" ":"",u+=i?t+n:n+t)}),u}function dt(n){if(n instanceof s)switch(n.length){case 0:return[];case 1:if(1===n[0].nodeType)return n;break;default:return s(d(n))}if(1===n.nodeType)return s(n)}function d(n){var t,i;if(!n[0])return n;for(t=0;t<n.length;t++)if(i=n[t],1==i.nodeType)return i}function gt(n,t,i){r(t,function(t){n.addClass(t,i)})}function ni(n,t,i){r(t,function(t){n.removeClass(t,i)})}function p(n){return function(t,i){i.addClass&&(gt(n,t,i.addClass),i.addClass=null);i.removeClass&&(ni(n,t,i.removeClass),i.removeClass=null)}}function w(n){if(n=n||{},!n.$$prepared){var t=n.domOperation||e;n.domOperation=function(){n.$$domOperationFired=!0;t();t=e};n.$$prepared=!0}return n}function l(n,t){ht(n,t);ct(n,t)}function ht(n,t){t.from&&(n.css(t.from),t.from=null)}function ct(n,t){t.to&&(n.css(t.to),t.to=null)}function a(n,t,i){var r=(t.addClass||"")+" "+(i.addClass||""),u=(t.removeClass||"")+" "+(i.removeClass||"");return n=ti(n.attr("class"),r,u),yt(t,i),t.addClass=n.addClass?n.addClass:null,t.removeClass=n.removeClass?n.removeClass:null,t}function ti(n,t,i){function e(n){k(n)&&(n=n.split(" "));var t={};return r(n,function(n){n.length&&(t[n]=!0)}),t}var f={},u;return n=e(n),t=e(t),r(t,function(n,t){f[t]=1}),i=e(i),r(i,function(n,t){f[t]=1===f[t]?null:-1}),u={addClass:"",removeClass:""},r(f,function(t,i){var r,f;1===t?(r="addClass",f=!n[i]):-1===t&&(r="removeClass",f=n[i]);f&&(u[r].length&&(u[r]+=" "),u[r]+=i)}),u}function u(n){return n instanceof t.element?n[0]:n}function lt(n,t,i){var u=Object.create(null),f=n.getComputedStyle(t)||{};return r(i,function(n,t){var i=f[n],r;i&&(r=i.charAt(0),("-"===r||"+"===r||0<=r)&&(i=ii(i)),0===i&&(i=null),u[t]=i)}),u}function ii(n){var t=0;return n=n.split(/\s*,\s*/),r(n,function(n){"s"==n.charAt(n.length-1)&&(n=n.substring(0,n.length-1));n=parseFloat(n)||0;t=t?Math.max(n,t):n}),t}function g(n){return 0===n||null!=n}function at(n,t){var i=f,r=n+"s";return t?i+="Duration":r+=" linear all",[i,r]}function b(n,t){var i=t?"-"+t+"s":"";return v(n,[y,i]),[y,i]}function nt(n,t){var i=t?"paused":"",r=o+"PlayState";return v(n,[r,i]),[r,i]}function v(n,t){n.style[t[0]]=t[1]}function vt(){var n=Object.create(null);return{flush:function(){n=Object.create(null)},count:function(t){return(t=n[t])?t.total:0},get:function(t){return(t=n[t])&&t.value},put:function(t,i){n[t]?n[t].total++:n[t]={total:1,value:i}}}}var e=t.noop,yt=t.extend,s=t.element,r=t.forEach,h=t.isArray,k=t.isString,tt=t.isObject,ri=t.isUndefined,ui=t.isDefined,pt=t.isFunction,it=t.isElement,f,rt,o,ut,wt,bt;n.ontransitionend===i&&n.onwebkittransitionend!==i?(f="WebkitTransition",rt="webkitTransitionEnd transitionend"):(f="transition",rt="transitionend");n.onanimationend===i&&n.onwebkitanimationend!==i?(o="WebkitAnimation",ut="webkitAnimationEnd animationend"):(o="animation",ut="animationend");var ft=o+"Delay",et=o+"Duration",y=f+"Delay";n=f+"Duration";wt={transitionDuration:n,transitionDelay:y,transitionProperty:f+"Property",animationDuration:et,animationDelay:ft,animationIterationCount:o+"IterationCount"};bt={transitionDuration:n,transitionDelay:y,animationDuration:et,animationDelay:ft};t.module("ngAnimate",[]).directive("ngAnimateChildren",[function(){return function(n,i,r){n=r.ngAnimateChildren;t.isString(n)&&0===n.length?i.data("$$ngAnimateChildren",!0):r.$observe("ngAnimateChildren",function(n){i.data("$$ngAnimateChildren","on"===n||"true"===n)})}}]).factory("$$rAFMutex",["$$rAF",function(n){return function(){var t=!1;return n(function(){t=!0}),function(i){t?i():n(i)}}}]).factory("$$rAFScheduler",["$$rAF",function(n){function u(n){i.push([].concat(n));r()}function r(){var e,u,f;if(i.length){for(e=[],u=0;u<i.length;u++)f=i[u],f.shift()(),f.length&&e.push(f);i=e;t||n(function(){t||r()})}}var i=[],t;return u.waitUntilQuiet=function(i){t&&t();t=n(function(){t=null;i();r()})},u}]).factory("$$AnimateRunner",["$q","$$rAFMutex",function(n,t){function i(n){this.setHost(n);this._doneCallbacks=[];this._runInAnimationFrame=t();this._state=0}return i.chain=function(n,t){function r(){i===n.length?t(!0):n[i](function(n){!1===n?t(!1):(i++,r())})}var i=0;r()},i.all=function(n,t){function u(r){i=i&&r;++f===n.length&&t(i)}var f=0,i=!0;r(n,function(n){n.done(u)})},i.prototype={setHost:function(n){this.host=n||{}},done:function(n){2===this._state?n():this._doneCallbacks.push(n)},progress:e,getPromise:function(){if(!this.promise){var t=this;this.promise=n(function(n,i){t.done(function(t){!1===t?i():n()})})}return this.promise},then:function(n,t){return this.getPromise().then(n,t)},"catch":function(n){return this.getPromise()["catch"](n)},"finally":function(n){return this.getPromise()["finally"](n)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end();this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel();this._resolve(!1)},complete:function(n){var t=this;0===t._state&&(t._state=1,t._runInAnimationFrame(function(){t._resolve(n)}))},_resolve:function(n){2!==this._state&&(r(this._doneCallbacks,function(t){t(n)}),this._doneCallbacks.length=0,this._state=2)}},i}]).provider("$$animateQueue",["$animateProvider",function(n){function f(n,i,r,u){return t[n].some(function(n){return n(i,r,u)})}function i(n,t){n=n||{};var i=0<(n.addClass||"").length,r=0<(n.removeClass||"").length;return t?i&&r:i||r}var t=this.rules={skip:[],cancel:[],join:[]};t.join.push(function(n,t){return!t.structural&&i(t.options)});t.skip.push(function(n,t){return!t.structural&&!i(t.options)});t.skip.push(function(n,t,i){return"leave"==i.event&&t.structural});t.skip.push(function(n,t,i){return i.structural&&!t.structural});t.cancel.push(function(n,t,i){return i.structural&&t.structural});t.cancel.push(function(n,t,i){return 2===i.state&&t.structural});t.cancel.push(function(n,t,i){return n=t.options,i=i.options,n.addClass&&n.addClass===i.removeClass||n.removeClass&&n.removeClass===i.addClass});this.$get=["$$rAF","$rootScope","$rootElement","$document","$$HashMap","$$animation","$$AnimateRunner","$templateRequest","$$jqLite",function(t,e,o,c,v,y,b,k,g){function vt(n,t){var e=u(n),i=[],f=rt[t];return f&&r(f,function(n){n.node.contains(e)&&i.push(n.callback)}),i}function pt(n,i,u,f){t(function(){r(vt(i,n),function(n){n(i,u,f)})})}function wt(n,t,r){function rt(t,i,r,u){pt(i,n,r,u);t.progress(i,r,u)}function p(t){at(n,r);l(n,r);r.domOperation();c.complete(!t)}var v,it,c,o,g;if(((n=dt(n))&&(v=u(n),it=n.parent()),r=w(r),c=new b,!v)||(h(r.addClass)&&(r.addClass=r.addClass.join(" ")),h(r.removeClass)&&(r.removeClass=r.removeClass.join(" ")),r.from&&!tt(r.from)&&(r.from=null),r.to&&!tt(r.to)&&(r.to=null),o=[v.className,r.addClass,r.removeClass].join(" "),!ti(o)))return p(),c;var d=0<=["enter","move","leave"].indexOf(t),s=!ft||ut.get(v),o=!s&&nt.get(v)||{},k=!!o.state;if(s||k&&1==o.state||(s=!kt(n,it,t)),s)return p(),c;if(d&&bt(n),s={structural:d,element:n,event:t,close:p,options:r,runner:c},k){if(f("skip",n,s,o))return 2===o.state?(p(),c):(a(n,o.options,r),o.runner);if(f("cancel",n,s,o))2===o.state?o.runner.end():o.structural?o.close():a(n,s.options,o.options);else if(f("join",n,s,o))if(2===o.state)a(n,r,{});else return t=s.event=o.event,r=a(n,o.options,s.options),c}else a(n,r,{});return((k=s.structural)||(k="animate"===s.event&&0<Object.keys(s.options.to||{}).length||i(s.options)),!k)?(p(),et(n),c):(d&&ht(it),g=(o.counter||0)+1,s.counter=g,ct(n,1,s),e.$$postDigest(function(){var f=nt.get(v),e=!f,f=f||{},o=n.parent()||[],s=0<o.length&&("animate"===f.event||f.structural||i(f.options));e||f.counter!==g||!s?(e&&(at(n,r),l(n,r)),(e||d&&f.event!==t)&&(r.domOperation(),c.end()),s||et(n)):(t=!f.structural&&i(f.options,!0)?"setClass":f.event,f.structural&&ht(o),ct(n,2),f=y(n,t,f.options),f.done(function(i){p(!i);(i=nt.get(v))&&i.counter===g&&et(u(n));rt(c,t,"close",{})}),c.setHost(f),rt(c,t,"start",{}))}),c)}function bt(n){n=u(n).querySelectorAll("[data-ng-animate]");r(n,function(n){var i=parseInt(n.getAttribute("data-ng-animate")),t=nt.get(n);switch(i){case 2:t.runner.end();case 1:t&&nt.remove(n)}})}function et(n){n=u(n);n.removeAttribute("data-ng-animate");nt.remove(n)}function st(n,t){return u(n)===u(t)}function ht(n){var t,r;n=u(n);do{if(!n||1!==n.nodeType)break;t=nt.get(n);t&&(r=n,!t.structural&&i(t.options)&&(2===t.state&&t.runner.end(),et(r)));n=n.parentNode}while(1)}function kt(n,t,i){var r=i=!1,f=!1,u,e;for((n=n.data("$ngAnimatePin"))&&(t=n);t&&t.length;){if(r||(r=st(t,o)),n=t[0],1!==n.nodeType)break;if(e=nt.get(n)||{},f||(f=e.structural||ut.get(n)),(ri(u)||!0===u)&&(n=t.data("$$ngAnimateChildren"),ui(n)&&(u=n)),f&&!1===u)break;r||(r=st(t,o),r||(n=t.data("$ngAnimatePin"))&&(t=n));i||(i=st(t,ni));t=t.parent()}return(!f||u)&&r&&i}function ct(n,t,i){i=i||{};i.state=t;n=u(n);n.setAttribute("data-ng-animate",t);i=(t=nt.get(n))?yt(t,i):i;nt.put(n,i)}var nt=new v,ut=new v,ft=null,gt=e.$watch(function(){return 0===k.totalPendingRequests},function(n){n&&(gt(),e.$$postDigest(function(){e.$$postDigest(function(){null===ft&&(ft=!0)})}))}),ni=s(c[0].body),rt={},lt=n.classNameFilter(),ti=lt?function(n){return lt.test(n)}:function(){return!0},at=p(g);return{on:function(n,t,i){t=d(t);rt[n]=rt[n]||[];rt[n].push({node:t,callback:i})},off:function(n,t,i){function u(n,t,i){var r=d(t);return n.filter(function(n){return!(n.node===r&&(!i||n.callback===i))})}var r=rt[n];r&&(rt[n]=1===arguments.length?null:u(r,t,i))},pin:function(n,t){ot(it(n),"element","not an element");ot(it(t),"parentElement","not an element");n.data("$ngAnimatePin",t)},push:function(n,t,i,r){return i=i||{},i.domOperation=r,wt(n,t,i)},enabled:function(n,t){var f=arguments.length,i,r;return 0===f?t=!!ft:it(n)?(i=u(n),r=ut.get(i),1===f?t=!r:(t=!!t)?r&&ut.remove(i):ut.put(i,!0)):t=ft=!!n,t}}}]}]).provider("$$animation",["$animateProvider",function(){function n(n){return n.data("$$animationRunner")}var t=this.drivers=[];this.$get=["$$jqLite","$rootScope","$injector","$$AnimateRunner","$$rAFScheduler",function(i,f,e,o,h){var a=[],b=p(i),v=0,y=0,c=[];return function(p,k,d){function et(n){n=n.hasAttribute("ng-animate-ref")?[n]:n.querySelectorAll("[ng-animate-ref]");var t=[];return r(n,function(n){var i=n.getAttribute("ng-animate-ref");i&&i.length&&t.push(n)}),t}function ot(n){var t=[],i={},e,f;return r(n,function(n,f){var e=u(n.element),h=0<=["enter","move"].indexOf(n.event),e=n.structural?et(e):[],o;e.length?(o=h?"to":"from",r(e,function(n){var t=n.getAttribute("ng-animate-ref");i[t]=i[t]||{};i[t][o]={animationID:f,element:s(n)}})):t.push(n)}),e={},f={},r(i,function(i){var r=i.from,u=i.to,c;if(r&&u){var o=n[r.animationID],s=n[u.animationID],h=r.animationID.toString();f[h]||(c=f[h]={structural:!0,beforeStart:function(){o.beforeStart();s.beforeStart()},close:function(){o.close();s.close()},classes:ht(o.classes,s.classes),from:o,to:s,anchors:[]},c.classes.length?t.push(c):(t.push(o),t.push(s)));f[h].anchors.push({out:r.element,"in":u.element})}else r=r?r.animationID:u.animationID,u=r.toString(),e[u]||(e[u]=!0,t.push(n[r]))}),t}function ht(n,t){var f,i,r,u;for(n=n.split(" "),t=t.split(" "),f=[],i=0;i<n.length;i++)if(r=n[i],"ng-"!==r.substring(0,3))for(u=0;u<t.length;u++)if(r===t[u]){f.push(r);break}return f.join(" ")}function ct(n){for(var i,r=t.length-1;0<=r;r--)if(i=t[r],e.has(i)&&(i=e.get(i)(n)))return i}function lt(t,i){t.from&&t.to?(n(t.from.element).setHost(i),n(t.to.element).setHost(i)):n(t.element).setHost(i)}function ut(){var t=n(p);!t||"leave"===k&&d.$$domOperationFired||t.end()}function tt(n){p.off("$destroy",ut);p.removeData("$$animationRunner");b(p,d);l(p,d);d.domOperation();g&&i.removeClass(p,g);p.removeClass("ng-animate");nt.complete(!n)}var it,nt,rt,g,ft;if(d=w(d),it=0<=["enter","move","leave"].indexOf(k),nt=new o({end:function(){tt()},cancel:function(){tt(!0)}}),!t.length)return tt(),nt;p.data("$$animationRunner",nt);rt=st(p.attr("class"),st(d.addClass,d.removeClass));g=d.tempClasses;g&&(rt+=" "+g,d.tempClasses=null);it||(ft=v,v+=1);a.push({element:p,classes:rt,event:k,classBasedIndex:ft,structural:it,options:d,beforeStart:function(){p.addClass("ng-animate");g&&i.addClass(p,g)},close:tt});p.on("$destroy",ut);return 1<a.length?nt:(f.$$postDigest(function(){y=v;v=0;c.length=0;var t=[];r(a,function(i){n(i.element)&&t.push(i)});a.length=0;r(ot(t),function(t){function i(){var i,r,u;t.beforeStart();r=t.close;n(t.anchors?t.from.element||t.to.element:t.element)&&(u=ct(t),u&&(i=u.start));i?(i=i(),i.done(function(n){r(!n)}),lt(t,i)):r()}t.structural?i():(c.push({node:u(t.element),fn:i}),t.classBasedIndex===y-1&&(c=c.sort(function(n,t){return t.node.contains(n.node)}).map(function(n){return n.fn}),h(c)))})}),nt)}}]}]).provider("$animateCss",["$animateProvider",function(){var n=vt(),t=vt();this.$get=["$window","$$jqLite","$$AnimateRunner","$timeout","$document","$sniffer","$$rAFScheduler",function(i,e,s,a,k,d,tt){function st(n,t){var i=n.parentNode;return(i.$$ngAnimateParentKey||(i.$$ngAnimateParentKey=++dt))+"-"+n.getAttribute("class")+"-"+t}function yt(r,u,f,o){var s;return 0<n.count(f)&&(s=t.get(f),s||(u=c(u,"-stagger"),e.addClass(r,u),s=lt(i,r,o),s.animationDuration=Math.max(s.animationDuration,0),s.transitionDuration=Math.max(s.transitionDuration,0),e.removeClass(r,u),t.put(f,s))),s||{}}function pt(i){it.push(i);tt.waitUntilQuiet(function(){n.flush();t.flush();for(var r=gt.offsetWidth+1,i=0;i<it.length;i++)it[i](r);it.length=0})}function vt(t,r,u){return r=n.get(u),r||(r=lt(i,t,wt),"infinite"===r.animationIterationCount&&(r.animationIterationCount=1)),n.put(u,r),t=r,u=t.animationDelay,r=t.transitionDelay,t.maxDelay=u&&r?Math.max(u,r):u||r,t.maxDuration=Math.max(t.animationDuration*t.animationIterationCount,t.transitionDuration),t}var ot=p(e),dt=0,gt=u(k).body,it=[];return function(t,i){function ci(){ti()}function di(){ti(!0)}function ti(n){oi||wi&&ii||(oi=!0,ii=!1,e.removeClass(t,ri),e.removeClass(t,nr),nt(k,!1),b(k,!1),r(wt,function(n){k.style[n[0]]=""}),ot(t,i),l(t,i),i.onDone&&i.onDone(),ui&&ui.complete(!n))}function gi(n){p.blockTransition&&b(k,n);p.blockKeyframeAnimation&&nt(k,!!n)}function pi(){return ui=new s({end:ci,cancel:di}),ti(),{$$willAnimate:!1,start:function(){return ui},end:ci}}function tr(){function u(){var u,h;if(!oi){if(gi(!1),r(wt,function(n){k.style[n[0]]=n[1]}),ot(t,i),e.addClass(t,nr),p.recalculateTimingStyles){if(hi=k.className+" "+ri,ei=st(k,hi),tt=vt(k,hi,ei),dt=tt.maxDelay,si=Math.max(dt,0),lt=tt.maxDuration,0===lt){ti();return}p.hasTransitions=0<tt.transitionDuration;p.hasAnimations=0<tt.animationDuration}(p.applyTransitionDelay||p.applyAnimationDelay)&&(dt="boolean"!=typeof i.delay&&g(i.delay)?parseFloat(i.delay):dt,si=Math.max(dt,0),p.applyTransitionDelay&&(tt.transitionDelay=dt,u=[y,dt+"s"],wt.push(u),k.style[u[0]]=u[1]),p.applyAnimationDelay&&(tt.animationDelay=dt,u=[ft,dt+"s"],wt.push(u),k.style[u[0]]=u[1]));vi=1e3*si;bi=1e3*lt;i.easing&&(h=i.easing,p.hasTransitions&&(u=f+"TimingFunction",wt.push([u,h]),k.style[u]=h),p.hasAnimations&&(u=o+"TimingFunction",wt.push([u,h]),k.style[u]=h));tt.transitionDuration&&n.push(rt);tt.animationDuration&&n.push(ut);s=Date.now();t.on(n.join(" "),v);a(l,vi+1.5*bi);ct(t,i)}}function l(){ti()}function v(n){n.stopPropagation();var t=n.originalEvent||n;n=t.$manualTimeStamp||t.timeStamp||Date.now();t=parseFloat(t.elapsedTime.toFixed(3));Math.max(n-s,0)>=vi&&t>=lt&&(wi=!0,ti())}if(!oi){var s,n=[],h=function(n){if(wi)ii&&n&&(ii=!1,ti());else if(ii=!n,tt.animationDuration)if(n=nt(k,ii),ii)wt.push(n);else{var t=wt,i=t.indexOf(n);0<=n&&t.splice(i,1)}},c=0<yi&&(tt.transitionDuration&&0===gt.transitionDuration||tt.animationDuration&&0===gt.animationDuration)&&Math.max(gt.animationDelay,gt.transitionDelay);c?a(u,Math.floor(c*yi*1e3),!1):u();ai.resume=function(){h(!0)};ai.pause=function(){h(!1)}}}var k=u(t),ei,gt,yi,tt,dt,p;i=w(i);var wt=[],li=t.attr("class"),it=kt(i),oi,ii,wi,ui,ai,si,vi,lt,bi;if(0===i.duration||!d.animations&&!d.transitions)return pi();var fi=i.event&&h(i.event)?i.event.join(" "):i.event,ki="",ni="";fi&&i.structural?ki=c(fi,"ng-",!0):fi&&(ki=fi);i.addClass&&(ni+=c(i.addClass,"-add"));i.removeClass&&(ni.length&&(ni+=" "),ni+=c(i.removeClass,"-remove"));i.applyClassesEarly&&ni.length&&(ot(t,i),ni="");var ri=[ki,ni].join(" ").trim(),hi=li+" "+ri,nr=c(ri,"-active"),li=it.to&&0<Object.keys(it.to).length;return!li&&!ri?pi():(0<i.stagger?(it=parseFloat(i.stagger),gt={transitionDelay:it,animationDelay:it,transitionDuration:0,animationDuration:0}):(ei=st(k,hi),gt=yt(k,ri,ei,bt)),e.addClass(t,ri),i.transitionStyle&&(it=[f,i.transitionStyle],v(k,it),wt.push(it)),0<=i.duration&&(it=0<k.style[f].length,it=at(i.duration,it),v(k,it),wt.push(it)),i.keyframeStyle&&(it=[o,i.keyframeStyle],v(k,it),wt.push(it)),yi=gt?0<=i.staggerIndex?i.staggerIndex:n.count(ei):0,(fi=0===yi)&&b(k,9999),tt=vt(k,hi,ei),dt=tt.maxDelay,si=Math.max(dt,0),lt=tt.maxDuration,p={},p.hasTransitions=0<tt.transitionDuration,p.hasAnimations=0<tt.animationDuration,p.hasTransitionAll=p.hasTransitions&&"all"==tt.transitionProperty,p.applyTransitionDuration=li&&(p.hasTransitions&&!p.hasTransitionAll||p.hasAnimations&&!p.hasTransitions),p.applyAnimationDuration=i.duration&&p.hasAnimations,p.applyTransitionDelay=g(i.delay)&&(p.applyTransitionDuration||p.hasTransitions),p.applyAnimationDelay=g(i.delay)&&p.hasAnimations,p.recalculateTimingStyles=0<ni.length,(p.applyTransitionDuration||p.applyAnimationDuration)&&(lt=i.duration?parseFloat(i.duration):lt,p.applyTransitionDuration&&(p.hasTransitions=!0,tt.transitionDuration=lt,it=0<k.style[f+"Property"].length,wt.push(at(lt,it))),p.applyAnimationDuration&&(p.hasAnimations=!0,tt.animationDuration=lt,wt.push([et,lt+"s"]))),0===lt&&!p.recalculateTimingStyles)?pi():(null==i.duration&&0<tt.transitionDuration&&(p.recalculateTimingStyles=p.recalculateTimingStyles||fi),vi=1e3*si,bi=1e3*lt,i.skipBlocking||(p.blockTransition=0<tt.transitionDuration,p.blockKeyframeAnimation=0<tt.animationDuration&&0<gt.animationDelay&&0===gt.animationDuration),ht(t,i),p.blockTransition||b(k,!1),gi(lt),{$$willAnimate:!0,end:ci,start:function(){if(!oi)return ai={end:ci,cancel:di,resume:null,pause:null},ui=new s(ai),pt(tr),ui}})}}]}]).provider("$$animateCssDriver",["$$animationProvider",function(n){n.drivers.push("$$animateCssDriver");this.$get=["$animateCss","$rootScope","$$AnimateRunner","$rootElement","$document","$sniffer",function(n,t,i,f,o,h){function a(n){return n.replace(/\bng-\S+\b/g,"")}function v(n,t){return k(n)&&(n=n.split(" ")),k(t)&&(t=t.split(" ")),n.filter(function(n){return-1===t.indexOf(n)}).join(" ")}function p(t,f,e){function p(n){var t={},i=u(n).getBoundingClientRect();return r(["width","height","top","left"],function(n){var r=i[n];switch(n){case"top":r+=c.scrollTop;break;case"left":r+=c.scrollLeft}t[n]=Math.floor(r)+"px"}),t}function w(){var t=a(e.attr("class")||""),i=v(t,b),t=v(b,t),i=n(o,{to:p(e),addClass:"ng-anchor-in "+i,removeClass:"ng-anchor-out "+t,delay:!0});return i.$$willAnimate?i:null}function l(){o.remove();f.removeClass("ng-animate-shim");e.removeClass("ng-animate-shim")}var o=s(u(f).cloneNode(!0)),b=a(o.attr("class")||""),h,k;return(f.addClass("ng-animate-shim"),e.addClass("ng-animate-shim"),o.addClass("ng-anchor"),y.append(o),t=function(){var t=n(o,{addClass:"ng-anchor-out",delay:!0,from:p(f)});return t.$$willAnimate?t:null}(),!t&&(h=w(),!h))?l():(k=t||h,{start:function(){function r(){n&&n.end()}var t,n=k.start();return n.done(function(){if(n=null,!h&&(h=w()))return n=h.start(),n.done(function(){n=null;l();t.complete()}),n;l();t.complete()}),t=new i({end:r,cancel:r})}})}function w(n,t,u,f){var e=l(n),o=l(t),s=[];return r(f,function(n){(n=p(u,n.out,n["in"]))&&s.push(n)}),e||o||0!==s.length?{start:function(){function u(){r(n,function(n){n.end()})}var n=[],t;return e&&n.push(e.start()),o&&n.push(o.start()),r(s,function(t){n.push(t.start())}),t=new i({end:u,cancel:u}),i.all(n,function(n){t.complete(n)}),t}}:void 0}function l(t){var r=t.element,i=t.options||{};return t.structural?(i.structural=i.applyClassesEarly=!0,i.event=t.event,"leave"===i.event&&(i.onDone=i.domOperation)):i.event=null,t=n(r,i),t.$$willAnimate?t:null}var c,y;return!h.animations&&!h.transitions?e:(c=u(o).body,t=u(f),y=s(c.parentNode===t?c:t),function(n){return n.from&&n.to?w(n.from,n.to,n.classes,n.anchors):l(n)})}]}]).provider("$$animateJs",["$animateProvider",function(n){this.$get=["$injector","$$AnimateRunner","$$rAFMutex","$$jqLite",function(t,i,u,f){function o(i){var r,f;i=h(i)?i:i.split(" ");for(var e=[],o={},u=0;u<i.length;u++)r=i[u],f=n.$$registeredAnimations[r],f&&!o[r]&&(e.push(t.get(f)),o[r]=!0);return e}var s=p(f);return function(n,t,u,f){function v(){f.domOperation();s(n,f)}function nt(n,t,r,u,f){switch(r){case"animate":t=[t,u.from,u.to,f];break;case"setClass":t=[t,d,g,f];break;case"addClass":t=[t,d,f];break;case"removeClass":t=[t,g,f];break;default:t=[t,f]}if(t.push(u),n=n.apply(n,t))if(pt(n.start)&&(n=n.start()),n instanceof i)n.done(f);else if(pt(n))return n;return e}function h(n,t,u,f,o){var s=[];return r(f,function(r){var f=r[o];f&&s.push(function(){var r,s,h=!1,o=function(n){h||(h=!0,(s||e)(n),r.complete(!n))};return r=new i({end:function(){o()},cancel:function(){o(!0)}}),s=nt(f,n,t,u,function(n){o(!1===n)}),r})}),s}function k(n,t,u,f,e){var o=h(n,t,u,f,e),s,c;return 0===o.length&&("beforeSetClass"===e?(s=h(n,"removeClass",u,f,"beforeRemoveClass"),c=h(n,"addClass",u,f,"beforeAddClass")):"setClass"===e&&(s=h(n,"removeClass",u,f,"removeClass"),c=h(n,"addClass",u,f,"addClass")),s&&(o=o.concat(s)),c&&(o=o.concat(c))),0!==o.length?function(n){var t=[];return o.length&&r(o,function(n){t.push(n())}),t.length?i.all(t,n):n(),function(n){r(t,function(t){n?t.cancel():t.end()})}}:void 0}var p,b;3===arguments.length&&tt(u)&&(f=u,u=null);f=w(f);u||(u=n.attr("class")||"",f.addClass&&(u+=" "+f.addClass),f.removeClass&&(u+=" "+f.removeClass));var d=f.addClass,g=f.removeClass,y=o(u),c,a;return y.length&&("leave"==t?(b="leave",p="afterLeave"):(b="before"+t.charAt(0).toUpperCase()+t.substr(1),p=t),"enter"!==t&&"move"!==t&&(c=k(n,t,f,y,b)),a=k(n,t,f,y,p)),c||a?{start:function(){function o(t){u=!0;v();l(n,f);s.complete(t)}var r,t=[],u,s;return c&&t.push(function(n){r=c(n)}),t.length?t.push(function(n){v();n(!0)}):v(),a&&t.push(function(n){r=a(n)}),u=!1,s=new i({end:function(){u||((r||e)(void 0),o(void 0))},cancel:function(){u||((r||e)(!0),o(!0))}}),i.chain(t,o),s}}:void 0}}]}]).provider("$$animateJsDriver",["$$animationProvider",function(n){n.drivers.push("$$animateJsDriver");this.$get=["$$animateJs","$$AnimateRunner",function(n,t){function i(t){return n(t.element,t.event,t.classes,t.options)}return function(n){if(n.from&&n.to){var u=i(n.from),f=i(n.to);if(u||f)return{start:function(){function i(){return function(){r(n,function(n){n.end()})}}var n=[],e;return u&&n.push(u.start()),f&&n.push(f.start()),t.all(n,function(n){e.complete(n)}),e=new t({end:i(),cancel:i()})}}}else return i(n)}}]}])}(window,window.angular),function(n){if(typeof exports=="object"&&typeof module!="undefined")module.exports=n();else if(typeof define=="function"&&define.amd)define([],n);else{var t;t=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:this;t.localforage=n()}}(function(){return function n(t,i,r){function f(u,o){var h,c,s;if(!i[u]){if(!t[u]){if(h=typeof require=="function"&&require,!o&&h)return h(u,!0);if(e)return e(u,!0);c=new Error("Cannot find module '"+u+"'");throw c.code="MODULE_NOT_FOUND",c;}s=i[u]={exports:{}};t[u][0].call(s.exports,function(n){var i=t[u][1][n];return f(i?i:n)},s,s.exports,n,t,i,r)}return i[u].exports}for(var e=typeof require=="function"&&require,u=0;u<r.length;u++)f(r[u]);return f}({1:[function(n,t,i){"use strict";function u(){}function o(n){if(typeof n!="function")throw new TypeError("resolver must be a function");this.state=c;this.queue=[];this.outcome=void 0;n!==u&&l(this,n)}function f(n,t,i){this.promise=n;typeof t=="function"&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled);typeof i=="function"&&(this.onRejected=i,this.callRejected=this.otherCallRejected)}function s(n,t,i){v(function(){var u;try{u=t(i)}catch(f){return r.reject(n,f)}u===n?r.reject(n,new TypeError("Cannot resolve promise with itself")):r.resolve(n,u)})}function y(n){var t=n&&n.then;if(n&&typeof n=="object"&&typeof t=="function")return function(){t.apply(n,arguments)}}function l(n,t){function u(t){i||(i=!0,r.reject(n,t))}function e(t){i||(i=!0,r.resolve(n,t))}function o(){t(e,u)}var i=!1,f=a(o);f.status==="error"&&u(f.value)}function a(n,t){var i={};try{i.value=n(t);i.status="success"}catch(r){i.status="error";i.value=r}return i}function p(n){return n instanceof this?n:r.resolve(new this(u),n)}function w(n){var t=new this(u);return r.reject(t,n)}function b(n){function c(n,u){function f(n){o[u]=n;++h!==t||i||(i=!0,r.resolve(e,o))}s.resolve(n).then(f,function(n){i||(i=!0,r.reject(e,n))})}var s=this,t,i;if(Object.prototype.toString.call(n)!=="[object Array]")return this.reject(new TypeError("must be an array"));if(t=n.length,i=!1,!t)return this.resolve([]);for(var o=new Array(t),h=0,f=-1,e=new this(u);++f<t;)c(n[f],f);return e}function k(n){function s(n){o.resolve(n).then(function(n){t||(t=!0,r.resolve(i,n))},function(n){t||(t=!0,r.reject(i,n))})}var o=this,f,t,e,i;if(Object.prototype.toString.call(n)!=="[object Array]")return this.reject(new TypeError("must be an array"));if(f=n.length,t=!1,!f)return this.resolve([]);for(e=-1,i=new this(u);++e<f;)s(n[e]);return i}var v=n(2),r={},h=["REJECTED"],e=["FULFILLED"],c=["PENDING"];t.exports=i=o;o.prototype["catch"]=function(n){return this.then(null,n)};o.prototype.then=function(n,t){var i,r;return typeof n!="function"&&this.state===e||typeof t!="function"&&this.state===h?this:(i=new this.constructor(u),this.state!==c?(r=this.state===e?n:t,s(i,r,this.outcome)):this.queue.push(new f(i,n,t)),i)};f.prototype.callFulfilled=function(n){r.resolve(this.promise,n)};f.prototype.otherCallFulfilled=function(n){s(this.promise,this.onFulfilled,n)};f.prototype.callRejected=function(n){r.reject(this.promise,n)};f.prototype.otherCallRejected=function(n){s(this.promise,this.onRejected,n)};r.resolve=function(n,t){var i=a(y,t),u,f,o;if(i.status==="error")return r.reject(n,i.value);if(u=i.value,u)l(n,u);else for(n.state=e,n.outcome=t,f=-1,o=n.queue.length;++f<o;)n.queue[f].callFulfilled(t);return n};r.reject=function(n,t){n.state=h;n.outcome=t;for(var i=-1,r=n.queue.length;++i<r;)n.queue[i].callRejected(t);return n};i.resolve=p;i.reject=w;i.all=b;i.race=k},{"2":2}],2:[function(n,t){(function(n){"use strict";function u(){e=!0;for(var n,r,t=i.length;t;){for(r=i,i=[],n=-1;++n<t;)r[n]();t=i.length}e=!1}function l(n){i.push(n)!==1||e||r()}var o=n.MutationObserver||n.WebKitMutationObserver,r,f,e,i;if(o){var s=0,c=new o(u),h=n.document.createTextNode("");c.observe(h,{characterData:!0});r=function(){h.data=s=++s%2}}else n.setImmediate||typeof n.MessageChannel=="undefined"?r="document"in n&&"onreadystatechange"in n.document.createElement("script")?function(){var t=n.document.createElement("script");t.onreadystatechange=function(){u();t.onreadystatechange=null;t.parentNode.removeChild(t);t=null};n.document.documentElement.appendChild(t)}:function(){setTimeout(u,0)}:(f=new n.MessageChannel,f.port1.onmessage=u,r=function(){f.port2.postMessage(0)});i=[];t.exports=l}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],3:[function(n){(function(t){"use strict";typeof t.Promise!="function"&&(t.Promise=n(1))}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"1":1}],4:[function(n,t){"use strict";function ri(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function ui(){try{if(typeof indexedDB!="undefined")return indexedDB;if(typeof webkitIndexedDB!="undefined")return webkitIndexedDB;if(typeof mozIndexedDB!="undefined")return mozIndexedDB;if(typeof OIndexedDB!="undefined")return OIndexedDB;if(typeof msIndexedDB!="undefined")return msIndexedDB}catch(n){}}function fi(){try{return s?typeof openDatabase!="undefined"&&typeof navigator!="undefined"&&navigator.userAgent&&/Safari/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)?!1:s&&typeof s.open=="function"&&typeof IDBKeyRange!="undefined":!1}catch(n){return!1}}function ei(){return typeof openDatabase=="function"}function oi(){try{return typeof localStorage!="undefined"&&"setItem"in localStorage&&localStorage.setItem}catch(n){return!1}}function v(n,t){var f,r,i;n=n||[];t=t||{};try{return new Blob(n,t)}catch(u){if(u.name!=="TypeError")throw u;for(f=typeof BlobBuilder!="undefined"?BlobBuilder:typeof MSBlobBuilder!="undefined"?MSBlobBuilder:typeof MozBlobBuilder!="undefined"?MozBlobBuilder:WebKitBlobBuilder,r=new f,i=0;i<n.length;i+=1)r.append(n[i]);return r.getBlob(t.type)}}function r(n,t){t&&n.then(function(n){t(null,n)},function(n){t(n)})}function o(n,t,i){typeof t=="function"&&n.then(t);typeof i=="function"&&n["catch"](i)}function si(n){for(var i=n.length,r=new ArrayBuffer(i),u=new Uint8Array(r),t=0;t<i;t++)u[t]=n.charCodeAt(t);return r}function hi(n){return new i(function(t){var i=v([""]);n.objectStore(y).put(i,"key");n.onabort=function(n){n.preventDefault();n.stopPropagation();t(!1)};n.oncomplete=function(){var n=navigator.userAgent.match(/Chrome\/(\d+)/),i=navigator.userAgent.match(/Edge\//);t(i||!n||parseInt(n[1],10)>=43)}})["catch"](function(){return!1})}function ci(n){return typeof c=="boolean"?i.resolve(c):hi(n).then(function(n){return c=n})}function li(n){var r=e[n.name],t={};t.promise=new i(function(n){t.resolve=n});r.deferredOperations.push(t);r.dbReady=r.dbReady?r.dbReady.then(function(){return t.promise}):t.promise}function ai(n){var i=e[n.name],t=i.deferredOperations.pop();t&&t.resolve()}function rt(n,t){return new i(function(i,r){var f,u;if(n.db)if(t)li(n),n.db.close();else return i(n.db);f=[n.name];t&&f.push(n.version);u=s.open.apply(s,f);t&&(u.onupgradeneeded=function(t){var i=u.result;try{i.createObjectStore(n.storeName);t.oldVersion<=1&&i.createObjectStore(y)}catch(r){if(r.name==="ConstraintError")console.warn('The database "'+n.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+n.storeName+'" already exists.');else throw r;}});u.onerror=function(){r(u.error)};u.onsuccess=function(){i(u.result);ai(n)}})}function vi(n){return rt(n,!1)}function yi(n){return rt(n,!0)}function pi(n,t){var i;if(!n.db)return!0;var r=!n.db.objectStoreNames.contains(n.storeName),u=n.version<n.db.version,f=n.version>n.db.version;return(u&&(n.version!==t&&console.warn('The database "'+n.name+"\" can't be downgraded from version "+n.db.version+" to version "+n.version+"."),n.version=n.db.version),f||r)?(r&&(i=n.db.version+1,i>n.version&&(n.version=i)),!0):!1}function wi(n){return new i(function(t,i){var r=new FileReader;r.onerror=i;r.onloadend=function(i){var r=btoa(i.target.result||"");t({__local_forage_encoded_blob:!0,data:r,type:n.type})};r.readAsBinaryString(n)})}function ut(n){var t=si(atob(n.data));return v([t],{type:n.type})}function ft(n){return n&&n.__local_forage_encoded_blob}function bi(n){var t=this,i=t._initReady().then(function(){var n=e[t._dbInfo.name];if(n&&n.dbReady)return n.dbReady});return o(i,n,n),i}function ki(n){function l(){return i.resolve()}var u=this,t={db:null},o,r,s,f,h,c;if(n)for(o in n)t[o]=n[o];for(e||(e={}),r=e[t.name],r||(r={forages:[],db:null,dbReady:null,deferredOperations:[]},e[t.name]=r),r.forages.push(u),u._initReady||(u._initReady=u.ready,u.ready=bi),s=[],f=0;f<r.forages.length;f++)h=r.forages[f],h!==u&&s.push(h._initReady()["catch"](l));return c=r.forages.slice(0),i.all(s).then(function(){return t.db=r.db,vi(t)}).then(function(n){return(t.db=n,pi(t,u._defaultConfig.version))?yi(t):n}).then(function(n){var i,f;for(t.db=r.db=n,u._dbInfo=t,i=0;i<c.length;i++)f=c[i],f!==u&&(f._dbInfo.db=t.db,f._dbInfo.version=t.version)})}function di(n,t){var f=this,u;return typeof n!="string"&&(console.warn(n+" used as a key, but it is not a string."),n=String(n)),u=new i(function(t,i){f.ready().then(function(){var u=f._dbInfo,e=u.db.transaction(u.storeName,"readonly").objectStore(u.storeName),r=e.get(n);r.onsuccess=function(){var n=r.result;n===undefined&&(n=null);ft(n)&&(n=ut(n));t(n)};r.onerror=function(){i(r.error)}})["catch"](i)}),r(u,t),u}function gi(n,t){var u=this,f=new i(function(t,i){u.ready().then(function(){var f=u._dbInfo,e=f.db.transaction(f.storeName,"readonly").objectStore(f.storeName),r=e.openCursor(),o=1;r.onsuccess=function(){var u=r.result,i,f;u?(i=u.value,ft(i)&&(i=ut(i)),f=n(i,u.key,o++),f!==void 0?t(f):u["continue"]()):t()};r.onerror=function(){i(r.error)}})["catch"](i)});return r(f,t),f}function nr(n,t,u){var e=this,f;return typeof n!="string"&&(console.warn(n+" used as a key, but it is not a string."),n=String(n)),f=new i(function(i,r){var u;e.ready().then(function(){return(u=e._dbInfo,it.call(t)==="[object Blob]")?ci(u.db).then(function(n){return n?t:wi(t)}):t}).then(function(t){var f=u.db.transaction(u.storeName,"readwrite"),o=f.objectStore(u.storeName),e;t===null&&(t=undefined);f.oncomplete=function(){t===undefined&&(t=null);i(t)};f.onabort=f.onerror=function(){var n=e.error?e.error:e.transaction.error;r(n)};e=o.put(t,n)})["catch"](r)}),r(f,u),f}function tr(n,t){var f=this,u;return typeof n!="string"&&(console.warn(n+" used as a key, but it is not a string."),n=String(n)),u=new i(function(t,i){f.ready().then(function(){var e=f._dbInfo,r=e.db.transaction(e.storeName,"readwrite"),o=r.objectStore(e.storeName),u=o["delete"](n);r.oncomplete=function(){t()};r.onerror=function(){i(u.error)};r.onabort=function(){var n=u.error?u.error:u.transaction.error;i(n)}})["catch"](i)}),r(u,t),u}function ir(n){var t=this,u=new i(function(n,i){t.ready().then(function(){var u=t._dbInfo,r=u.db.transaction(u.storeName,"readwrite"),e=r.objectStore(u.storeName),f=e.clear();r.oncomplete=function(){n()};r.onabort=r.onerror=function(){var n=f.error?f.error:f.transaction.error;i(n)}})["catch"](i)});return r(u,n),u}function rr(n){var t=this,u=new i(function(n,i){t.ready().then(function(){var u=t._dbInfo,f=u.db.transaction(u.storeName,"readonly").objectStore(u.storeName),r=f.count();r.onsuccess=function(){n(r.result)};r.onerror=function(){i(r.error)}})["catch"](i)});return r(u,n),u}function ur(n,t){var u=this,f=new i(function(t,i){if(n<0){t(null);return}u.ready().then(function(){var f=u._dbInfo,o=f.db.transaction(f.storeName,"readonly").objectStore(f.storeName),e=!1,r=o.openCursor();r.onsuccess=function(){var i=r.result;if(!i){t(null);return}n===0?t(i.key):e?t(i.key):(e=!0,i.advance(n))};r.onerror=function(){i(r.error)}})["catch"](i)});return r(f,t),f}function fr(n){var t=this,u=new i(function(n,i){t.ready().then(function(){var u=t._dbInfo,e=u.db.transaction(u.storeName,"readonly").objectStore(u.storeName),r=e.openCursor(),f=[];r.onsuccess=function(){var t=r.result;if(!t){n(f);return}f.push(t.key);t["continue"]()};r.onerror=function(){i(r.error)}})["catch"](i)});return r(u,n),u}function kt(n){var r=n.length*.75,l=n.length,t,u=0,h,e,o,c,s,i;for(n[n.length-1]==="="&&(r--,n[n.length-2]==="="&&r--),s=new ArrayBuffer(r),i=new Uint8Array(s),t=0;t<l;t+=4)h=f.indexOf(n[t]),e=f.indexOf(n[t+1]),o=f.indexOf(n[t+2]),c=f.indexOf(n[t+3]),i[u++]=h<<2|e>>4,i[u++]=(e&15)<<4|o>>2,i[u++]=(o&3)<<6|c&63;return s}function k(n){for(var i=new Uint8Array(n),t="",r=0;r<i.length;r+=3)t+=f[i[r]>>2],t+=f[(i[r]&3)<<4|i[r+1]>>4],t+=f[(i[r+1]&15)<<2|i[r+2]>>6],t+=f[i[r+2]&63];return i.length%3==2?t=t.substring(0,t.length-1)+"=":i.length%3==1&&(t=t.substring(0,t.length-2)+"=="),t}function sr(n,t){var i="",u,r,f;if(n&&(i=bt.call(n)),n&&(i==="[object ArrayBuffer]"||n.buffer&&bt.call(n.buffer)==="[object ArrayBuffer]"))r=l,n instanceof ArrayBuffer?(u=n,r+=w):(u=n.buffer,i==="[object Int8Array]"?r+=ot:i==="[object Uint8Array]"?r+=st:i==="[object Uint8ClampedArray]"?r+=ht:i==="[object Int16Array]"?r+=ct:i==="[object Uint16Array]"?r+=at:i==="[object Int32Array]"?r+=lt:i==="[object Uint32Array]"?r+=vt:i==="[object Float32Array]"?r+=yt:i==="[object Float64Array]"?r+=pt:t(new Error("Failed to get type for BinaryArray"))),t(r+k(u));else if(i==="[object Blob]")f=new FileReader,f.onload=function(){var i=or+n.type+"~"+k(this.result);t(l+b+i)},f.readAsArrayBuffer(n);else try{t(JSON.stringify(n))}catch(e){console.error("Couldn't convert value into a JSON string: ",n);t(null,e)}}function hr(n){var i,r,f,u,t;if(n.substring(0,p)!==l)return JSON.parse(n);i=n.substring(wt);r=n.substring(p,wt);r===b&&et.test(i)&&(u=i.match(et),f=u[1],i=i.substring(u[0].length));t=kt(i);switch(r){case w:return t;case b:return v([t],{type:f});case ot:return new Int8Array(t);case st:return new Uint8Array(t);case ht:return new Uint8ClampedArray(t);case ct:return new Int16Array(t);case at:return new Uint16Array(t);case lt:return new Int32Array(t);case vt:return new Uint32Array(t);case yt:return new Float32Array(t);case pt:return new Float64Array(t);default:throw new Error("Unkown type: "+r);}}function cr(n){var f=this,t={db:null},r,u;if(n)for(r in n)t[r]=typeof n[r]!="string"?n[r].toString():n[r];return u=new i(function(n,i){try{t.db=openDatabase(t.name,String(t.version),t.description,t.size)}catch(r){return i(r)}t.db.transaction(function(r){r.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],function(){f._dbInfo=t;n()},function(n,t){i(t)})})}),t.serializer=a,u}function lr(n,t){var f=this,u;return typeof n!="string"&&(console.warn(n+" used as a key, but it is not a string."),n=String(n)),u=new i(function(t,i){f.ready().then(function(){var r=f._dbInfo;r.db.transaction(function(u){u.executeSql("SELECT * FROM "+r.storeName+" WHERE key = ? LIMIT 1",[n],function(n,i){var u=i.rows.length?i.rows.item(0).value:null;u&&(u=r.serializer.deserialize(u));t(u)},function(n,t){i(t)})})})["catch"](i)}),r(u,t),u}function ar(n,t){var u=this,f=new i(function(t,i){u.ready().then(function(){var r=u._dbInfo;r.db.transaction(function(u){u.executeSql("SELECT * FROM "+r.storeName,[],function(i,u){for(var s=u.rows,h=s.length,o,f,e=0;e<h;e++)if(o=s.item(e),f=o.value,f&&(f=r.serializer.deserialize(f)),f=n(f,o.key,e+1),f!==void 0){t(f);return}t()},function(n,t){i(t)})})})["catch"](i)});return r(f,t),f}function vr(n,t,u){var e=this,f;return typeof n!="string"&&(console.warn(n+" used as a key, but it is not a string."),n=String(n)),f=new i(function(i,r){e.ready().then(function(){t===undefined&&(t=null);var f=t,u=e._dbInfo;u.serializer.serialize(t,function(t,e){e?r(e):u.db.transaction(function(e){e.executeSql("INSERT OR REPLACE INTO "+u.storeName+" (key, value) VALUES (?, ?)",[n,t],function(){i(f)},function(n,t){r(t)})},function(n){n.code===n.QUOTA_ERR&&r(n)})})})["catch"](r)}),r(f,u),f}function yr(n,t){var f=this,u;return typeof n!="string"&&(console.warn(n+" used as a key, but it is not a string."),n=String(n)),u=new i(function(t,i){f.ready().then(function(){var r=f._dbInfo;r.db.transaction(function(u){u.executeSql("DELETE FROM "+r.storeName+" WHERE key = ?",[n],function(){t()},function(n,t){i(t)})})})["catch"](i)}),r(u,t),u}function pr(n){var t=this,u=new i(function(n,i){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){t.executeSql("DELETE FROM "+r.storeName,[],function(){n()},function(n,t){i(t)})})})["catch"](i)});return r(u,n),u}function wr(n){var t=this,u=new i(function(n,i){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){t.executeSql("SELECT COUNT(key) as c FROM "+r.storeName,[],function(t,i){var r=i.rows.item(0).c;n(r)},function(n,t){i(t)})})})["catch"](i)});return r(u,n),u}function br(n,t){var u=this,f=new i(function(t,i){u.ready().then(function(){var r=u._dbInfo;r.db.transaction(function(u){u.executeSql("SELECT key FROM "+r.storeName+" WHERE id = ? LIMIT 1",[n+1],function(n,i){var r=i.rows.length?i.rows.item(0).key:null;t(r)},function(n,t){i(t)})})})["catch"](i)});return r(f,t),f}function kr(n){var t=this,u=new i(function(n,i){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){t.executeSql("SELECT key FROM "+r.storeName,[],function(t,i){for(var u=[],r=0;r<i.rows.length;r++)u.push(i.rows.item(r).key);n(u)},function(n,t){i(t)})})})["catch"](i)});return r(u,n),u}function dr(n){var u=this,t={},r;if(n)for(r in n)t[r]=n[r];return t.keyPrefix=t.name+"/",t.storeName!==u._defaultConfig.storeName&&(t.keyPrefix+=t.storeName+"/"),u._dbInfo=t,t.serializer=a,i.resolve()}function gr(n){var t=this,i=t.ready().then(function(){for(var r=t._dbInfo.keyPrefix,i,n=localStorage.length-1;n>=0;n--)i=localStorage.key(n),i.indexOf(r)===0&&localStorage.removeItem(i)});return r(i,n),i}function nu(n,t){var u=this,i;return typeof n!="string"&&(console.warn(n+" used as a key, but it is not a string."),n=String(n)),i=u.ready().then(function(){var i=u._dbInfo,t=localStorage.getItem(i.keyPrefix+n);return t&&(t=i.serializer.deserialize(t)),t}),r(i,t),i}function tu(n,t){var i=this,u=i.ready().then(function(){for(var f=i._dbInfo,e=f.keyPrefix,o=e.length,s=localStorage.length,h=1,u,t,r=0;r<s;r++)if((u=localStorage.key(r),u.indexOf(e)===0)&&(t=localStorage.getItem(u),t&&(t=f.serializer.deserialize(t)),t=n(t,u.substring(o),h++),t!==void 0))return t});return r(u,t),u}function iu(n,t){var i=this,u=i.ready().then(function(){var r=i._dbInfo,t;try{t=localStorage.key(n)}catch(u){t=null}return t&&(t=t.substring(r.keyPrefix.length)),t});return r(u,t),u}function ru(n){var t=this,i=t.ready().then(function(){for(var i=t._dbInfo,u=localStorage.length,r=[],n=0;n<u;n++)localStorage.key(n).indexOf(i.keyPrefix)===0&&r.push(localStorage.key(n).substring(i.keyPrefix.length));return r});return r(i,n),i}function uu(n){var i=this,t=i.keys().then(function(n){return n.length});return r(t,n),t}function fu(n,t){var u=this,i;return typeof n!="string"&&(console.warn(n+" used as a key, but it is not a string."),n=String(n)),i=u.ready().then(function(){var t=u._dbInfo;localStorage.removeItem(t.keyPrefix+n)}),r(i,t),i}function eu(n,t,u){var e=this,f;return typeof n!="string"&&(console.warn(n+" used as a key, but it is not a string."),n=String(n)),f=e.ready().then(function(){t===undefined&&(t=null);var r=t;return new i(function(i,u){var f=e._dbInfo;f.serializer.serialize(t,function(t,e){if(e)u(e);else try{localStorage.setItem(f.keyPrefix+n,t);i(r)}catch(o){(o.name==="QuotaExceededError"||o.name==="NS_ERROR_DOM_QUOTA_REACHED")&&u(o);u(o)}})})}),r(f,u),f}function cu(n,t){n[t]=function(){var i=arguments;return n.ready().then(function(){return n[t].apply(n,i)})}}function tt(){for(var n,t,i=1;i<arguments.length;i++)if(n=arguments[i],n)for(t in n)n.hasOwnProperty(t)&&(arguments[0][t]=nt(n[t])?n[t].slice():n[t]);return arguments[0]}function gt(n){for(var t in u)if(u.hasOwnProperty(t)&&u[t]===n)return!0;return!1}var ii=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},s=ui(),i,y,c,e,it,a,dt,nt,ni,ti;typeof Promise=="undefined"&&typeof n!="undefined"&&n(3);i=Promise;y="local-forage-detect-blob-support";it=Object.prototype.toString;var er={_driver:"asyncStorage",_initStorage:ki,iterate:gi,getItem:di,setItem:nr,removeItem:tr,clear:ir,length:rr,key:ur,keys:fr},f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",or="~~local_forage_type~",et=/^~~local_forage_type~([^~]+)~/,l="__lfsc__:",p=l.length,w="arbf",b="blob",ot="si08",st="ui08",ht="uic8",ct="si16",lt="si32",at="ur16",vt="ui32",yt="fl32",pt="fl64",wt=p+w.length,bt=Object.prototype.toString;a={serialize:sr,deserialize:hr,stringToBuffer:kt,bufferToString:k};dt={_driver:"webSQLStorage",_initStorage:cr,iterate:ar,getItem:lr,setItem:vr,removeItem:yr,clear:pr,length:wr,key:br,keys:kr};var ou={_driver:"localStorageWrapper",_initStorage:dr,iterate:tu,getItem:nu,setItem:eu,removeItem:fu,clear:gr,length:uu,key:iu,keys:ru},d={},u={INDEXEDDB:"asyncStorage",LOCALSTORAGE:"localStorageWrapper",WEBSQL:"webSQLStorage"},su=[u.INDEXEDDB,u.WEBSQL,u.LOCALSTORAGE],g=["clear","getItem","iterate","key","keys","length","removeItem","setItem"],hu={description:"",driver:su.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1},h={};h[u.INDEXEDDB]=fi();h[u.WEBSQL]=ei();h[u.LOCALSTORAGE]=oi();nt=Array.isArray||function(n){return Object.prototype.toString.call(n)==="[object Array]"};ni=function(){function n(t){ri(this,n);this.INDEXEDDB=u.INDEXEDDB;this.LOCALSTORAGE=u.LOCALSTORAGE;this.WEBSQL=u.WEBSQL;this._defaultConfig=tt({},hu);this._config=tt({},this._defaultConfig,t);this._driverSet=null;this._initDriver=null;this._ready=!1;this._dbInfo=null;this._wrapLibraryMethodsWithReady();this.setDriver(this._config.driver)}return n.prototype.config=function(n){if((typeof n=="undefined"?"undefined":ii(n))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in n)t==="storeName"&&(n[t]=n[t].replace(/\W/g,"_")),this._config[t]=n[t];return"driver"in n&&n.driver&&this.setDriver(this._config.driver),!0}return typeof n=="string"?this._config[n]:this._config},n.prototype.defineDriver=function(n,t,r){var u=new i(function(t,r){var e,u,f,o;try{var s=n._driver,c=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver"),l=new Error("Custom driver name already in use: "+n._driver);if(!n._driver){r(c);return}if(gt(n._driver)){r(l);return}for(e=g.concat("_initStorage"),u=0;u<e.length;u++)if(f=e[u],!f||!n[f]||typeof n[f]!="function"){r(c);return}o=i.resolve(!0);"_support"in n&&(o=n._support&&typeof n._support=="function"?n._support():i.resolve(!!n._support));o.then(function(i){h[s]=i;d[s]=n;t()},r)}catch(a){r(a)}});return o(u,t,r),u},n.prototype.driver=function(){return this._driver||null},n.prototype.getDriver=function(n,t,r){var u=this,f=i.resolve().then(function(){if(gt(n))switch(n){case u.INDEXEDDB:return er;case u.LOCALSTORAGE:return ou;case u.WEBSQL:return dt}else{if(d[n])return d[n];throw new Error("Driver not found.");}});return o(f,t,r),f},n.prototype.getSerializer=function(n){var t=i.resolve(a);return o(t,n),t},n.prototype.ready=function(n){var t=this,i=t._driverSet.then(function(){return t._ready===null&&(t._ready=t._initDriver()),t._ready});return o(i,n,n),i},n.prototype.setDriver=function(n,t,r){function f(){u._config.driver=u.driver()}function h(n){return function(){function r(){for(var e,o;t<n.length;)return e=n[t],t++,u._dbInfo=null,u._ready=null,u.getDriver(e).then(function(n){return u._extend(n),f(),u._ready=u._initStorage(u._config),u._ready})["catch"](r);return f(),o=new Error("No available storage method found."),u._driverSet=i.reject(o),u._driverSet}var t=0;return r()}}var u=this,e,s;return nt(n)||(n=[n]),e=this._getSupportedDrivers(n),s=this._driverSet!==null?this._driverSet["catch"](function(){return i.resolve()}):i.resolve(),this._driverSet=s.then(function(){var n=e[0];return u._dbInfo=null,u._ready=null,u.getDriver(n).then(function(n){u._driver=n._driver;f();u._wrapLibraryMethodsWithReady();u._initDriver=h(e)})})["catch"](function(){f();var n=new Error("No available storage method found.");return u._driverSet=i.reject(n),u._driverSet}),o(this._driverSet,t,r),this._driverSet},n.prototype.supports=function(n){return!!h[n]},n.prototype._extend=function(n){tt(this,n)},n.prototype._getSupportedDrivers=function(n){for(var r=[],i,t=0,u=n.length;t<u;t++)i=n[t],this.supports(i)&&r.push(i);return r},n.prototype._wrapLibraryMethodsWithReady=function(){for(var n=0;n<g.length;n++)cu(this,g[n])},n.prototype.createInstance=function(t){return new n(t)},n}();ti=new ni;t.exports=ti},{"3":3}]},{},[4])(4)}),function(n,t){"use strict";var i;if(typeof exports=="object"){try{i=require("moment")}catch(r){}module.exports=t(i)}else typeof define=="function"&&define.amd?define(function(n){var r="moment";return i=n.defined&&n.defined(r)?n(r):undefined,t(i)}):n.Pikaday=t(n.moment)}(this,function(n){"use strict";var s=typeof n=="function",a=!!window.addEventListener,i=window.document,c=window.setTimeout,f=function(n,t,i,r){a?n.addEventListener(t,i,!!r):n.attachEvent("on"+t,i)},e=function(n,t,i,r){a?n.removeEventListener(t,i,!!r):n.detachEvent("on"+t,i)},w=function(n,t,r){var u;i.createEvent?(u=i.createEvent("HTMLEvents"),u.initEvent(t,!0,!1),u=h(u,r),n.dispatchEvent(u)):i.createEventObject&&(u=i.createEventObject(),u=h(u,r),n.fireEvent("on"+t,u))},b=function(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")},r=function(n,t){return(" "+n.className+" ").indexOf(" "+t+" ")!==-1},k=function(n,t){r(n,t)||(n.className=n.className===""?t:n.className+" "+t)},d=function(n,t){n.className=b((" "+n.className+" ").replace(" "+t+" "," "))},u=function(n){return/Array/.test(Object.prototype.toString.call(n))},t=function(n){return/Date/.test(Object.prototype.toString.call(n))&&!isNaN(n.getTime())},g=function(n){return n%4==0&&n%100!=0||n%400==0},nt=function(n,t){return[31,g(n)?29:28,31,30,31,30,31,31,30,31,30,31][t]},l=function(n){t(n)&&n.setHours(0,0,0,0)},o=function(n,t){return n.getTime()===t.getTime()},h=function(n,i,r){var f,e;for(f in i)e=n[f]!==undefined,e&&typeof i[f]=="object"&&i[f].nodeName===undefined?t(i[f])?r&&(n[f]=new Date(i[f].getTime())):u(i[f])?r&&(n[f]=i[f].slice(0)):n[f]=h({},i[f],r):(r||!e)&&(n[f]=i[f]);return n},v={field:null,bound:undefined,position:"bottom left",format:"YYYY-MM-DD",defaultDate:null,setDefaultDate:!1,firstDay:0,minDate:null,maxDate:null,dateArray:undefined,yearRange:10,minYear:0,maxYear:9999,minMonth:undefined,maxMonth:undefined,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,numberOfMonths:1,validDatesArray:[],reservedDatesArray:[],soldoutDatesArray:[],i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},onSelect:null,onOpen:null,onClose:null,onDraw:null},y=function(n,t,i){for(t+=n.firstDay;t>=7;)t-=7;return i?n.i18n.weekdaysShort[t]:n.i18n.weekdays[t]},tt=function(n,t,i,r,u,f,e){if(u)return'<td class="is-empty"><\/td>';var s=!0,o=[];return r&&(o.push("is-disabled"),s=!1),i&&o.push("is-today"),t&&(o.push("is-selected"),s=!1),f&&(o.push("is-reserved"),s=!1),e&&(o.push("is-soldout"),s=!1),s&&o.push("is-selectable"),'<td data-day="'+n+'" class="'+o.join(" ")+'"><button class="pika-button" type="button">'+n+"<\/button><\/td>"},it=function(n,t){return"<tr>"+(t?n.reverse():n).join("")+"<\/tr>"},rt=function(n){return"<tbody>"+n.join("")+"<\/tbody>"},ut=function(n){for(var i=[],t=0;t<7;t++)i.push('<th scope="col"><abbr title="'+y(n,t)+'">'+y(n,t,!0)+"<\/abbr><\/th>");return"<thead>"+(n.isRTL?i.reverse():i).join("")+"<\/thead>"},ft=function(n){for(var s,t=n._o,f=n._m,e=n._y,l=e===t.minYear,a=e===t.maxYear,o='<div class="pika-title">',h,c,v=!0,y=!0,r=[],i=0;i<12;i++)r.push('<option value="'+i+'"'+(i===f?" selected":"")+(l&&i<t.minMonth||a&&i>t.maxMonth?"disabled":"")+">"+t.i18n.months[i]+"<\/option>");for(h='<div class="pika-label">'+t.i18n.months[f]+'<select class="pika-select pika-select-month">'+r.join("")+"<\/select><\/div>",u(t.yearRange)?(i=t.yearRange[0],s=t.yearRange[1]+1):(i=e-t.yearRange,s=1+e+t.yearRange),r=[];i<s&&i<=t.maxYear;i++)i>=t.minYear&&r.push('<option value="'+i+'"'+(i===e?" selected":"")+">"+i+"<\/option>");return c='<div class="pika-label">'+e+t.yearSuffix+'<select class="pika-select pika-select-year">'+r.join("")+"<\/select><\/div>",o+=t.showMonthAfterYear?c+h:h+c,l&&(f===0||t.minMonth>=f)&&(v=!1),a&&(f===11||t.maxMonth<=f)&&(y=!1),o+='<button class="pika-prev'+(v?"":" is-disabled")+'" type="button">'+t.i18n.previousMonth+"<\/button>",o+='<button class="pika-next'+(y?"":" is-disabled")+'" type="button">'+t.i18n.nextMonth+"<\/button>",o+"<\/div>"},et=function(n,t){return'<table cellpadding="0" cellspacing="0" class="pika-table">'+ut(n)+rt(t)+"<\/table>"},p=function(u){var e=this,o=e.config(u),h;e._onMouseDown=function(n){if(e._v){n=n||window.event;var t=n.target||n.srcElement;if(t){if(!r(t,"is-disabled")){if(r(t,"pika-button")&&!r(t,"is-empty")){e.setDate(new Date(e._y,e._m,parseInt(t.innerHTML,10)));o.bound&&c(function(){e.hide()},100);return}r(t,"pika-prev")?e.prevMonth():r(t,"pika-next")&&e.nextMonth()}if(r(t,"pika-select"))e._c=!0;else if(n.preventDefault)n.preventDefault();else return n.returnValue=!1,!1}}};e._onChange=function(n){n=n||window.event;var t=n.target||n.srcElement;t&&(r(t,"pika-select-month")?e.gotoMonth(t.value):r(t,"pika-select-year")&&e.gotoYear(t.value))};e._onInputChange=function(i){var r;i.firedBy!==e&&(s?(r=n(o.field.value,o.format),r=r&&r.isValid()?r.toDate():null):r=new Date(Date.parse(o.field.value)),e.setDate(t(r)?r:null),e._v||e.show())};e._onInputFocus=function(){e.show()};e._onInputClick=function(){e.show()};e._onInputBlur=function(){e._c||(e._b=c(function(){e.hide()},50));e._c=!1};e._onClick=function(n){n=n||window.event;var t=n.target||n.srcElement,i=t;if(t){!a&&r(t,"pika-select")&&(t.onchange||(t.setAttribute("onchange","return;"),f(t,"change",e._onChange)));do if(r(i,"pika-single"))return;while(i=i.parentNode);e._v&&t!==o.trigger&&e.hide()}};e.el=i.createElement("div");e.el.className="pika-single"+(o.isRTL?" is-rtl":"");f(e.el,"mousedown",e._onMouseDown,!0);f(e.el,"change",e._onChange);o.field&&(o.bound?i.body.appendChild(e.el):o.field.parentNode.insertBefore(e.el,o.field.nextSibling),f(o.field,"change",e._onInputChange),o.defaultDate||(o.defaultDate=s&&o.field.value?n(o.field.value,o.format).toDate():new Date(Date.parse(o.field.value)),o.setDefaultDate=!0));h=o.defaultDate;t(h)?o.setDefaultDate?e.setDate(h,!0):e.gotoDate(h):e.gotoDate(new Date);o.bound?(this.hide(),e.el.className+=" is-bound",f(o.trigger,"click",e._onInputClick),f(o.trigger,"focus",e._onInputFocus),f(o.trigger,"blur",e._onInputBlur)):this.show()};return p.prototype={config:function(n){var i,f,r,e;if(this._o||(this._o=h({},v,!0)),i=h(this._o,n,!0),i.isRTL=!!i.isRTL,i.field=i.field&&i.field.nodeName?i.field:null,i.bound=!!(i.bound!==undefined?i.field&&i.bound:i.field),i.trigger=i.trigger&&i.trigger.nodeName?i.trigger:i.field,f=parseInt(i.numberOfMonths,10)||1,i.numberOfMonths=f>4?4:f,i.validDatesArray&&u(i.validDatesArray)&&i.validDatesArray.length>0){for(r=0;r<i.validDatesArray.length;r++)i.validDatesArray[r].setHours(0,0,0,0);i.validDatesArray.sort(function(n,t){return n>t?1:n<t?-1:0});i.minDate=i.validDatesArray[0];i.maxDate=i.validDatesArray[i.validDatesArray.length-1]}if(i.reservedDatesArray&&u(i.reservedDatesArray)&&i.reservedDatesArray.length>0){for(r=0;r<i.reservedDatesArray.length;r++)i.reservedDatesArray[r].setHours(0,0,0,0);i.reservedDatesArray.sort(function(n,t){return n>t?1:n<t?-1:0});(i.minDate==null||i.minDate>i.reservedDatesArray[0])&&(i.minDate=i.reservedDatesArray[0]);(i.maxDate==null||i.maxDate<i.reservedDatesArray[i.reservedDatesArray.length-1])&&(i.maxDate=i.reservedDatesArray[i.reservedDatesArray.length-1])}if(i.soldoutDatesArray&&u(i.soldoutDatesArray)&&i.soldoutDatesArray.length>0){for(r=0;r<i.soldoutDatesArray.length;r++)i.soldoutDatesArray[r].setHours(0,0,0,0);i.soldoutDatesArray.sort(function(n,t){return n>t?1:n<t?-1:0});(i.minDate==null||i.minDate>i.soldoutDatesArray[0])&&(i.minDate=i.soldoutDatesArray[0]);(i.maxDate==null||i.maxDate<i.soldoutDatesArray[i.soldoutDatesArray.length-1])&&(i.maxDate=i.soldoutDatesArray[i.soldoutDatesArray.length-1])}return i.validDatesArray&&u(i.validDatesArray)&&i.validDatesArray.length>0&&(i.yearRange=[],i.yearRange[0]=i.minDate.getFullYear(),i.yearRange[1]=i.maxDate.getFullYear()),t(i.minDate)||(i.minDate=!1),t(i.maxDate)||(i.maxDate=!1),i.minDate&&i.maxDate&&i.maxDate<i.minDate&&(i.maxDate=i.minDate=!1),i.minDate&&(l(i.minDate),i.minYear=i.minDate.getFullYear(),i.minMonth=i.minDate.getMonth()),i.maxDate&&(l(i.maxDate),i.maxYear=i.maxDate.getFullYear(),i.maxMonth=i.maxDate.getMonth()),u(i.yearRange)?(e=(new Date).getFullYear()-10,i.yearRange[0]=parseInt(i.yearRange[0],10)||e,i.yearRange[1]=parseInt(i.yearRange[1],10)||e):(i.yearRange=Math.abs(parseInt(i.yearRange,10))||v.yearRange,i.yearRange>100&&(i.yearRange=100)),i},toString:function(i){return t(this._d)?s?n(this._d).format(i||this._o.format):this._d.toDateString():""},getMoment:function(){return s?n(this._d):null},setMoment:function(t,i){s&&n.isMoment(t)&&this.setDate(t.toDate(),i)},getDate:function(){return t(this._d)?new Date(this._d.getTime()):null},setDate:function(n,i){var h,f;if(!n)return this._d=null,this.draw();if(typeof n=="string"&&(n=new Date(Date.parse(n))),t(n)){var e=this._o.minDate,s=this._o.maxDate,r=this._o.validDatesArray;if(t(e)&&n<e?n=e:t(s)&&n>s&&(n=s),r&&u(r)&&r.length>0)for(h=r[0],f=0;f<r.length;f++)o(r[f],n)&&(h=n);this._d=new Date(n.getTime());l(this._d);this.gotoDate(this._d);this._o.field&&(this._o.field.value=this.toString(),w(this._o.field,"change",{firedBy:this}));i||typeof this._o.onSelect!="function"||this._o.onSelect.call(this,this.getDate())}},gotoDate:function(n){t(n)&&(this._y=n.getFullYear(),this._m=n.getMonth(),this.draw())},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(n){isNaN(n=parseInt(n,10))||(this._m=n<0?0:n>11?11:n,this.draw())},nextMonth:function(){++this._m>11&&(this._m=0,this._y++);this.draw()},prevMonth:function(){--this._m<0&&(this._m=11,this._y--);this.draw()},gotoYear:function(n){isNaN(n)||(this._y=parseInt(n,10),this.draw())},setMinDate:function(n){this._o.minDate=n},setMaxDate:function(n){this._o.maxDate=n},draw:function(n){var u;if(this._v||n){var t=this._o,f=t.minYear,e=t.maxYear,i=t.minMonth,r=t.maxMonth;this._y<=f&&(this._y=f,!isNaN(i)&&this._m<i&&(this._m=i));this._y>=e&&(this._y=e,!isNaN(r)&&this._m>r&&(this._m=r));this.el.innerHTML=ft(this)+this.render(this._y,this._m);t.bound&&(this.adjustPosition(),t.field.type!=="hidden"&&c(function(){t.trigger.focus()},1));typeof this._o.onDraw=="function"&&(u=this,c(function(){u._o.onDraw.call(u)},0))}},adjustPosition:function(){var r=this._o.trigger,u=r,f=this.el.offsetWidth,e=this.el.offsetHeight,s=window.innerWidth||i.documentElement.clientWidth,h=window.innerHeight||i.documentElement.clientHeight,c=window.pageYOffset||i.body.scrollTop||i.documentElement.scrollTop,n,t,o;if(typeof r.getBoundingClientRect=="function")o=r.getBoundingClientRect(),n=o.left+window.pageXOffset,t=o.bottom+window.pageYOffset;else for(n=u.offsetLeft,t=u.offsetTop+u.offsetHeight;u=u.offsetParent;)n+=u.offsetLeft,t+=u.offsetTop;(n+f>s||this._o.position.indexOf("right")>-1&&n-f+r.offsetWidth>0)&&(n=n-f+r.offsetWidth);(t+e>h+c||this._o.position.indexOf("top")>-1&&t-e-r.offsetHeight>0)&&(t=t-e-r.offsetHeight);this.el.style.cssText=["position: absolute","left: "+n+"px","top: "+t+"px"].join(";")},render:function(n,i){var f=this._o,rt=new Date,ut=nt(n,i),e=new Date(n,i,1).getDay(),ft=[],b=[],c=f.validDatesArray,a=f.reservedDatesArray,v=f.soldoutDatesArray,y,p,s,k,r;for(l(rt),f.firstDay>0&&(e-=f.firstDay,e<0&&(e+=7)),y=ut+e,p=y;p>7;)p-=7;for(y+=7-p,s=0,k=0;s<y;s++){var h=new Date(n,i,1+(s-e)),w=f.minDate&&h<f.minDate||f.maxDate&&h>f.maxDate,ot=t(this._d)?o(h,this._d):!1,st=o(h,rt),ht=s<e||s>=ut+e,d=!1,g=!1;if(!w&&c&&u(c)&&c.length>0)for(w=!0,r=0;r<c.length;r++)o(c[r],h)&&(w=!1);if(a&&u(a)&&a.length>0)for(r=0;r<a.length;r++)o(a[r],h)&&(d=!0);if(v&&u(v)&&v.length>0)for(r=0;r<v.length;r++)o(v[r],h)&&(g=!0);b.push(tt(1+(s-e),ot,st,w||d||g,ht,d,g));++k==7&&(ft.push(it(b,f.isRTL)),b=[],k=0)}return et(f,ft)},isVisible:function(){return this._v},show:function(){this._v||(this._o.bound&&f(i,"click",this._onClick),d(this.el,"is-hidden"),this._v=!0,this.draw(),typeof this._o.onOpen=="function"&&this._o.onOpen.call(this))},hide:function(){var n=this._v;n!==!1&&(this._o.bound&&e(i,"click",this._onClick),this.el.style.cssText="",k(this.el,"is-hidden"),this._v=!1,n!==undefined&&typeof this._o.onClose=="function"&&this._o.onClose.call(this))},destroy:function(){this.hide();e(this.el,"mousedown",this._onMouseDown,!0);e(this.el,"change",this._onChange);this._o.field&&(e(this._o.field,"change",this._onInputChange),this._o.bound&&(e(this._o.trigger,"click",this._onInputClick),e(this._o.trigger,"focus",this._onInputFocus),e(this._o.trigger,"blur",this._onInputBlur)));this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},p}),function(n){var t=function(){function n(){}return n.ApiRoot=$("body").data("api-root")+"api/9/",n.ImgRoot=$("body").data("img-root"),n.Culture=document.documentElement.getAttribute("culture"),n.LanguageIso=document.documentElement.lang,n.FacebookAppId=$("html").data("fbId"),n.GiftVoucherSaleId=$("html").data("gvsId"),n}();n.Settings=t}(Vex||(Vex={})),function(n){var t=function(){function t(){}return t.removeItem=function(n){env.localStorage&&(localStorage.removeItem(n),localStorage.removeItem(n+"_time"))},t.setItem=function(n,t,i){var r,u;return env.localStorage?(i===undefined&&(i=86400),r=new Date,r.setSeconds(r.getSeconds()+i),localStorage.setItem(n,t),u=""+Math.round(+r/1e3),localStorage.setItem(n+"_time",u),!0):!1},t.getItem=function(t){return env.localStorage&&n.Storage.isStored(t)?localStorage.getItem(t):null},t.validateStoredCookie=function(t){if(env.localStorage){var i=$.cookie(t);if(i=="")return n.Storage.removeItem(t),$.cookie(t,"",{path:"/",expires:new Date(1900,1,1)}),!1}return!0},t.setStoredCookie=function(t,i,r,u){var e,f;u===undefined&&(u=86400);e=i?$.base64Encode(r):r;env.localStorage?n.Storage.setItem(t,e,u):(f=new Date,f.setSeconds(f.getSeconds()+u),$.cookie(t,e,{path:"/",expires:f}))},t.getStoredCookie=function(t,i){var u=$.cookie(t),r;return u||u==""?(r=i?$.base64Decode(u):u,env.localStorage&&(r&&r.length>0?n.Storage.setItem(t,r):(n.Storage.removeItem(t),r=null),$.cookie(t,"",{path:"/",expires:new Date(1900,1,1)})),r):n.Storage.getItem(t)},t.removeStoredCookie=function(t){var i=$.cookie(t);i||$.cookie(t,"",{path:"/",expires:new Date(1900,1,1)});n.Storage.removeItem(t)},t.isStored=function(t){var i=new Date,r=Math.round(+i/1e3),u=parseInt(localStorage.getItem(t+"_time"))||0;return u<r?(n.Storage.removeItem(t),!1):!0},t.removeItemLF=function(n){localforage!=undefined&&localforage!=null&&(localforage.removeItem(n),localforage.removeItem(n+"_time"))},t.setItemLF=function(n,t,i,r){return localforage!=undefined&&localforage!=null?(localforage.ready(function(){var u,f;(i===undefined||i===null||i==0)&&(i=86400);u=new Date;u.setSeconds(u.getSeconds()+i);r!=null?localforage.setItem(n,t,r):localforage.setItem(n,t);f=""+Math.round(+u/1e3);localforage.setItem(n+"_time",f)}),!0):!1},t.getItemLF=function(n,t){localforage!=undefined&&localforage!=null&&localforage.ready(function(){var i=new Date,r=Math.round(+i/1e3);localforage.getItem(n+"_time",function(i){(i==undefined||i=="null")&&(i=0);i<r?(localforage.removeItem(n),localforage.removeItem(n+"_time"),t(null)):localforage.getItem(n,t)})})},t.resetCallbackList=function(){n.Storage.callbackList=null},t.getUserData=function(t,i,r){var u=function(n){n?i(n):r&&typeof r=="function"&&r()};n.Storage.callbackList&&n.Storage.callbackList[t]?n.Storage.callbackList[t].push(u):localforage!=undefined&&localforage!=null&&localforage.ready(function(){var i=new Date,r=Math.round(+i/1e3);localforage.getItem(t+"_time",function(i){(i==undefined||i=="null")&&(i=-1);i!=-1&&i<r?n.Storage.getFreshUserData(t,u):localforage.getItem(t,function(i){i==null?n.Storage.getFreshUserData(t,u):u(i)})})})},t.checkUserDataCookie=function(){var u=$.cookie("str"),i,r,t;if(u&&u!=""){for(i=u.split("|"),r=[],t=0;t<i.length;t++)n.Storage.addCallbackToList(i[t],function(){})&&r.push(i[t]);r.length>0&&n.Storage.getFreshUserDataCall(r.join("|"))}},t.addCallbackToList=function(t,i){return((n.Storage.callbackList===undefined||n.Storage.callbackList===null)&&(n.Storage.callbackList={}),n.Storage.callbackList[t]===undefined||n.Storage.callbackList[t]===null)?(n.Storage.callbackList[t]=[i],!0):(n.Storage.callbackList[t].push(i),!1)},t.getFreshUserData=function(t,i){t=t.toLowerCase();localforage.removeItem(t);localforage.removeItem(t+"_time");n.Storage.addCallbackToList(t,i)&&n.Storage.getFreshUserDataCall(t)},t.getFreshUserDataCall=function(t){var i="/"+n.Settings.Culture+"/storage/GetUserData";$.ajax({type:"GET",url:i,data:{keys:t},cache:!1,contentType:"application/json"}).done(function(t){t!==undefined&&t!==null&&localforage!=undefined&&localforage!=null&&localforage.ready(function(){for(var i,u,e,f,o,r=0;r<t.length;r++)if(i=t[r],i.ExpiresIn!=null&&i.ExpiresIn>0&&(u=new Date,u.setSeconds(u.getSeconds()+i.ExpiresIn),e=""+Math.round(+u/1e3),localforage.setItem(i.Key+"_time",e)),localforage.setItem(i.Key,i.Data),n.Storage.callbackList!==undefined&&n.Storage.callbackList!==null&&n.Storage.callbackList[i.Key]!==undefined&&n.Storage.callbackList[i.Key]!==null){for(f=0;f<n.Storage.callbackList[i.Key].length;f++)o=n.Storage.callbackList[i.Key][f],o(i.Data);n.Storage.callbackList[i.Key]=null}$.cookie("str","",{path:"/",expires:new Date(1900,1,1)})})})},t}();n.Storage=t}(Vex||(Vex={})),function(n){var u,f,e,t,i,r;(function(n){n[n.None=0]="None";n[n.Semi=1]="Semi";n[n.Full=2]="Full"})(u=n.LightboxModalMode||(n.LightboxModalMode={})),function(n){n[n.AutoRemoved=0]="AutoRemoved";n[n.Sticky=1]="Sticky";n[n.TimerRemoved=2]="TimerRemoved"}(f=n.CroutonStickyMode||(n.CroutonStickyMode={})),function(n){n[n.Default=0]="Default";n[n.CartExpire=1]="CartExpire"}(e=n.PageTitles||(n.PageTitles={}));t=function(){function n(){}return n.GetOptinChoices=function(){var n={C0001:!0,C0002:!1,C0003:!1,C0004:!1,C0005:!1},t,i;return window.Optanon==null||$.cookie("OptanonConsent")==null?n:(t=$.cookie("OptanonConsent").split("&").filter(function(n){return n.startsWith("groups")})[0],(t||"").indexOf("=")<=0)?n:(i=t.split("=")[1],i.split(",").map(function(t){return n[t.split(":")[0]]=t.split(":")[1]==1}),n)},n}();n.OneTrust=t;i=function(){function t(){}return t.clone=function(n){return jQuery.extend(!0,{},n)},t.productDetailUrl=function(t){var i=n.Dictionary.products[t],r,u;return i?(r="a",u=n.Dictionary.sales[i.SaleId],u&&(r=n.Util.slug(u.Name)),"/"+n.Settings.Culture+"/"+r+"-qs"+i.SaleId+"#/d/"+n.Util.slug(i.Title)+"/"+t):""},t.saleUrl=function(t){var i="a",r=n.Dictionary.sales[t];return r&&(i=n.Util.slug(r.Name)),"/"+n.Settings.Culture+"/"+i+"-qs"+t+"#/o"},t.saleFrameUrl=function(t){var i="a",r=n.Dictionary.sales[t];return r&&(i=n.Util.slug(r.Name)),"/"+n.Settings.Culture+"/"+i+"-qs"+t+"#/f"},t.saleTeaserUrl=function(t){var i="a",r=n.Dictionary.sales[t];return r&&(i=n.Util.slug(r.Name)),"/"+n.Settings.Culture+"/"+i+"-qst"+t},t.slug=function(n){var i,r,t,u;if(n){for(n=n.toLowerCase(),n=n.replace(/^\s+|\s+$/g,""),n=n.replace(/[_|\s]+/g,"-"),i="ãàáäâẽèéëêìíïîõòóöôùúüûñç·/,:;",r="aaaaaeeeeeiiiiooooouuuunc-----",t=0,u=i.length;t<u;t++)n=n.replace(new RegExp(i.charAt(t),"g"),r.charAt(t));n=n.replace(/[^a-z0-9-]+/g,"");n=n.replace(/[-]+/g,"-");n=n.replace(/^-+|-+$/g,"")}else n="a";return n},t.htmlEncode=function(n){return $("<div/>").text(n).html()},t.rot13Decrypt=function(n){return n?n.replace(/[a-zA-Z]/g,function(n){return String.fromCharCode((n<="Z"?90:122)>=(n=n.charCodeAt(0)+13)?n:n-26)}):null},t.fract=function(n){var t=""+n,i=t.indexOf(".");return i<0?t="00":(t=t.substr(i+1),t.length<2?t+="0":t=t.substr(0,2)),""+t},t.getPriceHtml=function(t,i,r,u,f){var s,e;i===void 0&&(i="");r===void 0&&(r="");u===void 0&&(u=!1);f===void 0&&(f=!1);var h=t<0,c=u!=h?"-&nbsp;":"",o=Math.floor(Math.abs(t)).toString();if(o.length>3&&f){for(s="",e=o.length-3;e>=0;e=e-3)s=o.substr(e,3)+s,e!==0&&(s="."+s);e<0&&(e=e+3);o=o.substr(0,e)+s}return[r,"<span class ='cur'>",c,"&euro;<\/span><span class='ord'>",o,",<\/span><span class ='frac'>",n.Util.fract(t),"<\/span>",i].join("")},t.showLightbox=function(t,i,r,u){var f=$.extend({},{css:{left:($(window).width()-t)/2+"px",top:($(window).height()-i)/2+"px",width:t,height:"auto"},unblockFunction:$.unblockUI},u||{});$.blockUI(f);(r==n.LightboxModalMode.Semi||r==n.LightboxModalMode.None)&&($(".blockOverlay").click(f.unblockFunction),r==n.LightboxModalMode.None&&$(".blockMsg").click(f.unblockFunction))},t.slideUpPopup=function(){var t=$(".blockUI .slide-up-popup"),i=t.find(".lightbox-popup");i.animate({top:"-1000px"},500,function(){var i=t.find(".popup-success");i.length>0?($(".blockUI.blockMsg").css("top","0px"),t.find(".popup-success").fadeIn(300)):n.Util.removeSlideUpPopup(t)});$(".blockOverlay").click(function(){n.Util.removeSlideUpPopup(t)});n.Util.slideUpTimeout=setTimeout(function(){n.Util.removeSlideUpPopup(t)},1e4)},t.removeSlideUpPopup=function(t){clearTimeout(n.Util.slideUpTimeout);t.is(":visible")&&$.unblockUI({onUnblock:function(){t.find(".lightbox-popup").css("top","0");t.find(".popup-success").hide()}})},t.removeCrouton=function(){clearTimeout(n.Util.timerCrouton);var t=$("#crouton-container .crouton-banner");t.animate({top:-150-t.height()},500,function(){$("#crouton-container").remove()})},t.showCrouton=function(t,i,r,u){var f,e,o;if(i===void 0&&(i=n.CroutonStickyMode.Sticky),r===void 0&&(r={width:680,height:200}),u===void 0&&(u=function(){}),!n.Util.isCroutonShown()){f=680;r&&r.width&&(f=r.width);t=t.clone();e=$("<div id='crouton-container'><\/div>");e.append(t);$("body").append(e);t.css("left",-f/2);t.css("width",f);r&&r.height&&(t.css("top",-150-r.height),t.css("height",r.height));t.animate({top:0},500,function(){t.removeClass("not-shown")});t.find(".close-crouton").off("click").on("click",n.Util.removeCrouton);(i==n.CroutonStickyMode.AutoRemoved||i==n.CroutonStickyMode.TimerRemoved)&&t.bind("inview",function(t,i){i||(clearTimeout(n.Util.timerCrouton),e.remove())});i==n.CroutonStickyMode.TimerRemoved&&(o=15,r&&r.time&&(o=r.time),o*=1e3,n.Util.timerCrouton=setTimeout(n.Util.removeCrouton,o));u()}},t.isCroutonShown=function(){return $("#crouton-container").length>0},t.registerCustomValidators=function(){function t(n,t,i){n.rules[t]=i;n.message&&(n.messages[t]=n.message)}var n=$.validator;n.addMethod("ogonerestrictedcharacters",function(n){for(var i="&|;#{}<>[]".split(""),t=0;t<i.length;t++)if(n.indexOf(i[t])!=-1)return!1;return!0},"");$.validator.unobtrusive.adapters.add("ogonerestrictedcharacters",function(n){t(n,"ogonerestrictedcharacters",!0)});n.unobtrusive.parse()},t.isValidEmailAddress=function(n){return/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i.test(n)},t.setPageTitle=function(t){t!=n.PageTitles.CartExpire&&n.Util._pageTitleCartExpireInterval!==null&&n.Util._pageTitleCartExpireInterval!==undefined&&(clearInterval(n.Util._pageTitleCartExpireInterval),n.Util._pageTitleCartExpireInterval=null);t==n.PageTitles.CartExpire?(n.Util._pageTitleCartExpireInterval===null||n.Util._pageTitleCartExpireInterval===undefined)&&(n.Util._pageTitleCartExpireInterval=setInterval(function(){n.Util._pageTitleBlinkShown?($("title").text($("title").data("default")),n.Util._pageTitleBlinkShown=!1):($("title").text($("title").data("cartexpire")),n.Util._pageTitleBlinkShown=!0)},1500)):$("title").text($("title").data("default"))},t.jsonDateTimeReviver=function(n,t){var i;return typeof t=="string"&&(i=/\/Date\((\d*)\)\//.exec(t),i)?new Date(+i[1]):t},t.getDateInddmmyyyyFormat=function(n){var r=n.getFullYear().toString(),t=(n.getMonth()+1).toString(),i=n.getDate().toString();return(i[1]?i:"0"+i[0])+"/"+(t[1]?t:"0"+t[0])+"/"+r},t.stringFormat=function(n){for(var i=[],t=1;t<arguments.length;t++)i[t-1]=arguments[t];return n.replace(/{(\d+)}/g,function(n,t){return typeof i[t]!="undefined"?i[t]:n})},t.guid=function(){function n(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)}return n()+n()+"-"+n()+"-"+n()+"-"+n()+"-"+n()+n()+n()},t.noun=function(){function n(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)}return n()+n()+"-"+n()},t.extractISODateFromLocal=function(n){var t=new Date(n.valueOf());return t.setHours(12),t.toJSON().substring(0,10)},t.calCall=function(t,i){$.ajax({type:"POST",url:n.Settings.ApiRoot+"cal",data:JSON.stringify(i),contentType:"application/json; charset=utf-8",headers:{"X-Vex-User-Token":t,"X-Vex-Session-Id":$.cookie("cal_s"),"X-Vex-Device-Id":$.cookie("cal_d"),"X-Vex-Channel":"WEB"}})},t.cal=function(i,r,u,f,e){var o={scope:i,type:r,code:u},s,l,a,h,c;f&&(o=_.extend(o,f));e&&(o=_.extend(o,{data:JSON.stringify(e)}));s=$.cookie("Usr");s&&(s=angular.fromJson(s),l=s.Token);a=!1;h=$.cookie("cal_s");typeof h=="undefined"&&(h=t.guid(),a=!0);c=new Date;c.setTime(c.getTime()+12e5);n.OneTrust.GetOptinChoices().C0004==!0&&$.cookie("cal_s",h,{expires:c,path:"/"});a==!0&&this.calCall(l,{scope:"SESSION",type:"EVENT",code:"START",data:JSON.stringify({extended:!0})});this.calCall(l,o)},t.calAction=function(n,t,i,r){i===void 0&&(i=null);r===void 0&&(r=null);this.cal(n,"ACTION",t,i,r)},t.calEvent=function(n,t,i,r){i===void 0&&(i=null);r===void 0&&(r=null);this.cal(n,"EVENT",t,i,r)},t.calView=function(n,t,i){t===void 0&&(t=null);i===void 0&&(i=null);this.cal(n,"VIEW",n,t,i)},t.getSegmentName=function(n){switch(n){case"N":return"New";case"P":return"Purple";case"B":return"Bronze";case"S":return"Silver";case"G":case"U":return"Gold";case"PGP":return"Paid Gold+"}return""},t}();n.Util=i;r=function(){function n(n,t,i,r,u){this.ItemContainerSelector=n;this.ItemSelector=t;this.ItemSize=u||null;this.IsVertical=r;i<1&&(i=1);this.ItemSkipAmmount=i;this.NavIndex=0}return n.prototype.resetList=function(n){n===void 0&&(n=0);var t=this,i;i=t.IsVertical?{top:"0px"}:{left:n+"px"};$(t.ItemContainerSelector).animate(i);t.NavIndex=0},n.prototype.scrollListNavigate=function(n){var t=this;if(!t.BlockNavigation){var u=$(t.ItemContainerSelector),o=u.find(t.ItemSelector).length,r,f=parseInt(u.css(t.IsVertical?"top":"left")),i,e;n.hasClass(t.IsVertical?"up":"left")?t.NavIndex>0&&(t.BlockNavigation=!0,i=t.NavIndex-t.ItemSkipAmmount,i<0&&(i=0),r=t.ItemSize!=null?t.ItemSize*(t.NavIndex-i):t.calculateItemSize(t.NavIndex,i),e=t.IsVertical?{top:f+r+"px"}:{left:f+r+"px"},u.animate(e,500,function(){t.BlockNavigation=!1}),t.NavIndex=i):t.NavIndex<o-t.ItemSkipAmmount&&(t.BlockNavigation=!0,i=t.NavIndex+t.ItemSkipAmmount,i>o&&(i=o),r=t.ItemSize!=null?t.ItemSize*(i-t.NavIndex):t.calculateItemSize(t.NavIndex,i),e=t.IsVertical?{top:f-r+"px"}:{left:f-r+"px"},u.animate(e,500,function(){t.BlockNavigation=!1}),t.NavIndex=i)}},n.prototype.calculateItemSize=function(n,t){var r=this,e=n,o=n,u,f,i;for(t>n?o=t:e=t,u=$(r.ItemContainerSelector).find(r.ItemSelector).toArray(),f=0,i=e;i<o;i++)f+=r.IsVertical?$(u[i]).outerHeight(!0):$(u[i]).outerWidth(!0);return f},n}();n.ScrollListHelper=r}(Vex||(Vex={})),function(n){var t=function(){function t(){}return t.initializeUserData=function(t){t!==undefined&&t!==null&&(n.AnalyticsData.UserId=t.Id||"",n.AnalyticsData.LastUserDigit=isNaN(t.LastUserDigit)?-1:t.LastUserDigit,n.AnalyticsData.BSeg=t.BSeg,n.AnalyticsData.VSeg=t.VSeg,n.AnalyticsData.MUS=t.MSeg,n.AnalyticsData.SUS=t.SSeg,n.AnalyticsData.MRS=t.MRS,n.AnalyticsData.SIS=t.SIS,n.AnalyticsData.AcquisitionAge=t.AcquisitionAge,n.AnalyticsData.AcquisitionSource=t.AcquisitionSource,n.AnalyticsData.AllowDataProcessing=t.AllowDataProcessing);n.AnalyticsData.DataIsInitialized=!0},t.initialize=function(){var f,r,i,u,t;try{if(n.Storage.getUserData("acc",function(t){n.AnalyticsData.initializeUserData(t)}),f="rso",r=$.cookie(f),n.AnalyticsData.ReferralSource="DCT",n.AnalyticsData.RecentReferralSources=[],n.AnalyticsData.ReferralSaleId=0,r||r=="")for(i=JSON.parse(r,function(n,t){var i;return typeof t=="string"&&(i=/\/Date\((\d*)\)\//.exec(t),i)?new Date(+i[1]):t}),u=null,t=0;t<i.length;t++)(u==null||i[t].RefTime>u)&&(u=i[t].RefTime,n.AnalyticsData.ReferralSource=i[t].Source,n.AnalyticsData.ReferralSaleId=i[t].SaleId),n.AnalyticsData.RecentReferralSources.push(i[t].Source)}catch(e){n.AnalyticsData.UserId="";n.AnalyticsData.LastUserDigit=-1}},t.addListener=function(t){n.AnalyticsData.LocalListeners.push(t)},t.updateCategoriesAndSubCategories=function(){var r=$("input[name=categories]:checked"),u=$("input[name=subcategories]:checked"),f,t,i,e;if(n.AnalyticsData.SelectedCategories.length!=0||r.length!=0||n.AnalyticsData.SelectedSubCategories.length!=0||u.length!=0){if(n.AnalyticsData.SelectedCategories=[],r.length>0)for(t=0,i=r.length;t<i;t++)f=$(r[t]).val(),n.AnalyticsData.SelectedCategories[t]=+f;if(n.AnalyticsData.SelectedSubCategories=[],u.length>0)for(t=0,i=u.length;t<i;t++)e=$(u[t]).val(),n.AnalyticsData.SelectedSubCategories[t]=+e;n.AnalyticsData.fireGtmEvent("SelectedCategoriesAndSubCategories")}},t.updateFilters=function(){var t=$("input[name=models]:checked"),i,u,r;if(n.AnalyticsData.Filters=[],t.length>0)for(i=0,u=t.length;i<u;i++)r=$(t[i]).val(),n.AnalyticsData.Filters[i]=r;t=$("input[name=availability]:checked");t.length>0&&(r=t.attr("id"),n.AnalyticsData.Filters[n.AnalyticsData.Filters.length]=r);n.AnalyticsData.fireGtmEvent("Filters")},t.changeProperty=function(t,i){n.AnalyticsData[t]!=i&&(n.AnalyticsData[t]=i,n.AnalyticsData.fireGtmEvent(t))},t.cartModified=function(){n.AnalyticsData.fireGtmEvent("CartModified")},t.triggerPurchaseCompletedEvent=function(){dataLayer&&n.Storage.getUserData("acc",function(t){n.AnalyticsData.initializeUserData(t);dataLayer.push({event:"VexV3.AnalyticsData.Purchase"})})},t.fireGtmEvent=function(t){dataLayer&&n.Storage.getUserData("acc",function(i){n.AnalyticsData.initializeUserData(i);dataLayer.push({event:"VexV3.AnalyticsData.Updated",property:t,data:n.AnalyticsData})});n.AnalyticsData.fireEvent(t)},t.fireEvent=function(t){for(var i=0;i<n.AnalyticsData.LocalListeners.length;i++)n.AnalyticsData.LocalListeners[i](t)},t.fireNewMemberAquisitionEvent=function(t,i){dataLayer&&n.Storage.getUserData("acc",function(r){n.AnalyticsData.initializeUserData(r);dataLayer.push({acqChan:t});dataLayer.push({refSrc:i});dataLayer.push({event:"VexV3.AnalyticsData.NewMemberAcquisition"})})},t.fireNewEmailAquisitionEvent=function(t){dataLayer&&n.Storage.getUserData("acc",function(i){n.AnalyticsData.initializeUserData(i);dataLayer.push({acqChan:t});dataLayer.push({event:"VexV3.AnalyticsData.NewEmailAcquisition"})})},t.fireMannequinSizeCheckEvent=function(){dataLayer&&dataLayer.push({event:"VexV3.AnalyticsData.MannequinSizeImpression"})},t.fireSizeChartCheck=function(){dataLayer&&dataLayer.push({event:"VexV3.AnalyticsData.SizeChartClick"})},t.isLastUserDigit=function(t){for(var r=t.split(","),i=0;i<r.length;i++)if(n.AnalyticsData.LastUserDigit==parseInt(r[i]))return!0;return!1},t.isLastUserDigitAsync=function(t,i){for(var u=t.split(","),r=0;r<u.length;r++)n.AnalyticsData.LastUserDigit==parseInt(u[r])&&i(!0);i(!1)},t.isHomePage=function(){return $("body").attr("id")=="Home"},t.isProductDetailsPage=function(){return location.href.toLowerCase().lastIndexOf("#/d/")>=0},t.isOverviewPage=function(){return n.AnalyticsData.urlEndsWith("#/o")},t.isCartPage=function(){return location.href.toLowerCase().lastIndexOf("/cart/edit")>=0},t.isCheckoutPage=function(){return location.href.toLowerCase().lastIndexOf("/checkout/")>=0||location.href.toLowerCase().lastIndexOf("/ogone/transfer")>=0},t.isThankYouPage=function(){return location.href.toLowerCase().lastIndexOf("/ogone/thankyou")>=0},t.isFramePage=function(){return n.AnalyticsData.urlEndsWith("#/f")},t.isOther=function(){return!n.AnalyticsData.isHomePage()&&!n.AnalyticsData.isProductDetailsPage()&&!n.AnalyticsData.isOverviewPage()&&!n.AnalyticsData.isCartPage()&&!n.AnalyticsData.isCheckoutPage()&&!n.AnalyticsData.isThankYouPage()&&!n.AnalyticsData.isFramePage()},t.urlEndsWith=function(n){var t=location.href.toLowerCase().lastIndexOf(n);return t>=0&&t==location.href.length-n.length},t.Vertical=$.cookie("vert"),t.SaleId=0,t.SaleTitle="",t.ProductId=0,t.NextProductId=0,t.PreviousProductId=0,t.SelectedCategories=[],t.SelectedSubCategories=[],t.Filters=[],t.Quantity=0,t.LoyaltySegment="",t.CurrentSalePage="",t.ReferralSaleId=0,t.LocalListeners=[],t}();n.AnalyticsData=t;n.AnalyticsData.initialize()}(Vex||(Vex={})),function(n){var t=function(){function t(){}return t.GetExperiment=function(){var r,t,i,f,u;try{return(r=$.cookie("Usr"),r&&(t=$.parseJSON(r),t&&t.ExtToken&&(i=$("#persuasionApi"),i&&i.length>0)))?(f=i.data("experimentid"),u=t.ExtToken,(n.PersuasionApi._activeExperiment===undefined||n.PersuasionApi._activeExperiment===null||n.PersuasionApi._activeExperiment.uid!=u)&&(n.PersuasionApi._activeExperiment=new sciro.Persuasion(f,u)),n.PersuasionApi.PushUsergroupToRedis(t.Token),n.PersuasionApi._activeExperiment):null}catch(e){return console.log("Exception occured: "+e.name+": ",e.message),null}},t.Inform=function(t){try{var i=n.PersuasionApi.GetExperiment();i!=null&&i.inform(t)}catch(r){console.log("Exception occured: "+r.name+": ",r.message)}},t.GetAdvice=function(t){try{var i=n.PersuasionApi.GetExperiment();i!=null?i.getAdvice(t):t(null)}catch(r){return console.log("Exception occured: "+r.name+": ",r.message),null}},t.LearnAdviceView=function(n){try{n&&n.logView()}catch(t){console.log("Exception occured: "+t.name+": ",t.message)}},t.LearnAdviceSuccess=function(n){try{n&&n.logSuccess()}catch(t){console.log("Exception occured: "+t.name+": ",t.message)}},t.PushUsergroupToRedis=function(t){if(n.PersuasionApi!=undefined&&n.PersuasionApi!=null&&n.PersuasionApi._activeExperiment!=undefined&&n.PersuasionApi._activeExperiment!=null&&n.PersuasionApi._activeExperiment.cache!=undefined&&n.PersuasionApi._activeExperiment.cache!=null&&n.PersuasionApi._activeExperiment.cache.agent!=undefined&&n.PersuasionApi._activeExperiment.cache.agent!=null){var i=n.PersuasionApi._activeExperiment.cache.agent;n.Storage.getItemLF(n.PersuasionApi._sciroUsergroupLFKey,function(r){var u=!1,f;r!=undefined||r!=null?(f=JSON.parse(r),(f.token!=t||f.userGroup!=i)&&(u=!0)):u=!0;u&&(n.Storage.setItemLF(n.PersuasionApi._sciroUsergroupLFKey,JSON.stringify({token:t,userGroup:i})),jQuery.ajax("/"+n.Settings.Culture+"/Account/UpdateSciroUsergroup",{data:{userGroup:i}}))})}},t._sciroUsergroupLFKey="sciroUsergroup",t}();n.PersuasionApi=t}(Vex||(Vex={})),function(n){var i=function(){function i(){this.initializeEmptyCart();this.loadCart()}return i.prototype.validate=function(){n.Storage.validateStoredCookie(i.cookieName)||this.initializeEmptyCart()},i.prototype.loadCart=function(){var t=n.Storage.getStoredCookie(i.cookieName,!0),r;t?(r=$.parseJSON(t),this.initializeCart(r)):this.initializeEmptyCart()},i.prototype.initializeCart=function(t){this.CCReduction=t.CCReduction;this.Coupons=t.Coupons;this.Credit=t.Credit;this.Extended=t.Extended;this.Id=t.Id;this.Reduction=t.Reduction;this.Shipping=t.Shipping;this.SubTotal=t.SubTotal;this.Total=t.Total;this.Items=this.initializeCartItems(t.Items);this.IsPartialCart=t.IsPartialCart;this.HasDigitalProducts=t.HasDigitalProducts;this.HasPhysicalProducts=t.HasPhysicalProducts;this.HasUncFreeShpFCart=t.HasUncFreeShpFCart;this.HasCondFreeShpNotReach=t.HasCondFreeShpNotReach;this.HasCondFreeShpIsReach=t.HasCondFreeShpIsReach;this.CondFreeShpAmount=t.CondFreeShpAmount;this.AmountToReachCondFreeShp=t.AmountToReachCondFreeShp;this.FreeShpFrmCartMerge=t.FreeShpFrmCartMerge;this.CondFreeShpAmountHtml=n.Util.getPriceHtml(t.CondFreeShpAmount);this.AmountToReachCondFreeShpHtml=n.Util.getPriceHtml(t.AmountToReachCondFreeShp)},i.prototype.initializeEmptyCart=function(){this.CCReduction=0;this.Coupons=0;this.Credit=0;this.Extended=!1;this.Id=42;this.Reduction=0;this.Shipping=0;this.SubTotal=0;this.Total=0;this.Items=[];this.RevivedItems=[];this.IsPartialCart=!1;this.HasDigitalProducts=!1;this.HasPhysicalProducts=!1;this.HasUncFreeShpFCart=!1;this.HasCondFreeShpNotReach=!1;this.HasCondFreeShpIsReach=!1;this.CondFreeShpAmount=0;this.AmountToReachCondFreeShp=0},i.prototype.initializeCartItems=function(n){var f=[],u,r,i;if(n&&n.length>0)for(u=0;u<n.length;u++)r=n[u],i=new t,i.Active=r.Active,i.Id=r.Id,i.ModelId=r.ModelId,i.ModelName=r.ModelName,i.ProductId=r.ProductId,i.Quantity=r.Quantity,i.SaleId=r.SaleId,i.ShopPrice=r.ShopPrice,i.CatalogPrice=r.CatalogPrice,i.HideCatalogPrice=r.HideCatalogPrice,i.IsPgpModel=r.IsPgpModel,f.push(i);return f},i.prototype.hasItems=function(){return this.Items&&this.Items.length>0},i.prototype.refreshCart=function(){this.loadCart()},i.cookieName="Crt",i}(),t,r;n.Cart=i;t=function(){function n(){}return n}();n.CartItem=t;r=function(){function n(){}return n}();n.CartRevivalItem=r;n.cart=new i}(Vex||(Vex={})),function(n){var e=function(){function n(){}return n}(),f=function(){function t(){}return t.addListener=function(t,i){n.Facebook.listeners[n.Facebook.listeners.length]={name:t,listener:i}},t.removeListener=function(t){for(var i=0;i<n.Facebook.listeners.length;i++)n.Facebook.listeners[i]&&n.Facebook.listeners[i].name==t&&(n.Facebook.listeners[i].listener=null)},t.facebookInitFinish=function(){for(var t=0;t<n.Facebook.listeners.length;t++)n.Facebook.listeners[t].listener&&n.Facebook.listeners[t].listener()},t.listeners=[],t}(),r,t,i,u;n.Facebook=f;r=function(){function t(){}return t.addListener=function(t,i){n.Twitter.listeners[n.Twitter.listeners.length]={name:t,listener:i}},t.removeListener=function(t){for(var i=0;i<n.Twitter.listeners.length;i++)n.Twitter.listeners[i]&&n.Twitter.listeners[i].name==t&&(n.Twitter.listeners[i].listener=null)},t.facebookInitFinish=function(){for(var t=0;t<n.Twitter.listeners.length;t++)n.Twitter.listeners[t].listener&&n.Twitter.listeners[t].listener()},t.listeners=[],t}();n.Twitter=r;t=null;i=document.getElementsByTagName("body").item(0).attributes["data-module"];i!=null&&(t=i.value);u=function(){function n(){}return n.register=function(n,i){n==t&&(i.documentLoading(jQuery),$(document).ready(function(){i.documentReady(jQuery)}))},n.registerExternal=function(n){n.documentLoading(jQuery);$(document).ready(function(){n.documentReady(jQuery)})},n}();n.Modules=u}(Vex||(Vex={})),function(n){var t=function(){function t(t){var i=$(t),r=i.find("select.topic-list"),u=parseInt(i.find("#preselectedTopicId").val(),10);i.find(".topic-list-container").show();r.change(function(){var u=$(this).find("option:selected"),r=parseInt(u.val(),10),h=u.data("is-sale-topic")==!0,f=u.data("is-cart-topic")==!0,o=u.data("is-travel-topic")==!0,e,s;$(".add-message-container").toggle(r>0);i.find(".sales-list-container").toggle(h);i.find(".bookings-list-container").toggle(o);i.find(".booking-help-container").toggle(o);i.find(".carts-list-container").toggle(f);i.find(".cart-help-container").toggle(f);f&&i.find(".carts-list").change();r!=undefined&&r!=NaN&&r>0?$.getJSON("/"+n.Settings.Culture+"/Help/GetTopicData/"+r).done(function(n){var u=$(t+" .self-help-container"),r,i;if(u.length>0)if(r=$(t+" .self-help-content"),r.html(""),n.QuestionAndAnswerItems&&n.QuestionAndAnswerItems.length>0)for(u.show(),i=0;i<n.QuestionAndAnswerItems.length;i++)r.append("<div class='question'>"+n.QuestionAndAnswerItems[i].Question+"<\/div>"),r.append("<div class='answer'>"+n.QuestionAndAnswerItems[i].Answer.replace("\n","<br />")+"<\/div>");else u.hide()}):(e=$(t+" .self-help-container"),e.length>0&&(s=$(t+" .self-help-content"),s.html(""),e.hide()))});u>0&&r.change()}return t}();n.TopicSelector=t}(Vex||(Vex={}));shopModule=angular.module("shop",["ngSanitize","ngRoute","ngAnimate"]);shopModule.config(["$routeProvider","$httpProvider","$sceDelegateProvider",function(n,t,i){t.interceptors.push("TemplateVersioningInterceptor");i.resourceUrlWhitelist(["self","https://*.veepee.be/**","https://*.veepee.nl/**","https://*.veepee.lu/**"])}]);shopModule.animation(".fade-in-out",function(){return{beforeAddClass:function(n,t,i){if(t=="ng-hide"){var r=$(n);return r.css({opacity:1}),r.animate({opacity:0},300,function(){i()}),function(){r.css({opacity:0});r.hide()}}i()},removeClass:function(n,t,i){if(t=="ng-hide"){var r=$(n);return r.css({opacity:0}),r.show(),r.animate({opacity:1},500,function(){i()}),function(){r.css({opacity:1});r.show()}}i()},enter:function(){},leave:function(){},move:function(n,t){t()}}});shopModule.factory("TemplateVersioningInterceptor",function(){var n=/^\/templates\//i,t=$("body").data("tmpl-v");return{request:function(i){return i.url=i.url.replace(n,"/templates/"+Vex.Settings.Culture+"/"+t+"/"),i}}});shopModule.service("$session",["$http","$q",function(n){var i,t;this.user=null;i=$.cookie("Previewing");i?this.user={token:i,externalId:"00000000-0000-0000-0000-000000000000"}:(t=$.cookie("Usr"),t&&(t=angular.fromJson(t),this.user={token:t.Token,externalId:t.ExtToken}));this.user&&(n.defaults.headers.common.Authorization="Bearer "+this.user.token)}]);shopModule.service("$sales",["$http","$q","$session",function(n,t,i){var f=parseInt(Vex.Storage.getItem("metaDataCacheInvalidationVersion")||"0"),e=new Date,l=moment(new Date(e.getFullYear(),e.getMonth(),e.getDate())),r,u,o,s,h,a=function(){var e=t.defer(),r=i.user?Vex.Settings.ApiRoot+Vex.Settings.Culture+"/users/"+i.user.token+"/sales-meta-data":Vex.Settings.ApiRoot+Vex.Settings.Culture+"/sales/meta-data";return r+="?saleChannel=w",f&&(r+="&v="+f),n.get(r).success(function(n){u=n;e.resolve(n)}),e.promise},y=function(){var i=t.defer(),r=Vex.Settings.ApiRoot+Vex.Settings.Culture+"/sales/verticals";return n.get(r).success(function(n){i.resolve(n)}),i.promise},c=function(){if(o)return o;var i=t.defer();return o=i.promise,t.all([n.get(Vex.Settings.ApiRoot+Vex.Settings.Culture+"/sales"),a()]).then(function(n){u=n[1];r=_.map(u,function(t){var i=_.find(n[0].data,function(n){return n.saleId==t.saleId});if(!i)return null;i=_.extend(i,t);i.verticals=i.verticals||"";i.startDateTime=moment(i.startDateTime);i.startDate=moment(new Date(i.startDateTime._d.getFullYear(),i.startDateTime._d.getMonth(),i.startDateTime._d.getDate()));i.openDateTime=moment(i.openDateTime);i.openDate=moment(new Date(i.openDateTime._d.getFullYear(),i.openDateTime._d.getMonth(),i.openDateTime._d.getDate()));i.endDateTime=moment(i.endDateTime);i.endDate=moment(new Date(i.endDateTime._d.getFullYear(),i.endDateTime._d.getMonth(),i.endDateTime._d.getDate()));i.endsToday=i.saleStateCV=="Open"&&i.endDate.valueOf()==l.valueOf();i.endsSoon=i.endDateTime.clone().subtract(2,"days").valueOf()<e.valueOf();var r=new Date((new Date).setHours(18,30,0,0)),u=new Date((new Date).setHours(19,30,0,0)),f=moment(new Date(i.startDateTime).setHours(7,0,0,0)).add(1,"day").toDate();return i.opensToday=i.openDate.valueOf()==l.valueOf(),i.isEarlyAccess=t.accessMode==3,i.isEveningSale=t.accessMode==4||i.startDateTime>=r&&i.startDateTime<=u&&new Date<=f,i.isUpcoming=(i.saleStateCV=="Announced"||i.saleStateCV=="Approved"||i.saleStateCV=="PreOpen")&&i.accessMode==0,i.isOpenForMe=!i.isUpcoming,i.url=i.isUpcoming?"/"+Vex.Settings.Culture+"/"+Vex.Util.slug(i.title)+"-q"+(i.saleTypeCV=="T"?"t":"s")+"t"+i.saleId:i.isMobileExclusive?"":"/"+Vex.Settings.Culture+"/"+Vex.Util.slug(i.title)+"-q"+(i.saleTypeCV=="T"?"t":"s")+i.saleId+"#/"+(i.saleTypeCV=="T"||i.skipFrame?"o":"f"),i.targetOption=i.saleTypeCV=="T"?"_blank":"_self",i});r=_.compact(r);i.resolve(r);o=null}),i.promise},v=function(i,r){var u=t.defer();return c().then(function(t){var f=_.find(t,function(n){return n.saleId==i});f?r&&f.cycle=="na"?n.put(Vex.Settings.ApiRoot+Vex.Settings.Culture+"/sales/"+i+"/ensure-cycle",{}).then(function(n){f.cycle=n.data.cycle;u.resolve(f)},function(n){u.reject(n)}):u.resolve(f):u.resolve(null)}),u.promise},p=function(i){if(s)return s;var r=t.defer();return s=r.promise,v(i,!0).then(function(t){var u=t?t.cycle:"none";n.get(Vex.Settings.ApiRoot+Vex.Settings.Culture+"/sales/"+i+"?cycle="+u).then(function(n){r.resolve(n.data);s=null})},function(n){r.reject(n)}),r.promise},w=function(i){if(h)return h;var r=t.defer();return h=r.promise,c().then(function(){n.get(Vex.Settings.ApiRoot+Vex.Settings.Culture+"/sales/"+i+"/availability").then(function(n){r.resolve(n.data);h=null})},function(n){r.reject(n)}),r.promise};this.getSales=function(){return r?t.when(r):c()};this.getSale=function(n,t){return v(n,t)};this.getMetaData=function(){return u?t.when(u):a()};this.getVerticals=function(){return y()};this.getSaleOverviewData=function(n){return p(n)};this.getSaleOverviewAvailabilities=function(n){return w(n)};this.getLowerProductPrice=function(i,r){var u=t.defer();return this.getSale(i,!0).then(function(t){if(!t){u.reject();return}n.get("/"+Vex.Settings.Culture+"/trending/ProductPriceData?productId="+r+"&cycle="+t.cycle).then(function(n){u.resolve(n.data)})},function(n){u.reject(n)}),u.promise};this.invalidateCache=function(){r=null;f++;Vex.Storage.setItem("metaDataCacheInvalidationVersion",f+"")};this.verticalFilters={all:function(n){return n.verticals.match(/\|ALL\|/)&&n.haltedStateCV==null},women:function(n){return n.verticals.match(/\|WOMEN\|/)&&n.haltedStateCV==null},men:function(n){return n.verticals.match(/\|MEN\|/)&&n.haltedStateCV==null},kids:function(n){return n.verticals.match(/\|KIDS\|/)&&n.haltedStateCV==null},life:function(n){return n.verticals.match(/\|LIFE\|/)&&n.haltedStateCV==null},travel:function(n){return n.verticals.match(/\|TRAVEL\|/)&&n.haltedStateCV==null},thematic:function(n){return n.verticals.match(/\|THEMATIC\|/)&&n.haltedStateCV==null},localbe:function(n){return n.verticals.match(/\|LOCALBE\|/)&&n.haltedStateCV==null},localnl:function(n){return n.verticals.match(/\|LOCALNL\|/)&&n.haltedStateCV==null},locallu:function(n){return n.verticals.match(/\|LOCALLU\|/)&&n.haltedStateCV==null}};this.verticalFilters.dames=this.verticalFilters.women;this.verticalFilters.heren=this.verticalFilters.men;this.verticalFilters.kinderen=this.verticalFilters.kids;this.verticalFilters.lifestyle=this.verticalFilters.life;this.verticalFilters.hommes=this.verticalFilters.men;this.verticalFilters.enfants=this.verticalFilters.kids;this.verticalMappings={all:"all",women:"women",men:"men",kids:"kids",life:"life",travel:"travel",thematic:"thematic",localbe:"localbe",localnl:"localnl",locallu:"locallu",dames:"women",heren:"men",kinderen:"kids",lifestyle:"life",hommes:"men",enfants:"kids"}}]);shopModule.service("$user",["$http","$q","$session",function(n,t,i){var r,u=function(){if(i.user){var u=t.defer(),f=i.user&&Vex.Settings.ApiRoot+Vex.Settings.Culture+"/users/"+i.user.token+"/metadata";return n.get(f).success(function(n){r=n;u.resolve(n)}),u.promise}return t.when()};this.getUserMetadata=function(){return r?t.when(r):u()}}]);shopModule.service("$features",["$http","$q","$session",function(n,t,i){function f(n,t){return n.indexOf(t,n.length-t.length)!==-1}var r,u=function(){if(i.user){var u=t.defer(),f=i.user&&Vex.Settings.ApiRoot+Vex.Settings.Culture+"/users/"+i.user.token+"/features";return n.get(f).success(function(n){r=n;u.resolve(n)}),u.promise}return t.when([])};this.getFeatures=function(){return r?t.when(r):u()};this.aknowledgeFeature=function(u){if(i.user){var f=t.defer(),e=Vex.Settings.ApiRoot+Vex.Settings.Culture+"/users/"+i.user.token+"/features/"+u+"/acknowledge";return n.put(e).success(function(n){r=n;f.resolve(n)}),f.promise}return t.when()};this.isEnabled=function(n){var t=this;return this.getFeatures().then(function(i){return i[n]&&f(n,"-only-once")&&t.aknowledgeFeature(n),!!i[n]})};this.getFeatureVariant=function(n){return this.getFeatures().then(function(t){return t[n]})}}]);shopModule.service("$filteraid",["$http","$q","$session","$features",function(n,t,i){var r,u=function(){var u=t.defer(),f=i.user&&Vex.Settings.ApiRoot+Vex.Settings.Culture+"/users/"+i.user.token+"/sale-filter-aid/alerts";return n.get(f).success(function(n){r=n;u.resolve(n)}),u.promise};this.getSettings=function(){return u().then(function(n){return n&&n.options})};this.getMessage=function(n){return u().then(function(t){return t&&t.sales[n]})};this.markViewed=function(u){var f=t.defer(),e=i.user&&Vex.Settings.ApiRoot+Vex.Settings.Culture+"/users/"+i.user.token+"/sale-filter-aid/sales/"+u+"/views";n.post(e).success(function(n){r=n;f.resolve(n)})}}]);shopModule.directive("headerMenu",[function(){return{templateUrl:"/templates/header-menu",controller:"HeaderMenuController",scope:{verticalFilter:"@headerMenu"}}}]);shopModule.directive("openX",["$http",function(n){return{template:"",restrict:"A",scope:{onload:"="},link:function(t,i,r){var u="/DynamicContent",f=r.openX,e,o,s;Vex.DynamicContent.isAvailable&&f?(e=++Vex.DynamicContent.nbDynamicContent,o=r.openXBodyId==null?"-":r.openXBodyId,u+="/"+f,u+="/"+e,Vex&&Vex.Shop&&Vex.Shop.currentId&&(u+="/"+Vex.Shop.currentId),s=document.location,u+="?bodyId="+o,u+="&location="+Vex.DynamicContent.ensureLocation(s.href),n.get(u).then(function(n){var r=n.data;if(r.indexOf(Vex.DynamicContent.EnsureFlagTag)==0&&$(r).not("DynamicContentFlag").not("[id^=beacon_]").length>0&&(r=r.substring(Vex.DynamicContent.EnsureFlagTag.length),Vex&&Vex.Settings&&Vex.Settings.Culture&&(r=r.replace("{--culture--}",Vex.Settings.Culture)),i.html('<div class="dynamic-content-lazyload">'+r+"<\/div>")),t.onload)t.onload(i)})):i[0].parentNode.removeChild(i[0])}}}]);shopModule.filter("skip",function(){return function(n,t){return n.slice(t)}});shopModule.filter("take",function(){return function(n,t){return n.slice(0,t)}});shopModule.controller("HeaderMenuController",["$scope","$sales","$cal","$anchorScroll","$timeout",function(n,t,i,r,u){t.getSales().then(function(f){var h=_.filter(f,t.verticalFilters[n.verticalFilter]),l,o,s,e,c;h=_.filter(h,function(n){return n.accessMode!=2});n.upcomingSales=_.filter(h,function(n){return n.isUpcoming});n.sales=_.filter(h,function(n){return!n.isUpcoming&&!n.isMobileExclusive});n.newSales=_.filter(n.sales,function(n){return n.opensToday||n.isEarlyAccess||n.IsEveningSale});n.openSales=_.filter(n.sales,function(n){return!n.opensToday&&!n.isEarlyAccess&&!n.IsEveningSale});n.logCalNewSales=function(t,r,u){i.logAction("HOMEPAGE","OPEN_HEADER_SALE",{saleId:r.saleId},{blockIndex:u,blockSize:n.newSales.length,blockName:"new",vertical:n.verticalFilter})};n.logCalOpenSales=function(t,r,u){i.logAction("HOMEPAGE","OPEN_HEADER_SALE",{saleId:r.saleId},{blockIndex:u,blockSize:n.openSales.length,blockName:"open",vertical:n.verticalFilter})};n.logCalUpcomingSales=function(t,r,u){r==undefined?i.logAction("HOMEPAGE","OPEN_HEADER_UPCOMING",{},{vertical:n.verticalFilter}):i.logAction("HOMEPAGE","OPEN_HEADER_SALE",{saleId:r.saleId},{blockIndex:u,blockSize:n.upcomingSales.length,blockName:"upcoming",vertical:n.verticalFilter})};l=function(n){u(function(){n?r(n):r()})};l();n.goToUpcoming=function(){l("next")};n.culture=Vex.Settings.Culture;o=0;s=0;n.newSales.length&&(o+=n.newSales.length+(e?2:3));n.openSales.length&&(o+=n.openSales.length+(e?2:3));n.upcomingSales.length&&(s+=n.upcomingSales.length+(e?2:3));e=o+s;c=97;e>c&&(n.upcomingSales.splice(-(e-(c-2))),n.upcomingSales[n.upcomingSales.length]={action:"goToUpcoming",showTopProminent:!1},e=c,s=n.upcomingSales.length+(e?2:3));n.totalLength=e;o-=18;n.openNewSalePanelClass=o<=0?"panel-0":"panel-"+Math.min(Math.ceil(o/3),26);s-=18;n.upcomingSalePanelClass=s<=0?"panel-0":"panel-"+Math.min(Math.ceil(s/3),26)})}]);shopModule.service("$shopDataService",["$rootScope",function(n){var t=this;t.getCart=function(){return Vex.cart};t.onCartEvent=function(t,i){Vex.cart.refreshCart();n.$broadcast(t,i)};t.onEvent=function(t,i){n.$broadcast(t,i)}}]);shopModule.directive("eatClick",function(){return function(n,t){$(t).click(function(n){n.preventDefault();n.stopPropagation()})}}).directive("noClick",function(){return function(n,t){$(t).click(function(n){return n.preventDefault(),n.stopPropagation(),!1})}}).filter("whole",function(){return function(n){return Math.floor(n)}}).filter("fract",function(){return function(n){return Vex.Util.fract(n)}}).filter("objectRange",function(){return function(n,t,i,r){for(var f=Math.min(parseInt(i),parseInt(r)),u=t;u<t+f;u++)n[u]=u;return n}}).filter("range",function(){return function(n,t){for(var r=parseInt(t),i=0;i<t;i++)n.push(i);return n}}).filter("skip",function(){return function(n,t){return t=parseInt(t),n.slice(t,n.length)}}).filter("limit",function(){return function(n,t){return t=parseInt(t),n.slice(0,t)}}).filter("leadingZero",function(){return function(n){return n<10?"0"+n:n}}),function(n){n.factory("$cal",["$http",function(n){var i={},t=[],u=function(){for(var u={timestamp:null,events:[]},f=0,e,o,i,r=0;r<t.length;r++)e=t[r],u.events[f++]=e;f!=0&&(i=$.cookie("Usr"),i&&(i=angular.fromJson(i),o=i.Token),u.timestamp=(new Date).toISOString(),n.post(Vex.Settings.ApiRoot+"cal/batches",JSON.stringify(u),{headers:{"X-Vex-User-Token":o,"X-Vex-Session-Id":$.cookie("cal_s"),"X-Vex-Device-Id":$.cookie("cal_d"),"X-Vex-Channel":"WEB"}}).then(function(){t=[];localforage.setItem("cal",t)},function(){}))};localforage!=undefined&&localforage!=null&&localforage.getItem("cal").then(function(n){if(n!=undefined)for(var i=0;i<n.length;i++)t.push(n[i]);u()});var f=function(n){var i=_.extend(n,{timestamp:(new Date).toISOString(),noun:Vex.Util.noun(),sessionId:$.cookie("cal_s"),deviceId:$.cookie("cal_d")});t[t.length]=i;localforage.setItem("cal",t)},r=function(n,t,i,r,e){var o={scope:n,type:t,code:i},s,a,l,h,c;r&&(o=_.extend(o,r));e&&(o=_.extend(o,{data:JSON.stringify(e)}));s=$.cookie("Usr");s&&(s=angular.fromJson(s),a=s.Token);l=!1;h=$.cookie("cal_s");typeof h=="undefined"&&(h=Vex.Util.guid(),l=!0);c=new Date;c.setTime(c.getTime()+12e5);Vex.OneTrust.GetOptinChoices().C0004==!0&&$.cookie("cal_s",h,{expires:c,path:"/"});l==!0&&f({scope:"SESSION",type:"EVENT",code:"START",data:JSON.stringify({extended:!0})});f(o);u()},e=this;return i.logEvent=function(n,t,i,u){i===void 0&&(i=null);u===void 0&&(u=null);r(n,"EVENT",t,i,u)},i.logAction=function(n,t,i,u){i===void 0&&(i=null);u===void 0&&(u=null);r(n,"ACTION",t,i,u)},i.logView=function(n,t,i){t===void 0&&(t=null);i===void 0&&(i=null);r(n,"VIEW",n,t,i)},i.logViewVertical=function(n,t,i,u){i===void 0&&(i=null);u===void 0&&(u=null);r(n,"VIEW",t,i,u)},i}])}(angular.module("shop")),function(n){var t;(function(t){function e(){if($.cookie("Usr")&&!env.touch){var n=$(this);f(n);$(".nav-box").hoverIntent(u,function(){})}}function l(){$(".nav-box").hoverIntent(u,function(){})}function u(){var n=$(this);f(n)}function f(t){t.parents().hasClass("minimal")||t.hasClass("nav-no-vertical")||(activeNavBox!=null&&activeNavBox.removeClass("active"),activeNavBox=t,activeNavBox.addClass("active"),n.Header.showHeaderPanelBox(t.data("contentid"),!0),headerHoverState||o())}function o(){$("#header-panel-container").addClass("active");$(".header-overlay,.header-content").addClass("active");$("#header-panel-container").trigger("panelOpened");$("#header-panel-container").removeClass("inactive");n.Header.RecalculateFreeShippingOverlapPosition();$("#header").mouseleave(n.Header.leaveHeader);$(".header-overlay").mouseover(n.Header.leaveHeader);headerHoverState=!0}function a(){if(blockHover){var t=n.Header.getDefaultHeaderElement();n.Header.showHeaderPanelBox(t,!0);n.Header.setActiveDefaultPanel();$(".header-overlay,.header-content").removeClass("active")}else r()}function r(t){t===void 0&&(t=!1);t&&(!t||$("#header").hasClass("hover"))||($("#header-panel-container").addClass("inactive"),$(".header-overlay,.header-content").removeClass("active"),$("#header-panel-container").removeClass("active"),n.Header.RecalculateFreeShippingOverlapPosition(),headerHoverState=!1,i(),$(".nav-box").unbind("mouseenter"),$(".nav-box").hoverIntent(e,function(){}))}function v(){env.smallscreen&&$(window).scrollTop()>75&&$(window).scrollTop(75)}function s(){$("#header-panel-container").addClass("active");$(".header-overlay,.header-content").addClass("active");$("#header-panel-container").trigger("panelOpened");$("#header-panel-container").removeClass("inactive");n.Header.RecalculateFreeShippingOverlapPosition()}function y(t){var i=$("#header");i.hasClass("minimal")||(i.toggleClass("sticky",t>74),$("#header-area").toggleClass("sticky",t>74));$("#nav-box-cart").hasClass("hasitems")||$("#navbar-top .nav-box .new-feature").toggleClass("hide",t>74);$("#travel-header").toggleClass("sticky",t>324);n.Header.RecalculateFreeShippingOverlapPosition();n.Header.TicketCroutonController.handleCloseButtonVisibility(t>74)}function p(n){$.ajax({url:"/"+n+"/ClientDictionary/GetVerticalsData",dataType:"json"}).done(function(n){for(var t,i,e,f,r=0;r<n.length;r++){t=n[r];i=10;t.EndingSalesData.length>0?(e=t.CurrentSalesData.length+t.EndingSalesData.length,f=e+1,f>i*2&&(i=Math.ceil(f/2))):t.CurrentSalesData.length>i*2&&(i=Math.ceil(t.CurrentSalesData.length/2));var u=$("#header-panel-content").find("[data-vertical='"+t.VerticalName.toLowerCase()+"']"),o=u.find(".first-column"),s=u.find(".second-column-current-sales"),h=u.find(".ending-sales-rows"),c=u.find(".third-column");(t.EndingSalesData.length!=0||t.CurrentSalesData.length!=0)&&o.find(".no-sales-message").hide()}})}function w(n){blockHover=n}function b(){n.Header.openHeaderPanel();n.Header.setBlockHover(!0);$(".header-overlay,.header-content").removeClass("active")}function i(t){if(t===void 0&&(t=null),activeNavBox&&activeNavBox.removeClass("active"),t)activeNavBox=$("#nav-box-"+t),n.Header.showHeaderPanelBox(t,!1);else{var i=n.Header.getDefaultHeaderElement();i=="cart"?($("#nav-box-cart").addClass("hasitems"),$(".nav-box .new-feature").addClass("hide")):($("#nav-box-cart").addClass("empty"),$(".nav-box .new-feature").removeClass("hide"));activeNavBox=$("#nav-box-"+i);n.Header.showHeaderPanelBox(i,!1)}activeNavBox.addClass("active")}function k(){var t="account";return n.Ogone.ThankYou.IsComplete?t="orders":n.cart&&n.cart.hasItems()?t="cart":$("#nav-box-cart").hasClass("expired")?t="cart":n.BrandAlert.BrandAlertHeader.IsActive&&(t="favorites"),t}function d(t,i,r){var u=n.Util.slug(i.Name);return i.Type=="T"?"/"+t+"/"+u+"-qt"+i.Id+"#/o":r?"/"+t+"/"+u+"-qs"+i.Id+"#/o":"/"+t+"/"+u+"-qs"+i.Id+"#/f"}function g(n){n?$(".wait-overlay").show():$(".wait-overlay").hide()}function nt(n){$.cookie("vert",(n||"all").toLowerCase(),{path:"/"})}function tt(t,i){i===void 0&&(i=!1);n.Header.resetHeaderCartNavigation();n.Header.setActiveDefaultPanel();n.Header.showHeaderPanelBox("cart",!0);t?($("#header-panel-content .cart-pane-container .cart-item").first().addClass("validation-valid"),$("#header-panel-content .cart-pane-container").addClass("add-item-success"),$(".cart-pane-container").hasClass("expiring")&&$("#header-panel-content .cart-message-expiring").hide()):($("#header-panel-content .cart-pane-container .cart-item").first().addClass("validation-invalid"),$("#header-panel-content .cart-pane-container").addClass("add-item-failed"),$(".cart-pane-container").hasClass("expiring")&&$("#header-panel-content .cart-message-expiring").hide(),i&&$("#header-panel-content .cart-data").addClass("empty"))}function it(){$("#header-panel-content .cart-pane-container .cart-item").first().removeClass("validation-invalid");$("#header-panel-content .cart-pane-container").removeClass("add-item-failed");$(".cart-pane-container").hasClass("expiring")?$("#header-panel-content .cart-message-expiring").show():(r(!0),i())}function rt(){$("#header-panel-content .cart-pane-container .cart-item").first().removeClass("validation-valid");$("#header-panel-content .cart-pane-container").removeClass("add-item-success");$(".cart-pane-container").hasClass("expiring")?$("#header-panel-content .cart-message-expiring").show():(r(!0),i())}function ft(n){ut.html("("+n+")")}function et(){$(".cart-pane-container").removeClass("expiring");$("#nav-box-cart").removeClass("expiring");n.Util.setPageTitle(n.PageTitles.Default);i("cart");n.Header.setBlockHover(!1)}function ot(){$(".cart-pane-container").addClass("expiring");$("#nav-box-cart").addClass("expiring");n.Util.setPageTitle(n.PageTitles.CartExpire);i("cart")}function st(){$("#header-panel-content .cart-message-expiring").hide();$(".cart-pane-container").addClass("expired");$("#nav-box-cart").addClass("expired");$(".expired-cart-panel-bottom").addClass("expired");i("cart");n.Header.lockHeaderOpen()}function ht(){$("#nav-box-cart").removeClass("expired");$("#nav-box-cart").removeClass("expiring");$(".cart-pane-container").removeClass("expired");$(".cart-pane-container").removeClass("expiring");n.Util.setPageTitle(n.PageTitles.Default);c();n.Header.setBlockHover(!1)}function h(){$("#nav-box-cart").removeClass("hasitems");$(".nav-box .new-feature").removeClass("hide");$("#nav-box-cart").addClass("empty");n.Util.setPageTitle(n.PageTitles.Default);n.Header.setBlockHover(!1);r()}function ct(){var n=$("#nav-box-cart");n.hasClass("empty")&&n.removeClass("empty")}function c(){cartScrollListHelper.resetList()}function lt(){var n=$(".cart-pane-container");n.find(".cart-data").removeClass("empty");n.find(".cart-empty-message").addClass("hide")}function at(){var n=$(".cart-pane-container");n.find(".cart-data").addClass("empty");n.find(".cart-empty-message").removeClass("hide")}function vt(){i("orders");n.Header.lockHeaderOpen()}function yt(t,i){if(i===void 0&&(i=!0),$("#header-panel-container").find(".header-panel-box").each(function(){$(this).css("display","none")}),t){var r=$("#header-panel-container .header-panel-box#"+t);r.css("display","block");i&&n.Header.openHeaderPanel()}}function pt(n){s();setTimeout(function(){r()},n*1e3)}function wt(t){h();t?($(".cart-pane-container").addClass("revivemail-soldout"),$(".expired-cart-panel-bottom").addClass("revivemail-soldout")):($(".cart-pane-container").addClass("revivemail-available"),$(".expired-cart-panel-bottom").addClass("revivemail-available"));$("#nav-box-cart").addClass("expired");i("cart");n.Header.lockHeaderOpen()}function bt(n){var t=$("span.account-first-name");t!=null&&(n.length>10&&(n=n.substr(0,9)+"..."),t.text(n))}t.hoverIntentHandler=e;t.initHoverIntentHandlers=l;t.hoverHandler=u;t.hoverAction=f;t.activateHeaderHoverState=o;t.leaveHeader=a;t.closeHeaderPanel=r;t.scrollWindowUpOnSmallscreenDevices=v;t.openHeaderPanel=s;t.handleStickyHeader=y;t.loadVerticalsData=p;t.setBlockHover=w;t.lockHeaderOpen=b;t.setActiveDefaultPanel=i;t.getDefaultHeaderElement=k;t.getOpenSaleUrl=d;t.setWaitOverlay=g;t.setVertical=nt;t.displayUpdatedCart=tt;t.addToCartFailedCleanup=it;t.addToCartSuccessCleanup=rt;var ut=$(".cart-amount");t.updateHeaderCartItemsCount=ft;t.ensureNonExpiringCartState=et;t.enterCartExpiringState=ot;t.enterCartExpiredState=st;t.prepareFreshHeaderCartPane=ht;t.setCartNavBoxEmptyState=h;t.removeCartNavBoxEmptyState=ct;t.resetHeaderCartNavigation=c;t.showActiveCartPanel=lt;t.hideActiveCartPanel=at;t.showOgoneThankyou=vt;t.showHeaderPanelBox=yt;t.openHeaderPanelTimed=pt;t.enterReviveMailState=wt;t.setFirstNameInHeader=bt})(t=n.Header||(n.Header={}))}(Vex||(Vex={}));var headerHoverState=!1,blockHover=!1,activeNavBox=null,favoritesScrollListHelper,cartScrollListHelper,reviveScrollListHelper,deliveryScrollListHelper;$(document).ready(function(){var n,t,i;try{var r=$.parseJSON($.cookie("Usr")),u=r.Name,f=r.Gender;u!=null&&Vex.Header.setFirstNameInHeader($.base64Decode(u));f=="M"&&($("#nav-box-account>.icon").removeClass("i-woman"),$("#nav-box-account>.icon").addClass("i-man"))}catch(e){}$("#header").hover(function(){$(this).toggleClass("hover");Vex.Header.RecalculateFreeShippingOverlapPosition()});Vex.Header.setActiveDefaultPanel();$(".nav-box").hoverIntent(Vex.Header.hoverIntentHandler,function(){});$("#header-panel-container").hoverIntent(function(){!headerHoverState&&$.cookie("Usr")&&Vex.Header.activateHeaderHoverState()},function(){});$(".header-pane-block-hover").mouseover(function(){headerHoverState=!0;$("#header").mouseleave(Vex.Header.leaveHeader);$(".header-overlay").mouseover(Vex.Header.leaveHeader)});Vex.Header.loadVerticalsData(Vex.Settings.Culture);cartScrollListHelper=new Vex.ScrollListHelper("#header-panel-content .cart-items",".cart-item",1,!1,296);reviveScrollListHelper=new Vex.ScrollListHelper("#header-panel-content .revived-items",".revived-item-wrapper",1,!1,296);$(document).on("click","#header-panel-content .cart-nav-container .cart-nav",null,function(){cartScrollListHelper.scrollListNavigate($(this));reviveScrollListHelper.scrollListNavigate($(this))});Vex.BrandAlert.initiateBrandAlertData();n=$.Event("brandAlertDataLoaded");Vex.BrandAlert.isDataLoaded()?$("body").trigger(n):(t=0,i=setInterval(function(){Vex.BrandAlert.isDataLoaded()&&($("body").trigger(n),clearInterval(i));t++;t>=5&&clearInterval(i)},1e3));deliveryScrollListHelper=new Vex.ScrollListHelper("#header-panel-content .delivery-items",".delivery-item",1,!1,null);$(document).on("click","#header-panel-content .delivery-nav-container .delivery-nav",null,function(){deliveryScrollListHelper.scrollListNavigate($(this))});favoritesScrollListHelper=new Vex.ScrollListHelper(".favorite-pane-container-wrapper .brand-alert-logos",".brand-alert-logo",1,!1,252);$(document).on("click","#header-panel-content .favorite-pane-container-wrapper .brand-alert-nav",null,function(){favoritesScrollListHelper.scrollListNavigate($(this))});$("input, textarea").on("focus",function(){var n=$("#header"),t=navigator.userAgent.match(/iPad/i)!=null,i=navigator.platform.indexOf("iPhone")!=-1||navigator.platform.indexOf("iPod")!=-1;(t||i)&&n.addClass("scrollFix")});$("input, textarea").on("blur",function(){var n=$("#header");n.removeClass("scrollFix")});env.smallscreen&&($("#header").addClass("smallscreen"),$("body").addClass("smallscreen"))});$(document).on("click",".delivery-item",null,function(){$(this).find("a.hiddenlink")[0].click()});$(document).on("click",".action-close-header",null,function(){Vex.Header.closeHeaderPanel()});$(document).on("click",".vertical-sale-item>a",null,function(){var n=$(this).data("vertical");Vex.Header.setVertical(n);window.location.pathname+window.location.hash==$(this).attr("href")&&window.location.reload()});$(document).on("click",".nav-vertical",null,function(){var n=$(this).data("vertical");Vex.Header.setVertical(n)});$(document).on("click","#header .btn-checkout",function(){window.location.href=$(this).data("url")});$(document).on("click",".lightbox-return-segment-item-limit .btn-primary",function(){window.location.href=$("#header .btn-checkout").data("url")});$(document).on("panelOpened","#header-panel-container",null,function(){cartScrollListHelper.resetList();$(".delivery-item.is-snap").length>0?deliveryScrollListHelper.resetList(3):deliveryScrollListHelper.resetList()});lastScrollPosition=$(window).scrollTop();headerOffset=94;$(window).scroll(function(){var n=$(window).scrollTop();env.smallscreen||Vex.Header.handleStickyHeader(n);Vex.SideBar.trigger(n)}),function(n){var t;(function(t){var i=function(){function t(t,i,r){t.verticals=[];i.isEnabled("travel-vertical").then(function(i){r.getSales().then(function(u){var f=_.filter(u,r.verticalFilters.thematic),e;f=_.filter(f,function(n){return n.accessMode!=2});e=f.length>0;r.getVerticals().then(function(r){var r=_.sortBy(r,["rank"]);e||(r=_.filter(r,function(n){return n.verticalCV!="THEMATIC"}));i||(r=_.filter(r,function(n){return n.verticalCV!="TRAVEL"}));r=_.map(r,function(n){return n.verticalCVLocal=n.verticalCV=="ALL"?"":n.verticalCVLocal,n});t.verticals=r;setTimeout(n.Header.initHoverIntentHandlers)})})})}return t.$inject=["$scope","$features","$sales"],t}();t.HeaderVerticalController=i})(t=n.Header||(n.Header={}))}(Vex||(Vex={}));shopModule.controller("Vex.Header.HeaderVerticalController",Vex.Header.HeaderVerticalController),function(n){var t;(function(t){function r(t,i,r,u,f,e,o){if($("#fs-overlap").data("active",t),t?$("#fs-overlap").css("display","block"):$("#fs-overlap").css("display","none"),$("#fs-overlap").toggleClass("fsAchieved",i),$("#fs-overlap .msg.achieved").toggleClass("limited",!!r),i&&r){var s=$("#fs-overlap .msg.achieved");s.html(s.data("limitedText").replace("{expiration}",n.Util.getDateInddmmyyyyFormat(r)))}$("#fs-overlap").toggleClass("fsFrmCartMerge",f);$("#fs-overlap .amount-to-threshold").html(n.Util.getPriceHtml(u));i||e==null?$("#fs-overlap").toggleClass("fsNotAchieves",!i):(e=="FreeShipping"&&(o?($("#fs-overlap").toggleClass("fccSignupFS",!0),$("#fs-overlap").removeClass("fccSignupFSNotAchieved")):($("#fs-overlap").toggleClass("fccSignupFSNotAchieved",!0),$("#fs-overlap").removeClass("fccSignupFS"))),e=="Gift"&&(o?($("#fs-overlap").toggleClass("fccSignupDiscount",!0),$("#fs-overlap").removeClass("fccSignupDiscountNotAchieved")):($("#fs-overlap").toggleClass("fccSignupDiscountNotAchieved",!0),$("#fs-overlap").removeClass("fccSignupDiscount"))));n.Header.RecalculateFreeShippingOverlapPosition()}function u(){if($("#fs-overlap").data("active")){var n=$("#header").hasClass("sticky");$("#fs-overlap-wrapper").toggleClass("sticky",n);$("#header-panel-container").hasClass("inactive")?$("#fs-overlap").css("display","block"):$("#fs-overlap").css("display","none")}}var i=function(){function i(i,r,u,f){function s(t,r){$.getJSON("/"+n.Settings.Culture+t).done(function(t){var u=t.items;i.$apply(function(){var s,h,o,e,f;for(i.revivedItems=[],s=0,o=0;o<u.length;o++)s+=u[o].QuantityAvailable;if(h=!0,s!=0||r||(h=!1),h){for(o=0;o<u.length;o++)e=u[o],f=new n.CartRevivalItem,f.CatalogPrice=e.CatalogPrice,f.ShopPrice=e.ShopPrice,f.ModelId=e.ModelId,f.ProductId=e.ProductId,f.QuantityAvailable=e.QuantityAvailable,f.QuantityInCart=e.QuantityInCart,f.IsReserved=e.IsReserved,f.ModelName=e.ModelName,f.HideCatalogPrice=e.HideCatalogPrice,i.revivedItems.push(f);setTimeout(function(){i.revivedItems.length>0&&(r?(n.Header.enterReviveMailState(s==0),i.initializeCartReviveTimer(t.timer,!0)):(n.Header.enterCartExpiredState(),i.initializeCartReviveTimer(t.timer,!1)))},0)}});n.AnalyticsData.cartModified()})}function h(){if(n.cart.refreshCart(),i.cart=r.getCart(),i.revivedItems=[],$(".cart-pane-container").removeClass("revivemail-available"),$(".cart-pane-container").removeClass("revivemail-soldout"),$("#nav-box-cart").removeClass("expired"),i.cart.Items.length==0)n.Header.setCartNavBoxEmptyState();else{$("#nav-box-cart").removeClass("empty");$("#nav-box-cart").addClass("hasitems");$(".nav-box .new-feature").addClass("hide");r.onCartEvent("cartStartTimer",[])}}function e(){n.Storage.getUserData("acc",function(t){var u;if(i.freeShippingExpiration=n.Util.jsonDateTimeReviver(null,t.FreeShippingSignupExpiration),i.couponCodeAdvantageTypeCV=t.CouponCodeAdvantageTypeCV,i.couponCode=t.CouponCode,i.couponCodeAmount=t.CouponCodeAmount,i.couponCodeThresholdAmount=t.CouponCodeThresholdAmount,i.freeShippingExpirationDate=t.FreeShippingExpirationDate,i.cart!=undefined&&i.cart!=null&&i.cart.HasPhysicalProducts){var f=i.cart.HasUncFreeShpFCart||i.cart.HasCondFreeShpIsReach||i.cart.HasCondFreeShpNotReach||t.CouponCodeAdvantageTypeCV!=null,e=i.cart.HasUncFreeShpFCart||i.cart.HasCondFreeShpIsReach,o=i.cart.AmountToReachCondFreeShp,r=i.couponCodeThresholdAmount<i.cart.SubTotal;i.signupAchieved=r;r?i.rest="":(u=i.couponCodeThresholdAmount-i.cart.SubTotal,i.rest=u.toFixed(2));n.Header.RecalculateFreeShippingOverlapState(f,e,i.freeShippingExpiration,o,i.cart.FreeShpFrmCartMerge,i.couponCodeAdvantageTypeCV,r,i.couponCodeThresholdAmount)}else n.Header.RecalculateFreeShippingOverlapState(!1,!1,null,0,!1,"",!1,0)})}i.culture=n.Settings.Culture;i.cart=r.getCart();i.cartError="";i.mockedItemsInCart=0;i.revivedItems=[];i.cart.hasItems()||n.Header.setCartNavBoxEmptyState();$("#cart-empty-fs").length==0&&n.Storage.getUserData("acc",function(n){n!==undefined&&n!==null&&(n.LoyaltySegmentCV=="G"?($("#cart-empty-normal").hide(),$("#cart-empty-gold").show()):n.LoyaltySegmentCV=="S"?($("#cart-empty-normal").hide(),$("#cart-empty-silver").show()):(n.LoyaltySegmentCV=="U"||n.LoyaltySegmentCV=="PGP")&&($("#cart-empty-normal").hide(),$("#cart-empty-ultimate").show()))});n.Storage.getUserData("acc",function(n){i.$apply(function(){n!==undefined&&n!==null&&(i.loyaltySegment=n.LoyaltySegmentCV?n.LoyaltySegmentCV:"N")})});i.getPriceHtml=function(t,i,r,u){return(i===void 0&&(i=""),r===void 0&&(r=""),u===void 0&&(u=!1),t==undefined)?"&nbsp;":n.Util.getPriceHtml(t,i,r,u)};i.$on("cartItemAdded",function(u,e){n.Header.scrollWindowUpOnSmallscreenDevices();r.onCartEvent("cartStartTimer",[]);i.revivedItems=[];n.Header.removeCartNavBoxEmptyState();i.$apply(function(){var u,o;for(i.cart=r.getCart(),i.cartError="",i.cart.Items.length==1&&t.prepareFreshHeaderCartPane(),u=0;u<i.cart.Items.length;u++)if(i.cart.Items[u].ModelId==e.modelId&&i.cart.Items[u].Quantity!=e.quantity){o=n.Util.clone(i.cart.Items[u]);o.Quantity=e.quantity;i.cart.Items[u].Quantity-=e.quantity;i.cart.Items.unshift(o);i.mockedItemsInCart=1;break}setTimeout(function(){n.Header.displayUpdatedCart(!0);n.Header.HeaderCartTimerController.clickOverlayToLeave();f(function(){i.$apply(function(){i.cart=r.getCart();i.mockedItemsInCart=0});n.Header.addToCartSuccessCleanup()},5e3)},0)})});i.$on("cartItemAddFailed",function(u,e){n.Header.removeCartNavBoxEmptyState();n.Header.scrollWindowUpOnSmallscreenDevices();i.revivedItems=[];setTimeout(function(){i.$apply(function(){var h,o,s,u;i.cart=r.getCart();h=i.cart.Items.length==0;o=new n.CartItem;o.CatalogPrice=e.catalogPrice;o.ModelName=e.modelName;o.ModelId=e.modelId;o.Quantity=e.quantity;o.ShopPrice=e.shopPrice;o.ProductId=e.productId;o.IsMock=!0;o.HideCatalogPrice=e.HideCatalogPrice;i.cart.Items.unshift(o);i.mockedItemsInCart=1;i.cartError=e.error;h&&t.prepareFreshHeaderCartPane();e.errorData!=undefined&&e.errorData!=null&&(s=e.errorData,s!=undefined&&s!=null&&(u=$("#lightbox-return-segment-item-limit .original-translation").html(),u!=undefined&&u!=null&&(u=u.replace(/{FirstName}/g,s.FirstName),u=u.replace(/{LastName}/g,s.LastName),u=u.replace(/{QuantitiesAdded}/g,s.QuantitiesAdded),u=u.replace(/{QuantitiesInCart}/g,s.QuantitiesInCart),u=u.replace(/{QuantitiesAllowed}/g,s.QuantitiesAllowed),u=u.replace(/{QuantitiesInCartIfAllowed}/g,s.QuantitiesInCartIfAllowed),$("#lightbox-return-segment-item-limit .content").html(u),n.Util.showLightbox(570,330,n.LightboxModalMode.Semi,{message:$("#lightbox-return-segment-item-limit").clone()}),$(".lightbox-return-segment-item-limit .btn-primary").toggle($(".btn-checkout").is(":visible")))));setTimeout(function(){n.Header.displayUpdatedCart(!1,h);f(function(){i.$apply(function(){i.cart=r.getCart();for(var t=i.cart.Items.length-1;t>=0;t--)i.cart.Items[t].IsMock&&i.cart.Items[t].IsMock==!0&&i.cart.Items.splice(t,1);i.mockedItemsInCart=0;i.cart.Items.length==0&&n.Header.setCartNavBoxEmptyState();n.Header.addToCartFailedCleanup()})},1e4)},0)})},0)});i.$on("cartUpdated",function(t,u){setTimeout(function(){i.$apply(function(){i.cart=r.getCart();var t=i.cart.Items.length;u&&(t=u.cartItemCount);setTimeout(function(){t!=0?n.Header.updateHeaderCartItemsCount(t):(n.Header.setCartNavBoxEmptyState(),n.Header.setActiveDefaultPanel())},0)})},0)});i.initializeCartReviveTimer=function(n,t){var r=n;i.cartReviveTimer=setInterval(function(){$(".cart-pane-container .expire-box .seconds-remaining").html(r.toString());r=r-1;r<0&&(t&&i.reviveMailSaleId?i.reviveMailCart(!1,i.reviveMailSaleId):i.reviveExpiredCart(!1))},1e3)};i.$on("cartExpired",function(){$("#nav-box-cart").removeClass("grace-period");$(".cart-pane-container,#nav-box-cart,.expired-cart-panel-bottom").removeClass("expiring");$(".cart-pane-container,#nav-box-cart,.expired-cart-panel-bottom").addClass("expired");$("#nav-box-cart").removeClass("hasitems");$(".nav-box .new-feature").removeClass("hide");$("#nav-box-cart").addClass("empty");i.initializeCurrentCartRevival();n.Header.setWaitOverlay(!0)});i.initializeCurrentCartRevival=function(){var t="/"+n.Settings.Culture+"/Cart/ExpireCart";$.ajax({type:"POST",url:t,data:JSON.stringify({cartId:this.Id}),contentType:"application/json"}).done(function(t){var o=t.items,s,e,f,u;for(n.cart.refreshCart(),i.cart=r.getCart(),i.revivedItems=[],s=0,e=0;e<o.length;e++)s+=o[e].QuantityAvailable;if(s>0)for(e=0;e<o.length;e++)f=o[e],u=new n.CartRevivalItem,u.CatalogPrice=f.CatalogPrice,u.ShopPrice=f.ShopPrice,u.ModelId=f.ModelId,u.ProductId=f.ProductId,u.QuantityAvailable=f.QuantityAvailable,u.QuantityInCart=f.QuantityInCart,u.IsReserved=f.IsReserved,u.ModelName=f.ModelName,u.HideCatalogPrice=f.HideCatalogPrice,i.revivedItems.push(u);n.Header.enterCartExpiredState();i.$apply(function(){setTimeout(function(){n.Header.setWaitOverlay(!1);i.initializeCartReviveTimer(t.timer,!1)},0)})})};i.closeEmptyRevivePanel=function(){return h(),setTimeout(function(){n.Header.setWaitOverlay(!1);n.Header.setBlockHover(!1);n.Header.setActiveDefaultPanel();n.Header.closeHeaderPanel()},0),!1};i.reviveExpiredCart=function(t){clearInterval(i.cartReviveTimer);(t===!0||t===!1)&&(n.Header.setWaitOverlay(!0),$.post("/"+n.Settings.Culture+"/Cart/ReviveCart",{reviveAccepted:t}).done(function(){i.$apply(function(){if(n.cart.refreshCart(),i.cart=r.getCart(),i.revivedItems=[],$(".cart-pane-container").removeClass("expired"),$("#nav-box-cart").removeClass("expired"),i.cart.Items.length==0)n.Header.setCartNavBoxEmptyState();else{$("#nav-box-cart").removeClass("empty");$("#nav-box-cart").addClass("hasitems");$(".nav-box .new-feature").addClass("hide");r.onCartEvent("cartStartTimer",[])}if(t)r.onCartEvent("cartRevived",[]);setTimeout(function(){n.Header.setWaitOverlay(!1);n.Header.setBlockHover(!1);n.Header.setActiveDefaultPanel();n.Header.closeHeaderPanel()},0)});n.AnalyticsData.cartModified()}))};i.reviveMailCart=function(t,u){clearInterval(i.cartReviveTimer);(t===!0||t===!1)&&(n.Header.setWaitOverlay(!0),$.post("/"+n.Settings.Culture+"/Cart/ReviveMailCart/"+(u||0),{reviveAccepted:t}).done(function(){i.$apply(function(){if(h(),t)r.onCartEvent("cartRevived",[]);setTimeout(function(){n.Header.setWaitOverlay(!1);n.Header.setBlockHover(!1);n.Header.setActiveDefaultPanel();n.Header.closeHeaderPanel()},0);n.AnalyticsData.cartModified()})}))};i.productDictionary=n.Dictionary.products;i.productDetailUrl=function(t,i){return i===void 0&&(i=!1),i?"/"+n.Settings.Culture+"/Account/LoyaltyPoints":n.Util.productDetailUrl(t)};var o=$.cookie("RevM"),c=n.Storage.getStoredCookie("RevC",!1);if(o)$.cookie("RevM","",{path:"/",expires:new Date(1900,1,1)}),o!=""&&(i.reviveMailSaleId=o,s("/Cart/GetReviveMailData/"+i.reviveMailSaleId,!0));else if(i.cart.Items.length>0)r.onCartEvent("cartStartTimer",[]);else c||s("/Cart/GetReviveCartData",!1);$(".stealth-cart").length!=0&&setTimeout(function(){$("#nav-box-cart").addClass("empty");$("#nav-box-cart").removeClass("hasitems")},0);i.$watch("cart.HasPhysicalProducts",e);i.$watch("cart.HasUncFreeShpFCart",e);i.$watch("cart.HasCondFreeShpIsReach",e);i.$watch("cart.HasCondFreeShpNotReach",e);i.$watch("cart.Total",e)}return i.$inject=["$scope","$shopDataService","$rootScope","$timeout"],i}();t.HeaderCartController=i;t.RecalculateFreeShippingOverlapState=r;t.RecalculateFreeShippingOverlapPosition=u})(t=n.Header||(n.Header={}))}(Vex||(Vex={})),function(n){var t;(function(t){var i=function(){function i(i,r){var u=!1,f=!1,e;$(".stealth-cart").length==0&&i.$on("cartStartTimer",function(){$.getJSON("/"+n.Settings.Culture+"/Cart/GetActiveCartExpiration",null,function(t){t.HasCart&&(i.remainingTimeMinutes=t.ExpirationMinutes,i.remainingTimeSeconds=t.ExpirationSeconds,i.cartExpirationFinalCall=t.ExpirationFinalCall,u=t.GracePeriod,i.itemsInCart=t.ItemsInCart,$(".cart-timer-seperator").html(":"),n.Header.ensureNonExpiringCartState(),f||(i.updateCartTimer(),e=setInterval(i.updateCartTimer,1e3),f=!0),n.Header.updateHeaderCartItemsCount(i.itemsInCart))})});i.updateCartTimer=function(){if(i.remainingTimeSeconds<=0&&i.remainingTimeMinutes<=0){if(u){clearInterval(e);f=!1;u=!1;r.onCartEvent("cartExpired",[]);return}u=!0;i.remainingTimeSeconds=59}i.remainingTimeSeconds--;u&&(blockHover||(t.enterCartExpiringState(),n.Header.lockHeaderOpen(),$("#nav-box-cart").addClass("grace-period")));i.remainingTimeSeconds<0&&(i.remainingTimeSeconds=59,i.remainingTimeMinutes--);var o=moment(new Date(2e3,1,1,0,i.remainingTimeMinutes,i.remainingTimeSeconds)).format("mm:ss");i.$apply(function(){i.visualRemainingMinutesDec=o[0]=="0"?"":o[0];i.visualRemainingMinutes=o[1];i.visualRemainingSecondsDec=o[3];i.visualRemainingSeconds=o[4]});i.remainingTimeMinutes<i.cartExpirationFinalCall&&(blockHover||i.enteredExpiringState||(t.enterCartExpiringState(),i.enteredExpiringState=!0));i.remainingTimeMinutes!=i.cartExpirationFinalCall||i.remainingTimeSeconds!=0||u||(n.Header.openHeaderPanelTimed(5),n.Header.HeaderCartTimerController.clickOverlayToLeave())}}return i.clickOverlayToLeave=function(){$(".header-overlay").unbind("mouseover").off("mouseover").each(function(n,t){t.onmouseover=null}).click(n.Header.leaveHeader)},i.$inject=["$scope","$shopDataService"],i}();t.HeaderCartTimerController=i})(t=n.Header||(n.Header={}))}(Vex||(Vex={}));shopModule.controller("Vex.Header.HeaderCartController",Vex.Header.HeaderCartController);shopModule.controller("Vex.Header.HeaderCartTimerController",Vex.Header.HeaderCartTimerController),function(n){var t;(function(t){var i=function(){function t(t,i,r,u,f){var e=this;e.loadAccData(t,u,f);t.$on("refreshAccountPaneData",function(){n.Storage.removeItemLF("acc");e.loadAccData(t,u,f)})}return t.showHeaderContent=function(t,i,r,u){t.$apply(function(){var o=new Date,f,e;if(i!==undefined&&i!==null){if(t.culture=n.Settings.Culture,t.friends=i.Friends,t.orders=i.Orders,t.coupons=i.Coupons,t.displayCoupons=n.Util.getPriceHtml(t.coupons),t.credit=i.Credit,t.displayCredit=n.Util.getPriceHtml(t.credit),t.freeShipping=i.FreeShipping,t.freeShippingSignup=i.FreeShippingSignup,i.FreeShippingSignupExpiration=n.Util.jsonDateTimeReviver(null,i.FreeShippingSignupExpiration),f=new Date,f=new Date(f.getFullYear(),f.getMonth(),f.getDate()),t.freeShippingExpirationDays=i.FreeShippingSignupExpiration?Math.ceil((i.FreeShippingSignupExpiration.getTime()-f.getTime())/864e5):null,t.voucherExpInDays=i.VoucherExpInDays,t.hasUnconditionalFreeShippingWithSignUpCoupon=i.HasUncFrShpWithSignUpCoupon,t.CouponCodeAdvantageTypeCV=i.CouponCodeAdvantageTypeCV,t.CouponCode=i.CouponCode,t.CouponCodeAmount=i.CouponCodeAmount,t.CouponCodeThresholdAmount=i.CouponCodeThresholdAmount,i.CouponCodeValidUntil!=null&&(t.CouponCodeValidUntil=i.CouponCodeValidUntil.replace(/[^0-9 +]/g,"")),i.FreeShippingSignupExpiration!==null&&(t.FreeShippingExpirationDate=n.Util.jsonDateTimeReviver(null,i.FreeShippingSignupExpiration).getTime()),t.hasUnconditionalLimitedFreeShippingWithSignUpCoupon=i.HasUncLimFrShpWithSignUpCoupon,t.hasOtherUnconditionalFreeShipping=i.HasOthUncFrShp,t.hasConditionalFreeShippingForLoyaltySegment=i.HasCondFrShpForLoyaltySegm,t.loyaltyVoucherNewIds=i.LoyaltyVoucherNewIds,t.passwordHelper=null,e=$.cookie(n.authentication.PasswordHelperCookieName),e)try{t.passwordHelper=JSON.parse($.base64Decode(e))}catch(s){}if(!t.passwordHelper,t.loyaltyVoucherNewIds.length>0)r.onEvent("announceVouchers",t.loyaltyVoucherNewIds)}t.endOfYearWarning=o.getMonth()>=9;$(".header-panel-box#account .loyalty-summary-container").css("display","block");t.totalPoints=i.TotalPoints;t.loyaltyVoucherTotalQuantity=i.LoyaltyVoucherTotalQuantity;t.loyaltySegmentCV=i.LoyaltySegmentCV?i.LoyaltySegmentCV:"N";t.loyaltySegmentName=n.Util.getSegmentName(t.loyaltySegmentCV);t.nextLoyaltySegmentCV=i.NextLoyaltySegmentCV;t.nextLoyaltySegmentName=n.Util.getSegmentName(t.nextLoyaltySegmentCV);t.earlyAccessTicketQuantity=i.EarlyAccessTicketQuantity;t.currentSegmentPointsMin=i.CurrentSegmentPointsMin;t.currentSegmentPointsMax=i.CurrentSegmentPointsMax;t.isAlmostNext=i.IsAlmostNext;t.isStatusKept=i.TotalPoints>=i.CurrentSegmentPointsMin;t.nextCycle=(new Date).getFullYear()+1;$.cookie("LS",t.loyaltySegmentCV,{expires:365,path:"/"});n.AnalyticsData.LoyaltySegment=t.loyaltySegmentCV;t.snapPlusWarning=n.Header.AccountPaneController.getSnapPlusWarningInfo(i.LoyaltySubscriptionData,u)})},t.getSnapPlusWarningInfo=function(t,i){if(t!=null&&(t.IsExpired||t.IsExpirationWarning)&&t.AllowRenewal&&!t.IsRenewed){var r=t.IsExpired?"expired":"expiring";return(r!="expired"||t.ExpiredPopupShownDateTime)&&(r!="expiring"||t.ExpiringPopupShownDateTime)||n.Header.AccountPaneController.handleSnapPlusWarningPopup(r,t,i),r}return"no-warning"},t.handleSnapPlusWarningPopup=function(t,i){if($.cookie("Usr")){var r=$("#loyalty-subscription-"+t+"-popup");r.length&&(n.Util.showLightbox(750,460,n.LightboxModalMode.Semi,{message:r}),$.ajax({method:"POST",url:"/"+n.Settings.Culture+"/Account/MarkCurrentLoyaltySubscriptionPopupAsShown",data:{currentSubscriptionId:i.CurrentSubscriptionId,isExpired:i.IsExpired}}),n.Storage.removeItemLF("acc"))}},t.prototype.loadAccData=function(t,i,r){n.Storage.getUserData("acc",function(u){var e,f,o;if(!u.LoyaltySegmentCV){n.Storage.checkUserDataCookie();n.Storage.getUserData("acc",function(u){n.Header.AccountPaneController.showHeaderContent(t,u,i,r)});return}if(n.Header.AccountPaneController.showHeaderContent(t,u,i,r),u.FirstName)try{e=$.cookie("Usr");e&&(f=$.parseJSON(e),f&&(o=$.base64Decode(f.Name),o!=u.FirstName&&(f.Name=$.base64Encode(u.FirstName),$.cookie("Usr",JSON.stringify(f),{path:"/",expires:new Date(2099,1,1)}),n.Header.setFirstNameInHeader(u.FirstName))))}catch(s){}})},t.$inject=["$scope","$rootScope","$timeout","$shopDataService","$http"],t}();t.AccountPaneController=i})(t=n.Header||(n.Header={}))}(Vex||(Vex={}));shopModule.controller("Vex.Header.AccountPaneController",Vex.Header.AccountPaneController),function(n){var t;(function(t){var r=function(){function n(){}return n}(),i;t.ProductInfo=r;i=function(){function t(t){n.Storage.getUserData("del",function(i){t.$apply(function(){i!==undefined&&i!==null&&(t.culture=n.Settings.Culture,t.HasOrders=i.HasOrders,t.ActiveDeliveries=i.Deliveries)})})}return t.$inject=["$scope","$rootScope","$timeout","$shopDataService"],t}();t.DeliveryPaneController=i})(t=n.Header||(n.Header={}))}(Vex||(Vex={}));shopModule.controller("Vex.Header.DeliveryPaneController",Vex.Header.DeliveryPaneController),function(n){var t;(function(t){var i=function(){function t(t){var i=this;$("body").on("brandAlertDataLoaded",function(){t.$apply(function(){var s=n.Dictionary.sales,r,i,h,u,e,o,f;if(t.activeBrandAlerts=[],t.activeBrandAlertsOpen=[],t.activeBrandAlertsOpeningSoon=[],n.BrandAlert.getData())for(r=n.BrandAlert.getData().BrandAlerts,i=0;i<r.length;i++)h=s[r[i].SaleId],h&&r[i].IncludeInHeader&&(t.activeBrandAlerts.push(r[i]),s[r[i].SaleId].State=="Open"?t.activeBrandAlertsOpen.push(r[i]):t.activeBrandAlertsOpeningSoon.push(r[i]));u=t.activeBrandAlerts.length;u>0?($("#nav-box-favorites .icon")[0].className=$("#nav-box-favorites .icon")[0].className.replace(/\bcount.*\b/g,""),$("#nav-box-favorites .icon").addClass("count-"+(u<10?u:10))):$("#nav-box-favorites .icon")[0].className=$("#nav-box-favorites .icon")[0].className.replace(/\bcount.*\b/g,"");$("#sale").length>0&&(e=$("#inner-container.sale"),e&&(o=e.data("saleid"),f=n.Dictionary.sales[o],f&&f.HasBrandAlert&&f.Brands.length>0&&n.BrandAlert.showBrandAlertHeaderBasedOnSaleId(o)))})});t.saleUrl=function(t){return n.Util.saleUrl(t)};t.saleTeaserUrl=function(t){return n.Util.saleTeaserUrl(t)};t.handleBrandAlertCall=function(){var u=$("#inner-container.sale"),t=u.data("saleid"),f=$(this),i=n.Dictionary.sales[t],r;i&&i.Brands.length==1?(r=i.Brands[0].BrandId,f.addClass("active"),$.ajax({type:"POST",url:"/"+n.Settings.Culture+"/Account/AddBrandAlert",data:JSON.stringify({brandId:r}),contentType:"application/json",success:function(i){var f,u;for(n.Util.calAction("FRAME","ENABLE_BRAND_ALERT",{saleId:t},{brand_id:r}),f=!1,u=0;u<i.length;u++)n.BrandAlert.addBrand(i[u],!1),f=f||i[u].IncludeInHeader;f&&refreshBrandAlertHeader()}})):(buildBrandAlertLightbox(t),n.Util.showLightbox(697,500,n.LightboxModalMode.Semi,{message:$("#brand-alert-lightbox")}))}}return t.$inject=["$scope","$rootScope","$timeout","$shopDataService"],t}();t.FavoritePaneController=i})(t=n.Header||(n.Header={}))}(Vex||(Vex={}));shopModule.controller("Vex.Header.FavoritePaneController",Vex.Header.FavoritePaneController),function(n){var t;(function(t){var i,r;(function(n){n[n.AddToCart=0]="AddToCart";n[n.UseVoucher=1]="UseVoucher";n[n.AnnounceVouchers=2]="AnnounceVouchers"})(i=t.CroutonMode||(t.CroutonMode={}));r=function(){function t(n,t,r,u,f){var e=this;n.showCrouton=!1;n.blockOverlay=!1;n.remainingTickets=0;$("#header-ticket-crouton").css("display","block");n.$on("promptPreviewTicket",function(t,r){$(".content-pad").block({message:""});n.showCrouton=!0;n.autoUsed=!1;n.remainingTickets=r.availableCurrency;n.isVoucherMode=r.isVoucherMode;n.itemAdded=r.itemAdded;n.modelData=r.modelData;n.croutonMode=i.AddToCart;n.$apply()});n.$on("autoUsedPreviewTicket",function(r,u){n.showCrouton=!0;n.autoUsed=!0;n.remainingTickets=u.availableCurrency;n.isVoucherMode=u.isVoucherMode;n.itemAdded=u.itemAdded;n.modelData=u.modelData;n.croutonMode=i.AddToCart;n.$apply();setTimeout(function(){if(n.showCrouton=!1,n.itemAdded)t.onCartEvent("cartItemAdded",n.modelData);else t.onCartEvent("cartItemAddFailed",n.modelData);$.unblockUI()},3e3)});n.$on("promptVoucherUsage",function(t,r){$(".content-pad").block({message:""});var u=r;u&&(n.eaSaleId=u.saleId,n.eaSaleUrl=u.url,n.showCrouton=!0,n.croutonMode=i.UseVoucher,n.isVoucherMode=!0,n.remainingTickets=1,n.$apply())});n.$on("announceVouchers",function(u,o){n.showCrouton=!0;n.announcedVouchers=o.length;n.croutonMode=i.AnnounceVouchers;n.isVoucherMode=!0;n.$apply();setTimeout(function(){n.showCrouton=!1;e.acknowledgeVouchersAnnounced(o,f,r,t)},5e3)});n.usePreviewTicket=function(){n.blockOverlay=!0;e.usePreviewTicketButton(n,t)};n.cancel=function(){e.cancelButton(n)};n.useEarlyAccessVoucher=function(){n.blockOverlay=!0;e.useEarlyAccessVoucher(n,r,u,t)}}return t.prototype.usePreviewTicketButton=function(t,i){$(".content-pad").unblock();t.remainingTickets>0&&(n.Util.showLightbox(750,30,n.LightboxModalMode.Full,{message:$("#addToCartWait"),overlayCSS:{backgroundColor:"#fff"}}),n.Sale.Utility.addProductToCart(n.Settings.Culture,t.modelData.modelId,t.modelData.quantity,!t.isVoucherMode,t.isVoucherMode,function(n){if(n.Error&&n.Error.length>0){t.modelData.error=n.Error;t.modelData.errorData=n.ErrorData;i.onCartEvent("cartItemAddFailed",t.modelData)}else{t.showCrouton=!1;t.remainingTickets--;i.onCartEvent("cartItemAdded",t.modelData);i.onEvent("refreshAccountPaneData")}t.blockOverlay=!1;$.unblockUI()}))},t.prototype.cancelButton=function(n){$(".content-pad").unblock();n.showCrouton=!1;n.$apply()},t.prototype.useEarlyAccessVoucher=function(t,i,r,u){var f=n.Settings.ApiRoot+n.Settings.Culture+"/sales/"+t.eaSaleId+"/access-vouchers";i.post(f).then(function(){r.invalidateCache();u.onEvent("refreshAccountPaneData");window.location.href=t.eaSaleUrl},function(){$(".content-pad").unblock();t.blockOverlay=!1;t.showCrouton=!1})},t.prototype.acknowledgeVouchersAnnounced=function(t,i,r,u){var f=n.Settings.ApiRoot+n.Settings.Culture+"/users/"+i.user.token+"/ack/vouchers";r.post(f,{AnnouncedOnChannelCV:"WEB",LoyaltyVoucherIds:t}).then().then(function(){u.onEvent("refreshAccountPaneData")})},t.handleCloseButtonVisibility=function(n){n?($("#header-ticket-crouton .bottom .cross").show(),$("#header-ticket-crouton .bottom .question").show()):($("#header-ticket-crouton .bottom .cross").hide(),$("#header-ticket-crouton .bottom .question").hide())},t.$inject=["$scope","$shopDataService","$http","$sales","$session"],t}();t.TicketCroutonController=r})(t=n.Header||(n.Header={}))}(Vex||(Vex={}));shopModule.controller("Vex.Header.TicketCroutonController",Vex.Header.TicketCroutonController),function(n){var t;(function(n){function i(n,i){var f=n.height(),o,l,a,h,y,v;if(f!=t&&($("#overviewContainer").css("min-height",f+30),t=f),lastScrollPosition!=i){o=lastScrollPosition>i?"up":"down";l=!1;lastScrollDirection!=null&&(l=lastScrollDirection!=o);lastScrollDirection=o;lastScrollPosition=i;var e=$(window).height(),r=n.offset(),c=$(".productContainer").offset(),s=$(".productContainer").height();f+r.top>i+e&&n.hasClass("sticky-bottom")&&(n.css("top",r.top-headerOffset-headerOffset),n.css("left",0),n.removeClass("sticky-bottom"),r=n.offset());a=f<e;a?(n.hasClass("sticky-bottom")&&(n.removeClass("sticky-bottom"),n.css("left",0),n.css("top",42),r=n.offset()),o=="down"&&(i+110>=r.top&&!n.hasClass("sticky-top")&&r.top!=0&&(n.addClass("sticky-top"),n.css("left",r.left),n.css("top",110).css("bottom","auto"),r=n.offset()),f+r.top>s+c.top&&(n.removeClass("sticky-bottom sticky-top"),n.css("left",0),n.css("bottom",0).css("top","auto"),r=n.offset(),!u(r.top,i,e)&&i+e<s+c.top&&(n.addClass("sticky-top"),n.css("left",r.left),n.css("top",110).css("bottom","auto"),r=n.offset()))),o=="up"&&(r.top>=i+110&&(n.addClass("sticky-top"),n.css("left",r.left),n.css("top",110).css("bottom","auto"),r=n.offset()),r.top<=249&&n.hasClass("sticky-top")&&(n.removeClass("sticky-top"),n.css("top",42).css("bottom","auto"),n.css("left",0),r=n.offset()))):f>=s?(n.css("bottom",""),n.hasClass("sticky-bottom")&&n.removeClass("sticky-bottom"),n.hasClass("sticky-top")&&n.removeClass("sticky-top"),n.css("left",0),n.css("top",42),r=n.offset()):(n.css("bottom",""),r=n.offset(),l&&(n.hasClass("sticky-bottom")&&(n.css("top",r.top-headerOffset-headerOffset),n.css("left",0),n.removeClass("sticky-bottom"),r=n.offset()),n.hasClass("sticky-top")&&(n.removeClass("sticky-top"),n.css("left",0),n.css("top",i-141),r=n.offset())),o=="down"&&(i+e>=r.top+f&&(n.hasClass("sticky-bottom")||(n.addClass("sticky-bottom"),n.css("left",r.left),n.css("top",e-f),r=n.offset())),n.hasClass("sticky-bottom")&&(h=43,f+r.top>s+c.top&&(n.removeClass("sticky-bottom"),n.css("left",0),n.css("top",s-f+h),r=n.offset()))),o=="up"&&(h=$("#navbar-top").height()+50,y=50,i+h<r.top&&(n.addClass("sticky-top"),n.css("top",h),n.css("left",r.left),n.css("margin-top",""),r=n.offset()),i<=headerOffset+y&&(n.removeClass("sticky-top"),n.css("left",0),n.css("top",42),r=n.offset()),v=n.actual("height"),i+e>=r.top+v&&(n.hasClass("sticky-bottom")||i+e<s+c.top&&(n.addClass("sticky-bottom"),n.css("left",r.left),n.css("top",e-v),r=n.offset())),n.hasClass("sticky-bottom")&&f+r.top<s+c.top&&(n.removeClass("sticky-bottom"),n.css("left",0),n.css("top",s-f),r=n.offset())));o!="down"||a||n.hasClass("sticky-top")&&(n.removeClass("sticky-top"),n.css("left",0))}}function r(n){$("#overviewContainer").css("min-height",n.actual("outerHeight")+30)}function u(n,t,i){return n>t&&n<t+i}function f(n){var t=$(".sidebarContainer");t.length!=0&&t.data("anchored")&&((!$.browser.mobile||env.android&&env.chrome)&&!env.smallscreen?i(t,n):(t.hasClass("mobile")||t.addClass("mobile"),r(t,n)))}var t=0;n.trigger=f})(t=n.SideBar||(n.SideBar={}))}(Vex||(Vex={}));previousWindowSize=$(window).width();$(window).resize(function(){var n=$(".sidebarContainer");if(n.length>0&&(n.hasClass("sticky-bottom")||n.hasClass("sticky-top"))){var t=$(window).width()-previousWindowSize,i=t/2,r=n.css("left"),u=parseInt(r)+i;n.css("left",u);previousWindowSize=$(window).width()}}),function(n){var t;(function(t){var i=function(){function t(){}return t.SocialSharingReferralLightbox=function(){var e,i,t,r,s,f,o,u;if(n.authentication.lightboxAction==n.LightboxAction.none&&(e=$.cookie("sst"),e)){if(i=JSON.parse($.base64Decode(e),n.Util.jsonDateTimeReviver),$.cookie("sst","",{path:"/",expires:new Date(1900,1,1)}),t=$("#social-sharing-popup"),n.Util.showLightbox(700,400,n.LightboxModalMode.Semi,{message:t}),i.ProductId){r=i.Brands.length==1?i.Brands[0].BrandId:null;t.on("click",".no-brand-alert .btn",$.unblockUI);t.find(".sale-related").hide();t.find(".product-related").show();r==null&&(t.find(".left-content img.sale-related").show(),t.find(".left-content img.product-related").hide());s=t.find("div.product-related.details");s.find("h4").text(i.ProductName)}else t.find(".sale-related").show(),t.find(".product-related").hide(),t.find(".sale-related.details").text(i.SaleName);for(n.SocialSharing.Utility.inactiveBrands=[],f=0;f<i.Brands.length;f++)o=i.Brands[f],o.HasBrand||n.SocialSharing.Utility.inactiveBrands.push(o);if(i.Brands.length==0||n.SocialSharing.Utility.inactiveBrands.length>5)t.find("#brand-alert-active").removeClass("active"),t.find("#brand-alert-inactive").removeClass("active"),t.find(".no-brand-alert").show(),t.find(".with-brand-alert").hide();else if(n.SocialSharing.Utility.inactiveBrands.length>0&&n.SocialSharing.Utility.inactiveBrands.length<=5){t.find("#brand-alert-inactive").addClass("active");t.find("#brand-alert-active").removeClass("active");t.find(".no-brand-alert").hide();t.find(".with-brand-alert").show();t.on("click","#brand-alert-inactive",function(){for(var t,i=0;i<n.SocialSharing.Utility.inactiveBrands.length;i++)t=n.SocialSharing.Utility.inactiveBrands[i],$.ajax({type:"POST",url:"/"+n.Settings.Culture+"/Account/AddBrandAlert",data:JSON.stringify({brandId:t.BrandId}),contentType:"application/json"}).done(function(i){var u,r,f;if(i.length>0){for(u=!1,r=0;r<i.length;r++)n.BrandAlert.addBrand(i[r],!1),u=u||i[r].IncludeInHeader;u&&refreshBrandAlertHeader()}else n.BrandAlert.addBrand({BrandId:t.BrandId,SaleId:0,BrandName:t.BrandName,BrandLogoUrl:"",IncludeInHeader:!1},!1),f=angular.element("#preferences").scope(),f&&(f.brandsSelected.push({Id:t.BrandId,IsUserSelected:!0,IsUserSuggestion:!1,Name:t.BrandName}),f.$apply())});$.unblockUI()})}else n.SocialSharing.Utility.inactiveBrands.length==0&&(t.find("#brand-alert-active").addClass("active"),t.find("#brand-alert-inactive").removeClass("active"),t.find(".no-brand-alert").hide(),t.find(".with-brand-alert").show());t.find(".sale-end span").text(i.SaleEndDateTime);u=t.data("image-server-root");t.find("div[data-related]").each(function(t,f){var o=$(f),s=o.data("related"),e;(r&&s==="product"||!r&&s==="sale")&&(e=$("<img />"),e.attr("alt","logo"),s==="product"?(e.addClass("product-related"),o.data("type")=="left"?e.attr("src",u+"Site/Sales/"+i.SaleId+"/Products/"+i.ProductReference+"_1_3M2.jpg"):e.attr("src",u+"Site/Brands/"+r+"/shopLogo.jpg"),e.appendTo(o)):s==="sale"&&(e.addClass("sale-related"),o.data("type")=="left"?e.attr("src",u+"Site/Sales/"+i.SaleId+"/Visuals/"+n.Settings.LanguageIso+"/Main_small.jpg"):e.attr("src",u+"Site/Sales/"+i.SaleId+"/Visuals/"+n.Settings.LanguageIso+"/Main_logo.jpg"),e.appendTo(o)))})}},t}();t.Utility=i})(t=n.SocialSharing||(n.SocialSharing={}))}(Vex||(Vex={}));homeModule=angular.module("home",["shop","ngRoute"]);homeModule.config(["$routeProvider",function(n){n.when("/",{templateUrl:"/templates/sale-overview",controller:"HomePageController",resolve:{sales:["$sales",function(n){return n.getSales()}],filter:[function(){return"all"}]}});n.when("/:vertical",{templateUrl:"/templates/sale-overview",controller:"HomePageController",resolve:{sales:["$sales",function(n){return n.getSales()}],filter:["$route",function(n){return n.current.params.vertical}]}});n.otherwise({redirectTo:"/"})}]);homeModule.run(["$rootScope","$route","$sales","$window",function(n,t,i,r){document.cookie.indexOf("_gs=1")>=0&&(localStorage.setItem("_gs",Date.now().toString()),document.cookie="_gs=; expires=Thu, 01 Jan 1970 00:00:01 GMT;");n.$on("$routeChangeSuccess",function(){n.vertical=i.verticalMappings[t.current.params.vertical]||"all";$(".shop-background").addClass("hide");var u=$(".shop-background[data-vertical='"+n.vertical+"']");u.css("background-image","url("+u.data("url")+")");u.removeClass("hide");r.scrollTo(0,0);Vex.Header.closeHeaderPanel()})}]);homeModule.directive("sale",function(){return{templateUrl:"/templates/sale-image",restrict:"A"}});homeModule.controller("HomePageController",["$scope","$sales","sales","filter","$shopDataService","$cal",function(n,t,i,r,u,f){var e;n.openMobileExclusiveSale=function(t){n.lightboxSale=t;Vex.Util.showLightbox(750,500,Vex.LightboxModalMode.Semi,{message:$("#current-sale")})};e=t.verticalMappings[r]||"all";$(".nav-vertical").removeClass("selected");$("#nav-box-"+e).addClass("selected");i=_.filter(i,t.verticalFilters[r]||t.verticalFilters.all);f.logViewVertical("HOMEPAGE","VERTICAL",{},{vertical:e});n.topSales=_.filter(i,function(n){return!n.isUpcoming&&n.showTopProminent});n.currentVertical=e;_.forEach(n.topSales,function(n,t){n.size="large";n.cssClass="span12";n.btnClass="btn btn-primary btn-large";n.imgClass="large-image";n.imgUrl=Vex.Settings.ImgRoot+"Site/Sales/"+n.saleId+"/Visuals/"+Vex.Settings.LanguageIso+"/Main_fullwidth.jpg";n.teaserImgUrl=Vex.Settings.ImgRoot+"Site/Sales/"+n.saleId+"/Visuals/Teaser/"+Vex.Settings.LanguageIso+"/img01.jpg";n.blockIndex=t;n.endsSoon&&(n.cssClass+=" finalDays")});n.sales=_.filter(i,function(n){return!n.isUpcoming&&!n.showTopProminent});_.forEach(n.sales,function(n,t){n.size=t<3?"large":t<9?"normal":n.showProminent?"normal":"small";n.cssClass=n.size=="large"?"span12":n.size=="normal"?"span8":"span4";n.cssClass=n.size=="large"?"span12":n.size=="normal"?"span8":"span4";n.imgClass=n.size+"-image";n.imgUrl=Vex.Settings.ImgRoot+"Site/Sales/"+n.saleId+"/Visuals/"+Vex.Settings.LanguageIso+"/Main_"+(n.size=="large"?"fullwidth":n.size=="normal"?"normal":"small")+".jpg";n.teaserImgUrl=Vex.Settings.ImgRoot+"Site/Sales/"+n.saleId+"/Visuals/Teaser/"+Vex.Settings.LanguageIso+"/img01.jpg";n.btnClass=n.size=="small"?"btn btn-primary":"btn btn-primary btn-large";n.blockIndex=t;n.endsSoon&&(n.cssClass+=" finalDays")});n.topUpcomingSales=_.filter(i,function(n){return n.isUpcoming&&n.showTopProminent});_.forEach(n.topUpcomingSales,function(n,t){n.size="large";n.cssClass="span12 greyed";n.btnClass="btn btn-large";n.imgClass="large-image";n.imgUrl=Vex.Settings.ImgRoot+"Site/Sales/"+n.saleId+"/Visuals/"+Vex.Settings.LanguageIso+"/Main_fullwidth.jpg";n.url="/"+Vex.Settings.Culture+"/"+Vex.Util.slug(n.title)+"-qst"+n.saleId;n.blockIndex=t});n.upcomingSales=_.filter(i,function(n){return n.isUpcoming&&!n.showTopProminent});_.forEach(n.upcomingSales,function(n,t){n.size="small";n.cssClass="span4";n.btnClass="btn";n.imgClass="small-image";n.imgUrl=Vex.Settings.ImgRoot+"Site/Sales/"+n.saleId+"/Visuals/"+Vex.Settings.LanguageIso+"/Main_preview.jpg";n.url="/"+Vex.Settings.Culture+"/"+Vex.Util.slug(n.title)+"-qst"+n.saleId;n.blockIndex=t});n.interceptSale=function(t,i){if(f.logAction("HOMEPAGE","OPEN_BANNER_SALE",{saleId:i.saleId},{blockIndex:i.blockIndex,blockSize:n.sales.length,blockName:"open",totalIndex:i.blockIndex,totalSize:n.upcomingSales.length+n.sales.length,vertical:e,saleId:i.saleId,version:"1.1"}),i.accessMode==2){t.preventDefault();u.onEvent("promptVoucherUsage",i);u.onEvent("refreshAccountPaneData")}};n.interceptUpcoming=function(t,i){f.logAction("HOMEPAGE","OPEN_BANNER_SALE",{saleId:i.saleId},{blockIndex:i.blockIndex,blockSize:n.upcomingSales.length,blockName:"upcoming",totalIndex:n.sales.length+i.blockIndex,totalSize:n.upcomingSales.length+n.sales.length,vertical:e,saleId:i.saleId,version:"1.1"})};n.openxPlacement=function(t){var i=-1,r=n.topSales.indexOf(t),u=n.sales.indexOf(t);r>-1&&(i=r);u>-1&&(i=n.topSales.length+u);switch(i){case 2:return 102;case 15:return 106;case 21:return 107;default:return null}};var h=Vex.Dictionary.sales,o=Vex.BrandAlert.getData(),s=function(){_.forEach(n.upcomingSales,function(n){var t=h[n.saleId];t&&t.Brands.length>0&&(n.brandAlertAllowed=!0,n.brandAlertCssClass=_.all(t.Brands,function(n){return Vex.BrandAlert.hasBrand(n.BrandId)})?"active":"")})};if(o){s();return}$("body").on("brandAlertDataLoaded",function(){o=Vex.BrandAlert.getData();s();n.$apply()})}]),function(n){var t;(function(){n.Modules.register("Home",{documentLoading:function(t){t("body").on("brandAlertDataLoaded",function(){var i=n.BrandAlert.getData();t(".salebox-picture.preview").each(function(){var e=t(this).data("saleid"),i=n.Dictionary.sales[e],r,u,f;if(i&&i.Brands.length>0){for(t(this).find(".brand-alert").show(),r=!0,u=0;u<i.Brands.length;u++)f=i.Brands[u].BrandId,r=r&&n.BrandAlert.hasBrand(f);r?t(this).find(".brand-alert").addClass("active"):t(this).find(".brand-alert").removeClass("active")}})})},documentReady:function(t){if(env.touch?t(".salebox-picture .salebox-dateinfo").css("display","block"):t(".salebox-picture").not(".preview").not(".finalDays").hoverIntent(function(){t(this).find(".salebox-dateinfo").css("display","block")},function(){t(this).find(".salebox-dateinfo").css("display","none")}),n.Travel.Utility.handleActiveBookingLightbox(),n.SocialSharing.Utility.SocialSharingReferralLightbox(),t("#invite-friend-email-header").keyup(function(){t("#invite-links").removeClass("error")}),t(".salebox-gotosale > button").click(function(){return window.location.href=t(this).parent().parent().attr("href"),!0}),t(".brand-alert").popover({html:!0,content:function(){var i=t(t(this).parents(".salebox-picture")[0]).data("saleid");return n.BrandAlert.hasSale(i)?(t("#brand-alert-popover .inactive").addClass("hidden"),t("#brand-alert-popover .active").removeClass("hidden")):(t("#brand-alert-popover .active").addClass("hidden"),t("#brand-alert-popover .inactive").removeClass("hidden")),t("#brand-alert-popover").html()},placement:function(){var n=t(this)[0];return t(n.$element[0]).offset().top-t(window).scrollTop()<200?"bottom":"top"},trigger:"hover"}),t(document).delegate(".brand-alert","click",function(i){var r;i.preventDefault();var u=t(t(this).parents(".salebox-picture")[0]).data("saleid"),f=t(this),e=n.Dictionary.sales[u];e&&e.Brands.length==1?(r=e.Brands[0].BrandId,f.hasClass("active")?(f.removeClass("active"),t.ajax({type:"POST",url:"/"+n.Settings.Culture+"/Account/RemoveBrandAlert",data:JSON.stringify({brandId:r,brandName:"",isUserSuggestion:!1}),contentType:"application/json",success:function(t){var f,i;if(n.Util.calAction("HOMEPAGE","DISABLE_BRAND_ALERT",{saleId:u},{brand_id:r}),f=!1,t.length>0)for(i=0;i<t.length;i++)n.BrandAlert.removeBrand(t[i].BrandId,t[i].SaleId),f=f||t[i].IncludeInHeader;else n.BrandAlert.removeBrand(r,u),f=!0;f&&refreshBrandAlertHeader()}})):(f.addClass("active"),t.ajax({type:"POST",url:"/"+n.Settings.Culture+"/Account/AddBrandAlert",data:JSON.stringify({brandId:r}),contentType:"application/json",success:function(t){var f,i;if(n.Util.calAction("HOMEPAGE","ENABLE_BRAND_ALERT",{saleId:u},{brand_id:r}),f=!1,t.length==0)n.BrandAlert.addBrand({BrandId:r,SaleId:u,BrandLogoUrl:"",BrandName:"",IncludeInHeader:!1},!1);else{for(i=0;i<t.length;i++)n.BrandAlert.addBrand(t[i],!1),f=f||t[i].IncludeInHeader;f&&refreshBrandAlertHeader()}}}))):(buildBrandAlertLightbox(u),n.Util.showLightbox(697,500,n.LightboxModalMode.Semi,{message:t("#brand-alert-lightbox")}))}),t("#deliverygroup-crouton").length>0){var u="dgc",r=t.cookie(u),f=new Date,e=Math.round(+f/1e3),i;i=r?JSON.parse(r):{time:0,type:"none"};n.Storage.getUserData("acc",function(n){var h=t("#deliverygroup-crouton").data("dgid"),f="",o,s;if(n&&n.DeliveryGroupIds&&n.DeliveryGroupIds.length>0&&h!=0){if(f="awareness",(n.HasUncFrShpWithSignUpCoupon||n.HasOthUncFrShp)&&(f="havefscoupon"),n.ActivatedDeliveryGroupIds!==undefined&&n.ActivatedDeliveryGroupIds!==null)for(o=0;o<n.ActivatedDeliveryGroupIds.length;o++)n.ActivatedDeliveryGroupIds[o]==h&&(f="unlocked");if(i.time<e||f!=i.type){s=new Date;s.setSeconds(s.getSeconds()+14400);i={time:Math.round(+s/1e3),type:f};r=JSON.stringify(i);t.cookie(u,r,{path:"/"});f=="havefscoupon"?(t("#deliverygroup-crouton .havefscoupon").show(),t("#deliverygroup-crouton .awareness").hide(),t("#deliverygroup-crouton .unlocked").hide()):f=="unlocked"?(t("#deliverygroup-crouton .havefscoupon").hide(),t("#deliverygroup-crouton .unlocked").show(),t("#deliverygroup-crouton .awareness").hide()):(t("#deliverygroup-crouton .havefscoupon").hide(),t("#deliverygroup-crouton .unlocked").hide(),t("#deliverygroup-crouton .awareness").show());t("#deliverygroup-crouton").removeClass("not-shown");t("#deliverygroup-crouton").off("click").on("click",function(){t("#deliverygroup-crouton").addClass("not-shown")})}}})}}})})(t=n.Home||(n.Home={}))}(Vex||(Vex={})),function(n){var t;(function(){n.Modules.register("StyleGuide",{documentLoading:function(){},documentReady:function(t){t("#btn-display-semi-lightbox").click(function(){n.Util.showLightbox(750,500,n.LightboxModalMode.Semi,{message:t("#"+t(this).data("id"))})});t("#btn-display-full-lightbox").click(function(){n.Util.showLightbox(750,500,n.LightboxModalMode.Full,{message:t("#"+t(this).data("id"))})});t("#btn-display-slideup-lightbox").click(function(){n.Util.showLightbox(750,500,n.LightboxModalMode.Full,{message:t("#"+t(this).data("id"))})});t("#lightbox-slideup-example .btn").click(function(){n.Util.slideUpPopup()});t("#btn-display-sticky-crouton").click(function(){n.Util.showCrouton(t("#"+t(this).data("id")))});t("#btn-display-autoremoved-crouton").click(function(){n.Util.showCrouton(t("#"+t(this).data("id")),n.CroutonStickyMode.AutoRemoved)});t("#btn-display-timerremoved-crouton").click(function(){n.Util.showCrouton(t("#"+t(this).data("id")),n.CroutonStickyMode.TimerRemoved,{time:5})});t(".popover-trigger").popover({html:!0,content:function(){return t(t(this).data("content-selector")).html()}});t(".square-demo i.icon[data-columns=3], .square-demo a[data-columns=3]").addClass("active");t(document).off("click",".square-demo a").on("click",".square-demo a",function(){var n=t(this).parents(".square-demo"),i=+t(this).attr("data-columns");n.find("i.icon").removeClass("active");n.find("a").removeClass("active");n.find("i.icon[data-columns="+i+"]").addClass("active");n.find("a[data-columns="+i+"]").addClass("active")});t(".test-span.span12").click(function(){t(".first-well").toggle()})}})})(t=n.StyleGuide||(n.StyleGuide={}))}(Vex||(Vex={}));angular.module("home").directive("vexAutoRefreshSales",["$sales",function(n){return function(t,i,r){function f(){n.getSales().then(e)}function e(n){var i=_.pluck(n,"saleId").sort().join("-"),t;i!==u&&(t=$("body#Home").length>0,t&&document.location.reload())}var o=t.$eval(t.vexAutoRefreshSales),u=_.pluck(t.$eval(r.vexAutoRefreshSales),"saleId").sort().join("-");setTimeout(f,36e5)}}]),function(n){var t;(function(t){var u=function(){function n(){var n=this;this.compareAvailability=function(t,i){var f=0,e=0,r,u;return(t.models.filter(function(t){return n.models[t.name]==!0}).forEach(function(n){return f+=n.AvailableQuantity+n.AvailableInCarts}),i.models.filter(function(t){return n.models[t.name]==!0}).forEach(function(n){return e+=n.AvailableQuantity+n.AvailableInCarts}),r=f==0,u=e==0,r==u)?0:r?1:u?-1:void 0};this.categories={};this.subcategories={};this.categoriesFiltered=!1;this.models={};this.modelsFiltered=!1;this.showSoldout=!0}return n}(),i,r;t.FilterConditions=u,function(n){n[n.None=0]="None";n[n.Reduction=1]="Reduction";n[n.Popular=2]="Popular"}(i=t.SortingOrder||(t.SortingOrder={}));r=function(){function t(){}return t.validateSaleAccessible=function(t,i,r){r===void 0&&(r=null);$.cookie("Previewing")||t.getSale(i,!1).then(function(t){if(t?t.isOpenForMe||(window.location.href=t.url):window.location.href="/"+n.Settings.Culture,r){var i=new Date((new Date).setHours(18,30,0,0)),u=new Date((new Date).setHours(19,30,0,0)),f=moment(new Date(t.startDateTime).setHours(7,0,0,0)).add(1,"day").toDate();r.isEarlyAccess=t.accessMode==3;r.isEveningSale=t.accessMode==4||new Date(t.startDateTime)>=i&&new Date(t.startDateTime)<=u&&new Date<=f;r.isDdgSale=t.saleTypeCV=="D"}})},t.validateSaleTeaser=function(n,t){n.getSale(t,!1).then(function(n){n&&n.isOpenForMe&&(window.location.href=n.url)})},t.getProductDetailData=function(t,i,r,u,f){t.getSale(r,!0).then(function(t){$.ajax({url:"/"+i+"/Sale/ProductDetail/"+u+"?cycle="+(t?t.cycle:"none")}).done(function(t){var c=t.SaleSoldOutProductsModeCV=="Hide",s=t.SaleSoldOutProductsModeCV=="Last",e,o,i,h,r,u;if(c||s){for(e=[],o=[],i=0,h=t.SortedProductIdsList.length;i<h;i++)r=t.SortedProductIdsList[i],u=n.Dictionary.availabilities[r],u&&(u.IsReserved||u.Quantity>0)?e.push(r):o.push(r);t.SortedProductIdsList=e;s&&(t.SortedProductIdsList=t.SortedProductIdsList.concat(o))}f(t)})},function(){f(null)})},t.getProductDetailAvailabilityData=function(t,i,r,u){t.getSale(i,!1).then(function(t){t?$.ajax({url:"/"+n.Settings.Culture+"/prodav/"+i+"/"+r}).done(u):u(null)},function(){u(null)})},t.addProductToCart=function(t,i,r,u,f,e){$.ajax({type:"POST",url:"/"+t+"/Cart/AddToCart",data:JSON.stringify({modelId:i,quantity:r,useTicket:u,useVoucher:f}),contentType:"application/json"}).done(function(t){e(t);n.AnalyticsData.cartModified()})},t.getRelatedProductsData=function(t,i,r,u){t.getSale(i,!0).then(function(t){t?$.ajax({url:"/"+n.Settings.Culture+"/prodrelated/"+r+"?cycle="+t.cycle}).done(u):u(null)},function(){u(null)})},t.applyModelAvailability=function(n,t){var u,i,r;t&&(u=t.QuantityInStock==0,i=t.QuantityInStock==0&&t.QuantityInCart>0,n.toggleClass("soldout",u&&!i),n.toggleClass("reserved",i),r=n.data("names"),n.popover({html:!0,content:function(){var n="",f;if(r.AlternativeNames!=null&&r.AlternativeNames.length){for(n+="<div class='comparisonSizeContainer'>",n+=$("#availabilityCallout-equivalent").html(),f=0;f<r.AlternativeNames.length;f++)n+="<div class='comparisonSize'>"+r.AlternativeNames[f]+"<\/div>";n+="<\/div>"}return t.QuantityInStock==99?n+=$("#availabilityCallout-available").html():t.HalfSoldOut&&!t.LastPieces&&t.QuantityInStock>0?n+=$("#availabilityCallout-halfsoldout").html():t.QuantityInStock<=10&&t.QuantityInStock>0&&!t.LastPieces?n+=$("#availabilityCallout-available").html():t.QuantityInStock>1?n+=$("#availabilityCallout-lastpieces").html().replace("{0}",""+t.QuantityInStock):t.QuantityInStock>0?n+=$("#availabilityCallout-lastpiece").html():i?n+=$("#availabilityCallout-reserved").html():u&&!i&&(n+=$("#availabilityCallout-soldout").html()),n},placement:"top",trigger:"hover"}))},t.showAgeRestrictionPopup=function(t){var i=$("#age-restriction"),r;i.length>0&&(r=n.Storage.getItem("agerestriction"+t),r||(n.Util.showLightbox(570,330,n.LightboxModalMode.Full,{message:i}),$("#age-restriction .age-restriction-continue").click(function(){n.Storage.setItem("agerestriction"+t,"1",86400);var i="";return n.Storage.getUserData("acc",function(r){i=r.Token;$.ajax({type:"POST",url:n.Settings.ApiRoot+n.Settings.Culture+"/users/"+i+"/age-restriction-acceptance/?saleId="+t,contentType:"application/json",beforeSend:function(n){n.setRequestHeader("Authorization","Bearer "+i)}}).done(function(){$.unblockUI()})}),!1}),$("#age-restriction .age-restriction-back").click(function(){return window.location.href="/",!1})))},t.showAddToCartPopover=function(i,r,u,f,e){var o=$("div.product[data-id="+i.productId+"] div.addtocart button"),h=o.closest("div.product"),p=i.productId,w=$(document),l=$(window),s=$("#addtocart").clone(),ut=s.find("img"),a,v,g,c,it,k,d,rt;for(ut.attr("src",r+encodeURIComponent(i.reference)+"_1_S3.jpg"),s.find("a.link").addClass("addtocart-navigate"),i.hideCatalogPrice?s.find(".catalogPrice").html(""):s.find(".catalogPrice").html('<span class="pricewrapper">'+n.Util.getPriceHtml(i.catalogPrice,"&nbsp;*")+"<\/span>"),s.find(".shopPrice").html('<span class="pricewrapper"><span class="from">'+h.parent().data("fromprice")+"<\/span>"+n.Util.getPriceHtml(i.shopPrice)+"<\/span>"),i.hasHigherPrice?s.find(".shopPrice").addClass("higher").addClass("active"):s.find(".shopPrice").removeClass("higher").removeClass("active"),a=!0,v=0,g=u.length;v<g;v++){var b=u[v],y=null,nt=null,tt=null;for(c=0,it=i.models.length;c<it;c++)if(i.models[c].modelId==b.ModelId){y=i.models[c].name;nt=i.models[c].shortName;tt=i.models[c].alternativeNames;break}y&&y.length>0&&(a=!1,k=$('<span style="visibility: hidden" id="model-'+b.ModelId+'" data-id="'+b.ModelId+'">'+nt+"<\/span>"),k.attr("data-names",JSON.stringify({Name:y,AlternativeNames:tt})),s.find(".models .list .inner").append(k))}a?(s.find(".multisize").addClass("hide"),s.find(".singlesize").removeClass("hide")):s.find(".multisize").removeClass("invisible");d=o.offset().top>600&&o.offset().top+o.outerHeight()/2>l.scrollTop()+l.height()/2+60?"top":"bottom";rt=(f==2?h.prev().hasClass("rowstarter"):h.prev().prev().hasClass("rowstarter"))?"Right":"";o.popover("destroy");o.popover({html:!0,placement:d+rt,content:s.html(),container:"body"});o.popover("show");h.addClass("popover-open");setTimeout(function(){var r,s,f,b,c;w.on("click.addtocart",function(t){return($(t.target).hasClass("addtocart-navigate")||!o.is(t.target)&&o.has(t.target).length===0&&$(".popover").has(t.target).length===0)&&(o.popover("hide").popover("destroy"),h.removeClass("popover-open"),w.off("click.addtocart"),w.off("click.addtocart"+p)),$(t.target).hasClass("addtocart-navigate")?(setTimeout(function(){window.location.href=n.Util.productDetailUrl(p)},50),!1):void 0});r=$(".popover:has(.addtocart-popover)").last();r.find(".control-group").removeClass("error");s={width:0};f=r.find(".models .list .inner span");f.each(function(){var r=$(this),e=+r.data("id"),n=null,f,i;for(f in u)if(i=u[f],i.ModelId==e){n=i;break}n&&t.applyModelAvailability(r,n);s.width=Math.max(+$(this).innerWidth(),s.width)});s.width>50?(f.attr("style","width: "+s.width+"px"),b=Math.floor(360/(s.width+32)),c=Math.ceil(f.length/b),c<=4?r.find(".models .list").attr("style","width:360px;"):(b=Math.floor(335/(s.width+32)),c=Math.ceil(f.length/b),c==5?(r.find(".models").attr("style","height: 215px"),r.find(".models .list").attr("style","height: 215px")):c>5&&(r.find(".models").attr("style","height: 235px"),r.find(".models .list").attr("style","height: 235px")),d=="top"&&(c==5?r.attr("style",r.attr("style")+"margin-top: -43px;"):c>5&&r.attr("style",r.attr("style")+"margin-top: -63px;")))):f.removeAttr("style");l.scrollTop()+l.height()+5<r.offset().top+r.outerHeight()?$("html, body").animate({scrollTop:r.offset().top+r.outerHeight()-l.height()+5}):l.scrollTop()+90+5>r.offset().top&&$("html, body").animate({scrollTop:r.offset().top-95});var nt=function(t,e){var w=t.data("names"),c,l,o,a,s,h,p;for(e||r.find(".selectedsize .your-size, .selectedsize .actual-size").removeClass("hide"),r.find(".control-group").removeClass("error"),r.find("div.models").removeClass("sizemissing"),f.removeClass("selected"),e?(v=i.models[0],y=u[0],k=""):(c=+t.addClass("selected").data("id"),v=_.find(i.models,function(n){return n.modelId==c}),y=_.find(u,function(n){return n.ModelId==c}),k=w.Name),r.find(".selectedsize .actual-size").html(k),i.hideCatalogPrice?r.find(".catalogPrice").html(""):r.find(".catalogPrice").html('<span class="pricewrapper">'+n.Util.getPriceHtml(v.catalogPrice,"&nbsp;*")+"<\/span>"),r.find(".shopPrice").html('<span class="pricewrapper">'+n.Util.getPriceHtml(v.shopPrice)+"<\/span>"),r.find(".shopPrice").removeClass("active"),l=$("p.shopPrice span.from:first"),r.find(".shopPrice .pricewrapper").prepend(l.clone()),o=r.find(".add select.quantity").removeClass("hide"),a=Math.min(o.val(),y.QuantityInStock),o.html(""),s=10,i.maximumModelQuantity&&i.maximumModelQuantity<s&&(s=i.maximumModelQuantity),h=1,p=Math.min(s,y.QuantityInStock)+1;h<p;h++)o.append("<option>"+h+"<\/option>");o.val(""+a)},y=null,v=null,k=null;f.click(function(){var n=$(this);n.hasClass("soldout")||n.hasClass("reserved")||nt(n,!1)});u.length==1&&nt(f.first(),a);var tt=r.find(".list").height(),it=r.find(".list .inner").height(),g={value:0},rt=r.find(".list .inner span").outerHeight(!0);it>tt&&(r.find(".nav").removeClass("hide"),r.find(".nav .up").click(function(){g.value<0&&r.find(".list .inner").animate({marginTop:g.value+=rt})}),r.find(".nav .down").click(function(){it+g.value>tt&&r.find(".list .inner").animate({marginTop:g.value-=rt})}));env.touch&&r.find("div.models div.inner > span").hover(function(){return $(this).trigger("click"),!0},function(){});$("div.models").hoverIntent(function(){var o=$(this),r=o.data("id"),t,u,f,e;r&&(t=_.find(i.models,function(n){return n.modelId==r}),t?($(".popover-content .imgPriceColumn p.catalogPrice").hide(),$(".popover-content .imgPriceColumn p.shopPrice").hide(),$(".popover-content .imgPriceColumn p.hover-price").remove(),u=i.hideCatalogPrice?"":'<span class="pricewrapper"><span class="cur">&euro;<\/span><span class="ord">'+Math.floor(t.catalogPrice)+',<\/span><span class="frac">'+n.Util.fract(t.catalogPrice)+"<\/span>&nbsp;*<\/span>",$('<p class="catalogPrice hover-price">'+u+"<\/p>").insertBefore(".popover-content .imgPriceColumn .addtocart-navigate"),f=i.hasHigherPrice?" higher":"",e=$("p.shopPrice span.from:first"),$('<p class="shopPrice hover-price'+f+'"><span class="pricewrapper"><span class="cur">&euro;<\/span><span class="ord">'+Math.floor(t.shopPrice)+',<\/span><span class="frac">'+n.Util.fract(t.shopPrice)+"<\/span><\/span><\/p>").prepend(e.clone()).insertBefore(".popover-content .imgPriceColumn .addtocart-navigate")):($(".popover-content .imgPriceColumn p.hover-price").remove(),$(".popover-content .imgPriceColumn p.catalogPrice").show(),$(".popover-content .imgPriceColumn p.shopPrice").show()))},function(){$(".popover-content .imgPriceColumn p.hover-price").remove();$(".popover-content .imgPriceColumn p.catalogPrice").show();$(".popover-content .imgPriceColumn p.shopPrice").show()},"div.inner > span");r.find("button.confirm").click(function(){try{if(r.find(".control-group").removeClass("error"),r.find("div.models").removeClass("sizemissing"),y==null){a&&r.find(".selectedsize .your-size, .selectedsize .actual-size").addClass("hide");setTimeout(function(){r.find(".control-group").addClass("error");r.find("div.models").addClass("sizemissing")},100);return}var i={modelId:v.modelId,productId:p,modelName:k,catalogPrice:v.catalogPrice,shopPrice:v.shopPrice,quantity:+r.find(".add select.quantity").val(),error:"",errorData:null};i.quantity&&(n.Util.showLightbox(750,30,n.LightboxModalMode.Full,{message:$("#addToCartWait"),overlayCSS:{backgroundColor:"#fff"}}),o.popover("hide").popover("destroy"),t.overviewFlashOverlay(function(){t.addProductToCart(n.Settings.Culture,i.modelId,i.quantity,!1,!1,function(t){if(h.removeClass("popover-open"),t.Error&&t.Error.length>0){i.error=t.Error;i.errorData=t.ErrorData;e.onCartEvent("cartItemAddFailed",i)}else if(t.IsSneakPreviewUser)e.onCartEvent("promptPreviewTicket",{modelData:i,availableCurrency:t.AvailableCurrency,isVoucherMode:t.IsVoucherMode,itemAdded:t.ItemAdded});else if(t.AutoTicketUsed)e.onCartEvent("autoUsedPreviewTicket",{modelData:i,availableCurrency:t.AvailableCurrency,isVoucherMode:t.IsVoucherMode,itemAdded:t.ItemAdded});else{y.QuantityInStock-=i.quantity;e.onCartEvent("cartItemAdded",i)}t.Error||n.Util.calAction("CART","ADD_TO_CART_OVERVIEW");$.unblockUI()})}))}catch(u){$.unblockUI();throw u;}});r.find(".close").click(function(){o.popover("hide").popover("destroy");h.removeClass("popover-open")});r.find(".arrow").hide().show()},0)},t.overviewFlashOverlay=function(n){var i=$(window),t=$("#flashOverlay"),r;t.css("width",$("div.productContainer").width());t.css("height",Math.min(i.height()+2e3,$("div.productContainer").height()));t.css("top",Math.max(i.scrollTop()-1e3,$("div.topContainer").height()));t.css("left",$("div.sidebarContainer").outerWidth());t.show();setTimeout(function(){n()},0);r=setTimeout(function(){t.hide()},200)},t.SortOverviewProducts=function(n,t,r){n.sort(firstBy(r&&r.compareAvailability).thenBy(function(n,r){var u=t==i.Popular?"popularity":t==i.Reduction?"advantage":"type";return n.sortOrder[u]-r.sortOrder[u]}).thenBy(function(n,t){return n.sortOrder.type-t.sortOrder.type}))},t.initSocialSharing=function(t){if(!n.Sale.Utility.socialSharingInitialized){n.Sale.Utility.socialSharingInitialized=!0;var i=$(document);i.hoverIntent(function(){var n=$(this);$(".share .share-icons a, a.share-icon").removeClass("hover");n.addClass("hover");n.attr("src",n.data("srcNormal"))},function(){var n=$(this);n.removeClass("hover");n.attr("src",n.data("srcGrey"))},".share .share-icons img, a.share-icon");i.on("click",".social-sharing-action",function(i){var f,u,r;i&&i.preventDefault&&i.preventDefault();f=$(this);n.Storage.getUserData("acc",function(t){n.Sale.Utility.calSocialSharing("POPUP","BUTTON",f,t.Id)});$(".social-sharing-popup").remove();u=$(".social-sharing-popup-template");r=u.clone().removeClass("social-sharing-popup-template").addClass("social-sharing-popup").insertBefore(u);n.Util.showLightbox(700,400,n.LightboxModalMode.Semi,{message:r});r.find(".perfect-scrollbar").perfectScrollbar({suppressScrollX:!0});r.find("form").validate({showErrors:function(){}});t&&t(r,$(this))});i.on("click",".social-sharing-popup .more-mails .add-email",function(n){n&&n.preventDefault&&n.preventDefault();var t=$(".social-sharing-popup .more-mails .mails .email-action"),i=$(".social-sharing-popup .more-mails .mails .mail-template").clone().removeClass("mail-template").insertBefore(t);$(".social-sharing-popup .more-mails .mails").animate({scrollTop:t.offset().top},0);i.find("input").focus()});i.on("click",".social-sharing-popup .more-mails .mail-row .delete-mail",function(n){n&&n.preventDefault&&n.preventDefault();$(this).parent().remove();var t=$(".social-sharing-popup .more-mails .mails .email-action"),i=t.position().top+t.outerHeight(!0)-$(".social-sharing-popup .more-mails .mails").height();i<0&&$(".social-sharing-popup .more-mails .mails").animate({scrollTop:$(".social-sharing-popup .more-mails .mails").scrollTop()+i},0)});i.on("click",".social-sharing-popup .more-mails .done-emails",function(t){var u,i,r,f;for(t&&t.preventDefault&&t.preventDefault(),u=$(".social-sharing-popup .more-mails .mails input"),i=[],r=0;r<u.length;r++)f=$.trim($(u[r]).val()),f!=""&&(i[i.length]=f);n.Sale.Utility.addEmailList(i)});i.on("click",".social-sharing-popup .right-content > .email-action .add-email",function(n){var i,u,t,f,e;n&&n.preventDefault&&n.preventDefault();$(".social-sharing-popup .more-mails .mails .mail-row").not(".mail-template").remove();var o=$(".social-sharing-popup .popup-message input.email-input").val().split(";"),r=$(".social-sharing-popup .more-mails .mails .email-action"),s=$(".social-sharing-popup .more-mails .mails .mail-template");for(i=0;i<o.length;i++)u=$.trim(o[i]),u!=""&&(t=s.clone().removeClass("mail-template").insertBefore(r),t.find("input").val(u));t=s.clone().removeClass("mail-template").insertBefore(r);$(".social-sharing-popup .more-mails .mails").animate({scrollTop:r.offset().top},0);t.find("input").focus();$(".social-sharing-popup .more-mails").show();f=$(".social-sharing-popup .more-mails .mails .email-action");e=f.position().top+f.outerHeight(!0)-$(".social-sharing-popup .more-mails .mails").height();e<0&&$(".social-sharing-popup .more-mails .mails").animate({scrollTop:$(".social-sharing-popup .more-mails .mails").scrollTop()+e},0)});i.on("click",".social-sharing-popup .right-content > .email-action .edit-email",function(n){var i,u,t;n&&n.preventDefault&&n.preventDefault();$(".social-sharing-popup .more-mails .mails .mail-row").not(".mail-template").remove();var f=$(".social-sharing-popup .popup-message input.email-hidden-input").val().split(";"),r=$(".social-sharing-popup .more-mails .mails .email-action"),e=$(".social-sharing-popup .more-mails .mails .mail-template");for(i=0;i<f.length;i++)u=$.trim(f[i]),u!=""&&(t=e.clone().removeClass("mail-template").insertBefore(r),t.find("input").val(u));t=e.clone().removeClass("mail-template").insertBefore(r);$(".social-sharing-popup .more-mails .mails").animate({scrollTop:r.offset().top},0);t.find("input").focus();$(".social-sharing-popup .more-mails").show()});i.on("click",".social-sharing-popup input[type=submit]",function(){var t=$(".social-sharing-popup .popup-message input.email-input").val().split(";");n.Sale.Utility.addEmailList(t)});i.on("submit",".social-sharing-popup form",function(t){var r,i,u,f;if(t&&t.preventDefault&&t.preventDefault(),r=$(this),$(".social-sharing-popup .control-group").removeClass("error"),i=[],i=$(".social-sharing-popup input.email-input").is(":visible")?$(".social-sharing-popup input.email-input").val():$(".social-sharing-popup input.email-hidden-input").val().split(";"),i.length==0){$(".social-sharing-popup .control-group").addClass("error");$(".social-sharing-popup .control-group input.text-input").focus();n.Storage.getUserData("acc",function(t){n.Sale.Utility.calSocialSharing("FORMSUBMIT","ERROR",r,t.Id)});return}u={Id:$(".social-sharing-popup input#SocialShareId").val(),Subject:$(".social-sharing-popup input#Subject").val(),Code:$("#emailCode").val(),SaleName:$("#saleName").val(),SaleEndDateTime:$("#saleEndDateTime").val(),BrandTitle:$("#brandTitle").val(),ProductTitle:$("#productTitle").val(),ShopPrice:$("#shopPrice").val(),ProductEndDateTime:$("#productEndDateTime").val()};f=$(".social-sharing-popup form").attr("action");n.Sale.Utility.ajaxInviteRequest(i,u,f);n.Storage.getUserData("acc",function(t){n.Sale.Utility.calSocialSharing("FORMSUBMIT","SUBMIT",r,t.Id)})});i.on("click",".share-icon.cloudsponge",function(t){return t.preventDefault&&t.preventDefault(),n.Sale.Utility.launchCloudsponge($(this).data("provider"))});i.on("click",".share-icon.pin, .share-icon.google-plus, .share-icon.facebook, .share-icon.twitter",function(t){t&&t.preventDefault&&t.preventDefault();var r=$(this),f=r.data("urlFormat"),i=r.data("source"),e="SoPo",o="SOCIALPOST",u=r.data("media");return n.Storage.getUserData("acc",function(t){var c,p;if(n.Sale.Utility.calSocialSharing(o,i,r,t.Id),c=f.replace("--SOURCE--",i).replace("--MEDIUM--",e).replace("--LANGUAGE--",n.Settings.Culture).replace("--EXTERNALID--",t.Id),i=="GGP"){var s=575,h=400,l=($(window).width()-s)/2,a=($(window).height()-h)/2,v="https://plus.google.com/share?url="+c+"&image="+u+"&description="+$("input.social-message.google-plus").filter(n.Sale.Utility.filterTemplateOut).val(),y="status=1,width="+s+",height="+h+",top="+a+",left="+l;n.Sale.Utility.shareWindow&&n.Sale.Utility.shareWindow.close&&n.Sale.Utility.shareWindow.close();n.Sale.Utility.shareWindow=window.open(v,"googleplus",y)}else if(i=="FBK")p=$("input.social-message.facebook").filter(n.Sale.Utility.filterTemplateOut).val(),n.AccountProfile.Data.currentUid?n.Sale.Utility.initFbPostWall(c,u,p):FB.login(function(t){t.status==="connected"?(n.AccountProfile.Data.currentUid=t.authResponse.userID,n.AccountProfile.Data.AccessToken=t.authResponse.accessToken,n.Sale.Utility.initFbPostWall(c,u,p)):alert("Login Failed!")});else if(i=="TWT"){var s=575,h=400,l=($(window).width()-s)/2,a=($(window).height()-h)/2,v="http://twitter.com/share?url="+c+"&text="+$("input.social-message.twitter").filter(n.Sale.Utility.filterTemplateOut).val(),y="status=1,width="+s+",height="+h+",top="+a+",left="+l;n.Sale.Utility.shareWindow&&n.Sale.Utility.shareWindow.close&&n.Sale.Utility.shareWindow.close();n.Sale.Utility.shareWindow=window.open(v,"twitter",y)}else if(i=="PIN"){var s=750,h=335,l=($(window).width()-s)/2,a=($(window).height()-h)/2,v="//fr.pinterest.com/pin/create/button/?url="+c+"&media="+u+"&description="+$("input.social-message.pin").filter(n.Sale.Utility.filterTemplateOut).val(),y="status=1,width="+s+",height="+h+",top="+a+",left="+l;n.Sale.Utility.shareWindow&&n.Sale.Utility.shareWindow.close&&n.Sale.Utility.shareWindow.close();n.Sale.Utility.shareWindow=window.open(v,"pinterest",y)}}),$.unblockUI(),!1})}},t.filterTemplateOut=function(){return $(this).parents(".social-sharing-popup-template").length==0},t.calSocialSharing=function(t,i,r,u){var e,f,o;e=r.data("socialSharingPlacement")?r:r.closest("div[data-social-sharing-placement]").length>0?r.closest("div[data-social-sharing-placement]"):r.children("div[data-social-sharing-placement]:first");f=e.data("socialSharingPlacement");f&&f.toUpperCase();o=f.substring(0,f.indexOf("_"));n.Util.calAction(o,"SOCIALSHARE_"+t,{saleId:e.data("saleid"),productId:e.data("productid"),userId:u},{source:i,location:f})},t.ajaxInviteRequest=function(t,i,r){var u=t,e=100,f=[];u.length>e?f=u.splice(u.length-e):(f=u,u=null);i.EmailAddresses=f;$(".social-sharing-popup .overlay").show();$.ajax({type:"POST",url:r,data:JSON.stringify(i),contentType:"application/json",success:function(t){friendsInvitedData==null?friendsInvitedData=t:(friendsInvitedData.NumberInvited+=t.NumberInvited,friendsInvitedData.NumberAlreadyMember+=t.NumberAlreadyMember,friendsInvitedData.NumberAlreadyInvited+=t.NumberAlreadyInvited,friendsInvitedData.NumberInvalid+=t.NumberInvalid);u==null?($(".social-sharing-popup .overlay img").hide(),n.Util.slideUpPopup()):n.Sale.Utility.ajaxInviteRequest(u,i,r)}})},t.initFbPostWall=function(n,t,i){FB.ui({method:"feed",link:n,picture:t,description:i,message:i},function(n){n&&n.post_id})},t.addEmailList=function(n){$(".social-sharing-popup .popup-message input.email-hidden-input").val(n.join(";"));n.length>1?($(".social-sharing-popup .popup-message input.email-input").hide(),$(".social-sharing-popup .popup-message input.email-input").val(n[0]),$(".social-sharing-popup .popup-message div.text-input").show(),$(".social-sharing-popup .popup-message div.text-input").text(n[0]+$(".social-sharing-popup .popup-message div.text-input").data("andTxt").replace("{0}",n.length-1)),$(".social-sharing-popup .email-action .add-email").hide(),$(".social-sharing-popup .email-action .edit-email").show()):($(".social-sharing-popup .popup-message input.email-input").show(),n.length>0?$(".social-sharing-popup .popup-message input.email-input").val(n[0]):$(".social-sharing-popup .popup-message input.email-input").val(""),$(".social-sharing-popup .popup-message div.text-input").hide(),$(".social-sharing-popup .email-action .add-email").show(),$(".social-sharing-popup .email-action .edit-email").hide());$(".social-sharing-popup .more-mails").hide()},t.launchCloudsponge=function(t){return cloudSpongeReinit||(cloudsponge.options.afterSubmitContacts=function(t){for(var u=[],r,i=0;i<t.length;i++)r=t[i],$.trim(r.primaryEmail()).length>0&&u.push(r.primaryEmail());n.Sale.Utility.addEmailList(u)},cloudSpongeReinit=!0),cloudsponge.launch(t)},t.overviewPageSize=180,t.socialSharingInitialized=!1,t.shareWindow=null,t.cloudSpongeReinit=!1,t}();t.Utility=r})(t=n.Sale||(n.Sale={}))}(Vex||(Vex={})),function(n){var t;(function(t){var i=function(){function i(i,r,u,f,e,o,s,h,c,l){var a=this,y,w,v;a.$scope=i;a.$rootScope=r;a.$routeParams=f;a.$sales=h;a.$cal=c;a.saleId=+$(".product-detail").data("saleId");i.culture=n.Settings.Culture;i.productId=+f.productId;i.tfCulture=i.culture.replace("-","_");$(document).ready(function(){$(document).on("mouseover","#myLink",function(n){$(n.target).tooltip({trigger:"manual",delay:{hide:1e3}}).tooltip("show")});var n=!1;$(document).on("mouseleave","#myLink",function(){n||setTimeout(function(){$("#myLink").tooltip("hide")},1500)});$(document).on("mouseover",".tooltip",function(){n=!0});$(document).on("mouseleave",".tooltip",function(){n=!1;setTimeout(function(){$("#myLink").tooltip("hide")},1e3)});$(document).on("click","#lm",function(){$("#RRPExplainModal").modal("show")})});a.$rootScope.activePage="saleDetail";n.Storage.getUserData("acc",function(t){a.$scope.userId=t&&t.Id&&t.Id.toUpperCase()||"";t!==undefined&&t!==null?((t.HasUncFrShpWithSignUpCoupon||t.HasOthUncFrShp||t.HasCondFrShpForLoyaltySegm)&&(n.BrandAlert.BrandAlertHeader.IsActive=!1,n.Header.setActiveDefaultPanel(),$(".header-favorite-message.brand-alert-calltoaction").addClass("hide"),$(".header-favorite-message.default").removeClass("hide")),i.$apply(function(){i.showFreeShippingUnconditionalText=(t.HasUncFrShpWithSignUpCoupon||t.HasOthUncFrShp||r.currentProduct&&r.currentProduct.IsFreeShippingSale&&r.currentProduct.FreeShippingAmount==0)&&!r.isDdgSale;r.currentProduct&&r.currentProduct.IsFreeShippingSale&&r.currentProduct.FreeShippingAmount>0?(i.showFreeShippingConditionalText=!i.showFreeShippingUnconditionalText&&!r.isDdgSale,i.freeShippingConditionalAmount=r.currentProduct.FreeShippingAmount):t.HasCondFrShpForLoyaltySegm&&t.LoyaltySegmentCV!=undefined&&t.LoyaltySegmentCV!=null?(i.showFreeShippingConditionalText=!i.showFreeShippingUnconditionalText&&!r.isDdgSale,i.freeShippingConditionalAmount=t.LoyaltySegmentCV=="S"?75:t.LoyaltySegmentCV=="G"?50:0):i.freeShippingConditionalAmount=0;i.freeShippingConditionalAmountHtml=n.Util.getPriceHtml(i.freeShippingConditionalAmount)})):i.$apply(function(){i.showFreeShippingUnconditionalText=!1||r.currentProduct&&r.currentProduct.IsFreeShippingSale;i.showFreeShippingConditionalText=!1;i.freeShippingConditionalAmount=0;i.freeShippingConditionalAmountHtml=n.Util.getPriceHtml(0)});dataLayer.push({event:"TrueFitReady"})});a.$scope.trendingVertical=f.vertical;a.$scope.trendingProductId=f.trendingProductId;a.$scope.showTrendingBreadcrumb=a.$scope.trendingVertical!=undefined&&a.$scope.trendingVertical!=null&&a.$scope.trendingVertical.length>0;y=+$("#inner-container").attr("data-saleId");n.Sale.Utility.validateSaleAccessible(a.$sales,y,r);n.Sale.Utility.showAgeRestrictionPopup(y);n.Sale.Utility.initSocialSharing();i.products=[];r.productsFiltered&&$.each(r.productsFiltered,function(){var n=this;i.products.push(n.productId)});i.products.length==0&&r.sortedProductIdsList&&(i.products=r.sortedProductIdsList);i.onNavigate=function(n){var t=i.products.indexOf(i.productId)+n;t<0&&(t=i.products.length-1);t>=i.products.length&&(t=0);i.onNavigateTo(i.products[t],!1,a.saleId)};i.onNavigateTo=function(u,f,o){f&&(r.latestFilterConditions=null,r.latestOverviewScrollPosition=0,r.appliedSortingOrder=null,r.productsFiltered=null,i.products=r.sortedProductIdsList);var s=o||n.Dictionary.products[u].SaleId;s==a.saleId?t.Utility.getProductDetailData(a.$sales,i.culture,s,u,function(t){i.$apply(function(){r.currentProduct=t;r.sortedProductIdsList=t.SortedProductIdsList;e.path("/d/"+n.Util.slug(r.currentProduct.Title)+"/"+u)})}):window.location.href=n.Util.productDetailUrl(u)};i.formatDesc=function(n){var i,t,r;return n&&n!=null&&n!=undefined?(i=/&lt;iframe([a-z0-9\-=_?\/. ]|&quot;|&#39;)*&gt;[ ]*&lt;\/iframe&gt;/gim,t=n.match(i),t&&t.length>0&&(r=t[0].replace(/&gt;/gmi,">").replace(/&lt;/gmi,"<").replace(/&quot;/gmi,'"').replace(/&#39;/gmi,"'"),n=n.replace(i,r)),n.replace(/&gt;/gmi,">").replace(/&lt;/gmi,"<").replace(/&quot;/gmi,'"').replace(/&#39;/gmi,"'").replace(new RegExp("\n","g"),"<br/>")):""};i.getPriceHtml=function(t,i){return t==undefined?"&nbsp;":n.Util.getPriceHtml(t,i)};i.onSelectModel=function(n){var t,f,e,u;if(n){if(i.currentModelsAvailability&&(t=i.currentModelsAvailability[n.ModelId],i.modelSelected=t!=null,i.shopPrice=n.ShopPrice,i.unitPrice=n.UnitPrice,i.upPrice=!n.UnitPrice?null:n.UnitPrice.Price,i.upUnit=!n.UnitPrice?null:n.UnitPrice.Unit,i.catalogPrice=n.CatalogPrice,i.hasUnitPrice=n.UnitPrice!=null,i.subtleUnitPrice=n.UnitPrice&&n.UnitPrice.IsSubtle,i.hideCatalogPrice=r.currentProduct.HideCatalogPrice,i.hasHigherPrice=r.currentProduct.HasHigherPrice,t&&t.QuantityInStock>0)){for(i.selectedModel=n,i.selectedModel.DisplayName=n.Name,i.selectedModel.LastPieces=t.LastPieces,f=Math.min(t.QuantityInStock,r.currentProduct.MaxOrderAmount),e=[],u=1;u<=f;u++)e.push(u);i.$apply(function(){i.selectedQuantity=Math.min(Math.max(1,i.selectedQuantity),f);i.quantities=e})}}else i.selectedModel=null,i.selectedQuantity=0,i.quantities=[]};i.onAddToCart=function(){if(!n.authentication.forceAuth(r,!1))if(i.selectedModel)try{n.Util.showLightbox(50,50,n.LightboxModalMode.Full,{message:$("#addToCartWait"),overlayCSS:{backgroundColor:"#fff"}});var u={modelId:i.selectedModel.ModelId,productId:i.productId,modelName:i.selectedModel.Name,catalogPrice:i.selectedModel.CatalogPrice,shopPrice:i.selectedModel.ShopPrice,unitPrice:i.selectedModel.UnitPrice,quantity:i.selectedQuantity,error:"",errorData:null};u.quantity?(i.$on("$viewContentLoaded",function(){n.AnalyticsData.changeProperty("Quantity",u.quantity)}),t.Utility.addProductToCart(i.culture,u.modelId,u.quantity,!1,!1,function(t){i.$apply(function(){if(t.Error&&t.Error.length>0){u.error=t.Error;u.errorData=t.ErrorData;o.onCartEvent("cartItemAddFailed",u);a.UpdateProductAvailability(a)}else if(t.IsSneakPreviewUser)o.onCartEvent("promptPreviewTicket",{modelData:u,availableCurrency:t.AvailableCurrency,isVoucherMode:t.IsVoucherMode,itemAdded:t.ItemAdded});else if(t.AutoTicketUsed){r.isSneakPreview=!1;r.isEarlyAccess=!0;o.onCartEvent("autoUsedPreviewTicket",{modelData:u,availableCurrency:t.AvailableCurrency,isVoucherMode:t.IsVoucherMode,itemAdded:t.ItemAdded})}else a.saleId!=n.Settings.GiftVoucherSaleId?(r.eventToFire="cartItemAdded",r.eventToFireArgs=u,e.path("/o")):l(function(){o.onCartEvent("cartItemAdded",u)});t.Error||n.Util.calAction("CART","ADD_TO_CART_PRODUCT")});$.unblockUI()})):$.unblockUI()}catch(f){$.unblockUI();throw f;}else i.showSizeError=!0};i.selectedQuantity=1;i.currentDetailPhotoIndex=1;i.onHoverPhoto=function(n){i.currentDetailPhotoIndex=n;i.showMannequinOverlay=!1;var t=$(".product-photos .detail-photo .zoom-icon"),r=$(".product-photos .detail-photo .zoom-placeholder");t.show();r.hide()};i.onHoverMannequinPhoto=function(){i.showMannequinOverlay||n.AnalyticsData.fireMannequinSizeCheckEvent();i.currentDetailPhotoIndex=0;i.showMannequinOverlay=!0};i.trackSizeChartClick=function(){n.AnalyticsData.fireSizeChartCheck()};var b=parseInt($("#inner-container").attr("data-saleId")),p=n.Dictionary.sales[b],k=p&&p.Brands&&p.Brands.length>0;i.onMouseOverLogo=function(){k&&(i.showBrandAlertOverLogo=!0)};i.onMouseLeaveLogo=function(){i.showBrandAlertOverLogo=!1};i.getAvailableModel=function(n){var t,r,u;if(i.currentModelsAvailability)for(t=0;t<n.length;t++)if(r=n[t],u=i.currentModelsAvailability[r.ModelId],u&&u.QuantityInStock>0)return r;return null};i.navigateBreadcrumbSale=function(n){r.latestFilterConditions=null;r.latestOverviewScrollPosition=0;e.path(n)};i.navigateBreadcrumbCategory=function(n){r.latestFilterConditions=r.latestFilterConditions||new t.FilterConditions;r.latestFilterConditions.categoriesFiltered=!0;r.latestFilterConditions.categories={};r.latestFilterConditions.subcategories={};r.latestFilterConditions.categories[n]=!0;r.latestOverviewScrollPosition=0;e.path("/o")};i.navigateBreadcrumbSubCategory=function(n){r.latestFilterConditions=r.latestFilterConditions||new t.FilterConditions;r.latestFilterConditions.categoriesFiltered=!0;r.latestFilterConditions.categories={};r.latestFilterConditions.subcategories={};r.latestFilterConditions.subcategories[n]=!0;r.latestOverviewScrollPosition=0;e.path("/o")};i.navigateRelatedProduct=function(t,r,u,f,e){a.$cal.logAction("PRODUCT","OPEN_RECOMMENDED",{saleId:t,productId:r},{context_product_id:f,context_sale_id:u,clicked_index:e});a.$scope.relatedProductAdvice?n.PersuasionApi.LearnAdviceSuccess(a.$scope.relatedProductAdvice):a.$scope.relatedProductStrategy&&a.$scope.relatedProductStrategy!=0&&n.PersuasionApi.Inform(a.$scope.relatedProductStrategy);i.onNavigateTo(r,!0)};i.navigateRecentlyViewed=function(t,u){var f=r.currentProduct.SaleId;if(a.$cal.logAction("PRODUCT","OPEN_RECENT",{saleId:u,productId:t}),u==f)i.onNavigateTo(t,!0);else window.location.href=n.Util.productDetailUrl(t)};i.setProductDefaults=function(){var f,t,e,o,u,h;if(r.currentProduct){for(o=0;o<r.currentProduct.Models.length;o++)u=r.currentProduct.Models[o],(!f||f>u.ShopPrice)&&(f=u.ShopPrice),u.UnitPrice&&(!t||t.Price>u.UnitPrice.Price)&&(t=u.UnitPrice),(!e||e>u.CatalogPrice)&&(e=u.CatalogPrice),u.IsMannequinSize&&(r.currentProduct.MannequinSizeLabel=u.DisplayName);for(i.brandTextHtml=s.trustAsHtml(r.currentProduct.BrandText),i.descriptionHtml=s.trustAsHtml(i.formatDesc(r.currentProduct.Description)),i.disclaimerHtml=s.trustAsHtml(i.formatDesc(r.currentProduct.Disclaimer)),i.colorHtml=s.trustAsHtml(i.formatDesc(r.currentProduct.Color)),i.warrantyHtml=s.trustAsHtml(i.formatDesc(r.currentProduct.Warranty)),i.logisticsHtml=s.trustAsHtml(i.formatDesc(r.currentProduct.Logistics)),i.shopPrice=f,i.unitPrice=t,i.upPrice=!t?null:t.Price,i.upUnit=!t?null:t.Unit,i.catalogPrice=e,i.hideCatalogPrice=r.currentProduct.HideCatalogPrice,i.hasHigherPrice=r.currentProduct.HasHigherPrice,i.hasUnitPrice=!!t,i.subtleUnitPrice=t&&t.IsSubtle,i.modelSelected=!1,i.photoNumbers=[],h=1;h<=r.currentProduct.NumberOfPhotos;h++)i.photoNumbers.push(h);if(r.currentProduct.HasDetailPhoto&&i.photoNumbers.push(0),r.currentProduct.Models.length==1){i.onSelectModel(i.getAvailableModel(r.currentProduct.Models));i.hideSizeInformation=r.currentProduct.Models[0].Name==""}if(n.BrandAlert.isDataLoaded())i.isBrandAlertSubscribed=n.BrandAlert.hasBrand(r.currentProduct.BrandId);else $("body").on("brandAlertDataLoaded",function(){i.isBrandAlertSubscribed=n.BrandAlert.hasBrand(r.currentProduct.BrandId)});n.Storage.getUserData("acc",function(n){var u,e,f,t;if(r.currentProduct.DeliveryGroupShowBannerPlacements){if(u=r.currentProduct.DeliveryGroupId,r.$apply(function(){i.deliveryGroupId=u}),e=!1,f=!1,n&&u!=0){if(n.DeliveryGroupIds!==undefined&&n.DeliveryGroupIds!==null)for(t=0;t<n.DeliveryGroupIds.length;t++)n.DeliveryGroupIds[t]==u&&(e=!0);if(n.ActivatedDeliveryGroupIds!==undefined&&n.ActivatedDeliveryGroupIds!==null)for(t=0;t<n.ActivatedDeliveryGroupIds.length;t++)n.ActivatedDeliveryGroupIds[t]==u&&(f=!0);(n.HasUncFrShpWithSignUpCoupon||n.HasOthUncFrShp)&&(f=!0)}e&&$(".detail-price-group img.deliverygroup.awareness").show();f&&$(".detail-price-group img.deliverygroup.unlocked").show()}})}};i.fireCalEvent=function(){a.$cal.logView("PRODUCT",{saleId:r.currentProduct.SaleId,productId:r.currentProduct.ProductId})};i.clearRecentlyViewed=function(){n.RecentlyViewedProducts.clearProducts();i.recentlyViewedProducts=[];i.$apply(null)};i.blockRecentlyViewedNavigation=!1;i.recentlyViewedNavIndex=0;i.recentlyViewedPaging=function(n){if(!i.blockRecentlyViewedNavigation){var t=$(".product-detail .recently-viewed-products >div"),u=t.find(".recently-viewed-product-container").length,r=parseInt(t.css("left"));n?i.recentlyViewedNavIndex>0&&(i.blockRecentlyViewedNavigation=!0,t.animate({left:r+132+"px"},100,function(){i.blockRecentlyViewedNavigation=!1}),i.recentlyViewedNavIndex--):i.recentlyViewedNavIndex<u-7&&(i.blockRecentlyViewedNavigation=!0,t.animate({left:r-132+"px"},100,function(){i.blockRecentlyViewedNavigation=!1}),i.recentlyViewedNavIndex++)}};i.handleBrandAlertCall=function(t){var r=this;t&&t>0&&(i.isBrandAlertSubscribed?$.ajax({type:"POST",url:"/"+n.Settings.Culture+"/Account/RemoveBrandAlert",data:JSON.stringify({brandId:t,brandName:"",isUserSuggestion:!1}),contentType:"application/json",success:function(r){var u,f;for(n.Util.calAction("OVERVIEW","DISABLE_BRAND_ALERT",{saleId:y},{brand_id:t}),u=0;u<r.length;u++)n.BrandAlert.removeBrand(r[u].BrandId);i.isBrandAlertSubscribed=!1;f=$.Event("brandAlertDataLoaded");$("body").trigger(f)}}):$.ajax({type:"POST",url:"/"+n.Settings.Culture+"/Account/AddBrandAlert",data:JSON.stringify({brandId:t}),contentType:"application/json",success:function(r){var u,f;for(n.Util.calAction("OVERVIEW","ENABLE_BRAND_ALERT",{saleId:y},{brand_id:t}),u=0;u<r.length;u++)n.BrandAlert.addBrand(r[u],!1);i.isBrandAlertSubscribed=!0;f=$.Event("brandAlertDataLoaded");$("body").trigger(f)}}))};r.currentProduct==undefined||r.currentProduct.ProductId!=f.productId?t.Utility.getProductDetailData(a.$sales,n.Settings.Culture,a.saleId,f.productId,function(t){t.Reference==undefined&&window.location.replace(n.Settings.Culture+"/");t.Models&&t.Models.length==0&&(window.location.href=n.Util.saleUrl(a.saleId));r.currentProduct=t;i.fireCalEvent();i.setProductDefaults();i.products.length==0&&(i.products=t.SortedProductIdsList);i.$apply(null)}):(i.fireCalEvent(),i.setProductDefaults());i.metrify=function(n){var t=Math.floor(n/100),i=n-t*100;return t>0?t+"m"+(i==0?"":i+""):i+" cm"};i.expertOpinionOrDefault=function(n,t){return n.ExpertOpinion==null||n.ExpertOpinion.length==0?t:n.ExpertOpinion};i.currentModelsAvailability={};a.UpdateProductAvailability(a);$(document).on("mouseenter",".product-photos .zoom-icon",function(){var n=$(".product-photos .zoom-icon"),t=$(".product-photos .zoom-placeholder");n.hide();t.show();a.handleCloudZoom();n.data("hide-show",!0)});$(document).on("mouseleave",".product-photos .zoom",function(){var n=$(".product-photos .zoom-icon"),t=$(".product-photos .zoom-placeholder");$(".cloudzoom-blank").length==0?(n.show(),t.hide()):$(".cloudzoom-blank").mouseleave(function(){n.show();t.hide()})});if(i.productsDictionary=n.Dictionary.products,n.RecentlyViewedProducts.clearExpiredProducts(),i.recentlyViewedProducts=n.RecentlyViewedProducts.getRecentlyViewedProducts(),i.availabilitiesDictionary=n.Dictionary.availabilities,w=!1,r.productsAll!=undefined){for(v=0;v<r.productsAll.length;v++)if(r.productsAll[v].isExpertSelection&&i.availabilitiesDictionary[r.productsAll[v].productId]!=undefined&&i.availabilitiesDictionary[r.productsAll[v].productId].Quantity>0){w=!0;break}a.$scope.relatedProductAdvice=null;a.$scope.relatedProductStrategy=0;w?r.selectedSortingOrder==t.SortingOrder.Reduction?(a.ShowRelatedProductsPricing(a),a.$scope.relatedProductStrategy=3):r.selectedSortingOrder==t.SortingOrder.Popular?(a.ShowRelatedProductsSocialProof(a),a.$scope.relatedProductStrategy=1):a.$rootScope.expertSelectionActive==!0?(a.ShowRelatedProductsAuthority(a),a.$scope.relatedProductStrategy=2):n.PersuasionApi.GetAdvice(function(t){if(t){switch(t.strategyId){case 1:a.ShowRelatedProductsSocialProof(a);break;case 2:a.ShowRelatedProductsAuthority(a);break;case 3:a.ShowRelatedProductsPricing(a);break;default:a.ShowRelatedProductsControl(a)}n.PersuasionApi.LearnAdviceView(t);a.$scope.relatedProductAdvice=t}else a.ShowRelatedProductsControl(a)}):a.ShowRelatedProductsDefault(a)}else a.ShowRelatedProductsDefault(a);r.$watch("currentProduct",function(){n.TrackPath.initialize();$(".price-legal-advice").show();$(".price-vat-remark").show();!r.currentProduct||r.currentProduct.HideCatalogPrice||$(".price-legal-advice-content").show()});n.RecentlyViewedProducts.addProduct(f.productId);setTimeout(function(){$(window).scrollTop(0)},0);n.AnalyticsData.changeProperty("ProductId",i.productId);n.AnalyticsData.changeProperty("CurrentSalePage","Product");n.AnalyticsData.changeProperty("SaleTitle",$("#inputSaleTitle").val());$(".hovera-trigger").mouseenter(function(){$("#shipping-explanations").addClass("hovera")}).mouseleave(function(){$("#shipping-explanations").removeClass("hovera")});$(".hoverb-trigger").mouseenter(function(){$("#shipping-explanations").addClass("hovera hoverb")}).mouseleave(function(){$("#shipping-explanations").removeClass("hovera hoverb")});$(".detail-models").hoverIntent(function(){var l=$(this),f=l.data("id"),t,u,e,o,s,h,c;if(f&&r.currentProduct&&r.currentProduct.Models){for(u=0,e=r.currentProduct.Models.length;u<e;u++)if(r.currentProduct.Models[u].ModelId==f){t=r.currentProduct.Models[u];break}t?($(".product-detail .detail-prices .retail").hide(),$(".product-detail .detail-prices .shop").hide(),$(".product-detail .detail-prices .unit").not(".hide").hide(),$(".product-detail .detail-prices .hover-price").remove(),o=r.currentProduct.HideCatalogPrice?" no-retail":"",$('<div class="retail hover-price'+o+'"><span class="cur">&euro;<\/span><span class="ord">'+Math.floor(t.CatalogPrice)+',<\/span><span class ="frac">'+n.Util.fract(t.CatalogPrice)+"<\/span>&nbsp;*<\/div>").prependTo(".product-detail .detail-prices"),s=(i.hasHigherPrice=r.currentProduct.HasHigherPrice)?" higher":"",h=$(".product-detail .detail-prices .shop span.from:first"),$('<div class="shop hover-price'+s+'"><span class="cur">&euro;<\/span><span class="ord">'+Math.floor(t.ShopPrice)+',<\/span><span class ="frac">'+n.Util.fract(t.ShopPrice)+"<\/span>"+$(".product-detail .detail-prices span.vat")[0].outerHTML+"<\/div>").prepend(h.clone()).appendTo(".product-detail .detail-prices"),c=!!t.UnitPrice&&!t.UnitPrice.IsSubtle,c&&$('<div class="unit hover-price"><span class="cur">&euro;<\/span><span class="ord">'+Math.floor(t.UnitPrice.Price)+',<\/span><span class ="frac">'+n.Util.fract(t.UnitPrice.Price)+"<\/span>/"+t.UnitPrice.Unit+"<\/div>").appendTo(".product-detail .detail-prices")):($(".product-detail .detail-prices .hover-price").remove(),$(".product-detail .detail-prices .retail").show(),$(".product-detail .detail-prices .unit").not(".hide").show(),$(".product-detail .detail-prices .shop").show())}},function(){$(".detail-prices .hover-price").remove();$(".detail-prices .retail").not(".no-retail").show();$(".detail-prices .unit").not(".hide").show();$(".detail-prices .shop").show()},"div a")}return i.prototype.UpdateProductAvailability=function(n){t.Utility.getProductDetailAvailabilityData(n.$sales,n.saleId,n.$scope.productId,function(t){n.$scope.isSoldOut=t.IsSoldOut&&!t.IsReserved;n.$scope.isReserved=t.IsReserved;n.$scope.currentModelsAvailability={};$.each(t.Models,function(){n.$scope.currentModelsAvailability[this.ModelId]=this});n.$scope.setProductDefaults();n.$scope.$apply(null)})},i.prototype.ShowRelatedProductsDefault=function(i){t.Utility.getRelatedProductsData(i.$sales,i.saleId,i.$routeParams.productId,function(t){for(var f=n.Dictionary.availabilities,u,r=t.length-1;r>=0;r--)u=f[t[r].ProductId],u&&u.Quantity>0&&t[r].ProductId!=i.$scope.productId||t.splice(r,1);i.$scope.relatedProducts=t.splice(0,6);$(".related-products-title > span").hide();$('.related-products-title > span[data-strategy="default"]').show();setTimeout(function(){i.$scope.$apply(null)},0)})},i.prototype.GetRelatedProductsBySortingOrder=function(i,r){var u=i.$rootScope.productsAll.slice(0),o,f,e;for(t.Utility.SortOverviewProducts(u,r),o=n.Dictionary.availabilities,f=u.length-1;f>=0;f--)e=o[u[f].productId],e&&e.Quantity>0&&u[f].productId!=i.$scope.productId||u.splice(f,1);return u.splice(0,6)},i.prototype.GetRelatedProductsByAuthority=function(t){for(var r=t.$rootScope.productsAll.slice(0),s=n.Dictionary.availabilities,f,u,e,o,i=r.length-1;i>=0;i--)f=s[r[i].productId],f&&f.Quantity>0&&r[i].isExpertSelection&&r[i].productId!=t.$scope.productId||r.splice(i,1);if(u=[],r.length>6)while(u.length<6){for(e=Math.floor(Math.random()*(r.length-1)),o=!1,i=0;i<u.length;i++)if(u[i].productId==r[e].productId){o=!0;break}o||u.push(r[e])}else u=r.splice(0,6);return u},i.prototype.ShowRelatedProductsSocialProof=function(n){n.$scope.relatedProducts=n.GetRelatedProductsBySortingOrder(n,t.SortingOrder.Popular);$(".related-products-title > span").hide();$('.related-products-title > span[data-strategy="socialproof"]').show();setTimeout(function(){n.$scope.$apply(null)},0)},i.prototype.ShowRelatedProductsPricing=function(n){n.$scope.relatedProducts=n.GetRelatedProductsBySortingOrder(n,t.SortingOrder.Reduction);$(".related-products-title > span").hide();$('.related-products-title > span[data-strategy="pricing"]').show();setTimeout(function(){n.$scope.$apply(null)},0)},i.prototype.ShowRelatedProductsAuthority=function(n){n.$scope.relatedProducts=n.GetRelatedProductsByAuthority(n);$(".related-products-title > span").hide();$('.related-products-title > span[data-strategy="authority"]').show();setTimeout(function(){n.$scope.$apply(null)},0)},i.prototype.handleCloudZoom=function(){var n=$(".zoom-placeholder img"),t=n.data("CloudZoom");t&&t.destroy();n.CloudZoom({zoomPosition:".product-photos .detail-photo img.main_image",zoomFlyOut:!1,animationTime:0,variableMagnification:!1,zoomSizeMode:"lens"});n.bind("cloudzoom_start_zoom",function(){var t=$(".zoom-placeholder img"),n=t.clone();$(".cloudzoom-blank").append(n);n.css({position:"absolute",left:0,top:0,"z-index":4e3})})},i.prototype.ShowRelatedProductsControl=function(n){var o=n.GetRelatedProductsBySortingOrder(n,t.SortingOrder.Popular),s=n.GetRelatedProductsBySortingOrder(n,t.SortingOrder.Reduction),h=n.GetRelatedProductsByAuthority(n),r=[],c=[],e,f,u,i,l;for(o.length>1&&r.push(o[0]),o.length>2&&r.push(o[1]),e=0,i=0;i<s.length;i++){for(f=!1,u=0;u<r.length;u++)if(s[i].productId==r[u].productId){f=!0;break}if(!f&&(r.push(s[i]),e++,e==2))break}for(e=0,i=0;i<h.length;i++){for(f=!1,u=0;u<r.length;u++)if(h[i].productId==r[u].productId){f=!0;break}if(!f&&(r.push(h[i]),e++,e==2))break}for(i=r.length;i>0;i--)l=Math.floor(Math.random()*i),c=c.concat(r.splice(l,1));n.$scope.relatedProducts=c;$(".related-products-title > span").hide();$('.related-products-title > span[data-strategy="control"]').show();setTimeout(function(){n.$scope.$apply(null)},0)},i.$inject=["$scope","$rootScope","$route","$routeParams","$location","$shopDataService","$sce","$sales","$cal","$timeout"],i}();t.DetailController=i})(t=n.Sale||(n.Sale={}))}(Vex||(Vex={})),function(n){var t;(function(t){var i=function(){function i(i,r,u,f,e,o){var s,h;$("#frameContainer").data("skipframe").toLowerCase()=="true"&&f.path("/o");r.activePage="saleFrame";r.productsImgRoot=$("#frameContainer").data("prdimg-root");i.SaleId=+$("#inner-container").attr("data-saleId");n.Sale.Utility.validateSaleAccessible(e,i.SaleId,r);n.Sale.Utility.showAgeRestrictionPopup(i.SaleId);n.BrandAlert.showBrandAlertHeaderBasedOnSaleId(i.SaleId);i.$on("$viewContentLoaded",function(){n.AnalyticsData.changeProperty("SaleId",+i.SaleId);n.AnalyticsData.changeProperty("SaleTitle",$("#inputSaleTitle").val());n.AnalyticsData.changeProperty("CurrentSalePage","Frame")});r.latestFilterConditions=new t.FilterConditions;r.latestOverviewScrollPosition=0;r.latestOverviewPage=0;$(window).scrollTop(0);s=$(".sidebarContainer > .filterContainer");s.hasClass("hide")&&jQuery.ajax({url:"/"+n.Settings.Culture+"/Sale/FrameCategories/"+i.SaleId}).done(function(n){r.$apply(function(){i.categories={};i.subCategories={};$.each(n.Categories,function(){i.categories[this.CategoryId]=1;this.SubCategories&&$.each(this.SubCategories,function(){i.subcategories[this.SubCategoryId]=1})})});s.removeClass("hide")});n.Storage.getUserData("acc",function(t){var f,s,e,u;if(t&&(t.HasUncFrShpWithSignUpCoupon||t.HasOthUncFrShp||t.HasCondFrShpForLoyaltySegm||t.CouponCodeAdvantageTypeCV!="")?setTimeout(function(){var r=o.getCart();i.$apply(function(){r!=undefined&&r.Items!=undefined&&r.Items.length>0?(i.showFreeShippingUnconditionalBanner=!1,i.showFreeShippingConditionalBanner=!1,i.freeShippingConditionalAmount=0,i.ccGift=!1,i.ccFreeShipping=!1,i.FreeShippingExpirationDate=null,i.CouponCodeAmount=null,i.ThresholdItemsAmount=null,i.CouponCode=null):(i.showFreeShippingUnconditionalBanner=t.HasUncFrShpWithSignUpCoupon||t.HasOthUncFrShp,i.showFreeShippingConditionalBanner=t.HasCondFrShpForLoyaltySegm,i.ccGift=t.CouponCodeAdvantageTypeCV=="Gift",i.ccFreeShipping=t.CouponCodeAdvantageTypeCV=="FreeShipping",i.CouponCodeAmount=t.CouponCodeAmount,i.CouponCodeThresholdAmount=t.CouponCodeThresholdAmount,i.CouponCode=t.CouponCode,t.FreeShippingSignupExpiration!==null&&(i.FreeShippingExpirationDate=n.Util.jsonDateTimeReviver(null,t.FreeShippingSignupExpiration).getTime()),i.freeShippingConditionalAmount=t.HasCondFrShpForLoyaltySegm&&t.LoyaltySegmentCV!=undefined&&t.LoyaltySegmentCV!=null?t.LoyaltySegmentCV=="S"?75:t.LoyaltySegmentCV=="G"?50:0:0)})},0):i.$apply(function(){i.showFreeShippingUnconditionalBanner=!1;i.showFreeShippingConditionalBanner=!1;i.freeShippingConditionalAmount=0;i.ccGift=!1;i.ccFreeShipping=!1;i.FreeShippingExpirationDate=null;i.CouponCodeAmount=null;i.ThresholdItemsAmount=null;i.CouponCode=null}),f=$(".sidebarContainer").data("deliverygroupid"),r.$apply(function(){i.deliveryGroupId=f}),s=!1,e=!1,t&&f>0){if(t.DeliveryGroupIds!==undefined&&t.DeliveryGroupIds!==null)for(u=0;u<t.DeliveryGroupIds.length;u++)t.DeliveryGroupIds[u]==f&&(s=!0);if(t.ActivatedDeliveryGroupIds!==undefined&&t.ActivatedDeliveryGroupIds!==null)for(u=0;u<t.ActivatedDeliveryGroupIds.length;u++)t.ActivatedDeliveryGroupIds[u]==f&&(e=!0);(t.HasUncFrShpWithSignUpCoupon||t.HasOthUncFrShp)&&(e=!0)}s&&$(".sidebarContainer img.deliverygroup.awareness").show();e&&($(".sidebarContainer img.deliverygroup.unlocked").show(),$(".sidebarContainer .free-shipping-banner").addClass("hide"),$(".sidebarContainer .free-shipping-spacer").addClass("hide"))});e.getSaleOverviewAvailabilities(i.SaleId).then(function(){});h=i.SaleId;setTimeout(function(){n.Util.calView("FRAME",{saleId:h})},0);$("#frame-background > img").length>1&&$("#frame-background").slidesjs({width:1027,height:580,play:{effect:"fade",interval:5e3,auto:!0},navigation:{active:!1},pagination:{active:!1},effect:{fade:{speed:800}}});i.navigateToCategory=function(n){r.latestFilterConditions=new t.FilterConditions;r.latestFilterConditions.categoriesFiltered=!0;r.latestFilterConditions.categories[n]=!0;f.path("/o")};i.navigateToSubCategory=function(n){r.latestFilterConditions=new t.FilterConditions;r.latestFilterConditions.categoriesFiltered=!0;r.latestFilterConditions.subcategories[n]=!0;f.path("/o")}}return i.$inject=["$scope","$rootScope","$route","$location","$sales","$shopDataService"],i}();t.FrameController=i})(t=n.Sale||(n.Sale={}))}(Vex||(Vex={})),function(n){var t;(function(t){var i,r;(function(n){n[n.None=0]="None";n[n.Categories=1]="Categories";n[n.Models=2]="Models";n[n.Both=3]="Both"})(i=t.CounterUpdate||(t.CounterUpdate={}));r=function(){function r(i,u,f,e,o,s,h,c,l,a,v){function ot(){n.Storage.getUserData("acc",function(t){t!==undefined&&t!==null&&(t.HasUncFrShpWithSignUpCoupon||t.HasOthUncFrShp||t.HasCondFrShpForLoyaltySegm||t.CouponCodeAdvantageTypeCV!="")?setTimeout(function(){var i=o.getCart();u.$apply(function(){i!=undefined&&i.Items!=undefined&&i.Items.length>0?(u.showFreeShippingUnconditionalBanner=!1,u.showFreeShippingConditionalBanner=!1,u.freeShippingConditionalAmount=0,u.ccGift=!1,u.ccFreeShipping=!1,u.FreeShippingExpirationDate=null,u.CouponCodeAmount=null,u.CouponCodeThresholdAmount=null,u.CouponCode=null):(u.showFreeShippingUnconditionalBanner=t.HasUncFrShpWithSignUpCoupon||t.HasOthUncFrShp,u.showFreeShippingConditionalBanner=t.HasCondFrShpForLoyaltySegm,u.ccGift=t.CouponCodeAdvantageTypeCV=="Gift",u.ccFreeShipping=t.CouponCodeAdvantageTypeCV=="FreeShipping",u.CouponCodeAmount=t.CouponCodeAmount,u.CouponCodeThresholdAmount=t.CouponCodeThresholdAmount,u.CouponCode=t.CouponCode,t.FreeShippingSignupExpiration!==null&&(u.FreeShippingExpirationDate=n.Util.jsonDateTimeReviver(null,t.FreeShippingSignupExpiration).getTime()),u.freeShippingConditionalAmount=t.HasCondFrShpForLoyaltySegm&&t.LoyaltySegmentCV!=undefined&&t.LoyaltySegmentCV!=null?t.LoyaltySegmentCV=="S"?75:t.LoyaltySegmentCV=="G"?50:0:0)})},0):u.$apply(function(){u.showFreeShippingUnconditionalBanner=!1;u.showFreeShippingConditionalBanner=!1;u.freeShippingConditionalAmount=0;u.ccGift=!1;u.ccFreeShipping=!1;u.FreeShippingExpirationDate=null;u.CouponCodeAmount=null;u.CouponCodeThresholdAmount=null;u.CouponCode=null})})}var y,d,st,nt,it,rt,ct,ut,tt,lt,ft,at,w,g,p,et;if(this.filterAidSettings={},this.filterAidMessage={},this.filterAidViewed=!1,this.crossSaleData=null,this.crossSaleLoaded=!1,y=this,y.$rootScope=i,y.$cal=h,y.$sales=s,y.$filteraid=l,y.$http=a,i.productsImgRoot=$("#overviewContainer").data("prdimg-root"),y.$scope=u,u.culture=n.Settings.Culture,$("html").hasClass("lt-ie9")&&(t.Utility.overviewPageSize=60),y.$rootScope.activePage="saleOverview",r.lazyImageElements={},r.lazyDetailImageElements={},i.latestOverviewPage=i.latestOverviewPage||0,y.$flashOverlay=$("#flashOverlay"),y.saleId=+$("#inner-container").attr("data-saleId"),y.hideCatalogPrice=c.hideCatalogPrice,y.$filteraid.getSettings().then(function(n){y.filterAidSettings=n}),y.$filteraid.getMessage(y.saleId).then(function(n){y.filterAidMessage=n}),n.Sale.Utility.validateSaleAccessible(s,y.saleId,i),n.Sale.Utility.showAgeRestrictionPopup(y.saleId),y.skipFrame=$("#overviewContainer").data("skipframe").toLowerCase()=="true",n.Sale.Utility.initSocialSharing(),n.BrandAlert.showBrandAlertHeaderBasedOnSaleId(y.saleId),n.Storage.getUserData("acc",function(n){var t=$("#IsPopupSale").data("ispopupsale")=="true",r=n!==undefined&&n!==null&&(n.HasUncFrShpWithSignUpCoupon||n.HasOthUncFrShp)||t,f=$("#overviewContainer").data("fssale");u.showFreeShippingTileMessage=(r||f)&&!i.isDdgSale;$(".productContainer").toggleClass("fs-msg",u.showFreeShippingTileMessage);$(".productContainer .product").toggleClass("fs-msg",u.showFreeShippingTileMessage)}),d=$.cookie("Usr"),d&&(d=angular.fromJson(d),y.token=d.Token),y.$rootScope.selectedSortingOrder=t.SortingOrder.None,y.$rootScope.savedSortingOrder=t.SortingOrder.None,y.initializeCategoryDictionaries(i),!i.latestOverviewColumns)try{i.latestOverviewColumns=3;st=$.parseJSON($.cookie("shopSet"));nt=st.OverviewColumns;nt!=undefined&&nt!=null&&(i.latestOverviewColumns=nt)}catch(vt){}$(".productContainer").removeClass("col2 col3").addClass("col"+i.latestOverviewColumns);$(".gridswitch-btn > i, .gridswitch-btn a").removeClass("active");$(".gridswitch-btn > i[data-columns="+i.latestOverviewColumns+"], .gridswitch-btn a[data-columns="+i.latestOverviewColumns+"]").addClass("active");$(".gridswitch").hide();y.checkBreadcrumbWidth();var k=$(window),b=$("<div />").attr("id","overview-navarrow").hide().attr("data-visible","false").prependTo("body"),ht=$("#main-container");k.resize(function(){b.css("left",ht.offset().left+ht.width()+39+"px");b.css("top",Math.max(190,k.innerHeight()/2-30)+"px")}).resize();b.click(function(){k.scrollTop(0)});it=0;u.onWindowScroll=function(n){var rt=i.latestFilterConditions&&i.latestFilterConditions.models&&_.keys(i.latestFilterConditions.models).length,t,tt,u,e;if(!rt&&n&&n.type==="scroll"){var o=$(window).scrollTop(),l=o>it?"down":"up",a=$(".product").height(),ut=a*y.filterAidSettings.showAfter/3,ft=a*y.filterAidSettings.hideAfter/3,v=function(){$("#overviewContainer").popover("destroy");$(".filterContainer").removeAttr("style")};window.destroyFilterAidPopover=v;l==="up"||l==="down"&&y.filterAidMessage&&o>ft?v():l==="down"&&y.filterAidMessage&&o>ut&&y.filterAidViewed===!1&&(h.logEvent("OVERVIEW","SHOW_FILTER_TIP",{saleId:y.saleId}),$("#overviewContainer").popover({html:!0,title:"<span><strong>"+y.filterAidMessage.title+'<\/strong><\/span><button type="button" onclick="destroyFilterAidPopover()" class="close">&times;<\/button>',content:y.filterAidMessage.description,trigger:"manual",placement:"right"}).popover("show"),$(".filterContainer").css("border-color","#0FA4D0"),y.$filteraid.markViewed(y.saleId),y.filterAidViewed=!0);var p=$(window).scrollTop()+$(window).height()-300,w=$("#overviewContainer + .popover"),d=$(".filterContainer").offset().top+$(".filterContainer").height()-(182+w.outerHeight()),et=$(".filterContainer").width()+21;w.removeClass("grey").addClass("filter-aid").css({top:d>p?p:d,left:et});it=o}var g=k.height(),s=g,f=k.scrollTop(),c=f+g,nt=$("#footer").offset().top;f>1e3&&c<nt&&b.attr("data-visible")=="false"&&b.attr("data-visible","true").fadeIn();(f<500||c-200>nt)&&b.attr("data-visible")=="true"&&b.attr("data-visible","false").fadeOut();t=r.lazyImageElements[i.latestOverviewColumns];t&&t.length>0&&(tt="data-src"+i.latestOverviewColumns,e=$(t[0]).height(),t.each(function(){var n=$(this),u=+n.offset().top,o=u+e;return u>c+s?!1:(o>f-s&&(n.attr("src",n.attr(tt)).attr("data-active",i.latestOverviewColumns),r.lazyImageElements[i.latestOverviewColumns]=t=t.not(this)),!0)}));u=r.lazyDetailImageElements[i.latestOverviewColumns];u&&u.length>0&&(e=$(u[0]).height(),u.each(function(){var n=$(this),t=+n.offset().top,o=t+e;return t>c+s?!1:(o>f-s&&(n.attr("src",n.attr("data-alt")).attr("data-active",i.latestOverviewColumns),r.lazyDetailImageElements[i.latestOverviewColumns]=u=u.not(this)),!0)}))};k.off("scroll.overview").on("scroll.overview",u.onWindowScroll);for(i.productsAll&&i.productsAll.length!=0||(rt=$("#overviewContainer").data("soldout"),i.hideSoldOut=rt=="Hide",i.showSoldOutLast=rt=="Last",i.productsAll=c.products),u.modelDictionary={},p=0,ct=i.productsAll.length;p<ct;p++)for(i.productsAll[p].OriginalOrder=p,i.productsAll[p].ReductionOrder=+(i.productsAll[p].catalogPrice-i.productsAll[p].shopPrice).toFixed(2),ut=i.productsAll[p],tt=0,lt=ut.models.length;tt<lt;tt++)ft=ut.models[tt],u.modelDictionary[ft.modelId]=ft;for(at=i.productsAll.length,w=0;w<c.categories.length;w++){for(p=0;p<i.productsAll.length;p++)i.productsAll[p].categoryId==c.categories[w].categoryId&&i.productsAll[p].subCategoryId==null&&(i.productsAll[p].CategoryOrder=(w+1)*1e3);for(g=0;g<c.categories[w].subCategories.length;g++)for(p=0;p<i.productsAll.length;p++)i.productsAll[p].categoryId==c.categories[w].categoryId&&i.productsAll[p].subCategoryId==c.categories[w].subCategories[g].subCategoryId&&(i.productsAll[p].CategoryOrder=(w+1)*1e3+g+1)}i.productsOrdered&&i.productsOrdered.length!=0||(i.productsOrdered=i.productsAll.slice(0));u.clearRecentlyViewed=function(){n.RecentlyViewedProducts.clearProducts();u.recentlyViewedProductsFirst=[];u.recentlyViewedProductsSecond=[];u.$apply(null)};u.navigateRecentlyViewed=function(t,i){if(y.$cal.logAction("PRODUCT","OPEN_RECENT",{saleId:i,productId:t}),i==y.saleId)y.onNavigateTo(e,t,!0);else window.location.href=n.Util.productDetailUrl(t)};n.Storage.getUserData("acc",function(n){var r=$("#overviewContainer").data("deliverygroupid"),e,f,t;if(i.$apply(function(){u.deliveryGroupId=r}),e=!1,f=!1,n&&r>0){if(n.DeliveryGroupIds!==undefined&&n.DeliveryGroupIds!==null)for(t=0;t<n.DeliveryGroupIds.length;t++)n.DeliveryGroupIds[t]==r&&(e=!0);if(n.ActivatedDeliveryGroupIds!==undefined&&n.ActivatedDeliveryGroupIds!==null)for(t=0;t<n.ActivatedDeliveryGroupIds.length;t++)n.ActivatedDeliveryGroupIds[t]==r&&(f=!0);(n.HasUncFrShpWithSignUpCoupon||n.HasOthUncFrShp)&&(f=!0)}e&&$(".sidebarContainer img.deliverygroup.awareness").show();f&&($(".sidebarContainer img.deliverygroup.unlocked").show(),$(".sidebarContainer .free-shipping-banner").addClass("hide"),$(".sidebarContainer .free-shipping-spacer").addClass("hide"),u.$apply(function(){u.forceNoBanner=!0}))});s.getSaleOverviewAvailabilities(y.saleId).then(function(n){y.initializeAvailabilities(n);i.availabilitiesLoaded=!0;y.performInitialLoad(i,u,e,o,v)});u.availabilitiesDictionary=n.Dictionary.availabilities;u.productsDictionary=n.Dictionary.products;n.RecentlyViewedProducts.clearExpiredProducts();et=n.RecentlyViewedProducts.getRecentlyViewedProducts();u.recentlyViewedProductsFirst=et.slice(0,6);u.recentlyViewedProductsSecond=et.slice(6,12);i.availabilitiesLoaded&&y.performInitialLoad(i,u,e,o,v);$(".productContainer").on("click",".btn.brand-alert",function(){var u=$(this),t=+$("#inner-container").attr("data-saleId"),i=n.Dictionary.sales[t],r;i&&i.Brands.length==1?(r=i.Brands[0].BrandId,$.ajax({type:"POST",url:"/"+n.Settings.Culture+"/Account/AddBrandAlert",data:JSON.stringify({brandId:r}),contentType:"application/json",success:function(i){var e,f,o;for(n.Util.calAction("OVERVIEW","ENABLE_BRAND_ALERT",{saleId:t},{brand_id:r}),e=!1,f=0;f<i.length;f++)n.BrandAlert.addBrand(i[f],!1),e=e||i[f].IncludeInHeader;e&&refreshBrandAlertHeader();u.removeClass("active");$("#brand-alert-active").addClass("active");$(".brandalert-container .brandalert .button .inactive").addClass("hide");$(".brandalert-container .brandalert .button .active").removeClass("hide");n.BrandAlert.BrandAlertHeader.IsActive=!1;n.Header.setActiveDefaultPanel();$(".header-favorite-message.brand-alert-calltoaction").addClass("hide");$(".header-favorite-message.default").removeClass("hide");o=$.Event("brandAlertDataLoaded");$("body").trigger(o)}})):(buildBrandAlertLightbox(t),n.Util.showLightbox(697,500,n.LightboxModalMode.Semi,{message:$("#brand-alert-lightbox")}))});ot();u.$on("cartItemAdded",function(){ot()});u.$on("cartUpdated",function(){ot()})}return r.prototype.showBrandAlertTile=function(){var t=+$("#inner-container").attr("data-saleId"),i=n.Dictionary.sales[t];i&&i.Brands.length>0&&!n.BrandAlert.hasSale(t)?$("#brandAlertProductTile").removeClass("hide"):$("#brandAlertProductTile").addClass("hide")},r.prototype.hideBrandAlertTile=function(){$("#brandAlertProductTile").addClass("hide")},r.prototype.loadCrossSaleFooter=function(){var t=this,i;$("#cross-sale-footer").length==1&&($("#cross-sale-footer .cross-sale[id!='cross-sale-template']").remove(),$("#cross-sale-footer").show(),$("#cross-sale-footer-inview").hide(),$("#cross-sale-loading").show(),i=$("#crossSaleProductPageSize").val(),t.crossSaleData==null?(n.Storage.getUserData("acc",function(){$.ajax({type:"GET",url:"/"+n.Settings.Culture+"/Sale/GetAllSalesCrossSaleProducts",data:{saleId:t.saleId,productPageSize:i},success:function(n){t.useUserSaleRankings=n.UseUserSaleRankings;t.$cal.logEvent("OVERVIEW","CROSS_SALE_SHOWN",{saleId:t.saleId},{useUserRanking:this.useUserSaleRankings,location:"BOTTOM"});t.crossSaleData=n;n!=null&&n!=""&&t.displayCrossSaleFooter()}})}),$("#cross-sale-footer .nav-container .nav.left, #cross-sale-footer .nav-container .nav.right").click(function(){var n=$("#crossSalePageIndex").val(),r=$("#crossSalePageSize").val(),u=$("#crossSaleTotalSaleCount").val(),i=Math.ceil(u/r);$(this).attr("class").indexOf("left")>=0?n>1?n--:n=i:n==i?n=1:n++;$("#crossSalePageIndex").val(n);t.displayCrossSaleFooter()})):t.displayCrossSaleFooter())},r.prototype.displayCrossSaleFooter=function(){var o=this,e,r,i,l,a,p,v,s,u,t,y;$("#cross-sale-footer .cross-sale[id!='cross-sale-template']").remove();var d=$("#defaultNumberOfItems").val(),f=this.crossSaleData,w=$("#crossSalePageIndex").val(),h=$("#crossSalePageSize").val(),g=$("#crossSaleProductPageSize").val();$("#crossSaleTotalSaleCount").val(f.TotalSaleCount);f.TotalSaleCount<=h?$("#cross-sale-footer .nav-container").hide():$("#cross-sale-footer .nav-container").show();var b=$("#cross-sale-template"),k=0,c=(w-1)*h;for(e=c;e<Math.min(f.Sales.length-c,h)+c;e++)if(r=f.Sales[e],r.Products.length>0){i=b.clone();i.attr("id","cross-sale-"+r.SaleId);k++==0&&i.addClass("first-sale");i.find("#cross-sale-saleId").val(r.SaleId);i.find(".cross-sale-logo img").attr("src",i.find(".cross-sale-logo input").val().replace("/42/","/"+r.SaleId+"/"));l=i.find("#cross-sale-product-template");a=i.find(".cross-sale-products");e==f.Sales.length-1&&a.attr("class","cross-sale-products cross-sale-last");p=i.find("#openSaleUrl").val().replace("SLUG1",n.Util.slug(r.SaleTitle)).replace("42#",r.SaleId+"#");v=i.find(".cross-sale-logo a, a.sale-frame-link");v.attr("href",p);v.on("click",function(){o.$cal.logAction("OVERVIEW","CROSS_SALE",{saleId:o.saleId},{useUserRanking:this.useUserSaleRankings,location:"BOTTOM"})});for(i.find("a.sale-frame-link").text(i.find("a.sale-frame-link").text().replace("XX",r.ProductsNumber)),s=0;s<r.Products.length;s++){u=r.Products[s];t=l.clone();t.attr("id","cross-sale-product-"+u.ProductId);t.find("img").attr("src",t.find("input").val().replace("/42/","/"+r.SaleId+"/").replace("/PRODREFERENCE","/"+u.Reference));y=t.find("a");y.attr("href",n.Util.productDetailUrl(u.ProductId));y.on("click",function(){o.$cal.logAction("OVERVIEW","CROSS_SALE",{saleId:o.saleId,productId:u.ProductId},{useUserRanking:this.useUserSaleRankings,location:"BOTTOM"})});t.find(".pricewrapper .shop .ord").text(Math.floor(u.Price)+",");t.find(".pricewrapper .shop .frac").text(n.Util.fract(u.Price));u.HasHigherPrice?t.find(".pricewrapper .shop").addClass("higher").addClass("active"):t.find(".pricewrapper .shop").removeClass("higher").removeClass("active");u.HideCatalogPrice?t.find(".pricewrapper .retail").hide():(t.find(".pricewrapper .retail").show(),t.find(".pricewrapper .retail .ord").text(Math.floor(u.CatalogPrice)+","),t.find(".pricewrapper .retail .frac").text(n.Util.fract(u.CatalogPrice)));a.append(t);t.show()}l.remove();$("#cross-sale-sales").append(i);i.show()}$("#cross-sale-loading").hide()},r.onTissueShotHovered=function(){var i=$(this).find("img"),u=i.attr("data-replace-alt"+i.attr("data-active")),n=$(this).parents(".product").find(".container img:first"),t="src",r;n.attr("data-href")&&(t="data-href");r=n.attr(t);n.attr(t,u);(n.attr("data-original-alt")==undefined||n.attr("data-original-alt").length<=0)&&n.attr("data-original-alt",r);$(this).addClass("hover")},r.onTissueShotHoveredOut=function(n){var r=$(this).parents(".product").find(".container"),t=r.find("img:first"),u=$(n.toElement||n.relatedTarget),i=u.is("img")&&u.parents(".product").find(".container").is(r)?t.attr("data-original-alt"):t.attr("data-original-src");i!=undefined&&i.length>0&&t.attr("src",i);t.attr("data-original-alt","");$(this).removeClass("hover")},r.onProductShotHovered=function(){var i=$(this).parents(".product").find("> .container > img.second-pic"),r=i.attr("data-replace2-alt"+i.attr("data-active")),n,t,u;r!=undefined&&r.length>0&&(n=i,t="src",n.attr("data-href")&&(t="data-href"),u=n.attr(t),n.attr(t,r))},r.onProductShotHoveredOut=function(n){var t=$(this).parents(".product").find("> .container > img.second-pic"),r=t.parents(".product").find(".container"),i=$(n.toElement||n.relatedTarget);i.parents(".product").find(".container").is(r)&&i.closest(".product-detail-shot").length||t.attr("src",t.attr("data-original-src"))},r.prototype.fireCalEvent=function(){var n="SORT_BY_TYPE";switch(this.$rootScope.selectedSortingOrder){case t.SortingOrder.Popular:n="SORT_BY_POPULARITY";break;case t.SortingOrder.Reduction:n="SORT_BY_ADVANTAGE"}this.$cal.logView("OVERVIEW",{saleId:this.saleId},{sortOrder:n,imageSize:this.$rootScope.latestOverviewColumns==2?"SHOW_LARGER_IMAGES":"SHOW_SMALLER_IMAGE"})},r.prototype.initializeCategoryDictionaries=function(n){(n.categoryDictionary==null||n.subCategoryDictionary==null)&&(n.categoryDictionary={},n.subCategoryDictionary={},$("div.categoryWrapper").each(function(){var i=$(this),t={CategoryId:+i.find(".category input").attr("value"),Name:i.find(".category label").html(),SubCategories:[]};i.children(".subcategory").each(function(){var r=$(this),i={SubCategoryId:+r.find("input").attr("value"),ParentCategory:t,ParentCategoryId:t.CategoryId,Name:r.find("label").html()};t.SubCategories.push(i);n.subCategoryDictionary[i.SubCategoryId]=i});n.categoryDictionary[t.CategoryId]=t}))},r.prototype.initializeAvailabilities=function(n){var u=this,r,i,t;for(r in n)i=n[r],t=u.$scope.modelDictionary[r],t&&(t.AvailableQuantity=i.quantity,t.AvailableInCarts=i.inCarts,t.HalfSoldOut=i.halfSoldOut)},r.prototype.flashOverlay=function(n){var t=this,i=$(window),r;t.$flashOverlay.css("width",$("div.productContainer").width());t.$flashOverlay.css("height",Math.min(i.height()+2e3,$("div.productContainer").height()));t.$flashOverlay.css("top",Math.max(i.scrollTop()-1e3,$("div.topContainer").height()));t.$flashOverlay.css("left",$("div.sidebarContainer").outerWidth());t.$flashOverlay.show();setTimeout(function(){n()},0);r=setTimeout(function(){t.$flashOverlay.hide()},200)},r.prototype.performInitialLoad=function(u,f,e,o,s){var b=$(window),c=$(document),h=this,w,v;h.$categoryCheckboxes=$("input[name=categories]");h.$subcategoryCheckboxes=$("input[name=subcategories]");h.$modelCheckboxes=$("input[name=models]");h.$showSoldoutCheckbox=$("input[name=availability]");h.$expertSelectionCheckbox=$("input[name=expert]");var y=function(){var t=$(this),n=u.latestFilterConditions||h.getCurrentFilterConditions(e.search()),r=Object.keys(n.models).length,f=Object.keys(n.categories).length,o=Object.keys(n.subcategories).length,s=t.parent(),l=t.parents(".categoryWrapper"),c=t.attr("name"),i=t.is(":checked");switch(c){case"subcategories":h.$cal.logAction("OVERVIEW",i?"SELECT_SUBCATEGORY":"DESELECT_SUBCATEGORY",{saleId:h.saleId},{name:t.parent().find("label").text(),categoryId:t.parent().parent().find("input").first().attr("value"),subCategoryId:t.attr("value"),selectedModels:r,selectedCategories:f,selectedSubCategories:o+(i?1:-1),showSoldout:n.showSoldout,expertSelection:n.expertSelection});break;case"categories":h.$cal.logAction("OVERVIEW",i?"SELECT_CATEGORY":"DESELECT_CATEGORY",{saleId:h.saleId},{name:t.parent().find("label").text(),categoryId:t.attr("value"),selectedModels:r,selectedCategories:f+(i?1:-1),selectedSubCategories:o,showSoldout:n.showSoldout,expertSelection:n.expertSelection});break;case"models":h.$cal.logAction("OVERVIEW",i?"SELECT_SIZE":"DESELECT_SIZE",{saleId:h.saleId},{name:t.attr("value"),filterGroupId:s.parent().parent().attr("id").substring(12),filterId:t.attr("id").substring(7),selectedModels:r+(i?1:-1),selectedCategories:f,selectedSubCategories:o,showSoldout:n.showSoldout,expertSelection:n.expertSelection});break;case"expert":h.$cal.logAction("OVERVIEW",i?"SELECT_EXPERT":"DESELECT_EXPERT",{saleId:h.saleId},{selectedModels:r,selectedCategories:f,selectedSubCategories:o,showSoldout:n.showSoldout,expertSelection:i});break;case"availability":h.$cal.logAction("OVERVIEW",i?"SELECT_AVAILABILITY":"DESELECT_AVAILABILITY",{saleId:h.saleId},{selectedModels:r,selectedCategories:f,selectedSubCategories:o,showSoldout:n.showSoldout,expertSelection:n.expertSelection})}},l=function(){var n=$(this),f=n.parent(),i=n.parents(".categoryWrapper"),e=n.attr("name"),r=n.is(":checked"),t,u;switch(e){case"subcategories":f.toggleClass("active",r);t=!1;r&&(u=i.find("[name=subcategories]"),t=u.length==u.filter(":checked").length);i.find("[name=categories]").prop("checked",t).parent().toggleClass("active",t);break;case"categories":f.toggleClass("active",r);i.find("[name=subcategories]").prop("checked",!1).parent().toggleClass("active",!1)}},p=function(n){var t,i,r;for(t in n.categories)h.$categoryCheckboxes.filter("[value="+t+"]").prop("checked",n.categories[t]==!0).each(l);for(i in n.subcategories)h.$subcategoryCheckboxes.filter("[value="+i+"]").prop("checked",n.subcategories[i]==!0).each(l);for(r in n.models)h.$modelCheckboxes.filter("[value='"+r+"']").prop("checked",n.models[r]==!0).each(l);h.$showSoldoutCheckbox.prop("checked",!n.showSoldout).each(l);h.$expertSelectionCheckbox.prop("checked",n.expertSelection==!0).each(l);h.$rootScope.expertSelectionActive=n.expertSelection==!0},a=function(){h.$rootScope.savedSortingOrder=h.$rootScope.selectedSortingOrder;var n=u.latestFilterConditions||h.getCurrentFilterConditions(e.search(),window.location.search);p(n);h.setSortButtons();h.applyProductsFilter(n,!0);h.applyPaging();setTimeout(function(){h.runAfterRender();setTimeout(function(){if(u.eventToFire&&u.eventToFire.length>0){var n=u.eventToFire,t=u.eventToFireArgs;u.eventToFire=null;u.eventToFireArgs=null;o.onCartEvent(n,t)}},0)},0)};h.$http.get(n.Settings.ApiRoot+n.Settings.Culture+"/users/"+h.token+"/metadata").then(function(n){switch(n.data.preferences.ui&&n.data.preferences.ui.productSortOrder){case"Type":h.$rootScope.selectedSortingOrder=t.SortingOrder.None;break;case"Advantage":h.$rootScope.selectedSortingOrder=t.SortingOrder.Reduction;break;case"Popularity":h.$rootScope.selectedSortingOrder=t.SortingOrder.Popular}h.fireCalEvent();a()},function(){a()});c.off("click","#pagingContainer .next").on("click","#pagingContainer .next",function(){return h.setPage(u.latestOverviewPage+1),!1});c.off("click","#pagingContainer .previous").on("click","#pagingContainer .previous",function(){return h.setPage(u.latestOverviewPage-1),!1});c.off("click","#pagingContainer .pager").on("click","#pagingContainer .pager",function(){return h.setPage(+$(this).attr("data-page")),!1});c.off("click","#overviewContainer .product .addtocart button").on("click","#overviewContainer .product .addtocart button",function(i){var c,l,r,a;if(n.authentication.forceAuth(u,!0))return i.preventDefault(),i.stopPropagation(),!1;for(c=+$(this).closest("div.product").addClass("hover").data("id"),$(".addtocart button:visible").not(this).popover("destroy").closest("div.product").removeClass("hover"),r=0,a=u.productsOrdered.length;r<a;r++)if(u.productsOrdered[r].productId==c){l=u.productsOrdered[r];break}return t.Utility.getProductDetailAvailabilityData(h.$sales,h.saleId,c,function(t){if(t.IsReserved||t.IsSoldOut){h.$sales.getSaleOverviewAvailabilities(h.saleId).then(function(i){h.initializeAvailabilities(i);u.availabilitiesLoaded=!0;h.performInitialLoad(u,f,e,o,s);setTimeout(function(){n.Sale.Utility.showAddToCartPopover(l,h.$rootScope.productsImgRoot,t.Models,u.latestOverviewColumns,o,u)},0)});return}u.$apply(function(){n.Sale.Utility.showAddToCartPopover(l,h.$rootScope.productsImgRoot,t.Models,u.latestOverviewColumns,o,u)})}),i.preventDefault(),i.stopPropagation(),!1});c.off("click","#overviewContainer .product").on("click","#overviewContainer .product",function(){var n=$(this);if(!n.hasClass("brandalert-container")){var r=+n.attr("data-id"),t={"class":n.attr("class"),totalIndex:n.attr("data-cal-ix"),availableIndex:n.attr("data-cal-ix-noso"),totalSize:n.attr("data-cal-length"),isExpert:n.attr("data-cal-expert")},i=n.attr("data-cal-avail");i!=""&&i!="99"&&(t=_.extend(t,{availableQuantity:i}));h.$cal.logAction("OVERVIEW","OPEN_PRODUCT",{saleId:h.saleId,productId:r},t);h.onNavigateTo(e,r,!1)}});c.off("click","#overviewContainer .showall .link").on("click","#overviewContainer .showall .link",function(){h.$cal.logAction("OVERVIEW","SHOW_ALL_PRODUCTS",{saleId:h.saleId});h.flashOverlay(function(){$("div.filter input:checked").prop("checked",!1).each(l);h.fireCalEvent();h.applyOriginalOrdering(i.Both)})});c.off("click","#overviewContainer .filter .reset").on("click","#overviewContainer .filter .reset",function(){var n=$(this);n.attr("class").match("categories")?h.$cal.logAction("OVERVIEW","RESET_CATEGORIES",{saleId:h.saleId}):h.$cal.logAction("OVERVIEW","RESET_SIZES",{saleId:h.saleId});h.flashOverlay(function(){n.parents("div.filter").find("input:checked").prop("checked",!1).each(l);n.hasClass("categories")?(h.fireCalEvent(),h.applyOriginalOrdering(i.Models)):h.applyFilters(i.Categories)})});c.off("click","#overviewContainer .btn.showOther").on("click","#overviewContainer .btn.showOther",function(){h.flashOverlay(function(){$("div.filter input:checked").prop("checked",!1).each(l);h.fireCalEvent();h.applyAppendOtherProducts()})});c.off("click","#overviewContainer ul.breadcrumb a").on("click","#overviewContainer ul.breadcrumb a",function(){var t=$(this),r=t.parent(),f=$(".popover"),o;if(f.length>0&&f.remove(),!r.hasClass("active")){o=t.attr("class");switch(o){case"home":window.location.href="/"+n.Settings.Culture;break;case"sale":h.skipFrame?h.flashOverlay(function(){h.$categoryCheckboxes.prop("checked",!1).each(l);h.fireCalEvent();h.applyOriginalOrdering(i.Models)}):u.$apply(function(){$("#overviewContainer").html("");$("#overview-navarrow").remove();u.latestOverviewPage=0;u.latestOverviewScrollPosition=0;e.path("/f")});break;case"allproducts":h.flashOverlay(function(){h.$categoryCheckboxes.prop("checked",!1).each(l);h.$cal.logAction("OVERVIEW","SHOW_ALL_PRODUCTS",{saleId:h.saleId});h.fireCalEvent();h.applyOriginalOrdering(i.Models)});break;case"category":h.flashOverlay(function(){h.$subcategoryCheckboxes.filter(":checked").prop("checked",!1).each(l);h.$categoryCheckboxes.not(":checked").prop("checked",!1).each(l);h.$categoryCheckboxes.filter("[value='"+r.data("id")+"']").prop("checked",!0).each(l);h.fireCalEvent();h.applyOriginalOrdering(i.Models)})}}return!1});w=$("#overviewContainer").offset();c.off("change","#overviewContainer .filter input").on("change","#overviewContainer .filter input",function(){var n=this;return h.flashOverlay(function(){l.apply(n);y.apply(n);var t=$(n).attr("name");switch(t){case"categories":case"subcategories":h.applyFilters(i.Models);h.fireCalEvent();break;case"models":h.applyFilters(i.Categories);break;default:h.applyFilters(i.Both)}setTimeout(function(){h.ensureOverviewContainerPosition()},0)}),!0});c.off("click",".gridswitch a").on("click",".gridswitch a",function(t){var e,i,o;for(u.latestOverviewColumns=+$(this).attr("data-columns"),$(".gridswitch-btn > i, .gridswitch-btn a").removeClass("active"),$(".gridswitch-btn > i[data-columns="+u.latestOverviewColumns+"], .gridswitch-btn a[data-columns="+u.latestOverviewColumns+"]").addClass("active"),$(".productContainer").removeClass("col2 col3").addClass("col"+u.latestOverviewColumns),e=$("div.product"),i=0,o=e.length;i<o;i++)$(e[i]).toggleClass("rowstarter",i%u.latestOverviewColumns==0);u.latestOverviewColumns&&(jQuery.ajax({url:"/"+n.Settings.Culture+"/Sale/SetOverviewColumns/",type:"POST",data:JSON.stringify({columnCount:u.latestOverviewColumns}),contentType:"application/json; charset=utf-8"}),h.$cal.logAction("OVERVIEW",u.latestOverviewColumns==2?"SHOW_LARGER_IMAGES":"SHOW_SMALLER_IMAGE",{saleId:h.saleId}));r.lazyImageElements[2]=$("div.product img[data-active!=2]");r.lazyImageElements[3]=$("div.product img[data-active!=3]");r.lazyDetailImageElements[2]=$("div.product img[data-active!=2]");r.lazyDetailImageElements[3]=$("div.product img[data-active!=3]");f.onWindowScroll(t);t.preventDefault()});c.off("click",".expertPersona").on("click",".expertPersona",function(){h.$expertSelectionCheckbox.prop("checked",!h.$expertSelectionCheckbox.prop("checked")).change()});h.$expertSelectionCheckbox.off("change").on("change",function(){!h.$expertSelectionCheckbox.prop("checked")||n.PersuasionApi.Inform(2);u.expertSelectionActive=h.$expertSelectionCheckbox.prop("checked")});v={0:"Type",1:"Advantage",2:"Popularity"};s.isEnabled("reorder-items-educational-only-once").then(function(n){n&&($("#reorder-items-educational-only-once").popover({html:!0,content:function(){return $($(this).data("content-selector")).html()}}),$("#reorder-items-educational-only-once").popover("show"),$("#reorder-items-educational-only-once").hover(function(){$("#reorder-items-educational-only-once").popover("hide").popover("destroy")}),$("#reorder-items-educational-only-once").click(function(){$("#reorder-items-educational-only-once").popover("hide").popover("destroy")}))});c.off("click",".sort-controls .sortTrigger").on("click",".sort-controls .sortTrigger",function(){var r=$(this).data("sortingorder");switch(r){case t.SortingOrder[t.SortingOrder.Popular]:h.$rootScope.selectedSortingOrder!=t.SortingOrder.Popular&&(h.$rootScope.selectedSortingOrder=t.SortingOrder.Popular,n.PersuasionApi.Inform(1),h.$cal.logAction("OVERVIEW","SORT_BY_POPULARITY",{saleId:h.saleId}));break;case t.SortingOrder[t.SortingOrder.Reduction]:h.$rootScope.selectedSortingOrder!=t.SortingOrder.Reduction&&(h.$rootScope.selectedSortingOrder=t.SortingOrder.Reduction,n.PersuasionApi.Inform(3),h.$cal.logAction("OVERVIEW","SORT_BY_ADVANTAGE",{saleId:h.saleId}));break;default:h.$rootScope.selectedSortingOrder=t.SortingOrder.None;h.$cal.logAction("OVERVIEW","SORT_BY_TYPE",{saleId:h.saleId})}$(this).blur();h.setSortButtons();h.applyFilters(i.None);h.$rootScope.savedSortingOrder==h.$rootScope.selectedSortingOrder?$("#sortingPersist").prop("checked",!0):$("#sortingPersist").removeProp("checked");h.$scope.$apply()});c.off("change","#sortingPersist").on("change","#sortingPersist",function(){if(this.checked==!0){var t=v[h.$rootScope.selectedSortingOrder];h.$http.put(n.Settings.ApiRoot+n.Settings.Culture+"/users/"+h.token+"/metadata/preferences",{ui:{productSortOrder:t}}).then(function(){h.$rootScope.savedSortingOrder=h.$rootScope.selectedSortingOrder})}});f.blockRecentlyViewedOverviewNavigation=!1;f.recentlyViewedOverviewFirstShown=!1;f.recentlyViewedPaging=function(n){if(!f.blockRecentlyViewedOverviewNavigation){var t=$(".sidebarContainer .recently-viewed-products >div");n?f.recentlyViewedOverviewFirstShown&&(f.blockRecentlyViewedOverviewNavigation=!0,t.find(".first").animate({"margin-left":"0px"},500,function(){f.blockRecentlyViewedOverviewNavigation=!1}),f.recentlyViewedOverviewFirstShown=!1):f.recentlyViewedOverviewFirstShown||(f.blockRecentlyViewedOverviewNavigation=!0,t.find(".first").animate({"margin-left":"-248px"},500,function(){f.blockRecentlyViewedOverviewNavigation=!1}),f.recentlyViewedOverviewFirstShown=!0)}}},r.prototype.runAfterRender=function(){var t=this,i;t.updateBreadcrumb();t.updateCategoryCounters();t.updateModelCounters();t.updateExpertCounters();$(".filterContainer").addClass("ready");t.$scope.onWindowScroll(null);n.AnalyticsData.updateCategoriesAndSubCategories();n.AnalyticsData.changeProperty("SaleId",+t.saleId);n.AnalyticsData.changeProperty("SaleTitle",$("#inputSaleTitle").val());n.AnalyticsData.changeProperty("CurrentSalePage","Overview");$("#cross-sale-footer-inview").show();$(".recently-viewed-container").removeClass("hide");$(".price-legal-advice").show();$(".price-vat-remark").show();t.hideCatalogPrice||$(".price-legal-advice-content").show();t.crossSaleLoaded||(t.crossSaleLoaded=!0,$("#cross-sale-footer-inview").bind("inview",function(n,i){i&&t.loadCrossSaleFooter()}));i=$(window).scrollTop();n.SideBar.trigger(i)},r.prototype.onNavigateTo=function(i,r,u){var f=this;u&&(f.$rootScope.latestFilterConditions=null,f.$rootScope.latestOverviewScrollPosition=0,f.$rootScope.appliedSortingOrder=null,f.$rootScope.productsFiltered=null);f.$rootScope.latestOverviewScrollPosition=+$(window).scrollTop();t.Utility.getProductDetailData(f.$sales,f.$scope.culture,f.saleId,r,function(t){f.$scope.$apply(function(){$(".recently-viewed-container").addClass("hide");$("#cross-sale-footer-inview, #cross-sale-footer").hide();$(".price-legal-advice").hide();$(".price-vat-remark").hide();$("#overviewContainer").html("");$("#overview-navarrow").remove();f.$rootScope.currentProduct=t;u&&(f.$rootScope.sortedProductIdsList=t.SortedProductIdsList);i.path("/d/"+n.Util.slug(f.$rootScope.currentProduct.Title)+"/"+r)})})},r.prototype.applyProductsFilter=function(i,r){var u=this,h,d,c,ut,e,p,ft,s,l,et,w;u.$rootScope.latestFilterConditions=i;u.$scope.modelCounts={};u.$scope.categoryCounts={};u.$scope.subCategoryCounts={};u.$scope.expertCount=0;this.$rootScope.selectedSortingOrder||(this.$rootScope.selectedSortingOrder=t.SortingOrder.None);u.$rootScope.selectedSortingOrder!=u.$rootScope.appliedSortingOrder&&(u.$rootScope.selectedSortingOrder!=t.SortingOrder.Popular&&u.$rootScope.selectedSortingOrder!=t.SortingOrder.Reduction&&(u.$rootScope.selectedSortingOrder=t.SortingOrder.None),t.Utility.SortOverviewProducts(u.$rootScope.productsOrdered,u.$rootScope.selectedSortingOrder,i),u.$rootScope.appliedSortingOrder=u.$rootScope.selectedSortingOrder);var b=0,a=[],k=[];for(h=0,d=u.$rootScope.productsOrdered.length;h<d;h++){var f=u.$rootScope.productsOrdered[h],g=!i.categoriesFiltered||i.categories[f.categoryId]==!0||i.subcategories[f.subCategoryId]==!0,ot=!i.expertSelection||f.isExpertSelection,v=!1,o=0,nt=0,tt=0,it=0,rt=!1,y={};for(c=0,ut=f.models.length;c<ut;c++)e=f.models[c],v=v||e.AvailableQuantity>0||e.AvailableInCarts>0,p=i.models[e.name]==!0,p&&(rt=!0),(!i.modelsFiltered||p)&&(e.AvailableQuantity==99?o=99:o+=e.AvailableQuantity,it+=e.AvailableInCarts,e.HalfSoldOut&&nt++,tt++),g&&(y[e.name]=i.showSoldout||e.AvailableQuantity+e.AvailableInCarts>0?1:0);if(ft=nt*2>=tt,o>f.stockWarnThreshold&&(o=99),s=!1,o>50?f.CssClass=ft?"available halfway":"available":o==0?(s=it==0,f.CssClass=s?"soldout":"reserved"):f.CssClass="available lastpieces",f.AvailableQuantity=o,!u.$rootScope.hideSoldOut||v){b++;for(l in y)u.$scope.modelCounts[l]=y[l]+(u.$scope.modelCounts[l]||0);et=u.$scope.categoryCounts[f.categoryId]=u.$scope.categoryCounts[f.categoryId]||0;w=0;f.subCategoryId&&(w=u.$scope.subCategoryCounts[f.subCategoryId]=u.$scope.subCategoryCounts[f.subCategoryId]||0);(i.showSoldout||!s)&&(!i.modelsFiltered||rt)&&ot&&(u.$scope.categoryCounts[f.categoryId]=1+et,f.subCategoryId&&(u.$scope.subCategoryCounts[f.subCategoryId]=1+w),g&&(u.$rootScope.showSoldOutLast&&s?k.push(f):(a.push(f),f.isExpertSelection&&u.$scope.expertCount++)))}}r||($("html").hasClass("lt-ie9")||setTimeout(function(){var t=$(window).scrollTop();n.SideBar.trigger(t)},0),u.$rootScope.latestOverviewPage=0);u.$rootScope.appliedSortingOrder=null;u.$rootScope.productsFiltered=a.concat(k);u.$rootScope.allProductsShown=a.length==b||!i.categoriesFiltered&&!i.modelsFiltered},r.prototype.applyOriginalOrdering=function(n){var t=this;t.$rootScope.productsOrdered=t.$rootScope.productsAll.slice(0);t.applyFilters(n)},r.prototype.applyAppendOtherProducts=function(){for(var r=this,f=[],e={},t,n=0,u=r.$rootScope.productsFiltered.length;n<u;n++)t=r.$rootScope.productsFiltered[n],f.push(t),e[t.productId]=!0;for(n=0,u=r.$rootScope.productsOrdered.length;n<u;n++)t=r.$rootScope.productsOrdered[n],e[t.productId]!=!0&&f.push(t);r.$rootScope.productsOrdered=f;r.applyFilters(i.Both)},r.prototype.setPage=function(n){var t=this;t.$rootScope.latestOverviewPage!=n&&(t.fireCalEvent(),t.$rootScope.latestOverviewPage=n,t.applyPaging(),t.$scope.$apply(function(){setTimeout(function(){$(window).scrollTop(0);t.$scope.onWindowScroll(null)},0)}))},r.prototype.applyQueryStringFilter=function(n,t,i,r){var u=(t||{})[r]||(n||{})[r];u&&_.forEach(u.split(","),function(n){i[r][n]=i.categoriesFiltered=!0})},r.prototype.getQueryString=function(n){var r=n&&n.substr(1).split("&"),u,t,i;if(!r)return{};for(u={},t=0;t<r.length;++t)i=r[t].split("=",2),u[i[0]]=i.length==1?"":decodeURIComponent(i[1].replace(/\+/g," "));return u},r.prototype.getCurrentFilterConditions=function(n,i){n===void 0&&(n=null);i===void 0&&(i=null);var u=this,r=new t.FilterConditions;return this.applyQueryStringFilter(n,this.getQueryString(i),r,"categories"),this.applyQueryStringFilter(n,this.getQueryString(i),r,"subcategories"),u.$categoryCheckboxes.filter(":checked").each(function(){r.categories[$(this).val()]=r.categoriesFiltered=!0}),u.$subcategoryCheckboxes.filter(":checked").each(function(){r.subcategories[$(this).val()]=r.categoriesFiltered=!0}),u.$modelCheckboxes.filter(":checked").each(function(){r.models[$(this).val()]=r.modelsFiltered=!0}),r.showSoldout=!u.$showSoldoutCheckbox.is(":checked"),r.expertSelection=u.$expertSelectionCheckbox.is(":checked"),r},r.prototype.applyFilters=function(t){var r=this,u=$(".popover"),f;u.length>0&&u.remove();f=r.getCurrentFilterConditions();r.applyProductsFilter(f,!1);r.$scope.$apply(function(){r.applyPaging();setTimeout(function(){(t==i.Categories||t==i.Both)&&r.updateCategoryCounters();(t==i.Models||t==i.Both)&&(r.updateBreadcrumb(),r.updateModelCounters());r.updateExpertCounters();r.$scope.onWindowScroll(null);n.AnalyticsData.updateCategoriesAndSubCategories();n.AnalyticsData.updateFilters()},0)})},r.prototype.setSortButtons=function(){var n=this;$(".sort-btn .btn-group .btn").removeClass("btn-success active");$(".sort-btn .btn-group .so-"+t.SortingOrder[n.$rootScope.selectedSortingOrder]).addClass("btn-success active");$(".sort-drop .sortswitch a").removeClass("active");$(".sort-drop .sortswitch a.so-"+t.SortingOrder[n.$rootScope.selectedSortingOrder]).addClass("active");$(".sort-drop .sorted-on").hide();$(".sort-drop .sorted-on.so-"+t.SortingOrder[n.$rootScope.selectedSortingOrder]).show()},r.prototype.applyPaging=function(){var i=this,u=$("#pagingContainer"),e=u.find(".pager.template"),r=Math.ceil(i.$rootScope.productsFiltered.length/t.Utility.overviewPageSize),f;for(i.$rootScope.latestOverviewPage>r-1&&(i.$rootScope.latestOverviewPage=r-1),i.$rootScope.latestOverviewPage<0&&(i.$rootScope.latestOverviewPage=0),u.find(".rendered").remove(),f=0;f<r;f++)e.clone().removeClass("hide template").addClass("rendered").attr("data-page",f).html(f+1+"").insertBefore(e);if(u.toggleClass("hide",r<2),u.find(".pager").removeClass("active"),u.find(".pager[data-page="+i.$rootScope.latestOverviewPage+"]").addClass("active"),u.find(".previous").toggleClass("hide",i.$rootScope.latestOverviewPage==0),u.find(".next").toggleClass("hide",i.$rootScope.latestOverviewPage==r-1),$("div.buttonContainer button.showOther").toggleClass("hide",i.$rootScope.productsFiltered.length==0||i.$rootScope.latestOverviewPage<r-1||i.$rootScope.allProductsShown),i.$scope.productsPaged=i.$rootScope.productsFiltered.slice(i.$rootScope.latestOverviewPage*t.Utility.overviewPageSize,(i.$rootScope.latestOverviewPage+1)*t.Utility.overviewPageSize),r==1||i.$rootScope.latestOverviewPage==r-1)if(n.BrandAlert.isDataLoaded())this.showBrandAlertTile();else{i=this;$(document).on("brandAlertDataLoaded",".brandalert-container",function(){i.showBrandAlertTile()})}else i.hideBrandAlertTile()},r.prototype.updateCategoryCounters=function(){var n=this;$("input[name=categories]").each(function(){var r=$(this),t=r.parent(),u=+r.attr("value"),i=n.$scope.categoryCounts[u];i>=0?(t.find(".count .inner").html(i+""),t.toggleClass("disabled",i<=0),t.find("input").prop("disabled",i<=0),t.show()):t.hide()});$("input[name=subcategories]").each(function(){var r=$(this),t=r.parent(),u=+r.attr("value"),i=n.$scope.subCategoryCounts[u];i>=0?(t.find(".count .inner").html(i+""),t.toggleClass("disabled",i<=0),t.find("input").prop("disabled",i<=0),t.show()):t.hide()});$(".sidebarContainer > .filterContainer").removeClass("hide")},r.prototype.updateExpertCounters=function(){var t=this,n=$("input[name=expert]");n.length>0&&n.parent().find(".count .inner").html(t.$scope.expertCount+"")},r.prototype.updateModelCounters=function(){var n=this;$("div.filter.group").each(function(){var t=$(this),i=!1;t.find("input[name=models]").each(function(){var u=$(this),t=u.parent(),r=n.$scope.modelCounts[u.attr("value")];r>=0?(t.find(".count .inner").html(""+r||"0"),t.toggleClass("disabled",r==0),t.find("input").prop("disabled",r==0),t.show(),i=!0):t.hide()});t.toggle(i)})},r.prototype.updateBreadcrumb=function(){var i=this,r=$("input[name=categories]:checked"),n=$("input[name=subcategories]:checked"),f,u,t,e;$(".breadcrumb li.allproducts").removeClass("active");$(".breadcrumb li.cat").addClass("hide").removeClass("active");$(".breadcrumb li.subcat").addClass("hide").removeClass("active");$(".breadcrumb li.selection").addClass("hide").removeClass("active");r.length==0&&n.length==0?$(".breadcrumb li.allproducts").addClass("active"):r.length==1?(f=r.parents(".categoryWrapper").find("input[name=subcategories]:checked"),n.length==0||f.length==n.length?(t=i.$rootScope.categoryDictionary[r.val()],$(".breadcrumb li.cat").addClass("active").removeClass("hide").attr("data-id",t.CategoryId).find(".content").html(t.Name)):$(".breadcrumb li.selection").addClass("active").removeClass("hide")):n.length>0?(u=n.parents(".categoryWrapper"),u.length==1?(t=i.$rootScope.categoryDictionary[u.find("input[name=categories]").val()],$(".breadcrumb li.cat").removeClass("hide").attr("data-id",t.CategoryId).find(".content").html(t.Name),n.length==1?(e=i.$rootScope.subCategoryDictionary[n.val()],$(".breadcrumb li.subcat").addClass("active").removeClass("hide").find(".content").html(e.Name)):$(".breadcrumb li.selection").addClass("active").removeClass("hide")):$(".breadcrumb li.selection").addClass("active").removeClass("hide")):$(".breadcrumb li.selection").addClass("active").removeClass("hide");i.checkBreadcrumbWidth()},r.prototype.checkBreadcrumbWidth=function(){var n=this,t=$(".breadcrumb").outerWidth()>400;$(".sort-controls").toggleClass("wideBreadCrumb",t);$(".sortswitch").hide();n.setSortButtons()},r.prototype.ensureOverviewContainerPosition=function(){var n=$(window),i=n.scrollTop(),t=n.height(),r=$("#overviewContainer"),u=r.offset().top,f=r.height(),e=$(".productContainer"),o=e.offset().top,s=e.height();$("#overviewContainer").css("min-height",$(".sidebarContainer").actual("outerHeight")+30);i+t>u+f&&n.scrollTop(u+f-t);o+s<i+200&&$(window).scrollTop(o+s-t)},r.$inject=["$rootScope","$scope","$route","$location","$shopDataService","$sales","$cal","saleData","$filteraid","$http","$features"],r}();t.OverviewController=r})(t=n.Sale||(n.Sale={}))}(Vex||(Vex={}));shopModule.controller("Sale.OverviewController",Vex.Sale.OverviewController),function(n){var t;(function(t){function r(n){$(function(){var t=$("#frame-background");t.slidesjs({width:t.width(),height:580,play:{effect:"fade",interval:5e3,auto:!0},navigation:{active:!1,effect:"fade"},pagination:{active:!1},effect:{fade:{speed:800}}});$(".slidesjs-navigation").hide();n>1&&$("#full-teaser").hover(function(){$(".slidesjs-navigation").show()},function(){$(".slidesjs-navigation").hide()})})}var i=function(){function t(t,i,r,u,f){n.Sale.Utility.validateSaleTeaser(f,+$("#full-teaser").data("sale-id"))}return t.$inject=["$scope","$rootScope","$route","$location","$sales"],t}();t.TeaserController=i;n.Modules.register("Teaser",{documentLoading:function(t){var i=t("#saleId").val();t("body").on("brandAlertDataLoaded",function(){var r=n.Dictionary.sales[i];r&&r.HasBrand&&(n.BrandAlert.hasSale(i)?(t("#brand-alert-active").addClass("active"),t("#brand-alert-inactive").removeClass("active")):(t("#brand-alert-inactive").addClass("active"),t("#brand-alert-active").removeClass("active")))})},documentReady:function(t){t("#brand-alert-inactive").on("click",function(){var f=t(this),i=t("#saleId").val(),r=n.Dictionary.sales[i],u;r&&r.Brands.length==1?(u=r.Brands[0].BrandId,t.ajax({type:"POST",url:"/"+n.Settings.Culture+"/Account/AddBrandAlert",data:JSON.stringify({brandId:u}),contentType:"application/json",success:function(r){var o,e;for(n.Util.calAction("TEASER","ENABLE_BRAND_ALERT",{saleId:i},{brand_id:u}),o=!1,e=0;e<r.length;e++)n.BrandAlert.addBrand(r[e],!1),o=o||r[e].IncludeInHeader;o&&refreshBrandAlertHeader();f.removeClass("active");t("#brand-alert-active").addClass("active")}})):(buildBrandAlertLightbox(i),n.Util.showLightbox(697,500,n.LightboxModalMode.Semi,{message:t("#brand-alert-lightbox")}))});t("#brand-alert-active").on("click",function(){var u=t(this),i=t("#saleId").val(),f=n.Dictionary.sales[i],r;f.Brands.length==1?(r=f.Brands[0].BrandId,u.removeClass("active"),t.ajax({type:"POST",url:"/"+n.Settings.Culture+"/Account/RemoveBrandAlert",data:JSON.stringify({brandId:r,brandName:"",isUserSuggestion:!1}),contentType:"application/json",success:function(f){var o,e;for(n.Util.calAction("TEASER","DISABLE_BRAND_ALERT",{saleId:i},{brand_id:r}),o=!1,e=0;e<f.length;e++)n.BrandAlert.removeBrand(f[e].BrandId,f[e].SaleId),o=o||f[e].IncludeInHeader;o&&refreshBrandAlertHeader();u.removeClass("active");t("#brand-alert-inactive").addClass("active")}})):(buildBrandAlertLightbox(i),n.Util.showLightbox(697,500,n.LightboxModalMode.Semi,{message:t("#brand-alert-lightbox")}))});t("#brand-alert-active .action > a").click(function(n){n.stopPropagation()});var r=t("#saleId").val(),i=n.Dictionary.sales[r];i&&i.HasBrand&&t("#brand-alert-teaser-container").removeClass("hide")}});t.activateImageSlides=r})(t=n.Sale||(n.Sale={}))}(Vex||(Vex={}));shopModule.controller("Vex.Sale.TeaserController",Vex.Sale.TeaserController),function(n){var t;(function(t){var r=n.Settings.Culture,i=$("#inner-container").attr("data-saleId");n.AnalyticsData.SaleId=+i||0;n.AnalyticsData.SaleTitle=$("#inputSaleTitle").val();var o=angular.module("sale",["shop","ngRoute"]).config(["$routeProvider",function(n){n.when("/f",{templateUrl:"/"+r+"/Sale/_Frame/"+i,controller:t.FrameController}).when("/o",{templateUrl:"/"+r+"/Sale/_Overview/"+i,controller:"Sale.OverviewController",resolve:{saleData:["$sales",function(n){return n.getSaleOverviewData(i)}]}}).when("/h",{templateUrl:"/"+r+"/Sale/_Halted/"+i,controller:t.HaltedController}).when("/d/:productSlug/:productId/t/:vertical/:trendingProductId",{templateUrl:"/"+r+"/Sale/_Detail/"+i,controller:t.DetailController}).when("/d/:productSlug/:productId",{templateUrl:"/"+r+"/Sale/_Detail/"+i,controller:t.DetailController}).otherwise({redirectTo:"/f"})}]).directive("productTiles",function(){return{template:"<div><\/div>",replace:!0,restrict:"E",compile:function(){return{post:u}}}}).directive("productReservedModels",function(){return{template:"<span><\/span>",replace:!0,restrict:"E",compile:function(){return{post:f}}}}).directive("productModels",function(){return{template:"<div><\/div>",replace:!0,restrict:"E",compile:function(){return{post:e}}}}).run(["$rootScope","$location","$sales",function(t,r,u){document.cookie.indexOf("_gs=1")>=0&&(localStorage.setItem("_gs",Date.now().toString()),document.cookie="_gs=; expires=Thu, 01 Jan 1970 00:00:01 GMT;");t.$on("$routeChangeStart",function(){localStorage.getItem("_gs")&&Date.now()-parseInt(localStorage.getItem("_gs"))<3e3||n.authentication.forceAuth(t,!1)});t.settings=n.Util.clone(n.Settings);t.$on("$routeChangeStart",function(){u.getSale(parseInt(i),!1).then(function(n){var t=$.cookie("Previewing");!t&&r.path()!="/h"&&n&&n.haltedStateCV&&r.path("/h")})})}]),u=function(t,i,r){var u=r;t.$watch("productsPaged",function(r){var p,o,l,h,v,rt,ut,ft,et,y;if(r){p=t.latestOverviewColumns==3;$("#noproducts").toggle(r.length==0);var w=document.createDocumentFragment(),e,ot=n.Util.htmlEncode(u.soldout),st=n.Util.htmlEncode(u.reserved),ht=n.Util.htmlEncode(u.reservedexplanation).replace(new RegExp("\n","g"),"<br />"),ct=n.Util.htmlEncode(u.halfsoldout),lt=n.Util.htmlEncode(u.lastpiece),at=n.Util.htmlEncode(u.lastpiecestemplate),b=u.expertimage,c=!1,vt='<p class="free-shipping">'+n.Util.htmlEncode(u.freeshipping)+"<\/p>",yt='<div class="overlay"><div class="explanation"><div>'+ht+"<\/div><\/div><\/div>",pt='<p class ="details"><span class ="link internal">'+n.Util.htmlEncode(u.details)+'<\/span><\/p><div class ="clearfix"><\/div><div class="addtocart"><button class="btn btn-primary" data-class="gold"><i class="icon-addtocart">&nbsp;<\/i><\/button><\/div><\/div>',k=0;for(o=0,l=r.length;o<l;o++){var f=r[o],s=t.productsImgRoot+encodeURIComponent(f.reference)+(f.highTile&&"_H"||""),d=s+"_1_3M2.jpg",g=s+"_1_3M1.jpg",kt=f.hasDetailPhoto,nt="/Content/images/bg/transparent.png",a=[],tt=p?g:d;if(o<12&&(nt=tt),h=f.CssClass||"",f.highTile?(h+=" hightile",c=!0):c=!1,o%t.latestOverviewColumns==0&&(h+=" rowstarter"),t.showFreeShippingTileMessage&&(h+=" fs-msg"),f.unitPrice!=null&&f.unitPrice.isSubtle==!1&&(h+=" up"),v="",f.hasDetailPhoto){var wt=s+"_0_3M2.jpg",bt=s+"_0_3M1.jpg",it="/Content/images/bg/transparent.png";o<12&&(it=s+"_0_S.jpg");v=['<div class="product-detail-shot"><img src="',it,'" data-alt="',s,'_0_S.jpg" data-active="" data-replace-alt2="',wt,'" data-replace-alt3="',bt,'" /><\/div>'].join("")}f.numberOfPhotos>1&&!f.highTile&&(rt=' data-replace2-alt2="'+s+'_2_3M2.jpg"',ut=' data-replace2-alt3="'+s+'_2_3M1.jpg"',a[a.length]="second-pic");e=document.createElement("div");e.className="product "+h;e.setAttribute("data-id",""+f.productId);e.setAttribute("data-cal-ix",""+(o+1));e.setAttribute("data-cal-ix-noso",""+(k+1));e.setAttribute("data-cal-length",""+l);e.setAttribute("data-cal-avail",""+f.AvailableQuantity);e.setAttribute("data-cal-expert",""+f.isExpertSelection);f.AvailableQuantity>0&&k++;ft=b==""||!f.isExpertSelection?"":'<div class="expert-image" style="background-image: url(\''+b+"')\"><\/div>";et=[ft,v,yt,'<div class="availability"><p class="lastpieces">',f.AvailableQuantity==1?lt:at.replace("{0}",""+f.AvailableQuantity),'<\/p><p class="reserved">',st,'<\/p><p class="soldout">',ot,'<\/p><p class="halfway">',ct,'<\/p><\/div><div class="container">','<img class="'+a.join(" ")+'" src="',nt,'" data-original-src="'+tt+'" data-active="" data-src2="',d,'" data-src3="',g,'"',rt,ut," />",'<p class="brand">'+f.brandName+"<\/p>",'<p class="title">',n.Util.htmlEncode(f.title),"<\/p>",vt,'<p class="catalogPrice"><span class="pricewrapper">'+(f.hideCatalogPrice?"":n.Util.getPriceHtml(f.catalogPrice,"&nbsp;*"))+"<\/span><\/p>",'<p class="shopPrice'+(f.hasHigherPrice?" higher active":"")+'"><span class="from">'+u.fromprice+'<\/span><span class="cur">&euro;<\/span><span class="ord">',""+Math.floor(f.shopPrice),',<\/span><span class ="frac">',n.Util.fract(f.shopPrice),"<\/span>",f.unitPrice!=null&&!f.unitPrice.isSubtle?'<span class="unitPrice"><span class="pricewrapper">'+n.Util.getPriceHtml(f.unitPrice.price)+"/"+f.unitPrice.unit+"<\/span><\/span><\/p>":"<\/p>",pt];e.innerHTML=et.join("");w.appendChild(e)}y=document.getElementById("brandAlertProductTile");y.innerHTML=$(".brandalert-template").html();y.className="product brandalert-container"+((c?" hightile":"")+($("#brandAlertProductTile").hasClass("hide")||r.length==0?" hide":""));i.html("");i.append(w);n.Sale.OverviewController.lazyImageElements[2]=i.find("img[data-active!=2]");n.Sale.OverviewController.lazyImageElements[3]=i.find("img[data-active!=3]");n.Sale.OverviewController.lazyDetailImageElements[2]=i.find("img[data-active!=2]");n.Sale.OverviewController.lazyDetailImageElements[3]=i.find("img[data-active!=3]");env.touch||(i.find(".product").hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")}),$("body .productContainer .product-detail-shot").hoverIntent(n.Sale.OverviewController.onTissueShotHovered,n.Sale.OverviewController.onTissueShotHoveredOut),$("body .productContainer .product > .container > img.second-pic").hoverIntent(n.Sale.OverviewController.onProductShotHovered,n.Sale.OverviewController.onProductShotHoveredOut),$("body .productContainer .product > .container > img.second-pic").mouseout(n.Sale.OverviewController.onProductShotHoveredOut),$("body .productContainer .product > div.expert-image").hoverIntent(n.Sale.OverviewController.onProductShotHovered,n.Sale.OverviewController.onProductShotHoveredOut),$("body .productContainer .product > div.expert-image").mouseout(n.Sale.OverviewController.onProductShotHoveredOut));t.latestOverviewScrollPosition>0&&($(window).scrollTop(t.latestOverviewScrollPosition),t.latestOverviewScrollPosition=0)}})},f=function(n,t){n.$watch("currentProduct.Models",function(i){n.$watch("currentModelsAvailability",function(n){var r,o,u,s,e,f;if(t.html(""),i&&i.length>0&&i[0].Name!="")for(t.append("<br />("+$(".has-models-sentence").text()),r=$("<strong><\/strong>"),t.append(r),t.append(")<br />"),o=0,u=0,s=i.length;u<s;u++)e=i[u],f=n[e.ModelId],f&&f.QuantityInStock==0&&f.QuantityInCart>0&&(o++>0&&r.append(", "),r.append(e.Name))})})},e=function(t,i){t.$watch("currentProduct.Models",function(r){var o,e,s,c,f,u,h;if(r){for(o=$(".detail-models"),o.removeClass("hide"),e=0,i.html(""),s=0,c=r.length;s<c;s++){f=r[s];u=$('<a href="javascript:void(0)" data-class="narrow gray">'+n.Util.htmlEncode(f.DisplayName)+"<\/a>");u.toggleClass("selected",t.selectedModel!=null&&f.ModelId==t.selectedModel.ModelId);u.attr("id","model-"+f.ModelId);u.attr("data-id",f.ModelId);u.attr("data-names",JSON.stringify({Name:f.Name,AlternativeNames:f.AlternativeNames}));t.currentModelsAvailability&&n.Sale.Utility.applyModelAvailability(u,t.currentModelsAvailability[f.ModelId]);o.append(u);h=u.width();h>50&&h>e&&(e=h);u.remove();i.append(u);u.on("click",f,function(n){t.onSelectModel(n.data)});env.touch&&u.hover(function(){return $(this).trigger("click"),!0},function(){})}o.toggleClass("hide",r.length==0);e>0&&i.find("a").each(function(){$(this).css("width",e)})}});t.$watch("currentModelsAvailability",function(t){t&&i.find("a").each(function(){var i=$(this);i.popover("hide").popover("destroy");n.Sale.Utility.applyModelAvailability(i,t[i.data("id")])})});t.$watch("selectedModel",function(n){n&&i.find("a").each(function(){var n=$(this),i=n.data("id");n.toggleClass("selected",i==t.selectedModel.ModelId)})})}})(t=n.Sale||(n.Sale={}))}(Vex||(Vex={})),function(n){var t;(function(t){function u(){$(document).on("click","#snf-connect",function(){var t=$("#snf-connect");FB.login(function(u){u.status=="connected"&&u.authResponse&&$.ajax({type:"POST",data:JSON.stringify({facebookId:u.authResponse.userID,accessToken:u.authResponse.accessToken}),contentType:"application/json; charset=utf-8",url:"/"+n.Settings.Culture+"/account/facebookconnect",success:function(n){n.Status=="Success"?($("#snf-disconnected").removeClass("active"),$("#snf-connected").addClass("active"),$("#snf-connected").find(".subtext").html(n.Email)):(i(),n.Status=="FacebookEmailRequired"?r(t,"#popover-snfemailrequired"):n.Status=="FacebookAccountAlreadyInUse"?r(t,"#popover-snfalreadyinuse"):n.Status=="AccountAlreadyLinkedToFacebook"&&r(t,"#popover-snfalreadylinked"))}})},{scope:"email,public_profile",auth_type:"rerequest"})});$(document).on("click","#snf-disconnect",function(){var t=$("#snf-disconnect");FB.login(function(u){u.status=="connected"&&u.authResponse&&$.ajax({type:"POST",data:JSON.stringify({facebookId:u.authResponse.userID,accessToken:u.authResponse.accessToken}),contentType:"application/json; charset=utf-8",url:"/"+n.Settings.Culture+"/account/facebookdisconnect",success:function(n){i();n.Status=="Success"?($("#snf-disconnected").addClass("active"),$("#snf-connected").removeClass("active")):n.Status=="AccountNotConnectedToFacebook"||n.Status=="FacebookDeauthorizeFailed"&&r(t,"#popover-snfdeauthorizefailed")}})},{scope:"email,public_profile"})});$(document).on("click","#snf-extend",function(){var t=$("#snf-extend");FB.login(function(t){t.status=="connected"&&t.authResponse&&$.ajax({type:"POST",data:JSON.stringify({facebookId:t.authResponse.userID,accessToken:t.authResponse.accessToken}),contentType:"application/json; charset=utf-8",url:"/"+n.Settings.Culture+"/account/facebookextend",success:function(n){n.Status=="Success"&&(n.Permissions.indexOf("user_birthday")>=0||n.Permissions.indexOf("user_likes")>=0)?($(".snf-extended-disconnected").addClass("hide"),$(".snf-extended-connected").removeClass("hide"),n.Permissions.indexOf("user_birthday")>=0?$(".snf-extended-connected .user_birthday").removeClass("hide"):$(".snf-extended-connected .user_birthday").addClass("hide"),n.Permissions.indexOf("user_likes")>=0?$(".snf-extended-connected .user_likes").removeClass("hide"):$(".snf-extended-connected .user_likes").addClass("hide")):i()}})},{scope:"user_birthday,user_likes",auth_type:"rerequest"})});$(document).on("click","#snf-unextend",function(){var t=$("#snf-unextend");FB.api("me/permissions/user_birthday","DELETE",function(){FB.api("me/permissions/user_likes","DELETE",function(){FB.login(function(t){t.status=="connected"&&t.authResponse&&$.ajax({type:"POST",data:JSON.stringify({facebookId:t.authResponse.userID,accessToken:t.authResponse.accessToken}),contentType:"application/json; charset=utf-8",url:"/"+n.Settings.Culture+"/account/facebookextend",success:function(n){n.Status!="Success"||n.Permissions.indexOf("user_birthday")>=0||n.Permissions.indexOf("user_likes")>=0?i():($(".snf-extended-disconnected").removeClass("hide"),$(".snf-extended-connected").addClass("hide"))}})},{scope:"email,public_profile"})})})})}function i(){}function r(n,t){n.popover({html:!0,placement:"top",popoverClass:"red slim",trigger:"manual",content:$(t).html(),container:"#main-container"});n.popover("show")}n.Modules.register("AccountProfile",{documentLoading:function(){},documentReady:function(t){var r=t(document),s=t(window),o,c,l;i();t("input[type=email]").rules("add",{email:!1});o=t("[name='Data.Personal.BirthDate']").val().split("-");t(".date select.year").val(o[0]);t(".date select.month").val(o[1]);t(".date select.day").val(o[2]);r.on("keydown","input, select",function(){t(".alert-success").fadeOut()});r.on("click","input[type=submit], button, input[type=checkbox], input[type=radio]",function(){t(".alert-success").fadeOut()});r.on("change",".date select",function(){var n=t(".date select.day").val(),i=t(".date select.month").val(),r=t(".date select.year").val(),u=t(this).parents(".date").find("input[type=hidden]");n>0&&i>0&&r>0?u.val(r+"-"+i+"-"+n):u.val("")});var a=t("#Data_Personal_CountryId"),e=t("#Data_Personal_LanguageId"),v=e.children("option").remove(),h=function(){var n=a.val();e.html("");e.append(v.filter("[data-country="+n+"]"));e.find("option").length&&t(e.find("option")[0]).attr("selected","selected")};h();r.on("change","#Data_Personal_CountryId",h);t("#Data_Personal_LanguageId").val(t(".originalLanguageId").val());r.on("change",".stopinvitations, .stopmarketing, .closeaccount, #dataProcessing_accepted, #paymentMigration_accepted",function(){t(this).parent().parent().next().toggleClass("hide")});r.on("change","#radio-personal-account",function(){t("#business-account-fields").toggleClass("hide",!0)});r.on("change","#radio-business-account",function(){t("#business-account-fields").toggleClass("hide",!1)});r.on("change","#Data_Personal_CountryId",function(){var n=t(this).attr("data-country-belgium")==t(this).val();t("#account-type-selection").toggleClass("hide",!n)});c=t.trim(t("#Data_Personal_VatNumber").val());c.length<=0&&t("#Data_Personal_VatNumber").val("BE");var f=t("#confirmTermination").appendTo("body"),y=f.outerWidth(),p=f.outerHeight();t("[data-validationmessage]").click(function(n){var i=t(this),e=i.closest("form"),u=i.offset();return f.css("top",u.top-p),f.css("left",u.left+i.outerWidth()/2-y/2),f.show(),setTimeout(function(){r.on("click.confirmTermination",function(n){jQuery.contains(f.get(0),n.originalEvent.toElement)||(r.off("click.confirmTermination"),f.hide())});f.on("click.rmvbutton","button",function(n){(f.off("click.rmvbutton","button"),r.off("click.confirmTermination"),f.hide(),n.stopPropagation(),t(this).hasClass("no"))||e.submit()})},0),n.preventDefault(),!1});t(".pagecontent").data("elevatepreferences")=="True"&&(t("div.preferences").insertBefore(".earlypreferences"),t("div.preferences .sale-invitation-optout").removeClass("hide"),t("div.preferences input[type=radio][name='Data.SaleInvitationFrequencyCV']").change(function(){var n=t("div.preferences .sale-invitation-optout input[type=radio][name='Data.SaleInvitationFrequencyCV']").is(":checked");t("div.preferences .sale-invitation-optout-reason").toggleClass("hide",!n)}),t("form input[type=hidden][name='optOutSourceCV']").val(t("form input[type=hidden][name='optOutSourceCVEmail']").val()));setTimeout(function(){s.scrollTop(s.scrollTop()-100)},0);t("#display-lostPassword").click(function(){t.blockUI({message:t("#lightbox-ForgotPassword")});t(".blockOverlay").click(t.unblockUI)});t(document).on("submit",".bulk-address-change-form",function(i){var u,r;i.preventDefault();i.stopPropagation();u=t(this);r=[];u.find(".change-choice input.yes:checked").each(function(){var n=t(this);r.push(n.data("deliveryid"))});var f=t('form.bulk-address-change-form input[name$="SourceDeliveryId"]').val(),e=t('form.bulk-address-change-form input[name$="CSRFToken"]').val(),o={sourceDeliveryId:parseInt(f),targetDeliveryIds:r,CSRFToken:e,returnPage:t("#returnPage").val(),deliveryId:t("#deliveryId").val(),cartId:t("#cartId").val()};return jQuery.ajax({url:"/"+n.Settings.Culture+"/account/BulkChangeDeliveryAddress",type:"post",contentType:"application/json",dataType:"json",data:JSON.stringify(o),success:function(n){window.location.href=n.ReturnUrl}}),!1});l=window;l.FB&&u()}});var f=function(){function t(){this.emailEmptyValidationMessage="";this.emailValidationMessage="";this.initActions()}return t.prototype.initActions=function(){var n=this;$("#lightbox-ForgotPassword #forgot-password").submit(function(t){return n.submitForgotPassword(t)})},t.prototype.submitForgotPassword=function(){var t=this;if($("#forgot-password .message").hide(),this.validateForgotPassword()){this.clearValidation();this.removeValidationError();var i=$('#forgot-password input[name$="Email"]').val(),r=$('#forgot-password input[name$="CSRFToken"]').val(),u="/"+n.Settings.Culture+"/Authentication/ForgotPassword";$.ajax({type:"POST",data:JSON.stringify({email:i,CSRFToken:r}),contentType:"application/json; charset=utf-8",url:u,success:function(n){n.Status=="Success"?($("#forgot-password-succes").html(n.Message),$("#forgot-password-succes").show(),$.unblockUI()):(t.validationErrorsFor('#forgot-password input[name$="Email"]',n.Message),$('#forgot-password input[name$="Email"]').parent().addClass("error"),$("#forgot-password .validation-box").addClass("error"))}})}return!1},t.prototype.validationErrorsFor=function(n,t,i,r){t!=""?($(".validation-box").show(),$(".validation-box p").html(t),r!=null?$(".validation-box").addClass(r.replace("#","")):$(".validation-box").addClass(n.replace("#","")),$(".error input:first").focus()):this.removeValidationError()},t.prototype.validateForgotPassword=function(){return(this.clearValidation(),$.trim($('#forgot-password input[name$="Email"]').val())=="")?(this.validationErrorsFor('#forgot-password input[name$="Email"]',this.emailEmptyValidationMessage,null,"#Email"),$('#forgot-password input[name$="Email"]').parent().addClass("error"),!1):n.Util.isValidEmailAddress($('#forgot-password input[name$="Email"]').val())?(this.removeValidationErrorsFor("#Email"),!0):(this.validationErrorsFor('#forgot-password input[name$="Email"]',this.emailValidationMessage,null,"#Email"),$('#forgot-password input[name$="Email"]').parent().addClass("error"),!1)},t.prototype.clearValidation=function(){$('input[name$="Email"]').parent().removeClass("error")},t.prototype.removeValidationError=function(){$(".validation-box").hide()},t.prototype.removeValidationErrorsFor=function(n){$(".validation-box."+n.replace("#","")).hide()},t}();t.ForgotPassword=f})(t=n.AccountProfile||(n.AccountProfile={}))}(Vex||(Vex={})),function(n){var t;(function(t){n.Modules.register("CartDetail",{documentLoading:function(){},documentReady:function(n){var t=n(document),r=n(window),u=new i}});var i=function(){function t(){var n=this;n.$cancellation=$("div.cancellation");n.$deliveryData=$("div.deliveryData");n.$cancellationLink=$("div.cancellationLink");n.$noSelectionAlert=$("#noSelectionAlert");$("#confirmCancellation").popover({html:!0,placement:"topRight",trigger:"manual",content:$("#cancellation-confirmation-container").html()});$(".orderDeliveries").on("click","div.cancellationLink > a",function(){n.setCancellationVisibility(!0)});$(".orderDeliveries").on("click","a.cancelCancellation",function(){n.setCancellationVisibility(!1)});$(".orderDeliveries").on("click","a.submitCancellation",function(){n.submitCancellation()});$("#confirmCancellation").on("click",function(){n.validateCancellationSelection()});$(".popover-trigger").popover({html:!0,content:function(){return $($(this).data("content-selector")).html()}})}return t.prototype.submitCancellation=function(){var i=this,r=!1,u=!1,t;$("#confirmCancellation").popover("hide");n.Util.showLightbox(750,30,n.LightboxModalMode.Full,{message:$("#addToCartWait"),overlayCSS:{backgroundColor:"#fff"}});t=i.prepareCancellationParameters();t.Items&&t.Items.length>0?$.ajax({url:"/"+n.Settings.Culture+"/Account/CancelCartItems",type:"POST",contentType:"application/json",dataType:"json",data:JSON.stringify(t),success:function(n){r=n.CancellationSuccess;u=n.PspRefundSuccess}}).always(function(){r?window.location.href="/"+n.Settings.Culture+"/Account/CartDetail/"+t.CartId+"?success=1&psp="+(u?"1":"0"):(i.setCancellationVisibility(!1),$.unblockUI(),$("#cancelFailed").fadeIn(250))}):i.$noSelectionAlert.fadeIn(250)},t.prototype.validateCancellationSelection=function(){var n=this,t;n.$noSelectionAlert.hide();t=n.prepareCancellationParameters();t.Items&&t.Items.length>0?$("#confirmCancellation").popover("show"):n.$noSelectionAlert.fadeIn(250)},t.prototype.prepareCancellationParameters=function(){var t=[],n;return $("select.cancellationAmount").each(function(i,r){n=r.value;n!="0"&&t.push({DeliveryItemId:$(r).attr("data-deliveryitem-id"),Quantity:n})}),{CartId:$("#deliveryOverview").attr("data-cart-id"),Items:t}},t.prototype.setCancellationVisibility=function(n){var t=this;n?($("select.cancellationAmount").each(function(n,t){t.selectedIndex=0}),t.$cancellationLink.hide(),t.$cancellation.show(),t.$deliveryData.hide()):($("#confirmCancellation").popover("hide"),t.$cancellationLink.show(),t.$cancellation.hide(),t.$deliveryData.show());$(".orderDeliveries .alert").hide()},t}();t.CartDetailPage=i})(t=n.CartDetail||(n.CartDetail={}))}(Vex||(Vex={})),function(n){var t;(function(){n.Modules.register("OrderDetail",{documentLoading:function(){},documentReady:function(t){var r=t(document),u=t(window),i=t(".cancelOrder");i.popover({html:!0,placement:"topRight",content:t("#order-confirmremove").html(),trigger:"click"});r.on("click",".orderConfirmRemove .buttons .yes",function(){i.popover("hide");n.Util.showLightbox(750,30,n.LightboxModalMode.Full,{message:t("#orderDetail .wait-overlay"),overlayCSS:{backgroundColor:"#fff"}});window.location.href="/"+n.Settings.Culture+"/Account/CancelOrder/"+i.attr("data-orderId")})}})})(t=n.AccountProfile||(n.AccountProfile={}))}(Vex||(Vex={})),function(n){var t;(function(t){function e(t,i,r){if(t.Continue)window.location.href=r;else{n.Util.showLightbox(650,600,n.LightboxModalMode.Full,{message:t.Html});u=new n.ScrollListHelper(".bulk-address-change .inner-scroll-container",".scroll-item",2,!0,null);$(document).on("click",".bulk-address-change .nav-container .nav-arrow",null,function(){u.scrollListNavigate($(this))})}}var u,f=function(){function t(t,i){t.post=function(t){var i=jQuery("#DeliveryId").val(),r=jQuery("#CartId").val(),u=jQuery("#ReturnPage").val(),f=$('form.edit-addres-form input[name$="CSRFToken"]').val();jQuery.ajax({url:"/"+n.Settings.Culture+"/account/ChoosePickupPoint",type:"post",data:JSON.stringify({deliveryId:i,cartId:r,returnPage:u,kialaPointId:t,CSRFToken:f}),contentType:"application/json; charset=utf-8",success:function(t){t.Redirect&&jQuery.ajax({url:"/"+n.Settings.Culture+"/account/GetDeliveriesEligibleForAddressChange",type:"post",data:JSON.stringify({deliveryId:i,cartId:r,returnPage:u}),contentType:"application/json; charset=utf-8",success:function(i){n.EditDeliveryAddress.HandleGetDeliveriesEligibleForAddressChangeResponce(i,i.DeliveryCount,t.Url)}})}})};t.search=function(){var r=jQuery("#PostalCodeForPickup").val(),u=jQuery("#UserCountryId").val();jQuery.ajax({url:"/"+n.Settings.Culture+"/account/SearchPickupPoints",type:"get",data:{postalCode:r,country:u},success:function(n){jQuery("#pickuppoints-searchresults").html(i(n.trim())(t))}})}}return t.$inject=["$scope","$compile"],t}(),i,r;t.EditDeliveryAddressKialaController=f;i=function(){function t(t){var i=$("#confirmremove").appendTo("body"),f=i.outerWidth(),e=i.outerHeight(),r=jQuery(document),u=this;r.find(".addressNameBlock").each(function(){var n="#"+$(this).attr("id"),t=$(n).find("input[name=AddressName]").val();$(n).find("input[name=AddressName]").attr("data-origValue",t);u.SetupAddressBlock(n)});t.select=function(t){var i=jQuery("#DeliveryId").val(),r=jQuery("#CartId").val(),u=jQuery("#ReturnPage").val(),f=$('form.edit-addres-form input[name$="CSRFToken"]').val();jQuery.ajax({url:"/"+n.Settings.Culture+"/account/ChooseDomesticShippingAddress",type:"post",data:JSON.stringify({deliveryId:i,cartId:r,returnPage:u,domesticShippingAddressId:t,CSRFToken:f}),contentType:"application/json; charset=utf-8",success:function(t){t.Redirect&&jQuery.ajax({url:"/"+n.Settings.Culture+"/account/GetDeliveriesEligibleForAddressChange",type:"post",data:JSON.stringify({deliveryId:i,cartId:r,returnPage:u}),contentType:"application/json; charset=utf-8",success:function(i){n.EditDeliveryAddress.HandleGetDeliveriesEligibleForAddressChangeResponce(i,i.DeliveryCount,t.Url)}})}})};t.remove=function(t){var u=jQuery("#delete-address-link-"+t),o=u.offset();i.css("top",o.top-e);i.css("left",o.left+u.width()/2-f/2);i.show();setTimeout(function(){r.on("click.confirmremove",function(n){jQuery.contains(i.get(0),n.originalEvent.toElement)||(r.off("click.confirmremove"),i.hide())});i.on("click.rmvbutton","button",function(u){(i.off("click.rmvbutton","button"),r.off("click.confirmremove"),i.hide(),u.stopPropagation(),$(this).hasClass("no"))||jQuery.ajax({url:"/"+n.Settings.Culture+"/checkout/DeleteDomesticShippingAddress",type:"post",data:JSON.stringify({domesticShippingAddressId:t,csrfToken:$('form.edit-addres-form input[name$="CSRFToken"]').val()}),contentType:"application/json; charset=utf-8",success:function(n){if(n.Success){jQuery("#address-"+t).remove();var i=jQuery("#previously-used-addresses .address").length;i==0&&jQuery("#previously-used-addresses").remove()}}})})},0)};t.modify=function(t){u.SetupAddressBlock("#edit-address-"+t);n.Util.showLightbox(609,592,n.LightboxModalMode.Full,{message:jQuery("#edit-address-"+t)})};t.modifyPhone=function(t){u.SetupAddressBlock("#edit-address-phone-"+t);n.Util.showLightbox(609,592,n.LightboxModalMode.Full,{message:jQuery("#edit-address-phone-"+t)})}}return t.prototype.SetupAddressBlock=function(n){var u=jQuery(document),t=$(n),i=t.find("input[name=AddressName]").attr("data-origValue"),r=t.find("input[name=AddressName]").attr("data-othertranslated");t.find('select[name=AddressNameSelect] option[value="'+i+'"]').length==0||i==r?(t.find("select[name=AddressNameSelect]").val(r),i!=r?t.find("input[name=AddressName]").val(i):t.find("input[name=AddressName]").val(""),t.find("input[name=AddressName]").show()):(t.find("select[name=AddressNameSelect]").val(i),t.find("input[name=AddressName]").hide(),t.find("input[name=AddressName]").attr("data-lastValue",""),t.find("input[name=AddressName]").val(""))},t.$inject=["$scope"],t}();t.EditDeliveryAddressDomesticController=i;r=angular.module("editDeliveryAddress",["shop"]);r.controller("EdaKialaController",f);r.controller("EdaDomesticController",i);n.Modules.register("editDeliveryAddressGlobal",{documentLoading:function(){n.Util.registerCustomValidators()},documentReady:function(t){t("#search-pickuppoints").keypress(function(n){n.which==13&&(n.preventDefault(),n.stopPropagation(),t("#SearchPickupPointsButton").click())});t(document).on("submit",".new-address-form",function(i){i.preventDefault();i.stopPropagation();var r=t(this),u=t("#DeliveryId").val(),f=t("#CartId").val(),e=t("#ReturnPage").val();return jQuery.ajax({url:"/"+n.Settings.Culture+"/account/AddNewDomesticShippingAddress",type:"post",data:r.serialize(),success:function(t){t.Redirect&&jQuery.ajax({url:"/"+n.Settings.Culture+"/account/GetDeliveriesEligibleForAddressChange",type:"post",data:JSON.stringify({deliveryId:u,cartId:f,returnPage:e}),contentType:"application/json; charset=utf-8",success:function(i){n.EditDeliveryAddress.HandleGetDeliveriesEligibleForAddressChangeResponce(i,i.DeliveryCount,t.Url)}})}}),!1});t(document).on("submit",".bulk-address-change-form",function(i){var u,r;i.preventDefault();i.stopPropagation();u=t(this);r=[];u.find(".change-choice input.yes:checked").each(function(){var n=t(this);r.push(n.data("deliveryid"))});var f=t('form.bulk-address-change-form input[name$="SourceDeliveryId"]').val(),e=t('form.bulk-address-change-form input[name$="CSRFToken"]').val(),o={sourceDeliveryId:parseInt(f),targetDeliveryIds:r,CSRFToken:e,returnPage:t("#returnPage").val(),deliveryId:t("#deliveryId").val(),cartId:t("#cartId").val()};return jQuery.ajax({url:"/"+n.Settings.Culture+"/account/BulkChangeDeliveryAddress",type:"post",contentType:"application/json",dataType:"json",data:JSON.stringify(o),success:function(n){window.location.href=n.ReturnUrl}}),!1});t(document).on("submit",".edit-addres-form",function(i){var r,u,f;return i.preventDefault(),i.stopPropagation(),r=t(this),u=t(this).find("select[name=CountryId] option:selected").text(),t(this).find("input[name=CountryNameTranslated]").val(u),f=function(n){var r=jQuery("#address-"+n.DomesticShippingAddressId),i;r.find(".address-title").html("<span class='name'>"+n.FirstName+" "+n.LastName+"<\/span><span> ("+n.ShippingAddressName+")<\/span>");i="<span>";n.CompanyName&&n.CompanyName!=""&&(i+=n.CompanyName+"<br/>");i=i+n.Street+" "+n.Number;n.Box&&n.Box!=""&&(i=i+" - "+n.Box);i=i+"<br/>"+n.PostalCode+" "+n.City+"<br/>"+n.CountryName+"<br/>"+n.MobilePhone+"<\/span>";r.find(".address-info").html(i);t("#edit-address-"+n.DomesticShippingAddressId).find("input[name=AddressName]").attr("data-origValue",n.ShippingAddressName)},jQuery.ajax({url:"/"+n.Settings.Culture+"/account/EditDomesticShippingAddress",type:"post",data:r.serialize(),success:function(n){var o,i,s,h,u,c,e;if(n.Success)f(n.Address),t.unblockUI(),r.hasClass("after-submit-select")&&t("#btn-select-adress-"+n.Address.DomesticShippingAddressId).trigger("click");else for(o=r.validate(),i=0,s=n.Data.length;i<s;i++)for(h=n.Data[i].key,u=0,c=n.Data[i].errors.length;u<c;u++)e={},e[h]=n.Data[i].errors[u],o.showErrors(e)}}),!1})}});t.HandleGetDeliveriesEligibleForAddressChangeResponce=e})(t=n.EditDeliveryAddress||(n.EditDeliveryAddress={}))}(Vex||(Vex={})),function(n){var t;(function(){n.Modules.register("CreditRefund",{documentLoading:function(){},documentReady:function(t){t("#display-lostPassword").click(function(){n.Util.showLightbox(570,330,n.LightboxModalMode.Semi,{message:t("#lightbox-ForgotPassword")})})}})})(t=n.AccountProfile||(n.AccountProfile={}))}(Vex||(Vex={})),function(n){var t;(function(t){var f=function(){function n(){}return n}(),i,r,u;t.Brand=f;i=function(){function n(){}return n}();t.BrandGroup=i;r=function(){function t(t){var i=this,f=$("#brands-json"),r,u;t.brandsAll=JSON.parse(f.val());n.Util.calView("BRAND_ALERT_SEARCH");$("#brands a[data-toggle='tab']").on("shown.bs.tab",function(t){t.target.hash=="#brands-index"?n.Util.calView("BRAND_ALERT_INDEX"):t.target.hash=="#brands-search"&&n.Util.calView("BRAND_ALERT_SEARCH")});for(t.brandsSelected=[],r=0;r<t.brandsAll.length;r++)t.brandsAll[r].IsUserSelected&&t.brandsSelected.push(t.brandsAll[r]);i.InitializeBrandIndex(t);i.SearchResultScrollListHelper=new n.ScrollListHelper("#brands .search-result-items",".search-result-item",6,!0,55);i.BrandIndexScrollListHelper=new n.ScrollListHelper("#brands .brand-index-items",".index-item",8,!0);i.SelectBrandScrollListHelper=new n.ScrollListHelper("#brands .selected-brand-items",".selected-brand-item",8,!0,55);$("#brands").on("click","#brand-search-button",function(){i.searchBrand(t)});$("#brands").on("keypress","#brand-search-text",function(n){var r=n.keyCode?n.keyCode:n.which;r!=13||n.altKey||n.ctrlKey||n.shiftKey||(n.preventDefault(),i.searchBrand(t))});$("#brands").on("click","#brand-search-add-button",function(){var i=[],r;$("#brands .search-result .add-brand-check:checked").each(function(){i.push($(this).attr("data-brand-id"))});t.$apply(function(){for(var n,r=0;r<i.length;r++)for(n=0;n<t.brandsSelected.length;n++)t.brandsSelected[n].Id==i[r]&&t.brandsSelected.splice(n,1)});t.$apply(function(){for(var r,n=0;n<t.brandsAll.length;n++)for(r=0;r<i.length;r++)t.brandsAll[n].Id==i[r]&&t.brandsSelected.unshift(t.brandsAll[n])});$("#brands .search-result .add-brand-check:checked").removeAttr("checked");r=$('form.preferences-form input[name$="CSRFToken"]').val();$.ajax({type:"POST",url:"/"+n.Settings.Culture+"/Account/AddPersonalBrands",data:JSON.stringify({brandIds:i,CSRFToken:r}),contentType:"application/json"}).done(function(t){var u,r;for(n.Util.calAction("BRAND_ALERT_SEARCH","ENABLE_BRAND_ALERTS",null,{brand_ids:i}),u=!1,r=0;r<t.length;r++)n.BrandAlert.addBrand(t[r]),u=u||t[r].IncludeInHeader;u&&refreshBrandAlertHeader()})});$("#brands").on("click","#brand-index-add-button",function(){var i=[],r;$("#brands .brand-index-items .add-brand-check:checked").each(function(){i.push($(this).attr("data-brand-id"))});t.$apply(function(){for(var n,r=0;r<i.length;r++)for(n=0;n<t.brandsSelected.length;n++)t.brandsSelected[n].Id==i[r]&&t.brandsSelected.splice(n,1)});t.$apply(function(){for(var r,n=0;n<t.brandsAll.length;n++)for(r=0;r<i.length;r++)t.brandsAll[n].Id==i[r]&&t.brandsSelected.unshift(t.brandsAll[n])});$("#brands .brand-index-items .add-brand-check:checked").removeAttr("checked");r=$('form.preferences-form input[name$="CSRFToken"]').val();$.ajax({type:"POST",url:"/"+n.Settings.Culture+"/Account/AddPersonalBrands",data:JSON.stringify({brandIds:i,CSRFToken:r}),contentType:"application/json"}).done(function(t){var u,r;for(n.Util.calAction("BRAND_ALERT_INDEX","ENABLE_BRAND_ALERT",null,{brand_ids:i}),u=!1,r=0;r<t.length;r++)n.BrandAlert.addBrand(t[r]),u=u||t[r].IncludeInHeader;u&&refreshBrandAlertHeader()})});$("#brands").on("click",".add-selected-brand",function(){var i=+$(this).attr("data-brand-id"),r=$(this).attr("data-brand-name");t.$apply(function(){for(var n=0;n<t.brandsSelected.length;n++)t.brandsSelected[n].Id==i&&t.brandsSelected.splice(n,1)});t.$apply(function(){for(var n=0;n<t.brandsAll.length;n++)t.brandsAll[n].Id==i&&t.brandsSelected.unshift(t.brandsAll[n])});i&&$.ajax({type:"POST",url:"/"+n.Settings.Culture+"/Account/AddBrandAlert",data:JSON.stringify({brandId:i}),contentType:"application/json"}).done(function(u){var s,o,c,f,h,e;for(n.Util.calAction("BRAND_ALERT_SEARCH","ENABLE_BRAND_ALERT",null,{brand_id:i}),s=!1,f=0;f<u.length;f++)n.BrandAlert.addBrand(u[f]),s=s||u[f].IncludeInHeader;for(s&&refreshBrandAlertHeader(),o=r.substr(0,1),c=/^[a-z]+$/i,c.test(o)||(o="#"),f=0;f<t.brandIndex.length;f++)if(t.brandIndex[f].GroupName.toLowerCase()==o.toLowerCase()){for(h=t.brandIndex[f],e=0;e<h.BrandList.length;e++)if(h.BrandList[e].Id==i){h.BrandList[e].IsUserSelected=!0;break}break}if(t.brandGroupSelected.GroupName==o){for(e=0;e<t.brandGroupSelected.BrandList.length;e++)if(t.brandGroupSelected.BrandList[e].Id==i){t.brandGroupSelected.BrandList[e].IsUserSelected=!0;break}t.$apply()}})});$("#brands").on("click",".add-brand-suggestion-link",function(){$(".add-brand-suggestion-link").hide();$(".add-brand-suggestion-input").show()});$("#brands").on("click",".brand-suggestion-add-button",function(){i.addBrandSuggestion(t,$(this)[0].parentElement.parentElement)});$("#brands").on("keypress",".brand-suggestion-text",function(n){var r=n.keyCode?n.keyCode:n.which;r!=13||n.altKey||n.ctrlKey||n.shiftKey||(n.preventDefault(),i.addBrandSuggestion(t,$(this)[0].parentElement.parentElement))});u=$("#brands .remove-all-brands");u.popover({html:!0,placement:"topRight",content:$("#preferences-confirm-remove-all-brands").html(),trigger:"click",container:"#brands"});$("#brands").on("click",".preferences-confirm-remove-all-brands .buttons .no",function(){u.popover("hide")});$("#brands").on("click",".preferences-confirm-remove-all-brands .buttons .yes",function(){u.popover("hide");t.$apply(function(){t.brandsSelected=[];var i=$('form.preferences-form input[name$="CSRFToken"]').val();$.ajax({type:"POST",url:"/"+n.Settings.Culture+"/Account/RemoveAllPersonalBrands",data:JSON.stringify({CSRFToken:i}),contentType:"application/json"}).done(function(t){n.Util.calAction("BRAND_ALERT_SEARCH","CLEAR_BRAND_ALERTS",null,null);t.success&&(n.BrandAlert.refetchDataOnNextRequest(),refreshBrandAlertHeader())})})});$("#brands").on("click",".remove-selected-brand",function(){var i=parseInt($(this).attr("data-brand-id")),u=$(this).attr("data-brand-name"),f=$(this).attr("data-brand-suggestion")=="true",r;$("#brands .remove-selected-brand").popover("hide");$("#brands .remove-selected-brand").popover("destroy");r=$(this);r.popover({html:!0,placement:"topRight",content:$("#preferences-confirm-remove-brand").html(),trigger:"manual",container:"#brands"});r.popover("show");$("#brands").off("click",".preferences-confirm-remove-brand .buttons .no").on("click",".preferences-confirm-remove-brand .buttons .no",function(){r.popover("hide");$("#brands .remove-selected-brand").popover("destroy")});$("#brands").off("click",".preferences-confirm-remove-brand .buttons .yes").on("click",".preferences-confirm-remove-brand .buttons .yes",function(){r.popover("hide");$("#brands .remove-selected-brand").popover("destroy");t.$apply(function(){$.each(t.brandsSelected,function(n,r){if(!f&&r.Id==i||f&&r.Name==u)return t.brandsSelected.splice(n,1),!1});var r=$('form.preferences-form input[name$="CSRFToken"]').val();$.ajax({type:"POST",url:"/"+n.Settings.Culture+"/Account/RemovePersonalBrand",data:JSON.stringify({brandId:i,brandName:u,isUserSuggestion:f,CSRFToken:r}),contentType:"application/json"}).done(function(r){var e,h,o,s,f;if(n.Util.calAction("BRAND_ALERT_SEARCH","DISABLE_BRAND_ALERT",null,{brand_id:i}),r.success){for(n.BrandAlert.hasBrand(i)&&(n.BrandAlert.removeBrand(i),refreshBrandAlertHeader()),e=u.substr(0,1),h=/^[a-z]+$/i,h.test(e)||(e="#"),o=0;o<t.brandIndex.length;o++)if(t.brandIndex[o].GroupName.toLowerCase()==e.toLowerCase()){for(s=t.brandIndex[o],f=0;f<s.BrandList.length;f++)if(s.BrandList[f].Id==i){s.BrandList[f].IsUserSelected=!1;break}break}if(t.brandGroupSelected.GroupName==e){for(f=0;f<t.brandGroupSelected.BrandList.length;f++)if(t.brandGroupSelected.BrandList[f].Id==i){t.brandGroupSelected.BrandList[f].IsUserSelected=!1;break}t.$apply()}}})})})});$(document).on("click","#preferences .search-result-nav-container .search-result-nav",null,function(){i.SearchResultScrollListHelper.scrollListNavigate($(this))});$(document).on("click","#preferences .brand-index-nav-container .brand-index-nav",null,function(){i.BrandIndexScrollListHelper.scrollListNavigate($(this))});$(document).on("click","#preferences .selected-brand-nav-container .selected-brand-nav",null,function(){i.SelectBrandScrollListHelper.scrollListNavigate($(this))});$("#brands").on("click",".btn.brand-alert",function(){var f=$(this),o=f.data("brandname"),u=f.data("brandid"),e=f.data("group"),i,r;if(f.hasClass("active")&&u){for($.ajax({type:"POST",url:"/"+n.Settings.Culture+"/Account/RemoveBrandAlert",data:JSON.stringify({brandId:u,brandName:name,isUserSuggestion:!1}),contentType:"application/json"}).done(function(i){var f,r;for(n.Util.calAction("BRAND_ALERT_INDEX","DISABLE_BRAND_ALERT",null,{brand_id:u}),f=!1,r=0;r<i.length;r++)n.BrandAlert.removeBrand(i[r].BrandId),f=f||i[r].IncludeInHeader;for(f&&refreshBrandAlertHeader(),r=0;r<t.brandsSelected.length;r++)t.brandsSelected[r].Id==u&&(t.brandsSelected.splice(r,1),t.$apply())}),f.removeClass("active"),i=0;i<t.brandIndex.length;i++)if(t.brandIndex[i].GroupName==e)for(r=0;r<t.brandIndex[i].BrandList.length;r++)if(t.brandIndex[i].BrandList[r].Id==u){t.brandIndex[i].BrandList[r].IsUserSelected=!1;break}}else for($.ajax({type:"POST",url:"/"+n.Settings.Culture+"/Account/AddBrandAlert",data:JSON.stringify({brandId:u}),contentType:"application/json"}).done(function(i){var f,r;for(n.Util.calAction("BRAND_ALERT_INDEX","ENABLE_BRAND_ALERT",null,{brand_id:u}),f=!1,r=0;r<i.length;r++)n.BrandAlert.addBrand(i[r]),f=f||i[r].IncludeInHeader;f&&refreshBrandAlertHeader();t.brandsSelected.push({Id:u,IsUserSelected:!0,IsUserSuggestion:!1,Name:o});t.$apply()}),f.addClass("active"),i=0;i<t.brandIndex.length;i++)if(t.brandIndex[i].GroupName==e)for(r=0;r<t.brandIndex[i].BrandList.length;r++)if(t.brandIndex[i].BrandList[r].Id==u){t.brandIndex[i].BrandList[r].IsUserSelected=!0;break}});t.brandGroupSelected=t.brandIndex[0];setTimeout(function(){$(".group-name[data-groupname='"+t.brandIndex[0].GroupName+"']").addClass("selected")},0);t.selectBrand=function(n){for(var i=0;i<=t.brandIndex.length;i++)if(t.brandIndex[i].GroupName==n){t.brandGroupSelected=t.brandIndex[i];$(".group-name.selected").removeClass("selected");$(".group-name[data-groupname='"+n+"']").addClass("selected");t.requireExtraBrandContainer=t.brandGroupSelected.BrandList.length%2==1?!0:!1;break}}}return t.prototype.InitializeBrandIndex=function(n){var t,r,u,o,f,e;for(n.brandIndex=[],t={},r=0;r<n.brandsAll.length;r++)n.brandsAll[r].IsUserSuggestion||(u=n.brandsAll[r].Name.substring(0,1).toUpperCase(),o=/^[a-z]+$/i,o.test(u)||(u="#"),t[u]||(t[u]=[]),t[u].push(n.brandsAll[r]));for(f in t)t[f].sort(function(n,t){var i=n.Name.toUpperCase(),r=t.Name.toUpperCase();return i<r?-1:i>r?1:0}),e=new i,e.GroupName=f,e.BrandList=t[f],n.brandIndex.push(e);n.brandIndex.sort(function(n,t){var i=n.GroupName,r=t.GroupName;return i<r?-1:i>r?1:0})},t.prototype.searchBrand=function(t){var r=this,i=$("#brand-search-text").val();n.Util.calAction("BRAND_ALERT_SEARCH","SEARCH_BRAND_ALERT",null,{keyword:i});t.$apply(function(){var n,u;if(t.brandsSearch=[],i!="")for(n=0;n<t.brandsAll.length;n++)u=t.brandsAll[n].Name,t.brandsAll[n].IsUserSuggestion||t.brandsAll[n].Name.toLowerCase().indexOf(i.toLowerCase())==-1||t.brandsSearch.push(t.brandsAll[n]);r.SearchResultScrollListHelper.resetList()})},t.prototype.addBrandSuggestion=function(t,i){var e=i.children[1].children[0],u=e.value.substring(0,255),r,o;u!=""&&(r=new f,r.Name=u,r.IsUserSelected=!0,r.IsUserSuggestion=!0,e.value="",t.$apply(function(){for(var n=0;n<t.brandsSelected.length;n++)t.brandsSelected[n].Name==u&&(r=t.brandsSelected.splice(n,1)[0])}),t.$apply(function(){t.brandsSelected.unshift(r)}),o=$('form.preferences-form input[name$="CSRFToken"]').val(),$.ajax({type:"POST",url:"/"+n.Settings.Culture+"/Account/AddBrandSuggestion",data:JSON.stringify({suggestionName:u,CSRFToken:o}),contentType:"application/json"}).done(function(t){t.success&&n.Util.calAction("BRAND_ALERT_SEARCH","ADD_CUSTOM_BRAND_ALERT",null,{custom_brand_alert:u})}))},t.$inject=["$scope"],t}();t.PreferencesController=r;u=angular.module("preferences",["shop"]);u.controller("PreferencesController",r);u.directive("animate",function(){return function(n,t){setTimeout(function(){t.addClass("show")})}});n.Modules.register("preferencesGlobal",{documentLoading:function(){},documentReady:function(t){t("#product-interest").on("change",".check-save-item > input[type=checkbox]",function(){var r=t(this),i=r.parent(),f=i.attr("data-id"),e=i.attr("data-type"),o=r.is(":checked"),u;i.hasClass("saving-item")||(i.addClass("saving-item"),u=t('form.preferences-form input[name$="CSRFToken"]').val(),t.ajax({type:"POST",url:"/"+n.Settings.Culture+"/Account/SaveSectorVertical",data:JSON.stringify({id:f,type:e,state:o,CSRFToken:u}),contentType:"application/json"}).done(function(n){n.success;i.addClass("saved-item");i.removeClass("saving-item");setTimeout(function(){i.removeClass("saved-item")},5e3)}))})}})})(t=n.AccountProfile||(n.AccountProfile={}))}(Vex||(Vex={})),function(n){var t;(function(t){function u(){var n=$("a#force-action");n&&n.data("forceAction")&&n.data("forceAction").toLowerCase()=="pdf"&&(window.location.href=$("a#print-pdf-button").attr("href"))}var i=function(){function t(t,i,r,u){function f(t){return"".concat("<span class='cur'>",t<0?"-&nbsp;":"","&euro;<\/span>","<span class='ord'>",Math.floor(t).toString(),"<\/span>","<span class='frac'>",n.Util.fract(t),"<\/span>")}moment.locale(n.Settings.Culture);var e=this;i.get(n.Settings.ApiRoot+n.Settings.Culture+"/users/"+r.user.token+"/deliveries").then(function(n){t.deliveryOverviewData=n.data});i.get(n.Settings.ApiRoot+n.Settings.Culture+"/users/"+r.user.token+"/travel/bookings").then(function(n){t.bookingOverviewData=n.data});t.nextYear=new Date;t.nextYear.setFullYear(t.nextYear.getFullYear()+1);t.getDeliveryOverviewExpectedDelivery=function(n,t,i){return u.trustAsHtml(n.replace("{0}",moment(t).format("D MMMM")).replace("{1}",moment(i).format("D MMMM")))};t.getTranslationWithShortDate=function(n,t){return u.trustAsHtml(n.replace("{0}",moment(t).format("D MMMM")))};t.getDeliveryOverviewReturnRequestDaysLeftPlural=function(n,t){return u.trustAsHtml(n.replace("{0}",t.toString()))};t.getDeliveryOverviewCartSummary=function(n,t,i){return u.trustAsHtml(n.replace("{0}",t.length>40?t.substr(0,40)+"...":t).replace("{1}",moment(i).format("DD/MM/YYYY")).replace("{2}",moment(i).format("H:mm")))};t.getShopPaymentSummaryPaidWithCredit=function(n,t){return u.trustAsHtml(n.replace("{0}",f(t)))};t.getShopPaymentSummaryPaidWithCash=function(n,t,i){return u.trustAsHtml(n.replace("{0}",f(t)).replace("{1}",i))};t.getShopPaymentSummaryPaidWithCreditAndCash=function(n,t,i,r){return u.trustAsHtml(n.replace("{0}",f(t)).replace("{1}",f(i)).replace("{2}",r))};t.getFormatedDate=function(n){return moment(n).format("D MMMM YYYY")};t.showRetentionLine=function(n){return!n.isPendingIncomplete&&n.retentionDueDateTime&&!n.isRetentionReleased&&n.retentionDueDateTime<t.nextYear};t.showExpectedDelivery=function(n){return!n.isPendingIncomplete&&!(n.retentionDueDateTime&&!n.isRetentionReleased&&n.retentionDueDateTime<t.nextYear)&&!n.isAGiftVoucher}}return t.$inject=["$scope","$http","$session","$sce"],t}(),r;t.DeliveryOverviewController=i;r=angular.module("DeliveryOverview",["shop"]);r.controller("DeliveryOverviewController",i);n.Modules.register("DeliveryOverview",{documentLoading:function(){},documentReady:function(n){u();n(".popover-trigger").popover({html:!0,content:function(){return n(n(this).data("content-selector")).html()}})}})})(t=n.AccountProfile||(n.AccountProfile={}))}(Vex||(Vex={})),function(n){var t;(function(t){var i=function(){function t(t,i,r){function u(n,t){n.cart=t;n.isEmpty=t==null||t.OrderItems==null||t.OrderItems.length==0;n.isEmpty||(n.hasPgpModelInCart=_.any(n.cart.OrderItems,"IsPgpModel",!0));h()}function h(){setTimeout(function(){t.$apply(function(){var i=r.getCart();n.Storage.getUserData("acc",function(r){var u,f;t.freeShippingExpiration=n.Util.jsonDateTimeReviver(null,r.FreeShippingSignupExpiration);t.couponCodeAdvantageTypeCV=r.CouponCodeAdvantageTypeCV;t.couponCode=r.CouponCode;t.couponCodeAmount=r.CouponCodeAmount;t.couponCodeThresholdAmount=r.CouponCodeThresholdAmount;t.freeShippingExpirationDate=r.FreeShippingExpirationDate;u=t.couponCodeThresholdAmount<t.cart.SubTotalAmount;t.signupAchieved=u;u?t.rest="":(f=t.couponCodeThresholdAmount-t.cart.SubTotalAmount,t.rest=f.toFixed(2));t.fs={HasDigitalProducts:i.HasDigitalProducts,HasPhysicalProducts:i.HasPhysicalProducts,HasUncFreeShpFCart:i.HasUncFreeShpFCart,HasCondFreeShpNotReach:i.HasCondFreeShpNotReach,HasCondFreeShpIsReach:i.HasCondFreeShpIsReach,CondFreeShpAmount:i.CondFreeShpAmount,CondFreeShpAmountHtml:n.Util.getPriceHtml(i.CondFreeShpAmount),AmountToReachCondFreeShp:i.AmountToReachCondFreeShp,AmountToReachCondFreeShpHtml:n.Util.getPriceHtml(i.AmountToReachCondFreeShp),FreeShpFrmCartMerge:i.FreeShpFrmCartMerge}})})})}var c=this,f=$(document),s=$(".editcart .wait-overlay"),e=function(){$("#inner-container .cart-item").removeClass("validation-valid validation-invalid");$(".couponvalidation").addClass("hide");$(".couponsuccess").addClass("hide");s.removeClass("hide")},o=function(){s.addClass("hide")};t.getPriceHtml=function(t,i){return t==undefined?"&nbsp;":n.Util.getPriceHtml(t,null,i?" - ":"")};t.productDictionary=n.Dictionary.products;t.productDetailUrl=function(t,i){return i===void 0&&(i=!1),i?"/"+n.Settings.Culture+"/Account/LoyaltyPoints":n.Util.productDetailUrl(t)};u(t,$("#initialCart").data("value"));t.culture=n.Settings.Culture;t.$$phase||t.$apply();setTimeout(function(){$(".angularcontainer").removeClass("hide")},0);t.quantityChanged=function(i){e();var f=$('#cart-edit-form  input[name$="CSRFToken"]').val();$.ajax({type:"POST",url:"/"+n.Settings.Culture+"/Cart/ChangeQuantity",data:JSON.stringify({model:i.ModelId,quantity:i.Quantity,CSRFToken:f}),contentType:"application/json"}).done(function(f){t.$apply(function(){t.message=f.message;f.cart!=null&&u(t,f.cart);r.onCartEvent("cartUpdated",{cartItemCount:t.cart.OrderItems.length})});t.$apply(function(){$("#inner-container .item[data-model='"+i.ModelId+"'] .cart-item").addClass(f.success?"validation-valid":"validation-invalid")});o();n.AnalyticsData.cartModified()})};f.on("click",".continue button",function(){window.location.href="/"});t.modelChanged=function(i){e();var f=$('#cart-edit-form  input[name$="CSRFToken"]').val();$.ajax({type:"POST",url:"/"+n.Settings.Culture+"/Cart/ChangeModel",data:JSON.stringify({model:i.OriginalModelId,newModel:i.ModelId,CSRFToken:f}),contentType:"application/json"}).done(function(f){t.$apply(function(){t.message=f.message;f.cart!=null&&u(t,f.cart);r.onCartEvent("cartUpdated",{cartItemCount:t.cart.OrderItems.length})});t.$apply(function(){f.success?$("#inner-container .item[data-model='"+i.ModelId+"'] .cart-item").addClass("validation-valid"):$("#inner-container .item[data-model='"+i.OriginalModelId+"'] .cart-item").addClass("validation-invalid")});o();n.AnalyticsData.cartModified()})};t.addPgpToCart=function(i){e();$.ajax({type:"POST",url:"/"+n.Settings.Culture+"/Cart/AddPgpToCart",data:JSON.stringify({modelId:i}),contentType:"application/json"}).done(function(f){t.$apply(function(){t.message=f.message;f.cart!=null&&u(t,f.cart);r.onCartEvent("cartUpdated",{cartItemCount:t.cart.OrderItems.length})});t.$apply(function(){f.success?$("#inner-container .item[data-model='"+i+"'] .cart-item").addClass("validation-valid"):$("#inner-container .item[data-model='"+i+"'] .cart-item").addClass("validation-invalid")});o();n.AnalyticsData.cartModified()})};f.on("click",".remove a",function(){var i=$(this),s=i.closest(".item");i.popover("destroy");i.popover({html:!0,placement:"top",content:$("#cart-confirmremove").html()});i.popover("show");f.off("click.rmvbutton").on("click.rmvbutton","button.yes",function(){i.popover("hide");e();var f=$('#cart-edit-form  input[name$="CSRFToken"]').val();$.ajax({type:"POST",url:"/"+n.Settings.Culture+"/Cart/RemoveModel",data:JSON.stringify({model:s.data("model"),CSRFToken:f}),contentType:"application/json"}).done(function(i){t.$apply(function(){t.message=i.message;i.success&&u(t,i.cart);var n=0;i&&i.cart&&i.cart.OrderItems&&(n=t.cart.OrderItems.length);r.onCartEvent("cartUpdated",{cartItemCount:n})});o();n.AnalyticsData.cartModified()})})});f.on("keydown","#couponcode",function(n){return n.which!=13?!0:($(".validatecoupon").click(),n.preventDefault(),!1)});f.on("click",".showcouponfield",function(){$(this).addClass("hide");$(".coupons form").removeClass("hide").find("input[type=text]").focus();$(".coupons .validatecoupon").click(function(){e();var i=$('#cart-edit-form input[name$="CSRFToken"]').val();$.ajax({type:"POST",url:"/"+n.Settings.Culture+"/Cart/ValidateCoupon",data:JSON.stringify({couponcode:$(".coupons form input[name=couponcode]").val(),CSRFToken:i}),contentType:"application/json"}).done(function(n){t.$apply(function(){n.cart!=null&&u(t,n.cart);r.onCartEvent("cartUpdated",{cartItemCount:t.cart.OrderItems.length})});t.$apply(function(){n.success?$(".couponsuccess").removeClass("hide"):($(".coupons > a").addClass("hide"),$(".coupons form").removeClass("hide").addClass("error"),$(".coupons input[type=text]").addClass("input-validation-error"),$(".coupons .couponvalidation").removeClass("hide").addClass("help-inline field-validation-error").html(n.message))});o()})})});f.on("click",".removecoupon",function(){e();var i=$('#cart-edit-form  input[name$="CSRFToken"]').val();$.ajax({type:"POST",url:"/"+n.Settings.Culture+"/Cart/CancelCoupon",data:JSON.stringify({CSRFToken:i}),contentType:"application/json"}).done(function(n){t.$apply(function(){n.cart!=null&&u(t,n.cart);r.onCartEvent("cartUpdated",{cartItemCount:t.cart.OrderItems.length})});t.$apply(function(){n.success||($(".coupons > a").addClass("hide"),$(".coupons form").removeClass("hide"),$(".couponvalidation").removeClass("hide").html(n.message))});o()})});f.on("click",".gocheckout button",function(){e();$(".coupons form input[name=couponcode]").val().length>0?$(".coupons form").submit():window.location.href=$(this).data("url")});t.$on("cartExpired",function(){u(t,null)});t.$on("cartRevived",function(){$.ajax({type:"GET",url:"/"+n.Settings.Culture+"/Cart/GetRevivedCartEditData",contentType:"application/json"}).done(function(i){t.$apply(function(){u(t,i)});n.AnalyticsData.cartModified()})});t.$on("cartUpdated",function(){h()});$(".popover-trigger").click(function(n){n.preventDefault()});$(".popover-trigger").popover({html:!0,content:function(){return $($(this).data("content-selector")).html()}})}return t.$inject=["$scope","$rootScope","$shopDataService"],t}(),r;t.CartEditController=i;r=angular.module("cartEdit",["shop"]).controller("CartEditController",i)})(t=n.CartEdit||(n.CartEdit={}))}(Vex||(Vex={})),function(n){var t;(function(){n.Modules.register("OgoneThankYou",{documentLoading:function(){},documentReady:function(t){t(".cross-sale-products .cross-sale-product a").each(function(){t(this).attr("href",n.Util.productDetailUrl(t(this).data("id")))});n.Header.showOgoneThankyou();t(".cross-sale .brand-alert.btn").each(function(){var i=t(this).data("brandid");n.BrandAlert.hasBrand(i)?t(this).addClass("active"):t(this).addClass("inactive")});t('.cross-sale[data-advice="true"]').length>0&&n.PersuasionApi.GetAdvice(function(i){if(i){var r=!1;if(t('.cross-sale[data-advice="true"]').each(function(){var n=t(this);n.find(".related-products").hide();switch(i.strategyId){case 1:n.find(".popular-products").show();n.find('.subtitle-text span[data-strategy="socialproof"]').show();break;case 2:n.find(".authority-products").show();n.find('.subtitle-text span[data-strategy="authority"]').show();break;case 3:n.find(".price-products").show();n.find('.subtitle-text span[data-strategy="pricing"]').show();break;default:n.find(".control-products").show();n.find('.subtitle-text span[data-strategy="control"]').show()}r=!0}),r){n.PersuasionApi.LearnAdviceView(i);t('.cross-sale[data-advice="true"]').off("click",".cross-sale-product").on("click",".cross-sale-product",function(){n.PersuasionApi.LearnAdviceSuccess(i)})}}});n.Ogone.ThankYou.IsComplete=!0;n.AnalyticsData.triggerPurchaseCompletedEvent()}})})(t=n.OgoneThankYou||(n.OgoneThankYou={}))}(Vex||(Vex={})),function(n){var t;(function(n){var t=function(){function n(){}return n.IsComplete=!1,n}();n.ThankYou=t})(t=n.Ogone||(n.Ogone={}))}(Vex||(Vex={}));$("#footer .trust").on("click",function(){var n=new sciro.Persuasion("5319bb160cf2ee587e160ee5","924f50587b3849afb7427a5a43990590")});(function(n){var t;(function(t){function e(){var r=$("input[name=CartId]").val(),t=$("#confirm-payment-form"),i;(t.popover({html:!0,placement:"topLeft",container:"body",content:$("#kiala-popover").html(),trigger:"manual"}),t.popover("show"),t.data("popover"))&&(i=t.data("popover").tip(),i.css("z-index",1e3),i.find(".kiala-action-cancel").click(function(){jQuery.ajax({url:"/"+n.Settings.Culture+"/checkout/CancelKialaRecovery/",type:"post"})}),i.find(".close,.kiala-action-cancel").click(function(){t.popover("hide").popover("destroy")}),i.find(".btn").click(function(){jQuery.ajax({url:"/"+n.Settings.Culture+"/checkout/UseKialaRecovery",type:"post"});t.popover("hide").popover("destroy")}))}var o=function(){function t(t,i){function f(){r.showEditExistingDomestic=!1;r.editUsed=!1;n.Util.showLightbox(609,710,n.LightboxModalMode.Full,{message:jQuery("#edit-shipping-address")})}function e(){r.showEditExistingDomestic=!0;r.editUsed=!1;n.Util.showLightbox(609,710,n.LightboxModalMode.Full,{message:jQuery("#edit-shipping-address")})}var r=this,u;r.showEditExistingDomestic=!1;r.editUsed=!1;u=[i.$on("chooseNewDomestic",f),i.$on("editExistingDomestic",e),];t.$on("$destroy",function(){u.forEach(function(n){n()})})}return t.prototype.inDialogEdit=function(n){var t,i,r,u;this.editUsed=!0;t=$("#edit-address-form-used");_.forEach(n,function(n,i){t.find("input[name='"+i+"']").val(n);t.find("select[name = '"+i+"']").val(n)});i=t.find("input[name='AddressName']").data("othertranslated");r=$("#AddressNameSelect option").val();n.ShippingAddressName&&(n.ShippingAddressName!=r?($("#AddressNameSelect").val()!=i&&$("#AddressNameSelect").val(i).trigger("change"),u=n.ShippingAddressName==i?"":n.ShippingAddressName,t.find("input[name='AddressName']").val(u)):(t.find("input[name='AddressName']").val(""),$("#AddressNameSelect").val(r).trigger("change")))},t.prototype.removeAddress=function(t){var u="#previous-address-"+t,i=$(u),r;i.css("opacity",.5);r=$("#DeleteDomesticShippingAddress"+t).find("input[name='CSRFToken']").val();jQuery.ajax({url:"/"+n.Settings.Culture+"/checkout/DeleteDomesticShippingAddress",type:"post",data:JSON.stringify({domesticShippingAddressId:t,csrfToken:r}),contentType:"application/json; charset=utf-8"}).then(function(){i.remove()}).always(function(){i.css("opacity",1)})},t.prototype.editExistingDomesticAddress=function(n,t){return t?this.saveNewDomesticAddress(n):this.saveExistingDomesticAddress(n),!1},t.prototype.createNewDomesticAddress=function(n){return this.saveNewDomesticAddress(n),!1},t.prototype.saveNewDomesticAddress=function(t){var i=this,r=i.getSecureAndValidatedFormInfo(t);r.valid&&jQuery.ajax({url:"/"+n.Settings.Culture+"/checkout/AddNewDomesticShippingAddressInAddressDialog",type:"post",data:r.formData,success:function(n){i.handleSaveSuccess(n,r.validator)},error:i.handleSaveError})},t.prototype.saveExistingDomesticAddress=function(t){var i=this,r=i.getSecureAndValidatedFormInfo(t);r.valid&&jQuery.ajax({url:"/"+n.Settings.Culture+"/checkout/EditDomesticShippingAddressInAddressDialog",type:"post",data:r.formData,success:function(n){i.handleSaveSuccess(n,r.validator)},error:i.handleSaveError})},t.prototype.getSecureAndValidatedFormInfo=function(n){var t=$("form[name='"+n.$name+"']");if(t.find(".control-group.error").length)return{valid:!1};var i=t.find('input[name$="CSRFToken"]').val(),r=t.serialize(),u=t.validate();return{valid:!0,validator:u,formData:r,csrfToken:i}},t.prototype.handleSaveError=function(){document.location.reload()},t.prototype.handleSaveSuccess=function(n,t){var i,f,e,r,o,u;if(n.success)document.location.reload();else for(i=0,f=n.Data.length;i<f;i++)for(e=n.Data[i].key,r=0,o=n.Data[i].errors.length;r<o;r++)u={},u[e]=n.Data[i].errors[r],t.showErrors(u)},t.$inject=["$scope","$rootScope"],t}(),i,r,u,f;t.AddressDialogController=o;i=function(){function n(){}return n.prototype.switchToMap=function(){this.showPreviousPickupPoints=!1},n.prototype.init=function(n){this.countries=n.countries;this.promotePickup=window.PromotePickupPoint;this.countries.length&&(this.pickupCountry=n.CountryId?_.find(this.countries,{CountryId:n.CountryId}):this.countries[0]);n.pickupZipCode!=""&&(this.pickupZipCode=n.pickupZipCode);n.hasLastUsedPickupPoints&&(this.showPreviousPickupPoints=n.hasLastUsedPickupPoints)},n.prototype.close=function(){$.unblockUI();this.promotePickup=!1;window.PromotePickupPoint=void 0},n}();t.PickupDialogController=i;r=function(){function t(n){this._scope=n;setTimeout(function(){window.PromotePickupPoint===!0&&$(".address-pickupsuggestion.address-suggestion-item").click()})}return t.prototype.warnForDeliveryGroup=function(n,t,i){var r=$(n.currentTarget).parent();if(t)r.popover({html:!0,title:"Hello",placement:"top",content:$("#popover-deliveryGroup").html()}).parent().on("click","button.popover-close",function(){r.popover("destroy")}).on("click","button.btn-primary",function(){i();r.popover("destroy")});else i()},t.prototype.openPickupMapDialog=function(t,i){this.warnForDeliveryGroup(t,i,function(){return n.Util.showLightbox(1e3,750,n.LightboxModalMode.Full,{message:$("#choose-pickup-map-dialog")})})},t.prototype.openAddressSuggestionDialog=function(){n.Util.showLightbox(609,710,n.LightboxModalMode.Full,{message:jQuery("#address-suggestions")})},t.prototype.modify=function(n,t,i){var r=this;this.warnForDeliveryGroup(n,i,function(){return r._scope.$emit("editExistingDomestic")})},t.prototype.chooseNewDomestic=function(n,t){var i=this;this.warnForDeliveryGroup(n,t,function(){return i._scope.$emit("chooseNewDomestic")})},t.prototype.modifyInvoice=function(){n.Util.showLightbox(609,710,n.LightboxModalMode.Full,{message:jQuery("#edit-invoice-address")})},t.$inject=["$scope","$rootScope"],t}();t.PaymentAddressController=r;u=function(){function n(n){this.isValid=!1;this._browserInfoSet=!1;this._scope=n}return n.prototype.init=function(n){n.paymentMethod=="BCMC_mobile"?this.MountBcmcMobileContainer(n):n.paymentMethod=="iDEAL"?this.MountIDealContainer(n):this.MountCardContainer(n)},n.prototype.MountCardContainer=function(n){var i={locale:n.locale,environment:n.environment,originKey:n.originKey,onChange:this.handleOnChange,onAdditionalDetails:this.handleOnAdditionalDetails},r=new AdyenCheckout(i),t=this,u=r.create("securedfields",{type:"card",brands:t.DetermineCardBrand(n.paymentMethod),styles:{error:{color:"red"},validated:{color:"##464650"},placeholder:{color:"#d8d8d8"}},ariaLabels:{lang:"en-GB",encryptedCardNumber:{label:""}},onChange:function(n,i){t.setBrowserInfo(n);t.handleOnChange(n,i);t.isValid=n.isValid;t._scope.$apply()}}).mount("#customCard-container")},n.prototype.MountIDealContainer=function(n){var t=this,i={locale:n.locale,environment:n.environment,originKey:n.originKey,paymentMethodsResponse:n.paymentMethods,onChange:function(n,i){t.setBrowserInfo(n);t.handleOnChange(n,i);t.isValid=n.isValid;t._scope.$apply()}},r=new AdyenCheckout(i),u=r.create("ideal",{showImage:!0}).mount("#ideal-container")},n.prototype.MountBcmcMobileContainer=function(n){var r=this,t={locale:n.locale,environment:n.environment,originKey:n.originKey,onAdditionalDetails:function(n){$("#adyenAdditionalDetails").val(JSON.stringify(n.data));$("#confirm-payment-form").submit()},onError:function(n){$("#adyenAdditionalDetails").val(JSON.stringify(n));$("#confirm-payment-form").submit()}},i=new AdyenCheckout(t),u=i.createFromAction(n.action).mount("#bancontactqr-container")},n.prototype.DetermineCardBrand=function(n){switch(n){case"MasterCard":return["mc"];case"Visa":return["visa"];case"American Express":return["amex"];case"BCMC":return["bcmc"];default:return["mc","visa","amex","bcmc"]}},n.prototype.handleOnChange=function(n){n.isValid&&$("#SecurePaymentData").val(JSON.stringify(n.data.paymentMethod))},n.prototype.handleOnAdditionalDetails=function(n){$("#AdditionalPaymentData").val(JSON.stringify(n.data))},n.prototype.setBrowserInfo=function(n){this._browserInfoSet||($("#BrowserInfo").val(JSON.stringify(n.data.browserInfo)),this._browserInfoSet=!0)},n.$inject=["$scope","$rootScope"],n}();t.PayController=u;f=function(){function n(n){this.isValid=!1;this._scope=n}return n.prototype.init=function(n){var t={locale:n.locale,environment:n.environment,originKey:n.originKey,onAdditionalDetails:this.handleOnAdditionalDetails},i=new AdyenCheckout(t);i.createFromAction(n.action).mount("#adyen-3ds2-container")},n.prototype.handleOnAdditionalDetails=function(n){$("#adyenAdditionalDetails").val(JSON.stringify(n.data));$("#pay-action-form").submit()},n.$inject=["$scope","$rootScope"],n}();t.PayActionController=f;n.Modules.register("CheckoutPayment",{documentLoading:function(){n.Util.registerCustomValidators();e()},documentReady:function(t){var u,o,s,f,i,r;if(t("#edit-invoice-address-link").attr("data-disable-invoice-address-editing")){t("#edit-invoice-address-link").popover({html:!0,placement:"top",content:t("#invoice-address-cannot-edit").html()});t(document).on("click",".invoiceAddressCannotEdit .buttons .yes",function(){t(this).popover("hide")})}if((window.location.href.indexOf("?invoice=1")>=0||window.location.href.indexOf("&invoice=1")>=0)&&n.Util.showLightbox(609,515,n.LightboxModalMode.Full,{message:jQuery("#edit-invoice-address")}),u=!1,o=t("#pay-action-form").length>0,o)t(document).on("submit","#pay-action-form",function(){return n.Util.showLightbox(250,50,n.LightboxModalMode.Full,{message:t("#waitPointerDl"),overlayCSS:{backgroundColor:"#fff"}}),!0});if(s=t(".confirm-payment-form").length>0,s)t(document).on("submit",".confirm-payment-form",function(i){var e,o,s,f,r;if(t('input[name$="SecurePaymentData"]').length>0&&t('input[name$="SecurePaymentData"]').val().length>0||t('input[name$="adyenAdditionalDetails"]').length>0&&t('input[name$="adyenAdditionalDetails"]').val().length>0)return n.Util.showLightbox(250,50,n.LightboxModalMode.Full,{message:t("#waitPointerDl"),overlayCSS:{backgroundColor:"#fff"}}),!0;if(!t(".enter-coupon-data").hasClass("hide")&&t(".coupon input[name=couponcode]").val().length>0&&!u)return i.preventDefault(),i.stopPropagation(),u=!0,t("a.validatecoupon").click(),!1;if(u=!1,t(".no-payment-required").hasClass("hide")&&t(".no-payment-required input[type=hidden]").remove(),e=t(".user-payment-method.selected"),e.find("input.cvc-input:visible").length>0){if(o=e.find("input.cvc-input:visible").val(),!o||o.length==0)return f=t("#enter_cvc_code_alert"),r=t("#enter_cvc_code_alert_template").clone(),r.removeAttr("id").attr("id","enter_cvc_code_alert"),f.length>0?f.replaceWith(r):e.find("input.cvc-input").after(r),r.removeAttr("style"),i.stopPropagation(),!1;if(o.length!=0){if(s=e.find("input.cvc-input:visible").attr("data-paymentMethod"),(s=="Visa"||s=="MasterCard")&&(o.length!=3||isNaN(parseInt(o))))return f=t("#enter_cvc_code_alert"),r=t("#MSCVISA_cvc_code_alert_template").clone(),r.removeAttr("id").attr("id","enter_cvc_code_alert"),f.length>0?f.replaceWith(r):e.find("input.cvc-input").after(r),r.removeAttr("style"),i.stopPropagation(),!1;if(s=="American Express"&&(o.length!=4||isNaN(parseInt(o))))return f=t("#enter_cvc_code_alert"),r=t("#AMEX_cvc_code_alert_template").clone(),r.removeAttr("id").attr("id","enter_cvc_code_alert"),f.length>0?f.replaceWith(r):e.find("input.cvc-input").after(r),r.removeAttr("style"),i.stopPropagation(),!1}}return e.find(".information-alias").length>0&&n.Util.showLightbox(250,50,n.LightboxModalMode.Full,{message:t("#waitPointerDl"),overlayCSS:{backgroundColor:"#fff"}}),!0});t("input[type=radio]").change(function(){var n=t(this).val(),i;n.indexOf("|")!==-1&&(i=n.split("|"),i.length==2&&(n=i[1]),i.length==4&&i[1].toLowerCase()=="american express"&&(n=i[1]));n=n.toLowerCase();n=="american express"?(t(".reserve-payment-allowed").removeClass("hide"),t(".reserve-payment-allowed").parents(".payment-method-group").removeClass("hide")):(t(".reserve-payment-allowed").addClass("hide"),t(".reserve-payment-allowed").parents(".payment-method-group").addClass("hide"),t("#ReservePaymentCheckbox").prop("checked",!1));n=="paypal"?(t(".reference-transactions-allowed").removeClass("hide"),t(".reference-transactions-allowed").parents(".payment-method-group").removeClass("hide")):(t(".reference-transactions-allowed").addClass("hide"),t(".reference-transactions-allowed").parents(".payment-method-group").addClass("hide"));n=="bcmc_mobile"||n=="bcmc"||n=="visa"||n=="mastercard"?(t(".alias-usage-allowed").removeClass("hide"),t(".alias-usage-allowed").parents(".payment-method-group").removeClass("hide")):(t(".alias-usage-allowed").addClass("hide"),t(".alias-usage-allowed").parents(".payment-method-group").addClass("hide"));t(this).parents(".user-payment-method").find(".information-alias").length>0?t(".directlink-explenation")&&(t(".directlink-explenation").removeClass("hide"),t(".directlink-explenation").parents(".payment-method-group").removeClass("hide")):t(".directlink-explenation")&&(t(".directlink-explenation").addClass("hide"),t(".directlink-explenation").parents(".payment-method-group").addClass("hide"),e)});t(document).on("submit","#edit-invoice-address .edit-addres-form",function(i){i.preventDefault();i.stopPropagation();var r=t(this),u=function(n){var i=jQuery(".invoice-address"),t;i.find(".address-title").html("<span class='name'>"+n.FirstName+" "+n.LastName+"<\/span>");t="<span>";n.CompanyName&&n.CompanyName!=""&&(t+=n.CompanyName+"<br/>");t=t+n.Street+" "+n.Number;n.Box&&n.Box!=""&&(t=t+" - "+n.Box);t=t+"<br/>"+n.PostalCode+" "+n.City+"<br/>"+n.CountryName+"<br/>"+n.MobilePhone+"<\/span>";i.find(".address-info").html(t)};return jQuery.ajax({url:"/"+n.Settings.Culture+"/checkout/EditInvoiceAddress",type:"post",data:r.serialize(),success:function(n){var o,i,s,h,f,c,e;if(n.Success)u(n.Address),t.unblockUI();else for(o=r.validate(),i=0,s=n.Data.length;i<s;i++)for(h=n.Data[i].key,f=0,c=n.Data[i].errors.length;f<c;f++)e={},e[h]=n.Data[i].errors[f],o.showErrors(e)}}),!1});t("a.showcouponfield").click(function(){t(this).addClass("hide");t("div.coupon .enter-coupon-data > div").removeClass("hide");t(".coupon-code input[name=couponcode]").focus()});t("a.validatecoupon").click(function(){var i=t(".coupon input[name=couponcode]").val(),r=t('#confirm-payment-form input[name$="CSRFToken"]').val();jQuery.ajax({url:"/"+n.Settings.Culture+"/checkout/ValidateCoupon",type:"post",data:JSON.stringify({couponcode:i,CSRFToken:r}),contentType:"application/json"}).done(function(n){n.Error==null?(t(".couponsuccess").removeClass("hide"),t(".couponfailure").addClass("hide"),t("#right-container .shadowed").html(n.Html),t("#right-loyalty").html(n.HtmlLoyalty),t("div.coupon .enter-coupon-data").addClass("hide"),t("div.coupon span.couponcode").html(i),t("div.coupon .show-coupon-data").removeClass("hide"),n.TotalAmount===0?(t(".no-payment-required").removeClass("hide"),t(".payment-options").addClass("hide"),t("#payment-button").val(t("#payment-button").data("confirmText"))):(t(".no-payment-required").addClass("hide"),t(".payment-options").removeClass("hide"),t("#payment-button").val(t("#payment-button").data("payText")))):(t(".coupon-code").addClass("error"),t(".coupon-code input[name=couponcode]").addClass("input-validation-error"),t(".coupon-code .couponvalidation").removeClass("hide").addClass("help-inline field-validation-error").html(n.Error));u&&t(".confirm-payment-form").submit()})});t(".coupon-code input[name=couponcode]").keydown(function(n){if(n.which==13)return t("a.validatecoupon").click(),n.preventDefault(),!1});t("a.cancelcoupon").click(function(){var i=t('#confirm-payment-form input[name$="CSRFToken"]').val();jQuery.ajax({url:"/"+n.Settings.Culture+"/checkout/CancelCoupon",type:"post",data:JSON.stringify({cartId:t("input[name=CartId]").val(),CSRFToken:i}),contentType:"application/json"}).done(function(n){n.Errors==null?(t(".couponfailure").addClass("hide"),t(".couponsuccess").addClass("hide"),t("#right-container .shadowed").html(n.Html),t("#right-loyalty").html(n.HtmlLoyalty),t("div.coupon .enter-coupon-data").removeClass("hide"),t("div.coupon span.couponcode").html(),t(".coupon input[name=couponcode]").val(""),t("div.coupon .show-coupon-data").addClass("hide"),t(".no-payment-required").addClass("hide"),t(".payment-options").removeClass("hide"),t("#payment-button").val(t("#payment-button").data("payText"))):(t(".couponfailure").removeClass("hide"),t(".couponfailure").html(n.Error))})});t("a.delete-user-payment-method").click(function(i){i.preventDefault();i.stopPropagation();var r=t(this),u=t(this).attr("data-paymentBrandCV"),f=t(this).attr("data-alias"),e=t(this).attr("data-cardNumber"),o=t('#confirm-payment-form input[name$="CSRFToken"]').val(),s=t(this).attr("data-psp");jQuery.ajax({url:"/"+n.Settings.Culture+"/checkout/DeleteUserPaymentMethod",type:"post",data:JSON.stringify({paymentBrandCV:u,alias:f,cardNumber:e,CSRFToken:o,Psp:s}),contentType:"application/json"}).done(function(n){n.Errors==null&&(r.parents("label").remove(),t(".user-payment-method [name=PaymentBrandCV]:radio:checked").length==0&&(t(".user-payment-method [name=PaymentBrandCV]:radio:last").prop("checked",!0),t(".user-payment-method [name=PaymentBrandCV]:radio:last").change()))})});t("[name=PaymentBrandCV]:radio").change(function(){t(".payment-method-select").each(function(){var n=t(this);n.is(":checked")?n.parents(".user-payment-method").addClass("selected"):n.parents(".user-payment-method").removeClass("selected")})});t(".user-payment-method input.cvc-input").keyup(function(){t(".confirm-payment-form #Cvc").val(t(this).val());t("#enter_cvc_code_alert").remove()});t(".user-payment-method").click(function(){var n=t(this).find("[name=PaymentBrandCV]:radio");n.is(":checked")||(t(".user-payment-method input.cvc-input").val(""),t("#enter_cvc_code_alert").remove(),t(this).find("input.cvc-input").val(""),t(".user-payment-method [name=PaymentBrandCV]:radio").removeProp("checked"),n.prop("checked",!0),n.change())});t(".toggle-payment-methods-general").click(function(){return t(".payment-methods-general").toggleClass("hide"),!1});t(".toggle-payment-methods-non-homebanking").click(function(){return t(".payment-methods-non-homebanking").toggleClass("hide"),!1});f=t("input[type='radio'][name='PaymentBrandCV']:checked");f.length==1&&(i=f[0].attributes.value.value,i.indexOf("|")!==-1&&(r=i.split("|"),r.length==2&&(i=r[1]),r.length==4&&r[1].toLowerCase()=="american express"&&(i=r[1])),i=i.toLowerCase(),t(".reserve-payment-allowed").addClass("hide"),t(".reserve-payment-allowed").parents(".payment-method-group").addClass("hide"),t("#ReservePaymentCheckbox").prop("checked",!1),i=="american express"?(t(".reserve-payment-allowed").removeClass("hide"),t(".reserve-payment-allowed").parents(".payment-method-group").removeClass("hide")):(t(".reserve-payment-allowed").addClass("hide"),t(".reserve-payment-allowed").parents(".payment-method-group").addClass("hide"),t("#ReservePaymentCheckbox").prop("checked",!1)),f.parents(".user-payment-method").find(".information-alias").length>0&&(t(".directlink-explenation")&&(t(".directlink-explenation").removeClass("hide"),t(".directlink-explenation").parents(".payment-method-group").removeClass("hide")),i=="paypal"?(t(".reference-transactions-allowed").removeClass("hide"),t(".reference-transactions-allowed").parents(".payment-method-group").removeClass("hide")):(t(".reference-transactions-allowed").addClass("hide"),t(".reference-transactions-allowed").parents(".payment-method-group").addClass("hide"))),i=="bcmc"||i=="visa"||i=="mastercard"?(t(".alias-usage-allowed").removeClass("hide"),t(".alias-usage-allowed").parents(".payment-method-group").removeClass("hide")):(t(".alias-usage-allowed").addClass("hide"),t(".alias-usage-allowed").parents(".payment-method-group").addClass("hide")));t(".popover-trigger").click(function(n){n.preventDefault()});t(".popover-trigger").popover({html:!0,content:function(){return t(t(this).data("content-selector")).html()}})}})})(t=n.CheckoutPayment||(n.CheckoutPayment={}))})(Vex||(Vex={}));shopModule.controller("Vex.CheckoutPayment.PaymentAddressController",Vex.CheckoutPayment.PaymentAddressController);shopModule.controller("Vex.CheckoutPayment.PickupDialogController",Vex.CheckoutPayment.PickupDialogController);shopModule.controller("Vex.CheckoutPayment.AddressDialogController",Vex.CheckoutPayment.AddressDialogController);shopModule.controller("Vex.CheckoutPayment.PayController",Vex.CheckoutPayment.PayController);shopModule.controller("Vex.CheckoutPayment.PayActionController",Vex.CheckoutPayment.PayActionController),function(n){var t;(function(t){var i=function(){function t(){this.stepNr=1;this.shippingMethod="";this.pickupZipCode=""}return t.prototype.init=function(n){if(this.countries=n.countries,this.countries.length){var t=_.find(this.countries,{CountryId:n.countryId});this.pickupCountry=t?t:this.countries[0]}n.pickupZipCode!=""?(this.shippingMethod="Pickup",this.stepNr=3,this.pickupZipCode=n.pickupZipCode):n.originAddNewDomesticShippingAddressInShippingPage&&(this.shippingMethod="Pickup",this.stepNr=2,this.pickupZipCode="",this.shippingMethod="Domestic");n.isPickupDisabled&&(this.pickupDisabled=!0,this.stepNr=2,this.pickupZipCode="",this.shippingMethod="Domestic")},t.prototype.selectDomestic=function(){this.stepNr=2;this.shippingMethod="Domestic"},t.prototype.selectPickup=function(){this.pickupDisabled||(this.stepNr=this.pickupZipCode==""?2:3,this.shippingMethod="Pickup")},t.prototype.openPickupMapDialog=function(){n.Util.showLightbox(1e3,500,n.LightboxModalMode.Full,{message:$("#choose-pickup-map-dialog")})},t.prototype.CreateInvoiceAddressForPickup=function(t,i){var u=this,r=u.getSecureAndValidatedFormInfo(t);return r.valid?(jQuery.ajax({url:"/"+n.Settings.Culture+"/checkout/CreateInvoiceAddressForPickup?cartId="+i+"&csrfToken="+r.csrfToken,type:"post",data:r.formData,success:function(n){u.handleSaveSuccess(n,r.validator)},error:u.handleSaveError}),!1):!1},t.prototype.getSecureAndValidatedFormInfo=function(n){var t=$("form[name='"+n.$name+"']");if(t.find(".control-group.error").length)return{valid:!1};var i=t.find('input[name$="CSRFToken"]').val(),r=t.serialize(),u=t.validate();return{valid:!0,validator:u,formData:r,csrfToken:i}},t.prototype.handleSaveError=function(){document.location.reload()},t.prototype.handleSaveSuccess=function(n,t){var i,f,e,r,o,u;if(n.success)document.location.href=n.url;else for(i=0,f=n.Data.length;i<f;i++)for(e=n.Data[i].key,r=0,o=n.Data[i].errors.length;r<o;r++)u={},u[e]=n.Data[i].errors[r],t.showErrors(u)},t}();t.ShippingFirstBuyerController=i;n.Modules.register("ShippingGlobal",{documentLoading:function(){n.Util.registerCustomValidators()},documentReady:function(){}})})(t=n.CheckoutShipping||(n.CheckoutShipping={}))}(Vex||(Vex={})),function(){function n(){function n(n,t){var u=this,r=$("#PickupCallbackForm"),i;if(!r.length)throw new Error("No PickupCallbackForm found for vexPickupChooserIframeDirective");if(i=r.find('input[name$="CSRFToken"]').val(),!i)throw new Error("No csrfToken foudn for vexPickupChooserIframeDirective");u.getPickupIframeUrl=function(){if(n.zip&&n.zip.length>=4&&n.country&&n.language){var r=n.url.replace("ZIP_PLACEHOLDER",n.zip);return r=r.replace("COUNTRY_PLACEHOLDER",n.country),r=r.replace("DSPID_PLACEHOLDER",n.dspid),r=r.replace("SECURE_PLACEHOLDER",i),t.trustAsResourceUrl(r)}return""}}return n.$inject=["$scope","$sce"],{restrict:"EA",replace:!0,scope:{url:"@vexPickupChooserIframeUrl",zip:"=vexPickupChooserIframeZip",country:"=vexPickupChooserIframeCountry",dspid:"=vexPickupChooserIframeDspid",language:"@vexPickupChooserIframeLanguage"},controller:n,controllerAs:"pickupIframeVm",template:'<iframe width="100%" height="600" style="border:none;"  ng-src="{{pickupIframeVm.getPickupIframeUrl()}}" ><\/iframe>'}}function t(){return function(n,t){var i=t.validate();i.settings.submitHandler=function(){}}}function i(){function n(n,t){var o=jQuery(document),i=$(n),r="input[name='"+t+"AddressName']",f="select[name='"+t+"AddressNameSelect']",u=i.find(r).attr("data-origValue"),e=i.find(r).attr("data-othertranslated");i.find(f+' option[value="'+u+'"]').length==0||u==e?(i.find(f).val(e),u!=e?i.find(r).val(u):i.find(r).val(""),i.find(r).show()):(i.find(f).val(u),i.find(r).hide(),i.find(r).attr("data-lastValue",""),i.find(r).val(""))}function t(n,t){var i=$(n),r="input[name='"+t+"AddressName']",u="select[name='"+t+"AddressNameSelect']",f=function(){var n=i.find(r).attr("data-othertranslated");i.find(u).val()==n?(i.find(r).val(i.find("input[name=AddressName]").attr("data-lastValue")),i.find(r).show()):(i.find(r).hide(),i.find(r).attr("data-lastValue",i.find("input[name=AddressName]").val()),i.find(r).val(""))};i.find(u).on("change",f)}return function(i,r,u){var f="#"+u.vexAddressName,e=u.prefix||"";n(f,e);t(f,e)}}shopModule.controller("Vex.CheckoutShipping.ShippingFirstBuyerController",Vex.CheckoutShipping.ShippingFirstBuyerController);shopModule.directive("vexPickupChooserIframe",n);shopModule.directive("vexDisablePlainSubmitWithJqueryValidation",t);shopModule.directive("vexAddressName",i)}();angular.module("shop").controller("languagePopupCtrl",["$scope","$window","$session","$http","$cal","$features",function(n,t,i,r,u,f){n.choice=0;n.step=0;f.getFeatureVariant("language-deprecation-popup").then(function(t){var i=t!=null&&t=="Y";Vex.Storage.getUserData("acc",function(t){t.LanguageId!=4||t.CountryId!=1||t.Onboarding||i&&(n.step=1,Vex.Util.showLightbox(800,500,Vex.LightboxModalMode.Full,{message:$("#language-popup"),overlayCSS:{backgroundColor:"#fff"}}))})})["catch"](function(){});n.fr=function(){n.choice=3;n.step=2};n.nl=function(){n.choice=1;n.step=2};n.toTheSale=function(){Vex.Util.slideUpPopup();$.unblockUI()};n.toTheLanguageSelection=function(){n.step=1;n.choice=0}}]),function(){angular.module("shop").controller("LanguageSwitcherController",["$scope",function(n){function i(){var n=window.location.protocol+"//"+window.location.host,i=n.lastIndexOf("."),u=n,f=n,e=n,t;return i>0&&(u=n.substring(0,i)+".be",f=n.substring(0,i)+".nl",e=n.substring(0,i)+".lu"),t=r(),[{description:"Nederland (Nederlands)",countryIso:"nl",culture:"nl-NL",url:f+"/nl-NL"+t+window.location.hash},{description:"België (Nederlands)",countryIso:"be",culture:"nl-BE",url:u+"/nl-BE"+t+window.location.hash},{description:"Belgique (français)",countryIso:"be",culture:"fr-BE",url:u+"/fr-BE"+t+window.location.hash},{description:"Luxembourg (français)",countryIso:"lu",culture:"fr-LU",url:e+"/fr-LU"+t+window.location.hash},]}function r(){var n="",t=_(window.location.pathname).indexOf("/",1);return t>0&&(n=window.location.pathname.substr(t)),n}function u(n){var t=Vex.Settings.Culture;return _.findIndex(n,function(n){return n.culture==t})}if(this.languages=i(),this.currentLanguageIndex=u(this.languages),this.currentLanguageIndex===-1){var t=this.languages.find(function(n){return n.culture==="nl-BE"})||this.languages[0];this.currentCountryIso=t.countryIso;this.currentLanguageDescription=t.description}else this.currentCountryIso=this.languages[this.currentLanguageIndex].countryIso,this.currentLanguageDescription=this.languages[this.currentLanguageIndex].description,this.languages.splice(this.currentLanguageIndex,1);this.isGodFatherLanding=n.isGodFatherLanding;setTimeout(function(){var n=$.cookie("defaultCulture")=="1";if($.removeCookie("defaultCulture"),n){$("#language-selection").popover({html:!0,placement:"top",popoverClass:"blue slim",trigger:"manual",content:$("#popover-defaultLanguage").html(),viewport:"body",container:"#language-selection"});$("#language-selection").popover("show");$(document).on("click","#language-selection,#language-selection .dropdown-toggle,#language-selection a",function(){return $("#language-selection").popover("destroy"),!1});setTimeout(function(){$("#language-selection").popover("destroy")},1e4)}},2500)}])}(),function(){angular.module("shop").directive("vexLanguageSwitcher",function(){return{restrict:"E",templateUrl:"/templates/language-switcher",bindToController:{referralUrl:"=referralUrl",isGodFatherLanding:"=isGodFatherLanding"},controller:"LanguageSwitcherController",controllerAs:"languageSwitcherVm"}})}(),function(n){var t;(function(t){function u(n){var t=new i,r=t.products.indexOf(+n);r!=-1&&t.products.splice(r,1);t.products.unshift(n);t.products.length>12&&(t.products=t.products.slice(0,12));t.persist()}function f(n){var t=new i,r=t.products.indexOf(+n);r!=-1&&t.products.splice(r,1);t.persist()}function e(){var n=new i;n.products=[];n.persist()}function r(){var n=new i;return n.products}function o(){for(var e=r(),u,f,o,i=0;i<e.length;i++)u=e[i],f=n.Dictionary.products[u],f?(o=n.Dictionary.sales[f.SaleId],o||t.removeProduct(u)):t.removeProduct(u)}var i=function(){function t(){var r,t,i;if(this.products=[],r=n.Storage.getStoredCookie("recentPr",!1),r)for(t=r.split("|"),this.abTestValue=+t[0],this.token=t[1],i=2;i<t.length;i++)this.products.push(+t[i])}return t.prototype.persist=function(){for(var i=this.abTestValue+"|"+this.token,t=0;t<this.products.length;t++)i+="|"+this.products[t];n.Storage.setStoredCookie("recentPr",!1,i)},t}();t.addProduct=u;t.removeProduct=f;t.clearProducts=e;t.getRecentlyViewedProducts=r;t.clearExpiredProducts=o})(t=n.RecentlyViewedProducts||(n.RecentlyViewedProducts={}))}(Vex||(Vex={})),function(n){var t;(function(t){var i=function(){function n(){}return n.jfmfsLoaded=!1,n}();t.Data=i;n.Modules.register("InviteFriends",{documentLoading:function(){},documentReady:function(t){var f=t(document),e=t(window),i;n.Util.calView("FRIEND_INVITE","FRIEND_INVITE");t("#share-on-facebook").click(function(t){n.Util.calAction("FRIEND_INVITE","INVITE_INTENT",{},{provider:"Facebook"});t.preventDefault&&t.preventDefault();n.AccountProfile.Data.currentUid?initFbPostWall():FB.login(function(t){t.status==="connected"?(n.AccountProfile.Data.currentUid=t.authResponse.userID,n.AccountProfile.Data.AccessToken=t.authResponse.accessToken,initFbPostWall()):alert("Login Failed!")})});t("#share-on-twitter").click(function(i){n.Util.calAction("FRIEND_INVITE","FRIEND_INVITE",{},{provider:"Twitter"});i.preventDefault&&i.preventDefault();var r=575,u=400,f=(t(window).width()-r)/2,e=(t(window).height()-u)/2,o="http://twitter.com/share?url="+t("#TwitterInviteLink").val(),s="status=1,width="+r+",height="+u+",top="+e+",left="+f;return window.open(o,"twitter",s),!1});t(".gmail").click(function(t){return t.preventDefault&&t.preventDefault(),providerUsed="Gmail",n.Util.calAction("FRIEND_INVITE","INVITE_INTENT",{},{provider:providerUsed}),launchCloudsponge("gmail")});t(".yahoo").click(function(t){return t.preventDefault&&t.preventDefault(),providerUsed="Yahoo",n.Util.calAction("FRIEND_INVITE","INVITE_INTENT",{},{provider:providerUsed}),launchCloudsponge("yahoo")});t(".wlh").click(function(t){return t.preventDefault&&t.preventDefault(),providerUsed="Hotmail",n.Util.calAction("FRIEND_INVITE","INVITE_INTENT",{},{provider:providerUsed}),launchCloudsponge("windowslive")});t(".outlook").click(function(t){return t.preventDefault&&t.preventDefault(),providerUsed="Outlook",n.Util.calAction("FRIEND_INVITE","INVITE_INTENT",{},{provider:providerUsed}),launchCloudsponge("outlook")});var o=function(){},r=function(n){var h=t("#friendsDiv").data("deletetext"),i=t(n.target),f=i.parent().find("a"),e;if(i.parent().removeClass("error"),t("#validation-invites").hide(),t("#validation-invites-empty").hide(),t.trim(i.val()).length>0){if(f.removeClass("hide"),e=t(".email-address-field").last(),i[0]==e[0]){var c=t('<li class="control-group">'),o=t('<input type="text" class="email-address-field" placeholder="email@domain.com" value="" />'),s=t('<a href="#" class="hide email-address-delete">'+h+"<\/a >");o.keyup(r);s.click(u);t(".email-addresses-container ol,.email-addresses-container ul").append(c.append(o).append(" ").append(s));t(".email-addresses-container ol,.email-addresses-container ul").append(" ")}}else f.hasClass("hide")&&f.addClass("hide")},u=function(n){n.preventDefault&&n.preventDefault();t(n.target).closest("li").remove()};t(".email-address-field").keyup(r);t(".email-address-delete").click(u);t(".popup-invite-mail .more-friends .nav-arrow.left").click(function(){var i=+t(".popup-invite-mail .email-addresses-container").data("pageIndex"),r=t(".popup-invite-mail .email-addresses-container .email-address-div"),u=4,n,f;for(i-=u,i<0&&(i=0,t(".popup-invite-mail .more-friends .nav-arrow.left").css("visibility","hidden")),t(".popup-invite-mail .more-friends .nav-arrow.right").css("visibility","visible"),t(".popup-invite-mail .email-addresses-container").data("pageIndex",i),n=0;n<r.length;n++)f=n<i||n>=i+u,f?t(r[n]).addClass("hide"):t(r[n]).removeClass("hide")});t(".popup-invite-mail .more-friends .nav-arrow.right").click(function(){var i=+t(".popup-invite-mail .email-addresses-container").data("pageIndex"),r=t(".popup-invite-mail .email-addresses-container .email-address-div"),u=4,n,f;for(i+=u,i>r.length-u&&(i=r.length-u,t(".popup-invite-mail .more-friends .nav-arrow.right").css("visibility","hidden")),t(".popup-invite-mail .more-friends .nav-arrow.left").css("visibility","visible"),t(".popup-invite-mail .email-addresses-container").data("pageIndex",i),n=0;n<r.length;n++)f=n<i||n>=i+u,f?t(r[n]).addClass("hide"):t(r[n]).removeClass("hide")});t(".email-send").click(function(i){var f,r,o,u,e;for(i.preventDefault&&i.preventDefault(),providerUsed="Email",n.Util.calAction("FRIEND_INVITE","INVITE_INTENT",{},{provider:providerUsed}),f=[],r=t(".pagecontent.friends input.email-address-field"),r.removeClass("error"),o=!1,u=0;u<r.length;u++)e=t.trim(t(r[u]).val()),e.length>0&&(n.Util.isValidEmailAddress(e)?(f.push(e),t(r[u]).parent().removeClass("error")):(t(r[u]).parent().addClass("error"),o=!0));t("#validation-invites").hide();t("#validation-invites-empty").hide();o?t("#validation-invites").show():f.length==0?(t(".pagecontent.friends input.email-address-field:first").parent().addClass("error"),t("#validation-invites-empty").show()):(t(".popup-invite-mail .lightbox-popup .top img.pull-left").hide(),t(".pagecontent.friends input.email-address-field").parent().removeClass("error"),DisplayEmailPopup(f))});i=t.trim(t(".popup-invite-mail").data("directEmailInvite"));i!=""&&n.Util.isValidEmailAddress(i)&&DisplayEmailPopup([i]);t("form#sendmail").submit(function(){var i,f,r,u;t("#validation-invites").hide();t("#validation-invites-empty").hide();var e=!1,s=t("#emailCode").val(),h=t("#CampaignId").val(),o=t("#Message").val();for(t.trim(o)==""&&(t("#Message_label").removeClass("hide"),t("#Message_label").parent().addClass("error"),e=!0),i=[],f=t(".popup-invite-mail .email-addresses-container .email-address-div"),r=0;r<f.length;r++)u=t.trim(t(f[r]).data("email")),u!=null&&u!=""&&(i[i.length]=u);return i.length==0?(t("#EmailAddresses_label").removeClass("hide"),t("#EmailAddresses_label").parent().addClass("error"),t.unblockUI(),!1):e?(window.location.hash="SendPersonal1",t.unblockUI(),!1):(n.Util.calAction("FRIEND_INVITE","INVITE_SENT",{},{provider:providerUsed}),friendsInvitedData=null,ajaxInviteRequest(i,o,h,s),!1)});t("#share-on-facebook").popover({html:!0,placement:"top",content:t(".share-facebook-popover").html()});t("#invitation-language").change(function(){t("#Message").val(t("#email-message-"+t("#invitation-language option:selected").val()).text());t("#SubjectLine").val(t("#email-subject-"+t("#invitation-language option:selected").val()).text())});n.Facebook.addListener("invite-friends",function(){FB.getLoginStatus(function(t){t.status==="connected"&&(n.AccountProfile.Data.currentUid=t.authResponse.userID,n.AccountProfile.Data.AccessToken=t.authResponse.accessToken)});t("#share-on-facebook").show()})}})})(t=n.AccountProfile||(n.AccountProfile={}))}(Vex||(Vex={}));cloudSpongeReinit=!1;friendsInvitedData=null;providerUsed="Email";$(document).ready(function(){$("#invite-friend-email-form").submit(useHeaderInvite);$("#send-invite-header").click(useHeaderInvite);$("#InviteLink").on("mousedown",function(){Vex.Util.calAction("FRIEND_INVITE","INVITE_INTENT",{},{provider:"Personal Link"})})}),function(n){var t=function(){function t(){var t=this,n;this.chatClientUsername="unknown";this.chatOperatorUsername="Sophie";this.endSessionMessage="...Session ended...";this.lastTypingDateTime=null;this.lastTypingValue=!1;this.InitPopup();this.initializeLiveChat();$(".livechat-widget a.online").click(function(n){t.OpenPopup(n)});n=$.cookie("Shop.LiveChat");n+""=="true"&&this.openLiveChat()}return t.prototype.initializeLiveChat=function(){var t=this;$(".livechat textarea.chat-input").keydown(function(t){t.which==13?(n.LiveChat.instance.sendChatMessage(),$(".livechat textarea.chat-input").val(""),n.LiveChat.instance.lastTypingDateTime=null):n.LiveChat.instance.lastTypingDateTime=new Date});$(".livechat textarea.chat-input").keyup(function(n){n.which==13&&$(".livechat textarea.chat-input").val("")});$(".livechat a.close").click(function(n){n&&n.preventDefault();t.closeLiveChat()})},t.prototype.openLiveChat=function(){$.ajax({type:"POST",url:"/"+n.Settings.Culture+"/LiveChat/StartLiveChat"}).done(function(t){var r,i;if(t!=null){if($(".livechat textarea.chat-input").removeAttr("disabled"),r=$(".livechat .discussion"),r.html(""),n.LiveChat.instance.chatClientUsername=t.Username,n.LiveChat.instance.endSessionMessage=t.EndSessionMessage,t.HistoryMessages!=null)for(i=0;i<t.HistoryMessages.length;i++){var u=t.HistoryMessages[i].IsOperator?n.LiveChat.instance.chatOperatorUsername:n.LiveChat.instance.chatClientUsername,f=t.HistoryMessages[i].IsOperator?"operator":"client",e=n.LiveChat.instance.formatChatMessage(t.HistoryMessages[i].Message,u,f);r.append($(e))}setTimeout(function(){n.LiveChat.instance.updateTyping()},2e3);setTimeout(function(){n.LiveChat.instance.updateChatMessages()},4e3);$(".livechat").show();r.scrollTop(r[0].scrollHeight)}})},t.prototype.sendChatMessage=function(){var t=$(".livechat textarea.chat-input").val();t!=""&&$.ajax({type:"POST",url:"/"+n.Settings.Culture+"/LiveChat/SendMessage",data:JSON.stringify({message:t}),contentType:"application/json; charset=utf-8",success:function(t){var r=n.LiveChat.instance.formatChatMessage(t,n.LiveChat.instance.chatClientUsername,"client"),i=$(".livechat .discussion");i.append($(r));i.scrollTop(i[0].scrollHeight)}})},t.prototype.updateChatMessages=function(){var t=$.cookie("Shop.LiveChat");t&&$.ajax({type:"POST",url:"/"+n.Settings.Culture+"/LiveChat/GetMessages",success:function(t){var i,u,r;if(t!=null&&t!="")if(i=$(".livechat .discussion"),t.ChatSession.StatusCV=="Closed")$(".livechat textarea.chat-input").attr("disabled","disabled"),u=n.LiveChat.instance.formatChatMessage(n.LiveChat.instance.endSessionMessage,"","client"),i.append($(u)),i.scrollTop(i[0].scrollHeight),$(".livechat .typing-box").hide();else{for(r=0;r<t.Messages.length;r++){var f=t.Messages[r].IsOperator?n.LiveChat.instance.chatOperatorUsername:n.LiveChat.instance.chatClientUsername,e=t.Messages[r].IsOperator?"operator":"client",u=n.LiveChat.instance.formatChatMessage(t.Messages[r].Message,f,e);i.append($(u))}t.Messages.length>0&&i.scrollTop(i[0].scrollHeight);t.ChatSession.IsOperatorTyping&&t.Messages.length==0?$(".livechat .typing-box").show():$(".livechat .typing-box").hide();setTimeout(function(){n.LiveChat.instance.updateChatMessages()},4e3)}}})},t.prototype.updateTyping=function(){var r=$.cookie("Shop.LiveChat"),t,i;r&&(t=!1,this.lastTypingDateTime!=null&&(i=(new Date).getTime()-this.lastTypingDateTime.getTime(),t=i/1e3<2),this.lastTypingValue!=t&&(this.lastTypingValue=t,$.ajax({type:"POST",url:"/"+n.Settings.Culture+"/LiveChat/GetMessages",data:JSON.stringify({isTyping:t}),contentType:"application/json; charset=utf-8",success:function(){}})),setTimeout(function(){n.LiveChat.instance.updateTyping()},2e3))},t.prototype.closeLiveChat=function(){$(".livechat .discussion").html(" ");$(".livechat").fadeOut();$.cookie("Shop.LiveChat",null,{path:"/",expires:-1});$.removeCookie("Shop.LiveChat",{path:"/"});$.ajax({type:"POST",url:"/"+n.Settings.Culture+"/LiveChat/CloseLiveChat",data:JSON.stringify({deleteMessages:!1}),contentType:"application/json; charset=utf-8",success:function(){}})},t.prototype.formatChatMessage=function(n,t,i){return'<div><div class="chat-message '+i+'"><div class="chat-message-name">'+t+'<\/div><div class="chat-message-content">'+n+"<\/div><\/div><\/div>"},t.prototype.InitPopup=function(){var n=this;$(".livechat-popup div.close").click(function(t){t&&t.preventDefault();n.closeChatRequest(!0)});$(".livechat-popup select#chat-contact-topic").change(function(){var t=$(".livechat-popup select#chat-contact-topic").val();t>0&&n.selectChatTopic(t)});$(".livechat-popup #enter-chat-button").click(function(t){t&&t.preventDefault();n.enterInQueue()});$(".livechat-popup #error-box").hide();$(".livechat-popup #contact-message").keydown(function(){var n=$(this).val();n.length>255&&$(this).val(n.substr(0,255))});$(".livechat-popup #contact-message").keyup(function(){var n=$(this).val();n.length>255&&$(this).val(n.substr(0,255))});$(".livechat-popup select#chat-contact-topic").change()},t.prototype.OpenPopup=function(t){(t&&t.preventDefault(),$(".livechat").is(":visible"))||($(".livechat-popup .question").show(),$(".livechat-popup .waiting-queue").hide(),$("#chat-not-available").hide(),$("#chat-not-available-exceptional").hide(),$("#chat-topic-data-box div.preselection-loader").length>0&&$("#chat-topic-data-box").load("/"+n.Settings.Culture+"/LiveChat/LoadTopicData",null,function(){$("#chat-contact-form").attr("class","");var t=new n.TopicSelector("#chat-contact-form")}),n.Util.showLightbox(643,524,n.LightboxModalMode.Full,{message:$(".livechat-popup")}))},t.prototype.closeChatRequest=function(t){$.ajax({type:"POST",url:"/"+n.Settings.Culture+"/LiveChat/CloseLiveChat",data:JSON.stringify({deleteMessages:!0}),contentType:"application/json; charset=utf-8",success:function(){t&&$.unblockUI()}})},t.prototype.enterInQueue=function(){var i=$(".livechat-popup select.topic-list option:selected").val(),r=$(".livechat-popup select#chat-contact-cart").val(),u=$(".livechat-popup select#chat-contact-sale").val(),f=$(".livechat-popup select#chat-contact-booking").val(),t=$(".livechat-popup #contact-message").val();t==""||isNaN(i)?$(".livechat-popup #error-box").show():$.ajax({type:"POST",data:JSON.stringify({topicId:i,saleId:u,cartId:r,bookingKey:f,message:t}),contentType:"application/json; charset=utf-8",url:"/"+n.Settings.Culture+"/LiveChat/EnterInQueue",success:function(e){$(".livechat-popup .question").hide();$(".livechat-popup .waiting-queue").show();$(".livechat-popup .waiting-queue #chatSessionId").val(e.chatSessionId);$(".livechat-popup #live-chat-first-message").html(t.replace(/\r?\n|\r/g,"<br>"));$("#queue-message").val(t);$("#queue-topicId").val(i);$("#queue-cartId").val(r);$("#queue-saleId").val(u);$("#queue-bookingKey").val(f);setTimeout(function(){n.LiveChat.instance.getChatSessionStatus()},4e3);$("#disabled-sendmail-button").show()}})},t.prototype.getChatSessionStatus=function(){var t=this;$.ajax({type:"POST",url:"/"+n.Settings.Culture+"/LiveChat/GetChatSessionStatus",success:function(i){i!=null&&(i=="Active"?($.unblockUI(),n.LiveChat.instance.openLiveChat()):i.ChatNotAvailable?($("#waiting-content").hide(),i.IsChatExceptionalDowntime?$("#chat-not-available").show():$("#chat-not-available-exceptional").show(),t.closeChatRequest(!1)):setTimeout(function(){n.LiveChat.instance.getChatSessionStatus()},4e3))}})},t.prototype.selectChatTopic=function(t){$.ajax({type:"POST",data:JSON.stringify({topicId:t}),contentType:"application/json; charset=utf-8",url:"/"+n.Settings.Culture+"/LiveChat/LoadTopicData",success:function(n){$(".livechat-popup #chat-contact-form").attr("class","");$(".livechat-popup #chat-topic-data-box").html(n)}})},t}();n.LiveChat=t}(Vex||(Vex={}));$(document).ready(function(){Vex.LiveChat.instance=new Vex.LiveChat}),function(n){var t;(function(){n.Modules.register("ContactTicket",{documentLoading:function(){},documentReady:function(t){var u=new n.TopicSelector("#contact-tickets"),i=function(n,i){i===void 0&&(i=!1);n?(t(".cart-help-container").show(),i?(t(".cart-help-partial").hide(),t(".cart-help-partial-loader").show()):(t(".cart-help-partial").show(),t(".cart-help-partial-loader").hide())):t(".cart-help-container").hide()},r;t("#btn-new-ticket").click(function(){t(".create-ticket").show()});t(".carts-list").change(function(){var u=this;if(u.value=="0"||u.value==""){i(!1);return}r&&clearTimeout(r);r=setTimeout(function(){u.value&&u.value!="0"&&(t(".cartDetailLink").attr("href","/"+n.Settings.Culture+"/Account/CartDetail/"+u.value),i(!0,!0),t(".cart-help-partial").load("/"+n.Settings.Culture+"/Account/CartDetail/"+u.value,null,function(){i(!0,!1)}))},200)});t(".bookings-list").change(function(){var i=this;if(i.value=="0"||i.value==""){t(".booking-help-container").hide();return}t.getJSON("/"+n.Settings.Culture+"/Travel/SupplierSupportDescription/"+i.value).done(function(n){n&&n.SupplierSupportDescription?(n.Suppliername?(t("#title-container").show(),t("#travelSupplierName").html(n.SupplierName)):t("#title-container").hide(),t(".booking-help-partial").html(n.SupplierSupportDescription),t(".booking-help-container").show()):t(".booking-help-container").hide()})})}})})(t=n.ContactTickets||(n.ContactTickets={}))}(Vex||(Vex={})),function(n){var t;(function(n){function r(){$(".track").each(function(){i($(this))})}function i(n){n.find(".track-path-description-container .content-bottom").html(n.find(".track-path-active .track-path-description").html());n.find(".track-path-description-bubble .bubble").css("left",t(n,n.find(".track-path-active")));n.find(".track-path").hover(function(){$(this).hasClass("track-path-enabled")&&(n.find(".track-path-active").removeClass("track-path-active").addClass("track-path-enabled"),$(this).addClass("track-path-active").removeClass("track-path-enabled"),n.find(".track-path-description-container .content-bottom").html($(this).find(".track-path-description").html()),n.find(".track-path-description-bubble .bubble").animate({left:t(n,$(this))},200))})}function t(n,t){return t.find("span.track-path-label").position().left+parseInt(n.find(".track-path-description-bubble").css("padding-left").replace("px","").replace("%",""))+parseInt(n.find(".track-path-description-bubble").css("padding-right").replace("px","").replace("%",""))-parseInt(t.find("span.track-path-label").css("margin-right").replace("px","").replace("%",""))-parseInt(n.find(".track-path-description-bubble").css("margin-left").replace("px","").replace("%",""))-n.find(".track-path-description-bubble").position().left}n.initialize=r;n.initializeIndividualTrackPath=i;n.calculatePosition=t})(t=n.TrackPath||(n.TrackPath={}))}(Vex||(Vex={}));$(document).ready(function(){Vex.TrackPath.initialize()}),function(n){var t;(function(){n.Modules.register("ReturnRequest",{documentLoading:function(){},documentReady:function(t){var u,i,r;t(".select-quantity").change(function(){var n=t(this).data("delivery-item-id"),i=t(this).val();i>0?t("#reason_"+n).removeClass("hidden"):t("#reason_"+n).addClass("hidden")});t("#display-lostPassword").click(function(){n.Util.showLightbox(570,330,n.LightboxModalMode.Semi,{message:t("#lightbox-ForgotPassword")})});t("input[name=RefundMethod]:radio").change(function(){var n=t(this).val();n=="IBA"?(t(".refund-method-iban").removeClass("hidden"),t(".refund-method.iban .bottom").removeClass("hidden")):(t(".refund-method-iban").addClass("hidden"),t(".refund-method.iban .bottom").addClass("hidden"))});u=t("[data-has-ret]").data("has-ret")=="True";n.DynamicContent.getDynamicContent(110,"dynamic-popup-lazyload",null,null,{hasReturned:u});i=t("#return-request-comment");i.hide();r=t(".select-reason");r.change(function(){var n=!1;_.forEach(r,function(i){var r=t(i).val();n||r!="ManufacturingDefect"&&r!="Damaged"||(n=!0)});n?i.show():i.hide()})}})})(t=n.ReturnRequest||(n.ReturnRequest={}))}(Vex||(Vex={})),function(n){var t;(function(t){function e(){var t=JSON.parse(n.Storage.getItem("brandAlertData")),u=$.cookie("TK"),f;t&&t.Token==u?(i=t,r=!0):(f=n.Settings.Culture,$.ajax({type:"GET",url:"/"+f+"/account/GetActiveBrandAlertSales",success:function(t){i=t;i.Token=u;n.Storage.setItem("brandAlertData",JSON.stringify(i),3600);r=!0},error:function(){r=!0}}))}function u(){i.NumberOfAlerts=0;i.BrandAlerts=[];n.Storage.removeItem("brandAlertData")}function o(){return r}function s(){return i}function h(t,r){r===void 0&&(r=!1);i.BrandAlerts.push(t);n.Storage.setItem("brandAlertData",JSON.stringify(i),60);r&&u()}function c(t,r){var f,u;for(t===void 0&&(t=0),r===void 0&&(r=0),f=i.BrandAlerts,u=0;u<f.length;u++)r==0?f[u].BrandId==t&&i.BrandAlerts.splice(u,1):f[u].SaleId==r&&i.BrandAlerts.splice(u,1);n.Storage.setItem("brandAlertData",JSON.stringify(i),60)}function l(n){for(var t=0;t<i.BrandAlerts.length;t++)if(i.BrandAlerts[t].BrandId==n)return!0;return!1}function a(n){for(var t=0;t<i.BrandAlerts.length;t++)if(i.BrandAlerts[t].SaleId==n)return!0;return!1}function v(t){n.BrandAlert.hasSale(t)?(n.BrandAlert.BrandAlertHeader.IsActive=!1,n.Header.setActiveDefaultPanel(),$(".header-favorite-message.brand-alert-calltoaction").addClass("hide"),$(".header-favorite-message.default").removeClass("hide")):(n.BrandAlert.BrandAlertHeader.IsActive=!0,n.Header.setActiveDefaultPanel(),$(".header-favorite-message.brand-alert-calltoaction").removeClass("hide"),$(".header-favorite-message.default").addClass("hide"))}var f=function(){function n(){}return n.IsActive=!1,n}(),r,i;t.BrandAlertHeader=f;r=!1;i={NumberOfAlerts:0,BrandAlerts:[],Token:""};t.initiateBrandAlertData=e;t.refetchDataOnNextRequest=u;t.isDataLoaded=o;t.getData=s;t.addBrand=h;t.removeBrand=c;t.hasBrand=l;t.hasSale=a;t.showBrandAlertHeaderBasedOnSaleId=v})(t=n.BrandAlert||(n.BrandAlert={}))}(Vex||(Vex={})),function(n){var t;(function(t){var i=function(){function t(){}return t.handleActiveBookingLightbox=function(){$.ajax({type:"POST",url:"/"+n.Settings.Culture+"/Travel/HasActiveBooking"}).done(function(t){if(t&&t.BookingId>0){var i=$("#travel-booking-lbox");i.find("div.trip > div > h3").html(n.Util.htmlEncode(t.Title));i.find("div.trip > div > span").html(n.Util.htmlEncode(t.SubTitle));i.find("div.trip > img").attr("src",$("body").data("img-root")+"Site/Sales/"+t.SaleId+"/Trips/"+t.Reference+"_1_S4.jpg");n.Util.showLightbox(i.width(),i.height(),n.LightboxModalMode.Full,{message:i});$("#travel-booking-lbox .cancel-booking").click(function(i){i&&i.preventDefault();$.unblockUI();$.ajax({type:"POST",url:"/"+n.Settings.Culture+"/Travel/CancelBooking/"+t.BookingId})});$("#travel-booking-lbox .resume-booking").click(function(i){i&&i.preventDefault();$.ajax({type:"POST",url:"/"+n.Settings.Culture+"/Travel/HasActiveBooking"}).done(function(i){if(i&&i.BookingId>0)$.unblockUI(),window.location.href="/"+n.Settings.Culture+"/Travel/CheckoutConfirm/"+t.BookingId;else{var r=n.Util.saleUrl(t.SaleId),u="<a class='btn btn-primary btn-small' href='"+r+"' >"+t.Title+"<\/a>";$("#travel-booking-lbox .msg").html("Booking expired");$("#travel-booking-lbox .btns").html(u)}})})}})},t.getTripDetailData=function(n,i,r,u){$.ajax({url:"/"+n+"/travel/TripDetail/"+i,converters:{"text json":function(n){return JSON.parse(n,t.jsonDateTimeReviver)}}}).done(function(n){r(n)}).fail(function(){u!=null&&u!=undefined&&u()})},t.getDatesBetween=function(n,t,i){var r;i===void 0&&(i=!0);var e=[],u=new Date(n.getTime()),f=new Date(t.getTime());if(i||(u.setDate(u.getDate()+1),f.setDate(f.getDate()-1)),u<=f)for(r=u;r<=f;)e.push(new Date(r.getTime())),r.setDate(r.getDate()+1);return e},t.jsonDateTimeReviver=function(n,t){var i;return typeof t=="string"&&(i=/\/Date\((\d*)\)\//.exec(t),i)?new Date(+i[1]):t},t}();t.Utility=i})(t=n.Travel||(n.Travel={}))}(Vex||(Vex={})),function(n){var t;(function(t){var i=function(){function i(i,r,u,f,e,o){var s=this,h;if(s.$rootScope=i,s.$scope=r,s.saleId=+$("#inner-container").data("saleid"),n.Sale.Utility.validateSaleAccessible(o,s.saleId),$(window).scrollTop(0),i.tripsImgRoot=$("#overview-container").data("tripimgroot"),r.culture=n.Settings.Culture,$(".shop-background").hide(),i.tripsAll&&i.tripsAll.length!=0||(h=$("#trips-json"),i.tripsAll=h.val()?$.parseJSON(h.val()):[]),i.tripsAll.length==1)s.onNavigateTo(f,i.tripsAll[0].TripId,!1,!0);$.ajax({url:"/"+n.Settings.Culture+"/Travel/OverviewAvailability/"+s.saleId,converters:{"text json":function(n){return JSON.parse(n,t.Utility.jsonDateTimeReviver)}}}).done(function(n){i.$apply(function(){s.initializeAvailabilities(s,n);i.availabilitiesLoaded=!0;s.performInitialLoad(s,f,e)})});setTimeout(function(){s.runAfterRender()},0);n.Util.calView("TRAVEL_OVERVIEW",{saleId:s.saleId});n.Travel.Utility.handleActiveBookingLightbox()}return i.prototype.initializeAvailabilities=function(n,t){for(var r,i=0;i<n.$rootScope.tripsAll.length;i++)r=t[n.$rootScope.tripsAll[i].TripId],r!==undefined&&r!==null&&(n.$rootScope.tripsAll[i].quantity=r.Quantity,n.$rootScope.tripsAll[i].reserved=r.Reserved,n.$rootScope.tripsAll[i].halfSoldOut=r.HalfSoldOut)},i.prototype.performInitialLoad=function(n,t){for(var e=$(window),f=$(document),i,u,r=0;r<n.$rootScope.tripsAll.length;r++)i=n.$rootScope.tripsAll[r],i.cssClass="",u=!1,i.quantity>50?i.cssClass=i.halfSoldOut?"available halfway":"available":i.quantity==0?(u=i.reserved==0,i.cssClass=u?"soldout":"reserved"):i.cssClass="available lastpieces";f.off("click","#overview-container .trip").on("click","#overview-container .trip",function(){var i=$(this),r=+i.attr("data-id");n.onNavigateTo(t,r,!1)})},i.prototype.runAfterRender=function(){var t=this;n.AnalyticsData.changeProperty("SaleId",+t.saleId);n.AnalyticsData.changeProperty("SaleTitle",$("#inputSaleTitle").val());n.AnalyticsData.changeProperty("CurrentSalePage","Overview");$(".price-legal-advice").show();$(".price-vat-remark").show()},i.prototype.onNavigateTo=function(i,r,u,f){f===void 0&&(f=!1);var e=this;t.Utility.getTripDetailData(e.$scope.culture,r,function(t){e.$scope.$apply(function(){$("#cross-sale-footer-inview, #cross-sale-footer").hide();$(".price-legal-advice").hide();$(".price-vat-remark").hide();$("#overview-container").html("");e.$rootScope.currentTrip=t;e.$rootScope.sortedTripIdsList=t.SortedTripIdsList;i.path("/d/"+n.Util.slug(e.$rootScope.currentTrip.Title)+"/"+r);f&&i.replace()})},null)},i.$inject=["$rootScope","$scope","$route","$location","$shopDataService","$sales"],i}();t.OverviewController=i})(t=n.Travel||(n.Travel={}))}(Vex||(Vex={})),function(n){var t;(function(t){var i=function(){function i(i,r,u,f,e,o,s,h,c){this.oneDayInMilliseconds=864e5;this.comparisonEnum={GreaterThan:0,SmallerThan:1,Equal:2,GreaterThanOrEqual:3,SmallerThanOrEqual:4};var l=this;l.$scope=i;l.$rootScope=r;l.$routeParams=f;l.$cal=c;l.priceFlashDuration=500;i.culture=n.Settings.Culture;i.tripId=+f.tripId;i.displayVariants=[];i.highestDisplayVariantId=0;i.currentDetailPhotoIndex=1;i.productdImgRoot=$(".trip-detail").data("prdimg-root");i.baseRRPrice="";i.baseShopPrice="";n.Sale.Utility.validateSaleAccessible(h,+$("#inner-container").attr("data-saleId"));$(".shop-background").show();$(".trip-detail .datepickers .date-from-picker").hide();l.$scope.variantChoiceDictionary=[];l.calculateTotalPrice(l);$(window).scrollTop(0);l.loadDatepickerTranslations(l);i.trips=[];r.sortedTripIdsList&&r.sortedTripIdsList.length>0&&(i.trips=r.sortedTripIdsList);l.bindFunctions(l,e,s);r.currentTrip==undefined||r.currentTrip.TripId!=f.tripId?t.Utility.getTripDetailData(n.Settings.Culture,f.tripId,function(t){t.Reference==undefined&&window.location.replace(n.Settings.Culture+"/");r.currentTrip=t;i.fireCalView();i.setTripDefaults();i.trips.length==0&&(i.trips=t.SortedTripIdsList,r.sortedTripIdsList=t.SortedTripIdsList);i.$apply(null)},function(){window.location.replace(n.Settings.Culture+"/")}):(i.fireCalView(),i.setTripDefaults());n.Travel.Utility.handleActiveBookingLightbox()}return i.prototype.bindFunctions=function(i,r,u){i.$scope.setTripDefaults=function(){var r,e,o;if(i.$rootScope.currentTrip){for(r=i.$rootScope.currentTrip,i.$scope.rangeNights=i.$rootScope.currentTrip.RangeNights,i.$scope.photoNumbers=[],e=1;e<=r.NumberOfPhotos;e++)i.$scope.photoNumbers.push(e);r.NumberOfPhotos<=1&&$(".detail-photo .navigate").hide();i.$scope.baseRRPrice="";r.HideRRPrice||(i.$scope.baseRRPrice='<span class="pricewrapper">'+n.Util.getPriceHtml(r.BaseRRPrice,"&nbsp;*","",!1,!0)+"<\/span>");var s=n.Util.htmlEncode($(".trip-detail .trip-price").data("variantprice")),h='<span class="variant">'+s+"<\/span>",c='<span class="variant float">'+s+"<\/span>",f="";switch(r.VariantPriceUnitCV){case"PER":f=n.Util.htmlEncode($(".trip-detail .trip-price").data("pricetypeper"));break;case"NIG":f=n.Util.htmlEncode($(".trip-detail .trip-price").data("pricetypenig"));break;case"TRP":f=n.Util.htmlEncode($(".trip-detail .trip-price").data("pricetypetrp"));break;case"TKT":f=n.Util.htmlEncode($(".trip-detail .trip-price").data("pricetypetkt"));break;case"PPN":f=n.Util.htmlEncode($(".trip-detail .trip-price").data("pricetypeppn"));break;default:f="&nbsp;"}i.$scope.baseShopPrice=(r.HasVariantPricing?r.BaseRRPrice<1e6?h:c:"")+'<span class="price">'+n.Util.getPriceHtml(r.BaseShopPrice,"","",!1,!0)+'<\/span><span class="type" >'+f+"<\/span>";o='<img src="'+i.$scope.productdImgRoot+r.Reference+"_map_"+i.$scope.culture+'.jpg" />';r.Description!==undefined&&r.Description!==null&&(i.$rootScope.currentTrip.Description=r.Description.replace("<map>",o));r.Location!==undefined&&r.Location!==null&&(i.$rootScope.currentTrip.Location=r.Location.replace("<map>",o));r.TermsConditions!==undefined&&r.TermsConditions!==null&&(i.$rootScope.currentTrip.TermsConditions=r.TermsConditions.replace("<map>",o));i.$scope.tripDescriptionHtml=u.trustAsHtml(i.$rootScope.currentTrip.Description);i.$scope.tripLocationHtml=u.trustAsHtml(i.$rootScope.currentTrip.Location);i.$scope.tripTermsConditionsHtml=u.trustAsHtml(i.$rootScope.currentTrip.TermsConditions);i.$scope.currentDetailPhotoIndex=1;i.$scope.dateFrom=null;i.$scope.dateUntill=null;$.ajax({url:"/"+n.Settings.Culture+"/Travel/DetailAvailability/"+r.TripId,converters:{"text json":function(n){return JSON.parse(n,t.Utility.jsonDateTimeReviver)}}}).done(function(n){var t;for(i.$scope.allowedDates=[],i.$scope.reservedDates=[],i.$scope.soldoutDates=[],t=0;t<n.Dates.length;t++)switch(n.Dates[t].Availability){case 0:i.$scope.allowedDates.push(n.Dates[t]);break;case 1:i.$scope.reservedDates.push(n.Dates[t]);break;case 2:i.$scope.soldoutDates.push(n.Dates[t])}for(i.$scope.availabilitiesLoaded=!0,$(".trip-detail").removeClass("soldout reserved"),i.$scope.allowedDates.length==0&&(i.$scope.reservedDates.length==0?$(".trip-detail").addClass("soldout"):$(".trip-detail").addClass("reserved")),i.setFromDatePicker(i),i.setUntillDatePicker(i),i.$scope.$apply(null),t=0;t<r.Variants.length;t++)r.Variants[t].availabilityDates=n.VariantDates["v"+r.Variants[t].VariantId];i.reloadVariants(i)});$('.travel .trip-detail .nav-tabs a[data-toggle="tab"]').on("shown.bs.tab",function(n){var t=$(".travel .trip-detail .tab-content .map-container"),i,e,u,f,o,s,h;t.find(".map-canvas").remove();$(n.target).data("target")=="#location"?r.MapLatitude!=undefined&&r.MapLatitude!=null&&r.MapLongitude!=undefined&&r.MapLongitude!=null?(t.show(),i=document.createElement("div"),i.className="map-canvas",e=i,t.append(e),u=13,r.MapZoom!=undefined&&r.MapZoom!=null&&r.MapZoom>=0&&r.MapZoom<=50&&(u=r.MapZoom),f=new google.maps.LatLng(r.MapLatitude,r.MapLongitude),s={zoom:u,center:f},o=new google.maps.Map(i,s),h=new google.maps.Marker({position:f,map:o})):t.hide():t.hide()})}};i.$scope.fireCalView=function(){i.$cal.logView("TRAVEL_DETAIL",{saleId:i.$rootScope.currentTrip.SaleId,productId:i.$rootScope.currentTrip.TripId})};i.$scope.fireCalAction=function(n,t,r){i.$cal.logAction("TRAVEL_DETAIL",n,{saleId:i.$rootScope.currentTrip.SaleId,productId:i.$rootScope.currentTrip.TripId,ModelId:t},r)};i.$scope.onHoverPhoto=function(n){i.$scope.currentDetailPhotoIndex=n};i.$scope.onChangePicture=function(n){var t=i.$scope.currentDetailPhotoIndex,r=10;if(t+=n,t<1){do t=t+i.$rootScope.currentTrip.NumberOfPhotos,r-=1;while(t<1&&r>0);t<1&&(t=1)}else if(t>i.$rootScope.currentTrip.NumberOfPhotos){do t=t-i.$rootScope.currentTrip.NumberOfPhotos,r-=1;while(t>i.$rootScope.currentTrip.NumberOfPhotos&&r>0);t>i.$rootScope.currentTrip.NumberOfPhotos&&(t=i.$rootScope.currentTrip.NumberOfPhotos)}i.$scope.currentDetailPhotoIndex=t};i.$scope.navigateBreadcrumbSale=function(n){r.path(n)};i.$scope.onNavigate=function(n){var t=i.$scope.trips.indexOf(i.$scope.tripId)+n;t<0&&(t=i.$scope.trips.length-1);t>=i.$scope.trips.length&&(t=0);i.$scope.onNavigateTo(i.$scope.trips[t])};i.$scope.onNavigateTo=function(u){t.Utility.getTripDetailData(i.$scope.culture,u,function(t){i.$scope.$apply(function(){i.$rootScope.currentTrip=t;i.$rootScope.sortedTripIdsList=t.SortedTripIdsList;r.path("/d/"+n.Util.slug(i.$rootScope.currentTrip.Title)+"/"+u)})},function(){window.location.replace(n.Settings.Culture+"/")})};$(".variants").off("click",".title, .sub-title, .prices, .title").on("click",".title, .sub-title, .prices, .title",function(){var n=$(this).parents(".variant");n!==undefined&&n.length>0&&i.variantSelected(i,n.data("displayid"))});i.$scope.choiceIncrease=function(n,t){i.choiceIncrease(i,n,t)};i.$scope.choiceDecrease=function(n,t){i.choiceDecrease(i,n,t)};i.$scope.addVariant=function(n){i.addVariant(i,n)};$(".book-it").off("click").on("click",function(){var t,u,r;if($(".variant-total .field-validation-error").hide(),i.$rootScope.currentTrip.TripDateRangeTypeCV==$(".trip-date").data("tripdaterangetypenone")||$(".trip-variants").hasClass("dates-selected"))if($(".variants .variant.checked").length==0)$(".variant-total .field-validation-error.variant").show();else{for(t=i.getBookableItems(i),u=!1,r=0;r<t.length;r++)u=u||t[r].GenericQuantity+t[r].AdultQuantity+t[r].SeniorQuantity+t[r].KidQuantity+t[r].InfantQuantity==0;u||t.length==0?$(".variant-total .field-validation-error.zero-quantity").show():(i.setLoadOverlay(i,!0),$.ajax({url:"/"+n.Settings.Culture+"/Travel/BookTrip/",data:JSON.stringify({model:t}),contentType:"application/json; charset=utf-8",dataType:"json",type:"POST"}).done(function(t){t.Error&&t.Error.length>0?($(".variant-total .field-validation-error.custom").show(),$(".variant-total .field-validation-error.custom").html(t.Error),i.setLoadOverlay(i,!1)):window.location.href="/"+n.Settings.Culture+"/Travel/CheckoutConfirm/"+t.activeBookingId}).fail(function(){$(".variant-total .field-validation-error.custom").show();$(".variant-total .field-validation-error.custom").html($(".variant-choice-labels").data("servererror"));i.setLoadOverlay(i,!1)}))}else $(".variant-total .field-validation-error.date").show()});$(".variants").hoverIntent(function(){var n;n=document.createElement("div");n.className="choice-description-callout";n.innerHTML=$(this).data("description")+'<div class="arrow"><\/div>';$(this).find(".choice-description").append(n)},function(){$(".choice-description-callout").remove()},".choice .lbl.hasDescription")},i.prototype.addVariant=function(n,t){for(var i=null,e=-1,o=0,u,f,r=0;r<n.$scope.displayVariants.length;r++)n.$scope.displayVariants[r].variantId===t&&(e=r,o+=1,n.$scope.displayVariants[r].extraClasses.indexOf("hide-add-variant")===-1&&(n.$scope.displayVariants[r].extraClasses=n.$scope.displayVariants[r].extraClasses+" hide-add-variant"),n.$scope.displayVariants[r].isDuplicate||(i=n.$scope.displayVariants[r]));i!=null&&(u=i.extraClasses,o+1<i.maxQuantity&&(u=u.replace("hide-add-variant","")),f={variantId:i.variantId,displayVariantId:n.$scope.highestDisplayVariantId+1,isDuplicate:!0,extraClasses:u,isChecked:!1,title:i.title,subTitle:i.subTitle,priceType:i.priceType,genericQuantity:i.genericQuantity,seniorQuantity:i.seniorQuantity,adultQuantity:i.adultQuantity,kidQuantity:i.kidQuantity,infantQuantity:i.infantQuantity,rRPrice:i.rRPrice,shopPrice:i.shopPrice,isMultiSelect:i.isMultiSelect,baseRRPrice:i.baseRRPrice,baseShopPrice:i.baseShopPrice,multiBaseRRPrice:i.multiBaseRRPrice,multiBaseShopPrice:i.multiBaseShopPrice,maxQuantity:i.maxQuantity},n.$scope.highestDisplayVariantId=f.displayVariantId,n.$scope.displayVariants.splice(e+1,0,f),setTimeout(function(){n.variantSelected(n,f.displayVariantId)},1))},i.prototype.variantSelected=function(t,i){var r,f,e,h,o,s,u;if($(".variant-total .field-validation-error").hide(),r=null,t.$scope.displayVariants!=undefined&&t.$scope.displayVariants!=null&&t.$scope.displayVariants.length>0)for(u=0;u<t.$scope.displayVariants.length;u++)if(t.$scope.displayVariants[u].displayVariantId===i){r=t.$scope.displayVariants[u];break}if(r!=null)if(f=r.variantId,r.isChecked=!r.isChecked,setTimeout(function(){$('.variant[data-displayid="'+r.displayVariantId+'"] .title input').prop("checked",r.isChecked).change()},1),r.isChecked===!0)r.extraClasses.indexOf("loading")===-1&&(r.extraClasses=r.extraClasses+" loading"),e=t.$scope.dateFrom,h=null,t.$rootScope.currentTrip.TripDateRangeTypeCV===$(".trip-date").data("tripdaterangetypevariablerange")&&(h=t.$scope.rangeNights),t.$rootScope.currentTrip.TripDateRangeTypeCV===$(".trip-date").data("tripdaterangetypenone")&&(e=null),$.ajax({url:"/"+n.Settings.Culture+"/Travel/DetailBookableVariantData/",data:{id:f,startDate:e===null?null:e.getFullYear()+"-"+(e.getMonth()+1)+"-"+e.getDate()+"T00:00:00",numberOfNights:h}}).done(function(i){var u=i.Choices;r.maxQuantity=i.MaxQuantity;t.$scope.variantChoiceDictionary[f]=u;t.$scope.$apply(function(){var a,i;if(u.length>0){var e=null,o=!1,s=!1,h=!1,c=!1,l=!1;for(i=0;i<u.length;i++)o=o||u[i].GenericQuantity>0,s=s||u[i].AdultQuantity>0,h=h||u[i].SeniorQuantity>0,c=c||u[i].KidQuantity>0,l=l||u[i].InfantQuantity>0,u[i].IsDefault&&(e=u[i]);for(e==null&&(e=u[0]),r.genericQuantity=o?e.GenericQuantity:-1,r.adultQuantity=s?e.AdultQuantity:-1,r.seniorQuantity=h?e.SeniorQuantity:-1,r.kidQuantity=c?e.KidQuantity:-1,r.infantQuantity=l?e.InfantQuantity:-1,r.multiBaseRRPrice=e.TotalRRPrice,r.multiBaseShopPrice=e.TotalShopPrice,r.rRPrice=n.Util.getPriceHtml(e.TotalRRPrice,"&nbsp;*","",!1,!0),r.shopPrice=n.Util.getPriceHtml(e.TotalShopPrice,"","",!1,!0),a=0,i=0;i<t.$scope.displayVariants.length;i++)t.$scope.displayVariants[i].variantId===f&&(a+=1);a>=r.maxQuantity&&r.extraClasses.indexOf("hide-add-variant")===-1&&(r.extraClasses=r.extraClasses+" hide-add-variant");r.extraClasses.indexOf("price-flash")===-1&&(r.extraClasses=r.extraClasses+" price-flash");setTimeout(function(){t.$scope.$apply(function(){r.extraClasses=r.extraClasses.replace("price-flash","")})},t.priceFlashDuration)}r.extraClasses=r.extraClasses.replace("loading","");t.calculateTotalPrice(t)})}),t.$scope.fireCalAction("SELECT_VARIANT",f);else if(r.isDuplicate){for(o=-1,u=0;u<t.$scope.displayVariants.length;u++)if(t.$scope.displayVariants[u].displayVariantId===i){o=u;break}for(o!=-1&&t.$scope.displayVariants.splice(o,1),s=null,u=0;u<t.$scope.displayVariants.length;u++)t.$scope.displayVariants[u].variantId===f&&(t.$scope.displayVariants[u].extraClasses.indexOf("hide-add-variant")===-1&&(t.$scope.displayVariants[u].extraClasses=t.$scope.displayVariants[u].extraClasses+" hide-add-variant"),s=t.$scope.displayVariants[u]);s.extraClasses=s.extraClasses.replace("hide-add-variant","");t.calculateTotalPrice(t)}else r.rRPrice=n.Util.getPriceHtml(r.baseRRPrice,"&nbsp;*","",!1,!0),r.shopPrice=n.Util.getPriceHtml(r.baseShopPrice,"","",!1,!0),t.calculateTotalPrice(t),t.$scope.fireCalAction("UNSELECT_VARIANT",f);t.$scope.$apply()},i.prototype.choiceIncrease=function(t,i,r){var u,o,c,e,s,f,d;if($(".max-choice-callout").remove(),u=null,t.$scope.displayVariants!=undefined&&t.$scope.displayVariants!=null&&t.$scope.displayVariants.length>0)for(s=0;s<t.$scope.displayVariants.length;s++)if(t.$scope.displayVariants[s].displayVariantId===i){u=t.$scope.displayVariants[s];break}if(u!=null){var nt=u.variantId,l=u.genericQuantity===-1?0:u.genericQuantity,a=u.adultQuantity===-1?0:u.adultQuantity,v=u.seniorQuantity===-1?0:u.seniorQuantity,y=u.kidQuantity===-1?0:u.kidQuantity,p=u.infantQuantity===-1?0:u.infantQuantity,g=t.$scope.variantChoiceDictionary[nt];if(g!=undefined&&g.length>0)if(u.isMultiSelect){o=0;c=!1;switch(r){case"generic":o=l+1;o>u.maxQuantity?c=!0:u.genericQuantity=o;break;case"adult":o=a+1;o>u.maxQuantity?c=!0:u.adultQuantity=o;break;case"senior":o=v+1;o>u.maxQuantity?c=!0:u.seniorQuantity=o;break;case"kid":o=y+1;o>u.maxQuantity?c=!0:u.kidQuantity=o;break;case"infant":o=p+1;o>u.maxQuantity?c=!0:u.infantQuantity=o}if(c){var w=$('.variant[data-displayid="'+i+'"] .choice[data-type="'+r+'"]'),b="mc-callout-"+(new Date).getTime(),k=t.$rootScope.currentTrip.TripTypeCV.toLowerCase(),h;h=document.createElement("div");h.className="max-choice-callout";h.id=b;d=['<div class="bang"><\/div><div class="title">',$("#variant-choice-labels").data(k+"maxmulticallouttitle").replace("{0}",w.find("input").val()),'<\/div><div class="sub-title">',$("#variant-choice-labels").data(k+"maxmulticalloutsubtitle"),'<\/div><div class="arrow"><\/div>'];h.innerHTML=d.join("");w.append(h);setTimeout(function(){$("#"+b).remove()},2e3);$(".max-choice-callout").off("click").on("click",function(){return $(this).remove(),!1})}else u.rRPrice=n.Util.getPriceHtml(u.multiBaseRRPrice*o,"&nbsp;*","",!1,!0),u.shopPrice=n.Util.getPriceHtml(u.multiBaseShopPrice*o,"","",!1,!0),u.extraClasses.indexOf("price-flash")===-1&&(u.extraClasses=u.extraClasses+" price-flash"),setTimeout(function(){t.$scope.$apply(function(){u.extraClasses=u.extraClasses.replace("price-flash","")})},t.priceFlashDuration)}else{for(e=null,s=0;s<g.length;s++){f=g[s];switch(r){case"generic":l<f.GenericQuantity&&a==f.AdultQuantity&&v==f.SeniorQuantity&&y==f.KidQuantity&&p==f.InfantQuantity&&(e===null||f.GenericQuantity<e.GenericQuantity)&&(e=f);break;case"adult":l==f.GenericQuantity&&a<f.AdultQuantity&&v==f.SeniorQuantity&&y==f.KidQuantity&&p==f.InfantQuantity&&(e===null||f.AdultQuantity<e.AdultQuantity)&&(e=f);break;case"senior":l==f.GenericQuantity&&a==f.AdultQuantity&&v<f.SeniorQuantity&&y==f.KidQuantity&&p==f.InfantQuantity&&(e===null||f.SeniorQuantity<e.SeniorQuantity)&&(e=f);break;case"kid":l==f.GenericQuantity&&a==f.AdultQuantity&&v==f.SeniorQuantity&&y<f.KidQuantity&&p==f.InfantQuantity&&(e===null||f.KidQuantity<e.KidQuantity)&&(e=f);break;case"infant":l==f.GenericQuantity&&a==f.AdultQuantity&&v==f.SeniorQuantity&&y==f.KidQuantity&&p<f.InfantQuantity&&(e===null||f.InfantQuantity<e.InfantQuantity)&&(e=f)}}if(e!=null)u.genericQuantity=u.genericQuantity!=-1?e.GenericQuantity:-1,u.adultQuantity=u.adultQuantity!=-1?e.AdultQuantity:-1,u.seniorQuantity=u.seniorQuantity!=-1?e.SeniorQuantity:-1,u.kidQuantity=u.kidQuantity!=-1?e.KidQuantity:-1,u.infantQuantity=u.infantQuantity!=-1?e.InfantQuantity:-1,u.rRPrice=n.Util.getPriceHtml(e.TotalRRPrice,"&nbsp;*","",!1,!0),u.shopPrice=n.Util.getPriceHtml(e.TotalShopPrice,"","",!1,!0),u.extraClasses.indexOf("price-flash")===-1&&(u.extraClasses=u.extraClasses+" price-flash"),setTimeout(function(){t.$scope.$apply(function(){u.extraClasses=u.extraClasses.replace("price-flash","")})},t.priceFlashDuration);else{var w=$('.variant[data-displayid="'+i+'"] .choice[data-type="'+r+'"]'),b="mc-callout-"+(new Date).getTime(),k=t.$rootScope.currentTrip.TripTypeCV.toLowerCase(),h;h=document.createElement("div");h.className="max-choice-callout";h.id=b;d=['<div class="bang"><\/div><div class="title">',$("#variant-choice-labels").data(k+"invalidvariantchoicecallouttitle").replace("{0}",w.find("input").val()),'<\/div><div class="sub-title">',$("#variant-choice-labels").data(k+"invalidvariantchoicecalloutsubtitle"),'<\/div><div class="arrow"><\/div>'];h.innerHTML=d.join("");w.append(h);setTimeout(function(){$("#"+b).remove()},2e3);$(".max-choice-callout").off("click").on("click",function(){return $(this).remove(),!1})}}}t.calculateTotalPrice(t)},i.prototype.choiceDecrease=function(t,i,r){var u,y,o,p,e,s,f;if($(".max-choice-callout").remove(),u=null,t.$scope.displayVariants!=undefined&&t.$scope.displayVariants!=null&&t.$scope.displayVariants.length>0)for(s=0;s<t.$scope.displayVariants.length;s++)if(t.$scope.displayVariants[s].displayVariantId===i){u=t.$scope.displayVariants[s];break}if(u!=null){var w=u.variantId,h=u.genericQuantity===-1?0:u.genericQuantity,c=u.adultQuantity===-1?0:u.adultQuantity,l=u.seniorQuantity===-1?0:u.seniorQuantity,a=u.kidQuantity===-1?0:u.kidQuantity,v=u.infantQuantity===-1?0:u.infantQuantity;switch(r){case"generic":if(h==0)return;break;case"adult":if(c==0)return;break;case"senior":if(l==0)return;break;case"kid":if(a==0)return;break;case"infant":if(v==0)return}if(y=t.$scope.variantChoiceDictionary[w].slice(),y!=undefined&&y.length>0)if(u.isMultiSelect){o=0;switch(r){case"generic":o=h-1;o<0&&(o=0);u.genericQuantity=o;break;case"adult":o=c-1;o<0&&(o=0);u.adultQuantity=o;break;case"senior":o=l-1;o<0&&(o=0);u.seniorQuantity=o;break;case"kid":o=a-1;o<0&&(o=0);u.kidQuantity=o;break;case"infant":o=v-1;o<0&&(o=0);u.infantQuantity=o}u.rRPrice=n.Util.getPriceHtml(u.multiBaseRRPrice*o,"&nbsp;*","",!1,!0);u.shopPrice=n.Util.getPriceHtml(u.multiBaseShopPrice*o,"","",!1,!0);o!=0&&(u.extraClasses.indexOf("price-flash")===-1&&(u.extraClasses=u.extraClasses+" price-flash"),setTimeout(function(){t.$scope.$apply(function(){u.extraClasses=u.extraClasses.replace("price-flash","")})},t.priceFlashDuration))}else{for(p={VariantId:u.variantId,GenericQuantity:0,AdultQuantity:0,KidQuantity:0,InfantQuantity:0,SeniorQuantity:0,TotalRRPrice:0,TotalShopPrice:0,IsDefault:!1},y.push(p),e=null,s=0;s<y.length;s++){f=y[s];switch(r){case"generic":h>f.GenericQuantity&&c==f.AdultQuantity&&l==f.SeniorQuantity&&a==f.KidQuantity&&v==f.InfantQuantity&&(e===null||f.GenericQuantity>e.GenericQuantity)&&(e=f);break;case"adult":h==f.GenericQuantity&&c>f.AdultQuantity&&l==f.SeniorQuantity&&a==f.KidQuantity&&v==f.InfantQuantity&&(e===null||f.AdultQuantity>e.AdultQuantity)&&(e=f);break;case"senior":h==f.GenericQuantity&&c==f.AdultQuantity&&l>f.SeniorQuantity&&a==f.KidQuantity&&v==f.InfantQuantity&&(e===null||f.SeniorQuantity>e.SeniorQuantity)&&(e=f);break;case"kid":h==f.GenericQuantity&&c==f.AdultQuantity&&l==f.SeniorQuantity&&a>f.KidQuantity&&v==f.InfantQuantity&&(e===null||f.KidQuantity>e.KidQuantity)&&(e=f);break;case"infant":h==f.GenericQuantity&&c==f.AdultQuantity&&l==f.SeniorQuantity&&a==f.KidQuantity&&v>f.InfantQuantity&&(e===null||f.InfantQuantity>e.InfantQuantity)&&(e=f)}}e&&(u.genericQuantity=u.genericQuantity!=-1?e.GenericQuantity:-1,u.adultQuantity=u.adultQuantity!=-1?e.AdultQuantity:-1,u.seniorQuantity=u.seniorQuantity!=-1?e.SeniorQuantity:-1,u.kidQuantity=u.kidQuantity!=-1?e.KidQuantity:-1,u.infantQuantity=u.infantQuantity!=-1?e.InfantQuantity:-1,u.rRPrice=n.Util.getPriceHtml(e.TotalRRPrice,"&nbsp;*","",!1,!0),u.shopPrice=n.Util.getPriceHtml(e.TotalShopPrice,"","",!1,!0),e.TotalShopPrice!==0&&(u.extraClasses.indexOf("price-flash")===-1&&(u.extraClasses=u.extraClasses+" price-flash"),setTimeout(function(){t.$scope.$apply(function(){u.extraClasses=u.extraClasses.replace("price-flash","")})},t.priceFlashDuration)))}}t.calculateTotalPrice(t)},i.prototype.setFromDatePicker=function(n,t){var l,r,f,o,i,u,a;if(t===void 0&&(t=!1),$(".trip-detail .datepickers .date-from-picker").hide(),n.$scope.datePickerFrom&&n.$scope.datePickerFrom.destroy(),n.$scope.availabilitiesLoaded&&n.$rootScope.currentTrip.TripDateRangeTypeCV!==$(".trip-date").data("tripdaterangetypenone")){var e=[],s=[],h=[],c=null;if(n.$scope.allowedDates.length>0){if(l=1,r=n.$scope.allowedDates[n.$scope.allowedDates.length-1],r!=null&&r.MinNights>0)l=r.MinNights;else for(i=n.$scope.allowedDates.length-1;i>=0;i--)if(f=n.$scope.allowedDates[i],f!=null&&f.MinNights>0){r=f;l=f.MinNights;break}c=r.Date}if(c)for(i=0;i<n.$scope.allowedDates.length;i++)o=n.$scope.allowedDates[i],n.compareDates(o.Date,c,n.comparisonEnum.SmallerThanOrEqual)&&(n.$rootScope.currentTrip.TripDateRangeTypeCV!=$(".trip-date").data("tripdaterangetypevariablerange")||o.MinNights>0)&&e.push(o.Date);else for(i=0;i<n.$scope.allowedDates.length;i++)e.push(n.$scope.allowedDates[i].Date);for(i=0;i<n.$scope.reservedDates.length;i++)s.push(n.$scope.reservedDates[i].Date);for(i=0;i<n.$scope.soldoutDates.length;i++)h.push(n.$scope.soldoutDates[i].Date);if(u=new Date,a=!1,n.setFromClosedText(n,n.$scope.dateFrom),n.$scope.dateFrom?(u=n.$scope.dateFrom,a=!0):n.$scope.allowedDates.length>0?u=n.$scope.allowedDates[0].Date:n.$scope.reservedDates.length>0?u=n.$scope.reservedDates[0].Date:n.$scope.soldoutDates.length>0&&(u=n.$scope.soldoutDates[0].Date),e.length==0&&s.length==0&&h.length==0)$(".trip-detail").removeClass("soldout reserved"),$(".trip-detail").addClass("soldout");else{n.$scope.datePickerFrom=new Pikaday({validDatesArray:e,reservedDatesArray:s,soldoutDatesArray:h,defaultDate:u,setDefaultDate:a,firstDay:1,i18n:n.$scope.pikadayI18n,onSelect:function(i){n.$scope.dateFrom=i;t&&(n.$scope.dateUntill=null);$(".trip-detail .datepickers .date-from .chosen-date").val();$(".trip-detail .datepickers .date-from-picker").hide();$(".trip-detail .datepickers .date-from").removeClass("active");var r=i.getDate()+" "+n.$scope.pikadayI18n.months[i.getMonth()]+" "+i.getFullYear();$(".trip-detail .datepickers .date-from .chosen-date").html(r);$(".trip-detail .datepickers .date-from .closed-text").html(r);n.setUntillDatePicker(n);n.reloadVariants(n);n.$scope.$apply()}});$(".trip-detail .datepickers .date-from-picker .pikaday").children().remove();$(".trip-detail .datepickers .date-from-picker .pikaday").append(n.$scope.datePickerFrom.el);$(".trip-detail").off("click",".datepickers .date-from").on("click",".datepickers .date-from",function(){$(".trip-detail .datepickers .date-from-picker").toggle();$(".trip-detail .datepickers .date-from").toggleClass("active");$(".trip-detail .datepickers .date-untill-picker").hide();$(".trip-detail .datepickers .date-untill").removeClass("active")})}}},i.prototype.setFromClosedText=function(t,i){if(i){var r=i.getDate()+" "+t.$scope.pikadayI18n.months[i.getMonth()]+" "+i.getFullYear();$(".trip-detail .datepickers .date-from .chosen-date").html(r);$(".trip-detail .datepickers .date-from .closed-text").html(r);t.$scope.fireCalAction("SELECT_DATE",null,{date:n.Util.extractISODateFromLocal(i)})}else $(".trip-detail .datepickers .date-from .closed-text").html($(".trip-detail .datepickers .date-from .closed-text-default").html())},i.prototype.setUntillDatePicker=function(n){var l,f,s,a,i,v;if($(".trip-detail .datepickers .date-untill-picker").hide(),n.$scope.datePickerUntill&&n.$scope.datePickerUntill.destroy(),n.$scope.availabilitiesLoaded&&n.$scope.dateFrom&&n.$rootScope.currentTrip.TripDateRangeTypeCV===$(".trip-date").data("tripdaterangetypevariablerange")){var r=[],h=[],c=[],u=null;if(n.$scope.allowedDates.length>0&&(l=1,f=n.$scope.allowedDates[0],f&&(l=f.MinNights),u=new Date(f.Date.getTime()+l*n.oneDayInMilliseconds)),n.$scope.dateFrom){var e=null,o=null,t=null;for(s=0;s<n.$scope.allowedDates.length;s++)a=n.$scope.allowedDates[s],a.Date.getTime()==n.$scope.dateFrom.getTime()&&(t=a);t&&(t.MinNights&&t.MinNights>=0&&(e=new Date(n.$scope.dateFrom.getTime()+t.MinNights*n.oneDayInMilliseconds)),t.MaxNights&&t.MaxNights!=0&&(o=new Date(n.$scope.dateFrom.getTime()+t.MaxNights*n.oneDayInMilliseconds)));r=n.checkUntillAvailabilityDateInfos(n.$scope.allowedDates,n.$scope.dateFrom,e,o,u);r.length==1?n.$scope.dateUntill=r[0]:n.setUntillClosedText(n,n.$scope.dateUntill);h=n.checkUntillAvailabilityDateInfos(n.$scope.reservedDates,n.$scope.dateFrom,e,o,u);c=n.checkUntillAvailabilityDateInfos(n.$scope.soldoutDates,n.$scope.dateFrom,e,o,u)}if(i=new Date,v=!1,n.setUntillClosedText(n,n.$scope.dateUntill),n.$scope.dateUntill?(i=n.$scope.dateUntill,v=!0):n.$scope.allowedDates.length>0?i=n.$scope.allowedDates[0].Date:n.$scope.reservedDates.length>0?i=n.$scope.reservedDates[0].Date:n.$scope.soldoutDates.length>0&&(i=n.$scope.soldoutDates[0].Date),r.length==0&&h.length==0&&c.length==0)$(".trip-detail").removeClass("soldout reserved"),$(".trip-detail").addClass("soldout");else{n.$scope.datePickerUntill=new Pikaday({validDatesArray:r,reservedDatesArray:h,soldoutDatesArray:c,defaultDate:i,setDefaultDate:v,firstDay:1,i18n:n.$scope.pikadayI18n,onSelect:function(t){n.$scope.dateUntill=t;$(".trip-detail .datepickers .date-untill .chosen-date").val();n.setUntillDatePicker(n);$(".trip-detail .datepickers .date-untill").removeClass("active");var i=t.getDate()+" "+n.$scope.pikadayI18n.months[t.getMonth()]+" "+t.getFullYear();$(".trip-detail .datepickers .date-untill .chosen-date").html(i);$(".trip-detail .datepickers .date-untill .closed-text").html(i);n.reloadVariants(n);n.$scope.$apply()}});$(".trip-detail .datepickers .date-untill-picker .pikaday").children().remove();$(".trip-detail .datepickers .date-untill-picker .pikaday").append(n.$scope.datePickerUntill.el);$(".trip-detail").off("click",".datepickers .date-untill").on("click",".datepickers .date-untill",function(){$(".trip-detail .datepickers .date-untill-picker").toggle();$(".trip-detail .datepickers .date-untill").toggleClass("active");$(".trip-detail .datepickers .date-from-picker").hide();$(".trip-detail .datepickers .date-from").removeClass("active")})}}},i.prototype.setUntillClosedText=function(n,t){if(t){var i=t.getDate()+" "+n.$scope.pikadayI18n.months[t.getMonth()]+" "+t.getFullYear();$(".trip-detail .datepickers .date-untill .chosen-date").html(i);$(".trip-detail .datepickers .date-untill .closed-text").html(i)}else $(".trip-detail .datepickers .date-untill .closed-text").html($(".trip-detail .datepickers .date-untill .closed-text-default").html())},i.prototype.checkUntillAvailabilityDateInfos=function(n,t,i,r,u){for(var o=[],f,e=0;e<n.length;e++)f=n[e],this.compareDates(f.Date,t,this.comparisonEnum.GreaterThan)&&(!r||this.compareDates(f.Date,r,this.comparisonEnum.SmallerThanOrEqual))&&(!i||this.compareDates(f.Date,i,this.comparisonEnum.GreaterThanOrEqual))&&(!u||this.compareDates(f.Date,u,this.comparisonEnum.GreaterThanOrEqual))&&o.push(f.Date);return o},i.prototype.reloadVariants=function(i){var c,l,e,a,v,w,b,tt,it,s,rt,r,y,u,p,o,g,ut,h,nt;if($(".variant-total .field-validation-error").hide(),i.$scope.displayVariants=[],c=i.$scope.dateFrom!==undefined&&i.$scope.dateFrom!==null,i.$rootScope.currentTrip.TripDateRangeTypeCV===$(".trip-date").data("tripdaterangetypevariablerange")&&(c=c&&i.$scope.dateUntill!==undefined&&i.$scope.dateUntill!==null),$(".trip-variants").toggleClass("dates-selected",c),$(".trip-date").toggleClass("dates-selected",c),c&&i.$rootScope.currentTrip&&i.$rootScope.currentTrip.Variants||i.$rootScope.currentTrip.TripDateRangeTypeCV===$(".trip-date").data("tripdaterangetypenone")){if(i.setFromDatePicker(i,!0),i.setUntillDatePicker(i),i.$rootScope.currentTrip.TripDateRangeTypeCV==$(".trip-date").data("tripdaterangetypevariablerange")&&(i.$scope.rangeNights=Math.round((i.$scope.dateUntill.getTime()-i.$scope.dateFrom.getTime())/i.oneDayInMilliseconds)),l=[],e=i.$rootScope.currentTrip.Variants,i.$rootScope.currentTrip.TripDateRangeTypeCV===$(".trip-date").data("tripdaterangetypenone"))l=e;else if(i.$rootScope.currentTrip.TripDateRangeTypeCV==$(".trip-date").data("tripdaterangetypefixedrange")&&(a=new Date(i.$scope.dateFrom.getTime()),a.setDate(a.getDate()+i.$rootScope.currentTrip.RangeNights),$(".trip-date .fixed-range-date .date").html(a.getDate()+" "+i.$scope.pikadayI18n.months[a.getMonth()]+" "+a.getFullYear()),$(".trip-date .fixed-range-date").show()),v=[],i.$rootScope.currentTrip.TripDateRangeTypeCV===$(".trip-date").data("tripdaterangetypevariablerange")){for(v=t.Utility.getDatesBetween(i.$scope.dateFrom,i.$scope.dateUntill),r=0;r<e.length;r++)for(s=e[r],u=0;u<s.availabilityDates.length;u++)if(w=s.availabilityDates[u],b=i.$scope.dateFrom,i.compareDates(w.Date,b,i.comparisonEnum.Equal)&&(tt=new Date(b.getTime()+w.MinNights*i.oneDayInMilliseconds),it=new Date(b.getTime()+w.MaxNights*i.oneDayInMilliseconds),i.compareDates(i.$scope.dateUntill,tt,i.comparisonEnum.GreaterThanOrEqual)&&i.compareDates(i.$scope.dateUntill,it,i.comparisonEnum.SmallerThanOrEqual))){l.push(s);break}}else for(v.push(i.$scope.dateFrom),r=0;r<e.length;r++)for(s=e[r],u=0;u<e[r].Dates.length;u++)if(rt=s.Dates[u],i.compareDates(rt,v[0],i.comparisonEnum.Equal)){l.push(e[r]);break}for(r=0;r<l.length;r++){var f=l[r],k="",d=0;if(i.$rootScope.currentTrip.TripDateRangeTypeCV===$(".trip-date").data("tripdaterangetypenone"))d=f.availabilityDates[0]!==undefined?f.availabilityDates[0].Availability:2;else for(y=0,u=0;u<v.length;u++){for(y=2,p=0;p<f.availabilityDates.length;p++)i.compareDates(f.availabilityDates[p].Date,v[u],i.comparisonEnum.Equal)&&(y=f.availabilityDates[p].Availability);y>d&&(d=y)}switch(d){case 0:k+="available";break;case 1:k+="reserved";break;case 2:k+="soldout"}o="";switch(i.$rootScope.currentTrip.VariantPriceUnitCV){case"PER":o=n.Util.htmlEncode($(".trip-detail .trip-price").data("pricetypeper"));break;case"NIG":o=n.Util.htmlEncode($(".trip-detail .trip-price").data("pricetypenig"));break;case"TRP":o=n.Util.htmlEncode($(".trip-detail .trip-price").data("pricetypetrp"));break;case"TKT":o=n.Util.htmlEncode($(".trip-detail .trip-price").data("pricetypetkt"));break;case"PPN":o=n.Util.htmlEncode($(".trip-detail .trip-price").data("pricetypeppn"));break;default:o="&nbsp;"}g=i.$scope.highestDisplayVariantId+1;i.$scope.highestDisplayVariantId=g;ut={variantId:f.VariantId,displayVariantId:g,extraClasses:k,isDuplicate:!1,title:f.Title,subTitle:f.SubTitle,rRPrice:n.Util.getPriceHtml(0,"&nbsp;*","",!1,!0),shopPrice:n.Util.getPriceHtml(0,"","",!1,!0),priceType:o,isChecked:!1,genericQuantity:0,adultQuantity:0,seniorQuantity:0,kidQuantity:0,infantQuantity:0,isMultiSelect:f.AllowMultiSelect,baseRRPrice:0,baseShopPrice:0,multiBaseRRPrice:0,multiBaseShopPrice:0,maxQuantity:99};i.$scope.displayVariants.push(ut)}i.$scope.displayVariants.length==1&&setTimeout(function(){i.variantSelected(i,i.$scope.displayVariants[0].displayVariantId)},1);h=i.$scope.dateFrom;nt=null;i.$rootScope.currentTrip.TripDateRangeTypeCV===$(".trip-date").data("tripdaterangetypevariablerange")&&(nt=i.$scope.rangeNights);i.$rootScope.currentTrip.TripDateRangeTypeCV===$(".trip-date").data("tripdaterangetypenone")&&(h=null);$.ajax({url:"/"+n.Settings.Culture+"/Travel/DetailTripVariantPrices/",data:{id:i.$rootScope.currentTrip.TripId,startDate:h===null||h===undefined?null:h.getFullYear()+"-"+(h.getMonth()+1)+"-"+h.getDate()+"T00:00:00",numberOfNights:nt}}).done(function(t){i.$scope.$apply(function(){var r,u;if(i.$scope.displayVariants!==undefined)for(r=0;r<i.$scope.displayVariants.length;r++)u=t["v"+i.$scope.displayVariants[r].variantId],u!==undefined&&(i.$scope.displayVariants[r].baseRRPrice=u.RRPrice,i.$scope.displayVariants[r].baseShopPrice=u.ShopPrice,i.$scope.displayVariants[r].rRPrice=n.Util.getPriceHtml(u.RRPrice,"&nbsp;*","",!1,!0),i.$scope.displayVariants[r].shopPrice=n.Util.getPriceHtml(u.ShopPrice,"","",!1,!0),i.$scope.displayVariants[r].multiBaseRRPrice=u.RRPrice,i.$scope.displayVariants[r].multiBaseShopPrice=u.ShopPrice)})})}},i.prototype.loadDatepickerTranslations=function(n){var t=$("#pikadayI18n");n.$scope.pikadayI18n={previousMonth:t.data("previousmonth"),nextMonth:t.data("nextmonth"),months:[t.data("monthjan"),t.data("monthfeb"),t.data("monthmar"),t.data("monthapr"),t.data("monthmay"),t.data("monthjun"),t.data("monthjul"),t.data("monthaug"),t.data("monthsep"),t.data("monthoct"),t.data("monthnov"),t.data("monthdec")],weekdays:[t.data("wdaysun"),t.data("wdaymon"),t.data("wdaytue"),t.data("wdaywed"),t.data("wdaythu"),t.data("wdayfri"),t.data("wdaysat")],weekdaysShort:[t.data("wdayshortsun"),t.data("wdayshortmon"),t.data("wdayshorttue"),t.data("wdayshortwed"),t.data("wdayshortthu"),t.data("wdayshortfri"),t.data("wdayshortsat")]}},i.prototype.calculateTotalPrice=function(t){var i=t.getBookableItems(t),e,r,f,u;if(i!=undefined&&i.length>0&&t.$scope.variantChoiceDictionary!=undefined){for(e=0,r=0;r<i.length;r++)for(f=0;f<t.$scope.variantChoiceDictionary[i[r].VariantId].length;f++)if(u=t.$scope.variantChoiceDictionary[i[r].VariantId][f],u.GenericQuantity==i[r].GenericQuantity&&u.AdultQuantity==i[r].AdultQuantity&&u.SeniorQuantity==i[r].SeniorQuantity&&u.KidQuantity==i[r].KidQuantity&&u.InfantQuantity==i[r].InfantQuantity){e+=u.TotalShopPrice;break}$(".variant-total .title").show();$(".variant-total .price").html(n.Util.getPriceHtml(e,"","",!1,!0))}else $(".variant-total .title").hide(),$(".variant-total .price").html("")},i.prototype.getBookableItems=function(n){var r=[],u=n.$scope.dateFrom,f=n.$scope.rangeNights,o,t,i,e;if(n.$rootScope.currentTrip!=null&&(n.$rootScope.currentTrip.TripDateRangeTypeCV==$(".trip-date").data("tripdaterangetypenone")&&(u=null),n.$rootScope.currentTrip.TripDateRangeTypeCV!=$(".trip-date").data("tripdaterangetypevariablerange")&&(f=null)),n.$scope.displayVariants!=undefined&&n.$scope.displayVariants.length>0)for(o=0;o<n.$scope.displayVariants.length;o++)if(t=n.$scope.displayVariants[o],t.isChecked)if(t.isMultiSelect){if(t.genericQuantity!=-1)for(i=0;i<t.genericQuantity;i++)r.push({VariantId:t.variantId,StartDate:u,NumberOfNights:f,GenericQuantity:1,AdultQuantity:0,SeniorQuantity:0,KidQuantity:0,InfantQuantity:0});if(t.adultQuantity!=-1)for(i=0;i<t.adultQuantity;i++)r.push({VariantId:t.variantId,StartDate:u,NumberOfNights:f,GenericQuantity:0,AdultQuantity:1,SeniorQuantity:0,KidQuantity:0,InfantQuantity:0});if(t.seniorQuantity!=-1)for(i=0;i<t.seniorQuantity;i++)r.push({VariantId:t.variantId,StartDate:u,NumberOfNights:f,GenericQuantity:0,AdultQuantity:0,SeniorQuantity:1,KidQuantity:0,InfantQuantity:0});if(t.kidQuantity!=-1)for(i=0;i<t.kidQuantity;i++)r.push({VariantId:t.variantId,StartDate:u,NumberOfNights:f,GenericQuantity:0,AdultQuantity:0,SeniorQuantity:0,KidQuantity:1,InfantQuantity:0});if(t.infantQuantity!=-1)for(i=0;i<t.infantQuantity;i++)r.push({VariantId:t.variantId,StartDate:u,NumberOfNights:f,GenericQuantity:0,AdultQuantity:0,SeniorQuantity:0,KidQuantity:0,InfantQuantity:1})}else e={VariantId:t.variantId,StartDate:u,NumberOfNights:f,GenericQuantity:t.genericQuantity!=-1?t.genericQuantity:0,AdultQuantity:t.adultQuantity!=-1?t.adultQuantity:0,SeniorQuantity:t.seniorQuantity!=-1?t.seniorQuantity:0,KidQuantity:t.kidQuantity!=-1?t.kidQuantity:0,InfantQuantity:t.infantQuantity!=-1?t.infantQuantity:0},e.GenericQuantity+e.AdultQuantity+e.SeniorQuantity+e.KidQuantity+e.InfantQuantity&&r.push(e);return r},i.prototype.setLoadOverlay=function(t,i){$.unblockUI();i&&n.Util.showLightbox(250,50,n.LightboxModalMode.Full,{message:$("#waitPointerTdb"),overlayCSS:{backgroundColor:"#fff"}})},i.prototype.compareDates=function(n,t,i){var r=n.setHours(0,0,0,0),u=t.setHours(0,0,0,0);switch(i){case this.comparisonEnum.GreaterThan:return r>u;case this.comparisonEnum.SmallerThan:return r<u;case this.comparisonEnum.Equal:return r===u;case this.comparisonEnum.GreaterThanOrEqual:return r>=u;case this.comparisonEnum.SmallerThanOrEqual:return r<=u}return undefined},i.$inject=["$scope","$rootScope","$route","$routeParams","$location","$shopDataService","$sce","$sales","$cal"],i}();t.DetailController=i})(t=n.Travel||(n.Travel={}))}(Vex||(Vex={})),function(n){var t;(function(t){var r=n.Settings.Culture,i=$("#inner-container").attr("data-saleId"),f,u;n.AnalyticsData.SaleId=+i||0;n.AnalyticsData.SaleTitle=$("#inputSaleTitle").val();f=angular.module("travel",["shop","ngRoute"]).config(["$routeProvider",function(n){n.when("/o",{templateUrl:"/"+r+"/Travel/_Overview/"+i,controller:t.OverviewController}).when("/d/:tripSlug/:tripId",{templateUrl:"/"+r+"/Travel/_Detail/"+i,controller:t.DetailController}).otherwise({redirectTo:"/o"})}]).directive("tripTiles",function(){return{template:"<div><\/div>",replace:!0,restrict:"E",compile:function(){return{post:u}}}});u=function(t,i,r){var u=r;t.$watch("tripsAll",function(t,r,f){var h,k,e,y,o,p,d;if(t){var w=document.createDocumentFragment(),s,g=n.Util.htmlEncode(u.moredetails),b=n.Util.htmlEncode(u.variantprice),nt='<span class="variant">'+b+"<\/span>",tt='<span class="variant float">'+b+"<\/span>",it=n.Util.htmlEncode(u.pricetypeper),rt=n.Util.htmlEncode(u.pricetypenig),ut=n.Util.htmlEncode(u.pricetypetrp),ft=n.Util.htmlEncode(u.pricetypetkt),et=n.Util.htmlEncode(u.pricetypeppn),ot=n.Util.htmlEncode(u.soldout),st=n.Util.htmlEncode(u.reserved),ht=n.Util.htmlEncode(u.tkreservedexplanation).replace(new RegExp("\n","g"),"<br />"),ct=n.Util.htmlEncode(u.crreservedexplanation).replace(new RegExp("\n","g"),"<br />"),lt=n.Util.htmlEncode(u.horeservedexplanation).replace(new RegExp("\n","g"),"<br />"),at=n.Util.htmlEncode(u.halfsoldout),vt=n.Util.htmlEncode(u.lastpiece),yt=n.Util.htmlEncode(u.lastpiecestemplate),pt='<div class="overlay"><div class="explanation"><div>'+ht+"<\/div><\/div><\/div>",wt='<div class="overlay"><div class="explanation"><div>'+ct+"<\/div><\/div><\/div>",bt='<div class="overlay"><div class="explanation"><div>'+lt+"<\/div><\/div><\/div>",a='<div class="trip-type-badge ',v='" /><\/div>';for(h=0,k=t.length;h<k;h++){e=t[h];y=e.cssClass||"";Math.abs(h)%2==1&&(y+=" last-col");var kt=f.tripsImgRoot+encodeURIComponent(e.Reference)+"_0_Cover.jpg",c="",l="";switch(e.TripTypeCV){case"HO":c=a+"hotel"+v;l=bt;break;case"TK":c=a+"ticket"+v;l=pt;break;case"CR":c=a+"cruise"+v;l=wt;break;default:c=""}o="";switch(e.VariantPriceUnitCV){case"PER":o=it;break;case"NIG":o=rt;break;case"TRP":o=ut;break;case"TKT":o=ft;break;case"PPN":o=et;break;default:o="&nbsp;"}s=document.createElement("div");s.className="trip "+y;s.setAttribute("data-id",""+e.TripId);p="";e.HideRRPrice||(p='<div class="rrp"><span class="pricewrapper">'+n.Util.getPriceHtml(e.BaseRRPrice,"&nbsp;*","",!1,!0)+"<\/span><\/div>");d=['<img src="',kt,'" />',l,'<div class="availability"><p class="lastpieces">',e.quantity==1?vt:yt.replace("{0}",""+e.quantity),'<\/p><p class="reserved">',st,'<\/p><p class="soldout">',ot,'<\/p><p class="halfway">',at,"<\/p><\/div>",'<div class="titles">',c,'<div class="title1">',e.Title1,'<\/div><div class="title2">',e.Title2,'<\/div><\/div><div class="pricing">',p,'<div class="shop">',e.HasVariantPricing?e.BaseRRPrice<1e4?nt:tt:"",'<span class="price">',n.Util.getPriceHtml(e.BaseShopPrice,"","",!1,!0),'<\/span><span class="type" >',o,'<\/span><\/div><button class="btn btnMedium btn-primary">',g,"<\/button><\/div>"];s.innerHTML=d.join("");w.appendChild(s)}i.html("");i.append(w);env.touch||i.find(".trip").hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")});$(window).scrollTop(0)}},!0)}})(t=n.Travel||(n.Travel={}))}(Vex||(Vex={})),function(n){var t;(function(t){var i,r,u;n.Modules.register("CheckoutConfirm",{documentLoading:function(){},documentReady:function(n){n(".primary-contact [type=radio]").change(function(){var t=n(this).parents(".subcategory-container").children(".control-group.phonenumber")[0],i=n(this).parents(".variant-container")[0];t&&(n(i).find(".control-group.phonenumber").each(function(){n(this).hide(400)}),n(this).is(":checked")&&n(t).show(400))});n(document).on("submit",".checkout-confirmation-form",function(){n("#payment-button").prop("disabled",!0)})}});n.Modules.register("Payment",{documentLoading:function(){},documentReady:function(t){var r,i,u,f;t(document).on("submit",".confirm-payment-form",function(){t(".no-payment-required").hasClass("hide")&&t(".no-payment-required input[type=hidden]").remove();var i=t(".user-payment-method.selected");return i.find(".information-alias").length>0&&n.Util.showLightbox(250,50,n.LightboxModalMode.Full,{message:t("#waitPointerDl"),overlayCSS:{backgroundColor:"#fff"}}),!0});if(t("input[type=radio]").change(function(){var n=t(this).val(),i;n.indexOf("|")!==-1&&(i=n.split("|"),i.length==2&&(n=i[1]));n=n.toLowerCase();n=="american express"?(t(".reserve-payment-allowed").removeClass("hide"),t(".reserve-payment-allowed").parents(".payment-method-group").removeClass("hide")):(t(".reserve-payment-allowed").addClass("hide"),t(".reserve-payment-allowed").parents(".payment-method-group").addClass("hide"),t("#ReservePaymentCheckbox").prop("checked",!1));n=="paypal"?(t(".reference-transactions-allowed").removeClass("hide"),t(".reference-transactions-allowed").parents(".payment-method-group").removeClass("hide")):(t(".reference-transactions-allowed").addClass("hide"),t(".reference-transactions-allowed").parents(".payment-method-group").addClass("hide"));n=="bcmc"||n=="visa"||n=="mastercard"?(t(".alias-usage-allowed").removeClass("hide"),t(".alias-usage-allowed").parents(".payment-method-group").removeClass("hide")):(t(".alias-usage-allowed").addClass("hide"),t(".alias-usage-allowed").parents(".payment-method-group").addClass("hide"));t(this).parents(".user-payment-method").find(".information-alias").length>0?t(".directlink-explenation")&&(t(".directlink-explenation").removeClass("hide"),t(".directlink-explenation").parents(".payment-method-group").removeClass("hide")):t(".directlink-explenation")&&(t(".directlink-explenation").addClass("hide"),t(".directlink-explenation").parents(".payment-method-group").addClass("hide"))}),t("a.delete-user-payment-method").click(function(i){i.preventDefault();i.stopPropagation();var r=t(this),u=t(this).attr("data-paymentBrandCV"),f=t(this).attr("data-alias"),e=t(this).attr("data-cardNumber"),o=t('#confirm-payment-form input[name$="CSRFToken"]').val();jQuery.ajax({url:"/"+n.Settings.Culture+"/checkout/DeleteUserPaymentMethod",type:"post",data:JSON.stringify({paymentBrandCV:u,alias:f,cardNumber:e,CSRFToken:o}),contentType:"application/json"}).done(function(n){n.Errors==null&&(r.parents("label").remove(),t(".user-payment-method [name=PaymentBrandCV]:radio:checked").length==0&&(t(".user-payment-method [name=PaymentBrandCV]:radio:last").prop("checked",!0),t(".user-payment-method [name=PaymentBrandCV]:radio:last").change()))})}),t("[name=PaymentBrandCV]:radio").change(function(){t(".payment-method-select").each(function(){var n=t(this);n.is(":checked")?n.parents(".user-payment-method").addClass("selected"):n.parents(".user-payment-method").removeClass("selected")})}),t(".user-payment-method").click(function(){var n=t(this).find("[name=PaymentBrandCV]:radio");n.is(":checked")||(t(".user-payment-method [name=PaymentBrandCV]:radio").removeProp("checked"),n.prop("checked",!0),n.change())}),t(".toggle-payment-methods-general").click(function(){return t(".payment-methods-general").toggleClass("hide"),!1}),r=t("input[type='radio'][name='PaymentBrandCV']:checked"),r.length==1&&(i=r[0].attributes.value.value,i.indexOf("|")!==-1&&(u=i.split("|"),u.length==2&&(i=u[1])),i=i.toLowerCase(),i=="american express"?(t(".reserve-payment-allowed").removeClass("hide"),t(".reserve-payment-allowed").parents(".payment-method-group").removeClass("hide")):(t(".reserve-payment-allowed").addClass("hide"),t(".reserve-payment-allowed").parents(".payment-method-group").addClass("hide"),t("#ReservePaymentCheckbox").prop("checked",!1)),r.parents(".user-payment-method").find(".information-alias").length>0&&(t(".directlink-explenation")&&(t(".directlink-explenation").removeClass("hide"),t(".directlink-explenation").parents(".payment-method-group").removeClass("hide")),i=="paypal"?(t(".reference-transactions-allowed").removeClass("hide"),t(".reference-transactions-allowed").parents(".payment-method-group").removeClass("hide")):(t(".reference-transactions-allowed").addClass("hide"),t(".reference-transactions-allowed").parents(".payment-method-group").addClass("hide"))),i=="bcmc"||i=="visa"||i=="mastercard"?(t(".alias-usage-allowed").removeClass("hide"),t(".alias-usage-allowed").parents(".payment-method-group").removeClass("hide")):(t(".alias-usage-allowed").addClass("hide"),t(".alias-usage-allowed").parents(".payment-method-group").addClass("hide"))),f=t(".trip-detail-checkout map"),f.length>0){var e=t("#location").data("prdimg-root"),o=t("#location").data("reference"),s='<img src="'+e+o+"_map_"+n.Settings.Culture+'.jpg" />';f.html(s)}t('.tabbable.travel-payment .nav-tabs a[data-toggle="tab"]').on("shown.bs.tab",function(n){var r=t(".tabbable.travel-payment .map-container"),f,e,c,s,h,l,a,v;r.find(".map-canvas").remove();var u=+r.data("zoom"),i=r.data("lat"),o=0;i!=undefined&&i!=null&&i!=""&&(o=+i.replace(",","."));i=r.data("lon");f=0;i!=undefined&&i!=null&&i!=""&&(f=+i.replace(",","."));t(n.target).data("target")=="#location"?o!=0&&f!=0?(r.show(),e=document.createElement("div"),e.className="map-canvas",c=e,r.append(c),s=13,u!=undefined&&u!=null&&u>=0&&u<=50&&(s=u),h=new google.maps.LatLng(o,f),a={zoom:s,center:h},l=new google.maps.Map(e,a),v=new google.maps.Marker({position:h,map:l})):r.hide():r.hide()})}});i=function(){function t(i,r,u){var e=this,f=i,s,o;i.booking=$.parseJSON($("#booking-json").val());e.recalculateCredit(i,u);s=$("#booking-content");t.segmentDefinitions=s.data("segmentDefinitions");t.currentLoyaltyPoints=s.data("loyaltyPoints");o=$(".booking-right-content .loyalty-information");t.segmentNames=o.data("segmentNames");i.loyaltyPoints=o.data("pointsEarned");i.newLoyalySegmentName=t.getLoyaltySegmentName(o.data("newsegment"));i.getPriceHtml=function(t){return t==undefined?"&nbsp;":n.Util.getPriceHtml(t)};$(document).on("click",".variant-extra-checkbox > input",null,function(){var n=$(this),t=n.data("index"),i=f.booking.Variants[t];e.addOrRemoveExtra(f,u,n,i.Extras)});$(document).on("click",".trip-extra-checkbox > input",null,function(){e.addOrRemoveExtra(f,u,$(this),f.booking.Extras)});$(".variant-extra-checkbox > input:checked").each(function(){var n=$(this),t=n.data("index"),i=f.booking.Variants[t];e.addOrRemoveExtra(f,u,n,i.Extras)});$(".trip-extra-checkbox > input:checked").each(function(){e.addOrRemoveExtra(f,u,$(this),f.booking.Extras)})}return t.getLoyaltySegmentName=function(n){try{return t.segmentNames[n]}catch(i){}return null},t.getLoyaltySegmentNameFromPoints=function(n){for(var r,i=0;i<t.segmentDefinitions.length;i++)if(r=t.segmentDefinitions[i],n>=r.FromPoints)return t.getLoyaltySegmentName(r.LoyaltySegmentCV);return null},t.prototype.getIndexOfExtra=function(n,t){for(var i=0;i<n.length;i++)if(n[i].Title===t.Title)return i;return-1},t.prototype.addOrRemoveExtra=function(n,i,r,u){var f={Title:r.parent().find("label").text(),Price:+r.data("price")},e=this.getIndexOfExtra(u,f),s,o;r.is(":checked")?e<0&&(u.push(f),n.booking.TotalAmount+=f.Price):e>=0&&(u.splice(e,1),n.booking.TotalAmount-=f.Price);n.loyaltyPoints=Math.ceil(n.booking.TotalAmount);s=t.getLoyaltySegmentNameFromPoints(t.currentLoyaltyPoints);o=t.getLoyaltySegmentNameFromPoints(t.currentLoyaltyPoints+n.loyaltyPoints);n.newLoyalySegmentName=o!=s?o:null;this.recalculateCredit(n,i);n.$apply()},t.prototype.recalculateCredit=function(n,t){n.booking.CreditUsedAmount=Math.min(n.booking.TotalAmount,n.booking.AvailableCreditAmount);t.creditUsedAmount=n.booking.CreditUsedAmount;t.totalAmount=n.booking.TotalAmount},t.$inject=["$scope","$timeout","$rootScope"],t}();t.BookingSummaryController=i;r=function(){function t(t){var i=this,r=t;t.getPriceHtml=function(t,i){return t==undefined?"&nbsp;":n.Util.getPriceHtml(t,null,i?" - ":"")}}return t.$inject=["$scope","$rootScope"],t}();t.PaymentDataController=r;u=angular.module("travelCheckout",["shop"]).controller("PaymentDataController",r).controller("BookingSummaryController",i)})(t=n.Travel||(n.Travel={}))}(Vex||(Vex={}));shopModule.controller("Vex.Travel.BookingSummaryController",Vex.Travel.BookingSummaryController);shopModule.controller("Vex.Travel.PaymentDataController",Vex.Travel.PaymentDataController),function(n){var t;(function(t){var f=n.Settings.LanguageIso,r=$(".verticals-buttons").data("vertical"),e=function(){function n(){}return n}(),i,o,u;t.TrendingOverviewProduct=e;i=function(){function t(i,u){var e=this;e.$scope=i;e.$sales=u;$("#nav-box-trending").addClass("active-page");e.loadJsonProductList(e);e.$scope.cultureCased=f;e.$scope.cultureCased.length==5&&(e.$scope.cultureCased=e.$scope.cultureCased.substr(0,3)+e.$scope.cultureCased.substr(3).toUpperCase());e.$scope.availabilitiesDictionary=n.Dictionary.availabilities;(r==undefined||r==null||r=="")&&(r="all");e.$scope.getProductPrice=function(n,t){return e.$sales.getLowerProductPrice(n,t)};$("#trending .product-tiles").on("click",".tile",function(){var t=$(this),u=t.data("saleid"),i=t.data("productid");jQuery.ajax({url:"/"+e.$scope.cultureCased+"/trending/LogTrendingClick/",data:{saleId:u,productId:i}});e.$scope.persuasionAdvice!=undefined&&e.$scope.persuasionAdvice!=null&&t.find(".persuasion").length>0&&(e.$scope.persuasionAdvice.strategyId==1&&t.hasClass("social-proof")||e.$scope.persuasionAdvice.strategyId==2&&t.hasClass("authority")||e.$scope.persuasionAdvice.strategyId==3&&t.hasClass("price"))&&n.PersuasionApi.LearnAdviceSuccess(e.$scope.persuasionAdvice);window.location.href="/"+e.$scope.cultureCased+"/r-qs"+u+"#/d/r/"+i+"/t/"+r.toLowerCase()+"/p"+i});$(".verticals-buttons").on("click","button",function(){var n=$(this),t=n.data("link");window.location.href="/"+e.$scope.cultureCased+"/trending/"+t.toLowerCase()});var s=$(window),o=$("<div />").attr("id","overview-navarrow").hide().attr("data-visible","false").prependTo("body"),h=$("#main-container");s.resize(function(){o.css("left",h.offset().left+h.width()+39+"px");o.css("top",Math.max(190,s.innerHeight()/2-30)+"px")}).resize();o.click(function(){s.scrollTop(0)});e.$scope.onWindowScroll=function(){var u=s.height(),r=u,n=s.scrollTop(),i=n+u,f=$("#footer").offset().top;n>1e3&&i<f&&o.attr("data-visible")=="false"&&o.attr("data-visible","true").fadeIn();(n<500||i-200>f)&&o.attr("data-visible")=="true"&&o.attr("data-visible","false").fadeOut();t.lazyImageElementsCol0=e.lazyImageLoading(e,t.lazyImageElementsCol0,n,i,r);t.lazyImageElementsCol1=e.lazyImageLoading(e,t.lazyImageElementsCol1,n,i,r);t.lazyImageElementsCol2=e.lazyImageLoading(e,t.lazyImageElementsCol2,n,i,r);t.lazyImageElementsCol3=e.lazyImageLoading(e,t.lazyImageElementsCol3,n,i,r)};s.off("scroll.overview").on("scroll.overview",e.$scope.onWindowScroll)}return t.prototype.runAfterRender=function(n){var t,r,i;n.$scope.onWindowScroll();t=$(".verticals-buttons").data("initialproductid");t!=undefined&&t!=null&&t.length>0&&t[0]=="p"&&(r=t.substr(1),i=$('.tile[data-productid="'+r+'"]'),i.length>0&&$(window).scrollTop(i.offset().top-100))},t.prototype.lazyImageLoading=function(n,t,i,r,u){if(t&&t.length>0){var f=$(t[0]).height();t.each(function(){var n=$(this),e=+n.offset().top,o=e+f;return e>r+u?!1:(o>i-u&&(n.attr("src",n.attr("data-src")),t=t.not(this)),!0)})}return t},t.prototype.loadJsonProductList=function(t){var r=$("#trending-json"),i=$.parseJSON(r.val());n.AnalyticsData.isLastUserDigitAsync("1,3,5,7,9",function(r){r?t.applyPersuasiveTechniquesToProductList(t,i,0):n.PersuasionApi.GetAdvice(function(n){var r;r=n?n.strategyId:0;t.applyPersuasiveTechniquesToProductList(t,i,r,n)})})},t.prototype.applyPersuasiveTechniquesToProductList=function(t,i,r,u){var o,e,f;for(u===void 0&&(u=null),o=!1,e=0;e<i.length;e++)i[e].showPersuasionAuthority=!1,i[e].showPersuasionSocialProof=!1,i[e].showPersuasionPricing=!1;switch(r){case 1:for(e=0;e<i.length;e++)f=i[e],f.ShowPersSocialProof&&f.ShowPersHigh?(f.showPersuasionSocialProof=!0,o=!0):f.ShowPersAuthority&&f.ShowPersLow?(f.showPersuasionAuthority=!0,o=!0):f.ShowPersPrice&&f.ShowPersLow&&(f.showPersuasionPricing=!0,o=!0);break;case 2:for(e=0;e<i.length;e++)f=i[e],f.ShowPersSocialProof&&f.ShowPersLow?(f.showPersuasionSocialProof=!0,o=!0):f.ShowPersAuthority&&f.ShowPersHigh?(f.showPersuasionAuthority=!0,o=!0):f.ShowPersPrice&&f.ShowPersLow&&(f.showPersuasionPricing=!0,o=!0);break;case 3:for(e=0;e<i.length;e++)f=i[e],f.ShowPersSocialProof&&f.ShowPersLow?(f.showPersuasionSocialProof=!0,o=!0):f.ShowPersAuthority&&f.ShowPersLow?(f.showPersuasionAuthority=!0,o=!0):f.ShowPersPrice&&f.ShowPersHigh&&(f.showPersuasionPricing=!0,o=!0);break;default:for(e=0;e<i.length;e++)f=i[e],f.ShowPersSocialProof&&f.ShowPersMed?(f.showPersuasionSocialProof=!0,o=!0):f.ShowPersAuthority&&f.ShowPersMed?(f.showPersuasionAuthority=!0,o=!0):f.ShowPersPrice&&f.ShowPersMed&&(f.showPersuasionPricing=!0,o=!0)}u!=undefined&&u!=null&&o&&(n.PersuasionApi.LearnAdviceView(u),t.$scope.persuasionAdvice=u);t.$scope.productsList=i;t.$scope.$apply();setTimeout(function(){t.runAfterRender(t)},0)},t.$inject=["$scope","$sales"],t}();t.TrendingController=i;o=angular.module("trending",["shop"]).directive("productTiles",function(){return{template:"<div><\/div>",replace:!0,restrict:"E",compile:function(){return{post:u}}}}).controller("TrendingController",i);u=function(t,r,u){var f=u;t.$watch("productsList",function(u){var p,v,l,a,h,g,e,ft,et,b,ot,y;if(u){var nt=[],tt=[],it=[],rt=[];if(u.length>4){if(u[0].HasPortraitPhoto||u[0].showPersuasionAuthority||u[0].showPersuasionPricing||u[0].showPersuasionSocialProof)for(e=1;e<u.length;e++)if(!(u[e].HasPortraitPhoto||u[e].showPersuasionAuthority||u[e].showPersuasionPricing||u[e].showPersuasionSocialProof)){u.splice(0,0,u[e]);u.splice(e+1,1);break}if(!(u[1].HasPortraitPhoto||u[1].showPersuasionAuthority||u[1].showPersuasionPricing||u[1].showPersuasionSocialProof))for(e=2;e<u.length;e++)if(u[e].HasPortraitPhoto||u[e].showPersuasionAuthority||u[e].showPersuasionPricing||u[e].showPersuasionSocialProof){u.splice(1,0,u[e]);u.splice(e+1,1);break}if(u[2].HasPortraitPhoto||u[2].showPersuasionAuthority||u[2].showPersuasionPricing||u[2].showPersuasionSocialProof)for(e=3;e<u.length;e++)if(!(u[e].HasPortraitPhoto||u[e].showPersuasionAuthority||u[e].showPersuasionPricing||u[e].showPersuasionSocialProof)){u.splice(2,0,u[e]);u.splice(e+1,1);break}}for(p=1,v=0,e=0;e<u.length;e++){switch(p){case 0:nt[v]=u[e];break;case 1:tt[v]=u[e];break;case 2:it[v]=u[e];break;case 3:rt[v]=u[e];p=-1;v+=1}p+=1}var st=n.Util.htmlEncode(f.soldout),ht=n.Util.htmlEncode(f.reserved),ct=n.Util.htmlEncode(f.details),lt=n.Util.htmlEncode(f.socialtitle),at=n.Util.htmlEncode(f.socialsubtitle),vt=n.Util.htmlEncode(f.pricingtitle),yt=n.Util.htmlEncode(f.pricingsubtitle),k=f.imgserver,ut=document.createDocumentFragment(),s,d='<div class="persuasion"><div class="pin"{2}>&nbsp;<\/div><div class="vex-logo">&nbsp;<\/div><div class="title">{0}<\/div><div class="subtitle">{1}<\/div><\/div>',pt='<div class="product"><img class="product" data-src="{0}" /><div class="logo-wrapper"><img class="logo" data-src="{1}" /><\/div><div class="overlay"><div class="reserved">'+ht+'<\/div><div class="soldout">'+st+"<\/div><\/div><\/div>";for(l=0;l<4;l++){a=document.createElement("div");switch(l){case 0:h=nt;break;case 1:h=tt;break;case 2:h=it;break;case 3:h=rt}for(a=document.createElement("div"),a.className="trending-column col-"+l,a.setAttribute("data-column",""+l),l==0&&(s=document.createElement("div"),s.className="fixed-tile",g=document.createElement("div"),$(g).css("background","url('"+$("#overview-container").data("trendingimg")+"')"),s.appendChild(g),a.appendChild(s)),e=0,ft=h.length;e<ft;e++)if(h[e]!=undefined&&h[e]!=null){var o=h[e],c="",w="";o.showPersuasionAuthority?(et=" style=\"background-image: url('"+k+"Site/Expert/"+o.ExpertId+"/expert-"+t.cultureCased+"-small.png')\"",w=n.Util.stringFormat(d,o.ExpertName,o.ExpertFunctionTitle,et),c+=" authority"):o.showPersuasionSocialProof?(w=n.Util.stringFormat(d,lt,n.Util.stringFormat(at,o.PersuasionSocialProofViews),""),c+=" social-proof"):o.showPersuasionPricing&&(w=n.Util.stringFormat(d,vt,n.Util.stringFormat(yt,"<span>"+n.Util.getPriceHtml(o.PersuasionPricingAbsoluteReduction)+"<\/span>"),""),c+=" price");b=k+"Site/Sales/"+o.SaleId+"/Products/"+o.ProductReference;o.HasPortraitPhoto?(c+=" portrait",b+="_H_1_3M1.jpg"):b+="_1_3M1.jpg";ot=n.Util.stringFormat(pt,b,k+o.ProductLogoUrl);y=t.availabilitiesDictionary[o.ProductId];y!=undefined&&y!=null?y.IsReserved?c+=" reserved":y.Quantity<=0&&(c+=" soldout"):c+=" soldout";s=document.createElement("div");s.className="tile"+c;s.setAttribute("data-saleid",""+o.SaleId);s.setAttribute("data-productid",""+o.ProductId);$(s).data("brandname",o.BrandName);$(s).data("producttitle",o.ProductTitle);s.innerHTML=w+ot;a.appendChild(s);$(s).mouseenter(function(){if(!$(this).data("loaded")){var i=$(this),r=$(this).data("saleid"),u=$(this).data("productid"),f=$(this).data("brandname"),e=$(this).data("producttitle");t.getProductPrice(r,u).then(function(t){$(i).data("loaded",!0);var r='<div class="details-wrapper"><div class="details"><div class="brand">{0}<\/div><div class="title">{1}<\/div><div class="catalog-price-wrapper"><div class="catalog-price">{2}<\/div><\/div><div class="shop-price">{3}<\/div><div class="detail link internal">'+ct+"<\/div><\/div><\/div>",u=n.Util.stringFormat(r,f,e,n.Util.getPriceHtml(t.CatalogPrice),n.Util.getPriceHtml(t.ShopPrice));$(" > .product",i).append(u)})}})}ut.appendChild(a)}r.html("");r.append(ut);i.lazyImageElementsCol0=r.find(".col-0 img");i.lazyImageElementsCol1=r.find(".col-1 img");i.lazyImageElementsCol2=r.find(".col-2 img");i.lazyImageElementsCol3=r.find(".col-3 img")}})}})(t=n.Trending||(n.Trending={}))}(Vex||(Vex={})),function(n){var t=function(){function t(i,r,u,f,e,o,s){function c(){r.$apply(function(){r.lightboxTemplate="/templates/signin-signup"})}var h,a,v,p,l,y,w;this.summaryValidMode=!1;h=this;r.currentCountryIso=n.Settings.Culture.toLocaleLowerCase().split("-").length?n.Settings.Culture.toLocaleLowerCase().split("-")[1]:"be";r.lightboxTemplate="";r.view="none";r.undisclosedCV="Undisclosed";n.Storage.getItem("useGenderDefault")==null&&(a=Math.round(Math.random()*1e3)%2==0,n.Storage.setItem("useGenderDefault",a+""),s.logEvent("SIGNUP","START_AB",{},{name:"gender_default",segment:a?"base":"variant"}));r.useGenderDefault=JSON.parse(n.Storage.getItem("useGenderDefault"))===!0;r.signIn={email:"",password:"",attempts:0};r.signUp={email:"",firstName:"",lastName:"",password:"",genderCV:r.useGenderDefault?"F":"",hasUndisclosedGender:!1,acceptGeneralConditions:!1,acceptPrivacyPolicy:!0,acceptCookiePolicy:!0,godfatherName:null,incomingReferrer:$.cookie("incoming-referrer")};r.reset={password:"",passwordRepeat:""};r.getPriceHtml=function(t,i){return t==undefined?"&nbsp;":n.Util.getPriceHtml(t,null,i?" - ":"")};r.showSnapPreMigrationInfo=!1;r.showVPPreMigrationInfo=!1;r.crossDomReferrals=h.getCrossDomainReferrals();n.authentication.lightboxAction!=n.LightboxAction.none&&(v=$.cookie("sst"),v?(p=JSON.parse($.base64Decode(v),n.Util.jsonDateTimeReviver),$.cookie("sst","",{path:"/",expires:new Date(1900,1,1)}),r.socialSharing=p):r.socialSharing=null);window.AppleID&&(document.addEventListener("AppleIDSignInOnSuccess",function(t){var i=JSON.parse(atob(t.detail.authorization.id_token.split(".")[1])),u={user:i.sub,identityToken:t.detail.authorization.id_token,authorizationCode:t.detail.authorization.code,email:t.detail.user&&t.detail.user.email,fullName:{givenName:t.detail.user&&t.detail.user.name.firstName,familyName:t.detail.user&&t.detail.user.name.lastName},Referral:undefined};$.ajax({type:"POST",headers:{"X-Requested-With":"XMLHttpRequest"},data:JSON.stringify(u),contentType:"application/json; charset=utf-8",url:"/"+n.Settings.Culture+"/authentication/apple",success:function(n){n.Status=="Success"?$.ajax({type:"POST",headers:{"X-Requested-With":"XMLHttpRequest"},data:JSON.stringify({loginToken:n.LoginToken}),contentType:"application/json; charset=utf-8",url:l,success:function(n){if(n.Status=="Success"){h.closeAndNavigate(r,n.User);return}c()},error:c}):c()},error:c})}),document.addEventListener("AppleIDSignInOnFailure",function(){setTimeout(c,0)}));l="/"+n.Settings.Culture+"/Authentication/SignIn";h.initFacebook(e,r);localStorage.getItem("_gs")&&Date.now()-parseInt(localStorage.getItem("_gs"))<3e3&&(n.authentication.lightboxAction=n.LightboxAction.none);switch(n.authentication.lightboxAction){case n.LightboxAction.godfatherLandingPage:$.blockUI({message:null,overlayCSS:{opacity:0}});r.lightboxTemplate="/templates/godfather-landing";break;case n.LightboxAction.signinSignup:$.blockUI({message:null,overlayCSS:{opacity:0}});y=!1;w=setTimeout(function(){y=!0;c()},2e3);e.FB&&e.FB.getLoginStatus(function(t){if(!y)if(clearTimeout(w),t.status==="connected"&&t.authResponse){var i={FacebookId:t.authResponse.userID,AccessToken:t.authResponse.accessToken,Country:undefined,Referral:undefined};$.ajax({type:"POST",headers:{"X-Requested-With":"XMLHttpRequest"},data:JSON.stringify(i),contentType:"application/json; charset=utf-8",url:"/"+n.Settings.Culture+"/authentication/facebook",success:function(n){n.Status=="Success"?$.ajax({type:"POST",headers:{"X-Requested-With":"XMLHttpRequest"},data:JSON.stringify({loginToken:n.LoginToken}),contentType:"application/json; charset=utf-8",url:l,success:function(n){if(n.Status=="Success"){h.closeAndNavigate(r,n.User);return}c()},error:c}):c()},error:c})}else setTimeout(c,0)});break;case n.LightboxAction.signedOut:$.blockUI({message:null,overlayCSS:{opacity:0}});e.FB&&e.FB.getLoginStatus(function(){FB.logout(function(){})});r.lightboxTemplate="/templates/signout";break;case n.LightboxAction.resetPassword:$.blockUI({message:null,overlayCSS:{opacity:0}});r.lightboxTemplate="/templates/reset-password";break;case n.LightboxAction.redirectHome:window.location.href="/"+n.Settings.Culture+"/";break;case n.LightboxAction.saleLandingPage:n.authentication.lightboxAction==n.LightboxAction.saleLandingPage&&n.Util.showLightbox(943,580,n.LightboxModalMode.Full,{message:$(".lp-sale-box"),onBlock:function(){$("div.blockUI.blockOverlay").addClass("lp-dialog-bg")}})}i.$on("force-auth",function(){for(var u=[],f,t,n=1;n<arguments.length;n++)u[n-1]=arguments[n];f=u[0];t=function(){r.lightboxTemplate="/templates/signin-signup";r.init()};f?i.$apply(function(){t()}):t()});r.init=function(){if(n.authentication.lightboxAction==n.LightboxAction.godfatherLandingPage&&(r.signInSignUpData=n.authentication.signInSignUpData,h.initBehaviors(r),h.initActions(r),r.goToSignup(null),r.isGodFatherLanding=!0,n.Util.showLightbox(750,500,n.LightboxModalMode.Full,{message:$("#signup-box"),onBlock:function(){$("div.blockUI.blockOverlay").addClass("lp-dialog-bg")}})),n.authentication.lightboxAction==n.LightboxAction.saleLandingPage&&n.Util.showLightbox(943,580,n.LightboxModalMode.Full,{message:$(".lp-sale-box"),onBlock:function(){$("div.blockUI.blockOverlay").addClass("lp-dialog-bg")}}),n.authentication.lightboxAction==n.LightboxAction.signedOut){n.Util.calEvent("SHOW","SIGNOUT");n.Util.showLightbox(750,500,n.LightboxModalMode.Full,{message:$("#signout-box"),onBlock:t.onLightboxBlock});return}if(n.authentication.lightboxAction==n.LightboxAction.signinSignup||n.authentication.lightboxAction==n.LightboxAction.resetPassword){if(h.initBehaviors(r),h.initActions(r),n.authentication.lightboxAction==n.LightboxAction.signinSignup){h.initFacebook(e,r);var i=!0;n.authentication.signInSignUpData?(r.signInSignUpData=n.authentication.signInSignUpData,i=r.signInSignUpData.Auth=="up",r.signUp.email=r.signInSignUpData.SignUpEmail||"",r.signUp.godfatherName=r.signInSignUpData.SignUpGodfatherName||null):(r.signInSignUpData=null,i=!$.cookie("TK"));i?r.goToSignup(null):r.goToLogin(null);setTimeout(function(){n.Util.calEvent("SHOW","SIGNUP");n.Util.showLightbox(750,500,n.LightboxModalMode.Full,{message:$("#signup-box"),onBlock:t.onLightboxBlock})},1e3)}else n.Util.calEvent("SHOW","SIGNUP"),n.Util.showLightbox(750,500,n.LightboxModalMode.Full,{message:$("#signup-box"),onBlock:t.onLightboxBlock});return}};r.hideTopLanguageBar=function(){return n.authentication.lightboxAction==n.LightboxAction.resetPassword};r.clearBoxForms=function(n){n&&n.preventDefault();r.removeSignInPopovers();r.removeSignUpPopovers();r.clearValidation();r.removeValidationError()};r.goToLogin=function(n){r.view="login";r.clearBoxForms(n);r.summaryValidMode=!1;r.signIn.password="";$('#signup-login input[type="text"]:first').focus();r.renderAppleButton()};r.goToSignup=function(n){r.view="signupStep";r.signUp.password="";r.clearBoxForms(n);r.summaryValidMode=!1;$('#signup-step2 input[type="text"]:first').focus();r.renderAppleButton()};$(document).on("click",function(n){$(".lightbox-popup .popover:visible").length>0&&$(".lightbox-popup .lb-popover-trigger").each(function(){$(this).is(n.target)||$(this).has(n.target).length!==0||$(".popover").has(n.target).length!==0||$(this).popover("destroy")})});$(document).on("click",".popover-content div.close",function(){return $(".lightbox-popup .lb-popover-trigger").popover("destroy"),!1});r.removeSignInPopovers=function(){$("#SignInPassword").popover("destroy");$("#SignInEmail").popover("destroy")};r.removeSignUpPopovers=function(){$("#SignUpGender").parent().popover("destroy");$("#SignUpFirstName").popover("destroy");$("#SignUpLastName").popover("destroy");$("#SignUpPassword").popover("destroy");$("#SignUpEmail2").popover("destroy")};r.submitLogin=function(i){var u=function(u){if(r.validateLogin(t.getEventOriginId(i))){r.clearValidation();r.removeValidationError();var f="/"+n.Settings.Culture+"/Authentication/Authenticate";h.blockInput();$.ajax({type:"POST",headers:{"X-Requested-With":"XMLHttpRequest"},data:JSON.stringify({email:r.signIn.email,password:r.signIn.password,captcha:u}),contentType:"application/json; charset=utf-8",url:f,success:function(n){n.Error=="None"?$.ajax({type:"POST",headers:{"X-Requested-With":"XMLHttpRequest"},data:JSON.stringify({loginToken:n.LoginToken}),contentType:"application/json; charset=utf-8",url:l,success:function(n){n.Status=="Success"&&h.closeAndNavigate(r,n.User)},complete:h.deblockInput}):(h.deblockInput(),r.$apply(function(){n.Error=="BadPassword"?++r.signIn.attempts==1?($("#SignInEmail").popover({html:!0,placement:"top",popoverClass:"red slim",trigger:"manual",content:$("#popover-badpw").html(),container:"#signup-login"}),$("#SignInEmail").popover("show")):h.postPasswordHelp(r,r.signIn.attempts==2):n.Error=="Closed"?h.showClosedAccountPopover(r):n.Error=="UnknownUser"&&h.showUnknownAccountPopover(r);$("#SignInEmail").parent().addClass("error");$("#SignInPassword").parent().addClass("error")}))},error:h.deblockInput})}};$("#recaptcha").length>0&&typeof grecaptcha!="undefined"?(window.onSubmitRecaptcha=u,grecaptcha.execute()):u(null)};r.validateLogin=function(i){var u=[],e,f,s,l,o;if(r.clearValidation(),r.removeSignInPopovers(),e="#",f=!1,typeof i=="string"?(f=i=="signup-login",h.summaryValidMode=h.summaryValidMode||i=="signup-login"):e+=t.getEventOriginId(i.originalEvent),$.trim(r.signIn.email)==""){if(f||h.summaryValidMode)u["#SignInEmail"]=r.getErrorString("EmailEmpty"),$("#SignInEmail").parent().addClass("error");else if(e=="#SignInEmail")return r.validationErrorsFor("#SignInEmail",r.getErrorString("EmailEmpty")),$("#SignInEmail").parent().addClass("error"),!1}else if(n.Util.isValidEmailAddress($("#SignInEmail").val()))r.removeValidationErrorsFor("#SignInEmail"),h.summaryValidMode&&(f=!0);else if(f||h.summaryValidMode)u["#SignInEmail"]=r.getErrorString("EmailInvalid"),$("#SignInEmail").parent().addClass("error");else if(e=="#SignInEmail")return r.validationErrorsFor("#SignInEmail",r.getErrorString("EmailInvalid")),$("#SignInEmail").parent().addClass("error"),!1;if($.trim(r.signIn.password)==""){if(f||h.summaryValidMode)u["#SignInPassword"]=r.getErrorString("PasswordEmpty"),$("#SignInPassword").parent().addClass("error");else if(e=="#SignInPassword")return r.validationErrorsFor("#SignInPassword",r.getErrorString("PasswordEmpty")),$("#SignInPassword").parent().addClass("error"),!1}else r.removeValidationErrorsFor("#SignInPassword");s=!1;for(l in u)if(u.hasOwnProperty(l)){s=!0;break}if(!s)return r.removeValidationError(),!0;var c=null,a=$("<div>"),v=$("<ul class='error-messages'>");for(o in u)$.trim(u[o])!=""&&(c=c||$(o),$("<li class='error-message'>").text("- "+u[o]).appendTo(v));return v.appendTo(a),r.showValidationPopover(c,a),!1};r.renderAppleButton=function(){setTimeout(window.AppleID.auth.renderButton,100)};r.submitStep2=function(t,i){if(t&&t.preventDefault(),r.validateStep2(null,i)){r.clearValidation();r.removeSignUpPopovers();var e="/"+n.Settings.Culture+"/Registration/Step2",u={Email:r.signUp.email,FirstName:r.signUp.firstName,LastName:r.signUp.lastName,Password:r.signUp.password,GenderCV:r.signUp.genderCV!==r.undisclosedCV?r.signUp.genderCV:"F",HasUndisclosedGender:r.signUp.genderCV===r.undisclosedCV,Country:r.currentCountryIso,AcceptLicenseAgreement:r.signUp.acceptCookiePolicy&&r.signUp.acceptGeneralConditions&&r.signUp.acceptPrivacyPolicy,Referral:r.signInSignUpData,IncomingReferrer:r.signUp.incomingReferrer,IsMobile:!1,UseGenderDefault:n.Storage.getItem("useGenderDefault")==="true"?!0:!1,Captcha:null},f=function(n){h.blockInput();u.Captcha=n;$.ajax({type:"POST",headers:{"X-Requested-With":"XMLHttpRequest"},data:JSON.stringify(u),contentType:"application/json; charset=utf-8",url:e,success:function(n){if(n.Status=="Success"){var t={acqChan:n.AcqChan,refSrc:n.RefSrc};$.ajax({type:"POST",headers:{"X-Requested-With":"XMLHttpRequest","X-Vex-Session-Id":$.cookie("cal_s"),"X-Vex-Device-Id":$.cookie("cal_d"),"X-Vex-Channel":"WEB"},data:JSON.stringify({loginToken:n.LoginToken}),contentType:"application/json; charset=utf-8",url:l,success:function(n){n.Status=="Success"&&($.cookie("newMemberAcq",JSON.stringify(t),{path:"/",expires:1}),h.closeAndNavigate(r,n.User))},complete:h.deblockInput})}else typeof grecaptcha!="undefined"&&grecaptcha.reset(),h.deblockInput(),n.Status=="AlreadySnapMember"?r.$apply(function(){h.gotoLoginForExistingMember(r,"snap")}):n.Status=="AlreadyVPMember"?r.$apply(function(){h.gotoLoginForExistingMember(r,"vp")}):n.Status=="AlreadyMember"&&r.$apply(function(){h.gotoLoginForExistingMember(r)})},error:h.deblockInput})};$("#recaptcha").length>0&&typeof grecaptcha!="undefined"?(window.onSubmitRecaptcha=f,grecaptcha.execute()):f(null)}};r.showValidationPopover=function(n,t){var i=$("#signup-box").data("error-popover-title");n[0].type==="hidden"&&(n=n.parent());n.popover({html:!0,placement:"left",popoverClass:"red validation-summary",trigger:"manual",title:i,content:t,container:"#signup-box"}).popover("show");n.data("popover").$tip.hide().css({left:"-=14"}).show()};r.validateStep2=function(i,u){function e(n,t,i){var u=$(n);if(o||h.summaryValidMode)s[n]=r.getErrorString(t),u.parent().addClass("error");else if(v==i)return r.validationErrorsFor(n,r.getErrorString(t),null,i),u.parent().addClass("error"),!1;return!0}function c(n,t,i){return $.trim(n)==""?e("#"+t,i,t):(r.removeValidationErrorsFor(t),h.summaryValidMode&&(o=!0),!0)}function g(t,i){var u=$.trim(t);if(u=="")return e("#"+i,"EmailEmpty",i);if(n.Util.isValidEmailAddress(u)){if(u.indexOf("info@")===0)return e("#"+i,"EmailInfo",i);r.removeValidationErrorsFor(i);h.summaryValidMode&&(o=!0)}else return e("#"+i,"EmailInvalid",i);return!0}function p(n){var t=new RegExp("^[a-zA-ZàáâäãåąčćęèéêëėįìíîïłńòóôöõøùúûüųūÿýżźñçčšžÀÁÂÄÃÅĄĆČĖĘÈÉÊËÌÍÎÏĮŁŃÒÓÔÖÕØÙÚÛÜŲŪŸÝŻŹÑßÇŒÆČŠŽ∂ð ,.'-]+$");return t.test(n)}function w(n){return/\d/.test(n)}var s=[],o,v,f,y,b,a;if(r.clearValidation(),o=!1,v="",u?(o=u=="step-2-button"||u=="signup-step2",h.summaryValidMode=h.summaryValidMode||o):v+=t.getEventOriginId(i),c(r.signUp.firstName,"SignUpFirstName","FirstNameEmpty")&&c(r.signUp.lastName,"SignUpLastName","LastNameEmpty")&&c(r.signUp.password,"SignUpPassword","PasswordEmpty")&&c(r.signUp.email,"SignUpEmail2","EmailEmpty")){if(f=!0,p(r.signUp.firstName)||(w(r.signUp.firstName)?f=f&&e("#SignUpFirstName","FirstNameContainsNumbers","SignUpFirstName"):$.trim(r.signUp.firstName)!=""&&(f=f&&e("#SignUpFirstName","FirstNameContainsInvalidChars","SignUpFirstName"))),p(r.signUp.lastName)||(w(r.signUp.lastName)?f=f&&e("#SignUpLastName","LastNameContainsNumbers","SignUpLastName"):$.trim(r.signUp.lastName)!=""&&(f=f&&e("#SignUpLastName","LastNameContainsInvalidChars","SignUpLastName"))),r.signUp.password.length>0&&r.signUp.password.length<4&&(f=f&&e("#SignUpPassword","PasswordTooWeak","SignUpPassword")),f=f&&g($("#SignUpEmail2").val(),"SignUpEmail2"),!f)return!1}else return!1;if(r.signUp.genderCV.length===0){if(!e("#SignUpGender","GenderCVEmpty","SignUpGender"))return!1}else r.removeValidationErrorsFor("SignUpGender"),$("#SignUpGender").parent().removeClass("error");if(r.signUp.acceptGeneralConditions)r.removeValidationErrorsFor("SignUpAcceptGeneralConditions"),$("#SignUpGeneralConditions").parent().removeClass("error");else if(!e("#SignUpGeneralConditions","MustAgree","SignUpAcceptGeneralConditions"))return!1;if(r.signUp.acceptPrivacyPolicy)r.removeValidationErrorsFor("SignUpAcceptPrivacyPolicy"),$("#SignUpPrivacyPolicy").parent().removeClass("error");else if(!e("#SignUpPrivacyPolicy","MustAgree","SignUpAcceptPrivacyPolicy"))return!1;if(r.signUp.acceptCookiePolicy)r.removeValidationErrorsFor("SignUpAcceptCookiePolicy"),$("#SignUpCookiePolicy").parent().removeClass("error");else if(!e("#SignUpCookiePolicy","MustAgree","SignUpAcceptCookiePolicy"))return!1;y=!1;for(b in s)if(s.hasOwnProperty(b)){y=!0;break}if(!y)return r.removeValidationError(),!0;var l=null,k=$("<div>"),d=$("<ul class='error-messages'>");for(a in{"#SignUpGender":null,"#SignUpFirstName":null,"#SignUpLastName":null,"#SignUpPassword":null,"#SignUpEmail2":null})$.trim(s[a])!=""&&(l=l||$(a),$("<li class='error-message'>").text("- "+s[a]).appendTo(d));return d.appendTo(k),r.removeSignUpPopovers(),l!=null&&r.showValidationPopover(l,k),!1};r.goToForgotPassword=function(){r.signIn.email.length>0?h.postForgotPassword(r,!0):h.showForgotPasswordView(r,!1)};r.submitForgotPassword=function(){r.forgotPasswordMessage="";r.validateForgotPassword()&&(r.clearValidation(),r.removeValidationError(),h.postForgotPassword(r,!1))};r.validateForgotPassword=function(){r.clearValidation();var t=$.trim(r.signIn.email);return t==""?(r.validationErrorsFor("#ForgotPasswordEmail",r.getErrorString("EmailEmpty"),null,"#ForgotPasswordEmail"),$("#ForgotPasswordEmail").parent().addClass("error"),!1):n.Util.isValidEmailAddress(t)?(r.removeValidationErrorsFor("#ForgotPasswordEmail"),!0):(r.validationErrorsFor("#ForgotPasswordEmail",r.getErrorString("EmailInvalid"),null,"#ForgotPasswordEmail"),$("#ForgotPasswordEmail").parent().addClass("error"),!1)};r.submitResetPassword=function(){if(r.validateResetPassword()){r.clearValidation();r.removeValidationError();var i=window.location.pathname,t=i.split("/"),u=t[t.length-1],f="/"+n.Settings.Culture+"/Authentication/ResetPassword";$.ajax({type:"POST",headers:{"X-Requested-With":"XMLHttpRequest"},data:JSON.stringify({password:r.reset.password,hash:u}),contentType:"application/json; charset=utf-8",url:f,success:function(t){t.Status=="Success"?($.removeCookie(n.authentication.PasswordHelperCookieName,{path:"/"}),$.ajax({type:"POST",headers:{"X-Requested-With":"XMLHttpRequest"},data:JSON.stringify({loginToken:t.LoginToken}),contentType:"application/json; charset=utf-8",url:l,success:function(t){t.Status=="Success"&&($.removeCookie(n.authentication.SiSuCookieName,{path:"/"}),location.href="/"+n.Settings.Culture)}})):(r.validationErrorsFor("#ResetNewPassword",t.Message,null,"#ResetNewPassword"),$("#ResetNewPassword").parent().addClass("error"),$("#signup-reset-password .validation-box").addClass("error"))}})}};r.validateResetPassword=function(){return(r.clearValidation(),$.trim(r.reset.password)=="")?(r.validationErrorsFor("#ResetNewPassword",r.getErrorString("PasswordEmpty"),null,"#ResetNewPassword"),$("#ResetNewPassword").parent().addClass("error"),!1):r.reset.password.length<4?(r.validationErrorsFor("#ResetNewPassword",r.getErrorString("PasswordTooWeak"),null,"#ResetNewPassword"),$("#ResetNewPassword").parent().addClass("error"),!1):r.reset.password!=r.reset.passwordRepeat?($("#ResetNewPassword").parent().addClass("error"),$("#ResetPasswordRepeat").parent().addClass("error"),!1):(r.removeValidationError(),!0)};r.validationErrorsFor=function(n,t,i,u){t!=""?($(".validation-box").show(),$(".validation-box p").html(t),u!=null?$(".validation-box").addClass(u.replace("#","")):$(".validation-box").addClass(n.replace("#","")),$(".error input:first").focus()):r.removeValidationError()};r.removeValidationErrorsFor=function(n){$(".validation-box."+n.replace("#","")).hide()};r.removeValidationError=function(){$(".validation-box").hide()};r.clearValidation=function(){$("#SignUpGender").parent().removeClass("error");$("#SignUpEmail2").parent().removeClass("error");$("#SignUpFirstName").parent().removeClass("error");$("#SignUpLastName").parent().removeClass("error");$("#SignUpPassword").parent().removeClass("error");$("#SignUpAcceptLicenseAgreement").removeClass("error");$("#SignInEmail").parent().removeClass("error");$("#SignInPassword").parent().removeClass("error");$("#ResetNewPassword").parent().removeClass("error");$("#ResetPasswordRepeat").parent().removeClass("error")};r.addErrorClass=function(n){$(n).parent().addClass("error")};r.getErrorString=function(n){return n&&n.length>0?$("#signup-box").data("error"+n.charAt(0).toUpperCase()+n.slice(1).toLowerCase()):""};r.fbSignUp=function(i){var u=t.getEventOrigin(i).closest(".btn");e.FB&&e.FB.login(function(t){var i=this,f;t.status=="connected"&&t.authResponse&&(f={FacebookId:t.authResponse.userID,AccessToken:t.authResponse.accessToken,Country:r.currentCountryIso,Referral:r.signInSignUpData},h.blockInput(),$.ajax({type:"POST",headers:{"X-Requested-With":"XMLHttpRequest"},data:JSON.stringify(f),contentType:"application/json; charset=utf-8",url:"/"+n.Settings.Culture+"/authentication/facebook",success:function(n){if(n.Status=="Success"){var t=null;n.AcqChan&&(t={acqChan:n.AcqChan,refSrc:n.RefSrc});$.ajax({type:"POST",headers:{"X-Requested-With":"XMLHttpRequest"},data:JSON.stringify({loginToken:n.LoginToken}),contentType:"application/json; charset=utf-8",url:l,success:function(n){n.Status=="Success"&&(t&&$.cookie("newMemberAcq",JSON.stringify(t),{path:"/",expires:1}),h.closeAndNavigate(r,n.User))},complete:h.deblockInput})}else h.initFacebook(e,r),h.deblockInput(),n.Status=="AccountAlreadyLinkedToFacebook"?i.showPopover(u,"#popover-snfalreadylinked"):n.Status=="FacebookEmailRequired"&&i.showPopover(u,"#popover-snfemailrequired")},error:h.deblockInput}))},{scope:"email,public_profile"})};r.closeSnapPreMigrationInfo=function(){r.showSnapPreMigrationInfo=!1};r.closeVPPreMigrationInfo=function(){r.showVPPreMigrationInfo=!1};r.$watch("signUp.firstName",function(n){r.signUp.firstName=n?n.charAt(0).toUpperCase()+n.substr(1):""});r.$watch("signUp.lastName",function(n){n&&(r.signUp.lastName=n.match(/^[a-zA-Z-]+$/)?n?n.charAt(0).toUpperCase()+n.substr(1):"":n?n.charAt(0).toLowerCase()+n.substr(1):"")})}return t.prototype.showPopover=function(n,t){n.popover({html:!0,placement:"bottom",popoverClass:"red slim",trigger:"manual",content:$(t).html(),container:"#signup-box"});n.popover("show");setTimeout(window.AppleID.auth.renderButton,100)},t.prototype.initBehaviors=function(n){function i(n,i){n.keydown(function(){t.checkMaxLength(this,i)});n.keyup(function(){t.checkMaxLength(this,i)})}var h=$("#F, #M"),r,u,f,e,o,s;h.change(function(t){n.validateStep2(t,null)});r=$("#SignUpFirstName");i(r,255);r.change(function(t){n.validateStep2(t,null)});u=$("#SignUpLastName");i(u,255);u.change(function(t){n.validateStep2(t,null)});f=$("#SignUpPassword");i(f,50);f.change(function(t){n.validateStep2(t,null)});e=$("#SignUpEmail2");i(e,255);e.change(function(t){n.validateStep2(t,null)});o=$("#SignInEmail");i(o,255);o.change(function(t){n.validateLogin(t)});s=$("#SignInPassword");i(s,255);s.change(function(t){n.validateLogin(t)});i($("#ResetNewPassword"),50);i($("#ResetPasswordRepeat"),50);$("input[type='image']").css("cursor","pointer")},t.prototype.initActions=function(n){$("#signup-box #signup-login").submit(function(t){return n.submitLogin(t),!1});$("#signup-box #signup-step2").submit(function(i){return n.submitStep2(i,t.getEventOriginId(i)),!1});$("#signup-box #signup-forgot-password").submit(function(t){return n.submitForgotPassword(t),!1});$("#signup-box #signup-reset-password").submit(function(t){return n.submitResetPassword(t),!1})},t.prototype.initFacebook=function(){},t.prototype.getCrossDomainReferrals=function(){var i=$.cookie(n.authentication.SiSuCookieName),r;if(!i||i=="")return[];var t=window.location.protocol+"//"+window.location.host,u=t.lastIndexOf("."),f=t,e=t,o=t;return u>0&&(f=t.substring(0,u)+".be",e=t.substring(0,u)+".nl",o=t.substring(0,u)+".lu"),r=[],t!=f&&r.push({url:f+"/RefC?sisu="+i}),t!=e&&r.push({url:e+"/RefC?sisu="+i}),t!=o&&r.push({url:o+"/RefC?sisu="+i}),r},t.prototype.postPasswordHelp=function(t,i){function r(){$("#SignInPassword").popover({html:!0,placement:"top",popoverClass:"blue slim",trigger:"manual",content:$("#popover-pwhelpsent").html(),container:"#signup-login"});$("#SignInPassword").popover("show");$("#forgot-password-link").hide()}if(i){var u="/"+n.Settings.Culture+"/Authentication/PasswordHelp";$.ajax({type:"POST",headers:{"X-Requested-With":"XMLHttpRequest"},data:JSON.stringify({email:t.signIn.email}),contentType:"application/json; charset=utf-8",url:u,success:function(n){n.Status=="Success"&&r()}})}else r()},t.prototype.gotoLoginForExistingMember=function(n,t){if(t===void 0&&(t=null),n.signIn.email=n.signUp.email,n.signIn.password="",n.goToLogin(null),$("#SignInPassword").focus(),t=="snap")n.showSnapPreMigrationInfo=!0;else if(t=="vp")n.showVPPreMigrationInfo=!0;else{n.view="login";var i=this;setTimeout(function(){i.summaryValidMode=!0;$("#SignInEmail").parent().addClass("error");var t=$("<div>"),r=$("<ul class='error-messages'>");$("<li class='error-message'>").text("- "+n.getErrorString("AlreadyMember")).appendTo(r);r.appendTo(t);n.showValidationPopover($("#SignInEmail"),t)},1e3)}},t.prototype.postForgotPassword=function(t,i){var u="/"+n.Settings.Culture+"/Authentication/ForgotPassword",r=this;r.blockInput();$.ajax({type:"POST",headers:{"X-Requested-With":"XMLHttpRequest"},data:JSON.stringify({email:t.signIn.email,"try":i}),contentType:"application/json; charset=utf-8",url:u,success:function(n){t.$apply(function(){n.Status=="Success"?(t.forgotPasswordMessage=n.Message,i&&r.showForgotPasswordView(t,!0)):i?r.showUnknownAccountPopover(t):(t.validationErrorsFor("#ForgotPasswordEmail",n.Message),$("#ForgotPasswordEmail").parent().addClass("error"),$("#signup-forgot-password .validation-box").addClass("error"))})},complete:r.deblockInput})},t.prototype.showForgotPasswordView=function(n){n.view="forgotPassword";n.clearBoxForms(event);n.summaryValidMode=!1;$("#signup-forgot-password .validation-box").hide()},t.prototype.showUnknownAccountPopover=function(n){$("#cancel-login").popover({html:!0,placement:"top",popoverClass:"red slim",trigger:"manual",content:$("#popover-unknownuser").html(),container:"#signup-login"});$("#cancel-login").popover("show");n.signUp.email=n.signIn.email},t.prototype.showClosedAccountPopover=function(n){$("#cancel-login").popover({html:!0,placement:"top",popoverClass:"red slim",trigger:"manual",content:$("#popover-closedaccount").html(),container:"#signup-login"});$("#cancel-login").popover("show");n.signUp.email=n.signIn.email},t.prototype.blockInput=function(){$("#signup-box .block-overlay").show()},t.prototype.deblockInput=function(){$("#signup-box .block-overlay").hide()},t.prototype.closeAndNavigate=function(t,i){var f=undefined,e,r,o,u;if(i)try{e=JSON.parse(i);f=e.Language}catch(s){}$.removeCookie(n.authentication.SiSuCookieName,{path:"/"});r=t.signInSignUpData&&t.signInSignUpData.ReturnUrl?t.signInSignUpData.ReturnUrl:location.href;f&&(o=new RegExp("^(.*//[^/]*)?/[^/]*(/?.*)"),u=r.match(o),u&&(r=(u[1]||"")+"/"+f+u[2]));location.href==r?location.reload():location.href=r},t.onLightboxBlock=function(){var t,n,i,r;$(this).css("left",($(window).width()-$(this).find(".lightbox-popup").width())/2+"px");t=($(window).height()-$(this).find(".lightbox-popup").height())/2;$(this).css("top",t+"px");n=$(this).find(".lightbox-popup").offset().top+$(this).find(".lightbox-popup").height()-($(window).scrollTop()+$(window).height());n>0&&(i=$(this).find(".lightbox-popup").offset().top-$(window).scrollTop(),r=Math.min(i,n),$(this).offset({top:$(this).offset().top-r,left:$(this).offset().left}))},t.getEventOrigin=function(n){return n.srcElement?$(n.srcElement):n.target?$(n.target):void 0},t.getEventOriginId=function(n){return n.srcElement?n.srcElement.id:n.target?n.target.id:void 0},t.checkMaxLength=function(n,t){var i=$(n).val();i.length>t&&$(n).val(i.substr(0,t))},t.$inject=["$rootScope","$scope","$route","$location","$window","$q","$cal"],t}(),i;n.authenticationCtrl=t;i=angular.module("authentication",["shop"]);i.controller("authenticationCtrl",t)}(Vex||(Vex={}));shopModule.controller("Vex.authenticationCtrl",Vex.authenticationCtrl),function(n){var t;(function(t){function u(){n.Storage.getUserData("acc",function(t){var f=$("#loyalty-subscription-overlay-wrapper"),u=t.LoyaltySubscriptionData,c=$("#loyalty-subscription-popover").html(),o,s,e,h;u&&(u.IsDeclinedByUser||(o=f.find(".segment-container"),o.append(r("#loyalty-overview .segment-container .segment-div."+f.data("currentSegmentName"))),s=r("#loyalty-overview .segment-container .segment-div.goldplus"),o.append(s),$("body").append(f),f.fadeIn(500),u.IsActive&&jQuery.ajax({url:"/"+n.Settings.Culture+"/Account/MarkCurrentLoyaltySubscriptionAsShown/"+u.CurrentSubscriptionId,type:"post"}),e=function(){f.fadeOut()},$("#loyalty-subscription-overlay").click(e),h=i(s.find(".popover-positioner"),c,"#loyalty-subscription-overlay-wrapper .segment-container"),h.find(".close").click(e),h.find(".no-thanks").click(function(){e();jQuery.ajax({url:"/"+n.Settings.Culture+"/Account/DeclineCurrentLoyaltySubscription/"+u.CurrentSubscriptionId,type:"post"})})),u.IsActive&&u.IsExpirationWarning&&!u.IsRenewed&&i($("#loyalty-overview .segment-div.goldplus .popover-positioner"),c,"#main-container"))})}function i(n,t,i){var r=n.popover({html:!0,placement:"topRight",container:i,content:t,animation:!1,delay:0,trigger:"manual"}),u=r.data("popover").tip();return u.addClass("white narrow no-border"),r.popover("show"),$(window).resize(function(){r.popover("show")}),u}function r(n){var r=$(n),t=r.clone(),i;return t.css("position","absolute"),t.offset(r.offset()),$(window).resize(function(){t.offset(r.offset())}),i=t.find(".content-border"),i.css("border-color","white"),i.append(t.find("a.internal").removeClass("hide")),i.append("<div class='clearfix'><\/div>"),t}function f(i){var v,p,w;t.numberBarWidth=$(".remain-bar .number-container").width();var r=$("#loyalty-overview .top-bar"),e=$(".remain-bar"),l=$(".progress-bar .number-container .number"),a=$(".remain-bar .number-container .number"),f=+r.data("pointsMin"),o=+r.data("pointsMax"),h=o-f,s=Math.max(+r.data("pointsPrevious"),i),b=s,u=+r.data("pointsCurrent"),c=u>=f,y=r.data("segment")=="G"&&u>=o||r.data("segment")=="U"||r.data("segment")=="PGP"||r.data("forceFullBar");return y?r.addClass("final-gold"):c||(r.addClass("not-reached"),o=f,f=0,h=o-f),u<=i?(v=100-(u-f)*100/h,a.html((o-u).toString()),l.html(""+u),e.width(v/100*t.minWidth),y||n.LoyaltyOverview.checkRemaining(v,e,c),r.show()):(p=100-(s-f)*100/h,a.html((o-s).toString()),l.html(s.toString()),e.width(p/100*t.minWidth),w=y||n.LoyaltyOverview.checkRemaining(p,e,c),r.show(),setTimeout(function(){var i=Math.log(u-s)*500;$({totalPoints:s}).animate({totalPoints:u},{duration:i,easing:"swing",step:function(){var i=Math.round(this.totalPoints),u=o-i,r=100-(i-f)*100/h;a.html(u.toString());l.html(i.toString());w||(w=n.LoyaltyOverview.checkRemaining(r,e,c,!0));e.width(r/100*t.minWidth)},complete:function(){var i=o-u,r=100-(u-f)*100/h;a.html(i.toString());l.html(u.toString());e.width(r/100*t.minWidth);n.LoyaltyOverview.checkRemaining(v,e,c)}})},1e3)),u}function e(n,i,r,u){if(u===void 0&&(u=!1),n/100*t.minWidth<t.numberBarWidth){if(u){var f,e;r?(f={backgroundColor:"#F6F6F6",color:"#FFFFFF",backgroundPosition:-i.width()},e=function(){$(".remain-bar").css("filter","none")},$(".progress-bar .arrow").animate({borderTopColor:"#F6F6F6",borderBottomColor:"#F6F6F6"})):(f={color:"#FFFFFF"},e=null);$(".progress-bar .number-container").fadeOut();$(".remain-bar .number-container").animate({left:-t.numberBarWidth-22});$(".remain-bar").animate(f,{complete:e})}else r&&($(".progress-bar .arrow").css("border-top-color","#F6F6F6").css("border-bottom-color","#F6F6F6"),$(".remain-bar").css("background-color","#F6F6F6").css("background-position",-i.width()).css("filter","none")),$(".progress-bar .number-container").hide(),$(".remain-bar .number-container").css("left",-t.numberBarWidth-22),$(".remain-bar").css("color","#FFFFFF");return!0}return!1}n.Modules.register("LoyaltyOverview",{documentLoading:function(){},documentReady:function(t){var i=t(".vexxie-text"),r=parseInt(t(".vexxie-points-data").text());r==1||n.Settings.Culture=="fr"&&r==0?i.html(i.data("singular")):i.html(i.data("plural"));t(".alert.alert-info.darkblue").slideDown();n.Storage.getItemLF("loyalty.lastPointsSeen",function(t){t||(t=0);t=n.LoyaltyOverview.displayProgress(t);n.Storage.setItemLF("loyalty.lastPointsSeen",t.toString(),31536e3);n.LoyaltyOverview.displayLoyaltySubscriptionData()})}});t.minWidth=824;t.maxWidth=0;t.numberBarWidth=134;t.displayLoyaltySubscriptionData=u;t.addGoldPlusPopover=i;t.putSegmentOverOverlay=r;t.displayProgress=f;t.checkRemaining=e})(t=n.LoyaltyOverview||(n.LoyaltyOverview={}))}(Vex||(Vex={})),function(n){var t;(function(){n.Modules.register("ContactOverview",{documentLoading:function(){},documentReady:function(t){n.Storage.getUserData("acc",function(n){n!=null&&(n.LoyaltySegmentCV=="G"||n.LoyaltySegmentCV=="U"||n.LoyaltySegmentCV=="PGP")&&t("#callme-block").show()})}})})(t=n.ContactTickets||(n.ContactTickets={}))}(Vex||(Vex={})),function(n){var t=function(){function n(){}return n}(),i,r;n.CallSlotButton=t;i=function(){function i(i){function f(i){var u,r,f;if(i!=null&&i!=undefined){if(u=$(".callslot-buttons"),r=new t,r.callSlotId=i.CallSlotId,r.callSlotCV=i.CallSlotCV,r.slotDateTime=i.SlotDateTime,r.text="",f=Math.ceil((r.slotDateTime.getTime()-(new Date).getTime())/864e5),f==0)r.text+=u.data("callmetoday");else if(f==1)r.text+=u.data("callmetommorow");else if(f<7)switch(r.slotDateTime.getDay()){case 0:r.text+=u.data("callmesunday");break;case 1:r.text+=u.data("callmemonday");break;case 2:r.text+=u.data("callmetuesday");break;case 3:r.text+=u.data("callmewednesday");break;case 4:r.text+=u.data("callmethursday");break;case 5:r.text+=u.data("callmefriday");break;case 6:r.text+=u.data("callmesaturday")}else r.text+=n.Util.getDateInddmmyyyyFormat(r.slotDateTime);r.text+=" ";switch(r.callSlotCV){case"FN":r.text+=u.data("forenooncallhours");break;case"NO":r.text+=u.data("nooncallhours");break;case"AN":r.text+=u.data("afternooncallhours")}return r}return null}function u(n){if(n==null||n=="")return null;var t=parseInt(n,10);return t>0?t:null}var r=this;r.$scope=i;r.$scope.showPopup=function(){r.$scope.step=1;r.$scope.callRequestComplete=!1;$.ajax({type:"GET",url:"/"+n.Settings.Culture+"/help/getcallmerequestdata",converters:{"text json":function(t){return JSON.parse(t,n.Util.jsonDateTimeReviver)}},success:function(t){var i,u;if(r.$scope.saleId=null,r.$scope.cartId=null,r.$scope.bookingKey=null,r.$scope.callSlot=null,r.$scope.callSlotButtons=[],r.$scope.errorOccured=!1,r.$scope.userTriedSubmitting=!1,t!=undefined&&t!=null){if(r.$scope.phone=t.Phone,r.$scope.topics=t.Topics,r.$scope.selectedTopicId=null,r.$scope.sales=t.Sales,r.$scope.sales!=undefined&&r.$scope.sales!=null&&r.$scope.sales.length>0&&(r.$scope.saleId=r.$scope.sales[0].SaleId.toString()),r.$scope.carts=t.Carts,r.$scope.carts!=undefined&&r.$scope.carts!=null&&r.$scope.carts.length>0&&(r.$scope.cartId=r.$scope.carts[0].CartId.toString()),r.$scope.bookings=t.Bookings,r.$scope.bookings!=undefined&&r.$scope.bookings!=null&&r.$scope.bookings.length>0&&(r.$scope.bookingKey=r.$scope.bookings[0].BookingKey),t.CallSlots!=undefined&&t.CallSlots!=null)for(i=0;i<t.CallSlots.length;i++)r.$scope.callSlotButtons.push(f(t.CallSlots[i]));if(t.ExistingCallRequestId!=undefined&&t.ExistingCallRequestId!=null&&t.ExistingCallRequestId!=0){r.$scope.hasExistingCallRequest=!0;r.$scope.existingCallContactTopicTitle=t.ExistingCallContactTopicTitle;r.$scope.existingCallCreationDate=t.ExistingCallCreationDate;r.$scope.existingCallCreationDateString=n.Util.getDateInddmmyyyyFormat(r.$scope.existingCallCreationDate);r.$scope.existingCallSlotCV=t.ExistingCallSlotCV;r.$scope.existingCallSlotDate=t.ExistingCallSlotDate;r.$scope.existingCallSlotDateTimeString=n.Util.getDateInddmmyyyyFormat(r.$scope.existingCallSlotDate)+" ";u=$(".callslot-buttons");switch(r.$scope.existingCallSlotCV){case"FN":r.$scope.existingCallSlotDateTimeString+=u.data("forenooncallhours");break;case"NO":r.$scope.existingCallSlotDateTimeString+=u.data("nooncallhours");break;case"AN":r.$scope.existingCallSlotDateTimeString+=u.data("afternooncallhours")}r.$scope.existingCallRequestId=t.ExistingCallRequestId}n.Util.showLightbox(667,545,n.LightboxModalMode.Full,{message:$("#call-me-popup")})}r.$scope.$apply()}})};r.$scope.pickCallSlot=function(n){r.$scope.callSlot=n};r.$scope.close=function(){$.unblockUI()};r.$scope.previous=function(){r.$scope.step=1};r.$scope.next=function(){r.$scope.phone!=undefined&&r.$scope.phoneOk&&r.$scope.selectedTopicId!=null&&$.trim(r.$scope.selectedTopicId)!=""?(r.$scope.step=2,r.$scope.userTriedSubmitting=!1):r.$scope.userTriedSubmitting=!0};r.$scope.confirm=function(){var t;if(r.$scope.phone!=undefined&&r.$scope.phoneOk&&r.$scope.selectedTopicId!=null&&$.trim(r.$scope.selectedTopicId)!=""&&r.$scope.callSlot!=undefined){t=_.filter(r.$scope.topics,{TopicId:parseInt(r.$scope.selectedTopicId,10)})[0];var i=t.IsSaleRelated?u(r.$scope.saleId):null,f=t.IsOrderRelated?u(r.$scope.cartId):null,e=t.IsBookingRelated?r.$scope.bookingKey:null;r.$scope.cartId!=undefined&&r.$scope.cartId!=""&&t.IsOrderRelated?r.$scope.cartId:null;$.ajax({type:"POST",data:JSON.stringify({callSlotId:r.$scope.callSlot.callSlotId,saleId:i,cartId:f,bookingKey:e,topicId:t.TopicId,phone:r.$scope.phone}),contentType:"application/json; charset=utf-8",url:"/"+n.Settings.Culture+"/help/CreateCallMeRequest",success:function(n){n!=undefined&&n.success!=undefined&&n.success==!0?(r.$scope.callRequestComplete=!0,r.$scope.$apply()):n.exception!=undefined&&(r.$scope.errorOccured=!0,console.log("Exception occured while trying to create call me request: "+n.exception))}})}else r.$scope.userTriedSubmitting=!0};r.$scope.$watch("phone",function(n){if(n!=undefined&&n!=null){var t=n.replace(/\D/g,"");r.$scope.phoneOk=t.length<12&&t.length>6?!0:!1}else r.$scope.phoneOk=!1});r.$scope.getDateInddmmyyyyFormat=n.Util.getDateInddmmyyyyFormat}return i.$inject=["$scope"],i}();n.callMeCtrl=i;r=angular.module("help",["shop","ngRoute"]);r.controller("Vex.callMeCtrl",n.callMeCtrl)}(Vex||(Vex={})),function(n){var t={landingPageTargetViewAfterSignup:{"default":"Default",homepageAll:"All",homepageWoman:"Woman",homepageMen:"Men",homepageKids:"Kids",homepageLifestyle:"Lifestyle",mostWanted:"Mostwanted",travel:"Travel",thematic:"Thematic"}},i=function(){function i(i,r,u){function h(u,e){$.ajax({type:"POST",headers:{"X-Requested-With":"XMLHttpRequest"},data:JSON.stringify({loginToken:u}),contentType:"application/json; charset=utf-8",url:s,success:function(u){if(u.Status=="Success"){$.cookie(n.authentication.MarketingLandingPageCookieName,"",{path:"/",expires:new Date(1900,1,1)});$.cookie("newMemberAcq",JSON.stringify(e),{path:"/",expires:1});$.removeCookie(n.authentication.SiSuCookieName,{path:"/"});switch((i.targetViewAfterSignupCV||"").trim()){case t.landingPageTargetViewAfterSignup.homepageAll:r.location.href="/"+n.Settings.Culture+"#/";break;case t.landingPageTargetViewAfterSignup.homepageKids:r.location.href="/"+n.Settings.Culture+"#/kids";break;case t.landingPageTargetViewAfterSignup.homepageLifestyle:r.location.href="/"+n.Settings.Culture+"#/lifestyle";break;case t.landingPageTargetViewAfterSignup.homepageMen:r.location.href="/"+n.Settings.Culture+"#/men";break;case t.landingPageTargetViewAfterSignup.homepageWoman:r.location.href="/"+n.Settings.Culture+"#/women";break;case t.landingPageTargetViewAfterSignup.mostWanted:r.location.href="/"+n.Settings.Culture+"#/trending";break;case t.landingPageTargetViewAfterSignup.travel:r.location.href="/"+n.Settings.Culture+"#/travel";break;case t.landingPageTargetViewAfterSignup.thematic:r.location.href="/"+n.Settings.Culture+"#/thematic";break;default:r.location.href=i.saleId?"/"+n.Settings.Culture+"/sale-qsl"+i.saleId:"/"+n.Settings.Culture}}},complete:f.deblockInput})}function c(n){if(n.Status=="Success"){var t=null;n.AcqChan&&(t={acqChan:n.AcqChan,refSrc:n.RefSrc});h(n.LoginToken,t)}else f.initFacebook(r),f.deblockInput()}function l(n){if(n.Status=="Success"){var t={acqChan:n.AcqChan,refSrc:n.RefSrc};h(n.LoginToken,t)}else f.deblockInput(),i.$apply(function(){n.Status=="AlreadyMember"?($("#login").popover({html:!0,placement:"bottom",popoverClass:"red slim",trigger:"manual",content:$("#popover-alreadymember").html(),container:".signup-box"}),$("#login").popover("show")):n.Status=="InfoAddressError"&&($("#SignUpEmail").popover({html:!0,placement:"top",popoverClass:"red slim",trigger:"manual",content:$("#popover-infoaddress").html(),container:".signup-box"}),$("#SignUpEmail").popover("show"))})}var f=this,s,e,o;if(i.signUp={},i.signUp.genderCV="F",f.initFacebook(r),s="/"+n.Settings.Culture+"/Authentication/SignIn",i.saleId=$(".lp-box").data("sale"),e=f.getLandingPageId(),i.backgroundUrl="url('"+n.Settings.ImgRoot+"Site/LandingPages/"+e+"/Visuals/"+n.Settings.LanguageIso+"/desktopBackground.png')",e&&(i.adUrl=n.Settings.ImgRoot+"Site/LandingPages/"+e+"/Visuals/"+n.Settings.LanguageIso+"/desktopAd.png"),o=$.cookie(n.authentication.SiSuCookieName),o)try{i.referral=JSON.parse($.base64Decode(o))}catch(a){i.referral=null}i.setTargetViewAfterSignup=function(n){i.targetViewAfterSignupCV=n};i.loadLandingPageData=function(){function t(){$("div.blockUI.blockOverlay").addClass("lp-dialog-bg")}if(e){t();var r="/"+n.Settings.Culture+"/Sale/SaleLandingPageData?landingPageId="+e;$.ajax({type:"GET",url:r,success:function(n){t();i.showFooter=n.ShowFooter;i.headerText=n.HeaderText;i.footerText=u.trustAsHtml(n.FooterText);i.targetViewAfterSignupCV=(n.TargetViewAfterSignupCV||"").trim()}})}};i.submit=function(){if(event.preventDefault&&event.preventDefault(),event.returnValue=!1,f.validateInput(i.signUp,f,i)){var t={Email:i.signUp.email,FirstName:i.signUp.firstName,LastName:i.signUp.lastName,Password:i.signUp.password,GenderCV:i.signUp.genderCV,HasUndisclosedGender:!1,Country:n.Settings.Culture,AcceptLicenseAgreement:!0,Referral:i.referral,IncomingReferrer:null,IsMobile:!1,UseGenderDefault:!0,Captcha:null},r=function(i){t.Captcha=i;$.ajax({type:"POST",headers:{"X-Requested-With":"XMLHttpRequest"},data:JSON.stringify(t),contentType:"application/json; charset=utf-8",url:"/"+n.Settings.Culture+"/Registration/Step2",success:l})};$("#recaptcha").length>0?(window.onSubmitRecaptcha=r,grecaptcha.execute()):r(null)}return!1};i.fbSignUp=function(){r.FB.login(function(t){if(t.status=="connected"&&t.authResponse){var r={FacebookId:t.authResponse.userID,AccessToken:t.authResponse.accessToken,Country:n.Settings.Culture,Referral:i.referral};f.blockInput();$.ajax({type:"POST",headers:{"X-Requested-With":"XMLHttpRequest"},data:JSON.stringify(r),contentType:"application/json; charset=utf-8",url:"/"+n.Settings.Culture+"/authentication/facebook",success:c,error:f.deblockInput})}},{scope:"email,public_profile"})};i.fbSignUp=function(){r.FB.login(function(t){if(t.status=="connected"&&t.authResponse){var r={FacebookId:t.authResponse.userID,AccessToken:t.authResponse.accessToken,Country:n.Settings.Culture,Referral:i.referral};f.blockInput();$.ajax({type:"POST",headers:{"X-Requested-With":"XMLHttpRequest"},data:JSON.stringify(r),contentType:"application/json; charset=utf-8",url:"/"+n.Settings.Culture+"/authentication/facebook",success:c,error:f.deblockInput})}},{scope:"email,public_profile"})}}return i.prototype.initFacebook=function(){},i.prototype.blockInput=function(){$(".signup-box .block-overlay").show()},i.prototype.deblockInput=function(){$(".signup-box .block-overlay").hide()},i.prototype.validateInput=function(n,t,i){var r=[];return n.firstName?$("#SignUpFirstName").closest(".control-group").removeClass("error"):($("#SignUpFirstName").closest(".control-group").addClass("error"),r.push("firstName")),n.lastName?$("#SignUpLastName").closest(".control-group").removeClass("error"):($("#SignUpLastName").closest(".control-group").addClass("error"),r.push("lastName")),n.email?$("#SignUpEmail").closest(".control-group").removeClass("error"):($("#SignUpEmail").closest(".control-group").addClass("error"),r.push("email")),n.password?n.password.length<4?($("#SignUpPassword").closest(".control-group").addClass("error"),r.push("password"),$("#SignUpPassword").popover({html:!0,placement:"top",popoverClass:"red slim",trigger:"manual",content:$("#popover-badpw").html(),container:".signup-box"}),$("#SignUpPassword").popover("show")):$("#SignUpPassword").closest(".control-group").removeClass("error"):($("#SignUpPassword").closest(".control-group").addClass("error"),r.push("password")),i.signUp.acceptGeneralConditions?$("#GeneralConditions").closest(".control-group").removeClass("error"):($("#GeneralConditions").closest(".control-group").addClass("error"),r.push("generalConditions")),i.signUp.acceptPrivacyPolicy?$("#PrivacyPolicy").closest(".control-group").removeClass("error"):($("#PrivacyPolicy").closest(".control-group").addClass("error"),r.push("privacyPolicy")),i.signUp.acceptCookiePolicy?$("#CookiePolicy").closest(".control-group").removeClass("error"):($("#CookiePolicy").closest(".control-group").addClass("error"),r.push("cookiePolicy")),r.length==0},i.prototype.getLandingPageId=function(){var t=$(".lp-main-bg"),i;return t.length>0?t.data("landingPageId"):$.cookie("mlp")?(i=$.base64Decode($.cookie("mlp")),$.cookie(n.authentication.MarketingLandingPageCookieName,"",{path:"/",expires:new Date(1900,1,1)}),i):void 0},i.$inject=["$scope","$window","$sce"],i}(),r;n.landingPageCtrl=i;r=angular.module("landingpage",["shop"]);r.controller("landingPageCtrl",i);$(document).on("click",function(n){$(".signup-box .popover:visible").length>0&&$(".signup-box .lb-popover-trigger").each(function(){$(this).is(n.target)||$(this).has(n.target).length!==0||$(".popover").has(n.target).length!==0||$(this).popover("destroy")})});$(document).on("click",".popover-content div.close",function(){return $(".signup-box .lb-popover-trigger").popover("destroy"),!1})}(Vex||(Vex={}));shopModule.controller("landingPageCtrl",Vex.landingPageCtrl),function(n){var t;(function(t){var r=angular.module("salelandingpage",["shop"]),i=function(){function t(t,i,r,u,f){n.Sale.Utility.validateSaleTeaser(f,+$("#full-teaser").data("sale-id"))}return t.$inject=["$scope","$rootScope","$route","$location","$sales"],t}();t.LandingPageCtrl=i;r.controller("LandingPageCtrl",i)})(t=n.Sale||(n.Sale={}))}(Vex||(Vex={}));shopModule.controller("Vex.Sale.LandingPageCtrl",Vex.Sale.LandingPageCtrl),function(n){var t;(function(n){var t=function(){function n(n,t){var i=+$("#inner-container").attr("data-saleId");t.getSale(i,!1).then(function(t){n.saleTitle=t.title;n.warningMessage=t.warningMessage})}return n.$inject=["$scope","$sales"],n}();n.HaltedController=t})(t=n.Sale||(n.Sale={}))}(Vex||(Vex={}));shopModule.controller("Vex.Sale.HaltedController",Vex.Sale.HaltedController),function(n){var r=n.Settings.Culture,i=function(){function t(i,r,u,f,e){var c=this,h,o,s;if(e.data){h=e.data.VentePriveePlusValidDate?new Date(parseInt(e.data.VentePriveePlusValidDate.substring(6,e.data.VentePriveePlusValidDate.length-2))):null;o="/"+(e.data.Segment?e.data.Segment:"null");u.path(o);return}if(n.Storage.getUserData("acc",function(n){var u,r;i.userData=angular.extend({},{segment:"null"},e);i.userData.Token=n.Token;for(u in t.ventePriveeDefinitions.pageDefinitions)if(r=t.ventePriveeDefinitions.pageDefinitions[u],r.title.toLowerCase()==i.userData.segment.toLowerCase()){i.pageDefinition=r;break}i.pageDefinition||(i.pageDefinition=t.ventePriveeDefinitions.pageDefinitions[0]);i.$apply()}),($.browser.mobile||env.smallscreen)&&(s=confirm($("#mobile-detected").text()),!s)){window.location.href="//m.vente-exclusive.com";return}}return t.$inject=["$scope","$route","$location","$http","dataUser"],t.resolveUser={dataUser:["$q","$http","$route",function(n,t,i){if(i.current.params.segment||i.current.params.segment==="null"){var r=n.defer();return r.resolve({segment:i.current.params.segment}),r.promise}return t({method:"GET",url:"/mkt/GetVentePriveeUserData"})}]},t.ventePriveeDefinitions={pageDefinitions:[{title:"null",blocks:[{title:"profile",subBlocks:["all2","password_b","all3"]},{title:"orders",subBlocks:["all4","all5","all6",]},{title:"communication",subBlocks:["all7","all8"]}]},{title:"c_hr",blocks:[{title:"profile",subBlocks:["all2","password_a","all3"]},{title:"orders",subBlocks:["all4","all5","all6",]},{title:"communication",subBlocks:["all7","all8"]}]},{title:"u_hr",blocks:[{title:"profile",subBlocks:["all2","password_b","all3"]},{title:"orders",subBlocks:["all4","all5","all6",]},{title:"communication",subBlocks:["all7","all8"]}]},{title:"c_nc",blocks:[{title:"profile",subBlocks:["profile_na","all2","password_a","all3"]},{title:"orders",subBlocks:["all4","all5","all6",]},{title:"communication",subBlocks:["all7","all8"]}]},{title:"c_nc_inactive",blocks:[{title:"profile",subBlocks:["profile_na","all2","password_a","all3"]},{title:"orders",subBlocks:["all4","all5","all6",]},{title:"communication",subBlocks:["all7","all8"]}]},{title:"c_b_bronze",blocks:[{title:"profile",subBlocks:["profile_na","profile_b","all2","password_a","all3"]},{title:"orders",subBlocks:["all4","all5","all6",]},{title:"communication",subBlocks:["all7","all8"]}]},{title:"c_b_silver",blocks:[{title:"profile",subBlocks:["profile_na","profile_s","all2","password_a","all3"]},{title:"orders",subBlocks:["all4","all5","all6",]},{title:"communication",subBlocks:["all7","all8"]}]},{title:"c_b_gold",blocks:[{title:"profile",subBlocks:["profile_na","profile_g","all2","password_a","all3"]},{title:"orders",subBlocks:["all4","all5","all6",]},{title:"communication",subBlocks:["all7","all8"]}]},{title:"u_bp",blocks:[{title:"profile",subBlocks:["profile_na","all2","password_b","all3"]},{title:"orders",subBlocks:["all4","all5","all6",]},{title:"communication",subBlocks:["all7","all8"]}]},{title:"u_bp_inactive",blocks:[{title:"profile",subBlocks:["profile_na","all2","password_b","all3"]},{title:"orders",subBlocks:["all4","all5","all6",]},{title:"communication",subBlocks:["all7","all8"]}]},{title:"u_bb",blocks:[{title:"profile",subBlocks:["profile_na","profile_b","all2","password_b","all3"]},{title:"orders",subBlocks:["all4","all5","all6",]},{title:"communication",subBlocks:["all7","all8"]}]},{title:"u_bs",blocks:[{title:"profile",subBlocks:["profile_na","profile_s","all2","password_b","all3"]},{title:"orders",subBlocks:["all4","all5","all6",]},{title:"communication",subBlocks:["all7","all8"]}]},{title:"u_bg",blocks:[{title:"profile",subBlocks:["profile_na","profile_g","all2","password_b","all3"]},{title:"orders",subBlocks:["all4","all5","all6",]},{title:"communication",subBlocks:["all7","all8"]}]},]},t}(),t;n.ventePriveePageCtrl=i;t=angular.module("ventePriveePage",["shop","ngRoute"]);t.config(["$routeProvider",function(t){t.when("/",{controller:n.ventePriveePageCtrl,templateUrl:"ventePriveePageTemplate",resolve:n.ventePriveePageCtrl.resolveUser}).when("/:segment",{controller:n.ventePriveePageCtrl,templateUrl:"ventePriveePageTemplate",resolve:n.ventePriveePageCtrl.resolveUser}).otherwise({redirectTo:"/"})}]);t.filter("rawHtml",["$sce",function(n){return function(t){return n.trustAsHtml(t)}}]);t.controller("ventePriveePageCtrl",n.ventePriveePageCtrl).directive("questionGroup",["$compile","$timeout",function(n,t){return{restrict:"E",templateUrl:"ventePriveeQuestionGroupTemplate",scope:{ngModel:"="},link:function(i){var u,e,o,r,f;if(i.openBlock=function(n){var r=n.opened,t;for(t in i.subBlocks)i.subBlocks[t].opened=!1;n.opened=!r},u=questionsList[i.ngModel.title],u!=null){i.title=u.title;i.subBlocks=[];i.vpAutoLogin=i.$parent.userData.Token;e=0;for(o in i.ngModel.subBlocks)r=u.subBlocks[i.ngModel.subBlocks[o]],f={tags:r.tags,forceOpened:i.ngModel.title=="profile"&&e<2,compiledTitle:null,title:r.title,compiledContent:null,content:r.content},e++,(r.content.indexOf("{{")>=0||r.content.indexOf("ng-")>=0)&&(f.compiledContent=n("<div> "+r.content+" <\/div>")(i)),(r.title.indexOf("{{")>=0||r.title.indexOf("ng-")>=0)&&(f.compiledTitle=n("<div> "+r.title+" <\/div>")(i)),i.subBlocks.push(f);t(function(){for(var n in i.subBlocks)i.subBlocks[n].compiledContent&&(i.subBlocks[n].content=i.subBlocks[n].compiledContent.html()),i.subBlocks[n].compiledTitle&&(i.subBlocks[n].title=i.subBlocks[n].compiledTitle.html())},10)}}}}])}(Vex||(Vex={}));shopModule.controller("Vex.ventePriveePageCtrl",Vex.ventePriveePageCtrl),function(n){var t;(function(){n.Modules.register("AboutPage",{documentLoading:function(){},documentReady:function(t){t("span.encryemailaddr").each(function(){t(this).removeClass("encryemailaddr");this.innerHTML=n.Util.rot13Decrypt(this.innerHTML)})}})})(t=n.AboutPage||(n.AboutPage={}))}(Vex||(Vex={})),function(n){var t=function(){function t(){this.$popup=$("#motherday-popup");this.$lightboxPopup=this.$popup.find(".lightbox-popup");this.$emailInput=$("#motherday-popup #motherday-email");this.$messageInput=$("#motherday-popup #motherday-message");this.$closeSorry=$("#motherday-popup .sorry-view .close-dialog");!navigator.userAgent.match(/Trident\/7\./)||$("html").addClass("msie");this.$emailInput.focus(function(){$(this).select()});this.$messageInput.focus(function(){$(this).select()})}return t.prototype.checkHasSentGift=function(t){n.Storage.getItem("hasSentMotherdayMail")==="1"&&t?t(!0):$.ajax({url:"/mkt/MotherdayMail/",success:function(i){n.Storage.setItem("hasSentMotherdayMail",i.HasSentMotherdayMail?"1":"0");t&&t(i.HasSentMotherdayMail)}})},t.prototype.checkHasReceivedGift=function(t){n.Storage.getItem("hasReceivedMotherdayMail")==="1"&&t?t(!0):$.ajax({url:"/mkt/MotherdayMailReceived/",success:function(i){n.Storage.setItem("hasReceivedMotherdayMail",i.HasReceivedMotherdayMail?"1":"0");t&&t(i.HasReceivedMotherdayMail)}})},t.prototype.sendEmail=function(t,i){$.ajax({url:"/mkt/MotherdayMail/",type:"POST",dataType:"json",contentType:"application/json;charset=utf-8",data:JSON.stringify({email:t,message:i}),success:function(){n.Storage.setItem("hasSentMotherdayMail","1");n.Util.slideUpPopup()}})},t.prototype.showPopup=function(){this.checkHasSentGift(function(t){this.$popup||(this.$popup=$("#motherday-popup"),this.$lightboxPopup=this.$popup.find(".lightbox-popup"),this.$emailInput=$("#motherday-popup #motherday-email"),this.$messageInput=$("#motherday-popup #motherday-message"),this.$closeSorry=$("#motherday-popup .sorry-view .close-dialog"));t?(this.$popup.find(".front-view, .flip-view").hide(),this.$popup.find(".sorry-view").show()):(this.$popup.find(".front-view, .flip-view").show(),this.$lightboxPopup.removeClass("flipped"));this.$closeSorry.on("click",n.Util.slideUpPopup);n.Util.showLightbox(600,400,n.LightboxModalMode.Semi,{message:this.$popup,unblockFunction:n.Util.slideUpPopup});this.$popup.parent().css("perspective","1200px")})},t}();n.Motherday=t}(Vex||(Vex={}));angular.module("shop").controller("motherdayCtrl",["$scope",function(n){n.imagesPath="/Content/images/_localized/"+Vex.Settings.LanguageIso+"/marketing/motherday/";n.titleImg=n.imagesPath+"title.png";n.subTitleImg=n.imagesPath+"subtitle.png";n.myMessageImg=n.imagesPath+"mymessage.png";n.email="";n.message="";n.emailInvalid=!1;n.$watch("email",function(t,i){Vex.Motherday.instance&&(Vex.Util.isValidEmailAddress(i)?(Vex.Motherday.instance.$emailInput.removeClass("error"),n.emailInvalid=!1):(Vex.Motherday.instance.$emailInput.addClass("error"),n.emailInvalid=!0))});n.cancel=function(){Vex.Motherday.instance.$lightboxPopup.toggleClass("flipped");Vex.Motherday.instance.$emailInput.focus()};n.next=function(){if(!Vex.Util.isValidEmailAddress(n.email)){Vex.Motherday.instance.$emailInput.addClass("error");n.emailInvalid=!0;return}n.emailInvalid=!1;Vex.Motherday.instance.$emailInput.removeClass("error");n.message==""&&(n.message=Vex.Motherday.instance.$lightboxPopup.data("defaultmessage"));Vex.Motherday.instance.$messageInput.focus();Vex.Motherday.instance.$lightboxPopup.toggleClass("flipped")};n.sendGift=function(){Vex.Motherday.instance.sendEmail(n.email,n.message)};n.close=function(){Vex.Util.slideUpPopup()}}]);$(document).ready(function(){Vex.Motherday.instance=new Vex.Motherday});angular.module("shop").controller("endOfYearCtrl",["$scope","$window",function(n,t){var i="/Content/images/_localized/"+Vex.Settings.LanguageIso+"/marketing/end-of-year/";n.titleImg=i+"title.png";n.step=1;n.shiftAnswer="";n.brands=[];n.addBrandAlerts=!0;n.pageBrands=t.brands;n.termsUrl="//www.vente-exclusive.com/"+Vex.Settings.LanguageIso+"/about/contestrules/3";n.next=function(){n.step++};n.back=function(){n.step--};n.close=function(){Vex.Util.slideUpPopup();$.unblockUI()};n.addBrand=function(t){var i=n.brands.indexOf(t),r=i>-1;r?n.brands.splice(i,1):n.brands.push(t)};n.containsBrand=function(t){return n.brands.indexOf(t)>-1};n.isOnStep=function(t){return n.step>=t};n.postPollResults=function(){$.ajax({url:"/poll/post",type:"POST",dataType:"json",contentType:"application/json;charset=utf-8",data:JSON.stringify({pollAlias:"End-Of-Year-2016",integer1:n.shiftAnswer}),success:function(){if(n.addBrandAlerts){var t=$('form.eoy-form input[name$="CSRFToken"]').val();$.ajax({type:"POST",url:"/"+Vex.Settings.Culture+"/Account/AddPersonalBrands",data:JSON.stringify({brandIds:n.brands,CSRFToken:t}),contentType:"application/json",success:function(){n.$apply(function(){n.step++})}})}else n.$apply(function(){n.step++})}})}}]),function(n){var t=function(){function t(){this.HuntData=null;this.pageItemLabel="";this.pageItemHash="";this.huntStep=0;this.popupDelay=375;this.itemDelay=1e3;this.$itemDiv=null;this.transitionType="";this.$container=$("body");this.$huntPopup=$("#hunt-popup");this.$huntPopupClose=$("#hunt-popup>div.hunt-view>.close");this.$huntPopupCloseComplete=$("#hunt-popup>div.hunt-view>.close-complete");this.$overlay=$(".blockOverlay");this.$closeActionButtons=$("button.hunt-continue,button.hunt-start,button.hunt-close,button.hunt-go-surprise,button.hunt-get-vexxie");this.$claimActionButtons=$("button.hunt-claim");this.$couponClaimActionButtons=$("button.hunt-coupon-claim");this.$huntContent=$("#hunt-popup .hunt-view .hunt-content");this.imagesPath="/Content/images/_localized/"+n.Settings.LanguageIso+"/marketing/egghunt";this.$basketCells=$("#hunt-popup .hunt-item-cell");this.$toggleRules=$(".hunt-toggle-rules");this.$scrollCont=$("#hunt-popup .rules-view .scroll-content");this.$couponFct=function(){return $("#hunt-popup .coupon-code")};!navigator.userAgent.match(/Trident\/7\./)||$("html").addClass("msie");this.initHunt(document.location.hash.indexOf("easter2017")>=0);this.$toggleRules.click(function(t){t.preventDefault();n.Hunt.instance.$huntPopup.toggleClass("rules-open")});this.$scrollCont.perfectScrollbar({suppressScrollX:!0});this.$closeActionButtons.click(function(t){t.preventDefault();n.Hunt.instance.HuntData.Label=="easter_gsb"&&n.Hunt.instance.huntStep==3?n.Hunt.instance.showSurprise():$.unblockUI()});this.$claimActionButtons.click(function(){n.Hunt.instance.HuntData.Label=="easter_rest"?n.Hunt.instance.huntStep<3&&(n.Hunt.instance.claimHunt(),n.Hunt.instance.showCoupon()):$.unblockUI()});this.$couponClaimActionButtons.click(function(){n.Hunt.instance.HuntData.Label=="easter_rest"&&n.Hunt.instance.showSurprise()});this.$huntPopupCloseComplete.click(function(){n.Hunt.instance.HuntData.Label=="easter_gsb"&&n.Hunt.instance.huntStep>=3?n.Hunt.instance.showSurprise():$.unblockUI()})}return t.prototype.setTransitionType=function(){var t,r=document.createElement("fakeelement"),i={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd",msTransition:"msTransitionEnd"};for(t in i)r.style[t]!==undefined&&(n.Hunt.instance.transitionType=i[t])},t.prototype.firstPopup=function(){var t=n.Storage.getItem("vex_hunt_first_popup");return t!=null&&t=="true"?!1:n.Hunt.instance.huntStep==0?(n.Storage.setItem("vex_hunt_first_popup","true"),!0):!1},t.prototype.initHunt=function(t){$(".hunt-item").remove();var i=this;n.Storage.getUserData("acc",function(n){n.IsHunt&&(i.getHuntStoredData()?i.setHunt(t):i.getData(t))})},t.prototype.setHunt=function(t){n.Hunt.instance.HuntData&&(n.Hunt.instance.setHuntType(),n.Hunt.instance.initPopup(t),n.Hunt.instance.HuntData.IsClaimed||!this.isHuntOnPage()||this.areAllEggsFound()||n.Hunt.instance.placeItem(),n.Hunt.instance.checkThankYouPage())},t.prototype.isHuntOnPage=function(){var i=window.location.href,t=!1;return $.each(n.Hunt.instance.HuntData.Items,function(r,u){var f=i.match(new RegExp(u.UrlRegex,"i"));f!==null&&(n.Hunt.instance.pageItemLabel=u.Label,n.Hunt.instance.pageItemHash=u.Hash,n.Hunt.instance.isThisPageItemAlreadyFound()||(t=!0))}),t&&(!n.Hunt.instance.$itemDiv||!n.Hunt.instance.$itemDiv.is(".placed"))},t.prototype.getData=function(t){$.ajax({url:"/mkt/GetHunt/",success:function(i){n.Hunt.instance.HuntData=i;n.Hunt.instance.storeHuntData();n.Hunt.instance.setHunt(t)}})},t.prototype.getTimeStampInSeconds=function(){var n=(new Date).getTime();return Math.floor(n/1e3)},t.prototype.checkThankYouPage=function(){n.AnalyticsData.isThankYouPage()&&n.DynamicContent.getDynamicContent(39,"dynamic-popup-lazyload",null,"hunt-claimed")},t.prototype.isLessThanOneHour=function(t){var i=n.Hunt.instance.getTimeStampInSeconds(),r=n.Hunt.instance.getTimeStampInSeconds()-t;return t-n.Hunt.instance.getTimeStampInSeconds()<3600},t.prototype.getHuntStoredData=function(){var i=n.Storage.getItem("vex_hunt_local_data"),t;return i!==null?(t=JSON.parse(i),t.UserId===n.AnalyticsData.UserId?n.Hunt.instance.isLessThanOneHour(parseInt(t.TimeStamp))?(n.Hunt.instance.HuntData=t.HuntData,n.Hunt.instance.storeHuntData(),!0):!1:(n.Storage.removeItem("vex_hunt_local_data"),!1)):!1},t.prototype.setHuntType=function(){n.Hunt.instance.$container.addClass(n.Hunt.instance.HuntData.Label);n.Hunt.instance.$couponFct().html(n.Hunt.instance.HuntData.Code)},t.prototype.storeHuntData=function(){var t={TimeStamp:n.Hunt.instance.getTimeStampInSeconds(),UserId:n.AnalyticsData.UserId,HuntData:n.Hunt.instance.HuntData};n.Storage.setItem("vex_hunt_local_data",JSON.stringify(t))},t.prototype.areAllEggsFound=function(){return n.Hunt.instance.huntStep>=3},t.prototype.isThisPageItemAlreadyFound=function(){var t=!1;return $.each(n.Hunt.instance.HuntData.Items,function(i,r){r.Label==n.Hunt.instance.pageItemLabel&&r.IsFound&&(t=!0)}),t},t.prototype.placeItem=function(){var t=this;n.Hunt.instance.setTransitionType();n.Hunt.instance.$itemDiv=$("<div>").addClass("hunt-item "+n.Hunt.instance.pageItemLabel).click(function(){return n.Hunt.instance.$itemDiv.off("click").addClass("found"),n.Hunt.instance.huntItemFound(),!1}).on(n.Hunt.instance.transitionType,function(){var n=$(this);n.hasClass("found")&&n.remove()});setTimeout(function(){n.Hunt.instance.$container.append(n.Hunt.instance.$itemDiv);n.Hunt.instance.$itemDiv.addClass("placed")},n.Hunt.instance.itemDelay)},t.prototype.addItemToPopup=function(t,i){var r=n.Hunt.instance.$basketCells.eq(n.Hunt.instance.huntStep);n.Hunt.instance.huntStep++;r.addClass(t);i&&r.addClass("pop")},t.prototype.addFoundItemToStorage=function(){$.each(n.Hunt.instance.HuntData.Items,function(t,i){i.Label==n.Hunt.instance.pageItemLabel&&(i.IsFound=!0,n.Hunt.instance.storeHuntData())})},t.prototype.huntItemFound=function(){$.ajax({url:"/mkt/FindHuntItem/",type:"POST",dataType:"json",contentType:"application/json;charset=utf-8",data:JSON.stringify({hash:n.Hunt.instance.pageItemHash}),success:function(){n.Hunt.instance.addItemToPopup(n.Hunt.instance.pageItemLabel,!1);n.Hunt.instance.addFoundItemToStorage();n.Hunt.instance.huntStep==3&&n.Hunt.instance.claimHunt();setTimeout(function(){n.Hunt.instance.setPopup(!0,!0)},n.Hunt.instance.popupDelay)}})},t.prototype.claimHunt=function(){var t=this;n.Hunt.instance.HuntData.IsClaimed=!0;n.Hunt.instance.storeHuntData();$.ajax({url:"/mkt/ClaimHunt/",type:"POST",dataType:"json",contentType:"application/json; charset=utf-8",data:JSON.stringify({label:n.Hunt.instance.HuntData.Label}),success:function(i){t.HuntData.Code=i.Result;t.$couponFct().html(t.HuntData.Code);n.Hunt.instance.storeHuntData()}})},t.prototype.initPopup=function(t){var r,i,u;if(n.Hunt.instance.HuntData.Items){for(r=this,r.huntStep=0,i=0;i<n.Hunt.instance.HuntData.Items.length;i++)u=n.Hunt.instance.HuntData.Items[i],u.IsFound&&r.addItemToPopup(u.Label,!0);n.Hunt.instance.HuntData.IsClaimed&&n.Hunt.instance.HuntData.Label=="easter_rest"&&n.Hunt.instance.huntStep<3&&n.Hunt.instance.showCoupon();n.Hunt.instance.storeHuntData()}n.Hunt.instance.setPopup(t,!0)},t.prototype.showCoupon=function(){if(n.Hunt.instance.$huntPopup.addClass("coupon"),n.Hunt.instance.huntStep<3){var t=n.Hunt.instance.huntStep,i=n.Hunt.instance.imagesPath+"/"+n.Hunt.instance.HuntData.Label+"/step-"+t+"-stop.png";n.Hunt.instance.$huntContent.css("background-image","url("+i+")")}n.Hunt.instance.$couponFct().html(n.Hunt.instance.HuntData.Code)},t.prototype.showSurprise=function(){n.Hunt.instance.huntStep=4;n.Hunt.instance.$huntPopup.removeClass("coupon");n.Hunt.instance.setPopup(!0,!1)},t.prototype.setPopup=function(t,i){if(n.Hunt.instance.HuntData){var r=n.Hunt.instance.huntStep,u=n.Hunt.instance.imagesPath+"/"+n.Hunt.instance.HuntData.Label+"/step-"+r+".png";n.Hunt.instance.$huntContent.css("background-image","url("+u+")");n.Hunt.instance.$huntPopup.removeClass("step-0 step-1 step-2 step-3 step-4 step-5").addClass("step-"+r);t&&this.showPopup(i)}},t.prototype.showPopup=function(t){n.Hunt.instance.HuntData&&n.Hunt.instance.HuntData.IsClaimed&&n.Hunt.instance.HuntData.Label=="easter_rest"&&n.Hunt.instance.huntStep<3&&n.Hunt.instance.showCoupon();n.Util.showLightbox(750,460,n.LightboxModalMode.Semi,{message:n.Hunt.instance.$huntPopup});t&&n.Hunt.instance.$basketCells.eq(n.Hunt.instance.huntStep-1).addClass("pop")},t}();n.Hunt=t}(Vex||(Vex={}));$(document).ready(function(){Vex.Hunt.instance=new Vex.Hunt;Vex.AnalyticsData.addListener(function(n){n=="CurrentSalePage"&&(Vex.Hunt.instance=new Vex.Hunt)})});_this=this;angular.module("shop").controller("onboardingCtrl",["$scope","$window","$session","$http","$cal",function(n,t,i,r,u){var f=_this,e="/Content/images/_localized/"+Vex.Settings.LanguageIso+"/marketing/onboarding/";n.step=0;n.choices={emailFrequency:"Daily",dataProcessing:"true",optinMarketing:"true",optinPayment:"true"};n.allowDataProcessing=!1;Vex.Storage.getUserData("acc",function(t){if(n.firstName=t.FirstName,n.CouponCode=t.CouponCode,n.CouponCodeAdvantageTypeCV=t.CouponCodeAdvantageTypeCV,n.CouponCodeAmount=t.CouponCodeAmount,n.CouponCodeThresholdAmount=t.CouponCodeThresholdAmount,t.CouponCodeValidUntil!=null&&(n.CouponCodeValidUntil=t.CouponCodeValidUntil.replace(/[^0-9 +]/g,"")),n.FreeShippingSignup=t.FreeShippingSignup,n.FreeShippingSignupExpiration=t.FreeShippingSignupExpiration,n.LanguageId=t.LanguageId,t.Onboarding){n.step5Required=t.Onboarding.RequestPaymentMigration;n.existingMember=t.Onboarding.ExistingMember;var i=t.Onboarding.Legal,r=t.Onboarding.Messaging,u=t.Onboarding.MarketingMessaging,f=t.Onboarding.DataProcessing,e=t.Onboarding.PaymentMigration||!n.step5Required;i&&r&&u&&f&&e||(n.allowDataProcessing=t.Onboarding.DataProcessing,i==!1?n.step=0:r==!1?n.step=1:u==!1?n.step=3:f==!1?n.step=4:e==!1&&(n.step=5),n.initialStep=n.step,t.Onboarding&&Vex.Util.showLightbox(800,500,Vex.LightboxModalMode.Full,{message:$("#onboarding-popup"),overlayCSS:{backgroundColor:"#fff"}}))}});n.step0={acceptGeneralConditions:!0,acceptPrivacyPolicy:!0,acceptCookiePolicy:!0};n.step0Valid=function(){return n.step0.acceptGeneralConditions&&n.step0.acceptPrivacyPolicy&&n.step0.acceptCookiePolicy};n.step2={infoCollapsed:!0,moreOptions:!1,declined:!1};n.step3={infoCollapsed:!0,moreOptions:!1,declined:!1};n.step4={infoCollapsed:!0,moreOptions:!1,declined:!1};n.step5={infoCollapsed:!0,moreOptions:!1,declined:!1};n.goToProfile=function(i){u.logAction("GDPR","ManagePreferences");n.nextStep(function(){t.location.href=i})};n.isOnStep=function(t){return n.step>=t};n.step2MoreOptions=function(){n.choices.emailFrequency="NONE";n.step2.moreOptions=!0};n.step3MoreOptions=function(){n.choices.optinMarketing="false";n.step3.moreOptions=!0};n.step4MoreOptions=function(){n.choices.dataProcessing="false";n.step4.moreOptions=!0};n.step5MoreOptions=function(){n.choices.optinPayment="false";n.step5.moreOptions=!0};f.postChange=function(n,t){r.put(i.user&&Vex.Settings.ApiRoot+Vex.Settings.Culture+"/users/"+i.user.token+"/consent",n).success(t)};n.nextStep=function(t){var i={saleInvitationFrequencyCV:""};if(n.step!==0||n.step0Valid()){if(n.step===2&&n.choices.emailFrequency=="NONE"&&n.step2.declined==!1){n.step2.declined=!0;return}if(n.step===3&&n.choices.optinMarketing=="false"&&n.step3.declined==!1&&!t){n.step3.declined=!0;return}if(n.step===4&&n.choices.dataProcessing=="false"&&n.step4.declined==!1){n.step4.declined=!0;return}n.step===0?i.legalDocumentsAccepted=!0:n.step===2?(i.saleInvitationOptin=n.choices.emailFrequency!="NONE",i.saleInvitationFrequencyCV=n.choices.emailFrequency):n.step===3?i.commercialOptin=n.choices.optinMarketing:n.step===4?(i.dataProcessingAccepted=n.choices.dataProcessing,Vex.AnalyticsData.AllowDataProcessing=n.choices.dataProcessing=="true"):n.step===5&&(i.paymentMigrationAccepted=n.choices.optinPayment);f.postChange(i,function(){var i,r;t&&t();n.step!==4||n.existingMember?n.step!=5&&(n.step!=4||n.step5Required)?n.step++:(Vex.Util.slideUpPopup(),$.unblockUI()):(Vex.AnalyticsData.AllowDataProcessing&&(i=$.cookie("newMemberAcq"),i&&i!=""&&i.indexOf("{")!==-1?(r=JSON.parse(i),Vex.AnalyticsData.fireNewMemberAquisitionEvent(r.acqChan,r.refSrc)):i&&i!=""&&Vex.AnalyticsData.fireNewMemberAquisitionEvent(i,"")),$.removeCookie("newMemberAcq",{path:"/"}),n.step5Required||(Vex.Util.slideUpPopup(),$.unblockUI()))})}}}]),function(n){var t;(function(n){var t=function(){function n(n,t,i){t.getFeatureVariant("restricted-shop").then(function(t){var r=t!=null&&t=="Y";i.getUserMetadata().then(function(t){var i=t!=null&&t.siteWideMigration;n.restrictedShop=r||i})["catch"](function(){})})["catch"](function(){})}return n.$inject=["$scope","$features","$user"],n}();n.RestrictedShopController=t})(t=n.Header||(n.Header={}))}(Vex||(Vex={}));shopModule.controller("Vex.Header.RestrictedShopController",Vex.Header.RestrictedShopController)