(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[567],{"./bundles/orofrontendimportexport/js/app/views/export-button-view.js":(e,t,s)=>{var i;void 0===(i=function(e){"use strict";const t=s("./bundles/oroui/js/app/views/base/view.js"),i=s("./bundles/oroui/js/extend/jquery.js"),o=s("./bundles/oroui/js/extend/underscore.js"),n=s("./bundles/fosjsrouting/js/router.js"),r=s("./bundles/oroui/js/messenger.js"),a=s("./bundles/orotranslation/js/translator.js"),c=s("./bundles/oroui/js/mediator.js"),l=t.extend({options:{routeOptions:{},successMessage:null,errorMessage:null},routeOptions:{},events:{click:"onExportClick"},listen:{"updateState collection":"onCollectionUpdate"},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){l.__super__.initialize.call(this,e),this.options=o.defaults(e||{},this.options),this.routeOptions={options:this.options.routeOptions},this.collection.size()?(this.$el.removeClass("hide"),this.$el.parent().addClass("datagrid-tool")):(this.$el.addClass("hide"),this.$el.parent().removeClass("datagrid-tool"))},onCollectionUpdate:function(e){const{state:t}=e;t.totalRecords?(this.$el.removeClass("hide"),this.$el.parent().addClass("datagrid-tool")):this.$el.hasClass("hide")||(this.$el.addClass("hide"),this.$el.parent().removeClass("datagrid-tool"))},onExportClick:function(e){e.preventDefault(),this.handleExport()},handleExport:function(){if(!this.options.exportRoute)throw new TypeError('"exportRoute" option is required');const e=i.extend(!0,{},this.routeOptions);e.options=i.extend(!0,{},e.options),c.trigger("import-export:handleExport",e.options);const t=n.generate(this.options.exportRoute,e);this.$el.addClass("disabled").attr("disabled",!0),i.post(t,function(e){let t,s;e.hasOwnProperty("success")&&e.success?(t=a(this.options.successMessage),s="success"):(t=a(this.options.errorMessage),s="error"),r.notificationMessage(s,t),e.messages&&o.each(e.messages,(function(e,t){o.each(e,(function(e){r.notificationMessage(t,e)}))})),this.$el.removeClass("disabled").removeAttr("disabled")}.bind(this),"json")}});return l}.call(t,s,t,e))||(e.exports=i)},"./bundles/orolineitemscopy/js/app/views/copy-line-items-view.js":(e,t,s)=>{var i;void 0===(i=function(e){"use strict";var t,i=s("./bundles/orolineitemscopy/js/app/widget/shopping-list-create-widget.js"),o=s("./bundles/oroshoppinglist/js/shoppinglist-collection-service.js"),n=s("./bundles/oroui/js/app/views/base/view.js"),r=s("./bundles/orofrontend/js/app/elements-helper.js"),a=s("./bundles/oroui/js/extend/underscore.js"),c=s("./bundles/oroui/js/extend/jquery.js"),l=s("./bundles/oroui/js/mediator.js"),d=s("./bundles/fosjsrouting/js/router.js");return t=n.extend(a.extend({},r,{options:{copyLineItemsComponentOptions:{copyLineItemsSelectorBlockClass:"",shoppingListsSelectButton:""},shoppingListId:null},shoppingListCollection:null,checkedLineItemsSelector:"",constructor:function e(){e.__super__.constructor.apply(this,arguments)},initialize:function(e){t.__super__.initialize.apply(this,arguments),this.options=c.extend(!0,{},this.options,a.pick(e,a.keys(this.options))),this.checkedLineItemsSelector=this.options.copyLineItemsComponentOptions.copyLineItemsSelectorBlockClass+" input:checked",o.shoppingListCollection.done(function(e){this.shoppingListCollection=e,this.listenTo(e,"change",this.render),this.render()}.bind(this)),this.initListeners()},initListeners:function(){this.$el.on("click",this.shoppingListsSelectorHandler.bind(this))},shoppingListsSelectorHandler:function(){var e=this.options.shoppingListId;if(e)this.copyLineItems(e);else{var t=new i({});t.render(),t.on("formSave",a.bind((function(t){e=t.savedId,this.copyLineItems(e)}),this))}},copyLineItems:function(e){var t=this.getCheckedLineItems(),s=this.shoppingListCollection;l.execute("showLoading"),c.ajax({type:"POST",url:d.generate("oro_shopping_list_frontend_copy_line_items",{shoppingList:e}),data:{lineItemIds:t},success:function(e){if(l.execute("hideLoading"),e&&e.message){var t=e.hasOwnProperty("successful")&&e.successful;l.execute("showFlashMessage",t?"success":"error",e.message),s.trigger("change",{refresh:!0})}},error:function(e){l.execute("hideLoading")}})},getCheckedLineItems:function(){var e=[];return c(this.checkedLineItemsSelector).each((function(){e.push(c(this).val())})),e},dispose:function(){this.disposed||(this.$el.off("click"),delete this.options,delete this.shoppingListCollection,delete this.checkedLineItemsSelector,t.__super__.dispose.call(this))}})),t}.call(t,s,t,e))||(e.exports=i)},"./bundles/orolineitemscopy/js/app/views/select-line-items-cell-view.js":(e,t,s)=>{var i;void 0===(i=function(e){"use strict";var t,i=s("./bundles/oroui/js/app/views/base/view.js"),o=s("./bundles/orofrontend/js/app/elements-helper.js"),n=s("./bundles/oroui/js/extend/underscore.js"),r=s("./bundles/oroui/js/extend/jquery.js");return t=i.extend(n.extend({},o,{options:{copyLineItemsComponentOptions:{copyLineItemsSelectorBlockClass:"",shoppingListsSelectButton:""}},allLineItemsCheckbox:"",lineItemCheckbox:"",constructor:function e(){e.__super__.constructor.apply(this,arguments)},initialize:function(e){t.__super__.initialize.apply(this,arguments),this.options=r.extend(!0,{},this.options,n.pick(e,n.keys(this.options))),this.lineItemCheckbox=r(this.options.copyLineItemsComponentOptions.copyLineItemsSelectorBlockClass+" input[type=checkbox]"),this.initListeners(),this.lineItemCheckHandler()},initListeners:function(){this.allLineItemsCheckbox=this.$el.find(r("input[type=checkbox]")),this.allLineItemsCheckbox.on("change",n.bind(this.onCheckboxClick,this)),this.lineItemCheckbox.on("change",this.lineItemCheckHandler.bind(this)),this.$el.find(r(".datagrid-massaction__dropdown-menu")).on("click",n.bind(this.onDropdownClick,this))},lineItemCheckHandler:function(){r(this.options.copyLineItemsComponentOptions.copyLineItemsSelectorBlockClass+" input:checked").length>0?(this.allLineItemsCheckbox.prop("checked",!0),this.onEnableShoppingListsSelector()):(this.allLineItemsCheckbox.prop("checked",!1),this.onDisableShoppingListsSelector())},onCheckboxClick:function(e){r(e.target).is(":checked")?(this.lineItemCheckbox.prop("checked",!0),this.lineItemCheckbox.trigger("change")):(this.lineItemCheckbox.prop("checked",!1),this.lineItemCheckbox.trigger("change"))},onDropdownClick:function(e){var t=r(e.target);t.is("[data-select-all]")?(this.allLineItemsCheckbox.prop("checked",!0),this.allLineItemsCheckbox.trigger("change")):t.is("[data-select-none]")&&(this.allLineItemsCheckbox.prop("checked",!1),this.allLineItemsCheckbox.trigger("change")),e.preventDefault()},onEnableShoppingListsSelector:function(){r(this.options.copyLineItemsComponentOptions.shoppingListsSelectButton).removeClass("disabled")},onDisableShoppingListsSelector:function(){r(this.options.copyLineItemsComponentOptions.shoppingListsSelectButton).addClass("disabled")},dispose:function(){this.disposed||(this.allLineItemsCheckbox.off("change"),this.$el.find(r(".datagrid-massaction__dropdown-menu")).off("click"),delete this.options,delete this.allLineItemsCheckbox,t.__super__.dispose.call(this))}})),t}.call(t,s,t,e))||(e.exports=i)},"./bundles/orolineitemscopy/js/app/widget/shopping-list-create-widget.js":(e,t,s)=>{var i;void 0===(i=function(e){"use strict";return s("./bundles/oroshoppinglist/js/app/widget/shopping-list-create-widget.js").extend({onFormSave:function(e){var t=e.label||this.$el.find(".form-field-label").val();this.shoppingListCollection.length&&this.shoppingListCollection.each((function(t){t.set("is_current",t.get("id")===e.savedId,{silent:!0})})),this.shoppingListCollection.add({id:e.savedId,label:t,is_current:!0},{silent:!0})}})}.call(t,s,t,e))||(e.exports=i)},"./bundles/oropayment/js/app/components/payment-method-component.js":(e,t,s)=>{var i;void 0===(i=function(e){"use strict";const t=s("./bundles/oroui/js/extend/underscore.js"),i=s("./bundles/oroui/js/mediator.js"),o=s("./bundles/oroui/js/app/components/base/component.js"),n=s("./bundles/fosjsrouting/js/router.js"),r=o.extend({options:{paymentMethod:null,successUrl:""},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){this.options=t.defaults(e||{},this.options),i.on("checkout:place-order:response",this.handleSubmit,this)},handleSubmit:function(e){if(e.responseData.paymentMethod===this.options.paymentMethod){e.stopped=!0;const s=t.extend({successUrl:this.getSuccessUrl()},e.responseData);if(!s.successUrl)return;i.execute("redirectTo",{url:s.successUrl},{redirect:!0})}},getSuccessUrl:function(){return this.options.successUrl?n.generate(this.options.successUrl):null},dispose:function(){this.disposed||(i.off("checkout:place-order:response",this.handleSubmit,this),r.__super__.dispose.call(this))}});return r}.call(t,s,t,e))||(e.exports=i)},"./bundles/oropayment/js/app/components/payment-method-selector-component.js":(e,t,s)=>{var i;void 0===(i=function(e){"use strict";const t=s("./bundles/oroui/js/extend/underscore.js"),i=s("./bundles/oroui/js/extend/jquery.js"),o=s("./bundles/oroui/js/mediator.js"),n=s("./bundles/oroui/js/app/components/base/component.js"),r=s("./bundles/fosjsrouting/js/router.js"),a=n.extend({options:{selectors:{radio:"[data-choice]",itemContainer:"[data-item-container]",subform:"[data-form-container]"},redirectEvent:"scroll keypress mousedown tap",delay:9e5},$el:null,$radios:null,disposable:!0,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){this.options=t.extend(this.options,e),this.$el=this.options._sourceElement,this.updateForms=this.updateForms.bind(this),this.$el.on("change",this.options.selectors.radio,this.updateForms),o.on("checkout:payment:before-restore-filled-form",this.beforeRestoreFilledForm,this),o.on("checkout:payment:before-hide-filled-form",this.beforeHideFilledForm,this),o.on("checkout:payment:remove-filled-form",this.removeFilledForm,this),o.on("checkout:payment:method:refresh",this.refreshPaymentMethod,this),this.$el.on(this.options.redirectEvent,t.debounce(this.redirectToHomepage.bind(this),this.options.delay)),this.$el.find(this.options.selectors.radio).filter(":checked").trigger("change")},redirectToHomepage:function(){o.execute("redirectTo",{url:r.generate("oro_product_frontend_product_index")},{redirect:!0})},dispose:function(){!this.disposed&&this.disposable&&(this.$el.off(),o.off("checkout:payment:before-restore-filled-form",this.beforeRestoreFilledForm,this),o.off("checkout:payment:before-hide-filled-form",this.beforeHideFilledForm,this),o.off("checkout:payment:remove-filled-form",this.removeFilledForm,this),o.off("checkout:payment:method:refresh",this.refreshPaymentMethod,this),a.__super__.dispose.call(this))},updateForms:function(e){const t=i(e.target);this.$el.find(this.options.selectors.subform).hide(),t.parents(this.options.selectors.itemContainer).find(this.options.selectors.subform).show(),this.refreshPaymentMethod()},beforeHideFilledForm:function(){this.disposable=!1},beforeRestoreFilledForm:function(){this.disposable&&this.dispose()},removeFilledForm:function(){this.disposable||(this.disposable=!0,this.dispose())},refreshPaymentMethod:function(){const e=this.getPaymentMethod();o.trigger("checkout:payment:method:changed",{paymentMethod:e})},getPaymentMethod:function(){return this.$el.find(this.options.selectors.radio).filter(":checked").val()}});return a}.call(t,s,t,e))||(e.exports=i)},"./bundles/oropaypal/js/app/components/authorized-credit-card-component.js":(e,t,s)=>{var i;void 0===(i=function(e){"use strict";const t=s("./bundles/oroui/js/mediator.js"),i=s("./bundles/oropaypal/js/app/components/credit-card-component.js").extend({authorizedOptions:{differentCard:"[data-different-card]",authorizedCard:"[data-authorized-card]",differentCardHandle:"[data-different-card-handle]",authorizedCardHandle:"[data-authorized-card-handle]"},paymentValidationRequiredComponentState:!1,$authorizedCard:null,$differentCard:null,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){this.options.saveForLaterUse=!1,i.__super__.initialize.call(this,e),this.$authorizedCard=this.$el.find(this.authorizedOptions.authorizedCard),this.$differentCard=this.$el.find(this.authorizedOptions.differentCard),this.showAuthorizedCard=this.showAuthorizedCard.bind(this),this.showDifferentCard=this.showDifferentCard.bind(this),this.$el.on("click",this.authorizedOptions.authorizedCardHandle,this.showAuthorizedCard).on("click",this.authorizedOptions.differentCardHandle,this.showDifferentCard)},showDifferentCard:function(){return this.$authorizedCard.css("position","absolute"),this.$differentCard.show("slide",{direction:"right"}),this.$authorizedCard.hide("slide",{direction:"left"},function(){this.$authorizedCard.css("position","relative")}.bind(this)),this.setGlobalPaymentValidate(!0),this.updateSaveForLater(),!1},showAuthorizedCard:function(){return this.$authorizedCard.css("position","absolute"),this.$authorizedCard.show("slide",{direction:"left"}),this.$differentCard.hide("slide",{direction:"right"},function(){this.$authorizedCard.css("position","relative")}.bind(this)),this.setGlobalPaymentValidate(!1),this.updateSaveForLater(),!1},onCurrentPaymentMethodSelected:function(){this.setGlobalPaymentValidate(this.paymentValidationRequiredComponentState),this.updateSaveForLater()},updateSaveForLater:function(){this.getGlobalPaymentValidate()?this.setSaveForLaterBasedOnForm():t.trigger("checkout:payment:save-for-later:change",this.options.saveForLaterUse)},beforeTransit:function(e){this.getGlobalPaymentValidate()&&i.__super__.beforeTransit.call(this,e)},handleSubmit:function(e){e.responseData.paymentMethod===this.options.paymentMethod&&this.paymentValidationRequiredComponentState&&i.__super__.handleSubmit.call(this,e)},dispose:function(){!this.disposed&&this.disposable&&(this.$el.off("click",this.authorizedOptions.authorizedCardHandle,this.showAuthorizedCard).off("click",this.authorizedOptions.differentCardHandle,this.showDifferentCard),i.__super__.dispose.call(this))}});return i}.call(t,s,t,e))||(e.exports=i)},"./bundles/oropaypal/js/app/components/credit-card-component.js":(e,t,s)=>{var i;void 0===(i=function(e){"use strict";const t=s("./bundles/oroui/js/extend/underscore.js"),i=s("./bundles/oroui/js/extend/jquery.js"),o=s("./bundles/oroui/js/mediator.js"),n=s("./bundles/oroui/js/app/components/base/component.js");s("./bundles/oroform/js/extend/validate.js");const r=n.extend({options:{paymentMethod:null,allowedCreditCards:[],selectors:{month:"[data-expiration-date-month]",year:"[data-expiration-date-year]",hiddenDate:'input[name="EXPDATE"]',form:"[data-credit-card-form]",expirationDate:"[data-expiration-date]",cvv:"[data-card-cvv]",cardNumber:"[data-card-number]",validation:"[data-validation]",saveForLater:"[data-save-for-later]"}},paymentValidationRequiredComponentState:!0,$el:null,month:null,year:null,$form:null,disposable:!0,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){this.options=t.extend({},this.options,e),i.validator.loadMethod(["oropayment/js/validator/credit-card-number","oropayment/js/validator/credit-card-type","oropayment/js/validator/credit-card-expiration-date","oropayment/js/validator/credit-card-expiration-date-not-blank"]),i.validator.preloadMethods(),this.$el=this.options._sourceElement,this.$form=this.$el.find(this.options.selectors.form),this.$el.on("change."+this.cid,this.options.selectors.month,this.collectMonthDate.bind(this)).on("change."+this.cid,this.options.selectors.year,this.collectYearDate.bind(this)).on("focusout."+this.cid,this.options.selectors.cardNumber,this.validate.bind(this,this.options.selectors.cardNumber)).on("focusout."+this.cid,this.options.selectors.cvv,this.validate.bind(this,this.options.selectors.cvv)).on("change."+this.cid,this.options.selectors.saveForLater,this.onSaveForLaterChange.bind(this)),o.on("checkout:place-order:response",this.handleSubmit,this),o.on("checkout:payment:method:changed",this.onPaymentMethodChanged,this),o.on("checkout:payment:before-transit",this.beforeTransit,this),o.on("checkout:payment:before-hide-filled-form",this.beforeHideFilledForm,this),o.on("checkout:payment:before-restore-filled-form",this.beforeRestoreFilledForm,this),o.on("checkout:payment:remove-filled-form",this.removeFilledForm,this),o.on("checkout-content:initialized",this.refreshPaymentMethod,this)},refreshPaymentMethod:function(){o.trigger("checkout:payment:method:refresh")},handleSubmit:function(e){if(e.responseData.paymentMethod===this.options.paymentMethod){e.stopped=!0;const s=t.extend({SECURETOKEN:!1,SECURETOKENID:!1,returnUrl:"",errorUrl:"",formAction:"",paymentMethodSupportsValidation:!1},e.responseData);if(s.paymentMethodSupportsValidation)return void o.execute("redirectTo",{url:s.returnUrl},{redirect:!0});const i=this.$el.find("[data-gateway]").serializeArray();if(i.push({name:"SECURETOKENID",value:s.SECURETOKENID}),i.push({name:"SECURETOKEN",value:s.SECURETOKEN}),s.formAction&&s.SECURETOKEN)return void this.postUrl(s.formAction,i);o.execute("redirectTo",{url:s.errorUrl},{redirect:!0})}},postUrl:function(e,s){const o=i('<form action="'+e+'" method="POST" data-nohash="true">');t.each(s,(function(e){const t=i("<input>").prop("type","hidden").prop("name",e.name).val(e.value);o.append(t)})),i("body").append(o),o.submit()},collectMonthDate:function(e){this.month=e.target.value,this.setExpirationDate()},collectYearDate:function(e){this.year=e.target.value,this.setExpirationDate()},setExpirationDate:function(){const e=this.$el.find(this.options.selectors.hiddenDate);this.month&&this.year?e.val(this.month+this.year):e.val("")},dispose:function(){!this.disposed&&this.disposable&&(this.$el.off("."+this.cid),o.off("checkout-content:initialized",this.refreshPaymentMethod,this),o.off("checkout:place-order:response",this.handleSubmit,this),o.off("checkout:payment:method:changed",this.onPaymentMethodChanged,this),o.off("checkout:payment:before-transit",this.beforeTransit,this),o.off("checkout:payment:before-hide-filled-form",this.beforeHideFilledForm,this),o.off("checkout:payment:before-restore-filled-form",this.beforeRestoreFilledForm,this),o.off("checkout:payment:remove-filled-form",this.removeFilledForm,this),r.__super__.dispose.call(this))},validate:function(e){let t;if(e){const s=this.$form.find(e),i=s.closest("form");if(e!==this.options.selectors.expirationDate&&i.length)return this._validateFormField(this.$el,s);t=s.clone()}else t=this.$form.clone();const s=i("<form>");s.append(t);const o=this,n=s.validate({ignore:"",errorPlacement:function(e,t){const s=o.$form.find("#"+i(t).attr("id")),n=s.parents(o.options.selectors.validation);s.addClass("error"),n.length?e.appendTo(n.first()):e.appendTo(s.parent())}});let r;return s.find("select").each((function(e,t){i(t).val(o.$form.find("select").eq(e).val())})),i.data(s,"validator",n),this._addCardTypeValidationRule(s),r=e?this.$form.find(e).parent():this.$form,r.find(n.settings.errorElement+"."+n.settings.errorClass).remove(),r.parent().find(".error").removeClass("error"),n.form()},_validateFormField:function(e,t){return this._addCardTypeValidationRule(e),t.validate().form()},_addCardTypeValidationRule:function(e){const s=e.find(this.options.selectors.cardNumber),i=s.data("validation"),o=s.data("credit-card-type-validator");o&&o in i&&t.extend(i[o],{allowedCreditCards:this.options.allowedCreditCards})},setGlobalPaymentValidate:function(e){this.paymentValidationRequiredComponentState=e,o.trigger("checkout:payment:validate:change",e)},getGlobalPaymentValidate:function(){const e={};return o.trigger("checkout:payment:validate:get-value",e),e.value},getSaveForLaterElement:function(){return this.hasOwnProperty("$saveForLaterElement")||(this.$saveForLaterElement=this.$form.find(this.options.selectors.saveForLater)),this.$saveForLaterElement},getSaveForLaterState:function(){return this.getSaveForLaterElement().prop("checked")},setSaveForLaterBasedOnForm:function(){o.trigger("checkout:payment:save-for-later:change",this.getSaveForLaterState())},onPaymentMethodChanged:function(e){e.paymentMethod===this.options.paymentMethod&&this.onCurrentPaymentMethodSelected()},onCurrentPaymentMethodSelected:function(){this.setGlobalPaymentValidate(this.paymentValidationRequiredComponentState),this.setSaveForLaterBasedOnForm()},onSaveForLaterChange:function(e){const t=i(e.target);o.trigger("checkout:payment:save-for-later:change",t.prop("checked"))},beforeTransit:function(e){e.data.paymentMethod===this.options.paymentMethod&&(e.stopped=!this.validate())},beforeHideFilledForm:function(){this.disposable=!1},beforeRestoreFilledForm:function(){this.disposable&&this.dispose()},removeFilledForm:function(){this.disposable||(this.disposable=!0,this.dispose())}});return r}.call(t,s,t,e))||(e.exports=i)},"./bundles/oropaypal/js/app/components/payflow-express-checkout-component.js":(e,t,s)=>{var i;void 0===(i=function(e){"use strict";const t=s("./bundles/oroui/js/extend/underscore.js"),i=s("./bundles/oroui/js/mediator.js"),o=s("./bundles/oroui/js/app/components/base/component.js").extend({options:{paymentMethod:null},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){this.options=t.extend({},this.options,e),i.on("checkout:place-order:response",this.handleSubmit,this)},handleSubmit:function(e){if(e.responseData.paymentMethod===this.options.paymentMethod){if(e.stopped=!0,!e.responseData.purchaseRedirectUrl)return void i.execute("redirectTo",{url:e.responseData.errorUrl},{redirect:!0});window.location=e.responseData.purchaseRedirectUrl}},dispose:function(){this.disposed||(i.off("checkout:place-order:response",this.handleSubmit,this),o.__super__.dispose.call(this))}});return o}.call(t,s,t,e))||(e.exports=i)},"./bundles/razoyocategorytiles/js/app/components/category-tiles.js":(e,t,s)=>{var i;void 0===(i=function(e){"use strict";s("./bundles/oroui/js/extend/underscore.js");var t=s("./bundles/oroui/js/extend/jquery.js"),i=(s("./bundles/fosjsrouting/js/router.js"),s("./bundles/oroui/js/app/components/base/component.js")),o=s("./bundles/oroui/js/mediator.js");return i.extend({options:{},itemSelector:".featured-categories .tiles-item",tilesSelector:".featured-categories .embedded-list__tiles",gridSelector:"div.oro-datagrid",stickyHeaderSelector:".sticky-panel__content #sticky_element_toolbar",initialize:function(e){this.options=e,o.on("category-tiles:filter",this.filterCategories,this),o.setHandler("category-tiles:has-tiles",this.hasTiles.bind(this)),o.setHandler("category-tiles:hide-tiles",this.hideTiles.bind(this)),o.setHandler("category-tiles:show-tiles",this.showTiles.bind(this)),o.setHandler("category-tiles:hide-products",this.hideProducts.bind(this)),o.setHandler("category-tiles:show-products",this.showProducts.bind(this)),this.hasTiles()||this.showProducts()},filterCategories:function(e){var s=!1;t(this.itemSelector).each((function(i,o){if(Array.isArray(e))var n=parseInt(t(o).find(".featured-category").attr("category-id")),r=e.includes(n);else r=!0;r&&(s=!0),t(o).toggle(r)})),t(".no-data",this.options._sourceElement).toggle(!s)},hasTiles:function(){return t(this.itemSelector).length>0},showTiles:function(){t(this.tilesSelector).show()},hideTiles:function(){t(this.tilesSelector).hide()},showProducts:function(){t(this.gridSelector).parent().show(),t(this.stickyHeaderSelector).show()},hideProducts:function(){t(this.gridSelector).parent().hide(),t(this.stickyHeaderSelector).hide()}})}.call(t,s,t,e))||(e.exports=i)},"./bundles/razoyoprintui/js/app/components/design-checkout-component.js":(e,t,s)=>{var i;void 0===(i=function(e){"use strict";var t=s("./bundles/oroui/js/extend/jquery.js"),i=s("./bundles/oroui/js/mediator.js"),o=s("./bundles/fosjsrouting/js/router.js");return s("./bundles/oroui/js/app/components/base/component.js").extend({initialize:function(e){var t=e._sourceElement,s=this;return t.click((function(e){s.startCheckout(),e.preventDefault(),e.stopPropagation()})),null},dispose:function(){return null},startCheckout:function(){i.execute("showLoading"),t.ajax({type:"POST",url:o.generate("razoyo_print_ui_checkout"),data:t("#design-quickorder").serialize(),success:function(e){if(e.errors)for(var t in e.errors)i.execute("showMessage","error",e.errors[t]);e.redirectUrl&&i.execute("redirectTo",{url:e.redirectUrl})}.bind(this),complete:function(){i.execute("hideLoading")}})}})}.call(t,s,t,e))||(e.exports=i)},"./bundles/razoyoprintui/js/app/views/razoyo-toggle-sticky-header.js":(e,t,s)=>{var i;void 0===(i=function(e){"use strict";var t=s("./bundles/oroui/js/extend/jquery.js"),i=s("./bundles/oroui/js/extend/underscore.js"),o=s("./bundles/oroui/js/app/views/base/view.js");return s("./bundles/oroui/js/app/components/base/component.js"),o.extend({initialize:function(e){this.header=document.getElementById("sticky-header"),this.sticky=this.header.offsetTop,t(document).on("scroll",i.bind(this.onScroll,this))},onScroll:function(){window.pageYOffset>=this.sticky?this.header.classList.add("sticky"):this.header.classList.remove("sticky")}})}.call(t,s,t,e))||(e.exports=i)},"./bundles/razoyoprintui/js/app/views/resize-html-editor-component.js":(e,t,s)=>{var i;void 0===(i=function(e){"use strict";var t=s("./bundles/oroui/js/extend/jquery.js"),i=s("./bundles/oroui/js/app/views/base/view.js");return s("./bundles/oroui/js/app/components/base/component.js"),i.extend({initialize:function(e){this.save_url=e.save_url,this.cancel_url=e.cancel_url,t(document).ready(function(){this.resizeHtmlEditor()}.bind(this)),t(window).resize(function(){this.resizeHtmlEditor()}.bind(this)),window.addEventListener&&window.addEventListener("message",this.postMessageHandler.bind(this))||window.attachEvent&&window.attachEvent("onmessage",this.postMessageHandler.bind(this))},resizeHtmlEditor:function(){var e=460;document.body&&document.body.offsetWidth&&(document.body.offsetWidth,e=document.body.offsetHeight),"CSS1Compat"==document.compatMode&&document.documentElement&&document.documentElement.offsetWidth&&(document.documentElement.offsetWidth,e=document.documentElement.offsetHeight),window.innerWidth&&window.innerHeight&&(window.innerWidth,e=window.innerHeight);var s=e,i=document.getElementById("html5Content");i.setAttribute("style","width:100%; height:"+s+"px"),i.style.width="100%",i.style.height=s+"px",t(".main").attr("style","min-height: "+s+"px;")},postMessageHandler:function(e){"printui_finished"==e.data&&(window.location=this.save_url),"printui_cancel"==e.data&&(window.location=this.cancel_url)}})}.call(t,s,t,e))||(e.exports=i)},"./bundles/razoyoquickaddvalidation/js/app/components/ajax-button.js":(e,t,s)=>{var i;void 0===(i=function(e){"use strict";var t=s("./bundles/oroui/js/extend/jquery.js"),i=s("./bundles/oroui/js/extend/underscore.js"),o=s("./bundles/orotranslation/js/translator.js"),n=s("./bundles/oroui/js/mediator.js"),r={};function a(e){e.preventDefault();var s=t(e.currentTarget).data("method"),i=t(e.currentTarget).data("url"),r=t(e.currentTarget).data("redirect"),a=t(e.currentTarget).data("success-message"),c=t(e.currentTarget).data("error-message");n.execute("showLoading"),t.ajax({url:i,type:s,success:function(s){n.execute("showFlashMessage","success",s&&s.message?s.message:o(a)),t(e.currentTarget).addClass("disabled"),void 0!==r&&n.execute("redirectTo",{url:r},{redirect:!0})},errorHandlerMessage:o(c),complete:function(){n.execute("hideLoading")}})}return function(e){i.extend(r,e||{}),r._sourceElement.click(t.proxy(a,null))}}.call(t,s,t,e))||(e.exports=i)},"./bundles/razoyoyearmakemodel/js/app/components/year-make-model-component.js":(e,t,s)=>{var i;void 0===(i=function(e){"use strict";const t=s("./bundles/oroui/js/extend/jquery.js"),i=s("./bundles/oroui/js/app/components/base/component.js"),o=s("./bundles/oroui/js/mediator.js");return i.extend({filters:{},options:{},searchName:"ymm-classic",selectButton:null,parentCatLink:null,filterNames:[],useParentCat:null,initialize:function(e){this.options=e,e.fields.forEach((function(e){t("#ymm-"+e).on("change",this.change(e).bind(this)),this.filterNames.push(e)}),this),t(".ymm-clear").on("click",this.clearFilters.bind(this)),this.selectButton=t(".ymm-search-button",this.options._sourceElement),this.selectButton.on("click",this.searchSelectedClick.bind(this)),o.on("ymm:searchSelected",this.searchSelected,this),this.initFilters();const s=t(".breadcrumbs__item").children();this.parentCatLink=t(s[s.length-1]).attr("href"),this.useParentCat=e.useParentCat},initFilters:function(){let e=!1;for(let t=0;t<this.filterNames.length;t++){const s=this.getCookie(this.filterNames[t]);null!=s&&"undefined"!==s&&(e=!0,this.filters[this.filterNames[t]]=s)}e&&(this.enable(),this.filtersChanged())},clearFilters:function(){this.useParentCat&&this.filters!=={}&&!o.execute("category-tiles:has-tiles")&&(window.location=this.parentCatLink),this.filters={};for(let e=0;e<this.filterNames.length;e++)this.deleteCookie(this.filterNames[e]);this.filtersChanged()},filtersChanged:function(){o.execute("category-tiles:has-tiles")?(Object.keys(this.filters).length>=this.filterNames.length-1?(o.execute("category-tiles:hide-tiles"),o.execute("category-tiles:show-products"),o.trigger("datagrid:doRefresh:frontend-product-search-grid")):(o.execute("category-tiles:show-tiles"),o.execute("category-tiles:hide-products")),Object.keys(this.filters).length>0?t.get(this.options.categoriesRoute,{filters:JSON.stringify(this.filters)},(function(e){o.trigger("category-tiles:filter",e)}),"json"):o.trigger("category-tiles:filter",null)):o.trigger("datagrid:doRefresh:frontend-product-search-grid"),this.options.fields.forEach((function(e){t("#ymm-"+e).prop("disabled",!0)})),this.refresh()},dispose:function(){},change:function(e){return function(t){const s=t.val;""===s?(delete this.filters[e],this.deleteCookie(e)):(this.filters[e]=s,this.setCookie(e,s)),this.filtersChanged()}},refresh:function(){const e={categoryId:this.options.category_id,filters:JSON.stringify(this.filters)};t.post(this.options.refreshRoute,e,function(e){for(const s in e){const i=t("#ymm-"+s),o=(i.val(),e[s]);i.children("option:not(:first)").remove();for(const e in o){const t=o[e];i.append('<option value="'+t+'">'+t+"</option>")}let n;n=s in this.filters?this.filters[s]:"",i.val(n).trigger("change.select2"),i.prop("disabled",!1)}}.bind(this),"json")},searchSelected:function(e){e===this.searchName?this.enable():(this.disable(),this.clearFilters())},searchSelectedClick:function(){o.trigger("ymm:searchSelected",this.searchName)},enable:function(){this.selectButton.find(".btn").toggleClass("inactive",!1),t(".ymm-filters .ymm-mask").toggleClass("mask",!1)},disable:function(){this.selectButton.find(".btn").toggleClass("inactive",!0),t(".ymm-filters .ymm-mask").toggleClass("mask",!0)},setCookie:function(e,t){const s=new Date,i=s.getTime()+864e5;s.setTime(i),document.cookie=e+"="+t+";expires="+s.toGMTString()+";path=/"},getCookie:function(e){const t=document.cookie.split(/; */);for(let s=0;s<t.length;s++){const i=t[s].substring(0,t[s].indexOf("=")),o=t[s].substring(t[s].indexOf("=")+1);if(i===e)return o}},deleteCookie:function(e){document.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/;"}})}.call(t,s,t,e))||(e.exports=i)},"./bundles/razoyoyearmakemodel/js/app/components/year-make-model-directions-component.js":(e,t,s)=>{var i;void 0===(i=function(e){"use strict";s("./bundles/oroui/js/extend/underscore.js"),s("./bundles/oroui/js/extend/jquery.js"),s("./bundles/fosjsrouting/js/router.js");var t=s("./bundles/oroui/js/app/components/base/component.js"),i=s("./bundles/oroui/js/mediator.js");return t.extend({options:{},initialize:function(e){this.options=e,i.on("ymm:searchSelected",this.searchSelected,this)},searchSelected:function(){this.options._sourceElement.hide()}})}.call(t,s,t,e))||(e.exports=i)},"./bundles/razoyoyearmakemodel/js/app/components/year-make-model-search-component.js":(e,t,s)=>{var i;void 0===(i=function(e){"use strict";let t;s("./bundles/oroui/js/extend/underscore.js");const i=s("./bundles/oroui/js/extend/jquery.js"),o=(s("./bundles/fosjsrouting/js/router.js"),s("./bundles/oroui/js/app/components/base/component.js")),n=s("./bundles/oroui/js/mediator.js");return t=o.extend({options:{},selectButton:null,parentCatLink:null,searchName:"ymm-cross",searchCookie:"cross_search",initialize:function(e){this.options=e,i(".ymm-search-input",this.options._sourceElement).keyup(this.onSearchEnter.bind(this)),i(".ymm-search-btn",this.options._sourceElement).on("click",this.onSearchButtonClick.bind(this)),this.selectButton=i(".ymm-search-button",this.options._sourceElement),this.selectButton.on("click",this.searchSelectedClick.bind(this)),n.on("ymm:searchSelected",this.searchSelected,this),this.initSearchTerm();const t=i(".breadcrumbs__item").children();this.parentCatLink=i(t[t.length-1]).attr("href")},initSearchTerm:function(){const e=this.getCookie(this.searchCookie);null!=e&&"undefined"!==e&&(i(".ymm-search-input",this.options._sourceElement).val(e),this.enable(),this.applySearch())},dispose:function(){},applySearch:function(){const e=i(".ymm-search-input",this.options._sourceElement).val();e&&this.setCookie(this.searchCookie,e),n.execute("category-tiles:has-tiles")?e?(n.execute("category-tiles:hide-tiles"),n.execute("category-tiles:show-products"),n.trigger("datagrid:doRefresh:frontend-product-search-grid"),i.get(this.options.categoriesRoute,{search:e},(function(e){n.trigger("category-tiles:filter",e)}),"json")):(n.execute("category-tiles:show-tiles"),n.execute("category-tiles:hide-products"),n.trigger("category-tiles:filter",null)):n.trigger("datagrid:doRefresh:frontend-product-search-grid")},onSearchButtonClick:function(e){this.applySearch()},onSearchEnter:function(e){13===e.keyCode&&this.onSearchButtonClick(e)},clearInput:function(e){""===i(".ymm-search-input",this.options._sourceElement).val()||n.execute("category-tiles:has-tiles")||(window.location=this.parentCatLink),i(".ymm-search-input",this.options._sourceElement).val(""),this.deleteCookie(this.searchCookie),this.applySearch()},searchSelected:function(e){e===this.searchName?this.enable():(this.disable(),this.clearInput())},searchSelectedClick:function(){n.trigger("ymm:searchSelected",this.searchName)},enable:function(){this.selectButton.find(".btn").toggleClass("inactive",!1),i(".ymm-search-container .ymm-mask").toggleClass("mask",!1)},disable:function(){this.selectButton.find(".btn").toggleClass("inactive",!0),i(".ymm-search-container .ymm-mask").toggleClass("mask",!0)},setCookie:function(e,t){const s=new Date,i=s.getTime()+864e5;s.setTime(i);const o=e+"="+t+";expires="+s.toGMTString()+";path=/";document.cookie=o},getCookie:function(e){const t=document.cookie.split(/; */);for(let s=0;s<t.length;s++){const i=t[s].substring(0,t[s].indexOf("=")),o=t[s].substring(t[s].indexOf("=")+1);if(i===e)return o}},deleteCookie:function(e){document.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/;"}}),t}.call(t,s,t,e))||(e.exports=i)}}]);