1"use strict";(this.webpackJsonpSharedCalc=this.webpackJsonpSharedCalc||[]).push([[6029],{1153:function(e,t,r){r.r(t),r.d(t,{Main:function(){return C}});var n,o=r(3911),i=r(7538),a=r(3),c=r(5859),l=r(9317),s=r(3760),u=r(4525),p=r(8617),d=r(9949),f=r(5337),v=r(659),y=r(5896),h=r(9552),_=r(7843),b=r(2293),g=r(1205),m=r(9247),S=r(9690),w=(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)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),A=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},x=function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function c(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,c)}l((n=n.apply(e,t||[])).next())})},T=function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(l){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,l])}}},q=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},O=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},C=function(e){function t(t,r,n,o,i,c,l,s,u,p,d,f,v){var y=e.call(this,t,r,n,o,i,c,l,s,u,p,d,f,v)||this;return y.configManagerService=t,y.templateConfigHelper=r,y.templateViewHelper=n,y.calcDataHelper=o,y.calculator=i,y.componentFactory=c,y.calcDOMHelper=l,y.componentHelper=s,y.calcInfoService=u,y.priceRequestHelper=p,y.priceDataService=d,y.attributeService=f,y.mailingValidatorService=v,y.TEMPLATE="trad-mobile-modal-option-v2-template",y.load=function(){return x(y,void 0,void 0,function(){return T(this,function(e){switch(e.label){case 0:return this.init(),this.loadTemplate(),[4,this.loadComponents()];case 1:return e.sent(),[2]}})})},y.loadComponents=function(){return x(y,void 0,void 0,function(){var e,t,r,n,o,i,c,l,s,u,p=this;return T(this,function(d){switch(d.label){case 0:for(c in e=this.calculator.getData(),t=e.prod_attrs,r=this.templateConfigHelper.getMergedConfig(),n=[],o=function(e){var o=i.elementRef.querySelector(".box-attr-".concat(e)),c=t[e]&&t[e].order_spec_code&&t[e].order_spec_code.includes("TA")&&"r"===t[e].field_type&&r.show_radio_tat,d=r.attrs_addon_price.spec_codes,f=null!==(u=null===(s=null===(l=t[e])||void 0===l?void 0:l.order_spec_code)||void 0===s?void 0:s.some(function(e){return d.includes(e)}))&&void 0!==u&&u&&"card"===r.attr_radio_display;if(o)n.push({id:"box_".concat(e),type:h.I.GRID,sub_type:"box"});else if(f)n.push({id:e,type:h.I.RADIO});else if(c)n.push({id:e,type:h.I.TAT});else{var v=t[e].field_type;if("q"!=t[e].orig_field_type&&"t"==v){var y=i.attributeService.getAttributeType(t[e]);n.push({id:e,type:y})}var _=i.elementRef.querySelector("#attr_container_"+e),b=_.querySelector("button");b&&(b.setAttribute("data-toggle","modal"),b.addEventListener("click",function(t){if(t.target.closest(".calc-tooltip"))return t.stopPropagation(),void t.preventDefault();var n=p.calculator.getData();n.selectedSpecs=p.calculator.selectedSpecs;var o=n.prod_attrs[e],i=n.selectedSpecs[e],c=p.attributeService.getAttributeValues(o);if(void 0!==o.other_box&&1==r.display_box_as_dropdown){var l=p.attributeService.getOtherBoxAttrValues(o);c=O(O([],q(c),!1),q(l),!1)}var s=(0,m.twig)({href:r.s3_url+"/templates/attribute-val-options.twig",async:!1,base:r.s3_url+"/components"}).render({ungroupedAttrVals:c,selectedValue:i,attrId:e,config:r});_.querySelector(".modal-body").innerHTML=s,setTimeout(function(){for(var t=_.querySelectorAll(".modalAttrValue"+e),r=0;r<t.length;r++)t[r].addEventListener("click",function(t){t.preventDefault();var r={attribute_id:e,prod_attr_val_id:t.currentTarget.getAttribute("value")};a.U.dispatchEvent(p.elementRef,"calc.changeSpecs",r)})})}))}},i=this,t)o(c);return n.push({id:"tooltips",type:h.I.TOOLTIP}),[4,this.componentFactory.getComponents(n)];case 1:return d.sent(),[2]}})})},y}return w(t,e),t.prototype.updateView=function(){var e,t,r,n=this,o=this.calculator.getData(),i=o.prod_attrs,a=this.templateConfigHelper.getMergedConfig(),c=function(c){var s=i[c],u=l.elementRef.querySelectorAll(".box-attr-".concat(c));if(u.length)u.forEach(function(e){n.componentHelper.getComponentInstance("box_".concat(c)).updateAttribute(s,o.selectedSpecs[c],e)});else{var p=l.elementRef.querySelector("#attr_container_".concat(c)),d=o.selectedSpecs[c],f=l.attributeService.getAttributeValues(s),v=l.attributeService.getProdAttrVal(f,d),y=p.querySelectorAll(".dropdown-toggle-label, .single-option-attribute");if(v&&y.length)for(var h=0;h<y.length;h++)y[h].innerHTML=v.attr_value;if(p.classList.remove("hidden"),p.style.display="block","y"==s.hide_attribute_flag&&(p.style.display="none"),a.single_option_label_display){var _=p.querySelector(".button-trigger-container");_&&_.classList.remove("hidden");var b=p.querySelector(".single-option-container");b&&b.classList.add("hidden"),p.classList.remove("single-option"),l.attributeService.isSingleOption(s)&&"none"!=p.style.display&&(_&&_.classList.add("hidden"),b&&b.classList.remove("hidden"),p.classList.add("single-option"))}var g=i[c]&&i[c].order_spec_code&&i[c].order_spec_code.includes("TA")&&"r"===i[c].field_type&&a.show_radio_tat,m=a.attrs_addon_price.spec_codes,S=null!==(r=null===(t=null===(e=i[c])||void 0===e?void 0:e.order_spec_code)||void 0===t?void 0:t.some(function(e){return m.includes(e)}))&&void 0!==r&&r&&"card"===a.attr_radio_display;(g||S)&&(A=l.componentHelper.getComponentInstance(c))&&"function"==typeof A.updateAttribute&&A.updateAttribute(s,o.selectedSpecs[c]);var w=["width","height","size_unit","width_ft","height_ft"].indexOf(c)>=0?c:"attr".concat(c);if(p.querySelector("#".concat(w))){p.querySelector("#".concat(w)).value=d;var A,x=i[c].field_type;"q"!=i[c].orig_field_type&&"t"==x&&(A=l.componentHelper.getComponentInstance(c))&&"function"==typeof A.updateAttribute&&A.updateAttribute(s,o.selectedSpecs[c])}}},l=this;for(var s in i)c(s)},function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}([(0,v.injectable)(),A("design:paramtypes",[l.v,s.j,u.m,p.c,d.t,i.e,f.a,y.w,_.t,b.P,g.f,c.e,S.N])],t)}(o.B);x(void 0,void 0,void 0,function(){return T(this,function(e){switch(e.label){case 0:return[4,v.container.resolve(C).load()];case 1:return e.sent(),[2]}})})}}]);
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.