vendor: 4,709 bytes, lines 1-2
1/*! module-price-load 3.0.0 */ 2!function(){var e={402:function(e,t,r){"use strict";var n=r(537),i=r.n(n),s=r(645),o=r.n(s)()(i());o.push([e.id,"","",{version:3,sources:[],names:[],mappings:"",sourceRoot:""}]),t.Z=o},645:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,i,s){"string"==typeof e&&(e=[[null,e,void 0]]);var o={};if(n)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(o[c]=!0)}for(var u=0;u<e.length;u++){var l=[].concat(e[u]);n&&o[l[0]]||(void 0!==s&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=s),r&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=r):l[2]=r),i&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=i):l[4]="".concat(i)),t.push(l))}},t}},537:function(e){"use strict";e.exports=function(e){var t=e[1],r=e[3];if(!r)return t;if("function"==typeof btoa){var n=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),s="/*# ".concat(i," */"),o=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[t].concat(o).concat([s]).join("\n")}return[t].join("\n")}},484:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",i="second",s="minute",o="hour",a="day",c="week",u="month",l="quarter",d="year",h="date",f="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},M=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},g={s:M,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),i=r%60;return(t<=0?"+":"-")+M(n,2,"0")+":"+M(i,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),i=t.clone().add(n,u),s=r-i<0,o=t.clone().add(n+(s?-1:1),u);return+(-(n+(r-i)/(s?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:d,w:c,d:a,D:h,h:o,m:s,s:i,ms:n,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},y="en",$={};$[y]=_;var D=function(e){return e instanceof P},b=function(e,t,r){var n;if(!e)return y;if("string"==typeof e)$[e]&&(n=e),t&&($[e]=t,n=e);else{var i=e.name;$[i]=e,n=i}return!r&&n&&(y=n),n||!r&&y},L=function(e,t){if(D(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new P(r)},v=g;v.l=b,v.i=D,v.w=function(e,t){return L(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var P=function(){function _(e){this.$L=b(e.locale,null,!0),this.parse(e)}var M=_.prototype;return M.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(v.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(m);if(n){var i=n[2]-1||0,s=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,s)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,s)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},M.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},M.$utils=function(){return v},M.isValid=function(){return!(this.$d.toString()===f)},M.isSame=function(e,t){var r=L(e);return this.startOf(t)<=r&&r<=this.endOf(t)},M.isAfter=function(e,t){return L(e)<this.startOf(t)},M.isBefore=function(e,t){return this.endOf(t)<L(e)},M.$g=function(e,t,r){return v.u(e)?this[t]:this.set(r,e)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(e,t){var r=this,n=!!v.u(t)||t,l=v.p(e),f=function(e,t){var i=v.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return n?i:i.endOf(a)},m=function(e,t){return v.w(r.toDate()[e].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},p=this.$W,_=this.$M,M=this.$D,g="set"+(this.$u?"UTC":"");switch(l){case d:return n?f(1,0):f(31,11);case u:return n?f(1,_):f(0,_+1);
2case c:var y=this.$locale().weekStart||0,$=(p<y?p+7:p)-y;return f(n?M-$:M+(6-$),_);case a:case h:return m(g+"Hours",0);case o:return m(g+"Minutes",1);case s:return m(g+"Seconds",2);case i:return m(g+"Milliseconds",3);default:return this.clone()}},M.endOf=function(e){return this.startOf(e,!1)},M.$set=function(e,t){var r,c=v.p(e),l="set"+(this.$u?"UTC":""),f=(r={},r[a]=l+"Date",r[h]=l+"Date",r[u]=l+"Month",r[d]=l+"FullYear",r[o]=l+"Hours",r[s]=l+"Minutes",r[i]=l+"Seconds",r[n]=l+"Milliseconds",r)[c],m=c===a?this.$D+(t-this.$W):t;if(c===u||c===d){var p=this.clone().set(h,1);p.$d[f](m),p.init(),this.$d=p.set(h,Math.min(this.$D,p.daysInMonth())).$d}else f&&this.$d[f](m);return this.init(),this},M.set=function(e,t){return this.clone().$set(e,t)},M.get=function(e){return this[v.p(e)]()},M.add=function(n,l){var h,f=this;n=Number(n);var m=v.p(l),p=function(e){var t=L(f);return v.w(t.date(t.date()+Math.round(e*n)),f)};if(m===u)return this.set(u,this.$M+n);if(m===d)return this.set(d,this.$y+n);if(m===a)return p(1);if(m===c)return p(7);var _=(h={},h[s]=t,h[o]=r,h[i]=e,h)[m]||1,M=this.$d.getTime()+n*_;return v.w(M,this)},M.subtract=function(e,t){return this.add(-1*e,t)},M.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||f;var n=e||"YYYY-MM-DDTHH:mm:ssZ",i=v.z(this),s=this.$H,o=this.$m,a=this.$M,c=r.weekdays,u=r.months,l=function(e,r,i,s){return e&&(e[r]||e(t,n))||i[r].substr(0,s)},d=function(e){return v.s(s%12||12,e,"0")},h=r.meridiem||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n},m={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:v.s(a+1,2,"0"),MMM:l(r.monthsShort,a,u,3),MMMM:l(u,a),D:this.$D,DD:v.s(this.$D,2,"0"),d:String(this.$W),dd:l(r.weekdaysMin,this.$W,c,2),ddd:l(r.weekdaysShort,this.$W,c,3),dddd:c[this.$W],H:String(s),HH:v.s(s,2,"0"),h:d(1),hh:d(2),a:h(s,o,!0),A:h(s,o,!1),m:String(o),mm:v.s(o,2,"0"),s:String(this.$s),ss:v.s(this.$s,2,"0"),SSS:v.s(this.$ms,3,"0"),Z:i};return n.replace(p,(function(e,t){return t||m[e]||i.replace(":","")}))},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(n,h,f){var m,p=v.p(h),_=L(n),M=(_.utcOffset()-this.utcOffset())*t,g=this-_,y=v.m(this,_);return y=(m={},m[d]=y/12,m[u]=y,m[l]=y/3,m[c]=(g-M)/6048e5,m[a]=(g-M)/864e5,m[o]=g/r,m[s]=g/t,m[i]=g/e,m)[p]||g,f?y:v.a(y)},M.daysInMonth=function(){return this.endOf(u).$D},M.$locale=function(){return $[this.$L]},M.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=b(e,t,!0);return n&&(r.$L=n),r},M.clone=function(){return v.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},_}(),S=P.prototype;return L.prototype=S,[["$ms",n],["$s",i],["$m",s],["$H",o],["$W",a],["$M",u],["$y",d],["$D",h]].forEach((function(e){S[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),L.extend=function(e,t){return e.$i||(e(t,P,L),e.$i=!0),L},L.locale=b,L.isDayjs=D,L.unix=function(e){return L(1e3*e)},L.en=$[y],L.Ls=$,L.p={},L}()},379:function(e){"use strict";var t=[];function r(e){for(var r=-1,n=0;n<t.length;n++)if(t[n].identifier===e){r=n;break}return r}function n(e,n){for(var s={},o=[],a=0;a<e.length;a++){var c=e[a],u=n.base?c[0]+n.base:c[0],l=s[u]||0,d="".concat(u," ").concat(l);s[u]=l+1;var h=r(d),f={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==h)t[h].references++,t[h].updater(f);else{var m=i(f,n);n.byIndex=a,t.splice(a,0,{identifier:d,updater:m,references:1})}o.push(d)}return o}function i(e,t){var r=t.domAPI(t);r.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;r.update(e=t)}else r.remove()}}e.exports=function(e,i){var s=n(e=e||[],i=i||{});return function(e){e=e||[];for(var o=0;o<s.length;o++){var a=r(s[o]);t[a].references--}for(var c=n(e,i),u=0;u<s.length;u++){var l=r(s[u]);0===t[l].references&&(t[l].updater(),t.splice(l,1))}s=c}}},569:function(e){"use strict";var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);
2if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},216:function(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},565:function(e,t,r){"use strict";e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},795:function(e){"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var i=void 0!==r.layer;i&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,i&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var s=r.sourceMap;s&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var s=t[n]={id:n,exports:{}};return e[n].call(s.exports,s,s.exports,r),s.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.nc=void 0,function(){"use strict";var e=r(379),t=r.n(e),n=r(795),i=r.n(n),s=r(569),o=r.n(s),a=r(565),c=r.n(a),u=r(216),l=r.n(u),d=r(589),h=r.n(d),f=r(402),m={};m.styleTagTransform=h(),m.setAttributes=c(),m.insert=o().bind(null,"head"),m.domAPI=i(),m.insertStyleElement=l();t()(f.Z,m),f.Z&&f.Z.locals&&f.Z.locals;const p=window.priceLoadDemoDevBuild?"http://module-price-load.local:8080/module-price-load/cache/price.json":"/module-price-load/cache/price.json",_="data-module-price-load-hotel-id",M="data-module-price-load-date",g="data-module-price-load-minlos",y="data-module-price-load-offer-name",$="data-module-price-load-link",D="data-module-price-load-restore-status",b="data-module-price-load-fill-status",L="module-price-load",v=`${L}:expire`,P=`${L}:prices`,S="not-supported",A="{{DateFormat}}",O="MMMM",E="{{minlos}}",I="{{minlosDayEnd}}",R="{{minlosDay}}",T="{{offer}}",C=!1,w="RoundDown",N="RoundUp",x="RoundNearest",F=`//${location.host}/booking/`;var U=r(484),k=r.n(U);const Y=()=>"undefined"!=typeof priceLoadDemoMode&&"demo"===priceLoadDemoMode,H=()=>MODULE_PRICE_LOAD_LANG===S,J=e=>e.split("").reverse().join(""),j=()=>k()().unix(),G=(e,t)=>k()(e).format(t),B=(e,t,r,n,i,s)=>({hotel:e,room:t,date:r,nights:n,adults:i,offer:s}),W=()=>{const e=localStorage.getItem(P);return!e||localStorage.getItem(v)<=j()?"":e},Z=e=>{localStorage.setItem(P,e),localStorage.setItem(v,k()().add(30,"minute").unix().toString())};class z{constructor(){this._cachePrices=W()}isLoadNeeded(){return!this._cachePrices||Y()}load(){return(async()=>{const e=await fetch(`${p}?${j()}`);return e.ok||console.error("Could't fetch price"),await e.json()})().then((e=>(Z(JSON.stringify(e)),e))).catch((e=>{console.log("PriceLoad load error:"),console.log(e)}))}getFromCache(){return JSON.parse(this._cachePrices)}}const q={en:{DateText:`Best rate available ${A}`,DateFormat:"MMMM&nb[s]pD,&nb[s]pYYYY",MinLosText:`When booking from ${E} ${R}`,OfferText:`on "${T}" special offer`,UsePriceRound:C,UsePriceSplit:!0,PriceDelimiter:","},fr:{DateText:`Le meilleur prix pour le ${A}`,DateFormat:"D&nb[s]pMMMM,&nb[s]pYYYY",MinLosText:`Lors de la réservation à partir de ${E} ${R}`,OfferText:`pour la promotion "${T}"`,UsePriceRound:C,UsePriceSplit:!0,PriceDelimiter:","},zh:{DateText:`${A} æåªå¹`,DateFormat:"D&nb[s]pMMMM,&nb[s]pYYYY",MinLosText:`å¾${E}${R}éå§é è¨`,OfferText:`ç¨æ¼"${T}"ä¿é·æ´»å`,UsePriceRound:C,UsePriceSplit:!0,PriceDelimiter:","},kk:{DateText:`ÐÒ£ ÑиÑÐ¼Ð´Ñ Ð±Ð°Òа ${A}`,DateFormat:"DD.MM.YYYY",MinLosText:`${E} ${R} баÑÑап бÑÐ¾Ð½Ð´Ð°Ñ ÐºÐµÐ·Ñнде`,OfferText:`"${T}" акÑиÑÑÑ Ò¯ÑÑн`,UsePriceRound:C,UsePriceSplit:!1,PriceDelimiter:","},ru:{DateText:`Ð¡Ð°Ð¼Ð°Ñ Ð²ÑÐ³Ð¾Ð´Ð½Ð°Ñ Ñена на ${A}`,DateFormat:"D&nb[s]pMMMM&nb[s]pYYYY",MinLosText:`ÐÑи бÑониÑовании Ð¾Ñ ${E}${I} ${R}`,OfferText:`по ÑаÑиÑÑ Â«${T}»`,UsePriceRound:C,UsePriceSplit:!0,PriceDelimiter:","}},V=e=>Y()||H()?e:e=(e=>{const{PriceDelimiter:t}=q[MODULE_PRICE_LOAD_LANG];return""!==t?`${e}`.replace(".",t):e})(e=(e=>{const{UsePriceSplit:t}=q[MODULE_PRICE_LOAD_LANG];if(t){const t=(e=`${e}
2`).match(/(([,.])\d+$)/),r=t?t[0]:"",n=e.replace(r,"");e=J(n).match(/.{1,3}/g).map((e=>J(e))).reverse().join(" "),e+=r}return e})(e=(e=>{const{UsePriceRound:t}=q[MODULE_PRICE_LOAD_LANG];if(t!==C)switch(t){case w:return Math.floor(e);case N:return Math.ceil(e);case x:return Math.round(e)}return e})(e))),Q={en:{day:{one:"day",many:"days"}},fr:{month:{January:"Janvier",February:"Février",March:"Mars",April:"Avril",May:"Mai",June:"Juin",July:"Juillet",August:"Août",September:"Septembre",October:"Octobre",November:"Novembre",December:"Décembre"},day:{one:"jour",many:"jours"}},zh:{month:{January:"䏿",February:"äºæ",March:"䏿",April:"åæ",May:"äºæ",June:"å
æ",July:"䏿",August:"å
«æ",September:"乿",October:"åæ",November:"å䏿",December:"åäºæ"},day:{one:"天",many:"天"}},kk:{month:{January:"ÒаңÑаÑÑндаÒÑ",February:"аÒпанÑндаÒÑ",March:"наÑÑÑзÑндаÒÑ",April:"ÑÓÑÑÑÑндегÑ",May:"мамÑÑÑндаÒÑ",June:"маÑÑÑмÑндаÒÑ",July:"ÑÑлдеÑÑндегÑ",August:"ÑамÑзÑндаÒÑ",September:"ÒÑÑкүйегÑндегÑ",October:"ÒазанÑндаÒÑ",November:"ÒаÑаÑаÑÑндаÒÑ",December:"желÑоÒÑанÑндаÒÑ"},day:{one:"күннен",many:"күннен"}},ru:{month:{January:"ÑнваÑÑ",February:"ÑевÑалÑ",March:"маÑÑа",April:"апÑелÑ",May:"маÑ",June:"иÑнÑ",July:"иÑлÑ",August:"авгÑÑÑа",September:"ÑенÑÑбÑÑ",October:"окÑÑбÑÑ",November:"ноÑбÑÑ",December:"декабÑÑ"},day:{one:"днÑ",many:"дней"}}},K={ru:{numeralEnds:{byNumbers:new Map([[[11,12,13,14],{end:"-и",day:Q.ru.day.many}]]),byNumberEnds:new Map([[[1],{end:"-го",day:Q.ru.day.one}],[[2,3,4],{end:"-Ñ
",day:Q.ru.day.many}],[[5,6,7,8,9,0],{end:"-и",day:Q.ru.day.many}]])}}},X=e=>{const{DateFormat:t,DateText:r}=q[MODULE_PRICE_LOAD_LANG],n="en"!==MODULE_PRICE_LOAD_LANG?((e,t)=>{const r=G(e,O),n=Q[MODULE_PRICE_LOAD_LANG].month[r];return t.replace(r,n)})(e,G(e,t)):G(e,t);return r.replace(A,n)},ee=e=>"ru"!==MODULE_PRICE_LOAD_LANG?(e=>{const t=1===e?Q[MODULE_PRICE_LOAD_LANG].day.one:Q[MODULE_PRICE_LOAD_LANG].day.many;let r=q[MODULE_PRICE_LOAD_LANG].MinLosText;return r=r.replace(R,t),r=r.replace(E,e),r})(e):(e=>{const t=K.ru,r=+e.toString()[e.toString().length-1];let n=q[MODULE_PRICE_LOAD_LANG].MinLosText,i="",s="",o=!1;for(const r of t.numeralEnds.byNumbers){const[t,n]=r,{end:a,day:c}=n;if(t.includes(e)){i=a,s=c,o=!0;break}}if(!o)for(const e of t.numeralEnds.byNumberEnds){const[t,n]=e,{end:o,day:a}=n;if(t.includes(r)){i=o,s=a;break}}return n=n.replace(I,i),n=n.replace(R,s),n=n.replace(E,e),n})(e),te=B("hotel","room-type","date","nights","adults","special-offer"),re=e=>Y()||H()?e:e?(e=>q[MODULE_PRICE_LOAD_LANG].OfferText.replace(T,e))(e):e,ne=()=>{window.MODULE_PRICE_LOAD_LANG=(()=>{const e=document.documentElement.lang,t=Object.keys(q),r=Object.keys(Q),n=2===e.length?e.toLowerCase():e.substring(0,2);return t.includes(n)&&r.includes(n)?n:S})()};class ie{constructor(e){this._element=e,this._hotelId=this._element.getAttribute(_),this._roomType=this._element.getAttribute("data-module-price-load-room-type"),this._adults=this._element.getAttribute("data-module-price-load-adults"),this._currency=this._element.getAttribute("data-module-price-load-currency"),this._isDateField=this._element.hasAttribute(M),this._isMinLosField=this._element.hasAttribute(g),this._isOfferCodeField=this._element.hasAttribute("data-module-price-load-offer-code"),this._isOfferNameField=this._element.hasAttribute(y),this._isLinkField=this._element.hasAttribute($),this._hasRestoreStatusAttribute=this._element.hasAttribute(D),this._hasFillStatusAttribute=this._element.hasAttribute(b)}getHotel(){return this._hotelId}getRoomType(){return this._roomType}getAdults(){return this._adults}getLinkParams(){return this._element.getAttribute($)}getLinkBookUrl(){return this._element.getAttribute("data-module-price-load-link-book-url")}getCurrency(){return this._currency}setContent(e){this._element.innerHTML=e}setRestoreStatus(e){this._element.setAttribute(D,e.toString())}setFillStatus(e){this._element.setAttribute(b,e.toString())}setDataAttribute(e){this._element.setAttribute(M,e)}setMinLosAttribute(e){this._element.setAttribute(g,e)}setOfferAttribute(e){this._element.setAttribute(y,e)}setLink(e){this._element.href=e}isDate(){return this._isDateField}isMinLos(){return this._isMinLosField}isOfferCodeField(){return this._isOfferCodeField}isOfferName(){return this._isOfferNameField}isLink(){return this._isLinkField}hasRestoreStatus(){return this._hasRestoreStatusAttribute}hasFillStatus(){return this._hasFillStatusAttribute}}class se{constructor(e){this._priceInfo=e}getRestoreStatus(){return this._priceInfo.isRestored}getFillStatus(){return this._priceInfo.isFilled}getRatePlan(){return this._priceInfo.ratePlan?this._priceInfo.ratePlan:null}getRatePlaneCode(){const e=this.getRatePlan();return e?e.code:""}getData(){return this._priceInfo.date}getMinLos(){return this._priceInfo.minLos}getRatePlaneName(){const e=this.getRatePlan();if(e){const t=e.names,r=Object.keys(t);return t[MODULE_PRICE_LOAD_LANG]?t[MODULE_PRICE_LOAD_LANG]:t[r[0]]}return""}getPrice(){return Object.values(this._getPrices())[0]}getPriceByCurrency(e){const t=this._getPrices();return t&&t[e]?t[e]:""}isEmpty(){return Boolean(this._priceInfo)}_getPrices(){return this._priceInfo.price}}const oe="Empty price info";class ae{constructor(e){this._prices=e}getAdultsPriceInfo(e,t,r){try{return this._getPriceInfo(this._prices[e].rooms[t].guests[r])}catch(e){throw new Error(oe)}}getRoomMinPriceInfo(e,t){try{return this._getPriceInfo(this._prices[e].rooms[t].minPrice)}catch(e){throw new Error(oe)}}getHotelMinPriceInfo(e){try{return this._getPriceInfo(this._prices[e].hotelMinPrice)}catch(e){throw new Error(oe)}}_getPriceInfo(e){if(!e)throw new Error(oe);return new se(e)}}class ce{constructor(e,t){this._getAllPricesInfo(e),this._selectModuleElements(t),ne()}placePrices(){this._checkEachElement((()=>
2{this._isPriceInfoForElement()&&(Y()&&(this._setRestoreStatusToElement(),this._setFillStatusToElement(),this._setOfferCodeToElement()),this._isSetDateToElement()||this._isSetMinLosToElement()||this._isSetOfferNameToElement()||this._isSetLinkToElement()||this._hasElementCurrency()&&this._setPriceToElement())}))}_getAllPricesInfo(e){this._pricesModel=new ae(e)}_selectModuleElements(e){this._elements=void 0!==e&&""!==e?document.querySelectorAll(`${e}, ${e} [${_}]`):document.querySelectorAll(`[${_}]`)}_checkEachElement(e){this._elements.forEach((t=>{this._elementModel=new ie(t),e()}))}_isPriceInfoForElement(){const e=this._hasElementRoom()?this._getRoomsMinPriceInfo():this._getHotelPriceInfo();return!!this._isCorrectPriceInfo(e)&&(this._setPriceInfoForElement(e),!0)}_isCorrectPriceInfo(e){return e instanceof se}_setPriceInfoForElement(e){this._priceInfoModel=e}_getRoomPriceInfo(e){const t=this._elementModel.getHotel(),r=this._elementModel.getAdults();return r?this._pricesModel.getAdultsPriceInfo(t,e,r):this._pricesModel.getRoomMinPriceInfo(t,e)}_getHotelPriceInfo(){try{return this._pricesModel.getHotelMinPriceInfo(this._elementModel.getHotel())}catch(e){return null}}_getRoomsMinPriceInfo(){const e=this._elementModel.getRoomType().split(",");let t=null;return e.forEach((e=>{try{const r=this._getRoomPriceInfo(e);t instanceof se&&!(t instanceof se&&t.getPrice()>r.getPrice())||(t=r)}catch(e){return null}})),t}_setRestoreStatusToElement(){this._elementModel.hasRestoreStatus()&&this._elementModel.setRestoreStatus(this._priceInfoModel.getRestoreStatus())}_setFillStatusToElement(){this._elementModel.hasFillStatus()&&this._elementModel.setFillStatus(this._priceInfoModel.getFillStatus())}_setOfferCodeToElement(){this._elementModel.isOfferCodeField()&&this._elementModel.setContent(this._priceInfoModel.getRatePlaneCode())}_isSetDateToElement(){if(this._elementModel.isDate()){const e=this._priceInfoModel.getData();return e&&(this._elementModel.setDataAttribute(e),this._elementModel.setContent((e=>Y()||H()?e?G(e,"DD.MM.YYYY"):e:e?X(e):e)(e))),!0}return!1}_isSetMinLosToElement(){if(this._elementModel.isMinLos()){const e=this._priceInfoModel.getMinLos();return e&&(this._elementModel.setMinLosAttribute(e),this._elementModel.setContent((e=>Y()||H()?e:e?ee(e):e)(e))),!0}return!1}_isSetOfferNameToElement(){if(this._elementModel.isOfferName()){const e=this._priceInfoModel.getRatePlaneCode(),t=this._priceInfoModel.getRatePlaneName();return e&&t&&(this._elementModel.setOfferAttribute(e),this._elementModel.setContent(re(t))),!0}return!1}_isSetLinkToElement(){if(this._elementModel.isLink()){const e=this._elementModel.getLinkParams(),t=this._elementModel.getLinkBookUrl();return this._elementModel.setLink(((e,t,r,n)=>{const i=B(r.getHotel(),r.getRoomType(),n.getData(),n.getMinLos(),r.getAdults(),n.getRatePlaneCode()),s=""!==e?e.split(","):[],o=[];return t||(t=F),s.length?(s.forEach((e=>{i[e]&&o.push(`${te[e]}=${i[e]}`)})),`${t}?${o.join("&")}`):i.room?`${t}?${te.room}=${i.room}`:`${t}?${te.hotel}=${i.hotel}`})(e,t,this._elementModel,this._priceInfoModel)),!0}return!1}_hasElementCurrency(){return Boolean(this._elementModel.getCurrency())}_hasElementRoom(){return Boolean(this._elementModel.getRoomType())}_setPriceToElement(){const e=this._elementModel.getCurrency(),t=this._priceInfoModel.getPriceByCurrency(e);e&&t&&this._elementModel.setContent(V(t))}}window.setLoadedPrices=(e="")=>{const t=new z;if(t.isLoadNeeded())t.load().then((t=>{new ce(t,e).placePrices()}));else{const r=t.getFromCache();new ce(r,e).placePrices()}},document.addEventListener("DOMContentLoaded",(()=>{window.setLoadedPrices()}))}()}();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.