!function(){var t={2283:function(t,e,n){},2049:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return i}});var i=()=>!document.getElementById("octane-ai__ads")},3496:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return o}});var i=n("7522"),r=n("5235"),o={isFbVisible:i.default,scriptLoader:r.default}},7522:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return i}});var i=t=>["clientWidth","clientHeight"].map(e=>t[e]).every(t=>t>0)},5235:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return o}});var i=n("2028"),r=n("2049"),o=({onSuccess:t,onError:e},n=`${i.default.octaneDomain}/ads.js`)=>{let o=document.createElement("script");o.async=!0,o.src=n,o.onerror=t=>e(t),o.onload=n=>(0,r.default)()?e():t(n),document.getElementsByTagName("head")[0].appendChild(o)}},2028:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return r}});let i=JSON.parse(atob("eyJwYWdlSWQiOm51bGwsImZiQXBwSWQiOiIxMDQ5MzI4Mzk4NDcwMTA4IiwiZXhpdEludGVudCI6eyJlbmFibGVkIjpmYWxzZSwicGF5bG9hZCI6ZmFsc2V9LCJ1c2VfdGFyZ2V0aW5nIjpmYWxzZSwiYWRkVG9DYXJ0UG9wdXAiOnsiZW5hYmxlZCI6ZmFsc2UsInBheWxvYWQiOmZhbHNlfSwiYm90SWQiOiI1NmFrNTY5cWZtZmNjYjFjIiwib2N0YW5lRG9tYWluIjoiaHR0cHM6XC9cL2FwcC5vY3RhbmVhaS5jb20iLCJkaXNjb3VudFBvcHVwIjp7ImVuYWJsZWQiOmZhbHNlLCJwYXlsb2FkIjpmYWxzZX0sImFkZFRvQ2FydENoZWNrYm94Ijp7ImVuYWJsZWQiOmZhbHNlLCJwYXlsb2FkIjp7InByZXZlbnRfcmVkaXJlY3QiOiJmYWxzZSIsInN1YkhlYWRsaW5lVGV4dCI6IlNlbmQgbWUgcHVyY2hhc2UgdXBkYXRlcyBvbiBNZXNzZW5nZXIiLCJzdWJIZWFkbGluZSI6dHJ1ZSwic2tpbiI6ImxpZ2h0IiwiaGVhZGxpbmUiOmZhbHNlLCJpZnJhbWVfY3NzIjpudWxsLCJlbWJlZF9zZWxlY3RvciI6bnVsbCwidGhlbWUiOiJtaW5pbWFsIiwiZm9ybV9zZWxlY3RvciI6bnVsbCwicHJlY2hlY2tlZCI6InRydWUiLCJ0eXBlIjoibm9uZSIsImNzcyI6bnVsbCwiaGVhZGxpbmVUZXh0IjoiIiwiYnV0dG9uX3NlbGVjdG9yIjpudWxsLCJlbWJlZF9wb3NpdGlvbiI6ImFwcGVuZCIsInJlZiI6ImV5SmhiR2NpT2lKSVV6STFOaUlzSW5SNWNDSTZJa3BYVkNKOS5leUpoZFdRaU9pSTFObUZyTlRZNWNXWnRabU5qWWpGaklpd2lkR2QwSWpwYkltRmtaSFJ2WTJGeWRHTm9aV05yWW05NEwyVnVkSEo1SWl4N2ZWMTkuanZ2N0JudmhHMVpxSnU1NThUbHE2Q1pKWGxvaTlobE5hOVdqZTdSTzUyVSIsImRpc2NvdW50Q29kZSI6bnVsbCwiY2VudGVyQWxpZ24iOiJmYWxzZSIsImZvcm1fcHJvY2Vzc2luZyI6ImF1dG8iLCJ0aGVtZURhdGEiOnsiaGVhZGxpbmVDb2xvciI6IiMzMzMzMzMiLCJzdWJIZWFkbGluZUNvbG9yIjoiIzZjNmM2YyJ9fX19"));window.OctaneConfig=i;var r=i},1329:function(t,e,n){"use strict";n.r(e),n("4236");var i=n("5380"),r=n.n(i);n("4320");var o=n("1604"),a=n.n(o);n("9405"),n("5725"),n("7250"),n("6641"),n("347");window.__OctaneAIcomponents={instances:[],get(t){return a(this.instances,{uid:t})},push(t){this.instances.push(t)},remove(t){this.instances=r(this.instances,{uid:t})}}},7130:function(t,e,n){"use strict";n.r(e),n.d(e,{generateUserId:function(){return m},generateUserRef:function(){return g},default:function(){return y}});var i=n("4364"),r=n.n(i),o=n("571"),a=n.n(o),s=n("5657"),u=n.n(s);let l={user:"octane/shopify/uid",linktrack:"__octane_ltrk",optinstatus:"octane/optin",atcpopup:"octane/addtocartpopup",atcpopupinst:"octane/addtocartpopup/inst",discountpopup:"octane/discount",discountpopupinst:"octane/discount/inst",orderoptin:"octane/order",exitintent:"octane/exitintent",exitintentinst:"octane/exitintent/inst",quiz:"octane/quiz",sharedresult:"octane/sharedresult"},c=t=>l[t],d={getProp:t=>c(t),set(t,e=1,n={}){let{optin:i,expires:o=3650,...a}=n;i&&this.setOptIn(),r.set(c(t),e,{expires:o,domain:`.${window.location.hostname}`},a)},get:t=>r.get(c(t)),has(t){return!!this.get(t)},hasMany(t){return a(t.map(this.get))},isOptedIn(){return this.has("optinstatus")},setOptIn(t){return t&&this.set(t,1),this.set("optinstatus",1)},hasCompletedQuiz(t){let e=this.get("quiz");if(!e)return!1;let n=JSON.parse(e);return!!n[t]},completedQuiz(t){let e=this.get("quiz");!e&&(e="{}");let n=JSON.parse(e);return n[t]=1,this.set("quiz",JSON.stringify(n))}},p=()=>((1+Math.random())*65536|0).toString(16).substring(1),h=(t=10)=>{let e="";if(!t||t<1)return"";for(;t--;)e+=p();return e},f=!1,m=()=>{let t=d.get("user");return!t&&(t=h(30)),u(t," expires")&&(t=t.split(" expires")[0]),!f&&(d.set("user",t,{expires:3650}),f=!0),t},g=()=>{let t=h(30),e=m();return`fbplugin-${e}-${t}`};var y=d},4649:function(t,e,n){"use strict";n.r(e),n.d(e,{Styles:function(){return i.default}}),n.d(e,{Cookies:function(){return o.default}}),n.d(e,{Store:function(){return r.default}}),n.d(e,{generateUserId:function(){return o.generateUserId}}),n.d(e,{generateUserRef:function(){return o.generateUserRef}});var i=n("9814"),r=n("347"),o=n("7130");n("1329")},347:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return h}});var i=n("3961"),r=n.n(i),o=n("3446"),a=n.n(o),s=n("7090"),u=n("7130"),l=n("2028"),c=n("6627"),d=n.n(c);class p{constructor(t,e){this.cb=t,this.start()}start(){this.active=!0}stop(){this.active=!1}execute(t,e){this.active&&this.cb(t,e)}}var h=function(t,e){let n=[];return{set:function(e){let i={...t};t={...i,...e},n.forEach(e=>e.execute(t,i))},get:function(e){return e?r(t,e):t},subscribe:function(t){let e=new p(t);return n.push(e),e},dispatch:function(t,n){if(a(e[t]))return e[t](this,n)},state:t}}({activeModal:!1,token:null,userRef:(0,u.generateUserId)(),isOptedIn:(0,u.default).isOptedIn(),pageId:l.default.pageId,appId:l.default.fbAppId,botId:l.default.botId,userData:{country_code:"US"},waitingForUserInfo:!1},{token:(t,e)=>{window.Shopify&&(0,s.$get)("/cart.js").then(({token:e})=>t.set({token:e}))},checkOptin:(t,e)=>new Promise((e,n)=>{if((0,u.default).isOptedIn()){t.set({isOptedIn:!0}),e(t.get());return}(0,s.$post)(`${l.default.octaneDomain}/user_check/${l.default.botId}`,{user_ref:t.state.userRef},{timeout:1e3}).then(({is_opted:n})=>{t.set({isOptedIn:n}),e(t.get())},()=>{t.set({isOptedIn:!1}),n(t.get())})}),getUserInfo:t=>new Promise((e,n)=>{t.set({waitingForUserInfo:!0});let i={user_ref:(0,u.generateUserId)(),include_country_code:!0};(0,s.$post)(`${l.default.octaneDomain}/get_user_info/${l.default.botId}`,i).then(i=>{i?(t.set({userData:{email:i.email,first_name:i.first_name,last_name:i.last_name,phone:i.phone,country_code:i.country_code,is_user_eu:i.is_user_eu}}),e(t.get())):n(t.get()),t.set({waitingForUserInfo:!1})},e=>{n(t.get()),t.set({waitingForUserInfo:!1})})}),getPopUps:t=>new Promise((t,e)=>{let n=d().format("YYYY-MM-DD"),i=d().utc().format("HH:mm:ss"),r=`${n}T${i}`;(0,s.$post)(`${l.default.octaneDomain}/${l.default.botId}/pop_ups`,{user_ref:(0,u.generateUserId)(),localdate:r}).then(e=>{t(e)},t=>{e(t)})})})},9814:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return i}});var i=new class t{constructor(){let t="octane-styles",e=document.getElementById(t);!e&&((e=document.createElement("style")).type="text/css",e.id=t,document.head.appendChild(e)),this.node=e}append(t){t&&this.node.appendChild(document.createTextNode(t))}}},9154:function(t,e,n){"use strict";n.r(e),n.d(e,{AttributeCartOrCheckoutPlugin:function(){return l}});var i=n("3961"),r=n.n(i),o=n("2028"),a=n("5115"),s=n("4294"),u=n("4649");class l extends s.default{pluginName="attributecart";ATTRIBUTED_TOKENS={};constructor(){super(),(0,u.Store).subscribe(this.attributeCart),(0,u.Store).subscribe(this.attributeCheckout)}attributeCart=({token:t})=>{let e=r(o.default,"octaneDomain"),n=r(o.default,"botId");if(!e||!t||this.ATTRIBUTED_TOKENS[t])return;let i=`${e}/attribute_cart/${n}`;this.ATTRIBUTED_TOKENS[t]=!0;let s={token:t,user_ref:this.userRef};navigator.sendBeacon?(this.log("Sending using sendBeacon"),navigator.sendBeacon(i,JSON.stringify(s))):(this.log("Sending using $post"),(0,a.$post)(i,s)),this.log(`Attribute cart - ${t} ${this.userRef}`)};attributeCheckout=({checkout_token:t})=>{let e=r(o.default,"octaneDomain"),n=r(o.default,"botId");if(!e||!t||this.ATTRIBUTED_TOKENS[t])return;let i=`${e}/attribute_checkout/${n}`;this.ATTRIBUTED_TOKENS[t]=!0;let s={checkout_token:t,user_ref:this.userRef};navigator.sendBeacon?(this.log("Sending using sendBeacon"),navigator.sendBeacon(i,JSON.stringify(s))):(this.log("Sending using $post"),(0,a.$post)(i,s)),this.log(`Attribute checkout - ${t} ${this.userRef}`)};isRendered(){return!0}destroy(){this.stopCartObserve()}}},1085:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return a}});var i=n("2028");let{payload:{themeData:r}}=i.default.addToCartCheckbox,o=` .octane--info { margin: 0; font-family: sans-serif; font-size: 12px; color: ${r.subHeadlineColor} } .center-text { text-align: center; } .center-text p { padding-left: 0; } .octane—skin__dark { color: #e0e0e0; } .octane--wrapper { margin-left: -20px; } .octane--wrapper--withbox { margin-left: -8px; } .octane--theme-wrapper { display: inline-block; ${r.bottomBoxBg?`background: ${r.bottomBoxBg}`:""}; ${r.borderColor?`border: 1px solid ${r.borderColor}`:""}; } .octane--checkbox-content { padding-left: 12px; ${r.topBoxBg?`background: ${r.topBoxBg}`:""}; ${r.borderColor?`border-bottom: 1px solid ${r.borderColor}`:""}; } .octane--checkbox-headline { font-size: 14px; line-height: 20px; font-weight: 600; margin: 0 0 5px 0; font-family: sans-serif; color: ${r.headlineColor} } .octane--theme-withbox { max-width: 100%; max-height: 100%; } .octane--theme-withbox .octane--checkbox-content { padding: 12px; margin-bottom: 12px; /* [1. Fix overlapping issue] */ } .octane--theme-withbox iframe { margin-top: -12px; /* [1. Fix overlapping issue] */ } `;var a=o},9607:function(t,e,n){"use strict";n.r(e),n.d(e,{CheckboxPlugin:function(){return i.default}});var i=n("9513")},9513:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return x}});var i=n("4365"),r=n.n(i),o=n("2028"),a=n("6641"),s=n("4649"),u=n("3496"),l=n("1076"),c=n("4294"),d=n("1085");let{payload:{embed_position:p,embed_selector:h,centerAlign:f,skin:m,iframe_css:g,prechecked:y,theme:v},payload:b}=o.default.addToCartCheckbox;class _ extends c.default{pluginName="addtocartcheckbox";constructor(t){super(),this._parent=t,this.timeouts=[],this.isInitialized=!1,this.iframe=document.createElement("iframe"),this.$iframe=r(this.iframe),this.iframe.frameBorder=0,this.iframe.scrolling="no",this.iframe.id=`octane-iframe-${this.uid}`;let e="octane-center-align",n=this.getWrapper(),i=document.createElement("div");i.className="octane-plugin__checkbox octane--visually-hidden",i.id=`octane-iframe-wrapper-${this.uid}`,"true"===f&&(i.classList.add(e),this.iframe.classList.add(e)),"withbox"===v&&i.classList.add("octane-plugin__checkbox--withbox"),i.appendChild(this.iframe),this.log("Wrapper",n),n[p||"append"](i);try{this.setIframe()}catch(t){this.log(`Error initializing iframe, ${t}`)}this.callback=(0,s.Store).subscribe(this.getCallback),this.dispatch("init")}get props(){return this._parent.state}isRendered(){let t=document.querySelector(`#octane-iframe-${this.uid}`);return!!(t&&t.contentDocument.getElementById("fb-messenger-checkbox"))}getWrapper(){if(h)return this.props.form.find(h).length?this.props.form.find(h):r(h);return this.props.buttons.last().parent()}destroy(){super.destroy(),this.timeouts.forEach(t=>clearTimeout(t));let t=document.querySelector(`#octane-iframe-wrapper-${this.uid}`);t&&t.remove(),this.callback&&this.callback.stop()}recreate(){return this.destroy(),new _(this._parent)}setIframe(){let t=this.iframe.contentDocument,e=this.iframe.contentWindow;if(t.open(),e.octane_formobj=this,t.write(this.generateIframe()),t.close(),!window.MutationObserver)return;let n=t.getElementById("target"),i=new MutationObserver(t=>{let e=this.$iframe.parents(":hidden").toArray(),i=[];e.forEach((t,e)=>{let n=t.getAttribute("style");i[e]=n,t.setAttribute("style",`${n}; display: block !important;`)}),this.iframe.height=n.scrollHeight,this.iframe.width=n.scrollWidth,e.forEach((t,e)=>t.setAttribute("style",i[e]||""))});i.observe(n,{attributes:!0,childList:!0,subtree:!0,characterData:!1})}MAX_RETRIES=250;RETRY_TIMEOUT=50;showPlugin=t=>{this._tryCount=this._tryCount?this._tryCount+1:1,(0,u.default).isFbVisible(t.getElementById("fb-messenger-checkbox"))?(document.querySelector(`#octane-iframe-wrapper-${this.uid}`).classList.remove("octane--visually-hidden"),(0,l.default).log({widget:this.pluginName,event:"view"}),this.dispatch("view")):this._tryCount<=this.MAX_RETRIES&&this.timeouts.push(setTimeout(()=>this.showPlugin(t),this.RETRY_TIMEOUT))};generateIframe=()=>`
${this.generateHeadlineText()} ${this.generateSubHeadlineText()}
${this.generateFBCheckbox()}
`;generateSubHeadlineText=()=>{let{subHeadline:t,subHeadlineText:e}=b;return t&&this.checkDoesTextExist(e)?`

${(0,a.encodeText)(e)}

`:""};generateHeadlineText=()=>{let{headline:t,headlineText:e}=b;return t&&this.checkDoesTextExist(e)?`

${(0,a.encodeText)(e)}

`:""};generateFBCheckbox=()=>`
`;checkDoesTextExist=t=>t&&t.trim().length;getCallback=({token:t,checkout_token:e})=>{if(this.log(`Callback ${t}, isExecuted - ${this.props.isExecuted}`),!this.props.isExecuted&&!e)return;if(!this.fb&&o.default.addToCartCheckbox.enabled){this.log("Fb SDK didn't get initialized");return}let{fbAppId:n,pageId:i}=o.default,r=`${b.ref}+${btoa(JSON.stringify({token:"cart:"+t}))}`;"checked"===this.fb_checkbox_state&&(this.fb.AppEvents.logEvent("MessengerCheckboxUserConfirmation",null,{app_id:n,page_id:i,ref:r,user_ref:this.userRef}),this.fireFbPixelOptInEvent(),this.callback.stop(),this.log("Dispatched FB Event"))};fireFbPixelOptInEvent=()=>{window.fbq&&window.fbq("trackCustom","[Octane AI] Add to cart checkbox opt-in")}}var x=_},542:function(t,e,n){"use strict";n.r(e),n.d(e,{AddToCartForm:function(){return y}});var i=n("4365"),r=n.n(i),o=n("5115"),a=n("4294"),s=n("2181"),u=n.n(s),l=n("7245"),c=n.n(l),d=n("8759"),p=n("2028"),h=n("9607");let{button_selector:f,form_processing:m,prevent_redirect:g}=p.default.addToCartCheckbox.payload;class y extends a.default{pluginName="addtocartform";plugins=[{Plugin:h.CheckboxPlugin,isEnabled:()=>p.default.pageId&&(p.default.addToCartCheckbox.enabled||d.default.isCart)}];timeouts=[];buttonSelectors='[type="submit"], button';RECREATE_LIMIT=300;instances=[];state={isAjax:!1,inProgress:!1,isExecuted:!1,isForm:!0,buttons:null,form:null};constructor(t){super(),this.el=t,this.$el=r(t),this.setupForm(),this.instances=this.plugins.filter(({isEnabled:t})=>t()).map(({Plugin:t})=>new t(this))}setupForm(){this.setState({isForm:this.$el.is("form"),buttons:this.$(f||this.buttonSelectors),form:this.$el});let t=[0,1,5,15,30].map(t=>1e3*t);this.timeouts=t.map(t=>setTimeout(this.bindEvents,t))}$=t=>this.$el.find(t);setState(t){c(t,(t,e)=>{this.state[e]=t})}recreate(){this.instances=this.instances.map(t=>(!t.isRendered()&&(t=t.recreate()),t)),this.timeouts.forEach(t=>clearTimeout(t)),this.setupForm()}isRendered(){return u(this.instances.map(t=>t.isRendered()))}destroy(){super.destroy(),this.unbindEvents(),this.timeouts.forEach(t=>clearTimeout(t)),this.instances.forEach(t=>t.destroy())}unbindEvents=()=>{let[t,e]=["submit","click"].map(t=>`${t}.octane`);this.state.form.off(t),this.state.buttons.off(e)};bindEvents=()=>{this.log("Bind events");let t=this.state.buttons,[e,n]=["submit","click"].map(t=>`${t}.octane`);if(!this.state.isForm){t.on(n,this.handleButtonClick);return}this.$el.off(e),this.$el.on(e,this.handleFormSubmit),t.off(n),t.on(n,t=>setTimeout(this.triggerFormSubmit,1,t))};handleButtonClick=t=>{t.preventDefault(),this.log("Form submitted via XHR"),this.setState({inProgress:!0,isExecuted:!0})};triggerFormSubmit=t=>{let e=!0;this.el.checkValidity&&(e=this.el.checkValidity()),this.log(`Manually trigger form ${this.state.inProgress} ${e}`),!this.state.inProgress&&e&&(t.preventDefault(),this.$el.trigger("submit.octane",{manuallyTriggered:!0}))};redirectCart=()=>{this.log(`Should redirect - AJAX: ${this.state.isAjax} toggle: ${g}`),!this.state.isAjax&&"false"===g&&setTimeout(()=>window.location.href="/cart",200)};handleFormSubmit=(t,e={})=>{if(this.log("Form submit triggered"),this.state.inProgress)return;let n=t.isDefaultPrevented()||e.manuallyTriggered;if(this.log("Form submit processing"),this.setState({isAjax:"auto"===m?n:"xhr"===m,inProgress:!0,isExecuted:!0}),t.preventDefault(),this.state.isAjax){this.log("Form submitted via XHR");return}this.state.buttons.prop("disabled",!0);let i=()=>{this.state.buttons.prop("disabled",!1),this.setState({inProgress:!1}),this.log("Form submitted"),this.redirectCart()};if(window.FormData&&this.$el.is("form")&&window.fetch){let t=new FormData(this.$el[0]);fetch("/cart/add.js",{method:"post",body:t}).finally(i)}else{let t=this.$el.serialize();(0,o.$post)("/cart/add.js",t).always(i)}};getFormId=()=>r(this.state.form).attr("id");isCheckboxPluginChecked=()=>this.instances.filter(t=>t instanceof h.CheckboxPlugin).map(t=>t.fb_checkbox_state).includes("checked")}},9801:function(t,e,n){"use strict";n.r(e),n.d(e,{AddToCartPlugin:function(){return i.AddToCartPlugin}});var i=n("873")},873:function(t,e,n){"use strict";n.r(e),n.d(e,{AddToCartPlugin:function(){return p}});var i=n("4365"),r=n.n(i),o=n("6641"),a=n("2028"),s=n("4294"),u=n("542");let{form_selector:l}=a.default.addToCartCheckbox.payload,c="muddybody.com"===window.location.hostname?"addToCartCopy":null,d={instances:[],remove(t){this.instances=this.instances.filter(e=>e.uid!==t)},add(t){this.instances.push(t)},create(t){let e=t._octane;if(e)return e.isRendered()?void 0:e.recreate();e=new u.AddToCartForm(t),t._octane=e,this.instances.push(e),(0,o.logger)("Form initializing",this)}};class p extends s.default{pluginName="addtocartplugin";formSelector='form[action*="/cart/add"]';constructor(t){super(),this.el=t,this.$el=r(t),c?(0,o.waitUntilReady)(()=>document.getElementById(c),this.start,1e3):this.start()}start=()=>{this.doc=document,this.$doc=r(document),this.formSelector=l||this.formSelector,this.processForms(),this.initObserver()};processForms(){let t=this.doc.querySelectorAll(this.formSelector);this.log("Processing forms",t),t.forEach(t=>d.create(t))}hasForm(t){return t=r(t),this.$(this.formSelector).length||t.is(this.formSelector)}initObserver(){if(!!window.MutationObserver)this.observer=new MutationObserver(t=>{let e=t.some(t=>this.hasForm(t.target));e&&this.processForms()}),this.observer.observe(this.doc.documentElement||this.doc.body,{attributes:!1,childList:!0,subtree:!0,characterData:!1})}$=t=>this.$el.find(t)}},2816:function(t,e,n){"use strict";n.r(e),n.d(e,{addtocartpopupStyleV2:function(){return o}});var i=n("8301"),r=n("9366");function o(t,e){let{initialState:n,inheritStyles:o}=t,a=(0,r.getBackgroundColor)(n.backgroundImage,n.modalBackground);return` ${(0,i.popupsTextStyle)(o)} .octane-${e}--initial-state { background-color: ${a}; border-radius: ${n.roundCornersPx}px; } ${n.image.url?`.octane-${e}--initial-state .octane-popup__img { background-image: url(${n.image.url}); background-position: ${n.image.horizontalAlignment} ${n.image.verticalAlignment}; }`:""} `}},8969:function(t,e,n){"use strict";n.r(e),n.d(e,{AddToCartPopupPlugin:function(){return i.default}});var i=n("9429")},9429:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return S}});var i=n("2028"),r=n("2816"),o=n("6641"),a=n("4294"),s=n("4649"),u=n("2208"),l=n("542"),c=n("4509"),d=n.n(c),p=n("5166"),h=n.n(p),f=n("7349"),m=n("8900"),g=n("4749"),y=n("7992");let{botId:v}=i.default,b="muddybody.com"===window.location.hostname?"addToCartCopy":null;class _ extends a.default{cookieName="atcpopup";pluginName="addtocartpopupplugin";instancePayload=null;instanceId=null;variationId=null;constructor(t,e){super(),this.instancePayload=t,this.instanceId=e;let{payload:n,variationId:i}=(0,f.decodeInstancePayload)(this.instancePayload);this.payload=n,this.variationId=i,this.userData=(0,s.Store).get("userData")}wasInstanceDismissed=()=>{let t=(0,s.Cookies).get(`${this.cookieName}inst`)||"";return t.includes(this.instanceId)};shouldDisplay=()=>{let{placement:{displayDevices:t,urlFilter:{type:e,filter:n},endTrigger:i}}=this.payload,r=[(0,m.isSupportedDevice)(t),(0,m.URLFilter).type(e).filters(n)];return(0,y.areOptInChannelsCollected)(this.payload)&&r.push(...[(0,y.hasOptInChannelsToShow)(this.payload,this.userData),!(0,y.hasAllUserData)(this.payload,this.userData)]),(0,g.updateConditionsFromEndTrigger)(this,i,r),r.every(Boolean)};init=()=>{this.atc=new x("atc",this.payload,this.instanceId,this.variationId,this.handleClose),setTimeout(()=>{this.buyNow=new x("buynow",this.payload,this.instanceId,this.variationId,this.handleClose)},0)};handleClose=(t=null)=>{t?"buynow"===t&&this.buyNow.onPopUpClose():(this.atc.onPopUpClose(),this.buyNow.onPopUpClose())}}class x extends a.default{pluginName="addtocartpopupplugin";buttonSelector=null;buttonType="";payload=null;instanceId=null;variationId=null;instances=[];constructor(t,e,n,i,r){super(),this.buttonType=t,this.payload=e,this.instanceId=n,this.variationId=i,this.popUpCloseCb=r,b?(0,o.waitUntilReady)(()=>document.getElementById(b),this.start,1e3):this.start()}start=()=>{this.popup=new k(this.payload,this.instanceId,this.variationId),this.payload=this.popup.payload,"atc"===this.buttonType?this.buttonSelector=this.payload.button_selector:"buynow"===this.buttonType&&(this.buttonSelector=this.payload.buynow_button_selector),this.processButtons(),this.initObserver()};processButtons(){let t=document.querySelectorAll(this.buttonSelector);t.forEach(this.initButton)}initButton=t=>{if(t._octane_atcpopup)return;this.cleanupInstances(),!this.popup.maybeRecreate()&&this.popup.init();let e=new w(t,this.popup,this.buttonType,this.popUpCloseCb);this.instances.push(e),t._octane_atcpopup=e};cleanupInstances(){let t=[];this.instances.forEach(e=>{if((0,o.inDom)(e.button))return t.push(e);e.destroy()}),this.instances=t}hasButton=({target:t})=>t.querySelectorAll(this.buttonSelector).length;initObserver(){if(!!window.MutationObserver)this.observer=new MutationObserver(t=>{let e=t.some(this.hasButton);e&&this.processButtons()}),this.observer.observe(document.documentElement||document.body,{attributes:!1,childList:!0,subtree:!0,characterData:!1})}onPopUpClose=()=>{for(let t of this.instances)t.popupDismissed=!0,t.initClone()}}class w extends a.default{pluginName="addtocartpopupbutton";popupDismissed=!1;triggered=!1;constructor(t,e,n,i){super(),this.popup=e,this.button=t,this.buttonType=n,this.popUpCloseCb=i,this.initClone(),this.dispatch("init")}destroy(){super.destroy(),this.observer.disconnect(),this.cloned&&(0,o.inDom)(this.cloned)&&this.cloned.parentNode.removeChild(this.cloned),this.button.classList.remove("octane--visually-hidden")}initClone=()=>{this.cloned&&this.destroy(),!this.popupDismissed&&(this.cloned=this.button.cloneNode(!0),this.cloned._octane_atcpopup=this,this.cloned.addEventListener("click",this.handleButtonClick,!0),this.cloned.addEventListener=(t,e,n)=>this.button.addEventListener(t,e,n),this.button.parentNode.insertBefore(this.cloned,this.button.nextSibling),this.button.classList.add("octane--visually-hidden"),this.observeButton())};observeButton(){if(!!window.MutationObserver)this.observer=new MutationObserver(this.initClone),this.observer.observe(this.button,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}toggleModal=t=>{let e=(0,s.Store).get("activeModal");this.triggered||"on"!==t||e?this.triggered&&e&&"off"===t&&(0,s.Store).set({activeModal:!1}):(this.triggered=!0,(0,s.Store).set({activeModal:!0}))};handleButtonClick=t=>{if(this.toggleModal("on"),t.preventDefault(),t.stopPropagation(),!this.shouldTakeover())return"atc"===this.buttonType&&this.popUpCloseCb&&this.popUpCloseCb("buynow"),this.toggleModal("off"),this.button.click();this.toggleModal("off"),this.popup.showModal(this.onHide)};shouldTakeover(){let t=this.button.closest("form"),e=t?t.getAttribute("id"):null,n=[];if(e){let t=window.__OctaneAIinstances.instances.filter(t=>t instanceof l.AddToCartForm);n=d(n=t.filter(t=>t.getFormId()===e).map(t=>t.isCheckboxPluginChecked()))}let i=[!n.includes(!0)];return t&&i.push(t.checkValidity()),i.every(Boolean)}onHide=()=>{this.button.click(),this.popUpCloseCb&&this.popUpCloseCb()}}class k extends f.BasePluginInstance{pluginName="addtocartpopup";cookieName="atcpopup";submittedStateTrackingBase="addtocartpopup:submitted";onHideCb=null;hasUseCodeButton=!1;hasSubmittedStyle=!1;pixelOptInEventName="Add to cart pop-up opt-in";constructor(t,e,n){super(t,e,n,!1),this.pluginInstanceName=`${this.pluginName}-${this.instanceId}`,this.subscribeCheckboxElementId=`oct-${this.pluginInstanceName}-subscribe-checkbox`,this.el=document.createElement("div"),this.el.setAttribute("class","addtocart-popup-wrapper octane--visually-hidden"),this.el.id=`add-to-cart--${this.uid}`}createStyles=()=>{(0,s.Styles).append((0,r.addtocartpopupStyleV2)(this.payload,this.pluginInstanceName)),this.createCommonStyles()};firstRender(){return this.render("initial"),document.body.appendChild(this.el),this.preCheckSubscribeCheckbox(),this.setupEvents(),!0}init=()=>{this.createStyles()};maybeRecreate(){return this.el.parentElement!==document.body&&(this.el.parentElement&&this.el.parentElement.removeChild(this.el),this.init(),!0)}showModal=t=>{this.onHideCb=t,this.FB&&this.FB.AppEvents.logEvent("AddtoCartPopUpView"),this.showModalCommon(null,t)};dismissPopup=t=>{this.dismissPopupCommon(t),this.onHideCb&&this.onHideCb(),document.dispatchEvent(new CustomEvent("oct-pop-up-closed"))};shouldDisplay=()=>!0;render(t){let e={initial:this.initialState,submitted:this.dismissPopup};this.el.innerHTML=(0,u.innerHtmlTemplate)(e[t]())}initialState=()=>{let{initialState:{highlighted:t,bigHeadline:e,subHeadline:n,image:i,description:r,layout:o,backgroundImage:a}}=this.payload,s=a.url,l="center"===o.value,c=`
${(0,u.textContent)(t)}
${(0,u.textContent)(e)}
${(0,u.textContent)(n)}
${this.shouldDisplayImage(i)}
${(0,u.textContent)(r)}
${this.getOptins(s)} ${this.getBottomBox(s,l)} ${this.getPhoneCollectionCopy(s,l)} `,d={layout:o.value,pluginInstanceName:this.pluginInstanceName,content:c,className:`octane-${this.pluginInstanceName}--initial-state`,haveBackground:a.url,state:"initial",hasOptInChannels:(0,y.shouldDisplayElement)("subscribeButton")};return(0,u.contentHtmlTemplate)(d)};shouldDisplayImage=t=>t.url?'
':""}var S=class t{instances=[];constructor(t){if(!t.enabled)return;this.selectInstanceToDisplay(t.payload)}selectInstanceToDisplay(t){let e=t.map(({id:t,enabled:e,instance_payload:n})=>e?new _(n,t):null).filter(t=>null!==t),n=e.map(t=>({instance:t,shouldDisplay:t.shouldDisplay()})).filter(t=>t.shouldDisplay);for(let t of n)t.instance.init()}}},7349:function(t,e,n){"use strict";n.r(e),n.d(e,{decodeInstancePayload:function(){return w},BasePluginInstance:function(){return k}});var i=n("5166"),r=n.n(i),o=n("2028"),a=n("4649"),s=n("4294"),u=n("2208"),l=n("5109"),c=n("1076"),d=n("2457"),p=n("8900"),h=n("4749"),f=n("1184"),m=n("9366"),g=n("7090"),y=n("7992"),v=n("6116"),b=n("8008");let{octaneDomain:_,botId:x}=o.default;function w(t){let{variationId:e,payload:n}=(0,f.getABPayload)(t);return{payload:n.active_version?n.versions[n.active_version]:n,variationId:e}}class k extends s.default{discountRedirectUrl=null;hasUseCodeButton=!0;phone="";phoneAreaCode="+1";email="";userData={countryCode:"US"};userId=(0,a.generateUserId)();subscribeCheckboxChecked=!1;payload=null;variationId=null;instanceId=null;trackingToken=new l.TrackingToken(_,x);trackSubmittedState=!0;hasSubmittedStyle=!0;pluginInstanceName="";oneTapCode=null;oneTapNumber=null;constructor(t,e,n){if(super(),n)this.payload=t,this.variationId=n;else{let{variationId:e,payload:n}=w(t);this.payload=n,this.variationId=e}this.instanceId=e||v.DEFAULT_INSTANCE_ID;let{type:i}=this.payload;this.popUpType=i,this.hasOptInChannels=(0,y.areOptInChannelsCollected)(this.payload),this.textFieldSuffix=(0,y.getTextFieldSuffixForPopUp)(this.hasOptInChannels,i)}createCommonStyles=()=>{let{initialState:t,quizState:e}=this.payload;if(t){let{channels:e,layout:n,mobileOneTapSubscribeButton:i,subscribeButton:r}=t,o=` .octane-${this.pluginInstanceName}__subscribe-button { color: ${r.textColor}; margin-right: ${"center"===n.value?"0px":"20px"}; background: ${r.backgroundColor}; border-radius: ${r.roundCornersPx}px; font-weight: 600; } .octane-${this.pluginInstanceName}__subscribe-button:disabled { background: #d3d3d3; } `;if((0,a.Styles).append(o),(0,y.isMobileOneTapSubscribeActive)(e)){let t=` .octane-${this.pluginInstanceName}__one_tap_mobile_subscribe-button { color: ${i.textColor}; background: ${i.backgroundColor}; border-radius: ${i.roundCornersPx}px; font-weight: 600; } `;(0,a.Styles).append(t)}let s=this.payload.initialState.backgroundImage;if(s.url&&(0,a.Styles).append((0,m.getBackgroundImageStyle)(s,this.pluginInstanceName,"initial",s.url,this.payload.initialState.roundCornersPx)),s.disableOnMobile&&(0,a.Styles).append((0,m.hideBackgroundOnMobileStyle)(this.pluginInstanceName,"initial",this.payload.initialState.modalBackground)),this.hasSubmittedStyle){let t=this.payload.submittedState.backgroundImage.useInitial?s:this.payload.submittedState.backgroundImage;t.url&&(0,a.Styles).append((0,m.getBackgroundImageStyle)(t,this.pluginInstanceName,"submitted",t.url,this.payload.initialState.roundCornersPx)),t.disableOnMobile&&(0,a.Styles).append((0,m.hideBackgroundOnMobileStyle)(this.pluginInstanceName,"submitted",this.payload.submittedState.modalBackground))}}if(e){let t=e.backgroundImage;t&&t.url&&(0,a.Styles).append((0,m.getBackgroundImageStyle)(t,this.pluginInstanceName,"quiz",t.url,e.roundCornersPx))}!this.el&&(this.el=document.createElement("div"),this.el.setAttribute("class",`octane-${this.pluginInstanceName}-wrapper octane--visually-hidden`))};setupEvents=()=>{this.on(`.octane-${this.pluginInstanceName}__close`,"click",this.dismissPopup),this.on(`.octane-${this.pluginInstanceName}__close`,"keypress",this.dismissPopupKeyPress),this.on(`.octane-${this.pluginInstanceName}__decline > span`,"click",this.dismissPopup),this.on(`.octane-${this.pluginInstanceName}__subscribe-button`,"click",this.handleOptin),this.on(`.octane-${this.pluginInstanceName}__mobile_one_tap_subscribe-button`,"click",this.handleOptin),this.on(`.octane-${this.pluginInstanceName}__email-input`,"keyup",this.setEmail),this.on(`.octane-${this.pluginInstanceName}__phone-input`,"keyup",this.setPhone)};outsideClickListener=t=>({target:e})=>{let n=e.closest(`.octane-${t}`);!n&&document.body.contains(e)&&this.dismissPopup()};shouldDisplay=()=>{this.userData=(0,a.Store).get("userData");let{placement:{displayDevices:t,urlFilter:{type:e,filter:n},endTrigger:i}}=this.payload,r=[(0,p.isSupportedDevice)(t),!(0,a.Store).get("activeModal"),(0,p.URLFilter).type(e).filters(n)];return this.hasOptInChannels&&r.push(...[(0,y.hasOptInChannelsToShow)(this.payload,this.userData),!(0,y.hasAllUserData)(this.payload,this.userData)]),(0,h.updateConditionsFromEndTrigger)(this,i,r),r.every(Boolean)};on(t,e,n){this.el.addEventListener(e,e=>{e.target.isEqualNode(this.el.querySelector(t))&&n(e)})}getDiscountRedirectUrl=()=>{let{discountCode:t,submittedState:{applyDiscountCodeButton:e}}=this.payload,{useCodeTrackingBase:n}=this,i=e.url&&e.url.link?e.url.link:window.location.href,r=this.instanceId===v.DEFAULT_INSTANCE_ID?n:`${n}_${this.instanceId}`;this.variationId&&(r=`${r}***${this.variationId}`),(0,g.$post)(`${_}/${x}/discount_redirect`,{redirect_to:i,discount_code:t,tracking_id:r}).then(t=>{this.discountRedirectUrl=t.url},()=>{})};subscribeUser=t=>{this.clearErrors();let{country_code:e}=(0,a.Store).get("userData");this.email&&(!window._learnq&&(window._learnq=[]),window._learnq.push(["identify",{$email:this.email}])),(0,g.$post)(`${_}/subscribe_user/${x}`,{user_ref:this.userId,email:this.email,phone:this.phone,phone_area_code:this.phoneAreaCode,phone_country_code:e,variation_id:this.variationId,instance_id:this.instanceId,source:this.pluginName}).then(e=>{let n=(0,a.Store).get("userData");(0,a.Store).set({userData:{...n,phone:this.phone||n.phone,email:this.email||n.email}}),t()},t=>{let e=t.response;e?e.validation_fail?(e.validation_fail.phone&&this.showError("octane-popup__phone-input-error",e.validation_fail.phone),e.validation_fail.email&&this.showError("octane-email-input-error",e.validation_fail.email)):e.message&&this.showError("octane-general-api-error",e.message):this.showError("octane-general-api-error","Unknown error encountered")})};checkOptInTimer=null;OPTIN_CHECK_ATTEMPT=0;OPTIN_CHECK_MAX_ATTEMPTS=240;checkOptin=()=>{(0,a.Store).dispatch("checkOptin").then(({isOptedIn:t})=>{!t&&this.OPTIN_CHECK_ATTEMPT{this.checkOptInTimer=setTimeout(this.checkOptin,2e3)};getApplyDiscountCodeButton=()=>{let{submittedState:{applyDiscountCodeButton:t}}=this.payload;return this.discountRedirectUrl&&t.text?`${(0,u.escapeText)(t.text)}`:""};showModalCommon=(t,e)=>{if(this.userData=(0,a.Store).get("userData"),!this.shouldDisplay()){e&&e();return}this.showModalExec()?(setTimeout(()=>{this.__outsideEventHandler=this.outsideClickListener(this.pluginInstanceName),document.addEventListener("click",this.__outsideEventHandler)},100),t&&t()):e&&e()};getCollectedChannels=()=>{let{initialState:t}=this.payload,e=[];return t&&((0,y.shouldDisplayElement)(this.payload,this.userData,"phoneInput")&&e.push("phone"),(0,y.shouldDisplayElement)(this.payload,this.userData,"emailInput")&&e.push("email")),e};showModalExec=()=>{let{initialState:t,type:e}=this.payload,n=this.popUpType===b.POPUP_TYPE_DISCOUNT||this.hasOptInChannels||t&&t.subscribeButton.enabled;return!!this.firstRender()&&(e!==b.POPUP_TYPE_QUIZ&&this.hasUseCodeButton&&this.getDiscountRedirectUrl(),(0,a.Store).set({activeModal:!0}),(0,c.default).log({widget:this.pluginName,event:"view",variation_id:this.variationId,instance_id:this.instanceId,channels:this.getCollectedChannels(),has_conversion:n}),this.el.classList.remove("octane--visually-hidden"),!0)};dismissPopupKeyPress=t=>{(13===t.charCode||10===t.charCode)&&this.dismissPopup()};dismissPopup=t=>{this.dismissPopupCommon(t),this.oneTapOptCheckInterval&&(clearInterval(this.oneTapOptCheckInterval),this.oneTapOptCheckInterval=null),document.dispatchEvent(new CustomEvent("oct-pop-up-closed"))};dismissPopupCommon=t=>{t&&t.preventDefault(),this.el.classList.add("octane--visually-hidden"),(0,a.Cookies).set(this.cookieName||this.pluginName),(0,a.Store).set({activeModal:!1}),this.markInstanceAsDismissed(),document.removeEventListener("click",this.__outsideEventHandler)};getInstanceDismissedCookieName=()=>`${this.cookieName||this.pluginName}inst`;wasInstanceDismissed=()=>{let t=this.getInstanceDismissedCookieName(),e=(0,a.Cookies).get(t)||"";return e.includes(this.instanceId)};markInstanceAsDismissed=()=>{let t=this.getInstanceDismissedCookieName(),e=(0,a.Cookies).get(t)||"";if(e.includes(this.instanceId))return;let n=`${this.instanceId}:${Date.now()}`;(0,a.Cookies).set(t,e?`${e}!${n}`:n)};clearErrors=()=>{this.clearErrorOnElement("octane-popup__phone-input-error"),this.clearErrorOnElement("octane-email-input-error"),this.clearErrorOnElement("octane-general-api-error")};clearErrorOnElement=t=>{let e=document.getElementById(t);e&&(e.style.display="none",e.textContent="")};showError=(t,e)=>{let n=document.getElementById(t);n&&(n.style.display="block",n.textContent=e)};getOptins=t=>{let{initialState:{channels:e}}=this.payload;return this.shouldHandleOneTapSubscribe()?"":e.order.map(e=>{switch(e){case"email":return(0,y.shouldDisplayElement)(this.payload,this.userData,"emailInput")?this.getEmailOptin(t):null;case"phone":return(0,y.shouldDisplayElement)(this.payload,this.userData,"phoneInput")?this.getPhoneOptin(t):null;default:return null}}).filter(t=>null!==t).join("")};getBottomBox=(t,e)=>{let{initialState:{layout:n}}=this.payload,i="center"===n.value?"text-align: center;":"";return this.shouldHandleOneTapSubscribe()?`${this.getMobileOneTapSubscribeButton(t)}`:(0,y.shouldDisplayElement)(this.payload,this.userData,"subscribeButton")||!this.hasOptInChannels?`
${this.getSubscribeButton()} ${this.getDecline()}
Error!
`:` ${this.getDecline(t)} `};setEmail=t=>{this.email=t.target.value,this.enableOrDisableSubscribeButton()};setPhone=t=>{this.phone=t.target.value,this.enableOrDisableSubscribeButton()};hasAtLeastOneInputSelected=()=>{if((0,y.shouldDisplayElement)(this.payload,this.userData,"subscribeButton")){let t=(0,y.shouldDisplayElement)(this.payload,this.userData,"phoneInput")&&this.phone.length>0,e=(0,y.shouldDisplayElement)(this.payload,this.userData,"emailInput")&&this.email.length>0;return t||e}};getSubscribeButtonDisabledState=()=>{let{initialState:{channels:{phone:t,email:e}}}=this.payload;if(!(0,y.shouldDisplayElement)(this.payload,this.userData,"phoneInput")&&!(0,y.shouldDisplayElement)(this.payload,this.userData,"emailInput"))return!1;{let n=!(t.required&&(0,y.shouldDisplayElement)(this.payload,this.userData,"phoneInput"))||this.phone.length>0;if(!n)return!0;let i=!(e.required&&(0,y.shouldDisplayElement)(this.payload,this.userData,"emailInput"))||this.email.length>0;return!i||!this.hasAtLeastOneInputSelected()}};getPhoneCollectionCopy=(t,e)=>{if(!(0,y.shouldDisplayElement)(this.payload,this.userData,"phoneInput"))return"";let{initialState:{phoneOptinDisclaimer:n}}=this.payload;return`
${n.text}
`};preCheckSubscribeCheckbox=()=>{let t=document.getElementById(this.subscribeCheckboxElementId);t&&(t.checked=this.subscribeCheckboxChecked)};goToSubmittedState=()=>{this.render("submitted");let t=this.instanceId===v.DEFAULT_INSTANCE_ID?this.submittedStateTrackingBase:`${this.submittedStateTrackingBase}_${this.instanceId}`;this.variationId&&(t=`${t}***${this.variationId}`),this.trackSubmittedState&&this.trackingToken.request(t)};openUrlLink=(t,e,n)=>{e?(window.open(t),n&&n()):window.location.href=t};transitionToSubmittedStateAfterSubscribeClick=()=>{if((0,a.Cookies).setOptIn(this.cookieName||this.pluginName),this.markInstanceAsDismissed(),this.trackSubscribeClick(),!this.hasOptInChannels){let{initialState:{subscribeButton:{action:t,url:e}}}=this.payload;switch(t){case"submitted_state":return this.goToSubmittedState();case"submitted_state_and_link_in_new_tab":if(e.link)return this.openUrlLink(e.link,!0,this.goToSubmittedState);return this.goToSubmittedState();case"link_in_the_same_tab":return this.openUrlLink(e.link,!1,this.dismissPopup)}}this.goToSubmittedState()};fireFbPixelOptInEvent=()=>{window.fbq&&this.pixelOptInEventName&&window.fbq("trackCustom",`[Octane AI] ${this.pixelOptInEventName}`)};shouldHandleOneTapSubscribe=()=>{let{initialState:{channels:t}}=this.payload;return(0,d.default).mobile()&&(0,y.canShowMobileOneTapSubscribe)(t,this.oneTapCode&&this.oneTapNumber)};oneTapOptCheckInterval=null;oneTapOptCheckAttemptNum=0;oneTapOptCheckAttemptMaxCount=100;handleOneTapSubscribeOptIn=()=>{this.oneTapOptCheckAttemptNum++,(0,a.Store).dispatch("getUserInfo").then(t=>{t.userData.phone?(clearInterval(this.oneTapOptCheckInterval),this.oneTapOptCheckInterval=null,this.oneTapOptCheckAttemptNum=0,this.transitionToSubmittedStateAfterSubscribeClick()):this.oneTapOptCheckAttemptNum>this.oneTapOptCheckAttemptMaxCount&&(clearInterval(this.oneTapOptCheckInterval),this.oneTapOptCheckInterval=null,this.oneTapOptCheckAttemptNum=0)})};trackSubscribeClick=()=>{(0,c.default).log({widget:this.pluginName,event:"subscribe_click",variation_id:this.variationId,instance_id:this.instanceId,messenger_selected:!1,has_opt_in_channels:this.hasOptInChannels})};handleOptin=t=>{if(this.fireFbPixelOptInEvent(),(0,y.shouldDisplayElement)(this.payload,this.userData,"subscribeButton")||this.hasOptInChannels){if(this.shouldHandleOneTapSubscribe()){let t=document.getElementById(`octane-${this.pluginInstanceName}__mobile_one_tap_subscribe-button`);t&&(t.disabled=!0),this.oneTapOptCheckInterval=setInterval(this.handleOneTapSubscribeOptIn,1500);return}this.hasOptInChannels?this.subscribeUser(()=>this.transitionToSubmittedStateAfterSubscribeClick()):this.transitionToSubmittedStateAfterSubscribeClick()}else this.transitionToSubmittedStateAfterSubscribeClick()};getSubscribeButton=()=>{let{initialState:{subscribeButton:t}}=this.payload,e=(0,y.getTextFieldSuffix)(this.hasOptInChannels);return this.popUpType!==b.POPUP_TYPE_CUSTOM||this.hasOptInChannels||t.enabled?`
`:""};getMobileOneTapSubscribeButton=t=>{let{initialState:{mobileOneTapSubscribeButton:e}}=this.payload;return`
`};handleSubmittedStateCustomButtonClick=t=>{let{submittedState:{customButton:e}}=this.payload;if(!e||!e.url)return"";(0,c.default).log({widget:this.pluginName,event:"click",entity:"submittedstatecustombutton",variation_id:this.variationId,instance_id:this.instanceId}),this.openUrlLink(e.url.link,e.url.newTab)};getSubmittedStateCustomButton=()=>{let{submittedState:{customButton:t}}=this.payload;if(!t||!t.enabled||this.popUpType===b.POPUP_TYPE_CUSTOM||this.hasOptInChannels)return"";let e=(0,y.getTextFieldSuffix)(this.hasOptInChannels);return this.on(".octane-popup__submitted-state-custom-btn","click",this.handleSubmittedStateCustomButtonClick),`
`};getPhoneOptin=t=>{let{initialState:{channels:{phone:e},layout:n}}=this.payload,i=e.required?"":"Optional",o="center"===n.value?"text-align: center;":"",a=(0,y.getCountriesString)(e.countries).split("_"),s=(0,y.getCountriesDescriptionText)(a);return`
Phone number (${s} only) ${i}
${this.getCountriesFlags(a)} (+1)
Error!
`};getCountriesFlags=t=>t.map(t=>``).join("");getEmailOptin=t=>{let{initialState:{channels:{email:e},layout:n}}=this.payload,i=e.required?"":"Optional",o="center"===n.value?"text-align: center;":"";return`
Email ${i}
Error!
`};getDecline=t=>{let{initialState:{decline:e,layout:n}}=this.payload,{textFieldSuffix:i}=this;return`
${(0,u.textContent)(e,i)}
`};enableOrDisableSubscribeButton=()=>{let t=document.getElementById(`octane-${this.pluginInstanceName}__subscribe-button`);t&&(t.disabled=this.getSubscribeButtonDisabledState())}}},4294:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return p}});var i=n("6641"),r=n("7130"),o=n("4649"),a=n("6945"),s=n("5380"),u=n.n(s),l=n("1604"),c=n.n(l);let d={instances:[],get(t){return c(this.instances,{uid:t})},push(t){this.instances.push(t)},remove(t){this.instances=u(this.instances,{uid:t})}};window.__OctaneAIinstances=d;class p{constructor(){this.log=i.logger,this.userId=(0,r.generateUserId)(),this.uid=(0,i.generateId)(5),d.push(this)}isRendered(){console.warn("Not implemented")}destroy(){d.remove(this.uid)}dispatch(t,e){(0,a.default)(`${this.pluginName}.${t}`,{uid:this.uid,...e})}}p.prototype.userRef=(0,o.generateUserRef)()},8301:function(t,e,n){"use strict";n.r(e),n.d(e,{globalPopupsStyle:function(){return r},popupsTextStyle:function(){return o},generateQuizPopupStyles:function(){return a}});var i=n("9366");let r=` .octane-popup--overlay { position: fixed; top: 0; bottom: 0; left: 0; right: 0; background: rgba(0, 0, 0, 0.5); overflow-y: auto; padding: 25px 20px; z-index: 2150000000; } .octane-popup--mask { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 1; display: block; } .octane-popup { overflow: hidden; position: relative; z-index: 11; margin: 75px auto 0; max-width: 800px; min-height: 523px; position: relative; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-align: center; -ms-flex-align: center; border-radius: 4px; transition: all .2s ease; } .octane-popup__close { position: absolute; right: 10px; top: 10px; font-size: 20px; line-height: 0.9; height: 20px; width: 20px; padding-left: 4.5px; cursor: pointer; background: white; opacity: 0.5 } .octane-popup--imageLeft .octane-popup__content { padding-left: 394px; padding-top: 100px; padding-right: 66px; padding-bottom: 100px; } .octane-popup--imageLeft .octane-popup__content-with-optin-channels { padding-top: 30px; padding-bottom: 30px; } .octane-popup--imageLeft .octane-popup__img { position: absolute; left: 0; top: 0; height: 100%; width: 327px; background-size: cover; background-repeat: no-repeat; display: block; } .octane-popup__btn { padding: 5px 20px; margin-bottom: 10px; transition: opacity .2s ease; font-size: 16px; text-decoration: none; border-radius: 4px; border-width: 1px; border-style: solid; display: inline-block; } .octane-popup__get-discount-btn { margin-right: 10px; } .octane-popup__discount-buttons-interior { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; } .octane-popup__discount-buttons-interior-centered { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; } @media screen and (max-width: 900px) { .octane-popup { max-width: 650px; min-height: 400px; } .octane-popup--imageLeft .octane-popup__content { padding: 50px 30px 50px 280px; } .octane-popup--imageLeft .octane-popup__img { width: 250px; } .octane-popup__get-discount-btn { margin-bottom: 10px; text-align: center; } } @media screen and (max-width: 650px) { .octane-popup { max-width: 320px; } .octane-popup--imageLeft .octane-popup__content { padding: 20px 20px calc(62% + 20px); } .octane-popup--imageLeft .octane-popup__img { right: 0; bottom: 0; top: auto; width: 100%; height: auto; padding-top: 62%; } .octane-popup__discount-buttons-wrapper { display: -webkit-box; display: -ms-flexbox; display: flex; } .octane-popup__discount-buttons-interior-centered { -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; -webkit-box-align: center; -ms-flex-align: center; align-items: center; } } @media screen and (max-width: 750px) { .octane-popup { max-width: 550px; } .octane-popup__discount-buttons-wrapper { display: -webkit-box; display: -ms-flexbox; display: flex; } .octane-popup__discount-buttons-interior-centered { -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; -webkit-box-align: center; -ms-flex-align: center; align-items: center; } } @media screen and (max-height: 700px) { .octane-popup { margin-top: 25px; } .octane-popup__discount-buttons-wrapper { display: -webkit-box; display: -ms-flexbox; display: flex; } .octane-popup__discount-buttons-interior-centered { -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; -webkit-box-align: center; -ms-flex-align: center; align-items: center; } } .octane-popup--center { position: relative; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; max-width: 550px; min-height: 485px; padding: 30px; } .octane-popup--center .octane-popup__content { width: 100%; } .octane-popup--center .octane-popup__img { position: absolute; left: 0; top: 0; height: 100%; width: 327px; background-size: cover; background-repeat: no-repeat; display: none; } .octane-popup--center .octane-popup__highlighted { text-align: center; } .octane-popup--center .octane-popup__big-headline { text-align: center; } .octane-popup--center .octane-popup__sub-headline { text-align: center; } .octane-popup--center .octane-popup__description { text-align: center; } .octane-popup--center .octane-popup__decline { text-align: center; } .octane-popup__optin-channel-description-text { font-size: 10px; text-transform: uppercase; color: #637381; -webkit-box-flex: 1; -ms-flex-positive: 1; flex-grow: 1; margin-bottom: 4px; } .octane-popup__optin-channel-description-text-optional { font-size: 10px; color: #637381; margin-bottom: 4px; } .octane-popup__optin-channel-error { font-size: 10px; color: red; display: none; } .octane-popup__optin-channel-input { height: 36px; width: 100%; font-size: 16px; padding-top: 0; padding-bottom: 0; padding-left: 10px; -webkit-box-sizing: border-box; box-sizing: border-box; } .octane-popup__subscribe-button { border: 0; -webkit-box-shadow: none; box-shadow: none; height: 44px; font-size: 18px; line-height: 20px; padding-left: 20px; padding-right: 20px; cursor: pointer; } .octane-popup__mobile_one_tap_subscribe-button { width: 100%; text-align: center; } .octane-popup__optin-phone-collection-copy { font-size: 10px; display: block; line-height: normal; } .octane-popup__flex-align-items-center { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; } .octane-popup__flex-auto { -webkit-box-flex: 1; -ms-flex: 1 0 auto; flex: 1 0 auto; } .octane-popup__flex-column { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; } .octane-popup__display-flex { display: -webkit-box; display: -ms-flexbox; display: flex; } .octane-popup__display-flex-justify-content-center { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; } .octane-popup__justify-content-center { -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; } .octane-popup__position-relative { position: relative; } .octane-popup__optin-center-content { max-width: 340px; flex-grow: 1; -webkit-box-flex: 1; -ms-flex-positive: 1 } .octane-popup__phone-input-container { border: 1px solid #c4cdd5; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -ms-flex-align: center; align-items: center; background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#f9fafb)); background: -o-linear-gradient(#ffffff, #f9fafb); background: linear-gradient(#ffffff, #f9fafb); border-radius: 3px; border-bottom-right-radius: 0; border-top-right-radius: 0; } .octane-popup__phone-input-area-code { margin-left: 5px; margin-right: 5px; } .octane-popup__flag-usa { background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAA7EAAAOxAGVKw4bAAACfklEQVRYw+3WvU9TURjH8W97Dy0tihRKXwBLobZAwVZoYdJJRDFxcjVx0f9BB+OkQRYHF/0LnB2MLrYkDiZKW15FuJdShAKhacFW5VoKdWji7HCTu/S3nOnkfM7zPDk5UE899egcQ0uLp7XR3Nz+vxsaqqcEj3IYNDg8VynnhNt18f7ExORUIrHGSMRPMiEzPHyBubl1QuFelhY3GBjwIMtZvF4Xh1s73F3/qMntk2rxgQCYm1MYG+snkVhjdKyPVFIhEvEzP58mFOplZWUTf6CLzcweJrOFa5/eaQKoxj4gACLRAF8+rzI62sfs7CojkQCppEz4ko/FhVoFFCWLx+OklMuz/PS5JoDNjfUaIJmQiUYDpFIyIyN+FubXCYd9LC9lCAa7/5V/ZyfPya8jRFO7JgBhtdQAoVAvsrzN0FAPipJlcNBLOr1Lf7+Hra19enpc7OcOcTha+HNkwXfvjiaA9Ey8BsjnizgcNgqFEk5nK/l8EafTRqFQxG4/R7H0m+azVsrlCj/3csTHb2sCWFBLNYCqlrFazahqGYvFRLlcobHRRKVyQrVapXJcwWxqQFXLCFsL46/fajSEsRqgs8uOvJbF7+9EUbL4fB2k07t4vS4ymT08Hgfb2znc7jYOdnOsTL/QBPB9Q0FEowHOd9pxO20IIeF21dYOdyuSkOjqsmM0GujudmIAzD0OpGJGE4DRbELcvBLk1vXLujzDGzMxxOLjaZqevdIFMK8WEeEnDxm/MakL4DQeR2y/ec+3rxldAFtpBWGQJAxGSReAUUiIjsmrBHRqQSYeQyw8msI69VKfITz6gSHYeKa5TWqw6QEonBwf1P+E9dSje/4CYKHotYeNw0cAAAAASUVORK5CYII=') no-repeat center; display: inline-block; margin-left: 5px; min-width: 20px; height: 100%; background-size: contain; } .octane-popup__flag-canada { background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAA7EAAAOxAGVKw4bAAABkElEQVRYw+2WsUrDUBSGv5BoocEHEFORQskg+AKCdFDI6NRWxFUzuYqztc9QXVpwcXNRLA0d+hAFpeCUwbEQA7r0OFxKEZJaktbF/HA53Px/Tn7OPTkJZMiQ4b9De4CjQziNVXS7cHCQLHuvB/v7sXQHbg1gEyjHW9TiH/D1pWIuF82L/GaxY6Sq382NiufniVMkMzAYgO9Dva72tg2WBdvbf2TAMMBxpnvHgZeXJVfA92F9He7u4PgYTBPCUHGmCcUitNtwcgLv77CxMV/eB7gQ1S7Ry/NERERcV2RtTUTXRc7ORGx7qrFtdU3XlcZ11T2eJ7NyP8PF/BUol6HZ/Nl8E7y+qgUQBEq70CMQgaen+Q/28REqlQUa0DRotaBQgEZjtvbyEq6uZs+PRE2o63B9DTs7UKtFa+7voVpd8mu4uwt7e1AqQT4P4zF8fsJwqLilzwHLgn5/OpAg0QBKN4gmCENYWUmVIp2B1dX4D9G8BkJ4G0EnVhEEMBpFc1tbKsbxk0kZgw94y/6IMmTI8A27dpsTWkfMEAAAAABJRU5ErkJggg==') no-repeat center; display: inline-block; margin-left: 5px; min-width: 20px; height: 100%; background-size: contain; } .octane-popup__input { border: 1px solid #c4cdd5; border-radius: 3px; } .octane-popup__phone-input { border-bottom-left-radius: 0; border-top-left-radius: 0; border-left: 0; } .octane-popup__mt-20 { margin-top: 20px; }`;function o(t){return` .octane-popup__highlighted { font-size: 16px; font-weight: 600; text-transform: uppercase; line-height: 1.2; font-family: ${t?"inherit":"sans-serif"}; } .octane-popup__big-headline { font-size: 72px; font-weight: 600; line-height: 1; font-family: ${t?"inherit":"sans-serif"}; } .octane-popup__sub-headline { font-size: 20px; font-weight: 600; margin-bottom: ${t?"15px":"10px"}; line-height: 1.2; font-family: ${t?"inherit":"sans-serif"}; } .octane-popup__description { font-size: 16px; margin-bottom: ${t?"15px":"10px"}; line-height: 1.3; font-family: ${t?"inherit":"sans-serif"}; } .octane-popup__decline > span { font-size: 14px; text-decoration: underline; cursor: pointer; font-family: ${t?"inherit":"sans-serif"}; } @media screen and (max-width: 750px) { .octane-popup__highlighted { font-size: 14px; } .octane-popup__big-headline { font-size: 52px; } .octane-popup__sub-headline { font-size: 18px; } .octane-popup__description { font-size: 14px; } }`}function a(t,e){let{quizState:n}=t;if(!n)return"";let r=n.backgroundImage,o=(0,i.getBackgroundColor)(r,n.modalBackground),a=n.layout.value;return` .octane-${e}--quiz-state { border-radius: ${n.roundCornersPx}px; } ${o?`.octane-${e}--quiz-state { background-color: ${o}; } .octane-${e}--quiz-state .octane-ai-quiz-rendered > div { background-color: transparent; }`:""} ${n.image&&n.image.url?`.octane-${e}--quiz-state .octane-popup__img { background-image: url(${n.image.url}); background-position: ${n.image.horizontalAlignment} ${n.image.verticalAlignment}; }`:""} ${"imageLeft"===a?`.octane-${e}--quiz-state .octane-popup__content { height: 100%; max-height: 80vh; min-height: inherit; overflow: auto; padding: 0 0 0 327px; width: 100%; } @media screen and (max-width: 900px) { .octane-${e}--quiz-state .octane-popup__content { padding: 0 0 0 250px; } } @media screen and (max-width: 650px) { .octane-${e}--quiz-state .octane-popup__content { padding: 0; } .octane-${e}--quiz-state .octane-popup__img { position: sticky; } }`:""} ${"center"===a?`.octane-${e}--quiz-state { max-width: 800px; padding: 0; } .octane-${e}--quiz-state .octane-popup__content { height: 100%; max-height: 80vh; min-height: inherit; overflow: auto; padding: 0; }`:""} `}},2479:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return a}});var i=n("8301"),r=n("9366");let o=(t,e)=>{let{initialState:n,submittedState:i}=t;if(!n)return"";let o=(0,r.getBackgroundColor)(n.backgroundImage,n.modalBackground),a=i.backgroundImage.useInitial,s=a?n.backgroundImage:i.backgroundImage,u=(0,r.getBackgroundColor)(s,i.modalBackground);return` .octane-${e}--initial-state { background-color: ${o}; border-radius: ${n.roundCornersPx}px; } ${n.image.url?`.octane-${e}--initial-state .octane-popup__img { background-image: url(${n.image.url}); background-position: ${n.image.horizontalAlignment} ${n.image.verticalAlignment}; }`:""} .octane-${e}--submitted-state { background-color: ${u}; border-radius: ${n.roundCornersPx}px; } ${i.image.url&&"false"===i.image.useInitial?`.octane-${e}--submitted-state .octane-popup__img { background-image: url(${i.image.url}); background-position: ${i.image.horizontalAlignment} ${i.image.verticalAlignment}; }`:""} ${"true"===i.image.useInitial&&n.image.url?`.octane-${e}--submitted-state .octane-popup__img { background-image: url(${n.image.url}); background-position: ${n.image.horizontalAlignment} ${n.image.verticalAlignment}; }`:""} .octane-${e} .octane-popup__btn { border-color: ${i.button.borderColor}; color: ${i.button.color}; background-color: ${i.button.backgroundColor}; } .octane-${e} .octane-popup__get-discount-btn { border-color: ${i.applyDiscountCodeButton.borderColor}; color: ${i.applyDiscountCodeButton.color}; background-color: ${i.applyDiscountCodeButton.backgroundColor}; } ${i.customButton?`.octane-${e} .octane-popup__submitted-state-custom-btn { border-color: ${i.customButton.borderColor}; color: ${i.customButton.color}; background-color: ${i.customButton.backgroundColor}; margin-right: 10px; cursor: pointer; }`:""} `};function a(t,e){let{inheritStyles:n}=t;return` ${(0,i.popupsTextStyle)(n)} ${o(t,e)} ${(0,i.generateQuizPopupStyles)(t,e)} `}},3236:function(t,e,n){"use strict";n.r(e),n.d(e,{DiscountPopupPlugin:function(){return o}});var i=n("5567"),r=n("4294");class o{instances=[];constructor(t){if(!t.enabled)return;this.selectInstanceToDisplay(t.payload,document.documentElement)}selectInstanceToDisplay(t,e){t.map(({id:t,enabled:n,instance_payload:i})=>n?new a(e,i,t):null).filter(t=>null!==t).map(t=>({instance:t,shouldDisplay:t.shouldDisplay(),displayDelay:t.getDisplayDelay()})).filter(({shouldDisplay:t})=>t).forEach(({instance:t})=>t.init())}}class a extends r.default{pluginName="discountpopup";plugin=null;constructor(t,e,n){super(),this.plugin=new i.default(e,n)}shouldDisplay=()=>this.plugin.shouldDisplay();getDisplayDelay=()=>parseInt(this.plugin.payload.placement.delayTime);init=()=>{this.plugin.init()}}},5567:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return _}});var i=n("5166"),r=n.n(i),o=n("3961"),a=n.n(o),s=n("2028"),u=n("4649"),l=n("7349"),c=n("2208"),d=n("7090"),p=n("7992"),h=n("8008"),f=n("2479");let{botId:m,octaneDomain:g,pageId:y}=s.default,v=[];document.addEventListener("oct-pop-up-closed",()=>{if(v.length)for(;v.length;){let t=v.shift();if(t){if(t.shouldDisplay()){t.showModal();break}}else break}});class b extends l.BasePluginInstance{pluginName="discountpopup";useCodeTrackingBase="discount:usecode";submittedStateTrackingBase="discount:submitted";pixelOptInEventName="Welcome pop-up opt-in";constructor(t,e){super(t,e),this.pluginInstanceName=`${this.pluginName}-${this.instanceId}`,this.subscribeCheckboxElementId=`oct-${this.pluginInstanceName}-subscribe-checkbox`}createStyles=()=>{(0,u.Styles).append((0,f.default)(this.payload,this.pluginInstanceName)),this.createCommonStyles()};firstRender=()=>{if(this.payload.type===h.POPUP_TYPE_QUIZ){let{quizState:{alwaysShow:t,quizId:e}}=this.payload;if(!t&&(0,u.Cookies).hasCompletedQuiz(e))return!1;let n=document.createElement("script");n.src=`${g}/${m}/quiz.js`,n.async=!0,this.render("quiz"),document.body.appendChild(this.el),document.body.appendChild(n)}else this.render("initial"),document.body.appendChild(this.el),this.preCheckSubscribeCheckbox(),(0,d.$get)("/cart.js");return this.setupEvents(),!0};init=()=>{this.createStyles(),setTimeout(this.showModalWrapper,1e3*a(this.payload,"placement.delayTime")||0)};waitForUserInfoInterval=null;waitForUserInfoAttemptNum=0;waitForUserInfoAttemptMaxCount=10;waitForUserInfo=()=>{if(this.waitForUserInfoAttemptNum++,!(0,u.Store).get("waitingForUserInfo"))return clearInterval(this.waitForUserInfoInterval),this.waitForUserInfoInterval=null,this.showModal();this.waitForUserInfoAttemptNum>this.waitForUserInfoAttemptMaxCount&&(clearInterval(this.waitForUserInfoInterval),this.waitForUserInfoInterval=null)};showModalWrapper=()=>{(0,u.Store).get("activeModal")?v.push(this):this.showModal()};showModal=()=>{(0,u.Store).get("waitingForUserInfo")?this.waitForUserInfoInterval=setInterval(this.waitForUserInfo,1e3):this.showModalCommon()};render(t){let e={initial:this.initialState,submitted:this.submittedState,quiz:this.quizState};this.el.innerHTML=(0,c.innerHtmlTemplate)(e[t]())}initialState=()=>{let{initialState:{highlighted:t,bigHeadline:e,subHeadline:n,image:i,description:o,layout:a,backgroundImage:s}}=this.payload,{textFieldSuffix:u}=this,l=s.url,d="center"===a.value,h=`
${(0,c.textContent)(t,u)}
${(0,c.textContent)(e,u)}
${(0,c.textContent)(n,u)}
${(0,c.shouldDisplayImage)(i)}
${(0,c.textContent)(o,u)}
${this.getOptins(l)} ${this.getBottomBox(l,d)} ${this.getPhoneCollectionCopy(l,d)} `,f={layout:a.value,pluginInstanceName:this.pluginInstanceName,content:h,className:`octane-${this.pluginInstanceName}--initial-state`,haveBackground:s.url,state:"initial",hasOptInChannels:(0,p.shouldDisplayElement)("subscribeButton")};return(0,c.contentHtmlTemplate)(f)};submittedState=()=>{let{submittedState:{headline:t,image:e,description:n,layout:i,backgroundImage:o},initialState:a}=this.payload,{textFieldSuffix:s}=this,u=i.useInitial?a.layout.value:i.value,l=o.useInitial?a.backgroundImage:o,d=l.url,p=r({"octane-popup__position-relative":d}),h="center"===u?r(p,"octane-popup__justify-content-center"):p,f="center"===u?"octane-popup__discount-buttons-interior-centered":"",m=`
${(0,c.textContent)(t,s)}
${(0,c.shouldDisplayImage)(e)}
${(0,c.textContent)(n,s)}
${this.getSubmittedStateCustomButton()} ${this.getApplyDiscountCodeButton()}
${h?"":'
'}
`,g={layout:u,pluginInstanceName:this.pluginInstanceName,content:m,className:`octane-${this.pluginInstanceName}--submitted-state`,haveBackground:d,state:"submitted"};return(0,c.contentHtmlTemplate)(g)};quizState=()=>{let{quizState:{backgroundImage:t,image:e,quizId:n,layout:i}}=this.payload,r=`
${(0,c.shouldDisplayImage)(e)} `,o={content:r,haveBackground:!!t.url,layout:i.value,pluginInstanceName:this.pluginInstanceName,className:`octane-${this.pluginInstanceName}--quiz-state`,state:"quiz",quizId:n};return(0,c.contentHtmlTemplate)(o)}}var _=b},6945:function(t,e,n){"use strict";function i(t,e={}){let n=new CustomEvent(`octane.${t}`,{detail:e}),i=new CustomEvent("octane",{detail:{eventName:t,...e}});window.dispatchEvent(i),window.dispatchEvent(n)}n.r(e),n.d(e,{default:function(){return i}}),!function(){if("function"!=typeof window.CustomEvent)window.CustomEvent=function(t,e){e=e||{bubbles:!1,cancelable:!1,detail:null};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}}()},7943:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return a}});var i=n("8301"),r=n("9366");let o=(t,e)=>{let{initialState:n,submittedState:i}=t;if(!n)return"";let o=(0,r.getBackgroundColor)(n.backgroundImage,n.modalBackground),a=i.backgroundImage.useInitial,s=a?n.backgroundImage:i.backgroundImage,u=(0,r.getBackgroundColor)(s,i.modalBackground);return` .octane-${e} .octane-popup__btn { border-color: ${i.button.borderColor}; color: ${i.button.color}; background-color: ${i.button.backgroundColor}; } .octane-${e} .octane-popup__get-discount-btn { border-color: ${i.applyDiscountCodeButton.borderColor}; color: ${i.applyDiscountCodeButton.color}; background-color: ${i.applyDiscountCodeButton.backgroundColor}; } .octane-${e}--initial-state { background-color: ${o}; border-radius: ${n.roundCornersPx}px; } ${n.image.url?`.octane-${e}--initial-state .octane-popup__img { background-image: url(${n.image.url}); background-position: ${n.image.horizontalAlignment} ${n.image.verticalAlignment}; }`:""} .octane-${e}--submitted-state { background-color: ${u}; border-radius: ${n.roundCornersPx}px; } ${i.image.url&&"false"===i.image.useInitial?`.octane-${e}--submitted-state .octane-popup__img { background-image: url(${i.image.url}); background-position: ${i.image.horizontalAlignment} ${i.image.verticalAlignment}; }`:""} ${"true"===i.image.useInitial&&n.image.url?`.octane-${e}--submitted-state .octane-popup__img { background-image: url(${n.image.url}); background-position: ${n.image.horizontalAlignment} ${n.image.verticalAlignment}; }`:""} ${i.customButton?`.octane-${e} .octane-popup__submitted-state-custom-btn { border-color: ${i.customButton.borderColor}; color: ${i.customButton.color}; background-color: ${i.customButton.backgroundColor}; margin-right: 10px; cursor: pointer; }`:""} `};function a(t,e){let{inheritStyles:n}=t;return` ${(0,i.popupsTextStyle)(n)} ${o(t,e)} ${(0,i.generateQuizPopupStyles)(t,e)} `}},9724:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return c}});var i=n("5890"),r=n.n(i),o=n("3961"),a=n.n(o),s=n("2457");let u=[];class l{constructor(t){this.cb=t,this._active=!0}start=()=>{this._active=!0};stop=()=>{this._active=!1};execute=()=>{this._active&&this.cb()}}var c={plugin:new class t{config={key:"exit-intent",threshold:200};constructor(t){this.callbacks=t}setExcludeHash(){this.excludeHash=!0}init(){let t=window,{document:e,document:{documentElement:n},history:i}=t;this.lastHistoryState=i.state,((0,s.default).mobile()||(0,s.default).tablet())&&(i.pushState({octane:this.config.key},null),this.listenTo(t,"popstate",this.handlePopstate)),this.listenTo(e,"visibilitychange",this.handleVisibility),this.listenTo(n,"mouseout",this.handleMouseLeave),this.listenTo(n,"mousemove",r(this.handleMouseMove,3)),this.listenTo(n,"mouseover",this.handleMouseEnter)}callback=()=>{this.callbacks.forEach(t=>t.execute())};handleVisibility(){if(!document.hidden)return this.callback()}handleMouseLeave({clientY:t}){(t<0||this.lastMouseClientY<15)&&(this.timeout=setTimeout(this.callback,this.config.threshold))}handleMouseEnter(){clearTimeout(this.timeout)}handleMouseMove({clientY:t}){this.lastMouseClientY=t}handlePopstate({state:t}){(!this.excludeHash||!window.location.hash)&&a(this.lastHistoryState,"octane")===a(t,"octane")&&this.callback(),this.lastHistoryState=t}listenTo(t,e,n){t.addEventListener(e,n.bind(this))}}(u),add(t){let e=new l(t);return u.push(e),e}}},4435:function(t,e,n){"use strict";n.r(e),n.d(e,{ExitIntentPlugin:function(){return i.default}});var i=n("6584")},6584:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return g}});var i=n("5166"),r=n.n(i),o=n("2028"),a=n("4649"),s=n("7349"),u=n("2208"),l=n("7992"),c=n("8008"),d=n("7943"),p=n("9724");let{botId:h,octaneDomain:f}=o.default;class m extends s.BasePluginInstance{pluginName="exitintent";useCodeTrackingBase="exitintent:usecode";submittedStateTrackingBase="exitintent:submitted";pixelOptInEventName="Exit intent pop-up opt-in";constructor(t,e){super(t,e),this.pluginInstanceName=`${this.pluginName}-${this.instanceId}`,this.subscribeCheckboxElementId=`oct-${this.pluginInstanceName}-subscribe-checkbox`}createStyles=()=>{(0,a.Styles).append((0,d.default)(this.payload,this.pluginInstanceName)),this.createCommonStyles()};firstRender=()=>{if(this.payload.type===c.POPUP_TYPE_QUIZ){let{quizState:{alwaysShow:t,quizId:e}}=this.payload;if(!t&&(0,a.Cookies).hasCompletedQuiz(e))return!1;let n=document.createElement("script");n.src=`${f}/${h}/quiz.js`,n.async=!0,this.render("quiz"),document.body.appendChild(this.el),document.body.appendChild(n)}else this.render("initial"),document.body.appendChild(this.el),this.preCheckSubscribeCheckbox();return this.setupEvents(),!0};init=()=>{let{placement:{exclude_hash:t}}=this.payload;this.createStyles(),(0,p.default).plugin.init(),t&&(0,p.default).plugin.setExcludeHash(),this.observer=(0,p.default).add(this.showModal)};showModal=()=>{!(0,a.Store).get("waitingForUserInfo")&&this.showModalCommon(this.observer.stop)};render(t){let e={initial:this.initialState,submitted:this.submittedState,quiz:this.quizState};this.el.innerHTML=(0,u.innerHtmlTemplate)(e[t]())}initialState=()=>{let{initialState:{highlighted:t,bigHeadline:e,subHeadline:n,image:i,description:o,layout:a,backgroundImage:s}}=this.payload,{textFieldSuffix:c}=this,d=s.url,p="center"===a.value,h=`
${(0,u.textContent)(t,c)}
${(0,u.textContent)(e,c)}
${(0,u.textContent)(n,c)}
${(0,u.shouldDisplayImage)(i)}
${(0,u.textContent)(o,c)}
${this.getOptins(d)} ${this.getBottomBox(d,p)} ${this.getPhoneCollectionCopy(d,p)} `,f={layout:a.value,pluginInstanceName:this.pluginInstanceName,content:h,className:`octane-${this.pluginInstanceName}--initial-state`,haveBackground:s.url,state:"initial",hasOptInChannels:(0,l.shouldDisplayElement)("subscribeButton")};return(0,u.contentHtmlTemplate)(f)};submittedState=()=>{let{submittedState:{headline:t,image:e,description:n,layout:i,backgroundImage:o},initialState:a}=this.payload,{textFieldSuffix:s}=this,l=i.useInitial?a.layout.value:i.value,c=o.useInitial?a.backgroundImage:o,d=c.url,p=r({"octane-popup__position-relative":d}),h="center"===l?r(p,"octane-popup__justify-content-center"):p,f="center"===l?"octane-popup__discount-buttons-interior-centered":"",m=`
${(0,u.textContent)(t,s)}
${(0,u.shouldDisplayImage)(e)}
${(0,u.textContent)(n,s)}
${this.getSubmittedStateCustomButton()} ${this.getApplyDiscountCodeButton()}
${h?"":'
'}
`,g={layout:l,pluginInstanceName:this.pluginInstanceName,content:m,className:`octane-${this.pluginInstanceName}--submitted-state`,haveBackground:d,state:"submitted"};return(0,u.contentHtmlTemplate)(g)};quizState=()=>{let{quizState:{backgroundImage:t,image:e,quizId:n,layout:i}}=this.payload,r=`
${(0,u.shouldDisplayImage)(e)} `,o={content:r,haveBackground:!!t.url,layout:i.value,pluginInstanceName:this.pluginInstanceName,className:`octane-${this.pluginInstanceName}--quiz-state`,state:"quiz",quizId:n};return(0,u.contentHtmlTemplate)(o)}}var g=class t{instances=[];constructor(t){if(!t.enabled)return;this.selectInstanceToDisplay(t.payload)}selectInstanceToDisplay(t){let e=t.map(({id:t,enabled:e,instance_payload:n})=>e?new m(n,t):null).filter(t=>null!==t),n=e.map(t=>({instance:t,shouldDisplay:t.shouldDisplay()})).filter(t=>t.shouldDisplay);for(let t of n)t.instance.init()}}},2208:function(t,e,n){"use strict";n.r(e),n.d(e,{innerHtmlTemplate:function(){return s},contentHtmlTemplate:function(){return u},shouldDisplayImage:function(){return l},textContent:function(){return c},escapeText:function(){return d}});var i=n("1149"),r=n.n(i),o=n("5166"),a=n.n(o);function s(t){return`
${t}
`}function u(t){let{layout:e,pluginInstanceName:n,content:i,className:r,haveBackground:o,state:s,hasOptInChannels:u,quizId:l}=t;if(!n)return"";let c=o?`oct-${n}-background-image-${s}`:"",d=a("octane-popup__content",{"octane-popup__content-with-optin-channels":u}),p="quiz"===s?`is-quiz-popup-${l}`:"";return`
${i}
×
`}function l(t){return t.url?'
':""}function c(t,e=""){return t.enabled?`${r(t[`text${e}`])}`:""}function d(t){return r(t)}},7653:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return C}});var i=n("2028"),r=n("3236"),o=n("9801"),a=n("4435"),s=n("5109"),u=n("8969"),l=n("9154"),c=n("6945"),d=n("5519"),p=n("8301"),h=n("4649"),f=n("8313"),m=n("5115"),g=n("6641");let{css:y}=i.default.addToCartCheckbox.payload,{use_targeting:v,octaneDomain:b,botId:_}=i.default,x=[s.TrackingPlugin,o.AddToCartPlugin,l.AttributeCartOrCheckoutPlugin,d.KlaviyoSyncPlugin],w={discountPopup:r.DiscountPopupPlugin,addToCartPopup:u.AddToCartPopupPlugin,exitIntent:a.ExitIntentPlugin};(0,h.Styles).append(` .octane--visually-hidden { position: absolute !important; left: -99999px !important; top: -99999px !important; right: auto !important; bottom: auto !important; z-index: -1 !important; opacity: 0.001 !important; } .octane-plugin__checkbox iframe { overflow: hidden; border: none; visibility: visible; min-height: 70px; } .octane-plugin__checkbox--withbox iframe { min-height: 150px; } .octane-center-align { text-align: center; } ${p.globalPopupsStyle} ${y||""} `);let k=()=>{let t=(0,g.findHashParameter)("r");t&&(0,m.$post)(i.default.octaneDomain+"/_quiz_/shared_payload",{bot_id:i.default.botId,quiz_shared_result_id:t}).then(({use_popup:e,container_payload:n,container_type:i,quiz_id:r})=>{e&&new f.default(n,i,r,t)},t=>{console.error(t)})},S=()=>new Promise((t,e)=>{if(!v)return t(Object.keys(w).map(t=>new w[t]({...i.default[t]})));(0,h.Store).dispatch("getPopUps").then(({pop_ups:e})=>t(Object.keys(w).map(t=>new w[t]({...e[t]})))).catch(t=>e(t))}),T=()=>{let t=x.map(t=>new t(document.documentElement)),e=[];return S().then(t=>{e=t}).catch(t=>console.error("pop ups plugin initialization error",t)).finally(()=>{window.__OctaneAI=document.body.__OctaneAI=[...t,...e],!v&&(0,m.$post)(`${b}/${_}/utrk`,{tracking_id:"view",user_ref:(0,h.Cookies).get("user")})})};var C={add(t){x.push(t)},init(){(!window.__OctaneAI||!document.body.__OctaneAI)&&(0,h.Store).dispatch("getUserInfo").then(()=>Promise.all([T(),new Promise(k)])).then(()=>(0,c.default)("ready",{config:i.default}))}}},5519:function(t,e,n){"use strict";n.r(e),n.d(e,{KlaviyoSyncPlugin:function(){return l}});var i=n("3961"),r=n.n(i),o=n("2028"),a=n("7090"),s=n("4294"),u=n("4649");class l extends s.default{constructor(){super(),this.userRef=(0,u.generateUserRef)(),this.maybeSendSyncRequest()}processData(t,e){let{email:n,first_name:i,last_name:r}=e;this.log("KlaviyoSyncPlugin: fetched our data",n,i,r),n&&(t.push(["identify",{$email:n,$first_name:i,$last_name:r}]),this.log("KlaviyoSyncPlugin: klaviyo identification with our data completed"))}maybeSyncData(t){let e=r(o.default,"octaneDomain"),n=r(o.default,"botId"),i=(0,u.Store).get("userData");i?(this.log("KlaviyoSyncPlugin: fetching user data from Store"),this.processData(t,i)):(this.log("KlaviyoSyncPlugin: fetching user data from backend"),(0,a.$post)(`${e}/get_user_info/${n}`,{user_ref:this.userRef}).then(e=>this.processData(t,e),t=>this.log("KlaviyoSyncPlugin: error requesting for data",t)))}maybeSendSyncRequest(){let t=r(window,"_learnq");if(!t){this.log("KlaviyoSyncPlugin: _learnq is undefined");return}if(t.isIdentified){if(t.isIdentified()){this.log("KlaviyoSyncPlugin: person is already identified");return}}else if(t.identify){let e=t.identify();if(this.log("KlaviyoSyncPlugin: person",e),!e){this.log("KlaviyoSyncPlugin: person is empty");return}if(e.$email){this.log("KlaviyoSyncPlugin: person is already identified");return}}else this.log("KlaviyoSyncPlugin: identify and isIndentified not defined");this.maybeSyncData(t)}}},9642:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return r}});var i=n("8301");function r(t,e){let{inheritStyles:n}=t;return` ${(0,i.popupsTextStyle)(n)} ${(0,i.generateQuizPopupStyles)(t,e)} `}},8313:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return p}});var i=n("2028"),r=n("4649"),o=n("7349"),a=n("2208"),s=n("9642"),u=n("2208");let{botId:l,octaneDomain:c}=i.default;class d extends o.BasePluginInstance{pluginName="sharedresultpage";quizId=null;constructor(t,e,n){super(t,e),this.pluginInstanceName=`${this.pluginName}-${this.instanceId}`,this.subscribeCheckboxElementId=`oct-${this.pluginInstanceName}-subscribe-checkbox`,this.quizId=n}createStyles=()=>{(0,r.Styles).append((0,s.default)(this.payload,this.pluginInstanceName)),this.createCommonStyles()};firstRender=()=>{let t=document.createElement("script");return t.src=`${c}/${l}/quiz.js`,t.async=!0,this.render(),document.body.appendChild(this.el),document.body.appendChild(t),this.setupEvents(),!0};init=()=>{this.createStyles(),this.showModal()};markInstanceAsDismissed=()=>{};shouldDisplay=()=>!0;showModal=()=>this.showModalCommon();render(){this.el.innerHTML=(0,a.innerHtmlTemplate)(this.quizState())}quizState=()=>{let{quizState:{backgroundImage:t,image:e,layout:n}}=this.payload,i=`
${(0,u.shouldDisplayImage)(e)} `,r={content:i,haveBackground:!!t.url,layout:n.value,pluginInstanceName:this.pluginInstanceName,className:`octane-${this.pluginInstanceName}--quiz-state`,state:"quiz",quizId:this.quizId};return(0,a.contentHtmlTemplate)(r)}}var p=class t{constructor(t,e,n){new d(t.instance_payload,e,n).init()}}},5109:function(t,e,n){"use strict";n.r(e),n.d(e,{TrackingPlugin:function(){return h},TrackingToken:function(){return f}});var i=n("2028"),r=n("6641"),o=n("7090"),a=n("8759"),s=n("3961"),u=n.n(s),l=n("4294"),c=n("4649"),d=n("5519");let{order_id:p}=u(window,"Shopify.checkout",{order_id:""});(0,r.logger)("Tracking Plugin - window.Shopify",window.Shopify);class h extends l.default{pluginName="tracking";constructor(){super(),this.userRef=(0,c.generateUserRef)(),this.initLinksTracking(),this.initUserTracking()}initLinksTracking(){let t=(0,r.findGetParameter)("__octane_trk");this.log("octaneGetTracking from window.location = ",t),!t&&document.referrer&&(t=(0,r.findGetParameter)("__octane_trk",document.referrer),this.log("octaneGetTracking from document.referrer = ",t)),t&&((0,c.Cookies).set("linktrack",t,{expires:30}),(0,r.removeGetParameter)("__octane_trk")),a.default.isThankYou&&(this.log("orderThankYouPage"),this.submitLinksTracking())}initUserTracking(){let t=(0,r.findGetParameter)("__octane_utrk");this.log("User tracking from window.location = ",t),!t&&document.referrer&&(t=(0,r.findGetParameter)("__octane_utrk",document.referrer),this.log("User tracking from document.referrer = ",t)),t&&(0,c.Cookies).setOptIn(),(t||a.default.isThankYou)&&(this.submitUserTracking(t),(0,r.removeGetParameter)("__octane_utrk"))}submitLinksTracking(){let t=u(i.default,"octaneDomain"),e=u(i.default,"botId"),n=(0,c.Cookies).get("linktrack")||!1,r=(0,c.Cookies).get("sharedresult")||!1;if(this.log("linkTracking - ",n),!t||!p||!(n||r)){this.log(`not calling /linkstracking endpoint - order_id: ${p}`,u(window,"Shopify.checkout"));return}(0,o.$post)(`${t}/linkstracking/${e}`,{token:n,shared_result:r,order_id:p})}submitUserTracking(t=""){let e=u(i.default,"octaneDomain"),n=u(i.default,"botId");this.log("userTracking - ",this.userRef,", ",t),e&&this.userRef&&(p||t)&&((0,c.Store).set({waitingForUserInfo:!0}),(0,o.$post)(`${e}/usertracking/${n}`,{user_ref:this.userRef,token:t,order_id:p}).then(e=>{if(!t){(0,c.Store).set({waitingForUserInfo:!1});return}new d.KlaviyoSyncPlugin,(0,c.Store).dispatch("getUserInfo")}))}}class f{octaneDomain=null;botId=null;constructor(t,e){this.octaneDomain=t,this.botId=e}request=t=>{this.octaneDomain&&this.botId&&(0,o.$post)(`${this.octaneDomain}/${this.botId}/trkid`,{tracking_id:t}).then(t=>{t.token&&(0,c.Cookies).set("linktrack",t.token)},()=>{})}}},7648:function(t,e,n){"use strict";n.r(e),n("8916"),n("4645"),n("3679")},9880:function(t,e,n){"use strict";n.r(e),n("7648");var i=n("4365"),r=n.n(i),o=n("7653"),a=n("6641");r(document).ready(()=>{(0,a.logger)("Initializing plugins. [jQuery]"),(0,o.default).init()})},1076:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return d}});var i=n("2028"),r=n("7090"),o=n("7130"),a=n("5657"),s=n.n(a);let u=(t,e,n)=>`${t}${e}${n}`,l=(0,o.generateUserId)(),c={items:{},has({widget:t,instance_id:e,variation_id:n,event:i}){return s(this.items[u(t,e,n)],i)},set({widget:t,instance_id:e,variation_id:n,event:i}){let r=u(t,e,n);this.items[r]=[...this.items[r]||[],i]}};var d={log(t){!c.has(t)&&(c.set(t),(0,r.$post)(`${i.default.octaneDomain}/ibp/ping`,{bot_id:i.default.botId,user_ref:l,ts:+new Date/1e3,...t}))}}},2457:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return i}});var i=n("9448").default},4749:function(t,e,n){"use strict";n.r(e),n.d(e,{updateConditionsFromEndTrigger:function(){return r}});var i=n("4649");let r=(t,e,n)=>{switch(e){case"this_instance":n.push(!t.wasInstanceDismissed());break;case"this_pop_up":n.push(!(0,i.Cookies).has(t.cookieName||t.pluginName));break;case"any_pop_up":n.push(...[!(0,i.Cookies).has("atcpopup"),!(0,i.Cookies).has("discountpopup"),!(0,i.Cookies).has("exitintent")])}}},6641:function(t,e,n){"use strict";n.r(e),n.d(e,{logger:function(){return o},generateId:function(){return s},findGetParameter:function(){return u},findHashParameter:function(){return l},removeGetParameter:function(){return d},encodeText:function(){return p},inDom:function(){return h},waitUntilReady:function(){return function t(e,n,i){e()?n():setTimeout(()=>t(e,n,i),i)}}});let i=(()=>{let t="test-octane-ai";try{return localStorage.setItem(t,t),localStorage.removeItem(t),!0}catch(t){return!1}})(),r=i&&"true"===localStorage.getItem("octane-log"),o=(...t)=>{if(i&&window.console&&r)return console.log("\uD83E\uDD16 OctaneAI https://octaneai.com –",...t)},a=()=>((1+Math.random())*65536|0).toString(16).substring(1),s=(t=10)=>{let e="";if(!t||t<1)return"";for(;t--;)e+=a();return e};function u(t,e=window.location.search){let n=c(e);return n[t]}function l(t,e=window.location.hash){let n=c(e,!0);return n[t]}function c(t,e=!1){let n={};return t.replace(e?/[#&]+([^=&]+)=([^&]*)/gi:/[?&]+([^=&]+)=([^&]*)/gi,function(t,e,i){n[e]=decodeURIComponent(i)}),n}function d(t){if(!window.history||!history.replaceState)return;let e=c(window.location.search);if(!e[t])return;delete e[t];let n="";for(let t in e)n.length&&(n+="&"),n+=`${t}=${encodeURIComponent(e[t])}`;history.replaceState(history.state,null,location.pathname+"?"+n+location.hash)}function p(t){let e=document.createElement("textarea");return e.innerText=t,e.innerHTML}function h(t){return document.body.contains(t)}},1906:function(t,e,n){"use strict";n.r(e),n.d(e,{monkeypatch:function(){return l},isPatched:function(){return c}});var i=n("3446"),r=n.n(i),o=n("3961"),a=n.n(o);let s=r(window.fetch),u=!1;function l(t){if(!s)return;let e=window.fetch;window.fetch=function(){let n=[...arguments],[i,r,...o]=n;return a(r,"octane")&&(u=!0),e.apply(this,n).then(function(e){return e.ok?(t(e.url,r,e),e):e})}}function c(){if(!s)return!0;let t={};"AbortController"in window&&(t=new AbortController).abort();let e=window.fetch("",{octane:!0,signal:t.signal,method:"OPTIONS"});return e.catch(()=>{}),u}},3679:function(t,e,n){"use strict";n.r(e);var i=n("6258"),r=n("1906"),o=n("6641"),a=n("4649"),s=n("571"),u=n.n(s);let l=[["/cart/add.js","POST"],["/cart/update.js","POST"],["/cart/change.js","POST"],["/cart/clear.js","POST"],["/cart/add","POST"],["/cart/update","POST"],["/cart/change","POST"],["/cart/clear","POST"]],c=t=>{if((t=t.toLowerCase()).startsWith("http")){let e=`${window.location.protocol}//${window.location.hostname}`;t=t.replace(e,"")}return t},d=(t="GET",e)=>([n,i])=>{if(i&&n)return i=i.toUpperCase(),e=c(e),t===i&&e===n},p=(t,e,n)=>u(t,d(e,n)),h=(t,e)=>p(l,t,e),f=(t,e)=>p([["/cart.js","GET"]],t,e);new class t{callbacks=[];constructor(){let t=[0,3,15].map(t=>1e3*t);t.forEach(t=>setTimeout(()=>{!["8ku35dp8h7ifyb47","i82hs2nciq7tzaeb","z66rmx2fy63i2io5","1p71z9x6lx7fp9ho"].includes((0,a.Store).get("botId"))&&(this.patchXhr(),this.patchFetch())},t)),(0,o.logger)("Patching Fetch")}normalizeRequestParams(t="GET",e){if(!t||!e)return{url:null,request:null};t=t.toUpperCase();let n=e.toLowerCase();if(n.startsWith("http")){let t=`${window.location.protocol}//${window.location.hostname}`;n=n.replace(t,"")}return{url:n,method:t}}patchFetch=()=>{let t=r.isPatched();(0,o.logger)("Is FETCH successfuly MonkeyPatched",t),!t&&((0,o.logger)("Patching FETCH"),r.monkeypatch(this.fetchCallback))};fetchCallback=(t,e={},n)=>{let i=n.ok&&200===n.status,r=i&&f(e.method,n.url),s=i&&h(e.method,n.url);if(s&&((0,o.logger)("Fetch finished",n),(0,a.Store).dispatch("token")),t.endsWith("wallets/checkouts.json"))try{let t=n.clone();t.clone().json().then(({checkout:t})=>{(0,a.Store).set({checkout_token:t.token})})}catch(t){console.warn("Cannot clone (in checkout token)",t)}if(r)try{let t=n.clone();t.clone().json().then(({token:t})=>(0,a.Store).set({token:t}))}catch(t){console.warn("Cannot clone",t)}};patchXhr=()=>{let t=i.isPatched();(0,o.logger)("Is XHR successfuly MonkeyPatched",t),!t&&((0,o.logger)("Patching XHR"),i.monkeypatch(this.xhrCallback))};xhrCallback=(t,e)=>{let{_method:n,_url:i,readyState:r,status:s}=t,u=4===r&&200===s,l=u&&f(n,i),c=u&&h(n,i);if(c&&((0,o.logger)("XHR ReadyStateChange",t,e),t._allowExecute&&(t._allowExecute=!1,(0,a.Store).dispatch("token"))),l){let{token:t}=JSON.parse(e.target.responseText);(0,a.Store).set({token:t})}}}},6258:function(t,e,n){"use strict";n.r(e),n.d(e,{isPatched:function(){return o},monkeypatch:function(){return r}});let i=["XMLHttpRequest","RealXMLHttpRequest","OriginalXMLHttpRequest","OldXMLHttpRequest"];function r(t){i.forEach(e=>{window[e]&&!function(t,e){let{open:n,send:i}=t.prototype;(n||i)&&(t.prototype.open=function(t,e){this._method=t,this._url=e,this._reqOpened=Date.now(),this._allowExecute=!0,n&&n.apply(this,arguments)},t.prototype.send=function(t){let{onreadystatechange:n}=this,r=this;this._reqSent=Date.now(),this.addEventListener("readystatechange",function(t){e&&e(r,t)}),this.onreadystatechange=function(t){return e&&e(r,t),n&&n.apply(this,arguments)},i&&i.call(this,t)})}(window[e],t)})}function o(){let t=new XMLHttpRequest;return t.open("OPTIONS",""),t.send(),t.abort(),["_reqOpened","_reqSent"].every(e=>t.hasOwnProperty(e)||t.xhr&&t.xhr.hasOwnProperty(e))}},8759:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return l}});var i=n("5657"),r=n.n(i);let{pathname:o}=window.location,[a,...s]=o.split("/").filter(t=>""!==t),u=t=>a===t||r(s,t);var l={isHome:!a,isPage:"page"===a,isCart:"cart"===a,isProduct:u("products"),isOrder:u("orders"),isCheckout:u("checkouts"),get isCollection(){return"collections"===a&&!this.isProduct},get isThankYou(){return this.isCheckout||this.isOrder}}},4645:function(t,e,n){!Element.prototype.matches&&(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),!Element.prototype.closest&&(Element.prototype.closest=function(t){var e=this;do{if(e.matches(t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null})},8900:function(t,e,n){"use strict";n.r(e),n.d(e,{URLFilter:function(){return c},isSupportedDevice:function(){return d}});var i=n("8759"),r=n("2457"),o=n("5657"),a=n.n(o);let{href:s}=window.location,u={contains:t=>a(s,t),equals:t=>s===t,home:()=>i.default.isHome,cart:()=>i.default.isCart,order:()=>i.default.isThankYou},l={not:t=>!t};class c{static type(t){return new c(t)}constructor(t){let e={all:this._all,only:this._only,except:this._except};this._type=t,this.filters=e[t||"all"]}_all=()=>!0;_only=t=>t.some(this.doesMatch);_except=t=>!this._only(t);doesMatch=({operator:t,value:e})=>{let[n,i]=t.split("_").reverse(),r=u[n];return i&&l[i]?l[i](r(e)):r(e)}}let d=t=>a(t.split("|"),r.default.type)||"all"===t},1184:function(t,e,n){"use strict";n.r(e),n.d(e,{getABPayload:function(){return a}});var i=n("6641"),r=n("3961"),o=n.n(r);function a(t){let e=o(t,"ab_payloads_settings");if(!e)return(0,i.logger)("getABPayload: no A/B variants",t),{variationId:null,payload:t};let n=Object.keys(e).filter(t=>o(e[t],"weight"));if(!n)return(0,i.logger)("getABPayload: all variants are disabled",n),{variationId:null,payload:t.original_payload};let r=function(t,e){let n=e.reduce((t,e)=>t+e,0),i=0;e=e.map(t=>i=t+i);let r=Math.random()*n;return t[e.filter(t=>t<=r).length]}(n,n.map(t=>Number(o(e[t],"weight")))),a=o(t,`ab_payloads.${r}`,t.original_payload);return{variationId:r,payload:a}}},9366:function(t,e,n){"use strict";n.r(e),n.d(e,{getBackgroundImageStyle:function(){return i},hideBackgroundOnMobileStyle:function(){return r},getBackgroundColor:function(){return o}});function i(t,e,n,i,r){let o=`${t.horizontalAlignment} ${t.verticalAlignment}`,a=(100-Math.abs(parseInt(t.lightness)))/100;return` .oct-${e}-background-image-${n} { position: relative; } .oct-${e}-background-image-${n}::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-repeat: no-repeat; background-image: url(${i}); background-position: ${o}; border-radius: ${r}px; opacity: ${a}; } .oct-${e}-background-image-${n} .octane-ai-quiz-rendered > div:not(.octane-popup__img) { background-color: transparent; } .oct-${e}-background-image-${n} .octane-ai-quiz-rendered > div:not(.octane-popup__img)::before { background-image: none; } `}function r(t,e,n,i=!1){let r=` .oct-${t}-background-image-${e}::before { background-image: none; display: none } .octane-${t}--${e}-state { background-color: ${n}; }`;return i?r:` @media screen and (max-width: 650px) { ${r} }`}function o(t,e){let n=!!(t&&t.url);return n?parseInt(t.lightness)>0?"#FFF":"#000":e}},7090:function(t,e,n){"use strict";function i(t,e){return new Promise(function(n,i){let r=new XMLHttpRequest;r.open(e.method,t,!0),r.onload=function(){if(this.status>=200&&this.status<300){let t=r.response;r.response&&"json"===e.dataType&&(t=JSON.parse(r.response)),n(t)}else i({status:this.status,statusText:r.statusText,response:r.response?JSON.parse(r.response):null})},r.onerror=function(){i({status:this.status,statusText:r.statusText,response:r.response?JSON.parse(r.response):null})},r.ontimeout=function(){i({status:this.status,statusText:r.statusText})},e.timeout&&(r.timeout=e.timeout),e.headers&&Object.keys(e.headers).forEach(function(t){r.setRequestHeader(t,e.headers[t])});let o=e.params;o&&"object"==typeof o&&(o=!0===e.requestAsJSON?JSON.stringify(o):Object.keys(o).map(function(t){return Array.isArray(o[t])?o[t].map(e=>encodeURIComponent(t)+"="+encodeURIComponent(e)).join("&"):encodeURIComponent(t)+"="+encodeURIComponent(o[t])}).join("&")),r.send(o)})}function r(t,e,n={}){return!n.headers&&(n.headers={}),!n.headers["Content-type"]&&(n.headers["Content-type"]="application/x-www-form-urlencoded"),n.method="POST",n.params=e,!n.dataType&&(n.dataType="json"),i(t,n)}function o(t,e={}){return e.method="GET",!e.dataType&&(e.dataType="json"),i(t,e)}n.r(e),n.d(e,{$post:function(){return r},$get:function(){return o}})},5115:function(t,e,n){"use strict";n.r(e),n.d(e,{$post:function(){return o}});var i=n("4365"),r=n.n(i);let o=(t,e)=>r.ajax({type:"POST",url:t,data:e,dataType:"json"}).promise()},7992:function(t,e,n){"use strict";function i(t){let{initialState:{channels:{phone:e}}}=t;return e.collect}function r(t){let{initialState:{channels:{email:e}}}=t;return e.collect}function o(t,e,n=!0){if(!n)return!1;switch(t){case"phoneInput":case"smsEditor":case"smsPreview":return n&&i(e);case"optInChannels":return n&&!0;case"emailInput":case"emailPreview":return n&&r(e);case"subscribeButton":return n&&(i(e)||r(e));case"messengerCollection":case"messengerCheckbox":return!1}}function a(t){let{initialState:e}=t;if(!e)return!1;let{channels:n}=e,i=[n.email.collect?1:0,n.phone.collect?1:0].reduce((t,e)=>t+e);return 0!==i}function s(t){return t?"":"_no_channels"}function u(t,e){return t||"discount"===e?"":"_no_channels"}n.r(e),n.d(e,{areOptInChannelsCollected:function(){return a},getTextFieldSuffix:function(){return s},getTextFieldSuffixForPopUp:function(){return u},isMobileOneTapSubscribeActive:function(){return l},canShowMobileOneTapSubscribe:function(){return c},COUNTRY_CODE_TO_FLAG:function(){return p},getCountriesDescriptionText:function(){return f},getCountriesFlagsMinWidth:function(){return m},getCountriesString:function(){return g},shouldDisplayElement:function(){return y},hasOptInChannelsToShow:function(){return v},hasAllUserData:function(){return b}});function l(t){var e;return(e=t).phone.collect&&!e.email.collect&&t.phone.mobile_one_tap_enabled}function c(t,e){return l(t)&&e}let d={US:"US",CA:"Canada"},p={US:"flag-usa",CA:"flag-canada"},h=["US","CA"];function f(t){return t.map(t=>d[t]).join(" & ")}function m(t){return 70+(t.length-1)*20}function g(t){return h.filter(e=>t[e]).join("_")}function y(t,e,n){switch(n){case"emailInput":return!e.email&&o(n,t);case"phoneInput":{let{initialState:{channels:{phone:i}}}=t,r=g(i.countries).split("_");return!e.phone&&r.includes(e.country_code)&&o(n,t)}}return o(n,t)}function v(t,e){let n=y(t,e,"phoneInput"),i=y(t,e,"emailInput");return i||n}function b(t,e){return!y(t,e,"phoneInput")&&!y(t,e,"emailInput")}},6116:function(t,e,n){"use strict";n.r(e),n.d(e,{DEFAULT_INSTANCE_ID:function(){return i}});let i="__default__"},8008:function(t,e,n){"use strict";n.r(e),n.d(e,{POPUP_TYPE_CUSTOM:function(){return i},POPUP_TYPE_DISCOUNT:function(){return r},POPUP_TYPE_QUIZ:function(){return o}});let i="custom",r="discount",o="quiz"},5166:function(t,e,n){t=n.nmd(t),!function(){"use strict";var e={}.hasOwnProperty;function n(){for(var t=[],i=0;i1;return d("ipad")||t},o.android=function(){return!o.windows()&&d("android")},o.androidPhone=function(){return o.android()&&d("mobile")},o.androidTablet=function(){return o.android()&&!d("mobile")},o.blackberry=function(){return d("blackberry")||d("bb10")},o.blackberryPhone=function(){return o.blackberry()&&!d("tablet")},o.blackberryTablet=function(){return o.blackberry()&&d("tablet")},o.windows=function(){return d("windows")},o.windowsPhone=function(){return o.windows()&&d("phone")},o.windowsTablet=function(){return o.windows()&&d("touch")&&!o.windowsPhone()},o.fxos=function(){return(d("(mobile")||d("(tablet"))&&d(" rv:")},o.fxosPhone=function(){return o.fxos()&&d("mobile")},o.fxosTablet=function(){return o.fxos()&&d("tablet")},o.meego=function(){return d("meego")},o.cordova=function(){return window.cordova&&"file:"===location.protocol},o.nodeWebkit=function(){return"object"===i(window.process)},o.mobile=function(){return o.androidPhone()||o.iphone()||o.ipod()||o.windowsPhone()||o.blackberryPhone()||o.fxosPhone()||o.meego()},o.tablet=function(){return o.ipad()||o.androidTablet()||o.blackberryTablet()||o.windowsTablet()||o.fxosTablet()},o.desktop=function(){return!o.tablet()&&!o.mobile()},o.television=function(){for(var t=0;t1},o.landscape=function(){return screen.orientation&&Object.prototype.hasOwnProperty.call(window,"onorientationchange")?c(screen.orientation.type,"landscape"):o.ios()&&Object.prototype.hasOwnProperty.call(window,"orientation")?90===Math.abs(window.orientation):window.innerHeight/window.innerWidth<1},o.noConflict=function(){return window.device=r,this},o.ios()?o.ipad()?h("ios ipad tablet"):o.iphone()?h("ios iphone mobile"):o.ipod()&&h("ios ipod mobile"):o.macos()?h("macos desktop"):o.android()?o.androidTablet()?h("android tablet"):h("android mobile"):o.blackberry()?o.blackberryTablet()?h("blackberry tablet"):h("blackberry mobile"):o.windows()?o.windowsTablet()?h("windows tablet"):o.windowsPhone()?h("windows mobile"):h("windows desktop"):o.fxos()?o.fxosTablet()?h("fxos tablet"):h("fxos mobile"):o.meego()?h("meego mobile"):o.nodeWebkit()?h("node-webkit"):o.television()?h("television"):o.desktop()&&h("desktop"),o.cordova()&&h("cordova"),o.onChangeOrientation=function(t){"function"==typeof t&&a.push(t)};var y="resize";function v(t){for(var e=0;e0&&e-1 in t)}function T(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}k.fn=k.prototype={jquery:x,constructor:k,length:0,toArray:function(){return o.call(this)},get:function(t){return null==t?o.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=k.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return k.each(this,t)},map:function(t){return this.pushStack(k.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(k.grep(this,function(t,e){return(e+1)%2}))},odd:function(){return this.pushStack(k.grep(this,function(t,e){return e%2}))},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n+~]|"+I+")"+I+"*"),U=RegExp(I+"|>"),H=new RegExp(R),B=RegExp("^"+P+"$"),q={ID:RegExp("^#("+P+")"),CLASS:RegExp("^\\.("+P+")"),TAG:RegExp("^("+P+"|[*])"),ATTR:RegExp("^"+j),PSEUDO:RegExp("^"+R),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+I+"*(even|odd|(([+-]|)(\\d*)n|)"+I+"*(?:([+-]|)"+I+"*(\\d+)|))"+I+"*\\)|)","i"),bool:RegExp("^(?:"+A+")$","i"),needsContext:RegExp("^"+I+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+I+"*((?:-\\d)?\\d*)"+I+"*\\)|)(?=[^-]|$)","i")},z=/^(?:input|select|textarea|button)$/i,W=/^h\d$/i,V=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/[+~]/,X=RegExp("\\\\[\\da-fA-F]{1,6}"+I+"?|\\\\([^\\r\\n\\f])","g"),Q=function(t,e){var n="0x"+t.slice(1)-65536;return e?e:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)},K=function(){ta()},J=tc(function(t){return!0===t.disabled&&T(t,"fieldset")},{dir:"parentNode",next:"legend"});try{v.apply(i=o.call(y.childNodes),y.childNodes),i[y.childNodes.length].nodeType}catch(t){v={apply:function(t,e){s.apply(t,o.call(e))},call:function(t){s.apply(t,o.call(arguments,1))}}}function Z(t,e,n,i){var r,o,a,s,u,l,d,p=e&&e.ownerDocument,g=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==g&&9!==g&&11!==g)return n;if(!i&&(ta(e),e=e||c,h)){if(11!==g&&(u=V.exec(t))){if(r=u[1]){if(9===g){if(!(a=e.getElementById(r)))return n;if(a.id===r)return v.call(n,a),n}else if(p&&(a=p.getElementById(r))&&Z.contains(e,a)&&a.id===r)return v.call(n,a),n}else if(u[2])return v.apply(n,e.getElementsByTagName(t)),n;else if((r=u[3])&&e.getElementsByClassName)return v.apply(n,e.getElementsByClassName(r)),n}if(!N[t+" "]&&(!m||!m.test(t))){if(d=t,p=e,1===g&&(U.test(t)||L.test(t))){for(((p=G.test(t)&&to(e.parentNode)||e)!=e||!f.scope)&&((s=e.getAttribute("id"))?s=k.escapeSelector(s):e.setAttribute("id",s=b)),o=(l=tu(t)).length;o--;)l[o]=(s?"#"+s:":scope")+" "+tl(l[o]);d=l.join(",")}try{return v.apply(n,p.querySelectorAll(d)),n}catch(e){N(t,!0)}finally{s===b&&e.removeAttribute("id")}}}return tf(t.replace(E,"$1"),e,n,i)}function tt(){var t=[];function e(i,r){return t.push(i+" ")>n.cacheLength&&delete e[t.shift()],e[i+" "]=r}return e}function te(t){return t[b]=!0,t}function tn(t){var e=c.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ti(t){return function(e){if("form"in e){if(e.parentNode&&!1===e.disabled){if("label"in e)return"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t;return e.isDisabled===t||!t!==e.isDisabled&&J(e)===t}return e.disabled===t}return"label"in e&&e.disabled===t}}function tr(t){return te(function(e){return e=+e,te(function(n,i){for(var r,o=t([],n.length,e),a=o.length;a--;)n[r=o[a]]&&(n[r]=!(i[r]=n[r]))})})}function to(t){return t&&void 0!==t.getElementsByTagName&&t}function ta(t){var e,i=t?t.ownerDocument||t:y;return i!=c&&9===i.nodeType&&i.documentElement?(p=(c=i).documentElement,h=!k.isXMLDoc(c),g=p.matches||p.webkitMatchesSelector||p.msMatchesSelector,y!=c&&(e=c.defaultView)&&e.top!==e&&e.addEventListener("unload",K),f.getById=tn(function(t){return p.appendChild(t).id=k.expando,!c.getElementsByName||!c.getElementsByName(k.expando).length}),f.disconnectedMatch=tn(function(t){return g.call(t,"*")}),f.scope=tn(function(){return c.querySelectorAll(":scope")}),f.cssHas=tn(function(){try{return c.querySelector(":has(*,:jqfake)"),!1}catch(t){return!0}}),f.getById?(n.filter.ID=function(t){var e=t.replace(X,Q);return function(t){return t.getAttribute("id")===e}},n.find.ID=function(t,e){if(void 0!==e.getElementById&&h){var n=e.getElementById(t);return n?[n]:[]}}):(n.filter.ID=function(t){var e=t.replace(X,Q);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},n.find.ID=function(t,e){if(void 0!==e.getElementById&&h){var n,i,r,o=e.getElementById(t);if(o){if((n=o.getAttributeNode("id"))&&n.value===t)return[o];for(r=e.getElementsByName(t),i=0;o=r[i++];)if((n=o.getAttributeNode("id"))&&n.value===t)return[o]}return[]}}),n.find.TAG=function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):e.querySelectorAll(t)},n.find.CLASS=function(t,e){if(void 0!==e.getElementsByClassName&&h)return e.getElementsByClassName(t)},m=[],tn(function(t){var e;p.appendChild(t).innerHTML="",!t.querySelectorAll("[selected]").length&&m.push("\\["+I+"*(?:value|"+A+")"),!t.querySelectorAll("[id~="+b+"-]").length&&m.push("~="),!t.querySelectorAll("a#"+b+"+*").length&&m.push(".#.+[+~]"),!t.querySelectorAll(":checked").length&&m.push(":checked"),(e=c.createElement("input")).setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),p.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),(e=c.createElement("input")).setAttribute("name",""),t.appendChild(e),!t.querySelectorAll("[name='']").length&&m.push("\\["+I+"*name"+I+"*="+I+"*(?:''|\"\")")}),!f.cssHas&&m.push(":has"),m=m.length&&new RegExp(m.join("|")),M=function(t,e){if(t===e)return l=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;if(n)return n;if(1&(n=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!f.sortDetached&&e.compareDocumentPosition(t)===n)return t===c||t.ownerDocument==y&&Z.contains(y,t)?-1:e===c||e.ownerDocument==y&&Z.contains(y,e)?1:a?u.call(a,t)-u.call(a,e):0;return 4&n?-1:1},c):c}for(e in Z.matches=function(t,e){return Z(t,null,null,e)},Z.matchesSelector=function(t,e){if(ta(t),h&&!N[e+" "]&&(!m||!m.test(e)))try{var n=g.call(t,e);if(n||f.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){N(e,!0)}return Z(e,c,null,[t]).length>0},Z.contains=function(t,e){return(t.ownerDocument||t)!=c&&ta(t),k.contains(t,e)},Z.attr=function(t,e){(t.ownerDocument||t)!=c&&ta(t);var i=n.attrHandle[e.toLowerCase()],r=i&&d.call(n.attrHandle,e.toLowerCase())?i(t,e,!h):void 0;return void 0!==r?r:t.getAttribute(e)},Z.error=function(t){throw Error("Syntax error, unrecognized expression: "+t)},k.uniqueSort=function(t){var e,n=[],i=0,r=0;if(l=!f.sortStable,a=!f.sortStable&&o.call(t,0),D.call(t,M),l){for(;e=t[r++];)e===t[r]&&(i=n.push(r));for(;i--;)O.call(t,n[i],1)}return a=null,t},k.fn.uniqueSort=function(){return this.pushStack(k.uniqueSort(o.apply(this)))},(n=k.expr={cacheLength:50,createPseudo:te,match:q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(X,Q),t[3]=(t[3]||t[4]||t[5]||"").replace(X,Q),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(!t[3]&&Z.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&Z.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return q.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&H.test(n)&&(e=tu(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(X,Q).toLowerCase();return"*"===t?function(){return!0}:function(t){return T(t,e)}},CLASS:function(t){var e=w[t+" "];return e||(e=RegExp("(^|"+I+")"+t+"("+I+"|$)"),w(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(i){var r=Z.attr(i,t);return null==r?"!="===e:!e||((r+="","="===e)?r===n:"!="===e?r!==n:"^="===e?n&&0===r.indexOf(n):"*="===e?n&&r.indexOf(n)>-1:"$="===e?n&&r.slice(-n.length)===n:"~="===e?(" "+r.replace(Y," ")+" ").indexOf(n)>-1:"|="===e&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,i,r){var o="nth"!==t.slice(0,3),a="last"!==t.slice(-4),s="of-type"===e;return 1===i&&0===r?function(t){return!!t.parentNode}:function(e,n,u){var l,c,d,p,h,f=o!==a?"nextSibling":"previousSibling",m=e.parentNode,g=s&&e.nodeName.toLowerCase(),y=!u&&!s,v=!1;if(m){if(o){for(;f;){for(d=e;d=d[f];)if(s?T(d,g):1===d.nodeType)return!1;h=f="only"===t&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&y){for(v=(p=(l=(c=m[b]||(m[b]={}))[t]||[])[0]===_&&l[1])&&l[2],d=p&&m.childNodes[p];d=++p&&d&&d[f]||(v=p=0)||h.pop();)if(1===d.nodeType&&++v&&d===e){c[t]=[_,p,v];break}}else if(y&&(v=p=(l=(c=e[b]||(e[b]={}))[t]||[])[0]===_&&l[1]),!1===v)for(;(d=++p&&d&&d[f]||(v=p=0)||h.pop())&&(!((s?T(d,g):1===d.nodeType)&&++v)||(y&&((c=d[b]||(d[b]={}))[t]=[_,v]),d!==e)););return(v-=r)===i||v%i==0&&v/i>=0}}},PSEUDO:function(t,e){var i,r=n.pseudos[t]||n.setFilters[t.toLowerCase()]||Z.error("unsupported pseudo: "+t);return r[b]?r(e):r.length>1?(i=[t,t,"",e],n.setFilters.hasOwnProperty(t.toLowerCase())?te(function(t,n){for(var i,o=r(t,e),a=o.length;a--;)i=u.call(t,o[a]),t[i]=!(n[i]=o[a])}):function(t){return r(t,0,i)}):r}},pseudos:{not:te(function(t){var e=[],n=[],i=th(t.replace(E,"$1"));return i[b]?te(function(t,e,n,r){for(var o,a=i(t,null,r,[]),s=t.length;s--;)(o=a[s])&&(t[s]=!(e[s]=o))}):function(t,r,o){return e[0]=t,i(e,null,o,n),e[0]=null,!n.pop()}}),has:te(function(t){return function(e){return Z(t,e).length>0}}),contains:te(function(t){return t=t.replace(X,Q),function(e){return(e.textContent||k.text(e)).indexOf(t)>-1}}),lang:te(function(t){return!B.test(t||"")&&Z.error("unsupported lang: "+t),t=t.replace(X,Q).toLowerCase(),function(e){var n;do if(n=h?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===p},focus:function(t){return t===function(){try{return c.activeElement}catch(t){}}()&&c.hasFocus()&&!!(t.type||t.href||~t.tabIndex)},enabled:ti(!1),disabled:ti(!0),checked:function(t){return T(t,"input")&&!!t.checked||T(t,"option")&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!n.pseudos.empty(t)},header:function(t){return W.test(t.nodeName)},input:function(t){return z.test(t.nodeName)},button:function(t){return T(t,"input")&&"button"===t.type||T(t,"button")},text:function(t){var e;return T(t,"input")&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:tr(function(){return[0]}),last:tr(function(t,e){return[e-1]}),eq:tr(function(t,e,n){return[n<0?n+e:n]}),even:tr(function(t,e){for(var n=0;ne?e:n;--i>=0;)t.push(i);return t}),gt:tr(function(t,e,n){for(var i=n<0?n+e:n;++i1?function(e,n,i){for(var r=t.length;r--;)if(!t[r](e,n,i))return!1;return!0}:t[0]}ts.prototype=n.filters=n.pseudos,n.setFilters=new ts;function tp(t,e,n,i,r){for(var o,a=[],s=0,u=t.length,l=null!=e;s-1},c,!0),f=[function(t,e,n){var o=!l&&(n||e!=r)||((i=e).nodeType?p(t,e,n):h(t,e,n));return i=null,o}];d-1&&(t[c]=!(a[c]=p))}}else h=tp(h===a?h.splice(g,h.length):h),o?o(null,a,h,l):v.apply(a,h)})}(d>1&&td(f),d>1&&tl(e.slice(0,d-1).concat({value:" "===e[d-2].type?"*":""})).replace(E,"$1"),o,d0,s=i.length>0,l=function(t,e,u,l,d){var p,f,m,g=0,y="0",b=t&&[],x=[],w=r,S=t||s&&n.find.TAG("*",d),T=_+=null==w?1:Math.random()||.1,D=S.length;for(d&&(r=e==c||e||d);y!==D&&null!=(p=S[y]);y++){if(s&&p){for(f=0,!e&&p.ownerDocument!=c&&(ta(p),u=!h);m=i[f++];)if(m(p,e||c,u)){v.call(l,p);break}d&&(_=T)}a&&((p=!m&&p)&&g--,t&&b.push(p))}if(g+=y,a&&y!==g){for(f=0;m=o[f++];)m(b,x,e,u);if(t){if(g>0)for(;y--;)!(b[y]||x[y])&&(x[y]=C.call(l));x=tp(x)}v.apply(l,x),d&&!t&&x.length>0&&g+o.length>1&&k.uniqueSort(l)}return d&&(_=T,r=w),b},a?te(l):l))).selector=t}return m}function tf(t,e,i,r){var o,a,s,u,l,c="function"==typeof t&&t,d=!r&&tu(t=c.selector||t);if(i=i||[],1===d.length){if((a=d[0]=d[0].slice(0)).length>2&&"ID"===(s=a[0]).type&&9===e.nodeType&&h&&n.relative[a[1].type]){if(!(e=(n.find.ID(s.matches[0].replace(X,Q),e)||[])[0]))return i;c&&(e=e.parentNode);t=t.slice(a.shift().value.length)}for(o=q.needsContext.test(t)?0:a.length;o--&&(s=a[o],!n.relative[u=s.type]);){;if((l=n.find[u])&&(r=l(s.matches[0].replace(X,Q),G.test(a[0].type)&&to(e.parentNode)||e))){if(a.splice(o,1),!(t=r.length&&tl(a)))return v.apply(i,r),i;break}}}return(c||th(t,d))(r,e,!h,i,!e||G.test(t)&&to(e.parentNode)||e),i}f.sortStable=b.split("").sort(M).join("")===b,ta(),f.sortDetached=tn(function(t){return 1&t.compareDocumentPosition(c.createElement("fieldset"))}),k.find=Z,k.expr[":"]=k.expr.pseudos,k.unique=k.uniqueSort,Z.compile=th,Z.select=tf,Z.setDocument=ta,Z.escape=k.escapeSelector,Z.getText=k.text,Z.isXML=k.isXMLDoc,Z.selectors=k.expr,Z.support=k.support,Z.uniqueSort=k.uniqueSort}();var M=function(t,e,n){for(var i=[],r=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(r&&k(t).is(n))break;i.push(t)}return i},A=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},P=k.expr.match.needsContext,j=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function R(t,e,n){return m(e)?k.grep(t,function(t,i){return!!e.call(t,i,t)!==n}):e.nodeType?k.grep(t,function(t){return t===e!==n}):"string"!=typeof e?k.grep(t,function(t){return u.call(e,t)>-1!==n}):k.filter(e,t,n)}k.filter=function(t,e,n){var i=e[0];return(n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType)?k.find.matchesSelector(i,t)?[i]:[]:k.find.matches(t,k.grep(e,function(t){return 1===t.nodeType}))},k.fn.extend({find:function(t){var e,n,i=this.length,r=this;if("string"!=typeof t)return this.pushStack(k(t).filter(function(){for(e=0;e1?k.uniqueSort(n):n},filter:function(t){return this.pushStack(R(this,t||[],!1))},not:function(t){return this.pushStack(R(this,t||[],!0))},is:function(t){return!!R(this,"string"==typeof t&&P.test(t)?k(t):t||[],!1).length}});var Y,F=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(k.fn.init=function(t,e,n){var i,r;if(!t)return this;if(n=n||Y,"string"==typeof t){if((i="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:F.exec(t))&&(i[1]||!e)){if(!i[1])return(r=y.getElementById(i[2]))&&(this[0]=r,this.length=1),this;if(e=e instanceof k?e[0]:e,k.merge(this,k.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:y,!0)),j.test(i[1])&&k.isPlainObject(e))for(i in e)m(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}if(!e||e.jquery)return(e||n).find(t);else return this.constructor(e).find(t)}if(t.nodeType)return this[0]=t,this.length=1,this;if(m(t))return void 0!==n.ready?n.ready(t):t(k);return k.makeArray(t,this)}).prototype=k.fn,Y=k(y);var L=/^(?:parents|prev(?:Until|All))/,U={children:!0,contents:!0,next:!0,prev:!0};function H(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}k.fn.extend({has:function(t){var e=k(t,this),n=e.length;return this.filter(function(){for(var t=0;t-1:1===n.nodeType&&k.find.matchesSelector(n,t))){o.push(n);break}}return this.pushStack(o.length>1?k.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?u.call(k(t),this[0]):u.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(k.uniqueSort(k.merge(this.get(),k(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),k.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return M(t,"parentNode")},parentsUntil:function(t,e,n){return M(t,"parentNode",n)},next:function(t){return H(t,"nextSibling")},prev:function(t){return H(t,"previousSibling")},nextAll:function(t){return M(t,"nextSibling")},prevAll:function(t){return M(t,"previousSibling")},nextUntil:function(t,e,n){return M(t,"nextSibling",n)},prevUntil:function(t,e,n){return M(t,"previousSibling",n)},siblings:function(t){return A((t.parentNode||{}).firstChild,t)},children:function(t){return A(t.firstChild)},contents:function(t){return null!=t.contentDocument&&r(t.contentDocument)?t.contentDocument:(T(t,"template")&&(t=t.content||t),k.merge([],t.childNodes))}},function(t,e){k.fn[t]=function(n,i){var r=k.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=k.filter(i,r)),this.length>1&&(!U[t]&&k.uniqueSort(r),L.test(t)&&r.reverse()),this.pushStack(r)}});var B=/[^\x20\t\r\n\f]+/g;function q(t){return t}function z(t){throw t}function W(t,e,n,i){var r;try{t&&m(r=t.promise)?r.call(t).done(e).fail(n):t&&m(r=t.then)?r.call(t,e,n):e.apply(void 0,[t].slice(i))}catch(t){n.apply(void 0,[t])}}k.Callbacks=function(t){t="string"==typeof t?(e=t,n={},k.each(e.match(B)||[],function(t,e){n[e]=!0}),n):k.extend({},t);var e,n,i,r,o,a,s=[],u=[],l=-1,c=function(){for(a=a||t.once,o=i=!0;u.length;l=-1)for(r=u.shift();++l-1;)s.splice(n,1),n<=l&&l--}),this},has:function(t){return t?k.inArray(t,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=r="",this},disabled:function(){return!s},lock:function(){return a=u=[],!r&&!i&&(s=r=""),this},locked:function(){return!!a},fireWith:function(t,e){return!a&&(e=e||[],e=[t,e.slice?e.slice():e],u.push(e),!i&&c()),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!o}};return d},k.extend({Deferred:function(e){var n=[["notify","progress",k.Callbacks("memory"),k.Callbacks("memory"),2],["resolve","done",k.Callbacks("once memory"),k.Callbacks("once memory"),0,"resolved"],["reject","fail",k.Callbacks("once memory"),k.Callbacks("once memory"),1,"rejected"]],i="pending",r={state:function(){return i},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return r.then(null,t)},pipe:function(){var t=arguments;return k.Deferred(function(e){k.each(n,function(n,i){var r=m(t[i[4]])&&t[i[4]];o[i[1]](function(){var t=r&&r.apply(this,arguments);t&&m(t.promise)?t.promise().progress(e.notify).done(e.resolve).fail(e.reject):e[i[0]+"With"](this,r?[t]:arguments)})}),t=null}).promise()},then:function(e,i,r){var o=0;function a(e,n,i,r){return function(){var s=this,u=arguments,l=function(){var t,l;if(!(e=o&&(i!==z&&(s=void 0,u=[t]),n.rejectWith(s,u))}};e?c():(k.Deferred.getErrorHook?c.error=k.Deferred.getErrorHook():k.Deferred.getStackHook&&(c.error=k.Deferred.getStackHook()),t.setTimeout(c))}}return k.Deferred(function(t){n[0][3].add(a(0,t,m(r)?r:q,t.notifyWith)),n[1][3].add(a(0,t,m(e)?e:q)),n[2][3].add(a(0,t,m(i)?i:z))}).promise()},promise:function(t){return null!=t?k.extend(t,r):r}},o={};return k.each(n,function(t,e){var a=e[2],s=e[5];r[e[1]]=a.add,s&&a.add(function(){i=s},n[3-t][2].disable,n[3-t][3].disable,n[0][2].lock,n[0][3].lock),a.add(e[3].fire),o[e[0]]=function(){return o[e[0]+"With"](this===o?void 0:this,arguments),this},o[e[0]+"With"]=a.fireWith}),r.promise(o),e&&e.call(o,o),o},when:function(t){var e=arguments.length,n=e,i=Array(n),r=o.call(arguments),a=k.Deferred(),s=function(t){return function(n){i[t]=this,r[t]=arguments.length>1?o.call(arguments):n,!--e&&a.resolveWith(i,r)}};if(e<=1&&(W(t,a.done(s(n)).resolve,a.reject,!e),"pending"===a.state()||m(r[n]&&r[n].then)))return a.then();for(;n--;)W(r[n],s(n),a.reject);return a.promise()}});var V=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;k.Deferred.exceptionHook=function(e,n){t.console&&t.console.warn&&e&&V.test(e.name)&&t.console.warn("jQuery.Deferred exception: "+e.message,e.stack,n)},k.readyException=function(e){t.setTimeout(function(){throw e})};var G=k.Deferred();function X(){y.removeEventListener("DOMContentLoaded",X),t.removeEventListener("load",X),k.ready()}k.fn.ready=function(t){return G.then(t).catch(function(t){k.readyException(t)}),this},k.extend({isReady:!1,readyWait:1,ready:function(t){if(!(!0===t?--k.readyWait:k.isReady))k.isReady=!0,!(!0!==t&&--k.readyWait>0)&&G.resolveWith(y,[k])}}),k.ready.then=G.then,"complete"!==y.readyState&&("loading"===y.readyState||y.documentElement.doScroll)?(y.addEventListener("DOMContentLoaded",X),t.addEventListener("load",X)):t.setTimeout(k.ready);var Q=function(t,e,n,i,r,o,a){var s=0,u=t.length,l=null==n;if("object"===_(n))for(s in r=!0,n)Q(t,e,s,n[s],!0,o,a);else if(void 0!==i&&(r=!0,!m(i)&&(a=!0),l&&(a?(e.call(t,i),e=null):(l=e,e=function(t,e,n){return l.call(k(t),n)})),e))for(;s1,null,!0)},removeData:function(t){return this.each(function(){tr.remove(this,t)})}}),k.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=ti.get(t,e),n&&(!i||Array.isArray(n)?i=ti.access(t,e,k.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=k.queue(t,e),i=n.length,r=n.shift(),o=k._queueHooks(t,e);"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===e&&n.unshift("inprogress"),delete o.stop,r.call(t,function(){k.dequeue(t,e)},o)),!i&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return ti.get(t,n)||ti.access(t,n,{empty:k.Callbacks("once memory").add(function(){ti.remove(t,[e+"queue",n])})})}}),k.fn.extend({queue:function(t,e){var n=2;return("string"!=typeof t&&(e=t,t="fx",n--),arguments.length\x20\t\r\n\f]*)/i,t_=/^$|^module$|\/(?:java|ecma)script/i;t4=y.createDocumentFragment().appendChild(y.createElement("div")),t3=y.createElement("input"),t3.setAttribute("type","radio"),t3.setAttribute("checked","checked"),t3.setAttribute("name","t"),t4.appendChild(t3),f.checkClone=t4.cloneNode(!0).cloneNode(!0).lastChild.checked,t4.innerHTML="",f.noCloneChecked=!!t4.cloneNode(!0).lastChild.defaultValue,t4.innerHTML="",f.option=!!t4.lastChild;var tx={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function tw(t,e){var n;return(n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&T(t,e))?k.merge([t],n):n}function tk(t,e){for(var n=0,i=t.length;n",""]);var tS=/<|&#?\w+;/;function tT(t,e,n,i,r){for(var o,a,s,u,l,c=e.createDocumentFragment(),d=[],p=0,h=t.length;p-1){r&&r.push(o);continue}if(u=tp(o),a=tw(c.appendChild(o),"script"),u&&tk(a),n)for(l=0;o=a[l++];)t_.test(o.type||"")&&n.push(o)}return c}var tC=/^([^.]*)(?:\.(.+)|)/;function tD(){return!0}function tO(){return!1}function tI(t,e,n,i,r,o){var a,s;if("object"==typeof e){for(s in"string"!=typeof n&&(i=i||n,n=void 0),e)tI(t,s,n,i,e[s],o);return t}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),!1===r)r=tO;else if(!r)return t;return 1===o&&(a=r,(r=function(t){return k().off(t),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),t.each(function(){k.event.add(this,e,r,i,n)})}function tE(t,e,n){if(!n){void 0===ti.get(t,e)&&k.event.add(t,e,tD);return}ti.set(t,e,!1),k.event.add(t,e,{namespace:!1,handler:function(t){var n,i=ti.get(this,e);if(1&t.isTrigger&&this[e]){if(i)(k.event.special[e]||{}).delegateType&&t.stopPropagation();else if(i=o.call(arguments),ti.set(this,e,i),this[e](),n=ti.get(this,e),ti.set(this,e,!1),i!==n)return t.stopImmediatePropagation(),t.preventDefault(),n}else i&&(ti.set(this,e,k.event.trigger(i[0],i.slice(1),this)),t.stopPropagation(),t.isImmediatePropagationStopped=tD)}})}k.event={global:{},add:function(t,e,n,i,r){var o,a,s,u,l,c,d,p,h,f,m,g=ti.get(t);if(te(t))for(n.handler&&(n=(o=n).handler,r=o.selector),r&&k.find.matchesSelector(td,r),!n.guid&&(n.guid=k.guid++),!(u=g.events)&&(u=g.events=Object.create(null)),!(a=g.handle)&&(a=g.handle=function(e){return k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(B)||[""]).length;l--;){if(h=m=(s=tC.exec(e[l])||[])[1],f=(s[2]||"").split(".").sort(),!!h)d=k.event.special[h]||{},h=(r?d.delegateType:d.bindType)||h,d=k.event.special[h]||{},c=k.extend({type:h,origType:m,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&k.expr.match.needsContext.test(r),namespace:f.join(".")},o),!(p=u[h])&&((p=u[h]=[]).delegateCount=0,(!d.setup||!1===d.setup.call(t,i,f,a))&&t.addEventListener&&t.addEventListener(h,a)),d.add&&(d.add.call(t,c),!c.handler.guid&&(c.handler.guid=n.guid)),r?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[h]=!0}},remove:function(t,e,n,i,r){var o,a,s,u,l,c,d,p,h,f,m,g=ti.hasData(t)&&ti.get(t);if(g&&(u=g.events)){for(l=(e=(e||"").match(B)||[""]).length;l--;){if(h=m=(s=tC.exec(e[l])||[])[1],f=(s[2]||"").split(".").sort(),!h){for(h in u)k.event.remove(t,h+e[l],n,i,!0);continue}for(d=k.event.special[h]||{},p=u[h=(i?d.delegateType:d.bindType)||h]||[],s=s[2]&&RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)c=p[o],(r||m===c.origType)&&(!n||n.guid===c.guid)&&(!s||s.test(c.namespace))&&(!i||i===c.selector||"**"===i&&c.selector)&&(p.splice(o,1),c.selector&&p.delegateCount--,d.remove&&d.remove.call(t,c));a&&!p.length&&((!d.teardown||!1===d.teardown.call(t,f,g.handle))&&k.removeEvent(t,h,g.handle),delete u[h])}k.isEmptyObject(u)&&ti.remove(t,"handle events")}},dispatch:function(t){var e,n,i,r,o,a,s=Array(arguments.length),u=k.event.fix(t),l=(ti.get(this,"events")||Object.create(null))[u.type]||[],c=k.event.special[u.type]||{};for(e=1,s[0]=u;e=1)){for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&!("click"===t.type&&!0===l.disabled)){for(n=0,o=[],a={};n-1:k.find(r,this,null,[l]).length),a[r]&&o.push(i);o.length&&s.push({elem:l,handlers:o})}}return l=this,u\s*$/g;function tA(t,e){return T(t,"table")&&T(11!==e.nodeType?e:e.firstChild,"tr")&&k(t).children("tbody")[0]||t}function tP(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function tj(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function tR(t,e){var n,i,r,o,a,s;if(1===e.nodeType){if(ti.hasData(t)&&(s=ti.get(t).events))for(r in ti.remove(e,"handle events"),s)for(n=0,i=s[r].length;n1&&"string"==typeof g&&!f.checkClone&&tN.test(g))return t.each(function(r){var o=t.eq(r);y&&(e[0]=g.call(this,r,o.html())),tY(o,e,n,i)});if(p&&(o=(r=tT(e,t[0].ownerDocument,!1,t,i)).firstChild,1===r.childNodes.length&&(r=o),o||i)){for(u=(s=k.map(tw(r,"script"),tP)).length;d0&&tk(a,!u&&tw(t,"script")),s},cleanData:function(t){for(var e,n,i,r=k.event.special,o=0;void 0!==(n=t[o]);o++)if(te(n)){if(e=n[ti.expando]){if(e.events)for(i in e.events)r[i]?k.event.remove(n,i):k.removeEvent(n,i,e.handle);n[ti.expando]=void 0}n[tr.expando]&&(n[tr.expando]=void 0)}}}),k.fn.extend({detach:function(t){return tF(this,t,!0)},remove:function(t){return tF(this,t)},text:function(t){return Q(this,function(t){return void 0===t?k.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=t)})},null,t,arguments.length)},append:function(){return tY(this,arguments,function(t){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&tA(this,t).appendChild(t)})},prepend:function(){return tY(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=tA(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return tY(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return tY(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(k.cleanData(tw(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return k.clone(this,t,e)})},html:function(t){return Q(this,function(t){var e=this[0]||{},n=0,i=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!t$.test(t)&&!tx[(tb.exec(t)||["",""])[1].toLowerCase()]){t=k.htmlPrefilter(t);try{for(;nk.inArray(this,t)&&(k.cleanData(tw(this)),n&&n.replaceChild(e,this))},t)}}),k.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){k.fn[t]=function(t){for(var n,i=[],r=k(t),o=r.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),k(r[a])[e](n),s.apply(i,n.get());return this.pushStack(i)}});var tL=RegExp("^("+tu+")(?!px)[a-z%]+$","i"),tU=/^--/,tH=function(e){var n=e.ownerDocument.defaultView;return(!n||!n.opener)&&(n=t),n.getComputedStyle(e)},tB=function(t,e,n){var i,r,o={};for(r in e)o[r]=t.style[r],t.style[r]=e[r];for(r in i=n.call(t),e)t.style[r]=o[r];return i},tq=RegExp(tc.join("|"),"i");function tz(t,e,n){var i,r,o,a,s=tU.test(e),u=t.style;return(n=n||tH(t))&&(a=n.getPropertyValue(e)||n[e],s&&a&&(a=a.replace(E,"$1")||void 0),""===a&&!tp(t)&&(a=k.style(t,e)),!f.pixelBoxStyles()&&tL.test(a)&&tq.test(e)&&(i=u.width,r=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=n.width,u.width=i,u.minWidth=r,u.maxWidth=o)),void 0!==a?a+"":a}function tW(t,e){return{get:function(){if(t()){delete this.get;return}return(this.get=e).apply(this,arguments)}}}!function(){function e(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",td.appendChild(l).appendChild(c);var e=t.getComputedStyle(c);i="1%"!==e.top,u=12===n(e.marginLeft),c.style.right="60%",a=36===n(e.right),r=36===n(e.width),c.style.position="absolute",o=12===n(c.offsetWidth/3),td.removeChild(l),c=null}}function n(t){return Math.round(parseFloat(t))}var i,r,o,a,s,u,l=y.createElement("div"),c=y.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",f.clearCloneStyle="content-box"===c.style.backgroundClip,k.extend(f,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),a},pixelPosition:function(){return e(),i},reliableMarginLeft:function(){return e(),u},scrollboxSize:function(){return e(),o},reliableTrDimensions:function(){var e,n,i,r;return null==s&&(e=y.createElement("table"),n=y.createElement("tr"),i=y.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",n.style.cssText="border:1px solid",n.style.height="1px",i.style.height="9px",i.style.display="block",td.appendChild(e).appendChild(n).appendChild(i),s=parseInt((r=t.getComputedStyle(n)).height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===n.offsetHeight,td.removeChild(e)),s}}))}();var tV=["Webkit","Moz","ms"],tG=y.createElement("div").style,tX={};function tQ(t){var e=k.cssProps[t]||tX[t];return e?e:t in tG?t:tX[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=tV.length;n--;)if((t=tV[n]+e)in tG)return t}(t)||t}var tK=/^(none|table(?!-c[ea]).+)/,tJ={position:"absolute",visibility:"hidden",display:"block"},tZ={letterSpacing:"0",fontWeight:"400"};function t0(t,e,n){var i=tl.exec(e);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):e}function t1(t,e,n,i,r,o){var a="width"===e?1:0,s=0,u=0,l=0;if(n===(i?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(l+=k.css(t,n+tc[a],!0,r)),i?("content"===n&&(u-=k.css(t,"padding"+tc[a],!0,r)),"margin"!==n&&(u-=k.css(t,"border"+tc[a]+"Width",!0,r))):(u+=k.css(t,"padding"+tc[a],!0,r),"padding"!==n?u+=k.css(t,"border"+tc[a]+"Width",!0,r):s+=k.css(t,"border"+tc[a]+"Width",!0,r));return!i&&o>=0&&(u+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-u-s-.5))||0),u+l}function t2(t,e,n){var i=tH(t),r=(!f.boxSizingReliable()||n)&&"border-box"===k.css(t,"boxSizing",!1,i),o=r,a=tz(t,e,i),s="offset"+e[0].toUpperCase()+e.slice(1);if(tL.test(a)){if(!n)return a;a="auto"}return(!f.boxSizingReliable()&&r||!f.reliableTrDimensions()&&T(t,"tr")||"auto"===a||!parseFloat(a)&&"inline"===k.css(t,"display",!1,i))&&t.getClientRects().length&&(r="border-box"===k.css(t,"boxSizing",!1,i),(o=s in t)&&(a=t[s])),(a=parseFloat(a)||0)+t1(t,e,n||(r?"border":"content"),o,i,a)+"px"}function t6(t,e,n,i,r){return new t6.prototype.init(t,e,n,i,r)}k.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=tz(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var r,o,a,s=tt(e),u=tU.test(e),l=t.style;if(!u&&(e=tQ(s)),a=k.cssHooks[e]||k.cssHooks[s],void 0!==n){if("string"==(o=typeof n)&&(r=tl.exec(n))&&r[1]&&(n=tm(t,e,r),o="number"),null==n||n!=n)return;"number"===o&&!u&&(n+=r&&r[3]||(k.cssNumber[s]?"":"px")),!f.clearCloneStyle&&""===n&&0===e.indexOf("background")&&(l[e]="inherit"),(!a||!("set"in a)||void 0!==(n=a.set(t,n,i)))&&(u?l.setProperty(e,n):l[e]=n)}else return a&&"get"in a&&void 0!==(r=a.get(t,!1,i))?r:l[e]}},css:function(t,e,n,i){var r,o,a,s=tt(e);return(!tU.test(e)&&(e=tQ(s)),(a=k.cssHooks[e]||k.cssHooks[s])&&"get"in a&&(r=a.get(t,!0,n)),void 0===r&&(r=tz(t,e,i)),"normal"===r&&e in tZ&&(r=tZ[e]),""===n||n)?(o=parseFloat(r),!0===n||isFinite(o)?o||0:r):r}}),k.each(["height","width"],function(t,e){k.cssHooks[e]={get:function(t,n,i){if(n)return!tK.test(k.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?t2(t,e,i):tB(t,tJ,function(){return t2(t,e,i)})},set:function(t,n,i){var r,o,a=tH(t),s=!f.scrollboxSize()&&"absolute"===a.position,u=(s||i)&&"border-box"===k.css(t,"boxSizing",!1,a),l=i?t1(t,e,i,u,a):0;return u&&s&&(l-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(a[e])-t1(t,e,"border",!1,a)-.5)),l&&(r=tl.exec(n))&&"px"!==(r[3]||"px")&&(t.style[e]=n,n=k.css(t,e)),t0(t,n,l)}}}),k.cssHooks.marginLeft=tW(f.reliableMarginLeft,function(t,e){if(e)return(parseFloat(tz(t,"marginLeft"))||t.getBoundingClientRect().left-tB(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px"}),k.each({margin:"",padding:"",border:"Width"},function(t,e){k.cssHooks[t+e]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];i<4;i++)r[t+tc[i]+e]=o[i]||o[i-2]||o[0];return r}},"margin"!==t&&(k.cssHooks[t+e].set=t0)}),k.fn.extend({css:function(t,e){return Q(this,function(t,e,n){var i,r,o={},a=0;if(Array.isArray(e)){for(i=tH(t),r=e.length;a1)}}),k.Tween=t6,t6.prototype={constructor:t6,init:function(t,e,n,i,r,o){this.elem=t,this.prop=n,this.easing=r||k.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=o||(k.cssNumber[n]?"":"px")},cur:function(){var t=t6.propHooks[this.prop];return t&&t.get?t.get(this):t6.propHooks._default.get(this)},run:function(t){var e,n=t6.propHooks[this.prop];return this.options.duration?this.pos=e=k.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):t6.propHooks._default.set(this),this}},t6.prototype.init.prototype=t6.prototype,t6.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=k.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){k.fx.step[t.prop]?k.fx.step[t.prop](t):1===t.elem.nodeType&&(k.cssHooks[t.prop]||null!=t.elem.style[tQ(t.prop)])?k.style(t.elem,t.prop,t.now+t.unit):t.elem[t.prop]=t.now}}},t6.propHooks.scrollTop=t6.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},k.easing={linear:function(t){return t},swing:function(t){return .5-Math.cos(t*Math.PI)/2},_default:"swing"},k.fx=t6.prototype.init,k.fx.step={};var t4,t3,t7,t9,t5=/^(?:toggle|show|hide)$/,t8=/queueHooks$/;function et(){return t.setTimeout(function(){t7=void 0}),t7=Date.now()}function ee(t,e){var n,i=0,r={height:t};for(e=e?1:0;i<4;i+=2-e)r["margin"+(n=tc[i])]=r["padding"+n]=t;return e&&(r.opacity=r.width=t),r}function en(t,e,n){for(var i,r=(ei.tweeners[e]||[]).concat(ei.tweeners["*"]),o=0,a=r.length;o1)},removeAttr:function(t){return this.each(function(){k.removeAttr(this,t)})}}),k.extend({attr:function(t,e,n){var i,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o){if(void 0===t.getAttribute)return k.prop(t,e,n);if((1!==o||!k.isXMLDoc(t))&&(r=k.attrHooks[e.toLowerCase()]||(k.expr.match.bool.test(e)?ea:void 0)),void 0!==n){if(null===n){k.removeAttr(t,e);return}return r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:(t.setAttribute(e,n+""),n)}return r&&"get"in r&&null!==(i=r.get(t,e))?i:null==(i=k.find.attr(t,e))?void 0:i}},attrHooks:{type:{set:function(t,e){if(!f.radioValue&&"radio"===e&&T(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,i=0,r=e&&e.match(B);if(r&&1===t.nodeType)for(;n=r[i++];)t.removeAttribute(n)}}),ea={set:function(t,e,n){return!1===e?k.removeAttr(t,n):t.setAttribute(n,n),n}},k.each(k.expr.match.bool.source.match(/\w+/g),function(t,e){var n=es[e]||k.find.attr;es[e]=function(t,e,i){var r,o,a=e.toLowerCase();return!i&&(o=es[a],es[a]=r,r=null!=n(t,e,i)?a:null,es[a]=o),r}});var eu=/^(?:input|select|textarea|button)$/i,el=/^(?:a|area)$/i;function ec(t){return(t.match(B)||[]).join(" ")}function ed(t){return t.getAttribute&&t.getAttribute("class")||""}function ep(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(B)||[]}k.fn.extend({prop:function(t,e){return Q(this,k.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[k.propFix[t]||t]})}}),k.extend({prop:function(t,e,n){var i,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o){if((1!==o||!k.isXMLDoc(t))&&(e=k.propFix[e]||e,r=k.propHooks[e]),void 0!==n)return r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:t[e]=n;return r&&"get"in r&&null!==(i=r.get(t,e))?i:t[e]}},propHooks:{tabIndex:{get:function(t){var e=k.find.attr(t,"tabindex");return e?parseInt(e,10):eu.test(t.nodeName)||el.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),!f.optSelected&&(k.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),k.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){k.propFix[this.toLowerCase()]=this}),k.fn.extend({addClass:function(t){var e,n,i,r,o,a;return m(t)?this.each(function(e){k(this).addClass(t.call(this,e,ed(this)))}):(e=ep(t)).length?this.each(function(){if(i=ed(this),n=1===this.nodeType&&" "+ec(i)+" "){for(o=0;on.indexOf(" "+r+" ")&&(n+=r+" ");a=ec(n),i!==a&&this.setAttribute("class",a)}}):this},removeClass:function(t){var e,n,i,r,o,a;return m(t)?this.each(function(e){k(this).removeClass(t.call(this,e,ed(this)))}):arguments.length?(e=ep(t)).length?this.each(function(){if(i=ed(this),n=1===this.nodeType&&" "+ec(i)+" "){for(o=0;o-1;)n=n.replace(" "+r+" "," ");a=ec(n),i!==a&&this.setAttribute("class",a)}}):this:this.attr("class","")},toggleClass:function(t,e){var n,i,r,o,a=typeof t,s="string"===a||Array.isArray(t);return m(t)?this.each(function(n){k(this).toggleClass(t.call(this,n,ed(this),e),e)}):"boolean"==typeof e&&s?e?this.addClass(t):this.removeClass(t):(n=ep(t),this.each(function(){if(s)for(r=0,o=k(this);r-1)return!0;return!1}});var eh=/\r/g;k.fn.extend({val:function(t){var e,n,i,r=this[0];if(!arguments.length){if(r)return(e=k.valHooks[r.type]||k.valHooks[r.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(r,"value"))?n:"string"==typeof(n=r.value)?n.replace(eh,""):null==n?"":n;return}return i=m(t),this.each(function(n){var r;1===this.nodeType&&(null==(r=i?t.call(this,n,k(this).val()):t)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=k.map(r,function(t){return null==t?"":t+""})),(!(e=k.valHooks[this.type]||k.valHooks[this.nodeName.toLowerCase()])||!("set"in e)||void 0===e.set(this,r,"value"))&&(this.value=r))})}}),k.extend({valHooks:{option:{get:function(t){var e=k.find.attr(t,"value");return null!=e?e:ec(k.text(t))}},select:{get:function(t){var e,n,i,r=t.options,o=t.selectedIndex,a="select-one"===t.type,s=a?null:[],u=a?o+1:r.length;for(i=o<0?u:a?o:0;i-1)&&(n=!0);return!n&&(t.selectedIndex=-1),o}}}}),k.each(["radio","checkbox"],function(){k.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=k.inArray(k(t).val(),e)>-1}},!f.checkOn&&(k.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var ef=t.location,em={guid:Date.now()},eg=/\?/;k.parseXML=function(e){var n,i;if(!e||"string"!=typeof e)return null;try{n=new t.DOMParser().parseFromString(e,"text/xml")}catch(t){}return i=n&&n.getElementsByTagName("parsererror")[0],(!n||i)&&k.error("Invalid XML: "+(i?k.map(i.childNodes,function(t){return t.textContent}).join("\n"):e)),n};var ey=/^(?:focusinfocus|focusoutblur)$/,ev=function(t){t.stopPropagation()};k.extend(k.event,{trigger:function(e,n,i,r){var o,a,s,u,l,c,p,h,f=[i||y],v=d.call(e,"type")?e.type:e,b=d.call(e,"namespace")?e.namespace.split("."):[];if(a=h=s=i=i||y,!(3===i.nodeType||8===i.nodeType||ey.test(v+k.event.triggered))){if(v.indexOf(".")>-1&&(v=(b=v.split(".")).shift(),b.sort()),l=0>v.indexOf(":")&&"on"+v,(e=e[k.expando]?e:new k.Event(v,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=b.join("."),e.rnamespace=e.namespace?RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,!e.target&&(e.target=i),n=null==n?[e]:k.makeArray(n,[e]),p=k.event.special[v]||{},r||!p.trigger||!1!==p.trigger.apply(i,n)){if(!r&&!p.noBubble&&!g(i)){for(u=p.delegateType||v,!ey.test(u+v)&&(a=a.parentNode);a;a=a.parentNode)f.push(a),s=a;s===(i.ownerDocument||y)&&f.push(s.defaultView||s.parentWindow||t)}for(o=0;(a=f[o++])&&!e.isPropagationStopped();)h=a,e.type=o>1?u:p.bindType||v,(c=(ti.get(a,"events")||Object.create(null))[e.type]&&ti.get(a,"handle"))&&c.apply(a,n),(c=l&&a[l])&&c.apply&&te(a)&&(e.result=c.apply(a,n),!1===e.result&&e.preventDefault());return e.type=v,!r&&!e.isDefaultPrevented()&&(!p._default||!1===p._default.apply(f.pop(),n))&&te(i)&&l&&m(i[v])&&!g(i)&&((s=i[l])&&(i[l]=null),k.event.triggered=v,e.isPropagationStopped()&&h.addEventListener(v,ev),i[v](),e.isPropagationStopped()&&h.removeEventListener(v,ev),k.event.triggered=void 0,s&&(i[l]=s)),e.result}}},simulate:function(t,e,n){var i=k.extend(new k.Event,n,{type:t,isSimulated:!0});k.event.trigger(i,null,e)}}),k.fn.extend({trigger:function(t,e){return this.each(function(){k.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return k.event.trigger(t,e,n,!0)}});var eb=/\[\]$/,e_=/\r?\n/g,ex=/^(?:submit|button|image|reset|file)$/i,ew=/^(?:input|select|textarea|keygen)/i;k.param=function(t,e){var n,i=[],r=function(t,e){var n=m(e)?e():e;i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!k.isPlainObject(t))k.each(t,function(){r(this.name,this.value)});else for(n in t)!function t(e,n,i,r){var o;if(Array.isArray(n))k.each(n,function(n,o){i||eb.test(e)?r(e,o):t(e+"["+("object"==typeof o&&null!=o?n:"")+"]",o,i,r)});else if(i||"object"!==_(n))r(e,n);else for(o in n)t(e+"["+o+"]",n[o],i,r)}(n,t[n],e,r);return i.join("&")},k.fn.extend({serialize:function(){return k.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=k.prop(this,"elements");return t?k.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!k(this).is(":disabled")&&ew.test(this.nodeName)&&!ex.test(t)&&(this.checked||!tv.test(t))}).map(function(t,e){var n=k(this).val();return null==n?null:Array.isArray(n)?k.map(n,function(t){return{name:e.name,value:t.replace(e_,"\r\n")}}):{name:e.name,value:n.replace(e_,"\r\n")}}).get()}});var ek=/%20/g,eS=/#.*$/,eT=/([?&])_=[^&]*/,eC=/^(.*?):[ \t]*([^\r\n]*)$/mg,eD=/^(?:GET|HEAD)$/,eO=/^\/\//,eI={},eE={},e$="*/".concat("*"),eN=y.createElement("a");function eM(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var i,r=0,o=e.toLowerCase().match(B)||[];if(m(n))for(;i=o[r++];)"+"===i[0]?(t[i=i.slice(1)||"*"]=t[i]||[]).unshift(n):(t[i]=t[i]||[]).push(n)}}function eA(t,e,n,i){var r={},o=t===eE;function a(s){var u;return r[s]=!0,k.each(t[s]||[],function(t,s){var l=s(e,n,i);return"string"!=typeof l||o||r[l]?o?!(u=l):void 0:(e.dataTypes.unshift(l),a(l),!1)}),u}return a(e.dataTypes[0])||!r["*"]&&a("*")}function eP(t,e){var n,i,r=k.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((r[n]?t:i||(i={}))[n]=e[n]);return i&&k.extend(!0,t,i),t}eN.href=ef.href;k.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ef.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(ef.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":e$,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":k.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?eP(eP(t,k.ajaxSettings),e):eP(k.ajaxSettings,t)},ajaxPrefilter:eM(eI),ajaxTransport:eM(eE),ajax:function(e,n){"object"==typeof e&&(n=e,e=void 0),n=n||{};var i,r,o,a,s,u,l,c,d,p,h=k.ajaxSetup({},n),f=h.context||h,m=h.context&&(f.nodeType||f.jquery)?k(f):k.event,g=k.Deferred(),v=k.Callbacks("once memory"),b=h.statusCode||{},_={},x={},w="canceled",S={readyState:0,getResponseHeader:function(t){var e;if(l){if(!a)for(a={};e=eC.exec(o);)a[e[1].toLowerCase()+" "]=(a[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=a[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(t,e){return null==l&&(_[t=x[t.toLowerCase()]=x[t.toLowerCase()]||t]=e),this},overrideMimeType:function(t){return null==l&&(h.mimeType=t),this},statusCode:function(t){var e;if(t){if(l)S.always(t[S.status]);else for(e in t)b[e]=[b[e],t[e]]}return this},abort:function(t){var e=t||w;return i&&i.abort(e),T(0,e),this}};if(g.promise(S),h.url=((e||h.url||ef.href)+"").replace(eO,ef.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(B)||[""],null==h.crossDomain){u=y.createElement("a");try{u.href=h.url,u.href=u.href,h.crossDomain=eN.protocol+"//"+eN.host!=u.protocol+"//"+u.host}catch(t){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=k.param(h.data,h.traditional)),eA(eI,h,n,S),l)return S;for(d in(c=k.event&&h.global)&&0==k.active++&&k.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!eD.test(h.type),r=h.url.replace(eS,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(ek,"+")):(p=h.url.slice(r.length),h.data&&(h.processData||"string"==typeof h.data)&&(r+=(eg.test(r)?"&":"?")+h.data,delete h.data),!1===h.cache&&(r=r.replace(eT,"$1"),p=(eg.test(r)?"&":"?")+"_="+em.guid+++p),h.url=r+p),h.ifModified&&(k.lastModified[r]&&S.setRequestHeader("If-Modified-Since",k.lastModified[r]),k.etag[r]&&S.setRequestHeader("If-None-Match",k.etag[r])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&S.setRequestHeader("Content-Type",h.contentType),S.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+e$+"; q=0.01":""):h.accepts["*"]),h.headers)S.setRequestHeader(d,h.headers[d]);if(h.beforeSend&&(!1===h.beforeSend.call(f,S,h)||l))return S.abort();if(w="abort",v.add(h.complete),S.done(h.success),S.fail(h.error),i=eA(eE,h,n,S)){if(S.readyState=1,c&&m.trigger("ajaxSend",[S,h]),l)return S;h.async&&h.timeout>0&&(s=t.setTimeout(function(){S.abort("timeout")},h.timeout));try{l=!1,i.send(_,T)}catch(t){if(l)throw t;T(-1,t)}}else T(-1,"No Transport");function T(e,n,a,u){var d,p,y,_,x,w=n;!l&&(l=!0,s&&t.clearTimeout(s),i=void 0,o=u||"",S.readyState=e>0?4:0,d=e>=200&&e<300||304===e,a&&(_=function(t,e,n){for(var i,r,o,a,s=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),void 0===i&&(i=t.mimeType||e.getResponseHeader("Content-Type"));if(i){for(r in s)if(s[r]&&s[r].test(i)){u.unshift(r);break}}if(u[0]in n)o=u[0];else{for(r in n){if(!u[0]||t.converters[r+" "+u[0]]){o=r;break}!a&&(a=r)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(h,S,a)),!d&&k.inArray("script",h.dataTypes)>-1&&0>k.inArray("json",h.dataTypes)&&(h.converters["text script"]=function(){}),_=function(t,e,n,i){var r,o,a,s,u,l={},c=t.dataTypes.slice();if(c[1])for(a in t.converters)l[a.toLowerCase()]=t.converters[a];for(o=c.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!u&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=o,o=c.shift()){if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o])){for(r in l)if((s=r.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[r]:!0!==l[r]&&(o=s[0],c.unshift(s[1]));break}}if(!0!==a){if(a&&t.throws)e=a(e);else try{e=a(e)}catch(t){return{state:"parsererror",error:a?t:"No conversion from "+u+" to "+o}}}}}return{state:"success",data:e}}(h,_,S,d),d?(h.ifModified&&((x=S.getResponseHeader("Last-Modified"))&&(k.lastModified[r]=x),(x=S.getResponseHeader("etag"))&&(k.etag[r]=x)),204===e||"HEAD"===h.type?w="nocontent":304===e?w="notmodified":(w=_.state,p=_.data,d=!(y=_.error))):(y=w,(e||!w)&&(w="error",e<0&&(e=0))),S.status=e,S.statusText=(n||w)+"",d?g.resolveWith(f,[p,w,S]):g.rejectWith(f,[S,w,y]),S.statusCode(b),b=void 0,c&&m.trigger(d?"ajaxSuccess":"ajaxError",[S,h,d?p:y]),v.fireWith(f,[S,w]),c&&(m.trigger("ajaxComplete",[S,h]),!--k.active&&k.event.trigger("ajaxStop")))}return S},getJSON:function(t,e,n){return k.get(t,e,n,"json")},getScript:function(t,e){return k.get(t,void 0,e,"script")}}),k.each(["get","post"],function(t,e){k[e]=function(t,n,i,r){return m(n)&&(r=r||i,i=n,n=void 0),k.ajax(k.extend({url:t,type:e,dataType:r,data:n,success:i},k.isPlainObject(t)&&t))}}),k.ajaxPrefilter(function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")}),k._evalUrl=function(t,e,n){return k.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){k.globalEval(t,e,n)}})},k.fn.extend({wrapAll:function(t){var e;return this[0]&&(m(t)&&(t=t.call(this[0])),e=k(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(t){return m(t)?this.each(function(e){k(this).wrapInner(t.call(this,e))}):this.each(function(){var e=k(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=m(t);return this.each(function(n){k(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(t){return this.parent(t).not("body").each(function(){k(this).replaceWith(this.childNodes)}),this}}),k.expr.pseudos.hidden=function(t){return!k.expr.pseudos.visible(t)},k.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},k.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch(t){}};var ej={0:200,1223:204},eR=k.ajaxSettings.xhr();f.cors=!!eR&&"withCredentials"in eR,f.ajax=eR=!!eR,k.ajaxTransport(function(e){var n,i;if(f.cors||eR&&!e.crossDomain)return{send:function(r,o){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];for(a in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),!e.crossDomain&&!r["X-Requested-With"]&&(r["X-Requested-With"]="XMLHttpRequest"),r)s.setRequestHeader(a,r[a]);n=function(t){return function(){n&&(n=i=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===t?s.abort():"error"===t?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(ej[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),i=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=i:s.onreadystatechange=function(){4===s.readyState&&t.setTimeout(function(){n&&i()})},n=n("abort");try{s.send(e.hasContent&&e.data||null)}catch(t){if(n)throw t}},abort:function(){n&&n()}}}),k.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),k.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return k.globalEval(t),t}}}),k.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),k.ajaxTransport("script",function(t){if(t.crossDomain||t.scriptAttrs){var e,n;return{send:function(i,r){e=k("