PageSourceSearch

https://www.hollandamerica.com/etc.clientlibs/carnival/clientlibs/…-brochure-component.c3eb7333948d2ae0898f.js

js hollandamerica.com collected 2026-09-24 08:38:15 UTC 5,671 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkaem_maven_archetype=self.webpackChunkaem_maven_archetype||[]).push([[2308],{8816:function(t,e,a){a.r(e),a.d(e,{default:function(){return p}});var n=a(4692),r=a.n(n),i=a(2505),o=a.n(i),c=a(9838),l=a(1145),s=a(1995),u=a(3683);function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function f(t,e){for(var a=0;a<e.length;a++){var n=e[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,h(n.key),n)}}function h(t){var e=function(t,e){if("object"!=d(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var n=a.call(t,e||"default");if("object"!=d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==d(e)?e:e+""}var p=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.formType=[],this.destinationUrl="",this.countryUrl="",this.countryData=[],this.stateData=[],this.submitUrl="",this.redirectUrl=r()(e).find(".cmp-form").attr("data-redirect-url"),this.el=e,this.init(e)},e=[{key:"populateCountry",value:function(){if(r()(this.el).find(".country-ctrl")){var t=(0,u.mxm)(this.countryUrl);o().get(t).then(function(t){this.countryData=t.data.countries;var e=r()(this.el).attr("data-page-name"),a='<option value="" data-automation-id="'+e+'-CountryPlaceholder">Country</option>';this.countryData.forEach(function(t){a+='<option value="'.concat(t.code,'"\n                    class="dropdown-item"\n                    aria-label="').concat(t.name,'" data-automation-id="').concat(e,'-CountryOption">').concat(t.name,"</option>")}),r()(this.el).find(".country-ctrl > select").html(a),r()(this.el).find(".state-ctrl").hide();var n=(0,u.gI7)();if(n){var i;r()(this.el).find(".country-ctrl > select > option[value='".concat(n,"']")).attr("selected","selected");var o='<option value="" data-automation-id= "'+e+'-StatePlaceholder">State / Province</option>';this.stateData=this.countryData.filter(function(t){return t.code===n})[0],this.stateData["states-provinces"]&&r()(this.el).find(".state-ctrl").show(),null===(i=this.stateData["states-provinces"])||void 0===i||i.forEach(function(t){o+='<option value="'.concat(t.code,'"\n                            class="dropdown-item"\n                            data-automation-id= "').concat(e,'-StateOption"\n                            aria-label="').concat(t.name,'">').concat(t.name,"</option>")}),r()(this.el).find(".state-ctrl > select").html(o)}}.bind(this))}}},{key:"populateState",value:function(t){var e;this.stateData=this.countryData.filter(function(e){return e.code===t.currentTarget.value})[0];var a,n=r()(this.el).attr("data-page-name"),i='<option value="" data-automation-id= "'+n+'-StatePlaceholder">State / Province</option>';(null===(e=this.stateData["states-provinces"])||void 0===e?void 0:e.length)>0?(r()(this.el).find(".state-ctrl").show(),null===(a=this.stateData["states-provinces"])||void 0===a||a.forEach(function(t){i+='<option value="'.concat(t.code,'"\n            class="dropdown-item"\n            data-automation-id= "').concat(n,'-StateOption"\n            aria-label="').concat(t.name,'">').concat(t.name,"</option>")})):r()(this.el).find(".state-ctrl").hide(),r()(this.el).find(".state-ctrl > select").html(i)}},{key:"generalEventBinding",value:function(){r()(this.el).find(".country-ctrl > select").on("change",this.populateState.bind(this)),r()(this.el).find(".submit-button").on("click",this.formSubmit.bind(this)),r()(this.el).find(".cta-secondary").on("click",this.formCancel)}},{key:"init",value:function(t){var e,a;null!==(e=document.querySelector(".cmp-title .cmp-title__text"))&&void 0!==e&&e.innerText?(0,s.tg)(null===(a=document.querySelector(".cmp-title .cmp-title__text"))||void 0===a?void 0:a.innerText):(0,s.tg)("get in the know");var n=r()(t).find("#lead-form").attr("data-api-url").split(",");this.countryUrl=n[0],this.submitUrl=n[1],this.populateCountry(t),this.generalEventBinding()}},{key:"formSubmit",value:function(t){var e=this;if(r()(t.currentTarget).parents(".cmp-form").valid()){t.preventDefault();var a=(0,c.A)(r()(t.currentTarget).parents(".cmp-form").serializeArray()),n=r()(this.el).attr("data-primary-brand-Text"),i=r()(this.el).attr("data-affialate-brand-Text"),d=sessionStorage.getItem(l.XID_KEY);"checked"===n&&"checked"===i?a.formType=[l.BROCHURE,l.GROUPMAIL]:"checked"===n?a.formType=[l.BROCHURE]:"checked"===i&&(a.formType=[l.GROUPMAIL]),a.contactPreferenceMail=!0,a.voyageId="",d&&(a.xid=d),a.address2||delete a.address2;var f=r()(t.currentTarget).parents(".cmp-form").find('input[name="CheckboxTravel"]');0!==f.length&&("on"===a.CheckboxTravel||"hidden"==f.attr("type")?a.useTravelProfessional=!0:a.useTravelProfessional=!1),delete a.CheckboxAgree,delete a.CheckboxTravel,a.state||delete a.state,o().post(this.submitUrl,a).then(function(t){t.data&&sessionStorage.setItem(l.LEAD_GEN_UUID,JSON.stringify(t.data.data.uuid[0])),window.location.replace(e.redirectUrl),r()(e.el).find(".form-error").attr("style","display:none")}).catch(function(t){var a;r()(e.el).find(".form-error .cmp-text").html("<p>"+(0,u.AHo)(t)+"</p>"),r()(e.el).find(".form-error").attr("style","display:block"),(0,s.od)(null===(a=r()(e.el).find(".form-error"))||void 0===a?void 0:a.text())})}}},{key:"formCancel",value:function(){history.back()}}
1],e&&f(t.prototype,e),a&&f(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,a}()}}]);

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.