1"use strict";(self.webpackChunkroyal=self.webpackChunkroyal||[]).push([[3499],{53499:(b,p,s)=>{s.r(p),s.d(p,{rcg_input_phone:()=>h});var d=s(10467),i=s(42742),u=s(19111);const h=class{constructor(t){(0,i.r)(this,t),this.valueChanged=(0,i.c)(this,"valueChanged"),this.autofocus=!1,this.required=!1,this.errorMessage="",this.brand="royal",this.maskForContentSquare=!1,this.autocomplete="off",this.focused=!1,this.focusedSelect=!1,this.setInputFocus=()=>{this.focused=!0},this.setInputFocusOut=()=>{this.focused=!1,this.valueChanged.emit(Object.assign(Object.assign({},this.inputData),{isComplete:!0}))},this.setInputFocusSelect=()=>{this.focusedSelect=!0},this.setInputFocusOutSelect=()=>{this.focusedSelect=!1,this.focused=!1},this.clearInput=()=>{this.textInput.value=""}}get computedStyles(){return(0,u.a)(this.customStyles)}watchSubmittedHandler(t){t&&!this.textInput.value&&this.valueChanged.emit(this.inputData)}componentWillLoad(){var t,o,e;let n;if(this.phoneCallingCodes&&(n=(0,u.p)(this.phoneCallingCodes,"value prop format invalid"),this.callingCodeOptions=this.generateCountryOptions(n),this.selectedISOCountryCode=this.callingCodeOptions[0].triggerLabel,this.selectedCallingCode=`+${n.find(r=>r.countryCode===this.selectedISOCountryCode).callingCode}`),this._value=(null===(t=this.value)||void 0===t?void 0:t.length)>0?(0,u.p)(this.value,"value prop format invalid"):{phoneNumber:"",countryCode:""},this.hasDefaultValue()){const r=null!==(e=null===(o=n.find(a=>{var l;return a.countryCode===(null===(l=this._value)||void 0===l?void 0:l.countryCode)}))||void 0===o?void 0:o.callingCode)&&void 0!==e?e:"";this.inputData={label:this.name,value:`${r}${this._value.phoneNumber}`,isValid:!this.showErrorMessage(),countryCode:this._value.countryCode,phoneNumber:this._value.phoneNumber},this.selectedCallingCode=`+${r}`,this.valueChanged.emit(this.inputData)}}componentDidLoad(){var t;!(null===(t=this.selectInput)||void 0===t)&&t.value&&(this.selectedCallingCode=(0,u.p)(this.selectInput.value).value),this.autofocus&&(setTimeout(()=>this.textInput.focus(),0),this.setInputFocus())}hasDefaultValue(){return!(!this._value||null===this._value||""===this._value.phoneNumber||(this.phoneValue=this._value.phoneNumber,this.selectedISOCountryCode=this._value.countryCode,0))}handleChange(t){this.phoneValue=t.target.value,this._value?this._value.phoneNumber=this.phoneValue:this._value={countryCode:this.selectedISOCountryCode||"",phoneNumber:this.phoneValue},this.emitValueChanged()}emitValueChanged(){const t=this.phoneValue?this.phoneValue:"";this.inputData={label:this.name,value:`${this.selectedCallingCode}${t}`,isValid:!this.showErrorMessage(),countryCode:this.selectedISOCountryCode,phoneNumber:t},this.valueChanged.emit(this.inputData)}resetPhoneField(t){var o=this;return(0,d.A)(function*(){var e,n;const r=t?.phoneNumber||"";let l,a=t?.countryCode||"";o._value={phoneNumber:r,countryCode:a},o.phoneValue=r,!(null===(e=o.callingCodeOptions)||void 0===e)&&e.length&&(l=o.callingCodeOptions.find(f=>f.triggerLabel===a),l||(l=null===(n=o.callingCodeOptions)||void 0===n?void 0:n[0],a=l?.triggerLabel||"",o._value.countryCode=a),o.selectedISOCountryCode=l?.triggerLabel||"",o.selectedCallingCode=l?.value||"",o.selectInput&&(o.selectInput.value=JSON.stringify(l))),o.textInput&&(o.textInput.value=r),o.inputData={label:o.name,countryCode:a,phoneNumber:r,isValid:r.length>0,value:`${o.selectedCallingCode}${r}`},o.valueChanged.emit(o.inputData)})()}generateCountryOptions(t){return t.map(o=>({value:`+${o.callingCode}`,label:this.createCountryLabel(o),triggerLabel:o.countryCode,sorting:o.sorting}))}createCountryLabel(t){let o=t.countryName;return t.callingCode&&(o=[o,`(+${t.callingCode})`].join(" ")),o}updateCountryCode(t){this.selectedCountryOption=t,this.selectedISOCountryCode=t.triggerLabel,this.selectedCallingCode=t.value,this.selectedISOCountryCode&&this._value&&(this._value.countryCode=this.selectedISOCountryCode)}handleCountryChange(t){var o,e,n;if(!t.target.value)return this.inputData={label:this.name,value:`${(null===(o=this._value)||void 0===o?void 0:o.phoneNumber)||""}`,isValid:!1,countryCode:"",phoneNumber:(null===(e=this._value)||void 0===e?void 0:e.phoneNumber)||""},void this.valueChanged.emit(this.inputData);const r=(0,u.p)(t.target.value);if(this.updateCountryCode(r),this.phoneValue||this.hasDefaultValue()){this.emitValueChanged();const a=this.el.shadowRoot.querySelector(`#rcg-input-phone-${this.group}-${this.name}`);a instanceof HTMLInputElement&&a.focus()}else this.inputData={label:this.name,isValid:!1,countryCode:this.selectedISOCountryCode||"",phoneNumber:"",value:`${this.selectedCallingCode}${(null===(n=this._value)||void 0===n?void 0:n.phoneNumber)||""}`},this.valueChanged.emit(this.inputData)}disallowLettersInput(t){const o=t.key;!/\d/.test(o)&&!"()+-".includes(o)&&t.preventDefault()}showErrorMessage(){return!!this.errorMessage}render(){var t;const o=this.focusedSelect?`input-phone__select--${this.brand}`:"";return(0,i.h)(i.H,{key:"e90e44cf03dc3ed0d4f225fe57c3b224fbfb6b78"},(0,i.h)("div",{key:"e89c8ebe3322973868c4a851fea75a14f1cabac5",class:`input-phone\n ${this.focused?"input-phone--focus":""} input-phone-${this.brand}\n ${this.showErrorMessage()?"input-phone--error":""}`,onClick:this.setInputFocus,"data-cs-mask":this.maskForContentSquare?"":null},(0,i.h)("select",{key:"d47e403b6a256a2a8e4a942bb830ae5452592163",name:"",id:"country-select","aria-label":this.label,class:`input-phone__select ${o}`,onFocus:this.setInputFocusSelect.bind(this),onFocusout:this.setInputFocusOutSelect.bind(this),tabindex:"0",ref:e=>this.selectInput=e,onInput:e=>this.handleCountryChange(e)},!(null!==(t=this._value)&&void 0!==t&&t.countryCode)&&(0,i.h)("option",{key:"empty",value:"",disabled:!0,selected:!0,hidden:!0}),this.callingCodeOptions.map(e=>(0,i.h)("option",{key:e.triggerLabel,selected:this._value&&this._value.countryCode?e.triggerLabel===this._value.countryCode:this.selectValue===JSON.stringify(e),value:JSON.stringify(e)},e.label))),(0,i.h)("span",{key:"d70693ea0c9be8ae43987a20e5cf690324264839",class:"input-phone__chevron"}),(0,i.h)("span",{key:"9c2245b5ab250e17585712008cd60344abf36b7a",class:"input-phone__trigger"},this._value&&this._value.countryCode?this._value.countryCode:this.selectedISOCountryCode),(0,i.h)("div",{key:"94fb0cd90ba93471d20f0fca8ec91ac73ebd406b",class:"input-phone__number"},(0,i.h)("div",{key:"e97981f030931083e9a4396d985c1608f2dc19a8",class:"input-phone__number__input"},!this.showErrorMessage()&&this.focused&&this.showClearButton&&(0,i.h)("clear-button",{key:"3dc3044697e05128e89709fd1a3dbb967d1293db",onFocus:this.setInputFocus,onFocusOut:this.setInputFocusOut,onClick:this.clearInput}),this.showErrorMessage()&&(0,i.h)("exclamation-icon",{key:"10202a392e568991c34af1b9ecce4e3fb9b94752"}),(0,i.h)("span",{key:"82a0edf0b02618fac43985d6bea2f6e9161b2add",class:"input-phone__number__input__prefix",style:this.computedStyles},this.selectedCallingCode),(0,i.h)("input",{key:"9a8ceab9f96cab60a070c1cfbf62f63d15ce8298",style:this.computedStyles,id:`rcg-input-phone-${this.group}-${this.name}`,name:this.name,"aria-label":this.label,onInput:this.handleChange.bind(this),onFocus:this.setInputFocus.bind(this),onFocusout:this.setInputFocusOut.bind(this),placeholder:"text",ref:e=>this.textInput=e,class:"input-phone__number__input__field",type:"tel",required:this.required,pattern:this.pattern,maxLength:this.maxLength,minLength:this.minLength,onKeyPress:this.disallowLettersInput.bind(this),value:this._value?this._value.phoneNumber:"",autocomplete:this.autocomplete})),(0,i.h)("label",{key:"365750b3c79247a2ab0c8ce3f54f4f1982d35ccf",class:`input-phone__number__label\n ${this.focused?"input-phone__number__label--focus":""}\n ${this.showErrorMessage()?"input-phone__number__label--error":""}`,htmlFor:`rcg-input-phone-${this.group}-${this.name}`},this.label))),this.showErrorMessage()&&(0,i.h)("input-error",{key:"810ee33777ac2ab7dd82b4720f8f15e58cdfd8e5",errorMessage:this.errorMessage}))}get el(){return(0,i.a)(this)}static get watchers(){return{submitted:[{watchSubmittedHandler:0}]}}};h.style={celebrity:'.input-phone__number__input__field{position:relative;top:23px;color:#131516;caret-color:#131516;font-size:16px;font-weight:700;width:100%;border:none;outline:none;line-height:20px;letter-spacing:0.15px}:host{width:100%;outline:none;--input-font-size:16px}.input-phone{height:56px;border:1px solid #B4BAC0;border-radius:4px;background-color:#ffffff;display:flex;margin-bottom:12px;position:relative}.input-phone ::placeholder{color:transparent}.input-phone ::-ms-input-placeholder{color:transparent}.input-phone{border:1px solid #B4BAC0}.input-phone-celebrity.input-phone--focus{border-color:#2588CD}.input-phone.input-phone--error{border-color:#e40f2f}.input-phone--focus{border-color:#006AF4}.input-phone--disable-border{border-width:0}.input-phone--readonly{pointer-events:none}.input-phone__number{padding:3px 9px;display:flex;flex-direction:column;width:80%}.input-phone__number__label{position:relative;bottom:24px;color:#555F61;font-size:14px;font-weight:400;padding-top:1.6rem;transition:all 0.3s ease;line-height:20px;letter-spacing:0.15px}.input-phone__number__label--float{font-size:12px;opacity:1;line-height:16px;letter-spacing:0.15px}.input-phone__number__label--error{color:#e40f2f}.input-phone__number__label--focus{font-weight:400;opacity:1}.input-phone__number__label{font-size:12px;padding-top:7px}.input-phone__number__label--error{color:var(--error-color-sign-in, #e40f2f)}.input-phone__number__label--focus{font-size:12px;opacity:1;padding-top:10px}.input-phone__number__label--selected{display:block;transform:translateY(-4px);font-size:12px;padding-top:10px}.input-phone__number__input__field{top:24px;width:80%}@keyframes cdk-text-field-autofill-color-royal{to{background:transparent;color:#131516}}.input-phone__number__input__field.cdk-text-field-autofill-monitored:-webkit-autofill{animation-fill-mode:both;animation-name:cdk-text-field-autofill-start, cdk-text-field-autofill-color-royal !important}.input-phone__number__input__field{font-size:var(--input-font-size)}.input-phone__number__input__prefix{position:relative;top:24px;color:#555f61;padding-right:2px;font-size:var(--input-font-size)}.input-phone__number__input__clear{position:absolute;right:14px;top:20px;background-color:rgba(85, 95, 97, 0.5);border:none;height:20px;width:20px;border-radius:100%;outline:none;text-align:center;font-weight:bold;z-index:100;padding:2px;cursor:pointer}.input-phone__number__input__clear:hover{background-color:#6a7582}.input-phone__number__input__clear__icon{cursor:pointer}.input-phone__select{width:75px;padding-left:16px;
1background-color:rgba(237, 240, 244, 0.5019607843);border:none;appearance:none;color:transparent}.input-phone__select--royal{background-color:#006AF4;opacity:0.2}.input-phone__select--celebrity{background-color:#004275;opacity:0.2}.input-phone__select option{background-color:#ffffff;color:#555F61}.input-phone__trigger{position:absolute;top:19px;left:16px;font-weight:bold;font-size:16px;color:#131516}.input-phone__chevron::before{border-style:solid;border-width:0.09em 0.09em 0 0;content:"";height:0.3em;position:absolute;vertical-align:top;width:0.3em;top:23px;left:57px;color:#555f61;transform:rotate(135deg)}.input-phone--error{margin-bottom:4px}input-error{display:block;margin-bottom:12px}',royal:'.input-phone__number__input__field{position:relative;top:23px;color:#131516;caret-color:#131516;font-size:16px;font-weight:700;width:100%;border:none;outline:none;line-height:20px;letter-spacing:0.15px}:host{width:100%;outline:none;--input-font-size:16px}.input-phone{height:56px;border:1px solid #B4BAC0;border-radius:4px;background-color:#ffffff;display:flex;margin-bottom:12px;position:relative}.input-phone ::placeholder{color:transparent}.input-phone ::-ms-input-placeholder{color:transparent}.input-phone{border:1px solid #B4BAC0}.input-phone-celebrity.input-phone--focus{border-color:#2588CD}.input-phone.input-phone--error{border-color:#e40f2f}.input-phone--focus{border-color:#006AF4}.input-phone--disable-border{border-width:0}.input-phone--readonly{pointer-events:none}.input-phone__number{padding:3px 9px;display:flex;flex-direction:column;width:80%}.input-phone__number__label{position:relative;bottom:24px;color:#555F61;font-size:14px;font-weight:400;padding-top:1.6rem;transition:all 0.3s ease;line-height:20px;letter-spacing:0.15px}.input-phone__number__label--float{font-size:12px;opacity:1;line-height:16px;letter-spacing:0.15px}.input-phone__number__label--error{color:#e40f2f}.input-phone__number__label--focus{font-weight:400;opacity:1}.input-phone__number__label{font-size:12px;padding-top:7px}.input-phone__number__label--error{color:var(--error-color-sign-in, #e40f2f)}.input-phone__number__label--focus{font-size:12px;opacity:1;padding-top:10px}.input-phone__number__label--selected{display:block;transform:translateY(-4px);font-size:12px;padding-top:10px}.input-phone__number__input__field{top:24px;width:80%}@keyframes cdk-text-field-autofill-color-royal{to{background:transparent;color:#131516}}.input-phone__number__input__field.cdk-text-field-autofill-monitored:-webkit-autofill{animation-fill-mode:both;animation-name:cdk-text-field-autofill-start, cdk-text-field-autofill-color-royal !important}.input-phone__number__input__field{font-size:var(--input-font-size)}.input-phone__number__input__prefix{position:relative;top:24px;color:#555f61;padding-right:2px;font-size:var(--input-font-size)}.input-phone__number__input__clear{position:absolute;right:14px;top:20px;background-color:rgba(85, 95, 97, 0.5);border:none;height:20px;width:20px;border-radius:100%;outline:none;text-align:center;font-weight:bold;z-index:100;padding:2px;cursor:pointer}.input-phone__number__input__clear:hover{background-color:#6a7582}.input-phone__number__input__clear__icon{cursor:pointer}.input-phone__select{width:75px;padding-left:16px;background-color:rgba(237, 240, 244, 0.5019607843);border:none;appearance:none;color:transparent}.input-phone__select--royal{background-color:#006AF4;opacity:0.2}.input-phone__select--celebrity{background-color:#004275;opacity:0.2}.input-phone__select option{background-color:#ffffff;color:#555F61}.input-phone__trigger{position:absolute;top:19px;left:16px;font-weight:bold;font-size:16px;color:#131516}.input-phone__chevron::before{border-style:solid;border-width:0.09em 0.09em 0 0;content:"";height:0.3em;position:absolute;vertical-align:top;width:0.3em;top:23px;left:57px;color:#555f61;transform:rotate(135deg)}.input-phone--error{margin-bottom:4px}input-error{display:block;margin-bottom:12px}'}},19111:(b,p,s)=>{s.d(p,{C:()=>d,T:()=>i,a:()=>o,b:()=>_,c:()=>u,f:()=>t,p:()=>h});const d={s:"small",m:"medium",l:"large"},i={availability:{label:"Few spots left!",color:"#DF0268"},awards:{label:"Best-seller",color:"#DF0268"},soldOut:{label:"Sold out",color:"#949494"}};function u(){const e={isMobile:!1,isTablet:!1,isDesktop:!1},n=window.innerWidth;
1return n<768?(e.isMobile=!0,e.isTablet=!1,e.isDesktop=!1):n<=1024?(e.isMobile=!1,e.isTablet=!0,e.isDesktop=!1):(e.isMobile=!1,e.isTablet=!1,e.isDesktop=!0),e}function _(e){return e?.length>0?`+${function c(e){return e?.length>0?e.replace(/[-+()]/g,""):""}(e)}`:""}const h=(e,n="")=>{try{return JSON.parse(e)}catch(r){console.error(`${n}`,r)}};function t(e){return e<10?`0${e}`:e.toString()}function o(e){let n=e;if("string"==typeof n)try{n=JSON.parse(n)}catch{return console.warn("Invalid JSON passed to customStyles:",n),{}}return"object"!=typeof n||Array.isArray(n)?{}:n}}}]);
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.