import{openBlock as s,createElementBlock as p,Fragment as d,createElementVNode as i,normalizeClass as o,toDisplayString as c,createCommentVNode as _,withDirectives as u,vModelText as h}from "/js/vue.esm-browser.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))f(n);new MutationObserver(n=>{for(const r of n)if(r.type==="childList")for(const a of r.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&f(a)}).observe(document,{childList:!0,subtree:!0});function e(n){const r={};return n.integrity&&(r.integrity=n.integrity),n.referrerPolicy&&(r.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?r.credentials="include":n.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function f(n){if(n.ep)return;n.ep=!0;const r=e(n);fetch(n.href,r)}})();const q=(l,t)=>{const e=l.__vccOpts||l;for(const[f,n]of t)e[f]=n;return e},m={props:{app:null,width:null,version:null,disablePrice:null,posLeft:null,posRight:null,posCenter:null},data(){return{CUR_MATRIX:{12:1,13:100,15:3,16:500,21:1,23:100,25:3,26:500,31:.01,32:.01,35:1/30.003,36:5,51:3,52:3,53:30.003,56:150,61:.002,62:.002,63:.2,65:1/150},V_STEP:5e3,V_LIMIT_MAX:1e6,V_MAX_INPUT_NUM:1e7,dictMainIcon:{1:"lsfw-form-control__usd-icon",2:"lsfw-form-control__eur-icon",3:"lsfw-form-control__rub-icon",4:"lsfw-form-control__byr-icon",5:"lsfw-form-control__uah-icon",6:"lsfw-form-control__kzt-icon"},enabledCurrency:[1,2,3,4,5,6],opened:!1,percentMax:15,inpPriceFrom:"",inpPriceTo:""}},watch:{enabledCurrency(l,t){},opened(l,t){},percentMax(l,t){this.app.req.pt=Math.round(this.app.req.pf*this.percentMaxToMod),this.inpPriceTo=this.app.req.pt>1?this.nfmt(this.app.req.pt):""},"app.req.pf"(l,t){this.app.req.pt=Math.round(this.app.req.pf*this.percentMaxToMod),this.inpPriceTo=this.app.req.pt>1?this.nfmt(this.app.req.pt):""},"app.req.pt"(l,t){},"app.req.cur"(l,t){}},created:function(){this.app.req.pf||(this.app.req.pf=0),!this.app.req.pt&&this.app.req.pt!==0&&(this.app.req.pt=this.V_LIMIT_MAX);let l=parseInt(window.tiUserConf.ticf_defcur);(!l||isNaN(l))&&(l=3),this.app.req.cur||(this.app.req.cur=l);let t=window.tiUserConf.ticf_encur;t&&(t=tkIntArray(JSON.parse(t)),t&&(this.enabledCurrency=t)),this.updateInputLabels()},computed:{percentMaxToMod(){return parseFloat(100+this.percentMax).toFixed(0)/100},isEmpty:function(){return this.app.req.pf<1&&(this.app.req.pt<1||this.app.req.pt>=this.V_LIMIT_MAX)}},methods:{updateInputLabels(){this.app.req.pf<1?this.inpPriceFrom="":this.inpPriceFrom=this.nfmt(this.app.req.pf),this.app.req.pt<1?this.inpPriceTo="":this.inpPriceTo=this.nfmt(this.app.req.pt)},priceFix(){this.app.req.pt<this.app.req.pf&&(this.app.req.pf=this.app.req.pt,this.updateInputLabels())},priceKeyup:invDebounce(function(l,t){var e=parseInt((this[l]+"").replace(/\D+/g,""));(isNaN(e)||e<1)&&(e=0),this[l]=this.nfmt(e),this.app.req[t]=e,t=="pt"&&this.priceFix(),this.app.req.pf>this.V_MAX_INPUT_NUM&&(this.app.req.pf=this.V_MAX_INPUT_NUM),this.app.req.pt>this.V_MAX_INPUT_NUM&&(this.app.req.pt=this.V_MAX_INPUT_NUM),this.updateInputLabels()},300),priceSlide(l,t){var e=parseInt((this.app.req[t]+"").replace(/\D+/g,""));(isNaN(e)||e<1)&&(e=0),this[l]=this.nfmt(e),this.app.req[t]=e,this.priceFix(),this.updateInputLabels()},priceSet(l,t,e){var f=parseInt((e+"").replace(/\D+/g,""));(isNaN(f)||f<1)&&(f=0),this[l]=this.nfmt(f),this.app.req[t]=f,this.priceFix(),this.updateInputLabels()},nfmt:function(l){return(l+"").split(/(?=(?:\d{3})+$)/).join(" ")},reset(){this.app.req.pf=0,this.app.req.pt=0,this.percentMax=15,this.switchCurrency(3),this.app.req.cur=3,this.priceFix(),this.updateInputLabels()},currencyName(){return lsfw.currency.getName(this.app.req.cur)},currencyChar(){return lsfw.currency.getChar(this.app.req.cur)},switchCurrency(l,t){switch(this.app.req.cur=t,this.app.req.cur){case 1:case 2:this.V_STEP=50,this.V_LIMIT_MAX=1e4,this.V_MAX_INPUT_NUM=1e6;break;case 5:this.V_STEP=200,this.V_LIMIT_MAX=4e4,this.V_MAX_INPUT_NUM=4e5;break;case 6:this.V_STEP=25e3,this.V_LIMIT_MAX=25e5,this.V_MAX_INPUT_NUM=25e6;break;default:this.V_STEP=5e3,this.V_LIMIT_MAX=1e6,this.V_MAX_INPUT_NUM=1e7;break}let e=this.CUR_MATRIX[l+""+t];e&&(this.app.req.pt=Math.round(this.app.req.pt*e),this.app.req.pf=Math.round(this.app.req.pf*e)),this.app.req.pf>this.V_MAX_INPUT_NUM&&(this.app.req.pf=this.V_MAX_INPUT_NUM),this.app.req.pt>this.V_MAX_INPUT_NUM&&(this.app.req.pt=this.V_MAX_INPUT_NUM),this.updateInputLabels(),this.disablePrice&&(this.opened=!1)},addPercent(l){if(l<1&&this.percentMax<=-l){this.percentMax=0;return}if(l>0&&this.percentMax>25){this.percentMax=30;return}this.percentMax+=l}}},y={key:0,class:"bth__inp-block"},M=i("span",{class:"bth__inp-lbl"},"Ваш бюджет",-1),b={key:0,class:"bth__inp uppercase"},w={key:1,class:"bth__inp uppercase"},v={key:2,class:"bth__inp uppercase"},I={key:3,class:"bth__inp uppercase"},k={key:4,class:"bth__inp uppercase"},T={key:1,class:"bth__inp-block"},P=i("span",{class:"bth__inp-lbl"},"Валюта",-1),V={class:"bth__inp uppercase"},C={class:"lsfw-filter__drop"},A={class:"lsfw-filter__drop-currency"},L={key:0,class:"fz12 uppercase"},N={key:1,class:"fz12 uppercase"},X={key:2,class:"fz12 uppercase"},x={key:3,class:"fz12 uppercase"},U={key:4,class:"fz12 uppercase"},g={class:"bth__inp-block"},F=i("span",{class:"bth__inp-lbl w115px"},"Ваш бюджет ",-1),S={key:0,class:"bth__inp uppercase"},O={key:1,class:"bth__inp uppercase"},E={key:2,class:"bth__inp uppercase"},z={key:3,class:"bth__inp uppercase"},D={key:4,class:"bth__inp uppercase"},K={class:"lsfw-tour-search__input"},R={class:"pr10"},B={key:0,class:""},j={key:1,class:""},J={key:2,class:""},G={key:3,class:""},H={key:4,class:""},Q={class:"bth__inp-block"},W=i("span",{class:"bth__inp-lbl"},"Ваш бюджет",-1),Y={key:0,class:"bth__inp uppercase"},Z={key:1,class:"bth__inp uppercase"},$={key:2,class:"bth__inp uppercase"},ee={key:3,class:"bth__inp uppercase"},te={key:4,class:"bth__inp uppercase"},re={class:"lsfw-form-control"},ne={class:"lsfw-form-control__head lsfw-form-control__head-flex"},ie=i("div",{class:"lsfw-form-control__ttl"},"Ваш бюджет на покупку тура",-1),se={class:"lsfw-form-control__body"},pe={key:0,class:"lsfw-form-control__currency lsfw-form-control__rub-icon"},ce=["checked"],le=i("label",{for:"currency1-2"},[i("b",null,"₽"),i("span",null,"Рубль")],-1),ae={key:1,class:"lsfw-form-control__currency lsfw-form-control__eur-icon"},_e=["checked"],fe=i("label",{for:"currency2-2"},[i("b",null,"€"),i("span",null,"Евро")],-1),oe={key:2,class:"lsfw-form-control__currency lsfw-form-control__usd-icon"},ue=["checked"],he=i("label",{for:"currency3-2"},[i("b",null,"$"),i("span",null,"Доллар")],-1),de={key:3,class:"lsfw-form-control__currency lsfw-form-control__kzt-icon"},qe=["checked"],me=i("label",{for:"currency4-2"},[i("b",null," ₸ "),i("span",null,"Тенге")],-1),ye={key:4,class:"lsfw-form-control__currency lsfw-form-control__byn-icon"},Me=["checked"],be=i("label",{for:"currency5-2"},[i("b",null,"Б"),i("span",null," Бел. рубль")],-1),we={key:0,class:"lsfw-form-control__price"},ve=i("label",{for:"opt-price2",class:"lsfw-form-control__ttl-sm"},"Комфортный бюджет",-1),Ie={key:1,class:"lsfw-form-control__price"},ke=i("label",{for:"max-price2",class:"lsfw-form-control__ttl-sm"},"Максимальный бюджет",-1),Te={class:"lsfw-form-control__price-limit hint-parent"},Pe={class:"lsfw-form-control__price-limit-val"},Ve=["max","step"],Ce={key:0,class:"lsfw-form-control__footer"};function Ae(l,t,e,f,n,r){return s(),p(d,null,[e.version=="big"?(s(),p("div",{key:0,onClick:t[0]||(t[0]=a=>n.opened=!0),class:"pointer relative"},[i("b",{class:o(["tour-selection-field__icon40",{active:!r.isEmpty}])},c(r.currencyChar()),3),e.disablePrice?(s(),p("div",T,[P,i("span",V,c(r.currencyName()),1)])):(s(),p("div",y,[M,e.app.req.pf<1&&(e.app.req.pt<1||e.app.req.pt>=n.V_LIMIT_MAX)?(s(),p("span",b," не ограничен ")):e.app.req.pf<1&&e.app.req.pt>0&&e.app.req.pt<n.V_LIMIT_MAX?(s(),p("span",w," < "+c(r.nfmt(e.app.req.pt)),1)):e.app.req.pf>0&&(e.app.req.pt<1||e.app.req.pt>=n.V_LIMIT_MAX)?(s(),p("span",v," > "+c(r.nfmt(e.app.req.pf)),1)):e.app.req.pf>0&&e.app.req.pf==e.app.req.pt?(s(),p("span",I," = "+c(r.nfmt(e.app.req.pf)),1)):e.app.req.pf>0&&(e.app.req.pt>0||e.app.req.pt>=n.V_LIMIT_MAX)?(s(),p("span",k,c(r.nfmt(e.app.req.pf))+" - "+c(r.nfmt(e.app.req.pt)),1)):_("",!0)]))])):_("",!0),e.version=="small"?(s(),p("div",{key:1,onClick:t[1]||(t[1]=a=>n.opened=!0),class:"lsfw-filter__drop-wrap"},[i("div",C,[i("b",A,c(r.currencyChar()),1),e.app.req.pf<1&&(e.app.req.pt<1||e.app.req.pt>=n.V_LIMIT_MAX)?(s(),p("span",L," - "+c(r.currencyName()),1)):e.app.req.pf<1&&e.app.req.pt>0&&e.app.req.pt<n.V_LIMIT_MAX?(s(),p("span",N," < "+c(r.nfmt(e.app.req.pt)),1)):e.app.req.pf>0&&(e.app.req.pt<1||e.app.req.pt>=n.V_LIMIT_MAX)?(s(),p("span",X," > "+c(r.nfmt(e.app.req.pf)),1)):e.app.req.pf>0&&e.app.req.pf==e.app.req.pt?(s(),p("span",x," = "+c(r.nfmt(e.app.req.pf)),1)):e.app.req.pf>0&&(e.app.req.pt>0||e.app.req.pt>=n.V_LIMIT_MAX)?(s(),p("span",U,c(r.nfmt(e.app.req.pf))+" - "+c(r.nfmt(e.app.req.pt)),1)):_("",!0)])])):_("",!0),e.version=="admin"?(s(),p("div",{key:2,onClick:t[2]||(t[2]=a=>n.opened=!0),class:o(["lsfw-form__cell",e.width?e.width:"w20p"])},[i("div",g,[F,e.app.req.pf<1&&(e.app.req.pt<1||e.app.req.pt>=n.V_LIMIT_MAX)?(s(),p("span",S,c(r.currencyChar())+" - "+c(r.currencyName()),1)):e.app.req.pf<1&&e.app.req.pt>0&&e.app.req.pt<n.V_LIMIT_MAX?(s(),p("span",O,c(r.currencyChar())+" - < "+c(r.nfmt(e.app.req.pt)),1)):e.app.req.pf>0&&(e.app.req.pt<1||e.app.req.pt>=n.V_LIMIT_MAX)?(s(),p("span",E,c(r.currencyChar())+" - > "+c(r.nfmt(e.app.req.pf)),1)):e.app.req.pf>0&&e.app.req.pf==e.app.req.pt?(s(),p("span",z,c(r.currencyChar())+" - = "+c(r.nfmt(e.app.req.pf)),1)):e.app.req.pf>0&&(e.app.req.pt>0||e.app.req.pt>=n.V_LIMIT_MAX)?(s(),p("span",D,c(r.currencyChar())+" - "+c(r.nfmt(e.app.req.pf))+" - "+c(r.nfmt(e.app.req.pt)),1)):_("",!0)])],2)):_("",!0),e.version=="ti"?(s(),p("div",{key:3,onClick:t[3]||(t[3]=a=>n.opened=!0),class:"lsfw-tour-search__w90px"},[i("div",K,[i("span",R,c(r.currencyChar()),1),e.app.req.pf<1&&(e.app.req.pt<1||e.app.req.pt>=n.V_LIMIT_MAX)?(s(),p("span",B," ∞ ")):e.app.req.pf<1&&e.app.req.pt>0&&e.app.req.pt<n.V_LIMIT_MAX?(s(),p("span",j," < "+c(r.nfmt(e.app.req.pt)),1)):e.app.req.pf>0&&(e.app.req.pt<1||e.app.req.pt>=n.V_LIMIT_MAX)?(s(),p("span",J," > "+c(r.nfmt(e.app.req.pf)),1)):e.app.req.pf>0&&e.app.req.pf==e.app.req.pt?(s(),p("span",G," = "+c(r.nfmt(e.app.req.pf)),1)):e.app.req.pf>0&&(e.app.req.pt>0||e.app.req.pt>=n.V_LIMIT_MAX)?(s(),p("span",H,c(r.nfmt(e.app.req.pf))+" - "+c(r.nfmt(e.app.req.pt)),1)):_("",!0)])])):_("",!0),e.version=="small-ti"?(s(),p("div",{key:4,onClick:t[4]||(t[4]=a=>n.opened=!0),class:"pointer relative"},[i("b",{class:o(["tour-selection-field__icon40",{active:!r.isEmpty}])},c(r.currencyChar()),3),i("div",Q,[W,e.app.req.pf<1&&(e.app.req.pt<1||e.app.req.pt>=n.V_LIMIT_MAX)?(s(),p("span",Y," бюджет ")):e.app.req.pf<1&&e.app.req.pt>0&&e.app.req.pt<n.V_LIMIT_MAX?(s(),p("span",Z," < "+c(r.nfmt(e.app.req.pt)),1)):e.app.req.pf>0&&(e.app.req.pt<1||e.app.req.pt>=n.V_LIMIT_MAX)?(s(),p("span",$," > "+c(r.nfmt(e.app.req.pf)),1)):e.app.req.pf>0&&e.app.req.pf==e.app.req.pt?(s(),p("span",ee," = "+c(r.nfmt(e.app.req.pf)),1)):e.app.req.pf>0&&(e.app.req.pt>0||e.app.req.pt>=n.V_LIMIT_MAX)?(s(),p("span",te,c(r.nfmt(e.app.req.pf))+" - "+c(r.nfmt(e.app.req.pt)),1)):_("",!0)])])):_("",!0),n.opened?(s(),p("section",{key:5,class:o(["lsfw-form-control-wrap lsfw-anim-fade-in",{"lsfw-form-control-wrap--right":e.version!="ti","lsfw-form-control-wrap--left":e.version=="ti","lsfw-form-control-wrap--right":e.posRight,"lsfw-form-control-wrap--left":e.posLeft}])},[i("div",re,[i("div",ne,[ie,i("i",{onClick:t[5]||(t[5]=a=>n.opened=!1),class:"lsfw-form-control__close-square fas fa-times-circle"})]),i("div",se,[i("ul",{class:o(["lsfw-form-control__currencies no-scrollbar",{"lsfw-form-control__currencies--mini":!e.disablePrice}])},[n.enabledCurrency.indexOf(3)>-1?(s(),p("li",pe,[i("input",{id:"currency1-2",name:"currency-2",type:"radio",value:3,checked:e.app.req.cur==3,onChange:t[6]||(t[6]=a=>r.switchCurrency(e.app.req.cur,3))},null,40,ce),le])):_("",!0),n.enabledCurrency.indexOf(2)>-1?(s(),p("li",ae,[i("input",{id:"currency2-2",name:"currency-2",type:"radio",value:2,checked:e.app.req.cur==2,onChange:t[7]||(t[7]=a=>r.switchCurrency(e.app.req.cur,2))},null,40,_e),fe])):_("",!0),n.enabledCurrency.indexOf(1)>-1?(s(),p("li",oe,[i("input",{id:"currency3-2",name:"currency-2",type:"radio",value:1,checked:e.app.req.cur==1,onChange:t[8]||(t[8]=a=>r.switchCurrency(e.app.req.cur,1))},null,40,ue),he])):_("",!0),n.enabledCurrency.indexOf(6)>-1?(s(),p("li",de,[i("input",{id:"currency4-2",name:"currency-2",type:"radio",value:6,checked:e.app.req.cur==6,onChange:t[9]||(t[9]=a=>r.switchCurrency(e.app.req.cur,6))},null,40,qe),me])):_("",!0),n.enabledCurrency.indexOf(5)>-1?(s(),p("li",ye,[i("input",{id:"currency5-2",name:"currency-2",type:"radio",value:5,checked:e.app.req.cur==5,onChange:t[10]||(t[10]=a=>r.switchCurrency(e.app.req.cur,5))},null,40,Me),be])):_("",!0)],2),e.disablePrice?_("",!0):(s(),p("div",we,[ve,i("div",{class:o(["lsfw-form-control__inp-block","lsfw-form-control-prc-border--"+e.app.req.cur])},[u(i("input",{"onUpdate:modelValue":t[11]||(t[11]=a=>n.inpPriceFrom=a),onKeyup:t[12]||(t[12]=a=>r.priceKeyup("inpPriceFrom","pf")),onFocus:t[13]||(t[13]=a=>n.inpPriceFrom=e.app.req.pf==0?"":n.inpPriceFrom),placeholder:"не ограничен",id:"opt-price2"},null,544),[[h,n.inpPriceFrom]])],2)])),e.disablePrice?_("",!0):(s(),p("div",Ie,[ke,i("div",{class:o(["lsfw-form-control__inp-block","lsfw-form-control-prc-border--"+e.app.req.cur])},[u(i("input",{"onUpdate:modelValue":t[14]||(t[14]=a=>n.inpPriceTo=a),onKeyup:t[15]||(t[15]=a=>r.priceKeyup("inpPriceTo","pt")),onFocus:t[16]||(t[16]=a=>n.inpPriceTo=e.app.req.pt==0?"":n.inpPriceTo),placeholder:"не ограничен",id:"max-price2"},null,544),[[h,n.inpPriceTo]]),i("div",Te,[i("span",Pe,"+"+c(n.percentMax)+"%",1),i("i",{onClick:t[17]||(t[17]=a=>r.addPercent(5)),class:"lsfw-form-control__price-limit-up fas fa-chevron-up"}),i("i",{onClick:t[18]||(t[18]=a=>r.addPercent(-5)),class:"lsfw-form-control__price-limit-down fas fa-chevron-down"})])],2)])),e.disablePrice?_("",!0):(s(),p("section",{key:2,class:o(["lsfw-form-control__ranges","lsfw-form-control__ranges-"+e.app.req.cur])},[u(i("input",{"onUpdate:modelValue":t[19]||(t[19]=a=>e.app.req.pf=a),min:"0",max:n.V_LIMIT_MAX,step:n.V_STEP,type:"range",onInput:t[20]||(t[20]=a=>r.priceSlide("inpPriceFrom","pf")),onChange:t[21]||(t[21]=a=>r.priceSlide("inpPriceFrom","pf"))},null,40,Ve),[[h,e.app.req.pf]])],2))]),e.disablePrice?_("",!0):(s(),p("div",Ce,[i("button",{onClick:t[22]||(t[22]=a=>n.opened=!1),class:"lsfw-form-control__btn"},"Применить"),e.app.req.pf>0||e.app.req.pt>0?(s(),p("button",{key:0,onClick:t[23]||(t[23]=a=>r.reset()),class:"lsfw-form-control__btn lsfw-form-control__btn--grey"}," Сбросить ")):_("",!0)]))])],2)):_("",!0)],64)}const Le=q(m,[["render",Ae]]);window.lsfw||(window.lsfw={});window.form3Price=Le;
