1import { c as Component, h as html, a as autobind } from './bundled-app.js'; 2import { P as ProductManager } from './bundled-ProductManager.js'; 3 4function t(t,e,i,o){var s,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(n<3?s(a):n>3?s(e,i,a):s(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a}function e(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}class BisForm extends Component{onAppInit(){this.productManager.stateChange$.subscribe({next:this.onProductChange});}render(){let{size:t,color:e,enabled:i,hasSubmitted:s,isLoading:n}=this.state,{selectedVariant:a,product:r}=this.productManager.getState();if(!i||!a)return this.host.style.display="none",null;this.host.style.display="block";let l=["100610014722","100610014739","100610014746","100610014753","100610014760","100610014791","100610014807","100610014814","100610014821","100610014838"],c=r?.tags||[];if((!((c.includes("backorder-enabled")||c.includes("show-waitlist")||-1!==l.indexOf(a&&a.sku))&&a?.sku)||-1!==["100610007694","100610007700","100610007717","100610007724","100610007731","100610007748","100610007755","100610007762","100610007779","100610007786","UNAVAILABLE"].indexOf(a?.sku))&&a&&a?.sku=="UNAVAILABLE")return null;{let i;let r=a?"We'll notify you once this item is back in stock.":"We'll notify you once new colors are available.";return window.overrideSoldOutMessage?.text?i=window.overrideSoldOutMessage.text:(i=t?`size ${t} in ${e}`:a?.title,i=`Notify me when ${i} become${a?"s":""} available`,!a&&t&&(i=`Notify me when size ${t} becomes available in New Colors`),a?.sku&&-1!==l.indexOf(a?.sku)&&(i="Notify me when new Tiny Ellie Nap Dresses drop.")),html` 5 <div class="bisForm"> 6 <form action="#" class="bisForm__form" @submit=${this.onSubmit}> 7 <span class="bisForm__title">${a?"Join the waitlist":"Be the first to know"}</span> 8 <p class="bisForm__text">${i}</p> 9 10 ${s?html` 11 <span class="bisForm__success">${n?html`<span class="loader"></span>`:r}</span> 12 `:html` 13 <input class="bisForm__input" type="email" required placeholder="Enter email" /> 14 <button type="submit" class="bisForm__button cta cta--light cta--fullWidth">Submit</button> 15 `} 16 </form> 17 </div> 18 `}}onProductChange(t){this.setState({size:this.productManager.getOptionByName("size"),color:this.productManager.getOptionByName("color"),isLoading:!1,hasSubmitted:!1,enabled:t.selectedVariant&&!t.selectedVariant?.available});}onSubmit(t){t.preventDefault();let{handle:e,product:i,options:o,title:s,selectedVariant:n}=this.productManager.getState(),a=t.target.querySelector('input[type="email"]').value,r=window._learnq||[];this.setState({hasSubmitted:!0,isLoading:!0});let l={variant:n?.title||o.join(" / "),product:s,product_type:i?.type,handle:e,sku:n?.sku||"UNAVAILABLE"};o.forEach(t=>{l[t]=this.productManager.getOptionByName(t);});let c={event:"Back in Stock Soon Submit",item_variant:n?.sku||"UNAVAILABLE",_clear:!0};window.dataLayer?.push(c),r.push(["identify",{$email:a}]),r.push(["track","Back in Stock Subscription",l]),window.setTimeout(()=>{this.setState({isLoading:!1});},1200);}constructor(...t){super(...t),this.productManager=ProductManager.getInstance(this.host);}}BisForm.selector="bis-form",t([autobind,e("design:type",Function),e("design:paramtypes",["undefined"==typeof ProductState?Object:ProductState]),e("design:returntype",void 0)],BisForm.prototype,"onProductChange",null),t([autobind,e("design:type",Function),e("design:paramtypes",["undefined"==typeof Event?Object:Event]),e("design:returntype",void 0)],BisForm.prototype,"onSubmit",null); 19 20export { BisForm };
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.