PageSourceSearch

https://www.babyartikel.de/assets/ee0f890a2e35c8a708f07d6ef9a8cd33…/js/yves_default.service-portal-form.js

js babyartikel.de collected 2026-09-26 05:35:11 UTC 8,965 bytes, 9 lines download raw bytes

1(self.webpackJsonp_yves_default=self.webpackJsonp_yves_default||[]).push([[1359],{32814:(t,e,o)=>{"use strict";o.r(e),o.d(e,{default:()=>r});var s=o(15861),i=o(97337),n=o(48588),a=o.n(n);class r extends i.Z{constructor(){super(...arguments),this.spinner=void 0,this.form=void 0}readyCallback(){}init(){this.registerEvents()}submitFormEvent(){var t=this;this.form.addEventListener("submit",function(){var e=(0,s.Z)((function*(e){e.preventDefault(),t.spinner.hidden=!1;var o=new FormData(t.form),s=yield fetch(t.submitRoute,{method:"POST",body:o});200===s.status&&a()({text:t.successMessage,duration:5e3,close:!0,gravity:"bottom",position:"center",stopOnFocus:!0}).showToast();var i=yield s.json();t.innerHTML=i.form,t.spinner.hidden=!0,t.querySelector("custom-select").mountCallback(),t.registerEvents()}));return function(t){return e.apply(this,arguments)}}())}registerEvents(){this.form=this.querySelector("form[name='raffleNewsletterForm']"),this.spinner=this.querySelector(".spinner"),this.submitFormEvent()}get submitRoute(){return this.getAttribute("submit-route")}get successMessage(){return this.getAttribute("success-message")}}},32382:(t,e,o)=>{"use strict";o.r(e),o.d(e,{default:()=>r});var s=o(15861),i=o(97337),n=o(48588),a=o.n(n);class r extends i.Z{constructor(){super(...arguments),this.spinner=void 0,this.form=void 0}readyCallback(){}init(){this.registerEvents()}submitFormEvent(){var t=this;this.form.addEventListener("submit",function(){var e=(0,s.Z)((function*(e){e.preventDefault(),t.spinner.hidden=!1;var o=new FormData(t.form),s=yield fetch(t.submitRoute,{method:"POST",body:o});200===s.status&&a()({text:t.successMessage,duration:5e3,close:!0,gravity:"bottom",position:"center",stopOnFocus:!0}).showToast();var i=yield s.json();t.innerHTML=i.form,t.spinner.hidden=!0,t.querySelector("custom-select").mountCallback(),t.registerEvents()}));return function(t){return e.apply(this,arguments)}}())}registerEvents(){this.form=this.querySelector("form[name='servicePortalForm']"),this.spinner=this.querySelector(".spinner"),this.submitFormEvent(),this.isOrderQuestionFieldHandler()}isOrderQuestionFieldHandler(){var t=this.querySelector(".service-portal-form__order-fields"),e=this.querySelector("#servicePortalForm_is_order_question_0"),o=this.querySelector("#servicePortalForm_is_order_question_1");t.hidden=!e.checked,[e,o].forEach((o=>o.addEventListener("change",(()=>{t.hidden=!e.checked}))))}get submitRoute(){return this.getAttribute("submit-route")}get successMessage(){return this.getAttribute("success-message")}}},48588:function(t){
2/*!
3 * Toastify js 1.12.0
4 * https://github.com/apvarun/toastify-js
5 * @license MIT licensed
6 *
7 * Copyright (C) 2018 Varun A P
8 */
9var e,o;e=this,o=function(t){var e=function(t){return new e.lib.init(t)};function o(t,e){return e.offset[t]?isNaN(e.offset[t])?e.offset[t]:e.offset[t]+"px":"0px"}function s(t,e){return!(!t||"string"!=typeof e||!(t.className&&t.className.trim().split(/\s+/gi).indexOf(e)>-1))}return e.defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,ariaLive:"polite",style:{background:""}},e.lib=e.prototype={toastify:"1.12.0",constructor:e,init:function(t){return t||(t={}),this.options={},this.toastElement=null,this.options.text=t.text||e.defaults.text,this.options.node=t.node||e.defaults.node,this.options.duration=0===t.duration?0:t.duration||e.defaults.duration,this.options.selector=t.selector||e.defaults.selector,this.options.callback=t.callback||e.defaults.callback,this.options.destination=t.destination||e.defaults.destination,this.options.newWindow=t.newWindow||e.defaults.newWindow,this.options.close=t.close||e.defaults.close,this.options.gravity="bottom"===t.gravity?"toastify-bottom":e.defaults.gravity,this.options.positionLeft=t.positionLeft||e.defaults.positionLeft,this.options.position=t.position||e.defaults.position,this.options.backgroundColor=t.backgroundColor||e.defaults.backgroundColor,this.options.avatar=t.avatar||e.defaults.avatar,this.options.className=t.className||e.defaults.className,this.options.stopOnFocus=void 0===t.stopOnFocus?e.defaults.stopOnFocus:t.stopOnFocus,this.options.onClick=t.onClick||e.defaults.onClick,this.options.offset=t.offset||e.defaults.offset,this.options.escapeMarkup=void 0!==t.escapeMarkup?t.escapeMarkup:e.defaults.escapeMarkup,this.options.ariaLive=t.ariaLive||e.defaults.ariaLive,this.options.style=t.style||e.defaults.style,t.backgroundColor&&(this.options.style.background=t.backgroundColor),this},buildToast:function(){if(!this.options)throw"Toastify is not initialized";var t=document.createElement("div");for(var e in t.className="toastify on "+this.options.className,this.options.position?t.className+=" toastify-"+this.options.position:!0===this.options.positionLeft?(t.className+=" toastify-left",console.warn("Property `positionLeft` will be depreciated in further versions. Please use `position` instead.")):t.className+=" toastify-right",t.className+=" "+this.options.gravity,this.options.backgroundColor&&console.warn('DEPRECATION NOTICE: "backgroundColor" is being deprecated. Please use the "style.background" property.'),this.options.style)t.style[e]=this.options.style[e];if(this.options.ariaLive&&t.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)t.appendChild(this.options.node);else if(this.options.escapeMarkup?t.innerText=this.options.text:t.innerHTML=this.options.text,""!==this.options.avatar){var s=document.createElement("img");s.src=this.options.avatar,s.className="toastify-avatar","left"==this.options.position||!0===this.options.positionLeft?t.appendChild(s):t.insertAdjacentElement("afterbegin",s)}if(!0===this.options.close){var i=document.createElement("button");i.type="button",i.setAttribute("aria-label","Close"),i.className="toast-close",i.innerHTML="✖",i.addEventListener("click",function(t){t.stopPropagation(),this.removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)}.bind(this));var n=window.innerWidth>0?window.innerWidth:screen.width;
vendor: 2,668 bytes, line 9
9("left"==this.options.position||!0===this.options.positionLeft)&&n>360?t.insertAdjacentElement("afterbegin",i):t.appendChild(i)}if(this.options.stopOnFocus&&this.options.duration>0){var a=this;t.addEventListener("mouseover",(function(e){window.clearTimeout(t.timeOutValue)})),t.addEventListener("mouseleave",(function(){t.timeOutValue=window.setTimeout((function(){a.removeElement(t)}),a.options.duration)}))}if(void 0!==this.options.destination&&t.addEventListener("click",function(t){t.stopPropagation(),!0===this.options.newWindow?window.open(this.options.destination,"_blank"):window.location=this.options.destination}.bind(this)),"function"==typeof this.options.onClick&&void 0===this.options.destination&&t.addEventListener("click",function(t){t.stopPropagation(),this.options.onClick()}.bind(this)),"object"==typeof this.options.offset){var r=o("x",this.options),l=o("y",this.options),d="left"==this.options.position?r:"-"+r,u="toastify-top"==this.options.gravity?l:"-"+l;t.style.transform="translate("+d+","+u+")"}return t},showToast:function(){var t;if(this.toastElement=this.buildToast(),!(t="string"==typeof this.options.selector?document.getElementById(this.options.selector):this.options.selector instanceof HTMLElement||"undefined"!=typeof ShadowRoot&&this.options.selector instanceof ShadowRoot?this.options.selector:document.body))throw"Root element is not defined";var o=e.defaults.oldestFirst?t.firstChild:t.lastChild;return t.insertBefore(this.toastElement,o),e.reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout(function(){this.removeElement(this.toastElement)}.bind(this),this.options.duration)),this},hideToast:function(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this.removeElement(this.toastElement)},removeElement:function(t){t.className=t.className.replace(" on",""),window.setTimeout(function(){this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),t.parentNode&&t.parentNode.removeChild(t),this.options.callback.call(t),e.reposition()}.bind(this),400)}},e.reposition=function(){for(var t,e={top:15,bottom:15},o={top:15,bottom:15},i={top:15,bottom:15},n=document.getElementsByClassName("toastify"),a=0;a<n.length;a++){t=!0===s(n[a],"toastify-top")?"toastify-top":"toastify-bottom";var r=n[a].offsetHeight;t=t.substr(9,t.length-1),(window.innerWidth>0?window.innerWidth:screen.width)<=360?(n[a].style[t]=i[t]+"px",i[t]+=r+15):!0===s(n[a],"toastify-left")?(n[a].style[t]=e[t]+"px",e[t]+=r+15):(n[a].style[t]=o[t]+"px",o[t]+=r+15)}return this},e.lib.init.prototype=e.lib,e},t.exports?t.exports=o():e.Toastify=o()}}]);

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.