1function getSearchURLParams(t){var s;return"string"!=typeof t||(s=t.split("?")).length<2?{}:_.object(_.map(s[1].split("&"),function(t){return t.split("=")}))}var jQuery=require("jQuery");function getSuitelet(t,s){return{"customscript_ns_sc_ext_sl_newsletter_sp:customdeploy_ns_sc_ext_sl_newsletter_sp":"/app/site/hosting/scriptlet.nl?script=2279&deploy=1&compid=4375609&ns-at=AAEJ7tMQT6an2qEyRzsgxMIndtvj538xf__nPlyVfhlxwLr_-Lw","customscript_ns_sc_ext_sl_orderstatus_of:customdeploy_ns_sc_ext_sl_orderstatus_of":"/app/site/hosting/scriptlet.nl?script=1212&deploy=1&compid=4375609&ns-at=AAEJ7tMQB6Xz5tARoVkj6WN0XVaDLtyyD_ZI6vSBvgfD-0ojGSI","customscript_ns_sc_sl_contact_us_form:customdeploy_ns_sc_sl_contact_us_form":"/app/site/hosting/scriptlet.nl?script=1204&deploy=1&compid=4375609&ns-at=AAEJ7tMQaJKFADNErCtHYotZgF6iK3FwIMdI3etTI83eDe_ADrA"}[t+":"+s]}var xhrFactory=jQuery.ajaxSettings.xhr;jQuery.ajaxSettings.xhr=function(){var t=xhrFactory.apply(this,arguments),_=t.open;return t.open=function(){var t=getSearchURLParams(arguments[1]);if(t.hasOwnProperty("script")&&t.hasOwnProperty("deploy")){var s=getSuitelet(t.script,t.deploy);if(s){for(var r=getSearchURLParams(s),e=Object.keys(t),n=0;n<e.length;n++){var o=e[n],p=t[o];r.hasOwnProperty(o)||(s+="&"+o+"="+p)}arguments[1]=s}}return _.apply(this,arguments)},t}; 2var extensions = {}; 3extensions['SC.CMSMerchandisingZoneFix.1.0.0'] = function(){ 4function getExtensionAssetsPath(asset){ 5return 'extensions/SC/CMSMerchandisingZoneFix/1.0.0/' + asset; 6}; 7define("SC.CMSMerchandisingZoneFix.1.0.0.CMSMerchandisingZoneFix",["Item.Collection","Merchandising.View","Backbone","underscore","Utils","merch_zone_cms.tpl"],function CMSMerchandisingZoneFix(r,a,c,n,s,d){"use strict";return{mountToApp:function(e){var o=e.getLayout();c.Events.on("cms:custom:merchzones-rendered",function(t,i){n.defer(function(){var e=o.$("#"+i.divId),n=new r(t,{parse:!0}),n=new a({items:n,model:new c.Model({show:Infinity})});!function(e,n){var t;if(n){try{t=s.requireModules(n+".tpl")}catch(i){console.warn("Template "+n+" is not compiled into the application, using default")}e.template=t||d}else e.template=d}(n,e.closest("[data-cms-area]").data("template")||i.tpl),n.setElement(e[0]),n.render(),n.trigger("afterMerchandAppendToDOM")})})}}}); 8} 9extensions['CXExtensibility.CoreContent.1.0.5'] = function(){ 10function getExtensionAssetsPath(asset){ 11return 'extensions/CXExtensibility/CoreContent/1.0.5/' + asset; 12}; 13define("CXExtensibility.CoreContent.CMSMerchzoneCCT.View",["CustomContentType.Base.View","cxextensibility_corecontent_cmsmerchzonecct.tpl","Utils","jQuery","underscore"],function(e,t,r,i,s){"use strict";var c="1",a="2",n="3",o=!1;return e.extend({template:t,settings:null,initialize:function(){this._initialize(),this.on("afterViewRender",function(){var e=this.settings.custrecord_merchzone_merchrule;o=window.matchMedia("(max-width: 767px)").matches,e&&""!==e&&this.fetchMerchZoneEndpoint(e)})},fetchMerchZoneEndpoint:function(e){i.ajax({url:"/api/cms/v2/merchzones/"+e}).done((function(e){this.fetchItems(e.data[0].queryString)}).bind(this))},fetchItems:function(e){i.ajax({url:e}).done((function(e){var t=s.map(e.items,(function(e){return{name:e.storedisplayname2||e.displayname,price:e.onlinecustomerprice_formatted,link:"/"+e.urlcomponent,image:this.getDefaultImage(e.itemimages_detail)}}).bind(this));this.renderMerchzone(t)}).bind(this))},renderMerchzone:function(e){var t;0!==e.length&&(0===(t=this.settings.custrecord_merchzone_heading||"").length?this.$(".cms-merchzone-heading").remove():this.$(".cms-merchzone-heading").text(t),s.each(e,function(e){var t=this.$("#item-template").contents().clone();t.find(".item-name").text(e.name),t.find(".item-price").text(e.price),t.find(".item-link").attr("href",e.link),t.find(".item-name").attr("href",e.link),t.find(".cms-merchzone-see-more").attr("href",e.link),t.find(".item-image").attr("src",e.image.url),t.find(".item-image").attr("alt",e.image.altimagetext),this.$(".cms-merchzone-slider").append(t)},this),t=this.$(".cms-merchzone-slider").parent().hasClass("bx-viewport"),this.settings.custrecord_merchzone_display_mode.toString()!==n?t||this.renderSlider():this.renderGrid())},renderSlider:function(){var e=this.settings.custrecord_merchzone_display_mode||c,t=e.toString()===a?"vertical":"horizontal",i=o?1:parseInt(this.settings.custrecord_merchzone_numitems)||4,n=this.$(".cms-merchzone-slider").width(),n=Math.floor(n/i),i={mode:t,minSlides:i,maxSlides:i,slideWidth:n,moveSlides:1,pager:!1,nextText:'<a class="cms-merchzone-slider-next cms-merchzone-'+t+'-control"><span class="control-text">'+s("next").translate()+'</span> <i class="carousel-next-arrow"></i></a>',prevText:'<a class="cms-merchzone-slider-prev cms-merchzone-'+t+'-control"><i class="carousel-prev-arrow"></i> <span class="control-text">'+s("prev").translate()+"</span></a>"};r.initBxSlider(this.$(".cms-merchzone-slider"),i),this.$(".item-image-wrapper").css({"min-height":n+"px"}),e===a&&this.$(".bx-wrapper").css({margin:"0 auto"}),setTimeout((function(){var e=this.$(".cms-merchzone-item").height();this.$(".bx-viewport").css({"min-height":e})}).bind(this))},renderGrid:function(){var e=this.$(".cms-merchzone-slider").width(),t=o?1:parseInt(this.settings.custrecord_merchzone_numitems)||3;this.$(".cms-merchzone-slider").removeClass("cms-merchzone-slider").addClass("cms-merchzone-grid"),this.$(".cms-merchzone-grid > li").css({width:Math.floor(e/t)})},getDefaultImage:function(e){var t=function i(e){return"url"in e&&"altimagetext"in e?[e]:s.flatten(s.map(e,function(e){return s.isArray(e)?e:i(e)}))}(e);return s.find(t,function(e){var t=e.url.match(/.*\.default\.[A-Za-z]*/i);return!!t&&t[0]===e.url})||t[0]},contextDataRequest:[],validateContextDataRequest:function(){return!0},getContext:function(){return{merchRule:this.settings.custrecord_merchzone_merchrule,displayMode:this.settings.custrecord_merchzone_display_mode,numItems:this.settings.custrecord_merchzone_numitems}}})}); 14define("CXExtensibility.CoreContent.CMSMerchzoneCCT",["CXExtensibility.CoreContent.CMSMerchzoneCCT.View"],function(t){"use strict";return{mountToApp:function(e){var n=e.getComponent("Environment");n.setTranslation("fr_CA",[{key:"See More",value:"Voir Plus"}]),n.setTranslation("es_ES",[{key:"See More",value:"Ver Más"}]),e.getComponent("CMS").registerCustomContentType({id:"CMS_MERCHZONETWO",view:t})}}}); 15define("CXExtensibility.CoreContent.CoreContentModule",["CXExtensibility.CoreContent.CMSMerchzoneCCT"],function(t){"use strict";return{mountToApp:function(n){t.mountToApp(n)}}}); 16} 17extensions['SuiteCommerce.CustomFields.1.1.4'] = function(){ 18function getExtensionAssetsPath(asset){ 19return 'extensions/SuiteCommerce/CustomFields/1.1.4/' + asset; 20}; 21define("SuiteCommerce.CustomFields.Instrumentation.Helper",["require","exports","SuiteCommerce.CustomFields.Instrumentation"],function(e,n,t){"use strict";function i(){}Object.defineProperty(n,"__esModule",{value:!0}),n.ComponentArea="SC Custom Fields",n.ExtensionVersion="1.1.4",n.QueueNameSuffix="-CustomFields",i.initializeInstrumentation=function(e){t["default"].initialize({environment:e.getComponent("Environment"),queueNameSuffix:n.QueueNameSuffix})},n.InstrumentationHelper=i}); 22define("SuiteCommerce.CustomFields.JavaScript.Utils",["require","exports","Utils"],function(e,t,n){"use strict";function r(){}
22Object.defineProperty(t,"__esModule",{value:!0}),r.formatDate=function(e,t){var r=t,n=!1,i=new Date(e),o=function(e,t){return r.match(e)&&!n?(n=!0,r.replace(e,i.toLocaleString("en-us",{month:t}))):r};return-1<navigator.userAgent.indexOf("MSIE ")?e:(r=(r=(r=(r=r.replace("yyyy",i.toLocaleString("en-us",{year:"numeric"}))).replace("yy",i.toLocaleString("en-us",{year:"2-digit"}))).replace("dd",i.toLocaleString("en-us",{day:"2-digit"}))).replace("d",i.toLocaleString("en-us",{day:"numeric"})),r=o("mmmm","long"),r=o("mmm","short"),r=o("mm","2-digit"),r=o("m","numeric"))},r.isUrlAbsolute=function(e){return/^https?:\/\//.test(e)},r.getAbsoluteUrl=function(e,t){return n.getAbsoluteUrl(e,t)},r.translate=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return n.translate.apply(void 0,[e].concat(t))},t.Utils=r}); 23var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(t){for(var e,r=1,i=arguments.length;r<i;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};define("SuiteCommerce.CustomFields.Instrumentation.Log",["require","exports","SuiteCommerce.CustomFields.Instrumentation.Logger","SuiteCommerce.CustomFields.Instrumentation.Helper"],function(t,e,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(o=n=e.LogSeverity||(e.LogSeverity={})).INFO="info",o.ERROR="error",a.prototype.setInitialAttributes=function(t){var e={label:null,parametersToSubmit:this.defaultParametersToSubmit||{},timer:{},severity:n.INFO},e=__assign({},e,t),r=e.label,i=e.parametersToSubmit,o=e.timer,e=e.severity;this.label=r,this.parametersToSubmit=i,this.timer=o,this.severity=e},a.prototype.startTimer=function(){this.timer.startTime=this.getTimestamp()},a.prototype.endTimer=function(){this.timer.endTime=this.getTimestamp()},a.prototype.getTimestamp=function(){return!this.isOldInternetExplorer()&&performance.now()||Date.now()},a.prototype.getElapsedTimeForTimer=function(){var t=this.timer;return t.startTime&&t.endTime?t.startTime>t.endTime?(console.warn("Start time should be minor that end time in timer"),null):t.endTime-t.startTime:(t.startTime||console.warn("The Start time is not defined"),t.endTime||console.warn("The End time is not defined"),null)},a.prototype.setParameters=function(e){var r=this;Object.keys(e).forEach(function(t){r.setParameter(t,e[t])})},a.prototype.setParameter=function(t,e){var r=this.parametersToSubmit;r[t]=e,this.parametersToSubmit=r},a.prototype.submit=function(){this.isOldInternetExplorer()||(this.severity===n.ERROR?this.submitAsError():(n.INFO,this.submitAsInfo()))},a.prototype.isOldInternetExplorer=function(){return!!navigator.userAgent.match(/Trident/g)||!!navigator.userAgent.match(/MSIE/g)},a.prototype.submitAsError=function(){r.Logger.getLogger().error(this.parametersToSubmit)},a.prototype.submitAsInfo=function(){r.Logger.getLogger().info(this.parametersToSubmit)};var n,o,s=a;function a(t){void 0===t&&(t={label:""}),this.defaultParametersToSubmit={componentArea:i.ComponentArea,extensionVersion:i.ExtensionVersion},this.setInitialAttributes(t)}e.Log=s}); 24define("SuiteCommerce.CustomFields.Instrumentation.Logger",["require","exports","SuiteCommerce.CustomFields.Instrumentation.MockAppender"],function(g,e,u){"use strict";function c(){}Object.defineProperty(e,"__esModule",{value:!0}),c.getLogger=function(){return this.instance=this.instance||this.buildLoggerInstance(),this.instance},c.buildLoggerInstance=function(){var e;try{var n=g("Loggers").Loggers,t=g("Loggers.Appender.ElasticLogger").LoggersAppenderElasticLogger.getInstance(),r=u.MockAppender.getInstance(),o=g("Loggers.Configuration"),i="CommerceExtensions"+c.options.queueNameSuffix;return n.setConfiguration(((e={})[i]={log:[{profile:o.prod,appenders:[t]},{profile:o.dev,appenders:[r]}],actions:{},loggers:{}},e)),n.getLogger(i)}catch(s){return{info:function(e){},error:function(e){}}}},e.Logger=c}); 25define("SuiteCommerce.CustomFields.Instrumentation.MockAppender",["require","exports"],function(e,n){"use strict";function o(){}Object.defineProperty(n,"__esModule",{value:!0}),o.prototype.info=function(e){console.info("MockAppender - Info",e)},o.prototype.error=function(e){console.error("MockAppender - Error",e)},o.prototype.ready=function(){return!0},o.getInstance=function(){return o.instance=o.instance?o.instance:new o},o.prototype.start=function(e,n){return n},o.prototype.end=function(e,n){},n.MockAppender=o}); 26define("SuiteCommerce.CustomFields.Instrumentation",["require","exports","underscore","SuiteCommerce.CustomFields.Instrumentation.Logger","SuiteCommerce.CustomFields.Instrumentation.Log"],function(e,t,o,r,n){"use strict";
26Object.defineProperty(t,"__esModule",{value:!0});var i=[];t["default"]={initialize:function(e){r.Logger.options=e},getLog:function(e){return this.getLogModelByLabel(e)||this.registerNewLog(e)},getLogModelByLabel:function(e){return o(i).findWhere({label:e})},registerNewLog:function(e){var t=new n.Log({label:e});return i.push(t),t},setParameterForAllLogs:function(t,o){i.forEach(function(e){e.setParameter(t,o)})},setParametersForAllLogs:function(t){i.forEach(function(e){e.setParameters(t)})},submitLogs:function(){i.forEach(function(e){e.submit()})}}}); 27define("SuiteCommerce.CustomFields.Utils",["require","exports","underscore"],function(e,t,i){"use strict";function r(){}Object.defineProperty(t,"__esModule",{value:!0}),r.compileText=function(e,t){var r=e||"";return i(t||{}).each(function(e,t){var i=new RegExp("{{"+t+"}}","g");r=r.replace(i,e)}),r},t.CustomFieldsUtils=r}); 28define("SuiteCommerce.CustomFields.PDP.Configuration",["require","exports","underscore"],function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=null,i=((n.DataMarkupTypes||(n.DataMarkupTypes={})).JsonLd="JSON-LD",o.setEnvironment=function(e){t=e},o.getFieldsFromConfiguration=function(){var i=this,n=[];return o.get("customFields.pdp.fields",[]).forEach(function(e){n.push({nameInConfiguration:e.fieldid,fieldText:e.fieldid,fieldsToParse:[],schema:e.schema,show:e.show,hideFromQuickView:e.hideFromQuickView,parsedText:"",visible:!1})}),n.forEach(function(e){var n=i.parseField(e.fieldText);e.fieldsToParse=n}),n},o.get=function(e,n){var i;return t?(i=t.getConfig(e),r.isUndefined(i)&&!r.isUndefined(n)?n:i):(console.error("Please set the Environment Component in the Configuration."),null)},o.parseField=function(e){var n=e.match(/\[\[(.+?)\]\]/g);return n=(n=n||[]).map(function(e){return e.replace("]]","").replace("[[","")})},Object.defineProperty(o,"structuredDataMarkupType",{get:function(){return this.get("structureddatamarkup.type")},enumerable:!0,configurable:!0}),o);function o(){}n.Configuration=i}); 29var __extends=this&&this.__extends||function(){var n=function(t,e){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])}))(t,e)};return function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}}();define("SuiteCommerce.CustomFields.PDP.Main.View",["require","exports","Backbone","suitecommerce_customfields_pdp_field.tpl","SuiteCommerce.CustomFields.Instrumentation"],function(t,e,i,n,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});r=i.View,__extends(u,r),u.prototype.logFieldsQuantity=function(t){var e=o["default"].getLog("usage"),i=this.isQuickView?"Quick View":"PDP";e.setParameters({activity:"Show custom "+i+" fields.",instanceCount:t}),e.submit()},u.prototype.getContext=function(){var t=this.model.get("fieldsList").filter(function(t){return t.show}),e=t.length;return this.logFieldsQuantity(e),{field:t,showContainer:0<e}};var r,s=u;function u(t){var e=r.call(this,t)||this;return e.template=n,e.isQuickView=!!t.isQuickView,e.model.on("childSelected",function(){e.render()}),e}e.PDPFieldsView=s}); 30var __extends=this&&this.__extends||function(){var o=function(e,t){return(o=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};return function(e,t){function i(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}}();define("SuiteCommerce.CustomFields.PDP.Model",["require","exports","Backbone","SuiteCommerce.CustomFields.PDP.Configuration","underscore"],function(e,t,i,o,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});r=i.Model,__extends(u,r),Object.defineProperty(u.prototype,"pdp",{get:function(){return this.get("pdp")},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"fieldsList",{get:function(){return this.get("fieldsList")},set:function(e){this.set("fieldsList",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"itemInfo",{get:function(){return this.get("itemInfo")},set:function(e){this.set("itemInfo",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"childItemInfo",{get:function(){return this.pdp.getSelectedMatrixChilds()},enumerable:!0,configurable:!0}),u.prototype.updateFields=function(){var n=this,e=this.fieldsList;e.forEach(function(e){var t=e.show,i=e.fieldText,o=e.fieldsToParse;e.show=!(!t||n.isQuickView&&e.hideFromQuickView),e.show&&(e.parsedText=n.replaceFromFieldList(i,o),e.schema&&n.populateJsonLdValues(e),e.visible=e.show&&n.updateVisibility(o))}),this.fieldsList=e},u.prototype.replaceFromFieldList=function(e,t){var i=this,o=e;return t.forEach(function(e){var t=i.getItemInfoFieldValue(e);o=o.split("[["+e+"]]").join(""+t)}),o},u.prototype.updateVisibility=function(e){var i=this,o=!1;return e.forEach(function(e){var t=i.getItemInfoFieldValue(e);(t&&" "!==t||0===t)&&(o=!0)}),o},u.prototype.getItemInfoFieldValue=function(e){var t=this.itemInfo,i=this.childItemInfo;return 1===i.length?i[0][e]||t[e]||"":t[e]||""},u.prototype.populateJsonLdValues=function(e){var t=this,i="";e.fieldsToParse.forEach(function(e){i+=t.getItemInfoFieldValue(e)}),this.fieldsForJsonLd[e.schema]=i},u.prototype.addJsonLdValues=function(){var i=this;this.pdp.modifyViewJsonLd("ProductDetails.Full.View",function(e){var t=n.extend(e,i.fieldsForJsonLd);return jQuery.Deferred().resolve(t)})};var r,s=u;function u(e){var t=r.call(this,e)||this;return t.isQuickView=!!e.isQuickView,t.fieldsList=o.Configuration.getFieldsFromConfiguration(),t.itemInfo=t.pdp.getItemInfo().item,t.fieldsForJsonLd={},t.updateFields(),o.Configuration.structuredDataMarkupType===o.DataMarkupTypes.JsonLd&&t.addJsonLdValues(),t.pdp.on("afterOptionSelection",function(){t.updateFields(),t.trigger("childSelected")}),t}t.PDPModel=s}); 31define("SuiteCommerce.CustomFields.PDP",["require","exports","SuiteCommerce.CustomFields.PDP.Configuration","SuiteCommerce.CustomFields.PDP.Main.View","SuiteCommerce.CustomFields.PDP.Model"],function(i,e,o,t,d){"use strict";return{mountToApp:function(i){o.Configuration.setEnvironment(i.getComponent("Environment"));var e=i.getComponent("PDP");e&&this.addCustomFields(e)},addCustomFields:function(i){this.addCustomFieldsToPDP(i),this.addCustomFieldsToQuickViews(i)},addCustomFieldsToPDP:function(i){i.addChildView("Product.Sku",this.pdpFieldsViewConstructor(i))},addCustomFieldsToQuickViews:function(i){i.addChildViews(i.PDP_QUICK_VIEW,{"Product.Sku":{"CustomFields.PDPFields":{childViewIndex:11,childViewConstructor:this.pdpFieldsViewConstructor(i,!0)}}})},pdpFieldsViewConstructor:function(e,o){return void 0===o&&(o=!1),function(){var i=new d.PDPModel({pdp:e,isQuickView:o});return new t.PDPFieldsView({model:i,isQuickView:o})}}}}); 32define("SuiteCommerce.CustomFields.PDP.Main",["require","exports","SuiteCommerce.CustomFields.PDP","SuiteCommerce.CustomFields.Instrumentation.Helper"],function(e,t,i,n){"use strict";return{mountToApp:function(e){n.InstrumentationHelper.initializeInstrumentation(e),i.mountToApp(e)}}}); 33} 34extensions['logitail.CustomizeOptionsInPdp.1.0.0'] = function(){ 35function getExtensionAssetsPath(asset){ 36return 'extensions/logitail/CustomizeOptionsInPdp/1.0.0/' + asset; 37}; 38define("logitail.CustomizeOptionsInPdp.CustomizeOptionsInPdp.View",["logitail_customizeoptionsinpdp_customizeoptionsinpdp.tpl","logitail.CustomizeOptionsInPdp.CustomizeOptionsInPdp.SS2Model","Backbone"],function(i,t,n){"use strict";return n.View.extend({template:i,initialize:function(i){},events:{},bindings:{},childViews:{},getContext:function(){return{}}})}); 39define("logitail.CustomizeOptionsInPdp.CustomizeOptionsInPdp.Model",["Backbone","Utils"],function(e,t){"use strict";return e.Model.extend({urlRoot:t.getAbsoluteUrl(getExtensionAssetsPath("services/CustomizeOptionsInPdp.Service.ss"))})}); 40define("logitail.CustomizeOptionsInPdp.CustomizeOptionsInPdp.SS2Model",["Backbone","Utils"],function(t,e){"use strict";return t.Model.extend({urlRoot:e.getAbsoluteUrl(getExtensionAssetsPath("Modules/CustomizeOptionsInPdp/SuiteScript2/CustomizeOptionsInPdp.Service.ss"),!0)})}); 41define("logitail.CustomizeOptionsInPdp.CustomizeOptionsInPdp",["logitail.CustomizeOptionsInPdp.CustomizeOptionsInPdp.View","ProductViews.Option.View","ProductDetails.Full.View","ProductDetailToQuote.View","ProductDetails.ImageGallery.View"],function(t,o,i,n,r){"use strict";return{mountToApp:function(t){var e=t.getComponent("Layout");_.extend(o.prototype,{initialize:_.wrap(o.prototype.initialize,function(t){t.apply(this,Array.prototype.slice.call(arguments,1
41)),e.on("afterShowContent",function(){$(".product-views-option-color-picker-box").each(function(){$(this).hasClass("active")&&$(this).closest(".product-views-option-color-picker").addClass("active")}),$(".product-views-option-color-picker-box-img").each(function(){$(this).hasClass("active")&&$(this).closest(".product-views-option-color-picker").addClass("active")}),$(".product-views-option-color-picker").click(function(){$(".product-views-option-color-picker").removeClass("active"),$(this).addClass("active")});var t='<span class="product-views-option-color-picker-box-img-disabled">✕</span>';$("img.muted").text(t),$("img.muted").before(t),$(window).on("hashchange",function(t){$(".product-details-full").length&&($(".product-views-option-color-picker-box-img-disabled").remove(),$("img.muted").before('<span class="product-views-option-color-picker-box-img-disabled">✕</span>'))}),$('[data-view="Quantity"]').before($("#custcol_crye_product_size-container")),$("select[name=custcol_crye_product_size] > option:first-child").text("SIZE")})})}),_.extend(i.prototype,{initialize:_.wrap(i.prototype.initialize,function(t){t.apply(this,Array.prototype.slice.call(arguments,1)),e.on("afterShowContent",function(){var e=$
41(".product-details-full-content-header"),o=$(".product-details-full");function t(t){t.matches?$(".product-details-full").length&&o.prepend(e):$(".product-details-full").length&&$(".product-details-full-main-content-right").prepend(e)}var i=window.matchMedia("(max-width: 1000px)"),i=(t(i),i.addListener(t),$(".product-details-full-main-content-right"),$(".product-details-full-content-header").outerHeight()+$(".product-details-full-main").outerHeight()-72);$(".product-details-full-main-content-right").css("top","-"+i+"px")})})}),_.extend(r.prototype,{getContext:_.wrap(r.prototype.getContext,function(t){var e=t.apply(this,_.toArray(arguments).slice(1));return e.images=e.images.map(function(t){return t.showCaption=/detail/i.test(t.url),t}),e})}),_.extend(n.prototype,{getContext:_.wrap(n.prototype.getContext,function(t){var e=t.apply(this,_.toArray(arguments).slice(1));return e.isQuotable=!1,e})})}}}); 42} 43extensions['CP.customLayouts.2.0.3'] = function(){ 44function getExtensionAssetsPath(asset){ 45return 'extensions/CP/customLayouts/2.0.3/' + asset; 46}; 47define("CP.customLayouts.scripts.Model",["Backbone","Utils"],function(e,t){"use strict";return e.Model.extend({})}); 48define("CP.customLayouts.scripts",["CP.customLayouts.scripts.View"],function(o){"use strict";return{mountToApp:function(t){var n=t.getComponent("Layout");n&&n.addChildView("Header.Logo",function(){return new o({container:t})})}}}); 49define("CP.customLayouts.scripts.View",["cp_customlayouts_scripts.tpl","CP.customLayouts.scripts.SS2Model","Backbone"],function(e,s,t){"use strict";return t.View.extend({template:e,initialize:function(e){},events:{},bindings:{},childViews:{},getContext:function(){return this.message=this.message||"Hello World!!",{message:this.message}}})}); 50define("subnav.View",["PageType.Base.View","cp_customlayouts_subnav.tpl","Utils","Backbone.View"],function(e,t,n,i){return e.PageTypeBaseView.extend({template:t,initialize:function(e){},getContext:function(){return console.log("options",this.options),{test:123}}})}); 51define("CP.customLayouts.thanks.View",["PageType.Base.View","cp_customlayouts_thanks.tpl"],function(e,t){"use strict";return e.PageTypeBaseView.extend({template:t,initialize:function(e){this.pageInfo="Default message"},getContext:function(){return Utils.extend(this.pageInfo,{myTestString:"This is a test string I added in the view"})}})}); 52define("CP.customLayouts.thanks",["underscore","CP.customLayouts.thanks.View","cp_customlayouts_thanks.tpl","Utils"],function(t,a,e,s){"use strict";return{mountToApp:function(t){var e=t.getComponent("PageType");e.registerPageType({name:"thanks",view:a,options:{myOptionProperty:"myOptionValue"},defaultTemplate:{name:"cp_customlayouts_thanks.tpl",displayName:"thanks Page Type",thumbnail:s.getAbsoluteUrl(getExtensionAssetsPath("img/hdr_2column_leftNarrow.svg"))}}),e.registerTemplate({pageTypes:["cms-landing-page","landing-page"],template:{name:"cp_customlayouts_thanks.tpl",displayName:"thanks Template",thumbnail:s.getAbsoluteUrl(getExtensionAssetsPath("img/hdr_2column_leftNarrow.svg"))}})}}}); 53define("CP.customLayouts.subnav",["underscore","subnav.View","cp_customlayouts_subnav.tpl","CP.customLayouts.thanks","Utils"],function(e,a,t,n,s){"use strict";return{mountToApp:function(e){n.mountToApp(e);var t=e.getComponent("PageType");t.registerPageType({name:"subnav",view:a,defaultTemplate:{name:"cp_customlayouts_subnav.tpl",displayName:"Subnav Page Type",thumbnail:s.getAbsoluteUrl(getExtensionAssetsPath("img/hdr_2column_leftNarrow.svg"))}}),t?t.getPageTypes():console.error("PageType component is not available."),t.registerTemplate({pageTypes:["cms-landing-page","landing-page"],template:{name:"cp_customlayouts_subnav.tpl",displayName:"Subnav Template",thumbnail:s.getAbsoluteUrl(getExtensionAssetsPath("img/hdr_2column_leftNarrow.svg"))}});Backbone.history.on("route",function(){})}}}); 54} 55extensions['logitail.GlobalExtCrye.1.0.0'] = function(){ 56function getExtensionAssetsPath(asset){ 57return 'extensions/logitail/GlobalExtCrye/1.0.0/' + asset; 58}; 59define("logitail.GlobalExtCrye.GlobalExtCrye.View",["logitail_globalextcrye_globalextcrye.tpl","logitail.GlobalExtCrye.GlobalExtCrye.Model","Backbone"],function(e,i,t){"use strict";return t.View.extend({template:e,initialize:function(e){this.model=new i;var t=this;this.model.fetch().done(function(e){t.message=e.message,t.render()})},events:{},bindings:{},childViews:{},getContext:function(){return this.message=this.message||"Hello World!!",{message:this.message}}})}); 60define("logitail.GlobalExtCrye.GlobalExtCrye.Model",["Backbone","Utils"],function(e,t){"use strict";return e.Model.extend({urlRoot:t.getAbsoluteUrl(getExtensionAssetsPath("services/GlobalExtCrye.Service.ss"))})}); 61define("logitail.GlobalExtCrye.GlobalExtCrye.SS2Model",["Backbone","Utils"],function(e,t){"use strict";return e.Model.extend({urlRoot:t.getAbsoluteUrl(getExtensionAssetsPath("Modules/GlobalExtCrye/SuiteScript2/GlobalExtCrye.Service.ss"),!0)})}); 62define("logitail.GlobalExtCrye.GlobalExtCrye",["logitail.GlobalExtCrye.GlobalExtCrye.View","MyAccountMenu","Utils","Facets.Browse.CategoryHeading.View","Facets.CategoryCell.View","Facets.Browse.View","Backbone.CollectionView","Backbone","Categories.Model","AjaxRequestsKiller"],function(e,t,i,a,l,n,s,c,d,g){"use strict";return{mountToApp:function(r){var e=t.getInstance(),o=(e.removeSubEntry("paymentmethods"),e.addSubEntry({entryId:"orders",id:"quotes",name:i.translate("Quotes"),url:"quotes",index:5,permission:"transactions.tranFind.1,transactions.tranEstimate.1"}),e.removeSubEntry("quotes"),this),e=(o.application=r,i.getAbsoluteUrl(getExtensionAssetsPath("Modules/GlobalExtCrye/SuiteScript2/GlobalExtCrye.Service.ss"),!0)),e=$.get(e);e.then(function(e){var t=JSON.parse(e);o.application.custcategory=t.data}),o.application.waitForPromise(e),_.extend(n.prototype,{initialize:_.wrap(n.prototype.initialize,function(e,t){e.apply(this,_.toArray(arguments).slice(1));var o=c.history.fragment.split("?")[0],i=(this.url=o).split("/").slice(0,-1).join("/");if(SC.CONFIGURATION.categories.menuLevel===o.split("/").length){const r=jQuery.Deferred(),a=new d({data:{fullurl:i},killerId:g.getKillerId()});a.fetch().then(e=>{this.model.set("parentcategory",a),r.resolve()})["catch"](()=>{console.log("Failed to get Dynamic Categories for logged in user")}).always(()=>{r.resolve()}),this.application.waitForPromise(a)}}),childViews:_.extend({},n.prototype.childViews,{"Facets.CategoryCells":function(){var t=this,e=t.model.get("category")?t.model.get("category").get("categories"):[];let o=_.isEmpty(e)&&t.model.get("parentcategory")?t.model.get("parentcategory").get("categories"):e;return _.isEmpty(o)?(t.model.once("change:category change:parentcategory",function(){t.render()}),new s({childView:l,collection:[]})):(o=o.map(e=>(e.fullurl==="/"+t.url?e.selected=!0:e.selected=!1,e)),new s({childView:l,collection:o}))}})}),_.extend(a.prototype,{getContext:_.wrap(a.prototype.getContext,function(e){var t,o,i;return this.model?(t=e.apply(this,_.toArray(arguments).slice(1)),o=this.model.get("internalid"),i=r.custcategory||[],i=_.find(i,{internalid:o})||!1,t.Category=i,t.parenturl=this.model.get("parenturl"),t.model=this.model,t):{}})}),_.extend(l.prototype,{getContext:_.wrap(l.prototype.getContext,function(e){var t=e.apply(this,_.toArray(arguments).slice(1)),o=this.model.get("internalid"),i=r.custcategory||[],i=_.find(i,{internalid:o})||!1;return t.Category=i,t.isselected=this.model.get("selected")||!1,t})})}}}); 63} 64extensions['logitail.HeaderExt.1.0.0'] = function(){ 65function getExtensionAssetsPath(asset){ 66return 'extensions/logitail/HeaderExt/1.0.0/' + asset; 67}; 68define("logitail.HeaderExt.Headerfix",["Header.Menu.View","Footer.View","Profile.Model","ProductViews.Price.View","Transaction.Line.Views.Tax","Header.View","Utils","Item.Model"],function(t,a,o,r,n,i,s,c){"use strict";return{mountToApp:function(e){_.extend(c.prototype,{_showStrikeThrough:function(){var e=SC&&SC.CONFIGURATION&&SC.CONFIGURATION.priceLevel&&SC.CONFIGURATION.priceLevel.enabled,t=SC&&SC.CONFIGURATION&&SC.CONFIGURATION.priceLevel&&SC.CONFIGURATION.priceLevel["default"],a=this.get("matrixchilditems_detail")||!1;let r=this.get(""+t);return a&&!r&&(r=_.some(a,t)),e&&r}}),_.extend(i.prototype,{initialize:_.wrap(i.prototype.initialize,function(e){e.apply(this,_.toArray(arguments).slice(1)),this.preventTopScroll=this.preventTopScroll.bind(this),window.addEventListener("wheel",this.preventTopScroll,{passive:!1})}),preventTopScroll:function(e){(window.pageYOffset||document.documentElement.scrollTop)<=100&&e.deltaY<0&&(e.preventDefault(),window.scrollTo(0,0))},getContext:_.wrap(i.prototype.getContext,function(e){var t=e.apply(this,_.toArray(arguments).slice(1)),a=s.getDeviceType(this.windowWidth);return t.isCustomHeader="tablet"===a||"phone"===a,t})}),_.extend(n.prototype,{getContext:_.wrap(n.prototype.getContext,function(e){var t=e.apply(this,_.toArray(arguments).slice(1)),a=t.taxRate;return a&&(!a.includes(".")||a.endsWith(".0")||a.endsWith(".00")?t.taxRate=a.replace(/\.0+$/,""):t.taxRate=a+"%"),t})}),_.extend(a.prototype,{getContext:_.wrap(a.prototype.getContext,function(e){var t=e.apply(this,_.toArray(arguments).slice(1)),a=SC.ENVIRONMENT.siteSettings.subsidiaries||[],r=o.getInstance(),r=r&&r.get("subsidiary"),n=_.findWhere(a,{isdefault:"T"});let i=n;r=(i=r&&(a=_.findWhere(a,{internalid:r.toString()}))?a:i).internalid===n.internalid&&"4"===i.internalid;return t.isDefaultSubsidiary=r,t.isUSSubsidiary=r,t.isEUSubsidiary="5"===i.internalid,t})}),_.extend(r.prototype,{getContext:_.wrap(r.prototype.getContext,function(e){var t=e.apply(this,_.toArray(arguments).slice(1)),a=t.comparePriceFormatted,a=(a&&(a=a.split(" "),t.isMatrixComparePrice=!0,t.strikeMinComparePrice=s.formatCurrency(a[0]),t.strikeMaxComparePrice=s.formatCurrency(a[2])),SC.CONFIGURATION.priceLevel.enabled),r=SC.CONFIGURATION.priceLevel["default"];if(""==t.comparePriceFormatted&&a&&r){a=this.model.get("item");if(!a)return t;a=a.get("matrixchilditems_detail");if(!a||!a.length)return t.matrixBeforeSelection=!1,t;var a=_.max(a,function(e){return parseFloat(e[r]||0)}),n=(t.matrixBeforeSelection=!1,parseFloat(t.price||0)),i=parseFloat(a[r]||0);i&&n&&(n<i?(t.matrixBeforeSelection=!0,t.strikePriceFormatted=a[r+"_formatted"]):t.matrixBeforeSelection=!1)}return t})}),_.extend(t.prototype,{initialize:_.wrap(t.prototype.initialize,function(e){e.apply(this,_.toArray(arguments).slice(1)),this.initializeMenuHandlers();var t=Backbone.history.fragment;(t.includes("stripeconfirmation")||t.includes("stripethankyou")||"checkout"===SC.ENVIRONMENT.SCTouchpoint||"shopping"===SC.ENVIRONMENT.SCTouchpoint)&&this.checkoutHeaderHandlers(),this._outsideClickHandler=this.handleOutsideClick.bind(this),document.addEventListener("click",this._outsideClickHandler)}),handleOutsideClick:function(e){var t=document.querySelector(".header-menu-level1"),a=document.querySelector(".header-menu-secondary-nav"),r=document.getElementsByClassName("main")[0],n=t.querySelector(".header-menu-level2-active"),t=t.contains(e.target);!n||t||r.classList.contains("header-sidebar-opened")||(console.log("object"),n.classList.remove("header-menu-level2-active"),a&&a.classList.remove("header-nav-open"),this.coverOff())},initializeMenuHandlers:function(){window.headerOutsideClickHandler&&document.removeEventListener("click",window.headerOutsideClickHandler);var e=e=>{var t=document.querySelector(".minicart-wrapper")||document.querySelector(".block-minicart");e.target.closest(".header-menu-level1")||e.target.closest(".header-menu-secondary-nav")||e.target.closest('[data-toggle="open-menu"]')||e.target.closest(".site-search")||t?.contains(e.target)||e.target.closest(".header-mini-cart-icon")||this.closeAllMenu?.()||this.trigger("closeAllMenu")},e=(window.headerOutsideClickHandler=e,document.addEventListener("click",e),document.querySelector(".header-main-wrapper"));e&&e.addEventListener("click",(function(e){var t=e.target;t.closest(".site-search")||t.closest(".header-menu-level1-item")||t.closest(".header-menu-secondary-nav")||t.closest(".header-mini-cart-container")||t.closest(".header-mini-cart-icon")||this.closeAllMenu()}).bind(this))},checkoutHeaderHandlers:function(){setTimeout(function(){var e=document.querySelector(".header-menu-level1"),t=document.querySelector(".header-menu-level1-item-account"),a=document.querySelector(".header-secondary-wrapper"),r=document.querySelector(".header-right");e.appendChild(t),a.appendChild(r)},10)},events:_.extend({},t.prototype.events,{"click .header-menu-level1-item":"toggleItem","keypress .header-menu-level1-item":"toggleItem"}),closeAllMenu:function(){var e=document.querySelector(".header-menu-level1"),t=document.querySelector(".header-menu-secondary-nav"),e=e?e.querySelector(".header-menu-level2-active"):null;e&&e.classList.remove("header-menu-level2-active"),t&&t.classList.contains("header-nav-open")&&(t.classList.remove("header-nav-open"),this.coverOff())},toggleItem:function(e){var t=e.currentTarget,a=document.querySelector(".header-menu-level1"),r=document.getElementsByClassName("main")[0],n=document.querySelector(".header-menu-secondary-nav"),i=t.innerText.trim().toLowerCase();"home"===i||"support"===i?((i=a.querySelector(".header-menu-level2-active"))&&i.classList.remove("header-menu-level2-active"),n.classList.contains("header-nav-open")&&n.classList.remove("header-nav-open"),this.coverOff()):t.classList.contains("header-menu-level2-active")&&!r.classList.contains("header-sidebar-opened")?(t.classList.remove("header-menu-level2-active"),n.classList.remove("header-nav-open"),this.coverOff()):t.classList.contains("header-menu-level2-active")&&r.classList.contains("header-sidebar-opened")?(t.classList.remove("header-menu-level2-active"),n.classList.remove("header-nav-open")):(a.querySelector(".header-menu-level2-active")&&a.querySelector(".header-menu-level2-active").classList.remove("header-menu-level2-active"),t.classList.add("header-menu-level2-active"),n.classList.add("header-nav-open"),this.coverOn())},coverOff:function(){var e=document.querySelector(".header-background-cover"),t=e.getAttribute("data-status"),a=document.body;"open"===t&&(e.classList.remove("active"),a.classList.remove("active"),e.setAttribute("data-status","closed"))},coverOn:function(){var e=document.querySelector(".header-background-cover"),t=e.getAttribute("data-status"),a=document.body;"closed"===t&&(e.classList.add("active"),a.classList.remove("active"),e.setAttribute("data-status","open"))}}),!1!==SC.CONFIGURATION.useStandardHeaderFooter||"checkout"===SC.ENVIRONMENT.SCTouchpoint&&SC.ENVIRONMENT.siteSettings.is_logged_in||e.getComponent("Layout").on("afterShowContent",function(e){var t=window.matchMedia("(max-width: 1000px)"),a=document.getElementsByClassName("header-right")[0],o=document.getElementsByClassName("header-secondary-wrapper")[0],r=(document.getElementById("header-search"),document.getElementsByClassName("site-search")[0]),s=(document.getElementsByClassName("header-menu-cart")[0],document.getElementsByClassName("header-content")[0],document.getElementsByClassName("main")[0]),n=document.getElementsByClassName("header-sidebar-toggle")[0],i=(document.getElementsByClassName("header-sidebar-toggle-icon::before")[0],document.getElementsByClassName("product-details-full-content-header")[0],document.getElementById("main-container"),document.querySelector(".header-background-cover")),c=(document.querySelector(".header-sidebar-toggle"),document.querySelector(".header-menu-level1")),d=(document.querySelectorAll(".header-menu-level1-item"),document.querySelector(".header-profile-welcome-link")),l=document.querySelector(".header-background-cover"),u=l.getAttribute("data-status");function m(e){var t=document.getElementById("header-search"),a=(document.querySelector(".header-logo-wrapper"),document.querySelector(".header-menu-level1")),r=document.getElementsByClassName("header-content")[0],n=document.getElementsByClassName("header-menu-cart")[0],i=document.getElementsByClassName("header-right")[0];e.matches?(r.prepend(n),window.matchMedia("(max-width: 1000px)").matches&&t.parentNode!==a&&a.before(t),o&&document.querySelector(".header-menu-level1").before(t),document.querySelectorAll(".header-menu-level2-anchor, .header-menu-level1-anchor:not(.has-menu-level2)").forEach(e
68=>{e.addEventListener("click",e=>{})})):(i.appendChild(n),document.querySelector(".header-logo-wrapper").after(t),g(),s.classList.contains("header-sidebar-opened")&&s.classList.remove("header-sidebar-opened"))}if(v=document.querySelector(".header-menu-level1"),h=document.querySelector(".header-menu-level1-item-account"),v.appendChild(h),o.appendChild(a),t.addListener(m),m(t),window.IntersectionObserver){var h={root:document.querySelector("#layout"),rootMargin:"-1px 0px 0px 0px",threshold:1};const b=document.querySelector("header");b.children;var v=_.throttle(([e])=>{e.intersectionRatio<1?b.classList.remove("small"):b.classList.add("small")},200);new IntersectionObserver(v,h).observe(b)}var p=document.querySelector(".header-mini-cart-wrapper");function y(){var e=r.getAttribute("data-status");document.body;"active"===e&&(r.style.background="gray",r.setAttribute("data-status","inactive"))}function g(){u=l.getAttribute("data-status");var e=document.body;"open"===u&&(l.classList.remove("active"),e.classList.remove("active"),l.setAttribute("data-status","closed"))}function S(){u=l.getAttribute("data-status");var e=document.body;"closed"===u&&(l.classList.add("active"),e.classList.remove("active"),l.setAttribute("data-status","open"))}function f(){var e=r.getAttribute("data-status");g(),document.querySelector(".header-sidebar-opened")?(n.setAttribute("data-action","header-sidebar-hide"),s.classList.remove("header-sidebar-opened"),g()):"active"===e&&(g(),y())}p.addEventListener("click",function(){p.classList.contains("open")?g():p.classList.contains("open")||S()}),n.addEventListener("click",function(){s.classList.contains("header-sidebar-opened")?(n.setAttribute("data-action","header-sidebar-hide"),g()):s.classList.contains("header-sidebar-opened")||(n.setAttribute("data-action","header-sidebar-show"),S())}),document.querySelectorAll(".header-menu-level2-anchor").forEach(e=>{e.addEventListener("click",e=>{g()})}),$(".tt-menu").on("click",".itemssearcher-item-results",function(){s.classList.remove("header-sidebar-opened"),g()}),document.querySelectorAll("[data-action='header-sidebar-hide']").forEach(e=>{e.addEventListener("click",e=>{g()})}),$(window).on("hashchange",f),Backbone.history.on("route",f),r.addEventListener("click",function(e){var t;r.getAttribute("data-status"),r.contains(e.target),this.classList.contains("site-search")&&(t=r.getAttribute("data-status"),document.body,"inactive"===t&&(r.style.background="white",r.setAttribute("data-status","active")),S())},!1),r.querySelector(".site-search-button-submit").addEventListener("click",function(){document.querySelector(".tt-input").focus()}),document.querySelector(".tt-input").addEventListener("keyup",e=>{var t=e.key||e.keyCode;"Enter"!==t&&"Return"!==t&&13!==t||(s.classList.remove("header-sidebar-opened"),g(),y())}),i.addEventListener("click",function(){var e=l.getAttribute("data-status"),t=r.getAttribute("data-status");document.body,"open"===e&&"active"===t?(g(),y()):"open"===e&&g()},!1),d&&d.addEventListener("click",function(){S(),document.querySelector(".header-menu-profile").classList.contains("open"),c.querySelector(".header-menu-level2-active")&&(c.querySelector(".header-menu-level2-active").classList.remove("header-menu-level2-active"),g())},!1)})}}}); 69} 70extensions['logitail.ImagecarouselPDP.1.0.0'] = function(){ 71function getExtensionAssetsPath(asset){ 72return 'extensions/logitail/ImagecarouselPDP/1.0.0/' + asset; 73}; 74define("logitail.ImagecarouselPDP.ImagecarouselPDP.View",["logitail_imagecarouselpdp_imagecarouselpdp.tpl","logitail.ImagecarouselPDP.ImagecarouselPDP.SS2Model","Backbone"],function(e,i,a){"use strict";return a.View.extend({template:e,initialize:function(e){},events:{},bindings:{},childViews:{},getContext:function(){return this.message=this.message||"Hello World!!",{message:this.message}}})}); 75define("logitail.ImagecarouselPDP.ImagecarouselPDP.Model",["Backbone","Utils"],function(e,s){"use strict";return e.Model.extend({urlRoot:s.getAbsoluteUrl(getExtensionAssetsPath("services/ImagecarouselPDP.Service.ss"))})}); 76define("logitail.ImagecarouselPDP.ImagecarouselPDP.SS2Model",["Backbone","Utils"],function(e,t){"use strict";return e.Model.extend({urlRoot:t.getAbsoluteUrl(getExtensionAssetsPath("Modules/ImagecarouselPDP/SuiteScript2/ImagecarouselPDP.Service.ss"),!0)})}); 77define("logitail.ImagecarouselPDP.ImagecarouselPDP",["logitail.ImagecarouselPDP.ImagecarouselPDP.View","ProductDetails.ImageGallery.View","ProductDetails.Full.View"],function(e,o,l){"use strict";return{mountToApp:function(e){e.getComponent("Layout").on("afterShowContent",function(){var o=null,l={responsive:!0,forceStart:!0,useCSS:!0,touchEnabled:!0,controls:!1,preloadImages:"all"};function e(){var e=jQuery(".bxslider");e.length&&(jQuery(window).width()<991?null==o?o=e.bxSlider(l):o.reloadSlider():o&&(o.destroySlider(),o=null))}setTimeout(function(){jQuery(".product-details-full").length&&e()},300),jQuery(window).off("resize.pdpCarousel").on("resize.pdpCarousel",function(){jQuery(".product-details-full").length&&e()})}),window.scrollToElement=function(e){var o=document.getElementById(e);o&&o.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}}}}); 78} 79extensions['SuiteCommerce.InfiniteScrollExtension.1.1.4'] = function(){ 80function getExtensionAssetsPath(asset){ 81return 'extensions/SuiteCommerce/InfiniteScrollExtension/1.1.4/' + asset; 82}; 83define("SuiteCommerce.InfiniteScroll.Configuration",["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=null,o=(Object.defineProperty(i,"environment",{set:function(e){t=e},enumerable:!0,configurable:!0}),i.get=function(e){return t?t.getConfig(e):(console.error("Please set the Environment Component in the Configuration."),null)},i);function i(){}n.Configuration=o}); 84define("SuiteCommerce.InfiniteScroll.Common.InstrumentationHelper",["require","exports","SuiteCommerce.InfiniteScroll.Instrumentation"],function(e,t,i){"use strict";
84Object.defineProperty(t,"__esModule",{value:!0});function a(){}a.initializeInstrumentation=function(e){setInterval(a.logPageLoads,6e4),i["default"].initialize({environment:e,queueNameSuffix:"-InfiniteScroll",defaultParameters:{componentArea:"SC Infinite Scroll",extensionVersion:"1.1.4"}})},a.addLoadTime=function(e){a.pageLoadTimes.push(e)},a.logPageLoads=function(){var e,t,n=a.pageLoadTimes.length;0!==n&&(e=Math.ceil(a.pageLoadTimes.reduce(function(e,t){return e+t})/n),a.pageLoadTimes=[],(t=i["default"].getLog("PageLoads")).setParameters({activity:"Page loads per minute",quantity:n,totalTime:e}),t.submit())},a.pageLoadTimes=[],t.InstrumentationHelper=a}); 85var __extends=this&&this.__extends||function(){var n=function(t,o){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,o){t.__proto__=o}:function(t,o){for(var e in o)o.hasOwnProperty(e)&&(t[e]=o[e])}))(t,o)};return function(t,o){function e(){this.constructor=t}n(t,o),t.prototype=null===o?Object.create(o):(e.prototype=o.prototype,new e)}}(),__assign=this&&this.__assign||function(){return(__assign=Object.assign||function(t){for(var o,e=1,n=arguments.length;e<n;e++)for(var r in o=arguments[e])Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r]);return t}).apply(this,arguments)};define("SuiteCommerce.InfiniteScroll.BottomControlView",["require","exports","SuiteCommerce.InfiniteScroll.ControlView","infinitescroll_button_bottom.tpl","SuiteCommerce.InfiniteScroll.Pagination","SuiteCommerce.InfiniteScroll.ControlConfiguration","jQuery","underscore","SuiteCommerce.InfiniteScroll.InfiniteScroll"],function(t,o,e,n,r,i,l,c,u){"use strict";Object.defineProperty(o,"__esModule",{value:!0});s=e["default"],__extends(a,s),a.prototype.hideIfAutoScroll=function(){i["default"].isAutoScrollEnabled()&&this.model.isActive&&(this.visible=!1,this.setAutoScroll())},a.prototype.getPageNumber=function(){return r["default"].getNextPageNumber()},a.prototype.hasMorePages=function(){return r["default"].hasMorePagesBelow},a.prototype.setAutoScroll=function(){var t=this,o=function(){t.isVisible()&&(l(document).off("scroll.InfiniteScrollAutoScroll"),t.loadPage().then(function(){r["default"].hasMorePagesBelow&&l(document).on("scroll.InfiniteScrollAutoScroll",c.throttle(o,500))}).fail(function(){r["default"].hasMorePagesBelow&&l(document).on("scroll.InfiniteScrollAutoScroll",c.throttle(o,500))}))};l(document).off("scroll.InfiniteScrollAutoScroll"),l(document).on("scroll.InfiniteScrollAutoScroll",c.throttle(o,500))},a.prototype.isVisible=function(){var t=l(window).height(),o=l(window).scrollTop(),e=l(".infinite-scroll-ctrl-bottom");return 0!=e.length&&e.offset().top<t+o},a.prototype.undoPageChange=function(){r["default"].restoreNextPage()},a.prototype.getContext=function(){return __assign(__assign({},s.prototype.getContext.call(this)),{visible:this.visible})};var s,f=a;function a(){var t=s.call(this,{label:i["default"].getBottomControlLabel()})||this;return t.template=n,t.visible=!0,t.hideIfAutoScroll(),u["default"].bottomControl=t}o["default"]=f}); 86define("SuiteCommerce.InfiniteScroll.ControlConfiguration",["require","exports","SuiteCommerce.InfiniteScroll.Configuration"],function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={getBottomControlLabel:function(){return n.Configuration.get("infiniteScroll.nextBtnText")},getTopControlLabel:function(){return n.Configuration.get("infiniteScroll.prevBtnText")},isAutoScrollEnabled:function(){return n.Configuration.get("infiniteScroll.enableAutoScroll")}}}); 87var __extends=this&&this.__extends||function(){var o=function(t,e){return(o=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])}))(t,e)};return function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}();define("SuiteCommerce.InfiniteScroll.ControlModel",["require","exports","Backbone"],function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});o=n.Model,__extends(i,o);var o,r=i;function i(t){var e=o.call(this,t)||this;return e.isLoading=!1,e.label=t.label,e.isActive=t.isActive,e}e["default"]=r}); 88var __extends=this&&this.__extends||function(){var o=function(e,t){return(o=Object.
88setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}))(e,t)};return function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();define("SuiteCommerce.InfiniteScroll.ControlView",["require","exports","Backbone","SuiteCommerce.InfiniteScroll.ControlModel","SuiteCommerce.InfiniteScroll.Pagination","SuiteCommerce.InfiniteScroll.ItemsHandler","SuiteCommerce.InfiniteScroll.InfiniteScroll","SuiteCommerce.InfiniteScroll.Common.InstrumentationHelper"],function(e,t,n,o,i,r,l,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});s=n.View,__extends(u,s),u.prototype.loadPage=function(){var e,t,n=this,o=this.getPageNumber();return l["default"].isEnabled?(e=(new Date).getTime(),this.showSpinner(),t=i["default"].getSearchApiUrl(),(t=r["default"].loadPage(t,o,this.loadBelow)).then(function(){n.hasMorePages()?n.showSpinner(!1):n.hideControl(),a.InstrumentationHelper.addLoadTime((new Date).getTime()-e)}).fail(function(){n.undoPageChange(),n.showSpinner(!1)}),t):i["default"].setCurrentPage(o)},u.prototype.showSpinner=function(e){this.model.isLoading=e=void 0===e?!0:e,this.render()},u.prototype.hideControl=function(){this.model.isActive=!1,this.render()},u.prototype.getContext=function(){return{label:this.model.label,showSpinner:this.model.isLoading,isActive:this.model.isActive}};var s,c=u;function u(e){var t=s.call(this,e)||this;return t.loadBelow=!0,t.events={'click [data-action="load-pages"]':"loadPage"},i["default"].reset(),t.model=new o["default"]({label:e.label,isActive:t.hasMorePages()}),t}t["default"]=c}); 89var __extends=this&&this.__extends||function(){var n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])}))(e,t)};return function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}}();define("SuiteCommerce.InfiniteScroll.TopControlView",["require","exports","SuiteCommerce.InfiniteScroll.ControlView","infinitescroll_button_top.tpl","SuiteCommerce.InfiniteScroll.Pagination","SuiteCommerce.InfiniteScroll.ControlConfiguration"],function(e,t,o,n,r,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});u=o["default"],__extends(l,u),l.prototype.getPageNumber=function(){return r["default"].getPreviousPageNumber()},l.prototype.hasMorePages=function(){return r["default"].hasMorePagesAbove},l.prototype.undoPageChange=function(){r["default"].restorePreviousPage()};var u,a=l;function l(){var e=u.call(this,{label:i["default"].getTopControlLabel()})||this;return e.loadBelow=!1,e.template=n,e}t["default"]=a}); 90var __extends=this&&this.__extends||function(){var n=function(t,o){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,o){t.__proto__=o}:function(t,o){for(var e in o)o.hasOwnProperty(e)&&(t[e]=o[e])}))(t,o)};return function(t,o){function e(){this.constructor=t}n(t,o),t.prototype=null===o?Object.create(o):(e.prototype=o.prototype,new e)}}();define("SuiteCommerce.InfiniteScroll.GoToTop.View",["require","exports","Backbone","infinite_scroll_gototop.tpl","jQuery","underscore"],function(t,o,e,n,i,r){"use strict";Object.defineProperty(o,"__esModule",{value:!0});c=e.View,__extends(s,c),s.prototype.scrollToTop=function(){i("html, body").animate({scrollTop:0},700),this.updateVisibility()},s.prototype.updateVisibility=function(){1500<i(document).scrollTop()?i(".infinite-scroll-top").fadeIn("slow"):i(".infinite-scroll-top").fadeOut("slow")};var c,l=s;function s(){var t=c.call(this)||this;return t.template=n,t.events={'click [data-action="scroll-to-top"]':"scrollToTop"},i(document).on("scroll.infiniteScroll",r.debounce(t.updateVisibility,500)),i(function(){i(".infinite-scroll-top").css("display","none")}),t}o.GoToTopView=l}); 91define("SuiteCommerce.InfiniteScroll.InfiniteScroll",["require","exports","SuiteCommerce.InfiniteScroll.BottomControlView","SuiteCommerce.InfiniteScroll.URLHelper","jQuery","underscore","SuiteCommerce.InfiniteScroll.TopControlVie
91w","SuiteCommerce.InfiniteScroll.GoToTop.View","SuiteCommerce.InfiniteScroll.Pagination"],function(o,t,e,l,a,i,n,r,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={bottomControl:null,isEnabled:!0,replacePagination:function(o){this.removePagination(o),this.manageControls(o),this.addGoToTopButton(o)},removePagination:function(o){o.removeChildView(o.PLP_VIEW,"GlobalViews.Pagination","GlobalViews.Pagination")},manageControls:function(o){this.addBottomControl(o),this.addTopControl(o)},addBottomControl:function(o){o.addChildViews(o.PLP_VIEW,{"GlobalViews.Pagination":{"InfiniteScroll.BottomControl":{childViewIndex:1,childViewConstructor:e["default"]}}})},addTopControl:function(o){o.addChildViews(o.PLP_VIEW,{"Facets.FacetsDisplay":{"InfiniteScroll.TopControl":{childViewIndex:3,childViewConstructor:n["default"]}}})},updatePageURLOnScrollEvent:function(){a(document).off("scroll.InfiniteScroll"),a(document).on("scroll.InfiniteScroll",i.throttle(this.updatePageURL,500,{leading:!1}))},updatePageURL:function(){var e=a(document).scrollTop(),o=d["default"].getFirstItemPerPage(),t=Object.keys(o),i=t.map(function(o){var t=a('[data-view="Facets.Items"] [data-item-id="'+o+'"]');return 1===t.length?t.offset().top-e:Infinity}),n=i.filter(function(o){return o<=0}),n=n.length?Math.max.apply(Math,n):Math.min.apply(Math,i),n=o[t[i.indexOf(n)]];d["default"].validPage(n)&&l["default"].updateURL(n)},addGoToTopButton:function(o){o.addChildViews(o.PLP_VIEW,{"GlobalViews.Pagination":{"InfiniteScroll.GoToTop":{childViewIndex:6,childViewConstructor:r.GoToTopView}}})},disable:function(o){this.isEnabled=!1,this.bottomControl.visible=!0,this.bottomControl.render(),a(document).off("scroll.InfiniteScrollAutoScroll")},enable:function(o){this.isEnabled=!0,this.bottomControl.hideIfAutoScroll(),this.bottomControl.render()}}}); 92var __spreadArrays=this&&this.__spreadArrays||function(){for(var e=0,t=0,i=arguments.length;t<i;t++)e+=arguments[t].length;for(var n=Array(e),c=0,t=0;t<i;t++)for(var r=arguments[t],l=0,o=r.length;l<o;l++,c++)n[c]=r[l];return n};define("SuiteCommerce.InfiniteScroll.ItemsHandler",["require","exports","SuiteCommerce.InfiniteScroll.Pagination","SuiteCommerce.InfiniteScroll.InfiniteScroll"],function(e,t,r,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={initialize:function(e){var t;return!(!(t=e.current_view?e.current_view.getChildViewInstance("Facets.Items"):t)||!t.collection.fetch&&!t.collection[0]||t.collection.fetch&&!t.collection.models[0]||(t.collection.fetch||(t.collection=t.collection[0].collection),this.collection=t.collection,this.facetsItems=t,r["default"].addFirstItemOfPage(""+this.collection.models[0].get("internalid"),r["default"].currentPage),0))},loadPage:function(e,t,i){var n=this;if(!e)return jQuery.Deferred().reject();this.collection.url=function(){return e};var c=__spreadArrays(this.collection.models);return this.collection.fetch().then(function(){r["default"].addFirstItemOfPage(""+n.collection.models[0].get("internalid"),t),i?n.facetsItems.collection.add(c,{at:0}):n.facetsItems.collection.add(c),n.renderContent(t,i)})},renderContent:function(e,t){var i,n=jQuery(".facets-facet-browse-items");n.css("min-height",n.height()),t?this.facetsItems.render():(i=this.facetsItems.$el.append,this.facetsItems.$el.append=this.facetsItems.$el.prepend,this.facetsItems.render(),c["default"].updatePageURL(),this.facetsItems.$el.append=i),n.css("min-height","")}}}); 93define("SuiteCommerce.InfiniteScroll.URLHelper",["require","exports","underscore","Backbone"],function(e,t,a,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={updateURL:function(e){var t=n.history.getFragment(),t=this.generateNewFragment(t,"page",e);this.setNewURL(t)},generateNewFragment:function(e,t,n){return-1<e.indexOf("?")?-1<e.indexOf(t+"=")?this.parseFragment(e,t,n):e+"&"+t+"="+n:e+"?"+t+"="+n},parseFragment:function(e,t,n){var r,i=e.split("?");if(i&&i[0]&&i[1]&&-1<i[1].indexOf(t+"="))return r=a.map(i[1].split("&"),function(e){return-1<e.indexOf(t)?t+"="+n:e}),i[0]+"?"+r.join("&");return e},setNewURL:function(e){0!==e.length&&n.history.navigate(e,{trigger:!1,replace:!0})}}}); 94var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(t){for(var e,r=1,i=arguments.length;r<i;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)};define("SuiteCommerce.InfiniteScroll.Instrumentation.Log",["require","exports","SuiteCommerce.InfiniteScroll.Instrumentation.Logger"],function(t,e,r){"use strict";
94Object.defineProperty(e,"__esModule",{value:!0}),(i=o=e.LogSeverity||(e.LogSeverity={})).INFO="info",i.ERROR="error",s.prototype.setInitialAttributes=function(t){var e={label:null,timer:{},severity:o.INFO},e=__assign(__assign({},e),t),r=e.label,i=e.parametersToSubmit,n=e.timer,e=e.severity;this.label=r,this.parametersToSubmit=i,this.timer=n,this.severity=e},s.prototype.startTimer=function(){this.timer.startTime=this.getTimestamp()},s.prototype.endTimer=function(){this.timer.endTime=this.getTimestamp()},s.prototype.getTimestamp=function(){return!this.isOldInternetExplorer()&&performance.now()||Date.now()},s.prototype.getElapsedTimeForTimer=function(){var t=this.timer;return t.startTime&&t.endTime?t.startTime>t.endTime?(console.warn("Start time should be minor that end time in timer"),null):t.endTime-t.startTime:(t.startTime||console.warn("The Start time is not defined"),t.endTime||console.warn("The End time is not defined"),null)},s.prototype.setParameters=function(e){var r=this;Object.keys(e).forEach(function(t){r.setParameter(t,e[t])})},s.prototype.setParameter=function(t,e){var r=this.parametersToSubmit;r[t]=e,this.parametersToSubmit=r},s.prototype.submit=function(){this.isOldInternetExplorer()||(this.severity===o.ERROR?this.submitAsError():(o.INFO,this.submitAsInfo()))},s.prototype.isOldInternetExplorer=function(){return!!navigator.userAgent.match(/Trident/g)||!!navigator.userAgent.match(/MSIE/g)},s.prototype.submitAsError=function(){r.Logger.getLogger().error(this.parametersToSubmit)},s.prototype.submitAsInfo=function(){r.Logger.getLogger().info(this.parametersToSubmit)};var o,i,n=s;function s(t){this.setInitialAttributes(t=void 0===t?{label:""}:t)}e.Log=n}); 95define("SuiteCommerce.InfiniteScroll.Instrumentation.Logger",["require","exports","SuiteCommerce.InfiniteScroll.Instrumentation.MockAppender"],function(s,e,c){"use strict";function u(){}Object.defineProperty(e,"__esModule",{value:!0}),u.getLogger=function(){return this.instance=this.instance||this.buildLoggerInstance(),this.instance},u.buildLoggerInstance=function(){var e;try{var n=s("Loggers").Loggers,r=s("Loggers.Appender.ElasticLogger").LoggersAppenderElasticLogger.getInstance(),t=c.MockAppender.getInstance(),o=s("Loggers.Configuration"),i="CommerceExtensions"+u.options.queueNameSuffix;return n.setConfiguration(((e={})[i]={log:[{profile:o.prod,appenders:[r]},{profile:o.dev,appenders:[t]}],actions:{},loggers:{}},e)),n.getLogger(i)}catch(g){return{info:function(e){},error:function(e){}}}},e.Logger=u}); 96define("SuiteCommerce.InfiniteScroll.Instrumentation.MockAppender",["require","exports"],function(e,n){"use strict";function o(){}Object.defineProperty(n,"__esModule",{value:!0}),o.prototype.info=function(e){console.info("MockAppender - Info",e)},o.prototype.error=function(e){console.error("MockAppender - Error",e)},o.prototype.ready=function(){return!0},o.getInstance=function(){return o.instance=o.instance?o.instance:new o},o.prototype.start=function(e,n){return n},o.prototype.end=function(e,n){},n.MockAppender=o}); 97define("SuiteCommerce.InfiniteScroll.Instrumentation",["require","exports","underscore","SuiteCommerce.InfiniteScroll.Instrumentation.Logger","SuiteCommerce.InfiniteScroll.Instrumentation.Log"],function(e,t,o,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=[];t["default"]={initialize:function(e){r.Logger.options=e},getLog:function(e){return this.getLogModelByLabel(e)||this.registerNewLog(e)},getLogModelByLabel:function(e){return o(i).findWhere({label:e})},registerNewLog:function(e){var t=o.clone(r.Logger.options.defaultParameters),t=new n.Log({label:e,parametersToSubmit:t});return i.push(t),t},setParameterForAllLogs:function(t,o){i.forEach(function(e){e.setParameter(t,o)})},setParametersForAllLogs:function(t){i.forEach(function(e){e.setParameters(t)})},submitLogs:function(){i.forEach(function(e){e.submit()})}}}); 98define("SuiteCommerce.InfiniteScroll.Pagination",["require","exports","SuiteCommerce.InfiniteScroll.URLHelper"],function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={initialize:function(e){this.PLP=e,this.pagination=this.PLP.getPagination(),this.lowestLoadedPage=this.highestLoadedPage=this.currentPage,this.firstItemPerPage={}},getPreviousPageNumber:function(){return this.hasMorePagesAbove&&this.lowestLoadedPage--,this.lastPage=this.currentPage,this.currentPage=this.lowestLoadedPage,this.currentPage},getNextPageNumber:function(){return this.hasMorePagesBelow&&this.highestLoadedPage++,this.lastPage=this.currentPage,this.currentPage=this.highestLoadedPage,this.currentPage},getSearchApiUrl:function(){var e=this.PLP.getUrl(this.pagination);return e=-1==e.lastIndexOf("commercecategoryid")&&-1==e.lastIndexOf("commercecategoryurl")?this.appendCategoryToURL(e):e},appendCategoryToURL:function(e){var t=this.PLP.getCategoryInfo();return e=t&&t.internalid?(e=a["default"].generateNewFragment(e,"commercecategoryid",t.internalid)).replace("sort=relevance","sort=commercecategory"):e},reset:function(){this.pagination=this.PLP.getPagination(),this.lowestLoadedPage=this.highestLoadedPage=this.currentPage},restoreNextPage:function(){this.highestLoadedPage--,this.currentPage=this.lastPage},restorePreviousPage:function(){this.lowestLoadedPage++,this.currentPage=this.lastPage},setCurrentPage:function(e){return this.PLP.setCurrentPage({currentPage:e})},get currentPage(){return this.pagination?this.pagination.currentPage:null},set currentPage(e){this.pagination.currentPage=e},get hasMorePagesBelow(){return this.highestLoadedPage<this.pagination.pageCount},get hasMorePagesAbove(){return 1<this.lowestLoadedPage&&this.validPage(this.currentPage)},getFirstItemPerPage:function(){return this.firstItemPerPage},addFirstItemOfPage:function(e,t){this.firstItemPerPage[e]=t},validPage:function(e){return 0<e&&e<=this.pagination.pageCount}}}); 99define("SuiteCommerce.InfiniteScroll.Shopping",["require","exports","SuiteCommerce.InfiniteScroll.InfiniteScroll","SuiteCommerce.InfiniteScroll.Pagination","SuiteCommerce.InfiniteScroll.ItemsHandler","SuiteCommerce.InfiniteScroll.Configuration","SuiteCommerce.InfiniteScroll.Common.InstrumentationHelper","jQuery"],function(n,e,t,i,o,l,r,f){"use strict";return{mountToApp:function(n){var e=n.getComponent("Environment"),t=n.getComponent("PLP");n.getComponent("PDP").on("afterShowContent",function(){f(document).off("scroll.InfiniteScroll")}),r.InstrumentationHelper.initializeInstrumentation(e),l.Configuration.environment=e,this.initializeInfiniteScroll(t)},initializeInfiniteScroll:function(n){n.on("beforeShowContent",function(){i["default"].initialize(n),t["default"].replacePagination(n)}),n.on("afterShowContent",function(){t["default"].enable(n),o["default"].initialize(n)?t["default"].updatePageURLOnScrollEvent():t["default"].disable(n)})}}}); 100} 101extensions['SuiteCommerce.MapContactInfo.1.1.5'] = function(){ 102function getExtensionAssetsPath(asset){ 103return 'extensions/SuiteCommerce/MapContactInfo/1.1.5/' + asset; 104}; 105define("SuiteCommerce.MapAndContactUs.Common.DependencyProvider",["require","exports","underscore","Utils"],function(e,n,t,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.UtilsModule=function(e){if(function(e){var n=Object.keys(e);return!t.isFunction(e)&&1===n.length}(e))return e[Object.keys(e)[0]];return e}(r)}); 106define("SuiteCommerce.MapAndContactUs.Common.Instrumentation.Helper",["require","exports","SuiteCommerce.MapAndContactUs.Instrumentation"],function(e,t,n){"use strict";
106Object.defineProperty(t,"__esModule",{value:!0});function i(){}i.initializeInstrumentation=function(e){n["default"].initialize({environment:e.getComponent("Environment"),queueNameSuffix:"-MapAndContact",defaultParameters:{componentArea:"SC Map and Contact",extensionVersion:"1.1.5"}})},i.log=function(e){var t=n["default"].getLog(e.activity.replace(" ",""));t.setParameters(e),t.submit()},t.InstrumentationHelper=i}); 107define("SuiteCommerce.MapAndContactUs.Utils",["require","exports","SuiteCommerce.MapAndContactUs.Common.DependencyProvider"],function(e,t,n){"use strict";function o(){}Object.defineProperty(t,"__esModule",{value:!0}),o.getAbsoluteUrl=function(e,t){return n.UtilsModule.getAbsoluteUrl(e,t)},t.Utils=o}); 108define("SuiteCommerce.ContactUsForm.CCTSettingsHelper",["require","exports","underscore"],function(c,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var d=5,_={1:"primary",2:"secondary",3:"tertiary"},r={1:{fieldType:"none",validationPattern:!1},2:{fieldType:"text",validationPattern:!1},3:{fieldType:"number",validationPattern:"number"},4:{fieldType:"email",validationPattern:"email"},5:{fieldType:"url",validationPattern:"url"},6:{fieldType:"textarea",validationPattern:!1},7:{fieldType:"date",validationPattern:!1},8:{fieldType:"checkbox",validationPattern:!1}};function t(c){for(var e=1;e<=d;e++){var _=c["custrecord_sc_cct_cuf_add_f_id_"+e],t=+c["custrecord_sc_cct_cuf_add_f_type_"+e],s=r[t].fieldType,t=r[t].validationPattern,_={internalId:_,label:c["custrecord_sc_cct_cuf_add_f_label_"+e],placeholder:c["custrecord_sc_cct_cuf_add_f_placeh_"+e],hasHelpText:""!==c["custrecord_sc_cct_cuf_add_f_help_text_"+e],helpText:c["custrecord_sc_cct_cuf_add_f_help_text_"+e],isMandatory:"T"===c["custrecord_sc_cct_cuf_mtry_add_field_"+e],hideField:"T"===c["custrecord_sc_cct_cuf_hide_add_field_"+e],fieldId:_,fieldType:s,fieldValidationPattern:t};"email"===_.fieldType&&(_.invalidEmailMessage=c.custrecord_sc_cct_cuf_invalid_email_msg),this.inputFields.push(_)}}function s(c){var _,t,r=this,e=(_=c,t=[],i.each(["custrecord_sc_cct_cuf_field_position_1","custrecord_sc_cct_cuf_field_position_2","custrecord_sc_cct_cuf_field_position_3","custrecord_sc_cct_cuf_field_position_4","custrecord_sc_cct_cuf_field_position_5","custrecord_sc_cct_cuf_field_position_6","custrecord_sc_cct_cuf_field_position_7","custrecord_sc_cct_cuf_field_position_8","custrecord_sc_cct_cuf_field_position_9","custrecord_sc_cct_cuf_field_position_10","custrecord_sc_cct_cuf_field_position_11","custrecord_sc_cct_cuf_field_position_12"],function(c){var e="1"!==(e=_[c])&&parseInt(_[c],10)-2;t.push(e)}),t),l=i.clone(this.inputFields);i.each(e,function(c,e){var _,t,s,d;c&&(_=l[+c],t=_.fieldId,s=_.label,d=i.findIndex(r.inputFields,function(c){return c.fieldId?t===c.fieldId:!!c.label&&s===c.label}),r.inputFields.splice(d,1),r.inputFields.splice(e,0,_))})}e.getCCTSettingsMapping=function(c){var e={formInformation:c.custrecord_sc_cct_cuf_form_information,requiredFieldMessage:c.custrecord_sc_cct_cuf_required_field_msg,feedbackMessages:{success:c.custrecord_sc_cct_cuf_success_msg,error:c.custrecord_sc_cct_cuf_submit_error_msg},submitButtonStyling:{label:c.custrecord_sc_cct_cuf_button_text,helpText:c.custrecord_sc_cct_cuf_button_help_text,style:_[c.custrecord_sc_cct_cuf_button_style]},hideBackgroundColor:"T"===c.custrecord_sc_cct_cuf_hide_bg_color,mandatoryFieldReference:c.custrecord_sc_cct_cuf_mtry_field_ref,inputFields:[{label:c.custrecord_sc_cct_cuf_name_label,placeholder:c.custrecord_sc_cct_cuf_name_placeh,hasHelpText:""!==c.custrecord_sc_cct_cuf_name_help_text,helpText:c.custrecord_sc_cct_cuf_name_help_text,isMandatory:"T"===c.custrecord_sc_cct_cuf_mtry_name_field,hideField:"T"===c.custrecord_sc_cct_cuf_hide_name_field,fieldId:"firstname",fieldType:"text"},{label:c.custrecord_sc_cct_cuf_lastname_label,placeholder:c.custrecord_sc_cct_cuf_lastname_placeh,hasHelpText:""!==c.custrecord_sc_cct_cuf_lastname_help_text,helpText:c.custrecord_sc_cct_cuf_lastname_help_text,isMandatory:"T"===c.custrecord_sc_cct_cuf_mtry_lastname,hideField:"T"===c.custrecord_sc_cct_cuf_hide_lastname,fieldId:"lastname",fieldType:"text"},{label:c.custrecord_sc_cct_cuf_email_label,placeholder:c.custrecord_sc_cct_cuf_email_placeh,hasHelpText:""!==c.custrecord_sc_cct_cuf_email_help_text,helpText:c.custrecord_sc_cct_cuf_email_help_text,isMandatory:"T"===c.custrecord_sc_cct_cuf_mtry_email,hideField:"T"===c.custrecord_sc_cct_cuf_hide_email_field,fieldId:"email",fieldType:"email",fieldValidationPattern:"email",invalidEmailMessage:c.
108custrecord_sc_cct_cuf_invalid_email_msg},{label:c.custrecord_sc_cct_cuf_phone_label,placeholder:c.custrecord_sc_cct_cuf_phone_placeh,hasHelpText:""!==c.custrecord_sc_cct_cuf_phone_help_text,helpText:c.custrecord_sc_cct_cuf_phone_help_text,isMandatory:"T"===c.custrecord_sc_cct_cuf_mtry_phone_field,hideField:"T"===c.custrecord_sc_cct_cuf_hide_phone_field,fieldId:"phone",fieldType:"text",fieldValidationPattern:"number"},{label:c.custrecord_sc_cct_cuf_company_label,placeholder:c.custrecord_sc_cct_cuf_company_placeh,hasHelpText:""!==c.custrecord_sc_cct_cuf_company_help_text,helpText:c.custrecord_sc_cct_cuf_company_help_text,isMandatory:"T"===c.custrecord_sc_cct_cuf_mtry_company_field,hideField:"T"===c.custrecord_sc_cct_cuf_hide_company_field,fieldId:"company",fieldType:"text"},{label:c.custrecord_sc_cct_cuf_subject_label,placeholder:c.custrecord_sc_cct_cuf_subject_placeh,hasHelpText:""!==c.custrecord_sc_cct_cuf_subject_help_text,helpText:c.custrecord_sc_cct_cuf_subject_help_text,isMandatory:"T"===c.custrecord_sc_cct_cuf_mtry_subject_field,hideField:"T"===c.custrecord_sc_cct_cuf_hide_subject_field,fieldId:"subject",fieldType:"text"},{label:c.custrecord_sc_cct_cuf_message_label,placeholder:c.custrecord_sc_cct_cuf_message_placeh,hasHelpText:""!==c.custrecord_sc_cct_cuf_message_help_text,helpText:c.custrecord_sc_cct_cuf_message_help_text,isMandatory:"T"===c.custrecord_sc_cct_cuf_mtry_message_field,hideField:"T"===c.custrecord_sc_cct_cuf_hide_message_field,fieldId:"message",fieldType:"textarea"}]};return i.bind(t,e,c)(),i.bind(s,e,c)(),e.inputFields=i.filter(e.inputFields,function(c){return!c.hideField}),e}}); 109var __extends=this&&this.__extends||function(){var n=function(t,e){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])}))(t,e)};return function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}();define("SuiteCommerce.ContactUsForm.InputField.Collection",["require","exports","SuiteCommerce.ContactUsForm.InputField.Model","Backbone"],function(t,e,o,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});r=n.Collection,__extends(c,r);var r,i=c;function c(){var t=null!==r&&r.apply(this,arguments)||this;return t.model=o.InputFieldModel,t}e.InputFieldCollection=i}); 110var __extends=this&&this.__extends||function(){var n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}))(e,t)};return function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}();define("SuiteCommerce.ContactUsForm.InputField.Model",["require","exports","Backbone"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n=r.Model,__extends(i,n),Object.defineProperty(i.prototype,"isMandatory",{get:function(){return this.get("isMandatory")},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isTextArea",{get:function(){return"textarea"===this.get("fieldType")},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isCheckbox",{get:function(){return"checkbox"===this.get("fieldType")},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isDate",{get:function(){return"date"===this.get("fieldType")},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isSubtitle",{get:function(){return"none"===this.get("fieldType")},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"label",{get:function(){return this.get("label")},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"placeholder",{get:function(){return this.get("placeholder")},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hasHelpText",{get:function(){return!!this.get("hasHelpText")},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"helpText",{get:function(){return this.get("helpText")},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"fieldId",{get:function(){return this.get("fieldId")},enumerable:!0,configurable:!0});var n,o=i;function i(){return null!==n&&n.apply(this,arguments)||this}t.InputFieldModel=o}); 111var __extends=this&&this.__extends||function(){var o=function(t,e){return(o=Object.
111setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])}))(t,e)};return function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}();define("SuiteCommerce.ContactUsForm.InputField.View",["require","exports","Backbone","contact_us_form_input_field.tpl"],function(t,e,n,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});i=n.View,__extends(s,i),s.prototype.getContext=function(){var t=this.model;return{label:t.label,placeholder:t.placeholder,hasHelpText:t.hasHelpText,helpText:t.helpText,fieldId:t.fieldId,isTextArea:t.isTextArea,isCheckbox:t.isCheckbox,isDate:t.isDate,isMandatory:t.isMandatory,isSubtitle:t.isSubtitle,cmsContentId:this.cmsContentId}};var i,r=s;function s(t){var e=i.call(this,t)||this;return e.template=o,e.cmsContentId=t.cmsContentId,e}e.InputFieldView=r}); 112var __extends=this&&this.__extends||function(){var o=function(t,e){return(o=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])}))(t,e)};return function(t,e){function i(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}}();define("SuiteCommerce.ContactUsForm.Model",["require","exports","Backbone","SuiteCommerce.MapAndContactUs.Utils","underscore"],function(t,e,i,o,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});r=i.Model,__extends(s,r),s.prototype.setFieldsValidation=function(t,e){var i=this;n.each(t,function(t){!t.hideField&&t.fieldId&&i.setFieldValidation(t,e)})},s.prototype.setFieldValidation=function(t,e){var i,o=[{required:t.isMandatory,msg:e.replace("[[field]]",t.label)}];t.fieldValidationPattern&&(i={pattern:t.fieldValidationPattern},t.invalidEmailMessage&&(i.msg=t.invalidEmailMessage),o.push(i)),this.validation[t.fieldId]=o};var r,a=s;function s(){var t=null!==r&&r.apply(this,arguments)||this;return t.urlRoot=o.Utils.getAbsoluteUrl(getExtensionAssetsPath("services/ContactUsForm.Service.ss")),t.validation={},t}e.ContactUsFormModel=a}); 113var __extends=this&&this.__extends||function(){var n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};return function(e,t){function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}}();define("SuiteCommerce.ContactUsForm.View",["require","exports","CustomContentType.Base.View","Backbone.FormView","Backbone.CollectionView","SuiteCommerce.ContactUsForm.InputField.Collection","SuiteCommerce.ContactUsForm.CCTSettingsHelper","SuiteCommerce.ContactUsForm.InputField.View","underscore","contact_us_form.tpl","SuiteCommerce.ContactUsForm.InputField.Model","SuiteCommerce.MapAndContactUs.Common.Instrumentation.Helper","SuiteCommerce.MapAndContactUs.Instrumentation","SuiteCommerce.MapAndContactUs.ExtMessage.View","SuiteCommerce.MapAndContactUs.ExtMessage.Model"],function(e,t,i,n,o,s,r,c,a,d,l,u,p,m,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0});__extends(F,f=i),F.prototype.install=function(e,t){return f.prototype.install.call(this,e,t),this.log(e),jQuery.Deferred().resolve()},F.prototype.log=function(e){u.InstrumentationHelper.log({activity:"Contact Us Form loaded"}),this.logAdditionalFields(e)},F.prototype.logAdditionalFields=function(e){for(var t=0,i=1;i<=5;i++)e["custrecord_sc_cct_cuf_add_f_id_"+i]&&"F"===e["custrecord_sc_cct_cuf_hide_add_field_"+i]&&t++;u.InstrumentationHelper.log({activity:"Additional Fields",instanceCount:t})},Object.defineProperty(F.prototype,"childViews",{get:function(){var i=this;return{"InputFields.Collection":function(){var e,t;if(i.cctSettingsMapping)return t=[],a.each(i.cctSettingsMapping.inputFields,function(e){t.push(new l.InputFieldModel(e))}),e=new o({childView:c.InputFieldView,collection:new s.InputFieldCollection(t),childViewOptions:{cmsContentId:i.model.get("cmsContentId")}}),i.setFieldsBindings(i.cctSettingsMapping.inputFields),i.model.setFieldsValidation(i.cctSettingsMapping.inputFields,i.cctSettingsMapping.requiredFieldMessage),e},"Feedback.Messages":function(){if(i.feedbackMessage)return new m.ExtMessageView({model:new g.ExtMessageModel({message:i.feedbackMessage.message,type:i.feedbackMessage.type,closable:!1})})}}},enumerable:!0,configurable:!0}),F.prototype.setFieldsBindings=function(e){var i=this;a.each(e,function(e){var t;e.fieldId&&(t='.contact-us-form form [name="'+e.fieldId+'"]',i.bindings[t]=e.fieldId)}),n.formatBindings(this)},F.prototype.submitForm=function(e){var t=this,i=(e.preventDefault(),this.saveForm(e)),n=p["default"].getL
113og("SubmittedForm");n.startTimer(),i&&i.fail(function(){t.logSubmission(n,"Error"),t.feedbackMessage={message:t.cctSettingsMapping.feedbackMessages.error,type:"error"},t.render()}).done(function(){t.logSubmission(n,"Success"),t.clearFiledsValues(),t.feedbackMessage={message:t.cctSettingsMapping.feedbackMessages.success,type:"success"},t.render()})},F.prototype.logSubmission=function(e,t){e.endTimer(),e.setParameters({activity:"Contact Form submitted",subType:t,totalTime:e.getElapsedTimeForTimer()}),e.submit()},F.prototype.clearFiledsValues=function(){var t=this;a.each(this.validationModel.keys(),function(e){"cmsContentId"!==e&&"defaultSubsidiary"!==e&&"domain"!==e&&t.validationModel.unset(e)})},F.prototype.getContext=function(){var e;if(!a.isEmpty(this.settings))return e=this.instanceId.split("-")[1],this.cctSettingsMapping=r.getCCTSettingsMapping(this.settings),this.model.set("cmsContentId",e),e=a.find(this.cctSettingsMapping.inputFields,function(e){return e.isMandatory}),{formInformation:this.cctSettingsMapping.formInformation,submitButtonStyling:this.cctSettingsMapping.submitButtonStyling,hideFormBackgroun
113dColor:this.cctSettingsMapping.hideBackgroundColor,mandatoryFieldReference:this.cctSettingsMapping.mandatoryFieldReference,hasMandatoryFields:!!e}};var f,C=F;function F(e){var t=f.call(this,e)||this;return t.template=d,t.bindings={},t.events={"submit form":"submitForm"},n.add(t),t}t.ContactUsFormView=C}); 114define("SuiteCommerce.ContactUsFormCCT",["require","exports","SuiteCommerce.ContactUsForm.Model","SuiteCommerce.ContactUsForm.View","underscore"],function(t,e,i,o,n){"use strict";return{mountToApp:function(t){var e=t.getComponent("Environment"),n=new i.ContactUsFormModel;n.set("defaultSubsidiary",this.getDefaultSubsidiary(e)),n.set("domain",this.getSCDomain(e)),t.getComponent("CMS").registerCustomContentType({id:"cct_sc_contactusform",view:o.ContactUsFormView,options:{container:t,model:n}})},getDefaultSubsidiary:function(t){var e=t.getSiteSetting().subsidiaries;return n.find(e,function(t){return"T"===t.isdefault}).internalid},getSCDomain:function(t){var e=t.getConfig().siteSettings.touchpoints.home.match(/:\/\/((?:www[0-9]?\.)?.[^/:]+)/i);return null!==e&&2===e.length&&"string"==typeof e[1]&&0<e[1].length?e[1]:null}}}); 115var __extends=this&&this.__extends||function(){var r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}))(e,t)};return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();define("SuiteCommerce.MapAndContactUs.ExtMessage.Model",["require","exports","Backbone"],function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});r=n.Model,__extends(i,r),Object.defineProperty(i.prototype,"message",{get:function(){return this.get("message")},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"type",{get:function(){return this.get("type")},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"closable",{get:function(){return this.get("closable")},enumerable:!0,configurable:!0});var r,o=i;function i(e){return r.call(this,e)||this}t.ExtMessageModel=o}); 116var __extends=this&&this.__extends||function(){var o=function(e,t){return(o=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])}))(e,t)};return function(e,t){function s(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)}}();define("SuiteCommerce.MapAndContactUs.ExtMessage.View",["require","exports","Backbone","sc_ext_message.tpl"],function(e,t,s,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n=s.View,__extends(i,n),i.prototype.closeMessage=function(){this.remove()},i.prototype.getContext=function(){return{showMessage:0<this.model.message.length,message:this.model.message,isClosable:this.model.closable,type:this.model.type||""}};var n,r=i;function i(e){var t=n.call(this,e)||this;return t.template=o,t.events={'click [data-action="ext-message-close-message"]':"closeMessage"},t}t.ExtMessageView=r}); 117var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(t){for(var e,r=1,i=arguments.length;r<i;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)};define("SuiteCommerce.MapAndContactUs.Instrumentation.Log",["require","exports","SuiteCommerce.MapAndContactUs.Instrumentation.Logger"],function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(i=o=e.LogSeverity||(e.LogSeverity={})).INFO="info",i.ERROR="error",s.prototype.setInitialAttributes=function(t){var e={label:null,timer:{},severity:o.INFO},e=__assign(__assign({},e),t),r=e.label,i=e.parametersToSubmit,n=e.timer,e=e.severity;this.label=r,this.parametersToSubmit=i,this.timer=n,this.severity=e},s.prototype.startTimer=function(){this.timer.startTime=this.getTimestamp()},s.prototype.endTimer=function(){this.timer.endTime=this.getTimestamp()},s.prototype.getTimestamp=function(){return!this.isOldInternetExplorer()&&performance.now()||Date.now()},s.prototype.getElapsedTimeForTimer=function(){var t=this.timer;return t.startTime&&t.endTime?t.startTime>t.endTime?(console.warn("Start time should be minor that end time in timer"),null):t.endTime-t.startTime:(t.startTime||console.warn("The Start time is not defined"),t.endTime||c
117onsole.warn("The End time is not defined"),null)},s.prototype.setParameters=function(e){var r=this;Object.keys(e).forEach(function(t){r.setParameter(t,e[t])})},s.prototype.setParameter=function(t,e){var r=this.parametersToSubmit;r[t]=e,this.parametersToSubmit=r},s.prototype.submit=function(){this.isOldInternetExplorer()||(this.severity===o.ERROR?this.submitAsError():(o.INFO,this.submitAsInfo()))},s.prototype.isOldInternetExplorer=function(){return!!navigator.userAgent.match(/Trident/g)||!!navigator.userAgent.match(/MSIE/g)},s.prototype.submitAsError=function(){r.Logger.getLogger().error(this.parametersToSubmit)},s.prototype.submitAsInfo=function(){r.Logger.getLogger().info(this.parametersToSubmit)};var o,i,n=s;function s(t){this.setInitialAttributes(t=void 0===t?{label:""}:t)}e.Log=n}); 118define("SuiteCommerce.MapAndContactUs.Instrumentation.Logger",["require","exports","SuiteCommerce.MapAndContactUs.Instrumentation.MockAppender"],function(s,e,c){"use strict";function a(){}Object.defineProperty(e,"__esModule",{value:!0}),a.getLogger=function(){return this.instance=this.instance||this.buildLoggerInstance(),this.instance},a.buildLoggerInstance=function(){var e;try{var n=s("Loggers").Loggers,t=s("Loggers.Appender.ElasticLogger").LoggersAppenderElasticLogger.getInstance(),r=c.MockAppender.getInstance(),o=s("Loggers.Configuration"),i="CommerceExtensions"+a.options.queueNameSuffix;return n.setConfiguration(((e={})[i]={log:[{profile:o.prod,appenders:[t]},{profile:o.dev,appenders:[r]}],actions:{},loggers:{}},e)),n.getLogger(i)}catch(g){return{info:function(e){},error:function(e){}}}},e.Logger=a}); 119define("SuiteCommerce.MapAndContactUs.Instrumentation.MockAppender",["require","exports"],function(e,n){"use strict";function t(){}Object.defineProperty(n,"__esModule",{value:!0}),t.prototype.info=function(e){console.info("MockAppender - Info",e)},t.prototype.error=function(e){console.error("MockAppender - Error",e)},t.prototype.ready=function(){return!0},t.getInstance=function(){return t.instance=t.instance?t.instance:new t},t.prototype.start=function(e,n){return n},t.prototype.end=function(e,n){},n.MockAppender=t}); 120define("SuiteCommerce.MapAndContactUs.Instrumentation",["require","exports","underscore","SuiteCommerce.MapAndContactUs.Instrumentation.Logger","SuiteCommerce.MapAndContactUs.Instrumentation.Log"],function(e,t,o,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=[];t["default"]={initialize:function(e){n.Logger.options=e},getLog:function(e){return this.getLogModelByLabel(e)||this.registerNewLog(e)},getLogModelByLabel:function(e){return o(i).findWhere({label:e})},registerNewLog:function(e){var t=o.clone(n.Logger.options.defaultParameters),t=new r.Log({label:e,parametersToSubmit:t});return i.push(t),t},setParameterForAllLogs:function(t,o){i.forEach(function(e){e.setParameter(t,o)})},setParametersForAllLogs:function(t){i.forEach(function(e){e.setParameters(t)})},submitLogs:function(){i.forEach(function(e){e.submit()})}}}); 121var __extends=this&&this.__extends||function(){var n=function(t,c){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,c){t.__proto__=c}:function(t,c){for(var e in c)c.hasOwnProperty(e)&&(t[e]=c[e])}))(t,c)};return function(t,c){function e(){this.constructor=t}n(t,c),t.prototype=null===c?Object.create(c):(e.prototype=c.prototype,new e)}}();define("SuiteCommerce.MapAndContactInfoCCT.View",["require","exports","CustomContentType.Base.View","jQuery","map_and_contact_info.tpl","SuiteCommerce.MapAndContactUs.Common.Instrumentation.Helper"],function(t,c,e,n,s,i){"use strict";Object.defineProperty(c,"__esModule",{value:!0});__extends(_,r=e),_.prototype.install=function(t,c){return r.prototype.install.call(this,t,c),i.InstrumentationHelper.log({activity:"Map and Contact loaded"}),n.Deferred().resolve()},_.prototype.validateContextDataRequest=function(){return!0},_.prototype.getContext=function(){var t=!!this.settings.custrecord_cct_ns_mcicct_header,c=!!this.settings.custrecord_cct_ns_mcicct_busaddrinfo,e=!!this.settings.custrecord_cct_ns_mcicct_phonenumber,n=!!this.settings.custrecord_cct_ns_mcicct_primaryemail;return{mapPositionLeft:"1"===this.settings.custrecord_cct_ns_mcicct_mappos,header:this.settings.custrecord_cct_ns_mcicct_header,hasHeader:t,mapUrl:this.settings.custrecord_cct_ns_mcicct_mapurl,hasMapUrl:!!this.settings.custrecord_cct_ns_mcicct_mapurl,singleColumnWidthClass:this.settings.custrecord_cct_ns_mcicct_mapurl?"width-single-column":"",singleColumnCenterAlignmentClass:this.settings.custrecord_cct_ns_mcicct_mapurl?"":"center-alignment-unique-column",contact:this.settings.custrecord_cct_ns_mcicct_busad
121drinfo,hasContact:c,phone:this.settings.custrecord_cct_ns_mcicct_phonenumber,hasPhone:e,phoneButtonText:this.settings.custrecord_cct_ns_mcicct_phonebtntext,email:this.settings.custrecord_cct_ns_mcicct_primaryemail,emailButtonText:this.settings.custrecord_cct_ns_mcicct_emailbtntext,hasEmail:n,hasAnyContact:c||e||n,backgroundClass:"F"===this.settings.custrecord_cct_ns_mcicct_hidebackground?"background-color":"",hideIconsClass:"T"===this.settings.custrecord_cct_ns_mcicct_hideicons?"hide-contact-icons":"",mapAloneClass:c||e||n?"":"map-alone-class"}};var r,o=_;function _(t){var c=r.call(this,t)||this;return c.template=s,c.contextDataRequest=["item"],t&&(c.container=t.container),c}c.MapAndContactInfoCCTView=o}); 122define("SuiteCommerce.MapAndContactInfoCCT",["require","exports","SuiteCommerce.MapAndContactInfoCCT.View"],function(t,e,n){"use strict";return{mountToApp:function(t){this.registerCCT(t)},registerCCT:function(t){t.getComponent("CMS").registerCustomContentType({id:"cct_netsuite_mapcontactcct",view:n.MapAndContactInfoCCTView,options:{container:t}})}}}); 123define("SuiteCommerce.MapAndContactUs.Main",["require","exports","SuiteCommerce.MapAndContactInfoCCT","SuiteCommerce.ContactUsFormCCT","SuiteCommerce.MapAndContactUs.Common.Instrumentation.Helper"],function(t,n,e,o,i){"use strict";return{mountToApp:function(t){i.InstrumentationHelper.initializeInstrumentation(t),e.mountToApp(t),o.mountToApp(t)}}}); 124} 125extensions['SuiteCommerce.NewsletterSignUp.1.1.2'] = function(){ 126function getExtensionAssetsPath(asset){ 127return 'extensions/SuiteCommerce/NewsletterSignUp/1.1.2/' + asset; 128}; 129define("SuiteCommerce.Newsletter.Instrumentation.Helper",["require","exports","SuiteCommerce.Newsletter.Instrumentation"],function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function i(){}i.initializeInstrumentation=function(e){n["default"].initialize({environment:e.getComponent("Environment"),queueNameSuffix:"-Newsletter",defaultParameters:{componentArea:"SC Newsletter Sign Up",extensionVersion:"1.1.2"}})},t.InstrumentationHelper=i}); 130var __extends=this&&this.__extends||function(){var n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}))(e,t)};return function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}();define("SuiteCommerce.Newsletter.ExtMessage.Model",["require","exports","Backbone"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n=r.Model,__extends(i,n),Object.defineProperty(i.prototype,"message",{get:function(){return this.get("message")},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"type",{get:function(){return this.get("type")},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"closable",{get:function(){return this.get("closable")},enumerable:!0,configurable:!0});var n,o=i;function i(e){return n.call(this,e)||this}t.ExtMessageModel=o}); 131var __extends=this&&this.__extends||function(){var o=function(e,t){return(o=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])}))(e,t)};return function(e,t){function s(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)}}();define("SuiteCommerce.Newsletter.ExtMessage.View",["require","exports","Backbone","sc_ext_message.tpl"],function(e,t,s,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n=s.View,__extends(i,n),i.prototype.closeMessage=function(){this.remove()},i.prototype.getContext=function(){return{showMessage:0<this.model.message.length,message:this.model.message,isClosable:this.model.closable,type:this.model.type||""}};var n,r=i;function i(e){var t=n.call(this,e)||this;return t.template=o,t.events={'click [data-action="ext-message-close-message"]':"closeMessage"},t}t.ExtMessageView=r}); 132var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(t){for(var e,r=1,i=arguments.length;r<i;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)};define("SuiteCommerce.Newsletter.Instrumentation.Log",["require","exports","SuiteCommerce.Newsletter.Instrumentation.Logger"],function(t,e,r){"use strict";
132Object.defineProperty(e,"__esModule",{value:!0}),(i=o=e.LogSeverity||(e.LogSeverity={})).INFO="info",i.ERROR="error",s.prototype.setInitialAttributes=function(t){var e={label:null,timer:{},severity:o.INFO},e=__assign(__assign({},e),t),r=e.label,i=e.parametersToSubmit,n=e.timer,e=e.severity;this.label=r,this.parametersToSubmit=i,this.timer=n,this.severity=e},s.prototype.startTimer=function(){this.timer.startTime=this.getTimestamp()},s.prototype.endTimer=function(){this.timer.endTime=this.getTimestamp()},s.prototype.getTimestamp=function(){return!this.isOldInternetExplorer()&&performance.now()||Date.now()},s.prototype.getElapsedTimeForTimer=function(){var t=this.timer;return t.startTime&&t.endTime?t.startTime>t.endTime?(console.warn("Start time should be minor that end time in timer"),null):t.endTime-t.startTime:(t.startTime||console.warn("The Start time is not defined"),t.endTime||console.warn("The End time is not defined"),null)},s.prototype.setParameters=function(e){var r=this;Object.keys(e).forEach(function(t){r.setParameter(t,e[t])})},s.prototype.setParameter=function(t,e){var r=this.parametersToSubmit;r[t]=e,this.parametersToSubmit=r},s.prototype.submit=function(){this.isOldInternetExplorer()||(this.severity===o.ERROR?this.submitAsError():(o.INFO,this.submitAsInfo()))},s.prototype.isOldInternetExplorer=function(){return!!navigator.userAgent.match(/Trident/g)||!!navigator.userAgent.match(/MSIE/g)},s.prototype.submitAsError=function(){r.Logger.getLogger().error(this.parametersToSubmit)},s.prototype.submitAsInfo=function(){r.Logger.getLogger().info(this.parametersToSubmit)};var o,i,n=s;function s(t){this.setInitialAttributes(t=void 0===t?{label:""}:t)}e.Log=n}); 133define("SuiteCommerce.Newsletter.Instrumentation.Logger",["require","exports","SuiteCommerce.Newsletter.Instrumentation.MockAppender"],function(s,e,c){"use strict";function u(){}Object.defineProperty(e,"__esModule",{value:!0}),u.getLogger=function(){return this.instance=this.instance||this.buildLoggerInstance(),this.instance},u.buildLoggerInstance=function(){var e;try{var n=s("Loggers").Loggers,t=s("Loggers.Appender.ElasticLogger").LoggersAppenderElasticLogger.getInstance(),r=c.MockAppender.getInstance(),o=s("Loggers.Configuration"),i="CommerceExtensions"+u.options.queueNameSuffix;return n.setConfiguration(((e={})[i]={log:[{profile:o.prod,appenders:[t]},{profile:o.dev,appenders:[r]}],actions:{},loggers:{}},e)),n.getLogger(i)}catch(g){return{info:function(e){},error:function(e){}}}},e.Logger=u}); 134define("SuiteCommerce.Newsletter.Instrumentation.MockAppender",["require","exports"],function(e,n){"use strict";function o(){}Object.defineProperty(n,"__esModule",{value:!0}),o.prototype.info=function(e){console.info("MockAppender - Info",e)},o.prototype.error=function(e){console.error("MockAppender - Error",e)},o.getInstance=function(){return o.instance=o.instance?o.instance:new o},n.MockAppender=o}); 135define("SuiteCommerce.Newsletter.Instrumentation",["require","exports","underscore","SuiteCommerce.Newsletter.Instrumentation.Logger","SuiteCommerce.Newsletter.Instrumentation.Log"],function(e,t,r,o,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=[];t["default"]={initialize:function(e){o.Logger.options=e},getLog:function(e){return this.getLogModelByLabel(e)||this.registerNewLog(e)},getLogModelByLabel:function(e){return r(i).findWhere({label:e})},registerNewLog:function(e){var t=r.clone(o.Logger.options.defaultParameters),t=new n.Log({label:e,parametersToSubmit:t});return i.push(t),t},setParameterForAllLogs:function(t,r){i.forEach(function(e){e.setParameter(t,r)})},setParametersForAllLogs:function(t){i.forEach(function(e){e.setParameters(t)})},submitLogs:function(){i.forEach(function(e){e.submit()})}}}); 136var __extends=this&&this.__extends||function(){var o=function(t,e){return(o=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])}))(t,e)};return function(t,e){function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();define("SuiteCommerce.Newsletter.NewsletterCCT.Model",["require","exports","Backbone"],function(t,e,r){"use strict";
136Object.defineProperty(e,"__esModule",{value:!0});o=r.Model,__extends(s,o);var o,n=s;function s(){var t=null!==o&&o.apply(this,arguments)||this;return t.urlRoot="/app/site/hosting/scriptlet.nl?script=customscript_ns_sc_ext_sl_newsletter_sp&deploy=customdeploy_ns_sc_ext_sl_newsletter_sp",t}e.NewsletterCCTModel=n}); 137var __extends=this&&this.__extends||function(){var s=function(e,t){return(s=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};return function(e,t){function i(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}}(),__assign=this&&this.__assign||function(){return(__assign=Object.assign||function(e){for(var t,i=1,s=arguments.length;i<s;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};define("SuiteCommerce.Newsletter.NewsletterCCT.View",["require","exports","SuiteCommerce.Newsletter.NewsletterCCT.Model","CustomContentType.Base.View","Backbone.FormView","SuiteCommerce.Newsletter.ExtMessage.View","netsuite_newslettercct.tpl","jQuery","underscore","SuiteCommerce.Newsletter.Instrumentation","SuiteCommerce.Newsletter.ExtMessage.Model"],function(e,t,i,s,r,n,a,o,l,m,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0});__extends(c,p=s),c.prototype.parseSettings=function(){var e;this.newsletterSettings={imgresize:this.getSetting("imgresize"),bgimg_url:this.getSetting("bgimg_url"),header:this.getSetting("header"),subHeader:this.getSetting("subheader"),buttonText:this.getSetting("buttontext"),showFirstName:"T"===this.getSetting("showfirst","F"),showLastName:"T"===this.getSetting("showlast","F"),showCompany:"T"===this.getSetting("showcompany","F"),optionalFirstName:"T"===this.getSetting("optfirst","F"),optionalLastName:"T"===this.getSetting("optlast","F"),optionalCompany:"T"===this.getSetting("optcompany","F"),firstName:this.getSetting("placefirst"),lastName:this.getSetting("placelast"),company:this.getSetting("placecompany"),email:this.getSetting("placeemail","[email protected]"),labelFirstName:this.getSetting("labelfirst"),labelLastName:this.getSetting("labellast"),labelCompany:this.getSetting("labelcompany"),labelEmail:this.getSetting("labelemail"),leadSubsidiary:this.container.getComponent("Environment").getConfig("newsletterSignUp.leadSubsidiary"),termsLabel:this.getSetting("termslabel"),termsLink:this.getSetting("termslink"),hasLink:!!this.getSetting("termslink"),layout:this.LAYOUT[this.getSetting("layout","1")]},this.newsletterSettings.bgimg_url&&this.newsletterSettings.imgresize&&(e=this.findResizeId())&&(this.newsletterSettings.bgimg_url+="&resizeid="+e),this.newsletterSettings.termsLabel=!this.newsletterSettings.termsLabel&&this.newsletterSettings.termsLink?this.newsletterSettings.termsLink:this.newsletterSettings.termsLabel,this.messages={emailEmpty:this.getSetting("v_emailempty"),emailNotValid:this.getSetting("v_emailwrong"),firstNameEmpty:this.getSetting("v_fnameempty"),lastNameEmpty:this.getSetting("v_lnameempty"),companyEmpty:this.getSetting("v_companyempty")},this.feedback={OK:{type:"success",message:this.getSetting("m_ok")},ERR_USER_STATUS_ALREADY_SUBSCRIBED:{type:"warning",message:this.getSetting("m_warn")},ERR_USER_STATUS_DISABLED:{type:"error",message:this.getSetting("m_emailerr")},ERROR:{type:"error",message:this.getSetting("m_err")}}},c.prototype.getSetting=function(e,t){return void 0===t&&(t=""),this.settings?o.trim(this.settings[this.fieldNamePrefix+e])||t:null},c.prototype.findResizeId=function(){var t=this,e=this.container.getComponent("Environment").getSiteSetting("imagesizes"),e=l.find(e,function(e){return e.name===t.newsletterSettings.imgresize});return e&&e.internalid?e.internalid:null},c.prototype.install=function(e,t){var i=o.Deferred();return p.prototype.install.call(this,e,t),this.parseSettings(),this.updateModel(),i.resolve()},c.prototype.update=function(e){return p.prototype.update.call(this,e),this.parseSettings(),this.updateModel(),o.Deferred().resolve()},c.prototype.updateModel=function(){this.model.validation={email:[{required:!0,msg:this.messages.emailEmpty}
137,{pattern:"email",msg:this.messages.emailNotValid}]},this.newsletterSettings.showLastName&&!this.newsletterSettings.optionalLastName&&(this.model.validation.lastName=[{required:!0,msg:this.messages.lastNameEmpty}]),this.newsletterSettings.showFirstName&&!this.newsletterSettings.optionalFirstName&&(this.model.validation.firstName=[{required:!0,msg:this.messages.firstNameEmpty}]),this.newsletterSettings.showCompany&&!this.newsletterSettings.optionalCompany&&(this.model.validation.company=[{required:!0,msg:this.messages.companyEmpty}]),this.model.set("subsidiary",this.getSubsidiary())},c.prototype.getSubsidiary=function(){var t=this,e=this.container.getComponent("Environment").getSiteSetting("subsidiaries");return(l.find(e,function(e){return e.internalid===t.newsletterSettings.leadSubsidiary})||l.find(e,function(e){return"T"===e.isdefault})).internalid},c.prototype.validateContextDataRequest=function(){return!0},c.prototype.getContext=function(){return __assign(__assign({},l(this.newsletterSettings).clone()),{isFeedback:!!this.state.code,model:this.model})},Object.defineProperty(c.prototype,"childViews",{get:function(){var e=this;return{GlobalMessageFeedback:function(){return new n.ExtMessageView({model:new g.ExtMessageModel({message:e.state.message,type:e.state.messageType,closable:!0})})}}},enumerable:!0,configurable:!0}),c.prototype.doSubscribe=function(e){var t,i,s=this,r=m["default"].getLog("leadRequestLog"),n=m["default"].getLog("errorCorrectionTrackingLog"),a=m["default"].getLog("leadProcessedLog");r.setParameters({activity:"Time it takes for saving the entered values in newsletter form",clientContextURL:window.location.href}),n.setParameter("activity","Error correction tracking before submits newsletter form."),a.setParameter("activity","Lead processed"),e.preventDefault(),(t=this.saveForm(e))?(r.startTimer(),n.parametersToSubmit.submitAttemptsWithError&&(n.submit(),n.setParameter("submitAttemptsWithError",0)),t.fail(function(e){e.preventDefault=!0;var t=e&&e.responseJSON&&e.responseJSON.cause&&e.responseJSON.cause.name?e.responseJSON.cause.name:"";i=t&&s.feedback[t]?t:"ERROR",s.state.code=i,s.state.message=s.feedback[i].message,s.state.messageType=s.feedback[i].type}).done(function(){r.endTimer();var e=s.model.get("code");s.state.code=e,s.state.message=s.feedback[e].message,s.state.messageType=s.feedback[e].type,s.model.set("email",""),s.model.set("firstName",""),s.model.set("lastName",""),s.model.set("company",""),r.setParameters({totalTime:r.getElapsedTimeForTimer()}),r.submit(),a.setParameter("subType",s.container.getComponent("Environment").getConfig("newsletterSignUp.createCompanyLeads")?"Company":"Individual"),a.submit()}).always(l.bind(this.render,this))):this.trackErrorInFormBeforeSubmit()},c.prototype.trackErrorInFormBeforeSubmit=function(){var e=m["default"].getLog("errorCorrectionTrackingLog"),t=e.parametersToSubmit.submitAttemptsWithError;t||(e.setParameter("submitAttemptsWithError",0),t=0),e.setParameter("submitAttemptsWithError",t+1)},c.prototype.render=function(){var e=p.prototype.render.call(this);return this.isUsingHorizontalLayout()&&this.forceVerticalLayoutInSmallPlaceholders(),e},c.prototype.isUsingHorizontalLayout=function(){var e=this.LAYOUT[1];return this.newsletterSettings.layout===e},c.prototype.forceVerticalLayoutInSmallPlaceholders=function(){var e=this;l.defer(l.bind(function(){e.isRenderedInSmallPlaceholder()&&e.forceVerticalLayout()}))},c.prototype.isRenderedInSmallPlaceholder=function(){return this.$el.width()<this.MIN_WIDTH_LAYOUT},c.prototype.forceVerticalLayout=function(){this.newsletterSettings.layout=this.LAYOUT[2],p.prototype.render.call(this)};var p,u=c;function c(e){var t=p.call(this,e)||this;return t.template=a,t.model=new i.NewsletterCCTModel,t.fieldNamePrefix="custrecord_cct_ns_news_",t.state={code:"",message:"",messageType:""},t.events={"submit form":"doSubscribe"},t.bindings={'[name="email"]':"email",'[name="firstName"]':"firstName",'[name="lastName"]':"lastName",'[name="company"]':"company"},t.LAYOUT={1:"horizontal",2:"vertical",3:"left",4:"right"},t.MIN_WIDTH_LAYOUT=380,t.container=e.container,r.add(t),t}t.NewsletterCCTView=u}); 138define("SuiteCommerce.Newsletter.NewsletterCCT",["require","exports","SuiteCommerce.Newsletter.Instrumentation.Helper","SuiteCommerce.Newsletter.NewsletterCCT.View"],function(e,t,n,r){"use strict";return{mountToApp:function(e){n.InstrumentationHelper.initializeInstrumentation(e),this.registerCCT(e)},registerCCT:function(e){e.getComponent("CMS").registerCustomContentType({id:"cct_netsuite_newsletter",view:r.NewsletterCCTView,options:{container:e}})}}}); 139define("SuiteCommerce.Newsletter.Main.Module",["require","exports","SuiteCommerce.Newsletter.NewsletterCCT"],function(e,t,r){"use strict";return{mountToApp:function(e){r.mountToApp(e)}}}); 140} 141extensions['SuiteCommerce.OrderStatus.1.0.3'] = function(){ 142function getExtensionAssetsPath(asset){
143return 'extensions/SuiteCommerce/OrderStatus/1.0.3/' + asset; 144}; 145define("SuiteCommerce.OrderStatus.Configuration",[],function Configuration(){"use strict";return{environment:null,initialize:function(n){this.environment=n.getComponent("Environment")},get:function(n){return this.environment?this.environment.getConfig(n):null},getSiteSetting:function(n){return this.environment?this.environment.getSiteSetting(n):null}}}); 146define("SuiteCommerce.OrderStatus.Common.DependencyProvider",["underscore","GlobalViews.Message.View"],function(e,s){"use strict";return{MessageView:(n=s=s,r=Object.keys(n),e.isFunction(n)||1!==r.length?s:s[Object.keys(s)[0]])};var n,r}); 147define("SuiteCommerce.OrderStatus.Instrumentation.FallbackLogger",["Url","jQuery"],function define(S,u){"use strict";var t=null,n=null;function p(){var r=[],o=[],e="-OrderStatus",a="queueError"+e,i="queueInfo"+e,s=!1,l=this;if(this instanceof p)throw new Error("Is not possible to create a new Logger. Please use getLogger method instead.");function g(){localStorage.setItem(a,JSON.stringify(r)),localStorage.setItem(i,JSON.stringify(o)),r.length=0,o.length=0,s=!1}function c(){var e=localStorage.getItem(a),t=localStorage.getItem(i);0<r.length&&(e=null==e?[]:JSON.parse(e),localStorage.setItem(a,JSON.stringify(e.concat(r)))),0<o.length&&(t=null==t?[]:JSON.parse(t),localStorage.setItem(i,JSON.stringify(t.concat(o)))),s=!1}function t(e){var t,n,r,o;l.isEnabled()&&(n=(new S).parse(SC.ENVIRONMENT.baseUrl),t=SC.ENVIRONMENT.BuildTimeInf.product,n=n.schema+"://"+n.netLoc+"/app/site/hosting/scriptlet.nl?script=customscript_"+t.toLowerCase()+"_loggerendpoint&deploy=customdeploy_"+t.toLowerCase()+"_loggerendpoint",r=JSON.parse(localStorage.getItem(a)),(o=JSON.parse(localStorage.getItem(i)))&&0<o.length||r&&0<r.length)&&(s=!0,t={type:t,info:o,error:r},navigator.sendBeacon?(navigator.sendBeacon(n,JSON.stringify(t))?g:c)():(e=e,u.ajax({type:"POST",url:n,data:JSON.stringify(t),"async":e}).success(g).fail(c)))}return this.isEnabled=function(){return n&&!n.isPageGenerator()},this.info=function(e){var t,n=e;this.isEnabled()&&(n.suiteScriptAppVersion=SC.ENVIRONMENT.RELEASE_METADATA.version,n.message="clientSideLogDateTime: "+(new Date).toISOString(),s?o.push(n):((t=JSON.parse(localStorage.getItem(i))||[]).push(n),localStorage.setItem(i,JSON.stringify(t))))},this.error=function(e){var t,n=e;this.isEnabled()&&(n.suiteScriptAppVersion=SC.ENVIRONMENT.RELEASE_METADATA.version,n.message="clientSideLogDateTime: "+(new Date).toISOString(),s?r.push(n):((t=JSON.parse(localStorage.getItem(a))||[]).push(n),localStorage.setItem(a,JSON.stringify(t))))},this.isEnabled()&&(setInterval(function setInterval(){t(!0)},6e4),window.addEventListener("beforeunload",function(){t(!1)})),this}return p.getLogger=function(e){return n=e,t=t||p.apply({})},p}); 148define("SuiteCommerce.OrderStatus.Instrumentation.MockAppender",[],function define(){"use strict";return{info:function(n){console.info("MockAppender - Info",n)},error:function(n){console.error("MockAppender - Error",n)},ready:function(){return!0},getInstance:function(){return this.instance||(this.instance=this),this.instance},start:function(n,e){return e},end:function(n,e){}}}); 149define("SuiteCommerce.OrderStatus.Instrumentation.Collection",["SuiteCommerce.OrderStatus.Instrumentation.Model","underscore","Backbone"],function define(e,t,n){"use strict";return n.Collection.extend({model:e})}); 150define("SuiteCommerce.OrderStatus.Instrumentation.Model",["SuiteCommerce.OrderStatus.Instrumentation.Logger","Backbone","underscore"],function define(t,e,n){"use strict";return e.Model.extend({defaults:function(){return{parametersToSubmit:{},timer:{},severity:"info"}},startTimer:function(){var t=this.getTimestamp(),e=this.get("timer");e.startTime=t,this.set("timer",e)},endTimer:function(){var t=this.getTimestamp(),e=this.get("timer");e.endTime=t,this.set("timer",e)},getTimestamp:function(){return!this.isOldInternetExplorer()&&performance.now()||Date.now()},getElapsedTimeForTimer:function(){var t=this.get("timer");return t.startTime&&t.endTime?t.startTime>t.endTime?(console.warn("Start time should be minor that end time in timer"),null):t.endTime-t.startTime:(t.startTime||console.warn("The Start time is not defined"),t.endTime||c
150onsole.warn("The End time is not defined"),null)},setParametersToSubmit:function(r){var i=this;n.each(r,function(t,e){i.setParameterToSubmit(e,r[e])})},setParameterToSubmit:function(t,e){var r=this.get("parametersToSubmit");r[t]=e,this.set("parametersToSubmit",r)},setSeverity:function(t){this.set("severity",t)},submit:function(){this.isOldInternetExplorer()||("error"===this.get("severity")?this.submitAsError():this.submitAsInfo())},isOldInternetExplorer:function(){return!!navigator.userAgent.match(/Trident/g)||!!navigator.userAgent.match(/MSIE/g)},submitAsError:function(){t.getLogger().error(this.get("parametersToSubmit"))},submitAsInfo:function(){t.getLogger().info(this.get("parametersToSubmit"))}})}); 151define("SuiteCommerce.OrderStatus.Instrumentation.InstrumentationHelper",["SuiteCommerce.OrderStatus.Instrumentation.Model","SuiteCommerce.OrderStatus.Instrumentation.Collection","SuiteCommerce.OrderStatus.Instrumentation.Logger"],function define(n,t,e){"use strict";return{logs:new t,initialize:function(t){e.initialize(t.getComponent("Environment"))},getLog:function(t){return this.getLogModelByLabel(t)||this.registerNewLog(t)},getLogModelByLabel:function(t){return this.logs.findWhere({label:t})},registerNewLog:function(t){var e=new n;return e.set("label",t),this.logs.add(e),e},setParameterToSubmitForAllLogs:function(e,n){this.logs.each(function(t){t.setParameterToSubmit(e,n)})},setParametersToSubmitForAllLogs:function(e){this.logs.each(function(t){t.setParametersToSubmit(e)})},submitAllLogs:function(){this.logs.each(function(t){t.submit()})}}}); 152define("SuiteCommerce.OrderStatus.Instrumentation.Logger",["SuiteCommerce.OrderStatus.Instrumentation.FallbackLogger","SuiteCommerce.OrderStatus.Instrumentation.MockAppender"],function define(s,u){"use strict";var a=null,e=null;return{initialize:function(e){a=e},getLogger:function(){return e=e||this.buildLoggerInstance()},buildLoggerInstance:function(){var e={};try{var r=require("Loggers").Loggers,t=require("Loggers.Appender.ElasticLogger").LoggersAppenderElasticLogger.getInstance(),n=u.getInstance(),g=require("Loggers.Configuration"),o="CommerceExtensions-OrderStatus";return e[o]={log:[{profile:g.prod,appenders:[t]},{profile:g.dev,appenders:[n]}],actions:{},loggers:{}},r.setConfiguration(e),r.getLogger(o)}catch(i){return s.getLogger(a)}}}}); 153define("SuiteCommerce.OrderStatus.Utils",["SuiteCommerce.OrderStatus.Configuration","Handlebars","underscore"],function define(S,e,t){"use strict";return{getConfigurationParameter:function(e){return S.get("orderstatus."+e)},formatCurrency:function(e,t,r){var n,i,s,a,u,f,g=parseFloat(e),o=g<0,c="",l=t;if(isNaN(g))return e;for(a=(g=parseInt(""+100*(Math.abs(g)+.005),10)/100).toString(),n=S.getSiteSetting("groupseparator"),g=S.getSiteSetting("decimalseparator"),i=S.getSiteSetting("negativeprefix"),s=S.getSiteSetting("negativesuffix"),-1===(u=(a=a.replace(".",g)).indexOf(g))?(r||(a+=g+"00"),u=a.indexOf(g)):a.indexOf(g)===a.length-2&&(a+="0"),f=a.length-1;0<=f;--f)c=(0<f&&f<u&&(u-f)%3==0?n:"")+a[f]+c;return a=(l=l||"$")+c,o?i+a+s:a},registerHandlevarsHelpers:function(){e.registerHelper("equals",function(e,t,r){return e===t?r.fn(this):r.inverse(this)}),e.registerHelper("isgreaterthan",function(e,t,r){return t<e?r.fn(this):r.inverse(this)}),e.registerHelper("islessthan",function(e,t,r){return e<t?r.fn(this):r.inverse(this)})}}}); 154define("SuiteCommerce.OrderStatus.OrderFinder.Help.View",["suitecommerce_orderstatus_search_form_help.tpl","SuiteCommerce.OrderStatus.Utils","Backbone"],function define(e,t,r){"use strict";return r.View.extend({template:e,initialize:function(){this.title=t.getConfigurationParameter("helpLink")},getContext:function(){return{body:t.getConfigurationParameter("helpText")}}})}); 155define("SuiteCommerce.OrderStatus.OrderFinder.ItemDetails.View",["suitecommerce_orderstatus_itemdetails.tpl","SuiteCommerce.OrderStatus.Utils","Backbone","underscore"],function define(e,n,i,r){"use strict";return i.View.extend({template:e,initialize:function(e){this.item=e.item,this.title=this.item.status},getContext:function(){return{sections:this.getSections()}},getSections:function(){return this.item.isForShipping?this.getItemForShippingSections():this.getItemForPickupSections()},getItemForShippingSections:function(){var e,i,t={lines:[]},s={lines:[]};return r.each(this.item.trackingNumbers,function(e){t.lines.push({value:n.getConfigurationParameter("orderDetailsTrackPackageLabel")+" "+e,link:!0,url:"https://www.google.com/search?q="+e})}),t.lines.push({value:this.item.shippingMethod,small:!0}),i=(e=this.item.shippingAddress.split("\n")).shift(),s.lines.push({value:i,strong:!0}),r.each(e,function(e){s.lines.push({value:e})}),[t,s]},getItemForPickupSections:function(){var e=this.item.location,i=e.addressLines.split("\n"),t={lines:[]},s={lines:[]};if(t.lines.push({value:e.name,strong:!0}),i.shift(),r.each(i,function(e){t.lines.push({value:e})}),1<e.serviceHours.length)for(var n=0;n<e.serviceHours.length;n++)s.lines.push({value:e.openingDaysPerServiceHour[n]}),s.lines.push({value:e.openingHoursPerServiceHour[n]});else s.lines.push({value:e.openingDays}),s.lines.push({value:e.openingHours});return s.lines.push({value:e.phone}),[t,s]}})}); 156define("SuiteCommerce.OrderStatus.OrderFinder.Order.Model",["SuiteCommerce.OrderStatus.Utils","Backbone"],function define(t,e){"use strict";return e.Model.extend({urlRoot:"/app/site/hosting/scriptlet.nl?script=customscript_ns_sc_ext_sl_orderstatus_of&deploy=customdeploy_ns_sc_ext_sl_orderstatus_of",initialize:function(){this.validation={}},defaults:function(){return{ordernumber:"",verificationfield:"",details:{}}},addValidationRuleForProperty:function(t,e){Object.prototype.hasOwnProperty.call(this.validation,t)||(this.validation[t]=[]),this.validation[t].push(e)}})}); 157define("SuiteCommerce.OrderStatus.OrderFinder.OrderPaymentInfo.View",["suitecommerce_orderstatus_payment_info.tpl","Backbone","SuiteCommerce.OrderStatus.Configuration","SuiteCommerce.OrderStatus.Utils","underscore"],function define(e,t,i,a,n){"use strict";return t.View.extend({template:e,initialize:function(e){this.paymentData=e.paymentData},getContext:function(){return{viewElements:{panelTitle:{label:a.getConfigurationParameter("orderDetailsPaymentSectionLabel"),show:!!a.getConfigurationParameter("orderDetailsSummaryLabel")},paymentMethodPanelTitle:{label:a.getConfigurationParameter("orderDetailsPaymentMethodLabel"),show:!!a.getConfigurationParameter("orderDetailsPaymentMethodLabel")},creditCardEndingLabel:{label:a.getConfigurationParameter("orderDetailsPaymentSectionEndingInLabel"),show:!!this.paymentData.creditCardEndingNumbers},billToPanelTitle:{label:a.getConfigurationParameter("orderDetailsPaymentSectionBillingLabel"),show:!!a.getConfigurationParameter("orderDetailsPaymentSectionBillingLabel")}},paymentData:this.getProcessedPaymentData()}},getProcessedPaymentData:function(){var e,t=this.paymentData,a=i.get("siteSettings.paymentmethods");return t.billAddress&&(e=t.billAddress.split("\n"),t.billAddressName=e.shift(),t.addressLines=e),t.method&&t.method.id&&n.each(a,function(e){t.method.id===e.internalid&&0<e.imagesrc.length&&(t.thumbnailUrl=e.imagesrc[0])}),t}})}); 158define("SuiteCommerce.OrderStatus.OrderFinder.OrderSummary.View",["suitecommerce_orderstatus_summary.tpl","Backbone","Handlebars","SuiteCommerce.OrderStatus.Utils","underscore"],function define(a,t,e,r,i){"use strict";return t.View.extend({template:a,initialize:function(a){this.summaryData=a.summaryData,this.currency=a.currency},getContext:function(){return{viewElements:{panelTitle:{label:r.getConfigurationParameter("orderDetailsSummaryLabel"),show:!!r.getConfigurationParameter("orderDetailsSummaryLabel")},subtotal:{label:r.getConfigurationParameter("orderDetailsSummarySubtotal"),show:!!r.getConfigurationParameter("orderDetailsSummarySubtotal")},discountTotal:{label:r.getConfigurationParameter("orderDetailsSummaryDiscountTotal"),show:!!r.getConfigurationParameter("orderDetailsSummaryDiscountTotal")},shippingCost:{label:r.getConfigurationParameter("orderDetailsSummaryShippingTotal"),show:!!r.getConfigurationParameter("orderDetailsSummaryShippingTotal")},taxtTotal:{label:r.getConfigurationParameter("orderDetailsSummaryTaxTotal"),show:!!r.getConfigurationParameter("orderDetailsSummaryTaxTotal")},giftCertApplied:{label:r.getConfigurationParameter("orderDetailsSummaryGiftCertificate"),show:!!r.getConfigurationParameter("orderDetailsSummaryGiftCertificate")},total:{label:r.getConfigurationParameter("orderDetailsSummaryTotal"),show:!!r.getConfigurationParameter("orderDetailsSummaryTotal")}},summaryData:this.formatSummaryData()}},formatSummaryData:function(){var t=this,e=this.summaryData;return i.each(i.keys(e),function(a){e[a+"_formatted"]=r.formatCurrency(e[a],t.currency.displaysymbol)}),e}}
158)}); 159define("SuiteCommerce.OrderStatus.OrderFinder.Router",["SuiteCommerce.OrderStatus.OrderFinder.SearchForm.View","SuiteCommerce.OrderStatus.OrderFinder.SearchResults.View","SuiteCommerce.OrderStatus.OrderFinder.Order.Model","SuiteCommerce.OrderStatus.Utils","Backbone","underscore"],function define(e,t,r,i,n,o){"use strict";return n.Router.extend({initialize:function(e){this.application=e,this.model=new r,this.setupOrderDetailsListener()},routes:function(){var e={};return e[this.getOrderFinderRoute()+"(/)"]="openOrderFinderPage",e[this.getOrderDetailsRoute()+"(/)"]="openOrderDetailsPage",e},getOrderFinderRoute:function(){return i.getConfigurationParameter("route")},openOrderFinderPage:function(){new e({application:this.application,model:this.model}).showContent()},getOrderDetailsRoute:function(){return i.getConfigurationParameter("route")+"/details"},openOrderDetailsPage:function(){0<!o.keys(this.model.get("details")).length?n.history.navigate(this.getOrderFinderRoute(),{trigger:!0}):new t({application:this.application,model:this.model}).showContent()},setupOrderDetailsListener:function(){var e=this;this.model.on("sync",function(){n.history.navigate(e.getOrderDetailsRoute(),{trigger:!0})}),this.model.on("destroy",function(){e.model.clear(),n.history.navigate(e.getOrderFinderRoute(),{trigger:!0})})}})}); 160define("SuiteCommerce.OrderStatus.OrderFinder.SearchForm.View",["SuiteCommerce.OrderStatus.OrderFinder.Help.View","SuiteCommerce.OrderStatus.Common.DependencyProvider","suitecommerce_orderstatus_search_form.tpl","SuiteCommerce.OrderStatus.Utils","Backbone","Backbone.FormView","Backbone.CompositeView","underscore","SuiteCommerce.OrderStatus.Instrumentation.InstrumentationHelper"],function define(t,e,r,i,n,o,a,s,d){"use strict";return n.View.extend({template:r,events:{},bindings:{},childViews:{"GlobalMessage.Feedback":function(){return new e.MessageView({message:this.state.message,type:this.state.messageType,closable:!0})}},initialize:function(e){var t;this.title=i.getConfigurationParameter("pageTitle"),this.ERRORS={ORDER_NOT_FOUND:i.getConfigurationParameter("orderNotFoundMessage")},this.model=e.model,this.setupOrderFinderForm(),this.state={code:"",message:"",messageType:""},o.add(this),(t=d.getLog("landingPageLoadedLog")).setParametersToSubmit({componentArea:"SC Order Status",activity:"Order status landing page was opened"}),t.submit()},getBreadcrumbPages:function(){return[{text:this.title,href:"/"+i.getConfigurationParameter("route")}]},setupOrderFinderForm:function(){this.setupBindingsForOrderFinderForm(),this.setupValidationRulesForOrderFinderForm(),this.registerEventsRelatedToOrderFinderForm()},setupBindingsForOrderFinderForm:function(){var t=this,e=this.getFormControls();s.each(e.fields,function(e){t.addBindingForProperty("name",e.name,e.bindingProperty)})},addBindingForProperty:function(e,t,r){this.bindings["["+e+'="'+t+'"]']=r},setupValidationRulesForOrderFinderForm:function(){var t=this,e=this.getFormControls();s.each(e.fields,function(e){t.model.addValidationRuleForProperty(e.name,{required:!0,msg:i.getConfigurationParameter("requiredFieldMessage").replace("{{field}}",e.label)})})},registerEventsRelatedToOrderFinderForm:function(){this.events["submit form"]="submitOrderFinderForm",this.events['click [data-action="showHelp"]']="openHelpView"},submitOrderFinderForm:function(e){var t,r,i=this,n=d.getLog("searchSalesOrderRequestLog");e.preventDefault(),(t=this.saveForm(e))&&(n.startTimer(),this.setSubmitedValues(),t.then(function(){i.state.code="",i.state.message="",i.state.messageType="",n.endTimer(),n.setParametersToSubmit({componentArea:"SC Order Status",activity:"Time it takes to search a sales order",totalTime:n.getElapsedTimeForTimer()}),n.submit()},function(e){e.preventDefault=!0,r=e.responseJSON.name,i.ERRORS[r]?(i.state.code=r,i.state.message=i.ERRORS[r]):(e.responseJSON.message?i.state.message=e.responseJSON.message:i.state.message=e.responseJSON.name+": "+e.responseJSON.stack[0],i.state.code=e.responseJSON.name),i.state.messageType="error"}).always(s.bind(i.render,i)))},setSubmitedValues:function(){var e=this.validationModel.get("ordernumber"),t=this.validationModel.get("verificationfield");this.model.set("ordernumber",e),this.model.set("verificationfield",t)},getFormControls:function(){var e={fields:[]};return e.fields.push({name:"ordernumber",bindingProperty:"ordernumber",label:i.getConfigurationParameter("orderNumberLabel"),value:this.model.get("ordernumber"),placeholder:i.getConfigurationParameter("orderNumberHelp"),tabindex:1}),e.fields.push({name:"verificationfield",bindingProperty:"verificationfield",label:i.getConfigurationParameter("verificationFieldLabel"),value:this.model.get("verificationfield"),placeholder:i.getConfigurationParameter("verificationFieldHelp"),tabindex:2}),e.buttons={},e.buttons.submit={label:i.getConfigurationParameter("submitButtonLabel"),tabindex:3,alt:i.getConfigurationParameter("submitButtonHelp")},e},openHelpView:function(){var e=new t;this.options.application.getLayout().showInModal(e)},getContext:function(){return{title:this.title,viewElements:{description:{label:i.getConfigurationParameter("pageDescription"),show:!!i.getConfigurationParameter("pageDescription")},helpLink:{label:i.getConfigurationParameter("helpLink"),show:!!i.getConfigurationParameter("helpLink")},loginSectionText:{label:i.getConfigurationParameter("orderLoginSectionText"),show:!!i.getConfigurationParameter("orderLoginSectionText")},loginSectionLink:{label:i.getConfigurationParameter("loginSectionLink"),show:!!i.getConfigurationParameter("loginSectionLink")}},formControls:this.getFormControls(),order:this.model,isFeedback:!!this.state.code}}})}); 161define("SuiteCommerce.OrderStatus.OrderFinder.SearchResults.View",["suitecommerce_orderstatus_search_results.tpl","SuiteCommerce.OrderStatus.OrderFinder.OrderSummary.View","SuiteCommerce.OrderStatus.OrderFinder.OrderPaymentInfo.View","SuiteCommerce.OrderStatus.OrderFinder.ItemDetails.View","SuiteCommerce.OrderStatus.Utils","Backbone","Backbone.CompositeView","underscore"],function define(e,t,r,a,o,i,n,s){"use strict";return i.View.extend({ORDER_STATUSES_TO_HIGHLIGHT:{error:["Cancelled"]},ITEM_FULFILLMENT_CHOICE_MAPPING:{ship:"SHIP",pickupInStore:"PICKUP_IN_STORE"},template:e,events:{'click [data-action="resetSearch"]':"resetSearch",'click [data-action="openItemDetails"]':"openItemDetails"},childViews:{"OrderFinder.Summary":function(){return new t({summaryData:this.model.get("details").transactionData,currency:this.model.get("details").currency})},"OrderFinder.PaymentInfo":function(){return new r({paymentData:this.model.get("details").paymentData})}},initialize:function(e){this.model=e.model,this.title=o.getConfigurationParameter("pageTitle"),this.initializeOrderConstant(),n.add(this)},initializeOrderConstant:function(){this.ORDER_STATUS_MAPPING={"Pending Approval":o.getConfigurationParameter("orderDetailsOrderStatusPendingApproval"),"Pending Fulfillment":o.getConfigurationParameter("orderDetailsOrderStatusPendingFulfillment"),"Partially Fulfilled":o.getConfigurationParameter("orderDetailsOrderStatusPartiallyShipped"),Fulfilled:o.getConfigurationParameter("orderDetailsOrderStatusFulfilled"),"Pending Billing":o.getConfigurationParameter("orderDetailsOrderStatusPendingBilling"),Billed:o.getConfigurationParameter("orderDetailsOrderStatusBilled"),Closed:o.getConfigurationParameter("orderDetailsOrderStatusClosed"),Cancelled:o.getConfigurationParameter("orderDetailsOrderStatusCanceled"),Canceled:o.getConfigurationParameter("orderDetailsOrderStatusCanceled")},this.ITEMS_STATUS_MAPPING={SHIPPING_ITEMS_PENDING_FULFILLMENT_LABEL:o.getConfigurationParameter("orderDetailsShippingItemsWithoutFulfillmentLabel"),SHIPPING_ITEMS_PICKED_LABEL:o.getConfigurationParameter("orderDetailsShippingItemsPickedLabel"),SHIPPING_ITEMS_PACKED_LABEL:o.getConfigurationParameter("orderDetailsShippingItemsPackedLabel"),SHIPPING_ITEMS_SHIPPED_LABEL:o.getConfigurationParameter("orderDetailsShippingItemsShippedLabel"),PICKUP_ITEMS_PENDING_FULFILLMENT_LABEL:o.getConfigurationParameter("orderDetailsPickupItemsWithoutFulfillmentLabel"),PICKUP_ITEMS_PICKED_LABEL:o.getConfigurationParameter("orderDetailsPickupItemsPickedLabel"),PICKUP_ITEMS_PICKED_UP_LABEL:o.getConfigurationParameter("orderDetailsPickupItemsPickedUpLabel"),ITEMS_PENDING_APPROVAL_LABEL:o.getConfigurationParameter("orderDetailsOrderStatusPendingApproval"),ITEMS_CANCELLED_LABEL:o.getConfigurationParameter("orderDetailsOrderStatusCanceled")}},getBreadcrumbPages:function(){return[{text:this.title,href:"/"+o.getConfigurationParameter("route")}]},resetSearch:function(){this.model.destroy()},getContext:function(){var e=this.getProcessedOrderDetails();return this.model.set("details",e),{title:this.title,orderDetails:e,viewElements:{searchButtonLabel:o.getConfigurationParameter("orderDetailsNewSearchButtonLabel"),orderNumberLabel:o.getConfigurationParameter("orderDetailsOrderNumber").replace("{{ordernumber}}",this.model.get("details").orderNumber),orderStatus:{label:this.model.get("details").status,show:!0},orderDate:{label:o.getConfigurationParameter("orderDetailsDateOrderedLabel").replace("{{orderdate}}",this.model.get("details").orderDate),show:!0},itemColumn:{label:o.getConfigurationParameter("orderDetailsItemColumnLabel"),show:!!o.getConfigurationParameter("orderDetailsItemColumnLabel")},quantityColumn:{label:o.getConfigurationParameter("orderDetailsQuantityColumnLabel"),show:!!o.getConfigurationParameter("orderDetailsQuantityColumnLabel")},statusColumn:{label:o.getConfigurationParameter("orderDetailsStatusColumnLabel"),show:!!o.getConfigurationParameter("orderDetailsStatusColumnLabel")},trackPackage:{label:o.getConfigurationParameter("orderDetailsTrackPackageLabel"),show:!!o.getConfigurationParameter("orderDetailsTrackPackageLabel")},shipDifferentAddressLabel:o.getConfigurationParameter("orderDetailsShipToDifferentAddressLabel"),viewDetailsLabel:o.getConfigurationParameter("orderDetailsViewDetailsLabel")}}},getProcessedOrderDetails:function(){var r=this,a=this.model.get("details"),e=a.status.split("/");return s.each(e,function(t){s.each(s.keys(r.ORDER_STATUSES_TO_HIGHLIGHT),function(e){-1!==s.indexOf(r.ORDER_STATUSES_TO_HIGHLIGHT[e],t)&&(a.highlightColor=e)})}),a.statusRequiresHighlight=!!a.highlightColor,a.itemDetails=this.processItemData(a),a.status=this.processOrderStatus(a.status),a},processItemData:function(e){var r=e,a=e.itemDetails,i=this;return s.each(a,function(e,t){a[t].totalFormated=o.formatCurrency(e.total,r.currency.displaysymbol),a[t].itemLine=t,a[t].isForShipping=e.fulfillmentChoice===i.ITEM_FULFILLMENT_CHOICE_MAPPING.ship,a[t].isForPickUpInStore=e.fulfillmentChoice===i.ITEM_FULFILLMENT_CHOICE_MAPPING.pickupInStore,a[t].showDetail
161sButton=!!(e.location&&e.isForPickUpInStore||e.shippingAddress&&e.isForShipping),a[t].showDifferentAddressLabel=!(!e.shippingAddress||e.shippingAddress===r.shippingAddress),a[t].status=i.ITEMS_STATUS_MAPPING[e.status]||""}),a},processOrderStatus:function(e){var r=e.split("/"),a=this;return s.each(r,function(e,t){r[t]=a.ORDER_STATUS_MAPPING[e]||""}),r.join(" / ")},openItemDetails:function(e){var t=e.target.getAttribute("data-row-index"),t=this.model.get("details").itemDetails[t],t=new a({item:t});e.preventDefault(),this.options.application.getLayout().showInModal(t)}})}); 162define("SuiteCommerce.OrderStatus.Shopping",["SuiteCommerce.OrderStatus.OrderFinder.Router","SuiteCommerce.OrderStatus.Utils","SuiteCommerce.OrderStatus.Instrumentation.InstrumentationHelper","SuiteCommerce.OrderStatus.Configuration"],function define(t,r,i,n){"use strict";return{mountToApp:function(e){i.initialize(e);n.initialize(e),new t(e),r.registerHandlevarsHelpers()}}}); 163} 164extensions['logitail.PromoCodeTaxUpdateCart.1.0.0'] = function(){ 165function getExtensionAssetsPath(asset){ 166return 'extensions/logitail/PromoCodeTaxUpdateCart/1.0.0/' + asset; 167}; 168define("logitail.PromoCodeTaxUpdateCart.PromoCodeTaxUpdateCart.View",["logitail_promocodetaxupdatecart_promocodetaxupdatecart.tpl","logitail.PromoCodeTaxUpdateCart.PromoCodeTaxUpdateCart.SS2Model","Backbone"],function(t,e,o){"use strict";return o.View.extend({template:t,initialize:function(t){},events:{},bindings:{},childViews:{},getContext:function(){return{}}})}); 169define("logitail.PromoCodeTaxUpdateCart.PromoCodeTaxUpdateCart.Model",["Backbone","Utils"],function(e,t){"use strict";return e.Model.extend({urlRoot:t.getAbsoluteUrl(getExtensionAssetsPath("services/PromoCodeTaxUpdateCart.Service.ss"))})}); 170define("logitail.PromoCodeTaxUpdateCart.PromoCodeTaxUpdateCart.SS2Model",["Backbone","Utils"],function(e,t){"use strict";return e.Model.extend({urlRoot:t.getAbsoluteUrl(getExtensionAssetsPath("Modules/PromoCodeTaxUpdateCart/SuiteScript2/PromoCodeTaxUpdateCart.Service.ss"),!0)})}); 171define("logitail.PromoCodeTaxUpdateCart.PromoCodeTaxUpdateCart",["logitail.PromoCodeTaxUpdateCart.PromoCodeTaxUpdateCart.View","Cart.PromocodeForm.View","Utils","LiveOrder.Model","Cart.Promocode.List.View","Cart.Item.Actions.View","Profile.Model"],function(e,t,o,r,d,i,n){"use strict";return{mountToApp:function(e){_.extend(t.prototype,{apply_promocode_finished:function(){this.trigger("apply_promocode_finished");var e=this,t=e.model.get("shipaddress");t&&(e.model.unset("shipaddress"),e.model.save().done(()=>{e.model.save({shipaddress:t})}))}}),_.extend(d.prototype,{removePromocode:function(e){e.preventDefault();var t=this,o=(this.$(e.currentTarget).data("id")||"").toString();this.model.removePromotion(o).then(function(){var e=t.model.get("shipaddress");e&&(t.model.unset("shipaddress"),t.model.save().then(function(){t.model.set("shipaddress",e),t.model.save()}))}).then(function(){return t.model.fetch()}).then(function(){t.render()})}}),_.extend(i.prototype,{getContext:_.wrap(i.prototype.getContext,function(e){var t=e.apply(this,_.toArray(arguments).slice(1));return"F"===n.getInstance().get("isLoggedIn")?t.isLoggedIn=!1:t.isLoggedIn=!0,t})})}}}); 172} 173extensions['NSeComm.ReturnAssemblyItems.1.0.0'] = function(){ 174function getExtensionAssetsPath(asset){ 175return 'extensions/NSeComm/ReturnAssemblyItems/1.0.0/' + asset; 176}; 177define("NSeComm.ReturnAssemblyItems.Main",[],function NSeCommReturnAssemblyItemsMain(){"use strict";return{mountToApp:function(e){var t=e.getConfig();t.itemKeyMapping=t.itemKeyMapping||{},t.itemKeyMapping._isReturnable=function(e){var t=e.get("itemtype");return"InvtPart"===t||"NonInvtPart"===t||"Kit"===t||"Assembly"===t}}}}); 178} 179extensions['logitail.ShippingandReturnsPdp.1.0.0'] = function(){ 180function getExtensionAssetsPath(asset){ 181return 'extensions/logitail/ShippingandReturnsPdp/1.0.0/' + asset; 182}; 183define("logitail.ShippingandReturnsPdp.ShippingandReturnsPdp.View",["logitail_shippingandreturnspdp_shippingandreturnspdp.tpl","logitail.ShippingandReturnsPdp.ShippingandReturnsPdp.SS2Model","Backbone"],function(n,i,e){"use strict";return e.View.extend({template:n,initialize:function(n){},events:{},bindings:{},childViews:{},getContext:function(){return{}}})}); 184define("logitail.ShippingandReturnsPdp.ShippingandReturnsPdp.Model",["Backbone","Utils"],function(e,n){"use strict";return e.Model.extend({urlRoot:n.getAbsoluteUrl(getExtensionAssetsPath("services/ShippingandReturnsPdp.Service.ss"))})}); 185define("logitail.ShippingandReturnsPdp.ShippingandReturnsPdp.SS2Model",["Backbone","Utils"],function(e,n){"use strict";return e.Model.extend({urlRoot:n.getAbsoluteUrl(getExtensionAssetsPath("Modules/ShippingandReturnsPdp/SuiteScript2/ShippingandReturnsPdp.Service.ss"),!0)})}); 186define("logitail.ShippingandReturnsPdp.ShippingandReturnsPdp",["logitail.ShippingandReturnsPdp.ShippingandReturnsPdp.View","ProductDetails.Full.View","Profile.Model","SC.Configuration"],function(i,n,p,t){"use strict";return{mountToApp:function(i){_.extend(n.prototype,{getContext:_.wrap(n.prototype.getContext,function(i){var n=i.apply(this,_.toArray(arguments).slice(1)),t=p.getInstance(),e="T"===t.get("isLoggedIn"),r=SC.CONFIGURATION.shippingAndReturn.contentList||[],u=(SC.CONFIGURATION.siteSettings.subsidiaries||[]).find(function(i){return"T"===i.isdefault}
186),o=e?t.get("subsidiary"):u?u.internalid:null,e=r.filter(function(i){return i.subsidiaryID==o});return n.combinedPolicies=e.map(function(i){return{shippingPolicy:i.shippingPolicy,returnPolicy:i.ReturnandRefundsPolicy}}),n.showShippingReturns=!!o,n.currentSubsidiary=o,n})})}}}); 187} 188extensions['SuiteCommerce.SizeChart.1.0.4'] = function(){ 189function getExtensionAssetsPath(asset){ 190return 'extensions/SuiteCommerce/SizeChart/1.0.4/' + asset; 191}; 192var __extends=this&&this.__extends||function(){var o=function(e,t){return(o=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}))(e,t)};return function(e,t){function r(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}();define("SuiteCommerce.SizeChart.Chart.Collection",["require","exports","Backbone","SuiteCommerce.SizeChart.Chart.Model","SuiteCommerce.SizeChart.Common.Utils"],function(e,t,r,o,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});i=r.Collection,__extends(c,i);var i,s=c;function c(){var e=null!==i&&i.apply(this,arguments)||this;return e.url=n.Utils.getAbsoluteUrl(getExtensionAssetsPath("services/SuiteCommerce.SizeChart.Service.ss")),e.model=o.ChartModel,e}t.ChartCollection=s}); 193var __extends=this&&this.__extends||function(){var n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}))(e,t)};return function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}();define("SuiteCommerce.SizeChart.Chart.Model",["require","exports","Backbone"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n=r.Model,__extends(i,n),Object.defineProperty(i.prototype,"internalId",{get:function(){return this.get("internalId")},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"name",{get:function(){return this.get("recordName")},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"title",{get:function(){return this.get("title")},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"description",{get:function(){return this.get("description")},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"chart",{get:function(){return this.get("chart")},enumerable:!0,configurable:!0});var n,o=i;function i(){return null!==n&&n.apply(this,arguments)||this}t.ChartModel=o}); 194var __extends=this&&this.__extends||function(){var n=function(t,e){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])}))(t,e)};return function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();define("SuiteCommerce.SizeChart.Chart.Page.Model",["require","exports","Backbone","SuiteCommerce.SizeChart.Chart.Collection","SuiteCommerce.SizeChart.Common.Utils"],function(t,e,r,n,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});o=r.Model,__extends(s,o),Object.defineProperty(s.prototype,"charts",{get:function(){return this.get("charts")||(this.charts=new n.ChartCollection),this.get("charts")},set:function(t){this.set("charts",t)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"isRenderedInModal",{get:function(){return this.get("isRenderedInModal")},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"sizeChartSearchKey",{get:function(){return this.get("sizeChartSearchKey")},enumerable:!0,configurable:!0}),s.prototype.getPageTitle=function(){return this.sizeChartSearchKey&&0<this.charts.size()?this.charts.at(0).title:i.Utils.translate("Size Charts")},s.prototype.getSizeChartId=function(){if(this.sizeChartSearchKey&&0<this.charts.size())return this.charts.at(0).internalId};var o,a=s;function s(t){return o.call(this,t)||this}e.ChartPageModel=a}); 195var __extends=this&&this.__extends||function(){var i=function(e,t){return(i=Object.
195setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}))(e,t)};return function(e,t){function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}();define("SuiteCommerce.SizeChart.Chart.Page.View",["require","exports","Backbone","Backbone.CollectionView","SuiteCommerce.SizeChart.Chart.View","suitecommerce_sizechart_page.tpl"],function(e,t,r,i,o,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});a=r.View,__extends(s,a),Object.defineProperty(s.prototype,"childViews",{get:function(){var e=this;return{"SizeCharts.View":function(){return new i({collection:e.model.charts,childView:o.ChartView,childViewOptions:{showSizeChartTitle:!e.model.sizeChartSearchKey}})}}},enumerable:!0,configurable:!0}),s.prototype.getContext=function(){return{isRenderedInModal:this.model.isRenderedInModal,pageTitle:this.model.getPageTitle(),sizeChartId:this.model.getSizeChartId()}};var a,c=s;function s(e){var t=a.call(this,e)||this;return t.template=n,t.title=t.model.getPageTitle(),t}t.ChartPageView=c}); 196var __extends=this&&this.__extends||function(){var a=function(e,t){return(a=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};return function(e,t){function i(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}}();define("SuiteCommerce.SizeChart.Chart.Router",["require","exports","Backbone","SuiteCommerce.SizeChart.NotFoundPage.View","SuiteCommerce.SizeChart.Chart.Page.Model","SuiteCommerce.SizeChart.Chart.Page.View","SuiteCommerce.SizeChart.Instrumentation"],function(e,t,i,o,n,s,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});a=i.Router,__extends(h,a),Object.defineProperty(h.prototype,"routes",{get:function(){return{"size-charts(/)(/:sizeChartSearchKey)(/)":"openSizeChartAction"}},enumerable:!0,configurable:!0}),h.prototype.openSizeChartAction=function(e){this.showSizeChartView(e)},h.prototype.showSizeChartView=function(e,t){var i=this,a=(void 0===t&&(t=!1),this.isSearchingSizeCharts=!0,new n.ChartPageModel({isRenderedInModal:t,sizeChartSearchKey:e})),r=c["default"].getLog("sizeChartLoadingTimeLog");r.startTimer(),(e?a.charts.fetch({data:{sizeChartSearchKey:e}}):a.charts.fetch()).done(function(){var e;r.endTimer(),i.isSearchingSizeCharts=!1,0<a.charts.size()?(e=new s.ChartPageView({model:a,application:i.application}),t?e.showInModal():(e.showContent(),i.logSizeChartsPageVisit(1===a.charts.size()?a.charts.at(0):null))):new o.NotFoundView({application:i.application}).showContent(),r.setParameters({activity:"Time it takes to load the size chart data",instanceCount:a.charts.size(),totalTime:r.getElapsedTimeForTimer()}),r.submit()})},h.prototype.logSizeChartsPageVisit=function(e){void 0===e&&(e=null);var t=c["default"].getLog("visitedSizeChartPageLog");t.setParameters({activity:"Visited Size Chart landing page",message:"Size chart: "+(e?"Id:"+e.internalId+" - Name: "+e.name:"All")}),t.submit()};var a,r=h;function h(e){var t=a.call(this,e)||this;return t.application=e.application,t.environment=e.application.getComponent("Environment"),t}t.ChartRouter=r}); 197var __extends=this&&this.__extends||function(){var i=function(t,e){return(i=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])}))(t,e)};return function(t,e){function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();define("SuiteCommerce.SizeChart.Chart.View",["require","exports","Backbone","suitecommerce_sizechart_chart.tpl"],function(t,e,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});o=r.View,__extends(c,o),c.prototype.getContext=function(){return{chart:this.model.chart,description:this.model.description,showSizeChartTitle:this.showSizeChartTitle,title:this.model.title}};var o,n=c;function c(t){var e=o.call(this,t)||this;return e.template=i,e.showSizeChartTitle=t.showSizeChartTitle,e}e.ChartView=n}); 198define("SuiteCommerce.SizeChart.Common.Configuration",["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=null,r=(Object.defineProperty(o,"environment",{set:function(e){t=e},enumerable:!0,configurable:!0}),o.get=function(e){return t?t.getConfig(e):(console.error("Please set the Environment Component in the Configuration."),null)},Object.defineProperty(o,"sizeChartPageURL",{get:function(){return"size-charts"},enumerable:!0,configurable:!0}),o);function o(){}n.Configuration=r}); 199define("SuiteCommerce.SizeChart.Common.DependencyProvider",["require","exports","underscore","Utils"],function(e,r,t,n){"use strict";
199Object.defineProperty(r,"__esModule",{value:!0}),r.Utils=function(e){if(function(e){var r=Object.keys(e);return!t.isFunction(e)&&1===r.length}(e))return e[Object.keys(e)[0]];return e}(n)}); 200define("SuiteCommerce.SizeChart.Common.InstrumentationHelper",["require","exports","SuiteCommerce.SizeChart.Instrumentation"],function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function i(){}i.initializeInstrumentation=function(e){n["default"].initialize({environment:e,queueNameSuffix:"-SizeChart",defaultParameters:{componentArea:"SC Size Chart",extensionVersion:"1.0.4"}})},t.InstrumentationHelper=i}); 201define("SuiteCommerce.SizeChart.Common.Utils",["require","exports","SuiteCommerce.SizeChart.Common.DependencyProvider"],function(e,t,n){"use strict";function r(){}Object.defineProperty(t,"__esModule",{value:!0}),r.getAbsoluteUrl=function(e,t){return n.Utils.getAbsoluteUrl(e,t=void 0===t?!1:t)},r.translate=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return n.Utils.translate(e,t)},r.getURLComponent=function(e){return e.replace(/[^a-zA-Z0-9_ -]/g,"").replace(/^ +| +$/g,"").replace(/ /g,"-").toLowerCase()},t.Utils=r}); 202var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(t){for(var e,r=1,i=arguments.length;r<i;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)};define("SuiteCommerce.SizeChart.Instrumentation.Log",["require","exports","SuiteCommerce.SizeChart.Instrumentation.Logger"],function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(i=o=e.LogSeverity||(e.LogSeverity={})).INFO="info",i.ERROR="error",s.prototype.setInitialAttributes=function(t){var e={label:null,timer:{},severity:o.INFO},e=__assign(__assign({},e),t),r=e.label,i=e.parametersToSubmit,n=e.timer,e=e.severity;this.label=r,this.parametersToSubmit=i,this.timer=n,this.severity=e},s.prototype.startTimer=function(){this.timer.startTime=this.getTimestamp()},s.prototype.endTimer=function(){this.timer.endTime=this.getTimestamp()},s.prototype.getTimestamp=function(){return!this.isOldInternetExplorer()&&performance.now()||Date.now()},s.prototype.getElapsedTimeForTimer=function(){var t=this.timer;return t.startTime&&t.endTime?t.startTime>t.endTime?(console.warn("Start time should be minor that end time in timer"),null):t.endTime-t.startTime:(t.startTime||console.warn("The Start time is not defined"),t.endTime||console.warn("The End time is not defined"),null)},s.prototype.setParameters=function(e){var r=this;Object.keys(e).forEach(function(t){r.setParameter(t,e[t])})},s.prototype.setParameter=function(t,e){var r=this.parametersToSubmit;r[t]=e,this.parametersToSubmit=r},s.prototype.submit=function(){this.isOldInternetExplorer()||(this.severity===o.ERROR?this.submitAsError():(o.INFO,this.submitAsInfo()))},s.prototype.isOldInternetExplorer=function(){return!!navigator.userAgent.match(/Trident/g)||!!navigator.userAgent.match(/MSIE/g)},s.prototype.submitAsError=function(){r.Logger.getLogger().error(this.parametersToSubmit)},s.prototype.submitAsInfo=function(){r.Logger.getLogger().info(this.parametersToSubmit)};var o,i,n=s;function s(t){this.setInitialAttributes(t=void 0===t?{label:""}:t)}e.Log=n}); 203define("SuiteCommerce.SizeChart.Instrumentation.Logger",["require","exports","SuiteCommerce.SizeChart.Instrumentation.MockAppender"],function(s,e,c){"use strict";function u(){}Object.defineProperty(e,"__esModule",{value:!0}),u.getLogger=function(){return this.instance=this.instance||this.buildLoggerInstance(),this.instance},u.buildLoggerInstance=function(){var e;try{var n=s("Loggers").Loggers,r=s("Loggers.Appender.ElasticLogger").LoggersAppenderElasticLogger.getInstance(),t=c.MockAppender.getInstance(),o=s("Loggers.Configuration"),i="CommerceExtensions"+u.options.queueNameSuffix;return n.setConfiguration(((e={})[i]={log:[{profile:o.prod,appenders:[r]},{profile:o.dev,appenders:[t]}],actions:{},loggers:{}},e)),n.getLogger(i)}catch(g){return{info:function(e){},error:function(e){}}}},e.Logger=u}); 204define("SuiteCommerce.SizeChart.Instrumentation.MockAppender",["require","exports"],function(e,n){"use strict";function t(){}Object.defineProperty(n,"__esModule",{value:!0}),t.prototype.info=function(e){console.info("MockAppender - Info",e)},t.prototype.error=function(e){console.error("MockAppender - Error",e)},t.prototype.ready=function(){return!0},t.getInstance=function(){return t.instance=t.instance?t.instance:new t},t.prototype.start=function(e,n){return n},t.prototype.end=function(e,n){},n.MockAppender=t}); 205define("SuiteCommerce.SizeChart.Instrumentation",["require","exports","underscore","SuiteCommerce.SizeChart.Instrumentation.Logger","SuiteCommerce.SizeChart.Instrumentation.Log"],function(e,t,r,o,n){"use strict";
205Object.defineProperty(t,"__esModule",{value:!0});var i=[];t["default"]={initialize:function(e){o.Logger.options=e},getLog:function(e){return this.getLogModelByLabel(e)||this.registerNewLog(e)},getLogModelByLabel:function(e){return r(i).findWhere({label:e})},registerNewLog:function(e){var t=r.clone(o.Logger.options.defaultParameters),t=new n.Log({label:e,parametersToSubmit:t});return i.push(t),t},setParameterForAllLogs:function(t,r){i.forEach(function(e){e.setParameter(t,r)})},setParametersForAllLogs:function(t){i.forEach(function(e){e.setParameters(t)})},submitLogs:function(){i.forEach(function(e){e.submit()})}}}); 206var __extends=this&&this.__extends||function(){var n=function(t,e){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])}))(t,e)};return function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}();define("SuiteCommerce.SizeChart.NotFoundPage.View",["require","exports","Backbone","suitecommerce_size_chart_not_found_page.tpl","SuiteCommerce.SizeChart.Common.Utils"],function(t,e,o,n,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});i=o.View,__extends(c,i),c.prototype.getContext=function(){return{pageHeader:this.title}};var i,u=c;function c(t){var e=i.call(this,t)||this;return e.template=n,e.title=r.Utils.translate("Page not found"),e}e.NotFoundView=u}); 207var __extends=this&&this.__extends||function(){var r=function(t,e){return(r=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])}))(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}();define("SuiteCommerce.SizeChart.PDP.Configuration",["require","exports","SuiteCommerce.SizeChart.Common.Configuration"],function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});r=n.Configuration,__extends(i,r),Object.defineProperty(i,"hyperlinkText",{get:function(){return this.get("sizechart.hyperlinkText")},enumerable:!0,configurable:!0});var r,o=i;function i(){return null!==r&&r.apply(this,arguments)||this}e.PDPConfiguration=o}); 208var __extends=this&&this.__extends||function(){var n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}))(e,t)};return function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}();define("SuiteCommerce.SizeChart.PDP.Item.Model",["require","exports","Backbone","SuiteCommerce.SizeChart.Common.Utils"],function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(o=i=t.ItemFields||(t.ItemFields={})).sizeChartId="custitem_ns_sc_ext_sich_size_chart_id",o.sizeChartName="custitem_ns_sc_ext_sich_size_chart",s=r.Model,__extends(c,s),Object.defineProperty(c.prototype,"sizeChartId",{get:function(){return this.get(i.sizeChartId)},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"sizeChartName",{get:function(){return this.get(i.sizeChartName)||""},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"sizeChartURLComponent",{get:function(){return n.Utils.getURLComponent(this.sizeChartName)},enumerable:!0,configurable:!0}),c.prototype.hasSizeChart=function(){return!(!this.sizeChartId||!this.sizeChartName)};var i,o,s,a=c;function c(){return null!==s&&s.apply(this,arguments)||this}t.PDPItemModel=a}); 209var __extends=this&&this.__extends||function(){var r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};return function(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}}();define("SuiteCommerce.SizeChart.PDP.View",["require","exports","Backbone","SuiteCommerce.SizeChart.PDP.Item.Model","suite_commerce_size_chart_pdp.tpl","SuiteCommerce.SizeChart.PDP.Configuration","SuiteCommerce.SizeChart.Instrumentation"],function(e,t,i,r,o,a,n){"use strict";
209Object.defineProperty(t,"__esModule",{value:!0});s=i.View,__extends(C,s),C.prototype.setupListeners=function(){var t=this;this.pdp.on("afterOptionSelection",function(){var e=t.model.sizeChartId;t.model.set(t.getItemInfo()),e!==t.model.sizeChartId&&(t.render(),t.logSizeChartUsage())})},C.prototype.getItemInfo=function(){var e=this.pdp.getSelectedMatrixChilds()&&1===this.pdp.getSelectedMatrixChilds().length?this.pdp.getSelectedMatrixChilds()[0]:null;return e&&e[r.ItemFields.sizeChartId]?e:this.pdp.getItemInfo().item},C.prototype.logSizeChartUsage=function(){var e;this.model.sizeChartId&&((e=n["default"].getLog("sizeChartUsageLog")).setParameters({activity:"Size Chart Usage",message:"Size Chart: Id: "+this.model.sizeChartId+" - Name: "+this.model.sizeChartName}),e.submit())},C.prototype.openSizeChartAction=function(e){return e.preventDefault(),this.router.isSearchingSizeCharts||this.router.showSizeChartView(this.model.sizeChartId,!0),this.logClickInSizeChartLink(),!1},C.prototype.logClickInSizeChartLink=function(){var e=n["default"].getLog("clickInSizeChartLinkLog");e.setParameters({activity:"Click in Size Char Link",message:"Size Chart: Id: "+this.model.sizeChartId+" - Name: "+this.model.sizeChartName}),e.submit()},C.prototype.getContext=function(){return{sizeChartId:this.model.sizeChartId,sizeChartName:this.model.sizeChartName,hyperlinkText:a.PDPConfiguration.hyperlinkText,sizeChartPageURL:a.PDPConfiguration.sizeChartPageURL,isAssociatedToSizeChart:this.model.hasSizeChart(),sizeChartUrlComponent:this.model.sizeChartURLComponent}};var s,h=C;function C(e){var t=s.call(this,e)||this;return t.template=o,t.events={'click [data-action="openSizeChart"]':"openSizeChartAction"},t.pdp=e.pdp,t.router=e.router,t.model=new r.PDPItemModel(t.getItemInfo()),t.setupListeners(),t.logSizeChartUsage(),t}t.PDPView=h}); 210define("SuiteCommerce.SizeChart.PDP",["require","exports","SuiteCommerce.SizeChart.PDP.View"],function(e,i,r){"use strict";return{mountToApp:function(e){var i=e.container.getComponent("PDP");i&&this.addViews(i,e.router)},addViews:function(e,i){var t={"Product.Options":{"SizeChart.Link":{childViewConstructor:function(){return new r.PDPView({pdp:e,router:i})}}}};e.addChildViews(e.PDP_FULL_VIEW,t),e.addChildViews(e.PDP_QUICK_VIEW,t)}}}); 211define("SuiteCommerce.SizeChart.Shopping",["require","exports","SuiteCommerce.SizeChart.Common.Configuration","SuiteCommerce.SizeChart.PDP","SuiteCommerce.SizeChart.Chart.Router","SuiteCommerce.SizeChart.Common.InstrumentationHelper"],function(i,t,n,e,o,r){"use strict";return{mountToApp:function(i){var t=i.getComponent("Environment"),t=(this.initializeConfiguration(t),this.initializeInstrumentation(t),new o.ChartRouter({application:i,routes:{}}
211));e.mountToApp({router:t,container:i})},initializeConfiguration:function(i){n.Configuration.environment=i},initializeInstrumentation:function(i){r.InstrumentationHelper.initializeInstrumentation(i)}}}); 212} 213extensions['MHI.StripeCustomization.2.0.0'] = function(){ 214function getExtensionAssetsPath(asset){ 215return 'extensions/MHI/StripeCustomization/2.0.0/' + asset; 216}; 217define("Invoice.Detail.Extension",["Invoice.OpenList.View","Invoice.Details.View","InvoicePayment.View","underscore","jQuery","Utils","Backbone"],function(e,i,t,n,o,a,r){"use strict";n.extend(i.prototype,{initialize:n.wrap(i.prototype.initialize,function(e){e.apply(this,Array.prototype.slice.call(arguments,1));var i=this;this.on("afterViewRender",function(){n.defer(function(){i.renderStripePaymentSection()})})}),renderStripePaymentSection:function(){var e,i=this.model.get("status")&&this.model.get("status").internalid;"open"!==i&&"CustInvc:A"!==i||(0===(i=this.$('[data-view="Invoice.StripePayment"]')).length&&(this.$(".invoice-details-view-body, .invoice-details-content").append('<div data-view="Invoice.StripePayment"></div>'),i=this.$('[data-view="Invoice.StripePayment"]')),0<i.length&&((e=new t({application:this.application,invoice:this.model})).on("invoice:paid",function(){r.history.loadUrl(r.history.fragment)}),e.on("invoice:processing",function(){}),e.render(),i.html(e.$el)))}})}); 218define("InvoicePayment.View",["Backbone","underscore","jQuery","Utils","SC.Configuration","Profile.Model","StripeCustomization.Model","StripeConfig","InvoicePayment.tpl"],function(e,s,a,o,t,r,i,c,n){"use strict";return e.View.extend({template:n,events:{"click #submit-payment":"handleAddCard","click #submit-ach":"handleAddACH",'change input[name="selected-payment-method"]':"handleRadioSelection",'change input[name="payment-type"]':"handlePaymentTypeChange","click #pay-invoice-btn":"handlePayInvoice","click .button-remove":"handleRemoveCard"},initialize:function(e){var t,n=this;this.application=e.application,this.invoice=e.invoice,!1===c.enableStripe?this._stripeDisabled=!0:(t=this.invoice?parseFloat(this.invoice.get("amountremaining")||this.invoice.get("total")||0):0,c.isOverMaxAmount(t)?this._overLimit=!0:(this.StripeModel=new i,this.profile=r.getInstance(),this.paymentMethods=[],this.selectedPaymentMethodId="",this.currentPaymentType="card",this.stripePublishableKey=c.stripePublishableKey,this.domain=window.location.hostname,this.currency=c.getShopperCurrency(),this.stripeCustomerIdField=c.stripeCustomerIdField,this.paymentMethodField=c.paymentMethodField,this.paymentIdField=c.paymentIdField,this.feeField=c.feeField,this.rate=parseFloat(c.rate||"0"),this.stripeCustomerId=s.findWhere(n.profile.get("customfields"),{name:this.stripeCustomerIdField})||{},s.isEmpty(n.stripeCustomerId.value)&&(n.stripeCustomerId.value=sessionStorage.getItem(c.getCustomerCacheKey())),this.loadStripeScript().then(function(){var e=c.primeSubsidiary(n.application);return e&&e.then?e:null}).then(function(){if(n.currency=c.getShopperCurrency(),n.stripePublishableKey=c.stripePublishableKey,s.isEmpty(n.stripeCustomerId.value)&&(n.stripeCustomerId.value=sessionStorage.getItem(c.getCustomerCacheKey())||""),n.stripePublishableKey)try{n.stripeInstance=Stripe(n.stripePublishableKey),window.stripe=n.stripeInstance}catch(e){console.error("[InvoicePayment.View] Stripe init failed:",e&&e.message)}else console.error("[InvoicePayment.View] Publishable key EMPTY (subsidiary="+c.getSubsidiary()+") - check the stripeKeysBySubsidiary config for this subsidiary.");return n.render(),n.getPaymentMethods().then(function(){n.render()},function(){})}).fail(function(e){console.error("[InvoicePayment.View] init error:",e);try{n.render()}catch(t){}})))},loadStripeScript:function(){var e,t=a.Deferred();return"undefined"!=typeof window.Stripe?t.resolve():((e=document.createElement("script")).src="https://js.stripe.com/v3/",e.onload=function(){t.resolve()},e.onerror=function(e){t.reject(e)},document.head.appendChild(e)),t.promise()},setupStripeElements:function(){var n=this;if(n.card){try{n.card.destroy()}catch(t){}n.card=null}n.elements=n.stripeInstance.elements(),n.card=n.elements.create("card",{hidePostalCode:!0,disableLink:!0});var e=this.$(".stripe-card")[0];e&&(e.innerHTML="",n.card.mount(e),n.card.on("change",function(e){var t=n.$("#card-errors")[0];t&&(t.textContent=e.error?e.error.message:"")}
218))},render:function(){var e,t;return this._overLimit?(e=c.getLimitMessage(),this.$el.html(!1===c.limitBannerEnabled?"":'<div class="global-views-message global-views-message-info alert stripe-limit-banner" role="alert"><div>'+s.escape(e)+"</div></div>")):(this.$el.html(this.template(this.getContext())),t=this,s.defer(function(){t.stripeInstance&&(t.setupStripeElements(),t.togglePaymentSections())})),this},getContext:function(){var e=this,t=[],n=[],a=(s.each(e.paymentMethods,function(e){e.card?t.push(e):e.us_bank_account&&n.push(e)}),this.invoice?parseFloat(this.invoice.get("amountremaining")||this.invoice.get("total")||0):0),r=0<this.rate?Math.round(this.rate/100*a):0,i=a+r;return{showPaymentMethods:0<e.paymentMethods.length,cardPaymentMethods:t,achPaymentMethods:n,hasCardPayments:0<t.length,hasACHPayments:0<n.length,enableACH:!0===c.enableACH,invoiceTotal:o.formatCurrency(a),fee:0<r?o.formatCurrency(r):"",feeRate:e.rate,totalWithFee:o.formatCurrency(i),hasFee:0<r,invoiceNumber:e.invoice?e.invoice.get("tranid"):"",isProcessing:e.isProcessing||!1,achCompanyName:function(){try{var e;return c.achCompanyName?c.achCompanyName:(e="undefined"!=typeof SC&&SC.ENVIRONMENT&&SC.ENVIRONMENT.siteSettings||{}).displayname||e.name||"our company"}catch(t){return"our company"}}()}},handlePaymentTypeChange:function(e){this.currentPaymentType=a(e.currentTarget).val(),this.togglePaymentSections()},togglePaymentSections:function(){"card"===this.currentPaymentType?(this.$(".add-card-section").show(),this.$(".add-ach-section").hide(),this.$('[for="payment-type-card"]').addClass("active"),this.$('[for="payment-type-ach"]').removeClass("active")):(this.$(".add-card-section").hide(),this.$(".add-ach-section").show(),this.$('[for="payment-type-card"]').removeClass("active"),this.$('[for="payment-type-ach"]').addClass("active"))},handleRadioSelection:function(e){this.selectedPaymentMethodId=a(e.currentTarget).val();var t=s.findWhere(this.paymentMethods,{id:this.selectedPaymentMethodId});t&&t.us_bank_account?this.$(".ach-checkout-mandate").show():this.$(".ach-checkout-mandate").hide()},handleAddCard:function(){var t=this;t.card&&t.stripeInstance.createToken(t.card).then(function(e){e.error?(console.error("[Stripe:InvoicePayment] createToken error",{message:e.error.message}),t.$("#card-errors").text(e.error.message)):t.StripeModel.fetch({type:"POST",data:{action:"attachCard",customerId:t.stripeCustomerId.value,token:e.token.id,currency:t.currency}}).done(function(){t.getPaymentMethods().then(function(){t.render()}),t.card&&t.card.clear()}).fail(function(){console.error("[Stripe:InvoicePayment] attachCard request failed"),t.$("#card-errors").text(o.translate("Failed to add card. Please try again."))})})},handleAddACH:function(){var e,t,n,a,r=this;!0===c.enableACH&&(e=r.$("#bank-account-holder-name").val(),t=r.$("#bank-routing-number").val(),n=r.$("#bank-account-number").val(),a=r.$("#bank-account-type").val()||"checking",e&&t&&n?r.$("#ach-mandate-checkbox").is(":checked")?r.stripeInstance.createPaymentMethod({type:"us_bank_account",us_bank_account:{routing_number:t,account_number:n,account_holder_type:"individual",account_type:a},billing_details:{name:e,email:r.profile.get("email")}}).then(function(e){e.error?(console.error("[Stripe:InvoicePayment] createPaymentMethod error",{message:e.error.message}),r.$("#ach-errors").text(e.error.message)):r.StripeModel.fetch({type:"POST",data:{action:"attachACH",paymentMethodId:e.paymentMethod.id,customerId:r.stripeCustomerId.value,currency:r.currency}}).done(function(e){e.success&&e.verified?r.getPaymentMethods().then(function(){r.render()}):e.success&&e.requiresVerification?(r.$("#ach-errors").css("color","#007bff"),r.$("#ach-errors").text(e.message||o.translate("Bank account requires verification.")),e.hostedVerificationUrl&&window.open(e.hostedVerificationUrl,"_blank")):(console.error("[Stripe:InvoicePayment] attachACH failed",{error:e&&e.error}),r.$("#ach-errors").text(e.error||o.translate("Failed to add bank account.")))}).fail(function(){console.error("[Stripe:InvoicePayment] attachACH request failed (ajax)"),r.$("#ach-errors").text(o.translate("Failed to add bank account. Please try again."))})}):r.$("#ach-errors").text(o.translate("Please accept the ACH Direct Debit authorization to continue.")):r.$("#ach-errors").text(o.translate("Please fill in all required fields.")))},handleRemoveCard:function(e){var t=this,n=a(e.currentTarget).closest(".payment-method-item").find('input[type="radio"]').val();t.StripeModel.fetch({type:"POST",data:{action:"removePaymentMethod",cardId:n,customerId:t.stripeCustomerId.value,currency:t.currency}}).done(function(){t.getPaymentMethods().then(function(){t.render()})})},handlePayInvoice:function(){var n,e,t,a=this;
218a.selectedPaymentMethodId?a.isProcessing||(a.isProcessing=!0,a.$("#pay-invoice-btn").attr("disabled",!0).text(o.translate("Processing...")),e=parseFloat(a.invoice.get("amountremaining")||a.invoice.get("total")||0),t=0<a.rate?Math.round(a.rate/100*e):0,n=Math.round(e+t),t=(e=a.invoice.get("currency"))&&e.internalid?e.internalid:e,a.StripeModel.fetch({type:"POST",data:{action:"createPaymentIntent",paymentMethodId:a.selectedPaymentMethodId,customerId:a.stripeCustomerId.value,amount:n,currencyId:t,currency:a.currency,returnurl:window.location.href}}).then(function(e){var t=e&&e.paymentIntent&&e.paymentIntent.id||"";if(e&&e.success)if("succeeded"===e.status)a.logPaymentAttempt(t,"success"),a.$("#payment-errors").css("color","#28a745"),a.$("#payment-errors").text(o.translate("Payment successful! Invoice has been paid.")),a.$("#pay-invoice-btn").text(o.translate("Paid")),a.trigger("invoice:paid",e.paymentIntent);else if("processing"===e.status)a.logPaymentAttempt(t,"success"),a.$("#payment-errors").css("color","#007bff"),a.$("#payment-errors").text(o.translate("Payment is processing. ACH payments typically take 3-5 business days to settle.")),a.$("#pay-invoice-btn").text(o.translate("Processing")),a.trigger("invoice:processing",e.paymentIntent);else{if(e.paymentIntent&&"requires_action"===e.paymentIntent.status&&e.paymentIntent.client_secret)return a.handle3DSAuthentication(e.paymentIntent.client_secret,n,t);console.error("[Stripe:InvoicePayment] payment failed - unexpected status",{status:e.status}),a.logPaymentAttempt(t,"fail"),a.$("#payment-errors").text(o.translate("Payment failed. Please try again.")),a.isProcessing=!1,a.$("#pay-invoice-btn").attr("disabled",!1).text(o.translate("Make Payment"))}else console.error("[Stripe:InvoicePayment] createPaymentIntent returned non-success",{error:e&&e.error}),a.logPaymentAttempt(t,"fail"),a.$("#payment-errors").text(e.error||o.translate("Payment failed. Please try again.")),a.isProcessing=!1,a.$("#pay-invoice-btn").attr("disabled",!1).text(o.translate("Make Payment"))}).fail(function(){console.error("[Stripe:InvoicePayment] createPaymentIntent request failed (ajax)"),a.logPaymentAttempt("","fail"),a.$("#payment-errors").text(o.translate("Error processing payment. Please try again.")),a.isProcessing=!1,a.$("#pay-invoice-btn").attr("disabled",!1).text(o.translate("Make Payment"))})):a.$("#payment-errors").text(o.translate("Please select a payment method."))}
218,logPaymentAttempt:function(e,t){try{this.StripeModel.fetch({type:"POST",data:{action:"customRecordOnFailure",paymentIntentId:e||"",customerId:this.profile&&this.profile.get("internalid")||"",status:t,currency:this.currency}})}catch(n){console.error("[Stripe:InvoicePayment] customRecordOnFailure threw",n)}},handle3DSAuthentication:function(e,t,n){var a=this,r=a.stripeInstance||window.stripe;r?r.confirmCardPayment(e).then(function(e){e.error?(console.error("[Stripe:InvoicePayment] confirmCardPayment error",{message:e.error.message}),a.logPaymentAttempt(e.paymentIntent&&e.paymentIntent.id||n,"fail"),a.$("#payment-errors").text(e.error.message||o.translate("Authentication failed.")),a.isProcessing=!1,a.$("#pay-invoice-btn").attr("disabled",!1).text(o.translate("Make Payment"))):(a.logPaymentAttempt(e.paymentIntent&&e.paymentIntent.id,"success"),a.$("#payment-errors").css("color","#28a745"),a.$("#payment-errors").text(o.translate("Payment successful! Invoice has been paid.")),a.$("#pay-invoice-btn").text(o.translate("Paid")),a.trigger("invoice:paid",e.paymentIntent))})["catch"](function(){console.error("[Stripe:InvoicePayment] confirmCardPayment threw"),a.logPaymentAttempt(n,"fail"),a.$("#payment-errors").text(o.translate("Authentication error. Please try again.")),a.isProcessing=!1,a.$("#pay-invoice-btn").attr("disabled",!1).text(o.translate("Make Payment"))}):(console.error("[Stripe:InvoicePayment] handle3DSAuthentication - no Stripe instance available"),a.logPaymentAttempt(n,"fail"),a.$("#payment-errors").text(o.translate("Payment system not ready. Please refresh and try again.")),a.isProcessing=!1,a.$("#pay-invoice-btn").attr("disabled",!1).text(o.translate("Make Payment")))},getPaymentMethods:function(){var t=this,n=a.Deferred();return t.stripeCustomerId&&t.stripeCustomerId.value?t.StripeModel.fetch({type:"GET",data:{action:"getPaymentMethods",stripeCustomerId:t.stripeCustomerId.value,type:"card",currency:t.currency}}).done(function(e){t.paymentMethods=e.data||[],n.resolve(t.paymentMethods)}).fail(function(e){console.error("[Stripe:InvoicePayment] getPaymentMethods request failed",e),n.reject(e)}):n.reject("Stripe Customer ID not available"),n.promise()}})}); 219define("LoginRegister.Extension",["LoginRegister.Login.View","LoginRegister.Register.View","Profile.Model","jQuery","underscore","Utils","SC.Configuration","StripeCustomization.Model","StripeConfig","Loggers","js.cookie","LiveOrder.Model","Backbone"],function(s,e,a,n,t,d,l,c,u,i,r,g,p){"use strict";t.extend(s.prototype,{redirect:function(e,t){var i=d.parseUrlOptions(window.location.search),r=t.touchpoints,o=i.passwdret,n=this,s=n.model.get("user").internalid,a=n.model.get("user").firstname,c=n.model.get("user").lastname;n.checkAndCreateStripeCustomer(s,n.model.get("user").email,a+" "+c).done(function(e){n.trackEvent(function(){var e;o||"checkout"!==i.is&&"checkout"!==i.origin?i.origin&&r[i.origin]?(e=r[i.origin],i.origin_hash&&(e=d.addParamsToUrl(e,{fragment:i.origin_hash})),window.location.href=e):"disabled"!==l.getRegistrationType()&&"T"===SC.ENVIRONMENT.siteSettings.siteloginrequired?window.location.href=r.home:window.location.href=r.customercenter:n.refreshApplication(t)})}).fail(function(e){console.error("[Stripe:LoginRegister] LoginView.redirect - checkAndCreateStripeCustomer failed",e),n.trackEvent(function(){var e;o||"checkout"!==i.is&&"checkout"!==i.origin?i.origin&&r[i.origin]?(e=r[i.origin],i.origin_hash&&(e=d.addParamsToUrl(e,{fragment:i.origin_hash})),window.location.href=e):"disabled"!==l.getRegistrationType()&&"T"===SC.ENVIRONMENT.siteSettings.siteloginrequired?window.location.href=r.home:window.location.href=r.customercenter:n.refreshApplication(t)})})},checkAndCreateStripeCustomer:function(e,t,i){var r,o;return!1===u.enableStripe?n.Deferred().resolve(null).promise():(r=u.currency,o=window.location.hostname,this.StripeModel=new c,this.StripeModel.fetch({data:{email:t,name:i,customerInternalId:e,domain:o,currency:r}}).then(function(e){var t=u.getCustomerCacheKey();return e&&e.stripeCustomerId?(sessionStorage.setItem(t,e.stripeCustomerId),e.stripeCustomerId):e&&e.id?(sessionStorage.setItem(t,e.id),e.id):(sessionStorage.setItem(t,e),e)}).fail(function(e){return console.error("Failed to create Stripe customer:",e),null}))}}),t.extend(e.prototype,{initialize:t.wrap(e.prototype.initialize,function(e){e.apply(this,Array.prototype.slice.call(arguments,1
219)),this.model.off("save",this.redirect,this);var t=this;this.loadStripeScript().then(function(){t.stripe=Stripe(u.stripePublishableKey),t.application&&(t.application.stripe=t.stripe)}).fail(function(e){console.error("Error loading Stripe.js:",e)})}),loadStripeScript:function(){var e,t=n.Deferred();return"undefined"!=typeof window.Stripe?t.resolve():((e=document.createElement("script")).src="https://js.stripe.com/v3/",e.onload=function(){t.resolve()},e.onerror=function(e){t.reject(e)},document.head.appendChild(e)),t.promise()},redirect:function(e,o){var n=this,t=(n.checkAndCreateStripeCustomer=s.prototype.checkAndCreateStripeCustomer.bind(n),n.model.get("user").internalid),i=n.model.get("user").firstname,r=n.model.get("user").lastname;return n.checkAndCreateStripeCustomer(t,n.model.get("user").email,i+" "+r).always(function(e){return n.cancelableTrigger("after:LoginRegister.register").then(function(){var e,t=d.parseUrlOptions(window.location.search),i=o.touchpoints,r=n.application;t.is&&"checkout"===t.is?(e=a.getInstance(),o.user&&e.set(o.user),o.cart&&g.getInstance().set(o.cart),o.address&&e.get("addresses").reset(o.address),o.paymentmethod&&e.get("paymentmethods").reset(o.paymentmethod),n.trackEvent(function(){r.setConfig("currentTouchpoint","checkout"),p.history.navigate("",{trigger:!0})})):n.trackEvent(function(){var e;t.origin&&i[t.origin]?(e=i[t.origin],t.origin_hash&&(e=d.addParamsToUrl(e,{fragment:t.origin_hash})),window.location.href=e):"disabled"!==l.getRegistrationType()&&"T"===SC.ENVIRONMENT.siteSettings.siteloginrequired?window.location.href=i.home:window.location.href=i.customercenter})})}).fail(function(e){console.error("LoginRegister.Extension - Error during Stripe customer creation in register redirect:",e)})}})}); 220define("MHI.StripeCustomization.Checkout",["OrderWizardModule.Extension","LoginRegister.Extension","PaymentIntentCreation.View","StripeConfig"],function(e,t,n,i){"use strict";return{mountToApp:function(e){i.primeSubsidiary(e),e.getComponent("Checkout").addModuleToStep({step_url:"review",module:{id:"PaymentIntentCreation.View",index:5,classname:"PaymentIntentCreation.View"}})}}}); 221define("StripeCustomization.Model",["SCModel","Utils","Backbone","StripeConfig"],function(t,e,s,c){"use strict";return s.Model.extend({url:e.getAbsoluteUrl(getExtensionAssetsPath("Modules/Main/SuiteScript2/StripeCustomization.Service.ss"),!0),sync:function(t,e,i){(i=i||{}).data=i.data||{};try{var a,d,r,n;i.data.secretGuid||(a=c.stripeSecretGuid)&&(i.data.secretGuid=a),i.data.domain||(i.data.domain=window.location.hostname),"undefined"!=typeof i.data.subsidiary&&null!==i.data.subsidiary&&""!==i.data.subsidiary||(d=c.getSubsidiary&&c.getSubsidiary())&&(i.data.subsidiary=d),i.data.currency||(r=c.getShopperCurrency&&c.getShopperCurrency()||c.currency)&&(i.data.currency=r),i.data.entityStripeCustomerId||(n=c.getEntityStripeCustomerId&&c.getEntityStripeCustomerId())&&(i.data.entityStripeCustomerId=n),!i.data.nativeStripeCustomerIdField&&c.nativeStripeCustomerIdField&&(i.data.nativeStripeCustomerIdField=c.nativeStripeCustomerIdField),!i.data.stripeCustomerIdField&&c.stripeCustomerIdField&&(i.data.stripeCustomerIdField=c.stripeCustomerIdField),"undefined"==typeof i.data.scnBlockIntegration&&(i.data.scnBlockIntegration=!0===c.scnBlockIntegration||"true"===c.scnBlockIntegration?"true":"false"),!i.data.invoicePaymentScriptId&&c.invoicePaymentScriptId&&(i.data.invoicePaymentScriptId=c.invoicePaymentScriptId),!i.data.invoicePaymentDeployId&&c.invoicePaymentDeployId&&(i.data.invoicePaymentDeployId=c.invoicePaymentDeployId)}catch(o){}return s.Model.prototype.sync.call(this,t,e,i)}})}); 222define("MHI.StripeCustomization.MyAccount",["GlobalViews.FormatPaymentMethod.View.Ext","OrderHistory.Details.View.Ext","Invoice.Detail.Extension","MyAccountModule.Extension","StripeConfig"],function(t,i,e,n,o){"use strict";return{mountToApp:function(t){o.primeSubsidiary(t)}}}); 223define("StripeConfig",[],function(){"use strict";function u(){return"undefined"!=typeof SC&&SC.CONFIGURATION&&SC.CONFIGURATION.StripeCustomization||{}}function o(){try{var e=require("Profile.Model"),t=e&&e.getInstance&&e.getInstance();return t&&t.get&&t.get("subsidiary")}catch(r){return null}}function n(e){var t=function(){var e=u().stripeKeysBySubsidiary,t=l||o(),r=null==t?"":String(t),n=null;if(e&&e.length&&r)for(var i=0;i<e.length;i++){var a=e[i];if(a&&String(a.subsidiaryId)===r){n=a;break}}return n}();return t?t[e]:null}function i(e){var t=u();if("stripePublishableKey"===e){var r=n("publishableKey");if(r)return r}else if("stripeSecretGuid"===e){r=n("secretGuid");if(r)return r}return t[e]}var a={},l=(["stripePublishableKey","stripeSecretGuid","stripeKeysBySubsidiary","currency","rate","paymentMethodId","invoicePaymentMethodId","paymentModuleName","paymentMethodField","paymentIdField","feeField","
223stripeCustomerIdField","nativeStripeCustomerIdField","transactionCustomerIdField","enableStripe","manualCardCapture","scnBlockIntegration","enableACH","achCompanyName","taxAuthBannerEnabled","taxAuthBannerMessage","taxAuthBufferRate","taxAuthBufferEnabled","stripeMaxAmount","limitBannerEnabled","limitBannerMessage","invoicePaymentScriptId","invoicePaymentDeployId"].forEach(function(e){Object.defineProperty(a,e,{get:function(){return i(e)},enumerable:!0})}),null),s=null,c=null;function d(e,t){try{var r=e&&e.customfields;if(!r||!t)return null;for(var n=0;n<r.length;n++){var i=r[n];if(i&&i.name===t&&i.value)return String(i.value)}}catch(a){}return null}return a.getEntityStripeCustomerId=function(){return c||""},a.setSubsidiary=function(e){null!=e&&""!==String(e)&&(l=String(e))},a.getSubsidiary=function(){var e;return l||(null==(e=o())?"":String(e))},a.primeSubsidiary=function(e){try{var t=e&&e.getComponent&&e.getComponent("UserProfile");if(t&&t.getUserProfile)return t.getUserProfile().then(function(e){e&&null!=e.subsidiary&&""!==String(e.subsidiary)&&a.setSubsidiary(e.subsidiary),e&&null!=e.internalid&&""!==String(e.internalid)&&(s=String(e.internalid));var t=d(e,i("nativeStripeCustomerIdField"))||d(e,i("stripeCustomerIdField"));return t&&(c=t),l})}catch(r){}return null},a.getShopperCurrency=function(){var e;try{"undefined"!=typeof SC&&SC.ENVIRONMENT&&SC.ENVIRONMENT.currentCurrency&&SC.ENVIRONMENT.currentCurrency.code&&(e=SC.ENVIRONMENT.currentCurrency.code,0)}catch(t){}return e||(e=i("currency"),0),e},a.getPaymentModuleName=function(){return i("paymentModuleName")||"Payment Card"},a.getMaxAmount=function(){var e=parseFloat(i("stripeMaxAmount"));return isFinite(e)&&0<e?e:0},a.isOverMaxAmount=function(e){var t=a.getMaxAmount(),r=parseFloat(e);return 0<t&&isFinite(r)&&t<r},a.getLimitMessage=function(){var e=i("limitBannerMessage")||a.getPaymentModuleName()+" is not available for amounts over $(0). Please use another payment method or contact us.";return String(e).replace(/\$\(0\)/g,function(e){try{var t=require("Utils");if(t&&t.formatCurrency)return t.formatCurrency(e)}catch(r){}return String(e)}(a.getMaxAmount()))},a.isAchAvailable=function(){var e;return!0===i("enableACH")&&(e=a.getShopperCurrency(),"USD"===String(e||"").toUpperCase())},a.getCustomerCacheKey=function(){var e="";try{e=window.location.hostname}catch(t){}return"stripeCustomerId:"+e+":"+a.getSubsidiary()+":"+(s||"")},a.clearCustomerCache=function(){try{sessionStorage.removeItem(a.getCustomerCacheKey())}catch(e){}},a}); 224define("StripePaymentLabel",["underscore","jQuery","StripeConfig","StripeCustomization.Model"],function(e,r,a,o){"use strict";var i={},c={};function s(e){return"stripePaymentMethod:"+e}function u(e){var t,n=a.getPaymentModuleName();return e?e.card?n+" - "+(t=e.card.brand||"Card",String(t||"").replace(/\b\w/g,function(e){return e.toUpperCase()}))+" ending in "+e.card.last4:e.us_bank_account?n+" ACH - "+(e.us_bank_account.bank_name||"Bank")+" ending in "+e.us_bank_account.last4:n:n}function d(e){if(!e||!e.id)return"";var t={id:e.id,type:e.type};e.card&&(t.card={brand:e.card.brand,last4:e.card.last4}),e.us_bank_account&&(t.us_bank_account={bank_name:e.us_bank_account.bank_name,last4:e.us_bank_account.last4}),i[e.id]=t;try{sessionStorage.setItem(s(e.id),JSON.stringify(t))}catch(n){}return u(t)}function l(e){if(e){if(i[e])return u(i[e]);try{var t,n=sessionStorage.getItem(s(e));if(n)return t=JSON.parse(n),u(i[e]=t)}catch(r){}}return""}return{format:u,remember:d,recall:l,resolve:function(t){var e,n=r.Deferred();return t?(e=l(t))?(n.resolve(e),n.promise()):(c[t]||((new o).fetch({type:"GET",data:{action:"getPaymentMethodDetails",paymentMethodId:t,customerInternalId:function(){try{var e=require("Profile.Model"),t=e&&e.getInstance&&e.getInstance(),n=t&&t.get&&t.get("internalid");return null==n?"":String(n)}catch(r){return""}}()}}).done(function(e){e&&e.success&&e.paymentMethod?n.resolve(d(e.paymentMethod)):(console.error("[Stripe:Label] getPaymentMethodDetails returned no details for "+t+":",e&&e.error||e),n.resolve(""))}).fail(function(e){console.error("[Stripe:Label] getPaymentMethodDetails FAILED:",e),n.resolve("")}).always(function(){delete c[t]}),c[t]=n.promise()),c[t]):(n.resolve(""),n.promise())}}}); 225define("GlobalViews.FormatPaymentMethod.View.Ext",["GlobalViews.FormatPaymentMethod.View","underscore"],function(e,t){"use strict";t.extend(e.prototype,{getContext:t.wrap(e.prototype.getContext,function(e){return"invoice"==this.model.get("type")&&this.model.get("paymentterms")&&"Stripe"==this.model.get("paymentterms").name&&(this.model.set("type","internal"),this.model.set("name","Stripe")),e.apply(this,t.toArray(arguments).slice(1))})})}); 226define("OrderHistory.Details.View.Ext",["underscore","StripeConfig","StripePaymentLabel"],function(n,o,l){"use strict";var e;try{e=require("OrderHistory.Details.View")}catch(t){return{}}return e&&e.prototype&&n.extend(e.prototype,{render:n.wrap(e.prototype.render,function(e){var t,a=this,r=e.apply(this,n.toArray(arguments).slice(1)),i=this.model&&this.model.get&&this.model.get("options"),i=i&&o.paymentMethodField?i[o.paymentMethodField]:"";return i&&(t=l.recall(i),a.applyStripePaymentLabel(t||o.getPaymentModuleName()),t||l.resolve(i).done(function(e){a.applyStripePaymentLabel(e)}
226)),r}),applyStripePaymentLabel:function(e){var t,a;e&&(this.paymentmethod&&this.paymentmethod.set&&this.paymentmethod.set("name",e,{silent:!0}),(t=this.$('[data-view="FormatPaymentMethod"]')).length)&&((a=t.find(".global-views-format-payment-method-name")).length?a.text(e):t.html('<div class="global-views-format-payment-method"><p class="global-views-format-payment-method-name">'+n.escape(e)+"</p></div>"))}}),{}}); 227define("OrderWizard.Module.Stripe",["OrderWizard.Module.PaymentMethod","underscore","Utils","OrderWizard.Module.Stripe.tpl","Transaction.Paymentmethod.Model","SC.Configuration","Profile.Model","StripeCustomization.Model","StripeConfig","StripePaymentLabel","StripeUpdateCardModal.View","Backbone","jQuery"],function(n,s,i,e,a,t,o,d,c,l,u,m,p){"use strict";return n.extend({template:e,className:"PaymentWizard.Module.PaymentMethod.Stripe",initialize:function(t){n.prototype.initialize.apply(this,arguments);var r=this;this.StripeModel=new d,this.stripe=t.paymentmodule.stripe,this.profile=o.getInstance(),this.stripeCustomerIdField=c.stripeCustomerIdField,this.paymentMethodField=c.paymentMethodField,this.stripePublishableKey=c.stripePublishableKey,this.currency=c.getShopperCurrency(),this.domain=window.location.hostname,this.stripeCustomerIdSessionKey=c.getCustomerCacheKey(),this.stripeCustomerId={value:sessionStorage.getItem(this.stripeCustomerIdSessionKey)||""},this.currentPaymentType="card",this.loadStripeScript().then(function(){var e=r.wizard&&r.wizard.application||t&&t.application,e=c.primeSubsidiary(e);return e&&e.then?e:null}).then(function(){if(r.currency=c.getShopperCurrency(),r.stripePublishableKey=c.stripePublishableKey,r.stripeCustomerIdSessionKey=c.getCustomerCacheKey(),r.stripeCustomerId.value||(r.stripeCustomerId.value=sessionStorage.getItem(r.stripeCustomerIdSessionKey)||""),r.stripePublishableKey)return r.stripeInstance=Stripe(r.stripePublishableKey),window.stripe=r.stripeInstance,r.wizard&&r.wizard.application&&(r.wizard.application.stripe=r.stripeInstance),r.stripeCustomerId.value?r.getPaymentMethods():r.lookupStripeCustomerByDomain().then(function(){return r.getPaymentMethods()});console.error("[OrderWizard.Module.Stripe] Publishable key EMPTY after subsidiary prime (subsidiary="+c.getSubsidiary()+"). Check the stripeKeysBySubsidiary config for this subsidiary.")}).then(function(){r.render()}).fail(function(e){r.stripeCustomerId&&r.stripeCustomerId.value&&console.error("[Stripe:OrderWizard] initialize failed:",e)}),this.on("afterViewRender",function(){s.defer(function(){r.stripeInstance&&(r.setupStripeElements(),r.togglePaymentSections())})})},setupStripeElements:function(){var e=this;if(e.card){try{var t=document.querySelector(".stripe-card");t&&0<t.children.length&&e.card.unmount(),e.card.destroy()}catch(r){}e.card=null}e.elements=e.stripeInstance.elements(),e.card=e.elements.create("card",{hidePostalCode:!0,disableLink:!0});t=document.querySelector(".stripe-card");t&&(t.innerHTML="",e.card.mount(t),e.card.on("change",function(e){var t=document.getElementById("card-errors");t&&(t.textContent=e.error?e.error.message:"")}))},loadStripeScript:function(){var e,t=p.Deferred();return"undefined"!=typeof window.Stripe?t.resolve():((e=document.createElement("script")).src="https://js.stripe.com/v3/",e.onload=function(){t.resolve()},e.onerror=function(e){t.reject(e)},document.head.appendChild(e)),t.promise()},lookupStripeCustomerByDomain:function(){var t=this,r=p.Deferred(),e=t.profile.get("internalid");return e?t.StripeModel.fetch({type:"GET",data:{action:"lookupStripeCustomer",customerInternalId:e,domain:t.domain,currency:t.currency}}).done(function(e){e&&e.found&&e.stripeCustomerId&&(t.stripeCustomerId.value=e.stripeCustomerId,sessionStorage.setItem(t.stripeCustomerIdSessionKey,e.stripeCustomerId)),r.resolve()}).fail(function(e){console.error("[OrderWizard.Module.Stripe] lookupStripeCustomer FAILED:",e),r.resolve()}):r.resolve(),r.promise()},events:{"click #submit-payment":"handleAddCard","click #submit-ach":"handleAddACH","click .button-update":"handleUpdateCard","click .button-remove":"handleRemoveCard",'change input[name="selected-payment-method"]':"handleRadioSelection",'change input[name="payment-type"]':"handlePaymentTypeChange","click #check-status":"handleCheckVerificationStatus","click #verify-descriptor-btn":"handleVerifyDescriptorCode","click #verify-amounts-btn":"handleVerifyAmounts"},handlePaymentTypeChange:function(e){this.currentPaymentType=p(e.currentTarget).val(),this.togglePaymentSections()},togglePaymentSections:function(){"card"===this.currentPaymentType?(p(".add-card-section").show(),p(".add-ach-section").hide(),p('[for="payment-type-card"]').addClass("active"),p('[for="payment-type-ach"]').removeClass("active")):"ach"===this.currentPaymentType&&(p(".add-card-section").hide(),p(".add-ach-section").show(),p('[for="payment-type-card"]').removeClass("active"),p('[for="payment-type-ach"]').addClass("active"))},handleRadioSelection:function(e){this.wizard.model.trigger("updatePrice"),this.selectedPaymentMethodId=p(e.currentTarget).val();var t=s.findWhere(this.paymentMethods,{id:this.selectedPaymentMethodId});t&&t.us_bank_account?p(".ach-checkout-mandate").show():p(".ach-checkout-mandate").hide()},handleAddCard:function(){var t=this;t.card?t.stripeInstance.createToken(t.card).then(function(e){e.error?(console.error("[OrderWizard.Module.Stripe] createToken error:",e.error.message),document.getElementById("card-errors").textContent=e.error.message):t.saveCardToken(e.token.id)}):console.error("[OrderWizard.Module.Stripe] Stripe Card Elements not initialized")},handleAddACH:function(){var e,t,r,n,a=this;c.isAchAvailable()&&(e=p("#bank-account-holder-name").val(),t=p("#bank-routing-number").val(),r=p("#bank-account-number").val(),n=p("#bank-account-type").val()||"checking",e&&t&&r?p("#ach-mandate-checkbox").is(":checked")?a.stripeInstance.createPaymentMethod({type:"us_bank_account",us_bank_account:{routing_number:t,account_number:r,account_holder_type:"individual",account_type:n},billing_details:{name:e,email:a.profile.get("email")}}).then(function(e){e.error?document.getElementById("ach-errors").textContent=e.error.message:a.attachACHPaymentMethod(e.paymentMethod.id)}):document.getElementById("ach-errors").textContent=i.translate("Please accept the ACH Direct Debit authorization to continue."):document.getElementById("ach-errors").textContent=i.translate("Please fill in all required fields."))},attachACHPaymentMethod:function(e){var t=this;t.StripeModel.fetch({type:"POST",data:{action:"attachACH",paymentMethodId:e,customerId:t.stripeCustomerId.value,currency:t.currency}}).done(function(e){e.success?e.verified?(t.getPaymentMethods().then(function(){t.render(),t.togglePaymentSections()}),alert(e.message)):e.requiresVerification&&t.showVerificationSection(e):(console.error("[OrderWizard.Module.Stripe] ACH attach failed:",e),document.getElementById("ach-errors").textContent=e.error||i.translate("Failed to add bank account."))}).fail(function(e){console.error("[OrderWizard.Module.Stripe] attachACH request FAILED:",e),document.getElementById("ach-errors").textContent=i.translate("Failed to add bank account. Please try again.")})},showVerificationSection:function(e){p(".add-ach-section").hide(),p(".ach-verification-section").show(),p(".verification-message").text(e.message),"microdeposits"===e.verificationMethod?(p(".microdeposit-verification").show(),p(".descriptor-verification").hide()):"descriptor_code"===e.verificationMethod&&(p(".descriptor-verification").show(),p(".microdeposit-verification").hide()),this.pendingSetupIntentId=e.setupIntentId},handleVerifyAmounts:function(){var t=this,e=p("#deposit-amount-1").val(),r=p("#deposit-amount-2").val();e&&r?t.StripeModel.fetch({type:"POST",data:{action:"verifyMicrodeposits",setupIntentId:t.pendingSetupIntentId,amounts:[100*parseFloat(e),100*parseFloat(r)],currency:t.currency}}).done(function(e){e.success?(t.getPaymentMethods().then(function(){t.render(),p(".ach-verification-section").hide(),p(".add-ach-section").show()}),alert(i.translate("Bank account verified successfully!"))):document.getElementById("verification-errors").textContent=e.error||i.translate("Verification failed. Please check the amounts and try again.")}).fail(function(e){console.error("[Stripe:OrderWizard] verifyMicrodeposits failed",e),document.getElementById("verification-errors").textContent=i.translate("Verification failed. Please try again.")}):document.getElementById("verification-errors").textContent=i.translate("Please enter both deposit amounts.")},handleVerifyDescriptorCode:function(){var n=this,e=p("#descriptor-code").val();e&&6===e.length?n.pendingSetupIntentId?n.StripeModel.fetch({type:"POST",data:{action:"verifyDescriptorCode",setupIntentId:n.pendingSetupIntentId,code:e,currency:n.currency}}).done(function(e){if(e&&e.success)n.getPaymentMethods().then(function(){n.render(),p(".ach-verification-section").hide(),p(".add-ach-section").show()}),alert(i.translate("Bank account verified successfully!"));else{console.error("[OrderWizard.Module.Stripe] Verification FAILED:",e);var t=e&&e.error||i.translate("Verification failed. Please check the code and try again.");
227if(e&&e.details)try{t+=" ("+("string"==typeof e.details?e.details:JSON.stringify(e.details))+")"}catch(r){}document.getElementById("verification-errors").textContent=t}}).fail(function(e){console.error("[OrderWizard.Module.Stripe] verifyDescriptorCode REQUEST FAILED:",e),document.getElementById("verification-errors").textContent=i.translate("Verification failed. Please try again.")}):(console.error("[OrderWizard.Module.Stripe] No pendingSetupIntentId â cannot verify"),document.getElementById("verification-errors").textContent=i.translate("Verification session expired. Please add the bank account again.")):document.getElementById("verification-errors").textContent=i.translate("Please enter a valid 6-digit code.")},handleCheckVerificationStatus:function(){var t=this;t.pendingSetupIntentId&&t.StripeModel.fetch({type:"POST",data:{action:"checkVerificationStatus",setupIntentId:t.pendingSetupIntentId,currency:t.currency}}).done(function(e){e.isVerified?(t.getPaymentMethods().then(function(){t.render(),p(".ach-verification-section").hide(),p(".add-ach-section").show()}),alert(i.translate("Bank account verified successfully!"))):alert(i.translate("Bank account is still pending verification. Please try again later."))}).fail(function(e){console.error("[Stripe:OrderWizard] checkVerificationStatus failed",e),document.getElementById("verification-errors").textContent=i.translate("Failed to check verification status.")})},handleUpdateCard:function(e){var t=p(e.currentTarget).closest(".payment-method-card, .payment-method-ach").find('input[type="radio"]').val();this.updateCard(t)},handleRemoveCard:function(e){var t=p(e.currentTarget).closest(".payment-method-card, .payment-method-ach").find('input[type="radio"]').val();this.removeCard(t)},updateCard:function(e){var t,r=this,n=s.findWhere(this.paymentMethods,{id:e});n&&(t=new u({cardId:e,cardBrand:n.card?n.card.brand:n.us_bank_account.bank_name,cardLast4:(n.card||n.us_bank_account).last4,stripeInstance:r.stripeInstance,onClose:function(){r.getPaymentMethods().then(function(){r.render()})}}),this.wizard.application.getLayout().showInModal(t),t.on("updateCard",function(e){n.card&&r.updateCardExpiration(e.cardId,e.expMonth,e.expYear)}))},updateCardExpiration:function(e,t,r){var n=this;n.StripeModel.fetch({type:"POST",data:{action:"updateCard",customerId:n.stripeCustomerId.value,cardId:e,expMonth:t,expYear:r,currency:n.currency}}).done(function(e){$(".global-views-modal-content-header-close").trigger("click"),n.getPaymentMethods()}).fail(function(e){console.error("[Stripe:OrderWizard] updateCard failed",e),$("#in-modal-card-errors").text(i.translate("Failed to update card, Please try after sometime."))})},removeCard:function(e){var t=this;t.StripeModel.fetch({type:"POST",data:{action:"removePaymentMethod",cardId:e,customerId:t.stripeCustomerId.value,currency:t.currency}}).done(function(e){t.getPaymentMethods()}).fail(function(e){console.error("Failed to remove payment method:",e)})},ensureStripeCustomer:function(){var e,t,r,n=this,a=p.Deferred();return n.stripeCustomerId&&n.stripeCustomerId.value?a.resolve(n.stripeCustomerId.value):(e=n.profile.get("internalid"))?(t=n.profile.get("email")||"",r=((n.profile.get("firstname")||"")+" "+(n.profile.get("lastname")||"")).trim()||n.profile.get("companyname")||t,n.StripeModel.fetch({type:"GET",data:{action:"createStripeCustomer",customerInternalId:e,domain:n.domain,email:t,name:r,currency:n.currency}}).done(function(e){if(e&&e.success&&e.stripeCustomerId){n.stripeCustomerId.value=e.stripeCustomerId;try{sessionStorage.setItem(n.stripeCustomerIdSessionKey,e.stripeCustomerId)}catch(t){}a.resolve(e.stripeCustomerId)}else console.error("[OrderWizard.Module.Stripe] ensureStripeCustomer FAILED response:",e),a.resolve(null)}).fail(function(e){console.error("[OrderWizard.Module.Stripe] ensureStripeCustomer FAILED:",e),a.resolve(null)})):(console.error("[OrderWizard.Module.Stripe] ensureStripeCustomer: no customerInternalId on profile"),a.resolve(null)),a.promise()},saveCardToken:function(t){var r=this;r.ensureStripeCustomer().done(function(e){e?r.StripeModel.fetch({type:"POST",data:{action:"attachCard",customerId:e,token:t,currency:r.currency}}).done(function(e){e&&e.error?(console.error("[OrderWizard.Module.Stripe] attachCard backend error:",e),document.getElementById("card-errors").textContent=e.error||i.translate("Failed to add card. Please try again.")):(r.getPaymentMethods(),r.card&&r.card.clear(),document.getElementById("card-errors").textContent="")}).fail(function(e){console.error("[OrderWizard.Module.Stripe] attachCard request failed:",e),document.getElementById("card-errors").textContent=i.translate("Failed to add card. Please try again.")}):document.getElementById("card-errors").textContent=i.translate("C
227ould not initialize Stripe customer. Please try again.")})},saveACHPaymentMethod:function(t){var r=this;r.ensureStripeCustomer().done(function(e){e?r._attachACH(e,t):document.getElementById("ach-errors").textContent=i.translate("Could not initialize Stripe customer. Please try again.")})},_attachACH:function(e,t){var r=this;r.StripeModel.fetch({type:"POST",data:{action:"attachACH",customerId:e,paymentMethodId:t,currency:r.currency}}).done(function(e){e.verified?(document.getElementById("ach-errors").style.color="#28a745",document.getElementById("ach-errors").textContent=e.message,r.getPaymentMethods()):e.requiresVerification&&e.hostedVerificationUrl?(document.getElementById("ach-errors").style.color="#007bff",document.getElementById("ach-errors").innerHTML=e.message+'<br><button id="open-verification" class="btn btn-primary" style="margin-top: 10px;">'+i.translate("Open Verification Page")+'</button><div id="verification-status" style="margin-top: 10px; display: none;"><p>'+i.translate("Verification page opened. Waiting for completion...")+'</p><button id="check-status" class="btn btn-secondary"> '+i.translate("Check Status")+"</button></div>",r.pendingVerification={setupIntentId:e.setupIntentId,paymentMethodId:e.paymentMethodId,hostedVerificationUrl:e.hostedVerificationUrl}):e.requiresVerification?r.showManualVerificationInputs(e,t):(document.getElementById("ach-errors").style.color="#28a745",document.getElementById("ach-errors").textContent=e.message||i.translate("Bank account added successfully."),r.getPaymentMethods()),p("#bank-account-holder-name").val(""),p("#bank-routing-number").val(""),p("#bank-account-number").val(""),p("#bank-account-type").val("checking")}).fail(function(e){console.error("[Stripe:OrderWizard] attachACH failed",e),document.getElementById("ach-errors").style.color="#dc3545",document.getElementById("ach-errors").textContent=i.translate("Failed to add bank account. Please try again.")})},showManualVerificationInputs:function(e,t){var r;document.getElementById("ach-errors").style.color="#ffc107",e.nextAction&&e.nextAction.verify_with_microdeposits&&"descriptor_code"===e.nextAction.verify_with_microdeposits.microdeposit_type?(r=new Date(1e3*e.nextAction.verify_with_microdeposits.arrival_date),document.getElementById("ach-errors").innerHTML="Bank account added. Look for a $0.01 deposit with a 6-digit code starting with SM by "+r.toLocaleDateString()+".<br><small>Enter the code below when you see it.</small>",this.showDescriptorCodeInput(t)):(document.getElementById("ach-errors").innerHTML=e.message+"<br><small>Enter both deposit amounts when you see them.</small>",this.showAmountVerificationInput(t))},handleOpenVerification:function(){var e,t,r=this;r.pendingVerification&&r.pendingVerification.hostedVerificationUrl?(e=window.open(r.pendingVerification.hostedVerificationUrl,"stripe_verification","width=600,height=700,scrollbars=yes,resizable=yes"),p("#verification-status").show(),p("#open-verification").hide(),t=setInterval(function(){e.closed&&(clearInterval(t),r.pendingVerification=null,document.getElementById("ach-errors").style.color="#dc3545",document.getElementById("ach-errors").textContent=i.translate("Bank account verification failed. Please try again."),p("#verification-status").hide(),p("#open-verification").show())},1e3)):console.error("No verification URL available")},getPaymentMethods:function(){var r=this,n=p.Deferred();return r.stripeCustomerId&&r.stripeCustomerId.value?p.when(r.getCardPaymentMethods(),r.getACHPaymentMethods()).then(function(e,t){r.paymentMethods=(e||[]).concat(t||[]),n.resolve(r.paymentMethods),r.$el&&0<r.$el.length&&r.render()}).fail(function(e){console.error("Failed to retrieve payment methods:",e),n.reject(e)}):n.reject(i.translate("Stripe Customer ID not available")),n.promise()},getCardPaymentMethods:function(){var t=p.Deferred();return this.StripeModel.fetch({type:"GET",data:{action:"getPaymentMethods",stripeCustomerId:this.stripeCustomerId.value,type:"card",currency:this.currency}}).done(function(e){e.error?t.reject(e.error):t.resolve(e.data||[])}).fail(function(e){t.reject(e)}),t.promise()},getACHPaymentMethods:function(){var t=p.Deferred();
227return c.isAchAvailable()?this.StripeModel.fetch({type:"GET",data:{action:"getPaymentMethods",stripeCustomerId:this.stripeCustomerId.value,type:"us_bank_account",currency:this.currency}}).done(function(e){e.error?t.resolve([]):t.resolve(e.data||[])}).fail(function(){t.resolve([])}):t.resolve([]),t.promise()},render:function(){var e=n.prototype.render.apply(this,arguments);return this.togglePaymentSections(),e},setPaymentMethod:function(){var e=this,t=s.findWhere(e.paymentMethods||[],{id:e.selectedPaymentMethodId}),t=l.remember(t)||l.format(t),r=(this.paymentMethod=new a({type:"external_checkout_"+e.options.external.key,isexternal:"T",internalid:e.options.external.internalid,merchantid:e.options.external.merchantid,key:e.options.external.key,name:t,primary:!1}),e.options.wizard.model.get("paymentmethods"));r&&s.isFunction(r.reset)?r.reset([e.paymentMethod],{silent:!0}):e.options.wizard.model.set("paymentmethods",new m.Collection([e.paymentMethod]),{silent:!0}),e._stripePaymentDisplayName=t,e.injectStripePaymentLabel(t)},injectStripePaymentLabel:function(e){var r=0,n='<div class="global-views-format-payment-method"><p class="global-views-format-payment-method-name">'+s.escape(e)+"</p></div>",a=setInterval(function(){r++;var e=p('.order-wizard-showpayments-module-payment-methods-summary [data-view="PaymentMethods.Collection"]'),t=p(".order-wizard-showpayments-module-payment-methods-summary");e.length&&""===p.trim(e.text())?(e.html(n),clearInterval(a)):t.length&&""===p.trim(t.text())?(t.html(n),clearInterval(a)):30<=r&&clearInterval(a)},150)},submit:function(){if(!this.selectedPaymentMethodId)return p("html, body").animate({scrollTop:0},"slow"),p.Deferred().reject({errorCode:"ERR_NO_PAYMENT_METHOD_SELECTED",errorMessage:"Please select a payment method before proceeding."});this.model.get("options")[this.paymentMethodField]=this.selectedPaymentMethodId,this.setPaymentMethod(),n.prototype.submit.apply(this)},isValid:function(){return p.Deferred().resolve()},getContext:function(){var r,n=this,a=!1,i=(this.selectedPaymentMethodId="",[]),o=[];return n.paymentMethods&&0<n.paymentMethods.length&&(r=this.model.get("options")[this.paymentMethodField],s.each(n.paymentMethods,function(e){var t=e.id===r;(e.selected=t)&&!a&&(a=!0,n.selectedPaymentMethodId=r),e.card?i.push(e):e.us_bank_account&&o.push(e)})),{showPaymentMethods:!!this.paymentMethods&&0<this.paymentMethods.length,paymentMethods:this.paymentMethods||[],cardPaymentMethods:i,achPaymentMethods:o,hasCardPayments:0<i.length,hasACHPayments:0<o.length,enableACH:c.isAchAvailable(),achCompanyName:function(){try{var e;return c.achCompanyName?c.achCompanyName:(e="undefined"!=typeof SC&&SC.ENVIRONMENT&&SC.ENVIRONMENT.siteSettings||{}).displayname||e.name||"our company"}catch(t){return"our company"}}()}}})}); 228define("OrderWizardModule.Extension",["OrderWizard.Module.PaymentMethod.Selector","OrderWizard.Module.PaymentMethod.Creditcard","OrderWizard.Module.ShowPayments","OrderWizard.Module.CartSummary","OrderWizard.Module.Stripe","StripeCustomization.Model","SC.Configuration","LiveOrder.Model","Profile.Model","jQuery","underscore","Utils","OrderWizard.Module.PaymentMethod.Invoice","StripeConfig","StripePaymentLabel","Backbone"],function(e,t,r,i,d,s,l,a,p,c,m,u,o,y,n,f){"use strict";function h(e){return e.paymentMethod&&"function"==typeof e.paymentMethod.get}t&&t.prototype&&((g=t.prototype).setSecurityNumber&&(g.setSecurityNumber=m.wrap(g.setSecurityNumber,function(e){if(h(this))return e.apply(this,Array.prototype.slice.call(arguments,1))})),g.setCreditCard&&(g.setCreditCard=m.wrap(g.setCreditCard,function(e){if(h(this))return e.apply(this,Array.prototype.slice.call(arguments,1))})),g.submit)&&(g.submit=m.wrap(g.submit,function(e){return h(this)?e.apply(this,Array.prototype.slice.call(arguments,1)):c.Deferred().resolve()}));var g,w="",v=!1;function b(e){var t=e.get("paymentmethods");t&&m.isArray(t)&&e.set("paymentmethods",new f.Collection(t),{silent:!0})}function C(e){var t,r;return e&&("function"!=typeof e.get&&m.isObject(e)?(t=new f.Model(e),e.item&&m.isObject(e.item)&&"function"!=typeof e.item.get&&t.set("item",new f.Model(e.item),{silent:!0}),e.options&&m.isArray(e.options)&&(r=e.options.map(function(e){return(!e||"function"!=typeof e.get)&&m.isObject(e)?new f.Model(e):e}),t.set("options",new f.Collection(r),{silent:!0})),t):e)}function z(e){return e&&("function"!=typeof e.get&&m.isObject(e)?new f.Model(e):e)}function M(e){var r,t=e.get("confirmation");t&&("function"!=typeof(r=t).get&&m.isObject(t)&&(r=new f.Model(t),e.set("confirmation",r,{silent:!0})),r)&&"function"==typeof r.get&&(m.isArray(r.get("lines"))&&(t=new f.Collection(r.get("lines").map(C)),r.set("lines",t,{silent:!0})),["paymentmethods","addresses"].forEach(function(e){var t=r.get(e);t&&m.isArray(t)&&(t=t.map(z),r.set(e,new f.Collection(t),{silent:!0}))}))}function S(e,t){var r;return e?"function"==typeof e.get?(r=e.get(t),m.isFinite(Number(r))?Number(r):0):m.isFinite(Number(e[t]))?Number(e[t]):0:0}function F(){return'<div class="global-views-message global-views-message-info alert stripe-limit-banner" role="alert"><div>'+m.escape(y.getLimitMessage())+"</div></div>"}function O(){c('.wizard-content [data-action="submit-step"]').attr("disabled",!0).addClass("disabled")}function I(e,t){var r=e.$(t);return r.length?r:c(t)}m.extend(e.prototype,{initialize:m.wrap(e.prototype.initialize,function(e){e.apply(this,Array.prototype.slice.call(arguments,1
228));var a=this,t=(b(this.model),l.get("siteSettings.paymentmethods",[])),r=y.paymentMethodId,i=y.getPaymentModuleName(),o=parseFloat(y.rate),o=(this.rate=m.isFinite(o)?o:0,m.find(t,{internalid:r})),t=0,r=0,n=(a.profile=p.getInstance(),a.wizard.model.get("summary")&&(y.feeField,r=t=0==(t=S(a.wizard.model.get("summary"),"total"))&&(s=a.wizard.model.get("confirmation"))&&s.get("summary")?S(s.get("summary"),"total"):t,s=Math.round(a.rate/100*t*100)/100,s=parseFloat(t)+parseFloat(s)),s&&(t=s),y.isOverMaxAmount(r)),s=(a.stripeOverLimit=n,a.on("afterViewRender",function(){m.defer(function(){t=n,(e=a).$(".stripe-limit-banner").remove(),t&&!1!==y.limitBannerEnabled&&e.$el.prepend(F()),(t=a).$(".order-wizard-paymentmethod-selector-module-header").remove(),1<(r=I(t,".order-wizard-paymentmethod-selector-module-button")).length||(i=(i=I(t,".order-wizard-paymentmethod-selector-module-header-nav")).length?i:r.first().parent()).hide();var e,t,r=a.profile&&a.profile.get("paymentterms"),i=!(!r||"24"!==String(r.internalid));!n||!i&&a.selectedModule||O()})}),a.profile.get("availablecredit")),t=0,t=s&&m.isFinite(Number(s.totalCredit))?Number(s.totalCredit):(Number(a.profile.get("creditlimit"))||0)-(Number(a.profile.get("consolbalance"))||0);a.wizard.model.set("totalcredit",t),this.modules&&(this.modules=m.reject(this.modules,function(e){return"creditcard"===e.type}),!1!==y.enableStripe)&&!n&&(r={classModule:d,name:u.translate(i),type:"stripe",options:{paymentmodule:a,external:o}},this.modules.push(r),r.instance=new r.classModule(m.extend({wizard:a.wizard,step:a.step,stepGroup:a.stepGroup},r.options)),r.instance.on("ready",function(e){a.moduleReady(e)}),a.selectPaymentMethod(null,!0)),this.on("afterViewRender",function(){v=!0,a.wizard.model.trigger("updatePrice",a.profile?a.profile.get("availablecredit"):null),m.defer(function(){var e,t=y.paymentMethodField,r=y.paymentIdField,i=y.feeField;a.wizard.model.get("options")[t]&&!a.stripeSelected?(a.stripeSelected=!0,$('.order-wizard-paymentmethod-selector-module-button[value="stripe"]').click()):((e=a.wizard.model.get("options"))[t]="",e[r]="",e[i]="")})})}),render:m.wrap(e.prototype.render,function(e){b(this.model);try{return e.apply(this,Array.prototype.slice.call(arguments,1))}catch(i){console.error("[Stripe:OWExt] Selector.render FAILED - falling back to a message so the step is not blank:",i),t=!!(e=this).stripeOverLimit,r=t?F():'<div class="global-views-message global-views-message-warning alert" role="alert"><div>'+m.escape(u.translate("No payment method is available for this order. Please contact us to complete your purchase."))+"</div></div>",e.$el.html(r),O()}var t,r}),getAvailableCredit:function(){return(Number(this.profile.get("creditlimit"))||0)-(Number(this.profile.get("consolbalance"))||0)||0},selectPaymentMethod:function(e,t){var r,i=t?"stripe":e.target.getAttribute("value")||c(e.target).val();w=i,this.wizard.model.trigger("updatePrice",this.profile?this.profile.get("availablecredit"):null),i&&("stripe"!==i&&((r=this.wizard.model.get("options"))[y.paymentMethodField]="",r[y.paymentIdField]="",r[y.feeField]=""),this.setModuleByType(i))}}),m.extend(o.prototype,{getContext:m.wrap(o.prototype.getContext,function(e){var t=e.apply(this,m.toArray(arguments).slice(1));return t.balanceAvailable=u.formatCurrency(this.wizard.model.get("totalcredit")||0),t}),isActive:m.wrap(o.prototype.isActive,function(e){var t=e.apply(this,m.toArray(arguments).slice(1));if(!t)try{var r=p.getInstance(),i=r&&r.get("paymentterms");if(!(!i||!i.internalid&&!i.id))return!0}catch(a){}return t})}),m.extend(r.prototype,{initialize:m.wrap(r.prototype.initialize,function(e){e.apply(this,Array.prototype.slice.call(arguments,1));var i=this;this.on("afterViewRender",function(){m.defer(function(){var e,t,r=i.model.get("options")[y.paymentMethodField];m.isEmpty(r)||((e=function(e){var t,r,i=c(".order-wizard-showpayments-module-payment-methods-summary");i.length&&e&&(t='<div class="global-views-format-payment-method stripe-payment-label"><p class="global-views-format-payment-method-name">'+m.escape(e)+"</p></div>",i.find(".stripe-payment-label").remove(),(r=i.find('[data-view="PaymentMethods.Collection"]')).length?r.html(t):i.append(t))})((t=n.recall(r))||y.getPaymentModuleName()),t)||n.resolve(r).done(e)})})}),getContext:m.wrap(r.prototype.getContext,function(e){b(this.model);var t=e.apply(this,m.toArray(arguments).slice(1));return m.isEmpty(this.model.get("options")[y.paymentMethodField])||(t.isExternalPaymentSelected=!0),t}),getPaymentmethods:m.wrap(r.prototype.getPaymentmethods,function(e){return b(this.model),e.a
228pply(this,m.toArray(arguments).slice(1))}),getGiftCertificates:m.wrap(r.prototype.getGiftCertificates,function(e){return b(this.model),e.apply(this,m.toArray(arguments).slice(1))})}),i.prototype._isReadFromConfirmation&&(i.prototype._isReadFromConfirmation=m.wrap(i.prototype._isReadFromConfirmation,function(e){return M(this.wizard.model),e.apply(this,Array.prototype.slice.call(arguments,1))})),m.extend(i.prototype,{initialize:m.wrap(i.prototype.initialize,function(e){e.apply(this,Array.prototype.slice.call(arguments,1));var t=this;this.wizard.model.on("updatePrice",function(e){t.availableCredit=e,t.render()})}),getContext:m.wrap(i.prototype.getContext,function(e){M(this.wizard.model);var n,s,t=e.apply(this,m.toArray(arguments).slice(1)),d=this,r=parseFloat(y.rate),l=(this.rate=m.isFinite(r)?r:0,y.feeField);return m.isFinite(d.rate)&&(0==(n=S(d.wizard.model.get("summary"),"total"))&&(r=d.wizard.model.get("confirmation"))&&r.get("summary")&&(n=S(r.get("summary"),"total")),s=parseFloat(d.rate||0),m.defer(function(){var e,t,r,i,a,o;(t=d).$(".stripe-tax-auth-banner").remove(),!1!==y.taxAuthBannerEnabled&&(o='<div class="global-views-message global-views-message-info alert stripe-tax-auth-banner" role="alert"><div>'+m.escape(y.taxAuthBannerMessage||"Your authorization may be higher to account for taxes calculated after order submission.")+"</div></div>",(a=t.$(".order-wizard-cart-summary-container")).length?a.last().after(o):t.$el.append(o)),"stripe"===w&&v?(t=d,r=n,i=s,a=y.feeField,o=Math.round(i/100*r*100)/100,t.wizard.model.get("options")[a]=JSON.stringify(o),t.$(".order-wizard-cart-summary-shipping-cost-applied").find(".additional-payment-charge-container, .additional-payment-charge-message").remove(),0<o&&t.$(".order-wizard-cart-summary-shipping-cost-applied").append('<p class="additional-payment-charge-container"><span class="cost-formatted">'+u.formatCurrency(o)+"</span>"+u.translate("Processing Fee")+'</p><span class="additional-payment-charge-message"> '+u.translate("Processing Fee ")+i+"% "+u.translate("is applied")+"</span>"),t.$(".order-wizard-cart-summary-total .order-wizard-cart-summary-grid-right").text(u.formatCurrency(Math.round(100*(r+o))/100))):(i=l,(t=d).$(".order-wizard-cart-summary-shipping-cost-applied").find(".additional-payment-charge-container, .additional-payment-charge-message").remove(),t.wizard.model.get("options")[i]="",m.isFinite(e)&&t.$(".order-wizard-cart-summary-total .order-wizard-cart-summary-grid-right").text(u.formatCurrency(Math.round(100*e)/100)))})),t})}),m.extend(a.prototype,{submit:m.wrap(a.prototype.submit,function(e){var r=this,t=Array.prototype.slice.call(arguments,1),i=(r.StripeModel=new s,"undefined"!=typeof SC&&SC.CONFIGURATION&&SC.CONFIGURATION.StripeCustomization||{}),a=i.paymentIdField||"custbody_mhi_stripe_pymt_id",i=i.paymentMethodField||"custbody_mhi_stripe_pymt_mthd",i=r.get("options")[i],o=(r.profile=p.getInstance(),r.nSCustomerId=r.profile.get("internalid"),$('.wizard-content [data-action="submit-step"], .wizard-content [data-action="previous-step"]').attr("disabled",!0),function(){$('.wizard-content [data-action="submit-step"], .wizard-content [data-action="previous-step"]').attr("disabled",!1)}),n=r._stripePaymentIntentView,n=i?n?"function"!=typeof n.createPaymentIntentNow?(console.error("[StripeExt][LiveOrder] PI view found but createPaymentIntentNow() is missing - stale bundle or code mismatch. Rebuild + redeploy."),c.Deferred().resolve()):n.createPaymentIntentNow():(console.error("[StripeExt][LiveOrder] Stripe PM selected ("+i+") BUT PaymentIntentCreation view is NOT registered on the wizard model. SO will be saved WITHOUT a Stripe charge. Check that PaymentIntentCreation.View loaded on this step."),c.Deferred().resolve()):c.Deferred().resolve();return n.then(function(){return r.paymentIntentId=r.get("options")[a],e.apply(r,t).done(function(){r.createCustomRecordOnFailure("success"),o()}).fail(function(e){console.error("[Stripe:OWExt] submitSO failed",e),o(),r.createCustomRecordOnFailure("fail")})},function(e){console.error("[StripeExt][LiveOrder] PaymentIntent creation FAILED - aborting SO save:",e),o(),r.paymentIntentId=r.get("options")[a]||"";try{r.createCustomRecordOnFailure("fail")}catch(t){}return c.Deferred().reject(e||{errorCode:"ERR_PAYMENT_INTENT_FAILED",errorMessage:"Payment c
228ould not be processed. Order not placed."})})}),createCustomRecordOnFailure:function(e){var t=SC.CONFIGURATION.StripeCustomization&&SC.CONFIGURATION.StripeCustomization.currency||"USD";this.StripeModel=new s,this.StripeModel.fetch({type:"POST",data:{action:"customRecordOnFailure",paymentIntentId:this.paymentIntentId,customerId:this.nSCustomerId,status:e,currency:t}})}})}); 229define("PaymentIntentCreation.View",["Wizard.Module","StripeCustomization.Model","underscore","GlobalViews.Message.View","jQuery","SC.Configuration","Profile.Model","StripeConfig","paymentintentcreation.tpl"],function PaymentIntentCreation(r,n,u,e,m,t,i,h,o){"use strict";return r.extend({template:o,initialize:function(){r.prototype.initialize.apply(this,arguments);var e=this,t=(this.initializeStripe(),this.wizard.model.on("change",function(){e.render()}),this.stripeCustomerIdField=h.stripeCustomerIdField,this.paymentMethodField=h.paymentMethodField,this.paymentIdField=h.paymentIdField,this.feeField=h.feeField,this.currency=h.getShopperCurrency(),this.domain=window.location.hostname,e.profile=i.getInstance(),e.wizard.model.get("summary")?e.OrderTotalAmount=e.wizard.model.get("summary").total:e.OrderTotalAmount=0,e.nSCustomerId=e.profile.get("internalid"),sessionStorage.getItem(h.getCustomerCacheKey()));e.stripeCustomerId=t?{name:this.stripeCustomerIdField,value:t}:{},e.StripeModel=new n,e.wizard.model._stripePaymentIntentView=e},initializeStripe:function(){if(this.stripe=window.stripe||this.wizard.application&&this.wizard.application.stripe,!this.stripe){if(window.Stripe){this.wizard.application.getComponent("Environment");var e=h.stripePublishableKey;try{return this.stripe=Stripe(e),window.stripe=this.stripe,void(this.wizard.application&&(this.wizard.application.stripe=this.stripe))}catch(t){console.error("Error creating Stripe instance:",t)}}this.waitForStripe()}},waitForStripe:function(){var r=this,n=0,i=setInterval(function(){if(n++,r.stripe=window.stripe||r.wizard.application&&r.wizard.application.stripe,!r.stripe&&window.Stripe){r.wizard.application.getComponent("Environment");var e=h.stripePublishableKey;try{r.stripe=Stripe(e),window.stripe=r.stripe,r.wizard.application&&(r.wizard.application.stripe=r.stripe)}catch(t){console.error("Error creating Stripe instance during wait:",t)}}(r.stripe||100<=n)&&(clearInterval(i),r.stripe||console.error("Stripe failed to load after maximum wait time"))},100)},submit:function(){return m.Deferred().resolve()},_resolveStripeCustomerId:function(){var t=this,r=h.getCustomerCacheKey();function e(){var e=sessionStorage.getItem(r);if(e)return t.stripeCustomerId&&t.stripeCustomerId.value===e||(t.stripeCustomerId={name:t.stripeCustomerIdField,value:e}),1;t.stripeCustomerId&&t.stripeCustomerId.value}var n,i,o=m.Deferred();return e()?o.resolve(t.stripeCustomerId.value):(n=0,i=setInterval(function(){n++,e()?(clearInterval(i),o.resolve(t.stripeCustomerId.value)):30<=n&&(clearInterval(i),o.reject())},100)),o.promise()},createPaymentIntentNow:function(){var t=this;return t.paymentMethodId=t.wizard.model.get("options")[this.paymentMethodField],t._refreshOrderTotalFromServer().then(function(){return h.isOverMaxAmount(t.OrderTotalAmount)?(console.error("[Stripe:PaymentIntent] createPaymentIntentNow aborted: over the configured maximum",{orderTotal:t.OrderTotalAmount,max:h.getMaxAmount()}),m("html, body").animate({scrollTop:0},"slow"),m.Deferred().reject({errorCode:"ERR_STRIPE_AMOUNT_LIMIT",errorMessage:h.getLimitMessage()})):t._resolveStripeCustomerId().then(function(){return t._continueCreatePaymentIntent()},function(){return t._continueCreatePaymentIntent()})},function(e){return console.error("[Stripe:PaymentIntent] aborting before charge - order refresh failed",e),e&&"ERR_EMPTY_ORDER"===e.errorCode||t._redirectToLogin(),m.Deferred().reject(e||{errorCode:"ERR_SESSION_EXPIRED",errorMessage:"Your session has expired. Please sign in again to place your order."})})},_hasNoLines:function(e){var t=e&&e.get("lines");return!t||0===("number"==typeof t.length?t.length:0)},_isSessionExpired:function(e){var t;return!(!e||401!==(t=Number(e.status))&&403!==t&&!((t="string"==typeof e.responseText?e.responseText:"")&&(/ERR_WS_[A-Z_]*(?:SESSION|LOGIN|AUTH)/.test(t)||/"errorCode"\s*:\s*"[A-Z_]*(?:SESSION|LOGIN|AUTH)[A-Z_]*"/.test(t)||/^\s*<(?:!doctype|html)/i.test(t)&&/login|sign\s*in/i.test(t))))},_redirectToLogin:function(){var e=this,t={};try{t=e.wizard&&e.wizard.model&&e.wizard.model.get("touchpoints")||"undefined"!=typeof SC&&SC.ENVIRONMENT&&SC.ENVIRONMENT.siteSettings&&SC.ENVIRONMENT.siteSettings.touchpoints||{}}catch(r){t={}}e=t.login;e?e+=(-1===e.indexOf("?")?"?":"&")+"is=checkout&origin=checkout":e=t.viewcart||t.home||"/",window.location.href=e},_refreshOrderTotalFromServer:function(){var t,a,s,d,e,l=this,p=m.Deferred(),c=l.wizard.model;return c&&"function"==typeof c.fetch?(e=[l.paymentMethodField,l.paymentIdField,l.feeField,"custbody_mhi_stripe_pymt_paid"],t=c.get("options")||{},a={},s=(u.each(e,function(e){e&&(a[e]=t[e])}),{}
229),d=(u.each(["agreetermcondition","agreetermconditioncustom","purchasenumber"],function(e){var t=c.get(e);t&&(s[e]=t)}),null),(e=m.when(c.fetch())).fail(function(e){d=e||{},console.error("[Stripe:PaymentIntent] refreshOrderTotal failed",{status:d&&d.status})}),e.always(function(){if(d&&l._isSessionExpired(d))console.error("[Stripe:PaymentIntent] session expired - refusing to create a PaymentIntent"),p.reject({errorCode:"ERR_SESSION_EXPIRED",errorMessage:"Your session has expired. Please sign in again to place your order."});else{try{var e,t,r=c.get("options")||{},n=(u.each(a,function(e,t){r[t]=e}),c.get("summary")),i=n&&Number(n.total);u.isFinite(i)&&(l.OrderTotalAmount=i,e=parseFloat(h.rate),u.isFinite(e))&&0<e&&(t=Math.round(e/100*i*100)/100,r[l.feeField]=JSON.stringify(t)),c.set("options",r,{silent:!0}),u.each(s,function(e,t){c.set(t,e,{silent:!0})})}catch(o){}!d&&l._hasNoLines(c)?(console.error("[Stripe:PaymentIntent] refreshed order has no lines - refusing to create a PaymentIntent"),p.reject({errorCode:"ERR_EMPTY_ORDER",errorMessage:"Your cart is no longer available. Please review your cart and try again."})):p.resolve()}})):p.resolve(),p.promise()},_continueCreatePaymentIntent:function(){var t,r,e,n,i=this;return i.paymentMethodId?i.stripeCustomerId&&i.stripeCustomerId.value?this.paymentMethodId?(e=i.wizard.model.get("options")[this.feeField],e=parseFloat(e),u.isFinite(e)||(e=0),r=Math.round(100*(parseFloat(i.OrderTotalAmount)+e)),t=r,e=!0===h.manualCardCapture,n=parseFloat(h.taxAuthBufferRate||"0"),!0===h.taxAuthBufferEnabled&&u.isFinite(n)&&0<n&&(r=Math.round(r*(1+n/100)),e=!0),n=window.location.href,i.StripeModel.fetch({type:"POST",data:{action:"createPaymentIntent",paymentMethodId:i.paymentMethodId,customerId:i.stripeCustomerId.value,amount:r,returnurl:n,currency:i.currency,domain:i.domain,manualCapture:e}}).then(function(e){return e&&e.success?(i.stripeCustomerId&&i.stripeCustomerId.value&&h.transactionCustomerIdField&&(i.wizard.model.get("options")[h.transactionCustomerIdField]=i.stripeCustomerId.value),"requires_action"===e.paymentIntent.status&&e.paymentIntent.client_secret?i.handle3DSAuthentication(e.paymentIntent.client_secret,r):"succeeded"===e.status||"requires_capture"===e.status||"processing"===e.status?(i.paymentIntentID=e.paymentIntent.id,i.wizard.model.get("options")[i.paymentIdField]=e.paymentIntent.id,i.wizard.model.get("options").custbody_mhi_stripe_pymt_paid=t.toString(),m.Deferred().resolve()):(console.error("[PaymentIntentCreation] Unknown PaymentIntent status, treating as failure:",e),m.Deferred().reject({errorCode:"ERR_PAYMENT_INTENT_STATUS",errorMessage:"Payment could not be confirmed (status: "+(e.paymentIntent&&e.paymentIntent.status)+"). Please try again."}))):(m("html, body").animate({scrollTop:0},"slow"),m.Deferred().reject({errorCode:"ERR_PAYMENT_INTENT_CRT",errorMessage:"Payment failed. Please try again."}))}).fail(function(e){return console.error("[Stripe:PaymentIntent] createPaymentIntent failed",e),m("html, body").animate({scrollTop:0},"slow"),console.error("Failed to create Payment Intent:",e),m.Deferred().reject({errorCode:"ERR_PAYMENT_INTENT_CRT",errorMessage:"Error creating payment. Please try again."})})):void 0:(m("html, body").animate({scrollTop:0},"slow"),console.error("[PaymentIntentCreation] submit aborted: no Stripe customer id available"),m.Deferred().reject({errorCode:"ERR_NO_STRIPE_CUSTOMER",errorMessage:"Could not initialize your payment session. Please refresh and try again."})):(m("html, body").animate({scrollTop:0},"slow"),console.error("[PaymentIntentCreation] submit aborted: no payment method selected"),m.Deferred().reject({errorCode:"ERR_NO_PAYMENT_METHOD",errorMessage:"Please select a payment method before placing your order."}))},handle3DSAuthentication:function(e,t){var r=this,n=m.Deferred(),i=this.stripe||window.stripe||this.wizard.application&&this.wizard.application.stripe;if(!i&&window.Stripe){this.wizard.application.getComponent("Environment");var o=h.stripePublishableKey;try{i=Stripe(o),this.stripe=i,window.stripe=i}catch(a){console.error("Failed to create Stripe instance:",a)}}return i?i.confirmCardPayment(e).then(function(e){e.error?(console.error("3DS authentication failed:",e.error),m("html, body").animate({scrollTop:0},"slow"),n.reject({errorCode:"ERR_3DS_FAILED",errorMessage:e.error.message||"3D Secure authentication failed. Please try again."}
229)):(r.paymentIntentID=e.paymentIntent.id,r.wizard.model.get("options")[r.paymentIdField]=e.paymentIntent.id,r.wizard.model.get("options").custbody_mhi_stripe_pymt_paid=t.toString(),n.resolve())})["catch"](function(e){console.error("Error during 3DS:",e),m("html, body").animate({scrollTop:0},"slow"),n.reject({errorCode:"ERR_3DS_ERROR",errorMessage:"An error occurred during authentication. Please try again."})}):(console.error("Stripe instance not available for 3DS authentication"),n.reject({errorCode:"ERR_STRIPE_NOT_LOADED",errorMessage:"Payment system not ready. Please refresh the page and try again."})),n.promise()},getContext:function(){return{}}})}); 230define("StripeUpdateCardModal.View",["Backbone","underscore","jQuery","Utils","Stripe.UpdateModal.tpl"],function(t,d,e,s,a){"use strict";return t.View.extend({template:a,events:{"click #in-modal-update-card-button":"handleUpdateCard"},initialize:function(t){this.cardId=t.cardId,this.cardBrand=t.cardBrand,this.cardLast4=t.cardLast4,this.stripeInstance=t.stripeInstance,this.onClose=t.onClose},handleUpdateCard:function(){var t,e,a,r=this.$("#in-modal-exp-month").val(),n=this.$("#in-modal-exp-year").val(),i="";d.isEmpty(r)||d.isEmpty(n)?this.$("#in-modal-card-errors").text(s.translate("Please enter a valid expiration date.")):(/^(0[1-9]|1[0-2])$/.test(r)?/^\d{2}$/.test(n)?(t=parseInt("20"+n,10),e=(new Date).getFullYear(),a=(new Date).getMonth()+1,(t<e||t===e&&parseInt(r,10)<a)&&(i=s.translate("Expiration date must be in the future."))):i=s.translate("Please enter a valid two-digit expiration year."):i=s.translate("Please enter a valid expiration month (01 - 12)."),i?this.$("#in-modal-card-errors").text(i):(this.$("#in-modal-card-errors").text(""),this.trigger("updateCard",{cardId:this.cardId,expMonth:r,expYear:"20"+n}),this.onClose()))},getContext:function(){return{cardBrand:this.cardBrand,cardLast4:this.cardLast4}}})}); 231define("MHI.StripeCustomization.Shopping",["StripeConfig"],function(n){"use strict";return{mountToApp:function(i){n.primeSubsidiary(i)}}}); 232} 233extensions['ACS.WebExpectedShipDate.1.0.0'] = function(){ 234function getExtensionAssetsPath(asset){ 235return 'extensions/ACS/WebExpectedShipDate/1.0.0/' + asset; 236}; 237define("ACS.Web.ExpectedShipDate.Shopping",[],function ACSWebExpectedShipDateShopping(){"use strict";return{mountToApp:function(e){var t=e.getComponent("PDP"),n="custcol_expected_ship_date";t&&t.on("afterShowContent",function(){try{t.setOption(n,"")}catch(e){console.error("Error selecting "+n+" option:"+e)}})}}}); 238} 239try{ 240 extensions['SC.CMSMerchandisingZoneFix.1.0.0'](); 241 SC.addExtensionModule('SC.CMSMerchandisingZoneFix.1.0.0.CMSMerchandisingZoneFix'); 242} 243catch(error) 244{ 245 console.error(error) 246} 247try{ 248 extensions['CXExtensibility.CoreContent.1.0.5'](); 249 SC.addExtensionModule('CXExtensibility.CoreContent.CoreContentModule'); 250} 251catch(error) 252{ 253 console.error(error) 254} 255try{ 256 extensions['SuiteCommerce.CustomFields.1.1.4'](); 257 SC.addExtensionModule('SuiteCommerce.CustomFields.PDP.Main'); 258} 259catch(error) 260{ 261 console.error(error) 262} 263try{ 264 extensions['logitail.CustomizeOptionsInPdp.1.0.0'](); 265 SC.addExtensionModule('logitail.CustomizeOptionsInPdp.CustomizeOptionsInPdp'); 266} 267catch(error) 268{ 269 console.error(error) 270} 271try{ 272 extensions['CP.customLayouts.2.0.3'](); 273 SC.addExtensionModule('CP.customLayouts.subnav'); 274} 275catch(error) 276{ 277 console.error(error) 278} 279try{ 280 extensions['logitail.GlobalExtCrye.1.0.0'](); 281 SC.addExtensionModule('logitail.GlobalExtCrye.GlobalExtCrye'); 282} 283catch(error) 284{ 285 console.error(error) 286} 287try{ 288 extensions['logitail.HeaderExt.1.0.0'](); 289 SC.addExtensionModule('logitail.HeaderExt.Headerfix'); 290} 291catch(error) 292{ 293 console.error(error) 294} 295try{ 296 extensions['logitail.ImagecarouselPDP.1.0.0'](); 297 SC.addExtensionModule('logitail.ImagecarouselPDP.ImagecarouselPDP'); 298} 299catch(error) 300{ 301 console.error(error) 302} 303try{ 304 extensions['SuiteCommerce.InfiniteScrollExtension.1.1.4'](); 305 SC.addExtensionModule('SuiteCommerce.InfiniteScroll.Shopping'); 306} 307catch(error) 308{ 309 console.error(error) 310} 311try{ 312 extensions['SuiteCommerce.MapContactInfo.1.1.5'](); 313 SC.addExtensionModule('SuiteCommerce.MapAndContactUs.Main'); 314} 315catch(error) 316{ 317 console.error(error) 318} 319try{ 320 extensions['SuiteCommerce.NewsletterSignUp.1.1.2'](); 321 SC.addExtensionModule('SuiteCommerce.Newsletter.Main.Module'); 322} 323catch(error) 324{ 325 console.error(error) 326} 327try{ 328 extensions['SuiteCommerce.OrderStatus.1.0.3'](); 329 SC.addExtensionModule('SuiteCommerce.OrderStatus.Shopping'); 330} 331catch(error) 332{ 333 console.error(error) 334} 335try{ 336 extensions['logitail.PromoCodeTaxUpdateCart.1.0.0']();
337 SC.addExtensionModule('logitail.PromoCodeTaxUpdateCart.PromoCodeTaxUpdateCart'); 338} 339catch(error) 340{ 341 console.error(error) 342} 343try{ 344 extensions['NSeComm.ReturnAssemblyItems.1.0.0'](); 345 SC.addExtensionModule('NSeComm.ReturnAssemblyItems.Main'); 346} 347catch(error) 348{ 349 console.error(error) 350} 351try{ 352 extensions['logitail.ShippingandReturnsPdp.1.0.0'](); 353 SC.addExtensionModule('logitail.ShippingandReturnsPdp.ShippingandReturnsPdp'); 354} 355catch(error) 356{ 357 console.error(error) 358} 359try{ 360 extensions['SuiteCommerce.SizeChart.1.0.4'](); 361 SC.addExtensionModule('SuiteCommerce.SizeChart.Shopping'); 362} 363catch(error) 364{ 365 console.error(error) 366} 367try{ 368 extensions['MHI.StripeCustomization.2.0.0'](); 369 SC.addExtensionModule('MHI.StripeCustomization.Shopping'); 370} 371catch(error) 372{ 373 console.error(error) 374} 375try{ 376 extensions['ACS.WebExpectedShipDate.1.0.0'](); 377 SC.addExtensionModule('ACS.Web.ExpectedShipDate.Shopping'); 378} 379catch(error) 380{ 381 console.error(error) 382} 383SC.ENVIRONMENT.EXTENSIONS_JS_MODULE_NAMES = ["SC.CMSMerchandisingZoneFix.1.0.0.CMSMerchandisingZoneFix","CXExtensibility.CoreContent.CMSMerchzoneCCT.View","CXExtensibility.CoreContent.CMSMerchzoneCCT","CXExtensibility.CoreContent.CoreContentModule","SuiteCommerce.CustomFields.Instrumentation.Helper","SuiteCommerce.CustomFields.JavaScript.Utils","SuiteCommerce.CustomFields.Instrumentation.Log","SuiteCommerce.CustomFields.Instrumentation.Logger","SuiteCommerce.CustomFields.Instrumentation.MockAppender","SuiteCommerce.CustomFields.Instrumentation","SuiteCommerce.CustomFields.PDP.Main","SuiteCommerce.CustomFields.Utils","SuiteCommerce.CustomFields.PDP.Configuration","SuiteCommerce.CustomFields.PDP.Main.View","SuiteCommerce.CustomFields.PDP.Model","SuiteCommerce.CustomFields.PDP","logitail.CustomizeOptionsInPdp.CustomizeOptionsInPdp.View","logitail.CustomizeOptionsInPdp.CustomizeOptionsInPdp.Model","logitail.CustomizeOptionsInPdp.CustomizeOptionsInPdp.SS2Model","logitail.CustomizeOptionsInPdp.CustomizeOptionsInPdp","CP.customLayouts.scripts.Model","CP.customLayouts.scripts","CP.customLayouts.scripts.View","CP.customLayouts.subnav","subnav.View","CP.customLayouts.thanks.View","CP.customLayouts.thanks","logitail.GlobalExtCrye.GlobalExtCrye.View","logitail.GlobalExtCrye.GlobalExtCrye.Model","logitail.GlobalExtCrye.GlobalExtCrye.SS2Model","logitail.GlobalExtCrye.GlobalExtCrye","logitail.HeaderExt.Headerfix","logitail.ImagecarouselPDP.ImagecarouselPDP.View","logitail.ImagecarouselPDP.ImagecarouselPDP.Model","logitail.ImagecarouselPDP.ImagecarouselPDP.SS2Model","logitail.ImagecarouselPDP.ImagecarouselPDP","SuiteCommerce.InfiniteScroll.Configuration","SuiteCommerce.InfiniteScroll.Common.InstrumentationHelper","SuiteCommerce.InfiniteScroll.BottomControlView","SuiteCommerce.InfiniteScroll.ControlConfiguration","SuiteCommerce.InfiniteScroll.ControlModel","SuiteCommerce.InfiniteScroll.ControlView","SuiteCommerce.InfiniteScroll.TopControlView","SuiteCommerce.InfiniteScroll.GoToTop.View","SuiteCommerce.InfiniteScroll.InfiniteScroll","SuiteCommerce.InfiniteScroll.ItemsHandler","SuiteCommerce.InfiniteScroll.URLHelper","SuiteCommerce.InfiniteScroll.Instrumentation.Log","SuiteCommerce.InfiniteScroll.Instrumentation.Logger","SuiteCommerce.InfiniteScroll.Instrumentation.MockAppender","SuiteCommerce.InfiniteScroll.Instrumentation","SuiteCommerce.InfiniteScroll.Shopping","SuiteCommerce.InfiniteScroll.Pagination","SuiteCommerce.MapAndContactUs.Common.DependencyProvider","SuiteCommerce.MapAndContactUs.Common.Instrumentation.Helper","SuiteCommerce.MapAndContactUs.Utils","SuiteCommerce.ContactUsForm.CCTSettingsHelper","SuiteCommerce.ContactUsForm.InputField.Collection","SuiteCommerce.ContactUsForm.InputField.Model","SuiteCommerce.ContactUsForm.InputField.View","SuiteCommerce.ContactUsForm.Model","SuiteCommerce.ContactUsForm.View","SuiteCommerce.ContactUsFormCCT","SuiteCommerce.MapAndContactUs.ExtMessage.Model","SuiteCommerce.MapAndContactUs.ExtMessage.View","SuiteCommerce.MapAndContactUs.Instrumentation.Log","SuiteCommerce.MapAndContactUs.Instrumentation.Logger","SuiteCommerce.MapAndContactUs.Instrumentation.MockAppender","SuiteCommerce.MapAndContactUs.Instrumentation","SuiteCommerce.MapAndContactUs.Main","SuiteCommerce.MapAndContactInfoCCT.View","SuiteCommerce.MapAndContactInfoCCT","SuiteCommerce.Newsletter.Instrumentation.Helper","SuiteCommerce.Newsletter.ExtMessage.Model","SuiteCommerce.Newsletter.ExtMessage.View","SuiteCommerce.Newsletter.Instrumentation.Log","SuiteCommerce.Newsletter.Instrumentation.Logger","SuiteCommerce.Newsletter.Instrumentation.MockAppender","SuiteCommerce.Newsletter.Instrumentation","SuiteCommerce.Newsletter.Main.Module","SuiteCommerce.Newsletter.NewsletterCCT.Model","SuiteCommerce.Newsletter.NewsletterCCT.View","SuiteCommerce.Newsletter.NewsletterCCT","SuiteCommerce.OrderStatus.Configuration","SuiteCommerce.OrderStatus.Common.DependencyProvider","SuiteCommerce.OrderStatus.Instrumentation.FallbackLogger","SuiteCommerce.OrderStatus.Instrumentation.MockAppender","SuiteCommerce.OrderStatus.Instrumentation.Collection","SuiteCommerce.OrderStatus.Instrumentation.Model","SuiteCommerce.OrderStatus.Instrumentation.InstrumentationHelper","SuiteCommerce.OrderStatus.Instrumentation.Logger","SuiteCommerce.OrderStatus.Shopping","SuiteCommerce.OrderStatus.Utils","SuiteCommerce.OrderStatus.OrderFinder.Help.View","SuiteCommerce.OrderStatus.OrderFinder.ItemDetails.View","SuiteCommerce.OrderStatus.OrderFinder.Order.Model","SuiteCommerce.OrderStatus.OrderFinder.OrderPaymentInfo.View","SuiteCommerce.OrderStatus.OrderFinder.OrderSummary.View","SuiteCommerce.OrderStatus.OrderFinder.Router","SuiteCommerce.OrderStatus.OrderFinder.SearchForm.View","SuiteCommerce.OrderStatus.OrderFinder.SearchResults.View","logitail.PromoCodeTaxUpdateCart.PromoCodeTaxUpdateCart.View","logitail.PromoCodeTaxUpdateCart.PromoCodeTaxUpdateCart.Model","logitail.PromoCodeTaxUpdateCart.PromoCodeTaxUpdateCart.SS2Model","logitail.PromoCodeTaxUpdateCart.PromoCodeTaxUpdateCart","NSeComm.ReturnAssemblyItems.Main","logitail.ShippingandReturnsPdp.ShippingandReturnsPdp.View","logitail.ShippingandReturnsPdp.ShippingandReturnsPdp.Model","logitail.ShippingandReturnsPdp.ShippingandReturnsPdp.SS2Model","logitail.ShippingandReturnsPdp.ShippingandReturnsPdp","SuiteCommerce.SizeChart.Chart.Collection","SuiteCommerce.SizeChart.Chart.Model","SuiteCommerce.SizeChart.Chart.Page.Model","SuiteCommerce.SizeChart.Chart.Page.View","SuiteCommerce.SizeChart.Chart.Router","SuiteCommerce.SizeChart.Chart.View","SuiteCommerce.SizeChart.Common.Configuration","SuiteCommerce.SizeChart.Common.DependencyProvider","SuiteCommerce.SizeChart.Common.InstrumentationHelper","SuiteCommerce.SizeChart.Common.Utils","SuiteCommerce.SizeChart.Instrumentation.Log","SuiteCommerce.SizeChart.Instrumentation.Logger","SuiteCommerce.SizeChart.Instrumentation.MockAppender","SuiteCommerce.SizeChart.Instrumentation","SuiteCommerce.SizeChart.Shopping","SuiteCommerce.SizeChart.NotFoundPage.View","SuiteCommerce.SizeChart.PDP.Configuration","SuiteCommerce.SizeChart.PDP.Item.Model","SuiteCommerce.SizeChart.PDP.View","SuiteCommerce.SizeChart.PDP","Invoice.Detail.Extension","InvoicePayment.Vie
383w","LoginRegister.Extension","MHI.StripeCustomization.Checkout","StripeCustomization.Model","MHI.StripeCustomization.MyAccount","MHI.StripeCustomization.Shopping","StripeConfig","StripePaymentLabel","GlobalViews.FormatPaymentMethod.View.Ext","OrderHistory.Details.View.Ext","OrderWizard.Module.Stripe","OrderWizardModule.Extension","PaymentIntentCreation.View","StripeUpdateCardModal.View","ACS.Web.ExpectedShipDate.Shopping"]; 384//# sourceMappingURL=shopping_6.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.