PageSourceSearch

https://calc-js.printplace.com/modalv1-template-min.js?v=1789092699276

js printplace.com collected 2026-09-24 20:18:46 UTC 8,676 bytes, 1 lines download raw bytes

1"use strict";(this.webpackJsonpSharedCalc=this.webpackJsonpSharedCalc||[]).push([[1900],{6866:function(e,t,r){r.r(t),r.d(t,{Main:function(){return C}});var n,o=r(3911),a=r(7538),i=r(3),c=r(5859),l=r(9317),u=r(3760),s=r(4525),p=r(8617),f=r(9949),d=r(5337),v=r(659),y=r(5896),h=r(9552),b=r(7843),g=r(2293),_=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,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function c(e){try{l(n.throw(e))}catch(e){a(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(i,c)}l((n=n.apply(e,t||[])).next())})},O=function(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(l){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)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 i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}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,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i},T=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;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,a,c,l,u,s,p,f,d,v){var y=e.call(this,t,r,n,o,a,c,l,u,s,p,f,d,v)||this;return y.configManagerService=t,y.templateConfigHelper=r,y.templateViewHelper=n,y.calcDataHelper=o,y.calculator=a,y.componentFactory=c,y.calcDOMHelper=l,y.componentHelper=u,y.calcInfoService=s,y.priceRequestHelper=p,y.priceDataService=f,y.attributeService=d,y.mailingValidatorService=v,y.TEMPLATE="trad-mobile-modal-option-v1-template",y.load=function(){return x(y,void 0,void 0,function(){return O(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,a,c,l=this;return O(this,function(u){switch(u.label){case 0:for(c in e=this.calculator.getData(),t=e.prod_attrs,r=this.templateConfigHelper.getMergedConfig(),n=[],o=function(e){var o=a.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;if(o)n.push({id:"box_".concat(e),type:h.I.GRID,sub_type:"box"});else if(c)n.push({id:e,type:h.I.TAT});else{var u=t[e].field_type;if("q"!=t[e].orig_field_type&&"t"==u){var s=a.attributeService.getAttributeType(t[e]);n.push({id:e,type:s})}var p=a.elementRef.querySelector("#attr_container_"+e),f=p.querySelector("button");f&&(f.setAttribute("data-toggle","modal"),f.addEventListener("click",function(t){if(t.target.closest(".calc-tooltip"))return t.stopPropagation(),void t.preventDefault();var n=l.calculator.getData();n.selectedSpecs=l.calculator.selectedSpecs;var o=n.prod_attrs[e];r.calc_variant_data&&r.calc_variant_data.attributes[e]&&(o=l.attributeService.setAttributeOverride(o,r.calc_variant_data.attributes[e]));var a=n.selectedSpecs[e],c=l.attributeService.getAttributeValues(o);if(void 0!==o.other_box&&1==r.display_box_as_dropdown){var u=l.attributeService.getOtherBoxAttrValues(o);
1c=T(T([],q(c),!1),q(u),!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:a,attrId:e,config:r});p.querySelector(".modal-body").innerHTML=s,setTimeout(function(){for(var t=p.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")};i.U.dispatchEvent(l.elementRef,"calc.changeSpecs",r)})})}))}},a=this,t)o(c);return n.push({id:"tooltips",type:h.I.TOOLTIP}),[4,this.componentFactory.getComponents(n)];case 1:return u.sent(),[2]}})})},y}return w(t,e),t.prototype.updateView=function(){var e=this,t=this.calculator.getData(),r=t.prod_attrs,n=this.templateConfigHelper.getMergedConfig(),o=function(o){var i=r[o],c=a.elementRef.querySelectorAll(".box-attr-".concat(o));if(c.length)c.forEach(function(r){e.componentHelper.getComponentInstance("box_".concat(o)).updateAttribute(i,t.selectedSpecs[o],r)});else{var l=a.elementRef.querySelector("#attr_container_".concat(o)),u=a.elementRef.querySelector('[data-attr-id="'.concat(o,'"]'));n.calc_variant_data&&n.calc_variant_data.attributes[o]&&(i=a.attributeService.setAttributeOverride(i,n.calc_variant_data.attributes[o]));var s=t.selectedSpecs[o],p=a.attributeService.getAttributeValues(i),f=a.attributeService.getProdAttrVal(p,s),d=l.querySelectorAll(".dropdown-toggle-label, .single-option-attribute");if(f&&d.length)for(var v=0;v<d.length;v++)d[v].innerHTML=f.attr_value;var y="y"===i.hide_attribute_flag;if(l.classList.toggle("hidden",y),u){u.classList.toggle("hidden",y);var h=u.querySelector(".attr-value-label");if(h&&f&&null!=f.attr_value){var b=a.replaceMap(String(f.attr_value),{None:"No","Yes - ":""});h.textContent=b}}if(n.single_option_label_display){var g=l.querySelector(".button-trigger-container");g&&g.classList.remove("hidden");var _=l.querySelector(".single-option-container");_&&_.classList.add("hidden"),l.classList.remove("single-option"),a.attributeService.isSingleOption(i)&&"none"!=l.style.display&&(g&&g.classList.add("hidden"),_&&_.classList.remove("hidden"),l.classList.add("single-option"))}r[o]&&r[o].order_spec_code&&r[o].order_spec_code.includes("TA")&&"r"===r[o].field_type&&n.show_radio_tat&&(S=a.componentHelper.getComponentInstance(o))&&"function"==typeof S.updateAttribute&&S.updateAttribute(i,t.selectedSpecs[o]);var m=["width","height","size_unit","width_ft","height_ft"].indexOf(o)>=0?o:"attr".concat(o);if(l.querySelector("#".concat(m))){l.querySelector("#".concat(m)).value=s;var S,w=r[o].field_type;"q"!=r[o].orig_field_type&&"t"==w&&(S=a.componentHelper.getComponentInstance(o))&&"function"==typeof S.updateAttribute&&S.updateAttribute(i,t.selectedSpecs[o])}}},a=this;for(var i in r)o(i)},t.prototype.replaceMap=function(e,t){var r,n,o=e;try{for(var a=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.entries(t)),i=a.next();!i.done;i=a.next()){var c=q(i.value,2),l=c[0],u=c[1];o=o.replace(l,u)}}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return o},function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i}([(0,v.injectable)(),A("design:paramtypes",[l.v,u.j,s.m,p.c,f.t,a.e,d.a,y.w,b.t,g.P,_.f,c.e,S.N])],t)}(o.B);x(void 0,void 0,void 0,function(){return O(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.