function _objectWithoutProperties(n,t){var r={};for(var i in n)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i]);return r}function _defineProperty(n,t,i){return t in n?Object.defineProperty(n,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[t]=i,n}function _toConsumableArray(n){if(Array.isArray(n)){for(var t=0,i=Array(n.length);t<n.length;t++)i[t]=n[t];return i}return Array.from(n)}function _classCallCheck(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function _possibleConstructorReturn(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:n}function _inherits(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}function MarkerClusterer(n,t,i){var r,u;this.extend(MarkerClusterer,google.maps.OverlayView);this.map_=n;this.markers_=[];this.clusters_=[];this.sizes=[53,56,66,78,90];this.styles_=[];this.ready_=!1;r=i||{};this.gridSize_=r.gridSize||60;this.minClusterSize_=r.minimumClusterSize||2;this.maxZoom_=r.maxZoom||null;this.styles_=r.styles||[];this.imagePath_=r.imagePath||this.MARKER_CLUSTER_IMAGE_PATH_;this.imageExtension_=r.imageExtension||this.MARKER_CLUSTER_IMAGE_EXTENSION_;this.zoomOnClick_=!0;r.zoomOnClick!=undefined&&(this.zoomOnClick_=r.zoomOnClick);this.averageCenter_=!1;r.averageCenter!=undefined&&(this.averageCenter_=r.averageCenter);this.setupStyles_();this.setMap(n);this.prevZoom_=this.map_.getZoom();u=this;google.maps.event.addListener(this.map_,"zoom_changed",function(){var n=u.map_.getZoom(),t=u.map_.minZoom||0,i=Math.min(u.map_.maxZoom||100,u.map_.mapTypes[u.map_.getMapTypeId()].maxZoom);n=Math.min(Math.max(n,t),i);u.prevZoom_!=n&&(u.prevZoom_=n,u.resetViewport())});google.maps.event.addListener(this.map_,"idle",function(){u.redraw()});t&&(t.length||Object.keys(t).length)&&this.addMarkers(t,!1)}function Cluster(n){this.markerClusterer_=n;this.map_=n.getMap();this.gridSize_=n.getGridSize();this.minClusterSize_=n.getMinClusterSize();this.averageCenter_=n.isAverageCenter();this.center_=null;this.markers_=[];this.bounds_=null;this.clusterIcon_=new ClusterIcon(this,n.getStyles(),n.getGridSize())}function ClusterIcon(n,t,i){n.getMarkerClusterer().extend(ClusterIcon,google.maps.OverlayView);this.styles_=t;this.padding_=i||0;this.cluster_=n;this.center_=null;this.map_=n.getMap();this.div_=null;this.sums_=null;this.visible_=!1;this.setMap(this.map_)}function GetLocalizedText(n){axios.get("/api/language/GetLocalizedString",{params:{key:n}},{responseType:"json"}).then(function(n){return n.data}.bind(this)).catch(function(){}.bind(this))}function debounceWithPersistentEvent(n,t){var i=null;return function(r){var u=this,f=arguments;r.persist();clearTimeout(i);i=setTimeout(function(){n.apply(u,f)},t)}}var _extends=Object.assign||function(n){for(var i,r,t=1;t<arguments.length;t++){i=arguments[t];for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])}return n},_createClass=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),_typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol?"symbol":typeof n},ArticleTeaser,CurrentNewsPage,ProductCategory,StructureMainCategoriesPage,AutocompleteProduct,Autocomplete,Truncate;!function e(n,t,i){function r(u,e){var s,h,o;if(!t[u]){if(!n[u]){if(s="function"==typeof require&&require,!e&&s)return s(u,!0);if(f)return f(u,!0);h=new Error("Cannot find module '"+u+"'");throw h.code="MODULE_NOT_FOUND",h;}o=t[u]={exports:{}};n[u][0].call(o.exports,function(t){var i=n[u][1][t];return r(i?i:t)},o,o.exports,e,n,t,i)}return t[u].exports}for(var f="function"==typeof require&&require,u=0;u<i.length;u++)r(i[u]);return r}({1:[function(n){(function(t){"use strict";if(n(189),n(2),t._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");t._babelPolyfill=!0}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{189:189,2:2}],2:[function(n,t){t.exports=n(190)},{190:190}],3:[function(n,t){t.exports=function(n){if("function"!=typeof n)throw TypeError(n+" is not a function!");return n}},{}],4:[function(n,t){var i=n(84)("unscopables"),r=Array.prototype;void 0==r[i]&&n(32)(r,i,{});t.exports=function(n){r[i][n]=!0}},{32:32,84:84}],5:[function(n,t){var i=n(39);t.exports=function(n){if(!i(n))throw TypeError(n+" is not an object!");return n}},{39:39}],6:[function(n,t){"use strict";var r=n(81),i=n(77),u=n(80);t.exports=[].copyWithin||function(n,t){var o=r(this),s=u(o.length),f=i(n,s),e=i(t,s),l=arguments,a=l.length>2?l[2]:void 0,h=Math.min((void 0===a?s:i(a,s))-e,s-f),c=1;for(f>e&&e+h>f&&(c=-1,e+=h-1,f+=h-1);h-->0;)e in o?o[f]=o[e]:delete o[f],f+=c,e+=c;return o}},{77:77,80:80,81:81}],7:[function(n,t){"use strict";var r=n(81),i=n(77),u=n(80);t.exports=[].fill||function(n){for(var t=r(this,!0),f=u(t.length),e=arguments,o=e.length,s=i(o>1?e[1]:void 0,f),h=o>2?e[2]:void 0,c=void 0===h?f:i(h,f);c>s;)t[s++]=n;return t}},{77:77,80:80,81:81}],8:[function(n,t){var i=n(79),r=n(80),u=n(77);t.exports=function(n){return function(t,f,e){var h,s=i(t),c=r(s.length),o=u(e,c);if(n&&f!=f){for(;c>o;)if(h=s[o++],h!=h)return!0}else for(;c>o;o++)if((n||o in s)&&s[o]===f)return n||o;return!n&&-1}}},{77:77,79:79,80:80}],9:[function(n,t){var r=n(18),u=n(35),f=n(81),e=n(80),i=n(10);t.exports=function(n){var o=1==n,h=2==n,c=3==n,t=4==n,s=6==n,l=5==n||s;return function(a,v,y){for(var w,b,g=f(a),k=u(g),tt=r(v,y,3),nt=e(k.length),p=0,d=o?i(a,nt):h?i(a,0):void 0;nt>p;p++)if((l||p in k)&&(w=k[p],b=tt(w,p,g),n))if(o)d[p]=b;else if(b)switch(n){case 3:return!0;case 5:return w;case 6:return p;case 2:d.push(w)}else if(t)return!1;return s?-1:c||t?t:d}}},{10:10,18:18,35:35,80:80,81:81}],10:[function(n,t){var r=n(39),i=n(37),u=n(84)("species");t.exports=function(n,t){var f;return i(n)&&(f=n.constructor,"function"!=typeof f||f!==Array&&!i(f.prototype)||(f=void 0),r(f)&&(f=f[u],null===f&&(f=void 0))),new(void 0===f?Array:f)(t)}},{37:37,39:39,84:84}],11:[function(n,t){var i=n(12),r=n(84)("toStringTag"),u="Arguments"==i(function(){return arguments}());t.exports=function(n){var t,f,e;return void 0===n?"Undefined":null===n?"Null":"string"==typeof(f=(t=Object(n))[r])?f:u?i(t):"Object"==(e=i(t))&&"function"==typeof t.callee?"Arguments":e}},{12:12,84:84}],12:[function(n,t){var i={}.toString;t.exports=function(n){return i.call(n).slice(8,-1)}},{}],13:[function(n,t){"use strict";var e=n(47),c=n(32),l=n(54),a=n(18),v=n(70),y=n(20),p=n(28),w=n(43),r=n(45),f=n(83)("id"),b=n(31),o=n(39),k=n(66),s=n(21),d=Object.isExtensible||o,i=s?"_s":"size",g=0,h=function(n,t){if(!o(n))return"symbol"==(typeof n=="undefined"?"undefined":_typeof(n))?n:("string"==typeof n?"S":"P")+n;if(!b(n,f)){if(!d(n))return"F";if(!t)return"E";c(n,f,++g)}return"O"+n[f]},u=function(n,t){var i,r=h(t);if("F"!==r)return n._i[r];for(i=n._f;i;i=i.n)if(i.k==t)return i};t.exports={getConstructor:function(n,t,r,f){var o=n(function(n,u){v(n,o,t);n._i=e.create(null);n._f=void 0;n._l=void 0;n[i]=0;void 0!=u&&p(u,r,n[f],n)});return l(o.prototype,{clear:function(){for(var t=this,r=t._i,n=t._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete r[n.i];t._f=t._l=void 0;t[i]=0},"delete":function(n){var r=this,t=u(r,n),f,e;return t&&(f=t.n,e=t.p,delete r._i[t.i],t.r=!0,e&&(e.n=f),f&&(f.p=e),r._f==t&&(r._f=f),r._l==t&&(r._l=e),r[i]--),!!t},forEach:function(n){for(var t,i=a(n,arguments.length>1?arguments[1]:void 0,3);t=t?t.n:this._f;)for(i(t.v,t.k,this);t&&t.r;)t=t.p},has:function(n){return!!u(this,n)}}),s&&e.setDesc(o.prototype,"size",{get:function(){return y(this[i])}}),o},def:function(n,t,r){var e,o,f=u(n,t);return f?f.v=r:(n._l=f={i:o=h(t,!0),k:t,v:r,p:e=n._l,n:void 0,r:!1},n._f||(n._f=f),e&&(e.n=f),n[i]++,"F"!==o&&(n._i[o]=f)),n},getEntry:u,setStrong:function(n,t,i){w(n,t,function(n,t){this._t=n;this._k=t;this._l=void 0},function(){for(var t=this,i=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?"keys"==i?r(0,n.k):"values"==i?r(0,n.v):r(0,[n.k,n.v]):(t._t=void 0,r(1))},i?"entries":"values",!i,!0);k(t)}}},{18:18,20:20,21:21,28:28,31:31,32:32,39:39,43:43,45:45,47:47,54:54,66:66,70:70,83:83}],14:[function(n,t){var i=n(28),r=n(11);t.exports=function(n){return function(){if(r(this)!=n)throw TypeError(n+"#toJSON isn't generic");var t=[];return i(this,!1,t.push,t),t}}},{11:11,28:28}],15:[function(n,t){"use strict";var c=n(32),l=n(54),a=n(5),v=n(70),y=n(28),s=n(9),i=n(83)("weak"),f=n(39),r=n(31),e=Object.isExtensible||f,p=s(5),w=s(6),b=0,u=function(n){return n._l||(n._l=new h)},h=function(){this.a=[]},o=function(n,t){return p(n.a,function(n){return n[0]===t})};h.prototype={get:function(n){var t=o(this,n);if(t)return t[1]},has:function(n){return!!o(this,n)},set:function(n,t){var i=o(this,n);i?i[1]=t:this.a.push([n,t])},"delete":function(n){var t=w(this.a,function(t){return t[0]===n});return~t&&this.a.splice(t,1),!!~t}};t.exports={getConstructor:function(n,t,o,s){var h=n(function(n,i){v(n,h,t);n._i=b++;n._l=void 0;void 0!=i&&y(i,o,n[s],n)});return l(h.prototype,{"delete":function(n){return f(n)?e(n)?r(n,i)&&r(n[i],this._i)&&delete n[i][this._i]:u(this)["delete"](n):!1},has:function(n){return f(n)?e(n)?r(n,i)&&r(n[i],this._i):u(this).has(n):!1}}),h},def:function(n,t,f){return e(a(t))?(r(t,i)||c(t,i,{}),t[i][n._i]=f):u(n).set(t,f),n},frozenStore:u,WEAK:i}},{28:28,31:31,32:32,39:39,5:5,54:54,70:70,83:83,9:9}],16:[function(n,t){"use strict";var f=n(30),i=n(19),e=n(62),o=n(54),s=n(28),h=n(70),r=n(39),u=n(25),c=n(44),l=n(67);t.exports=function(n,t,a,v,y,p){var nt=f[n],w=nt,k=y?"set":"add",b=w&&w.prototype,it={},d=function(n){var t=b[n];e(b,n,"delete"==n?function(n){return p&&!r(n)?!1:t.call(this,0===n?0:n)}:"has"==n?function(n){return p&&!r(n)?!1:t.call(this,0===n?0:n)}:"get"==n?function(n){if(!p||r(n))return t.call(this,0===n?0:n)}:"add"==n?function(n){return t.call(this,0===n?0:n),this}:function(n,i){return t.call(this,0===n?0:n,i),this})};if("function"==typeof w&&(p||b.forEach&&!u(function(){(new w).entries().next()}))){var tt,g=new w,rt=g[k](p?{}:-0,1)!=g,ut=u(function(){g.has(1)}),ft=c(function(n){new w(n)});ft||(w=t(function(t,i){h(t,w,n);var r=new nt;return void 0!=i&&s(i,y,r[k],r),r}),w.prototype=b,b.constructor=w);p||g.forEach(function(n,t){tt=1/t==-(1/0)});(ut||tt)&&(d("delete"),d("has"),y&&d("get"));(tt||rt)&&d(k);p&&b.clear&&delete b.clear}else w=v.getConstructor(t,n,y,k),o(w.prototype,a);return l(w,n),it[n]=w,i(i.G+i.W+i.F*(w!=nt),it),p||v.setStrong(w,n,y),w}},{19:19,25:25,28:28,30:30,39:39,44:44,54:54,62:62,67:67,70:70}],17:[function(n,t){var i=t.exports={version:"1.2.5"};"number"==typeof __e&&(__e=i)},{}],18:[function(n,t){var i=n(3);t.exports=function(n,t,r){if(i(n),void 0===t)return n;switch(r){case 1:return function(i){return n.call(t,i)};case 2:return function(i,r){return n.call(t,i,r)};case 3:return function(i,r,u){return n.call(t,i,r,u)}}return function(){return n.apply(t,arguments)}}},{3:3}],19:[function(n,t){var r=n(30),u=n(17),o=n(32),s=n(62),f="prototype",e=function(n,t){return function(){return n.apply(t,arguments)}},i=function i(n,t,h){var l,v,c,w,p=n&i.G,b=n&i.P,a=p?r:n&i.S?r[t]||(r[t]={}):(r[t]||{})[f],y=p?u:u[t]||(u[t]={});p&&(h=t);for(l in h)v=!(n&i.F)&&a&&l in a,c=(v?a:h)[l],w=n&i.B&&v?e(c,r):b&&"function"==typeof c?e(Function.call,c):c,a&&!v&&s(a,l,c),y[l]!=c&&o(y,l,w),b&&((y[f]||(y[f]={}))[l]=c)};r.core=u;i.F=1;i.G=2;i.S=4;i.P=8;i.B=16;i.W=32;t.exports=i},{17:17,30:30,32:32,62:62}],20:[function(n,t){t.exports=function(n){if(void 0==n)throw TypeError("Can't call method on  "+n);return n}},{}],21:[function(n,t){t.exports=!n(25)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{25:25}],22:[function(n,t){var r=n(39),i=n(30).document,u=r(i)&&r(i.createElement);t.exports=function(n){return u?i.createElement(n):{}}},{30:30,39:39}],23:[function(n,t){var i=n(47);t.exports=function(n){var t=i.getKeys(n),r=i.getSymbols;if(r)for(var u,f=r(n),o=i.isEnum,e=0;f.length>e;)o.call(n,u=f[e++])&&t.push(u);return t}},{47:47}],24:[function(n,t){var i=n(84)("match");t.exports=function(n){var t=/./;try{"/./"[n](t)}catch(r){try{return t[i]=!1,!"/./"[n](t)}catch(u){}}return!0}},{84:84}],25:[function(n,t){t.exports=function(n){try{return!!n()}catch(t){return!0}}},{}],26:[function(n,t){"use strict";var i=n(32),r=n(62),u=n(25),f=n(20),e=n(84);t.exports=function(n,t,o){var s=e(n),h=""[n];u(function(){var t={};return t[s]=function(){return 7},7!=""[n](t)})&&(r(String.prototype,n,o(f,s,h)),i(RegExp.prototype,s,2==t?function(n,t){return h.call(n,this,t)}:function(n){return h.call(n,this)}))}},{20:20,25:25,32:32,62:62,84:84}],27:[function(n,t){"use strict";var i=n(5);t.exports=function(){var t=i(this),n="";return t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),t.sticky&&(n+="y"),n}},{5:5}],28:[function(n,t){var i=n(18),r=n(41),u=n(36),f=n(5),e=n(80),o=n(85);t.exports=function(n,t,s,h){var p,c,a,v=o(n),y=i(s,h,t?2:1),l=0;if("function"!=typeof v)throw TypeError(n+" is not iterable!");if(u(v))for(p=e(n.length);p>l;l++)t?y(f(c=n[l])[0],c[1]):y(n[l]);else for(a=v.call(n);!(c=a.next()).done;)r(a,y,c.value,t)}},{18:18,36:36,41:41,5:5,80:80,85:85}],29:[function(n,t){var u={}.toString,f=n(79),i=n(47).getNames,r="object"==(typeof window=="undefined"?"undefined":_typeof(window))&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],e=function(n){try{return i(n)}catch(t){return r.slice()}};t.exports.get=function(n){return r&&"[object Window]"==u.call(n)?e(n):i(f(n))}},{47:47,79:79}],30:[function(n,t){var i=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=i)},{}],31:[function(n,t){var i={}.hasOwnProperty;t.exports=function(n,t){return i.call(n,t)}},{}],32:[function(n,t){var i=n(47),r=n(61);t.exports=n(21)?function(n,t,u){return i.setDesc(n,t,r(1,u))}:function(n,t,i){return n[t]=i,n}},{21:21,47:47,61:61}],33:[function(n,t){t.exports=n(30).document&&document.documentElement},{30:30}],34:[function(n,t){t.exports=function(n,t,i){var r=void 0===i;switch(t.length){case 0:return r?n():n.call(i);case 1:return r?n(t[0]):n.call(i,t[0]);case 2:return r?n(t[0],t[1]):n.call(i,t[0],t[1]);case 3:return r?n(t[0],t[1],t[2]):n.call(i,t[0],t[1],t[2]);case 4:return r?n(t[0],t[1],t[2],t[3]):n.call(i,t[0],t[1],t[2],t[3])}return n.apply(i,t)}},{}],35:[function(n,t){var i=n(12);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(n){return"String"==i(n)?n.split(""):Object(n)}},{12:12}],36:[function(n,t){var i=n(46),r=n(84)("iterator"),u=Array.prototype;t.exports=function(n){return(i.Array||u[r])===n}},{46:46,84:84}],37:[function(n,t){var i=n(12);t.exports=Array.isArray||function(n){return"Array"==i(n)}},{12:12}],38:[function(n,t){var i=n(39),r=Math.floor;t.exports=function(n){return!i(n)&&isFinite(n)&&r(n)===n}},{39:39}],39:[function(n,t){t.exports=function(n){return"object"==(typeof n=="undefined"?"undefined":_typeof(n))?null!==n:"function"==typeof n}},{}],40:[function(n,t){var i=n(39),r=n(12),u=n(84)("match");t.exports=function(n){var t;return i(n)&&(void 0!==(t=n[u])?!!t:"RegExp"==r(n))}},{12:12,39:39,84:84}],41:[function(n,t){var i=n(5);t.exports=function(n,t,r,u){try{return u?t(i(r)[0],r[1]):t(r)}catch(e){var f=n["return"];throw void 0!==f&&i(f.call(n)),e;}}},{5:5}],42:[function(n,t){"use strict";var r=n(47),u=n(61),f=n(67),i={};n(32)(i,n(84)("iterator"),function(){return this});t.exports=function(n,t,e){n.prototype=r.create(i,{next:u(1,e)});f(n,t+" Iterator")}},{32:32,47:47,61:61,67:67,84:84}],43:[function(n,t){"use strict";var e=n(49),u=n(19),a=n(62),o=n(32),v=n(31),i=n(84)("iterator"),s=n(46),y=n(42),p=n(67),w=n(47).getProto,f=!([].keys&&"next"in[].keys()),h="@@iterator",c="keys",r="values",l=function(){return this};t.exports=function(n,t,b,k,d,g,nt){var et;y(b,t,k);var rt,ut,ft=function(n){if(!f&&n in tt)return tt[n];switch(n){case c:return function(){return new b(this,n)};case r:return function(){return new b(this,n)}}return function(){return new b(this,n)}},ot=t+" Iterator",tt=n.prototype,st=tt[i]||tt[h]||d&&tt[d],it=st||ft(d);if(st&&(et=w(it.call(new n)),p(et,ot,!0),!e&&v(tt,h)&&o(et,i,l)),e&&!nt||!f&&i in tt||o(tt,i,it),s[t]=it,s[ot]=l,d)if(rt={values:d==r?it:ft(r),keys:g?it:ft(c),entries:d!=r?it:ft("entries")},nt)for(ut in rt)ut in tt||a(tt,ut,rt[ut]);else u(u.P+u.F*f,t,rt);return rt}},{19:19,31:31,32:32,42:42,46:46,47:47,49:49,62:62,67:67,84:84}],44:[function(n,t){var i=n(84)("iterator"),u=!1,r;try{r=[7][i]();r["return"]=function(){u=!0};Array.from(r,function(){throw 2;})}catch(f){}t.exports=function(n,t){var f,r,e;if(!t&&!u)return!1;f=!1;try{r=[7];e=r[i]();e.next=function(){f=!0};r[i]=function(){return e};n(r)}catch(o){}return f}},{84:84}],45:[function(n,t){t.exports=function(n,t){return{value:t,done:!!n}}},{}],46:[function(n,t){t.exports={}},{}],47:[function(n,t){var i=Object;t.exports={create:i.create,getProto:i.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:i.getOwnPropertyDescriptor,setDesc:i.defineProperty,setDescs:i.defineProperties,getKeys:i.keys,getNames:i.getOwnPropertyNames,getSymbols:i.getOwnPropertySymbols,each:[].forEach}},{}],48:[function(n,t){var i=n(47),r=n(79);t.exports=function(n,t){for(var u,f=r(n),e=i.getKeys(f),s=e.length,o=0;s>o;)if(f[u=e[o++]]===t)return u}},{47:47,79:79}],49:[function(n,t){t.exports=!1},{}],50:[function(n,t){t.exports=Math.expm1||function(n){return 0==(n=+n)?n:n>-1e-6&&1e-6>n?n+n*n/2:Math.exp(n)-1}},{}],51:[function(n,t){t.exports=Math.log1p||function(n){return(n=+n)>-1e-8&&1e-8>n?n-n*n/2:Math.log(1+n)}},{}],52:[function(n,t){t.exports=Math.sign||function(n){return 0==(n=+n)||n!=n?n:0>n?-1:1}},{}],53:[function(n,t){var i,u,f,e=n(30),a=n(76).set,l=e.MutationObserver||e.WebKitMutationObserver,r=e.process,o="process"==n(12)(r),s=function(){var t,n;for(o&&(t=r.domain)&&(r.domain=null,t.exit());i;)n=i.domain,n&&n.enter(),i.fn.call(),n&&n.exit(),i=i.next;u=void 0;t&&t.enter()},h,c;o?f=function(){r.nextTick(s)}:l?(h=1,c=document.createTextNode(""),new l(s).observe(c,{characterData:!0}),f=function(){c.data=h=-h}):f=function(){a.call(e,s)};t.exports=function(n){var t={fn:n,next:void 0,domain:o&&r.domain};u&&(u.next=t);i||(i=t,f());u=t}},{12:12,30:30,76:76}],54:[function(n,t){var i=n(62);t.exports=function(n,t){for(var r in t)i(n,r,t[r]);return n}},{62:62}],55:[function(n,t){var i=n(47),r=n(81),u=n(35);t.exports=n(25)(function(){var n=Object.assign,t={},i={},r=Symbol(),u="abcdefghijklmnopqrst";return t[r]=7,u.split("").forEach(function(n){i[n]=n}),7!=n({},t)[r]||Object.keys(n({},i)).join("")!=u})?function(n){for(var e=r(n),o=arguments,v=o.length,s=1,h=i.getKeys,c=i.getSymbols,y=i.isEnum;v>s;)for(var f,t=u(o[s++]),l=c?h(t).concat(c(t)):h(t),p=l.length,a=0;p>a;)y.call(t,f=l[a++])&&(e[f]=t[f]);return e}:Object.assign},{25:25,35:35,47:47,81:81}],56:[function(n,t){var i=(n(19),n(17)),r=n(25);t.exports=function(t,u){var f=n(19),e=(i.Object||{})[t]||Object[t],o={};o[t]=u(e);f(f.S+f.F*r(function(){e(1)}),"Object",o)}},{17:17,19:19,25:25}],57:[function(n,t){var i=n(47),r=n(79),u=i.isEnum;t.exports=function(n){return function(t){for(var f,e=r(t),o=i.getKeys(e),c=o.length,s=0,h=[];c>s;)u.call(e,f=o[s++])&&h.push(n?[f,e[f]]:e[f]);return h}}},{47:47,79:79}],58:[function(n,t){var i=n(47),u=n(5),r=n(30).Reflect;t.exports=r&&r.ownKeys||function(n){var t=i.getNames(u(n)),r=i.getSymbols;return r?t.concat(r(n)):t}},{30:30,47:47,5:5}],59:[function(n,t){"use strict";var r=n(60),i=n(34),u=n(3);t.exports=function(){for(var o=u(this),n=arguments.length,t=Array(n),f=0,s=r._,e=!1;n>f;)(t[f]=arguments[f++])===s&&(e=!0);return function(){var r,c=this,f=arguments,l=f.length,u=0,h=0;if(!e&&!l)return i(o,t,c);if(r=t.slice(),e)for(;n>u;u++)r[u]===s&&(r[u]=f[h++]);for(;l>h;)r.push(f[h++]);return i(o,r,c)}}},{3:3,34:34,60:60}],60:[function(n,t){t.exports=n(30)},{30:30}],61:[function(n,t){t.exports=function(n,t){return{enumerable:!(1&n),configurable:!(2&n),writable:!(4&n),value:t}}},{}],62:[function(n,t){var e=n(30),i=n(32),r=n(83)("src"),u="toString",f=Function[u],o=(""+f).split(u);n(17).inspectSource=function(n){return f.call(n)};(t.exports=function(n,t,u,f){"function"==typeof u&&(u.hasOwnProperty(r)||i(u,r,n[t]?""+n[t]:o.join(String(t))),u.hasOwnProperty("name")||i(u,"name",t));n===e?n[t]=u:(f||delete n[t],i(n,t,u))})(Function.prototype,u,function(){return"function"==typeof this&&this[r]||f.call(this)})},{17:17,30:30,32:32,83:83}],63:[function(n,t){t.exports=function(n,t){var i=t===Object(t)?function(n){return t[n]}:t;return function(t){return String(t).replace(n,i)}}},{}],64:[function(n,t){t.exports=Object.is||function(n,t){return n===t?0!==n||1/n==1/t:n!=n&&t!=t}},{}],65:[function(n,t){var r=n(47).getDesc,u=n(39),f=n(5),i=function(n,t){if(f(n),!u(t)&&null!==t)throw TypeError(t+": can't set as prototype!");};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,u,f){try{f=n(18)(Function.call,r(Object.prototype,"__proto__").set,2);f(t,[]);u=!(t instanceof Array)}catch(e){u=!0}return function(n,t){return i(n,t),u?n.__proto__=t:f(n,t),n}}({},!1):void 0),check:i}},{18:18,39:39,47:47,5:5}],66:[function(n,t){"use strict";var r=n(30),u=n(47),f=n(21),i=n(84)("species");t.exports=function(n){var t=r[n];f&&t&&!t[i]&&u.setDesc(t,i,{configurable:!0,get:function(){return this}})}},{21:21,30:30,47:47,84:84}],67:[function(n,t){var r=n(47).setDesc,u=n(31),i=n(84)("toStringTag");t.exports=function(n,t,f){n&&!u(n=f?n:n.prototype,i)&&r(n,i,{configurable:!0,value:t})}},{31:31,47:47,84:84}],68:[function(n,t){var i=n(30),r="__core-js_shared__",u=i[r]||(i[r]={});t.exports=function(n){return u[n]||(u[n]={})}},{30:30}],69:[function(n,t){var i=n(5),r=n(3),u=n(84)("species");t.exports=function(n,t){var f,e=i(n).constructor;return void 0===e||void 0==(f=i(e)[u])?t:r(f)}},{3:3,5:5,84:84}],70:[function(n,t){t.exports=function(n,t,i){if(!(n instanceof t))throw TypeError(i+": use the 'new' operator!");return n}},{}],71:[function(n,t){var i=n(78),r=n(20);t.exports=function(n){return function(t,u){var e,s,o=String(r(t)),f=i(u),h=o.length;return 0>f||f>=h?n?"":void 0:(e=o.charCodeAt(f),55296>e||e>56319||f+1===h||(s=o.charCodeAt(f+1))<56320||s>57343?n?o.charAt(f):e:n?o.slice(f,f+2):(e-55296<<10)+(s-56320)+65536)}}},{20:20,78:78}],72:[function(n,t){var i=n(40),r=n(20);t.exports=function(n,t,u){if(i(t))throw TypeError("String#"+u+" doesn't accept regex!");return String(r(n))}},{20:20,40:40}],73:[function(n,t){var i=n(80),r=n(74),u=n(20);t.exports=function(n,t,f,e){var s=String(u(n)),l=s.length,h=void 0===f?" ":String(f),a=i(t),c,o;return l>=a?s:(""==h&&(h=" "),c=a-l,o=r.call(h,Math.ceil(c/h.length)),o.length>c&&(o=o.slice(0,c)),e?o+s:s+o)}},{20:20,74:74,80:80}],74:[function(n,t){"use strict";var i=n(78),r=n(20);t.exports=function(n){var u=String(r(this)),f="",t=i(n);if(0>t||t==1/0)throw RangeError("Count can't be negative");for(;t>0;(t>>>=1)&&(u+=u))1&t&&(f+=u);return f}},{20:20,78:78}],75:[function(n,t){var r=n(19),o=n(20),s=n(25),u="\t\n\x0b\f\r   ᠎             　\u2028\u2029﻿",i="["+u+"]",f="​",h=RegExp("^"+i+i+"*"),c=RegExp(i+i+"*$"),e=function(n,t){var i={};i[n]=t(l);r(r.P+r.F*s(function(){return!!u[n]()||f[n]()!=f}),"String",i)},l=e.trim=function(n,t){return n=String(o(n)),1&t&&(n=n.replace(h,"")),2&t&&(n=n.replace(c,"")),n};t.exports=e},{19:19,20:20,25:25}],76:[function(n,t){"use strict";var r,e,o,s=n(18),k=n(34),a=n(33),v=n(22),i=n(30),y=i.process,h=i.setImmediate,c=i.clearImmediate,p=i.MessageChannel,l=0,u={},w="onreadystatechange",f=function(){var n=+this,t;u.hasOwnProperty(n)&&(t=u[n],delete u[n],t())},b=function(n){f.call(n.data)};h&&c||(h=function(n){for(var t=[],i=1;arguments.length>i;)t.push(arguments[i++]);return u[++l]=function(){k("function"==typeof n?n:Function(n),t)},r(l),l},c=function(n){delete u[n]},"process"==n(12)(y)?r=function(n){y.nextTick(s(f,n,1))}:p?(e=new p,o=e.port2,e.port1.onmessage=b,r=s(o.postMessage,o,1)):i.addEventListener&&"function"==typeof postMessage&&!i.importScripts?(r=function(n){i.postMessage(n+"","*")},i.addEventListener("message",b,!1)):r=w in v("script")?function(n){a.appendChild(v("script"))[w]=function(){a.removeChild(this);f.call(n)}}:function(n){setTimeout(s(f,n,1),0)});t.exports={set:h,clear:c}},{12:12,18:18,22:22,30:30,33:33,34:34}],77:[function(n,t){var i=n(78),r=Math.max,u=Math.min;t.exports=function(n,t){return n=i(n),0>n?r(n+t,0):u(n,t)}},{78:78}],78:[function(n,t){var i=Math.ceil,r=Math.floor;t.exports=function(n){return isNaN(n=+n)?0:(n>0?r:i)(n)}},{}],79:[function(n,t){var i=n(35),r=n(20);t.exports=function(n){return i(r(n))}},{20:20,35:35}],80:[function(n,t){var i=n(78),r=Math.min;t.exports=function(n){return n>0?r(i(n),9007199254740991):0}},{78:78}],81:[function(n,t){var i=n(20);t.exports=function(n){return Object(i(n))}},{20:20}],82:[function(n,t){var i=n(39);t.exports=function(n,t){if(!i(n))return n;var r,u;if(t&&"function"==typeof(r=n.toString)&&!i(u=r.call(n))||"function"==typeof(r=n.valueOf)&&!i(u=r.call(n))||!t&&"function"==typeof(r=n.toString)&&!i(u=r.call(n)))return u;throw TypeError("Can't convert object to primitive value");}},{39:39}],83:[function(n,t){var i=0,r=Math.random();t.exports=function(n){return"Symbol(".concat(void 0===n?"":n,")_",(++i+r).toString(36))}},{}],84:[function(n,t){var r=n(68)("wks"),u=n(83),i=n(30).Symbol;t.exports=function(n){return r[n]||(r[n]=i&&i[n]||(i||u)("Symbol."+n))}},{30:30,68:68,83:83}],85:[function(n,t){var i=n(11),r=n(84)("iterator"),u=n(46);t.exports=n(17).getIteratorMethod=function(n){if(void 0!=n)return n[r]||n["@@iterator"]||u[i(n)]}},{11:11,17:17,46:46,84:84}],86:[function(n){"use strict";var a,i=n(47),nt=n(21),pt=n(61),v=n(33),tt=n(22),o=n(31),wt=n(12),t=n(19),bt=n(34),f=n(9),s=n(83)("__proto__"),kt=n(39),y=n(5),it=n(3),dt=n(81),rt=n(79),gt=n(78),ut=n(77),e=n(80),p=n(35),w=n(25),ft=Object.prototype,et=[],h=et.slice,ni=et.join,ot=i.setDesc,ti=i.getDesc,b=i.setDescs,st=n(8)(!1),k={},at,vt,g,r;nt||(a=!w(function(){return 7!=ot(tt("div"),"a",{get:function(){return 7}}).a}),i.setDesc=function(n,t,i){if(a)try{return ot(n,t,i)}catch(r){}if("get"in i||"set"in i)throw TypeError("Accessors not supported!");return"value"in i&&(y(n)[t]=i.value),n},i.getDesc=function(n,t){if(a)try{return ti(n,t)}catch(i){}if(o(n,t))return pt(!ft.propertyIsEnumerable.call(n,t),n[t])},i.setDescs=b=function(n,t){y(n);for(var r,u=i.getKeys(t),e=u.length,f=0;e>f;)i.setDesc(n,r=u[f++],t[r]);return n});t(t.S+t.F*!nt,"Object",{getOwnPropertyDescriptor:i.getDesc,defineProperty:i.setDesc,defineProperties:b});var c="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),ht=c.concat("length","prototype"),ct=c.length,l=function(){var n,t=tt("iframe"),i=ct;for(t.style.display="none",v.appendChild(t),t.src="javascript:",n=t.contentWindow.document,n.open(),n.write("<script>document.F=Object<\/script>"),n.close(),l=n.F;i--;)delete l.prototype[c[i]];return l()},lt=function(n,t){return function(i){var r,f=rt(i),e=0,u=[];for(r in f)r!=s&&o(f,r)&&u.push(r);for(;t>e;)o(f,r=n[e++])&&(~st(u,r)||u.push(r));return u}},d=function(){};t(t.S,"Object",{getPrototypeOf:i.getProto=i.getProto||function(n){return n=dt(n),o(n,s)?n[s]:"function"==typeof n.constructor&&n instanceof n.constructor?n.constructor.prototype:n instanceof Object?ft:null},getOwnPropertyNames:i.getNames=i.getNames||lt(ht,ht.length,!0),create:i.create=i.create||function(n,t){var i;return null!==n?(d.prototype=y(n),i=new d,d.prototype=null,i[s]=n):i=l(),void 0===t?i:b(i,t)},keys:i.getKeys=i.getKeys||lt(c,ct,!1)});at=function(n,t,i){if(!(t in k)){for(var u=[],r=0;t>r;r++)u[r]="a["+r+"]";k[t]=Function("F,a","return new F("+u.join(",")+")")}return k[t](n,i)};t(t.P,"Function",{bind:function(n){var t=it(this),r=h.call(arguments,1),i=function i(){var u=r.concat(h.call(arguments));return this instanceof i?at(t,u.length,u):bt(t,u,n)};return kt(t.prototype)&&(i.prototype=t.prototype),i}});vt=w(function(){v&&h.call(v)});t(t.P+t.F*vt,"Array",{slice:function(n,t){var r=e(this.length),f=wt(this);if(t=void 0===t?r:t,"Array"==f)return h.call(this,n,t);for(var u=ut(n,r),c=ut(t,r),o=e(c-u),s=Array(o),i=0;o>i;i++)s[i]="String"==f?this.charAt(u+i):this[u+i];return s}});t(t.P+t.F*(p!=Object),"Array",{join:function(){return ni.apply(p(this),arguments)}});t(t.S,"Array",{isArray:n(37)});g=function(n){return function(t,i){it(t);var u=p(this),f=e(u.length),r=n?f-1:0,o=n?-1:1;if(arguments.length<2)for(;;){if(r in u){i=u[r];r+=o;break}if(r+=o,n?0>r:r>=f)throw TypeError("Reduce of empty array with no initial value");}for(;n?r>=0:f>r;r+=o)r in u&&(i=t(i,u[r],r,this));return i}};r=function(n){return function(t){return n(this,t,arguments[1])}};t(t.P,"Array",{forEach:i.each=i.each||r(f(0)),map:r(f(1)),filter:r(f(2)),some:r(f(3)),every:r(f(4)),reduce:g(!1),reduceRight:g(!0),indexOf:r(st),lastIndexOf:function(n,t){var r=rt(this),u=e(r.length),i=u-1;for(arguments.length>1&&(i=Math.min(i,gt(t))),0>i&&(i=e(u+i));i>=0;i--)if(i in r&&r[i]===n)return i;return-1}});t(t.S,"Date",{now:function(){return+new Date}});var u=function(n){return n>9?n:"0"+n},yt=new Date(-50000000000001),ii=!(yt.toISOString&&"0385-07-25T07:06:39.999Z"==yt.toISOString()&&w(function(){new Date(NaN).toISOString()}));t(t.P+t.F*ii,"Date",{toISOString:function(){if(!isFinite(this))throw RangeError("Invalid time value");var n=this,t=n.getUTCFullYear(),i=n.getUTCMilliseconds(),r=0>t?"-":t>9999?"+":"";return r+("00000"+Math.abs(t)).slice(r?-6:-4)+"-"+u(n.getUTCMonth()+1)+"-"+u(n.getUTCDate())+"T"+u(n.getUTCHours())+":"+u(n.getUTCMinutes())+":"+u(n.getUTCSeconds())+"."+(i>99?i:"0"+u(i))+"Z"}})},{12:12,19:19,21:21,22:22,25:25,3:3,31:31,33:33,34:34,35:35,37:37,39:39,47:47,5:5,61:61,77:77,78:78,79:79,8:8,80:80,81:81,83:83,9:9}],87:[function(n){"use strict";var t=n(19);t(t.P,"Array",{copyWithin:n(6)});n(4)("copyWithin")},{19:19,4:4,6:6}],88:[function(n){var t=n(19);t(t.P,"Array",{fill:n(7)});n(4)("fill")},{19:19,4:4,7:7}],89:[function(n){"use strict";var t="findIndex",i=n(19),r=!0,u=n(9)(6);t in[]&&Array(1)[t](function(){r=!1});i(i.P+i.F*r,"Array",{findIndex:function(n){return u(this,n,arguments.length>1?arguments[1]:void 0)}});n(4)(t)},{19:19,4:4,9:9}],90:[function(n){"use strict";var t="find",i=n(19),r=!0,u=n(9)(5);t in[]&&Array(1)[t](function(){r=!1});i(i.P+i.F*r,"Array",{find:function(n){return u(this,n,arguments.length>1?arguments[1]:void 0)}});n(4)(t)},{19:19,4:4,9:9}],91:[function(n){"use strict";var i=n(18),t=n(19),r=n(81),u=n(41),f=n(36),e=n(80),o=n(85);t(t.S+t.F*!n(44)(function(n){Array.from(n)}),"Array",{from:function(n){var l,s,a,v,h=r(n),y="function"==typeof this?this:Array,p=arguments,k=p.length,c=k>1?p[1]:void 0,w=void 0!==c,t=0,b=o(h);if(w&&(c=i(c,k>2?p[2]:void 0,2)),void 0==b||y==Array&&f(b))for(l=e(h.length),s=new y(l);l>t;t++)s[t]=w?c(h[t],t):h[t];else for(v=b.call(h),s=new y;!(a=v.next()).done;t++)s[t]=w?u(v,c,[a.value,t],!0):a.value;return s.length=t,s}})},{18:18,19:19,36:36,41:41,44:44,80:80,81:81,85:85}],92:[function(n,t){"use strict";var r=n(4),i=n(45),u=n(46),f=n(79);t.exports=n(43)(Array,"Array",function(n,t){this._t=f(n);this._i=0;this._k=t},function(){var t=this._t,r=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):"keys"==r?i(0,n):"values"==r?i(0,t[n]):i(0,[n,t[n]])},"values");u.Arguments=u.Array;r("keys");r("values");r("entries")},{4:4,43:43,45:45,46:46,79:79}],93:[function(n){"use strict";var t=n(19);t(t.S+t.F*n(25)(function(){function n(){}return!(Array.of.call(n)instanceof n)}),"Array",{of:function(){for(var n=0,r=arguments,t=r.length,i=new("function"==typeof this?this:Array)(t);t>n;)i[n]=r[n++];return i.length=t,i}})},{19:19,25:25}],94:[function(n){n(66)("Array")},{66:66}],95:[function(n){"use strict";var t=n(47),i=n(39),r=n(84)("hasInstance"),u=Function.prototype;r in u||t.setDesc(u,r,{value:function(n){if("function"!=typeof this||!i(n))return!1;if(!i(this.prototype))return n instanceof this;for(;n=t.getProto(n);)if(this.prototype===n)return!0;return!1}})},{39:39,47:47,84:84}],96:[function(n){var i=n(47).setDesc,u=n(61),f=n(31),r=Function.prototype,e=/^\s*function ([^ (]*)/,t="name";t in r||n(21)&&i(r,t,{configurable:!0,get:function(){var n=(""+this).match(e),r=n?n[1]:"";return f(this,t)||i(this,t,u(5,r)),r}})},{21:21,31:31,47:47,61:61}],97:[function(n){"use strict";var t=n(13);n(16)("Map",function(n){return function(){return n(this,arguments.length>0?arguments[0]:void 0)}},{get:function(n){var i=t.getEntry(this,n);return i&&i.v},set:function(n,i){return t.def(this,0===n?0:n,i)}},t,!0)},{13:13,16:16}],98:[function(n){var t=n(19),u=n(51),i=Math.sqrt,r=Math.acosh;t(t.S+t.F*!(r&&710==Math.floor(r(Number.MAX_VALUE))),"Math",{acosh:function(n){return(n=+n)<1?NaN:n>94906265.624251559?Math.log(n)+Math.LN2:u(n-1+i(n-1)*i(n+1))}})},{19:19,51:51}],99:[function(n){function t(n){return isFinite(n=+n)&&0!=n?0>n?-t(-n):Math.log(n+Math.sqrt(n*n+1)):n}var i=n(19);i(i.S,"Math",{asinh:t})},{19:19}],100:[function(n){var t=n(19);t(t.S,"Math",{atanh:function(n){return 0==(n=+n)?n:Math.log((1+n)/(1-n))/2}})},{19:19}],101:[function(n){var t=n(19),i=n(52);t(t.S,"Math",{cbrt:function(n){return i(n=+n)*Math.pow(Math.abs(n),1/3)}})},{19:19,52:52}],102:[function(n){var t=n(19);t(t.S,"Math",{clz32:function(n){return(n>>>=0)?31-Math.floor(Math.log(n+.5)*Math.LOG2E):32}})},{19:19}],103:[function(n){var t=n(19),i=Math.exp;t(t.S,"Math",{cosh:function(n){return(i(n=+n)+i(-n))/2}})},{19:19}],104:[function(n){var t=n(19);t(t.S,"Math",{expm1:n(50)})},{19:19,50:50}],105:[function(n){var f=n(19),e=n(52),t=Math.pow,r=t(2,-52),i=t(2,-23),o=t(2,127)*(2-i),u=t(2,-126),s=function(n){return n+1/r-1/r};f(f.S,"Math",{fround:function(n){var h,t,f=Math.abs(n),c=e(n);return u>f?c*s(f/u/i)*u*i:(h=(1+i/r)*f,t=h-(h-f),t>o||t!=t?c*(1/0):c*t)}})},{19:19,52:52}],106:[function(n){var t=n(19),i=Math.abs;t(t.S,"Math",{hypot:function(){for(var n,t,u=0,f=0,e=arguments,o=e.length,r=0;o>f;)n=i(e[f++]),n>r?(t=r/n,u=u*t*t+1,r=n):n>0?(t=n/r,u+=t*t):u+=n;return r===1/0?1/0:r*Math.sqrt(u)}})},{19:19}],107:[function(n){var t=n(19),i=Math.imul;t(t.S+t.F*n(25)(function(){return-5!=i(4294967295,5)||2!=i.length}),"Math",{imul:function(n,t){var i=65535,r=+n,u=+t,f=i&r,e=i&u;return 0|f*e+((i&r>>>16)*e+f*(i&u>>>16)<<16>>>0)}})},{19:19,25:25}],108:[function(n){var t=n(19);t(t.S,"Math",{log10:function(n){return Math.log(n)/Math.LN10}})},{19:19}],109:[function(n){var t=n(19);t(t.S,"Math",{log1p:n(51)})},{19:19,51:51}],110:[function(n){var t=n(19);t(t.S,"Math",{log2:function(n){return Math.log(n)/Math.LN2}})},{19:19}],111:[function(n){var t=n(19);t(t.S,"Math",{sign:n(52)})},{19:19,52:52}],112:[function(n){var t=n(19),i=n(50),r=Math.exp;t(t.S+t.F*n(25)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(n){return Math.abs(n=+n)<1?(i(n)-i(-n))/2:(r(n-1)-r(-n-1))*(Math.E/2)}})},{19:19,25:25,50:50}],113:[function(n){var t=n(19),i=n(50),r=Math.exp;t(t.S,"Math",{tanh:function(n){var t=i(n=+n),u=i(-n);return t==1/0?1:u==1/0?-1:(t-u)/(r(n)+r(-n))}})},{19:19,50:50}],114:[function(n){var t=n(19);t(t.S,"Math",{trunc:function(n){return(n>0?Math.floor:Math.ceil)(n)}})},{19:19}],115:[function(n){"use strict";var i=n(47),e=n(30),o=n(31),s=n(12),c=n(82),l=n(25),a=n(75).trim,r="Number",t=e[r],u=t,f=t.prototype,v=s(i.create(f))==r,y="trim"in String.prototype,h=function(n){var t=c(n,!1),r,u,f,i;if("string"==typeof t&&t.length>2)if(t=y?t.trim():a(t,3),i=t.charCodeAt(0),43===i||45===i){if(r=t.charCodeAt(2),88===r||120===r)return NaN}else if(48===i){switch(t.charCodeAt(1)){case 66:case 98:u=2;f=49;break;case 79:case 111:u=8;f=55;break;default:return+t}for(var e,o=t.slice(2),s=0,h=o.length;h>s;s++)if(e=o.charCodeAt(s),48>e||e>f)return NaN;return parseInt(o,u)}return+t};t(" 0o1")&&t("0b1")&&!t("+0x1")||(t=function(n){var e=arguments.length<1?0:n,i=this;return i instanceof t&&(v?l(function(){f.valueOf.call(i)}):s(i)!=r)?new u(h(e)):h(e)},i.each.call(n(21)?i.getNames(u):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),function(n){o(u,n)&&!o(t,n)&&i.setDesc(t,n,i.getDesc(u,n))}),t.prototype=f,f.constructor=t,n(62)(e,r,t))},{12:12,21:21,25:25,30:30,31:31,47:47,62:62,75:75,82:82}],116:[function(n){var t=n(19);t(t.S,"Number",{EPSILON:Math.pow(2,-52)})},{19:19}],117:[function(n){var t=n(19),i=n(30).isFinite;t(t.S,"Number",{isFinite:function(n){return"number"==typeof n&&i(n)}})},{19:19,30:30}],118:[function(n){var t=n(19);t(t.S,"Number",{isInteger:n(38)})},{19:19,38:38}],119:[function(n){var t=n(19);t(t.S,"Number",{isNaN:function(n){return n!=n}})},{19:19}],120:[function(n){var t=n(19),i=n(38),r=Math.abs;t(t.S,"Number",{isSafeInteger:function(n){return i(n)&&r(n)<=9007199254740991}})},{19:19,38:38}],121:[function(n){var t=n(19);t(t.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},{19:19}],122:[function(n){var t=n(19);t(t.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},{19:19}],123:[function(n){var t=n(19);t(t.S,"Number",{parseFloat:parseFloat})},{19:19}],124:[function(n){var t=n(19);t(t.S,"Number",{parseInt:parseInt})},{19:19}],125:[function(n){var t=n(19);t(t.S+t.F,"Object",{assign:n(55)})},{19:19,55:55}],126:[function(n){var t=n(39);n(56)("freeze",function(n){return function(i){return n&&t(i)?n(i):i}})},{39:39,56:56}],127:[function(n){var t=n(79);n(56)("getOwnPropertyDescriptor",function(n){return function(i,r){return n(t(i),r)}})},{56:56,79:79}],128:[function(n){n(56)("getOwnPropertyNames",function(){return n(29).get})},{29:29,56:56}],129:[function(n){var t=n(81);n(56)("getPrototypeOf",function(n){return function(i){return n(t(i))}})},{56:56,81:81}],130:[function(n){var t=n(39);n(56)("isExtensible",function(n){return function(i){return t(i)?n?n(i):!0:!1}})},{39:39,56:56}],131:[function(n){var t=n(39);n(56)("isFrozen",function(n){return function(i){return t(i)?n?n(i):!1:!0}})},{39:39,56:56}],132:[function(n){var t=n(39);n(56)("isSealed",function(n){return function(i){return t(i)?n?n(i):!1:!0}})},{39:39,56:56}],133:[function(n){var t=n(19);t(t.S,"Object",{is:n(64)})},{19:19,64:64}],134:[function(n){var t=n(81);n(56)("keys",function(n){return function(i){return n(t(i))}})},{56:56,81:81}],135:[function(n){var t=n(39);n(56)("preventExtensions",function(n){return function(i){return n&&t(i)?n(i):i}})},{39:39,56:56}],136:[function(n){var t=n(39);n(56)("seal",function(n){return function(i){return n&&t(i)?n(i):i}})},{39:39,56:56}],137:[function(n){var t=n(19);t(t.S,"Object",{setPrototypeOf:n(65).set})},{19:19,65:65}],138:[function(n){"use strict";var i=n(11),t={};t[n(84)("toStringTag")]="z";t+""!="[object z]"&&n(62)(Object.prototype,"toString",function(){return"[object "+i(this)+"]"},!0)},{11:11,62:62,84:84}],139:[function(n){"use strict";var a,h=n(47),rt=n(49),e=n(30),o=n(18),v=n(11),i=n(19),y=n(39),ut=n(5),c=n(3),ft=n(70),p=n(28),w=n(65).set,et=n(64),ot=n(84)("species"),st=n(69),s=n(83)("record"),b=n(53),r="Promise",k=e.process,ht="process"==v(k),t=e[r],d=function(n){var i=new t(function(){});return n&&(i.constructor=Object),t.resolve(i)===i},u=function(){function i(n){var r=new t(n);return w(r,i.prototype),r}var r=!1,u;try{(r=t&&t.resolve&&d(),w(i,t),i.prototype=h.create(t.prototype,{constructor:{value:i}}),i.resolve(5).then(function(){})instanceof i||(r=!1),r&&n(21))&&(u=!1,t.resolve(h.setDesc({},"then",{get:function(){u=!0}})),r=u)}catch(e){r=!1}return r}(),ct=function(n){return y(n)&&(u?"Promise"==v(n):s in n)},lt=function(n,i){return rt&&n===t&&i===a?!0:et(n,i)},g=function(n){var t=ut(n)[ot];return void 0!=t?t:n},nt=function(n){var t;return y(n)&&"function"==typeof(t=n.then)?t:!1},l=function(n,t){if(!n.n){n.n=!0;var i=n.c;b(function(){for(var r=n.v,u=1==n.s,f=0,o=function(t){var i,e,f=u?t.ok:t.fail;try{f?(u||(n.h=!0),i=f===!0?r:f(r),i===t.P?t.rej(TypeError("Promise-chain cycle")):(e=nt(i))?e.call(i,t.res,t.rej):t.res(i)):t.rej(r)}catch(o){t.rej(o)}};i.length>f;)o(i[f++]);i.length=0;n.n=!1;t&&setTimeout(function(){var u,t,i=n.p;tt(i)&&(ht?k.emit("unhandledRejection",r,i):(u=e.onunhandledrejection)?u({promise:i,reason:r}):(t=e.console)&&t.error&&t.error("Unhandled promise rejection",r));n.a=void 0},1)})}},tt=function tt(n){var t,i=n[s],r=i.a||i.c,u=0;if(i.h)return!1;for(;r.length>u;)if(t=r[u++],t.fail||!tt(t.P))return!1;return!0},f=function(n){var t=this;t.d||(t.d=!0,t=t.r||t,t.v=n,t.s=2,t.a=t.c.slice(),l(t,!0))},it=function it(n){var i,t=this;if(!t.d){t.d=!0;t=t.r||t;try{(i=nt(n))?b(function(){var r={r:t,d:!1};try{i.call(n,o(it,r,1),o(f,r,1))}catch(u){f.call(r,u)}}):(t.v=n,t.s=1,l(t,!1))}catch(r){f.call({r:t,d:!1},r)}}};u||(t=function(n){c(n);var i={p:ft(this,t,r),c:[],a:void 0,s:0,d:!1,v:void 0,h:!1,n:!1};this[s]=i;try{n(o(it,i,1),o(f,i,1))}catch(u){f.call(i,u)}},n(54)(t.prototype,{then:function(n,i){var r={ok:"function"==typeof n?n:!0,fail:"function"==typeof i?i:!1},f=r.P=new(st(this,t))(function(n,t){r.res=n;r.rej=t}),u;return c(r.res),c(r.rej),u=this[s],u.c.push(r),u.a&&u.a.push(r),u.s&&l(u,!1),f},"catch":function(n){return this.then(void 0,n)}}));i(i.G+i.W+i.F*!u,{Promise:t});n(67)(t,r);n(66)(r);a=n(17)[r];i(i.S+i.F*!u,r,{reject:function(n){return new this(function(t,i){i(n)})}});i(i.S+i.F*(!u||d(!0)),r,{resolve:function(n){return ct(n)&&lt(n.constructor,this)?n:new this(function(t){t(n)})}});i(i.S+i.F*!(u&&n(44)(function(n){t.all(n)["catch"](function(){})})),r,{all:function(n){var i=g(this),t=[];return new i(function(r,u){p(n,!1,t.push,t);var f=t.length,e=Array(f);f?h.each.call(t,function(n,t){i.resolve(n).then(function(n){e[t]=n;--f||r(e)},u)}):r(e)})},race:function(n){var t=g(this);return new t(function(i,r){p(n,!1,function(n){t.resolve(n).then(i,r)})})}})},{11:11,17:17,18:18,19:19,21:21,28:28,3:3,30:30,39:39,44:44,47:47,49:49,5:5,53:53,54:54,64:64,65:65,66:66,67:67,69:69,70:70,83:83,84:84}],140:[function(n){var t=n(19),i=Function.apply;t(t.S,"Reflect",{apply:function(n,t,r){return i.call(n,t,r)}})},{19:19}],141:[function(n){var u=n(47),t=n(19),i=n(3),f=n(5),r=n(39),e=Function.bind||n(17).Function.prototype.bind;t(t.S+t.F*n(25)(function(){function n(){}return!(Reflect.construct(function(){},[],n)instanceof n)}),"Reflect",{construct:function(n,t){var s,o;if(i(n),s=arguments.length<3?n:i(arguments[2]),n==s){if(void 0!=t)switch(f(t).length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3])}return o=[null],o.push.apply(o,t),new(e.apply(n,o))}var h=s.prototype,c=u.create(r(h)?h:Object.prototype),l=Function.apply.call(n,c,t);return r(l)?l:c}})},{17:17,19:19,25:25,3:3,39:39,47:47,5:5}],142:[function(n){var i=n(47),t=n(19),r=n(5);t(t.S+t.F*n(25)(function(){Reflect.defineProperty(i.setDesc({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(n,t,u){r(n);try{return i.setDesc(n,t,u),!0}catch(f){return!1}}})},{19:19,25:25,47:47,5:5}],143:[function(n){var t=n(19),i=n(47).getDesc,r=n(5);t(t.S,"Reflect",{deleteProperty:function(n,t){var u=i(r(n),t);return u&&!u.configurable?!1:delete n[t]}})},{19:19,47:47,5:5}],144:[function(n){"use strict";var t=n(19),r=n(5),i=function(n){this._t=r(n);this._i=0;var t,i=this._k=[];for(t in n)i.push(t)};n(42)(i,"Object",function(){var t,n=this,i=n._k;do if(n._i>=i.length)return{value:void 0,done:!0};while(!((t=i[n._i++])in n._t));return{value:t,done:!1}});t(t.S,"Reflect",{enumerate:function(n){return new i(n)}})},{19:19,42:42,5:5}],145:[function(n){var i=n(47),t=n(19),r=n(5);t(t.S,"Reflect",{getOwnPropertyDescriptor:function(n,t){return i.getDesc(r(n),t)}})},{19:19,47:47,5:5}],146:[function(n){var t=n(19),i=n(47).getProto,r=n(5);t(t.S,"Reflect",{getPrototypeOf:function(n){return i(r(n))}})},{19:19,47:47,5:5}],147:[function(n){function t(n,r){var o,h,s=arguments.length<3?n:arguments[2];return e(n)===s?n[r]:(o=i.getDesc(n,r))?u(o,"value")?o.value:void 0!==o.get?o.get.call(s):void 0:f(h=i.getProto(n))?t(h,r,s):void 0}var i=n(47),u=n(31),r=n(19),f=n(39),e=n(5);r(r.S,"Reflect",{get:t})},{19:19,31:31,39:39,47:47,5:5}],148:[function(n){var t=n(19);t(t.S,"Reflect",{has:function(n,t){return t in n}})},{19:19}],149:[function(n){var t=n(19),r=n(5),i=Object.isExtensible;t(t.S,"Reflect",{isExtensible:function(n){return r(n),i?i(n):!0}})},{19:19,5:5}],150:[function(n){var t=n(19);t(t.S,"Reflect",{ownKeys:n(58)})},{19:19,58:58}],151:[function(n){var t=n(19),r=n(5),i=Object.preventExtensions;t(t.S,"Reflect",{preventExtensions:function(n){r(n);try{return i&&i(n),!0}catch(t){return!1}}})},{19:19,5:5}],152:[function(n){var i=n(19),t=n(65);t&&i(i.S,"Reflect",{setPrototypeOf:function(n,i){t.check(n,i);try{return t.set(n,i),!0}catch(r){return!1}}})},{19:19,65:65}],153:[function(n){function i(n,r,s){var l,a,c=arguments.length<4?n:arguments[3],h=t.getDesc(o(n),r);if(!h){if(f(a=t.getProto(n)))return i(a,r,s,c);h=u(0)}return e(h,"value")?h.writable!==!1&&f(c)?(l=t.getDesc(c,r)||u(0),l.value=s,t.setDesc(c,r,l),!0):!1:void 0===h.set?!1:(h.set.call(c,s),!0)}var t=n(47),e=n(31),r=n(19),u=n(61),o=n(5),f=n(39);r(r.S,"Reflect",{set:i})},{19:19,31:31,39:39,47:47,5:5,61:61}],154:[function(n){var u=n(47),e=n(30),h=n(40),c=n(27),t=e.RegExp,i=t,o=t.prototype,r=/a/g,f=/a/g,s=new t(r)!==r;n(21)&&(!s||n(25)(function(){return f[n(84)("match")]=!1,t(r)!=r||t(f)==f||"/a/i"!=t(r,"i")}))&&(t=function(n,r){var u=h(n),f=void 0===r;return this instanceof t||!u||n.constructor!==t||!f?s?new i(u&&!f?n.source:n,r):i((u=n instanceof t)?n.source:n,u&&f?c.call(n):r):n},u.each.call(u.getNames(i),function(n){n in t||u.setDesc(t,n,{configurable:!0,get:function(){return i[n]},set:function(t){i[n]=t}})}),o.constructor=t,t.prototype=o,n(62)(e,"RegExp",t));n(66)("RegExp")},{21:21,25:25,27:27,30:30,40:40,47:47,62:62,66:66,84:84}],155:[function(n){var t=n(47);n(21)&&"g"!=/./g.flags&&t.setDesc(RegExp.prototype,"flags",{configurable:!0,get:n(27)})},{21:21,27:27,47:47}],156:[function(n){n(26)("match",1,function(n,t){return function(i){"use strict";var r=n(this),u=void 0==i?void 0:i[t];return void 0!==u?u.call(i,r):new RegExp(i)[t](String(r))}})},{26:26}],157:[function(n){n(26)("replace",2,function(n,t,i){return function(r,u){"use strict";var f=n(this),e=void 0==r?void 0:r[t];return void 0!==e?e.call(r,f,u):i.call(String(f),r,u)}})},{26:26}],158:[function(n){n(26)("search",1,function(n,t){return function(i){"use strict";var r=n(this),u=void 0==i?void 0:i[t];return void 0!==u?u.call(i,r):new RegExp(i)[t](String(r))}})},{26:26}],159:[function(n){n(26)("split",2,function(n,t,i){return function(r,u){"use strict";var f=n(this),e=void 0==r?void 0:r[t];return void 0!==e?e.call(r,f,u):i.call(String(f),r,u)}})},{26:26}],160:[function(n){"use strict";var t=n(13);n(16)("Set",function(n){return function(){return n(this,arguments.length>0?arguments[0]:void 0)}},{add:function(n){return t.def(this,n=0===n?0:n,n)}},t)},{13:13,16:16}],161:[function(n){"use strict";var t=n(19),i=n(71)(!1);t(t.P,"String",{codePointAt:function(n){return i(this,n)}})},{19:19,71:71}],162:[function(n){"use strict";var t=n(19),r=n(80),f=n(72),i="endsWith",u=""[i];t(t.P+t.F*n(24)(i),"String",{endsWith:function(n){var t=f(this,n,i),s=arguments,h=s.length>1?s[1]:void 0,c=r(t.length),e=void 0===h?c:Math.min(r(h),c),o=String(n);return u?u.call(t,o,e):t.slice(e-o.length,e)===o}})},{19:19,24:24,72:72,80:80}],163:[function(n){var t=n(19),u=n(77),i=String.fromCharCode,r=String.fromCodePoint;t(t.S+t.F*(!!r&&1!=r.length),"String",{fromCodePoint:function(){for(var n,t=[],r=arguments,e=r.length,f=0;e>f;){if(n=+r[f++],u(n,1114111)!==n)throw RangeError(n+" is not a valid code point");t.push(65536>n?i(n):i(((n-=65536)>>10)+55296,n%1024+56320))}return t.join("")}})},{19:19,77:77}],164:[function(n){"use strict";var t=n(19),r=n(72),i="includes";t(t.P+t.F*n(24)(i),"String",{includes:function(n){return!!~r(this,n,i).indexOf(n,arguments.length>1?arguments[1]:void 0)}})},{19:19,24:24,72:72}],165:[function(n){"use strict";var t=n(71)(!0);n(43)(String,"String",function(n){this._t=String(n);this._i=0},function(){var n,i=this._t,r=this._i;return r>=i.length?{value:void 0,done:!0}:(n=t(i,r),this._i+=n.length,{value:n,done:!1})})},{43:43,71:71}],166:[function(n){var t=n(19),i=n(79),r=n(80);t(t.S,"String",{raw:function(n){for(var f=i(n.raw),o=r(f.length),e=arguments,s=e.length,u=[],t=0;o>t;)u.push(String(f[t++])),s>t&&u.push(String(e[t]));return u.join("")}})},{19:19,79:79,80:80}],167:[function(n){var t=n(19);t(t.P,"String",{repeat:n(74)})},{19:19,74:74}],168:[function(n){"use strict";var t=n(19),u=n(80),f=n(72),i="startsWith",r=""[i];t(t.P+t.F*n(24)(i),"String",{startsWith:function(n){var t=f(this,n,i),s=arguments,e=u(Math.min(s.length>1?s[1]:void 0,t.length)),o=String(n);return r?r.call(t,o,e):t.slice(e,e+o.length)===o}})},{19:19,24:24,72:72,80:80}],169:[function(n){"use strict";n(75)("trim",function(n){return function(){return n(this,3)}})},{75:75}],170:[function(n){"use strict";var r=n(47),b=n(30),i=n(31),k=n(21),u=n(19),ut=n(62),ft=n(25),et=n(68),d=n(67),bt=n(83),ot=n(84),kt=n(48),st=n(29),dt=n(23),gt=n(37),ni=n(5),c=n(79),g=n(61),ht=r.getDesc,e=r.setDesc,h=r.create,ct=st.get,f=b.Symbol,l=b.JSON,a=l&&l.stringify,v=!1,t=ot("_hidden"),ti=r.isEnum,y=et("symbol-registry"),o=et("symbols"),p="function"==typeof f,s=Object.prototype,nt=k&&ft(function(){return 7!=h(e({},"a",{get:function(){return e(this,"a",{value:7}).a}})).a})?function(n,t,i){var r=ht(s,t);r&&delete s[t];e(n,t,i);r&&n!==s&&e(s,t,r)}:e,lt=function(n){var r=o[n]=h(f.prototype);return r._k=n,k&&v&&nt(s,n,{configurable:!0,set:function(r){i(this,t)&&i(this[t],n)&&(this[t][n]=!1);nt(this,n,g(1,r))}}),r},w=function(n){return"symbol"==(typeof n=="undefined"?"undefined":_typeof(n))},tt=function(n,r,u){return u&&i(o,r)?(u.enumerable?(i(n,t)&&n[t][r]&&(n[t][r]=!1),u=h(u,{enumerable:g(0,!1)})):(i(n,t)||e(n,t,g(1,{})),n[t][r]=!0),nt(n,r,u)):e(n,r,u)},it=function(n,t){ni(n);for(var i,r=dt(t=c(t)),u=0,f=r.length;f>u;)tt(n,i=r[u++],t[i]);return n},at=function(n,t){return void 0===t?h(n):it(h(n),t)},vt=function(n){var r=ti.call(this,n);return r||!i(this,n)||!i(o,n)||i(this,t)&&this[t][n]?r:!0},yt=function(n,r){var u=ht(n=c(n),r);return!u||!i(o,r)||i(n,t)&&n[t][r]||(u.enumerable=!0),u},pt=function(n){for(var r,u=ct(c(n)),f=[],e=0;u.length>e;)i(o,r=u[e++])||r==t||f.push(r);return f},wt=function(n){for(var t,r=ct(c(n)),u=[],f=0;r.length>f;)i(o,t=r[f++])&&u.push(o[t]);return u},ii=function(n){if(void 0!==n&&!w(n)){for(var t,i,r=[n],u=1,f=arguments;f.length>u;)r.push(f[u++]);return t=r[1],"function"==typeof t&&(i=t),(i||!gt(t))&&(t=function(n,t){return i&&(t=i.call(this,n,t)),w(t)?void 0:t}),r[1]=t,a.apply(l,r)}},ri=ft(function(){var n=f();return"[null]"!=a([n])||"{}"!=a({a:n})||"{}"!=a(Object(n))}),rt;p||(f=function(){if(w(this))throw TypeError("Symbol is not a constructor");return lt(bt(arguments.length>0?arguments[0]:void 0))},ut(f.prototype,"toString",function(){return this._k}),w=function(n){return n instanceof f},r.create=at,r.isEnum=vt,r.getDesc=yt,r.setDesc=tt,r.setDescs=it,r.getNames=st.get=pt,r.getSymbols=wt,k&&!n(49)&&ut(s,"propertyIsEnumerable",vt,!0));rt={"for":function(n){return i(y,n+="")?y[n]:y[n]=f(n)},keyFor:function(n){return kt(y,n)},useSetter:function(){v=!0},useSimple:function(){v=!1}};r.each.call("hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),function(n){var t=ot(n);rt[n]=p?t:lt(t)});v=!0;u(u.G+u.W,{Symbol:f});u(u.S,"Symbol",rt);u(u.S+u.F*!p,"Object",{create:at,defineProperty:tt,defineProperties:it,getOwnPropertyDescriptor:yt,getOwnPropertyNames:pt,getOwnPropertySymbols:wt});l&&u(u.S+u.F*(!p||ri),"JSON",{stringify:ii});d(f,"Symbol");d(Math,"Math",!0);d(b.JSON,"JSON",!0)},{19:19,21:21,23:23,25:25,29:29,30:30,31:31,37:37,47:47,48:48,49:49,5:5,61:61,62:62,67:67,68:68,79:79,83:83,84:84}],171:[function(n){"use strict";var s=n(47),h=n(62),t=n(15),i=n(39),c=n(31),r=t.frozenStore,u=t.WEAK,f=Object.isExtensible||i,e={},o=n(16)("WeakMap",function(n){return function(){return n(this,arguments.length>0?arguments[0]:void 0)}},{get:function(n){if(i(n)){if(!f(n))return r(this).get(n);if(c(n,u))return n[u][this._i]}},set:function(n,i){return t.def(this,n,i)}},t,!0,!0);7!=(new o).set((Object.freeze||Object)(e),7).get(e)&&s.each.call(["delete","has","get","set"],function(n){var t=o.prototype,u=t[n];h(t,n,function(t,e){if(i(t)&&!f(t)){var o=r(this)[n](t,e);return"set"==n?this:o}return u.call(this,t,e)})})},{15:15,16:16,31:31,39:39,47:47,62:62}],172:[function(n){"use strict";var t=n(15);n(16)("WeakSet",function(n){return function(){return n(this,arguments.length>0?arguments[0]:void 0)}},{add:function(n){return t.def(this,n,!0)}},t,!1,!0)},{15:15,16:16}],173:[function(n){"use strict";var t=n(19),i=n(8)(!0);t(t.P,"Array",{includes:function(n){return i(this,n,arguments.length>1?arguments[1]:void 0)}});n(4)("includes")},{19:19,4:4,8:8}],174:[function(n){var t=n(19);t(t.P,"Map",{toJSON:n(14)("Map")})},{14:14,19:19}],175:[function(n){var t=n(19),i=n(57)(!0);t(t.S,"Object",{entries:function(n){return i(n)}})},{19:19,57:57}],176:[function(n){var t=n(47),i=n(19),r=n(58),u=n(79),f=n(61);i(i.S,"Object",{getOwnPropertyDescriptors:function(n){for(var i,o,s=u(n),l=t.setDesc,a=t.getDesc,h=r(s),e={},c=0;h.length>c;)o=a(s,i=h[c++]),i in e?l(e,i,f(0,o)):e[i]=o;return e}})},{19:19,47:47,58:58,61:61,79:79}],177:[function(n){var t=n(19),i=n(57)(!1);t(t.S,"Object",{values:function(n){return i(n)}})},{19:19,57:57}],178:[function(n){var t=n(19),i=n(63)(/[\\^$*+?.()|[\]{}]/g,"\\$&");t(t.S,"RegExp",{escape:function(n){return i(n)}})},{19:19,63:63}],179:[function(n){var t=n(19);t(t.P,"Set",{toJSON:n(14)("Set")})},{14:14,19:19}],180:[function(n){"use strict";var t=n(19),i=n(71)(!0);t(t.P,"String",{at:function(n){return i(this,n)}})},{19:19,71:71}],181:[function(n){"use strict";var t=n(19),i=n(73);t(t.P,"String",{padLeft:function(n){return i(this,n,arguments.length>1?arguments[1]:void 0,!0)}})},{19:19,73:73}],182:[function(n){"use strict";var t=n(19),i=n(73);t(t.P,"String",{padRight:function(n){return i(this,n,arguments.length>1?arguments[1]:void 0,!1)}})},{19:19,73:73}],183:[function(n){"use strict";n(75)("trimLeft",function(n){return function(){return n(this,1)}})},{75:75}],184:[function(n){"use strict";n(75)("trimRight",function(n){return function(){return n(this,2)}})},{75:75}],185:[function(n){var f=n(47),r=n(19),e=n(18),u=n(17).Array||Array,t={},i=function(n,i){f.each.call(n.split(","),function(n){void 0==i&&n in u?t[n]=u[n]:n in[]&&(t[n]=e(Function.call,[][n],i))})};i("pop,reverse,shift,keys,values,entries",1);i("indexOf,every,some,forEach,map,filter,find,findIndex,includes",3);i("join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill");r(r.S,"Array",t)},{17:17,18:18,19:19,47:47}],186:[function(n){n(92);var f=n(30),e=n(32),i=n(46),t=n(84)("iterator"),r=f.NodeList,u=f.HTMLCollection,o=r&&r.prototype,s=u&&u.prototype,h=i.NodeList=i.HTMLCollection=i.Array;!r||t in o||e(o,t,h);!u||t in s||e(s,t,h)},{30:30,32:32,46:46,84:84,92:92}],187:[function(n){var t=n(19),i=n(76);t(t.G+t.B,{setImmediate:i.set,clearImmediate:i.clear})},{19:19,76:76}],188:[function(n){var i=n(30),t=n(19),e=n(34),o=n(59),r=i.navigator,u=!!r&&/MSIE .\./.test(r.userAgent),f=function(n){return u?function(t,i){return n(e(o,[].slice.call(arguments,2),"function"==typeof t?t:Function(t)),i)}:n};t(t.G+t.B+t.F*u,{setTimeout:f(i.setTimeout),setInterval:f(i.setInterval)})},{19:19,30:30,34:34,59:59}],189:[function(n,t){n(86);n(170);n(125);n(133);n(137);n(138);n(126);n(136);n(135);n(131);n(132);n(130);n(127);n(129);n(134);n(128);n(96);n(95);n(115);n(116);n(117);n(118);n(119);n(120);n(121);n(122);n(123);n(124);n(98);n(99);n(100);n(101);n(102);n(103);n(104);n(105);n(106);n(107);n(108);n(109);n(110);n(111);n(112);n(113);n(114);n(163);n(166);n(169);n(165);n(161);n(162);n(164);n(167);n(168);n(91);n(93);n(92);n(94);n(87);n(88);n(90);n(89);n(154);n(155);n(156);n(157);n(158);n(159);n(139);n(97);n(160);n(171);n(172);n(140);n(141);n(142);n(143);n(144);n(147);n(145);n(146);n(148);n(149);n(150);n(151);n(153);n(152);n(173);n(180);n(181);n(182);n(183);n(184);n(178);n(176);n(177);n(175);n(174);n(179);n(185);n(188);n(187);n(186);t.exports=n(17)},{100:100,101:101,102:102,103:103,104:104,105:105,106:106,107:107,108:108,109:109,110:110,111:111,112:112,113:113,114:114,115:115,116:116,117:117,118:118,119:119,120:120,121:121,122:122,123:123,124:124,125:125,126:126,127:127,128:128,129:129,130:130,131:131,132:132,133:133,134:134,135:135,136:136,137:137,138:138,139:139,140:140,141:141,142:142,143:143,144:144,145:145,146:146,147:147,148:148,149:149,150:150,151:151,152:152,153:153,154:154,155:155,156:156,157:157,158:158,159:159,160:160,161:161,162:162,163:163,164:164,165:165,166:166,167:167,168:168,169:169,17:17,170:170,171:171,172:172,173:173,174:174,175:175,176:176,177:177,178:178,179:179,180:180,181:181,182:182,183:183,184:184,185:185,186:186,187:187,188:188,86:86,87:87,88:88,89:89,90:90,91:91,92:92,93:93,94:94,95:95,96:96,97:97,98:98,99:99}],190:[function(n,t){(function(n){!function(n){"use strict";function y(n,t,i,r){var u=Object.create((t||p).prototype),f=new a(r||[]);return u._invoke=ut(n,i,f),u}function c(n,t,i){try{return{type:"normal",arg:n.call(t,i)}}catch(r){return{type:"throw",arg:r}}}function p(){}function o(){}function u(){}function w(n){["next","throw","return"].forEach(function(t){n[t]=function(n){return this._invoke(t,n)}})}function b(n){this.arg=n}function k(n){function t(t,i){var r=n[t](i),e=r.value;return e instanceof b?Promise.resolve(e.arg).then(u,f):Promise.resolve(e).then(function(n){return r.value=n,r})}function r(n,r){function u(){return t(n,r)}return i=i?i.then(u,u):new Promise(function(n){n(u())})}"object"==(typeof process=="undefined"?"undefined":_typeof(process))&&process.domain&&(t=process.domain.bind(t));var i,u=t.bind(n,"next"),f=t.bind(n,"throw");t.bind(n,"return");this._invoke=r}function ut(n,t,i){var u=it;return function(f,e){var l,y,o,a;if(u===rt)throw new Error("Generator is already running");if(u===s){if("throw"===f)throw e;return g()}for(;;){if(l=i.delegate,l){if("return"===f||"throw"===f&&l.iterator[f]===r){if(i.delegate=null,y=l.iterator["return"],y&&(o=c(y,l.iterator,e),"throw"===o.type)){f="throw";e=o.arg;continue}if("return"===f)continue}if(o=c(l.iterator[f],l.iterator,e),"throw"===o.type){i.delegate=null;f="throw";e=o.arg;continue}if(f="next",e=r,a=o.arg,!a.done)return u=v,a;i[l.resultName]=a.value;i.next=l.nextLoc;i.delegate=null}if("next"===f)i._sent=e,i.sent=u===v?e:r;else if("throw"===f){if(u===it)throw u=s,e;i.dispatchException(e)&&(f="next",e=r)}else"return"===f&&i.abrupt("return",e);if(u=rt,o=c(n,t,i),"normal"===o.type){if(u=i.done?s:v,a={value:o.arg,done:i.done},o.arg!==h)return a;i.delegate&&"next"===f&&(e=r)}else"throw"===o.type&&(u=s,f="throw",e=o.arg)}}}function ft(n){var t={tryLoc:n[0]};1 in n&&(t.catchLoc=n[1]);2 in n&&(t.finallyLoc=n[2],t.afterLoc=n[3]);this.tryEntries.push(t)}function l(n){var t=n.completion||{};t.type="normal";delete t.arg;n.completion=t}function a(n){this.tryEntries=[{tryLoc:"root"}];n.forEach(ft,this);this.reset(!0)}function d(n){var u,i,e;if(n){if(u=n[nt],u)return u.call(n);if("function"==typeof n.next)return n;if(!isNaN(n.length))return i=-1,e=function t(){for(;++i<n.length;)if(f.call(n,i))return t.value=n[i],t.done=!1,t;return t.value=r,t.done=!0,t},e.next=e}return{next:g}}function g(){return{value:r,done:!0}}var r,f=Object.prototype.hasOwnProperty,nt="function"==typeof Symbol&&Symbol.iterator||"@@iterator",tt="object"==(typeof t=="undefined"?"undefined":_typeof(t)),i=n.regeneratorRuntime;if(i)return void(tt&&(t.exports=i));i=n.regeneratorRuntime=tt?t.exports:{};i.wrap=y;var it="suspendedStart",v="suspendedYield",rt="executing",s="completed",h={},e=u.prototype=p.prototype;o.prototype=e.constructor=u;u.constructor=o;o.displayName="GeneratorFunction";i.isGeneratorFunction=function(n){var t="function"==typeof n&&n.constructor;return t?t===o||"GeneratorFunction"===(t.displayName||t.name):!1};i.mark=function(n){return Object.setPrototypeOf?Object.setPrototypeOf(n,u):n.__proto__=u,n.prototype=Object.create(e),n};i.awrap=function(n){return new b(n)};w(k.prototype);i.async=function(n,t,r,u){var f=new k(y(n,t,r,u));return i.isGeneratorFunction(t)?f:f.next().then(function(n){return n.done?n.value:f.next()})};w(e);e[nt]=function(){return this};e.toString=function(){return"[object Generator]"};i.keys=function(n){var i=[];for(var r in n)i.push(r);return i.reverse(),function t(){for(;i.length;){var r=i.pop();if(r in n)return t.value=r,t.done=!1,t}return t.done=!0,t}};i.values=d;a.prototype={constructor:a,reset:function(n){if(this.prev=0,this.next=0,this.sent=r,this.done=!1,this.delegate=null,this.tryEntries.forEach(l),!n)for(var t in this)"t"===t.charAt(0)&&f.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0],n=t.completion;if("throw"===n.type)throw n.arg;return this.rval},dispatchException:function(n){function i(t,i){return u.type="throw",u.arg=n,s.next=t,!!i}var s,r,t,u,e,o;if(this.done)throw n;for(s=this,r=this.tryEntries.length-1;r>=0;--r){if(t=this.tryEntries[r],u=t.completion,"root"===t.tryLoc)return i("end");if(t.tryLoc<=this.prev)if(e=f.call(t,"catchLoc"),o=f.call(t,"finallyLoc"),e&&o){if(this.prev<t.catchLoc)return i(t.catchLoc,!0);if(this.prev<t.finallyLoc)return i(t.finallyLoc)}else if(e){if(this.prev<t.catchLoc)return i(t.catchLoc,!0)}else{if(!o)throw new Error("try statement without catch or finally");if(this.prev<t.finallyLoc)return i(t.finallyLoc)}}},abrupt:function(n,t){for(var r,i,e,u=this.tryEntries.length-1;u>=0;--u)if(r=this.tryEntries[u],r.tryLoc<=this.prev&&f.call(r,"finallyLoc")&&this.prev<r.finallyLoc){i=r;break}return i&&("break"===n||"continue"===n)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null),e=i?i.completion:{},e.type=n,e.arg=t,i?this.next=i.finallyLoc:this.complete(e),h},complete:function(n,t){if("throw"===n.type)throw n.arg;"break"===n.type||"continue"===n.type?this.next=n.arg:"return"===n.type?(this.rval=n.arg,this.next="end"):"normal"===n.type&&t&&(this.next=t)},finish:function(n){for(var t,i=this.tryEntries.length-1;i>=0;--i)if(t=this.tryEntries[i],t.finallyLoc===n)return this.complete(t.completion,t.afterLoc),l(t),h},"catch":function(n){for(var i,r,u,t=this.tryEntries.length-1;t>=0;--t)if(i=this.tryEntries[t],i.tryLoc===n)return r=i.completion,"throw"===r.type&&(u=r.arg,l(i)),u;throw new Error("illegal catch attempt");},delegateYield:function(n,t,i){return this.delegate={iterator:d(n),resultName:t,nextLoc:i},h}}}("object"==(typeof n=="undefined"?"undefined":_typeof(n))?n:"object"==(typeof window=="undefined"?"undefined":_typeof(window))?window:"object"==(typeof self=="undefined"?"undefined":_typeof(self))?self:this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1]);MarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_PATH_="../images/m";MarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_EXTENSION_="png";MarkerClusterer.prototype.extend=function(n,t){return function(n){for(var t in n.prototype)this.prototype[t]=n.prototype[t];return this}.apply(n,[t])};MarkerClusterer.prototype.onAdd=function(){this.setReady_(!0)};MarkerClusterer.prototype.draw=function(){};MarkerClusterer.prototype.setupStyles_=function(){if(!this.styles_.length)for(var n=0,t;t=this.sizes[n];n++)this.styles_.push({url:this.imagePath_+(n+1)+"."+this.imageExtension_,height:t,width:t})};MarkerClusterer.prototype.fitMapToMarkers=function(){for(var r=this.getMarkers(),n=new google.maps.LatLngBounds,t=0,i;i=r[t];t++)n.extend(i.getPosition());this.map_.fitBounds(n)};MarkerClusterer.prototype.setStyles=function(n){this.styles_=n};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(n){this.maxZoom_=n};MarkerClusterer.prototype.getMaxZoom=function(){return this.maxZoom_};MarkerClusterer.prototype.calculator_=function(n,t){for(var i=0,u=n.length,r=u;r!==0;)r=parseInt(r/10,10),i++;return i=Math.min(i,t),{text:u,index:i}};MarkerClusterer.prototype.setCalculator=function(n){this.calculator_=n};MarkerClusterer.prototype.getCalculator=function(){return this.calculator_};MarkerClusterer.prototype.addMarkers=function(n,t){var r,i;if(n.length)for(r=0;i=n[r];r++)this.pushMarkerTo_(i);else if(Object.keys(n).length)for(i in n)this.pushMarkerTo_(n[i]);t||this.redraw()};MarkerClusterer.prototype.pushMarkerTo_=function(n){if(n.isAdded=!1,n.draggable){var t=this;google.maps.event.addListener(n,"dragend",function(){n.isAdded=!1;t.repaint()})}this.markers_.push(n)};MarkerClusterer.prototype.addMarker=function(n,t){this.pushMarkerTo_(n);t||this.redraw()};MarkerClusterer.prototype.removeMarker_=function(n){var t=-1,i,r;if(this.markers_.indexOf)t=this.markers_.indexOf(n);else for(i=0;r=this.markers_[i];i++)if(r==n){t=i;break}return t==-1?!1:(n.setMap(null),this.markers_.splice(t,1),!0)};MarkerClusterer.prototype.removeMarker=function(n,t){var i=this.removeMarker_(n);return!t&&i?(this.resetViewport(),this.redraw(),!0):!1};MarkerClusterer.prototype.removeMarkers=function(n,t){for(var f,e=n===this.getMarkers()?n.slice():n,i=!1,r=0,u;u=e[r];r++)f=this.removeMarker_(u),i=i||f;if(!t&&i)return this.resetViewport(),this.redraw(),!0};MarkerClusterer.prototype.setReady_=function(n){this.ready_||(this.ready_=n,this.createClusters_())};MarkerClusterer.prototype.getTotalClusters=function(){return this.clusters_.length};MarkerClusterer.prototype.getMap=function(){return this.map_};MarkerClusterer.prototype.setMap=function(n){this.map_=n};MarkerClusterer.prototype.getGridSize=function(){return this.gridSize_};MarkerClusterer.prototype.setGridSize=function(n){this.gridSize_=n};MarkerClusterer.prototype.getMinClusterSize=function(){return this.minClusterSize_};MarkerClusterer.prototype.setMinClusterSize=function(n){this.minClusterSize_=n};MarkerClusterer.prototype.getExtendedBounds=function(n){var t=this.getProjection(),e=new google.maps.LatLng(n.getNorthEast().lat(),n.getNorthEast().lng()),o=new google.maps.LatLng(n.getSouthWest().lat(),n.getSouthWest().lng()),r=t.fromLatLngToDivPixel(e),i,u,f;return r.x+=this.gridSize_,r.y-=this.gridSize_,i=t.fromLatLngToDivPixel(o),i.x-=this.gridSize_,i.y+=this.gridSize_,u=t.fromDivPixelToLatLng(r),f=t.fromDivPixelToLatLng(i),n.extend(u),n.extend(f),n};MarkerClusterer.prototype.isMarkerInBounds_=function(n,t){return t.contains(n.getPosition())};MarkerClusterer.prototype.clearMarkers=function(){this.resetViewport(!0);this.markers_=[]};MarkerClusterer.prototype.resetViewport=function(n){for(var r,i,t=0;r=this.clusters_[t];t++)r.remove();for(t=0;i=this.markers_[t];t++)i.isAdded=!1,n&&i.setMap(null);this.clusters_=[]};MarkerClusterer.prototype.repaint=function(){var n=this.clusters_.slice();this.clusters_.length=0;this.resetViewport();this.redraw();window.setTimeout(function(){for(var t=0,i;i=n[t];t++)i.remove()},0)};MarkerClusterer.prototype.redraw=function(){this.createClusters_()};MarkerClusterer.prototype.distanceBetweenPoints_=function(n,t){if(!n||!t)return 0;var i=(t.lat()-n.lat())*Math.PI/180,r=(t.lng()-n.lng())*Math.PI/180,u=Math.sin(i/2)*Math.sin(i/2)+Math.cos(n.lat()*Math.PI/180)*Math.cos(t.lat()*Math.PI/180)*Math.sin(r/2)*Math.sin(r/2),f=2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u));return 6371*f};MarkerClusterer.prototype.addToClosestCluster_=function(n){for(var r,u,t,f=4e4,i=null,o=n.getPosition(),e=0;t=this.clusters_[e];e++)r=t.getCenter(),r&&(u=this.distanceBetweenPoints_(r,n.getPosition()),u<f&&(f=u,i=t));i&&i.isMarkerInClusterBounds(n)?i.addMarker(n):(t=new Cluster(this),t.addMarker(n),this.clusters_.push(t))};MarkerClusterer.prototype.createClusters_=function(){var i,r,t,n;if(this.ready_)for(i=new google.maps.LatLngBounds(this.map_.getBounds().getSouthWest(),this.map_.getBounds().getNorthEast()),r=this.getExtendedBounds(i),t=0;n=this.markers_[t];t++)!n.isAdded&&this.isMarkerInBounds_(n,r)&&this.addToClosestCluster_(n)};Cluster.prototype.isMarkerAlreadyAdded=function(n){if(this.markers_.indexOf)return this.markers_.indexOf(n)!=-1;for(var t=0,i;i=this.markers_[t];t++)if(i==n)return!0;return!1};Cluster.prototype.addMarker=function(n){var t,r;if(this.isMarkerAlreadyAdded(n))return!1;if(this.center_){if(this.averageCenter_){var i=this.markers_.length+1,u=(this.center_.lat()*(i-1)+n.getPosition().lat())/i,f=(this.center_.lng()*(i-1)+n.getPosition().lng())/i;this.center_=new google.maps.LatLng(u,f);this.calculateBounds_()}}else this.center_=n.getPosition(),this.calculateBounds_();if(n.isAdded=!0,this.markers_.push(n),t=this.markers_.length,t<this.minClusterSize_&&n.getMap()!=this.map_&&n.setMap(this.map_),t==this.minClusterSize_)for(r=0;r<t;r++)this.markers_[r].setMap(null);return t>=this.minClusterSize_&&n.setMap(null),this.updateIcon(),!0};Cluster.prototype.getMarkerClusterer=function(){return this.markerClusterer_};Cluster.prototype.getBounds=function(){for(var n=new google.maps.LatLngBounds(this.center_,this.center_),r=this.getMarkers(),t=0,i;i=r[t];t++)n.extend(i.getPosition());return n};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 n=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(n)};Cluster.prototype.isMarkerInClusterBounds=function(n){return this.bounds_.contains(n.getPosition())};Cluster.prototype.getMap=function(){return this.map_};Cluster.prototype.updateIcon=function(){var f=this.map_.getZoom(),t=this.markerClusterer_.getMaxZoom(),n,i,r,u;if(t&&f>t){for(n=0;i=this.markers_[n];n++)i.setMap(this.map_);return}if(this.markers_.length<this.minClusterSize_){this.clusterIcon_.hide();return}r=this.markerClusterer_.getStyles().length;u=this.markerClusterer_.getCalculator()(this.markers_,r);this.clusterIcon_.setCenter(this.center_);this.clusterIcon_.setSums(u);this.clusterIcon_.show()};ClusterIcon.prototype.triggerClusterClick=function(){var n=this.cluster_.getMarkerClusterer();google.maps.event.trigger(n,"clusterclick",this.cluster_);n.isZoomOnClick()&&this.map_.fitBounds(this.cluster_.getBounds())};ClusterIcon.prototype.onAdd=function(){var n,t,i;this.div_=document.createElement("DIV");this.visible_&&(n=this.getPosFromLatLng_(this.center_),this.div_.style.cssText=this.createCss(n),this.div_.innerHTML=this.sums_.text);t=this.getPanes();t.overlayMouseTarget.appendChild(this.div_);i=this;google.maps.event.addDomListener(this.div_,"click",function(){i.triggerClusterClick()})};ClusterIcon.prototype.getPosFromLatLng_=function(n){var t=this.getProjection().fromLatLngToDivPixel(n);return t.x-=parseInt(this.width_/2,10),t.y-=parseInt(this.height_/2,10),t};ClusterIcon.prototype.draw=function(){if(this.visible_){var n=this.getPosFromLatLng_(this.center_);this.div_.style.top=n.y+"px";this.div_.style.left=n.x+"px"}};ClusterIcon.prototype.hide=function(){this.div_&&(this.div_.style.display="none");this.visible_=!1};ClusterIcon.prototype.show=function(){if(this.div_){var n=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(n);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(n){this.sums_=n;this.text_=n.text;this.index_=n.index;this.div_&&(this.div_.innerHTML=n.text);this.useStyle()};ClusterIcon.prototype.useStyle=function(){var t=Math.max(0,this.sums_.index-1),n;t=Math.min(this.styles_.length-1,t);n=this.styles_[t];this.url_=n.url;this.height_=n.height;this.width_=n.width;this.textColor_=n.textColor;this.anchor_=n.anchor;this.textSize_=n.textSize;this.backgroundPosition_=n.backgroundPosition};ClusterIcon.prototype.setCenter=function(n){this.center_=n};ClusterIcon.prototype.createCss=function(n){var t=[],i,r,u;return t.push("background-image:url("+this.url_+");"),i=this.backgroundPosition_?this.backgroundPosition_:"0 0",t.push("background-position:"+i+";"),_typeof(this.anchor_)==="object"?(typeof this.anchor_[0]=="number"&&this.anchor_[0]>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;"),typeof this.anchor_[1]=="number"&&this.anchor_[1]>0&&this.anchor_[1]<this.width_?t.push("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;"),r=this.textColor_?this.textColor_:"white",u=this.textSize_?this.textSize_:11,t.push("cursor:pointer; top:"+n.y+"px; left:"+n.x+"px; color:"+r+"; position:absolute; font-size:"+u+"px; font-family:Arial,sans-serif; font-weight:bold"),t.join("")};window.MarkerClusterer=MarkerClusterer;MarkerClusterer.prototype.addMarker=MarkerClusterer.prototype.addMarker;MarkerClusterer.prototype.addMarkers=MarkerClusterer.prototype.addMarkers;MarkerClusterer.prototype.clearMarkers=MarkerClusterer.prototype.clearMarkers;MarkerClusterer.prototype.fitMapToMarkers=MarkerClusterer.prototype.fitMapToMarkers;MarkerClusterer.prototype.getCalculator=MarkerClusterer.prototype.getCalculator;MarkerClusterer.prototype.getGridSize=MarkerClusterer.prototype.getGridSize;MarkerClusterer.prototype.getExtendedBounds=MarkerClusterer.prototype.getExtendedBounds;MarkerClusterer.prototype.getMap=MarkerClusterer.prototype.getMap;MarkerClusterer.prototype.getMarkers=MarkerClusterer.prototype.getMarkers;MarkerClusterer.prototype.getMaxZoom=MarkerClusterer.prototype.getMaxZoom;MarkerClusterer.prototype.getStyles=MarkerClusterer.prototype.getStyles;MarkerClusterer.prototype.getTotalClusters=MarkerClusterer.prototype.getTotalClusters;MarkerClusterer.prototype.getTotalMarkers=MarkerClusterer.prototype.getTotalMarkers;MarkerClusterer.prototype.redraw=MarkerClusterer.prototype.redraw;MarkerClusterer.prototype.removeMarker=MarkerClusterer.prototype.removeMarker;MarkerClusterer.prototype.removeMarkers=MarkerClusterer.prototype.removeMarkers;MarkerClusterer.prototype.resetViewport=MarkerClusterer.prototype.resetViewport;MarkerClusterer.prototype.repaint=MarkerClusterer.prototype.repaint;MarkerClusterer.prototype.setCalculator=MarkerClusterer.prototype.setCalculator;MarkerClusterer.prototype.setGridSize=MarkerClusterer.prototype.setGridSize;MarkerClusterer.prototype.setMaxZoom=MarkerClusterer.prototype.setMaxZoom;MarkerClusterer.prototype.onAdd=MarkerClusterer.prototype.onAdd;MarkerClusterer.prototype.draw=MarkerClusterer.prototype.draw;Cluster.prototype.getCenter=Cluster.prototype.getCenter;Cluster.prototype.getSize=Cluster.prototype.getSize;Cluster.prototype.getMarkers=Cluster.prototype.getMarkers;ClusterIcon.prototype.onAdd=ClusterIcon.prototype.onAdd;ClusterIcon.prototype.draw=ClusterIcon.prototype.draw;ClusterIcon.prototype.onRemove=ClusterIcon.prototype.onRemove;Object.keys=Object.keys||function(n){var t=[];for(var i in n)n.hasOwnProperty(i)&&t.push(i);return t};!function(n,t){"object"==(typeof exports=="undefined"?"undefined":_typeof(exports))&&"object"==(typeof module=="undefined"?"undefined":_typeof(module))?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==(typeof exports=="undefined"?"undefined":_typeof(exports))?exports.axios=t():n.axios=t()}(this,function(){return function(n){function t(r){if(i[r])return i[r].exports;var u=i[r]={exports:{},id:r,loaded:!1};return n[r].call(u.exports,u,u.exports,t),u.loaded=!0,u.exports}var i={};return t.m=n,t.c=i,t.p="",t(0)}([function(n,t,i){n.exports=i(1)},function(n,t,i){"use strict";function f(n){var t=new u(n),i=o(u.prototype.request,t);return e.extend(i,u.prototype,t),e.extend(i,t),i}var e=i(2),o=i(3),u=i(4),r=f();r.Axios=u;r.create=function(n){return f(n)};r.Cancel=i(22);r.CancelToken=i(23);r.isCancel=i(19);r.all=function(n){return Promise.all(n)};r.spread=i(24);n.exports=r;n.exports["default"]=r},function(n,t,i){"use strict";function u(n){return"[object Array]"===r.call(n)}function h(n){return"[object ArrayBuffer]"===r.call(n)}function c(n){return"undefined"!=typeof FormData&&n instanceof FormData}function l(n){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(n):n&&n.buffer&&n.buffer instanceof ArrayBuffer}function a(n){return"string"==typeof n}function v(n){return"number"==typeof n}function y(n){return"undefined"==typeof n}function e(n){return null!==n&&"object"==(typeof n=="undefined"?"undefined":_typeof(n))}function p(n){return"[object Date]"===r.call(n)}function w(n){return"[object File]"===r.call(n)}function b(n){return"[object Blob]"===r.call(n)}function o(n){return"[object Function]"===r.call(n)}function k(n){return e(n)&&o(n.pipe)}function d(n){return"undefined"!=typeof URLSearchParams&&n instanceof URLSearchParams}function g(n){return n.replace(/^\s*/,"").replace(/\s*$/,"")}function nt(){return"undefined"!=typeof window&&"undefined"!=typeof document&&"function"==typeof document.createElement}function f(n,t){var i,f,r;if(null!==n&&"undefined"!=typeof n)if("object"==(typeof n=="undefined"?"undefined":_typeof(n))||u(n)||(n=[n]),u(n))for(i=0,f=n.length;i<f;i++)t.call(null,n[i],i,n);else for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&t.call(null,n[r],r,n)}function s(){function i(t,i){n[i]="object"==_typeof(n[i])&&"object"==(typeof t=="undefined"?"undefined":_typeof(t))?s(n[i],t):t}for(var n={},t=0,r=arguments.length;t<r;t++)f(arguments[t],i);return n}function tt(n,t,i){return f(t,function(t,r){n[r]=i&&"function"==typeof t?it(t,i):t}),n}var it=i(3),r=Object.prototype.toString;n.exports={isArray:u,isArrayBuffer:h,isFormData:c,isArrayBufferView:l,isString:a,isNumber:v,isObject:e,isUndefined:y,isDate:p,isFile:w,isBlob:b,isFunction:o,isStream:k,isURLSearchParams:d,isStandardBrowserEnv:nt,forEach:f,merge:s,extend:tt,trim:g}},function(n){"use strict";n.exports=function(n,t){return function(){for(var r=new Array(arguments.length),i=0;i<r.length;i++)r[i]=arguments[i];return n.apply(t,r)}}},function(n,t,i){"use strict";function u(n){this.defaults=r.merge(f,n);this.interceptors={request:new e,response:new e}}var f=i(5),r=i(2),e=i(16),o=i(17),s=i(20),h=i(21);u.prototype.request=function(n){"string"==typeof n&&(n=r.merge({url:arguments[0]},arguments[1]));n=r.merge(f,this.defaults,{method:"get"},n);n.baseURL&&!s(n.url)&&(n.url=h(n.baseURL,n.url));var t=[o,void 0],i=Promise.resolve(n);for(this.interceptors.request.forEach(function(n){t.unshift(n.fulfilled,n.rejected)}),this.interceptors.response.forEach(function(n){t.push(n.fulfilled,n.rejected)});t.length;)i=i.then(t.shift(),t.shift());return i};r.forEach(["delete","get","head"],function(n){u.prototype[n]=function(t,i){return this.request(r.merge(i||{},{method:n,url:t}))}});r.forEach(["post","put","patch"],function(n){u.prototype[n]=function(t,i,u){return this.request(r.merge(u||{},{method:n,url:t,data:i}))}});n.exports=u},function(n,t,i){"use strict";function f(n,t){!r.isUndefined(n)&&r.isUndefined(n["Content-Type"])&&(n["Content-Type"]=t)}function e(){var n;return"undefined"!=typeof XMLHttpRequest?n=i(7):"undefined"!=typeof process&&(n=i(7)),n}var r=i(2),o=i(6),s=/^\)\]\}',?\n/,u={"Content-Type":"application/x-www-form-urlencoded"};n.exports={adapter:e(),transformRequest:[function(n,t){return o(t,"Content-Type"),r.isFormData(n)||r.isArrayBuffer(n)||r.isStream(n)||r.isFile(n)||r.isBlob(n)?n:r.isArrayBufferView(n)?n.buffer:r.isURLSearchParams(n)?(f(t,"application/x-www-form-urlencoded;charset=utf-8"),n.toString()):r.isObject(n)?(f(t,"application/json;charset=utf-8"),JSON.stringify(n)):n}],transformResponse:[function(n){if("string"==typeof n){n=n.replace(s,"");try{n=JSON.parse(n)}catch(t){}}return n}],headers:{common:{Accept:"application/json, text/plain, */*"},patch:r.merge(u),post:r.merge(u),put:r.merge(u)},timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(n){return n>=200&&n<300}}},function(n,t,i){"use strict";var r=i(2);n.exports=function(n,t){r.forEach(n,function(i,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(n[t]=i,delete n[r])})}},function(n,t,i){"use strict";var r=i(2),e=i(8),o=i(11),s=i(12),u=i(13),f=i(9),h="undefined"!=typeof window&&window.btoa||i(14);n.exports=function(n){return new Promise(function(t,c){var a=n.data,v=n.headers,b,k,d,y;r.isFormData(a)&&delete v["Content-Type"];var l=new XMLHttpRequest,p="onreadystatechange",w=!1;if(("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in l||u(n.url)||(l=new window.XDomainRequest,p="onload",w=!0,l.onprogress=function(){},l.ontimeout=function(){}),n.auth)&&(b=n.auth.username||"",k=n.auth.password||"",v.Authorization="Basic "+h(b+":"+k)),(l.open(n.method.toUpperCase(),o(n.url,n.params,n.paramsSerializer),!0),l.timeout=n.timeout,l[p]=function(){if(l&&(4===l.readyState||w)&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))){var i="getAllResponseHeaders"in l?s(l.getAllResponseHeaders()):null,r=n.responseType&&"text"!==n.responseType?l.response:l.responseText,u={data:r,status:1223===l.status?204:l.status,statusText:1223===l.status?"No Content":l.statusText,headers:i,config:n,request:l};e(t,c,u);l=null}},l.onerror=function(){c(f("Network Error",n));l=null},l.ontimeout=function(){c(f("timeout of "+n.timeout+"ms exceeded",n,"ECONNABORTED"));l=null},r.isStandardBrowserEnv())&&(d=i(15),y=(n.withCredentials||u(n.url))&&n.xsrfCookieName?d.read(n.xsrfCookieName):void 0,y&&(v[n.xsrfHeaderName]=y)),"setRequestHeader"in l&&r.forEach(v,function(n,t){"undefined"==typeof a&&"content-type"===t.toLowerCase()?delete v[t]:l.setRequestHeader(t,n)}),n.withCredentials&&(l.withCredentials=!0),n.responseType)try{l.responseType=n.responseType}catch(g){if("json"!==l.responseType)throw g;}"function"==typeof n.onDownloadProgress&&l.addEventListener("progress",n.onDownloadProgress);"function"==typeof n.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",n.onUploadProgress);n.cancelToken&&n.cancelToken.promise.then(function(n){l&&(l.abort(),c(n),l=null)});void 0===a&&(a=null);l.send(a)})}},function(n,t,i){"use strict";var r=i(9);n.exports=function(n,t,i){var u=i.config.validateStatus;i.status&&u&&!u(i.status)?t(r("Request failed with status code "+i.status,i.config,null,i)):n(i)}},function(n,t,i){"use strict";var r=i(10);n.exports=function(n,t,i,u){var f=new Error(n);return r(f,t,i,u)}},function(n){"use strict";n.exports=function(n,t,i,r){return n.config=t,i&&(n.code=i),n.response=r,n}},function(n,t,i){"use strict";function u(n){return encodeURIComponent(n).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var r=i(2);n.exports=function(n,t,i){var f,e;return t?(i?f=i(t):r.isURLSearchParams(t)?f=t.toString():(e=[],r.forEach(t,function(n,t){null!==n&&"undefined"!=typeof n&&(r.isArray(n)&&(t+="[]"),r.isArray(n)||(n=[n]),r.forEach(n,function(n){r.isDate(n)?n=n.toISOString():r.isObject(n)&&(n=JSON.stringify(n));e.push(u(t)+"="+u(n))}))}),f=e.join("&")),f&&(n+=(n.indexOf("?")===-1?"?":"&")+f),n):n}},function(n,t,i){"use strict";var r=i(2);n.exports=function(n){var t,u,f,i={};return n?(r.forEach(n.split("\n"),function(n){f=n.indexOf(":");t=r.trim(n.substr(0,f)).toLowerCase();u=r.trim(n.substr(f+1));t&&(i[t]=i[t]?i[t]+", "+u:u)}),i):i}},function(n,t,i){"use strict";var r=i(2);n.exports=r.isStandardBrowserEnv()?function(){function i(t){var i=t;return u&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}var t,u=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");return t=i(window.location.href),function(n){var u=r.isString(n)?i(n):n;return u.protocol===t.protocol&&u.host===t.host}}():function(){return function(){return!0}}()},function(n){"use strict";function t(){this.message="String contains an invalid character"}function i(n){for(var u,f,e=String(n),o="",i=0,s=r;e.charAt(0|i)||(s="=",i%1);o+=s.charAt(63&u>>8-i%1*8)){if(f=e.charCodeAt(i+=.75),f>255)throw new t;u=u<<8|f}return o}var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";t.prototype=new Error;t.prototype.code=5;t.prototype.name="InvalidCharacterError";n.exports=i},function(n,t,i){"use strict";var r=i(2);n.exports=r.isStandardBrowserEnv()?function(){return{write:function(n,t,i,u,f,e){var o=[];o.push(n+"="+encodeURIComponent(t));r.isNumber(i)&&o.push("expires="+new Date(i).toGMTString());r.isString(u)&&o.push("path="+u);r.isString(f)&&o.push("domain="+f);e===!0&&o.push("secure");document.cookie=o.join("; ")},read:function(n){var t=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(n,t,i){"use strict";function r(){this.handlers=[]}var u=i(2);r.prototype.use=function(n,t){return this.handlers.push({fulfilled:n,rejected:t}),this.handlers.length-1};r.prototype.eject=function(n){this.handlers[n]&&(this.handlers[n]=null)};r.prototype.forEach=function(n){u.forEach(this.handlers,function(t){null!==t&&n(t)})};n.exports=r},function(n,t,i){"use strict";function r(n){n.cancelToken&&n.cancelToken.throwIfRequested()}var f=i(2),u=i(18),e=i(19),o=i(5);n.exports=function(n){r(n);n.headers=n.headers||{};n.data=u(n.data,n.headers,n.transformRequest);n.headers=f.merge(n.headers.common||{},n.headers[n.method]||{},n.headers||{});f.forEach(["delete","get","head","post","put","patch","common"],function(t){delete n.headers[t]});var t=n.adapter||o.adapter;return t(n).then(function(t){return r(n),t.data=u(t.data,t.headers,n.transformResponse),t},function(t){return e(t)||(r(n),t&&t.response&&(t.response.data=u(t.response.data,t.response.headers,n.transformResponse))),Promise.reject(t)})}},function(n,t,i){"use strict";var r=i(2);n.exports=function(n,t,i){return r.forEach(i,function(i){n=i(n,t)}),n}},function(n){"use strict";n.exports=function(n){return!(!n||!n.__CANCEL__)}},function(n){"use strict";n.exports=function(n){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(n)}},function(n){"use strict";n.exports=function(n,t){return n.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,"")}},function(n){"use strict";function t(n){this.message=n}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};t.prototype.__CANCEL__=!0;n.exports=t},function(n,t,i){"use strict";function r(n){var i,t;if("function"!=typeof n)throw new TypeError("executor must be a function.");this.promise=new Promise(function(n){i=n});t=this;n(function(n){t.reason||(t.reason=new u(n),i(t.reason))})}var u=i(22);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason;};r.source=function(){var n,t=new r(function(t){n=t});return{token:t,cancel:n}};n.exports=r},function(n){"use strict";n.exports=function(n){return function(t){return n.apply(null,t)}}}])});!function(n){"object"==(typeof exports=="undefined"?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).JSZip=n()}(function(){return function n(t,i,r){function u(f,o){var h,c,s;if(!i[f]){if(!t[f]){if(h="function"==typeof require&&require,!o&&h)return h(f,!0);if(e)return e(f,!0);c=new Error("Cannot find module '"+f+"'");throw c.code="MODULE_NOT_FOUND",c;}s=i[f]={exports:{}};t[f][0].call(s.exports,function(n){var i=t[f][1][n];return u(i||n)},s,s.exports,n,t,i,r)}return i[f].exports}for(var e="function"==typeof require&&require,f=0;f<r.length;f++)u(r[f]);return u}({1:[function(n,t,i){(function(r){!function(n){"object"==(typeof i=="undefined"?"undefined":_typeof(i))&&void 0!==t?t.exports=n():("undefined"!=typeof window?window:void 0!==r?r:"undefined"!=typeof self?self:this).JSZip=n()}(function(){return function t(i,r,u){function f(e,s){var c,l,h;if(!r[e]){if(!i[e]){if(c="function"==typeof n&&n,!s&&c)return c(e,!0);if(o)return o(e,!0);l=new Error("Cannot find module '"+e+"'");throw l.code="MODULE_NOT_FOUND",l;}h=r[e]={exports:{}};i[e][0].call(h.exports,function(n){return f(i[e][1][n]||n)},h,h.exports,t,i,r,u)}return r[e].exports}for(var o="function"==typeof n&&n,e=0;e<u.length;e++)f(u[e]);return f}({1:[function(n,t,i){(function(r){!function(n){"object"==(typeof i=="undefined"?"undefined":_typeof(i))&&void 0!==t?t.exports=n():("undefined"!=typeof window?window:void 0!==r?r:"undefined"!=typeof self?self:this).JSZip=n()}(function(){return function t(i,r,u){function f(e,s){var c,l,h;if(!r[e]){if(!i[e]){if(c="function"==typeof n&&n,!s&&c)return c(e,!0);if(o)return o(e,!0);l=new Error("Cannot find module '"+e+"'");throw l.code="MODULE_NOT_FOUND",l;}h=r[e]={exports:{}};i[e][0].call(h.exports,function(n){return f(i[e][1][n]||n)},h,h.exports,t,i,r,u)}return r[e].exports}for(var o="function"==typeof n&&n,e=0;e<u.length;e++)f(u[e]);return f}({1:[function(n,t,i){(function(r){!function(n){"object"==(typeof i=="undefined"?"undefined":_typeof(i))&&void 0!==t?t.exports=n():("undefined"!=typeof window?window:void 0!==r?r:"undefined"!=typeof self?self:this).JSZip=n()}(function(){return function t(i,r,u){function f(e,s){var c,l,h;if(!r[e]){if(!i[e]){if(c="function"==typeof n&&n,!s&&c)return c(e,!0);if(o)return o(e,!0);l=new Error("Cannot find module '"+e+"'");throw l.code="MODULE_NOT_FOUND",l;}h=r[e]={exports:{}};i[e][0].call(h.exports,function(n){return f(i[e][1][n]||n)},h,h.exports,t,i,r,u)}return r[e].exports}for(var o="function"==typeof n&&n,e=0;e<u.length;e++)f(u[e]);return f}({1:[function(n,t,i){(function(r){!function(n){"object"==(typeof i=="undefined"?"undefined":_typeof(i))&&void 0!==t?t.exports=n():("undefined"!=typeof window?window:void 0!==r?r:"undefined"!=typeof self?self:this).JSZip=n()}(function(){return function t(i,r,u){function f(e,s){var c,l,h;if(!r[e]){if(!i[e]){if(c="function"==typeof n&&n,!s&&c)return c(e,!0);if(o)return o(e,!0);l=new Error("Cannot find module '"+e+"'");throw l.code="MODULE_NOT_FOUND",l;}h=r[e]={exports:{}};i[e][0].call(h.exports,function(n){return f(i[e][1][n]||n)},h,h.exports,t,i,r,u)}return r[e].exports}for(var o="function"==typeof n&&n,e=0;e<u.length;e++)f(u[e]);return f}({1:[function(n,t,i){(function(r){!function(n){"object"==(typeof i=="undefined"?"undefined":_typeof(i))&&void 0!==t?t.exports=n():("undefined"!=typeof window?window:void 0!==r?r:"undefined"!=typeof self?self:this).JSZip=n()}(function(){return function t(i,r,u){function f(e,s){var c,l,h;if(!r[e]){if(!i[e]){if(c="function"==typeof n&&n,!s&&c)return c(e,!0);if(o)return o(e,!0);l=new Error("Cannot find module '"+e+"'");throw l.code="MODULE_NOT_FOUND",l;}h=r[e]={exports:{}};i[e][0].call(h.exports,function(n){return f(i[e][1][n]||n)},h,h.exports,t,i,r,u)}return r[e].exports}for(var o="function"==typeof n&&n,e=0;e<u.length;e++)f(u[e]);return f}({1:[function(n,t,i){"use strict";var u=n("./utils"),f=n("./support"),r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";i.encode=function(n){for(var f,e,o,h,c,l,a,v=[],t=0,i=n.length,s=i,y="string"!==u.getTypeOf(n);t<n.length;)s=i-t,o=y?(f=n[t++],e=t<i?n[t++]:0,t<i?n[t++]:0):(f=n.charCodeAt(t++),e=t<i?n.charCodeAt(t++):0,t<i?n.charCodeAt(t++):0),h=f>>2,c=(3&f)<<4|e>>4,l=1<s?(15&e)<<2|o>>6:64,a=2<s?63&o:64,v.push(r.charAt(h)+r.charAt(c)+r.charAt(l)+r.charAt(a));return v.join("")};i.decode=function(n){var s,h,c,l,e,a,i=0,o=0,u,t;if("data:"===n.substr(0,5))throw new Error("Invalid base64 input, it looks like a data url.");if(t=3*(n=n.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4,n.charAt(n.length-1)===r.charAt(64)&&t--,n.charAt(n.length-2)===r.charAt(64)&&t--,t%1!=0)throw new Error("Invalid base64 input, bad content length.");for(u=f.uint8array?new Uint8Array(0|t):new Array(0|t);i<n.length;)s=r.indexOf(n.charAt(i++))<<2|(l=r.indexOf(n.charAt(i++)))>>4,h=(15&l)<<4|(e=r.indexOf(n.charAt(i++)))>>2,c=(3&e)<<6|(a=r.indexOf(n.charAt(i++))),u[o++]=s,64!==e&&(u[o++]=h),64!==a&&(u[o++]=c);return u}},{"./support":30,"./utils":32}],2:[function(n,t){"use strict";function r(n,t,i,r,u){this.compressedSize=n;this.uncompressedSize=t;this.crc32=i;this.compression=r;this.compressedContent=u}var u=n("./external"),f=n("./stream/DataWorker"),e=n("./stream/Crc32Probe"),i=n("./stream/DataLengthProbe");r.prototype={getContentWorker:function(){var n=new f(u.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new i("data_length")),t=this;return n.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch");}),n},getCompressedWorker:function(){return new f(u.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}};r.createWorkerFrom=function(n,t,r){return n.pipe(new e).pipe(new i("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new i("compressedSize")).withStreamInfo("compression",t)};t.exports=r},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(n,t,i){"use strict";var r=n("./stream/GenericWorker");i.STORE={magic:"\0\0",compressWorker:function(){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}};i.DEFLATE=n("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(n,t){"use strict";var r=n("./utils"),i=function(){for(var n,r,i=[],t=0;t<256;t++){for(n=t,r=0;r<8;r++)n=1&n?3988292384^n>>>1:n>>>1;i[t]=n}return i}();t.exports=function(n,t){return void 0!==n&&n.length?"string"!==r.getTypeOf(n)?function(n,t,r){var f=i,e=0+r,u;for(n^=-1,u=0;u<e;u++)n=n>>>8^f[255&(n^t[u])];return-1^n}(0|t,n,n.length):function(n,t,r){var f=i,e=0+r,u;for(n^=-1,u=0;u<e;u++)n=n>>>8^f[255&(n^t.charCodeAt(u))];return-1^n}(0|t,n,n.length):0}},{"./utils":32}],5:[function(n,t,i){"use strict";i.base64=!1;i.binary=!1;i.dir=!1;i.createFolders=!0;i.date=null;i.compression=null;i.compressionOptions=null;i.comment=null;i.unixPermissions=null;i.dosPermissions=null},{}],6:[function(n,t){"use strict";var i;i="undefined"!=typeof Promise?Promise:n("lie");t.exports={Promise:i}},{lie:37}],7:[function(n,t,i){"use strict";function r(n,t){u.call(this,"FlateWorker/"+n);this._pako=null;this._pakoAction=n;this._pakoOptions=t;this.meta={}}var e="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,o=n("pako"),f=n("./utils"),u=n("./stream/GenericWorker"),s=e?"uint8array":"array";i.magic="\b\0";f.inherits(r,u);r.prototype.processChunk=function(n){this.meta=n.meta;null===this._pako&&this._createPako();this._pako.push(f.transformTo(s,n.data),!1)};r.prototype.flush=function(){u.prototype.flush.call(this);null===this._pako&&this._createPako();this._pako.push([],!0)};r.prototype.cleanUp=function(){u.prototype.cleanUp.call(this);this._pako=null};r.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var n=this;this._pako.onData=function(t){n.push({data:t,meta:n.meta})}};i.compressWorker=function(n){return new r("Deflate",n)};i.uncompressWorker=function(){return new r("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(n,t){"use strict";function i(n,t){for(var r="",i=0;i<t;i++)r+=String.fromCharCode(255&n),n>>>=8;return r}function s(n,t,r,f,s,c){var v,y,a=n.file,lt=n.compression,at=c!==o.utf8encode,d=u.transformTo("string",c(a.name)),ut=u.transformTo("string",o.utf8encode(a.name)),tt=a.comment,it=u.transformTo("string",c(tt)),ft=u.transformTo("string",o.utf8encode(tt)),et=ut.length!==a.name.length,ot=ft.length!==tt.length,b="",st="",ht="",ct=a.dir,p=a.date,w={crc32:0,compressedSize:0,uncompressedSize:0},g,rt,k,nt,l;return t&&!r||(w.crc32=n.crc32,w.compressedSize=n.compressedSize,w.uncompressedSize=n.uncompressedSize),g=0,t&&(g|=8),!at&&(et||ot)&&(g|=2048),k=0,nt=0,ct&&(k|=16),"UNIX"===s?(nt=798,k|=((rt=a.unixPermissions)||(rt=ct?16893:33204),(65535&rt)<<16)):(nt=20,k|=63&(a.dosPermissions||0)),v=p.getUTCHours(),v<<=6,v|=p.getUTCMinutes(),v<<=5,v|=p.getUTCSeconds()/2,y=p.getUTCFullYear()-1980,y<<=4,y|=p.getUTCMonth()+1,y<<=5,y|=p.getUTCDate(),et&&(b+="up"+i((st=i(1,1)+i(h(d),4)+ut).length,2)+st),ot&&(b+="uc"+i((ht=i(1,1)+i(h(it),4)+ft).length,2)+ht),l="",l+="\n\0",l+=i(g,2),l+=lt.magic,l+=i(v,2),l+=i(y,2),l+=i(w.crc32,4),l+=i(w.compressedSize,4),l+=i(w.uncompressedSize,4),l+=i(d.length,2),l+=i(b.length,2),{fileRecord:e.LOCAL_FILE_HEADER+l+d+b,dirRecord:e.CENTRAL_FILE_HEADER+i(nt,2)+l+i(it.length,2)+"\0\0\0\0"+i(k,4)+i(f,4)+d+b+it}}function r(n,t,i,r){f.call(this,"ZipFileWorker");this.bytesWritten=0;this.zipComment=t;this.zipPlatform=i;this.encodeFileName=r;this.streamFiles=n;this.accumulate=!1;this.contentBuffer=[];this.dirRecords=[];this.currentSourceOffset=0;this.entriesCount=0;this.currentFile=null;this._sources=[]}var u=n("../utils"),f=n("../stream/GenericWorker"),o=n("../utf8"),h=n("../crc32"),e=n("../signature");u.inherits(r,f);r.prototype.push=function(n){var i=n.meta.percent||0,t=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(n):(this.bytesWritten+=n.data.length,f.prototype.push.call(this,{data:n.data,meta:{currentFile:this.currentFile,percent:t?(i+100*(t-r-1))/t:100}}))};r.prototype.openedSource=function(n){var t,i;this.currentSourceOffset=this.bytesWritten;this.currentFile=n.file.name;t=this.streamFiles&&!n.file.dir;t?(i=s(n,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName),this.push({data:i.fileRecord,meta:{percent:0}})):this.accumulate=!0};r.prototype.closedSource=function(n){this.accumulate=!1;var t,r=this.streamFiles&&!n.file.dir,u=s(n,r,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(u.dirRecord),r)this.push({data:(t=n,e.DATA_DESCRIPTOR+i(t.crc32,4)+i(t.compressedSize,4)+i(t.uncompressedSize,4)),meta:{percent:100}});else for(this.push({data:u.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null};r.prototype.flush=function(){for(var r,o,s,h,c,f,l,a,t=this.bytesWritten,n=0;n<this.dirRecords.length;n++)this.push({data:this.dirRecords[n],meta:{percent:100}});l=this.bytesWritten-t;a=(r=this.dirRecords.length,o=l,s=t,h=this.zipComment,c=this.encodeFileName,f=u.transformTo("string",c(h)),e.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(r,2)+i(r,2)+i(o,4)+i(s,4)+i(f.length,2)+f);this.push({data:a,meta:{percent:100}})};r.prototype.prepareNextSource=function(){this.previous=this._sources.shift();this.openedSource(this.previous.streamInfo);this.isPaused?this.previous.pause():this.previous.resume()};r.prototype.registerPrevious=function(n){this._sources.push(n);var t=this;return n.on("data",function(n){t.processChunk(n)}),n.on("end",function(){t.closedSource(t.previous.streamInfo);t._sources.length?t.prepareNextSource():t.end()}),n.on("error",function(n){t.error(n)}),this};r.prototype.resume=function(){return!!f.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))};r.prototype.error=function(n){var i=this._sources,t;if(!f.prototype.error.call(this,n))return!1;for(t=0;t<i.length;t++)try{i[t].error(n)}catch(n){}return!0};r.prototype.lock=function(){f.prototype.lock.call(this);for(var t=this._sources,n=0;n<t.length;n++)t[n].lock()};t.exports=r},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(n,t,i){"use strict";var r=n("../compressions"),u=n("./ZipFileWorker");i.generateWorker=function(n,t,i){var f=new u(t.streamFiles,i,t.platform,t.encodeFileName),e=0;try{n.forEach(function(n,i){e++;var u=function(n,t){var i=n||t,u=r[i];if(!u)throw new Error(i+" is not a valid compression method !");return u}(i.options.compression,t.compression),o=i.options.compressionOptions||t.compressionOptions||{},s=i.dir,h=i.date;i._compressWorker(u,o).withStreamInfo("file",{name:n,dir:s,date:h,comment:i.comment||"",unixPermissions:i.unixPermissions,dosPermissions:i.dosPermissions}).pipe(f)});f.entriesCount=e}catch(n){f.error(n)}return f}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(n,t){"use strict";function i(){if(!(this instanceof i))return new i;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files={};this.comment=null;this.root="";this.clone=function(){var t=new i;for(var n in this)"function"!=typeof this[n]&&(t[n]=this[n]);return t}}(i.prototype=n("./object")).loadAsync=n("./load");i.support=n("./support");i.defaults=n("./defaults");i.version="3.5.0";i.loadAsync=function(n,t){return(new i).loadAsync(n,t)};i.external=n("./external");t.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(n,t){"use strict";function s(n){return new i.Promise(function(t,i){var r=n.decompressed.getContentWorker().pipe(new o);r.on("error",function(n){i(n)}).on("end",function(){r.streamInfo.crc32!==n.decompressed.crc32?i(new Error("Corrupted zip : CRC32 mismatch")):t()}).resume()})}var r=n("./utils"),i=n("./external"),f=n("./utf8"),e=n("./zipEntries"),o=n("./stream/Crc32Probe"),u=n("./nodejsUtils");t.exports=function(n,t){var o=this;return t=r.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:f.utf8decode}),u.isNode&&u.isStream(n)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):r.prepareContent("the loaded zip file",n,!0,t.optimizedBinaryString,t.base64).then(function(n){var i=new e(t);return i.load(n),i}).then(function(n){var u=[i.Promise.resolve(n)],f=n.files,r;if(t.checkCRC32)for(r=0;r<f.length;r++)u.push(s(f[r]));return i.Promise.all(u)}).then(function(n){for(var i,r=n.shift(),f=r.files,u=0;u<f.length;u++)i=f[u],o.file(i.fileNameStr,i.decompressed,{binary:!0,optimizedBinaryString:!0,date:i.date,dir:i.dir,comment:i.fileCommentStr.length?i.fileCommentStr:null,unixPermissions:i.unixPermissions,dosPermissions:i.dosPermissions,createFolders:t.createFolders});return r.zipComment.length&&(o.comment=r.zipComment),o})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(n,t){"use strict";function i(n,t){r.call(this,"Nodejs stream input adapter for "+n);this._upstreamEnded=!1;this._bindStream(t)}var u=n("../utils"),r=n("../stream/GenericWorker");u.inherits(i,r);i.prototype._bindStream=function(n){var t=this;(this._stream=n).pause();n.on("data",function(n){t.push({data:n,meta:{percent:0}})}).on("error",function(n){t.isPaused?this.generatedError=n:t.error(n)}).on("end",function(){t.isPaused?t._upstreamEnded=!0:t.end()})};i.prototype.pause=function(){return!!r.prototype.pause.call(this)&&(this._stream.pause(),!0)};i.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)};t.exports=i},{"../stream/GenericWorker":28,"../utils":32}],13:[function(n,t){"use strict";function i(n,t,i){r.call(this,t);this._helper=n;var u=this;n.on("data",function(n,t){u.push(n)||u._helper.pause();i&&i(t)}).on("error",function(n){u.emit("error",n)}).on("end",function(){u.push(null)})}var r=n("readable-stream").Readable;n("../utils").inherits(i,r);i.prototype._read=function(){this._helper.resume()};t.exports=i},{"../utils":32,"readable-stream":16}],14:[function(n,t){"use strict";t.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(n,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(n,t);if("number"==typeof n)throw new Error('The "data" argument must not be a number');return new Buffer(n,t)},allocBuffer:function(n){if(Buffer.alloc)return Buffer.alloc(n);var t=new Buffer(n);return t.fill(0),t},isBuffer:function(n){return Buffer.isBuffer(n)},isStream:function(n){return n&&"function"==typeof n.on&&"function"==typeof n.pause&&"function"==typeof n.resume}}},{}],15:[function(n,t){"use strict";function r(n,t,r){var l,a=i.getTypeOf(t),c=i.extend(r||{},e),y,w,b;c.date=c.date||new Date;null!==c.compression&&(c.compression=c.compression.toUpperCase());"string"==typeof c.unixPermissions&&(c.unixPermissions=parseInt(c.unixPermissions,8));c.unixPermissions&&16384&c.unixPermissions&&(c.dir=!0);c.dosPermissions&&16&c.dosPermissions&&(c.dir=!0);c.dir&&(n=u(n));c.createFolders&&(l=function(n){"/"===n.slice(-1)&&(n=n.substring(0,n.length-1));var t=n.lastIndexOf("/");return 0<t?n.substring(0,t):""}(n))&&h.call(this,l,!0);w="string"===a&&!1===c.binary&&!1===c.base64;r&&void 0!==r.binary||(c.binary=!w);(t instanceof o&&0===t.uncompressedSize||c.dir||!t||0===t.length)&&(c.base64=!1,c.binary=!0,t="",c.compression="STORE",a="string");y=t instanceof o||t instanceof f?t:s.isNode&&s.isStream(t)?new p(n,t):i.prepareContent(n,t,c.binary,c.optimizedBinaryString,c.base64);b=new v(n,y,c);this.files[n]=b}function u(n){return"/"!==n.slice(-1)&&(n+="/"),n}function c(n){return"[object RegExp]"===Object.prototype.toString.call(n)}var l=n("./utf8"),i=n("./utils"),f=n("./stream/GenericWorker"),a=n("./stream/StreamHelper"),e=n("./defaults"),o=n("./compressedObject"),v=n("./zipObject"),y=n("./generate"),s=n("./nodejsUtils"),p=n("./nodejs/NodejsStreamInputAdapter"),h=function(n,t){return t=void 0!==t?t:e.createFolders,n=u(n),this.files[n]||r.call(this,n,null,{dir:!0,createFolders:t}),this.files[n]},w={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");},forEach:function(n){var t,i,r;for(t in this.files)this.files.hasOwnProperty(t)&&(r=this.files[t],(i=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&n(i,r))},filter:function(n){var t=[];return this.forEach(function(i,r){n(i,r)&&t.push(r)}),t},file:function(n,t,i){var f,u;return 1!==arguments.length?(n=this.root+n,r.call(this,n,t,i),this):c(n)?(f=n,this.filter(function(n,t){return!t.dir&&f.test(n)})):(u=this.files[this.root+n],u&&!u.dir?u:null)},folder:function(n){if(!n)return this;if(c(n))return this.filter(function(t,i){return i.dir&&n.test(t)});var i=this.root+n,r=h.call(this,i),t=this.clone();return t.root=r.name,t},remove:function(n){var t,r,i;if(n=this.root+n,t=this.files[n],t||("/"!==n.slice(-1)&&(n+="/"),t=this.files[n]),t&&!t.dir)delete this.files[n];else for(r=this.filter(function(t,i){return i.name.slice(0,n.length)===n}),i=0;i<r.length;i++)delete this.files[r[i].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");},generateInternalStream:function(n){var r,t={},u;try{if((t=i.extend(n||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:l.utf8encode})).type=t.type.toLowerCase(),t.compression=t.compression.toUpperCase(),"binarystring"===t.type&&(t.type="string"),!t.type)throw new Error("No output type specified.");i.checkSupport(t.type);"darwin"!==t.platform&&"freebsd"!==t.platform&&"linux"!==t.platform&&"sunos"!==t.platform||(t.platform="UNIX");"win32"===t.platform&&(t.platform="DOS");u=t.comment||this.comment||"";r=y.generateWorker(this,t,u)}catch(n){(r=new f("error")).error(n)}return new a(r,t.type||"string",t.mimeType)},generateAsync:function(n,t){return this.generateInternalStream(n).accumulate(t)},generateNodeStream:function(n,t){return(n=n||{}).type||(n.type="nodebuffer"),this.generateInternalStream(n).toNodejsStream(t)}};t.exports=w},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(n,t){t.exports=n("stream")},{stream:void 0}],17:[function(n,t){"use strict";function i(n){r.call(this,n);for(var t=0;t<this.data.length;t++)n[t]=255&n[t]}var r=n("./DataReader");n("../utils").inherits(i,r);i.prototype.byteAt=function(n){return this.data[this.zero+n]};i.prototype.lastIndexOfSignature=function(n){for(var i=n.charCodeAt(0),r=n.charCodeAt(1),u=n.charCodeAt(2),f=n.charCodeAt(3),t=this.length-4;0<=t;--t)if(this.data[t]===i&&this.data[t+1]===r&&this.data[t+2]===u&&this.data[t+3]===f)return t-this.zero;return-1};i.prototype.readAndCheckSignature=function(n){var i=n.charCodeAt(0),r=n.charCodeAt(1),u=n.charCodeAt(2),f=n.charCodeAt(3),t=this.readData(4);return i===t[0]&&r===t[1]&&u===t[2]&&f===t[3]};i.prototype.readData=function(n){if(this.checkOffset(n),0===n)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,t};t.exports=i},{"../utils":32,"./DataReader":18}],18:[function(n,t){"use strict";function i(n){this.data=n;this.length=n.length;this.index=0;this.zero=0}var r=n("../utils");i.prototype={checkOffset:function(n){this.checkIndex(this.index+n)},checkIndex:function(n){if(this.length<this.zero+n||n<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+n+"). Corrupted zip ?");},setIndex:function(n){this.checkIndex(n);this.index=n},skip:function(n){this.setIndex(this.index+n)},byteAt:function(){},readInt:function(n){var t,i=0;for(this.checkOffset(n),t=this.index+n-1;t>=this.index;t--)i=(i<<8)+this.byteAt(t);return this.index+=n,i},readString:function(n){return r.transformTo("string",this.readData(n))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var n=this.readInt(4);return new Date(Date.UTC(1980+(n>>25&127),(n>>21&15)-1,n>>16&31,n>>11&31,n>>5&63,(31&n)<<1))}};t.exports=i},{"../utils":32}],19:[function(n,t){"use strict";function i(n){r.call(this,n)}var r=n("./Uint8ArrayReader");n("../utils").inherits(i,r);i.prototype.readData=function(n){this.checkOffset(n);var t=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,t};t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,t){"use strict";function i(n){r.call(this,n)}var r=n("./DataReader");n("../utils").inherits(i,r);i.prototype.byteAt=function(n){return this.data.charCodeAt(this.zero+n)};i.prototype.lastIndexOfSignature=function(n){return this.data.lastIndexOf(n)-this.zero};i.prototype.readAndCheckSignature=function(n){return n===this.readData(4)};i.prototype.readData=function(n){this.checkOffset(n);var t=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,t};t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(n,t){"use strict";function i(n){r.call(this,n)}var r=n("./ArrayReader");n("../utils").inherits(i,r);i.prototype.readData=function(n){if(this.checkOffset(n),0===n)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+n);return this.index+=n,t};t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(n,t){"use strict";var i=n("../utils"),r=n("../support"),u=n("./ArrayReader"),f=n("./StringReader"),e=n("./NodeBufferReader"),o=n("./Uint8ArrayReader");t.exports=function(n){var t=i.getTypeOf(n);return i.checkSupport(t),"string"!==t||r.uint8array?"nodebuffer"===t?new e(n):r.uint8array?new o(i.transformTo("uint8array",n)):new u(i.transformTo("array",n)):new f(n)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(n,t,i){"use strict";i.LOCAL_FILE_HEADER="PK\x03\x04";i.CENTRAL_FILE_HEADER="PK\x01\x02";i.CENTRAL_DIRECTORY_END="PK\x05\x06";i.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x06\x07";i.ZIP64_CENTRAL_DIRECTORY_END="PK\x06\x06";i.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(n,t){"use strict";function i(n){r.call(this,"ConvertWorker to "+n);this.destType=n}var r=n("./GenericWorker"),u=n("../utils");u.inherits(i,r);i.prototype.processChunk=function(n){this.push({data:u.transformTo(this.destType,n.data),meta:n.meta})};t.exports=i},{"../utils":32,"./GenericWorker":28}],25:[function(n,t){"use strict";function i(){r.call(this,"Crc32Probe");this.withStreamInfo("crc32",0)}var r=n("./GenericWorker"),u=n("../crc32");n("../utils").inherits(i,r);i.prototype.processChunk=function(n){this.streamInfo.crc32=u(n.data,this.streamInfo.crc32||0);this.push(n)};t.exports=i},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,t){"use strict";function r(n){i.call(this,"DataLengthProbe for "+n);this.propName=n;this.withStreamInfo(n,0)}var u=n("../utils"),i=n("./GenericWorker");u.inherits(r,i);r.prototype.processChunk=function(n){if(n){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+n.data.length}i.prototype.processChunk.call(this,n)};t.exports=r},{"../utils":32,"./GenericWorker":28}],27:[function(n,t){"use strict";function i(n){u.call(this,"DataWorker");var t=this;this.dataIsReady=!1;this.index=0;this.max=0;this.data=null;this.type="";this._tickScheduled=!1;n.then(function(n){t.dataIsReady=!0;t.data=n;t.max=n&&n.length||0;t.type=r.getTypeOf(n);t.isPaused||t._tickAndRepeat()},function(n){t.error(n)})}var r=n("../utils"),u=n("./GenericWorker");r.inherits(i,u);i.prototype.cleanUp=function(){u.prototype.cleanUp.call(this);this.data=null};i.prototype.resume=function(){return!!u.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)};i.prototype._tickAndRepeat=function(){this._tickScheduled=!1;this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))};i.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var n=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":n=this.data.substring(this.index,t);break;case"uint8array":n=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":n=this.data.slice(this.index,t)}return this.index=t,this.push({data:n,meta:{percent:this.max?this.index/this.max*100:0}})};t.exports=i},{"../utils":32,"./GenericWorker":28}],28:[function(n,t){"use strict";function i(n){this.name=n||"default";this.streamInfo={};this.generatedError=null;this.extraStreamInfo={};this.isPaused=!0;this.isFinished=!1;this.isLocked=!1;this._listeners={data:[],end:[],error:[]};this.previous=null}i.prototype={push:function(n){this.emit("data",n)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end");this.cleanUp();this.isFinished=!0}catch(n){this.emit("error",n)}return!0},error:function(n){return!this.isFinished&&(this.isPaused?this.generatedError=n:(this.isFinished=!0,this.emit("error",n),this.previous&&this.previous.error(n),this.cleanUp()),!0)},on:function(n,t){return this._listeners[n].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null;this._listeners=[]},emit:function(n,t){if(this._listeners[n])for(var i=0;i<this._listeners[n].length;i++)this._listeners[n][i].call(this,t)},pipe:function(n){return n.registerPrevious(this)},registerPrevious:function(n){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=n.streamInfo;this.mergeStreamInfo();this.previous=n;var t=this;return n.on("data",function(n){t.processChunk(n)}),n.on("end",function(){t.end()}),n.on("error",function(n){t.error(n)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var n=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),n=!0),this.previous&&this.previous.resume(),!n},flush:function(){},processChunk:function(n){this.push(n)},withStreamInfo:function(n,t){return this.extraStreamInfo[n]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var n in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(n)&&(this.streamInfo[n]=this.extraStreamInfo[n])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0;this.previous&&this.previous.lock()},toString:function(){var n="Worker "+this.name;return this.previous?this.previous+" -> "+n:n}};t.exports=i},{}],29:[function(n,t){"use strict";function u(n,t,r){var u=t;switch(t){case"blob":case"arraybuffer":u="uint8array";break;case"base64":u="string"}try{this._internalType=u;this._outputType=t;this._mimeType=r;i.checkSupport(u);this._worker=n.pipe(new f(u));n.lock()}catch(n){this._worker=new e("error");this._worker.error(n)}}var i=n("../utils"),f=n("./ConvertWorker"),e=n("./GenericWorker"),o=n("../base64"),s=n("../support"),h=n("../external"),r=null;if(s.nodestream)try{r=n("../nodejs/NodejsStreamOutputAdapter")}catch(n){}u.prototype={accumulate:function(n){return t=this,r=n,new h.Promise(function(n,u){var f=[],e=t._internalType,s=t._outputType,h=t._mimeType;t.on("data",function(n,t){f.push(n);r&&r(t)}).on("error",function(n){f=[];u(n)}).on("end",function(){try{var t=function(n,t,r){switch(n){case"blob":return i.newBlob(i.transformTo("arraybuffer",t),r);case"base64":return o.encode(t);default:return i.transformTo(n,t)}}(s,function(n,t){for(var u=0,r=null,f=0,i=0;i<t.length;i++)f+=t[i].length;switch(n){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(r=new Uint8Array(f),i=0;i<t.length;i++)r.set(t[i],u),u+=t[i].length;return r;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+n+"'");}}(e,f),h);n(t)}catch(t){u(t)}f=[]}).resume()});var t,r},on:function(n,t){var r=this;return"data"===n?this._worker.on(n,function(n){t.call(r,n.data,n.meta)}):this._worker.on(n,function(){i.delay(t,arguments,r)}),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(n){if(i.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new r(this,{objectMode:"nodebuffer"!==this._outputType},n)}};t.exports=u},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(n,t,i){"use strict";var r,u;if(i.base64=!0,i.array=!0,i.string=!0,i.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,i.nodebuffer="undefined"!=typeof Buffer,i.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)i.blob=!1;else{r=new ArrayBuffer(0);try{i.blob=0===new Blob([r],{type:"application/zip"}).size}catch(n){try{u=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);u.append(r);i.blob=0===u.getBlob("application/zip").size}catch(n){i.blob=!1}}}try{i.nodestream=!!n("readable-stream").Readable}catch(n){i.nodestream=!1}},{"readable-stream":16}],31:[function(n,t,i){"use strict";function s(){o.call(this,"utf-8 decode");this.leftOver=null}function h(){o.call(this,"utf-8 encode")}for(var f=n("./utils"),u=n("./support"),c=n("./nodejsUtils"),o=n("./stream/GenericWorker"),e=new Array(256),r=0;r<256;r++)e[r]=252<=r?6:248<=r?5:240<=r?4:224<=r?3:192<=r?2:1;e[254]=e[254]=1;i.utf8encode=function(n){return u.nodebuffer?c.newBufferFrom(n,"utf-8"):function(n){for(var r,t,e,f,s=n.length,o=0,i=0;i<s;i++)55296==(64512&(t=n.charCodeAt(i)))&&i+1<s&&56320==(64512&(e=n.charCodeAt(i+1)))&&(t=65536+(t-55296<<10)+(e-56320),i++),o+=t<128?1:t<2048?2:t<65536?3:4;for(r=u.uint8array?new Uint8Array(o):new Array(o),i=f=0;f<o;i++)55296==(64512&(t=n.charCodeAt(i)))&&i+1<s&&56320==(64512&(e=n.charCodeAt(i+1)))&&(t=65536+(t-55296<<10)+(e-56320),i++),t<128?r[f++]=t:(t<2048?r[f++]=192|t>>>6:(t<65536?r[f++]=224|t>>>12:(r[f++]=240|t>>>18,r[f++]=128|t>>>12&63),r[f++]=128|t>>>6&63),r[f++]=128|63&t);return r}(n)};i.utf8decode=function(n){return u.nodebuffer?f.transformTo("nodebuffer",n).toString("utf-8"):function(n){for(var r,i,u,s=n.length,t=new Array(2*s),o=r=0;o<s;)if((i=n[o++])<128)t[r++]=i;else if(4<(u=e[i]))t[r++]=65533,o+=u-1;else{for(i&=2===u?31:3===u?15:7;1<u&&o<s;)i=i<<6|63&n[o++],u--;1<u?t[r++]=65533:i<65536?t[r++]=i:(i-=65536,t[r++]=55296|i>>10&1023,t[r++]=56320|1023&i)}return t.length!==r&&(t.subarray?t=t.subarray(0,r):t.length=r),f.applyFromCharCode(t)}(n=f.transformTo(u.uint8array?"uint8array":"array",n))};f.inherits(s,o);s.prototype.processChunk=function(n){var t=f.transformTo(u.uint8array?"uint8array":"array",n.data),s,r,o;this.leftOver&&this.leftOver.length&&(u.uint8array?(s=t,(t=new Uint8Array(s.length+this.leftOver.length)).set(this.leftOver,0),t.set(s,this.leftOver.length)):t=this.leftOver.concat(t),this.leftOver=null);r=function(n,t){var i;for((t=t||n.length)>n.length&&(t=n.length),i=t-1;0<=i&&128==(192&n[i]);)i--;return i<0?t:0===i?t:i+e[n[i]]>t?i:t}(t);o=t;r!==t.length&&(u.uint8array?(o=t.subarray(0,r),this.leftOver=t.subarray(r,t.length)):(o=t.slice(0,r),this.leftOver=t.slice(r,t.length)));this.push({data:i.utf8decode(o),meta:n.meta})};s.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:i.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)};i.Utf8DecodeWorker=s;f.inherits(h,o);h.prototype.processChunk=function(n){this.push({data:i.utf8encode(n.data),meta:n.meta})};i.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(n,t,i){"use strict";function e(n){return n}function h(n,t){for(var i=0;i<n.length;++i)t[i]=255&n.charCodeAt(i);return t}function s(n){var t=65536,r=i.getTypeOf(n),u=!0;if("uint8array"===r?u=o.applyCanBeUsed.uint8array:"nodebuffer"===r&&(u=o.applyCanBeUsed.nodebuffer),u)for(;1<t;)try{return o.stringifyByChunk(n,r,t)}catch(n){t=Math.floor(t/2)}return o.stringifyByChar(n)}function c(n,t){for(var i=0;i<n.length;i++)t[i]=n[i];return t}var u=n("./support"),a=n("./base64"),f=n("./nodejsUtils"),v=n("set-immediate-shim"),l=n("./external"),o,r;i.newBlob=function(n,t){i.checkSupport("blob");try{return new Blob([n],{type:t})}catch(u){try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return r.append(n),r.getBlob(t)}catch(u){throw new Error("Bug : can't construct the Blob.");}}};o={stringifyByChunk:function(n,t,i){var f=[],r=0,u=n.length;if(u<=i)return String.fromCharCode.apply(null,n);for(;r<u;)"array"===t||"nodebuffer"===t?f.push(String.fromCharCode.apply(null,n.slice(r,Math.min(r+i,u)))):f.push(String.fromCharCode.apply(null,n.subarray(r,Math.min(r+i,u)))),r+=i;return f.join("")},stringifyByChar:function(n){for(var i="",t=0;t<n.length;t++)i+=String.fromCharCode(n[t]);return i},applyCanBeUsed:{uint8array:function(){try{return u.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(n){return!1}}(),nodebuffer:function(){try{return u.nodebuffer&&1===String.fromCharCode.apply(null,f.allocBuffer(1)).length}catch(n){return!1}}()}};i.applyFromCharCode=s;r={};r.string={string:e,array:function(n){return h(n,new Array(n.length))},arraybuffer:function(n){return r.string.uint8array(n).buffer},uint8array:function(n){return h(n,new Uint8Array(n.length))},nodebuffer:function(n){return h(n,f.allocBuffer(n.length))}};r.array={string:s,array:e,arraybuffer:function(n){return new Uint8Array(n).buffer},uint8array:function(n){return new Uint8Array(n)},nodebuffer:function(n){return f.newBufferFrom(n)}};r.arraybuffer={string:function(n){return s(new Uint8Array(n))},array:function(n){return c(new Uint8Array(n),new Array(n.byteLength))},arraybuffer:e,uint8array:function(n){return new Uint8Array(n)},nodebuffer:function(n){return f.newBufferFrom(new Uint8Array(n))}};r.uint8array={string:s,array:function(n){return c(n,new Array(n.length))},arraybuffer:function(n){return n.buffer},uint8array:e,nodebuffer:function(n){return f.newBufferFrom(n)}};r.nodebuffer={string:s,array:function(n){return c(n,new Array(n.length))},arraybuffer:function(n){return r.nodebuffer.uint8array(n).buffer},uint8array:function(n){return c(n,new Uint8Array(n.length))},nodebuffer:e};i.transformTo=function(n,t){if(t=t||"",!n)return t;i.checkSupport(n);var u=i.getTypeOf(t);return r[u][n](t)};i.getTypeOf=function(n){return"string"==typeof n?"string":"[object Array]"===Object.prototype.toString.call(n)?"array":u.nodebuffer&&f.isBuffer(n)?"nodebuffer":u.uint8array&&n instanceof Uint8Array?"uint8array":u.arraybuffer&&n instanceof ArrayBuffer?"arraybuffer":void 0};i.checkSupport=function(n){if(!u[n.toLowerCase()])throw new Error(n+" is not supported by this platform");};i.MAX_VALUE_16BITS=65535;i.MAX_VALUE_32BITS=-1;i.pretty=function(n){for(var i,r="",t=0;t<(n||"").length;t++)r+="\\x"+((i=n.charCodeAt(t))<16?"0":"")+i.toString(16).toUpperCase();return r};i.delay=function(n,t,i){v(function(){n.apply(i||null,t||[])})};i.inherits=function(n,t){function i(){}i.prototype=t.prototype;n.prototype=new i};i.extend=function(){for(var t,i={},n=0;n<arguments.length;n++)for(t in arguments[n])arguments[n].hasOwnProperty(t)&&void 0===i[t]&&(i[t]=arguments[n][t]);return i};i.prepareContent=function(n,t,r,f,e){return l.Promise.resolve(t).then(function(n){return u.blob&&(n instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(n)))&&"undefined"!=typeof FileReader?new l.Promise(function(t,i){var r=new FileReader;r.onload=function(n){t(n.target.result)};r.onerror=function(n){i(n.target.error)};r.readAsArrayBuffer(n)}):n}).then(function(t){var o,s=i.getTypeOf(t);return s?("arraybuffer"===s?t=i.transformTo("uint8array",t):"string"===s&&(e?t=a.decode(t):r&&!0!==f&&(t=h(o=t,u.uint8array?new Uint8Array(o.length):new Array(o.length)))),t):l.Promise.reject(new Error("Can't read the data of '"+n+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,"set-immediate-shim":54}],33:[function(n,t){"use strict";function u(n){this.files=[];this.loadOptions=n}var f=n("./reader/readerFor"),r=n("./utils"),i=n("./signature"),e=n("./zipEntry"),o=(n("./utf8"),n("./support"));u.prototype={checkSignature:function(n){if(!this.reader.readAndCheckSignature(n)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+r.pretty(t)+", expected "+r.pretty(n)+")");}},isSignature:function(n,t){var r=this.reader.index,i;return this.reader.setIndex(n),i=this.reader.readString(4)===t,this.reader.setIndex(r),i},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2);this.diskWithCentralDirStart=this.reader.readInt(2);this.centralDirRecordsOnThisDisk=this.reader.readInt(2);this.centralDirRecords=this.reader.readInt(2);this.centralDirSize=this.reader.readInt(4);this.centralDirOffset=this.reader.readInt(4);this.zipCommentLength=this.reader.readInt(2);var n=this.reader.readData(this.zipCommentLength),t=o.uint8array?"uint8array":"array",i=r.transformTo(t,n);this.zipComment=this.loadOptions.decodeFileName(i)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8);this.reader.skip(4);this.diskNumber=this.reader.readInt(4);this.diskWithCentralDirStart=this.reader.readInt(4);this.centralDirRecordsOnThisDisk=this.reader.readInt(8);this.centralDirRecords=this.reader.readInt(8);this.centralDirSize=this.reader.readInt(8);this.centralDirOffset=this.reader.readInt(8);this.zip64ExtensibleData={};for(var n,t,i,r=this.zip64EndOfCentralSize-44;0<r;)n=this.reader.readInt(2),t=this.reader.readInt(4),i=this.reader.readData(t),this.zip64ExtensibleData[n]={id:n,length:t,value:i}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported");},readLocalFiles:function(){for(var n,t=0;t<this.files.length;t++)n=this.files[t],this.reader.setIndex(n.localHeaderOffset),this.checkSignature(i.LOCAL_FILE_HEADER),n.readLocalPart(this.reader),n.handleUTF8(),n.processAttributes()},readCentralDir:function(){var n;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(i.CENTRAL_FILE_HEADER);)(n=new e({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(n);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length);},readEndOfCentral:function(){var n=this.reader.lastIndexOfSignature(i.CENTRAL_DIRECTORY_END),f,u,t;if(n<0)throw this.isSignature(0,i.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");if(this.reader.setIndex(n),f=n,this.checkSignature(i.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===r.MAX_VALUE_16BITS||this.diskWithCentralDirStart===r.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===r.MAX_VALUE_16BITS||this.centralDirRecords===r.MAX_VALUE_16BITS||this.centralDirSize===r.MAX_VALUE_32BITS||this.centralDirOffset===r.MAX_VALUE_32BITS){if(this.zip64=!0,(n=this.reader.lastIndexOfSignature(i.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(n),this.checkSignature(i.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,i.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(i.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir);this.checkSignature(i.ZIP64_CENTRAL_DIRECTORY_END);this.readBlockZip64EndOfCentral()}if(u=this.centralDirOffset+this.centralDirSize,this.zip64&&(u+=20,u+=12+this.zip64EndOfCentralSize),t=f-u,0<t)this.isSignature(f,i.CENTRAL_FILE_HEADER)||(this.reader.zero=t);else if(t<0)throw new Error("Corrupted zip: missing "+Math.abs(t)+" bytes.");},prepareReader:function(n){this.reader=f(n)},load:function(n){this.prepareReader(n);this.readEndOfCentral();this.readCentralDir();this.readLocalFiles()}};t.exports=u},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utf8":31,"./utils":32,"./zipEntry":34}],34:[function(n,t){"use strict";function o(n,t){this.options=n;this.loadOptions=t}var f=n("./reader/readerFor"),i=n("./utils"),s=n("./compressedObject"),e=n("./crc32"),r=n("./utf8"),u=n("./compressions"),h=n("./support");o.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(n){var t,r;if(n.skip(22),this.fileNameLength=n.readInt(2),r=n.readInt(2),this.fileName=n.readData(this.fileNameLength),n.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(n){for(var t in u)if(u.hasOwnProperty(t)&&u[t].magic===n)return u[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new s(this.compressedSize,this.uncompressedSize,this.crc32,t,n.readData(this.compressedSize))},readCentralPart:function(n){this.versionMadeBy=n.readInt(2);n.skip(2);this.bitFlag=n.readInt(2);this.compressionMethod=n.readString(2);this.date=n.readDate();this.crc32=n.readInt(4);this.compressedSize=n.readInt(4);this.uncompressedSize=n.readInt(4);var t=n.readInt(2);if(this.extraFieldsLength=n.readInt(2),this.fileCommentLength=n.readInt(2),this.diskNumberStart=n.readInt(2),this.internalFileAttributes=n.readInt(2),this.externalFileAttributes=n.readInt(4),this.localHeaderOffset=n.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");n.skip(t);this.readExtraFields(n);this.parseZIP64ExtraField(n);this.fileComment=n.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null;this.dosPermissions=null;var n=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes);0==n&&(this.dosPermissions=63&this.externalFileAttributes);3==n&&(this.unixPermissions=this.externalFileAttributes>>16&65535);this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var n=f(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=n.readInt(8));this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=n.readInt(8));this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=n.readInt(8));this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=n.readInt(4))}},readExtraFields:function(n){var t,i,r,u=n.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});n.index+4<u;)t=n.readInt(2),i=n.readInt(2),r=n.readData(i),this.extraFields[t]={id:t,length:i,value:r};n.setIndex(u)},handleUTF8:function(){var u=h.uint8array?"uint8array":"array",n,f,t,e;this.useUTF8()?(this.fileNameStr=r.utf8decode(this.fileName),this.fileCommentStr=r.utf8decode(this.fileComment)):(n=this.findExtraFieldUnicodePath(),null!==n?this.fileNameStr=n:(f=i.transformTo(u,this.fileName),this.fileNameStr=this.loadOptions.decodeFileName(f)),t=this.findExtraFieldUnicodeComment(),null!==t?this.fileCommentStr=t:(e=i.transformTo(u,this.fileComment),this.fileCommentStr=this.loadOptions.decodeFileName(e)))},findExtraFieldUnicodePath:function(){var t=this.extraFields[28789],n;return t?(n=f(t.value),1!==n.readInt(1)?null:e(this.fileName)!==n.readInt(4)?null:r.utf8decode(n.readData(t.length-5))):null},findExtraFieldUnicodeComment:function(){var t=this.extraFields[25461],n;return t?(n=f(t.value),1!==n.readInt(1)?null:e(this.fileComment)!==n.readInt(4)?null:r.utf8decode(n.readData(t.length-5))):null}};t.exports=o},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(n,t){"use strict";function i(n,t,i){this.name=n;this.dir=i.dir;this.date=i.date;this.comment=i.comment;this.unixPermissions=i.unixPermissions;this.dosPermissions=i.dosPermissions;this._data=t;this._dataBinary=i.binary;this.options={compression:i.compression,compressionOptions:i.compressionOptions}}var s=n("./stream/StreamHelper"),h=n("./stream/DataWorker"),r=n("./utf8"),u=n("./compressedObject"),e=n("./stream/GenericWorker");i.prototype={internalStream:function(n){var t=null,i="string",u,f;try{if(!n)throw new Error("No output type specified.");u="string"===(i=n.toLowerCase())||"text"===i;"binarystring"!==i&&"text"!==i||(i="string");t=this._decompressWorker();f=!this._dataBinary;f&&!u&&(t=t.pipe(new r.Utf8EncodeWorker));!f&&u&&(t=t.pipe(new r.Utf8DecodeWorker))}catch(n){(t=new e("error")).error(n)}return new s(t,i,"")},async:function(n,t){return this.internalStream(n).accumulate(t)},nodeStream:function(n,t){return this.internalStream(n||"nodebuffer").toNodejsStream(t)},_compressWorker:function(n,t){if(this._data instanceof u&&this._data.compression.magic===n.magic)return this._data.getCompressedWorker();var i=this._decompressWorker();return this._dataBinary||(i=i.pipe(new r.Utf8EncodeWorker)),u.createWorkerFrom(i,n,t)},_decompressWorker:function(){return this._data instanceof u?this._data.getContentWorker():this._data instanceof e?this._data:new h(this._data)}};for(var o=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],c=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");},f=0;f<o.length;f++)i.prototype[o[f]]=c;t.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(n,t){(function(n){"use strict";function u(){var t,r,n;for(f=!0,n=i.length;n;){for(r=i,i=[],t=-1;++t<n;)r[t]();n=i.length}f=!1}var r,f,o=n.MutationObserver||n.WebKitMutationObserver,e,i;if(o){var s=0,c=new o(u),h=n.document.createTextNode("");c.observe(h,{characterData:!0});r=function(){h.data=s=++s%2}}else n.setImmediate||void 0===n.MessageChannel?r="document"in n&&"onreadystatechange"in n.document.createElement("script")?function(){var t=n.document.createElement("script");t.onreadystatechange=function(){u();t.onreadystatechange=null;t.parentNode.removeChild(t);t=null};n.document.documentElement.appendChild(t)}:function(){setTimeout(u,0)}:(e=new n.MessageChannel,e.port1.onmessage=u,r=function(){e.port2.postMessage(0)});i=[];t.exports=function(n){1!==i.push(n)||f||r()}}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(n,t){"use strict";function u(){}function r(n){if("function"!=typeof n)throw new TypeError("resolver must be a function");this.state=h;this.queue=[];this.outcome=void 0;n!==u&&c(this,n)}function f(n,t,i){this.promise=n;"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled);"function"==typeof i&&(this.onRejected=i,this.callRejected=this.otherCallRejected)}function o(n,t,r){a(function(){var u;try{u=t(r)}catch(u){return i.reject(n,u)}u===n?i.reject(n,new TypeError("Cannot resolve promise with itself")):i.resolve(n,u)})}function v(n){var t=n&&n.then;if(n&&("object"==(typeof n=="undefined"?"undefined":_typeof(n))||"function"==typeof n)&&"function"==typeof t)return function(){t.apply(n,arguments)}}function c(n,t){function u(t){r||(r=!0,i.reject(n,t))}function e(t){r||(r=!0,i.resolve(n,t))}var r=!1,f=l(function(){t(e,u)});"error"===f.status&&u(f.value)}function l(n,t){var i={};try{i.value=n(t);i.status="success"}catch(n){i.status="error";i.value=n}return i}var a=n("immediate"),i={},s=["REJECTED"],e=["FULFILLED"],h=["PENDING"];(t.exports=r).prototype.finally=function(n){if("function"!=typeof n)return this;var t=this.constructor;return this.then(function(i){return t.resolve(n()).then(function(){return i})},function(i){return t.resolve(n()).then(function(){throw i;})})};r.prototype.catch=function(n){return this.then(null,n)};r.prototype.then=function(n,t){if("function"!=typeof n&&this.state===e||"function"!=typeof t&&this.state===s)return this;var i=new this.constructor(u);return this.state!==h?o(i,this.state===e?n:t,this.outcome):this.queue.push(new f(i,n,t)),i};f.prototype.callFulfilled=function(n){i.resolve(this.promise,n)};f.prototype.otherCallFulfilled=function(n){o(this.promise,this.onFulfilled,n)};f.prototype.callRejected=function(n){i.reject(this.promise,n)};f.prototype.otherCallRejected=function(n){o(this.promise,this.onRejected,n)};i.resolve=function(n,t){var r=l(v,t),u,f,o;if("error"===r.status)return i.reject(n,r.value);if(u=r.value,u)c(n,u);else for(n.state=e,n.outcome=t,f=-1,o=n.queue.length;++f<o;)n.queue[f].callFulfilled(t);return n};i.reject=function(n,t){n.state=s;n.outcome=t;for(var i=-1,r=n.queue.length;++i<r;)n.queue[i].callRejected(t);return n};r.resolve=function(n){return n instanceof this?n:i.resolve(new this(u),n)};r.reject=function(n){var t=new this(u);return i.reject(t,n)};r.all=function(n){function c(n,u){s.resolve(n).then(function(n){o[u]=n;++h!==t||r||(r=!0,i.resolve(e,o))},function(n){r||(r=!0,i.reject(e,n))})}var s=this,t,r;if("[object Array]"!==Object.prototype.toString.call(n))return this.reject(new TypeError("must be an array"));if(t=n.length,r=!1,!t)return this.resolve([]);for(var o=new Array(t),h=0,f=-1,e=new this(u);++f<t;)c(n[f],f);return e};r.race=function(n){var f,t,o,e,r;if("[object Array]"!==Object.prototype.toString.call(n))return this.reject(new TypeError("must be an array"));if(f=n.length,t=!1,!f)return this.resolve([]);for(e=-1,r=new this(u);++e<f;)o=n[e],this.resolve(o).then(function(n){t||(t=!0,i.resolve(r,n))},function(n){t||(t=!0,i.reject(r,n))});return r}},{immediate:36}],38:[function(n,t){"use strict";var i={};n("./lib/utils/common").assign(i,n("./lib/deflate"),n("./lib/inflate"),n("./lib/zlib/constants"));t.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(n,t,i){"use strict";function r(n){var t,i,h;if(!(this instanceof r))return new r(n);if(this.options=e.assign({level:a,method:y,chunkSize:16384,windowBits:15,memLevel:8,strategy:v,to:""},n||{}),t=this.options,t.raw&&0<t.windowBits?t.windowBits=-t.windowBits:t.gzip&&0<t.windowBits&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0,i=f.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy),i!==u)throw new Error(s[i]);if(t.header&&f.deflateSetHeader(this.strm,t.header),t.dictionary){if(h="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(i=f.deflateSetDictionary(this.strm,h))!==u)throw new Error(s[i]);this._dict_set=!0}}function h(n,t){var i=new r(t);if(i.push(n,!0),i.err)throw i.msg||s[i.err];return i.result}var f=n("./zlib/deflate"),e=n("./utils/common"),o=n("./utils/strings"),s=n("./zlib/messages"),l=n("./zlib/zstream"),c=Object.prototype.toString,u=0,a=-1,v=0,y=8;r.prototype.push=function(n,t){var r,s,i=this.strm,h=this.options.chunkSize;if(this.ended)return!1;s=t===~~t?t:!0===t?4:0;i.input="string"==typeof n?o.string2buf(n):"[object ArrayBuffer]"===c.call(n)?new Uint8Array(n):n;i.next_in=0;i.avail_in=i.input.length;do{if(0===i.avail_out&&(i.output=new e.Buf8(h),i.next_out=0,i.avail_out=h),1!==(r=f.deflate(i,s))&&r!==u)return this.onEnd(r),!(this.ended=!0);0!==i.avail_out&&(0!==i.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(o.buf2binstring(e.shrinkBuf(i.output,i.next_out))):this.onData(e.shrinkBuf(i.output,i.next_out)))}while((0<i.avail_in||0===i.avail_out)&&1!==r);return 4===s?(r=f.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===u):2!==s||(this.onEnd(u),!(i.avail_out=0))};r.prototype.onData=function(n){this.chunks.push(n)};r.prototype.onEnd=function(n){n===u&&(this.result="string"===this.options.to?this.chunks.join(""):e.flattenChunks(this.chunks));this.chunks=[];this.err=n;this.msg=this.strm.msg};i.Deflate=r;i.deflate=h;i.deflateRaw=function(n,t){return(t=t||{}).raw=!0,h(n,t)};i.gzip=function(n,t){return(t=t||{}).gzip=!0,h(n,t)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(n,t,i){"use strict";function u(n){var t,i;if(!(this instanceof u))return new u(n);if(this.options=e.assign({chunkSize:16384,windowBits:0,to:""},n||{}),t=this.options,t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||n&&n.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0,i=f.inflateInit2(this.strm,t.windowBits),i!==r.Z_OK)throw new Error(h[i]);this.header=new a;f.inflateGetHeader(this.strm,this.header)}function s(n,t){var i=new u(t);if(i.push(n,!0),i.err)throw i.msg||h[i.err];return i.result}var f=n("./zlib/inflate"),e=n("./utils/common"),o=n("./utils/strings"),r=n("./zlib/constants"),h=n("./zlib/messages"),l=n("./zlib/zstream"),a=n("./zlib/gzheader"),c=Object.prototype.toString;u.prototype.push=function(n,t){var u,s,a,l,p,w,i=this.strm,v=this.options.chunkSize,h=this.options.dictionary,y=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?r.Z_FINISH:r.Z_NO_FLUSH;i.input="string"==typeof n?o.binstring2buf(n):"[object ArrayBuffer]"===c.call(n)?new Uint8Array(n):n;i.next_in=0;i.avail_in=i.input.length;do{if(0===i.avail_out&&(i.output=new e.Buf8(v),i.next_out=0,i.avail_out=v),(u=f.inflate(i,r.Z_NO_FLUSH))===r.Z_NEED_DICT&&h&&(w="string"==typeof h?o.string2buf(h):"[object ArrayBuffer]"===c.call(h)?new Uint8Array(h):h,u=f.inflateSetDictionary(this.strm,w)),u===r.Z_BUF_ERROR&&!0===y&&(u=r.Z_OK,y=!1),u!==r.Z_STREAM_END&&u!==r.Z_OK)return this.onEnd(u),!(this.ended=!0);i.next_out&&(0!==i.avail_out&&u!==r.Z_STREAM_END&&(0!==i.avail_in||s!==r.Z_FINISH&&s!==r.Z_SYNC_FLUSH)||("string"===this.options.to?(a=o.utf8border(i.output,i.next_out),l=i.next_out-a,p=o.buf2string(i.output,a),i.next_out=l,i.avail_out=v-l,l&&e.arraySet(i.output,i.output,a,l,0),this.onData(p)):this.onData(e.shrinkBuf(i.output,i.next_out))));0===i.avail_in&&0===i.avail_out&&(y=!0)}while((0<i.avail_in||0===i.avail_out)&&u!==r.Z_STREAM_END);return u===r.Z_STREAM_END&&(s=r.Z_FINISH),s===r.Z_FINISH?(u=f.inflateEnd(this.strm),this.onEnd(u),this.ended=!0,u===r.Z_OK):s!==r.Z_SYNC_FLUSH||(this.onEnd(r.Z_OK),!(i.avail_out=0))};u.prototype.onData=function(n){this.chunks.push(n)};u.prototype.onEnd=function(n){n===r.Z_OK&&(this.result="string"===this.options.to?this.chunks.join(""):e.flattenChunks(this.chunks));this.chunks=[];this.err=n;this.msg=this.strm.msg};i.Inflate=u;i.inflate=s;i.inflateRaw=function(n,t){return(t=t||{}).raw=!0,s(n,t)};i.ungzip=s},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(n,t,i){"use strict";var f="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array,r,u;i.assign=function(n){for(var t,i,r=Array.prototype.slice.call(arguments,1);r.length;)if(t=r.shift(),t){if("object"!=(typeof t=="undefined"?"undefined":_typeof(t)))throw new TypeError(t+"must be non-object");for(i in t)t.hasOwnProperty(i)&&(n[i]=t[i])}return n};i.shrinkBuf=function(n,t){return n.length===t?n:n.subarray?n.subarray(0,t):(n.length=t,n)};r={arraySet:function(n,t,i,r,u){if(t.subarray&&n.subarray)n.set(t.subarray(i,i+r),u);else for(var f=0;f<r;f++)n[u+f]=t[i+f]},flattenChunks:function(n){for(var r,u,f,e,t=r=0,i=n.length;t<i;t++)r+=n[t].length;for(e=new Uint8Array(r),t=u=0,i=n.length;t<i;t++)f=n[t],e.set(f,u),u+=f.length;return e}};u={arraySet:function(n,t,i,r,u){for(var f=0;f<r;f++)n[u+f]=t[i+f]},flattenChunks:function(n){return[].concat.apply([],n)}};i.setTyped=function(n){n?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,r)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,u))};i.setTyped(f)},{}],42:[function(n,t,i){"use strict";function s(n,t){if(t<65537&&(n.subarray&&o||!n.subarray&&e))return String.fromCharCode.apply(null,f.shrinkBuf(n,t));for(var r="",i=0;i<t;i++)r+=String.fromCharCode(n[i]);return r}var f=n("./common"),e=!0,o=!0,u,r;try{String.fromCharCode.apply(null,[0])}catch(n){e=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(n){o=!1}for(u=new f.Buf8(256),r=0;r<256;r++)u[r]=252<=r?6:248<=r?5:240<=r?4:224<=r?3:192<=r?2:1;u[254]=u[254]=1;i.string2buf=function(n){for(var r,t,e,u,o=n.length,s=0,i=0;i<o;i++)55296==(64512&(t=n.charCodeAt(i)))&&i+1<o&&56320==(64512&(e=n.charCodeAt(i+1)))&&(t=65536+(t-55296<<10)+(e-56320),i++),s+=t<128?1:t<2048?2:t<65536?3:4;for(r=new f.Buf8(s),i=u=0;u<s;i++)55296==(64512&(t=n.charCodeAt(i)))&&i+1<o&&56320==(64512&(e=n.charCodeAt(i+1)))&&(t=65536+(t-55296<<10)+(e-56320),i++),t<128?r[u++]=t:(t<2048?r[u++]=192|t>>>6:(t<65536?r[u++]=224|t>>>12:(r[u++]=240|t>>>18,r[u++]=128|t>>>12&63),r[u++]=128|t>>>6&63),r[u++]=128|63&t);return r};i.buf2binstring=function(n){return s(n,n.length)};i.binstring2buf=function(n){for(var i=new f.Buf8(n.length),t=0,r=i.length;t<r;t++)i[t]=n.charCodeAt(t);return i};i.buf2string=function(n,t){for(var r,i,f,h=t||n.length,e=new Array(2*h),o=r=0;o<h;)if((i=n[o++])<128)e[r++]=i;else if(4<(f=u[i]))e[r++]=65533,o+=f-1;else{for(i&=2===f?31:3===f?15:7;1<f&&o<h;)i=i<<6|63&n[o++],f--;1<f?e[r++]=65533:i<65536?e[r++]=i:(i-=65536,e[r++]=55296|i>>10&1023,e[r++]=56320|1023&i)}return s(e,r)};i.utf8border=function(n,t){var i;for((t=t||n.length)>n.length&&(t=n.length),i=t-1;0<=i&&128==(192&n[i]);)i--;return i<0?t:0===i?t:i+u[n[i]]>t?i:t}},{"./common":41}],43:[function(n,t){"use strict";t.exports=function(n,t,i,r){for(var u=65535&n|0,f=n>>>16&65535|0,e=0;0!==i;){for(i-=e=2e3<i?2e3:i;f=f+(u=u+t[r++]|0)|0,--e;);u%=65521;f%=65521}return u|f<<16|0}},{}],44:[function(n,t){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(n,t){"use strict";var i=function(){for(var n,r,i=[],t=0;t<256;t++){for(n=t,r=0;r<8;r++)n=1&n?3988292384^n>>>1:n>>>1;i[t]=n}return i}();t.exports=function(n,t,r,u){var e=i,o=u+r,f;for(n^=-1,f=u;f<o;f++)n=n>>>8^e[255&(n^t[f])];return-1^n}},{}],46:[function(n,t,i){"use strict";function y(n,t){return n.msg=at[t],t}function ot(n){return(n<<1)-(4<n?9:0)}function p(n){for(var t=n.length;0<=--t;)n[t]=0}function w(n){var i=n.state,t=i.pending;t>n.avail_out&&(t=n.avail_out);0!==t&&(e.arraySet(n.output,i.pending_buf,i.pending_out,t,n.next_out),n.next_out+=t,i.pending_out+=t,n.total_out+=t,n.avail_out-=t,i.pending-=t,0===i.pending&&(i.pending_out=0))}function f(n,t){o._tr_flush_block(n,0<=n.block_start?n.block_start:-1,n.strstart-n.block_start,t);n.block_start=n.strstart;w(n.strm)}function u(n,t){n.pending_buf[n.pending++]=t}function tt(n,t){n.pending_buf[n.pending++]=t>>>8&255;n.pending_buf[n.pending++]=255&t}function st(n,t){var u,e,c=n.max_chain_length,r=n.strstart,f=n.prev_length,o=n.nice_match,y=n.strstart>n.w_size-h?n.strstart-(n.w_size-h):0,i=n.window,p=n.w_mask,w=n.prev,s=n.strstart+v,l=i[r+f-1],a=i[r+f];n.prev_length>=n.good_match&&(c>>=2);o>n.lookahead&&(o=n.lookahead);do if(i[(u=t)+f]===a&&i[u+f-1]===l&&i[u]===i[r]&&i[++u]===i[r+1]){r+=2;u++;do;while(i[++r]===i[++u]&&i[++r]===i[++u]&&i[++r]===i[++u]&&i[++r]===i[++u]&&i[++r]===i[++u]&&i[++r]===i[++u]&&i[++r]===i[++u]&&i[++r]===i[++u]&&r<s);if(e=v-(s-r),r=s-v,f<e){if(n.match_start=t,o<=(f=e))break;l=i[r+f-1];a=i[r+f]}}while((t=w[t&p])>y&&0!=--c);return f<=n.lookahead?f:n.lookahead}function d(n){var o,s,c,y,f,t,l,v,p,u,i=n.w_size;do{if(y=n.window_size-n.lookahead-n.strstart,n.strstart>=i+(i-h)){for(e.arraySet(n.window,n.window,i,i,0),n.match_start-=i,n.strstart-=i,n.block_start-=i,o=s=n.hash_size;c=n.head[--o],n.head[o]=i<=c?c-i:0,--s;);for(o=s=i;c=n.prev[--o],n.prev[o]=i<=c?c-i:0,--s;);y+=i}if(0===n.strm.avail_in)break;if(t=n.strm,l=n.window,v=n.strstart+n.lookahead,u=void 0,(p=y)<(u=t.avail_in)&&(u=p),s=0===u?0:(t.avail_in-=u,e.arraySet(l,t.input,t.next_in,u,v),1===t.state.wrap?t.adler=et(t.adler,l,u,v):2===t.state.wrap&&(t.adler=a(t.adler,l,u,v)),t.next_in+=u,t.total_in+=u,u),n.lookahead+=s,n.lookahead+n.insert>=r)for(f=n.strstart-n.insert,n.ins_h=n.window[f],n.ins_h=(n.ins_h<<n.hash_shift^n.window[f+1])&n.hash_mask;n.insert&&(n.ins_h=(n.ins_h<<n.hash_shift^n.window[f+r-1])&n.hash_mask,n.prev[f&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=f,f++,n.insert--,!(n.lookahead+n.insert<r)););}while(n.lookahead<h&&0!==n.strm.avail_in)}function ft(n,t){for(var i,u;;){if(n.lookahead<h){if(d(n),n.lookahead<h&&t===b)return 1;if(0===n.lookahead)break}if(i=0,n.lookahead>=r&&(n.ins_h=(n.ins_h<<n.hash_shift^n.window[n.strstart+r-1])&n.hash_mask,i=n.prev[n.strstart&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=n.strstart),0!==i&&n.strstart-i<=n.w_size-h&&(n.match_length=st(n,i)),n.match_length>=r)if(u=o._tr_tally(n,n.strstart-n.match_start,n.match_length-r),n.lookahead-=n.match_length,n.match_length<=n.max_lazy_match&&n.lookahead>=r){for(n.match_length--;n.strstart++,n.ins_h=(n.ins_h<<n.hash_shift^n.window[n.strstart+r-1])&n.hash_mask,i=n.prev[n.strstart&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=n.strstart,0!=--n.match_length;);n.strstart++}else n.strstart+=n.match_length,n.match_length=0,n.ins_h=n.window[n.strstart],n.ins_h=(n.ins_h<<n.hash_shift^n.window[n.strstart+1])&n.hash_mask;else u=o._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++;if(u&&(f(n,!1),0===n.strm.avail_out))return 1}return n.insert=n.strstart<r-1?n.strstart:r-1,4===t?(f(n,!0),0===n.strm.avail_out?3:4):n.last_lit&&(f(n,!1),0===n.strm.avail_out)?1:2}function nt(n,t){for(var i,u,e;;){if(n.lookahead<h){if(d(n),n.lookahead<h&&t===b)return 1;if(0===n.lookahead)break}if(i=0,n.lookahead>=r&&(n.ins_h=(n.ins_h<<n.hash_shift^n.window[n.strstart+r-1])&n.hash_mask,i=n.prev[n.strstart&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=n.strstart),n.prev_length=n.match_length,n.prev_match=n.match_start,n.match_length=r-1,0!==i&&n.prev_length<n.max_lazy_match&&n.strstart-i<=n.w_size-h&&(n.match_length=st(n,i),n.match_length<=5&&(1===n.strategy||n.match_length===r&&4096<n.strstart-n.match_start)&&(n.match_length=r-1)),n.prev_length>=r&&n.match_length<=n.prev_length){for(e=n.strstart+n.lookahead-r,u=o._tr_tally(n,n.strstart-1-n.prev_match,n.prev_length-r),n.lookahead-=n.prev_length-1,n.prev_length-=2;++n.strstart<=e&&(n.ins_h=(n.ins_h<<n.hash_shift^n.window[n.strstart+r-1])&n.hash_mask,i=n.prev[n.strstart&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=n.strstart),0!=--n.prev_length;);if(n.match_available=0,n.match_length=r-1,n.strstart++,u&&(f(n,!1),0===n.strm.avail_out))return 1}else if(n.match_available){if((u=o._tr_tally(n,0,n.window[n.strstart-1]))&&f(n,!1),n.strstart++,n.lookahead--,0===n.strm.avail_out)return 1}else n.match_available=1,n.strstart++,n.lookahead--}return n.match_available&&(u=o._tr_tally(n,0,n.window[n.strstart-1]),n.match_available=0),n.insert=n.strstart<r-1?n.strstart:r-1,4===t?(f(n,!0),0===n.strm.avail_out?3:4):n.last_lit&&(f(n,!1),0===n.strm.avail_out)?1:2}function l(n,t,i,r,u){this.good_length=n;this.max_lazy=t;this.nice_length=i;this.max_chain=r;this.func=u}function kt(){this.strm=null;this.status=0;this.pending_buf=null;this.pending_buf_size=0;this.pending_out=0;this.pending=0;this.wrap=0;this.gzhead=null;this.gzindex=0;this.method=it;this.last_flush=-1;this.w_size=0;this.w_bits=0;this.w_mask=0;this.window=null;this.window_size=0;this.prev=null;this.head=null;this.ins_h=0;this.hash_size=0;this.hash_bits=0;this.hash_mask=0;this.hash_shift=0;this.block_start=0;this.match_length=0;this.prev_match=0;this.match_available=0;this.strstart=0;this.match_start=0;this.lookahead=0;this.prev_length=0;this.max_chain_length=0;this.max_lazy_match=0;this.level=0;this.strategy=0;this.good_match=0;this.nice_match=0;this.dyn_ltree=new e.Buf16(2*wt);this.dyn_dtree=new e.Buf16(2*(2*yt+1));this.bl_tree=new e.Buf16(2*(2*pt+1));p(this.dyn_ltree);p(this.dyn_dtree);p(this.bl_tree);this.l_desc=null;this.d_desc=null;this.bl_desc=null;this.bl_count=new e.Buf16(bt+1);this.heap=new e.Buf16(2*ut+1);p(this.heap);this.heap_len=0;this.heap_max=0;this.depth=new e.Buf16(2*ut+1);p(this.depth);this.l_buf=0;this.lit_bufsize=0;this.last_lit=0;this.d_buf=0;this.opt_len=0;this.static_len=0;this.matches=0;this.insert=0;this.bi_buf=0;this.bi_valid=0}function ht(n){var t;return n&&n.state?(n.total_in=n.total_out=0,n.data_type=vt,(t=n.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?rt:k,n.adler=2===t.wrap?0:1,t.last_flush=b,o._tr_init(t),c):y(n,s)}function ct(n){var t,i=ht(n);return i===c&&((t=n.state).window_size=2*t.w_size,p(t.head),t.max_lazy_match=g[t.level].max_lazy,t.good_match=g[t.level].good_length,t.nice_match=g[t.level].nice_length,t.max_chain_length=g[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=r-1,t.match_available=0,t.ins_h=0),i}function lt(n,t,i,u,f,o){var c,h;return n?(c=1,-1===t&&(t=6),u<0?(c=0,u=-u):15<u&&(c=2,u-=16),f<1||9<f||i!==it||u<8||15<u||t<0||9<t||o<0||4<o)?y(n,s):(8===u&&(u=9),h=new kt,(n.state=h).strm=n,h.wrap=c,h.gzhead=null,h.w_bits=u,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=f+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+r-1)/r),h.window=new e.Buf8(2*h.w_size),h.head=new e.Buf16(h.hash_size),h.prev=new e.Buf16(h.w_size),h.lit_bufsize=1<<f+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new e.Buf8(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=t,h.strategy=o,h.method=i,ct(n)):s}var g,e=n("../utils/common"),o=n("./trees"),et=n("./adler32"),a=n("./crc32"),at=n("./messages"),b=0,c=0,s=-2,vt=2,it=8,ut=286,yt=30,pt=19,wt=2*ut+1,bt=15,r=3,v=258,h=v+r+1,rt=42,k=113;g=[new l(0,0,0,0,function(n,t){var r=65535,i;for(r>n.pending_buf_size-5&&(r=n.pending_buf_size-5);;){if(n.lookahead<=1){if(d(n),0===n.lookahead&&t===b)return 1;if(0===n.lookahead)break}if((n.strstart+=n.lookahead,n.lookahead=0,i=n.block_start+r,(0===n.strstart||n.strstart>=i)&&(n.lookahead=n.strstart-i,n.strstart=i,f(n,!1),0===n.strm.avail_out))||n.strstart-n.block_start>=n.w_size-h&&(f(n,!1),0===n.strm.avail_out))return 1}return n.insert=0,4===t?(f(n,!0),0===n.strm.avail_out?3:4):(n.strstart>n.block_start&&(f(n,!1),n.strm.avail_out),1)}),new l(4,4,8,4,ft),new l(4,5,16,8,ft),new l(4,6,32,32,ft),new l(4,4,16,16,nt),new l(8,16,32,32,nt),new l(8,16,128,128,nt),new l(8,32,128,256,nt),new l(32,128,258,1024,nt),new l(32,258,258,4096,nt)];i.deflateInit=function(n,t){return lt(n,t,it,15,8,0)};i.deflateInit2=lt;i.deflateReset=ct;i.deflateResetKeep=ht;i.deflateSetHeader=function(n,t){return n&&n.state?2!==n.state.wrap?s:(n.state.gzhead=t,c):s};i.deflate=function(n,t){var ut,i,e,h,l,nt;if(!n||!n.state||5<t||t<0)return n?y(n,s):s;if(i=n.state,!n.output||!n.input&&0!==n.avail_in||666===i.status&&4!==t)return y(n,0===n.avail_out?-5:s);if((i.strm=n,ut=i.last_flush,i.last_flush=t,i.status===rt)&&(2===i.wrap?(n.adler=0,u(i,31),u(i,139),u(i,8),i.gzhead?(u(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),u(i,255&i.gzhead.time),u(i,i.gzhead.time>>8&255),u(i,i.gzhead.time>>16&255),u(i,i.gzhead.time>>24&255),u(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),u(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(u(i,255&i.gzhead.extra.length),u(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(n.adler=a(n.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(u(i,0),u(i,0),u(i,0),u(i,0),u(i,0),u(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),u(i,3),i.status=k)):(l=it+(i.w_bits-8<<4)<<8,l|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(l|=32),l+=31-l%31,i.status=k,tt(i,l),0!==i.strstart&&(tt(i,n.adler>>>16),tt(i,65535&n.adler)),n.adler=1)),69===i.status)if(i.gzhead.extra){for(e=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>e&&(n.adler=a(n.adler,i.pending_buf,i.pending-e,e)),w(n),e=i.pending,i.pending!==i.pending_buf_size));)u(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>e&&(n.adler=a(n.adler,i.pending_buf,i.pending-e,e));i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){e=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>e&&(n.adler=a(n.adler,i.pending_buf,i.pending-e,e)),w(n),e=i.pending,i.pending===i.pending_buf_size)){h=1;break}h=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0;u(i,h)}while(0!==h);i.gzhead.hcrc&&i.pending>e&&(n.adler=a(n.adler,i.pending_buf,i.pending-e,e));0===h&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){e=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>e&&(n.adler=a(n.adler,i.pending_buf,i.pending-e,e)),w(n),e=i.pending,i.pending===i.pending_buf_size)){h=1;break}h=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0;u(i,h)}while(0!==h);i.gzhead.hcrc&&i.pending>e&&(n.adler=a(n.adler,i.pending_buf,i.pending-e,e));0===h&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&w(n),i.pending+2<=i.pending_buf_size&&(u(i,255&n.adler),u(i,n.adler>>8&255),n.adler=0,i.status=k)):i.status=k),0!==i.pending){if(w(n),0===n.avail_out)return i.last_flush=-1,c}else if(0===n.avail_in&&ot(t)<=ot(ut)&&4!==t)return y(n,-5);if(666===i.status&&0!==n.avail_in)return y(n,-5);if(0!==n.avail_in||0!==i.lookahead||t!==b&&666!==i.status){if(nt=2===i.strategy?function(n,t){for(var i;;){if(0===n.lookahead&&(d(n),0===n.lookahead)){if(t===b)return 1;break}if(n.match_length=0,i=o._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,i&&(f(n,!1),0===n.strm.avail_out))return 1}return n.insert=0,4===t?(f(n,!0),0===n.strm.avail_out?3:4):n.last_lit&&(f(n,!1),0===n.strm.avail_out)?1:2}(i,t):3===i.strategy?function(n,t){for(var s,e,i,h,u=n.window;;){if(n.lookahead<=v){if(d(n),n.lookahead<=v&&t===b)return 1;if(0===n.lookahead)break}if(n.match_length=0,n.lookahead>=r&&0<n.strstart&&(e=u[i=n.strstart-1])===u[++i]&&e===u[++i]&&e===u[++i]){h=n.strstart+v;do;while(e===u[++i]&&e===u[++i]&&e===u[++i]&&e===u[++i]&&e===u[++i]&&e===u[++i]&&e===u[++i]&&e===u[++i]&&i<h);n.match_length=v-(h-i);n.match_length>n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=r?(s=o._tr_tally(n,1,n.match_length-r),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(s=o._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),s&&(f(n,!1),0===n.strm.avail_out))return 1}return n.insert=0,4===t?(f(n,!0),0===n.strm.avail_out?3:4):n.last_lit&&(f(n,!1),0===n.strm.avail_out)?1:2}(i,t):g[i.level].func(i,t),3!==nt&&4!==nt||(i.status=666),1===nt||3===nt)return 0===n.avail_out&&(i.last_flush=-1),c;if(2===nt&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(p(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),w(n),0===n.avail_out))return i.last_flush=-1,c}return 4!==t?c:i.wrap<=0?1:(2===i.wrap?(u(i,255&n.adler),u(i,n.adler>>8&255),u(i,n.adler>>16&255),u(i,n.adler>>24&255),u(i,255&n.total_in),u(i,n.total_in>>8&255),u(i,n.total_in>>16&255),u(i,n.total_in>>24&255)):(tt(i,n.adler>>>16),tt(i,65535&n.adler)),w(n),0<i.wrap&&(i.wrap=-i.wrap),0!==i.pending?c:1)};i.deflateEnd=function(n){var t;return n&&n.state?(t=n.state.status)!==rt&&69!==t&&73!==t&&91!==t&&103!==t&&t!==k&&666!==t?y(n,s):(n.state=null,t===k?y(n,-3):c):s};i.deflateSetDictionary=function(n,t){var i,u,l,f,a,v,y,h,o=t.length;if(!n||!n.state||2===(f=(i=n.state).wrap)||1===f&&i.status!==rt||i.lookahead)return s;for(1===f&&(n.adler=et(n.adler,t,o,0)),i.wrap=0,o>=i.w_size&&(0===f&&(p(i.head),i.strstart=0,i.block_start=0,i.insert=0),h=new e.Buf8(i.w_size),e.arraySet(h,t,o-i.w_size,i.w_size,0),t=h,o=i.w_size),a=n.avail_in,v=n.next_in,y=n.input,n.avail_in=o,n.next_in=0,n.input=t,d(i);i.lookahead>=r;){for(u=i.strstart,l=i.lookahead-(r-1);i.ins_h=(i.ins_h<<i.hash_shift^i.window[u+r-1])&i.hash_mask,i.prev[u&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=u,u++,--l;);i.strstart=u;i.lookahead=r-1;d(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=r-1,i.match_available=0,n.next_in=v,n.input=y,n.avail_in=a,i.wrap=f,c};i.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(n,t){"use strict";t.exports=function(){this.text=0;this.time=0;this.xflags=0;this.os=0;this.extra=null;this.extra_len=0;this.name="";this.comment="";this.hcrc=0;this.done=!1}},{}],48:[function(n,t){"use strict";t.exports=function(n,t){var o,c,b,r,tt,k,it,d,rt,v,w,s,u,g,nt,ut,ft,l,i,h,y,e,a,p,f;o=n.state;c=n.next_in;p=n.input;b=c+(n.avail_in-5);r=n.next_out;f=n.output;tt=r-(t-n.avail_out);k=r+(n.avail_out-257);it=o.dmax;d=o.wsize;rt=o.whave;v=o.wnext;w=o.window;s=o.hold;u=o.bits;g=o.lencode;nt=o.distcode;ut=(1<<o.lenbits)-1;ft=(1<<o.distbits)-1;n:do{u<15&&(s+=p[c++]<<u,u+=8,s+=p[c++]<<u,u+=8);l=g[s&ut];t:for(;;){if(s>>>=i=l>>>24,u-=i,0==(i=l>>>16&255))f[r++]=65535&l;else{if(!(16&i)){if(0==(64&i)){l=g[(65535&l)+(s&(1<<i)-1)];continue t}if(32&i){o.mode=12;break n}n.msg="invalid literal/length code";o.mode=30;break n}h=65535&l;(i&=15)&&(u<i&&(s+=p[c++]<<u,u+=8),h+=s&(1<<i)-1,s>>>=i,u-=i);u<15&&(s+=p[c++]<<u,u+=8,s+=p[c++]<<u,u+=8);l=nt[s&ft];i:for(;;){if(s>>>=i=l>>>24,u-=i,!(16&(i=l>>>16&255))){if(0==(64&i)){l=nt[(65535&l)+(s&(1<<i)-1)];continue i}n.msg="invalid distance code";o.mode=30;break n}if(y=65535&l,u<(i&=15)&&(s+=p[c++]<<u,(u+=8)<i&&(s+=p[c++]<<u,u+=8)),it<(y+=s&(1<<i)-1)){n.msg="invalid distance too far back";o.mode=30;break n}if(s>>>=i,u-=i,(i=r-tt)<y){if(rt<(i=y-i)&&o.sane){n.msg="invalid distance too far back";o.mode=30;break n}if(a=w,(e=0)===v){if(e+=d-i,i<h){for(h-=i;f[r++]=w[e++],--i;);e=r-y;a=f}}else if(v<i){if(e+=d+v-i,(i-=v)<h){for(h-=i;f[r++]=w[e++],--i;);if(e=0,v<h){for(h-=i=v;f[r++]=w[e++],--i;);e=r-y;a=f}}}else if(e+=v-i,i<h){for(h-=i;f[r++]=w[e++],--i;);e=r-y;a=f}for(;2<h;)f[r++]=a[e++],f[r++]=a[e++],f[r++]=a[e++],h-=3;h&&(f[r++]=a[e++],1<h&&(f[r++]=a[e++]))}else{for(e=r-y;f[r++]=f[e++],f[r++]=f[e++],f[r++]=f[e++],2<(h-=3););h&&(f[r++]=f[e++],1<h&&(f[r++]=f[e++]))}break}}break}}while(c<b&&r<k);c-=h=u>>3;s&=(1<<(u-=h<<3))-1;n.next_in=c;n.next_out=r;n.avail_in=c<b?b-c+5:5-(c-b);n.avail_out=r<k?k-r+257:257-(r-k);o.hold=s;o.bits=u}},{}],49:[function(n,t,i){"use strict";function y(n){return(n>>>24&255)+(n>>>8&65280)+((65280&n)<<8)+((255&n)<<24)}function rt(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.flags=0;this.dmax=0;this.check=0;this.total=0;this.head=null;this.wbits=0;this.wsize=0;this.whave=0;this.wnext=0;this.window=null;this.hold=0;this.bits=0;this.length=0;this.offset=0;this.extra=0;this.lencode=null;this.distcode=null;this.lenbits=0;this.distbits=0;this.ncode=0;this.nlen=0;this.ndist=0;this.have=0;this.next=null;this.lens=new r.Buf16(320);this.work=new r.Buf16(288);this.lendyn=null;this.distdyn=null;this.sane=0;this.back=0;this.was=0}function p(n){var t;return n&&n.state?(t=n.state,n.total_in=n.total_out=t.total=0,n.msg="",t.wrap&&(n.adler=1&t.wrap),t.mode=v,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(tt),t.distcode=t.distdyn=new r.Buf32(it),t.sane=1,t.back=-1,e):u}function w(n){var t;return n&&n.state?((t=n.state).wsize=0,t.whave=0,t.wnext=0,p(n)):u}function b(n,t){var r,i;return n&&n.state?(i=n.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?u:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=r,i.wbits=t,w(n))):u}function k(n,t){var i,r;return n?(r=new rt,(n.state=r).window=null,(i=b(n,t))!==e&&(n.state=null),i):u}function ut(n){if(d){var t;for(h=new r.Buf32(512),c=new r.Buf32(32),t=0;t<144;)n.lens[t++]=8;for(;t<256;)n.lens[t++]=9;for(;t<280;)n.lens[t++]=7;for(;t<288;)n.lens[t++]=8;for(o(l,n.lens,0,288,h,0,n.work,{bits:9}),t=0;t<32;)n.lens[t++]=5;o(a,n.lens,0,32,c,0,n.work,{bits:5});d=!1}n.lencode=h;n.lenbits=9;n.distcode=c;n.distbits=5}function g(n,t,i,u){var e,f=n.state;return null===f.window&&(f.wsize=1<<f.wbits,f.wnext=0,f.whave=0,f.window=new r.Buf8(f.wsize)),u>=f.wsize?(r.arraySet(f.window,t,i-f.wsize,f.wsize,0),f.wnext=0,f.whave=f.wsize):(u<(e=f.wsize-f.wnext)&&(e=u),r.arraySet(f.window,t,i-u,e,f.wnext),(u-=e)?(r.arraySet(f.window,t,i-u,u,0),f.wnext=u,f.whave=f.wsize):(f.wnext+=e,f.wnext===f.wsize&&(f.wnext=0),f.whave<f.wsize&&(f.whave+=e))),0}var r=n("../utils/common"),s=n("./adler32"),f=n("./crc32"),nt=n("./inffast"),o=n("./inftrees"),l=1,a=2,e=0,u=-2,v=1,tt=852,it=592,h,c,d=!0;i.inflateReset=w;i.inflateReset2=b;i.inflateResetKeep=p;i.inflateInit=function(n){return k(n,15)};i.inflateInit2=k;i.inflate=function(n,t){var i,k,at,b,ct,p,rt,c,h,pt,tt,w,kt,dt,d,et,ht,st,wt,bt,it,lt,yt,vt,ot=0,ft=new r.Buf8(4),gt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!n||!n.state||!n.output||!n.input&&0!==n.avail_in)return u;12===(i=n.state).mode&&(i.mode=13);ct=n.next_out;at=n.output;rt=n.avail_out;b=n.next_in;k=n.input;p=n.avail_in;c=i.hold;h=i.bits;pt=p;tt=rt;lt=e;n:for(;;)switch(i.mode){case v:if(0===i.wrap){i.mode=13;break}for(;h<16;){if(0===p)break n;p--;c+=k[b++]<<h;h+=8}if(2&i.wrap&&35615===c){ft[i.check=0]=255&c;ft[1]=c>>>8&255;i.check=f(i.check,ft,2,0);h=c=0;i.mode=2;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&c)<<8)+(c>>8))%31){n.msg="incorrect header check";i.mode=30;break}if(8!=(15&c)){n.msg="unknown compression method";i.mode=30;break}if(h-=4,it=8+(15&(c>>>=4)),0===i.wbits)i.wbits=it;else if(it>i.wbits){n.msg="invalid window size";i.mode=30;break}i.dmax=1<<it;n.adler=i.check=1;i.mode=512&c?10:12;h=c=0;break;case 2:for(;h<16;){if(0===p)break n;p--;c+=k[b++]<<h;h+=8}if(i.flags=c,8!=(255&i.flags)){n.msg="unknown compression method";i.mode=30;break}if(57344&i.flags){n.msg="unknown header flags set";i.mode=30;break}i.head&&(i.head.text=c>>8&1);512&i.flags&&(ft[0]=255&c,ft[1]=c>>>8&255,i.check=f(i.check,ft,2,0));h=c=0;i.mode=3;case 3:for(;h<32;){if(0===p)break n;p--;c+=k[b++]<<h;h+=8}i.head&&(i.head.time=c);512&i.flags&&(ft[0]=255&c,ft[1]=c>>>8&255,ft[2]=c>>>16&255,ft[3]=c>>>24&255,i.check=f(i.check,ft,4,0));h=c=0;i.mode=4;case 4:for(;h<16;){if(0===p)break n;p--;c+=k[b++]<<h;h+=8}i.head&&(i.head.xflags=255&c,i.head.os=c>>8);512&i.flags&&(ft[0]=255&c,ft[1]=c>>>8&255,i.check=f(i.check,ft,2,0));h=c=0;i.mode=5;case 5:if(1024&i.flags){for(;h<16;){if(0===p)break n;p--;c+=k[b++]<<h;h+=8}i.length=c;i.head&&(i.head.extra_len=c);512&i.flags&&(ft[0]=255&c,ft[1]=c>>>8&255,i.check=f(i.check,ft,2,0));h=c=0}else i.head&&(i.head.extra=null);i.mode=6;case 6:if(1024&i.flags&&(p<(w=i.length)&&(w=p),w&&(i.head&&(it=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),r.arraySet(i.head.extra,k,b,w,it)),512&i.flags&&(i.check=f(i.check,k,w,b)),p-=w,b+=w,i.length-=w),i.length))break n;i.length=0;i.mode=7;case 7:if(2048&i.flags){if(0===p)break n;for(w=0;it=k[b+w++],i.head&&it&&i.length<65536&&(i.head.name+=String.fromCharCode(it)),it&&w<p;);if(512&i.flags&&(i.check=f(i.check,k,w,b)),p-=w,b+=w,it)break n}else i.head&&(i.head.name=null);i.length=0;i.mode=8;case 8:if(4096&i.flags){if(0===p)break n;for(w=0;it=k[b+w++],i.head&&it&&i.length<65536&&(i.head.comment+=String.fromCharCode(it)),it&&w<p;);if(512&i.flags&&(i.check=f(i.check,k,w,b)),p-=w,b+=w,it)break n}else i.head&&(i.head.comment=null);i.mode=9;case 9:if(512&i.flags){for(;h<16;){if(0===p)break n;p--;c+=k[b++]<<h;h+=8}if(c!==(65535&i.check)){n.msg="header crc mismatch";i.mode=30;break}h=c=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0);n.adler=i.check=0;i.mode=12;break;case 10:for(;h<32;){if(0===p)break n;p--;c+=k[b++]<<h;h+=8}n.adler=i.check=y(c);h=c=0;i.mode=11;case 11:if(0===i.havedict)return n.next_out=ct,n.avail_out=rt,n.next_in=b,n.avail_in=p,i.hold=c,i.bits=h,2;n.adler=i.check=1;i.mode=12;case 12:if(5===t||6===t)break n;case 13:if(i.last){c>>>=7&h;h-=7&h;i.mode=27;break}for(;h<3;){if(0===p)break n;p--;c+=k[b++]<<h;h+=8}switch(i.last=1&c,h-=1,3&(c>>>=1)){case 0:i.mode=14;break;case 1:if(ut(i),i.mode=20,6!==t)break;c>>>=2;h-=2;break n;case 2:i.mode=17;break;case 3:n.msg="invalid block type";i.mode=30}c>>>=2;h-=2;break;case 14:for(c>>>=7&h,h-=7&h;h<32;){if(0===p)break n;p--;c+=k[b++]<<h;h+=8}if((65535&c)!=(c>>>16^65535)){n.msg="invalid stored block lengths";i.mode=30;break}if(i.length=65535&c,h=c=0,i.mode=15,6===t)break n;case 15:i.mode=16;case 16:if(w=i.length){if(p<w&&(w=p),rt<w&&(w=rt),0===w)break n;r.arraySet(at,k,b,w,ct);p-=w;b+=w;rt-=w;ct+=w;i.length-=w;break}i.mode=12;break;case 17:for(;h<14;){if(0===p)break n;p--;c+=k[b++]<<h;h+=8}if(i.nlen=257+(31&c),c>>>=5,h-=5,i.ndist=1+(31&c),c>>>=5,h-=5,i.ncode=4+(15&c),c>>>=4,h-=4,286<i.nlen||30<i.ndist){n.msg="too many length or distance symbols";i.mode=30;break}i.have=0;i.mode=18;case 18:for(;i.have<i.ncode;){for(;h<3;){if(0===p)break n;p--;c+=k[b++]<<h;h+=8}i.lens[gt[i.have++]]=7&c;c>>>=3;h-=3}for(;i.have<19;)i.lens[gt[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,yt={bits:i.lenbits},lt=o(0,i.lens,0,19,i.lencode,0,i.work,yt),i.lenbits=yt.bits,lt){n.msg="invalid code lengths set";i.mode=30;break}i.have=0;i.mode=19;case 19:for(;i.have<i.nlen+i.ndist;){for(;et=(ot=i.lencode[c&(1<<i.lenbits)-1])>>>16&255,ht=65535&ot,!((d=ot>>>24)<=h);){if(0===p)break n;p--;c+=k[b++]<<h;h+=8}if(ht<16)c>>>=d,h-=d,i.lens[i.have++]=ht;else{if(16===ht){for(vt=d+2;h<vt;){if(0===p)break n;p--;c+=k[b++]<<h;h+=8}if(c>>>=d,h-=d,0===i.have){n.msg="invalid bit length repeat";i.mode=30;break}it=i.lens[i.have-1];w=3+(3&c);c>>>=2;h-=2}else if(17===ht){for(vt=d+3;h<vt;){if(0===p)break n;p--;c+=k[b++]<<h;h+=8}h-=d;it=0;w=3+(7&(c>>>=d));c>>>=3;h-=3}else{for(vt=d+7;h<vt;){if(0===p)break n;p--;c+=k[b++]<<h;h+=8}h-=d;it=0;w=11+(127&(c>>>=d));c>>>=7;h-=7}if(i.have+w>i.nlen+i.ndist){n.msg="invalid bit length repeat";i.mode=30;break}for(;w--;)i.lens[i.have++]=it}}if(30===i.mode)break;if(0===i.lens[256]){n.msg="invalid code -- missing end-of-block";i.mode=30;break}if(i.lenbits=9,yt={bits:i.lenbits},lt=o(l,i.lens,0,i.nlen,i.lencode,0,i.work,yt),i.lenbits=yt.bits,lt){n.msg="invalid literal/lengths set";i.mode=30;break}if(i.distbits=6,i.distcode=i.distdyn,yt={bits:i.distbits},lt=o(a,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,yt),i.distbits=yt.bits,lt){n.msg="invalid distances set";i.mode=30;break}if(i.mode=20,6===t)break n;case 20:i.mode=21;case 21:if(6<=p&&258<=rt){n.next_out=ct;n.avail_out=rt;n.next_in=b;n.avail_in=p;i.hold=c;i.bits=h;nt(n,tt);ct=n.next_out;at=n.output;rt=n.avail_out;b=n.next_in;k=n.input;p=n.avail_in;c=i.hold;h=i.bits;12===i.mode&&(i.back=-1);break}for(i.back=0;et=(ot=i.lencode[c&(1<<i.lenbits)-1])>>>16&255,ht=65535&ot,!((d=ot>>>24)<=h);){if(0===p)break n;p--;c+=k[b++]<<h;h+=8}if(et&&0==(240&et)){for(st=d,wt=et,bt=ht;et=(ot=i.lencode[bt+((c&(1<<st+wt)-1)>>st)])>>>16&255,ht=65535&ot,!(st+(d=ot>>>24)<=h);){if(0===p)break n;p--;c+=k[b++]<<h;h+=8}c>>>=st;h-=st;i.back+=st}if(c>>>=d,h-=d,i.back+=d,i.length=ht,0===et){i.mode=26;break}if(32&et){i.back=-1;i.mode=12;break}if(64&et){n.msg="invalid literal/length code";i.mode=30;break}i.extra=15&et;i.mode=22;case 22:if(i.extra){for(vt=i.extra;h<vt;){if(0===p)break n;p--;c+=k[b++]<<h;h+=8}i.length+=c&(1<<i.extra)-1;c>>>=i.extra;h-=i.extra;i.back+=i.extra}i.was=i.length;i.mode=23;case 23:for(;et=(ot=i.distcode[c&(1<<i.distbits)-1])>>>16&255,ht=65535&ot,!((d=ot>>>24)<=h);){if(0===p)break n;p--;c+=k[b++]<<h;h+=8}if(0==(240&et)){for(st=d,wt=et,bt=ht;et=(ot=i.distcode[bt+((c&(1<<st+wt)-1)>>st)])>>>16&255,ht=65535&ot,!(st+(d=ot>>>24)<=h);){if(0===p)break n;p--;c+=k[b++]<<h;h+=8}c>>>=st;h-=st;i.back+=st}if(c>>>=d,h-=d,i.back+=d,64&et){n.msg="invalid distance code";i.mode=30;break}i.offset=ht;i.extra=15&et;i.mode=24;case 24:if(i.extra){for(vt=i.extra;h<vt;){if(0===p)break n;p--;c+=k[b++]<<h;h+=8}i.offset+=c&(1<<i.extra)-1;c>>>=i.extra;h-=i.extra;i.back+=i.extra}if(i.offset>i.dmax){n.msg="invalid distance too far back";i.mode=30;break}i.mode=25;case 25:if(0===rt)break n;if(w=tt-rt,i.offset>w){if((w=i.offset-w)>i.whave&&i.sane){n.msg="invalid distance too far back";i.mode=30;break}kt=w>i.wnext?(w-=i.wnext,i.wsize-w):i.wnext-w;w>i.length&&(w=i.length);dt=i.window}else dt=at,kt=ct-i.offset,w=i.length;for(rt<w&&(w=rt),rt-=w,i.length-=w;at[ct++]=dt[kt++],--w;);0===i.length&&(i.mode=21);break;case 26:if(0===rt)break n;at[ct++]=i.length;rt--;i.mode=21;break;case 27:if(i.wrap){for(;h<32;){if(0===p)break n;p--;c|=k[b++]<<h;h+=8}if(tt-=rt,n.total_out+=tt,i.total+=tt,tt&&(n.adler=i.check=i.flags?f(i.check,at,tt,ct-tt):s(i.check,at,tt,ct-tt)),tt=rt,(i.flags?c:y(c))!==i.check){n.msg="incorrect data check";i.mode=30;break}h=c=0}i.mode=28;case 28:if(i.wrap&&i.flags){for(;h<32;){if(0===p)break n;p--;c+=k[b++]<<h;h+=8}if(c!==(4294967295&i.total)){n.msg="incorrect length check";i.mode=30;break}h=c=0}i.mode=29;case 29:lt=1;break n;case 30:lt=-3;break n;case 31:return-4;case 32:default:return u}return n.next_out=ct,n.avail_out=rt,n.next_in=b,n.avail_in=p,i.hold=c,i.bits=h,(i.wsize||tt!==n.avail_out&&i.mode<30&&(i.mode<27||4!==t))&&g(n,n.output,n.next_out,tt-n.avail_out)?(i.mode=31,-4):(pt-=n.avail_in,tt-=n.avail_out,n.total_in+=pt,n.total_out+=tt,i.total+=tt,i.wrap&&tt&&(n.adler=i.check=i.flags?f(i.check,at,tt,n.next_out-tt):s(i.check,at,tt,n.next_out-tt)),n.data_type=i.bits+(i.last?64:0)+(12===i.mode?128:0)+(20===i.mode||15===i.mode?256:0),(0==pt&&0===tt||4===t)&&lt===e&&(lt=-5),lt)};i.inflateEnd=function(n){if(!n||!n.state)return u;var t=n.state;return t.window&&(t.window=null),n.state=null,e};i.inflateGetHeader=function(n,t){var i;return n&&n.state?0==(2&(i=n.state).wrap)?u:((i.head=t).done=!1,e):u};i.inflateSetDictionary=function(n,t){var i,r=t.length;return n&&n.state?0!==(i=n.state).wrap&&11!==i.mode?u:11===i.mode&&s(1,t,r,0)!==i.check?-3:g(n,t,r,r)?(i.mode=31,-4):(i.havedict=1,e):u};i.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(n,t){"use strict";var i=n("../utils/common"),r=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],u=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],f=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],e=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(n,t,o,s,h,c,l,a){for(var g,ht,ct,lt,ut,at,vt,ft,yt,bt=a.bits,v=0,y=0,d=0,p=0,w=0,nt=0,b=0,it=0,rt=0,k=0,et=null,pt=0,tt=new i.Buf16(16),ot=new i.Buf16(16),st=null,wt=0,v=0;v<=15;v++)tt[v]=0;for(y=0;y<s;y++)tt[t[o+y]]++;for(w=bt,p=15;1<=p&&0===tt[p];p--);if(p<w&&(w=p),0===p)return h[c++]=20971520,h[c++]=20971520,a.bits=1,0;for(d=1;d<p&&0===tt[d];d++);for(w<d&&(w=d),v=it=1;v<=15;v++)if(it<<=1,(it-=tt[v])<0)return-1;if(0<it&&(0===n||1!==p))return-1;for(ot[1]=0,v=1;v<15;v++)ot[v+1]=ot[v]+tt[v];for(y=0;y<s;y++)0!==t[o+y]&&(l[ot[t[o+y]]++]=y);if(at=0===n?(et=st=l,19):1===n?(et=r,pt-=257,st=u,wt-=257,256):(et=f,st=e,-1),v=d,ut=c,b=y=k=0,ct=-1,lt=(rt=1<<(nt=w))-1,1===n&&852<rt||2===n&&592<rt)return 1;for(;;){for(vt=v-b,yt=l[y]<at?(ft=0,l[y]):l[y]>at?(ft=st[wt+l[y]],et[pt+l[y]]):(ft=96,0),g=1<<v-b,d=ht=1<<nt;h[ut+(k>>b)+(ht-=g)]=vt<<24|ft<<16|yt|0,0!==ht;);for(g=1<<v-1;k&g;)g>>=1;if(0!==g?(k&=g-1,k+=g):k=0,y++,0==--tt[v]){if(v===p)break;v=t[o+l[y]]}if(w<v&&(k&lt)!==ct){for(0===b&&(b=w),ut+=d,it=1<<(nt=v-b);nt+b<p&&!((it-=tt[nt+b])<=0);)nt++,it<<=1;if(rt+=1<<nt,1===n&&852<rt||2===n&&592<rt)return 1;h[ct=k&lt]=w<<24|nt<<16|ut-c|0}}return 0!==k&&(h[ut+k]=v-b<<24|4194304),a.bits=w,0}},{"../utils/common":41}],51:[function(n,t){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(n,t,i){"use strict";function o(n){for(var t=n.length;0<=--t;)n[t]=0}function b(n,t,i,r,u){this.static_tree=n;this.extra_bits=t;this.extra_base=i;this.elems=r;this.max_length=u;this.has_stree=n&&n.length}function k(n,t){this.dyn_tree=n;this.max_code=0;this.stat_desc=t}function ft(n){return n<256?h[n]:h[256+(n>>>7)]}function a(n,t){n.pending_buf[n.pending++]=255&t;n.pending_buf[n.pending++]=t>>>8&255}function r(n,t,i){n.bi_valid>p-i?(n.bi_buf|=t<<n.bi_valid&65535,a(n,n.bi_buf),n.bi_buf=t>>p-n.bi_valid,n.bi_valid+=i-p):(n.bi_buf|=t<<n.bi_valid&65535,n.bi_valid+=i)}function u(n,t,i){r(n,i[2*t],i[2*t+1])}function et(n,t){for(var i=0;i|=1&n,n>>>=1,i<<=1,0<--t;);return i>>>1}function ot(n,t,i){for(var u,o=new Array(e+1),s=0,f,r=1;r<=e;r++)o[r]=s=s+i[r-1]<<1;for(u=0;u<=t;u++)f=n[2*u+1],0!==f&&(n[2*u]=et(o[f]++,f))}function st(n){for(var t=0;t<286;t++)n.dyn_ltree[2*t]=0;for(t=0;t<30;t++)n.dyn_dtree[2*t]=0;for(t=0;t<19;t++)n.bl_tree[2*t]=0;n.dyn_ltree[512]=1;n.opt_len=n.static_len=0;n.last_lit=n.matches=0}function ht(n){8<n.bi_valid?a(n,n.bi_buf):0<n.bi_valid&&(n.pending_buf[n.pending++]=n.bi_buf);n.bi_buf=0;n.bi_valid=0}function ct(n,t,i,r){var u=2*t,f=2*i;return n[u]<n[f]||n[u]===n[f]&&r[t]<=r[i]}function d(n,t,i){for(var u=n.heap[i],r=i<<1;r<=n.heap_len&&(r<n.heap_len&&ct(t,n.heap[r+1],n.heap[r],n.depth)&&r++,!ct(t,u,n.heap[r],n.depth));)n.heap[i]=n.heap[r],i=r,r<<=1;n.heap[i]=u}function lt(n,t,i){var o,s,f,h,e=0;if(0!==n.last_lit)for(;o=n.pending_buf[n.d_buf+2*e]<<8|n.pending_buf[n.d_buf+2*e+1],s=n.pending_buf[n.l_buf+e],e++,0===o?u(n,s,t):(u(n,(f=c[s])+256+1,t),0!==(h=w[f])&&r(n,s-=y[f],h),u(n,f=ft(--o),i),0!==(h=v[f])&&r(n,o-=l[f],h)),e<n.last_lit;);u(n,256,t)}function g(n,t){var i,f,u,r=t.dyn_tree,h=t.stat_desc.static_tree,c=t.stat_desc.has_stree,s=t.stat_desc.elems,o=-1;for(n.heap_len=0,n.heap_max=573,i=0;i<s;i++)0!==r[2*i]?(n.heap[++n.heap_len]=o=i,n.depth[i]=0):r[2*i+1]=0;for(;n.heap_len<2;)r[2*(u=n.heap[++n.heap_len]=o<2?++o:0)]=1,n.depth[u]=0,n.opt_len--,c&&(n.static_len-=h[2*u+1]);for(t.max_code=o,i=n.heap_len>>1;1<=i;i--)d(n,r,i);for(u=s;i=n.heap[1],n.heap[1]=n.heap[n.heap_len--],d(n,r,1),f=n.heap[1],n.heap[--n.heap_max]=i,n.heap[--n.heap_max]=f,r[2*u]=r[2*i]+r[2*f],n.depth[u]=(n.depth[i]>=n.depth[f]?n.depth[i]:n.depth[f])+1,r[2*i+1]=r[2*f+1]=u,n.heap[1]=u++,d(n,r,1),2<=n.heap_len;);n.heap[--n.heap_max]=n.heap[1],function(n,t){for(var f,r,o,h,l,u=t.dyn_tree,a=t.max_code,y=t.stat_desc.static_tree,p=t.stat_desc.has_stree,w=t.stat_desc.extra_bits,v=t.stat_desc.extra_base,s=t.stat_desc.max_length,c=0,i=0;i<=e;i++)n.bl_count[i]=0;for(u[2*n.heap[n.heap_max]+1]=0,f=n.heap_max+1;f<573;f++)s<(i=u[2*u[2*(r=n.heap[f])+1]+1]+1)&&(i=s,c++),u[2*r+1]=i,a<r||(n.bl_count[i]++,h=0,v<=r&&(h=w[r-v]),l=u[2*r],n.opt_len+=l*(i+h),p&&(n.static_len+=l*(y[2*r+1]+h)));if(0!==c){do{for(i=s-1;0===n.bl_count[i];)i--;n.bl_count[i]--;n.bl_count[i+1]+=2;n.bl_count[s]--;c-=2}while(0<c);for(i=s;0!==i;i--)for(r=n.bl_count[i];0!==r;)a<(o=n.heap[--f])||(u[2*o+1]!==i&&(n.opt_len+=(i-u[2*o+1])*u[2*o],u[2*o+1]=i),r--)}}(n,t);ot(r,o,n.bl_count)}function at(n,t,i){var o,r,h=-1,u=t[1],f=0,e=7,s=4;for(0===u&&(e=138,s=3),t[2*(i+1)+1]=65535,o=0;o<=i;o++)r=u,u=t[2*(o+1)+1],++f<e&&r===u||(f<s?n.bl_tree[2*r]+=f:0!==r?(r!==h&&n.bl_tree[2*r]++,n.bl_tree[32]++):f<=10?n.bl_tree[34]++:n.bl_tree[36]++,h=r,s=(f=0)===u?(e=138,3):r===u?(e=6,3):(e=7,4))}function vt(n,t,i){var h,e,l=-1,o=t[1],f=0,s=7,c=4;for(0===o&&(s=138,c=3),h=0;h<=i;h++)if(e=o,o=t[2*(h+1)+1],!(++f<s&&e===o)){if(f<c)for(;u(n,e,n.bl_tree),0!=--f;);else 0!==e?(e!==l&&(u(n,e,n.bl_tree),f--),u(n,16,n.bl_tree),r(n,f-3,2)):f<=10?(u(n,17,n.bl_tree),r(n,f-3,3)):(u(n,18,n.bl_tree),r(n,f-11,7));l=e;c=(f=0)===o?(s=138,3):e===o?(s=6,3):(s=7,4)}}function yt(n,t,i,u){var f,o,e;r(n,0+(u?1:0),3);o=t;e=i;ht(f=n);a(f,e);a(f,~e);pt.arraySet(f.pending_buf,f.window,o,e,f.pending);f.pending+=e}var pt=n("../utils/common"),e=15,p=16,w=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],v=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],wt=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],tt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],f=new Array(576),s,h,c,y,it,rt,ut,l,nt;o(f);s=new Array(60);o(s);h=new Array(512);o(h);c=new Array(256);o(c);y=new Array(29);o(y);l=new Array(30);o(l);nt=!1;i._tr_init=function(n){nt||(function(){for(var n,u,o,i,r=new Array(e+1),t=o=0;t<28;t++)for(y[t]=o,n=0;n<1<<w[t];n++)c[o++]=t;for(c[o-1]=t,t=i=0;t<16;t++)for(l[t]=i,n=0;n<1<<v[t];n++)h[i++]=t;for(i>>=7;t<30;t++)for(l[t]=i<<7,n=0;n<1<<v[t]-7;n++)h[256+i++]=t;for(u=0;u<=e;u++)r[u]=0;for(n=0;n<=143;)f[2*n+1]=8,n++,r[8]++;for(;n<=255;)f[2*n+1]=9,n++,r[9]++;for(;n<=279;)f[2*n+1]=7,n++,r[7]++;for(;n<=287;)f[2*n+1]=8,n++,r[8]++;for(ot(f,287,r),n=0;n<30;n++)s[2*n+1]=5,s[2*n]=et(n,5);it=new b(f,w,257,286,e);rt=new b(s,v,0,30,e);ut=new b(new Array(0),wt,0,19,7)}(),nt=!0);n.l_desc=new k(n.dyn_ltree,it);n.d_desc=new k(n.dyn_dtree,rt);n.bl_desc=new k(n.bl_tree,ut);n.bi_buf=0;n.bi_valid=0;st(n)};i._tr_stored_block=yt;i._tr_flush_block=function(n,t,i,u){var e,o,h=0;0<n.level?(2===n.strm.data_type&&(n.strm.data_type=function(n){for(var i=4093624447,t=0;t<=31;t++,i>>>=1)if(1&i&&0!==n.dyn_ltree[2*t])return 0;if(0!==n.dyn_ltree[18]||0!==n.dyn_ltree[20]||0!==n.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==n.dyn_ltree[2*t])return 1;return 0}(n)),g(n,n.l_desc),g(n,n.d_desc),h=function(n){var t;for(at(n,n.dyn_ltree,n.l_desc.max_code),at(n,n.dyn_dtree,n.d_desc.max_code),g(n,n.bl_desc),t=18;3<=t&&0===n.bl_tree[2*tt[t]+1];t--);return n.opt_len+=3*(t+1)+5+5+4,t}(n),e=n.opt_len+3+7>>>3,(o=n.static_len+3+7>>>3)<=e&&(e=o)):e=o=i+5;i+4<=e&&-1!==t?yt(n,t,i,u):4===n.strategy||o===e?(r(n,2+(u?1:0),3),lt(n,f,s)):(r(n,4+(u?1:0),3),function(n,t,i,u){var f;for(r(n,t-257,5),r(n,i-1,5),r(n,u-4,4),f=0;f<u;f++)r(n,n.bl_tree[2*tt[f]+1],3);vt(n,n.dyn_ltree,t-1);vt(n,n.dyn_dtree,i-1)}(n,n.l_desc.max_code+1,n.d_desc.max_code+1,h+1),lt(n,n.dyn_ltree,n.dyn_dtree));st(n);u&&ht(n)};i._tr_tally=function(n,t,i){return n.pending_buf[n.d_buf+2*n.last_lit]=t>>>8&255,n.pending_buf[n.d_buf+2*n.last_lit+1]=255&t,n.pending_buf[n.l_buf+n.last_lit]=255&i,n.last_lit++,0===t?n.dyn_ltree[2*i]++:(n.matches++,t--,n.dyn_ltree[2*(c[i]+256+1)]++,n.dyn_dtree[2*ft(t)]++),n.last_lit===n.lit_bufsize-1};i._tr_align=function(n){var t;r(n,2,3);u(n,256,f);16===(t=n).bi_valid?(a(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}},{"../utils/common":41}],53:[function(n,t){"use strict";t.exports=function(){this.input=null;this.next_in=0;this.avail_in=0;this.total_in=0;this.output=null;this.next_out=0;this.avail_out=0;this.total_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},{}],54:[function(n,t){"use strict";t.exports="function"==typeof setImmediate?setImmediate:function(){var n=[].slice.apply(arguments);n.splice(1,0,0);setTimeout.apply(null,n)}},{}]},{},[10])(10)})}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)})}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)})}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)})}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)});!function(n){"object"==(typeof exports=="undefined"?"undefined":_typeof(exports))?module.exports=n():"function"==typeof define&&define.amd?define(n):"undefined"!=typeof window?window.JSZipUtils=n():"undefined"!=typeof global?global.JSZipUtils=n():"undefined"!=typeof self&&(self.JSZipUtils=n())}(function(){return function n(t,i,r){function u(f,o){var h,s;if(!i[f]){if(!t[f]){if(h="function"==typeof require&&require,!o&&h)return h(f,!0);if(e)return e(f,!0);throw new Error("Cannot find module '"+f+"'");}s=i[f]={exports:{}};t[f][0].call(s.exports,function(n){var i=t[f][1][n];return u(i||n)},s,s.exports,n,t,i,r)}return i[f].exports}for(var e="function"==typeof require&&require,f=0;f<r.length;f++)u(r[f]);return u}({1:[function(n,t){"use strict";function r(){try{return new window.XMLHttpRequest}catch(n){}}var i={},u;i._getBinaryFromXHR=function(n){return n.response||n.responseText};u="undefined"!=typeof window&&window.ActiveXObject?function(){return r()||function(){try{return new window.ActiveXObject("Microsoft.XMLHTTP")}catch(n){}}()}:r;i.getBinaryContent=function(n,t){var o,s,f,e,r;"function"==typeof(t=t||{})?(e=t,t={}):"function"==typeof t.callback&&(e=t.callback);e||"undefined"==typeof Promise?(s=function(n){e(null,n)},f=function(n){e(n,null)}):o=new Promise(function(n,t){s=n;f=t});try{r=u();r.open("GET",n,!0);"responseType"in r&&(r.responseType="arraybuffer");r.overrideMimeType&&r.overrideMimeType("text/plain; charset=x-user-defined");r.onreadystatechange=function(t){if(4===r.readyState)if(200===r.status||0===r.status)try{s(i._getBinaryFromXHR(r))}catch(t){f(new Error(t))}else f(new Error("Ajax error for "+n+" : "+this.status+" "+this.statusText))};t.progress&&(r.onprogress=function(i){t.progress({path:n,originalEvent:i,percent:i.loaded/i.total*100,loaded:i.loaded,total:i.total})});r.send()}catch(o){f(new Error(o),null)}return o};t.exports=i},{}]},{},[1])(1)}),function(n,t){"function"==typeof define&&define.amd?define([],t):"undefined"!=typeof exports?t():(t(),n.FileSaver={exports:{}}.exports)}(this,function(){"use strict";function e(n,t){return"undefined"==typeof t?t={autoBom:!1}:"object"!=(typeof t=="undefined"?"undefined":_typeof(t))&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(n.type)?new Blob(["﻿",n],{type:n.type}):n}function r(n,t,r){var u=new XMLHttpRequest;u.open("GET",n);u.responseType="blob";u.onload=function(){i(u.response,t,r)};u.onerror=function(){console.error("could not download file")};u.send()}function u(n){var t=new XMLHttpRequest;t.open("HEAD",n,!1);try{t.send()}catch(n){}return 200<=t.status&&299>=t.status}function t(n){try{n.dispatchEvent(new MouseEvent("click"))}catch(i){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null);n.dispatchEvent(t)}}var n="object"==(typeof window=="undefined"?"undefined":_typeof(window))&&window.window===window?window:"object"==(typeof self=="undefined"?"undefined":_typeof(self))&&self.self===self?self:"object"==(typeof global=="undefined"?"undefined":_typeof(global))&&global.global===global?global:void 0,f=/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),i=n.saveAs||("object"!=(typeof window=="undefined"?"undefined":_typeof(window))||window!==n?function(){}:"download"in HTMLAnchorElement.prototype&&!f?function(i,f,e){var s=n.URL||n.webkitURL,o=document.createElement("a");f=f||i.name||"download";o.download=f;o.rel="noopener";"string"==typeof i?(o.href=i,o.origin===location.origin?t(o):u(o.href)?r(i,f,e):t(o,o.target="_blank")):(o.href=s.createObjectURL(i),setTimeout(function(){s.revokeObjectURL(o.href)},4e4),setTimeout(function(){t(o)},0))}:"msSaveOrOpenBlob"in navigator?function(n,i,f){if(i=i||n.name||"download","string"!=typeof n)navigator.msSaveOrOpenBlob(e(n,f),i);else if(u(n))r(n,i,f);else{var o=document.createElement("a");o.href=n;o.target="_blank";setTimeout(function(){t(o)})}}:function(t,i,u,e){var o,h,s;if(e=e||open("","_blank"),e&&(e.document.title=e.document.body.innerText="downloading..."),"string"==typeof t)return r(t,i,u);var l="application/octet-stream"===t.type,a=/constructor/i.test(n.HTMLElement)||n.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);(c||l&&a||f)&&"undefined"!=typeof FileReader?(o=new FileReader,o.onloadend=function(){var n=o.result;n=c?n:n.replace(/^data:[^;]*;/,"data:attachment/file;");e?e.location.href=n:location=n;e=null},o.readAsDataURL(t)):(h=n.URL||n.webkitURL,s=h.createObjectURL(t),e?e.location=s:location.href=s,e=null,setTimeout(function(){h.revokeObjectURL(s)},4e4))});n.saveAs=i.saveAs=i;"undefined"!=typeof module&&(module.exports=i)});var Spinner=React.createClass({displayName:"Spinner",render:function(){return React.createElement("div",{className:"spinnerWrapper"},React.createElement("div",{id:"loading"}),React.createElement("div",{className:"spinner"}))}}),OrderByArrows=React.createClass({displayName:"OrderByArrows",render:function(){return React.createElement("div",{className:"orderby"},React.createElement("div",{className:"orderby-asc"}),React.createElement("div",{className:"orderby-desc"}))}}),RelatedProducts=function(n){return React.createElement("div",{className:"relatedProducts-wrapper row "+n.className},n.products.length>0&&React.createElement("h3",{className:"aside-categoryTitle"},n.relatedProductsLabel),n.products.map(function(t,i){return React.createElement(ArticleTeaser,{showMore:n.readMoreLabel,headline:t.Title,imageSrc:t.ImageUrl,teaserText:t.Description,url:t.Url,key:"articleTeaser"+i,columnClassName:"col-md-12 col-sm-4"})}))},RelevantArticles=function(n){return React.createElement("div",{className:"relevantArticles-wrapper row "+n.className},n.articles.length>0&&React.createElement("h3",{className:"aside-categoryTitle"},n.relevantArticlesLabel),n.articles.map(function(t,i){return React.createElement(ArticleTeaser,{showMore:n.readMoreLabel,headline:t.Headline,imageSrc:t.ImageSrc,teaserText:t.TeaserText,url:t.Url,key:"articleTeaser"+i,columnClassName:"col-md-12 col-sm-4"})}))},ContentArea=function(n){return React.createElement("div",{className:n.className},n.items.map(function(t,i){return t.Type==="ThemeBlock"?React.createElement(ThemeBlockComponent,{key:i,imageUrl:t.ImageUrl,title:t.Title,description:t.Description,url:t.Url,buttontext:t.ButtonText,bootstrapclass:"col-md-12 col-xs-12 col-sm-6"}):t.Type==="ProductTeaser"?React.createElement(ProductTeaserBlockComponent,{key:i,imageUrl:t.ImageUrl,title:t.Title,description:t.Description,bootstrapclass:"col-md-12 col-xs-12 col-sm-6"}):t.Type==="ContactInfoBlock"?React.createElement(ContactInfoBlockComponent,{key:i,buttons:t.Buttons,imageUrl:t.ImageUrl,title:t.Title,description:t.Description,phone:t.PhoneNumber,email:t.Email,reseller:n.reseller,request:n.request,bootstrapclass:"col-md-12 col-xs-12 col-sm-6"}):t.Type==="ArticleTeaser"?React.createElement(ArticleTeaser,{showMore:n.readMoreLabel,headline:t.Headline,imageSrc:t.ImageSrc,teaserText:t.TeaserText,url:t.Url,key:"articleTeaser"+i,columnClassName:"col-md-12 col-sm-4"}):t.Type==="FactBlock"?React.createElement("div",{className:"factBox"},React.createElement(FactBoxComponent,t)):void 0}))},AsideContent=function(n){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,Object.getPrototypeOf(t).apply(this,arguments))}return _inherits(t,n),_createClass(t,[{key:"render",value:function(){return React.createElement("aside",{className:"col-lg-2 col-md-20 col-sm-12 col-xs-12 aside-right"},React.createElement("div",{className:"aside-right__offset"},React.createElement(ContentArea,{className:"section row",readMoreLabel:this.props.ReadMoreLabel,items:this.props.ContentArea1,reseller:this.props.reseller,request:this.props.request}),React.createElement(RelatedProducts,{className:"section",readMoreLabel:this.props.ReadMoreLabel,relatedProductsLabel:this.props.RelatedProductsLabel,products:this.props.RelevantProducts}),React.createElement(RelevantArticles,{className:"section",readMoreLabel:this.props.ReadMoreLabel,relevantArticlesLabel:this.props.RelevantArticlesLabel,articles:this.props.RelevantArticles}),React.createElement(ContentArea,{className:"section row",readMoreLabel:this.props.ReadMoreLabel,items:this.props.ContentArea2,reseller:this.props.reseller,request:this.props.request})))}}]),t}(React.Component);AsideContent.propTypes={relatedProducts:React.PropTypes.array,relevantArticles:React.PropTypes.array,contentAreaAside1:React.PropTypes.string,contentAreaAside2:React.PropTypes.string,localizedStrings:React.PropTypes.object,reseller:React.PropTypes.object,request:React.PropTypes.object};var MainCategoryBlockComponent=React.createClass({displayName:"MainCategoryBlockComponent",render:function(){var t=this.props.imageUrl,n="col-lg-4 col-md-4 col-sm-4 col-xs-6 mainCategoryWrapper";return this.props.colclass!=null&&(n=this.props.colclass),React.createElement("div",{className:n},React.createElement("a",{href:this.props.url},React.createElement("div",{className:"mainCategoryContent"},React.createElement("div",{className:"mainCategoryImage"},React.createElement("span",{className:"centerer"}),React.createElement("img",{className:"centered",src:t,alt:this.props.imageAltText})),React.createElement("h3",null,this.props.name),React.createElement("div",{className:"mainCategoryIngress"},this.props.description))))}}),StandardTopBannerComponent=React.createClass({displayName:"StandardTopBannerComponent",render:function(){return React.createElement("div",{className:"row topBanner"},React.createElement("div",{className:"col-md-12"},React.createElement("h1",{className:"topBanner__title"},this.props.title),React.createElement("div",{className:"topBanner__preamble"},this.props.preamble)))}}),ServiceBlockComponent=React.createClass({displayName:"ServiceBlockComponent",render:function(){var n=this.props.imageUrl;return React.createElement("div",{className:"serviceblockouter"},React.createElement("a",{href:this.props.url},React.createElement("div",{className:"serviceBlockWrapper"},React.createElement("div",{className:"serviceBlockImage"},React.createElement("span",{className:"centerer"}),React.createElement("img",{className:"centered",src:n})),React.createElement("h1",null,this.props.title),React.createElement("div",{className:"serviceBlockIngress"},this.props.description))),React.createElement("div",{className:"col-md-4 col-md-offset-4 col-sm-4 col-sm-offset-4 col-xs-4 col-xs-offset-4 serviceBlockBottomBorder"}))}}),ThemeBlockComponent=React.createClass({displayName:"ThemeBlockComponent",render:function(){var n={backgroundImage:"url("+this.props.imageUrl+")"};return React.createElement("div",{className:this.props.bootstrapclass+" themeBlockContainer"},React.createElement("div",{className:"themeBlockWrapper",style:n},React.createElement("h1",null,this.props.title),React.createElement("div",{className:"themeBlockDescription"},this.props.description),React.createElement("a",{className:"buttonRoundedCorners",href:this.props.url},this.props.buttontext)))}}),ProductTeaserBlockComponent=React.createClass({displayName:"ProductTeaserBlockComponent",render:function(){var n=this.props.imageUrl;return React.createElement("div",{className:this.props.bootstrapclass+" productTeaserContainer"},React.createElement("div",{className:"productTeaserWrapper"},React.createElement("div",{className:"productTeaserImage"},React.createElement("span",{className:"centerer"}),React.createElement("img",{className:"centered",src:n})),React.createElement("h1",null,this.props.title),React.createElement("div",{className:"productTeaserIngress"},this.props.description),React.createElement("div",{className:"teaserButtonWrapper"},React.createElement("a",{href:"#",className:"teaserButton"}))))}}),ContactInfoBlockComponent=React.createClass({displayName:"ContactInfoBlockComponent",render:function(){return React.createElement("div",{className:this.props.bootstrapclass+" contactInfoBlockContainer"},React.createElement("div",{className:"contactInfoBlockWrapper"},React.createElement("div",{className:"contactInfoImageWrapper"},React.createElement("img",{src:this.props.imageUrl})),React.createElement("h1",null,this.props.title),React.createElement("div",{className:"contactInfoBlockDescription"},this.props.description),React.createElement("div",{className:"contactInfoBlockPhone"},this.props.phone),React.createElement("div",{className:"contactInfoBlockEmail"},React.createElement("a",{href:"mailto:"+this.props.email},this.props.email)),React.createElement("div",{className:"contactInfoBlockButtons"},this.props.reseller?React.createElement("form",{action:this.props.reseller.link},React.createElement("input",{type:"submit",className:"buttonSmallRoundedCorners_blue",value:this.props.reseller.buttonText})):null,this.props.request?React.createElement("form",{action:this.props.request.mailto},React.createElement("input",{name:"Subject",id:"Subject",type:"hidden",value:this.props.request.product+" "+this.props.request.variant}),React.createElement("input",{type:"submit",method:"get",className:"buttonSmallRoundedCorners_orange send_foresporsel",value:this.props.request.buttonText})):null)))}}),FrontPageSearchField=React.createClass({displayName:"FrontPageSearchField",getInitialState:function(){return{searchFieldText:""}},componentDidMount:function(){axios.post("/api/language/GetLocalizedStrings",{strings:["/general/labels/searchFieldFrontPage"]},{responseType:"json"}).then(function(n){this.setState({searchFieldText:n.data[0]})}.bind(this)).catch(function(){}.bind(this))},render:function(){return React.createElement("div",{className:"row"},React.createElement("div",{className:"col-md-8 col-md-offset-2"},React.createElement("div",{className:"col-md-10 col-md-offset-1"},React.createElement("div",{className:"searchFieldWrapper"},React.createElement(SearchInput,{className:"searchFieldTextBox",pathSearchPage:this.props.pathSearchPage,name:"q",minStrLength:2,placeholder:this.state.searchFieldText})))))}}),NotFoundPageSearchField=React.createClass({displayName:"NotFoundPageSearchField",getInitialState:function(){return{searchFieldText:""}},componentDidMount:function(){},render:function(){return React.createElement("div",{className:"row"},React.createElement("div",{className:"col-md-8 col-md-offset-2"},React.createElement("div",{className:"searchFieldWrapper"},React.createElement(SearchInput,{className:"searchFieldTextBox",pathSearchPage:this.props.pathSearchPage,name:"q",minStrLength:2,placeholder:this.props.searchFieldText}))))}}),SearchField=React.createClass({displayName:"SearchField",update:function(n){var t=n.target.value;this.props.onUpdate(t)},render:function(){return React.createElement("div",{className:this.props.bootstrapclass},React.createElement("div",{className:"searchFieldWrapper"},React.createElement("input",{type:"text",className:"searchFieldTextBox",placeholder:this.props.placeholder,onChange:this.update}),React.createElement("span",{className:"searchFieldIcon"})))}}),DocumentList=React.createClass({displayName:"DocumentList",getDocumentListItems:function(){var t=[],n;for(i in this.props.documents)n=this.props.documents[i],t.push(React.createElement("li",{key:i},React.createElement("a",{href:n.ContentUrl,target:"_blank",className:"documentLink"},n.Title)));return t},render:function(){return this.props.documents==null?null:React.createElement("ul",{className:"documentList"},this.getDocumentListItems())}}),Accordion=React.createClass({displayName:"Accordion",handleClick:function(n){n.preventDefault();this.state.open?this.setState({open:!1,"class":"accordion"}):this.setState({open:!0,"class":"accordion open"})},getSlug:function(){return"#"+this.props.title.toLowerCase().replace("æ","ae").replace("ä","ae").replace("ö","oe").replace("ø","oe").replace("å","aa").replace(/[^\w ]+/g,"").replace(/ +/g,"-")},getInitialState:function(){return{open:!1,"class":"accordion"}},componentWillMount:function(){this.getSlug()===window.location.href.slice(window.location.href.lastIndexOf("#"))&&(this.props.openOnMount="true");this.props.openOnMount==="true"&&this.setState({open:!0,"class":"accordion open"})},render:function(){return React.createElement("div",{className:this.state.class},React.createElement("button",{onClick:this.handleClick},"toggle"),React.createElement("a",{href:this.getSlug(),className:"accordionhead",onClick:this.handleClick},this.props.title),React.createElement("div",{className:"accordionwrap"},React.createElement("div",{id:this.getSlug(),className:"accordioncontent"},this.props.children)))}}),AccordionResellers=React.createClass({displayName:"AccordionResellers",handleClick:function(){this.state.open?this.setState({open:!1,"class":"accordion"}):this.setState({open:!0,"class":"accordion open"})},getInitialState:function(){return{open:!1,"class":"accordion"}},componentWillMount:function(){this.props.open&&this.setState({open:!0,"class":"accordion open"})},componentWillReceiveProps:function(n){n.open&&this.setState({open:!0,"class":"accordion open"})},render:function(){return React.createElement("div",{className:this.state.class},React.createElement("button",{onClick:this.handleClick},React.createElement("span",{className:"toggle-text"},"toggle")),React.createElement("div",{className:"accordionhead",id:"reseller-"+this.props.id,onClick:this.handleClick},React.createElement("div",{className:"col-lg-4 col-sm-6 col-xs-12 accordionheadname"},this.props.name),React.createElement("div",{className:"col-lg-2 col-sm-6 col-xs-12 accordionheadcity"},this.props.city),React.createElement("div",{className:"col-lg-6 col-sm-12 col-xs-12 accordionheaddealertype"},this.props.dealertype)),React.createElement("div",{className:"accordionwrap"},React.createElement("div",{className:"accordioncontent"},this.props.children)))}}),DropDownList=React.createClass({displayName:"DropDownList",getInitialState:function(){return{selectValue:[]}},componentWillMount:function(){var n=this.props.initialValue==null?[]:this.props.initialValue;this.setState({selectValue:n})},update:function(n){var t=n.target.value,i=n.target.options[n.target.selectedIndex].text;this.props.onUpdate(t,i);this.setState({selectValue:t})},render:function(){var i=[],n,t;if(this.props.data!=null)for(n=0;n<this.props.data.length;n++)t=this.props.data[n],i.push(React.createElement("option",{key:n,value:parseInt(t[this.props.valueField]),name:t[this.props.nameField]},t[this.props.nameField]));return React.createElement("select",{className:"commonDropdown",value:this.state.selectValue,onChange:this.update,disabled:this.props.disabled},i)}}),DropDownListVariants=React.createClass({displayName:"DropDownListVariants",getInitialState:function(){return{listVisible:!1,display:"",selectValue:[],firstRun:!0}},componentDidMount:function(){var n=this.props.initialValue==null?[]:this.props.initialValue;this.setState({selectValue:n})},componentWillReceiveProps:function(){if(this.state.firstRun&&this.props.initialValue.ItemNumber!==undefined){var n=this.props.initialValue==null?[]:this.props.initialValue;this.setState({selectValue:n});this.setState({firstRun:!1})}},select:function(n){this.setState({selectValue:n});this.props.onUpdate(n)},show:function(){this.setState({listVisible:!0});document.addEventListener("click",this.hide)},hide:function(){this.setState({listVisible:!1});document.removeEventListener("click",this.hide)},render:function(){var n;return n=this.state.selectValue.ItemNumber==null?React.createElement("span",null):React.createElement("span",{className:"ddVariantNr largeOnly"},"Art.nr ",this.state.selectValue.ItemNumber),React.createElement("div",{className:"dropdown-container"+(this.state.listVisible?" show":"")},React.createElement("div",{className:"dropdown-display"+(this.state.listVisible?" clicked":""),onClick:this.show},React.createElement("span",{className:"ddVariantName"},this.state.selectValue.DisplayName,n),React.createElement("i",{className:"fa fa-angle-down"})),React.createElement("div",{className:"dropdown-list"},React.createElement("div",null,this.renderListItems())))},renderListItems:function(){for(var n,i=[],r,t=0;t<this.props.data.length;t++)n=this.props.data[t],r=n.ItemNumber==null?React.createElement("span",null):React.createElement("span",{className:"ddVariantNr largeOnly"},"Art.nr ",n.ItemNumber),i.push(React.createElement("div",{key:t,onClick:this.select.bind(null,n)},React.createElement("span",{className:"ddVariantName"},n.DisplayName,r),React.createElement("i",{className:"fa fa-check"})));return i}}),ImageGallery=React.createClass({displayName:"ImageGallery",getInitialState:function(){return{images:this.props.images,selectedImage:null,selectedImageIndex:"0",thumbListIndex:0,imagesToShow:null,selectedNewsLabel:""}},componentWillReceiveProps:function(){this.setState({selectedImage:null,selectedImageIndex:"0"})},handleThumbClick:function(n){this.setState({selectedImage:this.props.images[n],selectedImageIndex:n})},handleScrollClick:function(){var r,n,t,u;this.setState({imagesToShow:[]});r=[];n=this.state.thumbListIndex+1;n>=this.props.images.length&&(n=0);this.setState({thumbListIndex:n});t=n;for(i in this.props.images)u=this.props.images[t],r.push({image:u}),t++,t===this.props.images.length&&(t=0);this.setState({imagesToShow:r})},handeSpinClickRight:function(){var n,t,r,u;this.setState({imagesToShow:[]});n=[];t=this.state.thumbListIndex+1;t>=this.props.images.length&&(t=0);this.setState({thumbListIndex:t});r=t;for(i in this.props.images)u=this.props.images[r],n.push({image:u}),r++,r===this.props.images.length&&(r=0);this.setState({imagesToShow:n});this.setState({selectedImage:n[0].image,selectedImageIndex:n[0].image.index})},handeSpinClickLeft:function(){var n,t,r,u;this.setState({imagesToShow:[]});n=[];t=this.state.thumbListIndex-1;t<0&&(t=this.props.images.length-1);this.setState({thumbListIndex:t});r=t;for(i in this.props.images)u=this.props.images[r],n.push({image:u}),r--,r<0&&(r=this.props.images.length-1);this.setState({imagesToShow:n});this.setState({selectedImage:n[0].image,selectedImageIndex:n[0].image.index})},isActive:function(n){return n===this.state.selectedImageIndex?"active":""},getThumbs:function(){var n,f;if(this.props.images!=null&&this.props.images.length!=0){var r=[],t=this.props.images.length,u=0;if(u=t>4?3:t,this.state.imagesToShow==null)for(i in this.props.images)this.props.images[i].index=i;for(i=0;i<u;i++)n=this.state.imagesToShow!=null?this.state.imagesToShow[i].image:this.props.images[i],f=n.DocumentType=="LinkFilmCarousel"?React.createElement("img",{className:"thumbImage centered",title:n.Title!==null?n.Title:"Video",src:n.ContentUrl,alt:n.Title!==null?n.Title:"Video"}):React.createElement("img",{className:"thumbImage centered",title:n.CmHeader?n.CmHeader:n.AlternativeText,src:n.ContentUrl,alt:n.AlternativeText}),n.DocumentType=="LinkFilmCarousel"&&n.Description==null?null:r.push(React.createElement("div",{key:n.index,className:this.isActive(n.index)+" col-lg-12 col-sm-3 col-xs-3 imageThumb",onClick:this.handleThumbClick.bind(this,n.index)},React.createElement("div",{className:"imageThumbContainer"},React.createElement("div",{className:"imageThumbWrapper"},React.createElement("span",{className:"centerer"}),f))));return t>4&&r.push(React.createElement("div",{key:t+1,className:"imageThumb col-lg-12 col-sm-3 col-xs-3",onClick:this.handleScrollClick},React.createElement("div",{className:"imageThumbScrollContainer"},React.createElement("div",{className:"imageThumbWrapper"},React.createElement("span",{className:"centerer"}),React.createElement("img",{className:"thumbImage centered",title:this.props.productName,src:"/Static/Images/Icons/pil_right.png",alt:"navigation arrow"}))))),r}},getMainImage:function(){if(this.props.images!=null&&this.props.images.length!=0){if(this.state.selectedImage==null)return React.createElement("a",{href:this.props.images[0].ContentUrl.split("?")[0],target:"_blank"},React.createElement("img",{className:"productMainImage",title:this.props.images[0].CmHeader,src:this.props.images[0].ContentUrl,alt:this.props.images[0].AlternativeText}));if(this.state.selectedImage.DocumentType=="LinkFilmCarousel"){var n=this.state.selectedImage.Description,t=n.replace("https://www.youtube.com/watch?v=","https://www.youtube.com/embed/").replace("&feature=youtu.be","");return React.createElement("iframe",{src:t,frameborder:"0",allowFullScreen:!0})}return React.createElement("a",{href:this.state.selectedImage.ContentUrl.split("?")[0],target:"_blank"},React.createElement("img",{className:"productMainImage",title:this.state.selectedImage.CmHeader,src:this.state.selectedImage.ContentUrl,alt:this.state.selectedImage.AlternativeText}))}},render:function(){var n;return n=this.props.selectedNewsLabel==null||this.props.selectedNewsLabel==""?"":React.createElement("span",{className:"galleryNewsLabel"},this.props.selectedNewsLabel),React.createElement("div",{className:"productImageGalleryContainer"},React.createElement("div",{className:"row"},React.createElement("div",{className:"productImageContainer col-lg-10 col-md-12"},React.createElement("div",{className:"imageArrowLeft",onClick:this.handeSpinClickLeft},React.createElement("div",{className:"spinLeft"})),React.createElement("div",{className:"productImageWrapper"},n,React.createElement("span",{className:"centerer"}),this.getMainImage()),React.createElement("div",{className:"imageArrowRight",onClick:this.handeSpinClickRight},React.createElement("div",{className:"spinRight"}))),React.createElement("div",{className:"col-lg-2 col-md-12 u-no-padding"},this.getThumbs())))}}),NavMenu=function(n){function t(n){_classCallCheck(this,t);var i=_possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,n));return i.state={mobileMenu:!1,searchFieldText:""},i}return _inherits(t,n),_createClass(t,[{key:"componentDidMount",value:function(){var t=this.refs.catalogMenu,i=window.getComputedStyle(t,null).getPropertyValue("display"),n;i=="none"&&this.setState({mobileMenu:!0});n=["/general/labels/searchFieldNavMenu"];axios.post("/api/language/GetLocalizedStrings",{strings:n},{responseType:"json"}).then(function(n){this.setState({searchFieldText:n.data[0]})}.bind(this)).catch(function(){}.bind(this))}},{key:"toggleMenu",value:function(n){var r;if(n.preventDefault(),r=this.findAncestor(n.target,"mainList-item"),!(r.childNodes.length<2)){var u=r.getElementsByClassName("secondLevelList")[0],f=window.getComputedStyle(u,null).getPropertyValue("display"),t=null,i="";f=="block"?(u.style.display="none",t=r.getElementsByClassName("arrowDown")[0],t!=null&&(i=t.className,i=i.replace("arrowDown","arrowRight"))):(u.style.display="block",t=r.getElementsByClassName("arrowRight")[0],t!=null&&(i=t.className,i=i.replace("arrowRight","arrowDown")));t!=null&&(t.className=i)}}},{key:"findAncestor",value:function(n,t){while((n=n.parentElement)&&!n.classList.contains(t));return n}},{key:"render",value:function(){var n=this,i={display:"none"},r=this.props.menuIsOpen?"navMenuWrapper menuOpen":"navMenuWrapper menuClosed",t=this.props.footer,u=t.facebook,f=t.gpluss,e=t.linkedin,o=t.instagram,s=t.youtube;return React.createElement("div",{className:r},React.createElement("div",{className:"container-fluid "},React.createElement("div",{className:"row"},React.createElement("div",{className:"col-sm-12"},React.createElement("div",{className:"searchFieldWrapper smallOnly"},React.createElement("div",{className:"row"},React.createElement("div",{className:"col-sm-12"},React.createElement(SearchInput,{pathSearchPage:this.props.pathSearchPage,name:"q",minStrLength:2,placeholder:this.state.searchFieldText})))),React.createElement("nav",{className:"navMenu col-sm-12 col-md-12"},React.createElement("ul",{className:"mainList"},React.createElement("li",{className:"col-sm-6 col-md-4"},React.createElement("div",{key:"productsListTitle",className:"mainList-item"},React.createElement("a",{href:"#",className:"",onClick:this.toggleMenu.bind(this)},React.createElement("span",{className:"link-level1"},this.props.localizedStrings.products),React.createElement("span",{className:this.state.mobileMenu==!0?"arrowRight":"arrowDown"})),React.createElement("ul",{style:i,className:this.state.mobileMenu==!0?"mobileMenu secondLevelList":"secondLevelList",ref:"catalogMenu"},React.createElement("li",{className:"secondLevelList-item"},React.createElement("a",{href:this.props.catalogRoot.LinkUrl},React.createElement("span",{className:"link-level2"},this.props.localizedStrings.seeAll))),this.props.mainMenuNodes.map(function(n){return React.createElement("li",{key:n.DisplayText,className:"secondLevelList-item"},React.createElement("a",{href:n.LinkUrl},React.createElement("span",{className:"link-level2"},n.DisplayText)))})))),this.props.mainMenuCMSNodes.map(function(t,r){return React.createElement("li",{key:r,className:"col-sm-6 col-md-4"},React.createElement("div",{className:"mainList-item"},t.Url!=null?React.createElement("a",{href:t.Url,className:"subMenuOpen"},React.createElement("span",{className:"link-level1"},t.Name),t.SubMenuItems.length>0&&React.createElement("span",{className:n.state.mobileMenu==!0?"arrowRight":"arrowRight"})):React.createElement("a",{href:"#",className:"subMenuOpen",onClick:n.toggleMenu.bind(n)},React.createElement("span",{className:"link-level1"},t.Name),t.SubMenuItems.length>0&&React.createElement("span",{className:n.state.mobileMenu==!0?"arrowRight":"arrowRight"})),t.SubMenuItems.length>0&&React.createElement("ul",{style:i,className:n.state.mobileMenu==!0?"mobileMenu secondLevelList":"secondLevelList"},t.SubMenuItems.map(function(n){return React.createElement("li",{key:n.Name,className:"secondLevelList-item"},React.createElement("a",{href:n.Url},React.createElement("span",{className:"link-level2"},n.Name)))}))))}))),React.createElement("div",{className:"col-sm-12 col-md-6"},React.createElement("div",{className:"col-xs-12 col-sm-6 col-md-12 smallOnly languagesColumn"},React.createElement("div",{className:"languagesWrapper smallOnly"},React.createElement("p",{className:"languagesText"},this.props.localizedStrings.language),React.createElement("img",{src:"/Static/Images/SVG/flag_norway.svg",onClick:function(){return n.props.onSetLanguage("no")}}),React.createElement("img",{src:"/Static/Images/SVG/flag_sweden.svg",onClick:function(){return n.props.onSetLanguage("sv")}}),React.createElement("img",{src:"/Static/Images/SVG/flag_uk.svg",onClick:function(){return n.props.onSetLanguage("en")}}))))))))}}]),t}(React.Component);NavMenu.propTypes={};var FactBox=function(n){return React.createElement("section",{className:"factBox"},React.createElement("h1",null,n.title),React.createElement("ul",null,n.factlist.map(function(n,t){return React.createElement("li",{key:t},n)})))},ArticleSharer=function(n){function t(){var r,u,n,f;_classCallCheck(this,t);for(var e=arguments.length,o=Array(e),i=0;i<e;i++)o[i]=arguments[i];return f=(u=(n=_possibleConstructorReturn(this,(r=Object.getPrototypeOf(t)).call.apply(r,[this].concat(o))),n),n.state={isOpen:!1},n.toggleOpen=function(){n.setState({isOpen:!n.state.isOpen})},u),_possibleConstructorReturn(n,f)}return _inherits(t,n),_createClass(t,[{key:"render",value:function(){return React.createElement("div",{className:"articleSharer",onClick:this.toggleOpen},React.createElement("img",{src:"/static/Images/Icons/share-icon.png",alt:"Share this article"}),React.createElement("span",{className:"articleSharer-text"},this.props.shareText),this.state.isOpen&&React.createElement("div",{className:"ShareThisWrapper"},React.createElement(FacebookShareButton,{url:this.props.shareUrl,title:this.props.heading}),React.createElement(TwitterShareButton,{url:this.props.shareUrl,text:this.props.heading}),React.createElement(EmailShareButton,{subject:this.props.emailsharesubject,url:this.props.shareUrl,body:this.props.emailsharebody})))}}]),t}(React.Component),MainImage=function(n){return React.createElement("img",{className:"mainImage",src:n.src,alt:"Image"})},ImageWithCaption=function(n){return React.createElement("figure",{className:"imageWithCaption"},React.createElement("img",{src:n.imageSrc,alt:n.imageAltText?n.imageAltText:""}),React.createElement("figcaption",null,n.imageCaption))},ThemePageLink=function(n){return React.createElement("div",{className:"themePageLink"},React.createElement("a",{href:n.linkUrl},React.createElement("div",{className:"imgWrapper"},React.createElement("img",{src:n.imageSrc,alt:""})),React.createElement("h4",null,n.heading),React.createElement("p",null,n.text)))},Article=function(n){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,Object.getPrototypeOf(t).apply(this,arguments))}return _inherits(t,n),_createClass(t,[{key:"render",value:function(){var n=this.props,f=n.emailsharesubject,e=n.emailsharebody,o=n.shareUrl,c=n.url,t=n.mainImageSrc,i=n.heading,s=n.preamble,h=n.textBox1,r=n.textBox2,l=n.textBox3,a=n.quote,v=n.factBox,y=n.imageWithCaption,u=n.themePageLinks;return React.createElement("section",{className:"articleWrapper"},React.createElement("article",{className:"article"},t&&React.createElement("div",{className:"row"},React.createElement("div",{className:"col-md-12"},React.createElement(MainImage,{src:t}))),React.createElement(StandardTopBannerComponent,{title:i,preamble:s}),React.createElement("div",{className:"row articleBody"},React.createElement("div",{className:"col-md-12"},React.createElement("p",{className:"articleTextBox articleTextBox1",dangerouslySetInnerHTML:{__html:h}}))),React.createElement("div",{className:"row articleContentAreaRow"},React.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.contentArea1}})),r&&React.createElement("div",{className:"row articleBody"},React.createElement("div",{className:"col-md-12"},React.createElement("p",{className:"articleTextBox articleTextBox2",dangerouslySetInnerHTML:{__html:r}}))),React.createElement("div",{className:"row articleContentAreaRow"},React.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.contentArea2}})),React.createElement("div",{className:"row articleContentAreaRow extraMargin"},React.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.accordions}})),React.createElement("div",{className:"row"},React.createElement("div",{className:"col-md-12"},React.createElement(ArticleSharer,{emailsharesubject:f,emailsharebody:e,shareUrl:o,heading:i,shareText:this.props.shareText})))),u&&React.createElement("div",{className:"row themePageLinksWrapper"},u.map(function(n,t){return React.createElement("div",{className:"col-sm-4",key:"pageLink"+t},React.createElement(ThemePageLink,n))})))}}]),t}(React.Component);Article.propTypes={url:React.PropTypes.string,mainImageSrc:React.PropTypes.string.isRequired,heading:React.PropTypes.string.isRequired,preamble:React.PropTypes.string.isRequired,textBox1:React.PropTypes.string.isRequired,textBox2:React.PropTypes.string,themePageLinks:React.PropTypes.array,contentArea1:React.PropTypes.string,contentArea2:React.PropTypes.string,accordions:React.PropTypes.string};ArticleTeaser=function(n){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,Object.getPrototypeOf(t).apply(this,arguments))}return _inherits(t,n),_createClass(t,[{key:"render",value:function(){return React.createElement("div",{className:this.props.columnClassName?this.props.columnClassName:""},React.createElement("article",{className:"articleTeaserWrapper"},React.createElement("a",{href:this.props.url,target:this.props.target},React.createElement("div",{className:"image-wrap"},React.createElement("img",{src:this.props.imageSrc,alt:""})),React.createElement("h4",{className:"articleTitle"},this.props.headline),React.createElement("p",{className:"teaserText"},React.createElement(Truncate,{ellipsis:React.createElement("span",null,"... ",React.createElement("strong",null,this.props.showMore)),lines:5},this.props.teaserText)))))}}]),t}(React.Component);ArticleTeaser.propTypes={columnClassName:React.PropTypes.string,url:React.PropTypes.string.isRequired,imageSrc:React.PropTypes.string.isRequired,headline:React.PropTypes.string.isRequired,teaserText:React.PropTypes.string.isRequired,showMore:React.PropTypes.string.isRequired};var FacebookShareButton=function(n){var r=n.url,u=n.title,t=n.shareTitle,i=t===undefined?"Share on Facebook":t,f=encodeURIComponent(r),e=encodeURIComponent(u);return React.createElement("a",{href:"https://www.facebook.com/sharer/sharer.php?u="+f+"&t="+e,title:i,target:"_blank"},React.createElement("img",{width:"40",alt:i,src:"/../../Static/Images/SVG/Facebook.svg"}))},TwitterShareButton=function(n){var t=n.url,u=n.text,i=n.shareTitle,r=i===undefined?"Share on Twitter":i,f=encodeURIComponent(t),e=encodeURIComponent(u+": "+t);return React.createElement("a",{href:"https://twitter.com/intent/tweet?source="+f+"&text="+e,title:r,target:"_blank"},React.createElement("img",{width:"40",alt:r,src:"/../../Static/Images/SVG/Twitter.svg"}))},EmailShareButton=function(n){var t=n.url,u=n.subject,f=n.body,i=n.shareTitle,r=i===undefined?"Send email":i,s=encodeURIComponent(t),e=encodeURIComponent(u),o=encodeURIComponent(f+": "+t);return React.createElement("a",{href:"mailto:?subject="+e+"&body="+o,title:r,target:"_blank"},React.createElement("img",{width:"40",alt:r,src:"/../../Static/Images/SVG/Email.svg"}))},LocalizedText=React.createClass({displayName:"LocalizedText",getInitialState:function(){return{text:""}},componentDidMount:function(){axios.get("/api/language/GetLocalizedString",{params:{key:this.props.xpath}},{responseType:"json"}).then(function(n){this.setState({text:n.data})}.bind(this)).catch(function(){}.bind(this))},render:function(){return React.createElement("span",null,this.state.text)}}),GoogleMapsComponent=React.createClass({displayName:"GoogleMapsComponent",getInitialState:function(){return{userlat:0,userlng:0,destinationlat:0,destinationlng:0,markers:[],map:null,usermarker:null,usercircle:null,markerCluster:null,defaultLatNor:this.props.mapcenterlatitudenorway,defaultLngNor:this.props.mapcenterlongitudenorway,defaultLatSwe:this.props.mapcenterlatitudesweden,defaultLngSwe:this.props.mapcenterlongitudesweden,defaultLat:59.4773211,defaultLng:11.669004,circle:null}},componentDidMount:function(){navigator.geolocation!=null?navigator.geolocation.getCurrentPosition(this.userPosSuccess,this.userPosError):(this.createDefaultLocation(),this.createMapAndMarkers())},componentDidUpdate:function(n){n&&this.props.pageStrings!==n.pageStrings&&this.createMapAndMarkers()},createDefaultLocation:function(){},createMapAndMarkers:function(){this.markerCluster!=null&&this.markerCluster.clearMarkers();this.map=this.createMap();this.markers=this.createMarkers();this.usermarker=this.createMarker();mcOptions={imagePath:"/static/images/maps/m"};this.markerCluster=new MarkerClusterer(this.map,this.markers,mcOptions)},userPosSuccess:function(n){this.setState({userlat:n.coords.latitude});this.setState({userlng:n.coords.longitude});this.createMapAndMarkers()},userPosError:function(){this.createDefaultLocation();this.createMapAndMarkers()},createRoute:function(n,t){this.setState({destinationlat:n});this.setState({destinationlng:t});navigator.geolocation!=null&&navigator.geolocation.getCurrentPosition(this.startPosSuccess,this.startPosError)},startPosSuccess:function(n){var i=new google.maps.LatLng(n.coords.latitude,n.coords.longitude),r=new google.maps.LatLng(this.state.destinationlat,this.state.destinationlng),u=new google.maps.DirectionsService,t=new google.maps.DirectionsRenderer;this.map=this.createMap();this.usermarker=this.createMarker();t.setMap(this.map);u.route({origin:i,destination:r,travelMode:"DRIVING"},function(n,i){i==="OK"&&t.setDirections(n)})},startPosError:function(){console.log("startPos error")},createMap:function(){if(this.map!=null)return this.map;var t={mapTypeId:"roadmap",zoom:7,center:this.mapCenterByDomain()},n=new google.maps.Map(this.refs.mapCanvas,t);return n.setOptions({styles:{"default":null,hide:[{featureType:"poi",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"labels.icon",stylers:[{visibility:"off"}]}]}.hide}),n},mapCenterByDomain:function(){if(this.state.userlng==0){var n=window.location.hostname.slice(-2);return n.toLowerCase()==="no"?new google.maps.LatLng(this.state.defaultLatNor,this.state.defaultLngNor):n.toLowerCase()==="se"?new google.maps.LatLng(this.state.defaultLatSwe,this.state.defaultLngSwe):new google.maps.LatLng(this.state.defaultLat,this.state.defaultLng)}return new google.maps.LatLng(this.state.userlat,this.state.userlng)},mapCenter:function(){return this.state.userlng==0?new google.maps.LatLng(this.state.defaultLat,this.state.defaultLng):new google.maps.LatLng(this.state.userlat,this.state.userlng)},createMarker:function(){return new google.maps.Marker({position:new google.maps.LatLng(this.state.userlat,this.state.userlng),icon:"../../../Static/Images/Icons/ic_room_red_24px.png",map:this.map})},createCircle:function(){return new google.maps.Circle({strokeColor:"#009fe3",strokeOpacity:.8,strokeWeight:2,fillColor:"#009fe3",fillOpacity:.2,map:this.map,center:{lat:this.state.userlat,lng:this.state.userlng},radius:5e4})},createCircleByArguments:function(n,t,i){return new google.maps.Circle({strokeColor:"#009fe3",strokeOpacity:.8,strokeWeight:2,fillColor:"#009fe3",fillOpacity:.2,map:this.map,center:{lat:t,lng:i},radius:n})},setMapOnAll:function(n){for(var t=0;t<this.markers.length;t++)this.markers[t].setMap(n)},createMarkers:function(){var i=this,r=this.markers,o,n,f,e;for(r!=null&&this.setMapOnAll(null),r=[],o=this.props,n=0;n<this.props.resellers.length;n++){var s=this.props.resellers[n].DealerId,u=null,t="<div class='InfoWindow'><div class='header'>";this.props.resellers[n].IsReseller&&(t=t+this.props.pageStrings.retailer+"<br/>");this.props.resellers[n].IsProfPartner&&(t=t+this.props.pageStrings.certifiedPartner+"<br/>");this.props.resellers[n].IsServiceCompany&&(t=t+this.props.pageStrings.serviceCompany+"<br/>");this.props.resellers[n].IsEcoNordicPartner&&(t=t+this.props.pageStrings.ecoNordicPartner);t=t+"<\/div>";t=t+"<div class='name'>"+this.props.resellers[n].Name+"<\/div>";t=t+"<div class='address'>";this.props.resellers[n].HasStreetAddress&&(t=t+this.props.resellers[n].StreetAddress+"<br/>");this.props.resellers[n].HasPostCode&&(t=t+this.props.resellers[n].PostCode+"&nbsp;");this.props.resellers[n].HasCity&&(t=t+this.props.resellers[n].City+"<br/>");this.props.resellers[n].HasOfficePhone&&(t=t+"<i class='fa fa-phone' style='margin-right:5px;' ><\/i><a href='tel:"+this.props.resellers[n].OfficePhone+"'>"+this.props.resellers[n].OfficePhone+"<\/a><br/>");this.props.resellers[n].HasPhone&&(t=t+"<i class='fa fa-phone' style='margin-right:5px;' ><\/i><a href='tel:"+this.props.resellers[n].HasPhone+"'>"+this.props.resellers[n].Phone+"<\/a><br/>");this.props.resellers[n].HasEmail&&(t=t+"<a href='mailto:"+this.props.resellers[n].Email+"'>"+this.props.resellers[n].Email+"<\/a><br/>");this.props.resellers[n].HasWebSite&&(t=t+"<a target='_blank' href='"+this.props.resellers[n].WebSiteFormatted+"'>"+this.props.resellers[n].WebSite+"<\/a><br/>");this.props.resellers[n].HasContactPersons&&(t=t+"<br/>"+this.props.pageStrings.contactperson+":<br/>",this.props.resellers[n].ContactPersons.forEach(function(r,u){t=t+i.props.resellers[n].ContactPersons[u].Name+"<br/>";t=t+"<i class='fa fa-phone' style='margin-right:5px;' ><\/i><a href='tel:"+i.props.resellers[n].ContactPersons[u].Phone+"'>"+i.props.resellers[n].ContactPersons[u].Phone+"<\/a><br/>";t=t+"<a href='mailto:"+i.props.resellers[n].ContactPersons[u].Email+"'>"+i.props.resellers[n].ContactPersons[u].Email+"<\/a><br/><br/>"}));t=t+"<br/> <a target='_blank' href='"+this.props.resellers[n].GoogleMapsDirectionUrl+"&origin="+this.state.userlat+","+this.state.userlng+"'>"+this.props.pageStrings.showWay+"<\/a>";f=document.createElement("div");f.innerHTML=t;e=new google.maps.InfoWindow;this.props.resellers[n].Latitude!="unknown"&&(u=new google.maps.Marker({position:new google.maps.LatLng(this.props.resellers[n].Latitude,this.props.resellers[n].Longitude),map:this.map,icon:this.props.resellers[n].MapIcon,title:this.props.resellers[n].Name}),r.push(u));u!=null&&google.maps.event.addListener(u,"click",function(n,t,i){return function(){google.maps.event.addListener(i,"closeclick",function(){n.setIcon("../../../Static/Images/SVG/place_blue.svg")});google.maps.event.addListener(this.map,"click",function(){i.close()});i.setContent(t);i.open(this.map,n);n.setIcon("../../../Static/Images/SVG/place_blue.svg")}}(u,f,e))}return this.setState({markers:r}),r},closestReseller:function(){var e=this.state.userlat,o=this.state.userlng,f=[],n=-1,t,r,u;for(i=0;i<this.state.markers.length;i++)t=this.state.markers[i].position.lat(),isNaN(t)&&(t=0),r=this.state.markers[i].position.lng(),isNaN(r)&&(r=0),u=this.getDistance(e,o,t,r),f[i]=u,(n==-1||u<f[n])&&(n=i);n>-1&&(this.map.zoom=9,this.state.circle!=null&&this.state.circle.setMap(null),this.setState({circle:this.createCircle()},function(){this.map.setCenter(this.state.markers[n].getPosition());google.maps.event.trigger(this.state.markers[n],"click")}))},getDistance:function(n,t,i,r){var u=this.rad(i-n),f=this.rad(r-t),e=Math.sin(u/2)*Math.sin(u/2)+Math.cos(this.rad(n))*Math.cos(this.rad(i))*Math.sin(f/2)*Math.sin(f/2),o=2*Math.atan2(Math.sqrt(e),Math.sqrt(1-e));return 6371*o},updateMap:function(n,t,i,r){i=typeof i!="undefined"?i:!1;this.markerCluster!=null&&this.markerCluster.clearMarkers();this.map=this.createMap();this.markers=this.createMarkers();this.state.circle!=null&&this.state.circle.setMap(null);!r||isNaN(r.radius)||isNaN(r.lat)||isNaN(r.lng)||this.setState({circle:this.createCircleByArguments(r.radius,r.lat,r.lng)},function(){this.setCenter(r.lat,r.lng)});t?this.usermarker=this.createMarker():this.markers!=null&&this.markers.length>0&&i&&(this.map.setCenter(this.markers[0].getPosition()),this.map.zoom=9);mcOptions={imagePath:"/static/images/maps/m"};this.markerCluster=new MarkerClusterer(this.map,this.markers,mcOptions)},setCenter:function(n,t){var i=this.state.markers.filter(function(i){var r=i.getPosition().lat().toFixed(7),u=i.getPosition().lng().toFixed(7),f=n.toFixed(7),e=t.toFixed(7);return r==f&&u==e?!0:!1})[0];this.map.setCenter(i.getPosition())},rad:function(n){return n*Math.PI/180},render:function(){return React.createElement("div",{id:"gmap",className:"GMap"},React.createElement("div",{className:"GMap-canvas",ref:"mapCanvas"}))}}),LocationTypeDropDownList=React.createClass({displayName:"LocationTypeDropDownList",getInitialState:function(){return{selectValue:[]}},componentWillMount:function(){var n=this.props.initialValue==null?[]:this.props.initialValue;this.setState({selectValue:n})},update:function(n){var t=n.target.value,i=n.target.options[n.target.selectedIndex].text;this.props.onUpdate(t,i);this.setState({selectValue:t})},render:function(){var i=[],n,t;if(this.props.data!=null)for(n=0;n<this.props.data.length;n++)t=this.props.data[n],i.push(React.createElement("option",{key:n,value:parseInt(t[this.props.valueField]),name:t[this.props.nameField]},t[this.props.nameField]));return React.createElement("select",{className:this.props.cssclass,value:this.state.selectValue,onChange:this.update,disabled:this.props.disabled},i)}}),ProductPage=React.createClass({displayName:"ProductPage",getInitialState:function(){return{product:null,variants:null,dropDownListElements:[],selectedVariant:[],imagesCollection:[],topProductImagesCollection:[],sketchesCollection:[],sparePartsCollection:[],diagramCollection:[],chooseVariantText:"",selectedNewsLabel:"",automatikk:[],accessories:[],spareparts:[],thumbnailsMovie:[],movieLinks:[],choose_model:"",technical_data:"",accordion_descriptions_text:"",accordion_diagrams:"",accordion_automatic:"",accordion_documentation:"",accordion_accessories:"",accordion_spareparts:"",accordion_articleinfo:"",accordion_movie:"",categories:[],dropDownInitIndex:0,dropdownMenuClass:"hidden",thumbnails:[],thumbnailsLarge:[],thumbnailsInitial:[],thumbnailsInitialLarge:[],resellerButtonText:"",requestButtonText:"",globlalLinks:[],noImage:[{ContentUrl:"/static/images/icons/no_image.png?mode=crop&preset=ProductPageMainImage",Description:"no image",DocumentType:"ProductImage",IsMain:!1,Title:"no image"}],loadedMovie:null,productSketch:[],techLinks:[]}},componentDidMount:function(){var n=JSON.stringify(["/productpage/select_variant_option","/productpage/choose_model","/productpage/technical_data","/productpage/accordion_descriptions_text","/productpage/accordion_diagrams","/productpage/accordion_automatic","/productpage/accordion_documentation","/productpage/accordion_accessories","/productpage/accordion_spareparts","/productpage/resellerbutton","/productpage/makerequestbutton","/productpage/accordion_movie","/productpage/accordion_articleinfo","/productpage/download"]);axios.get("/api/language/GetLocalizedStringsGet",{params:{value:n}},{responseType:"json"}).then(function(n){this.setState({chooseVariantText:n.data[0],choose_model:n.data[1],technical_data:n.data[2],accordion_descriptions_text:n.data[3],accordion_diagrams:n.data[4],accordion_automatic:n.data[5],accordion_documentation:n.data[6],accordion_accessories:n.data[7],accordion_spareparts:n.data[8],resellerButtonText:n.data[9],requestButtonText:n.data[10],accordion_movie:n.data[11],accordion_articleinfo:n.data[12],download_text:n.data[13]});this.bindData()}.bind(this)).catch(function(){}.bind(this))},bindData:function(){console.log("urL: ",this.props.url);axios.get(this.props.url,{params:{id:this.props.contentId}},{responseType:"json"}).then(function(n){if(n.data.children.unshift({DisplayName:this.state.chooseVariantText}),this.setState({product:n.data.product,variants:n.data.children,selectedVariant:n.data.children[0],imagesCollection:n.data.product.ProductImages,topProductImagesCollection:n.data.product.ProductBannerImages,selectedNewsLabel:n.data.product.CmNyheter,sketchesCollection:n.data.sketches.concat(n.data.techLinks),diagramCollection:n.data.diagrams,automatikk:n.data.automatikk,accessories:n.data.product.Accessories,spareparts:n.data.product.SpareParts,categories:n.data.otherProducts,thumbnails:n.data.thumbnails,thumbnailsLarge:n.data.thumbnailsLarge,thumbnailsInitial:n.data.thumbnails,thumbnailsInitialLarge:n.data.thumbnailsLarge,globlalLinks:n.data.globlalLinks,thumbnailsMovie:n.data.thumbnailsMovie,movieLinks:n.data.movieLinks,productSketch:n.data.sketches,techLinks:n.data.techLinks}),n.data.selectedVariant){for(var t=1;t<n.data.children.length;t++)n.data.children[t].ItemNumber===n.data.selectedVariant.ItemNumber&&this.setState({dropDownInitIndex:t});this.onUpdate(n.data.selectedVariant)}this.state.imagesCollection.length==0&&this.setState({imagesCollection:this.state.noImage})}.bind(this)).catch(function(n){console.log(n)}.bind(this))},onUpdate:function(n){var i,u,t,r;this.setState({selectedVariant:n});i=this.state.sketchesCollection;u=i.filter(function(n){return n.DocumentType!=null&&n.DocumentType.toLowerCase()=="technicaldataimage"});i=i.filter(function(n){return n.DocumentType!=null&&n.DocumentType.toLowerCase()!="technicaldataimage"});t=i.concat(this.state.techLinks);this.replaceImagesForVariant(this.state.product.ProductImages||[],n.ArticleImages||[]);n.ArticleImages!=null&&n.ArticleImages.length>0?(r=n.ArticleImages.filter(function(n){return n.DocumentType!=null&&n.DocumentType.toLowerCase()=="technicaldataimage"}),r.length>0&&(t=t.concat(r)),t=t.concat(u),this.setState({sketchesCollection:t})):(t=t.concat(this.state.productSketch),this.setState({sketchesCollection:t}));this.state.imagesCollection.length==0&&this.setState({imagesCollection:this.state.noImage});n.Accessories==null?(this.setState({accessories:this.state.product.Accessories,spareparts:this.state.product.SpareParts}),window.history.replaceState("",this.state.product.Name,this.state.product.Url)):(this.setState({accessories:this.state.product.Accessories.concat(n.Accessories),spareparts:this.state.product.SpareParts.concat(n.SpareParts)}),window.history.replaceState("",n.Name,n.Url));n.Thumbnails!=[]&&n.Thumbnails!==undefined?this.setState({thumbnails:this.state.thumbnailsInitial.concat(n.Thumbnails)}):this.setState({thumbnails:this.state.thumbnailsInitial});n.ThumbnailsLarge!==[]&&n.ThumbnailsLarge!==undefined?this.setState({thumbnailsLarge:this.state.thumbnailsInitialLarge.concat(n.ThumbnailsLarge)}):this.setState({thumbnailsLarge:this.state.thumbnailsInitialLarge})},getVariant:function(n,t,i){for(var r=0;r<t.length;r++)if(t[r][i]===n)return t[r];return-1},replaceImagesForVariant:function(n,t){var i=t,r,u;i.map(function(n){return!!n.DocumentType&&n.DocumentType.toLowerCase()}).indexOf("productimage")===-1&&(r=n.filter(function(n){return n.DocumentType!=null&&n.DocumentType.toLowerCase()==="productimage"}),r.forEach(function(n){return i.push(n)}));i.map(function(n){return!!n.DocumentType&&n.DocumentType.toLowerCase()}).indexOf("additionalimage")===-1&&(u=n.filter(function(n){return n.DocumentType!=null&&n.DocumentType.toLowerCase()==="additionalimage"}),u.forEach(function(n){return i.push(n)}));i.length===0?this.setState({imagesCollection:n}):this.setState({imagesCollection:i})},getImageGalleryImages:function(n){var t=[],u=n.filter(function(n){return n.DocumentType.toLowerCase()=="productimage"}),i,r;return u.map(function(n){return t.push(n)}),i=n.filter(function(n){return n.DocumentType.toLowerCase()=="additionalimage"}),i.map(function(n){return t.push(n)}),t.length==0&&(r=this.state.product.ProductImages.filter(function(n){return n.DocumentType.toLowerCase()=="productimage"}),r.map(function(n){return t.push(n)})),this.state.thumbnailsMovie.length>0&&this.state.thumbnailsMovie.map(function(n){return t.push(n)}),t},getColumnContent:function(n,t){return n?n+" "+t:"-"},getTechDataTables:function(){for(var s,h,e,r,t,l=this,u=[],f=[],o=0,n=0;n<this.state.selectedVariant.VariantTechData.length;n++)this.state.selectedVariant.VariantTechData[n].Title!=""&&o++;for(f.push(React.createElement("th",null)),s=this.state.selectedVariant.VariantTechData.filter(function(n){return n.Title!=""}).map(function(n){return React.createElement("th",null,n.Title)}),f.push(s),h=this.state.selectedVariant.VariantTechData[0].Data.length,e=[],n=0;n<h;n++)r=[],r.push(React.createElement("td",null,this.state.selectedVariant.VariantTechData[0].Data[n].Label)),r.push(this.state.selectedVariant.VariantTechData.filter(function(n){return n.Title!=""}).map(function(t){if(t.Data[n])return React.createElement("td",null,l.getColumnContent(t.Data[n].Value,t.Data[n].Unit))})),e.push(React.createElement("tr",null,r));for(u.push(React.createElement("table",null,React.createElement("thead",null,f),React.createElement("tbody",null,e))),n=0;n<o;n++){var i=this.state.selectedVariant.VariantTechData[n],a=React.createElement("thead",null,React.createElement("th",null),React.createElement("th",null,i.Title)),v=i.Data.length,c=[];for(t=0;t<v;t++)c.push(React.createElement("tr",null,React.createElement("td",null,i.Data[t].Label),React.createElement("td",null,i.Data[t]&&this.getColumnContent(i.Data[t].Value,i.Data[t].Unit))));u.push(React.createElement("table",{className:"mobile-table"},a,React.createElement("tbody",null,c)))}return React.createElement("div",null,u)},getTecData:function(){var n,t,i;if(this.state.selectedVariant.constructor===Array==!1){if(this.state.selectedVariant&&this.state.selectedVariant.VariantTechData)return this.getTechDataTables();if(n=[],this.state.selectedVariant.constructor===Array==!1&&(this.state.selectedVariant!=null&&this.state.selectedVariant.DisplayName!=this.state.chooseVariantText&&(t=this.state.selectedVariant.C4CmCharsetJson.filter(function(n){return n.Value!=null&&n.Value!=""}),t.map(function(t){return n.push(t)})),i=this.state.product.C4CmCharsetJson.filter(function(n){return n.Value!=null&&n.Value!=""}),i.map(function(t){return n.push(t)}),n.length>0))var r=Math.ceil(n.length/2),u=n.splice(0,r),f=u.map(function(n,t){return React.createElement("div",{key:t,className:"TechDataColumn"}," ",React.createElement("div",{key:n.smdtext,className:"leftTecData"},React.createElement("span",{className:"cmCharLabel"},n.smdtext,": "))," ",React.createElement("div",{className:"rightTecData"},React.createElement("span",{className:"cmCharLabel"},n.Value)))}),e=n.map(function(n,t){return React.createElement("div",{key:t,className:"TechDataColumn"}," ",React.createElement("div",{key:n.smdtext,className:"leftTecData"},React.createElement("span",{className:"cmCharLabel"},n.smdtext,": "))," ",React.createElement("div",{className:"rightTecData"},React.createElement("span",{className:"cmCharLabel"},n.Value)))});return React.createElement("div",null,React.createElement("div",{className:"col-md-6 col-sm-6"},f),React.createElement("div",{className:"col-md-6 col-sm-6"},e))}},haveTecData:function(){var n,t;return this.state.selectedVariant.constructor===Array==!1&&(this.state.selectedVariant!=null&&this.state.selectedVariant.DisplayName!=this.state.chooseVariantText&&(n=this.state.selectedVariant.C4CmCharsetJson.filter(function(n){return n.Value!=null&&n.Value!=""}),n.length>0)||(t=this.state.product.C4CmCharsetJson.filter(function(n){return n.Value!=null&&n.Value!=""}),t.length>0))?!0:!1},getAutomatikk:function(){var n=this.state.automatikk.slice();if(n.length>0)var t=Math.ceil(n.length/2),i=n.splice(0,t),r=i.map(function(n,t){return React.createElement("div",{key:t,className:"automaticColumn"},React.createElement("a",{href:n.ContentUrl},React.createElement("img",{className:"automatikkImage",src:n.ProductImageUrl,alt:""+n.Title}),React.createElement("span",{className:"automatikkLabel"},n.Title)),n.ItemNumber?React.createElement("span",{className:"automatikkInfo"},"Art.nr ",n.ItemNumber):"")}),u=n.map(function(n,t){return React.createElement("div",{key:t,className:"automaticColumn"},React.createElement("a",{href:n.ContentUrl},React.createElement("img",{className:"automatikkImage",src:n.ProductImageUrl,alt:""+n.Title}),React.createElement("span",{className:"automatikkLabel"},n.Title)),n.ItemNumber?React.createElement("span",{className:"automatikkInfo"},"Art.nr ",n.ItemNumber):"")});return React.createElement("div",{className:"automatikkContainer removeLeftMargin row"},React.createElement("div",{className:"col-md-6 col-sm-12 col-xs-12"},r),React.createElement("div",{className:"col-md-6 col-sm-12 col-xs-12"},u))},getAccessories:function(){var n=this.state.accessories.slice();if(n.length>0)var t=Math.ceil(n.length/2),i=n.splice(0,t),r=i.map(function(n,t){return React.createElement("div",{key:t,className:"automaticColumn"},React.createElement("a",{href:n.ContentUrl},React.createElement("img",{className:"automatikkImage",src:n.ProductImageUrl,alt:""+n.Title}),React.createElement("span",{className:"automatikkLabel"},n.Title)),n.ItemNumber?React.createElement("span",{className:"automatikkInfo"},"Art.nr ",n.ItemNumber):"")}),u=n.map(function(n,t){return React.createElement("div",{key:t,className:"automaticColumn"},React.createElement("a",{href:n.ContentUrl},React.createElement("img",{className:"automatikkImage",src:n.ProductImageUrl,alt:""+n.Title}),React.createElement("span",{className:"automatikkLabel"},n.Title)),n.ItemNumber?React.createElement("span",{className:"automatikkInfo"},"Art.nr ",n.ItemNumber):"")});return React.createElement("div",{className:"automatikkContainer removeLeftMargin"},React.createElement("div",{className:"col-md-6"},r),React.createElement("div",{className:"col-md-6"},u))},getSpareParts:function(){var n=this.state.spareparts.slice();if(console.log("data: ",n),n.length>0)var t=Math.ceil(n.length/2),i=n.splice(0,t),r=i.map(function(n,t){return React.createElement("div",{key:t,className:"automaticColumn"},React.createElement("a",{href:n.ContentUrl},React.createElement("img",{className:"automatikkImage",src:n.ProductImageUrl,alt:""+n.Title}),React.createElement("span",{className:"automatikkLabel"},n.Title)),n.ItemNumber?React.createElement("span",{className:"automatikkInfo"},"Art.nr ",n.ItemNumber):"")}),u=n.map(function(n,t){return React.createElement("div",{key:t,className:"automaticColumn"},React.createElement("a",{href:n.ContentUrl},React.createElement("img",{className:"automatikkImage",src:n.ProductImageUrl,alt:""+n.Title}),React.createElement("span",{className:"automatikkLabel"},n.Title)),n.ItemNumber?React.createElement("span",{className:"automatikkInfo"},"Art.nr ",n.ItemNumber):"")});return React.createElement("div",{className:"automatikkContainer removeLeftMargin"},React.createElement("div",{className:"col-md-6 col-sm-6"},r),React.createElement("div",{className:"col-md-6 col-sm-6"},u))},getProductCategories:function(){var n=this;return React.createElement("ul",null,this.state.categories.map(function(t,i){return React.createElement("li",{key:i},React.createElement("a",{className:n.state.product.DisplayName==t.DisplayText?"selected":"",href:t.LinkUrl},t.DisplayText))}))},getC4Formated:function(n){var t=null;return n!=null&&(n.indexOf("<list>")>-1&&(n=n.replace(new RegExp("<list>","g"),"<li>"),n=n.replace(new RegExp("<\/list>","g"),"<\/li>"),n=n.replace("<li>","<ul><li>"),n=n.replace(new RegExp("<\/li>$"),"<\/li><\/ul>")),t=React.createElement("span",{dangerouslySetInnerHTML:{__html:n}})),t},getCurrentDocumentation:function(){var r=this,u=["Diagram","Spareparts"],n=[],t,i;for(n=n.concat(this.state.product.Documentation),this.state.selectedVariant.Documentation!=null&&(n=n.concat(this.state.selectedVariant.Documentation)),t=0;t<u.length;t++)n=n.filter(function(n){return!(n.DocumentType==u[t])});return(i=[],n.map(function(n){i.indexOf(n.Description)===-1&&i.push(n.Description)}),n.length==0)?null:React.createElement("div",{className:"emptyText"},i.map(function(t,i){return React.createElement("div",{key:i,className:"documentGroup"},React.createElement("h4",{className:"documentlistHeader"},t," "),React.createElement(DocumentList,{documents:n.filter(function(n){return n.Description==t})}),t!==""?React.createElement("a",{className:"download",onClick:function(){return r.downloadDocumentationZip(t,n.filter(function(n){return n.Description==t}))}},r.state.download_text):null)}))},urlToPromise:function(n){return new Promise(function(t,i){JSZipUtils.getBinaryContent(n,function(n,r){n?i(n):t(r)})})},downloadDocumentationZip:function(n,t){var r=this,i=new JSZip;t.forEach(function(n){var t=n.Title+"."+n.ContentUrl.split(".").pop();i.file(t,r.urlToPromise(n.ContentUrl),{binary:!0})});i.generateAsync({type:"blob"}).then(function(n){saveAs(n,"Documentation")})},getDocumentsByType:function(n){var t=[];return t=t.concat(this.state.product.Documentation),this.state.selectedVariant.Documentation!=null&&(t=t.concat(this.state.selectedVariant.Documentation)),t.filter(function(t){return t.DocumentType&&t.DocumentType==n})},triggerDropdownMenu:function(){this.state.dropdownMenuClass=="hidden"?this.setState({dropdownMenuClass:""}):this.setState({dropdownMenuClass:"hidden"})},loadMovie:function(n){var t=n.replace("https://www.youtube.com/watch?v=","https://www.youtube.com/embed/").replace("&feature=youtu.be","");this.setState({loadedMovie:React.createElement("iframe",{src:t,frameborder:"0",allowFullScreen:!0})})},getRequestMailTo:function(){return"mailto:"+(this.state.globlalLinks.sendRequestLink==null?"":this.state.globlalLinks.sendRequestLink)},evaluateHasMovieArray:function(n){var t=!1;return n.map(function(n){return n.LinkUrl!==null&&n.LinkUrl!==""&&n.LinkUrl!==undefined?t=!0:null}),t},renderProductDescription:function(){var n=this.state.selectedVariant,t=this.state.product,i=n.ItemDescription!=null?n.ItemDescription:t.ProductDescription,r=n.ItemUSP!=null?this.getC4Formated(n.ItemUSP):this.getC4Formated(t.ProductUSP);return React.createElement("div",null,i,React.createElement("br",null),r)},render:function(){var t=this,n,i;return this.state.product==null?null:(n=this.getCurrentDocumentation(),i=this.renderProductDescription(),React.createElement("div",{className:"productPageWrapper mainBodyWrapper"},React.createElement("div",{className:"container"},React.createElement("div",{className:"row"},React.createElement("div",{className:"col-md-12 categoriesContainer subMenu"},this.getProductCategories()),React.createElement("div",{className:"dropdownMenuWrapper col-xs-10 col-xs-offset-1 subMenu"},React.createElement("button",null,"toggle"),React.createElement("div",{className:"selectedMenuItem",onClick:this.triggerDropdownMenu},this.state.product.DisplayName),React.createElement("ul",{className:this.state.dropdownMenuClass+" dropdownMenu"},this.state.categories.map(function(n,i){return React.createElement("li",{key:i},React.createElement("a",{className:t.state.product.DisplayName==n.DisplayText?"selected":"",href:n.LinkUrl},n.DisplayText))})))),React.createElement("div",{className:"row"},React.createElement("div",{className:"col-lg-10 col-md-80 col-sm-12 col-xs-12 productInfoContainer"},React.createElement("div",{className:"productInfoWrapper row"},React.createElement("div",{className:"col-md-6 col-sm-6 productImageCarousel"},this.state.imagesCollection==null?null:React.createElement(ImageGallery,{selectedNewsLabel:this.state.selectedNewsLabel,productName:this.state.product.DisplayName,images:this.getImageGalleryImages(this.state.imagesCollection)}),this.state.thumbnails.length?React.createElement("div",{className:"productThumbnailsContainer"},React.createElement("div",{className:"productThumbnailsContainerWrap"},this.state.thumbnails.map(function(n,t){return React.createElement("a",{href:n.LinkUrl,className:"productThumbnailsContainerItem",target:"_blank",key:t},React.createElement("img",{src:n.ContentUrl,title:""+n.Title,alt:""+n.Title}))}))):null,this.state.thumbnailsLarge!==undefined&&this.state.thumbnailsLarge.length?React.createElement("div",{className:"productThumbnailsContainer"},React.createElement("div",{className:"productThumbnailsContainerWrap"},this.state.thumbnailsLarge.map(function(n,t){return React.createElement("a",{href:n.LinkUrl,className:"productThumbnailsContainerItem",target:"_blank",key:t},React.createElement("img",{src:n.ContentUrl,title:""+n.Title,alt:""+n.Title}))}))):null),React.createElement("div",{className:"col-md-7 col-sm-7 boostZIndex productInfoContent"},React.createElement("h1",{className:"productTitle"},this.state.product.DisplayName),React.createElement("div",{className:"productVariantsDropDownHeading"},this.state.choose_model),React.createElement("div",{className:"productVariantsDropDown"},this.state.variants==null?null:React.createElement(DropDownListVariants,{onUpdate:this.onUpdate,data:this.state.variants,initialValue:this.state.variants[this.state.dropDownInitIndex]})),React.createElement("div",{className:"productVariantDescription"},i)),React.createElement("div",{className:"col-md-4 col-md-offset-1 col-sm-5 productImageScroller"},this.state.imagesCollection==null?null:React.createElement(ImageGallery,{selectedNewsLabel:this.state.selectedNewsLabel,productName:this.state.product.DisplayName,images:this.getImageGalleryImages(this.state.imagesCollection)}),this.state.thumbnails.length?React.createElement("div",{className:"productThumbnailsContainer"},React.createElement("ul",{className:"productThumbnailsContainerWrap"},this.state.thumbnails.map(function(n,t){return React.createElement("li",{key:t,"class":"right-align-text"},React.createElement("a",{href:n.LinkUrl,className:"productThumbnailsContainerItem",target:"_blank"},React.createElement("img",{src:n.ContentUrl,title:""+n.Title,alt:""+n.Title})))}))):null,this.state.thumbnailsLarge!==undefined&&this.state.thumbnailsLarge.length?React.createElement("div",{className:"productThumbnailsContainer"},React.createElement("ul",{className:"productThumbnailsContainerWrap"},this.state.thumbnailsLarge.map(function(n,t){return React.createElement("li",{key:t},React.createElement("a",{href:n.LinkUrl,className:"productThumbnailsContainerItem",target:"_blank"},React.createElement("img",{src:n.ContentUrl,title:""+n.Title,alt:""+n.Title})))}))):null)),React.createElement("div",{className:"row"},React.createElement("row",{className:"productAccordionsWrapper col-sm-7"},this.state.sketchesCollection.length==0&&this.haveTecData()==!1?null:React.createElement("div",{className:" accordionContent"},React.createElement(Accordion,{title:this.state.technical_data,openOnMount:"false"},React.createElement("div",{className:"technicalData removeLeftMargin"},this.getTecData()),React.createElement(DocumentList,{documents:this.state.sketchesCollection}))),this.state.diagramCollection.length==0?null:React.createElement("div",{className:" accordionContent"},React.createElement(Accordion,{title:this.state.accordion_diagrams},React.createElement("div",{className:"emptyText"},React.createElement(DocumentList,{documents:this.state.diagramCollection})))),this.state.automatikk.length==0?null:React.createElement("div",{className:" accordionContent"},React.createElement(Accordion,{title:this.state.accordion_automatic},this.state.automatikk==null?null:this.getAutomatikk())),n==null?null:React.createElement("div",{className:" accordionContent"},React.createElement(Accordion,{title:this.state.accordion_documentation},n)),this.state.accessories.length==0?null:React.createElement("div",{className:" accordionContent"},React.createElement(Accordion,{title:this.state.accordion_accessories},this.getAccessories())),this.state.product.ProductConsultant==null||this.state.product.ProductConsultant==""?null:React.createElement("div",{className:" accordionContent"},React.createElement(Accordion,{title:this.state.accordion_descriptions_text},this.state.product.ProductConsultant!=null?this.getC4Formated(this.state.product.ProductConsultant):this.getC4Formated(this.state.product.ProductConsultant))),this.state.spareparts.length==0&&this.getDocumentsByType("Spareparts").length==0?null:React.createElement("div",{className:" accordionContent"},React.createElement(Accordion,{title:this.state.accordion_spareparts},this.getSpareParts(),React.createElement(DocumentList,{documents:this.getDocumentsByType("Spareparts")}))),this.state.movieLinks==null||this.state.movieLinks.length==0||this.evaluateHasMovieArray(this.state.movieLinks)==!1?null:React.createElement("div",{className:" accordionContent"},React.createElement(Accordion,{title:this.state.accordion_movie},React.createElement("ul",{className:"documentList"},this.state.movieLinks.map(function(n,i){return n.LinkUrl!==null&&n.LinkUrl!==""&&n.LinkUrl!==undefined?React.createElement("li",{key:i},React.createElement("a",{className:"documentLink",onClick:function(){return t.loadMovie(n.LinkUrl)}},n.DisplayText)):null})),React.createElement("div",{className:"loadedMovieWrapper"},this.state.loadedMovie))),this.state.selectedVariant==null||this.state.selectedVariant.ArticleInfo==null?null:React.createElement("div",{className:" accordionContent"},React.createElement(Accordion,{title:this.state.accordion_articleinfo},React.createElement("div",{className:"articleInfoContainer"},React.createElement("div",{className:"articleInfoRow"},React.createElement("div",{className:"articleInfoLeft"},this.state.selectedVariant.ArticleInfo.ItemNrLabel),React.createElement("div",{className:"articleInfoRight"},this.state.selectedVariant.ArticleInfo.ItemNumber)),React.createElement("div",{className:"articleInfoRow"},React.createElement("div",{className:"articleInfoLeft"},this.state.selectedVariant.ArticleInfo.GTINLabel),React.createElement("div",{className:"articleInfoRight"},this.state.selectedVariant.ArticleInfo.GTIN)),React.createElement("div",{className:"articleInfoRow"},React.createElement("div",{className:"articleInfoLeft"},this.state.selectedVariant.ArticleInfo.NOBBLabel),React.createElement("div",{className:"articleInfoRight"},this.state.selectedVariant.ArticleInfo.NOBB)))))))),React.createElement(AsideContent,_extends({},this.props.asideBlocks,{localizedStrings:this.props.labels,reseller:{link:this.state.globlalLinks.resellerPageLink,buttonText:this.state.resellerButtonText},request:{mailto:this.getRequestMailTo(),product:this.state.product&&this.state.product.DisplayName,variant:this.state.selectedVariant&&this.state.selectedVariant.DisplayName,buttonText:this.state.requestButtonText}}))))))}}),PurchaseHelperPage=function(n){function t(n){_classCallCheck(this,t);var i=_possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,n));return i.state={selectedRooms:[],products:[],rooms:[],showSpinner:!1,progress:1},i.selectedRooms=[],i}return _inherits(t,n),_createClass(t,[{key:"componentDidMount",value:function(){console.log(this.props);this.setState({rooms:this.initializeRooms()});window.onbeforeunload=function(){return!0}}},{key:"changeProgress",value:function(n){n>0&&n<=4&&this.setState({progress:n})}},{key:"print",value:function(){window.print()}},{key:"initializeProperties",value:function(){var i=[],t,n;if(this.props.properties)for(t=0;t<this.props.properties.length;t++)n=this.props.properties[t],n.Type==="bool"?n.Value=!0:n.Type==="range"&&(n.Value=n.Values[0].Value),i.push(n);return i}},{key:"initializeRooms",value:function(){var i=[],r=this.initializeProperties(),n,t;if(this.props.rooms)for(n=0;n<this.props.rooms.length;n++)t={Key:this.props.rooms[n]},t.properties=JSON.parse(JSON.stringify(r)),i.push(t);return i}},{key:"getProducts",value:function(){var n=this.state.rooms.filter(function(n){return n.isSelected===!0}).map(function(n){var t=n.properties.map(function(n){return{Id:n.Id,Value:n.Value}});return{Key:n.Key,Criterias:t}}),t={PageId:this.props.pageId,Rooms:n};this.setState({showSpinner:!0});axios.post("/api/PurchaseHelper/GetProducts",t).then(function(n){this.setState({products:JSON.parse(n.data),showSpinner:!1});this.changeProgress(3);console.log("product data: ",JSON.parse(n.data))}.bind(this)).catch(function(n){console.log(n)})}},{key:"updateRoom",value:function(n,t,i,r){var u=Object.assign(this.state.rooms);u[t].properties[r].Value=i;this.setState({rooms:u})}},{key:"updateTile",value:function(n,t){items=Object.assign(this.state.rooms);items[n].isSelected=t;this.setState({rooms:items})}},{key:"render",value:function(){var n=this,i=this.state.rooms.map(function(t){return{name:n.props.labels[t.Key],svg:t.Key,isSelected:t.isSelected}}),r=this.state.rooms.map(function(t,i){if(t.isSelected)return React.createElement(PurchaseHelperAccordion,{key:i,room:t,index:i,properties:t.properties,onUpdate:n.updateRoom.bind(n),labels:n.props.labels,isOpen:"true"})}),u=this.state.products.map(function(t,i){if(t!==null){var r={Key:t.Room.Key,Value:t.Room.Name,SelectedCriteria:t.Room.SelectedCriteria};return React.createElement(PurchaseHelperAccordion,{key:i,room:r,index:i,product:t,importantPoints:n.props.importantPoints,onUpdate:n.updateRoom.bind(n),labels:n.props.labels,isOpen:"true"})}}),f=this.state.products.map(function(t,i){if(t.ProductDetails!==null){var r=t.Room.SelectedCriteria.map(function(n){return", "+n});return React.createElement("div",{className:"c-summary__item row",key:i},React.createElement("div",{className:"c-summary__item-container clearfix"},React.createElement("div",{className:"col-sm-3 col-xs-6 image-col"},React.createElement("div",{className:"c-summary__item-image-container"},React.createElement("img",{className:"c-summary__item-image",src:t.ProductDetails.product.ProductImages[0]&&t.ProductDetails.product.ProductImages[0].ContentUrl}))),React.createElement("div",{className:"col-sm-7 col-xs-6 c-summary__item-description-container"},React.createElement("div",{className:"c-summary__item-description"},React.createElement("a",{target:"_blank",className:"c-summary__item-description-name",href:t.ProductDetails.product.Url},t.ProductDetails.product.DisplayName),t.BlockDetails.Price?React.createElement("div",{className:"c-summary__item-price visible-xs hidden-print"},React.createElement("div",{className:"c-summary__item-price-number"},t.BlockDetails.Price,",- ",n.props.labels.Number),React.createElement("div",{className:"c-summary__item-price-text"},n.props.labels.Price)):null,React.createElement("div",{className:"c-summary__item-description-quantity"},t.BlockDetails.Quantity," ",n.props.labels.ProductQuantity),React.createElement("div",{className:"c-summary__item-description-number"},n.props.labels.ProductNumber," ",t.ProductDetails.selectedVariant&&t.ProductDetails.selectedVariant.ItemNumber),React.createElement("i",{className:"c-summary__item-description-criterias"},n.props.labels.BasedOn," ",n.props.labels[t.Room.Key],r))),React.createElement("div",{className:"c-summary__item-price-container col-xs-2"},t.BlockDetails.Price?React.createElement("div",{className:"c-summary__item-price"},React.createElement("div",{className:"c-summary__item-price-number"},t.BlockDetails.Price,",- ",n.props.labels.Number),React.createElement("div",{className:"c-summary__item-price-text"},n.props.labels.Price)):null)))}}),e=React.createElement("div",{className:"c-summary"},React.createElement("h2",{className:"c-summary__title"},this.props.headerSummary),f),t=void 0;return this.state.progress===4?this.props.retailersPage&&(t=React.createElement("a",{target:"_blank",className:"buttonRoundedCorners finn_forhandler",href:this.props.retailersPage},this.props.labels.Buttons.FindRetailer)):t=this.state.progress===2?React.createElement("button",{className:"buttonRoundedCorners",onClick:this.getProducts.bind(this)},this.props.labels.Buttons.Continue):React.createElement("button",{className:"buttonRoundedCorners",onClick:this.changeProgress.bind(this,this.state.progress+1),disabled:this.state.progress===1&&this.state.rooms.filter(function(n){return n.isSelected}).length<1}," ",this.props.labels.Buttons.Continue),React.createElement("div",{className:"purchase-helper container-fluid mainBodyWrapper"},React.createElement(StandardTopBannerComponent,{title:this.props.title,preamble:this.props.description}),React.createElement("div",{className:"rooms "+(this.state.progress===1?"":"hidden")},React.createElement("p",{className:"room-selection-text"},this.props.headerRoom),React.createElement(TileSelector,{tiles:i,onTileChange:this.updateTile.bind(this)})),React.createElement("div",{className:"properties "+(this.state.progress===2?"":"hidden")},React.createElement("p",{className:"room-selection-text"},this.props.headerAbout),r),React.createElement("div",{className:"product-details "+(this.state.progress===3?"":"hidden")},React.createElement("p",{className:"room-selection-text"},this.props.headerRecommendations),u),React.createElement("div",{className:"summary "+(this.state.progress===4?"":"hidden")},e),React.createElement("div",{className:"button-container"},React.createElement("div",{className:"row"},React.createElement("div",{className:"col-sm-6"},React.createElement("button",{className:"buttonRoundedCorners",onClick:this.changeProgress.bind(this,this.state.progress-1),disabled:this.state.progress===1},this.props.labels.Buttons.Back),this.state.progress===4?React.createElement("button",{className:"buttonRoundedCorners",onClick:this.print.bind(this)},this.props.labels.Buttons.Print):null),React.createElement("div",{className:"col-sm-6 right-button"},t))),this.state.showSpinner===!0?React.createElement(Spinner,null):null)}}]),t}(React.Component),TileSelector=function(n){function t(n){return _classCallCheck(this,t),_possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,n))}return _inherits(t,n),_createClass(t,[{key:"toggleSelection",value:function(n){var t=this.props.tiles[n].isSelected?!1:!0;this.props.onTileChange(n,t)}},{key:"render",value:function(){var n=this,t=this.props.tiles.map(function(t,i){return React.createElement("div",{className:"col-sm-4 col-xs-6 tile-container",key:i},React.createElement("label",{className:"tile "+(t.isSelected?"checked":"")},React.createElement("div",{className:"u-custom-checkmark"},React.createElement("input",{className:"radio-button custom-checkbox",type:"checkbox",onClick:n.toggleSelection.bind(n,i)}),React.createElement("span",{className:"checkmark"},React.createElement("span",{className:"mark"}))),React.createElement("span",{className:"tile-background"}),React.createElement("span",{className:"tile-content"},React.createElement("svg",{className:"image"},React.createElement("use",{xlinkHref:"#"+t.svg})),React.createElement("span",{className:"name"},t.name))))});return React.createElement("div",{className:"radio-tile-group row"},t)}}]),t}(React.Component),PurchaseHelperAccordion=function(n){function t(n){_classCallCheck(this,t);var i=_possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,n));return i.state={isOpen:!1},i}return _inherits(t,n),_createClass(t,[{key:"componentWillMount",value:function(){this.props.isOpen==="true"&&this.setState({isOpen:!0})}},{key:"toggleOpen",value:function(){this.state.isOpen?this.setState({isOpen:!1}):this.setState({isOpen:!0})}},{key:"updateProperty",value:function(n,t){this.props.onUpdate(this.props.room,this.props.index,n,t)}},{key:"renderProduct",value:function(){if(this.props.product.ProductDetails!==null){var n=this.props.product;return console.log(n),React.createElement(PurchaseHelperProduct,{name:n.ProductDetails.product.DisplayName,description:this.getProductDescription(n.ProductDetails),importantPoints:this.props.importantPoints,images:n.ProductDetails.product.ProductImages,movies:n.ProductDetails.thumbnailsMovie,labels:this.props.labels,id:n.ProductId,customText:n.BlockDetails.MoreInfo,price:n.BlockDetails.Price,quantity:n.BlockDetails.Quantity,relatedProducts:n.BlockDetails.RelatedProduct,url:n.ProductDetails.product.Url})}return React.createElement(PurchaseHelperProduct,{isEmpty:!0})}},{key:"getProductDescription",value:function(n){var t=n.selectedVariant?n.selectedVariant:n.children[0];return t?t.ItemDescription?n.selectedVariant.ItemDescription:n.product.ProductDescription:n.product.ProductDescription}},{key:"render",value:function(){var n=this,t,i,r;return this.props.properties&&(t=this.props.properties.map(function(t,i){for(var u,f,r=0;r<t.Values.length;r++)t.Values[r].Key==="Min"?u=t.Values[r].Value:t.Values[r].Key==="Max"&&(f=t.Values[r].Value);return React.createElement(PurchaseHelperProperty,{key:i,Name:t.Name,Type:t.Type,Unit:t.Unit,Value:t.Value,Min:u,Max:f,labels:n.props.labels,index:i,onUpdate:n.updateProperty.bind(n)})})),this.props.product&&(i=this.renderProduct()),this.props.room.SelectedCriteria&&(r=this.props.room.SelectedCriteria.map(function(n,t){return React.createElement("div",{key:t,className:"col-sm-3 col-xs-6 c-criteria-accordion__head-column"},n)})),React.createElement("div",{className:"o-accordion c-criteria-accordion row "+(this.state.isOpen?" open":"")},React.createElement("div",{className:"o-accordion__head c-criteria-accordion__head row",onClick:this.toggleOpen.bind(this)},React.createElement("button",null),React.createElement("div",{className:"col-md-12 "},React.createElement("div",{className:"row"},React.createElement("div",{className:"col-sm-3  c-criteria-accordion__head-icon-container c-criteria-accordion__head-column"},React.createElement("svg",{id:this.props.room.Key,className:"c-criteria-accordion__head-icon"},React.createElement("use",{xlinkHref:"#"+this.props.room.Key})),React.createElement("div",{className:"c-criteria-accordion__head-title"},this.props.labels[this.props.room.Key])),r))),React.createElement("div",{className:"o-accordion__body row"},React.createElement("div",{className:"col-md-12 "},t),React.createElement("div",{className:"col-md-12"},i)))}}]),t}(React.Component),PurchaseHelperProperty=function(n){function t(n){return _classCallCheck(this,t),_possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,n))}return _inherits(t,n),_createClass(t,[{key:"updateBool",value:function(n){this.props.onUpdate(n,this.props.index)}},{key:"updateRange",value:function(n){this.props.onUpdate(n.target.value,this.props.index)}},{key:"render",value:function(){return this.props.Type==="bool"?React.createElement("div",{className:"row border"},React.createElement("div",{className:"col-md-12"},React.createElement("div",{className:"c-criteria c-criteria--bool"},React.createElement("b",{className:"c-criteria__name"},this.props.Name),React.createElement("div",{className:"c-criteria__input"},React.createElement("div",{className:"c-criteria__input-choice",onClick:this.updateBool.bind(this,!0)},React.createElement("div",{className:"c-criteria__input-choice-title"},this.props.labels.Yes),React.createElement("div",{className:"c-criteria__input-choice-radio "+(this.props.Value===!0?"checked":"")},React.createElement("div",{className:"c-criteria__input-choice-radio-inner"}))),React.createElement("div",{className:"c-criteria__input-choice",onClick:this.updateBool.bind(this,!1)},React.createElement("div",{className:"c-criteria__input-choice-title"},this.props.labels.No),React.createElement("div",{className:"c-criteria__input-choice-radio "+(this.props.Value===!1?"checked":"")},React.createElement("div",{className:"c-criteria__input-choice-radio-inner"}))))))):this.props.Type==="range"?React.createElement("div",{className:"row border"},React.createElement("div",{className:"col-md-12"},React.createElement("div",{className:"c-criteria c-criteria--range"},React.createElement("div",{className:"c-criteria__container"},React.createElement("b",{className:"c-criteria__name"},this.props.Name),React.createElement("div",{className:"c-criteria__input"},React.createElement("div",{className:"c-criteria__input-min hidden-xs"},this.props.Min,this.props.Unit),React.createElement("div",{className:"c-criteria__input-min float-left visible-xs"},this.props.Min,this.props.Unit),React.createElement("div",{className:"c-criteria__input-max visible-xs float-right"},this.props.Max,this.props.Unit),React.createElement("div",{className:"c-criteria__input-range-container"},React.createElement("input",{className:"c-criteria__input-range",type:"range",value:this.props.Value,min:this.props.Min,max:this.props.Max,onChange:this.updateRange.bind(this),onMouseUp:this.updateRange.bind(this)})),React.createElement("div",{className:"c-criteria__input-max hidden-xs"},this.props.Max,this.props.Unit))),React.createElement("div",{className:"c-criteria__input-unit"},this.props.Value,this.props.Unit)))):React.createElement("div",null)}}]),t}(React.Component),PurchaseHelperProduct=function(n){function t(n){return _classCallCheck(this,t),_possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,n))}return _inherits(t,n),_createClass(t,[{key:"getImageGalleryImages",value:function(){return[].concat(_toConsumableArray(this.props.images),_toConsumableArray(this.props.movies))}},{key:"render",value:function(){var i=this,n,t;return this.props.isEmpty?React.createElement("div",null,"Fant ikke produkt som passer denne beskrivelsen"):(this.props.importantPoints&&(n=this.props.importantPoints.map(function(n,t){return React.createElement(CollapsibleListItem,{key:t,head:n.Key,body:n.Value,labels:i.props.labels})})),t=React.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.customText}}),React.createElement("div",{className:"c-product"},React.createElement("div",{className:"row"},React.createElement("div",{className:"col-sm-6"},React.createElement("div",{className:"c-product__recommendation-text"},this.props.labels.Recommendation),React.createElement("a",{target:"_blank",className:"c-product__name",href:this.props.url},this.props.name),React.createElement("div",{className:"c-summary__item-description-quantity"},this.props.quantity," ",this.props.labels.ProductQuantity),React.createElement("div",{className:"c-product__description"},t,React.createElement(ShowMore,{height:125,more:this.props.labels.showMore,less:this.props.labels.showLess,gradientColor:"#f2f0ec",buttonClassName:"c-product__description-button"},this.props.description)),React.createElement("div",null,n?React.createElement("p",null,this.props.labels.ImportantPoints):null,n)),React.createElement("div",{className:"col-sm-6"},React.createElement("div",{className:"row"},React.createElement("div",{className:"c-product__image-container"},React.createElement(ImageGallery,{images:this.getImageGalleryImages()}))),React.createElement("div",{className:"row"})))))}}]),t}(React.Component),CollapsibleListItem=function(n){function t(n){_classCallCheck(this,t);var i=_possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,n));return i.state={isHidden:!0},i}return _inherits(t,n),_createClass(t,[{key:"toggleBody",value:function(){this.state.isHidden?this.setState({isHidden:!1}):this.setState({isHidden:!0})}},{key:"render",value:function(){var n=React.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.body}});return React.createElement("div",{className:"o-hidden-points "+(this.state.isHidden?"":"collapsed")},React.createElement("div",{className:"o-hidden-points__head",onClick:this.toggleBody.bind(this)},React.createElement("div",{className:"o-hidden-points__icon"}),React.createElement("div",null,this.props.head)),React.createElement("div",{className:"o-hidden-points__body "+(this.state.isHidden?"hidden":"")},n))}}]),t}(React.Component),FindReseller=React.createClass({displayName:"FindReseller",getInitialState:function(){return{showNoHitsDialogue:!1,pageStrings:[],resellers:[],filteredResellers:[],resellerTypes:[],userlat:0,userlng:0,searchText:"",partnerpage:"",selectedReseller:!1,dropdownMenuClass:"hidden",selectedMenuItemName:"Oversikt",selectedMenuItem:0,showResults:!1,isFilterHidden:!0,checked1:!0,checked2:!0,checked3:!0,checked4:!0,allChecked:!0,mapcenterlongitudenorway:this.props.mapcenterlongitudenorway,mapcenterlatitudenorway:this.props.mapcenterlatitudenorway,mapcenterlongitudesweden:this.props.mapcenterlongitudesweden,mapcenterlatitudesweden:this.props.mapcenterlatitudesweden}},componentDidMount:function(){this.setState({resellers:this.props.resellers,filteredResellers:this.props.resellers,partnerpage:this.props.partnerpage})},componentWillMount:function(){this.setState({selectedMenuItemName:this.props.resellerTypes[0].Name});var n=JSON.stringify(["/findresellerpage/buttons/findreseller","/findresellerpage/labels/searchplaceholder","/findresellerpage/labels/results","/findresellerpage/labels/partners","/findresellerpage/labels/contactinfo","/findresellerpage/labels/visitoraddress","/findresellerpage/labels/services","/findresellerpage/labels/area","/findresellerpage/labels/contactperson","/findresellerpage/labels/assortment","/findresellerpage/labels/phone","/findresellerpage/labels/email","/findresellerpage/labels/web","/findresellerpage/labels/createroute","/findresellerpage/labels/mobilephone","/findresellerpage/labels/showall","/findresellerpage/labels/hideall","/findresellerpage/labels/showresult","/findresellerpage/labels/noResults","/findresellerpage/labels/showWay","/findresellerpage/labels/selectAll","/findresellerpage/labels/retailer","/findresellerpage/labels/serviceCompany","/findresellerpage/labels/certifiedPartner","/findresellerpage/labels/ecoNordicPartner"]);axios.get("/api/language/GetLocalizedStringsGet",{params:{value:n}},{responseType:"json"}).then(function(n){var t={findReseller:n.data[0],searchPlaceholder:n.data[1],results:n.data[2],partners:n.data[3],contactinfo:n.data[4],visitoraddress:n.data[5],services:n.data[6],area:n.data[7],contactperson:n.data[8],assortment:n.data[9],phone:n.data[10],email:n.data[11],web:n.data[12],createroute:n.data[13],mobilephone:n.data[14],showall:n.data[15],hideall:n.data[16],showresult:n.data[17],noResults:n.data[18],showWay:n.data[19],selectAll:n.data[20],retailer:n.data[21],serviceCompany:n.data[22],certifiedPartner:n.data[23],ecoNordicPartner:n.data[24]};this.setState({pageStrings:t})}.bind(this)).catch(function(n){console.log(n)}.bind(this))},mobileGetNearestReseller:function(){this.getNearestReseller();this.toggleFilterHidden()},getNearestReseller:function(){this._map.closestReseller()},toggleFilterHidden:function(){this.setState({isFilterHidden:!this.state.isFilterHidden})},resellerTypeChanged:function(n){var r=this.state.resellers.slice(0),t=this.searchTextField?this.searchTextField.value.toLowerCase():"",i;t=!t&&this.mobileSearchTextField?this.mobileSearchTextField.value.toLowerCase():t;n==="-1"?(this.setState({checked1:!this.state.allChecked}),this.setState({checked2:!this.state.allChecked}),this.setState({checked3:!this.state.allChecked}),this.setState({checked4:!this.state.allChecked}),this.setState({allChecked:!this.state.allChecked},this.allResellers.bind(this,r))):(i="checked"+n,this.setState({allChecked:!1}),this.setState(_defineProperty({},i,!this.state[i]),this.filterResellers.bind(this,r)))},allResellers:function(n){var t=this;this.state.allChecked||(n=[]);this.setState({filteredResellers:n},function(){t._map.updateMap(n,!0,!1)})},filterResellers:function(n){var t=this,i=this.state.checked1,r=this.state.checked2,u=this.state.checked3,f=this.state.checked4;this.setState({filteredResellers:n.filter(function(n){return i&&n.IsReseller?!0:r&&n.IsServiceCompany&&n.ServiceCompanyShowOnWeb?!0:u&&n.IsProfPartner?!0:f&&n.IsEcoNordicPartner?!0:!1})},function(){t._map.updateMap(t.state.filteredResellers,!1,!1)})},createRoute:function(n,t){this._map.createRoute(n,t)},mobileSearchReseller:function(){this.searchReseller();this.toggleFilterHidden()},searchReseller:function(){var t=this.state.resellers.slice(0),n=this.searchTextField?this.searchTextField.value.toLowerCase():"",i;if(n=!n&&this.mobileSearchTextField?this.mobileSearchTextField.value.toLowerCase():n,n==="")this.setState({filteredResellers:t},function(){this._map.updateMap(this.state.filteredResellers,!0,!1)});else{var r=this.state.checked1,u=this.state.checked2,f=this.state.checked3,e=this.state.checked4;if(t=t.filter(function(n){return r&&n.IsReseller?!0:u&&n.IsServiceCompany&&n.ServiceCompanyShowOnWeb?!0:f&&n.IsProfPartner?!0:e&&n.IsEcoNordicPartner?!0:!1}),i=t.filter(function(t){return isNaN(n)?t.City.toLowerCase().startsWith(n)?!0:!1:t.PostCode===n?!0:!1}),i.length===0){this.setState({showNoHitsDialogue:!0});return}this.setState({filteredResellers:t},function(){this._map.updateMap(this.state.filteredResellers,!1,!0);this._map.setCenter(Number(i[0].Latitude),Number(i[0].Longitude))})}},getMarkersAround:function(n,t,i){var u=this,r=n.filter(function(n){return i>u._map.getDistance(t[0].Latitude,t[0].Longitude,n.Latitude,n.Longitude)});return r=r.concat(t),r.filter(this.onlyUnique)},onlyUnique:function(n,t,i){return i.indexOf(n)===t},updateSearchText:function(n){this.setState({searchText:n.target.value})},mobileHandleKeyPress:function(n){n.charCode==13&&this.mobileSearchReseller()},handleKeyPress:function(n){n.charCode==13&&this.searchReseller()},moveToReseller:function(n){this.setState({selectedReseller:n})},isActiveMenuItem:function(n){return n===this.state.selectedMenuItem?"active":""},triggerDropdownMenu:function(){this.state.dropdownMenuClass==="hidden"?this.setState({dropdownMenuClass:""}):this.setState({dropdownMenuClass:"hidden"})},navigateToPartnerPage:function(){window.open(this.state.partnerpage)},showList:function(){this.setState({showResults:!this.state.showResults})},closePopup:function(){this.setState({showNoHitsDialogue:!1})},clickOutsidePopup:function(n){n.target.className=="noHitsPopupWrapper"&&this.closePopup()},render:function(){var n=this,r=[],t;if(this.props.resellerTypes!=null)for(t=0;t<this.props.resellerTypes.length;t++){var i=this.props.resellerTypes[t],f="checked"+t,u="tooltip"+t;i.Name!=""&&r.push(React.createElement("div",{key:"checkbox_"+i.Id},React.createElement("span",{className:"fh-checkbox tooltip"},this.props[u]&&React.createElement("span",{className:"tooltiptext"},this.props[u]),React.createElement("input",{type:"checkbox",id:"checkbox_"+i.Id,onChange:this.resellerTypeChanged.bind(this,i.Id),checked:this.state[f]||this.state.allChecked}),React.createElement("label",{htmlFor:"checkbox_"+i.Id},i.Name),React.createElement("br",null))))}return React.createElement("div",{className:"findResellerPageWrapper mainBodyWrapper"},React.createElement(StandardTopBannerComponent,{title:this.props.topBannerContent&&this.props.topBannerContent.title,preamble:this.props.topBannerContent&&this.props.topBannerContent.description}),this.state.showNoHitsDialogue&&React.createElement("div",{className:"noHitsPopupWrapper",onClick:this.clickOutsidePopup},React.createElement("div",{className:"popupContent"},React.createElement("span",{onClick:this.closePopup,className:"close"},"×"),React.createElement("p",null,this.props.noHitsText?this.props.noHitsText:this.state.pageStrings.noResults))),React.createElement("div",{className:"container-fluid findresellerleftmargin"},React.createElement("div",{className:"row"},React.createElement("div",{className:"filterwrapper"},React.createElement("div",{className:"hidden-md hidden-lg col-xs-12 col-sm-12"},React.createElement("div",{className:"findResellerPageButtonWrapper"},React.createElement("input",{type:"button",className:"finn_forhandler orangeButton",value:"Filter",onClick:this.toggleFilterHidden}))),!this.state.isFilterHidden&&React.createElement("div",{className:"hidden-md hidden-lg filterarea"},React.createElement("div",{className:"findResellerPageSearchWrapper"},React.createElement("input",{type:"text",className:"searchFieldTextBox",placeholder:this.state.pageStrings.searchPlaceholder,ref:function(t){return n.mobileSearchTextField=t},onKeyPress:this.mobileHandleKeyPress}),React.createElement("span",{className:"searchFieldIconFilter",onClick:this.mobileSearchReseller})),React.createElement("div",{className:"findResellerPageButtonWrapper"},React.createElement("input",{type:"button",className:"bluebutton full place finn_forhandler finn_narmeste",value:this.state.pageStrings.findReseller,onClick:this.mobileGetNearestReseller})),React.createElement("div",{className:"findResellerPageCheckboxWrapper"},r),React.createElement("div",{className:"findResellerPageButtonWrapper"},React.createElement("input",{type:"button",className:"orangeButton full marginbottom20",onClick:this.toggleFilterHidden,value:this.state.pageStrings.showresult}),this.state.partnerpage==null?null:React.createElement("input",{type:"button",className:"greyButton full marginbottom20",onClick:this.navigateToPartnerPage,value:this.state.pageStrings.partners}),React.createElement("input",{type:"button",className:"greyButton full vis_alle",value:this.state.showResults?this.state.pageStrings.hideall:this.state.pageStrings.showall,onClick:this.showList})))),React.createElement("div",{className:"hidden-xs hidden-sm col-md-2 col-lg-2 margintop50"},React.createElement("div",{className:"findResellerPageSearchWrapper"},React.createElement("input",{type:"text",className:"searchFieldTextBox",placeholder:this.state.pageStrings.searchPlaceholder,ref:function(t){return n.searchTextField=t},onKeyPress:this.handleKeyPress}),React.createElement("span",{className:"searchFieldIcon",onClick:this.searchReseller})),React.createElement("div",{className:"findResellerPageButtonWrapper finn_narmeste"},React.createElement("input",{type:"button",className:"bluebutton full place",value:this.state.pageStrings.findReseller,onClick:this.getNearestReseller})),React.createElement("div",{className:"findResellerPageCheckboxWrapper"},r),React.createElement("div",{className:"findResellerPageButtonWrapper"},this.state.partnerpage==null?null:React.createElement("input",{type:"button",className:"samarbeidspartnere greyButton full marginbottom20",onClick:this.navigateToPartnerPage,value:this.state.pageStrings.partners}),React.createElement("input",{type:"button",className:"greyButton full",value:this.state.showResults?this.state.pageStrings.hideall:this.state.pageStrings.showall,onClick:this.showList}))),React.createElement("div",{className:"col-xs-12 col-sm-12 col-md-8 margintop50"},React.createElement(GoogleMapsComponent,{onresellerselect:this.moveToReseller,resellers:this.state.filteredResellers,mapcenterlongitudenorway:this.state.mapcenterlongitudenorway,mapcenterlatitudenorway:this.state.mapcenterlatitudenorway,mapcenterlongitudesweden:this.state.mapcenterlongitudesweden,mapcenterlatitudesweden:this.state.mapcenterlatitudesweden,pageStrings:this.state.pageStrings,ref:function(t){n._map=t}})),React.createElement("div",{className:"hidden-xs hidden-sm col-md-2 col-lg-2 margintop50"},this.props.rightContent.map(function(n,t){if(n.Type==="ContactInfoBlock")return React.createElement(ContactInfoBlockComponent,{key:t,buttons:n.Buttons,imageUrl:n.ImageUrl,title:n.Title,description:n.Description,phone:n.PhoneNumber,email:n.Email})})))),React.createElement("div",{className:"container-fluid"},React.createElement("div",{className:"row",id:"divResellerList"},this.state.showResults?React.createElement("div",{className:"col-xs-12 col-sm-12 col-md-offset-2 col-md-8 col-offset-lg-2 col-lg-8"},this.state.filteredResellers.map(function(t){return React.createElement(AccordionResellers,{id:t.DealerId,key:t.DealerId,headerclass:t.DealerHeaderClass,name:t.Name,city:t.City,dealertype:t.DisplayDealerType,open:n.state.selectedReseller===t.DealerId},React.createElement("table",null,React.createElement("tbody",null,React.createElement("tr",null,React.createElement("td",{colSpan:"2"},React.createElement("div",{className:"dealerheader"},n.state.pageStrings.contactinfo,":"))),React.createElement("tr",{className:t.HasPhone?"":"hidden"},React.createElement("td",null,n.state.pageStrings.mobilephone,":"),React.createElement("td",{className:"td-padding-right-left-20"},t.Phone)),React.createElement("tr",{className:t.HasOfficePhone?"":"hidden"},React.createElement("td",null,n.state.pageStrings.phone,":"),React.createElement("td",{className:"td-padding-right-left-20"},t.OfficePhone)),React.createElement("tr",{className:t.HasEmail?"":"hidden"},React.createElement("td",null,n.state.pageStrings.email,":"),React.createElement("td",{className:"td-padding-right-left-20"},React.createElement("a",{href:t.EmailMailto},t.Email))),React.createElement("tr",{className:t.HasWebSite?"":"hidden"},React.createElement("td",null,n.state.pageStrings.web,":"),React.createElement("td",{className:"td-padding-right-left-20"},React.createElement("a",{href:t.WebSiteFormatted,target:"_blank"},t.WebSite))),React.createElement("tr",{className:"hidden"},React.createElement("td",null,"latitude:"),React.createElement("td",null,t.Latitude)),React.createElement("tr",{className:"hidden"},React.createElement("td",null,"longitude:"),React.createElement("td",null,t.Longitude)))),React.createElement("table",{className:t.HasAddress?"":"hidden"},React.createElement("tbody",null,React.createElement("tr",null,React.createElement("td",null,React.createElement("div",{className:"dealerheader"},n.state.pageStrings.visitoraddress,":"))),React.createElement("tr",null,React.createElement("td",null,t.StreetAddress)),React.createElement("tr",null,React.createElement("td",null,t.PostCode," ",t.City)),React.createElement("tr",null,React.createElement("td",{className:t.IsSecureConnectionAndHasCoordinates?"":"hidden"},React.createElement("a",{target:"_blank",href:t.GoogleMapsDirectionUrl},n.state.pageStrings.showWay))))),React.createElement("table",{className:t.HasContactPersons?"":"hidden"},React.createElement("tbody",null,React.createElement("tr",null,React.createElement("td",null,React.createElement("div",{className:"dealerheader"},n.state.pageStrings.contactperson,":"))),React.createElement("tr",null,React.createElement(ContactPersons,{persons:t.ContactPersons})))),React.createElement("table",{className:t.HasAssortment?"":"hidden"},React.createElement("tbody",null,React.createElement("tr",null,React.createElement("td",null,React.createElement("div",{className:"dealerheader"},n.state.pageStrings.assortment,":"))),React.createElement("tr",null,React.createElement("td",null,t.DisplayCentralVacuumCleaner)),React.createElement("tr",null,React.createElement("td",null,t.DisplayVentilation)))))})):null),React.createElement("div",{className:"row"},React.createElement("div",{className:"col-xs-12 col-sm-12 hidden-md hidden-lg"},this.props.rightContent.map(function(n,t){if(n.Type==="ContactInfoBlock")return React.createElement(ContactInfoBlockComponent,{key:t,buttons:n.Buttons,imageUrl:n.ImageUrl,title:n.Title,description:n.Description,phone:n.PhoneNumber,email:n.Email})})))))}}),ContactPersons=React.createClass({displayName:"ContactPersons",getInitialState:function(){return{contactPersons:[]}},componentDidMount:function(){this.setState({contactPersons:this.props.persons})},displayContactPersons:function(){return React.createElement("table",null,this.state.contactPersons.map(function(n,t){return React.createElement("tbody",{key:t},React.createElement("tr",null,React.createElement("td",null,n.Name)),React.createElement("tr",null,React.createElement("td",null,n.Phone)),React.createElement("tr",null,React.createElement("td",null,React.createElement("a",{href:'mailto:" + {person.Email}'},n.Email))))}))},render:function(){return React.createElement("td",null,this.displayContactPersons())}}),InstallationsAdmin=function(n){function t(n){_classCallCheck(this,t);var i=_possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,n));return i.state={data:[],skipCount:0,takeCount:parseInt(i.props.pageSize),previousVisible:i.skipCount>0,config:{headers:{appauthtoken:"C574E6FBA3141","Content-Type":"application/json"}},apiBaseUrl:i.props.apiBaseUrl,getInstallationsUrl:i.props.apiBaseUrl+"/api/installations/GetInstallationsWithProductsAndLocations?skip="},i.getInstallations=i.getInstallations.bind(i),i.getInstallationsWithProductsAndLocations=i.getInstallationsWithProductsAndLocations.bind(i),i}return _inherits(t,n),_createClass(t,[{key:"componentWillMount",value:function(){this.getInstallationsWithProductsAndLocations()}},{key:"getInstallations",value:function(n,t){t==="less"?(console.log("less"),this.setState({skipCount:this.state.skipCount-this.state.takeCount},function(){return this.getInstallationsWithProductsAndLocations()})):t==="more"&&(console.log("more"),this.setState({skipCount:this.state.skipCount+this.state.takeCount},function(){return this.getInstallationsWithProductsAndLocations()}))}},{key:"getInstallationsWithProductsAndLocations",value:function(){var n=this.state.getInstallationsUrl+this.state.skipCount+"&take="+this.state.takeCount;console.log(n);axios.get(n).then(function(n){console.log(n.data.installations);this.setState({data:n.data.installations,previousVisible:!this.state.skipCount==0})}.bind(this))["catch"](function(){}.bind(this))}},{key:"render",value:function(){var n=this;return React.createElement("div",{className:"container"},React.createElement(InstallationList,{items:this.state.data,refreshInstallations:this.getInstallationsWithProductsAndLocations,authconfig:this.state.config,apiBaseUrl:this.state.apiBaseUrl}),React.createElement("div",{className:"row"},React.createElement("div",{className:"col-sm-offset-8 col-sm-2 col-md-offset-8 col-md-2"},this.state.previousVisible?React.createElement("p",null,React.createElement("button",{className:"buttonRoundedCorners",name:"less",onClick:function(t){return n.getInstallations(t,"less")},style:{width:"100%"}},"Hent forrige ",this.state.takeCount)):null),React.createElement("div",{className:"col-sm-2 col-md-2"},React.createElement("p",null,React.createElement("button",{className:"buttonRoundedCorners",onClick:function(t){return n.getInstallations(t,"more")},style:{width:"100%"}},"Hent neste ",this.state.takeCount)))))}}]),t}(React.Component),InstallationList=function(n){function t(n){_classCallCheck(this,t);var i=_possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,n));return i.state={types:[{id:"1",type:"GPS"},{id:"2",type:"Street"},{id:"3",type:"Google"}],editing:null,isModalOpen:!1,loc_streetaddress:"",loc_postalcode:0,loc_city:"",loc_municipality:"",loc_country:"",loc_gps:"",loc_type:1,loc_inst_id:null,saveDisabled:!1,productDeleteUrl:i.props.apiBaseUrl+"/api/Products/DeleteProduct?productId=",locationDeleteUrl:i.props.apiBaseUrl+"/api/Locations/deleteLocation?locationId=",installationUpdateUrl:i.props.apiBaseUrl+"/api/installations/UpdateOrderedInstallationsWithProductsAndLocations",installationAddAddressUrl:i.props.apiBaseUrl+"/api/locations/SaveNewLocation"},i.renderItemOrEditField=i.renderItemOrEditField.bind(i),i.toggleEditing=i.toggleEditing.bind(i),i.handleEditField=i.handleEditField.bind(i),i.handleInstallationUpdate=i.handleInstallationUpdate.bind(i),i.handleAbortEdit=i.handleAbortEdit.bind(i),i.toggleModal=i.toggleModal.bind(i),i.handleNewAddress=i.handleNewAddress.bind(i),i.handleLocationDelete=i.handleLocationDelete.bind(i),i.handleProductDelete=i.handleProductDelete.bind(i),i.handleTypeChange=i.handleTypeChange.bind(i),i}return _inherits(t,n),_createClass(t,[{key:"toggleModal",value:function(){console.log("toggleModal");this.setState({isModalOpen:!this.state.isModalOpen})}},{key:"toggleEditing",value:function(n){console.log("currently editing index #"+n);this.setState({editing:n})}},{key:"handleAbortEdit",value:function(){console.log("aborting edit");this.setState({editing:null})}},{key:"handleTypeChange",value:function(n,t,i,r){if(r==="edit")i!=null&&(this.props.items[this.state.editing].locations[t].LocationTypeId=i);else if(r==="new"){var u;this.setState((u={},_defineProperty(u,"loc_type",i),_defineProperty(u,"loc_inst_id",n),u))}else this.setState(_defineProperty({},"loc_type","1"))}},{key:"handleEditField",value:function(n,t,i){var r=n.target,u;r.name==="note"?this.props.items[this.state.editing][r.name]=r.value:r.name==="streetaddress"?this.props.items[this.state.editing].locations[i].Street=r.value:r.name==="postalcode"?this.props.items[this.state.editing].locations[i].PostalCode=r.value:r.name==="city"?this.props.items[this.state.editing].locations[i].City=r.value:r.name==="municipality"?this.props.items[this.state.editing].locations[i].Municipality=r.value:r.name==="country"?this.props.items[this.state.editing].locations[i].Country=r.value:r.name==="gps"?this.props.items[this.state.editing].locations[i].GPS=r.value:r.name==="type"?this.props.items[this.state.editing].locations[i].LocationTypeId=r.value:r.name==="productnote"?this.props.items[this.state.editing].products[i].Note=r.value:r.name==="productqr"?this.props.items[this.state.editing].products[i].QrCode=r.value:this.setState((u={},_defineProperty(u,r.name,r.value),_defineProperty(u,"loc_inst_id",t),u))}},{key:"handleProductDelete",value:function(n){var i=this,t=this.state.productDeleteUrl+n;console.log("Delete product");console.log(t);axios.post(t,this.props.authconfig).then(function(n){n.data&&(alert("Produckt slettet."),i.props.refreshInstallations())}).catch(function(n){console.log(n.response)})}},{key:"handleLocationDelete",value:function(n){var t=this,i=this.state.locationDeleteUrl+n;axios.post(i,this.props.authconfig).then(function(n){n.data&&(alert("Lokasjon slettet."),t.props.refreshInstallations())}).catch(function(n){console.log(n.response)})}},{key:"handleInstallationUpdate",value:function(n){var i=this,t=JSON.stringify(this.props.items[n]),r='{"installations": ['+t+"]}";console.log(this.state.installationUpdateUrl);console.log(t);axios.post(this.state.installationUpdateUrl,r,this.props.authconfig).then(function(n){console.log(n);alert("Installasjon oppdatert.");i.props.refreshInstallations()}).catch(function(n){console.log(n.response)})}},{key:"handleNewAddress",value:function(){var n=this,t='{ "LocationTypeId":'+this.state.loc_type+',"InstallationId": '+this.state.loc_inst_id+', "Country":"'+this.state.loc_country+'","Municipality": "'+this.state.loc_municipality+'","PostalCode":"'+this.state.loc_postalcode+'", "City": "'+this.state.loc_city+'","LandRegistry": null,"GPS": "'+this.state.loc_gps+'","Street": "'+this.state.loc_streetaddress+'"}';console.log(t);axios.post(this.state.installationAddAddressUrl,t,this.props.authconfig).then(function(t){console.log(t);t.status===200&&(alert("Ny adresse lagret."),n.setState({loc_streetaddress:"",loc_postalcode:0,loc_city:"",loc_municipality:"",loc_country:"",loc_gps:"",loc_type:1,loc_inst_id:null,isModalOpen:!n.state.isModalOpen}),n.props.refreshInstallations())}).catch(function(n){console.log(n.response)})}},{key:"renderItemOrEditField",value:function(n,t){var i=this;return this.state.editing===t?React.createElement("div",{className:"editing"},React.createElement("div",{className:"row installation-list-item"},React.createElement("div",{className:"col-sm-10 col-md-10"},React.createElement("h2",null,"Endre installasjon"))),React.createElement("div",{className:"row installation-list-item",style:{fontWeight:"bold"}},React.createElement("div",{className:"col-sm-1 col-md-1"},"Id"),React.createElement("div",{className:"col-sm-2 col-md-2"},"Installasjonsdato"),React.createElement("div",{className:"col-sm-9 col-md-9"},"Installasjonsnotat")),React.createElement("div",{className:"row installation-list-item"},React.createElement("div",{className:"col-sm-1 col-md-1"},React.createElement("input",{className:"disabled-input",type:"text",defaultValue:n.InstallationId,readOnly:!0})),React.createElement("div",{className:"col-sm-2 col-md-2"},React.createElement("input",{className:"disabled-input",type:"text",defaultValue:n.DisplayInstallationDate,readOnly:!0})),React.createElement("div",{className:"col-sm-9 col-md-9"},React.createElement("textarea",{rows:"3",className:"enabled-input",onChange:function(t){return i.handleEditField(t,n.InstallationId)},type:"text",ref:"note_"+n.$id,defaultValue:n.note,name:"note"}))),React.createElement("div",{className:"row installation-list-item"},React.createElement("div",{className:"col-sm-12 col-md-12"},React.createElement("hr",{style:{borderTop:"1px solid lightgray"}}))),n.locations.length>0&&React.createElement("div",{className:"row installation-list-item",style:{fontWeight:"bold"}},React.createElement("div",{className:"col-sm-2 col-md-2"},"Gateadresse"),React.createElement("div",{className:"col-sm-1 col-md-1"},"Postnummer"),React.createElement("div",{className:"col-sm-2 col-md-2"},"Poststed"),React.createElement("div",{className:"col-sm-2 col-md-2"},"Fylke"),React.createElement("div",{className:"col-sm-1 col-md-1"},"Land"),React.createElement("div",{className:"col-sm-2 col-md-2"},"GPS"),React.createElement("div",{className:"col-sm-1 col-md-1"},"Type"),React.createElement("div",{className:"col-sm-1 col-md-1",style:{textAlign:"right"}},"Slett")),React.createElement("ul",{className:"installation-list"},n.locations&&n.locations.map(function(t,i){var r=this;return React.createElement("li",{key:t.$id},React.createElement("div",{className:"row installation-list-item"},React.createElement("div",{className:"col-sm-2 col-md-2"},React.createElement("input",{className:"enabled-input",type:"text",placeholder:"Gateadresse",defaultValue:t.Street,name:"streetaddress",onChange:function(n){return r.handleEditField(n,t.LocationId,i)}})),React.createElement("div",{className:"col-sm-1 col-md-1"},React.createElement("input",{className:"enabled-input",type:"text",placeholder:"Postnummer",defaultValue:t.PostalCode,name:"postalcode",onChange:function(n){return r.handleEditField(n,t.LocationId,i)}})),React.createElement("div",{className:"col-sm-2 col-md-2"},React.createElement("input",{className:"enabled-input",type:"text",placeholder:"Poststed",defaultValue:t.City,name:"city",onChange:function(n){return r.handleEditField(n,t.LocationId,i)}})),React.createElement("div",{className:"col-sm-2 col-md-2"},React.createElement("input",{className:"enabled-input",type:"text",placeholder:"Fylke",defaultValue:t.Municipality,name:"municipality",onChange:function(n){return r.handleEditField(n,t.LocationId,i)}})),React.createElement("div",{className:"col-sm-1 col-md-1"},React.createElement("input",{className:"enabled-input",type:"text",placeholder:"Land",defaultValue:t.Country,name:"country",onChange:function(n){return r.handleEditField(n,t.LocationId,i)}})),React.createElement("div",{className:"col-sm-2 col-md-2"},React.createElement("input",{className:"enabled-input",type:"text",placeholder:"GPS",defaultValue:t.GPS,name:"gps",onChange:function(n){return r.handleEditField(n,t.LocationId,i)}})),React.createElement("div",{className:"col-sm-1 col-md-1 "},React.createElement(LocationTypeDropDownList,{cssclass:"installation-list-type-dropdown",data:this.state.types,initialValue:t.LocationTypeId,valueField:"id",nameField:"type",onChange:this.handleTypeChange.bind(n,n.InstallationId,i,"edit"),onUpdate:this.handleTypeChange.bind(n,n.InstallationId,i,"edit")})),React.createElement("div",{className:"col-sm-1 col-md-1",style:{textAlign:"right"}},React.createElement("img",{className:"icon-button",alt:"Slett lokasjonslinje",src:"../../../Static/Images/SVG/delete.svg",onClick:this.handleLocationDelete.bind(null,t.LocationId)}))))}.bind(this))),React.createElement("div",{className:"row installation-list-item"},React.createElement("div",{className:"col-sm-12 col-md-12"},React.createElement("hr",{style:{borderTop:"1px solid lightgray"}}))),React.createElement(NewLocationModal,{disabled:this.state.saveDisabled,show:this.state.isModalOpen,onClose:this.toggleModal,onSave:this.handleNewAddress.bind(n,n.InstallationId),installationid:n.InstallationId},React.createElement("div",{className:"row installation-list-item"},React.createElement("div",{className:"col-sm-2 col-md-2"},React.createElement("input",{className:"enabled-input",onChange:function(t){return i.handleEditField(t,n.InstallationId)},type:"text",placeholder:"Gateadresse",name:"loc_streetaddress"})),React.createElement("div",{className:"col-sm-1 col-md-1"},React.createElement("input",{className:"enabled-input",onChange:function(t){return i.handleEditField(t,n.InstallationId)},type:"text",placeholder:"Postnr",name:"loc_postalcode"})),React.createElement("div",{className:"col-sm-2 col-md-2"},React.createElement("input",{className:"enabled-input",onChange:function(t){return i.handleEditField(t,n.InstallationId)},type:"text",placeholder:"Poststed",name:"loc_city"})),React.createElement("div",{className:"col-sm-2 col-md-2"},React.createElement("input",{className:"enabled-input",onChange:function(t){return i.handleEditField(t,n.InstallationId)},type:"text",placeholder:"Fylke",name:"loc_municipality"})),React.createElement("div",{className:"col-sm-2 col-md-2"},React.createElement("input",{className:"enabled-input",onChange:function(t){return i.handleEditField(t,n.InstallationId)},type:"text",placeholder:"Land",name:"loc_country"})),React.createElement("div",{className:"col-sm-2 col-md-2"},React.createElement("input",{className:"enabled-input",onChange:function(t){return i.handleEditField(t,n.InstallationId)},type:"text",placeholder:"GPS-koordinater",name:"loc_gps"})),React.createElement("div",{className:"col-sm-1 col-md-1"},React.createElement(LocationTypeDropDownList,{cssclass:"installation-list-type-dropdown",data:this.state.types,initialValue:"1",valueField:"id",nameField:"type",onChange:this.handleTypeChange.bind(n,n.InstallationId,t,"new"),onUpdate:this.handleTypeChange.bind(n,n.InstallationId,t,"new")})))),n.products.length>0&&React.createElement("div",{className:"row installation-list-item",style:{fontWeight:"bold"}},React.createElement("div",{className:"col-sm-1 col-md-1"},"Id"),React.createElement("div",{className:"col-sm-3 col-md-3"},"Produktnotat"),React.createElement("div",{className:"col-sm-1 col-md-1"},"Produkt id"),React.createElement("div",{className:"col-sm-2 col-md-2"},"QR"),React.createElement("div",{className:"col-sm-2 col-md-2"},"Serienummer"),React.createElement("div",{className:"col-sm-2 col-md-2"},"Artikkel"),React.createElement("div",{className:"col-sm-1 col-md-1",style:{textAlign:"right"}},"Slett")),React.createElement("ul",{className:"installation-list"},n.products&&n.products.map(function(n,t){var i=this;return React.createElement("li",{key:n.$id},React.createElement("div",{className:"row installation-list-item"},React.createElement("div",{className:"col-sm-1 col-md-1"},React.createElement("input",{className:"disabled-input",type:"text",defaultValue:n.InstallationId})),React.createElement("div",{className:"col-sm-3 col-md-3"},React.createElement("textarea",{rows:"4",className:"enabled-input",onChange:function(r){return i.handleEditField(r,n.InstallationId,t)},type:"text",defaultValue:n.Note,name:"productnote"})),React.createElement("div",{className:"col-sm-1 col-md-1"},React.createElement("input",{className:"disabled-input",type:"text",defaultValue:n.ProductId})),React.createElement("div",{className:"col-sm-2 col-md-2"},React.createElement("input",{className:"enabled-input",type:"text",defaultValue:n.QrCode,onChange:function(r){return i.handleEditField(r,n.InstallationId,t)},name:"productqr"})),React.createElement("div",{className:"col-sm-2 col-md-2"},React.createElement("input",{className:"disabled-input",type:"text",defaultValue:n.SerialNumber})),React.createElement("div",{className:"col-sm-2 col-md-2"},React.createElement("input",{className:"disabled-input",type:"text",defaultValue:n.Article})),React.createElement("div",{className:"col-sm-1 col-md-1",style:{textAlign:"right"}},React.createElement("img",{className:"icon-button",alt:"Slett produktlinje",src:"../../../Static/Images/SVG/delete.svg",onClick:this.handleProductDelete.bind(null,n.ProductId)}))))}.bind(this))),React.createElement("div",{className:"row installation-list-item"},React.createElement("div",{className:"col-sm-offset-6 col-sm-2 col-md-offset-6 col-md-2"},React.createElement("p",null,React.createElement("button",{className:"buttonRoundedCorners",style:{width:"100%"},onClick:this.toggleModal},"Legg til ny lokasjon"))),React.createElement("div",{className:"col-sm-2 col-md-2"},React.createElement("p",null,React.createElement("button",{className:"buttonRoundedCorners",style:{width:"100%"},onClick:this.handleAbortEdit.bind(null,n.$id)},"Avbryt"))),React.createElement("div",{className:"col-sm-2 col-md-2"},React.createElement("p",null,React.createElement("button",{className:"buttonRoundedCorners",style:{width:"100%"},onClick:this.handleInstallationUpdate.bind(null,t)},"Lagre")))),React.createElement("br",null)):React.createElement("div",{className:"listing"},React.createElement("div",{className:"row installation-list-item"},React.createElement("div",{className:"col-sm-1 col-md-1"},React.createElement("p",null,n.InstallationId)),React.createElement("div",{className:"col-sm-3 col-md-2"},React.createElement("p",null,n.DisplayInstallationDate)),React.createElement("div",{className:"col-sm-5 col-md-6"},React.createElement("p",null,n.note)),React.createElement("div",{className:"col-sm-2 col-md-2"},React.createElement("p",null,n.products.length)),React.createElement("div",{className:"col-sm-1 col-md-1",style:{textAlign:"right"}},React.createElement("img",{className:"icon-button",src:"../../../Static/Images/SVG/edit.svg",onClick:this.toggleEditing.bind(null,t)}))),React.createElement("br",null))}},{key:"render",value:function(){return React.createElement("div",null,React.createElement("div",{className:"row ",style:{fontWeight:"bold"}},React.createElement("br",null),React.createElement("div",{className:"col-sm-1 col-md-1"},"Id"),React.createElement("div",{className:"col-sm-3 col-md-2"},"Installasjonsdato"),React.createElement("div",{className:"col-sm-5 col-md-6"},"Notat"),React.createElement("div",{className:"col-sm-2 col-md-2"},"Antall produkter"),React.createElement("div",{className:"col-sm-1 col-md-1",style:{textAlign:"right"}},"Endre")),React.createElement("ul",{className:"installation-list"},this.props.items.map(function(n,t){return React.createElement("li",{key:t},this.renderItemOrEditField(n,t))}.bind(this))))}}]),t}(React.Component),NewLocationModal=function(n){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,Object.getPrototypeOf(t).apply(this,arguments))}return _inherits(t,n),_createClass(t,[{key:"render",value:function(){return this.props.show?React.createElement("div",{className:"modal-backdrop"},React.createElement("div",{className:"modal-content"},React.createElement("div",{className:"header"},React.createElement("div",{className:"row"},React.createElement("div",{className:"col-sm-12 col-md-12"},React.createElement("h3",null,"Legg til ny adresse for installasjon #",this.props.installationid)))),this.props.children,React.createElement("div",{className:"footer"},React.createElement("div",{className:"row installation-list-item"},React.createElement("div",{className:"col-sm-offset-8 col-sm-2 col-md-offset-8 col-md-2",style:{textAlign:"right"}},React.createElement("p",null,React.createElement("button",{className:"buttonRoundedCorners",onClick:this.props.onClose,style:{width:"100%"}},"Avbryt"))),React.createElement("div",{className:"col-sm-2 col-md-2"},React.createElement("p",null,React.createElement("button",{disabled:this.props.disabled,className:"buttonRoundedCorners",onClick:this.props.onSave,style:{width:"100%"}},"Lagre"))))))):null}}]),t}(React.Component),SummaryCircle=React.createClass({displayName:"SummaryCircle",clicked:function(){this.props.clickable&&this.props.onClick()},render:function(){return React.createElement("div",{className:this.props.clickable?"summaryCircleWrapper isButton":"summaryCircleWrapper",onClick:this.clicked},React.createElement("div",{className:"circleCenterer"},React.createElement("div",{className:"summaryCircle "+this.props.activeClass},this.props.number)),React.createElement("div",{className:"summaryTitle "+this.props.activeClass},this.props.title))}}),CompanyProfileBlock=React.createClass({displayName:"CompanyProfileBlock",getInitialState:function(){return{account:null}},componentWillMount:function(){this.props.account!=null&&this.setState({account:this.props.account})},getIconText:function(){return this.state.account==null?"":this.state.account.AccountName.charAt(0)},goToPage:function(n){this.props.onChangePage(n)},render:function(){if(this.state.account!=null)return React.createElement("div",{className:"myPageBlockContainer"},React.createElement("div",{className:"myPageBlockWrapper col-md-12 col-sm-12 col-xs-12"},React.createElement("h1",{className:"noBottomMargin",onClick:this.goToPage.bind(this,"AccountProfile")},this.props.account.IsEndCustomer==!0?this.props.localizedStrings.menuLinkAccountProfilePrivate:this.props.localizedStrings.menuLinkAccountProfileBusiness),React.createElement("div",{className:"myPageBlockIconRow col-md-12 col-sm-12 col-xs-12"},React.createElement("div",{className:"companyIconCircle"},this.state.account.AccountName.charAt(0))),React.createElement("div",{className:"row"},React.createElement("div",{className:"col-md-5 col-sm-5 col-xs-5 profileLabel"},this.props.localizedStrings.labelName,":"),React.createElement("div",{className:"col-md-7 col-sm-7 col-xs-7 profileText"},this.state.account.AccountName)),React.createElement("div",{className:"row"},React.createElement("div",{className:"col-md-5 col-sm-5 col-xs-5 profileLabel"},this.props.localizedStrings.labelAddress,":"),React.createElement("div",{className:"col-md-7 col-sm-7 col-xs-7 profileText"},this.state.account.StreetAddress1)),React.createElement("div",{className:"row"},React.createElement("div",{className:"col-md-5 col-sm-5 col-xs-5 profileLabel"},this.props.localizedStrings.labelPostCode,":"),React.createElement("div",{className:"col-md-7 col-sm-7 col-xs-7 profileText"},this.state.account.PostalCode)),React.createElement("div",{className:"row"},React.createElement("div",{className:"col-md-5 col-sm-5 col-xs-5 profileLabel"},this.props.localizedStrings.labelCity,":"),React.createElement("div",{className:"col-md-7 col-sm-7 col-xs-7 profileText"},this.state.account.City)),React.createElement("div",{className:"row"},React.createElement("div",{className:"col-md-5 col-sm-5 col-xs-5 profileLabel"},this.props.localizedStrings.labelPhone,":"),React.createElement("div",{className:"col-md-7 col-sm-7 col-xs-7 profileText"},this.state.account.Phone)),this.state.account.IsEndCustomer==!0?React.createElement("div",{className:"row"},React.createElement("div",{className:"col-md-5 col-sm-5 col-xs-5 profileLabel"},this.props.localizedStrings.labelMobile,":"),React.createElement("div",{className:"col-md-7 col-sm-7 col-xs-7 profileText"},this.state.account.MobilePhone)):null,React.createElement("div",{className:"row"},React.createElement("div",{className:"col-md-5 col-sm-5 col-xs-5 profileLabel"},this.props.localizedStrings.labelEmail,":"),React.createElement("div",{className:"col-md-7 col-sm-7 col-xs-7 profileText"},this.state.account.Email)),React.createElement("div",{className:"row"},React.createElement("div",{className:"profileEditButton",onClick:this.goToPage.bind(this,"AccountProfile")}))))}}),CompanyServiceAssignmentsBlock=React.createClass({displayName:"CompanyServiceAssignmentsBlock",goToPage:function(n){this.props.onChangePage(n)},render:function(){return React.createElement("div",{className:"myPageBlockContainer"},React.createElement("div",{className:"myPageBlockWrapper"},React.createElement("h1",{onClick:this.goToPage.bind(this,"Service")},this.props.title),React.createElement("div",{className:"myPageBlockImageRow"},React.createElement(SummaryCircle,{number:this.props.casesData.NrOfActiveServiceCases,title:this.props.localizedStrings.labelActive}),React.createElement(SummaryCircle,{number:this.props.casesData.NrOfResolvedServiceCases,title:this.props.localizedStrings.labelDone}),React.createElement(SummaryCircle,{number:this.props.casesData.NrOfActiveServiceCases+this.props.casesData.NrOfResolvedServiceCases,title:this.props.localizedStrings.labelAll})),React.createElement("div",{className:"myPageBlockDescriptionRow"},this.props.description),React.createElement("div",{className:"myPageBlockLinkRow"},React.createElement("a",{href:this.props.linkurl},this.props.linktext))))}}),CompanyComplaintsBlock=React.createClass({displayName:"CompanyComplaintsBlock",goToPage:function(n){this.props.onChangePage(n)},render:function(){return React.createElement("div",{className:"myPageBlockContainer"},React.createElement("div",{className:"myPageBlockWrapper"},React.createElement("h1",{onClick:this.goToPage.bind(this,"Complaint")},this.props.title),React.createElement("div",{className:"myPageBlockImageRow"},React.createElement(SummaryCircle,{number:this.props.casesData.NrOfActiveCustomerCases,title:this.props.localizedStrings.labelActive}),React.createElement(SummaryCircle,{number:this.props.casesData.NrOfResolvedCustomerCases,title:this.props.localizedStrings.labelDone}),React.createElement(SummaryCircle,{number:this.props.casesData.NrOfActiveCustomerCases+this.props.casesData.NrOfResolvedCustomerCases,title:this.props.localizedStrings.labelAll})),React.createElement("div",{className:"myPageBlockDescriptionRow"},this.props.description),React.createElement("div",{className:"myPageBlockLinkRow"},React.createElement("a",{href:this.props.linkurl},this.props.linktext))))}}),EditButtons=React.createClass({displayName:"EditButtons",render:function(){return React.createElement("div",{className:"buttonsContainer"},React.createElement("div",{className:"buttonWrapper",onClick:this.props.onCancel},React.createElement("div",{className:"cancelButton"}),React.createElement("div",{className:"buttonLabel"},this.props.cancelButtonText)),React.createElement("div",{className:"buttonWrapper",onClick:this.props.onSave},React.createElement("div",{className:"okButton"}),React.createElement("div",{className:"buttonLabel"},this.props.okButtonText)))}}),MyPageDashboardPage=React.createClass({displayName:"MyPageDashboardPage",changePage:function(n){this.props.onChangePage(n)},getRightSideBlocks:function(){var t=[],r=this.props.blocks,n;for(i in r)n=r[i],n.Type==="ContactInfoBlock"&&t.push(React.createElement("div",{className:"col-md-4 col-sm-6 col-xs-12"},React.createElement(ContactInfoBlockComponent,{key:i,imageUrl:n.ImageUrl,title:n.Title,description:n.Description,phone:n.PhoneNumber,email:n.Email})));return t},render:function(){return React.createElement("div",{className:"row"},React.createElement("div",{className:""},React.createElement("div",{className:"col-md-4 col-sm-6 col-xs-12"},React.createElement(CompanyProfileBlock,{account:this.props.account,onChangePage:this.changePage,localizedStrings:this.props.localizedProfileStrings})),this.props.hideServiceCases==!1&&this.props.contact.IsServicePartner==!0?React.createElement("div",{className:"col-md-4 col-sm-6 col-xs-12"},React.createElement(CompanyServiceAssignmentsBlock,{title:this.props.epimodel.ServiceMissionsBlockTitle,description:this.props.epimodel.ServiceMissionsBlockDescription,casesData:this.props.casesData,onChangePage:this.changePage,localizedStrings:this.props.localizedSummaryCircleStrings})):null,this.props.hideClaims==!1?React.createElement("div",{className:"col-md-4 col-sm-6 col-xs-12"},React.createElement(CompanyComplaintsBlock,{title:this.props.epimodel.ComplaintsBlockTitle,description:this.props.epimodel.ComplaintsBlockDescription,casesData:this.props.casesData,onChangePage:this.changePage,localizedStrings:this.props.localizedSummaryCircleStrings})):null,this.getRightSideBlocks()))}}),MyPage=React.createClass({displayName:"MyPage",getInitialState:function(){return{casesData:[],epimodel:[],activePartialPage:null,account:null,contact:[],showSpinner:!0,serviceCaseList:null,customerCaseList:null,selectedPageIndex:1,selectedMenuItemName:"Oversikt",selectedMenuItem:0,dropdownMenuClass:"hidden",menuLocalizedStrings:null,profileLocalizedStrings:null,serviceCasesLocalizedStrings:null,summaryCircleLocalizedStrings:null,subscriptionLocalizedStrings:null,hideServiceCases:!1,hideClaims:!1}},componentWillMount:function(){var acc=null,cont=[];this.props.account!==null&&(acc=eval("("+this.props.account+")"));this.props.account!=null&&(cont=eval("("+this.props.user+")"));var epi=eval("("+this.props.epimodel+")"),hideServiceCases=epi.ServiceMissionsHideInLanguage=="True"?!0:!1,hideClaims=epi.ClaimsHideInLanguage=="True"?!0:!1;this.setState({epimodel:epi,account:acc,contact:cont,menuLocalizedStrings:this.props.menuStrings,profileLocalizedStrings:this.props.profileStrings,serviceCasesLocalizedStrings:this.props.serviceCasesStrings,summaryCircleLocalizedStrings:this.props.summaryCircleStrings,complaintsLocalizedStrings:this.props.complaintsStrings,hideServiceCases:hideServiceCases,hideClaims:hideClaims});acc!=null?axios.get("/api/Cases/GetAllCases/",{params:{accountId:acc.Id}},{responseType:"json"}).then(function(n){this.setState({casesData:n.data,showSpinner:!1,activePartialPage:React.createElement(MyPageDashboardPage,{epimodel:epi,casesData:n.data,account:acc,contact:cont,onChangePage:this.changePage,blocks:this.props.dashboardBlocks,localizedProfileStrings:this.props.profileStrings,localizedSummaryCircleStrings:this.props.summaryCircleStrings,hideServiceCases:this.state.hideServiceCases,hideClaims:this.state.hideClaims})});var t="Dashboard";this.props.view=="1"?t="Dashboard":this.props.view=="2"?t="Service":this.props.view=="3"?t="Complaint":this.props.view=="4"?t="MyProfile":this.props.view=="5"&&(t="AccountProfile");this.changePage(t)}.bind(this)).catch(function(){}.bind(this)):this.setState({showSpinner:!1})},goToInitialPage:function(){},getPartialPage:function(){return this.state.activePartialPage==null?React.createElement(MyPageDashboardPage,{epimodel:this.state.epimodel,casesData:this.state.casesData,blocks:this.props.dashboardBlocks,localizedProfileStrings:this.state.profileLocalizedStrings,localizedSummaryCircleStrings:this.state.summaryCircleLocalizedStrings,hideServiceCases:this.state.hideServiceCases,hideClaims:this.state.hideClaims}):this.state.activePartialPage},setServiceCaseList:function(n){this.setState({serviceCaseList:n})},setCustomerCaseList:function(n){this.setState({customerCaseList:n})},updateCasesData:function(){var n=this.state.casesData;n.NrOfActiveCustomerCases=this.state.casesData.NrOfActiveCustomerCases+1;this.setState({casesData:n})},setSubscriptionLocalizedStrings:function(n){this.setState({subscriptionLocalizedStrings:n})},changePage:function(n){if(n=="Service")this.setState({selectedPageIndex:2,activePartialPage:React.createElement(ServiceCasesOverviewPage,{epimodel:this.state.epimodel,casesData:this.state.casesData,caseList:this.state.serviceCaseList,account:this.state.account,onSetServiceCaseList:this.setServiceCaseList,localizedStrings:this.state.serviceCasesLocalizedStrings})});else if(n=="Dashboard")this.setState({selectedPageIndex:1,activePartialPage:React.createElement(MyPageDashboardPage,{epimodel:this.state.epimodel,casesData:this.state.casesData,account:this.state.account,contact:this.state.contact,blocks:this.props.dashboardBlocks,onChangePage:this.changePage,localizedProfileStrings:this.state.profileLocalizedStrings,localizedSummaryCircleStrings:this.state.summaryCircleLocalizedStrings,hideServiceCases:this.state.hideServiceCases,hideClaims:this.state.hideClaims})});else if(n=="Complaint")this.setState({selectedPageIndex:3,activePartialPage:React.createElement(ComplaintsOverviewPage,{epimodel:this.state.epimodel,onUpdate:this.updateCasesData,casesData:this.state.casesData,caseList:this.state.customerCaseList,account:this.state.account,contact:this.state.contact,onSetCustomerCaseList:this.setCustomerCaseList,localizedStrings:this.state.complaintsLocalizedStrings,newComplaintPlaceholder:this.props.newComplaintPlaceholder})});else{if(n=="Subscription")return this.setState({showSpinner:!0}),window.location.href=this.props.subscriptionPagePath,!1;n=="MyProfile"?this.setState({selectedPageIndex:5,activePartialPage:React.createElement(ContactProfilePage,{epimodel:this.state.epimodel,onUpdateProfile:this.updateContact,account:this.state.account,contact:this.state.contact,localizedStrings:this.state.profileLocalizedStrings})}):n=="AccountProfile"&&this.setState({selectedPageIndex:6,activePartialPage:React.createElement(AccountProfilePage,{epimodel:this.state.epimodel,onUpdateContactProfile:this.updateContact,onUpdateAccountProfile:this.updateAccount,account:this.state.account,contact:this.state.contact,localizedStrings:this.state.profileLocalizedStrings})})}},isActive:function(n){return n===this.state.selectedPageIndex?"active":""},isActiveMenuItem:function(n){return n===this.state.selectedMenuItem?"active":""},update:function(n,t){var i=t.target.innerText,r=t.target.value;this.setState({selectedMenuItemName:i,selectedMenuItem:r,dropdownMenuClass:"hidden"});this.changePage(n)},updateContact:function(n){this.setState({contact:n})},updateAccount:function(n){this.setState({account:n})},triggerDropdownMenu:function(){this.state.dropdownMenuClass=="hidden"?this.setState({dropdownMenuClass:""}):this.setState({dropdownMenuClass:"hidden"})},getRightSideBlocks:function(){var blocks=[],myBlocks=eval("("+this.props.blocks+")"),currentBlock;for(i in myBlocks)currentBlock=myBlocks[i],currentBlock.Type==="ThemeBlock"?blocks.push(React.createElement(ThemeBlockComponent,{key:i,imageUrl:currentBlock.ImageUrl,title:currentBlock.Title,description:currentBlock.Description,url:currentBlock.Url,buttontext:currentBlock.ButtonText,bootstrapclass:"col-md-12 col-xs-12 col-sm-6"})):currentBlock.Type==="ProductTeaser"?blocks.push(React.createElement(ProductTeaserBlockComponent,{key:i,imageUrl:currentBlock.ImageUrl,title:currentBlock.Title,description:currentBlock.Description,bootstrapclass:"col-md-12 col-xs-12 col-sm-6"})):currentBlock.Type==="ContactInfoBlock"&&blocks.push(React.createElement(ContactInfoBlockComponent,{key:i,imageUrl:currentBlock.ImageUrl,title:currentBlock.Title,description:currentBlock.Description,phone:currentBlock.PhoneNumber,email:currentBlock.Email,bootstrapclass:"col-md-12 col-xs-12 col-sm-6"}));return blocks},render:function(){return React.createElement("div",{className:"myPageWrapper mainBodyWrapper"},React.createElement("div",{className:"container"},React.createElement(StandardTopBannerComponent,{title:this.props.title,preamble:this.props.description}),this.state.account==null?React.createElement("div",{className:"row print-subHeader"},React.createElement("div",{className:"col-md-12 noMyPageLabel"},React.createElement(LocalizedText,{xpath:"/mypage/labels/nomypage"}))):React.createElement("div",{className:"row"},React.createElement("div",{className:"col-sm-12 partialPageMenuWrapper"},React.createElement("a",{className:this.isActive(1)+" menuLink",onClick:this.changePage.bind(this,"Dashboard")},this.state.menuLocalizedStrings.menuLinkDashboard),this.state.hideServiceCases==!1&&this.state.account!=null&&this.state.account.IsServicePartner==!0?React.createElement("a",{className:this.isActive(2)+" menuLink",onClick:this.changePage.bind(this,"Service")},this.state.menuLocalizedStrings.menuLinkServiceCases):null,this.state.hideClaims==!1?React.createElement("a",{className:this.isActive(3)+" menuLink",onClick:this.changePage.bind(this,"Complaint")},this.state.menuLocalizedStrings.menuLinkComplaints):null,this.props.subscriptionPagePath!=null&&this.props.subscriptionPagePath!=undefined?React.createElement("a",{className:this.isActive(4)+" menuLink",onClick:this.changePage.bind(this,"Subscription")},this.state.menuLocalizedStrings.menuLinkSubscriptions):null,this.state.account!=null&&this.state.account.IsProfPartner==!0?React.createElement("a",{className:this.isActive(5)+" menuLink",onClick:this.changePage.bind(this,"MyProfile")},this.state.menuLocalizedStrings.menuLinkContactProfile):null,React.createElement("a",{className:this.isActive(6)+" menuLink",onClick:this.changePage.bind(this,"AccountProfile")},this.state.account==null||this.state.account.IsEndCustomer==!0?this.state.menuLocalizedStrings.menuLinkAccountProfilePrivate:this.state.menuLocalizedStrings.menuLinkAccountProfileBusiness),this.state.account!=null&&this.props.profInfoMenuVisible==!0?React.createElement("a",{className:"menuLink",href:this.props.ProfInfoPage},this.state.menuLocalizedStrings.menuLinkProfInfo):null),React.createElement("div",{className:"dropdownMenuWrapper col-xs-10 col-xs-offset-1 subMenu"},React.createElement("button",null,"toggle"),React.createElement("div",{className:"selectedMenuItem",onClick:this.triggerDropdownMenu},this.state.selectedMenuItemName),React.createElement("ul",{className:this.state.dropdownMenuClass+" dropdownMenu"},React.createElement("li",{value:0,name:"Dashboard",className:this.isActiveMenuItem(0),onClick:this.update.bind(this,"Dashboard")},this.state.menuLocalizedStrings.menuLinkDashboard),this.state.hideServiceCases==!1&&this.state.account!=null&&this.state.account.IsServicePartner==!0?React.createElement("li",{value:1,name:"Service",className:this.isActiveMenuItem(1),onClick:this.update.bind(this,"Service")},this.state.menuLocalizedStrings.menuLinkServiceCases):null,this.state.hideClaims==!1?React.createElement("li",{value:2,name:"Complaint",className:this.isActiveMenuItem(2),onClick:this.update.bind(this,"Complaint")},this.state.menuLocalizedStrings.menuLinkComplaints):null,this.props.subscriptionPagePath!=null&&this.props.subscriptionPagePath!=undefined?React.createElement("li",{value:3,name:"Subscription",className:this.isActiveMenuItem(3),onClick:this.update.bind(this,"Subscription")},this.state.menuLocalizedStrings.menuLinkSubscriptions):null,this.state.account!=null&&this.state.account.IsProfPartner==!0?React.createElement("li",{value:4,name:"MyProfile",className:this.isActiveMenuItem(4),onClick:this.update.bind(this,"MyProfile")},this.state.menuLocalizedStrings.menuLinkContactProfile):null,React.createElement("li",{value:5,name:"AccountProfile",className:this.isActiveMenuItem(5),onClick:this.update.bind(this,"AccountProfile")},this.state.account==null||this.state.account.IsEndCustomer==!0?this.state.menuLocalizedStrings.menuLinkAccountProfilePrivate:this.state.menuLocalizedStrings.menuLinkAccountProfileBusiness),this.state.account!=null&&this.props.profInfoMenuVisible==!0?React.createElement("a",{href:this.props.ProfInfoPage},React.createElement("li",{value:6,name:"ProfInfo"},this.state.menuLocalizedStrings.menuLinkProfInfo)):null)),React.createElement("div",{className:"col-md-80 col-sm-12"},this.state.activePartialPage),React.createElement(AsideContent,this.props.asideBlocks)),this.state.showSpinner===!0?React.createElement("div",{className:"spinnerWrapper"},React.createElement("div",{id:"loading"}),React.createElement("div",{className:"spinner"})):null))}}),ContactProfilePage=React.createClass({displayName:"ContactProfilePage",getInitialState:function(){return{currentUser:null,showSpinner:!1,classInfoLabel:"hidden",infoText:"",classErrorLabel:"hidden",errorText:""}},componentWillMount:function(){this.setState({currentUser:this.props.contact})},setInputValue:function(n,t){var i=this.state.currentUser;n==1?i.FirstName=t.target.value:n==2?i.LastName=t.target.value:n==6?i.MobilePhone=t.target.value:n==7?i.BusinessPhone=t.target.value:n==12&&(i.ReceiveNewsletter=t.target.checked);this.setState({currentUser:i})},updateContact:function(){this.setState({classErrorLabel:"hidden",classInfoLabel:"hidden"});this.setNewsletterInterest();axios.post("/api/Contact/UpdateContact",{contactId:this.state.currentUser.Id,firstname:this.state.currentUser.FirstName,lastname:this.state.currentUser.LastName,phone:this.state.currentUser.BusinessPhone,mobilePhone:this.state.currentUser.MobilePhone}).then(function(n){if(this.setState({showSpinner:!1}),n.data!=null)if(n.data.Success==!0){this.setState({classInfoLabel:"",infoText:n.data.Message});this.props.onUpdateProfile(this.state.currentUser)}else this.setState({classErrorLabel:"",errorText:n.data.Message});else this.setState({classErrorLabel:"",errorText:this.props.localizedStrings.errorTextSomethingWentWrong})}.bind(this)).catch(function(){this.setState({showSpinner:!1})}.bind(this))},setNewsletterInterest:function(){this.setState({showSpinner:!0});axios.get("/api/Contact/SetNewsletterInterest",{params:{userId:this.state.currentUser.Id,interest:this.state.currentUser.ReceiveNewsletter}}).then(function(n){if(this.setState({showSpinner:!1}),n.data!=null){if(n.data.Success==!0){this.setState({classInfoLabel:"",infoText:n.data.Message});this.props.onUpdateProfile(this.state.currentUser)}}else this.setState({classErrorLabel:"",errorText:this.state.localizedStrings.errorTextSomethingWentWrong})}.bind(this)).catch(function(){this.setState({showSpinner:!1})}.bind(this))},render:function(){return React.createElement("div",null,React.createElement("div",{className:"row loginPageContainer"},React.createElement("div",{className:"col-md-12"},React.createElement("h1",{className:"partialPageHeader"},this.props.localizedStrings.menuLinkContactProfile)),React.createElement("div",{id:"infoLabel",className:this.state.classInfoLabel+" col-md-12 infoLabelWrapper "},React.createElement("label",{className:"infoLabel"},this.state.infoText)),React.createElement("div",{id:"errorLabel",className:this.state.classErrorLabel+" col-md-12 infoLabelWrapper "},React.createElement("label",{className:"errorLabel"},this.state.errorText)),React.createElement("div",{className:"col-md-8 col-md-offset-2 col-sm-10 col-sm-offset-1 col-xs-12  registerFormWrapper"},React.createElement("section",{className:"registerFormElement"},React.createElement("div",{className:"col-md-3 col-sm-3 sectionTitle"},React.createElement("label",{className:"textBoxLabel"},this.props.localizedStrings.sectionTitleName)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("input",{type:"text",className:"normalTextBox",placeholder:this.props.localizedStrings.placeholderFirstName,value:this.state.currentUser.FirstName,onChange:this.setInputValue.bind(this,1)}),React.createElement("input",{type:"text",className:"normalTextBox",placeholder:this.props.localizedStrings.placeholderLastName,value:this.state.currentUser.LastName,onChange:this.setInputValue.bind(this,2)}))),React.createElement("section",{className:"registerFormElement"},React.createElement("div",{className:"col-md-3 col-sm-3  sectionTitle"},React.createElement("label",{className:"textBoxLabel"},this.props.localizedStrings.sectionTitleContactInfo)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("input",{type:"text",className:"normalTextBox",placeholder:this.props.localizedStrings.labelMobile,value:this.state.currentUser.MobilePhone,onChange:this.setInputValue.bind(this,6)}),React.createElement("input",{type:"text",className:"normalTextBox",placeholder:this.props.localizedStrings.labelPhone,value:this.state.currentUser.BusinessPhone,onChange:this.setInputValue.bind(this,7)}),React.createElement("input",{type:"text",className:"normalTextBox",disabled:!0,placeholder:this.props.localizedStrings.labelEmail,value:this.state.currentUser.Email,onChange:this.setInputValue.bind(this,8)}))),React.createElement("section",{className:"registerFormElement"},React.createElement("div",{className:"col-md-3 col-sm-3  sectionTitle"},React.createElement("label",{className:"textBoxLabel"},this.props.localizedStrings.sectionTitleNewsletter)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("input",{type:"checkbox",className:"checkbox",checked:this.state.currentUser.ReceiveNewsletter,onChange:this.setInputValue.bind(this,12)}),React.createElement("label",{className:"checkboxLabel"},this.props.localizedStrings.checkBoxTextNewsletter))),React.createElement("div",{className:"buttonWrapper col-md-12"},React.createElement("input",{type:"button",className:"buttonBigRoundedCorners_blue loginButton",value:this.props.localizedStrings.buttonTextSaveMyProfile,onClick:this.updateContact})))),this.state.showSpinner===!0?React.createElement(Spinner,null):null)}}),AccountProfilePage=React.createClass({displayName:"AccountProfilePage",getInitialState:function(){return{currentAccount:null,showSpinner:!1,classInfoLabel:"hidden",infoText:"",currentUser:null,classErrorLabel:"hidden",errorText:""}},componentWillMount:function(){this.setState({currentAccount:this.props.account,currentUser:this.props.contact})},setInputValue:function(n,t){var i=this.state.currentAccount,r=this.state.currentUser;n==6?i.MobilePhone=t.target.value:n==7?i.Phone=t.target.value:n==12&&(r.ReceiveNewsletter=t.target.checked);this.setState({currentAccount:i,currentUser:r})},updateAccount:function(){this.setState({classErrorLabel:"hidden",classInfoLabel:"hidden",showSpinner:!0});this.state.currentAccount.IsEndCustomer==!0&&(this.setNewsletterInterest(),axios.post("/api/Account/UpdateAccount",{accountId:this.state.currentAccount.Id,phone:this.state.currentAccount.Phone,mobilePhone:this.state.currentAccount.MobilePhone}).then(function(n){if(this.setState({showSpinner:!1}),n.data!=null)if(n.data.Success==!0){this.setState({classInfoLabel:"",infoText:n.data.Message});this.props.onUpdateAccountProfile(this.state.currentAccount)}else this.setState({classErrorLabel:"",errorText:n.data.Message});else this.setState({classErrorLabel:"",errorText:this.props.localizedStrings.errorTextSomethingWentWrong})}.bind(this)).catch(function(){this.setState({showSpinner:!1})}.bind(this)))},setNewsletterInterest:function(){this.setState({showSpinner:!0});axios.get("/api/Contact/SetNewsletterInterest",{params:{userId:this.state.currentUser.Id,interest:this.state.currentUser.ReceiveNewsletter}}).then(function(n){if(this.setState({showSpinner:!1}),n.data!=null){if(n.data.Success==!0){this.setState({classInfoLabel:"",infoText:n.data.Message});this.props.onUpdateContactProfile(this.state.currentUser)}}else this.setState({classErrorLabel:"",errorText:this.props.localizedStrings.errorTextSomethingWentWrong})}.bind(this)).catch(function(){this.setState({showSpinner:!1})}.bind(this))},render:function(){return React.createElement("div",null,React.createElement("div",{className:"row loginPageContainer mainBodyWrapper"},React.createElement("div",{className:"col-md-12"},React.createElement("h1",{className:"partialPageHeader"},this.state.currentAccount.IsEndCustomer==!0?this.props.localizedStrings.menuLinkAccountProfilePrivate:this.props.localizedStrings.menuLinkAccountProfileBusiness)),React.createElement("div",{id:"infoLabel",tabIndex:"0",className:this.state.classInfoLabel+" col-md-12 infoLabelWrapper "},React.createElement("label",{className:"infoLabel"},this.state.infoText)),React.createElement("div",{id:"errorLabel",className:this.state.classErrorLabel+" col-md-12 infoLabelWrapper "},React.createElement("label",{className:"errorLabel"},this.state.errorText)),React.createElement("div",{className:"col-md-8 col-md-offset-2 col-sm-10 col-sm-offset-1 col-xs-12  registerFormWrapper"},React.createElement("section",{className:"registerFormElement"},React.createElement("div",{className:"col-md-3 col-sm-3 sectionTitle"},React.createElement("label",{className:"textBoxLabel"},this.props.localizedStrings.sectionTitleName)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("input",{type:"text",className:"normalTextBox",placeholder:this.props.localizedStrings.labelName,disabled:!0,value:this.state.currentAccount.AccountName,onChange:this.setInputValue.bind(this,1)}))),React.createElement("section",{className:"registerFormElement"},React.createElement("div",{className:"col-md-3 col-sm-3  sectionTitle"},React.createElement("label",{className:"textBoxLabel"},this.props.localizedStrings.sectionTitleAddress)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("input",{type:"text",className:"normalTextBox",disabled:!0,placeholder:this.props.localizedStrings.labelAddress,value:this.state.currentAccount.StreetAddress1,onChange:this.setInputValue.bind(this,3)}),React.createElement("input",{type:"text",className:"normalTextBox",disabled:!0,placeholder:this.props.localizedStrings.labelPostCode,value:this.state.currentAccount.PostalCode,onChange:this.setInputValue.bind(this,4)}),React.createElement("input",{type:"text",className:"normalTextBox",disabled:!0,placeholder:this.props.localizedStrings.labelCity,value:this.state.currentAccount.City,onChange:this.setInputValue.bind(this,5)}))),React.createElement("section",{className:"registerFormElement"},React.createElement("div",{className:"col-md-3 col-sm-3  sectionTitle"},React.createElement("label",{className:"textBoxLabel"},this.props.localizedStrings.sectionTitleContactInfo)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("input",{type:"text",className:"normalTextBox",disabled:this.state.currentAccount.IsEndCustomer==!0?!1:!0,placeholder:this.props.localizedStrings.labelMobile,value:this.state.currentAccount.MobilePhone,onChange:this.setInputValue.bind(this,6)}),React.createElement("input",{type:"text",className:"normalTextBox",disabled:this.state.currentAccount.IsEndCustomer==!0?!1:!0,placeholder:this.props.localizedStrings.labelPhone,value:this.state.currentAccount.Phone,onChange:this.setInputValue.bind(this,7)}),React.createElement("input",{type:"text",className:"normalTextBox",disabled:!0,placeholder:this.props.localizedStrings.labelEmail,value:this.state.currentAccount.Email,onChange:this.setInputValue.bind(this,8)}))),this.state.currentAccount.IsEndCustomer==!0?React.createElement("section",{className:"registerFormElement"},React.createElement("div",{className:"col-md-3 col-sm-3  sectionTitle"},React.createElement("label",{className:"textBoxLabel"},this.props.localizedStrings.sectionTitleNewsletter)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("input",{type:"checkbox",className:"checkbox",checked:this.state.currentUser.ReceiveNewsletter,onChange:this.setInputValue.bind(this,12)}),React.createElement("label",{className:"checkboxLabel"},this.props.localizedStrings.checkBoxTextNewsletter))):null,React.createElement("div",{className:"buttonWrapper col-md-12"},React.createElement("input",{type:"button",className:"buttonBigRoundedCorners_blue loginButton",disabled:this.state.currentAccount.IsEndCustomer==!0?!1:!0,value:this.props.localizedStrings.buttonTextSaveMyProfile,onClick:this.updateAccount})))),this.state.showSpinner===!0?React.createElement(Spinner,null):null)}}),ComplaintPage=React.createClass({displayName:"ComplaintPage",getInitialState:function(){return{currentCase:null,fileDropZone:null,note:"",showSpinner:!1,classInfoLabel:"hidden",infoText:""}},componentDidMount:function(){this.props.isNewCase!=null&&this.props.isNewCase==!0&&(this.setState({infoText:this.props.localizedStrings.infoTextCaseCreated,classInfoLabel:"",showSpinner:!1}),document.getElementById("infoLabel").focus(),setTimeout(function(){this.setState({infoText:"",classInfoLabel:"hidden"})}.bind(this),1e4))},goToCaseListView:function(){this.props.onChangeView()},changeContentView:function(n){function t(n,t){return(" "+n.className+" ").indexOf(" "+t+" ")>-1}t(n.target,"open")?(n.target.parentNode.getElementsByClassName("viewMode hidden")[0].className="viewMode",n.target.parentNode.getElementsByClassName("editMode")[0].className+=" hidden",n.target.className="editButton"):(this.setState({currentCase:this.props.currentCase}),n.target.parentNode.getElementsByClassName("viewMode")[0].className+=" hidden",n.target.parentNode.getElementsByClassName("editMode hidden")[0].className="editMode",n.target.className+=" open")},updateCaseType:function(n,t){var i=this.state.currentCase;i.CaseType=n;i.CaseTypeName=t;this.setState({currentCase:i})},getParentSection:function(n,t){while((n=n.parentElement)&&!n.classList.contains(t));return n},saveChanges:function(n){var t=this.getParentSection(n.target,"sectionContent");this.setState({showSpinner:!0});axios.post("/api/Cases/UpdateServiceCase",{updatedCase:this.props.currentCase}).then(function(n){if(n.status===200){t.getElementsByClassName("viewMode hidden")[0].className="viewMode";t.getElementsByClassName("editMode")[0].className+=" hidden";t.getElementsByClassName("editButton open")[0].className="editButton";this.setState({showSpinner:!1});this.props.onUpdate(this.props.currentCase)}}.bind(this)).catch(function(){this.setState({showSpinner:!1})}.bind(this))},changeStatus:function(n){var t=this.state.currentCase===null?this.props.currentCase:this.state.currentCase;t.ServiceCompanyStatusId=n.Code;t.ServiceCompanyStatusName=n.Name;this.setState({currentCase:t,showSpinner:!0});axios.post("/api/Cases/UpdateServiceCase",{updatedCase:t}).then(function(n){if(n.status===200){this.setState({showSpinner:!1});this.props.onUpdate(this.props.currentCase)}}.bind(this)).catch(function(){this.setState({showSpinner:!1})}.bind(this))},setMyDropZone:function(n){this.setState({fileDropZone:n})},updateComplaint:function(){this.setState({showSpinner:!0});this.state.fileDropZone.files!=null&&this.state.fileDropZone.files.length>0?this.state.fileDropZone.processQueue():axios.post("/api/Cases/UpdateComplaintWithoutFile",{noteText:this.state.note,caseId:this.props.currentCase.CaseId,contactId:this.props.contact.Id}).then(function(n){if(n.status===200){var t=this.props.currentCase;n.data!=null&&t.Notes.push(n.data);this.setState({infoText:this.props.localizedStrings.infoTextCaseUpdated,classInfoLabel:"",showSpinner:!1});document.getElementById("infoLabel").focus();setTimeout(function(){this.setState({infoText:"",classInfoLabel:"hidden"})}.bind(this),1e4);document.getElementById("noteArea").value="";this.props.onUpdate(t)}}.bind(this)).catch(function(){this.setState({showSpinner:!1})}.bind(this))},addFormData:function(n,t,i){i.append("note",this.state.note);i.append("caseId",this.props.currentCase.CaseId);i.append("contactId",this.props.contact.Id)},updateNote:function(n){this.setState({note:n.target.value})},getCaseNotes:function(){var t=[],n;if(this.props.currentCase.Notes!=null&&this.props.currentCase.Notes.length>0)for(i=0;i<this.props.currentCase.Notes.length;i++)n=this.props.currentCase.Notes[i],t.push(React.createElement("div",{key:i,className:"oldNoteWrapper"},React.createElement("div",{className:"noteCreatedDate"},this.props.localizedStrings.labelCreated,": ",n.CreatedDateTime),n.NoteText&&React.createElement("div",{className:"noteText"},this.props.localizedStrings.labelNote,": ",n.NoteText),n.FileName&&React.createElement("div",{className:"noteFile"},React.createElement("div",null,this.props.localizedStrings.labelAttachment,":"),React.createElement("div",null,React.createElement("a",{onClick:this.downloadFile.bind(this,n.FileName,n.DocumentBody)},n.FileName)))));return t},getFileBlob:function(n,t,i){var e,o,r,f,s,u,h;for(t=t||"",i=i||512,e=atob(n),o=[],r=0;r<e.length;r+=i){for(f=e.slice(r,r+i),s=new Array(f.length),u=0;u<f.length;u++)s[u]=f.charCodeAt(u);h=new Uint8Array(s);o.push(h)}return new Blob(o,{type:t})},downloadFile:function(n,t){var r=this.getFileBlob(t,{type:"text/csv"}),i;window.navigator.msSaveOrOpenBlob?window.navigator.msSaveBlob(r,n):(i=window.document.createElement("a"),i.href=window.URL.createObjectURL(r),i.download=n,document.body.appendChild(i),i.click(),document.body.removeChild(i))},cleanUpDropZone:function(n,t){var r,u;if(this.setState({note:null,showSpinner:!1}),r=this.props.currentCase,t!=null&&t.length>0)for(i=0;i<t.length;i++)u=t[i],r.Notes.push(u);this.state.fileDropZone.removeAllFiles();document.getElementById("noteArea").value="";this.props.onUpdate(r)},render:function(){if(this.props.localizedStrings.fileDropZoneText==null)return null;var n={parallelUploads:10,autoProcessQueue:!1,uploadMultiple:!0,clickable:!0,createImageThumbnails:!1,addRemoveLinks:!0,dictDefaultMessage:this.props.localizedStrings.fileDropZoneText,dictRemoveFile:this.props.localizedStrings.fileDeleteText,dictCancelUpoad:this.props.localizedStrings.fileAbortText},t={init:this.setMyDropZone,sending:this.addFormData,successmultiple:this.cleanUpDropZone};return React.createElement("div",{className:"row "},React.createElement("div",{className:"col-md-12"},React.createElement("h1",{className:"partialPageHeader"},this.props.currentCase.CaseNr)),React.createElement("div",{className:"col-md-12 returnLinkWrapper"},React.createElement("a",{className:"returnLink",onClick:this.goToCaseListView},this.props.localizedStrings.navigationToComplaintsList)),React.createElement("div",{id:"infoLabel",tabIndex:"0",className:this.state.classInfoLabel+" col-md-12 infoLabelWrapper "},React.createElement("label",{className:"infoLabel"},this.state.infoText)),React.createElement("section",{className:"col-md-12"},React.createElement("div",{className:"col-md-3 col-sm-3 sectionTitle"},React.createElement("label",{className:"sectionLabel"},this.props.localizedStrings.sectionTitleCaseSummary)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("div",{className:"viewMode"},React.createElement("div",null,this.props.localizedStrings.labelCreated,": ",this.props.currentCase.CreatedDateTime),React.createElement("div",null,this.props.localizedStrings.labelStatus,": ",this.props.currentCase.StatusReasonName),React.createElement("div",null,this.props.localizedStrings.labelServiceCompanyStatus,": ",this.props.currentCase.ServiceCompanyStatusName),React.createElement("div",null,this.props.localizedStrings.labelRegardingProduct,": ",this.props.currentCase.RegardingProduct),React.createElement("div",null,this.props.localizedStrings.labelCaseOwner,": ",this.props.currentCase.Owner),React.createElement("div",null,this.props.localizedStrings.labelSolution,": ",this.props.currentCase.CaseSolution),React.createElement("div",null,this.props.localizedStrings.labelCustomerErrorDescription,": ",this.props.currentCase.FullDescription)))),React.createElement("section",{className:"col-md-12"},React.createElement("div",{className:"col-md-3 col-sm-3 sectionTitle"},React.createElement("label",{className:"sectionLabel"},this.props.localizedStrings.sectionTitleEndUserInfo)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("div",{className:"viewMode"},React.createElement("div",null,this.props.localizedStrings.labelEndUser,": ",this.props.currentCase.EndUserName),React.createElement("div",null,this.props.localizedStrings.labelAddress,": ",this.props.currentCase.EndUserAddress),React.createElement("div",null,this.props.localizedStrings.labelPhone,": ",this.props.currentCase.EndUserPhone),React.createElement("div",null,this.props.localizedStrings.labelMobile,": ",this.props.currentCase.EndUserMobile),React.createElement("div",null,this.props.localizedStrings.labelEmail,": ",this.props.currentCase.EndUserEmail," ")))),React.createElement("section",{className:"col-md-12"},React.createElement("div",{className:"col-md-3 col-sm-3 sectionTitle"},React.createElement("label",{className:"sectionLabel"},this.props.localizedStrings.sectionTitleServiceCompanyInfo)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("div",{className:"viewMode"},React.createElement("div",null,this.props.localizedStrings.labelCompany,": ",this.props.currentCase.ServiceCompanyName),React.createElement("div",null,this.props.localizedStrings.labelPhone,": ",this.props.currentCase.ServiceCompanyPhone),React.createElement("div",null,this.props.localizedStrings.labelEmail,": ",this.props.currentCase.ServiceCompanyEmail)))),React.createElement("section",{className:"col-md-12"},React.createElement("div",{className:"col-md-3 col-sm-3 sectionTitle"},React.createElement("label",{className:"sectionLabel"},this.props.localizedStrings.sectionTitleProductInfo)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("div",{className:"viewMode"},React.createElement("div",null,this.props.localizedStrings.labelProductNr,": ",this.props.currentCase.ProductNr),React.createElement("div",null,this.props.localizedStrings.labelProductName,": ",this.props.currentCase.ProductName),React.createElement("div",null,this.props.localizedStrings.labelSerialNumber,": ",this.props.currentCase.SerialNumber," ")))),React.createElement("section",{className:"col-md-12"},React.createElement("div",{className:"col-md-3 col-sm-3 sectionTitle"},React.createElement("label",{className:"sectionLabel"},this.props.localizedStrings.sectionTitleUpdateCase)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("div",{className:"viewMode"},React.createElement("div",null,React.createElement("textarea",{className:"noteTextArea",id:"noteArea",placeholder:this.props.localizedStrings.placeholderNote,onChange:this.updateNote})),React.createElement(DropzoneComponent,{config:{postUrl:"/api/Cases/UpdateComplaint"},eventHandlers:t,djsConfig:n}),React.createElement("div",{className:"notesButtonWrapper"},React.createElement("input",{type:"button",className:"buttonBigRoundedCorners_blue notesButton",value:this.props.localizedStrings.complaintButtonText,onClick:this.updateComplaint}))))),React.createElement("section",{className:"col-md-12"},React.createElement("div",{className:"col-md-3 col-sm-3 sectionTitle"},React.createElement("label",{className:"sectionLabel"},this.props.localizedStrings.sectionTitlePreviousUpdates)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("div",{className:"viewMode"},this.getCaseNotes()))),this.state.showSpinner===!0?React.createElement("div",{className:"spinnerWrapper"},React.createElement("div",{id:"loading"}),React.createElement("div",{className:"spinner"})):null)}}),NewComplaintPage=React.createClass({displayName:"NewComplaintPage",getInitialState:function(){return{currentCase:null,fileDropZone:null,note:"",searchType:0,endUser:null,tempEndUserObject:null,searchError:!1,serialNumber:null,orderNumber:null,product:null,description:null,productType:null,showSpinner:!1,existingEndUser:!1,classErrorAccountName:"hidden",classErrorAddress:"hidden",classErrorZipCode:"hidden",classErrorCity:"hidden",classErrorMobile:"hidden",classErrorDescription:"hidden",classErrorProduct:"hidden",classErrorLabel:"hidden",errorText:""}},componentWillMount:function(){this.setState({currentCase:this.props.currentCase,endUser:this.props.endUser,tempEndUserObject:this.props.endUser,errorText:this.props.localizedStrings.createComplaintErrorText})},goToCaseListView:function(){this.props.onChangeView()},setMyDropZone:function(n){this.setState({fileDropZone:n})},createComplaint:function(){if(this.setState({showSpinner:!0}),!this.validateFields()){this.setState({showSpinner:!1});return}this.state.fileDropZone.files!=null&&this.state.fileDropZone.files.length>0?this.state.fileDropZone.processQueue():axios.post("/api/Cases/CreateComplaintWithoutFile",{newCase:this.state.currentCase,endUser:this.state.endUser,accountId:this.props.account.Id,contactId:this.props.contact.Id}).then(function(n){if(n.status===200){this.setState({currentCase:null,endUser:this.props.endUser,tempEndUserObject:this.props.endUser,showSpinner:!1});window.scrollTo(0,0);this.props.onUpdate(n.data)}}.bind(this)).catch(function(){this.setState({showSpinner:!1})}.bind(this))},validateFields:function(){var n=!0;return this.setState({classErrorAccountName:"hidden",classErrorAddress:"hidden",classErrorZipCode:"hidden",classErrorCity:"hidden",classErrorMobile:"hidden",classErrorDescription:"hidden",classErrorProduct:"hidden",classErrorLabel:"hidden"}),this.state.existingEndUser==!1&&((this.state.endUser.AccountName==null||this.state.endUser.AccountName=="")&&(this.setState({classErrorAccountName:""}),n=!1),(this.state.endUser.StreetAddress1==null||this.state.endUser.StreetAddress1=="")&&(this.setState({classErrorAddress:""}),n=!1),(this.state.endUser.PostalCode==null||this.state.endUser.PostalCode=="")&&(this.setState({classErrorZipCode:""}),n=!1),(this.state.endUser.City==null||this.state.endUser.City=="")&&(this.setState({classErrorCity:""}),n=!1),(this.state.endUser.MobilePhone==null||this.state.endUser.MobilePhone=="")&&(this.setState({classErrorMobile:""}),n=!1)),(this.state.currentCase.RegardingProduct==null||this.state.currentCase.RegardingProduct=="")&&(this.setState({classErrorProduct:""}),n=!1),(this.state.currentCase.FullDescription==null||this.state.currentCase.FullDescription=="")&&(this.setState({classErrorDescription:""}),n=!1),n==!1&&(this.setState({classErrorLabel:""}),window.scrollTo(0,0)),n},addFormData:function(n,t,i){i.append("EndUserId",this.state.endUser.Id);i.append("AccountName",this.state.endUser.AccountName);i.append("StreetAddress1",this.state.endUser.StreetAddress1);i.append("PostalCode",this.state.endUser.PostalCode);i.append("City",this.state.endUser.City);i.append("Mobile",this.state.endUser.MobilePhone);i.append("Email",this.state.endUser.Email);i.append("ProductGroup",this.state.currentCase.SubjectId);i.append("SerialNumber",this.state.currentCase.SerialNumber);i.append("OrderNumber",this.state.currentCase.OrderNumber);i.append("Product",this.state.currentCase.RegardingProduct);i.append("Description",this.state.currentCase.FullDescription);i.append("AccountId",this.props.account.Id);i.append("ContactId",this.props.contact.Id)},updateNote:function(n){this.setState({note:n.target.value})},getCaseNotes:function(){var t=[],n;if(this.props.currentCase.Notes!=null&&this.props.currentCase.Notes.length>0)for(i=0;i<this.props.currentCase.Notes.length;i++)n=this.props.currentCase.Notes[i],t.push(React.createElement("div",{key:i,className:"oldNoteWrapper"},React.createElement("div",{className:"noteCreatedDate"},this.props.localizedStrings.labelCreated,": ",n.CreatedDateTime),React.createElement("div",{className:"noteText"},this.props.localizedStrings.labelNote,": ",n.NoteText),React.createElement("div",{className:"noteFile"},React.createElement("div",null,this.props.localizedStrings.labelAttachment,":"),React.createElement("div",null,React.createElement("a",{onClick:this.downloadFile.bind(this,n.FileName,n.DocumentBody)},n.FileName)))));return t},getFileBlob:function(n,t,i){var e,o,r,f,s,u,h;for(t=t||"",i=i||512,e=atob(n),o=[],r=0;r<e.length;r+=i){for(f=e.slice(r,r+i),s=new Array(f.length),u=0;u<f.length;u++)s[u]=f.charCodeAt(u);h=new Uint8Array(s);o.push(h)}return new Blob(o,{type:t})},downloadFile:function(n,t){var r=this.getFileBlob(t,{type:"text/csv"}),i;window.navigator.msSaveOrOpenBlob?window.navigator.msSaveBlob(r,n):(i=window.document.createElement("a"),i.href=window.URL.createObjectURL(r),i.download=n,document.body.appendChild(i),i.click(),document.body.removeChild(i))},cleanUpDropZone:function(n,t){this.setState({note:null,showSpinner:!1});this.state.fileDropZone.removeAllFiles();document.getElementById("noteArea").value="";this.setState({currentCase:null,endUser:this.props.endUser,tempEndUserObject:this.props.endUser});window.scrollTo(0,0);this.props.onUpdate(t)},setInputValue:function(n,t){var i=this.state.endUser!=null?this.state.endUser:this.state.tempEndUserObject,r=this.state.currentCase;n=="EndUserName"?i.AccountName=t.target.value:n=="EndUserNameAddress"?i.StreetAddress1=t.target.value:n=="EndUserNamePostalCode"?i.PostalCode=t.target.value:n=="EndUserNameCity"?i.City=t.target.value:n=="EndUserMobile"?i.MobilePhone=t.target.value:n=="EndUserEmail"?i.Email=t.target.value:n=="SerialNumber"?r.SerialNumber=t.target.value:n=="OrderNumber"?r.OrderNumber=t.target.value:n=="Product"?r.RegardingProduct=t.target.value:n=="Description"&&(r.FullDescription=t.target.value);this.setState({endUser:i,currentCase:r})},updateProductType:function(n){for(var i,r,u=null,t=0;t<this.props.optionValues.optionsSubject.length;t++)i=this.props.optionValues.optionsSubject[t],i.Code==n&&(u=i.Id);r=this.state.currentCase;r.SubjectId=u;this.setState({currentCase:r})},updateSearchValue:function(n){this.setState({searchValue:n.target.value})},updateSearchType:function(n){this.setState({searchType:n})},searchForUser:function(){this.setState({showSpinner:!0});this.state.searchValue!=null&&this.state.searchValue.length>3&&(this.state.searchType==1?axios.get("/api/Account/GetAccountByPhone",{params:{phone:this.state.searchValue}},{responseType:"json"}).then(function(n){n.data!=null?this.setState({existingEndUser:!0,endUser:n.data,searchError:!1,showSpinner:!1}):this.setState({existingEndUser:!1,searchError:!0,showSpinner:!1})}.bind(this)).catch(function(){this.setState({existingEndUser:!1,searchError:!0,showSpinner:!1})}.bind(this)):axios.get("/api/Account/GetAccountByEmail",{params:{email:this.state.searchValue}},{responseType:"json"}).then(function(n){n.data!=null?this.setState({existingEndUser:!0,endUser:n.data,searchError:!1,showSpinner:!1}):this.setState({existingEndUser:!1,searchError:!0,showSpinner:!1})}.bind(this)).catch(function(){this.setState({existingEndUser:!1,searchError:!0,showSpinner:!1})}.bind(this)))},render:function(){if(this.props.localizedStrings.fileDropZoneText==null)return null;var n={parallelUploads:10,autoProcessQueue:!1,uploadMultiple:!0,clickable:!0,createImageThumbnails:!1,addRemoveLinks:!0,dictDefaultMessage:this.props.localizedStrings.fileDropZoneText,dictRemoveFile:this.props.localizedStrings.fileDeleteText,dictCancelUpoad:this.props.localizedStrings.fileAbortText},t={init:this.setMyDropZone,sending:this.addFormData,successmultiple:this.cleanUpDropZone};return React.createElement("div",{className:"row "},React.createElement("div",{className:"col-md-12"},React.createElement("h1",{className:"partialPageHeader"},this.props.localizedStrings.createComplaintTitle)),React.createElement("div",{className:"col-md-12 returnLinkWrapper"},React.createElement("a",{className:"returnLink",onClick:this.goToCaseListView},this.props.localizedStrings.navigationToComplaintsList)),React.createElement("div",{className:this.state.classErrorLabel+" col-md-12 infoLabelWrapper "},React.createElement("label",{className:"errorLabel"},this.state.errorText)),React.createElement("section",{className:"col-md-12"},React.createElement("div",{className:"col-md-3 col-sm-3 sectionTitle"},React.createElement("label",{className:"sectionLabel"},this.props.localizedStrings.sectionTitleEndUserInfo)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("div",{className:"editMode"},React.createElement("div",{className:"col-md-12 userSearchWrapper"},React.createElement("div",{className:"searchInner"},React.createElement("div",{className:"col-md-2"},this.props.localizedStrings.labelFindUser,":"),React.createElement("div",{className:"col-md-4 searchUserTextBoxWrapper"},React.createElement("input",{type:"text",onChange:this.updateSearchValue})),React.createElement("div",{className:"col-md-3"},React.createElement(DropDownList,{onUpdate:this.updateSearchType,data:this.props.optionValues.optionsCrmSearch,initialValue:0,valueField:"Code",nameField:"Name"})),React.createElement("div",{className:"col-md-2"},React.createElement("input",{type:"button",className:"buttonRoundedCorners",value:this.props.localizedStrings.buttonTextFindUser,onClick:this.searchForUser})),React.createElement("div",{className:"col-md-9 col-md-offset-2"},this.state.searchError==!0?React.createElement("label",{className:"errorLabel"},this.props.localizedStrings.errorTextFindUser):null))),React.createElement("div",{className:"col-md-2"},this.props.localizedStrings.labelEndUser,": ",React.createElement("span",{className:this.state.classErrorAccountName+" float-right errorLabel"},"*")),React.createElement("div",{className:"col-md-9"},React.createElement("input",{type:"text",onChange:this.setInputValue.bind(this,"EndUserName"),value:this.state.endUser.AccountName})),React.createElement("div",{className:"col-md-2"},this.props.localizedStrings.labelAddress,": ",React.createElement("span",{className:this.state.classErrorAddress+" float-right errorLabel"},"*")),React.createElement("div",{className:"col-md-9"},React.createElement("input",{type:"text",onChange:this.setInputValue.bind(this,"EndUserNameAddress"),value:this.state.endUser.StreetAddress1})),React.createElement("div",{className:"col-md-2"},this.props.localizedStrings.labelPostCode,": ",React.createElement("span",{className:this.state.classErrorZipCode+" float-right errorLabel"},"*")),React.createElement("div",{className:"col-md-9"},React.createElement("input",{type:"text",onChange:this.setInputValue.bind(this,"EndUserNamePostalCode"),value:this.state.endUser.PostalCode})),React.createElement("div",{className:"col-md-2"},this.props.localizedStrings.labelCity,": ",React.createElement("span",{className:this.state.classErrorCity+" float-right errorLabel"},"*")),React.createElement("div",{className:"col-md-9"},React.createElement("input",{type:"text",onChange:this.setInputValue.bind(this,"EndUserNameCity"),value:this.state.endUser.City})),React.createElement("div",{className:"col-md-2"},this.props.localizedStrings.labelMobile,": ",React.createElement("span",{className:this.state.classErrorMobile+" float-right errorLabel"},"*")),React.createElement("div",{className:"col-md-9"},React.createElement("input",{type:"text",onChange:this.setInputValue.bind(this,"EndUserMobile"),value:this.state.endUser.MobilePhone})),React.createElement("div",{className:"col-md-2"},this.props.localizedStrings.labelEmail,":"),React.createElement("div",{className:"col-md-9"},React.createElement("input",{type:"text",placeholder:this.props.newComplaintPlaceholder,onChange:this.setInputValue.bind(this,"EndUserEmail"),value:this.state.endUser.Email}))))),React.createElement("section",{className:"col-md-12"},React.createElement("div",{className:"col-md-3 col-sm-3 sectionTitle"},React.createElement("label",{className:"sectionLabel"},this.props.localizedStrings.sectionTitleProductInfo)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("div",{className:"editMode"},React.createElement("div",{className:"col-md-2 noRightPadding"},this.props.localizedStrings.labelProductType,":"),React.createElement("div",{className:"col-md-9"},React.createElement(DropDownList,{onUpdate:this.updateProductType,data:this.props.optionValues.optionsSubject,initialValue:this.props.currentCase.CaseType,valueField:"Code",nameField:"Name"})),React.createElement("div",{className:"col-md-12 descriptionWrapper"},React.createElement("label",{className:"descriptionLabel"},this.props.localizedStrings.labelProductInfoDescription)),React.createElement("div",{className:"col-md-2"},this.props.localizedStrings.labelSerialNumber,":"),React.createElement("div",{className:"col-md-9"},React.createElement("input",{type:"text",onChange:this.setInputValue.bind(this,"SerialNumber")})),React.createElement("div",{className:"col-md-2"},this.props.localizedStrings.labelOrderNumber,":"),React.createElement("div",{className:"col-md-9"},React.createElement("input",{type:"text",onChange:this.setInputValue.bind(this,"OrderNumber")}))))),React.createElement("section",{className:"col-md-12"},React.createElement("div",{className:"col-md-3 col-sm-3 sectionTitle"},React.createElement("label",{className:"sectionLabel"},this.props.localizedStrings.labelDescription)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("div",{className:"editMode"},React.createElement("div",{className:"col-md-2"},this.props.localizedStrings.labelProduct,": ",React.createElement("span",{className:this.state.classErrorProduct+" float-right errorLabel"},"*")),React.createElement("div",{className:"col-md-9"},React.createElement("input",{type:"text",onChange:this.setInputValue.bind(this,"Product")})),React.createElement("div",{className:"col-md-2"},this.props.localizedStrings.labelErrorDescription,": ",React.createElement("span",{className:this.state.classErrorDescription+" float-right errorLabel"},"*")),React.createElement("div",{className:"col-md-9"},React.createElement("textarea",{className:"noteTextArea",id:"noteArea",onChange:this.setInputValue.bind(this,"Description")})),React.createElement(DropzoneComponent,{config:{postUrl:"/api/Cases/CreateComplaint"},eventHandlers:t,djsConfig:n}),React.createElement("div",{className:"notesButtonWrapper"},React.createElement("input",{type:"button",className:"buttonBigRoundedCorners_blue notesButton",value:this.props.localizedStrings.buttonServiceReport,onClick:this.createComplaint}))))),this.state.showSpinner===!0?React.createElement("div",{className:"spinnerWrapper"},React.createElement("div",{id:"loading"}),React.createElement("div",{className:"spinner"})):null)}}),ComplaintsOverviewPage=React.createClass({displayName:"ComplaintsOverviewPage",getInitialState:function(){return{serviceCaseList:null,tableData:[],searchTempTable:[],columnsSortOrder:[],rowsPerPage:10,currentPage:0,nrOfPages:0,classBtnPrev:"hidden",classBtnNext:"hidden",selectedCase:null,classListPage:"",classCasePage:"hidden",classNewPage:"hidden",optionSetValues:[],account:null,contact:null,selectedSummaryCirleIndex:3,showCaseSpinner:!1,newCase:null,emptyCaseObject:null,tempEmptyCaseObject:null,emptyAccount:null,tempEmptyAccount:null,isNewCase:!1}},componentWillMount:function(){if(this.state.emptyAccount==null&&axios.get("/api/Account/GetNewAccount",{},{responseType:"json"}).then(function(n){this.setState({emptyAccount:n.data,tempEmptyAccount:n.data})}.bind(this)).catch(function(){}.bind(this)),this.state.emptyCaseObject==null&&axios.get("/api/Cases/GetNewCase",{},{responseType:"json"}).then(function(n){this.setState({emptyCaseObject:n.data,tempEmptyCaseObject:n.data})}.bind(this)).catch(function(){}.bind(this)),this.state.optionSetValues.length==0&&axios.get("/api/Cases/GetServiceCaseOptionValues",{params:{}},{responseType:"json"}).then(function(n){this.setState({optionSetValues:n.data})}.bind(this)).catch(function(){}.bind(this)),this.props.caseList===null)this.setState({showSpinner:!0}),axios.get("/api/Cases/GetCustomerCases",{params:{accountId:this.props.account.Id}},{responseType:"json"}).then(function(n){var t=this.props.rowsPerPage==null?10:this.props.rowsPerPage,i=n.data.length,u=parseInt(i/t,10)+(i%t>0?1:0),r="hidden";i>0&&i>t&&(r="");this.setState({serviceCaseList:n.data,tableData:n.data,searchTempTable:n.data,rowsPerPage:t,classBtnNext:r,nrOfPages:u,account:this.props.account,showSpinner:!1});this.props.onSetCustomerCaseList(n.data)}.bind(this)).catch(function(){this.setState({showSpinner:!1})}.bind(this));else{var n=this.props.rowsPerPage==null?10:this.props.rowsPerPage,t=this.props.caseList.length,r=parseInt(t/n,10)+(t%n>0?1:0),i="hidden";t>0&&t>n&&(i="");this.setState({serviceCaseList:this.props.caseList,tableData:this.props.caseList,searchTempTable:this.props.caseList,rowsPerPage:n,classBtnNext:i,nrOfPages:r,account:this.props.account})}},sortJsonArrayByProperty:function(n,t){var r,i;if(arguments.length<2)throw new Error("sortJsonArrayByProp requires 2 arguments");return r=arguments.length>2?arguments[2]:1,n&&n.constructor===Array&&(i=t.constructor===Array?t:t.split("."),n.sort(function(n,t){for(var u in i)n=n[i[u]].toUpperCase()||"|||",t=t[i[u]].toUpperCase()||"|||";return n<t?-1*r:n>t?1*r:0})),n},findColumnSortOrderEntry:function(n){return this.state.columnsSortOrder.filter(function(t){return t.column==n})},getColumnsSortOrderEntry:function(n,t){var i={};return i.column=n,i.direction=t,i},sortTableData:function(n){var i=1,r=this.findColumnSortOrderEntry(n),u,t;r.length==0?(t=this.state.columnsSortOrder.slice(),t.push(this.getColumnsSortOrderEntry(n,i)),this.setState({columnsSortOrder:t})):(i=r[0].direction*-1,u=this.state.columnsSortOrder.map(function(n){return n.column}).indexOf(n),t=this.state.columnsSortOrder.slice(),t.splice(u,1),t.push(this.getColumnsSortOrderEntry(n,i)),this.setState({columnsSortOrder:t}));t=this.sortJsonArrayByProperty(this.state.tableData,n,i);this.setState({tableData:t})},goToCaseView:function(n){this.setState({isNewCase:!1});var t=this.state.tableData[n];this.changeToCaseView(t)},changeToCaseView:function(n){n.IsUpdated===!1?(this.setState({showSpinner:!0}),axios.get("/api/Cases/GetAllCaseData",{params:{caseId:n.CaseId}},{responseType:"json"}).then(function(n){n.data!=null&&this.setState({selectedCase:n.data,classListPage:"hidden",classCasePage:""});this.setState({showSpinner:!1});this.updateCurrentCase(n.data)}.bind(this)).catch(function(){this.setState({showSpinner:!1,classListPage:"hidden",classCasePage:""})}.bind(this))):this.setState({selectedCase:n,classListPage:"hidden",classCasePage:""})},goToNewCaseView:function(){this.setState({newCase:{},classListPage:"hidden",classCasePage:"hidden",classNewPage:""})},getTable:function(){var r=[],t,n;for(r.push(React.createElement("tr",{key:this.state.tableData.length,className:"tableRow"},React.createElement("th",{className:"tableCol tableHeader"},React.createElement("div",{className:"columnInner"},this.props.localizedStrings.tableHeaderCaseNr)),React.createElement("th",{className:"tableCol tableHeader hideOnSmallDevice"},React.createElement("div",{className:"columnInner"},this.props.localizedStrings.tableHeaderProduct)),React.createElement("th",{className:"tableCol tableHeader sortable",onClick:this.sortTableData.bind(this,"StatusReasonName")},React.createElement("div",{className:"columnInner"},this.props.localizedStrings.tableHeaderStatus),React.createElement(OrderByArrows,null)),React.createElement("th",{className:"tableCol tableHeader sortable",onClick:this.sortTableData.bind(this,"CreatedDateTimeSortValue")},React.createElement("div",{className:"columnInner"},this.props.localizedStrings.tableHeaderCreatedDate),React.createElement(OrderByArrows,null)),React.createElement("th",{className:"tableCol tableHeader hideOnMediumDevice"},React.createElement("div",{className:"columnInner"},this.props.localizedStrings.tableHeaderEndUser)),React.createElement("th",{className:"tableCol tableHeader sortable hideOnSmallDevice",onClick:this.sortTableData.bind(this,"CustomerContactName")},React.createElement("div",{className:"columnInner"},this.props.localizedStrings.tableHeaderContactPersonDealer),React.createElement(OrderByArrows,null)),React.createElement("th",{className:"tableCol tableHeader hideOnMediumDevice"},React.createElement("div",{className:"columnInner"},this.props.localizedStrings.tableHeaderContactPerson)))),t=this.state.currentPage*this.state.rowsPerPage,i=0;i<this.state.rowsPerPage;i++)if(this.state.tableData.length>0&&(n=this.state.tableData[t],r.push(React.createElement("tr",{key:i,className:"tableRow",onClick:this.goToCaseView.bind(this,t)},React.createElement("td",{className:"tableCol"},React.createElement("div",{className:"columnInner"},n.CaseNr)),React.createElement("td",{className:"tableCol hideOnSmallDevice"},React.createElement("div",{className:"columnInner"},n.ProductName)),React.createElement("td",{className:"tableCol"},React.createElement("div",{className:"columnInner"},n.StatusReasonName)),React.createElement("td",{className:"tableCol"},React.createElement("div",{className:"columnInner"},n.CreatedDateTime)),React.createElement("td",{className:"tableCol hideOnMediumDevice"},React.createElement("div",{className:"columnInner"},n.EndUserName)),React.createElement("td",{className:"tableCol hideOnSmallDevice"},React.createElement("div",{className:"columnInner"},n.CustomerContactName)),React.createElement("td",{className:"tableCol hideOnMediumDevice"},React.createElement("div",{className:"columnInner"},n.Owner))))),t++,i+1==this.state.tableData.length||t==this.state.tableData.length)break;return React.createElement("table",{className:"table"},React.createElement("tbody",null,r))},goToTablePage:function(n){this.setState({currentPage:n});n>0?(this.setState({classBtnPrev:""}),n+1==this.state.nrOfPages?this.setState({classBtnNext:"hidden"}):this.setState({classBtnNext:""})):n==0&&(this.setState({classBtnPrev:"hidden"}),this.state.nrOfPages>1&&this.setState({classBtnNext:""}))},getPagination:function(){var n=[];for(i=1;i<=this.state.nrOfPages;i++)n.push(React.createElement("input",{key:i,type:"button",className:"btnPaginatePage",value:i,onClick:this.goToTablePage.bind(this,i-1)}));return React.createElement("div",{className:"paginationWrapper"},React.createElement("div",{className:"paginationButtons"},React.createElement("input",{type:"button",className:this.state.classBtnPrev+" btnPaginatePrevious",value:this.props.localizedStrings.paginationPrevious,onClick:this.goToTablePage.bind(this,this.state.currentPage-1)}),n,React.createElement("input",{type:"button",className:this.state.classBtnNext+" btnPaginateNext",value:this.props.localizedStrings.paginationNext,onClick:this.goToTablePage.bind(this,this.state.currentPage+1)})))},searchInTableData:function(n){return Object.values=Object.values||function(n){return Object.keys(n).map(function(t){return n[t]})},this.state.searchTempTable.filter(function(t){for(var r=Object.values(t),i=0;i<r.length;i++)if(r[i]!=null&&r[i].toString().toUpperCase().search(n.toUpperCase())>=0)return!0;return!1})},filterTableData:function(n){var t=3,i=this.state.serviceCaseList.filter(function(i){return n=="Active"?(t=1,i.Resolved===!1)?!0:!1:n=="Resolved"?(t=2,i.Resolved===!0)?!0:!1:n=="All"?(t=3,!0):!1}),r=parseInt(i.length/this.state.rowsPerPage,10)+(i.length%this.state.rowsPerPage>0?1:0);this.setState({tableData:i,searchTempTable:i,nrOfPages:r,selectedSummaryCirleIndex:t})},search:function(n){var t=[],i;t=n===""?this.state.searchTempTable:this.searchInTableData(n);i=parseInt(t.length/this.state.rowsPerPage,10)+(t.length%this.state.rowsPerPage>0?1:0);this.setState({tableData:t,nrOfPages:i})},changeToThisView:function(){this.setState({newCase:null,selectedCase:null,classListPage:"",classCasePage:"hidden",classNewPage:"hidden"})},isActive:function(n){return n===this.state.selectedSummaryCirleIndex?"active":""},updateCurrentCase:function(n){for(var i,r=this.state.serviceCaseList.slice(),t=0,u=r.length;t<u;t++)if(r[t].CaseId===n.CaseId){r[t]=n;break}for(i=this.state.tableData,t=0;t<i.length;t++)if(i[t].CaseId===n.CaseId){i[t]=n;break}this.setState({selectedCase:n,serviceCaseList:r,tableData:i})},addNewCase:function(n){var i=this.state.serviceCaseList.slice(),t;i.unshift(n);t=this.state.tableData;t.unshift(n);this.setState({selectedCase:n,newCase:null,emptyCaseObject:this.state.tempEmptyCaseObject,emptyAccount:this.state.tempEmptyAccount,serviceCaseList:i,tableData:t,classListPage:"hidden",classCasePage:"",classNewPage:"hidden",isNewCase:!0});this.props.onUpdate();this.changeToCaseView(n)},render:function(){return React.createElement("div",{className:"row serviceCasesContainer"},React.createElement("div",{className:this.state.classListPage},React.createElement("div",{className:"col-md-12"},React.createElement("h1",{className:"partialPageHeader"},this.props.localizedStrings.menuLinkComplaints)),React.createElement("div",{className:"col-md-12 summaryCirclesContainer"},React.createElement("div",{className:"summaryCirclesInner"},React.createElement("div",{className:"col-xs-4"},React.createElement(SummaryCircle,{number:this.props.casesData.NrOfActiveCustomerCases,title:this.props.localizedStrings.labelActive,activeClass:this.isActive(1),clickable:!0,onClick:this.filterTableData.bind(this,"Active",1)})),React.createElement("div",{className:"col-xs-4"},React.createElement(SummaryCircle,{number:this.props.casesData.NrOfResolvedCustomerCases,title:this.props.localizedStrings.labelDone,activeClass:this.isActive(2),clickable:!0,onClick:this.filterTableData.bind(this,"Resolved",2)})),React.createElement("div",{className:"col-xs-4"},React.createElement(SummaryCircle,{number:this.props.casesData.NrOfActiveCustomerCases+this.props.casesData.NrOfResolvedCustomerCases,activeClass:this.isActive(3),title:this.props.localizedStrings.labelAll,clickable:!0,onClick:this.filterTableData.bind(this,"All",3)})))),this.state.serviceCaseList===null?null:React.createElement("div",{className:"col-md-12"},React.createElement(SearchField,{bootstrapclass:"col-md-4 col-sm-6 col-xs-8",placeholder:this.props.localizedStrings.placeholderSearchField,onUpdate:this.search}),React.createElement("div",{className:"addServiceCaseLink"},React.createElement("a",{className:"addCaseLink",onClick:this.goToNewCaseView},this.props.localizedStrings.buttonCreateNewComplaint),React.createElement("a",{className:"addCaseLinkMobile",onClick:this.goToNewCaseView})),this.getTable(),this.getPagination())),React.createElement("div",{className:this.state.classCasePage},this.state.selectedCase===null?null:React.createElement(ComplaintPage,{currentCase:this.state.selectedCase,onUpdate:this.updateCurrentCase,onChangeView:this.changeToThisView,optionValues:this.state.optionSetValues,account:this.state.account,contact:this.props.contact,isNewCase:this.state.isNewCase,localizedStrings:this.props.localizedStrings})),React.createElement("div",{className:this.state.classNewCasePage},this.state.emptyCaseObject==null||this.state.newCase==null||this.state.emptyAccount==null?null:React.createElement(NewComplaintPage,{currentCase:this.state.emptyCaseObject,endUser:this.state.emptyAccount,onUpdate:this.addNewCase,onChangeView:this.changeToThisView,optionValues:this.state.optionSetValues,account:this.state.account,contact:this.props.contact,localizedStrings:this.props.localizedStrings,newComplaintPlaceholder:this.props.epimodel.NewComplaintPlaceholder})),this.state.showSpinner===!0?React.createElement("div",{className:"spinnerWrapper"},React.createElement("div",{id:"loading"}),React.createElement("div",{className:"spinner"})):null)}}),ServiceCasesOverviewPage=React.createClass({displayName:"ServiceCasesOverviewPage",getInitialState:function(){return{serviceCaseList:null,tableData:[],searchTempTable:[],columnsSortOrder:[],rowsPerPage:10,currentPage:0,nrOfPages:0,classBtnPrev:"hidden",classBtnNext:"hidden",selectedCase:null,classListPage:"",classCasePage:"hidden",optionSetValues:[],account:null,selectedSummaryCirleIndex:3,showSpinner:!1,paginationNext:"",paginationPrevious:"",searchFieldPlaceholder:""}},componentWillMount:function(){if(this.state.optionSetValues.length==0&&axios.get("/api/Cases/GetServiceCaseOptionValues",{params:{}},{responseType:"json"}).then(function(n){this.setState({optionSetValues:n.data})}.bind(this)).catch(function(){}.bind(this)),this.props.caseList===null)this.setState({showSpinner:!0}),axios.get("/api/Cases/GetServiceCases",{params:{accountId:this.props.account.Id}},{responseType:"json"}).then(function(n){var t=this.props.rowsPerPage==null?10:this.props.rowsPerPage,i=n.data.length,u=parseInt(i/t,10)+(i%t>0?1:0),r="hidden";i>0&&i>t&&(r="");this.setState({serviceCaseList:n.data,tableData:n.data,searchTempTable:n.data,rowsPerPage:t,classBtnNext:r,nrOfPages:u,account:this.props.account,showSpinner:!1});this.props.onSetServiceCaseList(n.data)}.bind(this)).catch(function(){this.setState({showSpinner:!1})}.bind(this));else{var n=this.props.rowsPerPage==null?10:this.props.rowsPerPage,t=this.props.caseList.length,r=parseInt(t/n,10)+(t%n>0?1:0),i="hidden";t>0&&t>n&&(i="");this.setState({serviceCaseList:this.props.caseList,tableData:this.props.caseList,searchTempTable:this.props.caseList,rowsPerPage:n,classBtnNext:i,nrOfPages:r,account:this.props.account})}},sortJsonArrayByProperty:function(n,t){var r,i;if(arguments.length<2)throw new Error("sortJsonArrayByProp requires 2 arguments");return r=arguments.length>2?arguments[2]:1,n&&n.constructor===Array&&(i=t.constructor===Array?t:t.split("."),n.sort(function(n,t){for(var u in i)n=n[i[u]].toUpperCase()||"|||",t=t[i[u]].toUpperCase()||"|||";return n<t?-1*r:n>t?1*r:0})),n},findColumnSortOrderEntry:function(n){return this.state.columnsSortOrder.filter(function(t){return t.column==n})},getColumnsSortOrderEntry:function(n,t){var i={};return i.column=n,i.direction=t,i},sortTableData:function(n){var i=1,r=this.findColumnSortOrderEntry(n),u,t;r.length==0?(t=this.state.columnsSortOrder.slice(),t.push(this.getColumnsSortOrderEntry(n,i)),this.setState({columnsSortOrder:t})):(i=r[0].direction*-1,u=this.state.columnsSortOrder.map(function(n){return n.column}).indexOf(n),t=this.state.columnsSortOrder.slice(),t.splice(u,1),t.push(this.getColumnsSortOrderEntry(n,i)),this.setState({columnsSortOrder:t}));t=this.sortJsonArrayByProperty(this.state.tableData,n,i);this.setState({tableData:t})},goToCaseView:function(n){var t=this.state.tableData[n];t.IsUpdated===!1?(this.setState({showSpinner:!0}),axios.get("/api/Cases/GetAllCaseData",{params:{caseId:t.CaseId}},{responseType:"json"}).then(function(n){n.data!=null&&this.setState({selectedCase:n.data});this.setState({showSpinner:!1,classListPage:"hidden",classCasePage:""});this.updateCurrentCase(n.data)}.bind(this)).catch(function(){this.setState({showSpinner:!1,classListPage:"hidden",classCasePage:""})}.bind(this))):this.setState({selectedCase:t,classListPage:"hidden",classCasePage:""})},getTable:function(){var r=[],t,n;for(r.push(React.createElement("tr",{key:this.state.tableData.length,className:"tableRow"},React.createElement("th",{className:"tableCol tableHeader"},React.createElement("div",{className:"columnInner"},this.props.localizedStrings.tableHeaderCaseNr)),React.createElement("th",{className:"tableCol tableHeader hideOnSmallDevice"},React.createElement("div",{className:"columnInner"},this.props.localizedStrings.tableHeaderProduct)),React.createElement("th",{className:"tableCol tableHeader sortable hideOnSmallDevice",onClick:this.sortTableData.bind(this,"ServiceCompanyStatusName")},React.createElement("div",{className:"columnInner"},this.props.localizedStrings.tableHeaderServiceCompanyStatus),React.createElement(OrderByArrows,null)),React.createElement("th",{className:"tableCol tableHeader sortable",onClick:this.sortTableData.bind(this,"StatusReasonName")},React.createElement("div",{className:"columnInner"},this.props.localizedStrings.tableHeaderStatus),React.createElement(OrderByArrows,null)),React.createElement("th",{className:"tableCol tableHeader sortable",onClick:this.sortTableData.bind(this,"CreatedDateTimeSortValue")},React.createElement("div",{className:"columnInner"},this.props.localizedStrings.tableHeaderCreatedDate),React.createElement(OrderByArrows,null)),React.createElement("th",{className:"tableCol tableHeader hideOnMediumDevice"},React.createElement("div",{className:"columnInner"},this.props.localizedStrings.tableHeaderEndUser)),React.createElement("th",{className:"tableCol tableHeader hideOnMediumDevice"},React.createElement("div",{className:"columnInner"},this.props.localizedStrings.tableHeaderContactPerson)))),t=this.state.currentPage*this.state.rowsPerPage,i=0;i<this.state.rowsPerPage;i++)if(this.state.tableData.length>0&&(n=this.state.tableData[t],r.push(React.createElement("tr",{key:i,className:"tableRow",onClick:this.goToCaseView.bind(this,t)},React.createElement("td",{className:"tableCol"},React.createElement("div",{className:"columnInner"},n.CaseNr)),React.createElement("td",{className:"tableCol hideOnSmallDevice"},React.createElement("div",{className:"columnInner"},n.ProductName)),React.createElement("td",{className:"tableCol hideOnSmallDevice"},React.createElement("div",{className:"columnInner"},n.ServiceCompanyStatusName)),React.createElement("td",{className:"tableCol"},React.createElement("div",{className:"columnInner"},n.StatusReasonName)),React.createElement("td",{className:"tableCol"},React.createElement("div",{className:"columnInner"},n.CreatedDateTime)),React.createElement("td",{className:"tableCol hideOnMediumDevice"},React.createElement("div",{className:"columnInner"},n.EndUserName)),React.createElement("td",{className:"tableCol hideOnMediumDevice"},React.createElement("div",{className:"columnInner"},n.Owner))))),t++,i+1==this.state.tableData.length||t==this.state.tableData.length)break;return React.createElement("table",{className:"table"},React.createElement("tbody",null,r))},goToTablePage:function(n){this.setState({currentPage:n});n>0?(this.setState({classBtnPrev:""}),n+1==this.state.nrOfPages?this.setState({classBtnNext:"hidden"}):this.setState({classBtnNext:""})):n==0&&(this.setState({classBtnPrev:"hidden"}),this.state.nrOfPages>1&&this.setState({classBtnNext:""}))},getPagination:function(){var n=[];for(i=1;i<=this.state.nrOfPages;i++)n.push(React.createElement("input",{key:i,type:"button",className:"btnPaginatePage",value:i,onClick:this.goToTablePage.bind(this,i-1)}));return React.createElement("div",{className:"paginationWrapper"},React.createElement("div",{className:"paginationButtons"},React.createElement("input",{type:"button",className:this.state.classBtnPrev+" btnPaginatePrevious",value:this.props.localizedStrings.paginationPrevious,onClick:this.goToTablePage.bind(this,this.state.currentPage-1)}),n,React.createElement("input",{type:"button",className:this.state.classBtnNext+" btnPaginateNext",value:this.props.localizedStrings.paginationNext,onClick:this.goToTablePage.bind(this,this.state.currentPage+1)})))},searchInTableData:function(n){return Object.values=Object.values||function(n){return Object.keys(n).map(function(t){return n[t]})},this.state.searchTempTable.filter(function(t){for(var r=Object.values(t),i=0;i<r.length;i++)if(r[i]!=null&&r[i].toString().toUpperCase().search(n.toUpperCase())>=0)return!0;return!1})},filterTableData:function(n){var t=3,i=this.state.serviceCaseList.filter(function(i){return n=="Active"?(t=1,i.Resolved===!1)?!0:!1:n=="Resolved"?(t=2,i.Resolved===!0)?!0:!1:n=="All"?(t=3,!0):!1}),r=parseInt(i.length/this.state.rowsPerPage,10)+(i.length%this.state.rowsPerPage>0?1:0);this.setState({tableData:i,searchTempTable:i,nrOfPages:r,selectedSummaryCirleIndex:t})},search:function(n){var t=[],i;t=n===""?this.state.searchTempTable:this.searchInTableData(n);i=parseInt(t.length/this.state.rowsPerPage,10)+(t.length%this.state.rowsPerPage>0?1:0);this.setState({tableData:t,nrOfPages:i})},changeToThisView:function(){this.setState({selectedCase:null,classListPage:"",classCasePage:"hidden"})},isActive:function(n){return n===this.state.selectedSummaryCirleIndex?"active":""},updateCurrentCase:function(n){for(var i,r=this.state.serviceCaseList.slice(),t=0,u=r.length;t<u;t++)if(r[t].CaseId===n.CaseId){r[t]=n;break}for(i=this.state.tableData,t=0;t<i.length;t++)if(i[t].CaseId===n.CaseId){i[t]=n;break}this.setState({selectedCase:n,serviceCaseList:r,tableData:i})},render:function(){return console.log(this.props),React.createElement("div",{className:"row serviceCasesContainer"},React.createElement("div",{className:this.state.classListPage},React.createElement("div",{className:"col-md-12"},React.createElement("h1",{className:"partialPageHeader"},this.props.localizedStrings.menuLinkServiceCases)),React.createElement("div",{className:"col-md-12 summaryCirclesContainer"},React.createElement("div",{className:"summaryCirclesInner"},React.createElement("div",{className:"col-xs-4"},React.createElement(SummaryCircle,{number:this.props.casesData.NrOfActiveServiceCases,title:this.props.localizedStrings.labelActive,activeClass:this.isActive(1),clickable:!0,onClick:this.filterTableData.bind(this,"Active",1)})),React.createElement("div",{className:"col-xs-4"},React.createElement(SummaryCircle,{number:this.props.casesData.NrOfResolvedServiceCases,title:this.props.localizedStrings.labelDone,activeClass:this.isActive(2),clickable:!0,onClick:this.filterTableData.bind(this,"Resolved",2)})),React.createElement("div",{className:"col-xs-4"},React.createElement(SummaryCircle,{number:this.props.casesData.NrOfActiveServiceCases+this.props.casesData.NrOfResolvedServiceCases,activeClass:this.isActive(3),title:this.props.localizedStrings.labelAll,clickable:!0,onClick:this.filterTableData.bind(this,"All",3)})))),this.state.serviceCaseList===null?null:React.createElement("div",{className:"col-md-12"},React.createElement(SearchField,{bootstrapclass:"col-md-4 col-sm-6 col-xs-8",placeholder:this.props.localizedStrings.placeholderSearchField,onUpdate:this.search}),this.props.epimodel&&this.props.epimodel.PurchaseDeliveryButtonText?React.createElement("a",{href:this.props.epimodel.PurchaseDeliveryUrl,target:"_blank"},React.createElement("button",{className:"col-xs-3 col-md-offset-5 col-sm-offset-3 col-xs-offset-1 buttonBlue"},this.props.epimodel.PurchaseDeliveryButtonText,React.createElement("span",{className:"purchasedelivery-tooltip"},this.props.epimodel.PurchaseDeliveryButtonDescription))):null,React.createElement("div",{className:"addServiceCaseLink"}),this.getTable(),this.getPagination())),React.createElement("div",{className:this.state.classCasePage},this.state.selectedCase===null?null:React.createElement(ServiceCasePage,{currentCase:this.state.selectedCase,onUpdate:this.updateCurrentCase,onChangeView:this.changeToThisView,optionValues:this.state.optionSetValues,account:this.state.account,localizedStrings:this.props.localizedStrings})),this.state.showSpinner===!0?React.createElement("div",{className:"spinnerWrapper"},React.createElement("div",{id:"loading"}),React.createElement("div",{className:"spinner"})):null)}}),ServiceCasePage=React.createClass({displayName:"ServiceCasePage",getInitialState:function(){return{currentCase:null,classReport:"hidden",classCase:"",classInfoLabel:"hidden",infoText:"",showSpinner:!1}},goToCaseListView:function(n){var t=this.getParentSection(n.target,"serviceCasesContainer");t.getElementsByClassName("editMode").className+=" hidden";t.getElementsByClassName("viewMode hidden").className="viewMode";t.getElementsByClassName("editButton open").className="editButton";this.props.onChangeView()},changeContentView:function(n){function t(n,t){return(" "+n.className+" ").indexOf(" "+t+" ")>-1}t(n.target,"open")?(n.target.parentNode.getElementsByClassName("viewMode hidden")[0].className="viewMode",n.target.parentNode.getElementsByClassName("editMode")[0].className+=" hidden",n.target.className="editButton"):(this.setState({currentCase:this.props.currentCase}),n.target.parentNode.getElementsByClassName("viewMode")[0].className+=" hidden",n.target.parentNode.getElementsByClassName("editMode hidden")[0].className="editMode",n.target.className+=" open")},updateCaseType:function(n,t){var i=this.state.currentCase;i.MissionType=n;i.MissionTypeName=t;this.setState({currentCase:i})},getParentSection:function(n,t){while((n=n.parentElement)&&!n.classList.contains(t));return n},saveChanges:function(n){var t=this.getParentSection(n.target,"sectionContent");this.setState({showSpinner:!0});axios.post("/api/Cases/UpdateServiceCase",{updatedCase:this.props.currentCase}).then(function(n){if(n.status===200){t.getElementsByClassName("viewMode hidden")[0].className="viewMode";t.getElementsByClassName("editMode")[0].className+=" hidden";t.getElementsByClassName("editButton open")[0].className="editButton";this.setState({infoText:this.state.localizedStrings.infoTextMissionTypeUpdate,classInfoLabel:"",showSpinner:!1});document.getElementById("infoLabel").focus();setTimeout(function(){this.setState({infoText:"",classInfoLabel:"hidden"})}.bind(this),1e4);this.props.onUpdate(this.props.currentCase)}}.bind(this)).catch(function(){this.setState({showSpinner:!1})}.bind(this))},changeStatus:function(n,t){var i=this.state.currentCase===null?this.props.currentCase:this.state.currentCase;n.Code==this.props.optionValues.optionsServiceCompanyStatusAltText[3].Code||n.Code==this.props.optionValues.optionsServiceCompanyStatusAltText[2].Code?this.setState({report:i.CaseReport[t],currentCase:i,classReport:"",classCase:"hidden"}):(i.ServiceCompanyStatusId=n.Code,i.ServiceCompanyStatusName=n.Name,this.setState({currentCase:i,showSpinner:!0}),axios.post("/api/Cases/UpdateServiceCase",{updatedCase:i}).then(function(n){if(n.status===200){this.setState({infoText:this.props.localizedStrings.infoTextServiceCompanyStatusUpdate,classInfoLabel:"",showSpinner:!1});document.getElementById("infoLabel").focus();setTimeout(function(){this.setState({infoText:"",classInfoLabel:"hidden"})}.bind(this),1e4);this.props.onUpdate(this.props.currentCase)}}.bind(this)).catch(function(){this.setState({showSpinner:!1})}.bind(this)))},changeView:function(){this.setState({classReport:"hidden",classCase:"hidden"});this.props.onChangeView()},displayThisOption:function(n){var t=this.props.currentCase.ServiceCompanyStatusId;return this.props.currentCase.StatusReasonId==5?n==this.props.optionValues.optionsServiceCompanyStatusAltText[3].Code?!0:!1:t==-1?n==this.props.optionValues.optionsServiceCompanyStatusAltText[3].Code?!1:!0:t===this.props.optionValues.optionsServiceCompanyStatusAltText[0].Code?n==this.props.optionValues.optionsServiceCompanyStatusAltText[1].Code||n==this.props.optionValues.optionsServiceCompanyStatusAltText[2].Code?!0:!1:t===this.props.optionValues.optionsServiceCompanyStatusAltText[1].Code?n==this.props.optionValues.optionsServiceCompanyStatusAltText[2].Code?!0:!1:t===this.props.optionValues.optionsServiceCompanyStatusAltText[2].Code?n==this.props.optionValues.optionsServiceCompanyStatusAltText[3].Code||n==this.props.optionValues.optionsServiceCompanyStatusAltText[2].Code&&this.props.currentCase.NrOfReports<4?!0:!1:t===this.props.optionValues.optionsServiceCompanyStatusAltText[3].Code?n==this.props.optionValues.optionsServiceCompanyStatusAltText[3].Code?!0:!1:void 0},generatedReportLinks:function(){var n=[];if(this.props.currentCase.CaseReport!=null&&this.props.currentCase.NrOfReports>1)for(i=1;i<=this.props.currentCase.NrOfReports-1;i++)n.push(React.createElement("div",null,React.createElement("a",{className:"linkButton",onClick:this.changeStatus.bind(this,this.props.optionValues.optionsServiceCompanyStatusAltText[3],i)},this.props.optionValues.optionsServiceCompanyStatusAltText[3].Name+" "+this.props.currentCase.CaseReport[i].Date)));return React.createElement("div",null,n)},render:function(){return React.createElement("div",null,React.createElement("div",{className:this.state.classCase+" row"},React.createElement("div",{className:"col-md-12"},React.createElement("h1",{className:"partialPageHeader"},this.props.currentCase.CaseNr)),React.createElement("div",{className:"col-md-12 returnLinkWrapper"},React.createElement("a",{className:"returnLink",onClick:this.goToCaseListView},this.props.localizedStrings.navigationToServiceCaseList),React.createElement("a",{className:"printButton buttonRoundedCorners",href:"javascript:window.print()"},this.props.localizedStrings.printButton)),React.createElement("div",{id:"infoLabel",tabIndex:"0",className:this.state.classInfoLabel+" col-md-12 infoLabelWrapper "},React.createElement("label",{className:"infoLabel"},this.state.infoText)),React.createElement("section",{className:"col-md-12"},React.createElement("div",{className:"col-md-3 col-sm-3 sectionTitle"},React.createElement("label",{className:"sectionLabel"},this.props.localizedStrings.sectionTitleCaseSummary)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("div",{className:"viewMode"},React.createElement("div",null,this.props.localizedStrings.labelCreated,": ",this.props.currentCase.CreatedDateTime),React.createElement("div",null,this.props.localizedStrings.labelRegardingProduct,": ",this.props.currentCase.RegardingProduct),React.createElement("div",null,this.props.localizedStrings.labelCustomerErrorDescription,": ",this.props.currentCase.FullDescription)))),React.createElement("section",{className:"col-md-12"},React.createElement("div",{className:"col-md-3 col-sm-3 sectionTitle"},React.createElement("label",{className:"sectionLabel"},this.props.localizedStrings.sectionTitleMissionInfo)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("div",{className:"editButton",onClick:this.changeContentView}),React.createElement("div",{className:"viewMode"},React.createElement("div",null,this.props.localizedStrings.labelMissionType,": ",this.props.currentCase.MissionTypeName),React.createElement("div",null,this.props.localizedStrings.labelCaseNr,": ",this.props.currentCase.CaseNr),React.createElement("div",null,this.props.localizedStrings.labelCaseOwner,": ",this.props.currentCase.Owner),React.createElement("div",null,this.props.localizedStrings.labelStatusGoods,": ",this.props.currentCase.StatusGoodsName)),React.createElement("div",{className:"editMode hidden"},React.createElement("div",{className:"col-md-3"},this.props.localizedStrings.labelMissionType,":"),React.createElement("div",{className:"col-md-8"},this.props.currentCase!=[]?React.createElement(DropDownList,{onUpdate:this.updateCaseType,data:this.props.optionValues.optionsMissionType,initialValue:this.props.currentCase.MissionType,valueField:"Code",nameField:"Name"}):null),React.createElement("div",{className:"col-md-3"},this.props.localizedStrings.labelCaseNr,":"),React.createElement("div",{className:"col-md-8"},React.createElement("input",{type:"text",disabled:!0,value:this.props.currentCase.CaseNr,readOnly:!0})),React.createElement("div",{className:"col-md-3"},this.props.localizedStrings.labelCaseOwner,":"),React.createElement("div",{className:"col-md-8"},React.createElement("input",{type:"text",disabled:!0,value:this.props.currentCase.Owner,readOnly:!0})),React.createElement("div",{className:"col-md-3"},this.props.localizedStrings.labelStatusGoods,":"),React.createElement("div",{className:"col-md-8"},this.props.currentCase!=[]?React.createElement(DropDownList,{data:this.props.optionValues.optionsStatusGoods,disabled:"true",initialValue:this.props.currentCase.StatusGoods,valueField:"Code",nameField:"Name"}):null),React.createElement("div",{className:"col-md-11"},React.createElement(EditButtons,{onCancel:this.cancelChanges,onSave:this.saveChanges,okButtonText:this.props.localizedStrings.okButtonText,cancelButtonText:this.props.localizedStrings.cancelButtonText}))))),React.createElement("section",{className:"col-md-12"},React.createElement("div",{className:"col-md-3 col-sm-3 sectionTitle"},React.createElement("label",{className:"sectionLabel"},this.props.localizedStrings.sectionTitleDealerInfo)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("div",{className:"viewMode"},React.createElement("div",null,this.props.localizedStrings.labelDealer,": ",this.props.currentCase.CustomerName),React.createElement("div",null,this.props.localizedStrings.labelAddress,": ",this.props.currentCase.CustomerAddress),React.createElement("div",null,this.props.localizedStrings.labelPhone,": ",this.props.currentCase.CustomerPhone),React.createElement("div",null,this.props.localizedStrings.labelContactPerson,": ",this.props.currentCase.CustomerContactName),React.createElement("div",null,this.props.localizedStrings.labelContactPersonPhone,": ",this.props.currentCase.CustomerContactPhone),React.createElement("div",null,this.props.localizedStrings.labelContactPersonMobile,": ",this.props.currentCase.CustomerContactMobilePhone)))),React.createElement("section",{className:"col-md-12"},React.createElement("div",{className:"col-md-3 col-sm-3 sectionTitle"},React.createElement("label",{className:"sectionLabel"},this.props.localizedStrings.sectionTitleEndUserInfo)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("div",{className:"viewMode"},React.createElement("div",null,this.props.localizedStrings.labelEndUser,": ",this.props.currentCase.EndUserName),React.createElement("div",null,this.props.localizedStrings.labelAddress,": ",this.props.currentCase.EndUserAddress),React.createElement("div",null,this.props.localizedStrings.labelMobile,": ",this.props.currentCase.EndUserMobile),React.createElement("div",null,this.props.localizedStrings.labelPhone,": ",this.props.currentCase.EndUserPhone)))),React.createElement("section",{className:"col-md-12"},React.createElement("div",{className:"col-md-3 col-sm-3 sectionTitle"},React.createElement("label",{className:"sectionLabel"},this.props.localizedStrings.sectionTitleMissionDescription)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("div",{className:"viewMode"},React.createElement("div",null,this.props.localizedStrings.sectionTitleMissionDescription,": ",this.props.currentCase.MissionDescription),React.createElement("div",null,this.props.localizedStrings.labelServiceCompanyStatus,": ",this.props.currentCase.ServiceCompanyStatusName),this.displayThisOption(this.props.optionValues.optionsServiceCompanyStatusAltText[0].Code)==!0?React.createElement("div",null,React.createElement("a",{className:"linkButton",onClick:this.changeStatus.bind(this,this.props.optionValues.optionsServiceCompanyStatusAltText[0])},this.props.optionValues.optionsServiceCompanyStatusAltText[0].Name)):null,this.displayThisOption(this.props.optionValues.optionsServiceCompanyStatusAltText[1].Code)==!0?React.createElement("div",null,React.createElement("a",{className:"linkButton",onClick:this.changeStatus.bind(this,this.props.optionValues.optionsServiceCompanyStatusAltText[1])},this.props.optionValues.optionsServiceCompanyStatusAltText[1].Name)):null,this.displayThisOption(this.props.optionValues.optionsServiceCompanyStatusAltText[2].Code)==!0?React.createElement("div",null,React.createElement("a",{className:"linkButton",onClick:this.changeStatus.bind(this,this.props.optionValues.optionsServiceCompanyStatusAltText[2],0)},this.props.optionValues.optionsServiceCompanyStatusAltText[2].Name)):null,this.displayThisOption(this.props.optionValues.optionsServiceCompanyStatusAltText[3].Code)==!0?this.generatedReportLinks():null))),React.createElement("section",{className:"col-md-12"},React.createElement("div",{className:"col-md-3 col-sm-3 sectionTitle"},React.createElement("label",{className:"sectionLabel"},this.props.localizedStrings.sectionTitleProductInfo)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("div",{className:"viewMode"},React.createElement("div",null,this.props.localizedStrings.labelProductName,": ",this.props.currentCase.ProductName),React.createElement("div",null,this.props.localizedStrings.labelSerialNumber,": ",this.props.currentCase.SerialNumber," "),React.createElement("div",null,this.props.localizedStrings.labelPurchaseDate,": ",this.props.currentCase.PurchaseDateString))))),React.createElement("div",{className:this.state.classReport},this.state.report==null?null:React.createElement(ServiceCaseReport,{onUpdate:this.props.onUpdate,report:this.state.report,currentCase:this.state.currentCase,title:this.state.currentCase.RegardingProduct,onChangeView:this.changeView,localizedStrings:this.props.localizedStrings})),this.state.showSpinner===!0?React.createElement("div",{className:"spinnerWrapper"},React.createElement("div",{id:"loading"}),React.createElement("div",{className:"spinner"})):null)}}),ServiceCaseReport=React.createClass({displayName:"ServiceCaseReport",getInitialState:function(){return{currentReport:null,classViewMode:"",classEditMode:"hidden",showSpinner:!1,classInfoLabel:"hidden",infoText:""}},componentWillMount:function(){var n=this.props.report.Id==null?"hidden":"",t=this.props.report.Id==null?"":"hidden";this.setState({currentReport:this.props.report,classViewMode:n,classEditMode:t})},goToCaseListView:function(){this.props.onChangeView()},setMyDropZone:function(n){this.setState({fileDropZone:n})},cleanUpDropZone:function(n,t){this.state.fileDropZone.removeAllFiles();this.setState({currentReport:t.CaseReport,classViewMode:"",classEditMode:"hidden",showSpinner:!1,classInfoLabel:"",infoText:this.props.localizedStrings.infotextCreatedReport});document.getElementById("infoLabel").focus();this.props.onUpdate(t)},createReport:function(){if(this.setState({showSpinner:!0}),this.state.fileDropZone.files!=null&&this.state.fileDropZone.files.length>0)this.state.fileDropZone.processQueue();else{var n=this.state.currentReport;n.CaseId=this.props.currentCase.CaseId;n.CaseNr=this.props.currentCase.CaseNr;axios.post("/api/Cases/CreateReportWithoutFile",{report:n}).then(function(n){if(n.status===200){this.setState({currentReport:n.data.CaseReport[n.data.NewlyAddedReport],classViewMode:"",classEditMode:"hidden",showSpinner:!1,classInfoLabel:"",infoText:this.props.localizedStrings.infotextCreatedReport});document.getElementById("infoLabel").focus();this.props.onUpdate(n.data)}}.bind(this)).catch(function(){this.setState({showSpinner:!1})}.bind(this))}},addFormData:function(n,t,i){i.append("Switched",this.state.currentReport.SwitchedComponents);i.append("Adjustments",this.state.currentReport.Adjustments);i.append("Aggregate",this.state.currentReport.Aggregate);i.append("Valves",this.state.currentReport.Valves);i.append("Evaluation",this.state.currentReport.EvaluationOfMaintenance);i.append("Filter",this.state.currentReport.FilterChangedRegularly);i.append("Fan",this.state.currentReport.FanCleaned);i.append("SpeedStep",this.state.currentReport.WrongSpeedStep);i.append("CustomerInfo",this.state.currentReport.CustomerInfo);i.append("CaseId",this.props.currentCase.CaseId);i.append("CaseNr",this.props.currentCase.CaseNr)},setInputValue:function(n,t){var i=null;i=this.state.currentReport==null?this.props.report:this.state.currentReport;n=="Switched"?i.SwitchedComponents=t.target.value:n=="Adjustments"?i.Adjustments=t.target.value:n=="Aggregate"?i.Aggregate=t.target.checked:n=="Valves"?i.Valves=t.target.checked:n=="Evaluation"?i.EvaluationOfMaintenance=t.target.value:n=="Filter"?i.FilterChangedRegularly=t.target.checked:n=="Fan"?i.FanCleaned=t.target.checked:n=="SpeedStep"?i.WrongSpeedStep=t.target.checked:n=="CustomerInfo"&&(i.CustomerInfo=t.target.value);this.setState({currentReport:i})},getReportNotes:function(){var t=[],n;if(this.state.currentReport.Notes!=null&&this.state.currentReport.Notes.length>0)for(i=0;i<this.state.currentReport.Notes.length;i++)n=this.state.currentReport.Notes[i],t.push(React.createElement("div",{key:i,className:"oldNoteWrapper"},React.createElement("div",{className:"noteText"},this.props.localizedStrings.labelNote,": ",n.NoteText),React.createElement("div",{className:"noteFile"},React.createElement("div",null,this.props.localizedStrings.labelAttachment,":"),React.createElement("div",null,React.createElement("a",{onClick:this.downloadFile.bind(this,n.FileName,n.DocumentBody)},n.FileName)))));return t},getFileBlob:function(n,t,i){var e,o,r,f,s,u,h;for(t=t||"",i=i||512,e=atob(n),o=[],r=0;r<e.length;r+=i){for(f=e.slice(r,r+i),s=new Array(f.length),u=0;u<f.length;u++)s[u]=f.charCodeAt(u);h=new Uint8Array(s);o.push(h)}return new Blob(o,{type:t})},downloadFile:function(n,t){var r=this.getFileBlob(t,{type:"text/csv"}),i;window.navigator.msSaveOrOpenBlob?window.navigator.msSaveBlob(r,n):(i=window.document.createElement("a"),i.href=window.URL.createObjectURL(r),i.download=n,document.body.appendChild(i),i.click(),document.body.removeChild(i))},render:function(){if(this.props.localizedStrings.fileDropZoneText==null)return null;var n={parallelUploads:10,autoProcessQueue:!1,uploadMultiple:!0,clickable:!0,createImageThumbnails:!1,addRemoveLinks:!0,dictDefaultMessage:this.props.localizedStrings.fileDropZoneText,dictRemoveFile:this.props.localizedStrings.fileDeleteText,dictCancelUpoad:this.props.localizedStrings.fileAbortText},t={init:this.setMyDropZone,sending:this.addFormData,successmultiple:this.cleanUpDropZone};return React.createElement("div",{className:"row reportPage"},React.createElement("div",{className:"col-md-12"},React.createElement("h1",{className:"partialPageHeader"},this.props.localizedStrings.serviceReportTitle,": ",this.props.currentCase.CaseNr)),React.createElement("div",{className:"col-md-12 returnLinkWrapper"},React.createElement("a",{className:"returnLink",onClick:this.goToCaseListView},this.props.localizedStrings.navigationToServiceCase)),React.createElement("div",{className:"col-md-12"},React.createElement("div",{id:"infoLabel",tabIndex:"0",className:this.state.classInfoLabel+" col-md-12 infoLabelWrapper "},React.createElement("label",{className:"infoLabel"},this.state.infoText))),React.createElement("section",{className:"col-md-12"},React.createElement("div",{className:"col-md-3 col-sm-3 sectionTitle"},React.createElement("label",{className:"sectionLabel"},this.props.localizedStrings.sectionTitleComponents)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("div",{className:this.state.classEditMode+" editMode"},React.createElement("div",null,React.createElement("textarea",{className:"noteTextArea",onChange:this.setInputValue.bind(this,"Switched")},this.state.currentReport.SwitchedComponents))),React.createElement("div",{className:this.state.classViewMode+" viewMode"},React.createElement("div",null,this.props.localizedStrings.labelDescription,": ",this.state.currentReport.SwitchedComponents)))),React.createElement("section",{className:"col-md-12"},React.createElement("div",{className:"col-md-3 col-sm-3 sectionTitle"},React.createElement("label",{className:"sectionLabel"},this.props.localizedStrings.sectionTitleAdjustments)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("div",{className:this.state.classEditMode+" editMode"},React.createElement("div",null,React.createElement("textarea",{className:"noteTextArea",onChange:this.setInputValue.bind(this,"Adjustments")},this.state.currentReport.Adjustments)),React.createElement("div",null,React.createElement("div",{className:"col-md-4"},React.createElement("input",{type:"checkbox",className:"checkbox",value:"Aggregat",checked:this.state.currentReport.Aggregate,onChange:this.setInputValue.bind(this,"Aggregate")}),this.props.localizedStrings.labelAggregate),React.createElement("div",{className:"col-md-4"},React.createElement("input",{type:"checkbox",className:"checkbox",value:"Ventiler",checked:this.state.currentReport.Valves,onChange:this.setInputValue.bind(this,"Valves")}),this.props.localizedStrings.labelValves))),React.createElement("div",{className:this.state.classViewMode+" viewMode"},React.createElement("div",null,this.props.localizedStrings.labelDescription,": ",this.state.currentReport.Adjustments),React.createElement("div",null,React.createElement("input",{type:"checkbox",className:"checkbox",value:"Aggregat",checked:this.state.currentReport.Aggregate,disabled:!0}),this.props.localizedStrings.labelAggregate),React.createElement("div",null,React.createElement("input",{type:"checkbox",className:"checkbox",value:"Ventiler",checked:this.state.currentReport.Valves,disabled:!0}),this.props.localizedStrings.labelValves)))),React.createElement("section",{className:"col-md-12"},React.createElement("div",{className:"col-md-3 col-sm-3 sectionTitle"},React.createElement("label",{className:"sectionLabel"},this.props.localizedStrings.sectionTitleEvaluation)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("div",{className:this.state.classEditMode+" editMode"},React.createElement("div",null,React.createElement("textarea",{className:"noteTextArea",onChange:this.setInputValue.bind(this,"Evaluation")},this.state.currentReport.EvaluationOfMaintenance)),React.createElement("div",null,React.createElement("div",{className:"col-md-4"},React.createElement("input",{type:"checkbox",className:"checkbox",value:"Filter skiftet regelmessig",checked:this.state.currentReport.FilterChangedRegularly,onChange:this.setInputValue.bind(this,"Filter")}),this.props.localizedStrings.labelFiltersChanged),React.createElement("div",{className:"col-md-4"},React.createElement("input",{type:"checkbox",className:"checkbox",value:"Vifte er rengjort",checked:this.state.currentReport.FanCleaned,onChange:this.setInputValue.bind(this,"Fan")}),this.props.localizedStrings.labelCleanedFan),React.createElement("div",{className:"col-md-4"},React.createElement("input",{type:"checkbox",className:"checkbox",value:"Kjørt på feil hastighet",checked:this.state.currentReport.WrongSpeedStep,onChange:this.setInputValue.bind(this,"SpeedStep")}),this.props.localizedStrings.labelWrongSpeed))),React.createElement("div",{className:this.state.classViewMode+" viewMode"},React.createElement("div",null,this.props.localizedStrings.labelDescription,": ",this.state.currentReport.EvaluationOfMaintenance),React.createElement("div",null,React.createElement("input",{type:"checkbox",className:"checkbox",value:"Filter skiftet regelmessig",checked:this.state.currentReport.FilterChangedRegularly,disabled:!0}),this.props.localizedStrings.labelFiltersChanged),React.createElement("div",null,React.createElement("input",{type:"checkbox",className:"checkbox",value:"Vifte er rengjort",checked:this.state.currentReport.FanCleaned,disabled:!0}),this.props.localizedStrings.labelCleanedFan),React.createElement("div",null,React.createElement("input",{type:"checkbox",className:"checkbox",value:"Kjørt på feil hastighet",checked:this.state.currentReport.WrongSpeedStep,disabled:!0}),this.props.localizedStrings.labelWrongSpeed)))),React.createElement("section",{className:"col-md-12"},React.createElement("div",{className:"col-md-3 col-sm-3 sectionTitle"},React.createElement("label",{className:"sectionLabel"},this.props.localizedStrings.sectionTitleCustomerInfo)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("div",{className:this.state.classEditMode+" editMode"},React.createElement("div",null,React.createElement("textarea",{className:"noteTextArea",onChange:this.setInputValue.bind(this,"CustomerInfo")},this.state.currentReport.CustomerInfo)),React.createElement(DropzoneComponent,{config:{postUrl:"/api/Cases/CreateReport"},eventHandlers:t,djsConfig:n}),React.createElement("div",{className:"notesButtonWrapper"},React.createElement("input",{type:"button",className:"buttonBigRoundedCorners_blue notesButton",value:this.props.localizedStrings.buttonServiceReport,onClick:this.createReport}))),React.createElement("div",{className:this.state.classViewMode+" viewMode"},React.createElement("div",null,this.props.localizedStrings.labelInformation,": ",this.state.currentReport.CustomerInfo)))),React.createElement("section",{className:this.state.classViewMode+" col-md-12"},React.createElement("div",{className:"col-md-3 col-sm-3 sectionTitle"},React.createElement("label",{className:"sectionLabel"},this.props.localizedStrings.labelAttachment)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("div",{className:this.state.classViewMode+" viewMode"},this.getReportNotes()))),this.state.showSpinner===!0?React.createElement("div",{className:"spinnerWrapper"},React.createElement("div",{id:"loading"}),React.createElement("div",{className:"spinner"})):null)}}),FilterSubscriptionNew=React.createClass({displayName:"FilterSubscriptionNew",getInitialState:function(){return{filterList:null,showSpinner:!1,selectedFilters:null,subscription:null,modalClass:"hidden",epiModel:null,buttonState:"disabled",agreed:!1}},componentWillMount:function(){this.setState({subscription:this.props.subscription});this.state.filterList==null&&(this.setState({showSpinner:!0}),axios.get("/api/Subscription/GetFilters",{params:{}},{responseType:"json"}).then(function(n){this.setState({filterList:n.data,showSpinner:!1})}.bind(this)).catch(function(){this.setState({showSpinner:!1})}.bind(this)))},getRelatedProducts:function(n){var t=[],r;for(i=0;i<n.length;i++)n.length>0&&(r=n[i],t.push(React.createElement("a",{key:i,href:r.Href,target:"_blank"},"product.Title")));return t},getTable:function(){var t=[],n,u,r;for(t.push(React.createElement("tr",{key:this.state.filterList.length,className:"tableRow"},React.createElement("th",{className:"tableCol tableHeader"},React.createElement("div",{className:"columnInner alignCenter"},this.props.localizedStrings.tableHeaderChoose)),React.createElement("th",{className:"tableCol tableHeader hideOnSmallDevice"},React.createElement("div",{className:"columnInner"})),React.createElement("th",{className:"tableCol tableHeader sortable"},React.createElement("div",{className:"columnInner"},this.props.localizedStrings.tableHeaderArticleNr)),React.createElement("th",{className:"tableCol tableHeader sortable hideOnSmallDevice"},React.createElement("div",{className:"columnInner"},this.props.localizedStrings.tableHeaderFilter)),React.createElement("th",{className:"tableCol tableHeader hideOnSmallDevice"},React.createElement("div",{className:"columnInner"},this.props.localizedStrings.tableHeaderPrice)))),i=0;i<this.state.filterList.length;i++)if(this.state.filterList.length>0){for(n=this.state.filterList[i],u=[],j=0;j<n.RelatedProducts.length;j++)n.RelatedProducts.length>0&&(r=n.RelatedProducts[j],u.push(React.createElement("a",{key:j,href:r.Url,className:"subscriptionProductLink",target:"_blank"},r.Name)));t.push(React.createElement("tr",{key:i,className:"tableRow"},React.createElement("td",{className:"tableCol alignCenter"},React.createElement("div",{className:"columnInner"},React.createElement("div",null,React.createElement("input",{type:"checkbox",className:"checkbox",checked:n.Selected,onChange:this.updateFilterSelection.bind(this,n.ArticleNumber)})),React.createElement("div",{className:"posRelative"},React.createElement("img",{className:"columnImage showOnSmallDevice hideOnMediumDevice",src:n.TeaserImageUrl})),React.createElement("div",{className:"showOnSmallDevice hideOnMediumDevice"},this.props.localizedStrings.tableHeaderPrice,": ",n.Price,",-"))),React.createElement("td",{className:"tableCol alignCenter hideOnSmallDevice"},React.createElement("div",{className:"columnInner"},React.createElement("img",{className:"columnImage",src:n.TeaserImageUrl}))),React.createElement("td",{className:"tableCol"},React.createElement("div",{className:"columnInner"},n.ArticleNumber,React.createElement("div",{className:"showOnSmallDevice hideOnMediumDevice"},n.FilterType))),React.createElement("td",{className:"tableCol hideOnSmallDevice"},React.createElement("div",{className:"columnInner"},n.FilterType)),React.createElement("td",{className:"tableCol hideOnSmallDevice"},React.createElement("div",{className:"columnInner"},n.Price,",-"))))}return React.createElement("table",{className:"table selectFiltersTable"},React.createElement("tbody",null,t))},updateFilterSelection:function(n,t){var r=this.state.selectedFilters==null?[]:this.state.selectedFilters.slice(),f=t.target.checked,u,e,o;for(f==!0?r.push(n):r.pop(n),u=this.state.filterList,i=0;i<u.length;i++)if(e=u[i],e.ArticleNumber==n){u[i].Selected=f;break}o=r==null||r.length<1?!1:!0;this.state.agreed==!0&&o==!0?this.setButtonState(!0):this.setButtonState(!1);this.setState({filterList:u,selectedFilters:r})},changePage:function(){this.state.buttonState!="disabled"&&(this.setState({showSpinner:!0}),axios.post("/api/Subscription/GetFilterDataFromCrm",{articleNumbers:this.state.selectedFilters},{responseType:"json"}).then(function(n){var t=this.state.subscription;t.Filters=n.data;this.setState({showSpinner:!1});this.props.onChangePage("RegisterStep2",t)}.bind(this)).catch(function(){}.bind(this)))},openModal:function(){this.setState({modalClass:""})},closeModal:function(){this.setState({modalClass:"hidden"})},setAgreed:function(n){var t=n.target.checked,i;t==!0?this.setState({agreed:!0}):this.setState({agreed:!1});i=this.state.selectedFilters==null||this.state.selectedFilters.length<1?!1:!0;t==!0&&i==!0?this.setButtonState(!0):this.setButtonState(!1)},setButtonState:function(n){var t=document.getElementById("nextButton");n==!0?(t.removeAttribute("disabled"),this.setState({buttonState:"enabled"})):(t.setAttribute("disabled","disabled"),this.setState({buttonState:"disabled"}))},goToOverview:function(){this.props.onChangePage("Subscriptions",null)},render:function(){return this.props.localizedStrings.nextStepButtonText==null?null:React.createElement("div",{className:"row filterSubscriptionContainer"},React.createElement("div",{className:"col-md-12"},React.createElement("h1",{className:"partialPageHeader"},this.props.epimodel.SubscriptionRegStep1Title)),React.createElement("div",{className:"col-md-8 col-md-offset-2 col-sm-10 col-sm-offset-1 partialPageDescription"},React.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.epimodel.SubscriptionRegStep1Description}})),React.createElement("div",{className:"col-md-12 returnLinkWrapper"},React.createElement("a",{className:"returnLink",onClick:this.goToOverview},this.props.localizedStrings.navigationToSubscriptionList)),React.createElement("div",{className:"filterTableWrapper col-md-12"},this.state.filterList==null?null:this.getTable()),React.createElement("div",{className:"col-md-12 agreementWrapper"},React.createElement("input",{type:"checkbox",className:"checkbox",onChange:this.setAgreed}),React.createElement("label",{className:"checkboxLabel"},this.props.localizedStrings.labelReadAndAgreed),React.createElement("a",{onClick:this.openModal}," ",this.props.localizedStrings.labelAgreementTerms)),React.createElement("div",{className:"buttonWrapper col-md-12"},React.createElement("input",{id:"nextButton",type:"button",disabled:"disabled",className:"buttonRoundedCorners",value:this.props.localizedStrings.nextStepButtonText,onClick:this.changePage.bind(this,"",null)})),React.createElement("div",{className:this.state.modalClass+" modalWindowWrapper",onClick:this.closeModal}),React.createElement("div",{id:"modal",className:this.state.modalClass+" modalWindow"},React.createElement("div",{className:"modalWindowCloseButton",onClick:this.closeModal}),React.createElement("div",{className:"modalWindowText"},React.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.epimodel.AgreementTerms}}))),this.state.showSpinner===!0?React.createElement(Spinner,null):null)}}),SubscriptionDashboard=React.createClass({displayName:"SubscriptionDashboard",getInitialState:function(){return{subscriptions:null,subscriptionsList:null,subscriptionFilterList:null,infoText:"",classInfoLabel:"hidden",removed:!1}},componentWillMount:function(){this.props.newSubscriptionNr!=null&&this.props.newSubscriptionNr!=undefined?(this.setState({infoText:this.props.localizedStrings.infoTextSubscription+" "+this.props.newSubscriptionNr+" "+this.props.localizedStrings.infoTextSubscriptionCreated,classInfoLabel:""}),setTimeout(function(){this.setState({infoText:"",classInfoLabel:"hidden"})}.bind(this),1e4)):this.props.removedSubscriptionNr!=null&&this.props.removedSubscriptionNr!=undefined&&(this.setState({infoText:this.props.localizedStrings.infoTextSubscription+" "+this.props.removedSubscriptionNr+" "+this.props.localizedStrings.infoTextSubscriptionAborted,classInfoLabel:""}),setTimeout(function(){this.setState({infoText:"",classInfoLabel:"hidden"})}.bind(this),1e4))},changePage:function(n,t){this.props.onChangePage(n,t)},getTable:function(){var t=[],n;if(t.push(React.createElement("tr",{key:this.props.subscriptions.length,className:"tableRow"},React.createElement("th",{className:"tableCol tableHeader"},React.createElement("div",{className:"columnInner"},this.props.localizedStrings.tableHeaderSubscriptionNr)),React.createElement("th",{className:"tableCol tableHeader"},React.createElement("div",{className:"columnInner"},this.props.localizedStrings.tableHeaderStartDate)),React.createElement("th",{className:"tableCol tableHeader"},React.createElement("div",{className:"columnInner"},this.props.localizedStrings.tableHeaderCreated)))),this.props.subscriptions!=null&&this.props.subscriptions.length>0)for(i=0;i<this.props.subscriptions.length;i++)n=this.props.subscriptions[i],t.push(React.createElement("tr",{key:i,className:"tableRow",onClick:this.changePage.bind(this,"FilterEdit",n)},React.createElement("td",{className:"tableCol clickable"},React.createElement("div",{className:"columnInner"},n.SubscriptionNr)),React.createElement("td",{className:"tableCol clickable"},React.createElement("div",{className:"columnInner"},n.StartDateString)),React.createElement("td",{className:"tableCol clickable"},React.createElement("div",{className:"columnInner"},n.CreatedDateString))));else t.push(React.createElement("tr",{key:1,className:"tableRow"},React.createElement("td",{className:"tableCol"},React.createElement("div",{className:"columnInner"},this.props.localizedStrings.infoTextNoSubscriptions)),React.createElement("td",{className:"tableCol"},React.createElement("div",{className:"columnInner"})),React.createElement("td",{className:"tableCol"},React.createElement("div",{className:"columnInner"}))));return React.createElement("table",{className:"table"},React.createElement("tbody",null,t))},render:function(){return this.props.localizedStrings.infoTextSubscription==null?null:React.createElement("div",{className:"row filterSubscriptionContainer"},React.createElement("div",{className:"col-md-12"},React.createElement("h1",{className:"partialPageHeader"},this.props.epimodel.SubscriptionMainPageTitle)),React.createElement("div",{className:"col-md-8 col-md-offset-2 col-sm-10 col-sm-offset-1 partialPageDescription"},React.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.epimodel.SubscriptionMainPageDescription}})),React.createElement("div",{className:"col-md-12"},React.createElement("div",{className:"addServiceCaseLink"},React.createElement("a",{onClick:this.changePage.bind(this,"RegisterStep1",null)},this.props.localizedStrings.createSubscriptionButtonText))),React.createElement("div",{id:"infoLabel",tabIndex:"0",className:this.state.classInfoLabel+" col-md-12 infoLabelWrapper "},React.createElement("label",{className:"infoLabel"},this.state.infoText)),React.createElement("div",{className:"col-md-12"},this.getTable()))}}),FilterSubscriptionPage=React.createClass({displayName:"FilterSubscriptionPage",getInitialState:function(){return{activePartialPage:null,subscriptionsList:null,subscriptionFilterList:null,selectedSubscription:null,deliveryOptions:null,emptySubscription:null,showSpinner:!1,localizedStrings:null,selectedMenuItemName:"Oversikt",selectedMenuItem:0,account:null,dropdownMenuClass:"hidden"}},componentWillMount:function(){var acc=null;this.props.account!==null&&(acc=eval("("+this.props.account+")"));this.setState({epimodel:eval("("+this.props.epimodel+")"),account:acc});this.state.deliveryOptions==null&&axios.get("/api/Subscription/GetDeliveryOptions",{params:{}},{responseType:"json"}).then(function(n){this.setState({deliveryOptions:n.data})}.bind(this)).catch(function(){}.bind(this));this.state.emptySubscription==null&&axios.get("/api/Subscription/GetEmptySubscription",{params:{}},{responseType:"json"}).then(function(n){var t=n.data;acc!=null&&(t.AccountId=acc.Id);this.setState({emptySubscription:t})}.bind(this)).catch(function(){}.bind(this));this.setState({localizedStrings:this.props.localizedStrings});this.getSubscriptions(acc)},getSubscriptions:function(n){this.state.subscriptionsList==null&&n!=null&&(this.setState({showSpinner:!0}),axios.get("/api/Subscription/GetSubscriptions",{params:{id:n.Id}},{responseType:"json"}).then(function(n){this.setState({showSpinner:!1,subscriptionsList:n.data,activePartialPage:React.createElement(SubscriptionDashboard,{epimodel:this.state.epimodel,subscriptions:n.data,onChangePage:this.changePage,localizedStrings:this.state.localizedStrings})})}.bind(this)).catch(function(){}.bind(this)))},subscriptionCreated:function(n){var t=this.state.subscriptionsList;t.push(n);this.setState({subscriptionsList:t});this.changePage("FilterEdit",n.SubscriptionNr)},subscriptionStopped:function(n){for(var i,r=[],t=0;t<this.state.subscriptionsList.length;t++)i=this.state.subscriptionsList[t],i.SubscriptionNr!=n&&r.push(i);this.setState({subscriptionsList:r,removed:!0});this.changePage("Subscriptions",n)},triggerDropdownMenu:function(){this.state.dropdownMenuClass=="hidden"?this.setState({dropdownMenuClass:""}):this.setState({dropdownMenuClass:"hidden"})},changePage:function(n,t){var r,i;n=="RegisterStep1"?(r=this.state.emptySubscription,this.setState({activePartialPage:React.createElement(FilterSubscriptionNew,{epimodel:this.state.epimodel,subscription:r,onChangePage:this.changePage,localizedStrings:this.state.localizedStrings})})):n=="RegisterStep2"?this.setState({activePartialPage:React.createElement(FilterSubscriptionFilterInfo,{epimodel:this.state.epimodel,deliveryOptions:this.state.deliveryOptions,editMode:!1,subscription:t,onCreateSubscription:this.subscriptionCreated,onChangePage:this.changePage,localizedStrings:this.state.localizedStrings})}):n=="FilterEdit"?this.setState({selectedSubscription:t,activePartialPage:React.createElement(FilterSubscriptionFilterInfo,{epimodel:this.state.epimodel,deliveryOptions:this.state.deliveryOptions,editMode:!0,subscription:t,onStopSubscription:this.subscriptionStopped,onChangePage:this.changePage,localizedStrings:this.state.localizedStrings})}):n=="Subscriptions"&&(i=null,t==null?i=React.createElement(SubscriptionDashboard,{epimodel:this.state.epimodel,subscriptions:this.state.subscriptionsList,onChangePage:this.changePage,localizedStrings:this.state.localizedStrings}):(i=React.createElement(SubscriptionDashboard,{epimodel:this.state.epimodel,subscriptions:this.state.subscriptionsList,newSubscriptionNr:t,onChangePage:this.changePage,localizedStrings:this.state.localizedStrings}),this.state.removed==!0&&(i=React.createElement(SubscriptionDashboard,{epimodel:this.state.epimodel,subscriptions:this.state.subscriptionsList,removedSubscriptionNr:t,onChangePage:this.changePage,localizedStrings:this.state.localizedStrings}))),this.setState({activePartialPage:i,removed:!1}))},update:function(n,t){var i=t.target.innerText,r=t.target.value;this.setState({selectedMenuItemName:i,selectedMenuItem:r,dropdownMenuClass:"hidden"});this.menuChangePage(n)},menuChangePage:function(n){return this.setState({showSpinner:!0}),n=="Dashboard"?window.location.href=this.props.myPagePath+"?v=1":n=="Service"?window.location.href=this.props.myPagePath+"?v=2":n=="Complaint"?window.location.href=this.props.myPagePath+"?v=3":n=="MyProfile"?window.location.href=this.props.myPagePath+"?v=4":n=="AccountProfile"&&(window.location.href=this.props.myPagePath+"?v=5"),!1},render:function(){return React.createElement("div",{className:"myPageWrapper mainBodyWrapper"},React.createElement("div",{className:"container"},React.createElement(StandardTopBannerComponent,{title:this.props.title,preamble:this.props.description}),React.createElement("div",{className:"row"},React.createElement("div",{className:"col-md-12 partialPageMenuWrapper subMenu"},React.createElement("a",{className:"menuLink",onClick:this.menuChangePage.bind(this,"Dashboard")},this.props.menuLocalizedStrings.menuLinkDashboard),this.props.hideServiceCases==!1&&this.state.account!=null&&this.state.account.IsServicePartner==!0?React.createElement("a",{className:"menuLink",onClick:this.menuChangePage.bind(this,"Service")},this.props.menuLocalizedStrings.menuLinkServiceCases):null,this.props.hideClaims==!1?React.createElement("a",{className:"menuLink",onClick:this.menuChangePage.bind(this,"Complaint")},this.props.menuLocalizedStrings.menuLinkComplaints):null,React.createElement("a",{className:"active menuLink",onClick:this.menuChangePage.bind(this,"Subscription")},this.props.menuLocalizedStrings.menuLinkSubscriptions),this.state.account!=null&&this.state.account.IsProfPartner==!0?React.createElement("a",{className:"menuLink",onClick:this.menuChangePage.bind(this,"MyProfile")},this.props.menuLocalizedStrings.menuLinkContactProfile):null,React.createElement("a",{className:"menuLink",onClick:this.menuChangePage.bind(this,"AccountProfile")},this.state.account==null||this.state.account.IsEndCustomer==!0?this.props.menuLocalizedStrings.menuLinkAccountProfilePrivate:this.props.menuLocalizedStrings.menuLinkAccountProfileBusiness),this.state.account!=null&&this.state.account.IsProfPartner==!0?React.createElement("a",{className:"menuLink",href:this.props.ProfInfoPage},this.props.menuLocalizedStrings.menuLinkProfInfo):null),React.createElement("div",{className:"dropdownMenuWrapper col-xs-10 col-xs-offset-1 subMenu"},React.createElement("button",null,"toggle"),React.createElement("div",{className:"selectedMenuItem",onClick:this.triggerDropdownMenu},this.state.selectedMenuItemName),React.createElement("ul",{className:this.state.dropdownMenuClass+" dropdownMenu"},React.createElement("li",{value:0,name:"Dashboard",className:"",onClick:this.update.bind(this,"Dashboard")},this.props.menuLocalizedStrings.menuLinkDashboard),this.props.hideServiceCases==!1&&this.state.account!=null&&this.state.account.IsServicePartner==!0?React.createElement("li",{value:1,name:"Service",className:"",onClick:this.update.bind(this,"Service")},this.props.menuLocalizedStrings.menuLinkServiceCases):null,this.props.hideClaims==!1?React.createElement("li",{value:2,name:"Complaint",className:"",onClick:this.update.bind(this,"Complaint")},this.props.menuLocalizedStrings.menuLinkComplaints):null,React.createElement("li",{value:3,name:"Subscription",className:"active",onClick:this.update.bind(this,"Subscription")},this.props.menuLocalizedStrings.menuLinkSubscriptions),this.state.account!=null&&this.state.account.IsProfPartner==!0?React.createElement("li",{value:4,name:"MyProfile",className:"",onClick:this.update.bind(this,"MyProfile")},this.props.menuLocalizedStrings.menuLinkContactProfile):null,React.createElement("li",{value:5,name:"AccountProfile",className:"",onClick:this.update.bind(this,"AccountProfile")},this.state.account==null||this.state.account.IsEndCustomer==!0?this.props.menuLocalizedStrings.menuLinkAccountProfilePrivate:this.props.menuLocalizedStrings.menuLinkAccountProfileBusiness),this.state.account!=null&&this.state.account.IsProfPartner==!0?React.createElement("a",{href:this.props.ProfInfoPage},React.createElement("li",{value:6,name:"ProfInfo"},this.props.menuLocalizedStrings.menuLinkProfInfo)):null))),this.state.activePartialPage,this.state.showSpinner===!0?React.createElement(Spinner,null):null))}}),FilterSubscriptionFilterInfo=React.createClass({displayName:"FilterSubscriptionFilterInfo",getInitialState:function(){return{filterList:null,showSpinner:!1,selectedFilters:null,deliveryOptions:null,subscription:null,showSpinner:!1,modalClass:"hidden",classErrorLabel:"hidden",errorText:""}},componentWillMount:function(){this.props.subscription!=null&&this.props.subscription!=undefined&&this.setState({filterList:this.props.subscription.Filters,subscription:this.props.subscription});this.props.deliveryOptions!=null&&this.props.deliveryOptions!=undefined&&this.setState({deliveryOptions:this.props.deliveryOptions})},changePage:function(n){this.props.onChangePage("FilterEdit",n)},getTable:function(){var t=[],n;for(t.push(React.createElement("tr",{key:this.state.filterList.length,className:"tableRow"},React.createElement("th",{className:"tableCol tableHeader hideOnSmallDevice"},React.createElement("div",{className:"columnInner"},this.props.localizedStrings.tableHeaderProductName)),React.createElement("th",{className:"tableCol tableHeader hideOnSmallDevice"},React.createElement("div",{className:"columnInner"},this.props.localizedStrings.tableHeaderFrequency," ",React.createElement("span",{className:this.state.classErrorLabel+" errorAsterix"},"*"))),React.createElement("th",{className:"tableCol tableHeader hideOnSmallDevice"},React.createElement("div",{className:"columnInner"},this.props.localizedStrings.tableHeaderNextDelivery)),React.createElement("th",{className:"tableCol tableHeader hideOnSmallDevice"},React.createElement("div",{className:"columnInner"},this.props.localizedStrings.tableHeaderSendNow)),React.createElement("th",{className:"tableCol tableHeader hideOnSmallDevice"},React.createElement("div",{className:"columnInner"},this.props.localizedStrings.tableHeaderQuantity)),React.createElement("th",{className:"tableCol tableHeader hideOnSmallDevice"},React.createElement("div",{className:"columnInner"},this.props.localizedStrings.tableHeaderSerialNr)))),i=0;i<this.state.filterList.length;i++)this.state.filterList.length>0&&(n=this.state.filterList[i],t.push(React.createElement("tr",{key:i,className:"tableRow"},React.createElement("td",{className:"tableCol "},React.createElement("div",{className:"columnInner"},React.createElement("h2",{className:"showOnSmallDevice hideOnMediumDevice"},this.props.localizedStrings.tableHeaderProductName),React.createElement("div",{className:"left100"},n.Title),React.createElement("div",{className:"width50pct"},React.createElement("div",{className:"showOnSmallDevice hideOnMediumDevice"},React.createElement("div",{className:"fontNormal marginTop20"},this.props.localizedStrings.tableHeaderQuantity,": "),React.createElement("input",{type:"text",className:"loginTextBox",value:n.Quantity,disabled:this.props.editMode==!0?!0:!1,onChange:this.updateFilterSelection.bind(this,i,"quantity")})),React.createElement("div",{className:"showOnSmallDevice hideOnMediumDevice"},React.createElement("div",{className:"fontNormal marginTop20"},this.props.localizedStrings.tableHeaderSerialNr,": "),React.createElement("input",{type:"text",className:"loginTextBox",value:n.SerialNumber,disabled:this.props.editMode==!0?!0:!1,onChange:this.updateFilterSelection.bind(this,i,"serialnumber")})),React.createElement("div",{className:"alignCenter showOnSmallDevice hideOnMediumDevice"},React.createElement("div",{className:"fontNormal marginTop20 alignLeft"},this.props.localizedStrings.tableHeaderFrequency," ",React.createElement("span",{className:this.state.classErrorLabel+" errorAsterix"},"*"),": "),React.createElement("div",{className:"checkboxlabel"},this.props.localizedStrings.labelSpring),React.createElement("input",{type:"checkbox",className:"checkbox",checked:n.DeliverSpring,disabled:this.props.editMode==!0?!0:!1,onChange:this.updateFilterSelection.bind(this,i,"spring")}),React.createElement("div",{className:"checkboxlabel"},this.props.localizedStrings.labelAutumn),React.createElement("input",{type:"checkbox",className:"checkbox",checked:n.DeliverAutumn,disabled:this.props.editMode==!0?!0:!1,onChange:this.updateFilterSelection.bind(this,i,"autumn")}))),React.createElement("div",{className:"width50pct"},React.createElement("div",{className:"showOnSmallDevice hideOnMediumDevice"},React.createElement("div",{className:"fontNormal marginTop20"},this.props.localizedStrings.tableHeaderNextDelivery,": "),this.props.editMode==!1?React.createElement(DropDownList,{onUpdate:this.setNextDelivery.bind(this,i),data:this.props.deliveryOptions,initialValue:"0",valueField:"Name",nameField:"Name"}):React.createElement("div",null,n.NextDelivery)),React.createElement("div",{className:"showOnSmallDevice hideOnMediumDevice"},React.createElement("div",{className:"fontNormal marginTop20 left100 alignCenter"},this.props.localizedStrings.tableHeaderSendNow," "),React.createElement("div",{className:"left100"},React.createElement("input",{type:"checkbox",className:"checkbox centered",disabled:this.props.editMode==!0?!0:!1,checked:n.DeliveryNow,onChange:this.updateFilterSelection.bind(this,i,"delivery")})))))),React.createElement("td",{className:"tableCol hideOnSmallDevice"},React.createElement("div",{className:"columnInner"},React.createElement("div",{className:""},React.createElement("div",{className:"checkboxlabel"},this.props.localizedStrings.labelSpring),React.createElement("input",{type:"checkbox",className:"checkbox",checked:n.DeliverSpring,disabled:this.props.editMode==!0?!0:!1,onChange:this.updateFilterSelection.bind(this,i,"spring")})),React.createElement("div",{className:""},React.createElement("div",{className:"checkboxlabel"},this.props.localizedStrings.labelAutumn),React.createElement("input",{type:"checkbox",className:"checkbox",checked:n.DeliverAutumn,disabled:this.props.editMode==!0?!0:!1,onChange:this.updateFilterSelection.bind(this,i,"autumn")})))),React.createElement("td",{className:"tableCol hideOnSmallDevice"},React.createElement("div",{className:"columnInner"},this.props.editMode==!1?React.createElement(DropDownList,{onUpdate:this.setNextDelivery.bind(this,i),data:this.props.deliveryOptions,initialValue:"0",valueField:"Code",nameField:"Name"}):React.createElement("div",null,n.NextDelivery))),React.createElement("td",{className:"tableCol hideOnSmallDevice"},React.createElement("div",{className:"columnInner"},React.createElement("input",{type:"checkbox",className:"checkbox centered",disabled:this.props.editMode==!0?!0:!1,checked:n.DeliveryNow,onChange:this.updateFilterSelection.bind(this,i,"delivery")}))),React.createElement("td",{className:"tableCol hideOnSmallDevice"},React.createElement("div",{className:"columnInner"},React.createElement("input",{type:"text",className:"loginTextBox",value:n.Quantity,disabled:this.props.editMode==!0?!0:!1,onChange:this.updateFilterSelection.bind(this,i,"quantity")}))),React.createElement("td",{className:"tableCol hideOnSmallDevice"},React.createElement("div",{className:"columnInner"},React.createElement("input",{type:"text",className:"loginTextBox",value:n.SerialNumber,disabled:this.props.editMode==!0?!0:!1,onChange:this.updateFilterSelection.bind(this,i,"serialnumber")}))))));return React.createElement("table",{className:"table subscriptionDetailsTable"},React.createElement("tbody",null,t))},setNextDelivery:function(n,t,i){var r=this.state.filterList,u=r[n];u.NextDelivery=i;r[n]=u;this.setState({filterList:r})},updateFilterSelection:function(n,t,i){var u=this.state.filterList,r=u[n];t=="spring"?r.DeliverSpring=i.target.checked:t=="autumn"?r.DeliverAutumn=i.target.checked:t=="delivery"?r.DeliveryNow=i.target.checked:t=="quantity"?r.Quantity=i.target.value:t=="serialnumber"&&(r.SerialNumber=i.target.value);u[n]=r;this.setState({filterList:u})},createSubscription:function(){for(var i,t,r,n=0;n<this.state.filterList.length;n++)if(this.state.filterList[n].DeliverSpring==!1&&this.state.filterList[n].DeliverAutumn==!1)return this.setState({classErrorLabel:"",errorText:this.props.localizedStrings.errorFrequencyNotSelected}),!1;for(this.setState({classErrorLabel:"hidden"}),this.setState({showSpinner:!0}),i=this.state.filterList,n=0;n<i.length;n++)t=i[n],t.NextDelivery==null&&(t.NextDelivery=t.DeliverSpring==!0?this.props.deliveryOptions[0].Name:t.DeliverAutumn==!0?this.props.deliveryOptions[1].Name:this.props.deliveryOptions[0].Name),i[n]=t;r=this.state.subscription;r.Filters=i;axios.post("/api/Subscription/CreateSubscription",{subscription:r},{responseType:"json"}).then(function(n){this.setState({showSpinner:!1});this.props.onCreateSubscription(n.data)}.bind(this)).catch(function(){}.bind(this))},stopSubscription:function(){this.closeModal();this.setState({showSpinner:!0});axios.get("/api/Subscription/StopSubscription",{params:{id:this.props.subscription.Id}},{responseType:"json"}).then(function(){this.setState({showSpinner:!1});this.props.onStopSubscription(this.props.subscription.SubscriptionNr)}.bind(this)).catch(function(){}.bind(this))},goToOverview:function(){this.props.onChangePage("Subscriptions",null)},openModal:function(){this.setState({modalClass:""})},closeModal:function(){this.setState({modalClass:"hidden"})},render:function(){return React.createElement("div",{className:"row filterSubscriptionContainer"},React.createElement("div",{className:"col-md-12"},React.createElement("h1",{className:"partialPageHeader"},this.props.editMode!=!0?this.props.epimodel.SubscriptionRegStep2Title:this.props.epimodel.SubscriptionStopTitle)),React.createElement("div",{className:"col-md-8 col-md-offset-2 col-sm-10 col-sm-offset-1 partialPageDescription"},this.props.editMode!=!0?React.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.epimodel.SubscriptionRegStep2Description}}):React.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.epimodel.SubscriptionStopDescription}})),React.createElement("div",{className:this.state.classErrorLabel+" col-md-12 infoLabelWrapper "},React.createElement("label",{className:"errorLabel"},this.state.errorText)),React.createElement("div",{className:"col-md-12 returnLinkWrapper"},React.createElement("a",{className:"returnLink",onClick:this.goToOverview},this.props.localizedStrings.navigationToSubscriptionList)),React.createElement("div",{className:"filterTableWrapper col-md-12"},this.state.filterList==null?null:this.getTable()),React.createElement("div",{className:"buttonWrapper col-md-12"},this.props.editMode==!0?React.createElement("input",{type:"button",className:"buttonBigRoundedCorners_blue",value:this.props.localizedStrings.stopSubscriptionButtonText,onClick:this.openModal}):React.createElement("input",{type:"button",className:"buttonBigRoundedCorners_blue",value:this.props.localizedStrings.createSubscriptionButtonText,onClick:this.createSubscription})),React.createElement("div",{className:this.state.modalClass+" modalWindowWrapper",onClick:this.closeModal}),React.createElement("div",{id:"modal",className:this.state.modalClass+" modalWindow small"},React.createElement("div",{className:"modalWindowText"},this.props.localizedStrings.modalWindowText),React.createElement("div",{className:"modalWindowButtonRow"},React.createElement(EditButtons,{onCancel:this.closeModal,onSave:this.stopSubscription,okButtonText:this.props.localizedStrings.yes,cancelButtonText:this.props.localizedStrings.no}))),this.state.showSpinner===!0?React.createElement(Spinner,null):null)}}),Login=React.createClass({displayName:"Login",getInitialState:function(){return{activePartialPage:null,hashOk:!1,username:"",password:"",showSpinner:!1,selectedPageIndex:1,newUser:null,sentCustomerNr:!1,epimodel:null,pageLoginUserLocalizedStrings:null,pageLoginPageLocalizedStrings:null,pageRegisterUserLocalizedStrings:null}},componentWillMount:function(){var tempEpimodel=eval("("+this.props.epimodel+")");this.setState({epimodel:tempEpimodel});this.goToInitialPage(tempEpimodel)},goToInitialPage:function(n){this.props.hash!=null?(this.setState({showSpinner:!0}),axios.get("/api/Login/CheckForValidHash",{params:{value:this.props.hash}},{responseType:"json"}).then(function(t){if(this.setState({showSpinner:!1}),t.data!=null)if(t.data.Success==!0)this.setState({resetUser:t.data.Object,activePartialPage:React.createElement(ResetPassword,{onChangeView:this.changeView,hash:this.props.hash,user:t.data.Object,title:n.ResetPasswordTitle,description:n.ResetPasswordDescription,localizedStrings:this.props.loginStrings})});else return!1}.bind(this)).catch(function(){this.setState({showSpinner:!1})}.bind(this))):this.setState({activePartialPage:React.createElement(LoginPage,{onChangeView:this.changeView,path:this.props.path,onSentCustomerNr:this.setSentCustomerNr,title:n.Title,description:n.Description,localizedStrings:this.props.loginStrings,returnMyPage:this.props.returnMyPage})})},registerUser:function(){},setSentCustomerNr:function(n){this.setState({sentCustomerNr:n})},changeView:function(n,t){if(n=="RegisterUser")return window.location.href=this.props.registerpageurl,!1;n=="CreateMyPageAccessPage"?this.setState({activePartialPage:React.createElement(CreateMyPageAccessPage,{epimodel:this.state.epimodel,onRegisterUser:this.registerUser,onChangeView:this.changeView,path:this.props.myPagePath,isPrivateCustomer:t,isCustomerNrSent:this.state.sentCustomerNr,title:this.state.epimodel.CreateMyPageAccountTitle,description:this.state.epimodel.CreateMyPageAccountDescription,localizedStrings:this.props.loginStrings,localizedStringsStep1:this.props.createMyPageStrings1,localizedStringsStep2:this.props.createMyPageStrings2,helpTextCreateUserProfile:this.state.epimodel.HelpTextCreateUserProfile,linkCreateUserProfile:this.props.linkCreateUserProfile})}):n=="ForgotPassword"?this.setState({activePartialPage:React.createElement(ForgotPassword,{onChangeView:this.changeView,title:this.state.epimodel.ForgotPasswordTitle,description:this.state.epimodel.ForgotPasswordDescription,localizedStrings:this.props.loginStrings})}):n=="ResetPassword"?this.setState({activePartialPage:React.createElement(ResetPassword,{onChangeView:this.changeView,hash:this.props.hash,user:this.state.resetUser,title:this.state.epimodel.ResetPasswordTitle,description:this.state.epimodel.ResetPasswordDescription,localizedStrings:this.props.loginStrings})}):n=="Login"&&this.setState({activePartialPage:React.createElement(LoginPage,{onChangeView:this.changeView,path:this.props.path,onSentCustomerNr:this.setSentCustomerNr,title:this.state.epimodel.Title,description:this.state.epimodel.Description,localizedStrings:this.props.loginStrings})})},render:function(){return React.createElement("div",{className:"mainBodyWrapper container"},React.createElement("div",{className:"row"},React.createElement("div",{className:"col-md-80"},this.state.activePartialPage),React.createElement(AsideContent,this.props.asideBlocks)),this.state.showSpinner===!0?React.createElement(Spinner,null):null)}}),LoginPage=React.createClass({displayName:"LoginPage",getInitialState:function(){return{activePartialPage:null,hashOk:!1,username:"",password:"",showSpinner:!1,selectedPageIndex:1,classErrorLabel:"hidden",errorText:null,errorInvalidEmail:"",errorEmailAndPwd:"",localizedStrings:null}},componentWillMount:function(){this.setState({localizedStrings:this.props.localizedStrings,activePartialPage:React.createElement(UserLoginExtra,{onChangeView:this.changeView,onSentCustomerNr:this.props.onSentCustomerNr,localizedStrings:this.props.localizedStrings})})},updateInputValue:function(n,t){n===1&&this.setState({username:t});n===2&&this.setState({password:t})},login:function(n){var t=this.state.username.trim(),i=this.state.password.trim();return t===null||t===""||i===null||i==""?this.setState({classErrorLabel:"",errorText:this.state.errorEmailAndPwd}):t=="admin"||this.checkEmail(t)?(this.setState({showSpinner:!0}),axios.post("/api/Login/LoginUser",{username:this.state.username.trim(),password:this.state.password.trim()}).then(function(n){return n.data.Success===!0?(window.location.href=this.props.path,!1):(this.setState({classErrorLabel:"",errorText:n.data.Message}),this.setState({showSpinner:!1}),!1)}.bind(this)).catch(function(){this.setState({showSpinner:!1})}.bind(this))):this.setState({classErrorLabel:"",errorText:this.state.errorInvalidEmail}),n.preventDefault(),n.stopPropagation(),!1},checkEmail:function(n){return/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(n)?!0:!1},changeView:function(n,t){this.props.onChangeView(n,t)},changePartialPage:function(n){n=="Private"?this.setState({selectedPageIndex:1,activePartialPage:React.createElement(UserLoginExtra,{onChangeView:this.changeView,onSentCustomerNr:this.props.onSentCustomerNr,localizedStrings:this.state.localizedStrings})}):n=="Business"&&this.setState({selectedPageIndex:2,activePartialPage:React.createElement(CompanyLoginExtra,{onChangeView:this.changeView,onSentCustomerNr:this.props.onSentCustomerNr,localizedStrings:this.state.localizedStrings})})},registerUserClick:function(){this.props.onChangeView("CreateMyPageAccessPage",!1)},isActive:function(n){return n===this.state.selectedPageIndex?"active":""},render:function(){return React.createElement("div",null,React.createElement("div",{className:"container loginPageContainer"},React.createElement(StandardTopBannerComponent,{title:this.props.title,preamble:this.props.description}),React.createElement("div",{className:this.state.classErrorLabel+" col-md-12 infoLabelWrapper "},React.createElement("label",{className:"errorLabel"},this.state.errorText)),React.createElement("div",{className:"col-md-4 col-sm-6 col-xs-10"},this.state.showSpinner==!0?null:React.createElement(UserLogin,{onUpdateInputValue:this.updateInputValue,password:this.state.password,username:this.state.username,onLogin:this.login,onRegisterUserClick:this.registerUserClick,localizedStrings:this.state.localizedStrings}),React.createElement("div",{className:"forgotPasswordWrapper"},React.createElement("a",{className:"forgotPassword",onClick:this.changeView.bind(this,"ForgotPassword",null)},this.state.localizedStrings.forgotPassword)))),this.state.showSpinner===!0?React.createElement(Spinner,null):null)}}),UserLogin=React.createClass({displayName:"UserLogin",getInitialState:function(){return{usernamePlaceholder:"",passwordPlaceholder:"",buttonText:null,localizedStrings:null}},componentWillMount:function(){this.setState({localizedStrings:this.props.localizedStrings})},changeView:function(){},updateInputValue:function(n,t){this.props.onUpdateInputValue(n,t.target.value)},render:function(){return React.createElement("div",{className:"loginWrapper"},React.createElement("form",{onSubmit:this.props.onLogin,autoComplete:"off"},React.createElement("div",{className:"loginFieldWrapper"},React.createElement("input",{type:"text",className:"loginTextBox",autoComplete:"off",placeholder:this.state.localizedStrings.usernamePlaceholder,onChange:this.updateInputValue.bind(this,1),value:this.props.username})),React.createElement("div",{className:"loginFieldWrapper"},React.createElement("input",{className:"loginTextBox",type:"password",autoComplete:"off",placeholder:this.state.localizedStrings.passwordPlaceholder,onChange:this.updateInputValue.bind(this,2),value:this.props.password})),React.createElement("div",null,React.createElement("input",{type:"submit",className:"buttonBlueRoundedCorners loginButton",value:this.state.localizedStrings.loginButtonText}))),React.createElement("div",null,React.createElement("input",{type:"button",className:"buttonRoundedCornersGrey loginButton",value:this.state.localizedStrings.buttonRegisterCreateUser,onClick:this.props.onRegisterUserClick})))}}),RegisterUserPage=React.createClass({displayName:"RegisterUserPage",getInitialState:function(){return{classInfoLabel:"hidden",infoText:"",newUser:null,password:null,passwordCheck:null,emailCheck:null,showSpinner:!1}},componentWillMount:function(){this.setState({newUser:this.props.newUser})},registerUser:function(n){var t=!1;return this.state.newUser.Email!==this.state.emailCheck&&(this.setState({classInfoLabel:"",infoText:this.props.localizedStrings.errortextEmailsDontMatch}),t=!0),this.checkEmail(this.state.newUser.Email)&&this.checkEmail(this.state.emailCheck)||(this.setState({classInfoLabel:"",infoText:this.props.localizedStrings.errortextInvalidEmail}),t=!0),this.state.password!==this.state.passwordCheck&&(this.setState({classInfoLabel:"",infoText:this.props.localizedStrings.errortextPasswordsDontMatch}),t=!0),t==!1&&(this.setState({showSpinner:!0}),axios.post("/api/Login/CreateUser",{user:this.state.newUser,password:this.state.password}).then(function(n){if(this.setState({showSpinner:!1}),n.data!=null)if(n.data.Success==!0){if(n.data.Code==0)return window.location.href=this.props.myPageUrl,!1}else this.setState({classInfoLabel:"",infoText:n.data.Message});else this.setState({classInfoLabel:"",infoText:this.props.localizedStrings.errortextSomethingWentWrong})}.bind(this)).catch(function(){this.setState({showSpinner:!1})}.bind(this))),n.preventDefault(),n.stopPropagation(),!1},checkEmail:function(n){return/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(n)?!0:!1},setInputValue:function(n,t){var i=this.state.newUser;n==1?i.FirstName=t.target.value:n==2?i.LastName=t.target.value:n==3?i.StreetAddress1=t.target.value:n==4?i.PostalCode=t.target.value:n==5?i.City=t.target.value:n==6?i.MobilePhone=t.target.value:n==7?i.BusinessPhone=t.target.value:n==8?i.Email=t.target.value:n==9?this.setState({emailCheck:t.target.value}):n==10?this.setState({password:t.target.value}):n==11?this.setState({passwordCheck:t.target.value}):n==12&&(i.ReceiveNewsletter=t.target.checked);this.setState({newUser:i})},changeView:function(){return window.location.href=this.props.loginPageUrl,!1},render:function(){return this.state.newUser==null?null:React.createElement("div",{className:"myPageWrapper"},React.createElement("div",{className:""},React.createElement(StandardTopBannerComponent,{title:this.props.title,preamble:this.props.description}),React.createElement("div",{className:"row loginPageContainer"},React.createElement("div",{id:"infoLabel",tabIndex:"0",className:this.state.classInfoLabel+" col-md-12 infoLabelWrapper "},React.createElement("label",{className:"errorLabel"},this.state.infoText)),React.createElement("div",{className:"col-md-8 col-sm-10 col-xs-12  returnLinkWrapper"},React.createElement("a",{className:"returnLink",onClick:this.changeView},this.props.localizedStrings.navigateToLoginText)),React.createElement("div",{className:"col-md-8 col-sm-10 col-xs-12  registerFormWrapper"},React.createElement("section",{className:"registerFormElement"},React.createElement("div",{className:"col-md-3 col-sm-3 sectionTitle"},React.createElement("label",{className:"textBoxLabel"},this.props.localizedStrings.nameLabelText)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("input",{type:"text",className:"normalTextBox",placeholder:this.props.localizedStrings.firstnamePlaceholder,value:this.state.newUser.FirstName,onChange:this.setInputValue.bind(this,1)}),React.createElement("input",{type:"text",className:"normalTextBox",placeholder:this.props.localizedStrings.lastnamePlaceholder,value:this.state.newUser.LastName,onChange:this.setInputValue.bind(this,2)}))),React.createElement("section",{className:"registerFormElement"},React.createElement("div",{className:"col-md-3 col-sm-3  sectionTitle"},React.createElement("label",{className:"textBoxLabel"},this.props.localizedStrings.addressLabelText)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("input",{type:"text",className:"normalTextBox",placeholder:this.props.localizedStrings.streetaddressPlaceholder,value:this.state.newUser.StreetAddress1,onChange:this.setInputValue.bind(this,3)}),React.createElement("input",{type:"text",className:"normalTextBox",placeholder:this.props.localizedStrings.postcodePlaceholder,value:this.state.newUser.PostalCode,onChange:this.setInputValue.bind(this,4)}),React.createElement("input",{type:"text",className:"normalTextBox",placeholder:this.props.localizedStrings.cityPlaceholder,value:this.state.newUser.City,onChange:this.setInputValue.bind(this,5)}))),React.createElement("section",{className:"registerFormElement"},React.createElement("div",{className:"col-md-3 col-sm-3  sectionTitle"},React.createElement("label",{className:"textBoxLabel"},this.props.localizedStrings.contactInfoLabelText)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("input",{type:"text",className:"normalTextBox",placeholder:this.props.localizedStrings.mobilphonePlaceholder,value:this.state.newUser.MobilePhone,onChange:this.setInputValue.bind(this,6)}),React.createElement("input",{type:"text",className:"normalTextBox",placeholder:this.props.localizedStrings.phonePlaceholder,value:this.state.newUser.Phone,onChange:this.setInputValue.bind(this,7)}),React.createElement("input",{type:"text",className:"normalTextBox",placeholder:this.props.localizedStrings.emailPlaceholder,value:this.state.newUser.Email,onChange:this.setInputValue.bind(this,8)}),React.createElement("input",{type:"text",className:"normalTextBox",placeholder:this.props.localizedStrings.repeatemailPlaceholder,value:this.state.emailCheck,onChange:this.setInputValue.bind(this,9)}))),React.createElement("section",{className:"registerFormElement"},React.createElement("div",{className:"col-md-3 col-sm-3  sectionTitle"},React.createElement("label",{className:"textBoxLabel"},this.props.localizedStrings.passwordLabelText)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("input",{type:"password",className:"normalTextBox",placeholder:this.props.localizedStrings.passwordPlaceholder,value:this.state.password,onChange:this.setInputValue.bind(this,10)}),React.createElement("input",{type:"password",className:"normalTextBox",placeholder:this.props.localizedStrings.repeatpasswordPlaceholder,value:this.state.passwordCheck,onChange:this.setInputValue.bind(this,11)}))),React.createElement("section",{className:"registerFormElement"},React.createElement("div",{className:"col-md-3 col-sm-3  sectionTitle"},React.createElement("label",{className:"textBoxLabel"},this.props.localizedStrings.newsletterLabelText)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("input",{type:"checkbox",className:"checkbox",checked:this.state.newUser.ReceiveNewsletter,onChange:this.setInputValue.bind(this,12)}),React.createElement("label",{className:"checkboxLabel"},this.props.localizedStrings.newsletterCheckboxText))),React.createElement("div",{className:"buttonWrapper col-md-12"},React.createElement("input",{type:"button",className:"buttonBlueRoundedCorners loginButton",value:this.props.localizedStrings.buttonText,onClick:this.registerUser}))))),this.state.showSpinner===!0?React.createElement(Spinner,null):null)}}),CompanyLoginExtra=React.createClass({displayName:"CompanyLoginExtra",getInitialState:function(){return{localizedStrings:null}},componentWillMount:function(){this.setState({localizedStrings:this.props.localizedStrings})},changeView:function(n){this.props.onSentCustomerNr(!1);this.props.onChangeView(n,!1)},render:function(){return React.createElement("div",{className:"col-md-12 col-sm-12"},React.createElement("label",null,this.state.localizedStrings.registeredBusinessUserText),React.createElement("a",{value:"Opprett min side",className:"",onClick:this.changeView.bind(this,"CreateMyPageAccessPage")},this.state.localizedStrings.registerdBusinessUserLinkText))}}),UserLoginExtra=React.createClass({displayName:"UserLoginExtra",getInitialState:function(){return{errorLabelText:"",errorClass:"hidden",username:null,getInfoClass:"hidden",showSpinner:!1,localizedStrings:null}},componentWillMount:function(){this.setState({localizedStrings:this.props.localizedStrings})},changeView:function(n){this.props.onChangeView(n,!0)},getCustomerInfo:function(){this.state.username==null||this.state.username==""?this.setState({errorClass:"",errorLabelText:this.state.localizedStrings.errorNoEmailText}):(this.setState({showSpinner:!0}),axios.get("/api/Contact/SendContactCustomerNumber",{params:{username:this.state.username}},{responseType:"json"}).then(function(n){if(this.setState({showSpinner:!1}),n.data!=null)if(n.data.Success==!0){if(n.data.Code==0){this.setState({errorClass:"hidden",errorLabelText:""});this.props.onSentCustomerNr(!0);this.changeView("CreateMyPageAccessPage")}}else this.setState({errorClass:"",errorLabelText:n.data.Message});else this.setState({errorClass:"",errorLabelText:this.state.localizedStrings.errorUnspecifiedText})}.bind(this)).catch(function(){this.setState({showSpinner:!1})}.bind(this)))},setUsername:function(n){this.setState({username:n.target.value})},setInfoClass:function(){this.setState({getInfoClass:""})},render:function(){return React.createElement("div",{className:"col-md-12 col-sm-12"},React.createElement("div",null,React.createElement("label",null,this.state.localizedStrings.registerduserText),this.state.getInfoClass=="hidden"?React.createElement("a",{className:"",value:"Registrer deg",onClick:this.setInfoClass},this.state.localizedStrings.registerduserLinkText):null,React.createElement("div",{className:this.state.getInfoClass+" getCustomerInfoWrapper"},React.createElement("div",null,React.createElement("input",{type:"text",className:"loginTextBox",placeholder:this.state.localizedStrings.emailPlaceholder,value:this.state.username,onChange:this.setUsername}),React.createElement("label",{className:this.state.errorClass+" errorLabel"},this.state.errorLabelText)),React.createElement("div",null,React.createElement("input",{type:"button",className:"buttonRoundedCorners",value:this.state.localizedStrings.getInfoButtonText,onClick:this.getCustomerInfo})))),React.createElement("hr",null),React.createElement("div",null,React.createElement("label",null,this.state.localizedStrings.notregisterduserText),React.createElement("a",{className:"",value:"Registrer deg",onClick:this.changeView.bind(this,"RegisterUser")},this.state.localizedStrings.notregisterduserLinkText)),this.state.showSpinner===!0?React.createElement(Spinner,null):null)}}),GetCustomerInfo=React.createClass({displayName:"GetCustomerInfo",getInitialState:function(){return{customerNr:null,email:null,localizedStrings:null,selectedPageIndex:1,getInfoClass:"",username:null,errorLabelText:"",errorClass:"hidden",privateViewClass:"",businessViewClass:"hidden",classRegisterForm:"hidden",showSpinner:!1,isCustomerNrSent:!1}},componentWillMount:function(){this.setState({localizedStrings:this.props.localizedStrings});this.props.epimodel.DenyPrivateCustomer=="True"&&this.setState({classRegisterForm:"",privateViewClass:"hidden",businessViewClass:""})},getCustomerInfo:function(){if(this.state.customerNr==null||this.state.email==null)this.props.onError(this.state.localizedStrings.errortextBothCustomernrAndEmail);else if(this.checkEmail(this.state.email))this.props.onGetCustomerInfo(this.state.customerNr,this.state.email);else this.props.onError(this.state.localizedStrings.errortextInvalidEmail)},getCustomerData:function(){this.state.username==null||this.state.username==""?this.setState({errorClass:"",errorLabelText:this.state.localizedStrings.errorNoEmailText}):(this.setState({showSpinner:!0}),axios.get("/api/Contact/SendContactCustomerNumber",{params:{username:this.state.username}},{responseType:"json"}).then(function(n){this.setState({showSpinner:!1});n.data!=null?n.data.Success==!0?n.data.Code==0&&this.setState({errorClass:"hidden",errorLabelText:"",classRegisterForm:"",isCustomerNrSent:!0,privateViewClass:"hidden"}):this.setState({errorClass:"",errorLabelText:n.data.Message}):this.setState({errorClass:"",errorLabelText:this.state.localizedStrings.errorUnspecifiedText})}.bind(this)).catch(function(){this.setState({showSpinner:!1})}.bind(this)))},checkEmail:function(n){return/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(n)?!0:!1},setInputValue:function(n,t){n==1?this.setState({customerNr:t.target.value}):n==2&&this.setState({email:t.target.value})},setUsername:function(n){this.setState({username:n.target.value})},changePartialPage:function(n){n=="Private"?this.setState({selectedPageIndex:1,privateViewClass:"",classRegisterForm:"hidden",businessViewClass:"hidden"}):n=="Business"&&this.setState({selectedPageIndex:2,privateViewClass:"hidden",classRegisterForm:"",businessViewClass:""})},isActive:function(n){return n===this.state.selectedPageIndex?"active":""},setInfoClass:function(){this.setState({getInfoClass:""})},changeView:function(){this.props.onChangeView("RegisterUser")},changeForgottenPasswordView:function(){this.props.onChangeView("ForgotPassword")},render:function(){return React.createElement("div",null,React.createElement("div",{className:"createAccessPageContainer"},this.props.epimodel.DenyPrivateCustomer!="True"?React.createElement("div",{className:"row"},React.createElement("div",{className:"col-md-4 col-sm-6 col-xs-12 menuLinkWrapper buttonGroupGrey"},React.createElement("a",{className:this.isActive(1)+" menuLink",onClick:this.changePartialPage.bind(this,"Private")},this.state.localizedStrings.menulinkPrivateCustomer),React.createElement("a",{className:this.isActive(2)+" menuLink",onClick:this.changePartialPage.bind(this,"Business")},this.state.localizedStrings.menulinkBusinessCustomer))):null,this.state.isCustomerNrSent==!0?React.createElement("div",{className:"col-md-12 infoLabelWrapper"},React.createElement("label",{className:"infoLabel"},this.state.localizedStrings.infotextReceiveMail)):null,React.createElement("div",{className:this.state.classRegisterForm+" col-md-4 col-sm-6 col-xs-12 registerFormWrapper"},React.createElement("div",{className:"loginFieldWrapper"},React.createElement("input",{type:"text",className:"loginTextBox",placeholder:this.state.localizedStrings.customernrPlaceholder,value:this.state.customerNr,onChange:this.setInputValue.bind(this,1)})),React.createElement("div",{className:"loginFieldWrapper"},React.createElement("input",{type:"text",className:"loginTextBox",placeholder:this.state.localizedStrings.emailPlaceholder,value:this.state.email,onChange:this.setInputValue.bind(this,2)})),React.createElement("div",null,React.createElement("input",{type:"button",className:"buttonBlueRoundedCorners",value:this.props.localizedLoginStrings.buttonRegisterUserProfile,onClick:this.getCustomerInfo})),React.createElement("div",null,React.createElement("p",null,React.createElement("a",{href:this.props.linkCreateUserProfile},this.props.helpTextCreateUserProfile)))),React.createElement("div",{className:this.state.privateViewClass+" col-md-4 col-sm-6 col-xs-12 privateCustomerAlternatives"},React.createElement("div",null,React.createElement("label",null,this.props.localizedLoginStrings.registerduserText),React.createElement("br",null),this.state.getInfoClass=="hidden"?React.createElement("a",{className:"",value:"Registrer deg",onClick:this.setInfoClass},this.props.localizedLoginStrings.registerduserLinkText):null,React.createElement("div",{className:this.state.getInfoClass+" getCustomerInfoWrapper"},React.createElement("div",null,React.createElement("div",{className:"loginFieldWrapper"},React.createElement("input",{type:"text",className:"loginTextBox",placeholder:this.props.localizedLoginStrings.emailPlaceholder,value:this.state.username,onChange:this.setUsername})),React.createElement("label",{className:this.state.errorClass+" errorLabel"},this.state.errorLabelText)),React.createElement("div",null,React.createElement("input",{type:"button",className:"buttonBlueRoundedCorners",value:this.props.localizedLoginStrings.getInfoButtonText,onClick:this.getCustomerData})))),React.createElement("hr",null),React.createElement("div",{className:"getCustomerInfoWrapper"},React.createElement("label",null,this.props.localizedLoginStrings.notregisterduserText),React.createElement("br",null),React.createElement("input",{type:"button",className:"buttonBlueRoundedCorners",value:this.props.localizedLoginStrings.notregisterduserLinkText,onClick:this.changeView}))),React.createElement("div",{className:this.state.businessViewClass+" col-md-4 col-sm-6 col-md-offset-4 col-sm-offset-3 col-xs-12 businessCustomerAlternatives"},React.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.epimodel.CreateMyPageAccountInfoText}}))),this.state.showSpinner===!0?React.createElement(Spinner,null):null)}}),ViewCustomerInfo=React.createClass({displayName:"ViewCustomerInfo",getInitialState:function(){return{contact:null,password:null,passwordCheck:null,localizedStrings:null}},componentWillMount:function(){this.setState({contact:this.props.contact,localizedStrings:this.props.localizedStrings})},registerUser:function(n){var t=!1;if(this.state.password!==this.state.passwordCheck){this.props.onError(this.state.localizedStrings.errortextPasswordsDontMatch);t=!0}if(t==!1){this.props.onRegisterUser(this.state.contact,this.state.password);return n.preventDefault(),n.stopPropagation(),!1}},setInputValue:function(n,t){var i=this.state.contact;n==1?i.MobilePhone=t.target.value:n==2?i.BusinessPhone=t.target.value:n==3?this.setState({password:t.target.value}):n==4&&this.setState({passwordCheck:t.target.value});this.setState({contact:i})},render:function(){return React.createElement("div",null,React.createElement("div",{className:"ccol-md-8 col-md-offset-2 col-sm-10 col-sm-offset-1 col-xs-12  returnLinkWrapper"},React.createElement("a",{className:"returnLink",onClick:this.props.onChangeView},this.state.localizedStrings.navigateToLoginText)),React.createElement("div",{className:"col-md-8 col-sm-10 col-md-offset-2 col-sm-offset-1 col-xs-12 registerFormWrapper"},React.createElement("section",{className:"registerFormElement"},React.createElement("div",{className:"col-md-3 col-sm-3 sectionTitle"},React.createElement("label",{className:"textBoxLabel"},this.state.localizedStrings.nameLabelText)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("input",{type:"text",className:"normalTextBox",placeholder:this.state.localizedStrings.firstnamePlaceholder,disabled:!0,value:this.state.contact.FirstName}),React.createElement("input",{type:"text",className:"normalTextBox",placeholder:this.state.localizedStrings.lastnamePlaceholder,disabled:!0,value:this.state.contact.LastName}))),React.createElement("section",{className:"registerFormElement"},React.createElement("div",{className:"col-md-3 col-sm-3 sectionTitle"},React.createElement("label",{className:"textBoxLabel"},this.state.localizedStrings.contactInfoLabelText)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("input",{type:"text",className:"normalTextBox",placeholder:this.state.localizedStrings.mobilephonePlaceholder,value:this.state.contact.MobilePhone,onChange:this.setInputValue.bind(this,1)}),React.createElement("input",{type:"text",className:"normalTextBox",placeholder:this.state.localizedStrings.phonePlaceholder,value:this.state.contact.BusinessPhone,onChange:this.setInputValue.bind(this,2)}),React.createElement("input",{type:"text",className:"normalTextBox",placeholder:this.state.localizedStrings.emailPlaceholder,disabled:!0,value:this.state.contact.Email}))),React.createElement("section",{className:"registerFormElement"},React.createElement("div",{className:"col-md-3 col-sm-3 sectionTitle"},React.createElement("label",{className:"textBoxLabel"},"Passord")),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("input",{type:"password",className:"normalTextBox",placeholder:this.state.localizedStrings.passwordPlaceholder,value:this.state.password,onChange:this.setInputValue.bind(this,3)}),React.createElement("input",{type:"password",className:"normalTextBox",placeholder:this.state.localizedStrings.repeatpasswordPlaceholder,value:this.state.passwordCheck,onChange:this.setInputValue.bind(this,4)}))),React.createElement("div",{className:"buttonWrapper col-md-12"},React.createElement("input",{type:"button",className:"buttonBigRoundedCorners_blue loginButton",value:this.state.localizedStrings.buttonText,onClick:this.registerUser}))))}}),CreateMyPageAccessPage=React.createClass({displayName:"CreateMyPageAccessPage",getInitialState:function(){return{showSpinner:!1,activePartialPage:null,contact:null,errorText:"",errorClass:"hidden",originalPhone:null,originalMobile:null,errortextSomethingWentWrong:"",step1Strings:{},step2Strings:{}}},componentWillMount:function(){this.setState({activePartialPage:React.createElement(GetCustomerInfo,{epimodel:this.props.epimodel,onChangeView:this.changeView,onGetCustomerInfo:this.getCustomerInfo,onError:this.displayError,isCustomerNrSent:this.props.isCustomerNrSent,localizedStrings:this.props.localizedStringsStep1,localizedLoginStrings:this.props.localizedStrings,helpTextCreateUserProfile:this.props.helpTextCreateUserProfile,linkCreateUserProfile:this.props.linkCreateUserProfile})})},changePartialView:function(n){n=="GetCustomerInfo"?this.setState({activePartialPage:React.createElement(GetCustomerInfo,{epimodel:this.props.epimodel,onChangeView:this.changeView,onGetCustomerInfo:this.getCustomerInfo,onError:this.displayError,isCustomerNrSent:this.props.isCustomerNrSent,localizedStrings:this.props.localizedStringsStep1,localizedLoginStrings:this.props.localizedStrings})}):n=="ViewCustomerInfo"&&this.setState({activePartialPage:React.createElement(ViewCustomerInfo,{onChangeView:this.changeView,onRegisterUser:this.registerUser,contact:this.state.contact,onError:this.displayError,localizedStrings:this.props.localizedStringsStep2})})},displayError:function(n){this.setState({errorClass:"",errorText:n})},getCustomerInfo:function(n,t){this.setState({errorClass:"hidden",showSpinner:!0});axios.get("/api/Contact/GetContactInfo",{params:{customerNr:n,email:t}}).then(function(n){this.setState({showSpinner:!1});n.data!=null?n.data.Success==!0?(this.setState({contact:n.data.Object,originalPhone:n.data.Object.BusinessPhone,originalMobile:n.data.Object.MobilePhone}),this.changePartialView("ViewCustomerInfo")):this.displayError(n.data.Message):this.displayError(this.props.loginStrings.errorUnspecifiedText)}.bind(this)).catch(function(){this.setState({showSpinner:!1})}.bind(this))},registerUser:function(n,t){this.setState({errorClass:"hidden",showSpinner:!0});var i=!1;(this.state.originalMobile!=n.MobilePhone||this.state.originalPhone!=n.BusinessPhone)&&(i=!0);axios.post("/api/Login/CreateEpiUser",{user:this.state.contact,password:this.state.password,updateCrmContact:i,isPrivateCustomer:this.props.isPrivateCustomer,password:t}).then(function(n){if(this.setState({showSpinner:!1}),n.data!=null){if(n.data.Success==!0)return window.location.href=this.props.path,!1;this.displayError(n.data.Message)}else this.displayError(this.props.loginStrings.errorUnspecifiedText)}.bind(this)).catch(function(){this.setState({showSpinner:!1})}.bind(this))},changeView:function(n){if(n!=null)this.props.onChangeView(n,null);else this.props.onChangeView("Login",null)},render:function(){return React.createElement("div",null,React.createElement("div",{className:""},React.createElement(StandardTopBannerComponent,{title:this.props.title,preamble:this.props.description}),React.createElement("div",{className:"container loginPageContainer"},React.createElement("div",{className:this.state.errorClass+" col-md-12 infoLabelWrapper "},React.createElement("label",{className:"errorLabel"},this.state.errorText)),this.state.activePartialPage,this.state.showSpinner===!0?React.createElement(Spinner,null):null)))}}),ResetPassword=React.createClass({displayName:"ResetPassword",getInitialState:function(){return{password:null,passwordCheck:null,activePanel:1,showSpinner:!1,localizedStrings:null}},componentWillMount:function(){this.setState({localizedStrings:this.props.localizedStrings})},resetPassword:function(){if(this.state.password==null||this.state.passwordCheck==null)this.props.onError(this.state.localizedStrings.errorBothFields);else if(this.state.password!=this.state.passwordCheck)this.props.onError(this.state.localizedStrings.errorPasswordsDontMatch);else this.setState({showSpinner:!0}),axios.post("/api/Login/ResetPassword",{params:{password:this.state.password,username:this.props.user,hash:this.props.hash}}).then(function(n){console.log(n);this.setState({showSpinner:!1});n.data==!0&&this.setState({activePanel:2})}.bind(this)).catch(function(){this.setState({showSpinner:!1})}.bind(this))},setInputValue:function(n,t){n==1?this.setState({password:t.target.value}):n==2&&this.setState({passwordCheck:t.target.value})},changeView:function(){this.props.onChangeView("Login",null)},isActive:function(n){return n===this.state.activePanel?"":"hidden"},render:function(){return React.createElement("div",null,React.createElement("div",null,React.createElement(StandardTopBannerComponent,{title:this.props.title,preamble:this.props.description}),React.createElement("div",{className:"row loginPageContainer"},React.createElement("div",{className:this.isActive(1)},React.createElement("div",{className:"col-md-8 col-sm-10 col-md-offset-2 col-sm-offset-1 col-xs-12 registerFormWrapper"},React.createElement("section",{className:"registerFormElement"},React.createElement("div",{className:"col-md-3 col-sm-3 sectionTitle"},React.createElement("label",{className:"textBoxLabel"},this.state.localizedStrings.passwordPlaceholder)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("input",{type:"password",className:"normalTextBox",placeholder:this.state.localizedStrings.passwordPlaceholder,value:this.state.password,onChange:this.setInputValue.bind(this,1)}))),React.createElement("section",{className:"registerFormElement"},React.createElement("div",{className:"col-md-3 col-sm-3 sectionTitle"},React.createElement("label",{className:"textBoxLabel"},this.state.localizedStrings.repeatpasswordPlaceholder)),React.createElement("div",{className:"col-md-9 col-sm-9 sectionContent"},React.createElement("input",{type:"password",className:"normalTextBox",placeholder:this.state.localizedStrings.repeatpasswordPlaceholder,value:this.state.passwordCheck,onChange:this.setInputValue.bind(this,2)}))),React.createElement("div",{className:"buttonWrapper col-md-12"},React.createElement("input",{type:"button",className:"buttonRoundedCorners",value:this.state.localizedStrings.resetPasswordButtonText,onClick:this.resetPassword})))),React.createElement("div",{className:this.isActive(2)+" col-md-8 col-sm-10 col-md-offset-2 col-sm-offset-1 col-xs-12 registerFormWrapper"},React.createElement("div",{className:"alignCenter"},React.createElement("h3",null,this.state.localizedStrings.infotextNewPassword)),React.createElement("div",{className:"alignCenter"},React.createElement("a",{className:"menuLink",onClick:this.changeView},this.state.localizedStrings.navigateToLoginText))))),this.state.showSpinner===!0?React.createElement(Spinner,null):null)}}),ForgotPassword=React.createClass({displayName:"ForgotPassword",getInitialState:function(){return{email:null,activePanel:1,showSpinner:!1,emailPlacehoolder:"",buttonText:"",classErrorLabel:"hidden",errorText:"",emailErrorText:"",emailInvalidErrorText:"",localizedStrings:null}},componentWillMount:function(){this.setState({localizedStrings:this.props.localizedStrings})},sendPasswordLink:function(){this.state.email==null?this.setState({classErrorLabel:"",errorText:this.state.localizedStrings.emailErrorText}):this.checkEmail(this.state.email)?(this.setState({showSpinner:!0}),axios.get("/api/Login/SendResetPasswordLink",{params:{email:this.state.email}}).then(function(n){this.setState({showSpinner:!1});n.data==!0?this.setState({activePanel:2}):this.setState({classErrorLabel:"",errorText:n.data})}.bind(this)).catch(function(){this.setState({showSpinner:!1})}.bind(this))):this.setState({classErrorLabel:"",errorText:this.state.localizedStrings.emailInvalidErrorText})},checkEmail:function(n){return/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(n)?!0:!1},setInputValue:function(n,t){n==1&&this.setState({email:t.target.value})},isActive:function(n){return n===this.state.activePanel?"":"hidden"},changeView:function(){this.props.onChangeView("Login",null)},render:function(){return React.createElement("div",null,React.createElement("div",{className:""},React.createElement(StandardTopBannerComponent,{title:this.props.title,preamble:this.props.description}),React.createElement("div",{className:"row loginPageContainer"},React.createElement("div",{className:this.isActive(1)},React.createElement("div",{className:this.state.classErrorLabel+" col-md-12 infoLabelWrapper "},React.createElement("label",{className:"errorLabel"},this.state.errorText)),React.createElement("div",{className:"col-md-12 col-sm-6 col-xs-12 returnLinkWrapper"},React.createElement("a",{className:"returnLink",onClick:this.changeView},this.state.localizedStrings.navigationToLoginLinkText)),React.createElement("div",{className:"col-md-4 col-sm-6 col-xs-12 registerFormWrapper"},React.createElement("div",{className:"loginFieldWrapper"},React.createElement("input",{type:"text",className:"loginTextBox",placeholder:this.state.localizedStrings.emailPlaceholder,value:this.state.email,onChange:this.setInputValue.bind(this,1)})),React.createElement("div",{className:"buttonWrapper col-md-12"},React.createElement("input",{type:"button",className:"buttonBlueRoundedCorners",value:this.state.localizedStrings.sendPasswordButtonText,onClick:this.sendPasswordLink})))),React.createElement("div",{className:this.isActive(2)+" col-md-8 col-sm-10 col-md-offset-2 col-sm-offset-1 col-xs-12 registerFormWrapper"},React.createElement("div",{className:"alignCenter"},React.createElement("h3",null,this.state.localizedStrings.sentPasswordText)),React.createElement("div",{className:"alignCenter"},React.createElement("a",{className:"menuLink",onClick:this.changeView},this.state.localizedStrings.navigateToLoginText))))),this.state.showSpinner===!0?React.createElement(Spinner,null):null)}}),FlexitBreadcrumbs=React.createClass({displayName:"FlexitBreadcrumbs",render:function(){var n=this.props.crumbs,t=n.breadcrumbsitems,i=n.length;return React.createElement("div",{className:"container-fluid print-breadcrumbs"},React.createElement("div",{className:"row"},React.createElement("div",{className:"breadCrumbsWrapper"},React.createElement("div",{className:this.props.smallerBreadcrumbs==!0?"smallerBreadcrumb col-md-12 col-sm-12 col-xs-12 breadCrumbs":"col-md-12 col-sm-12 col-xs-12 breadCrumbs"},React.createElement("div",{className:""},React.createElement("span",null,this.props.breadCrumbString,": "),t.map(function(n,t){return React.createElement("span",{key:n.title},React.createElement("a",{href:n.url},n.title),t<i-1&&"  /  ")}))))))}}),FlexitHeader=React.createClass({displayName:"FlexitHeader",handleClick:function(){this.state.open?this.setState({open:!1,navBtnClass:"nav-toggle"}):this.setState({open:!0,navBtnClass:"nav-toggle active"})},getInitialState:function(){return{open:!1,navBtnClass:"nav-toggle",imageUrl:null,textBusinessPrivate:"",urlBusinessPrivate:"/"}},componentWillMount:function(){this.props.imageUrl!=null&&this.setState({imageUrl:this.props.imageUrl})},componentDidMount:function(){var i=window.location.pathname,n="/loginpage/labels/businesscustomer_menulink",t=this.props.headerButtonUrl&&this.props.headerButtonUrl.Uri;["bedrift","foretag","company"].some(function(n){return i.includes(n)})&&(n="/loginpage/labels/privatecustomer_menulink",t="/");this.setState({urlBusinessPrivate:t});this.translate(n)},logout:function(){axios.get("/api/Login/LogOut").then(function(n){if(n.data.Success==!0)return window.location.href=n.data.Message,!1;this.setState({classErrorLabel:"",errorText:"Logout error."})}.bind(this)).catch(function(){}.bind(this))},goToMyPage:function(){axios.get("/api/Login/IsUserLoggedIn",{responseType:"json"}).then(function(n){return n.data===!0?(window.location.href=this.props.pathMyPage,!1):(window.location.href=this.props.pathLoginPage,!1)}.bind(this)).catch(function(){}.bind(this))},goToSearchPage:function(){window.location.href=this.props.pathSearchPage},goToStartPage:function(){window.location.href=this.props.pathStartPage},setLanguage:function(n,t){return this.setState({showSpinner:!0}),axios.get("/SetLanguage",{params:{languageCode:n,contentId:this.props.contentId},headers:{Accept:"text/html,application/xhtml+xml"}},{responseType:"json"}).then(function(n){if(n.status===200)return window.location.href=n.data,!1}.bind(this)).catch(function(){}.bind(this)),t.preventDefault(),t.stopPropagation(),!1},translate:function(n){var t=[n];axios.post("/api/language/GetLocalizedStrings",{strings:t},{responseType:"json"}).then(function(n){n.status===200&&this.setState({textBusinessPrivate:n.data[0]})}.bind(this)).catch(function(){}.bind(this))},render:function(){return React.createElement("div",{className:"container-fluid print-header gradient-wrapper"},React.createElement("header",null,React.createElement("div",{className:"menuButton",onClick:this.handleClick},React.createElement("div",{className:this.state.navBtnClass,href:"#"},React.createElement("span",null)),React.createElement("span",{className:"menuButton_text"},this.props.navLocalizedStrings&&this.props.navLocalizedStrings.menu)),React.createElement("div",{className:"headerLogoWrapper"},React.createElement("img",{alt:"logo",className:"headerLogo",src:this.state.imageUrl,onClick:this.goToStartPage})),React.createElement("div",{className:"headerRightSideContent"},React.createElement("a",{className:"header_button",href:this.state.urlBusinessPrivate},React.createElement("span",null,this.state.textBusinessPrivate)),React.createElement("div",{className:"headerSearchIconWrapper largeOnly",onClick:this.goToSearchPage},React.createElement("img",{alt:"search-icon",src:"/Static/Images/SVG/flexit_sok_grey.svg"}),React.createElement("span",{className:"xlargeOnly"},this.props.searchText)),this.props.userLoggedIn==!1?React.createElement("div",{className:"headerPortraitIconWrapper",onClick:this.goToMyPage},React.createElement("span",null,React.createElement("img",{alt:"login-icon",src:"/Static/Images/SVG/lock_grey.svg"}),React.createElement("span",{className:"xlargeOnly"},this.props.logInText))):React.createElement("div",{className:"dropdown"},React.createElement("a",{className:"dropbtn"},React.createElement("img",{alt:"loggedin-icon",src:"/Static/Images/SVG/person_grey.svg"}),React.createElement("span",{className:"xlargeOnly"},this.props.loggedInUserName),React.createElement("img",{alt:"user-menu-icon",src:"/Static/Images/SVG/down.svg"})),React.createElement("div",{className:"dropdown-content"},React.createElement("a",{className:this.props.myPageMenuVisible?"":"hidden",href:this.props.pathMyPage},this.props.linkTextMyProfile),React.createElement("a",{className:this.props.serviceMenuVisible?"":"hidden",href:this.props.pathMyService},this.props.myPageMenuLinkStrings.menuLinkServiceCases),React.createElement("a",{className:this.props.reclamationMenuVisible?"":"hidden",href:this.props.pathMyReclamation},this.props.myPageMenuLinkStrings.menuLinkComplaints),React.createElement("a",{className:this.props.filterSubscriptionVisible?"":"hidden",href:this.props.pathFilterSubscription},this.props.myPageMenuLinkStrings.menuLinkSubscriptions),React.createElement("a",{className:this.props.myPageMenuVisible?"":"hidden",href:this.props.pathMyProfile},this.props.myPageMenuLinkStrings.menuLinkContactProfile),React.createElement("a",{className:this.props.customerInfoMenuVisible?"":"hidden",href:this.props.pathMyCustomerInfo},this.props.myPageMenuLinkStrings.menuLinkAccountProfileBusiness),React.createElement("a",{className:this.props.profInfoMenuVisible?"":"hidden",href:this.props.pathProfInfo},this.props.myPageMenuLinkStrings.menuLinkProfInfo),React.createElement("a",{onClick:this.logout},this.props.myPageMenuLinkStrings.menuLinkLogOut))),React.createElement("div",{className:"headerLanguagesWrapper largeOnly"},React.createElement("img",{alt:"norwegian flag",src:"/Static/Images/SVG/flag_norway.svg",onClick:this.setLanguage.bind(this,"no")}),React.createElement("img",{alt:"swedish flag",src:"/Static/Images/SVG/flag_sweden.svg",onClick:this.setLanguage.bind(this,"sv")}),React.createElement("img",{alt:"united kingdom flag",src:"/Static/Images/SVG/flag_uk.svg",onClick:this.setLanguage.bind(this,"en")}))),this.state.showSpinner===!0?React.createElement("div",{className:"spinnerWrapper"},React.createElement("div",{id:"loading"}),React.createElement("div",{className:"spinner"})):null),React.createElement(NavMenu,{menuIsOpen:this.state.open,mainMenuNodes:this.props.mainMenuNodes,mainMenuCMSNodes:this.props.mainMenuCMSNodes,pathRecentNews:this.props.pathRecentNews,pathMyPage:this.props.pathMyPage,pathSearchPage:this.props.pathSearchPage,catalogRoot:this.props.catalogRoot,footer:this.props.footer,onSetLanguage:this.setLanguage,localizedStrings:this.props.navLocalizedStrings}),React.createElement("div",{className:"header-gradient"}))}}),FlexitFooter=React.createClass({displayName:"FlexitFooter",render:function(){var t=this.props.footer,n=t.contactInfo,i=t.productLinks,r=t.facebook,u=t.gpluss,f=t.linkedin,e=t.instagram,o=t.youtube,s=t.links;return React.createElement("footer",{className:"container-fluid"},React.createElement("div",{className:"row footerrow"},React.createElement("div",{className:"col-sm-4 col-md-5 col-md-offset-1"},n.customerService&&React.createElement("p",{className:"smalLineHeight"},this.props.localizedStrings.customerService,": ",React.createElement("a",{href:"mailto:"+n.customerService},n.customerService)),n.projectingOfHouse&&React.createElement("p",{className:"smalLineHeight"},this.props.localizedStrings.propertyProjecting,": ",React.createElement("a",{href:"mailto:"+n.projectingOfHouse},n.projectingOfHouse)),n.phoneNumber&&React.createElement("p",{className:"smalLineHeight"},this.props.localizedStrings.footerPhone,": ",React.createElement("a",{className:"tel-link",href:"tel:"+n.phoneNumber},n.phoneNumber)),React.createElement("p",{className:"smalLineHeight"},React.createElement("span",{className:"boldText"},n.companyName),", ",n.address),React.createElement("div",{className:"smalLineHeight"},s.map(function(n){return React.createElement("p",{className:"smalLineHeight"},React.createElement("a",{href:n.url,key:n.text,target:n.target},n.title))})),React.createElement("div",{className:"socialIconsWrapper"},r&&React.createElement("a",{href:r,target:"_blank"},React.createElement("img",{src:"/Static/Images/Icons/fb-icon_black.png",alt:"Facebook-icon"})),u&&React.createElement("a",{href:u,target:"_blank"},React.createElement("img",{src:"/Static/Images/Icons/gpluss-icon_black.png",alt:"gpluss-icon"})),e&&React.createElement("a",{href:e,target:"_blank"},React.createElement("img",{src:"/Static/Images/Icons/instagram-icon_black.png",alt:"instagram-icon"})),f&&React.createElement("a",{href:f,target:"_blank"},React.createElement("img",{src:"/Static/Images/Icons/linkedin-icon_black.png",alt:"linkedin-icon"})),o&&React.createElement("a",{href:o,target:"_blank"},React.createElement("img",{src:"/Static/Images/Icons/youtube_black.png",alt:"youtube-icon"})))),React.createElement("div",{className:"col-sm-4 col-md-4"},React.createElement("div",{className:"row"},React.createElement("div",{className:"col-md-6"},i.slice(0,i.length/2).map(function(n){return React.createElement("p",{className:"smalLineHeight",key:n.linkText},React.createElement("a",{href:n.url},n.linkText))})),React.createElement("div",{className:"col-md-6"},i.slice(i.length/2,i.length).map(function(n){return React.createElement("p",{className:"smalLineHeight",key:n.linkText},React.createElement("a",{href:n.url},n.linkText))}))))))}}),logoUrl="http://test.flexit.no/globalassets/logo-flexit.png",MoreArticles=function(n){return React.createElement("section",{className:"moreArticlesSection"},n.articles.length>0&&React.createElement("h2",null,n.localizedStrings.moreArticles),React.createElement("div",{className:"row"},n.articles.map(function(n,t){return React.createElement(ArticleTeaser,_extends({},n,{columnClassName:"col-sm-6",key:"articleTeaser"+t}))})))},ArticlePage=function(n){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,Object.getPrototypeOf(t).apply(this,arguments))}return _inherits(t,n),_createClass(t,[{key:"render",value:function(){return React.createElement("div",{className:"articlePageWrapper mainBodyWrapper"},React.createElement("div",{className:"container"},React.createElement("section",{className:"mainSection col-lg-10 col-md-80 col-sm-12"},React.createElement(Article,{shareUrl:this.props.article.shareUrl,url:this.props.article.url,mainImageSrc:this.props.article.mainImageSrc,heading:this.props.article.heading,preamble:this.props.article.preamble,textBox1:this.props.textBox1,imageWithCaption:this.props.article.imageWithCaption,textBox2:this.props.article.textBox2,themePageLinks:this.props.article.themePageLinks,video:this.props.video,menuItems:this.props.menuItems,contentArea1:this.props.contentArea1,contentArea2:this.props.contentArea2,contentAreaAside1:this.props.contentAreaAside1,contentAreaAside2:this.props.contentAreaAside2,accordions:this.props.accordions,emailsharesubject:this.props.localizedStrings.emailShareSubject,emailsharebody:this.props.localizedStrings.emailShareBody,shareText:this.props.localizedStrings.shareArticle}),this.props.moreArticles.length>0&&React.createElement(MoreArticles,{articles:this.props.moreArticles,localizedStrings:this.props.localizedStrings})),React.createElement(AsideContent,_extends({},this.props.asideBlocks,{localizedStrings:this.props.localizedStrings}))))}}]),t}(React.Component);ArticlePage.propTypes={moreArticles:React.PropTypes.array,relatedProducts:React.PropTypes.array,relevantArticles:React.PropTypes.array,video:React.PropTypes.object,menuItems:React.PropTypes.array,contentAreaAside1:React.PropTypes.string,contentAreaAside2:React.PropTypes.string,localizedStrings:React.PropTypes.object};CurrentNewsPage=function(n){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,Object.getPrototypeOf(t).apply(this,arguments))}return _inherits(t,n),_createClass(t,[{key:"render",value:function(){return React.createElement("div",{className:"currentNewsPageWrapper mainBodyWrapper"},React.createElement("div",{className:"container"},React.createElement(StandardTopBannerComponent,{title:this.props.topBannerContent&&this.props.topBannerContent.pageTitle,preamble:this.props.topBannerContent&&this.props.topBannerContent.text}),React.createElement("div",{className:"row"},React.createElement("section",{className:"mainSection col-md-80 col-sm-12"},React.createElement("div",{className:"topArticlesWrapper currentNewsTopArticles row"},this.props.topArticles.map(function(n,t){return React.createElement(ArticleTeaser,_extends({},n,{columnClassName:"col-md-6 col-sm-12",key:"topArticle"+t}))})),React.createElement("div",{className:"articlesListWrapper currentNewsArticleList row"},this.props.articlesList.map(function(n,t){return React.createElement(ArticleTeaser,_extends({},n,{columnClassName:"col-md-20 col-sm-6",key:"articleList"+t}))}))),React.createElement(AsideContent,_extends({},this.props.asideBlocks,{localizedStrings:this.props.labels})))))}}]),t}(React.Component);CurrentNewsPage.propTypes={topArticles:React.PropTypes.array,articlesList:React.PropTypes.array,topBannerContent:React.PropTypes.object};ProductCategory=function(n){var t=n.title,i=n.text,e=n.moreAboutLinks,r=n.imageSrc,o=n.links,s=n.layoutType,h=n.labels,u=n.indexOrder,f=n.url;return React.createElement("article",{className:"productCategory cat"+(u+1)},React.createElement("a",{href:f,className:"productCategoryContent"},React.createElement("img",{src:r,alt:"Image of "+t}),React.createElement("h3",null,t),React.createElement("p",null,i)))};StructureMainCategoriesPage=function(n){function t(){_classCallCheck(this,t);var n=_possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this));return n.triggerDropdownMenu=function(){n.state.dropdownMenuClass=="hidden"?n.setState({dropdownMenuClass:""}):n.setState({dropdownMenuClass:"hidden"})},n.state={showCat2:!1,showCat3:!1,showRest:!1,dropdownMenuClass:"hidden"},n}return _inherits(t,n),_createClass(t,[{key:"render",value:function(){var i=this,n=this.props,r=n.topBannerContent,t=n.productCategories;return console.log(t),React.createElement("div",null,React.createElement("div",{className:"productsPageWrapper mainBodyWrapper"},React.createElement("div",{className:"container"},React.createElement(StandardTopBannerComponent,{title:this.props.topBannerContent&&this.props.topBannerContent.pageTitle,preamble:this.props.topBannerContent&&this.props.topBannerContent.text}),React.createElement("div",{className:"row"},React.createElement("div",{className:"col-lg-10 col-md-80"},React.createElement("section",{className:"mainSection structureContentWrapper"},React.createElement("div",{className:"row"},t.map(function(n,t){return React.createElement("div",{className:"structureContentProductWrapper col-xs-12 col-sm-6 col-md-20",key:"category"+t},React.createElement(ProductCategory,_extends({},n,{layoutType:"large4",labels:i.props.labels,indexOrder:t})))})))),React.createElement(AsideContent,_extends({},this.props.asideBlocks,{localizedStrings:this.props.labels}))))))}}]),t}(React.Component);StructureMainCategoriesPage.propTypes={topBannerContent:React.PropTypes.object,productCategories:React.PropTypes.arrayOf(React.PropTypes.object)};var StructureSubCategoriesPage=React.createClass({displayName:"StructureSubCategoriesPage",getInitialState:function(){return{dropdownMenuClass:"hidden",selectedMenuItemName:"Oversikt"}},getPurchaseHelper:function(n){return React.createElement("div",{className:"purchase-helper-wrapper"},React.createElement("a",{href:n.PurchaseHelperLink,className:"link"},React.createElement("button",{className:"buttonBlueRoundedCorners"},n.Title)),React.createElement("a",{className:"retailer",href:n.RetailerLink},n.RetailerLinkName))},getUSPFormated:function(n){var t="";return n!=null&&(n.indexOf("<list>")>-1&&(n=n.replace(new RegExp("<list>","g"),"<li>"),n=n.replace(new RegExp("<\/list>","g"),"<\/li>"),n=n.replace("<li>","<ul><li>"),n=n.replace(new RegExp("<\/li>$"),"<\/li><\/ul>")),t=React.createElement("span",{dangerouslySetInnerHTML:{__html:n}})),t},render:function(){return React.createElement("div",null,React.createElement("div",{className:"container mainBodyWrapper"},React.createElement(StandardTopBannerComponent,{title:this.props.title,preamble:this.props.ProductSubHeader}),React.createElement("div",{className:"row"},React.createElement("div",{className:"col-lg-10 col-md-80"},this.props.longDescription==null&&this.props.usp==null?null:React.createElement("div",{className:"categoryDescriptionContainer"},React.createElement(ShowMore,{height:200,more:this.props.labels.showMore,less:this.props.labels.showLess,buttonClassName:"readMoreButton"},this.props.longDescription,React.createElement("br",null),this.getUSPFormated(this.props.usp))),this.props.purchaseHelper==null?null:this.getPurchaseHelper(this.props.purchaseHelper),React.createElement("div",{className:"row structureContentWrapper"},this.props.items.map(function(n){return React.createElement(MainCategoryBlockComponent,{colclass:"col-lg-3 col-md-20 col-sm-6 col-xs-12 mainCategoryWrapper",name:n.Title,description:n.Description,imageUrl:n.ProductImageUrl,url:n.ContentUrl})}))),React.createElement(AsideContent,_extends({},this.props.asideBlocks,{localizedStrings:this.props.labels})))))}}),SearchHeadAndResults=function(n){function t(n){_classCallCheck(this,t);var i=_possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,n));return i.setFilter=function(n){i.setState({selectedFacet:n,currentFilteredResults:n=="all"?i.state.currentResults:i.state.currentResults.filter(function(t){return t.DocumentType.toLowerCase().match(n)})})},i.handleKeyPress=function(n){n.key==="Enter"&&i.doSearch(n.target.value)},i.handleSearchClick=function(n){i.doSearch(n.target.previousSibling.value)},i.state={currentResults:n.results==null?[]:n.results,currentFilteredResults:n.results==null?[]:n.results,selectedFacet:"all",currentFacets:[],showSpinner:!1},i}return _inherits(t,n),_createClass(t,[{key:"componentDidMount",value:function(){this.state.currentResults!=null&&this.setState({currentFacets:[]})}},{key:"componentDidUpdate",value:function(){this.inputField.focus()}},{key:"updateFacets",value:function(){this.setState({currentFacets:[]});var n=[{text:this.props.labels.all,DocumentType:"all",count:this.state.currentResults.length}],t=this.state.currentResults.filter(function(n){return n.DocumentType.toLowerCase().match("product")});n=n.concat([{text:this.props.labels.product,DocumentType:"product",count:t.length}]);t=this.state.currentResults.filter(function(n){return n.DocumentType.toLowerCase().match("document")});n=n.concat([{text:this.props.labels.document,DocumentType:"document",count:t.length}]);t=this.state.currentResults.filter(function(n){return n.DocumentType.toLowerCase().match("article")});n=n.concat([{text:this.props.labels.article,DocumentType:"article",count:t.length}]);t=this.state.currentResults.filter(function(n){return n.DocumentType.toLowerCase().match("theme")});n=n.concat([{text:this.props.labels.theme,DocumentType:"theme",count:t.length}]);this.setState({currentFacets:n})}},{key:"doSearch",value:function(n){var t=this,i;this.setState({showSpinner:!0});i=window.location.href;axios.get("/api/search/search",{params:{query:n,currentUrl:i,pageSize:100}},{responseType:"json"}).then(function(n){t.setState({currentResults:n.data.WebPages});t.setState({currentFilteredResults:n.data.WebPages});t.setState({selectedFacet:"all"});t.setState({showSpinner:!1})}).catch(function(n){if(n.response.status===500){t.setState({currentResults:[]});t.setState({currentFilteredResults:[]});t.setState({selectedFacet:"all"});t.setState({showSpinner:!1});return}t.setState({showSpinner:!1});console.warn(n)})}},{key:"renderFacets",value:function(){var n=this;return React.createElement("ul",null,this.state.currentFacets==null?null:this.state.currentFacets.filter(function(n){return!!n.count}).map(function(t,i){return React.createElement("li",{key:i},React.createElement("a",{className:t.DocumentType==n.state.selectedFacet?"selected":"",href:"javascript:void(0)",onClick:function(){return n.setFilter(t.DocumentType)}},t.text," (",t.count,")"))}))}},{key:"renderSearchHead",value:function(){var n=this;return React.createElement("div",{className:"searchFieldWrapper"},React.createElement("div",{className:"row"},React.createElement("div",{className:"col-lg-5 col-md-4 col-sm-6"},React.createElement("input",{ref:function(t){return n.inputField=t},type:"text",defaultValue:this.props.query,onKeyPress:this.handleKeyPress,className:"searchFieldTextBox",placeholder:this.props.labels.searchField}),React.createElement("span",{className:"searchFieldIcon",onClick:this.handleSearchClick}))))}},{key:"getLinkTarget",value:function(n){return n=="document"?"_blank":"_self"}},{key:"render",value:function(){var n=this;return React.createElement("div",null,React.createElement("div",{className:"container searchPageHeader"},React.createElement(StandardTopBannerComponent,{title:this.props.title,preamble:this.props.description}),this.renderSearchHead()),React.createElement("div",{className:"mainBodyWrapper"},React.createElement("div",{className:"searchResults"},React.createElement("div",{className:"container"},React.createElement("div",{className:"row"},React.createElement("div",{className:"col-md-12 facetsContainer"},this.renderFacets())),React.createElement("div",{className:"row"},React.createElement("div",{className:"col-md-12 col-sm-12 col-xs-12"},this.state.currentResults==null?null:React.createElement("span",{className:"totalHits"},this.state.currentResults.length," ",this.props.labels.hits),React.createElement("hr",null),this.state.currentFilteredResults==null?null:this.state.currentFilteredResults.map(function(t,i){if(typeof t.Url!="undefined"){var r=t.Url.includes("globalassets/catalog/documents")||t.Url.endsWith(".pdf");return React.createElement("div",{key:i,className:"col-md-12 searchResultsWrapper clearfix"},React.createElement("article",null,t.ThumbnailImage==null?r?React.createElement("div",{className:"image-wrap col-md-1"},React.createElement("img",{src:"/../../Static/images/svg/pdf-files.svg",alt:""})):null:React.createElement("div",{className:"image-wrap col-md-1"},React.createElement("img",{src:t.ThumbnailImage,alt:""})),React.createElement("div",{className:"searchtext-wrap "+(t.ThumbnailImage==null&&!r?"col-md-12":"col-md-11")},React.createElement("span",{className:"articleTitle"},n.props.labels[t.DocumentType]==null?null:React.createElement("span",null,n.props.labels[t.DocumentType]," : "),t.Name),React.createElement("span",{className:"teaserText"},t.Snippet),React.createElement("div",{className:"actionLink"},React.createElement("a",{href:t.Url,target:r?"_blank":"_self"},React.createElement("span",null,t.Url.substring(0,30),"..."))))))}})))))),this.state.showSpinner===!0?React.createElement("div",{className:"spinnerWrapper"},React.createElement("div",{id:"loading"}),React.createElement("div",{className:"spinner"})):null)}}]),t}(React.Component),SearchInput=function(n){function t(n){_classCallCheck(this,t);var i=_possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,n));return i.handleInput=function(n){if(n===""){i.setState({data:[]});return}axios.get("/api/search/GetSuggestionsResults",{params:{query:n}},{responseType:"json"}).then(function(n){console.log(n);n.data&&this.setState({data:n.data})}.bind(i)).catch(function(n){console.log(n)}.bind(i))},i.state={data:[]},i}return _inherits(t,n),_createClass(t,[{key:"render",value:function(){return React.createElement("form",{method:"get",action:this.props.pathSearchPage},React.createElement(Autocomplete,{name:this.props.name,minStrLength:this.props.minStrLength||3,onChange:this.handleInput,data:this.state.data,placeholder:this.props.placeholder,renderItem:function(n){return React.createElement(AutocompleteProduct,{product:n})}}))}}]),t}(React.Component);SearchInput.propTypes={minStrLength:React.PropTypes.number,debounce:React.PropTypes.number,placeholder:React.PropTypes.string};SearchInput.defaultProps={minStrLength:3,debounce:300};AutocompleteProduct=function(n){var t=n.product;return React.createElement("a",{href:t.ContentUrl},React.createElement("span",{className:"ddVariantName"},t.Title),t.ItemNumber?React.createElement("span",{className:"ddVariantNr largeOnly"},t.ItemNumber):null)};Autocomplete=function(n){function t(n){_classCallCheck(this,t);var i=_possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,n));return i.handleInput=function(n){var t=n.target.value;if(t!=i.state.lastString&&(t===""||!(t.length<i.props.minStrLength))){i.setState({lastString:t});i.props.onChange(t)}},i.handleInput=debounceWithPersistentEvent(i.handleInput,n.debounce||300),i.state={lastString:""},i}return _inherits(t,n),_createClass(t,[{key:"render",value:function(){var n=this;return React.createElement("div",{className:"c-autocomplete"},React.createElement("input",{type:"text",autoComplete:"Off",className:"searchFieldTextBox",name:this.props.name,onChange:this.handleInput,placeholder:this.props.placeholder}),React.createElement("input",{type:"submit",value:"",className:"searchFieldIcon"}),this.props.data.length?React.createElement("div",{className:"dropdown-list"},React.createElement("div",{className:"dropdown-list__wrap"},this.props.data.map(function(t,i){return React.createElement("div",{className:"dropdown-list__item",key:i},n.props.renderItem(t))}))):null)}}]),t}(React.Component);Autocomplete.propTypes={minStrLength:React.PropTypes.number,data:React.PropTypes.array,onChange:React.PropTypes.func,debounce:React.PropTypes.number,placeholder:React.PropTypes.string,name:React.PropTypes.string,renderItem:React.PropTypes.func};Autocomplete.defaultProps={minStrLength:3,data:[],onChange:function(){},debounce:300,renderItem:function(){}};Truncate=function(n){function t(){var r,n;_classCallCheck(this,t);for(var u=arguments.length,f=Array(u),i=0;i<u;i++)f[i]=arguments[i];return n=_possibleConstructorReturn(this,(r=Object.getPrototypeOf(t)).call.apply(r,[this].concat(f))),n.state={},n.styles={ellipsis:{position:"fixed",visibility:"hidden",top:0,left:0}},n.onResize=n.onResize.bind(n),n.onTruncate=n.onTruncate.bind(n),n.calcTargetWidth=n.calcTargetWidth.bind(n),n.measureWidth=n.measureWidth.bind(n),n.getLines=n.getLines.bind(n),n.renderLine=n.renderLine.bind(n),n}return _inherits(t,n),_createClass(t,[{key:"componentDidMount",value:function(){var t=this.refs,n=t.text,i=t.ellipsis,r=this.calcTargetWidth,u=this.onResize,f=document.createElement("canvas");this.canvas=f.getContext("2d");document.body.appendChild(i);r(function(){n&&n.parentNode.removeChild(n)});window.addEventListener("resize",u)}},{key:"componentDidUpdate",value:function(n){this.props.children!==n.children&&this.forceUpdate()}},{key:"componentWillUnmount",value:function(){var n=this.refs.ellipsis,t=this.onResize,i=this.timeout;n.parentNode.removeChild(n);window.removeEventListener("resize",t);cancelAnimationFrame(i)}},{key:"innerText",value:function(n){var t=document.createElement("div"),i,r;return t.innerHTML=n.innerHTML.replace(/\r\n|\r|\n/g," "),i=t.innerText,r=document.createElement("div"),r.innerHTML="foo<br/>bar",r.innerText.replace(/\r\n|\r/g,"\n")!=="foo\nbar"&&(t.innerHTML=t.innerHTML.replace(/<br.*?[\/]?>/gi,"\n"),i=t.innerText),i}},{key:"onResize",value:function(){this.calcTargetWidth()}},{key:"onTruncate",value:function(n){var t=this.props.onTruncate;typeof t=="function"&&(this.timeout=requestAnimationFrame(function(){t(n)}))}},{key:"calcTargetWidth",value:function(n){var i=this.refs.target,f=this.calcTargetWidth,e=this.canvas,r,t,u;if(i){if(r=i.parentNode.getBoundingClientRect().width,!r)return requestAnimationFrame(function(){return f(n)});t=window.getComputedStyle(i);u=[t["font-weight"],t["font-style"],t["font-size"],t["font-family"]].join(" ");e.font=u;this.setState({targetWidth:r},n)}}},{key:"measureWidth",value:function(n){return this.canvas.measureText(n).width}},{key:"ellipsisWidth",value:function(n){return n.offsetWidth}},{key:"getLines",value:function(){for(var n,i,o,b,t,s,h,k,d=this.refs,p=this.props,c=p.lines,g=p.ellipsis,l=this.state.targetWidth,nt=this.innerText,a=this.measureWidth,tt=this.onTruncate,u=[],it=nt(d.text),f=it.split("\n").map(function(n){return n.split(" ")}),w=!0,rt=this.ellipsisWidth(this.refs.ellipsis),r=1;r<=c;r++){if(n=f[0],n.length===0){u.push();f.shift();r--;continue}if(i=n.join(" "),a(i)<=l&&f.length===1){w=!1;u.push(i);break}if(r===c){for(var v=n.join(" "),e=0,y=v.length-1;e<=y;)o=Math.floor((e+y)/2),b=v.slice(0,o+1),a(b)+rt<=l?e=o+1:y=o-1;i=React.createElement("span",null,v.slice(0,e),g)}else{for(t=0,s=n.length-1;t<=s;)h=Math.floor((t+s)/2),k=n.slice(0,h+1).join(" "),a(k)<=l?t=h+1:s=h-1;if(t===0){r=c-1;continue}i=n.slice(0,t).join(" ");f[0].splice(0,t)}u.push(i)}return tt(w),u}},{key:"renderLine",value:function(n,t,i){if(t===i.length-1)return React.createElement("span",{key:t},n);var r=React.createElement("br",{key:t+"br"});return n?[React.createElement("span",{key:t},n),r]:r}},{key:"render",value:function(){var u=this.refs.target,n=this.props,i=n.children,f=n.ellipsis,e=n.lines,r=_objectWithoutProperties(n,["children","ellipsis","lines"]),o=this.state.targetWidth,s=this.getLines,h=this.renderLine,c=this.onTruncate,t=void 0,l=!!(u&&o);return typeof window!="undefined"&&l&&(e>0?t=s().map(h):(t=i,c(!1))),delete r.onTruncate,React.createElement("span",_extends({},r,{ref:"target"}),t,React.createElement("span",{ref:"text"},i),React.createElement("span",{ref:"ellipsis",style:this.styles.ellipsis},f))}}]),t}(React.Component);Truncate.propTypes={children:React.PropTypes.node,ellipsis:React.PropTypes.node,lines:React.PropTypes.oneOfType([React.PropTypes.oneOf([!1]),React.PropTypes.number]),onTruncate:React.PropTypes.func};Truncate.defaultProps={children:"",ellipsis:"…",lines:1};var ShowMore=function(n){function t(){var r,u,n,f;_classCallCheck(this,t);for(var e=arguments.length,o=Array(e),i=0;i<e;i++)o[i]=arguments[i];return f=(u=(n=_possibleConstructorReturn(this,(r=Object.getPrototypeOf(t)).call.apply(r,[this].concat(o))),n),n.state={contentHeight:0,truncated:!0},n.toggleTruncated=function(){n.setState(function(n){return{truncated:!n.truncated}})},u),_possibleConstructorReturn(n,f)}return _inherits(t,n),_createClass(t,[{key:"componentDidMount",value:function(){this.updateHeight()}},{key:"componentDidUpdate",value:function(){this.updateHeight()}},{key:"updateHeight",value:function(){var n=this;this.offsetHeight!==this.state.contentHeight&&this.setState(function(t){return n.offsetHeight!==t.contentHeight?{contentHeight:n.offsetHeight}:{}})}},{key:"render",value:function(){var a=this,n=this.props,r=n.children,v=n.className,u=n.height,i=u===undefined?100:u,f=n.more,y=f===undefined?"Show more":f,e=n.less,p=e===undefined?"Show less":e,o=n.useGradient,w=o===undefined?!0:o,s=n.gradientHeight,b=s===undefined?"3em":s,h=n.gradientColor,k=h===undefined?"#fff":h,d=n.buttonClassName,c=this.state,t=c.truncated,l=c.contentHeight,g={position:"absolute",bottom:0,left:0,width:"100%",background:"linear-gradient(to bottom, transparent 0%, "+k+" 80%)",height:b};return React.createElement("div",{className:v},React.createElement("div",{style:{position:"relative",height:0,width:"100%",overflow:"hidden",padding:0,margin:0}},React.createElement("div",{style:{position:"absolute",width:"100%",top:"0",left:"-100%",padding:0,margin:0},ref:function(n){n!==null&&(a.offsetHeight=n.offsetHeight)}},r)),React.createElement("div",{style:{position:"relative",maxHeight:t?i+"px":"none",overflow:t?"hidden":"auto"}},r,w&&t&&i<l&&React.createElement("div",{style:g})),i<l&&React.createElement("button",{onClick:this.toggleTruncated,className:d},t?y:p))}}]),t}(React.Component),FactBoxComponent=React.createClass({displayName:"FactBoxComponent",render:function(){var t=[],n;if(this.props.facts!=null)for(n=0;n<this.props.facts.length;n++)t.push(React.createElement("li",{key:"fact_"+n},"test"));return React.createElement("div",{className:"factbox_wrapper "+this.props.alignment},this.props.title,React.createElement("ul",null,t))}}),Popup=function(n){function t(n){_classCallCheck(this,t);var i=_possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,n));return i.state={isClosed:n.isClosed},i}return _inherits(t,n),_createClass(t,[{key:"componentDidMount",value:function(){var n=JSON.parse(localStorage.getItem("isClosed"+this.props.id)||null)||{};n.isClosed===!0?this.setState({isClosed:!0}):this.setState({isClosed:!1})}},{key:"save",value:function(n){localStorage.setItem("isClosed"+this.props.id,JSON.stringify(n))}},{key:"close",value:function(){this.save({isClosed:!0});this.setState({isClosed:!0})}},{key:"render",value:function(){var n=this;return this.state.isClosed?React.createElement("div",null):React.createElement("div",{className:"popupNotification"},React.createElement("div",{className:"icon"},"i"),React.createElement("div",{className:"popupContent"},React.createElement("div",{className:"text"},React.createElement("div",null,React.createElement("p",{className:"title"},this.props.title,React.createElement("span",{className:"close-button",onClick:function(){return n.close()}})),React.createElement("p",{className:"sub-title"},this.props.subTitle)),React.createElement("p",null,this.props.description)),React.createElement("a",{href:this.props.link},this.props.labels.moreInfo)))}}]),t}(React.Component);!function(n){function t(r){if(i[r])return i[r].exports;var u=i[r]={i:r,l:!1,exports:{}};return n[r].call(u.exports,u,u.exports,t),u.l=!0,u.exports}var i={};t.m=n;t.c=i;t.d=function(n,i,r){t.o(n,i)||Object.defineProperty(n,i,{enumerable:!0,get:r})};t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"});Object.defineProperty(n,"__esModule",{value:!0})};t.t=function(n,i){var r,u;if((1&i&&(n=t(n)),8&i)||4&i&&"object"==(typeof n=="undefined"?"undefined":_typeof(n))&&n&&n.__esModule)return n;if(r=Object.create(null),t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&i&&"string"!=typeof n)for(u in n)t.d(r,u,function(t){return n[t]}.bind(null,u));return r};t.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(i,"a",i),i};t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)};t.p="";t(t.s=3)}([function(n,t,i){"use strict";function s(n){return(s="function"==typeof Symbol&&"symbol"==_typeof(Symbol.iterator)?function(n){return typeof n=="undefined"?"undefined":_typeof(n)}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n=="undefined"?"undefined":_typeof(n)})(n)}function h(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function c(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}function l(n,t,i){return t&&c(n.prototype,t),i&&c(n,i),n}function a(n,t){return!t||"object"!==s(t)&&"function"!=typeof t?r(n):t}function u(n){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(n)}function r(n){if(void 0===n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function v(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}});t&&y(n,t)}function y(n,t){return(y=Object.setPrototypeOf||function(n,t){return n.__proto__=t,n})(n,t)}var e,o,p,f;i.d(t,"a",function(){return p});e=i(1);o=i.n(e);p=function(){function n(t){var i;return h(this,n),(i=a(this,u(n).call(this,t))).state={currentSlide:0,position:0,currentSlideMobile:0,positionMobile:0},i.resetTransitionInterval=i.resetTransitionInterval.bind(r(i)),i.transition=i.transition.bind(r(i)),i.transitionSlides=i.transitionSlides.bind(r(i)),i}return v(n,React.Component),l(n,[{key:"componentDidMount",value:function(){this.interval=setInterval(this.transition,5e3);o()();console.log(this.props)}},{key:"componentWillUnmount",value:function(){clearInterval(this.interval)}},{key:"resetTransitionInterval",value:function(){clearInterval(this.interval);this.interval=setInterval(this.transition,5e3)}},{key:"handleArrowClick",value:function(n){this.resetTransitionInterval();"right"===n?this.transition():"left"===n&&(this.state.currentSlide-1<0?this.transition(this.props.slides.length-1):this.transition(this.state.currentSlide-1))}},{key:"transition",value:function(n){var t=this.transitionSlides(this.state.currentSlide,this.props.slides.length,n),i=this.transitionSlides(this.state.currentSlideMobile,this.props.slidesMobile.length,n);this.setState({currentSlide:t.currentSlide,position:t.position,currentSlideMobile:i.currentSlide,positionMobile:i.position})}},{key:"transitionSlides",value:function(n,t,i){var r;return i||0===i?r=i:(r=n+1)>=t&&(r=0),{position:-100*r,currentSlide:r}}},{key:"render",value:function(){var n=this,t=this.props.slides.map(function(t,i){return React.createElement(f,{resetInterval:n.resetTransitionInterval,onSelect:n.transition,id:i,slides:n.props.slides,currentSlide:n.state.currentSlide,key:i})}),i=this.props.slides.map(function(t,i){return React.createElement("li",{className:"c-carousel__image "+(n.state.currentSlide===i?"c-carousel__image--showing":"")},React.createElement("img",{key:"slide_"+i,src:t.imageUrl,alt:t.description}))}),r=this.props.slidesMobile.map(function(t,i){return React.createElement("li",{className:"c-carousel__image "+(n.state.currentSlideMobile===i?"c-carousel__image--showing":"")},React.createElement("img",{key:"slide_mobile_"+i,src:t.imageUrl,alt:t.description}))}),u=this.props.slidesMobile.map(function(t,i){return React.createElement(f,{resetInterval:n.resetTransitionInterval,onSelect:n.transition,id:i,slides:n.props.slidesMobile,currentSlide:n.state.currentSlideMobile,key:i})});return React.createElement("div",{className:"c-carousel container-fluid"},React.createElement("ul",{className:"c-carousel__image-wrapper row u-hidden-mobile-down",style:{}},i),React.createElement("ul",{className:"c-carousel__image-wrapper row u-hidden-tablet-up",style:{}},r),React.createElement("span",{className:"c-carousel__text col-md-4 col-sm-7 col-xs-12 c-carousel__text--"+this.props.textColor},this.props.text),this.props.slides.length>1?React.createElement("ul",{className:"c-carousel__dots u-hidden-mobile-down"},t):null,this.props.slidesMobile.length>1?React.createElement("ul",{className:"c-carousel__dots u-hidden-tablet-up"},u):null,this.props.slides.length>1?React.createElement("div",null,React.createElement("span",{onClick:function(){return n.handleArrowClick("right")},className:"u-hidden-mobile-down c-carousel__arrow c-carousel__arrow--right"}),React.createElement("span",{onClick:function(){return n.handleArrowClick("left")},className:"u-hidden-mobile-down c-carousel__arrow c-carousel__arrow--left"})):null)}}]),n}();f=function(){function n(t){var i;return h(this,n),(i=a(this,u(n).call(this,t))).handleClick=i.handleClick.bind(r(i)),i}return v(n,React.Component),l(n,[{key:"handleClick",value:function(){console.log("dot click",this);this.props.resetInterval();this.props.onSelect(this.props.id)}},{key:"render",value:function(){return React.createElement("li",{onClick:this.handleClick,className:this.props.id===this.props.currentSlide?"active":""})}}]),n}()},function(n){"use strict";function c(n,t,i){var u="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='"+(t||1)+"' height='"+(i||0)+"'%3E%3C/svg%3E";f.call(n,"src")!==u&&r.call(n,"src",u)}function o(n,t){n.naturalWidth?t(n):setTimeout(o,100,n,t)}function l(n){var u=function(n){for(var t,r=getComputedStyle(n).fontFamily,i={};null!==(t=a.exec(r));)i[t[1]]=t[2];return i}(n),i=n[t];if(u["object-fit"]=u["object-fit"]||"fill",!i.img){if("fill"===u["object-fit"])return;if(!i.skipTest&&s&&!u["object-position"])return}if(!i.img){i.img=new Image(n.width,n.height);i.img.srcset=f.call(n,"data-ofi-srcset")||n.srcset;i.img.src=f.call(n,"data-ofi-src")||n.src;r.call(n,"data-ofi-src",n.src);n.srcset&&r.call(n,"data-ofi-srcset",n.srcset);c(n,n.naturalWidth||n.width,n.naturalHeight||n.height);n.srcset&&(n.srcset="");try{!function(n){var i={get:function(i){return n[t].img[i||"src"]},set:function(i,u){return n[t].img[u||"src"]=i,r.call(n,"data-ofi-"+u,i),l(n),i}};Object.defineProperty(n,"src",i);Object.defineProperty(n,"currentSrc",{get:function(){return i.get("currentSrc")}});Object.defineProperty(n,"srcset",{get:function(){return i.get("srcset")},set:function(n){return i.set(n,"srcset")}})}(n)}catch(n){window.console&&console.warn("https://bit.ly/ofi-old-browser")}}!function(n){if(n.srcset&&!y&&window.picturefill){var t=window.picturefill._;n[t.ns]&&n[t.ns].evaled||t.fillImg(n,{reselect:!0});n[t.ns].curSrc||(n[t.ns].supported=!1,t.fillImg(n,{reselect:!0}));n.currentSrc=n[t.ns].curSrc||n.src}}(i.img);n.style.backgroundImage='url("'+(i.img.currentSrc||i.img.src).replace(/"/g,'\\"')+'")';n.style.backgroundPosition=u["object-position"]||"center";n.style.backgroundRepeat="no-repeat";n.style.backgroundOrigin="content-box";/scale-down/.test(u["object-fit"])?o(i.img,function(){n.style.backgroundSize=i.img.naturalWidth>n.width||i.img.naturalHeight>n.height?"contain":"auto"}):n.style.backgroundSize=u["object-fit"].replace("none","auto").replace("fill","100% 100%");o(i.img,function(t){c(n,t.naturalWidth,t.naturalHeight)})}function u(n,i){var f=!h&&!n,r;if(i=i||{},n=n||"img",e&&!i.skipTest||!v)return!1;for("img"===n?n=document.getElementsByTagName("img"):"string"==typeof n?n=document.querySelectorAll(n):("length"in n)||(n=[n]),r=0;r<n.length;r++)n[r][t]=n[r][t]||{skipTest:i.skipTest},l(n[r]);f&&(document.body.addEventListener("load",function(n){"IMG"===n.target.tagName&&u(n.target,{skipTest:i.skipTest})},!0),h=!0,n="img");i.watchMQ&&window.addEventListener("resize",u.bind(null,n,{skipTest:i.skipTest}))}var t="bfred-it:object-fit-images",a=/(object-fit|object-position)\s*:\s*([-.\w\s%]+)/g,i="undefined"==typeof Image?{style:{"object-position":1}}:new Image,s="object-fit"in i.style,e="object-position"in i.style,v="background-size"in i.style,y="string"==typeof i.currentSrc,f=i.getAttribute,r=i.setAttribute,h=!1;u.supportsObjectFit=s;u.supportsObjectPosition=e,function(){function n(n,i){return n[t]&&n[t].img&&("src"===i||"srcset"===i)?n[t].img:n}e||(HTMLImageElement.prototype.getAttribute=function(t){return f.call(n(this,t),t)},HTMLImageElement.prototype.setAttribute=function(t,i){return r.call(n(this,t),t,String(i))})}();n.exports=u},function(n,t){"use strict";var i=React.createClass({displayName:"StartpageBannerButtons",render:function(){return console.log(this.props),this.props.imageUrl,React.createElement("div",{className:"serviceblockouter"},void 0)}});t.a={StartpageBannerButtons:i}},function(n,t,i){"use strict";i.r(t),function(n){var t=i(0),r=i(2);n.Components=r.a;n.TopBannerCarousel=t.a}.call(this,i(4))},function(n){var t=function(){return this}();try{t=t||new Function("return this")()}catch(n){"object"==(typeof window=="undefined"?"undefined":_typeof(window))&&(t=window)}n.exports=t}])