PageSourceSearch

https://www.vodafone.de/simplicity/ecommerce/scripts/ecommerce.js

js vodafone.de collected 2026-10-09 21:48:50 UTC 472,366 bytes, 1 lines download raw bytes

1function MarkerClusterer(e,t,r){this.extend(MarkerClusterer,google.maps.OverlayView),this.map_=e,this.markers_=[],this.clusters_=[],this.sizes=[53,56,66,78,90],this.styles_=[],this.ready_=!1;var n=r||{};this.gridSize_=n.gridSize||60;this.minClusterSize_=n.minimumClusterSize||2,this.maxZoom_=n.maxZoom||null,this.styles_=n.styles||[],this.imagePath_=n.imagePath||this.MARKER_CLUSTER_IMAGE_PATH_,this.imageExtension_=n.imageExtension||this.MARKER_CLUSTER_IMAGE_EXTENSION_,this.zoomOnClick_=!0,void 0!==n.zoomOnClick&&(this.zoomOnClick_=n.zoomOnClick),this.averageCenter_=!1,void 0!==n.averageCenter&&(this.averageCenter_=n.averageCenter),this.setupStyles_(),this.setMap(e),this.prevZoom_=this.map_.getZoom();var i=this;google.maps.event.addListener(this.map_,"zoom_changed",function(){var e=i.map_.getZoom(),t=i.map_.minZoom||0,r=Math.min(i.map_.maxZoom||100,i.map_.mapTypes[i.map_.getMapTypeId()].maxZoom);e=Math.min(Math.max(e,t),r),i.prevZoom_!==e&&(i.prevZoom_=e,i.resetViewport())}),google.maps.event.addListener(this.map_,"idle",function(){i.redraw()}),t&&(t.length||Object.keys(t).length)&&this.addMarkers(t,!1)}function Cluster(e){this.markerClusterer_=e,this.map_=e.getMap(),this.gridSize_=e.getGridSize(),this.minClusterSize_=e.getMinClusterSize(),this.averageCenter_=e.isAverageCenter(),this.center_=null,this.markers_=[],this.bounds_=null,this.clusterIcon_=new ClusterIcon(this,e.getStyles(),e.getGridSize())}function ClusterIcon(e,t,r){e.getMarkerClusterer().extend(ClusterIcon,google.maps.OverlayView),this.styles_=t,this.padding_=r||0,this.cluster_=e,this.center_=null,this.map_=e.getMap(),this.div_=null,this.sums_=null,this.visible_=!1,this.setMap(this.map_)}var vf;MarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_PATH_="../images/m",MarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_EXTENSION_="png",MarkerClusterer.prototype.extend=function(e,t){return function(e){for(var t in e.prototype)this.prototype[t]=e.prototype[t];return this}.apply(e,[t])},MarkerClusterer.prototype.onAdd=function(){this.setReady_(!0)},MarkerClusterer.prototype.draw=function(){},MarkerClusterer.prototype.setupStyles_=function(){if(!this.styles_.length)for(var e,t=0;e=this.sizes[t];t++)this.styles_.push({url:this.imagePath_+(t+1)+"."+this.imageExtension_,height:e,width:e})},MarkerClusterer.prototype.fitMapToMarkers=function(){for(var e,t=this.getMarkers(),r=new google.maps.LatLngBounds,n=0;e=t[n];n++)r.extend(e.getPosition());this.map_.fitBounds(r)},MarkerClusterer.prototype.setStyles=function(e){this.styles_=e},MarkerClusterer.prototype.getStyles=function(){return this.styles_},MarkerClusterer.prototype.isZoomOnClick=function(){return this.zoomOnClick_},MarkerClusterer.prototype.isAverageCenter=function(){return this.averageCenter_},MarkerClusterer.prototype.getMarkers=function(){return this.markers_},MarkerClusterer.prototype.getTotalMarkers=function(){return this.markers_.length},MarkerClusterer.prototype.setMaxZoom=function(e){this.maxZoom_=e},MarkerClusterer.prototype.getMaxZoom=function(){return this.maxZoom_},MarkerClusterer.prototype.calculator_=function(e,t){var r=0,n=e.length,i=n;for(;0!==i;)i=parseInt(i/10,10),r++;return{text:n,index:r=Math.min(r,t)}},MarkerClusterer.prototype.setCalculator=function(e){this.calculator_=e},MarkerClusterer.prototype.getCalculator=function(){return this.calculator_},MarkerClusterer.prototype.addMarkers=function(e,t){if(e.length)for(var r=0;n=e[r];r++)this.pushMarkerTo_(n);else if(Object.keys(e).length)for(var n in e)this.pushMarkerTo_(e[n]);t||this.redraw()},MarkerClusterer.prototype.pushMarkerTo_=function(e){if(e.isAdded=!1,e.draggable){var t=this;google.maps.event.addListener(e,"dragend",function(){e.isAdded=!1,t.repaint()})}this.markers_.push(e)},MarkerClusterer.prototype.addMarker=function(e,t){this.pushMarkerTo_(e),t||this.redraw()},MarkerClusterer.prototype.removeMarker_=function(e){var t=-1;if(this.markers_.indexOf)t=this.markers_.indexOf(e);else for(var r,n=0;r=this.markers_[n];n++)if(r===e){t=n;break}return-1!==t&&(e.setMap(null),this.markers_.splice(t,1),!0)},MarkerClusterer.prototype.removeMarker=function(e,t){var r=this.removeMarker_(e);return!(t||!r)&&(this.resetViewport(),this.redraw(),!0)},MarkerClusterer.prototype.removeMarkers=function(e,t){for(var r,n=!1,i=0;r=e[i];i++){var o=this.removeMarker_(r);n=n||o}if(!t&&n)return this.resetViewport(),this.redraw(),!0},MarkerClusterer.prototype.setReady_=function(e){this.ready_||(this.ready_=e,this.createCluster
1s_())},MarkerClusterer.prototype.getTotalClusters=function(){return this.clusters_.length},MarkerClusterer.prototype.getMap=function(){return this.map_},MarkerClusterer.prototype.setMap=function(e){this.map_=e},MarkerClusterer.prototype.getGridSize=function(){return this.gridSize_},MarkerClusterer.prototype.setGridSize=function(e){this.gridSize_=e},MarkerClusterer.prototype.getMinClusterSize=function(){return this.minClusterSize_},MarkerClusterer.prototype.setMinClusterSize=function(e){this.minClusterSize_=e},MarkerClusterer.prototype.getExtendedBounds=function(e){var t=this.getProjection(),r=new google.maps.LatLng(e.getNorthEast().lat(),e.getNorthEast().lng()),n=new google.maps.LatLng(e.getSouthWest().lat(),e.getSouthWest().lng()),i=t.fromLatLngToDivPixel(r);i.x+=this.gridSize_,i.y-=this.gridSize_;var o=t.fromLatLngToDivPixel(n);o.x-=this.gridSize_,o.y+=this.gridSize_;var a=t.fromDivPixelToLatLng(i),s=t.fromDivPixelToLatLng(o);return e.extend(a),e.extend(s),e},MarkerClusterer.prototype.isMarkerInBounds_=function(e,t){return t.contains(e.getPosition())},MarkerClusterer.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers_=[]},MarkerClusterer.prototype.resetViewport=function(e){for(var t,r=0;
1t=this.clusters_[r];r++)t.remove();var n;for(r=0;n=this.markers_[r];r++)n.isAdded=!1,e&&n.setMap(null);this.clusters_=[]},MarkerClusterer.prototype.repaint=function(){var e=this.clusters_.slice();this.clusters_.length=0,this.resetViewport(),this.redraw(),window.setTimeout(function(){for(var t,r=0;t=e[r];r++)t.remove()},0)},MarkerClusterer.prototype.redraw=function(){this.createClusters_()},MarkerClusterer.prototype.distanceBetweenPoints_=function(e,t){if(!e||!t)return 0;const r=180;var n=(t.lat()-e.lat())*Math.PI/r,i=(t.lng()-e.lng())*Math.PI/r,o=Math.sin(n/2)*Math.sin(n/2)+Math.cos(e.lat()*Math.PI/r)*Math.cos(t.lat()*Math.PI/r)*Math.sin(i/2)*Math.sin(i/2);return 6371*(2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o)))},MarkerClusterer.prototype.addToClosestCluster_=function(e){for(var t,r=4e4,n=null,i=0;t=this.clusters_[i];i++){var o=t.getCenter();if(o){var a=this.distanceBetweenPoints_(o,e.getPosition());a<r&&(r=a,n=t)}}n&&n.isMarkerInClusterBounds(e)?n.addMarker(e):((t=new Cluster(this)).addMarker(e),this.clusters_.push(t))},MarkerClusterer.prototype.createClusters_=function(){if(this.ready_)for(var e,t=new google.maps.LatLngBounds(this.map_.getBounds().getSouthWest
1(),this.map_.getBounds().getNorthEast()),r=this.getExtendedBounds(t),n=0;e=this.markers_[n];n++)!e.isAdded&&this.isMarkerInBounds_(e,r)&&this.addToClosestCluster_(e)},Cluster.prototype.isMarkerAlreadyAdded=function(e){if(this.markers_.indexOf)return-1!==this.markers_.indexOf(e);for(var t,r=0;t=this.markers_[r];r++)if(t===e)return!0;return!1},Cluster.prototype.addMarker=function(e){if(this.isMarkerAlreadyAdded(e))return!1;if(this.center_){if(this.averageCenter_){var t=this.markers_.length+1,r=(this.center_.lat()*(t-1)+e.getPosition().lat())/t,n=(this.center_.lng()*(t-1)+e.getPosition().lng())/t;this.center_=new google.maps.LatLng(r,n),this.calculateBounds_()}}else this.center_=e.getPosition(),this.calculateBounds_();e.isAdded=!0,this.markers_.push(e);var i=this.markers_.length;if(i<this.minClusterSize_&&e.getMap()!==this.map_&&e.setMap(this.map_),i===this.minClusterSize_)for(var o=0;o<i;o++)this.markers_[o].setMap(null);return i>=this.minClusterSize_&&e.setMap(null),this.updateIcon(),!0},Cluster.prototype.getMarkerClusterer=function(){return this.markerClusterer_},Cluster.prototype.getBounds=function(){for(var e,t=new google.maps.LatLngBounds(this.center_,this.center_),r=this.getMarkers(),n=0;e=r[n];n++)t.extend(e.getPosition());return t},Cluster.prototype.remove=function(){this.clusterIcon_.remove(),this.markers_.length=0,delete this.markers_},Cluster.prototype.getSize=function(){return this.markers_.length},Cluster.prototype.getMarkers=function(){return this.markers_},Cluster.prototype.getCenter=function(){return this.center_},Cluster.prototype.calculateBounds_=function(){var e=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(e)},Cluster.prototype.isMarkerInClusterBounds=function(e){return this.bounds_.contains(e.getPosition())},Cluster.prototype.getMap=function(){return this.map_},Cluster.prototype.updateIcon=function(){var e=this.map_.getZoom(),t=this.markerClusterer_.getMaxZoom();if(t&&e>t)for(var r,n=0;r=this.markers_[n];n++)r.setMap(this.map_);else if(this.markers_.length<this.minClusterSize_)this.clusterIcon_.hide();else{var i=this.markerClusterer_.getStyles().length,o=this.markerClusterer_.getCalculator()(this.markers_,i);this.clusterIcon_.setCenter(this.center_),this.clusterIcon_.setSums(o),this.clusterIcon_.show()}},ClusterIcon.prototype.triggerClusterClick=function(){var e=this.cluster_.getMarkerClusterer();google.maps.event.trigger(e,"clusterclick",this.cluster_),e.isZoomOnClick()&&this.map_.fitBounds(this.cluster_.getBounds())},ClusterIcon.prototype.onAdd=function(){if(this.div_=document.createElement("DIV"),this.visible_){var e=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(e),this.div_.innerHTML=this.sums_.text}this.getPanes().overlayMouseTarget.appendChild(this.div_);var t=this;google.maps.event.addDomListener(this.div_,"click",function(){t.triggerClusterClick()})},ClusterIcon.prototype.getPosFromLatLng_=function(e){var t=this.getProjection().fromLatLngToDivPixel(e);return t.x-=parseInt(this.width_/2,10),t.y-=parseInt(this.height_/2,10),t},ClusterIcon.prototype.draw=function(){if(this.visible_){var e=this.getPosFromLatLng_(this.center_);this.div_.style.top=e.y+"px",this.div_.style.left=e.x+"px"}},ClusterIcon.prototype.hide=function(){this.div_&&(this.div_.style.display="none"),this.visible_=!1},ClusterIcon.prototype.show=function(){if(this.div_){var e=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(e),this.div_.style.display=""}this.visible_=!0},ClusterIcon.prototype.remove=function(){this.setMap(null)},ClusterIcon.prototype.onRemove=function(){this.div_&&this.div_.parentNode&&(this.hide(),this.div_.parentNode.removeChild(this.div_),this.div_=null)},ClusterIcon.prototype.setSums=function(e){this.sums_=e,this.text_=e.text,this.index_=e.index,this.div_&&(this.div_.innerHTML=e.text),this.useStyle()},ClusterIcon.prototype.useStyle=function(){var e=Math.max(0,this.sums_.index-1);e=Math.min(this.styles_.length-1,e);var t=this.styles_[e];this.url_=t.url,this.height_=t.height,this.width_=t.width,this.textColor_=t.textColor,this.anchor_=t.anchor,this.textSize_=t.textSize,this.backgroundPosition_=t.backgroundPosition},ClusterIcon.prototype.setCenter=function(e){this.center_=e},ClusterIcon.prototype.createCss=function(e){var t=[];t.push("background-image:url("+this.url_+");");var r=this.backgroundPosition_?this.backgroundPosition_:"0 0";t.push("background-position:"+r+";"),"object"==typeof this.anchor_?("number"==typeof this.anchor_[0]&&0<this.anchor_[0]&&this.anchor_[0]<this.height_?t.push("height:"+(this.height_-this.anchor_[0])+"px; padding-top:"+this.anchor_[0]+"px;"):t.push("height:"+this.height_+"px; line-height:"+this.height_+"px;"),"number"==typeof this.anchor_[1]&&0<this.anchor_[1]&&this.anchor_[1]<this.width_?t.pu
1sh("width:"+(this.width_-this.anchor_[1])+"px; padding-left:"+this.anchor_[1]+"px;"):t.push("width:"+this.width_+"px; text-align:center;")):t.push("height:"+this.height_+"px; line-height:"+this.height_+"px; width:"+this.width_+"px; text-align:center;");var n=this.textColor_?this.textColor_:"black",i=this.textSize_?this.textSize_:11;return t.push("cursor:pointer; top:"+e.y+"px; left:"+e.x+"px; color:"+n+"; position:absolute; font-size:"+i+"px; font-family:Arial,sans-serif; font-weight:bold"),t.join("")},function(){"use strict";VF.const=VF.const||{},VF.const.cms=VF.const.cms||{},VF.const.cms.promoBadge={url:"/privat/json/promo-badge.json",text:{}},VF.const.apiKeys={PDValidation:"KSZZFe5MPWBLc3cLUPs2zW5at1w7xQyg",AddressAutosuggest:"zfvAa4F25t5P5SdoEnA9ovUVuswEVuYk"},VF.const.SimCardIdESimAsMainCard=6915,VF.const.SimCardIdTripleSimAsMainCard=6916,VF.const.sessionKeySIMVariant="simVariants",VF.const.newCartId="bob-checkout-root",VF.const.newCartScriptId="bob-checkout-react-script",VF.const.deviceFinanceMonths=new Map([[10843,12],[10837,12],[10834,12],[10831,12],[10840,12],[10870,12],[10864,12],[10861,12],[10858,12],[10867,12],[11037,12],[10998,12],[11007,12],[11017,12],[11027,12],[10844,24],[10838,24],[10835,24],[10832,24],[10841,24],[10871,24],[10865,24],[10862,24],[10859,24],[10868,24],[11038,24],[10999,24],[11008,24],[11018,24],[11028,24],[10845,36],[10839,36],[10836,36],[10833,36],[10842,36],[10872,36],[10866,36],[10863,36],[10860,36],[10869,36],[11039,36],[11e3,36],[11009,36],[11019,36],[11029,36]]),VF.const.nationalities=["Deutschland","Afghanistan","&Auml;gypten","&angst;land","Albanien","Alderneytes K&ouml;nigreich","Algerien","Amerikanisch","Amerikanisch-Samoa","Andorra","Angola","Anguilla","Antarktis","Antigua und Barbuda","&Auml;quatorialguinea","Argentinien","Armenien","Aruba","Ascension","Aserbaidschan","&Auml;thiopien","Australien","Bahamas","Bahrain","Bangladesch","Barbados","Belarus (Wei&szlig;ru&szlig;land)","Belgien","Belize","Benin (Dahome)","Bhutan","Bolivien","Bosnien- Herzeg.","Bosnien Herzegowina","Botsuana","Bouvetinsel","Brasilien","Britische Jungferninseln","Brunei Darussalam","Bulgarien","Burkina Faso","Burundi","Ceuta, Melilla","Chile","China","Clipperton","Cookinseln","Costa Rica","Cura&ccedil;ao","D&auml;nemark","Diego Garcia","Dominica","Dominikanische Rep.","Dominikanische Republik","Dschibuti","Ecuador","El Salvador","Elfenbeink&uuml;ste","Eritrea","Estland","Falklandinseln","Far&ouml;er","F&auml;r&ouml;er","Fidschi","Finnland","Frankreich","Gabun","Gambia","Georgien","Ghana","Gibraltar","Grenada","Griechenland","Gr&ouml;nland","Gro&szlig;britannien","Guadeloupe","Guam","Guatemala","Guernsey","Guinea","Guinea-Bissau","Guyana","Haiti","Heard und McDonaldinseln","Honduras","Hongkong","Indien","Indonesien","Insel Man","Irak","Iran","Irland","Island","Israel","Italien","Jamaika","Japan","Jemen","Jersey","Jordanien","Jugoslawien","Kaimaninseln","Kambodscha","Kamerun","Kanada","Kanarische Inseln","Kap Verde","Kasachstan","Katar","Kenia","Kirgisistan","Kiribati","Kokosinseln","Kolumbien","Komoren","Kongo Brallaville","Kongo Demokratische Rep.","Kongo, DR","Korea, S&uuml;d-","Kosovo","Kroatien","Kuba","Kuwait","Laotische Demokr. VR","Lesotho","Lettland","Libanon","Lib.-Arab. Dschamahirija","Liberia","Libyen","Liechtenstein","Litauen","Luxemburg","Macau","Madagaskar","Malawi","Malaysia","Malediven","Mali","Malta","Marokko","Marshallinseln","Martinique","Mauretanien","Mauritius","Mayotte","Mazedonien","Mexiko","Mikronesien","Mocambique","Moldau","Moldawien","Monaco","Mongolei","Montenegro","Montserrat","Myanmar","Namibia","Nauru","Nepal","Neukaledonien","Neuseeland","Nicaragua","Niederlande","Niederl&auml;ndische Antillen","Niger","Nigeria","Niue","Nordkorea","N&ouml;rdliche Marianen","Norfolkinsel","Norwegen","Oman","&Ouml;sterreich","Osttimor","Pakistan","Palau","Panama","Papua-Neuguinea","Paraguay","Peru","Philippinen","Pitcairninseln","Polen","Portugal","Puerto Rico","Rep. Moldau","R&eacute;union","Ruanda","Rum&auml;nien","Russland","Saint-Barth&eacute;lemy","Saint-Martin (Fr.)","Saint-Pierre und Miquelon","Salomonen","S
1ambia","Samoa","San Marino","Santa Lucia","S&atilde;o Tom&eacute; und Pr&iacute;ncipe","Saudi-Arabien","Schweden","Schweiz","Senegal","Serbien","Serbien und Montenegro","Seychellen","Sierra Leone","Simbabwe","Singapur","Sint Maarten (nieder.)","Slowakei","Slowakische Republik","Slowenien","Somalia","Sowjetunion (ehemalige)","Spanien","Sri Lanka","St. Helena","St. Vincent null","S&uuml;dafrika","Sudan","S&uuml;dkorea","S&uuml;dsudan","Surinam","Svalbard","Swasiland","Syrien","Tadschikistan","Taiwan","Tansania","Thailand","Togo","Tokelau","Tonga","Trinidad und Tobago","Tschad","Tschechien","Tschechische Republik","Tunesien","T&uuml;rkei","Turkmenistan","Turks- und Caicosinseln","Tuvalu","Uganda","Ukraine","Ungarn","Uruguay","USA","Usbekistan","Vanuatu","Vatikanstaat","Venezuela","Verei. Staaten v. Amerika","Vereinigte Arab. Em.","Vereinigte Arab. Emirate","Vereinigtes K&ouml;nigr.","Vietnam","Wallis und Futuna","Weihnachtsinsel","Wei&szlig;russland","Westsahara","Zentralafrikanische Rep.","Zypern"],VF.const.errorTrackingMap={400:"validation",401:"validation",402:"authentication",403:"authentication",404:"validation",500:"technical",503:"technical",422:"validation",413:"technical"},VF.const.insuranceCoverServicesId=[10455,10457,10458,10460,10462,10456,10459,10461,10463,10464]}(VF),(vf=vf||{}).errorMessages=vf.errorMessages?vf.errorMessages:{},vf.errorMessages.shopFrontend={DEFAULT:{text:"A general error occured",class:"warning",icon:"i-warning-b-sml"},auth:{DEFAULT:{text:"A general error occured",class:"warning",icon:"i-warning-b-sml"},A2:{headline:"Zu viele Fehlversuche",text:"Leider hast Du die maximale Anzahl von vier Versuchen überschritten. Dein Zugang wird aus Sicherheitsgründen gesperrt. Nach vier Fehlversuchen beträgt die Wartezeit 24 Stunden. Bitte prüfe in dieser Zeit nochmal die ",class:"error",icon:"i-error-r-sml"},A3:{headline:"Server Error",text:"Der Zugang ist derzeit nicht möglich, da der Authentifizierungsserver nicht erreichbar ist. Bitte entschuldige die Unannehmlichkeiten und versuche es zu einem anderen Zeitpunkt nocheinmal.",class:"warning",icon:"i-warning-b-sml"},areacode:{text:"Bitte wähle eine Vorwahl aus \r\n  Gib bitte eine gültige Telefonnummer ein",class:"warning",icon:"i-warning-b-sml"},kennwort:{text:"Bitte überprüfe Dein Kundenkennwort",class:"warning",icon:"i-warning-b-sml"}},checkout:{DEFAULT:{text:"A general error occured",class:"warning",icon:"i-warning-b-sml"},PERSDATEN_FIRSTNAME:{text:"Gib bitte einen gültigen Vornamen ein",class:"warning",icon:"i-warning-b-sml"},PERSDATEN_LASTNAME:{text:"Gib bitte einen gültigen Nachnamen ein",class:"warning",icon:"i-warning-b-sml"},SHIPPING_FIRSTNAME:{text:"Gib bitte einen gültigen Vornamen ein",class:"warning",icon:"i-warning-b-sml"},SHIPPING_LASTNAME:{text:"Gib bitte einen gültigen Nachnamen ein",class:"warning",icon:"i-warning-b-sml"}}},(vf=vf||{}).patternMatches=vf.patternMatches?vf.patternMatches:{},function(e,t){"use strict";var r;if("object"==typeof exports){try{r=require("moment")}catch(e){}module.exports=t(r)}else"function"==typeof define&&define.amd?define(function(e){try{r=e("moment")}catch(e){}return t(r)}):e.Pikaday=t(e.moment)}(this,function(e){"use strict";var t="function"==typeof e,r=!!window.addEventListener,n=window.document,i=window.setTimeout,o=function(e,t,n,i){r?e.addEventListener(t,n,!!i):e.attachEvent("on"+t,n)},a=function(e,t,n,i){r?e.removeEventListener(t,n,!!i):e.detachEvent("on"+t,n)},s=function(e,t,r){var i;n.createEvent?((i=n.createEvent("HTMLEvents")).initEvent(t,!0,!1),i=m(i,r),e.dispatchEvent(i)):n.createEventObject&&(i=n.createEventObject(),i=m(i,r),e.fireEvent("on"+t,i))},c=function(e,t){return-1!==(" "+e.className+" ").indexOf(" "+t+" ")},u=function(e){return/Array/.test(Object.prototype.toString.call(e))},l=function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())},d=function(e){var t=e.getDay();return 0===t||6===t},p=function(e){return 0==e%4&&0!=e%100||0==e%400},f=function(e){l(e)&&e.setHours(0,0,0,0)},h=function(e,t){return e.getTime()===t.getTime()},m=function(e,t,r){var n,i;for(n in t)(i=void 0!==e[n])&&"object"==typeof t[n]&&null!==t[n]&&void 0===t[n].nodeName?l(t[n])?r&&(e[n]=new Date(t[n].getTime())):u(t[n])?r&&(e[n]=t[n].slice(0)):e[n]=m({},t[n],r):!r&&i||(e[n]=t[n]);return e},g=function(e){return 0>e.month&&(e.year-=Math.ceil(Math.abs(e.month)/12),e.month+=12),11<e.month&&(e.year+=Math.floor(Math.abs(e.month)/12),e.month-=12),e},v={field:null,bound:void 0,position:"bottom left",reposition:!0,format:"YYYY-MM-DD",defaultDate:null,setDefaultDate:!1,firstDay:0,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,i18n:{previousMonth:"Vorheriger Monat",nextMonth:"Nächster Monat",months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
1ay","Saturday"],weekdaysShort:["So","Mo","Di","Mi","Do","Fr","Sa"]},theme:null,onSelect:null,onOpen:null,onClose:null,onDraw:null},b=function(e,t,r){for(t+=e.firstDay;7<=t;)t-=7;return r?e.i18n.weekdaysShort[t]:e.i18n.weekdays[t]},y=function(e){if(e.isEmpty)return'<td class="is-empty"></td>';var t=[];return e.isDisabled&&t.push("is-disabled"),e.isToday&&t.push("is-today"),e.isSelected&&t.push("is-selected"),e.isInRange&&t.push("is-inrange"),e.isStartRange&&t.push("is-startrange"),e.isEndRange&&t.push("is-endrange"),'<td data-day="'+e.day+'" class="'+t.join(" ")+'"><button class="pika-button pika-day" type="button" data-pika-year="'+e.year+'" data-pika-month="'+e.month+'" data-pika-day="'+e.day+'">'+e.day+"</button></td>"},_=function(e,t,r){var n=new Date(r,0,1);return'<td class="pika-week">'+Math.ceil(((new Date(r,t,e)-n)/864e5+n.getDay()+1)/7)+"</td>"},S=function(e,t){return"<tr>"+(t?e.reverse():e).join("")+"</tr>"},k=function(e,t,r,n,i){var o,a,s,c,l,d=e._o,p=r===d.minYear,f=r===d.maxYear,h='<div class="pika-title">',m=!0,g=!0;for(s=[],o=0;12>o;o++)s.push('<option value="'+(r===i?o-t:12+o-t)+'"'+(o===n?" selected":"")+(p&&o<d.minMonth||f&&o>d.maxMonth?"disabled":"")+">"+d.i18n.months[o]+"</option>");for(c='<div class="pika-label">'+d.i18n.months[n]+'<select class="pika-select pika-select-month" tabindex="-1">'+s.join("")+"</select></div>",u(d.yearRange)?(o=d.yearRange[0],a=d.yearRange[1]+1):(o=r-d.yearRange,a=1+r+d.yearRange),s=[];o<a&&o<=d.maxYear;o++)o>=d.minYear&&s.push('<option value="'+o+'"'+(o===r?" selected":"")+">"+o+"</option>");return l='<div class="pika-label">'+r+d.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+s.join("")+"</select></div>",d.showMonthAfterYear?h+=l+c:h+=c+l,p&&(0===n||d.minMonth>=n)&&(m=!1),f&&(11===n||d.maxMonth<=n)&&(g=!1),0===t&&(h+='<span class="pika-prev'+(m?"":" is-disabled")+'"><i class="i-arrow-left-b-xsml"></i></span>'),t===e._o.numberOfMonths-1&&(h+='<span class="pika-next'+(g?"":" is-disabled")+'"><i class="i-arrow-right-b-xsml"></i></span>'),h+"</div>"},C=function(e,t){return'<table cellpadding="0" cellspacing="0" class="pika-table">'+function(e){var t,r=[];for(e.showWeekNumber&&r.push("<th></th>"),t=0;7>t;t++)r.push('<th scope="col">'+b(e,t,!0)+"</th>");return"<thead>"+(e.isRTL?r.reverse():r).join("")+"</thead>"}(e)+("<tbody>"+t.join("")+"</tbody></table>")},D=function(a){var s=this,u=s.config(a);s._onMouseDown=function(e){if(s._v){var t=(e=e||window.event).target||e.srcElement;if(t)if(c(t,"di-close"))s.hide();else if(c(t.parentNode,"di-close"))s.hide();else if(c(t.parentNode.parentNode,"di-close"))s.hide();else if(c(t.parentNode,"is-disabled")||(c(t,"pika-button")&&!c(t,"is-empty")?(s.setDate(new Date(t.getAttribute("data-pika-year"),t.getAttribute("data-pika-month"),t.getAttribute("data-pika-day"))),u.bound&&i(function(){s.hide(),u.field&&u.field.blur()},100)):c(t,"pika-prev")||c(t.parentNode,"pika-prev")?s.prevMonth():(c(t,"pika-next")||c(t.parentNode,"pika-next"))&&s.nextMonth()),c(t,"pika-select"))s._c=!0;else{if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}}},s._onChange=function(e){var t=(e=e||window.event).target||e.srcElement;t&&(c(t,"pika-select-month")?s.gotoMonth(t.value):c(t,"pika-select-year")&&s.gotoYear(t.value))},s._onInputChange=function(r){var n;r.firedBy!==s&&(n=t?(n=e(u.field.value,u.format))&&n.isValid()?n.toDate():null:new Date(Date.parse(u.field.value)),l(n)&&s.setDate(n),s._v||s.show())},s._onInputFocus=function(){s.show()},s._onInputClick=function(){s.show()},s._onInputBlur=function(){var e=n.activeElement;do{if(c(e,"pika-single"))return}while(e=e.parentNode);s._c||(s._b=i(function(){s.hide()},50)),s._c=!1},s._onClick=function(e){var t=(e=e||window.event).target||e.srcElement,n=t;if(t){!r&&c(t,"pika-select")&&(t.onchange||(t.setAttribute("onchange","return;"),o(t,"change",s._onChange)));do{if(c(n,"pika-single")||n===u.trigger)return}while(n=n.parentNode);s._v&&t!==u.trigger&&n!==u.trigger&&s.hide()}},s.el=n.createElement("div"),s.el.className="pika-single"+(u.isRTL?" is-rtl":"")+(u.theme?" "+u.theme:""),o(s.el,"mousedown",s._onMouseDown,!0),o(s.el,"touchend",s._onMouseDown,!0),o(s.el,"change",s._onChange),u.field&&(u.container?u.container.appendChild(s.el):u.bound?n.body.appendChild(s.el):u.field.parentNode.insertBefore(s.el,u.field.nextSibling),o(u.field,"change",s._onInputChange),u.defaultDate||(t&&u.field.value?u.defaultDate=e(u.field.value,u.format).toDate():u.defaultDate=new Date(Date.parse(u.field.value)),u.setDefaultDate=!0));var d=u.defaultDate;l(d)?u.setDefaultDate?s.setDate(d,!0):s.gotoDate(d):s.gotoDate(new Date),u.bound?(this.hide(),s.el.className+=" is-bound",o(u.trigger,"click",s._onInputClick),o(u.trigger,"focus",s._onInputFocus),o(u.trigger,"blur",s._onInputBlur)):this.show()};return D.prototype={config:function(e){this._o||(this._o=m({},v,!0));var t=m(this._o,e,!0);t.isRTL=!!t.isRTL,t.field=t.field&&t.field.nodeName?t.field:null,t.theme="string"==typeof t.theme&&t.theme?t.theme:null,t.bound=!!(void 0!==t.bound?t.field&&t.bound:t.field),t.trigger=t.trigger&&t.trigger.nodeName?t.trigger:t.field,t.disableWeekends=!!t.disableWeekends,t.disableDayFn="function"==typeof t.disableDayFn?t.disableDayFn:null;var r=parseInt(t.numberOfMonths,10)||1;if(t.numberOfMonths=4<r?4:r,l(t.minDate)||(t.minDate=!1),l(t.maxDate)||(t.maxDate=!1),t.minDate&&t.maxDate&&t.maxDate<t.minDate&&(t.maxDate=t.minDate=!1),t.minDate&&this.setMinDate(t.minDate),t.maxDate&&(f(t.maxDate),t.maxYear=t.maxDate.getFullYear(),t.maxMonth=t.maxDate.getMonth()),u(t.yearRange)){var n=(new Date).getFullYear()-10;t.yearRange[0]=parseInt(t.yearRange[0],10)||n,t.yearRange[1]=parseInt(t.yearRange[1],10)||n}else t.yearRange=Math.abs(parseInt(t.yearRange,10))||v.yearRange,100<t.yearRange&&(t.yearRange=100);return t},toString:function(r){return l(this._d)?t?e(this._d).format(r||this._o.format):this._d.toDateString():""},getMoment:function(){return t?e(this._d):null},setMoment:function(r,n){t&&e.isMoment(r)&&this.setDate(r.toDate(),n)},getDate:function(){return l(this._d)?new Date(this._d.getTime()):null},setDate:function(e,t){if(!e)return this._d=null,this._o.field&&(this._o.field.value="",s(this._o.field,"change",{firedBy:this})),this.draw();if("string"==typeof e&&(e=new Date(Date.parse(e))),l(e)){var r=this._o.minDate,n=this._o.maxDate;l(r)&&e<r?e=r:l(n)&&e>n&&(e=n),this._d=new Date(e.getTime()),f(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),s(this._o.field,"change",{firedBy:this})),t||"function"!=typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())}},gotoDate:function(e){var t=!0;if(l(e)){if(this.calendars){var r=new Date(this.calendars[0].year,this.calendars[0].month,1),n=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),i=e.getTime();n.setMonth(n.getMonth()+1),n.setDate(n.getDate()-1),t=i<r.getTime()||n.getTime()<i}t&&(this.calendars=[{month:e.getMonth(),year:e.getFullYear()}],"right"===this._o.mainCalendar&&(this.calendars[0].month+=1-this._o.numberOfMonths)),this.adjustCalendars()}},adjustCalendars:function(){this.calendars[0]=g(this.calendars[0]);for(var e=1;e<this._o.numberOfMonths;e++)this.calendars[e]=g({month:this.calendars[0].month+e,year:this.calendars[0].year});this.draw()},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(e){isNaN(e)||(this.calendars[0].month=parseInt(e,10),this.adjustCalendars())},nextMonth:function(){this.calendars[0].month++,this.adjustCalendars()},prevMonth:function(){this.calendars[0].month--,this.adjustCalendars()},gotoYear:function(e){isNaN(e)||(this.calendars[0].year=parseInt(e,10),this.adjustCalendars())},setMinDate:function(e){f(e),this._o.minDate=e,this._o.minYear=e.getFullYear(),this._o.minMonth=e.getMonth()}
1,setMaxDate:function(e){this._o.maxDate=e},setStartRange:function(e){this._o.startRange=e},setEndRange:function(e){this._o.endRange=e},draw:function(e){if(this._v||e){var t=this._o,r=t.minYear,n=t.maxYear,o=t.minMonth,a=t.maxMonth,s="";this._y<=r&&(this._y=r,!isNaN(o)&&this._m<o&&(this._m=o)),this._y>=n&&(this._y=n,!isNaN(a)&&this._m>a&&(this._m=a));for(var c=0;c<t.numberOfMonths;c++)s+='<div class="pika-lendar"><div class="di-close"><span class="access">Close&gt;</span><svg class="i-xxsml"><use xlink:href="/simplicity/simplicity-smaller/svgs/svgdefs.svg#i-close-sml" xmlns:xlink="http://www.w3.org/1999/xlink"/></svg></div><div class="rhombe"></div><a href="https://www.vodafone.de" class="logo"><img src="//www.vodafone.de/simplicity/simplicity-smaller/img/vf-logo.png" alt="" itemprop="logo"></a>'+k(this,c,this.calendars[c].year,this.calendars[c].month,this.calendars[0].year)+this.render(this.calendars[c].year,this.calendars[c].month)+"</div>";if(this.el.innerHTML=s,t.bound&&"hidden"!==t.field.type&&i(function(){t.trigger.trigger("focus")},1),"function"==typeof this._o.onDraw){var u=this;i(function(){u._o.onDraw.call(u)},0)}}},adjustPosition:function(){var e,t,r,i,o,a,s,c,u,l;if(!this._o.container){if(this.el.style.width="auto",this.el.style.height="auto",600>window.innerWidth)return this.el.style.position="fixed",this.el.style.left="0px",this.el.style.top="0px",this.el.style.width="100%",void(this.el.style.height="100%");if(this.el.style.position="absolute",t=e=this._o.trigger,r=this.el.offsetWidth,i=this.el.offsetHeight,o=window.innerWidth||n.documentElement.clientWidth,a=window.innerHeight||n.documentElement.clientHeight,s=window.pageYOffset||n.body.scrollTop||n.documentElement.scrollTop,"function"==typeof e.getBoundingClientRect)c=(l=e.getBoundingClientRect()).left+window.pageXOffset+10,u=l.bottom+window.pageYOffset-10;else for(c=t.offsetLeft,u=t.offsetTop+t.offsetHeight;t=t.offsetParent;)c+=t.offsetLeft,u+=t.offsetTop;(this._o.reposition&&c+r>o||-1<this._o.position.indexOf("right")&&0<c-r+e.offsetWidth)&&(c=c-r+e.offsetWidth),(this._o.reposition&&u+i>a+s||-1<this._o.position.indexOf("top")&&0<u-i-e.offsetHeight)&&(u=u-i-e.offsetHeight),this.el.style.left=c+"px",this.el.style.top=u+"px"}},render:function(e,t){var r=this._o,n=new Date,i=function(e,t){return[31,p(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]}(e,t),o=new Date(e,t,1).getDay(),a=[],s=[];f(n),0<r.firstDay&&0>(o-=r.firstDay)&&(o+=7);for(var c=i+o,u=c;7<u;)u-=7;c+=7-u;for(var m=0,g=0;m<c;m++){var v=new Date(e,t,m-o+1),b=!!l(this._d)&&h(v,this._d),k=h(v,n),D=m<o||m>=i+o,O=r.startRange&&h(r.startRange,v),I=r.endRange&&h(r.endRange,v),w=r.startRange&&r.endRange&&r.startRange<v&&v<r.endRange,T={day:m-o+1,month:t,year:e,isSelected:b,isToday:k,isDisabled:r.minDate&&v<r.minDate||r.maxDate&&v>r.maxDate||r.disableWeekends&&d(v)||r.disableDayFn&&r.disableDayFn(v),isEmpty:D,isStartRange:O,isEndRange:I,isInRange:w};s.push(y(T)),7===++g&&(r.showWeekNumber&&s.unshift(_(m-o,t,e)),a.push(S(s,r.isRTL)),s=[],g=0)}return C(r,a)},isVisible:function(){return this._v},show:function(){var e,t,r;this._v||(e=this.el,t="is-hidden",e.className=(r=(" "+e.className+" ").replace(" "+t+" "," ")).trim?r.trim():r.replace(/^\s+|\s+$/g,""),this._v=!0,this.draw(),this._o.bound&&(o(n,"click",this._onClick),this.adjustPosition(),o(n.getElementsByClassName("di-close")[0],"click",this.hide)),"function"==typeof this._o.onOpen&&this._o.onOpen.call(this))},hide:function(){var e,t,r=this._v;!1!==r&&(this._o.bound&&a(n,"click",this._onClick),this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto",e=this.el,c(e,t="is-hidden")||(e.className=""===e.className?t:e.className+" "+t),this._v=!1,void 0!==r&&"function"==typeof this._o.onClose&&this._o.onClose.call(this))},destroy:function(){this.hide(),a(this.el,"mousedown",this._onMouseDown,!0),a(this.el,"touchend",this._onMouseDown,!0),a(this.el,"change",this._onChange),this._o.field&&(a(this._o.field,"change",this._onInputChange),this._o.bound&&(a(this._o.trigger,"click",this._onInputClick),a(this._o.trigger,"focus",this._onInputFocus),a(this._o.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},D}),function(){"use strict";vf.dateTimeTables={settings:{target:".mod-date-time-tables",wrapper:".delivery-time-tables-wrapper",tables:".delivery-time-tables",table:".delivery-time-table"},init:function(e){var t=this.settings;
1$(t.target,e).addBack(t.target).each(function(){var e=$(this),r=e.find(t.table).length,n=vf.dateTimeTables.calculateTableWidth(e);e.find(t.tables).css("width",n*r+"px"),e.find(t.table).css("width",n+"px");var i=e.find(".scroll-pane");i&&(i.jScrollPane(),i.bind("jsp-scroll-x",function(t,r,n,i){n?e.find(".shadow-left").hide():e.find(".shadow-left").show(),i?e.find(".shadow-right").hide():e.find(".shadow-right").show()})),$(window).on("vf::resize orientationchange",function(){n=vf.dateTimeTables.calculateTableWidth(e),e.find(t.tables).css("width",n*r+"px"),e.find(t.table).css("width",n+"px")})})},calculateTableWidth:function(e){var t=this.settings;if("desktop"===vf.util.layout(!0)||"tablet"===vf.util.layout(!0)){const r=100,n=35.75;return parseInt(e.find(t.wrapper).width()/r*n)}return e.find(t.wrapper).width()}}}(),function(){"use strict";vf.basketMod={settings:{target:".basket-v2-item-wrap"},init:function(e){var t=this.settings;$(t.target,e).addBack(t.target).each(function(){vf.basketItem.init(this)})}},vf.basketItem={settings:{target:".tariff-detail-akko"},init:function(e){var t,r=$(e),n=this.settings,i=r.find(".icon-box").height(),o=r.find(".basket-v2-item"),a=r.find(".swipe");a.on("touchstart",function(e){e.preventDefault(),t=e.originalEvent.touches[0].clientX}),a.on("touchend",function(e){e.preventDefault();var r=e.originalEvent.changedTouches[0].clientX;t>r+5?o.css("left","-80px"):t<r-5?o.css("left","0"):0===parseInt(o.css("left"))?o.css("left","-80px"):o.css("left","0")}),$(n.target,e).addBack(n.target).each(function(){".tariff-detail-akko"===n.target&&vf.basketAccordion.init(this)}),$(window).on("vf::resize",function(){i=r.find(".basket-v2-item").height()-r.find(".detail").height()}),r.on("vf::basketAkkordionOpen",function(){$(this).find(".icon-box").height(i+"px")}),r.on("vf::basketAkkordionClose",function(){$(this).find(".icon-box").height("100%")})}},vf.basketAccordion={init:function(e){var t=$(e);t.find(".head").on("click",vf.basketAccordion.toggleAccordion),$(window).on("vf::resize",function(){var e=t.find(".head").parent();if(e.hasClass("active")){var r=parseInt(e.find(".bullet-list").css("height"));e.find(".detail, .detail-wrap").css({height:r+"px"})}})}
1,toggleAccordion:function(){var e=$(this).parent(),t=e.parents(".basket-v2-item-wrap"),r=parseInt(e.find(".bullet-list").css("height"));e.hasClass("active")?(e.find(".detail-wrap, .detail").animate({height:"0px"},500,function(){t.trigger("vf::basketAkkordionClose")}),e.removeClass("active")):(_ddq.push(["ab-test event one",{context:"sim-only aktions-details"}]),t.trigger("vf::basketAkkordionOpen"),e.find(".detail, .detail-wrap").animate({height:r+"px"},500),e.addClass("active"))}}}(),function(){"use strict";angular.module("ecommerce.authorization",["ecommerce.config"]).config(["$httpProvider",function(e){e.interceptors.push("authHttpResponseInterceptor")}]).factory("authHttpResponseInterceptor",["$q","$injector",function(e,t){var r=t.get("config");return{response:function(n){var i=e.defer();if(r.isUrlApiUrl(n.config.url)){var o=n.headers()[r.COOKIESET.HEADERFLAG];if(o&&""!==o){if(0<o.indexOf(", ")){var a=o.split(", ");a&&0<a.length&&(o=a[a.length-1])}(function(n){var i=e.defer();return t.get("$http")({method:"GET",url:r.COOKIESET.BSHOPURL,headers:{"x-vf-bshoptoken":n}}).then(function(){i.resolve()},function(){i.reject({error:"something went wrong"})}),i.promise})(o).then(function(){i.resolve(n)},function(){i.resolve(n)})}else i.resolve(n)}else i.resolve(n);return i.promise},responseError:function(n){if(403===n.status&&"selTokenError"===n.data.responseCode&&r.isUrlApiUrl(n.config.url)){var i=e.defer(),o=i.promise,a=t.get("$http");return function(){var n=t.get("$http"),i=e.defer();
1return n({method:"POST",timeout:2e4,cache:!1,headers:{Authorization:"Basic MmRqbXdDemlBbGk1ZkI2UEtCc0FnWnJ1OVhHOTNqdEU6RTNMdUlWV2MzUWFuMmoxVQ==","Content-Type":"application/x-www-form-urlencoded"},data:{grant_type:"client_credentials",apix_opcoid:"49",scope:"bshop_all"},transformRequest:function(e){var t=[];for(var r in e)t.push(encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t.join("&")},url:r.SELTOKEN.URL}).then(function(){i.resolve("success")}),i.promise}().then(function(n){(function(n){var i=t.get("$http"),o=e.defer();return i({method:"GET",url:r.COOKIESET.SELURL,headers:{"x-vf-seltoken":n}}).then(function(){o.resolve()}),o.promise})(n).then(function(){i.resolve()})}),o.then(function(){return a(n.config)})}return e.reject(n)}}}])}(),VF.customTracking=!0,function(){"use strict";angular.module("ecommerce.vlux",[]).factory("factoryPrivatePricing",["$http","$q","$injector","factorybShopBasket","factoryNbaData",function(e,t,r,n,i){var o=r.get("config").apiURLs.OFFERS;return{loadPrivatePricingOffers:function(){var r=t.defer(),a=n.getOfferGroup(),s=i.getCellCode("inlifeTariffChangeEligibility");return null!==s?e.get(o+"/"+a.salesChannel+"/"+a.btx+"/"+s).then(function(e){generalOfferService.btx="tariffChange",generalOfferService.addContextDependentVluxData(e.data.ppOffers,!0),generalOfferService.getOfferGroupByShopBasket(n.get()).then(function(e){for(var t=e.mainOffer.offerDependencies.getServiceIdsByUsecase("cellcode",s),i=0;i<=t.length;i++)e.mainOffer.offerServices.addSelectedService(t[i]);n.setOfferGroup(e),r.resolve()})},function(){r.reject()}):r.resolve(),r.promise}}}])}(),VF.customTracking=!0,function(){"use strict";angular.module("ecommerce.utils",[])}(),VF.customTracking=!0,function(){"use strict";angular.module("ecommerce.utils",[]).factory("factoryUtils",["$http","$q","$injector","factorybShopBasket",function(e,t,r,n){return{setCookie:function(e,t){document.cookie=e+"="+(t||"")},getCookies:function(){for(var e={},t=document.cookie.split("; "),r=0;r<t.length;r++){var n=t[r].split("=");e[n[0]]=n[1]}return e},getCookie:function(e){return this.getCookies()[e]},clone:function(e){if(null===e||"object"!=typeof e)return e;var t=e.constructor();for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}}}])}(),VF.customTracking=!0,function(){"use strict";angular.module("moduleFormTracking",["ecommerce.utils"])}(),VF.customTracking=!0,function(){"use strict";angular.module("moduleFormTracking").factory("factoryTracking",["$state","formsSummary","factorybShopBasket","factoryTrackingSender","factoryUtils","factoryFormData",function(e,t,r,n,i,o){var a="not logged in",s={siteArea:"mobility",lineOfCustomer:"",platformType:"responsive",loginStatus:a,siteStructure:[],pageType:"",oForm:{},oOrder:{}},c=["privatkunden","eCommerce","checkout"],u="order funnel",l=0,d=null,p=null,f=[],h={},m={},g="",v=[],b=function(e){s.lineOfCustomer=e,s.oOrder.aPropositions&&s.oOrder.aPropositions.forEach(function(e){e.targetAudience=s.lineOfCustomer})},y=function(e,t){if(e?.offerComponents?.components){var n=r.getNestedProperty(e,"offerComponents.subscription._enrichedDataSubscription.isDeviceFinance"),i=e.offerComponents.components.find(e=>"tariffMobile"===e.type)?.refId,o=(a=i,VF.const.deviceFinanceMonths.get(a)||null);if(n&&o)t.aProducts.find(e=>e.name.indexOf("device financing")>=0)||t.aProducts.push({name:`device financing ${o} months`,type:"service",sku:`device financing ${o} months`,proposition:e.pid})}var a;e&&e.simcardId&&t.aProducts.push({name:e.isEsimOffer?"esim":"triplesim",priceMonthly:0,type:"service",sku:e.simcardId.toString(),proposition:e.pid})},_=function(e,b){var _={};$.extend(_,h,s.oOrder),$.extend(!0,_,m),s.oOrder=_,function(e){i.getCookie("basket-id")&&(e.order_information_deeplink=i.getCookie("basket-id"))}(s.oOrder);for(var S=0;S<s.oOrder.aProducts.length;S++)"esim"!==s.oOrder.aProducts[S].name&&"triplesim"!==s.oOrder.aProducts[S].name||(s.oOrder.aProducts.splice(S,1),--S);var k=r.getOfferGroup();if(y(k.mainOffer,s.oOrder),k.redplusOffers)for(S=0;S<k.redplusOffers.length;S++)y(k.redplusOffers[S],s.oOrder);k=r.getOfferGroup();if(""!==g&&0<v.length)for(S=0;S<v.length;S++){var C=k.mainOffer.offerServices.getServiceById(v[S]),D={};if(C.price&&0<C.prices.length){if("month"===C.prices[0].recurrenceUnit){var O=C.prices[0].value;D={name:"Voucher redeemed "+C.label,priceMonthly:O,type:C.serviceType,sku:g.trim(),duration:C.prices[0].recurrenceEnd,proposition:s.oOrder.aPropositions[0].id}}else{var I=C.prices[0].value;D={name:"Voucher redeemed "+C.label,priceOnce:I,type:C.serviceType,sku:g.trim(),duration:C.prices[0].recurrenceEnd,proposition:s.oOrder.aPropositions[0].id}}s.oOrder.aProducts.push(D)}else C.hidden||(D={name:"Voucher redeemed "+C.label,type:C.serviceType,sku:g.trim(),proposition:s.oOrder.aPropositions[0].id},s.oOrder.aProducts.push(D))}VF&&VF.oOrder&&VF.oOrder.shippingMethod&&(s.oOrder.shippingMethod=VF.oOrder.shippingMethod),VF&&VF.oOrder&&VF.oOrder.numberPortability&&(s.oOrder.numberPortability=VF.oOrder.numberPortability),VF&&VF.onlineIdentOptions&&(s.onlineIdentOptions=VF.onlineIdentOptions),VF&&VF.onlineIdentMethod&&(s.onlineIdentMethod=VF.onlineIdentMethod),VF&&VF.daysBeforeOrderChange&&(s.daysBeforeOrderChange=VF.daysBeforeOrderChange),VF&&VF.oOrder&&e&&(s.oOrder.BEWAllowContactMe=VF.oOrder.BEWAllowContactMe),VF&&VF.oOrder&&e&&(s.oOrder.BEWAllowDataUsage=VF.oOrder.BEWAllowDataUsage),VF&&VF.oOrder&&VF.oOrder.contractSignedByParent&&(s.oOrder.contractSignedByParent=VF.oOrder.contractSignedByParent),VF&&VF.oOrder&&VF.oOrder.hasGroebaDiscount&&(s.oOrder.hasGroebaDiscount=VF.oOrder.hasGroebaDiscount);var w,T,P,A=[],E=t.getCurrentIndex();
1if((t.getCurrentForm()&&t.getCurrentForm().stepName||e)&&t.getCurrentForm()&&t.getCurrentForm().stepName){if(w=t.getCurrentForm().stepName,d||(s.pageType=t.getCurrentForm().stepName),s.pageType||(s.pageType=d),"checkout.enterprise"===t.getStateName()&&(s.siteArea="enterprise-mobility",c=["geschaeftskunden","eCommerce","checkout"]),s.siteStructure=JSON.parse(JSON.stringify(c)),l!==E||b||(A=["start"]),i.getCookie("MDDKeks")||r.getNeedsAuth()?s.loginStatus="logged in":s.loginStatus=a,e){A=["end","success"];E+=2,w="confirmation",s.pageType=p||"confirmation",s.siteStructure.push("confirmation")}else t.getCurrentForm()&&(E+=1,s.siteStructure.push(t.getCurrentForm().stepName));var M={name:k.isStone()?"checkout.iot":t.getStateName(),formType:u,formStep:E.toString(),formStepName:w,formStatus:A};s.oForm=angular.extend({},s.oForm,M),T=w,P=!1,o.getData()&&o.getData().RECHNUNG&&o.getData().RECHNUNG.rechnung_type&&(P="Abweichend"===o.getData().RECHNUNG.rechnung_type.val),"summary"===T||"confirmation"===T||"payment"===T?s.oOrder.alternative_billing_address=P:delete s.oOrder.alternative_billing_address,function(){var e=sessionStorage.getItem("SAILS_BNT"),t=!1;if(e)try{var r=JSON.parse(e);t=Boolean(r&&r.mnpStatus)}catch(e){}t&&s.oOrder&&Array.isArray(s.oOrder.aProducts)&&(s.oOrder.aProducts.some(function(e){return"number porting"===e.sku})||s.oOrder.aProducts.push({sku:"number porting",name:"number porting",type:"service",proposition:1,units:1,priceMonthly:"0"}))}(),("online ident"!==s.pageType&&"customer address"!==s.pageType||b)&&n.doTrack("pageview",s),f=s}},S=function(e){window._ddq=window._ddq||[],_ddq.push(["pageview",e])};return{trackSimTypeSwitch:function(e){!function(e){var t=[],r=[],i="esim"===e.simVariant?VF.const.SimCardIdESimAsMainCard:VF.const.SimCardIdTripleSimAsMainCard;t.push({name:"esim"===e.simVariant?e.simVariant:"triplesim",sku:i.toString(),proposition:e.propositionId,priceMonthly:0,type:"service"});var o="physicalsim"===e.simVariant?VF.const.SimCardIdESimAsMainCard:VF.const.SimCardIdTripleSimAsMainCard;r.push({name:"physicalsim"===e.simVariant?"esim":"triplesim",sku:o.toString(),proposition:e.propositionId,priceMonthly:0,type:"service"}),n.doTrack("switch options",{selectedOption:t,removedOption:r})}(e)},trackMnpSwitch:function(e){var t={sku:"number porting",name:"number porting",type:"service",proposition:1,units:1,priceMonthly:"0"};e?(s.oOrder.aProducts.push(t),n.doTrack("switch options",{selectedOption:[t]})):(s.oOrder.aProducts=s.oOrder.aProducts.filter(function(e){return e.sku!==t.sku}),n.doTrack("switch options",{removedOption:[t]}))},initVoucherCode:function(e){!function(e){g=e}(e)},initVoucherServicesForVoucher:function(e){!function(e){v=e}(e)},trackVoucher:function(e){!function(e){window._ddq=window._ddq||[];const t={type:"notification",message:e,code:"Voucher code unknown",location:""};_ddq.push(["error",t])}(e)},initVVLCheckout:function(e){$.extend(!0,s,e)},initInlifeCheckout:function(e){$.extend(!0,s,e)},initPP:function(e){h=e},trackCheckoutFormInit:function(e){var t=new vf.TrackCalculateCostsObj(e,s.lineOfCustomer),n=r.getNestedProperty(e.mainOffer,"offerComponents.subscription._enrichedDataSubscription.isDeviceFinance");s.oOrder=t.getData(e,n),_()},trackNextItem:function(){_(!1)},trackNextItemGoingBack:function(){_(!1,!0)},trackLast:function(){_(!0)},trackSuccess:function(e){m={shippingMethod:e.shippingMethod,paymentMethodOnce:e.paymentMethodOnce,paymentMethodRecurring:"credit",orderID:e.orderID,zipcode:e.zipCode,commissioningId:e.CID,shippingStoreID:e.shippingStoreID},_(!0)},trackError:function(e,t,r,n,i,o,a,s){window._ddq=window._ddq||[];var c={error_type:e,error_message:t,error_action:i};if(o&&(c.error_area=o),r&&(c.error_code=r&&r.toString()),a&&s){const e=s+" "+a,t=100;c.error_details=e.length>t?s:e}else c.error_details=s||a;n&&(c.location=n),_ddq.push(["error",c])},initLineOfCustomer:function(e){var t=new vf.LineOfCostumer(e);b(t.getLoc())},setSohoLineOfCustomer:function(e){b("soho "+e)},setNewSimcardNeeded:function(e){s.oForm.context=e?"new sim card":"sim card deselected"},trackPrepaidIdent:function(e){f.onlineIdentOptions=e,window._ddq=window._ddq||[],_ddq.push(["pageview",f])},trackOrderForMyChild:function(e){f.contractSignedByParent=e,window._ddq=window._ddq||[],_ddq.push(["pageview",f])},getOOrder:function(){return s.oOrder},setOOrder:function(e){s.oOrder=e}
1,getSingleOOrder:function(e){if(s.oOrder&&s.oOrder.aPropositions&&s.oOrder.aProducts){var t=s.oOrder.aPropositions,r=[];for(var n in t)if(e===t[n].bShopId){r.push(t[n]);break}var i=s.oOrder.aProducts,o=[];for(var n in i)0<r.length&&r[0].id===i[n].proposition&&o.push(i[n]);return{aPropositions:r,aProducts:o}}return{}},setSiteStructure:function(e){c=e},setFormType:function(e){u=e},setFormStart:function(e){l=e},trackPageview:S,trackThankYouPage:function(){s.siteStructure=JSON.parse(JSON.stringify(c)),s.siteStructure.push("thank you"),s.pageType="customer",delete s.oForm,delete s.oOrder,delete s.lineOfCustomer,setTimeout(function(){S(s)},5e3)},setLoginStatus:function(e){a=e},setPageType:function(e){d=e},setPageTypeLast:function(e){p=e}}}])}(),function(){"use strict";angular.module("moduleFormTracking").factory("factoryTrackingSender",[function(){return{doTrack:function(e,t){!function(e,t){window._ddq=window._ddq||[],_ddq.push([e,t])}(e,t)}}}])}(),VF.customTracking=!0,function(){"use strict";angular.module("moduleFormTracking").factory("factoryTrackFormError",["factoryTrackingSender","formsSummary",function(e,t){var r={type:"",message:"",code:"",location:""};return{trackFormError:function(n,i){r.message=i,r.code=n,r.type="validation",r.location=t.getStateName()+" "+t.getCurrentForm().stepName,e.doTrack("error",r)}}}])}(),function(){"use strict";angular.module("ecommerce.cartcount",[]).factory("factoryCartCount",["$http","$q","$injector",function(e,t,r){var n=r.get("config"),i=n.OLSCARTCOUNTCOOKIENAME,o=0;return{setBasketCookieByValue:function(e){var t=new Date;t.setTime(t.getTime()+2592e6),$.cookie(i,e,{path:"/"}),getCartCount()},deleteCookie:function(){$.cookie(i,null,{path:"/"}),$(".counter").text(getCartCount())},getCartCount:function(){var r=t.defer();return e.get(n.apiURLs.CARTCOUNT).then(function(e){o=e.data.numberOfPropositions,r.resolve()},function(){r.resolve()}),r.promise},setBasketCookie:function(){this.setBasketCookieByValue(o)}}}])}(),function(){"use strict";angular.module("ecommerce.authentication.services",[])}(),function(){"use strict";angular.module("ecommerce.authentication",["ngSanitize","ecommerce.authorization","ecommerce.authentication.services","ecommerce.cartcount"]).config(["$httpProvider","$locationProvider",function(e,t){e.interceptors.push("authHttpResponseInterceptor"),t.html5Mode({enabled:!0,requireBase:!1})}])}(),function(){"use strict";angular.module("ecommerce.authentication").controller("shopAuthCtrl",["shopConfigFile","shopAuthSrv","shopNBASrvRedPlus","shopNBASrvVVL","shopNBASrvMulticardContract","shopNBASrvMultisim","shopNBASrvTariffChange","shopNBASrvDecide","shopTracking","$scope","$location","authMobileNumberValidation","authenticationServiceEvolvedFactory",function(e,t,r,n,i,o,a,s,c,u,l,d,p){var f=this,h=l.search().btype,m={siteArea:VF.siteArea,platformType:VF.platformType,loginStatus:VF.loginStatus,pageType:VF.pageType,siteStructure:null},g=VF.siteStructure.slice(0);function v(e,t){var r=g.slice(0);r.push(e),r.push(t);var n=JSON.parse(JSON.stringify(m));return n.siteStructure=r.slice(0),n}function b(){$(".auth-content").show(),c.trackEvent("pageview",v(u.currentBtx,"provide msisdn"))}function y(e){return"/"!==e.charAt(0)&&(e="/"+e),"https://"+l.host()+e}function _(){f.credentials={username:"",tan:""}}function S(){$("body").css("cursor","default"),f.buttonPushed=!1}u.checkTAN=function(){u.formAuthentification.kennwort.$setValidity("service",!0)},u.checkMSISDN=function(){var e=f.credentials.username,t=d.splitNumber(e);return!1===t||!1===t.isNumberValid?u.formAuthentification.msisdn.$setValidity("service",!1):(u.formAuthentification.msisdn.$setValidity("service",!0),f.credentials.username=t.cleanNumber),!0===t.isNumberValid}
1,$(".tg-icon").on("click",function(){var e=$(this).parent().parent().find(".mod-info-toggle");e.toggleClass("info-active");var t=$(this).parent().parent().find(".fm-forminfo-ol-wrapper"),r=t.height();if(r>67){var n=r-67;t.css("top","calc(50% - "+n/2+"px)")}e.hasClass("info-active")&&(1===u.currentStep?c.trackEvent("notification",{type:"notification",message:"i - handy info",location:"msisdn field"}):2===u.currentStep&&c.trackEvent("notification",{type:"notification",message:"i - sms code info",location:"mtan field"}))}),l.search().cancel&&$("#btAbbrechen,#btCancel").on("click",function(e){e.preventDefault(),window.location.href=y(decodeURIComponent(l.search().cancel))}),f.hasError=function(e){return f.errorCode===e},f.hasCriticalError=function(){return-1!==f.criticalError.indexOf(f.errorCode)},f.resetAuthForm=function(){u.currentStep=1,f.currentStep=1,u.showCodeField=!0,u.formAuthentification.$setPristine(),u.formAuthentification.$setUntouched(),u.formAuthentification.kennwort.$setValidity("required",!0),u.formAuthentification.kennwort.$setValidity("service",!0),f.errorCode=0,f.buttonPushed=!1,_(),c.trackEvent("pageview",v(u.currentBtx,"provide msisdn"))},f.submitAuthForm=function(e){if(void 0===e&&(e=f.currentStep),f.errorCode=0,1===f.currentStep&&(u.formAuthentification.kennwort.$setValidity("required",!0),u.formAuthentification.msisdn.$setTouched(),u.checkMSISDN()),!u.formAuthentification.$valid)return u.formAuthentification.$submitted=!0,c.trackEvent("error",{message:"Wrong mobile number format",location:"msisdn field",type:"validation"}),!1;function t(e){var t=!1;try{t=""!==e.inlifeTariffChangeEligibility.cellcode}catch(e){}return t}function d(e){var t=!1;try{("B"===e.accountType||"S"===e.accountType||function(e){var t=!1;try{for(var r=0;r<e.length;r++)if("SOHOV15_1"===e[r].backendId||"SOHOV15"===e[r].backendId){t=!0;break}}catch(e){}return t}(e.currentServices))&&(t=!0)}catch(e){}return t}function m(e){return"Y"===e.hasFF}function g(e){var t=e.gigaKombiInformation;return!!t&&(t.hasGigaKombiBR5||t.hasGigaKombiInternetPhoneDiscount||t.hasGigaKombiTVDiscount)}function b(e){var t=e.responseCode,r=e.vvlEligibility,n=m(e),i="Y"===e.vvlEligibility.simOnlyAllowed,o=function(e){var t=!1,r=e.eligiblity;if(Object.keys(r).length>0)for(var n in r)if("Y"===r[n]){t=!0;break}return t}(r),a=d(e),s=g(e);return!("N.G.200.0"!==t||!o||!i||s||a||n)}function _(e,t,r,n){var i={message:e.toLowerCase(),location:t.toLowerCase(),code:r.toString().toLowerCase(),type:n.toLowerCase()};c.trackEvent("error",i)}function k(e){var t=e.data.currentTariff||"",r=d(e.data),n=m(e.data),i=!1;return e.data&&e.data.vvlEligibility&&e.data.vvlEligibility.eligiblity&&(i="N"===e.data.vvlEligibility.eligiblity.STD&&"N"===e.data.vvlEligibility.eligiblity.ART),((r||n)&&t.match(/GM\d+L\w*/g)&&i||!(!t.match(/GM\d+UL\w*/g)||!i))&&(f.errorCode=2005,_("customer has highest tarif available","mtan field",f.errorCode,"authentication"),!0)}function C(e,t,r,n){try{var i=e.inlifeTariffChangeEligibility.cellcode,o=e.inlifeTariffChangeEligibility.eligiblity,a=e.currentTariff||"";return"Y"===o&&""===i?"Y"===e.hasFF?t.fuf.slotmachine:d(e)?t.soho.slotmachine:"Y"===e.isYoungCustomer?a.match(/(YOU3UL\w*|GMY\dUL\w*)|(RED\w*|GM\d\w*)/g)?t.consumer.slotmachine:t.young.slotmachine:t.consumer.slotmachine:r?"Y"===e.hasFF?n?t.fuf.personalOffer:t.fuf.slotmachine:d(e)?n?t.soho.personalOffer:t.soho.slotmachine:g(e)?u.gotoObj.vvl.gigakombi.default:e.currentTariff.match(/(YOU\w*|GMY\w*)/g)?n?t.young.personalOffer:t.young.slotmachine:n?t.consumer.personalOffer:t.consumer.slotmachine:"Y"===e.hasFF?t.fuf.slotmachine:d(e)?t.soho.slotmachine:g(e)?u.gotoObj.vvl.gigakombi.default:"Y"===e.isYoungCustomer?t.young.slotmachine:t.consumer.slotmachine}catch(e){return t.consumer.slotmachine}}function D(e,r){var n={},i=r.data,o="";switch(e){case"vvl":try{o=C(i,n="voice"===i.currentTariffType||"Y"===i.isYoungCustomer?u.gotoObj.vvl.voice:u.gotoObj.vvl.data,!1,!1)}catch(e){}break;case"redplus":o="/redplus";try{o=u.gotoObj.redplus.auswahlDialog}catch(e){}case"tariffchange":o="/vvl",o=C(i,n=u.gotoObj.tariffchange,!0,a=t(i));case"decide":o="/vvl";try{var a=!1;!function(e){var t=!1;try{t="Y"===e.inlifeTariffChangeEligibility.eligiblity}catch(e){}return t}(i)?(a=!1,n="voice"===i.currentTariffType||"Y"===i.isYoungCustomer?u.gotoObj.vvl.voice:u.gotoObj.vvl.data):(n=u.gotoObj.tariffchange,a=t(i)),o=C(i,n,!0,a)}catch(e){}}return y(o)}function O(e,t,r){window.sessionStorage.removeItem("curiosity_flow"),window.sessionStorage.removeItem("SAILS_VVL");var n=r.data;if("decide"===e){var i=b(n);window.location.href=i?"/privat/vertragsverlaengerung/funnelpage.html":D("decide",r)}else if("object"==typeof u.gotoObj)window.location.href=D(e,r);else if("string"==typeof u.goto){var o=function(e){var t=e.match(/[\?&]goto=([^&]*)(?:&|$)/);if(t&&t[1]){var r=decodeURIComponent(t[1]),n=e.substring(t.index+t[0].length).match(/([^&]+=[^&]*)(?:&|$)/g);return n&&(r+="&"+encodeURIComponent(n.join("&"))),r}return null}(l.url());window.location.href=o}else document.location.href=t}function I(){S(),k(response)?f.errorCode=2005:(f.errorCode=4091,_("critical error","mtan field",f.errorCode,"authentication"))}function w(e){switch(S(),e.redplusEligibility){case"technicalError":default:f.errorCode=401;break;case"eligible":O("redplus","/redplus",e);break;case"noSlotsButOtherMSISDN":f.errorCode=2002;break;case"noSlots":f.errorCode=2003;break;case"otherMSISDN":f.errorCode=2004;break;case"notElegible":f.errorCode=2001,u.showCodeField=!1}S();var t=v(u.currentBtx,"unsuccessful");return t.error={type:"validation",message:"unfortunately you cannot extend your contract"},c.trackEvent("pageview",t),0!==f.errorCode&&_(t.error.message,"mtan field",f.errorCode,"authentication"),e}function T(e){if(S(),k(e))return e;if("M"===e.data.redplusEligibility.memberType&&"Y"===e.data.isRedPlusVVL)f.errorCode=2007,u.showCodeField=!1;else{if(e.isEligable)O("vvl","/vvl",e);else switch(e.error.errorCode){case"400":f.errorCode=2100,u.showCodeField=!1;break;case"401.2":f.errorCode=4012;break;default:f.errorCode=401}S();var t=v(u.currentBtx,"unsuccessful");t.error={type:"validation",message:"unfortunately you cannot change your tariff"},c.trackEvent("pageview",t),0!==f.errorCode&&_(t.error.message,"mtan field",f.errorCode,"authentication")}return e}function P(e){if(S(),e.isEligable)O("multisim","/multisim",e);else{switch(e.error.errorCode){case"400":f.errorCode=2105,u.showCodeField=!1;break;case"400.1":f.errorCode=2031;break;case"401.2":f.errorCode=4012;break;default:f.errorCode=401}S();var t=v(u.currentBtx,"unsuccessful");t.error={type:"validation",message:"unfortunately you cannot have your one number service"},c.trackEvent("pageview",t),0!==f.errorCode&&_(t.error.message,"mtan field",f.errorCode,"authentication")}return e}function A(e){if(S(),e.isEligable)O("multicardContract","/multicardContract",e);else{switch(e.error.errorCode){case"400":f.errorCode=2105,u.showCodeField=!1;break;case"400.1":f.errorCode=2031;break;case"401.2":f.errorCode=4012;break;default:f.errorCode=401}S();var t=v(u.currentBtx,"unsuccessful");t.error={type:"validation",message:"unfortunately you cannot have your smart tech one number service"},c.trackEvent("pageview",t),0!==f.errorCode&&_(t.error.message,"mtan field",f.errorCode,"authentication")}return e}function E(e){if(S(),k(e))return e;if("M"===e.data.redplusEligibility.memberType&&"Y"===e.data.isRedPlusVVL)f.errorCode=2007,u.showCodeField=!1;else if(e.isEligable)O("tariffchange","/vvl",e);else{var t="";switch(e.error.errorCode){case"400":f.errorCode=21003,u.showCodeField=!1,t="contract cant be changed";break;case"401.2":f.errorCode=4012,t="login via ussa, more possible subscribers";break;default:f.errorCode=401,t="user is not eligible"}S(),_(t,"mtan page",f.errorCode,"authentication")}return e}function M(e){S();if(k(e))return e;if("M"===e.data.redplusEligibility.memberType&&"Y"===e.data.isRedPlusVVL)f.errorCode=2007,u.showCodeField=!1;else if(e.isEligable)O("decide","/vvl",e);else{var t="";switch(e.error.errorCode){case"400":f.errorCode=21004,u.showCodeField=!1,t="contract cant be extended";break;case"401.2":f.errorCode=4012,t="login via ussa, more possible subscribers";break;default:f.errorCode=401,t="authentication failed user is not eligible"}S(),_(t,"mtan page",f.errorCode,"authentication")}return e}function N(e){if("object"==typeof e&&0!==Object.keys(e).length&&200===e.status)switch(h.toLowerCase()){case"mnp":case"force":case"festnetz"
1:case"catamaran-festnetz":l.search().goto&&(window.location.href=y(l.search().goto));break;case"multisim":sessionStorage.setItem("bShop_login","1"),o.retrieve().then(P,I);break;case"multicardcontract":i.retrieve().then(A,I);break;case"vvl":n.retrieve().then(T,I);break;case"tariffchange":a.retrieve().then(E,I);break;case"decide":s.retrieve().then(M,I);break;default:r.retrieve().then(w,I)}}function B(e){S();switch(e.status){case 999:u.formAuthentification.$submitted=!0,u.formAuthentification.msisdn.$setValidity("required",!1);break;case 400:f.errorCode=400;break;case 401:if("object"==typeof e.data&&"string"==typeof e.data.responseCode)switch(e.data.responseCode){case"A.P.401.0":u.formAuthentification.kennwort.$setValidity("service",!1),f.errorCode=2006;break;case"A.P.401.1":u.formAuthentification.$submitted=!0,f.errorCode=2006;break;case"A.P.401.2":case"A.P.401.4":f.errorCode=2006;break;case"A.P.401.3":f.errorCode=4013;break;case"A.P.401.5":"vvl"===f.currentBtx?f.errorCode=40151:f.errorCode=4015;break;case"A.P.401.6":f.errorCode=4016;break;case"A.P.401.7":f.errorCode=4017;break;case"A.P.401.9":f.errorCode=4019;break;default:f.errorCode=401}else f.errorCode=2006;break;case 409:f.buttonPushed=!0,$("body").css("cursor","progress"),p.authLogout().then(function(){p.authLogin(f.credentials).then(N,B)},function(){f.errorCode=409});break;case 413:f.errorCode=413;break;default:f.errorCode=401}k(e);var t="string"==typeof e.data.description?e.data.description:"No Response from auth call";0!==f.errorCode&&_(t,"mtan field",f.errorCode,"authentication")}return f.buttonPushed||u.checkMSISDN()&&(f.buttonPushed=!0,$("body").css("cursor","progress"),1===e?p.authTan(f.credentials).then(function(e){"object"==typeof e&&0!==Object.keys(e).length&&200===e.status&&(u.formAuthentification.kennwort.$setValidity("required",!1),S(),u.currentStep=2,f.currentStep=2,c.trackEvent("pageview",v(u.currentBtx,"provide sms code")),setTimeout(function(){$("#kennwort").trigger("focus")},500))},B):p.authLogin(f.credentials).then(N,B)),!0},this.$onInit=function(){if(l.search().mtanMigrationTest){var t=window.location.href,r=new URL(t),n="/playground/new-mtan.html?"+new URLSearchParams(r.
1search).toString();window.location.href=n}else{switch($("body").addClass("mtan-login"),setTimeout(function(){$("#msisdn").trigger("focus")},1e3),f.buttonPushed=!1,f.linkBackURL=""===document.referrer?"/":document.referrer,f.criticalError=[400,4001,401,4017,4019,4091,413],f.errorCode=0,_(),u.currentBtx="redplus",f.currentBtx="redplus",u.redpluskids=!1,u.currentStep=1,f.currentStep=1,u.showCodeField=!0,h.toLowerCase()){case"mnp":u.currentBtx="mnp",f.currentBtx="mnp",f.credentials.flow="BMNP",u.mnptype=l.search().mnptype||"login";break;case"decide":case"tariffchange":u.currentBtx="tariffchange",f.currentBtx="tariffchange";break;case"vvl":u.currentBtx="vvl",f.currentBtx="vvl";break;case"multisim":u.currentBtx="multicard",f.currentBtx="multicard";break;case"multicardcontract":u.currentBtx="multicardContract",f.currentBtx="multicardContract";break;case"redpluskids":u.currentBtx="redplus",f.currentBtx="redplus",u.redpluskids=!0;break;case"festnetz":u.currentBtx="festnetz",f.currentBtx="festnetz";break;case"catamaran-festnetz":u.currentBtx="catamaran-festnetz",f.currentBtx="catamaran-festnetz";break;case"force":u.currentBtx="force",f.currentBtx="force";break;default:u.currentBtx="redplus",f.currentBtx="redplus"}var i=l.search().configURL||"";""!==i?e.get(y(i)).then(function(e){u.gotoObj=e,b()},function(){f.errorCode=401,$(".auth-content").show()}):(u.goto=l.search().goto,b())}}}])}(),function(){"use strict";angular.module("ecommerce.authentication").directive("ngEnter",function(){return function(e,t,r){t.on("keydown keypress",function(t){13===t.which&&(e.$apply(function(){e.$eval(r.ngEnter,{event:t})}),t.preventDefault())})}}).filter("gsmtomsisdn",function(){return function(e){return e.replace("GSM","0")}})}(),function(){"use strict";vf.redPlusStatus={technicalError:"technicalError",eligible:"eligible",noSlotsButOtherMSISDN:"noSlotsButOtherMSISDN",noSlots:"noSlots",otherMSISDN:"otherMSISDN",notElegible:"notElegible"}}(),function(){"use strict";vf.tooltip.settings.openIcon="i-warning-grey-b-xsml",vf.tooltip.settings.closeIcon="i-tooltip-close-b-xsml"}(),function(){"use strict";angular.module("ecommerce.authentication.services").factory("authMobileNumberValidation",function(){return{splitNumber:function(e){if(void 0===e||0===e.length)return!1;var t,r,n=!1,i=!1,o=!0,a=!1,s=!1;if(e.match(/\D/g)&&e.match(/[^0-9\/\-\\\(\) \+]/g))return!1;var c=(t=e.replace(/\D/g,"")).indexOf("1");return 11>(t="0"+t.slice(c)).length&&(n=!0,o=!1),12<t.length&&(i=!0,o=!1),0===t.indexOf("01609")?(12<t.length&&(i=!0,o=!1),12>t.length&&(n=!0,o=!1),a=!0,r="0160",t=t.slice(-8)):0===t.indexOf("0176")?(12<t.length&&(i=!0,o=!1),12>t.length&&(n=!0,o=!1),a=!0,r="0176",t=t.slice(-8)):0===t.indexOf("015")?(12<t.length&&(i=!0,o=!1),12>t.length&&(n=!0,o=!1),r=t.slice(0,5),t=t.slice(5),s=!0):(o=!1,s=!0,7<t.length&&(c=t.length-7,r=t.slice(0,c),t=t.slice(-7),4!==r.length&&5!==r.length||(o=!0),-1===["01501","01502","01505","01508","0151","01520","01521","01522","01523","01525","01526","01529","01531","01551","01555","01556","01563","01566","01567","01570","01573","01575","01577","01578","01579","01588","01590","0160","0162","0163","0170","0171","0172","0173","0174","0175","0176","0177","0178","0179"].indexOf(r)&&(o=!1))),{ndc:r,countrycode:"049",number:t,original:e,cleanNumber:r+t,isGermanCountryCode:!1,isNumberToShort:n,isNumberToLong:i,isNumberValid:o,isCountryCodePresent:!1,numberLength8:a,numberLength7:s}}}}).factory("shopConfigFile",["$http","$q",function(e,t){function r(e){try{if("object"!=typeof e.data.AuthenticationConfig.URL)return t.reject(e)}catch(r){return t.reject(e)}return e.data.AuthenticationConfig.URL}function n(e){return t.reject(e)}return{get:function(t){return e({method:"get",timeout:6e5,cache:!1,url:t,headers:{Accept:"application/json"}}).then(r,n)}}}]).factory("shopTracking",function(){return{trackEvent:function(e,t){try{window._ddq=window._ddq||[],_ddq.push([e,t])}catch(e){}}}}).factory("shopElegibilityCheck",["shopTracking",function(e){var t;function r(e){return"N.G.200.0"===t.responseCode||("N.G.401.2"===t.responseCode?(e.error.errorCode="401.2",e.error.errorType="los",e.error.subscriber=t.listOfSubscribers.split(",")):"N.G.401.1"===t.responseCode?(e.error.errorCode="401.1",e.error.errorType="auth"):!0!==t.error||"401"!==t.errorCode&&"409"!==t.errorCode?(e.error.errorCode="500",e.error.errorType="def"):(e.error.errorCode="401.1",e.error.errorType="auth")),e}function n(e){t=e.data,e.isEligable=!1,e.subscriber=[],e.error={errorCode:"",errorType:"",errorMessage:""}}return{vvl:function(i){return n(i),r(i),""===i.error.errorCode&&(t.vvlEligibility&&t.vvlEligibility.eligiblity?($.each(t.vvlEligibility.eligiblity,function(t,r){"Y"===r&&(i.isEligable=!0,e.trackEvent("Store VVL Login",{VVL_eligibility:t}))}),!1===i.isEligable&&(i.error.errorCode="400",i.error.errorMessage="customer not eligable")):i.error.errorCode="500"),i},tariffChange:function(i){return n(i),r(i),i.isEligable=!1,t.inlifeTariffChangeEligibility&&"Y"===t.inlifeTariffChangeEligibility.eligiblity&&t.inlifeTariffChangeEligibility.allowedTariffs&&0<t.inlifeTariffChangeEligibility.allowedTariffs.length&&(i.isEligable=!0,e.trackEvent("Store VVL Login",{contractExtensionEligibility:"INL24"})),!1===i.isEligable&&(i.error.errorCode="400",i.error.errorMessage="customer not eligable"),i},multicardContract:function(i){return n(i),r(i),i.isEligable=!1,t.ultracardEligibility?("Y"===t.ultracardEligibility.eligibility?(i.isEligable=!0,e.trackEvent("Store multicardContract Login",{vacantSlots:t.ultracardEligibility.vacantSlots})):"N"===t.ultracardEligibility.tariffCompat||"N"===t.ultracardEligibility.SocCompat?(i.error.errorCode="400",i.error.errorMessage="customer not eligable"):0===Number(t.ultracardEligibility.vacantSlots)?(i.error.errorCode="400.1",i.error.errorMessage="no vacant slots"):(i.error.errorCode="401",i.error.errorMessage="Unknow error"),i):i},multisim:function(i){return n(i),r(i),i.isEligable=!1,t.ultracardEligibility?("Y"===t.ultracardEligibility.eligibility?(i.isEligable=!0,e.trackEvent("Store multisim (One number) Login",{vacantSlots:t.ultracardEligibility.vacantSlots})):"N"===t.ultracardEligibility.tariffCompat||"N"===t.ultracardEligibility.SocCompat?(i.error.errorCode="400",i.error.errorMessage="customer not eligable"):0===Number(t.ultracardEligibility.vacantSlots)?(i.error.errorCode="400.1",i.error.errorMessage="no vacant slots"):(i.error.errorCode="401",i.error.errorMessage="Unknow error"),i):i}}}]).factory("shopNBASrvRedPlus",["shopNBAData","$q","shopTracking",function(e,t,r){function n(e){var t=vf.redPlusStatus.technicalError;return"object"==typeof e.data&&"string"==typeof e.data.responseCode&&(t=function(e){var t=vf.redPlusStatus.notElegible;return"O"===e.memberType?0<e.vacantSlots?(t=vf.redPlusStatus.eligible,r.trackEvent("Store Redplus Login",{})):t=vf.redPlusStatus.noSlots:t=vf.redPlusStatus.notElegible,t}(e.data.redplusEligibility)),e.redplusEligibility=t,e}function i(e){return t.reject(e)}return{retrieve:function(){return e.get("redplus","all").then(n,i)}}}]).factory("shopNBASrvVVL",["shopNBAData","$q","shopElegibilityCheck",function(e,t,r){function n(e){return r.vvl(e),e}function i(e){return t.reject(e)}return{retrieve:function(){return e.get("contractprolongation","all").then(n,i)}}}]).factory("shopNBASrvMulticardContract",["shopNBAData","$q","shopElegibilityCheck",function(e,t,r){function n(e){return r.multicardContract(e),e}function i(e){return t.reject(e)}return{retrieve:function(){return e.get("multisim","all").then(n,i)}}}]).factory("shopNBASrvMultisim",["shopNBAData","$q","shopElegibilityCheck",function(e,t,r){function n(e){return r.multisim(e),e}function i(e){return t.reject(e)}return{retrieve:function(){return e.get("multisim","all").then(n,i)}}}]).factory("shopNBASrvTariffChange",["shopNBAData","$q","shopElegibilityCheck",function(e,t,r){function n(e){return r.tariffChange(e),e}function i(e){return t.reject(e)}return{retrieve:function(){return e.get("tariffchange","validate").then(n,i)}}}
1]).factory("shopNBASrvDecide",["shopNBAData","$q","shopElegibilityCheck",function(e,t,r){function n(e){return r.vvl(e),""!==e.error.errorCode&&r.tariffChange(e),e}function i(e){return t.reject(e)}return{retrieve:function(){return e.get("tariffchange","validate").then(n,i)}}}]).factory("shopNBAData",["$http","$q","$injector",function(e,t,r){var n=r.get("config");function i(e){return e}function o(e){return t.reject(e)}return{get:function(t,r){var a=n.apiURLs.NBA;return".json"!==a.substr(-5)&&(a+="/"+t+"/"+r),e({method:"get",timeout:6e5,cache:!1,url:a,headers:{Accept:"application/json"}}).then(i,o)}}}]).factory("shopAuthSrv",["shopAuthData","$q","factoryCartCount",function(e,t,r){return{authorize:function(n){var i=t.defer(),o={};if(o.username=n.username,"number"!=typeof o.username){var a=o.username.toString();if("0"===a.charAt(0)&&(a=o.username.slice(1)),o.username=a.replace(/[^0-9]/g,"").toString(),""===o.username){return t.reject({status:999})}o.username="GSM"+o.username}return o.authType=n.authType,o.password=n.password.trim().toUpperCase(),n.flow&&(o.flow=n.flow.toUpperCase()),e.get(o).then(function(e){r.getCartCount().then(function(){r.setBasketCookie(),i.resolve(e)},function(){i.resolve(e)})},function(e){i.reject(e)}),i.promise},logout:function(){return e.get({authType:"logout"}).then(function(e){return e})}}}]).factory("shopAuthData",["$http","$q","$injector",function(e,t,r){var n=r.get("config");function i(e){return t.resolve(e)}function o(e){return t.reject(e)}return{get:function(t){return e({method:"PUT",data:t,timeout:6e5,url:n.apiURLs.LOGIN,headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(i,o)}}}]).factory("authenticationServiceEvolvedFactory",["$http","$q","$injector","factoryCartCount",function(e,t,r,n){var i=r.get("config").apiURLs,o={"Content-Type":"application/json",Accept:"application/json"};function a(e){return t.resolve(e)}function s(e){return t.reject(e)}function c(r,n){var i=0===Object.keys(r).length?r:function(e){var r={};if(r.username=e.username,"number"!=typeof r.username){var n=r.username.toString();if("0"===n.charAt(0)&&(n=r.username.slice(1)),r.username=n.replace(/[^0-9]/g,"").toString(),""===r.username)return t.reject({status:999});r.username="0"+r.username}if(e.flow){var i=e.flow.toUpperCase();"BMNP"!==i&&"MNP"!==i||(r.flow=i)}return e.password&&(r.tan=e.password.trim().toUpperCase()),r}(r);return e({method:"POST",data:i,timeout:6e4,url:n,headers:o}).then(a,s)}return{auth:function(){return e({method:"GET",timeout:6e4,url:i.AUTHENTICATION_LOGGED_IN,headers:o}).then(a,s)},authTan:function(e){var r=t.defer(),n={};return e.username&&(n.username=e.username),e.flow&&(n.flow=e.flow),c(n,i.AUTHENTICATION_SEND_TAN).then(function(e){r.resolve(e)},function(e){r.reject(e)}),r.promise},authLogin:function(e){var r=t.defer();return c(e,i.AUTHENTICATION_LOGIN).then(function(e){n.getCartCount().then(function(){r.resolve(e)},function(){r.resolve(e)})},function(e){r.reject(e)}),r.promise},authLogout:function(){return c({},i.AUTHENTICATION_LOGOUT)}}}])}(),function(){"use strict";angular.module("ecommerce.checkout",["ngSanitize","ui.router","ecommerce.authorization","ecommerce.authentication.services","ecommerce.cartcount","ecommerce.vlux","moduleFormTracking","ecommerce.utils"]).config(["$stateProvider","$urlRouterProvider","$httpProvider","$locationProvider",function(e,t,r,n){r.interceptors.push("httpInterceptor"),n.hashPrefix("");var i={basket:"/simplicity/ecommerce/ajax/html/data_basket.html",successData:"/simplicity/ecommerce/ajax/html/data_success.html",errorData:"/simplicity/ecommerce/ajax/html/data_error.html",redplus:{persData:"/simplicity/ecommerce/ajax/html/redplus/data_pers.html",identData:"/simplicity/ecommerce/ajax/html/data_ident.html",shipData:"/simplicity/ecommerce/ajax/html/data_ship.html",shipOptionsData:"/simplicity/ecommerce/ajax/html/data_ship_options.html",billData:"/simplicity/ecommerce/ajax/html/redplus/data_bill.html",accountData:"/simplicity/ecommerce/ajax/html/data_account.html",agbData:"/simplicity/ecommerce/ajax/html/data_agb.html"},redone:{persData:"/simplicity/ecommerce/ajax/html/gigakombi/data_mobdslcable_pers.html",accountData:"/simplicity/ecommerce/ajax/html/gigakombi/data_mobdslcable_account.html",mobdsl:{mnpData:"/simplicity/ecommerce/ajax/html/gigakombi/mobdsl/data_mnp_mobdsl.html",agbData:"/simplicity/ecommerce/ajax/html/gigakombi/mobdsl/data_agb_mobdsl.html"},mobcable:{mnpData:"/simplicity/ecommerce/ajax/html/gigakombi/mobcable/data_mnp_mobcable.html",agbData:"/simplicity/ecommerce/ajax/html/gigakombi/mobcable/data_agb_mobcable.html"}},vvl:{persData:"/simplicity/ecommerce/ajax/html/vvl/data_pers.html",identData:"/simplicity/ecommerce/ajax/html/data_ident.html",shipData:"/simplicity/ecommerce/ajax/html/vvl/data_ship.html",shipOptionsData:"/simplicity/ecommerce/ajax/html/data_ship_options.html",billData:"/simplicity/ecommerce/ajax/html/data_bill.html",accountData:"/simplicity/ecommerce/ajax/html/vvl/data_account.html",agbData:"/simplicity/ecommerce/ajax/html/data_agb.html"},multicardcontract:{persData:"/simplicity/ecommerce/ajax/html/multicardcontract/data_pers.html",identData:"/simplicity/ecommerce/ajax/html/data_ident.html",shipData:"/simplicity/ecommerce/ajax/html/multicardcontract/data_ship.html",shipOptionsData:"/simplicity/ecommerce/ajax/html/data_ship_options.html",billData:"/simplicity/ecommerce/ajax/html/data_bill.html",accountData:"/simplicity/ecommerce/ajax/html/multicardcontract/data_account.html",agbData:"/simplicity/ecommerce/ajax/html/data_agb.html"},bnt:{persData:"/simplicity/ecommerce/ajax/html/bnt/data_pers.html",identData:"/simplicity/ecommerce/ajax/html/data_ident.html",shipData:"/simplicity/ecommerce/ajax/html/data_ship.html",shipOptionsData:"/simplicity/ecommerce/ajax/html/data_ship_options.html",billData:"/simplicity/ecommerce/ajax/html/bnt/data_bill.html",accountData:"/simplicity/ecommerce/ajax/html/bnt/data_account.html",agbData:"/simplicity/ecommerce/ajax/html/bnt/data_agb.html"},bntsoho:{persData:"/simplicity/ecommerce/ajax/html/bnt/soho/data_pers.html",identData:"/simplicity/ecommerce/ajax/html/data_ident.html",shipData:"/simplicity/ecommerce/ajax/html/bnt/soho/data_ship.html",shipOptionsData:"/simplicity/ecommerce/ajax/html/data_ship_options.html",billData:"/simplicity/ecommerce/ajax/html/bnt/soho/data_bill.html",accountData:"/simplicity/ecommerce/ajax/html/bnt/data_account.html",agbData:"/simplicity/ecommerce/ajax/html/bnt/soho/data_agb.html"},hardwareonly:{persData:"/simplicity/ecommerce/ajax/html/hardwareonly/
1data_pers.html",accountData:"/simplicity/ecommerce/ajax/html/hardwareonly/data_account.html",agbData:"/simplicity/ecommerce/ajax/html/hardwareonly/data_agb.html"},ultraCard:{persData:"/simplicity/ecommerce/ajax/html/multisim/data_pers.html",shipData:"/simplicity/ecommerce/ajax/html/hardwareonly/data_ship.html",accountData:"/simplicity/ecommerce/ajax/html/multisim/data_account.html",agbData:"/simplicity/ecommerce/ajax/html/hardwareonly/data_agb.html",shipOptionsData:"/simplicity/ecommerce/ajax/html/multisim/data_ship_options.html"},prepaid:{persData:"/simplicity/ecommerce/ajax/html/prepaid/data_pers.html",shipData:"/simplicity/ecommerce/ajax/html/prepaid/data_ship.html",accountData:"/simplicity/ecommerce/ajax/html/prepaid/data_account.html",agbData:"/simplicity/ecommerce/ajax/html/prepaid/data_agb.html"},inlife:{persData:"/simplicity/ecommerce/ajax/html/vvl/data_pers.html",identData:"/simplicity/ecommerce/ajax/html/data_ident.html",shipData:"/simplicity/ecommerce/ajax/html/vvl/data_ship.html",shipOptionsData:"/simplicity/ecommerce/ajax/html/data_ship_options.html",accountData:"/simplicity/ecommerce/ajax/html/vvl/data_account.html",agbData:"/simplicity/ecommerce/ajax/html/data_agb.html"},errors:{technicalerror:"/simplicity/ecommerce/ajax/html/errors/technicalerror.html",basketempty:"/simplicity/ecommerce/ajax/html/errors/basketempty.html",noinstalladdress:"/simplicity/ecommerce/ajax/html/errors/noinstalladdress.html",nobankdata:"/simplicity/ecommerce/ajax/html/errors/nobankdataforredplus.html",sessionexpired:"/simplicity/ecommerce/ajax/html/errors/sessionexpired.html",noonlineident:"/simplicity/ecommerce/ajax/html/errors/noonlineident.html"},identchange:{persData:"/simplicity/ecommerce/ajax/html/identchange/data_pers.html",identData:"/simplicity/ecommerce/ajax/html/data_ident.html",shipData:"/simplicity/ecommerce/ajax/html/data_ship.html",shipOptionsData:"/simplicity/ecommerce/ajax/html/identchange/data_ship_options.html",billData:"/simplicity/ecommerce/ajax/html/data_bill.html",accountData:"/simplicity/ecommerce/ajax/html/identchange/data_account.html",agbData:"/simplicity/ecommerce/ajax/html/identchange/data_agb.html"}};t.otherwise("/basket"),e.state("basket",{url:"/basket",controller:"BasketController"}),e.state("identchange",{url:"/identchange",templateUrl:"/simplicity/ecommerce/ajax/html/identchange.html",views:{"":{controller:"IdentChangeController",templateUrl:"/simplicity/ecommerce/ajax/html/identchange.html"},"formPersData@identchange":{controller:"PersDataCtrl",templateUrl:i.identchange.persData},"formIdentData@identchange":{controller:"IdentDataCtrl",templateUrl:i.identchange.identData},"formShipData@identchange":{controller:"ShipDataCtrl",templateUrl:i.identchange.shipData},"formShipOptionsData@identchange":{controller:"ShipOptionsDataCtrl",templateUrl:i.identchange.shipOptionsData},"formBillData@identchange":{controller:"BillDataCtrl",templateUrl:i.identchange.billData},"formAccountData@identchange":{controller:"AccountDataCtrl",templateUrl:i.identchange.accountData},"formAgbData@identchange":{controller:"AgbDataCtrl",templateUrl:i.identchange.agbData}}}),e.state("identauth",{url:"/identauth",templateUrl:"/simplicity/ecommerce/ajax/html/identchange/identauth.html",controller:"IdentAuthController"}),e.state("dankeident",{url:"/dankeident",templateUrl:"/simplicity/ecommerce/ajax/html/identchange/data_success_identchange.html",controller:"IdentSuccessCtrl"}),e.state("deeplinkintern",{url:"/basket/:id",controller:"DeeplinkInternCtrl"}),e.state("deeplinkinterntoken",{url:"/basket/:id/token/:token",controller:"DeeplinkInternCtrl"}),e.state("deeplinkinternv2",{url:"/basketv2/:id",controller:"DeeplinkInternCtrl"}),e.state("deeplinkaffiliate",{url:"/basket/:deviceId/:tariffId/:btx/:salesChannel",controller:"DeeplinkAffiliateCtrl"}),e.state("deeplinkaffiliatesimonly",{url:"/basket/:tariffId/:btx/:salesChannel",controller:"DeeplinkAffiliateSimonlyCtrl"}),e.state("deeplinkaffiliatehardwareonly",{url:"/basket/:deviceId/:salesChannel",controller:"DeeplinkAffiliateHardwareonlyCtrl"}),e.state("checkout",{abstract:!0,templateUrl:"/simplicity/ecommerce/ajax/html/checkout.html",controller:"CheckoutController"}).state("checkout.redplus",{views:{"formPersData@checkout":{controller:"PersDataCtrl",templateUrl:i.redplus.persD
1ata},"formShipData@checkout":{controller:"ShipDataCtrl",templateUrl:i.redplus.shipData},"formIdentData@checkout":{controller:"IdentDataCtrl",templateUrl:i.redplus.identData},"formShipOptionsData@checkout":{controller:"ShipOptionsDataCtrl",templateUrl:i.vvl.shipOptionsData},"formBillData@checkout":{controller:"BillDataCtrl",templateUrl:i.redplus.billData},"formAccountData@checkout":{controller:"AccountDataCtrl",templateUrl:i.redplus.accountData},"formAgbData@checkout":{controller:"AgbDataCtrl",templateUrl:i.redplus.agbData}}}).state("checkout.vvl",{views:{"formPersData@checkout":{controller:"PersDataCtrl",templateUrl:i.vvl.persData},"formIdentData@checkout":{controller:"IdentDataCtrl",templateUrl:i.vvl.identData},"formShipData@checkout":{controller:"ShipDataCtrl",templateUrl:i.vvl.shipData},"formShipOptionsData@checkout":{controller:"ShipOptionsDataCtrl",templateUrl:i.vvl.shipOptionsData},"formAccountData@checkout":{controller:"AccountDataCtrl",templateUrl:i.vvl.accountData},"formAgbData@checkout":{controller:"AgbDataCtrl",templateUrl:i.vvl.agbData}}}).state("checkout.multicardcontract",{views:{"formPersData@checkout":{controller:"PersDataCtrl",templateUrl:i.multicardcontract.persData},"formIdentData@checkout":{controller:"IdentDataCtrl",templateUrl:i.multicardcontract.identData},"formShipData@checkout":{controller:"ShipDataCtrl",templateUrl:i.multicardcontract.shipData},"formShipOptionsData@checkout":{controller:"ShipOptionsDataCtrl",templateUrl:i.multicardcontract.shipOptionsData},"formAccountData@checkout":{controller:"AccountDataCtrl",templateUrl:i.multicardcontract.accountData},"formAgbData@checkout":{controller:"AgbDataCtrl",templateUrl:i.multicardcontract.agbData}}}).state("checkout.bnt",{views:{"formPersData@checkout":{controller:"BntPersDataCtrl",templateUrl:i.bnt.persData},"formIdentData@checkout":{controller:"IdentDataCtrl",templateUrl:i.bnt.identData},"formShipData@checkout":{controller:"ShipDataCtrl",templateUrl:i.bnt.shipData},"formShipOptionsData@checkout":{controller:"ShipOptionsDataCtrl",templateUrl:i.bnt.shipOptionsData},"formBillData@checkout":{controller:"BillDataCtrl",templateUrl:i.bnt.billData},"formAccountData@checkout":{controller:"BntPersDataCtrl",templateUrl:i.bnt.accountData},"formAgbData@checkout":{controller:"AgbDataCtrl",templateUrl:i.bnt.agbData}}}).state("checkout.bntsoho",{views:{"formPersData@checkout":{controller:"BntPersDataCtrl",templateUrl:i.bntsoho.persData},"formIdentData@checkout":{controller:"IdentDataCtrl",templateUrl:i.bntsoho.identData},"formShipData@checkout":{controller:"ShipDataCtrl",templateUrl:i.bntsoho.shipData},"formShipOptionsData@checkout":{controller:"ShipOptionsDataCtrl",templateUrl:i.bntsoho.shipOptionsData},"formBillData@checkout":{controller:"BillDataCtrl",templateUrl:i.bntsoho.billData},"formAccountData@checkout":{controller:"BntAccountDataCtrl",templateUrl:i.bntsoho.accountData},"formAgbData@checkout":{controller:"AgbDataCtrl",templateUrl:i.bntsoho.agbData}}}).state("checkout.enterprise",{views:{"formPersData@checkout":{controller:"BntPersDataCtrl",templateUrl:i.bntsoho.persData},"formIdentData@checkout":{controller:"IdentDataCtrl",templateUrl:i.bntsoho.identData},"formShipData@checkout":{controller:"ShipDataCtrl",templateUrl:i.bntsoho.shipData},"formShipOptionsData@checkout":{controller:"ShipOptionsDataCtrl",templateUrl:i.bntsoho.shipOptionsData},"formBillData@checkout":{controller:"BillDataCtrl",templateUrl:i.bntsoho.billData},"formAccountData@checkout":{controller:"BntAccountDataCtrl",templateUrl:i.bntsoho.accountData},"formAgbData@checkout":{controller:"AgbDataCtrl",templateUrl:i.bntsoho.agbData}}}).state("checkout.hardwareonly",{views:{"formPersData@checkout":{controller:"HardwareonlyPersDataCtrl",templateUrl:i.hardwareonly.persData},"formShipData@checkout":{controller:"ShipDataCtrl",templateUrl:i.hardwareonly.shipData},"formAccountData@checkout":{controller:"AccountDataCtrl",templateUrl:i.hardwareonly.accountData},"formAgbData@checkout":{controller:"AgbDataCtrl",templateUrl:i.hardwareonly.agbData}}}).state("checkout.multisim",{views:{"formPersData@checkout":{controller:"PersDataCtrl",templateUrl:i.ultraCard.persData},"formShipOptionsData@checkout":{controller:"ShipOptionsDataCtrl",templateUrl:i.ultraCard.shipOptionsData},"formAccountData@checkout":{controller:"AccountDataCtrl",templateUrl:i.ultraCard.accountData},"formAgbData@checkout":{controller:"AgbDataCtrl",templateUrl:i.hardwareonly.agbData}}}).state("checkout.prepaid",{views:{"formPersData@checkout":{controller:"PrepaidPersDataCtrl",templateUrl:i.prepaid.persD
1ata},"formShipData@checkout":{controller:"ShipDataCtrl",templateUrl:i.prepaid.shipData},"formAccountData@checkout":{controller:"AccountDataCtrl",templateUrl:i.prepaid.accountData},"formAgbData@checkout":{controller:"AgbDataCtrl",templateUrl:i.prepaid.agbData}}}).state("checkout.tw",{views:{"formPersData@checkout":{controller:"PersDataCtrl",templateUrl:i.inlife.persData},"formIdentData@checkout":{controller:"IdentDataCtrl",templateUrl:i.inlife.identData},"formShipData@checkout":{controller:"ShipDataCtrl",templateUrl:i.inlife.shipData},"formShipOptionsData@checkout":{controller:"ShipOptionsDataCtrl",templateUrl:i.inlife.shipOptionsData},"formAccountData@checkout":{controller:"AccountDataCtrl",templateUrl:i.inlife.accountData},"formAgbData@checkout":{controller:"AgbDataCtrl",templateUrl:i.inlife.agbData}}}),e.state("danke",{abstract:!0,templateUrl:i.successData,controller:"GeneralSuccessCtrl"}),e.state("danke.mobcable",{url:"/danke-cable",views:{"successData@danke":{controller:"SuccessCtrl",templateUrl:"/simplicity/ecommerce/ajax/html/gigakombi/data_success_cable.html"}}}),e.state("danke.bnt",{url:"/danke-bnt",views:{"successData@danke":{controller:"SuccessCtrl",templateUrl:"/simplicity/ecommerce/ajax/html/bnt/data_success_bnt.html"}}}),e.state("danke.vvl",{url:"/danke-vvl",views:{"successData@danke":{controller:"SuccessCtrl",templateUrl:"/simplicity/ecommerce/ajax/html/vvl/data_success_vvl.html"}}}),e.state("danke.multicardcontract",{url:"/danke-multicardcontract",views:{"successData@danke":{controller:"SuccessCtrl",templateUrl:"/simplicity/ecommerce/ajax/html/multicardcontract/data_success_multicardcontract.html"}}}),e.state("danke.redplus",{url:"/danke-redplus",views:{"successData@danke":{controller:"SuccessCtrl",templateUrl:"/simplicity/ecommerce/ajax/html/redplus/data_success_redplus.html"}}}),e.state("danke.hardwareonly",{url:"/danke-hardwareonly",views:{"successData@danke":{controller:"SuccessCtrl",templateUrl:"/simplicity/ecommerce/ajax/html/hardwareonly/data_success_hardwareonly.html"}}}),e.state("danke.prepaid",{url:"/danke-callya",views:{"successData@danke":{controller:"SuccessCtrl",templateUrl:"/simplicity/ecommerce/ajax/html/prepaid/data_success_prepaid.html"}}}),e.state("danke.inlife",{url:"/danke-inlife",views:{"successData@danke":{controller:"SuccessCtrl",templateUrl:"/simplicity/ecommerce/ajax/html/inlife/data_success_inlife.html"}}}),e.state("danke.multisim",{url:"/danke-multsim",views:{"successData@danke":{controller:"SuccessCtrl",templateUrl:"/simplicity/ecommerce/ajax/html/multisim/data_success_multisim.html"}}}),e.state("error",{abstract:!0,templateUrl:i.errorData,controller:"ErrorController"}),e.state("error.basketempty",{url:"/basketempty",views:{"errorData@error":{controller:"BasketEmptyController",templateUrl:i.errors.basketempty}},params:{error:null}}),e.state("error.sessionexpired",{url:"/sessionexpired",views:{"errorData@error":{templateUrl:i.errors.sessionexpired}}}),e.state("error.technicalerror",{url:"/technicalerror",views:{"errorData@error":{templateUrl:i.errors.technicalerror}},controller:"ErrorController",params:{error:null}}),e.state("error.noinstalladdress",{url:"/noinstalladdress",views:{"errorData@error":{templateUrl:i.errors.noinstalladdress}}}),e.state("error.missing-bank",{url:"/missing-bank",views:{"errorData@error":{templateUrl:i.errors.nobankdata}}})}]).run(["$state","$rootScope","$location","factoryGigakombi",function(e,t,r,n){var i=sessionStorage.getItem("deeplink");t.hasTechnicalError=!1;var o=null;(i=JSON.parse(i||"null"))&&0<i.length&&e.go("deeplinkintern",{id:i}),window.addEventListener("cartTechnicalError",function(r){t.hasTechnicalError=!0,"error.technicalerror"!==e.current.name&&(o={message:"Das hat leider nicht geklappt. Versuch es bitte nochmal.",errorType:"technical",code:r.detail.status},e.go("error.technicalerror",{error:{message:"Das hat leider nicht geklappt. Versuch es bitte nochmal.",errorType:"technical",code:r.detail.status}}))}),t.$on("$stateChangeStart",function(r,n,i,a){if(t.hasTechnicalError&&"error.technicalerror"!==n.name)return r.preventDefault(),void("error.technicalerror"!==e.current.name&&e.go("error.technicalerror",{error:o}));""===a.name&&(-1<n.url.indexOf("/danke")||-1<n.url.indexOf("/checkout")||-1<n.url.indexOf("/technicalerror")||-1<n.url.indexOf("/basketempty"))&&(r.preventDefault(),e.go("basket"))})}])}(),function(){"use strict";angular.module("ecommerce.checkout").controller("ErrorController",["$state","$scope","factoryTrackingSender","factorybShopBasket","factoryUtils",function(e,t,r,n,i){var o=$("#top");o.removeClass("noMDD"),o.removeClass("wrapper"),$(".checkoutContent").show(),$(".loading-spiner-holder").hide(),document.getElementsByClassName("sprite01")&&document.getElementsByClassName("sprite01")[0]&&(document.getElementsByClassName("sprite01")[0].classList.add("cart-sprite01"),document.getElementsByClassName("sprite02")[0].classList.add("cart-sprite02"),document.getElementsByClassName("sprite03")[0].classList.add("cart-sprite03"),document.getElementsByClassName("sprite04")[0].classList.add("cart-sprite04")),document.getElementsByClassName("contact-flyout")&&document.getElementsByClassName("contact-flyout")[1]&&(document.getElementsByClassName("contact-flyout")[1].style.display="none");let a=document.getElementById(VF.const.newCartId);if(a&&(a.remove(),a=null),"error.technicalerror"===e.current.name){t.getErrorDetails=function(){const t=e.params.error||{},r=t.description||"",n=t.errorDetails||"",i=n&&r?`${r} ${n}`:r||n;return i.length>100?r:i}
1,e.params&&e.params.error?(t.errorAction=e.params.error.errorAction,t.errorType=e.params.error.errorType,t.errorMessage=e.params.error.basketError?"Du kannst in unserem Online-Shop aktuell leider nichts bestellen.":"Das hat leider nicht geklappt. Versuch es bitte nochmal.",t.errorArea=e.params.error.errorArea,t.errorCode=e.params.error.code||e.params.error.responseCode,t.errorDetails=t.getErrorDetails(),t.basketError=e.params.error.basketError||!1):t.errorCode=!1;var s={siteArea:"mobility",platformType:"responsive",loginStatus:"not logged in",siteStructure:["privatkunden","eCommerce","checkout","basket error"],pageType:"customer",error:{action:t.errorAction?t.errorAction:"displayed",type:t.errorType,message:t.errorMessage}};t.errorArea&&(s.error.area=t.errorArea),t.errorCode&&(s.error.code=t.errorCode),t.errorDetails&&(s.error.details=t.errorDetails),r.doTrack("pageview",s)}}])}(),function(){"use strict";angular.module("ecommerce.checkout").controller("CheckoutController",["$rootScope","$scope","$timeout","$state","factorybShopBasket","formsSummary","factoryCommerceApi","factoryNbaData","factoryFormData","factorySuccessData","factoryTracking","factoryTrackFormError","factoryTotalCosts","factoryBasketRuleError","factoryEmptyBasket","factoryVoucher","config","$sce","factoryIdentMethods","factoryFuFService","factoryPromoBadge","factoryTrackingSender","httpInterceptor","factorySelectedStore","factoryAffiliateCookieLogic","checkoutFormBuilder","factorySessionTimer","authenticationServiceEvolvedFactory","factoryAddressAutosuggest","$window",function(e,t,r,n,i,o,a,s,c,u,l,d,p,f,h,m,g,v,b,y,_,S,k,C,D,O,I,w,T,P){document.getElementsByClassName("sprite01")&&document.getElementsByClassName("sprite01")[0]&&(document.getElementsByClassName("sprite01")[0].classList.add("cart-sprite01"),document.getElementsByClassName("sprite02")[0].classList.add("cart-sprite02"),document.getElementsByClassName("sprite03")[0].classList.add("cart-sprite03"),document.getElementsByClassName("sprite04")[0].classList.add("cart-sprite04")),document.getElementsByClassName("contact-flyout")&&document.getElementsByClassName("contact-flyout")[1]&&(document.getElementsByClassName("contact-flyout")[1].style.display="none"),document.title="Privatkunden Warenkorb | Vodafone",$(".loading-spiner-holder").show(),t.updateSimVariant=function(e,t,r,n){const i=sessionStorage.getItem(VF.const.sessionKeySIMVariant);let o=i?JSON.parse(i):[];Array.isArray(o)||(o=[]);const a=o.findIndex(e=>e.propositionId===t);return-1!==a?(o[a].simVariant=e,o[a].simCardId=r,o[a].tariffId=n):o.push({propositionId:t,simVariant:e,simCardId:r,tariffId:n}),sessionStorage.setItem(VF.const.sessionKeySIMVariant,JSON.stringify(o)),o},t.removeBasketItem=function(e,r=!1){var o=$(".checkoutContent"),s=$(".loading-spiner-holder");o.hide(),s.show(),a.removeItemFromBasket(e).then(function(){E=i.getOfferGroup(),t.offerGroup=E,"basket"!==n.current.name&&n.go("basket");var o={removeType:"single",removed:l.getSingleOOrder(e)};S.doTrack("remove from basket",o),r?window.__callRemoveService=!0:window.__callRemoveItem=!0},function(){d.trackFormError("could not delete proposition "+e+" from basket","basket"),o.show(),s.hide()})};const A=function(){window.removeEventListener("reactCheckoutReady",A)};window.__reactReadyListenerAdded||(window.__reactReadyListenerAdded=!0,window.addEventListener("reactCheckoutReady",A)),window.__bobReactListenersRegistered||(window.__bobReactListenersRegistered=!0,function r(){const o=document.getElementById("ecommerce-checkout");o?(o.addEventListener("updateMnp",function(e){window.__basketPageViewTracked=!1,t.isPortingChecked=e.detail.isPortingChecked,t.formData.persdaten.belated_mnp_requested&&(t.formData.persdaten.belated_mnp_requested.val=t.isPortingChecked?"Y":"N"),l.trackMnpSwitch(e.detail.isPortingChecked)}),o.addEventListener("callBasketCheckout",function(e){window.__basketPageViewTracked=!1,E=i.getOfferGroup(),t.offerGroup=E;const r=E.mainOffer,o=e.detail?e.detail.backendId:null,a=r.offerServices.getSelectedServicesEnriched(),s=E.accessoryOffers,c=E.redplusOffers;let u=r.pid,l=null;if("serviceMobile"===e.detail.type&&o){u=r.pid;const e=a.find(e=>e.backendId==o);l=e._id||e.id}else{if(e.detail&&"accessoryMobile"===e.detail.type&&o){const e=s.find(e=>e.offerComponents.device.getEnrichedData().backendId==o);if(e){const r=e._pid||e.pid;t.removeBasketItem(r)}return}if("redplusOffer"===e.detail.type&&c.length){const r=c.find(t=>t.atomicSubscriptionId==e.detail.tariffId),n=r?r.pid||r._pid:null;n&&t.removeBasketItem(n,!0)}}e.detail&&"accessoryMobile"===e.detail.type&&"redplusOffer"===e.detail.type||(E.getOfferByBasketPid(u).offerServices.removeSelectedService(+l),E.offerGroupCosts.calculateCosts(),k.request({url:g.apiURLs.BASKET}),basketFactory.sendBasketToShopBackend().then(function(e){i.init(e.basket),generalOfferService.getOfferGroupByShopBasket(e.basket).then(function(e){i.setOfferGroup(e),E=i.getOfferGroup(),t.offerGroup=E,"basket"!==n.current.name&&n.go("basket")}),k.response({config:{url:g.apiURLs.BASKET}}),window.dispatchEvent(new CustomEvent("removeServiceSuccess",{detail:{data:!0}
1}))},function(e){k.responseError({config:{url:g.apiURLs.BASKET}}),t.errorMessage=JSON.stringify(e.data)}))}),o.addEventListener("updateSim",function(r){window.__basketPageViewTracked=!1,E=i.getOfferGroup(),t.offerGroup=E;var o=r.detail.newSimId;let s=r.detail.propositionId;if(1==r.detail.propositionId||E.mainOffer.atomicSubscriptionId==r.detail.tariffId)s=E.mainOffer.pid;else{const e=E.redplusOffers.find(e=>e._atomicSubscriptionId==r.detail.tariffId||e.atomicSubscriptionId==r.detail.tariffId);s=e._pid||e.pid}var u=E.getOfferByBasketPid(s);if(t.updateSimVariant(r.detail.simVariant,r.detail.propositionId,o,r.detail.tariffId),u){var d=u.simcardId;u.simcardId=o,basketFactory.putOfferGroupIntoBasket(E),u.simcardId=d,k.request({url:g.apiURLs.BASKET}),basketFactory.sendBasketToShopBackend().then(function(o){k.request({url:g.apiURLs.CHECKOUT}),a.getCheckout().then(function(a){i.init(o.basket),generalOfferService.getOfferGroupByShopBasket(o.basket).then(function(o){if(i.setOfferGroup(o),E=i.getOfferGroup(),t.offerGroup=E,e.switchedSimType=!0,l.trackSimTypeSwitch(r.detail),e.$broadcast("simVariantChanged"),E.isSimOnly()||E.hasAdditionalRedplusOffers())c.setData(a.data.formData),c.broadcastData(),O.buildCheckoutForms(a.data,!0),n.reload();else{t.identMethodsError=!1;var s="";void 0!==t.formData.persdaten.persdaten_sohoType&&(s=t.formData.persdaten.persdaten_sohoType.val),b.getIdentMethod(t.formData.persdaten.persdaten_nationality.val,s).then(function(){},function(e){t.identMethodsError=!0})}}),k.response({config:{url:g.apiURLs.CHECKOUT}})},function(e){k.responseError({config:{url:g.apiURLs.CHECKOUT}}),t.errorMessage=JSON.stringify(e.data),l.trackError("notification",t.errorMessage,"Unable to switch sim type - problem with get checkout","")}),k.response({config:{url:g.apiURLs.BASKET}})},function(e){k.responseError({config:{url:g.apiURLs.BASKET}}),t.errorMessage=JSON.stringify(e.data),l.trackError("notification",t.errorMessage,"Unable to switch sim type - error with put basket","")})}}),o.addEventListener("updateSimBatch",function(r){E=i.getOfferGroup(),t.offerGroup=E;var o=r.detail.updatedTariffs||[];if(o.length){var s,u=o.map(function(e){var t;if(1==e.propositionId||E.mainOffer.atomicSubscriptionId==e.tariffId)t=E.mainOffer.pid;else{var r=E.redplusOffers.find(function(t){return t._atomicSubscriptionId==e.tariffId||t.atomicSubscriptionId==e.tariffId});if(!r)return null;t=r._pid||r.pid}var n=E.getOfferByBasketPid(t);return n?{offer:n,oldSimId:n.simcardId,newSimId:e.newSimId,tariffId:e.tariffId}:null}).filter(Boolean);if(u.length)(s=u).forEach(function(e){e.offer.simcardId=e.newSimId}),basketFactory.putOfferGroupIntoBasket(E),s.forEach(function(e){e.offer.simcardId=e.oldSimId}),k.request({url:g.apiURLs.BASKET}),basketFactory.sendBasketToShopBackend().then(function(r){k.request({url:g.apiURLs.CHECKOUT}),a.getCheckout().then(function(o){i.init(r.basket),generalOfferService.getOfferGroupByShopBasket(r.basket).then(function(r){if(i.setOfferGroup(r),E=i.getOfferGroup(),t.offerGroup=E,e.switchedSimType=!0,e.$broadcast("simVariantChanged"),E.isSimOnly()||E.hasAdditionalRedplusOffers())c.setData(o.data.formData),c.broadcastData(),O.buildCheckoutForms(o.data,!0),n.reload();else{t.identMethodsError=!1;var a="";void 0!==t.formData.persdaten.persdaten_sohoType&&(a=t.formData.persdaten.persdaten_sohoType.val),b.getIdentMethod(t.formData.persdaten.persdaten_nationality.val,a).then(function(){},function(e){t.identMethodsError=!0})}}),k.response({config:{url:g.apiURLs.CHECKOUT}})},function(e){k.responseError({config:{url:g.apiURLs.CHECKOUT}}),t.errorMessage=JSON.stringify(e.data),l.trackError("notification",t.errorMessage,"Unable to switch sim type - problem with get checkout","")}),k.response({config:{url:g.apiURLs.BASKET}})},function(e){k.responseError({config:{url:g.apiURLs.BASKET}}),t.errorMessage=JSON.stringify(e.data),l.trackError("notification",t.errorMessage,"Unable to switch sim type - error with put basket","")});else console.warn("updateSimBatch: no matching offers found for",o)}}),o.addEventListener("addVoucher",function(e){var r=$(".loading-spiner-holder");r.show(),window.__basketPageViewTracked=!1;var n=e.detail.isUnique,o=e.detail.campaign,a=e.detail.code,s={campaign:o,status:"val
1id"};m.addVoucher(s).then(function(e){t.voucherCode=a,t.voucherServicesForVoucher=e,E=i.getOfferGroup(),t.offerGroup=E,l.trackError("notification","Voucher","Voucher applied successfully",""),c.addVoucherData(a,n,o),t.formData=c.getData(),VFeCommerce.campaign=o,VFeCommerce.voucherCode=a,r.hide()},function(){l.trackError("notification",m.getVoucherError("unknownVlux"),"Voucher code unknown",""),r.hide()})}),o.addEventListener("trackVoucher",function(e){e.detail&&l.trackVoucher(e.detail)}),o.addEventListener("removeVoucher",function(){window.__basketPageViewTracked=!1;var e=$(".loading-spiner-holder");e.show(),m.removeVoucher().then(function(){VFeCommerce.campaign="",VFeCommerce.voucherCode="",E=i.getOfferGroup(),t.offerGroup=E,e.hide(),"basket"!==n.current.name&&n.go("basket")},function(){e.hide()}),t.voucherCode="",t.voucherServicesForVoucher=[],t.showVoucherForm=!0,VFeCommerce.voucherCode="",VFeCommerce.campaign=""}),o.addEventListener("clearBasket",function(){window.__basketPageViewTracked=!1,t.clearBasket()})):setTimeout(r,300)}()),t.hasHardWare=!1,0<i.getBackendIDsForHardware().length&&(t.hasHardWare=!0),t.checkout={},t.bankFullName=e.bankFullName,t.propositions={},t.formData={},t.formDataNative={},t.addionalBasketItems={},t.voucherServicesForVoucher=[],t.initialEventHandlerRegistered=!1,t.debug=!1,t.init=!1,t.thx=!1,t.isStoreSelected=!1,t.earlyBirdPrice=20,t.earlyBirdDate="",t.addionalBasketItems={komfort:!1,bill:!1,mnp:!1},t.onlineIdentDisabled=!1,t.isSEPAMandat=!1,t.isPortingChecked=!1,t.isEsimChecked=!1,t.googleMapsApi=v.trustAsJs(g.shipToStore.googleMapsAPI),t.isEsimPushEnabled=!0,t.isEsimPushChecked=!0,t.checkoutError=!1,t.checkoutIbanError=!1,t.addressValidity=!1,t.puis={haserror:!1,errormsg:"",errortype:"warning",deliverybtn:{text:"Lieferoption ändern",light:!0,onclick:function(){t.puis.haserror=!1,z("formShipData")},visible:!0},orderbtn:{text:"Bestellen",onclick:function(){t.puis.haserror=!1,t.sendFormToIshop()},visible:!0},contactbtn:{text:"0800 172 12 12",href:"tel:+498001721212",visible:!0},s2sLocationType:"005"},VF&&(VF.oOrder=VF.oOrder||{}),t.map={};var E=i.getOfferGroup();e.$broadcast("bcstTotalCostsDynamicCosts"),t.offerGroup=E,t.isDeviceFinance=i.getNestedProperty(E,"mainOffer.offerComponents.subscription._enrichedDataSubscription.isDeviceFinance"),t.isBNT=E.isBNT(),t.isVVL=E.isVVL(),t.vvlType=E.prolongationType,t.inlifeWithRedplus=E.isInlife()&&E.hasAdditionalRedplusOffers(),t.vvlWithRedplus=E.isVVL()&&E.hasAdditionalRedplusOffers(),t.isMultiSim=E.isMultisim(),t.hasJungeLeuteGigaCubeDiscount=E.hasJungeLeuteGigaCubeDiscount(),t.isSimOnly=E.isSimOnly(),t.isInLife=E.isInlife(),t.isHardwareOnly=E.isHardwareOnly(),t.isRedPlus=E.isRedplus(),t.isStone=E.isStone(),t.isFamilyAndFriends=E.isFaF(),t.isYolo=E.isYoung(),t.isSohoChannel=E.isSoHo(),t.isEnterpriseChannel=E.isEnterprise(),t.isGigaCubeOnly=E.isGigaCubeOnly(),t.isNetflix=E?.mainOffer?.offerServices?.getNetflixServices()?.isNetflix;var M=!1;null!==E&&null!==E.mainOffer&&(M=E.isSimcardTypeChangeAllowed(),t.isEsimChecked=E.mainOffer.isEsimOffer),t.isEsimInfoVisible=M,E.isSimOnly()?t.showEsimCompatibilityInfo=!0:t.showEsimCompatibilityInfo=!1,t.isEsimPushAvailable=t.isEsimPushEnabled&&!E.isSimOnly()&&!E.isInlife()&&!E.isMultisim(),t.trackEsimOverlay=function(){_ddq.push(["information",{information_action:"reveal",information_name:"was ist eine esim?",information_ui_type:"layover",information_trigger:"link"}])},t.basketDate=new Date(i.getBasketDate().toString().replace(/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/,"$1/$2/$3 $4:$5:$6")),t.isValidTransactionForSimplifiedCheckout=i.isValidTransactionForSimplifiedCheckout();var N=i.isEarlyBird();if(""!==N&&(t.earlyBirdDate=N,p.addEBFee(t.earlyBirdPrice)),E.isInlife()){var B=s.getAllowedTariffDataInlife(E.mainOffer.atomicSubscriptionId),F="";if(B&&"R"===B.contractPeriod)try{var x=B.contractEndDate.toString();F=""===x?"Deine Vertragslaufzeit bleibt bestehen.":"Vertragsenddatum "+x.substr(6,2)+"."+x.substr(4,2)+"."+x.substr(0,4)}catch(e){}t.inlifeContractDuration=F}t.showPromoBadge=!1,t.isGigakombiBadge=!1,t.promoBadgeId=0,_.init(
1).then(function(){var e=_.getPromoText();!0===e.hasPromoBadge&&(t.isGigakombiBadge=e.isGigakombiBadge,t.promoBadgeHeadline=e.headline,t.promoBadgeDescription=e.description,t.promoBadgeId=e.promoBadgeId,t.showPromoBadge=e.hasPromoBadge)}),t.hasInsurance=!1,t.hasInsuranceTypeCover=!1;var R=E.mainOffer.offerServices.getSelectedServices();0<R.length&&$.each(R,function(e,r){158===r.id||159===r.id?t.hasInsurance=!0:VF.const.insuranceCoverServicesId.includes(r.id)&&(t.hasInsurance=!0,t.hasInsuranceTypeCover=!0)}),t.basketRuleError="";var L=f.getError();""!==L.code&&(t.basketRuleError=L.message),t.forms={},t.$on("bcstFormData",function(){t.formData=c.getData(),t.formDataNative=angular.copy(t.formData)}),t.formData=c.getData(),t.formDataNative=angular.copy(t.formData),t.shippingFee=e.shippingFee,t.hasEmail=!(!t.formData.persdaten.persdaten_email.val||!t.isVVL&&!e.isLoggedInUser),t.$watch(function(){return e.shippingFee},function(){var n=document.getElementById("contractSummary");n&&n.classList.add("disabled"),t.pdfReady=!1,r(function(){t.shippingFee=e.shippingFee})},!0),t.$watch(function(){return e.isLoggedInUser},function(e){t.hasEmail=!(!t.formData.persdaten.persdaten_email.val||!t.isVVL&&!e)}),t.$watch(function(){return e.bankFullName},function(){r(function(){t.bankFullName=e.bankFullName})},!0);var V,j,G,U;function H(){a.postOrder().then(function(e){var r=e.data;u.setData(r),"O.Po.400.9"===r.responseCode?(t.submit.loading=!1,d.trackFormError(r.responseCode,r.description),t.submit.technicalissue=!0,t.submit.errorCode=r.responseCode):("O.Po.400.2"===r.responseCode&&(t.stockReservationFailed=!0),u.setData(r),l.initVoucherCode(t.voucherCode),l.initVoucherServicesForVoucher(t.voucherServicesForVoucher),l.trackSuccess(r),!t.offerGroup.isGigaCubeOnly()&&(t.offerGroup.isEnterprise()||!t.isBNT||t.offerGroup.isHardwareOnly())||"Y"===t.formData.persdaten.persdaten_werbeInfo.val?t.goToThankyouPage():(document.getElementById("contentBEW-overlay-trigger").click(),_ddq.push(["bew",{bew_action:"shown",bew_version:"v"+VF.oBEWWerbeInfoVersion,bew_contact:"asked",bew_data:"not asked"}])),i.deleteBasketCookie(),E.isFaF()&&y.invalidateInvitation(r.orderID))},function(e,r){!function(e,r){401===r?window.location.href="/shop/authentifizierung.html?btype=force&goto="+window.location.pathname:"O.Po.400.1"===e.data.responseCode?(t.submit.loading=!1,d.trackFormError(e.data.responseCode,e.data.description),t.submit.noonlineident=!0,$(window).scrollTop(0)):"O.Po.PSR.POM.PSRCR.001"===e.data.responseCode?function(e){W(e,!0,!0,!0,!1,"<b>Das Gerät ist sehr beliebt. Darum kannst Du es heute leider nicht mehr in Deinem Vodafone-Shop abholen.</b> <br/>Du hast jetzt 2 Möglichkeiten: <ul><li>Du setzt Deine Bestellung fort und bekommst eine Info von uns, wenn das Gerät in Deinem Shop ist. Also in 2 bis 3 Werktagen. </li><li>Du änderst Deine Lieferoption.</li></ul>")}(e):"O.Po.PSR.POM.PSRCR.002"===e.data.responseCode||"O.Po.PSR.POM.PSRCR.003"===e.data.responseCode||"O.Po.PSR.POM.PSRCR.004"===e.data.responseCode||"O.Po.PSR.POM.PSRCR.005"===e.data.responseCode||"O.Po.PSR.POM.PSRCR.006"===e.data.responseCode||"O.Po.PSR.POM.PSRCR.ESB.502"===e.data.responseCode?function(e){W(e,!0,!0,!0,!1,"<b>Leider kannst Du das Gerät zurzeit nicht im Vodafone-Shop abholen.</b> <br/>Du hast jetzt 2 Möglichkeiten: <ul><li>Du setzt Deine Bestellung fort und bekommst eine Info von uns, wenn das Gerät im Shop ist. Also in 2 bis 3 Werktagen. </li><li>Du änderst Deine Lieferoption.</li></ul>")}(e):"O.Po.PSR.POM.PSRCR.ESB.504"===e.data.responseCode?function(e){W(e,!1,!1,!1,!0,"Entschuldige, es ist ein technischer Fehler aufgetreten. Bitte versuche es erneut oder wende Dich an die Hotline. Fehlercode: "+e.data.responseCode,"error")}(e):(t.submit.loading=!1,e?(d.trackFormError(e.data.responseCode,e.data.description),t.submit.noonlineident=!0,$(window).scrollTop(0)):(t.submit.loading=!1,e&&d.trackFormError(e.data.responseCode,e.data.description),t.submit.technicalissue=!0,t.submit.errorCode=e.data.responseCode),t.submit.technicalissue=!0)}(e,r)})}function W(e,r,n,i,o,a,s){var c,u;c=t.puis.s2sLocationType,(u=C.getStore()).LOCATION_TYPE=c,C.setStore(u),t.formData.SHIPPING.shipping_locationType.val=t.puis.s2sLocationType,d.trackFormError(e.data.responseCode,e.data.description),t.submit.loading=!1,t.puis.haserror=!0,t.puis.errormsg=a,t.puis.deliverybtn.visible=r,t.puis.deliverybtn.light=n,t.puis.orderbtn.visible=i,t.puis.contactbtn.visible=o,t.puis.errortype=void 0!==s?s:"warning"}function Y(e,i){var a="";if(401===i)t.errorMessage="no message shown to the user",window.location.href="/shop/authentifizierung.html?btype=force&goto="+window.location.pathname;else{r(function(){t.submit.loading=!1,"C.P.400.3"===e.data.responseCode?(a="Session Timeout / Sitzung abgelaufen",n.go("error.sessionexpired")):"C.P.400.4"===e.data.responseCode?(t.formData=e.data.formData,t.checkoutError=!0,a="Das hat leider nicht geklappt.",e.data.formData&&e.data.formData.bank&&e.data.formData.bank.bank_iban&&e.data.formData.bank.bank_iban.ValidationMessage&&(t.checkoutIbanError=!0,a="Das kannst leider nicht bar zahlen.")):"C.P.400.5"===e.data.responseCode?(t.cutOffTimeExpired=!0,z("formShipOptionsData"),$(".mod-stepper").trigger("open:"+o.getCurrentForm(
1).name),a="Deine Wunschlieferung"):(t.submit.technicalissue=!0,t.checkoutError=!0,t.submit.errorCode=e.data.responseCode,a="Das hat leider nicht geklappt.")},500)}r(function(){l.trackError(VF.const.errorTrackingMap[e.status],e.data&&a||"",e.data&&e.data.responseCode&&e.data.responseCode.toString()||"",null,e.data&&e.data.errorAction||"displayed",e.data&&e.data.errorArea,e.data&&e.data.errorDetails,e.data&&e.data.description)},1e3)}function z(e){var t=o.getIndex(e);void 0!==t&&(o.setCurrentForm(t),o.disbaleNextForms(t),o.scrollto())}e.$on("address_suggestion",(V=10,j=function(r,n){if(""===t.formData.persdaten.persdaten_plz.val||!t.formData.persdaten.persdaten_plz.val)for(var i=0;i<n.length;i++)if(-1<n[i].types.indexOf("postal_code")){t.formData.persdaten.persdaten_plz.val=n[i].short_name;break}if(""===t.formData.persdaten.persdaten_city.val||!t.formData.persdaten.persdaten_city.val)for(i=0;i<n.length;i++)if(-1<n[i].types.indexOf("locality")){t.formData.persdaten.persdaten_city.val=n[i].long_name,e.$emit("autocomplete_city_update",n[i].long_name);break}for(i=0;i<n.length;i++)if(-1<n[i].types.indexOf("street_number")){t.formData.persdaten.persdaten_houseno.val=n[i].short_name,void 0!==n[i].street_name&&(t.formData.persdaten.persdaten_street.val=n[i].street_name);break}t.$apply()},function(){var e=this,t=arguments,r=G&&!U;clearTimeout(U),U=setTimeout(function(){U=null,G||j.apply(e,t)},V),r&&j.apply(e,t)})),t.init=!0,t.checkout=o.getData(),t.checkout.complete=!1,t.$on("addressValidationResult",function(e,r){t.addressValidity=r.isAddressInvalid}),t.$watch("formData.persdaten.persdaten_sohoType.val",function(e,t){E.isSoHo()&&e!==t&&(l.setSohoLineOfCustomer(e),l.trackNextItem())}),t.currentStep=t.checkout.current+1,t.prevStep=t.checkout.current+1,t.nextStep=t.isSimOnly&&t.isVVL?5:6,t.show=function(r,n,i=null){if(t.forms[n].$setPristine(),i){var a=1===i.currentStep&&(6===i.prevStep||7===i.prevStep),s=1===i.currentStep&&5===i.prevStep;t.nextStep=a?5:s?4:i.prevStep}var c=$(r.target).parents("li").index();o.isSingleFormComplete(c)&&(c<o.getCurrentIndex()?(o.setCurrentForm(c),t.checkout.accordion=c,o.disbaleNextForms(c),t.submit.technicalissue=!1,t.submit.errorCode=!1,t.submit.sessiontimeout=!1,!0===o.getDoTracking()&&l.trackNextItemGoingBack(),o.setDoTracking(!0)):!1===o.getCurrentForm().status?(o.formInvalid(),o.showValidationMessages(),t.$broadcast("formValidation")):(o.setCurrentForm(c),t.checkout.accordion=c),I.isSessionTimerZero()?location.reload():"function"==typeof e.continueShopping&&e.continueShopping())},t.$on("nextForm",function(){t.checkout=o.getData(),t.checkout.accordion++}),t.$on("lastForm",function(){t.checkout=o.getData()}),t.$on("checkCompleteValidity",function(){t.checkout.complete=!0,$.each(o.getData().forms,function(e,r){!1===r.status&&(t.checkout.complete=!1)}),t.checkout=o.getData()}),$(".checkoutContent").show(),$(".loading-spiner-holder").hide(),t.goToThankyouPage=function(){n.go(o.getStateDanke()),window.scroll(0,0),t.thx=!0,$("body").removeClass("no-scroll")},t.handleBEWOverlayDeny=function(){_ddq.push(["bew",{bew_action:"selected",bew_version:"v"+VF.oBEWWerbeInfoVersion,bew_contact:"no",bew_data:"not asked"}]),t.goToThankyouPage()},t.handleBEWOverlayConsent=function(){_ddq.push(["bew",{bew_action:"selected",bew_version:"v"+VF.oBEWWerbeInfoVersion,bew_contact:"yes",bew_data:"not asked"}]);var e=u.getData();t.formData.persdaten&&t.formData.persdaten.persdaten_werbeInfo?(t.formData.persdaten.persdaten_werbeInfo.val="Y",e&&a.postOrderUpdate(t.formData,e.orderID,e.orderToken).then(function(){t.goToThankyouPage()},function(){t.goToThankyouPage()})):t.goToThankyouPage()},t.$on("$includeContentLoaded",function(e,t){t&&t.indexOf("/shop/partials/content-below-checkout.html")});t.sendFormToIshop=function(){I.isSessionTimerZero()?location.reload():($.each(t.formData,function(e,t){$.each(t,function(e,t){!t||void 0!==t.val&&null!==t.val||(t.val="")})}),t.formData.BANK&&t.formData.BANK.bank_iban&&(t.formData.BANK.bank_iban.val=t.formData.BANK.bank_iban.val.replace(/ /g,"")),t.submit.loading=!0,D.init(window.salesChannel),a.putCheckout(t.formData,t.requestid).then(H,Y))},t.goToVVLDanke=function(){$(".loading-spiner-holder").show(),n.go("error.sessionexpired")},e.continueShopping=function(e){I.isSessionTimerZero()?location.reload():(I.closeSessionModal(e),I.reset())},e.closeSessionModalWhenTimerEnds=function(t){I.closeSessionModal(t),I.isSessionTimerZero()&&!e.isLoggedInUser?location.reload():I.isSessionTimerZero()&&e.isLoggedInUser&&e.logout()},"true"===sessionStorage.getItem("isSessionTimeEnded")&&r(function(){sessionStorage.removeItem("isSessionTimeEnded"),e.logout()},0),e.logout=function(){i.deleteBasketCookie(),e.cancelSessionTimer(),w.authLogout(),a.mintLogout(),t.clearBasket(!0)},e.continueShoppingLoggedInUser=function(){a.keepSessionAlive().then(function(){I.isSessionTimerZero()?e.logout():(I.closeSessionModal("session-overlay-close-btn"),I.reset())})}
1,t.handleClickOutside=function(e){if(I.isSessionTimerZero())return $(document).off("click"),void e.stopImmediatePropagation()},t.changeIdentMethod=function(){var e=t.formData.persdaten.persdaten_identMethod.type,r=e.substring(e.lastIndexOf("[")+1,e.lastIndexOf("]")),n=(r=r.split("|")).indexOf("001");if(-1<r.length&&r.splice(n,1),0<r.length){t.formData.persdaten.persdaten_identMethod.val=r[0],t.isNetflix&&(t.formData.persdaten.persdaten_identMethod.val="001"),t.submit.noonlineident=!1,t.onlineIdentDisabled=!0;var i=o.getIndex("formIdentData");o.setCurrentForm(i),o.disbaleNextForms(i),o.scrollto()}},t.checkLength=function(){if(void 0!==t.formData){var e=t.formData.persdaten.persdaten_street.val.length,r=Number(t.formData.persdaten.persdaten_street.max);t.streetNameIsTooLong=r<e}},$(".mod-stepper").on("close:formPersData",function(){var e=o.getData().forms[o.getIndex("formIdentData")];if(t.formData.persdaten.persdaten_werbeInfo_BEW_version?VF.oBEWWerbeInfoVersion=4:VF.oBEWWerbeInfoVersion=null,t.formData.persdaten.persdaten_werbeKontakt_BEW_version?VF.oBEWWerbeKontaktVersion=4:VF.oBEWWerbeKontaktVersion=null,void 0!==e){if(("007"===t.formData.persdaten.persdaten_identMethod.val||"008"===t.formData.persdaten.persdaten_identMethod.val)&&!0===e.skip){var r=t.formData,n="";void 0!==r.persdaten.persdaten_sohoType&&(n=r.persdaten.persdaten_sohoType.val),o.setDoTracking(!1),t.identMethodsError=!1,b.getIdentMethod(t.formData.persdaten.persdaten_nationality.val,n).then(function(r){t.identDoc=r.req_ident_doc,t.formData.persdaten.persdaten_identMethod=r.persdaten_identMethod,"007"!==t.formData.persdaten.persdaten_identMethod.val&&"008"!==t.formData.persdaten.persdaten_identMethod.val||(e.skip=!0,e.status=!0,e.alterable=!1,e.displayName="Identifikation - nicht erforderlich",o.hideValidationMessages(),o.formValid(),o.next(),!0===o.getDoTracking()&&l.trackNextItem(),$(".mod-stepper").trigger("open: "+o.getCurrentForm().name),o.setDoTracking(!0))},function(e){t.identMethodsError=!0})}var i=[];0<=t.formData.persdaten.persdaten_identMethod.type.indexOf("001")&&i.push("online"),0<=t.formData.persdaten.persdaten_identMethod.type.indexOf("003")&&i.push("shop"),0<=t.formData.persdaten.persdaten_identMethod.type.indexOf("002")&&i.push("home"),0<=t.formData.persdaten.persdaten_identMethod.type.indexOf("006")&&i.push("homelight"),VF.onlineIdentOptions=i.toString()}}),t.notSorted=function(e){return e?Object.keys(e):[]},t.submit={technicalissue:!1,loading:!1,sessiontimeout:!1,noonlineident:!1},t.$watch("submit.noonlineident",function(e,t){if(e!==t&&!0===e){let e=document.getElementById(VF.const.newCartId);e&&(e.remove(),e=null)}}),t.pattern={zip:/^\d{5}$/,default:/^[\u00C0-\u017F\u2202A-Za-z ,.'-]+$/,defaultwithnumbers:/^[\u00C0-\u017F\u2202A-Za-z0-9 ,.'-]+$/,numeric:/^\d+$/,alphanumeric:/^([A-Za-z0-9]+)$/,alphanumericwithsepcial:/^[a-zA-Z0-9-_/ ]*$/,germaniban:/^[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9\s]{1,30}$/,handyvorwahl:/^\+?\d+$/,email:/^(?!.{81,})['_a-zA-Z0-9-\+]+(\.['_a-zA-Z0-9-\+]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.([a-zA-Z]{2,63})$/,city:/^[\u00C0-\u017F\u2202A-Za-z ,.'\-()]+$/},t.checkInternationalIBAN=function(e){return void 0!==e&&/^((?!DE|de|[*]).){3}/.test(e.$$lastCommittedViewValue)},t.scrollToPersData=function(){vf.util.scrollto($(".mod-stepper > li:eq(0)"))},VFeCommerce&&VFeCommerce.voucherCode&&(t.voucherCode=VFeCommerce.voucherCode),t.voucherAllowed=m.isVoucherAvailable(),t.voucherAllowed&&(E.isFaF()||E.isRedplus())&&(t.voucherAllowed=!1),e.basketRefreshedForVoucher||(e.basketRefreshedForVoucher={}),t.removeVoucher=function(){m.removeVoucher().then(function(){E=i.getOfferGroup(),t.offerGroup=E,t.voucherCode&&e.basketRefreshedForVoucher&&!e.basketRefreshedForVoucher[t.voucherCode]&&(e.basketRefreshedForVoucher[t.voucherCode]=!0,"basket"!==n.current.name&&n.go("basket"))},function(){}),t.voucherCode="",t.voucherServicesForVoucher=[],t.showVoucherForm=!0,VFeCommerce.voucherCode="",VFeCommerce.campaign=""},void 0!==e.switchedSimType&&!1!==e.switchedSimType||t.removeVoucher(),e.basketRefreshedForVoucher[t.voucherCode]=!1,e.switchedSimType=!1,t.showVoucherForm=!0,VFeCommerce.campaign&&0<VFeCommerce.campaign.length?t.showVoucherForm=!1:t.showVoucherForm=!0,t.addVoucher=function(e){m.validate({vc:e}).then(function(r){VFeCommerce.campaign=r.campaign,VFeCommerce.voucherCode=e,m.addVoucher(r).then(function(r){t.voucherCode=e,t.voucherServicesForVoucher=r,t.showVoucherForm=!1,t.voucherError="",E=i.getOfferGroup(),t.offerGroup=E,l.trackError("notification","Voucher","Voucher applied successfully","")},function(){t.showVoucherForm=!0,t.voucherError=m.getVoucherError("unknownVlux"),l.trackError("notification",t.voucherError,"Voucher co
1de unknown","")})},function(e){t.showVoucherForm=!0,e&&e.reason&&(t.voucherError=m.getVoucherError(e.reason),l.trackError("notification",t.voucherError,"Voucher code unknown",""))})},t.clearBasket=function(e){var t=$(".checkoutContent"),i=$(".loading-spiner-holder");t.hide(),i.show(),a.putEmptyBasket().then(function(){h.setWasEmptied(!0),sessionStorage.removeItem(VF.const.sessionKeySIMVariant),n.go("basket",{},{reload:!0}).then(function(){P.location.href=P.location.pathname});var t={removeType:"all",removed:l.getOOrder()};S.doTrack("remove from basket",t),e&&($("body").removeClass("no-scroll"),r(function(){$("html, body").animate({scrollTop:0},50)},500))},function(){d.trackFormError("could delete whole basket","basket"),t.show(),i.hide()})},t.goBack=function(){var e=t.offerGroup.mainOffer.offerComponents.subscription.getEnrichedData().mainTariffId;window.location.href="/privat/handys-tablets-tarife/alle-tarife-mit-vertrag.html?subscriptionGroup=consumer&tariffId="+e},t.pibPropositions=[];var K=[],q=t.offerGroup.mainOffer.offerComponents.subscription;if(void 0!==q&&(K.push(q.getEnrichedData().mainTariffId),t.pibPropositions.push(q)),t.offerGroup.hasAdditionalRedplusOffers())for(var J=t.offerGroup.redplusOffers,Z=0;Z<J.length;Z++)void 0!==(q=J[Z].offerComponents.subscription)&&0>K.indexOf(q.getEnrichedData().mainTariffId)&&(K.push(q.getEnrichedData().mainTariffId),t.pibPropositions.push(q));vf.toggle.init($(".pib-bottom")),document.body.classList.add("basketv2"),setTimeout(function(){vf.util.initModules($(".hardwareMobile")),vf.util.initModules($(".containerBelowContent"))},1500),t.pdfReady=!1,t.loading=!1,t.eeccError=!1,t.eeccErrorNoCSNeeded=!1;var X=null,Q="Bitte warten ",ee="Es ist ein technischer Fehler aufgetreten, bitte versuche es erneut.",te=function(){t.pdfReady?clearInterval(X):(16>Q.length?Q+=".":Q="Bitte warten ",document.getElementById("contractSummary")&&(document.getElementById("contractSummary").innerHTML=Q))};t.contractSummaryDownload=function(e,r,n){a.contractSummaryDownload(e).then(function(e){r(e)},function(i,o){404===i.status?setTimeout(function(){t.contractSummaryDownload(e,r)},2500):n(i,o)})},t.loadPDF=function(){t.loading||t.eeccError||t.eeccErrorNoCSNeeded||t.pdfReady||(t.loading=!0,_ddq.push(["information",{information_action:"reveal",information_name:"vertragszusammenfassung",information_ui_type:"button",information_trigger:"link"}]),X=setInterval(te,800),a.contractSummaryCheckStatus().then(function(){a.contractSummaryGenerate().then(function(e){const r=e.data.data.requestid;t.requestid=r,t.contractSummaryDownload(r,function(e){if(e.data.errors.length)return"CS1000"===e.data.errors[0].errorCode?t.eeccErrorNoCSNeeded=!0:t.eeccError=!0,t.eeccErrorCode=e.data.errors[0].errorCode,t.loading=!1,void _ddq.push(["error",{type:"technical",message:t.eeccError?ee:"Für die Produkte, die Du bestellen möchtest, benötigst Du keine Vertragszusammenfassung.",code:t.eeccErrorCode,location:"eecc summary"}]);const r=e.data.data;window.pdf=r,t.pdfReady=!0,t.loading=!1,document.getElementById("contractSummary")&&(document.getElementById("contractSummary").innerHTML="Zusammenfassung ansehen",document.getElementById("contractSummary").classList.remove("disabled"),document.getElementById("contractSummary").classList.remove("btn-min-width"))},function(e,r){t.eeccError=!0,t.eeccErrorCode=e.data.errors[0].errorCode,t.loading=!1,_ddq.push(["error",{type:"technical",message:ee,code:t.eeccErrorCode,location:"eecc summary"}])})},function(e,r){t.eeccError=!0,t.eeccErrorCode=e.data.errors[0].errorCode,t.loading=!1,_ddq.push(["error",{type:"technical",message:ee,code:t.eeccErrorCode,location:"eecc summary"}])})},function(e,r){t.eeccError=!0,t.eeccErrorCode=e.data.errors[0].errorCode,t.loading=!1,_ddq.push(["error",{type:"technical",message:ee,code:t.eeccErrorCode,location:"eecc summary"}])}))},t.showPDF=function(){if(t.pdfReady){_ddq.push(["download file",{file_name:"eecc summary"}]);for(var e=window.pdf,r=atob(e),n=new Array(r.length),i=0;i<r.length;i++)n[i]=r.charCodeAt(i);var o=new Uint8Array(n),a=new Blob([o],{type:"application/pdf"}),s=URL.createObjectURL(a);window.open(s)}},window.markCheckoutReady&&window.markCheckoutReady()}])}(),function(){"use strict";angular.module("ecommerce.checkout").controller("BasketEmptyController",["$rootScope","$scope","factoryFormData",function(){document.getElementsByClassName("sprite01")&&document.getElementsByClassName("sprite01")[0]&&(document.getElementsByClassName("sprite01")[0].classList.add("cart-sprite01"),document.getElementsByClassName("sprite02")[0].classList.add("cart-sprite02"),document.getElementsByClassName("sprite03")[0].classList.add("cart-sprite03"),document.getElementsByClassName("sprite04")[0].classList.add("cart-sprite04")),document.getElementsByClassName("contact-flyout")&&document.getElementsByClassName("contact-flyout")[1]&&(document.getElementsByClassName("contact-flyout")[1].style.display="none")}])}(),function(){"use strict";angular.module("ecommerce.checkout").controller("PersDataCtrl",["$rootScope","$scope","factorybShopBasket","factoryFormData","formsSummary",function(e,t,r,n,i){t.isDeviceFinance=!1;var o=r.getOfferGroup();o&&o.mainOffer&&o.mainOffer.offerComponents&&o.mainOffer.offerComponents.subscription&&o.mainOffer.offerComponents.subscription._enrichedDataSubscription&&(t.isDeviceFinance=o.mainOffer.offerComponents.subscription._enrichedDataSubscription.isDeviceFinance),t.fillShippingPhoneNumber=function(){if(t.forms&&t.forms.formPersData&&t.forms.formPersData.$valid){var e=n.getData();""!==e.persdaten.persdaten_areacode.val&&""!==e.persdaten.persdaten_phone.val&&void 0!==e.SHIPPING.shipping_tel1&&void 0!==e.SHIPPING.shipping_tel2&&""===e.SHIPPING.shipping_tel1.val&&""===e.SHIPPING.shipping_tel2.val&&(e.SHIPPING.shipping_tel1.val=e.persdaten.persdaten_areacode.val,e.SHIPPING.shipping_tel2.val=e.persdaten.persdaten_phone.val,n.setData(e),n.broadcastData())}}
1,t.currentForm=i.getCurrentForm()}])}(),function(){"use strict";angular.module("ecommerce.checkout").controller("IdentDataCtrl",["$rootScope","$scope","$timeout","factoryFormData","factoryGoogleMaps","factoryTotalCosts","formsSummary","factoryIdentMeta","factoryTracking","factoryNationalityValidation","factoryIdentMethods","factoryTrackingSender","$state","factoryShippingMethods","factorybShopBasket",function(e,t,r,n,i,o,a,s,c,u,l,d,p,f,h){t.doorIdentCosts=4.99,t.currentStateName=p.current.name,t.initShippingOptions=function(){var e=n.getData();$(".loading-spiner-holder").show(),f.getLocationTypes(e.persdaten.persdaten_identMethod.val).then(function(t){const r="selection["+t.data.locationtypes.join("|")+"]";e.SHIPPING.shipping_type.type=r},function(){}).finally(function(){$(".loading-spiner-holder").hide()}),"003"!==e.persdaten.persdaten_identMethod.val&&"006"!==e.persdaten.persdaten_identMethod.val||"007"===e.persdaten.persdaten_identMethod.val||"008"===e.persdaten.persdaten_identMethod.val||"005"===e.persdaten.persdaten_identMethod.val?e.SHIPPING.shipping_type.val="Identisch":e.SHIPPING.shipping_type.val="Alternativ",n.setData(e),n.broadcastData()},t.$on("identMethodChanged",function(e,r){t.doorIdentCosts=s.getCosts("002");var n=!1;r&&r.forBill&&t.formData.SHIPPING.shipping_selectedOption&&t.formData.SHIPPING.shipping_selectedOption.val&&t.formData.SHIPPING.shipping_selectedOption.val.length&&t.formData.SHIPPING.shipping_selectedOption.val.forEach(function(e){e&&e.option&&"001"===e.option.delAddressType&&(n=!0)}),n||(t.formData.SHIPPING.shipping_locationType.val="000")}),t.$watch("formData.persdaten.persdaten_identMethod.val",function(t){s.isInitialized()&&e.$broadcast("identMethodChanged",{value:t}),"003"===t?e.$broadcast("shippingOptionSet",{value:0}):t&&e.$broadcast("shippingOptionSet",{value:h.get().shippingFee})});var m=n.getData();function g(){void 0!==(m=n.getData()).persdaten.persdaten_sohoType&&t.$watch("formData.persdaten.persdaten_sohoType.val",function(e){var t=a.getData().forms[a.getIndex("formIdentData")];"big"===e?(t.skip=!0,t.status=!0,t.alterable=!1,t.displayName="Identifikation - nicht erforderlich"):(t.skip=!1,t.status=!1,t.alterable=!0,t.displayName="Identifikation")})}g(),$(".mod-stepper").on("close:formIdentData",function(){var e={"002":"home","006":"homelight","001":"online","003":"shop"},r={action:"select",onlineIdentOption:e[t.formData.persdaten.persdaten_identMethod.val]};d.doTrack("online ident ols",r),VF.onlineIdentMethod=e[t.formData.persdaten.persdaten_identMethod.val]}),$(".mod-stepper").on("open:formIdentData",function(){if("identchange"!==p.current.name){t.euCountry=u.isEUCountry(),t.currentForm=a.getCurrentForm();var e="";void 0!==m.persdaten.persdaten_sohoType&&(e=m.persdaten.persdaten_sohoType.val),t.identMethodsError=!1,l.getIdentMethod(t.formData.persdaten.persdaten_nationality.val,e).then(function(e){t.identDoc=e.req_ident_doc,t.formData.persdaten.persdaten_identMethod={...e.persdaten_identMethod};var r="";if(t.formData.persdaten.persdaten_identMethod.val)r=t.formData.persdaten.persdaten_identMethod.val;else{var n=t.formData.persdaten.persdaten_identMethod.type.match(/\[(.*?)\]/)[1].split("|");r=n[n.length-1]}var i=h.getOfferGroup(),o=i?.mainOffer?.offerServices?.getNetflixServices()?.isNetflix;if(o&&(r="001"),t.formData.persdaten.persdaten_identMethod.val=r,0<=["005","007","008"].indexOf(r)){var s=a.getData().forms[a.getIndex("formIdentData")];s.skip=!0,s.status=!0,s.alterable=!1,s.displayName="Identifikation - nicht erforderlich",a.hideValidationMessages(),a.formValid(),a.next(!0),!0===a.getDoTracking()&&c.trackNextItem(),$(".mod-stepper").trigger("open:"+a.getCurrentForm().name),a.setDoTracking(!0)}else c.trackNextItemGoingBack()},function(e){t.identMethodsError=!0})}}),$(".mod-stepper").on("close:formPersData",function(){var e="";void 0!==m.persdaten.persdaten_sohoType&&"big"===m.persdaten.persdaten_sohoType.val&&"identchange"!==p.current.name&&(e=m.persdaten.persdaten_sohoType.val,l.getIdentMethod(t.formData.persdaten.persdaten_nationality.val,e).then(function(e){t.identDoc=e.req_ident_doc,t.formData.persdaten.persdaten_identMethod=e.persdaten_identMethod},function(){})),g()})}])}(),function(){"use strict";angular.module("ecommerce.checkout").controller("ShipDataCtrl",["$scope","factoryTotalCosts","factoryFormData","factorySelectedStore","formsSummary","factorybShopBasket","factoryCommerceApi","factoryFulfilmentOrders","factoryTracking","$rootScope",function(e,t,r,n,i,o,a,s,c,u){e.isDeviceFinance=!1;var l=o.getOfferGroup();l&&l.mainOffer&&l.mainOffer.offerComponents&&l.mainOffer.offerComponents.subscription&&l.mainOffer.offerComponents.subscription._enrichedDataSubscription&&(e.isDeviceFinance=l.mainOffer.offerComponents.subscription._enrichedDataSubscription.isDeviceFinance),e.addShippingFee=function(){u.$broadcast("shippingOptionSet",{value:e.shippingFee})},e.removeShippingFee=function(){u.$broadcast("shippingOptionSet",{value:o.get().shippingFee})},e.clearModelAndErrors=function(){var t=r.getData();
1t.SHIPPING.shipping_salutation.val="",t.SHIPPING.shipping_firstname.val="",t.SHIPPING.shipping_lastname.val="",t.SHIPPING.shipping_street.val="",t.SHIPPING.shipping_houseno.val="",t.SHIPPING.shipping_plz.val="",t.SHIPPING.shipping_city.val="",t.SHIPPING.shipping_companyname1.val="",t.SHIPPING.shipping_companyname2.val="",t.SHIPPING.shipping_contact.val="","Abweichend"===t.SHIPPING.shipping_type.val&&(t.SHIPPING.shipping_salutation.val="Frau"),t.SHIPPING.shipping_storeId&&(t.SHIPPING.shipping_storeId.val=""),t.SHIPPING.shipping_locationType&&(t.SHIPPING.shipping_locationType.val="000"),e.formData.SHIPPING.shipping_DHLPackstationId&&(e.formData.SHIPPING.shipping_DHLPackstationId.val=""),r.setData(t),r.broadcastData(),e.forms.formShipData.$setPristine()},e.$on("selectedStore",function(){e.selectedStore=n.getStore()}),$(".mod-stepper").on("open:formShipData",function(){var t=r.getData();if("002"!==t.persdaten.persdaten_identMethod.val&&"006"!==t.persdaten.persdaten_identMethod.val&&"007"!==t.persdaten.persdaten_identMethod.val&&"008"!==t.persdaten.persdaten_identMethod.val&&"005"!==t.persdaten.persdaten_identMethod.val?t.SHIPPING.shipping_type.val="Alternativ":t.SHIPPING.shipping_type.val="Identisch",r.setData(t),r.broadcastData(),e.clearModelAndErrors(),e.isValidTransactionForSimplifiedCheckout){var n=e.formData.persdaten.persdaten_plz.val;a.getAvailableShippingOptions("008",n,"000").then(function(t){if("Aso.G.200.0"===t.data.responseCode&&t.data.shippingOptions){s.init(t.data.shippingOptions),e.fulfilmentOrders=s.get();var r=o.getOfferGroup();e.isUltraCardWithHardware=r.isUltraCardWithHardware(),e.isUltraCard=r.isMultisim();for(var n=!0,a=0;a<e.fulfilmentOrders.length;a++)try{"object"!=typeof e.fulfilmentOrders[a].availableShippingOptions.default&&(n=!1)}catch(e){n=!1}if(!0===n){var c=i.getData().forms[i.getIndex("formShipData")];c.skip=!0,c.status=!0,c.alterable=!1;var u=r.mainOffer.isEsimOffer?"nicht erforderlich. Du erhältst eine eSIM":"keine Lieferung erforderlich";c.displayName="Lieferadresse - "+(o.hasPhysicalDelivery()?"Persönliche Adresse":u),i.hideValidationMessages(),i.formValid(),i.next(!0),$(".mod-stepper").trigger("open:"+i.getCurrentForm().name),i.setDoTracking(!0)}else e.isValidTransactionForSimplifiedCheckout=!1}})}else!0===i.getDoTracking()&&c.trackNextItemGoingBack();e.clearModelAndErrors()});var d=t.getData();e.isGreaterThan100=100<=d.onetime,e.isNotGreaterThan100=100>d.onetime,$(".mod-stepper").on("close:formShipData",function(){if(VF)if(VF.oOrder=VF.oOrder||{},"Alternativ"!==e.formData.SHIPPING.shipping_type.val)VF.oOrder.shippingMethod={Abweichend:"alternate",Identisch:"home"}[e.formData.SHIPPING.shipping_type.val];else{VF.oOrder.shippingMethod={"001":"packstation","002":"DHL","003":"GLS","004":"UPS","005":"shiptostore","007":"pickupinstore","008":"pickupinstore"}[e.formData.SHIPPING.shipping_locationType.val]}})}])}(),function(){"use strict";angular.module("ecommerce.checkout").controller("MapsBaseController",["$scope","factoryFormData","$timeout","$q","factorySelectedStore","config","factoryGoogleMaps","factoryTotalCosts","factorybShopBasket","$rootScope",function(e,t,r,n,i,o,a,s,c,u){var l=this,d=[],p=null,f=null,h=null,m=null;e.autocomplete={},e.myLocationMarker=null,e.selectedStore=null,e.stores=[],e.deliveryTime="Abholbereit in 2-3 Tagen";var g=c.getOfferGroup();function v(t,r,n,i,o){var a={id:t,icon:r,name:n,disabled:i,visible:o};e.stores[t]=a}function b(t){e.map.setCenter(t),"mobile"!==vf.util.layout(!0)&&e.map.panBy(-200,0)}function y(t){var r=new google.maps.Marker({position:{lat:parseFloat(t.LATITUDE),lng:parseFloat(t.LONGITUDE)},map:e.map,title:t.CITY+" "+t.STREET+" "+t.STREET_NR,icon:e.iconPath+e.icons[t.LOCATION_TYPE]+".png"});return t.infowindow=function(e){if("mobile"===vf.util.layout(!0)){var t=new google.maps.InfoWindow;return t.setContent("<div ><b>"+e.CITY+" "+e.STREET+" "+e.STREET_NR+"</b></div>"),t}return null}
1(t),r.addListener("click",function(){var e=$(".storeListContainer .storeListItems .storeListItem a[data-locationid='"+t.LOCATION_ID+"']");e.trigger("click"),"mobile"!==vf.util.layout(!0)?h.data("jsp").scrollToElement(e,!0):vf.util.scrollto(e)}),d.push(r),r}function _(){d.forEach(function(e){e.setMap(null)}),e.markerCluster&&(e.markerCluster.clearMarkers(),e.markerCluster.redraw())}function S(){d.forEach(function(e){e.setOpacity(.5)})}function k(){d.forEach(function(e){e.setVisible(!0),e.setOpacity(1)})}g&&g.mainOffer&&g.mainOffer.offerComponents&&g.mainOffer.offerComponents.device&&g.mainOffer.offerComponents.device.attributes&&g.mainOffer.offerComponents.device.attributes.deliveryTime&&(e.deliveryTime=g.mainOffer.offerComponents.device.attributes.deliveryTime),e.disableAllStoreTypes=function(){for(var t=0;t<e.stores.length;t++)e.stores[t].disabled=!0},v("001","map-icon-dhl-packstation","Packstation",!0,!0),v("002","map-icon-dhl","DHL-Shop",!0,!0),v("003","GLS","GLS-Shop",!0,!0),v("004","map-icon-ups","UPS-Shop",!0,!0),v("005","map-icon-vf","Vodafone-Shop",!0,!0),v("006","map-icon-vf","Vodafone-Shop",!0,!0),v("007","map-icon-vf","Vodafone-Shop",!0,!0),v("008","map-icon-vf","Vodafone-Shop",!0,!0),e.icons={"001":"map-icon-dhl-packstation","002":"map-icon-dhl","003":"GLS","004":"map-icon-ups","005":"map-icon-vf","006":"map-icon-vf","007":"map-icon-vf","008":"map-icon-vf"},e.storeNames={"001":"Packstation","002":"DHL-Shop","003":"GLS-Shop","004":"UPS-Shop","005":"Vodafone-Shop","006":"Vodafone-Shop","007":"Vodafone-Shop","008":"Vodafone-Shop"},e.iconPath="https://www.vodafone.de/simplicity/simplicity-smaller/img/icon/shiptostore/",e.mapHidden=!0,e.mapToggleLabel="Karte öffnen",e.setMyLocationMarker=function(t){e.myLocationMarker&&e.myLocationMarker.setMap(null),e.myLocationMarker=new google.maps.Marker({position:{lat:parseFloat(t.LATITUDE),lng:parseFloat(t.LONGITUDE)},map:e.map,title:"Ihr Standort",icon:e.iconPath+"my-location.png"}),e.myLocationMarker.setZIndex(google.maps.Marker.MAX_ZINDEX)},e.getMarkerByLocationId=function(t){var r=null;return $.each(e.myMarkers.all,function(e,n){return n.LOCATION_ID!==t||(r=n,!1)}),r},e.prepareMarkers=function(){$.each(e.serviceMarkers,function(t,r){return r.index=t+1,r.visible=!0,r.listIcon=e.iconPath+e.icons[r.LOCATION_TYPE]+".png",r.OPENINGTIME_MOFR_MODIFIED=r.OPENINGTIME_MOFR.replace(/,/g,"<br>"),r.mapMarker=y(r),r.storeName=e.stores[r.LOCATION_TYPE].name,r.puisAvailability=e.puisAvailability,e.myMarkers.all.push(r),e.myMarkers[r.LOCATION_TYPE]||(e.myMarkers[r.LOCATION_TYPE]=[]),e.myMarkers[r.LOCATION_TYPE].push(r),!0}),e.markerCluster=new MarkerClusterer(e.map,d,{minimumClusterSize:2,gridSize:80,maxZoom:15,styles:[{url:"/simplicity/simplicity-smaller/img/shopfinder/clusters/all-shops-1-digit.png",textColor:"#fff",height:40,width:40,opacity:.5},{url:"/simplicity/simplicity-smaller/img/shopfinder/clusters/all-shops-2-digit.png",textColor:"#fff",height:50,width:50},{url:"/simplicity/simplicity-smaller/img/shopfinder/clusters/all-shops-3-digit.png",textColor:"#fff",height:60,width:60},{url:"/simplicity/simplicity-smaller/img/shopfinder/clusters/all-shops-3-digit.png",textColor:"#fff",height:60,width:60},{url:"/simplicity/simplicity-smaller/img/shopfinder/clusters/all-shops-3-digit.png",textColor:"#fff",height:60,width:60},{url:"/simplicity/simplicity-smaller/img/shopfinder/clusters/all-shops-3-digit.png",textColor:"#fff",height:60,width:60}]}),google.maps.event.addListener(e.markerCluster,"clusterclick",function(e){var t=e.getCenter(),r={lat:t.lat(),lng:t.lng()};m=r}),e.map.addListener("zoom_changed",function(){m&&(b(m),m=null)})},e.callGeoLocator=function(r){var i,a=o.apiURLs.STORELOCATOR,s=n.defer();if(void 0!==t.getData().persdaten.persdaten_identMethod){var u=t.getData().persdaten.persdaten_identMethod.val;"003"!==u&&"005"!==u&&"007"!==u&&"008"!==u&&"006"!==u&&(u="001")}else u="001";var l=c.getBackendIDsForHardware().toString();return i="003"!==u&&"005"!==u&&"007"!==u&&"008"!==u||!l?{request:{latitude:r.lat,longitude:r.lon,ident_method_id:u,radius:"30",channel_id:"OLS"}}:{request:{latitude:r.lat,longitude:r.lon,ident_method_id:u,radiu
1s:"30",channel_id:"OLS",mode:"puisincl",hardwareIds:l}},e.markers=[],$(".storeSearchInputContainer .magnifier").addClass("access"),$(".storeSearchInputContainer .reset").addClass("access"),$(".storeSearchInputContainer .loading").show(),$.ajax({url:a,cache:!0,data:JSON.stringify(i),method:"POST",processData:!1,contentType:"application/json",dataType:"JSON"}).done(function(t,r,n){$(".storeSearchContainer").show(),"0"===$(".map-close").css("opacity")&&$(".map-open").fadeTo(400,1);var i=new Date(n.getResponseHeader("date")),o=i.getDay(),a=i.getHours();switch(e.puisAvailability="today",o){case 0:e.puisAvailability="tomorrow";break;case 6:11<a&&(e.puisAvailability="twoToThreeDays");break;default:15<a&&(e.puisAvailability="tomorrow")}e.serviceMarkers=t.RESPONSE.SEARCHRESULT,_(),e.myMarkers={},e.myMarkers.all=[],e.clearSelectedStore(!0),e.prepareMarkers(),1===e.myMarkers.all.length&&e.setActiveMarker(e.myMarkers.all[0]),e.$apply(function(){e.markers=e.myMarkers.all}),e.filterResults(),"mobile"!==vf.util.layout(!0)&&(h=$(".scroll-pane")).jScrollPane({animateScroll:!0}),$(".storeSearchInputContainer .loading").hide(),$(".storeSearchInputContainer .magnifier").addClass("access"),$(".storeSearchInputContainer .reset").removeClass("access"),e.serviceError=!1,s.resolve(t)}).fail(function(){e.serviceError=!0}),s.promise},e.closeShopDetail=function(){$(".storeDataContainer").hide(),$(".storeListContainer").show(),e.map.setZoom(a.getDefaultZoomFactor()),k(),null!==e.selectedStore&&e.setActiveMarker(e.selectedStore)},e.displayShopDetails=function(t){e.map.setZoom(a.getDetailZoomFactor()),e.setActiveMarker(t),$(".storeDataContainer").show(),$(".storeListContainer").hide()},e.searchByName=function(){if(void 0!==e.forms.formShipData.storeSearchLocation.$viewValue){var t=e.forms.formShipData.storeSearchLocation.$viewValue;l.geocoder=new google.maps.Geocoder,l.geocoder.geocode({address:t},function(t,r){google.maps.GeocoderStatus.OK===r&&e.callGeoLocator({lat:t[0].geometry.location.lat(),lon:t[0].geometry.location.lng()}).then(function(){if(e.closeShopDetail(),0<e.markers.length)var r={lat:parseFloat(e.markers[0].LATITUDE),lng:parseFloat(e.markers[0].LONGITUDE)};else r={lat:t[0].geometry.location.lat(),lng:t[0].geometry.location.lng()};b(r),"mobile"===vf.util.layout(!0)&&google.maps.event.trigger(e.map,"resize")})})}},e.locateMe=function(){navigator.geolocation&&navigator.geolocation.getCurrentPosition(function(t){var r={lat:t.coords.latitude,lon:t.coords.longitude};e.callGeoLocator({lat:r.lat,lon:r.lon}).then(function(){($("#inputLocation").val(""),e.closeShopDetail(),e.setMyLocationMarker({LATITUDE:r.lat,LONGITUDE:r.lon}),0<e.markers.length)&&b({lat:parseFloat(e.markers[0].LATITUDE),lng:parseFloat(e.markers[0].LONGITUDE)});"mobile"===vf.util.layout(!0)&&google.maps.event.trigger(e.map,"resize")})},function(){})},e.changeAddress=function(){var t=e.autocomplete.getPlace(),r={};"object"==typeof t&&t.geometry&&(r.lat=t.geometry.location.lat(),r.lon=t.geometry.location.lng(),r.r="5000",e.callGeoLocator(r).then(function(){b({lat:t.geometry.location.lat(),lng:t.geometry.location.lng()})}),e.setMyLocationMarker({LATITUDE:t.geometry.location.lat(),LONGITUDE:t.geometry.location.lng()}))},e.reinitializeScrollpane=function(){"mobile"!==vf.util.layout(!0)&&r(function(){null!==h&&h.data("jsp")&&h.data("jsp").reinitialise&&h.data("jsp").reinitialise()},200)},e.toggleStoreSelection=function(t){if("string"==typeof t)t=e.getMarkerByLocationId(t);null!==e.selectedStore&&e.selectedStore.LOCATION_ID===t.LOCATION_ID||(e.selectedStore?t.LOCATION_ID!==e.selectedStore.LOCATION_ID?e.setShippingAddress(t):e.clearSelectedStore(!0):e.setShippingAddress(t))},e.toggleMap=function(){e.mapHidden?($(".storeSearchContainer").hide(),e.mapToggleLabel="Karte schließen",e.mapHidden=!1,$(".map-container-inner").animate({height:"361px"},400,function(){google.maps.event.trigger(e.map,"resize")})):(e.mapToggleLabel="Karte öffnen",$(".storeSearchContainer").show(),e.mapHidden=!0,$(".map-container-inner").animate({height:"36px"},400,function(){}))},e.setActiveMarker=function(t){if("string"==typeof t)t=e.getMarkerByLocationId(t);e.selectedStoreMarker=t,b({lat:parseFloat(t.LATITUDE),lng:parseFloat(t.LONGITUDE)}),p&&p.close(),(p=t.infowindow)&&p.open(e.map,t.mapMarker,"noreferrer"),S(),(f=t).mapMarker.setVisible(!0),f.mapMarker.setOpacity(1),e.reinitializeScrollpane()},e.resetSearch=function(){_(),e.markers=[],e.myLocationMarker=null,e.map.setZoom(a.getDefaultZoomFactor()),$(".storeSearchContainer").hide(),$(".storeSearchInputContainer .magnifier").removeClass("access"),$(".storeSearchInputContainer .reset").addClass("access"),$("#input
1Location").val(""),a.getDefaultLocation().then(function(t){b(t),e.clearSelectedStore(!1)}),e.infoWindow&&e.infoWindow.close()},e.setShippingAddress=function(r){var n=t.getData();e.selectedStore=r,i.setStore(r),n.SHIPPING.shipping_companyname1.val=r.NAME_1.substring(0,30),n.SHIPPING.shipping_city.val=r.CITY,n.SHIPPING.shipping_houseno.val=r.STREET_NR.substring(0,8),n.SHIPPING.shipping_plz.val=r.ZIP,n.SHIPPING.shipping_street.val=r.STREET,n.SHIPPING.shipping_storeId.val=r.LOCATION_ID,n.SHIPPING.shipping_locationType.val=r.LOCATION_TYPE,n.SHIPPING.shipping_salutation.val="Firma",n.SHIPPING.shipping_storeHours.val=r.OPENINGTIME_MOFR,n.SHIPPING.shipping_storeHoursWE.val=r.OPENINGTIME_SA,t.setData(n),t.broadcastData(),"005"===r.LOCATION_TYPE||"003"===n.persdaten.persdaten_identMethod.val?u.$broadcast("shippingOptionSet",{value:0}):u.$broadcast("shippingOptionSet",{value:c.get().shippingFee}),S(),r.mapMarker.setOpacity(1),e.infoWindow&&e.infoWindow.close();for(var o=r.mapMarker.position,a=new google.maps.Size(0,-31),s=0;s<e.markerCluster.clusters_.length;s++)for(var l=e.markerCluster.clusters_[s],d=0;d<l.markers_.length;d++){l.markers_[d].title===r.mapMarker.title&&l.markers_.length>=e.markerCluster.minClusterSize_&&(o=l.center_,a=new google.maps.Size(0,-10))}e.activeMarker=r;var p='<div class="mapTooltipHeader"><strong>'+r.storeName+"</strong></div><div>"+r.STREET+" "+r.STREET_NR+"</div><div>"+r.ZIP+" "+r.CITY+"</div>";e.infoWindow=new google.maps.InfoWindow({content:p,maxWidth:350,pixelOffset:a,position:{lat:o.lat(),lng:o.lng()}}),e.infoWindow.open(e.map,r.mapMarker,"noreferrer"),e.reinitializeScrollpane(),b({lat:parseFloat(r.LATITUDE),lng:parseFloat(r.LONGITUDE)})},e.clearSelectedStore=function(t){e.selectedStore=null,t&&(k(),e.filterResults()),e.shopName1="",e.shopName2="",e.formData.SHIPPING.shipping_companyname1.val="",e.formData.SHIPPING.shipping_companyname2.val="",e.formData.SHIPPING.shipping_city.val="",e.formData.SHIPPING.shipping_houseno.val="",e.formData.SHIPPING.shipping_plz.val="",e.formData.SHIPPING.shipping_street.val="",e.formData.SHIPPING.shipping_storeId||(e.formData.SHIPPING.shipping_storeId={}),e.formData.SHIPPING.shipping_storeId.val="",e.formData.SHIPPING.shipping_salutation.val="",void 0===e.formData.SHIPPING.shipping_locationType?e.formData.SHIPPING.shipping_locationType={val:"000"}:e.formData.SHIPPING.shipping_locationType.val="000",e.formData.SHIPPING.shipping_DHLPackstationId&&(e.formData.SHIPPING.shipping_DHLPackstationId.val=""),e.formData.SHIPPING.shipping_selectedOption&&(e.formData.SHIPPING.shipping_selectedOption.val=""),void 0!==e.formData.persdaten.persdaten_identMethod&&("003"!==e.formData.persdaten.persdaten_identMethod.val&&"005"!==e.formData.SHIPPING.shipping_locationType.val||u.$broadcast("shippingOptionSet",{value:0})),e.formData.SHIPPING.shipping_storeHours||(e.formData.SHIPPING.shipping_storeHours={}),e.formData.SHIPPING.shipping_storeHours.val="",e.formData.SHIPPING.shipping_storeHoursWE||(e.formData.SHIPPING.shipping_storeHoursWE={}),e.formData.SHIPPING.shipping_storeHoursWE.val="",e.reinitializeScrollpane()}}])}(),function(){"use strict";angular.module("ecommerce.checkout").controller("ShipToStoreCtrl",["$controller","$rootScope","$scope","factoryFormData","$timeout","$q","factorySelectedStore","config","factoryGoogleMaps","factorybShopBasket","factoryTrackingSender",function(e,t,r,n,i,o,a,s,c,u,l){angular.extend(this,e("MapsBaseController",{$rootScope:t,$scope:r,factoryFormData:n,$timeout:i,$q:o,factorySelectedStore:a,config:s,factoryGoogleMaps:c})),r.$watch("[formData.SHIPPING.shipping_type.val, formData.persdaten.persdaten_identMethod.val]",function(e){var t=r.changeAddress;0<=e.indexOf("Alternativ")&&-1===e.indexOf("Vodafone Shop Ident")&&c.init().then(function(e){r.map=e;var t=n.getData();""!==t.SHIPPING.shipping_storeId.val&&void 0!==t.SHIPPING.shipping_storeId.val||(r.clearSelectedStore(!1),r.resetSearch());var i=c.getDefaultPosition();r.callGeoLocator({lat:i.lat,lon:i.lng})}),"object"==typeof google&&(r.autocomplete=new google.maps.places.Autocomplete(document.getElementById("inputLocation"),c.getMapOptions()),r.autocomplete.addListener("place_changed",t))}),r.toggleStore=function(e,t){r.stores[t].visible=r.stores[e].visible,r.stores[t].disabled=r.stores[e].disabled},r.filterResults=function(){if(r.removeShipToStoreDublicates(r.myMarkers.all),r.myMarkers&&0<r.myMarkers.all.length){var e=0,t=[],n=!1;
1for(var i in r.myMarkers.all){if(5===i)break;if("007"===r.myMarkers.all[i].LOCATION_TYPE||"008"===r.myMarkers.all[i].LOCATION_TYPE){n=!0;break}}var o={action:"show store selector",pickUpInStore:"available"};o.pickUpInStore=n?"available":"not available",l.doTrack("pdt ols",o),r.disableAllStoreTypes(),$.each(r.myMarkers.all,function(n,i){var o=r.stores[i.LOCATION_TYPE].visible,a=null,c=null;r.activeMarker&&(a=r.activeMarker.mapMarker.title,c=r.activeMarker.storeName),i.class=r.stores[i.LOCATION_TYPE].visible?"":"access",r.stores[i.LOCATION_TYPE].visible&&(e++,r.stores[i.LOCATION_TYPE].disabled=!1),s.shipToStore.filterLimit&&0<s.shipToStore.filterLimit&&s.shipToStore.filterLimit<e&&(o=!1,i.class="access"),i.mapMarker.setVisible(o),o?(t.push(i.mapMarker),a&&i.mapMarker.title===a&&c===i.storeName&&$(".gm-style-iw-a").show()):a&&i.mapMarker.title===a&&c===i.storeName&&$(".gm-style-iw-a").hide()}),r.markerCluster.clearMarkers(),r.markerCluster.addMarkers(t),r.reinitializeScrollpane()}},r.removeShipToStoreDublicates=function(e){for(var t=[],r=0;r<e.length;r++)"007"!==e[r].LOCATION_TYPE&&"008"!==e[r].LOCATION_TYPE||t.push(e[r]);for(r=0;r<e.length;r++)for(var n=0;n<t.length;n++)"005"!==e[r].LOCATION_TYPE&&"006"!==e[r].LOCATION_TYPE||e[r].LOCATION_ID!==t[n].LOCATION_ID||e.splice(r,1);return e},$(window).on("vf::resize orientationchange",function(){"sml"===vf.util.layout()?r.mapHidden?($(".map-container-inner").css({height:"36px"}),$(".storeSearchContainer").show()):($(".map-container-inner").css({height:"361px"}),$(".storeSearchContainer").hide()):($(".map-container-inner").css({height:"auto"}),$(".storeSearchContainer").show())})}])}(),function(){"use strict";angular.module("ecommerce.checkout").controller("ShipOptionsDataCtrl",["$rootScope","$scope","factoryFormData","factoryCommerceApi","factoryFulfilmentOrders","factoryCutOffTime","factoryDeltaDays","factoryTracking","factorybShopBasket","formsSummary","factoryTrackingSender","factorySelectedStore",function(e,t,r,n,i,o,a,s,c,u,l,d){var p;t.fulfilmentOrders=[];var f=s.getOOrder();t.hasEsim=!1,t.hasHardWare=!1;var h,m=c.getOfferGroup();t.isUltraCardWithHardware=m.isUltraCardWithHardware(),t.isUltraCard=m.isMultisim(),0<c.getBackendIDsForHardware().length&&(t.hasHardWare=!0);var g=function(e){var r=!1,n=d.getStore().LOCATION_TYPE,o=u.getData().forms[u.getIndex("formShipOptionsData")];return"007"===n||"008"===n?(o.skip=!0,o.status=!0,o.alterable=!1,o.displayName="Dein Abholtermin - Genaue Information folgt nach Bestellung",u.hideValidationMessages(),u.formValid(),u.next(!0),s.trackNextItem(),$(".mod-stepper").trigger("open:"+u.getCurrentForm().name),r=!0):e&&t.isValidTransactionForSimplifiedCheckout?function(){for(var e=i.get(),t=[],r=[],n=0;n<e.length;n++)for(var o=e[n].availableShippingOptions.default.deliverySchedules.deliveryDate,a=0;a<e[n].propositions.length;a++)t.push(moment(o,"YYYY-MM-DD").format("DD.MM.YYYY")),r.push(e[n].propositions[a].tariff.label);var l=u.getData().forms[u.getIndex("formShipOptionsData")];l.skip=!0,l.status=!0,l.alterable=!1;var d="Liefertermin - ";if(c.hasPhysicalDelivery())if(1===t.length)l.displayName=d+"ca. "+t[0];else{for(n=0;n<t.length;n++)0<n&&(d+=", "),d+=r[n]+" ca. "+t[n];l.displayName=d}else{var p=m.mainOffer.isEsimOffer?"nicht erforderlich. Du erhältst eine eSIM":"keine Lieferung erforderlich";l.displayName=d+p}u.hideValidationMessages(),u.formValid(),u.next(!0),s.trackNextItem(),u.getCurrentForm()&&$(".mod-stepper").trigger("open:"+u.getCurrentForm().name)}():(o.skip=!1,o.status=!1,o.alterable=!0,o.displayName="Dein Liefertermin"),r};if(t.fulfilmentOrders)for(var v=0;v<t.fulfilmentOrders.length;v++)for(var b=0;b<t.fulfilmentOrders[v].propositions.length;b++)"object"==typeof t.fulfilmentOrders[v].propositions[b].ultraCard&&t.fulfilmentOrders[v].propositions[b].ultraCard.isEsim&&(t.hasEsim=!0);function y(r,n){if(void 0!==r){var a,s=0;t.cutOffTime=void 0,Object.keys(r).length&&!n&&g(!0),$.each(r,function(n,c){if(c){if(c.option.deliveryTimes&&c.option.deliveryTimes.shippingFee)var u=c.option.deliveryTimes.shippingFee;else u=0;if(c.option.shippingFee)var l=c.option.shippingFee;else l=0;s=Math.max(s,u,l),void 0===h&&n===r.length-1&&(h=s),void 0!==h&&(t.isDHL=s>h),e.$broadcast("shippingOptionSet",{value:s,isDHL:t.isDHL});for(var d=i.getFulfilmentOrderByIndex(n),p=!0,f=0;f<d.propositions.length;f++)d.propositions[f].ignoreCutOffTime||(p=!1);if(!p){if(c.option.deliveryTimes&&c.option.deliveryTimes.cutOffDate&&c.option.deliveryTimes.cutOffTime){var m=c.option.deliveryTimes.cutOffDate.split("-"),g=c.option.deliveryTimes.cutOffTime.split(":"),v=new Date(m[0],parseInt(m[1])-1,m[2],g[0],g[1],g[2]);(void 0===a||v<a)&&(a=v)}o.setCutOffTime(a),void 0!==a&&(t.cutOffTime=o.cutOffTimeToString())}}})}}$(".mod-stepper").on("open:formShipOptionsData",function(){h=void 0,t.currentForm=u.getCurrentForm(
1),p=r.getData(),g(!0),f=s.getOOrder(),t.fulfilmentOrders=[];var e="kein Ident";p.persdaten.persdaten_identMethod&&""!==p.persdaten.persdaten_identMethod.val&&(e=p.persdaten.persdaten_identMethod.val);var o=p.persdaten.persdaten_plz.val;p.SHIPPING.shipping_plz&&""!==p.SHIPPING.shipping_plz.val&&(o=p.SHIPPING.shipping_plz.val),t.gasoError=!1,n.getAvailableShippingOptions(e,o,p.SHIPPING.shipping_locationType.val).then(function(e){if("Aso.G.200.0"===e.data.responseCode&&e.data.shippingOptions){i.init(e.data.shippingOptions),t.fulfilmentOrders=i.get(),t.isUltraCardWithHardware=m.isUltraCardWithHardware(),t.isUltraCard=m.isMultisim();var r=[];if(t.hasEsim=!1,t.fulfilmentOrders){for(var n=0;n<t.fulfilmentOrders.length;n++)for(var o=0;o<t.fulfilmentOrders[n].propositions.length;o++)"object"==typeof t.fulfilmentOrders[n].propositions[o].ultraCard&&t.fulfilmentOrders[n].propositions[o].ultraCard.isEsim&&(t.hasEsim=!0,t.fulfilmentOrders[n].propositions[o].device.hasOwnProperty("label")||r.push(n));t.hasHardWare||(t.fulfilmentOrders=t.fulfilmentOrders.filter(function(e,t){return!r.includes(t)}))}for(n=0;n<t.fulfilmentOrders.length;n++){var a=t.fulfilmentOrders[n];if(!t.isObjectEmpty(a.availableShippingOptions.promised))for(o=0;o<a.propositions.length;o++)if(f.aPropositions)for(var s=0;s<f.aPropositions.length;s++)if(f.aPropositions[s].bShopId===a.propositions[o].pid){var c={action:"show",proposition:f.aPropositions[s].id};l.doTrack("pdt ols",c)}}}else t.gasoError=!0},function(e){t.gasoError=!0})}),t.$watch("fulfilmentOrders",function(e){0!==e.length&&(t.forms.formShipOptionsData.$setPristine(),p.SHIPPING.shipping_selectedOption.val=[],t.manyDeliveries=!1,t.dynamicCustomerDeliveryServiceInfoText=null,$.each(e,function(e,r){if("default"===r.selectedOption.type){var n={pid:i.getPidByIndex(e),option:i.getDefaultOptionByIndex(e)};p.SHIPPING.shipping_selectedOption.val[e]=n,t.setShowMobileNumberInputInShippingOptionsSelection(p.SHIPPING.shipping_selectedOption.val[e])}else if(setTimeout(function(){vf.dateTimeTables.init($(".fulfilment-order-"+e))},1),r.selectedOption.promisedOptionLocked){var o=parseInt(t.fulfilmentOrders[e].selectedOption.deliveryDate),a=t.fulfilmentOrders[e].selectedOption.deliveryTime;if(""!==o&&""!==a){var s=t.fulfilmentOrders[e].availableShippingOptions.promised[o][a];n={pid:i.getPidByIndex(e),option:s};p.SHIPPING.shipping_selectedOption.val[e]=n,t.setShowMobileNumberInputInShippingOptionsSelection(p.SHIPPING.shipping_selectedOption.val[e])}}}),r.setData(p),r.broadcastData(),p&&p.SHIPPING&&p.SHIPPING.shipping_selectedOption&&y(p.SHIPPING.shipping_selectedOption.val,!0))},!0),p=r.getData(),t.$watch("formData.SHIPPING.shipping_selectedOption.val",function(e){y(e)},!0),t.setSelectedOption=function(e){f=s.getOOrder();var n=parseInt(t.fulfilmentOrders[e].selectedOption.deliveryDate),o=t.fulfilmentOrders[e].selectedOption.deliveryTime;if(""!==n&&""!==o){var c=t.fulfilmentOrders[e].availableShippingOptions.promised[n][o],u={pid:i.getPidByIndex(e),option:c};p.SHIPPING.shipping_selectedOption.val[e]=u,r.setData(p),r.broadcastData(),t.fulfilmentOrders[e].selectedOption.promisedOptionLocked=!0;for(var d=0;d<t.fulfilmentOrders[e].propositions.length;d++)for(var h=0;h<f.aPropositions.length;h++)if(f.aPropositions[h].bShopId===t.fulfilmentOrders[e].propositions[d].pid){var m="all day";"08-12"===o?m="08:00-12:00":"10-12"===o?m="10:00-12:00":"12-14"===o?m="12:00-14:00":"14-16"===o?m="14:00-16:00":"16-18"===o?m="16:00-18:00":"18-20"===o?m="18:00-20:00":"19-21"===o&&(m="19:00-21:00");var g="same day",v=c.deliverySchedules.deliveryDate.split("-"),b=(n=new Date(v[0],parseInt(v[1])-1,v[2]),new Date);b.setHours(0),b.setMinutes(0),b.setSeconds(0),b.setMilliseconds(0);var y=a.getDelta(n,b);0<y&&(g=1===y?"tomorrow ":"wish date ",g+="08-12"===o?"morning":"18-20"===o||"19-21"===o?"evening":"day"),f.aPropositions[h].shippingPeriod=m,f.aPropositions[h].shippingDay=g,s.setOOrder(f);var _={action:"select",proposition:f.aPropositions[h].id,shippingDay:g,shippingPeriod:m};l.doTrack("pdt ols",_)}}},t.changeSelectedOption=function(e){t.fulfilmentOrders[e].selectedOption.promisedOptionLocked=!1,p.SHIPPING.shipping_selectedOption.val[e]=void 0,r.setData(p),r.broadcastData(),t.trackDateTimeView(e)},t.setShowMobileNumberInputInShippingOptionsSelection=function(e){t.showMobileNumberInputInShippingOptionsSelection=!1,t.showMobileNumberAlternateMessageInShippingOptionsSelection=!1,t.dynamicCustomerDeliveryDestinationInfoText="",t.lastValue=t.dynamicCustomerDeliveryServiceInfoText,t.dynamicCustomerDeliveryServiceInfoText="Lieferung","S"===e.option.pushComDev&&(0>=p.persdaten.persdaten_mobileNDC.val.length&&0>=p.persdaten.persdaten_mobileNumber.val.length?t.showMobileNumberInputInShippingOptionsSelection=!0:t.showMobileNumberAlternateMessageInShippingOptionsSelection=!0),"000"===e.option.delAddressType?t.dynamicCustomerDeliveryDestinationInfoText="an die angegebene Adresse":"001"===e.option.delAddressType?t.dynamicCustomerDeliveryDestinationInfoText="an die Packstation":"002"===e.option.delAddressType?t.dynamicCustomerDeliveryDestinationInfoText="an den DHL-Shop":"003"===e.option.delAddressType?t.dynamicCustomerDeliveryDestinationInfoText="an den GLS-Shop":"004"===e.option.delAddressType?t.dynamicCustomerDeliveryDestinationInfoText="an den UPS-Shop":"005"
1!==e.option.delAddressType&&"007"!==e.option.delAddressType||(t.dynamicCustomerDeliveryDestinationInfoText="an den Vodafone-Shop"),"OT"===e.option.shippingCondition&&(t.manyDeliveries?t.dynamicCustomerDeliveryServiceInfoText="Lieferung":t.lastValue&&"Express/Wunsch Lieferung"!==t.lastValue?(t.manyDeliveries=!0,t.dynamicCustomerDeliveryServiceInfoText="Lieferung"):t.dynamicCustomerDeliveryServiceInfoText="Express/Wunsch Lieferung")},t.trackDateTimeView=function(e){if(f=s.getOOrder(),!t.fulfilmentOrders[e].selectedOption.promisedOptionLocked){var r,n,i,o,a,c=[],u=t.fulfilmentOrders[e].availableShippingOptions.promised;for(var d in u)u.hasOwnProperty(d)&&("0"===d&&(r=!0),"1"===d&&(u[d]["08-18"]&&(n=!0),(u[d]["18-20"]||u[d]["19-21"])&&(i=!0)),"0"!==d&&"1"!==d&&((u[d]["08-18"]||u[d]["10-12"]||u[d]["12-14"]||u[d]["14-16"]||u[d]["16-18"])&&(o=!0),(u[d]["18-20"]||u[d]["19-21"])&&(a=!0)));r&&c.push("same day"),n&&c.push("tomorrow morning"),i&&c.push("tomorrow evening"),o&&c.push("wish date day"),a&&c.push("wish date evening");for(var p=0;p<t.fulfilmentOrders[e].propositions.length;p++)if(f.aPropositions)for(var h=0;h<f.aPropositions.length;h++)if(f.aPropositions[h].bShopId===t.fulfilmentOrders[e].propositions[p].pid){var m={action:"view",proposition:f.aPropositions[h].id,shippingOptions:c};l.doTrack("pdt ols",m)}}},t.isObjectEmpty=function(e){return 0===Object.keys(e).length};var _=t.$on("simVariantChanged",function(){i.setCacheFulFilment(),t.fulfilmentOrders=i.get(),t.$apply()});t.$on("$destroy",_),t.selectDeliveryTimeSlot=function(e,t,r,n){13===e&&(t.deliveryDate=r,t.deliveryTime=n)}}])}(),function(){"use strict";angular.module("ecommerce.checkout").controller("SuccessCtrl",["$rootScope","$scope","$http","factoryFormData","factorySuccessData","authenticationServiceEvolvedFactory","factoryCommerceApi","factorySelectedStore","factorybShopBasket","factoryTotalCosts","factoryCutOffTime","factoryFulfilmentOrders","factoryVoucher","factoryTracking",function(e,t,r,n,i,o,a,s,c,u,l,d,p,f){$("#top").removeClass("noMDD"),$("#top").removeClass("wrapper");let h=document.getElementById(VF.const.newCartId);h&&(h.remove(),h=null),$(".checkoutContent").show();var m=$(".loading-spiner-holder");m.hide(),t.formData=n.getData(),t.fulfilmentOrders=d.get();var g=c.getOfferGroup();t.isUltraCardWithHardware=g.isUltraCardWithHardware(),t.isUltraCard=g.isMultisim(),t.hasEsim=c.hasEsim(t.fulfilmentOrders),t.isSohoChannel=g.isSoHo(),t.isEnterpriseChannel=g.isEnterprise(),t.isPuis=!1,t.orderForMyChild=!1,g.offerGroupCosts.calculateCosts(),t.oneTimeHardware=g.offerGroupCosts.oneTimeTotal-g.offerGroupCosts.oneTimeConnectionFees;var v=c.get();void 0!==v.orderForMyChild&&(t.orderForMyChild=v.orderForMyChild),t.hasEsimOffer=c.hasEsimOffer(),t.hasTradeInDiscount=c.hasTradeInDiscount(),t.hasPhysicalDelivery=c.hasPhysicalDelivery(),g.isVVL()&&g.isSimOnly()?t.showDeliveryText=!1:t.showDeliveryText=!0,o.authLogout(),a.mintLogout().then(function(){vf.glnav.updateLoginIndicator()});var b="001"===t.formData.persdaten.persdaten_identMethod.val;if(!g.isSimOnly()&&b&&setTimeout(function(){m.show(),window.location.href=t.webIdURL},15e3),window.sessionStorage.clear(),"Alternativ"===t.formData.SHIPPING.shipping_type.val&&(t.selectedStore=s.getStore()),s.getStore()){var y=s.getStore().LOCATION_TYPE;"007"!==y&&"008"!==y||(t.isPuis=!0)}void 0!==l.getCutOffTime()&&(t.cutOffTime=l.cutOffTimeToString()),t.jungeLeuteDiscount=!1,t.studentenDiscount=!1,t.behindertenDiscount=!1,g.hasYoungDiscount()&&(t.jungeLeuteDiscount=!0),g.hasStudentDiscount()&&(t.studentenDiscount=!0),g.hasHandicappedDiscount()&&(t.behindertenDiscount=!0);var _,S,k,C=i.getData();if(C){if(f.trackThankYouPage(),t.orderId=C.orderID,VFeCommerce.voucherCode){var D={};D.vc=VFeCommerce.voucherCode,D.orderNo=C.orderID,p.burn(D)}if(C.webId_actionID&&(t.webIdActionId=C.webId_actionID),C.webId_URL&&(t.webIdURL=C.webId_URL),_=C.orderID,S=t.formData.persdaten.persdaten_email.val,k=g.offerGroupCosts.oneTimeTotal,$("#trustedShopsKaeuferschutz").append('<div id="trustedShopsCheckout" style="display:none;">
1<span id="tsCheckoutOrderNr">'+_+'</span><span id="tsCheckoutBuyerEmail">'+S+'</span><span id="tsCheckoutOrderAmount">'+k+'</span><span id="tsCheckoutOrderCurrency">EUR</span><span id="tsCheckoutOrderPaymentType">VORKASSE</span></div>'),"object"==typeof window.trustbadge&&"function"==typeof window.trustbadge.reInitialize&&(window.trustbadge.remove(),window.trustbadge.reInitialize()),g.hasGigaKombiDiscount()&&function(e){var t=$.cookie("msredone")||"";try{if("object"==typeof(t=JSON.parse(t))){var r="";if("string"==typeof t.URL){r=decodeURIComponent(t.URL);var n=document.createElement("iframe");n.setAttribute("src",r),n.setAttribute("style","display:none"),n.style.width="0",n.style.height="0",document.body.appendChild(n)}else if("string"==typeof t.token){var i=decodeURIComponent(t.token);vf.gigakombi.sendOrderId(i,e).fail(function(){$state.go("error.technicalerror",{error:{message:"Das hat leider nicht geklappt. Versuch es bitte nochmal."}})})}}$.removeCookie("msredone",{path:"/"})}catch(e){}}(C.orderID),t.hasFallbackBw=!1,"object"==typeof C.basket.Bundle&&"object"==typeof C.basket.Bundle.DSL&&void 0!==typeof C.basket.Bundle.DSL.FallbackBW){var O=C.basket.Bundle.DSL.FallbackBW;0<O&&(t.hasFallbackBw=!0,t.fallbackBw=1e3<=O?O/1e3+" Mbit/s":O+" Kbit/s")}function I(e){var t=document.createElement("script");t.type="text/javascript",t.text="var di = {t:'"+e+"',v:'FgCOvP',l:'Checkout'};",document.body.appendChild(t);var r=document.createElement("script");r.type="text/javascript",r.src="//www.jsctool.com/FgCOvP/di.js",document.body.appendChild(r);var n=document.createElement("noscript"),i=document.createElement("link");i.type="text/css",i.rel="stylesheet",i.href="//www.jsctool.com/di.css?t="+e+"&amp;v=FgCOvP&amp;l=Checkout",n.appendChild(i),document.body.appendChild(n);var o=document.createElement("link");o.type="text/css",o.rel="stylesheet",o.media="jsctool",o.href="//d.vodafone.de/di.css?t="+e+"&amp;sd=1&amp;v=FgCOvP&amp;l=Checkout",document.body.appendChild(o);var a=document.createElement("object");a.type="application/x-shockwave-flash",a.data="//www.jsctool.com/FgCOvP/c.swf",a.width=0,a.height=0;var s=document.createElement("param");s.name="movie",s.value="//www.jsctool.com/FgCOvP/c.swf",a.appendChild(s);var c=document.createElement("param");c.name="flashvars",c.value="t="+e+"&amp;v=FgCOvP&amp;l=Checkout",a.appendChild(c);var u=document.createElement("param");u.name="AllowScriptAccess",u.value="always",a.text='<param name="AllowScriptAccess" value="always"/>',a.appendChild(u),document.body.appendChild(a)}I(C.orderID)}t.hideEsimProduct=function(e){return"1"!==e.pid&&e.propositions.some(function(e){return e&&e.ultraCard&&!0===e.ultraCard.isEsim})}}])}(),function(){"use strict";angular.module("ecommerce.checkout").controller("GeneralSuccessCtrl",["$rootScope","$scope","factoryFormData",function(e,t,r){t.formData=r.getData()}])}(),function(){"use strict";angular.module("ecommerce.checkout").controller("BillDataCtrl",["factorybShopBasket","$scope","formsSummary",function(e,t,r){$(".mod-stepper").on("open:formBillData",function(){var n=e.getOfferGroup(),i=t.formData.SHIPPING.shipping_type.val,o=t.formData.SHIPPING.shipping_locationType.val;if(t.formData.RECHNUNG.rechnung_salutation&&(t.formData.RECHNUNG.rechnung_salutation.val="Frau"),n.isVVL()||n.isBNT()||!n.isRedplus()||"Alternativ"!==i||"005"!==o&&"006"!==o){if(!n.isVVL()&&!n.isBNT()&&n.isRedplus()){var a;(a=r.getData().forms[r.getIndex("formBillData")]).skip=!1,a.status=!1,a.alterable=!0,a.displayName="Deine Geräte-Rechnung"}}else(a=r.getData().forms[r.getIndex("formBillData")]).skip=!0,a.status=!0,a.alterable=!1,a.displayName="Deine Geräte-Rechnung - nicht erforderlich",r.hideValidationMessages(),r.formValid(),r.next(!0),factoryTracking.trackNextItem(),$(".mod-stepper").trigger("open:"+r.getCurrentForm().name);var s="no";"Y"===t.formData.persdaten.belated_mnp_requested.val&&(s="yes"),VF&&(VF.oOrder=VF.oOrder||{}),VF.oOrder.numberPortability=s})}])}(),function(){"use strict";angular.module("ecommerce.checkout").controller("AccountDataCtrl",["$scope","factoryTotalCosts","factorybShopBasket","formsSummary","factoryTracking",function(e,t,r,n,i){var o=r.getOfferGroup();e.ultraCardWithHardware=o.isUltraCardWithHardware(),e.$watch("formData.DSL.dsl_paperbill.val",function(r){"Y"===r?(t.addBill(),e.addionalBasketItems&&(e.addionalBasketItems.bill=!0)):(t.removeBill(),e.addionalBasketItems&&(e.addionalBasketItems.bill=!1))}),$(".mod-stepper").on("open:formAccountData",function(){!e.isValidTransactionForSimplifiedCheckout&&o.isVVL()&&(n.hideValidationMessages(),n.formValid(),n.next(!0),i.trackNextItem(),$(".mod-stepper").trigger("open:"+n.getCurrentForm(
1).name))})}])}(),function(){"use strict";angular.module("ecommerce.checkout").controller("AgbDataCtrl",["$scope","formsSummary","factoryFormData","factorybShopBasket","factoryCommerceApi",function(e,t,r,n,i){var o=n.getOfferGroup();e.isUltraCard=o.isMultisim(),e.isDeviceFinance=n.getNestedProperty(o,"mainOffer.offerComponents.subscription._enrichedDataSubscription.isDeviceFinance"),e.modelAgb={agb:!1,onlineident:!1},e.modelWerbung={werbeKontakt:!1,werbeInfo:!1},$(".mod-stepper").on("open:formAgbData",function(){e.modelWerbung={werbeKontakt:!1,werbeInfo:!1};var o=r.getData();o.persdaten.persdaten_werbeInfo_BEW_version&&(o.persdaten.persdaten_werbeInfo_BEW_version.val=VF.oBEWWerbeInfoVersion),o.persdaten.persdaten_werbeKontakt_BEW_version&&(o.persdaten.persdaten_werbeKontakt_BEW_version.val=VF.oBEWWerbeKontaktVersion),e.hasInsurance||"001"===e.formData.persdaten.persdaten_identMethod.val||(t.getData().forms[t.getIndex("formAgbData")].status=!0,e.checkout.complete=!0);var a=n.get();VF.oOrder.hasGroebaDiscount=a.hasGroebaDiscount,e.validForm=!1,e.$watch("forms.formAgbData.$valid",function(r){r?(t.hideValidationMessages(),t.formValid(),t.last(),e.validForm=!0):(t.formInvalid(),t.last(),e.validForm=!0)}),e.$on("invalLastForm",function(){e.modelAgb.agb=!1,e.modelAgb.onlineident=!1,e.modelWerbung.werbeInfo=!1,e.modelWerbung.werbeKontakt=!1;var t=r.getData();t.persdaten.persdaten_werbeKontakt&&(t.persdaten.persdaten_werbeKontakt.val="N"),t.persdaten.persdaten_werbeInfo&&(t.persdaten.persdaten_werbeInfo.val="N"),r.setData(t)}),e.$watch("modelWerbung",function(e,t){var n=r.getData();n.persdaten&&n.persdaten.persdaten_werbeKontakt&&(e.werbeKontakt?(n.persdaten.persdaten_werbeKontakt.val="Y",VF&&VF.oOrder&&(VF.oOrder.BEWAllowDataUsage=!0)):(n.persdaten.persdaten_werbeKontakt.val="N",VF&&VF.oOrder&&(VF.oOrder.BEWAllowDataUsage=!1))),n.persdaten&&n.persdaten.persdaten_werbeInfo&&(e.werbeInfo?(n.persdaten.persdaten_werbeInfo.val="Y",VF&&VF.oOrder&&(VF.oOrder.BEWAllowContactMe=!0)):(n.persdaten.persdaten_werbeInfo.val="N",VF&&VF.oOrder&&(VF.oOrder.BEWAllowContactMe=!1))),e.werbeInfo&&!t.werbeInfo?i.setBewPageLayoutId(n,"checkbox").then(function(e){r.setData(e),r.broadcastData()}):!e.werbeInfo&&t.werbeInfo&&n.persdaten&&n.persdaten.persdaten_werbeInfo_BEW_pageLayoutId&&delete n.persdaten.persdaten_werbeInfo_BEW_pageLayoutId,r.setData(n),r.broadcastData()},!0)})}])}(),function(){"use strict";angular.module("ecommerce.checkout").directive("promoTeaserAccessibility",function(){return{restrict:"A",link:function(e,t){setTimeout(()=>{document.querySelectorAll(".btn-em.not-open-overlay").forEach(e=>{e.setAttribute("role","button")})},0)}}})}(),function(){"use strict";angular.module("ecommerce.checkout").directive("addressValidation",["$rootScope","factoryAddressValidation","factoryFormData","factoryIdentMeta",function(e,t,r,n){return{restrict:"A",scope:{avFirstname:"=",avLastname:"=",avCompanyname1:"=",avCompanyname2:"=",avStreet:"=",avHouseno:"=",avZip:"=",avCity:"=",avTouched:"=",avShow:"=",idForm:"@",avSohoType:"=",avIgnoreIdentMethod:"=",avHasmobile:"="},templateUrl:"/simplicity/ecommerce/ajax/html/snippets/data_addressvalidation.html",transclude:!0,link:function(i,o){var a=function(e){var r=t.getCorrectionResult();return!!(i.avStreet&&i.avHouseno&&i.avZip&&i.avCity)&&(i.avStreet!==r.street||i.avHouseno!==r.hn||i.avZip!==r.zip||i.avCity!==r.city||!0===e)},s=function(e){var t=r.getData();t.persdaten.persdaten_identMethod=e,r.setData(t),r.broadcastData()},c=function(r){i.avShow&&a(r)&&($(o).find(".av-loading").show(),t.init(i.avStreet,i.avHouseno,i.avZip,i.avCity,i.avFirstname,i.avLastname,i.avCompanyname1,i.avCompanyname2,i.avSohoType),t.getData().then(function(t){$(o).find("> div").hide(),"Ad.Po.200.1"===t.responseCode?($(o).find(".not-found-but-suggestion").show(),$(o).find(".new-address").html(t.correction.FUZZY_ADDRESS.STREETNAME+" "+t.correction.FUZZY_ADDRESS.HOUSENUMBER+", "+t.correction.FUZZY_ADDRESS.POSTCODE+" "+t.correction.FUZZY_ADDRESS.CITYNAME)):"Ad.Po.200.0"===t.responseCode?$(o).find(".checked").show():$(o).find(".not-found").show(),t.persdaten_identMethod&&!i.avIgnoreIdentMethod&&(s(t.persdaten_identMethod),t.identMeta&&(n.init(t.identMeta),e.$broadcast("identMethodChanged",{value:t.persdaten_identMethod.val,forBill:"formBillData"===i.idForm})))},function(t){t.persdaten_identMethod&&!i.avIgnoreIdentMethod&&(s(t.persdaten_identMethod),t.identMeta&&(n.init(t.identMeta),e.$broadcast("identMethodChanged",{value:t.persdaten_identMethod.val,forBill:"formBillData"===i.idForm}))),$(o).find("div.not-available").show()}).finally(function(){$(o).find(".av-loading").hide()})),i.avShow=!1};i.$watchGroup(["avFirstname","avLastname","avCompanyname1","avCompanyname2","avStreet","avHouseno","avZip","avCity","avTouched"],function(){setTimeout(function(){var e=!0;$("#"+i.idForm).find(".street,.hnr,.zip,.city").each(function(){$(this).hasClass("ng-valid")||(e=!1)}),i.avShow=e,i.$apply(),$("#"+i.idForm).find(".street,.hnr,.zip,.city").on("focus",function(){a()&&$(o).find("> div").hide()})},100)}),i.$watch("avSohoType",function(e){void 0!==e&&(i.avShow=!0,c(!0))}),setTimeout(function(){$("body").find("input").not(".firstname,.lastname,.companyname,.companyname2,.street,.hnr,.zip,.city").on("focus",function(){c()}),$("body").find(".firstname,.lastname,.companyname,.companyname2,.street,.hnr,.zip,.city").on("focusout",function(){""!==i.avStreet&&""!==i.avHouseno&&""!==i.avZip&&""!==i.avCity&&c()})},100),$("body").find('input[type="radio"]').on("click",function(){c()}),$("body").find("button").on("click",function(){c()}),$("body").find("button").on("mouseover",function(){c()}),$("body").find("button").on("focus",function(){c()}
1),$(o).find(".not-found-but-suggestion a.new-address").off("click").on("click",function(e){e.preventDefault();var r=t.getCorrectionResult();i.avStreet=r.street,i.avHouseno=r.hn,i.avZip=r.zip,i.avCity=r.city,i.$apply(),r.identMethod&&!i.avIgnoreIdentMethod&&s(r.identMethod),$(o).find(".not-found-but-suggestion").hide(),$(o).find(".changed").show()}),$(o).find(".not-found-but-suggestion a.hold-address").off("click").on("click",function(e){e.preventDefault(),$(o).find(".not-found-but-suggestion").hide()})}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").directive("iAutocomplete",["factoryAddressAutosuggest","$timeout",function(e,t){var r="iPostcodeQuery",n="iCityQuery",i="iStreetQuery",o="iAutocompleteType",a="city",s="streetName";return{restrict:"A",require:"ngModel",link:function(c,u,l,d){var p=l[o],f=null,h=null,m=!1,g=[],v=[],b=[],y=[],_=null,S=null,k=null,C=null,D=null,O=null,I=-1,w=null,T=!1;function P(){return l[o]===s?v:g}function A(e){return"streets"===e?!(!v||!v.length)&&v.some(function(e){return e.streetName!==C}):!(!g||!g.length)&&g.some(function(e){return e.city!==D})}function E(){c.$parent.$eval(l[n]+"=''"),c.$parent.$eval(l[i]+"=''"),c.$parent.$eval(l.iHnrQuery+"=''"),D=null,C=null,_=null,S=null,k=null,I=-1,w=null,g=[],v=[],b=[],y=[]}function M(e,t,r){if(!t)return e;var n=t.toLowerCase().trim();return e.filter(function(e){return"streets"===r?e.streetName&&-1!==e.streetName.toLowerCase().indexOf(n):e.city&&-1!==e.city.toLowerCase().indexOf(n)})}function N(e,t,r,n){var i=t.getElementsByTagName("span")[0];if(i.textContent=i.textContent,t.classList.remove("focus"),!e.length)return t.classList.remove("hidden"),void r.push(t);var o=-1!==i.textContent.toLowerCase().trim().indexOf(e);n&&!o||function(e,t){e.innerHTML=B(e.textContent,t)}(i,e),n?(t.classList.toggle("hidden",!o),o&&r.push(t)):r.push(t)}function B(e,t){if(!t)return e;var r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return e.replace(new RegExp("("+r+")","ig"),"<b>$1</b>")}if(c.$on("iAutocomplete:inputFocused",function(e,t,r){u[0]!==r[0]&&R()}),d){d.$viewChangeListeners.push(function(){!function(e){if(p===s){var t=angular.isString(e)&&e.length>0&&0===e.trim().length;d.$setValidity("whitespaceOnlyStreet",!t)}}(d.$viewValue)});var F=function(t){k=t,w=t;var i=c.$parent.$eval(l[r]),o=c.$parent.$eval(l[n]);e.init("streetName",i||null,o||null,t),e.getAutocompleteSuggestions().then(function(e){var t=e.data;y=t;var r=(d.$viewValue||"").trim();(v=M(t,r,"streets")).length>0&&$(u).is(":focus")&&L("streets")})},x=function(e,t){if("cities"===t)return"<span>"+e.city+"</span>";var r=d.$viewValue||"";return"<span>"+B(e.streetName,r)+"</span>"},R=function(){f&&h&&(I=-1,m=!1,$(u).attr({"aria-expanded":"false","aria-activedescendant":null}),f.removeClass("start enter exit"),h.empty())},L=function(e){if(f&&h&&$(u).is(":focus")&&!T){if(I=-1,h.empty(),m=!0,"cities"===e){var t=0,r=(d.$viewValue||"").trim(),n=M(b,r,"cities");if(0===(g=n).length)return void R();h.attr("id","city-listbox"),$(u).attr("aria-expanded","true");for(var i=0;i<n.length;i++)if(n[i].city!==D){var a=l[o]+"-option-"+i;(s=$('<li class="entry" id="'+a+'" role="option" tabindex="-1" data-index="'+i+'">'+x(n[i],"cities")+"</li>")).appendTo(h),t++,setTimeout(function(e){e.addClass("enter")}.bind(null,s),100*i+1)}if(!t)return void R();V(),f.addClass("start"),setTimeout(function(){f.addClass("enter"),f.find("li").addClass("enter")},1)}else{t=0,r=(d.$viewValue||"").trim(),n=M(y,r,"streets");if(0===(v=n).length)return void R();$(u).attr("aria-expanded","true"),h.attr("id","street-listbox");for(i=0;i<n.length;i++)if(n[i].streetName!==C){var s;a=l[o]+"-option-"+i;(s=$('<li class="entry" id="'+a+'" role="option" tabindex="-1" data-index="'+i+'">'+x(n[i],"streets")+"</li>")).appendTo(h),t++,setTimeout(function(e){e.addClass("enter")}.bind(null,s),100*i+1)}if(!t)return void R();!function(e,t){for(var r=(t||"").toLowerCase().trim(),n=[],i=0,o=v.length;i<o;i++){var a=h.find(".entry").get(i);a&&N(r,a,n,e)}}(!1,r),V(),f.addClass("start"),setTimeout(function(){f.addClass("enter"),f.find("li").addClass("enter")},1)}I=-1}},V=function(){h.on("mousedown",function(e){e.preventDefault()}),h.find(".entry").on("touchstart mousedown",function(e){var t=P()[$(this).data("index")];t?(R(),l[o]===s?(C=t.streetName,$(u).val(C)):l[o]===a&&(D=t.city,$(u).val(D)),$(u).trigger("change")):R()})};c.$watchGroup([function(){return c.$parent.$eval(l[r])},function(){return c.$parent.$eval(l[n])},function(){return c.$parent.$eval(l[i])}],function(r,i){var o=r[0],d=r[1],f=r[2],h=i[0],m=i[1];p===s&&m!==d&&(w=null,y=[],v=[]),O&&t.cancel(O),O=t(function(){if(p===a){if(/^\d{5}$/.test(o)&&o!==_)return _!==(t=o)&&(E(),R()),_=t,e.init("city",t,S||null,k),void e.getAutocompleteSuggestions().then(function(e){var t=e.data;b=t,g=t,1===t.length&&(S=t[0].city,c.$parent.$eval(l[n]+"='"+t[0].city+"'")),1<t.length&&$(u).is(":focus")&&L("cities")});if(0===(o||"").length&&(h||"")>0)return E(),void R();if(0===(r=(d||"").length))return D=null,void($(u).is(":focus")?L("cities"):R());d!==D&&(D=null)}var t;if(p===s){var r;if(0===(r=(f||"").length))return w=null,C=null,k=null,void($(u).is(":focus")?L("streets"):R());if(angular.isString(f)&&0===f.trim().length)return void R();C&&f!==C&&(C=null),r<3&&r;
1var i=/^[\u00C0-\u017FA-Za-z0-9][\u00C0-\u017FA-Za-z0-9 .-]{2}$/.test(f),m=3===r&&" "===f.charAt(0)&&2===f.trim().length;if(3===r&&(i||m)&&(w||"").toLowerCase()!==f.toLowerCase()){if(!/^\d{5}$/.test(o)&&!d)return;return F(f),void 0}!T&&r>0&&y.length&&$(u).is(":focus")&&L("streets")}},10)}),$.ajax({url:"/simplicity/ecommerce/ajax/html/snippets/form/input_autosuggest.html"}).done(function(e){f=$(e);var t=$('<div style="position:relative"></div>');$(u).wrap(t),f.insertAfter($(u)),h=f.find("ul")}),l[o]&&($(u).off("keyup"),$(u).off("keydown"),$(u).on("keydown",function(e){var t=h.find(".entry:not(.hidden)");switch(e.keyCode){case 38:case 40:if(e.preventDefault(),T=!0,!t.length)return;(I+=40===e.keyCode?1:-1)>=t.length&&(I=0),I<0&&(I=t.length-1),t.removeClass("focus");var r=t.eq(I).addClass("focus");$(u).attr("aria-activedescendant",r.attr("id")),t.attr("aria-selected","false"),r.attr("aria-selected","true"),function(e){if(e&&e.length){var t=e.data("index"),r=P()[t];r&&(l[o]===a&&($(u).val(r.city),d.$setViewValue(r.city)),l[o]===s&&($(u).val(r.streetName),d.$setViewValue(r.streetName)))}}(r),function(e){if(e&&e.length){var t=h[0],r=e[0],n=r.offsetTop,i=n+r.offsetHeight,o=t.scrollTop,a=o+t.clientHeight;n<o?t.scrollTop=n:i>a&&(t.scrollTop=i-t.clientHeight)}}(r);break;case 13:if(e.preventDefault(),e.stopPropagation(),I<0||!t.length)return;t.eq(I).trigger("mousedown"),R(),T=!1;break;case 27:e.preventDefault(),e.stopPropagation(),R(),T=!1}}),$(u).on("blur",function(){setTimeout(function(){var e=document.activeElement;h&&0===h.has(e).length&&R()},50)}),$(u).on("focus",function(){c.$root.$broadcast("iAutocomplete:inputFocused",p,u),l[o]===a&&A("cities")&&!m&&g.length&&L("cities"),l[o]===s&&A("streets")&&!m&&v.length&&L("streets")}),$(u).on("input",function(){T=!1,""===$(u).val()&&c.$applyAsync(function(){l[o]===a&&(D=null,R()),l[o]===s&&(C=null,R())})})),c.$on("$destroy",function(){$(u).off("keyup keydown input blur focus")})}}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").directive("aAutosuggestValidation",["$rootScope","factoryAddressAutosuggest","factoryFormData","factoryTracking","factorybShopBasket",function(e,t,r,n,i){return{restrict:"A",require:"ngModel",link:function(o,a,s,c){var u=i.getOfferGroup(),l=u?.mainOffer?.offerServices?.getNetflixServices()?.isNetflix,d={blurMap:{postcode:!1,city:!1,street:!1,hnr:!1},fieldValues:{postcode:null,city:null,street:null,hnr:null},hasChanged:!1,lastValidatedPayload:null,initialValidationDone:!1};function p(e){return e?o.$parent.$eval(e):null}function f(){var e=p(s.iPostcodeQuery),t=p(s.iCityQuery),r=p(s.iStreetQuery),n=p(s.iHnrQuery);return function(e,t,r,n){var i=angular.isString(r)&&r.trim().length>0;return/^\d{5}$/.test(e)&&angular.isString(t)&&t.length>1&&angular.isString(r)&&r.length>1&&i&&/^[a-zA-Z0-9\-_/ ]+$/.test(n)}(e,t,r,n)?{key:e+"|"+t+"|"+r+"|"+n,pc:e,city:t,street:r,hnr:n}:null}function h(i){t.init(null,i.pc,i.city,i.street,i.hnr);var o,a=!1;t.getAutocompleteSuggestions(!0).then(function(t){t.data.length>0?(o=t.data[0].addressId,r.getData().persdaten.persdaten_address_id.val=o,a="0"===o):(a=!0,r.getData().persdaten.persdaten_address_id.val=0),e.$broadcast("addressValidationResult",{isAddressInvalid:a}),l&&a&&n.trackError("technical","Deine Adresse nicht in unserer Adress-Datenbank gefunden","","","displayed","checkout")}).catch(function(t){a=!0,e.$broadcast("addressValidationResult",{isAddressInvalid:a}),!l||400!==t?.status&&500!==t?.status||n.trackError("technical","Wir haben leider ein technisches Problem.",t?.status,"","displayed","checkout")})}c&&s.iPostcodeQuery&&s.iCityQuery&&s.iStreetQuery&&s.iHnrQuery&&(o.$evalAsync(function(){if(!d.initialValidationDone){var e=f();e&&(d.initialValidationDone=!0,d.lastValidatedPayload=e.key,h(e))}}),o.$watch(function(){return c.$viewValue},function(e,t){e!==t&&(d.hasChanged=!0)}),a.on("blur",function(){o.$applyAsync(function(){var e=f();e&&e.key!==d.lastValidatedPayload&&(d.lastValidatedPayload=e.key,d.hasChanged=!1,h(e))})}),o.$on("$destroy",function(){a.off("blur")}))}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").directive("checkForInlineValidation",function(){return{restrict:"A",scope:{ngShow:"="},link:function(e){e.$on("formValidation",function(){})}}})}(),function(){"use strict";angular.module("ecommerce.checkout").directive("checkoutDatepicker",["factoryInstallationData",function(e){return{require:"?ngModel",restrict:"E",scope:{ngModel:"=",inputName:"@",required:"=",label:"@"},templateUrl:"/simplicity/ecommerce/ajax/html/snippets/data_datepicker.html",link:function(t,r,n,i){var o=function(){i.$setValidity("range",!0),i.$setValidity("weekend",!0),i.$setValidity("date",!0),t.ngModel.valid=!0},a=function(e){if(o(),!e)return i.$setValidity("date",!1),void(t.ngModel.valid=!1);var r=e.split("."),n=new Date(r[2],parseInt(r[1])-1,r[0]).getTime();return isNaN(n)?(i.$setValidity("date",!1),void(t.ngModel.valid=!1)):n<t.ngModel.from||n>t.ngModel.until?(t.ngModel.valid=!1,void i.$setValidity("range",!1)):6===new Date(n).getDay()||0===new Date(n).getDay()?(i.$setValidity("weekend",!1),void(t.ngModel.valid=!1)):void 0};
1t.$watch("ngModel.when",function(){o(),"now"!==t.ngModel.when&&a(t.ngModel.date),e.setData(t.ngModel)}),t.$watch("ngModel.date",function(){o(),"now"!==t.ngModel.when&&a(t.ngModel.date),e.setData(t.ngModel)});var s=new Date(t.ngModel.from),c=new Date(t.ngModel.until),u=new Pikaday({field:r.find(".datepicker")[0],format:"DD.MM.YYYY",firstDay:1,disableWeekends:!0,onSelect:function(e){t.ngModel.date=moment(e).format("DD.MM.YYYY"),t.$apply()}});u.gotoDate(s),u.setStartRange(s),u.setEndRange(c),u.setMinDate(s),u.setMaxDate(c)}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").directive("confirmIban",["factoryBankAccountValidation",function(e){return{restrict:"EA",scope:{ngIban:"@",ngBankname:"=",referenceModel:"="},template:'<div><a class="btn btn-alt" ng-click="confirm()">IBAN best&auml;tigen</a><img ng-show="loading" src="//www.vodafone.de/images/v5/bx_loader.gif" style="width: 16px"/><span ng-show="error"><br/>Wir k&ouml;nnen Deine Bankdaten gerade nicht automatisch &uuml;berpr&uuml;fen. Das hat keinen Einfluss auf Deine Bestellung.</span><span ng-show="result && !error"><i class="i-success-g-xsml"></i> <span style="color: green;"> Deine IBAN-Nummer wurde erfolgreich gepr&uuml;ft.</span><div style="margin-bottom: 10px;"></div><b>Kreditinstitut:</b><br /> {{ngBankname}}</div>',link:function(t){t.result=!1,t.invalidIban=!1,t.error=!1,t.confirm=function(){t.$parent.forms.formAccountData.iban.$touched=!0,t.$parent.forms.formAccountData.iban.$valid?(t.loading=!0,t.result=!1,t.error=!1,t.invalidIban=!1,t.$parent.ibanConfirmationFailed=!1,e.getIbanFromIban(t.ngIban).then(function(e){t.ngBankname=e.bankaccount.bankName,t.result=!0,t.error=!1,t.invalidIban=!1,t.$parent.ibanConfirmationFailed=!1},function(e){"Ba.Po.400.2"===e.responseCode?(t.invalidIban=!0,t.$parent.ibanConfirmationFailed=!0):t.error=!0}).finally(function(){t.loading=!1})):(t.result=!1,t.$parent.ibanConfirmationFailed=!1)},t.$watch("referenceModel.val",function(e){void 0===e&&(t.result=!1)})}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").directive("checkIban",["factoryBankAccountValidation","factoryFormData",function(e,t){return{restrict:"A",link:function(r,n,i){var o=!1,a=function(e){$(n).prop("disabled",!e)},s=function(e){o=e;var t=$("button");$(n).parent().parent().parent().find(t).prop("disabled",!e)},c=function(e){return!!/^[*][*][*][*][*][*][*][*][*][*][*][*][*][*][*][*][*][*]\d{4}$/.test(e)&&(a(!0),s(!0),u=!1,!0)},u=!1;s(!1);var l=function(i){var o,l;$("#ibanCheckSuccess").hide(),void 0===i&&(i=$(n).val()),i=i.replace(/\s+/g,""),s(!1),22===i.length&&(a(!1),l=(o=i).match(/.{1,4}/g).join(" ").toUpperCase(),u||(u=!0,r.$parent.ibanConfirmationFailed=!1,c(o)||($(".loading-spiner-holder").show(),e.getIbanFromIban(l).then(function(e){u=!1;var r=t.getData();r.BANK.bank_institut={},r.BANK.bank_institut.val=e.bankaccount.bankName,r.BANK.bank_iban.val=l,t.setData(r),s(!0),$("#ibanCheckSuccess").show()},function(e){u=!1,void 0!==e.data.responseCode&&"Ba.Po.400.2"===e.data.responseCode?r.$parent.ibanConfirmationFailed=!0:(r.$parent.ibanConfirmationFailed=!1,s(!0))}).finally(function(){a(!0),$(".loading-spiner-holder").hide()}))))};$(n).off("keyup"),$(n).off("keydown"),$(n).off("blur"),$(n).off("paste"),$(n).on("keyup",function(e){l()}),$(n).on("blur",function(){o||l()}),$(n).on("paste",function(e){if(!o)try{var t=(e.originalEvent.clipboardData||window.clipboardData).getData("text");l(t)}catch{}}),r.$watch("formData.BANK.bank_iban.val",function(e){void 0!==e&&c(e)}),$(n).parent().append('<div id="ibanCheckSuccess"><i class="i-success-g-xsml"></i> <p style="color: green;font-size: 14px !important;margin-left: 5px;margin-bottom:0;">Deine IBAN wurde erfolgreich geprüft.</p></div>'),$("#ibanCheckSuccess").hide()}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").directive("checkEmail",["factoryEmailValidation","$timeout",function(e,t){return{restrict:"A",link:function(r,n,i){var o=!1,a=function(e){$(n).prop("disabled",!e)},s=function(e){return!!/^(?!.{81,})['_a-zA-Z0-9-\+]+(\.['_a-zA-Z0-9-\+]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.([a-zA-Z]{2,63})$/.test(e)&&(a(!0),o=!1,!0)},c=function(t){o||s(t)&&(o=!0,a(!1),r.$parent.emailConfirmationFailed=!1,e.checkEmail(t).then(function(e){o=!1,r.$parent.emailConfirmationFailed=!1,e&&e.data&&e.data.status&&("invalid"!==e.data.status&&"trash-mail"!==e.data.status||(r.$parent.emailConfirmationFailed=!0))},function(e){o=!1,r.$parent.emailConfirmationFailed=!1,e&&e.data&&e.data.data&&e.data.data.status&&("invalid"!==e.data.data.status&&"trash-mail"!==e.data.data.status||(r.$parent.emailConfirmationFailed=!0))}).finally(function(){a(!0)}))};
1t(function(){var e=$(n).val();6<(e=e.replace(/\s+/g,"")).length&&c(e)},500);$(n).off("blur"),$(n).on("blur",function(e){var t;6<(t=(t=$(n).val()).replace(/\s+/g,"")).length&&c(t)}),r.$watch("formData.persdaten.persdaten_email.val",function(e){void 0!==e&&s(e)})}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").directive("checkPhonenumber",["factoryPhoneNumberValidation","factoryFormData","formsSummary","factoryTracking",function(e,t,r,n){return{require:"ngModel",restrict:"A",link:function(i,o,a,s){var c=!1,u=!1;i.$parent.$parent.phoneConfirmationFailed=!1,$(document).on("mousedown",".btn",function(){u=!0}),$(document).on("mouseup",function(){setTimeout(function(){u=!1},0)}),o.on("blur touchleave touchcancel",function(e){if(!u){var t=$(o).val();l(t)}}),o.on("keyup",function(){i.$parent.$parent.phoneConfirmationFailed=!1});var l=function(o){if(o=o.replace(/\s/g,""),!c&&0!==o.length&&!1!==s.$valid){c=!0,i.$parent.$parent.phoneConfirmationFailed=!1;var a=t.getData();e.checkNumber(o).then(function(e){var o=e.splittedPhoneNumber;a.persdaten.persdaten_contactNumber||(a.persdaten.persdaten_contactNumber={}),"0049"===o.countryCode?a.persdaten.persdaten_contactNumber.val=o.NDC+o.number:a.persdaten.persdaten_contactNumber.val=o.countryCode+o.NDC+o.number,t.setData(a),i.forms.formPersData.$valid&&"formPersData"===r.getCurrentForm().name&&u&&(r.hideValidationMessages(),r.formValid(),r.next(),!0===r.getDoTracking()&&n.trackNextItem(),$(".mod-stepper").trigger("open:"+r.getCurrentForm().name),r.setDoTracking(!0))},function(e){i.$parent.$parent.phoneConfirmationFailed=!0}).finally(function(){c=!1})}}}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").directive("errorBox",function(){return{restrict:"E",scope:{helperText:"@"},templateUrl:"/simplicity/ecommerce/ajax/html/snippets/data_error.html",transclude:!0,controller:["$scope",function(e){e.errors=[],this.$onInit=function(){this.addError=function(t){e.errors.push(t)},this.removeError=function(t){const r=e.errors.findIndex(e=>e.title===t.title);r>-1&&e.errors.splice(r,1)}}}]}})}(),function(){"use strict";angular.module("ecommerce.checkout").directive("errorItem",function(){return{restrict:"E",require:"^errorBox",scope:{inputInvalid:"=",title:"@",color:"@"},link:function(e,t,r,n){var i={title:e.title,color:e.color};e.$watch("inputInvalid",function(e){e?n.addError(i):n.removeError(i)})}}})}(),function(){"use strict";angular.module("ecommerce.checkout").directive("ibanConverter",["factoryBankAccountValidation",function(e){return{require:"?ngIban",restrict:"E",scope:{ngIban:"=",ngAccountname:"="},templateUrl:"/simplicity/ecommerce/ajax/html/snippets/ibanconverter.html",link:function(t,r){t.errorOccurs=!1,t.result=null;var n=r.find("form").eq(0).controller("form"),i=function(){n.$setUntouched(),t.errorOccurs=!1,t.result=null,t.ktnr="",t.blz=""};t.getiban=function(){t.errorOccurs=!1,e.getIbanFromKtnrAndBlz(t.ktnr,t.blz).then(function(e){t.result=e.bankaccount},function(){i(),t.errorOccurs=!0})},t.renew=function(){i()},t.saveiban=function(){t.ngIban=t.result.iban,t.ngAccountname=t.result.bankName,$("input#iban").trigger("focus")}}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").directive("iban",function(){return{require:"ngModel",restrict:"A",link:function(e,t,r,n){var i=function(e,t){t.$valid&&e.val(t.$modelValue.match(/.{1,4}/g).join(" ").toUpperCase())};setTimeout(function(){""!==n.$modelValue&&i(t,n)},50),t.on("focus",function(){setTimeout(function(){""!==n.$modelValue&&i(t,n)},50)}),t.on("blur",function(){n.$setViewValue(t.val().replace(/ /g,"").toUpperCase()),""!==t.val()&&i(t,n),e.$apply()})}}})}(),function(){"use strict";angular.module("ecommerce.checkout").directive("labelCheckbox",function(){return{restrict:"E",transclude:!0,scope:{cbModel:"=",cbClasses:"@"},template:'<label ng-click="clickFunc()" class="{{cbClasses}}" ng-class="{checked: cbModel.val===\'Y\'}" ng-transclude></label>',link:function(e){e.clickFunc=function(){"Y"===e.cbModel.val?e.cbModel.val="N":e.cbModel.val="Y"}}}})}(),function(){"use strict";angular.module("ecommerce.checkout").directive("loading",function(){return function(e,t){e.$on("bcstLoadingSpinner_show",function(){return t.show()}),e.$on("bcstLoadingSpinner_hide",function(){return t.hide()})}})}(),function(){"use strict";angular.module("ecommerce.checkout").directive("mobileValidation",["factoryNumberValidation","factoryFormData","formsSummary",function(e,t,r){return{restrict:"A",scope:{mvMobilenumberpers:"="}
1,link:function(n){var i=r.getCurrentForm();n.$parent.forms[i.name].mobileNumberPers.$setValidity("service",!0),n.$parent.forms[i.name].mobileNumberPers.$setUntouched(),n.$parent.forms[i.name].$setPristine();var o=t.getData();n.$watch("mvMobilenumberpers",function(){var a=function(e){if(void 0===e||0===e.length)return!1;var t,r,o=!1,a=!1,s=!0,c=!1,u=!1;n.$parent.forms[i.name].mobileNumberPers.$setValidity("service",!0),e.match(/\D/g)&&e.match(/[^0-9\/\-\\\(\) \+]/g)&&n.$parent.forms[i.name].mobileNumberPers.$setValidity("service",!1);var l=(t=e.replace(/\D/g,"")).indexOf("1");return 11>(t="0"+t.slice(l)).length&&(o=!0,s=!1),12<t.length&&(a=!0,s=!1),0===t.indexOf("01609")?(12<t.length&&(a=!0,s=!1),12>t.length&&(o=!0,s=!1),c=!0,r="0160",t=t.slice(-8)):0===t.indexOf("0176")?(12<t.length&&(a=!0,s=!1),12>t.length&&(o=!0,s=!1),c=!0,r="0176",t=t.slice(-8)):0===t.indexOf("015")?(12<t.length&&(a=!0,s=!1),12>t.length&&(o=!0,s=!1),r=t.slice(0,5),t=t.slice(5),u=!0):(s=!1,u=!0,7<t.length&&(l=t.length-7,r=t.slice(0,l),t=t.slice(-7),4!==r.length&&5!==r.length||(s=!0),-1===["01501","01502","01505","01508","0151","01520","01521","01522","01523","01525","01526","01529","01531","01551","01555","01556","01563","01566","01567","01570","01573","01575","01577","01578","01579","01588","01590","0160","0162","0163","0170","0171","0172","0173","0174","0175","0176","0177","0178","0179"].indexOf(r)&&(s=!1))),{ndc:r,countrycode:"049",number:t,original:e,cleanNumber:r+t,isGermanCountryCode:!1,isNumberToShort:o,isNumberToLong:a,isNumberValid:s,isCountryCodePresent:!1,numberLength8:c,numberLength7:u}}(n.mvMobilenumberpers);!0!==a.isNumberValid||!a.cleanNumber||11!==a.cleanNumber.length&&12!==a.cleanNumber.length?n.$parent.forms[i.name].mobileNumberPers.$setValidity("service",!1):function(i){var a=r.getCurrentForm();e.init(i.countrycode,i.ndc,i.number).then(function(e){n.$parent.forms[a.name].mobileNumberPers.$setValidity("service",!0),o.persdaten.persdaten_mobileNDC.val=i.ndc,o.persdaten.persdaten_mobileNumber.val=i.number,n.mvMobilenumberpers=i.cleanNumber,t.setData(o),t.broadcastData()},function(e){n.$parent.forms[a.name].mobileNumberPers.$setValidity("service",!0),e.ERRORS&&$.each(e.ERRORS,function(e,t){n.$parent.forms[a.name].mobileNumberPers.$setValidity("service",!1),"MNC0003"!==t.CODE&&"MNC0002"!==t.CODE||(i.isNdcValid=!1),"MNC9999"===t.CODE&&(i.serverError=!0)})})}(a)})}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").directive("modDialog",["$timeout","factorySessionTimer",function(e,t){return{restrict:"A",link:function(r,n){const i=n.attr("data-overlayid");let o=!0;if(i){let a=null;const s=(e,t)=>{e.addEventListener("keydown",e=>{if("Enter"===e.key||" "===e.key)return e.preventDefault(),void d(t)}),e.addEventListener("click",e=>{e.preventDefault(),d(t)})},c=e=>e.querySelectorAll('a[href], button:not([disabled]), textarea, input, select, [tabindex]:not([tabindex="-1"])');function u(){vf.overlay.openOverlayDirect(i),o=!1;const t=document.getElementById(i),r=t?.querySelector(".overlay-content"),n=c(t)[0],a=t.querySelector(".mod-overlay-close");if(a){const e=a.querySelector(".close-icon");e&&(e.setAttribute("aria-hidden",!0),e.setAttribute("focusable",!1))}e(()=>{t&&n&&(t.setAttribute("tabindex",-1),t.focus(),t._hasTrapFocus||(t.addEventListener("keydown",l),t.addEventListener("click",l),t._hasTrapFocus=!0),t&&t.addEventListener("click",e=>{e.target===t&&d(t)}),"contentBEW"!==i&&a&&s(a,t))},0),n&&t&&r&&(t.setAttribute("aria-labelledby",`overlay-${i}`),r.addEventListener("click",e=>{e.stopPropagation(),n.focus()}))}function l(e){const t=e.currentTarget,r=c(t);if(r&&t){const n=r[0],o=r[r.length-1],a=document.activeElement,c=Array.from(r).indexOf(a),u=t.querySelector(".mod-overlay-close");if("Tab"===e.key){if(0===r.length)return void e.preventDefault();e.shiftKey&&n.contains(a)?(e.preventDefault(),o&&o.focus()):o&&!e.shiftKey&&o.contains(a)?(e.preventDefault(),n.focus()):e.shiftKey&&c>0?(e.preventDefault(),r[c-1].focus()):e.shiftKey&&-1===c&&(e.preventDefault(),o.focus())}if("contentBEW"!==i&&u&&s(u,t),"keydown"===e.type&&27===e.which)return void d(t)}}function d(r){"contentBEW"!==i&&r&&(vf.overlay.closeOverlay(i),r.removeEventListener("keydown",l),r._hasTrapFocus=!1,document.getElementById(`overlay-${i}`)&&(a=document.getElementById(`overlay-${i}`),a.focus(),a.removeAttribute("id"),r.removeAttribute("aria-labelledby")),e(()=>{o=!0,t.isSessionTimerZero()&&location.reload()},500)),r.removeAttribute("tabindex")}
1n.on("click keydown",function(e){const t=32===e.which,r=13===e.which;"keydown"===e.type&&(t||r)&&e.preventDefault(),o&&("click"===e.type||"keydown"===e.type&&(t||r))&&(e.currentTarget.setAttribute("id",`overlay-${i}`),u())})}}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").directive("modTooltip",function(){return{restrict:"A",link:function(e,t){vf.tooltip.init($(t))}}})}(),function(){"use strict";angular.module("ecommerce.checkout").directive("modelToString",function(){return{restrict:"A",require:"ngModel",link:function(e,t,r,n){n.$formatters.push(function(e){return e=String(e)})}}})}(),function(){"use strict";angular.module("ecommerce.checkout").directive("multiPattern",function(){return{require:"ngModel",link:function(e,t,r,n){var i=/^[\x00-\xFF]*$/;n.$validators.customPattern=function(e){return!e||i.test(e)}}}})}(),function(){"use strict";angular.module("ecommerce.checkout").directive("lettersValidation",function(){return{require:"ngModel",link:function(e,t,r,n){var i=/[,.']/;n.$validators.customLetters=function(e){return!e||!i.test(e)}}}})}(),function(){"use strict";angular.module("ecommerce.checkout").directive("mvdChange",function(){return{restrict:"EA",replace:!0,template:'<span ng-show="scopeChanged" class="mvd-hint"><i class="i-error-r-xsml"></i> &Auml;nder Deine Daten bitte auch in MeinVodafone.</span>'}})}(),function(){"use strict";angular.module("ecommerce.checkout").directive("preventSubmitOnEnter",function(){return{restrict:"A",link:function(e,t){t.on("keypress",function(e){13!==e.keyCode||e.shiftKey||e.preventDefault()})}}})}(),function(){"use strict";angular.module("ecommerce.checkout").directive("slideToggle",function(){return{restrict:"A",scope:{value:"@",model:"="},link:function(e,t){e.model===e.value?$("#"+$(t).attr("slide-toggle")).show():$("#"+$(t).attr("slide-toggle")).hide(),t.on("click",function(){e.model!==e.value&&(e.model=e.value,e.$apply(),$(".slide-toggle:visible").hide(),$("#"+$(t).attr("slide-toggle")).slideDown())})}}})}(),function(){"use strict";angular.module("ecommerce.checkout").directive("trackValidation",["factoryTrackFormError",function(e){return{restrict:"A",link:function(t,r){t.$on("trackFormValidation",function(){setTimeout(function(){try{var t=r.find("input.has-error:eq(0)").attr("name"),n=r.find($(".error.fm-error").not(".ng-hide")).first().find("h4:visible").text();t&&n&&e.trackFormError(n,t)}catch(e){}},100)})}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").directive("validateForm",["formsSummary","factoryTracking","$rootScope","factorySessionTimer",function(e,t,r,n){return{restrict:"E",require:"^form",scope:{btnName:"@",ariaDescribedby:"@?"},template:'<button name="submit-1" type="submit" class="btn btn-sml" ng-click="validate();" ng-attr-aria-describedby="{{ariaDescribedby ? ariaDescribedby : undefined}}">{{btnName}}</button>',link:function(i,o,a,s){i.validate=function(){n.isSessionTimerZero()?r.isLoggedInUser?r.logout():location.reload():"function"==typeof r.continueShopping&&(r.isLoggedInUser?r.continueShoppingLoggedInUser():r.continueShopping()),s.$valid?($(".mod-stepper").trigger("close:"+e.getCurrentForm().name),e.hideValidationMessages(),e.formValid(),e.next(),!0===e.getDoTracking()&&t.trackNextItem(),$(".mod-stepper").trigger("open:"+e.getCurrentForm().name),e.setDoTracking(!0)):(e.formInvalid(),e.showValidationMessages(),r.$broadcast("formValidation"),r.$broadcast("trackFormValidation"))},i.$watch(s.$valid,function(t){t?(e.hideValidationMessages(),e.formValid()):e.formInvalid()})}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").directive("validateOnSubmit",["formsSummary",function(e){return{require:"?ngModel",scope:{untouch:"=",ngError:"=",referenceModel:"=",ngModel:"=",bToggle:"="},template:"",restrict:"A",link:function(t,r,n,i){t.$on("formValidation",function(){$(r).hasClass("ng-invalid")&&$(r).is(":visible")?$(r).addClass("has-error"):$(r).removeClass("has-error")}),t.$on("hideFormValidation",function(){$(r).removeClass("has-error")}),t.$on("untouch",function(){t.untouch.$setUntouched()}),t.$watch("referenceModel.ValidationPassed",function(n){n&&t.referenceModel&&"N"===t.referenceModel.ValidationPassed&&(i.$setValidity("ssv",!1),i.$setPristine(),e.isSSV()||(e.setCurrentForm($(r).parents("li.stepper-item").index()),e.formInvalid(),e.setSSV(!0),e.scrollto()))}),t.$watch("ngModel",function(){i.$valid&&r.removeClass("has-error")}),t.$watch("referenceModel.val",function(){r.hasClass("ng-invalid-ssv")&&(i.$setValidity("ssv",!0),e.setSSV(!1),t.referenceModel.ValidationPassed="Y")})}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").directive("validatePassword",["$timeout","factoryPasswordValidation",function(e,t){return{restrict:"A",scope:!0,templateUrl:"/simplicity/ecommerce/ajax/html/snippets/form/input_customer_password_pers.html",link:function(r){var n,i;r.passwordHasForbiddenValue=!1,r.passwordIsInvalid=!1;r.onFocusPaswordField=function(e){null!==e.target&&(n=e.target)},r.onChangePasswordField=function(){r.passwordHasForbiddenValue=!1,r.passwordIsInvalid=!1,r.forms.formPersData.$setValidity("kundenkennwort",!0),!n||""===n.value||6>n.value.length||10<n.value.length||(i&&e.cancel(i),i=e(function(){t.init(n.value),t.getData().then(null,function(e){"400.1"!==e.data.code&&"Password found"!==e.data.message||(r.passwordHasForbiddenValue=!0,r.forms.formPersData.$setValidity("kundenkennwort",!1))})},500))}}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").directive("infoIcon",function(){return{restrict:"A",template:'<span class="tt-handle"><svg class="i-xsml i-grey"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/simplicity/simplicity-smaller/svg
1s/svgdefs.svg#i-tooltip-sml"></use></svg></span>',link:function(e,t){vf.tooltip2.init($(t).parent())}}})}(),function(){"use strict";angular.module("ecommerce.checkout").directive("ariaInvalidAttr",function(){return{restrict:"A",require:["ngModel","^form"],link:function(e,t,r,n){var i=n[0],o=n[1];e.$watch(function(){return i.$invalid&&(i.$touched||o.$submitted)},function(e){t.attr("aria-invalid",e?"true":"false")})}}})}(),function(){"use strict";angular.module("ecommerce.checkout").directive("autoFocus",["$timeout",function(e){return{restrict:"A",link:function(t,r){r[0].hasAttribute("tabindex")||(r.attr("tabindex","-1"),e(function(){r[0].focus()},0))}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").directive("nationalityDropdown",["factoryFormData","$timeout",function(e,t){return{restrict:"A",templateUrl:"/simplicity/ecommerce/ajax/html/snippets/form/select_nationality_pers.html",link:function(r,n,i){r.nationalities=VF.const.nationalities;const o=n[0].getElementsByClassName("select-toggle")[0],a=n[0].getElementsByClassName("select-options")[0];a.dataset.selectedIndex=0;const s=n[0].getElementsByClassName("openSvg")[0],c=n[0].getElementsByClassName("closeSvg")[0];var u;t(function(){u=n[0].getElementsByClassName("select-option")}),r.htmlDecode=function(e){const t=document.createElement("textarea");return t.innerHTML=e,t.value};const l=function(){return"none"!==a.style.display},d=function(t){u[a.dataset.selectedIndex].classList.remove("option-focus"),a.dataset.selectedIndex=t;const n=u[t];n.focus(),n.scrollIntoView({block:"center"}),n.classList.add("option-focus"),o.value=n.textContent;const i=e.getData();i.persdaten.persdaten_nationality.val=r.htmlDecode(r.nationalities[t]),e.setData(i),e.broadcastData()},p=function(){a.style.display="block",c.style.display="none",s.style.display="inline"},f=function(){a.style.display="none",c.style.display="inline",s.style.display="none",window.setTimeout(function(){o.focus()},0)};r.handleBlurOnOption=function(e){var t=!1;if(e.relatedTarget)for(var r=0;r<u.length;r++)(u[r].isSameNode(e.relatedTarget)||o.isSameNode(e.relatedTarget))&&(t=!0);t||f()},r.handleClickOnToggle=function(e){l()?f():(p(),d(a.dataset.selectedIndex))},r.handleKeyUpOnToggle=function(e){27!==e.keyCode&&13!==e.keyCode||!l()?32!==e.keyCode&&13!==e.keyCode||l()||(p(),d(a.dataset.selectedIndex)):f()},r.handleClickOnOption=function(e){d(e.target.dataset.optionIndex),f()},r.handleKeyUpOnOption=function(e){13!==e.keyCode&&27!==e.keyCode||f()};const h=function(e,t){return(e%t+t)%t};r.navigateList=function(e){const t=parseInt(a.dataset.selectedIndex);switch(e.which){case 38:d(h(t-1,u.length));break;case 40:d(h(t+1,u.length))}}}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryAddressValidation",["$http","$q","$injector",function(e,t,r){var n=r.get("config"),i={street:"",housenumber:"",postalcode:"",city:"",firstname:"",lastname:"",companyName1:"",companyName2:"",sohoType:""},o={},a={street:"",hn:"",zip:"",city:""},s={};return{init:function(e,t,r,n,a,c,u,l,d){i.street=e,i.housenumber=t,i.postalcode=r,i.city=n,i.sohoType=d,d&&"big"===d?(i.companyName1=u,i.companyName2=l,delete i.firstname,delete i.lastname):(i.firstname=a,i.lastname=c,delete i.companyName1,delete i.companyName2),o={},s={}},getData:function(){var r=t.defer();return e({method:"post",url:n.apiURLs.ADDRESSVALIDATION,headers:{Accept:"application/json","Content-Type":"application/json"},data:{street:i.street,housenumber:i.housenumber,postalcode:i.postalcode,city:i.city,firstname:i.firstname,lastname:i.lastname,companyName1:i.companyName1,companyName2:i.companyName2,sohoType:i.sohoType}}).then(function(e){var t=e.data;t.correction&&(a.street=t.correction.FUZZY_ADDRESS.STREETNAME,a.hn=t.correction.FUZZY_ADDRESS.HOUSENUMBER,a.zip=t.correction.FUZZY_ADDRESS.POSTCODE,a.city=t.correction.FUZZY_ADDRESS.CITYNAME),r.resolve(t)},function(e){r.reject(e)}),r.promise},getResult:function(){return o},getCorrectionResult:function(){return a},getIdentMethod:function(){return s}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryAddressAutosuggest",["$http","$q","$injector",function(e,t,r){var n=r.get("config"),i={searchKey:"",postalCode:"",city:"",street:"",streetNumber:""};return{init:function(e,t,r,n,o){i.searchKey=e,i.postalCode=t,i.city=r,i.street=n,i.streetNumber=o},getAutocompleteSuggestions:function(r){var o=t.defer();if(i.postalCode||i.city){var a={searchKey:"postCodeOrCity",postCodeOrCity:i.postalCode||i.city};return"streetName"===i.searchKey&&(a.searchKey="streetName",a.streetName=i.street+"*",delete a.postCodeOrCity,i.postalCode&&(a.postCode=i.postalCode),i.city&&(a.city=i.city)),r&&!0===r&&(a={searchKey:"streetNr",postCode:i.postalCode,city:i.city,streetName:i.street,streetNr:i.streetNumber}),e({method:"POST",url:n.apiURLs.ADDRESS_AUTOSUGGEST+"/suggest",headers:{Accept:"application/json","Content-Type":"application/json","x-api-key":VF.const.apiKeys.AddressAutosuggest},data:a}).then(function(e){var t=e.data;o.resolve(t)},function(e){o.reject(e)}),o.promise}}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryPasswordValidation",["$http","$q","$injector",function(e,t,r){var n=r.get("config"),i={password:""};return{init:function(e){i.password=e},getData:function(){var r=t.defer();return e({method:"GET",url:n.apiURLs.PASSWORDVALIDATION+"?input="+i.password,headers:{Accept:"application/json","Content-Type":"application/json","x-api-key":VF.const.apiKeys.PDValidation}}).then(function(e){r.resolve(e.data)},function(e){r.reject(e)}).catch(function(e){r.reject(e)}),r.promise}}}])}(),function(){"use strict";
1angular.module("ecommerce.checkout").factory("factoryAffiliateCookieLogic",["factorybShopBasket","config",function(e,t){var r={b_id:"",shop_id:""};function n(e){r.b_id=e}function i(e){r.shop_id=e}function o(){n("1315"),i("1588")}return{init:function(){var t;if(e.getOfferGroup().isFaF())n("1440"),i("1690");else{var r=$.cookie("oshop"),a=$.cookie("inqSaleId"),s=$.cookie("oshopvo");if(null!==a)n("1750"),i("2592"),$.cookie("inqSaleId",null);else if(null!==r){var c=/b_id\|\|\d+/,u=/shopid\|\|\d+/;if(null!==r.match(c)||null!==r.match(u))null!==r.match(c)&&n(r.match(c)[0].replace(/^\D+/g,"")),null!==r.match(u)&&i(r.match(u)[0].replace(/^\D+/g,""));else if(s){var l=new Date;l.setTime(l.getTime()+6048e5);var d="expires="+l.toUTCString();document.cookie="oshop=queryparams||vfchannel||"+s+";domain=.vodafone.de;"+d+";path=/"}else"queryparams||vfchannel||1003"===(t=r)?(n("1749"),i("2591")):"queryparams||vfchannel||1002"===t?(n("1313"),i("1586")):"queryparams||vfchannel||1001"===t&&o()}else o()}},getData:function(){return""===r.b_id&&delete r.b_id,r.void=$.cookie(t.OMNICHANNEL.VOIDCOOKIE),r}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryBankAccountValidation",["$rootScope","$http","$q","$injector",function(e,t,r,n){var i=n.get("config"),o={},a=function(e,r,n){var o=n.replace(/ /g,"");return t({method:"post",url:i.apiURLs.BANKVALIDATION,headers:{Accept:"application/json","Content-Type":"application/json"},data:{bankIdentifier:r,accountNumber:e,iban:o}})};return{getIbanFromIban:function(e){var t=r.defer();return a("","",e).then(function(e){t.resolve(e.data)},function(e){t.reject(e)}),t.promise},getIbanFromKtnrAndBlz:function(e,t){var n=r.defer();return a(e,t,"").then(function(e){n.resolve(e.data)},function(e){n.reject(e)}),n.promise},setData:function(e){o=e},getData:function(){return o}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryEmailValidation",["$rootScope","$http","$q","$injector",function(e,t,r,n){var i=n.get("config"),o={};return{checkEmail:function(e){var n=r.defer();return function(e){return t({method:"post",url:i.apiURLs.EMAILVALIDATION,headers:{"Content-Type":"application/x-www-form-urlencoded"},data:{emailAddress:e,requester:"OLS"},transformRequest:function(e){var t=[];for(var r in e)t.push(encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t.join("&")}})}(e).then(function(e){n.resolve(e.data)},function(e){n.reject(e)}),n.promise},setData:function(e){o=e},getData:function(){return o}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryShippingMethods",["$rootScope","$http","$q","$injector",function(e,t,r,n){var i=n.get("config");return{getLocationTypes:function(e){var n=r.defer();return function(e){return t({method:"get",url:i.apiURLs.LOCATIONTYPES+"/"+e,headers:{"Content-Type":"application/x-www-form-urlencoded"}})}(e).then(function(e){n.resolve(e.data)},function(e){n.reject(e)}),n.promise}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryPhoneNumberValidation",["$rootScope","$http","$q","$injector",function(e,t,r,n){var i=n.get("config");return{checkNumber:function(e){var n=r.defer();return function(e){var r=i.apiURLs.PHONENUMBERVALIDATION;return t({method:"POST",url:r,headers:{Accept:"application/json","Content-Type":"application/json"},data:JSON.stringify({phonenumber:e.replace(/\s/g,"")})})}(e).then(function(e){n.resolve(e.data)},function(e){n.reject(e)}),n.promise}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryCommerceApi",["$http","$q","$injector","$timeout","factoryAffiliateCookieLogic","factorybShopBasket","factoryGigakombi","factoryFormData",function(e,t,r,n,i,o,a,s){var c=r.get("config"),u={Accept:"application/json","Content-Type":"application/json"},l="",d=null;return{ussaLogin:function(t){return e({method:"GET",params:{username:t},url:c.apiURLs.AUTHENTICATION_LOGGED_IN_V2,headers:u})},ussaLogout:function(){return e({method:"GET",url:c.USSA.logout})},mintLogout:function(){return e({method:"GET",url:c.MINT.logout})},getNba:function(){if(d)return d;var t=c.apiURLs.NBA;return".json"!==t.substr(-5)&&("secondcard"===window.currentBTX?t+="/redplus/all":"contractProlongation"===window.currentBTX?t+="/contractprolongation/all":"tariffChange"===window.currentBTX?t+="/tariffchange/"+o.getSalesChannel():"multicard"===window.currentBTX||"multicardContract"===window.currentBTX?t+="/multisim/all":t+="/all/all"),d=e({method:"GET",url:t,headers:u})},removeItemFromBasket:function(t){return e({method:"DELETE",url:c.apiURLs.PROPOSITIONS+"/"+t,headers:u})},putEmptyBasket:function(){return e({method:"PUT",url:c.apiURLs.BASKET,headers:u,data:{}})},clearBasketByProposition:function(){return e({method:"DELETE",url:c.apiURLs.PROPOSITIONS,headers:u})},putBasketDecode:function(r){return r.VVL?this.getNba().then(function(t){var n="STD";return $.each(t.data.vvlEligibility.eligiblity,function(e,t){"Y"===t&&(n=e)}),r.VVL.PROLONGATIONTYPE=n,e({method:"PUT",url:c.apiURLs.BASKET,headers:u,data:JSON.stringify(r)})},function(e){return t(function(t,r){r(e)})}):e({method:"PUT",url:c.apiURLs.BASKET,headers:u,data:JSON.stringify(r)})},putBasket:function(e){if(void 0===e||""===e||null===e)return t(function(e){e()});var r=e.match(/(.*)[\?&]/);r&&r[1]&&(e=r[1]),l=decodeURIComponent(atob(e));var n=JSON.parse(l),i=this;return generalOfferService.getOfferGroupByShopBasket(n,!0).then(function(e){if(void 0===e)return t(function(e){e()});var r=a.getGigakombiDiscounts();if(0<r.length)for(var s=0;s<r.length;s++)e.mainOffer.offerServices.addSelectedService(r[s]);return e.isVVL()||e.isInlife()||e.isRedplus()||e.isStone()||e.isMultisim()?i.getNba().then(function(r){if(e.isVVL()){var i="STD";$.each(r.data.vvlEligibility.eligiblity,function(e,t){"Y"===t&&(i=e)}),e.prolongationType=i,e.cellcode=r.data.vvlEligibility.cellcode}else if(e.isInlife())e.cellcode=r.data.inlifeTariffChangeEligibility.cellcode;else if(e.isRedplus()){var a=r.data.redplusEligibility,s=r.data.currentTariff;if("O"!==a.memberType||0>=a.vacantSlots)return t(function(e,t){t({status:401,responseText:JSON.stringify({basket:n})})});if(s){var c=generalOfferService.subscriptionRepo.getAtomicSubscriptionIdByKiasId(s);
1void 0!==c&&(e.mainOffer.offerDependencies.offerDependencyValues=[new OfferDependencyValue("subscriptionId",String(c))],e.mainOffer.offerCosts.calculateCost(),e.offerGroupCosts.calculateCosts(),o.setOfferGroup(e))}"B"!==r.data.accountType&&"S"===r.data.accountType||!function(e){if(void 0===e)return!1;for(var t=e.length,r=0;r<t;r++)if("SOHOV15_1"===e[r].backendId||"SOHOV15"===e[r].backendId)return!0;return!1}(r.data.currentServices)||(e.salesChannel="Online.SoHo")}else(e.isStone()||e.isMultisim())&&("B"!==r.data.accountType&&"S"!==r.data.accountType||(e.salesChannel="Online.SoHo"));return e.customerSegment=r.data.customerSegment,basketFactory.putOfferGroupIntoBasket(e),basketFactory.sendBasketToShopBackend()},function(e){return t(function(t,r){r({status:401,responseText:JSON.stringify({responseCode:e.data.responseCode,description:e.data.description,basket:n})})})}):(basketFactory.putOfferGroupIntoBasket(e),basketFactory.sendBasketToShopBackend())},function(e){return t(function(t,r){r(e)})})},addToBasketDecode:function(t){return e({method:"POST",url:c.apiURLs.PROPOSITIONS,headers:u,data:JSON.stringify(t)})},getCheckout:function(t){return e(void 0!==t?{method:"GET",url:t}:{method:"GET",url:t||c.apiURLs.CHECKOUT})},getBasketObj:function(){return btoa(JSON.stringify(JSON.parse(l)))},getAvailableShippingOptions:function(t,r,n){return e({method:"PUT",url:c.apiURLs.SHIPPINGOPTIONS,headers:u,data:{IdentMethod:t,PLZ:r,DestinationTypeID:n}})},contractSummaryCheckStatus:function(){return e({method:"GET",url:c.CONTRACTSUMMARY.STATUS,headers:u,data:{}})},contractSummaryGenerate:function(){const t={BASKET:o.get()};s.getData().SHIPPING&&s.getData().SHIPPING.shipping_selectedOption&&s.getData().SHIPPING.shipping_selectedOption.val&&(t.shippingOptions=s.getData().SHIPPING.shipping_selectedOption.val);const r=$.cookie(c.CONTRACTSUMMARY.GIGAKOMBICOOKIE);return r&&(t.customerInformation=r),e({method:"POST",url:c.CONTRACTSUMMARY.GENERATE,headers:{"Content-Type":"application/x-www-form-urlencoded"},data:t,transformRequest:function(e){var t=[];for(var r in e)"string"==typeof e[r]||e[r]instanceof String?t.push(encodeURIComponent(r)+"="+encodeURIComponent(e[r])):t.push(encodeURIComponent(r)+"="+encodeURIComponent(JSON.stringify(e[r])));return t.join("&")}})},contractSummaryDownload:function(t){return e({method:"POST",url:c.CONTRACTSUMMARY.DOWNLOAD,headers:{"Content-Type":"application/x-www-form-urlencoded"},data:{requestId:t},transformRequest:function(e){var t=[];for(var r in e)t.push(encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t.join("&")}})},putCheckout:function(t,r){var n={Accept:"application/json","Content-Type":"application/json; charset=utf-8"},i=sessionStorage.getItem("SAILS_BNT"),a=!1;if(i){var s=JSON.parse(i);a=Boolean(s.mnpStatus),t.persdaten.belated_mnp_requested.val=a?"Y":"N"}if(r){const i={contractSummaryReferenceId:r,basket:o.get(),formData:t},a=$.cookie(c.CONTRACTSUMMARY.GIGAKOMBICOOKIE);return a&&(i.customerInformation=a),e({method:"PUT",url:c.apiURLs.CHECKOUT,headers:n,data:i})}return e({method:"PUT",url:c.apiURLs.CHECKOUT,headers:n,data:{basket:o.get(),formData:t}})},postOrder:function(){return e({method:"POST",url:c.apiURLs.ORDER,headers:u,data:i.getData()})},setBewPageLayoutId:function(r,n){if(!r||!r.persdaten)return t.resolve(r);return e({method:"GET",url:c.apiURLs.BEW_PAGE_IDENTIFIER,headers:u}).then(function(e){return function(e,t,r){var n=null;e.data&&Array.isArray(e.data.PAGE_IDENTIFIER)&&(n=e.data.PAGE_IDENTIFIER.filter(function(e){return"C_C"===e.channel}));const i=n?.find(e=>"BEWPopup"===e?.screen_id)?.PAGE_ID,o=n?.find(e=>"BEWPopup"!==e?.screen_id)?.PAGE_ID,a="popup"===r?i:o;return a?(t.persdaten.persdaten_werbeInfo_BEW_pageLayoutId={val:a,valiURI:"",min:1,max:20,mand:"Y",type:"string",ro:"N"},t.persdaten.persdaten_BEW_pageLayoutId={val:a,valiURI:"",min:1,max:20,mand:"Y",type:"string",ro:"N"}):t.persdaten.persdaten_werbeInfo_BEW_pageLayoutId={val:"DEFAULT_ID",valiURI:"",min:1,max:20,mand:"Y",type:"string",ro:"N"},t}(e,r,n)}).catch(function(e){return t.reject(e)})},postOrderUpdate:function(t,r,n){return this.setBewPageLayoutId(t,"popup").then(function(t){return e({method:"POST",url:c.apiURLs.ORDER_UPDATE,headers:u,data:{formData:{persdaten:{persdaten_werbeInfo:t.persdaten.persdaten_werbeInfo,persdaten_werbeInfo_BEW_version:t.persdaten.persdaten_werbeInfo_BEW_version,persdaten_BEW_pageLayoutId:t.persdaten.persdaten_werbeInfo_BEW_pageLayoutId}},orderID:r,orderToken:n}})})},keepSessionAlive:function(){return e({method:"GET",url:c.MINT.keppAlive,headers:u})}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryCutOffTime",function(){var e;return{setCutOffTime:function(t){e=t},getCutOffTime:function(){return e},cutOffTimeToString:function(){return(10>e.getDate()?"0"+e.getDate():e.getDate())+"."+(10>e.getMonth()+1?"0"+(e.getMonth()+1):e.getMonth()+1)+"."+e.getFullYear()+" "+(10>e.getHours()?"0"+e.getHours():e.getHours())+":"+(10>e.getMinutes()?"0"+e.getMinutes():e.getMinutes())}}})}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryDate",function(){var e=function(e,t){return $.map($(Array(e)),function(e,r){return(r+t).toString()}).reverse()},t=function(){return $.map($(Array(31)),function(e,t){return("0"+(t+1)).slice(-2).toString()})};return{getBirthdayRange:function(r,n){return{years:e(r.getYear()-n,1900),months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],days:t()}},getDateInFuture:function(r,n){return{years:e(n,r.getFullYear()),months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],days:t()}}}})}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryDeltaDays",function(){return{getDelta:function(e,t){if(!e||!t)return null;var r=new Date(e.getFullYear(),e.getMonth(),e.getDate()),n=new Date(t.getFullYear(),t.getMonth(),t.getDate());return Math.round(Math.abs(r-n)/864e5)}}})}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryDistrictcourts",["$rootScope","$http","$q","$injector",function(e,t,r,n){var i=n.get("config"),o=function(){return JSON.parse('[{"city":"Aachen","id":1},{"city":"Altenburg","id":2},{"city":"Amberg","id":3},{"city":"Ansbach","id":4},{"city":"Apolda","id":5},{"city":"Arnsberg","id":6},{"city":"Arnstadt","id":7},{"city":"Arnstadt Zweigstelle Ilmenau","id":8},{"city":"Aschaffenburg","id":9},{"city":"Augsburg","id":10},{"city":"Aurich","id":11},{"city":"Bad Hersfeld","id":12},{"city":"Bad Homburg v.d.H.","id":13}
1,{"city":"Bad Kreuznach","id":14},{"city":"Bad Oeynhausen","id":15},{"city":"Bad Salzungen","id":16},{"city":"Bamberg","id":17},{"city":"Bayreuth","id":18},{"city":"Berlin (Charlottenburg)","id":19},{"city":"Bielefeleld","id":20},{"city":"Bochum","id":21},{"city":"Bonn","id":22},{"city":"Braunschweig","id":23},{"city":"Bremen","id":24},{"city":"Chemnitz","id":25},{"city":"Coburg","id":26},{"city":"Coesfeld","id":27},{"city":"Cottbus","id":28},{"city":"Darmstadt","id":29},{"city":"Deggendorf","id":30},{"city":"Dortmund","id":31},{"city":"Dresden","id":32},{"city":"Duisburg","id":33},{"city":"Düren","id":34},{"city":"Düsseldorf","id":35},{"city":"Eisenach","id":36},{"city":"Erfurt","id":37},{"city":"Eschwege","id":38},{"city":"Essen","id":39},{"city":"Flensburg","id":40},{"city":"Frankfurt am Main","id":41},{"city":"Frankfurt/Oder","id":42},{"city":"Freiburg","id":43},{"city":"Friedberg","id":44},{"city":"Fritzlar","id":45},{"city":"Fulda","id":46},{"city":"Fürth","id":47},{"city":"Gelsenkirchen","id":48},{"city":"Gera","id":49},{"city":"Gießen","id":50},{"city":"Gotha","id":51},{"city":"Göttingen","id":52},{"city":"Greiz","id":53},{"city":"Gütersloh","id":54},{"city":"Hagen","id":55},{"city":"Hamburg","id":56},{"city":"Hamm","id":57},{"city":"Hanau","id":58},{"city":"Hannover","id":59},{"city":"Heilbad Heiligenstadt","id":60},{"city":"Hildburghausen","id":61},{"city":"Hildesheim","id":62},{"city":"Hof","id":63},{"city":"Homburg","id":64},{"city":"Ingolstadt","id":65},{"city":"Iserlohn","id":66},{"city":"Jena","id":67},{"city":"Kaiserlautern","id":68},{"city":"Kassel","id":69},{"city":"Kempten (Allgäu)","id":70},{"city":"Kiel","id":71},{"city":"Kleve","id":72},{"city":"Koblenz","id":73},{"city":"Köln","id":74},{"city":"Königstein","id":75},{"city":"Korbach","id":76},{"city":"Krefeld","id":77},{"city":"Landau","id":78},{"city":"Landshut","id":79},{"city":"Langenfeld","id":80},{"city":"Lebach","id":81},{"city":"Leipzig","id":82},{"city":"Lemgo","id":83},{"city":"Limburg","id":84},{"city":"Lübeck","id":85},{"city":"Ludwigshafen a.Rhein","id":86},{"city":"Lüneburg","id":87},{"city":"Mainz","id":88},{"city":"Mannheim","id":89},{"city":"Marburg","id":90},{"city":"Meiningen","id":91},{"city":"Memmingen","id":92},{"city":"Merzig","id":93},{"city":"Mönchengladbach","id":94},{"city":"Montabaur","id":95},{"city":"Mühlhausen","id":96},{"city":"München","id":97},{"city":"Münster","id":98},{"city":"Neubrandenburg","id":99},{"city":"Neunkirchen","id":100},{"city":"Neuruppin","id":101},{"city":"Neuss","id":102},{"city":"Nordhausen","id":103},{"city":"Nürnberg","id":104},{"city":"Offenbach am Main","id":105},{"city":"Oldenburg","id":106},{"city":"Osnabrück","id":107},{"city":"Ottweiler","id":108},{"city":"Paderborn","id":109},{"city":"Passau","id":110},{"city":"Pinneberg","id":111},{"city":"Pößneck","id":112},{"city":"Pößneck Zweigstelle Bad Lobenstein","id":113},{"city":"Potsdam","id":114},{"city":"Recklinghausen","id":115},{"city":"Regensburg","id":116},{"city":"Rostock","id":117},{"city":"Rudolstadt","id":118},{"city":"Saarbrücken","id":119},{"city":"Saarlouis","id":120},{"city":"Schweinfurt","id":121},{"city":"Schwerin","id":122},{"city":"Siegburg","id":123},{"city":"Siegen","id":124},{"city":"Sömmerda","id":125},{"city":"Sondershausen","id":126},{"city":"Sonneberg","id":127},{"city":"St. Ingbert","id":132},{"city":"St. Wendel","id":136},{"city":"Stadthagen","id":128},{"city":"Stadtroda","id":129},{"city":"Steinfurt","id":130},{"city":"Stendal","id":131},{"city":"Stralsund","id":133},{"city":"Straubing","id":134},{"city":"Stuttgart","id":135},{"city":"Suhl","id":137},{"city":"Tostedt","id":138},{"city":"Traunstein","id":139},{"city":"Ulm","id":140},{"city":"Völklingen","id":141},{"city":"Walsrode","id":142},{"city":"Weiden i.d.OPf.","id":143},{"city":"Weimar","id":144},{"city":"Wetzlar","id":145},{"city":"Wiesbaden","id":146},{"city":"Wittlich","id":147},{"city":"Wuppertal","id":148},{"city":"Würzburg","id":149},{"city":"Zweibrücken","id":150}]')};return{getDistrictcourts:function(){var e,n=r.defer();return(e=i.apiURLs.DISCTRICTCOURTS,t({method:"GET",url:e,headers:{Accept:"application/json","Content-Type":"application/json"}})).then(function(e){var t=e.data;(!Array.isArray(t)||0>=t.length||void 0===t[0].city)&&(t=o()),n.resolve(t)},function(){n.resolve(o())}),n.promise}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryDifferentInstallationName",function(){var e={};return{setData:function(t){e=t},costumerUseDifferentInnstallationName:function(){return"Y"===e.val}}})}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryFormData",["$rootScope",function(e){var t,r=function(e,t,r,n,i,o,a){return{val:e,valiURI:t,min:r,max:n,mand:i,type:o,ro:a}};return{setData:function(e){t=e},getData:function(){return t},broadcastData:function(){e.$broadcast("bcstFormData")}
1,getSohoType:function(){return e="persdaten_sohoType",t.persdaten&&t.persdaten[e]?t.persdaten[e].val:"";var e},addVoucherData:function(e,n,i){const o={voucherCode:r(e,"",0,20,"N","string","N"),campaignId:r(i,"",0,20,"N","string","N"),isUnique:r(n,"",1,1,"Y","selection[1|0]","N")};t.voucherData=o}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("formsSummary",["$rootScope",function(e){var t={error:!1,current:0,type:"",forms:[],ssv:!1,stateName:"",stateDanke:"",doTracking:!0,htmlVersion:1,basketVersion:"V2"};return{init:function(){t={error:!1,current:0,type:"",forms:[],ssv:!1,stateName:"",stateDanke:"",doTracking:!0,htmlVersion:1,basketVersion:"V2"}},setDoTracking:function(e){t.doTracking=e},setForm:function(e){t.forms.push(e)},error:function(){t.error=!0},setCurrentForm:function(e){t.current=e},next:function(r){for(t.current++;t.current&&t.forms[t.current]&&t.forms[t.current].skip;)t.current++;e.$broadcast("nextForm"),e.$broadcast("checkCompleteValidity"),!0!==r&&this.scrollto()},last:function(){e.$broadcast("lastForm")},scrollto:function(){setTimeout(function(){var e=10;e="mobile"===vf.util.layout(!0)?$("#stickybar.isSticky").height()+50:$("#stickybar.isSticky").height()?$(".stickyBox").height()+40:$(".stickyBox").height()+150,vf.util.scrollto($(".checkout-content li.active"),e)},50)},getDoTracking:function(){return t.doTracking},getCurrentForm:function(){return t.forms[t.current]},getIndex:function(e){for(var r=0;r<t.forms.length;r++)if(t.forms[r].name===e)return r;return!1},getFormByName:function(e){return t.forms[this.getIndex(e)]},getCurrentIndex:function(){return t.current},toggleCurrentFormStatus:function(r){t.forms[t.current].status=r,e.$broadcast("nextForm")},formInvalid:function(){t.forms[t.current].status=!1,e.$broadcast("checkCompleteValidity")},formValid:function(){t.forms[t.current]&&(t.forms[t.current].status=!0),e.$broadcast("checkCompleteValidity")},showValidationMessages:function(){t.current&&t.forms[t.current]&&(t.forms[t.current].showValidationMessages=!0);setTimeout(function(){var e=125,t=$(".alert.error:visible:eq(0)");"mobile"===vf.util.layout(!0)&&(e=50),t.length&&$("html, body").animate({scrollTop:t.offset().top-e},"slow")},50)},hideValidationMessages:function(){t.forms[t.current]&&(t.forms[t.current].showValidationMessages=!1)},getData:function(){return t},isFormComplete:function(){for(var e=0;e<t.forms.length;e++)if(!1===t.forms[e].status)return!1;return!0},isSingleFormComplete:function(e){return!0===t.forms[e].status},disbaleNextForms:function(r){for(var n=r;n<t.forms.length;n++)t.forms[n].status=!1,t.forms[n].skip=!1;e.$broadcast("checkCompleteValidity"),e.$broadcast("invalLastForm")},setSSV:function(r){if(t.ssv=r,t.ssv){for(var n=t.current;n<t.forms.length;n++)t.forms[n].status=!1;for(n=0;n<t.current;n++)t.forms[n].status=!0}e.$broadcast("invalLastForm")},isSSV:function(){return t.ssv},setStateName:function(e){t.stateName=e},setStateDanke:function(e){t.stateDanke=e},getStateName:function(){return t.stateName},getStateDanke:function(){return t.stateDanke},getFormsLength:function(){return t.forms.length},setHtmlVersion:function(e){1!==e&&2!==e||(t.htmlVersion=e)},getHtmlVersion:function(){return t.htmlVersion}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("Form",function(){var e=function(e,t,r){this.name=e,this.displayName=t,this.stepName=r,this.status=!1,this.showValidationMessages=!1,this.alterable=!0,this.skip=!1,this.hideIt=!1,this.index=null};return e.prototype.setAlterable=function(e){this.alterable=e},e})}(),function(){"use strict";angular.module("ecommerce.checkout").factory("checkoutFormBuilder",["factorybShopBasket","factoryFormData","factoryNbaData","$state","factoryTrackFormError","factoryTracking","formsSummary","Form",function(e,t,r,n,i,o,a,s){return{buildCheckoutForms:function(i,c){var u,l,d,p,f,h,m,g=e.getOfferGroup(),v=!0,b=!0;if("object"!=typeof t.getData().SHIPPING.shipping_selectedOption&&(b=!1,v=!1),a.init(),a.setHtmlVersion(2),window.newBasket="true",i.basket.SECONDCARD&&(window.currentBTX="secondcard",a.setStateName("checkout.redplus"),a.setStateDanke("danke.redplus"),u=new s("formPersData","Deine persönlichen Daten","customer"),a.setForm(u),l=new s("formIdentData","Identifikation","online ident"),a.setForm(l),v&&(d=new s("formShipData","Deine Lieferadresse","customer address"),a.setForm(d)),b&&(p=new s("formShipOptionsData","Dein Liefertermin","delivery options"),a.setForm(p)),!1===g.isSimOnly()&&(f=new s("formBillData","Deine Geräte-Rechnung","billing address"),a.setForm(f)),h=new s("formAccountData","Deine Zahlungsart","payment"),a.setForm(h),m=new s("formAgbData","Allgemeine Geschäftsbedingungen","summary"),a.setForm(m)),i.basket.VVL&&(window.currentBTX="contractProlongation",a.setStateName("checkout.vvl"),a.setStateDanke("danke.vvl"),u=new s("formPersData","Deine persönlichen Daten","customer"),a.setForm(u),g.isVVL()&&g.hasAdditionalRedplusOffers()&&(l=new s("formIdentData","Identifikation","online ident"),a.setForm(l)),v&&(d=new s("formShipData","Deine Lieferadresse","customer address"),a.setForm(d)),b&&(p=new s("formShipOptionsData","Dein Liefertermin","delivery options"),a.setForm(p)),h=new s("formAccountData","Deine Zahlungsart","payment"),a.setForm(h),m=new s("formAgbData","Allgemeine Geschäftsbedingungen","summary"),a.setForm(m)),i.basket.multicardContract&&(window.currentBTX="multicardContract",a.setStateName("checkout.multicardcontract"),a.setStateDanke("danke.multicardcontract"),u=new s("formPersData","Deine persönlichen Daten","customer"),a.setForm(u),l=new s("formIdentData","Identifikation","online ident"),a.setForm(l),v&&(d=new s("formShipData","Deine Lieferadresse","customer address"),a.setForm(d)),b&&(p=new s("formShipOptionsData","Dein Liefertermin","delivery options"),a.setForm(p)),h=new s("formAccountData","Deine Zahlungsart","payment"),a.setForm(h),m=new s("formAgbData","Allgemeine Geschäftsbedingungen","summary"),a.setForm(m)),!i.basket.HARDWAREONLY||void 0!==i.basket.NEW&&0!==i.basket.NEW.length||void 0!==i.basket.VVL||void 0!==i.basket.ultraCard||(window.currentBTX="hardware",a.setStateName("checkout.hardwareonly"),a.setStateDanke("danke.hardwareonly"),u=new s("formPersData","Lieferanschrift","customer"),a.setForm(u),h=new s("formAccountData","Bankverbindung","payment"),a.setForm(h),m=new s("formAgbData","Allgemeine Geschäftsbedingungen","summary"),a.setForm(m)),i.basket.ultraCard&&(a.setStateName("checkout.multisim"),a.setStateDanke("danke.multisim"),u=new s("formPersData","Deine persönlichen Daten","customer"),a.setForm(u),b&&(p=new s("formShipOptionsData","Dein Liefertermin","delivery options"),a.setForm(p)),h=new s("formAccountData","Deine Zahlungsart","payment"),a.setForm(h),m=new s("formAgbData","Allgemeine Geschäftsbedingungen","summary"),a.setForm(m),o.setFormType("application")),i.basket.NEW&&0<i.basket.NEW.length){window.currentBTX="newContract";var y="checkout.bnt";g.isEnterprise()&&(y="checkout.enterprise"),g.isSoHo()&&(y="checkout.bntsoho"),a.setStateName(y),a.setStateDanke("danke.bnt"),u=new s("formPersData","Deine Daten","customer"),a.setForm(u),l=new s("formIdentData","Identifikation","online ident"),a.setForm(l),v&&(d=new s("formShipData","Deine Lieferadresse","customer address"),a.setForm(d)),b&&(p=new s("formShipOptionsData","Dein Liefertermin","delivery options"),a.setForm(p)),f=new s("formBillData","Deine Rechnung","bill"),a.setForm(f),h=new s("formAccountData","Deine Zahlungsart","payment"),a.setForm(h),m=new s("formAgbData","Allgemeine Geschäftsbedingungen","summary"),a.setForm(m)}if(i.basket.tariffChange&&(window.currentBTX="tariffChange",a.setStateName("checkout.tw"),a.setStateDanke("danke.inlife"),u=new s("formPersData","Deine persönlichen Daten","customer"),a.setForm(u),g.isInlife()&&g.hasAdditionalRedplusOffers()&&(l=new s("formIdentData","Identifikation","online ident"),a.setForm(l),v&&(d=new s("formShipData","Deine Lieferadresse","customer address"),a.setForm(d)),b&&(p=new s("formShipOptionsData","Dein Liefertermin","delivery options"),a.setForm(p))),h=new s("formAccountData","Deine Zahlungsart","payment"),a.setForm(h),m=new s("formAgbData","Allgemeine Geschäftsbedingungen","summary"),a.setForm(m)),g.isInlife())r.callService().then(function(){if(n.go(a.getStateName()),g.isInlife()){var e="";
1"N"===r.getData("inlifeTariffChangeEligibility").allowedTariffs[0].contractPeriod&&(e+=" NEW"),""!==e&&(e="INL24 -"+e);var t={businessTransactionType:"prolongation",contractExtensionEligibility:e.trim(),tealiumUseDCF:"true",domain:location.host};o.setLoginStatus("logged in"),o.initInlifeCheckout(t)}c||o.trackCheckoutFormInit(g)},function(){n.go("error.technicalerror",{error:{message:"Das hat leider nicht geklappt. Versuch es bitte nochmal."}})});else{if(g.isVVL()){var _={businessTransactionType:"contractProlongation",contractExtensionEligibility:g.prolongationType,customerSegment:g.customerSegment};o.initVVLCheckout(_)}n.go(a.getStateName()),c||o.trackCheckoutFormInit(g)}},showIBANErrorMassage:function(){i.trackFormError("customer does not have a bankaccount","general"),a.error(),e.deleteBasketCookie(),n.go("error.missing-bank")}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryFuFService",["$rootScope","$http","$q","$injector","factorybShopBasket","factoryNbaData",function(e,t,r,n,i,o){var a=n.get("config"),s=null,c=function(){$("body").append('<script type="text/javascript" src="/simplicity/ecommerce/scripts/faf-check.js"><\/script>')},u=function(e){var n=r.defer();return t({method:"get",url:e,headers:{Accept:"application/json","Content-Type":"application/json"}}).then(function(e){var t;t=e.data,s=t,n.resolve(s)},function(){n.reject()}),n.promise},l=function(e){var t=$.cookie(e)||"";return""===t?"":t},d=function(){var e=new Date;e.setTime(e.getTime()-3600);var t=window.location.host;t="vodafone.localhost"===t?".vodafone.localhost":".vodafone.de",document.cookie="vfhvaluefafc=; expires="+e.toGMTString()+"; path=/; domain="+t},p=function(e){var t=i.getOfferGroup(),r=l(a.fufAPI.REGULAR.COOKIENAME),n=a.fufAPI.REGULAR.APIURL+"?h="+r+"&do=invalidate&onr="+e+"&btx="+t.btx;u(n).then(function(){d(a.fufAPI.REGULAR.COOKIENAME)},function(){})};return{checkInvitation:function(){var e=i.getOfferGroup();e.isVVL()||e.isInlife()||e.isRedplus()||e.isStone()?o.isFaFCustomer().then(function(){},function(){c()}):e.isGigaCubeOnly()?function(){var e=r.defer(),t=l(a.fufAPI.GIGACUBE.COOKIENAMECUBE);""===t&&e.reject();var n=a.fufAPI.GIGACUBE.APIURL+"?h="+t;return u(n).then(function(){"valid"!==(s.status||"")&&e.reject(),e.resolve()},function(){e.reject()}),e.promise}().then(function(){},function(){window.location.href=a.fufAPI.GIGACUBE.FALLBACK}):c()},invalidateInvitation:function(e){var t=i.getOfferGroup();t.isVVL()?o.isFaFCustomer().then(function(){},function(){p(e)}):t.isGigaCubeOnly()?function(e){var t=i.getOfferGroup(),r=l(a.fufAPI.GIGACUBE.COOKIENAMECUBE),n=a.fufAPI.GIGACUBE.APIURL+"?h="+r+"&do=invalidate&onr="+e+"&btx="+t.btx;u(n).then(function(){d(a.fufAPI.GIGACUBE.COOKIENAMECUBE)},function(){})}(e):p(e)}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryOfferGroup",["$q",function(e){return{offergroup:void 0,setOfferGroup:function(e){this.offergroup=e},getOfferGroup:function(){return this.offergroup}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryFulfilmentOrders",["factorybShopBasket","factoryDeltaDays","factoryUtils",function(e,t,r){var n=[],i=[],o=[];return{init:function(e){i=e,n=[],o=[];for(var r=0;r<e.length;r++){var a={propositions:[],availableShippingOptions:{default:{},promised:{}},selectedOption:{type:"default",deliveryDate:"",deliveryTime:""},pid:""};a.pid=e[r].pid;for(var s=0;s<e[r].availableShippingOptions.length;s++){var c=e[r].availableShippingOptions[s];if(void 0!==c.flagPromisedTime&&!1!==c.flagPromisedTime||void 0!==c.desiredDate&&!1!==c.desiredDate){var u=e[r].availableShippingOptions[s].deliverySchedules.deliveryDate.split("-"),l=new Date(u[0],parseInt(u[1])-1,u[2]),d=new Date;d.setHours(0),d.setMinutes(0),d.setSeconds(0),d.setMilliseconds(0);var p=t.getDelta(l,d);void 0===a.availableShippingOptions.promised[p]&&(a.availableShippingOptions.promised[p]={});var f=this.getWeekdayName(l.getDay());const n=10;var h=n>l.getDate()?"0"+l.getDate():l.getDate(),m=n>l.getMonth()+1?"0"+(l.getMonth()+1):l.getMonth()+1,g=l.getFullYear();a.availableShippingOptions.promised[p].date=h+"."+m+"."+g,a.availableShippingOptions.promised[p].weekdayShortened=f;var v="08-18";if(e[r].availableShippingOptions[s].deliveryTimes&&e[r].availableShippingOptions[s].deliveryTimes.timeFrom&&e[r].availableShippingOptions[s].deliveryTimes.timeTo){const t=2;v=e[r].availableShippingOptions[s].deliveryTimes.timeFrom.substr(0,t)+"-"+e[r].availableShippingOptions[s].deliveryTimes.timeTo.substr(0,t)}a.availableShippingOptions.promised[p][v]=e[r].availableShippingOptions[s]}else a.availableShippingOptions.default=e[r].availableShippingOptions[s]}var b=e[r].pid;if("zub"===b){var y=e[r].pidArray;if(y&&0<y.length)for(s=0;s<y.length;s++){var _=String(parseInt(y[s]));null!==this.getPropositionByPid(_)&&a.propositions.push(this.getPropositionByPid(_))}}else null!==this.getPropositionByPid(b)&&a.propositions.push(this.getPropositionByPid(b));n.push(a),o.push(a)}},reInitWithExistingShippingOptions:function(){this.init(i)},get:function(){return n},getFulfilmentOrderByIndex:function(e){return n[e]},getDefaultOptionByIndex:function(e){return n[e].availableShippingOptions.default},getPidByIndex:function(e){return n[e].pid},getPropositionByPid:function(t){var r=e.get();if(r.NEW&&0<r.NEW.length)for(var n=0;n<r.NEW.length;n++){if(t===r.NEW[n].pid){var i=r.NEW[n];return this.generateProposition(i)}if(r.NEW[n].SECONDCARD&&0<r.NEW[n].SECONDCARD.length)for(var o=0;o<r.NEW[n].SECONDCARD.length;o++)if(t===r.NEW[n].SECONDCARD[o].pid){i=r.NEW[n].SECONDCARD[o];return this.generateProposition(i)}}if(r.HARDWAREONLY&&0<r.HARDWAREONLY.length)for(n=0;n<r.HARDWAREONLY.length;n++)if(t===r.HARDWAREONLY[n].pid){i=r.HARDWAREONLY[n];return(a=this.generateProposition(i)).ignoreCutOffTime=!0,a}if(r.VVL){if(t===r.VVL.pid){i=r.VVL;return(a=this.generateProposition(i)).ignoreCutOffTime=!0,a}if(r.VVL.SECONDCARD&&0<r.VVL.SECONDCARD.length)for(n=0;n<r.VVL.SECONDCARD.length;n++)if(t===r.VVL.SECONDCARD[n].pid){i=r.VVL.SECONDCARD[n];return this.generateProposition(i)}}if(r.multicardContract&&t===r.multicardContract.pid){i=r.multicardContract;return(a=this.generateProposition(i)).ignoreCutOffTime=!0,a}if(r.MULTICARDCONTRACT&&t===r.MULTICARDCONTRACT.pid){i=r.MULTICARDCONTRACT;return(a=this.generateProposition(i)).ignoreCutOffTime=!0,a}if(r.tariffChange){if(t===r.tariffChange.pid){i=r.tariffChange;return(a=this.generateProposition(i)).ignoreCutOffTime=!0,a}if(r.tariffChange.SECONDCARD&&0<r.tariffChange.SECONDCARD.length)for(n=0;n<r.tariffChange.SECONDCARD.length;n++)if(t===r.tariffChange.SECONDCARD[n].pid){i=r.tariffChange.SECONDCARD[n];return this.generateProposition(i)}}if(r.TARIFFCHANGE){if(t===r.TARIFFCHANGE.pid){var a;i=r.TARIFFCHANGE;return(a=this.generateProposition(i)).ignoreCutOffTime=!0,a}if(r.tariffChange.SECONDCARD&&0<r.tariffChange.SECONDCARD.length)for(n=0;n<r.tariffChange.SECONDCARD.length;n++)if(t===r.tariffChange.SECONDCARD[n].pid){i=r.tariffChange.SECONDCARD[n];return this.generateProposition(i)}}if(r.SECONDCARD&&0<r.SECONDCARD.length)for(n=0;n<r.SECONDCARD.length;n++)if(t===r.SECONDCARD[n].pid){i=r.SECONDCARD[n];return this.generateProposition(i)}if(r.ultraCard&&0<r.ultraCard.length)for(n=0;n<r.ultraCard.length;n++)if(t===r.ultraCard[n].pid){i=r.ultraCard[n];return this.generateProposition(i)}if(r.ULTRACARD&&0<r.ULTRACARD.length)for(n=0;n<r.ULTRACARD.length;n++)if(t===r.ULTRACARD[n].pid){i=r.ULTRACARD[n];return this.generateProposition(i)}return null}
1,getAllPropositionsByBasket:function(){var t=e.get(),r=[];if(t.NEW&&0<t.NEW.length)for(var n=0;n<t.NEW.length;n++){var i=t.NEW[n];if(r.push(this.generateProposition(i)),t.NEW[n].SECONDCARD&&0<t.NEW[n].SECONDCARD.length)for(var o=0;o<t.NEW[n].SECONDCARD.length;o++){i=t.NEW[n].SECONDCARD[o];r.push(this.generateProposition(i))}}if(t.HARDWAREONLY&&0<t.HARDWAREONLY.length)for(n=0;n<t.HARDWAREONLY.length;n++){i=t.HARDWAREONLY[n];(a=this.generateProposition(i)).ignoreCutOffTime=!0,r.push(a)}if(t.VVL){var a;i=t.VVL;if((a=this.generateProposition(i)).ignoreCutOffTime=!0,r.push(a),t.VVL.SECONDCARD&&0<t.VVL.SECONDCARD.length)for(n=0;n<t.VVL.SECONDCARD.length;n++){i=t.VVL.SECONDCARD[n];r.push(this.generateProposition(i))}}if(t.SECONDCARD&&0<t.SECONDCARD.length)for(n=0;n<t.SECONDCARD.length;n++){i=t.SECONDCARD[n];r.push(this.generateProposition(i))}return r},generateProposition:function(t){var r={device:{},tariff:{},ultraCard:{},pid:"",ignoreCutOffTime:!1},n=String(t.TARIFFID)||"0",i=String(t.HARDWAREID)||"0",o=String(t.SIMCARDID)||"0",a=e.getOfferGroup().getOfferByBasketPid(t.pid);if(n&&"0"!==n&&"undefined"!==n&&a.offerComponents.subscription){var s=a.offerComponents.subscription;r.tariff={label:s.getEnrichedData().label,pib:s.attributes.pib}}if(i&&"0"!==i&&"undefined"!==i&&a.offerComponents.device){var c=a.offerComponents.device;r.device={label:c.getEnrichedData().label,imgSmall:c.attributes.image228_309}}if(o&&"0"!==o&&a.offerComponents.simcard){var u=a.offerComponents.simcard,l=u.getEnrichedData(),d=!1,p=!1,f="";u&&l&&(f=l.label,d=l.isEsim,p=l.isOneNumber),r.ultraCard={label:f,isEsim:d,isOneNumber:p}}return r.pid=t.pid,r},getWeekdayName:function(e){var t;switch(e){case 0:t="So.";break;case 1:t="Mo.";break;case 2:t="Di.";break;case 3:t="Mi.";break;case 4:t="Do.";break;case 5:t="Fr.";break;case 6:t="Sa."}return t},setCacheFulFilment:function(){n=r.clone(o)}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryGoogleMaps",["$rootScope","$q","factoryFormData",function(e,t,r){var n,i,o={componentRestrictions:{country:"de"},types:["geocode"]};return{init:function(){var e=t.defer(),r={style:google.maps.MapTypeControlStyle.HORIZONTAL_BAR,position:google.maps.ControlPosition.TOP_RIGHT};return"sml"===vf.util.layout()&&(r.mapTypeIds=[]),this.getDefaultLocation().then(function(t){i=t,n=new google.maps.Map(document.getElementById("map"),{center:t,mapTypeId:google.maps.MapTypeId.ROADMAP,clickableIcons:!1,zoom:12,maxZoom:16,streetViewControl:!1,mapTypeControlOptions:r}),e.resolve(n)}),e.promise},getCitiesByZipCode:function(e){var r=t.defer();return(new google.maps.Geocoder).geocode({address:e,componentRestrictions:{country:"DE"},language:"de"},function(e,t){var n=[];if(e&&e.length)for(var i=e[0].address_components,o=0;o<i.length;o++)if(i[o].types.includes("locality")){n.push(i[o].long_name);break}r.resolve(n)}),r.promise},getLocationByTerm:function(e){var r=t.defer();return(new google.maps.Geocoder).geocode({address:e,componentRestrictions:{country:"DE"},language:"de"},function(e,t){e&&e.length?r.resolve(e[0].geometry.location):r.resolve(null)}),r.promise},getAddressComponentsByTerm:function(e){var r=t.defer();return(new google.maps.Geocoder).geocode({address:e,componentRestrictions:{country:"DE"},language:"de"},function(e,t){if(e&&e.length)if(e[0].postcode_localities)result=e[0].postcode_localities,r.resolve(null);else{var n=e[0].address_components;r.resolve(n)}}),r.promise},getAutocompleteSuggestions:function(e,r,n){var i=t.defer(),o=new google.maps.places.AutocompleteService,a={componentRestrictions:{country:"de"},input:"Deutschland, "+e};return r&&(a.types=r),n&&(a.location=n,a.radius=500),o.getQueryPredictions(a,function(e,t){if(t===google.maps.places.PlacesServiceStatus.OK){for(var r=[],n=[],o=0;o<e.length;o++){var a=e[o];a.structured_formatting&&a.structured_formatting.main_text&&(r.push(a.structured_formatting.main_text),n.push(a))}i.resolve({terms:r,predictions:n})}else i.reject()}),i.promise},getDefaultLocation:function(){var e=r.getData(),n=new google.maps.Geocoder,i=t.defer(),o={lat:52.5200066,lng:13.404954};return n.geocode({address:e.persdaten.persdaten_city.val.toString()+" "+e.persdaten.persdaten_street.val.toString()},function(e,t){t===google.maps.GeocoderStatus.OK&&(o.lat=e[0].geometry.location.lat(),o.lng=e[0].geometry.location.lng()),i.resolve(o)}),i.promise},getDefaultZoomFactor:function(){return 12},getDetailZoomFactor:function(){return 17},getMap:function(){return n},getMapOptions:function(){return o},getDefaultPosition:function(){return i}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("httpInterceptor",["$rootScope","$q","$injector",function(e,t,r){var n=r.get("config"),i=0,o=function(e){if(null==e)return!1;for(var t=0;
1t<n.blacklistForRequests.length;t++)if(e.startsWith(n.blacklistForRequests[t]))return!0;return!1};return{request:function(r){if(o(r.url)||(i++,e.$broadcast("bcstLoadingSpinner_show")),"http://vodafone.localhost"===window.location.origin){var n=window.location.href.split("?basketId=")[1];r.url+="?basketId="+(n||"dummy")}return r||t.when(r)},response:function(r){return o(r.config.url)||0!==--i||e.$broadcast("bcstLoadingSpinner_hide"),r||t.when(r)},responseError:function(r){return o(r.config.url)||--i||e.$broadcast("bcstLoadingSpinner_hide"),t.reject(r)}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryIdentMeta",function(){var e={onlineIdent:0,vodafoneStoreIdent:0,doorIdent:0,doorIdentLight:0},t=!1;return{init:function(r){for(var n in r)"001"===r[n].method&&(e.onlineIdent=r[n].charge),"003"===r[n].method&&(e.vodafoneStoreIdent=r[n].charge),"002"===r[n].method&&(e.doorIdent=r[n].charge),"006"===r[n].method&&(e.doorIdentLight=r[n].charge);t=!0},getCosts:function(t){switch(t){case"001":return e.onlineIdent;case"003":return e.vodafoneStoreIdent;case"002":return e.doorIdent;case"006":return e.doorIdentLight;default:return 0}},isInitialized:function(){return t}}})}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryIdentMethods",["$q","$http","$injector",function(e,t,r){var n=r.get("config");return{getIdentMethod:function(r,i){var o=e.defer();return t({method:"post",url:n.apiURLs.IDENTMETHOD,headers:{Accept:"application/json","Content-Type":"application/json"},data:{nationality:r,sohoType:i}}).then(function(e){o.resolve(e.data)},function(e){o.reject(e)}),o.promise}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryInstallationAddress",["$q",function(e){var t={street:"",hnr:"",zip:"",city:"",extra:""};function r(e){t.street=e}function n(e){t.zip=e}function i(e){t.city=e}function o(e){t.hnr=e}function a(){var a,s=e.defer();try{var c=$.cookie("msadr"),u=JSON.parse(c);r(u.street),n(u.zipcode),o(u.housenumber),i(u.city),a=u.housenumberextra,t.extra=a,s.resolve(t)}catch(e){r("Musterstraße"),n("12345"),o("123"),i("Musterstadt"),s.resolve(t)}return s.promise}return{getData:function(){return a()}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryInstallationData",["$rootScope",function(e){var t="";return{setData:function(e){t=e},getDataBshopKonform:function(){return""!==t.date&&"later"===t.when?moment(t.date,"DD.MM.YYYY").format("DDMMYYYY"):""},broadcastData:function(){e.$broadcast("bcstInstallationData")}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryMeinVodafone",["$q","$http","$injector",function(e,t,r){var n=r.get("config");return{login:function(e,r){return t({method:"POST",url:n.MINT.login,headers:{Accept:"application/json","Content-Type":"application/json"},data:JSON.stringify({clientType:"Portal",username:e,password:r})})}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryNationalityValidation",["$q","$http","$injector",function(){return{isEUCountry:function(e){var t=["Belgien","Bulgarien","Dänemark","Deutschland","Estland","Finnland","Frankreich","Griechenland","Großbritannien","Irland","Italien","Kroatien","Lettland","Litauen","Luxemburg","Malta","Niederlande","Österreich","Polen","Portugal","Rumänien","Slowakei","Slowenien","Spanien","Schweden","Tschechien","Ungarn","Vereinigtes Königr.","Zypern"];return void 0!==e?-1<t.indexOf(e):-1<t.indexOf("")}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryNbaData",["$rootScope","$http","$q","$injector","factorybShopBasket",function(e,t,r,n,i){var o=n.get("config"),a=null,s=function(e){a=e},c=function(e){var t=i.getOfferGroup();return".json"!==e.substr(-5)&&("secondCard"===t.btx?e+="/redplus/all":"contractProlongation"===t.btx?e+="/contractprolongation/all":"tariffChange"===t.btx?e+="/tariffchange/"+i.getSalesChannel():"multicard"===t.btx||"multicardContract"===t.btx?e+="/multisim/all":e+="/all/all"),e},u=function(){var e=r.defer();if(null===a){var n=o.apiURLs.NBA,i={method:"get",url:n=c(n),headers:{Accept:"application/json","Content-Type":"application/json"}};t(i).then(function(t){s(t.data),e.resolve(a)},function(){"true"===$.cookie("forApp")&&void 0===$.cookie("forAppConnection")?($.cookie("forAppConnection","true",{path:"/"}),i.url=c("/api/commerce/nba"),t(i).then(function(t){s(t.data),e.resolve(a)},function(){e.reject()})):e.reject()})}else e.resolve(a);return e.promise};return{isFaFCustomer:function(){var e=r.defer();return u().then(function(){a.hasFF&&"Y"===a.hasFF?e.resolve():e.reject()},function(){e.reject()}),e.promise},callService:function(){return u()},getCellCode:function(e){var t="cellcode";return a[e][t]&&""!==a[e][t]?a[e][t]:null},getData:function(e){return a&&a[e]&&""!==a[e]?a[e]:null},getAllowedTariffDataInlife:function(e){if(a.inlifeTariffChangeEligibility&&a.inlifeTariffChangeEligibility.allowedTariffs)for(var t=a.inlifeTariffChangeEligibility.allowedTariffs,r=0;r<t.length;
1r++)if(parseInt(e)===parseInt(t[r].subscriptionId))return t[r];return null}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryNumberValidation",["$q","$http","$injector",function(e,t,r){var n=r.get("config");return{init:function(e,t,r){return this.check(e,t,r)},check:function(r,i,o){var a=e.defer(),s=null;return t({method:"post",url:n.apiURLs.NUMBERCHECK,headers:{Accept:"application/json","Content-Type":"application/json"},data:{countryCode:r,nationalDestinationCode:i,subscriberNumber:o}}).then(function(e){(s=e.data).VALID?a.resolve(s):a.reject(s)},function(e){a.reject(e)}),a.promise}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryRequestDate",function(){var e;return{setTS:function(t){e=t},getTS:function(){return e},getDateFromDayMonthYear:function(){var t=new Date(1e3*e);return new Date(t.getFullYear(),t.getMonth(),t.getDate())},getDate:function(){return new Date(1e3*e)}}})}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factorySelectedStore",["$rootScope",function(e){var t={};return{setStore:function(r){t=r,e.$broadcast("selectedStore")},getStore:function(){return t}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factorySessionTimer",["$rootScope","$interval","$window",function(e,t,r){var n=60,i=1e3,o=1200,a=!1,s=!1,c={};e.isSessionTimeEnded=!1;var u,l=null;function d(){var t=Math.floor(o/n),r=o%n;e.timerText=(t<10?"0":"")+t+" min "+(r<10?"0":"")+r+" sek"}function p(){var e,t=document.querySelector('[data-overlayid="session"]');t&&(!(e=document.getElementById("session"))||"block"!==e.style.display)&&t.click()}return r.addEventListener("beforeunload",function(){e.isSessionTimeEnded&&e.isLoggedInUser&&sessionStorage.setItem("isSessionTimeEnded","true")}),d(),c.start=function(){angular.isDefined(u)&&t.cancel(u),l=Date.now()+12e5,a=!1,s=!1,e.isSessionTimeEnded=!1,u=t(function(){var r=Date.now();o=Math.max(0,Math.floor((l-r)/i)),window.basketTimer=o,!a&&o<=300&&(p(),a=!0);!s&&o<=60&&(p(),s=!0),o<=0&&(p(),e.isSessionTimeEnded=!0,t.cancel(u)),d()},i)},c.reset=function(){o=1200,l=Date.now()+12e5,a=!1,s=!1,e.isSessionTimeEnded=!1,d(),c.start()},c.getSecondsLeft=function(){return l?Math.max(0,Math.floor((l-Date.now())/i)):o},e.$on("$destroy",function(){e.cancelSessionTimer()}),e.handleContinueShopping=function(t){e.isLoggedInUser?e.continueShoppingLoggedInUser():e.continueShopping(t)},e.cancelSessionTimer=function(){angular.isDefined(u)&&(t.cancel(u),u=void 0)},c.closeSessionModal=function(e){var t=document.getElementById(e);t&&t.click()},c.isSessionTimerZero=function(){return 0===o},c}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factorySuccessData",function(){var e;return{setData:function(t){e=t},getData:function(){return e}}})}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryVlux20Provider",["$q",function(e){}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryVoucher",["$q","$rootScope","$http","$injector","factorybShopBasket",function(e,t,r,n,i){var o=n.get("config"),a=i.getOfferGroup(),s={unknown:"Der Gutsc
1hein-Code ist leider nicht bekannt.",notstarted:"Du kannst den Gutschein-Code leider erst sp&auml;ter nutzen. Pr&uuml;fe bitte die Laufzeit in den Gutschein-Bedingungen.",campaignended:"Leider ist der Gutschein-Code schon abgelaufen.",used:"Der Gutschein-Code wurde schon eingel&ouml;st.",maxcampaignreached:"Die maximale Anzahl an Einl&ouml;sungen ist f&uuml;r diesen Gutschein-Code schon erreicht.",nocampaign:"Bei diesem Gutschein-Code gab es einen Fehler. Wende Dich bitte an den Kunden-Service.",unknownVlux:"Du kannst den Gutschein-Code leider nicht mit dem gew&auml;hlten Produkt kombinieren. Pr&uuml;fe bitte die Gutschein-Bedingungen."};return{validate:function(t){var n=o.apiURLs.VOUCHER;n+="?vc="+t.vc;var i=e.defer(),a=null;return r({method:"get",url:n,headers:{Accept:"application/json","Content-Type":"application/json"}}).then(function(e){"valid"===(a=e.data).status?i.resolve(a):i.reject(a)},function(e){i.reject(e)}),i.promise},burn:function(t){var n=o.apiURLs.VOUCHER;n+="?vc="+t.vc+"&cmd=use",t.orderNo&&(n+="&onr="+t.orderNo);var i=e.defer(),a=null,s=0,c=0;return r({method:"get",url:n,headers:{Accept:"application/json","Content-Type":"application/json"}}).then(function(e){if("done"===(a=e.data).status){if(s=a.bid?parseInt(a.bid):0,c=a.void?parseInt(a.void):0,!isNaN(s)&&0<s){var t="https://dyn.vodafone.de/csp/csp.php?bid="+s+"&timg="+Date.now();!isNaN(c)&&0<c&&(t+="&void="+c);var r=document.createElement("img");r.setAttribute("src",t),r.setAttribute("style","width:1px; height:1px;"),document.body.appendChild(r)}i.resolve(a)}else i.reject(a)},function(e){i.reject(e)}),i.promise},isVoucherAvailable:function(){return 0<a.mainOffer.offerDependencies.getServiceIdsByUsecase(["voucher"]).length},removeVoucher:function(){var t=e.defer(),r=(a=i.getOfferGroup()).mainOffer.offerDependencies.getServiceIdsByUsecase(["voucher"]),n=!1;if(0<r.length)for(var o=a.mainOffer.offerServices.getSelectedDiscounts(),s=0;s<r.length;s++)for(var c=0;c<o.length;c++)o[c].id===r[s]&&(a.mainOffer.offerServices.removeSelectedService(r[s]),basketFactory.putOfferGroupIntoBasket(a),n=!0);else t.reject();return n&&basketFactory.sendBasketToShopBackend().then(function(e){e&&generalOfferService.getOfferGroupByShopBasket(e.basket).then(function(e){i.setOfferGroup(e),(a=e).offerGroupCosts.calculateCosts(),t.resolve()})},function(){t.reject()}),t.promise},addVoucher:function(t){var r=e.defer(),n=(a=i.getOfferGroup()).mainOffer.offerDependencies.getServiceIdsByUsecase(["voucher"],t.campaign),o=!1;return 0<n.length&&(o=a.mainOffer.addVoucherServicesByCampaign(t.campaign)),o?(basketFactory.putOfferGroupIntoBasket(a),basketFactory.sendBasketToShopBackend().then(function(e){i.init(e.basket),generalOfferService.getOfferGroupByShopBasket(e.basket).then(function(e){i.setOfferGroup(e),a=e}),a.offerGroupCosts.calculateCosts(),r.resolve(n)})):r.reject(),r.promise},getVoucherError:function(e){return s[e]}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryGigakombi",["$rootScope","$q","$injector","$state",function(e,t,r,n){return{gigakombiVorteil:"",url:"/api/vfd2dyn/json/gigakombi-crypt/serviceaio.php",gigakombidiscountslist:{IP:[177],TV:[612],BR5:[618],IPandTV:[177,612],IPandBR5:[177,618],Unity:[1637]},gigakombiDiscounts:[],hasGigakombi:!1,msredoneCookieName:"msredone",eeccGkTokenCookieName:"eeccGkToken",init:function(){var e=this;e.deeplink=this.findGetParameter("deeplink"),e.token=this.findGetParameter("token"),e.backUrl=this.findGetParameter("backUrl"),e.umCase=this.findGetParameter("umCase");var t=$.Deferred();if(!e.backUrl)return e.token?(e.hasGigakombi=!0,this.saveMsredoneCookie({token:e.token}),this.decryptToken(e.token).then(function(t){t.result&&"ok"===t.result&&(t.uc&&t.uc.length>0&&e.prepareDiscounts(t.uc),t.customerInformation&&e.saveEeccGkTokenCookie(t.customerInformation))})):e.umCase?(t.resolve(),e.hasGigakombi=!0,this.saveMsredoneCookie({umCase:e.umCase}),0<=e.umCase.indexOf("hw")&&(e.gigakombiVorteil="Unity"),t.promise()):(t.resolve(),t.promise());if(0<=e.backUrl.indexOf("dsl.vodafone.de")||0<=e.backUrl.indexOf("arcor.de")){e.hasGigakombi=!0,this.saveMsredoneCookie({URL:e.backUrl});var r=encodeURIComponent(e.backUrl);return this.callServiceForDSL(r).then(function(t){t&&t.result&&"ok"===t.result&&t.uc&&"DSL"===t.uc&&(e.gigakombiVorteil="IP",t.customerInformation&&e.saveEeccGkTokenCookie(t.customerInformation))})}},getHasGigakombi:function(){return this.hasGigakombi},getGigakombiDiscounts:function(){return this.gigakombiVorteil?this.gigakombidiscountslist[this.gigakombiVorteil]:[]},getGigakombiVorteil:function(){return this.gigakombiVorteil},decryptToken:function(e,t){t=t||"check";var r=$.Deferred(),n={kdgCipher:e,olsOrderId:t};return $.ajax({url:this.url,method:"get",dataType:"json",data:n}).then(function(e){r.resolve(e)},function(e){r.reject(e)}),r.promise()},callServiceForDSL:function(e){var t=$.Deferred(),r={dslbackurl:e};return $.ajax({url:this.url,method:"get",dataType:"json",data:r}).then(function(e){t.resolve(e)},function(e){t.reject(e)}),t.promise()},findGetParameter:function(e){for(var t=null,r=[],n=location.search.substr(1).split("&"),i=0;i<n.length;i++)(r=n[i].split("="))[0]===e&&(t=decodeURIComponent(r[1]));return t},prepareDiscounts:function(e){var t=!1;0<=e.indexOf("IP")&&(this.gigakombiVorteil="IP",t=!0),0<=e.indexOf("Unity")&&(this.gigakombiVorteil="Unity"),0<=e.indexOf("BR5")?this.gigakombiVorteil=!0===t?"IPandBR5":"BR5":0<=e.indexOf("TV")&&(this.gigakombiVorteil=!0===t?"IPandTV":"TV")},saveMsredoneCookie:function(e){e="string"==typeof e?e:JSON.stringify(e),$.cookie(this.msredoneCookieName,e,{expires:1,path:"/"})},saveEeccGkTokenCookie:function(e){$.cookie(this.eeccGkTokenCookieName,e,{expires:1,path:"/"})}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").filter("cssclass",[function(){return function(e){return e.replace(".","-")}}])}(),function(){"use strict";angular.module("ecommerce.checkout").filter("germanDate",function(){return function(e){var t=e.split("-");return t[2]+"."+t[1]+"."+t[0]}})}(),function(){"use strict";angular.module("ecommerce.checkout").filter("greaterThanZero",[function(){return function(e,t){var r=[],n=[];return angular.forEach(e,function(e){var t=!0;void 0!==e.monthlyPrice&&0<e.monthlyPrice.value&&(t=!1),t?n.push(e):r.push(e)}),"yes"===t?r:n}}])}(),function(){"use strict";angular.module("ecommerce.checkout").filter("monthName",[function(){return function(e){var t;switch(e.toString()){case"01":t="Januar";break;case"02":t="Februar";break;case"03":t="März";break;case"04":t="April";break;case"05":t="Mai";break;case"06":t="Juni";break;case"07":t="Juli";break;case"08":t="August";break;
1case"09":t="September";break;case"10":t="Oktober";break;case"11":t="November";break;case"12":t="Dezember"}return t}}])}(),function(){"use strict";angular.module("ecommerce.checkout").filter("notHidden",[function(){return function(e){var t=[];return angular.forEach(e,function(e){e.hidden||t.push(e)}),t}}])}(),function(){"use strict";angular.module("ecommerce.checkout").filter("notPromoBadge",[function(){return function(e,t){var r=[];return angular.forEach(e,function(e){t!==e.id&&r.push(e)}),r}}])}(),function(){"use strict";angular.module("ecommerce.checkout").filter("pad",[function(){return function(e,t){if(t=t||0,null!=e){for(var r=String(e);r.length<t;)r="0"+r;return r}return null}}])}(),function(){"use strict";angular.module("ecommerce.checkout").filter("vfCurrency",function(){return function(e){return""===e?e:(void 0===e&&(e=0),"number"!=typeof e&&(e=parseFloat(e)),e.toFixed(2).replace(".",","))}})}(),function(){"use strict";angular.module("ecommerce.checkout").controller("BntAccountDataCtrl",[function(){}])}(),function(){"use strict";angular.module("ecommerce.checkout").controller("BntPersDataCtrl",["$rootScope","$scope","$location","formsSummary","factoryDate","factoryRequestDate","factoryTracking","factorybShopBasket","factoryFormData","httpInterceptor","factoryDistrictcourts","factoryCommerceApi","factoryUtils",function(e,t,r,n,i,o,a,s,c,u,l,d,p){t.orderForMyChild=!1,t.isOrderForMyChildVisible=!1,t.showForMyChildNotification=!1,t.isPersDataInputNeeded=!1,t.isHideForm=!1,t.isDeviceFinance=!1,t.isLoggedIn=!1,t.isLoggedInFromMyVodafone=-1!==document.cookie.indexOf("MDDKeks");var f=!1,h=s.getOfferGroup(),m=c.getData();h.isYoung()&&(t.isOrderForMyChildVisible=!0),h&&(t.isDeviceFinance=s.getNestedProperty(h,"mainOffer.offerComponents.subscription._enrichedDataSubscription.isDeviceFinance")),h.isSoHo()&&t.isDeviceFinance&&(m.persdaten.persdaten_sohoType.val="small"),t.handleFormHiding=()=>{t.isDeviceFinance&&"big"===m.persdaten.persdaten_sohoType.val?t.isHideForm=!0:t.isHideForm=!1};var g=function(){t.isPersDataInputNeeded=-1===document.cookie.indexOf("MDDKeks")&&!f};g(),t.$on("bcstFormData",function(){g()}),t.changeChildFlag=function(){if(t.orderForMyChild=!t.orderForMyChild,!1!==t.isOrderForMyChildVisible){t.showForMyChildNotification=t.orderForMyChild;var e=h.mainOffer.offerServices.getSelectedServiceIds(),r=!1;!t.orderForMyChild||-1===e.indexOf(393)&&-1!==e.indexOf(1316)?!1!==t.orderForMyChild||-1===e.indexOf(1316)&&-1!==e.indexOf(393)||(h.mainOffer.offerServices.removeSelectedService(1316),h.mainOffer.offerServices.addSelectedService(393),r=!0):(h.mainOffer.offerServices.removeSelectedService(393),h.mainOffer.offerServices.addSelectedService(1316),r=!0),s.setOrderForMyChild(t.orderForMyChild),!1!==r&&(basketFactory.putOfferGroupIntoBasket(h),u.request({url:"/api/commerce/basket"}),basketFactory.sendBasketToShopBackend().then(function(e){s.init(e.basket),s.setOrderForMyChild(t.orderForMyChild),generalOfferService.getOfferGroupByShopBasket(e.basket).then(function(e){s.setOfferGroup(e),(h=e).offerGroupCosts.calculateCosts(),t.offerGroup=h}),u.response({config:{url:"/api/commerce/basket"}})},function(e){u.responseError({config:{url:"/api/commerce/basket"}}),t.errorMessage=JSON.stringify(e.data)}))}},t.fillAccountOwner=function(t){if(""!==t.BANK.bank_inhaber.val&&e.isLoggedInUser)e.bankFullName=t.BANK.bank_inhaber.val;else{if(void 0!==t.persdaten.persdaten_sohoType&&"big"===t.persdaten.persdaten_sohoType.val)t.BANK.bank_inhaber.val=t.persdaten.persdaten_companyName1.val,""!==t.persdaten.persdaten_companyName2.val&&(t.BANK.bank_inhaber.val+=" "+t.persdaten.persdaten_companyName2.val),t.BANK.bank_inhaber.val=t.BANK.bank_inhaber.val.substring(0,30),e.bankFullName=t.BANK.bank_inhaber.val;else{t.persdaten.persdaten_firstname.val=t.persdaten.persdaten_firstname.val.trim(),t.persdaten.persdaten_lastname.val=t.persdaten.persdaten_lastname.val.trim();var r=t.persdaten.persdaten_firstname.val+" "+t.persdaten.persdaten_lastname.val;if(e.bankFullName=r,r.length>30){var n=t.persdaten.persdaten_firstname.val.split(" "),i=t.persdaten.persdaten_lastname.val,o=n[0].charAt(0)+".";if(n.length>1){var a=n.slice(1).join(" ");o+=" "+(a=a.trim())}var s=o+" "+i;s.length>30?t.BANK.bank_inhaber.val=s.substring(0,30):t.BANK.bank_inhaber.val=s}else t.BANK.bank_inhaber.val=t.persdaten.persdaten_firstname.val+" "+t.persdaten.persdaten_lastname.val}c.setData(t),c.broadcastData()}},t.fillAccountOwnerData=function(){if(t.forms.formPersData.$valid){var e=c.getData();t.fillShippingPhoneNumber(e),t.fillAccountOwner(e)}},t.fillShippingPhoneNumber=function(e){""!==e.persdaten.persdaten_areacode.val&&""!==e.persdaten.persdaten_phone.val&&void 0!==e.SHIPPING.shipping_tel1&&void 0!==e.SHIPPING.shipping_tel2&&""===e.SHIPPING.shipping_tel1.val&&""===e.SHIPPING.shipping_tel2.val&&(e.SHIPPING.shipping_tel1.val=e.persdaten.persdaten_areacode.val,e.SHIPPING.shipping_tel2.val=e.persdaten.persdaten_phone.val,c.setData(e),c.broadcastData())},t.birthday=i.getBirthdayRange(new Date,17),(h.isSoHo()||h.isEnterprise())&&void 0!==m.persdaten.persdaten_s
1ohoType&&"big"===m.persdaten.persdaten_sohoType.val&&(l.getDistrictcourts().then(function(e){t.districtcourts=e},function(e){}),t.$watch("formData.persdaten.persdaten_sohoType.val",function(){"small"===t.formData.persdaten.persdaten_sohoType.val&&"none"===$("#soho-hr-tooltip > svg").css("display")&&vf.tooltip.show($("#soho-hr-tooltip"))}));var v=function(){d.getNba().then(function(){d.getCheckout().then(function(t){c.setData(t.data.formData),c.broadcastData(),e.isLoggedInUser=!0,-1!==document.cookie.indexOf("MDDKeks")?(a.setLoginStatus("logged in"),n.hideValidationMessages(),n.formValid()):(f=!0,g())},function(e){})},function(e){try{var r=p.getCookie("MDDKeks"),n=decodeURIComponent(r),i=n&&JSON.parse(n);if(n&&"undefined"!==n&&i&&401===e.status&&i.customerType.indexOf("mobile")>=0){window.open("/shop/authentifizierung.html?goto=/shop/warenkorb.html","_self")}else n&&"undefined"!==n&&i&&(t.isPersDataInputNeeded=!0,t.isLoggedIn=!0)}catch(e){}if(e.data&&"N.G.401.2"===e.data.responseCode&&e.data.possibleSubscribers&&"object"==typeof e.data.possibleSubscribers&&0<e.data.possibleSubscribers.length){var o=e.data.possibleSubscribers[0].listOfSubscribers.split(",");d.ussaLogin(o[0]).then(function(){v()},function(){})}})};v(),t.goLoginPage=function(){window.location.href="/meinvodafone/account/login?targetURL=https%3A%2F%2Fwww.vodafone.de%2Fshop%2Fwarenkorb.html%23%2Fbasket&icmp=checkout:loginbutton:gen:credit:gen"}}])}(),function(){"use strict";angular.module("ecommerce.checkout").controller("PrepaidPersDataCtrl",["$rootScope","$scope","factoryDate","factoryNationalityValidation","factoryCommerceApi","factoryFulfilmentOrders","factoryFormData","factoryTracking",function(e,t,r,n,i,o,a,s){i.getAvailableShippingOptions("001","","000").then(function(r){o.init(r.data.shippingOptions);var n=o.get(),i=a.getData();i.SHIPPING.shipping_selectedOption.val=[];for(var s=0;s<n.length;s++){var c={pid:o.getPidByIndex(s),option:o.getDefaultOptionByIndex(s)};i.SHIPPING.shipping_selectedOption.val.push(c),t.shippingFee<c.option.shippingFee&&e.$broadcast("shippingOptionSet",{value:c.option.shippingFee})}},function(){}),t.birthday=r.getBirthdayRange(new Date,17),t.euCountry=!0,t.$watch("formData.persdaten.persdaten_nationality.val",function(e){""!==e&&void 0!==e&&(t.euCountry=n.isEUCountry(e))}),t.$watch("formData.persdaten.persdaten_identMethod.type",function(e,r){e!==r&&(-1<t.formData.persdaten.persdaten_identMethod.type.indexOf("001")?s.trackPrepaidIdent("online"):s.trackPrepaidIdent("not_available"))},!0),$(".mod-stepper").on("open:formPersData",function(){VF.onlineIdentOptions="online"}),$(".mod-stepper").on("close:formPersData",function(){VF.onlineIdentMethod="online"})}])}(),function(){"use strict";angular.module("ecommerce.checkout").controller("HardwareonlyPersDataCtrl",["$rootScope","$scope","factoryCommerceApi","factoryFormData","factoryFulfilmentOrders",function(e,t,r,n,i){r.getAvailableShippingOptions("005","","000").then(function(r){i.init(r.data.shippingOptions);var o=i.get(),a=n.getData();a.SHIPPING.shipping_selectedOption={},a.SHIPPING.shipping_selectedOption.val=[];for(var s=0;s<o.length;s++){var c={pid:i.getPidByIndex(s),option:i.getDefaultOptionByIndex(s)};a.SHIPPING.shipping_selectedOption.val.push(c);var u=parseFloat(c.option.shippingFee);t.shippingFee<u&&e.$broadcast("shippingOptionSet",{value:u})}},function(){})}])}();var extendStatics=function(e,t){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},extendStatics(e,t)};function __extends(e,t){function r(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var __assign=function(){return __assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign.apply(this,arguments)};function __awaiter(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}c((n=n.apply(e,t||[])).next())})}function __generator(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;
1function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}var Cookie=function(){function e(){}return e.prototype.setCookie=function(e,t,r,n){if(n)document.cookie=e+"="+t+";path=/";else{var i=new Date;i.setTime(i.getTime()+24*r*60*60*1e3);var o="expires="+i.toUTCString();document.cookie=e+"="+t+";"+o+";path=/"}},e.prototype.removeCookie=function(e){document.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;"},e.prototype.getCookie=function(e){for(var t=e+"=",r=0,n=decodeURIComponent(document.cookie).split(";");r<n.length;r++){for(var i=n[r];" "==i.charAt(0);)i=i.substring(1);if(0==i.indexOf(t))return i.substring(t.length,i.length)}return""},e}(),xhr=function(e){return new Promise(function(t,r){var n=new XMLHttpRequest;if(n.open(e.method,e.url,!0),void 0!==e.header&&e.header.length>0)for(var i=e.header,o=i.length,a=0;a<o;a++){var s=i[a];n.setRequestHeader(s.name,s.value)}n.onload=function(){return t(n)},n.onerror=function(){return r(n)},n.send(e.data)})},token=function(e,t){return void 0===t&&(t="/api/commerce/"),xhr({method:"POST",url:t+"setcookie/bshop",header:[{name:"x-vf-bshoptoken",value:e}]})},GSOVERSION="1.10.1",GSOBUILDDATE="Wed Aug 05 2026 17:57:40 GMT+0000 (Coordinated Universal Time)",Constants=function(){function e(){}return Object.defineProperty(e,"CurrentSubscriptionGroupIdsOfCurrentPortfolio",{get:function(){return[this.Black_Group_Id,this.Easy_Group_Id,this.GigaMobil_Group_Id,this.GigaMobil_Young_Group_Id]},enumerable:!1,configurable:!0}),Object.defineProperty(e,"Subscription_Ids_To_Ignore",{get:function(){return[this.RedXL_2017_Id]},enumerable:!1,configurable:!0}),Object.defineProperty(e,"AllRedAndAllYoungSubscriptionGroupIds",{get:function(){return[this.Red_Group_2018_Id,this.Red_Juno_Group_Id,this.Red_GB_Group_Id,this.Young_Yolo_Group_Id,this.GigaMobil_Group_Id,this.GigaMobil_Young_Group_Id]},enumerable:!1,configurable:!0}),Object.defineProperty(e,"AllYoungSubscriptionGroupIds",{get:function(){return[this.Young_Yolo_Group_Id,this.GigaMobil_Young_Group_Id]},enumerable:!1,configurable:!0}),Object.defineProperty(e,"AvailableMainSubscriptionIDs",{get:function(){return[this.GigaMobilXS_Id,this.GigaMobilS_Id,this.GigaMobilM_Id,this.GigaMobilL_Id,this.GigaMobilXL_Id]},enumerable:!1,configurable:!0}),e.SERVER="https://stubswf.aws.de.vodafone.com",e.PATH="/api/de-web",e.OFFERS="/offers",e.EasyS_Id=426,e.EasyM_Id=427,e.SmartS_Id=477,e.SmartM_Id=478,e.SmartS_2013_Id=123,e.SmartM_2013_Id=124,e.RedXS_Id=2195,e.RedS_Id=2196,e.RedM_Id=2197,e.RedL_Id=2198,e.RedXL_Id=2199,e.RedXL_2017_Id=502,e.YoungS_Id=507,e.YoungM_Id=506,e.YoungL_Id=505,e.YoungXL_Id=508,e.Black_Id=1318,e.GigaMobilXS_Id=10375,e.GigaMobilS_Id=10376,e.GigaMobilM_Id=10377,e.GigaMobilL_Id=10378,e.GigaMobilXL_Id=10379,e.GigaMobil_Young_S_Id=10341,e.GigaMobil_Young_M_Id=10342,e.GigaMobil_Young_L_Id=10343,e.GigaMobil_Young_LPlus_Id=10344,e.GigaMobil_Young_XL_Id=2544,e.RedData_Id=2233,e.RedAllnet_Id=2236,e.RedKids_Id=2231,e.RedBasic_Id=2538,e.FamilyCard_S_Id=10058,e.FamilyCard_M_Id=10053,e.FamilyCard_L_Id=10047,e.RedPlusThreeMonthFreeDiscountId=350,e.RedPlusAllnetType="allnet",e.RedPlusDataType="data",e.RedPlusKidsType="kids",e.RedPlusBasicType="basic",e.GigaMobil_Group_Id=2500,e.GigaMobil_Young_Group_Id=2539,e.RedPlus_Group_Id=1895,e.Easy_Group_Id=425,e.Black_Group_Id=138,e.Red_Group_Id=2194,e.Young_Group_Id=504,e.Young_Yolo_Group_Id=336,e.Smart_Group_Id=476,e.Red_Juno_Group_Id=265,e.Red_Group_2018_Id=498,e.Red_GB_Group_Id=127,e.Smart_2013_Group_Id=122,e.BTX_BNT="newContract",e.BTX_VVL="contractProlongation",e.BTX_MULTISIM="multicard",e.BTX_HARDWARE="hardware",e.BTX_INLIFE="tariffChange",e.BTX_REDPLUS="secondCard",e.BTX_STONE="multicardContract",e.SALESCHANNEL_CONSUMER="Online.Consumer",e.SALESCHANNEL_YOUNG="Online.Young",e.SALESCHANNEL_SOHO="Online.SoHo",e.SALESCHANNEL_ENTERPRISE="Online.Enterprise",e.SALESCHANNEL_FAMILY_FRIENDS="Online.FamilyFriends",e.SalesChannelGeneralSalesObjectMapping={"online.consumer":e.SALESCHANNEL_CONSUMER,"online.young":e.SALESCHANNEL_YOUNG,"online.soho":e.SALESCHANNEL_SOHO,"online.familyfr
1iends":e.SALESCHANNEL_FAMILY_FRIENDS,"online.enterprise":e.SALESCHANNEL_ENTERPRISE},e.SMARTWATCH="Smartwatch",e.SMARTPHONE="Smartphone",e.HANDY="Handy",e.TABLET="Tablet",e.ROUTER="Router",e.REDXL_TARIF_IDS=[2205,2208,2211,2214,2216,2220,2222],e.REDL_TARIF_IDS=[2206,2209,2213,2217,2219,2221,2223],e.YoungDefaultAgeCheckServiceId=393,e.PPDiscountIds=[587,588,589,590,591,592],e.TariffchangeRedXLSubLevelTariffIds=[851,852,853,854,855],e.NetflixIds=[10891,10892,10893,10895,10896],e.NetflixDiscountId=10895,e.GigaKombiSmall=[10385,10866,10865,10864],e.GigaKombiMeduim=[10390,10861,10862,10863],e.JungeLeuteGigaCubeDiscountIds=[1669,1701],e.GigaCubeIds=[2476,2479,2487,2491,2481,2489,2493,2480,2488,2492,10710,10711,10714,10715,10718,10721,10722],e.GigaKombiDiscountIds=[177,612,618,1637],e.GigakombiUnlimitedPromoIdRedXS=2618,e.GigakombiUnlimitedPromoIdRedS=2619,e.GigakombiUnlimitedPromoIdRedM=2246,e.GigakombiUnlimitedPromoIdRedL=2247,e.GigakombiYoungSoc=2252,e.VodafonePassIds=[566,567,568,569],e.MusicVodafonePassId=566,e.SocialVodafonePassId=567,e.ChatVodafonePassId=568,e.VideoVodafonePassId=569,e.YoungDiscountIds=[385],e.StudentDiscountIds=[386],e.HandicappedDiscountIds=[387],e.GigakombiMarker_IP="IP",e.GigakombiMarker_TV="TV",e.GigakombiMarker_BR5="BR5",e.GigakombiMarker_IPandTV="IPandTV",e.GigakombiMarker_IPandBR5="IPandBR5",e.GigakombiMarker_Unity="Unity",e.HasStarterKit="mit Starter-Kit",e.SimCardId_ESimAsMainCard=6915,e.SimCardId_TripleSimAsMainCard=6916,e.SimCardId_ESimAsMainCard_Suci=6915,e.SimCardId_TripleSimAsMainCard_Suci=6916,e.SimCardId_ESimAsOneNumber=7496,e.SimCardId_TripleSimAsOneNumber=7497,e.OfferSimCardType_ESimAndTripleSim="ESimAndTripleSim",e.OfferSimCardType_ESimOnly="ESimOnly",e.Cookie_ShopBackend="shop-backend",e.Cookie_BasketId="basket-id",e.OfferSimCardType_TripleSimOnly="TripleSimOnly",e.InsuranceServiceIds=[158,159],e.TradeInServiceIds=[2710],e}(),CommerceApi=function(){function e(e,t,r,n){void 0===r&&(r="/api/commerce/"),void 0===n&&(n="/mint/vfssdublin/selsec/prx/apicommerce/");var i=this;this._apiEndpointBasketProposition="basket/propositions",this._apiEndpointBasket="basket",this._apiEndpointCount="/basket/propositions/count",this.validatedMobileBasket=null,this.mergeMissingKeys=function(e,t,r){if(void 0===r&&(r=!1),Array.isArray(e)&&Array.isArray(t))return t.map(function(t,r){return e[r]?i.mergeMissingKeys(e[r],t):t});if(e&&"object"==typeof e&&t&&"object"==typeof t&&!Array.isArray(e)&&!Array.isArray(t)){var n=__assign({},t);return Object.keys(e).forEach(function(t){n[t]="SIMCARDID"===t&&r?e[t]:t in n?i.mergeMissingKeys(e[t],n[t]):e[t]}),n}return t},this.getSimVariantsFromSession=function(){try{var e=sessionStorage.getItem("simVariants");return e?JSON.parse(e):[]}catch(e){return[]}}
1,this.getSimForTariff=function(e,t){var r,n=e.find(function(e){return e.tariffId===t});if(!n){var i=e.find(function(e){return!0===e.isOneNumberSimOnly});if(i)return null==i?void 0:i.simCardId}return null!==(r=null==n?void 0:n.simCardId)&&void 0!==r?r:null},this.applySimChanges=function(e,t,r){if(Array.isArray(e))return e.map(function(e){return i.applySimChanges(e,t,r)});if(e&&"object"==typeof e){var n=__assign({},e),o=n.TARIFFID||r;if("SIMCARDID"in n&&(o||t.some(function(e){return e.isOneNumberSimOnly}))){var a=i.getSimForTariff(t,o);a&&(n.SIMCARDID=a)}return Object.keys(n).forEach(function(e){n[e]=i.applySimChanges(n[e],t,o)}),n}return e},this._apiUrl=r,this._apiUrlMint=n,this._forApp=e,this._forAppConnection=t,window.addEventListener("mobileBasketValidated",function(e){var t=e;i.validatedMobileBasket=t.detail},!1)}return e.prototype.getBasicURL=function(){var e=this._apiUrl;return this._forApp&&!1===this._forAppConnection&&(e=this._apiUrlMint),e},e.prototype.apiCall=function(e){var t=this;return new Promise(function(r,n){e().then(function(e){t.setBshopToken(e).then(function(){return 200===e.status?r(JSON.parse(e.responseText)):n(e)})},function(e){return n(e)})})},e.prototype.setBshopToken=function(e){var t=this;return new Promise(function(r,n){if(!e.getResponseHeader("x-vf-bshoptoken-set")||""===e.getResponseHeader("x-vf-bshoptoken-set"))return r(void 0);token(e.getResponseHeader("x-vf-bshoptoken-set"),t.getBasicURL()).then(function(e){return r(void 0)},function(e){return n({error:"something went wrong"})})})},e.prototype.uppercaseKeys=function(e){var t,r;if("[object Array]"===Object.prototype.toString.call(e))return e.map(this.uppercaseKeys.bind(this));if(null!==e&&"object"==typeof e){for(t in r={},e)if(e.hasOwnProperty(t)){if("offercorehash"===t.toLowerCase())continue;r[t.toUpperCase()]=this.uppercaseKeys(e[t])}return r}return e},e.prototype.putBasket=function(e,t){void 0===t&&(t=!1);var r=this,n=(new Cookie).getCookie(Constants.Cookie_BasketId),i=window.location.href.includes("vfd2-testnet");return new Promise(function(o,a){var s=[{name:"Accept",value:"application/json"},{name:"Content-Type",value:"application/json"},{name:"x-api-key",value:i?"QZ2fr2oXrrVGV0TgxAXGiCTX3iCvXJIM":"P3S9N5IZGzyUEk5WeUbdpotzZJ64jDrS"}],c=function(n){var i=JSON.parse(JSON.stringify(n)),c=r.uppercaseKeys(i),u=r.mergeMissingKeys(e,c,t),l=r.getSimVariantsFromSession(),d=l.length>0?r.applySimChanges(u,l):u,p=r.getBasicURL()+r._apiEndpointBasket,f={header:s,method:"PUT",url:p,data:JSON.stringify(d)};r.apiCall(function(){return xhr(f)}).then(function(e){o(e)},function(e){a(e)})};if(r.validatedMobileBasket){var u=r.validatedMobileBasket;return r.validatedMobileBasket=null,void c(u)}var l={header:s,method:"POST",url:i?"https://dxl.preprod.api.vodafone.de/glados/v2/cart/v1/mobileBasket/"+n:"https://api.vodafone.de/glados/v2/cart/v1/mobileBasket/"+n};r.apiCall(function(){return xhr(l)}).then(function(e){c(e.data)},function(e){var t;window.dispatchEvent(new CustomEvent("cartApiFailed",{detail:{endpoint:"/mobileBasket",status:null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.status,message:null==e?void 0:e.message}})),a(e)})})},e.prototype.addToBasket=function(e){var t=this;return new Promise(function(r,n){var i={header:[{name:"Accept",value:"application/json"},{name:"Content-Type",value:"application/json"}],method:"POST",url:t.getBasicURL()+t._apiEndpointBasketProposition,data:JSON.stringify(e)};t.apiCall(function(){return xhr(i)}).then(function(e){return r(e)},function(e){return n(e)})})},e.prototype.getCount=function(){var e=this;return new Promise(function(t,r){var n={method:"GET",url:e.getBasicURL()+e._apiEndpointCount};e.apiCall(function(){return xhr(n)}).then(function(e){return t(e)},function(e){return r(e)})})},e.prototype.getBasket=function(){var e=this;return new Promise(function(t,r){var n={method:"GET",url:e.getBasicURL()+e._apiEndpointBasket};e.apiCall(function(){return xhr(n)}).then(function(e){return t(e)},function(e){return r(e)})})},Object.defineProperty(e.prototype,"apiUrl",{get:function(){return this._apiUrl},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"apiMintUrl",{get:function(){return this._apiUrlMint}
1,enumerable:!1,configurable:!0}),e}(),BasketFactory=function(){function e(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1),void 0===n&&(n=!1),this._customerSegment="",this._sChan=e,this._forApp=t,this._forAppConnection=r,this._cookie=new Cookie;var i=this._cookie.getCookie(Constants.Cookie_ShopBackend);this._basketObj={sChan:this._sChan},n&&(this._commerceApi=new CommerceApi(this._forApp,this._forAppConnection,"https://eweb8.vfd2-testnet.de/api/commerce/")),i&&0<i.length?this._commerceApi=new CommerceApi(this._forApp,this._forAppConnection,"/api/"+i+"/"):this._commerceApi=new CommerceApi(this._forApp,this._forAppConnection)}return Object.defineProperty(e.prototype,"salesChannel",{set:function(e){switch(e){case"consumer":this._sChan="Online.Consumer";break;case"young":this._sChan="Online.Young";break;case"soho":this._sChan="Online.SoHo";break;case"familyfriends":this._sChan="Online.FamilyFriends";break;default:this._sChan=e}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"customerSegment",{set:function(e){this._customerSegment=e},enumerable:!1,configurable:!0}),e.prototype.addServicesToBasketItem=function(e){for(var t=[],r=0,n=e;r<n.length;r++){var i={SERVICEID:n[r]};t.push(i)}return t},e.prototype.addDiscountsToBasketItem=function(e){for(var t=[],r=0,n=e;r<n.length;r++){var i={DISCOUNTID:n[r]};t.push(i)}return t},e.prototype.addSecondCardsToBasketItem=function(e){for(var t=[],r=0,n=e;r<n.length;r++){var i=n[r],o={TARIFFID:i.tariffId};void 0!==i.deviceId&&(o.HARDWAREID=i.deviceId),void 0!==i.SIMcardId&&(o.SIMCARDID=i.SIMcardId),this.putOptionalItemsToBasket(i,o),t.push(o)}return t},e.prototype.putOptionalItemsToBasket=function(e,t){void 0!==e.selectedServices&&0<e.selectedServices.length&&(t.SERVICES=this.addServicesToBasketItem(e.selectedServices)),void 0!==e.selectedDiscounts&&0<e.selectedDiscounts.length&&(t.DISCOUNTS=this.addDiscountsToBasketItem(e.selectedDiscounts)),void 0!==e.redPlusItems&&0<e.redPlusItems.length&&(t.SECONDCARD=this.addSecondCardsToBasketItem(e.redPlusItems))},e.prototype.putNewContractIntoBasket=function(e){this._basketObj.sChan=this._sChan;var t={TARIFFID:e.tariffId||0};void 0!==e.deviceId&&(t.HARDWAREID=e.deviceId),void 0!==e.SIMcardId&&(t.SIMCARDID=e.SIMcardId),this.putOptionalItemsToBasket(e,t),void 0===this._basketObj.NEW&&(this._basketObj.NEW=[]),this._basketObj.NEW.push(t)},e.prototype.putContractProlongationIntoBasket=function(e,t,r,n){this._basketObj.sChan=this._sChan,this._basketObj.customerSegment=this._customerSegment;var i={PROLONGATIONTYPE:t,TARIFFID:e.tariffId};void 0!==e.deviceId&&(i.HARDWAREID=e.deviceId),void 0!==e.SIMcardId&&(i.SIMCARDID=e.SIMcardId),void 0!==r&&(i.CELLCODE=r),void 0!==n&&(i.newSIMCardNeeded=n),this.putOptionalItemsToBasket(e,i),this._basketObj.VVL=i},e.prototype.putTariffChangeIntoBasket=function(e,t){this._basketObj.sChan=this._sChan,this._basketObj.customerSegment=this._customerSegment;var r={TARIFFID:e.tariffId};void 0!==t&&(r.CELLCODE=t),this.putOptionalItemsToBasket(e,r),this._basketObj.tariffChange=r},e.prototype.putMultiSIMIntoBasket=function(e){this._basketObj.sChan=this._sChan;var t={SIMCARDID:e.SIMcardId||0};this.putOptionalItemsToBasket(e,t),void 0===this._basketObj.ultraCard&&(this._basketObj.ultraCard=[]),this._basketObj.ultraCard.push(t),e.deviceId&&this.putHardwareOnlyIntoBasket(e)},e.prototype.putSTONEIntoBasket=function(e){this._basketObj.sChan=this._sChan;var t={TARIFFID:e.tariffId};void 0!==e.deviceId&&(t.HARDWAREID=e.deviceId),void 0!==e.SIMcardId&&(t.SIMCARDID=e.SIMcardId),this.putOptionalItemsToBasket(e,t),this._basketObj.multicardContract=t},e.prototype.putSecondCardIntoBasket=function(e){this._basketObj.sChan=this._sChan;var t={TARIFFID:e.tariffId};void 0!==e.deviceId&&(t.HARDWAREID=e.deviceId),void 0!==e.SIMcardId&&(t.SIMCARDID=e.SIMcardId),this.putOptionalItemsToBasket(e,t),void 0===this._basketObj.SECONDCARD&&(this._basketObj.SECONDCARD=[]),this._basketObj.SECONDCARD.push(t)},e.prototype.putHardwareOnlyIntoBasket=function(e){this._basketObj.sChan=this._sChan;var t={HARDWAREID:e.deviceId||0};void 0===this._basketObj.HARDWAREONLY&&(this._basketObj.HARDWAREONLY=[]),this._basketObj.HARDWAREONLY.push(t)},e.prototype.sendBasketToShopBackend=function(e){var t=this;return void 0===e&&(e=!1),new Promise(function(r,n){t._commerceApi.putBasket(t._basketObj,e).then(function(e){r(e)},function(e){n(e)})})},e.prototype.getBasketFromShopBackend=function(){var e=this;return new Promise(function(t,r){e._commerceApi.getBasket().then(function(e){t(e)},function(e){r(e)})})},e.prototype.getBasketParamObject=function(){return this._basketObj},e.prototype.count=function(){var e=this;return new Promise(function(t,r){e._commerceApi.getCount().then(function(e){t(e)},function(e){r(e)})})},e.prototype.clearBasket=function(){this._basketObj={sChan:this._sChan}},e.prototype.setOffer=function(e){this._offer=e},e.prototype.getOffer=function(){return this._offer},e.prototype.convertOfferToBasket=function(e){var t={};t.deviceId=e.atomicDeviceId,t.tariffId=e.atomicSubscriptionId,t.SIMcardId=e.simcardId,t.selectedDiscounts=[],t.selectedServices=[];for(var r=0,n=e.offerServices.getSelectedDiscounts();r<n.length;r++){var i=n[r];t.selectedDiscounts.push(i.id)}for(var o=0,a=e.offerServices.getSelectedServices();o<a.length;o++){var s=a[o];t.selectedServices.push(s.id)}return t},e.prototype.putNewContractOfferIntoBasket=function(e,t){var r=this.convertOfferToBasket(e);if(t)for(var n=0,i=t;n<i.length;n++){var o=i[n];r.redPlusItems||(r.redPlusItems=[]),r.redPlusItems.push(this.convertOfferToBasket(o))}return this.putNewContractIntoBasket(r),this._basketObj},e.prototype.putContractProlongationOfferIntoBasket=function(e,t,r,n,i){var o=this.convertOfferToBasket(e);if(r)for(var a=0,s=r;a<s.length;a++){var c=s[a];o.redPlusItems||(o.redPlusItems=[]),o.redPlusItems.push(this.convertOfferToBasket(c))}return this.putContractProlongationIntoBasket(o,t,n,i),this._basketObj},e.prototype.putSecondCardOfferIntoBasket=function(e){return this.putSecondCardIntoBasket(this.convertOfferToBasket(e)),this._basketObj},e.prototype.putHardwareOnlyOfferIntoBasket=function(e){return this.putHardwareOnlyIntoBasket(this.convertOfferToBasket(e)),this._basketObj},e.prototype.putMultiSIMOfferIntoBasket=function(e){return this.putMultiSIMIntoBasket(this.convertOfferToBasket(e)),this._basketObj},e.prototype.putTarifChangeOfferIntoBasket=function(e,t){this.putTariffChangeIntoBasket(this.convertOfferToBasket(e),t);var r=new Cookie,n=btoa(JSON.stringify(this._basketObj));return r.setCookie("basket-id",n,1),window.dispatchEvent(new CustomEvent("basketIdReady",{detail:{basketId:n}})),this._basketObj},e.prototype.putSTONEOfferIntoBasket=function(e){return this.putSTONEIntoBasket(this.convertOfferToBasket(e)),this._basketObj},e.prototype.putOfferGroupIntoBasket=function(e){if(this.clearBasket(),this.salesChannel=e.salesChannel,e.hasAdditionalAccessoryOffers()&&e.accessoryOffers)for(var t=0,r=e.accessoryOffers;t<r.length;t++){var n=r[t];this.putHardwareOnlyOfferIntoBasket(n)}return void 0!==e.customerSegment&&(this.customerSegment=e.customerSegment),e.btx===Constants.BTX_BNT?e.hasAdditionalRedplusOffers()?this.putNewContractOfferIntoBasket(e.mainOffer,e.redplusOffers):this.putNewContractOfferIntoBasket(e.mainOffer):e.mainOffer.btx===Constants.BTX_VVL?this.putContractProlongationOfferIntoBasket(e.mainOffer,e.prolongationType,e.redplusOffers,e.cellcode,e.newSimCardNeeded):e.btx===Constants.BTX_INLIFE?this.putTarifChangeOfferIntoBasket(e.mainOffer,e.cellcode):e.btx===Constants.BTX_REDPLUS?this.putSecondCardOfferIntoBasket(e.mainOffer):e.btx===Constants.BTX_HARDWARE?this.putHardwareOnlyOfferIntoBasket(e.mainOffer):e.btx===Constants.BTX_MULTISIM?this.putMultiSIMOfferIntoBasket(e.mainOffer):e.btx===Constants.BTX_STONE&&this.putSTONEOfferIntoBasket(e.mainOffer),this._basketObj},e.prototype.checkSimCardIds=function(e,t,r){return void 0===t||void 0===r.redPlusItems||0===r.redPlusItems.length||(e.isEsimOffer&&e.hasESimAndTripleSim&&(r.SIMcardId=e.getCorrespondingSimcardId()),t.forEach(function(e,t){e.isEsimOffer&&e.hasESimAndTripleSim&&(r.redPlusItems[t].SIMcardId=e.getCorrespondingSimcardId())})),r},e}(),OfferCostCollection=function(){function e(e){this._totalSaving=0,this._oneTimeTotal=0,this._oneTimeSaving=0,this._oneTimeConnectionFees=0,this._monthlyTotal=0,this._monthlySaving=0,this._costsAfterRuntime=[],this.alreadyExpired=[],this._offer=e;
1for(var t=0,r=this._offer.offerComponents.components;t<r.length;t++){var n=r[t];switch(n.type){case"tariffMobile":this._subscriptionComponent=n;break;case"hardwareMobile":case"accessoryMobile":this._devicePrice=n.prices;break;case"simMobile":this._simComponent=n}}}return e.prototype.getDeviceCost=function(e){var t;e?(t=this._devicePrice.filter(function(e){return"onetime"===e.recurrenceUnit})).length>1&&(t=t.filter(function(e){return e._label&&e._label.toLowerCase().indexOf("finanzierung one time charge")>=0})):t=this._devicePrice;for(var r=0,n=t;r<n.length;r++){var i=n[r];0<i.value&&(this._oneTimeTotal+=i.value)}},e.prototype.getSubscriptionCost=function(e){if(void 0!==e){var t=e.prices;this._subLevel=e.subLevel;for(var r=0,n=t;r<n.length;r++){var i=n[r],o=i.dependencyGroups,a=!0;0<o.length&&(a=this.dissolveDependencies(o)),a&&("month"===i.recurrenceUnit?(this._monthlyTotal+=i.value,this.executePriceAfterRuntime(i,"subscription")):(this._oneTimeTotal+=i.value,this._oneTimeConnectionFees+=i.value))}}},e.prototype.dissolveDependencies=function(e){for(var t=0,r=e;t<r.length;t++){if(!1===r[t].dissolveDependencies(this._offer,this._offer.offerDependencies.offerDependencyValues))return!1}return!0},e.prototype.calculateSelectedServicesAndDiscounts=function(){var e=this._offer.offerServices.getSelectedServiceIds();if(0<e.length)for(var t=0,r=e;t<r.length;t++){var n=r[t],i=this._offer.offerServices.getServiceById(n);if(void 0!==i)for(var o=0,a=i.prices;o<a.length;o++){var s=a[o];if(0!==s.value){if("month"===s.recurrenceUnit){this._monthlyTotal+=s.value,0>s.value&&(this._monthlySaving+=s.value);var c=i.hasDependencyWithUsecase(["voucher"]),u=!1;i.prices&&0<i.prices.length&&0<i.prices[0].value&&(u=!0),i.tradeInCard&&(u=!0),this.executePriceAfterRuntime(s,i.serviceType,c||u)}"onetime"===s.recurrenceUnit&&(this._oneTimeTotal+=s.value,0>s.value&&(this._oneTimeSaving+=s.value))}}}},e.prototype.calculateCost=function(){var e;this.resetPrices(),this.initPriceAfterRuntime();var t=!1;switch(this._offer.offerComponents&&this._offer.offerComponents.subscription&&this._offer.offerComponents.subscription.getEnrichedData&&(e=this._offer.offerComponents.subscription.getEnrichedData())&&e.isDeviceFinance&&(t=e.isDeviceFinance),this._offer.offerType){case"HardwareOnlyOffer":this.getDeviceCost();break;case"SIMonlyOffer":this.getSubscriptionCost(this._subscriptionComponent);break;case"SimHardwareOffer":this.getSubscriptionCost(this._subscriptionComponent),this.getDeviceCost(t);break;case"MultiSimOffer":this.getSubscriptionCost(this._simComponent)}this.calculateSelectedServicesAndDiscounts(),this.fixPriceAfterRuntime()},e.prototype.initPriceAfterRuntime=function(){for(var e=1;e<=24;e++){var t={month:e,totalCost:0,tariffOnly:0,saving:0,totalCostWithoutVouchersAndServices:0,expiredSocs:[]};this._costsAfterRuntime.push(t)}},e.prototype.resetPrices=function(){this._totalSaving=0,this._oneTimeTotal=0,this._oneTimeConnectionFees=0,this._oneTimeSaving=0,this._monthlyTotal=0,this._monthlySaving=0,this._subLevel=void 0,this._costsAfterRuntime=[]},e.prototype.isExpiredSoc=function(e){for(var t=0;t<this.isExpiredSoc.length;t++)if(this.alreadyExpired[t]===e)return!0;return!1},e.prototype.getExpiredSocs=function(e){this.alreadyExpired=[];var t=[],r=this._offer.offerServices.getSelectedServiceIds();if(0<r.length)for(var n=0,i=r;n<i.length;n++){var o=i[n],a=this._offer.offerServices.getServiceById(o);if(void 0!==a)for(var s=0,c=a.prices;s<c.length;s++){var u=c[s];0!==u.value&&"month"===u.recurrenceUnit&&u.recurrenceEnd<e&&(this.isExpiredSoc(a)||(t.push(a),this.alreadyExpired.push(a)))}}return t},e.prototype.executePriceAfterRuntime=function(e,t,r){void 0===r&&(r=!1);for(var n=e.recurrenceStart;n<=e.recurrenceEnd;n++)for(var i=0,o=this._costsAfterRuntime;i<o.length;i++){var a=o[i];n===a.month&&(a.totalCost+=e.value,r||(a.totalCostWithoutVouchersAndServices+=e.value),"subscription"!==t&&"discount"!==t||(void 0!==this._subLevel?a.tariffOnly=a.totalCost-this._subLevel:a.tariffOnly=a.totalCost),0>e.value&&(a.saving+=Math.abs(e.value)))}},e.prototype.fixPriceAfterRuntime=function(){for(var e=void 0,t=[],r=0,n=this._costsAfterRuntime;r<n.length;r++){var i=n[r];if(e!=i.totalCost){var o=this.getExpiredSocs(i.month),a={month:i.month,totalCost:+i.totalCost.toFixed(2),tariffOnly:+i.tariffOnly.toFixed(2),saving:+i.saving.toFixed(2),totalCostWithoutVouchersAndServices:+i.totalCostWithoutVouchersAndServices.toFixed(2),expiredSocs:o};t.push(a),e=i.totalCost}0<i.saving&&(this._totalSaving+=i.saving)}this._costsAfterRuntime=t,this._totalSaving=+this._totalSaving.toFixed(2),this._oneTimeTotal=+this._oneTimeTotal.toFixed(2),this._oneTimeConnectionFees=+this._oneTimeConnectionFees.toFixed(2),this._oneTimeSaving=+this._oneTimeSaving.toFixed(2),this._monthlyTotal=+this._monthlyTotal.toFixed(2),this._monthlySaving=+this._monthlySaving.toFixed(2)},Object.defineProperty(e.prototype,"totalSaving",{get:function(){return this._totalSaving}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"oneTimeTotal",{get:function(){return this._oneTimeTotal},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"oneTimeConnectionFees",{get:function(){return this._oneTimeConnectionFees},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"oneTimeSaving",{get:function(){return this._oneTimeSaving},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"monthlyTotal",{get:function(){return this._monthlyTotal},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"monthlySaving",{get:function(){return this._monthlySaving},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subLevel",{get:function(){return this._subLevel},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subcriptionPrice",{get:function(){if(this._subscriptionComponent&&this._subscriptionComponent.prices)return this._subscriptionComponent.prices},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"costsAfterRuntime",{get:function(){return this._costsAfterRuntime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subcriptionPriceOnetime",{get:function(){if(this._subscriptionComponent&&this._subscriptionComponent.prices)for(var e=0,t=this._subscriptionComponent.prices;e<t.length;e++){var r=t[e];if("onetime"===r.recurrenceUnit)return r}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subcriptionPriceMonthly",{get:function(){if(this._subscriptionComponent&&this._subscriptionComponent.prices)for(var e=0,t=this._subscriptionComponent.prices;e<t.length;e++){var r=t[e],n=r.dependencyGroups,i=!0;if(0<n.length&&(i=this.dissolveDependencies(n)),i&&"month"===r.recurrenceUnit)return r}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subcriptionPriceMonthlyWithoutSubLevel",{get:function(){var e=this.subcriptionPriceMonthly;if(void 0!==e&&void 0!==this._subLevel)return parseFloat((e.value-this._subLevel).toFixed(2))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"devicePriceOnetime",{get:function(){if(this._devicePrice)for(var e=0,t=this._devicePrice;e<t.length;e++){var r=t[e];if("onetime"===r.recurrenceUnit)return r}},enumerable:!1,configurable:!0}),e}(),OfferDependency=function(){function e(e){this._key=e.key,this._value=e.value,this._type=e.type}return Object.defineProperty(e.prototype,"key",{get:function(){return this._key},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"valueAsNumber",{get:function(){return parseInt(this._value,10)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),e.prototype.isIncompatible=function(e){return"incompatible"===this._type&&e===this.valueAsNumber},e.prototype.hasIncompatibility=function(e){for(var t=0,r=e;t<r.length;t++){var n=r[t];if(this.isIncompatible(n))return!0}return!1},e.prototype.isDependencyDissolvable=function(e,t){if("subscriptionId"===this._key)return this.isDissolvableAgainstServiceDependency(e);var r=this.isDissolvableAgainstOfferDependencies(e,t),n=r.match,i=r.dissolvable;return!!n&&i},e.prototype.isDissolvableAgainstOfferDependencies=function(e,t){for(var r=0,n=t=t?t.concat(e.offerDependencies.offerDependencyValues):e.offerDependencies.offerDependencyValues;r<n.length;r++){var i=n[r];if(i.key===this._key&&i.value===this._value)return{match:!0,dissolvable:"requires"===this._type}}return{match:!1,dissolvable:!1}},e.prototype.isDissolvableAgainstServiceDependency=function(e){return-1===e.offerServices.getSelectedServiceIds().indexOf(this.valueAsNumber)?"requires"!==this._type:"incompatible"!==this._type},e}(),OfferDependencyGroup=function(){function e(e){this._dependencies=[],this._key=e.key}return Object.defineProperty(e.prototype,"key",{get:function(){return this._key},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dependencies",{get:function(){return this._dependencies}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"logicalOperator",{get:function(){return this._logicalOperator},set:function(e){this._logicalOperator=e},enumerable:!1,configurable:!0}),e.prototype.addDependency=function(e){this._dependencies.push(new OfferDependency(e))},e.prototype.dissolveDependencies=function(e,t){switch(this._logicalOperator){case"or":return this.oneDependenciesDissolvable(e,t);case"and":return this.allDependenciesDissolvable(e,t);default:return!1}},e.prototype.allDependenciesDissolvable=function(e,t){for(var r=0,n=this._dependencies;r<n.length;r++){if(!n[r].isDependencyDissolvable(e,t))return!1}return!0},e.prototype.oneDependenciesDissolvable=function(e,t){for(var r=0,n=this._dependencies;r<n.length;r++){if(n[r].isDependencyDissolvable(e,t))return!0}return!1},e.prototype.hasIncompatibility=function(e,t){switch(this._logicalOperator){case"or":return this.hasOneIncompatibility(e);case"and":return this.hasAllIncompatibilities(e,t);default:return!1}},e.prototype.hasOneIncompatibility=function(e){for(var t=0,r=this._dependencies;t<r.length;t++){if(r[t].isIncompatible(e))return!0}return!1},e.prototype.hasAllIncompatibilities=function(e,t){for(var r,n=0,i=this._dependencies;n<i.length;n++){var o=i[n];if((r=o.isIncompatible(e))||(r=o.hasIncompatibility(t)),!r)return!1}return!0},e}(),OfferPrice=function(){function e(e,t){this._dependencyGroups=[],this._value=this.getPrice(e,t),this._recurrenceUnit=e.recurrenceUnit,this._recurrenceStart=parseInt(e.recurrenceStart,10),this._recurrenceEnd=24,void 0!==e.recurrenceEnd&&""!==e.recurrenceEnd&&(this._recurrenceEnd=parseInt(e.recurrenceEnd,10)),this._label=e.label,this._strikePrice=this.getStrikePrice(e,t),void 0!==e.dependencies&&void 0!==e.dependencies.dependencyGroup&&(this._dependencyGroups=e.dependencies.dependencyGroup.map(function(e){return new OfferDependencyGroup(e)}))}return e.prototype.getPrice=function(e,t){if(Constants.SALESCHANNEL_ENTERPRISE===t){if(e.net)return this.convertPriceToFloat(e.net)}else if(e.gross)return this.convertPriceToFloat(e.gross);return this.convertPriceToFloat(e.value)},e.prototype.getStrikePrice=function(e,t){if(Constants.SALESCHANNEL_ENTERPRISE===t){if(e.netStrikePrice)return this.convertPriceToFloat(e.netStrikePrice)}else if(e.grossStrikePrice)return this.convertPriceToFloat(e.grossStrikePrice);return 0},e.prototype.convertPriceToFloat=function(e){return"number"!=typeof e&&(e=parseFloat(e.replace(",","."))),e},e.prototype.addToValue=function(e){this._value+=e},Object.defineProperty(e.prototype,"dependencyGroups",{get:function(){return this._dependencyGroups},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"recurrenceUnit",{get:function(){return this._recurrenceUnit},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"recurrenceStart",{get:function(){return this._recurrenceStart},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"recurrenceEnd",{get:function(){return this._recurrenceEnd},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return this._label},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"strikePrice",{get:function(){return this._strikePrice},enumerable:!1,configurable:!0}),e}(),OfferComponent=function(){function e(e,t){if(this._prices=[],this._type=e.type,this._internalLabel=e.internalLabel,this._refId=parseFloat(e.refId),void 0!==e.prices&&void 0!==e.prices.price)for(var r=0,n=e.prices.price;r<n.length;r++){var i=n[r];this._prices.push(new OfferPrice(i,t))}}return Object.defineProperty(e.prototype,"prices",{get:function(){return this._prices},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"internalLabel",{get:function(){return this._internalLabel},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"refId",{get:function(){return this._refId}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attributes",{get:function(){return this._attributes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"atomicDataVolume",{get:function(){return this._atomicDataVolume},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subLevel",{get:function(){if(void 0!==this._enrichedDataSubscription)return this._enrichedDataSubscription.sublevel},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mainTariffId",{get:function(){if(void 0!==this._enrichedDataSubscription)return this._enrichedDataSubscription.mainTariffId},enumerable:!1,configurable:!0}),e.prototype.enrichDataForSubscription=function(e){this._enrichedDataSubscription={mainTariffId:e.mainTariffId,label:e.label,sublevel:e.sublevel,backendId:e.backendId,isDeviceFinance:e.isDeviceFinance},void 0!==e.attributes&&(this._attributes=e.attributes),void 0!==e.atomicDataVolume&&(this._atomicDataVolume=e.atomicDataVolume)},e.prototype.enrichDataForDevice=function(e){this._enrichedDataDevice={label:e.label,deviceLabel:e.deviceLabel,productType:e.productType,backendId:e.backendId},void 0!==e.attributes&&(this._attributes=e.attributes)},e.prototype.enrichDataForSIMCard=function(e){this._enrichedDataSimCard={label:e.label,isEsim:void 0!==e.attributes&&void 0!==e.attributes.simType&&void 0!==e.attributes.simType.find(function(e){return e.toLowerCase().indexOf("esim")>-1}),isOneNumber:this._refId===Constants.SimCardId_ESimAsOneNumber||this._refId===Constants.SimCardId_TripleSimAsOneNumber},void 0!==e.attributes&&(this._attributes=e.attributes)},e.prototype.getEnrichedData=function(){var e=void 0;switch(this._type){case"tariffMobile":e=this._enrichedDataSubscription;break;case"hardwareMobile":case"accessoryMobile":e=this._enrichedDataDevice;break;case"simMobile":e=this._enrichedDataSimCard}return e},e}(),OfferComponents=function(){function e(e,t){this._components=[],this._offer=e;for(var r=0,n=t;r<n.length;r++){var i=n[r];switch(this._components.push(new OfferComponent(i,this._offer.salesChannel)),i.type){case"tariffMobile":this._offer.atomicSubscriptionId=parseInt(i.refId,10);break;case"hardwareMobile":case"accessoryMobile":this._offer.atomicDeviceId=parseInt(i.refId,10);break;case"simMobile":this._offer.simcardId=parseInt(i.refId,10)}}}return Object.defineProperty(e.prototype,"components",{get:function(){return this._components},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"device",{get:function(){if("HardwareOnlyOffer"===this._offer.offerType||"SimHardwareOffer"===this._offer.offerType)for(var e=0,t=this._components;e<t.length;e++){var r=t[e];if("hardwareMobile"===r.type||"accessoryMobile"===r.type)return r}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subscription",{get:function(){if("SIMonlyOffer"===this._offer.offerType||"SimHardwareOffer"===this._offer.offerType)for(var e=0,t=this._components;e<t.length;e++){var r=t[e];if("tariffMobile"===r.type)return r}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"simcard",{get:function(){if("HardwareOnlyOffer"!==this._offer.offerType)for(var e=0,t=this._components;e<t.length;e++){var r=t[e];if("simMobile"===r.type)return r}},enumerable:!1,configurable:!0}),e}(),OfferService=function(){function e(e,t,r){void 0===t&&(t=!1),this._backendId="",this._label="",this._description="",this._postRuntimeDescription="",this._subscriptionType="",this._prices=[],this._dataVolume=0,this._unlimited=!1,this._hidden=!1,this._reference="tariff",this._mandatory=!1,this._dependencyGroups=[],this._tradeInCard=!1,this._tradeInCardSortOrder=0,this._id=parseInt(e.id,10),void 0!==e.cellcodes&&(this._cellcodes=e.cellcodes),void 0!==e.prices&&void 0!==e.prices.price&&void 0!==e.prices.price.map&&(this._prices=e.prices.price.map(function(e){return new OfferPrice(e,r)})),void 0!==e.dependencies&&void 0!==e.dependencies.dependencyGroup&&(this._dependencyGroups=e.dependencies.dependencyGroup.map(function(e){return new OfferDependencyGroup(e)})),t&&(this._mandatory=t)}return e.prototype.enrichData=function(e){this._label=e.label,this._description=e.description,this._postRu
1ntimeDescription=e.postRuntimeDescription,this._backendId=e.backendId,this._serviceType=e.serviceType,this._hidden=e.hidden,this._dataVolume=e.dataVolume,this._unlimited=e.unlimited,this._subscriptionType=e.subscriptionType,this._tradeInCard=e.attr.tradeInCard,this._tradeInCardSortOrder=e.attr.tradeInCardSortOrder},e.prototype.setReference=function(e){this._reference=e},Object.defineProperty(e.prototype,"dependencyGroups",{get:function(){return this._dependencyGroups},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"serviceType",{get:function(){return this._serviceType},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backendId",{get:function(){return this._backendId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return this._label},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"description",{get:function(){return this._description},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"postRuntimeDescription",{get:function(){return this._postRuntimeDescription},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"prices",{get:function(){return this._prices},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataVolume",{get:function(){return this._dataVolume},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"unlimited",{get:function(){return this._unlimited},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hidden",{get:function(){return this._hidden},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cellcodes",{get:function(){return this._cellcodes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mandatory",{get:function(){return this._mandatory},set:function(e){this._mandatory=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subscriptionType",{get:function(){return this._subscriptionType},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"reference",{get:function(){return this._reference},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"monthlyPrice",{get:function(){var e=[];try{e=this._prices.filter(function(e){return"month"===e.recurrenceUnit})}catch(e){}if(0!==e.length)return e[0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onetimePrice",{get:function(){var e=[];try{e=this._prices.filter(function(e){return"onetime"===e.recurrenceUnit})}catch(e){}if(0!==e.length)return e[0]},enumerable:!1,configurable:!0}),e.prototype.hasDependencyWithUsecase=function(e,t){if(void 0===t&&void 0===e)return!1;if(void 0===e&&(e=["voucher","scenario"]),-1<e.indexOf("cellcode"))return void 0!==this._cellcodes&&void 0!==t&&-1!==this._cellcodes.indexOf(t);if(0==this._dependencyGroups.length)return!1;for(var r=0,n=this._dependencyGroups;r<n.length;r++)for(var i=0,o=n[r].dependencies;i<o.length;i++){var a=o[i];if(-1<e.indexOf(a.key)){if(void 0===t)return!0;if(t===a.value)return!0}}return!1},e.prototype.getDependencies=function(e,t,r){for(var n=[],i=0,o=this._dependencyGroups;i<o.length;i++)for(var a=0,s=o[i].dependencies;a<s.length;a++){var c=s[a];-1<e.indexOf(c.key)&&(void 0!==r&&r!==c.value||void 0!==t&&t!==c.type||n.push(c))}return n},Object.defineProperty(e.prototype,"tradeInCard",{get:function(){return this._tradeInCard},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tradeInCardSortOrder",{get:function(){return this._tradeInCardSortOrder},enumerable:!1,configurable:!0}),e}(),OfferServiceGroup=function(){function e(e,t){this._type="",this._selectable="",this._services=[],this._id=e.id,this._label=e.internalLabel,this._maxOccurs=parseInt(e.maxOccurs,10),this._minOccurs=parseInt(e.minOccurs,10),this._selectable=this._minOccurs<this._maxOccurs?"optional":"included";var r=!1;this._maxOccurs<=e.service.length&&"included"===this._selectable&&(r=!0),"Alterslegitimierung erforderlich"===e.internalLabel&&(r=!1),this._services=e.service.map(function(e){return new OfferService(e,r,t)})}return e.prototype.isGigakombiServiceGroup=function(){return 0<this._services.filter(function(e){return 177===e.id||612===e.id||618===e.id||1637===e.id}).length},e.prototype.isPrivatepricingServiceGroup=function(){return 0===this._services.filter(function(e){return"PrivatePricing"!==e.subscriptionType}).length},Object.defineProperty(e.prototype,"services",{get:function(){return this._services},set:function(e){this._services=e}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return this._label},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectable",{get:function(){return this._selectable},set:function(e){this._selectable=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minOccurs",{get:function(){return this._minOccurs},set:function(e){this._minOccurs=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},set:function(e){this._type=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxOccurs",{get:function(){return this._maxOccurs},set:function(e){this._maxOccurs=e},enumerable:!1,configurable:!0}),e}(),OfferServiceListItem=function(){function e(e,t,r,n,i){this._type="",this._mandatory=!1,this._blockedBy=[],this._requiredBy=[],this._id=e,this._serviceGroupId=t,this._type=r,n&&(this._mandatory=n),i&&this.requiredByService(i)}return e.prototype.blockedByService=function(e){this._blockedBy.push(e)},e.prototype.removeBlockedByService=function(e){for(var t=this._blockedBy.length-1;t>=0;t--)e===this._blockedBy[t]&&this._blockedBy.splice(t)},e.prototype.requiredByService=function(e){this._requiredBy.push(e)},e.prototype.removeRequiredByService=function(e){for(var t=this._requiredBy.length-1;t>=0;t--)e===this._requiredBy[t]&&this._requiredBy.splice(t)},Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"serviceGroupId",{get:function(){return this._serviceGroupId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mandatory",{get:function(){return this._mandatory},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blockedBy",{get:function(){return this._blockedBy},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requiredBy",{get:function(){return this._requiredBy},enumerable:!1,configurable:!0}),e}(),OfferServices=function(){function e(e,t){this._serviceGroups=[],this._selectedServiceList=[],this._blockedServiceList=[],this._offer=e;try{this._serviceGroups=t.serviceGroup.map(function(t){return new OfferServiceGroup(t,e.salesChannel)})}catch(e){}}return Object.defineProperty(e.prototype,"serviceGroups",{get:function(){return this._serviceGroups},set:function(e){this._serviceGroups=e},enumerable:!1,configurable:!0}),e.prototype.getServiceById=function(e){for(var t=0,r=this._serviceGroups;t<r.length;t++)for(var n=0,i=r[t].services;n<i.length;n++){var o=i[n];if(e===o.id)return o}},e.prototype.setSelectedServicesById=function(e){this._selectedServiceList=[];for(var t=0,r=e;t<r.length;t++){for(var n=r[t],i=void 0,o=void 0,a=0,s=this._serviceGroups;a<s.length;a++){for(var c=s[a],u=0,l=c.services;u<l.length;u++){var d=l[u];if(n===d.id){i=d,o=c;break}}if(i)break}void 0!==i&&void 0!==o&&(this._selectedServiceList.push(new OfferServiceListItem(i.id,o.id,o.type,i.mandatory)),i=void 0,o=void 0)}this._offer.offerCosts.calculateCost()},e.prototype.setSelectedServicesByBasketItem=function(e,t){void 0===t&&(t=!1);var r=[];if(e.DISCOUNTS)for(var n=0,i=e.DISCOUNTS;n<i.length;n++){var o=i[n];r.push(parseInt(o.DISCOUNTID,10))}if(e.SERVICES)for(var a=0,s=e.SERVICES;a<s.length;a++){var c=s[a];r.push(parseInt(c.SERVICEID,10))}if(r.length>0)if(t)for(var u=0,l=r;u<l.length;u++){var d=l[u];this.addSelectedService(d)}else this.setSelectedServicesById(r)},e.prototype.addSelectedService=function(e,t,r){var n=this.getGroupAndServiceByServiceId(e),i=n.serviceGroup,o=n.service;return void 0!==o&&void 0!==i&&(!!this.serviceAlreadyAdded(o)||!this.serviceLimitReached(i)&&(!!this.isDependencyGroupDissolvable(o,t)&&(!this.isBlockedBySelectedService(o)&&(!!this.addSelectedServiceListItem(i,o,r)&&(this._offer.offerCosts.calculateCost(),!0)))))},e.prototype.addSelectedServiceListItem=function(e,t,r){var n=this._selectedServiceList.length,i=new OfferServiceListItem(t.id,e.id,e.type,t.mandatory,r);return this._selectedServiceList.push(i),n!=this._selectedServiceList.length},e.prototype.removeSelectedService=function(e,t){for(var r=this._selectedServiceList.length-1;r>=0;r--){if(e===this._selectedServiceList[r].id){if(0<(m=this._selectedServiceList[r]).requiredBy.length)return!1;if(m.mandatory&&void 0===t)return!1;t&&(m.blockedByService(t),this.addBlockedService(m)),this._selectedServiceList.splice(r,1);for(var n=0,i=this._selectedServiceList;n<i.length;n++){i[n].removeRequiredByService(e)}for(var o=this._blockedServiceList.length-1;o>=0;o--){var a=this._blockedServiceList[o];a.removeBlockedByService(e),0===a.blockedBy.length&&(a.mandatory&&(this.addSelectedService(a.id),this.removeBlockedService()),this._blockedServiceList.splice(o,1))}return this._offer.offerCosts.calculateCost(),!0}(s=this.getGroupAndServiceByServiceId(this._selectedServiceList[r].id).service)&&(0<s.getDependencies(["subscriptionId"],"requires",e+"").length&&this._selectedServiceList.splice(r,1))}if(t){for(var s=void 0,c=void 0,u=0,l=this._serviceGroups;u<l.length;u++){for(var d=l[u],p=0,f=d.services;p<f.length;p++){var h=f[p];if(e===h.id){s=h,c=d;break}}if(s)break}if(void 0===s||void 0===c)return!0;var m;(m=new OfferServiceListItem(s.id,c.id,c.type,s.mandatory)).blockedByService(t),this.addBlockedService(m)}return!0},e.prototype.getSelectedServiceIds=function(){for(var e=[],t=0,r=this._selectedServiceList;t<r.length;t++){var n=r[t];e.push(n.id)}return e},e.prototype.getSelectedServices=function(){for(var e=[],t=0,r=this._selectedServiceList;t<r.length;t++){var n=r[t];"service"===n.type&&e.push(n)}return e},e.prototype.getSelectedServicesEnriched=function(){for(var e=[],t=0,r=this.getSelectedServices();t<r.length;t++){var n=r[t],i=this.getServiceById(n.id);void 0!==i&&e.push(i)}return e},e.prototype.getSelectedDiscounts=function(){for(var e=[],t=0,r=this._selectedServiceList;t<r.length;t++){var n=r[t];"discount"===n.type&&e.push(n)}return e},e.prototype.getSelectedServiceById=function(e){for(var t=0,r=this._selectedServiceList;t<r.length;t++){var n=r[t],i=this.getServiceById(n.id);
1if(i&&e===i.id)return i}},e.prototype.getNetflixServices=function(){var e=this,t=Constants.NetflixIds.map(function(t){return e.getSelectedServiceById(t)||null}),r=t[0];return{netflixBase:r,netflixStandard:t[1],netflixPremium:t[2],isNetflix:!!r}},e.prototype.getNetflixDiscount=function(){return this.getSelectedServiceById(Constants.NetflixDiscountId)||null},e.prototype.getSelectedDiscountsEnriched=function(){for(var e=[],t=0,r=this._selectedServiceList;t<r.length;t++){var n=r[t];if("discount"===n.type){var i=this.getServiceById(n.id);void 0!==i&&e.push(i)}}return e},e.prototype.getSelectedDiscountsEnrichedByRecurrenceUnit=function(e){for(var t=[],r=0,n=this._selectedServiceList;r<n.length;r++){var i=n[r];if("discount"===i.type){var o=this.getServiceById(i.id);(void 0!==o&&0<o.prices.length&&e===o.prices[0].recurrenceUnit||void 0!==o&&0===o.prices.length&&"onetime"===e)&&t.push(o)}}return t},e.prototype.getSelectedServicesAndDiscountsEnriched=function(){return this.getSelectedDiscountsEnriched().concat(this.getSelectedServicesEnriched())},e.prototype.setBlockedServices=function(e){return this._blockedServiceList=e,!0},e.prototype.addBlockedService=function(e){this._blockedServiceList.push(e)},e.prototype.removeBlockedService=function(){for(var e=this._blockedServiceList.length-1;e>=0;e--){this._blockedServiceList.splice(e,1);break}},e.prototype.getBlockedServices=function(){return this._blockedServiceList},e.prototype.getOptionalServices=function(){var e;return 0===(e=this._serviceGroups.filter(function(e){return"service"===e.type&&"optional"===e.selectable})).length?[]:e},e.prototype.getIncludedServices=function(){var e;return 0===(e=this._serviceGroups.filter(function(e){return"service"===e.type&&"included"===e.selectable})).length?[]:e},e.prototype.getOptionalDiscounts=function(){var e;return 0===(e=this._serviceGroups.filter(function(e){return"discount"===e.type&&"optional"===e.selectable})).length?[]:e},e.prototype.getIncludedDiscounts=function(){var e;return 0===(e=this._serviceGroups.filter(function(e){return"discount"===e.type&&"included"===e.selectable})).length?[]:e},e.prototype.getIncludedInsurance=function(){for(var e=0,t=this.getOptionalServices();e<t.length;e++)for(var r=0,n=t[e].services;r<n.length;r++){var i=n[r],o=0;if(void 0!==i.monthlyPrice&&(o=i.monthlyPrice.value),Constants.InsuranceServiceIds.indexOf(i.id)>-1&&0===o)return i}},e.prototype.getInsurance=function(){for(var e=0,t=this.getOptionalServices();e<t.length;e++)for(var r=0,n=t[e].services;r<n.length;r++){var i=n[r];if(Constants.InsuranceServiceIds.indexOf(i.id)>-1)return i}},e.prototype.hasIncludedInsurance=function(){return void 0!==this.getIncludedInsurance()},e.prototype.hasSelectedInsurance=function(){for(var e=0,t=this._selectedServiceList;e<t.length;e++){var r=t[e];if(Constants.InsuranceServiceIds.indexOf(r.id)>-1)return!0}return!1},e.prototype.getGroupAndServiceByServiceId=function(e){for(var t=0,r=this._serviceGroups;t<r.length;t++)for(var n=r[t],i=0,o=n.services;i<o.length;i++){var a=o[i];if(e===a.id)return{serviceGroup:n,service:a}}return{serviceGroup:void 0,service:void 0}},e.prototype.serviceLimitReached=function(e){return this._selectedServiceList.filter(function(t){return e.id===t.serviceGroupId}).length>=e.maxOccurs},e.prototype.serviceAlreadyAdded=function(e){return void 0!==this._selectedServiceList.find(function(t){return e.id===t.id})},e.prototype.serviceIdAlreadyAdded=function(e){return void 0!==this._selectedServiceList.find(function(t){return e===t.id})},e.prototype.isDependencyGroupDissolvable=function(e,t){for(var r=0,n=e.dependencyGroups;r<n.length;r++){if(!n[r].dissolveDependencies(this._offer,t))return!1}return!0},e.prototype.isBlockedBySelectedService=function(e){for(var t=this.getSelectedServicesAndDiscountsEnriched(),r=t.map(function(e){return e.id}),n=0,i=t;n<i.length;n++)for(var o=0,a=i[n].dependencyGroups;o<a.length;o++){if(a[o].hasIncompatibility(e.id,r))return!0}return!1},e}(),OfferDependencies=function(){function e(e){this._offerDependencyValues=[],this._offer=e}
1return Object.defineProperty(e.prototype,"offerDependencyValues",{get:function(){return this._offerDependencyValues},set:function(e){this._offerDependencyValues=e},enumerable:!1,configurable:!0}),e.prototype.getServiceIdsByUsecase=function(e,t){for(var r=[],n=0,i=this._offer.offerServices.getOptionalServices().concat(this._offer.offerServices.getOptionalDiscounts());n<i.length;n++)for(var o=0,a=i[n].services;o<a.length;o++){var s=a[o];s.hasDependencyWithUsecase(e,t)&&r.push(s.id)}return r},e}(),OfferDependencyValue=function(){function e(e,t){this._key=e,this._value=t}return Object.defineProperty(e.prototype,"key",{get:function(){return this._key},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),e}(),Offer=function(){function e(e,t){this._contextAttribute=[],this._btx=e,this._vluxData=t,this._id=t.id,this._sourceId=parseFloat(t.sourceId),this._sourceLabel=t.sourceLabel,this._contextAttribute=t.contextAttributes.contextAttribute,this._salesChannel=this.getSalesChannelFromContextAttributes(),this._salesChannel=this.getSalesChannelFromContextAttributes(),this._isPrivatePricingOffer=!1,this._offerComponents=new OfferComponents(this,t.components.component),this._offerServices=new OfferServices(this,t.services),this._offerCosts=new OfferCostCollection(this),this._offerDependencies=new OfferDependencies(this),this._isRedPlusOffer=!1,this.setOfferAttributes()}return e.prototype.getSalesChannelFromContextAttributes=function(){for(var e=0,t=this._contextAttribute;e<t.length;e++){var r=t[e];if("salesChannel"===r.type)return r.value}},Object.defineProperty(e.prototype,"btx",{get:function(){return this._btx},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"salesChannel",{get:function(){return this._salesChannel},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"vluxData",{get:function(){return this._vluxData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sourceId",{get:function(){return this._sourceId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pid",{get:function(){return this._pid},set:function(e){this._pid=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"atomicSubscriptionId",{get:function(){if(this._atomicSubscriptionId)return this._atomicSubscriptionId},set:function(e){this._atomicSubscriptionId=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"atomicDeviceId",{get:function(){if(this._atomicDeviceId)return this._atomicDeviceId},set:function(e){this._atomicDeviceId=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"simcardId",{get:function(){return this._SIMcardId},set:function(e){this._SIMcardId=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEsimOffer",{get:function(){return this._SIMcardId===Constants.SimCardId_ESimAsMainCard||this._SIMcardId===Constants.SimCardId_ESimAsOneNumber||this._SIMcardId===Constants.SimCardId_ESimAsMainCard_Suci},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasSuciSim",{get:function(){return this._SIMcardId===Constants.SimCardId_ESimAsMainCard_Suci||this._SIMcardId===Constants.SimCardId_TripleSimAsMainCard_Suci},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offerSimCardType",{get:function(){return this._offerSimCardType},set:function(e){this._offerSimCardType=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasESimOnly",{get:function(){return this._offerSimCardType===Constants.OfferSimCardType_ESimOnly},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasTripleSimOnly",{get:function(){return this._offerSimCardType===Constants.OfferSimCardType_TripleSimOnly},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasESimAndTripleSim",{get:function(){return this._offerSimCardType===Constants.OfferSimCardType_ESimAndTripleSim},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPrivatePricingOffer",{get:function(){return this._isPrivatePricingOffer},set:function(e){this._isPrivatePricingOffer=e}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offerId",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offerType",{get:function(){return this._offertype},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offerDependencies",{get:function(){return this._offerDependencies},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offerComponents",{get:function(){return this._offerComponents},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offerServices",{get:function(){return this._offerServices},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"contextAttributes",{get:function(){return this._contextAttribute},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offerCosts",{get:function(){return this._offerCosts},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"totalDataVolume",{get:function(){return this.getDataVolume()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"totalDataVolumewithoutVouchers",{get:function(){return this.getDataVolume(!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRedPlusOffer",{get:function(){return this._isRedPlusOffer},set:function(e){this._isRedPlusOffer=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isUnlimitedDataVolume",{get:function(){for(var e=0,t=this.offerServices.getSelectedServiceIds();e<t.length;e++){var r=t[e],n=this.offerServices.getServiceById(r);if(n&&n.unlimited)return!0}return!1},enumerable:!1,configurable:!0}),e.prototype.checkForSelectedServices=function(e){for(var t=0,r=this.offerServices.getSelectedServiceIds();t<r.length;t++){var n=r[t];if(0<=e.indexOf(n))return!0}return!1},e.prototype.getDataVolume=function(e){void 0===e&&(e=!1);var t=0;if(void 0!==this.offerComponents.subscription){var r=this.offerComponents.subscription.atomicDataVolume;void 0!==r&&(t+=parseInt(r,10))}for(var n=0,i=this.offerServices.getSelectedServiceIds();n<i.length;n++){var o=i[n],a=this.offerServices.getServiceById(o);if(void 0!==a)if(void 0!==a.dataVolume)if(e)a.hasDependencyWithUsecase(["voucher"])||(t+=a.dataVolume);else t+=a.dataVolume}return t>0?t:void 0},e.prototype.setOfferAttributes=function(){for(var e=0,t=this._contextAttribute;e<t.length;e++){var r=t[e];"btx"!==r.type?"salesChannel"!==r.type||(this._salesChannel=r.value):this._btx=r.value}void 0!==this._atomicSubscriptionId&&void 0!==this._atomicDeviceId?this._offertype="SimHardwareOffer":void 0!==this._atomicSubscriptionId?this._offertype="SIMonlyOffer":void 0!==this._atomicDeviceId?this._offertype="HardwareOnlyOffer":void 0!==this._SIMcardId&&(this._offertype="MultiSimOffer")},e.prototype.addVoucherServicesByCampaign=function(e){var t=this.getServiceIdsToAdd(e);if(0===t.length)return!1;for(var r=new OfferDependencyValue("voucher",e),n=!0,i=[],o=0,a=t;o<a.length;o++){var s=a[o];if(!this._offerServices.addSelectedService(s,[r])){n=!1;break}i.push(s)}return!1===n&&0<i.length&&this.removeVoucherServices(i),n},e.prototype.removeVoucherServices=function(e){for(var t=0,r=e;t<r.length;t++){var n=r[t];this._offerServices.removeSelectedService(n)}},e.prototype.getServiceIdsToAdd=function(e){var t=this;return this._offerDependencies.getServiceIdsByUsecase(["voucher"],e).filter(function(e){return!t._offerServices.serviceIdAlreadyAdded(e)})},e.prototype.getCorrespondingSimcardId=function(){return this.hasSuciSim?this.isEsimOffer?Constants.SimCardId_TripleSimAsMainCard_Suci:Constants.SimCardId_ESimAsMainCard_Suci:this.isEsimOffer?Constants.SimCardId_TripleSimAsMainCard:Constants.SimCardId_ESimAsMainCard},e.prototype.getDefaultSimcardId=function(){return this.hasSuciSim?this.isEsimOffer?Constants.SimCardId_ESimAsMainCard_Suci:Constants.SimCardId_TripleSimAsMainCard_Suci:this.isEsimOffer?Constants.SimCardId_ESimAsMainCard:Constants.SimCardId_TripleSimAsMainCard},e.prototype.tryGetEsimAsDefaultSimcardId=function(){return this.hasESimAndTripleSim||this.hasESimOnly?this.hasSuciSim?Constants.SimCardId_ESimAsMainCard_Suci:Constants.SimCardId_ESimAsMainCard:this.hasSuciSim?Constants.SimCardId_TripleSimAsMainCard_Suci:Constants.SimCardId_TripleSimAsMainCard},e.prototype.tryGetTripleSimAsDefaultSimcardId=function(){return this.hasESimAndTripleSim||this.hasTripleSimOnly?this.hasSuciSim?Constants.SimCardId_TripleSimAsMainCard_Suci:Constants.SimCardId_TripleSimAsMainCard:this.hasSuciSim?Constants.SimCardId_ESimAsMainCard_Suci:Constants.SimCardId_ESimAsMainCard},e.prototype.getTradeInDiscounts=function(){for(var e=[],t=0,r=this._offerServices.getSelectedDiscountsEnriched();t<r.length;t++){var n=r[t];n.tradeInCard&&e.push(n)}return e},e}(),OfferGroupCostCollection=function(){function e(e){this._monthlyTotal=0,this._oneTimeTotal=0,this._oneTimeConnectionFees=0,this._costsAfterRuntime=[],this._monthlyTotalWithoutSavings=0,this._offerGroup=e,this.calculateCosts()}return e.prototype.calculateCosts=function(){var e=this._offerGroup.mainOffer.offerCosts;if(this._monthlyTotal=e.monthlyTotal,this._monthlyTotalWithoutSavings=e.monthlyTotal-e.monthlySaving,this._oneTimeTotal=e.oneTimeTotal,this._oneTimeConnectionFees=e.oneTimeConnectionFees,this.copyCostsAfterRuntimeFromMainOffer(e.costsAfterRuntime),this._offerGroup.hasAdditionalRedplusOffers())for(var t=0,r=this._offerGroup.redplusOffers;t<r.length;t++){var n=r[t].offerCosts;this._monthlyTotal+=n.monthlyTotal,this._monthlyTotalWithoutSavings+=n.monthlyTotal-n.monthlySaving,this._oneTimeTotal+=n.oneTimeTotal,this._oneTimeConnectionFees+=n.oneTimeConnectionFees,this.mergeCostsAfterRuntime(n.costsAfterRuntime)}if(this._offerGroup.hasAdditionalAccessoryOffers())for(var i=0,o=this._offerGroup.accessoryOffers;i<o.length;i++){var a=o[i].offerCosts;this._monthlyTotal+=a.monthlyTotal,this._monthlyTotalWithoutSavings+=a.monthlyTotal-a.monthlySaving,this._oneTimeTotal+=a.oneTimeTotal}this._monthlyTotal=+this._monthlyTotal.toFixed(2),this._monthlyTotalWithoutSavings=+this._monthlyTotalWithoutSavings.toFixed(2),this._oneTimeTotal=+this._oneTimeTotal.toFixed(2),this._oneTimeConnectionFees=+this._oneTimeConnectionFees.toFixed(2)},e.prototype.copyCostsAfterRuntimeFromMainOffer=function(e){this._costsAfterRuntime=[];for(var t=0,r=e;t<r.length;t++){var n=r[t];this._costsAfterRuntime.push({totalCost:n.totalCost,tariffOnly:n.tariffOnly,saving:n.saving,month:n.month,expiredSocs:n.expiredSocs,totalCostWithoutVouchersAndServices:n.totalCostWithoutVouchersAndServices})}},e.prototype.mergeCostsAfterRuntime=function(e){for(var t=[],r=0,n=e[0],i=e[1]?e[1]:e[0],o=0,a=e.length,s=0;s<this._costsAfterRuntime.length;s++){if(o+1<a&&this._costsAfterRuntime[s].month>i.month)for(;this._costsAfterRuntime[s].month>i.month&&(t[r]=__assign({},i),t[r].totalCost=+(this._costsAfterRuntime[s-1].totalCost+i.totalCost).toFixed(2),t[r].saving=+(this._costsAfterRuntime[s-1].saving+i.saving).toFixed(2),t[r].totalCostWithoutVouchersAndServices=+(this._costsAfterRuntime[s-1].totalCostWithoutVouchersAndServices+i.totalCostWithoutVouchersAndServices).toFixed(2),r++,o+1<a)&&(n=i,++o+1<a);)i=e[o];this._costsAfterRuntime[s].month==i.month&&(o+1<a&&o++,n=i,o+1<a&&(i=e[o])),t[r]=__assign({},this._costsAfterRuntime[s]),t[r].totalCost=+(this._costsAfterRuntime[s].totalCost+n.totalCost).toFixed(2),t[r].saving=+(this._costsAfterRuntime[s].saving+n.saving).toFixed(2),t[r].totalCostWithoutVouchersAndServices=+(this._costsAfterRuntime[s].totalCostWithoutVouchersAndServices+n.totalCostWithoutVouchersAndServices).toFixed(2);var c=this._costsAfterRuntime[s].expiredSocs;void 0!==n.expiredSocs&&n.month===t[r].month&&(Array.isArray(c)?t[r].expiredSocs=c.concat(n.expiredSocs):t[r].expiredSocs=n.expiredSocs),r++}if(o+1<a)for(var u=this._costsAfterRuntime.length-1,l=0,d=e.slice(o+1);l<d.length;l++){var p=d[l];t[r]=__assign({},p),t[r].totalCost=+(this._costsAfterRuntime[u].totalCost+p.totalCost).toFixed(2),t[r].saving=+(this._costsAfterRuntime[u].saving+p.saving).toFixed(2),t[r].totalCostWithoutVouchersAndServices=+(this._costsAfterRuntime[u].totalCostWithoutVouchersAndServices+p.totalCostWithoutVouchersAndServices).toFixed(2),r++}this._costsAfterRuntime=t},Object.defineProperty(e.prototype,"monthlyTotal",{get:function(){return this._monthlyTotal}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"monthlyTotalWithoutSavings",{get:function(){return this._monthlyTotalWithoutSavings},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"oneTimeConnectionFees",{get:function(){return this._oneTimeConnectionFees},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"oneTimeTotal",{get:function(){return this._oneTimeTotal},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"costsAfterRuntime",{get:function(){return this._costsAfterRuntime},enumerable:!1,configurable:!0}),e}(),OfferGroup=function(){function e(e,t){this._customerSegment="",this._btx=e,void 0!==t&&(this._salesChannel=t)}return Object.defineProperty(e.prototype,"btx",{get:function(){return this._btx},set:function(e){this._btx=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"salesChannel",{get:function(){return this._salesChannel},set:function(e){this._salesChannel=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mainOffer",{get:function(){return this._mainOffer},set:function(e){this._mainOffer=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"redplusOffers",{get:function(){return this._redplusOffers},set:function(e){this._redplusOffers=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"accessoryOffers",{get:function(){return this._accessoryOffers},set:function(e){this._accessoryOffers=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cellcode",{get:function(){return this._cellcode},set:function(e){this._cellcode=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"newSimCardNeeded",{get:function(){return this._newSimCardNeeded},set:function(e){this._newSimCardNeeded=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"EID_pairing_requested",{get:function(){return this._EID_pairing_requested},set:function(e){this._EID_pairing_requested=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shippingCosts",{get:function(){return this._shippingCosts},set:function(e){this._shippingCosts=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"prolongationType",{get:function(){return this._prolongationType},set:function(e){this._prolongationType=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"customerSegment",{get:function(){return this._customerSegment},set:function(e){this._customerSegment=e},enumerable:!1,configurable:!0}),e.prototype.getOfferByBasketPid=function(e){if(e=Number(e),void 0!==this._mainOffer&&e===this._mainOffer.pid)return this._mainOffer;if(this.hasAdditionalAccessoryOffers())for(var t=0,r=this._accessoryOffers;t<r.length;t++){if(e==(o=r[t]).pid)return o}if(this.hasAdditionalRedplusOffers())for(var n=0,i=this._redplusOffers;n<i.length;n++){var o;if(e==(o=i[n]).pid)return o}},e.prototype.isSimOnlyWithRedPlus=function(){return"SIMonlyOffer"===this._mainOffer.offerType&&!this.hasAdditionalAccessoryOffers()&&this.hasAdditionalRedplusOffers()},e.prototype.isSimOnly=function(){return"SIMonlyOffer"===this._mainOffer.offerType&&!this.hasAdditionalAccessoryOffers()&&!this.hasAdditionalRedplusOffers()},e.prototype.isHardwareOnly=function(){return"HardwareOnlyOffer"===this._mainOffer.offerType},e.prototype.hasAdditionalAccessoryOffers=function(){return void 0!==this._accessoryOffers&&0<this._accessoryOffers.length},e.prototype.hasAdditionalRedplusOffers=function(){return void 0!==this._redplusOffers&&0<this._redplusOffers.length},e.prototype.hasMultipleTariffs=function(){if(this.hasAdditionalAccessoryOffers())for(var e=0,t=this._accessoryOffers;e<t.length;e++){if(void 0!==t[e].atomicSubscriptionId)return!0}if(this.hasAdditionalRedplusOffers())for(var r=0,n=this._redplusOffers;r<n.length;r++){if(void 0!==n[r].atomicSubscriptionId)return!0}return!1},e.prototype.isSimcardTypeChangeAllowed=function(){return!this.isInlife()&&(!this.isRedplus()&&(!this.hasMultipleTariffs()&&(!("SIMonlyOffer"!==this.mainOffer.offerType&&!this.mainOffer.hasESimAndTripleSim)||!(!this.isVVL()||!this.mainOffer.hasESimOnly))))},e.prototype.isBNT=function(){return this._btx==Constants.BTX_BNT},e.prototype.isVVL=function(){return this._btx==Constants.BTX_VVL},e.prototype.isInlife=function(){return this._btx==Constants.BTX_INLIFE},e.prototype.isRedplus=function(){return this._btx==Constants.BTX_REDPLUS},e.prototype.isStone=function(){return this._btx==Constants.BTX_STONE},e.prototype.isMultisim=function(){return this._btx==Constants.BTX_MULTISIM},e.prototype.isFaF=function(){return this._salesChannel==Constants.SALESCHANNEL_FAMILY_FRIENDS},e.prototype.isYoung=function(){return this._salesChannel==Constants.SALESCHANNEL_YOUNG},e.prototype.isSoHo=function(){return this._salesChannel==Constants.SALESCHANNEL_SOHO},e.prototype.isEnterprise=function(){return this._salesChannel==Constants.SALESCHANNEL_ENTERPRISE},e.prototype.isConsumer=function(){return this._salesChannel==Constants.SALESCHANNEL_CONSUMER},e.prototype.hasYoungDiscount=function(){return this.checkMainOfferForService(Constants.YoungDiscountIds)},e.prototype.hasJungeLeuteGigaCubeDiscount=function(){return this.checkMainOfferForService(Constants.JungeLeuteGigaCubeDiscountIds)},e.prototype.hasStudentDiscount=function(){return this.checkMainOfferForService(Constants.StudentDiscountIds)},e.prototype.hasHandicappedDiscount=function(){return this.checkMainOfferForService(Constants.HandicappedDiscountIds)},e.prototype.hasGigaKombiDiscount=function(){return this.checkMainOfferForService(Constants.GigaKombiDiscountIds)},e.prototype.hasVodafonePass=function(){return this.checkMainOfferForService(Constants.VodafonePassIds)},e.prototype.hasMusicVodafonePass=function(){return this.checkMainOfferForService([Constants.MusicVodafonePassId])},e.prototype.hasChatVodafonePass=function(){return this.checkMainOfferForService([Constants.ChatVodafonePassId])},e.prototype.hasSocialVodafonePass=function(){return this.checkMainOfferForService([Constants.SocialVodafonePassId])},e.prototype.hasVideoVodafonePass=function(){return this.checkMainOfferForService([Constants.VideoVodafonePassId])},e.prototype.isUltraCardWithHardware=function(){return!(this.mainOffer.btx!==Constants.BTX_MULTISIM||!this.hasAdditionalAccessoryOffers())},e.prototype.isGigaCubeOnly=function(){return!!(this.mainOffer.atomicSubscriptionId&&-1<Constants.GigaCubeIds.indexOf(this.mainOffer.atomicSubscriptionId))},e.prototype.checkMainOfferForService=function(e){return this.mainOffer.checkForSelectedServices(e)},Object.defineProperty(e.prototype,"offerGroupCosts",{get:function(){return this._offerGroupCostCollection||(this._offerGroupCostCollection=new OfferGroupCostCollection(this)),this._offerGroupCostCollection}
1,enumerable:!1,configurable:!0}),e}(),GeneralSalesObjectError=function(e){throw new Error(e)},ServiceDiscountAttributes=function(){function e(e){this._hidden=!1,this._elws="",this._dataVolume=0,this._unlimited=!1,this._tradeInCard=!1,this._tradeInCardSortOrder=0;for(var t=0,r=e;t<r.length;t++){var n=r[t],i=n.id;"183"===i&&(this._hidden="1"===n.value),"198"===i&&(this._elws=n.value),"167"===i&&(this._dataVolume=parseFloat(n.value.replace(",","."))),"255"===i&&"1"===n.value&&(this._unlimited=!0),"296"===i&&"1"===n.value&&(this._tradeInCard=!0),"294"===i&&(this._tradeInCardSortOrder=parseInt(n.value,10))}}return Object.defineProperty(e.prototype,"hidden",{get:function(){return this._hidden},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"elws",{get:function(){return this._elws},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataVolume",{get:function(){return this._dataVolume},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"unlimited",{get:function(){return this._unlimited},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tradeInCard",{get:function(){return this._tradeInCard},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tradeInCardSortOrder",{get:function(){return this._tradeInCardSortOrder},enumerable:!1,configurable:!0}),e}(),ServiceDiscountBase=function(){function e(e){this._id=parseFloat(e.id),this._label=e.label,this._serviceType=e.serviceType,this._backendId=e.backendId[0].value,this._hidden=!0===e.hidden,this._description=e.description,this._postRuntimeDescription=e.postRuntimeDescription,this._subscriptionType=e.subscriptionType||"",this._attributes=new ServiceDiscountAttributes({}),void 0!==e.attributes&&void 0!==e.attributes.attribute&&(this._attributes=new ServiceDiscountAttributes(e.attributes.attribute))}return Object.defineProperty(e.prototype,"dataVolume",{get:function(){return this._attributes?this._attributes.dataVolume:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"unlimited",{get:function(){return!!this._attributes&&this._attributes.unlimited},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backendId",{get:function(){return this._backendId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return this._label},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"serviceType",{get:function(){return this._serviceType},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hidden",{get:function(){return this._hidden},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attr",{get:function(){return this._attributes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"description",{get:function(){return this._description},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"postRuntimeDescription",{get:function(){return this._postRuntimeDescription},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subscriptionType",{get:function(){return this._subscriptionType},enumerable:!1,configurable:!0}),e}(),Discount=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t}(ServiceDiscountBase),Service=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t}(ServiceDiscountBase),ServiceDiscountBaseRepo=function(){function e(e){"string"==typeof e&&(e=JSON.parse(e)),this.preCheck(e),this._data=this.parseData(e)}return e.prototype.preCheck=function(e){return void 0===e.subscriptionGroups?new GeneralSalesObjectError("subscriptionGroups is mandatory when create a ServiceRepo."):void 0===e.subscriptionGroups.subscriptionGroup?new GeneralSalesObjectError("subscriptionGroups.subscriptionGroup is mandatory when create a ServiceRepo."):0===e.subscriptionGroups.subscriptionGroup.length?new GeneralSalesObjectError("subscriptionGroups.subscriptionGroup is empty when create a ServiceRepo."):(this._subscriptionGroup=e.subscriptionGroups.subscriptionGroup[0],"serviceMobile"!==this._subscriptionGroup.type&&"discountMobile"!==this._subscriptionGroup.type?new GeneralSalesObjectError('only types "serviceMobile" and "discountMobile" are supported in ServiceRepo.'):void 0===this._subscriptionGroup.subscriptions?new GeneralSalesObjectError("subscriptionGroup.subscriptions is mandatory when create a ServiceRepo."):void 0===this._subscriptionGroup.subscriptions.subscription?new GeneralSalesObjectError("subscriptionGroup.subscriptions.subscription is mandatory when create a ServiceRepo."):void 0)},e.prototype.parseData=function(e){var t=[],r=function(e,n,i){if(void 0!==e.attributes&&void 0!==e.attributes.attribute)for(var o=0,a=e.attributes.attribute;o<a.length;o++){"186"===(p=a[o]).id&&(i=p.value)}if(void 0!==e.subscriptions&&void 0!==e.subscriptions.subscription)for(var s=0,c=e.subscriptions.subscription;s<c.length;s++){var u=c[s];r(u,n,i)}if(void 0!==e.backendId&&void 0!==e.backendId.length&&0!==e.backendId.length&&void 0!==e.backendId[0].value){if(void 0!==e.attributes&&void 0!==e.attributes.attribute)for(var l=0,d=e.attributes.attribute;l<d.length;l++){var p;"183"===(p=d[l]).id&&"1"===p.value?e.hidden=!0:"184"===p.id?e.description=p.value:"186"===p.id?i=p.value:"240"===p.id&&(e.postRuntimeDescription=p.value)}e.serviceType=n.replace("Mobile",""),""!==i&&(e.subscriptionType=i),"service"===e.serviceType?t.push(new Service(e)):t.push(new Discount(e))}};return r(this._subscriptionGroup,this._subscriptionGroup.type,""),t},e.prototype.getById=function(e){if(void 0!==this._data){var t=this._data.filter(function(t){return e===t.id});return 0<t.length?t[0]:void 0}},e.prototype.getByKIAS=function(e){if(void 0!==this._data){var t=this._data.filter(function(t){return e===t.backendId});return 0<t.length?t[0]:void 0}},e}(),ServiceRepo=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getServiceById=function(t){return e.prototype.getById.call(this,t)},t.prototype.getServiceByKIAS=function(t){return e.prototype.getByKIAS.call(this,t)},t}(ServiceDiscountBaseRepo),DiscountRepo=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getDiscountById=function(t){return e.prototype.getById.call(this,t)},t.prototype.getServiceByKIAS=function(t){return e.prototype.getByKIAS.call(this,t)},t}(ServiceDiscountBaseRepo),SubscriptionAttributes=function(){function e(e){this._topFeatures=[];for(var t=0,r=e;t<r.length;t++){var n=r[t],i=n.id;"9"===i&&(this._subLevel=parseFloat(n.value)),"138"===i&&(this._orderType=n.value),"139"===i&&(this._contractType=n.value),"140"===i&&(this._contractProlongationRestrictions=n.value),"143"===i&&this._topFeatures.push(n.value),"167"===i&&(this._dataVolume=parseFloat(n.value.replace(",","."))),"169"===i&&(this._pib=n.value),"364"===i&&(this._isDeviceFinance=!!n.value)}}return Object.defineProperty(e.prototype,"subLevel",{get:function(){return this._subLevel}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"orderType",{get:function(){return this._orderType},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"contractType",{get:function(){return this._contractType},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"contractProlongationRestrictions",{get:function(){return this._contractProlongationRestrictions},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataVolume",{get:function(){return this._dataVolume},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pib",{get:function(){return this._pib},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"topFeatures",{get:function(){return this._topFeatures},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDeviceFinance",{get:function(){return this._isDeviceFinance},enumerable:!1,configurable:!0}),e}(),AtomicSubscription=function(){function e(e){this._simonly=!1,this._id=parseFloat(e.id),this._label=e.label,this._backendSystem=e.backendId[0].system,this._backendId=e.backendId[0].value;var t={};void 0!==e.attributes&&void 0!==e.attributes.attribute&&(t=e.attributes.attribute),this._attr=new SubscriptionAttributes(t),this._isDeviceFinance=this._attr&&this._attr.isDeviceFinance,void 0===this._attr.subLevel&&(this._simonly=!0)}return Object.defineProperty(e.prototype,"isDeviceFinance",{get:function(){return this._isDeviceFinance},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return this._label},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backendId",{get:function(){return this._backendId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSimOnly",{get:function(){return this._simonly},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attr",{get:function(){return this._attr},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subLevel",{get:function(){if(void 0!==this._attr)return this._attr.subLevel},enumerable:!1,configurable:!0}),e}(),Subscription=function(){function e(e,t){if(this._atomicSubscriptions=[],this._id=parseFloat(e.id),this._name=e.label,this._subscriptionGroupId=e.subscriptionGroupId,this._backendSystem=e.backendId[0].system,void 0!==e.attributes&&void 0!==t?this._attributes=new SubscriptionAttributes(e.attributes.attribute.concat(t.attribute)):void 0!==e.attributes?this._attributes=new SubscriptionAttributes(e.attributes.attribute):void 0!==t&&(this._attributes=new SubscriptionAttributes(t.attribute)),"object"==typeof e.subscriptions)for(var r=0,n=e.subscriptions.subscription;r<n.length;r++){var i=n[r],o=new AtomicSubscription(i);this._atomicSubscriptions.push(o)}else{o=new AtomicSubscription(e);this._atomicSubscriptions.push(o)}}return e.prototype.getSimOnlyId=function(){var e=this._atomicSubscriptions.filter(function(e){return e.isSimOnly});if(0!==e.length)return e[0].id},e.prototype.getAtomicSubscriptions=function(){return this._atomicSubscriptions},Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attr",{get:function(){return this._attributes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subscriptionGroupId",{get:function(){return this._subscriptionGroupId},enumerable:!1,configurable:!0}),e.prototype.getAtomicSubLevelById=function(e){for(var t=0,r=this.getAtomicSubscriptions();t<r.length;t++){var n=r[t];if(e===n.id)return n.subLevel}},e.prototype.getAtomicisDeviceFinanceById=function(e){for(var t=0,r=this.getAtomicSubscriptions();t<r.length;t++){var n=r[t];if(e===n.id)return n.isDeviceFinance}return!1},e.prototype.getSubsidizationIdBySubLevel=function(e){for(var t=0,r=this.getAtomicSubscriptions();t<r.length;t++){var n=r[t];if(0===e&&n.isSimOnly)return n.id;if(e===n.subLevel)return n.id}},e}(),SubscriptionGroup=function(){function e(e){this._subscriptions=[],this._id=parseFloat(e.id),this._label=e.label,this._backendSystem=e.backendId[0].system,void 0!==e.attributes&&(this._attributes=new SubscriptionAttributes(e.attributes.attribute));for(var t=0,r=e.subscriptions.subscription;t<r.length;t++){var n=r[t];n.subscriptionGroupId=this._id,this._subscriptions.push(new Subscription(n,e.attributes))}}return e.prototype.getSubscriptions=function(){return this._subscriptions},e.prototype.getSubscription=function(e){for(var t=0,r=this._subscriptions;t<r.length;t++){var n=r[t];if(e===n.id)return n}},Object.defineProperty(e.prototype,"id",{get:function(){return this._id}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return this._label},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attributes",{get:function(){return this._attributes},enumerable:!1,configurable:!0}),e}(),SubscriptionRepo=function(){function e(e){this._subscriptionGroupIdMapping={},this._subscriptionIdMapping={},this._subscriptionAtomicIdMapping={},this._subscriptionGroups=[],"string"==typeof e&&(e=JSON.parse(e)),this.preCheck(e),this.parseData(e)}return e.prototype.preCheck=function(e){if(void 0===e.subscriptionGroups)return new GeneralSalesObjectError("subscriptionGroups is mandatory when create a SubscriptionRepo.");if(void 0===e.subscriptionGroups.subscriptionGroup)return new GeneralSalesObjectError("productGroups.productGroup is mandatory when create a DeviceRepo.");if(void 0===e.subscriptionGroups.subscriptionGroup.length)return new GeneralSalesObjectError("productGroups.productGroup must be an array when create a DeviceRepo.");if(0===e.subscriptionGroups.subscriptionGroup.length)return new GeneralSalesObjectError("productGroups.productGroup is empty when create a DeviceRepo.");var t=e.subscriptionGroups.subscriptionGroup[0];return void 0===t.subscriptions?new GeneralSalesObjectError("productGroups.productGroup[0].products is empty when create a DeviceRepo."):void 0===t.subscriptions.subscription?new GeneralSalesObjectError("productGroups.productGroup[0].products.product is empty when create a DeviceRepo."):void 0},e.prototype.parseData=function(e){for(var t=0,r=e.subscriptionGroups.subscriptionGroup[0].subscriptions.subscription;t<r.length;t++){var n=r[t];this._subscriptionGroups.push(new SubscriptionGroup(n))}for(var i=0,o=this._subscriptionGroups.length;i<o;i+=1){n=this._subscriptionGroups[i];this._subscriptionGroupIdMapping[n.id]=i;for(var a=0,s=n.getSubscriptions();a<s.length;a++){var c=s[a];this._subscriptionIdMapping[c.id]=n.id;for(var u=0,l=c.getAtomicSubscriptions();u<l.length;u++){var d=l[u];this._subscriptionAtomicIdMapping[d.id]=c.id}}}},e.prototype.getSubscriptionById=function(e){var t=this._subscriptionIdMapping[e];if(void 0!==t){var r=this._subscriptionGroupIdMapping[t];return this._subscriptionGroups[r].getSubscription(e)}var n=this._subscriptionAtomicIdMapping[e];if(void 0!==n){var i=this._subscriptionIdMapping[n];r=this._subscriptionGroupIdMapping[i];return this._subscriptionGroups[r].getSubscription(n)}},e.prototype.getSubscriptionByAtomicId=function(e){var t=this._subscriptionAtomicIdMapping[e];if(void 0!==t){var r=this._subscriptionIdMapping[t],n=this._subscriptionGroupIdMapping[r];return this._subscriptionGroups[n].getSubscription(t)}},e.prototype.getAtomicSubscriptionByAtomicId=function(e){var t=this.getSubscriptionByAtomicId(e);if(void 0!==t)return t.getAtomicSubscriptions().filter(function(t){return t.id===e})[0]},e.prototype.getAtomicSubscriptionIdsById=function(e){var t=this.getSubscriptionById(e);if(void 0!==t)return t.getAtomicSubscriptions().map(function(e){return e.id})},e.prototype.getSubscriptionIdByKiasId=function(e){for(var t=0,r=this._subscriptionGroups;t<r.length;t++)for(var n=0,i=r[t].getSubscriptions();n<i.length;n++)for(var o=i[n],a=0,s=o.getAtomicSubscriptions();a<s.length;a++){if(s[a].backendId===e)return o.id}},e.prototype.getAtomicSubscriptionIdByKiasId=function(e){for(var t=0,r=this._subscriptionGroups;t<r.length;t++)for(var n=0,i=r[t].getSubscriptions();n<i.length;n++)for(var o=0,a=i[n].getAtomicSubscriptions();o<a.length;o++){var s=a[o];if(s.backendId===e)return s.id}},e}(),Dependency=function(){function e(e){this._value=e.value,this._key=e.key,this._scope=e.scope,this._type=e.type}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"key",{get:function(){return this._key},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scope",{get:function(){return this._scope},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),e}(),DependencyGroup=function(){function e(e){this._dependencies=[],this._key=e.key,this._logicalOperator=e.logicalOperator;
1for(var t=0,r=e.dependency;t<r.length;t++){var n=r[t];this._dependencies.push(new Dependency(n))}}return e.prototype.getDependencies=function(){return this._dependencies},Object.defineProperty(e.prototype,"key",{get:function(){return this._key},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"logicalOperator",{get:function(){return this._logicalOperator},enumerable:!1,configurable:!0}),e}(),DependenciesRepo=function(){function e(e){this._dependenciesGroups=[],"string"==typeof e&&(e=JSON.parse(e)),this.preCheck(e),this.parseData(e)}return e.prototype.preCheck=function(e){return void 0===e.dependencies?new GeneralSalesObjectError("dependencies is mandatory when create a DependenciesRepo."):void 0===e.dependencies.dependencyGroup?new GeneralSalesObjectError("dependencies.dependencyGroup is mandatory when create a Dependency."):void 0===e.dependencies.dependencyGroup.length?new GeneralSalesObjectError("json.dependencies.dependencyGroup must be an array when create a Dependency."):0===e.dependencies.dependencyGroup.length?new GeneralSalesObjectError("json.dependencies.dependencyGroup is empty when create a Dependency."):void 0},e.prototype.parseData=function(e){for(var t=0,r=e.dependencies.dependencyGroup;t<r.length;t++){var n=r[t];this._dependenciesGroups.push(new DependencyGroup(n))}},e.prototype.getDependencyGroupByKey=function(e){for(var t=0,r=this._dependenciesGroups;t<r.length;t++){var n=r[t];if(e===n.key)return n}},e}(),DeviceAttributes=function(){function e(e,t){this._simType=[],this._rawTopFeatures=[],this._rawPackageParts=[],this._rawLargeImages=[];var r=!1,n=this;if(void 0===e[0]&&(r=!0),void 0!==t){for(var i in this._rawTopFeatures=t.rawTopFeatures.map(function(e){return e}),this._rawPackageParts=t.rawPackageParts.map(function(e){return e}),t)if(!1!==t.hasOwnProperty(i)){if(!1===r){if("_topFeatures"===i)continue;if("_packageParts"===i)continue;if("_nsfImage288_320"===i)continue;if("_rawTopFeatures"===i)continue;if("_rawPackageParts"===i)continue}var o=i.replace("_","");this[i]=t[o]}!1===r&&(this._rawLargeImages=[],this._topFeatures=[],this._packageParts=[],this._nsfImage288_320=[])}for(var a=0,s=e;a<s.length;a++){var c=s[a];switch(c.id){case"143":this._rawTopFeatures.push(c);break;case"9":this._subLevel=parseFloat(c.value.replace(",","."));break;case"127":this._deliveryTime=c.value;break;case"168":this._deliveryDate=c.value;break;case"126":this._rawPackageParts.push(c);break;case"118":this._vendor=c.value;break;case"109":this._primaryColor=c.value;break;case"167":this._dataVolumeIncluded=parseFloat(c.value.replace(",","."));break;case"16":this._standbyTime=parseFloat(c.value.replace(",","."));break;case"17":this._talkingTime=parseFloat(c.value.replace(",","."));break;case"18":this._usageTime=parseFloat(c.value.replace(",","."));break;case"19":this._musicPlayback=parseFloat(c.value.replace(",","."));break;case"226":this._videoPlayback=parseFloat(c.value.replace(",","."));break;case"28":this._processor=c.value;break;case"12":this._os=c.value;break;case"22":this._downloadSpeed=c.value;break;case"23":this._uploadSpeed=c.value;break;case"135":this._fingerprintSensor="1"===c.value;break;case"157":this._waterRepellent="1"===c.value;break;case"33":this._sarValue=parseFloat(c.value.replace(",","."));break;case"20":this._measurements=c.value;break;case"15":this._weight=parseFloat(c.value.replace(",","."));break;case"13":this._color=c.value;break;case"57":this._displayInch=parseFloat(c.value.replace(",","."));break;case"58":this._displayCm=parseFloat(c.value.replace(",","."));break;case"59":this._resolution=c.value;break;case"60":this._colorDepth=parseFloat(c.value.replace(",","."));break;case"47":this._megapixel=parseFloat(c.value.replace(",","."));break;case"48":this._photoResolution=c.value;break;case"49":this._frontcamera="1"===c.value;break;case"50":this._faceTime="1"===c.value;break;case"51":this._megapixelFrontcamera=parseFloat(c.value.replace(",","."));break;case"52":this._resolutionFrontcamera=c.value;break;case"222":this._multipleLenses=c.value;break;case"53":this._videoResolution=c.value;break;
1case"54":this._videoResolutionFrontcamera=c.value;break;case"55":this._hdMode=c.value;break;case"46":this._integratedDigitalCamera="1"===c.value;break;case"27":this._ram=parseFloat(c.value.replace(",","."));break;case"14":this._internalMemory=parseFloat(c.value.replace(",",".")),this._internalMemoryWithUnit=c.value.replace(".",",");break;case"24":this._internalMemoryOwnFiles=parseFloat(c.value.replace(",",".")),this._internalMemoryOwnFilesWithUnit=c.value.replace(".",",");break;case"25":this._memoryExpandable="1"===c.value;break;case"26":this._memoryCardsUpTo=parseFloat(c.value.replace(",","."));break;case"71":this._lte="1"===c.value;break;case"146":this._fiveG="1"===c.value;break;case"72":this._voLte="1"===c.value;break;case"134":this._wifiCalling="1"===c.value;break;case"73":this._umtsBroadband="1"===c.value;break;case"74":this._umts="1"===c.value;break;case"75":this._edge="1"===c.value;break;case"76":this._edgeGprs="1"===c.value;break;case"77":this._gprs="1"===c.value;break;case"78":this._quadband="1"===c.value;break;case"79":this._triband="1"===c.value;break;case"80":this._dualband="1"===c.value;break;case"81":this._wlan="1"===c.value;break;case"82":this._bluetooth="1"===c.value;break;case"83":this._bluetoothVersion=c.value.replace(",",".");break;case"84":this._infrared="1"===c.value;break;case"85":this._dlna="1"===c.value;break;case"86":this._gps="1"===c.value;break;case"87":this._nfc="1"===c.value;break;case"88":this._nfcWallet="1"===c.value;break;case"89":this._hdmi="1"===c.value;break;case"144":this._microHdmi="1"===c.value;break;case"90":this._usb="1"===c.value;break;case"165":this._microUsb="1"===c.value;break;case"166":this._usbTypC="1"===c.value;break;case"92":this._headphones="1"===c.value;break;case"93":this._usb2="1"===c.value;break;case"94":this._usb3="1"===c.value;break;case"95":this._micIn="1"===c.value;break;case"96":this._ethernet="1"===c.value;break;case"97":this._cardreader="1"===c.value;break;case"98":this._externalAntenna="1"===c.value;break;case"99":this._simType.push(c.value+"");break;case"128":this._dect="1"===c.value;break;case"129":this._upnp="1"===c.value;break;case"100":this._netLock="1"===c.value;break;case"147":this._windows10="1"===c.value;break;case"148":this._windows8="1"===c.value;break;case"149":this._windows7="1"===c.value;break;case"150":this._macOs="1"===c.value;break;case"110":this._mp3Player="1"===c.value;break;case"111":this._radio="1"===c.value;break;case"112":this._musicDownload="1"===c.value;break;case"113":this._mobileTv="1"===c.value;break;case"115":this._stereoSpeaker="1"===c.value;break;case"116":this._mms="1"===c.value;break;case"36":this._touchscreen="1"===c.value;break;case"37":this._touchscreenQwertz="1"===c.value;break;case"38":this._keyboard="1"===c.value;break;case"39":this._qwertzKeyboard="1"===c.value;break;case"40":this._voiceCommands="1"===c.value;break;case"41":this._voiceDail="1"===c.value;break;case"42":this._handsfree="1"===c.value;break;case"158":this._seniorFocused="1"===c.value;break;case"103":this._calendar="1"===c.value;break;case"104":this._dictation="1"===c.value;break;case"105":this._mailClient="1"===c.value;break;case"159":this._rawLargeImages.push(c);break;case"160":this._nsfImage288_200=c.value;break;case"162":this._nsfImage170_230=c.value;break;case"161":this._nsfImage90_120=c.value;break;case"122":this._image170_230=c.value;break;case"123":this._image228_309=c.value;break;case"125":this._image170_119=c.value;break;case"130":this._image228_160=c.value;break;case"43":this._productType=c.value;break;case"45":this._simLock="1"===c.value;break;case"35":this._technicalSegment="1"===c.value;break;case"137":this._descriptionAccessory=c.value;break;case"131":this._descriptionDevicecardFront=c.value;break;case"132":this._descriptionDevicecardBack=c.value,this._productInfoSheet=c.value;break;case"170":this._productCategory=c.value;break;case"138":this._orderType=c.value;break;case"139":this._contractType=c.value;break;case"142":this._bundledWith=c.value;break;case"141":this._dicount5Euro="1"===c.value;break;case"155":this._ean=c.value;break;case"163":this._artikelnummer=c.value;break;case"156":this._mpn=c.value;break;case"119":this._btx=c.value;break;case"136":this._salesChannel=c.value;break;case"124":this._kdgJsonTv="1"===c.value;break;
1case"133":this._productCode=c.value;break;case"164":this._launchDate=c.value,this._olsLaunchDate=c.value;break;case"195":this._qiStandard="1"===c.value;break;case"201":this._housingSize=parseFloat(c.value.replace(",","."));break;case"203":this._bracelet=c.value;break;case"202":this._housingMaterial=c.value;break;case"204":this._braceletColor=c.value;break;case"205":this._housingColor=c.value;break;case"217":this._simSlotCount=""+c.value;break;case"224":this._resolutionUnfolded=c.value;break;case"101":this._displayUnfolded=parseFloat(c.value.replace(",","."));break;case"225":this._displayUnfoldedInch=parseFloat(c.value.replace(",","."));break;case"207":this._faceId="1"===c.value;break;case"171":this._dataUsage=parseFloat(c.value.replace(",","."));break;case"219":this._series="3";break;case"220":this._series="4";break;case"272":this._genericId=parseInt(c.value,10);break;case"378":this._energylabelImage=c.value;break;case"379":this._energylabelImagePdf=c.value;break;case"380":this._energylabelTextPdf=c.value}}0<this._rawTopFeatures.length&&(this._rawTopFeatures.sort(function(e,t){return e.sortOrder>t.sortOrder?1:e.sortOrder<t.sortOrder?-1:0}),this._topFeatures=this._rawTopFeatures.map(function(e){return e.value})),0<this._rawPackageParts.length&&(this._rawPackageParts.sort(function(e,t){return e.sortOrder>t.sortOrder?1:e.sortOrder<t.sortOrder?-1:0}),this._packageParts=this._rawPackageParts.map(function(e){return e.value})),0<this._rawLargeImages.length&&(this._rawLargeImages.sort(function(e,t){var r=n.getSortOrder(e.sortOrder),i=n.getSortOrder(t.sortOrder);return r>i?1:r<i?-1:0}),this._nsfImage288_320=this._rawLargeImages.map(function(e){return e.value})),this.setFallbackPrimaryColor()}return e.prototype.getSortOrder=function(e){return isNaN(parseInt(e,10))?e:parseInt(e,10)},e.prototype.setFallbackPrimaryColor=function(){void 0===this._primaryColor&&void 0!==this._color&&"schwarz"===this._color.toLowerCase()&&(this._primaryColor="0,0,0")},Object.defineProperty(e.prototype,"topDevice",{get:function(){return this._topDevice},set:function(e){this._topDevice=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rawTopFeatures",{get:function(){return this._rawTopFeatures},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rawPackageParts",{get:function(){return this._rawPackageParts},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rawLargeImages",{get:function(){return this._rawLargeImages},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"topFeatures",{get:function(){return this._topFeatures},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subLevel",{get:function(){return this._subLevel},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"deliveryTime",{get:function(){return this._deliveryTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"deliveryDate",{get:function(){return this._deliveryDate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"packageParts",{get:function(){return this._packageParts},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"vendor",{get:function(){return this._vendor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"primaryColor",{get:function(){return this._primaryColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataVolumeIncluded",{get:function(){return this._dataVolumeIncluded},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"talkingTime",{get:function(){return this._talkingTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"usageTime",{get:function(){return this._usageTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"musicPlayback",{get:function(){return this._musicPlayback},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"videoPlayback",{get:function(){return this._videoPlayback},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"processor",{get:function(){return this._processor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"os",{get:function(){return this._os}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"downloadSpeed",{get:function(){return this._downloadSpeed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"uploadSpeed",{get:function(){return this._uploadSpeed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fingerprintSensor",{get:function(){return this._fingerprintSensor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"waterRepellent",{get:function(){return this._waterRepellent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sarValue",{get:function(){return this._sarValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"measurements",{get:function(){return this._measurements},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"weight",{get:function(){return this._weight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this._color},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"displayInch",{get:function(){return this._displayInch},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"displayCm",{get:function(){return this._displayCm},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"resolution",{get:function(){return this._resolution},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"colorDepth",{get:function(){return this._colorDepth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"megapixel",{get:function(){return this._megapixel},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"photoResolution",{get:function(){return this._photoResolution},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frontcamera",{get:function(){return this._frontcamera},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"faceTime",{get:function(){return this._faceTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"megapixelFrontcamera",{get:function(){return this._megapixelFrontcamera},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"resolutionFrontcamera",{get:function(){return this._resolutionFrontcamera},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"multipleLenses",{get:function(){return this._multipleLenses},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"videoResolution",{get:function(){return this._videoResolution},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"videoResolutionFrontcamera",{get:function(){return this._videoResolutionFrontcamera},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hdMode",{get:function(){return this._hdMode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"integratedDigitalCamera",{get:function(){return this._integratedDigitalCamera},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ram",{get:function(){return this._ram},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"internalMemory",{get:function(){return this._internalMemory},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"internalMemoryOwnFiles",{get:function(){return this._internalMemoryOwnFiles},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"internalMemoryWithUnit",{get:function(){return this._internalMemoryWithUnit},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"internalMemoryOwnFilesWithUnit",{get:function(){return this._internalMemoryOwnFilesWithUnit},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"memoryExpandable",{get:function(){return this._memoryExpandable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"memoryCardsUpTo",{get:function(){return this._memoryCardsUpTo},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lte",{get:function(){return this._lte},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fiveG",{get:function(){return this._fiveG},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"voLte",{get:function(){return this._voLte}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wifiCalling",{get:function(){return this._wifiCalling},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"umtsBroadband",{get:function(){return this._umtsBroadband},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"umts",{get:function(){return this._umts},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"edge",{get:function(){return this._edge},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"edgeGprs",{get:function(){return this._edgeGprs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"gprs",{get:function(){return this._gprs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quadband",{get:function(){return this._quadband},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"triband",{get:function(){return this._triband},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dualband",{get:function(){return this._dualband},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wlan",{get:function(){return this._wlan},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bluetooth",{get:function(){return this._bluetooth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bluetoothVersion",{get:function(){return this._bluetoothVersion},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"infrared",{get:function(){return this._infrared},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dlna",{get:function(){return this._dlna},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"gps",{get:function(){return this._gps},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nfc",{get:function(){return this._nfc},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nfcWallet",{get:function(){return this._nfcWallet},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hdmi",{get:function(){return this._hdmi},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"microHdmi",{get:function(){return this._microHdmi},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"usb",{get:function(){return this._usb},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"microUsb",{get:function(){return this._microUsb},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"usbTypC",{get:function(){return this._usbTypC},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"usb2",{get:function(){return this._usb2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"usb3",{get:function(){return this._usb3},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"headphones",{get:function(){return this._headphones},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"micIn",{get:function(){return this._micIn},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ethernet",{get:function(){return this._ethernet},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cardreader",{get:function(){return this._cardreader},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"externalAntenna",{get:function(){return this._externalAntenna},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"simType",{get:function(){return this._simType},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dect",{get:function(){return this._dect},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"upnp",{get:function(){return this._upnp},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"netLock",{get:function(){return this._netLock},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activationRequired",{get:function(){return this._activationRequired},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"windows10",{get:function(){return this._windows10},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"windows8",{get:function(){return this._windows8}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"windows7",{get:function(){return this._windows7},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"macOs",{get:function(){return this._macOs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mp3Player",{get:function(){return this._mp3Player},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"radio",{get:function(){return this._radio},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"musicDownload",{get:function(){return this._musicDownload},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mobileTv",{get:function(){return this._mobileTv},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"stereoSpeaker",{get:function(){return this._stereoSpeaker},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mms",{get:function(){return this._mms},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"touchscreen",{get:function(){return this._touchscreen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"touchscreenQwertz",{get:function(){return this._touchscreenQwertz},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"keyboard",{get:function(){return this._keyboard},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"qwertzKeyboard",{get:function(){return this._qwertzKeyboard},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"voiceCommands",{get:function(){return this._voiceCommands},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"voiceDail",{get:function(){return this._voiceDail},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"handsfree",{get:function(){return this._handsfree},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"seniorFocused",{get:function(){return this._seniorFocused},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"calendar",{get:function(){return this._calendar},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dictation",{get:function(){return this._dictation},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mailClient",{get:function(){return this._mailClient},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nsfImage288_320",{get:function(){return this._nsfImage288_320},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nsfImage288_200",{get:function(){return this._nsfImage288_200},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nsfImage170_230",{get:function(){return this._nsfImage170_230},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nsfImage90_120",{get:function(){return this._nsfImage90_120},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"image170_230",{get:function(){return this._image170_230},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"image228_309",{get:function(){return this._image228_309},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"image170_119",{get:function(){return this._image170_119},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"image228_160",{get:function(){return this._image228_160},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"productType",{get:function(){return this._productType},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"simLock",{get:function(){return this._simLock},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"technicalSegment",{get:function(){return this._technicalSegment},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"descriptionAccessory",{get:function(){return this._descriptionAccessory},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"descriptionDevicecardFront",{get:function(){return this._descriptionDevicecardFront},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"descriptionDevicecardBack",{get:function(){return this._descriptionDevicecardBack}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"productInfoSheet",{get:function(){return this._productInfoSheet},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"orderType",{get:function(){return this._orderType},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"olsLaunchDate",{get:function(){return this._olsLaunchDate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"productCategory",{get:function(){return this._productCategory},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"contractType",{get:function(){return this._contractType},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bundledWith",{get:function(){return this._bundledWith},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dicount5Euro",{get:function(){return this._dicount5Euro},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ean",{get:function(){return this._ean},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"artikelnummer",{get:function(){return this._artikelnummer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mpn",{get:function(){return this._mpn},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"btx",{get:function(){return this._btx},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"salesChannel",{get:function(){return this._salesChannel},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"kdgJsonTv",{get:function(){return this._kdgJsonTv},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"productCode",{get:function(){return this._productCode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"launchDate",{get:function(){return this._launchDate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"standbyTime",{get:function(){return this._standbyTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"qiStandard",{get:function(){return this._qiStandard},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"housingSize",{get:function(){return this._housingSize},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"housingMaterial",{get:function(){return this._housingMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"housingColor",{get:function(){return this._housingColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bracelet",{get:function(){return this._bracelet},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"braceletColor",{get:function(){return this._braceletColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"simSlotCount",{get:function(){return this._simSlotCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"resolutionUnfolded",{get:function(){return this._resolutionUnfolded},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"displayUnfolded",{get:function(){return this._displayUnfolded},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataUsage",{get:function(){return this._dataUsage},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"faceId",{get:function(){return this._faceId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"series",{get:function(){return this._series},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasStarterKit",{get:function(){return this._bundledWith===Constants.HasStarterKit},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"genericId",{get:function(){return this._genericId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"energylabelImage",{get:function(){return this._energylabelImage},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"energylabelImagePdf",{get:function(){return this._energylabelImagePdf},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"energylabelTextPdf",{get:function(){return this._energylabelTextPdf},enumerable:!1,configurable:!0}),e}(),AtomicDevice=function(){function e(e,t){if(this._device=t,this._id=parseInt(e.id,10),this._name=e.label,void 0!==e.backendId&&Array.isArray(e.backendId)&&void 0!==e.backendId[0].value?this._backendId=parseInt(e.backendId[0].value,10):this._backendId=0,this._id!==this._device.id&&void 0!==e.attributes&&void 0!==e.attributes.attribute)this._attributes=new DeviceAttributes(e.attributes.attribute,this._device.attr);else{this._attributes=new DeviceAttributes({},this._device.attr)}}return Object.defineProperty(e.prototype,"device",{get:function(){return this._device}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"deliveryDate",{get:function(){return this._attributes.deliveryDate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backendId",{get:function(){return this._backendId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attr",{get:function(){return this._attributes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"topDevice",{get:function(){return this._device.topDevice},enumerable:!1,configurable:!0}),e}(),Device=function(){function e(e){this._atomicDevices=[],this._id=parseInt(e.id,10),this._name=e.label;var t={};if(void 0!==e.attributes&&void 0!==e.attributes.attribute&&(t=e.attributes.attribute),this._attributes=new DeviceAttributes(t),void 0!==e.products&&void 0!==e.products.product)for(var r=0,n=e.products.product;r<n.length;r++){void 0!==(i=n[r]).backendId&&this._atomicDevices.push(new AtomicDevice(i,this))}else if(void 0!==e.attributes&&void 0!==e.attributes.attribute){var i=e;this._atomicDevices.push(new AtomicDevice(i,this))}void 0!==e.additional&&void 0!==e.additional.topdevice&&(this._attributes.topDevice=e.additional.topdevice)}return e.prototype.getAtomicDevices=function(){return this._atomicDevices},e.prototype.getAtomicDeviceByIndex=function(e){if(void 0!==this._atomicDevices[e])return this._atomicDevices[e]},Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attr",{get:function(){return this._attributes},enumerable:!1,configurable:!0}),e}(),DeviceRepo=function(){function e(e){this._deviceIdMapping={},this._atomicDeviceIdMapping={},this._devices=[],"string"==typeof e&&(e=JSON.parse(e)),this.preCheck(e),this.parseData(e)}return e.prototype.preCheck=function(e){if(1!==e.productGroups.productGroup.length)return new GeneralSalesObjectError("one productGroup is expected")},e.prototype.parseData=function(e){var t=e.productGroups.productGroup[0].products.product;this._devices=t.map(function(e){return new Device(e)}),this._devices=this._devices.filter(function(e){return 0!==e.getAtomicDevices().length});for(var r=0,n=this._devices.length;r<n;r+=1){this._deviceIdMapping[this._devices[r].id]=r;for(var i=this._devices[r].getAtomicDevices(),o=0,a=i.length;o<a;o+=1)this._atomicDeviceIdMapping[i[o].id]=[r,o]}},e.prototype.getDevices=function(){return this._devices},e.prototype.getDevice=function(e){var t;if(void 0!==this._deviceIdMapping[e]){var r=this._deviceIdMapping[e];t=this._devices[r]}return t},e.prototype.getAtomicDevice=function(e){if(void 0!==this._atomicDeviceIdMapping[e]){var t=this._atomicDeviceIdMapping[e],r=this._devices[t[0]],n=t[1];return r.getAtomicDeviceByIndex(n)}},e}(),AccessoryAttributes=function(){function e(e,t){if(this._descriptionAccessory=[],"object"==typeof t)for(var r in t)switch(r){case"weight":this._weight=parseFloat(t[r]);break;case"usageTime":this._usageTime=parseFloat(t[r]);break;case"bluetooth":!0===t[r]?this._bluetooth=!0:this._bluetooth=!1;break;case"image170_230":this._image170_230=t[r];break;case"image228_309":this._image228_309=t[r];break;case"descriptionAccessory":for(var n=0,i=t[r];n<i.length;n++){var o=i[n];this._descriptionAccessory.push(o)}break;case"ean":this._ean=t[r];break;case"mpn":this._mpn=t[r]}e.sort(function(e,t){return e.sortOrder>t.sortOrder?1:e.sortOrder<t.sortOrder?-1:0});for(var a=0,s=e;a<s.length;a++){switch((r=s[a]).id){case"15":this._weight=parseFloat(r.value);break;case"18":this._usageTime=parseFloat(r.value);break;case"82":"1"===r.value?this._bluetooth=!0:this._bluetooth=!1;break;case"122":this._image170_230=r.value;break;case"123":this._image228_309=r.value;break;case"137":this._descriptionAccessory.push(r.value);break;case"155":this._ean=r.value;break;case"156":this._mpn=r.value}}}return Object.defineProperty(e.prototype,"descriptionAccessory",{get:function(){return this._descriptionAccessory}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"weight",{get:function(){return this._weight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"usageTime",{get:function(){return this._usageTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bluetooth",{get:function(){return this._bluetooth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"image170_230",{get:function(){return this._image170_230},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"image228_309",{get:function(){return this._image228_309},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ean",{get:function(){return this._ean},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mpn",{get:function(){return this._mpn},enumerable:!1,configurable:!0}),e}(),AtomicAccessory=function(){function e(e,t){if(this._accessory=t,this._id=parseInt(e.id,10),this._name=e.label,this._backendId=parseInt(e.backendId[0].value,10),"object"==typeof e.attributes&&"object"==typeof e.attributes.attribute)this._attributes=new AccessoryAttributes(e.attributes.attribute,this._accessory.attr);else{this._attributes=new AccessoryAttributes([],this._accessory.attr)}}return Object.defineProperty(e.prototype,"accessory",{get:function(){return this._accessory},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backendId",{get:function(){return this._backendId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attr",{get:function(){return this._attributes},enumerable:!1,configurable:!0}),e}(),Accessory=function(){function e(e){this._atomicAccessory=[],this._id=parseInt(e.id,10),this._name=e.label;var t=[];if("object"==typeof e.attributes&&"object"==typeof e.attributes.attribute&&(t=e.attributes.attribute),this._attributes=new AccessoryAttributes(t),"object"==typeof e.products&&"object"==typeof e.products.product)for(var r=0,n=e.products.product;r<n.length;r++){var i=n[r];void 0!==i.backendId&&this._atomicAccessory.push(new AtomicAccessory(i,this))}}return e.prototype.getAtomicAccessories=function(){return this._atomicAccessory},Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attr",{get:function(){return this._attributes},enumerable:!1,configurable:!0}),e}(),AccessoryRepo=function(){function e(e){this._idMapping={},this._atomicIdMapping={},this._accessories=[],"string"==typeof e&&(e=JSON.parse(e)),this.preCheck(e),this.parseData(e)}return e.prototype.preCheck=function(e){if(void 0===e.productGroups)return new GeneralSalesObjectError("productGroups is mandatory when create a AccessoryRepo.");if(void 0===e.productGroups.productGroup)return new GeneralSalesObjectError("productGroups.productGroup is mandatory when create a AccessoryRepo.");if(void 0===e.productGroups.productGroup.length)return new GeneralSalesObjectError("productGroups.productGroup must be an array when create a AccessoryRepo.");if(0===e.productGroups.productGroup.length)return new GeneralSalesObjectError("productGroups.productGroup is empty when create a AccessoryRepo.");var t=e.productGroups.productGroup[0];return void 0===t.products?new GeneralSalesObjectError("productGroups.productGroup[0].products is empty when create a AccessoryRepo."):void 0===t.products.product?new GeneralSalesObjectError("productGroups.productGroup[0].products.product is empty when create a AccessoryRepo."):void 0===t.products.product.length?new GeneralSalesObjectError("productGroups.productGroup[0].products.product must be an array when create a AccessoryRepo."):void 0},e.prototype.parseData=function(e){var t=e.productGroups.productGroup[0].products.product;this._accessories=t.map(function(e){return new Accessory(e)}),this._accessories=this._accessories.filter(function(e){return 0!==e.getAtomicAccessories().length});for(var r=0,n=this._accessories.length;r<n;r+=1){this._idMapping[this._accessories[r].id]=r;for(var i=this._accessories[r].getAtomicAccessories(),o=0,a=i.length;o<a;
1o+=1)this._atomicIdMapping[i[o].id]=[r,o]}},e.prototype.getAccessories=function(){return this._accessories},e.prototype.getAccessory=function(e){if(void 0!==this._atomicIdMapping[e]){var t=this._atomicIdMapping[e];return this._accessories[t[0]].getAtomicAccessories()[t[1]]}},e}(),OfferRepo=function(){function e(e,t,r,n){this._alreadyLoaded={"Online.Consumer":{newContract:!1,contractProlongation:!1,hardware:!1,tariffChange:!1},"Online.Young":{newContract:!1,contractProlongation:!1,hardware:!1,tariffChange:!1},"Online.SoHo":{newContract:!1,contractProlongation:!1,hardware:!1,tariffChange:!1},"Online.FamilyFriends":{newContract:!1,contractProlongation:!1,hardware:!1,tariffChange:!1},"Online.Enterprise":{newContract:!1,contractProlongation:!1,hardware:!1,tariffChange:!1}},this._alreadyLoadedPrivatePricing=[],this._offers=[],"string"==typeof e&&(e=JSON.parse(e)),this.load(e,t,r,n)}return e.prototype.preCheck=function(e){if(1!==e.offerGroups.offerGroup.length)return new GeneralSalesObjectError("one offerGroup is expected")},e.prototype.isLoaded=function(e,t){return this._alreadyLoaded[e][t]},e.prototype.isPrivatePricingLoaded=function(e){return 0<=this._alreadyLoadedPrivatePricing.indexOf(e)},e.prototype.load=function(e,t,r,n){void 0===this.preCheck(e)&&this.parseData(t,r,e),void 0===n?this._alreadyLoaded[t][r]=!0:this._alreadyLoadedPrivatePricing.push(n)},e.prototype.parseData=function(e,t,r){var n=[];try{n=r.offerGroups.offerGroup[0].offers.offer}catch(e){}var i=(n=n.filter(function(r){for(var n="",i="",o=0,a=r.contextAttributes.contextAttribute;o<a.length;o++){var s=a[o];"btx"!==s.type?"salesChannel"!==s.type||(i=s.value):n=s.value}return e===i&&(t===n||"newContract"===t&&"gigakombi"===n)})).map(function(e,r){return new Offer(t,e)});this._offers=this._offers.concat(i)},e.prototype.getAllOffers=function(e,t){return this._offers.filter(function(r){return r.salesChannel===e&&r.btx===t})},e.prototype.getOfferById=function(e){var t=this._offers.filter(function(t){return t.offerId===e});return this.getOfferFromSubsetBySimcardId(t)},e.prototype.getSimHardwareOfferByAtomicIds=function(e,t,r,n,i){var o=this._offers.filter(function(i){return i.salesChannel===e&&(i.btx===t&&(i.atomicDeviceId===n&&i.atomicSubscriptionId===r))});return this.getOfferFromSubsetBySimcardId(o,i)},e.prototype.getAllSimHardwareOffersByAtomicIdsArray=function(e,t,r,n){return this._offers.filter(function(i){if(i.salesChannel!==e)return!1;if(i.btx!==t)return!1;if(i.atomicDeviceId!==n)return!1;for(var o=0,a=r;o<a.length;o++){var s=a[o];if(i.atomicSubscriptionId===s)return!0}return!1})},e.prototype.getSimHardwareOfferByAtomicIdsArray=function(e,t,r,n){var i;return i=this.getAllSimHardwareOffersByAtomicIdsArray(e,t,r,n),this.getOfferFromSubsetBySimcardId(i)},e.prototype.getSimOnlyOfferByAtomicIdsArray=function(e,t,r,n){var i;return i=this.getAllSimOnlyOffersByAtomicIdsArray(e,t,r),this.getOfferFromSubsetBySimcardId(i,n)},e.prototype.getAllSimOnlyOffersByAtomicIdsArray=function(e,t,r){return 1===r.length&&Constants.Black_Id===r[0]?this._offers.filter(function(t){return t.salesChannel!==e||t.btx,!1}):this._offers.filter(function(n){if(n.salesChannel!==e)return!1;if(n.btx!==t)return!1;if("SIMonlyOffer"===n.offerType)for(var i=0,o=r;i<o.length;i++){if(o[i]===n.atomicSubscriptionId)return!0}return!1})},e.prototype.getHardwareOnlyOfferByAtomicDeviceId=function(e,t,r){var n=this._offers.filter(function(n){return n.salesChannel===e&&(n.btx===t&&("HardwareOnlyOffer"===n.offerType&&n.atomicDeviceId===r))});return this.getOfferFromSubsetBySimcardId(n)},e.prototype.getHardwareOnlyOffer=function(e){var t=Constants.SALESCHANNEL_CONSUMER,r=Constants.BTX_HARDWARE,n=e.id,i=this._offers.filter(function(e){return e.salesChannel===t&&(e.btx===r&&n===e.atomicDeviceId)});return this.getOfferFromSubsetBySimcardId(i)},e.prototype.getAccessoryOffer=function(e){var t=e.id,r=this._offers.filter(function(e){return t===e.atomicDeviceId});return this.getOfferFromSubsetBySimcardId(r)},e.prototype.getSimCardOfferBySIMcardId=function(e,t,r){var n=this._offers.filter(function(n){return"MultiSimOffer"===n.offerType&&(n.salesChannel===e&&(n.btx===t&&n.simcardId===r))});if(0!==n.length)return n[0]},e.prototype.getOfferFromSubsetBySimcardId=function(e,t){if(void 0!==e&&0!==e.length){var r=this.determineOfferSimCardType(e[0]);if(e.forEach(function(e){e.offerSimCardType=r}),1===e.length)return e[0];(void 0===t||Number.isNaN(t))&&(t=this.getDefaultSimCardType(e[0]));var n=e.filter(function(e){return e.simcardId===t});return 0<n.length?(n[0].offerSimCardType=r,n[0]):e[0]}},e.prototype.getDefaultSimCardType=function(e){return void 0===e?Constants.SimCardId_TripleSimAsMainCard:void 0===e||"SimHardwareOffer"!==e.offerType||"newContract"!=e.btx&&"contractProlongation"!=e.btx?e.tryGetTripleSimAsDefaultSimcardId():e.tryGetEsimAsDefaultSimcardId()},e.prototype.getAllOfferVariants=function(e){var t;return void 0!==e.atomicSubscriptionId&&void 0!==e.atomicDeviceId?t=this.getAllSimHardwareOffersByAtomicIdsArray(e.salesChannel,e.btx,[e.atomicSubscriptionId],e.atomicDeviceId):void 0!==e.atomicSubscriptionId&&(t=this.getAllSimOnlyOffersByAtomicIdsArray(e.salesChannel,e.btx,[e.atomicSubscriptionId])),t},e.prototype.determineOfferSimCardTypeFromSet=function(e){for(var t=!1,r=!1,n=0,i=e;n<i.length;n++){i[n].isEsimOffer?t=!0:r=!0}return t&&r?Constants.OfferSimCardType_ESimAndTripleSim:t?Constants.OfferSimCardType_ESimOnly:Constants.OfferSimCardType_TripleSimOnly},e.prototype.determineOfferSimCardType=function(e){if(void 0===e.offerSimCardType){var t=this.getAllOfferVariants(e);return void 0!==t?this.determineOfferSimCardTypeFromSet(t):e.isEsimOffer?C
1onstants.OfferSimCardType_ESimOnly:Constants.OfferSimCardType_TripleSimOnly}return e.offerSimCardType},e.prototype.getCorrespondingOfferVariant=function(e){var t=this.getAllOfferVariants(e);if(void 0===t||1===t.length)return e;var r=e.getCorrespondingSimcardId(),n=this.getOfferFromSubsetBySimcardId(t,r);return void 0!==n?n:e},e}(),Utils=function(){function e(){}return e.isLocalEnvironment=function(){return"localhost"===window.location.hostname},e}(),VluxDataLoaderConfig=function(){function e(e,t,r){this._server="",this._path="/api-static/direct/ng/ecommerce",this._btx="",this._salesChannel="",this._dependencyData="",this._offerData="",this._privatePricingOfferData="",this._discountData="",this._serviceData="",this._subscriptionData="",this._simcardData="",this._hardwareData="",this._accessoryData="",this._btx=e.toLowerCase(),this._salesChannel=t.toLowerCase(),r&&this.setPath(r)}return Object.defineProperty(e.prototype,"_importListe",{get:function(){return Utils.isLocalEnvironment()?{dependencies:"/dependencies.json",attributes:"/attributes.json",hardware:"/hardwaremobile.json",accessory:"/accessorymobile-global.json",simcards:"/simmobile-global.json",subscriptions:"/tariffmobile.json",discounts:"/discountmobile.json",services:"/servicemobile.json",offers:"/"+this._btx+"-"+this._salesChannel+"-offersmobile.json"}:{dependencies:"/dependencies/dependencies.json",attributes:"/attributes/attributes.json",hardware:"/products/hardwaremobile.json",accessory:"/products/accessorymobile-global.json",simcards:"/products/simmobile-global.json",subscriptions:"/subscriptions/tariffmobile.json",discounts:"/subscriptions/discountmobile.json",services:"/subscriptions/servicemobile.json",offers:"/offers/"+this._btx+"-"+this._salesChannel+"-offersmobile.json"}},enumerable:!1,configurable:!0}),e.prototype.setServer=function(e){this._server=e},e.prototype.setPath=function(e){this._path=e},e.prototype.setBtx=function(e){this._btx=e.toLowerCase()},e.prototype.setSalesChannel=function(e){this._salesChannel=e.toLowerCase()},e.prototype.setDependencyData=function(e){this._dependencyData=e},e.prototype.setOfferData=function(e){this._offerData=e},e.prototype.setPrivatePricingOfferData=function(e){this._privatePricingOfferData=e},e.prototype.setDiscountData=function(e){this._discountData=e},e.prototype.setServiceData=function(e){this._serviceData=e},e.prototype.setSimcardData=function(e){this._simcardData=e},e.prototype.setSubscriptionData=function(e){this._subscriptionData=e},e.prototype.setHardwareData=function(e){this._hardwareData=e},e.prototype.setAccessoryData=function(e){this._accessoryData=e},e.prototype.getDependencyData=function(){return this._dependencyData},e.prototype.getOfferData=function(){return this._offerData},e.prototype.getDiscountData=function(){return this._discountData},e.prototype.getServicesData=function(){return this._serviceData},e.prototype.getSimcardData=function(){return this._simcardData},e.prototype.getSubscriptionsData=function(){return this._subscriptionData},e.prototype.getHardwareData=function(){return this._hardwareData},e.prototype.getAccessoriesData=function(){return this._accessoryData},e}(),loadJSON=function(e,t,r){return new Promise(function(n){var i=new XMLHttpRequest;i.open("GET",e+t+r,!0),i.onload=function(){return 200==i.status?n(i.response):n(void 0)},i.onerror=function(){return n(void 0)},i.send()})},loadBaseData=function(e,t,r){return new Promise(function(n){return __awaiter(void 0,void 0,void 0,function(){var i,o;return __generator(this,function(a){return i=[e.dependencies,e.discounts,e.services,e.subscriptions,e.simcards,e.hardware,e.accessory],o=[],i.map(function(e){return o.push(loadJSON(t,r,e))}),Promise.all(o).then(function(e){var t={dependencyData:e[0],discountData:e[1],serviceData:e[2],subscriptionData:e[3],simcardData:e[4],hardwareData:e[5],accessoryData:e[6]};return n(t)}),[2]})})})},loadContextDependentData=function(e,t,r){return new Promise(function(n){return __awaiter(void 0,void 0,void 0,function(){return __generator(this,function(i){return loadJSON(t,r,e.offers).then(function(e){return n(e)}),[2]})})})},loadOfferDataSynchronously=function(e,t,r){var n=new XMLHttpRequest;return n.open("GET",t+r+e,!1),n.send(),n.status>=200&&n.status<400?n.response:""},VluxDataLoader=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.loadBaseData=function(){var e=this;return new Promise(function(t,r){var n=e,i=n._server,o=n._path;Utils.isLocalEnvironment()&&(i=Constants.SERVER,o=Constants.PATH),loadBaseData(n._importListe,i,o).then(function(e){return e.dependencyData&&n.setDependencyData(e.dependencyData),e.discountData&&n.setDiscountData(e.discountData),e.serviceData&&n.setServiceData(e.serviceData),e.simcardData&&n.setSimcardData(e.simcardData),e.subscriptionData&&n.setSubscriptionData(e.subscriptionData),e.hardwareData&&n.setHardwareData(e.hardwareData),e.accessoryData&&n.setAccessoryData(e.accessoryData),t(void 0)})})},t.prototype.loadContextDependentData=function(){var e=this;return new Promise(function(t,r){var n=e;Utils.isLocalEnvironment()&&(n._server="",n._path=Constants.OFFERS),loadContextDependentData(n._importListe,n._server,n._path).then(function(e){return n.setOfferData(e),t(void 0)})})},t.prototype.loadOfferDataSynchronously=function(){var e=loadOfferDataSynchronously(this._importListe.offers,this._server,this._path);return""!==e&&this.setOfferData(e),e},t.prototype.loadPricatePricingOfferDataSynchronously=function(e,t){void 0===t&&(t="/api/commerce/offers/");var r=t+Constants.SalesChannelGeneralSalesObjectMapping[this._salesChannel]+"/tariffChange/"+e,n=loadOfferDataSynchronously(r,this._server,"");return""!==n&&this.setPrivatePricingOfferData(n),n},t}(VluxDataLoaderConfig),SimcardAttributes=function(){function e(e){this._simType=[],this._topFeatures=[];for(var t=0,r=e;t<r.length;t++){var n=r[t],i=n.id;"99"===i&&this._simType.push(n.value),"127"===i&&(this._deliveryTime=n.value),"143"===i&&this._topFeatures.push(n.value),"168"===i&&(this._deliveryDate=n.value)}}return Object.defineProperty(e.prototype,"simType",{get:function(){return this._simType}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"deliveryTime",{get:function(){return this._deliveryTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"deliveryDate",{get:function(){return this._deliveryDate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"topFeatures",{get:function(){return this._topFeatures},enumerable:!1,configurable:!0}),e}(),Simcard=function(){function e(e){if(this._id=parseInt(e.id,10),this._label=e.label,void 0!==e.attributes&&void 0!==e.attributes.attribute){var t=e.attributes.attribute;this._attributes=new SimcardAttributes(t)}}return Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return this._label},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attr",{get:function(){return this._attributes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEsim",{get:function(){return void 0!==this.attr&&void 0!==this.attr.simType&&void 0!==this.attr.simType.find(function(e){return e.toLowerCase().indexOf("esim")>-1})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOneNumber",{get:function(){return this._id===Constants.SimCardId_ESimAsOneNumber||this._id===Constants.SimCardId_TripleSimAsOneNumber},enumerable:!1,configurable:!0}),e}(),SimcardRepo=function(){function e(e){this._simcards=[],"string"==typeof e&&(e=JSON.parse(e)),this.preCheck(e),this.parseData(e.productGroups.productGroup[0].products.product)}return e.prototype.preCheck=function(e){return 1!==e.productGroups.productGroup.length?new GeneralSalesObjectError("one productGroup is expected"):1>=e.productGroups.productGroup[0].products.product.length?new GeneralSalesObjectError("min one product is expected"):void 0},e.prototype.parseData=function(e){this._simcards=e.map(function(e){return new Simcard(e)})},e.prototype.getSimcards=function(){return this._simcards},e.prototype.getSimcardById=function(e){for(var t=0,r=this._simcards;t<r.length;t++){var n=r[t];if(e==n.id)return n}},e}(),OfferServiceBase=function(){function e(e,t,r,n){this._vluxBaseDataLoaded=!1,this._version=GSOVERSION+": "+GSOBUILDDATE,this._salesChannel="Online.Consumer",this._btx="newContract",void 0!==r&&(this.btx=r),void 0!==t&&(this.salesChannel=t),void 0!==n&&(this._vluxLoader=n),e&&void 0!==e.discountJSON&&void 0!==e.serviceJSON&&void 0!==e.subscriptionJSON&&void 0!==e.dependenciesJSON&&void 0!==e.hardwareJSON&&void 0!==e.accessoryJSON&&this.setVluxData(e)}return Object.defineProperty(e.prototype,"salesChannel",{get:function(){return this._salesChannel},set:function(e){this._salesChannel=e,void 0!==this._vluxLoader&&this._vluxLoader.setSalesChannel(this.salesChannel)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"btx",{get:function(){return this._btx},set:function(e){this._btx=e,void 0!==this._vluxLoader&&this._vluxLoader.setBtx(this.btx)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dependencies",{get:function(){if(this._vluxJsonData)return this._vluxJsonData.dependenciesJSON},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"discounts",{get:function(){if(this._vluxJsonData)return this._vluxJsonData.discountJSON},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"services",{get:function(){if(this._vluxJsonData)return this._vluxJsonData.serviceJSON},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subscriptions",{get:function(){if(this._vluxJsonData)return this._vluxJsonData.subscriptionJSON},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subscriptionRepo",{get:function(){if(this._subscriptionRepo)return this._subscriptionRepo},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"simcards",{get:function(){if(this._vluxJsonData)return this._vluxJsonData.simcardJSON},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offers",{get:function(){if(this._vluxJsonData)return this._vluxJsonData.offerJSON}
1,enumerable:!1,configurable:!0}),e.prototype.loadVluxData=function(e){var t=this;return new Promise(function(r,n){var i=t;if(void 0===t._vluxLoader&&(t._vluxLoader=new VluxDataLoader(t.btx,t.salesChannel,e)),t._vluxBaseDataLoaded)return r(void 0);t._vluxLoader.loadBaseData().then(function(){if(void 0!==i._vluxLoader){i._vluxJsonData||(i._vluxJsonData={});var e={dependenciesJSON:i._vluxLoader.getDependencyData(),discountJSON:i._vluxLoader.getDiscountData(),serviceJSON:i._vluxLoader.getServicesData(),simcardJSON:i._vluxLoader.getSimcardData(),subscriptionJSON:i._vluxLoader.getSubscriptionsData(),hardwareJSON:i._vluxLoader.getHardwareData(),accessoryJSON:i._vluxLoader.getAccessoriesData()};return t.setVluxData(e),r(void 0)}return n()},function(){return n()})})},e.prototype.loadContextDependentVluxData=function(e){var t=this;return new Promise(function(r,n){var i=t;return t._vluxBaseDataLoaded?t._offerRepo&&t._offerRepo.isLoaded(t.salesChannel,t.btx)?r(void 0):(void 0===t._vluxLoader&&(t._vluxLoader=new VluxDataLoader(t.btx,t.salesChannel,e)),void t._vluxLoader.loadContextDependentData().then(function(){if(void 0!==i._vluxLoader){i._vluxJsonData||(i._vluxJsonData={}),i._vluxJsonData.offerJSON=i._vluxLoader.getOfferData();var e=i._vluxJsonData.offerJSON;return"string"==typeof e&&(e=JSON.parse(e)),i._offerRepo?i._offerRepo.load(e,t.salesChannel,t.btx):i._offerRepo=new OfferRepo(e,t.salesChannel,t.btx),r(void 0)}return n()},function(){return n()})):n()})},e.prototype.loadOfferDataSynchronously=function(e){if(!this._vluxBaseDataLoaded)return!1;if(this._offerRepo&&this._offerRepo.isLoaded(this.salesChannel,this.btx))return!0;void 0===this._vluxLoader&&(this._vluxLoader=new VluxDataLoader(this.btx,this.salesChannel,e));var t=this._vluxLoader.loadOfferDataSynchronously();return this._offerRepo?("string"==typeof t&&(t=JSON.parse(t)),this._offerRepo.load(t,this.salesChannel,this.btx)):this._offerRepo=new OfferRepo(t,this.salesChannel,this.btx),!0},e.prototype.loadPricatePricingOfferDataSynchronously=function(e,t){if(!this._vluxBaseDataLoaded)return!1;if(this._privatePricingOfferRepo&&this._privatePricingOfferRepo.isPrivatePricingLoaded(e))return!0;void 0===this._vluxLoader&&(this._vluxLoader=new VluxDataLoader(this.btx,this.salesChannel,t));var r=this._vluxLoader.loadPricatePricingOfferDataSynchronously(e,t);return""!==r&&("string"==typeof r&&(r=JSON.parse(r)),this._privatePricingOfferRepo?this._privatePricingOfferRepo.load(r.ppOffers,this.salesChannel,this.btx):this._privatePricingOfferRepo=new OfferRepo(r.ppOffers,this.salesChannel,this.btx),!0)},e.prototype.setVluxData=function(e){this._vluxJsonData=e,void 0!==e.discountJSON&&void 0!==e.serviceJSON&&void 0!==e.dependenciesJSON&&this.executeVluxData()},e.prototype.addContextDependentVluxData=function(e,t){if(this._vluxBaseDataLoaded)if("string"==typeof e&&(e=JSON.parse(e)),t||void 0===this._offerRepo)this._offerRepo=new OfferRepo(e,this.salesChannel,this.btx);else{if(this._offerRepo.isLoaded(this.salesChannel,this.btx))return;this._offerRepo.load(e,this.salesChannel,this.btx)}},e.prototype.addPrivatePricingVluxData=function(e,t,r){if(this._vluxBaseDataLoaded)if("string"==typeof e&&(e=JSON.parse(e)),r||void 0===this._privatePricingOfferRepo)this._privatePricingOfferRepo=new OfferRepo(e,this.salesChannel,this.btx,t);else{if(this._privatePricingOfferRepo.isPrivatePricingLoaded(t))return;this._privatePricingOfferRepo.load(e,this.salesChannel,this.btx)}},e.prototype.executeVluxData=function(){this._vluxJsonData&&(this._serviceRepo=new ServiceRepo(this._vluxJsonData.serviceJSON),this._discountRepo=new DiscountRepo(this._vluxJsonData.discountJSON),this._dependenciesRepo=new DependenciesRepo(this._vluxJsonData.dependenciesJSON),this._vluxJsonData.subscriptionJSON&&""!==this._vluxJsonData.subscriptionJSON&&(this._subscriptionRepo=new SubscriptionRepo(this._vluxJsonData.subscriptionJSON)),this._vluxJsonData.hardwareJSON&&""!==this._vluxJsonData.hardwareJSON&&(this._deviceRepo=new DeviceRepo(this._vluxJsonData.hardwareJSON)),this._vluxJsonData.accessoryJSON&&""!==this._vluxJsonData.accessoryJSON&&(this._accessoryRepo=new AccessoryRepo(this._vluxJsonData.accessoryJSON)),this._vluxJsonData.simcardJSON&&""!==this._vluxJsonData.simcardJSON&&(this._simcardRepo=new SimcardRepo(this._vluxJsonData.simcardJSON)),this._vluxBaseDataLoaded=!0)},e.prototype.postExecuteSelect=function(e){this.enrichData(e);for(var t=0,r=e;t<r.length;t++){r[t].offerCosts.calculateCost()}},e.prototype.enrichDataOfferServices=function(e,t){for(var r=0,n=e;r<n.length;r++){var i=n[r];if(void 0!==i.services&&0!==i.services.length){var o=i.services,a=o[0].id,s=this._serviceRepo.getServiceById(a)||this._discountRepo.getDiscountById(a);void 0!==s&&(i.type=s.serviceType);for(var c=0,u=o;c<u.length;c++){for(var l=u[c],d=0,p=l.dependencyGroups;d<p.length;d++){var f=p[d],h=this._dependenciesRepo.getDependencyGroupByKey(f.key);if(void 0!==h){f.logicalOperator=h.logicalOperator;for(var m=0,g=h.getDependencies();m<g.length;m++){var v=g[m];f.addDependency(v)}}}var b=this._serviceRepo.getServiceById(l.id)||this._discountRepo.getDiscountById(l.id);void 0!==b&&(l.enrichData(b),l.mandatory&&t.offerServices.addSelectedService(l.id),t.salesChannel==Constants.SALESCHANNEL_YOUNG&&l.id===Constants.YoungDefaultAgeCheckServiceId&&t.offerServices.addSelectedService(Constants.YoungDefaultAgeCheckServiceId),"discount"===i.type&&"SubtractMyPriceFromSubstitude"===b.attr.elws&&l.setReference("subsidization"))}}}},e.prototype.enrichDataOfferComponents=function(e){for(var t=0,r=e;t<r.length;t++){for(var n=r[t],i=0,o=n.prices;i<o.length;i++)for(var a=0,s=o[i].dependencyGroups;a<s.length;a++){var c=s[a],u=this._dependenciesRepo.getDependencyGroupByKey(c.key);if(void 0!==u){c.logicalOperator=u.logicalOperator;for(var l=0,d=u.getDependencies();l<d.length;l++){var p=d[l];c.addDependency(p)}}}switch(n.type){case"tariffMobile":if(void 0===this._subscriptionRepo)continue;var f=this._subscriptionRepo.getSubscriptionByAtomicId(n.refId),h=this._subscriptionRepo.getAtomicSubscriptionByAtomicId(n.refId),m="",g="",v=void 0;void 0!==f&&(void 0!==h&&(m=h.backendId,g=h.label,v=void 0!==h.attr&&void 0!==h.attr.dataVolume?h.attr.dataVolume:f.attr.dataVolume),n.enrichDataForSubscription({atomicDataVolume:v,mainTariffId:f.id,label:g,sublevel:f.getAtomicSubLevelById(n.refId),backendId:m,attributes:f.attr,isDeviceFinance:!!f.getAtomicisDeviceFinanceById(n.refId)}));break;case"hardwareMobile":if(void 0===this._deviceRepo)continue;var b=this._deviceRepo.getAtomicDevice(n.refId);void 0!==b&&n.enrichDataForDevice({label:b.name,deviceLabel:b.device.name,productType:b.attr.productType,backendId:b.backendId,attributes:b.attr});break;case"accessoryMobile":if(void 0===this._accessoryRepo)continue;var y=this._accessoryRepo.getAccessory(n.refId);void 0!==y&&n.enrichDataForDevice({label:y.name,deviceLabel:y.name,productType:y.attr.productType,backendId:y.backendId,attributes:y.attr});break;case"simMobile":if(void 0===this._simcardRepo)continue;var _=this._simcardRepo.getSimcardById(n.refId);void 0!==_&&n.enrichDataForSIMCard({label:_.label,attributes:_.attr})}}},e.prototype.enrichData=function(e){for(var t=0,r=e;t<r.length;t++){var n=r[t],i=n.offerServices.serviceGroups,o=n.offerComponents.c
1omponents;this.enrichDataOfferServices(i,n),this.enrichDataOfferComponents(o)}},e}(),GeneralOfferService=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.preCheckOffers=function(e){void 0===e?void 0!==this._offerRepo&&!1!==this._offerRepo.isLoaded(this._salesChannel,this._btx)||this.loadOfferDataSynchronously():void 0!==this._privatePricingOfferRepo&&!1!==this._privatePricingOfferRepo.isPrivatePricingLoaded(e)||(this.loadPricatePricingOfferDataSynchronously(e),void 0===this._privatePricingOfferRepo&&this.loadOfferDataSynchronously())},t.prototype.getSimHardwareOfferByAtomicIds=function(e,t,r){this.preCheckOffers();var n=this._offerRepo.getSimHardwareOfferByAtomicIds(this.salesChannel,this.btx,e,t,r);return void 0!==n&&this.postExecuteSelect([n]),n},t.prototype.getSimHardwareOfferByAtomicDeviceIdAndSubscriptionId=function(e,t){this.preCheckOffers();var r=this._subscriptionRepo.getAtomicSubscriptionIdsById(t);if(void 0!==r){var n=this._offerRepo.getSimHardwareOfferByAtomicIdsArray(this.salesChannel,this.btx,r,e);return void 0!==n&&this.postExecuteSelect([n]),n}},t.prototype.getSimOnlyOfferBySubscriptionId=function(e){this.preCheckOffers();var t=this._subscriptionRepo.getAtomicSubscriptionIdsById(e);if(void 0!==t){var r=this._offerRepo.getSimOnlyOfferByAtomicIdsArray(this.salesChannel,this.btx,t);return void 0!==r&&this.postExecuteSelect([r]),r}},t.prototype.getSimOnlyOfferByAtomicSubscriptionId=function(e,t){this.preCheckOffers();var r=this._offerRepo.getSimOnlyOfferByAtomicIdsArray(this.salesChannel,this.btx,[e],t);return void 0!==r&&this.postExecuteSelect([r]),r},t.prototype.getSimOnlyOfferBySIMcardId=function(e){this.preCheckOffers();var t=this._offerRepo.getSimCardOfferBySIMcardId(this.salesChannel,this.btx,e);return void 0!==t&&this.postExecuteSelect([t]),t},t.prototype.getHardwareOnlyOfferByAtomicDeviceId=function(e){this.preCheckOffers();var t=this._offerRepo.getHardwareOnlyOfferByAtomicDeviceId(this.salesChannel,this.btx,e);return void 0!==t&&this.postExecuteSelect([t]),t},t.prototype.getAllOffers=function(){this.preCheckOffers();var e=this._offerRepo.getAllOffers(this.salesChannel,this.btx);return this.postExecuteSelect(e),e},t.prototype.getOfferById=function(e){this.preCheckOffers();var t=this._offerRepo.getOfferById(e);return void 0!==t&&this.postExecuteSelect([t]),t},t.prototype.getWatchOfferByAtomicId=function(e){return this.preCheckOffers(),this.getHardwareOnlyOfferByAtomicDeviceId(e)},t.prototype.getLowestDevicePriceOfferForAtomicId=function(e,t){this.preCheckOffers();var r=this._offerRepo.getAllOffers(this.salesChannel,this.btx).filter(function(r){return"SimHardwareOffer"===r.offerType&&(e===r.atomicDeviceId&&(!t||!r.atomicSubscriptionId||-1!==t.indexOf(r.atomicSubscriptionId)))});return this.postExecuteSelect(r),r.sort(function(e,t){var r=e.offerCosts&&e.offerCosts.devicePriceOnetime?e.offerCosts.devicePriceOnetime.value:0,n=t.offerCosts&&t.offerCosts.devicePriceOnetime?t.offerCosts.devicePriceOnetime.value:0,i=e.offerCosts&&e.offerCosts.subcriptionPriceMonthly?e.offerCosts.subcriptionPriceMonthly.value:0,o=t.offerCosts&&t.offerCosts.subcriptionPriceMonthly?t.offerCosts.subcriptionPriceMonthly.value:0;return r>n?1:r<n?-1:r===n?i>=o?1:-1:0}),this._offerRepo.getOfferFromSubsetBySimcardId(r)},t.prototype.getFirstAvailableOfferForSubscription=function(e){this.preCheckOffers();var t=this._subscriptionRepo.getAtomicSubscriptionIdsById(e);if(void 0!==t){var r=this._offerRepo.getAllOffers(this.salesChannel,this.btx).filter(function(e){for(var r=0,n=t;r<n.length;r++){if(n[r]===e.atomicSubscriptionId)return!0}return!1}),n=this._offerRepo.getOfferFromSubsetBySimcardId(r);return void 0!==n&&this.postExecuteSelect([n]),n}},t.prototype.normalizeBasketKeys=function(e){for(var t={},r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];t[i.toUpperCase()]=e[i]}return t},t.prototype.getOfferGroupByShopBasket=function(e,t){return void 0===t&&(t=!1),__awaiter(this,void 0,void 0,function(){var r,n,i,o,a,s,c,u,l,d,p;return __generator(this,function(f){switch(f.label){case 0:if("string"==typeof e){try{e=JSON.parse(e)}catch(e){return[2,Promise.reject()]}if(void 0===e.sChan)return[2,Promise.reject()]}return this.salesChannel=e.sChan,(r=this.normalizeBasketKeys(e)).NEW?(this.btx=Constants.BTX_BNT,[4,this.getOfferGroupByBasketItem(r.NEW[0],e,t)]):[3,2];case 1:return void 0===(s=f.sent())||(s.newSimCardNeeded=this.determineNewSimCardNeeded(s)),[2,s];case 2:return r.VVL?(this.btx=Constants.BTX_VVL,[4,this.getOfferGroupByBasketItem(r.VVL,e,t)]):[3,4];case 3:return void 0===(s=f.sent())||(s.prolongationType=r.VVL.PROLONGATIONTYPE,s.cellcode=r.VVL.CELLCODE,s.newSimCardNeeded=this.determineNewSimCardNeeded(s)),[2,s];case 4:return r.TARIFFCHANGE?(this.btx=Constants.BTX_INLIFE,[4,this.getOfferGroupByBasketItem(r.TARIFFCHANGE,e,t)]):[3,6];case 5:return void 0===(s=f.sent())||(s.cellcode=r.TARIFFCHANGE.CELLCODE),[2,s];case 6:return r.SECONDCARD?(this.btx=Constants.BTX_REDPLUS,[4,this.getOfferGroupByBasketItem(r.SECONDCARD[0],e,t)]):[3,8];case 7:return[2,f.sent()];case 8:return r.MULTICARDCONTRACT?(this.btx=Constants.BTX_STONE,[4,this.getOfferGroupByBasketItem(r.MULTICARDCONTRACT,e,t)]):[3,10];case 9:return[2,f.sent()];case 10:return r.ULTRACARD?(this.btx=Constants.BTX_MULTISIM,[4,this.loadVluxData()]):[3,15];case 11:return f.sent(),[4,this.loadContextDependentVluxData()];case 12:return f.sent(),s=new OfferGroup(this.btx,this.salesChannel),void 0===(n=this.getSimOnlyOfferBySIMcardId(parseInt(r.ULTRACARD[0].SIMCARDID,10)))?[2,Promise.reject()]:(n.offerServices.setSelectedServicesByBasketItem(r.ULTRACARD[0],t),n.pid=Number(r.ULTRACARD[0].pid),s.mainOffer=n,r.HARDWAREONLY?(this.btx=Constants.BTX_HARDWARE,[4,this.loadContextDependentVluxData()]):[3,14]);case 13:for(f.sent(),i=[],o=0,a=r.HARDWAREONLY;o<a.length;o++)d=a[o],void 0!==(p=this.getHardwareOnlyOfferByAtomicDeviceId(parseInt(d.HARDWAREID,10)))&&(p.offerServices.setSelectedServicesByBasketItem(d,t),p.pid=Number(d.pid),i.push(p));s.accessoryOffers=i,f.label=14;case 14:return[2,s];case 15:return r.HARDWAREONLY?(this.btx=Constants.BTX_HARDWARE,[4,this.loadVluxData()]):[3,18];case 16:return f.sent(),[4,this.loadContextDependentVluxData()];case 17:for(f.sent(),s=new OfferGroup(this.btx,this.salesChannel),c=[],u=0,l=r.HARDWAREONLY;u<l.length;u++)d=l[u],void 0!==(p=this.getHardwareOnlyOfferByAtomicDeviceId(parseInt(d.HARDWAREID,10)))&&(p.offerServices.setSelectedServicesByBasketItem(d,t),p.pid=Number(d.pid),"hardwareMobile"===p.offerComponents.c
1omponents[0].type?s.mainOffer=p:c.push(p));return 0<c.length&&(void 0===s.mainOffer&&(s.mainOffer=c[0],c.shift()),s.accessoryOffers=c),void 0===s.mainOffer?[2,Promise.reject()]:[2,s];case 18:return[2,Promise.reject()]}})})},t.prototype.getOfferGroupByBasketItem=function(e,t,r){return void 0===r&&(r=!1),__awaiter(this,void 0,void 0,function(){var n,i,o,a,s,c,u,l,d,p,f,h,m;return __generator(this,function(g){switch(g.label){case 0:return n=new OfferGroup(this.btx,this.salesChannel),this.btx===Constants.BTX_REDPLUS&&(this.btx=Constants.BTX_BNT),[4,this.loadVluxData()];case 1:return g.sent(),[4,this.loadContextDependentVluxData()];case 2:if(g.sent(),e.HARDWAREID){if(void 0===(i=this.getSimHardwareOfferByAtomicIds(parseInt(e.TARIFFID,10),parseInt(e.HARDWAREID,10),parseInt(e.SIMCARDID,10))))return[2,void 0];i.offerServices.setSelectedServicesByBasketItem(e,r),n.mainOffer=i}else{if(void 0===(i=this.getSimOnlyOfferByAtomicSubscriptionId(parseInt(e.TARIFFID,10),parseInt(e.SIMCARDID,10))))return[2,void 0];i.offerServices.setSelectedServicesByBasketItem(e,r),n.mainOffer=i}return n.isRedplus()&&(n.mainOffer.isRedPlusOffer=!0),n.mainOffer.pid=Number(e.pid),e.SECONDCARD?Constants.BTX_BNT===this.btx?[3,4]:(this.btx=Constants.BTX_BNT,[4,this.loadContextDependentVluxData()]):[3,5];case 3:g.sent(),g.label=4;case 4:for(o=[],a=0,s=e.SECONDCARD;a<s.length;a++)f=s[a],c=void 0,void 0!==(c=f.HARDWAREID?this.getSimHardwareOfferByAtomicIds(parseInt(f.TARIFFID,10),parseInt(f.HARDWAREID,10),parseInt(f.SIMCARDID,10)):this.getSimOnlyOfferByAtomicSubscriptionId(parseInt(f.TARIFFID,10),parseInt(f.SIMCARDID,10)))&&(u=new Offer(c.btx,c.vluxData),this.postExecuteSelect([u]),u.offerDependencies.offerDependencyValues=[new OfferDependencyValue("subscriptionId",n.mainOffer.atomicSubscriptionId+"")],u.offerServices.setSelectedServicesByBasketItem(f,r),u.pid=Number(f.pid),u.offerCosts.calculateCost(),u.offerSimCardType=c.offerSimCardType,u.isRedPlusOffer=!0,o.push(u));0<o.length&&(n.redplusOffers=o),g.label=5;case 5:return t.HARDWAREONLY?(this.btx=Constants.BTX_HARDWARE,[4,this.loadContextDependentVluxData()]):[3,7];case 6:for(g.sent(),l=[],d=0,p=t.HARDWAREONLY;d<p.length;d++)f=p[d],void 0!==(h=this.getHardwareOnlyOfferByAtomicDeviceId(parseInt(f.HARDWAREID,10)))&&(m=new Offer(h.btx,h.vluxData),this.postExecuteSelect([m]),m.offerServices.setSelectedServicesByBasketItem(f,r),m.pid=Number(f.pid),l.push(m));0<l.length&&(n.accessoryOffers=l),g.label=7;case 7:return this.btx=n.btx,n.customerSegment=t.customerSegment,[2,n]}})})},t.prototype.determineNewSimCardNeeded=function(e){if(e.mainOffer.isEsimOffer)return!0;if(e.isVVL()){var t;if(void 0===(t=this._offerRepo.getAllOfferVariants(e.mainOffer)))return!1;if(1===t.length)return t[0].isEsimOffer}return!1},t}(OfferServiceBase),RedPlusOfferService=function(e){function t(t,r,n,i){var o=e.call(this,t,r,n)||this;return o._mainTariffId=i,o}return __extends(t,e),t.prototype.setMainTariffId=function(e){this._mainTariffId=e},t.prototype.getSimOnlyOfferByType=function(e){var t=0;switch(e){case"data":t=Constants.RedData_Id;break;case"allnet":t=Constants.RedAllnet_Id;break;case"kids":t=Constants.RedKids_Id;break;case"basic":t=Constants.RedBasic_Id;break;case"small":t=Constants.FamilyCard_S_Id;break;case"medium":t=Constants.FamilyCard_M_Id;break;case"large":t=Constants.FamilyCard_L_Id}this.preCheckOffers();var r=this._offerRepo.getAllOffers(this.salesChannel,this._btx).filter(function(e){return"SIMonlyOffer"===e.offerType&&t===e.atomicSubscriptionId});return 0<r.length&&(this.resetDependencyValues(r),this.setDependencyValues(r),this.postExecuteSelect(r)),this._offerRepo.getOfferFromSubsetBySimcardId(r)},t.prototype.getSimHardwareOfferByAtomicDeviceIdAndSubscriptionId=function(e,t){this.preCheckOffers();var r=this._subscriptionRepo.getAtomicSubscriptionIdsById(t);if(void 0!==r){var n=this._offerRepo.getSimHardwareOfferByAtomicIdsArray(this.salesChannel,this._btx,r,e);return void 0!==n&&(this.resetDependencyValues([n]),this.setDependencyValues([n]),this.postExecuteSelect([n])),n}},t.prototype.getOfferById=function(e){this.preCheckOffers();var t=this._offerRepo.getOfferById(e);return void 0!==t&&(this.resetDependencyValues([t]),this.setDependencyValues([t]),this.postExecuteSelect([t])),t},t.prototype.resetDependencyValues=function(e){for(var t=0,r=e;t<r.length;
1t++){r[t].offerDependencies.offerDependencyValues=[]}},t.prototype.setDependencyValues=function(e){for(var t=0,r=e;t<r.length;t++){var n=r[t];void 0!==this._mainTariffId&&n.offerDependencies.offerDependencyValues.push(new OfferDependencyValue("subscriptionId",this._mainTariffId))}},t}(GeneralOfferService),basketFactory=new BasketFactory("Online.Consumer"),generalOfferService=new GeneralOfferService,redPlusOfferService=new RedPlusOfferService;!function(){"use strict";angular.module("ecommerce.checkout").controller("BasketController",["$state","factoryCommerceApi","factoryPrivatePricing","factorybShopBasket","factoryRequestDate","factoryFormData","factoryTracking","factoryNbaData","factoryFuFService","checkoutFormBuilder","$rootScope","factoryTotalCosts","factorySessionTimer","factoryUtils","$timeout",function(e,t,r,n,i,o,a,s,c,u,l,d,p,f,h){function m(e){let t=document.getElementById(VF.const.newCartId);if(t||(t=document.createElement("div"),t.id=VF.const.newCartId,t.style.width="100%",t.style.display="block",e.parentNode.insertBefore(t,e)),!document.getElementById(VF.const.newCartScriptId)){const e=document.createElement("script");e.id="bob-checkout-react-script",e.src="/simplicity/bob-checkout-v2-app/js/bob-checkout-v2-app.js",sessionStorage.removeItem(VF.const.sessionKeySIMVariant),e.onload=function(){},e.onerror=function(){},document.body.appendChild(e)}}document.title="Privatkunden Warenkorb | Vodafone",function(){if(window.__bobCheckoutPreloaded)return;window.__bobCheckoutPreloaded=!0;const e=document.createElement("link");e.rel="preload",e.as="script",e.href="/simplicity/bob-checkout-v2-app/js/bob-checkout-v2-app.js",document.head.appendChild(e)}(),window.__bobCheckoutInitialized||(window.__bobCheckoutInitialized=!0,function(){const e=document.querySelector(".div-gradient");e?m(e):new MutationObserver(function(e,t){const r=document.querySelector(".div-gradient");r&&(t.disconnect(),m(r))}).observe(document.body,{childList:!0,subtree:!0})}());var g=function(e){e.basket.sChan?window.salesChannel=e.basket.sChan:window.salesChannel="Online.Consumer",i.setTS(e.requestedAt),o.setData(e.formData),e.basket.debit&&0<e.basket.debit.length&&(VF.onlineIdentOptions="online"),n.setBasketCookie();var t=n.getOfferGroup();t.isFaF()&&c.checkInvitation(),a.initLineOfCustomer(window.salesChannel),t.isSoHo()&&a.setSohoLineOfCustomer(o.getSohoType()),window.__basketPageViewTracked?window.__basketPageViewTracked&&u.buildCheckoutForms(e,!0):(window.__basketPageViewTracked=!0,u.buildCheckoutForms(e))};function v(e){const t=n.getOfferGroup(),r=t?t.mainOffer:null,i=t?t.redplusOffers??[]:[],o=e.data&&e.data.basket&&e.data.basket.NEW?e.data.basket.NEW[0]:null;o&&o.SECONDCARD&&i.forEach(e=>{const t=o.SECONDCARD.find(t=>t.TARIFFID==e.atomicSubscriptionId&&t.SIMCARDID!=e.simcardId);t&&(e.simcardId=t.SIMCARDID)}),o&&r&&r.atomicSubscriptionId==o.TARIFFID&&o.SIMCARDID!=r.simcardId&&(r.simcardId=o.SIMCARDID),basketFactory.putOfferGroupIntoBasket(t)}l.$on("shippingOptionSet",function(e,t){d.updateShippingFee(t.value),window.dispatchEvent(new CustomEvent("shippingUpdate",{detail:{shippingFee:parseFloat(t.value)}})),l.shippingFee=t.value}),l.hasTechnicalError||t.getCheckout().then(function(t){p.start(),window.__callRemoveItem?(window.dispatchEvent(new CustomEvent("removeItemSuccess",{detail:{data:!0}})),window.__callRemoveItem=!1):window.__callRemoveService&&(window.dispatchEvent(new CustomEvent("removeServiceSuccess",{detail:{data:!0}})),window.__callRemoveService=!1),h(function(){l.isLoggedInUser=f.getCookie("MDDKeks")||n.getNeedsAuth()}),void 0!==t.data.INLEndDate&&(t.data.basket.INLEndDate=t.data.INLEndDate),t.data.basket&&t.data.basket.ULTRACARD&&(t.data.basket.ultraCard=t.data.basket.ULTRACARD),t.data.basket&&t.data.basket.MULTICARDCONTRACT&&(t.data.basket.multicardContract=t.data.basket.MULTICARDCONTRACT),t.data.basket&&t.data.basket.TARIFFCHANGE&&(t.data.basket.tariffChange=t.data.basket.TARIFFCHANGE),n.init(t.data.basket),t.data&&t.data.formData&&t.data.formData.BANK&&t.data.formData.BANK.bank_iban&&(l.hasIBAN=Boolean(t.data.formData.BANK.bank_iban.val)),l.$broadcast("shippingOptionSet",{value:t&&t.data.basket.shippingFee||0}),generalOfferService.getOfferGroupByShopBasket(t.data.basket).then(function(i){void 0===i?e.go("error.technicalerror",{error:{message:"Das hat leider nicht geklappt. Versuch es bitte nochmal."}}):i.isInlife()?(n.setOfferGroup(i),s.callService().then(function(){r.loadPrivatePricingOffers().then(function(){v(t),g(t.data)},function(){e.go("error.technicalerror",{error:{message:"Das hat leider nicht geklappt. Versuch es bitte nochmal."}})})},function(){e.go("error.technicalerror",{error:{message:"Das hat leider nicht geklappt. Versuch es bitte nochmal."}})})):(n.setOfferGroup(i),v(t),g(t.data))})},function(t){401===t.status?window.location.href="/shop/authentifizierung.html?btype=force&goto="+window.location.pathname:t.data&&"C.G.400.3"===t.data.responseCode?(n.deleteBasketCookie(),e.go("error.basketempty",{error:t.data},{location:"replace"})):e.go("error.technicalerror",{error:t.data,status:t.status})})}])}(),function(){"use strict";
1angular.module("ecommerce.checkout").controller("BasketV2Controller",["$rootScope","factorybShopBasket",function(e,t){var r=t.getOfferGroup();window.basketContainer.init(r,t.get()),e.$broadcast("basketv2Initialised")}])}(),function(){"use strict";angular.module("ecommerce.checkout").controller("EmptyBasketController",["$state","$stateParams","$scope","factorybShopBasket","factoryEmptyBasket","factoryTrackingSender","factoryUtils","$window",function(e,t,r,n,i,o,a,s){if("error.basketempty"===e.current.name){document.title="Privatkunden Leerer Warenkorb | Vodafone",r.wasEmptied=i.getWasEmptied(),r.continueShoppingURL="https://www.vodafone.de",document.title="Privatkunden Leerer Warenkorb | Vodafone";var c={},u=t||{};r.errorStateParams=u.error,n.deleteBasketCookie(),$.ajax({url:"/scripts/ecommerce.config.emptybasket.json",method:"get",dataType:"json",async:!1}).done(function(e){f=e.EmptyBasketConfig.URL}).fail(function(){});var l=(c=f).default;if(r.continueShoppingURL=l,r.wasEmptied){var d=n.getOfferGroup();if(d.isVVL())void 0!==d.salesChannel&&"Online.Workaround.01"!==d.salesChannel?r.continueShoppingURL=c.vvl[d.salesChannel]:r.continueShoppingURL=l;else if(d.isRedplus())r.continueShoppingURL=c.redplus.default;else if(d.isUltraCardWithHardware()){if(Array.isArray(d.accessoryOffers)&&d.accessoryOffers[0]&&d.accessoryOffers[0].offerComponents&&"function"==typeof d.accessoryOffers[0].offerComponents.getDevice)d.accessoryOffers[0].offerComponents.getDevice().attributes.filter(function(e){return"Apple"===e.value})&&(r.continueShoppingURL=c.multisim.apple);else r.continueShoppingURL=l}else d.isBNT()?d.isFaF()?r.continueShoppingURL=c.bnt["Online.FamilyFriends"]:d.isConsumer()&&!d.isSimOnly()?r.continueShoppingURL=c.bnt.sim_hardware:d.isSoHo()?r.continueShoppingURL=c.bnt["Online.SoHo"]:d.isYoung()?r.continueShoppingURL=c.bnt["Online.Young"]:d.isEnterprise()?r.continueShoppingURL=c.bnt["Online.Enterprise"]:d.hasGigaKombiDiscount()?r.continueShoppingURL=c.bnt.gigakombi:d.isConsumer()&&d.isSimOnly()&&!d.hasGigaKombiDiscount()?r.continueShoppingURL=c.bnt.simonly:r.continueShoppingURL=l:r.continueShoppingURL=l}r.$on("$includeContentLoaded",function(){vf["mph-flex-anchor"].init(),vf["eq-height"].init()}),setTimeout(function(){vf["eq-height"].init(),vf["mph-flex-anchor"].init(),$(window).trigger("vf::resize")},200);var p={siteArea:"mobility",platformType:"responsive",loginStatus:a.getCookie("MDDKeks")||n.getNeedsAuth()?"logged in":"not logged in",siteStructure:["privatkunden","eCommerce","basketempty"],pageType:"sales",error:{type:"validation",message:"no products in the basket",code:r.errorStateParams.responseCode||"",description:r.errorStateParams.description||""}};o.doTrack("pageview",p)}var f}])}(),function(){"use strict";angular.module("ecommerce.checkout").controller("DeeplinkAffiliateHardwareonlyCtrl",["$state","$stateParams","factoryBasketJson","factoryCommerceApi","factoryTrackingSender",function(e,t,r,n,i){r.generateHardwareonlyBasketObj(t.deviceId,t.salesChannel),n.putBasket(r.getEncodedJson()).then(function(){e.go("basket")},function(t){if(401===t.status){var r={error_action:responseJSON.errorAction||"displayed",error_type:VF.const.errorTrackingMap[t.status],error_message:"no message shown to the user"};responseJSON.errorArea&&(r.error_area=responseJSON.errorArea),responseJSON.responseCode&&(r.error_code=responseJSON.responseCode);const e=responseJSON.description||"",s=responseJSON.errorDetails||"",c=e&&s?`${e} ${s}`:e||s;r.error_details=c.length>100?e:c,i.doTrack("error",r);var o="";if(""!==document.referrer){var a=document.createElement("a");a.href=document.referrer,o="&cancel="+encodeURIComponent(a.pathname)}window.location.href="/shop/authentifizierung.html?btype=decide&goto="+window.location.pathname+"%23/basket/"+n.getBasketObj()+o}else e.go("error.technicalerror",{error:{message:"Das hat leider nicht geklappt. Versuch es bitte nochmal."}})})}])}(),function(){"use strict";angular.module("ecommerce.checkout").controller("DeeplinkAffiliateCtrl",["$state","$stateParams","factoryBasketJson","factoryCommerceApi","factoryTrackingSender",function(e,t,r,n,i){r.generateBasketObj(t.deviceId,t.tariffId,t.btx,t.salesChannel),n.putBasket(r.getEncodedJson()).then(function(){e.go("basket")},function(t){if(401===t.status){var r={error_action:responseJSON.errorAction||"displayed",error_type:VF.const.errorTrackingMap[t.status],error_message:"no message shown to the user"};responseJSON.errorArea&&(r.error_area=responseJSON.errorArea),responseJSON.responseCode&&(r.error_code=responseJSON.responseCode);const e=responseJSON.description||"",s=responseJSON.errorDetails||"",c=e&&s?`${e} ${s}`:e||s;r.error_details=c.length>100?e:c,i.doTrack("error",r);var o="";if(""!==document.referrer){var a=document.createElement("a");a.href=document.referrer,o="&cancel="+encodeURIComponent(a.pathname)}window.location.href="/shop/authentifizierung.html?btype=decide&goto="+window.location.pathname+"%23/basket/"+n.getBasketObj()+o}else e.go("error.technicalerror",{error:{message:"Das hat leider nicht geklappt. Versuch es bitte nochmal."}})})}])}(),function(){"use strict";angular.module("ecommerce.checkout").controller("DeeplinkAffiliateSimonlyCtrl",["$state","$stateParams","factoryBasketJson","factoryCommerceApi","factoryTrackingSender",function(e,t,r,n,i){r.generateSimonlyBasketObj(t.tariffId,t.btx,t.salesChannel),n.putBasket(r.getEncodedJson()).then(function(){e.go("basket")},function(t){if(401===t.status){var r={error_action:responseJSON.errorAction||"displayed",error_type:VF.const.errorTrackingMap[t.status],error_message:"no message shown to the user"};responseJSON.errorArea&&(r.error_area=responseJSON.errorArea),responseJSON.responseCode&&(r.error_code=responseJSON.responseCode);const e=responseJSON.description||"",s=responseJSON.errorDetails||"",c=e&&s?`${e} ${s}`:e||s;r.error_details=c.length>100?e:c,i.doTrack("error",r);var o="";if(""!==document.referrer){var a=document.createElement("a");a.href=document.referrer,o="&cancel="+encodeURIComponent(a.pathname)}window.location.href="/shop/authentifizierung.html?btype=vvl&goto="+window.location.pathname+"%23/basket/"+n.getBasketObj()+o}else e.go("error.technicalerror",{error:{message:"Das hat leider nicht geklappt. Versuch es bitte nochmal."}})})}])}(),function(){"use strict";angular.module("ecommerce.checkout").controller("DeeplinkInternCtrl",["$state","$location","factoryCommerceApi","$stateParams","factoryBasketRuleError","factoryNbaData","factoryGigakombi","factoryUtils","factoryTrackingSender",function(e,t,r,n,i,o,a,s,c){function u(){r.putBasket(n.id).then(function(t){window.dispatchEvent(new CustomEvent("shippingUpdate",{detail:{shippingFee:t&&t.basket.shippingFee||0}}));var r="";r="deeplinkinternv2"===e.current.name?"basketv2":"basket",window.__bobCheckoutPreloaded=!1,window.__bobCheckoutInitialized=!1,window.__basketPageViewTracked=!1;let n=document.getElementById(VF.const.newCartScriptId),i=document.getElementById(VF.const.newCartId);n&&(n.remove(),n=null),i&&(i.remove(),i=null),e.go(r,{},{location:"replace"})},function(t){var n=JSON.parse(t.responseText);if(401===t.status){var o={error_action:n.errorAction||"displayed",error_type:VF.const.errorTrackingMap[t.status],error_message:"no message shown to the user"};n.errorArea&&(o.error_area=n.errorArea),n.responseCode&&(o.error_code=n.responseCode);const e=n.description||"",i=n.errorDetails||"",l=e&&i?`${e} ${i}`:e||i;o.error_details=l.length>100?e:l,c.doTrack("error",o);var a="",s="";if(""!==document.referrer){var u=document.createElement("a");u.href=document.referrer,a="&cancel="+encodeURIComponent(u.pathname)}s=n.basket&&void 0!==n.basket.SECONDCARD&&0<n.basket.SECONDCARD.length?"/shop/authentifizierung.html?btype=redplus&goto="+window.location.pathname+"%23/basket/"+r.getBasketObj()+a:n.basket&&void 0!==n.basket.multicardContract?"/shop/authentifizierung.html?btype=multicardContract&goto="+window.location.pathname+"%23/basket/"+r.getBasketObj()+a:n.basket&&void 0!==n.basket.ultraCard?"/shop/authentifizierung.html?btype=multisim&goto="+window.location.pathname+"%23/basket/"+r.getBasketObj()+a:"/shop/authentifizierung.html?btype=decide&goto="+window.location.pathname+"%23/basket/"+r.getBasketObj()+a,window.location.href=s}else{var l="Das hat leider nicht geklappt. Versuch es bitte nochmal.";if("undefined"!==n.responseCode)switch(n.responseCode){case"P.Po.400.5":case"P.Po.400.6":case"P.Po.400.7":case"P.Po.400.8":case"P.Po.403.3":case"P.Po.403.4":case"P.Po.403.5":case"P.Po.403.6":i.setError(n.responseCode),e.go("basket");break;case"B.P.403.10":e.go("error.technicalerror",{error:{basketError:!0,errorAction:n.errorAction,errorType:VF.const.errorTrackingMap[t.status],message:l,errorArea:n.errorArea,code:n.responseCode,errorDetails:n.errorDetails,description:n.description}});break;default:e.go("error.technicalerror",{error:{errorAction:n.errorAction,errorType:VF.const.errorTrackingMap[t.status],message:l,errorArea:n.errorArea,code:n.responseCode,errorDetails:n.errorDetails,description:n.description}})}else e.go("error.technicalerror",{error:{message:l}})}})}s.setCookie("basket-id",n.id),window.basketContainer.removeVoucherFromCookie();a.init().done(function(){"true"===$.cookie("forApp")&&void 0===$.cookie("forAppConnection")?o.callService().then(function(){u()},function(){u()}):u()}),sessionStorage.removeItem("deeplink")}])}(),function(){"use strict";angular.module("ecommerce.checkout").controller("TotalCostsCtrl",["$scope",function(e){function t(){var t=sessionStorage.getItem("summaryData");if(t)try{e.summaryData=JSON.parse(t)}catch(e){console.error("Failed to parse summaryData",e)}}function r(){window.location.href.includes("/basket")||(sessionStorage.removeItem("summaryData"),window.removeEventListener("summaryDataUpdated",n))}
1function n(){e.$applyAsync(function(){t()})}e.summaryData={monthlyPrices:[],oneTimePrice:null,shippingFee:0},t(),window.addEventListener("summaryDataUpdated",n),r(),e.$on("$locationChangeSuccess",function(){r()}),e.$on("$destroy",function(){r()})}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryBasketContent",function(){var e={simOnly:!0,hardwareOnly:!1,secondCard:!1,vlux:null};return{mergeVlux20Propostions:function(t){$.each(t.costs.mobileSubscription.bnt,function(r,n){n.btx="newcontract",void 0!==n.device&&n.device.label&&(e.simOnly=!1),void 0!==n.secondCard&&0<n.secondCard.length&&(e.secondCard=!0),t.costs.mobile.push(n)}),$.each(t.costs.mobileSubscription.vvl,function(r,n){n.btx="vvl",void 0!==n.device&&n.device.label&&(e.simOnly=!1),t.costs.mobile.push(n)}),$.each(t.costs.mobileSubscription.inlife,function(r,n){n.btx="inlife",n.device.label&&(e.simOnly=!1),t.costs.mobile.push(n)}),$.each(t.costs.mobileSubscription.prepaid,function(e,r){r.btx="prepaid",t.costs.mobile.push(r)}),$.each(t.costs.mobileSubscription.secondCard,function(r,n){e.secondCard=!0,n.btx="secondCard",t.costs.mobile.push(n)}),$.each(t.costs.hardwareOnly,function(r,n){e.hardwareOnly=!0,n.btx="hardwareOnly","hardwareMobile"===n.device.productGroup?t.costs.mobile.unshift(n):t.costs.mobile.push(n)}),e.vlux=t},getBasketContent:function(){return e},getVluxData:function(){return e.vlux},getHardwareAttributes:function(){return e.vlux.costs.mobile[0]?e.vlux.costs.mobile[0].device.attributes:[]}}})}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryBasketJson",function(){var e={};return{generateBasketObj:function(t,r,n,i){var o=new vf.BasketItem,a=new vf.Basket(i);o.addTariff(r),o.addHardware(t),"NEW"===(n=n.toUpperCase())?a.addNEW(o.getItem()):a.addVVL(o.getItem()),e=a.getBasket()},generateSimonlyBasketObj:function(t,r,n){var i=new vf.BasketItem,o=new vf.Basket(n);i.addTariff(t),"NEW"===(r=r.toUpperCase())?o.addNEW(i.getItem()):o.addVVL(i.getItem()),e=o.getBasket()},generateHardwareonlyBasketObj:function(t,r){var n=new vf.BasketItem,i=new vf.Basket(r);n.addHardware(t),i.addHARDWAREONLY(n.getItem()),e=i.getBasket()},getEncodedJson:function(){return btoa(encodeURIComponent(JSON.stringify(e)))}}})}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryBasketRuleError",function(){var e={code:"",message:""};return{getError:function(){return e},setError:function(t){e.code=t,"P.Po.400.5"===t&&(e.message+="Neuverträge und Vertragsverlängerugen passen nicht zusammen in einen Warenkorb. Bring zuerst Deinen Warenkorb zur Kasse und schließe danach weitere Verträge ab."),"P.Po.400.6"===t&&(e.message+="In Deinem Warenkorb passen nur Verträge mit oder ohne Handys oder Handys ohne Vertrag. Du kannst nicht mischen. Bring zuerst Deinen Warenkorb zur Kasse und kaufe danach weiter ein."),"P.Po.400.7"===t&&(e.message+="In Deinen Warenkorb passt nur eine Vertragsart: Verträge für Privatkunden, für Geschäftskunden, für junge Leute oder Friends-and-Family-Verträge. Du kannst nicht mischen. Bring zuerst Deinen Warenkorb zur Kasse und schließe danach weitere Verträge ab."),"P.Po.400.8"===t&&(e.message+="Du kannst diesen Artikel mit dieser Option nicht in den Warenkorb legen. Wähle andere Optionen. Wenn Du schon etwas im Warenkorb hast, bring ihn am besten zuerst zur Kasse. Versuche es dann nochmal."),"P.Po.403.3"===t&&(e.message+="Dein Warenkorb ist schon voll, denn es passen nur 7 Artikel rein. Bring zuerst Deinen Warenkorb zur Kasse und kaufe danach weiter ein."),"P.Po.403.4"===t&&(e.message="Durch diesen Artikel wird Dein Warenkorb zu teuer. Bring zuerst Deinen Warenkorb zur Kasse und kaufe danach weiter ein."),"P.Po.403.5"===t&&(e.message+="In Deinem Warenkorb sind schon 3 Verträge - mehr geht leider nicht. Bring zuerst Deinen Warenkorb zur Kasse und schließe danach weitere Verträge ab."),"P.Po.403.6"===t&&(e.message+="In Deinem Warenkorb sind schon 3 Geräte - mehr geht leider nicht. Bring zuerst Deinen Warenkorb zur Kasse und kaufe danach weiter ein.")}}})}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factorybShopBasket",["factoryCartCount",function(e){var t=null,r=null;return{init:function(e){t=function(e){if(null===e||"object"!=typeof e)return e;var t=e.constructor();for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}(e)},setBasketCookie:function(){void 0!==t.numberOfPropositions&&e.setBasketCookieByValue(t.numberOfPropositions)},deleteBasketCookie:function(){e.deleteCookie()},get:function(){return t},setOfferGroup:function(e){r=e},getOfferGroup:function(){return r},isEarlyBird:function(){return void 0!==t.INLEndDate?moment(t.INLEndDate,"YYYYMMDD").format("DD.MM.YYYY"):""}
1,getSalesChannel:function(){return r.salesChannel},hasEsim:function(e){if(e)for(var t=0;t<e.length;t++)for(var r=0;r<e[t].propositions.length;r++)if("object"==typeof e[t].propositions[r].ultraCard&&e[t].propositions[r].ultraCard.isEsim)return!0;return!1},hasEsimOffer:function(){if(r.mainOffer.isEsimOffer)return!0;if(void 0!==r.redplusOffers)for(var e=0;e<r.redplusOffers.length;e++)if(r.redplusOffers[e].isEsimOffer)return!0;return!1},hasTradeInDiscount:function(){return 0<r.mainOffer.getTradeInDiscounts().length},hasPhysicalDelivery:function(){var e=function(e){for(var t=0;t<e.length;t++){if(-1!==e[t].type.indexOf("hardware"))return!0}return!1};if(e(r.mainOffer.offerComponents.components))return!0;if(!r.mainOffer.isEsimOffer&&!r.isVVL())return!0;if(void 0!==r.redplusOffers)for(var t=0;t<r.redplusOffers.length;t++){var n=r.redplusOffers[t];if(e(n.offerComponents.components))return!0;if(!n.isEsimOffer)return!0}return void 0!==r.accessoryOffers&&0<typeof r.accessoryOffers.length},getBackendIDsForHardware:function(){var e=function(e){for(var t=[],r=0;r<e.length;r++)void 0!==e[r]._enrichedDataDevice&&("hardwareMobile"!==e[r].type&&"accessoryMobile"!==e[r].type||t.push(e[r]._enrichedDataDevice.backendId));return t},t=e(r.mainOffer.offerComponents.components);if(r.redplusOffers)for(var n=0;n<r.redplusOffers.length;n++)t=t.concat(e(r.redplusOffers[n].offerComponents.components));if(r.accessoryOffers)for(var i=0;i<r.accessoryOffers.length;i++)t=t.concat(e(r.accessoryOffers[i].offerComponents.components));return t},isValidTransactionForSimplifiedCheckout:function(){if(("Online.SoHo"===t.sChan||"Online.Enterprise"===t.sChan)&&(void 0===r||!r.isVVL()||void 0!==r&&void 0!==r.redplusOffers&&0<r.redplusOffers.length))return!1;for(var e=["HARDWAREONLY","ultraCard","debit","tariffChange","Bundle"],n=0;n<e.length;n++)if("object"==typeof t[e[n]])return!1;return r.isSimOnly()},getShippingFee:function(){return parseFloat(t.shippingFee)},getBasketDate:function(){return t.validatedAt},setOrderForMyChild:function(e){t.orderForMyChild=e},getNeedsAuth:function(){return t&&t.needsAuth},getNestedProperty:function(e,t){return t.split(".").reduce(function(e,t){return e&&e[t]},e)}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryEmptyBasket",function(){var e=!1,t={};return{setWasEmptied:function(t){e=t},getWasEmptied:function(){return e},setTempbShopBasket:function(e){t=e},getTempbShopBasket:function(){return t}}})}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryTotalCosts",["$rootScope",function(e){var t={},r={},n={},i=0,o=0,a=0,s=0,c=0,u=0,l=function(){var t=s,l=c;$.each(r,function(e,r){t+=r}),$.each(n,function(e,t){l+=t}),i=t,a=(o=l)+u,e.$broadcast("bcstTotalCostsDynamicCosts")};return{setCosts:function(r,n,i){t={monthly:r,onetime:n,shipping:i,onetimeWithShipping:n+i+t.onetimeSaving,savings:t.savings,runtime:t.runtime,onetimeSaving:t.onetimeSaving},e.$broadcast("bcstTotalCosts")},setCostsObj:function(r){var n=r.fRuntime;delete n[1];var i=[];$.each(n,function(e,t){i.push({month:e,value:t})}),t.onetimeSaving=r.fOnetimeSaving,t.monthly=r.fPriceMonthly,t.onetime=r.fPriceOnetime,t.shipping=r.fShippingFee,t.onetimeWithShipping=t.onetime+t.shipping+t.onetimeSaving,t.runtime=i,t.savings=r.fSavings,c=r.fPriceOnetime,s=r.fPriceMonthly,u=0,e.$broadcast("bcstTotalCosts")},addOneTimeOption:function(e){n[e.key]=parseFloat(e.value),l()},addEBFee:function(e){r.earlyBird=e,l()},removeEBFee:function(){delete r.earlyBird,l()},addMnp:function(){n.mnp=9.99,l()},removeMnp:function(){delete n.mnp,l()},addBill:function(){r.bill=1.5,l()},removeBill:function(){delete r.bill,l()},getData:function(){return t},getDynamicValues:function(){return{month:i,onetime:o,onetimeWithShipping:a}},updateShippingFee:function(e){this.setCosts(t.monthly,t.onetime,e)},setIdentCosts:function(e){n.identMethod=e,l()},removeIdentCosts:function(){delete n.identMethod,l()}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("factoryPromoBadge",["factorybShopBasket",function(e){var t,r=!1,n=!1,i=!1,o=0,a="",s="",c=!1,u="";VF.const=VF.const||{},VF.const.cms=VF.const.cms||{};var l={},d=function(e,t){var r="";try{"object"==typeof VF.const.cms.promoBadge.text[t][e]?r=VF.const.cms.promoBadge.text[t][e]:"object"==typeof VF.const.cms.promoBadge.text[t].all&&(r=VF.const.cms.promoBadge.text[t].all)}catch(e){}return""!==r&&(r=r.Sie),r},p=function(){var e=t.mainOffer.offerServices.getSelectedDiscounts();if(e&&0<e.length&&t.mainOffer.offerComponents.subscription)for(var r=t.mainOffer.offerComponents.subscription.getEnrichedData().mainTariffId,i=0;i<e.length;i++){var c=d(r,e[i].id);if("object"==typeof c&&!1===n)return n=!0,o=e[i].id,a=c.headline,void(s=c.description)}};return{init:function(){var n=$.Deferred();return(t=e.getOfferGroup()).hasGigaKombiDiscount()&&(i=!0),function(){var e=$.Deferred(),t=VF.const.cms.promoBadge.url;return l[t]?e.resolve(l[t]):$.getJSON(t).then(function(r){l[t]=r,e.resolve(r)}).fail(function(){e.reject()}),e}().then(function(e){r=!0,VF.const.cms.promoBadge.text=e,n.resolve()}).fail(function(){n.reject()}),n},getPromoText:function(){var e={promoBadgeId:0,hasPromoBadge:!1,isGigakombiBadge:!1,headline:"",description:""};return!1===r||(i?(c=!0,function(){var e=t.mainOffer.offerComponents.subscription.getEnrichedData().mainTariffId,r="",i="",c=t.mainOffer.offerServices.getSelectedServiceIds();0<=c.indexOf(1637)&&(r="1637"),0<=c.indexOf(177)&&(r="177"),0<=c.indexOf(612)?i="612":0<=c.indexOf(618)&&(i="618");var l=d(e,u=r+i);"object"==typeof l&&!1===n&&(n=!0,o=u,a=l.headline,s=l.description)}(),!1===n&&p()):(c=!1,p()),function(){var e=t.mainOffer.offerServices.getSelectedDiscounts();if(e&&0<e.length)for(var r=0;r<e.length;r++)!0!==c||"865"!==e[r].id&&"866"!==e[r].id||(e[r].hidden=!0),o===e[r].id&&0>u.indexOf(e[r].id)&&(e[r].hidden=!0)}(),e.promoBadgeId=o,e.hasPromoBadge=n,e.isGigakombiBadge=c,e.headline=a,e.description=s),e}}}])}(),function(){"use strict";angular.module("ecommerce.checkoutTester",["ecommerce.checkout"])}(),function(){"use strict";angular.module("ecommerce.checkoutTester").controller("PutBasketCtrl",["$scope",function(e){}])}(),function(){"use strict";angular.module("ecommerce.checkout").controller("IdentChangeController",["$rootScope","$scope","$location","$q","$timeout","$http","$state","$stateParams","formsSummary","Form","factoryFormData","factorybShopBasket","identMethodChangeSrv","restoreSrv","factoryFulfilmentOrders","factorySelectedStore","factoryTracking","factoryTotalCosts","factoryCommerceApi",function(e,t,r,n,i,o,a,s,c,u,l,d,p,f,h,m,g,v,b){e.$on("shippingOptionSet",function(t,r){v.updateShippingFee(r.value),window.dispatchEvent(new CustomEvent("shippingUpdate",{detail:{shippingFee:parseFloat(r.value)}})),e.shippingFee=r.value}),$("#top").removeClass("wrapper"),t.formData=l.getData(),i(function(){if(t.orderId=parseInt(f.getOrderId())||s.orderId||r.search().orderId||"","object"!=typeof t.formData||0>=t.orderId)a.go("identauth");else{VF&&(VF.oOrder=VF.oOrder||{}),t.formData&&!t.formData.SHIPPING.shipping_storeId&&(t.formData.SHIPPING.shipping_storeId={});var e=f.getData().data.basket;
1e.sChan||(e.sChan="Online.Consumer"),window.salesChannel=e.sChan,d.init(e),generalOfferService.getOfferGroupByShopBasket(e).then(function(e){d.setOfferGroup(e),t.fulfilmentOrders=[],t.fulfilmentOrders.push({propositions:h.getAllPropositionsByBasket()}),function(){c.init(),g.setSiteStructure(["privatkunden","eCommerce","adjust order"]),g.setFormType("application funnel"),g.setFormStart(1),g.setLoginStatus("logged in"),g.setPageType("self service"),c.setStateName("adjust ols order");var e=new u("formPersData","Deine persönlichen Daten","customer");e.alterable=!1,c.setForm(e);var r=new u("formIdentData","Identifikation","online ident");c.setForm(r);var n=new u("formShipData","Deine Lieferadresse","customer address");c.setForm(n);var i=new u("formShipOptionsData","Dein Liefertermin","delivery options");c.setForm(i);var o=new u("formAccountData","Deine Zahlungsart","payment");o.alterable=!1,c.setForm(o);var a=new u("formAgbData","Allgemeine Geschäftsbedingungen","summary");a.alterable=!1,c.setForm(a),t.checkout=c.getData(),t.checkout.current=1,t.checkout.state="identchange",t.forms={},t.$apply()}(),g.trackCheckoutFormInit(e)},function(e){e&&e.responseCode&&g.trackError("technical",e.description,e.responseCode,"")});const r=5,i=6;t.currentStep=t.checkout.current+1,t.prevStep=t.checkout.current+1,t.nextStep=t.isSimOnly&&t.isVVL?r:i;var n=[];0<=t.formData.persdaten.persdaten_identMethod.type.indexOf("001")&&n.push("online"),0<=t.formData.persdaten.persdaten_identMethod.type.indexOf("003")&&n.push("shop"),0<=t.formData.persdaten.persdaten_identMethod.type.indexOf("002")&&n.push("home"),VF.onlineIdentOptions=n.toString()}}),t.show=function(e,r,n=null){if(t.forms[r].$setPristine(),n){const e=1,r=4,a=5,s=6,c=7;var i=n.currentStep===e&&(n.prevStep===s||n.prevStep===c),o=n.currentStep===e&&n.prevStep===a;t.nextStep=i?a:o?r:n.prevStep}var a=$(e.target).parents("li").index();a<c.getCurrentIndex()?(c.setCurrentForm(a),t.checkout.accordion=a,c.disbaleNextForms(a),t.submit&&(t.submit.sessiontimeout=!1)):!1===c.getCurrentForm().status?(c.formInvalid(),c.showValidationMessages(),t.$broadcast("formValidation")):(c.setCurrentForm(a),t.checkout.accordion=a)},t.$on("selectedStore",function(){t.selectedStore=m.getStore()}),t.changeIdent=function(){p.identMethodChange(t.formData).then(function(){a.go("dankeident");var e=Math.abs(parseInt((restoreData.data.orderCreatedAt-restoreData.data.requestedAt)/86400));VF.daysBeforeOrderChange=6<=e?"6-14 days":1<e?"2-5 days":"1 day",g.setPageTypeLast("self service"),g.trackLast()},function(e){e&&e.responseCode&&g.trackError("technical",e.description,e.responseCode,"")})},t.$on("selectedStore",function(){t.selectedStore=m.getStore()}),t.changeIdent=function(){p.identMethodChange(t.formData).then(function(){a.go("dankeident");var e=Math.abs(parseInt((restoreData.data.orderCreatedAt-restoreData.data.requestedAt)/86400));VF.daysBeforeOrderChange=6<=e?"6-14 days":1<e?"2-5 days":"1 day",g.setPageTypeLast("self service"),g.trackLast()},function(e){e&&e.responseCode&&g.trackError("technical",e.description,e.responseCode,"")})},t.pdfReady=!1,t.loading=!1,t.eeccError=!1,t.eeccErrorNoCSNeeded=!1;var y=null,_="Bitte warten ",S="Es ist ein technischer Fehler aufgetreten, bitte versuche es erneut.",k=function(){if(t.pdfReady)return void clearInterval(y);16>_.length?_+=".":_="Bitte warten ",document.getElementById("contractSummary")&&(document.getElementById("contractSummary").innerHTML=_)};t.contractSummaryDownload=function(e,r,n){b.contractSummaryDownload(e).then(function(e){r(e)},function(i,o){if(404===i.status){setTimeout(function(){t.contractSummaryDownload(e,r)},1e3)}else n(i,o)})},t.loadPDF=function(){if(t.loading||t.eeccError||t.eeccErrorNoCSNeeded||t.pdfReady)return;t.loading=!0,_ddq.push(["information",{information_action:"reveal",information_name:"vertragszusammenfassung",information_ui_type:"button",information_trigger:"link"}]);y=setInterval(k,800),b.contractSummaryCheckStatus().then(function(){b.contractSummaryGenerate().then(function(e){const r=e.data.data.requestid;t.requestid=r,t.contractSummaryDownload(r,function(e){if(e.data.errors.length)return"CS1000"===e.data.errors[0].errorCode?t.eeccErrorNoCSNeeded=!0:t.eeccError=!0,t.eeccErrorC
1ode=e.data.errors[0].errorCode,t.loading=!1,void _ddq.push(["error",{type:"technical",message:t.eeccError?S:"Für die Produkte, die Du bestellen möchtest, benötigst Du keine Vertragszusammenfassung.",code:t.eeccErrorCode,location:"eecc summary"}]);const r=e.data.data;window.pdf=r,t.pdfReady=!0,t.loading=!1,document.getElementById("contractSummary")&&(document.getElementById("contractSummary").innerHTML="Zusammenfassung ansehen",document.getElementById("contractSummary").classList.remove("disabled"),document.getElementById("contractSummary").classList.remove("btn-min-width"))},function(e,r){t.eeccError=!0,t.eeccErrorCode=e.data.errors[0].errorCode,t.loading=!1,_ddq.push(["error",{type:"technical",message:S,code:t.eeccErrorCode,location:"eecc summary"}])})},function(e,r){t.eeccError=!0,t.eeccErrorCode=e.data.errors[0].errorCode,t.loading=!1,_ddq.push(["error",{type:"technical",message:S,code:t.eeccErrorCode,location:"eecc summary"}])})},function(e,r){t.eeccError=!0,t.eeccErrorCode=e.data.errors[0].errorCode,t.loading=!1,_ddq.push(["error",{type:"technical",message:S,code:t.eeccErrorCode,location:"eecc summary"}])})},t.showPDF=function(){if(t.pdfReady){_ddq.push(["download file",{file_name:"eecc summary"}]);for(var e=window.pdf,r=atob(e),n=new Array(r.length),i=0;i<r.length;i++)n[i]=r.charCodeAt(i);var o=new Uint8Array(n),a=new Blob([o],{type:"application/pdf"}),s=URL.createObjectURL(a);window.open(s)}}}]).controller("IdentSuccessCtrl",["$rootScope","$scope","$http","factoryFormData","factorySuccessData","shopAuthSrv","factoryCommerceApi","factorySelectedStore","factorybShopBasket","factoryTotalCosts","factoryCutOffTime","factoryFulfilmentOrders","restoreSrv",function(e,t,r,n,i,o,a,s,c,u,l,d,p){$("#top").removeClass("noMDD"),$("#top").removeClass("wrapper");let f=document.getElementById(VF.const.newCartId);f&&(f.remove(),f=null),$(".checkoutContent").show(),$(".loading-spiner-holder").hide(),window.scrollTo(0,0),t.formData=n.getData(),t.fulfilmentOrders=d.get(),o.logout(),a.mintLogout().then(function(){vf.glnav.updateLoginIndicator()}),window.sessionStorage.clear(),"Alternativ"===t.formData.SHIPPING.shipping_type.val&&(t.selectedStore=s.getStore()),void 0!==l.getCutOffTime()&&(t.cutOffTime=l.cutOffTimeToString()),t.jungeLeuteDiscount=!1,t.studentenDiscount=!1,t.behindertenDiscount=!1;var h=c.getOfferGroup();h.hasYoungDiscount()&&(t.jungeLeuteDiscount=!0),h.hasStudentDiscount()&&(t.studentenDiscount=!0),h.hasHandicappedDiscount()&&(t.behindertenDiscount=!0),t.orderId=p.getOrderId(),p.setOrderId(0),n.setData({})}])}(),function(){"use strict";angular.module("ecommerce.checkout").controller("IdentAuthController",["$rootScope","$scope","$location","$q","$timeout","$http","$state","$stateParams","restoreSrv","factoryFormData","factoryTracking","$interval",function(e,t,r,n,i,o,a,s,c,u,l,d){l.trackPageview({siteStructure:["privatkunden","eCommerce","adjust order","login"],siteArea:"mobility",lineOfCustomer:"",platformType:"responsive",loginStatus:"not logged in",pageType:"self service"}),$("#top").removeClass("wrapper");let p=document.getElementById(VF.const.newCartId);if(p&&(p.remove(),p=null),$(function(){var e=location.search.substr(1);0<e.length&&e.split("&").forEach(function(e){var r=e.split("="),n=r[1].match(/([0-9]{5,8})\d/);"orderId"===r[0]&&n&&0<n.length&&(t.orderId=n[0])})}),t.orderId=s.orderId||r.search().orderId||"",t.hash=s.hash||r.search().hash||"",!t.orderId||!t.hash){var f=location.search.substr(1).split("&");if(f.length>0){var h=f[0],m="";f.length>1&&(m=f[1]),t.orderId=h.split("=")[1].match(/([0-9]{5,8})\d?/)[1],t.hash=m.split("=")[1]}}t.codeError=!1,t.codeExpiredMsg="",t.isSendingOTP=!1,t.isCodeExpired=!1,t.isShowingTimer=!1,t.isTechnicalError=!1,t.identAuthCode="",t.isHidden=!0,t.timer={minutes:0,seconds:0},t.timerLiveMsg="";var g=0,v=!1;let b=null,y=null;function _(e){var t=Date.now();if(!(t-g<150)&&(g=t,v)){var r=e.target;if(r&&"function"==typeof r.getBoundingClientRect){var n=r.getBoundingClientRect(),i=window.innerHeight||document.documentElement.clientHeight,o=document.querySelector("nav"),a=o?o.offsetHeight:110;if(n.top<a||n.bottom>i){var s=window.scrollY+n.top-a-10;window.scrollTo({top:s,behavior:"smooth"})}}}}t.isBlocked24h=!1,t.blocked24hMsg="Zu Deiner Bestellnummer gab es zu viele Anfragen. Aus Sicherheitsgründen kannst Du Dir erst in 24 Stunden einen neuen Code schicken lassen.",t.$wat
1ch("identAuthCode",function(e){t.identForm&&t.identForm.code&&(t.identForm.code.$setValidity("backend",!0),t.identForm.code.$valid&&(t.codeError=!1))}),t.sendOTP=function(){if(t.identForm&&t.identForm.code&&t.resetInput(),!t.isSendingOTP){t.isCodeExpired&&(t.isCodeExpired=!1),t.isTechnicalError&&(t.isTechnicalError=!1),t.isSendingOTP=!0;var e={orderId:Number(t.orderId),hash:t.hash};c.sendOTPCode(e).then(t.handleOTPSuccess,t.handleOTPError)}},t.handleOTPSuccess=function(e){const{status:r,data:n}=e||{},i=n?.data?.otplifetimeminutes;200===r&&i&&(t.handleOTPTimer(i),t.handleOTPLiveRegion())},t.handleOTPError=function(e){e&&429===e.status?t.handleUIBlocked():t.hitTechnicalError()},t.resetInput=function(){t.codeError=!1,t.identAuthCode="",t.identForm.code.$setViewValue(""),t.identForm.code.$render(),t.identForm.code.$setPristine(),t.identForm.code.$setUntouched(),t.identForm.$setPristine()},t.handleUIBlocked=function(){return t.isBlocked24h=!0,t.isCodeExpired=!0,t.codeExpiredMsg=t.blocked24hMsg,t.isSendingOTP=!0,t.isShowingTimer=!1,t.timerLiveMsg=t.blocked24hMsg,t.identForm&&t.identForm.code&&t.resetInput(),t.codeError=!1,t.stopTimer(),!0},t.hitTechnicalError=function(){t.isTechnicalError=!0,t.isSendingOTP=!1,t.codeError=!1},t.handleOTPTimer=function(e){t.isHidden=!1,t.timerLiveMsg="",t.timer.minutes=e,t.timer.seconds=0,t.isShowingTimer=!0,t.startTimer()},t.handleOTPLiveRegion=function(){t._liveRegionToggle=!t._liveRegionToggle;var e=t._liveRegionToggle?"​":"";i(function(){t.timerLiveMsg=`Dein Sicherheitscode ist gültig für: ${t.timer.minutes} Minuten 0 Sekunden${e}`,i(function(){t.timerLiveMsg="Neuen Sicherheitscode anfordern Button ist für 30 Sekunden deaktiviert."},1500)},50),i(function(){t.isHidden=!0},2e3)},t.startTimer=function(){const e=60*t.timer.minutes+t.timer.seconds;b=Date.now()+1e3*e,y&&d.cancel(y),y=d(t.updateTimer,1e3),i(function(){t.isSendingOTP=!1,t.isHidden=!1,i(function(){t._liveRegionToggle=!t._liveRegionToggle;var e=t._liveRegionToggle?"​":"";t.timerLiveMsg="Neuen Sicherheitscode anfordern Button ist aktiviert."+e,i(function(){t.isHidden=!0},2e3)},100)},3e4)},t.updateTimer=function(){const e=Math.max(0,Math.ceil((b-Date.now())/1e3)),r=Math.floor(e/60),n=Math.floor(e%60);t.timer.minutes=r,t.timer.seconds=n,e<=0&&(d.cancel(y),y=null,t.timerLiveMsg="Dein Sicherheitscode ist gültig für:"+t.timer.minutes+" Minuten "+t.timer.seconds+" Sekunden",t.codeExpiredMsg="Der Code ist leider nicht mehr gültig. Lass Dir bitte einen neuen Sicherheitscode schicken –\n und versuch es dann nochmal.",t.isCodeExpired=!0,t.isShowingTimer=!1,t.identForm&&t.identForm.code&&t.resetInput())},t.stopTimer=function(){y&&(d.cancel(y),y=null)},t.readTimer=function(){if(t.isShowingTimer){t.isHidden=!1;var e=t.timer.minutes,r=t.timer.seconds<10?"0"+t.timer.seconds:t.timer.seconds;t._liveRegionToggle=!t._liveRegionToggle;var n=t._liveRegionToggle?"​":"";t.timerLiveMsg="Dein Sicherheitscode ist gültig für:"+e+" Minuten "+r+" Sekunden"+n,i(function(){t.isHidden=!0},100)}},t.login=function(){const e={orderId:Number(t.orderId),otp:String(t.identAuthCode)};t.codeError=!1,t.identForm&&t.identForm.code.$invalid?t.codeError=!0:c.restore(e).then(function(e){u.setData(e.data.formData),a.go("identchange")},function(e){const r=e?.responseCode;r&&"R.P.401.2"===r?(t.codeError=!0,t.identForm.code.$setValidity("backend",!1)):r&&"R.P.401.10"===r?(t.isCodeExpired=!0,t.codeExpiredMsg="Der Code ist leider nicht mehr gültig. Lass Dir bitte einen neuen Sicherheitscode schicken –\n und versuch es dann nochmal.",t.resetInput()):($sscope.codeError=!1,t.hitTechnicalError())})},document.addEventListener("keydown",function(e){"Tab"===e.key&&(v=!0)}),document.addEventListener("mousedown",function(){v=!1}),document.addEventListener("focus",_,!0),t.$on("$destroy",function(){document.removeEventListener("focus",_,!0),document.removeEventListener("keydown",this),document.removeEventListener("mousedown",this)})}])}(),function(){"use strict";angular.module("ecommerce.checkout").factory("restoreSrv",["$q","$http","$injector",function(e,t,r){var n=!1,i=!1;function o(e){return n=e,e}function a(t){return e.reject(t.data)}return{authorize:function(e){var n=r.get("config");return i=e.orderId,t({method:"put",data:e,cache:!1,url:n.apiURLs.RESTORE,headers:{Accept:"application/json"}}).then(o,a)},getData:function(){return n},getOrderId:function(){return i},setOrderId:function(e){i=e},sendOTPCode:function(e){var n=r.get("config");return i=e.orderId,t({method:"post",data:e,cache:!1,url:n.apiURLs.AUTHENTICATION_SEND_OTP,headers:{Accept:"application/json"}}).then(o,a)},restore:function(e){var n=r.get("config");return i=e.orderId,t({method:"put",data:e,cache:!1,url:n.apiURLs.RESTORE,headers:{Accept:"application/json"}}).then(o,a)}}}]).factory("identMethodChangeSrv",["$q","$http","$injector",function(e,t,r){function n(e){return e}function i(t){return e.reject(t.data)}return{identMethodChange:function(e){var o=r.get("config");return t({method:"post",data:{formdata:e},cache:!1,url:o.apiURLs.IDENTCHANGE,headers:{Accept:"application/json"}}).then(n,i)}}}])}(),function(){"use strict";angular.module("ecommerce.checkout").directive("birthdateInput",["factoryRequestDate","factorybShopBasket",function(e,t){return{templateUrl:"/simplicity/ecommerce/ajax/html/snippets/form/input_birthdate_pers.html",link:function(r){var n=t.getOfferGroup();r.currentYear=e.getDate().getFullYear();r.maxAge=999,r.checkAutoTab=function(e,t){var n=parseInt(e.target.getAttribute("ng-maxlength")),i=$(e.target).val(),o=i.trim().replace(/[^\d]/gi,"");
1if(o!==i&&($(e.target).val(o),$(e.target).trigger("change")),n===o.length)if(r.forms.formPersData[e.target.id].$invalid)r.forms.formPersData[e.target.id].$touched||r.forms.formPersData[e.target.id].$setTouched();else{("Unidentified"===e.key||/^[0-9]$/g.test(e.key))&&0===$("#"+t).val().length&&$("#"+t).trigger("focus")}},r.autoLeadingZero=function(e){var t=$(e.target).val().trim();1===t.length&&($(e.target).val("0"+t),$(e.target).trigger("change"))},r.$watchGroup(["formData.persdaten.persdaten_dob_day.val","formData.persdaten.persdaten_dob_month.val","formData.persdaten.persdaten_dob_year.val","orderForMyChild"],function(t){var i=t[0],o=t[1],a=t[2];if(""!==i&&void 0!==i&&""!==o&&void 0!==o&&""!==a&&void 0!==a){var s=new Date(parseInt(a),parseInt(o)-1,parseInt(i));if(s){var c=s.getDate();if(s.getMonth()+1===parseInt(o)&&c===parseInt(i))if(r.forms.formPersData.$setValidity("validDate",!0),r.validDate=!0,r.inRange=function(t,r,n,i){return new Date(n+i,r-1,t)<=e.getDate()}(parseInt(i),parseInt(o),parseInt(a),18),r.inRange){r.forms.formPersData.$setValidity("notFullYear",!0);let t=999;n.hasStudentDiscount()&&(t=30),n.isYoung()&&!r.orderForMyChild&&(t=28),n.hasYoungDiscount()&&(t=25),n.hasJungeLeuteGigaCubeDiscount()&&(t=28),r.inRange2=function(t,r,n,i){return new Date(n+i,r-1,t)>=e.getDate()}(parseInt(i),parseInt(o),parseInt(a),t),r.inRange2?r.forms.formPersData.$setValidity("notTooOld",!0):(r.maxAge=t,r.forms.formPersData.$setValidity("notTooOld",!1))}else r.forms.formPersData.$setValidity("notFullYear",!1),r.inRange2=!0;else r.forms.formPersData.$setValidity("validDate",!1),r.validDate=!1}else r.forms.formPersData.$setValidity("validDate",!1),r.validDate=!1}else r.inRange=!0,r.inRange2=!0,r.validDate=!0,r.forms.formPersData.$setValidity("notFullYear",!0),r.forms.formPersData.$setValidity("validDate",!0),n.isYoung()&&r.forms.formPersData.$setValidity("notTooOld",!0)})}}}])}();

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.