PageSourceSearch

https://extranet.101hotels.com/build/8438.aec1ce87652739440463.1789476845338.js

js 101hotels.com collected 2026-09-24 18:14:09 UTC 17,300 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8438,6201],{16201:(e,t,s)=>{s.d(t,{Z:()=>n});var i=s(11592),a=s(62570),r=s(6210),o=s(12954),l={name:"SelectField",components:{Dropdown:s(27227).Z,ValidationProvider:o.d_,ValidationWatcher:r.Z},props:{id:{type:[Number,String],default:()=>(0,i.k$)()},value:{type:[String,Number,Object],default:""},options:{type:Array,default:()=>[]},rules:{type:String,default:null},activeFunc:{type:Function,default:void 0},immediate:{type:Boolean,default:!1},modalPriority:{type:Number,default:100},mobileNoModal:{type:Boolean,default:!1},hideCancelButton:{type:Boolean,default:!1},validationName:{type:String,default:""},startIcon:{type:String,default:()=>""},label:{type:String,default:""},readOnly:{type:Boolean,default:()=>!1},disabled:{type:Boolean,default:()=>!1},titleDrop:{type:String,default:()=>""},grouped:{type:Boolean,default:!1},searchable:{type:Boolean,default:!1},groupedList:{type:String,default:()=>""},groupedTitle:{type:String,default:()=>""},prefix:{type:String,default:()=>""},hint:{type:String,default:()=>""},suffix:{type:String,default:()=>""},stackLabel:{type:Boolean,default:()=>!1},optionLabel:{type:String,default:""},optionValue:{type:String,default:""}},data:()=>({isFocused:!1,maxHeight:320,position:"bottom",transitionSelectDrop:"select-dropdown",hasErrors:!1,localIn
1put:"",errorsItems:[]}),computed:{currentOption(){return this.mapOptions.get(this.value)||{}},mapOptions(){return(0,i.Mv)(this.options,this.optionValue,this.groupedList)},isModalDrop(){return this.lLG&&!this.mobileNoModal},localOptions(){return this.searchable&&this.localInput?this.grouped?this.options.map((e=>{const t=this.arraySearchFilter(e[this.groupedList]);return{...e,[this.groupedList]:t}})).filter((e=>e[this.groupedList].length>0)):this.arraySearchFilter(this.options):this.options},isSlotLabel(){return this.$slots.label||this.$scopedSlots.label},isSlotItemDrop(){return this.$slots.itemDrop||this.$scopedSlots.itemDrop},isHint(){return!this.hasErrors&&this.hint},isBottom(){return this.hasErrors||this.hint},isSlotEmptyDrop(){return this.$slots.emptyDrop||this.$scopedSlots.emptyDrop},hasLabel(){return this.optionLabel?this.currentOption[this.optionLabel]:this.currentOption},hasValue(){return!(!this.value&&0!==this.value)&&("string"==typeof this.value?this.value.trim().length>0:"object"!=typeof this.value||Object.keys(this.value).length>0)},hasSelectStacked(){return this.stackLabel||this.searchable&&this.isFocused},selectClass(){return{select:!0,"select--focused":this.isFocused,"select--selected":this.hasValue,"select--no-label":!this.label,"select--stacked":this.hasSelectStacked,"select--readonly":this.readOnly,"select--disabled":this.disabled,"select--error":this.hasErrors}},hasPrefix(){return(this.currentOption||this.stackLabel)&&this.prefix},hasSuffix(){return this.currentOption&&this.suffix},titleDropFinal(){return this.titleDrop||this.label||"Выберите вариант"},startIconSource(){return s(20116)("./"+this.startIcon+".svg")}},methods:{updateErrors(e){this.errorsItems=e,this.hasErrors=e.length>0},handleFocus(){this.disabled||this.readOnly||(this.$emit("focus"),this.isFocused=!0,(0,a.X)("select-field-"+this.id),this.updateDropdownPosition(),this.$nextTick((()=>
1{this.searchable&&this.isFocused&&(this.localInput="",this.$refs.input.focus())})))},updateDropdownPosition(){if(!this.$refs.selectField)return;const e=this.$refs.selectField.getBoundingClientRect(),t=window.innerHeight,s=t-e.bottom,i=e.top,a=s<320&&i>s;this.transitionSelectDrop=a?"select-dropdown-top":"select-dropdown";const r=Math.max(s,i)-40;this.maxHeight=Math.min(r,320),this.dropdownStyles={position:"fixed",top:a?"auto":`${e.bottom+4}px`,bottom:a?t-e.top+4+"px":"auto",left:`${e.left}px`,width:`${e.width}px`,zIndex:1007}},highlightText(e,t){if(!e||!t)return this.escapeHtml(e||"");const s=this.escapeHtml(e.toString()),i=this.escapeHtml(t),a=new RegExp(`(${i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi");return s.replace(a,'<span class="highlight">$1</span>')},escapeHtml(e){if(!e)return"";const t=document.createElement("div");return t.textContent=e,t.innerHTML},arraySearchFilter(e){const t=this.localInput.toLowerCase();return e.filter((e=>e[this.optionLabel]?.toLowerCase().includes(t))).map((e=>({...e,[this.optionLabel]:this.highlightText(e[this.optionLabel],t)})))},handleBlur(){this.$nextTick((()=>{this.isFocused=!1,(0,a.K)("select-field-"+this.id),this.dropdownStyles={},this.$emit("blur")}))},getOptionValue(e){return this.optionValue?e[this.optionValue]:e},selectOption(e,t){this.$emit("input",this.getOptionValue(e)),this.$emit("select",e),this.handleBlur()},clearSelect(){this.$emit("input",""),this.$emit("select","")},closeMiddleware(){return this.isDesktop},handleInput:(0,i.Ds)((function(e){this.localInput=e.target.value}),300)}},n=(0,s(51900).Z)(l,(function(){var e=this,t=e._self._c;return t("div",{class:e.selectClass},[t("ValidationProvider",{ref:"provider",attrs:{tag:"div",name:e.validationName||e.label,immediate:e.immediate,rules:e.rules},scopedSlots:e._u([{key:"default",fn:function(s){let{errors:i}=s;return[t("ValidationWatcher",{attrs:{errors:i},on:{change:e.updateErrors}}),e._v(" "),t("input",{attrs:{type:"hidden"},domProps:{value:e.value}})]}}])}),e._v(" "),t("div",{staticClass:"select__wrapper"},[t("div",{ref:"selectField",staticClass:"select__field",on:{click:e.handleFocus}},[e.startIcon?t("div",{staticClass:"select__icon"},[t("icon",{attrs:{data:e.startIconSource}})],1):e._e(),e._v(" "),t("div",{staticClass:"select__content"},[e.isSlotLabel?e._t("label",null,{prefix:e.prefix,label:e.label,isFocused:e.isFocused,selected:e.currentOption,suffix:e.suffix}):[e.label?t("div",{staticClass:"select__label"},[e._v("\n                        "+e._s(e.label)+"\n                    ")]):e._e(),e._v(" "),t("div",{staticClass:"select__container"},[e.hasPrefix?t("div",{staticClass:"select__prefix"},[e._v("\n                            "+e._s(e.prefix)+"\n                        ")]):e._e(),e._v(" "),e.isFocused&&e.searchable?t("div",{staticClass:"select__value"},[t("input",{ref:"input",staticClass:"select__input",attrs:{name:"selectInput",type:"text"},on:{input:e.handleInput}})]):e.hasLabel?t("div",{staticClass:"select__value"},[e._v("\n                            "+e._s(e.hasLabel)+"\n                        ")]):e._e(),e._v(" "),e.hasSuffix?t("div",{staticClass:"select__suffix"},[e._v("\n                            "+e._s(e.suffix)+"\n                        ")]):e._e()])]],2),e._v(" "),t("div",{staticClass:"select__control"},[t("icon",{attrs:{data:s(96789)}})],1)]),e._v(" "),e.isBottom?t("div",{staticClass:"select__bottom"},[e.hasErrors?t("div",{staticClass:"select__error"},[t("icon",{attrs:{data:s(56369)}}),e._v(" "),t("span",[e._v(e._s(e.errorsItems[0]))])],1):e.isHint?t("span",{staticClass:"select__hint"},[e._v("\n                "+e._s(e.hint)+"\n            ")]):e._e()]):e._e()]),e._v(" "),e.isFocused?t("div",{staticClass:"select-dropdown"},[t("div",{staticClass:"select-dropdown-back"}),e._v(" "),t("Dropdown",{ref:"options",style:e.dropdownStyles,attrs:{"show-empty":!0,show:e.isFocused,"modal-priority":e.modalPriority,"max-height":e.maxHeight,"mobile-no-modal":e.mobileNoModal,"click-outside-close":"","active-func":e.activeFunc,transition:e.transitionSelectDrop,active:e.value,"item-field":e.optionLabel,"active-field":e.optionValue,title:e.titleDropFinal,grouped:e.grouped,"grouped-list":e.groupedList,"grouped-title":e.groupedTitle,tabindex:"-1",list:e.localOptions},on:{close:e.handleBlur,select:e.selectOption},scopedSlots:e._u([e.isSlotItemDrop?{key:"itemDrop",fn:function(t){let{item:s,activeItem:i}=t;return[e._t("item",null,{item:s,activeItem:i})]}}:null,e.isSlotEmptyDrop?{key:"empty",fn:function(){return[e._t("empty")]},proxy:!0}:null],null,!0)}
1)],1):e._e()],1)}),[],!1,null,null,null).exports},73314:(e,t,s)=>{s.d(t,{Z:()=>a});var i={name:"FullBlockLoader",components:{Loader:s(89987).Z},props:{isStickyLoading:{type:Boolean,default:!1},isTransparent:{type:Boolean,default:!1}},computed:{getLoadingClasses(){return{"full-block-loader":!0,"full-block-loader_sticky":this.isStickyLoading,"full-block-loader_transparent":this.isTransparent}}}},a=(0,s(51900).Z)(i,(function(){var e=this._self._c;return e("div",{class:this.getLoadingClasses},[e("div",{staticClass:"full-block-loader__loading-inner"},[e("Loader",{attrs:{type:"loading"}})],1)])}),[],!1,null,"42ccad94",null).exports},93671:(e,t,s)=>{s.d(t,{Z:()=>a});var i={name:"Skeleton",props:{shape:{type:String,default:"rectangle",validator:e=>["rectangle","circle"].includes(e)},size:{type:String,default:null},width:{type:String,default:"100%"},height:{type:String,default:"1rem"},borderRadius:{type:String,default:null},animation:{type:String,default:"wave",validator:e=>["wave","none"].includes(e)}},computed:{containerStyle(){return this.size?{width:this.size,height:this.size,borderRadius:this.borderRadius}:{width:this.width,height:this.height,borderRadius:this.borderRadius}},skeletonClasses(){return{skeleton:!0,"skeleton--circle":"circle"===this.shape,"skeleton--no-animation":"none"===this.animation}}}},a=(0,s(51900).Z)(i,(function(){var e=this;return(0,e._self._c)("div",{class:e.skeletonClasses,style:e.containerStyle,attrs:{"aria-hidden":"true"}})}),[],!1,null,"54434e24",null).exports},76627:(e,t,s)=>{s.r(t),s.d(t,{default:()=>m});var i=s(20629),a=s(44859),r=s(19923),o=s(14137),l={name:"ServicesCategoryNew",components:{NewService:r.Z},props:{category:{type:Object,required:!0},categories:{type:Object,default:()=>({})},matchObject:{type:Object,required:!0}},computed:{categoryIconSize(){return this.mMD?"24":"20"},iconData(){const e=o.hf[this.category.id];return e?s(20116)(`./${e}.svg`):null},highlightedCategoryName(){if(!this.matchObject.showOnlyMatched)return this.category.name;const e=this.matchObject.categories?.find((e=>e.id===this.category.id));return e?.matches?.length?e.matches.reduce(((e,t)=>{const s=[...t.indices].sort(((e,t)=>t[1]-t[0]-(e[1]-e[0])))[0],i=e.substring(s[0],s[1]+1);return e.replace(i,`<span class="text-underline text-green">${i}</span>`)}),this.category.name):this.category.name},filteredServiceTypes(){const e=Object.values(this.category.types).filter((e=>!e.active));return this.matchObject.showOnlyMatched?e.filter((e=>{const t=this.matchObject.serviceTypes?.[e.id];return t?.isShown})):e}},methods:{openModal(e){this.$emit("open-modal",e)}}},n=s(51900),c=(0,n.Z)(l,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"category-new"},[t("h4",{staticClass:"category-new-name"},[e.iconData?t("icon",{attrs:{data:e.iconData,width:e.categoryIconSize,height:e.categoryIconSize,color:"#101828"}}):e._e(),e._v(" "),t("span",{domProps:{innerHTML:e._s(e.highlightedCategoryName)}})],1),e._v(" "),t("div",{staticClass:"category-new__services"},e._l(e.filteredServiceTypes,(function(s){return t("NewService",{key:s.id,attrs:{service:s,categories:e.categories,"match-object":e.matchObject},on:{"open-modal":e.openModal}})})),1)])}),[],!1,null,"98096198",null).exports,d=s(52416),h=s(57229),u=s(88720),p=s(68598),g=s(9574),v=s(93671),y=s(51089),f={name:"NewServices",components:{ServicesHeader:a.Z,ServicesCategoryNew:c,ServicesBlankState:d.Z,Loading:h.Z,Button:u.Z,ServiceControlModal:p.Z,Skeleton:v.Z},mixins:[y.Z],props:{back:{type:String,default:""},scroll:{type:String,default:""},isMaster:{type:Boolean,default:!1}},data:()=>({activeCategoriesIds:{},dataLoaded:!1,showModal:!1,selectedService:null,selectedServiceClone:null,visibleCategoryIds:{},categoryObserver:null,lastCategoryKey:"",isCreating:!1}),computed:{...(0,i.rn)("hotel",["hotel"]),...(0,i.rn)("layout",["loading"]),visibleCategories(){return Object.values(this.categoriesClone).filter((e=>{if(!(0===Object.keys(this.activeCategoriesIds).length||this.activeCategoriesIds[e.id]))return;if(!Object.values(e.types).some((e=>!e.active)))return;if(!this.matchObject.showOnlyMatched)return!0;const t=this.matchObject.categories?.find((t=>t.id===e.id));return t?.isShown?Object.values(e.types).some((e=>{if(!e.active)return this.matchObject.serviceTypesActuallyMatched?.[e.id]})):Object.values(e.types).some((e=>{if(e.active)return;const t=this.matchObject.serviceTypes?.[e.id];return t?.isShown}))}))},blankStateType(){return 0===this.visibleCategories.length?this.matchObject.showOnlyMatched?"no-results":"all":null}},mounted(){Promise.all([this.fetchHotel(),this.manager.init({hotelId:this.currentHotelId,addToast:this.addToast,onServiceChange:this.handleServiceChange,onDetailChange:this.handleDetailChange,skipDetailServices:!0})]).then((e=>{let[t,s]=e;this.assignManagerData(s),this.$emit("loaded"),this.initializeFuseInstances(),this.dataLoaded=!0,this.$nextTick((()=>{this.setupCategoryObserverIfNeeded()}))}))},updated(){this.$nextTick((()=>{this.setupCategoryObserverIfNeeded()}))},beforeDestroy(){this.destroyCategoryObserver()},methods:{...(0,i.nv)("layout",["toggleLoading","toggleMobileChangedCount","addError","removeError","addToast"]),...(0,i.nv)("hotel",["fetchHotel"]),handleSearch(e){this.search=e,e.length>=2&&(this.isSearching=!0),this.debounceMatches()},updateCategoryFilter(e){let{filter:t,isFilterActive:s}=e;s?this.$set(this.activeCategoriesIds,t.id,!0):this.$delete(this.activeCategoriesIds,t.id)},openModal(e){let{service:t,serviceClone:s}=e;this.isCreating||(this.isCreating=!0,this.selectedService=t,(0,g.X5)().createService(s,{successMessage:"Услуга успешно создана",primaryBtnText:"Перейти Ð
1º услугам",primaryBtnFn:()=>{this.isMaster?this.$emit("back"):this.$router.push({name:"services",params:{hotelId:this.currentHotelId}})}}).then((e=>{this.isCreating=!1,e&&(this.selectedServiceClone=structuredClone(e),this.showModal=!0,this.$nextTick((()=>{this.$refs.editModal.show()})))})).catch((()=>{this.isCreating=!1})))},handleServiceUpdate(e,t,s){s&&(0,g.X5)().updateService(e,{successMessage:"Изменения успешно сохранены"})},getInactiveTypesCount(e){return this.matchObject.showOnlyMatched?Object.values(e.types).filter((e=>{if(e.active)return;const t=this.matchObject.serviceTypes?.[e.id];return t?.isShown})).length:Object.values(e.types).filter((e=>!e.active)).length},getCategoryEl(e){const t=this.$refs[`category-${e}`];return t&&t[0]?t[0]:t},setupCategoryObserverIfNeeded(){const e=this.visibleCategories.map((e=>e.id)).join(",");if(e===this.lastCategoryKey)return;if(!this.visibleCategories.some((e=>!!this.getCategoryEl(e.id))))return;this.lastCategoryKey=e,this.destroyCategoryObserver();const t=window.innerHeight;this.visibleCategories.forEach((e=>{const s=this.getCategoryEl(e.id);if(s){const i=s.getBoundingClientRect();i.top<t+300&&i.bottom>-300&&this.$set(this.visibleCategoryIds,e.id,!0)}})),this.categoryObserver=new IntersectionObserver(this.handleCategoryIntersection,{root:null,rootMargin:"300px",threshold:0}),this.visibleCategories.forEach((e=>{const t=this.getCategoryEl(e.id);t&&this.categoryObserver.observe(t)}))},destroyCategoryObserver(){this.categoryObserver&&(this.categoryObserver.disconnect(),this.categoryObserver=null)},handleCategoryIntersection(e){e.forEach((e=>{const t=Object.keys(this.$refs).find((t=>{const s=this.$refs[t];return(s&&s[0]?s[0]:s)===e.target}));if(t){const s=parseInt(t.replace("category-",""),10);this.$set(this.visibleCategoryIds,s,e.isIntersecting)}}))}}},m=(0,n.Z)(f,(function(){var e=this,t=e._self._c;return e.loading?e._e():t("div",[t("div",{staticClass:"services-new"},[e.isMaster?t("Button",{staticClass:"services-new__back",attrs:{text:"Вернуться",hierarchy:"link",color:"black","start-icon":"chevron-left"},on:{action:function(t){return e.$emit("back")}}}):e._e(),e._v(" "),e.mMD&&e.isMaster?t("h2",{staticClass:"services-new__title"},[e._v("\n            Добавить услуги\n        ")]):e._e(),e._v(" "),e.dataLoaded?[t("ServicesHeader",{attrs:{search:e.search,"category-filters":e.categoriesClone,"match-object":e.matchObject,"show-all-filters":"","filter-by-inactive":""},on:{search:e.handleSearch,updateFilter:e.updateCategoryFilter}}),e._v(" "),!e.isMaster&&e.isSearching?t("Loading"):e._e(),e._v(" "),!e.isSearching||e.isMaster?[e._l(e.visibleCategories,(function(s){return t("div",{key:s.id,ref:`category-${s.id}`,refInFor:!0,staticClass:"services-new__category-wrapper"},[e.visibleCategoryIds[s.id]?t("ServicesCategoryNew",{attrs:{category:s,categories:e.categoriesClone,"match-object":e.matchObject},on:{"open-modal":e.openModal}}):t("div",{staticClass:"services-new__category-skeleton"},[t("Skeleton",{attrs:{width:"200px",height:"28px","border-radius":"8px"}}),e._v(" "),t("div",{staticClass:"services-new__services"},e._l(e.getInactiveTypesCount(s),(function(e){return t("Skeleton",{key:e,attrs:{width:"100%",height:"72px","border-radius":"16px"}})})),1)],1)],1)})),e._v(" "),e.blankStateType?t("ServicesBlankState",{attrs:{type:e.blankStateType}}):e._e()]:e._e(),e._v(" "),e.showModal?t("ServiceControlModal",{ref:"editModal",attrs:{"detail-allowed":e.selectedService.detail_allowed,"modal-type":"create",service:e.selectedServiceClone,"service-name":e.selectedServiceClone.name,"service-type-name":e.selectedService.name},on:{submit:e.handleServiceUpdate,hide:function(t){e.showModal=!1}}}):e._e()]:t("Loading",{attrs:{loading:!e.dataLoaded}})],2)])}),[],!1,null,"1023ce17",null).exports}}]);

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.