1define("SabyGetShop/Model",["require","exports","Types/di","Types/entity","Types/chain","SabyGetShop/constants","SabyGetCore/constants","i18n!SabyGetShop","Env/Env","Types/object","SabyGetCore/Helpers/CommonHelpers"],(function(t,e,i,s,r,n,g,a,h,o,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const l=/,{"version":"2"}/g;class d extends s.Model{constructor(){super(...arguments),this._moduleName="SabyGetShop/Model",this._$properties={Categories:{get(){return this._createCategoriesArray("@ÐаÑегоÑиÑ")}},DescriptionText:{get(){return this.get("ÐпиÑаниеТекÑÑ")||""}},isChain:{get(){var t;return(null===(t=this.get("ТипÐÑÑппÑ"))||void 0===t?void 0:t.get())===g.GROUP_TYPE.CHAIN}},isAddressUpdateBlocked:{get(){var t;return!1===(null===(t=this.get("AllowedEditField"))||void 0===t?void 0:t.get("Address"))}},isBranchOrNet:{get(){return this.get("IsNetHead")||this.get("isChain")||this.get("IsNetBranch")}},isIndividualEntrepreneur:{get(){var t;return!!(null===(t=this.get("ÐаннÑеÐонÑÑагенÑа"))||void 0===t?void 0:t.get("ÐÐ"))}},chainCount:{get(){return this._getChainCounter("ФилиалÑСайÑ")}},chainWithHeadCount:{get(){return this._getChainCounter("ФилиалÑСайÑ")}},chainAllowedOnHead:{get:()=>!0},hasPublishedChain:{get(){const t=this.get("IsNetBranch"),e=t?this.get("chainWithHeadCount"):this.get("chainCount");if(t)return this.get("ÐÑбликоваÑÑ")?e>1:e>0;else return e>0}},teamTab:{get(){return this._getTab("ÐаÑÑеÑа")},set(t){this._setTab("teamTab","ÐаÑÑеÑа",t)}},servicesTab:{get(){return this._getTab(n.BASE_SHOP_TABS_SETTINGS.CATALOG)},set(t){this._setTab("servicesTab",n.BASE_SHOP_TABS_SETTINGS.CATALOG,t)}},anyCatalogTabEnabled:{get(){return n.CATALOG_TABS_SETTINGS.some((t=>this._getTab(t)))}},isMall:{get(){var t;return(null===(t=this.get("ТипÐÑÑппÑ"))||void 0===t?void 0:t.get())===g.GROUP_TYPE.MALL}},Coordinates:{get(){return this._getCoordinates()},set(t){this._setCoordinates(t)}},HeaderStyle:{get(){return this.get("ÐаведениеРаÑÑиÑение.HeaderStyle")},set(t){this.set("ÐаведениеРаÑÑиÑение.HeaderStyle",t)}},ComputedName:{get(){return this.get("IsNetBranch")?this.get("ÐазваниеСеÑÑ"):this.get("Ðазвание")},set(t){if(this.get("IsNetBranch"))this.set("ÐазваниеСеÑÑ",t);else this.set("Ðазвание",t)}},Description:{get(){const t=this.get("IsNetBranch")?this.get("ÐпиÑаниеСеÑÑ"):this.get("ÐпиÑание"),e=t?JSON.parse(t):[];return this._getValidJSONML(e)},set(t){let e=null,i=null;if(t&&t.length){const s="string"==typeof t;e=s?t:JSON.stringify(t),i=s?JSON.parse(t):t}const s=this.get("Description");if(!(0,o.isEqual)(i,s))if(!this._checkRealMarkup(i,s))this.set(this.get("IsNetBranch")?"ÐпиÑаниеСеÑÑ":"ÐпиÑание",e)}},Landing:{get(){return this.get("IsNetBranch")?this.get("ÐÑоÑмлениеСеÑÑ"):this.get("ÐÑоÑмление")},set(t){this.set(this.get("IsNetBranch")?"ÐÑоÑмлениеСеÑÑ":"ÐÑоÑмление",t)}},Banner:{get(){return this.get("ФоÑо")},set(t){this.set("ФоÑо",t)}},HasDescription:{get(){const t=this.get("Description");return!(!t||!t.length)}},IsSalon:{get(){return!!this.get("ТипÐаведениÑ").get("Салон")}},IsRestaurant:{get(){return!!this.get("ТипÐаведениÑ").get("РеÑÑоÑан")}},IsShop:{get(){return!!this.get("ТипÐаведениÑ").get("ÐагаÐ
1·Ð¸Ð½")}},IsHotel:{get(){return!!this.get("ТипÐаведениÑ").get("ÐÑелÑ")}},IsSelfEmployed:{get(){return!!this.get("ТипÐаведениÑ").get("СамозанÑÑÑй")}},IsShopsGroup:{get(){return this.get("isMall")}},IsUnverifiedShop:{get(){var t;return(null===(t=this.get("ТипÐÑÑппÑ"))||void 0===t?void 0:t.get())===g.GROUP_TYPE.BID}},IsNoContractorShop:{get(){var t;return(null===(t=this.get("ТипÐÑÑппÑ"))||void 0===t?void 0:t.get())===g.GROUP_TYPE.NO_CONTRACTOR}},DeliveryButtonEnabled:{get(){var t;return null===(t=this.get("Флаги"))||void 0===t?void 0:t.get("WidgetDelivery")}},BookingButtonEnabled:{get(){var t;return null===(t=this.get("Флаги"))||void 0===t?void 0:t.get("WidgetPresto")}},AppointmentButtonEnabled:{get(){var t;return null===(t=this.get("Флаги"))||void 0===t?void 0:t.get("WidgetBeauty")}},OrderButtonEnabled:{get(){var t;return null===(t=this.get("Флаги"))||void 0===t?void 0:t.get("WidgetOrder")}},RoomsButtonEnabled:{get(){var t;return null===(t=this.get("Флаги"))||void 0===t?void 0:t.get("WidgetHotel")}},WidgetsEnabledCount:{get(){let t=0;if(this.get("DeliveryButtonEnabled"))t++;if(this.get("BookingButtonEnabled"))t++;if(this.get("AppointmentButtonEnabled"))t++;if(this.get("OrderButtonEnabled"))t++;if(this.get("RoomsButtonEnabled"))t++;return t}},DeliveryButtonVisible:{get(){return this.get("ÐÑбликоваÑÑ")&&this._getTab("ÐиджеÑÑÐаказа")&&this.get("DeliveryButtonEnabled")}},BookingButtonVisible:{get(){return this.get("ÐÑбликоваÑÑ")&&this._getTab("ÐиджеÑÑÐаказа")&&this.get("BookingButtonEnabled")}},AppointmentButtonVisible:{get(){return this.get("ÐÑбликоваÑÑ")&&this._getTab("ÐиджеÑÑÐаказа")&&this.get("AppointmentButtonEnabled")}},OrderButtonVisible:{get(){return this.get("ÐÑбликоваÑÑ")&&this._getTab("ÐиджеÑÑÐаказа")&&this.get("OrderButtonEnabled")&&!this.get("DeliveryButtonVisible")}},RoomsButtonVisible:{get(){return this.get("ÐÑбликоваÑÑ")&&this._getTab("ÐиджеÑÑÐаказа")&&this.get("RoomsButtonEnabled")}},HasWidgets:{get(){return this.get("DeliveryButtonVisible")||this.get("BookingButtonVisible")||this.get("AppointmentButtonVisible")||this.get("OrderButtonVisible")||this.get("RoomsButtonVisible")}},IsNetBranch:{get(){return!!this.get("ÐдÐоловÑСеÑи")}},IsNetHead:{get(){return!!this.get("Ð Ð.ÐденÑиÑикаÑоÑСеÑи")&&!this.get("IsNetBranch")}},ChainId:{get(){return this.get("isChain")?this.getKey():this.get("Ð Ð.ÐденÑиÑикаÑоÑСеÑи")}},ChainAllowed:{get(){return this.get("chainAllowedOnHead")&&this.get("hasPublishedChain")}},GalleryTab:{get(){return this._getTab("ÐалеÑеÑ")},set(t){this._setTab("GalleryTab","ÐалеÑеÑ",t)}},PanoramaPublish:{get(){return this._getTab("ÐаноÑамÑ")}},PanoramaExists:{get(){return this.get("СÑÑлкаÐаТÑÑ")&&this.get("ÐÑевÑÑТÑÑа")}},ShopType:{get(){return(0,u.getComputedShopType)(this.get("ТипÐаведениÑ"))}},CanShowBonusWidget:{get(){return!(!this.get("BonusExists")||!this.get("ÐÑбликоваÑÑ")||this.get("BonusExists")===g.BONUS_EXISTS_PARTICIPANT&&!this.get("ReferralProgram"))}},CanShowBonusChips:{get(){return!(!this.get("BonusExists")||!this.get("ÐÑбликоваÑÑ")||this.get("BonusExists")===g.BONUS_PROGRAM_DISABLE&&!this.get("ReferralProgram"))}},servicesTabName:{get(){const t=this.get("ТипÐаведениÑ");if(t.get("Салон"))return a("УÑлÑги");if(t.get("РеÑÑоÑан"))return a("ÐенÑ");
1if(t.get("Ðагазин"))return a("ÐаÑалог");else return""}},FeaturesKeys:{get(){return(0,r.factory)(this.get("ХаÑакÑеÑиÑÑики")).map((t=>t.get("ÐдÐ"))).value()}},ChainTabNameWithCounter:{get(){const t=this.get("chainWithHeadCount");return`${this.get("ChainTabName")} ${t||""}`}},ChainTabNameCapitalized:{get(){const t=this.get("ChainTabName");if(t){const[e]=t;return`${e.toUpperCase()}${t.slice(1)}`}return""}},IsSmallNet:{get(){return this.get("chainCount")<12}},CanShowDelivery:{get(){var t;return null===(t=this.get("Флаги"))||void 0===t?void 0:t.get("WidgetDelivery")}},CanShowChainTab:{get(){return!this.get("IsSmallNet")}},ChainTabName:{get(){const t=this.get("CategoryAlias"),e=this.get("ТипÐаведениÑ");if(t)return t;else if(this.get("isMall"))return a("ТЦ");else if(e.get("Салон"))return a("СалонÑ");else if(e.get("РеÑÑоÑан"))return a("РеÑÑоÑанÑ");else if(e.get("Ðагазин"))return a("ÐагазинÑ");else return a("ÐаведениÑ")}},serviceSliderName:{get(){return this.get("CanShowDelivery")?a("ÐоÑÑавка"):this.get("servicesTabName")}}}}_createCategoriesArray(t){return(0,r.factory)(this.get("ÐаÑегоÑии")).map((e=>
1e.get(t))).value()}_getCoordinates(){const t=this.get("ÐооÑдинаÑÑ");if(t)return t.replace(/\(|\)/g,"").split(", ").map((t=>+t));else return null}_setCoordinates(t){if(t){const[e,i]=t,s=`(${e}, ${i})`;return this.set("ÐооÑдинаÑÑ",s),this.set("ШиÑоÑа",e),void this.set("ÐолгоÑа",i)}this.set("ÐооÑдинаÑÑ",null)}_getTab(t,e="Ðкладки"){var i;return!!(null===(i=this.get(e))||void 0===i?void 0:i.get(t))}_setTab(t,e,i){const s=this.get("Ðкладки");s.set(e,i),this._notifyChange({Ðкладки:s})}_cutVersion(t){return JSON.stringify(t).replace(l,"")}_checkRealMarkup(t,e){return this._cutVersion(t)===this._cutVersion(e)}_getChainCounter(t){if(this.get("isBranchOrNet"))return this.get("СÑеÑÑики")[t]||0;else return null}_getValidJSONML(t){let e,i=t;try{if(i.length){const[s]=t,[r]=s;if(Array.isArray(r))i=s,e="ÐекоÑÑекÑнÑй ÑоÑÐ¼Ð°Ñ JSONML, пÑовеÑÑÑе знаÑение в поле ÐпиÑание"}if(e)h.IoC.resolve("ILogger").error("SabyGetShop/Model:_getValidJSONML",e)}catch(t){h.IoC.resolve("ILogger").error("SabyGetShop/Model:_getValidJSONML",t.message)}return i}}(0,i.register)("CardModel",d),e.default=d}
vendor: 3 bytes, line 1
1));
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.